diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..58ec1bdb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,30 @@ +# Spec 005 T3 — weekly dependency updates, grouped so each ecosystem opens one PR. +version: 2 +updates: + - package-ecosystem: bundler + directory: / + schedule: { interval: weekly } + groups: + gems: { patterns: ["*"] } + + - package-ecosystem: npm + directory: / + schedule: { interval: weekly } + groups: + root-packages: { patterns: ["*"] } + + - package-ecosystem: npm + directory: /e2e + schedule: { interval: weekly } + groups: + e2e-packages: { patterns: ["*"] } + + - package-ecosystem: github-actions + directory: / + schedule: { interval: weekly } + groups: + actions: { patterns: ["*"] } + + - package-ecosystem: gitsubmodule + directory: / + schedule: { interval: weekly } diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..5e2ed470 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,34 @@ +# Spec 005 T3 — static analysis of the site's JavaScript, Ruby plugins and workflows. +name: CodeQL + +on: + push: + branches: [master] + pull_request: + branches: [master] + schedule: + - cron: '23 4 * * 1' + +permissions: + contents: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + security-events: write + strategy: + fail-fast: false + matrix: + language: [actions, javascript-typescript, ruby] + steps: + - uses: actions/checkout@v4 + - uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: none + queries: security-and-quality + - uses: github/codeql-action/analyze@v3 + with: + category: /language:${{ matrix.language }} diff --git a/_config.yml b/_config.yml index b00e9307..500a2733 100644 --- a/_config.yml +++ b/_config.yml @@ -72,8 +72,9 @@ staticman: # Secret used to secure communication with Staticman secret: "REPLACE_WITH_YOUR_SECRET" # reCAPTCHA configuration + # Off until contribute (spec 003) replaces Staticman; the site key below is a placeholder. recaptcha: - enabled: true + enabled: false siteKey: "REPLACE_WITH_YOUR_SITE_KEY" secret: "REPLACE_WITH_YOUR_SECRET" diff --git a/_includes/components/atoms/head.html b/_includes/components/atoms/head.html index 659addd7..ecb93558 100644 --- a/_includes/components/atoms/head.html +++ b/_includes/components/atoms/head.html @@ -142,25 +142,11 @@ - - + + - -{% if jekyll.environment == "production" %} - -{% endif %} diff --git a/_includes/head.html b/_includes/head.html index 320573f1..5c78cc03 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -4,10 +4,10 @@ - + - + - -{% if jekyll.environment == "production" %} - -{% endif %} - \ No newline at end of file diff --git a/docs/adr/0003-deploy-on-cloudflare-workers.md b/docs/adr/0003-deploy-on-cloudflare-workers.md new file mode 100644 index 00000000..a237730d --- /dev/null +++ b/docs/adr/0003-deploy-on-cloudflare-workers.md @@ -0,0 +1,22 @@ +# 0003 — Deploy the site on Cloudflare Workers (static assets) + +Date: 2026-10-11 · Status: Accepted · Spec: [005](../specs/005-website-modernization/spec.md) + +## Context + +The site is served through Cloudflare, configured outside the repository (`.cloudflare/pages.toml` is not a format +Cloudflare Pages reads), while `.github/workflows/deploy.yml` targets GitHub Pages. The `contribute` and `discuss` +services will run on Cloudflare Workers, and their sign-in sessions should be first-party cookies on the IPL domain. + +## Decision + +Build the Jekyll site in CI and deploy `_site` as **Workers static assets** with Wrangler (`wrangler.toml` in the +repository), keeping `_headers`, `_redirects` and the 404 page. The site Worker owns `ipl.better-web.org` and later +routes `/contribute/*` and `/discuss/*` to the services through service bindings. Preview deployments per pull request. +The migration happens **after** the modernization (spec 005), which removes the parallel build systems first. + +## Consequences + +- One platform and toolchain (Wrangler) for site and services; versioned, reviewable deploy configuration. +- First-party sessions for GitHub/ORCID sign-in; no cross-site cookies or wildcard CORS. +- The build moves to GitHub Actions; the GitHub Pages workflow and the Pages configuration are removed. diff --git a/docs/specs/005-website-modernization/plan.md b/docs/specs/005-website-modernization/plan.md new file mode 100644 index 00000000..4c47796a --- /dev/null +++ b/docs/specs/005-website-modernization/plan.md @@ -0,0 +1,18 @@ +# 005 — Plan + +Spec: [spec.md](spec.md). Base branch: `chore/modernize` (stacked on `feat/design-v1`, which is not merged yet). + +## Approach +Each phase is a PR, tests green at every step; deletions are listed and approved by the maintainer before running. + +| Phase | Changes | Verification | +| --- | --- | --- | +| 1 Safety | Pin `@tailwindcss/browser@4.3.3` and Font Awesome 6.4.0 with SRI (`crossorigin="anonymous"`); remove GA snippets from both head includes; `.github/dependabot.yml`, CodeQL workflow; delete approved dead files; untrack `vendor/bundle` | New build tests for AC1/AC2; full suites | +| 2 Toolchain | Ruby 3.4 (`.ruby-version`, `Gemfile`, Docker/CI); `bundle update` gated by suites; consolidate scripts in `package.json`; port remaining Rake generation into plugins; CI workflow running Minitest + Playwright/axe; remove Rake/Make/`build.sh`/`deploy.yml` | Suites on CI; page-count parity before/after | +| 3 Front-end | Tailwind CLI v4 build step (`@theme` from `tailwind-theme.css`, content globs over templates and submodules) emitting `assets/css/site.css`; remove the runtime script; icon atom replaces Font Awesome per component | Screenshot diff of reference pages; axe | +| 4 Performance | Liquid profiling; move per-page menu/resource loops into plugin-generated data | Build time < 10 s | +| 5 Workers | `wrangler.toml` with `[assets] directory = "_site"`, `not_found_handling = "404-page"`; deploy job with PR previews | Smoke + E2E against the preview URL | + +## Risks +- Tailwind compilation must scan submodule pages too, or legacy classes disappear (content globs include `en-US/**`, `pt-BR/**`). +- Removing Rake must not drop pages: parity test counts generated pages per language before/after. diff --git a/docs/specs/005-website-modernization/spec.md b/docs/specs/005-website-modernization/spec.md new file mode 100644 index 00000000..c7337745 --- /dev/null +++ b/docs/specs/005-website-modernization/spec.md @@ -0,0 +1,32 @@ +# 005 — Website modernization + +Status: in progress · Tracking issue: [#27](https://github.com/InternetPublicLibrary/IPLibrary-website/issues/27) · +ADR: [0003](../../adr/0003-deploy-on-cloudflare-workers.md) + +## Why +The site builds and runs, but on an end-of-life Ruby, with 87 MB of vendored gems in git, three overlapping build +systems, a CI that does not run what developers run, unpinned third-party scripts and dead code. Moving to +Cloudflare Workers (ADR 0003) is only safe once the build is single, reproducible and tested. + +## What +1. **Safety and hygiene:** third-party scripts pinned to exact versions with SRI; the dead Universal Analytics + snippet removed; `vendor/bundle` and debug/unused files out of git; Dependabot and CodeQL. +2. **One toolchain:** Ruby 3.4+; one set of `package.json` scripts calling Jekyll directly; Rake/Make/`build.sh` + retired after parity; CI runs `rake test`, Playwright + axe and internal link checks on every PR. +3. **Compiled front-end:** Tailwind compiled at build time from the IPL palette; no runtime CSS compiler; Font + Awesome replaced by the local icon atom. +4. **Performance:** full build under 10 s; Lighthouse budget on the reference pages. +5. **Deploy:** Workers static assets via Wrangler with PR previews (ADR 0003); GitHub Pages workflow removed. + +## Acceptance criteria +- [ ] AC1 — No third-party `"}) - # # => "{\"name\":\"\"}" - # - # json_escape(json) - # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" - # - # JSON.parse(json) == JSON.parse(json_escape(json)) - # # => true - # - # The intended use case for this method is to escape JSON strings before including - # them inside a script tag to avoid XSS vulnerability: - # - # - # - # It is necessary to +raw+ the result of +json_escape+, so that quotation marks - # don't get converted to " entities. +json_escape+ doesn't - # automatically flag the result as HTML safe, since the raw value is unsafe to - # use inside HTML attributes. - # - # If your JSON is being used downstream for insertion into the DOM, be aware of - # whether or not it is being inserted via html(). Most jQuery plugins do this. - # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated - # content returned by your JSON. - # - # If you need to output JSON elsewhere in your HTML, you can just do something - # like this, as any unsafe characters (including quotation marks) will be - # automatically escaped for you: - # - #
...
- # - # WARNING: this helper only works with valid JSON. Using this on non-JSON values - # will open up serious XSS vulnerabilities. For example, if you replace the - # +current_user.to_json+ in the example above with user input instead, the browser - # will happily eval() that string as JavaScript. - # - # The escaping performed in this method is identical to those performed in the - # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is - # set to true. Because this transformation is idempotent, this helper can be - # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. - # - # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ - # is enabled, or if you are unsure where your JSON string originated from, it - # is recommended that you always apply this helper (other libraries, such as the - # JSON gem, do not provide this kind of protection by default; also some gems - # might override +to_json+ to bypass Active Support's encoder). - def json_escape(s) - result = s.to_s.dup - result.gsub!(">", '\u003e') - result.gsub!("<", '\u003c') - result.gsub!("&", '\u0026') - result.gsub!("\u2028", '\u2028') - result.gsub!("\u2029", '\u2029') - s.html_safe? ? result.html_safe : result - end - - module_function :json_escape - - # A utility method for escaping XML names of tags and names of attributes. - # - # xml_name_escape('1 < 2 & 3') - # # => "1___2___3" - # - # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name - def xml_name_escape(name) - name = name.to_s - return "" if name.blank? - return name if name.match?(SAFE_XML_TAG_NAME_REGEXP) - - starting_char = name[0] - starting_char.gsub!(INVALID_TAG_NAME_START_REGEXP, TAG_NAME_REPLACEMENT_CHAR) - - return starting_char if name.size == 1 - - following_chars = name[1..-1] - following_chars.gsub!(INVALID_TAG_NAME_FOLLOWING_REGEXP, TAG_NAME_REPLACEMENT_CHAR) - - starting_char << following_chars - end - module_function :xml_name_escape - - # Tokenizes a line of ERB. This is really just for error reporting and - # nobody should use it. - def self.tokenize(source) # :nodoc: - require "strscan" - source = StringScanner.new(source.chomp) - tokens = [] - - start_re = /<%(?:={1,2}|-|\#|%)?/m - finish_re = /(?:[-=])?%>/m - - while !source.eos? - pos = source.pos - source.scan_until(/(?:#{start_re}|#{finish_re})/) - raise NotImplementedError if source.matched.nil? - len = source.pos - source.matched.bytesize - pos - - case source.matched - when start_re - tokens << [:TEXT, source.string.byteslice(pos, len)] if len > 0 - tokens << [:OPEN, source.matched] - if source.scan(/(.*?)(?=#{finish_re}|\z)/m) - tokens << [:CODE, source.matched] unless source.matched.empty? - tokens << [:CLOSE, source.scan(finish_re)] unless source.eos? - else - raise NotImplementedError - end - when finish_re - tokens << [:CODE, source.string.byteslice(pos, len)] if len > 0 - tokens << [:CLOSE, source.matched] - else - raise NotImplementedError, source.matched - end - - unless source.eos? || source.exist?(start_re) || source.exist?(finish_re) - tokens << [:TEXT, source.rest] - source.terminate - end - end - - tokens - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/file.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/file.rb deleted file mode 100644 index 64553bfa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/file.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/file/atomic" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/file/atomic.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/file/atomic.rb deleted file mode 100644 index b442ea31..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/file/atomic.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -require "fileutils" - -class File - # Write to a file atomically. Useful for situations where you don't - # want other processes or threads to see half-written files. - # - # File.atomic_write('important.file') do |file| - # file.write('hello') - # end - # - # This method needs to create a temporary file. By default it will create it - # in the same directory as the destination file. If you don't like this - # behavior you can provide a different directory but it must be on the - # same physical filesystem as the file you're trying to write. - # - # File.atomic_write('/data/something.important', '/data/tmp') do |file| - # file.write('hello') - # end - def self.atomic_write(file_name, temp_dir = dirname(file_name)) - require "tempfile" unless defined?(Tempfile) - - Tempfile.open(".#{basename(file_name)}", temp_dir) do |temp_file| - temp_file.binmode - return_val = yield temp_file - temp_file.close - - old_stat = if exist?(file_name) - # Get original file permissions - stat(file_name) - else - # If not possible, probe which are the default permissions in the - # destination directory. - probe_stat_in(dirname(file_name)) - end - - if old_stat - # Set correct permissions on new file - begin - chown(old_stat.uid, old_stat.gid, temp_file.path) - # This operation will affect filesystem ACL's - chmod(old_stat.mode, temp_file.path) - rescue Errno::EPERM, Errno::EACCES - # Changing file ownership failed, moving on. - end - end - - # Overwrite original file with temp file - rename(temp_file.path, file_name) - return_val - end - end - - # Private utility method. - def self.probe_stat_in(dir) # :nodoc: - basename = [ - ".permissions_check", - Thread.current.object_id, - Process.pid, - rand(1000000) - ].join(".") - - file_name = join(dir, basename) - FileUtils.touch(file_name) - stat(file_name) - rescue Errno::ENOENT - file_name = nil - ensure - FileUtils.rm_f(file_name) if file_name - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash.rb deleted file mode 100644 index 2f0901d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/hash/conversions" -require "active_support/core_ext/hash/deep_merge" -require "active_support/core_ext/hash/deep_transform_values" -require "active_support/core_ext/hash/except" -require "active_support/core_ext/hash/indifferent_access" -require "active_support/core_ext/hash/keys" -require "active_support/core_ext/hash/reverse_merge" -require "active_support/core_ext/hash/slice" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/conversions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/conversions.rb deleted file mode 100644 index 8ab2fd69..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/conversions.rb +++ /dev/null @@ -1,262 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/blank" -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/object/to_query" -require "active_support/core_ext/object/try" -require "active_support/core_ext/array/wrap" -require "active_support/core_ext/hash/reverse_merge" -require "active_support/core_ext/string/inflections" - -class Hash - # Returns a string containing an XML representation of its receiver: - # - # { foo: 1, bar: 2 }.to_xml - # # => - # # - # # - # # 1 - # # 2 - # # - # - # To do so, the method loops over the pairs and builds nodes that depend on - # the _values_. Given a pair +key+, +value+: - # - # * If +value+ is a hash there's a recursive call with +key+ as :root. - # - # * If +value+ is an array there's a recursive call with +key+ as :root, - # and +key+ singularized as :children. - # - # * If +value+ is a callable object it must expect one or two arguments. Depending - # on the arity, the callable is invoked with the +options+ hash as first argument - # with +key+ as :root, and +key+ singularized as second argument. The - # callable can add nodes by using options[:builder]. - # - # {foo: lambda { |options, key| options[:builder].b(key) }}.to_xml - # # => "foo" - # - # * If +value+ responds to +to_xml+ the method is invoked with +key+ as :root. - # - # class Foo - # def to_xml(options) - # options[:builder].bar 'fooing!' - # end - # end - # - # { foo: Foo.new }.to_xml(skip_instruct: true) - # # => - # # - # # fooing! - # # - # - # * Otherwise, a node with +key+ as tag is created with a string representation of - # +value+ as text node. If +value+ is +nil+ an attribute "nil" set to "true" is added. - # Unless the option :skip_types exists and is true, an attribute "type" is - # added as well according to the following mapping: - # - # XML_TYPE_NAMES = { - # "Symbol" => "symbol", - # "Integer" => "integer", - # "BigDecimal" => "decimal", - # "Float" => "float", - # "TrueClass" => "boolean", - # "FalseClass" => "boolean", - # "Date" => "date", - # "DateTime" => "dateTime", - # "Time" => "dateTime" - # } - # - # By default the root node is "hash", but that's configurable via the :root option. - # - # The default XML builder is a fresh instance of +Builder::XmlMarkup+. You can - # configure your own builder with the :builder option. The method also accepts - # options like :dasherize and friends, they are forwarded to the builder. - def to_xml(options = {}) - require "active_support/builder" unless defined?(Builder::XmlMarkup) - - options = options.dup - options[:indent] ||= 2 - options[:root] ||= "hash" - options[:builder] ||= Builder::XmlMarkup.new(indent: options[:indent]) - - builder = options[:builder] - builder.instruct! unless options.delete(:skip_instruct) - - root = ActiveSupport::XmlMini.rename_key(options[:root].to_s, options) - - builder.tag!(root) do - each { |key, value| ActiveSupport::XmlMini.to_tag(key, value, options) } - yield builder if block_given? - end - end - - class << self - # Returns a Hash containing a collection of pairs when the key is the node name and the value is - # its content - # - # xml = <<-XML - # - # - # 1 - # 2 - # - # XML - # - # hash = Hash.from_xml(xml) - # # => {"hash"=>{"foo"=>1, "bar"=>2}} - # - # +DisallowedType+ is raised if the XML contains attributes with type="yaml" or - # type="symbol". Use Hash.from_trusted_xml to - # parse this XML. - # - # Custom +disallowed_types+ can also be passed in the form of an - # array. - # - # xml = <<-XML - # - # - # 1 - # "David" - # - # XML - # - # hash = Hash.from_xml(xml, ['integer']) - # # => ActiveSupport::XMLConverter::DisallowedType: Disallowed type attribute: "integer" - # - # Note that passing custom disallowed types will override the default types, - # which are Symbol and YAML. - def from_xml(xml, disallowed_types = nil) - ActiveSupport::XMLConverter.new(xml, disallowed_types).to_h - end - - # Builds a Hash from XML just like Hash.from_xml, but also allows Symbol and YAML. - def from_trusted_xml(xml) - from_xml xml, [] - end - end -end - -module ActiveSupport - class XMLConverter # :nodoc: - # Raised if the XML contains attributes with type="yaml" or - # type="symbol". Read Hash#from_xml for more details. - class DisallowedType < StandardError - def initialize(type) - super "Disallowed type attribute: #{type.inspect}" - end - end - - DISALLOWED_TYPES = %w(symbol yaml) - - def initialize(xml, disallowed_types = nil) - @xml = normalize_keys(XmlMini.parse(xml)) - @disallowed_types = disallowed_types || DISALLOWED_TYPES - end - - def to_h - deep_to_h(@xml) - end - - private - def normalize_keys(params) - case params - when Hash - Hash[params.map { |k, v| [k.to_s.tr("-", "_"), normalize_keys(v)] } ] - when Array - params.map { |v| normalize_keys(v) } - else - params - end - end - - def deep_to_h(value) - case value - when Hash - process_hash(value) - when Array - process_array(value) - when String - value - else - raise "can't typecast #{value.class.name} - #{value.inspect}" - end - end - - def process_hash(value) - if value.include?("type") && !value["type"].is_a?(Hash) && @disallowed_types.include?(value["type"]) - raise DisallowedType, value["type"] - end - - if become_array?(value) - _, entries = Array.wrap(value.detect { |k, v| not v.is_a?(String) }) - if entries.nil? || value["__content__"].try(:empty?) - [] - else - case entries - when Array - entries.collect { |v| deep_to_h(v) } - when Hash - [deep_to_h(entries)] - else - raise "can't typecast #{entries.inspect}" - end - end - elsif become_content?(value) - process_content(value) - - elsif become_empty_string?(value) - "" - elsif become_hash?(value) - xml_value = value.transform_values { |v| deep_to_h(v) } - - # Turn { files: { file: # } } into { files: # } so it is compatible with - # how multipart uploaded files from HTML appear - xml_value["file"].is_a?(StringIO) ? xml_value["file"] : xml_value - end - end - - def become_content?(value) - value["type"] == "file" || (value["__content__"] && (value.keys.size == 1 || value["__content__"].present?)) - end - - def become_array?(value) - value["type"] == "array" - end - - def become_empty_string?(value) - # { "string" => true } - # No tests fail when the second term is removed. - value["type"] == "string" && value["nil"] != "true" - end - - def become_hash?(value) - !nothing?(value) && !garbage?(value) - end - - def nothing?(value) - # blank or nil parsed values are represented by nil - value.blank? || value["nil"] == "true" - end - - def garbage?(value) - # If the type is the only element which makes it then - # this still makes the value nil, except if type is - # an XML node(where type['value'] is a Hash) - value["type"] && !value["type"].is_a?(::Hash) && value.size == 1 - end - - def process_content(value) - content = value["__content__"] - if parser = ActiveSupport::XmlMini::PARSING[value["type"]] - parser.arity == 1 ? parser.call(content) : parser.call(content, value) - else - content - end - end - - def process_array(value) - value.map! { |i| deep_to_h(i) } - value.length > 1 ? value : value.first - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/deep_merge.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/deep_merge.rb deleted file mode 100644 index 9af3572a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/deep_merge.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -require "active_support/deep_mergeable" - -class Hash - include ActiveSupport::DeepMergeable - - ## - # :method: deep_merge - # :call-seq: deep_merge(other_hash, &block) - # - # Returns a new hash with +self+ and +other_hash+ merged recursively. - # - # h1 = { a: true, b: { c: [1, 2, 3] } } - # h2 = { a: false, b: { x: [3, 4, 5] } } - # - # h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } - # - # Like with Hash#merge in the standard library, a block can be provided - # to merge values: - # - # h1 = { a: 100, b: 200, c: { c1: 100 } } - # h2 = { b: 250, c: { c1: 200 } } - # h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val } - # # => { a: 100, b: 450, c: { c1: 300 } } - # - #-- - # Implemented by ActiveSupport::DeepMergeable#deep_merge. - - ## - # :method: deep_merge! - # :call-seq: deep_merge!(other_hash, &block) - # - # Same as #deep_merge, but modifies +self+. - # - #-- - # Implemented by ActiveSupport::DeepMergeable#deep_merge!. - - ## - def deep_merge?(other) # :nodoc: - other.is_a?(Hash) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/deep_transform_values.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/deep_transform_values.rb deleted file mode 100644 index f7aeae5b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/deep_transform_values.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -class Hash - # Returns a new hash with all values converted by the block operation. - # This includes the values from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_transform_values{ |value| value.to_s.upcase } - # # => {person: {name: "ROB", age: "28"}} - def deep_transform_values(&block) - _deep_transform_values_in_object(self, &block) - end - - # Destructively converts all values by using the block operation. - # This includes the values from the root hash and from all - # nested hashes and arrays. - def deep_transform_values!(&block) - _deep_transform_values_in_object!(self, &block) - end - - private - # Support methods for deep transforming nested hashes and arrays. - def _deep_transform_values_in_object(object, &block) - case object - when Hash - object.transform_values { |value| _deep_transform_values_in_object(value, &block) } - when Array - object.map { |e| _deep_transform_values_in_object(e, &block) } - else - yield(object) - end - end - - def _deep_transform_values_in_object!(object, &block) - case object - when Hash - object.transform_values! { |value| _deep_transform_values_in_object!(value, &block) } - when Array - object.map! { |e| _deep_transform_values_in_object!(e, &block) } - else - yield(object) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/except.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/except.rb deleted file mode 100644 index d94acd74..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/except.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class Hash - # Removes the given keys from hash and returns it. - # hash = { a: true, b: false, c: nil } - # hash.except!(:c) # => { a: true, b: false } - # hash # => { a: true, b: false } - def except!(*keys) - keys.each { |key| delete(key) } - self - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/indifferent_access.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/indifferent_access.rb deleted file mode 100644 index 4437363c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/indifferent_access.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require "active_support/hash_with_indifferent_access" - -class Hash - # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: - # - # { a: 1 }.with_indifferent_access['a'] # => 1 - def with_indifferent_access - ActiveSupport::HashWithIndifferentAccess.new(self) - end - - # Called when object is nested under an object that receives - # #with_indifferent_access. This method will be called on the current object - # by the enclosing object and is aliased to #with_indifferent_access by - # default. Subclasses of Hash may override this method to return +self+ if - # converting to an ActiveSupport::HashWithIndifferentAccess would not be - # desirable. - # - # b = { b: 1 } - # { a: b }.with_indifferent_access['a'] # calls b.nested_under_indifferent_access - # # => {"b"=>1} - alias nested_under_indifferent_access with_indifferent_access -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/keys.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/keys.rb deleted file mode 100644 index fd74f030..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/keys.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -class Hash - # Returns a new hash with all keys converted to strings. - # - # hash = { name: 'Rob', age: '28' } - # - # hash.stringify_keys - # # => {"name"=>"Rob", "age"=>"28"} - def stringify_keys - transform_keys { |k| Symbol === k ? k.name : k.to_s } - end - - # Destructively converts all keys to strings. Same as - # +stringify_keys+, but modifies +self+. - def stringify_keys! - transform_keys! { |k| Symbol === k ? k.name : k.to_s } - end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. - # - # hash = { 'name' => 'Rob', 'age' => '28' } - # - # hash.symbolize_keys - # # => {:name=>"Rob", :age=>"28"} - def symbolize_keys - transform_keys { |key| key.to_sym rescue key } - end - alias_method :to_options, :symbolize_keys - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. - def symbolize_keys! - transform_keys! { |key| key.to_sym rescue key } - end - alias_method :to_options!, :symbolize_keys! - - # Validates all keys in a hash match *valid_keys, raising - # +ArgumentError+ on a mismatch. - # - # Note that keys are treated differently than HashWithIndifferentAccess, - # meaning that string and symbol keys will not match. - # - # { name: 'Rob', years: '28' }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key: :years. Valid keys are: :name, :age" - # { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'" - # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing - def assert_valid_keys(*valid_keys) - valid_keys.flatten! - each_key do |k| - unless valid_keys.include?(k) - raise ArgumentError.new("Unknown key: #{k.inspect}. Valid keys are: #{valid_keys.map(&:inspect).join(', ')}") - end - end - end - - # Returns a new hash with all keys converted by the block operation. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_transform_keys{ |key| key.to_s.upcase } - # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} - def deep_transform_keys(&block) - _deep_transform_keys_in_object(self, &block) - end - - # Destructively converts all keys by using the block operation. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - def deep_transform_keys!(&block) - _deep_transform_keys_in_object!(self, &block) - end - - # Returns a new hash with all keys converted to strings. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_stringify_keys - # # => {"person"=>{"name"=>"Rob", "age"=>"28"}} - def deep_stringify_keys - deep_transform_keys { |k| Symbol === k ? k.name : k.to_s } - end - - # Destructively converts all keys to strings. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - def deep_stringify_keys! - deep_transform_keys! { |k| Symbol === k ? k.name : k.to_s } - end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. This includes the keys from the root hash - # and from all nested hashes and arrays. - # - # hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } } - # - # hash.deep_symbolize_keys - # # => {:person=>{:name=>"Rob", :age=>"28"}} - def deep_symbolize_keys - deep_transform_keys { |key| key.to_sym rescue key } - end - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. This includes the keys from the root hash and from all - # nested hashes and arrays. - def deep_symbolize_keys! - deep_transform_keys! { |key| key.to_sym rescue key } - end - - private - # Support methods for deep transforming nested hashes and arrays. - def _deep_transform_keys_in_object(object, &block) - case object - when Hash - object.each_with_object(self.class.new) do |(key, value), result| - result[yield(key)] = _deep_transform_keys_in_object(value, &block) - end - when Array - object.map { |e| _deep_transform_keys_in_object(e, &block) } - else - object - end - end - - def _deep_transform_keys_in_object!(object, &block) - case object - when Hash - object.keys.each do |key| - value = object.delete(key) - object[yield(key)] = _deep_transform_keys_in_object!(value, &block) - end - object - when Array - object.map! { |e| _deep_transform_keys_in_object!(e, &block) } - else - object - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/reverse_merge.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/reverse_merge.rb deleted file mode 100644 index ef8d5928..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/reverse_merge.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class Hash - # Merges the caller into +other_hash+. For example, - # - # options = options.reverse_merge(size: 25, velocity: 10) - # - # is equivalent to - # - # options = { size: 25, velocity: 10 }.merge(options) - # - # This is particularly useful for initializing an options hash - # with default values. - def reverse_merge(other_hash) - other_hash.merge(self) - end - alias_method :with_defaults, :reverse_merge - - # Destructive +reverse_merge+. - def reverse_merge!(other_hash) - replace(reverse_merge(other_hash)) - end - alias_method :reverse_update, :reverse_merge! - alias_method :with_defaults!, :reverse_merge! -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/slice.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/slice.rb deleted file mode 100644 index 56bc5de3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/hash/slice.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class Hash - # Replaces the hash with only the given keys. - # Returns a hash containing the removed key/value pairs. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.slice!(:a, :b) # => {:c=>3, :d=>4} - # hash # => {:a=>1, :b=>2} - def slice!(*keys) - omit = slice(*self.keys - keys) - hash = slice(*keys) - hash.default = default - hash.default_proc = default_proc if default_proc - replace(hash) - omit - end - - # Removes and returns the key/value pairs matching the given keys. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.extract!(:a, :b) # => {:a=>1, :b=>2} - # hash # => {:c=>3, :d=>4} - def extract!(*keys) - keys.each_with_object(self.class.new) { |key, result| result[key] = delete(key) if has_key?(key) } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer.rb deleted file mode 100644 index d2270130..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/integer/multiple" -require "active_support/core_ext/integer/inflections" -require "active_support/core_ext/integer/time" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/inflections.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/inflections.rb deleted file mode 100644 index c9879902..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/inflections.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -require "active_support/inflector" - -class Integer - # Ordinalize turns a number into an ordinal string used to denote the - # position in an ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # 1.ordinalize # => "1st" - # 2.ordinalize # => "2nd" - # 1002.ordinalize # => "1002nd" - # 1003.ordinalize # => "1003rd" - # -11.ordinalize # => "-11th" - # -1001.ordinalize # => "-1001st" - def ordinalize - ActiveSupport::Inflector.ordinalize(self) - end - - # Ordinal returns the suffix used to denote the position - # in an ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # 1.ordinal # => "st" - # 2.ordinal # => "nd" - # 1002.ordinal # => "nd" - # 1003.ordinal # => "rd" - # -11.ordinal # => "th" - # -1001.ordinal # => "st" - def ordinal - ActiveSupport::Inflector.ordinal(self) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/multiple.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/multiple.rb deleted file mode 100644 index bd57a909..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/multiple.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class Integer - # Check whether the integer is evenly divisible by the argument. - # - # 0.multiple_of?(0) # => true - # 6.multiple_of?(5) # => false - # 10.multiple_of?(2) # => true - def multiple_of?(number) - number == 0 ? self == 0 : self % number == 0 - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/time.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/time.rb deleted file mode 100644 index 5efb89cf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/integer/time.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require "active_support/duration" -require "active_support/core_ext/numeric/time" - -class Integer - # Returns a Duration instance matching the number of months provided. - # - # 2.months # => 2 months - def months - ActiveSupport::Duration.months(self) - end - alias :month :months - - # Returns a Duration instance matching the number of years provided. - # - # 2.years # => 2 years - def years - ActiveSupport::Duration.years(self) - end - alias :year :years -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel.rb deleted file mode 100644 index 77080693..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/kernel/concern" -require "active_support/core_ext/kernel/reporting" -require "active_support/core_ext/kernel/singleton_class" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/concern.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/concern.rb deleted file mode 100644 index 0b2baed7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/concern.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/concerning" - -module Kernel - module_function - - # A shortcut to define a toplevel concern, not within a module. - # - # See Module::Concerning for more. - def concern(topic, &module_definition) - Object.concern topic, &module_definition - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/reporting.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/reporting.rb deleted file mode 100644 index 1ae1ae8e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/reporting.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -module Kernel - module_function - - # Sets $VERBOSE to +nil+ for the duration of the block and back to its original - # value afterwards. - # - # silence_warnings do - # value = noisy_call # no warning voiced - # end - # - # noisy_call # warning voiced - def silence_warnings(&block) - with_warnings(nil, &block) - end - - # Sets $VERBOSE to +true+ for the duration of the block and back to its - # original value afterwards. - def enable_warnings(&block) - with_warnings(true, &block) - end - - # Sets $VERBOSE for the duration of the block and back to its original - # value afterwards. - def with_warnings(flag) - old_verbose, $VERBOSE = $VERBOSE, flag - yield - ensure - $VERBOSE = old_verbose - end - - # Blocks and ignores any exception passed as argument if raised within the block. - # - # suppress(ZeroDivisionError) do - # 1/0 - # puts 'This code is NOT reached' - # end - # - # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' - def suppress(*exception_classes) - yield - rescue *exception_classes - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/singleton_class.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/singleton_class.rb deleted file mode 100644 index 31335b68..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/kernel/singleton_class.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -module Kernel - # class_eval on an object acts like +singleton_class.class_eval+. - def class_eval(*args, &block) - singleton_class.class_eval(*args, &block) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/load_error.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/load_error.rb deleted file mode 100644 index 03df2dda..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/load_error.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class LoadError - # Returns true if the given path name (except perhaps for the ".rb" - # extension) is the missing file which caused the exception to be raised. - def is_missing?(location) - location.delete_suffix(".rb") == path.to_s.delete_suffix(".rb") - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module.rb deleted file mode 100644 index 542af98c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/aliasing" -require "active_support/core_ext/module/introspection" -require "active_support/core_ext/module/anonymous" -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/module/attribute_accessors_per_thread" -require "active_support/core_ext/module/attr_internal" -require "active_support/core_ext/module/concerning" -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/module/deprecation" -require "active_support/core_ext/module/redefine_method" -require "active_support/core_ext/module/remove_method" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/aliasing.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/aliasing.rb deleted file mode 100644 index 6f64d116..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/aliasing.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class Module - # Allows you to make aliases for attributes, which includes - # getter, setter, and a predicate. - # - # class Content < ActiveRecord::Base - # # has a title attribute - # end - # - # class Email < Content - # alias_attribute :subject, :title - # end - # - # e = Email.find(1) - # e.title # => "Superstars" - # e.subject # => "Superstars" - # e.subject? # => true - # e.subject = "Megastars" - # e.title # => "Megastars" - def alias_attribute(new_name, old_name) - # The following reader methods use an explicit `self` receiver in order to - # support aliases that start with an uppercase letter. Otherwise, they would - # be resolved as constants instead. - module_eval <<-STR, __FILE__, __LINE__ + 1 - def #{new_name}; self.#{old_name}; end # def subject; self.title; end - def #{new_name}?; self.#{old_name}?; end # def subject?; self.title?; end - def #{new_name}=(v); self.#{old_name} = v; end # def subject=(v); self.title = v; end - STR - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/anonymous.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/anonymous.rb deleted file mode 100644 index d1c86b87..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/anonymous.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class Module - # A module may or may not have a name. - # - # module M; end - # M.name # => "M" - # - # m = Module.new - # m.name # => nil - # - # +anonymous?+ method returns true if module does not have a name, false otherwise: - # - # Module.new.anonymous? # => true - # - # module M; end - # M.anonymous? # => false - # - # A module gets a name when it is first assigned to a constant. Either - # via the +module+ or +class+ keyword or by an explicit assignment: - # - # m = Module.new # creates an anonymous module - # m.anonymous? # => true - # M = m # m gets a name here as a side-effect - # m.name # => "M" - # m.anonymous? # => false - def anonymous? - name.nil? - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attr_internal.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attr_internal.rb deleted file mode 100644 index ecf57d8a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attr_internal.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -class Module - # Declares an attribute reader backed by an internally-named instance variable. - def attr_internal_reader(*attrs) - attrs.each { |attr_name| attr_internal_define(attr_name, :reader) } - end - - # Declares an attribute writer backed by an internally-named instance variable. - def attr_internal_writer(*attrs) - attrs.each { |attr_name| attr_internal_define(attr_name, :writer) } - end - - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - def attr_internal_accessor(*attrs) - attr_internal_reader(*attrs) - attr_internal_writer(*attrs) - end - alias_method :attr_internal, :attr_internal_accessor - - class << self - attr_reader :attr_internal_naming_format - - def attr_internal_naming_format=(format) - if format.start_with?("@") - raise ArgumentError, <<~MESSAGE.squish - Setting `attr_internal_naming_format` with a `@` prefix is not supported. - - You can simply replace #{format.inspect} by #{format.delete_prefix("@").inspect}. - MESSAGE - end - - @attr_internal_naming_format = format - end - end - self.attr_internal_naming_format = "_%s" - - private - def attr_internal_define(attr_name, type) - internal_name = Module.attr_internal_naming_format % attr_name - # use native attr_* methods as they are faster on some Ruby implementations - public_send("attr_#{type}", internal_name) - attr_name, internal_name = "#{attr_name}=", "#{internal_name}=" if type == :writer - alias_method attr_name, internal_name - remove_method internal_name - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attribute_accessors.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attribute_accessors.rb deleted file mode 100644 index 8511e0f9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attribute_accessors.rb +++ /dev/null @@ -1,214 +0,0 @@ -# frozen_string_literal: true - -# == Attribute Accessors -# -# Extends the module object with class/module and instance accessors for -# class/module attributes, just like the native attr* accessors for instance -# attributes. -class Module - # Defines a class attribute and creates a class and instance reader methods. - # The underlying class variable is set to +nil+, if it is not previously - # defined. All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_reader :hair_colors - # end - # - # HairColors.hair_colors # => nil - # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) - # HairColors.hair_colors # => [:brown, :black] - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # module HairColors - # mattr_reader :hair_colors, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_reader(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_styles # => [:long, :short] - def mattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil, location: nil) - raise TypeError, "module attributes should be defined directly on class, not singleton" if singleton_class? - location ||= caller_locations(1, 1).first - - definition = [] - syms.each do |sym| - raise NameError.new("invalid attribute name: #{sym}") unless /\A[_A-Za-z]\w*\z/.match?(sym) - - definition << "def self.#{sym}; @@#{sym}; end" - - if instance_reader && instance_accessor - definition << "def #{sym}; @@#{sym}; end" - end - - sym_default_value = (block_given? && default.nil?) ? yield : default - class_variable_set("@@#{sym}", sym_default_value) unless sym_default_value.nil? && class_variable_defined?("@@#{sym}") - end - - module_eval(definition.join(";"), location.path, location.lineno) - end - alias :cattr_reader :mattr_reader - - # Defines a class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. All class and instance methods created - # will be public, even if this method is called with a private or protected - # access modifier. - # - # module HairColors - # mattr_writer :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black] - # Person.class_variable_get("@@hair_colors") # => [:brown, :black] - # Person.new.hair_colors = [:blonde, :red] - # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # module HairColors - # mattr_writer :hair_colors, instance_writer: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:blonde, :red] # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_writer(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - def mattr_writer(*syms, instance_writer: true, instance_accessor: true, default: nil, location: nil) - raise TypeError, "module attributes should be defined directly on class, not singleton" if singleton_class? - location ||= caller_locations(1, 1).first - - definition = [] - syms.each do |sym| - raise NameError.new("invalid attribute name: #{sym}") unless /\A[_A-Za-z]\w*\z/.match?(sym) - definition << "def self.#{sym}=(val); @@#{sym} = val; end" - - if instance_writer && instance_accessor - definition << "def #{sym}=(val); @@#{sym} = val; end" - end - - sym_default_value = (block_given? && default.nil?) ? yield : default - class_variable_set("@@#{sym}", sym_default_value) unless sym_default_value.nil? && class_variable_defined?("@@#{sym}") - end - - module_eval(definition.join(";"), location.path, location.lineno) - end - alias :cattr_writer :mattr_writer - - # Defines both class and instance accessors for class attributes. - # All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_accessor :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # If a subclass changes the value then that would also change the value for - # parent class. Similarly if parent class changes the value then that would - # change the value of subclasses too. - # - # class Citizen < Person - # end - # - # Citizen.new.hair_colors << :blue - # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # module HairColors - # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # module HairColors - # mattr_accessor :hair_colors, instance_accessor: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_accessor(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - def mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil, &blk) - location = caller_locations(1, 1).first - mattr_reader(*syms, instance_reader: instance_reader, instance_accessor: instance_accessor, default: default, location: location, &blk) - mattr_writer(*syms, instance_writer: instance_writer, instance_accessor: instance_accessor, default: default, location: location) - end - alias :cattr_accessor :mattr_accessor -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb deleted file mode 100644 index 628da9c9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -# == Attribute Accessors per Thread -# -# Extends the module object with class/module and instance accessors for -# class/module attributes, just like the native attr* accessors for instance -# attributes, but does so on a per-thread basis. -# -# So the values are scoped within the Thread.current space under the class name -# of the module. -# -# Note that it can also be scoped per-fiber if +Rails.application.config.active_support.isolation_level+ -# is set to +:fiber+. -class Module - # Defines a per-thread class attribute and creates class and instance reader methods. - # The underlying per-thread class variable is set to +nil+, if it is not previously defined. - # - # module Current - # thread_mattr_reader :user - # end - # - # Current.user = "DHH" - # Current.user # => "DHH" - # Thread.new { Current.user }.value # => nil - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # thread_mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # class Current - # thread_mattr_reader :user, instance_reader: false - # end - # - # Current.new.user # => NoMethodError - def thread_mattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil) # :nodoc: - syms.each do |sym| - raise NameError.new("invalid attribute name: #{sym}") unless /^[_A-Za-z]\w*$/.match?(sym) - - # The following generated method concatenates `object_id` because we want - # subclasses to maintain independent values. - if default.nil? - class_eval(<<-EOS, __FILE__, __LINE__ + 1) - def self.#{sym} - @__thread_mattr_#{sym} ||= "attr_#{sym}_\#{object_id}" - ::ActiveSupport::IsolatedExecutionState[@__thread_mattr_#{sym}] - end - EOS - else - default = default.dup.freeze unless default.frozen? - singleton_class.define_method("#{sym}_default_value") { default } - - class_eval(<<-EOS, __FILE__, __LINE__ + 1) - def self.#{sym} - @__thread_mattr_#{sym} ||= "attr_#{sym}_\#{object_id}" - value = ::ActiveSupport::IsolatedExecutionState[@__thread_mattr_#{sym}] - - if value.nil? && !::ActiveSupport::IsolatedExecutionState.key?(@__thread_mattr_#{sym}) - ::ActiveSupport::IsolatedExecutionState[@__thread_mattr_#{sym}] = #{sym}_default_value - else - value - end - end - EOS - end - - if instance_reader && instance_accessor - class_eval(<<-EOS, __FILE__, __LINE__ + 1) - def #{sym} - self.class.#{sym} - end - EOS - end - end - end - alias :thread_cattr_reader :thread_mattr_reader - - # Defines a per-thread class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. - # - # module Current - # thread_mattr_writer :user - # end - # - # Current.user = "DHH" - # Thread.current[:attr_Current_user] # => "DHH" - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # class Current - # thread_mattr_writer :user, instance_writer: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - def thread_mattr_writer(*syms, instance_writer: true, instance_accessor: true) # :nodoc: - syms.each do |sym| - raise NameError.new("invalid attribute name: #{sym}") unless /^[_A-Za-z]\w*$/.match?(sym) - - # The following generated method concatenates `object_id` because we want - # subclasses to maintain independent values. - class_eval(<<-EOS, __FILE__, __LINE__ + 1) - def self.#{sym}=(obj) - @__thread_mattr_#{sym} ||= "attr_#{sym}_\#{object_id}" - ::ActiveSupport::IsolatedExecutionState[@__thread_mattr_#{sym}] = obj - end - EOS - - if instance_writer && instance_accessor - class_eval(<<-EOS, __FILE__, __LINE__ + 1) - def #{sym}=(obj) - self.class.#{sym} = obj - end - EOS - end - end - end - alias :thread_cattr_writer :thread_mattr_writer - - # Defines both class and instance accessors for class attributes. - # - # class Account - # thread_mattr_accessor :user - # end - # - # Account.user = "DHH" - # Account.user # => "DHH" - # Account.new.user # => "DHH" - # - # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. - # If a subclass changes the value, the parent class' value is not changed. - # If the parent class changes the value, the value of subclasses is not changed. - # - # class Customer < Account - # end - # - # Account.user # => "DHH" - # Customer.user # => nil - # Customer.user = "Rafael" - # Customer.user # => "Rafael" - # Account.user # => "DHH" - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # class Current - # thread_mattr_accessor :user, instance_writer: false, instance_reader: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # class Current - # thread_mattr_accessor :user, instance_accessor: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # A default value may be specified using the +:default+ option. Because - # multiple threads can access the default value, non-frozen default values - # will be duped and frozen. - def thread_mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil) - thread_mattr_reader(*syms, instance_reader: instance_reader, instance_accessor: instance_accessor, default: default) - thread_mattr_writer(*syms, instance_writer: instance_writer, instance_accessor: instance_accessor) - end - alias :thread_cattr_accessor :thread_mattr_accessor -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/concerning.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/concerning.rb deleted file mode 100644 index c8523201..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/concerning.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -require "active_support/concern" - -class Module - # == Bite-sized separation of concerns - # - # We often find ourselves with a medium-sized chunk of behavior that we'd - # like to extract, but only mix in to a single class. - # - # Extracting a plain old Ruby object to encapsulate it and collaborate or - # delegate to the original object is often a good choice, but when there's - # no additional state to encapsulate or we're making DSL-style declarations - # about the parent class, introducing new collaborators can obfuscate rather - # than simplify. - # - # The typical route is to just dump everything in a monolithic class, perhaps - # with a comment, as a least-bad alternative. Using modules in separate files - # means tedious sifting to get a big-picture view. - # - # == Dissatisfying ways to separate small concerns - # - # === Using comments: - # - # class Todo < ApplicationRecord - # # Other todo implementation - # # ... - # - # ## Event tracking - # has_many :events - # - # before_create :track_creation - # - # private - # def track_creation - # # ... - # end - # end - # - # === With an inline module: - # - # Noisy syntax. - # - # class Todo < ApplicationRecord - # # Other todo implementation - # # ... - # - # module EventTracking - # extend ActiveSupport::Concern - # - # included do - # has_many :events - # before_create :track_creation - # end - # - # private - # def track_creation - # # ... - # end - # end - # include EventTracking - # end - # - # === Mix-in noise exiled to its own file: - # - # Once our chunk of behavior starts pushing the scroll-to-understand-it - # boundary, we give in and move it to a separate file. At this size, the - # increased overhead can be a reasonable tradeoff even if it reduces our - # at-a-glance perception of how things work. - # - # class Todo < ApplicationRecord - # # Other todo implementation - # # ... - # - # include TodoEventTracking - # end - # - # == Introducing Module#concerning - # - # By quieting the mix-in noise, we arrive at a natural, low-ceremony way to - # separate bite-sized concerns. - # - # class Todo < ApplicationRecord - # # Other todo implementation - # # ... - # - # concerning :EventTracking do - # included do - # has_many :events - # before_create :track_creation - # end - # - # private - # def track_creation - # # ... - # end - # end - # end - # - # Todo.ancestors - # # => [Todo, Todo::EventTracking, ApplicationRecord, Object] - # - # This small step has some wonderful ripple effects. We can - # * grok the behavior of our class in one glance, - # * clean up monolithic junk-drawer classes by separating their concerns, and - # * stop leaning on protected/private for crude "this is internal stuff" modularity. - # - # === Prepending concerning - # - # concerning supports a prepend: true argument which will prepend the - # concern instead of using include for it. - module Concerning - # Define a new concern and mix it in. - def concerning(topic, prepend: false, &block) - method = prepend ? :prepend : :include - __send__(method, concern(topic, &block)) - end - - # A low-cruft shortcut to define a concern. - # - # concern :EventTracking do - # ... - # end - # - # is equivalent to - # - # module EventTracking - # extend ActiveSupport::Concern - # - # ... - # end - def concern(topic, &module_definition) - const_set topic, Module.new { - extend ::ActiveSupport::Concern - module_eval(&module_definition) - } - end - end - include Concerning -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/delegation.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/delegation.rb deleted file mode 100644 index f306d55f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/delegation.rb +++ /dev/null @@ -1,225 +0,0 @@ -# frozen_string_literal: true - -class Module - require "active_support/delegation" - DelegationError = ActiveSupport::DelegationError # :nodoc: - - # Provides a +delegate+ class method to easily expose contained objects' - # public methods as your own. - # - # ==== Options - # * :to - Specifies the target object name as a symbol or string - # * :prefix - Prefixes the new method with the target name or a custom prefix - # * :allow_nil - If set to true, prevents a +ActiveSupport::DelegationError+ - # from being raised - # * :private - If set to true, changes method visibility to private - # - # The macro receives one or more method names (specified as symbols or - # strings) and the name of the target object via the :to option - # (also a symbol or string). - # - # Delegation is particularly useful with Active Record associations: - # - # class Greeter < ActiveRecord::Base - # def hello - # 'hello' - # end - # - # def goodbye - # 'goodbye' - # end - # end - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, to: :greeter - # end - # - # Foo.new.hello # => "hello" - # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for # - # - # Multiple delegates to the same target are allowed: - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, :goodbye, to: :greeter - # end - # - # Foo.new.goodbye # => "goodbye" - # - # Methods can be delegated to instance variables, class variables, or constants - # by providing them as a symbols: - # - # class Foo - # CONSTANT_ARRAY = [0,1,2,3] - # @@class_array = [4,5,6,7] - # - # def initialize - # @instance_array = [8,9,10,11] - # end - # delegate :sum, to: :CONSTANT_ARRAY - # delegate :min, to: :@@class_array - # delegate :max, to: :@instance_array - # end - # - # Foo.new.sum # => 6 - # Foo.new.min # => 4 - # Foo.new.max # => 11 - # - # It's also possible to delegate a method to the class by using +:class+: - # - # class Foo - # def self.hello - # "world" - # end - # - # delegate :hello, to: :class - # end - # - # Foo.new.hello # => "world" - # - # Delegates can optionally be prefixed using the :prefix option. If the value - # is true, the delegate methods are prefixed with the name of the object being - # delegated to. - # - # Person = Struct.new(:name, :address) - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, to: :client, prefix: true - # end - # - # john_doe = Person.new('John Doe', 'Vimmersvej 13') - # invoice = Invoice.new(john_doe) - # invoice.client_name # => "John Doe" - # invoice.client_address # => "Vimmersvej 13" - # - # It is also possible to supply a custom prefix. - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, to: :client, prefix: :customer - # end - # - # invoice = Invoice.new(john_doe) - # invoice.customer_name # => 'John Doe' - # invoice.customer_address # => 'Vimmersvej 13' - # - # The delegated methods are public by default. - # Pass private: true to change that. - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :first_name, to: :profile - # delegate :date_of_birth, to: :profile, private: true - # - # def age - # Date.today.year - date_of_birth.year - # end - # end - # - # User.new.first_name # => "Tomas" - # User.new.date_of_birth # => NoMethodError: private method `date_of_birth' called for # - # User.new.age # => 2 - # - # If the target is +nil+ and does not respond to the delegated method a - # +ActiveSupport::DelegationError+ is raised. If you wish to instead return +nil+, - # use the :allow_nil option. - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :age, to: :profile - # end - # - # User.new.age - # # => ActiveSupport::DelegationError: User#age delegated to profile.age, but profile is nil - # - # But if not having a profile yet is fine and should not be an error - # condition: - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :age, to: :profile, allow_nil: true - # end - # - # User.new.age # nil - # - # Note that if the target is not +nil+ then the call is attempted regardless of the - # :allow_nil option, and thus an exception is still raised if said object - # does not respond to the method: - # - # class Foo - # def initialize(bar) - # @bar = bar - # end - # - # delegate :name, to: :@bar, allow_nil: true - # end - # - # Foo.new("Bar").name # raises NoMethodError: undefined method `name' - # - # The target method must be public, otherwise it will raise +NoMethodError+. - def delegate(*methods, to: nil, prefix: nil, allow_nil: nil, private: nil) - ::ActiveSupport::Delegation.generate( - self, - methods, - location: caller_locations(1, 1).first, - to: to, - prefix: prefix, - allow_nil: allow_nil, - private: private, - ) - end - - # When building decorators, a common pattern may emerge: - # - # class Partition - # def initialize(event) - # @event = event - # end - # - # def person - # detail.person || creator - # end - # - # private - # def respond_to_missing?(name, include_private = false) - # @event.respond_to?(name, include_private) - # end - # - # def method_missing(method, *args, &block) - # @event.send(method, *args, &block) - # end - # end - # - # With Module#delegate_missing_to, the above is condensed to: - # - # class Partition - # delegate_missing_to :@event - # - # def initialize(event) - # @event = event - # end - # - # def person - # detail.person || creator - # end - # end - # - # The target can be anything callable within the object, e.g. instance - # variables, methods, constants, etc. - # - # The delegated method must be public on the target, otherwise it will - # raise +ActiveSupport::DelegationError+. If you wish to instead return +nil+, - # use the :allow_nil option. - # - # The marshal_dump and _dump methods are exempt from - # delegation due to possible interference when calling - # Marshal.dump(object), should the delegation target method - # of object add or remove instance variables. - def delegate_missing_to(target, allow_nil: nil) - ::ActiveSupport::Delegation.generate_method_missing( - self, - target, - allow_nil: allow_nil, - ) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/deprecation.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/deprecation.rb deleted file mode 100644 index 420311b3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/deprecation.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class Module - # deprecate :foo, deprecator: MyLib.deprecator - # deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator - # - # A deprecator is typically an instance of ActiveSupport::Deprecation, but you can also pass any object that responds - # to deprecation_warning(deprecated_method_name, message, caller_backtrace) where you can implement your - # custom warning behavior. - # - # class MyLib::Deprecator - # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) - # message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}" - # Kernel.warn message - # end - # end - def deprecate(*method_names, deprecator:, **options) - if deprecator.is_a?(ActiveSupport::Deprecation) - deprecator.deprecate_methods(self, *method_names, **options) - elsif deprecator - # we just need any instance to call deprecate_methods, but the deprecation will be emitted by deprecator - ActiveSupport.deprecator.deprecate_methods(self, *method_names, **options, deprecator: deprecator) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/introspection.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/introspection.rb deleted file mode 100644 index 97ee421c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/introspection.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -require "active_support/inflector" - -class Module - # Returns the name of the module containing this one. - # - # M::N.module_parent_name # => "M" - def module_parent_name - if defined?(@parent_name) - @parent_name - else - name = self.name - return if name.nil? - - parent_name = name =~ /::[^:]+\z/ ? -$` : nil - @parent_name = parent_name unless frozen? - parent_name - end - end - - # Returns the module which contains this one according to its name. - # - # module M - # module N - # end - # end - # X = M::N - # - # M::N.module_parent # => M - # X.module_parent # => M - # - # The parent of top-level and anonymous modules is Object. - # - # M.module_parent # => Object - # Module.new.module_parent # => Object - def module_parent - module_parent_name ? ActiveSupport::Inflector.constantize(module_parent_name) : Object - end - - # Returns all the parents of this module according to its name, ordered from - # nested outwards. The receiver is not contained within the result. - # - # module M - # module N - # end - # end - # X = M::N - # - # M.module_parents # => [Object] - # M::N.module_parents # => [M, Object] - # X.module_parents # => [M, Object] - def module_parents - parents = [] - if module_parent_name - parts = module_parent_name.split("::") - until parts.empty? - parents << ActiveSupport::Inflector.constantize(parts * "::") - parts.pop - end - end - parents << Object unless parents.include? Object - parents - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/redefine_method.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/redefine_method.rb deleted file mode 100644 index 5bd8e6e9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/redefine_method.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class Module - # Marks the named method as intended to be redefined, if it exists. - # Suppresses the Ruby method redefinition warning. Prefer - # #redefine_method where possible. - def silence_redefinition_of_method(method) - if method_defined?(method) || private_method_defined?(method) - # This suppresses the "method redefined" warning; the self-alias - # looks odd, but means we don't need to generate a unique name - alias_method method, method - end - end - - # Replaces the existing method definition, if there is one, with the passed - # block as its body. - def redefine_method(method, &block) - visibility = method_visibility(method) - silence_redefinition_of_method(method) - define_method(method, &block) - send(visibility, method) - end - - # Replaces the existing singleton method definition, if there is one, with - # the passed block as its body. - def redefine_singleton_method(method, &block) - singleton_class.redefine_method(method, &block) - end - - def method_visibility(method) # :nodoc: - case - when private_method_defined?(method) - :private - when protected_method_defined?(method) - :protected - else - :public - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/remove_method.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/remove_method.rb deleted file mode 100644 index 97eb5f9e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/module/remove_method.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/redefine_method" - -class Module - # Removes the named method, if it exists. - def remove_possible_method(method) - if method_defined?(method) || private_method_defined?(method) - undef_method(method) - end - end - - # Removes the named singleton method, if it exists. - def remove_possible_singleton_method(method) - singleton_class.remove_possible_method(method) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/name_error.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/name_error.rb deleted file mode 100644 index 18ea2754..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/name_error.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -class NameError - # Extract the name of the missing constant from the exception message. - # - # begin - # HelloWorld - # rescue NameError => e - # e.missing_name - # end - # # => "HelloWorld" - def missing_name - # Since ruby v2.3.0 `did_you_mean` gem is loaded by default. - # It extends NameError#message with spell corrections which are SLOW. - # We should use original_message message instead. - message = respond_to?(:original_message) ? original_message : self.message - return unless message.start_with?("uninitialized constant ") - - receiver = begin - self.receiver - rescue ArgumentError - nil - end - - if receiver == Object - name.to_s - elsif receiver - "#{real_mod_name(receiver)}::#{self.name}" - else - if match = message.match(/((::)?([A-Z]\w*)(::[A-Z]\w*)*)$/) - match[1] - end - end - end - - # Was this exception raised because the given name was missing? - # - # begin - # HelloWorld - # rescue NameError => e - # e.missing_name?("HelloWorld") - # end - # # => true - def missing_name?(name) - if name.is_a? Symbol - self.name == name - else - missing_name == name.to_s - end - end - - private - UNBOUND_METHOD_MODULE_NAME = Module.instance_method(:name) - private_constant :UNBOUND_METHOD_MODULE_NAME - - def real_mod_name(mod) - UNBOUND_METHOD_MODULE_NAME.bind_call(mod) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric.rb deleted file mode 100644 index fe778470..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/numeric/bytes" -require "active_support/core_ext/numeric/time" -require "active_support/core_ext/numeric/conversions" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/bytes.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/bytes.rb deleted file mode 100644 index 45b38f2b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/bytes.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -class Numeric - KILOBYTE = 1024 - MEGABYTE = KILOBYTE * 1024 - GIGABYTE = MEGABYTE * 1024 - TERABYTE = GIGABYTE * 1024 - PETABYTE = TERABYTE * 1024 - EXABYTE = PETABYTE * 1024 - ZETTABYTE = EXABYTE * 1024 - - # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes - # - # 2.bytes # => 2 - def bytes - self - end - alias :byte :bytes - - # Returns the number of bytes equivalent to the kilobytes provided. - # - # 2.kilobytes # => 2048 - def kilobytes - self * KILOBYTE - end - alias :kilobyte :kilobytes - - # Returns the number of bytes equivalent to the megabytes provided. - # - # 2.megabytes # => 2_097_152 - def megabytes - self * MEGABYTE - end - alias :megabyte :megabytes - - # Returns the number of bytes equivalent to the gigabytes provided. - # - # 2.gigabytes # => 2_147_483_648 - def gigabytes - self * GIGABYTE - end - alias :gigabyte :gigabytes - - # Returns the number of bytes equivalent to the terabytes provided. - # - # 2.terabytes # => 2_199_023_255_552 - def terabytes - self * TERABYTE - end - alias :terabyte :terabytes - - # Returns the number of bytes equivalent to the petabytes provided. - # - # 2.petabytes # => 2_251_799_813_685_248 - def petabytes - self * PETABYTE - end - alias :petabyte :petabytes - - # Returns the number of bytes equivalent to the exabytes provided. - # - # 2.exabytes # => 2_305_843_009_213_693_952 - def exabytes - self * EXABYTE - end - alias :exabyte :exabytes - - # Returns the number of bytes equivalent to the zettabytes provided. - # - # 2.zettabytes # => 2_361_183_241_434_822_606_848 - def zettabytes - self * ZETTABYTE - end - alias :zettabyte :zettabytes -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/conversions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/conversions.rb deleted file mode 100644 index e9839931..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/conversions.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/big_decimal/conversions" -require "active_support/number_helper" - -module ActiveSupport - module NumericWithFormat - # \Numeric With Format - # - # Provides options for converting numbers into formatted strings. - # Options are provided for phone numbers, currency, percentage, - # precision, positional notation, file size, and pretty printing. - # - # This method is aliased to to_formatted_s. - # - # ==== Options - # - # For details on which formats use which options, see ActiveSupport::NumberHelper - # - # ==== Examples - # - # Phone Numbers: - # 5551234.to_fs(:phone) # => "555-1234" - # 1235551234.to_fs(:phone) # => "123-555-1234" - # 1235551234.to_fs(:phone, area_code: true) # => "(123) 555-1234" - # 1235551234.to_fs(:phone, delimiter: ' ') # => "123 555 1234" - # 1235551234.to_fs(:phone, area_code: true, extension: 555) # => "(123) 555-1234 x 555" - # 1235551234.to_fs(:phone, country_code: 1) # => "+1-123-555-1234" - # 1235551234.to_fs(:phone, country_code: 1, extension: 1343, delimiter: '.') - # # => "+1.123.555.1234 x 1343" - # - # Currency: - # 1234567890.50.to_fs(:currency) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency) # => "$1,234,567,890.51" - # 1234567890.506.to_fs(:currency, precision: 3) # => "$1,234,567,890.506" - # 1234567890.506.to_fs(:currency, round_mode: :down) # => "$1,234,567,890.50" - # 1234567890.506.to_fs(:currency, locale: :fr) # => "1 234 567 890,51 €" - # -1234567890.50.to_fs(:currency, negative_format: '(%u%n)') - # # => "($1,234,567,890.50)" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '') - # # => "£1234567890,50" - # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u') - # # => "1234567890,50 £" - # - # Percentage: - # 100.to_fs(:percentage) # => "100.000%" - # 100.to_fs(:percentage, precision: 0) # => "100%" - # 1000.to_fs(:percentage, delimiter: '.', separator: ',') # => "1.000,000%" - # 302.24398923423.to_fs(:percentage, precision: 5) # => "302.24399%" - # 302.24398923423.to_fs(:percentage, round_mode: :down) # => "302.243%" - # 1000.to_fs(:percentage, locale: :fr) # => "1 000,000%" - # 100.to_fs(:percentage, format: '%n %') # => "100.000 %" - # - # Delimited: - # 12345678.to_fs(:delimited) # => "12,345,678" - # 12345678.05.to_fs(:delimited) # => "12,345,678.05" - # 12345678.to_fs(:delimited, delimiter: '.') # => "12.345.678" - # 12345678.to_fs(:delimited, delimiter: ',') # => "12,345,678" - # 12345678.05.to_fs(:delimited, separator: ' ') # => "12,345,678 05" - # 12345678.05.to_fs(:delimited, locale: :fr) # => "12 345 678,05" - # 98765432.98.to_fs(:delimited, delimiter: ' ', separator: ',') - # # => "98 765 432,98" - # - # Rounded: - # 111.2345.to_fs(:rounded) # => "111.235" - # 111.2345.to_fs(:rounded, precision: 2) # => "111.23" - # 111.2345.to_fs(:rounded, precision: 2, round_mode: :up) # => "111.24" - # 13.to_fs(:rounded, precision: 5) # => "13.00000" - # 389.32314.to_fs(:rounded, precision: 0) # => "389" - # 111.2345.to_fs(:rounded, significant: true) # => "111" - # 111.2345.to_fs(:rounded, precision: 1, significant: true) # => "100" - # 13.to_fs(:rounded, precision: 5, significant: true) # => "13.000" - # 111.234.to_fs(:rounded, locale: :fr) # => "111,234" - # 13.to_fs(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true) - # # => "13" - # 389.32314.to_fs(:rounded, precision: 4, significant: true) # => "389.3" - # 1111.2345.to_fs(:rounded, precision: 2, separator: ',', delimiter: '.') - # # => "1.111,23" - # - # Human-friendly size in Bytes: - # 123.to_fs(:human_size) # => "123 Bytes" - # 1234.to_fs(:human_size) # => "1.21 KB" - # 12345.to_fs(:human_size) # => "12.1 KB" - # 1234567.to_fs(:human_size) # => "1.18 MB" - # 1234567890.to_fs(:human_size) # => "1.15 GB" - # 1234567890123.to_fs(:human_size) # => "1.12 TB" - # 1234567890123456.to_fs(:human_size) # => "1.1 PB" - # 1234567890123456789.to_fs(:human_size) # => "1.07 EB" - # 1234567.to_fs(:human_size, precision: 2) # => "1.2 MB" - # 1234567.to_fs(:human_size, precision: 2, round_mode: :up) # => "1.3 MB" - # 483989.to_fs(:human_size, precision: 2) # => "470 KB" - # 1234567.to_fs(:human_size, precision: 2, separator: ',') # => "1,2 MB" - # 1234567890123.to_fs(:human_size, precision: 5) # => "1.1228 TB" - # 524288000.to_fs(:human_size, precision: 5) # => "500 MB" - # - # Human-friendly format: - # 123.to_fs(:human) # => "123" - # 1234.to_fs(:human) # => "1.23 Thousand" - # 12345.to_fs(:human) # => "12.3 Thousand" - # 1234567.to_fs(:human) # => "1.23 Million" - # 1234567890.to_fs(:human) # => "1.23 Billion" - # 1234567890123.to_fs(:human) # => "1.23 Trillion" - # 1234567890123456.to_fs(:human) # => "1.23 Quadrillion" - # 1234567890123456789.to_fs(:human) # => "1230 Quadrillion" - # 489939.to_fs(:human, precision: 2) # => "490 Thousand" - # 489939.to_fs(:human, precision: 2, round_mode: :down) # => "480 Thousand" - # 489939.to_fs(:human, precision: 4) # => "489.9 Thousand" - # 1234567.to_fs(:human, precision: 4, - # significant: false) # => "1.2346 Million" - # 1234567.to_fs(:human, precision: 1, - # separator: ',', - # significant: false) # => "1,2 Million" - def to_fs(format = nil, options = nil) - return to_s if format.nil? - - case format - when Integer, String - to_s(format) - when :phone - ActiveSupport::NumberHelper.number_to_phone(self, options || {}) - when :currency - ActiveSupport::NumberHelper.number_to_currency(self, options || {}) - when :percentage - ActiveSupport::NumberHelper.number_to_percentage(self, options || {}) - when :delimited - ActiveSupport::NumberHelper.number_to_delimited(self, options || {}) - when :rounded - ActiveSupport::NumberHelper.number_to_rounded(self, options || {}) - when :human - ActiveSupport::NumberHelper.number_to_human(self, options || {}) - when :human_size - ActiveSupport::NumberHelper.number_to_human_size(self, options || {}) - when Symbol - to_s - else - to_s(format) - end - end - alias_method :to_formatted_s, :to_fs - end -end - -Integer.include ActiveSupport::NumericWithFormat -Float.include ActiveSupport::NumericWithFormat -BigDecimal.include ActiveSupport::NumericWithFormat diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/time.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/time.rb deleted file mode 100644 index bc4627f7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/numeric/time.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -require "active_support/duration" -require "active_support/core_ext/time/calculations" -require "active_support/core_ext/time/acts_like" -require "active_support/core_ext/date/calculations" -require "active_support/core_ext/date/acts_like" - -class Numeric - # Returns a Duration instance matching the number of seconds provided. - # - # 2.seconds # => 2 seconds - def seconds - ActiveSupport::Duration.seconds(self) - end - alias :second :seconds - - # Returns a Duration instance matching the number of minutes provided. - # - # 2.minutes # => 2 minutes - def minutes - ActiveSupport::Duration.minutes(self) - end - alias :minute :minutes - - # Returns a Duration instance matching the number of hours provided. - # - # 2.hours # => 2 hours - def hours - ActiveSupport::Duration.hours(self) - end - alias :hour :hours - - # Returns a Duration instance matching the number of days provided. - # - # 2.days # => 2 days - def days - ActiveSupport::Duration.days(self) - end - alias :day :days - - # Returns a Duration instance matching the number of weeks provided. - # - # 2.weeks # => 2 weeks - def weeks - ActiveSupport::Duration.weeks(self) - end - alias :week :weeks - - # Returns a Duration instance matching the number of fortnights provided. - # - # 2.fortnights # => 4 weeks - def fortnights - ActiveSupport::Duration.weeks(self * 2) - end - alias :fortnight :fortnights - - # Returns the number of milliseconds equivalent to the seconds provided. - # Used with the standard time durations. - # - # 2.in_milliseconds # => 2000 - # 1.hour.in_milliseconds # => 3600000 - def in_milliseconds - self * 1000 - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object.rb deleted file mode 100644 index 7a7f0d99..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/acts_like" -require "active_support/core_ext/object/blank" -require "active_support/core_ext/object/duplicable" -require "active_support/core_ext/object/deep_dup" -require "active_support/core_ext/object/try" -require "active_support/core_ext/object/inclusion" - -require "active_support/core_ext/object/conversions" -require "active_support/core_ext/object/instance_variables" - -require "active_support/core_ext/object/json" -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/object/to_query" -require "active_support/core_ext/object/with" -require "active_support/core_ext/object/with_options" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/acts_like.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/acts_like.rb deleted file mode 100644 index 292826c8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/acts_like.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -class Object - # Provides a way to check whether some class acts like some other class based on the existence of - # an appropriately-named marker method. - # - # A class that provides the same interface as SomeClass may define a marker method named - # acts_like_some_class? to signal its compatibility to callers of - # acts_like?(:some_class). - # - # For example, Active Support extends Date to define an acts_like_date? method, - # and extends Time to define acts_like_time?. As a result, developers can call - # x.acts_like?(:time) and x.acts_like?(:date) to test duck-type compatibility, - # and classes that are able to act like Time can also define an acts_like_time? - # method to interoperate. - # - # Note that the marker method is only expected to exist. It isn't called, so its body or return - # value are irrelevant. - # - # ==== Example: A class that provides the same interface as String - # - # This class may define: - # - # class Stringish - # def acts_like_string? - # end - # end - # - # Then client code can query for duck-type-safeness this way: - # - # Stringish.new.acts_like?(:string) # => true - # - def acts_like?(duck) - case duck - when :time - respond_to? :acts_like_time? - when :date - respond_to? :acts_like_date? - when :string - respond_to? :acts_like_string? - else - respond_to? :"acts_like_#{duck}?" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/blank.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/blank.rb deleted file mode 100644 index 967c82ed..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/blank.rb +++ /dev/null @@ -1,199 +0,0 @@ -# frozen_string_literal: true - -require "concurrent/map" - -class Object - # An object is blank if it's false, empty, or a whitespace string. - # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. - # - # This simplifies - # - # !address || address.empty? - # - # to - # - # address.blank? - # - # @return [true, false] - def blank? - respond_to?(:empty?) ? !!empty? : false - end - - # An object is present if it's not blank. - # - # @return [true, false] - def present? - !blank? - end - - # Returns the receiver if it's present otherwise returns +nil+. - # object.presence is equivalent to - # - # object.present? ? object : nil - # - # For example, something like - # - # state = params[:state] if params[:state].present? - # country = params[:country] if params[:country].present? - # region = state || country || 'US' - # - # becomes - # - # region = params[:state].presence || params[:country].presence || 'US' - # - # @return [Object] - def presence - self if present? - end -end - -class NilClass - # +nil+ is blank: - # - # nil.blank? # => true - # - # @return [true] - def blank? - true - end - - def present? # :nodoc: - false - end -end - -class FalseClass - # +false+ is blank: - # - # false.blank? # => true - # - # @return [true] - def blank? - true - end - - def present? # :nodoc: - false - end -end - -class TrueClass - # +true+ is not blank: - # - # true.blank? # => false - # - # @return [false] - def blank? - false - end - - def present? # :nodoc: - true - end -end - -class Array - # An array is blank if it's empty: - # - # [].blank? # => true - # [1,2,3].blank? # => false - # - # @return [true, false] - alias_method :blank?, :empty? - - def present? # :nodoc: - !empty? - end -end - -class Hash - # A hash is blank if it's empty: - # - # {}.blank? # => true - # { key: 'value' }.blank? # => false - # - # @return [true, false] - alias_method :blank?, :empty? - - def present? # :nodoc: - !empty? - end -end - -class Symbol - # A Symbol is blank if it's empty: - # - # :''.blank? # => true - # :symbol.blank? # => false - alias_method :blank?, :empty? - - def present? # :nodoc: - !empty? - end -end - -class String - BLANK_RE = /\A[[:space:]]*\z/ - ENCODED_BLANKS = Concurrent::Map.new do |h, enc| - h[enc] = Regexp.new(BLANK_RE.source.encode(enc), BLANK_RE.options | Regexp::FIXEDENCODING) - end - - # A string is blank if it's empty or contains whitespaces only: - # - # ''.blank? # => true - # ' '.blank? # => true - # "\t\n\r".blank? # => true - # ' blah '.blank? # => false - # - # Unicode whitespace is supported: - # - # "\u00a0".blank? # => true - # - # @return [true, false] - def blank? - # The regexp that matches blank strings is expensive. For the case of empty - # strings we can speed up this method (~3.5x) with an empty? call. The - # penalty for the rest of strings is marginal. - empty? || - begin - BLANK_RE.match?(self) - rescue Encoding::CompatibilityError - ENCODED_BLANKS[self.encoding].match?(self) - end - end - - def present? # :nodoc: - !blank? - end -end - -class Numeric # :nodoc: - # No number is blank: - # - # 1.blank? # => false - # 0.blank? # => false - # - # @return [false] - def blank? - false - end - - def present? - true - end -end - -class Time # :nodoc: - # No Time is blank: - # - # Time.now.blank? # => false - # - # @return [false] - def blank? - false - end - - def present? - true - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/conversions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/conversions.rb deleted file mode 100644 index 624fb8d7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/conversions.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/object/to_query" -require "active_support/core_ext/array/conversions" -require "active_support/core_ext/hash/conversions" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/deep_dup.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/deep_dup.rb deleted file mode 100644 index 7d54d0cd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/deep_dup.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/duplicable" - -class Object - # Returns a deep copy of object if it's duplicable. If it's - # not duplicable, returns +self+. - # - # object = Object.new - # dup = object.deep_dup - # dup.instance_variable_set(:@a, 1) - # - # object.instance_variable_defined?(:@a) # => false - # dup.instance_variable_defined?(:@a) # => true - def deep_dup - duplicable? ? dup : self - end -end - -class Array - # Returns a deep copy of array. - # - # array = [1, [2, 3]] - # dup = array.deep_dup - # dup[1][2] = 4 - # - # array[1][2] # => nil - # dup[1][2] # => 4 - def deep_dup - map(&:deep_dup) - end -end - -class Hash - # Returns a deep copy of hash. - # - # hash = { a: { b: 'b' } } - # dup = hash.deep_dup - # dup[:a][:c] = 'c' - # - # hash[:a][:c] # => nil - # dup[:a][:c] # => "c" - def deep_dup - hash = dup - each_pair do |key, value| - if ::String === key || ::Symbol === key - hash[key] = value.deep_dup - else - hash.delete(key) - hash[key.deep_dup] = value.deep_dup - end - end - hash - end -end - -class Module - # Returns a copy of module or class if it's anonymous. If it's - # named, returns +self+. - # - # Object.deep_dup == Object # => true - # klass = Class.new - # klass.deep_dup == klass # => false - def deep_dup - if name.nil? - super - else - self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/duplicable.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/duplicable.rb deleted file mode 100644 index 505455fe..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/duplicable.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -#-- -# Most objects are cloneable, but not all. For example you can't dup methods: -# -# method(:puts).dup # => TypeError: allocator undefined for Method -# -# Classes may signal their instances are not duplicable removing +dup+/+clone+ -# or raising exceptions from them. So, to dup an arbitrary object you normally -# use an optimistic approach and are ready to catch an exception, say: -# -# arbitrary_object.dup rescue object -# -# Rails dups objects in a few critical spots where they are not that arbitrary. -# That rescue is very expensive (like 40 times slower than a predicate), and it -# is often triggered. -# -# That's why we hardcode the following cases and check duplicable? instead of -# using that rescue idiom. -#++ -class Object - # Can you safely dup this object? - # - # False for method objects; - # true otherwise. - def duplicable? - true - end -end - -methods_are_duplicable = begin - Object.instance_method(:duplicable?).dup - true -rescue TypeError - false -end - -unless methods_are_duplicable - class Method - # Methods are not duplicable: - # - # method(:puts).duplicable? # => false - # method(:puts).dup # => TypeError: allocator undefined for Method - def duplicable? - false - end - end - - class UnboundMethod - # Unbound methods are not duplicable: - # - # method(:puts).unbind.duplicable? # => false - # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod - def duplicable? - false - end - end -end - -require "singleton" - -module Singleton - # Singleton instances are not duplicable: - # - # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton - def duplicable? - false - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/inclusion.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/inclusion.rb deleted file mode 100644 index 1b3cf2c3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/inclusion.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class Object - # Returns true if this object is included in the argument. - # - # When argument is a +Range+, +#cover?+ is used to properly handle inclusion - # check within open ranges. Otherwise, argument must be any object which responds - # to +#include?+. Usage: - # - # characters = ["Konata", "Kagami", "Tsukasa"] - # "Konata".in?(characters) # => true - # - # For non +Range+ arguments, this will throw an +ArgumentError+ if the argument - # doesn't respond to +#include?+. - def in?(another_object) - case another_object - when Range - another_object.cover?(self) - else - another_object.include?(self) - end - rescue NoMethodError - raise ArgumentError.new("The parameter passed to #in? must respond to #include?") - end - - # Returns the receiver if it's included in the argument otherwise returns +nil+. - # Argument must be any object which responds to +#include?+. Usage: - # - # params[:bucket_type].presence_in %w( project calendar ) - # - # This will throw an +ArgumentError+ if the argument doesn't respond to +#include?+. - # - # @return [Object] - def presence_in(another_object) - in?(another_object) ? self : nil - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/instance_variables.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/instance_variables.rb deleted file mode 100644 index 98b341d3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/instance_variables.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class Object - # Returns a hash with string keys that maps instance variable names without "@" to their - # corresponding values. - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} - def instance_values - instance_variables.to_h do |ivar| - [ivar[1..-1].freeze, instance_variable_get(ivar)] - end - end - - # Returns an array of instance variable names as strings including "@". - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_variable_names # => ["@y", "@x"] - def instance_variable_names - instance_variables.map(&:name) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/json.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/json.rb deleted file mode 100644 index 3d6e536e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/json.rb +++ /dev/null @@ -1,260 +0,0 @@ -# frozen_string_literal: true - -# Hack to load JSON gem first so we can override its to_json. -require "json" -require "bigdecimal" -require "ipaddr" -require "uri/generic" -require "pathname" -require "active_support/core_ext/big_decimal/conversions" # for #to_s -require "active_support/core_ext/hash/except" -require "active_support/core_ext/hash/slice" -require "active_support/core_ext/object/instance_variables" -require "time" -require "active_support/core_ext/time/conversions" -require "active_support/core_ext/date_time/conversions" -require "active_support/core_ext/date/conversions" - -#-- -# The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting -# their default behavior. That said, we need to define the basic to_json method in all of them, -# otherwise they will always use to_json gem implementation, which is backwards incompatible in -# several cases (for instance, the JSON implementation for Hash does not work) with inheritance. -# -# On the other hand, we should avoid conflict with ::JSON.{generate,dump}(obj). Unfortunately, the -# JSON gem's encoder relies on its own to_json implementation to encode objects. Since it always -# passes a ::JSON::State object as the only argument to to_json, we can detect that and forward the -# calls to the original to_json method. -# -# It should be noted that when using ::JSON.{generate,dump} directly, ActiveSupport's encoder is -# bypassed completely. This means that as_json won't be invoked and the JSON gem will simply -# ignore any options it does not natively understand. This also means that ::JSON.{generate,dump} -# should give exactly the same results with or without Active Support. - -module ActiveSupport - module ToJsonWithActiveSupportEncoder # :nodoc: - def to_json(options = nil) - if options.is_a?(::JSON::State) - # Called from JSON.{generate,dump}, forward it to JSON gem's to_json - super(options) - else - # to_json is being invoked directly, use ActiveSupport's encoder - ActiveSupport::JSON.encode(self, options) - end - end - end -end - -[Enumerable, Object, Array, FalseClass, Float, Hash, Integer, NilClass, String, TrueClass].reverse_each do |klass| - klass.include(ActiveSupport::ToJsonWithActiveSupportEncoder) -end - -class Module - def as_json(options = nil) # :nodoc: - name - end -end - -class Object - def as_json(options = nil) # :nodoc: - if respond_to?(:to_hash) - to_hash.as_json(options) - else - instance_values.as_json(options) - end - end -end - -class Data # :nodoc: - def as_json(options = nil) - to_h.as_json(options) - end -end - -class Struct # :nodoc: - def as_json(options = nil) - to_h.as_json(options) - end -end - -class TrueClass - def as_json(options = nil) # :nodoc: - self - end -end - -class FalseClass - def as_json(options = nil) # :nodoc: - self - end -end - -class NilClass - def as_json(options = nil) # :nodoc: - self - end -end - -class String - def as_json(options = nil) # :nodoc: - self - end -end - -class Symbol - def as_json(options = nil) # :nodoc: - name - end -end - -class Numeric - def as_json(options = nil) # :nodoc: - self - end -end - -class Float - # Encoding Infinity or NaN to JSON should return "null". The default returns - # "Infinity" or "NaN" which are not valid JSON. - def as_json(options = nil) # :nodoc: - finite? ? self : nil - end -end - -class BigDecimal - # A BigDecimal would be naturally represented as a JSON number. Most libraries, - # however, parse non-integer JSON numbers directly as floats. Clients using - # those libraries would get in general a wrong number and no way to recover - # other than manually inspecting the string with the JSON code itself. - # - # That's why a JSON string is returned. The JSON literal is not numeric, but - # if the other end knows by contract that the data is supposed to be a - # BigDecimal, it still has the chance to post-process the string and get the - # real value. - def as_json(options = nil) # :nodoc: - finite? ? to_s : nil - end -end - -class Regexp - def as_json(options = nil) # :nodoc: - to_s - end -end - -module Enumerable - def as_json(options = nil) # :nodoc: - to_a.as_json(options) - end -end - -class IO - def as_json(options = nil) # :nodoc: - to_s - end -end - -class Range - def as_json(options = nil) # :nodoc: - to_s - end -end - -class Array - def as_json(options = nil) # :nodoc: - if options - options = options.dup.freeze unless options.frozen? - map { |v| v.as_json(options) } - else - map { |v| v.as_json } - end - end -end - -class Hash - def as_json(options = nil) # :nodoc: - # create a subset of the hash by applying :only or :except - subset = if options - if attrs = options[:only] - slice(*Array(attrs)) - elsif attrs = options[:except] - except(*Array(attrs)) - else - self - end - else - self - end - - result = {} - if options - options = options.dup.freeze unless options.frozen? - subset.each { |k, v| result[k.to_s] = v.as_json(options) } - else - subset.each { |k, v| result[k.to_s] = v.as_json } - end - result - end -end - -class Time - def as_json(options = nil) # :nodoc: - if ActiveSupport::JSON::Encoding.use_standard_json_time_format - xmlschema(ActiveSupport::JSON::Encoding.time_precision) - else - %(#{strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)}) - end - end -end - -class Date - def as_json(options = nil) # :nodoc: - if ActiveSupport::JSON::Encoding.use_standard_json_time_format - strftime("%Y-%m-%d") - else - strftime("%Y/%m/%d") - end - end -end - -class DateTime - def as_json(options = nil) # :nodoc: - if ActiveSupport::JSON::Encoding.use_standard_json_time_format - xmlschema(ActiveSupport::JSON::Encoding.time_precision) - else - strftime("%Y/%m/%d %H:%M:%S %z") - end - end -end - -class URI::Generic # :nodoc: - def as_json(options = nil) - to_s - end -end - -class Pathname # :nodoc: - def as_json(options = nil) - to_s - end -end - -unless IPAddr.method_defined?(:as_json, false) - class IPAddr # :nodoc: - def as_json(options = nil) - to_s - end - end -end - -class Process::Status # :nodoc: - def as_json(options = nil) - { exitstatus: exitstatus, pid: pid } - end -end - -class Exception - def as_json(options = nil) - to_s - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/to_param.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/to_param.rb deleted file mode 100644 index 6d2bdd70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/to_param.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/to_query" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/to_query.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/to_query.rb deleted file mode 100644 index 7cccc03d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/to_query.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -require "cgi" - -class Object - # Alias of to_s. - def to_param - to_s - end - - # Converts an object into a string suitable for use as a URL query string, - # using the given key as the param name. - def to_query(key) - "#{CGI.escape(key.to_param)}=#{CGI.escape(to_param.to_s)}" - end -end - -class NilClass - # Returns +self+. - def to_param - self - end -end - -class TrueClass - # Returns +self+. - def to_param - self - end -end - -class FalseClass - # Returns +self+. - def to_param - self - end -end - -class Array - # Calls to_param on all its elements and joins the result with - # slashes. This is used by url_for in Action Pack. - def to_param - collect(&:to_param).join "/" - end - - # Converts an array into a string suitable for use as a URL query string, - # using the given +key+ as the param name. - # - # ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" - def to_query(key) - prefix = "#{key}[]" - - if empty? - nil.to_query(prefix) - else - collect { |value| value.to_query(prefix) }.join "&" - end - end -end - -class Hash - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # {name: 'David', nationality: 'Danish'}.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # {name: 'David', nationality: 'Danish'}.to_query('user') - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - def to_query(namespace = nil) - query = filter_map do |key, value| - unless (value.is_a?(Hash) || value.is_a?(Array)) && value.empty? - value.to_query(namespace ? "#{namespace}[#{key}]" : key) - end - end - - query.sort! unless namespace.to_s.include?("[]") - query.join("&") - end - - alias_method :to_param, :to_query -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/try.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/try.rb deleted file mode 100644 index c2c76254..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/try.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -require "delegate" - -module ActiveSupport - module Tryable # :nodoc: - def try(*args, &block) - if args.empty? && block_given? - if block.arity == 0 - instance_eval(&block) - else - yield self - end - elsif respond_to?(args.first) - public_send(*args, &block) - end - end - ruby2_keywords(:try) - - def try!(*args, &block) - if args.empty? && block_given? - if block.arity == 0 - instance_eval(&block) - else - yield self - end - else - public_send(*args, &block) - end - end - ruby2_keywords(:try!) - end -end - -class Object - include ActiveSupport::Tryable - - ## - # :method: try - # - # :call-seq: - # try(*args, &block) - # - # Invokes the public method whose name goes as first argument just like - # +public_send+ does, except that if the receiver does not respond to it the - # call returns +nil+ rather than raising an exception. - # - # This method is defined to be able to write - # - # @person.try(:name) - # - # instead of - # - # @person.name if @person - # - # +try+ calls can be chained: - # - # @person.try(:spouse).try(:name) - # - # instead of - # - # @person.spouse.name if @person && @person.spouse - # - # +try+ will also return +nil+ if the receiver does not respond to the method: - # - # @person.try(:non_existing_method) # => nil - # - # instead of - # - # @person.non_existing_method if @person.respond_to?(:non_existing_method) # => nil - # - # +try+ returns +nil+ when called on +nil+ regardless of whether it responds - # to the method: - # - # nil.try(:to_i) # => nil, rather than 0 - # - # Arguments and blocks are forwarded to the method if invoked: - # - # @posts.try(:each_slice, 2) do |a, b| - # ... - # end - # - # The number of arguments in the signature must match. If the object responds - # to the method the call is attempted and +ArgumentError+ is still raised - # in case of argument mismatch. - # - # If +try+ is called without arguments it yields the receiver to a given - # block unless it is +nil+: - # - # @person.try do |p| - # ... - # end - # - # You can also call try with a block without accepting an argument, and the block - # will be instance_eval'ed instead: - # - # @person.try { upcase.truncate(50) } - # - # Please also note that +try+ is defined on +Object+. Therefore, it won't work - # with instances of classes that do not have +Object+ among their ancestors, - # like direct subclasses of +BasicObject+. - - ## - # :method: try! - # - # :call-seq: - # try!(*args, &block) - # - # Same as #try, but raises a +NoMethodError+ exception if the receiver is - # not +nil+ and does not implement the tried method. - # - # "a".try!(:upcase) # => "A" - # nil.try!(:upcase) # => nil - # 123.try!(:upcase) # => NoMethodError: undefined method `upcase' for 123:Integer -end - -class Delegator - include ActiveSupport::Tryable - - ## - # :method: try - # - # :call-seq: - # try(*args, &block) - # - # See Object#try - - ## - # :method: try! - # - # :call-seq: - # try!(*args, &block) - # - # See Object#try! -end - -class NilClass - # Calling +try+ on +nil+ always returns +nil+. - # It becomes especially helpful when navigating through associations that may return +nil+. - # - # nil.try(:name) # => nil - # - # Without +try+ - # @person && @person.children.any? && @person.children.first.name - # - # With +try+ - # @person.try(:children).try(:first).try(:name) - def try(*) - nil - end - - # Calling +try!+ on +nil+ always returns +nil+. - # - # nil.try!(:name) # => nil - def try!(*) - nil - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/with.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/with.rb deleted file mode 100644 index 29f61088..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/with.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -class Object - # Set and restore public attributes around a block. - # - # client.timeout # => 5 - # client.with(timeout: 1) do |c| - # c.timeout # => 1 - # end - # client.timeout # => 5 - # - # The receiver is yielded to the provided block. - # - # This method is a shorthand for the common begin/ensure pattern: - # - # old_value = object.attribute - # begin - # object.attribute = new_value - # # do things - # ensure - # object.attribute = old_value - # end - # - # It can be used on any object as long as both the reader and writer methods - # are public. - def with(**attributes) - old_values = {} - begin - attributes.each do |key, value| - old_values[key] = public_send(key) - public_send("#{key}=", value) - end - yield self - ensure - old_values.each do |key, old_value| - public_send("#{key}=", old_value) - end - end - end -end - -# #with isn't usable on immediates, so we might as well undefine the -# method in common immediate classes to avoid potential confusion. -[NilClass, TrueClass, FalseClass, Integer, Float, Symbol].each do |klass| - klass.undef_method(:with) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/with_options.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/with_options.rb deleted file mode 100644 index 932aec22..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/object/with_options.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true - -require "active_support/option_merger" - -class Object - # An elegant way to factor duplication out of options passed to a series of - # method calls. Each method called in the block, with the block variable as - # the receiver, will have its options merged with the default +options+ - # Hash or Hash-like object provided. Each method called on - # the block variable must take an options hash as its final argument. - # - # Without with_options, this code contains duplication: - # - # class Account < ActiveRecord::Base - # has_many :customers, dependent: :destroy - # has_many :products, dependent: :destroy - # has_many :invoices, dependent: :destroy - # has_many :expenses, dependent: :destroy - # end - # - # Using with_options, we can remove the duplication: - # - # class Account < ActiveRecord::Base - # with_options dependent: :destroy do |assoc| - # assoc.has_many :customers - # assoc.has_many :products - # assoc.has_many :invoices - # assoc.has_many :expenses - # end - # end - # - # It can also be used with an explicit receiver: - # - # I18n.with_options locale: user.locale, scope: 'newsletter' do |i18n| - # subject i18n.t :subject - # body i18n.t :body, user_name: user.name - # end - # - # When you don't pass an explicit receiver, it executes the whole block - # in merging options context: - # - # class Account < ActiveRecord::Base - # with_options dependent: :destroy do - # has_many :customers - # has_many :products - # has_many :invoices - # has_many :expenses - # end - # end - # - # with_options can also be nested since the call is forwarded to its receiver. - # - # NOTE: Each nesting level will merge inherited defaults in addition to their own. - # - # class Post < ActiveRecord::Base - # with_options if: :persisted?, length: { minimum: 50 } do - # validates :content, if: -> { content.present? } - # end - # end - # - # The code is equivalent to: - # - # validates :content, length: { minimum: 50 }, if: -> { content.present? } - # - # Hence the inherited default for +if+ key is ignored. - # - # NOTE: You cannot call class methods implicitly inside of +with_options+. - # You can access these methods using the class name instead: - # - # class Phone < ActiveRecord::Base - # enum :phone_number_type, { home: 0, office: 1, mobile: 2 } - # - # with_options presence: true do - # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } - # end - # end - # - # When the block argument is omitted, the decorated Object instance is returned: - # - # module MyStyledHelpers - # def styled - # with_options style: "color: red;" - # end - # end - # - # styled.link_to "I'm red", "/" - # # => I'm red - # - # styled.button_tag "I'm red too!" - # # => - # - def with_options(options, &block) - option_merger = ActiveSupport::OptionMerger.new(self, options) - - if block - block.arity.zero? ? option_merger.instance_eval(&block) : block.call(option_merger) - else - option_merger - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname.rb deleted file mode 100644 index 10fa1903..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/pathname/blank" -require "active_support/core_ext/pathname/existence" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname/blank.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname/blank.rb deleted file mode 100644 index 8a9be3ce..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname/blank.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -require "pathname" - -class Pathname - # An Pathname is blank if it's empty: - # - # Pathname.new("").blank? # => true - # Pathname.new(" ").blank? # => false - # Pathname.new("test").blank? # => false - # - # @return [true, false] - def blank? - to_s.empty? - end - - def present? # :nodoc: - !to_s.empty? - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname/existence.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname/existence.rb deleted file mode 100644 index 848eb4dc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/pathname/existence.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -require "pathname" - -class Pathname - # Returns the receiver if the named file exists otherwise returns +nil+. - # pathname.existence is equivalent to - # - # pathname.exist? ? pathname : nil - # - # For example, something like - # - # content = pathname.read if pathname.exist? - # - # becomes - # - # content = pathname.existence&.read - # - # @return [Pathname] - def existence - self if exist? - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range.rb deleted file mode 100644 index 10fad28d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/range/conversions" -require "active_support/core_ext/range/compare_range" -require "active_support/core_ext/range/overlap" -require "active_support/core_ext/range/each" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/compare_range.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/compare_range.rb deleted file mode 100644 index affbbebb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/compare_range.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module CompareWithRange - # Extends the default Range#=== to support range comparisons. - # (1..5) === (1..5) # => true - # (1..5) === (2..3) # => true - # (1..5) === (1...6) # => true - # (1..5) === (2..6) # => false - # - # The native Range#=== behavior is untouched. - # ('a'..'f') === ('c') # => true - # (5..9) === (11) # => false - # - # The given range must be fully bounded, with both start and end. - def ===(value) - if value.is_a?(::Range) - is_backwards_op = value.exclude_end? ? :>= : :> - return false if value.begin && value.end && value.begin.public_send(is_backwards_op, value.end) - # 1...10 includes 1..9 but it does not include 1..10. - # 1..10 includes 1...11 but it does not include 1...12. - operator = exclude_end? && !value.exclude_end? ? :< : :<= - value_max = !exclude_end? && value.exclude_end? ? value.max : value.last - super(value.first) && (self.end.nil? || value_max.public_send(operator, last)) - else - super - end - end - - # Extends the default Range#include? to support range comparisons. - # (1..5).include?(1..5) # => true - # (1..5).include?(2..3) # => true - # (1..5).include?(1...6) # => true - # (1..5).include?(2..6) # => false - # - # The native Range#include? behavior is untouched. - # ('a'..'f').include?('c') # => true - # (5..9).include?(11) # => false - # - # The given range must be fully bounded, with both start and end. - def include?(value) - if value.is_a?(::Range) - is_backwards_op = value.exclude_end? ? :>= : :> - return false if value.begin && value.end && value.begin.public_send(is_backwards_op, value.end) - # 1...10 includes 1..9 but it does not include 1..10. - # 1..10 includes 1...11 but it does not include 1...12. - operator = exclude_end? && !value.exclude_end? ? :< : :<= - value_max = !exclude_end? && value.exclude_end? ? value.max : value.last - super(value.first) && (self.end.nil? || value_max.public_send(operator, last)) - else - super - end - end - end -end - -Range.prepend(ActiveSupport::CompareWithRange) diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/conversions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/conversions.rb deleted file mode 100644 index b6d81864..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/conversions.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # = \Range With Format - module RangeWithFormat - RANGE_FORMATS = { - db: -> (start, stop) do - if start && stop - case start - when String then "BETWEEN '#{start}' AND '#{stop}'" - else - "BETWEEN '#{start.to_fs(:db)}' AND '#{stop.to_fs(:db)}'" - end - elsif start - case start - when String then ">= '#{start}'" - else - ">= '#{start.to_fs(:db)}'" - end - elsif stop - case stop - when String then "<= '#{stop}'" - else - "<= '#{stop.to_fs(:db)}'" - end - end - end - } - - # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # range = (1..100) # => 1..100 - # - # range.to_s # => "1..100" - # range.to_fs(:db) # => "BETWEEN '1' AND '100'" - # - # range = (1..) # => 1.. - # range.to_fs(:db) # => ">= '1'" - # - # range = (..100) # => ..100 - # range.to_fs(:db) # => "<= '100'" - # - # == Adding your own range formats to to_fs - # You can add your own formats to the Range::RANGE_FORMATS hash. - # Use the format name as the hash key and a Proc instance. - # - # # config/initializers/range_formats.rb - # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" } - def to_fs(format = :default) - if formatter = RANGE_FORMATS[format] - formatter.call(self.begin, self.end) - else - to_s - end - end - alias_method :to_formatted_s, :to_fs - end -end - -Range.prepend(ActiveSupport::RangeWithFormat) diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/each.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/each.rb deleted file mode 100644 index 1c44cc84..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/each.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require "active_support/time_with_zone" - -module ActiveSupport - module EachTimeWithZone # :nodoc: - def each(&block) - ensure_iteration_allowed - super - end - - def step(n = 1, &block) - ensure_iteration_allowed - super - end - - private - def ensure_iteration_allowed - raise TypeError, "can't iterate from #{first.class}" if first.is_a?(TimeWithZone) - end - end -end - -Range.prepend(ActiveSupport::EachTimeWithZone) diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/overlap.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/overlap.rb deleted file mode 100644 index b08cdb39..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/range/overlap.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class Range - # Compare two ranges and see if they overlap each other - # (1..5).overlap?(4..6) # => true - # (1..5).overlap?(7..9) # => false - unless Range.method_defined?(:overlap?) # Ruby 3.3+ - def overlap?(other) - raise TypeError unless other.is_a? Range - - self_begin = self.begin - other_end = other.end - other_excl = other.exclude_end? - - return false if _empty_range?(self_begin, other_end, other_excl) - - other_begin = other.begin - self_end = self.end - self_excl = self.exclude_end? - - return false if _empty_range?(other_begin, self_end, self_excl) - return true if self_begin == other_begin - - return false if _empty_range?(self_begin, self_end, self_excl) - return false if _empty_range?(other_begin, other_end, other_excl) - - true - end - - private - def _empty_range?(b, e, excl) - return false if b.nil? || e.nil? - - comp = b <=> e - comp.nil? || comp > 0 || (comp == 0 && excl) - end - end - - alias :overlaps? :overlap? -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/regexp.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/regexp.rb deleted file mode 100644 index 15534ff5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/regexp.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class Regexp - # Returns +true+ if the regexp has the multiline flag set. - # - # (/./).multiline? # => false - # (/./m).multiline? # => true - # - # Regexp.new(".").multiline? # => false - # Regexp.new(".", Regexp::MULTILINE).multiline? # => true - def multiline? - options & MULTILINE == MULTILINE - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/securerandom.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/securerandom.rb deleted file mode 100644 index aae75290..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/securerandom.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -require "securerandom" - -module SecureRandom - BASE58_ALPHABET = ("0".."9").to_a + ("A".."Z").to_a + ("a".."z").to_a - ["0", "O", "I", "l"] - BASE36_ALPHABET = ("0".."9").to_a + ("a".."z").to_a - - # SecureRandom.base58 generates a random base58 string. - # - # The argument _n_ specifies the length of the random string to be generated. - # - # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. - # - # The result may contain alphanumeric characters except 0, O, I, and l. - # - # p SecureRandom.base58 # => "4kUgL2pdQMSCQtjE" - # p SecureRandom.base58(24) # => "77TMHrHJFvFDwodq8w7Ev2m7" - if SecureRandom.method(:alphanumeric).parameters.size == 2 # Remove check when Ruby 3.3 is the minimum supported version - def self.base58(n = 16) - alphanumeric(n, chars: BASE58_ALPHABET) - end - else - def self.base58(n = 16) - SecureRandom.random_bytes(n).unpack("C*").map do |byte| - idx = byte % 64 - idx = SecureRandom.random_number(58) if idx >= 58 - BASE58_ALPHABET[idx] - end.join - end - end - - # SecureRandom.base36 generates a random base36 string in lowercase. - # - # The argument _n_ specifies the length of the random string to be generated. - # - # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. - # This method can be used over +base58+ if a deterministic case key is necessary. - # - # The result will contain alphanumeric characters in lowercase. - # - # p SecureRandom.base36 # => "4kugl2pdqmscqtje" - # p SecureRandom.base36(24) # => "77tmhrhjfvfdwodq8w7ev2m7" - if SecureRandom.method(:alphanumeric).parameters.size == 2 # Remove check when Ruby 3.3 is the minimum supported version - def self.base36(n = 16) - alphanumeric(n, chars: BASE36_ALPHABET) - end - else - def self.base36(n = 16) - SecureRandom.random_bytes(n).unpack("C*").map do |byte| - idx = byte % 64 - idx = SecureRandom.random_number(36) if idx >= 36 - BASE36_ALPHABET[idx] - end.join - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string.rb deleted file mode 100644 index 757d15c5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/string/conversions" -require "active_support/core_ext/string/filters" -require "active_support/core_ext/string/multibyte" -require "active_support/core_ext/string/starts_ends_with" -require "active_support/core_ext/string/inflections" -require "active_support/core_ext/string/access" -require "active_support/core_ext/string/behavior" -require "active_support/core_ext/string/output_safety" -require "active_support/core_ext/string/exclude" -require "active_support/core_ext/string/strip" -require "active_support/core_ext/string/inquiry" -require "active_support/core_ext/string/indent" -require "active_support/core_ext/string/zones" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/access.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/access.rb deleted file mode 100644 index f6a14c08..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/access.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -class String - # If you pass a single integer, returns a substring of one character at that - # position. The first character of the string is at position 0, the next at - # position 1, and so on. If a range is supplied, a substring containing - # characters at offsets given by the range is returned. In both cases, if an - # offset is negative, it is counted from the end of the string. Returns +nil+ - # if the initial offset falls outside the string. Returns an empty string if - # the beginning of the range is greater than the end of the string. - # - # str = "hello" - # str.at(0) # => "h" - # str.at(1..3) # => "ell" - # str.at(-2) # => "l" - # str.at(-2..-1) # => "lo" - # str.at(5) # => nil - # str.at(5..-1) # => "" - # - # If a Regexp is given, the matching portion of the string is returned. - # If a String is given, that given string is returned if it occurs in - # the string. In both cases, +nil+ is returned if there is no match. - # - # str = "hello" - # str.at(/lo/) # => "lo" - # str.at(/ol/) # => nil - # str.at("lo") # => "lo" - # str.at("ol") # => nil - def at(position) - self[position] - end - - # Returns a substring from the given position to the end of the string. - # If the position is negative, it is counted from the end of the string. - # - # str = "hello" - # str.from(0) # => "hello" - # str.from(3) # => "lo" - # str.from(-2) # => "lo" - # - # You can mix it with +to+ method and do fun things like: - # - # str = "hello" - # str.from(0).to(-1) # => "hello" - # str.from(1).to(-2) # => "ell" - def from(position) - self[position, length] - end - - # Returns a substring from the beginning of the string to the given position. - # If the position is negative, it is counted from the end of the string. - # - # str = "hello" - # str.to(0) # => "h" - # str.to(3) # => "hell" - # str.to(-2) # => "hell" - # - # You can mix it with +from+ method and do fun things like: - # - # str = "hello" - # str.from(0).to(-1) # => "hello" - # str.from(1).to(-2) # => "ell" - def to(position) - position += size if position < 0 - self[0, position + 1] || +"" - end - - # Returns the first character. If a limit is supplied, returns a substring - # from the beginning of the string until it reaches the limit value. If the - # given limit is greater than or equal to the string length, returns a copy of self. - # - # str = "hello" - # str.first # => "h" - # str.first(1) # => "h" - # str.first(2) # => "he" - # str.first(0) # => "" - # str.first(6) # => "hello" - def first(limit = 1) - self[0, limit] || raise(ArgumentError, "negative limit") - end - - # Returns the last character of the string. If a limit is supplied, returns a substring - # from the end of the string until it reaches the limit value (counting backwards). If - # the given limit is greater than or equal to the string length, returns a copy of self. - # - # str = "hello" - # str.last # => "o" - # str.last(1) # => "o" - # str.last(2) # => "lo" - # str.last(0) # => "" - # str.last(6) # => "hello" - def last(limit = 1) - self[[length - limit, 0].max, limit] || raise(ArgumentError, "negative limit") - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/behavior.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/behavior.rb deleted file mode 100644 index 35a5aa78..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/behavior.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class String - # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. - def acts_like_string? - true - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/conversions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/conversions.rb deleted file mode 100644 index 107721c6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/conversions.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require "date" -require "active_support/core_ext/time/calculations" - -class String - # Converts a string to a Time value. - # The +form+ can be either +:utc+ or +:local+ (default +:local+). - # - # The time is parsed using Time.parse method. - # If +form+ is +:local+, then the time is in the system timezone. - # If the date part is missing then the current date is used and if - # the time part is missing then it is assumed to be 00:00:00. - # - # "13-12-2012".to_time # => 2012-12-13 00:00:00 +0100 - # "06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 06:12:00 UTC - # "12/13/2012".to_time # => ArgumentError: argument out of range - # "1604326192".to_time # => ArgumentError: argument out of range - def to_time(form = :local) - parts = Date._parse(self, false) - used_keys = %i(year mon mday hour min sec sec_fraction offset) - return if !parts.keys.intersect?(used_keys) - - now = Time.now - time = Time.new( - parts.fetch(:year, now.year), - parts.fetch(:mon, now.month), - parts.fetch(:mday, now.day), - parts.fetch(:hour, 0), - parts.fetch(:min, 0), - parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0), - parts.fetch(:offset, form == :utc ? 0 : nil) - ) - - form == :utc ? time.utc : time.to_time - end - - # Converts a string to a Date value. - # - # "1-1-2012".to_date # => Sun, 01 Jan 2012 - # "01/01/2012".to_date # => Sun, 01 Jan 2012 - # "2012-12-13".to_date # => Thu, 13 Dec 2012 - # "12/13/2012".to_date # => ArgumentError: invalid date - def to_date - ::Date.parse(self, false) unless blank? - end - - # Converts a string to a DateTime value. - # - # "1-1-2012".to_datetime # => Sun, 01 Jan 2012 00:00:00 +0000 - # "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000 - # "2012-12-13 12:50".to_datetime # => Thu, 13 Dec 2012 12:50:00 +0000 - # "12/13/2012".to_datetime # => ArgumentError: invalid date - def to_datetime - ::DateTime.parse(self, false) unless blank? - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/exclude.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/exclude.rb deleted file mode 100644 index 8e462689..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/exclude.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class String - # The inverse of String#include?. Returns true if the string - # does not include the other string. - # - # "hello".exclude? "lo" # => false - # "hello".exclude? "ol" # => true - # "hello".exclude? ?h # => false - def exclude?(string) - !include?(string) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/filters.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/filters.rb deleted file mode 100644 index 9e7e5511..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/filters.rb +++ /dev/null @@ -1,151 +0,0 @@ -# frozen_string_literal: true - -class String - # Returns the string, first removing all whitespace on both ends of - # the string, and then changing remaining consecutive whitespace - # groups into one space each. - # - # Note that it handles both ASCII and Unicode whitespace. - # - # %{ Multi-line - # string }.squish # => "Multi-line string" - # " foo bar \n \t boo".squish # => "foo bar boo" - def squish - dup.squish! - end - - # Performs a destructive squish. See String#squish. - # str = " foo bar \n \t boo" - # str.squish! # => "foo bar boo" - # str # => "foo bar boo" - def squish! - gsub!(/[[:space:]]+/, " ") - strip! - self - end - - # Returns a new string with all occurrences of the patterns removed. - # str = "foo bar test" - # str.remove(" test") # => "foo bar" - # str.remove(" test", /bar/) # => "foo " - # str # => "foo bar test" - def remove(*patterns) - dup.remove!(*patterns) - end - - # Alters the string by removing all occurrences of the patterns. - # str = "foo bar test" - # str.remove!(" test", /bar/) # => "foo " - # str # => "foo " - def remove!(*patterns) - patterns.each do |pattern| - gsub! pattern, "" - end - - self - end - - # Truncates a given +text+ to length truncate_to if +text+ is longer than truncate_to: - # - # 'Once upon a time in a world far far away'.truncate(27) - # # => "Once upon a time in a wo..." - # - # Pass a string or regexp :separator to truncate +text+ at a natural break: - # - # 'Once upon a time in a world far far away'.truncate(27, separator: ' ') - # # => "Once upon a time in a..." - # - # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/) - # # => "Once upon a time in a..." - # - # The last characters will be replaced with the :omission string (defaults to "..."). - # The total length will not exceed truncate_to unless both +text+ and :omission - # are longer than truncate_to: - # - # 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)') - # # => "And they f... (continued)" - # - # 'And they found that many people were sleeping better.'.truncate(4, omission: '... (continued)') - # # => "... (continued)" - def truncate(truncate_to, options = {}) - return dup unless length > truncate_to - - omission = options[:omission] || "..." - length_with_room_for_omission = truncate_to - omission.length - stop = \ - if options[:separator] - rindex(options[:separator], length_with_room_for_omission) || length_with_room_for_omission - else - length_with_room_for_omission - end - - +"#{self[0, stop]}#{omission}" - end - - # Truncates +text+ to at most truncate_to bytes in length without - # breaking string encoding by splitting multibyte characters or breaking - # grapheme clusters ("perceptual characters") by truncating at combining - # characters. - # - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size - # => 20 - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize - # => 80 - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20) - # => "🔪🔪🔪🔪…" - # - # The truncated text ends with the :omission string, defaulting - # to "…", for a total length not exceeding truncate_to. - # - # Raises +ArgumentError+ when the bytesize of :omission exceeds truncate_to. - def truncate_bytes(truncate_to, omission: "…") - omission ||= "" - - case - when bytesize <= truncate_to - dup - when omission.bytesize > truncate_to - raise ArgumentError, "Omission #{omission.inspect} is #{omission.bytesize}, larger than the truncation length of #{truncate_to} bytes" - when omission.bytesize == truncate_to - omission.dup - else - self.class.new.force_encoding(encoding).tap do |cut| - cut_at = truncate_to - omission.bytesize - - each_grapheme_cluster do |grapheme| - if cut.bytesize + grapheme.bytesize <= cut_at - cut << grapheme - else - break - end - end - - cut << omission - end - end - end - - # Truncates a given +text+ after a given number of words (words_count): - # - # 'Once upon a time in a world far far away'.truncate_words(4) - # # => "Once upon a time..." - # - # Pass a string or regexp :separator to specify a different separator of words: - # - # 'Once
upon
a
time
in
a
world'.truncate_words(5, separator: '
') - # # => "Once
upon
a
time
in..." - # - # The last characters will be replaced with the :omission string (defaults to "..."): - # - # 'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)') - # # => "And they found that many... (continued)" - def truncate_words(words_count, options = {}) - sep = options[:separator] || /\s+/ - sep = Regexp.escape(sep.to_s) unless Regexp === sep - if self =~ /\A((?>.+?#{sep}){#{words_count - 1}}.+?)#{sep}.*/m - $1 + (options[:omission] || "...") - else - dup - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/indent.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/indent.rb deleted file mode 100644 index 9dcc4302..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/indent.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -class String - # Same as +indent+, except it indents the receiver in-place. - # - # Returns the indented string, or +nil+ if there was nothing to indent. - def indent!(amount, indent_string = nil, indent_empty_lines = false) - indent_string = indent_string || self[/^[ \t]/] || " " - re = indent_empty_lines ? /^/ : /^(?!$)/ - gsub!(re, indent_string * amount) - end - - # Indents the lines in the receiver: - # - # < - # def some_method - # some_code - # end - # - # The second argument, +indent_string+, specifies which indent string to - # use. The default is +nil+, which tells the method to make a guess by - # peeking at the first indented line, and fall back to a space if there is - # none. - # - # " foo".indent(2) # => " foo" - # "foo\n\t\tbar".indent(2) # => "\t\tfoo\n\t\t\t\tbar" - # "foo".indent(2, "\t") # => "\t\tfoo" - # - # While +indent_string+ is typically one space or tab, it may be any string. - # - # The third argument, +indent_empty_lines+, is a flag that says whether - # empty lines should be indented. Default is false. - # - # "foo\n\nbar".indent(2) # => " foo\n\n bar" - # "foo\n\nbar".indent(2, nil, true) # => " foo\n \n bar" - # - def indent(amount, indent_string = nil, indent_empty_lines = false) - dup.tap { |_| _.indent!(amount, indent_string, indent_empty_lines) } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/inflections.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/inflections.rb deleted file mode 100644 index da127c9a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/inflections.rb +++ /dev/null @@ -1,300 +0,0 @@ -# frozen_string_literal: true - -require "active_support/inflector/methods" -require "active_support/inflector/transliterate" - -# String inflections define new methods on the String class to transform names for different purposes. -# For instance, you can figure out the name of a table from the name of a class. -# -# 'ScaleScore'.tableize # => "scale_scores" -# -class String - # Returns the plural form of the word in the string. - # - # If the optional parameter +count+ is specified, - # the singular form will be returned if count == 1. - # For any other value of +count+ the plural will be returned. - # - # If the optional parameter +locale+ is specified, - # the word will be pluralized as a word of that language. - # By default, this parameter is set to :en. - # You must define your own inflection rules for languages other than English. - # - # 'post'.pluralize # => "posts" - # 'octopus'.pluralize # => "octopi" - # 'sheep'.pluralize # => "sheep" - # 'words'.pluralize # => "words" - # 'the blue mailman'.pluralize # => "the blue mailmen" - # 'CamelOctopus'.pluralize # => "CamelOctopi" - # 'apple'.pluralize(1) # => "apple" - # 'apple'.pluralize(2) # => "apples" - # 'ley'.pluralize(:es) # => "leyes" - # 'ley'.pluralize(1, :es) # => "ley" - # - # See ActiveSupport::Inflector.pluralize. - def pluralize(count = nil, locale = :en) - locale = count if count.is_a?(Symbol) - if count == 1 - dup - else - ActiveSupport::Inflector.pluralize(self, locale) - end - end - - # The reverse of +pluralize+, returns the singular form of a word in a string. - # - # If the optional parameter +locale+ is specified, - # the word will be singularized as a word of that language. - # By default, this parameter is set to :en. - # You must define your own inflection rules for languages other than English. - # - # 'posts'.singularize # => "post" - # 'octopi'.singularize # => "octopus" - # 'sheep'.singularize # => "sheep" - # 'word'.singularize # => "word" - # 'the blue mailmen'.singularize # => "the blue mailman" - # 'CamelOctopi'.singularize # => "CamelOctopus" - # 'leyes'.singularize(:es) # => "ley" - # - # See ActiveSupport::Inflector.singularize. - def singularize(locale = :en) - ActiveSupport::Inflector.singularize(self, locale) - end - - # +constantize+ tries to find a declared constant with the name specified - # in the string. It raises a NameError when the name is not in CamelCase - # or is not initialized. - # - # 'Module'.constantize # => Module - # 'Class'.constantize # => Class - # 'blargle'.constantize # => NameError: wrong constant name blargle - # - # See ActiveSupport::Inflector.constantize. - def constantize - ActiveSupport::Inflector.constantize(self) - end - - # +safe_constantize+ tries to find a declared constant with the name specified - # in the string. It returns +nil+ when the name is not in CamelCase - # or is not initialized. - # - # 'Module'.safe_constantize # => Module - # 'Class'.safe_constantize # => Class - # 'blargle'.safe_constantize # => nil - # - # See ActiveSupport::Inflector.safe_constantize. - def safe_constantize - ActiveSupport::Inflector.safe_constantize(self) - end - - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize - # is set to :lower then camelize produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # 'active_record'.camelize # => "ActiveRecord" - # 'active_record'.camelize(:lower) # => "activeRecord" - # 'active_record/errors'.camelize # => "ActiveRecord::Errors" - # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" - # - # See ActiveSupport::Inflector.camelize. - def camelize(first_letter = :upper) - case first_letter - when :upper - ActiveSupport::Inflector.camelize(self, true) - when :lower - ActiveSupport::Inflector.camelize(self, false) - else - raise ArgumentError, "Invalid option, use either :upper or :lower." - end - end - alias_method :camelcase, :camelize - - # Capitalizes all the words and replaces some characters in the string to create - # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the \Rails internals. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'man from the boondocks'.titleize # => "Man From The Boondocks" - # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" - # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" - # - # See ActiveSupport::Inflector.titleize. - def titleize(keep_id_suffix: false) - ActiveSupport::Inflector.titleize(self, keep_id_suffix: keep_id_suffix) - end - alias_method :titlecase, :titleize - - # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. - # - # +underscore+ will also change '::' to '/' to convert namespaces to paths. - # - # 'ActiveModel'.underscore # => "active_model" - # 'ActiveModel::Errors'.underscore # => "active_model/errors" - # - # See ActiveSupport::Inflector.underscore. - def underscore - ActiveSupport::Inflector.underscore(self) - end - - # Replaces underscores with dashes in the string. - # - # 'puni_puni'.dasherize # => "puni-puni" - # - # See ActiveSupport::Inflector.dasherize. - def dasherize - ActiveSupport::Inflector.dasherize(self) - end - - # Removes the module part from the constant expression in the string. - # - # 'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections" - # 'Inflections'.demodulize # => "Inflections" - # '::Inflections'.demodulize # => "Inflections" - # ''.demodulize # => '' - # - # See ActiveSupport::Inflector.demodulize. - # - # See also +deconstantize+. - def demodulize - ActiveSupport::Inflector.demodulize(self) - end - - # Removes the rightmost segment from the constant expression in the string. - # - # 'Net::HTTP'.deconstantize # => "Net" - # '::Net::HTTP'.deconstantize # => "::Net" - # 'String'.deconstantize # => "" - # '::String'.deconstantize # => "" - # ''.deconstantize # => "" - # - # See ActiveSupport::Inflector.deconstantize. - # - # See also +demodulize+. - def deconstantize - ActiveSupport::Inflector.deconstantize(self) - end - - # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. - # - # If the optional parameter +locale+ is specified, - # the word will be parameterized as a word of that language. - # By default, this parameter is set to nil and it will use - # the configured I18n.locale. - # - # class Person - # def to_param - # "#{id}-#{name.parameterize}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path) %> - # # => Donald E. Knuth - # - # To preserve the case of the characters in a string, use the +preserve_case+ argument. - # - # class Person - # def to_param - # "#{id}-#{name.parameterize(preserve_case: true)}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path) %> - # # => Donald E. Knuth - # - # See ActiveSupport::Inflector.parameterize. - def parameterize(separator: "-", preserve_case: false, locale: nil) - ActiveSupport::Inflector.parameterize(self, separator: separator, preserve_case: preserve_case, locale: locale) - end - - # Creates the name of a table like \Rails does for models to table names. This method - # uses the +pluralize+ method on the last word in the string. - # - # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" - # 'ham_and_egg'.tableize # => "ham_and_eggs" - # 'fancyCategory'.tableize # => "fancy_categories" - # - # See ActiveSupport::Inflector.tableize. - def tableize - ActiveSupport::Inflector.tableize(self) - end - - # Creates a class name from a plural table name like \Rails does for table names to models. - # Note that this returns a string and not a class. (To convert to an actual class - # follow +classify+ with +constantize+.) - # - # 'ham_and_eggs'.classify # => "HamAndEgg" - # 'posts'.classify # => "Post" - # - # See ActiveSupport::Inflector.classify. - def classify - ActiveSupport::Inflector.classify(self) - end - - # Capitalizes the first word, turns underscores into spaces, and (by default) strips a - # trailing '_id' if present. - # Like +titleize+, this is meant for creating pretty output. - # - # The capitalization of the first word can be turned off by setting the - # optional parameter +capitalize+ to false. - # By default, this parameter is true. - # - # The trailing '_id' can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'employee_salary'.humanize # => "Employee salary" - # 'author_id'.humanize # => "Author" - # 'author_id'.humanize(capitalize: false) # => "author" - # '_id'.humanize # => "Id" - # 'author_id'.humanize(keep_id_suffix: true) # => "Author id" - # - # See ActiveSupport::Inflector.humanize. - def humanize(capitalize: true, keep_id_suffix: false) - ActiveSupport::Inflector.humanize(self, capitalize: capitalize, keep_id_suffix: keep_id_suffix) - end - - # Converts the first character to uppercase. - # - # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" - # 'w'.upcase_first # => "W" - # ''.upcase_first # => "" - # - # See ActiveSupport::Inflector.upcase_first. - def upcase_first - ActiveSupport::Inflector.upcase_first(self) - end - - # Converts the first character to lowercase. - # - # 'If they enjoyed The Matrix'.downcase_first # => "if they enjoyed The Matrix" - # 'I'.downcase_first # => "i" - # ''.downcase_first # => "" - # - # See ActiveSupport::Inflector.downcase_first. - def downcase_first - ActiveSupport::Inflector.downcase_first(self) - end - - # Creates a foreign key name from a class name. - # +separate_class_name_and_id_with_underscore+ sets whether - # the method should put '_' between the name and 'id'. - # - # 'Message'.foreign_key # => "message_id" - # 'Message'.foreign_key(false) # => "messageid" - # 'Admin::Post'.foreign_key # => "post_id" - # - # See ActiveSupport::Inflector.foreign_key. - def foreign_key(separate_class_name_and_id_with_underscore = true) - ActiveSupport::Inflector.foreign_key(self, separate_class_name_and_id_with_underscore) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/inquiry.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/inquiry.rb deleted file mode 100644 index a3b42dad..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/inquiry.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -require "active_support/string_inquirer" -require "active_support/environment_inquirer" - -class String - # Wraps the current string in the ActiveSupport::StringInquirer class, - # which gives you a prettier way to test for equality. - # - # env = 'production'.inquiry - # env.production? # => true - # env.development? # => false - def inquiry - ActiveSupport::StringInquirer.new(self) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/multibyte.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/multibyte.rb deleted file mode 100644 index b74de3f1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/multibyte.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -require "active_support/multibyte" - -class String - # == Multibyte proxy - # - # +mb_chars+ is a multibyte safe proxy for string methods. - # - # It creates and returns an instance of the ActiveSupport::Multibyte::Chars class which - # encapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy - # class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string. - # - # >> "lj".mb_chars.upcase.to_s - # => "LJ" - # - # NOTE: Ruby 2.4 and later support native Unicode case mappings: - # - # >> "lj".upcase - # => "LJ" - # - # == \Method chaining - # - # All the methods on the Chars proxy which normally return a string will return a Chars object. This allows - # method chaining on the result of any of these methods. - # - # name.mb_chars.reverse.length # => 12 - # - # == Interoperability and configuration - # - # The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between - # String and Char work like expected. The bang! methods change the internal string representation in the Chars - # object. Interoperability problems can be resolved easily with a +to_s+ call. - # - # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For - # information about how to change the default Multibyte behavior see ActiveSupport::Multibyte. - def mb_chars - ActiveSupport::Multibyte.proxy_class.new(self) - end - - # Returns +true+ if string has utf_8 encoding. - # - # utf_8_str = "some string".encode "UTF-8" - # iso_str = "some string".encode "ISO-8859-1" - # - # utf_8_str.is_utf8? # => true - # iso_str.is_utf8? # => false - def is_utf8? - case encoding - when Encoding::UTF_8, Encoding::US_ASCII - valid_encoding? - when Encoding::ASCII_8BIT - dup.force_encoding(Encoding::UTF_8).valid_encoding? - else - false - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/output_safety.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/output_safety.rb deleted file mode 100644 index 8e44c045..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/output_safety.rb +++ /dev/null @@ -1,228 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/erb/util" -require "active_support/multibyte/unicode" - -class Object - def html_safe? - false - end -end - -class Numeric - def html_safe? - true - end -end - -module ActiveSupport # :nodoc: - class SafeBuffer < String - UNSAFE_STRING_METHODS = %w( - capitalize chomp chop delete delete_prefix delete_suffix - downcase lstrip next reverse rstrip scrub squeeze strip - succ swapcase tr tr_s unicode_normalize upcase - ) - - UNSAFE_STRING_METHODS_WITH_BACKREF = %w(gsub sub) - - alias_method :original_concat, :concat - private :original_concat - - # Raised when ActiveSupport::SafeBuffer#safe_concat is called on unsafe buffers. - class SafeConcatError < StandardError - def initialize - super "Could not concatenate to the buffer because it is not HTML safe." - end - end - - def [](*args) - if html_safe? - new_string = super - - return unless new_string - - string_into_safe_buffer(new_string, true) - else - to_str[*args] - end - end - alias_method :slice, :[] - - def slice!(*args) - new_string = super - - return new_string if !html_safe? || new_string.nil? - - string_into_safe_buffer(new_string, true) - end - - def chr - return super unless html_safe? - - string_into_safe_buffer(super, true) - end - - def safe_concat(value) - raise SafeConcatError unless html_safe? - original_concat(value) - end - - def initialize(str = "") - @html_safe = true - super - end - - def initialize_copy(other) - super - @html_safe = other.html_safe? - end - - def concat(value) - unless value.nil? - super(implicit_html_escape_interpolated_argument(value)) - end - self - end - alias << concat - - def bytesplice(*args, value) - super(*args, implicit_html_escape_interpolated_argument(value)) - end - - def insert(index, value) - super(index, implicit_html_escape_interpolated_argument(value)) - end - - def prepend(value) - super(implicit_html_escape_interpolated_argument(value)) - end - - def replace(value) - super(implicit_html_escape_interpolated_argument(value)) - end - - def []=(arg1, arg2, arg3 = nil) - if arg3 - super(arg1, arg2, implicit_html_escape_interpolated_argument(arg3)) - else - super(arg1, implicit_html_escape_interpolated_argument(arg2)) - end - end - - def +(other) - dup.concat(other) - end - - def *(_) - new_string = super - new_safe_buffer = new_string.is_a?(SafeBuffer) ? new_string : SafeBuffer.new(new_string) - new_safe_buffer.instance_variable_set(:@html_safe, @html_safe) - new_safe_buffer - end - - def %(args) - case args - when Hash - escaped_args = args.transform_values { |arg| explicit_html_escape_interpolated_argument(arg) } - else - escaped_args = Array(args).map { |arg| explicit_html_escape_interpolated_argument(arg) } - end - - self.class.new(super(escaped_args)) - end - - attr_reader :html_safe - alias_method :html_safe?, :html_safe - remove_method :html_safe - - def to_s - self - end - - def to_param - to_str - end - - def encode_with(coder) - coder.represent_object nil, to_str - end - - UNSAFE_STRING_METHODS.each do |unsafe_method| - if unsafe_method.respond_to?(unsafe_method) - class_eval <<-EOT, __FILE__, __LINE__ + 1 - def #{unsafe_method}(*args, &block) # def capitalize(*args, &block) - to_str.#{unsafe_method}(*args, &block) # to_str.capitalize(*args, &block) - end # end - - def #{unsafe_method}!(*args) # def capitalize!(*args) - @html_safe = false # @html_safe = false - super # super - end # end - EOT - end - end - - UNSAFE_STRING_METHODS_WITH_BACKREF.each do |unsafe_method| - class_eval <<-EOT, __FILE__, __LINE__ + 1 - def #{unsafe_method}(*args, &block) # def gsub(*args, &block) - if block # if block - to_str.#{unsafe_method}(*args) { |*params| # to_str.gsub(*args) { |*params| - set_block_back_references(block, $~) # set_block_back_references(block, $~) - block.call(*params) # block.call(*params) - } # } - else # else - to_str.#{unsafe_method}(*args) # to_str.gsub(*args) - end # end - end # end - - def #{unsafe_method}!(*args, &block) # def gsub!(*args, &block) - @html_safe = false # @html_safe = false - if block # if block - super(*args) { |*params| # super(*args) { |*params| - set_block_back_references(block, $~) # set_block_back_references(block, $~) - block.call(*params) # block.call(*params) - } # } - else # else - super # super - end # end - end # end - EOT - end - - private - def explicit_html_escape_interpolated_argument(arg) - (!html_safe? || arg.html_safe?) ? arg : CGI.escapeHTML(arg.to_s) - end - - def implicit_html_escape_interpolated_argument(arg) - if !html_safe? || arg.html_safe? - arg - else - CGI.escapeHTML(arg.to_str) - end - end - - def set_block_back_references(block, match_data) - block.binding.eval("proc { |m| $~ = m }").call(match_data) - rescue ArgumentError - # Can't create binding from C level Proc - end - - def string_into_safe_buffer(new_string, is_html_safe) - new_safe_buffer = new_string.is_a?(SafeBuffer) ? new_string : SafeBuffer.new(new_string) - new_safe_buffer.instance_variable_set :@html_safe, is_html_safe - new_safe_buffer - end - end -end - -class String - # Marks a string as trusted safe. It will be inserted into HTML with no - # additional escaping performed. It is your responsibility to ensure that the - # string contains no malicious content. This method is equivalent to the - # +raw+ helper in views. It is recommended that you use +sanitize+ instead of - # this method. It should never be called on user input. - def html_safe - ActiveSupport::SafeBuffer.new(self) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/starts_ends_with.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/starts_ends_with.rb deleted file mode 100644 index 1e216370..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/starts_ends_with.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -class String - alias :starts_with? :start_with? - alias :ends_with? :end_with? -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/strip.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/strip.rb deleted file mode 100644 index 60e9952e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/strip.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class String - # Strips indentation in heredocs. - # - # For example in - # - # if options[:usage] - # puts <<-USAGE.strip_heredoc - # This command does such and such. - # - # Supported options are: - # -h This message - # ... - # USAGE - # end - # - # the user would see the usage message aligned against the left margin. - # - # Technically, it looks for the least indented non-empty line - # in the whole string, and removes that amount of leading whitespace. - def strip_heredoc - gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, "").tap do |stripped| - stripped.freeze if frozen? - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/zones.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/zones.rb deleted file mode 100644 index 55dc2314..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/string/zones.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/string/conversions" -require "active_support/core_ext/time/zones" - -class String - # Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default - # is set, otherwise converts String to a Time via String#to_time - def in_time_zone(zone = ::Time.zone) - if zone - ::Time.find_zone!(zone).parse(self) - else - to_time - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/symbol.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/symbol.rb deleted file mode 100644 index 709fed20..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/symbol.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/symbol/starts_ends_with" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/symbol/starts_ends_with.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/symbol/starts_ends_with.rb deleted file mode 100644 index 4f852175..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/symbol/starts_ends_with.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -class Symbol - alias :starts_with? :start_with? - alias :ends_with? :end_with? -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/thread/backtrace/location.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/thread/backtrace/location.rb deleted file mode 100644 index d21acffb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/thread/backtrace/location.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class Thread::Backtrace::Location # :nodoc: - def spot(ex) - ErrorHighlight.spot(ex, backtrace_location: self) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time.rb deleted file mode 100644 index c809def0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/time/acts_like" -require "active_support/core_ext/time/calculations" -require "active_support/core_ext/time/compatibility" -require "active_support/core_ext/time/conversions" -require "active_support/core_ext/time/zones" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/acts_like.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/acts_like.rb deleted file mode 100644 index 8572b496..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/acts_like.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/acts_like" - -class Time - # Duck-types as a Time-like class. See Object#acts_like?. - def acts_like_time? - true - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/calculations.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/calculations.rb deleted file mode 100644 index 471a56c9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/calculations.rb +++ /dev/null @@ -1,386 +0,0 @@ -# frozen_string_literal: true - -require "active_support/duration" -require "active_support/core_ext/time/conversions" -require "active_support/time_with_zone" -require "active_support/core_ext/time/zones" -require "active_support/core_ext/date_and_time/calculations" -require "active_support/core_ext/date/calculations" -require "active_support/core_ext/module/remove_method" - -class Time - include DateAndTime::Calculations - - COMMON_YEAR_DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] - - class << self - # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances - def ===(other) - super || (self == Time && other.is_a?(ActiveSupport::TimeWithZone)) - end - - # Returns the number of days in the given month. - # If no year is specified, it will use the current year. - def days_in_month(month, year = current.year) - if month == 2 && ::Date.gregorian_leap?(year) - 29 - else - COMMON_YEAR_DAYS_IN_MONTH[month] - end - end - - # Returns the number of days in the given year. - # If no year is specified, it will use the current year. - def days_in_year(year = current.year) - days_in_month(2, year) + 337 - end - - # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. - def current - ::Time.zone ? ::Time.zone.now : ::Time.now - end - - # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime - # instances can be used when called with a single argument - def at_with_coercion(time_or_number, *args) - if args.empty? - if time_or_number.is_a?(ActiveSupport::TimeWithZone) - at_without_coercion(time_or_number.to_r).getlocal - elsif time_or_number.is_a?(DateTime) - at_without_coercion(time_or_number.to_f).getlocal - else - at_without_coercion(time_or_number) - end - else - at_without_coercion(time_or_number, *args) - end - end - ruby2_keywords :at_with_coercion - alias_method :at_without_coercion, :at - alias_method :at, :at_with_coercion - - # Creates a +Time+ instance from an RFC 3339 string. - # - # Time.rfc3339('1999-12-31T14:00:00-10:00') # => 2000-01-01 00:00:00 -1000 - # - # If the time or offset components are missing then an +ArgumentError+ will be raised. - # - # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date - def rfc3339(str) - parts = Date._rfc3339(str) - - raise ArgumentError, "invalid date" if parts.empty? - - Time.new( - parts.fetch(:year), - parts.fetch(:mon), - parts.fetch(:mday), - parts.fetch(:hour), - parts.fetch(:min), - parts.fetch(:sec) + parts.fetch(:sec_fraction, 0), - parts.fetch(:offset) - ) - end - end - - # Returns the number of seconds since 00:00:00. - # - # Time.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0.0 - # Time.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296.0 - # Time.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399.0 - def seconds_since_midnight - to_i - change(hour: 0).to_i + (usec / 1.0e+6) - end - - # Returns the number of seconds until 23:59:59. - # - # Time.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 - # Time.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 - # Time.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 - def seconds_until_end_of_day - end_of_day.to_i - to_i - end - - # Returns the fraction of a second as a +Rational+ - # - # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2) - def sec_fraction - subsec - end - - # Returns a new Time where one or more of the elements have been changed according - # to the +options+ parameter. The time options (:hour, :min, - # :sec, :usec, :nsec) reset cascadingly, so if only - # the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour - # and minute is passed, then sec, usec, and nsec is set to 0. The +options+ parameter - # takes a hash with any of these keys: :year, :month, :day, - # :hour, :min, :sec, :usec, :nsec, - # :offset. Pass either :usec or :nsec, not both. - # - # Time.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => Time.new(2012, 8, 1, 22, 35, 0) - # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => Time.new(1981, 8, 1, 22, 35, 0) - # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0) - def change(options) - new_year = options.fetch(:year, year) - new_month = options.fetch(:month, month) - new_day = options.fetch(:day, day) - new_hour = options.fetch(:hour, hour) - new_min = options.fetch(:min, options[:hour] ? 0 : min) - new_sec = options.fetch(:sec, (options[:hour] || options[:min]) ? 0 : sec) - new_offset = options.fetch(:offset, nil) - - if new_nsec = options[:nsec] - raise ArgumentError, "Can't change both :nsec and :usec at the same time: #{options.inspect}" if options[:usec] - new_usec = Rational(new_nsec, 1000) - else - new_usec = options.fetch(:usec, (options[:hour] || options[:min] || options[:sec]) ? 0 : Rational(nsec, 1000)) - end - - raise ArgumentError, "argument out of range" if new_usec >= 1000000 - - new_sec += Rational(new_usec, 1000000) - - if new_offset - ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, new_offset) - elsif utc? - ::Time.utc(new_year, new_month, new_day, new_hour, new_min, new_sec) - elsif zone.respond_to?(:utc_to_local) - new_time = ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, zone) - - # Some versions of Ruby have a bug where Time.new with a zone object and - # fractional seconds will end up with a broken utc_offset. - # This is fixed in Ruby 3.3.1 and 3.2.4 - unless new_time.utc_offset.integer? - new_time += 0 - end - - # When there are two occurrences of a nominal time due to DST ending, - # `Time.new` chooses the first chronological occurrence (the one with a - # larger UTC offset). However, for `change`, we want to choose the - # occurrence that matches this time's UTC offset. - # - # If the new time's UTC offset is larger than this time's UTC offset, the - # new time might be a first chronological occurrence. So we add the offset - # difference to fast-forward the new time, and check if the result has the - # desired UTC offset (i.e. is the second chronological occurrence). - offset_difference = new_time.utc_offset - utc_offset - if offset_difference > 0 && (new_time_2 = new_time + offset_difference).utc_offset == utc_offset - new_time_2 - else - new_time - end - elsif zone - ::Time.local(new_sec, new_min, new_hour, new_day, new_month, new_year, nil, nil, isdst, nil) - else - ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, utc_offset) - end - end - - # Uses Date to provide precise Time calculations for years, months, and days - # according to the proleptic Gregorian calendar. The +options+ parameter - # takes a hash with any of these keys: :years, :months, - # :weeks, :days, :hours, :minutes, - # :seconds. - # - # Time.new(2015, 8, 1, 14, 35, 0).advance(seconds: 1) # => 2015-08-01 14:35:01 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(minutes: 1) # => 2015-08-01 14:36:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(hours: 1) # => 2015-08-01 15:35:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(days: 1) # => 2015-08-02 14:35:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(weeks: 1) # => 2015-08-08 14:35:00 -0700 - # - # Just like Date#advance, increments are applied in order of time units from - # largest to smallest. This order can affect the result around the end of a - # month. - def advance(options) - unless options[:weeks].nil? - options[:weeks], partial_weeks = options[:weeks].divmod(1) - options[:days] = options.fetch(:days, 0) + 7 * partial_weeks - end - - unless options[:days].nil? - options[:days], partial_days = options[:days].divmod(1) - options[:hours] = options.fetch(:hours, 0) + 24 * partial_days - end - - d = to_date.gregorian.advance(options) - time_advanced_by_date = change(year: d.year, month: d.month, day: d.day) - seconds_to_advance = \ - options.fetch(:seconds, 0) + - options.fetch(:minutes, 0) * 60 + - options.fetch(:hours, 0) * 3600 - - if seconds_to_advance.zero? - time_advanced_by_date - else - time_advanced_by_date.since(seconds_to_advance) - end - end - - # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension - def ago(seconds) - since(-seconds) - end - - # Returns a new Time representing the time a number of seconds since the instance time - def since(seconds) - self + seconds - rescue TypeError - result = to_datetime.since(seconds) - ActiveSupport.deprecator.warn( - "Passing an instance of #{seconds.class} to #{self.class}#since is deprecated. This behavior will raise " \ - "a `TypeError` in Rails 8.1." - ) - result - end - alias :in :since - - # Returns a new Time representing the start of the day (0:00) - def beginning_of_day - change(hour: 0) - end - alias :midnight :beginning_of_day - alias :at_midnight :beginning_of_day - alias :at_beginning_of_day :beginning_of_day - - # Returns a new Time representing the middle of the day (12:00) - def middle_of_day - change(hour: 12) - end - alias :midday :middle_of_day - alias :noon :middle_of_day - alias :at_midday :middle_of_day - alias :at_noon :middle_of_day - alias :at_middle_of_day :middle_of_day - - # Returns a new Time representing the end of the day, 23:59:59.999999 - def end_of_day - change( - hour: 23, - min: 59, - sec: 59, - usec: Rational(999999999, 1000) - ) - end - alias :at_end_of_day :end_of_day - - # Returns a new Time representing the start of the hour (x:00) - def beginning_of_hour - change(min: 0) - end - alias :at_beginning_of_hour :beginning_of_hour - - # Returns a new Time representing the end of the hour, x:59:59.999999 - def end_of_hour - change( - min: 59, - sec: 59, - usec: Rational(999999999, 1000) - ) - end - alias :at_end_of_hour :end_of_hour - - # Returns a new Time representing the start of the minute (x:xx:00) - def beginning_of_minute - change(sec: 0) - end - alias :at_beginning_of_minute :beginning_of_minute - - # Returns a new Time representing the end of the minute, x:xx:59.999999 - def end_of_minute - change( - sec: 59, - usec: Rational(999999999, 1000) - ) - end - alias :at_end_of_minute :end_of_minute - - def plus_with_duration(other) # :nodoc: - if ActiveSupport::Duration === other - other.since(self) - else - plus_without_duration(other) - end - end - alias_method :plus_without_duration, :+ - alias_method :+, :plus_with_duration - - def minus_with_duration(other) # :nodoc: - if ActiveSupport::Duration === other - other.until(self) - else - minus_without_duration(other) - end - end - alias_method :minus_without_duration, :- - alias_method :-, :minus_with_duration - - # Time#- can also be used to determine the number of seconds between two Time instances. - # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances - # are coerced into values that Time#- will recognize - def minus_with_coercion(other) - other = other.comparable_time if other.respond_to?(:comparable_time) - other.is_a?(DateTime) ? to_f - other.to_f : minus_without_coercion(other) - end - alias_method :minus_without_coercion, :- - alias_method :-, :minus_with_coercion # rubocop:disable Lint/DuplicateMethods - - # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances - # can be chronologically compared with a Time - def compare_with_coercion(other) - # we're avoiding Time#to_datetime and Time#to_time because they're expensive - if other.class == Time - compare_without_coercion(other) - elsif other.is_a?(Time) - # also avoid ActiveSupport::TimeWithZone#to_time before Rails 8.0 - if other.respond_to?(:comparable_time) - compare_without_coercion(other.comparable_time) - else - compare_without_coercion(other.to_time) - end - else - to_datetime <=> other - end - end - alias_method :compare_without_coercion, :<=> - alias_method :<=>, :compare_with_coercion - - # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances - # can be eql? to an equivalent Time - def eql_with_coercion(other) - # if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do eql? comparison - other = other.comparable_time if other.respond_to?(:comparable_time) - eql_without_coercion(other) - end - alias_method :eql_without_coercion, :eql? - alias_method :eql?, :eql_with_coercion - - # Returns a new time the specified number of days ago. - def prev_day(days = 1) - advance(days: -days) - end - - # Returns a new time the specified number of days in the future. - def next_day(days = 1) - advance(days: days) - end - - # Returns a new time the specified number of months ago. - def prev_month(months = 1) - advance(months: -months) - end - - # Returns a new time the specified number of months in the future. - def next_month(months = 1) - advance(months: months) - end - - # Returns a new time the specified number of years ago. - def prev_year(years = 1) - advance(years: -years) - end - - # Returns a new time the specified number of years in the future. - def next_year(years = 1) - advance(years: years) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/compatibility.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/compatibility.rb deleted file mode 100644 index 4e6c8ca3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/compatibility.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/date_and_time/compatibility" -require "active_support/core_ext/module/redefine_method" - -class Time - include DateAndTime::Compatibility - - silence_redefinition_of_method :to_time - - # Either return +self+ or the time in the local system timezone depending - # on the setting of +ActiveSupport.to_time_preserves_timezone+. - def to_time - preserve_timezone ? self : getlocal - end - - def preserve_timezone # :nodoc: - system_local_time? || super - end - - private - def system_local_time? - if ::Time.equal?(self.class) - zone = self.zone - String === zone && - (zone != "UTC" || active_support_local_zone == "UTC") - end - end - - @@active_support_local_tz = nil - - def active_support_local_zone - @@active_support_local_zone = nil if @@active_support_local_tz != ENV["TZ"] - @@active_support_local_zone ||= - begin - @@active_support_local_tz = ENV["TZ"] - Time.new.zone - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/conversions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/conversions.rb deleted file mode 100644 index 8913f3f0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/conversions.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -require "time" -require "active_support/inflector/methods" -require "active_support/values/time_zone" - -class Time - DATE_FORMATS = { - db: "%Y-%m-%d %H:%M:%S", - inspect: "%Y-%m-%d %H:%M:%S.%9N %z", - number: "%Y%m%d%H%M%S", - nsec: "%Y%m%d%H%M%S%9N", - usec: "%Y%m%d%H%M%S%6N", - time: "%H:%M", - short: "%d %b %H:%M", - long: "%B %d, %Y %H:%M", - long_ordinal: lambda { |time| - day_format = ActiveSupport::Inflector.ordinalize(time.day) - time.strftime("%B #{day_format}, %Y %H:%M") - }, - rfc822: lambda { |time| - offset_format = time.formatted_offset(false) - time.strftime("%a, %d %b %Y %H:%M:%S #{offset_format}") - }, - rfc2822: lambda { |time| time.rfc2822 }, - iso8601: lambda { |time| time.iso8601 } - } - - # Converts to a formatted string. See DATE_FORMATS for built-in formats. - # - # This method is aliased to to_formatted_s. - # - # time = Time.now # => 2007-01-18 06:10:17 -06:00 - # - # time.to_fs(:time) # => "06:10" - # time.to_formatted_s(:time) # => "06:10" - # - # time.to_fs(:db) # => "2007-01-18 06:10:17" - # time.to_fs(:number) # => "20070118061017" - # time.to_fs(:short) # => "18 Jan 06:10" - # time.to_fs(:long) # => "January 18, 2007 06:10" - # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" - # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:rfc2822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" - # - # == Adding your own time formats to +to_fs+ - # You can add your own formats to the Time::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a time argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } - def to_fs(format = :default) - if formatter = DATE_FORMATS[format] - formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) - else - to_s - end - end - alias_method :to_formatted_s, :to_fs - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # Time.local(2000).formatted_offset # => "-06:00" - # Time.local(2000).formatted_offset(false) # => "-0600" - def formatted_offset(colon = true, alternate_utc_string = nil) - utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon) - end - - # Aliased to +xmlschema+ for compatibility with +DateTime+ - alias_method :rfc3339, :xmlschema -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/zones.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/zones.rb deleted file mode 100644 index 5f0d3c7f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/core_ext/time/zones.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -require "active_support/time_with_zone" -require "active_support/core_ext/time/acts_like" -require "active_support/core_ext/date_and_time/zones" - -class Time - include DateAndTime::Zones - class << self - attr_accessor :zone_default - - # Returns the TimeZone for the current request, if this has been set (via Time.zone=). - # If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone. - def zone - ::ActiveSupport::IsolatedExecutionState[:time_zone] || zone_default - end - - # Sets Time.zone to a TimeZone object for the current request/thread. - # - # This method accepts any of the following: - # - # * A \Rails TimeZone object. - # * An identifier for a \Rails TimeZone object (e.g., "Eastern \Time (US & Canada)", -5.hours). - # * A +TZInfo::Timezone+ object. - # * An identifier for a +TZInfo::Timezone+ object (e.g., "America/New_York"). - # - # Here's an example of how you might set Time.zone on a per request basis and reset it when the request is done. - # current_user.time_zone just needs to return a string identifying the user's preferred time zone: - # - # class ApplicationController < ActionController::Base - # around_action :set_time_zone - # - # def set_time_zone - # if logged_in? - # Time.use_zone(current_user.time_zone) { yield } - # else - # yield - # end - # end - # end - def zone=(time_zone) - ::ActiveSupport::IsolatedExecutionState[:time_zone] = find_zone!(time_zone) - end - - # Allows override of Time.zone locally inside supplied block; - # resets Time.zone to existing value when done. - # - # class ApplicationController < ActionController::Base - # around_action :set_time_zone - # - # private - # def set_time_zone - # Time.use_zone(current_user.timezone) { yield } - # end - # end - # - # NOTE: This won't affect any ActiveSupport::TimeWithZone - # objects that have already been created, e.g. any model timestamp - # attributes that have been read before the block will remain in - # the application's default timezone. - def use_zone(time_zone) - new_zone = find_zone!(time_zone) - begin - old_zone, ::Time.zone = ::Time.zone, new_zone - yield - ensure - ::Time.zone = old_zone - end - end - - # Returns a TimeZone instance matching the time zone provided. - # Accepts the time zone in any format supported by Time.zone=. - # Raises an +ArgumentError+ for invalid time zones. - # - # Time.find_zone! "America/New_York" # => # - # Time.find_zone! "EST" # => # - # Time.find_zone! -5.hours # => # - # Time.find_zone! nil # => nil - # Time.find_zone! false # => false - # Time.find_zone! "NOT-A-TIMEZONE" # => ArgumentError: Invalid Timezone: NOT-A-TIMEZONE - def find_zone!(time_zone) - return time_zone unless time_zone - - ActiveSupport::TimeZone[time_zone] || raise(ArgumentError, "Invalid Timezone: #{time_zone}") - end - - # Returns a TimeZone instance matching the time zone provided. - # Accepts the time zone in any format supported by Time.zone=. - # Returns +nil+ for invalid time zones. - # - # Time.find_zone "America/New_York" # => # - # Time.find_zone "NOT-A-TIMEZONE" # => nil - def find_zone(time_zone) - find_zone!(time_zone) rescue nil - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/current_attributes.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/current_attributes.rb deleted file mode 100644 index 43a503ea..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/current_attributes.rb +++ /dev/null @@ -1,233 +0,0 @@ -# frozen_string_literal: true - -require "active_support/callbacks" -require "active_support/core_ext/object/with" -require "active_support/core_ext/enumerable" -require "active_support/core_ext/module/delegation" - -module ActiveSupport - # = Current Attributes - # - # Abstract super class that provides a thread-isolated attributes singleton, which resets automatically - # before and after each request. This allows you to keep all the per-request attributes easily - # available to the whole system. - # - # The following full app-like example demonstrates how to use a Current class to - # facilitate easy access to the global, per-request attributes without passing them deeply - # around everywhere: - # - # # app/models/current.rb - # class Current < ActiveSupport::CurrentAttributes - # attribute :account, :user - # attribute :request_id, :user_agent, :ip_address - # - # resets { Time.zone = nil } - # - # def user=(user) - # super - # self.account = user.account - # Time.zone = user.time_zone - # end - # end - # - # # app/controllers/concerns/authentication.rb - # module Authentication - # extend ActiveSupport::Concern - # - # included do - # before_action :authenticate - # end - # - # private - # def authenticate - # if authenticated_user = User.find_by(id: cookies.encrypted[:user_id]) - # Current.user = authenticated_user - # else - # redirect_to new_session_url - # end - # end - # end - # - # # app/controllers/concerns/set_current_request_details.rb - # module SetCurrentRequestDetails - # extend ActiveSupport::Concern - # - # included do - # before_action do - # Current.request_id = request.uuid - # Current.user_agent = request.user_agent - # Current.ip_address = request.ip - # end - # end - # end - # - # class ApplicationController < ActionController::Base - # include Authentication - # include SetCurrentRequestDetails - # end - # - # class MessagesController < ApplicationController - # def create - # Current.account.messages.create(message_params) - # end - # end - # - # class Message < ApplicationRecord - # belongs_to :creator, default: -> { Current.user } - # after_create { |message| Event.create(record: message) } - # end - # - # class Event < ApplicationRecord - # before_create do - # self.request_id = Current.request_id - # self.user_agent = Current.user_agent - # self.ip_address = Current.ip_address - # end - # end - # - # A word of caution: It's easy to overdo a global singleton like Current and tangle your model as a result. - # Current should only be used for a few, top-level globals, like account, user, and request details. - # The attributes stuck in Current should be used by more or less all actions on all requests. If you start - # sticking controller-specific attributes in there, you're going to create a mess. - class CurrentAttributes - include ActiveSupport::Callbacks - define_callbacks :reset - - INVALID_ATTRIBUTE_NAMES = [:set, :reset, :resets, :instance, :before_reset, :after_reset, :reset_all, :clear_all] # :nodoc: - - NOT_SET = Object.new.freeze # :nodoc: - - class << self - # Returns singleton instance for this class in this thread. If none exists, one is created. - def instance - current_instances[current_instances_key] ||= new - end - - # Declares one or more attributes that will be given both class and instance accessor methods. - # - # ==== Options - # - # * :default - The default value for the attributes. If the value - # is a proc or lambda, it will be called whenever an instance is - # constructed. Otherwise, the value will be duplicated with +#dup+. - # Default values are re-assigned when the attributes are reset. - def attribute(*names, default: NOT_SET) - invalid_attribute_names = names.map(&:to_sym) & INVALID_ATTRIBUTE_NAMES - if invalid_attribute_names.any? - raise ArgumentError, "Restricted attribute names: #{invalid_attribute_names.join(", ")}" - end - - ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |owner| - names.each do |name| - owner.define_cached_method(name, namespace: :current_attributes) do |batch| - batch << - "def #{name}" << - "attributes[:#{name}]" << - "end" - end - owner.define_cached_method("#{name}=", namespace: :current_attributes) do |batch| - batch << - "def #{name}=(value)" << - "attributes[:#{name}] = value" << - "end" - end - end - end - - Delegation.generate(singleton_class, names, to: :instance, nilable: false, signature: "") - Delegation.generate(singleton_class, names.map { |n| "#{n}=" }, to: :instance, nilable: false, signature: "value") - - self.defaults = defaults.merge(names.index_with { default }) - end - - # Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values. - def before_reset(*methods, &block) - set_callback :reset, :before, *methods, &block - end - - # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. - def resets(*methods, &block) - set_callback :reset, :after, *methods, &block - end - alias_method :after_reset, :resets - - delegate :set, :reset, to: :instance - - def reset_all # :nodoc: - current_instances.each_value(&:reset) - end - - def clear_all # :nodoc: - reset_all - current_instances.clear - end - - private - def generated_attribute_methods - @generated_attribute_methods ||= Module.new.tap { |mod| include mod } - end - - def current_instances - IsolatedExecutionState[:current_attributes_instances] ||= {} - end - - def current_instances_key - @current_instances_key ||= name.to_sym - end - - def method_missing(name, ...) - instance.public_send(name, ...) - end - - def respond_to_missing?(name, _) - instance.respond_to?(name) || super - end - - def method_added(name) - super - return if name == :initialize - return unless public_method_defined?(name) - return if singleton_class.method_defined?(name) || singleton_class.private_method_defined?(name) - Delegation.generate(singleton_class, [name], to: :instance, as: self, nilable: false) - end - end - - class_attribute :defaults, instance_writer: false, default: {}.freeze - - attr_accessor :attributes - - def initialize - @attributes = resolve_defaults - end - - # Expose one or more attributes within a block. Old values are returned after the block concludes. - # Example demonstrating the common use of needing to set Current attributes outside the request-cycle: - # - # class Chat::PublicationJob < ApplicationJob - # def perform(attributes, room_number, creator) - # Current.set(person: creator) do - # Chat::Publisher.publish(attributes: attributes, room_number: room_number) - # end - # end - # end - def set(attributes, &block) - with(**attributes, &block) - end - - # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. - def reset - run_callbacks :reset do - self.attributes = resolve_defaults - end - end - - private - def resolve_defaults - defaults.each_with_object({}) do |(key, value), result| - if value != NOT_SET - result[key] = Proc === value ? value.call : value.dup - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/current_attributes/test_helper.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/current_attributes/test_helper.rb deleted file mode 100644 index 2016384a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/current_attributes/test_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport::CurrentAttributes::TestHelper # :nodoc: - def before_setup - ActiveSupport::CurrentAttributes.reset_all - super - end - - def after_teardown - super - ActiveSupport::CurrentAttributes.reset_all - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deep_mergeable.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deep_mergeable.rb deleted file mode 100644 index c00a240b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deep_mergeable.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # Provides +deep_merge+ and +deep_merge!+ methods. Expects the including class - # to provide a merge!(other, &block) method. - module DeepMergeable # :nodoc: - # Returns a new instance with the values from +other+ merged recursively. - # - # class Hash - # include ActiveSupport::DeepMergeable - # end - # - # hash_1 = { a: true, b: { c: [1, 2, 3] } } - # hash_2 = { a: false, b: { x: [3, 4, 5] } } - # - # hash_1.deep_merge(hash_2) - # # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } - # - # A block can be provided to merge non-DeepMergeable values: - # - # hash_1 = { a: 100, b: 200, c: { c1: 100 } } - # hash_2 = { b: 250, c: { c1: 200 } } - # - # hash_1.deep_merge(hash_2) do |key, this_val, other_val| - # this_val + other_val - # end - # # => { a: 100, b: 450, c: { c1: 300 } } - # - def deep_merge(other, &block) - dup.deep_merge!(other, &block) - end - - # Same as #deep_merge, but modifies +self+. - def deep_merge!(other, &block) - merge!(other) do |key, this_val, other_val| - if this_val.is_a?(DeepMergeable) && this_val.deep_merge?(other_val) - this_val.deep_merge(other_val, &block) - elsif block_given? - block.call(key, this_val, other_val) - else - other_val - end - end - end - - # Returns true if +other+ can be deep merged into +self+. Classes may - # override this method to restrict or expand the domain of deep mergeable - # values. Defaults to checking that +other+ is of type +self.class+. - def deep_merge?(other) - other.is_a?(self.class) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/delegation.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/delegation.rb deleted file mode 100644 index 261cc0d4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/delegation.rb +++ /dev/null @@ -1,200 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ - # option is not used. - class DelegationError < NoMethodError - class << self - def nil_target(method_name, target) # :nodoc: - new("#{method_name} delegated to #{target}, but #{target} is nil") - end - end - end - - module Delegation # :nodoc: - RUBY_RESERVED_KEYWORDS = %w(__ENCODING__ __LINE__ __FILE__ alias and BEGIN begin break - case class def defined? do else elsif END end ensure false for if in module next nil - not or redo rescue retry return self super then true undef unless until when while yield) - RESERVED_METHOD_NAMES = (RUBY_RESERVED_KEYWORDS + %w(_ arg args block)).to_set.freeze - - class << self - def generate(owner, methods, location: nil, to: nil, prefix: nil, allow_nil: nil, nilable: true, private: nil, as: nil, signature: nil) - unless to - raise ArgumentError, "Delegation needs a target. Supply a keyword argument 'to' (e.g. delegate :hello, to: :greeter)." - end - - if prefix == true && /^[^a-z_]/.match?(to) - raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method." - end - - method_prefix = \ - if prefix - "#{prefix == true ? to : prefix}_" - else - "" - end - - location ||= caller_locations(1, 1).first - file, line = location.path, location.lineno - - receiver = if to.is_a?(Module) - if to.name.nil? - raise ArgumentError, "Can't delegate to anonymous class or module: #{to}" - end - - unless Inflector.safe_constantize(to.name).equal?(to) - raise ArgumentError, "Can't delegate to detached class or module: #{to.name}" - end - - "::#{to.name}" - else - to.to_s - end - receiver = "self.#{receiver}" if RESERVED_METHOD_NAMES.include?(receiver) - - explicit_receiver = false - receiver_class = if as - explicit_receiver = true - as - elsif to.is_a?(Module) - to.singleton_class - elsif receiver == "self.class" - nilable = false # self.class can't possibly be nil - owner.singleton_class - end - - method_def = [] - method_names = [] - - method_def << "self.private" if private - - methods.each do |method| - method_name = prefix ? "#{method_prefix}#{method}" : method - method_names << method_name.to_sym - - # Attribute writer methods only accept one argument. Makes sure []= - # methods still accept two arguments. - definition = \ - if signature - signature - elsif /[^\]]=\z/.match?(method) - "arg" - else - method_object = if receiver_class - begin - receiver_class.public_instance_method(method) - rescue NameError - raise if explicit_receiver - # Do nothing. Fall back to `"..."` - end - end - - if method_object - parameters = method_object.parameters - - if parameters.map(&:first).intersect?([:opt, :rest, :keyreq, :key, :keyrest]) - "..." - else - defn = parameters.filter_map { |type, arg| arg if type == :req } - defn << "&" - defn.join(", ") - end - else - "..." - end - end - - # The following generated method calls the target exactly once, storing - # the returned value in a dummy variable. - # - # Reason is twofold: On one hand doing less calls is in general better. - # On the other hand it could be that the target has side-effects, - # whereas conceptually, from the user point of view, the delegator should - # be doing one call. - if nilable == false - method_def << - "def #{method_name}(#{definition})" << - " (#{receiver}).#{method}(#{definition})" << - "end" - elsif allow_nil - method = method.to_s - - method_def << - "def #{method_name}(#{definition})" << - " _ = #{receiver}" << - " if !_.nil? || nil.respond_to?(:#{method})" << - " _.#{method}(#{definition})" << - " end" << - "end" - else - method = method.to_s - method_name = method_name.to_s - - method_def << - "def #{method_name}(#{definition})" << - " _ = #{receiver}" << - " _.#{method}(#{definition})" << - "rescue NoMethodError => e" << - " if _.nil? && e.name == :#{method}" << - " raise ::ActiveSupport::DelegationError.nil_target(:#{method_name}, :'#{receiver}')" << - " else" << - " raise" << - " end" << - "end" - end - end - owner.module_eval(method_def.join(";"), file, line) - method_names - end - - def generate_method_missing(owner, target, allow_nil: nil) - target = target.to_s - target = "self.#{target}" if RESERVED_METHOD_NAMES.include?(target) || target == "__target" - - if allow_nil - owner.module_eval <<~RUBY, __FILE__, __LINE__ + 1 - def respond_to_missing?(name, include_private = false) - # It may look like an oversight, but we deliberately do not pass - # +include_private+, because they do not get delegated. - - return false if name == :marshal_dump || name == :_dump - #{target}.respond_to?(name) || super - end - - def method_missing(method, ...) - __target = #{target} - if __target.nil? && !nil.respond_to?(method) - nil - elsif __target.respond_to?(method) - __target.public_send(method, ...) - else - super - end - end - RUBY - else - owner.module_eval <<~RUBY, __FILE__, __LINE__ + 1 - def respond_to_missing?(name, include_private = false) - # It may look like an oversight, but we deliberately do not pass - # +include_private+, because they do not get delegated. - - return false if name == :marshal_dump || name == :_dump - #{target}.respond_to?(name) || super - end - - def method_missing(method, ...) - __target = #{target} - if __target.nil? && !nil.respond_to?(method) - raise ::ActiveSupport::DelegationError.nil_target(method, :'#{target}') - elsif __target.respond_to?(method) - __target.public_send(method, ...) - else - super - end - end - RUBY - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies.rb deleted file mode 100644 index aed69233..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -require "active_support/dependencies/interlock" - -module ActiveSupport # :nodoc: - module Dependencies # :nodoc: - require_relative "dependencies/require_dependency" - - singleton_class.attr_accessor :interlock - @interlock = Interlock.new - - # :doc: - - # Execute the supplied block without interference from any - # concurrent loads. - def self.run_interlock(&block) - interlock.running(&block) - end - - # Execute the supplied block while holding an exclusive lock, - # preventing any other thread from being inside a #run_interlock - # block at the same time. - def self.load_interlock(&block) - interlock.loading(&block) - end - - # Execute the supplied block while holding an exclusive lock, - # preventing any other thread from being inside a #run_interlock - # block at the same time. - def self.unload_interlock(&block) - interlock.unloading(&block) - end - - # :nodoc: - - # The array of directories from which we autoload and reload, if reloading - # is enabled. The public interface to push directories to this collection - # from applications or engines is config.autoload_paths. - # - # This collection is allowed to have intersection with autoload_once_paths. - # Common directories are not reloaded. - singleton_class.attr_accessor :autoload_paths - self.autoload_paths = [] - - # The array of directories from which we autoload and never reload, even if - # reloading is enabled. The public interface to push directories to this - # collection from applications or engines is config.autoload_once_paths. - singleton_class.attr_accessor :autoload_once_paths - self.autoload_once_paths = [] - - # This is a private set that collects all eager load paths during bootstrap. - # Useful for Zeitwerk integration. The public interface to push custom - # directories to this collection from applications or engines is - # config.eager_load_paths. - singleton_class.attr_accessor :_eager_load_paths - self._eager_load_paths = Set.new - - # If reloading is enabled, this private set holds autoloaded classes tracked - # by the descendants tracker. It is populated by an on_load callback in the - # main autoloader. Used to clear state. - singleton_class.attr_accessor :_autoloaded_tracked_classes - self._autoloaded_tracked_classes = Set.new - - # If reloading is enabled, this private attribute stores the main autoloader - # of a Rails application. It is `nil` otherwise. - # - # The public interface for this autoloader is `Rails.autoloaders.main`. - singleton_class.attr_accessor :autoloader - - # Private method that reloads constants autoloaded by the main autoloader. - # - # Rails.application.reloader.reload! is the public interface for application - # reload. That involves more things, like deleting unloaded classes from the - # internal state of the descendants tracker, or reloading routes. - def self.clear - unload_interlock do - _autoloaded_tracked_classes.clear - autoloader.reload - end - end - - # Private method used by require_dependency. - def self.search_for_file(relpath) - relpath += ".rb" unless relpath.end_with?(".rb") - autoload_paths.each do |autoload_path| - abspath = File.join(autoload_path, relpath) - return abspath if File.file?(abspath) - end - nil - end - - # Private method that helps configuring the autoloaders. - def self.eager_load?(path) - _eager_load_paths.member?(path) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/autoload.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/autoload.rb deleted file mode 100644 index 747f1fe4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/autoload.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -require "active_support/inflector/methods" - -module ActiveSupport - # = Active Support \Autoload - # - # Autoload and eager load conveniences for your library. - # - # This module allows you to define autoloads based on - # \Rails conventions (i.e. no need to define the path - # it is automatically guessed based on the filename) - # and also define a set of constants that needs to be - # eager loaded: - # - # module MyLib - # extend ActiveSupport::Autoload - # - # autoload :Model - # - # eager_autoload do - # autoload :Cache - # end - # end - # - # Then your library can be eager loaded by simply calling: - # - # MyLib.eager_load! - module Autoload - def autoload(const_name, path = @_at_path) - unless path - full = [name, @_under_path, const_name.to_s].compact.join("::") - path = Inflector.underscore(full) - end - - if @_eager_autoload - @_eagerloaded_constants ||= [] - @_eagerloaded_constants << const_name - end - - super const_name, path - end - - def autoload_under(path) - @_under_path, old_path = path, @_under_path - yield - ensure - @_under_path = old_path - end - - def autoload_at(path) - @_at_path, old_path = path, @_at_path - yield - ensure - @_at_path = old_path - end - - def eager_autoload - old_eager, @_eager_autoload = @_eager_autoload, true - yield - ensure - @_eager_autoload = old_eager - end - - def eager_load! - if @_eagerloaded_constants - @_eagerloaded_constants.each { |const_name| const_get(const_name) } - @_eagerloaded_constants = nil - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/interlock.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/interlock.rb deleted file mode 100644 index e0e32e82..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/interlock.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -require "active_support/concurrency/share_lock" - -module ActiveSupport # :nodoc: - module Dependencies # :nodoc: - class Interlock - def initialize # :nodoc: - @lock = ActiveSupport::Concurrency::ShareLock.new - end - - def loading(&block) - @lock.exclusive(purpose: :load, compatible: [:load], after_compatible: [:load], &block) - end - - def unloading(&block) - @lock.exclusive(purpose: :unload, compatible: [:load, :unload], after_compatible: [:load, :unload], &block) - end - - def start_unloading - @lock.start_exclusive(purpose: :unload, compatible: [:load, :unload]) - end - - def done_unloading - @lock.stop_exclusive(compatible: [:load, :unload]) - end - - def start_running - @lock.start_sharing - end - - def done_running - @lock.stop_sharing - end - - def running(&block) - @lock.sharing(&block) - end - - def permit_concurrent_loads(&block) - @lock.yield_shares(compatible: [:load], &block) - end - - def raw_state(&block) # :nodoc: - @lock.raw_state(&block) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/require_dependency.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/require_dependency.rb deleted file mode 100644 index 403f5fa4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/dependencies/require_dependency.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport::Dependencies::RequireDependency - # Warning: This method is obsolete. The semantics of the autoloader - # match Ruby's and you do not need to be defensive with load order anymore. - # Just refer to classes and modules normally. - # - # Engines that do not control the mode in which their parent application runs - # should call +require_dependency+ where needed in case the runtime mode is - # +:classic+. - def require_dependency(filename) - filename = filename.to_path if filename.respond_to?(:to_path) - - unless filename.is_a?(String) - raise ArgumentError, "the file name must be either a String or implement #to_path -- you passed #{filename.inspect}" - end - - if abspath = ActiveSupport::Dependencies.search_for_file(filename) - require abspath - else - require filename - end - end - - # We could define require_dependency in Object directly, but a module makes - # the extension apparent if you list ancestors. - Object.prepend(self) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation.rb deleted file mode 100644 index 1358d915..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # = Active Support \Deprecation - # - # \Deprecation specifies the API used by \Rails to deprecate methods, instance variables, objects, and constants. It's - # also available for gems or applications. - # - # For a gem, use Deprecation.new to create a Deprecation object and store it in your module or class (in order for - # users to be able to configure it). - # - # module MyLibrary - # def self.deprecator - # @deprecator ||= ActiveSupport::Deprecation.new("2.0", "MyLibrary") - # end - # end - # - # For a Railtie or Engine, you may also want to add it to the application's deprecators, so that the application's - # configuration can be applied to it. - # - # module MyLibrary - # class Railtie < Rails::Railtie - # initializer "my_library.deprecator" do |app| - # app.deprecators[:my_library] = MyLibrary.deprecator - # end - # end - # end - # - # With the above initializer, configuration settings like the following will affect +MyLibrary.deprecator+: - # - # # in config/environments/test.rb - # config.active_support.deprecation = :raise - class Deprecation - # active_support.rb sets an autoload for ActiveSupport::Deprecation. - # - # If these requires were at the top of the file the constant would not be - # defined by the time their files were loaded. Since some of them reopen - # ActiveSupport::Deprecation its autoload would be triggered, resulting in - # a circular require warning for active_support/deprecation.rb. - # - # So, we define the constant first, and load dependencies later. - require "active_support/deprecation/behaviors" - require "active_support/deprecation/reporting" - require "active_support/deprecation/disallowed" - require "active_support/deprecation/constant_accessor" - require "active_support/deprecation/method_wrappers" - require "active_support/deprecation/proxy_wrappers" - require "active_support/deprecation/deprecators" - require "active_support/core_ext/module/deprecation" - require "concurrent/atomic/thread_local_var" - - include Behavior - include Reporting - include Disallowed - include MethodWrapper - - MUTEX = Mutex.new # :nodoc: - private_constant :MUTEX - - def self._instance # :nodoc: - @_instance ||= MUTEX.synchronize { @_instance ||= new } - end - - # The version number in which the deprecated behavior will be removed, by default. - attr_accessor :deprecation_horizon - - # It accepts two parameters on initialization. The first is a version of library - # and the second is a library name. - # - # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') - def initialize(deprecation_horizon = "8.1", gem_name = "Rails") - self.gem_name = gem_name - self.deprecation_horizon = deprecation_horizon - # By default, warnings are not silenced and debugging is off. - self.silenced = false - self.debug = false - @silence_counter = Concurrent::ThreadLocalVar.new(0) - @explicitly_allowed_warnings = Concurrent::ThreadLocalVar.new(nil) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/behaviors.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/behaviors.rb deleted file mode 100644 index 2473263f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/behaviors.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -require "active_support/notifications" - -module ActiveSupport - # Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. - # You would set :raise, as a behavior to raise errors and proactively report exceptions from deprecations. - class DeprecationException < StandardError - end - - class Deprecation - # Default warning behaviors per Rails.env. - DEFAULT_BEHAVIORS = { - raise: ->(message, callstack, deprecator) do - e = DeprecationException.new(message) - e.set_backtrace(callstack.map(&:to_s)) - raise e - end, - - stderr: ->(message, callstack, deprecator) do - $stderr.puts(message) - $stderr.puts callstack.join("\n ") if deprecator.debug - end, - - log: ->(message, callstack, deprecator) do - logger = - if defined?(Rails.logger) && Rails.logger - Rails.logger - else - require "active_support/logger" - ActiveSupport::Logger.new($stderr) - end - logger.warn message - logger.debug callstack.join("\n ") if deprecator.debug - end, - - notify: ->(message, callstack, deprecator) do - ActiveSupport::Notifications.instrument( - "deprecation.#{deprecator.gem_name.underscore.tr("/", "_")}", - message: message, - callstack: callstack, - gem_name: deprecator.gem_name, - deprecation_horizon: deprecator.deprecation_horizon, - ) - end, - - silence: ->(message, callstack, deprecator) { }, - - report: ->(message, callstack, deprecator) do - error = DeprecationException.new(message) - error.set_backtrace(callstack.map(&:to_s)) - ActiveSupport.error_reporter.report(error) - end - } - - # Behavior module allows to determine how to display deprecation messages. - # You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ - # constant. Available behaviors are: - # - # [+:raise+] Raise ActiveSupport::DeprecationException. - # [+:stderr+] Log all deprecation warnings to $stderr. - # [+:log+] Log all deprecation warnings to +Rails.logger+. - # [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. - # [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. - # [+:silence+] Do nothing. On \Rails, set config.active_support.report_deprecations = false to disable all behaviors. - # - # Setting behaviors only affects deprecations that happen after boot time. - # For more information you can read the documentation of the #behavior= method. - module Behavior - # Whether to print a backtrace along with the warning. - attr_accessor :debug - - # Returns the current behavior or if one isn't set, defaults to +:stderr+. - def behavior - @behavior ||= [DEFAULT_BEHAVIORS[:stderr]] - end - - # Returns the current behavior for disallowed deprecations or if one isn't set, defaults to +:raise+. - def disallowed_behavior - @disallowed_behavior ||= [DEFAULT_BEHAVIORS[:raise]] - end - - # Sets the behavior to the specified value. Can be a single value, array, - # or an object that responds to +call+. - # - # Available behaviors: - # - # [+:raise+] Raise ActiveSupport::DeprecationException. - # [+:stderr+] Log all deprecation warnings to $stderr. - # [+:log+] Log all deprecation warnings to +Rails.logger+. - # [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. - # [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. - # [+:silence+] Do nothing. - # - # Setting behaviors only affects deprecations that happen after boot time. - # Deprecation warnings raised by gems are not affected by this setting - # because they happen before \Rails boots up. - # - # deprecator = ActiveSupport::Deprecation.new - # deprecator.behavior = :stderr - # deprecator.behavior = [:stderr, :log] - # deprecator.behavior = MyCustomHandler - # deprecator.behavior = ->(message, callstack, deprecation_horizon, gem_name) { - # # custom stuff - # } - # - # If you are using \Rails, you can set - # config.active_support.report_deprecations = false to disable - # all deprecation behaviors. This is similar to the +:silence+ option but - # more performant. - def behavior=(behavior) - @behavior = Array(behavior).map { |b| DEFAULT_BEHAVIORS[b] || arity_coerce(b) } - end - - # Sets the behavior for disallowed deprecations (those configured by - # ActiveSupport::Deprecation#disallowed_warnings=) to the specified - # value. As with #behavior=, this can be a single value, array, or an - # object that responds to +call+. - def disallowed_behavior=(behavior) - @disallowed_behavior = Array(behavior).map { |b| DEFAULT_BEHAVIORS[b] || arity_coerce(b) } - end - - private - def arity_coerce(behavior) - unless behavior.respond_to?(:call) - raise ArgumentError, "#{behavior.inspect} is not a valid deprecation behavior." - end - - case arity_of_callable(behavior) - when 2 - ->(message, callstack, deprecator) do - behavior.call(message, callstack) - end - when -2..3 - behavior - else - ->(message, callstack, deprecator) do - behavior.call(message, callstack, deprecator.deprecation_horizon, deprecator.gem_name) - end - end - end - - def arity_of_callable(callable) - callable.respond_to?(:arity) ? callable.arity : callable.method(:call).arity - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/constant_accessor.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/constant_accessor.rb deleted file mode 100644 index d6ff5b4d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/constant_accessor.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - class Deprecation - module DeprecatedConstantAccessor - def self.included(base) - require "active_support/inflector/methods" - - extension = Module.new do - def const_missing(missing_const_name) - if class_variable_defined?(:@@_deprecated_constants) - if (replacement = class_variable_get(:@@_deprecated_constants)[missing_const_name.to_s]) - replacement[:deprecator].warn(replacement[:message] || "#{name}::#{missing_const_name} is deprecated! Use #{replacement[:new]} instead.", caller_locations) - return ActiveSupport::Inflector.constantize(replacement[:new].to_s) - end - end - super - end - - # Provides a way to rename constants with a deprecation cycle in which - # both the old and new names work, but using the old one prints a - # deprecation message. - # - # In order to rename A::B to C::D, you need to delete the - # definition of A::B and declare the deprecation in +A+: - # - # require "active_support/deprecation" - # - # module A - # include ActiveSupport::Deprecation::DeprecatedConstantAccessor - # - # deprecate_constant "B", "C::D", deprecator: ActiveSupport::Deprecation.new - # end - # - # The first argument is a constant name (no colons). It is the name of - # the constant you want to deprecate in the enclosing class or module. - # - # The second argument is the constant path of the replacement. That - # has to be a full path even if the replacement is defined in the same - # namespace as the deprecated one was. - # - # In both cases, strings and symbols are supported. - # - # The +deprecator+ keyword argument is the object that will print the - # deprecation message, an instance of ActiveSupport::Deprecation. - # - # With that in place, references to A::B still work, they - # evaluate to C::D now, and trigger a deprecation warning: - # - # DEPRECATION WARNING: A::B is deprecated! Use C::D instead. - # (called from ...) - # - # The message can be customized with the optional +message+ keyword - # argument. - # - # For this to work, a +const_missing+ hook is installed. When client - # code references the deprecated constant, the callback prints the - # message and constantizes the replacement. - # - # Caveat: If the deprecated constant name is reachable in a different - # namespace and Ruby constant lookup finds it, the hook won't be - # called and the deprecation won't work as intended. This may happen, - # for example, if an ancestor of the enclosing namespace has a - # constant with the same name. This is an unsupported edge case. - def deprecate_constant(old_constant_name, new_constant_path, deprecator:, message: nil) - class_variable_set(:@@_deprecated_constants, {}) unless class_variable_defined?(:@@_deprecated_constants) - class_variable_get(:@@_deprecated_constants)[old_constant_name.to_s] = { new: new_constant_path, message: message, deprecator: deprecator } - end - end - base.singleton_class.prepend extension - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/deprecators.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/deprecators.rb deleted file mode 100644 index 08f3fae3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/deprecators.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - class Deprecation - # A managed collection of deprecators. Configuration methods, such as - # #behavior=, affect all deprecators in the collection. Additionally, the - # #silence method silences all deprecators in the collection for the - # duration of a given block. - class Deprecators - def initialize - @options = {} - @deprecators = {} - end - - # Returns a deprecator added to this collection via #[]=. - def [](name) - @deprecators[name] - end - - # Adds a given +deprecator+ to this collection. The deprecator will be - # immediately configured with any options previously set on this - # collection. - # - # deprecators = ActiveSupport::Deprecation::Deprecators.new - # deprecators.debug = true - # - # foo_deprecator = ActiveSupport::Deprecation.new("2.0", "Foo") - # foo_deprecator.debug # => false - # - # deprecators[:foo] = foo_deprecator - # deprecators[:foo].debug # => true - # foo_deprecator.debug # => true - # - def []=(name, deprecator) - apply_options(deprecator) - @deprecators[name] = deprecator - end - - # Iterates over all deprecators in this collection. If no block is given, - # returns an +Enumerator+. - def each(&block) - return to_enum(__method__) unless block - @deprecators.each_value(&block) - end - - # Sets the silenced flag for all deprecators in this collection. - def silenced=(silenced) - set_option(:silenced, silenced) - end - - # Sets the debug flag for all deprecators in this collection. - def debug=(debug) - set_option(:debug, debug) - end - - # Sets the deprecation warning behavior for all deprecators in this - # collection. - # - # See ActiveSupport::Deprecation#behavior=. - def behavior=(behavior) - set_option(:behavior, behavior) - end - - # Sets the disallowed deprecation warning behavior for all deprecators in - # this collection. - # - # See ActiveSupport::Deprecation#disallowed_behavior=. - def disallowed_behavior=(disallowed_behavior) - set_option(:disallowed_behavior, disallowed_behavior) - end - - # Sets the disallowed deprecation warnings for all deprecators in this - # collection. - # - # See ActiveSupport::Deprecation#disallowed_warnings=. - def disallowed_warnings=(disallowed_warnings) - set_option(:disallowed_warnings, disallowed_warnings) - end - - # Silences all deprecators in this collection for the duration of the - # given block. - # - # See ActiveSupport::Deprecation#silence. - def silence(&block) - each { |deprecator| deprecator.begin_silence } - block.call - ensure - each { |deprecator| deprecator.end_silence } - end - - private - def set_option(name, value) - @options[name] = value - each { |deprecator| deprecator.public_send("#{name}=", value) } - end - - def apply_options(deprecator) - @options.each do |name, value| - deprecator.public_send("#{name}=", value) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/disallowed.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/disallowed.rb deleted file mode 100644 index 85fdf5d3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/disallowed.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - class Deprecation - module Disallowed - # Sets the criteria used to identify deprecation messages which should be - # disallowed. Can be an array containing strings, symbols, or regular - # expressions. (Symbols are treated as strings.) These are compared against - # the text of the generated deprecation warning. - # - # Additionally the scalar symbol +:all+ may be used to treat all - # deprecations as disallowed. - # - # Deprecations matching a substring or regular expression will be handled - # using the configured Behavior#disallowed_behavior rather than - # Behavior#behavior. - attr_writer :disallowed_warnings - - # Returns the configured criteria used to identify deprecation messages - # which should be treated as disallowed. - def disallowed_warnings - @disallowed_warnings ||= [] - end - - private - def deprecation_disallowed?(message) - return false if explicitly_allowed?(message) - return true if disallowed_warnings == :all - message && disallowed_warnings.any? do |rule| - case rule - when String, Symbol - message.include?(rule.to_s) - when Regexp - rule.match?(message) - end - end - end - - def explicitly_allowed?(message) - allowances = @explicitly_allowed_warnings.value - return false unless allowances - return true if allowances == :all - message && Array(allowances).any? do |rule| - case rule - when String, Symbol - message.include?(rule.to_s) - when Regexp - rule.match?(message) - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/method_wrappers.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/method_wrappers.rb deleted file mode 100644 index 921168c9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/method_wrappers.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/module/redefine_method" - -module ActiveSupport - class Deprecation - module MethodWrapper - # Declare that a method has been deprecated. - # - # class Fred - # def aaa; end - # def bbb; end - # def ccc; end - # def ddd; end - # def eee; end - # end - # - # deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') - # - # deprecator.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') - # # => Fred - # - # Fred.new.aaa - # # DEPRECATION WARNING: aaa is deprecated and will be removed from MyGem next-release. (called from irb_binding at (irb):10) - # # => nil - # - # Fred.new.bbb - # # DEPRECATION WARNING: bbb is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):11) - # # => nil - # - # Fred.new.ccc - # # DEPRECATION WARNING: ccc is deprecated and will be removed from MyGem next-release (use Bar#ccc instead). (called from irb_binding at (irb):12) - # # => nil - def deprecate_methods(target_module, *method_names) - options = method_names.extract_options! - deprecator = options.delete(:deprecator) || self - method_names += options.keys - mod = nil - - method_names.each do |method_name| - message = options[method_name] - if target_module.method_defined?(method_name) || target_module.private_method_defined?(method_name) - method = target_module.instance_method(method_name) - target_module.module_eval do - redefine_method(method_name) do |*args, &block| - deprecator.deprecation_warning(method_name, message) - method.bind_call(self, *args, &block) - end - ruby2_keywords(method_name) - end - else - mod ||= Module.new - mod.module_eval do - define_method(method_name) do |*args, &block| - deprecator.deprecation_warning(method_name, message) - super(*args, &block) - end - ruby2_keywords(method_name) - end - end - end - - target_module.prepend(mod) if mod - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/proxy_wrappers.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/proxy_wrappers.rb deleted file mode 100644 index 80e4ab22..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/proxy_wrappers.rb +++ /dev/null @@ -1,189 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - class Deprecation - class DeprecationProxy # :nodoc: - def self.new(*args, **kwargs, &block) - object = args.first - - return object unless object - super - end - - instance_methods.each { |m| undef_method m unless /^__|^object_id$/.match?(m) } - - # Don't give a deprecation warning on inspect since test/unit and error - # logs rely on it for diagnostics. - def inspect - target.inspect - end - - private - def method_missing(called, *args, &block) - warn caller_locations, called, args - target.__send__(called, *args, &block) - end - end - - # DeprecatedObjectProxy transforms an object into a deprecated one. It takes an object, a deprecation message, and - # a deprecator. - # - # deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated", ActiveSupport::Deprecation.new) - # # => # - # - # deprecated_object.to_s - # DEPRECATION WARNING: This object is now deprecated. - # (Backtrace) - # # => "#" - class DeprecatedObjectProxy < DeprecationProxy - def initialize(object, message, deprecator) - @object = object - @message = message - @deprecator = deprecator - end - - private - def target - @object - end - - def warn(callstack, called, args) - @deprecator.warn(@message, callstack) - end - end - - # DeprecatedInstanceVariableProxy transforms an instance variable into a deprecated one. It takes an instance of a - # class, a method on that class, an instance variable, and a deprecator as the last argument. - # - # Trying to use the deprecated instance variable will result in a deprecation warning, pointing to the method as a - # replacement. - # - # class Example - # def initialize - # @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request, ActiveSupport::Deprecation.new) - # @_request = :special_request - # end - # - # def request - # @_request - # end - # - # def old_request - # @request - # end - # end - # - # example = Example.new - # # => # - # - # example.old_request.to_s - # # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of - # @request.to_s - # (Backtrace information…) - # "special_request" - # - # example.request.to_s - # # => "special_request" - class DeprecatedInstanceVariableProxy < DeprecationProxy - def initialize(instance, method, var = "@#{method}", deprecator:) - @instance = instance - @method = method - @var = var - @deprecator = deprecator - end - - private - def target - @instance.__send__(@method) - end - - def warn(callstack, called, args) - @deprecator.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", callstack) - end - end - - # DeprecatedConstantProxy transforms a constant into a deprecated one. It takes the full names of an old - # (deprecated) constant and of a new constant (both in string form) and a deprecator. The deprecated constant now - # returns the value of the new one. - # - # PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) - # - # # (In a later update, the original implementation of `PLANETS` has been removed.) - # - # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) - # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("PLANETS", "PLANETS_POST_2006", ActiveSupport::Deprecation.new) - # - # PLANETS.map { |planet| planet.capitalize } - # # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. - # (Backtrace information…) - # ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] - class DeprecatedConstantProxy < Module - def self.new(*args, **options, &block) - object = args.first - - return object unless object - super - end - - def initialize(old_const, new_const, deprecator, message: "#{old_const} is deprecated! Use #{new_const} instead.") - Kernel.require "active_support/inflector/methods" - - @old_const = old_const - @new_const = new_const - @deprecator = deprecator - @message = message - end - - instance_methods.each { |m| undef_method m unless /^__|^object_id$/.match?(m) } - - # Don't give a deprecation warning on inspect since test/unit and error - # logs rely on it for diagnostics. - def inspect - target.inspect - end - - # Don't give a deprecation warning on methods that IRB may invoke - # during tab-completion. - delegate :hash, :instance_methods, :name, :respond_to?, to: :target - - # Returns the class of the new constant. - # - # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) - # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') - # PLANETS.class # => Array - def class - target.class - end - - def append_features(base) - @deprecator.warn(@message, caller_locations) - base.include(target) - end - - def prepend_features(base) - @deprecator.warn(@message, caller_locations) - base.prepend(target) - end - - def extended(base) - @deprecator.warn(@message, caller_locations) - base.extend(target) - end - - private - def target - ActiveSupport::Inflector.constantize(@new_const.to_s) - end - - def const_missing(name) - @deprecator.warn(@message, caller_locations) - target.const_get(name) - end - - def method_missing(...) - @deprecator.warn(@message, caller_locations) - target.__send__(...) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/reporting.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/reporting.rb deleted file mode 100644 index 30a95a04..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/deprecation/reporting.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -require "rbconfig" - -module ActiveSupport - class Deprecation - module Reporting - # Whether to print a message (silent mode) - attr_writer :silenced - # Name of gem where method is deprecated - attr_accessor :gem_name - - # Outputs a deprecation warning to the output configured by - # ActiveSupport::Deprecation#behavior. - # - # ActiveSupport::Deprecation.new.warn('something broke!') - # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" - def warn(message = nil, callstack = nil) - return if silenced - - callstack ||= caller_locations(2) - deprecation_message(callstack, message).tap do |full_message| - if deprecation_disallowed?(message) - disallowed_behavior.each { |b| b.call(full_message, callstack, self) } - else - behavior.each { |b| b.call(full_message, callstack, self) } - end - end - end - - # Silence deprecation warnings within the block. - # - # deprecator = ActiveSupport::Deprecation.new - # deprecator.warn('something broke!') - # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" - # - # deprecator.silence do - # deprecator.warn('something broke!') - # end - # # => nil - def silence(&block) - begin_silence - block.call - ensure - end_silence - end - - def begin_silence # :nodoc: - @silence_counter.value += 1 - end - - def end_silence # :nodoc: - @silence_counter.value -= 1 - end - - def silenced - @silenced || @silence_counter.value.nonzero? - end - - # Allow previously disallowed deprecation warnings within the block. - # allowed_warnings can be an array containing strings, symbols, or regular - # expressions. (Symbols are treated as strings). These are compared against - # the text of deprecation warning messages generated within the block. - # Matching warnings will be exempt from the rules set by - # ActiveSupport::Deprecation#disallowed_warnings. - # - # The optional if: argument accepts a truthy/falsy value or an object that - # responds to .call. If truthy, then matching warnings will be allowed. - # If falsey then the method yields to the block without allowing the warning. - # - # deprecator = ActiveSupport::Deprecation.new - # deprecator.disallowed_behavior = :raise - # deprecator.disallowed_warnings = [ - # "something broke" - # ] - # - # deprecator.warn('something broke!') - # # => ActiveSupport::DeprecationException - # - # deprecator.allow ['something broke'] do - # deprecator.warn('something broke!') - # end - # # => nil - # - # deprecator.allow ['something broke'], if: Rails.env.production? do - # deprecator.warn('something broke!') - # end - # # => ActiveSupport::DeprecationException for dev/test, nil for production - def allow(allowed_warnings = :all, if: true, &block) - conditional = binding.local_variable_get(:if) - conditional = conditional.call if conditional.respond_to?(:call) - if conditional - @explicitly_allowed_warnings.bind(allowed_warnings, &block) - else - yield - end - end - - def deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil) - caller_backtrace ||= caller_locations(2) - deprecated_method_warning(deprecated_method_name, message).tap do |msg| - warn(msg, caller_backtrace) - end - end - - private - # Outputs a deprecation warning message - # - # deprecated_method_warning(:method_name) - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon}" - # deprecated_method_warning(:method_name, :another_method) - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (use another_method instead)" - # deprecated_method_warning(:method_name, "Optional message") - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)" - def deprecated_method_warning(method_name, message = nil) - warning = "#{method_name} is deprecated and will be removed from #{gem_name} #{deprecation_horizon}" - case message - when Symbol then "#{warning} (use #{message} instead)" - when String then "#{warning} (#{message})" - else warning - end - end - - def deprecation_message(callstack, message = nil) - message ||= "You are using deprecated behavior which will be removed from the next major or minor release." - "DEPRECATION WARNING: #{message} #{deprecation_caller_message(callstack)}" - end - - def deprecation_caller_message(callstack) - file, line, method = extract_callstack(callstack) - if file - if line && method - "(called from #{method} at #{file}:#{line})" - else - "(called from #{file}:#{line})" - end - end - end - - def extract_callstack(callstack) - return [] if callstack.empty? - - offending_line = callstack.find { |frame| - # Code generated with `eval` doesn't have an `absolute_path`, e.g. templates. - path = frame.absolute_path || frame.path - path && !ignored_callstack?(path) - } || callstack.first - - [offending_line.path, offending_line.lineno, offending_line.label] - end - - RAILS_GEM_ROOT = File.expand_path("../../../..", __dir__) + "/" # :nodoc: - LIB_DIR = RbConfig::CONFIG["libdir"] # :nodoc: - - def ignored_callstack?(path) - path.start_with?(RAILS_GEM_ROOT, LIB_DIR) || path.include?("(other) - if Scalar === other || Duration === other - value <=> other.value - elsif Numeric === other - value <=> other - else - nil - end - end - - def +(other) - if Duration === other - seconds = value + other._parts.fetch(:seconds, 0) - new_parts = other._parts.merge(seconds: seconds) - new_value = value + other.value - - Duration.new(new_value, new_parts, other.variable?) - else - calculate(:+, other) - end - end - - def -(other) - if Duration === other - seconds = value - other._parts.fetch(:seconds, 0) - new_parts = other._parts.transform_values(&:-@) - new_parts = new_parts.merge(seconds: seconds) - new_value = value - other.value - - Duration.new(new_value, new_parts, other.variable?) - else - calculate(:-, other) - end - end - - def *(other) - if Duration === other - new_parts = other._parts.transform_values { |other_value| value * other_value } - new_value = value * other.value - - Duration.new(new_value, new_parts, other.variable?) - else - calculate(:*, other) - end - end - - def /(other) - if Duration === other - value / other.value - else - calculate(:/, other) - end - end - - def %(other) - if Duration === other - Duration.build(value % other.value) - else - calculate(:%, other) - end - end - - def variable? # :nodoc: - false - end - - private - def calculate(op, other) - if Scalar === other - Scalar.new(value.public_send(op, other.value)) - elsif Numeric === other - Scalar.new(value.public_send(op, other)) - else - raise_type_error(other) - end - end - - def raise_type_error(other) - raise TypeError, "no implicit conversion of #{other.class} into #{self.class}" - end - end - - SECONDS_PER_MINUTE = 60 - SECONDS_PER_HOUR = 3600 - SECONDS_PER_DAY = 86400 - SECONDS_PER_WEEK = 604800 - SECONDS_PER_MONTH = 2629746 # 1/12 of a gregorian year - SECONDS_PER_YEAR = 31556952 # length of a gregorian year (365.2425 days) - - PARTS_IN_SECONDS = { - seconds: 1, - minutes: SECONDS_PER_MINUTE, - hours: SECONDS_PER_HOUR, - days: SECONDS_PER_DAY, - weeks: SECONDS_PER_WEEK, - months: SECONDS_PER_MONTH, - years: SECONDS_PER_YEAR - }.freeze - - PARTS = [:years, :months, :weeks, :days, :hours, :minutes, :seconds].freeze - VARIABLE_PARTS = [:years, :months, :weeks, :days].freeze - - attr_reader :value - - autoload :ISO8601Parser, "active_support/duration/iso8601_parser" - autoload :ISO8601Serializer, "active_support/duration/iso8601_serializer" - - class << self - # Creates a new Duration from string formatted according to ISO 8601 Duration. - # - # See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. - # This method allows negative parts to be present in pattern. - # If invalid string is provided, it will raise +ActiveSupport::Duration::ISO8601Parser::ParsingError+. - def parse(iso8601duration) - parts = ISO8601Parser.new(iso8601duration).parse! - new(calculate_total_seconds(parts), parts) - end - - def ===(other) # :nodoc: - other.is_a?(Duration) - rescue ::NoMethodError - false - end - - def seconds(value) # :nodoc: - new(value, { seconds: value }, false) - end - - def minutes(value) # :nodoc: - new(value * SECONDS_PER_MINUTE, { minutes: value }, false) - end - - def hours(value) # :nodoc: - new(value * SECONDS_PER_HOUR, { hours: value }, false) - end - - def days(value) # :nodoc: - new(value * SECONDS_PER_DAY, { days: value }, true) - end - - def weeks(value) # :nodoc: - new(value * SECONDS_PER_WEEK, { weeks: value }, true) - end - - def months(value) # :nodoc: - new(value * SECONDS_PER_MONTH, { months: value }, true) - end - - def years(value) # :nodoc: - new(value * SECONDS_PER_YEAR, { years: value }, true) - end - - # Creates a new Duration from a seconds value that is converted - # to the individual parts: - # - # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} - # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} - # - def build(value) - unless value.is_a?(::Numeric) - raise TypeError, "can't build an #{self.name} from a #{value.class.name}" - end - - parts = {} - remainder_sign = value <=> 0 - remainder = value.round(9).abs - variable = false - - PARTS.each do |part| - unless part == :seconds - part_in_seconds = PARTS_IN_SECONDS[part] - parts[part] = remainder.div(part_in_seconds) * remainder_sign - remainder %= part_in_seconds - - unless parts[part].zero? - variable ||= VARIABLE_PARTS.include?(part) - end - end - end unless value == 0 - - parts[:seconds] = remainder * remainder_sign - - new(value, parts, variable) - end - - private - def calculate_total_seconds(parts) - parts.inject(0) do |total, (part, value)| - total + value * PARTS_IN_SECONDS[part] - end - end - end - - Delegation.generate(self, [:to_f, :positive?, :negative?, :zero?, :abs], to: :@value, as: Integer, nilable: false) - - def initialize(value, parts, variable = nil) # :nodoc: - @value, @parts = value, parts - @parts.reject! { |k, v| v.zero? } unless value == 0 - @parts.freeze - @variable = variable - - if @variable.nil? - @variable = @parts.any? { |part, _| VARIABLE_PARTS.include?(part) } - end - end - - # Returns a copy of the parts hash that defines the duration. - # - # 5.minutes.parts # => {:minutes=>5} - # 3.years.parts # => {:years=>3} - def parts - @parts.dup - end - - def coerce(other) # :nodoc: - case other - when Scalar - [other, self] - when Duration - [Scalar.new(other.value), self] - else - [Scalar.new(other), self] - end - end - - # Compares one Duration with another or a Numeric to this Duration. - # Numeric values are treated as seconds. - def <=>(other) - if Duration === other - value <=> other.value - elsif Numeric === other - value <=> other - end - end - - # Adds another Duration or a Numeric to this Duration. Numeric values - # are treated as seconds. - def +(other) - if Duration === other - parts = @parts.merge(other._parts) do |_key, value, other_value| - value + other_value - end - Duration.new(value + other.value, parts, @variable || other.variable?) - else - seconds = @parts.fetch(:seconds, 0) + other - Duration.new(value + other, @parts.merge(seconds: seconds), @variable) - end - end - - # Subtracts another Duration or a Numeric from this Duration. Numeric - # values are treated as seconds. - def -(other) - self + (-other) - end - - # Multiplies this Duration by a Numeric and returns a new Duration. - def *(other) - if Scalar === other || Duration === other - Duration.new(value * other.value, @parts.transform_values { |number| number * other.value }, @variable || other.variable?) - elsif Numeric === other - Duration.new(value * other, @parts.transform_values { |number| number * other }, @variable) - else - raise_type_error(other) - end - end - - # Divides this Duration by a Numeric and returns a new Duration. - def /(other) - if Scalar === other - Duration.new(value / other.value, @parts.transform_values { |number| number / other.value }, @variable) - elsif Duration === other - value / other.value - elsif Numeric === other - Duration.new(value / other, @parts.transform_values { |number| number / other }, @variable) - else - raise_type_error(other) - end - end - - # Returns the modulo of this Duration by another Duration or Numeric. - # Numeric values are treated as seconds. - def %(other) - if Duration === other || Scalar === other - Duration.build(value % other.value) - elsif Numeric === other - Duration.build(value % other) - else - raise_type_error(other) - end - end - - def -@ # :nodoc: - Duration.new(-value, @parts.transform_values(&:-@), @variable) - end - - def +@ # :nodoc: - self - end - - def is_a?(klass) # :nodoc: - Duration == klass || value.is_a?(klass) - end - alias :kind_of? :is_a? - - def instance_of?(klass) # :nodoc: - Duration == klass || value.instance_of?(klass) - end - - # Returns +true+ if +other+ is also a Duration instance with the - # same +value+, or if other == value. - def ==(other) - if Duration === other - other.value == value - else - other == value - end - end - - # Returns the amount of seconds a duration covers as a string. - # For more information check to_i method. - # - # 1.day.to_s # => "86400" - def to_s - @value.to_s - end - - # Returns the number of seconds that this Duration represents. - # - # 1.minute.to_i # => 60 - # 1.hour.to_i # => 3600 - # 1.day.to_i # => 86400 - # - # Note that this conversion makes some assumptions about the - # duration of some periods, e.g. months are always 1/12 of year - # and years are 365.2425 days: - # - # # equivalent to (1.year / 12).to_i - # 1.month.to_i # => 2629746 - # - # # equivalent to 365.2425.days.to_i - # 1.year.to_i # => 31556952 - # - # In such cases, Ruby's core - # Date[https://docs.ruby-lang.org/en/master/Date.html] and - # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision - # date and time arithmetic. - def to_i - @value.to_i - end - alias :in_seconds :to_i - - # Returns the amount of minutes a duration covers as a float - # - # 1.day.in_minutes # => 1440.0 - def in_minutes - in_seconds / SECONDS_PER_MINUTE.to_f - end - - # Returns the amount of hours a duration covers as a float - # - # 1.day.in_hours # => 24.0 - def in_hours - in_seconds / SECONDS_PER_HOUR.to_f - end - - # Returns the amount of days a duration covers as a float - # - # 12.hours.in_days # => 0.5 - def in_days - in_seconds / SECONDS_PER_DAY.to_f - end - - # Returns the amount of weeks a duration covers as a float - # - # 2.months.in_weeks # => 8.696 - def in_weeks - in_seconds / SECONDS_PER_WEEK.to_f - end - - # Returns the amount of months a duration covers as a float - # - # 9.weeks.in_months # => 2.07 - def in_months - in_seconds / SECONDS_PER_MONTH.to_f - end - - # Returns the amount of years a duration covers as a float - # - # 30.days.in_years # => 0.082 - def in_years - in_seconds / SECONDS_PER_YEAR.to_f - end - - # Returns +true+ if +other+ is also a Duration instance, which has the - # same parts as this one. - def eql?(other) - Duration === other && other.value.eql?(value) - end - - def hash - @value.hash - end - - # Calculates a new Time or Date that is as far in the future - # as this Duration represents. - def since(time = ::Time.current) - sum(1, time) - end - alias :from_now :since - alias :after :since - - # Calculates a new Time or Date that is as far in the past - # as this Duration represents. - def ago(time = ::Time.current) - sum(-1, time) - end - alias :until :ago - alias :before :ago - - def inspect # :nodoc: - return "#{value} seconds" if @parts.empty? - - @parts. - sort_by { |unit, _ | PARTS.index(unit) }. - map { |unit, val| "#{val} #{val == 1 ? unit.to_s.chop : unit.to_s}" }. - to_sentence(locale: false) - end - - def as_json(options = nil) # :nodoc: - to_i - end - - def init_with(coder) # :nodoc: - initialize(coder["value"], coder["parts"]) - end - - def encode_with(coder) # :nodoc: - coder.map = { "value" => @value, "parts" => @parts } - end - - # Build ISO 8601 Duration string for this duration. - # The +precision+ parameter can be used to limit seconds' precision of duration. - def iso8601(precision: nil) - ISO8601Serializer.new(self, precision: precision).serialize - end - - def variable? # :nodoc: - @variable - end - - def _parts # :nodoc: - @parts - end - - private - def sum(sign, time = ::Time.current) - unless time.acts_like?(:time) || time.acts_like?(:date) - raise ::ArgumentError, "expected a time or date, got #{time.inspect}" - end - - if @parts.empty? - time.since(sign * value) - else - @parts.each do |type, number| - t = time - time = - if type == :seconds - t.since(sign * number) - elsif type == :minutes - t.since(sign * number * 60) - elsif type == :hours - t.since(sign * number * 3600) - else - t.advance(type => sign * number) - end - end - - time - end - end - - def respond_to_missing?(method, _) - value.respond_to?(method) - end - - def method_missing(...) - value.public_send(...) - end - - def raise_type_error(other) - raise TypeError, "no implicit conversion of #{other.class} into #{self.class}" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/duration/iso8601_parser.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/duration/iso8601_parser.rb deleted file mode 100644 index 8ccd0cf4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/duration/iso8601_parser.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -require "strscan" - -module ActiveSupport - class Duration - # Parses a string formatted according to ISO 8601 Duration into the hash. - # - # See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. - # - # This parser allows negative parts to be present in pattern. - class ISO8601Parser # :nodoc: - class ParsingError < ::ArgumentError; end - - PERIOD_OR_COMMA = /\.|,/ - PERIOD = "." - COMMA = "," - - SIGN_MARKER = /\A-|\+|/ - DATE_MARKER = /P/ - TIME_MARKER = /T/ - DATE_COMPONENT = /(-?\d+(?:[.,]\d+)?)(Y|M|D|W)/ - TIME_COMPONENT = /(-?\d+(?:[.,]\d+)?)(H|M|S)/ - - DATE_TO_PART = { "Y" => :years, "M" => :months, "W" => :weeks, "D" => :days } - TIME_TO_PART = { "H" => :hours, "M" => :minutes, "S" => :seconds } - - DATE_COMPONENTS = [:years, :months, :days] - TIME_COMPONENTS = [:hours, :minutes, :seconds] - - attr_reader :parts, :scanner - attr_accessor :mode, :sign - - def initialize(string) - @scanner = StringScanner.new(string) - @parts = {} - @mode = :start - @sign = 1 - end - - def parse! - while !finished? - case mode - when :start - if scan(SIGN_MARKER) - self.sign = (scanner.matched == "-") ? -1 : 1 - self.mode = :sign - else - raise_parsing_error - end - - when :sign - if scan(DATE_MARKER) - self.mode = :date - else - raise_parsing_error - end - - when :date - if scan(TIME_MARKER) - self.mode = :time - elsif scan(DATE_COMPONENT) - parts[DATE_TO_PART[scanner[2]]] = number * sign - else - raise_parsing_error - end - - when :time - if scan(TIME_COMPONENT) - parts[TIME_TO_PART[scanner[2]]] = number * sign - else - raise_parsing_error - end - - end - end - - validate! - parts - end - - private - def finished? - scanner.eos? - end - - # Parses number which can be a float with either comma or period. - def number - PERIOD_OR_COMMA.match?(scanner[1]) ? scanner[1].tr(COMMA, PERIOD).to_f : scanner[1].to_i - end - - def scan(pattern) - scanner.scan(pattern) - end - - def raise_parsing_error(reason = nil) - raise ParsingError, "Invalid ISO 8601 duration: #{scanner.string.inspect} #{reason}".strip - end - - # Checks for various semantic errors as stated in ISO 8601 standard. - def validate! - raise_parsing_error("is empty duration") if parts.empty? - - # Mixing any of Y, M, D with W is invalid. - if parts.key?(:weeks) && parts.keys.intersect?(DATE_COMPONENTS) - raise_parsing_error("mixing weeks with other date parts not allowed") - end - - # Specifying an empty T part is invalid. - if mode == :time && !parts.keys.intersect?(TIME_COMPONENTS) - raise_parsing_error("time part marker is present but time part is empty") - end - - fractions = parts.values.reject(&:zero?).select { |a| (a % 1) != 0 } - unless fractions.empty? || (fractions.size == 1 && fractions.last == @parts.values.reject(&:zero?).last) - raise_parsing_error "(only last part can be fractional)" - end - - true - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/duration/iso8601_serializer.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/duration/iso8601_serializer.rb deleted file mode 100644 index ca9c9129..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/duration/iso8601_serializer.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - class Duration - # Serializes duration to string according to ISO 8601 Duration format. - class ISO8601Serializer # :nodoc: - DATE_COMPONENTS = %i(years months days) - - def initialize(duration, precision: nil) - @duration = duration - @precision = precision - end - - # Builds and returns output string. - def serialize - parts = normalize - return "PT0S" if parts.empty? - - output = +"P" - output << "#{parts[:years]}Y" if parts.key?(:years) - output << "#{parts[:months]}M" if parts.key?(:months) - output << "#{parts[:days]}D" if parts.key?(:days) - output << "#{parts[:weeks]}W" if parts.key?(:weeks) - time = +"" - time << "#{parts[:hours]}H" if parts.key?(:hours) - time << "#{parts[:minutes]}M" if parts.key?(:minutes) - if parts.key?(:seconds) - time << "#{format_seconds(parts[:seconds])}S" - end - output << "T#{time}" unless time.empty? - output - end - - private - # Return pair of duration's parts and whole duration sign. - # Parts are summarized (as they can become repetitive due to addition, etc). - # Zero parts are removed as not significant. - def normalize - parts = @duration.parts.each_with_object(Hash.new(0)) do |(k, v), p| - p[k] += v unless v.zero? - end - - # Convert weeks to days and remove weeks if mixed with date parts - if week_mixed_with_date?(parts) - parts[:days] += parts.delete(:weeks) * SECONDS_PER_WEEK / SECONDS_PER_DAY - end - - parts - end - - def week_mixed_with_date?(parts) - parts.key?(:weeks) && parts.keys.intersect?(DATE_COMPONENTS) - end - - def format_seconds(seconds) - if @precision - sprintf("%0.0#{@precision}f", seconds) - else - seconds.to_s - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/encrypted_configuration.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/encrypted_configuration.rb deleted file mode 100644 index 39c7636d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/encrypted_configuration.rb +++ /dev/null @@ -1,126 +0,0 @@ -# frozen_string_literal: true - -require "yaml" -require "active_support/encrypted_file" -require "active_support/ordered_options" -require "active_support/core_ext/object/inclusion" -require "active_support/core_ext/hash/keys" -require "active_support/core_ext/module/delegation" - -module ActiveSupport - # = Encrypted Configuration - # - # Provides convenience methods on top of EncryptedFile to access values stored - # as encrypted YAML. - # - # Values can be accessed via +Hash+ methods, such as +fetch+ and +dig+, or via - # dynamic accessor methods, similar to OrderedOptions. - # - # my_config = ActiveSupport::EncryptedConfiguration.new(...) - # my_config.read # => "some_secret: 123\nsome_namespace:\n another_secret: 456" - # - # my_config[:some_secret] - # # => 123 - # my_config.some_secret - # # => 123 - # my_config.dig(:some_namespace, :another_secret) - # # => 456 - # my_config.some_namespace.another_secret - # # => 456 - # my_config.fetch(:foo) - # # => KeyError - # my_config.foo! - # # => KeyError - # - class EncryptedConfiguration < EncryptedFile - class InvalidContentError < RuntimeError - def initialize(content_path) - super "Invalid YAML in '#{content_path}'." - end - - def message - cause.is_a?(Psych::SyntaxError) ? "#{super}\n\n #{cause.message}" : super - end - end - - class InvalidKeyError < RuntimeError - def initialize(content_path, key) - super "Key '#{key}' is invalid, it must respond to '#to_sym' from configuration in '#{content_path}'." - end - end - - delegate_missing_to :options - - def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:) - super content_path: config_path, key_path: key_path, - env_key: env_key, raise_if_missing_key: raise_if_missing_key - @config = nil - @options = nil - end - - # Reads the file and returns the decrypted content. See EncryptedFile#read. - def read - super - rescue ActiveSupport::EncryptedFile::MissingContentError - # Allow a config to be started without a file present - "" - end - - def validate! # :nodoc: - deserialize(read).each_key do |key| - key.to_sym - rescue NoMethodError - raise InvalidKeyError.new(content_path, key) - end - end - - # Returns the decrypted content as a Hash with symbolized keys. - # - # my_config = ActiveSupport::EncryptedConfiguration.new(...) - # my_config.read # => "some_secret: 123\nsome_namespace:\n another_secret: 456" - # - # my_config.config - # # => { some_secret: 123, some_namespace: { another_secret: 789 } } - # - def config - @config ||= deep_symbolize_keys(deserialize(read)) - end - - def inspect # :nodoc: - "#<#{self.class.name}:#{'%#016x' % (object_id << 1)}>" - end - - private - def deep_symbolize_keys(hash) - hash.deep_transform_keys do |key| - key.to_sym - rescue NoMethodError - raise InvalidKeyError.new(content_path, key) - end - end - - def deep_transform(hash) - return hash unless hash.is_a?(Hash) - - h = ActiveSupport::OrderedOptions.new - hash.each do |k, v| - h[k] = deep_transform(v) - end - h - end - - def options - @options ||= deep_transform(config) - end - - def deserialize(content) - config = YAML.respond_to?(:unsafe_load) ? - YAML.unsafe_load(content, filename: content_path) : - YAML.load(content, filename: content_path) - - config.presence || {} - rescue Psych::SyntaxError - raise InvalidContentError.new(content_path) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/encrypted_file.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/encrypted_file.rb deleted file mode 100644 index 6522e00e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/encrypted_file.rb +++ /dev/null @@ -1,133 +0,0 @@ -# frozen_string_literal: true - -require "pathname" -require "tempfile" -require "active_support/message_encryptor" - -module ActiveSupport - class EncryptedFile - class MissingContentError < RuntimeError - def initialize(content_path) - super "Missing encrypted content file in #{content_path}." - end - end - - class MissingKeyError < RuntimeError - def initialize(key_path:, env_key:) - super \ - "Missing encryption key to decrypt file with. " + - "Ask your team for your master key and write it to #{key_path} or put it in the ENV['#{env_key}']." - end - end - - class InvalidKeyLengthError < RuntimeError - def initialize - super "Encryption key must be exactly #{EncryptedFile.expected_key_length} characters." - end - end - - CIPHER = "aes-128-gcm" - - def self.generate_key - SecureRandom.hex(ActiveSupport::MessageEncryptor.key_len(CIPHER)) - end - - def self.expected_key_length # :nodoc: - @expected_key_length ||= generate_key.length - end - - - attr_reader :content_path, :key_path, :env_key, :raise_if_missing_key - - def initialize(content_path:, key_path:, env_key:, raise_if_missing_key:) - @content_path = Pathname.new(content_path).yield_self { |path| path.symlink? ? path.realpath : path } - @key_path = Pathname.new(key_path) - @env_key, @raise_if_missing_key = env_key, raise_if_missing_key - end - - # Returns the encryption key, first trying the environment variable - # specified by +env_key+, then trying the key file specified by +key_path+. - # If +raise_if_missing_key+ is true, raises MissingKeyError if the - # environment variable is not set and the key file does not exist. - def key - read_env_key || read_key_file || handle_missing_key - end - - # Returns truthy if #key is truthy. Returns falsy otherwise. Unlike #key, - # does not raise MissingKeyError when +raise_if_missing_key+ is true. - def key? - read_env_key || read_key_file - end - - # Reads the file and returns the decrypted content. - # - # Raises: - # - MissingKeyError if the key is missing and +raise_if_missing_key+ is true. - # - MissingContentError if the encrypted file does not exist or otherwise - # if the key is missing. - # - ActiveSupport::MessageEncryptor::InvalidMessage if the content cannot be - # decrypted or verified. - def read - if !key.nil? && content_path.exist? - decrypt content_path.binread.strip - else - raise MissingContentError, content_path - end - end - - def write(contents) - IO.binwrite "#{content_path}.tmp", encrypt(contents) - FileUtils.mv "#{content_path}.tmp", content_path - end - - def change(&block) - writing read, &block - end - - - private - def writing(contents) - Tempfile.create(["", "-" + content_path.basename.to_s.chomp(".enc")]) do |tmp_file| - tmp_path = Pathname.new(tmp_file) - tmp_path.binwrite contents - - yield tmp_path - - updated_contents = tmp_path.binread - - write(updated_contents) if updated_contents != contents - end - end - - - def encrypt(contents) - check_key_length - encryptor.encrypt_and_sign contents - end - - def decrypt(contents) - encryptor.decrypt_and_verify contents - end - - def encryptor - @encryptor ||= ActiveSupport::MessageEncryptor.new([ key ].pack("H*"), cipher: CIPHER, serializer: Marshal) - end - - - def read_env_key - ENV[env_key].presence - end - - def read_key_file - @key_file_contents ||= (key_path.binread.strip if key_path.exist?) - end - - def handle_missing_key - raise MissingKeyError.new(key_path: key_path, env_key: env_key) if raise_if_missing_key - end - - def check_key_length - raise InvalidKeyLengthError if key&.length != self.class.expected_key_length - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/environment_inquirer.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/environment_inquirer.rb deleted file mode 100644 index 6fa4fa1d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/environment_inquirer.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -require "active_support/string_inquirer" -require "active_support/core_ext/object/inclusion" - -module ActiveSupport - class EnvironmentInquirer < StringInquirer # :nodoc: - # Optimization for the three default environments, so this inquirer doesn't need to rely on - # the slower delegation through method_missing that StringInquirer would normally entail. - DEFAULT_ENVIRONMENTS = %w[ development test production ] - - # Environments that'll respond true for #local? - LOCAL_ENVIRONMENTS = %w[ development test ] - - def initialize(env) - raise(ArgumentError, "'local' is a reserved environment name") if env == "local" - - super(env) - - DEFAULT_ENVIRONMENTS.each do |default| - instance_variable_set :"@#{default}", env == default - end - - @local = in? LOCAL_ENVIRONMENTS - end - - DEFAULT_ENVIRONMENTS.each do |env| - class_eval <<~RUBY, __FILE__, __LINE__ + 1 - def #{env}? - @#{env} - end - RUBY - end - - # Returns true if we're in the development or test environment. - def local? - @local - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/error_reporter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/error_reporter.rb deleted file mode 100644 index 12ef41c8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/error_reporter.rb +++ /dev/null @@ -1,274 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # = Active Support \Error Reporter - # - # +ActiveSupport::ErrorReporter+ is a common interface for error reporting services. - # - # To rescue and report any unhandled error, you can use the #handle method: - # - # Rails.error.handle do - # do_something! - # end - # - # If an error is raised, it will be reported and swallowed. - # - # Alternatively, if you want to report the error but not swallow it, you can use #record: - # - # Rails.error.record do - # do_something! - # end - # - # Both methods can be restricted to handle only a specific error class: - # - # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } - # - class ErrorReporter - SEVERITIES = %i(error warning info) - DEFAULT_SOURCE = "application" - DEFAULT_RESCUE = [StandardError].freeze - - attr_accessor :logger, :debug_mode - - UnexpectedError = Class.new(Exception) - - def initialize(*subscribers, logger: nil) - @subscribers = subscribers.flatten - @logger = logger - @debug_mode = false - end - - # Evaluates the given block, reporting and swallowing any unhandled error. - # If no error is raised, returns the return value of the block. Otherwise, - # returns the result of +fallback.call+, or +nil+ if +fallback+ is not - # specified. - # - # # Will report a TypeError to all subscribers and return nil. - # Rails.error.handle do - # 1 + '1' - # end - # - # Can be restricted to handle only specific error classes: - # - # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } - # - # ==== Options - # - # * +:severity+ - This value is passed along to subscribers to indicate how - # important the error report is. Can be +:error+, +:warning+, or +:info+. - # Defaults to +:warning+. - # - # * +:context+ - Extra information that is passed along to subscribers. For - # example: - # - # Rails.error.handle(context: { section: "admin" }) do - # # ... - # end - # - # * +:fallback+ - A callable that provides +handle+'s return value when an - # unhandled error is raised. For example: - # - # user = Rails.error.handle(fallback: -> { User.anonymous }) do - # User.find_by(params) - # end - # - # * +:source+ - This value is passed along to subscribers to indicate the - # source of the error. Subscribers can use this value to ignore certain - # errors. Defaults to "application". - def handle(*error_classes, severity: :warning, context: {}, fallback: nil, source: DEFAULT_SOURCE) - error_classes = DEFAULT_RESCUE if error_classes.empty? - yield - rescue *error_classes => error - report(error, handled: true, severity: severity, context: context, source: source) - fallback.call if fallback - end - - # Evaluates the given block, reporting and re-raising any unhandled error. - # If no error is raised, returns the return value of the block. - # - # # Will report a TypeError to all subscribers and re-raise it. - # Rails.error.record do - # 1 + '1' - # end - # - # Can be restricted to handle only specific error classes: - # - # tags = Rails.error.record(Redis::BaseError) { redis.get("tags") } - # - # ==== Options - # - # * +:severity+ - This value is passed along to subscribers to indicate how - # important the error report is. Can be +:error+, +:warning+, or +:info+. - # Defaults to +:error+. - # - # * +:context+ - Extra information that is passed along to subscribers. For - # example: - # - # Rails.error.record(context: { section: "admin" }) do - # # ... - # end - # - # * +:source+ - This value is passed along to subscribers to indicate the - # source of the error. Subscribers can use this value to ignore certain - # errors. Defaults to "application". - def record(*error_classes, severity: :error, context: {}, source: DEFAULT_SOURCE) - error_classes = DEFAULT_RESCUE if error_classes.empty? - yield - rescue *error_classes => error - report(error, handled: false, severity: severity, context: context, source: source) - raise - end - - # Either report the given error when in production, or raise it when in development or test. - # - # When called in production, after the error is reported, this method will return - # nil and execution will continue. - # - # When called in development, the original error is wrapped in a different error class to ensure - # it's not being rescued higher in the stack and will be surfaced to the developer. - # - # This method is intended for reporting violated assertions about preconditions, or similar - # cases that can and should be gracefully handled in production, but that aren't supposed to happen. - # - # The error can be either an exception instance or a String. - # - # example: - # - # def edit - # if published? - # Rails.error.unexpected("[BUG] Attempting to edit a published article, that shouldn't be possible") - # return false - # end - # # ... - # end - # - def unexpected(error, severity: :warning, context: {}, source: DEFAULT_SOURCE) - error = RuntimeError.new(error) if error.is_a?(String) - - if @debug_mode - ensure_backtrace(error) - raise UnexpectedError, "#{error.class.name}: #{error.message}", error.backtrace, cause: error - else - report(error, handled: true, severity: severity, context: context, source: source) - end - end - - # Register a new error subscriber. The subscriber must respond to - # - # report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String) - # - # The +report+ method should never raise an error. - def subscribe(subscriber) - unless subscriber.respond_to?(:report) - raise ArgumentError, "Error subscribers must respond to #report" - end - @subscribers << subscriber - end - - # Unregister an error subscriber. Accepts either a subscriber or a class. - # - # subscriber = MyErrorSubscriber.new - # Rails.error.subscribe(subscriber) - # - # Rails.error.unsubscribe(subscriber) - # # or - # Rails.error.unsubscribe(MyErrorSubscriber) - def unsubscribe(subscriber) - @subscribers.delete_if { |s| subscriber === s } - end - - # Prevent a subscriber from being notified of errors for the - # duration of the block. You may pass in the subscriber itself, or its class. - # - # This can be helpful for error reporting service integrations, when they wish - # to handle any errors higher in the stack. - def disable(subscriber) - disabled_subscribers = (ActiveSupport::IsolatedExecutionState[self] ||= []) - disabled_subscribers << subscriber - begin - yield - ensure - disabled_subscribers.delete(subscriber) - end - end - - # Update the execution context that is accessible to error subscribers. Any - # context passed to #handle, #record, or #report will be merged with the - # context set here. - # - # Rails.error.set_context(section: "checkout", user_id: @user.id) - # - def set_context(...) - ActiveSupport::ExecutionContext.set(...) - end - - # Report an error directly to subscribers. You can use this method when the - # block-based #handle and #record methods are not suitable. - # - # Rails.error.report(error) - # - # The +error+ argument must be an instance of Exception. - # - # Rails.error.report(Exception.new("Something went wrong")) - # - # Otherwise you can use #unexpected to report an error which does accept a - # string argument. - def report(error, handled: true, severity: handled ? :warning : :error, context: {}, source: DEFAULT_SOURCE) - return if error.instance_variable_defined?(:@__rails_error_reported) - ensure_backtrace(error) - - unless SEVERITIES.include?(severity) - raise ArgumentError, "severity must be one of #{SEVERITIES.map(&:inspect).join(", ")}, got: #{severity.inspect}" - end - - full_context = ActiveSupport::ExecutionContext.to_h.merge(context) - disabled_subscribers = ActiveSupport::IsolatedExecutionState[self] - @subscribers.each do |subscriber| - unless disabled_subscribers&.any? { |s| s === subscriber } - subscriber.report(error, handled: handled, severity: severity, context: full_context, source: source) - end - rescue => subscriber_error - if logger - logger.fatal( - "Error subscriber raised an error: #{subscriber_error.message} (#{subscriber_error.class})\n" + - subscriber_error.backtrace.join("\n") - ) - else - raise - end - end - - while error - unless error.frozen? - error.instance_variable_set(:@__rails_error_reported, true) - end - error = error.cause - end - - nil - end - - private - def ensure_backtrace(error) - return if error.frozen? # re-raising won't add a backtrace - return unless error.backtrace.nil? - - begin - # We could use Exception#set_backtrace, but until Ruby 3.4 - # it only support setting `Exception#backtrace` and not - # `Exception#backtrace_locations`. So raising the exception - # is a good way to build a real backtrace. - raise error - rescue error.class => error - end - - count = 0 - while error.backtrace_locations.first&.path == __FILE__ - count += 1 - error.backtrace_locations.shift - end - - error.backtrace.shift(count) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/error_reporter/test_helper.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/error_reporter/test_helper.rb deleted file mode 100644 index bc67efa2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/error_reporter/test_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport::ErrorReporter::TestHelper # :nodoc: - class ErrorSubscriber - attr_reader :events - - def initialize - @events = [] - end - - def report(error, handled:, severity:, source:, context:) - @events << [error, handled, severity, source, context] - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/evented_file_update_checker.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/evented_file_update_checker.rb deleted file mode 100644 index 4bfc42d4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/evented_file_update_checker.rb +++ /dev/null @@ -1,181 +0,0 @@ -# frozen_string_literal: true - -gem "listen", "~> 3.5" -require "listen" - -require "pathname" -require "concurrent/atomic/atomic_boolean" - -module ActiveSupport - # Allows you to "listen" to changes in a file system. - # The evented file updater does not hit disk when checking for updates. - # Instead, it uses platform-specific file system events to trigger a change - # in state. - # - # The file checker takes an array of files to watch or a hash specifying directories - # and file extensions to watch. It also takes a block that is called when - # EventedFileUpdateChecker#execute is run or when EventedFileUpdateChecker#execute_if_updated - # is run and there have been changes to the file system. - # - # Example: - # - # checker = ActiveSupport::EventedFileUpdateChecker.new(["/tmp/foo"]) { puts "changed" } - # checker.updated? - # # => false - # checker.execute_if_updated - # # => nil - # - # FileUtils.touch("/tmp/foo") - # - # checker.updated? - # # => true - # checker.execute_if_updated - # # => "changed" - # - class EventedFileUpdateChecker # :nodoc: all - def initialize(files, dirs = {}, &block) - unless block - raise ArgumentError, "A block is required to initialize an EventedFileUpdateChecker" - end - - @block = block - @core = Core.new(files, dirs) - ObjectSpace.define_finalizer(self, @core.finalizer) - end - - def inspect - "# error - error_reporter&.report(error, handled: false, source: source) - raise - ensure - instance.complete! - end - end - - def self.perform # :nodoc: - instance = new - instance.run - begin - yield - ensure - instance.complete - end - end - - def self.error_reporter # :nodoc: - ActiveSupport.error_reporter - end - - def self.active_key # :nodoc: - @active_key ||= :"active_execution_wrapper_#{object_id}" - end - - def self.active? # :nodoc: - IsolatedExecutionState.key?(active_key) - end - - def run! # :nodoc: - IsolatedExecutionState[self.class.active_key] = self - run - end - - def run # :nodoc: - run_callbacks(:run) - end - - # Complete this in-flight execution. This method *must* be called - # exactly once on the result of any call to +run!+. - # - # Where possible, prefer +wrap+. - def complete! - complete - ensure - IsolatedExecutionState.delete(self.class.active_key) - end - - def complete # :nodoc: - run_callbacks(:complete) - end - - private - def hook_state - @_hook_state ||= {} - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/executor.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/executor.rb deleted file mode 100644 index ce391b07..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/executor.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -require "active_support/execution_wrapper" - -module ActiveSupport - class Executor < ExecutionWrapper - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/executor/test_helper.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/executor/test_helper.rb deleted file mode 100644 index 97f489dc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/executor/test_helper.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport::Executor::TestHelper # :nodoc: - def run(...) - Rails.application.executor.perform { super } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/file_update_checker.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/file_update_checker.rb deleted file mode 100644 index 608755d0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/file_update_checker.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/time/calculations" - -module ActiveSupport - # = \File Update Checker - # - # FileUpdateChecker specifies the API used by \Rails to watch files - # and control reloading. The API depends on four methods: - # - # * +initialize+ which expects two parameters and one block as - # described below. - # - # * +updated?+ which returns a boolean if there were updates in - # the filesystem or not. - # - # * +execute+ which executes the given block on initialization - # and updates the latest watched files and timestamp. - # - # * +execute_if_updated+ which just executes the block if it was updated. - # - # After initialization, a call to +execute_if_updated+ must execute - # the block only if there was really a change in the filesystem. - # - # This class is used by \Rails to reload the I18n framework whenever - # they are changed upon a new request. - # - # i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do - # I18n.reload! - # end - # - # ActiveSupport::Reloader.to_prepare do - # i18n_reloader.execute_if_updated - # end - class FileUpdateChecker - # It accepts two parameters on initialization. The first is an array - # of files and the second is an optional hash of directories. The hash must - # have directories as keys and the value is an array of extensions to be - # watched under that directory. - # - # This method must also receive a block that will be called once a path - # changes. The array of files and list of directories cannot be changed - # after FileUpdateChecker has been initialized. - def initialize(files, dirs = {}, &block) - unless block - raise ArgumentError, "A block is required to initialize a FileUpdateChecker" - end - - @files = files.freeze - @glob = compile_glob(dirs) - @block = block - - @watched = nil - @updated_at = nil - - @last_watched = watched - @last_update_at = updated_at(@last_watched) - end - - # Check if any of the entries were updated. If so, the watched and/or - # updated_at values are cached until the block is executed via +execute+ - # or +execute_if_updated+. - def updated? - current_watched = watched - if @last_watched.size != current_watched.size - @watched = current_watched - true - else - current_updated_at = updated_at(current_watched) - if @last_update_at < current_updated_at - @watched = current_watched - @updated_at = current_updated_at - true - else - false - end - end - end - - # Executes the given block and updates the latest watched files and - # timestamp. - def execute - @last_watched = watched - @last_update_at = updated_at(@last_watched) - @block.call - ensure - @watched = nil - @updated_at = nil - end - - # Execute the block given if updated. - def execute_if_updated - if updated? - yield if block_given? - execute - true - else - false - end - end - - private - def watched - @watched || begin - all = @files.select { |f| File.exist?(f) } - all.concat(Dir[@glob]) if @glob - all.tap(&:uniq!) - end - end - - def updated_at(paths) - @updated_at || max_mtime(paths) || Time.at(0) - end - - # This method returns the maximum mtime of the files in +paths+, or +nil+ - # if the array is empty. - # - # Files with a mtime in the future are ignored. Such abnormal situation - # can happen for example if the user changes the clock by hand. It is - # healthy to consider this edge case because with mtimes in the future - # reloading is not triggered. - def max_mtime(paths) - time_now = Time.now - max_mtime = nil - - # Time comparisons are performed with #compare_without_coercion because - # AS redefines these operators in a way that is much slower and does not - # bring any benefit in this particular code. - # - # Read t1.compare_without_coercion(t2) < 0 as t1 < t2. - paths.each do |path| - mtime = File.mtime(path) - - next if time_now.compare_without_coercion(mtime) < 0 - - if max_mtime.nil? || max_mtime.compare_without_coercion(mtime) < 0 - max_mtime = mtime - end - end - - max_mtime - end - - def compile_glob(hash) - hash.freeze # Freeze so changes aren't accidentally pushed - return if hash.empty? - - globs = hash.map do |key, value| - "#{escape(key)}/**/*#{compile_ext(value)}" - end - "{#{globs.join(",")}}" - end - - def escape(key) - key.gsub(",", '\,') - end - - def compile_ext(array) - array = Array(array) - return if array.empty? - ".{#{array.join(",")}}" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/fork_tracker.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/fork_tracker.rb deleted file mode 100644 index 2ff8fc5b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/fork_tracker.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module ForkTracker # :nodoc: - module CoreExt - def _fork - pid = super - if pid == 0 - ForkTracker.after_fork_callback - end - pid - end - end - - @pid = Process.pid - @callbacks = [] - - class << self - def after_fork_callback - new_pid = Process.pid - if @pid != new_pid - @callbacks.each(&:call) - @pid = new_pid - end - end - - def hook! - ::Process.singleton_class.prepend(CoreExt) - end - - def after_fork(&block) - @callbacks << block - block - end - - def unregister(callback) - @callbacks.delete(callback) - end - end - end -end - -ActiveSupport::ForkTracker.hook! diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/gem_version.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/gem_version.rb deleted file mode 100644 index 0386e59a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/gem_version.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # Returns the currently loaded version of Active Support as a +Gem::Version+. - def self.gem_version - Gem::Version.new VERSION::STRING - end - - module VERSION - MAJOR = 8 - MINOR = 0 - TINY = 2 - PRE = nil - - STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/gzip.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/gzip.rb deleted file mode 100644 index f6ecc29c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/gzip.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -require "zlib" -require "stringio" - -module ActiveSupport - # = Active Support \Gzip - # - # A convenient wrapper for the zlib standard library that allows - # compression/decompression of strings with gzip. - # - # gzip = ActiveSupport::Gzip.compress('compress me!') - # # => "\x1F\x8B\b\x00o\x8D\xCDO\x00\x03K\xCE\xCF-(J-.V\xC8MU\x04\x00R>n\x83\f\x00\x00\x00" - # - # ActiveSupport::Gzip.decompress(gzip) - # # => "compress me!" - module Gzip - class Stream < StringIO - def initialize(*) - super - set_encoding "BINARY" - end - def close; rewind; end - end - - # Decompresses a gzipped string. - def self.decompress(source) - Zlib::GzipReader.wrap(StringIO.new(source), &:read) - end - - # Compresses a string using gzip. - def self.compress(source, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY) - output = Stream.new - gz = Zlib::GzipWriter.new(output, level, strategy) - gz.write(source) - gz.close - output.string - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/hash_with_indifferent_access.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/hash_with_indifferent_access.rb deleted file mode 100644 index 4fa4e3b0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/hash_with_indifferent_access.rb +++ /dev/null @@ -1,441 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/hash/keys" -require "active_support/core_ext/hash/reverse_merge" -require "active_support/core_ext/hash/except" -require "active_support/core_ext/hash/slice" - -module ActiveSupport - # = \Hash With Indifferent Access - # - # Implements a hash where keys :foo and "foo" are considered - # to be the same. - # - # rgb = ActiveSupport::HashWithIndifferentAccess.new - # - # rgb[:black] = '#000000' - # rgb[:black] # => '#000000' - # rgb['black'] # => '#000000' - # - # rgb['white'] = '#FFFFFF' - # rgb[:white] # => '#FFFFFF' - # rgb['white'] # => '#FFFFFF' - # - # Internally symbols are mapped to strings when used as keys in the entire - # writing interface (calling []=, merge, etc). This - # mapping belongs to the public interface. For example, given: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) - # - # You are guaranteed that the key is returned as a string: - # - # hash.keys # => ["a"] - # - # Technically other types of keys are accepted: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) - # hash[0] = 0 - # hash # => {"a"=>1, 0=>0} - # - # but this class is intended for use cases where strings or symbols are the - # expected keys and it is convenient to understand both as the same. For - # example the +params+ hash in Ruby on \Rails. - # - # Note that core extensions define Hash#with_indifferent_access: - # - # rgb = { black: '#000000', white: '#FFFFFF' }.with_indifferent_access - # - # which may be handy. - # - # To access this class outside of \Rails, require the core extension with: - # - # require "active_support/core_ext/hash/indifferent_access" - # - # which will, in turn, require this file. - class HashWithIndifferentAccess < Hash - # Returns +true+ so that Array#extract_options! finds members of - # this class. - def extractable_options? - true - end - - def with_indifferent_access - dup - end - - def nested_under_indifferent_access - self - end - - def initialize(constructor = nil) - if constructor.respond_to?(:to_hash) - super() - update(constructor) - - hash = constructor.is_a?(Hash) ? constructor : constructor.to_hash - self.default = hash.default if hash.default - self.default_proc = hash.default_proc if hash.default_proc - elsif constructor.nil? - super() - else - super(constructor) - end - end - - def self.[](*args) - new.merge!(Hash[*args]) - end - - alias_method :regular_writer, :[]= unless method_defined?(:regular_writer) - alias_method :regular_update, :update unless method_defined?(:regular_update) - - # Assigns a new value to the hash: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:key] = 'value' - # - # This value can be later fetched using either +:key+ or 'key'. - def []=(key, value) - regular_writer(convert_key(key), convert_value(value, conversion: :assignment)) - end - - alias_method :store, :[]= - - # Updates the receiver in-place, merging in the hashes passed as arguments: - # - # hash_1 = ActiveSupport::HashWithIndifferentAccess.new - # hash_1[:key] = 'value' - # - # hash_2 = ActiveSupport::HashWithIndifferentAccess.new - # hash_2[:key] = 'New Value!' - # - # hash_1.update(hash_2) # => {"key"=>"New Value!"} - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } - # - # The arguments can be either an - # +ActiveSupport::HashWithIndifferentAccess+ or a regular +Hash+. - # In either case the merge respects the semantics of indifferent access. - # - # If the argument is a regular hash with keys +:key+ and "key" only one - # of the values end up in the receiver, but which one is unspecified. - # - # When given a block, the value for duplicated keys will be determined - # by the result of invoking the block with the duplicated key, the value - # in the receiver, and the value in +other_hash+. The rules for duplicated - # keys follow the semantics of indifferent access: - # - # hash_1[:key] = 10 - # hash_2['key'] = 12 - # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} - def update(*other_hashes, &block) - if other_hashes.size == 1 - update_with_single_argument(other_hashes.first, block) - else - other_hashes.each do |other_hash| - update_with_single_argument(other_hash, block) - end - end - self - end - - alias_method :merge!, :update - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - def key?(key) - super(convert_key(key)) - end - - alias_method :include?, :key? - alias_method :has_key?, :key? - alias_method :member?, :key? - - # Same as Hash#[] where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters['foo'] # => 1 - # counters[:foo] # => 1 - # counters[:zoo] # => nil - def [](key) - super(convert_key(key)) - end - - # Same as Hash#assoc where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters.assoc('foo') # => ["foo", 1] - # counters.assoc(:foo) # => ["foo", 1] - # counters.assoc(:zoo) # => nil - def assoc(key) - super(convert_key(key)) - end - - # Same as Hash#fetch where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters.fetch('foo') # => 1 - # counters.fetch(:bar, 0) # => 0 - # counters.fetch(:bar) { |key| 0 } # => 0 - # counters.fetch(:zoo) # => KeyError: key not found: "zoo" - def fetch(key, *extras) - super(convert_key(key), *extras) - end - - # Same as Hash#dig where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = { bar: 1 } - # - # counters.dig('foo', 'bar') # => 1 - # counters.dig(:foo, :bar) # => 1 - # counters.dig(:zoo) # => nil - def dig(*args) - args[0] = convert_key(args[0]) if args.size > 0 - super(*args) - end - - # Same as Hash#default where the key passed as argument can be - # either a string or a symbol: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new(1) - # hash.default # => 1 - # - # hash = ActiveSupport::HashWithIndifferentAccess.new { |hash, key| key } - # hash.default # => nil - # hash.default('foo') # => 'foo' - # hash.default(:foo) # => 'foo' - def default(key = (no_key = true)) - if no_key - super() - else - super(convert_key(key)) - end - end - - # Returns an array of the values at the specified indices: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:a] = 'x' - # hash[:b] = 'y' - # hash.values_at('a', 'b') # => ["x", "y"] - def values_at(*keys) - keys.map! { |key| convert_key(key) } - super - end - - # Returns an array of the values at the specified indices, but also - # raises an exception when one of the keys can't be found. - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:a] = 'x' - # hash[:b] = 'y' - # hash.fetch_values('a', 'b') # => ["x", "y"] - # hash.fetch_values('a', 'c') { |key| 'z' } # => ["x", "z"] - # hash.fetch_values('a', 'c') # => KeyError: key not found: "c" - def fetch_values(*indices, &block) - indices.map! { |key| convert_key(key) } - super - end - - # Returns a shallow copy of the hash. - # - # hash = ActiveSupport::HashWithIndifferentAccess.new({ a: { b: 'b' } }) - # dup = hash.dup - # dup[:a][:c] = 'c' - # - # hash[:a][:c] # => "c" - # dup[:a][:c] # => "c" - def dup - self.class.new(self).tap do |new_hash| - set_defaults(new_hash) - end - end - - # This method has the same semantics of +update+, except it does not - # modify the receiver but rather returns a new hash with indifferent - # access with the result of the merge. - def merge(*hashes, &block) - dup.update(*hashes, &block) - end - - # Like +merge+ but the other way around: Merges the receiver into the - # argument and returns a new hash with indifferent access as result: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['a'] = nil - # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} - def reverse_merge(other_hash) - super(self.class.new(other_hash)) - end - alias_method :with_defaults, :reverse_merge - - # Same semantics as +reverse_merge+ but modifies the receiver in-place. - def reverse_merge!(other_hash) - super(self.class.new(other_hash)) - end - alias_method :with_defaults!, :reverse_merge! - - # Replaces the contents of this hash with other_hash. - # - # h = { "a" => 100, "b" => 200 } - # h.replace({ "c" => 300, "d" => 400 }) # => {"c"=>300, "d"=>400} - def replace(other_hash) - super(self.class.new(other_hash)) - end - - # Removes the specified key from the hash. - def delete(key) - super(convert_key(key)) - end - - # Returns a hash with indifferent access that includes everything except given keys. - # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access - # hash.except(:a, "b") # => {c: 10}.with_indifferent_access - # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access - def except(*keys) - dup.except!(*keys) - end - alias_method :without, :except - - undef :symbolize_keys! - undef :deep_symbolize_keys! - def symbolize_keys; to_hash.symbolize_keys! end - alias_method :to_options, :symbolize_keys - def deep_symbolize_keys; to_hash.deep_symbolize_keys! end - def to_options!; self end - - def select(*args, &block) - return to_enum(:select) unless block_given? - dup.tap { |hash| hash.select!(*args, &block) } - end - - def reject(*args, &block) - return to_enum(:reject) unless block_given? - dup.tap { |hash| hash.reject!(*args, &block) } - end - - def transform_values(&block) - return to_enum(:transform_values) unless block_given? - dup.tap { |hash| hash.transform_values!(&block) } - end - - NOT_GIVEN = Object.new # :nodoc: - - def transform_keys(hash = NOT_GIVEN, &block) - return to_enum(:transform_keys) if NOT_GIVEN.equal?(hash) && !block_given? - dup.tap { |h| h.transform_keys!(hash, &block) } - end - - def transform_keys!(hash = NOT_GIVEN, &block) - return to_enum(:transform_keys!) if NOT_GIVEN.equal?(hash) && !block_given? - - if hash.nil? - super - elsif NOT_GIVEN.equal?(hash) - keys.each { |key| self[yield(key)] = delete(key) } - elsif block_given? - keys.each { |key| self[hash[key] || yield(key)] = delete(key) } - else - keys.each { |key| self[hash[key] || key] = delete(key) } - end - - self - end - - def slice(*keys) - keys.map! { |key| convert_key(key) } - self.class.new(super) - end - - def slice!(*keys) - keys.map! { |key| convert_key(key) } - super - end - - def compact - dup.tap(&:compact!) - end - - # Convert to a regular hash with string keys. - def to_hash - copy = Hash[self] - copy.transform_values! { |v| convert_value_to_hash(v) } - set_defaults(copy) - copy - end - - def to_proc - proc { |key| self[key] } - end - - private - def convert_key(key) - Symbol === key ? key.name : key - end - - def convert_value(value, conversion: nil) - if value.is_a? Hash - value.nested_under_indifferent_access - elsif value.is_a?(Array) - if conversion != :assignment || value.frozen? - value = value.dup - end - value.map! { |e| convert_value(e, conversion: conversion) } - else - value - end - end - - def convert_value_to_hash(value) - if value.is_a? Hash - value.to_hash - elsif value.is_a?(Array) - value.map { |e| convert_value_to_hash(e) } - else - value - end - end - - - def set_defaults(target) - if default_proc - target.default_proc = default_proc.dup - else - target.default = default - end - end - - def update_with_single_argument(other_hash, block) - if other_hash.is_a? HashWithIndifferentAccess - regular_update(other_hash, &block) - else - other_hash.to_hash.each_pair do |key, value| - if block && key?(key) - value = block.call(convert_key(key), self[key], value) - end - regular_writer(convert_key(key), convert_value(value)) - end - end - end - end -end - -# :stopdoc: - -HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/html_safe_translation.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/html_safe_translation.rb deleted file mode 100644 index 69ff23dd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/html_safe_translation.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module HtmlSafeTranslation # :nodoc: - extend self - - def translate(key, **options) - if html_safe_translation_key?(key) - html_safe_options = html_escape_translation_options(options) - - exception = false - - exception_handler = ->(*args) do - exception = true - I18n.exception_handler.call(*args) - end - - translation = I18n.translate(key, **html_safe_options, exception_handler: exception_handler) - - if exception - translation - else - html_safe_translation(translation) - end - else - I18n.translate(key, **options) - end - end - - def html_safe_translation_key?(key) - /(?:_|\b)html\z/.match?(key) - end - - private - def html_escape_translation_options(options) - options.each do |name, value| - unless i18n_option?(name) || (name == :count && value.is_a?(Numeric)) - options[name] = ERB::Util.html_escape(value.to_s) - end - end - end - - def i18n_option?(name) - (@i18n_option_names ||= I18n::RESERVED_KEYS.to_set).include?(name) - end - - - def html_safe_translation(translation) - if translation.respond_to?(:map) - translation.map { |element| element.respond_to?(:html_safe) ? element.html_safe : element } - else - translation.respond_to?(:html_safe) ? translation.html_safe : translation - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/i18n.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/i18n.rb deleted file mode 100644 index f4f06d43..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/i18n.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/hash/deep_merge" -require "active_support/core_ext/hash/except" -require "active_support/core_ext/hash/slice" -begin - require "i18n" - require "i18n/backend/fallbacks" -rescue LoadError => e - warn "The i18n gem is not available. Please add it to your Gemfile and run bundle install" - raise e -end -require "active_support/lazy_load_hooks" - -ActiveSupport.run_load_hooks(:i18n) -I18n.load_path << File.expand_path("locale/en.yml", __dir__) -I18n.load_path << File.expand_path("locale/en.rb", __dir__) diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/i18n_railtie.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/i18n_railtie.rb deleted file mode 100644 index de2ac078..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/i18n_railtie.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -require "active_support" -require "active_support/core_ext/array/wrap" - -# :enddoc: - -module I18n - class Railtie < Rails::Railtie - config.i18n = ActiveSupport::OrderedOptions.new - config.i18n.railties_load_path = [] - config.i18n.load_path = [] - config.i18n.fallbacks = ActiveSupport::OrderedOptions.new - - config.eager_load_namespaces << I18n - - # Make sure i18n is ready before eager loading, in case any eager loaded - # code needs it. - config.before_eager_load do |app| - I18n::Railtie.initialize_i18n(app) - end - - # i18n initialization needs to run after application initialization, since - # initializers may configure i18n. - # - # If the application eager loaded, this was done on before_eager_load. The - # hook is still OK, though, because initialize_i18n is idempotent. - config.after_initialize do |app| - I18n::Railtie.initialize_i18n(app) - end - - @i18n_inited = false - - # Setup i18n configuration. - def self.initialize_i18n(app) - return if @i18n_inited - - fallbacks = app.config.i18n.delete(:fallbacks) - - # Avoid issues with setting the default_locale by disabling available locales - # check while configuring. - enforce_available_locales = app.config.i18n.delete(:enforce_available_locales) - enforce_available_locales = I18n.enforce_available_locales if enforce_available_locales.nil? - I18n.enforce_available_locales = false - - reloadable_paths = [] - app.config.i18n.each do |setting, value| - case setting - when :railties_load_path - reloadable_paths = value - app.config.i18n.load_path.unshift(*value.flat_map(&:existent)) - when :load_path - I18n.load_path += value - when :raise_on_missing_translations - strict = value == :strict - setup_raise_on_missing_translations_config(app, strict) - else - I18n.public_send("#{setting}=", value) - end - end - - init_fallbacks(fallbacks) if fallbacks && validate_fallbacks(fallbacks) - - # Restore available locales check so it will take place from now on. - I18n.enforce_available_locales = enforce_available_locales - - if app.config.reloading_enabled? - directories = watched_dirs_with_extensions(reloadable_paths) - root_load_paths = I18n.load_path.select { |path| path.to_s.start_with?(Rails.root.to_s) } - reloader = app.config.file_watcher.new(root_load_paths, directories) do - I18n.load_path.delete_if { |path| path.to_s.start_with?(Rails.root.to_s) && !File.exist?(path) } - I18n.load_path |= reloadable_paths.flat_map(&:existent) - end - - app.reloaders << reloader - app.reloader.to_run do - reloader.execute_if_updated { require_unload_lock! } - end - end - - @i18n_inited = true - end - - def self.setup_raise_on_missing_translations_config(app, strict) - ActiveSupport.on_load(:action_view) do - ActionView::Helpers::TranslationHelper.raise_on_missing_translations = app.config.i18n.raise_on_missing_translations - end - - ActiveSupport.on_load(:active_model_translation) do - ActiveModel::Translation.raise_on_missing_translations = app.config.i18n.raise_on_missing_translations if strict - end - - if app.config.i18n.raise_on_missing_translations && - I18n.exception_handler.is_a?(I18n::ExceptionHandler) # Only override the i18n gem's default exception handler. - - I18n.exception_handler = ->(exception, *) { - exception = exception.to_exception if exception.is_a?(I18n::MissingTranslation) - raise exception - } - end - end - - def self.include_fallbacks_module - I18n.backend.class.include(I18n::Backend::Fallbacks) - end - - def self.init_fallbacks(fallbacks) - include_fallbacks_module - - args = \ - case fallbacks - when ActiveSupport::OrderedOptions - [*(fallbacks[:defaults] || []) << fallbacks[:map]].compact - when Hash, Array - Array.wrap(fallbacks) - else # TrueClass - [I18n.default_locale] - end - - I18n.fallbacks = I18n::Locale::Fallbacks.new(*args) - end - - def self.validate_fallbacks(fallbacks) - case fallbacks - when ActiveSupport::OrderedOptions - !fallbacks.empty? - when TrueClass, Array, Hash - true - else - raise "Unexpected fallback type #{fallbacks.inspect}" - end - end - - def self.watched_dirs_with_extensions(paths) - paths.each_with_object({}) do |path, result| - result[path.absolute_current] = path.extensions - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflections.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflections.rb deleted file mode 100644 index baf1cb30..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflections.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -require "active_support/inflector/inflections" - -#-- -# Defines the standard inflection rules. These are the starting point for -# new projects and are not considered complete. The current set of inflection -# rules is frozen. This means, we do not change them to become more complete. -# This is a safety measure to keep existing applications from breaking. -#++ -module ActiveSupport - Inflector.inflections(:en) do |inflect| - inflect.plural(/$/, "s") - inflect.plural(/s$/i, "s") - inflect.plural(/^(ax|test)is$/i, '\1es') - inflect.plural(/(octop|vir)us$/i, '\1i') - inflect.plural(/(octop|vir)i$/i, '\1i') - inflect.plural(/(alias|status)$/i, '\1es') - inflect.plural(/(bu)s$/i, '\1ses') - inflect.plural(/(buffal|tomat)o$/i, '\1oes') - inflect.plural(/([ti])um$/i, '\1a') - inflect.plural(/([ti])a$/i, '\1a') - inflect.plural(/sis$/i, "ses") - inflect.plural(/(?:([^f])fe|([lr])f)$/i, '\1\2ves') - inflect.plural(/(hive)$/i, '\1s') - inflect.plural(/([^aeiouy]|qu)y$/i, '\1ies') - inflect.plural(/(x|ch|ss|sh)$/i, '\1es') - inflect.plural(/(matr|vert|ind)(?:ix|ex)$/i, '\1ices') - inflect.plural(/^(m|l)ouse$/i, '\1ice') - inflect.plural(/^(m|l)ice$/i, '\1ice') - inflect.plural(/^(ox)$/i, '\1en') - inflect.plural(/^(oxen)$/i, '\1') - inflect.plural(/(quiz)$/i, '\1zes') - - inflect.singular(/s$/i, "") - inflect.singular(/(ss)$/i, '\1') - inflect.singular(/(n)ews$/i, '\1ews') - inflect.singular(/([ti])a$/i, '\1um') - inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '\1sis') - inflect.singular(/(^analy)(sis|ses)$/i, '\1sis') - inflect.singular(/([^f])ves$/i, '\1fe') - inflect.singular(/(hive)s$/i, '\1') - inflect.singular(/(tive)s$/i, '\1') - inflect.singular(/([lr])ves$/i, '\1f') - inflect.singular(/([^aeiouy]|qu)ies$/i, '\1y') - inflect.singular(/(s)eries$/i, '\1eries') - inflect.singular(/(m)ovies$/i, '\1ovie') - inflect.singular(/(x|ch|ss|sh)es$/i, '\1') - inflect.singular(/^(m|l)ice$/i, '\1ouse') - inflect.singular(/(bus)(es)?$/i, '\1') - inflect.singular(/(o)es$/i, '\1') - inflect.singular(/(shoe)s$/i, '\1') - inflect.singular(/(cris|test)(is|es)$/i, '\1is') - inflect.singular(/^(a)x[ie]s$/i, '\1xis') - inflect.singular(/(octop|vir)(us|i)$/i, '\1us') - inflect.singular(/(alias|status)(es)?$/i, '\1') - inflect.singular(/^(ox)en/i, '\1') - inflect.singular(/(vert|ind)ices$/i, '\1ex') - inflect.singular(/(matr)ices$/i, '\1ix') - inflect.singular(/(quiz)zes$/i, '\1') - inflect.singular(/(database)s$/i, '\1') - - inflect.irregular("person", "people") - inflect.irregular("man", "men") - inflect.irregular("child", "children") - inflect.irregular("sex", "sexes") - inflect.irregular("move", "moves") - inflect.irregular("zombie", "zombies") - - inflect.uncountable(%w(equipment information rice money species series fish sheep jeans police)) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector.rb deleted file mode 100644 index d77f04c9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -# in case active_support/inflector is required without the rest of active_support -require "active_support/inflector/inflections" -require "active_support/inflector/transliterate" -require "active_support/inflector/methods" - -require "active_support/inflections" -require "active_support/core_ext/string/inflections" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/inflections.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/inflections.rb deleted file mode 100644 index 5a1b64a5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/inflections.rb +++ /dev/null @@ -1,273 +0,0 @@ -# frozen_string_literal: true - -require "concurrent/map" -require "active_support/i18n" - -module ActiveSupport - module Inflector - extend self - - # = Active Support \Inflections - # - # A singleton instance of this class is yielded by Inflector.inflections, - # which can then be used to specify additional inflection rules. If passed - # an optional locale, rules for other languages can be specified. The - # default locale is :en. Only rules for English are provided. - # - # ActiveSupport::Inflector.inflections(:en) do |inflect| - # inflect.plural /^(ox)$/i, '\1\2en' - # inflect.singular /^(ox)en/i, '\1' - # - # inflect.irregular 'cactus', 'cacti' - # - # inflect.uncountable 'equipment' - # end - # - # New rules are added at the top. So in the example above, the irregular - # rule for cactus will now be the first of the pluralization and - # singularization rules that is runs. This guarantees that your rules run - # before any of the rules that may already have been loaded. - class Inflections - @__instance__ = Concurrent::Map.new - - class Uncountables < Array - def initialize - @regex_array = [] - super - end - - def delete(entry) - super entry - @regex_array.delete(to_regex(entry)) - end - - def <<(*word) - add(word) - end - - def add(words) - words = words.flatten.map(&:downcase) - concat(words) - @regex_array += words.map { |word| to_regex(word) } - self - end - - def uncountable?(str) - @regex_array.any? { |regex| regex.match? str } - end - - private - def to_regex(string) - /\b#{::Regexp.escape(string)}\Z/i - end - end - - def self.instance(locale = :en) - @__instance__[locale] ||= new - end - - def self.instance_or_fallback(locale) - I18n.fallbacks[locale].each do |k| - return @__instance__[k] if @__instance__.key?(k) - end - instance(locale) - end - - attr_reader :plurals, :singulars, :uncountables, :humans, :acronyms - - attr_reader :acronyms_camelize_regex, :acronyms_underscore_regex # :nodoc: - - def initialize - @plurals, @singulars, @uncountables, @humans, @acronyms = [], [], Uncountables.new, [], {} - define_acronym_regex_patterns - end - - # Private, for the test suite. - def initialize_dup(orig) # :nodoc: - %w(plurals singulars uncountables humans acronyms).each do |scope| - instance_variable_set("@#{scope}", orig.public_send(scope).dup) - end - define_acronym_regex_patterns - end - - # Specifies a new acronym. An acronym must be specified as it will appear - # in a camelized string. An underscore string that contains the acronym - # will retain the acronym when passed to +camelize+, +humanize+, or - # +titleize+. A camelized string that contains the acronym will maintain - # the acronym when titleized or humanized, and will convert the acronym - # into a non-delimited single lowercase word when passed to +underscore+. - # - # acronym 'HTML' - # titleize 'html' # => 'HTML' - # camelize 'html' # => 'HTML' - # underscore 'MyHTML' # => 'my_html' - # - # The acronym, however, must occur as a delimited unit and not be part of - # another word for conversions to recognize it: - # - # acronym 'HTTP' - # camelize 'my_http_delimited' # => 'MyHTTPDelimited' - # camelize 'https' # => 'Https', not 'HTTPs' - # underscore 'HTTPS' # => 'http_s', not 'https' - # - # acronym 'HTTPS' - # camelize 'https' # => 'HTTPS' - # underscore 'HTTPS' # => 'https' - # - # Note: Acronyms that are passed to +pluralize+ will no longer be - # recognized, since the acronym will not occur as a delimited unit in the - # pluralized result. To work around this, you must specify the pluralized - # form as an acronym as well: - # - # acronym 'API' - # camelize(pluralize('api')) # => 'Apis' - # - # acronym 'APIs' - # camelize(pluralize('api')) # => 'APIs' - # - # +acronym+ may be used to specify any word that contains an acronym or - # otherwise needs to maintain a non-standard capitalization. The only - # restriction is that the word must begin with a capital letter. - # - # acronym 'RESTful' - # underscore 'RESTful' # => 'restful' - # underscore 'RESTfulController' # => 'restful_controller' - # titleize 'RESTfulController' # => 'RESTful Controller' - # camelize 'restful' # => 'RESTful' - # camelize 'restful_controller' # => 'RESTfulController' - # - # acronym 'McDonald' - # underscore 'McDonald' # => 'mcdonald' - # camelize 'mcdonald' # => 'McDonald' - def acronym(word) - @acronyms[word.downcase] = word - define_acronym_regex_patterns - end - - # Specifies a new pluralization rule and its replacement. The rule can - # either be a string or a regular expression. The replacement should - # always be a string that may include references to the matched data from - # the rule. - def plural(rule, replacement) - @uncountables.delete(rule) if rule.is_a?(String) - @uncountables.delete(replacement) - @plurals.prepend([rule, replacement]) - end - - # Specifies a new singularization rule and its replacement. The rule can - # either be a string or a regular expression. The replacement should - # always be a string that may include references to the matched data from - # the rule. - def singular(rule, replacement) - @uncountables.delete(rule) if rule.is_a?(String) - @uncountables.delete(replacement) - @singulars.prepend([rule, replacement]) - end - - # Specifies a new irregular that applies to both pluralization and - # singularization at the same time. This can only be used for strings, not - # regular expressions. You simply pass the irregular in singular and - # plural form. - # - # irregular 'cactus', 'cacti' - # irregular 'person', 'people' - def irregular(singular, plural) - @uncountables.delete(singular) - @uncountables.delete(plural) - - s0 = singular[0] - srest = singular[1..-1] - - p0 = plural[0] - prest = plural[1..-1] - - if s0.upcase == p0.upcase - plural(/(#{s0})#{srest}$/i, '\1' + prest) - plural(/(#{p0})#{prest}$/i, '\1' + prest) - - singular(/(#{s0})#{srest}$/i, '\1' + srest) - singular(/(#{p0})#{prest}$/i, '\1' + srest) - else - plural(/#{s0.upcase}(?i)#{srest}$/, p0.upcase + prest) - plural(/#{s0.downcase}(?i)#{srest}$/, p0.downcase + prest) - plural(/#{p0.upcase}(?i)#{prest}$/, p0.upcase + prest) - plural(/#{p0.downcase}(?i)#{prest}$/, p0.downcase + prest) - - singular(/#{s0.upcase}(?i)#{srest}$/, s0.upcase + srest) - singular(/#{s0.downcase}(?i)#{srest}$/, s0.downcase + srest) - singular(/#{p0.upcase}(?i)#{prest}$/, s0.upcase + srest) - singular(/#{p0.downcase}(?i)#{prest}$/, s0.downcase + srest) - end - end - - # Specifies words that are uncountable and should not be inflected. - # - # uncountable 'money' - # uncountable 'money', 'information' - # uncountable %w( money information rice ) - def uncountable(*words) - @uncountables.add(words) - end - - # Specifies a humanized form of a string by a regular expression rule or - # by a string mapping. When using a regular expression based replacement, - # the normal humanize formatting is called after the replacement. When a - # string is used, the human form should be specified as desired (example: - # 'The name', not 'the_name'). - # - # human /_cnt$/i, '\1_count' - # human 'legacy_col_person_name', 'Name' - def human(rule, replacement) - @humans.prepend([rule, replacement]) - end - - # Clears the loaded inflections within a given scope (default is - # :all). Give the scope as a symbol of the inflection type, the - # options are: :plurals, :singulars, :uncountables, - # :humans, :acronyms. - # - # clear :all - # clear :plurals - def clear(scope = :all) - case scope - when :all - clear(:acronyms) - clear(:plurals) - clear(:singulars) - clear(:uncountables) - clear(:humans) - when :acronyms - @acronyms = {} - define_acronym_regex_patterns - when :uncountables - @uncountables = Uncountables.new - when :plurals, :singulars, :humans - instance_variable_set "@#{scope}", [] - end - end - - private - def define_acronym_regex_patterns - @acronym_regex = @acronyms.empty? ? /(?=a)b/ : /#{@acronyms.values.join("|")}/ - @acronyms_camelize_regex = /^(?:#{@acronym_regex}(?=\b|[A-Z_])|\w)/ - @acronyms_underscore_regex = /(?:(?<=([A-Za-z\d]))|\b)(#{@acronym_regex})(?=\b|[^a-z])/ - end - end - - # Yields a singleton instance of Inflector::Inflections so you can specify - # additional inflector rules. If passed an optional locale, rules for other - # languages can be specified. If not specified, defaults to :en. - # Only rules for English are provided. - # - # ActiveSupport::Inflector.inflections(:en) do |inflect| - # inflect.uncountable 'rails' - # end - def inflections(locale = :en) - if block_given? - yield Inflections.instance(locale) - else - Inflections.instance_or_fallback(locale) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/methods.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/methods.rb deleted file mode 100644 index e61afcf5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/methods.rb +++ /dev/null @@ -1,387 +0,0 @@ -# frozen_string_literal: true - -require "active_support/inflections" - -module ActiveSupport - # = Active Support \Inflector - # - # The Inflector transforms words from singular to plural, class names to table - # names, modularized class names to ones without, and class names to foreign - # keys. The default inflections for pluralization, singularization, and - # uncountable words are kept in inflections.rb. - # - # The \Rails core team has stated patches for the inflections library will not - # be accepted in order to avoid breaking legacy applications which may be - # relying on errant inflections. If you discover an incorrect inflection and - # require it for your application or wish to define rules for languages other - # than English, please correct or add them yourself (explained below). - module Inflector - extend self - - # Returns the plural form of the word in the string. - # - # If passed an optional +locale+ parameter, the word will be - # pluralized using rules defined for that language. By default, - # this parameter is set to :en. - # - # pluralize('post') # => "posts" - # pluralize('octopus') # => "octopi" - # pluralize('sheep') # => "sheep" - # pluralize('words') # => "words" - # pluralize('CamelOctopus') # => "CamelOctopi" - # pluralize('ley', :es) # => "leyes" - def pluralize(word, locale = :en) - apply_inflections(word, inflections(locale).plurals, locale) - end - - # The reverse of #pluralize, returns the singular form of a word in a - # string. - # - # If passed an optional +locale+ parameter, the word will be - # singularized using rules defined for that language. By default, - # this parameter is set to :en. - # - # singularize('posts') # => "post" - # singularize('octopi') # => "octopus" - # singularize('sheep') # => "sheep" - # singularize('word') # => "word" - # singularize('CamelOctopi') # => "CamelOctopus" - # singularize('leyes', :es) # => "ley" - def singularize(word, locale = :en) - apply_inflections(word, inflections(locale).singulars, locale) - end - - # Converts strings to UpperCamelCase. - # If the +uppercase_first_letter+ parameter is set to false, then produces - # lowerCamelCase. - # - # Also converts '/' to '::' which is useful for converting - # paths to namespaces. - # - # camelize('active_model') # => "ActiveModel" - # camelize('active_model', false) # => "activeModel" - # camelize('active_model/errors') # => "ActiveModel::Errors" - # camelize('active_model/errors', false) # => "activeModel::Errors" - # - # As a rule of thumb you can think of +camelize+ as the inverse of - # #underscore, though there are cases where that does not hold: - # - # camelize(underscore('SSLError')) # => "SslError" - def camelize(term, uppercase_first_letter = true) - string = term.to_s - # String#camelize takes a symbol (:upper or :lower), so here we also support :lower to keep the methods consistent. - if !uppercase_first_letter || uppercase_first_letter == :lower - string = string.sub(inflections.acronyms_camelize_regex) { |match| match.downcase! || match } - elsif string.match?(/\A[a-z\d]*\z/) - return inflections.acronyms[string]&.dup || string.capitalize - else - string = string.sub(/^[a-z\d]*/) { |match| inflections.acronyms[match] || match.capitalize! || match } - end - string.gsub!(/(?:_|(\/))([a-z\d]*)/i) do - word = $2 - substituted = inflections.acronyms[word] || word.capitalize! || word - $1 ? "::#{substituted}" : substituted - end - string - end - - # Makes an underscored, lowercase form from the expression in the string. - # - # Changes '::' to '/' to convert namespaces to paths. - # - # underscore('ActiveModel') # => "active_model" - # underscore('ActiveModel::Errors') # => "active_model/errors" - # - # As a rule of thumb you can think of +underscore+ as the inverse of - # #camelize, though there are cases where that does not hold: - # - # camelize(underscore('SSLError')) # => "SslError" - def underscore(camel_cased_word) - return camel_cased_word.to_s.dup unless /[A-Z-]|::/.match?(camel_cased_word) - word = camel_cased_word.to_s.gsub("::", "/") - word.gsub!(inflections.acronyms_underscore_regex) { "#{$1 && '_' }#{$2.downcase}" } - word.gsub!(/(?<=[A-Z])(?=[A-Z][a-z])|(?<=[a-z\d])(?=[A-Z])/, "_") - word.tr!("-", "_") - word.downcase! - word - end - - # Tweaks an attribute name for display to end users. - # - # Specifically, performs these transformations: - # - # * Applies human inflection rules to the argument. - # * Deletes leading underscores, if any. - # * Removes an "_id" suffix if present. - # * Replaces underscores with spaces, if any. - # * Downcases all words except acronyms. - # * Capitalizes the first word. - # The capitalization of the first word can be turned off by setting the - # +:capitalize+ option to false (default is true). - # - # The trailing '_id' can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true (default is false). - # - # humanize('employee_salary') # => "Employee salary" - # humanize('author_id') # => "Author" - # humanize('author_id', capitalize: false) # => "author" - # humanize('_id') # => "Id" - # humanize('author_id', keep_id_suffix: true) # => "Author id" - # - # If "SSL" was defined to be an acronym: - # - # humanize('ssl_error') # => "SSL error" - # - def humanize(lower_case_and_underscored_word, capitalize: true, keep_id_suffix: false) - result = lower_case_and_underscored_word.to_s.dup - - inflections.humans.each { |(rule, replacement)| break if result.sub!(rule, replacement) } - - result.tr!("_", " ") - result.lstrip! - if !keep_id_suffix && lower_case_and_underscored_word&.end_with?("_id") - result.delete_suffix!(" id") - end - - result.gsub!(/([a-z\d]+)/i) do |match| - match.downcase! - inflections.acronyms[match] || match - end - - if capitalize - result.sub!(/\A\w/) do |match| - match.upcase! - match - end - end - - result - end - - # Converts the first character in the string to uppercase. - # - # upcase_first('what a Lovely Day') # => "What a Lovely Day" - # upcase_first('w') # => "W" - # upcase_first('') # => "" - def upcase_first(string) - string.length > 0 ? string[0].upcase.concat(string[1..-1]) : +"" - end - - # Converts the first character in the string to lowercase. - # - # downcase_first('If they enjoyed The Matrix') # => "if they enjoyed The Matrix" - # downcase_first('I') # => "i" - # downcase_first('') # => "" - def downcase_first(string) - string.length > 0 ? string[0].downcase.concat(string[1..-1]) : +"" - end - - # Capitalizes all the words and replaces some characters in the string to - # create a nicer looking title. +titleize+ is meant for creating pretty - # output. It is not used in the \Rails internals. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # titleize('man from the boondocks') # => "Man From The Boondocks" - # titleize('x-men: the last stand') # => "X Men: The Last Stand" - # titleize('TheManWithoutAPast') # => "The Man Without A Past" - # titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" - # titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" - def titleize(word, keep_id_suffix: false) - humanize(underscore(word), keep_id_suffix: keep_id_suffix).gsub(/\b(? "raw_scaled_scorers" - # tableize('ham_and_egg') # => "ham_and_eggs" - # tableize('fancyCategory') # => "fancy_categories" - def tableize(class_name) - pluralize(underscore(class_name)) - end - - # Creates a class name from a plural table name like \Rails does for table - # names to models. Note that this returns a string and not a Class. (To - # convert to an actual class follow +classify+ with #constantize.) - # - # classify('ham_and_eggs') # => "HamAndEgg" - # classify('posts') # => "Post" - # - # Singular names are not handled correctly: - # - # classify('calculus') # => "Calculu" - def classify(table_name) - # strip out any leading schema name - camelize(singularize(table_name.to_s.sub(/.*\./, ""))) - end - - # Replaces underscores with dashes in the string. - # - # dasherize('puni_puni') # => "puni-puni" - def dasherize(underscored_word) - underscored_word.tr("_", "-") - end - - # Removes the module part from the expression in the string. - # - # demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" - # demodulize('Inflections') # => "Inflections" - # demodulize('::Inflections') # => "Inflections" - # demodulize('') # => "" - # - # See also #deconstantize. - def demodulize(path) - path = path.to_s - if i = path.rindex("::") - path[(i + 2), path.length] - else - path - end - end - - # Removes the rightmost segment from the constant expression in the string. - # - # deconstantize('Net::HTTP') # => "Net" - # deconstantize('::Net::HTTP') # => "::Net" - # deconstantize('String') # => "" - # deconstantize('::String') # => "" - # deconstantize('') # => "" - # - # See also #demodulize. - def deconstantize(path) - path.to_s[0, path.rindex("::") || 0] # implementation based on the one in facets' Module#spacename - end - - # Creates a foreign key name from a class name. - # +separate_class_name_and_id_with_underscore+ sets whether - # the method should put '_' between the name and 'id'. - # - # foreign_key('Message') # => "message_id" - # foreign_key('Message', false) # => "messageid" - # foreign_key('Admin::Post') # => "post_id" - def foreign_key(class_name, separate_class_name_and_id_with_underscore = true) - underscore(demodulize(class_name)) + (separate_class_name_and_id_with_underscore ? "_id" : "id") - end - - # Tries to find a constant with the name specified in the argument string. - # - # constantize('Module') # => Module - # constantize('Foo::Bar') # => Foo::Bar - # - # The name is assumed to be the one of a top-level constant, no matter - # whether it starts with "::" or not. No lexical context is taken into - # account: - # - # C = 'outside' - # module M - # C = 'inside' - # C # => 'inside' - # constantize('C') # => 'outside', same as ::C - # end - # - # NameError is raised when the name is not in CamelCase or the constant is - # unknown. - def constantize(camel_cased_word) - Object.const_get(camel_cased_word) - end - - # Tries to find a constant with the name specified in the argument string. - # - # safe_constantize('Module') # => Module - # safe_constantize('Foo::Bar') # => Foo::Bar - # - # The name is assumed to be the one of a top-level constant, no matter - # whether it starts with "::" or not. No lexical context is taken into - # account: - # - # C = 'outside' - # module M - # C = 'inside' - # C # => 'inside' - # safe_constantize('C') # => 'outside', same as ::C - # end - # - # +nil+ is returned when the name is not in CamelCase or the constant (or - # part of it) is unknown. - # - # safe_constantize('blargle') # => nil - # safe_constantize('UnknownModule') # => nil - # safe_constantize('UnknownModule::Foo::Bar') # => nil - def safe_constantize(camel_cased_word) - constantize(camel_cased_word) - rescue NameError => e - raise if e.name && !(camel_cased_word.to_s.split("::").include?(e.name.to_s) || - e.name.to_s == camel_cased_word.to_s) - rescue LoadError => e - message = e.respond_to?(:original_message) ? e.original_message : e.message - raise unless /Unable to autoload constant #{const_regexp(camel_cased_word)}/.match?(message) - end - - # Returns the suffix that should be added to a number to denote the position - # in an ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # ordinal(1) # => "st" - # ordinal(2) # => "nd" - # ordinal(1002) # => "nd" - # ordinal(1003) # => "rd" - # ordinal(-11) # => "th" - # ordinal(-1021) # => "st" - def ordinal(number) - I18n.translate("number.nth.ordinals", number: number) - end - - # Turns a number into an ordinal string used to denote the position in an - # ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # ordinalize(1) # => "1st" - # ordinalize(2) # => "2nd" - # ordinalize(1002) # => "1002nd" - # ordinalize(1003) # => "1003rd" - # ordinalize(-11) # => "-11th" - # ordinalize(-1021) # => "-1021st" - def ordinalize(number) - I18n.translate("number.nth.ordinalized", number: number) - end - - private - # Mounts a regular expression, returned as a string to ease interpolation, - # that will match part by part the given constant. - # - # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" - # const_regexp("::") # => "::" - def const_regexp(camel_cased_word) - parts = camel_cased_word.split("::") - - return Regexp.escape(camel_cased_word) if parts.empty? - - last = parts.pop - - parts.reverse!.inject(last) do |acc, part| - part.empty? ? acc : "#{part}(::#{acc})?" - end - end - - # Applies inflection rules for +singularize+ and +pluralize+. - # - # If passed an optional +locale+ parameter, the uncountables will be - # found for that locale. - # - # apply_inflections('post', inflections.plurals, :en) # => "posts" - # apply_inflections('posts', inflections.singulars, :en) # => "post" - def apply_inflections(word, rules, locale = :en) - result = word.to_s.dup - - if word.empty? || inflections(locale).uncountables.uncountable?(result) - result - else - rules.each { |(rule, replacement)| break if result.sub!(rule, replacement) } - result - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/transliterate.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/transliterate.rb deleted file mode 100644 index 926d32ee..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/inflector/transliterate.rb +++ /dev/null @@ -1,149 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/string/multibyte" -require "active_support/i18n" - -module ActiveSupport - module Inflector - ALLOWED_ENCODINGS_FOR_TRANSLITERATE = [Encoding::UTF_8, Encoding::US_ASCII, Encoding::GB18030].freeze - - # Replaces non-ASCII characters with an ASCII approximation, or if none - # exists, a replacement character which defaults to "?". - # - # transliterate('Ærøskøbing') - # # => "AEroskobing" - # - # Default approximations are provided for Western/Latin characters, - # e.g, "ø", "ñ", "é", "ß", etc. - # - # This method is I18n aware, so you can set up custom approximations for a - # locale. This can be useful, for example, to transliterate German's "ü" - # and "ö" to "ue" and "oe", or to add support for transliterating Russian - # to ASCII. - # - # In order to make your custom transliterations available, you must set - # them as the i18n.transliterate.rule i18n key: - # - # # Store the transliterations in locales/de.yml - # i18n: - # transliterate: - # rule: - # ü: "ue" - # ö: "oe" - # - # # Or set them using Ruby - # I18n.backend.store_translations(:de, i18n: { - # transliterate: { - # rule: { - # 'ü' => 'ue', - # 'ö' => 'oe' - # } - # } - # }) - # - # The value for i18n.transliterate.rule can be a simple Hash that - # maps characters to ASCII approximations as shown above, or, for more - # complex requirements, a Proc: - # - # I18n.backend.store_translations(:de, i18n: { - # transliterate: { - # rule: ->(string) { MyTransliterator.transliterate(string) } - # } - # }) - # - # Now you can have different transliterations for each locale: - # - # transliterate('Jürgen', locale: :en) - # # => "Jurgen" - # - # transliterate('Jürgen', locale: :de) - # # => "Juergen" - # - # Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings. - # Other encodings will raise an ArgumentError. - def transliterate(string, replacement = "?", locale: nil) - raise ArgumentError, "Can only transliterate strings. Received #{string.class.name}" unless string.is_a?(String) - raise ArgumentError, "Cannot transliterate strings with #{string.encoding} encoding" unless ALLOWED_ENCODINGS_FOR_TRANSLITERATE.include?(string.encoding) - - return string.dup if string.ascii_only? - string = string.dup if string.frozen? - - input_encoding = string.encoding - - # US-ASCII is a subset of UTF-8 so we'll force encoding as UTF-8 if - # US-ASCII is given. This way we can let tidy_bytes handle the string - # in the same way as we do for UTF-8 - string.force_encoding(Encoding::UTF_8) if string.encoding == Encoding::US_ASCII - - # GB18030 is Unicode compatible but is not a direct mapping so needs to be - # transcoded. Using invalid/undef :replace will result in loss of data in - # the event of invalid characters, but since tidy_bytes will replace - # invalid/undef with a "?" we're safe to do the same beforehand - string.encode!(Encoding::UTF_8, invalid: :replace, undef: :replace) if string.encoding == Encoding::GB18030 - - transliterated = I18n.transliterate( - ActiveSupport::Multibyte::Unicode.tidy_bytes(string).unicode_normalize(:nfc), - replacement: replacement, - locale: locale - ) - - # Restore the string encoding of the input if it was not UTF-8. - # Apply invalid/undef :replace as tidy_bytes does - transliterated.encode!(input_encoding, invalid: :replace, undef: :replace) if input_encoding != transliterated.encoding - - transliterated - end - - # Replaces special characters in a string so that it may be used as part of - # a 'pretty' URL. - # - # parameterize("Donald E. Knuth") # => "donald-e-knuth" - # parameterize("^très|Jolie-- ") # => "tres-jolie" - # - # To use a custom separator, override the +separator+ argument. - # - # parameterize("Donald E. Knuth", separator: '_') # => "donald_e_knuth" - # parameterize("^très|Jolie__ ", separator: '_') # => "tres_jolie" - # - # To preserve the case of the characters in a string, use the +preserve_case+ argument. - # - # parameterize("Donald E. Knuth", preserve_case: true) # => "Donald-E-Knuth" - # parameterize("^très|Jolie-- ", preserve_case: true) # => "tres-Jolie" - # - # It preserves dashes and underscores unless they are used as separators: - # - # parameterize("^très|Jolie__ ") # => "tres-jolie__" - # parameterize("^très|Jolie-- ", separator: "_") # => "tres_jolie--" - # parameterize("^très_Jolie-- ", separator: ".") # => "tres_jolie--" - # - # If the optional parameter +locale+ is specified, - # the word will be parameterized as a word of that language. - # By default, this parameter is set to nil and it will use - # the configured I18n.locale. - def parameterize(string, separator: "-", preserve_case: false, locale: nil) - # Replace accented chars with their ASCII equivalents. - parameterized_string = transliterate(string, locale: locale) - - # Turn unwanted chars into the separator. - parameterized_string.gsub!(/[^a-z0-9\-_]+/i, separator) - - unless separator.nil? || separator.empty? - if separator == "-" - re_duplicate_separator = /-{2,}/ - re_leading_trailing_separator = /^-|-$/i - else - re_sep = Regexp.escape(separator) - re_duplicate_separator = /#{re_sep}{2,}/ - re_leading_trailing_separator = /^#{re_sep}|#{re_sep}$/i - end - # No more than one of the separator in a row. - parameterized_string.gsub!(re_duplicate_separator, separator) - # Remove leading/trailing separator. - parameterized_string.gsub!(re_leading_trailing_separator, "") - end - - parameterized_string.downcase! unless preserve_case - parameterized_string - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/isolated_execution_state.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/isolated_execution_state.rb deleted file mode 100644 index 082bdb83..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/isolated_execution_state.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module IsolatedExecutionState # :nodoc: - @isolation_level = nil - - Thread.attr_accessor :active_support_execution_state - Fiber.attr_accessor :active_support_execution_state - - class << self - attr_reader :isolation_level, :scope - - def isolation_level=(level) - return if level == @isolation_level - - unless %i(thread fiber).include?(level) - raise ArgumentError, "isolation_level must be `:thread` or `:fiber`, got: `#{level.inspect}`" - end - - clear if @isolation_level - - @scope = - case level - when :thread; Thread - when :fiber; Fiber - end - - @isolation_level = level - end - - def unique_id - self[:__id__] ||= Object.new - end - - def [](key) - state[key] - end - - def []=(key, value) - state[key] = value - end - - def key?(key) - state.key?(key) - end - - def delete(key) - state.delete(key) - end - - def clear - state.clear - end - - def context - scope.current - end - - def share_with(other) - # Action Controller streaming spawns a new thread and copy thread locals. - # We do the same here for backward compatibility, but this is very much a hack - # and streaming should be rethought. - context.active_support_execution_state = other.active_support_execution_state.dup - end - - private - def state - context.active_support_execution_state ||= {} - end - end - - self.isolation_level = :thread - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json.rb deleted file mode 100644 index d7887175..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -require "active_support/json/decoding" -require "active_support/json/encoding" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json/decoding.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json/decoding.rb deleted file mode 100644 index 78016bdd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json/decoding.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/module/delegation" -require "json" - -module ActiveSupport - # Look for and parse JSON strings that look like ISO 8601 times. - mattr_accessor :parse_json_times - - module JSON - # matches YAML-formatted dates - DATE_REGEX = /\A\d{4}-\d{2}-\d{2}\z/ - DATETIME_REGEX = /\A(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?)\z/ - - class << self - # Parses a JSON string (JavaScript Object Notation) into a hash. - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") - # => {"team" => "rails", "players" => "36"} - def decode(json) - data = ::JSON.parse(json, quirks_mode: true) - - if ActiveSupport.parse_json_times - convert_dates_from(data) - else - data - end - end - alias_method :load, :decode - - # Returns the class of the error that will be raised when there is an - # error in decoding JSON. Using this method means you won't directly - # depend on the ActiveSupport's JSON implementation, in case it changes - # in the future. - # - # begin - # obj = ActiveSupport::JSON.decode(some_string) - # rescue ActiveSupport::JSON.parse_error - # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") - # end - def parse_error - ::JSON::ParserError - end - - private - def convert_dates_from(data) - case data - when nil - nil - when DATE_REGEX - begin - Date.parse(data) - rescue ArgumentError - data - end - when DATETIME_REGEX - begin - Time.zone.parse(data) - rescue ArgumentError - data - end - when Array - data.map! { |d| convert_dates_from(d) } - when Hash - data.transform_values! do |value| - convert_dates_from(value) - end - else - data - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json/encoding.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json/encoding.rb deleted file mode 100644 index 832be756..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/json/encoding.rb +++ /dev/null @@ -1,138 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/json" -require "active_support/core_ext/module/delegation" - -module ActiveSupport - class << self - delegate :use_standard_json_time_format, :use_standard_json_time_format=, - :time_precision, :time_precision=, - :escape_html_entities_in_json, :escape_html_entities_in_json=, - :json_encoder, :json_encoder=, - to: :'ActiveSupport::JSON::Encoding' - end - - module JSON - class << self - # Dumps objects in JSON (JavaScript Object Notation). - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) - # # => "{\"team\":\"rails\",\"players\":\"36\"}" - # - # Generates JSON that is safe to include in JavaScript as it escapes - # U+2028 (Line Separator) and U+2029 (Paragraph Separator): - # - # ActiveSupport::JSON.encode({ key: "\u2028" }) - # # => "{\"key\":\"\\u2028\"}" - # - # By default, it also generates JSON that is safe to include in HTML, as - # it escapes <, >, and &: - # - # ActiveSupport::JSON.encode({ key: "<>&" }) - # # => "{\"key\":\"\\u003c\\u003e\\u0026\"}" - # - # This can be changed with the +escape_html_entities+ option, or the - # global escape_html_entities_in_json configuration option. - # - # ActiveSupport::JSON.encode({ key: "<>&" }, escape_html_entities: false) - # # => "{\"key\":\"<>&\"}" - def encode(value, options = nil) - Encoding.json_encoder.new(options).encode(value) - end - alias_method :dump, :encode - end - - module Encoding # :nodoc: - class JSONGemEncoder # :nodoc: - attr_reader :options - - def initialize(options = nil) - @options = options || {} - end - - # Encode the given object into a JSON string - def encode(value) - unless options.empty? - value = value.as_json(options.dup.freeze) - end - json = stringify(jsonify(value)) - - # Rails does more escaping than the JSON gem natively does (we - # escape \u2028 and \u2029 and optionally >, <, & to work around - # certain browser problems). - if @options.fetch(:escape_html_entities, Encoding.escape_html_entities_in_json) - json.gsub!(">", '\u003e') - json.gsub!("<", '\u003c') - json.gsub!("&", '\u0026') - end - json.gsub!("\u2028", '\u2028') - json.gsub!("\u2029", '\u2029') - json - end - - private - # Convert an object into a "JSON-ready" representation composed of - # primitives like Hash, Array, String, Symbol, Numeric, - # and +true+/+false+/+nil+. - # Recursively calls #as_json to the object to recursively build a - # fully JSON-ready object. - # - # This allows developers to implement #as_json without having to - # worry about what base types of objects they are allowed to return - # or having to remember to call #as_json recursively. - # - # Note: the +options+ hash passed to +object.to_json+ is only passed - # to +object.as_json+, not any of this method's recursive +#as_json+ - # calls. - def jsonify(value) - case value - when String, Integer, Symbol, nil, true, false - value - when Numeric - value.as_json - when Hash - result = {} - value.each do |k, v| - k = k.to_s unless Symbol === k || String === k - result[k] = jsonify(v) - end - result - when Array - value.map { |v| jsonify(v) } - else - jsonify value.as_json - end - end - - # Encode a "jsonified" Ruby data structure using the JSON gem - def stringify(jsonified) - ::JSON.generate(jsonified, quirks_mode: true, max_nesting: false) - end - end - - class << self - # If true, use ISO 8601 format for dates and times. Otherwise, fall back - # to the Active Support legacy format. - attr_accessor :use_standard_json_time_format - - # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) - # as a safety measure. - attr_accessor :escape_html_entities_in_json - - # Sets the precision of encoded time values. - # Defaults to 3 (equivalent to millisecond precision) - attr_accessor :time_precision - - # Sets the encoder used by \Rails to encode Ruby objects into JSON strings - # in +Object#to_json+ and +ActiveSupport::JSON.encode+. - attr_accessor :json_encoder - end - - self.use_standard_json_time_format = true - self.escape_html_entities_in_json = true - self.json_encoder = JSONGemEncoder - self.time_precision = 3 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/key_generator.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/key_generator.rb deleted file mode 100644 index 8e75fba2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/key_generator.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -require "concurrent/map" -require "openssl" - -module ActiveSupport - # = Key Generator - # - # KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. - # It can be used to derive a number of keys for various purposes from a given secret. - # This lets \Rails applications have a single secure secret, but avoid reusing that - # key in multiple incompatible contexts. - class KeyGenerator - class << self - def hash_digest_class=(klass) - if klass.kind_of?(Class) && klass < OpenSSL::Digest - @hash_digest_class = klass - else - raise ArgumentError, "#{klass} is expected to be an OpenSSL::Digest subclass" - end - end - - def hash_digest_class - @hash_digest_class ||= OpenSSL::Digest::SHA1 - end - end - - def initialize(secret, options = {}) - @secret = secret - # The default iterations are higher than required for our key derivation uses - # on the off chance someone uses this for password storage - @iterations = options[:iterations] || 2**16 - # Also allow configuration here so people can use this to build a rotation - # scheme when switching the digest class. - @hash_digest_class = options[:hash_digest_class] || self.class.hash_digest_class - end - - # Returns a derived key suitable for use. The default +key_size+ is chosen - # to be compatible with the default settings of ActiveSupport::MessageVerifier. - # i.e. OpenSSL::Digest::SHA1#block_length - def generate_key(salt, key_size = 64) - OpenSSL::PKCS5.pbkdf2_hmac(@secret, salt, @iterations, key_size, @hash_digest_class.new) - end - - def inspect # :nodoc: - "#<#{self.class.name}:#{'%#016x' % (object_id << 1)}>" - end - end - - # = Caching Key Generator - # - # CachingKeyGenerator is a wrapper around KeyGenerator which allows users to avoid - # re-executing the key generation process when it's called using the same +salt+ and - # +key_size+. - class CachingKeyGenerator - def initialize(key_generator) - @key_generator = key_generator - @cache_keys = Concurrent::Map.new - end - - # Returns a derived key suitable for use. - def generate_key(*args) - @cache_keys[args.join("|")] ||= @key_generator.generate_key(*args) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb deleted file mode 100644 index 39907156..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # = Lazy Load Hooks - # - # LazyLoadHooks allows \Rails to lazily load a lot of components and thus - # making the app boot faster. Because of this feature now there is no need to - # require +ActiveRecord::Base+ at boot time purely to apply - # configuration. Instead a hook is registered that applies configuration once - # +ActiveRecord::Base+ is loaded. Here +ActiveRecord::Base+ is - # used as example but this feature can be applied elsewhere too. - # - # Here is an example where on_load method is called to register a hook. - # - # initializer 'active_record.initialize_timezone' do - # ActiveSupport.on_load(:active_record) do - # self.time_zone_aware_attributes = true - # self.default_timezone = :utc - # end - # end - # - # When the entirety of +ActiveRecord::Base+ has been - # evaluated then run_load_hooks is invoked. The very last line of - # +ActiveRecord::Base+ is: - # - # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) - # - # run_load_hooks will then execute all the hooks that were registered - # with the on_load method. In the case of the above example, it will - # execute the block of code that is in the +initializer+. - # - # Registering a hook that has already run results in that hook executing - # immediately. This allows hooks to be nested for code that relies on - # multiple lazily loaded components: - # - # initializer "action_text.renderer" do - # ActiveSupport.on_load(:action_controller_base) do - # ActiveSupport.on_load(:action_text_content) do - # self.default_renderer = Class.new(ActionController::Base).renderer - # end - # end - # end - module LazyLoadHooks - def self.extended(base) # :nodoc: - base.class_eval do - @load_hooks = Hash.new { |h, k| h[k] = [] } - @loaded = Hash.new { |h, k| h[k] = [] } - @run_once = Hash.new { |h, k| h[k] = [] } - end - end - - # Declares a block that will be executed when a \Rails component is fully - # loaded. If the component has already loaded, the block is executed - # immediately. - # - # Options: - # - # * :yield - Yields the object that run_load_hooks to +block+. - # * :run_once - Given +block+ will run only once. - def on_load(name, options = {}, &block) - @loaded[name].each do |base| - execute_hook(name, base, options, block) - end - - @load_hooks[name] << [block, options] - end - - # Executes all blocks registered to +name+ via on_load, using +base+ as the - # evaluation context. - # - # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) - # - # In the case of the above example, it will execute all hooks registered - # for +:active_record+ within the class +ActiveRecord::Base+. - def run_load_hooks(name, base = Object) - @loaded[name] << base - @load_hooks[name].each do |hook, options| - execute_hook(name, base, options, hook) - end - end - - private - def with_execution_control(name, block, once) - unless @run_once[name].include?(block) - @run_once[name] << block if once - - yield - end - end - - def execute_hook(name, base, options, block) - with_execution_control(name, block, options[:run_once]) do - if options[:yield] - block.call(base) - else - if base.is_a?(Module) - base.class_eval(&block) - else - base.instance_eval(&block) - end - end - end - end - end - - extend LazyLoadHooks -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/locale/en.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/locale/en.rb deleted file mode 100644 index 29eb9dec..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/locale/en.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -{ - en: { - number: { - nth: { - ordinals: lambda do |_key, options| - number = options[:number] - case number - when 1; "st" - when 2; "nd" - when 3; "rd" - when 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; "th" - else - num_modulo = number.to_i.abs % 100 - num_modulo %= 10 if num_modulo > 13 - case num_modulo - when 1; "st" - when 2; "nd" - when 3; "rd" - else "th" - end - end - end, - - ordinalized: lambda do |_key, options| - number = options[:number] - "#{number}#{ActiveSupport::Inflector.ordinal(number)}" - end - } - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/locale/en.yml b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/locale/en.yml deleted file mode 100644 index 52134208..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/locale/en.yml +++ /dev/null @@ -1,141 +0,0 @@ -en: - date: - formats: - # Use the strftime parameters for formats. - # When no format has been given, it uses default. - # You can provide other formats here if you like! - default: "%Y-%m-%d" - short: "%b %d" - long: "%B %d, %Y" - - day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday] - abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat] - - # Don't forget the nil at the beginning; there's no such thing as a 0th month - month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December] - abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] - # Used in date_select and datetime_select. - order: - - year - - month - - day - - time: - formats: - default: "%a, %d %b %Y %H:%M:%S %z" - short: "%d %b %H:%M" - long: "%B %d, %Y %H:%M" - am: "am" - pm: "pm" - -# Used in array.to_sentence. - support: - array: - words_connector: ", " - two_words_connector: " and " - last_word_connector: ", and " - number: - # Used in NumberHelper.number_to_delimited() - # These are also the defaults for 'currency', 'percentage', 'precision', and 'human' - format: - # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5) - separator: "." - # Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three) - delimiter: "," - # Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00) - precision: 3 - # Determine how rounding is performed (see BigDecimal::mode) - round_mode: default - # If set to true, precision will mean the number of significant digits instead - # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2) - significant: false - # If set, the zeros after the decimal separator will always be stripped (e.g.: 1.200 will be 1.2) - strip_insignificant_zeros: false - - # Used in NumberHelper.number_to_currency() - currency: - format: - # Where is the currency sign? %u is the currency unit, %n is the number (default: $5.00) - format: "%u%n" - negative_format: "-%u%n" - unit: "$" - # These six are to override number.format and are optional - separator: "." - delimiter: "," - precision: 2 - # round_mode: - significant: false - strip_insignificant_zeros: false - - # Used in NumberHelper.number_to_percentage() - percentage: - format: - # These five are to override number.format and are optional - # separator: - delimiter: "" - # precision: - # significant: false - # strip_insignificant_zeros: false - format: "%n%" - - # Used in NumberHelper.number_to_rounded() - precision: - format: - # These five are to override number.format and are optional - # separator: - delimiter: "" - # precision: - # significant: false - # strip_insignificant_zeros: false - - # Used in NumberHelper.number_to_human_size() and NumberHelper.number_to_human() - human: - format: - # These six are to override number.format and are optional - # separator: - delimiter: "" - precision: 3 - # round_mode: - significant: true - strip_insignificant_zeros: true - # Used in number_to_human_size() - storage_units: - # Storage units output formatting. - # %u is the storage unit, %n is the number (default: 2 MB) - format: "%n %u" - units: - byte: - one: "Byte" - other: "Bytes" - kb: "KB" - mb: "MB" - gb: "GB" - tb: "TB" - pb: "PB" - eb: "EB" - zb: "ZB" - # Used in NumberHelper.number_to_human() - decimal_units: - format: "%n %u" - # Decimal units output formatting - # By default we will only quantify some of the exponents - # but the commented ones might be defined or overridden - # by the user. - units: - # femto: Quadrillionth - # pico: Trillionth - # nano: Billionth - # micro: Millionth - # mili: Thousandth - # centi: Hundredth - # deci: Tenth - unit: "" - # ten: - # one: Ten - # other: Tens - # hundred: Hundred - thousand: Thousand - million: Million - billion: Billion - trillion: Trillion - quadrillion: Quadrillion diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/log_subscriber.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/log_subscriber.rb deleted file mode 100644 index 42df2a2f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/log_subscriber.rb +++ /dev/null @@ -1,192 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/class/attribute" -require "active_support/core_ext/enumerable" -require "active_support/subscriber" -require "active_support/deprecation/proxy_wrappers" - -module ActiveSupport - # = Active Support Log \Subscriber - # - # +ActiveSupport::LogSubscriber+ is an object set to consume - # ActiveSupport::Notifications with the sole purpose of logging them. - # The log subscriber dispatches notifications to a registered object based - # on its given namespace. - # - # An example would be Active Record log subscriber responsible for logging - # queries: - # - # module ActiveRecord - # class LogSubscriber < ActiveSupport::LogSubscriber - # attach_to :active_record - # - # def sql(event) - # info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}" - # end - # end - # end - # - # ActiveRecord::LogSubscriber.logger must be set as well, but it is assigned - # automatically in a \Rails environment. - # - # After configured, whenever a "sql.active_record" notification is - # published, it will properly dispatch the event - # (ActiveSupport::Notifications::Event) to the +sql+ method. - # - # Being an ActiveSupport::Notifications consumer, - # +ActiveSupport::LogSubscriber+ exposes a simple interface to check if - # instrumented code raises an exception. It is common to log a different - # message in case of an error, and this can be achieved by extending - # the previous example: - # - # module ActiveRecord - # class LogSubscriber < ActiveSupport::LogSubscriber - # def sql(event) - # exception = event.payload[:exception] - # - # if exception - # exception_object = event.payload[:exception_object] - # - # error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \ - # "(#{exception_object.backtrace.first})" - # else - # # standard logger code - # end - # end - # end - # end - # - # +ActiveSupport::LogSubscriber+ also has some helpers to deal with - # logging. For example, ActiveSupport::LogSubscriber.flush_all! will ensure - # that all logs are flushed, and it is called in Rails::Rack::Logger after a - # request finishes. - class LogSubscriber < Subscriber - # ANSI sequence modes - MODES = { - clear: 0, - bold: 1, - italic: 3, - underline: 4, - } - - # ANSI sequence colors - BLACK = "\e[30m" - RED = "\e[31m" - GREEN = "\e[32m" - YELLOW = "\e[33m" - BLUE = "\e[34m" - MAGENTA = "\e[35m" - CYAN = "\e[36m" - WHITE = "\e[37m" - - mattr_accessor :colorize_logging, default: true - class_attribute :log_levels, instance_accessor: false, default: {} # :nodoc: - - LEVEL_CHECKS = { - debug: -> (logger) { !logger.debug? }, - info: -> (logger) { !logger.info? }, - error: -> (logger) { !logger.error? }, - } - - class << self - def logger - @logger ||= if defined?(Rails) && Rails.respond_to?(:logger) - Rails.logger - end - end - - def attach_to(...) # :nodoc: - result = super - set_event_levels - result - end - - attr_writer :logger - - def log_subscribers - subscribers - end - - # Flush all log_subscribers' logger. - def flush_all! - logger.flush if logger.respond_to?(:flush) - end - - private - def fetch_public_methods(subscriber, inherit_all) - subscriber.public_methods(inherit_all) - LogSubscriber.public_instance_methods(true) - end - - def set_event_levels - if subscriber - subscriber.event_levels = log_levels.transform_keys { |k| "#{k}.#{namespace}" } - end - end - - def subscribe_log_level(method, level) - self.log_levels = log_levels.merge(method => LEVEL_CHECKS.fetch(level)) - set_event_levels - end - end - - def initialize - super - @event_levels = {} - end - - def logger - LogSubscriber.logger - end - - def silenced?(event) - logger.nil? || @event_levels[event]&.call(logger) - end - - def call(event) - super if logger - rescue => e - log_exception(event.name, e) - end - - def publish_event(event) - super if logger - rescue => e - log_exception(event.name, e) - end - - attr_writer :event_levels # :nodoc: - - private - %w(info debug warn error fatal unknown).each do |level| - class_eval <<-METHOD, __FILE__, __LINE__ + 1 - def #{level}(progname = nil, &block) - logger.#{level}(progname, &block) if logger - end - METHOD - end - - # Set color by using a symbol or one of the defined constants. Set modes - # by specifying bold, italic, or underline options. Inspired by Highline, - # this method will automatically clear formatting at the end of the returned String. - def color(text, color, mode_options = {}) # :doc: - return text unless colorize_logging - color = self.class.const_get(color.upcase) if color.is_a?(Symbol) - mode = mode_from(mode_options) - clear = "\e[#{MODES[:clear]}m" - "#{mode}#{color}#{text}#{clear}" - end - - def mode_from(options) - modes = MODES.values_at(*options.compact_blank.keys) - - "\e[#{modes.join(";")}m" if modes.any? - end - - def log_exception(name, e) - if logger - logger.error "Could not log #{name.inspect} event. #{e.class}: #{e.message} #{e.backtrace}" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/log_subscriber/test_helper.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/log_subscriber/test_helper.rb deleted file mode 100644 index b528a7fc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/log_subscriber/test_helper.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -require "active_support/log_subscriber" -require "active_support/logger" -require "active_support/notifications" - -module ActiveSupport - class LogSubscriber - # Provides some helpers to deal with testing log subscribers by setting up - # notifications. Take for instance Active Record subscriber tests: - # - # class SyncLogSubscriberTest < ActiveSupport::TestCase - # include ActiveSupport::LogSubscriber::TestHelper - # - # setup do - # ActiveRecord::LogSubscriber.attach_to(:active_record) - # end - # - # def test_basic_query_logging - # Developer.all.to_a - # wait - # assert_equal 1, @logger.logged(:debug).size - # assert_match(/Developer Load/, @logger.logged(:debug).last) - # assert_match(/SELECT \* FROM "developers"/, @logger.logged(:debug).last) - # end - # end - # - # All you need to do is to ensure that your log subscriber is added to - # Rails::Subscriber, as in the second line of the code above. The test - # helpers are responsible for setting up the queue and subscriptions, and - # turning colors in logs off. - # - # The messages are available in the @logger instance, which is a logger with - # limited powers (it actually does not send anything to your output), and - # you can collect them doing @logger.logged(level), where level is the level - # used in logging, like info, debug, warn, and so on. - module TestHelper - def setup # :nodoc: - @logger = MockLogger.new - @notifier = ActiveSupport::Notifications::Fanout.new - - ActiveSupport::LogSubscriber.colorize_logging = false - - @old_notifier = ActiveSupport::Notifications.notifier - set_logger(@logger) - ActiveSupport::Notifications.notifier = @notifier - end - - def teardown # :nodoc: - set_logger(nil) - ActiveSupport::Notifications.notifier = @old_notifier - end - - class MockLogger - include ActiveSupport::Logger::Severity - - attr_reader :flush_count - attr_accessor :level - - def initialize(level = DEBUG) - @flush_count = 0 - @level = level - @logged = Hash.new { |h, k| h[k] = [] } - end - - def method_missing(level, message = nil) - if block_given? - @logged[level] << yield - else - @logged[level] << message - end - end - - def logged(level) - @logged[level].compact.map { |l| l.to_s.strip } - end - - def flush - @flush_count += 1 - end - - ActiveSupport::Logger::Severity.constants.each do |severity| - class_eval <<-EOT, __FILE__, __LINE__ + 1 - def #{severity.downcase}? - #{severity} >= @level - end - EOT - end - end - - # Wait notifications to be published. - def wait - @notifier.wait - end - - # Overwrite if you use another logger in your log subscriber. - # - # def logger - # ActiveRecord::Base.logger = @logger - # end - def set_logger(logger) - ActiveSupport::LogSubscriber.logger = logger - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger.rb deleted file mode 100644 index 09ea81f5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -require "active_support/logger_silence" -require "active_support/logger_thread_safe_level" -require "logger" - -module ActiveSupport - class Logger < ::Logger - include LoggerSilence - - # Returns true if the logger destination matches one of the sources - # - # logger = Logger.new(STDOUT) - # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) - # # => true - # - # logger = Logger.new('/var/log/rails.log') - # ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') - # # => true - def self.logger_outputs_to?(logger, *sources) - loggers = if logger.is_a?(BroadcastLogger) - logger.broadcasts - else - [logger] - end - - logdevs = loggers.map { |logger| logger.instance_variable_get(:@logdev) } - logger_sources = logdevs.filter_map { |logdev| logdev.try(:filename) || logdev.try(:dev) } - - normalize_sources(sources).intersect?(normalize_sources(logger_sources)) - end - - def initialize(*args, **kwargs) - super - @formatter ||= SimpleFormatter.new - end - - # Simple formatter which only displays the message. - class SimpleFormatter < ::Logger::Formatter - # This method is invoked when a log event occurs - def call(severity, timestamp, progname, msg) - "#{String === msg ? msg : msg.inspect}\n" - end - end - - private - def self.normalize_sources(sources) - sources.map do |source| - source = source.path if source.respond_to?(:path) - source = File.realpath(source) if source.is_a?(String) && File.exist?(source) - source - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger_silence.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger_silence.rb deleted file mode 100644 index 8567eff4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger_silence.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -require "active_support/concern" -require "active_support/core_ext/module/attribute_accessors" -require "active_support/logger_thread_safe_level" - -module ActiveSupport - module LoggerSilence - extend ActiveSupport::Concern - - included do - cattr_accessor :silencer, default: true - include ActiveSupport::LoggerThreadSafeLevel - end - - # Silences the logger for the duration of the block. - def silence(severity = Logger::ERROR) - silencer ? log_at(severity) { yield self } : yield(self) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger_thread_safe_level.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger_thread_safe_level.rb deleted file mode 100644 index 39d6fe9d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/logger_thread_safe_level.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -require "active_support/concern" -require "logger" - -module ActiveSupport - module LoggerThreadSafeLevel # :nodoc: - extend ActiveSupport::Concern - - def local_level - IsolatedExecutionState[local_level_key] - end - - def local_level=(level) - case level - when Integer - when Symbol - level = Logger::Severity.const_get(level.to_s.upcase) - when nil - else - raise ArgumentError, "Invalid log level: #{level.inspect}" - end - if level.nil? - IsolatedExecutionState.delete(local_level_key) - else - IsolatedExecutionState[local_level_key] = level - end - end - - def level - local_level || super - end - - # Change the thread-local level for the duration of the given block. - def log_at(level) - old_local_level, self.local_level = local_level, level - yield - ensure - self.local_level = old_local_level - end - - private - def local_level_key - @local_level_key ||= :"logger_thread_safe_level_#{object_id}" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_encryptor.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_encryptor.rb deleted file mode 100644 index af0b20e1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_encryptor.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -require "openssl" -require "base64" -require "active_support/core_ext/module/attribute_accessors" -require "active_support/messages/codec" -require "active_support/messages/rotator" -require "active_support/message_verifier" - -module ActiveSupport - # = Active Support Message Encryptor - # - # MessageEncryptor is a simple way to encrypt values which get stored - # somewhere you don't trust. - # - # The cipher text and initialization vector are base64 encoded and returned - # to you. - # - # This can be used in situations similar to the MessageVerifier, but - # where you don't want users to be able to determine the value of the payload. - # - # len = ActiveSupport::MessageEncryptor.key_len - # salt = SecureRandom.random_bytes(len) - # key = ActiveSupport::KeyGenerator.new('password').generate_key(salt, len) # => "\x89\xE0\x156\xAC..." - # crypt = ActiveSupport::MessageEncryptor.new(key) # => # - # encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..." - # crypt.decrypt_and_verify(encrypted_data) # => "my secret data" - # - # The +decrypt_and_verify+ method will raise an - # +ActiveSupport::MessageEncryptor::InvalidMessage+ exception if the data - # provided cannot be decrypted or verified. - # - # crypt.decrypt_and_verify('not encrypted data') # => ActiveSupport::MessageEncryptor::InvalidMessage - # - # === Confining messages to a specific purpose - # - # By default any message can be used throughout your app. But they can also be - # confined to a specific +:purpose+. - # - # token = crypt.encrypt_and_sign("this is the chair", purpose: :login) - # - # Then that same purpose must be passed when verifying to get the data back out: - # - # crypt.decrypt_and_verify(token, purpose: :login) # => "this is the chair" - # crypt.decrypt_and_verify(token, purpose: :shipping) # => nil - # crypt.decrypt_and_verify(token) # => nil - # - # Likewise, if a message has no purpose it won't be returned when verifying with - # a specific purpose. - # - # token = crypt.encrypt_and_sign("the conversation is lively") - # crypt.decrypt_and_verify(token, purpose: :scare_tactics) # => nil - # crypt.decrypt_and_verify(token) # => "the conversation is lively" - # - # === Making messages expire - # - # By default messages last forever and verifying one year from now will still - # return the original value. But messages can be set to expire at a given - # time with +:expires_in+ or +:expires_at+. - # - # crypt.encrypt_and_sign(parcel, expires_in: 1.month) - # crypt.encrypt_and_sign(doowad, expires_at: Time.now.end_of_year) - # - # Then the messages can be verified and returned up to the expire time. - # Thereafter, verifying returns +nil+. - # - # === Rotating keys - # - # MessageEncryptor also supports rotating out old configurations by falling - # back to a stack of encryptors. Call +rotate+ to build and add an encryptor - # so +decrypt_and_verify+ will also try the fallback. - # - # By default any rotated encryptors use the values of the primary - # encryptor unless specified otherwise. - # - # You'd give your encryptor the new defaults: - # - # crypt = ActiveSupport::MessageEncryptor.new(@secret, cipher: "aes-256-gcm") - # - # Then gradually rotate the old values out by adding them as fallbacks. Any message - # generated with the old values will then work until the rotation is removed. - # - # crypt.rotate old_secret # Fallback to an old secret instead of @secret. - # crypt.rotate cipher: "aes-256-cbc" # Fallback to an old cipher instead of aes-256-gcm. - # - # Though if both the secret and the cipher was changed at the same time, - # the above should be combined into: - # - # crypt.rotate old_secret, cipher: "aes-256-cbc" - class MessageEncryptor < Messages::Codec - prepend Messages::Rotator - - cattr_accessor :use_authenticated_message_encryption, instance_accessor: false, default: false - - class << self - def default_cipher # :nodoc: - if use_authenticated_message_encryption - "aes-256-gcm" - else - "aes-256-cbc" - end - end - end - - module NullSerializer # :nodoc: - def self.load(value) - value - end - - def self.dump(value) - value - end - end - - class InvalidMessage < StandardError; end - OpenSSLCipherError = OpenSSL::Cipher::CipherError - - AUTH_TAG_LENGTH = 16 # :nodoc: - SEPARATOR = "--" # :nodoc: - - # Initialize a new MessageEncryptor. +secret+ must be at least as long as - # the cipher key size. For the default 'aes-256-gcm' cipher, this is 256 - # bits. If you are using a user-entered secret, you can generate a suitable - # key by using ActiveSupport::KeyGenerator or a similar key - # derivation function. - # - # The first additional parameter is used as the signature key for - # MessageVerifier. This allows you to specify keys to encrypt and sign - # data. Ignored when using an AEAD cipher like 'aes-256-gcm'. - # - # ActiveSupport::MessageEncryptor.new('secret', 'signature_secret') - # - # ==== Options - # - # [+:cipher+] - # Cipher to use. Can be any cipher returned by +OpenSSL::Cipher.ciphers+. - # Default is 'aes-256-gcm'. - # - # [+:digest+] - # Digest used for signing. Ignored when using an AEAD cipher like - # 'aes-256-gcm'. - # - # [+:serializer+] - # The serializer used to serialize message data. You can specify any - # object that responds to +dump+ and +load+, or you can choose from - # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, - # +:json+, +:message_pack_allow_marshal+, +:message_pack+. - # - # The preconfigured serializers include a fallback mechanism to support - # multiple deserialization formats. For example, the +:marshal+ serializer - # will serialize using +Marshal+, but can deserialize using +Marshal+, - # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy - # to migrate between serializers. - # - # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ - # serializers support deserializing using +Marshal+, but the others do - # not. Beware that +Marshal+ is a potential vector for deserialization - # attacks in cases where a message signing secret has been leaked. If - # possible, choose a serializer that does not support +Marshal+. - # - # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use - # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are - # not supported by JSON, and may provide improved performance. However, - # these require the +msgpack+ gem. - # - # When using \Rails, the default depends on +config.active_support.message_serializer+. - # Otherwise, the default is +:marshal+. - # - # [+:url_safe+] - # By default, MessageEncryptor generates RFC 4648 compliant strings - # which are not URL-safe. In other words, they can contain "+" and "/". - # If you want to generate URL-safe strings (in compliance with "Base 64 - # Encoding with URL and Filename Safe Alphabet" in RFC 4648), you can - # pass +true+. - # - # [+:force_legacy_metadata_serializer+] - # Whether to use the legacy metadata serializer, which serializes the - # message first, then wraps it in an envelope which is also serialized. This - # was the default in \Rails 7.0 and below. - # - # If you don't pass a truthy value, the default is set using - # +config.active_support.use_message_serializer_for_metadata+. - def initialize(secret, sign_secret = nil, **options) - super(**options) - @secret = secret - @cipher = options[:cipher] || self.class.default_cipher - @aead_mode = new_cipher.authenticated? - @verifier = if !@aead_mode - MessageVerifier.new(sign_secret || secret, **options, serializer: NullSerializer) - end - end - - # Encrypt and sign a message. We need to sign the message in order to avoid - # padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. - # - # ==== Options - # - # [+:expires_at+] - # The datetime at which the message expires. After this datetime, - # verification of the message will fail. - # - # message = encryptor.encrypt_and_sign("hello", expires_at: Time.now.tomorrow) - # encryptor.decrypt_and_verify(message) # => "hello" - # # 24 hours later... - # encryptor.decrypt_and_verify(message) # => nil - # - # [+:expires_in+] - # The duration for which the message is valid. After this duration has - # elapsed, verification of the message will fail. - # - # message = encryptor.encrypt_and_sign("hello", expires_in: 24.hours) - # encryptor.decrypt_and_verify(message) # => "hello" - # # 24 hours later... - # encryptor.decrypt_and_verify(message) # => nil - # - # [+:purpose+] - # The purpose of the message. If specified, the same purpose must be - # specified when verifying the message; otherwise, verification will fail. - # (See #decrypt_and_verify.) - def encrypt_and_sign(value, **options) - create_message(value, **options) - end - - # Decrypt and verify a message. We need to verify the message in order to - # avoid padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. - # - # ==== Options - # - # [+:purpose+] - # The purpose that the message was generated with. If the purpose does not - # match, +decrypt_and_verify+ will return +nil+. - # - # message = encryptor.encrypt_and_sign("hello", purpose: "greeting") - # encryptor.decrypt_and_verify(message, purpose: "greeting") # => "hello" - # encryptor.decrypt_and_verify(message) # => nil - # - # message = encryptor.encrypt_and_sign("bye") - # encryptor.decrypt_and_verify(message) # => "bye" - # encryptor.decrypt_and_verify(message, purpose: "greeting") # => nil - # - def decrypt_and_verify(message, **options) - catch_and_raise :invalid_message_format, as: InvalidMessage do - catch_and_raise :invalid_message_serialization, as: InvalidMessage do - catch_and_ignore :invalid_message_content do - read_message(message, **options) - end - end - end - end - - # Given a cipher, returns the key length of the cipher to help generate the key of desired size - def self.key_len(cipher = default_cipher) - OpenSSL::Cipher.new(cipher).key_len - end - - def create_message(value, **options) # :nodoc: - sign(encrypt(serialize_with_metadata(value, **options))) - end - - def read_message(message, **options) # :nodoc: - deserialize_with_metadata(decrypt(verify(message)), **options) - end - - def inspect # :nodoc: - "#<#{self.class.name}:#{'%#016x' % (object_id << 1)}>" - end - - private - def sign(data) - @verifier ? @verifier.create_message(data) : data - end - - def verify(data) - @verifier ? @verifier.read_message(data) : data - end - - def encrypt(data) - cipher = new_cipher - cipher.encrypt - cipher.key = @secret - - # Rely on OpenSSL for the initialization vector - iv = cipher.random_iv - cipher.auth_data = "" if aead_mode? - - encrypted_data = cipher.update(data) - encrypted_data << cipher.final - - parts = [encrypted_data, iv] - parts << cipher.auth_tag(AUTH_TAG_LENGTH) if aead_mode? - - join_parts(parts) - end - - def decrypt(encrypted_message) - cipher = new_cipher - encrypted_data, iv, auth_tag = extract_parts(encrypted_message) - - # Currently the OpenSSL bindings do not raise an error if auth_tag is - # truncated, which would allow an attacker to easily forge it. See - # https://github.com/ruby/openssl/issues/63 - if aead_mode? && auth_tag.bytesize != AUTH_TAG_LENGTH - throw :invalid_message_format, "truncated auth_tag" - end - - cipher.decrypt - cipher.key = @secret - cipher.iv = iv - if aead_mode? - cipher.auth_tag = auth_tag - cipher.auth_data = "" - end - - decrypted_data = cipher.update(encrypted_data) - decrypted_data << cipher.final - rescue OpenSSLCipherError => error - throw :invalid_message_format, error - end - - def length_after_encode(length_before_encode) - if @url_safe - (4 * length_before_encode / 3.0).ceil # length without padding - else - 4 * (length_before_encode / 3.0).ceil # length with padding - end - end - - def length_of_encoded_iv - @length_of_encoded_iv ||= length_after_encode(new_cipher.iv_len) - end - - def length_of_encoded_auth_tag - @length_of_encoded_auth_tag ||= length_after_encode(AUTH_TAG_LENGTH) - end - - def join_parts(parts) - parts.map! { |part| encode(part) }.join(SEPARATOR) - end - - def extract_part(encrypted_message, rindex, length) - index = rindex - length - - if encrypted_message[index - SEPARATOR.length, SEPARATOR.length] == SEPARATOR - encrypted_message[index, length] - else - throw :invalid_message_format, "missing separator" - end - end - - def extract_parts(encrypted_message) - parts = [] - rindex = encrypted_message.length - - if aead_mode? - parts << extract_part(encrypted_message, rindex, length_of_encoded_auth_tag) - rindex -= SEPARATOR.length + length_of_encoded_auth_tag - end - - parts << extract_part(encrypted_message, rindex, length_of_encoded_iv) - rindex -= SEPARATOR.length + length_of_encoded_iv - - parts << encrypted_message[0, rindex] - - parts.reverse!.map! { |part| decode(part) } - end - - def new_cipher - OpenSSL::Cipher.new(@cipher) - end - - attr_reader :aead_mode - alias :aead_mode? :aead_mode - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_encryptors.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_encryptors.rb deleted file mode 100644 index aa327404..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_encryptors.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -require "active_support/messages/rotation_coordinator" - -module ActiveSupport - class MessageEncryptors < Messages::RotationCoordinator - ## - # :attr_accessor: transitional - # - # If true, the first two rotation option sets are swapped when building - # message encryptors. For example, with the following configuration, message - # encryptors will encrypt messages using serializer: Marshal, url_safe: true, - # and will able to decrypt messages that were encrypted using any of the - # three option sets: - # - # encryptors = ActiveSupport::MessageEncryptors.new { ... } - # encryptors.rotate(serializer: JSON, url_safe: true) - # encryptors.rotate(serializer: Marshal, url_safe: true) - # encryptors.rotate(serializer: Marshal, url_safe: false) - # encryptors.transitional = true - # - # This can be useful when performing a rolling deploy of an application, - # wherein servers that have not yet been updated must still be able to - # decrypt messages from updated servers. In such a scenario, first perform a - # rolling deploy with the new rotation (e.g. serializer: JSON, url_safe: true) - # as the first rotation and transitional = true. Then, after all - # servers have been updated, perform a second rolling deploy with - # transitional = false. - - ## - # :singleton-method: new - # :call-seq: new(&secret_generator) - # - # Initializes a new instance. +secret_generator+ must accept a salt and a - # +secret_length+ kwarg, and return a suitable secret (string) or secrets - # (array of strings). +secret_generator+ may also accept other arbitrary - # kwargs. If #rotate is called with any options matching those kwargs, those - # options will be passed to +secret_generator+ instead of to the message - # encryptor. - # - # encryptors = ActiveSupport::MessageEncryptors.new do |salt, secret_length:, base:| - # MySecretGenerator.new(base).generate(salt, secret_length) - # end - # - # encryptors.rotate(base: "...") - - ## - # :method: [] - # :call-seq: [](salt) - # - # Returns a MessageEncryptor configured with a secret derived from the - # given +salt+, and options from #rotate. MessageEncryptor instances will - # be memoized, so the same +salt+ will return the same instance. - - ## - # :method: []= - # :call-seq: []=(salt, encryptor) - # - # Overrides a MessageEncryptor instance associated with a given +salt+. - - ## - # :method: rotate - # :call-seq: - # rotate(**options) - # rotate(&block) - # - # Adds +options+ to the list of option sets. Messages will be encrypted - # using the first set in the list. When decrypting, however, each set will - # be tried, in order, until one succeeds. - # - # Notably, the +:secret_generator+ option can specify a different secret - # generator than the one initially specified. The secret generator must - # respond to +call+, accept a salt and a +secret_length+ kwarg, and return - # a suitable secret (string) or secrets (array of strings). The secret - # generator may also accept other arbitrary kwargs. - # - # If any options match the kwargs of the operative secret generator, those - # options will be passed to the secret generator instead of to the message - # encryptor. - # - # For fine-grained per-salt rotations, a block form is supported. The block - # will receive the salt, and should return an appropriate options Hash. The - # block may also return +nil+ to indicate that the rotation does not apply - # to the given salt. For example: - # - # encryptors = ActiveSupport::MessageEncryptors.new { ... } - # - # encryptors.rotate do |salt| - # case salt - # when :foo - # { serializer: JSON, url_safe: true } - # when :bar - # { serializer: Marshal, url_safe: true } - # end - # end - # - # encryptors.rotate(serializer: Marshal, url_safe: false) - # - # # Uses `serializer: JSON, url_safe: true`. - # # Falls back to `serializer: Marshal, url_safe: false`. - # encryptors[:foo] - # - # # Uses `serializer: Marshal, url_safe: true`. - # # Falls back to `serializer: Marshal, url_safe: false`. - # encryptors[:bar] - # - # # Uses `serializer: Marshal, url_safe: false`. - # encryptors[:baz] - - ## - # :method: rotate_defaults - # :call-seq: rotate_defaults - # - # Invokes #rotate with the default options. - - ## - # :method: clear_rotations - # :call-seq: clear_rotations - # - # Clears the list of option sets. - - ## - # :method: on_rotation - # :call-seq: on_rotation(&callback) - # - # Sets a callback to invoke when a message is decrypted using an option set - # other than the first. - # - # For example, this callback could log each time it is called, and thus - # indicate whether old option sets are still in use or can be removed from - # rotation. - - ## - private - def build(salt, secret_generator:, secret_generator_options:, **options) - secret_length = MessageEncryptor.key_len(*options[:cipher]) - secret = secret_generator.call(salt, secret_length: secret_length, **secret_generator_options) - MessageEncryptor.new(*Array(secret), **options) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack.rb deleted file mode 100644 index 3ce2c07b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -begin - gem "msgpack", ">= 1.7.0" - require "msgpack" -rescue LoadError => error - warn "ActiveSupport::MessagePack requires the msgpack gem, version 1.7.0 or later. " \ - "Please add it to your Gemfile: `gem \"msgpack\", \">= 1.7.0\"`" - raise error -end - -require_relative "message_pack/cache_serializer" -require_relative "message_pack/serializer" - -module ActiveSupport - module MessagePack - extend Serializer - - ## - # :singleton-method: dump - # :call-seq: dump(object) - # - # Dumps an object. Raises ActiveSupport::MessagePack::UnserializableObjectError - # if the object type is not supported. - # - #-- - # Implemented by Serializer#dump. - - ## - # :singleton-method: load - # :call-seq: load(dumped) - # - # Loads an object dump created by ::dump. - # - #-- - # Implemented by Serializer#load. - - ## - # :singleton-method: signature? - # :call-seq: signature?(dumped) - # - # Returns true if the given dump begins with an +ActiveSupport::MessagePack+ - # signature. - # - #-- - # Implemented by Serializer#signature?. - - ActiveSupport.run_load_hooks(:message_pack, self) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/cache_serializer.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/cache_serializer.rb deleted file mode 100644 index a7f4958e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/cache_serializer.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -require_relative "serializer" - -module ActiveSupport - module MessagePack - module CacheSerializer - include Serializer - extend self - - def load(dumped) - super - rescue ActiveSupport::MessagePack::MissingClassError - # Treat missing class as cache miss => return nil - end - - private - def install_unregistered_type_handler - Extensions.install_unregistered_type_fallback(message_pack_factory) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/extensions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/extensions.rb deleted file mode 100644 index 3e3ba64c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/extensions.rb +++ /dev/null @@ -1,305 +0,0 @@ -# frozen_string_literal: true - -require "bigdecimal" -require "date" -require "ipaddr" -require "pathname" -require "uri/generic" -require "msgpack/bigint" -require "active_support/hash_with_indifferent_access" -require "active_support/time" - -module ActiveSupport - module MessagePack - class UnserializableObjectError < StandardError; end - class MissingClassError < StandardError; end # :nodoc: - - module Extensions # :nodoc: - extend self - - def install(registry) - registry.register_type 0, Symbol, - packer: :to_msgpack_ext, - unpacker: :from_msgpack_ext, - optimized_symbols_parsing: true - - registry.register_type 1, Integer, - packer: ::MessagePack::Bigint.method(:to_msgpack_ext), - unpacker: ::MessagePack::Bigint.method(:from_msgpack_ext), - oversized_integer_extension: true - - registry.register_type 2, BigDecimal, - packer: :_dump, - unpacker: :_load - - registry.register_type 3, Rational, - packer: method(:write_rational), - unpacker: method(:read_rational), - recursive: true - - registry.register_type 4, Complex, - packer: method(:write_complex), - unpacker: method(:read_complex), - recursive: true - - registry.register_type 5, DateTime, - packer: method(:write_datetime), - unpacker: method(:read_datetime), - recursive: true - - registry.register_type 6, Date, - packer: method(:write_date), - unpacker: method(:read_date), - recursive: true - - registry.register_type 7, Time, - packer: method(:write_time), - unpacker: method(:read_time), - recursive: true - - registry.register_type 8, ActiveSupport::TimeWithZone, - packer: method(:write_time_with_zone), - unpacker: method(:read_time_with_zone), - recursive: true - - registry.register_type 9, ActiveSupport::TimeZone, - packer: method(:dump_time_zone), - unpacker: method(:load_time_zone) - - registry.register_type 10, ActiveSupport::Duration, - packer: method(:write_duration), - unpacker: method(:read_duration), - recursive: true - - registry.register_type 11, Range, - packer: method(:write_range), - unpacker: method(:read_range), - recursive: true - - registry.register_type 12, Set, - packer: method(:write_set), - unpacker: method(:read_set), - recursive: true - - registry.register_type 13, URI::Generic, - packer: :to_s, - unpacker: URI.method(:parse) - - registry.register_type 14, IPAddr, - packer: method(:write_ipaddr), - unpacker: method(:read_ipaddr), - recursive: true - - registry.register_type 15, Pathname, - packer: :to_s, - unpacker: :new - - registry.register_type 16, Regexp, - packer: :to_s, - unpacker: :new - - registry.register_type 17, ActiveSupport::HashWithIndifferentAccess, - packer: method(:write_hash_with_indifferent_access), - unpacker: method(:read_hash_with_indifferent_access), - recursive: true - end - - def install_unregistered_type_error(registry) - registry.register_type 127, Object, - packer: method(:raise_unserializable), - unpacker: method(:raise_invalid_format) - end - - def install_unregistered_type_fallback(registry) - registry.register_type 127, Object, - packer: method(:write_object), - unpacker: method(:read_object), - recursive: true - end - - def write_rational(rational, packer) - packer.write(rational.numerator) - packer.write(rational.denominator) unless rational.numerator.zero? - end - - def read_rational(unpacker) - numerator = unpacker.read - Rational(numerator, numerator.zero? ? 1 : unpacker.read) - end - - def write_complex(complex, packer) - packer.write(complex.real) - packer.write(complex.imaginary) - end - - def read_complex(unpacker) - Complex(unpacker.read, unpacker.read) - end - - def write_datetime(datetime, packer) - packer.write(datetime.jd) - packer.write(datetime.hour) - packer.write(datetime.min) - packer.write(datetime.sec) - write_rational(datetime.sec_fraction, packer) - write_rational(datetime.offset, packer) - end - - def read_datetime(unpacker) - DateTime.jd(unpacker.read, unpacker.read, unpacker.read, unpacker.read + read_rational(unpacker), read_rational(unpacker)) - end - - def write_date(date, packer) - packer.write(date.jd) - end - - def read_date(unpacker) - Date.jd(unpacker.read) - end - - def write_time(time, packer) - packer.write(time.tv_sec) - packer.write(time.tv_nsec) - packer.write(time.utc_offset) - end - - def read_time(unpacker) - Time.at_without_coercion(unpacker.read, unpacker.read, :nanosecond, in: unpacker.read) - end - - def write_time_with_zone(twz, packer) - write_time(twz.utc, packer) - write_time_zone(twz.time_zone, packer) - end - - def read_time_with_zone(unpacker) - ActiveSupport::TimeWithZone.new(read_time(unpacker), read_time_zone(unpacker)) - end - - def dump_time_zone(time_zone) - time_zone.name - end - - def load_time_zone(name) - ActiveSupport::TimeZone[name] - end - - def write_time_zone(time_zone, packer) - packer.write(dump_time_zone(time_zone)) - end - - def read_time_zone(unpacker) - load_time_zone(unpacker.read) - end - - def write_duration(duration, packer) - packer.write(duration.value) - packer.write(duration._parts.values_at(*ActiveSupport::Duration::PARTS)) - end - - def read_duration(unpacker) - value = unpacker.read - parts = ActiveSupport::Duration::PARTS.zip(unpacker.read).to_h - parts.compact! - ActiveSupport::Duration.new(value, parts) - end - - def write_range(range, packer) - packer.write(range.begin) - packer.write(range.end) - packer.write(range.exclude_end?) - end - - def read_range(unpacker) - Range.new(unpacker.read, unpacker.read, unpacker.read) - end - - def write_set(set, packer) - packer.write(set.to_a) - end - - def read_set(unpacker) - Set.new(unpacker.read) - end - - def write_ipaddr(ipaddr, packer) - if ipaddr.prefix < 32 || (ipaddr.ipv6? && ipaddr.prefix < 128) - packer.write("#{ipaddr}/#{ipaddr.prefix}") - else - packer.write(ipaddr.to_s) - end - end - - def read_ipaddr(unpacker) - IPAddr.new(unpacker.read) - end - - def write_hash_with_indifferent_access(hwia, packer) - packer.write(hwia.to_h) - end - - def read_hash_with_indifferent_access(unpacker) - ActiveSupport::HashWithIndifferentAccess.new(unpacker.read) - end - - def raise_unserializable(object, *) - raise UnserializableObjectError, "Unsupported type #{object.class} for object #{object.inspect}" - end - - def raise_invalid_format(*) - raise "Invalid format" - end - - def dump_class(klass) - raise UnserializableObjectError, "Cannot serialize anonymous class" unless klass.name - klass.name - end - - def load_class(name) - Object.const_get(name) - rescue NameError => error - if error.name.to_s == name - raise MissingClassError, "Missing class: #{name}" - else - raise - end - end - - def write_class(klass, packer) - packer.write(dump_class(klass)) - end - - def read_class(unpacker) - load_class(unpacker.read) - end - - LOAD_WITH_MSGPACK_EXT = 0 - LOAD_WITH_JSON_CREATE = 1 - - def write_object(object, packer) - if object.class.respond_to?(:from_msgpack_ext) - packer.write(LOAD_WITH_MSGPACK_EXT) - write_class(object.class, packer) - packer.write(object.to_msgpack_ext) - elsif object.class.respond_to?(:json_create) - packer.write(LOAD_WITH_JSON_CREATE) - write_class(object.class, packer) - packer.write(object.as_json) - else - raise_unserializable(object) - end - end - - def read_object(unpacker) - case unpacker.read - when LOAD_WITH_MSGPACK_EXT - read_class(unpacker).from_msgpack_ext(unpacker.read) - when LOAD_WITH_JSON_CREATE - read_class(unpacker).json_create(unpacker.read) - else - raise_invalid_format - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/serializer.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/serializer.rb deleted file mode 100644 index c5ce8e18..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_pack/serializer.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -require_relative "extensions" - -module ActiveSupport - module MessagePack - module Serializer # :nodoc: - SIGNATURE = "\xCC\x80".b.freeze # == 128.to_msgpack - SIGNATURE_INT = 128 - - def dump(object) - message_pack_pool.packer do |packer| - packer.write(SIGNATURE_INT) - packer.write(object) - packer.full_pack - end - end - - def load(dumped) - message_pack_pool.unpacker do |unpacker| - unpacker.feed_reference(dumped) - raise "Invalid serialization format" unless unpacker.read == SIGNATURE_INT - unpacker.full_unpack - end - end - - def signature?(dumped) - dumped.getbyte(0) == SIGNATURE.getbyte(0) && dumped.getbyte(1) == SIGNATURE.getbyte(1) - end - - def message_pack_factory - @message_pack_factory ||= ::MessagePack::Factory.new - end - - def message_pack_factory=(factory) - @message_pack_pool = nil - @message_pack_factory = factory - end - - delegate :register_type, to: :message_pack_factory - - def warmup - message_pack_pool # eagerly compute - end - - private - def message_pack_pool - @message_pack_pool ||= begin - unless message_pack_factory.frozen? - Extensions.install(message_pack_factory) - install_unregistered_type_handler - message_pack_factory.freeze - end - message_pack_factory.pool(ENV.fetch("RAILS_MAX_THREADS", 5).to_i) - end - end - - def install_unregistered_type_handler - Extensions.install_unregistered_type_error(message_pack_factory) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_verifier.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_verifier.rb deleted file mode 100644 index b89ed55f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_verifier.rb +++ /dev/null @@ -1,377 +0,0 @@ -# frozen_string_literal: true - -require "openssl" -require "base64" -require "active_support/core_ext/object/blank" -require "active_support/security_utils" -require "active_support/messages/codec" -require "active_support/messages/rotator" - -module ActiveSupport - # = Active Support Message Verifier - # - # +MessageVerifier+ makes it easy to generate and verify messages which are - # signed to prevent tampering. - # - # In a \Rails application, you can use +Rails.application.message_verifier+ - # to manage unique instances of verifiers for each use case. - # {Learn more}[link:classes/Rails/Application.html#method-i-message_verifier]. - # - # This is useful for cases like remember-me tokens and auto-unsubscribe links - # where the session store isn't suitable or available. - # - # First, generate a signed message: - # cookies[:remember_me] = Rails.application.message_verifier(:remember_me).generate([@user.id, 2.weeks.from_now]) - # - # Later verify that message: - # - # id, time = Rails.application.message_verifier(:remember_me).verify(cookies[:remember_me]) - # if time.future? - # self.current_user = User.find(id) - # end - # - # === Signing is not encryption - # - # The signed messages are not encrypted. The payload is merely encoded (Base64 by default) and can be decoded by - # anyone. The signature is just assuring that the message wasn't tampered with. For example: - # - # message = Rails.application.message_verifier('my_purpose').generate('never put secrets here') - # # => "BAhJIhtuZXZlciBwdXQgc2VjcmV0cyBoZXJlBjoGRVQ=--a0c1c0827919da5e949e989c971249355735e140" - # Base64.decode64(message.split("--").first) # no key needed - # # => 'never put secrets here' - # - # If you also need to encrypt the contents, you must use ActiveSupport::MessageEncryptor instead. - # - # === Confine messages to a specific purpose - # - # It's not recommended to use the same verifier for different purposes in your application. - # Doing so could allow a malicious actor to re-use a signed message to perform an unauthorized - # action. - # You can reduce this risk by confining signed messages to a specific +:purpose+. - # - # token = @verifier.generate("signed message", purpose: :login) - # - # Then that same purpose must be passed when verifying to get the data back out: - # - # @verifier.verified(token, purpose: :login) # => "signed message" - # @verifier.verified(token, purpose: :shipping) # => nil - # @verifier.verified(token) # => nil - # - # @verifier.verify(token, purpose: :login) # => "signed message" - # @verifier.verify(token, purpose: :shipping) # => raises ActiveSupport::MessageVerifier::InvalidSignature - # @verifier.verify(token) # => raises ActiveSupport::MessageVerifier::InvalidSignature - # - # Likewise, if a message has no purpose it won't be returned when verifying with - # a specific purpose. - # - # token = @verifier.generate("signed message") - # @verifier.verified(token, purpose: :redirect) # => nil - # @verifier.verified(token) # => "signed message" - # - # @verifier.verify(token, purpose: :redirect) # => raises ActiveSupport::MessageVerifier::InvalidSignature - # @verifier.verify(token) # => "signed message" - # - # === Expiring messages - # - # By default messages last forever and verifying one year from now will still - # return the original value. But messages can be set to expire at a given - # time with +:expires_in+ or +:expires_at+. - # - # @verifier.generate("signed message", expires_in: 1.month) - # @verifier.generate("signed message", expires_at: Time.now.end_of_year) - # - # Messages can then be verified and returned until expiry. - # Thereafter, the +verified+ method returns +nil+ while +verify+ raises - # +ActiveSupport::MessageVerifier::InvalidSignature+. - # - # === Rotating keys - # - # MessageVerifier also supports rotating out old configurations by falling - # back to a stack of verifiers. Call +rotate+ to build and add a verifier so - # either +verified+ or +verify+ will also try verifying with the fallback. - # - # By default any rotated verifiers use the values of the primary - # verifier unless specified otherwise. - # - # You'd give your verifier the new defaults: - # - # verifier = ActiveSupport::MessageVerifier.new(@secret, digest: "SHA512", serializer: JSON) - # - # Then gradually rotate the old values out by adding them as fallbacks. Any message - # generated with the old values will then work until the rotation is removed. - # - # verifier.rotate(old_secret) # Fallback to an old secret instead of @secret. - # verifier.rotate(digest: "SHA256") # Fallback to an old digest instead of SHA512. - # verifier.rotate(serializer: Marshal) # Fallback to an old serializer instead of JSON. - # - # Though the above would most likely be combined into one rotation: - # - # verifier.rotate(old_secret, digest: "SHA256", serializer: Marshal) - class MessageVerifier < Messages::Codec - prepend Messages::Rotator - - class InvalidSignature < StandardError; end - - SEPARATOR = "--" # :nodoc: - SEPARATOR_LENGTH = SEPARATOR.length # :nodoc: - - # Initialize a new MessageVerifier with a secret for the signature. - # - # ==== Options - # - # [+:digest+] - # Digest used for signing. The default is "SHA1". See - # +OpenSSL::Digest+ for alternatives. - # - # [+:serializer+] - # The serializer used to serialize message data. You can specify any - # object that responds to +dump+ and +load+, or you can choose from - # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, - # +:json+, +:message_pack_allow_marshal+, +:message_pack+. - # - # The preconfigured serializers include a fallback mechanism to support - # multiple deserialization formats. For example, the +:marshal+ serializer - # will serialize using +Marshal+, but can deserialize using +Marshal+, - # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy - # to migrate between serializers. - # - # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ - # serializers support deserializing using +Marshal+, but the others do - # not. Beware that +Marshal+ is a potential vector for deserialization - # attacks in cases where a message signing secret has been leaked. If - # possible, choose a serializer that does not support +Marshal+. - # - # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use - # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are - # not supported by JSON, and may provide improved performance. However, - # these require the +msgpack+ gem. - # - # When using \Rails, the default depends on +config.active_support.message_serializer+. - # Otherwise, the default is +:marshal+. - # - # [+:url_safe+] - # By default, MessageVerifier generates RFC 4648 compliant strings which are - # not URL-safe. In other words, they can contain "+" and "/". If you want to - # generate URL-safe strings (in compliance with "Base 64 Encoding with URL - # and Filename Safe Alphabet" in RFC 4648), you can pass +true+. - # Note that MessageVerifier will always accept both URL-safe and URL-unsafe - # encoded messages, to allow a smooth transition between the two settings. - # - # [+:force_legacy_metadata_serializer+] - # Whether to use the legacy metadata serializer, which serializes the - # message first, then wraps it in an envelope which is also serialized. This - # was the default in \Rails 7.0 and below. - # - # If you don't pass a truthy value, the default is set using - # +config.active_support.use_message_serializer_for_metadata+. - def initialize(secret, **options) - raise ArgumentError, "Secret should not be nil." unless secret - super(**options) - @secret = secret - @digest = options[:digest]&.to_s || "SHA1" - end - - # Checks if a signed message could have been generated by signing an object - # with the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # signed_message = verifier.generate("signed message") - # verifier.valid_message?(signed_message) # => true - # - # tampered_message = signed_message.chop # editing the message invalidates the signature - # verifier.valid_message?(tampered_message) # => false - def valid_message?(message) - !!catch_and_ignore(:invalid_message_format) { extract_encoded(message) } - end - - # Decodes the signed message using the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # - # signed_message = verifier.generate("signed message") - # verifier.verified(signed_message) # => "signed message" - # - # Returns +nil+ if the message was not signed with the same secret. - # - # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") - # other_verifier.verified(signed_message) # => nil - # - # Returns +nil+ if the message is not Base64-encoded. - # - # invalid_message = "f--46a0120593880c733a53b6dad75b42ddc1c8996d" - # verifier.verified(invalid_message) # => nil - # - # Raises any error raised while decoding the signed message. - # - # incompatible_message = "test--dad7b06c94abba8d46a15fafaef56c327665d5ff" - # verifier.verified(incompatible_message) # => TypeError: incompatible marshal file format - # - # ==== Options - # - # [+:purpose+] - # The purpose that the message was generated with. If the purpose does not - # match, +verified+ will return +nil+. - # - # message = verifier.generate("hello", purpose: "greeting") - # verifier.verified(message, purpose: "greeting") # => "hello" - # verifier.verified(message, purpose: "chatting") # => nil - # verifier.verified(message) # => nil - # - # message = verifier.generate("bye") - # verifier.verified(message) # => "bye" - # verifier.verified(message, purpose: "greeting") # => nil - # - def verified(message, **options) - catch_and_ignore :invalid_message_format do - catch_and_raise :invalid_message_serialization do - catch_and_ignore :invalid_message_content do - read_message(message, **options) - end - end - end - end - - # Decodes the signed message using the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # signed_message = verifier.generate("signed message") - # - # verifier.verify(signed_message) # => "signed message" - # - # Raises +InvalidSignature+ if the message was not signed with the same - # secret or was not Base64-encoded. - # - # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") - # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature - # - # ==== Options - # - # [+:purpose+] - # The purpose that the message was generated with. If the purpose does not - # match, +verify+ will raise ActiveSupport::MessageVerifier::InvalidSignature. - # - # message = verifier.generate("hello", purpose: "greeting") - # verifier.verify(message, purpose: "greeting") # => "hello" - # verifier.verify(message, purpose: "chatting") # => raises InvalidSignature - # verifier.verify(message) # => raises InvalidSignature - # - # message = verifier.generate("bye") - # verifier.verify(message) # => "bye" - # verifier.verify(message, purpose: "greeting") # => raises InvalidSignature - # - def verify(message, **options) - catch_and_raise :invalid_message_format, as: InvalidSignature do - catch_and_raise :invalid_message_serialization do - catch_and_raise :invalid_message_content, as: InvalidSignature do - read_message(message, **options) - end - end - end - end - - # Generates a signed message for the provided value. - # - # The message is signed with the +MessageVerifier+'s secret. - # Returns Base64-encoded message joined with the generated signature. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # verifier.generate("signed message") # => "BAhJIhNzaWduZWQgbWVzc2FnZQY6BkVU--f67d5f27c3ee0b8483cebf2103757455e947493b" - # - # ==== Options - # - # [+:expires_at+] - # The datetime at which the message expires. After this datetime, - # verification of the message will fail. - # - # message = verifier.generate("hello", expires_at: Time.now.tomorrow) - # verifier.verified(message) # => "hello" - # # 24 hours later... - # verifier.verified(message) # => nil - # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature - # - # [+:expires_in+] - # The duration for which the message is valid. After this duration has - # elapsed, verification of the message will fail. - # - # message = verifier.generate("hello", expires_in: 24.hours) - # verifier.verified(message) # => "hello" - # # 24 hours later... - # verifier.verified(message) # => nil - # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature - # - # [+:purpose+] - # The purpose of the message. If specified, the same purpose must be - # specified when verifying the message; otherwise, verification will fail. - # (See #verified and #verify.) - def generate(value, **options) - create_message(value, **options) - end - - def create_message(value, **options) # :nodoc: - sign_encoded(encode(serialize_with_metadata(value, **options))) - end - - def read_message(message, **options) # :nodoc: - deserialize_with_metadata(decode(extract_encoded(message)), **options) - end - - def inspect # :nodoc: - "#<#{self.class.name}:#{'%#016x' % (object_id << 1)}>" - end - - private - def decode(encoded, url_safe: @url_safe) - catch :invalid_message_format do - return super - end - super(encoded, url_safe: !url_safe) - end - - def sign_encoded(encoded) - digest = generate_digest(encoded) - encoded << SEPARATOR << digest - end - - def extract_encoded(signed) - if signed.nil? || !signed.valid_encoding? - throw :invalid_message_format, "invalid message string" - end - - if separator_index = separator_index_for(signed) - encoded = signed[0, separator_index] - digest = signed[separator_index + SEPARATOR_LENGTH, digest_length_in_hex] - end - - unless digest_matches_data?(digest, encoded) - throw :invalid_message_format, "mismatched digest" - end - - encoded - end - - def generate_digest(data) - OpenSSL::HMAC.hexdigest(@digest, @secret, data) - end - - def digest_length_in_hex - # In hexadecimal (AKA base16) it takes 4 bits to represent a character, - # hence we multiply the digest's length (in bytes) by 8 to get it in - # bits and divide by 4 to get its number of characters it hex. Well, 8 - # divided by 4 is 2. - @digest_length_in_hex ||= OpenSSL::Digest.new(@digest).digest_length * 2 - end - - def separator_at?(signed_message, index) - signed_message[index, SEPARATOR_LENGTH] == SEPARATOR - end - - def separator_index_for(signed_message) - index = signed_message.length - digest_length_in_hex - SEPARATOR_LENGTH - index unless index.negative? || !separator_at?(signed_message, index) - end - - def digest_matches_data?(digest, data) - data.present? && digest.present? && ActiveSupport::SecurityUtils.secure_compare(digest, generate_digest(data)) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_verifiers.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_verifiers.rb deleted file mode 100644 index bbbd5b41..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/message_verifiers.rb +++ /dev/null @@ -1,137 +0,0 @@ -# frozen_string_literal: true - -require "active_support/messages/rotation_coordinator" - -module ActiveSupport - class MessageVerifiers < Messages::RotationCoordinator - ## - # :attr_accessor: transitional - # - # If true, the first two rotation option sets are swapped when building - # message verifiers. For example, with the following configuration, message - # verifiers will generate messages using serializer: Marshal, url_safe: true, - # and will able to verify messages that were generated using any of the - # three option sets: - # - # verifiers = ActiveSupport::MessageVerifiers.new { ... } - # verifiers.rotate(serializer: JSON, url_safe: true) - # verifiers.rotate(serializer: Marshal, url_safe: true) - # verifiers.rotate(serializer: Marshal, url_safe: false) - # verifiers.transitional = true - # - # This can be useful when performing a rolling deploy of an application, - # wherein servers that have not yet been updated must still be able to - # verify messages from updated servers. In such a scenario, first perform a - # rolling deploy with the new rotation (e.g. serializer: JSON, url_safe: true) - # as the first rotation and transitional = true. Then, after all - # servers have been updated, perform a second rolling deploy with - # transitional = false. - - ## - # :singleton-method: new - # :call-seq: new(&secret_generator) - # - # Initializes a new instance. +secret_generator+ must accept a salt, and - # return a suitable secret (string). +secret_generator+ may also accept - # arbitrary kwargs. If #rotate is called with any options matching those - # kwargs, those options will be passed to +secret_generator+ instead of to - # the message verifier. - # - # verifiers = ActiveSupport::MessageVerifiers.new do |salt, base:| - # MySecretGenerator.new(base).generate(salt) - # end - # - # verifiers.rotate(base: "...") - - ## - # :method: [] - # :call-seq: [](salt) - # - # Returns a MessageVerifier configured with a secret derived from the - # given +salt+, and options from #rotate. MessageVerifier instances will - # be memoized, so the same +salt+ will return the same instance. - - ## - # :method: []= - # :call-seq: []=(salt, verifier) - # - # Overrides a MessageVerifier instance associated with a given +salt+. - - ## - # :method: rotate - # :call-seq: - # rotate(**options) - # rotate(&block) - # - # Adds +options+ to the list of option sets. Messages will be signed using - # the first set in the list. When verifying, however, each set will be - # tried, in order, until one succeeds. - # - # Notably, the +:secret_generator+ option can specify a different secret - # generator than the one initially specified. The secret generator must - # respond to +call+, accept a salt, and return a suitable secret (string). - # The secret generator may also accept arbitrary kwargs. - # - # If any options match the kwargs of the operative secret generator, those - # options will be passed to the secret generator instead of to the message - # verifier. - # - # For fine-grained per-salt rotations, a block form is supported. The block - # will receive the salt, and should return an appropriate options Hash. The - # block may also return +nil+ to indicate that the rotation does not apply - # to the given salt. For example: - # - # verifiers = ActiveSupport::MessageVerifiers.new { ... } - # - # verifiers.rotate do |salt| - # case salt - # when :foo - # { serializer: JSON, url_safe: true } - # when :bar - # { serializer: Marshal, url_safe: true } - # end - # end - # - # verifiers.rotate(serializer: Marshal, url_safe: false) - # - # # Uses `serializer: JSON, url_safe: true`. - # # Falls back to `serializer: Marshal, url_safe: false`. - # verifiers[:foo] - # - # # Uses `serializer: Marshal, url_safe: true`. - # # Falls back to `serializer: Marshal, url_safe: false`. - # verifiers[:bar] - # - # # Uses `serializer: Marshal, url_safe: false`. - # verifiers[:baz] - - ## - # :method: rotate_defaults - # :call-seq: rotate_defaults - # - # Invokes #rotate with the default options. - - ## - # :method: clear_rotations - # :call-seq: clear_rotations - # - # Clears the list of option sets. - - ## - # :method: on_rotation - # :call-seq: on_rotation(&callback) - # - # Sets a callback to invoke when a message is verified using an option set - # other than the first. - # - # For example, this callback could log each time it is called, and thus - # indicate whether old option sets are still in use or can be removed from - # rotation. - - ## - private - def build(salt, secret_generator:, secret_generator_options:, **options) - MessageVerifier.new(secret_generator.call(salt, **secret_generator_options), **options) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/codec.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/codec.rb deleted file mode 100644 index 5d2c755e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/codec.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/class/attribute" -require_relative "metadata" -require_relative "serializer_with_fallback" - -module ActiveSupport - module Messages # :nodoc: - class Codec # :nodoc: - include Metadata - - class_attribute :default_serializer, default: :marshal, - instance_accessor: false, instance_predicate: false - - def initialize(**options) - @serializer = options[:serializer] || self.class.default_serializer - @serializer = SerializerWithFallback[@serializer] if @serializer.is_a?(Symbol) - @url_safe = options[:url_safe] - @force_legacy_metadata_serializer = options[:force_legacy_metadata_serializer] - end - - private - attr_reader :serializer - - def encode(data, url_safe: @url_safe) - url_safe ? ::Base64.urlsafe_encode64(data, padding: false) : ::Base64.strict_encode64(data) - end - - def decode(encoded, url_safe: @url_safe) - url_safe ? ::Base64.urlsafe_decode64(encoded) : ::Base64.strict_decode64(encoded) - rescue StandardError => error - throw :invalid_message_format, error - end - - def serialize(data) - serializer.dump(data) - end - - def deserialize(serialized) - serializer.load(serialized) - rescue StandardError => error - throw :invalid_message_serialization, error - end - - def catch_and_ignore(throwable, &block) - catch throwable do - return block.call - end - nil - end - - def catch_and_raise(throwable, as: nil, &block) - error = catch throwable do - return block.call - end - error = as.new(error.to_s) if as - raise error - end - - def use_message_serializer_for_metadata? - !@force_legacy_metadata_serializer && super - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/metadata.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/metadata.rb deleted file mode 100644 index 33b81aa9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/metadata.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -require "time" -require "active_support/json" -require_relative "serializer_with_fallback" - -module ActiveSupport - module Messages # :nodoc: - module Metadata # :nodoc: - singleton_class.attr_accessor :use_message_serializer_for_metadata - - ENVELOPE_SERIALIZERS = [ - *SerializerWithFallback::SERIALIZERS.values, - ActiveSupport::JSON, - ::JSON, - Marshal, - ] - - TIMESTAMP_SERIALIZERS = [ - SerializerWithFallback::SERIALIZERS.fetch(:message_pack), - SerializerWithFallback::SERIALIZERS.fetch(:message_pack_allow_marshal), - ] - - ActiveSupport.on_load(:message_pack) do - ENVELOPE_SERIALIZERS << ActiveSupport::MessagePack - TIMESTAMP_SERIALIZERS << ActiveSupport::MessagePack - end - - private - def serialize_with_metadata(data, **metadata) - has_metadata = metadata.any? { |k, v| v } - - if has_metadata && !use_message_serializer_for_metadata? - data_string = serialize_to_json_safe_string(data) - envelope = wrap_in_metadata_legacy_envelope({ "message" => data_string }, **metadata) - serialize_to_json(envelope) - else - data = wrap_in_metadata_envelope({ "data" => data }, **metadata) if has_metadata - serialize(data) - end - end - - def deserialize_with_metadata(message, **expected_metadata) - if dual_serialized_metadata_envelope_json?(message) - envelope = deserialize_from_json(message) - extracted = extract_from_metadata_envelope(envelope, **expected_metadata) - deserialize_from_json_safe_string(extracted["message"]) - else - deserialized = deserialize(message) - if metadata_envelope?(deserialized) - extract_from_metadata_envelope(deserialized, **expected_metadata)["data"] - elsif expected_metadata.none? { |k, v| v } - deserialized - else - throw :invalid_message_content, "missing metadata" - end - end - end - - def use_message_serializer_for_metadata? - Metadata.use_message_serializer_for_metadata && Metadata::ENVELOPE_SERIALIZERS.include?(serializer) - end - - def wrap_in_metadata_envelope(hash, expires_at: nil, expires_in: nil, purpose: nil) - expiry = pick_expiry(expires_at, expires_in) - hash["exp"] = expiry if expiry - hash["pur"] = purpose.to_s if purpose - { "_rails" => hash } - end - - def wrap_in_metadata_legacy_envelope(hash, expires_at: nil, expires_in: nil, purpose: nil) - expiry = pick_expiry(expires_at, expires_in) - hash["exp"] = expiry - hash["pur"] = purpose - { "_rails" => hash } - end - - def extract_from_metadata_envelope(envelope, purpose: nil) - hash = envelope["_rails"] - - if hash["exp"] && Time.now.utc >= parse_expiry(hash["exp"]) - throw :invalid_message_content, "expired" - end - - if hash["pur"].to_s != purpose.to_s - throw :invalid_message_content, "mismatched purpose" - end - - hash - end - - def metadata_envelope?(object) - object.is_a?(Hash) && object.key?("_rails") - end - - def dual_serialized_metadata_envelope_json?(string) - string.start_with?('{"_rails":{"message":') - end - - def pick_expiry(expires_at, expires_in) - expiry = if expires_at - expires_at.utc - elsif expires_in - Time.now.utc.advance(seconds: expires_in) - end - - unless Metadata::TIMESTAMP_SERIALIZERS.include?(serializer) - expiry = expiry&.iso8601(3) - end - - expiry - end - - def parse_expiry(expires_at) - if !expires_at.is_a?(String) - expires_at - elsif ActiveSupport.use_standard_json_time_format - Time.iso8601(expires_at) - else - Time.parse(expires_at) - end - end - - def serialize_to_json(data) - ActiveSupport::JSON.encode(data) - end - - def deserialize_from_json(serialized) - ActiveSupport::JSON.decode(serialized) - rescue ::JSON::ParserError => error - # Throw :invalid_message_format instead of :invalid_message_serialization - # because here a parse error is due to a bad message rather than an - # incompatible `self.serializer`. - throw :invalid_message_format, error - end - - def serialize_to_json_safe_string(data) - encode(serialize(data), url_safe: false) - end - - def deserialize_from_json_safe_string(string) - deserialize(decode(string, url_safe: false)) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotation_configuration.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotation_configuration.rb deleted file mode 100644 index eef05fe3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotation_configuration.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Messages - class RotationConfiguration # :nodoc: - attr_reader :signed, :encrypted - - def initialize - @signed, @encrypted = [], [] - end - - def rotate(kind, *args, **options) - args << options unless options.empty? - case kind - when :signed - @signed << args - when :encrypted - @encrypted << args - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotation_coordinator.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotation_coordinator.rb deleted file mode 100644 index 131b479e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotation_coordinator.rb +++ /dev/null @@ -1,93 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/hash/slice" - -module ActiveSupport - module Messages - class RotationCoordinator # :nodoc: - attr_accessor :transitional - - def initialize(&secret_generator) - raise ArgumentError, "A secret generator block is required" unless secret_generator - @secret_generator = secret_generator - @rotate_options = [] - @on_rotation = nil - @codecs = {} - end - - def [](salt) - @codecs[salt] ||= build_with_rotations(salt) - end - - def []=(salt, codec) - @codecs[salt] = codec - end - - def rotate(**options, &block) - raise ArgumentError, "Options cannot be specified when using a block" if block && !options.empty? - changing_configuration! - - @rotate_options << (block || options) - - self - end - - def rotate_defaults - rotate() - end - - def clear_rotations - changing_configuration! - @rotate_options.clear - self - end - - def on_rotation(&callback) - changing_configuration! - @on_rotation = callback - end - - private - def changing_configuration! - if @codecs.any? - raise <<~MESSAGE - Cannot change #{self.class} configuration after it has already been applied. - - The configuration has been applied with the following salts: - #{@codecs.keys.map { |salt| "- #{salt.inspect}" }.join("\n")} - MESSAGE - end - end - - def normalize_options(options) - options = options.dup - - options[:secret_generator] ||= @secret_generator - - secret_generator_kwargs = options[:secret_generator].parameters. - filter_map { |type, name| name if type == :key || type == :keyreq } - options[:secret_generator_options] = options.extract!(*secret_generator_kwargs) - - options[:on_rotation] = @on_rotation - - options - end - - def build_with_rotations(salt) - rotate_options = @rotate_options.map { |options| options.is_a?(Proc) ? options.(salt) : options } - transitional = self.transitional && rotate_options.first - rotate_options.compact! - rotate_options[0..1] = rotate_options[0..1].reverse if transitional - rotate_options = rotate_options.map { |options| normalize_options(options) }.uniq - - raise "No options have been configured for #{salt}" if rotate_options.empty? - - rotate_options.map { |options| build(salt.to_s, **options) }.reduce(&:fall_back_to) - end - - def build(salt, secret_generator:, secret_generator_options:, **options) - raise NotImplementedError - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotator.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotator.rb deleted file mode 100644 index d54a11e4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/rotator.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Messages - module Rotator # :nodoc: - def initialize(*args, on_rotation: nil, **options) - super(*args, **options) - @args = args - @options = options - @rotations = [] - @on_rotation = on_rotation - end - - def rotate(*args, **options) - fall_back_to build_rotation(*args, **options) - end - - def on_rotation(&on_rotation) - @on_rotation = on_rotation - self - end - - def fall_back_to(fallback) - @rotations << fallback - self - end - - def read_message(message, on_rotation: @on_rotation, **options) - if @rotations.empty? - super(message, **options) - else - thrown, error = catch_rotation_error do - return super(message, **options) - end - - @rotations.each do |rotation| - catch_rotation_error do - value = rotation.read_message(message, **options) - on_rotation&.call - return value - end - end - - throw thrown, error - end - end - - private - def build_rotation(*args, **options) - self.class.new(*args, *@args.drop(args.length), **@options, **options) - end - - def catch_rotation_error(&block) - error = catch :invalid_message_format do - error = catch :invalid_message_serialization do - return [nil, block.call] - end - return [:invalid_message_serialization, error] - end - [:invalid_message_format, error] - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/serializer_with_fallback.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/serializer_with_fallback.rb deleted file mode 100644 index dd96c6d7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/messages/serializer_with_fallback.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/kernel/reporting" -require "active_support/notifications" - -module ActiveSupport - module Messages # :nodoc: - module SerializerWithFallback # :nodoc: - def self.[](format) - if format.to_s.include?("message_pack") && !defined?(ActiveSupport::MessagePack) - require "active_support/message_pack" - end - - SERIALIZERS.fetch(format) - end - - def load(dumped) - format = detect_format(dumped) - - if format == self.format - _load(dumped) - elsif format && fallback?(format) - payload = { serializer: SERIALIZERS.key(self), fallback: format, serialized: dumped } - ActiveSupport::Notifications.instrument("message_serializer_fallback.active_support", payload) do - payload[:deserialized] = SERIALIZERS[format]._load(dumped) - end - else - raise "Unsupported serialization format" - end - end - - private - def detect_format(dumped) - case - when MessagePackWithFallback.dumped?(dumped) - :message_pack - when MarshalWithFallback.dumped?(dumped) - :marshal - when JsonWithFallback.dumped?(dumped) - :json - end - end - - def fallback?(format) - format != :marshal - end - - module AllowMarshal - private - def fallback?(format) - super || format == :marshal - end - end - - module MarshalWithFallback - include SerializerWithFallback - extend self - - def format - :marshal - end - - def dump(object) - Marshal.dump(object) - end - - def _load(dumped) - Marshal.load(dumped) - end - - MARSHAL_SIGNATURE = "\x04\x08" - - def dumped?(dumped) - dumped.start_with?(MARSHAL_SIGNATURE) - end - end - - module JsonWithFallback - include SerializerWithFallback - extend self - - def format - :json - end - - def dump(object) - ActiveSupport::JSON.encode(object) - end - - def _load(dumped) - ActiveSupport::JSON.decode(dumped) - end - - JSON_START_WITH = /\A(?:[{\["]|-?\d|true|false|null)/ - - def dumped?(dumped) - JSON_START_WITH.match?(dumped) - end - - private - def detect_format(dumped) - # Assume JSON format if format could not be determined. - super || :json - end - end - - module JsonWithFallbackAllowMarshal - include JsonWithFallback - include AllowMarshal - extend self - end - - module MessagePackWithFallback - include SerializerWithFallback - extend self - - def format - :message_pack - end - - def dump(object) - ActiveSupport::MessagePack.dump(object) - end - - def _load(dumped) - ActiveSupport::MessagePack.load(dumped) - end - - def dumped?(dumped) - available? && ActiveSupport::MessagePack.signature?(dumped) - end - - private - def available? - return @available if defined?(@available) - silence_warnings { require "active_support/message_pack" } - @available = true - rescue LoadError - @available = false - end - end - - module MessagePackWithFallbackAllowMarshal - include MessagePackWithFallback - include AllowMarshal - extend self - end - - SERIALIZERS = { - marshal: MarshalWithFallback, - json: JsonWithFallback, - json_allow_marshal: JsonWithFallbackAllowMarshal, - message_pack: MessagePackWithFallback, - message_pack_allow_marshal: MessagePackWithFallbackAllowMarshal, - } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte.rb deleted file mode 100644 index 03663506..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport # :nodoc: - module Multibyte - autoload :Chars, "active_support/multibyte/chars" - autoload :Unicode, "active_support/multibyte/unicode" - - # The proxy class returned when calling mb_chars. You can use this accessor - # to configure your own proxy class so you can support other encodings. See - # the ActiveSupport::Multibyte::Chars implementation for an example how to - # do this. - # - # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 - def self.proxy_class=(klass) - @proxy_class = klass - end - - # Returns the current proxy class. - def self.proxy_class - @proxy_class ||= ActiveSupport::Multibyte::Chars - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte/chars.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte/chars.rb deleted file mode 100644 index 05ced5dd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte/chars.rb +++ /dev/null @@ -1,181 +0,0 @@ -# frozen_string_literal: true - -require "active_support/json" -require "active_support/core_ext/string/access" -require "active_support/core_ext/string/behavior" -require "active_support/core_ext/module/delegation" - -module ActiveSupport # :nodoc: - module Multibyte # :nodoc: - # = Active Support \Multibyte \Chars - # - # Chars enables you to work transparently with UTF-8 encoding in the Ruby - # String class without having extensive knowledge about the encoding. A - # Chars object accepts a string upon initialization and proxies String - # methods in an encoding safe manner. All the normal String methods are also - # implemented on the proxy. - # - # String methods are proxied through the Chars object, and can be accessed - # through the +mb_chars+ method. Methods which would normally return a - # String object now return a Chars object so methods can be chained. - # - # 'The Perfect String '.mb_chars.downcase.strip - # # => # - # - # Chars objects are perfectly interchangeable with String objects as long as - # no explicit class checks are made. If certain methods do explicitly check - # the class, call +to_s+ before you pass chars objects to them. - # - # bad.explicit_checking_method 'T'.mb_chars.downcase.to_s - # - # The default Chars implementation assumes that the encoding of the string - # is UTF-8, if you want to handle different encodings you can write your own - # multibyte string handler and configure it through - # ActiveSupport::Multibyte.proxy_class. - # - # class CharsForUTF32 - # def size - # @wrapped_string.size / 4 - # end - # - # def self.accepts?(string) - # string.length % 4 == 0 - # end - # end - # - # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 - class Chars - include Comparable - attr_reader :wrapped_string - alias to_s wrapped_string - alias to_str wrapped_string - - delegate :<=>, :=~, :match?, :acts_like_string?, to: :wrapped_string - - # Creates a new Chars instance by wrapping _string_. - def initialize(string) - @wrapped_string = string - if string.encoding != Encoding::UTF_8 - @wrapped_string = @wrapped_string.dup - @wrapped_string.force_encoding(Encoding::UTF_8) - end - end - - # Forward all undefined methods to the wrapped string. - def method_missing(method, ...) - result = @wrapped_string.__send__(method, ...) - if method.end_with?("!") - self if result - else - result.kind_of?(String) ? chars(result) : result - end - end - - # Returns +true+ if _obj_ responds to the given method. Private methods - # are included in the search only if the optional second parameter - # evaluates to +true+. - def respond_to_missing?(method, include_private) - @wrapped_string.respond_to?(method, include_private) - end - - # Works just like String#split, with the exception that the items - # in the resulting list are Chars instances instead of String. This makes - # chaining methods easier. - # - # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"] - def split(*args) - @wrapped_string.split(*args).map { |i| self.class.new(i) } - end - - # Works like String#slice!, but returns an instance of - # Chars, or +nil+ if the string was not modified. The string will not be - # modified if the range given is out of bounds - # - # string = 'Welcome' - # string.mb_chars.slice!(3) # => # - # string # => 'Welome' - # string.mb_chars.slice!(0..3) # => # - # string # => 'me' - def slice!(*args) - string_sliced = @wrapped_string.slice!(*args) - if string_sliced - chars(string_sliced) - end - end - - # Reverses all characters in the string. - # - # 'Café'.mb_chars.reverse.to_s # => 'éfaC' - def reverse - chars(@wrapped_string.grapheme_clusters.reverse.join) - end - - # Limits the byte size of the string to a number of bytes without breaking - # characters. Usable when the storage for a string is limited for some - # reason. - # - # 'こんにちは'.mb_chars.limit(7).to_s # => "こん" - def limit(limit) - chars(@wrapped_string.truncate_bytes(limit, omission: nil)) - end - - # Capitalizes the first letter of every word, when possible. - # - # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" - # "日本語".mb_chars.titleize.to_s # => "日本語" - def titleize - chars(downcase.to_s.gsub(/\b('?\S)/u) { $1.upcase }) - end - alias_method :titlecase, :titleize - - # Performs canonical decomposition on all the characters. - # - # 'é'.length # => 1 - # 'é'.mb_chars.decompose.to_s.length # => 2 - def decompose - chars(Unicode.decompose(:canonical, @wrapped_string.codepoints.to_a).pack("U*")) - end - - # Performs composition on all the characters. - # - # 'é'.length # => 1 - # 'é'.mb_chars.compose.to_s.length # => 1 - def compose - chars(Unicode.compose(@wrapped_string.codepoints.to_a).pack("U*")) - end - - # Returns the number of grapheme clusters in the string. - # - # 'क्षि'.mb_chars.length # => 4 - # 'क्षि'.mb_chars.grapheme_length # => 2 - def grapheme_length - @wrapped_string.grapheme_clusters.length - end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent - # resulting in a valid UTF-8 string. - # - # Passing +true+ will forcibly tidy all bytes, assuming that the string's - # encoding is entirely CP1252 or ISO-8859-1. - def tidy_bytes(force = false) - chars(Unicode.tidy_bytes(@wrapped_string, force)) - end - - def as_json(options = nil) # :nodoc: - to_s.as_json(options) - end - - %w(reverse tidy_bytes).each do |method| - define_method("#{method}!") do |*args| - @wrapped_string = public_send(method, *args).to_s - self - end - end - - private - def chars(string) - self.class.new(string) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte/unicode.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte/unicode.rb deleted file mode 100644 index c4cb642b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/multibyte/unicode.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Multibyte - module Unicode - extend self - - # The Unicode version that is supported by the implementation - UNICODE_VERSION = RbConfig::CONFIG["UNICODE_VERSION"] - - # Decompose composed characters to the decomposed form. - def decompose(type, codepoints) - if type == :compatibility - codepoints.pack("U*").unicode_normalize(:nfkd).codepoints - else - codepoints.pack("U*").unicode_normalize(:nfd).codepoints - end - end - - # Compose decomposed characters to the composed form. - def compose(codepoints) - codepoints.pack("U*").unicode_normalize(:nfc).codepoints - end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent - # resulting in a valid UTF-8 string. - # - # Passing +true+ will forcibly tidy all bytes, assuming that the string's - # encoding is entirely CP1252 or ISO-8859-1. - def tidy_bytes(string, force = false) - return string if string.empty? || string.ascii_only? - return recode_windows1252_chars(string) if force - string.scrub { |bad| recode_windows1252_chars(bad) } - end - - private - def recode_windows1252_chars(string) - string.encode(Encoding::UTF_8, Encoding::Windows_1252, invalid: :replace, undef: :replace) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications.rb deleted file mode 100644 index 1a54dc24..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications.rb +++ /dev/null @@ -1,281 +0,0 @@ -# frozen_string_literal: true - -require "active_support/notifications/instrumenter" -require "active_support/notifications/fanout" - -module ActiveSupport - # = \Notifications - # - # +ActiveSupport::Notifications+ provides an instrumentation API for - # Ruby. - # - # == Instrumenters - # - # To instrument an event you just need to do: - # - # ActiveSupport::Notifications.instrument('render', extra: :information) do - # render plain: 'Foo' - # end - # - # That first executes the block and then notifies all subscribers once done. - # - # In the example above +render+ is the name of the event, and the rest is called - # the _payload_. The payload is a mechanism that allows instrumenters to pass - # extra information to subscribers. Payloads consist of a hash whose contents - # are arbitrary and generally depend on the event. - # - # == Subscribers - # - # You can consume those events and the information they provide by registering - # a subscriber. - # - # ActiveSupport::Notifications.subscribe('render') do |event| - # event.name # => "render" - # event.duration # => 10 (in milliseconds) - # event.payload # => { extra: :information } - # event.allocations # => 1826 (objects) - # end - # - # +Event+ objects record CPU time and allocations. If you don't need this - # it's also possible to pass a block that accepts five arguments: - # - # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| - # name # => String, name of the event (such as 'render' from above) - # start # => Time, when the instrumented block started execution - # finish # => Time, when the instrumented block ended execution - # id # => String, unique ID for the instrumenter that fired the event - # payload # => Hash, the payload - # end - # - # Here, the +start+ and +finish+ values represent wall-clock time. If you are - # concerned about accuracy, you can register a monotonic subscriber. - # - # ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| - # name # => String, name of the event (such as 'render' from above) - # start # => Float, monotonic time when the instrumented block started execution - # finish # => Float, monotonic time when the instrumented block ended execution - # id # => String, unique ID for the instrumenter that fired the event - # payload # => Hash, the payload - # end - # - # For instance, let's store all "render" events in an array: - # - # events = [] - # - # ActiveSupport::Notifications.subscribe('render') do |event| - # events << event - # end - # - # That code returns right away, you are just subscribing to "render" events. - # The block is saved and will be called whenever someone instruments "render": - # - # ActiveSupport::Notifications.instrument('render', extra: :information) do - # render plain: 'Foo' - # end - # - # event = events.first - # event.name # => "render" - # event.duration # => 10 (in milliseconds) - # event.payload # => { extra: :information } - # event.allocations # => 1826 (objects) - # - # If an exception happens during that particular instrumentation the payload will - # have a key :exception with an array of two elements as value: a string with - # the name of the exception class, and the exception message. - # The :exception_object key of the payload will have the exception - # itself as the value: - # - # event.payload[:exception] # => ["ArgumentError", "Invalid value"] - # event.payload[:exception_object] # => # - # - # As the earlier example depicts, the class ActiveSupport::Notifications::Event - # is able to take the arguments as they come and provide an object-oriented - # interface to that data. - # - # It is also possible to pass an object which responds to call method - # as the second parameter to the subscribe method instead of a block: - # - # module ActionController - # class PageRequest - # def call(name, started, finished, unique_id, payload) - # Rails.logger.debug ['notification:', name, started, finished, unique_id, payload].join(' ') - # end - # end - # end - # - # ActiveSupport::Notifications.subscribe('process_action.action_controller', ActionController::PageRequest.new) - # - # resulting in the following output within the logs including a hash with the payload: - # - # notification: process_action.action_controller 2012-04-13 01:08:35 +0300 2012-04-13 01:08:35 +0300 af358ed7fab884532ec7 { - # controller: "Devise::SessionsController", - # action: "new", - # params: {"action"=>"new", "controller"=>"devise/sessions"}, - # format: :html, - # method: "GET", - # path: "/login/sign_in", - # status: 200, - # view_runtime: 279.3080806732178, - # db_runtime: 40.053 - # } - # - # You can also subscribe to all events whose name matches a certain regexp: - # - # ActiveSupport::Notifications.subscribe(/render/) do |*args| - # ... - # end - # - # and even pass no argument to subscribe, in which case you are subscribing - # to all events. - # - # == Temporary Subscriptions - # - # Sometimes you do not want to subscribe to an event for the entire life of - # the application. There are two ways to unsubscribe. - # - # WARNING: The instrumentation framework is designed for long-running subscribers, - # use this feature sparingly because it wipes some internal caches and that has - # a negative impact on performance. - # - # === Subscribe While a Block Runs - # - # You can subscribe to some event temporarily while some block runs. For - # example, in - # - # callback = lambda {|event| ... } - # ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do - # ... - # end - # - # the callback will be called for all "sql.active_record" events instrumented - # during the execution of the block. The callback is unsubscribed automatically - # after that. - # - # To record +started+ and +finished+ values with monotonic time, - # specify the optional :monotonic option to the - # subscribed method. The :monotonic option is set - # to +false+ by default. - # - # callback = lambda {|name, started, finished, unique_id, payload| ... } - # ActiveSupport::Notifications.subscribed(callback, "sql.active_record", monotonic: true) do - # ... - # end - # - # === Manual Unsubscription - # - # The +subscribe+ method returns a subscriber object: - # - # subscriber = ActiveSupport::Notifications.subscribe("render") do |event| - # ... - # end - # - # To prevent that block from being called anymore, just unsubscribe passing - # that reference: - # - # ActiveSupport::Notifications.unsubscribe(subscriber) - # - # You can also unsubscribe by passing the name of the subscriber object. Note - # that this will unsubscribe all subscriptions with the given name: - # - # ActiveSupport::Notifications.unsubscribe("render") - # - # Subscribers using a regexp or other pattern-matching object will remain subscribed - # to all events that match their original pattern, unless those events match a string - # passed to +unsubscribe+: - # - # subscriber = ActiveSupport::Notifications.subscribe(/render/) { } - # ActiveSupport::Notifications.unsubscribe('render_template.action_view') - # subscriber.matches?('render_template.action_view') # => false - # subscriber.matches?('render_partial.action_view') # => true - # - # == Default Queue - # - # Notifications ships with a queue implementation that consumes and publishes events - # to all log subscribers. You can use any queue implementation you want. - # - module Notifications - class << self - attr_accessor :notifier - - def publish(name, *args) - notifier.publish(name, *args) - end - - def publish_event(event) # :nodoc: - notifier.publish_event(event) - end - - def instrument(name, payload = {}) - if notifier.listening?(name) - instrumenter.instrument(name, payload) { yield payload if block_given? } - else - yield payload if block_given? - end - end - - # Subscribe to a given event name with the passed +block+. - # - # You can subscribe to events by passing a String to match exact event - # names, or by passing a Regexp to match all events that match a pattern. - # - # If the block passed to the method only takes one argument, - # it will yield an +Event+ object to the block: - # - # ActiveSupport::Notifications.subscribe(/render/) do |event| - # @event = event - # end - # - # Otherwise the +block+ will receive five arguments with information - # about the event: - # - # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| - # name # => String, name of the event (such as 'render' from above) - # start # => Time, when the instrumented block started execution - # finish # => Time, when the instrumented block ended execution - # id # => String, unique ID for the instrumenter that fired the event - # payload # => Hash, the payload - # end - # - # Raises an error if invalid event name type is passed: - # - # ActiveSupport::Notifications.subscribe(:render) {|event| ...} - # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) - # - def subscribe(pattern = nil, callback = nil, &block) - notifier.subscribe(pattern, callback, monotonic: false, &block) - end - - # Performs the same functionality as #subscribe, but the +start+ and - # +finish+ block arguments are in monotonic time instead of wall-clock - # time. Monotonic time will not jump forward or backward (due to NTP or - # Daylights Savings). Use +monotonic_subscribe+ when accuracy of time - # duration is important. For example, computing elapsed time between - # two events. - def monotonic_subscribe(pattern = nil, callback = nil, &block) - notifier.subscribe(pattern, callback, monotonic: true, &block) - end - - def subscribed(callback, pattern = nil, monotonic: false, &block) - subscriber = notifier.subscribe(pattern, callback, monotonic: monotonic) - yield - ensure - unsubscribe(subscriber) - end - - def unsubscribe(subscriber_or_name) - notifier.unsubscribe(subscriber_or_name) - end - - def instrumenter - registry[notifier] ||= Instrumenter.new(notifier) - end - - private - def registry - ActiveSupport::IsolatedExecutionState[:active_support_notifications_registry] ||= {} - end - end - - self.notifier = Fanout.new - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications/fanout.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications/fanout.rb deleted file mode 100644 index ecf4b7c9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications/fanout.rb +++ /dev/null @@ -1,445 +0,0 @@ -# frozen_string_literal: true - -require "concurrent/map" -require "active_support/core_ext/object/try" - -module ActiveSupport - module Notifications - class InstrumentationSubscriberError < RuntimeError - attr_reader :exceptions - - def initialize(exceptions) - @exceptions = exceptions - exception_class_names = exceptions.map { |e| e.class.name } - super "Exception(s) occurred within instrumentation subscribers: #{exception_class_names.join(', ')}" - end - end - - module FanoutIteration # :nodoc: - private - def iterate_guarding_exceptions(collection) - exceptions = nil - - collection.each do |s| - yield s - rescue Exception => e - exceptions ||= [] - exceptions << e - end - - if exceptions - exceptions = exceptions.flat_map do |exception| - exception.is_a?(InstrumentationSubscriberError) ? exception.exceptions : [exception] - end - if exceptions.size == 1 - raise exceptions.first - else - raise InstrumentationSubscriberError.new(exceptions), cause: exceptions.first - end - end - - collection - end - end - - # This is a default queue implementation that ships with Notifications. - # It just pushes events to all registered log subscribers. - # - # This class is thread safe. All methods are reentrant. - class Fanout - def initialize - @mutex = Mutex.new - @string_subscribers = Concurrent::Map.new { |h, k| h.compute_if_absent(k) { [] } } - @other_subscribers = [] - @all_listeners_for = Concurrent::Map.new - @groups_for = Concurrent::Map.new - @silenceable_groups_for = Concurrent::Map.new - end - - def inspect # :nodoc: - total_patterns = @string_subscribers.size + @other_subscribers.size - "#<#{self.class} (#{total_patterns} patterns)>" - end - - def subscribe(pattern = nil, callable = nil, monotonic: false, &block) - subscriber = Subscribers.new(pattern, callable || block, monotonic) - @mutex.synchronize do - case pattern - when String - @string_subscribers[pattern] << subscriber - clear_cache(pattern) - when NilClass, Regexp - @other_subscribers << subscriber - clear_cache - else - raise ArgumentError, "pattern must be specified as a String, Regexp or empty" - end - end - subscriber - end - - def unsubscribe(subscriber_or_name) - @mutex.synchronize do - case subscriber_or_name - when String - @string_subscribers[subscriber_or_name].clear - clear_cache(subscriber_or_name) - @other_subscribers.each { |sub| sub.unsubscribe!(subscriber_or_name) } - else - pattern = subscriber_or_name.try(:pattern) - if String === pattern - @string_subscribers[pattern].delete(subscriber_or_name) - clear_cache(pattern) - else - @other_subscribers.delete(subscriber_or_name) - clear_cache - end - end - end - end - - def clear_cache(key = nil) # :nodoc: - if key - @all_listeners_for.delete(key) - @groups_for.delete(key) - @silenceable_groups_for.delete(key) - else - @all_listeners_for.clear - @groups_for.clear - @silenceable_groups_for.clear - end - end - - class BaseGroup # :nodoc: - include FanoutIteration - - def initialize(listeners, name, id, payload) - @listeners = listeners - end - - def each(&block) - iterate_guarding_exceptions(@listeners, &block) - end - end - - class BaseTimeGroup < BaseGroup # :nodoc: - def start(name, id, payload) - @start_time = now - end - - def finish(name, id, payload) - stop_time = now - each do |listener| - listener.call(name, @start_time, stop_time, id, payload) - end - end - end - - class MonotonicTimedGroup < BaseTimeGroup # :nodoc: - private - def now - Process.clock_gettime(Process::CLOCK_MONOTONIC) - end - end - - class TimedGroup < BaseTimeGroup # :nodoc: - private - def now - Time.now - end - end - - class EventedGroup < BaseGroup # :nodoc: - def start(name, id, payload) - each do |s| - s.start(name, id, payload) - end - end - - def finish(name, id, payload) - each do |s| - s.finish(name, id, payload) - end - end - end - - class EventObjectGroup < BaseGroup # :nodoc: - def start(name, id, payload) - @event = build_event(name, id, payload) - @event.start! - end - - def finish(name, id, payload) - @event.payload = payload - @event.finish! - - each do |s| - s.call(@event) - end - end - - private - def build_event(name, id, payload) - ActiveSupport::Notifications::Event.new name, nil, nil, id, payload - end - end - - def groups_for(name) # :nodoc: - groups = @groups_for.compute_if_absent(name) do - all_listeners_for(name).reject(&:silenceable).group_by(&:group_class).transform_values do |s| - s.map(&:delegate) - end - end - - silenceable_groups = @silenceable_groups_for.compute_if_absent(name) do - all_listeners_for(name).select(&:silenceable).group_by(&:group_class).transform_values do |s| - s.map(&:delegate) - end - end - - unless silenceable_groups.empty? - groups = groups.dup - silenceable_groups.each do |group_class, subscriptions| - active_subscriptions = subscriptions.reject { |s| s.silenced?(name) } - unless active_subscriptions.empty? - groups[group_class] = (groups[group_class] || []) + active_subscriptions - end - end - end - - groups - end - - # A +Handle+ is used to record the start and finish time of event. - # - # Both #start and #finish must each be called exactly once. - # - # Where possible, it's best to use the block form: ActiveSupport::Notifications.instrument. - # +Handle+ is a low-level API intended for cases where the block form can't be used. - # - # handle = ActiveSupport::Notifications.instrumenter.build_handle("my.event", {}) - # begin - # handle.start - # # work to be instrumented - # ensure - # handle.finish - # end - class Handle - include FanoutIteration - - def initialize(notifier, name, id, payload) # :nodoc: - @name = name - @id = id - @payload = payload - @groups = notifier.groups_for(name).map do |group_klass, grouped_listeners| - group_klass.new(grouped_listeners, name, id, payload) - end - @state = :initialized - end - - def start - ensure_state! :initialized - @state = :started - - iterate_guarding_exceptions(@groups) do |group| - group.start(@name, @id, @payload) - end - end - - def finish - finish_with_values(@name, @id, @payload) - end - - def finish_with_values(name, id, payload) # :nodoc: - ensure_state! :started - @state = :finished - - iterate_guarding_exceptions(@groups) do |group| - group.finish(name, id, payload) - end - end - - private - def ensure_state!(expected) - if @state != expected - raise ArgumentError, "expected state to be #{expected.inspect} but was #{@state.inspect}" - end - end - end - - include FanoutIteration - - def build_handle(name, id, payload) - Handle.new(self, name, id, payload) - end - - def start(name, id, payload) - handle_stack = (IsolatedExecutionState[:_fanout_handle_stack] ||= []) - handle = build_handle(name, id, payload) - handle_stack << handle - handle.start - end - - def finish(name, id, payload, listeners = nil) - handle_stack = IsolatedExecutionState[:_fanout_handle_stack] - handle = handle_stack.pop - handle.finish_with_values(name, id, payload) - end - - def publish(name, *args) - iterate_guarding_exceptions(listeners_for(name)) { |s| s.publish(name, *args) } - end - - def publish_event(event) - iterate_guarding_exceptions(listeners_for(event.name)) { |s| s.publish_event(event) } - end - - def all_listeners_for(name) - # this is correctly done double-checked locking (Concurrent::Map's lookups have volatile semantics) - @all_listeners_for[name] || @mutex.synchronize do - # use synchronisation when accessing @subscribers - @all_listeners_for[name] ||= - @string_subscribers[name] + @other_subscribers.select { |s| s.subscribed_to?(name) } - end - end - - def listeners_for(name) - all_listeners_for(name).reject { |s| s.silenced?(name) } - end - - def listening?(name) - all_listeners_for(name).any? { |s| !s.silenced?(name) } - end - - # This is a sync queue, so there is no waiting. - def wait - end - - module Subscribers # :nodoc: - def self.new(pattern, listener, monotonic) - subscriber_class = monotonic ? MonotonicTimed : Timed - - if listener.respond_to?(:start) && listener.respond_to?(:finish) - subscriber_class = Evented - else - # Doing this to detect a single argument block or callable - # like `proc { |x| }` vs `proc { |*x| }`, `proc { |**x| }`, - # or `proc { |x, **y| }` - procish = listener.respond_to?(:parameters) ? listener : listener.method(:call) - - if procish.arity == 1 && procish.parameters.length == 1 - subscriber_class = EventObject - end - end - - subscriber_class.new(pattern, listener) - end - - class Matcher # :nodoc: - attr_reader :pattern, :exclusions - - def self.wrap(pattern) - if String === pattern - pattern - elsif pattern.nil? - AllMessages.new - else - new(pattern) - end - end - - def initialize(pattern) - @pattern = pattern - @exclusions = Set.new - end - - def unsubscribe!(name) - exclusions << -name if pattern === name - end - - def ===(name) - pattern === name && !exclusions.include?(name) - end - - class AllMessages - def ===(name) - true - end - - def unsubscribe!(*) - false - end - end - end - - class Evented # :nodoc: - attr_reader :pattern, :delegate, :silenceable - - def initialize(pattern, delegate) - @pattern = Matcher.wrap(pattern) - @delegate = delegate - @silenceable = delegate.respond_to?(:silenced?) - @can_publish = delegate.respond_to?(:publish) - @can_publish_event = delegate.respond_to?(:publish_event) - end - - def group_class - EventedGroup - end - - def publish(name, *args) - if @can_publish - @delegate.publish name, *args - end - end - - def publish_event(event) - if @can_publish_event - @delegate.publish_event event - else - publish(event.name, event.time, event.end, event.transaction_id, event.payload) - end - end - - def silenced?(name) - @silenceable && @delegate.silenced?(name) - end - - def subscribed_to?(name) - pattern === name - end - - def unsubscribe!(name) - pattern.unsubscribe!(name) - end - end - - class Timed < Evented # :nodoc: - def group_class - TimedGroup - end - - def publish(name, *args) - @delegate.call name, *args - end - end - - class MonotonicTimed < Timed # :nodoc: - def group_class - MonotonicTimedGroup - end - end - - class EventObject < Evented - def group_class - EventObjectGroup - end - - def publish_event(event) - @delegate.call event - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications/instrumenter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications/instrumenter.rb deleted file mode 100644 index 6143d1b8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/notifications/instrumenter.rb +++ /dev/null @@ -1,240 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/delegation" -require "securerandom" - -module ActiveSupport - module Notifications - # Instrumenters are stored in a thread local. - class Instrumenter - attr_reader :id - - def initialize(notifier) - unless notifier.respond_to?(:build_handle) - notifier = LegacyHandle::Wrapper.new(notifier) - end - - @id = unique_id - @notifier = notifier - end - - class LegacyHandle # :nodoc: - class Wrapper # :nodoc: - def initialize(notifier) - @notifier = notifier - end - - def build_handle(name, id, payload) - LegacyHandle.new(@notifier, name, id, payload) - end - - delegate :start, :finish, to: :@notifier - end - - def initialize(notifier, name, id, payload) - @notifier = notifier - @name = name - @id = id - @payload = payload - end - - def start - @listener_state = @notifier.start @name, @id, @payload - end - - def finish - @notifier.finish(@name, @id, @payload, @listener_state) - end - end - - # Given a block, instrument it by measuring the time taken to execute - # and publish it. Without a block, simply send a message via the - # notifier. Notice that events get sent even if an error occurs in the - # passed-in block. - def instrument(name, payload = {}) - handle = build_handle(name, payload) - handle.start - begin - yield payload if block_given? - rescue Exception => e - payload[:exception] = [e.class.name, e.message] - payload[:exception_object] = e - raise e - ensure - handle.finish - end - end - - # Returns a "handle" for an event with the given +name+ and +payload+. - # - # #start and #finish must each be called exactly once on the returned object. - # - # Where possible, it's best to use #instrument, which will record the - # start and finish of the event and correctly handle any exceptions. - # +build_handle+ is a low-level API intended for cases where using - # +instrument+ isn't possible. - # - # See ActiveSupport::Notifications::Fanout::Handle. - def build_handle(name, payload) - @notifier.build_handle(name, @id, payload) - end - - def new_event(name, payload = {}) # :nodoc: - Event.new(name, nil, nil, @id, payload) - end - - # Send a start notification with +name+ and +payload+. - def start(name, payload) - @notifier.start name, @id, payload - end - - # Send a finish notification with +name+ and +payload+. - def finish(name, payload) - @notifier.finish name, @id, payload - end - - def finish_with_state(listeners_state, name, payload) - @notifier.finish name, @id, payload, listeners_state - end - - private - def unique_id - SecureRandom.hex(10) - end - end - - class Event - attr_reader :name, :transaction_id - attr_accessor :payload - - def initialize(name, start, ending, transaction_id, payload) - @name = name - @payload = payload.dup - @time = start ? start.to_f * 1_000.0 : start - @transaction_id = transaction_id - @end = ending ? ending.to_f * 1_000.0 : ending - @cpu_time_start = 0.0 - @cpu_time_finish = 0.0 - @allocation_count_start = 0 - @allocation_count_finish = 0 - @gc_time_start = 0 - @gc_time_finish = 0 - end - - def time - @time / 1000.0 if @time - end - - def end - @end / 1000.0 if @end - end - - def record # :nodoc: - start! - begin - yield payload if block_given? - rescue Exception => e - payload[:exception] = [e.class.name, e.message] - payload[:exception_object] = e - raise e - ensure - finish! - end - end - - # Record information at the time this event starts - def start! - @time = now - @cpu_time_start = now_cpu - @gc_time_start = now_gc - @allocation_count_start = now_allocations - end - - # Record information at the time this event finishes - def finish! - @cpu_time_finish = now_cpu - @gc_time_finish = now_gc - @end = now - @allocation_count_finish = now_allocations - end - - # Returns the CPU time (in milliseconds) passed between the call to - # #start! and the call to #finish!. - def cpu_time - @cpu_time_finish - @cpu_time_start - end - - # Returns the idle time time (in milliseconds) passed between the call to - # #start! and the call to #finish!. - def idle_time - diff = duration - cpu_time - diff > 0.0 ? diff : 0.0 - end - - # Returns the number of allocations made between the call to #start! and - # the call to #finish!. - def allocations - @allocation_count_finish - @allocation_count_start - end - - # Returns the time spent in GC (in milliseconds) between the call to #start! - # and the call to #finish! - def gc_time - (@gc_time_finish - @gc_time_start) / 1_000_000.0 - end - - # Returns the difference in milliseconds between when the execution of the - # event started and when it ended. - # - # ActiveSupport::Notifications.subscribe('wait') do |event| - # @event = event - # end - # - # ActiveSupport::Notifications.instrument('wait') do - # sleep 1 - # end - # - # @event.duration # => 1000.138 - def duration - @end - @time - end - - private - def now - Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_millisecond) - end - - begin - Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID, :float_millisecond) - - def now_cpu - Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID, :float_millisecond) - end - rescue - def now_cpu - 0.0 - end - end - - if GC.respond_to?(:total_time) - def now_gc - GC.total_time - end - else - def now_gc - 0 - end - end - - if GC.stat.key?(:total_allocated_objects) - def now_allocations - GC.stat(:total_allocated_objects) - end - else # Likely on JRuby, TruffleRuby - def now_allocations - 0 - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper.rb deleted file mode 100644 index 0c51306b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper.rb +++ /dev/null @@ -1,479 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # = Number Helper - # - # Provides methods for formatting numbers into currencies, percentages, - # phone numbers, and more. - # - # Example usage in a class: - # class Topic - # include ActiveSupport::NumberHelper - # - # def price - # number_to_currency(@price) - # end - # end - # - # Example usage in a module: - # require "active_support/number_helper" - # - # module NumberFormatting - # def format_price(price) - # ActiveSupport::NumberHelper.number_to_currency(price) - # end - # end - module NumberHelper - extend ActiveSupport::Autoload - - eager_autoload do - autoload :NumberConverter - autoload :RoundingHelper - autoload :NumberToRoundedConverter - autoload :NumberToDelimitedConverter - autoload :NumberToHumanConverter - autoload :NumberToHumanSizeConverter - autoload :NumberToPhoneConverter - autoload :NumberToCurrencyConverter - autoload :NumberToPercentageConverter - end - - extend self - - # Formats +number+ into a phone number. - # - # number_to_phone(5551234) # => "555-1234" - # number_to_phone("5551234") # => "555-1234" - # number_to_phone(1235551234) # => "123-555-1234" - # number_to_phone("12x34") # => "12x34" - # - # number_to_phone(1235551234, delimiter: ".", country_code: 1, extension: 1343) - # # => "+1.123.555.1234 x 1343" - # - # ==== Options - # - # [+:area_code+] - # Whether to use parentheses for the area code. Defaults to false. - # - # number_to_phone(1235551234, area_code: true) - # # => "(123) 555-1234" - # - # [+:delimiter+] - # The digit group delimiter to use. Defaults to "-". - # - # number_to_phone(1235551234, delimiter: " ") - # # => "123 555 1234" - # - # [+:country_code+] - # A country code to prepend. - # - # number_to_phone(1235551234, country_code: 1) - # # => "+1-123-555-1234" - # - # [+:extension+] - # An extension to append. - # - # number_to_phone(1235551234, extension: 555) - # # => "123-555-1234 x 555" - # - # [+:pattern+] - # A regexp that specifies how the digits should be grouped. The first - # three captures from the regexp are treated as digit groups. - # - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # - def number_to_phone(number, options = {}) - NumberToPhoneConverter.convert(number, options) - end - - # Formats a +number+ into a currency string. - # - # number_to_currency(1234567890.50) # => "$1,234,567,890.50" - # number_to_currency(1234567890.506) # => "$1,234,567,890.51" - # number_to_currency("12x34") # => "$12x34" - # - # number_to_currency(1234567890.50, unit: "£", separator: ",", delimiter: "") - # # => "£1234567890,50" - # - # The currency unit and number formatting of the current locale will be used - # unless otherwise specified via options. No currency conversion is - # performed. If the user is given a way to change their locale, they will - # also be able to change the relative value of the currency displayed with - # this helper. If your application will ever support multiple locales, you - # may want to specify a constant +:locale+ option or consider using a - # library capable of currency conversion. - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_currency(1234567890.506, locale: :fr) - # # => "1 234 567 890,51 €" - # - # [+:precision+] - # The level of precision. Defaults to 2. - # - # number_to_currency(1234567890.123, precision: 3) # => "$1,234,567,890.123" - # number_to_currency(0.456789, precision: 0) # => "$0" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_currency(1234567890.01, precision: 0, round_mode: :up) - # # => "$1,234,567,891" - # - # [+:unit+] - # The denomination of the currency. Defaults to "$". - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:format+] - # The format for non-negative numbers. %u represents the currency, - # and %n represents the number. Defaults to "%u%n". - # - # number_to_currency(1234567890.50, format: "%n %u") - # # => "1,234,567,890.50 $" - # - # [+:negative_format+] - # The format for negative numbers. %u and %n behave the - # same as in +:format+, but %n represents the absolute value of - # the number. Defaults to the value of +:format+ prepended with -. - # - # number_to_currency(-1234567890.50, negative_format: "(%u%n)") - # # => "($1,234,567,890.50)" - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to false. - # - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # - def number_to_currency(number, options = {}) - NumberToCurrencyConverter.convert(number, options) - end - - # Formats +number+ as a percentage string. - # - # number_to_percentage(100) # => "100.000%" - # number_to_percentage("99") # => "99.000%" - # number_to_percentage("99x") # => "99x%" - # - # number_to_percentage(12345.6789, delimiter: ".", separator: ",", precision: 2) - # # => "12.345,68%" - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_percentage(1000, locale: :fr) - # # => "1000,000%" - # - # [+:precision+] - # The level of precision, or +nil+ to preserve +number+'s precision. - # Defaults to 2. - # - # number_to_percentage(12.3456789, precision: 4) # => "12.3457%" - # number_to_percentage(99.999, precision: 0) # => "100%" - # number_to_percentage(99.999, precision: nil) # => "99.999%" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_percentage(12.3456789, precision: 4, round_mode: :down) - # # => "12.3456%" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to false. - # - # number_to_percentage(12345.6789) # => "12345.679%" - # number_to_percentage(12345.6789, significant: true) # => "12300%" - # number_to_percentage(12345.6789, precision: 2) # => "12345.68%" - # number_to_percentage(12345.6789, precision: 2, significant: true) # => "12000%" - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to false. - # - # [+:format+] - # The format of the output. %n represents the number. Defaults to - # "%n%". - # - # number_to_percentage(100, format: "%n %") - # # => "100.000 %" - # - def number_to_percentage(number, options = {}) - NumberToPercentageConverter.convert(number, options) - end - - # Formats +number+ by grouping thousands with a delimiter. - # - # number_to_delimited(12345678) # => "12,345,678" - # number_to_delimited("123456") # => "123,456" - # number_to_delimited(12345678.9876) # => "12,345,678.9876" - # number_to_delimited("12x34") # => "12x34" - # - # number_to_delimited(12345678.9876, delimiter: ".", separator: ",") - # # => "12.345.678,9876" - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_delimited(12345678.05, locale: :fr) - # # => "12 345 678,05" - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # number_to_delimited(12345678, delimiter: ".") - # # => "12.345.678" - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # number_to_delimited(12345678.05, separator: " ") - # # => "12,345,678 05" - # - # [+:delimiter_pattern+] - # A regexp to determine the placement of delimiters. Helpful when using - # currency formats like INR. - # - # number_to_delimited("123456.78", delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) - # # => "1,23,456.78" - # - def number_to_delimited(number, options = {}) - NumberToDelimitedConverter.convert(number, options) - end - - # Formats +number+ to a specific level of precision. - # - # number_to_rounded(12345.6789) # => "12345.679" - # number_to_rounded(12345.6789, precision: 2) # => "12345.68" - # number_to_rounded(12345.6789, precision: 0) # => "12345" - # number_to_rounded(12345, precision: 5) # => "12345.00000" - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_rounded(111.234, locale: :fr) - # # => "111,234" - # - # [+:precision+] - # The level of precision, or +nil+ to preserve +number+'s precision. - # Defaults to 3. - # - # number_to_rounded(12345.6789, precision: nil) - # # => "12345.6789" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_rounded(12.34, precision: 0, round_mode: :up) - # # => "13" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to false. - # - # number_to_rounded(12345.6789) # => "12345.679" - # number_to_rounded(12345.6789, significant: true) # => "12300" - # number_to_rounded(12345.6789, precision: 2) # => "12345.68" - # number_to_rounded(12345.6789, precision: 2, significant: true) # => "12000" - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to false. - # - # number_to_rounded(12.34, strip_insignificant_zeros: false) # => "12.340" - # number_to_rounded(12.34, strip_insignificant_zeros: true) # => "12.34" - # number_to_rounded(12.3456, strip_insignificant_zeros: true) # => "12.346" - # - def number_to_rounded(number, options = {}) - NumberToRoundedConverter.convert(number, options) - end - - # Formats +number+ as bytes into a more human-friendly representation. - # Useful for reporting file sizes to users. - # - # number_to_human_size(123) # => "123 Bytes" - # number_to_human_size(1234) # => "1.21 KB" - # number_to_human_size(12345) # => "12.1 KB" - # number_to_human_size(1234567) # => "1.18 MB" - # number_to_human_size(1234567890) # => "1.15 GB" - # number_to_human_size(1234567890123) # => "1.12 TB" - # number_to_human_size(1234567890123456) # => "1.1 PB" - # number_to_human_size(1234567890123456789) # => "1.07 EB" - # - # See #number_to_human if you want to pretty-print a generic number. - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # [+:precision+] - # The level of precision. Defaults to 3. - # - # number_to_human_size(123456, precision: 2) # => "120 KB" - # number_to_human_size(1234567, precision: 2) # => "1.2 MB" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_human_size(123456, precision: 2, round_mode: :up) - # # => "130 KB" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to true. - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # number_to_human_size(1234567, separator: ",") - # # => "1,18 MB" - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to true. - # - def number_to_human_size(number, options = {}) - NumberToHumanSizeConverter.convert(number, options) - end - - # Formats +number+ into a more human-friendly representation. Useful for - # numbers that can become very large and too hard to read. - # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # - # See #number_to_human_size if you want to pretty-print a file size. - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # [+:precision+] - # The level of precision. Defaults to 3. - # - # number_to_human(123456, precision: 2) # => "120 Thousand" - # number_to_human(123456, precision: 4) # => "123.5 Thousand" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_human(123456, precision: 2, round_mode: :up) - # # => "130 Thousand" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to true. - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # number_to_human(123456, precision: 4, separator: ",") - # # => "123,5 Thousand" - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to true. - # - # number_to_human(1000000) # => "1 Million" - # number_to_human(1000000, strip_insignificant_zeros: false) # => "1.00 Million" - # number_to_human(10.01) # => "10" - # number_to_human(10.01, strip_insignificant_zeros: false) # => "10.0" - # - # [+:format+] - # The format of the output. %n represents the number, and - # %u represents the quantifier (e.g., "Thousand"). Defaults to - # "%n %u". - # - # [+:units+] - # A Hash of custom unit quantifier names. - # - # number_to_human(1, units: { unit: "m", thousand: "km" }) # => "1 m" - # number_to_human(100, units: { unit: "m", thousand: "km" }) # => "100 m" - # number_to_human(1000, units: { unit: "m", thousand: "km" }) # => "1 km" - # number_to_human(100000, units: { unit: "m", thousand: "km" }) # => "100 km" - # number_to_human(10000000, units: { unit: "m", thousand: "km" }) # => "10000 km" - # - # The following keys are supported for integer units: +:unit+, +:ten+, - # +:hundred+, +:thousand+, +:million+, +:billion+, +:trillion+, - # +:quadrillion+. Additionally, the following keys are supported for - # fractional units: +:deci+, +:centi+, +:mili+, +:micro+, +:nano+, - # +:pico+, +:femto+. - # - # The Hash can also be defined as a scope in an I18n locale. For example: - # - # en: - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # - # Then it can be specified by name: - # - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(100, units: :distance) # => "100 meters" - # number_to_human(1000, units: :distance) # => "1 kilometer" - # number_to_human(100000, units: :distance) # => "100 kilometers" - # number_to_human(10000000, units: :distance) # => "10000 kilometers" - # number_to_human(0.1, units: :distance) # => "10 centimeters" - # number_to_human(0.01, units: :distance) # => "1 centimeter" - # - def number_to_human(number, options = {}) - NumberToHumanConverter.convert(number, options) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_converter.rb deleted file mode 100644 index a68838c0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_converter.rb +++ /dev/null @@ -1,190 +0,0 @@ -# frozen_string_literal: true - -require "bigdecimal" -require "bigdecimal/util" -require "active_support/core_ext/big_decimal/conversions" -require "active_support/core_ext/hash/keys" -require "active_support/i18n" -require "active_support/core_ext/class/attribute" - -module ActiveSupport - module NumberHelper - class NumberConverter # :nodoc: - # Default and i18n option namespace per class - class_attribute :namespace - - # Does the object need a number that is a valid float? - class_attribute :validate_float - - attr_reader :number, :opts - - DEFAULTS = { - # Used in number_to_delimited - # These are also the defaults for 'currency', 'percentage', 'precision', and 'human' - format: { - # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5) - separator: ".", - # Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three) - delimiter: ",", - # Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00) - precision: 3, - # If set to true, precision will mean the number of significant digits instead - # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2) - significant: false, - # If set, the zeros after the decimal separator will always be stripped (e.g.: 1.200 will be 1.2) - strip_insignificant_zeros: false - }, - - # Used in number_to_currency - currency: { - format: { - format: "%u%n", - negative_format: "-%u%n", - unit: "$", - # These five are to override number.format and are optional - separator: ".", - delimiter: ",", - precision: 2, - significant: false, - strip_insignificant_zeros: false - } - }, - - # Used in number_to_percentage - percentage: { - format: { - delimiter: "", - format: "%n%" - } - }, - - # Used in number_to_rounded - precision: { - format: { - delimiter: "" - } - }, - - # Used in number_to_human_size and number_to_human - human: { - format: { - # These five are to override number.format and are optional - delimiter: "", - precision: 3, - significant: true, - strip_insignificant_zeros: true - }, - # Used in number_to_human_size - storage_units: { - # Storage units output formatting. - # %u is the storage unit, %n is the number (default: 2 MB) - format: "%n %u", - units: { - byte: "Bytes", - kb: "KB", - mb: "MB", - gb: "GB", - tb: "TB" - } - }, - # Used in number_to_human - decimal_units: { - format: "%n %u", - # Decimal units output formatting - # By default we will only quantify some of the exponents - # but the commented ones might be defined or overridden - # by the user. - units: { - # femto: Quadrillionth - # pico: Trillionth - # nano: Billionth - # micro: Millionth - # mili: Thousandth - # centi: Hundredth - # deci: Tenth - unit: "", - # ten: - # one: Ten - # other: Tens - # hundred: Hundred - thousand: "Thousand", - million: "Million", - billion: "Billion", - trillion: "Trillion", - quadrillion: "Quadrillion" - } - } - } - } - - def self.convert(number, options) - new(number, options).execute - end - - def initialize(number, options) - @number = number - @opts = options.symbolize_keys - @options = nil - end - - def execute - if !number - nil - elsif validate_float? && !valid_bigdecimal - number - else - convert - end - end - - private - def options - @options ||= format_options.merge(opts) - end - - def format_options - default_format_options.merge!(i18n_format_options) - end - - def default_format_options - options = DEFAULTS[:format].dup - options.merge!(DEFAULTS[namespace][:format]) if namespace - options - end - - def i18n_format_options - locale = opts[:locale] - options = I18n.translate(:'number.format', locale: locale, default: {}).dup - - if namespace - options.merge!(I18n.translate(:"number.#{namespace}.format", locale: locale, default: {})) - end - - options - end - - def translate_number_value_with_default(key, **i18n_options) - I18n.translate(key, default: default_value(key), scope: :number, **i18n_options) - end - - def translate_in_locale(key, **i18n_options) - translate_number_value_with_default(key, locale: options[:locale], **i18n_options) - end - - def default_value(key) - key.split(".").reduce(DEFAULTS) { |defaults, k| defaults[k.to_sym] } - end - - def valid_bigdecimal - case number - when Float, Rational - number.to_d(0) - when String - BigDecimal(number, exception: false) - else - number.to_d rescue nil - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_currency_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_currency_converter.rb deleted file mode 100644 index 543c7b4f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_currency_converter.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -require "active_support/number_helper/number_converter" - -module ActiveSupport - module NumberHelper - class NumberToCurrencyConverter < NumberConverter # :nodoc: - self.namespace = :currency - - def convert - format = options[:format] - - number_d = valid_bigdecimal - if number_d - if number_d.negative? - number_d = number_d.abs - format = options[:negative_format] if (number_d * 10**options[:precision]) >= 0.5 - end - number_s = NumberToRoundedConverter.convert(number_d, options) - else - number_s = number.to_s.strip - format = options[:negative_format] if number_s.sub!(/^-/, "") - end - - format.gsub("%n", number_s).gsub("%u", options[:unit]) - end - - private - def options - @options ||= begin - defaults = default_format_options.merge(i18n_opts) - # Override negative format if format options are given - defaults[:negative_format] = "-#{opts[:format]}" if opts[:format] - defaults.merge!(opts) - end - end - - def i18n_opts - # Set International negative format if it does not exist - i18n = i18n_format_options - i18n[:negative_format] ||= "-#{i18n[:format]}" if i18n[:format] - i18n - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_delimited_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_delimited_converter.rb deleted file mode 100644 index 4fb2fb71..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_delimited_converter.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -require "active_support/number_helper/number_converter" - -module ActiveSupport - module NumberHelper - class NumberToDelimitedConverter < NumberConverter # :nodoc: - self.validate_float = true - - DEFAULT_DELIMITER_REGEX = /(\d)(?=(\d\d\d)+(?!\d))/ - - def convert - parts.join(options[:separator]) - end - - private - def parts - left, right = number.to_s.split(".") - left.gsub!(delimiter_pattern) do |digit_to_delimit| - "#{digit_to_delimit}#{options[:delimiter]}" - end - [left, right].compact - end - - def delimiter_pattern - options.fetch(:delimiter_pattern, DEFAULT_DELIMITER_REGEX) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_human_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_human_converter.rb deleted file mode 100644 index 3f926285..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_human_converter.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -require "active_support/number_helper/number_converter" - -module ActiveSupport - module NumberHelper - class NumberToHumanConverter < NumberConverter # :nodoc: - DECIMAL_UNITS = { 0 => :unit, 1 => :ten, 2 => :hundred, 3 => :thousand, 6 => :million, 9 => :billion, 12 => :trillion, 15 => :quadrillion, - -1 => :deci, -2 => :centi, -3 => :mili, -6 => :micro, -9 => :nano, -12 => :pico, -15 => :femto } - INVERTED_DECIMAL_UNITS = DECIMAL_UNITS.invert - - self.namespace = :human - self.validate_float = true - - def convert # :nodoc: - @number = RoundingHelper.new(options).round(number) - @number = Float(number) - - # For backwards compatibility with those that didn't add strip_insignificant_zeros to their locale files. - unless options.key?(:strip_insignificant_zeros) - options[:strip_insignificant_zeros] = true - end - - units = opts[:units] - exponent = calculate_exponent(units) - @number = number / (10**exponent) - - rounded_number = NumberToRoundedConverter.convert(number, options) - unit = determine_unit(units, exponent) - format.gsub("%n", rounded_number).gsub("%u", unit).strip - end - - private - def format - options[:format] || translate_in_locale("human.decimal_units.format") - end - - def determine_unit(units, exponent) - exp = DECIMAL_UNITS[exponent] - case units - when Hash - units[exp] || "" - when String, Symbol - I18n.translate("#{units}.#{exp}", locale: options[:locale], count: number.to_i) - else - translate_in_locale("human.decimal_units.units.#{exp}", count: number.to_i) - end - end - - def calculate_exponent(units) - exponent = number != 0 ? Math.log10(number.abs).floor : 0 - unit_exponents(units).find { |e| exponent >= e } || 0 - end - - def unit_exponents(units) - case units - when Hash - units - when String, Symbol - I18n.translate(units.to_s, locale: options[:locale], raise: true) - when nil - translate_in_locale("human.decimal_units.units", raise: true) - else - raise ArgumentError, ":units must be a Hash or String translation scope." - end.keys.map { |e_name| INVERTED_DECIMAL_UNITS[e_name] }.sort_by(&:-@) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_human_size_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_human_size_converter.rb deleted file mode 100644 index 66688a42..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_human_size_converter.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require "active_support/number_helper/number_converter" - -module ActiveSupport - module NumberHelper - class NumberToHumanSizeConverter < NumberConverter # :nodoc: - STORAGE_UNITS = [:byte, :kb, :mb, :gb, :tb, :pb, :eb, :zb] - - self.namespace = :human - self.validate_float = true - - def convert - @number = Float(number) - - # For backwards compatibility with those that didn't add strip_insignificant_zeros to their locale files. - unless options.key?(:strip_insignificant_zeros) - options[:strip_insignificant_zeros] = true - end - - if smaller_than_base? - number_to_format = number.to_i.to_s - else - human_size = number / (base**exponent) - number_to_format = NumberToRoundedConverter.convert(human_size, options) - end - conversion_format.gsub("%n", number_to_format).gsub("%u", unit) - end - - private - def conversion_format - translate_number_value_with_default("human.storage_units.format", locale: options[:locale], raise: true) - end - - def unit - translate_number_value_with_default(storage_unit_key, locale: options[:locale], count: number.to_i, raise: true) - end - - def storage_unit_key - key_end = smaller_than_base? ? "byte" : STORAGE_UNITS[exponent] - "human.storage_units.units.#{key_end}" - end - - def exponent - max = STORAGE_UNITS.size - 1 - exp = (Math.log(number.abs) / Math.log(base)).to_i - exp = max if exp > max # avoid overflow for the highest unit - exp - end - - def smaller_than_base? - number.to_i.abs < base - end - - def base - 1024 - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_percentage_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_percentage_converter.rb deleted file mode 100644 index 0c2e190f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_percentage_converter.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -require "active_support/number_helper/number_converter" - -module ActiveSupport - module NumberHelper - class NumberToPercentageConverter < NumberConverter # :nodoc: - self.namespace = :percentage - - def convert - rounded_number = NumberToRoundedConverter.convert(number, options) - options[:format].gsub("%n", rounded_number) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_phone_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_phone_converter.rb deleted file mode 100644 index d104449a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_phone_converter.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/blank" -require "active_support/number_helper/number_converter" - -module ActiveSupport - module NumberHelper - class NumberToPhoneConverter < NumberConverter # :nodoc: - def convert - str = country_code(opts[:country_code]).dup - str << convert_to_phone_number(number.to_s.strip) - str << phone_ext(opts[:extension]) - end - - private - def convert_to_phone_number(number) - if opts[:area_code] - convert_with_area_code(number) - else - convert_without_area_code(number) - end - end - - def convert_with_area_code(number) - default_pattern = /(\d{1,3})(\d{3})(\d{4}$)/ - number.gsub!(regexp_pattern(default_pattern), - "(\\1) \\2#{delimiter}\\3") - number - end - - def convert_without_area_code(number) - default_pattern = /(\d{0,3})(\d{3})(\d{4})$/ - number.gsub!(regexp_pattern(default_pattern), - "\\1#{delimiter}\\2#{delimiter}\\3") - number.slice!(0, 1) if start_with_delimiter?(number) - number - end - - def start_with_delimiter?(number) - delimiter.present? && number.start_with?(delimiter) - end - - def delimiter - opts[:delimiter] || "-" - end - - def country_code(code) - code.blank? ? "" : "+#{code}#{delimiter}" - end - - def phone_ext(ext) - ext.blank? ? "" : " x #{ext}" - end - - def regexp_pattern(default_pattern) - opts.fetch :pattern, default_pattern - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_rounded_converter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_rounded_converter.rb deleted file mode 100644 index f48a5158..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/number_to_rounded_converter.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -require "active_support/number_helper/number_converter" - -module ActiveSupport - module NumberHelper - class NumberToRoundedConverter < NumberConverter # :nodoc: - self.namespace = :precision - self.validate_float = true - - def convert - helper = RoundingHelper.new(options) - rounded_number = helper.round(number) - - if precision = options[:precision] - if options[:significant] && precision > 0 - digits = helper.digit_count(rounded_number) - precision -= digits - precision = 0 if precision < 0 # don't let it be negative - end - - formatted_string = - if rounded_number.finite? - s = rounded_number.to_s("F") - a, b = s.split(".", 2) - if precision != 0 - b << "0" * precision - a << "." - a << b[0, precision] - end - a - else - # Infinity/NaN - "%f" % rounded_number - end - else - formatted_string = rounded_number - end - - delimited_number = NumberToDelimitedConverter.convert(formatted_string, options) - format_number(delimited_number) - end - - private - def strip_insignificant_zeros - options[:strip_insignificant_zeros] - end - - def format_number(number) - if strip_insignificant_zeros - escaped_separator = Regexp.escape(options[:separator]) - number.sub(/(#{escaped_separator})(\d*[1-9])?0+\z/, '\1\2').sub(/#{escaped_separator}\z/, "") - else - number - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/rounding_helper.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/rounding_helper.rb deleted file mode 100644 index 14deca13..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/number_helper/rounding_helper.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module NumberHelper - class RoundingHelper # :nodoc: - attr_reader :options - - def initialize(options) - @options = options - end - - def round(number) - precision = absolute_precision(number) - return number unless precision - - rounded_number = convert_to_decimal(number).round(precision, options.fetch(:round_mode, :default).to_sym) - rounded_number.zero? ? rounded_number.abs : rounded_number # prevent showing negative zeros - end - - def digit_count(number) - return 1 if number.zero? - (Math.log10(number.abs) + 1).floor - end - - private - def convert_to_decimal(number) - case number - when Float, String - BigDecimal(number.to_s) - when Rational - BigDecimal(number, digit_count(number.to_i) + options[:precision]) - else - number.to_d - end - end - - def absolute_precision(number) - if options[:significant] && options[:precision] > 0 - options[:precision] - digit_count(convert_to_decimal(number)) - else - options[:precision] - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/option_merger.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/option_merger.rb deleted file mode 100644 index 36d99a6e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/option_merger.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/hash/deep_merge" - -module ActiveSupport - class OptionMerger # :nodoc: - instance_methods.each do |method| - undef_method(method) unless method.start_with?("__", "instance_eval", "class", "object_id") - end - - def initialize(context, options) - @context, @options = context, options - end - - private - def method_missing(method, *arguments, &block) - options = nil - if arguments.size == 1 && arguments.first.is_a?(Proc) - proc = arguments.shift - arguments << lambda { |*args| @options.deep_merge(proc.call(*args)) } - elsif arguments.last.respond_to?(:to_hash) - options = @options.deep_merge(arguments.pop) - else - options = @options - end - - if options - @context.__send__(method, *arguments, **options, &block) - else - @context.__send__(method, *arguments, &block) - end - end - - def respond_to_missing?(...) - @context.respond_to?(...) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/ordered_hash.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/ordered_hash.rb deleted file mode 100644 index 07cde368..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/ordered_hash.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -require "yaml" - -YAML.add_builtin_type("omap") do |type, val| - ActiveSupport::OrderedHash[val.map { |v| v.to_a.first }] -end - -module ActiveSupport - # DEPRECATED: +ActiveSupport::OrderedHash+ implements a hash that preserves - # insertion order. - # - # oh = ActiveSupport::OrderedHash.new - # oh[:a] = 1 - # oh[:b] = 2 - # oh.keys # => [:a, :b], this order is guaranteed - # - # Also, maps the +omap+ feature for YAML files - # (See https://yaml.org/type/omap.html) to support ordered items - # when loading from YAML. - # - # +ActiveSupport::OrderedHash+ is namespaced to prevent conflicts - # with other implementations. - class OrderedHash < ::Hash # :nodoc: - def to_yaml_type - "!tag:yaml.org,2002:omap" - end - - def encode_with(coder) - coder.represent_seq "!omap", map { |k, v| { k => v } } - end - - def select(*args, &block) - dup.tap { |hash| hash.select!(*args, &block) } - end - - def reject(*args, &block) - dup.tap { |hash| hash.reject!(*args, &block) } - end - - def nested_under_indifferent_access - self - end - - # Returns true to make sure that this hash is extractable via Array#extract_options! - def extractable_options? - true - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/ordered_options.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/ordered_options.rb deleted file mode 100644 index 00048325..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/ordered_options.rb +++ /dev/null @@ -1,147 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/blank" - -module ActiveSupport - # = Ordered Options - # - # +OrderedOptions+ inherits from +Hash+ and provides dynamic accessor methods. - # - # With a +Hash+, key-value pairs are typically managed like this: - # - # h = {} - # h[:boy] = 'John' - # h[:girl] = 'Mary' - # h[:boy] # => 'John' - # h[:girl] # => 'Mary' - # h[:dog] # => nil - # - # Using +OrderedOptions+, the above code can be written as: - # - # h = ActiveSupport::OrderedOptions.new - # h.boy = 'John' - # h.girl = 'Mary' - # h.boy # => 'John' - # h.girl # => 'Mary' - # h.dog # => nil - # - # To raise an exception when the value is blank, append a - # bang to the key name, like: - # - # h.dog! # => raises KeyError: :dog is blank - # - class OrderedOptions < Hash - alias_method :_get, :[] # preserve the original #[] method - protected :_get # make it protected - - def []=(key, value) - super(key.to_sym, value) - end - - def [](key) - super(key.to_sym) - end - - def dig(key, *identifiers) - super(key.to_sym, *identifiers) - end - - def method_missing(method, *args) - if method.end_with?("=") - self[method.name.chomp("=")] = args.first - elsif method.end_with?("!") - name_string = method.name.chomp("!") - self[name_string].presence || raise(KeyError.new(":#{name_string} is blank")) - else - self[method.name] - end - end - - def respond_to_missing?(name, include_private) - true - end - - def extractable_options? - true - end - - def inspect - "#<#{self.class.name} #{super}>" - end - end - - # = Inheritable Options - # - # +InheritableOptions+ provides a constructor to build an OrderedOptions - # hash inherited from another hash. - # - # Use this if you already have some hash and you want to create a new one based on it. - # - # h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' }) - # h.girl # => 'Mary' - # h.boy # => 'John' - # - # If the existing hash has string keys, call Hash#symbolize_keys on it. - # - # h = ActiveSupport::InheritableOptions.new({ 'girl' => 'Mary', 'boy' => 'John' }.symbolize_keys) - # h.girl # => 'Mary' - # h.boy # => 'John' - class InheritableOptions < OrderedOptions - def initialize(parent = nil) - @parent = parent - if @parent.kind_of?(OrderedOptions) - # use the faster _get when dealing with OrderedOptions - super() { |h, k| @parent._get(k) } - elsif @parent - super() { |h, k| @parent[k] } - else - super() - @parent = {} - end - end - - def to_h - @parent.merge(self) - end - - def ==(other) - to_h == other.to_h - end - - def inspect - "#<#{self.class.name} #{to_h.inspect}>" - end - - def to_s - to_h.to_s - end - - def pretty_print(pp) - pp.pp_hash(to_h) - end - - alias_method :own_key?, :key? - private :own_key? - - def key?(key) - super || @parent.key?(key) - end - - def overridden?(key) - !!(@parent && @parent.key?(key) && own_key?(key.to_sym)) - end - - def inheritable_copy - self.class.new(self) - end - - def to_a - entries - end - - def each(&block) - to_h.each(&block) - self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/parameter_filter.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/parameter_filter.rb deleted file mode 100644 index 7eeae6b2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/parameter_filter.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/object/duplicable" -require "active_support/core_ext/array/extract" - -module ActiveSupport - # = Active Support Parameter Filter - # - # +ParameterFilter+ replaces values in a Hash-like object if their - # keys match one of the specified filters. - # - # Matching based on nested keys is possible by using dot notation, e.g. - # "credit_card.number". - # - # If a proc is given as a filter, each key and value of the Hash-like - # and of any nested Hashes will be passed to it. The value or key can - # then be mutated as desired using methods such as String#replace. - # - # # Replaces values with "[FILTERED]" for keys that match /password/i. - # ActiveSupport::ParameterFilter.new([:password]) - # - # # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. - # ActiveSupport::ParameterFilter.new([:foo, "bar"]) - # - # # Replaces values for the exact key "pin" and for keys that begin with - # # "pin_". Does not match keys that otherwise include "pin" as a - # # substring, such as "shipping_id". - # ActiveSupport::ParameterFilter.new([/\Apin\z/, /\Apin_/]) - # - # # Replaces the value for :code in `{ credit_card: { code: "xxxx" } }`. - # # Does not change `{ file: { code: "xxxx" } }`. - # ActiveSupport::ParameterFilter.new(["credit_card.code"]) - # - # # Reverses values for keys that match /secret/i. - # ActiveSupport::ParameterFilter.new([-> (k, v) do - # v.reverse! if /secret/i.match?(k) - # end]) - # - class ParameterFilter - FILTERED = "[FILTERED]" # :nodoc: - - # Precompiles an array of filters that otherwise would be passed directly to - # #initialize. Depending on the quantity and types of filters, - # precompilation can improve filtering performance, especially in the case - # where the ParameterFilter instance itself cannot be retained (but the - # precompiled filters can be retained). - # - # filters = [/foo/, :bar, "nested.baz", /nested\.qux/] - # - # precompiled = ActiveSupport::ParameterFilter.precompile_filters(filters) - # # => [/(?-mix:foo)|(?i:bar)/, /(?i:nested\.baz)|(?-mix:nested\.qux)/] - # - # ActiveSupport::ParameterFilter.new(precompiled) - # - def self.precompile_filters(filters) - filters, patterns = filters.partition { |filter| filter.is_a?(Proc) } - - patterns.map! do |pattern| - pattern.is_a?(Regexp) ? pattern : "(?i:#{Regexp.escape pattern.to_s})" - end - - deep_patterns = patterns.extract! { |pattern| pattern.to_s.include?("\\.") } - - filters << Regexp.new(patterns.join("|")) if patterns.any? - filters << Regexp.new(deep_patterns.join("|")) if deep_patterns.any? - - filters - end - - # Create instance with given filters. Supported type of filters are +String+, +Regexp+, and +Proc+. - # Other types of filters are treated as +String+ using +to_s+. - # For +Proc+ filters, key, value, and optional original hash is passed to block arguments. - # - # ==== Options - # - # * :mask - A replaced object when filtered. Defaults to "[FILTERED]". - def initialize(filters = [], mask: FILTERED) - @mask = mask - compile_filters!(filters) - end - - # Mask value of +params+ if key matches one of filters. - def filter(params) - @no_filters ? params.dup : call(params) - end - - # Returns filtered value for given key. For +Proc+ filters, third block argument is not populated. - def filter_param(key, value) - @no_filters ? value : value_for_key(key, value) - end - - private - def compile_filters!(filters) - @no_filters = filters.empty? - return if @no_filters - - @regexps, strings = [], [] - @deep_regexps, deep_strings = nil, nil - @blocks = nil - - filters.each do |item| - case item - when Proc - (@blocks ||= []) << item - when Regexp - if item.to_s.include?("\\.") - (@deep_regexps ||= []) << item - else - @regexps << item - end - else - s = Regexp.escape(item.to_s) - if s.include?("\\.") - (deep_strings ||= []) << s - else - strings << s - end - end - end - - @regexps << Regexp.new(strings.join("|"), true) unless strings.empty? - (@deep_regexps ||= []) << Regexp.new(deep_strings.join("|"), true) if deep_strings - end - - def call(params, full_parent_key = nil, original_params = params) - filtered_params = params.class.new - - params.each do |key, value| - filtered_params[key] = value_for_key(key, value, full_parent_key, original_params) - end - - filtered_params - end - - def value_for_key(key, value, full_parent_key = nil, original_params = nil) - if @deep_regexps - full_key = full_parent_key ? "#{full_parent_key}.#{key}" : key.to_s - end - - if @regexps.any? { |r| r.match?(key.to_s) } - value = @mask - elsif @deep_regexps&.any? { |r| r.match?(full_key) } - value = @mask - elsif value.is_a?(Hash) - value = call(value, full_key, original_params) - elsif value.is_a?(Array) - value = value.map { |v| value_for_key(key, v, full_parent_key, original_params) } - elsif @blocks - key = key.dup if key.duplicable? - value = value.dup if value.duplicable? - @blocks.each { |b| b.arity == 2 ? b.call(key, value) : b.call(key, value, original_params) } - end - - value - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/rails.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/rails.rb deleted file mode 100644 index 75676a2e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/rails.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# This is a private interface. -# -# Rails components cherry pick from Active Support as needed, but there are a -# few features that are used for sure in some way or another and it is not worth -# putting individual requires absolutely everywhere. Think blank? for example. -# -# This file is loaded by every Rails component except Active Support itself, -# but it does not belong to the Rails public interface. It is internal to -# Rails and can change anytime. - -# Defines Object#blank? and Object#present?. -require "active_support/core_ext/object/blank" - -# Support for ClassMethods and the included macro. -require "active_support/concern" - -# Defines Class#class_attribute. -require "active_support/core_ext/class/attribute" - -# Defines Module#delegate. -require "active_support/core_ext/module/delegation" - -# Defines ActiveSupport::Deprecation. -require "active_support/deprecation" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/railtie.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/railtie.rb deleted file mode 100644 index eec12b37..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/railtie.rb +++ /dev/null @@ -1,163 +0,0 @@ -# frozen_string_literal: true - -require "active_support" -require "active_support/i18n_railtie" - -module ActiveSupport - class Railtie < Rails::Railtie # :nodoc: - config.active_support = ActiveSupport::OrderedOptions.new - - config.eager_load_namespaces << ActiveSupport - - initializer "active_support.deprecator", before: :load_environment_config do |app| - app.deprecators[:active_support] = ActiveSupport.deprecator - end - - initializer "active_support.isolation_level" do |app| - config.after_initialize do - if level = app.config.active_support.delete(:isolation_level) - ActiveSupport::IsolatedExecutionState.isolation_level = level - end - end - end - - initializer "active_support.raise_on_invalid_cache_expiration_time" do |app| - config.after_initialize do - if app.config.active_support.raise_on_invalid_cache_expiration_time - ActiveSupport::Cache::Store.raise_on_invalid_cache_expiration_time = true - end - end - end - - initializer "active_support.set_authenticated_message_encryption" do |app| - config.after_initialize do - unless app.config.active_support.use_authenticated_message_encryption.nil? - ActiveSupport::MessageEncryptor.use_authenticated_message_encryption = - app.config.active_support.use_authenticated_message_encryption - end - end - end - - initializer "active_support.reset_execution_context" do |app| - app.reloader.before_class_unload { ActiveSupport::ExecutionContext.clear } - app.executor.to_run { ActiveSupport::ExecutionContext.clear } - app.executor.to_complete { ActiveSupport::ExecutionContext.clear } - end - - initializer "active_support.reset_all_current_attributes_instances" do |app| - app.reloader.before_class_unload { ActiveSupport::CurrentAttributes.clear_all } - app.executor.to_run { ActiveSupport::CurrentAttributes.reset_all } - app.executor.to_complete { ActiveSupport::CurrentAttributes.reset_all } - - ActiveSupport.on_load(:active_support_test_case) do - if app.config.active_support.executor_around_test_case - require "active_support/executor/test_helper" - include ActiveSupport::Executor::TestHelper - else - require "active_support/current_attributes/test_helper" - include ActiveSupport::CurrentAttributes::TestHelper - - require "active_support/execution_context/test_helper" - include ActiveSupport::ExecutionContext::TestHelper - end - end - end - - initializer "active_support.deprecation_behavior" do |app| - if app.config.active_support.report_deprecations == false - app.deprecators.silenced = true - app.deprecators.behavior = :silence - app.deprecators.disallowed_behavior = :silence - else - if deprecation = app.config.active_support.deprecation - app.deprecators.behavior = deprecation - end - - if disallowed_deprecation = app.config.active_support.disallowed_deprecation - app.deprecators.disallowed_behavior = disallowed_deprecation - end - - if disallowed_warnings = app.config.active_support.disallowed_deprecation_warnings - app.deprecators.disallowed_warnings = disallowed_warnings - end - end - end - - # Sets the default value for Time.zone - # If assigned value cannot be matched to a TimeZone, an exception will be raised. - initializer "active_support.initialize_time_zone" do |app| - begin - TZInfo::DataSource.get - rescue TZInfo::DataSourceNotFound => e - raise e.exception('tzinfo-data is not present. Please add gem "tzinfo-data" to your Gemfile and run bundle install') - end - require "active_support/core_ext/time/zones" - Time.zone_default = Time.find_zone!(app.config.time_zone) - config.eager_load_namespaces << TZInfo - end - - initializer "active_support.to_time_preserves_timezone" do |app| - config.after_initialize do - ActiveSupport.to_time_preserves_timezone = app.config.active_support.to_time_preserves_timezone - end - end - - # Sets the default week start - # If assigned value is not a valid day symbol (e.g. :sunday, :monday, ...), an exception will be raised. - initializer "active_support.initialize_beginning_of_week" do |app| - require "active_support/core_ext/date/calculations" - beginning_of_week_default = Date.find_beginning_of_week!(app.config.beginning_of_week) - - Date.beginning_of_week_default = beginning_of_week_default - end - - initializer "active_support.require_master_key" do |app| - if app.config.respond_to?(:require_master_key) && app.config.require_master_key - begin - app.credentials.key - rescue ActiveSupport::EncryptedFile::MissingKeyError => error - $stderr.puts error.message - exit 1 - end - end - end - - initializer "active_support.set_configs" do |app| - app.config.active_support.each do |k, v| - k = "#{k}=" - ActiveSupport.public_send(k, v) if ActiveSupport.respond_to? k - end - end - - initializer "active_support.set_hash_digest_class" do |app| - config.after_initialize do - if klass = app.config.active_support.hash_digest_class - ActiveSupport::Digest.hash_digest_class = klass - end - end - end - - initializer "active_support.set_key_generator_hash_digest_class" do |app| - config.after_initialize do - if klass = app.config.active_support.key_generator_hash_digest_class - ActiveSupport::KeyGenerator.hash_digest_class = klass - end - end - end - - initializer "active_support.set_default_message_serializer" do |app| - config.after_initialize do - if message_serializer = app.config.active_support.message_serializer - ActiveSupport::Messages::Codec.default_serializer = message_serializer - end - end - end - - initializer "active_support.set_use_message_serializer_for_metadata" do |app| - config.after_initialize do - ActiveSupport::Messages::Metadata.use_message_serializer_for_metadata = - app.config.active_support.use_message_serializer_for_metadata - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/reloader.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/reloader.rb deleted file mode 100644 index 33257ed7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/reloader.rb +++ /dev/null @@ -1,138 +0,0 @@ -# frozen_string_literal: true - -require "active_support/execution_wrapper" -require "active_support/executor" - -module ActiveSupport - # = Active Support \Reloader - # - # This class defines several callbacks: - # - # to_prepare -- Run once at application startup, and also from - # +to_run+. - # - # to_run -- Run before a work run that is reloading. If - # +reload_classes_only_on_change+ is true (the default), the class - # unload will have already occurred. - # - # to_complete -- Run after a work run that has reloaded. If - # +reload_classes_only_on_change+ is false, the class unload will - # have occurred after the work run, but before this callback. - # - # before_class_unload -- Run immediately before the classes are - # unloaded. - # - # after_class_unload -- Run immediately after the classes are - # unloaded. - # - class Reloader < ExecutionWrapper - define_callbacks :prepare - - define_callbacks :class_unload - - # Registers a callback that will run once at application startup and every time the code is reloaded. - def self.to_prepare(*args, &block) - set_callback(:prepare, *args, &block) - end - - # Registers a callback that will run immediately before the classes are unloaded. - def self.before_class_unload(*args, &block) - set_callback(:class_unload, *args, &block) - end - - # Registers a callback that will run immediately after the classes are unloaded. - def self.after_class_unload(*args, &block) - set_callback(:class_unload, :after, *args, &block) - end - - to_run(:after) { self.class.prepare! } - - # Initiate a manual reload - def self.reload! - executor.wrap do - new.tap do |instance| - instance.run! - ensure - instance.complete! - end - end - prepare! - end - - def self.run!(reset: false) # :nodoc: - if check! - super - else - Null - end - end - - # Run the supplied block as a work unit, reloading code as needed - def self.wrap(**kwargs) - return yield if active? - - executor.wrap(**kwargs) do - instance = run! - begin - yield - ensure - instance.complete! - end - end - end - - class_attribute :executor, default: Executor - class_attribute :check, default: lambda { false } - - def self.check! # :nodoc: - @should_reload ||= check.call - end - - def self.reloaded! # :nodoc: - @should_reload = false - end - - def self.prepare! # :nodoc: - new.run_callbacks(:prepare) - end - - def initialize - super - @locked = false - end - - # Acquire the ActiveSupport::Dependencies::Interlock unload lock, - # ensuring it will be released automatically - def require_unload_lock! - unless @locked - ActiveSupport::Dependencies.interlock.start_unloading - @locked = true - end - end - - # Release the unload lock if it has been previously obtained - def release_unload_lock! - if @locked - @locked = false - ActiveSupport::Dependencies.interlock.done_unloading - end - end - - def run! # :nodoc: - super - release_unload_lock! - end - - def class_unload!(&block) # :nodoc: - require_unload_lock! - run_callbacks(:class_unload, &block) - end - - def complete! # :nodoc: - super - self.class.reloaded! - ensure - release_unload_lock! - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/rescuable.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/rescuable.rb deleted file mode 100644 index 470f01d9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/rescuable.rb +++ /dev/null @@ -1,176 +0,0 @@ -# frozen_string_literal: true - -require "active_support/concern" -require "active_support/core_ext/class/attribute" -require "active_support/core_ext/string/inflections" - -module ActiveSupport - # = Active Support \Rescuable - # - # Rescuable module adds support for easier exception handling. - module Rescuable - extend Concern - - included do - class_attribute :rescue_handlers, default: [] - end - - module ClassMethods - # Registers exception classes with a handler to be called by rescue_with_handler. - # - # rescue_from receives a series of exception classes or class - # names, and an exception handler specified by a trailing :with - # option containing the name of a method or a Proc object. Alternatively, a block - # can be given as the handler. - # - # Handlers that take one argument will be called with the exception, so - # that the exception can be inspected when dealing with it. - # - # Handlers are inherited. They are searched from right to left, from - # bottom to top, and up the hierarchy. The handler of the first class for - # which exception.is_a?(klass) holds true is the one invoked, if - # any. - # - # class ApplicationController < ActionController::Base - # rescue_from User::NotAuthorized, with: :deny_access - # rescue_from ActiveRecord::RecordInvalid, with: :show_record_errors - # - # rescue_from "MyApp::BaseError" do |exception| - # redirect_to root_url, alert: exception.message - # end - # - # private - # def deny_access - # head :forbidden - # end - # - # def show_record_errors(exception) - # redirect_back_or_to root_url, alert: exception.record.errors.full_messages.to_sentence - # end - # end - # - # Exceptions raised inside exception handlers are not propagated up. - def rescue_from(*klasses, with: nil, &block) - unless with - if block_given? - with = block - else - raise ArgumentError, "Need a handler. Pass the with: keyword argument or provide a block." - end - end - - klasses.each do |klass| - key = if klass.is_a?(Module) && klass.respond_to?(:===) - klass.name - elsif klass.is_a?(String) - klass - else - raise ArgumentError, "#{klass.inspect} must be an Exception class or a String referencing an Exception class" - end - - # Put the new handler at the end because the list is read in reverse. - self.rescue_handlers += [[key, with]] - end - end - - # Matches an exception to a handler based on the exception class. - # - # If no handler matches the exception, check for a handler matching the - # (optional) +exception.cause+. If no handler matches the exception or its - # cause, this returns +nil+, so you can deal with unhandled exceptions. - # Be sure to re-raise unhandled exceptions if this is what you expect. - # - # begin - # # ... - # rescue => exception - # rescue_with_handler(exception) || raise - # end - # - # Returns the exception if it was handled and +nil+ if it was not. - def rescue_with_handler(exception, object: self, visited_exceptions: []) - visited_exceptions << exception - - if handler = handler_for_rescue(exception, object: object) - handler.call exception - exception - elsif exception - if visited_exceptions.include?(exception.cause) - nil - else - rescue_with_handler(exception.cause, object: object, visited_exceptions: visited_exceptions) - end - end - end - - def handler_for_rescue(exception, object: self) # :nodoc: - case rescuer = find_rescue_handler(exception) - when Symbol - method = object.method(rescuer) - if method.arity == 0 - -> e { method.call } - else - method - end - when Proc - if rescuer.arity == 0 - -> e { object.instance_exec(&rescuer) } - else - -> e { object.instance_exec(e, &rescuer) } - end - end - end - - private - def find_rescue_handler(exception) - if exception - # Handlers are in order of declaration but the most recently declared - # is the highest priority match, so we search for matching handlers - # in reverse. - _, handler = rescue_handlers.reverse_each.detect do |class_or_name, _| - if klass = constantize_rescue_handler_class(class_or_name) - klass === exception - end - end - - handler - end - end - - def constantize_rescue_handler_class(class_or_name) - case class_or_name - when String, Symbol - begin - # Try a lexical lookup first since we support - # - # class Super - # rescue_from 'Error', with: … - # end - # - # class Sub - # class Error < StandardError; end - # end - # - # so an Error raised in Sub will hit the 'Error' handler. - const_get class_or_name - rescue NameError - class_or_name.safe_constantize - end - else - class_or_name - end - end - end - - # Delegates to the class method, but uses the instance as the subject for - # rescue_from handlers (method calls, +instance_exec+ blocks). - def rescue_with_handler(exception) - self.class.rescue_with_handler exception, object: self - end - - # Internal handler lookup. Delegates to class method. Some libraries call - # this directly, so keeping it around for compatibility. - def handler_for_rescue(exception) # :nodoc: - self.class.handler_for_rescue exception, object: self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/secure_compare_rotator.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/secure_compare_rotator.rb deleted file mode 100644 index 1c203898..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/secure_compare_rotator.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -require "active_support/security_utils" -require "active_support/messages/rotator" - -module ActiveSupport - # = Secure Compare Rotator - # - # The ActiveSupport::SecureCompareRotator is a wrapper around ActiveSupport::SecurityUtils.secure_compare - # and allows you to rotate a previously defined value to a new one. - # - # It can be used as follow: - # - # rotator = ActiveSupport::SecureCompareRotator.new('new_production_value') - # rotator.rotate('previous_production_value') - # rotator.secure_compare!('previous_production_value') - # - # One real use case example would be to rotate a basic auth credentials: - # - # class MyController < ApplicationController - # def authenticate_request - # rotator = ActiveSupport::SecureCompareRotator.new('new_password') - # rotator.rotate('old_password') - # - # authenticate_or_request_with_http_basic do |username, password| - # rotator.secure_compare!(password) - # rescue ActiveSupport::SecureCompareRotator::InvalidMatch - # false - # end - # end - # end - class SecureCompareRotator - include SecurityUtils - - InvalidMatch = Class.new(StandardError) - - def initialize(value, on_rotation: nil) - @value = value - @rotate_values = [] - @on_rotation = on_rotation - end - - def rotate(previous_value) - @rotate_values << previous_value - end - - def secure_compare!(other_value, on_rotation: @on_rotation) - if secure_compare(@value, other_value) - true - elsif @rotate_values.any? { |value| secure_compare(value, other_value) } - on_rotation&.call - true - else - raise InvalidMatch - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/security_utils.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/security_utils.rb deleted file mode 100644 index aa004744..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/security_utils.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module SecurityUtils - # Constant time string comparison, for fixed length strings. - # - # The values compared should be of fixed length, such as strings - # that have already been processed by HMAC. Raises in case of length mismatch. - - if defined?(OpenSSL.fixed_length_secure_compare) - def fixed_length_secure_compare(a, b) - OpenSSL.fixed_length_secure_compare(a, b) - end - else - def fixed_length_secure_compare(a, b) - raise ArgumentError, "string length mismatch." unless a.bytesize == b.bytesize - - l = a.unpack "C#{a.bytesize}" - - res = 0 - b.each_byte { |byte| res |= byte ^ l.shift } - res == 0 - end - end - module_function :fixed_length_secure_compare - - # Secure string comparison for strings of variable length. - # - # While a timing attack would not be able to discern the content of - # a secret compared via secure_compare, it is possible to determine - # the secret length. This should be considered when using secure_compare - # to compare weak, short secrets to user input. - def secure_compare(a, b) - a.bytesize == b.bytesize && fixed_length_secure_compare(a, b) - end - module_function :secure_compare - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/string_inquirer.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/string_inquirer.rb deleted file mode 100644 index 9b82df19..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/string_inquirer.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - # = \String Inquirer - # - # Wrapping a string in this class gives you a prettier way to test - # for equality. The value returned by Rails.env is wrapped - # in a StringInquirer object, so instead of calling this: - # - # Rails.env == 'production' - # - # you can call this: - # - # Rails.env.production? - # - # == Instantiating a new \StringInquirer - # - # vehicle = ActiveSupport::StringInquirer.new('car') - # vehicle.car? # => true - # vehicle.bike? # => false - class StringInquirer < String - private - def respond_to_missing?(method_name, include_private = false) - method_name.end_with?("?") || super - end - - def method_missing(method_name, ...) - if method_name.end_with?("?") - self == method_name[0..-2] - else - super - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/subscriber.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/subscriber.rb deleted file mode 100644 index 19c28906..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/subscriber.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -require "active_support/notifications" - -module ActiveSupport - # = Active Support \Subscriber - # - # +ActiveSupport::Subscriber+ is an object set to consume - # ActiveSupport::Notifications. The subscriber dispatches notifications to - # a registered object based on its given namespace. - # - # An example would be an Active Record subscriber responsible for collecting - # statistics about queries: - # - # module ActiveRecord - # class StatsSubscriber < ActiveSupport::Subscriber - # attach_to :active_record - # - # def sql(event) - # Statsd.timing("sql.#{event.payload[:name]}", event.duration) - # end - # end - # end - # - # After configured, whenever a "sql.active_record" notification is - # published, it will properly dispatch the event - # (ActiveSupport::Notifications::Event) to the +sql+ method. - # - # We can detach a subscriber as well: - # - # ActiveRecord::StatsSubscriber.detach_from(:active_record) - class Subscriber - class << self - # Attach the subscriber to a namespace. - def attach_to(namespace, subscriber = new, notifier = ActiveSupport::Notifications, inherit_all: false) - @namespace = namespace - @subscriber = subscriber - @notifier = notifier - @inherit_all = inherit_all - - subscribers << subscriber - - # Add event subscribers for all existing methods on the class. - fetch_public_methods(subscriber, inherit_all).each do |event| - add_event_subscriber(event) - end - end - - # Detach the subscriber from a namespace. - def detach_from(namespace, notifier = ActiveSupport::Notifications) - @namespace = namespace - @subscriber = find_attached_subscriber - @notifier = notifier - - return unless subscriber - - subscribers.delete(subscriber) - - # Remove event subscribers of all existing methods on the class. - fetch_public_methods(subscriber, true).each do |event| - remove_event_subscriber(event) - end - - # Reset notifier so that event subscribers will not add for new methods added to the class. - @notifier = nil - end - - # Adds event subscribers for all new methods added to the class. - def method_added(event) - super - # Only public methods are added as subscribers, and only if a notifier - # has been set up. This means that subscribers will only be set up for - # classes that call #attach_to. - if public_method_defined?(event) && notifier - add_event_subscriber(event) - end - end - - def subscribers - @@subscribers ||= [] - end - - private - attr_reader :subscriber, :notifier, :namespace - - def add_event_subscriber(event) # :doc: - return if invalid_event?(event) - - pattern = prepare_pattern(event) - - # Don't add multiple subscribers (e.g. if methods are redefined). - return if pattern_subscribed?(pattern) - - subscriber.patterns[pattern] = notifier.subscribe(pattern, subscriber) - end - - def remove_event_subscriber(event) # :doc: - return if invalid_event?(event) - - pattern = prepare_pattern(event) - - return unless pattern_subscribed?(pattern) - - notifier.unsubscribe(subscriber.patterns[pattern]) - subscriber.patterns.delete(pattern) - end - - def find_attached_subscriber - subscribers.find { |attached_subscriber| attached_subscriber.instance_of?(self) } - end - - def invalid_event?(event) - %i{ start finish }.include?(event.to_sym) - end - - def prepare_pattern(event) - "#{event}.#{namespace}" - end - - def pattern_subscribed?(pattern) - subscriber.patterns.key?(pattern) - end - - def fetch_public_methods(subscriber, inherit_all) - subscriber.public_methods(inherit_all) - Subscriber.public_instance_methods(true) - end - end - - attr_reader :patterns # :nodoc: - - def initialize - @patterns = {} - super - end - - def call(event) - method = event.name[0, event.name.index(".")] - send(method, event) - end - - def publish_event(event) # :nodoc: - method = event.name[0, event.name.index(".")] - send(method, event) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/syntax_error_proxy.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/syntax_error_proxy.rb deleted file mode 100644 index f778013f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/syntax_error_proxy.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require "delegate" - -module ActiveSupport - # This is a class for wrapping syntax errors. The purpose of this class - # is to enhance the backtraces on SyntaxError exceptions to include the - # source location of the syntax error. That way we can display the error - # source on error pages in development. - class SyntaxErrorProxy < DelegateClass(SyntaxError) # :nodoc: - def backtrace - parse_message_for_trace + super - end - - class BacktraceLocation < Struct.new(:path, :lineno, :to_s) # :nodoc: - def spot(_) - end - - def label - end - end - - class BacktraceLocationProxy < DelegateClass(Thread::Backtrace::Location) # :nodoc: - def initialize(loc, ex) - super(loc) - @ex = ex - end - - def spot(_) - super(@ex.__getobj__) - end - end - - def backtrace_locations - return nil if super.nil? - - parse_message_for_trace.map { |trace| - file, line = trace.match(/^(.+?):(\d+).*$/, &:captures) || trace - BacktraceLocation.new(file, line.to_i, trace) - # We have to wrap these backtrace locations because we need the - # spot information to come from the originating exception, not the - # proxy object that's generating these - } + super.map { |loc| BacktraceLocationProxy.new(loc, self) } - end - - private - def parse_message_for_trace - if __getobj__.to_s.start_with?("(eval") - # If the exception is coming from a call to eval, we need to keep - # the path of the file in which eval was called to ensure we can - # return the right source fragment to show the location of the - # error - location = __getobj__.backtrace_locations[0] - ["#{location.path}:#{location.lineno}: #{__getobj__}"] - else - __getobj__.to_s.split("\n") - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/tagged_logging.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/tagged_logging.rb deleted file mode 100644 index 594ea30e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/tagged_logging.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/object/blank" -require "active_support/logger" - -module ActiveSupport - # = Active Support Tagged Logging - # - # Wraps any standard Logger object to provide tagging capabilities. - # - # May be called with a block: - # - # logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) - # logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" - # logger.tagged('BCX', "Jason") { |tagged_logger| tagged_logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" - # logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" - # - # If called without a block, a new logger will be returned with applied tags: - # - # logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) - # logger.tagged("BCX").info "Stuff" # Logs "[BCX] Stuff" - # logger.tagged("BCX", "Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" - # logger.tagged("BCX").tagged("Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" - # - # This is used by the default Rails.logger as configured by Railties to make - # it easy to stamp log lines with subdomains, request ids, and anything else - # to aid debugging of multi-user production applications. - module TaggedLogging - module Formatter # :nodoc: - # This method is invoked when a log event occurs. - def call(severity, timestamp, progname, msg) - super(severity, timestamp, progname, tag_stack.format_message(msg)) - end - - def tagged(*tags) - pushed_count = tag_stack.push_tags(tags).size - yield self - ensure - pop_tags(pushed_count) - end - - def push_tags(*tags) - tag_stack.push_tags(tags) - end - - def pop_tags(count = 1) - tag_stack.pop_tags(count) - end - - def clear_tags! - tag_stack.clear - end - - def tag_stack - # We use our object ID here to avoid conflicting with other instances - @thread_key ||= "activesupport_tagged_logging_tags:#{object_id}" - IsolatedExecutionState[@thread_key] ||= TagStack.new - end - - def current_tags - tag_stack.tags - end - - def tags_text - tag_stack.format_message("") - end - end - - class TagStack # :nodoc: - attr_reader :tags - - def initialize - @tags = [] - @tags_string = nil - end - - def push_tags(tags) - @tags_string = nil - tags.flatten! - tags.reject!(&:blank?) - @tags.concat(tags) - tags - end - - def pop_tags(count) - @tags_string = nil - @tags.pop(count) - end - - def clear - @tags_string = nil - @tags.clear - end - - def format_message(message) - if @tags.empty? - message - elsif @tags.size == 1 - "[#{@tags[0]}] #{message}" - else - @tags_string ||= "[#{@tags.join("] [")}] " - "#{@tags_string}#{message}" - end - end - end - - module LocalTagStorage # :nodoc: - attr_accessor :tag_stack - - def self.extended(base) - base.tag_stack = TagStack.new - end - end - - # Returns an `ActiveSupport::Logger` that has already been wrapped with tagged logging concern. - def self.logger(*args, **kwargs) - new ActiveSupport::Logger.new(*args, **kwargs) - end - - def self.new(logger) - logger = logger.clone - - if logger.formatter - logger.formatter = logger.formatter.clone - - # Workaround for https://bugs.ruby-lang.org/issues/20250 - # Can be removed when Ruby 3.4 is the least supported version. - logger.formatter.object_id if logger.formatter.is_a?(Proc) - else - # Ensure we set a default formatter so we aren't extending nil! - logger.formatter = ActiveSupport::Logger::SimpleFormatter.new - end - - logger.formatter.extend Formatter - logger.extend(self) - end - - delegate :push_tags, :pop_tags, :clear_tags!, to: :formatter - - def tagged(*tags) - if block_given? - formatter.tagged(*tags) { yield self } - else - logger = ActiveSupport::TaggedLogging.new(self) - logger.formatter.extend LocalTagStorage - logger.push_tags(*formatter.current_tags, *tags) - logger - end - end - - def flush - clear_tags! - super if defined?(super) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/test_case.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/test_case.rb deleted file mode 100644 index bd2847fc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/test_case.rb +++ /dev/null @@ -1,304 +0,0 @@ -# frozen_string_literal: true - -require "minitest" -require "active_support/testing/tagged_logging" -require "active_support/testing/setup_and_teardown" -require "active_support/testing/tests_without_assertions" -require "active_support/testing/assertions" -require "active_support/testing/error_reporter_assertions" -require "active_support/testing/deprecation" -require "active_support/testing/declarative" -require "active_support/testing/isolation" -require "active_support/testing/constant_lookup" -require "active_support/testing/time_helpers" -require "active_support/testing/constant_stubbing" -require "active_support/testing/file_fixtures" -require "active_support/testing/parallelization" -require "active_support/testing/parallelize_executor" -require "concurrent/utility/processor_counter" - -module ActiveSupport - class TestCase < ::Minitest::Test - Assertion = Minitest::Assertion - - class << self - # Sets the order in which test cases are run. - # - # ActiveSupport::TestCase.test_order = :random # => :random - # - # Valid values are: - # * +:random+ (to run tests in random order) - # * +:parallel+ (to run tests in parallel) - # * +:sorted+ (to run tests alphabetically by method name) - # * +:alpha+ (equivalent to +:sorted+) - def test_order=(new_order) - ActiveSupport.test_order = new_order - end - - # Returns the order in which test cases are run. - # - # ActiveSupport::TestCase.test_order # => :random - # - # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. - # Defaults to +:random+. - def test_order - ActiveSupport.test_order ||= :random - end - - # Parallelizes the test suite. - # - # Takes a +workers+ argument that controls how many times the process - # is forked. For each process a new database will be created suffixed - # with the worker number. - # - # test-database-0 - # test-database-1 - # - # If ENV["PARALLEL_WORKERS"] is set the workers argument will be ignored - # and the environment variable will be used instead. This is useful for CI - # environments, or other environments where you may need more workers than - # you do for local testing. - # - # If the number of workers is set to +1+ or fewer, the tests will not be - # parallelized. - # - # If +workers+ is set to +:number_of_processors+, the number of workers will be - # set to the actual core count on the machine you are on. - # - # The default parallelization method is to fork processes. If you'd like to - # use threads instead you can pass with: :threads to the +parallelize+ - # method. Note the threaded parallelization does not create multiple - # databases and will not work with system tests. - # - # parallelize(workers: :number_of_processors, with: :threads) - # - # The threaded parallelization uses minitest's parallel executor directly. - # The processes parallelization uses a Ruby DRb server. - # - # Because parallelization presents an overhead, it is only enabled when the - # number of tests to run is above the +threshold+ param. The default value is - # 50, and it's configurable via +config.active_support.test_parallelization_threshold+. - def parallelize(workers: :number_of_processors, with: :processes, threshold: ActiveSupport.test_parallelization_threshold) - workers = Concurrent.processor_count if workers == :number_of_processors - workers = ENV["PARALLEL_WORKERS"].to_i if ENV["PARALLEL_WORKERS"] - - Minitest.parallel_executor = ActiveSupport::Testing::ParallelizeExecutor.new(size: workers, with: with, threshold: threshold) - end - - # Set up hook for parallel testing. This can be used if you have multiple - # databases or any behavior that needs to be run after the process is forked - # but before the tests run. - # - # Note: this feature is not available with the threaded parallelization. - # - # In your +test_helper.rb+ add the following: - # - # class ActiveSupport::TestCase - # parallelize_setup do - # # create databases - # end - # end - def parallelize_setup(&block) - ActiveSupport::Testing::Parallelization.after_fork_hook(&block) - end - - # Clean up hook for parallel testing. This can be used to drop databases - # if your app uses multiple write/read databases or other clean up before - # the tests finish. This runs before the forked process is closed. - # - # Note: this feature is not available with the threaded parallelization. - # - # In your +test_helper.rb+ add the following: - # - # class ActiveSupport::TestCase - # parallelize_teardown do - # # drop databases - # end - # end - def parallelize_teardown(&block) - ActiveSupport::Testing::Parallelization.run_cleanup_hook(&block) - end - - # :singleton-method: fixture_paths - # - # Returns the ActiveRecord::FixtureSet collection. - # - # In your +test_helper.rb+ you must have require "rails/test_help". - - # :singleton-method: fixture_paths= - # - # :call-seq: - # fixture_paths=(fixture_paths) - # - # Sets the given path to the fixture set. - # - # Can also append multiple paths. - # - # ActiveSupport::TestCase.fixture_paths << "component1/test/fixtures" - # - # In your +test_helper.rb+ you must have require "rails/test_help". - end - - alias_method :method_name, :name - - include ActiveSupport::Testing::TaggedLogging - prepend ActiveSupport::Testing::SetupAndTeardown - prepend ActiveSupport::Testing::TestsWithoutAssertions - include ActiveSupport::Testing::Assertions - include ActiveSupport::Testing::ErrorReporterAssertions - include ActiveSupport::Testing::Deprecation - include ActiveSupport::Testing::ConstantStubbing - include ActiveSupport::Testing::TimeHelpers - include ActiveSupport::Testing::FileFixtures - extend ActiveSupport::Testing::Declarative - - ## - # :method: assert_not_empty - # - # :call-seq: - # assert_not_empty(obj, msg = nil) - # - # Alias for: refute_empty[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_empty] - - # - alias :assert_not_empty :refute_empty - - ## - # :method: assert_not_equal - # - # :call-seq: - # assert_not_equal(exp, act, msg = nil) - # - # Alias for: refute_equal[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_equal] - - # - alias :assert_not_equal :refute_equal - - ## - # :method: assert_not_in_delta - # - # :call-seq: - # assert_not_in_delta(exp, act, delta = 0.001, msg = nil) - # - # Alias for: refute_in_delta[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_in_delta] - - # - alias :assert_not_in_delta :refute_in_delta - - ## - # :method: assert_not_in_epsilon - # - # :call-seq: - # assert_not_in_epsilon(a, b, epsilon = 0.001, msg = nil) - # - # Alias for: refute_in_epsilon[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_in_epsilon] - - # - alias :assert_not_in_epsilon :refute_in_epsilon - - ## - # :method: assert_not_includes - # - # :call-seq: - # assert_not_includes(collection, obj, msg = nil) - # - # Alias for: refute_includes[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_includes] - - # - alias :assert_not_includes :refute_includes - - ## - # :method: assert_not_instance_of - # - # :call-seq: - # assert_not_instance_of(cls, obj, msg = nil) - # - # Alias for: refute_instance_of[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_instance_of] - - # - alias :assert_not_instance_of :refute_instance_of - - ## - # :method: assert_not_kind_of - # - # :call-seq: - # assert_not_kind_of(cls, obj, msg = nil) - # - # Alias for: refute_kind_of[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_kind_of] - - # - alias :assert_not_kind_of :refute_kind_of - - ## - # :method: assert_no_match - # - # :call-seq: - # assert_no_match(matcher, obj, msg = nil) - # - # Alias for: refute_match[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_match] - - # - alias :assert_no_match :refute_match - - ## - # :method: assert_not_nil - # - # :call-seq: - # assert_not_nil(obj, msg = nil) - # - # Alias for: refute_nil[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_nil] - - # - alias :assert_not_nil :refute_nil - - ## - # :method: assert_not_operator - # - # :call-seq: - # assert_not_operator(o1, op, o2 = UNDEFINED, msg = nil) - # - # Alias for: refute_operator[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_operator] - - # - alias :assert_not_operator :refute_operator - - ## - # :method: assert_not_predicate - # - # :call-seq: - # assert_not_predicate(o1, op, msg = nil) - # - # Alias for: refute_predicate[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_predicate] - - # - alias :assert_not_predicate :refute_predicate - - ## - # :method: assert_not_respond_to - # - # :call-seq: - # assert_not_respond_to(obj, meth, msg = nil) - # - # Alias for: refute_respond_to[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_respond_to] - - # - alias :assert_not_respond_to :refute_respond_to - - ## - # :method: assert_not_same - # - # :call-seq: - # assert_not_same(exp, act, msg = nil) - # - # Alias for: refute_same[https://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-refute_same] - - # - alias :assert_not_same :refute_same - - ActiveSupport.run_load_hooks(:active_support_test_case, self) - - def inspect # :nodoc: - Object.instance_method(:to_s).bind_call(self) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/assertions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/assertions.rb deleted file mode 100644 index 38a9215d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/assertions.rb +++ /dev/null @@ -1,339 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/enumerable" - -module ActiveSupport - module Testing - module Assertions - UNTRACKED = Object.new # :nodoc: - - # Asserts that an expression is not truthy. Passes if +object+ is +nil+ or - # +false+. "Truthy" means "considered true in a conditional" like if - # foo. - # - # assert_not nil # => true - # assert_not false # => true - # assert_not 'foo' # => Expected "foo" to be nil or false - # - # An error message can be specified. - # - # assert_not foo, 'foo should be false' - def assert_not(object, message = nil) - message ||= -> { "Expected #{mu_pp(object)} to be nil or false" } - assert !object, message - end - - # Asserts that a block raises one of +exp+. This is an enhancement of the - # standard Minitest assertion method with the ability to test error - # messages. - # - # assert_raises(ArgumentError, match: /incorrect param/i) do - # perform_service(param: 'exception') - # end - # - def assert_raises(*exp, match: nil, &block) - error = super(*exp, &block) - assert_match(match, error.message) if match - error - end - alias :assert_raise :assert_raises - - # Assertion that the block should not raise an exception. - # - # Passes if evaluated code in the yielded block raises no exception. - # - # assert_nothing_raised do - # perform_service(param: 'no_exception') - # end - def assert_nothing_raised - yield.tap { assert(true) } - rescue => error - raise Minitest::UnexpectedError.new(error) - end - - # Test numeric difference between the return value of an expression as a - # result of what is evaluated in the yielded block. - # - # assert_difference 'Article.count' do - # post :create, params: { article: {...} } - # end - # - # An arbitrary expression is passed in and evaluated. - # - # assert_difference 'Article.last.comments(:reload).size' do - # post :create, params: { comment: {...} } - # end - # - # An arbitrary positive or negative difference can be specified. - # The default is +1+. - # - # assert_difference 'Article.count', -1 do - # post :delete, params: { id: ... } - # end - # - # An array of expressions can also be passed in and evaluated. - # - # assert_difference [ 'Article.count', 'Post.count' ], 2 do - # post :create, params: { article: {...} } - # end - # - # A hash of expressions/numeric differences can also be passed in and evaluated. - # - # assert_difference ->{ Article.count } => 1, ->{ Notification.count } => 2 do - # post :create, params: { article: {...} } - # end - # - # A lambda or a list of lambdas can be passed in and evaluated: - # - # assert_difference ->{ Article.count }, 2 do - # post :create, params: { article: {...} } - # end - # - # assert_difference [->{ Article.count }, ->{ Post.count }], 2 do - # post :create, params: { article: {...} } - # end - # - # An error message can be specified. - # - # assert_difference 'Article.count', -1, 'An Article should be destroyed' do - # post :delete, params: { id: ... } - # end - def assert_difference(expression, *args, &block) - expressions = - if expression.is_a?(Hash) - message = args[0] - expression - else - difference = args[0] || 1 - message = args[1] - Array(expression).index_with(difference) - end - - exps = expressions.keys.map { |e| - e.respond_to?(:call) ? e : lambda { eval(e, block.binding) } - } - before = exps.map(&:call) - - retval = _assert_nothing_raised_or_warn("assert_difference", &block) - - expressions.zip(exps, before) do |(code, diff), exp, before_value| - actual = exp.call - rich_message = -> do - code_string = code.respond_to?(:call) ? _callable_to_source_string(code) : code - error = "`#{code_string}` didn't change by #{diff}, but by #{actual - before_value}" - error = "#{message}.\n#{error}" if message - error - end - assert_equal(before_value + diff, actual, rich_message) - end - - retval - end - - # Assertion that the numeric result of evaluating an expression is not - # changed before and after invoking the passed in block. - # - # assert_no_difference 'Article.count' do - # post :create, params: { article: invalid_attributes } - # end - # - # A lambda can be passed in and evaluated. - # - # assert_no_difference -> { Article.count } do - # post :create, params: { article: invalid_attributes } - # end - # - # An error message can be specified. - # - # assert_no_difference 'Article.count', 'An Article should not be created' do - # post :create, params: { article: invalid_attributes } - # end - # - # An array of expressions can also be passed in and evaluated. - # - # assert_no_difference [ 'Article.count', -> { Post.count } ] do - # post :create, params: { article: invalid_attributes } - # end - def assert_no_difference(expression, message = nil, &block) - assert_difference expression, 0, message, &block - end - - # Assertion that the result of evaluating an expression is changed before - # and after invoking the passed in block. - # - # assert_changes 'Status.all_good?' do - # post :create, params: { status: { ok: false } } - # end - # - # You can pass the block as a string to be evaluated in the context of - # the block. A lambda can be passed for the block as well. - # - # assert_changes -> { Status.all_good? } do - # post :create, params: { status: { ok: false } } - # end - # - # The assertion is useful to test side effects. The passed block can be - # anything that can be converted to string with #to_s. - # - # assert_changes :@object do - # @object = 42 - # end - # - # The keyword arguments +:from+ and +:to+ can be given to specify the - # expected initial value and the expected value after the block was - # executed. - # - # assert_changes :@object, from: nil, to: :foo do - # @object = :foo - # end - # - # An error message can be specified. - # - # assert_changes -> { Status.all_good? }, 'Expected the status to be bad' do - # post :create, params: { status: { incident: true } } - # end - def assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block) - exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) } - - before = exp.call - retval = _assert_nothing_raised_or_warn("assert_changes", &block) - - unless from == UNTRACKED - rich_message = -> do - error = "Expected change from #{from.inspect}, got #{before.inspect}" - error = "#{message}.\n#{error}" if message - error - end - assert from === before, rich_message - end - - after = exp.call - - rich_message = -> do - code_string = expression.respond_to?(:call) ? _callable_to_source_string(expression) : expression - error = "`#{code_string}` didn't change" - error = "#{error}. It was already #{to.inspect}" if before == to - error = "#{message}.\n#{error}" if message - error - end - refute_equal before, after, rich_message - - unless to == UNTRACKED - rich_message = -> do - error = "Expected change to #{to.inspect}, got #{after.inspect}\n" - error = "#{message}.\n#{error}" if message - error - end - assert to === after, rich_message - end - - retval - end - - # Assertion that the result of evaluating an expression is not changed before - # and after invoking the passed in block. - # - # assert_no_changes 'Status.all_good?' do - # post :create, params: { status: { ok: true } } - # end - # - # Provide the optional keyword argument +:from+ to specify the expected - # initial value. - # - # assert_no_changes -> { Status.all_good? }, from: true do - # post :create, params: { status: { ok: true } } - # end - # - # An error message can be specified. - # - # assert_no_changes -> { Status.all_good? }, 'Expected the status to be good' do - # post :create, params: { status: { ok: false } } - # end - def assert_no_changes(expression, message = nil, from: UNTRACKED, &block) - exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) } - - before = exp.call - retval = _assert_nothing_raised_or_warn("assert_no_changes", &block) - - unless from == UNTRACKED - rich_message = -> do - error = "Expected initial value of #{from.inspect}, got #{before.inspect}" - error = "#{message}.\n#{error}" if message - error - end - assert from === before, rich_message - end - - after = exp.call - - rich_message = -> do - code_string = expression.respond_to?(:call) ? _callable_to_source_string(expression) : expression - error = "`#{code_string}` changed" - error = "#{message}.\n#{error}" if message - error - end - - if before.nil? - assert_nil after, rich_message - else - assert_equal before, after, rich_message - end - - retval - end - - private - def _assert_nothing_raised_or_warn(assertion, &block) - assert_nothing_raised(&block) - rescue Minitest::UnexpectedError => e - if tagged_logger && tagged_logger.warn? - warning = <<~MSG - #{self.class} - #{name}: #{e.error.class} raised. - If you expected this exception, use `assert_raises` as near to the code that raises as possible. - Other block based assertions (e.g. `#{assertion}`) can be used, as long as `assert_raises` is inside their block. - MSG - tagged_logger.warn warning - end - - raise - end - - def _callable_to_source_string(callable) - if defined?(RubyVM::InstructionSequence) && callable.is_a?(Proc) - iseq = RubyVM::InstructionSequence.of(callable) - source = - if iseq.script_lines - iseq.script_lines.join("\n") - elsif File.readable?(iseq.absolute_path) - File.read(iseq.absolute_path) - end - - return callable unless source - - location = iseq.to_a[4][:code_location] - return callable unless location - - lines = source.lines[(location[0] - 1)..(location[2] - 1)] - lines[-1] = lines[-1].byteslice(...location[3]) - lines[0] = lines[0].byteslice(location[1]...) - source = lines.join.strip - - # We ignore procs defined with do/end as they are likely multi-line anyway. - if source.start_with?("{") - source.delete_suffix!("}") - source.delete_prefix!("{") - source.strip! - # It won't read nice if the callable contains multiple - # lines, and it should be a rare occurrence anyway. - # Same if it takes arguments. - if !source.include?("\n") && !source.start_with?("|") - return source - end - end - end - - callable - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/autorun.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/autorun.rb deleted file mode 100644 index d5d5fc7a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/autorun.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -require "minitest" - -Minitest.autorun diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/constant_lookup.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/constant_lookup.rb deleted file mode 100644 index 51167e92..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/constant_lookup.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -require "active_support/concern" -require "active_support/inflector" - -module ActiveSupport - module Testing - # Resolves a constant from a minitest spec name. - # - # Given the following spec-style test: - # - # describe WidgetsController, :index do - # describe "authenticated user" do - # describe "returns widgets" do - # it "has a controller that exists" do - # assert_kind_of WidgetsController, @controller - # end - # end - # end - # end - # - # The test will have the following name: - # - # "WidgetsController::index::authenticated user::returns widgets" - # - # The constant WidgetsController can be resolved from the name. - # The following code will resolve the constant: - # - # controller = determine_constant_from_test_name(name) do |constant| - # Class === constant && constant < ::ActionController::Metal - # end - module ConstantLookup - extend ::ActiveSupport::Concern - - module ClassMethods # :nodoc: - def determine_constant_from_test_name(test_name) - names = test_name.split "::" - while names.size > 0 do - names.last.sub!(/Test$/, "") - begin - constant = names.join("::").safe_constantize - break(constant) if yield(constant) - ensure - names.pop - end - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/constant_stubbing.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/constant_stubbing.rb deleted file mode 100644 index e0bc6dcd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/constant_stubbing.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - module ConstantStubbing - # Changes the value of a constant for the duration of a block. Example: - # - # # World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 - # stub_const(World::List::Import, :LARGE_IMPORT_THRESHOLD, 1) do - # assert_equal 1, World::List::Import::LARGE_IMPORT_THRESHOLD - # end - # - # assert_equal 5000, World::List::Import::LARGE_IMPORT_THRESHOLD - # - # Using this method rather than forcing World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 prevents - # warnings from being thrown, and ensures that the old value is returned after the test has completed. - # - # If the constant doesn't already exists, but you need it set for the duration of the block - # you can do so by passing `exists: false`. - # - # stub_const(object, :SOME_CONST, 1, exists: false) do - # assert_equal 1, SOME_CONST - # end - # - # Note: Stubbing a const will stub it across all threads. So if you have concurrent threads - # (like separate test suites running in parallel) that all depend on the same constant, it's possible - # divergent stubbing will trample on each other. - def stub_const(mod, constant, new_value, exists: true) - if exists - begin - old_value = mod.const_get(constant, false) - mod.send(:remove_const, constant) - mod.const_set(constant, new_value) - yield - ensure - mod.send(:remove_const, constant) - mod.const_set(constant, old_value) - end - else - if mod.const_defined?(constant) - raise NameError, "already defined constant #{constant} in #{mod.name}" - end - - begin - mod.const_set(constant, new_value) - yield - ensure - mod.send(:remove_const, constant) - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/declarative.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/declarative.rb deleted file mode 100644 index 7c340368..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/declarative.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - module Declarative - unless defined?(Spec) - # Helper to define a test method using a String. Under the hood, it replaces - # spaces with underscores and defines the test method. - # - # test "verify something" do - # ... - # end - def test(name, &block) - test_name = "test_#{name.gsub(/\s+/, '_')}".to_sym - defined = method_defined? test_name - raise "#{test_name} is already defined in #{self}" if defined - if block_given? - define_method(test_name, &block) - else - define_method(test_name) do - flunk "No implementation provided for #{name}" - end - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/deprecation.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/deprecation.rb deleted file mode 100644 index ea307a0b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/deprecation.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -require "active_support/deprecation" - -module ActiveSupport - module Testing - module Deprecation - ## - # :call-seq: - # assert_deprecated(deprecator, &block) - # assert_deprecated(match, deprecator, &block) - # - # Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. - # - # assert_deprecated(/foo/, CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # The +match+ object may be a +Regexp+, or +String+ appearing in the message. - # - # assert_deprecated('foo', CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # If the +match+ is omitted (or explicitly +nil+), any deprecation warning will match. - # - # assert_deprecated(CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - def assert_deprecated(match = nil, deprecator = nil, &block) - match, deprecator = nil, match if match.is_a?(ActiveSupport::Deprecation) - - unless deprecator - raise ArgumentError, "No deprecator given" - end - - result, warnings = collect_deprecations(deprecator, &block) - assert !warnings.empty?, "Expected a deprecation warning within the block but received none" - if match - match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp) - assert warnings.any? { |w| match.match?(w) }, "No deprecation warning matched #{match}: #{warnings.join(', ')}" - end - result - end - - # Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. - # - # assert_not_deprecated(CustomDeprecator) do - # CustomDeprecator.warn "message" # fails assertion - # end - # - # assert_not_deprecated(ActiveSupport::Deprecation.new) do - # CustomDeprecator.warn "message" # passes assertion, different deprecator - # end - def assert_not_deprecated(deprecator, &block) - result, deprecations = collect_deprecations(deprecator, &block) - assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n #{deprecations * "\n "}" - result - end - - # Returns the return value of the block and an array of all the deprecation warnings emitted by the given - # +deprecator+ during the execution of the yielded block. - # - # collect_deprecations(CustomDeprecator) do - # CustomDeprecator.warn "message" - # ActiveSupport::Deprecation.new.warn "other message" - # :result - # end # => [:result, ["message"]] - def collect_deprecations(deprecator) - old_behavior = deprecator.behavior - deprecations = [] - deprecator.behavior = Proc.new do |message, callstack| - deprecations << message - end - result = yield - [result, deprecations] - ensure - deprecator.behavior = old_behavior - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/error_reporter_assertions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/error_reporter_assertions.rb deleted file mode 100644 index 3b7ad7cd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/error_reporter_assertions.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - module ErrorReporterAssertions - module ErrorCollector # :nodoc: - @subscribed = false - @mutex = Mutex.new - - Report = Struct.new(:error, :handled, :severity, :context, :source, keyword_init: true) - class Report - alias_method :handled?, :handled - end - - class << self - def record - subscribe - recorders = ActiveSupport::IsolatedExecutionState[:active_support_error_reporter_assertions] ||= [] - reports = [] - recorders << reports - begin - yield - reports - ensure - recorders.delete_if { |r| reports.equal?(r) } - end - end - - def report(error, **kwargs) - report = Report.new(error: error, **kwargs) - ActiveSupport::IsolatedExecutionState[:active_support_error_reporter_assertions]&.each do |reports| - reports << report - end - true - end - - private - def subscribe - return if @subscribed - @mutex.synchronize do - return if @subscribed - - if ActiveSupport.error_reporter - ActiveSupport.error_reporter.subscribe(self) - @subscribed = true - else - raise Minitest::Assertion, "No error reporter is configured" - end - end - end - end - end - - # Assertion that the block should not cause an exception to be reported - # to +Rails.error+. - # - # Passes if evaluated code in the yielded block reports no exception. - # - # assert_no_error_reported do - # perform_service(param: 'no_exception') - # end - def assert_no_error_reported(&block) - reports = ErrorCollector.record do - _assert_nothing_raised_or_warn("assert_no_error_reported", &block) - end - assert_predicate(reports, :empty?) - end - - # Assertion that the block should cause at least one exception to be reported - # to +Rails.error+. - # - # Passes if the evaluated code in the yielded block reports a matching exception. - # - # assert_error_reported(IOError) do - # Rails.error.report(IOError.new("Oops")) - # end - # - # To test further details about the reported exception, you can use the return - # value. - # - # report = assert_error_reported(IOError) do - # # ... - # end - # assert_equal "Oops", report.error.message - # assert_equal "admin", report.context[:section] - # assert_equal :warning, report.severity - # assert_predicate report, :handled? - def assert_error_reported(error_class = StandardError, &block) - reports = ErrorCollector.record do - _assert_nothing_raised_or_warn("assert_error_reported", &block) - end - - if reports.empty? - assert(false, "Expected a #{error_class.name} to be reported, but there were no errors reported.") - elsif (report = reports.find { |r| error_class === r.error }) - self.assertions += 1 - report - else - message = "Expected a #{error_class.name} to be reported, but none of the " \ - "#{reports.size} reported errors matched: \n" \ - "#{reports.map { |r| r.error.class.name }.join("\n ")}" - assert(false, message) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/file_fixtures.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/file_fixtures.rb deleted file mode 100644 index 4eb7a885..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/file_fixtures.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -require "active_support/concern" - -module ActiveSupport - module Testing - # Adds simple access to sample files called file fixtures. - # File fixtures are normal files stored in - # ActiveSupport::TestCase.file_fixture_path. - # - # File fixtures are represented as +Pathname+ objects. - # This makes it easy to extract specific information: - # - # file_fixture("example.txt").read # get the file's content - # file_fixture("example.mp3").size # get the file size - module FileFixtures - extend ActiveSupport::Concern - - included do - class_attribute :file_fixture_path, instance_writer: false - end - - # Returns a +Pathname+ to the fixture file named +fixture_name+. - # - # Raises +ArgumentError+ if +fixture_name+ can't be found. - def file_fixture(fixture_name) - path = Pathname.new(File.join(file_fixture_path, fixture_name)) - - if path.exist? - path - else - msg = "the directory '%s' does not contain a file named '%s'" - raise ArgumentError, msg % [file_fixture_path, fixture_name] - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/isolation.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/isolation.rb deleted file mode 100644 index ccba6ebb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/isolation.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -require "active_support/testing/parallelize_executor" - -module ActiveSupport - module Testing - module Isolation - SubprocessCrashed = Class.new(StandardError) - - def self.included(klass) # :nodoc: - klass.class_eval do - parallelize_me! unless Minitest.parallel_executor.is_a?(ActiveSupport::Testing::ParallelizeExecutor) - end - end - - def self.forking_env? - !ENV["NO_FORK"] && Process.respond_to?(:fork) - end - - def run - status, serialized = run_in_isolation do - super - end - - unless status&.success? - error = SubprocessCrashed.new("Subprocess exited with an error: #{status.inspect}\noutput: #{serialized.inspect}") - error.set_backtrace(caller) - self.failures << Minitest::UnexpectedError.new(error) - return defined?(Minitest::Result) ? Minitest::Result.from(self) : dup - end - - Marshal.load(serialized) - end - - module Forking - def run_in_isolation(&blk) - IO.pipe do |read, write| - read.binmode - write.binmode - - pid = fork do - read.close - yield - begin - if error? - failures.map! { |e| - begin - Marshal.dump e - e - rescue TypeError - ex = Exception.new e.message - ex.set_backtrace e.backtrace - Minitest::UnexpectedError.new ex - end - } - end - test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup - result = Marshal.dump(test_result) - end - - write.puts [result].pack("m") - exit!(0) - end - - write.close - result = read.read - _, status = Process.wait2(pid) - return status, result.unpack1("m") - end - end - end - - module Subprocess - ORIG_ARGV = ARGV.dup unless defined?(ORIG_ARGV) - - # Complicated H4X to get this working in Windows / JRuby with - # no forking. - def run_in_isolation(&blk) - require "tempfile" - - if ENV["ISOLATION_TEST"] - yield - test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup - File.open(ENV["ISOLATION_OUTPUT"], "w") do |file| - file.puts [Marshal.dump(test_result)].pack("m") - end - exit!(0) - else - Tempfile.open("isolation") do |tmpfile| - env = { - "ISOLATION_TEST" => self.class.name, - "ISOLATION_OUTPUT" => tmpfile.path - } - - test_opts = "-n#{self.class.name}##{name}" - - load_path_args = [] - $-I.each do |p| - load_path_args << "-I" - load_path_args << File.expand_path(p) - end - - child = IO.popen([env, Gem.ruby, *load_path_args, $0, *ORIG_ARGV, test_opts]) - - status = nil - begin - _, status = Process.wait2(child.pid) - rescue Errno::ECHILD # The child process may exit before we wait - nil - end - - return status, tmpfile.read.unpack1("m") - end - end - end - end - - include forking_env? ? Forking : Subprocess - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/method_call_assertions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/method_call_assertions.rb deleted file mode 100644 index 2992164a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/method_call_assertions.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -require "minitest/mock" - -module ActiveSupport - module Testing - module MethodCallAssertions # :nodoc: - private - def assert_called(object, method_name, message = nil, times: 1, returns: nil, &block) - times_called = 0 - - object.stub(method_name, proc { times_called += 1; returns }, &block) - - error = "Expected #{method_name} to be called #{times} times, " \ - "but was called #{times_called} times" - error = "#{message}.\n#{error}" if message - assert_equal times, times_called, error - end - - def assert_called_with(object, method_name, args, returns: false, **kwargs, &block) - mock = Minitest::Mock.new - expect_called_with(mock, args, returns: returns, **kwargs) - - object.stub(method_name, mock, &block) - - assert_mock(mock) - end - - def assert_not_called(object, method_name, message = nil, &block) - assert_called(object, method_name, message, times: 0, &block) - end - - def expect_called_with(mock, args, returns: false, **kwargs) - mock.expect(:call, returns, args, **kwargs) - end - - def assert_called_on_instance_of(klass, method_name, message = nil, times: 1, returns: nil) - times_called = 0 - klass.define_method("stubbed_#{method_name}") do |*| - times_called += 1 - - returns - end - - klass.alias_method "original_#{method_name}", method_name - klass.alias_method method_name, "stubbed_#{method_name}" - - yield - - error = "Expected #{method_name} to be called #{times} times, but was called #{times_called} times" - error = "#{message}.\n#{error}" if message - - assert_equal times, times_called, error - ensure - klass.alias_method method_name, "original_#{method_name}" - klass.undef_method "original_#{method_name}" - klass.undef_method "stubbed_#{method_name}" - end - - def assert_not_called_on_instance_of(klass, method_name, message = nil, &block) - assert_called_on_instance_of(klass, method_name, message, times: 0, &block) - end - - def stub_any_instance(klass, instance: klass.new) - klass.stub(:new, instance) { yield instance } - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization.rb deleted file mode 100644 index d1b2734c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -require "drb" -require "drb/unix" unless Gem.win_platform? -require "active_support/core_ext/module/attribute_accessors" -require "active_support/testing/parallelization/server" -require "active_support/testing/parallelization/worker" - -module ActiveSupport - module Testing - class Parallelization # :nodoc: - @@after_fork_hooks = [] - - def self.after_fork_hook(&blk) - @@after_fork_hooks << blk - end - - cattr_reader :after_fork_hooks - - @@run_cleanup_hooks = [] - - def self.run_cleanup_hook(&blk) - @@run_cleanup_hooks << blk - end - - cattr_reader :run_cleanup_hooks - - def initialize(worker_count) - @worker_count = worker_count - @queue_server = Server.new - @worker_pool = [] - @url = DRb.start_service("drbunix:", @queue_server).uri - end - - def start - @worker_pool = @worker_count.times.map do |worker| - Worker.new(worker, @url).start - end - end - - def <<(work) - @queue_server << work - end - - def size - @worker_count - end - - def shutdown - @queue_server.shutdown - @worker_pool.each { |pid| Process.waitpid pid } - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization/server.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization/server.rb deleted file mode 100644 index dc70c961..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization/server.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -require "drb" -require "drb/unix" unless Gem.win_platform? - -module ActiveSupport - module Testing - class Parallelization # :nodoc: - PrerecordResultClass = Struct.new(:name) - - class Server - include DRb::DRbUndumped - - def initialize - @queue = Queue.new - @active_workers = Concurrent::Map.new - @in_flight = Concurrent::Map.new - end - - def record(reporter, result) - raise DRb::DRbConnError if result.is_a?(DRb::DRbUnknown) - - @in_flight.delete([result.klass, result.name]) - - reporter.synchronize do - reporter.prerecord(PrerecordResultClass.new(result.klass), result.name) - reporter.record(result) - end - end - - def <<(o) - o[2] = DRbObject.new(o[2]) if o - @queue << o - end - - def pop - if test = @queue.pop - @in_flight[[test[0].to_s, test[1]]] = test - test - end - end - - def start_worker(worker_id) - @active_workers[worker_id] = true - end - - def stop_worker(worker_id) - @active_workers.delete(worker_id) - end - - def active_workers? - @active_workers.size > 0 - end - - def interrupt - @queue.clear - end - - def shutdown - # Wait for initial queue to drain - while @queue.length != 0 - sleep 0.1 - end - - @queue.close - - # Wait until all workers have finished - while active_workers? - sleep 0.1 - end - - @in_flight.values.each do |(klass, name, reporter)| - result = Minitest::Result.from(klass.new(name)) - error = RuntimeError.new("result not reported") - error.set_backtrace([""]) - result.failures << Minitest::UnexpectedError.new(error) - reporter.synchronize do - reporter.record(result) - end - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization/worker.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization/worker.rb deleted file mode 100644 index 393355a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelization/worker.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - class Parallelization # :nodoc: - class Worker - def initialize(number, url) - @id = SecureRandom.uuid - @number = number - @url = url - @setup_exception = nil - end - - def start - fork do - set_process_title("(starting)") - - DRb.stop_service - - @queue = DRbObject.new_with_uri(@url) - @queue.start_worker(@id) - - begin - after_fork - rescue => @setup_exception; end - - work_from_queue - ensure - set_process_title("(stopping)") - - run_cleanup - @queue.stop_worker(@id) - end - end - - def work_from_queue - while job = @queue.pop - perform_job(job) - end - end - - def perform_job(job) - klass = job[0] - method = job[1] - reporter = job[2] - - set_process_title("#{klass}##{method}") - - result = klass.with_info_handler reporter do - Minitest.run_one_method(klass, method) - end - - safe_record(reporter, result) - end - - def safe_record(reporter, result) - add_setup_exception(result) if @setup_exception - - begin - @queue.record(reporter, result) - rescue DRb::DRbConnError - result.failures.map! do |failure| - if failure.respond_to?(:error) - # minitest >5.14.0 - error = DRb::DRbRemoteError.new(failure.error) - else - error = DRb::DRbRemoteError.new(failure.exception) - end - Minitest::UnexpectedError.new(error) - end - @queue.record(reporter, result) - rescue Interrupt - @queue.interrupt - raise - end - - set_process_title("(idle)") - end - - def after_fork - Parallelization.after_fork_hooks.each do |cb| - cb.call(@number) - end - end - - def run_cleanup - Parallelization.run_cleanup_hooks.each do |cb| - cb.call(@number) - end - end - - private - def add_setup_exception(result) - result.failures.prepend Minitest::UnexpectedError.new(@setup_exception) - end - - def set_process_title(status) - Process.setproctitle("Rails test worker #{@number} - #{status}") - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelize_executor.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelize_executor.rb deleted file mode 100644 index 127f26f9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/parallelize_executor.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - class ParallelizeExecutor # :nodoc: - attr_reader :size, :parallelize_with, :threshold - - def initialize(size:, with:, threshold: ActiveSupport.test_parallelization_threshold) - @size = size - @parallelize_with = with - @threshold = threshold - @parallelized = false - end - - def start - parallelize if should_parallelize? - show_execution_info - - parallel_executor.start if parallelized? - end - - def <<(work) - parallel_executor << work if parallelized? - end - - def shutdown - parallel_executor.shutdown if parallelized? - end - - private - def parallel_executor - @parallel_executor ||= build_parallel_executor - end - - def build_parallel_executor - case parallelize_with - when :processes - Testing::Parallelization.new(size) - when :threads - ActiveSupport::TestCase.lock_threads = false if defined?(ActiveSupport::TestCase.lock_threads) - Minitest::Parallel::Executor.new(size) - else - raise ArgumentError, "#{parallelize_with} is not a supported parallelization executor." - end - end - - def parallelize - @parallelized = true - Minitest::Test.parallelize_me! - end - - def parallelized? - @parallelized - end - - def should_parallelize? - (ENV["PARALLEL_WORKERS"] || tests_count > threshold) && many_workers? - end - - def many_workers? - size > 1 - end - - def tests_count - @tests_count ||= Minitest::Runnable.runnables.sum { |runnable| runnable.runnable_methods.size } - end - - def show_execution_info - puts execution_info - end - - def execution_info - if parallelized? - "Running #{tests_count} tests in parallel using #{parallel_executor.size} #{parallelize_with}" - elsif many_workers? - "Running #{tests_count} tests in a single process (parallelization threshold is #{threshold})" - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/setup_and_teardown.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/setup_and_teardown.rb deleted file mode 100644 index 9c12dc2e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/setup_and_teardown.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -require "active_support/callbacks" - -module ActiveSupport - module Testing - # Adds support for +setup+ and +teardown+ callbacks. - # These callbacks serve as a replacement to overwriting the - # #setup and #teardown methods of your TestCase. - # - # class ExampleTest < ActiveSupport::TestCase - # setup do - # # ... - # end - # - # teardown do - # # ... - # end - # end - module SetupAndTeardown - def self.prepended(klass) - klass.include ActiveSupport::Callbacks - klass.define_callbacks :setup, :teardown - klass.extend ClassMethods - end - - module ClassMethods - # Add a callback, which runs before TestCase#setup. - def setup(*args, &block) - set_callback(:setup, :before, *args, &block) - end - - # Add a callback, which runs after TestCase#teardown. - def teardown(*args, &block) - set_callback(:teardown, :after, *args, &block) - end - end - - def before_setup # :nodoc: - super - run_callbacks :setup - end - - def after_teardown # :nodoc: - begin - run_callbacks :teardown - rescue => e - self.failures << Minitest::UnexpectedError.new(e) - rescue Minitest::Assertion => e - self.failures << e - end - - super - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/stream.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/stream.rb deleted file mode 100644 index 0b8e0298..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/stream.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - module Stream # :nodoc: - private - def silence_stream(stream) - old_stream = stream.dup - stream.reopen(IO::NULL) - stream.sync = true - yield - ensure - stream.reopen(old_stream) - old_stream.close - end - - def quietly(&block) - silence_stream(STDOUT) do - silence_stream(STDERR, &block) - end - end - - def capture(stream) - stream = stream.to_s - captured_stream = Tempfile.new(stream) - stream_io = eval("$#{stream}", binding, __FILE__, __LINE__) - origin_stream = stream_io.dup - stream_io.reopen(captured_stream) - - yield - - stream_io.rewind - captured_stream.read - ensure - captured_stream.close - captured_stream.unlink - stream_io.reopen(origin_stream) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/tagged_logging.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/tagged_logging.rb deleted file mode 100644 index 7d38268b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/tagged_logging.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - # Logs a "PostsControllerTest: test name" heading before each test to - # make test.log easier to search and follow along with. - module TaggedLogging # :nodoc: - attr_writer :tagged_logger - - def before_setup - if tagged_logger && tagged_logger.info? - heading = "#{self.class}: #{name}" - divider = "-" * heading.size - tagged_logger.info divider - tagged_logger.info heading - tagged_logger.info divider - end - super - end - - private - def tagged_logger - @tagged_logger ||= (defined?(Rails.logger) && Rails.logger) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/tests_without_assertions.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/tests_without_assertions.rb deleted file mode 100644 index adfe7d86..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/tests_without_assertions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - module Testing - # Warns when a test case does not perform any assertions. - # - # This is helpful in detecting broken tests that do not perform intended assertions. - module TestsWithoutAssertions # :nodoc: - def after_teardown - super - - if assertions.zero? && !skipped? && !error? - file, line = method(name).source_location - warn "Test is missing assertions: `#{name}` #{file}:#{line}" - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/time_helpers.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/time_helpers.rb deleted file mode 100644 index 578184c5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/testing/time_helpers.rb +++ /dev/null @@ -1,269 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/module/redefine_method" -require "active_support/core_ext/time/calculations" - -module ActiveSupport - module Testing - # Manages stubs for TimeHelpers - class SimpleStubs # :nodoc: - Stub = Struct.new(:object, :method_name, :original_method) - - def initialize - @stubs = Hash.new { |h, k| h[k] = {} } - end - - # Stubs object.method_name with the given block - # If the method is already stubbed, remove that stub - # so that removing this stub will restore the original implementation. - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # target = Time.zone.local(2004, 11, 24, 1, 4, 44) - # simple_stubs.stub_object(Time, :now) { at(target.to_i) } - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - def stub_object(object, method_name, &block) - if stub = stubbing(object, method_name) - unstub_object(stub) - end - - new_name = "__simple_stub__#{method_name}__#{object_id}" - - @stubs[object.object_id][method_name] = Stub.new(object, method_name, new_name) - - object.singleton_class.alias_method new_name, method_name - object.define_singleton_method(method_name, &block) - end - - # Remove all object-method stubs held by this instance - def unstub_all! - @stubs.each_value do |object_stubs| - object_stubs.each_value do |stub| - unstub_object(stub) - end - end - @stubs.clear - end - - # Returns the Stub for object#method_name - # (nil if it is not stubbed) - def stubbing(object, method_name) - @stubs[object.object_id][method_name] - end - - # Returns true if any stubs are set, false if there are none - def stubbed? - !@stubs.empty? - end - - private - # Restores the original object.method described by the Stub - def unstub_object(stub) - singleton_class = stub.object.singleton_class - singleton_class.silence_redefinition_of_method stub.method_name - singleton_class.alias_method stub.method_name, stub.original_method - singleton_class.undef_method stub.original_method - end - end - - # Contains helpers that help you test passage of time. - module TimeHelpers - def after_teardown - travel_back - super - end - - # Changes current time to the time in the future or in the past by a given time difference by - # stubbing +Time.now+, +Date.today+, and +DateTime.now+. The stubs are automatically removed - # at the end of the test. - # - # Note that the usec for the resulting time will be set to 0 to prevent rounding - # errors with external services, like MySQL (which will round instead of floor, - # leading to off-by-one-second errors), unless the with_usec argument - # is set to true. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel 1.day - # Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00 - # Date.current # => Sun, 10 Nov 2013 - # DateTime.current # => Sun, 10 Nov 2013 15:34:49 -0500 - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel 1.day do - # User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00 - # end - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - def travel(duration, with_usec: false, &block) - travel_to Time.now + duration, with_usec: with_usec, &block - end - - # Changes current time to the given time by stubbing +Time.now+, +Time.new+, - # +Date.today+, and +DateTime.now+ to return the time or date passed into this method. - # The stubs are automatically removed at the end of the test. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # Date.current # => Wed, 24 Nov 2004 - # DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500 - # - # Dates are taken as their timestamp at the beginning of the day in the - # application time zone. Time.current returns said timestamp, - # and Time.now its equivalent in the system time zone. Similarly, - # Date.current returns a date equal to the argument, and - # Date.today the date according to Time.now, which may - # be different. (Note that you rarely want to deal with Time.now, - # or Date.today, in order to honor the application time zone - # please always use Time.current and Date.current.) - # - # Note that the usec for the time passed will be set to 0 to prevent rounding - # errors with external services, like MySQL (which will round instead of floor, - # leading to off-by-one-second errors), unless the with_usec argument - # is set to true. - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) do - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # end - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - def travel_to(date_or_time, with_usec: false) - if block_given? && in_block - travel_to_nested_block_call = <<~MSG - - Calling `travel_to` with a block, when we have previously already made a call to `travel_to`, can lead to confusing time stubbing. - - Instead of: - - travel_to 2.days.from_now do - # 2 days from today - travel_to 3.days.from_now do - # 5 days from today - end - end - - preferred way to achieve above is: - - travel 2.days do - # 2 days from today - end - - travel 5.days do - # 5 days from today - end - - MSG - raise travel_to_nested_block_call - end - - if date_or_time.is_a?(Date) && !date_or_time.is_a?(DateTime) - now = date_or_time.midnight.to_time - elsif date_or_time.is_a?(String) - now = Time.zone.parse(date_or_time) - else - now = date_or_time - now = now.to_time unless now.is_a?(Time) - end - - now = now.change(usec: 0) unless with_usec - - # +now+ must be in local system timezone, because +Time.at(now)+ - # and +now.to_date+ (see stubs below) will use +now+'s timezone too! - now = now.getlocal - - stubs = simple_stubs - stubbed_time = Time.now if stubs.stubbing(Time, :now) - stubs.stub_object(Time, :now) { at(now) } - - stubs.stub_object(Time, :new) do |*args, **options| - if args.empty? && options.empty? - at(now) - else - stub = stubs.stubbing(Time, :new) - Time.send(stub.original_method, *args, **options) - end - end - - stubs.stub_object(Date, :today) { jd(now.to_date.jd) } - stubs.stub_object(DateTime, :now) { jd(now.to_date.jd, now.hour, now.min, now.sec, Rational(now.utc_offset, 86400)) } - - if block_given? - begin - self.in_block = true - yield - ensure - if stubbed_time - travel_to stubbed_time - else - travel_back - end - self.in_block = false - end - end - end - - # Returns the current time back to its original state, by removing the stubs added by - # +travel+, +travel_to+, and +freeze_time+. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # This method also accepts a block, which brings the stubs back at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back do - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # end - # - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - def travel_back - stubbed_time = Time.current if block_given? && simple_stubs.stubbed? - - simple_stubs.unstub_all! - yield if block_given? - ensure - travel_to stubbed_time if stubbed_time - end - alias_method :unfreeze_time, :travel_back - - # Calls +travel_to+ with +Time.now+. Forwards optional with_usec argument. - # - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # freeze_time - # sleep(1) - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # freeze_time do - # sleep(1) - # User.create.created_at # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # end - # Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00 - def freeze_time(with_usec: false, &block) - travel_to Time.now, with_usec: with_usec, &block - end - - private - def simple_stubs - @simple_stubs ||= SimpleStubs.new - end - - attr_accessor :in_block - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/time.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/time.rb deleted file mode 100644 index 51854675..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/time.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module ActiveSupport - autoload :Duration, "active_support/duration" - autoload :TimeWithZone, "active_support/time_with_zone" - autoload :TimeZone, "active_support/values/time_zone" -end - -require "date" -require "time" - -require "active_support/core_ext/time" -require "active_support/core_ext/date" -require "active_support/core_ext/date_time" - -require "active_support/core_ext/integer/time" -require "active_support/core_ext/numeric/time" - -require "active_support/core_ext/string/conversions" -require "active_support/core_ext/string/zones" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/time_with_zone.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/time_with_zone.rb deleted file mode 100644 index eb25fd46..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/time_with_zone.rb +++ /dev/null @@ -1,609 +0,0 @@ -# frozen_string_literal: true - -require "yaml" - -require "active_support/duration" -require "active_support/values/time_zone" -require "active_support/core_ext/object/acts_like" -require "active_support/core_ext/date_and_time/compatibility" - -module ActiveSupport - # = Active Support \Time With Zone - # - # A Time-like class that can represent a time in any time zone. Necessary - # because standard Ruby Time instances are limited to UTC and the - # system's ENV['TZ'] zone. - # - # You shouldn't ever need to create a TimeWithZone instance directly via +new+. - # Instead use methods +local+, +parse+, +at+, and +now+ on TimeZone instances, - # and +in_time_zone+ on Time and DateTime instances. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 - # Time.zone.parse('2007-02-10 15:30:45') # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 - # Time.zone.at(1171139445) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 - # Time.zone.now # => Sun, 18 May 2008 13:07:55.754107581 EDT -04:00 - # Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 - # - # See Time and TimeZone for further documentation of these methods. - # - # TimeWithZone instances implement the same API as Ruby Time instances, so - # that Time and TimeWithZone instances are interchangeable. - # - # t = Time.zone.now # => Sun, 18 May 2008 13:27:25.031505668 EDT -04:00 - # t.hour # => 13 - # t.dst? # => true - # t.utc_offset # => -14400 - # t.zone # => "EDT" - # t.to_fs(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400" - # t + 1.day # => Mon, 19 May 2008 13:27:25.031505668 EDT -04:00 - # t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00.000000000 EST -05:00 - # t > Time.utc(1999) # => true - # t.is_a?(Time) # => true - # t.is_a?(ActiveSupport::TimeWithZone) # => true - class TimeWithZone - PRECISIONS = Hash.new { |h, n| h[n] = "%FT%T.%#{n}N" } - PRECISIONS[0] = "%FT%T" - - include Comparable, DateAndTime::Compatibility - attr_reader :time_zone - - def initialize(utc_time, time_zone, local_time = nil, period = nil) - @utc = utc_time ? transfer_time_values_to_utc_constructor(utc_time) : nil - @time_zone, @time = time_zone, local_time - @period = @utc ? period : get_period_and_ensure_valid_local_time(period) - end - - # Returns a Time instance that represents the time in +time_zone+. - def time - @time ||= incorporate_utc_offset(@utc, utc_offset) - end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - def utc - @utc ||= incorporate_utc_offset(@time, -utc_offset) - end - alias_method :comparable_time, :utc - alias_method :getgm, :utc - alias_method :getutc, :utc - alias_method :gmtime, :utc - - # Returns the underlying +TZInfo::TimezonePeriod+. - def period - @period ||= time_zone.period_for_utc(@utc) - end - - # Returns the simultaneous time in Time.zone, or the specified zone. - def in_time_zone(new_zone = ::Time.zone) - return self if time_zone == new_zone - utc.in_time_zone(new_zone) - end - - # Returns a Time instance of the simultaneous time in the system timezone. - def localtime(utc_offset = nil) - utc.getlocal(utc_offset) - end - alias_method :getlocal, :localtime - - # Returns true if the current time is within Daylight Savings \Time for the - # specified time zone. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.parse("2012-5-30").dst? # => true - # Time.zone.parse("2012-11-30").dst? # => false - def dst? - period.dst? - end - alias_method :isdst, :dst? - - # Returns true if the current time zone is set to UTC. - # - # Time.zone = 'UTC' # => 'UTC' - # Time.zone.now.utc? # => true - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.now.utc? # => false - def utc? - zone == "UTC" || zone == "UCT" - end - alias_method :gmt?, :utc? - - # Returns the offset from current time to UTC time in seconds. - def utc_offset - period.observed_utc_offset - end - alias_method :gmt_offset, :utc_offset - alias_method :gmtoff, :utc_offset - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" - # Time.zone.now.formatted_offset(true) # => "-05:00" - # Time.zone.now.formatted_offset(false) # => "-0500" - # Time.zone = 'UTC' # => "UTC" - # Time.zone.now.formatted_offset(true, "0") # => "0" - def formatted_offset(colon = true, alternate_utc_string = nil) - utc? && alternate_utc_string || TimeZone.seconds_to_utc_offset(utc_offset, colon) - end - - # Returns the time zone abbreviation. - # - # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" - # Time.zone.now.zone # => "EST" - def zone - period.abbreviation - end - - # Returns a string of the object's date, time, zone, and offset from UTC. - # - # Time.zone.now.inspect # => "2024-11-13 07:00:10.528054960 UTC +00:00" - def inspect - "#{time.strftime('%F %H:%M:%S.%9N')} #{zone} #{formatted_offset}" - end - - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - def xmlschema(fraction_digits = 0) - "#{time.strftime(PRECISIONS[fraction_digits.to_i])}#{formatted_offset(true, 'Z')}" - end - alias_method :iso8601, :xmlschema - alias_method :rfc3339, :xmlschema - - # Coerces time to a string for JSON encoding. The default format is ISO 8601. - # You can get %Y/%m/%d %H:%M:%S +offset style by setting - # ActiveSupport::JSON::Encoding.use_standard_json_time_format - # to +false+. - # - # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true - # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json - # # => "2005-02-01T05:15:10.000-10:00" - # - # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false - # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json - # # => "2005/02/01 05:15:10 -1000" - def as_json(options = nil) - if ActiveSupport::JSON::Encoding.use_standard_json_time_format - xmlschema(ActiveSupport::JSON::Encoding.time_precision) - else - %(#{time.strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)}) - end - end - - def init_with(coder) # :nodoc: - initialize(coder["utc"], coder["zone"], coder["time"]) - end - - def encode_with(coder) # :nodoc: - coder.map = { "utc" => utc, "zone" => time_zone, "time" => time } - end - - # Returns a string of the object's date and time in the format used by - # HTTP requests. - # - # Time.zone.now.httpdate # => "Tue, 01 Jan 2013 04:39:43 GMT" - def httpdate - utc.httpdate - end - - # Returns a string of the object's date and time in the RFC 2822 standard - # format. - # - # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" - def rfc2822 - to_fs(:rfc822) - end - alias_method :rfc822, :rfc2822 - - # Returns a string of the object's date and time. - def to_s - "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format - end - - # Returns a string of the object's date and time. - # - # This method is aliased to to_formatted_s. - # - # Accepts an optional format: - # * :default - default value, mimics Ruby Time#to_s format. - # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). - # * Any key in +Time::DATE_FORMATS+ can be used. See active_support/core_ext/time/conversions.rb. - def to_fs(format = :default) - if format == :db - utc.to_fs(format) - elsif formatter = ::Time::DATE_FORMATS[format] - formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) - else - to_s - end - end - alias_method :to_formatted_s, :to_fs - - # Replaces %Z directive with +zone before passing to Time#strftime, - # so that zone information is correct. - def strftime(format) - format = format.gsub(/((?:\A|[^%])(?:%%)*)%Z/, "\\1#{zone}") - getlocal(utc_offset).strftime(format) - end - - # Use the time in UTC for comparisons. - def <=>(other) - utc <=> other - end - alias_method :before?, :< - alias_method :after?, :> - - # Returns true if the current object's time is within the specified - # +min+ and +max+ time. - def between?(min, max) - utc.between?(min, max) - end - - # Returns true if the current object's time is in the past. - def past? - utc.past? - end - - # Returns true if the current object's time falls within - # the current day. - def today? - time.today? - end - - # Returns true if the current object's time falls within - # the next day (tomorrow). - def tomorrow? - time.tomorrow? - end - alias :next_day? :tomorrow? - - # Returns true if the current object's time falls within - # the previous day (yesterday). - def yesterday? - time.yesterday? - end - alias :prev_day? :yesterday? - - # Returns true if the current object's time is in the future. - def future? - utc.future? - end - - # Returns +true+ if +other+ is equal to current object. - def eql?(other) - other.eql?(utc) - end - - def hash - utc.hash - end - - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 - def +(other) - if duration_of_variable_length?(other) - method_missing(:+, other) - else - begin - result = utc + other - rescue TypeError - result = utc.to_datetime.since(other) - ActiveSupport.deprecator.warn( - "Adding an instance of #{other.class} to an instance of #{self.class} is deprecated. This behavior will raise " \ - "a `TypeError` in Rails 8.1." - ) - result.in_time_zone(time_zone) - end - result.in_time_zone(time_zone) - end - end - alias_method :since, :+ - alias_method :in, :+ - - # Subtracts an interval of time and returns a new TimeWithZone object unless - # the other value +acts_like?+ time. In which case, it will subtract the - # other time and return the difference in seconds as a Float. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now - 1000 # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 - # - # If subtracting a Duration of variable length (i.e., years, months, days), - # move backward from #time, otherwise move backward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time - 24.hours will go subtract exactly 24 hours, while a - # time - 1.day will subtract 23-25 hours, depending on the day. - # - # now - 24.hours # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now - 1.day # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 - # - # If both the TimeWithZone object and the other value act like Time, a Float - # will be returned. - # - # Time.zone.now - 1.day.ago # => 86399.999967 - # - def -(other) - if other.acts_like?(:time) - getutc - other.getutc - elsif duration_of_variable_length?(other) - method_missing(:-, other) - else - result = utc - other - result.in_time_zone(time_zone) - end - end - - # Subtracts an interval of time from the current object's time and returns - # the result as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now.ago(1000) # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 - # - # If we're subtracting a Duration of variable length (i.e., years, months, - # days), move backward from #time, otherwise move backward from #utc, for - # accuracy when moving across DST boundaries. - # - # For instance, time.ago(24.hours) will move back exactly 24 hours, - # while time.ago(1.day) will move back 23-25 hours, depending on - # the day. - # - # now.ago(24.hours) # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now.ago(1.day) # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 - def ago(other) - since(-other) - end - - # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have - # been changed according to the +options+ parameter. The time options (:hour, - # :min, :sec, :usec, :nsec) reset cascadingly, - # so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the - # hour and minute is passed, then sec, usec, and nsec is set to 0. The +options+ - # parameter takes a hash with any of these keys: :year, :month, - # :day, :hour, :min, :sec, :usec, - # :nsec, :offset, :zone. Pass either :usec - # or :nsec, not both. Similarly, pass either :zone or - # :offset, not both. - # - # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 - # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 - # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.000000000 EST -05:00 - # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.000000000 EST -05:00 - # t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 - # t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 - def change(options) - if options[:zone] && options[:offset] - raise ArgumentError, "Can't change both :offset and :zone at the same time: #{options.inspect}" - end - - new_time = time.change(options) - - if options[:zone] - new_zone = ::Time.find_zone(options[:zone]) - elsif options[:offset] - new_zone = ::Time.find_zone(new_time.utc_offset) - end - - new_zone ||= time_zone - periods = new_zone.periods_for_local(new_time) - - self.class.new(nil, new_zone, new_time, periods.include?(period) ? period : nil) - end - - # Uses Date to provide precise Time calculations for years, months, and days - # according to the proleptic Gregorian calendar. The result is returned as a - # new TimeWithZone object. - # - # The +options+ parameter takes a hash with any of these keys: - # :years, :months, :weeks, :days, - # :hours, :minutes, :seconds. - # - # If advancing by a value of variable length (i.e., years, weeks, months, - # days), move forward from #time, otherwise move forward from #utc, for - # accuracy when moving across DST boundaries. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.558049687 EDT -04:00 - # now.advance(seconds: 1) # => Sun, 02 Nov 2014 01:26:29.558049687 EDT -04:00 - # now.advance(minutes: 1) # => Sun, 02 Nov 2014 01:27:28.558049687 EDT -04:00 - # now.advance(hours: 1) # => Sun, 02 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(days: 1) # => Mon, 03 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(weeks: 1) # => Sun, 09 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(months: 1) # => Tue, 02 Dec 2014 01:26:28.558049687 EST -05:00 - # now.advance(years: 1) # => Mon, 02 Nov 2015 01:26:28.558049687 EST -05:00 - def advance(options) - # If we're advancing a value of variable length (i.e., years, weeks, months, days), advance from #time, - # otherwise advance from #utc, for accuracy when moving across DST boundaries - if options.values_at(:years, :weeks, :months, :days).any? - method_missing(:advance, options) - else - utc.advance(options).in_time_zone(time_zone) - end - end - - %w(year mon month day mday wday yday hour min sec usec nsec to_date).each do |method_name| - class_eval <<-EOV, __FILE__, __LINE__ + 1 - def #{method_name} # def month - time.#{method_name} # time.month - end # end - EOV - end - - # Returns Array of parts of Time in sequence of - # [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone]. - # - # now = Time.zone.now # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00 - # now.to_a # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"] - def to_a - [time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone] - end - - # Returns the object's date and time as a floating-point number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_f # => 1417709320.285418 - def to_f - utc.to_f - end - - # Returns the object's date and time as an integer number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_i # => 1417709320 - def to_i - utc.to_i - end - alias_method :tv_sec, :to_i - - # Returns the object's date and time as a rational number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_r # => (708854548642709/500000) - def to_r - utc.to_r - end - - # Returns an instance of DateTime with the timezone's UTC offset - # - # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 - # Time.current.in_time_zone('Hawaii').to_datetime # => Mon, 17 Aug 2015 16:32:20 -1000 - def to_datetime - @to_datetime ||= utc.to_datetime.new_offset(Rational(utc_offset, 86_400)) - end - - # Returns an instance of +Time+, either with the same timezone as +self+, - # with the same UTC offset as +self+ or in the local system timezone - # depending on the setting of +ActiveSupport.to_time_preserves_timezone+. - def to_time - if preserve_timezone == :zone - @to_time_with_timezone ||= getlocal(time_zone) - elsif preserve_timezone - @to_time_with_instance_offset ||= getlocal(utc_offset) - else - @to_time_with_system_offset ||= getlocal - end - end - - # So that +self+ acts_like?(:time). - def acts_like_time? - true - end - - # Say we're a Time to thwart type checking. - def is_a?(klass) - klass == ::Time || super - end - alias_method :kind_of?, :is_a? - - # An instance of ActiveSupport::TimeWithZone is never blank - def blank? - false - end - - def present? # :nodoc: - true - end - - def freeze - # preload instance variables before freezing - period; utc; time; to_datetime; to_time - super - end - - def marshal_dump - [utc, time_zone.name, time] - end - - def marshal_load(variables) - initialize(variables[0].utc, ::Time.find_zone(variables[1]), variables[2].utc) - end - - # respond_to_missing? is not called in some cases, such as when type conversion is - # performed with Kernel#String - def respond_to?(sym, include_priv = false) - # ensure that we're not going to throw and rescue from NoMethodError in method_missing which is slow - return false if sym.to_sym == :to_str - super - end - - # Ensure proxy class responds to all methods that underlying time instance - # responds to. - def respond_to_missing?(sym, include_priv) - time.respond_to?(sym, include_priv) - end - - # Send the missing method to +time+ instance, and wrap result in a new - # TimeWithZone with the existing +time_zone+. - def method_missing(...) - wrap_with_time_zone time.__send__(...) - rescue NoMethodError => e - raise e, e.message.sub(time.inspect, inspect).sub("Time", "ActiveSupport::TimeWithZone"), e.backtrace - end - - private - SECONDS_PER_DAY = 86400 - - def incorporate_utc_offset(time, offset) - if time.kind_of?(Date) - time + Rational(offset, SECONDS_PER_DAY) - else - time + offset - end - end - - def get_period_and_ensure_valid_local_time(period) - # we don't want a Time.local instance enforcing its own DST rules as well, - # so transfer time values to a utc constructor if necessary - @time = transfer_time_values_to_utc_constructor(@time) unless @time.utc? - begin - period || @time_zone.period_for_local(@time) - rescue ::TZInfo::PeriodNotFound - # time is in the "spring forward" hour gap, so we're moving the time forward one hour and trying again - @time += 1.hour - retry - end - end - - def transfer_time_values_to_utc_constructor(time) - # avoid creating another Time object if possible - return time if time.instance_of?(::Time) && time.utc? - ::Time.utc(time.year, time.month, time.day, time.hour, time.min, time.sec + time.subsec) - end - - def duration_of_variable_length?(obj) - ActiveSupport::Duration === obj && obj.variable? - end - - def wrap_with_time_zone(time) - if time.acts_like?(:time) - periods = time_zone.periods_for_local(time) - self.class.new(nil, time_zone, time, periods.include?(period) ? period : nil) - elsif time.is_a?(Range) - wrap_with_time_zone(time.begin)..wrap_with_time_zone(time.end) - else - time - end - end - end -end - -# These prevent Psych from calling `ActiveSupport::TimeWithZone.name` -# and triggering the deprecation warning about the change in Rails 7.1. -YAML.load_tags["!ruby/object:ActiveSupport::TimeWithZone"] = "ActiveSupport::TimeWithZone" -YAML.dump_tags[ActiveSupport::TimeWithZone] = "!ruby/object:ActiveSupport::TimeWithZone" diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/values/time_zone.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/values/time_zone.rb deleted file mode 100644 index db98f37c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/values/time_zone.rb +++ /dev/null @@ -1,614 +0,0 @@ -# frozen_string_literal: true - -require "tzinfo" -require "concurrent/map" - -module ActiveSupport - # = Active Support \Time Zone - # - # The TimeZone class serves as a wrapper around +TZInfo::Timezone+ instances. - # It allows us to do the following: - # - # * Limit the set of zones provided by TZInfo to a meaningful subset of 134 - # zones. - # * Retrieve and display zones with a friendlier name - # (e.g., "Eastern \Time (US & Canada)" instead of "America/New_York"). - # * Lazily load +TZInfo::Timezone+ instances only when they're needed. - # * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, - # +parse+, +at+, and +now+ methods. - # - # If you set config.time_zone in the \Rails Application, you can - # access this TimeZone object via Time.zone: - # - # # application.rb: - # class Application < Rails::Application - # config.time_zone = 'Eastern Time (US & Canada)' - # end - # - # Time.zone # => # - # Time.zone.name # => "Eastern Time (US & Canada)" - # Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 - class TimeZone - # Keys are \Rails TimeZone names, values are TZInfo identifiers. - MAPPING = { - "International Date Line West" => "Etc/GMT+12", - "Midway Island" => "Pacific/Midway", - "American Samoa" => "Pacific/Pago_Pago", - "Hawaii" => "Pacific/Honolulu", - "Alaska" => "America/Juneau", - "Pacific Time (US & Canada)" => "America/Los_Angeles", - "Tijuana" => "America/Tijuana", - "Mountain Time (US & Canada)" => "America/Denver", - "Arizona" => "America/Phoenix", - "Chihuahua" => "America/Chihuahua", - "Mazatlan" => "America/Mazatlan", - "Central Time (US & Canada)" => "America/Chicago", - "Saskatchewan" => "America/Regina", - "Guadalajara" => "America/Mexico_City", - "Mexico City" => "America/Mexico_City", - "Monterrey" => "America/Monterrey", - "Central America" => "America/Guatemala", - "Eastern Time (US & Canada)" => "America/New_York", - "Indiana (East)" => "America/Indiana/Indianapolis", - "Bogota" => "America/Bogota", - "Lima" => "America/Lima", - "Quito" => "America/Lima", - "Atlantic Time (Canada)" => "America/Halifax", - "Caracas" => "America/Caracas", - "La Paz" => "America/La_Paz", - "Santiago" => "America/Santiago", - "Newfoundland" => "America/St_Johns", - "Brasilia" => "America/Sao_Paulo", - "Buenos Aires" => "America/Argentina/Buenos_Aires", - "Montevideo" => "America/Montevideo", - "Georgetown" => "America/Guyana", - "Puerto Rico" => "America/Puerto_Rico", - "Greenland" => "America/Godthab", - "Mid-Atlantic" => "Atlantic/South_Georgia", - "Azores" => "Atlantic/Azores", - "Cape Verde Is." => "Atlantic/Cape_Verde", - "Dublin" => "Europe/Dublin", - "Edinburgh" => "Europe/London", - "Lisbon" => "Europe/Lisbon", - "London" => "Europe/London", - "Casablanca" => "Africa/Casablanca", - "Monrovia" => "Africa/Monrovia", - "UTC" => "Etc/UTC", - "Belgrade" => "Europe/Belgrade", - "Bratislava" => "Europe/Bratislava", - "Budapest" => "Europe/Budapest", - "Ljubljana" => "Europe/Ljubljana", - "Prague" => "Europe/Prague", - "Sarajevo" => "Europe/Sarajevo", - "Skopje" => "Europe/Skopje", - "Warsaw" => "Europe/Warsaw", - "Zagreb" => "Europe/Zagreb", - "Brussels" => "Europe/Brussels", - "Copenhagen" => "Europe/Copenhagen", - "Madrid" => "Europe/Madrid", - "Paris" => "Europe/Paris", - "Amsterdam" => "Europe/Amsterdam", - "Berlin" => "Europe/Berlin", - "Bern" => "Europe/Zurich", - "Zurich" => "Europe/Zurich", - "Rome" => "Europe/Rome", - "Stockholm" => "Europe/Stockholm", - "Vienna" => "Europe/Vienna", - "West Central Africa" => "Africa/Algiers", - "Bucharest" => "Europe/Bucharest", - "Cairo" => "Africa/Cairo", - "Helsinki" => "Europe/Helsinki", - "Kyiv" => "Europe/Kiev", - "Riga" => "Europe/Riga", - "Sofia" => "Europe/Sofia", - "Tallinn" => "Europe/Tallinn", - "Vilnius" => "Europe/Vilnius", - "Athens" => "Europe/Athens", - "Istanbul" => "Europe/Istanbul", - "Minsk" => "Europe/Minsk", - "Jerusalem" => "Asia/Jerusalem", - "Harare" => "Africa/Harare", - "Pretoria" => "Africa/Johannesburg", - "Kaliningrad" => "Europe/Kaliningrad", - "Moscow" => "Europe/Moscow", - "St. Petersburg" => "Europe/Moscow", - "Volgograd" => "Europe/Volgograd", - "Samara" => "Europe/Samara", - "Kuwait" => "Asia/Kuwait", - "Riyadh" => "Asia/Riyadh", - "Nairobi" => "Africa/Nairobi", - "Baghdad" => "Asia/Baghdad", - "Tehran" => "Asia/Tehran", - "Abu Dhabi" => "Asia/Muscat", - "Muscat" => "Asia/Muscat", - "Baku" => "Asia/Baku", - "Tbilisi" => "Asia/Tbilisi", - "Yerevan" => "Asia/Yerevan", - "Kabul" => "Asia/Kabul", - "Ekaterinburg" => "Asia/Yekaterinburg", - "Islamabad" => "Asia/Karachi", - "Karachi" => "Asia/Karachi", - "Tashkent" => "Asia/Tashkent", - "Chennai" => "Asia/Kolkata", - "Kolkata" => "Asia/Kolkata", - "Mumbai" => "Asia/Kolkata", - "New Delhi" => "Asia/Kolkata", - "Kathmandu" => "Asia/Kathmandu", - "Dhaka" => "Asia/Dhaka", - "Sri Jayawardenepura" => "Asia/Colombo", - "Almaty" => "Asia/Almaty", - "Astana" => "Asia/Almaty", - "Novosibirsk" => "Asia/Novosibirsk", - "Rangoon" => "Asia/Rangoon", - "Bangkok" => "Asia/Bangkok", - "Hanoi" => "Asia/Bangkok", - "Jakarta" => "Asia/Jakarta", - "Krasnoyarsk" => "Asia/Krasnoyarsk", - "Beijing" => "Asia/Shanghai", - "Chongqing" => "Asia/Chongqing", - "Hong Kong" => "Asia/Hong_Kong", - "Urumqi" => "Asia/Urumqi", - "Kuala Lumpur" => "Asia/Kuala_Lumpur", - "Singapore" => "Asia/Singapore", - "Taipei" => "Asia/Taipei", - "Perth" => "Australia/Perth", - "Irkutsk" => "Asia/Irkutsk", - "Ulaanbaatar" => "Asia/Ulaanbaatar", - "Seoul" => "Asia/Seoul", - "Osaka" => "Asia/Tokyo", - "Sapporo" => "Asia/Tokyo", - "Tokyo" => "Asia/Tokyo", - "Yakutsk" => "Asia/Yakutsk", - "Darwin" => "Australia/Darwin", - "Adelaide" => "Australia/Adelaide", - "Canberra" => "Australia/Canberra", - "Melbourne" => "Australia/Melbourne", - "Sydney" => "Australia/Sydney", - "Brisbane" => "Australia/Brisbane", - "Hobart" => "Australia/Hobart", - "Vladivostok" => "Asia/Vladivostok", - "Guam" => "Pacific/Guam", - "Port Moresby" => "Pacific/Port_Moresby", - "Magadan" => "Asia/Magadan", - "Srednekolymsk" => "Asia/Srednekolymsk", - "Solomon Is." => "Pacific/Guadalcanal", - "New Caledonia" => "Pacific/Noumea", - "Fiji" => "Pacific/Fiji", - "Kamchatka" => "Asia/Kamchatka", - "Marshall Is." => "Pacific/Majuro", - "Auckland" => "Pacific/Auckland", - "Wellington" => "Pacific/Auckland", - "Nuku'alofa" => "Pacific/Tongatapu", - "Tokelau Is." => "Pacific/Fakaofo", - "Chatham Is." => "Pacific/Chatham", - "Samoa" => "Pacific/Apia" - } - - UTC_OFFSET_WITH_COLON = "%s%02d:%02d" # :nodoc: - UTC_OFFSET_WITHOUT_COLON = UTC_OFFSET_WITH_COLON.tr(":", "") # :nodoc: - private_constant :UTC_OFFSET_WITH_COLON, :UTC_OFFSET_WITHOUT_COLON - - @lazy_zones_map = Concurrent::Map.new - @country_zones = Concurrent::Map.new - - class << self - # Assumes self represents an offset from UTC in seconds (as returned from - # Time#utc_offset) and turns this into an +HH:MM formatted string. - # - # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" - def seconds_to_utc_offset(seconds, colon = true) - format = colon ? UTC_OFFSET_WITH_COLON : UTC_OFFSET_WITHOUT_COLON - sign = (seconds < 0 ? "-" : "+") - hours = seconds.abs / 3600 - minutes = (seconds.abs % 3600) / 60 - format % [sign, hours, minutes] - end - - def find_tzinfo(name) - TZInfo::Timezone.get(MAPPING[name] || name) - end - - alias_method :create, :new # :nodoc: - - # Returns a TimeZone instance with the given name, or +nil+ if no - # such TimeZone instance exists. (This exists to support the use of - # this class with the +composed_of+ macro.) - def new(name) - self[name] - end - - # Returns an array of all TimeZone objects. There are multiple - # TimeZone objects per time zone, in many cases, to make it easier - # for users to find their own time zone. - def all - @zones ||= zones_map.values.sort - end - - # Locate a specific time zone object. If the argument is a string, it - # is interpreted to mean the name of the timezone to locate. If it is a - # numeric value it is either the hour offset, or the second offset, of the - # timezone to find. (The first one with that offset will be returned.) - # Returns +nil+ if no such time zone is known to the system. - def [](arg) - case arg - when self - arg - when String - begin - @lazy_zones_map[arg] ||= create(arg) - rescue TZInfo::InvalidTimezoneIdentifier - nil - end - when TZInfo::Timezone - @lazy_zones_map[arg.name] ||= create(arg.name, nil, arg) - when Numeric, ActiveSupport::Duration - arg *= 3600 if arg.abs <= 13 - all.find { |z| z.utc_offset == arg.to_i } - else - raise ArgumentError, "invalid argument to TimeZone[]: #{arg.inspect}" - end - end - - # A convenience method for returning a collection of TimeZone objects - # for time zones in the USA. - def us_zones - country_zones(:us) - end - - # A convenience method for returning a collection of TimeZone objects - # for time zones in the country specified by its ISO 3166-1 Alpha2 code. - def country_zones(country_code) - code = country_code.to_s.upcase - @country_zones[code] ||= load_country_zones(code) - end - - def clear # :nodoc: - @lazy_zones_map = Concurrent::Map.new - @country_zones = Concurrent::Map.new - @zones = nil - @zones_map = nil - end - - private - def load_country_zones(code) - country = TZInfo::Country.get(code) - country.zone_identifiers.flat_map do |tz_id| - if MAPPING.value?(tz_id) - MAPPING.inject([]) do |memo, (key, value)| - memo << self[key] if value == tz_id - memo - end - else - create(tz_id, nil, TZInfo::Timezone.get(tz_id)) - end - end.sort! - end - - def zones_map - @zones_map ||= MAPPING.each_with_object({}) do |(name, _), zones| - timezone = self[name] - zones[name] = timezone if timezone - end - end - end - - include Comparable - attr_reader :name - attr_reader :tzinfo - - ## - # :singleton-method: create - # :call-seq: create(name, utc_offset = nil, tzinfo = nil) - # - # Create a new TimeZone object with the given name and offset. The - # offset is the number of seconds that this time zone is offset from UTC - # (GMT). Seconds were chosen as the offset unit because that is the unit - # that Ruby uses to represent time zone offsets (see Time#utc_offset). - - # :stopdoc: - def initialize(name, utc_offset = nil, tzinfo = nil) - @name = name - @utc_offset = utc_offset - @tzinfo = tzinfo || TimeZone.find_tzinfo(name) - end - # :startdoc: - - # Returns the offset of this time zone from UTC in seconds. - def utc_offset - @utc_offset || tzinfo&.current_period&.base_utc_offset - end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # zone = ActiveSupport::TimeZone['Central Time (US & Canada)'] - # zone.formatted_offset # => "-06:00" - # zone.formatted_offset(false) # => "-0600" - def formatted_offset(colon = true, alternate_utc_string = nil) - utc_offset == 0 && alternate_utc_string || self.class.seconds_to_utc_offset(utc_offset, colon) - end - - # Compare this time zone to the parameter. The two are compared first on - # their offsets, and then by name. - def <=>(zone) - return unless zone.respond_to? :utc_offset - result = (utc_offset <=> zone.utc_offset) - result = (name <=> zone.name) if result == 0 - result - end - - # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ - # if a match is found. - def =~(re) - re === name || re === MAPPING[name] - end - - # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ - # if a match is found. - def match?(re) - (re == name) || (re == MAPPING[name]) || - ((Regexp === re) && (re.match?(name) || re.match?(MAPPING[name]))) - end - - # Returns a textual representation of this time zone. - def to_s - "(GMT#{formatted_offset}) #{name}" - end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from given values. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 - def local(*args) - time = Time.utc(*args) - ActiveSupport::TimeWithZone.new(nil, self, time) - end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from number of seconds since the Unix epoch. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.utc(2000).to_f # => 946684800.0 - # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # A second argument can be supplied to specify sub-second precision. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.at(946684800, 123456.789).nsec # => 123456789 - def at(*args) - Time.at(*args).utc.in_time_zone(self) - end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from an ISO 8601 string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If the time components are missing then they will be set to zero. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.iso8601('1999-12-31') # => Fri, 31 Dec 1999 00:00:00 HST -10:00 - # - # If the string is invalid then an +ArgumentError+ will be raised unlike +parse+ - # which usually returns +nil+ when given an invalid date string. - def iso8601(str) - # Historically `Date._iso8601(nil)` returns `{}`, but in the `date` gem versions `3.2.1`, `3.1.2`, `3.0.2`, - # and `2.0.1`, `Date._iso8601(nil)` raises `TypeError` https://github.com/ruby/date/issues/39 - # Future `date` releases are expected to revert back to the original behavior. - raise ArgumentError, "invalid date" if str.nil? - - parts = Date._iso8601(str) - - year = parts.fetch(:year) - - if parts.key?(:yday) - ordinal_date = Date.ordinal(year, parts.fetch(:yday)) - month = ordinal_date.month - day = ordinal_date.day - else - month = parts.fetch(:mon) - day = parts.fetch(:mday) - end - - time = Time.new( - year, - month, - day, - parts.fetch(:hour, 0), - parts.fetch(:min, 0), - parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0), - parts.fetch(:offset, 0) - ) - - if parts[:offset] - TimeWithZone.new(time.utc, self) - else - TimeWithZone.new(nil, self, time) - end - - rescue Date::Error, KeyError - raise ArgumentError, "invalid date" - end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from parsed string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If upper components are missing from the string, they are supplied from - # TimeZone#now: - # - # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 - # - # However, if the date component is not provided, but any other upper - # components are supplied, then the day of the month defaults to 1: - # - # Time.zone.parse('Mar 2000') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 - # - # If the string is invalid then an +ArgumentError+ could be raised. - def parse(str, now = now()) - parts_to_time(Date._parse(str, false), now) - end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from an RFC 3339 string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If the time or zone components are missing then an +ArgumentError+ will - # be raised. This is much stricter than either +parse+ or +iso8601+ which - # allow for missing components. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date - def rfc3339(str) - parts = Date._rfc3339(str) - - raise ArgumentError, "invalid date" if parts.empty? - - time = Time.new( - parts.fetch(:year), - parts.fetch(:mon), - parts.fetch(:mday), - parts.fetch(:hour), - parts.fetch(:min), - parts.fetch(:sec) + parts.fetch(:sec_fraction, 0), - parts.fetch(:offset) - ) - - TimeWithZone.new(time.utc, self) - end - - # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. - # - # Assumes that +str+ is a time in the time zone +self+, - # unless +format+ includes an explicit time zone. - # (This is the same behavior as +parse+.) - # In either case, the returned TimeWithZone has the timezone of +self+. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.strptime('1999-12-31 14:00:00', '%Y-%m-%d %H:%M:%S') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If upper components are missing from the string, they are supplied from - # TimeZone#now: - # - # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Time.zone.strptime('22:30:00', '%H:%M:%S') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 - # - # However, if the date component is not provided, but any other upper - # components are supplied, then the day of the month defaults to 1: - # - # Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 - def strptime(str, format, now = now()) - parts_to_time(DateTime._strptime(str, format), now) - end - - # Returns an ActiveSupport::TimeWithZone instance representing the current - # time in the time zone represented by +self+. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 - def now - time_now.utc.in_time_zone(self) - end - - # Returns the current date in this time zone. - def today - tzinfo.now.to_date - end - - # Returns the next date in this time zone. - def tomorrow - today + 1 - end - - # Returns the previous date in this time zone. - def yesterday - today - 1 - end - - # Adjust the given time to the simultaneous time in the time zone - # represented by +self+. Returns a local time with the appropriate offset - # -- if you want an ActiveSupport::TimeWithZone instance, use - # Time#in_time_zone() instead. - # - # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. - # See the +utc_to_local_returns_utc_offset_times+ config for more info. - def utc_to_local(time) - tzinfo.utc_to_local(time).yield_self do |t| - ActiveSupport.utc_to_local_returns_utc_offset_times ? - t : Time.utc(t.year, t.month, t.day, t.hour, t.min, t.sec, t.sec_fraction * 1_000_000) - end - end - - # Adjust the given time to the simultaneous time in UTC. Returns a - # Time.utc() instance. - def local_to_utc(time, dst = true) - tzinfo.local_to_utc(time, dst) - end - - def period_for_utc(time) # :nodoc: - tzinfo.period_for_utc(time) - end - - def period_for_local(time, dst = true) # :nodoc: - tzinfo.period_for_local(time, dst) { |periods| periods.last } - end - - def periods_for_local(time) # :nodoc: - tzinfo.periods_for_local(time) - end - - def abbr(time) # :nodoc: - tzinfo.abbr(time) - end - - def dst?(time) # :nodoc: - tzinfo.dst?(time) - end - - def init_with(coder) # :nodoc: - initialize(coder["name"]) - end - - def encode_with(coder) # :nodoc: - coder.tag = "!ruby/object:#{self.class}" - coder.map = { "name" => tzinfo.name } - end - - private - def parts_to_time(parts, now) - raise ArgumentError, "invalid date" if parts.nil? - return if parts.empty? - - if parts[:seconds] - time = Time.at(parts[:seconds]) - else - time = Time.new( - parts.fetch(:year, now.year), - parts.fetch(:mon, now.month), - parts.fetch(:mday, parts[:year] || parts[:mon] ? 1 : now.day), - parts.fetch(:hour, 0), - parts.fetch(:min, 0), - parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0), - parts.fetch(:offset, 0) - ) - end - - if parts[:offset] || parts[:seconds] - TimeWithZone.new(time.utc, self) - else - TimeWithZone.new(nil, self, time) - end - end - - def time_now - Time.now - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/version.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/version.rb deleted file mode 100644 index 12f83379..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/version.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -require_relative "gem_version" - -module ActiveSupport - # Returns the currently loaded version of Active Support as a +Gem::Version+. - def self.version - gem_version - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini.rb deleted file mode 100644 index 380d0156..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -require "time" -require "base64" -require "bigdecimal" -require "bigdecimal/util" -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/string/inflections" -require "active_support/core_ext/date_time/calculations" - -module ActiveSupport - # = \XmlMini - # - # To use the much faster libxml parser: - # gem "libxml-ruby" - # XmlMini.backend = 'LibXML' - module XmlMini - extend self - - # This module decorates files deserialized using Hash.from_xml with - # the original_filename and content_type methods. - module FileLike # :nodoc: - attr_writer :original_filename, :content_type - - def original_filename - @original_filename || "untitled" - end - - def content_type - @content_type || "application/octet-stream" - end - end - - DEFAULT_ENCODINGS = { - "binary" => "base64" - } unless defined?(DEFAULT_ENCODINGS) - - unless defined?(TYPE_NAMES) - TYPE_NAMES = { - "Symbol" => "symbol", - "Integer" => "integer", - "BigDecimal" => "decimal", - "Float" => "float", - "TrueClass" => "boolean", - "FalseClass" => "boolean", - "Date" => "date", - "DateTime" => "dateTime", - "Time" => "dateTime", - "ActiveSupport::Duration" => "duration", - "Array" => "array", - "Hash" => "hash" - } - end - TYPE_NAMES["ActiveSupport::TimeWithZone"] = TYPE_NAMES["Time"] - - FORMATTING = { - "symbol" => Proc.new { |symbol| symbol.to_s }, - "date" => Proc.new { |date| date.to_fs(:db) }, - "dateTime" => Proc.new { |time| time.xmlschema }, - "duration" => Proc.new { |duration| duration.iso8601 }, - "binary" => Proc.new { |binary| ::Base64.encode64(binary) }, - "yaml" => Proc.new { |yaml| yaml.to_yaml } - } unless defined?(FORMATTING) - - # TODO use regexp instead of Date.parse - unless defined?(PARSING) - PARSING = { - "symbol" => Proc.new { |symbol| symbol.to_s.to_sym }, - "date" => Proc.new { |date| ::Date.parse(date) }, - "datetime" => Proc.new { |time| Time.xmlschema(time).utc rescue ::DateTime.parse(time).utc }, - "duration" => Proc.new { |duration| Duration.parse(duration) }, - "integer" => Proc.new { |integer| integer.to_i }, - "float" => Proc.new { |float| float.to_f }, - "decimal" => Proc.new do |number| - if String === number - number.to_d - else - BigDecimal(number) - end - end, - "boolean" => Proc.new { |boolean| %w(1 true).include?(boolean.to_s.strip) }, - "string" => Proc.new { |string| string.to_s }, - "yaml" => Proc.new { |yaml| YAML.load(yaml) rescue yaml }, - "base64Binary" => Proc.new { |bin| ::Base64.decode64(bin) }, - "hexBinary" => Proc.new { |bin| _parse_hex_binary(bin) }, - "binary" => Proc.new { |bin, entity| _parse_binary(bin, entity) }, - "file" => Proc.new { |file, entity| _parse_file(file, entity) } - } - - PARSING.update( - "double" => PARSING["float"], - "dateTime" => PARSING["datetime"] - ) - end - - attr_accessor :depth - self.depth = 100 - - delegate :parse, to: :backend - - def backend - current_thread_backend || @backend - end - - def backend=(name) - backend = name && cast_backend_name_to_module(name) - self.current_thread_backend = backend if current_thread_backend - @backend = backend - end - - def with_backend(name) - old_backend = current_thread_backend - self.current_thread_backend = name && cast_backend_name_to_module(name) - yield - ensure - self.current_thread_backend = old_backend - end - - def to_tag(key, value, options) - type_name = options.delete(:type) - merged_options = options.merge(root: key, skip_instruct: true) - - if value.is_a?(::Method) || value.is_a?(::Proc) - if value.arity == 1 - value.call(merged_options) - else - value.call(merged_options, key.to_s.singularize) - end - elsif value.respond_to?(:to_xml) - value.to_xml(merged_options) - else - type_name ||= TYPE_NAMES[value.class.name] - type_name ||= value.class.name if value && !value.respond_to?(:to_str) - type_name = type_name.to_s if type_name - type_name = "dateTime" if type_name == "datetime" - - key = rename_key(key.to_s, options) - - attributes = options[:skip_types] || type_name.nil? ? {} : { type: type_name } - attributes[:nil] = true if value.nil? - - encoding = options[:encoding] || DEFAULT_ENCODINGS[type_name] - attributes[:encoding] = encoding if encoding - - formatted_value = FORMATTING[type_name] && !value.nil? ? - FORMATTING[type_name].call(value) : value - - options[:builder].tag!(key, formatted_value, attributes) - end - end - - def rename_key(key, options = {}) - camelize = options[:camelize] - dasherize = !options.has_key?(:dasherize) || options[:dasherize] - if camelize - key = true == camelize ? key.camelize : key.camelize(camelize) - end - key = _dasherize(key) if dasherize - key - end - - private - def _dasherize(key) - # $2 must be a non-greedy regex for this to work - left, middle, right = /\A(_*)(.*?)(_*)\Z/.match(key.strip)[1, 3] - "#{left}#{middle.tr('_ ', '--')}#{right}" - end - - def _parse_binary(bin, entity) - case entity["encoding"] - when "base64" - ::Base64.decode64(bin) - when "hex", "hexBinary" - _parse_hex_binary(bin) - else - bin - end - end - - def _parse_file(file, entity) - f = StringIO.new(::Base64.decode64(file)) - f.extend(FileLike) - f.original_filename = entity["name"] - f.content_type = entity["content_type"] - f - end - - def _parse_hex_binary(bin) - [bin].pack("H*") - end - - def current_thread_backend - IsolatedExecutionState[:xml_mini_backend] - end - - def current_thread_backend=(name) - IsolatedExecutionState[:xml_mini_backend] = name && cast_backend_name_to_module(name) - end - - def cast_backend_name_to_module(name) - if name.is_a?(Module) - name - else - require "active_support/xml_mini/#{name.downcase}" - ActiveSupport.const_get("XmlMini_#{name}") - end - end - end - - XmlMini.backend = "REXML" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/jdom.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/jdom.rb deleted file mode 100644 index f1bc0fe7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/jdom.rb +++ /dev/null @@ -1,175 +0,0 @@ -# frozen_string_literal: true - -raise "JRuby is required to use the JDOM backend for XmlMini" unless RUBY_PLATFORM.include?("java") - -require "jruby" -include Java - -require "active_support/core_ext/object/blank" - -java_import javax.xml.parsers.DocumentBuilder unless defined? DocumentBuilder -java_import javax.xml.parsers.DocumentBuilderFactory unless defined? DocumentBuilderFactory -java_import java.io.StringReader unless defined? StringReader -java_import org.xml.sax.InputSource unless defined? InputSource -java_import org.xml.sax.Attributes unless defined? Attributes -java_import org.w3c.dom.Node unless defined? Node - -module ActiveSupport - module XmlMini_JDOM # :nodoc: - extend self - - CONTENT_KEY = "__content__" - - # Parse an XML Document string or IO into a simple hash using Java's jdom. - # data:: - # XML Document string or IO to parse - def parse(data) - if data.respond_to?(:read) - data = data.read - end - - if data.blank? - {} - else - @dbf = DocumentBuilderFactory.new_instance - # secure processing of java xml - # https://archive.is/9xcQQ - @dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) - @dbf.setFeature("http://xml.org/sax/features/external-general-entities", false) - @dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false) - @dbf.setFeature(javax.xml.XMLConstants::FEATURE_SECURE_PROCESSING, true) - xml_string_reader = StringReader.new(data) - xml_input_source = InputSource.new(xml_string_reader) - doc = @dbf.new_document_builder.parse(xml_input_source) - merge_element!({ CONTENT_KEY => "" }, doc.document_element, XmlMini.depth) - end - end - - private - # Convert an XML element and merge into the hash - # - # hash:: - # Hash to merge the converted element into. - # element:: - # XML element to merge into hash - def merge_element!(hash, element, depth) - raise "Document too deep!" if depth == 0 - delete_empty(hash) - merge!(hash, element.tag_name, collapse(element, depth)) - end - - def delete_empty(hash) - hash.delete(CONTENT_KEY) if hash[CONTENT_KEY] == "" - end - - # Actually converts an XML document element into a data structure. - # - # element:: - # The document element to be collapsed. - def collapse(element, depth) - hash = get_attributes(element) - - child_nodes = element.child_nodes - if child_nodes.length > 0 - (0...child_nodes.length).each do |i| - child = child_nodes.item(i) - merge_element!(hash, child, depth - 1) unless child.node_type == Node::TEXT_NODE - end - merge_texts!(hash, element) unless empty_content?(element) - hash - else - merge_texts!(hash, element) - end - end - - # Merge all the texts of an element into the hash - # - # hash:: - # Hash to add the converted element to. - # element:: - # XML element whose texts are to me merged into the hash - def merge_texts!(hash, element) - delete_empty(hash) - text_children = texts(element) - if text_children.join.empty? - hash - else - # must use value to prevent double-escaping - merge!(hash, CONTENT_KEY, text_children.join) - end - end - - # Adds a new key/value pair to an existing Hash. If the key to be added - # already exists and the existing value associated with key is not - # an Array, it will be wrapped in an Array. Then the new value is - # appended to that Array. - # - # hash:: - # Hash to add key/value pair to. - # key:: - # Key to be added. - # value:: - # Value to be associated with key. - def merge!(hash, key, value) - if hash.has_key?(key) - if hash[key].instance_of?(Array) - hash[key] << value - else - hash[key] = [hash[key], value] - end - elsif value.instance_of?(Array) - hash[key] = [value] - else - hash[key] = value - end - hash - end - - # Converts the attributes array of an XML element into a hash. - # Returns an empty Hash if node has no attributes. - # - # element:: - # XML element to extract attributes from. - def get_attributes(element) - attribute_hash = {} - attributes = element.attributes - (0...attributes.length).each do |i| - attribute_hash[CONTENT_KEY] ||= "" - attribute_hash[attributes.item(i).name] = attributes.item(i).value - end - attribute_hash - end - - # Determines if a document element has text content - # - # element:: - # XML element to be checked. - def texts(element) - texts = [] - child_nodes = element.child_nodes - (0...child_nodes.length).each do |i| - item = child_nodes.item(i) - if item.node_type == Node::TEXT_NODE - texts << item.get_data - end - end - texts - end - - # Determines if a document element has text content - # - # element:: - # XML element to be checked. - def empty_content?(element) - text = +"" - child_nodes = element.child_nodes - (0...child_nodes.length).each do |i| - item = child_nodes.item(i) - if item.node_type == Node::TEXT_NODE - text << item.get_data.strip - end - end - text.strip.length == 0 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/libxml.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/libxml.rb deleted file mode 100644 index 65976a2b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/libxml.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -require "libxml" -require "active_support/core_ext/object/blank" -require "stringio" - -module ActiveSupport - module XmlMini_LibXML # :nodoc: - extend self - - # Parse an XML Document string or IO into a simple hash using libxml. - # data:: - # XML Document string or IO to parse - def parse(data) - if !data.respond_to?(:read) - data = StringIO.new(data || "") - end - - if data.eof? - {} - else - LibXML::XML::Parser.io(data).parse.to_hash - end - end - end -end - -module LibXML # :nodoc: - module Conversions # :nodoc: - module Document # :nodoc: - def to_hash - root.to_hash - end - end - - module Node # :nodoc: - CONTENT_ROOT = "__content__" - - # Convert XML document to hash. - # - # hash:: - # Hash to merge the converted element into. - def to_hash(hash = {}) - node_hash = {} - - # Insert node hash into parent hash correctly. - case hash[name] - when Array then hash[name] << node_hash - when Hash then hash[name] = [hash[name], node_hash] - when nil then hash[name] = node_hash - end - - # Handle child elements - each_child do |c| - if c.element? - c.to_hash(node_hash) - elsif c.text? || c.cdata? - node_hash[CONTENT_ROOT] ||= +"" - node_hash[CONTENT_ROOT] << c.content - end - end - - # Remove content node if it is blank - if node_hash.length > 1 && node_hash[CONTENT_ROOT].blank? - node_hash.delete(CONTENT_ROOT) - end - - # Handle attributes - each_attr { |a| node_hash[a.name] = a.value } - - hash - end - end - end -end - -# :enddoc: - -LibXML::XML::Document.include(LibXML::Conversions::Document) -LibXML::XML::Node.include(LibXML::Conversions::Node) diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/libxmlsax.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/libxmlsax.rb deleted file mode 100644 index 33d594c4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/libxmlsax.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -require "libxml" -require "active_support/core_ext/object/blank" -require "stringio" - -module ActiveSupport - module XmlMini_LibXMLSAX # :nodoc: - extend self - - # Class that will build the hash while the XML document - # is being parsed using SAX events. - class HashBuilder - include LibXML::XML::SaxParser::Callbacks - - CONTENT_KEY = "__content__" - HASH_SIZE_KEY = "__hash_size__" - - attr_reader :hash - - def current_hash - @hash_stack.last - end - - def on_start_document - @hash = { CONTENT_KEY => +"" } - @hash_stack = [@hash] - end - - def on_end_document - @hash = @hash_stack.pop - @hash.delete(CONTENT_KEY) - end - - def on_start_element(name, attrs = {}) - new_hash = { CONTENT_KEY => +"" }.merge!(attrs) - new_hash[HASH_SIZE_KEY] = new_hash.size + 1 - - case current_hash[name] - when Array then current_hash[name] << new_hash - when Hash then current_hash[name] = [current_hash[name], new_hash] - when nil then current_hash[name] = new_hash - end - - @hash_stack.push(new_hash) - end - - def on_end_element(name) - if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == "" - current_hash.delete(CONTENT_KEY) - end - @hash_stack.pop - end - - def on_characters(string) - current_hash[CONTENT_KEY] << string - end - - alias_method :on_cdata_block, :on_characters - end - - attr_accessor :document_class - self.document_class = HashBuilder - - def parse(data) - if !data.respond_to?(:read) - data = StringIO.new(data || "") - end - - if data.eof? - {} - else - LibXML::XML::Error.set_handler(&LibXML::XML::Error::QUIET_HANDLER) - parser = LibXML::XML::SaxParser.io(data) - document = document_class.new - - parser.callbacks = document - parser.parse - document.hash - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/nokogiri.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/nokogiri.rb deleted file mode 100644 index 3d9cf342..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/nokogiri.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -begin - require "nokogiri" -rescue LoadError => e - warn "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install" - raise e -end -require "active_support/core_ext/object/blank" -require "stringio" - -module ActiveSupport - module XmlMini_Nokogiri # :nodoc: - extend self - - # Parse an XML Document string or IO into a simple hash using libxml / nokogiri. - # data:: - # XML Document string or IO to parse - def parse(data) - if !data.respond_to?(:read) - data = StringIO.new(data || "") - end - - if data.eof? - {} - else - doc = Nokogiri::XML(data) - raise doc.errors.first if doc.errors.length > 0 - doc.to_hash - end - end - - module Conversions # :nodoc: - module Document # :nodoc: - def to_hash - root.to_hash - end - end - - module Node # :nodoc: - CONTENT_ROOT = "__content__" - - # Convert XML document to hash. - # - # hash:: - # Hash to merge the converted element into. - def to_hash(hash = {}) - node_hash = {} - - # Insert node hash into parent hash correctly. - case hash[name] - when Array then hash[name] << node_hash - when Hash then hash[name] = [hash[name], node_hash] - when nil then hash[name] = node_hash - end - - # Handle child elements - children.each do |c| - if c.element? - c.to_hash(node_hash) - elsif c.text? || c.cdata? - node_hash[CONTENT_ROOT] ||= +"" - node_hash[CONTENT_ROOT] << c.content - end - end - - # Remove content node if it is blank and there are child tags - if node_hash.length > 1 && node_hash[CONTENT_ROOT].blank? - node_hash.delete(CONTENT_ROOT) - end - - # Handle attributes - attribute_nodes.each { |a| node_hash[a.node_name] = a.value } - - hash - end - end - end - - Nokogiri::XML::Document.include(Conversions::Document) - Nokogiri::XML::Node.include(Conversions::Node) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/nokogirisax.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/nokogirisax.rb deleted file mode 100644 index 9316f92b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/nokogirisax.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -begin - require "nokogiri" -rescue LoadError => e - warn "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install" - raise e -end -require "active_support/core_ext/object/blank" -require "stringio" - -module ActiveSupport - module XmlMini_NokogiriSAX # :nodoc: - extend self - - # Class that will build the hash while the XML document - # is being parsed using SAX events. - class HashBuilder < Nokogiri::XML::SAX::Document - CONTENT_KEY = "__content__" - HASH_SIZE_KEY = "__hash_size__" - - attr_reader :hash - - def current_hash - @hash_stack.last - end - - def start_document - @hash = {} - @hash_stack = [@hash] - end - - def end_document - raise "Parse stack not empty!" if @hash_stack.size > 1 - end - - def error(error_message) - raise error_message - end - - def start_element(name, attrs = []) - new_hash = { CONTENT_KEY => +"" }.merge!(Hash[attrs]) - new_hash[HASH_SIZE_KEY] = new_hash.size + 1 - - case current_hash[name] - when Array then current_hash[name] << new_hash - when Hash then current_hash[name] = [current_hash[name], new_hash] - when nil then current_hash[name] = new_hash - end - - @hash_stack.push(new_hash) - end - - def end_element(name) - if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == "" - current_hash.delete(CONTENT_KEY) - end - @hash_stack.pop - end - - def characters(string) - current_hash[CONTENT_KEY] << string - end - - alias_method :cdata_block, :characters - end - - attr_accessor :document_class - self.document_class = HashBuilder - - def parse(data) - if !data.respond_to?(:read) - data = StringIO.new(data || "") - end - - if data.eof? - {} - else - document = document_class.new - parser = Nokogiri::XML::SAX::Parser.new(document) - parser.parse(data) - document.hash - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/rexml.rb b/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/rexml.rb deleted file mode 100644 index 393749ab..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/activesupport-8.0.2/lib/active_support/xml_mini/rexml.rb +++ /dev/null @@ -1,137 +0,0 @@ -# frozen_string_literal: true - -require "active_support/core_ext/kernel/reporting" -require "active_support/core_ext/object/blank" -require "stringio" - -module ActiveSupport - module XmlMini_REXML # :nodoc: - extend self - - CONTENT_KEY = "__content__" - - # Parse an XML Document string or IO into a simple hash. - # - # Same as XmlSimple::xml_in but doesn't shoot itself in the foot, - # and uses the defaults from Active Support. - # - # data:: - # XML Document string or IO to parse - def parse(data) - if !data.respond_to?(:read) - data = StringIO.new(data || "") - end - - if data.eof? - {} - else - require_rexml unless defined?(REXML::Document) - doc = REXML::Document.new(data) - - if doc.root - merge_element!({}, doc.root, XmlMini.depth) - else - raise REXML::ParseException, - "The document #{doc.to_s.inspect} does not have a valid root" - end - end - end - - private - def require_rexml - silence_warnings { require "rexml/document" } - rescue LoadError => e - warn "You don't have rexml installed in your application. Please add it to your Gemfile and run bundle install" - raise e - end - - # Convert an XML element and merge into the hash - # - # hash:: - # Hash to merge the converted element into. - # element:: - # XML element to merge into hash - def merge_element!(hash, element, depth) - raise REXML::ParseException, "The document is too deep" if depth == 0 - merge!(hash, element.name, collapse(element, depth)) - end - - # Actually converts an XML document element into a data structure. - # - # element:: - # The document element to be collapsed. - def collapse(element, depth) - hash = get_attributes(element) - - if element.has_elements? - element.each_element { |child| merge_element!(hash, child, depth - 1) } - merge_texts!(hash, element) unless empty_content?(element) - hash - else - merge_texts!(hash, element) - end - end - - # Merge all the texts of an element into the hash - # - # hash:: - # Hash to add the converted element to. - # element:: - # XML element whose texts are to me merged into the hash - def merge_texts!(hash, element) - unless element.has_text? - hash - else - # must use value to prevent double-escaping - texts = +"" - element.texts.each { |t| texts << t.value } - merge!(hash, CONTENT_KEY, texts) - end - end - - # Adds a new key/value pair to an existing Hash. If the key to be added - # already exists and the existing value associated with key is not - # an Array, it will be wrapped in an Array. Then the new value is - # appended to that Array. - # - # hash:: - # Hash to add key/value pair to. - # key:: - # Key to be added. - # value:: - # Value to be associated with key. - def merge!(hash, key, value) - if hash.has_key?(key) - if hash[key].instance_of?(Array) - hash[key] << value - else - hash[key] = [hash[key], value] - end - elsif value.instance_of?(Array) - hash[key] = [value] - else - hash[key] = value - end - hash - end - - # Converts the attributes array of an XML element into a hash. - # Returns an empty Hash if node has no attributes. - # - # element:: - # XML element to extract attributes from. - def get_attributes(element) - attributes = {} - element.attributes.each { |n, v| attributes[n] = v } - attributes - end - - # Determines if a document element has text content - # - # element:: - # XML element to be checked. - def empty_content?(element) - element.texts.join.blank? - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/CHANGELOG.md deleted file mode 100644 index bf21002e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Addressable 2.8.7 -- Allow `public_suffix` 6 ([#535]) - -[#535]: https://github.com/sporkmonger/addressable/pull/535 - -# Addressable 2.8.6 -- Memoize regexps for common character classes ([#524]) - -[#524]: https://github.com/sporkmonger/addressable/pull/524 - -# Addressable 2.8.5 -- Fix thread safety issue with encoding tables ([#515]) -- Define URI::NONE as a module to avoid serialization issues ([#509]) -- Fix YAML serialization ([#508]) - -[#508]: https://github.com/sporkmonger/addressable/pull/508 -[#509]: https://github.com/sporkmonger/addressable/pull/509 -[#515]: https://github.com/sporkmonger/addressable/pull/515 - -# Addressable 2.8.4 -- Restore `Addressable::IDNA.unicode_normalize_kc` as a deprecated method ([#504]) - -[#504]: https://github.com/sporkmonger/addressable/pull/504 - -# Addressable 2.8.3 -- Fix template expand level 2 hash support for non-string objects ([#499], [#498]) - -[#499]: https://github.com/sporkmonger/addressable/pull/499 -[#498]: https://github.com/sporkmonger/addressable/pull/498 - -# Addressable 2.8.2 -- Improve cache hits and JIT friendliness ([#486](https://github.com/sporkmonger/addressable/pull/486)) -- Improve code style and test coverage ([#482](https://github.com/sporkmonger/addressable/pull/482)) -- Ensure reset of deferred validation ([#481](https://github.com/sporkmonger/addressable/pull/481)) -- Resolve normalization differences between `IDNA::Native` and `IDNA::Pure` ([#408](https://github.com/sporkmonger/addressable/issues/408), [#492]) -- Remove redundant colon in `Addressable::URI::CharacterClasses::AUTHORITY` regex ([#438](https://github.com/sporkmonger/addressable/pull/438)) (accidentally reverted by [#449] merge but [added back](https://github.com/sporkmonger/addressable/pull/492#discussion_r1105125280) in [#492]) - -[#492]: https://github.com/sporkmonger/addressable/pull/492 - -# Addressable 2.8.1 -- refactor `Addressable::URI.normalize_path` to address linter offenses ([#430](https://github.com/sporkmonger/addressable/pull/430)) -- update gemspec to reflect supported Ruby versions ([#466], [#464], [#463]) -- compatibility w/ public_suffix 5.x ([#466], [#465], [#460]) -- fixes "invalid byte sequence in UTF-8" exception when unencoding URLs containing non UTF-8 characters ([#459](https://github.com/sporkmonger/addressable/pull/459)) -- `Ractor` compatibility ([#449]) -- use the whole string instead of a single line for template match ([#431](https://github.com/sporkmonger/addressable/pull/431)) -- force UTF-8 encoding only if needed ([#341](https://github.com/sporkmonger/addressable/pull/341)) - -[#449]: https://github.com/sporkmonger/addressable/pull/449 -[#460]: https://github.com/sporkmonger/addressable/pull/460 -[#463]: https://github.com/sporkmonger/addressable/pull/463 -[#464]: https://github.com/sporkmonger/addressable/pull/464 -[#465]: https://github.com/sporkmonger/addressable/pull/465 -[#466]: https://github.com/sporkmonger/addressable/pull/466 - -# Addressable 2.8.0 -- fixes ReDoS vulnerability in Addressable::Template#match -- no longer replaces `+` with spaces in queries for non-http(s) schemes -- fixed encoding ipv6 literals -- the `:compacted` flag for `normalized_query` now dedupes parameters -- fix broken `escape_component` alias -- dropping support for Ruby 2.0 and 2.1 -- adding Ruby 3.0 compatibility for development tasks -- drop support for `rack-mount` and remove Addressable::Template#generate -- performance improvements -- switch CI/CD to GitHub Actions - -# Addressable 2.7.0 -- added `:compacted` flag to `normalized_query` -- `heuristic_parse` handles `mailto:` more intuitively -- dropped explicit support for JRuby 9.0.5.0 -- compatibility w/ public_suffix 4.x -- performance improvements - -# Addressable 2.6.0 -- added `tld=` method to allow assignment to the public suffix -- most `heuristic_parse` patterns are now case-insensitive -- `heuristic_parse` handles more `file://` URI variations -- fixes bug in `heuristic_parse` when uri starts with digit -- fixes bug in `request_uri=` with query strings -- fixes template issues with `nil` and `?` operator -- `frozen_string_literal` pragmas added -- minor performance improvements in regexps -- fixes to eliminate warnings - -# Addressable 2.5.2 -- better support for frozen string literals -- fixed bug w/ uppercase characters in scheme -- IDNA errors w/ emoji URLs -- compatibility w/ public_suffix 3.x - -# Addressable 2.5.1 -- allow unicode normalization to be disabled for URI Template expansion -- removed duplicate test - -# Addressable 2.5.0 -- dropping support for Ruby 1.9 -- adding support for Ruby 2.4 preview -- add support for public suffixes and tld; first runtime dependency -- hostname escaping should match RFC; underscores in hostnames no longer escaped -- paths beginning with // and missing an authority are now considered invalid -- validation now also takes place after setting a path -- handle backslashes in authority more like a browser for `heuristic_parse` -- unescaped backslashes in host now raise an `InvalidURIError` -- `merge!`, `join!`, `omit!` and `normalize!` don't disable deferred validation -- `heuristic_parse` now trims whitespace before parsing -- host parts longer than 63 bytes will be ignored and not passed to libidn -- normalized values always encoded as UTF-8 - -# Addressable 2.4.0 -- support for 1.8.x dropped -- double quotes in a host now raises an error -- newlines in host will no longer get unescaped during normalization -- stricter handling of bogus scheme values -- stricter handling of encoded port values -- calling `require 'addressable'` will now load both the URI and Template files -- assigning to the `hostname` component with an `IPAddr` object is now supported -- assigning to the `origin` component is now supported -- fixed minor bug where an exception would be thrown for a missing ACE suffix -- better partial expansion of URI templates - -# Addressable 2.3.8 -- fix warnings -- update dependency gems -- support for 1.8.x officially deprecated - -# Addressable 2.3.7 -- fix scenario in which invalid URIs don't get an exception until inspected -- handle hostnames with two adjacent periods correctly -- upgrade of RSpec - -# Addressable 2.3.6 -- normalization drops empty query string -- better handling in template extract for missing values -- template modifier for `'?'` now treated as optional -- fixed issue where character class parameters were modified -- templates can now be tested for equality -- added `:sorted` option to normalization of query strings -- fixed issue with normalization of hosts given in `'example.com.'` form - -# Addressable 2.3.5 -- added Addressable::URI#empty? method -- Addressable::URI#hostname methods now strip square brackets from IPv6 hosts -- compatibility with Net::HTTP in Ruby 2.0.0 -- Addressable::URI#route_from should always give relative URIs - -# Addressable 2.3.4 -- fixed issue with encoding altering its inputs -- query string normalization now leaves ';' characters alone -- FakeFS is detected before attempting to load unicode tables -- additional testing to ensure frozen objects don't cause problems - -# Addressable 2.3.3 -- fixed issue with converting common primitives during template expansion -- fixed port encoding issue -- removed a few warnings -- normalize should now ignore %2B in query strings -- the IDNA logic should now be handled by libidn in Ruby 1.9 -- no template match should now result in nil instead of an empty MatchData -- added license information to gemspec - -# Addressable 2.3.2 -- added Addressable::URI#default_port method -- fixed issue with Marshalling Unicode data on Windows -- improved heuristic parsing to better handle IPv4 addresses - -# Addressable 2.3.1 -- fixed missing unicode data file - -# Addressable 2.3.0 -- updated Addressable::Template to use RFC 6570, level 4 -- fixed compatibility problems with some versions of Ruby -- moved unicode tables into a data file for performance reasons -- removing support for multiple query value notations - -# Addressable 2.2.8 -- fixed issues with dot segment removal code -- form encoding can now handle multiple values per key -- updated development environment - -# Addressable 2.2.7 -- fixed issues related to Addressable::URI#query_values= -- the Addressable::URI.parse method is now polymorphic - -# Addressable 2.2.6 -- changed the way ambiguous paths are handled -- fixed bug with frozen URIs -- https supported in heuristic parsing - -# Addressable 2.2.5 -- 'parsing' a pre-parsed URI object is now a dup operation -- introduced conditional support for libidn -- fixed normalization issue on ampersands in query strings -- added additional tests around handling of query strings - -# Addressable 2.2.4 -- added origin support from draft-ietf-websec-origin-00 -- resolved issue with attempting to navigate below root -- fixed bug with string splitting in query strings - -# Addressable 2.2.3 -- added :flat_array notation for query strings - -# Addressable 2.2.2 -- fixed issue with percent escaping of '+' character in query strings - -# Addressable 2.2.1 -- added support for application/x-www-form-urlencoded. - -# Addressable 2.2.0 -- added site methods -- improved documentation - -# Addressable 2.1.2 -- added HTTP request URI methods -- better handling of Windows file paths -- validation_deferred boolean replaced with defer_validation block -- normalization of percent-encoded paths should now be correct -- fixed issue with constructing URIs with relative paths -- fixed warnings - -# Addressable 2.1.1 -- more type checking changes -- fixed issue with unicode normalization -- added method to find template defaults -- symbolic keys are now allowed in template mappings -- numeric values and symbolic values are now allowed in template mappings - -# Addressable 2.1.0 -- refactored URI template support out into its own class -- removed extract method due to being useless and unreliable -- removed Addressable::URI.expand_template -- removed Addressable::URI#extract_mapping -- added partial template expansion -- fixed minor bugs in the parse and heuristic_parse methods -- fixed incompatibility with Ruby 1.9.1 -- fixed bottleneck in Addressable::URI#hash and Addressable::URI#to_s -- fixed unicode normalization exception -- updated query_values methods to better handle subscript notation -- worked around issue with freezing URIs -- improved specs - -# Addressable 2.0.2 -- fixed issue with URI template expansion -- fixed issue with percent escaping characters 0-15 - -# Addressable 2.0.1 -- fixed issue with query string assignment -- fixed issue with improperly encoded components - -# Addressable 2.0.0 -- the initialize method now takes an options hash as its only parameter -- added query_values method to URI class -- completely replaced IDNA implementation with pure Ruby -- renamed Addressable::ADDRESSABLE_VERSION to Addressable::VERSION -- completely reworked the Rakefile -- changed the behavior of the port method significantly -- Addressable::URI.encode_segment, Addressable::URI.unencode_segment renamed -- documentation is now in YARD format -- more rigorous type checking -- to_str method implemented, implicit conversion to Strings now allowed -- Addressable::URI#omit method added, Addressable::URI#merge method replaced -- updated URI Template code to match v 03 of the draft spec -- added a bunch of new specifications - -# Addressable 1.0.4 -- switched to using RSpec's pending system for specs that rely on IDN -- fixed issue with creating URIs with paths that are not prefixed with '/' - -# Addressable 1.0.3 -- implemented a hash method - -# Addressable 1.0.2 -- fixed minor bug with the extract_mapping method - -# Addressable 1.0.1 -- fixed minor bug with the extract_mapping method - -# Addressable 1.0.0 -- heuristic parse method added -- parsing is slightly more strict -- replaced to_h with to_hash -- fixed routing methods -- improved specifications -- improved heckle rake task -- no surviving heckle mutations - -# Addressable 0.1.2 -- improved normalization -- fixed bug in joining algorithm -- updated specifications - -# Addressable 0.1.1 -- updated documentation -- added URI Template variable extraction - -# Addressable 0.1.0 -- initial release -- implementation based on RFC 3986, 3987 -- support for IRIs via libidn -- support for the URI Template draft spec diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/Gemfile b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/Gemfile deleted file mode 100644 index 87cf7719..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/Gemfile +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -gemspec - -group :test do - gem 'bigdecimal' if RUBY_VERSION > '2.4' - gem 'rspec', '~> 3.8' - gem 'rspec-its', '~> 1.3' -end - -group :coverage do - gem "coveralls", "> 0.7", require: false, platforms: :mri - gem "simplecov", require: false -end - -group :development do - gem 'launchy', '~> 2.4', '>= 2.4.3' - gem 'redcarpet', :platform => :mri_19 - gem 'yard' -end - -group :test, :development do - gem 'memory_profiler' - gem "rake", ">= 12.3.3" -end - -unless ENV["IDNA_MODE"] == "pure" - gem "idn-ruby", platform: :mri -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/LICENSE.txt b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/LICENSE.txt deleted file mode 100644 index ef51da2b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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/bundle/ruby/3.2.0/gems/addressable-2.8.7/README.md b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/README.md deleted file mode 100644 index 9892f615..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# Addressable - -
-
Homepage
github.com/sporkmonger/addressable
-
Author
Bob Aman
-
Copyright
Copyright © Bob Aman
-
License
Apache 2.0
-
- -[![Gem Version](https://img.shields.io/gem/dt/addressable.svg)][gem] -[![Build Status](https://github.com/sporkmonger/addressable/workflows/CI/badge.svg)][actions] -[![Test Coverage Status](https://img.shields.io/coveralls/sporkmonger/addressable.svg)][coveralls] -[![Documentation Coverage Status](https://inch-ci.org/github/sporkmonger/addressable.svg?branch=master)][inch] - -[gem]: https://rubygems.org/gems/addressable -[actions]: https://github.com/sporkmonger/addressable/actions -[coveralls]: https://coveralls.io/r/sporkmonger/addressable -[inch]: https://inch-ci.org/github/sporkmonger/addressable - -# Description - -Addressable is an alternative implementation to the URI implementation -that is part of Ruby's standard library. It is flexible, offers heuristic -parsing, and additionally provides extensive support for IRIs and URI templates. - -Addressable closely conforms to RFC 3986, RFC 3987, and RFC 6570 (level 4). - -# Reference - -- {Addressable::URI} -- {Addressable::Template} - -# Example usage - -```ruby -require "addressable/uri" - -uri = Addressable::URI.parse("http://example.com/path/to/resource/") -uri.scheme -#=> "http" -uri.host -#=> "example.com" -uri.path -#=> "/path/to/resource/" - -uri = Addressable::URI.parse("http://www.詹姆斯.com/") -uri.normalize -#=> # -``` - - -# URI Templates - -For more details, see [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.txt). - - -```ruby - -require "addressable/template" - -template = Addressable::Template.new("http://example.com/{?query*}") -template.expand({ - "query" => { - 'foo' => 'bar', - 'color' => 'red' - } -}) -#=> # - -template = Addressable::Template.new("http://example.com/{?one,two,three}") -template.partial_expand({"one" => "1", "three" => 3}).pattern -#=> "http://example.com/?one=1{&two}&three=3" - -template = Addressable::Template.new( - "http://{host}{/segments*}/{?one,two,bogus}{#fragment}" -) -uri = Addressable::URI.parse( - "http://example.com/a/b/c/?one=1&two=2#foo" -) -template.extract(uri) -#=> -# { -# "host" => "example.com", -# "segments" => ["a", "b", "c"], -# "one" => "1", -# "two" => "2", -# "fragment" => "foo" -# } -``` - -# Install - -```console -$ gem install addressable -``` - -You may optionally turn on native IDN support by installing libidn and the -idn gem: - -```console -$ sudo apt-get install libidn11-dev # Debian/Ubuntu -$ brew install libidn # OS X -$ gem install idn-ruby -``` - -# Semantic Versioning - -This project uses [Semantic Versioning](https://semver.org/). You can (and should) specify your -dependency using a pessimistic version constraint covering the major and minor -values: - -```ruby -spec.add_dependency 'addressable', '~> 2.7' -``` - -If you need a specific bug fix, you can also specify minimum tiny versions -without preventing updates to the latest minor release: - -```ruby -spec.add_dependency 'addressable', '~> 2.3', '>= 2.3.7' -``` diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/Rakefile b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/Rakefile deleted file mode 100644 index 46fbbd0a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/Rakefile +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'rubygems' -require 'rake' - -require File.join(File.dirname(__FILE__), 'lib', 'addressable', 'version') - -PKG_DISPLAY_NAME = 'Addressable' -PKG_NAME = PKG_DISPLAY_NAME.downcase -PKG_VERSION = Addressable::VERSION::STRING -PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" - -RELEASE_NAME = "REL #{PKG_VERSION}" - -PKG_SUMMARY = "URI Implementation" -PKG_DESCRIPTION = <<-TEXT -Addressable is an alternative implementation to the URI implementation that is -part of Ruby's standard library. It is flexible, offers heuristic parsing, and -additionally provides extensive support for IRIs and URI templates. -TEXT - -PKG_FILES = FileList[ - "data/**/*", - "lib/**/*.rb", - "spec/**/*.rb", - "tasks/**/*.rake", - "addressable.gemspec", - "CHANGELOG.md", - "Gemfile", - "LICENSE.txt", - "README.md", - "Rakefile", -] - -task :default => "spec" - -Dir['tasks/**/*.rake'].each { |rake| load rake } diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/addressable.gemspec b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/addressable.gemspec deleted file mode 100644 index bb1f2fa7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/addressable.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- encoding: utf-8 -*- -# stub: addressable 2.8.7 ruby lib - -Gem::Specification.new do |s| - s.name = "addressable".freeze - s.version = "2.8.7".freeze - - s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= - s.metadata = { "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.8.7" } if s.respond_to? :metadata= - s.require_paths = ["lib".freeze] - s.authors = ["Bob Aman".freeze] - s.date = "2024-06-21" - s.description = "Addressable is an alternative implementation to the URI implementation that is\npart of Ruby's standard library. It is flexible, offers heuristic parsing, and\nadditionally provides extensive support for IRIs and URI templates.\n".freeze - s.email = "bob@sporkmonger.com".freeze - s.extra_rdoc_files = ["README.md".freeze] - s.files = ["CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE.txt".freeze, "README.md".freeze, "Rakefile".freeze, "addressable.gemspec".freeze, "data/unicode.data".freeze, "lib/addressable.rb".freeze, "lib/addressable/idna.rb".freeze, "lib/addressable/idna/native.rb".freeze, "lib/addressable/idna/pure.rb".freeze, "lib/addressable/template.rb".freeze, "lib/addressable/uri.rb".freeze, "lib/addressable/version.rb".freeze, "spec/addressable/idna_spec.rb".freeze, "spec/addressable/net_http_compat_spec.rb".freeze, "spec/addressable/security_spec.rb".freeze, "spec/addressable/template_spec.rb".freeze, "spec/addressable/uri_spec.rb".freeze, "spec/spec_helper.rb".freeze, "tasks/clobber.rake".freeze, "tasks/gem.rake".freeze, "tasks/git.rake".freeze, "tasks/metrics.rake".freeze, "tasks/profile.rake".freeze, "tasks/rspec.rake".freeze, "tasks/yard.rake".freeze] - s.homepage = "https://github.com/sporkmonger/addressable".freeze - s.licenses = ["Apache-2.0".freeze] - s.rdoc_options = ["--main".freeze, "README.md".freeze] - s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze) - s.rubygems_version = "3.5.11".freeze - s.summary = "URI Implementation".freeze - - s.specification_version = 4 - - s.add_runtime_dependency(%q.freeze, [">= 2.0.2".freeze, "< 7.0".freeze]) - s.add_development_dependency(%q.freeze, [">= 1.0".freeze, "< 3.0".freeze]) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/data/unicode.data b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/data/unicode.data deleted file mode 100644 index cdfc2241..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/data/unicode.data and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable.rb deleted file mode 100644 index b4e98b69..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -require 'addressable/uri' -require 'addressable/template' diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna.rb deleted file mode 100644 index 2dbd3934..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -#-- -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -begin - require "addressable/idna/native" -rescue LoadError - # libidn or the idn gem was not available, fall back on a pure-Ruby - # implementation... - require "addressable/idna/pure" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna/native.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna/native.rb deleted file mode 100644 index a718364f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna/native.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -#-- -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -require "idn" - -module Addressable - module IDNA - def self.punycode_encode(value) - IDN::Punycode.encode(value.to_s) - end - - def self.punycode_decode(value) - IDN::Punycode.decode(value.to_s) - end - - class << self - # @deprecated Use {String#unicode_normalize(:nfkc)} instead - def unicode_normalize_kc(value) - value.to_s.unicode_normalize(:nfkc) - end - - extend Gem::Deprecate - deprecate :unicode_normalize_kc, "String#unicode_normalize(:nfkc)", 2023, 4 - end - - def self.to_ascii(value) - value.to_s.split('.', -1).map do |segment| - if segment.size > 0 && segment.size < 64 - IDN::Idna.toASCII(segment, IDN::Idna::ALLOW_UNASSIGNED) - elsif segment.size >= 64 - segment - else - '' - end - end.join('.') - end - - def self.to_unicode(value) - value.to_s.split('.', -1).map do |segment| - if segment.size > 0 && segment.size < 64 - IDN::Idna.toUnicode(segment, IDN::Idna::ALLOW_UNASSIGNED) - elsif segment.size >= 64 - segment - else - '' - end - end.join('.') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna/pure.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna/pure.rb deleted file mode 100644 index 3d6ffbad..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/idna/pure.rb +++ /dev/null @@ -1,505 +0,0 @@ -# frozen_string_literal: true - -#-- -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -module Addressable - module IDNA - # This module is loosely based on idn_actionmailer by Mick Staugaard, - # the unicode library by Yoshida Masato, and the punycode implementation - # by Kazuhiro Nishiyama. Most of the code was copied verbatim, but - # some reformatting was done, and some translation from C was done. - # - # Without their code to work from as a base, we'd all still be relying - # on the presence of libidn. Which nobody ever seems to have installed. - # - # Original sources: - # http://github.com/staugaard/idn_actionmailer - # http://www.yoshidam.net/Ruby.html#unicode - # http://rubyforge.org/frs/?group_id=2550 - - - UNICODE_TABLE = File.expand_path( - File.join(File.dirname(__FILE__), '../../..', 'data/unicode.data') - ) - - ACE_PREFIX = "xn--" - - UTF8_REGEX = /\A(?: - [\x09\x0A\x0D\x20-\x7E] # ASCII - | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte - | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs - | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte - | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates - | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 - | [\xF1-\xF3][\x80-\xBF]{3} # planes 4nil5 - | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 - )*\z/mnx - - UTF8_REGEX_MULTIBYTE = /(?: - [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte - | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs - | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte - | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates - | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 - | [\xF1-\xF3][\x80-\xBF]{3} # planes 4nil5 - | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 - )/mnx - - # :startdoc: - - # Converts from a Unicode internationalized domain name to an ASCII - # domain name as described in RFC 3490. - def self.to_ascii(input) - input = input.to_s unless input.is_a?(String) - input = input.dup.force_encoding(Encoding::UTF_8).unicode_normalize(:nfkc) - if input.respond_to?(:force_encoding) - input.force_encoding(Encoding::ASCII_8BIT) - end - if input =~ UTF8_REGEX && input =~ UTF8_REGEX_MULTIBYTE - parts = unicode_downcase(input).split('.') - parts.map! do |part| - if part.respond_to?(:force_encoding) - part.force_encoding(Encoding::ASCII_8BIT) - end - if part =~ UTF8_REGEX && part =~ UTF8_REGEX_MULTIBYTE - ACE_PREFIX + punycode_encode(part) - else - part - end - end - parts.join('.') - else - input - end - end - - # Converts from an ASCII domain name to a Unicode internationalized - # domain name as described in RFC 3490. - def self.to_unicode(input) - input = input.to_s unless input.is_a?(String) - parts = input.split('.') - parts.map! do |part| - if part =~ /^#{ACE_PREFIX}(.+)/ - begin - punycode_decode(part[/^#{ACE_PREFIX}(.+)/, 1]) - rescue Addressable::IDNA::PunycodeBadInput - # toUnicode is explicitly defined as never-fails by the spec - part - end - else - part - end - end - output = parts.join('.') - if output.respond_to?(:force_encoding) - output.force_encoding(Encoding::UTF_8) - end - output - end - - class << self - # @deprecated Use {String#unicode_normalize(:nfkc)} instead - def unicode_normalize_kc(value) - value.to_s.unicode_normalize(:nfkc) - end - - extend Gem::Deprecate - deprecate :unicode_normalize_kc, "String#unicode_normalize(:nfkc)", 2023, 4 - end - - ## - # Unicode aware downcase method. - # - # @api private - # @param [String] input - # The input string. - # @return [String] The downcased result. - def self.unicode_downcase(input) - input = input.to_s unless input.is_a?(String) - unpacked = input.unpack("U*") - unpacked.map! { |codepoint| lookup_unicode_lowercase(codepoint) } - return unpacked.pack("U*") - end - private_class_method :unicode_downcase - - def self.lookup_unicode_lowercase(codepoint) - codepoint_data = UNICODE_DATA[codepoint] - (codepoint_data ? - (codepoint_data[UNICODE_DATA_LOWERCASE] || codepoint) : - codepoint) - end - private_class_method :lookup_unicode_lowercase - - UNICODE_DATA_COMBINING_CLASS = 0 - UNICODE_DATA_EXCLUSION = 1 - UNICODE_DATA_CANONICAL = 2 - UNICODE_DATA_COMPATIBILITY = 3 - UNICODE_DATA_UPPERCASE = 4 - UNICODE_DATA_LOWERCASE = 5 - UNICODE_DATA_TITLECASE = 6 - - begin - if defined?(FakeFS) - fakefs_state = FakeFS.activated? - FakeFS.deactivate! - end - # This is a sparse Unicode table. Codepoints without entries are - # assumed to have the value: [0, 0, nil, nil, nil, nil, nil] - UNICODE_DATA = File.open(UNICODE_TABLE, "rb") do |file| - Marshal.load(file.read) - end - ensure - if defined?(FakeFS) - FakeFS.activate! if fakefs_state - end - end - - COMPOSITION_TABLE = {} - UNICODE_DATA.each do |codepoint, data| - canonical = data[UNICODE_DATA_CANONICAL] - exclusion = data[UNICODE_DATA_EXCLUSION] - - if canonical && exclusion == 0 - COMPOSITION_TABLE[canonical.unpack("C*")] = codepoint - end - end - - UNICODE_MAX_LENGTH = 256 - ACE_MAX_LENGTH = 256 - - PUNYCODE_BASE = 36 - PUNYCODE_TMIN = 1 - PUNYCODE_TMAX = 26 - PUNYCODE_SKEW = 38 - PUNYCODE_DAMP = 700 - PUNYCODE_INITIAL_BIAS = 72 - PUNYCODE_INITIAL_N = 0x80 - PUNYCODE_DELIMITER = 0x2D - - PUNYCODE_MAXINT = 1 << 64 - - PUNYCODE_PRINT_ASCII = - "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + - "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + - " !\"\#$%&'()*+,-./" + - "0123456789:;<=>?" + - "@ABCDEFGHIJKLMNO" + - "PQRSTUVWXYZ[\\]^_" + - "`abcdefghijklmno" + - "pqrstuvwxyz{|}~\n" - - # Input is invalid. - class PunycodeBadInput < StandardError; end - # Output would exceed the space provided. - class PunycodeBigOutput < StandardError; end - # Input needs wider integers to process. - class PunycodeOverflow < StandardError; end - - def self.punycode_encode(unicode) - unicode = unicode.to_s unless unicode.is_a?(String) - input = unicode.unpack("U*") - output = [0] * (ACE_MAX_LENGTH + 1) - input_length = input.size - output_length = [ACE_MAX_LENGTH] - - # Initialize the state - n = PUNYCODE_INITIAL_N - delta = out = 0 - max_out = output_length[0] - bias = PUNYCODE_INITIAL_BIAS - - # Handle the basic code points: - input_length.times do |j| - if punycode_basic?(input[j]) - if max_out - out < 2 - raise PunycodeBigOutput, - "Output would exceed the space provided." - end - output[out] = input[j] - out += 1 - end - end - - h = b = out - - # h is the number of code points that have been handled, b is the - # number of basic code points, and out is the number of characters - # that have been output. - - if b > 0 - output[out] = PUNYCODE_DELIMITER - out += 1 - end - - # Main encoding loop: - - while h < input_length - # All non-basic code points < n have been - # handled already. Find the next larger one: - - m = PUNYCODE_MAXINT - input_length.times do |j| - m = input[j] if (n...m) === input[j] - end - - # Increase delta enough to advance the decoder's - # state to , but guard against overflow: - - if m - n > (PUNYCODE_MAXINT - delta) / (h + 1) - raise PunycodeOverflow, "Input needs wider integers to process." - end - delta += (m - n) * (h + 1) - n = m - - input_length.times do |j| - # Punycode does not need to check whether input[j] is basic: - if input[j] < n - delta += 1 - if delta == 0 - raise PunycodeOverflow, - "Input needs wider integers to process." - end - end - - if input[j] == n - # Represent delta as a generalized variable-length integer: - - q = delta; k = PUNYCODE_BASE - while true - if out >= max_out - raise PunycodeBigOutput, - "Output would exceed the space provided." - end - t = ( - if k <= bias - PUNYCODE_TMIN - elsif k >= bias + PUNYCODE_TMAX - PUNYCODE_TMAX - else - k - bias - end - ) - break if q < t - output[out] = - punycode_encode_digit(t + (q - t) % (PUNYCODE_BASE - t)) - out += 1 - q = (q - t) / (PUNYCODE_BASE - t) - k += PUNYCODE_BASE - end - - output[out] = punycode_encode_digit(q) - out += 1 - bias = punycode_adapt(delta, h + 1, h == b) - delta = 0 - h += 1 - end - end - - delta += 1 - n += 1 - end - - output_length[0] = out - - outlen = out - outlen.times do |j| - c = output[j] - unless c >= 0 && c <= 127 - raise StandardError, "Invalid output char." - end - unless PUNYCODE_PRINT_ASCII[c] - raise PunycodeBadInput, "Input is invalid." - end - end - - output[0..outlen].map { |x| x.chr }.join("").sub(/\0+\z/, "") - end - private_class_method :punycode_encode - - def self.punycode_decode(punycode) - input = [] - output = [] - - if ACE_MAX_LENGTH * 2 < punycode.size - raise PunycodeBigOutput, "Output would exceed the space provided." - end - punycode.each_byte do |c| - unless c >= 0 && c <= 127 - raise PunycodeBadInput, "Input is invalid." - end - input.push(c) - end - - input_length = input.length - output_length = [UNICODE_MAX_LENGTH] - - # Initialize the state - n = PUNYCODE_INITIAL_N - - out = i = 0 - max_out = output_length[0] - bias = PUNYCODE_INITIAL_BIAS - - # Handle the basic code points: Let b be the number of input code - # points before the last delimiter, or 0 if there is none, then - # copy the first b code points to the output. - - b = 0 - input_length.times do |j| - b = j if punycode_delimiter?(input[j]) - end - if b > max_out - raise PunycodeBigOutput, "Output would exceed the space provided." - end - - b.times do |j| - unless punycode_basic?(input[j]) - raise PunycodeBadInput, "Input is invalid." - end - output[out] = input[j] - out+=1 - end - - # Main decoding loop: Start just after the last delimiter if any - # basic code points were copied; start at the beginning otherwise. - - in_ = b > 0 ? b + 1 : 0 - while in_ < input_length - - # in_ is the index of the next character to be consumed, and - # out is the number of code points in the output array. - - # Decode a generalized variable-length integer into delta, - # which gets added to i. The overflow checking is easier - # if we increase i as we go, then subtract off its starting - # value at the end to obtain delta. - - oldi = i; w = 1; k = PUNYCODE_BASE - while true - if in_ >= input_length - raise PunycodeBadInput, "Input is invalid." - end - digit = punycode_decode_digit(input[in_]) - in_+=1 - if digit >= PUNYCODE_BASE - raise PunycodeBadInput, "Input is invalid." - end - if digit > (PUNYCODE_MAXINT - i) / w - raise PunycodeOverflow, "Input needs wider integers to process." - end - i += digit * w - t = ( - if k <= bias - PUNYCODE_TMIN - elsif k >= bias + PUNYCODE_TMAX - PUNYCODE_TMAX - else - k - bias - end - ) - break if digit < t - if w > PUNYCODE_MAXINT / (PUNYCODE_BASE - t) - raise PunycodeOverflow, "Input needs wider integers to process." - end - w *= PUNYCODE_BASE - t - k += PUNYCODE_BASE - end - - bias = punycode_adapt(i - oldi, out + 1, oldi == 0) - - # I was supposed to wrap around from out + 1 to 0, - # incrementing n each time, so we'll fix that now: - - if i / (out + 1) > PUNYCODE_MAXINT - n - raise PunycodeOverflow, "Input needs wider integers to process." - end - n += i / (out + 1) - i %= out + 1 - - # Insert n at position i of the output: - - # not needed for Punycode: - # raise PUNYCODE_INVALID_INPUT if decode_digit(n) <= base - if out >= max_out - raise PunycodeBigOutput, "Output would exceed the space provided." - end - - #memmove(output + i + 1, output + i, (out - i) * sizeof *output) - output[i + 1, out - i] = output[i, out - i] - output[i] = n - i += 1 - - out += 1 - end - - output_length[0] = out - - output.pack("U*") - end - private_class_method :punycode_decode - - def self.punycode_basic?(codepoint) - codepoint < 0x80 - end - private_class_method :punycode_basic? - - def self.punycode_delimiter?(codepoint) - codepoint == PUNYCODE_DELIMITER - end - private_class_method :punycode_delimiter? - - def self.punycode_encode_digit(d) - d + 22 + 75 * ((d < 26) ? 1 : 0) - end - private_class_method :punycode_encode_digit - - # Returns the numeric value of a basic codepoint - # (for use in representing integers) in the range 0 to - # base - 1, or PUNYCODE_BASE if codepoint does not represent a value. - def self.punycode_decode_digit(codepoint) - if codepoint - 48 < 10 - codepoint - 22 - elsif codepoint - 65 < 26 - codepoint - 65 - elsif codepoint - 97 < 26 - codepoint - 97 - else - PUNYCODE_BASE - end - end - private_class_method :punycode_decode_digit - - # Bias adaptation method - def self.punycode_adapt(delta, numpoints, firsttime) - delta = firsttime ? delta / PUNYCODE_DAMP : delta >> 1 - # delta >> 1 is a faster way of doing delta / 2 - delta += delta / numpoints - difference = PUNYCODE_BASE - PUNYCODE_TMIN - - k = 0 - while delta > (difference * PUNYCODE_TMAX) / 2 - delta /= difference - k += PUNYCODE_BASE - end - - k + (difference + 1) * delta / (delta + PUNYCODE_SKEW) - end - private_class_method :punycode_adapt - end - # :startdoc: -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/template.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/template.rb deleted file mode 100644 index 08556d9e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/template.rb +++ /dev/null @@ -1,1029 +0,0 @@ -# frozen_string_literal: true - -#-- -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -require "addressable/version" -require "addressable/uri" - -module Addressable - ## - # This is an implementation of a URI template based on - # RFC 6570 (http://tools.ietf.org/html/rfc6570). - class Template - # Constants used throughout the template code. - anything = - Addressable::URI::CharacterClasses::RESERVED + - Addressable::URI::CharacterClasses::UNRESERVED - - - variable_char_class = - Addressable::URI::CharacterClasses::ALPHA + - Addressable::URI::CharacterClasses::DIGIT + '_' - - var_char = - "(?>(?:[#{variable_char_class}]|%[a-fA-F0-9][a-fA-F0-9])+)" - RESERVED = - "(?:[#{anything}]|%[a-fA-F0-9][a-fA-F0-9])" - UNRESERVED = - "(?:[#{ - Addressable::URI::CharacterClasses::UNRESERVED - }]|%[a-fA-F0-9][a-fA-F0-9])" - variable = - "(?:#{var_char}(?:\\.?#{var_char})*)" - varspec = - "(?:(#{variable})(\\*|:\\d+)?)" - VARNAME = - /^#{variable}$/ - VARSPEC = - /^#{varspec}$/ - VARIABLE_LIST = - /^#{varspec}(?:,#{varspec})*$/ - operator = - "+#./;?&=,!@|" - EXPRESSION = - /\{([#{operator}])?(#{varspec}(?:,#{varspec})*)\}/ - - - LEADERS = { - '?' => '?', - '/' => '/', - '#' => '#', - '.' => '.', - ';' => ';', - '&' => '&' - } - JOINERS = { - '?' => '&', - '.' => '.', - ';' => ';', - '&' => '&', - '/' => '/' - } - - ## - # Raised if an invalid template value is supplied. - class InvalidTemplateValueError < StandardError - end - - ## - # Raised if an invalid template operator is used in a pattern. - class InvalidTemplateOperatorError < StandardError - end - - ## - # Raised if an invalid template operator is used in a pattern. - class TemplateOperatorAbortedError < StandardError - end - - ## - # This class represents the data that is extracted when a Template - # is matched against a URI. - class MatchData - ## - # Creates a new MatchData object. - # MatchData objects should never be instantiated directly. - # - # @param [Addressable::URI] uri - # The URI that the template was matched against. - def initialize(uri, template, mapping) - @uri = uri.dup.freeze - @template = template - @mapping = mapping.dup.freeze - end - - ## - # @return [Addressable::URI] - # The URI that the Template was matched against. - attr_reader :uri - - ## - # @return [Addressable::Template] - # The Template used for the match. - attr_reader :template - - ## - # @return [Hash] - # The mapping that resulted from the match. - # Note that this mapping does not include keys or values for - # variables that appear in the Template, but are not present - # in the URI. - attr_reader :mapping - - ## - # @return [Array] - # The list of variables that were present in the Template. - # Note that this list will include variables which do not appear - # in the mapping because they were not present in URI. - def variables - self.template.variables - end - alias_method :keys, :variables - alias_method :names, :variables - - ## - # @return [Array] - # The list of values that were captured by the Template. - # Note that this list will include nils for any variables which - # were in the Template, but did not appear in the URI. - def values - @values ||= self.variables.inject([]) do |accu, key| - accu << self.mapping[key] - accu - end - end - alias_method :captures, :values - - ## - # Accesses captured values by name or by index. - # - # @param [String, Symbol, Fixnum] key - # Capture index or name. Note that when accessing by with index - # of 0, the full URI will be returned. The intention is to mimic - # the ::MatchData#[] behavior. - # - # @param [#to_int, nil] len - # If provided, an array of values will be returned with the given - # parameter used as length. - # - # @return [Array, String, nil] - # The captured value corresponding to the index or name. If the - # value was not provided or the key is unknown, nil will be - # returned. - # - # If the second parameter is provided, an array of that length will - # be returned instead. - def [](key, len = nil) - if len - to_a[key, len] - elsif String === key or Symbol === key - mapping[key.to_s] - else - to_a[key] - end - end - - ## - # @return [Array] - # Array with the matched URI as first element followed by the captured - # values. - def to_a - [to_s, *values] - end - - ## - # @return [String] - # The matched URI as String. - def to_s - uri.to_s - end - alias_method :string, :to_s - - # Returns multiple captured values at once. - # - # @param [String, Symbol, Fixnum] *indexes - # Indices of the captures to be returned - # - # @return [Array] - # Values corresponding to given indices. - # - # @see Addressable::Template::MatchData#[] - def values_at(*indexes) - indexes.map { |i| self[i] } - end - - ## - # Returns a String representation of the MatchData's state. - # - # @return [String] The MatchData's state, as a String. - def inspect - sprintf("#<%s:%#0x RESULT:%s>", - self.class.to_s, self.object_id, self.mapping.inspect) - end - - ## - # Dummy method for code expecting a ::MatchData instance - # - # @return [String] An empty string. - def pre_match - "" - end - alias_method :post_match, :pre_match - end - - ## - # Creates a new Addressable::Template object. - # - # @param [#to_str] pattern The URI Template pattern. - # - # @return [Addressable::Template] The initialized Template object. - def initialize(pattern) - if !pattern.respond_to?(:to_str) - raise TypeError, "Can't convert #{pattern.class} into String." - end - @pattern = pattern.to_str.dup.freeze - end - - ## - # Freeze URI, initializing instance variables. - # - # @return [Addressable::URI] The frozen URI object. - def freeze - self.variables - self.variable_defaults - self.named_captures - super - end - - ## - # @return [String] The Template object's pattern. - attr_reader :pattern - - ## - # Returns a String representation of the Template object's state. - # - # @return [String] The Template object's state, as a String. - def inspect - sprintf("#<%s:%#0x PATTERN:%s>", - self.class.to_s, self.object_id, self.pattern) - end - - ## - # Returns true if the Template objects are equal. This method - # does NOT normalize either Template before doing the comparison. - # - # @param [Object] template The Template to compare. - # - # @return [TrueClass, FalseClass] - # true if the Templates are equivalent, false - # otherwise. - def ==(template) - return false unless template.kind_of?(Template) - return self.pattern == template.pattern - end - - ## - # Addressable::Template makes no distinction between `==` and `eql?`. - # - # @see #== - alias_method :eql?, :== - - ## - # Extracts a mapping from the URI using a URI Template pattern. - # - # @param [Addressable::URI, #to_str] uri - # The URI to extract from. - # - # @param [#restore, #match] processor - # A template processor object may optionally be supplied. - # - # The object should respond to either the restore or - # match messages or both. The restore method should - # take two parameters: `[String] name` and `[String] value`. - # The restore method should reverse any transformations that - # have been performed on the value to ensure a valid URI. - # The match method should take a single - # parameter: `[String] name`. The match method should return - # a String containing a regular expression capture group for - # matching on that particular variable. The default value is `".*?"`. - # The match method has no effect on multivariate operator - # expansions. - # - # @return [Hash, NilClass] - # The Hash mapping that was extracted from the URI, or - # nil if the URI didn't match the template. - # - # @example - # class ExampleProcessor - # def self.restore(name, value) - # return value.gsub(/\+/, " ") if name == "query" - # return value - # end - # - # def self.match(name) - # return ".*?" if name == "first" - # return ".*" - # end - # end - # - # uri = Addressable::URI.parse( - # "http://example.com/search/an+example+search+query/" - # ) - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).extract(uri, ExampleProcessor) - # #=> {"query" => "an example search query"} - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # Addressable::Template.new( - # "http://example.com/{first}/{second}/" - # ).extract(uri, ExampleProcessor) - # #=> {"first" => "a", "second" => "b/c"} - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # Addressable::Template.new( - # "http://example.com/{first}/{-list|/|second}/" - # ).extract(uri) - # #=> {"first" => "a", "second" => ["b", "c"]} - def extract(uri, processor=nil) - match_data = self.match(uri, processor) - return (match_data ? match_data.mapping : nil) - end - - ## - # Extracts match data from the URI using a URI Template pattern. - # - # @param [Addressable::URI, #to_str] uri - # The URI to extract from. - # - # @param [#restore, #match] processor - # A template processor object may optionally be supplied. - # - # The object should respond to either the restore or - # match messages or both. The restore method should - # take two parameters: `[String] name` and `[String] value`. - # The restore method should reverse any transformations that - # have been performed on the value to ensure a valid URI. - # The match method should take a single - # parameter: `[String] name`. The match method should return - # a String containing a regular expression capture group for - # matching on that particular variable. The default value is `".*?"`. - # The match method has no effect on multivariate operator - # expansions. - # - # @return [Hash, NilClass] - # The Hash mapping that was extracted from the URI, or - # nil if the URI didn't match the template. - # - # @example - # class ExampleProcessor - # def self.restore(name, value) - # return value.gsub(/\+/, " ") if name == "query" - # return value - # end - # - # def self.match(name) - # return ".*?" if name == "first" - # return ".*" - # end - # end - # - # uri = Addressable::URI.parse( - # "http://example.com/search/an+example+search+query/" - # ) - # match = Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).match(uri, ExampleProcessor) - # match.variables - # #=> ["query"] - # match.captures - # #=> ["an example search query"] - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # match = Addressable::Template.new( - # "http://example.com/{first}/{+second}/" - # ).match(uri, ExampleProcessor) - # match.variables - # #=> ["first", "second"] - # match.captures - # #=> ["a", "b/c"] - # - # uri = Addressable::URI.parse("http://example.com/a/b/c/") - # match = Addressable::Template.new( - # "http://example.com/{first}{/second*}/" - # ).match(uri) - # match.variables - # #=> ["first", "second"] - # match.captures - # #=> ["a", ["b", "c"]] - def match(uri, processor=nil) - uri = Addressable::URI.parse(uri) unless uri.is_a?(Addressable::URI) - mapping = {} - - # First, we need to process the pattern, and extract the values. - expansions, expansion_regexp = - parse_template_pattern(pattern, processor) - - return nil unless uri.to_str.match(expansion_regexp) - unparsed_values = uri.to_str.scan(expansion_regexp).flatten - - if uri.to_str == pattern - return Addressable::Template::MatchData.new(uri, self, mapping) - elsif expansions.size > 0 - index = 0 - expansions.each do |expansion| - _, operator, varlist = *expansion.match(EXPRESSION) - varlist.split(',').each do |varspec| - _, name, modifier = *varspec.match(VARSPEC) - mapping[name] ||= nil - case operator - when nil, '+', '#', '/', '.' - unparsed_value = unparsed_values[index] - name = varspec[VARSPEC, 1] - value = unparsed_value - value = value.split(JOINERS[operator]) if value && modifier == '*' - when ';', '?', '&' - if modifier == '*' - if unparsed_values[index] - value = unparsed_values[index].split(JOINERS[operator]) - value = value.inject({}) do |acc, v| - key, val = v.split('=') - val = "" if val.nil? - acc[key] = val - acc - end - end - else - if (unparsed_values[index]) - name, value = unparsed_values[index].split('=') - value = "" if value.nil? - end - end - end - if processor != nil && processor.respond_to?(:restore) - value = processor.restore(name, value) - end - if processor == nil - if value.is_a?(Hash) - value = value.inject({}){|acc, (k, v)| - acc[Addressable::URI.unencode_component(k)] = - Addressable::URI.unencode_component(v) - acc - } - elsif value.is_a?(Array) - value = value.map{|v| Addressable::URI.unencode_component(v) } - else - value = Addressable::URI.unencode_component(value) - end - end - if !mapping.has_key?(name) || mapping[name].nil? - # Doesn't exist, set to value (even if value is nil) - mapping[name] = value - end - index = index + 1 - end - end - return Addressable::Template::MatchData.new(uri, self, mapping) - else - return nil - end - end - - ## - # Expands a URI template into another URI template. - # - # @param [Hash] mapping The mapping that corresponds to the pattern. - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # @param [Boolean] normalize_values - # Optional flag to enable/disable unicode normalization. Default: true - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError - # exception will be raised if the value is invalid. The transform - # method should return the transformed variable value as a String. - # If a transform method is used, the value will not be percent - # encoded automatically. Unicode normalization will be performed both - # before and after sending the value to the transform method. - # - # @return [Addressable::Template] The partially expanded URI template. - # - # @example - # Addressable::Template.new( - # "http://example.com/{one}/{two}/" - # ).partial_expand({"one" => "1"}).pattern - # #=> "http://example.com/1/{two}/" - # - # Addressable::Template.new( - # "http://example.com/{?one,two}/" - # ).partial_expand({"one" => "1"}).pattern - # #=> "http://example.com/?one=1{&two}/" - # - # Addressable::Template.new( - # "http://example.com/{?one,two,three}/" - # ).partial_expand({"one" => "1", "three" => 3}).pattern - # #=> "http://example.com/?one=1{&two}&three=3" - def partial_expand(mapping, processor=nil, normalize_values=true) - result = self.pattern.dup - mapping = normalize_keys(mapping) - result.gsub!( EXPRESSION ) do |capture| - transform_partial_capture(mapping, capture, processor, normalize_values) - end - return Addressable::Template.new(result) - end - - ## - # Expands a URI template into a full URI. - # - # @param [Hash] mapping The mapping that corresponds to the pattern. - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # @param [Boolean] normalize_values - # Optional flag to enable/disable unicode normalization. Default: true - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError - # exception will be raised if the value is invalid. The transform - # method should return the transformed variable value as a String. - # If a transform method is used, the value will not be percent - # encoded automatically. Unicode normalization will be performed both - # before and after sending the value to the transform method. - # - # @return [Addressable::URI] The expanded URI template. - # - # @example - # class ExampleProcessor - # def self.validate(name, value) - # return !!(value =~ /^[\w ]+$/) if name == "query" - # return true - # end - # - # def self.transform(name, value) - # return value.gsub(/ /, "+") if name == "query" - # return value - # end - # end - # - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).expand( - # {"query" => "an example search query"}, - # ExampleProcessor - # ).to_str - # #=> "http://example.com/search/an+example+search+query/" - # - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).expand( - # {"query" => "an example search query"} - # ).to_str - # #=> "http://example.com/search/an%20example%20search%20query/" - # - # Addressable::Template.new( - # "http://example.com/search/{query}/" - # ).expand( - # {"query" => "bogus!"}, - # ExampleProcessor - # ).to_str - # #=> Addressable::Template::InvalidTemplateValueError - def expand(mapping, processor=nil, normalize_values=true) - result = self.pattern.dup - mapping = normalize_keys(mapping) - result.gsub!( EXPRESSION ) do |capture| - transform_capture(mapping, capture, processor, normalize_values) - end - return Addressable::URI.parse(result) - end - - ## - # Returns an Array of variables used within the template pattern. - # The variables are listed in the Array in the order they appear within - # the pattern. Multiple occurrences of a variable within a pattern are - # not represented in this Array. - # - # @return [Array] The variables present in the template's pattern. - def variables - @variables ||= ordered_variable_defaults.map { |var, val| var }.uniq - end - alias_method :keys, :variables - alias_method :names, :variables - - ## - # Returns a mapping of variables to their default values specified - # in the template. Variables without defaults are not returned. - # - # @return [Hash] Mapping of template variables to their defaults - def variable_defaults - @variable_defaults ||= - Hash[*ordered_variable_defaults.reject { |k, v| v.nil? }.flatten] - end - - ## - # Coerces a template into a `Regexp` object. This regular expression will - # behave very similarly to the actual template, and should match the same - # URI values, but it cannot fully handle, for example, values that would - # extract to an `Array`. - # - # @return [Regexp] A regular expression which should match the template. - def to_regexp - _, source = parse_template_pattern(pattern) - Regexp.new(source) - end - - ## - # Returns the source of the coerced `Regexp`. - # - # @return [String] The source of the `Regexp` given by {#to_regexp}. - # - # @api private - def source - self.to_regexp.source - end - - ## - # Returns the named captures of the coerced `Regexp`. - # - # @return [Hash] The named captures of the `Regexp` given by {#to_regexp}. - # - # @api private - def named_captures - self.to_regexp.named_captures - end - - private - def ordered_variable_defaults - @ordered_variable_defaults ||= begin - expansions, _ = parse_template_pattern(pattern) - expansions.flat_map do |capture| - _, _, varlist = *capture.match(EXPRESSION) - varlist.split(',').map do |varspec| - varspec[VARSPEC, 1] - end - end - end - end - - - ## - # Loops through each capture and expands any values available in mapping - # - # @param [Hash] mapping - # Set of keys to expand - # @param [String] capture - # The expression to expand - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # @param [Boolean] normalize_values - # Optional flag to enable/disable unicode normalization. Default: true - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError exception - # will be raised if the value is invalid. The transform method - # should return the transformed variable value as a String. If a - # transform method is used, the value will not be percent encoded - # automatically. Unicode normalization will be performed both before and - # after sending the value to the transform method. - # - # @return [String] The expanded expression - def transform_partial_capture(mapping, capture, processor = nil, - normalize_values = true) - _, operator, varlist = *capture.match(EXPRESSION) - - vars = varlist.split(",") - - if operator == "?" - # partial expansion of form style query variables sometimes requires a - # slight reordering of the variables to produce a valid url. - first_to_expand = vars.find { |varspec| - _, name, _ = *varspec.match(VARSPEC) - mapping.key?(name) && !mapping[name].nil? - } - - vars = [first_to_expand] + vars.reject {|varspec| varspec == first_to_expand} if first_to_expand - end - - vars. - inject("".dup) do |acc, varspec| - _, name, _ = *varspec.match(VARSPEC) - next_val = if mapping.key? name - transform_capture(mapping, "{#{operator}#{varspec}}", - processor, normalize_values) - else - "{#{operator}#{varspec}}" - end - # If we've already expanded at least one '?' operator with non-empty - # value, change to '&' - operator = "&" if (operator == "?") && (next_val != "") - acc << next_val - end - end - - ## - # Transforms a mapped value so that values can be substituted into the - # template. - # - # @param [Hash] mapping The mapping to replace captures - # @param [String] capture - # The expression to replace - # @param [#validate, #transform] processor - # An optional processor object may be supplied. - # @param [Boolean] normalize_values - # Optional flag to enable/disable unicode normalization. Default: true - # - # - # The object should respond to either the validate or - # transform messages or both. Both the validate and - # transform methods should take two parameters: name and - # value. The validate method should return true - # or false; true if the value of the variable is valid, - # false otherwise. An InvalidTemplateValueError exception - # will be raised if the value is invalid. The transform method - # should return the transformed variable value as a String. If a - # transform method is used, the value will not be percent encoded - # automatically. Unicode normalization will be performed both before and - # after sending the value to the transform method. - # - # @return [String] The expanded expression - def transform_capture(mapping, capture, processor=nil, - normalize_values=true) - _, operator, varlist = *capture.match(EXPRESSION) - return_value = varlist.split(',').inject([]) do |acc, varspec| - _, name, modifier = *varspec.match(VARSPEC) - value = mapping[name] - unless value == nil || value == {} - allow_reserved = %w(+ #).include?(operator) - # Common primitives where the .to_s output is well-defined - if Numeric === value || Symbol === value || - value == true || value == false - value = value.to_s - end - length = modifier.gsub(':', '').to_i if modifier =~ /^:\d+/ - - unless (Hash === value) || - value.respond_to?(:to_ary) || value.respond_to?(:to_str) - raise TypeError, - "Can't convert #{value.class} into String or Array." - end - - value = normalize_value(value) if normalize_values - - if processor == nil || !processor.respond_to?(:transform) - # Handle percent escaping - if allow_reserved - encode_map = - Addressable::URI::CharacterClasses::RESERVED + - Addressable::URI::CharacterClasses::UNRESERVED - else - encode_map = Addressable::URI::CharacterClasses::UNRESERVED - end - if value.kind_of?(Array) - transformed_value = value.map do |val| - if length - Addressable::URI.encode_component(val[0...length], encode_map) - else - Addressable::URI.encode_component(val, encode_map) - end - end - unless modifier == "*" - transformed_value = transformed_value.join(',') - end - elsif value.kind_of?(Hash) - transformed_value = value.map do |key, val| - if modifier == "*" - "#{ - Addressable::URI.encode_component( key, encode_map) - }=#{ - Addressable::URI.encode_component( val, encode_map) - }" - else - "#{ - Addressable::URI.encode_component( key, encode_map) - },#{ - Addressable::URI.encode_component( val, encode_map) - }" - end - end - unless modifier == "*" - transformed_value = transformed_value.join(',') - end - else - if length - transformed_value = Addressable::URI.encode_component( - value[0...length], encode_map) - else - transformed_value = Addressable::URI.encode_component( - value, encode_map) - end - end - end - - # Process, if we've got a processor - if processor != nil - if processor.respond_to?(:validate) - if !processor.validate(name, value) - display_value = value.kind_of?(Array) ? value.inspect : value - raise InvalidTemplateValueError, - "#{name}=#{display_value} is an invalid template value." - end - end - if processor.respond_to?(:transform) - transformed_value = processor.transform(name, value) - if normalize_values - transformed_value = normalize_value(transformed_value) - end - end - end - acc << [name, transformed_value] - end - acc - end - return "" if return_value.empty? - join_values(operator, return_value) - end - - ## - # Takes a set of values, and joins them together based on the - # operator. - # - # @param [String, Nil] operator One of the operators from the set - # (?,&,+,#,;,/,.), or nil if there wasn't one. - # @param [Array] return_value - # The set of return values (as [variable_name, value] tuples) that will - # be joined together. - # - # @return [String] The transformed mapped value - def join_values(operator, return_value) - leader = LEADERS.fetch(operator, '') - joiner = JOINERS.fetch(operator, ',') - case operator - when '&', '?' - leader + return_value.map{|k,v| - if v.is_a?(Array) && v.first =~ /=/ - v.join(joiner) - elsif v.is_a?(Array) - v.map{|inner_value| "#{k}=#{inner_value}"}.join(joiner) - else - "#{k}=#{v}" - end - }.join(joiner) - when ';' - return_value.map{|k,v| - if v.is_a?(Array) && v.first =~ /=/ - ';' + v.join(";") - elsif v.is_a?(Array) - ';' + v.map{|inner_value| "#{k}=#{inner_value}"}.join(";") - else - v && v != '' ? ";#{k}=#{v}" : ";#{k}" - end - }.join - else - leader + return_value.map{|k,v| v}.join(joiner) - end - end - - ## - # Takes a set of values, and joins them together based on the - # operator. - # - # @param [Hash, Array, String] value - # Normalizes unicode keys and values with String#unicode_normalize (NFC) - # - # @return [Hash, Array, String] The normalized values - def normalize_value(value) - # Handle unicode normalization - if value.respond_to?(:to_ary) - value.to_ary.map! { |val| normalize_value(val) } - elsif value.kind_of?(Hash) - value = value.inject({}) { |acc, (k, v)| - acc[normalize_value(k)] = normalize_value(v) - acc - } - else - value = value.to_s if !value.kind_of?(String) - if value.encoding != Encoding::UTF_8 - value = value.dup.force_encoding(Encoding::UTF_8) - end - value = value.unicode_normalize(:nfc) - end - value - end - - ## - # Generates a hash with string keys - # - # @param [Hash] mapping A mapping hash to normalize - # - # @return [Hash] - # A hash with stringified keys - def normalize_keys(mapping) - return mapping.inject({}) do |accu, pair| - name, value = pair - if Symbol === name - name = name.to_s - elsif name.respond_to?(:to_str) - name = name.to_str - else - raise TypeError, - "Can't convert #{name.class} into String." - end - accu[name] = value - accu - end - end - - ## - # Generates the Regexp that parses a template pattern. Memoizes the - # value if template processor not set (processors may not be deterministic) - # - # @param [String] pattern The URI template pattern. - # @param [#match] processor The template processor to use. - # - # @return [Array, Regexp] - # An array of expansion variables nad a regular expression which may be - # used to parse a template pattern - def parse_template_pattern(pattern, processor = nil) - if processor.nil? && pattern == @pattern - @cached_template_parse ||= - parse_new_template_pattern(pattern, processor) - else - parse_new_template_pattern(pattern, processor) - end - end - - ## - # Generates the Regexp that parses a template pattern. - # - # @param [String] pattern The URI template pattern. - # @param [#match] processor The template processor to use. - # - # @return [Array, Regexp] - # An array of expansion variables nad a regular expression which may be - # used to parse a template pattern - def parse_new_template_pattern(pattern, processor = nil) - # Escape the pattern. The two gsubs restore the escaped curly braces - # back to their original form. Basically, escape everything that isn't - # within an expansion. - escaped_pattern = Regexp.escape( - pattern - ).gsub(/\\\{(.*?)\\\}/) do |escaped| - escaped.gsub(/\\(.)/, "\\1") - end - - expansions = [] - - # Create a regular expression that captures the values of the - # variables in the URI. - regexp_string = escaped_pattern.gsub( EXPRESSION ) do |expansion| - - expansions << expansion - _, operator, varlist = *expansion.match(EXPRESSION) - leader = Regexp.escape(LEADERS.fetch(operator, '')) - joiner = Regexp.escape(JOINERS.fetch(operator, ',')) - combined = varlist.split(',').map do |varspec| - _, name, modifier = *varspec.match(VARSPEC) - - result = processor && processor.respond_to?(:match) ? processor.match(name) : nil - if result - "(?<#{name}>#{ result })" - else - group = case operator - when '+' - "#{ RESERVED }*?" - when '#' - "#{ RESERVED }*?" - when '/' - "#{ UNRESERVED }*?" - when '.' - "#{ UNRESERVED.gsub('\.', '') }*?" - when ';' - "#{ UNRESERVED }*=?#{ UNRESERVED }*?" - when '?' - "#{ UNRESERVED }*=#{ UNRESERVED }*?" - when '&' - "#{ UNRESERVED }*=#{ UNRESERVED }*?" - else - "#{ UNRESERVED }*?" - end - if modifier == '*' - "(?<#{name}>#{group}(?:#{joiner}?#{group})*)?" - else - "(?<#{name}>#{group})?" - end - end - end.join("#{joiner}?") - "(?:|#{leader}#{combined})" - end - - # Ensure that the regular expression matches the whole URI. - regexp_string = "\\A#{regexp_string}\\z" - return expansions, Regexp.new(regexp_string) - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/uri.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/uri.rb deleted file mode 100644 index 40b80cf0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/uri.rb +++ /dev/null @@ -1,2602 +0,0 @@ -# frozen_string_literal: true - -#-- -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -require "addressable/version" -require "addressable/idna" -require "public_suffix" - -## -# Addressable is a library for processing links and URIs. -module Addressable - ## - # This is an implementation of a URI parser based on - # RFC 3986, - # RFC 3987. - class URI - ## - # Raised if something other than a uri is supplied. - class InvalidURIError < StandardError - end - - ## - # Container for the character classes specified in - # RFC 3986. - # - # Note: Concatenated and interpolated `String`s are not affected by the - # `frozen_string_literal` directive and must be frozen explicitly. - # - # Interpolated `String`s *were* frozen this way before Ruby 3.0: - # https://bugs.ruby-lang.org/issues/17104 - module CharacterClasses - ALPHA = "a-zA-Z" - DIGIT = "0-9" - GEN_DELIMS = "\\:\\/\\?\\#\\[\\]\\@" - SUB_DELIMS = "\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=" - RESERVED = (GEN_DELIMS + SUB_DELIMS).freeze - UNRESERVED = (ALPHA + DIGIT + "\\-\\.\\_\\~").freeze - RESERVED_AND_UNRESERVED = RESERVED + UNRESERVED - PCHAR = (UNRESERVED + SUB_DELIMS + "\\:\\@").freeze - SCHEME = (ALPHA + DIGIT + "\\-\\+\\.").freeze - HOST = (UNRESERVED + SUB_DELIMS + "\\[\\:\\]").freeze - AUTHORITY = (PCHAR + "\\[\\]").freeze - PATH = (PCHAR + "\\/").freeze - QUERY = (PCHAR + "\\/\\?").freeze - FRAGMENT = (PCHAR + "\\/\\?").freeze - end - - module NormalizeCharacterClasses - HOST = /[^#{CharacterClasses::HOST}]/ - UNRESERVED = /[^#{CharacterClasses::UNRESERVED}]/ - PCHAR = /[^#{CharacterClasses::PCHAR}]/ - SCHEME = /[^#{CharacterClasses::SCHEME}]/ - FRAGMENT = /[^#{CharacterClasses::FRAGMENT}]/ - QUERY = %r{[^a-zA-Z0-9\-\.\_\~\!\$\'\(\)\*\+\,\=\:\@\/\?%]|%(?!2B|2b)} - end - - module CharacterClassesRegexps - AUTHORITY = /[^#{CharacterClasses::AUTHORITY}]/ - FRAGMENT = /[^#{CharacterClasses::FRAGMENT}]/ - HOST = /[^#{CharacterClasses::HOST}]/ - PATH = /[^#{CharacterClasses::PATH}]/ - QUERY = /[^#{CharacterClasses::QUERY}]/ - RESERVED = /[^#{CharacterClasses::RESERVED}]/ - RESERVED_AND_UNRESERVED = /[^#{CharacterClasses::RESERVED_AND_UNRESERVED}]/ - SCHEME = /[^#{CharacterClasses::SCHEME}]/ - UNRESERVED = /[^#{CharacterClasses::UNRESERVED}]/ - end - - SLASH = '/' - EMPTY_STR = '' - - URIREGEX = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/ - - PORT_MAPPING = { - "http" => 80, - "https" => 443, - "ftp" => 21, - "tftp" => 69, - "sftp" => 22, - "ssh" => 22, - "svn+ssh" => 22, - "telnet" => 23, - "nntp" => 119, - "gopher" => 70, - "wais" => 210, - "ldap" => 389, - "prospero" => 1525 - }.freeze - - ## - # Returns a URI object based on the parsed string. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI string to parse. - # No parsing is performed if the object is already an - # Addressable::URI. - # - # @return [Addressable::URI] The parsed URI. - def self.parse(uri) - # If we were given nil, return nil. - return nil unless uri - # If a URI object is passed, just return itself. - return uri.dup if uri.kind_of?(self) - - # If a URI object of the Ruby standard library variety is passed, - # convert it to a string, then parse the string. - # We do the check this way because we don't want to accidentally - # cause a missing constant exception to be thrown. - if uri.class.name =~ /^URI\b/ - uri = uri.to_s - end - - # Otherwise, convert to a String - begin - uri = uri.to_str - rescue TypeError, NoMethodError - raise TypeError, "Can't convert #{uri.class} into String." - end unless uri.is_a?(String) - - # This Regexp supplied as an example in RFC 3986, and it works great. - scan = uri.scan(URIREGEX) - fragments = scan[0] - scheme = fragments[1] - authority = fragments[3] - path = fragments[4] - query = fragments[6] - fragment = fragments[8] - user = nil - password = nil - host = nil - port = nil - if authority != nil - # The Regexp above doesn't split apart the authority. - userinfo = authority[/^([^\[\]]*)@/, 1] - if userinfo != nil - user = userinfo.strip[/^([^:]*):?/, 1] - password = userinfo.strip[/:(.*)$/, 1] - end - - host = authority.sub( - /^([^\[\]]*)@/, EMPTY_STR - ).sub( - /:([^:@\[\]]*?)$/, EMPTY_STR - ) - - port = authority[/:([^:@\[\]]*?)$/, 1] - port = nil if port == EMPTY_STR - end - - return new( - :scheme => scheme, - :user => user, - :password => password, - :host => host, - :port => port, - :path => path, - :query => query, - :fragment => fragment - ) - end - - ## - # Converts an input to a URI. The input does not have to be a valid - # URI — the method will use heuristics to guess what URI was intended. - # This is not standards-compliant, merely user-friendly. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI string to parse. - # No parsing is performed if the object is already an - # Addressable::URI. - # @param [Hash] hints - # A Hash of hints to the heuristic parser. - # Defaults to {:scheme => "http"}. - # - # @return [Addressable::URI] The parsed URI. - def self.heuristic_parse(uri, hints={}) - # If we were given nil, return nil. - return nil unless uri - # If a URI object is passed, just return itself. - return uri.dup if uri.kind_of?(self) - - # If a URI object of the Ruby standard library variety is passed, - # convert it to a string, then parse the string. - # We do the check this way because we don't want to accidentally - # cause a missing constant exception to be thrown. - if uri.class.name =~ /^URI\b/ - uri = uri.to_s - end - - unless uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{uri.class} into String." - end - # Otherwise, convert to a String - uri = uri.to_str.dup.strip - hints = { - :scheme => "http" - }.merge(hints) - case uri - when /^http:\//i - uri.sub!(/^http:\/+/i, "http://") - when /^https:\//i - uri.sub!(/^https:\/+/i, "https://") - when /^feed:\/+http:\//i - uri.sub!(/^feed:\/+http:\/+/i, "feed:http://") - when /^feed:\//i - uri.sub!(/^feed:\/+/i, "feed://") - when %r[^file:/{4}]i - uri.sub!(%r[^file:/+]i, "file:////") - when %r[^file://localhost/]i - uri.sub!(%r[^file://localhost/+]i, "file:///") - when %r[^file:/+]i - uri.sub!(%r[^file:/+]i, "file:///") - when /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ - uri.sub!(/^/, hints[:scheme] + "://") - when /\A\d+\..*:\d+\z/ - uri = "#{hints[:scheme]}://#{uri}" - end - match = uri.match(URIREGEX) - fragments = match.captures - authority = fragments[3] - if authority && authority.length > 0 - new_authority = authority.tr("\\", "/").gsub(" ", "%20") - # NOTE: We want offset 4, not 3! - offset = match.offset(4) - uri = uri.dup - uri[offset[0]...offset[1]] = new_authority - end - parsed = self.parse(uri) - if parsed.scheme =~ /^[^\/?#\.]+\.[^\/?#]+$/ - parsed = self.parse(hints[:scheme] + "://" + uri) - end - if parsed.path.include?(".") - if parsed.path[/\b@\b/] - parsed.scheme = "mailto" unless parsed.scheme - elsif new_host = parsed.path[/^([^\/]+\.[^\/]*)/, 1] - parsed.defer_validation do - new_path = parsed.path.sub( - Regexp.new("^" + Regexp.escape(new_host)), EMPTY_STR) - parsed.host = new_host - parsed.path = new_path - parsed.scheme = hints[:scheme] unless parsed.scheme - end - end - end - return parsed - end - - ## - # Converts a path to a file scheme URI. If the path supplied is - # relative, it will be returned as a relative URI. If the path supplied - # is actually a non-file URI, it will parse the URI as if it had been - # parsed with Addressable::URI.parse. Handles all of the - # various Microsoft-specific formats for specifying paths. - # - # @param [String, Addressable::URI, #to_str] path - # Typically a String path to a file or directory, but - # will return a sensible return value if an absolute URI is supplied - # instead. - # - # @return [Addressable::URI] - # The parsed file scheme URI or the original URI if some other URI - # scheme was provided. - # - # @example - # base = Addressable::URI.convert_path("/absolute/path/") - # uri = Addressable::URI.convert_path("relative/path") - # (base + uri).to_s - # #=> "file:///absolute/path/relative/path" - # - # Addressable::URI.convert_path( - # "c:\\windows\\My Documents 100%20\\foo.txt" - # ).to_s - # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt" - # - # Addressable::URI.convert_path("http://example.com/").to_s - # #=> "http://example.com/" - def self.convert_path(path) - # If we were given nil, return nil. - return nil unless path - # If a URI object is passed, just return itself. - return path if path.kind_of?(self) - unless path.respond_to?(:to_str) - raise TypeError, "Can't convert #{path.class} into String." - end - # Otherwise, convert to a String - path = path.to_str.strip - - path.sub!(/^file:\/?\/?/, EMPTY_STR) if path =~ /^file:\/?\/?/ - path = SLASH + path if path =~ /^([a-zA-Z])[\|:]/ - uri = self.parse(path) - - if uri.scheme == nil - # Adjust windows-style uris - uri.path.sub!(/^\/?([a-zA-Z])[\|:][\\\/]/) do - "/#{$1.downcase}:/" - end - uri.path.tr!("\\", SLASH) - if File.exist?(uri.path) && - File.stat(uri.path).directory? - uri.path.chomp!(SLASH) - uri.path = uri.path + '/' - end - - # If the path is absolute, set the scheme and host. - if uri.path.start_with?(SLASH) - uri.scheme = "file" - uri.host = EMPTY_STR - end - uri.normalize! - end - - return uri - end - - ## - # Joins several URIs together. - # - # @param [String, Addressable::URI, #to_str] *uris - # The URIs to join. - # - # @return [Addressable::URI] The joined URI. - # - # @example - # base = "http://example.com/" - # uri = Addressable::URI.parse("relative/path") - # Addressable::URI.join(base, uri) - # #=> # - def self.join(*uris) - uri_objects = uris.collect do |uri| - unless uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{uri.class} into String." - end - uri.kind_of?(self) ? uri : self.parse(uri.to_str) - end - result = uri_objects.shift.dup - uri_objects.each do |uri| - result.join!(uri) - end - return result - end - - ## - # Tables used to optimize encoding operations in `self.encode_component` - # and `self.normalize_component` - SEQUENCE_ENCODING_TABLE = (0..255).map do |byte| - format("%02x", byte).freeze - end.freeze - - SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = (0..255).map do |byte| - format("%%%02X", byte).freeze - end.freeze - - ## - # Percent encodes a URI component. - # - # @param [String, #to_str] component The URI component to encode. - # - # @param [String, Regexp] character_class - # The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' through - # '9' to be percent encoded. If a Regexp is passed, the - # value /[^b-zB-Z0-9]/ would have the same effect. A set of - # useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # - # @param [Regexp] upcase_encoded - # A string of characters that may already be percent encoded, and whose - # encodings should be upcased. This allows normalization of percent - # encodings for characters not included in the - # character_class. - # - # @return [String] The encoded component. - # - # @example - # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) - # => "simple%2Fex%61mple" - # Addressable::URI.encode_component( - # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - def self.encode_component(component, character_class=CharacterClassesRegexps::RESERVED_AND_UNRESERVED, upcase_encoded='') - return nil if component.nil? - - begin - if component.kind_of?(Symbol) || - component.kind_of?(Numeric) || - component.kind_of?(TrueClass) || - component.kind_of?(FalseClass) - component = component.to_s - else - component = component.to_str - end - rescue TypeError, NoMethodError - raise TypeError, "Can't convert #{component.class} into String." - end if !component.is_a? String - - if ![String, Regexp].include?(character_class.class) - raise TypeError, - "Expected String or Regexp, got #{character_class.inspect}" - end - if character_class.kind_of?(String) - character_class = /[^#{character_class}]/ - end - # We can't perform regexps on invalid UTF sequences, but - # here we need to, so switch to ASCII. - component = component.dup - component.force_encoding(Encoding::ASCII_8BIT) - # Avoiding gsub! because there are edge cases with frozen strings - component = component.gsub(character_class) do |char| - SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE[char.ord] - end - if upcase_encoded.length > 0 - upcase_encoded_chars = upcase_encoded.bytes.map do |byte| - SEQUENCE_ENCODING_TABLE[byte] - end - component = component.gsub(/%(#{upcase_encoded_chars.join('|')})/, - &:upcase) - end - - return component - end - - class << self - alias_method :escape_component, :encode_component - end - - ## - # Unencodes any percent encoded characters within a URI component. - # This method may be used for unencoding either components or full URIs, - # however, it is recommended to use the unencode_component - # alias when unencoding components. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI or component to unencode. - # - # @param [Class] return_type - # The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # - # @param [String] leave_encoded - # A string of characters to leave encoded. If a percent encoded character - # in this list is encountered then it will remain percent encoded. - # - # @return [String, Addressable::URI] - # The unencoded component or URI. - # The return type is determined by the return_type - # parameter. - def self.unencode(uri, return_type=String, leave_encoded='') - return nil if uri.nil? - - begin - uri = uri.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{uri.class} into String." - end if !uri.is_a? String - if ![String, ::Addressable::URI].include?(return_type) - raise TypeError, - "Expected Class (String or Addressable::URI), " + - "got #{return_type.inspect}" - end - - result = uri.gsub(/%[0-9a-f]{2}/i) do |sequence| - c = sequence[1..3].to_i(16).chr - c.force_encoding(sequence.encoding) - leave_encoded.include?(c) ? sequence : c - end - - result.force_encoding(Encoding::UTF_8) - if return_type == String - return result - elsif return_type == ::Addressable::URI - return ::Addressable::URI.parse(result) - end - end - - class << self - alias_method :unescape, :unencode - alias_method :unencode_component, :unencode - alias_method :unescape_component, :unencode - end - - - ## - # Normalizes the encoding of a URI component. - # - # @param [String, #to_str] component The URI component to encode. - # - # @param [String, Regexp] character_class - # The characters which are not percent encoded. If a String - # is passed, the String must be formatted as a regular - # expression character class. (Do not include the surrounding square - # brackets.) For example, "b-zB-Z0-9" would cause - # everything but the letters 'b' through 'z' and the numbers '0' - # through '9' to be percent encoded. If a Regexp is passed, - # the value /[^b-zB-Z0-9]/ would have the same effect. A - # set of useful String values may be found in the - # Addressable::URI::CharacterClasses module. The default - # value is the reserved plus unreserved character classes specified in - # RFC 3986. - # - # @param [String] leave_encoded - # When character_class is a String then - # leave_encoded is a string of characters that should remain - # percent encoded while normalizing the component; if they appear percent - # encoded in the original component, then they will be upcased ("%2f" - # normalized to "%2F") but otherwise left alone. - # - # @return [String] The normalized component. - # - # @example - # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", /[^b-zB-Z]/ - # ) - # => "simple%2Fex%61mple" - # Addressable::URI.normalize_component( - # "simpl%65/%65xampl%65", - # Addressable::URI::CharacterClasses::UNRESERVED - # ) - # => "simple%2Fexample" - # Addressable::URI.normalize_component( - # "one%20two%2fthree%26four", - # "0-9a-zA-Z &/", - # "/" - # ) - # => "one two%2Fthree&four" - def self.normalize_component(component, character_class= - CharacterClassesRegexps::RESERVED_AND_UNRESERVED, - leave_encoded='') - return nil if component.nil? - - begin - component = component.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{component.class} into String." - end if !component.is_a? String - - if ![String, Regexp].include?(character_class.class) - raise TypeError, - "Expected String or Regexp, got #{character_class.inspect}" - end - if character_class.kind_of?(String) - leave_re = if leave_encoded.length > 0 - character_class = "#{character_class}%" unless character_class.include?('%') - - bytes = leave_encoded.bytes - leave_encoded_pattern = bytes.map { |b| SEQUENCE_ENCODING_TABLE[b] }.join('|') - "|%(?!#{leave_encoded_pattern}|#{leave_encoded_pattern.upcase})" - end - - character_class = if leave_re - /[^#{character_class}]#{leave_re}/ - else - /[^#{character_class}]/ - end - end - # We can't perform regexps on invalid UTF sequences, but - # here we need to, so switch to ASCII. - component = component.dup - component.force_encoding(Encoding::ASCII_8BIT) - unencoded = self.unencode_component(component, String, leave_encoded) - begin - encoded = self.encode_component( - unencoded.unicode_normalize(:nfc), - character_class, - leave_encoded - ) - rescue ArgumentError - encoded = self.encode_component(unencoded) - end - encoded.force_encoding(Encoding::UTF_8) - return encoded - end - - ## - # Percent encodes any special characters in the URI. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI to encode. - # - # @param [Class] return_type - # The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # - # @return [String, Addressable::URI] - # The encoded URI. - # The return type is determined by the return_type - # parameter. - def self.encode(uri, return_type=String) - return nil if uri.nil? - - begin - uri = uri.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{uri.class} into String." - end if !uri.is_a? String - - if ![String, ::Addressable::URI].include?(return_type) - raise TypeError, - "Expected Class (String or Addressable::URI), " + - "got #{return_type.inspect}" - end - uri_object = uri.kind_of?(self) ? uri : self.parse(uri) - encoded_uri = Addressable::URI.new( - :scheme => self.encode_component(uri_object.scheme, - Addressable::URI::CharacterClassesRegexps::SCHEME), - :authority => self.encode_component(uri_object.authority, - Addressable::URI::CharacterClassesRegexps::AUTHORITY), - :path => self.encode_component(uri_object.path, - Addressable::URI::CharacterClassesRegexps::PATH), - :query => self.encode_component(uri_object.query, - Addressable::URI::CharacterClassesRegexps::QUERY), - :fragment => self.encode_component(uri_object.fragment, - Addressable::URI::CharacterClassesRegexps::FRAGMENT) - ) - if return_type == String - return encoded_uri.to_s - elsif return_type == ::Addressable::URI - return encoded_uri - end - end - - class << self - alias_method :escape, :encode - end - - ## - # Normalizes the encoding of a URI. Characters within a hostname are - # not percent encoded to allow for internationalized domain names. - # - # @param [String, Addressable::URI, #to_str] uri - # The URI to encode. - # - # @param [Class] return_type - # The type of object to return. - # This value may only be set to String or - # Addressable::URI. All other values are invalid. Defaults - # to String. - # - # @return [String, Addressable::URI] - # The encoded URI. - # The return type is determined by the return_type - # parameter. - def self.normalized_encode(uri, return_type=String) - begin - uri = uri.to_str - rescue NoMethodError, TypeError - raise TypeError, "Can't convert #{uri.class} into String." - end if !uri.is_a? String - - if ![String, ::Addressable::URI].include?(return_type) - raise TypeError, - "Expected Class (String or Addressable::URI), " + - "got #{return_type.inspect}" - end - uri_object = uri.kind_of?(self) ? uri : self.parse(uri) - components = { - :scheme => self.unencode_component(uri_object.scheme), - :user => self.unencode_component(uri_object.user), - :password => self.unencode_component(uri_object.password), - :host => self.unencode_component(uri_object.host), - :port => (uri_object.port.nil? ? nil : uri_object.port.to_s), - :path => self.unencode_component(uri_object.path), - :query => self.unencode_component(uri_object.query), - :fragment => self.unencode_component(uri_object.fragment) - } - components.each do |key, value| - if value != nil - begin - components[key] = value.to_str.unicode_normalize(:nfc) - rescue ArgumentError - # Likely a malformed UTF-8 character, skip unicode normalization - components[key] = value.to_str - end - end - end - encoded_uri = Addressable::URI.new( - :scheme => self.encode_component(components[:scheme], - Addressable::URI::CharacterClassesRegexps::SCHEME), - :user => self.encode_component(components[:user], - Addressable::URI::CharacterClassesRegexps::UNRESERVED), - :password => self.encode_component(components[:password], - Addressable::URI::CharacterClassesRegexps::UNRESERVED), - :host => components[:host], - :port => components[:port], - :path => self.encode_component(components[:path], - Addressable::URI::CharacterClassesRegexps::PATH), - :query => self.encode_component(components[:query], - Addressable::URI::CharacterClassesRegexps::QUERY), - :fragment => self.encode_component(components[:fragment], - Addressable::URI::CharacterClassesRegexps::FRAGMENT) - ) - if return_type == String - return encoded_uri.to_s - elsif return_type == ::Addressable::URI - return encoded_uri - end - end - - ## - # Encodes a set of key/value pairs according to the rules for the - # application/x-www-form-urlencoded MIME type. - # - # @param [#to_hash, #to_ary] form_values - # The form values to encode. - # - # @param [TrueClass, FalseClass] sort - # Sort the key/value pairs prior to encoding. - # Defaults to false. - # - # @return [String] - # The encoded value. - def self.form_encode(form_values, sort=false) - if form_values.respond_to?(:to_hash) - form_values = form_values.to_hash.to_a - elsif form_values.respond_to?(:to_ary) - form_values = form_values.to_ary - else - raise TypeError, "Can't convert #{form_values.class} into Array." - end - - form_values = form_values.inject([]) do |accu, (key, value)| - if value.kind_of?(Array) - value.each do |v| - accu << [key.to_s, v.to_s] - end - else - accu << [key.to_s, value.to_s] - end - accu - end - - if sort - # Useful for OAuth and optimizing caching systems - form_values = form_values.sort - end - escaped_form_values = form_values.map do |(key, value)| - # Line breaks are CRLF pairs - [ - self.encode_component( - key.gsub(/(\r\n|\n|\r)/, "\r\n"), - CharacterClassesRegexps::UNRESERVED - ).gsub("%20", "+"), - self.encode_component( - value.gsub(/(\r\n|\n|\r)/, "\r\n"), - CharacterClassesRegexps::UNRESERVED - ).gsub("%20", "+") - ] - end - return escaped_form_values.map do |(key, value)| - "#{key}=#{value}" - end.join("&") - end - - ## - # Decodes a String according to the rules for the - # application/x-www-form-urlencoded MIME type. - # - # @param [String, #to_str] encoded_value - # The form values to decode. - # - # @return [Array] - # The decoded values. - # This is not a Hash because of the possibility for - # duplicate keys. - def self.form_unencode(encoded_value) - if !encoded_value.respond_to?(:to_str) - raise TypeError, "Can't convert #{encoded_value.class} into String." - end - encoded_value = encoded_value.to_str - split_values = encoded_value.split("&").map do |pair| - pair.split("=", 2) - end - return split_values.map do |(key, value)| - [ - key ? self.unencode_component( - key.gsub("+", "%20")).gsub(/(\r\n|\n|\r)/, "\n") : nil, - value ? (self.unencode_component( - value.gsub("+", "%20")).gsub(/(\r\n|\n|\r)/, "\n")) : nil - ] - end - end - - ## - # Creates a new uri object from component parts. - # - # @option [String, #to_str] scheme The scheme component. - # @option [String, #to_str] user The user component. - # @option [String, #to_str] password The password component. - # @option [String, #to_str] userinfo - # The userinfo component. If this is supplied, the user and password - # components must be omitted. - # @option [String, #to_str] host The host component. - # @option [String, #to_str] port The port component. - # @option [String, #to_str] authority - # The authority component. If this is supplied, the user, password, - # userinfo, host, and port components must be omitted. - # @option [String, #to_str] path The path component. - # @option [String, #to_str] query The query component. - # @option [String, #to_str] fragment The fragment component. - # - # @return [Addressable::URI] The constructed URI object. - def initialize(options={}) - if options.has_key?(:authority) - if (options.keys & [:userinfo, :user, :password, :host, :port]).any? - raise ArgumentError, - "Cannot specify both an authority and any of the components " + - "within the authority." - end - end - if options.has_key?(:userinfo) - if (options.keys & [:user, :password]).any? - raise ArgumentError, - "Cannot specify both a userinfo and either the user or password." - end - end - - reset_ivs - - defer_validation do - # Bunch of crazy logic required because of the composite components - # like userinfo and authority. - self.scheme = options[:scheme] if options[:scheme] - self.user = options[:user] if options[:user] - self.password = options[:password] if options[:password] - self.userinfo = options[:userinfo] if options[:userinfo] - self.host = options[:host] if options[:host] - self.port = options[:port] if options[:port] - self.authority = options[:authority] if options[:authority] - self.path = options[:path] if options[:path] - self.query = options[:query] if options[:query] - self.query_values = options[:query_values] if options[:query_values] - self.fragment = options[:fragment] if options[:fragment] - end - - to_s # force path validation - end - - ## - # Freeze URI, initializing instance variables. - # - # @return [Addressable::URI] The frozen URI object. - def freeze - self.normalized_scheme - self.normalized_user - self.normalized_password - self.normalized_userinfo - self.normalized_host - self.normalized_port - self.normalized_authority - self.normalized_site - self.normalized_path - self.normalized_query - self.normalized_fragment - self.hash - super - end - - ## - # The scheme component for this URI. - # - # @return [String] The scheme component. - attr_reader :scheme - - ## - # The scheme component for this URI, normalized. - # - # @return [String] The scheme component, normalized. - def normalized_scheme - return nil unless self.scheme - if @normalized_scheme == NONE - @normalized_scheme = if self.scheme =~ /^\s*ssh\+svn\s*$/i - "svn+ssh".dup - else - Addressable::URI.normalize_component( - self.scheme.strip.downcase, - Addressable::URI::NormalizeCharacterClasses::SCHEME - ) - end - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_scheme) - @normalized_scheme - end - - ## - # Sets the scheme component for this URI. - # - # @param [String, #to_str] new_scheme The new scheme component. - def scheme=(new_scheme) - if new_scheme && !new_scheme.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_scheme.class} into String." - elsif new_scheme - new_scheme = new_scheme.to_str - end - if new_scheme && new_scheme !~ /\A[a-z][a-z0-9\.\+\-]*\z/i - raise InvalidURIError, "Invalid scheme format: '#{new_scheme}'" - end - @scheme = new_scheme - @scheme = nil if @scheme.to_s.strip.empty? - - # Reset dependent values - @normalized_scheme = NONE - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The user component for this URI. - # - # @return [String] The user component. - attr_reader :user - - ## - # The user component for this URI, normalized. - # - # @return [String] The user component, normalized. - def normalized_user - return nil unless self.user - return @normalized_user unless @normalized_user == NONE - @normalized_user = begin - if normalized_scheme =~ /https?/ && self.user.strip.empty? && - (!self.password || self.password.strip.empty?) - nil - else - Addressable::URI.normalize_component( - self.user.strip, - Addressable::URI::NormalizeCharacterClasses::UNRESERVED - ) - end - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_user) - @normalized_user - end - - ## - # Sets the user component for this URI. - # - # @param [String, #to_str] new_user The new user component. - def user=(new_user) - if new_user && !new_user.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_user.class} into String." - end - @user = new_user ? new_user.to_str : nil - - # You can't have a nil user with a non-nil password - if password != nil - @user = EMPTY_STR unless user - end - - # Reset dependent values - @userinfo = nil - @normalized_userinfo = NONE - @authority = nil - @normalized_user = NONE - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The password component for this URI. - # - # @return [String] The password component. - attr_reader :password - - ## - # The password component for this URI, normalized. - # - # @return [String] The password component, normalized. - def normalized_password - return nil unless self.password - return @normalized_password unless @normalized_password == NONE - @normalized_password = begin - if self.normalized_scheme =~ /https?/ && self.password.strip.empty? && - (!self.user || self.user.strip.empty?) - nil - else - Addressable::URI.normalize_component( - self.password.strip, - Addressable::URI::NormalizeCharacterClasses::UNRESERVED - ) - end - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_password) - @normalized_password - end - - ## - # Sets the password component for this URI. - # - # @param [String, #to_str] new_password The new password component. - def password=(new_password) - if new_password && !new_password.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_password.class} into String." - end - @password = new_password ? new_password.to_str : nil - - # You can't have a nil user with a non-nil password - if @password != nil - self.user = EMPTY_STR if user.nil? - end - - # Reset dependent values - @userinfo = nil - @normalized_userinfo = NONE - @authority = nil - @normalized_password = NONE - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The userinfo component for this URI. - # Combines the user and password components. - # - # @return [String] The userinfo component. - def userinfo - current_user = self.user - current_password = self.password - (current_user || current_password) && @userinfo ||= begin - if current_user && current_password - "#{current_user}:#{current_password}" - elsif current_user && !current_password - "#{current_user}" - end - end - end - - ## - # The userinfo component for this URI, normalized. - # - # @return [String] The userinfo component, normalized. - def normalized_userinfo - return nil unless self.userinfo - return @normalized_userinfo unless @normalized_userinfo == NONE - @normalized_userinfo = begin - current_user = self.normalized_user - current_password = self.normalized_password - if !current_user && !current_password - nil - elsif current_user && current_password - "#{current_user}:#{current_password}".dup - elsif current_user && !current_password - "#{current_user}".dup - end - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_userinfo) - @normalized_userinfo - end - - ## - # Sets the userinfo component for this URI. - # - # @param [String, #to_str] new_userinfo The new userinfo component. - def userinfo=(new_userinfo) - if new_userinfo && !new_userinfo.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_userinfo.class} into String." - end - new_user, new_password = if new_userinfo - [ - new_userinfo.to_str.strip[/^(.*):/, 1], - new_userinfo.to_str.strip[/:(.*)$/, 1] - ] - else - [nil, nil] - end - - # Password assigned first to ensure validity in case of nil - self.password = new_password - self.user = new_user - - # Reset dependent values - @authority = nil - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The host component for this URI. - # - # @return [String] The host component. - attr_reader :host - - ## - # The host component for this URI, normalized. - # - # @return [String] The host component, normalized. - def normalized_host - return nil unless self.host - - @normalized_host ||= begin - if !self.host.strip.empty? - result = ::Addressable::IDNA.to_ascii( - URI.unencode_component(self.host.strip.downcase) - ) - if result =~ /[^\.]\.$/ - # Single trailing dots are unnecessary. - result = result[0...-1] - end - result = Addressable::URI.normalize_component( - result, - NormalizeCharacterClasses::HOST - ) - result - else - EMPTY_STR.dup - end - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_host) - @normalized_host - end - - ## - # Sets the host component for this URI. - # - # @param [String, #to_str] new_host The new host component. - def host=(new_host) - if new_host && !new_host.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_host.class} into String." - end - @host = new_host ? new_host.to_str : nil - - # Reset dependent values - @authority = nil - @normalized_host = nil - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # This method is same as URI::Generic#host except - # brackets for IPv6 (and 'IPvFuture') addresses are removed. - # - # @see Addressable::URI#host - # - # @return [String] The hostname for this URI. - def hostname - v = self.host - /\A\[(.*)\]\z/ =~ v ? $1 : v - end - - ## - # This method is same as URI::Generic#host= except - # the argument can be a bare IPv6 address (or 'IPvFuture'). - # - # @see Addressable::URI#host= - # - # @param [String, #to_str] new_hostname The new hostname for this URI. - def hostname=(new_hostname) - if new_hostname && - (new_hostname.respond_to?(:ipv4?) || new_hostname.respond_to?(:ipv6?)) - new_hostname = new_hostname.to_s - elsif new_hostname && !new_hostname.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_hostname.class} into String." - end - v = new_hostname ? new_hostname.to_str : nil - v = "[#{v}]" if /\A\[.*\]\z/ !~ v && /:/ =~ v - self.host = v - end - - ## - # Returns the top-level domain for this host. - # - # @example - # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" - def tld - PublicSuffix.parse(self.host, ignore_private: true).tld - end - - ## - # Sets the top-level domain for this URI. - # - # @param [String, #to_str] new_tld The new top-level domain. - def tld=(new_tld) - replaced_tld = host.sub(/#{tld}\z/, new_tld) - self.host = PublicSuffix::Domain.new(replaced_tld).to_s - end - - ## - # Returns the public suffix domain for this host. - # - # @example - # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" - def domain - PublicSuffix.domain(self.host, ignore_private: true) - end - - ## - # The authority component for this URI. - # Combines the user, password, host, and port components. - # - # @return [String] The authority component. - def authority - self.host && @authority ||= begin - authority = String.new - if self.userinfo != nil - authority << "#{self.userinfo}@" - end - authority << self.host - if self.port != nil - authority << ":#{self.port}" - end - authority - end - end - - ## - # The authority component for this URI, normalized. - # - # @return [String] The authority component, normalized. - def normalized_authority - return nil unless self.authority - @normalized_authority ||= begin - authority = String.new - if self.normalized_userinfo != nil - authority << "#{self.normalized_userinfo}@" - end - authority << self.normalized_host - if self.normalized_port != nil - authority << ":#{self.normalized_port}" - end - authority - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_authority) - @normalized_authority - end - - ## - # Sets the authority component for this URI. - # - # @param [String, #to_str] new_authority The new authority component. - def authority=(new_authority) - if new_authority - if !new_authority.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_authority.class} into String." - end - new_authority = new_authority.to_str - new_userinfo = new_authority[/^([^\[\]]*)@/, 1] - if new_userinfo - new_user = new_userinfo.strip[/^([^:]*):?/, 1] - new_password = new_userinfo.strip[/:(.*)$/, 1] - end - new_host = new_authority.sub( - /^([^\[\]]*)@/, EMPTY_STR - ).sub( - /:([^:@\[\]]*?)$/, EMPTY_STR - ) - new_port = - new_authority[/:([^:@\[\]]*?)$/, 1] - end - - # Password assigned first to ensure validity in case of nil - self.password = new_password - self.user = new_user - self.host = new_host - self.port = new_port - - # Reset dependent values - @userinfo = nil - @normalized_userinfo = NONE - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The origin for this URI, serialized to ASCII, as per - # RFC 6454, section 6.2. - # - # @return [String] The serialized origin. - def origin - if self.scheme && self.authority - if self.normalized_port - "#{self.normalized_scheme}://#{self.normalized_host}" + - ":#{self.normalized_port}" - else - "#{self.normalized_scheme}://#{self.normalized_host}" - end - else - "null" - end - end - - ## - # Sets the origin for this URI, serialized to ASCII, as per - # RFC 6454, section 6.2. This assignment will reset the `userinfo` - # component. - # - # @param [String, #to_str] new_origin The new origin component. - def origin=(new_origin) - if new_origin - if !new_origin.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_origin.class} into String." - end - new_origin = new_origin.to_str - new_scheme = new_origin[/^([^:\/?#]+):\/\//, 1] - unless new_scheme - raise InvalidURIError, 'An origin cannot omit the scheme.' - end - new_host = new_origin[/:\/\/([^\/?#:]+)/, 1] - unless new_host - raise InvalidURIError, 'An origin cannot omit the host.' - end - new_port = new_origin[/:([^:@\[\]\/]*?)$/, 1] - end - - self.scheme = new_scheme - self.host = new_host - self.port = new_port - self.userinfo = nil - - # Reset dependent values - @userinfo = nil - @normalized_userinfo = NONE - @authority = nil - @normalized_authority = nil - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - # Returns an array of known ip-based schemes. These schemes typically - # use a similar URI form: - # //:@:/ - def self.ip_based_schemes - return self.port_mapping.keys - end - - # Returns a hash of common IP-based schemes and their default port - # numbers. Adding new schemes to this hash, as necessary, will allow - # for better URI normalization. - def self.port_mapping - PORT_MAPPING - end - - ## - # The port component for this URI. - # This is the port number actually given in the URI. This does not - # infer port numbers from default values. - # - # @return [Integer] The port component. - attr_reader :port - - ## - # The port component for this URI, normalized. - # - # @return [Integer] The port component, normalized. - def normalized_port - return nil unless self.port - return @normalized_port unless @normalized_port == NONE - @normalized_port = begin - if URI.port_mapping[self.normalized_scheme] == self.port - nil - else - self.port - end - end - end - - ## - # Sets the port component for this URI. - # - # @param [String, Integer, #to_s] new_port The new port component. - def port=(new_port) - if new_port != nil && new_port.respond_to?(:to_str) - new_port = Addressable::URI.unencode_component(new_port.to_str) - end - - if new_port.respond_to?(:valid_encoding?) && !new_port.valid_encoding? - raise InvalidURIError, "Invalid encoding in port" - end - - if new_port != nil && !(new_port.to_s =~ /^\d+$/) - raise InvalidURIError, - "Invalid port number: #{new_port.inspect}" - end - - @port = new_port.to_s.to_i - @port = nil if @port == 0 - - # Reset dependent values - @authority = nil - @normalized_port = NONE - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The inferred port component for this URI. - # This method will normalize to the default port for the URI's scheme if - # the port isn't explicitly specified in the URI. - # - # @return [Integer] The inferred port component. - def inferred_port - if self.port.to_i == 0 - self.default_port - else - self.port.to_i - end - end - - ## - # The default port for this URI's scheme. - # This method will always returns the default port for the URI's scheme - # regardless of the presence of an explicit port in the URI. - # - # @return [Integer] The default port. - def default_port - URI.port_mapping[self.scheme.strip.downcase] if self.scheme - end - - ## - # The combination of components that represent a site. - # Combines the scheme, user, password, host, and port components. - # Primarily useful for HTTP and HTTPS. - # - # For example, "http://example.com/path?query" would have a - # site value of "http://example.com". - # - # @return [String] The components that identify a site. - def site - (self.scheme || self.authority) && @site ||= begin - site_string = "".dup - site_string << "#{self.scheme}:" if self.scheme != nil - site_string << "//#{self.authority}" if self.authority != nil - site_string - end - end - - ## - # The normalized combination of components that represent a site. - # Combines the scheme, user, password, host, and port components. - # Primarily useful for HTTP and HTTPS. - # - # For example, "http://example.com/path?query" would have a - # site value of "http://example.com". - # - # @return [String] The normalized components that identify a site. - def normalized_site - return nil unless self.site - @normalized_site ||= begin - site_string = "".dup - if self.normalized_scheme != nil - site_string << "#{self.normalized_scheme}:" - end - if self.normalized_authority != nil - site_string << "//#{self.normalized_authority}" - end - site_string - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_site) - @normalized_site - end - - ## - # Sets the site value for this URI. - # - # @param [String, #to_str] new_site The new site value. - def site=(new_site) - if new_site - if !new_site.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_site.class} into String." - end - new_site = new_site.to_str - # These two regular expressions derived from the primary parsing - # expression - self.scheme = new_site[/^(?:([^:\/?#]+):)?(?:\/\/(?:[^\/?#]*))?$/, 1] - self.authority = new_site[ - /^(?:(?:[^:\/?#]+):)?(?:\/\/([^\/?#]*))?$/, 1 - ] - else - self.scheme = nil - self.authority = nil - end - end - - ## - # The path component for this URI. - # - # @return [String] The path component. - attr_reader :path - - NORMPATH = /^(?!\/)[^\/:]*:.*$/ - ## - # The path component for this URI, normalized. - # - # @return [String] The path component, normalized. - def normalized_path - @normalized_path ||= begin - path = self.path.to_s - if self.scheme == nil && path =~ NORMPATH - # Relative paths with colons in the first segment are ambiguous. - path = path.sub(":", "%2F") - end - # String#split(delimiter, -1) uses the more strict splitting behavior - # found by default in Python. - result = path.strip.split(SLASH, -1).map do |segment| - Addressable::URI.normalize_component( - segment, - Addressable::URI::NormalizeCharacterClasses::PCHAR - ) - end.join(SLASH) - - result = URI.normalize_path(result) - if result.empty? && - ["http", "https", "ftp", "tftp"].include?(self.normalized_scheme) - result = SLASH.dup - end - result - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_path) - @normalized_path - end - - ## - # Sets the path component for this URI. - # - # @param [String, #to_str] new_path The new path component. - def path=(new_path) - if new_path && !new_path.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_path.class} into String." - end - @path = (new_path || EMPTY_STR).to_str - if !@path.empty? && @path[0..0] != SLASH && host != nil - @path = "/#{@path}" - end - - # Reset dependent values - @normalized_path = nil - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # The basename, if any, of the file in the path component. - # - # @return [String] The path's basename. - def basename - # Path cannot be nil - return File.basename(self.path).sub(/;[^\/]*$/, EMPTY_STR) - end - - ## - # The extname, if any, of the file in the path component. - # Empty string if there is no extension. - # - # @return [String] The path's extname. - def extname - return nil unless self.path - return File.extname(self.basename) - end - - ## - # The query component for this URI. - # - # @return [String] The query component. - attr_reader :query - - ## - # The query component for this URI, normalized. - # - # @return [String] The query component, normalized. - def normalized_query(*flags) - return nil unless self.query - return @normalized_query unless @normalized_query == NONE - @normalized_query = begin - modified_query_class = Addressable::URI::CharacterClasses::QUERY.dup - # Make sure possible key-value pair delimiters are escaped. - modified_query_class.sub!("\\&", "").sub!("\\;", "") - pairs = (query || "").split("&", -1) - pairs.delete_if(&:empty?).uniq! if flags.include?(:compacted) - pairs.sort! if flags.include?(:sorted) - component = pairs.map do |pair| - Addressable::URI.normalize_component( - pair, - Addressable::URI::NormalizeCharacterClasses::QUERY, - "+" - ) - end.join("&") - component == "" ? nil : component - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_query) - @normalized_query - end - - ## - # Sets the query component for this URI. - # - # @param [String, #to_str] new_query The new query component. - def query=(new_query) - if new_query && !new_query.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_query.class} into String." - end - @query = new_query ? new_query.to_str : nil - - # Reset dependent values - @normalized_query = NONE - remove_composite_values - end - - ## - # Converts the query component to a Hash value. - # - # @param [Class] return_type The return type desired. Value must be either - # `Hash` or `Array`. - # - # @return [Hash, Array, nil] The query string parsed as a Hash or Array - # or nil if the query string is blank. - # - # @example - # Addressable::URI.parse("?one=1&two=2&three=3").query_values - # #=> {"one" => "1", "two" => "2", "three" => "3"} - # Addressable::URI.parse("?one=two&one=three").query_values(Array) - # #=> [["one", "two"], ["one", "three"]] - # Addressable::URI.parse("?one=two&one=three").query_values(Hash) - # #=> {"one" => "three"} - # Addressable::URI.parse("?").query_values - # #=> {} - # Addressable::URI.parse("").query_values - # #=> nil - def query_values(return_type=Hash) - empty_accumulator = Array == return_type ? [] : {} - if return_type != Hash && return_type != Array - raise ArgumentError, "Invalid return type. Must be Hash or Array." - end - return nil if self.query == nil - split_query = self.query.split("&").map do |pair| - pair.split("=", 2) if pair && !pair.empty? - end.compact - return split_query.inject(empty_accumulator.dup) do |accu, pair| - # I'd rather use key/value identifiers instead of array lookups, - # but in this case I really want to maintain the exact pair structure, - # so it's best to make all changes in-place. - pair[0] = URI.unencode_component(pair[0]) - if pair[1].respond_to?(:to_str) - value = pair[1].to_str - # I loathe the fact that I have to do this. Stupid HTML 4.01. - # Treating '+' as a space was just an unbelievably bad idea. - # There was nothing wrong with '%20'! - # If it ain't broke, don't fix it! - value = value.tr("+", " ") if ["http", "https", nil].include?(scheme) - pair[1] = URI.unencode_component(value) - end - if return_type == Hash - accu[pair[0]] = pair[1] - else - accu << pair - end - accu - end - end - - ## - # Sets the query component for this URI from a Hash object. - # An empty Hash or Array will result in an empty query string. - # - # @param [Hash, #to_hash, Array] new_query_values The new query values. - # - # @example - # uri.query_values = {:a => "a", :b => ["c", "d", "e"]} - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']] - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]] - # uri.query - # # => "a=a&b=c&b=d&b=e" - # uri.query_values = [['flag'], ['key', 'value']] - # uri.query - # # => "flag&key=value" - def query_values=(new_query_values) - if new_query_values == nil - self.query = nil - return nil - end - - if !new_query_values.is_a?(Array) - if !new_query_values.respond_to?(:to_hash) - raise TypeError, - "Can't convert #{new_query_values.class} into Hash." - end - new_query_values = new_query_values.to_hash - new_query_values = new_query_values.map do |key, value| - key = key.to_s if key.kind_of?(Symbol) - [key, value] - end - # Useful default for OAuth and caching. - # Only to be used for non-Array inputs. Arrays should preserve order. - new_query_values.sort! - end - - # new_query_values have form [['key1', 'value1'], ['key2', 'value2']] - buffer = "".dup - new_query_values.each do |key, value| - encoded_key = URI.encode_component( - key, CharacterClassesRegexps::UNRESERVED - ) - if value == nil - buffer << "#{encoded_key}&" - elsif value.kind_of?(Array) - value.each do |sub_value| - encoded_value = URI.encode_component( - sub_value, CharacterClassesRegexps::UNRESERVED - ) - buffer << "#{encoded_key}=#{encoded_value}&" - end - else - encoded_value = URI.encode_component( - value, CharacterClassesRegexps::UNRESERVED - ) - buffer << "#{encoded_key}=#{encoded_value}&" - end - end - self.query = buffer.chop - end - - ## - # The HTTP request URI for this URI. This is the path and the - # query string. - # - # @return [String] The request URI required for an HTTP request. - def request_uri - return nil if self.absolute? && self.scheme !~ /^https?$/i - return ( - (!self.path.empty? ? self.path : SLASH) + - (self.query ? "?#{self.query}" : EMPTY_STR) - ) - end - - ## - # Sets the HTTP request URI for this URI. - # - # @param [String, #to_str] new_request_uri The new HTTP request URI. - def request_uri=(new_request_uri) - if !new_request_uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_request_uri.class} into String." - end - if self.absolute? && self.scheme !~ /^https?$/i - raise InvalidURIError, - "Cannot set an HTTP request URI for a non-HTTP URI." - end - new_request_uri = new_request_uri.to_str - path_component = new_request_uri[/^([^\?]*)\??(?:.*)$/, 1] - query_component = new_request_uri[/^(?:[^\?]*)\?(.*)$/, 1] - path_component = path_component.to_s - path_component = (!path_component.empty? ? path_component : SLASH) - self.path = path_component - self.query = query_component - - # Reset dependent values - remove_composite_values - end - - ## - # The fragment component for this URI. - # - # @return [String] The fragment component. - attr_reader :fragment - - ## - # The fragment component for this URI, normalized. - # - # @return [String] The fragment component, normalized. - def normalized_fragment - return nil unless self.fragment - return @normalized_fragment unless @normalized_fragment == NONE - @normalized_fragment = begin - component = Addressable::URI.normalize_component( - self.fragment, - Addressable::URI::NormalizeCharacterClasses::FRAGMENT - ) - component == "" ? nil : component - end - # All normalized values should be UTF-8 - force_utf8_encoding_if_needed(@normalized_fragment) - @normalized_fragment - end - - ## - # Sets the fragment component for this URI. - # - # @param [String, #to_str] new_fragment The new fragment component. - def fragment=(new_fragment) - if new_fragment && !new_fragment.respond_to?(:to_str) - raise TypeError, "Can't convert #{new_fragment.class} into String." - end - @fragment = new_fragment ? new_fragment.to_str : nil - - # Reset dependent values - @normalized_fragment = NONE - remove_composite_values - - # Ensure we haven't created an invalid URI - validate() - end - - ## - # Determines if the scheme indicates an IP-based protocol. - # - # @return [TrueClass, FalseClass] - # true if the scheme indicates an IP-based protocol. - # false otherwise. - def ip_based? - if self.scheme - return URI.ip_based_schemes.include?( - self.scheme.strip.downcase) - end - return false - end - - ## - # Determines if the URI is relative. - # - # @return [TrueClass, FalseClass] - # true if the URI is relative. false - # otherwise. - def relative? - return self.scheme.nil? - end - - ## - # Determines if the URI is absolute. - # - # @return [TrueClass, FalseClass] - # true if the URI is absolute. false - # otherwise. - def absolute? - return !relative? - end - - ## - # Joins two URIs together. - # - # @param [String, Addressable::URI, #to_str] The URI to join with. - # - # @return [Addressable::URI] The joined URI. - def join(uri) - if !uri.respond_to?(:to_str) - raise TypeError, "Can't convert #{uri.class} into String." - end - if !uri.kind_of?(URI) - # Otherwise, convert to a String, then parse. - uri = URI.parse(uri.to_str) - end - if uri.to_s.empty? - return self.dup - end - - joined_scheme = nil - joined_user = nil - joined_password = nil - joined_host = nil - joined_port = nil - joined_path = nil - joined_query = nil - joined_fragment = nil - - # Section 5.2.2 of RFC 3986 - if uri.scheme != nil - joined_scheme = uri.scheme - joined_user = uri.user - joined_password = uri.password - joined_host = uri.host - joined_port = uri.port - joined_path = URI.normalize_path(uri.path) - joined_query = uri.query - else - if uri.authority != nil - joined_user = uri.user - joined_password = uri.password - joined_host = uri.host - joined_port = uri.port - joined_path = URI.normalize_path(uri.path) - joined_query = uri.query - else - if uri.path == nil || uri.path.empty? - joined_path = self.path - if uri.query != nil - joined_query = uri.query - else - joined_query = self.query - end - else - if uri.path[0..0] == SLASH - joined_path = URI.normalize_path(uri.path) - else - base_path = self.path.dup - base_path = EMPTY_STR if base_path == nil - base_path = URI.normalize_path(base_path) - - # Section 5.2.3 of RFC 3986 - # - # Removes the right-most path segment from the base path. - if base_path.include?(SLASH) - base_path.sub!(/\/[^\/]+$/, SLASH) - else - base_path = EMPTY_STR - end - - # If the base path is empty and an authority segment has been - # defined, use a base path of SLASH - if base_path.empty? && self.authority != nil - base_path = SLASH - end - - joined_path = URI.normalize_path(base_path + uri.path) - end - joined_query = uri.query - end - joined_user = self.user - joined_password = self.password - joined_host = self.host - joined_port = self.port - end - joined_scheme = self.scheme - end - joined_fragment = uri.fragment - - return self.class.new( - :scheme => joined_scheme, - :user => joined_user, - :password => joined_password, - :host => joined_host, - :port => joined_port, - :path => joined_path, - :query => joined_query, - :fragment => joined_fragment - ) - end - alias_method :+, :join - - ## - # Destructive form of join. - # - # @param [String, Addressable::URI, #to_str] The URI to join with. - # - # @return [Addressable::URI] The joined URI. - # - # @see Addressable::URI#join - def join!(uri) - replace_self(self.join(uri)) - end - - ## - # Merges a URI with a Hash of components. - # This method has different behavior from join. Any - # components present in the hash parameter will override the - # original components. The path component is not treated specially. - # - # @param [Hash, Addressable::URI, #to_hash] The components to merge with. - # - # @return [Addressable::URI] The merged URI. - # - # @see Hash#merge - def merge(hash) - unless hash.respond_to?(:to_hash) - raise TypeError, "Can't convert #{hash.class} into Hash." - end - hash = hash.to_hash - - if hash.has_key?(:authority) - if (hash.keys & [:userinfo, :user, :password, :host, :port]).any? - raise ArgumentError, - "Cannot specify both an authority and any of the components " + - "within the authority." - end - end - if hash.has_key?(:userinfo) - if (hash.keys & [:user, :password]).any? - raise ArgumentError, - "Cannot specify both a userinfo and either the user or password." - end - end - - uri = self.class.new - uri.defer_validation do - # Bunch of crazy logic required because of the composite components - # like userinfo and authority. - uri.scheme = - hash.has_key?(:scheme) ? hash[:scheme] : self.scheme - if hash.has_key?(:authority) - uri.authority = - hash.has_key?(:authority) ? hash[:authority] : self.authority - end - if hash.has_key?(:userinfo) - uri.userinfo = - hash.has_key?(:userinfo) ? hash[:userinfo] : self.userinfo - end - if !hash.has_key?(:userinfo) && !hash.has_key?(:authority) - uri.user = - hash.has_key?(:user) ? hash[:user] : self.user - uri.password = - hash.has_key?(:password) ? hash[:password] : self.password - end - if !hash.has_key?(:authority) - uri.host = - hash.has_key?(:host) ? hash[:host] : self.host - uri.port = - hash.has_key?(:port) ? hash[:port] : self.port - end - uri.path = - hash.has_key?(:path) ? hash[:path] : self.path - uri.query = - hash.has_key?(:query) ? hash[:query] : self.query - uri.fragment = - hash.has_key?(:fragment) ? hash[:fragment] : self.fragment - end - - return uri - end - - ## - # Destructive form of merge. - # - # @param [Hash, Addressable::URI, #to_hash] The components to merge with. - # - # @return [Addressable::URI] The merged URI. - # - # @see Addressable::URI#merge - def merge!(uri) - replace_self(self.merge(uri)) - end - - ## - # Returns the shortest normalized relative form of this URI that uses the - # supplied URI as a base for resolution. Returns an absolute URI if - # necessary. This is effectively the opposite of route_to. - # - # @param [String, Addressable::URI, #to_str] uri The URI to route from. - # - # @return [Addressable::URI] - # The normalized relative URI that is equivalent to the original URI. - def route_from(uri) - uri = URI.parse(uri).normalize - normalized_self = self.normalize - if normalized_self.relative? - raise ArgumentError, "Expected absolute URI, got: #{self.to_s}" - end - if uri.relative? - raise ArgumentError, "Expected absolute URI, got: #{uri.to_s}" - end - if normalized_self == uri - return Addressable::URI.parse("##{normalized_self.fragment}") - end - components = normalized_self.to_hash - if normalized_self.scheme == uri.scheme - components[:scheme] = nil - if normalized_self.authority == uri.authority - components[:user] = nil - components[:password] = nil - components[:host] = nil - components[:port] = nil - if normalized_self.path == uri.path - components[:path] = nil - if normalized_self.query == uri.query - components[:query] = nil - end - else - if uri.path != SLASH and components[:path] - self_splitted_path = split_path(components[:path]) - uri_splitted_path = split_path(uri.path) - self_dir = self_splitted_path.shift - uri_dir = uri_splitted_path.shift - while !self_splitted_path.empty? && !uri_splitted_path.empty? and self_dir == uri_dir - self_dir = self_splitted_path.shift - uri_dir = uri_splitted_path.shift - end - components[:path] = (uri_splitted_path.fill('..') + [self_dir] + self_splitted_path).join(SLASH) - end - end - end - end - # Avoid network-path references. - if components[:host] != nil - components[:scheme] = normalized_self.scheme - end - return Addressable::URI.new( - :scheme => components[:scheme], - :user => components[:user], - :password => components[:password], - :host => components[:host], - :port => components[:port], - :path => components[:path], - :query => components[:query], - :fragment => components[:fragment] - ) - end - - ## - # Returns the shortest normalized relative form of the supplied URI that - # uses this URI as a base for resolution. Returns an absolute URI if - # necessary. This is effectively the opposite of route_from. - # - # @param [String, Addressable::URI, #to_str] uri The URI to route to. - # - # @return [Addressable::URI] - # The normalized relative URI that is equivalent to the supplied URI. - def route_to(uri) - return URI.parse(uri).route_from(self) - end - - ## - # Returns a normalized URI object. - # - # NOTE: This method does not attempt to fully conform to specifications. - # It exists largely to correct other people's failures to read the - # specifications, and also to deal with caching issues since several - # different URIs may represent the same resource and should not be - # cached multiple times. - # - # @return [Addressable::URI] The normalized URI. - def normalize - # This is a special exception for the frequently misused feed - # URI scheme. - if normalized_scheme == "feed" - if self.to_s =~ /^feed:\/*http:\/*/ - return URI.parse( - self.to_s[/^feed:\/*(http:\/*.*)/, 1] - ).normalize - end - end - - return self.class.new( - :scheme => normalized_scheme, - :authority => normalized_authority, - :path => normalized_path, - :query => normalized_query, - :fragment => normalized_fragment - ) - end - - ## - # Destructively normalizes this URI object. - # - # @return [Addressable::URI] The normalized URI. - # - # @see Addressable::URI#normalize - def normalize! - replace_self(self.normalize) - end - - ## - # Creates a URI suitable for display to users. If semantic attacks are - # likely, the application should try to detect these and warn the user. - # See RFC 3986, - # section 7.6 for more information. - # - # @return [Addressable::URI] A URI suitable for display purposes. - def display_uri - display_uri = self.normalize - display_uri.host = ::Addressable::IDNA.to_unicode(display_uri.host) - return display_uri - end - - ## - # Returns true if the URI objects are equal. This method - # normalizes both URIs before doing the comparison, and allows comparison - # against Strings. - # - # @param [Object] uri The URI to compare. - # - # @return [TrueClass, FalseClass] - # true if the URIs are equivalent, false - # otherwise. - def ===(uri) - if uri.respond_to?(:normalize) - uri_string = uri.normalize.to_s - else - begin - uri_string = ::Addressable::URI.parse(uri).normalize.to_s - rescue InvalidURIError, TypeError - return false - end - end - return self.normalize.to_s == uri_string - end - - ## - # Returns true if the URI objects are equal. This method - # normalizes both URIs before doing the comparison. - # - # @param [Object] uri The URI to compare. - # - # @return [TrueClass, FalseClass] - # true if the URIs are equivalent, false - # otherwise. - def ==(uri) - return false unless uri.kind_of?(URI) - return self.normalize.to_s == uri.normalize.to_s - end - - ## - # Returns true if the URI objects are equal. This method - # does NOT normalize either URI before doing the comparison. - # - # @param [Object] uri The URI to compare. - # - # @return [TrueClass, FalseClass] - # true if the URIs are equivalent, false - # otherwise. - def eql?(uri) - return false unless uri.kind_of?(URI) - return self.to_s == uri.to_s - end - - ## - # A hash value that will make a URI equivalent to its normalized - # form. - # - # @return [Integer] A hash of the URI. - def hash - @hash ||= self.to_s.hash * -1 - end - - ## - # Clones the URI object. - # - # @return [Addressable::URI] The cloned URI. - def dup - duplicated_uri = self.class.new( - :scheme => self.scheme ? self.scheme.dup : nil, - :user => self.user ? self.user.dup : nil, - :password => self.password ? self.password.dup : nil, - :host => self.host ? self.host.dup : nil, - :port => self.port, - :path => self.path ? self.path.dup : nil, - :query => self.query ? self.query.dup : nil, - :fragment => self.fragment ? self.fragment.dup : nil - ) - return duplicated_uri - end - - ## - # Omits components from a URI. - # - # @param [Symbol] *components The components to be omitted. - # - # @return [Addressable::URI] The URI with components omitted. - # - # @example - # uri = Addressable::URI.parse("http://example.com/path?query") - # #=> # - # uri.omit(:scheme, :authority) - # #=> # - def omit(*components) - invalid_components = components - [ - :scheme, :user, :password, :userinfo, :host, :port, :authority, - :path, :query, :fragment - ] - unless invalid_components.empty? - raise ArgumentError, - "Invalid component names: #{invalid_components.inspect}." - end - duplicated_uri = self.dup - duplicated_uri.defer_validation do - components.each do |component| - duplicated_uri.send((component.to_s + "=").to_sym, nil) - end - duplicated_uri.user = duplicated_uri.normalized_user - end - duplicated_uri - end - - ## - # Destructive form of omit. - # - # @param [Symbol] *components The components to be omitted. - # - # @return [Addressable::URI] The URI with components omitted. - # - # @see Addressable::URI#omit - def omit!(*components) - replace_self(self.omit(*components)) - end - - ## - # Determines if the URI is an empty string. - # - # @return [TrueClass, FalseClass] - # Returns true if empty, false otherwise. - def empty? - return self.to_s.empty? - end - - ## - # Converts the URI to a String. - # - # @return [String] The URI's String representation. - def to_s - if self.scheme == nil && self.path != nil && !self.path.empty? && - self.path =~ NORMPATH - raise InvalidURIError, - "Cannot assemble URI string with ambiguous path: '#{self.path}'" - end - @uri_string ||= begin - uri_string = String.new - uri_string << "#{self.scheme}:" if self.scheme != nil - uri_string << "//#{self.authority}" if self.authority != nil - uri_string << self.path.to_s - uri_string << "?#{self.query}" if self.query != nil - uri_string << "##{self.fragment}" if self.fragment != nil - uri_string.force_encoding(Encoding::UTF_8) - uri_string - end - end - - ## - # URI's are glorified Strings. Allow implicit conversion. - alias_method :to_str, :to_s - - ## - # Returns a Hash of the URI components. - # - # @return [Hash] The URI as a Hash of components. - def to_hash - return { - :scheme => self.scheme, - :user => self.user, - :password => self.password, - :host => self.host, - :port => self.port, - :path => self.path, - :query => self.query, - :fragment => self.fragment - } - end - - ## - # Returns a String representation of the URI object's state. - # - # @return [String] The URI object's state, as a String. - def inspect - sprintf("#<%s:%#0x URI:%s>", URI.to_s, self.object_id, self.to_s) - end - - ## - # This method allows you to make several changes to a URI simultaneously, - # which separately would cause validation errors, but in conjunction, - # are valid. The URI will be revalidated as soon as the entire block has - # been executed. - # - # @param [Proc] block - # A set of operations to perform on a given URI. - def defer_validation - raise LocalJumpError, "No block given." unless block_given? - @validation_deferred = true - yield - @validation_deferred = false - validate - ensure - @validation_deferred = false - end - - def encode_with(coder) - instance_variables.each do |ivar| - value = instance_variable_get(ivar) - if value != NONE - key = ivar.to_s.slice(1..-1) - coder[key] = value - end - end - nil - end - - def init_with(coder) - reset_ivs - coder.map.each do |key, value| - instance_variable_set("@#{key}", value) - end - nil - end - - protected - SELF_REF = '.' - PARENT = '..' - - RULE_2A = /\/\.\/|\/\.$/ - RULE_2B_2C = /\/([^\/]*)\/\.\.\/|\/([^\/]*)\/\.\.$/ - RULE_2D = /^\.\.?\/?/ - RULE_PREFIXED_PARENT = /^\/\.\.?\/|^(\/\.\.?)+\/?$/ - - ## - # Resolves paths to their simplest form. - # - # @param [String] path The path to normalize. - # - # @return [String] The normalized path. - def self.normalize_path(path) - # Section 5.2.4 of RFC 3986 - - return if path.nil? - normalized_path = path.dup - loop do - mod ||= normalized_path.gsub!(RULE_2A, SLASH) - - pair = normalized_path.match(RULE_2B_2C) - if pair - parent = pair[1] - current = pair[2] - else - parent = nil - current = nil - end - - regexp = "/#{Regexp.escape(parent.to_s)}/\\.\\./|" - regexp += "(/#{Regexp.escape(current.to_s)}/\\.\\.$)" - - if pair && ((parent != SELF_REF && parent != PARENT) || - (current != SELF_REF && current != PARENT)) - mod ||= normalized_path.gsub!(Regexp.new(regexp), SLASH) - end - - mod ||= normalized_path.gsub!(RULE_2D, EMPTY_STR) - # Non-standard, removes prefixed dotted segments from path. - mod ||= normalized_path.gsub!(RULE_PREFIXED_PARENT, SLASH) - break if mod.nil? - end - - normalized_path - end - - ## - # Ensures that the URI is valid. - def validate - return if !!@validation_deferred - if self.scheme != nil && self.ip_based? && - (self.host == nil || self.host.empty?) && - (self.path == nil || self.path.empty?) - raise InvalidURIError, - "Absolute URI missing hierarchical segment: '#{self.to_s}'" - end - if self.host == nil - if self.port != nil || - self.user != nil || - self.password != nil - raise InvalidURIError, "Hostname not supplied: '#{self.to_s}'" - end - end - if self.path != nil && !self.path.empty? && self.path[0..0] != SLASH && - self.authority != nil - raise InvalidURIError, - "Cannot have a relative path with an authority set: '#{self.to_s}'" - end - if self.path != nil && !self.path.empty? && - self.path[0..1] == SLASH + SLASH && self.authority == nil - raise InvalidURIError, - "Cannot have a path with two leading slashes " + - "without an authority set: '#{self.to_s}'" - end - unreserved = CharacterClasses::UNRESERVED - sub_delims = CharacterClasses::SUB_DELIMS - if !self.host.nil? && (self.host =~ /[<>{}\/\\\?\#\@"[[:space:]]]/ || - (self.host[/^\[(.*)\]$/, 1] != nil && self.host[/^\[(.*)\]$/, 1] !~ - Regexp.new("^[#{unreserved}#{sub_delims}:]*$"))) - raise InvalidURIError, "Invalid character in host: '#{self.host.to_s}'" - end - return nil - end - - ## - # Replaces the internal state of self with the specified URI's state. - # Used in destructive operations to avoid massive code repetition. - # - # @param [Addressable::URI] uri The URI to replace self with. - # - # @return [Addressable::URI] self. - def replace_self(uri) - # Reset dependent values - reset_ivs - - @scheme = uri.scheme - @user = uri.user - @password = uri.password - @host = uri.host - @port = uri.port - @path = uri.path - @query = uri.query - @fragment = uri.fragment - return self - end - - ## - # Splits path string with "/" (slash). - # It is considered that there is empty string after last slash when - # path ends with slash. - # - # @param [String] path The path to split. - # - # @return [Array] An array of parts of path. - def split_path(path) - splitted = path.split(SLASH) - splitted << EMPTY_STR if path.end_with? SLASH - splitted - end - - ## - # Resets composite values for the entire URI - # - # @api private - def remove_composite_values - @uri_string = nil - @hash = nil - end - - ## - # Converts the string to be UTF-8 if it is not already UTF-8 - # - # @api private - def force_utf8_encoding_if_needed(str) - if str && str.encoding != Encoding::UTF_8 - str.force_encoding(Encoding::UTF_8) - end - end - - private - - ## - # Resets instance variables - # - # @api private - def reset_ivs - @scheme = nil - @user = nil - @normalized_scheme = NONE - @normalized_user = NONE - @uri_string = nil - @hash = nil - @userinfo = nil - @normalized_userinfo = NONE - @authority = nil - @password = nil - @normalized_authority = nil - @port = nil - @normalized_password = NONE - @host = nil - @normalized_host = nil - @normalized_port = NONE - @path = EMPTY_STR - @normalized_path = nil - @normalized_query = NONE - @fragment = nil - @normalized_fragment = NONE - @query = nil - end - - NONE = Module.new.freeze - - private_constant :NONE - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/version.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/version.rb deleted file mode 100644 index 2eec3e65..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/lib/addressable/version.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -#-- -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#++ - - -# Used to prevent the class/module from being loaded more than once -if !defined?(Addressable::VERSION) - module Addressable - module VERSION - MAJOR = 2 - MINOR = 8 - TINY = 7 - - STRING = [MAJOR, MINOR, TINY].join('.') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/idna_spec.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/idna_spec.rb deleted file mode 100644 index 428c9ec8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/idna_spec.rb +++ /dev/null @@ -1,302 +0,0 @@ -# frozen_string_literal: true - -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -# Have to use RubyGems to load the idn gem. -require "rubygems" - -require "addressable/idna" - -shared_examples_for "converting from unicode to ASCII" do - it "should convert 'www.google.com' correctly" do - expect(Addressable::IDNA.to_ascii("www.google.com")).to eq("www.google.com") - end - - long = 'AcinusFallumTrompetumNullunCreditumVisumEstAtCuadLongumEtCefallum.com' - it "should convert '#{long}' correctly" do - expect(Addressable::IDNA.to_ascii(long)).to eq(long) - end - - it "should convert 'www.詹姆斯.com' correctly" do - expect(Addressable::IDNA.to_ascii( - "www.詹姆斯.com" - )).to eq("www.xn--8ws00zhy3a.com") - end - - it "also accepts unicode strings encoded as ascii-8bit" do - expect(Addressable::IDNA.to_ascii( - "www.詹姆斯.com".b - )).to eq("www.xn--8ws00zhy3a.com") - end - - it "should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly" do - "www.Iñtërnâtiônàlizætiøn.com" - expect(Addressable::IDNA.to_ascii( - "www.I\xC3\xB1t\xC3\xABrn\xC3\xA2ti\xC3\xB4" + - "n\xC3\xA0liz\xC3\xA6ti\xC3\xB8n.com" - )).to eq("www.xn--itrntinliztin-vdb0a5exd8ewcye.com") - end - - it "should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly" do - expect(Addressable::IDNA.to_ascii( - "www.In\xCC\x83te\xCC\x88rna\xCC\x82tio\xCC\x82n" + - "a\xCC\x80liz\xC3\xA6ti\xC3\xB8n.com" - )).to eq("www.xn--itrntinliztin-vdb0a5exd8ewcye.com") - end - - it "should convert " + - "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " + - "correctly" do - expect(Addressable::IDNA.to_ascii( - "www.\343\201\273\343\202\223\343\201\250\343\201\206\343\201\253\343" + - "\201\252\343\201\214\343\201\204\343\202\217\343\201\221\343\201\256" + - "\343\202\217\343\201\213\343\202\211\343\201\252\343\201\204\343\201" + - "\251\343\202\201\343\201\204\343\202\223\343\202\201\343\201\204\343" + - "\201\256\343\202\211\343\201\271\343\202\213\343\201\276\343\201\240" + - "\343\201\252\343\201\214\343\201\217\343\201\227\343\201\252\343\201" + - "\204\343\201\250\343\201\237\343\202\212\343\201\252\343\201\204." + - "w3.mag.keio.ac.jp" - )).to eq( - "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" + - "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - ) - end - - it "should convert " + - "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " + - "correctly" do - expect(Addressable::IDNA.to_ascii( - "www.\343\201\273\343\202\223\343\201\250\343\201\206\343\201\253\343" + - "\201\252\343\201\213\343\202\231\343\201\204\343\202\217\343\201\221" + - "\343\201\256\343\202\217\343\201\213\343\202\211\343\201\252\343\201" + - "\204\343\201\250\343\202\231\343\202\201\343\201\204\343\202\223\343" + - "\202\201\343\201\204\343\201\256\343\202\211\343\201\270\343\202\231" + - "\343\202\213\343\201\276\343\201\237\343\202\231\343\201\252\343\201" + - "\213\343\202\231\343\201\217\343\201\227\343\201\252\343\201\204\343" + - "\201\250\343\201\237\343\202\212\343\201\252\343\201\204." + - "w3.mag.keio.ac.jp" - )).to eq( - "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" + - "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - ) - end - - it "should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly" do - expect(Addressable::IDNA.to_ascii( - "点心和烤鸭.w3.mag.keio.ac.jp" - )).to eq("xn--0trv4xfvn8el34t.w3.mag.keio.ac.jp") - end - - it "should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly" do - expect(Addressable::IDNA.to_ascii( - "가각갂갃간갅갆갇갈갉힢힣.com" - )).to eq("xn--o39acdefghijk5883jma.com") - end - - it "should convert " + - "'\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com' correctly" do - expect(Addressable::IDNA.to_ascii( - "\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com" - )).to eq("xn--9cs565brid46mda086o.com") - end - - it "should convert 'リ宠퐱〹.com' correctly" do - expect(Addressable::IDNA.to_ascii( - "\357\276\230\345\256\240\355\220\261\343\200\271.com" - )).to eq("xn--eek174hoxfpr4k.com") - end - - it "should convert 'リ宠퐱卄.com' correctly" do - expect(Addressable::IDNA.to_ascii( - "\343\203\252\345\256\240\355\220\261\345\215\204.com" - )).to eq("xn--eek174hoxfpr4k.com") - end - - it "should convert 'ᆵ' correctly" do - expect(Addressable::IDNA.to_ascii( - "\341\206\265" - )).to eq("xn--4ud") - end - - it "should convert 'ᆵ' correctly" do - expect(Addressable::IDNA.to_ascii( - "\357\276\257" - )).to eq("xn--4ud") - end - - it "should convert '🌹🌹🌹.ws' correctly" do - expect(Addressable::IDNA.to_ascii( - "\360\237\214\271\360\237\214\271\360\237\214\271.ws" - )).to eq("xn--2h8haa.ws") - end - - it "should handle two adjacent '.'s correctly" do - expect(Addressable::IDNA.to_ascii( - "example..host" - )).to eq("example..host") - end -end - -shared_examples_for "converting from ASCII to unicode" do - long = 'AcinusFallumTrompetumNullunCreditumVisumEstAtCuadLongumEtCefallum.com' - it "should convert '#{long}' correctly" do - expect(Addressable::IDNA.to_unicode(long)).to eq(long) - end - - it "should return the identity conversion when punycode decode fails" do - expect(Addressable::IDNA.to_unicode("xn--zckp1cyg1.sblo.jp")).to eq( - "xn--zckp1cyg1.sblo.jp") - end - - it "should return the identity conversion when the ACE prefix has no suffix" do - expect(Addressable::IDNA.to_unicode("xn--...-")).to eq("xn--...-") - end - - it "should convert 'www.google.com' correctly" do - expect(Addressable::IDNA.to_unicode("www.google.com")).to eq( - "www.google.com") - end - - it "should convert 'www.詹姆斯.com' correctly" do - expect(Addressable::IDNA.to_unicode( - "www.xn--8ws00zhy3a.com" - )).to eq("www.詹姆斯.com") - end - - it "should convert '詹姆斯.com' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--8ws00zhy3a.com" - )).to eq("詹姆斯.com") - end - - it "should convert 'www.iñtërnâtiônàlizætiøn.com' correctly" do - expect(Addressable::IDNA.to_unicode( - "www.xn--itrntinliztin-vdb0a5exd8ewcye.com" - )).to eq("www.iñtërnâtiônàlizætiøn.com") - end - - it "should convert 'iñtërnâtiônàlizætiøn.com' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--itrntinliztin-vdb0a5exd8ewcye.com" - )).to eq("iñtërnâtiônàlizætiøn.com") - end - - it "should convert " + - "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " + - "correctly" do - expect(Addressable::IDNA.to_unicode( - "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" + - "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - )).to eq( - "www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp" - ) - end - - it "should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--0trv4xfvn8el34t.w3.mag.keio.ac.jp" - )).to eq("点心和烤鸭.w3.mag.keio.ac.jp") - end - - it "should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--o39acdefghijk5883jma.com" - )).to eq("가각갂갃간갅갆갇갈갉힢힣.com") - end - - it "should convert " + - "'\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--9cs565brid46mda086o.com" - )).to eq( - "\347\242\274\346\250\231\346\272\226\350" + - "\220\254\345\234\213\347\242\274.com" - ) - end - - it "should convert 'リ宠퐱卄.com' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--eek174hoxfpr4k.com" - )).to eq("\343\203\252\345\256\240\355\220\261\345\215\204.com") - end - - it "should convert 'ᆵ' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--4ud" - )).to eq("\341\206\265") - end - - it "should convert '🌹🌹🌹.ws' correctly" do - expect(Addressable::IDNA.to_unicode( - "xn--2h8haa.ws" - )).to eq("\360\237\214\271\360\237\214\271\360\237\214\271.ws") - end - - it "should handle two adjacent '.'s correctly" do - expect(Addressable::IDNA.to_unicode( - "example..host" - )).to eq("example..host") - end -end - -describe Addressable::IDNA, "when using the pure-Ruby implementation" do - before do - Addressable.send(:remove_const, :IDNA) - load "addressable/idna/pure.rb" - end - - it_should_behave_like "converting from unicode to ASCII" - it_should_behave_like "converting from ASCII to unicode" - - begin - require "fiber" - - it "should not blow up inside fibers" do - f = Fiber.new do - Addressable.send(:remove_const, :IDNA) - load "addressable/idna/pure.rb" - end - f.resume - end - rescue LoadError - # Fibers aren't supported in this version of Ruby, skip this test. - warn('Fibers unsupported.') - end -end - -begin - require "idn" - - describe Addressable::IDNA, "when using the native-code implementation" do - before do - Addressable.send(:remove_const, :IDNA) - load "addressable/idna/native.rb" - end - - it_should_behave_like "converting from unicode to ASCII" - it_should_behave_like "converting from ASCII to unicode" - end -rescue LoadError => error - raise error if ENV["CI"] && TestHelper.native_supported? - - # Cannot test the native implementation without libidn support. - warn('Could not load native IDN implementation.') -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/net_http_compat_spec.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/net_http_compat_spec.rb deleted file mode 100644 index d07a43e5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/net_http_compat_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -require "addressable/uri" -require "net/http" - -describe Net::HTTP do - it "should be compatible with Addressable" do - response_body = - Net::HTTP.get(Addressable::URI.parse('http://www.google.com/')) - expect(response_body).not_to be_nil - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/security_spec.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/security_spec.rb deleted file mode 100644 index 3bf90a20..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/security_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -require "addressable/uri" - -describe Addressable::URI, "when created with a URI known to cause crashes " + - "in certain browsers" do - it "should parse correctly" do - uri = Addressable::URI.parse('%%30%30') - expect(uri.path).to eq('%%30%30') - expect(uri.normalize.path).to eq('%2500') - end - - it "should parse correctly as a full URI" do - uri = Addressable::URI.parse('http://www.example.com/%%30%30') - expect(uri.path).to eq('/%%30%30') - expect(uri.normalize.path).to eq('/%2500') - end -end - -describe Addressable::URI, "when created with a URI known to cause crashes " + - "in certain browsers" do - it "should parse correctly" do - uri = Addressable::URI.parse('لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗') - expect(uri.path).to eq('لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗') - expect(uri.normalize.path).to eq( - '%D9%84%D9%8F%D8%B5%D9%91%D8%A8%D9%8F%D9%84%D9%8F%D9%84%D8%B5%D9%91' + - '%D8%A8%D9%8F%D8%B1%D8%B1%D9%8B%20%E0%A5%A3%20%E0%A5%A3h%20%E0%A5' + - '%A3%20%E0%A5%A3%20%E5%86%97' - ) - end - - it "should parse correctly as a full URI" do - uri = Addressable::URI.parse('http://www.example.com/لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗') - expect(uri.path).to eq('/لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗') - expect(uri.normalize.path).to eq( - '/%D9%84%D9%8F%D8%B5%D9%91%D8%A8%D9%8F%D9%84%D9%8F%D9%84%D8%B5%D9%91' + - '%D8%A8%D9%8F%D8%B1%D8%B1%D9%8B%20%E0%A5%A3%20%E0%A5%A3h%20%E0%A5' + - '%A3%20%E0%A5%A3%20%E5%86%97' - ) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/template_spec.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/template_spec.rb deleted file mode 100644 index 24616c23..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/template_spec.rb +++ /dev/null @@ -1,1264 +0,0 @@ -# frozen_string_literal: true - -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -require "bigdecimal" -require "timeout" -require "addressable/template" - -shared_examples_for 'expands' do |tests| - tests.each do |template, expansion| - exp = expansion.is_a?(Array) ? expansion.first : expansion - it "#{template} to #{exp}" do - tmpl = Addressable::Template.new(template).expand(subject) - expect(tmpl.to_str).to eq(expansion) - end - end -end - -describe "eql?" do - let(:template) { Addressable::Template.new('https://www.example.com/{foo}') } - it 'is equal when the pattern matches' do - other_template = Addressable::Template.new('https://www.example.com/{foo}') - expect(template).to be_eql(other_template) - expect(other_template).to be_eql(template) - end - it 'is not equal when the pattern differs' do - other_template = Addressable::Template.new('https://www.example.com/{bar}') - expect(template).to_not be_eql(other_template) - expect(other_template).to_not be_eql(template) - end - it 'is not equal to non-templates' do - uri = 'https://www.example.com/foo/bar' - addressable_template = Addressable::Template.new uri - addressable_uri = Addressable::URI.parse uri - expect(addressable_template).to_not be_eql(addressable_uri) - expect(addressable_uri).to_not be_eql(addressable_template) - end -end - -describe "==" do - let(:template) { Addressable::Template.new('https://www.example.com/{foo}') } - it 'is equal when the pattern matches' do - other_template = Addressable::Template.new('https://www.example.com/{foo}') - expect(template).to eq other_template - expect(other_template).to eq template - end - it 'is not equal when the pattern differs' do - other_template = Addressable::Template.new('https://www.example.com/{bar}') - expect(template).not_to eq other_template - expect(other_template).not_to eq template - end - it 'is not equal to non-templates' do - uri = 'https://www.example.com/foo/bar' - addressable_template = Addressable::Template.new uri - addressable_uri = Addressable::URI.parse uri - expect(addressable_template).not_to eq addressable_uri - expect(addressable_uri).not_to eq addressable_template - end -end - -describe "#to_regexp" do - it "does not match the first line of multiline strings" do - uri = "https://www.example.com/bar" - template = Addressable::Template.new(uri) - expect(template.match(uri)).not_to be_nil - expect(template.match("#{uri}\ngarbage")).to be_nil - end -end - -describe "Type conversion" do - subject { - { - :var => true, - :hello => 1234, - :nothing => nil, - :sym => :symbolic, - :decimal => BigDecimal('1') - } - } - - it_behaves_like 'expands', { - '{var}' => 'true', - '{hello}' => '1234', - '{nothing}' => '', - '{sym}' => 'symbolic', - '{decimal}' => RUBY_VERSION < '2.4.0' ? '0.1E1' : '0.1e1' - } -end - -describe "Level 1:" do - subject { - {:var => "value", :hello => "Hello World!"} - } - it_behaves_like 'expands', { - '{var}' => 'value', - '{hello}' => 'Hello%20World%21' - } -end - -describe "Level 2" do - subject { - { - :var => "value", - :hello => "Hello World!", - :path => "/foo/bar" - } - } - context "Operator +:" do - it_behaves_like 'expands', { - '{+var}' => 'value', - '{+hello}' => 'Hello%20World!', - '{+path}/here' => '/foo/bar/here', - 'here?ref={+path}' => 'here?ref=/foo/bar' - } - end - context "Operator #:" do - it_behaves_like 'expands', { - 'X{#var}' => 'X#value', - 'X{#hello}' => 'X#Hello%20World!' - } - end -end - -describe "Level 3" do - subject { - { - :var => "value", - :hello => "Hello World!", - :empty => "", - :path => "/foo/bar", - :x => "1024", - :y => "768" - } - } - context "Operator nil (multiple vars):" do - it_behaves_like 'expands', { - 'map?{x,y}' => 'map?1024,768', - '{x,hello,y}' => '1024,Hello%20World%21,768' - } - end - context "Operator + (multiple vars):" do - it_behaves_like 'expands', { - '{+x,hello,y}' => '1024,Hello%20World!,768', - '{+path,x}/here' => '/foo/bar,1024/here' - } - end - context "Operator # (multiple vars):" do - it_behaves_like 'expands', { - '{#x,hello,y}' => '#1024,Hello%20World!,768', - '{#path,x}/here' => '#/foo/bar,1024/here' - } - end - context "Operator ." do - it_behaves_like 'expands', { - 'X{.var}' => 'X.value', - 'X{.x,y}' => 'X.1024.768' - } - end - context "Operator /" do - it_behaves_like 'expands', { - '{/var}' => '/value', - '{/var,x}/here' => '/value/1024/here' - } - end - context "Operator ;" do - it_behaves_like 'expands', { - '{;x,y}' => ';x=1024;y=768', - '{;x,y,empty}' => ';x=1024;y=768;empty' - } - end - context "Operator ?" do - it_behaves_like 'expands', { - '{?x,y}' => '?x=1024&y=768', - '{?x,y,empty}' => '?x=1024&y=768&empty=' - } - end - context "Operator &" do - it_behaves_like 'expands', { - '?fixed=yes{&x}' => '?fixed=yes&x=1024', - '{&x,y,empty}' => '&x=1024&y=768&empty=' - } - end -end - -describe "Level 4" do - subject { - { - :var => "value", - :hello => "Hello World!", - :path => "/foo/bar", - :semi => ";", - :list => %w(red green blue), - :keys => {"semi" => ';', "dot" => '.', :comma => ','} - } - } - context "Expansion with value modifiers" do - it_behaves_like 'expands', { - '{var:3}' => 'val', - '{var:30}' => 'value', - '{list}' => 'red,green,blue', - '{list*}' => 'red,green,blue', - '{keys}' => 'semi,%3B,dot,.,comma,%2C', - '{keys*}' => 'semi=%3B,dot=.,comma=%2C', - } - end - context "Operator + with value modifiers" do - it_behaves_like 'expands', { - '{+path:6}/here' => '/foo/b/here', - '{+list}' => 'red,green,blue', - '{+list*}' => 'red,green,blue', - '{+keys}' => 'semi,;,dot,.,comma,,', - '{+keys*}' => 'semi=;,dot=.,comma=,', - } - end - context "Operator # with value modifiers" do - it_behaves_like 'expands', { - '{#path:6}/here' => '#/foo/b/here', - '{#list}' => '#red,green,blue', - '{#list*}' => '#red,green,blue', - '{#keys}' => '#semi,;,dot,.,comma,,', - '{#keys*}' => '#semi=;,dot=.,comma=,', - } - end - context "Operator . with value modifiers" do - it_behaves_like 'expands', { - 'X{.var:3}' => 'X.val', - 'X{.list}' => 'X.red,green,blue', - 'X{.list*}' => 'X.red.green.blue', - 'X{.keys}' => 'X.semi,%3B,dot,.,comma,%2C', - 'X{.keys*}' => 'X.semi=%3B.dot=..comma=%2C', - } - end - context "Operator / with value modifiers" do - it_behaves_like 'expands', { - '{/var:1,var}' => '/v/value', - '{/list}' => '/red,green,blue', - '{/list*}' => '/red/green/blue', - '{/list*,path:4}' => '/red/green/blue/%2Ffoo', - '{/keys}' => '/semi,%3B,dot,.,comma,%2C', - '{/keys*}' => '/semi=%3B/dot=./comma=%2C', - } - end - context "Operator ; with value modifiers" do - it_behaves_like 'expands', { - '{;hello:5}' => ';hello=Hello', - '{;list}' => ';list=red,green,blue', - '{;list*}' => ';list=red;list=green;list=blue', - '{;keys}' => ';keys=semi,%3B,dot,.,comma,%2C', - '{;keys*}' => ';semi=%3B;dot=.;comma=%2C', - } - end - context "Operator ? with value modifiers" do - it_behaves_like 'expands', { - '{?var:3}' => '?var=val', - '{?list}' => '?list=red,green,blue', - '{?list*}' => '?list=red&list=green&list=blue', - '{?keys}' => '?keys=semi,%3B,dot,.,comma,%2C', - '{?keys*}' => '?semi=%3B&dot=.&comma=%2C', - } - end - context "Operator & with value modifiers" do - it_behaves_like 'expands', { - '{&var:3}' => '&var=val', - '{&list}' => '&list=red,green,blue', - '{&list*}' => '&list=red&list=green&list=blue', - '{&keys}' => '&keys=semi,%3B,dot,.,comma,%2C', - '{&keys*}' => '&semi=%3B&dot=.&comma=%2C', - } - end -end -describe "Modifiers" do - subject { - { - :var => "value", - :semi => ";", - :year => [1965, 2000, 2012], - :dom => %w(example com) - } - } - context "length" do - it_behaves_like 'expands', { - '{var:3}' => 'val', - '{var:30}' => 'value', - '{var}' => 'value', - '{semi}' => '%3B', - '{semi:2}' => '%3B' - } - end - context "explode" do - it_behaves_like 'expands', { - 'find{?year*}' => 'find?year=1965&year=2000&year=2012', - 'www{.dom*}' => 'www.example.com', - } - end -end -describe "Expansion" do - subject { - { - :count => ["one", "two", "three"], - :dom => ["example", "com"], - :dub => "me/too", - :hello => "Hello World!", - :half => "50%", - :var => "value", - :who => "fred", - :base => "http://example.com/home/", - :path => "/foo/bar", - :list => ["red", "green", "blue"], - :keys => {"semi" => ";","dot" => ".",:comma => ","}, - :v => "6", - :x => "1024", - :y => "768", - :empty => "", - :empty_keys => {}, - :undef => nil - } - } - context "concatenation" do - it_behaves_like 'expands', { - '{count}' => 'one,two,three', - '{count*}' => 'one,two,three', - '{/count}' => '/one,two,three', - '{/count*}' => '/one/two/three', - '{;count}' => ';count=one,two,three', - '{;count*}' => ';count=one;count=two;count=three', - '{?count}' => '?count=one,two,three', - '{?count*}' => '?count=one&count=two&count=three', - '{&count*}' => '&count=one&count=two&count=three' - } - end - context "simple expansion" do - it_behaves_like 'expands', { - '{var}' => 'value', - '{hello}' => 'Hello%20World%21', - '{half}' => '50%25', - 'O{empty}X' => 'OX', - 'O{undef}X' => 'OX', - '{x,y}' => '1024,768', - '{x,hello,y}' => '1024,Hello%20World%21,768', - '?{x,empty}' => '?1024,', - '?{x,undef}' => '?1024', - '?{undef,y}' => '?768', - '{var:3}' => 'val', - '{var:30}' => 'value', - '{list}' => 'red,green,blue', - '{list*}' => 'red,green,blue', - '{keys}' => 'semi,%3B,dot,.,comma,%2C', - '{keys*}' => 'semi=%3B,dot=.,comma=%2C', - } - end - context "reserved expansion (+)" do - it_behaves_like 'expands', { - '{+var}' => 'value', - '{+hello}' => 'Hello%20World!', - '{+half}' => '50%25', - '{base}index' => 'http%3A%2F%2Fexample.com%2Fhome%2Findex', - '{+base}index' => 'http://example.com/home/index', - 'O{+empty}X' => 'OX', - 'O{+undef}X' => 'OX', - '{+path}/here' => '/foo/bar/here', - 'here?ref={+path}' => 'here?ref=/foo/bar', - 'up{+path}{var}/here' => 'up/foo/barvalue/here', - '{+x,hello,y}' => '1024,Hello%20World!,768', - '{+path,x}/here' => '/foo/bar,1024/here', - '{+path:6}/here' => '/foo/b/here', - '{+list}' => 'red,green,blue', - '{+list*}' => 'red,green,blue', - '{+keys}' => 'semi,;,dot,.,comma,,', - '{+keys*}' => 'semi=;,dot=.,comma=,', - } - end - context "fragment expansion (#)" do - it_behaves_like 'expands', { - '{#var}' => '#value', - '{#hello}' => '#Hello%20World!', - '{#half}' => '#50%25', - 'foo{#empty}' => 'foo#', - 'foo{#undef}' => 'foo', - '{#x,hello,y}' => '#1024,Hello%20World!,768', - '{#path,x}/here' => '#/foo/bar,1024/here', - '{#path:6}/here' => '#/foo/b/here', - '{#list}' => '#red,green,blue', - '{#list*}' => '#red,green,blue', - '{#keys}' => '#semi,;,dot,.,comma,,', - '{#keys*}' => '#semi=;,dot=.,comma=,', - } - end - context "label expansion (.)" do - it_behaves_like 'expands', { - '{.who}' => '.fred', - '{.who,who}' => '.fred.fred', - '{.half,who}' => '.50%25.fred', - 'www{.dom*}' => 'www.example.com', - 'X{.var}' => 'X.value', - 'X{.empty}' => 'X.', - 'X{.undef}' => 'X', - 'X{.var:3}' => 'X.val', - 'X{.list}' => 'X.red,green,blue', - 'X{.list*}' => 'X.red.green.blue', - 'X{.keys}' => 'X.semi,%3B,dot,.,comma,%2C', - 'X{.keys*}' => 'X.semi=%3B.dot=..comma=%2C', - 'X{.empty_keys}' => 'X', - 'X{.empty_keys*}' => 'X' - } - end - context "path expansion (/)" do - it_behaves_like 'expands', { - '{/who}' => '/fred', - '{/who,who}' => '/fred/fred', - '{/half,who}' => '/50%25/fred', - '{/who,dub}' => '/fred/me%2Ftoo', - '{/var}' => '/value', - '{/var,empty}' => '/value/', - '{/var,undef}' => '/value', - '{/var,x}/here' => '/value/1024/here', - '{/var:1,var}' => '/v/value', - '{/list}' => '/red,green,blue', - '{/list*}' => '/red/green/blue', - '{/list*,path:4}' => '/red/green/blue/%2Ffoo', - '{/keys}' => '/semi,%3B,dot,.,comma,%2C', - '{/keys*}' => '/semi=%3B/dot=./comma=%2C', - } - end - context "path-style expansion (;)" do - it_behaves_like 'expands', { - '{;who}' => ';who=fred', - '{;half}' => ';half=50%25', - '{;empty}' => ';empty', - '{;v,empty,who}' => ';v=6;empty;who=fred', - '{;v,bar,who}' => ';v=6;who=fred', - '{;x,y}' => ';x=1024;y=768', - '{;x,y,empty}' => ';x=1024;y=768;empty', - '{;x,y,undef}' => ';x=1024;y=768', - '{;hello:5}' => ';hello=Hello', - '{;list}' => ';list=red,green,blue', - '{;list*}' => ';list=red;list=green;list=blue', - '{;keys}' => ';keys=semi,%3B,dot,.,comma,%2C', - '{;keys*}' => ';semi=%3B;dot=.;comma=%2C', - } - end - context "form query expansion (?)" do - it_behaves_like 'expands', { - '{?who}' => '?who=fred', - '{?half}' => '?half=50%25', - '{?x,y}' => '?x=1024&y=768', - '{?x,y,empty}' => '?x=1024&y=768&empty=', - '{?x,y,undef}' => '?x=1024&y=768', - '{?var:3}' => '?var=val', - '{?list}' => '?list=red,green,blue', - '{?list*}' => '?list=red&list=green&list=blue', - '{?keys}' => '?keys=semi,%3B,dot,.,comma,%2C', - '{?keys*}' => '?semi=%3B&dot=.&comma=%2C', - } - end - context "form query expansion (&)" do - it_behaves_like 'expands', { - '{&who}' => '&who=fred', - '{&half}' => '&half=50%25', - '?fixed=yes{&x}' => '?fixed=yes&x=1024', - '{&x,y,empty}' => '&x=1024&y=768&empty=', - '{&x,y,undef}' => '&x=1024&y=768', - '{&var:3}' => '&var=val', - '{&list}' => '&list=red,green,blue', - '{&list*}' => '&list=red&list=green&list=blue', - '{&keys}' => '&keys=semi,%3B,dot,.,comma,%2C', - '{&keys*}' => '&semi=%3B&dot=.&comma=%2C', - } - end - context "non-string key in match data" do - subject {Addressable::Template.new("http://example.com/{one}")} - - it "raises TypeError" do - expect { subject.expand(Object.new => "1") }.to raise_error TypeError - end - end -end - -class ExampleTwoProcessor - def self.restore(name, value) - return value.gsub(/-/, " ") if name == "query" - return value - end - - def self.match(name) - return ".*?" if name == "first" - return ".*" - end - def self.validate(name, value) - return !!(value =~ /^[\w ]+$/) if name == "query" - return true - end - - def self.transform(name, value) - return value.gsub(/ /, "+") if name == "query" - return value - end -end - -class DumbProcessor - def self.match(name) - return ".*?" if name == "first" - end -end - -describe Addressable::Template do - describe 'initialize' do - context 'with a non-string' do - it 'raises a TypeError' do - expect { Addressable::Template.new(nil) }.to raise_error(TypeError) - end - end - end - - describe 'freeze' do - subject { Addressable::Template.new("http://example.com/{first}/{+second}/") } - it 'freezes the template' do - expect(subject.freeze).to be_frozen - end - end - - describe "Matching" do - let(:uri){ - Addressable::URI.parse( - "http://example.com/search/an-example-search-query/" - ) - } - let(:uri2){ - Addressable::URI.parse("http://example.com/a/b/c/") - } - let(:uri3){ - Addressable::URI.parse("http://example.com/;a=1;b=2;c=3;first=foo") - } - let(:uri4){ - Addressable::URI.parse("http://example.com/?a=1&b=2&c=3&first=foo") - } - let(:uri5){ - "http://example.com/foo" - } - context "first uri with ExampleTwoProcessor" do - subject { - Addressable::Template.new( - "http://example.com/search/{query}/" - ).match(uri, ExampleTwoProcessor) - } - its(:variables){ should == ["query"] } - its(:captures){ should == ["an example search query"] } - end - - context "second uri with ExampleTwoProcessor" do - subject { - Addressable::Template.new( - "http://example.com/{first}/{+second}/" - ).match(uri2, ExampleTwoProcessor) - } - its(:variables){ should == ["first", "second"] } - its(:captures){ should == ["a", "b/c"] } - end - - context "second uri with DumbProcessor" do - subject { - Addressable::Template.new( - "http://example.com/{first}/{+second}/" - ).match(uri2, DumbProcessor) - } - its(:variables){ should == ["first", "second"] } - its(:captures){ should == ["a", "b/c"] } - end - - context "second uri" do - subject { - Addressable::Template.new( - "http://example.com/{first}{/second*}/" - ).match(uri2) - } - its(:variables){ should == ["first", "second"] } - its(:captures){ should == ["a", ["b","c"]] } - end - context "third uri" do - subject { - Addressable::Template.new( - "http://example.com/{;hash*,first}" - ).match(uri3) - } - its(:variables){ should == ["hash", "first"] } - its(:captures){ should == [ - {"a" => "1", "b" => "2", "c" => "3", "first" => "foo"}, nil] } - end - # Note that this expansion is impossible to revert deterministically - the - # * operator means first could have been a key of hash or a separate key. - # Semantically, a separate key is more likely, but both are possible. - context "fourth uri" do - subject { - Addressable::Template.new( - "http://example.com/{?hash*,first}" - ).match(uri4) - } - its(:variables){ should == ["hash", "first"] } - its(:captures){ should == [ - {"a" => "1", "b" => "2", "c" => "3", "first"=> "foo"}, nil] } - end - context "fifth uri" do - subject { - Addressable::Template.new( - "http://example.com/{path}{?hash*,first}" - ).match(uri5) - } - its(:variables){ should == ["path", "hash", "first"] } - its(:captures){ should == ["foo", nil, nil] } - end - end - - describe 'match' do - subject { Addressable::Template.new('http://example.com/first/second/') } - context 'when the URI is the same as the template' do - it 'returns the match data itself with an empty mapping' do - uri = Addressable::URI.parse('http://example.com/first/second/') - match_data = subject.match(uri) - expect(match_data).to be_an Addressable::Template::MatchData - expect(match_data.uri).to eq(uri) - expect(match_data.template).to eq(subject) - expect(match_data.mapping).to be_empty - expect(match_data.inspect).to be_an String - end - end - end - - describe "extract" do - let(:template) { - Addressable::Template.new( - "http://{host}{/segments*}/{?one,two,bogus}{#fragment}" - ) - } - let(:uri){ "http://example.com/a/b/c/?one=1&two=2#foo" } - let(:uri2){ "http://example.com/a/b/c/#foo" } - it "should be able to extract with queries" do - expect(template.extract(uri)).to eq({ - "host" => "example.com", - "segments" => %w(a b c), - "one" => "1", - "bogus" => nil, - "two" => "2", - "fragment" => "foo" - }) - end - it "should be able to extract without queries" do - expect(template.extract(uri2)).to eq({ - "host" => "example.com", - "segments" => %w(a b c), - "one" => nil, - "bogus" => nil, - "two" => nil, - "fragment" => "foo" - }) - end - - context "issue #137" do - subject { Addressable::Template.new('/path{?page,per_page}') } - - it "can match empty" do - data = subject.extract("/path") - expect(data["page"]).to eq(nil) - expect(data["per_page"]).to eq(nil) - expect(data.keys.sort).to eq(['page', 'per_page']) - end - - it "can match first var" do - data = subject.extract("/path?page=1") - expect(data["page"]).to eq("1") - expect(data["per_page"]).to eq(nil) - expect(data.keys.sort).to eq(['page', 'per_page']) - end - - it "can match second var" do - data = subject.extract("/path?per_page=1") - expect(data["page"]).to eq(nil) - expect(data["per_page"]).to eq("1") - expect(data.keys.sort).to eq(['page', 'per_page']) - end - - it "can match both vars" do - data = subject.extract("/path?page=2&per_page=1") - expect(data["page"]).to eq("2") - expect(data["per_page"]).to eq("1") - expect(data.keys.sort).to eq(['page', 'per_page']) - end - end - end - - describe "Partial expand with symbols" do - context "partial_expand with two simple values" do - subject { - Addressable::Template.new("http://example.com/{one}/{two}/") - } - it "builds a new pattern" do - expect(subject.partial_expand(:one => "1").pattern).to eq( - "http://example.com/1/{two}/" - ) - end - end - context "partial_expand query with missing param in middle" do - subject { - Addressable::Template.new("http://example.com/{?one,two,three}/") - } - it "builds a new pattern" do - expect(subject.partial_expand(:one => "1", :three => "3").pattern).to eq( - "http://example.com/?one=1{&two}&three=3/" - ) - end - end - context "partial_expand form style query with missing param at beginning" do - subject { - Addressable::Template.new("http://example.com/{?one,two}/") - } - it "builds a new pattern" do - expect(subject.partial_expand(:two => "2").pattern).to eq( - "http://example.com/?two=2{&one}/" - ) - end - end - context "issue #307 - partial_expand form query with nil params" do - subject do - Addressable::Template.new("http://example.com/{?one,two,three}/") - end - it "builds a new pattern with two=nil" do - expect(subject.partial_expand(two: nil).pattern).to eq( - "http://example.com/{?one}{&three}/" - ) - end - it "builds a new pattern with one=nil and two=nil" do - expect(subject.partial_expand(one: nil, two: nil).pattern).to eq( - "http://example.com/{?three}/" - ) - end - it "builds a new pattern with one=1 and two=nil" do - expect(subject.partial_expand(one: 1, two: nil).pattern).to eq( - "http://example.com/?one=1{&three}/" - ) - end - it "builds a new pattern with one=nil and two=2" do - expect(subject.partial_expand(one: nil, two: 2).pattern).to eq( - "http://example.com/?two=2{&three}/" - ) - end - it "builds a new pattern with one=nil" do - expect(subject.partial_expand(one: nil).pattern).to eq( - "http://example.com/{?two}{&three}/" - ) - end - end - context "partial_expand with query string" do - subject { - Addressable::Template.new("http://example.com/{?two,one}/") - } - it "builds a new pattern" do - expect(subject.partial_expand(:one => "1").pattern).to eq( - "http://example.com/?one=1{&two}/" - ) - end - end - context "partial_expand with path operator" do - subject { - Addressable::Template.new("http://example.com{/one,two}/") - } - it "builds a new pattern" do - expect(subject.partial_expand(:one => "1").pattern).to eq( - "http://example.com/1{/two}/" - ) - end - end - context "partial expand with unicode values" do - subject do - Addressable::Template.new("http://example.com/{resource}/{query}/") - end - it "normalizes unicode by default" do - template = subject.partial_expand("query" => "Cafe\u0301") - expect(template.pattern).to eq( - "http://example.com/{resource}/Caf%C3%A9/" - ) - end - - it "normalizes as unicode even with wrong encoding specified" do - template = subject.partial_expand("query" => "Cafe\u0301".b) - expect(template.pattern).to eq( - "http://example.com/{resource}/Caf%C3%A9/" - ) - end - - it "raises on invalid unicode input" do - expect { - subject.partial_expand("query" => "M\xE9thode".b) - }.to raise_error(ArgumentError, "invalid byte sequence in UTF-8") - end - - it "does not normalize unicode when byte semantics requested" do - template = subject.partial_expand({"query" => "Cafe\u0301"}, nil, false) - expect(template.pattern).to eq( - "http://example.com/{resource}/Cafe%CC%81/" - ) - end - end - end - describe "Partial expand with strings" do - context "partial_expand with two simple values" do - subject { - Addressable::Template.new("http://example.com/{one}/{two}/") - } - it "builds a new pattern" do - expect(subject.partial_expand("one" => "1").pattern).to eq( - "http://example.com/1/{two}/" - ) - end - end - context "partial_expand query with missing param in middle" do - subject { - Addressable::Template.new("http://example.com/{?one,two,three}/") - } - it "builds a new pattern" do - expect(subject.partial_expand("one" => "1", "three" => "3").pattern).to eq( - "http://example.com/?one=1{&two}&three=3/" - ) - end - end - context "partial_expand with query string" do - subject { - Addressable::Template.new("http://example.com/{?two,one}/") - } - it "builds a new pattern" do - expect(subject.partial_expand("one" => "1").pattern).to eq( - "http://example.com/?one=1{&two}/" - ) - end - end - context "partial_expand with path operator" do - subject { - Addressable::Template.new("http://example.com{/one,two}/") - } - it "builds a new pattern" do - expect(subject.partial_expand("one" => "1").pattern).to eq( - "http://example.com/1{/two}/" - ) - end - end - end - describe "Expand" do - context "expand with unicode values" do - subject do - Addressable::Template.new("http://example.com/search/{query}/") - end - it "normalizes unicode by default" do - uri = subject.expand("query" => "Cafe\u0301").to_str - expect(uri).to eq("http://example.com/search/Caf%C3%A9/") - end - - it "normalizes as unicode even with wrong encoding specified" do - uri = subject.expand("query" => "Cafe\u0301".b).to_str - expect(uri).to eq("http://example.com/search/Caf%C3%A9/") - end - - it "raises on invalid unicode input" do - expect { - subject.expand("query" => "M\xE9thode".b).to_str - }.to raise_error(ArgumentError, "invalid byte sequence in UTF-8") - end - - it "does not normalize unicode when byte semantics requested" do - uri = subject.expand({ "query" => "Cafe\u0301" }, nil, false).to_str - expect(uri).to eq("http://example.com/search/Cafe%CC%81/") - end - end - context "expand with a processor" do - subject { - Addressable::Template.new("http://example.com/search/{query}/") - } - it "processes spaces" do - expect(subject.expand({"query" => "an example search query"}, - ExampleTwoProcessor).to_str).to eq( - "http://example.com/search/an+example+search+query/" - ) - end - it "validates" do - expect{ - subject.expand({"query" => "Bogus!"}, - ExampleTwoProcessor).to_str - }.to raise_error(Addressable::Template::InvalidTemplateValueError) - end - end - context "partial_expand query with missing param in middle" do - subject { - Addressable::Template.new("http://example.com/{?one,two,three}/") - } - it "builds a new pattern" do - expect(subject.partial_expand("one" => "1", "three" => "3").pattern).to eq( - "http://example.com/?one=1{&two}&three=3/" - ) - end - end - context "partial_expand with query string" do - subject { - Addressable::Template.new("http://example.com/{?two,one}/") - } - it "builds a new pattern" do - expect(subject.partial_expand("one" => "1").pattern).to eq( - "http://example.com/?one=1{&two}/" - ) - end - end - context "partial_expand with path operator" do - subject { - Addressable::Template.new("http://example.com{/one,two}/") - } - it "builds a new pattern" do - expect(subject.partial_expand("one" => "1").pattern).to eq( - "http://example.com/1{/two}/" - ) - end - end - end - context "Matching with operators" do - describe "Level 1:" do - subject { Addressable::Template.new("foo{foo}/{bar}baz") } - it "can match" do - data = subject.match("foofoo/bananabaz") - expect(data.mapping["foo"]).to eq("foo") - expect(data.mapping["bar"]).to eq("banana") - end - it "can fail" do - expect(subject.match("bar/foo")).to be_nil - expect(subject.match("foobaz")).to be_nil - end - it "can match empty" do - data = subject.match("foo/baz") - expect(data.mapping["foo"]).to eq(nil) - expect(data.mapping["bar"]).to eq(nil) - end - it "lists vars" do - expect(subject.variables).to eq(["foo", "bar"]) - end - end - - describe "Level 2:" do - subject { Addressable::Template.new("foo{+foo}{#bar}baz") } - it "can match" do - data = subject.match("foo/test/banana#bazbaz") - expect(data.mapping["foo"]).to eq("/test/banana") - expect(data.mapping["bar"]).to eq("baz") - end - it "can match empty level 2 #" do - data = subject.match("foo/test/bananabaz") - expect(data.mapping["foo"]).to eq("/test/banana") - expect(data.mapping["bar"]).to eq(nil) - data = subject.match("foo/test/banana#baz") - expect(data.mapping["foo"]).to eq("/test/banana") - expect(data.mapping["bar"]).to eq("") - end - it "can match empty level 2 +" do - data = subject.match("foobaz") - expect(data.mapping["foo"]).to eq(nil) - expect(data.mapping["bar"]).to eq(nil) - data = subject.match("foo#barbaz") - expect(data.mapping["foo"]).to eq(nil) - expect(data.mapping["bar"]).to eq("bar") - end - it "lists vars" do - expect(subject.variables).to eq(["foo", "bar"]) - end - end - - describe "Level 3:" do - context "no operator" do - subject { Addressable::Template.new("foo{foo,bar}baz") } - it "can match" do - data = subject.match("foofoo,barbaz") - expect(data.mapping["foo"]).to eq("foo") - expect(data.mapping["bar"]).to eq("bar") - end - it "lists vars" do - expect(subject.variables).to eq(["foo", "bar"]) - end - end - context "+ operator" do - subject { Addressable::Template.new("foo{+foo,bar}baz") } - it "can match" do - data = subject.match("foofoo/bar,barbaz") - expect(data.mapping["bar"]).to eq("foo/bar,bar") - expect(data.mapping["foo"]).to eq("") - end - it "lists vars" do - expect(subject.variables).to eq(["foo", "bar"]) - end - end - context ". operator" do - subject { Addressable::Template.new("foo{.foo,bar}baz") } - it "can match" do - data = subject.match("foo.foo.barbaz") - expect(data.mapping["foo"]).to eq("foo") - expect(data.mapping["bar"]).to eq("bar") - end - it "lists vars" do - expect(subject.variables).to eq(["foo", "bar"]) - end - end - context "/ operator" do - subject { Addressable::Template.new("foo{/foo,bar}baz") } - it "can match" do - data = subject.match("foo/foo/barbaz") - expect(data.mapping["foo"]).to eq("foo") - expect(data.mapping["bar"]).to eq("bar") - end - it "lists vars" do - expect(subject.variables).to eq(["foo", "bar"]) - end - end - context "; operator" do - subject { Addressable::Template.new("foo{;foo,bar,baz}baz") } - it "can match" do - data = subject.match("foo;foo=bar%20baz;bar=foo;bazbaz") - expect(data.mapping["foo"]).to eq("bar baz") - expect(data.mapping["bar"]).to eq("foo") - expect(data.mapping["baz"]).to eq("") - end - it "lists vars" do - expect(subject.variables).to eq(%w(foo bar baz)) - end - end - context "? operator" do - context "test" do - subject { Addressable::Template.new("foo{?foo,bar}baz") } - it "can match" do - data = subject.match("foo?foo=bar%20baz&bar=foobaz") - expect(data.mapping["foo"]).to eq("bar baz") - expect(data.mapping["bar"]).to eq("foo") - end - it "lists vars" do - expect(subject.variables).to eq(%w(foo bar)) - end - end - - context "issue #137" do - subject { Addressable::Template.new('/path{?page,per_page}') } - - it "can match empty" do - data = subject.match("/path") - expect(data.mapping["page"]).to eq(nil) - expect(data.mapping["per_page"]).to eq(nil) - expect(data.mapping.keys.sort).to eq(['page', 'per_page']) - end - - it "can match first var" do - data = subject.match("/path?page=1") - expect(data.mapping["page"]).to eq("1") - expect(data.mapping["per_page"]).to eq(nil) - expect(data.mapping.keys.sort).to eq(['page', 'per_page']) - end - - it "can match second var" do - data = subject.match("/path?per_page=1") - expect(data.mapping["page"]).to eq(nil) - expect(data.mapping["per_page"]).to eq("1") - expect(data.mapping.keys.sort).to eq(['page', 'per_page']) - end - - it "can match both vars" do - data = subject.match("/path?page=2&per_page=1") - expect(data.mapping["page"]).to eq("2") - expect(data.mapping["per_page"]).to eq("1") - expect(data.mapping.keys.sort).to eq(['page', 'per_page']) - end - end - - context "issue #71" do - subject { Addressable::Template.new("http://cyberscore.dev/api/users{?username}") } - it "can match" do - data = subject.match("http://cyberscore.dev/api/users?username=foobaz") - expect(data.mapping["username"]).to eq("foobaz") - end - it "lists vars" do - expect(subject.variables).to eq(%w(username)) - expect(subject.keys).to eq(%w(username)) - end - end - end - context "& operator" do - subject { Addressable::Template.new("foo{&foo,bar}baz") } - it "can match" do - data = subject.match("foo&foo=bar%20baz&bar=foobaz") - expect(data.mapping["foo"]).to eq("bar baz") - expect(data.mapping["bar"]).to eq("foo") - end - it "lists vars" do - expect(subject.variables).to eq(%w(foo bar)) - end - end - end - end - - context "support regexes:" do - context "EXPRESSION" do - subject { Addressable::Template::EXPRESSION } - it "should be able to match an expression" do - expect(subject).to match("{foo}") - expect(subject).to match("{foo,9}") - expect(subject).to match("{foo.bar,baz}") - expect(subject).to match("{+foo.bar,baz}") - expect(subject).to match("{foo,foo%20bar}") - expect(subject).to match("{#foo:20,baz*}") - expect(subject).to match("stuff{#foo:20,baz*}things") - end - it "should fail on non vars" do - expect(subject).not_to match("!{foo") - expect(subject).not_to match("{foo.bar.}") - expect(subject).not_to match("!{}") - end - end - context "VARNAME" do - subject { Addressable::Template::VARNAME } - it "should be able to match a variable" do - expect(subject).to match("foo") - expect(subject).to match("9") - expect(subject).to match("foo.bar") - expect(subject).to match("foo_bar") - expect(subject).to match("foo_bar.baz") - expect(subject).to match("foo%20bar") - expect(subject).to match("foo%20bar.baz") - end - it "should fail on non vars" do - expect(subject).not_to match("!foo") - expect(subject).not_to match("foo.bar.") - expect(subject).not_to match("foo%2%00bar") - expect(subject).not_to match("foo_ba%r") - expect(subject).not_to match("foo_bar*") - expect(subject).not_to match("foo_bar:20") - end - - it 'should parse in a reasonable time' do - expect do - Timeout.timeout(0.1) do - expect(subject).not_to match("0"*25 + "!") - end - end.not_to raise_error - end - end - context "VARIABLE_LIST" do - subject { Addressable::Template::VARIABLE_LIST } - it "should be able to match a variable list" do - expect(subject).to match("foo,bar") - expect(subject).to match("foo") - expect(subject).to match("foo,bar*,baz") - expect(subject).to match("foo.bar,bar_baz*,baz:12") - end - it "should fail on non vars" do - expect(subject).not_to match(",foo,bar*,baz") - expect(subject).not_to match("foo,*bar,baz") - expect(subject).not_to match("foo,,bar*,baz") - end - end - context "VARSPEC" do - subject { Addressable::Template::VARSPEC } - it "should be able to match a variable with modifier" do - expect(subject).to match("9:8") - expect(subject).to match("foo.bar*") - expect(subject).to match("foo_bar:12") - expect(subject).to match("foo_bar.baz*") - expect(subject).to match("foo%20bar:12") - expect(subject).to match("foo%20bar.baz*") - end - it "should fail on non vars" do - expect(subject).not_to match("!foo") - expect(subject).not_to match("*foo") - expect(subject).not_to match("fo*o") - expect(subject).not_to match("fo:o") - expect(subject).not_to match("foo:") - end - end - end -end - -describe Addressable::Template::MatchData do - let(:template) { Addressable::Template.new('{foo}/{bar}') } - subject(:its) { template.match('ab/cd') } - its(:uri) { should == Addressable::URI.parse('ab/cd') } - its(:template) { should == template } - its(:mapping) { should == { 'foo' => 'ab', 'bar' => 'cd' } } - its(:variables) { should == ['foo', 'bar'] } - its(:keys) { should == ['foo', 'bar'] } - its(:names) { should == ['foo', 'bar'] } - its(:values) { should == ['ab', 'cd'] } - its(:captures) { should == ['ab', 'cd'] } - its(:to_a) { should == ['ab/cd', 'ab', 'cd'] } - its(:to_s) { should == 'ab/cd' } - its(:string) { should == its.to_s } - its(:pre_match) { should == "" } - its(:post_match) { should == "" } - - describe 'values_at' do - it 'returns an array with the values' do - expect(its.values_at(0, 2)).to eq(['ab/cd', 'cd']) - end - it 'allows mixing integer an string keys' do - expect(its.values_at('foo', 1)).to eq(['ab', 'ab']) - end - it 'accepts unknown keys' do - expect(its.values_at('baz', 'foo')).to eq([nil, 'ab']) - end - end - - describe '[]' do - context 'string key' do - it 'returns the corresponding capture' do - expect(its['foo']).to eq('ab') - expect(its['bar']).to eq('cd') - end - it 'returns nil for unknown keys' do - expect(its['baz']).to be_nil - end - end - context 'symbol key' do - it 'returns the corresponding capture' do - expect(its[:foo]).to eq('ab') - expect(its[:bar]).to eq('cd') - end - it 'returns nil for unknown keys' do - expect(its[:baz]).to be_nil - end - end - context 'integer key' do - it 'returns the full URI for index 0' do - expect(its[0]).to eq('ab/cd') - end - it 'returns the corresponding capture' do - expect(its[1]).to eq('ab') - expect(its[2]).to eq('cd') - end - it 'returns nil for unknown keys' do - expect(its[3]).to be_nil - end - end - context 'other key' do - it 'raises an exception' do - expect { its[Object.new] }.to raise_error(TypeError) - end - end - context 'with length' do - it 'returns an array starting at index with given length' do - expect(its[0, 2]).to eq(['ab/cd', 'ab']) - expect(its[2, 1]).to eq(['cd']) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/uri_spec.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/uri_spec.rb deleted file mode 100644 index 26ee923d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/addressable/uri_spec.rb +++ /dev/null @@ -1,6840 +0,0 @@ -# frozen_string_literal: true - -# Copyright (C) Bob Aman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "spec_helper" - -require "addressable/uri" -require "uri" -require "ipaddr" -require "yaml" - -if !"".respond_to?("force_encoding") - class String - def force_encoding(encoding) - @encoding = encoding - end - - def encoding - @encoding ||= Encoding::ASCII_8BIT - end - end - - class Encoding - def initialize(name) - @name = name - end - - def to_s - return @name - end - - UTF_8 = Encoding.new("UTF-8") - ASCII_8BIT = Encoding.new("US-ASCII") - end -end - -module Fake - module URI - class HTTP - def initialize(uri) - @uri = uri - end - - def to_s - return @uri.to_s - end - - alias :to_str :to_s - end - end -end - -describe Addressable::URI, "when created with a non-numeric port number" do - it "should raise an error" do - expect do - Addressable::URI.new(:port => "bogus") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with a invalid encoded port number" do - it "should raise an error" do - expect do - Addressable::URI.new(:port => "%eb") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with a non-string scheme" do - it "should raise an error" do - expect do - Addressable::URI.new(:scheme => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string user" do - it "should raise an error" do - expect do - Addressable::URI.new(:user => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string password" do - it "should raise an error" do - expect do - Addressable::URI.new(:password => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string userinfo" do - it "should raise an error" do - expect do - Addressable::URI.new(:userinfo => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string host" do - it "should raise an error" do - expect do - Addressable::URI.new(:host => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string authority" do - it "should raise an error" do - expect do - Addressable::URI.new(:authority => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string path" do - it "should raise an error" do - expect do - Addressable::URI.new(:path => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string query" do - it "should raise an error" do - expect do - Addressable::URI.new(:query => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a non-string fragment" do - it "should raise an error" do - expect do - Addressable::URI.new(:fragment => :bogus) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when created with a scheme but no hierarchical " + - "segment" do - it "should raise an error" do - expect do - Addressable::URI.parse("http:") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "quote handling" do - describe 'in host name' do - it "should raise an error for single quote" do - expect do - Addressable::URI.parse("http://local\"host/") - end.to raise_error(Addressable::URI::InvalidURIError) - end - end -end - -describe Addressable::URI, "newline normalization" do - it "should not accept newlines in scheme" do - expect do - Addressable::URI.parse("ht%0atp://localhost/") - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should not unescape newline in path" do - uri = Addressable::URI.parse("http://localhost/%0a").normalize - expect(uri.to_s).to eq("http://localhost/%0A") - end - - it "should not unescape newline in hostname" do - uri = Addressable::URI.parse("http://local%0ahost/").normalize - expect(uri.to_s).to eq("http://local%0Ahost/") - end - - it "should not unescape newline in username" do - uri = Addressable::URI.parse("http://foo%0abar@localhost/").normalize - expect(uri.to_s).to eq("http://foo%0Abar@localhost/") - end - - it "should not unescape newline in username" do - uri = Addressable::URI.parse("http://example:foo%0abar@example/").normalize - expect(uri.to_s).to eq("http://example:foo%0Abar@example/") - end - - it "should not accept newline in hostname" do - uri = Addressable::URI.parse("http://localhost/") - expect do - uri.host = "local\nhost" - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with ambiguous path" do - it "should raise an error" do - expect do - Addressable::URI.parse("::http") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with an invalid host" do - it "should raise an error" do - expect do - Addressable::URI.new(:host => "") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with a host consisting of " + - "sub-delims characters" do - it "should not raise an error" do - expect do - Addressable::URI.new( - :host => Addressable::URI::CharacterClasses::SUB_DELIMS.gsub(/\\/, '') - ) - end.not_to raise_error - end -end - -describe Addressable::URI, "when created with a host consisting of " + - "unreserved characters" do - it "should not raise an error" do - expect do - Addressable::URI.new( - :host => Addressable::URI::CharacterClasses::UNRESERVED.gsub(/\\/, '') - ) - end.not_to raise_error - end -end - -describe Addressable::URI, "when created from nil components" do - before do - @uri = Addressable::URI.new - end - - it "should have a nil site value" do - expect(@uri.site).to eq(nil) - end - - it "should have an empty path" do - expect(@uri.path).to eq("") - end - - it "should be an empty uri" do - expect(@uri.to_s).to eq("") - end - - it "should have a nil default port" do - expect(@uri.default_port).to eq(nil) - end - - it "should be empty" do - expect(@uri).to be_empty - end - - it "should raise an error if the scheme is set to whitespace" do - expect do - @uri.scheme = "\t \n" - end.to raise_error(Addressable::URI::InvalidURIError, /'\t \n'/) - end - - it "should raise an error if the scheme is set to all digits" do - expect do - @uri.scheme = "123" - end.to raise_error(Addressable::URI::InvalidURIError, /'123'/) - end - - it "should raise an error if the scheme begins with a digit" do - expect do - @uri.scheme = "1scheme" - end.to raise_error(Addressable::URI::InvalidURIError, /'1scheme'/) - end - - it "should raise an error if the scheme begins with a plus" do - expect do - @uri.scheme = "+scheme" - end.to raise_error(Addressable::URI::InvalidURIError, /'\+scheme'/) - end - - it "should raise an error if the scheme begins with a dot" do - expect do - @uri.scheme = ".scheme" - end.to raise_error(Addressable::URI::InvalidURIError, /'\.scheme'/) - end - - it "should raise an error if the scheme begins with a dash" do - expect do - @uri.scheme = "-scheme" - end.to raise_error(Addressable::URI::InvalidURIError, /'-scheme'/) - end - - it "should raise an error if the scheme contains an illegal character" do - expect do - @uri.scheme = "scheme!" - end.to raise_error(Addressable::URI::InvalidURIError, /'scheme!'/) - end - - it "should raise an error if the scheme contains whitespace" do - expect do - @uri.scheme = "sch eme" - end.to raise_error(Addressable::URI::InvalidURIError, /'sch eme'/) - end - - it "should raise an error if the scheme contains a newline" do - expect do - @uri.scheme = "sch\neme" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - expect do - @uri.user = "user" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - expect do - @uri.password = "pass" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - expect do - @uri.scheme = "http" - @uri.fragment = "fragment" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should raise an error if set into an invalid state" do - expect do - @uri.fragment = "fragment" - @uri.scheme = "http" - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when initialized from individual components" do - before do - @uri = Addressable::URI.new( - :scheme => "http", - :user => "user", - :password => "password", - :host => "example.com", - :port => 8080, - :path => "/path", - :query => "query=value", - :fragment => "fragment" - ) - end - - it "returns 'http' for #scheme" do - expect(@uri.scheme).to eq("http") - end - - it "returns 'http' for #normalized_scheme" do - expect(@uri.normalized_scheme).to eq("http") - end - - it "returns 'user' for #user" do - expect(@uri.user).to eq("user") - end - - it "returns 'user' for #normalized_user" do - expect(@uri.normalized_user).to eq("user") - end - - it "returns 'password' for #password" do - expect(@uri.password).to eq("password") - end - - it "returns 'password' for #normalized_password" do - expect(@uri.normalized_password).to eq("password") - end - - it "returns 'user:password' for #userinfo" do - expect(@uri.userinfo).to eq("user:password") - end - - it "returns 'user:password' for #normalized_userinfo" do - expect(@uri.normalized_userinfo).to eq("user:password") - end - - it "returns 'example.com' for #host" do - expect(@uri.host).to eq("example.com") - end - - it "returns 'example.com' for #normalized_host" do - expect(@uri.normalized_host).to eq("example.com") - end - - it "returns 'com' for #tld" do - expect(@uri.tld).to eq("com") - end - - it "returns 'user:password@example.com:8080' for #authority" do - expect(@uri.authority).to eq("user:password@example.com:8080") - end - - it "returns 'user:password@example.com:8080' for #normalized_authority" do - expect(@uri.normalized_authority).to eq("user:password@example.com:8080") - end - - it "returns 8080 for #port" do - expect(@uri.port).to eq(8080) - end - - it "returns 8080 for #normalized_port" do - expect(@uri.normalized_port).to eq(8080) - end - - it "returns 80 for #default_port" do - expect(@uri.default_port).to eq(80) - end - - it "returns 'http://user:password@example.com:8080' for #site" do - expect(@uri.site).to eq("http://user:password@example.com:8080") - end - - it "returns 'http://user:password@example.com:8080' for #normalized_site" do - expect(@uri.normalized_site).to eq("http://user:password@example.com:8080") - end - - it "returns '/path' for #path" do - expect(@uri.path).to eq("/path") - end - - it "returns '/path' for #normalized_path" do - expect(@uri.normalized_path).to eq("/path") - end - - it "returns 'query=value' for #query" do - expect(@uri.query).to eq("query=value") - end - - it "returns 'query=value' for #normalized_query" do - expect(@uri.normalized_query).to eq("query=value") - end - - it "returns 'fragment' for #fragment" do - expect(@uri.fragment).to eq("fragment") - end - - it "returns 'fragment' for #normalized_fragment" do - expect(@uri.normalized_fragment).to eq("fragment") - end - - it "returns #hash" do - expect(@uri.hash).not_to be nil - end - - it "returns #to_s" do - expect(@uri.to_s).to eq( - "http://user:password@example.com:8080/path?query=value#fragment" - ) - end - - it "should not be empty" do - expect(@uri).not_to be_empty - end - - it "should not be frozen" do - expect(@uri).not_to be_frozen - end - - it "should allow destructive operations" do - expect { @uri.normalize! }.not_to raise_error - end -end - -describe Addressable::URI, "when initialized from " + - "frozen individual components" do - before do - @uri = Addressable::URI.new( - :scheme => "http".freeze, - :user => "user".freeze, - :password => "password".freeze, - :host => "example.com".freeze, - :port => "8080".freeze, - :path => "/path".freeze, - :query => "query=value".freeze, - :fragment => "fragment".freeze - ) - end - - it "returns 'http' for #scheme" do - expect(@uri.scheme).to eq("http") - end - - it "returns 'http' for #normalized_scheme" do - expect(@uri.normalized_scheme).to eq("http") - end - - it "returns 'user' for #user" do - expect(@uri.user).to eq("user") - end - - it "returns 'user' for #normalized_user" do - expect(@uri.normalized_user).to eq("user") - end - - it "returns 'password' for #password" do - expect(@uri.password).to eq("password") - end - - it "returns 'password' for #normalized_password" do - expect(@uri.normalized_password).to eq("password") - end - - it "returns 'user:password' for #userinfo" do - expect(@uri.userinfo).to eq("user:password") - end - - it "returns 'user:password' for #normalized_userinfo" do - expect(@uri.normalized_userinfo).to eq("user:password") - end - - it "returns 'example.com' for #host" do - expect(@uri.host).to eq("example.com") - end - - it "returns 'example.com' for #normalized_host" do - expect(@uri.normalized_host).to eq("example.com") - end - - it "returns 'user:password@example.com:8080' for #authority" do - expect(@uri.authority).to eq("user:password@example.com:8080") - end - - it "returns 'user:password@example.com:8080' for #normalized_authority" do - expect(@uri.normalized_authority).to eq("user:password@example.com:8080") - end - - it "returns 8080 for #port" do - expect(@uri.port).to eq(8080) - end - - it "returns 8080 for #normalized_port" do - expect(@uri.normalized_port).to eq(8080) - end - - it "returns 80 for #default_port" do - expect(@uri.default_port).to eq(80) - end - - it "returns 'http://user:password@example.com:8080' for #site" do - expect(@uri.site).to eq("http://user:password@example.com:8080") - end - - it "returns 'http://user:password@example.com:8080' for #normalized_site" do - expect(@uri.normalized_site).to eq("http://user:password@example.com:8080") - end - - it "returns '/path' for #path" do - expect(@uri.path).to eq("/path") - end - - it "returns '/path' for #normalized_path" do - expect(@uri.normalized_path).to eq("/path") - end - - it "returns 'query=value' for #query" do - expect(@uri.query).to eq("query=value") - end - - it "returns 'query=value' for #normalized_query" do - expect(@uri.normalized_query).to eq("query=value") - end - - it "returns 'fragment' for #fragment" do - expect(@uri.fragment).to eq("fragment") - end - - it "returns 'fragment' for #normalized_fragment" do - expect(@uri.normalized_fragment).to eq("fragment") - end - - it "returns #hash" do - expect(@uri.hash).not_to be nil - end - - it "returns #to_s" do - expect(@uri.to_s).to eq( - "http://user:password@example.com:8080/path?query=value#fragment" - ) - end - - it "should not be empty" do - expect(@uri).not_to be_empty - end - - it "should not be frozen" do - expect(@uri).not_to be_frozen - end - - it "should allow destructive operations" do - expect { @uri.normalize! }.not_to raise_error - end -end - -describe Addressable::URI, "when parsed from a frozen string" do - before do - @uri = Addressable::URI.parse( - "http://user:password@example.com:8080/path?query=value#fragment".freeze - ) - end - - it "returns 'http' for #scheme" do - expect(@uri.scheme).to eq("http") - end - - it "returns 'http' for #normalized_scheme" do - expect(@uri.normalized_scheme).to eq("http") - end - - it "returns 'user' for #user" do - expect(@uri.user).to eq("user") - end - - it "returns 'user' for #normalized_user" do - expect(@uri.normalized_user).to eq("user") - end - - it "returns 'password' for #password" do - expect(@uri.password).to eq("password") - end - - it "returns 'password' for #normalized_password" do - expect(@uri.normalized_password).to eq("password") - end - - it "returns 'user:password' for #userinfo" do - expect(@uri.userinfo).to eq("user:password") - end - - it "returns 'user:password' for #normalized_userinfo" do - expect(@uri.normalized_userinfo).to eq("user:password") - end - - it "returns 'example.com' for #host" do - expect(@uri.host).to eq("example.com") - end - - it "returns 'example.com' for #normalized_host" do - expect(@uri.normalized_host).to eq("example.com") - end - - it "returns 'user:password@example.com:8080' for #authority" do - expect(@uri.authority).to eq("user:password@example.com:8080") - end - - it "returns 'user:password@example.com:8080' for #normalized_authority" do - expect(@uri.normalized_authority).to eq("user:password@example.com:8080") - end - - it "returns 8080 for #port" do - expect(@uri.port).to eq(8080) - end - - it "returns 8080 for #normalized_port" do - expect(@uri.normalized_port).to eq(8080) - end - - it "returns 80 for #default_port" do - expect(@uri.default_port).to eq(80) - end - - it "returns 'http://user:password@example.com:8080' for #site" do - expect(@uri.site).to eq("http://user:password@example.com:8080") - end - - it "returns 'http://user:password@example.com:8080' for #normalized_site" do - expect(@uri.normalized_site).to eq("http://user:password@example.com:8080") - end - - it "returns '/path' for #path" do - expect(@uri.path).to eq("/path") - end - - it "returns '/path' for #normalized_path" do - expect(@uri.normalized_path).to eq("/path") - end - - it "returns 'query=value' for #query" do - expect(@uri.query).to eq("query=value") - end - - it "returns 'query=value' for #normalized_query" do - expect(@uri.normalized_query).to eq("query=value") - end - - it "returns 'fragment' for #fragment" do - expect(@uri.fragment).to eq("fragment") - end - - it "returns 'fragment' for #normalized_fragment" do - expect(@uri.normalized_fragment).to eq("fragment") - end - - it "returns #hash" do - expect(@uri.hash).not_to be nil - end - - it "returns #to_s" do - expect(@uri.to_s).to eq( - "http://user:password@example.com:8080/path?query=value#fragment" - ) - end - - it "should not be empty" do - expect(@uri).not_to be_empty - end - - it "should not be frozen" do - expect(@uri).not_to be_frozen - end - - it "should allow destructive operations" do - expect { @uri.normalize! }.not_to raise_error - end -end - -describe Addressable::URI, "when frozen" do - before do - @uri = Addressable::URI.new.freeze - end - - it "returns nil for #scheme" do - expect(@uri.scheme).to eq(nil) - end - - it "returns nil for #normalized_scheme" do - expect(@uri.normalized_scheme).to eq(nil) - end - - it "returns nil for #user" do - expect(@uri.user).to eq(nil) - end - - it "returns nil for #normalized_user" do - expect(@uri.normalized_user).to eq(nil) - end - - it "returns nil for #password" do - expect(@uri.password).to eq(nil) - end - - it "returns nil for #normalized_password" do - expect(@uri.normalized_password).to eq(nil) - end - - it "returns nil for #userinfo" do - expect(@uri.userinfo).to eq(nil) - end - - it "returns nil for #normalized_userinfo" do - expect(@uri.normalized_userinfo).to eq(nil) - end - - it "returns nil for #host" do - expect(@uri.host).to eq(nil) - end - - it "returns nil for #normalized_host" do - expect(@uri.normalized_host).to eq(nil) - end - - it "returns nil for #authority" do - expect(@uri.authority).to eq(nil) - end - - it "returns nil for #normalized_authority" do - expect(@uri.normalized_authority).to eq(nil) - end - - it "returns nil for #port" do - expect(@uri.port).to eq(nil) - end - - it "returns nil for #normalized_port" do - expect(@uri.normalized_port).to eq(nil) - end - - it "returns nil for #default_port" do - expect(@uri.default_port).to eq(nil) - end - - it "returns nil for #site" do - expect(@uri.site).to eq(nil) - end - - it "returns nil for #normalized_site" do - expect(@uri.normalized_site).to eq(nil) - end - - it "returns '' for #path" do - expect(@uri.path).to eq('') - end - - it "returns '' for #normalized_path" do - expect(@uri.normalized_path).to eq('') - end - - it "returns nil for #query" do - expect(@uri.query).to eq(nil) - end - - it "returns nil for #normalized_query" do - expect(@uri.normalized_query).to eq(nil) - end - - it "returns nil for #fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "returns nil for #normalized_fragment" do - expect(@uri.normalized_fragment).to eq(nil) - end - - it "returns #hash" do - expect(@uri.hash).not_to be nil - end - - it "returns #to_s" do - expect(@uri.to_s).to eq('') - end - - it "should be empty" do - expect(@uri).to be_empty - end - - it "should be frozen" do - expect(@uri).to be_frozen - end - - it "should not be frozen after duping" do - expect(@uri.dup).not_to be_frozen - end - - it "should not allow destructive operations" do - expect { @uri.normalize! }.to raise_error { |error| - expect(error.message).to match(/can't modify frozen/) - expect(error).to satisfy { |e| RuntimeError === e || TypeError === e } - } - end -end - -describe Addressable::URI, "when frozen" do - before do - @uri = Addressable::URI.parse( - "HTTP://example.com.:%38%30/%70a%74%68?a=%31#1%323" - ).freeze - end - - it "returns 'HTTP' for #scheme" do - expect(@uri.scheme).to eq("HTTP") - end - - it "returns 'http' for #normalized_scheme" do - expect(@uri.normalized_scheme).to eq("http") - expect(@uri.normalize.scheme).to eq("http") - end - - it "returns nil for #user" do - expect(@uri.user).to eq(nil) - end - - it "returns nil for #normalized_user" do - expect(@uri.normalized_user).to eq(nil) - end - - it "returns nil for #password" do - expect(@uri.password).to eq(nil) - end - - it "returns nil for #normalized_password" do - expect(@uri.normalized_password).to eq(nil) - end - - it "returns nil for #userinfo" do - expect(@uri.userinfo).to eq(nil) - end - - it "returns nil for #normalized_userinfo" do - expect(@uri.normalized_userinfo).to eq(nil) - end - - it "returns 'example.com.' for #host" do - expect(@uri.host).to eq("example.com.") - end - - it "returns nil for #normalized_host" do - expect(@uri.normalized_host).to eq("example.com") - expect(@uri.normalize.host).to eq("example.com") - end - - it "returns 'example.com.:80' for #authority" do - expect(@uri.authority).to eq("example.com.:80") - end - - it "returns 'example.com:80' for #normalized_authority" do - expect(@uri.normalized_authority).to eq("example.com") - expect(@uri.normalize.authority).to eq("example.com") - end - - it "returns 80 for #port" do - expect(@uri.port).to eq(80) - end - - it "returns nil for #normalized_port" do - expect(@uri.normalized_port).to eq(nil) - expect(@uri.normalize.port).to eq(nil) - end - - it "returns 80 for #default_port" do - expect(@uri.default_port).to eq(80) - end - - it "returns 'HTTP://example.com.:80' for #site" do - expect(@uri.site).to eq("HTTP://example.com.:80") - end - - it "returns 'http://example.com' for #normalized_site" do - expect(@uri.normalized_site).to eq("http://example.com") - expect(@uri.normalize.site).to eq("http://example.com") - end - - it "returns '/%70a%74%68' for #path" do - expect(@uri.path).to eq("/%70a%74%68") - end - - it "returns '/path' for #normalized_path" do - expect(@uri.normalized_path).to eq("/path") - expect(@uri.normalize.path).to eq("/path") - end - - it "returns 'a=%31' for #query" do - expect(@uri.query).to eq("a=%31") - end - - it "returns 'a=1' for #normalized_query" do - expect(@uri.normalized_query).to eq("a=1") - expect(@uri.normalize.query).to eq("a=1") - end - - it "returns '/%70a%74%68?a=%31' for #request_uri" do - expect(@uri.request_uri).to eq("/%70a%74%68?a=%31") - end - - it "returns '1%323' for #fragment" do - expect(@uri.fragment).to eq("1%323") - end - - it "returns '123' for #normalized_fragment" do - expect(@uri.normalized_fragment).to eq("123") - expect(@uri.normalize.fragment).to eq("123") - end - - it "returns #hash" do - expect(@uri.hash).not_to be nil - end - - it "returns #to_s" do - expect(@uri.to_s).to eq('HTTP://example.com.:80/%70a%74%68?a=%31#1%323') - expect(@uri.normalize.to_s).to eq('http://example.com/path?a=1#123') - end - - it "should not be empty" do - expect(@uri).not_to be_empty - end - - it "should be frozen" do - expect(@uri).to be_frozen - end - - it "should not be frozen after duping" do - expect(@uri.dup).not_to be_frozen - end - - it "should not allow destructive operations" do - expect { @uri.normalize! }.to raise_error { |error| - expect(error.message).to match(/can't modify frozen/) - expect(error).to satisfy { |e| RuntimeError === e || TypeError === e } - } - end -end - -describe Addressable::URI, "when normalized and then deeply frozen" do - before do - @uri = Addressable::URI.parse( - "http://user:password@example.com:8080/path?query=value#fragment" - ).normalize! - - @uri.instance_variables.each do |var| - @uri.instance_variable_set(var, @uri.instance_variable_get(var).freeze) - end - - @uri.freeze - end - - it "#normalized_scheme should not error" do - expect { @uri.normalized_scheme }.not_to raise_error - end - - it "#normalized_user should not error" do - expect { @uri.normalized_user }.not_to raise_error - end - - it "#normalized_password should not error" do - expect { @uri.normalized_password }.not_to raise_error - end - - it "#normalized_userinfo should not error" do - expect { @uri.normalized_userinfo }.not_to raise_error - end - - it "#normalized_host should not error" do - expect { @uri.normalized_host }.not_to raise_error - end - - it "#normalized_authority should not error" do - expect { @uri.normalized_authority }.not_to raise_error - end - - it "#normalized_port should not error" do - expect { @uri.normalized_port }.not_to raise_error - end - - it "#normalized_site should not error" do - expect { @uri.normalized_site }.not_to raise_error - end - - it "#normalized_path should not error" do - expect { @uri.normalized_path }.not_to raise_error - end - - it "#normalized_query should not error" do - expect { @uri.normalized_query }.not_to raise_error - end - - it "#normalized_fragment should not error" do - expect { @uri.normalized_fragment }.not_to raise_error - end - - it "should be frozen" do - expect(@uri).to be_frozen - end - - it "should not allow destructive operations" do - expect { @uri.normalize! }.to raise_error(RuntimeError) - end -end - -describe Addressable::URI, "when created from string components" do - before do - @uri = Addressable::URI.new( - :scheme => "http", :host => "example.com" - ) - end - - it "should have a site value of 'http://example.com'" do - expect(@uri.site).to eq("http://example.com") - end - - it "should be equal to the equivalent parsed URI" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com")) - end - - it "should raise an error if invalid components omitted" do - expect do - @uri.omit(:bogus) - end.to raise_error(ArgumentError) - expect do - @uri.omit(:scheme, :bogus, :path) - end.to raise_error(ArgumentError) - end -end - -describe Addressable::URI, "when created with a nil host but " + - "non-nil authority components" do - it "should raise an error" do - expect do - Addressable::URI.new(:user => "user", :password => "pass", :port => 80) - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with both an authority and a user" do - it "should raise an error" do - expect do - Addressable::URI.new( - :user => "user", :authority => "user@example.com:80" - ) - end.to raise_error(ArgumentError) - end -end - -describe Addressable::URI, "when created with an authority and no port" do - before do - @uri = Addressable::URI.new(:authority => "user@example.com") - end - - it "should not infer a port" do - expect(@uri.port).to eq(nil) - expect(@uri.default_port).to eq(nil) - expect(@uri.inferred_port).to eq(nil) - end - - it "should have a site value of '//user@example.com'" do - expect(@uri.site).to eq("//user@example.com") - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when created with a host with trailing dots" do - before do - @uri = Addressable::URI.new(:authority => "example...") - end - - it "should have a stable normalized form" do - expect(@uri.normalize.normalize.normalize.host).to eq( - @uri.normalize.host - ) - end -end - -describe Addressable::URI, "when created with a host with a backslash" do - it "should raise an error" do - expect do - Addressable::URI.new(:authority => "example\\example") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with a host with a slash" do - it "should raise an error" do - expect do - Addressable::URI.new(:authority => "example/example") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with a host with a space" do - it "should raise an error" do - expect do - Addressable::URI.new(:authority => "example example") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when created with both a userinfo and a user" do - it "should raise an error" do - expect do - Addressable::URI.new(:user => "user", :userinfo => "user:pass") - end.to raise_error(ArgumentError) - end -end - -describe Addressable::URI, "when created with a path that hasn't been " + - "prefixed with a '/' but a host specified" do - before do - @uri = Addressable::URI.new( - :scheme => "http", :host => "example.com", :path => "path" - ) - end - - it "should prefix a '/' to the path" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com/path")) - end - - it "should have a site value of 'http://example.com'" do - expect(@uri.site).to eq("http://example.com") - end - - it "should have an origin of 'http://example.com" do - expect(@uri.origin).to eq('http://example.com') - end -end - -describe Addressable::URI, "when created with a path that hasn't been " + - "prefixed with a '/' but no host specified" do - before do - @uri = Addressable::URI.new( - :scheme => "http", :path => "path" - ) - end - - it "should not prefix a '/' to the path" do - expect(@uri).to eq(Addressable::URI.parse("http:path")) - end - - it "should have a site value of 'http:'" do - expect(@uri.site).to eq("http:") - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from an Addressable::URI object" do - it "should not have unexpected side-effects" do - original_uri = Addressable::URI.parse("http://example.com/") - new_uri = Addressable::URI.parse(original_uri) - new_uri.host = 'www.example.com' - expect(new_uri.host).to eq('www.example.com') - expect(new_uri.to_s).to eq('http://www.example.com/') - expect(original_uri.host).to eq('example.com') - expect(original_uri.to_s).to eq('http://example.com/') - end - - it "should not have unexpected side-effects" do - original_uri = Addressable::URI.parse("http://example.com/") - new_uri = Addressable::URI.heuristic_parse(original_uri) - new_uri.host = 'www.example.com' - expect(new_uri.host).to eq('www.example.com') - expect(new_uri.to_s).to eq('http://www.example.com/') - expect(original_uri.host).to eq('example.com') - expect(original_uri.to_s).to eq('http://example.com/') - end - - it "should not have unexpected side-effects" do - original_uri = Addressable::URI.parse("http://example.com/") - new_uri = Addressable::URI.parse(original_uri) - new_uri.origin = 'https://www.example.com:8080' - expect(new_uri.host).to eq('www.example.com') - expect(new_uri.to_s).to eq('https://www.example.com:8080/') - expect(original_uri.host).to eq('example.com') - expect(original_uri.to_s).to eq('http://example.com/') - end - - it "should not have unexpected side-effects" do - original_uri = Addressable::URI.parse("http://example.com/") - new_uri = Addressable::URI.heuristic_parse(original_uri) - new_uri.origin = 'https://www.example.com:8080' - expect(new_uri.host).to eq('www.example.com') - expect(new_uri.to_s).to eq('https://www.example.com:8080/') - expect(original_uri.host).to eq('example.com') - expect(original_uri.to_s).to eq('http://example.com/') - end -end - -describe Addressable::URI, "when parsed from something that looks " + - "like a URI object" do - it "should parse without error" do - uri = Addressable::URI.parse(Fake::URI::HTTP.new("http://example.com/")) - expect do - Addressable::URI.parse(uri) - end.not_to raise_error - end -end - -describe Addressable::URI, "when parsed from a standard library URI object" do - it "should parse without error" do - uri = Addressable::URI.parse(URI.parse("http://example.com/")) - expect do - Addressable::URI.parse(uri) - end.not_to raise_error - end -end - -describe Addressable::URI, "when parsed from ''" do - before do - @uri = Addressable::URI.parse("") - end - - it "should have no scheme" do - expect(@uri.scheme).to eq(nil) - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should have a path of ''" do - expect(@uri.path).to eq("") - end - - it "should have a request URI of '/'" do - expect(@uri.request_uri).to eq("/") - end - - it "should be considered relative" do - expect(@uri).to be_relative - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'ftp://ftp.is.co.za/rfc/rfc1808.txt'" do - before do - @uri = Addressable::URI.parse("ftp://ftp.is.co.za/rfc/rfc1808.txt") - end - - it "should use the 'ftp' scheme" do - expect(@uri.scheme).to eq("ftp") - end - - it "should be considered to be ip-based" do - expect(@uri).to be_ip_based - end - - it "should have a host of 'ftp.is.co.za'" do - expect(@uri.host).to eq("ftp.is.co.za") - end - - it "should have inferred_port of 21" do - expect(@uri.inferred_port).to eq(21) - end - - it "should have a path of '/rfc/rfc1808.txt'" do - expect(@uri.path).to eq("/rfc/rfc1808.txt") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have an origin of 'ftp://ftp.is.co.za'" do - expect(@uri.origin).to eq('ftp://ftp.is.co.za') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'http://www.ietf.org/rfc/rfc2396.txt'" do - before do - @uri = Addressable::URI.parse("http://www.ietf.org/rfc/rfc2396.txt") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should be considered to be ip-based" do - expect(@uri).to be_ip_based - end - - it "should have a host of 'www.ietf.org'" do - expect(@uri.host).to eq("www.ietf.org") - end - - it "should have inferred_port of 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/rfc/rfc2396.txt'" do - expect(@uri.path).to eq("/rfc/rfc2396.txt") - end - - it "should have a request URI of '/rfc/rfc2396.txt'" do - expect(@uri.request_uri).to eq("/rfc/rfc2396.txt") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should correctly omit components" do - expect(@uri.omit(:scheme).to_s).to eq("//www.ietf.org/rfc/rfc2396.txt") - expect(@uri.omit(:path).to_s).to eq("http://www.ietf.org") - end - - it "should correctly omit components destructively" do - @uri.omit!(:scheme) - expect(@uri.to_s).to eq("//www.ietf.org/rfc/rfc2396.txt") - end - - it "should have an origin of 'http://www.ietf.org'" do - expect(@uri.origin).to eq('http://www.ietf.org') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'ldap://[2001:db8::7]/c=GB?objectClass?one'" do - before do - @uri = Addressable::URI.parse("ldap://[2001:db8::7]/c=GB?objectClass?one") - end - - it "should use the 'ldap' scheme" do - expect(@uri.scheme).to eq("ldap") - end - - it "should be considered to be ip-based" do - expect(@uri).to be_ip_based - end - - it "should have a host of '[2001:db8::7]'" do - expect(@uri.host).to eq("[2001:db8::7]") - end - - it "should have inferred_port of 389" do - expect(@uri.inferred_port).to eq(389) - end - - it "should have a path of '/c=GB'" do - expect(@uri.path).to eq("/c=GB") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should not allow request URI assignment" do - expect do - @uri.request_uri = "/" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should have a query of 'objectClass?one'" do - expect(@uri.query).to eq("objectClass?one") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should correctly omit components" do - expect(@uri.omit(:scheme, :authority).to_s).to eq("/c=GB?objectClass?one") - expect(@uri.omit(:path).to_s).to eq("ldap://[2001:db8::7]?objectClass?one") - end - - it "should correctly omit components destructively" do - @uri.omit!(:scheme, :authority) - expect(@uri.to_s).to eq("/c=GB?objectClass?one") - end - - it "should raise an error if omission would create an invalid URI" do - expect do - @uri.omit(:authority, :path) - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should have an origin of 'ldap://[2001:db8::7]'" do - expect(@uri.origin).to eq('ldap://[2001:db8::7]') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'mailto:John.Doe@example.com'" do - before do - @uri = Addressable::URI.parse("mailto:John.Doe@example.com") - end - - it "should use the 'mailto' scheme" do - expect(@uri.scheme).to eq("mailto") - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should not have an inferred_port" do - expect(@uri.inferred_port).to eq(nil) - end - - it "should have a path of 'John.Doe@example.com'" do - expect(@uri.path).to eq("John.Doe@example.com") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -# Section 2 of RFC 6068 -describe Addressable::URI, "when parsed from " + - "'mailto:?to=addr1@an.example,addr2@an.example'" do - before do - @uri = Addressable::URI.parse( - "mailto:?to=addr1@an.example,addr2@an.example" - ) - end - - it "should use the 'mailto' scheme" do - expect(@uri.scheme).to eq("mailto") - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should not have an inferred_port" do - expect(@uri.inferred_port).to eq(nil) - end - - it "should have a path of ''" do - expect(@uri.path).to eq("") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should have the To: field value parameterized" do - expect(@uri.query_values(Hash)["to"]).to eq( - "addr1@an.example,addr2@an.example" - ) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'news:comp.infosystems.www.servers.unix'" do - before do - @uri = Addressable::URI.parse("news:comp.infosystems.www.servers.unix") - end - - it "should use the 'news' scheme" do - expect(@uri.scheme).to eq("news") - end - - it "should not have an inferred_port" do - expect(@uri.inferred_port).to eq(nil) - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should have a path of 'comp.infosystems.www.servers.unix'" do - expect(@uri.path).to eq("comp.infosystems.www.servers.unix") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'tel:+1-816-555-1212'" do - before do - @uri = Addressable::URI.parse("tel:+1-816-555-1212") - end - - it "should use the 'tel' scheme" do - expect(@uri.scheme).to eq("tel") - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should not have an inferred_port" do - expect(@uri.inferred_port).to eq(nil) - end - - it "should have a path of '+1-816-555-1212'" do - expect(@uri.path).to eq("+1-816-555-1212") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'telnet://192.0.2.16:80/'" do - before do - @uri = Addressable::URI.parse("telnet://192.0.2.16:80/") - end - - it "should use the 'telnet' scheme" do - expect(@uri.scheme).to eq("telnet") - end - - it "should have a host of '192.0.2.16'" do - expect(@uri.host).to eq("192.0.2.16") - end - - it "should have a port of 80" do - expect(@uri.port).to eq(80) - end - - it "should have a inferred_port of 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a default_port of 23" do - expect(@uri.default_port).to eq(23) - end - - it "should be considered to be ip-based" do - expect(@uri).to be_ip_based - end - - it "should have a path of '/'" do - expect(@uri.path).to eq("/") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have an origin of 'telnet://192.0.2.16:80'" do - expect(@uri.origin).to eq('telnet://192.0.2.16:80') - end -end - -# Section 1.1.2 of RFC 3986 -describe Addressable::URI, "when parsed from " + - "'urn:oasis:names:specification:docbook:dtd:xml:4.1.2'" do - before do - @uri = Addressable::URI.parse( - "urn:oasis:names:specification:docbook:dtd:xml:4.1.2") - end - - it "should use the 'urn' scheme" do - expect(@uri.scheme).to eq("urn") - end - - it "should not have an inferred_port" do - expect(@uri.inferred_port).to eq(nil) - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should have a path of " + - "'oasis:names:specification:docbook:dtd:xml:4.1.2'" do - expect(@uri.path).to eq("oasis:names:specification:docbook:dtd:xml:4.1.2") - end - - it "should not have a request URI" do - expect(@uri.request_uri).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when heuristically parsed from " + - "'192.0.2.16:8000/path'" do - before do - @uri = Addressable::URI.heuristic_parse("192.0.2.16:8000/path") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have a host of '192.0.2.16'" do - expect(@uri.host).to eq("192.0.2.16") - end - - it "should have a port of '8000'" do - expect(@uri.port).to eq(8000) - end - - it "should be considered to be ip-based" do - expect(@uri).to be_ip_based - end - - it "should have a path of '/path'" do - expect(@uri.path).to eq("/path") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have an origin of 'http://192.0.2.16:8000'" do - expect(@uri.origin).to eq('http://192.0.2.16:8000') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com'" do - before do - @uri = Addressable::URI.parse("http://example.com") - end - - it "when inspected, should have the correct URI" do - expect(@uri.inspect).to include("http://example.com") - end - - it "when inspected, should have the correct class name" do - expect(@uri.inspect).to include("Addressable::URI") - end - - it "when inspected, should have the correct object id" do - expect(@uri.inspect).to include("%#0x" % @uri.object_id) - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should be considered to be ip-based" do - expect(@uri).to be_ip_based - end - - it "should have an authority segment of 'example.com'" do - expect(@uri.authority).to eq("example.com") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should be considered ip-based" do - expect(@uri).to be_ip_based - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should not have a specified port" do - expect(@uri.port).to eq(nil) - end - - it "should have an empty path" do - expect(@uri.path).to eq("") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - expect(@uri.query_values).to eq(nil) - end - - it "should have a request URI of '/'" do - expect(@uri.request_uri).to eq("/") - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should be considered absolute" do - expect(@uri).to be_absolute - end - - it "should not be considered relative" do - expect(@uri).not_to be_relative - end - - it "should not be exactly equal to 42" do - expect(@uri.eql?(42)).to eq(false) - end - - it "should not be equal to 42" do - expect(@uri == 42).to eq(false) - end - - it "should not be roughly equal to 42" do - expect(@uri === 42).to eq(false) - end - - it "should be exactly equal to http://example.com" do - expect(@uri.eql?(Addressable::URI.parse("http://example.com"))).to eq(true) - end - - it "should be roughly equal to http://example.com/" do - expect(@uri === Addressable::URI.parse("http://example.com/")).to eq(true) - end - - it "should be roughly equal to the string 'http://example.com/'" do - expect(@uri === "http://example.com/").to eq(true) - end - - it "should not be roughly equal to the string " + - "'http://example.com:bogus/'" do - expect do - expect(@uri === "http://example.com:bogus/").to eq(false) - end.not_to raise_error - end - - it "should result in itself when joined with itself" do - expect(@uri.join(@uri).to_s).to eq("http://example.com") - expect(@uri.join!(@uri).to_s).to eq("http://example.com") - end - - it "should be equivalent to http://EXAMPLE.com" do - expect(@uri).to eq(Addressable::URI.parse("http://EXAMPLE.com")) - end - - it "should be equivalent to http://EXAMPLE.com:80/" do - expect(@uri).to eq(Addressable::URI.parse("http://EXAMPLE.com:80/")) - end - - it "should have the same hash as http://example.com" do - expect(@uri.hash).to eq(Addressable::URI.parse("http://example.com").hash) - end - - it "should have the same hash as http://EXAMPLE.com after assignment" do - @uri.origin = "http://EXAMPLE.com" - expect(@uri.hash).to eq(Addressable::URI.parse("http://EXAMPLE.com").hash) - end - - it "should have a different hash from http://EXAMPLE.com" do - expect(@uri.hash).not_to eq(Addressable::URI.parse("http://EXAMPLE.com").hash) - end - - it "should not allow origin assignment without scheme" do - expect do - @uri.origin = "example.com" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should not allow origin assignment without host" do - expect do - @uri.origin = "http://" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should not allow origin assignment with bogus type" do - expect do - @uri.origin = :bogus - end.to raise_error(TypeError) - end - - # Section 6.2.3 of RFC 3986 - it "should be equivalent to http://example.com/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com/")) - end - - # Section 6.2.3 of RFC 3986 - it "should be equivalent to http://example.com:/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com:/")) - end - - # Section 6.2.3 of RFC 3986 - it "should be equivalent to http://example.com:80/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com:80/")) - end - - # Section 6.2.2.1 of RFC 3986 - it "should be equivalent to http://EXAMPLE.COM/" do - expect(@uri).to eq(Addressable::URI.parse("http://EXAMPLE.COM/")) - end - - it "should have a route of '/path/' to 'http://example.com/path/'" do - expect(@uri.route_to("http://example.com/path/")).to eq( - Addressable::URI.parse("/path/") - ) - end - - it "should have a route of '..' from 'http://example.com/path/'" do - expect(@uri.route_from("http://example.com/path/")).to eq( - Addressable::URI.parse("..") - ) - end - - it "should have a route of '#' to 'http://example.com/'" do - expect(@uri.route_to("http://example.com/")).to eq( - Addressable::URI.parse("#") - ) - end - - it "should have a route of 'http://elsewhere.com/' to " + - "'http://elsewhere.com/'" do - expect(@uri.route_to("http://elsewhere.com/")).to eq( - Addressable::URI.parse("http://elsewhere.com/") - ) - end - - it "when joined with 'relative/path' should be " + - "'http://example.com/relative/path'" do - expect(@uri.join('relative/path')).to eq( - Addressable::URI.parse("http://example.com/relative/path") - ) - end - - it "when joined with a bogus object a TypeError should be raised" do - expect do - @uri.join(42) - end.to raise_error(TypeError) - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq(nil) - expect(@uri.to_s).to eq("http://newuser@example.com") - end - - it "should have the correct username after assignment" do - @uri.user = "user@123!" - expect(@uri.user).to eq("user@123!") - expect(@uri.normalized_user).to eq("user%40123%21") - expect(@uri.password).to eq(nil) - expect(@uri.normalize.to_s).to eq("http://user%40123%21@example.com/") - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - expect(@uri.user).to eq("") - expect(@uri.to_s).to eq("http://:newpass@example.com") - end - - it "should have the correct password after assignment" do - @uri.password = "#secret@123!" - expect(@uri.password).to eq("#secret@123!") - expect(@uri.normalized_password).to eq("%23secret%40123%21") - expect(@uri.user).to eq("") - expect(@uri.normalize.to_s).to eq("http://:%23secret%40123%21@example.com/") - expect(@uri.omit(:password).to_s).to eq("http://example.com") - end - - it "should have the correct user/pass after repeated assignment" do - @uri.user = nil - expect(@uri.user).to eq(nil) - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - # Username cannot be nil if the password is set - expect(@uri.user).to eq("") - expect(@uri.to_s).to eq("http://:newpass@example.com") - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - @uri.password = nil - expect(@uri.password).to eq(nil) - expect(@uri.to_s).to eq("http://newuser@example.com") - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - @uri.password = "" - expect(@uri.password).to eq("") - expect(@uri.to_s).to eq("http://newuser:@example.com") - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - @uri.user = nil - # Username cannot be nil if the password is set - expect(@uri.user).to eq("") - expect(@uri.to_s).to eq("http://:newpass@example.com") - end - - it "should have the correct user/pass after userinfo assignment" do - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - @uri.userinfo = nil - expect(@uri.userinfo).to eq(nil) - expect(@uri.user).to eq(nil) - expect(@uri.password).to eq(nil) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end -end - -# Section 5.1.2 of RFC 2616 -describe Addressable::URI, "when parsed from " + - "'HTTP://www.w3.org/pub/WWW/TheProject.html'" do - before do - @uri = Addressable::URI.parse("HTTP://www.w3.org/pub/WWW/TheProject.html") - end - - it "should have the correct request URI" do - expect(@uri.request_uri).to eq("/pub/WWW/TheProject.html") - end - - it "should have the correct request URI after assignment" do - @uri.request_uri = "/pub/WWW/TheProject.html?" - expect(@uri.request_uri).to eq("/pub/WWW/TheProject.html?") - expect(@uri.path).to eq("/pub/WWW/TheProject.html") - expect(@uri.query).to eq("") - end - - it "should have the correct request URI after assignment" do - @uri.request_uri = "/some/where/else.html" - expect(@uri.request_uri).to eq("/some/where/else.html") - expect(@uri.path).to eq("/some/where/else.html") - expect(@uri.query).to eq(nil) - end - - it "should have the correct request URI after assignment" do - @uri.request_uri = "/some/where/else.html?query?string" - expect(@uri.request_uri).to eq("/some/where/else.html?query?string") - expect(@uri.path).to eq("/some/where/else.html") - expect(@uri.query).to eq("query?string") - end - - it "should have the correct request URI after assignment" do - @uri.request_uri = "?x=y" - expect(@uri.request_uri).to eq("/?x=y") - expect(@uri.path).to eq("/") - expect(@uri.query).to eq("x=y") - end - - it "should raise an error if the site value is set to something bogus" do - expect do - @uri.site = 42 - end.to raise_error(TypeError) - end - - it "should raise an error if the request URI is set to something bogus" do - expect do - @uri.request_uri = 42 - end.to raise_error(TypeError) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "HTTP", - :user => nil, - :password => nil, - :host => "www.w3.org", - :port => nil, - :path => "/pub/WWW/TheProject.html", - :query => nil, - :fragment => nil - }) - end - - it "should have an origin of 'http://www.w3.org'" do - expect(@uri.origin).to eq('http://www.w3.org') - end -end - -describe Addressable::URI, "when parsing IPv6 addresses" do - it "should not raise an error for " + - "'http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[fe80:0:0:0:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[fe80:0:0:0:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[fe80::200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[fe80::200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[::1]/'" do - Addressable::URI.parse("http://[::1]/") - end - - it "should not raise an error for " + - "'http://[fe80::1]/'" do - Addressable::URI.parse("http://[fe80::1]/") - end - - it "should raise an error for " + - "'http://[]/'" do - expect do - Addressable::URI.parse("http://[]/") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when parsing IPv6 address" do - subject { Addressable::URI.parse("http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/") } - its(:host) { should == '[3ffe:1900:4545:3:200:f8ff:fe21:67cf]' } - its(:hostname) { should == '3ffe:1900:4545:3:200:f8ff:fe21:67cf' } -end - -describe Addressable::URI, "when assigning IPv6 address" do - it "should allow to set bare IPv6 address as hostname" do - uri = Addressable::URI.parse("http://[::1]/") - uri.hostname = '3ffe:1900:4545:3:200:f8ff:fe21:67cf' - expect(uri.to_s).to eq('http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/') - end - - it "should allow to set bare IPv6 address as hostname with IPAddr object" do - uri = Addressable::URI.parse("http://[::1]/") - uri.hostname = IPAddr.new('3ffe:1900:4545:3:200:f8ff:fe21:67cf') - expect(uri.to_s).to eq('http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]/') - end - - it "should not allow to set bare IPv6 address as host" do - uri = Addressable::URI.parse("http://[::1]/") - skip "not checked" - expect do - uri.host = '3ffe:1900:4545:3:200:f8ff:fe21:67cf' - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when parsing IPvFuture addresses" do - it "should not raise an error for " + - "'http://[v9.3ffe:1900:4545:3:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[v9.3ffe:1900:4545:3:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[vff.fe80:0:0:0:200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[vff.fe80:0:0:0:200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[v12.fe80::200:f8ff:fe21:67cf]/'" do - Addressable::URI.parse("http://[v12.fe80::200:f8ff:fe21:67cf]/") - end - - it "should not raise an error for " + - "'http://[va0.::1]/'" do - Addressable::URI.parse("http://[va0.::1]/") - end - - it "should not raise an error for " + - "'http://[v255.fe80::1]/'" do - Addressable::URI.parse("http://[v255.fe80::1]/") - end - - it "should raise an error for " + - "'http://[v0.]/'" do - expect do - Addressable::URI.parse("http://[v0.]/") - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/'" do - before do - @uri = Addressable::URI.parse("http://example.com/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com")) - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to HTTP://example.com/" do - expect(@uri).to eq(Addressable::URI.parse("HTTP://example.com/")) - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com:/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com:/")) - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com:80/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com:80/")) - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://Example.com/" do - expect(@uri).to eq(Addressable::URI.parse("http://Example.com/")) - end - - it "should have the correct username after assignment" do - @uri.user = nil - expect(@uri.user).to eq(nil) - expect(@uri.password).to eq(nil) - expect(@uri.to_s).to eq("http://example.com/") - end - - it "should have the correct password after assignment" do - @uri.password = nil - expect(@uri.password).to eq(nil) - expect(@uri.user).to eq(nil) - expect(@uri.to_s).to eq("http://example.com/") - end - - it "should have a request URI of '/'" do - expect(@uri.request_uri).to eq("/") - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "/", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have the same hash as its duplicate" do - expect(@uri.hash).to eq(@uri.dup.hash) - end - - it "should have a different hash from its equivalent String value" do - expect(@uri.hash).not_to eq(@uri.to_s.hash) - end - - it "should have the same hash as an equal URI" do - expect(@uri.hash).to eq(Addressable::URI.parse("http://example.com/").hash) - end - - it "should be equivalent to http://EXAMPLE.com" do - expect(@uri).to eq(Addressable::URI.parse("http://EXAMPLE.com")) - end - - it "should be equivalent to http://EXAMPLE.com:80/" do - expect(@uri).to eq(Addressable::URI.parse("http://EXAMPLE.com:80/")) - end - - it "should have the same hash as http://example.com/" do - expect(@uri.hash).to eq(Addressable::URI.parse("http://example.com/").hash) - end - - it "should have the same hash as http://example.com after assignment" do - @uri.path = "" - expect(@uri.hash).to eq(Addressable::URI.parse("http://example.com").hash) - end - - it "should have the same hash as http://example.com/? after assignment" do - @uri.query = "" - expect(@uri.hash).to eq(Addressable::URI.parse("http://example.com/?").hash) - end - - it "should have the same hash as http://example.com/? after assignment" do - @uri.query_values = {} - expect(@uri.hash).to eq(Addressable::URI.parse("http://example.com/?").hash) - end - - it "should have the same hash as http://example.com/# after assignment" do - @uri.fragment = "" - expect(@uri.hash).to eq(Addressable::URI.parse("http://example.com/#").hash) - end - - it "should have a different hash from http://example.com" do - expect(@uri.hash).not_to eq(Addressable::URI.parse("http://example.com").hash) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com?#'" do - before do - @uri = Addressable::URI.parse("http://example.com?#") - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "", - :query => "", - :fragment => "" - }) - end - - it "should have a request URI of '/?'" do - expect(@uri.request_uri).to eq("/?") - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq("http://example.com") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://@example.com/'" do - before do - @uri = Addressable::URI.parse("http://@example.com/") - end - - it "should be equivalent to http://example.com" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com")) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => "", - :password => nil, - :host => "example.com", - :port => nil, - :path => "/", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com./'" do - before do - @uri = Addressable::URI.parse("http://example.com./") - end - - it "should be equivalent to http://example.com" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com")) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://:@example.com/'" do - before do - @uri = Addressable::URI.parse("http://:@example.com/") - end - - it "should be equivalent to http://example.com" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com")) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => "", - :password => "", - :host => "example.com", - :port => nil, - :path => "/", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'HTTP://EXAMPLE.COM/'" do - before do - @uri = Addressable::URI.parse("HTTP://EXAMPLE.COM/") - end - - it "should be equivalent to http://example.com" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com")) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "HTTP", - :user => nil, - :password => nil, - :host => "EXAMPLE.COM", - :port => nil, - :path => "/", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end - - it "should have a tld of 'com'" do - expect(@uri.tld).to eq('com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.example.co.uk/'" do - before do - @uri = Addressable::URI.parse("http://www.example.co.uk/") - end - - it "should have an origin of 'http://www.example.co.uk'" do - expect(@uri.origin).to eq('http://www.example.co.uk') - end - - it "should have a tld of 'co.uk'" do - expect(@uri.tld).to eq('co.uk') - end - - it "should have a domain of 'example.co.uk'" do - expect(@uri.domain).to eq('example.co.uk') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://sub_domain.blogspot.com/'" do - before do - @uri = Addressable::URI.parse("http://sub_domain.blogspot.com/") - end - - it "should have an origin of 'http://sub_domain.blogspot.com'" do - expect(@uri.origin).to eq('http://sub_domain.blogspot.com') - end - - it "should have a tld of 'com'" do - expect(@uri.tld).to eq('com') - end - - it "should have a domain of 'blogspot.com'" do - expect(@uri.domain).to eq('blogspot.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/~smith/'" do - before do - @uri = Addressable::URI.parse("http://example.com/~smith/") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com/%7Esmith/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com/%7Esmith/")) - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to http://example.com/%7esmith/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com/%7esmith/")) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/%E8'" do - before do - @uri = Addressable::URI.parse("http://example.com/%E8") - end - - it "should not raise an exception when normalized" do - expect do - @uri.normalize - end.not_to raise_error - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should not change if encoded with the normalizing algorithm" do - expect(Addressable::URI.normalized_encode(@uri).to_s).to eq( - "http://example.com/%E8" - ) - expect(Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s).to be === - "http://example.com/%E8" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path%2Fsegment/'" do - before do - @uri = Addressable::URI.parse("http://example.com/path%2Fsegment/") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should be equal to 'http://example.com/path%2Fsegment/'" do - expect(@uri.normalize).to be_eql( - Addressable::URI.parse("http://example.com/path%2Fsegment/") - ) - end - - it "should not be equal to 'http://example.com/path/segment/'" do - expect(@uri).not_to eq( - Addressable::URI.parse("http://example.com/path/segment/") - ) - end - - it "should not be equal to 'http://example.com/path/segment/'" do - expect(@uri.normalize).not_to be_eql( - Addressable::URI.parse("http://example.com/path/segment/") - ) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?%F6'" do - before do - @uri = Addressable::URI.parse("http://example.com/?%F6") - end - - it "should not raise an exception when normalized" do - expect do - @uri.normalize - end.not_to raise_error - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should not change if encoded with the normalizing algorithm" do - expect(Addressable::URI.normalized_encode(@uri).to_s).to eq( - "http://example.com/?%F6" - ) - expect(Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s).to be === - "http://example.com/?%F6" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/#%F6'" do - before do - @uri = Addressable::URI.parse("http://example.com/#%F6") - end - - it "should not raise an exception when normalized" do - expect do - @uri.normalize - end.not_to raise_error - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should not change if encoded with the normalizing algorithm" do - expect(Addressable::URI.normalized_encode(@uri).to_s).to eq( - "http://example.com/#%F6" - ) - expect(Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s).to be === - "http://example.com/#%F6" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/%C3%87'" do - before do - @uri = Addressable::URI.parse("http://example.com/%C3%87") - end - - # Based on http://intertwingly.net/blog/2004/07/31/URI-Equivalence - it "should be equivalent to 'http://example.com/C%CC%A7'" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com/C%CC%A7")) - end - - it "should not change if encoded with the normalizing algorithm" do - expect(Addressable::URI.normalized_encode(@uri).to_s).to eq( - "http://example.com/%C3%87" - ) - expect(Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s).to be === - "http://example.com/%C3%87" - end - - it "should raise an error if encoding with an unexpected return type" do - expect do - Addressable::URI.normalized_encode(@uri, Integer) - end.to raise_error(TypeError) - end - - it "if percent encoded should be 'http://example.com/C%25CC%25A7'" do - expect(Addressable::URI.encode(@uri).to_s).to eq( - "http://example.com/%25C3%2587" - ) - end - - it "if percent encoded should be 'http://example.com/C%25CC%25A7'" do - expect(Addressable::URI.encode(@uri, Addressable::URI)).to eq( - Addressable::URI.parse("http://example.com/%25C3%2587") - ) - end - - it "should raise an error if encoding with an unexpected return type" do - expect do - Addressable::URI.encode(@uri, Integer) - end.to raise_error(TypeError) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=string'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=string") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'example.com'" do - expect(@uri.authority).to eq("example.com") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/'" do - expect(@uri.path).to eq("/") - end - - it "should have a query string of 'q=string'" do - expect(@uri.query).to eq("q=string") - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should be considered absolute" do - expect(@uri).to be_absolute - end - - it "should not be considered relative" do - expect(@uri).not_to be_relative - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com:80/'" do - before do - @uri = Addressable::URI.parse("http://example.com:80/") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'example.com:80'" do - expect(@uri.authority).to eq("example.com:80") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have explicit port 80" do - expect(@uri.port).to eq(80) - end - - it "should have a path of '/'" do - expect(@uri.path).to eq("/") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should be considered absolute" do - expect(@uri).to be_absolute - end - - it "should not be considered relative" do - expect(@uri).not_to be_relative - end - - it "should be exactly equal to http://example.com:80/" do - expect(@uri.eql?(Addressable::URI.parse("http://example.com:80/"))).to eq(true) - end - - it "should be roughly equal to http://example.com/" do - expect(@uri === Addressable::URI.parse("http://example.com/")).to eq(true) - end - - it "should be roughly equal to the string 'http://example.com/'" do - expect(@uri === "http://example.com/").to eq(true) - end - - it "should not be roughly equal to the string " + - "'http://example.com:bogus/'" do - expect do - expect(@uri === "http://example.com:bogus/").to eq(false) - end.not_to raise_error - end - - it "should result in itself when joined with itself" do - expect(@uri.join(@uri).to_s).to eq("http://example.com:80/") - expect(@uri.join!(@uri).to_s).to eq("http://example.com:80/") - end - - # Section 6.2.3 of RFC 3986 - it "should be equal to http://example.com/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com/")) - end - - # Section 6.2.3 of RFC 3986 - it "should be equal to http://example.com:/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com:/")) - end - - # Section 6.2.3 of RFC 3986 - it "should be equal to http://example.com:80/" do - expect(@uri).to eq(Addressable::URI.parse("http://example.com:80/")) - end - - # Section 6.2.2.1 of RFC 3986 - it "should be equal to http://EXAMPLE.COM/" do - expect(@uri).to eq(Addressable::URI.parse("http://EXAMPLE.COM/")) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => 80, - :path => "/", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end - - it "should not change if encoded with the normalizing algorithm" do - expect(Addressable::URI.normalized_encode(@uri).to_s).to eq( - "http://example.com:80/" - ) - expect(Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s).to be === - "http://example.com:80/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com:8080/'" do - before do - @uri = Addressable::URI.parse("http://example.com:8080/") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'example.com:8080'" do - expect(@uri.authority).to eq("example.com:8080") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 8080" do - expect(@uri.inferred_port).to eq(8080) - end - - it "should have explicit port 8080" do - expect(@uri.port).to eq(8080) - end - - it "should have default port 80" do - expect(@uri.default_port).to eq(80) - end - - it "should have a path of '/'" do - expect(@uri.path).to eq("/") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should be considered absolute" do - expect(@uri).to be_absolute - end - - it "should not be considered relative" do - expect(@uri).not_to be_relative - end - - it "should be exactly equal to http://example.com:8080/" do - expect(@uri.eql?(Addressable::URI.parse( - "http://example.com:8080/"))).to eq(true) - end - - it "should have a route of 'http://example.com:8080/' from " + - "'http://example.com/path/to/'" do - expect(@uri.route_from("http://example.com/path/to/")).to eq( - Addressable::URI.parse("http://example.com:8080/") - ) - end - - it "should have a route of 'http://example.com:8080/' from " + - "'http://example.com:80/path/to/'" do - expect(@uri.route_from("http://example.com:80/path/to/")).to eq( - Addressable::URI.parse("http://example.com:8080/") - ) - end - - it "should have a route of '../../' from " + - "'http://example.com:8080/path/to/'" do - expect(@uri.route_from("http://example.com:8080/path/to/")).to eq( - Addressable::URI.parse("../../") - ) - end - - it "should have a route of 'http://example.com:8080/' from " + - "'http://user:pass@example.com/path/to/'" do - expect(@uri.route_from("http://user:pass@example.com/path/to/")).to eq( - Addressable::URI.parse("http://example.com:8080/") - ) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => 8080, - :path => "/", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com:8080'" do - expect(@uri.origin).to eq('http://example.com:8080') - end - - it "should not change if encoded with the normalizing algorithm" do - expect(Addressable::URI.normalized_encode(@uri).to_s).to eq( - "http://example.com:8080/" - ) - expect(Addressable::URI.normalized_encode(@uri, Addressable::URI).to_s).to be === - "http://example.com:8080/" - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com:%38%30/'" do - before do - @uri = Addressable::URI.parse("http://example.com:%38%30/") - end - - it "should have the correct port" do - expect(@uri.port).to eq(80) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end -end - -describe Addressable::URI, "when parsed with empty port" do - subject(:uri) do - Addressable::URI.parse("//example.com:") - end - - it "should not infer a port" do - expect(uri.port).to be(nil) - end - - it "should have a site value of '//example.com'" do - expect(uri.site).to eq("//example.com") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/%2E/'" do - before do - @uri = Addressable::URI.parse("http://example.com/%2E/") - end - - it "should be considered to be in normal form" do - skip( - 'path segment normalization should happen before ' + - 'percent escaping normalization' - ) - @uri.normalize.should be_eql(@uri) - end - - it "should normalize to 'http://example.com/%2E/'" do - skip( - 'path segment normalization should happen before ' + - 'percent escaping normalization' - ) - expect(@uri.normalize).to eq("http://example.com/%2E/") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/..'" do - before do - @uri = Addressable::URI.parse("http://example.com/..") - end - - it "should have the correct port" do - expect(@uri.inferred_port).to eq(80) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/../..'" do - before do - @uri = Addressable::URI.parse("http://example.com/../..") - end - - it "should have the correct port" do - expect(@uri.inferred_port).to eq(80) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path(/..'" do - before do - @uri = Addressable::URI.parse("http://example.com/path(/..") - end - - it "should have the correct port" do - expect(@uri.inferred_port).to eq(80) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/(path)/..'" do - before do - @uri = Addressable::URI.parse("http://example.com/(path)/..") - end - - it "should have the correct port" do - expect(@uri.inferred_port).to eq(80) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path(/../'" do - before do - @uri = Addressable::URI.parse("http://example.com/path(/../") - end - - it "should have the correct port" do - expect(@uri.inferred_port).to eq(80) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/(path)/../'" do - before do - @uri = Addressable::URI.parse("http://example.com/(path)/../") - end - - it "should have the correct port" do - expect(@uri.inferred_port).to eq(80) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - end -end - -describe Addressable::URI, "when parsed from " + - "'/..//example.com'" do - before do - @uri = Addressable::URI.parse("/..//example.com") - end - - it "should become invalid when normalized" do - expect do - @uri.normalize - end.to raise_error(Addressable::URI::InvalidURIError, /authority/) - end - - it "should have a path of '/..//example.com'" do - expect(@uri.path).to eq("/..//example.com") - end -end - -describe Addressable::URI, "when parsed from '/a/b/c/./../../g'" do - before do - @uri = Addressable::URI.parse("/a/b/c/./../../g") - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - # Section 5.2.4 of RFC 3986 - it "should normalize to '/a/g'" do - expect(@uri.normalize.to_s).to eq("/a/g") - end -end - -describe Addressable::URI, "when parsed from 'mid/content=5/../6'" do - before do - @uri = Addressable::URI.parse("mid/content=5/../6") - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - # Section 5.2.4 of RFC 3986 - it "should normalize to 'mid/6'" do - expect(@uri.normalize.to_s).to eq("mid/6") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.example.com///../'" do - before do - @uri = Addressable::URI.parse('http://www.example.com///../') - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end - - it "should normalize to 'http://www.example.com//'" do - expect(@uri.normalize.to_s).to eq("http://www.example.com//") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/path/to/resource/'" do - before do - @uri = Addressable::URI.parse("http://example.com/path/to/resource/") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'example.com'" do - expect(@uri.authority).to eq("example.com") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/path/to/resource/'" do - expect(@uri.path).to eq("/path/to/resource/") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should be considered absolute" do - expect(@uri).to be_absolute - end - - it "should not be considered relative" do - expect(@uri).not_to be_relative - end - - it "should be exactly equal to http://example.com:8080/" do - expect(@uri.eql?(Addressable::URI.parse( - "http://example.com/path/to/resource/"))).to eq(true) - end - - it "should have a route of 'resource/' from " + - "'http://example.com/path/to/'" do - expect(@uri.route_from("http://example.com/path/to/")).to eq( - Addressable::URI.parse("resource/") - ) - end - - it "should have a route of '../' from " + - "'http://example.com/path/to/resource/sub'" do - expect(@uri.route_from("http://example.com/path/to/resource/sub")).to eq( - Addressable::URI.parse("../") - ) - end - - - it "should have a route of 'resource/' from " + - "'http://example.com/path/to/another'" do - expect(@uri.route_from("http://example.com/path/to/another")).to eq( - Addressable::URI.parse("resource/") - ) - end - - it "should have a route of 'resource/' from " + - "'http://example.com/path/to/res'" do - expect(@uri.route_from("http://example.com/path/to/res")).to eq( - Addressable::URI.parse("resource/") - ) - end - - it "should have a route of 'resource/' from " + - "'http://example.com:80/path/to/'" do - expect(@uri.route_from("http://example.com:80/path/to/")).to eq( - Addressable::URI.parse("resource/") - ) - end - - it "should have a route of 'http://example.com/path/to/' from " + - "'http://example.com:8080/path/to/'" do - expect(@uri.route_from("http://example.com:8080/path/to/")).to eq( - Addressable::URI.parse("http://example.com/path/to/resource/") - ) - end - - it "should have a route of 'http://example.com/path/to/' from " + - "'http://user:pass@example.com/path/to/'" do - expect(@uri.route_from("http://user:pass@example.com/path/to/")).to eq( - Addressable::URI.parse("http://example.com/path/to/resource/") - ) - end - - it "should have a route of '../../path/to/resource/' from " + - "'http://example.com/to/resource/'" do - expect(@uri.route_from("http://example.com/to/resource/")).to eq( - Addressable::URI.parse("../../path/to/resource/") - ) - end - - it "should correctly convert to a hash" do - expect(@uri.to_hash).to eq({ - :scheme => "http", - :user => nil, - :password => nil, - :host => "example.com", - :port => nil, - :path => "/path/to/resource/", - :query => nil, - :fragment => nil - }) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end -end - -describe Addressable::URI, "when parsed from " + - "'relative/path/to/resource'" do - before do - @uri = Addressable::URI.parse("relative/path/to/resource") - end - - it "should not have a scheme" do - expect(@uri.scheme).to eq(nil) - end - - it "should not be considered ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should not have an authority segment" do - expect(@uri.authority).to eq(nil) - end - - it "should not have a host" do - expect(@uri.host).to eq(nil) - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should not have a port" do - expect(@uri.port).to eq(nil) - end - - it "should have a path of 'relative/path/to/resource'" do - expect(@uri.path).to eq("relative/path/to/resource") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should not be considered absolute" do - expect(@uri).not_to be_absolute - end - - it "should be considered relative" do - expect(@uri).to be_relative - end - - it "should raise an error if routing is attempted" do - expect do - @uri.route_to("http://example.com/") - end.to raise_error(ArgumentError, /relative\/path\/to\/resource/) - expect do - @uri.route_from("http://example.com/") - end.to raise_error(ArgumentError, /relative\/path\/to\/resource/) - end - - it "when joined with 'another/relative/path' should be " + - "'relative/path/to/another/relative/path'" do - expect(@uri.join('another/relative/path')).to eq( - Addressable::URI.parse("relative/path/to/another/relative/path") - ) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end -end - -describe Addressable::URI, "when parsed from " + - "'relative_path_with_no_slashes'" do - before do - @uri = Addressable::URI.parse("relative_path_with_no_slashes") - end - - it "should not have a scheme" do - expect(@uri.scheme).to eq(nil) - end - - it "should not be considered ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should not have an authority segment" do - expect(@uri.authority).to eq(nil) - end - - it "should not have a host" do - expect(@uri.host).to eq(nil) - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should not have a port" do - expect(@uri.port).to eq(nil) - end - - it "should have a path of 'relative_path_with_no_slashes'" do - expect(@uri.path).to eq("relative_path_with_no_slashes") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should not be considered absolute" do - expect(@uri).not_to be_absolute - end - - it "should be considered relative" do - expect(@uri).to be_relative - end - - it "when joined with 'another_relative_path' should be " + - "'another_relative_path'" do - expect(@uri.join('another_relative_path')).to eq( - Addressable::URI.parse("another_relative_path") - ) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/file.txt'" do - before do - @uri = Addressable::URI.parse("http://example.com/file.txt") - end - - it "should have a scheme of 'http'" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'example.com'" do - expect(@uri.authority).to eq("example.com") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/file.txt'" do - expect(@uri.path).to eq("/file.txt") - end - - it "should have a basename of 'file.txt'" do - expect(@uri.basename).to eq("file.txt") - end - - it "should have an extname of '.txt'" do - expect(@uri.extname).to eq(".txt") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/file.txt;parameter'" do - before do - @uri = Addressable::URI.parse("http://example.com/file.txt;parameter") - end - - it "should have a scheme of 'http'" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'example.com'" do - expect(@uri.authority).to eq("example.com") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/file.txt;parameter'" do - expect(@uri.path).to eq("/file.txt;parameter") - end - - it "should have a basename of 'file.txt'" do - expect(@uri.basename).to eq("file.txt") - end - - it "should have an extname of '.txt'" do - expect(@uri.extname).to eq(".txt") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/file.txt;x=y'" do - before do - @uri = Addressable::URI.parse("http://example.com/file.txt;x=y") - end - - it "should have a scheme of 'http'" do - expect(@uri.scheme).to eq("http") - end - - it "should have a scheme of 'http'" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'example.com'" do - expect(@uri.authority).to eq("example.com") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have no username" do - expect(@uri.user).to eq(nil) - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/file.txt;x=y'" do - expect(@uri.path).to eq("/file.txt;x=y") - end - - it "should have an extname of '.txt'" do - expect(@uri.extname).to eq(".txt") - end - - it "should have no query string" do - expect(@uri.query).to eq(nil) - end - - it "should have no fragment" do - expect(@uri.fragment).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'svn+ssh://developername@rubyforge.org/var/svn/project'" do - before do - @uri = Addressable::URI.parse( - "svn+ssh://developername@rubyforge.org/var/svn/project" - ) - end - - it "should have a scheme of 'svn+ssh'" do - expect(@uri.scheme).to eq("svn+ssh") - end - - it "should be considered to be ip-based" do - expect(@uri).to be_ip_based - end - - it "should have a path of '/var/svn/project'" do - expect(@uri.path).to eq("/var/svn/project") - end - - it "should have a username of 'developername'" do - expect(@uri.user).to eq("developername") - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'ssh+svn://developername@RUBYFORGE.ORG/var/svn/project'" do - before do - @uri = Addressable::URI.parse( - "ssh+svn://developername@RUBYFORGE.ORG/var/svn/project" - ) - end - - it "should have a scheme of 'ssh+svn'" do - expect(@uri.scheme).to eq("ssh+svn") - end - - it "should have a normalized scheme of 'svn+ssh'" do - expect(@uri.normalized_scheme).to eq("svn+ssh") - end - - it "should have a normalized site of 'svn+ssh'" do - expect(@uri.normalized_site).to eq("svn+ssh://developername@rubyforge.org") - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should have a path of '/var/svn/project'" do - expect(@uri.path).to eq("/var/svn/project") - end - - it "should have a username of 'developername'" do - expect(@uri.user).to eq("developername") - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should not be considered to be in normal form" do - expect(@uri.normalize).not_to be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'mailto:user@example.com'" do - before do - @uri = Addressable::URI.parse("mailto:user@example.com") - end - - it "should have a scheme of 'mailto'" do - expect(@uri.scheme).to eq("mailto") - end - - it "should not be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should have a path of 'user@example.com'" do - expect(@uri.path).to eq("user@example.com") - end - - it "should have no user" do - expect(@uri.user).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'tag:example.com,2006-08-18:/path/to/something'" do - before do - @uri = Addressable::URI.parse( - "tag:example.com,2006-08-18:/path/to/something") - end - - it "should have a scheme of 'tag'" do - expect(@uri.scheme).to eq("tag") - end - - it "should be considered to be ip-based" do - expect(@uri).not_to be_ip_based - end - - it "should have a path of " + - "'example.com,2006-08-18:/path/to/something'" do - expect(@uri.path).to eq("example.com,2006-08-18:/path/to/something") - end - - it "should have no user" do - expect(@uri.user).to eq(nil) - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/x;y/'" do - before do - @uri = Addressable::URI.parse("http://example.com/x;y/") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?x=1&y=2'" do - before do - @uri = Addressable::URI.parse("http://example.com/?x=1&y=2") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end -end - -describe Addressable::URI, "when parsed from " + - "'view-source:http://example.com/'" do - before do - @uri = Addressable::URI.parse("view-source:http://example.com/") - end - - it "should have a scheme of 'view-source'" do - expect(@uri.scheme).to eq("view-source") - end - - it "should have a path of 'http://example.com/'" do - expect(@uri.path).to eq("http://example.com/") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://user:pass@example.com/path/to/resource?query=x#fragment'" do - before do - @uri = Addressable::URI.parse( - "http://user:pass@example.com/path/to/resource?query=x#fragment") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have an authority segment of 'user:pass@example.com'" do - expect(@uri.authority).to eq("user:pass@example.com") - end - - it "should have a username of 'user'" do - expect(@uri.user).to eq("user") - end - - it "should have a password of 'pass'" do - expect(@uri.password).to eq("pass") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/path/to/resource'" do - expect(@uri.path).to eq("/path/to/resource") - end - - it "should have a query string of 'query=x'" do - expect(@uri.query).to eq("query=x") - end - - it "should have a fragment of 'fragment'" do - expect(@uri.fragment).to eq("fragment") - end - - it "should be considered to be in normal form" do - expect(@uri.normalize).to be_eql(@uri) - end - - it "should have a route of '../../' to " + - "'http://user:pass@example.com/path/'" do - expect(@uri.route_to("http://user:pass@example.com/path/")).to eq( - Addressable::URI.parse("../../") - ) - end - - it "should have a route of 'to/resource?query=x#fragment' " + - "from 'http://user:pass@example.com/path/'" do - expect(@uri.route_from("http://user:pass@example.com/path/")).to eq( - Addressable::URI.parse("to/resource?query=x#fragment") - ) - end - - it "should have a route of '?query=x#fragment' " + - "from 'http://user:pass@example.com/path/to/resource'" do - expect(@uri.route_from("http://user:pass@example.com/path/to/resource")).to eq( - Addressable::URI.parse("?query=x#fragment") - ) - end - - it "should have a route of '#fragment' " + - "from 'http://user:pass@example.com/path/to/resource?query=x'" do - expect(@uri.route_from( - "http://user:pass@example.com/path/to/resource?query=x")).to eq( - Addressable::URI.parse("#fragment") - ) - end - - it "should have a route of '#fragment' from " + - "'http://user:pass@example.com/path/to/resource?query=x#fragment'" do - expect(@uri.route_from( - "http://user:pass@example.com/path/to/resource?query=x#fragment" - )).to eq(Addressable::URI.parse("#fragment")) - end - - it "should have a route of 'http://elsewhere.com/' to " + - "'http://elsewhere.com/'" do - expect(@uri.route_to("http://elsewhere.com/")).to eq( - Addressable::URI.parse("http://elsewhere.com/") - ) - end - - it "should have a route of " + - "'http://user:pass@example.com/path/to/resource?query=x#fragment' " + - "from 'http://example.com/path/to/'" do - expect(@uri.route_from("http://elsewhere.com/path/to/")).to eq( - Addressable::URI.parse( - "http://user:pass@example.com/path/to/resource?query=x#fragment") - ) - end - - it "should have the correct scheme after assignment" do - @uri.scheme = "ftp" - expect(@uri.scheme).to eq("ftp") - expect(@uri.to_s).to eq( - "ftp://user:pass@example.com/path/to/resource?query=x#fragment" - ) - expect(@uri.to_str).to eq( - "ftp://user:pass@example.com/path/to/resource?query=x#fragment" - ) - end - - it "should have the correct site segment after assignment" do - @uri.site = "https://newuser:newpass@example.com:443" - expect(@uri.scheme).to eq("https") - expect(@uri.authority).to eq("newuser:newpass@example.com:443") - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("newpass") - expect(@uri.userinfo).to eq("newuser:newpass") - expect(@uri.normalized_userinfo).to eq("newuser:newpass") - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(443) - expect(@uri.inferred_port).to eq(443) - expect(@uri.to_s).to eq( - "https://newuser:newpass@example.com:443" + - "/path/to/resource?query=x#fragment" - ) - end - - it "should have the correct authority segment after assignment" do - @uri.authority = "newuser:newpass@example.com:80" - expect(@uri.authority).to eq("newuser:newpass@example.com:80") - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("newpass") - expect(@uri.userinfo).to eq("newuser:newpass") - expect(@uri.normalized_userinfo).to eq("newuser:newpass") - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(80) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq( - "http://newuser:newpass@example.com:80" + - "/path/to/resource?query=x#fragment" - ) - end - - it "should have the correct userinfo segment after assignment" do - @uri.userinfo = "newuser:newpass" - expect(@uri.userinfo).to eq("newuser:newpass") - expect(@uri.authority).to eq("newuser:newpass@example.com") - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("newpass") - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(nil) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq( - "http://newuser:newpass@example.com" + - "/path/to/resource?query=x#fragment" - ) - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - expect(@uri.authority).to eq("newuser:pass@example.com") - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - expect(@uri.authority).to eq("user:newpass@example.com") - end - - it "should have the correct host after assignment" do - @uri.host = "newexample.com" - expect(@uri.host).to eq("newexample.com") - expect(@uri.authority).to eq("user:pass@newexample.com") - end - - it "should have the correct host after assignment" do - @uri.hostname = "newexample.com" - expect(@uri.host).to eq("newexample.com") - expect(@uri.hostname).to eq("newexample.com") - expect(@uri.authority).to eq("user:pass@newexample.com") - end - - it "should raise an error if assigning a bogus object to the hostname" do - expect do - @uri.hostname = Object.new - end.to raise_error(TypeError) - end - - it "should have the correct port after assignment" do - @uri.port = 8080 - expect(@uri.port).to eq(8080) - expect(@uri.authority).to eq("user:pass@example.com:8080") - end - - it "should have the correct origin after assignment" do - @uri.origin = "http://newexample.com" - expect(@uri.host).to eq("newexample.com") - expect(@uri.authority).to eq("newexample.com") - end - - it "should have the correct path after assignment" do - @uri.path = "/newpath/to/resource" - expect(@uri.path).to eq("/newpath/to/resource") - expect(@uri.to_s).to eq( - "http://user:pass@example.com/newpath/to/resource?query=x#fragment" - ) - end - - it "should have the correct scheme and authority after nil assignment" do - @uri.site = nil - expect(@uri.scheme).to eq(nil) - expect(@uri.authority).to eq(nil) - expect(@uri.to_s).to eq("/path/to/resource?query=x#fragment") - end - - it "should have the correct scheme and authority after assignment" do - @uri.site = "file://" - expect(@uri.scheme).to eq("file") - expect(@uri.authority).to eq("") - expect(@uri.to_s).to eq("file:///path/to/resource?query=x#fragment") - end - - it "should have the correct path after nil assignment" do - @uri.path = nil - expect(@uri.path).to eq("") - expect(@uri.to_s).to eq( - "http://user:pass@example.com?query=x#fragment" - ) - end - - it "should have the correct query string after assignment" do - @uri.query = "newquery=x" - expect(@uri.query).to eq("newquery=x") - expect(@uri.to_s).to eq( - "http://user:pass@example.com/path/to/resource?newquery=x#fragment" - ) - @uri.query = nil - expect(@uri.query).to eq(nil) - expect(@uri.to_s).to eq( - "http://user:pass@example.com/path/to/resource#fragment" - ) - end - - it "should have the correct query string after hash assignment" do - @uri.query_values = {"?uestion mark" => "=sign", "hello" => "g\xC3\xBCnther"} - expect(@uri.query.split("&")).to include("%3Fuestion%20mark=%3Dsign") - expect(@uri.query.split("&")).to include("hello=g%C3%BCnther") - expect(@uri.query_values).to eq({ - "?uestion mark" => "=sign", "hello" => "g\xC3\xBCnther" - }) - end - - it "should have the correct query string after flag hash assignment" do - @uri.query_values = {'flag?1' => nil, 'fl=ag2' => nil, 'flag3' => nil} - expect(@uri.query.split("&")).to include("flag%3F1") - expect(@uri.query.split("&")).to include("fl%3Dag2") - expect(@uri.query.split("&")).to include("flag3") - expect(@uri.query_values(Array).sort).to eq([["fl=ag2"], ["flag3"], ["flag?1"]]) - expect(@uri.query_values(Hash)).to eq({ - 'flag?1' => nil, 'fl=ag2' => nil, 'flag3' => nil - }) - end - - it "should raise an error if query values are set to a bogus type" do - expect do - @uri.query_values = "bogus" - end.to raise_error(TypeError) - end - - it "should have the correct fragment after assignment" do - @uri.fragment = "newfragment" - expect(@uri.fragment).to eq("newfragment") - expect(@uri.to_s).to eq( - "http://user:pass@example.com/path/to/resource?query=x#newfragment" - ) - - @uri.fragment = nil - expect(@uri.fragment).to eq(nil) - expect(@uri.to_s).to eq( - "http://user:pass@example.com/path/to/resource?query=x" - ) - end - - it "should have the correct values after a merge" do - expect(@uri.merge(:fragment => "newfragment").to_s).to eq( - "http://user:pass@example.com/path/to/resource?query=x#newfragment" - ) - end - - it "should have the correct values after a merge" do - expect(@uri.merge(:fragment => nil).to_s).to eq( - "http://user:pass@example.com/path/to/resource?query=x" - ) - end - - it "should have the correct values after a merge" do - expect(@uri.merge(:userinfo => "newuser:newpass").to_s).to eq( - "http://newuser:newpass@example.com/path/to/resource?query=x#fragment" - ) - end - - it "should have the correct values after a merge" do - expect(@uri.merge(:userinfo => nil).to_s).to eq( - "http://example.com/path/to/resource?query=x#fragment" - ) - end - - it "should have the correct values after a merge" do - expect(@uri.merge(:path => "newpath").to_s).to eq( - "http://user:pass@example.com/newpath?query=x#fragment" - ) - end - - it "should have the correct values after a merge" do - expect(@uri.merge(:port => "42", :path => "newpath", :query => "").to_s).to eq( - "http://user:pass@example.com:42/newpath?#fragment" - ) - end - - it "should have the correct values after a merge" do - expect(@uri.merge(:authority => "foo:bar@baz:42").to_s).to eq( - "http://foo:bar@baz:42/path/to/resource?query=x#fragment" - ) - # Ensure the operation was not destructive - expect(@uri.to_s).to eq( - "http://user:pass@example.com/path/to/resource?query=x#fragment" - ) - end - - it "should have the correct values after a destructive merge" do - @uri.merge!(:authority => "foo:bar@baz:42") - # Ensure the operation was destructive - expect(@uri.to_s).to eq( - "http://foo:bar@baz:42/path/to/resource?query=x#fragment" - ) - end - - it "should fail to merge with bogus values" do - expect do - @uri.merge(:port => "bogus") - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should fail to merge with bogus values" do - expect do - @uri.merge(:authority => "bar@baz:bogus") - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should fail to merge with bogus parameters" do - expect do - @uri.merge(42) - end.to raise_error(TypeError) - end - - it "should fail to merge with bogus parameters" do - expect do - @uri.merge("http://example.com/") - end.to raise_error(TypeError) - end - - it "should fail to merge with both authority and subcomponents" do - expect do - @uri.merge(:authority => "foo:bar@baz:42", :port => "42") - end.to raise_error(ArgumentError) - end - - it "should fail to merge with both userinfo and subcomponents" do - expect do - @uri.merge(:userinfo => "foo:bar", :user => "foo") - end.to raise_error(ArgumentError) - end - - it "should be identical to its duplicate" do - expect(@uri).to eq(@uri.dup) - end - - it "should have an origin of 'http://example.com'" do - expect(@uri.origin).to eq('http://example.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/search?q=Q%26A'" do - - before do - @uri = Addressable::URI.parse("http://example.com/search?q=Q%26A") - end - - it "should have a query of 'q=Q%26A'" do - expect(@uri.query).to eq("q=Q%26A") - end - - it "should have query_values of {'q' => 'Q&A'}" do - expect(@uri.query_values).to eq({ 'q' => 'Q&A' }) - end - - it "should normalize to the original uri " + - "(with the ampersand properly percent-encoded)" do - expect(@uri.normalize.to_s).to eq("http://example.com/search?q=Q%26A") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?&x=b") - end - - it "should have a query of '&x=b'" do - expect(@uri.query).to eq("&x=b") - end - - it "should have query_values of {'x' => 'b'}" do - expect(@uri.query_values).to eq({'x' => 'b'}) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q='one;two'&x=1'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q='one;two'&x=1") - end - - it "should have a query of 'q='one;two'&x=1'" do - expect(@uri.query).to eq("q='one;two'&x=1") - end - - it "should have query_values of {\"q\" => \"'one;two'\", \"x\" => \"1\"}" do - expect(@uri.query_values).to eq({"q" => "'one;two'", "x" => "1"}) - end - - it "should escape the ';' character when normalizing to avoid ambiguity " + - "with the W3C HTML 4.01 specification" do - # HTML 4.01 Section B.2.2 - expect(@uri.normalize.query).to eq("q='one%3Btwo'&x=1") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?&&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?&&x=b") - end - - it "should have a query of '&&x=b'" do - expect(@uri.query).to eq("&&x=b") - end - - it "should have query_values of {'x' => 'b'}" do - expect(@uri.query_values).to eq({'x' => 'b'}) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=a&&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=a&&x=b") - end - - it "should have a query of 'q=a&&x=b'" do - expect(@uri.query).to eq("q=a&&x=b") - end - - it "should have query_values of {'q' => 'a, 'x' => 'b'}" do - expect(@uri.query_values).to eq({'q' => 'a', 'x' => 'b'}) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q&&x=b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q&&x=b") - end - - it "should have a query of 'q&&x=b'" do - expect(@uri.query).to eq("q&&x=b") - end - - it "should have query_values of {'q' => true, 'x' => 'b'}" do - expect(@uri.query_values).to eq({'q' => nil, 'x' => 'b'}) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=a+b'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=a+b") - end - - it "should have a query of 'q=a+b'" do - expect(@uri.query).to eq("q=a+b") - end - - it "should have query_values of {'q' => 'a b'}" do - expect(@uri.query_values).to eq({'q' => 'a b'}) - end - - it "should have a normalized query of 'q=a+b'" do - expect(@uri.normalized_query).to eq("q=a+b") - end -end - -describe Addressable::URI, "when parsed from 'https://example.com/?q=a+b'" do - before do - @uri = Addressable::URI.parse("https://example.com/?q=a+b") - end - - it "should have query_values of {'q' => 'a b'}" do - expect(@uri.query_values).to eq("q" => "a b") - end -end - -describe Addressable::URI, "when parsed from 'example.com?q=a+b'" do - before do - @uri = Addressable::URI.parse("example.com?q=a+b") - end - - it "should have query_values of {'q' => 'a b'}" do - expect(@uri.query_values).to eq("q" => "a b") - end -end - -describe Addressable::URI, "when parsed from 'mailto:?q=a+b'" do - before do - @uri = Addressable::URI.parse("mailto:?q=a+b") - end - - it "should have query_values of {'q' => 'a+b'}" do - expect(@uri.query_values).to eq("q" => "a+b") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q=a%2bb'" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=a%2bb") - end - - it "should have a query of 'q=a+b'" do - expect(@uri.query).to eq("q=a%2bb") - end - - it "should have query_values of {'q' => 'a+b'}" do - expect(@uri.query_values).to eq({'q' => 'a+b'}) - end - - it "should have a normalized query of 'q=a%2Bb'" do - expect(@uri.normalized_query).to eq("q=a%2Bb") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?v=%7E&w=%&x=%25&y=%2B&z=C%CC%A7'" do - before do - @uri = Addressable::URI.parse("http://example.com/?v=%7E&w=%&x=%25&y=%2B&z=C%CC%A7") - end - - it "should have a normalized query of 'v=~&w=%25&x=%25&y=%2B&z=%C3%87'" do - expect(@uri.normalized_query).to eq("v=~&w=%25&x=%25&y=%2B&z=%C3%87") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?v=%7E&w=%&x=%25&y=+&z=C%CC%A7'" do - before do - @uri = Addressable::URI.parse("http://example.com/?v=%7E&w=%&x=%25&y=+&z=C%CC%A7") - end - - it "should have a normalized query of 'v=~&w=%25&x=%25&y=+&z=%C3%87'" do - expect(@uri.normalized_query).to eq("v=~&w=%25&x=%25&y=+&z=%C3%87") - end -end - -describe Addressable::URI, "when parsed from 'http://example/?b=1&a=2&c=3'" do - before do - @uri = Addressable::URI.parse("http://example/?b=1&a=2&c=3") - end - - it "should have a sorted normalized query of 'a=2&b=1&c=3'" do - expect(@uri.normalized_query(:sorted)).to eq("a=2&b=1&c=3") - end -end - -describe Addressable::URI, "when parsed from 'http://example/?&a&&c&'" do - before do - @uri = Addressable::URI.parse("http://example/?&a&&c&") - end - - it "should have a compacted normalized query of 'a&c'" do - expect(@uri.normalized_query(:compacted)).to eq("a&c") - end -end - -describe Addressable::URI, "when parsed from 'http://example.com/?a=1&a=1'" do - before do - @uri = Addressable::URI.parse("http://example.com/?a=1&a=1") - end - - it "should have a compacted normalized query of 'a=1'" do - expect(@uri.normalized_query(:compacted)).to eq("a=1") - end -end - -describe Addressable::URI, "when parsed from 'http://example.com/?a=1&a=2'" do - before do - @uri = Addressable::URI.parse("http://example.com/?a=1&a=2") - end - - it "should have a compacted normalized query of 'a=1&a=2'" do - expect(@uri.normalized_query(:compacted)).to eq("a=1&a=2") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/sound%2bvision'" do - before do - @uri = Addressable::URI.parse("http://example.com/sound%2bvision") - end - - it "should have a normalized path of '/sound+vision'" do - expect(@uri.normalized_path).to eq('/sound+vision') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/?q='" do - before do - @uri = Addressable::URI.parse("http://example.com/?q=") - end - - it "should have a query of 'q='" do - expect(@uri.query).to eq("q=") - end - - it "should have query_values of {'q' => ''}" do - expect(@uri.query_values).to eq({'q' => ''}) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://user@example.com'" do - before do - @uri = Addressable::URI.parse("http://user@example.com") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have a username of 'user'" do - expect(@uri.user).to eq("user") - end - - it "should have no password" do - expect(@uri.password).to eq(nil) - end - - it "should have a userinfo of 'user'" do - expect(@uri.userinfo).to eq("user") - end - - it "should have a normalized userinfo of 'user'" do - expect(@uri.normalized_userinfo).to eq("user") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have default_port 80" do - expect(@uri.default_port).to eq(80) - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq(nil) - expect(@uri.to_s).to eq("http://newuser@example.com") - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - expect(@uri.to_s).to eq("http://user:newpass@example.com") - end - - it "should have the correct userinfo segment after assignment" do - @uri.userinfo = "newuser:newpass" - expect(@uri.userinfo).to eq("newuser:newpass") - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("newpass") - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(nil) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq("http://newuser:newpass@example.com") - end - - it "should have the correct userinfo segment after nil assignment" do - @uri.userinfo = nil - expect(@uri.userinfo).to eq(nil) - expect(@uri.user).to eq(nil) - expect(@uri.password).to eq(nil) - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(nil) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq("http://example.com") - end - - it "should have the correct authority segment after assignment" do - @uri.authority = "newuser@example.com" - expect(@uri.authority).to eq("newuser@example.com") - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq(nil) - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(nil) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq("http://newuser@example.com") - end - - it "should raise an error after nil assignment of authority segment" do - expect do - # This would create an invalid URI - @uri.authority = nil - end.to raise_error(Addressable::URI::InvalidURIError) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://user:@example.com'" do - before do - @uri = Addressable::URI.parse("http://user:@example.com") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have a username of 'user'" do - expect(@uri.user).to eq("user") - end - - it "should have a password of ''" do - expect(@uri.password).to eq("") - end - - it "should have a normalized userinfo of 'user:'" do - expect(@uri.normalized_userinfo).to eq("user:") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("") - expect(@uri.to_s).to eq("http://newuser:@example.com") - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - expect(@uri.to_s).to eq("http://user:newpass@example.com") - end - - it "should have the correct authority segment after assignment" do - @uri.authority = "newuser:@example.com" - expect(@uri.authority).to eq("newuser:@example.com") - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("") - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(nil) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq("http://newuser:@example.com") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://:pass@example.com'" do - before do - @uri = Addressable::URI.parse("http://:pass@example.com") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have a username of ''" do - expect(@uri.user).to eq("") - end - - it "should have a password of 'pass'" do - expect(@uri.password).to eq("pass") - end - - it "should have a userinfo of ':pass'" do - expect(@uri.userinfo).to eq(":pass") - end - - it "should have a normalized userinfo of ':pass'" do - expect(@uri.normalized_userinfo).to eq(":pass") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("pass") - expect(@uri.to_s).to eq("http://newuser:pass@example.com") - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - expect(@uri.user).to eq("") - expect(@uri.to_s).to eq("http://:newpass@example.com") - end - - it "should have the correct authority segment after assignment" do - @uri.authority = ":newpass@example.com" - expect(@uri.authority).to eq(":newpass@example.com") - expect(@uri.user).to eq("") - expect(@uri.password).to eq("newpass") - expect(@uri.host).to eq("example.com") - expect(@uri.port).to eq(nil) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq("http://:newpass@example.com") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://:@example.com'" do - before do - @uri = Addressable::URI.parse("http://:@example.com") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have a username of ''" do - expect(@uri.user).to eq("") - end - - it "should have a password of ''" do - expect(@uri.password).to eq("") - end - - it "should have a normalized userinfo of nil" do - expect(@uri.normalized_userinfo).to eq(nil) - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have the correct username after assignment" do - @uri.user = "newuser" - expect(@uri.user).to eq("newuser") - expect(@uri.password).to eq("") - expect(@uri.to_s).to eq("http://newuser:@example.com") - end - - it "should have the correct password after assignment" do - @uri.password = "newpass" - expect(@uri.password).to eq("newpass") - expect(@uri.user).to eq("") - expect(@uri.to_s).to eq("http://:newpass@example.com") - end - - it "should have the correct authority segment after assignment" do - @uri.authority = ":@newexample.com" - expect(@uri.authority).to eq(":@newexample.com") - expect(@uri.user).to eq("") - expect(@uri.password).to eq("") - expect(@uri.host).to eq("newexample.com") - expect(@uri.port).to eq(nil) - expect(@uri.inferred_port).to eq(80) - expect(@uri.to_s).to eq("http://:@newexample.com") - end -end - -describe Addressable::URI, "when parsed from " + - "'#example'" do - before do - @uri = Addressable::URI.parse("#example") - end - - it "should be considered relative" do - expect(@uri).to be_relative - end - - it "should have a host of nil" do - expect(@uri.host).to eq(nil) - end - - it "should have a site of nil" do - expect(@uri.site).to eq(nil) - end - - it "should have a normalized_site of nil" do - expect(@uri.normalized_site).to eq(nil) - end - - it "should have a path of ''" do - expect(@uri.path).to eq("") - end - - it "should have a query string of nil" do - expect(@uri.query).to eq(nil) - end - - it "should have a fragment of 'example'" do - expect(@uri.fragment).to eq("example") - end -end - -describe Addressable::URI, "when parsed from " + - "the network-path reference '//example.com/'" do - before do - @uri = Addressable::URI.parse("//example.com/") - end - - it "should be considered relative" do - expect(@uri).to be_relative - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should have a path of '/'" do - expect(@uri.path).to eq("/") - end - - it "should raise an error if routing is attempted" do - expect do - @uri.route_to("http://example.com/") - end.to raise_error(ArgumentError, /\/\/example.com\//) - expect do - @uri.route_from("http://example.com/") - end.to raise_error(ArgumentError, /\/\/example.com\//) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from " + - "'feed://http://example.com/'" do - before do - @uri = Addressable::URI.parse("feed://http://example.com/") - end - - it "should have a host of 'http'" do - expect(@uri.host).to eq("http") - end - - it "should have a path of '//example.com/'" do - expect(@uri.path).to eq("//example.com/") - end -end - -describe Addressable::URI, "when parsed from " + - "'feed:http://example.com/'" do - before do - @uri = Addressable::URI.parse("feed:http://example.com/") - end - - it "should have a path of 'http://example.com/'" do - expect(@uri.path).to eq("http://example.com/") - end - - it "should normalize to 'http://example.com/'" do - expect(@uri.normalize.to_s).to eq("http://example.com/") - expect(@uri.normalize!.to_s).to eq("http://example.com/") - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from " + - "'example://a/b/c/%7Bfoo%7D'" do - before do - @uri = Addressable::URI.parse("example://a/b/c/%7Bfoo%7D") - end - - # Section 6.2.2 of RFC 3986 - it "should be equivalent to eXAMPLE://a/./b/../b/%63/%7bfoo%7d" do - expect(@uri).to eq( - Addressable::URI.parse("eXAMPLE://a/./b/../b/%63/%7bfoo%7d") - ) - end - - it "should have an origin of 'example://a'" do - expect(@uri.origin).to eq('example://a') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://example.com/indirect/path/./to/../resource/'" do - before do - @uri = Addressable::URI.parse( - "http://example.com/indirect/path/./to/../resource/") - end - - it "should use the 'http' scheme" do - expect(@uri.scheme).to eq("http") - end - - it "should have a host of 'example.com'" do - expect(@uri.host).to eq("example.com") - end - - it "should use port 80" do - expect(@uri.inferred_port).to eq(80) - end - - it "should have a path of '/indirect/path/./to/../resource/'" do - expect(@uri.path).to eq("/indirect/path/./to/../resource/") - end - - # Section 6.2.2.3 of RFC 3986 - it "should have a normalized path of '/indirect/path/resource/'" do - expect(@uri.normalize.path).to eq("/indirect/path/resource/") - expect(@uri.normalize!.path).to eq("/indirect/path/resource/") - end -end - -describe Addressable::URI, "when parsed from " + - "'http://under_score.example.com/'" do - it "should not cause an error" do - expect do - Addressable::URI.parse("http://under_score.example.com/") - end.not_to raise_error - end -end - -describe Addressable::URI, "when parsed from " + - "'./this:that'" do - before do - @uri = Addressable::URI.parse("./this:that") - end - - it "should be considered relative" do - expect(@uri).to be_relative - end - - it "should have no scheme" do - expect(@uri.scheme).to eq(nil) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from " + - "'this:that'" do - before do - @uri = Addressable::URI.parse("this:that") - end - - it "should be considered absolute" do - expect(@uri).to be_absolute - end - - it "should have a scheme of 'this'" do - expect(@uri.scheme).to eq("this") - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from '?'" do - before do - @uri = Addressable::URI.parse("?") - end - - it "should normalize to ''" do - expect(@uri.normalize.to_s).to eq("") - end - - it "should have the correct return type" do - expect(@uri.query_values).to eq({}) - expect(@uri.query_values(Hash)).to eq({}) - expect(@uri.query_values(Array)).to eq([]) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from '?one=1&two=2&three=3'" do - before do - @uri = Addressable::URI.parse("?one=1&two=2&three=3") - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({"one" => "1", "two" => "2", "three" => "3"}) - end - - it "should raise an error for invalid return type values" do - expect do - @uri.query_values(Integer) - end.to raise_error(ArgumentError) - end - - it "should have the correct array query values" do - expect(@uri.query_values(Array)).to eq([ - ["one", "1"], ["two", "2"], ["three", "3"] - ]) - end - - it "should have a 'null' origin" do - expect(@uri.origin).to eq('null') - end -end - -describe Addressable::URI, "when parsed from '?one=1=uno&two=2=dos'" do - before do - @uri = Addressable::URI.parse("?one=1=uno&two=2=dos") - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({"one" => "1=uno", "two" => "2=dos"}) - end - - it "should have the correct array query values" do - expect(@uri.query_values(Array)).to eq([ - ["one", "1=uno"], ["two", "2=dos"] - ]) - end -end - -describe Addressable::URI, "when parsed from '?one[two][three]=four'" do - before do - @uri = Addressable::URI.parse("?one[two][three]=four") - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({"one[two][three]" => "four"}) - end - - it "should have the correct array query values" do - expect(@uri.query_values(Array)).to eq([ - ["one[two][three]", "four"] - ]) - end -end - -describe Addressable::URI, "when parsed from '?one.two.three=four'" do - before do - @uri = Addressable::URI.parse("?one.two.three=four") - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({ - "one.two.three" => "four" - }) - end - - it "should have the correct array query values" do - expect(@uri.query_values(Array)).to eq([ - ["one.two.three", "four"] - ]) - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three]=four&one[two][five]=six'" do - before do - @uri = Addressable::URI.parse("?one[two][three]=four&one[two][five]=six") - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({ - "one[two][three]" => "four", "one[two][five]" => "six" - }) - end - - it "should have the correct array query values" do - expect(@uri.query_values(Array)).to eq([ - ["one[two][three]", "four"], ["one[two][five]", "six"] - ]) - end -end - -describe Addressable::URI, "when parsed from " + - "'?one.two.three=four&one.two.five=six'" do - before do - @uri = Addressable::URI.parse("?one.two.three=four&one.two.five=six") - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({ - "one.two.three" => "four", "one.two.five" => "six" - }) - end - - it "should have the correct array query values" do - expect(@uri.query_values(Array)).to eq([ - ["one.two.three", "four"], ["one.two.five", "six"] - ]) - end -end - -describe Addressable::URI, "when parsed from " + - "'?one=two&one=three'" do - before do - @uri = Addressable::URI.parse( - "?one=two&one=three&one=four" - ) - end - - it "should have correct array query values" do - expect(@uri.query_values(Array)).to eq( - [['one', 'two'], ['one', 'three'], ['one', 'four']] - ) - end - - it "should have correct hash query values" do - skip("This is probably more desirable behavior.") - expect(@uri.query_values(Hash)).to eq( - {'one' => ['two', 'three', 'four']} - ) - end - - it "should handle assignment with keys of mixed type" do - @uri.query_values = @uri.query_values(Hash).merge({:one => 'three'}) - expect(@uri.query_values(Hash)).to eq({'one' => 'three'}) - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][]=four&one[two][three][]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][]=four&one[two][three][]=five" - ) - end - - it "should have correct query values" do - expect(@uri.query_values(Hash)).to eq({"one[two][three][]" => "five"}) - end - - it "should have correct array query values" do - expect(@uri.query_values(Array)).to eq([ - ["one[two][three][]", "four"], ["one[two][three][]", "five"] - ]) - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][0]=four&one[two][three][1]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][0]=four&one[two][three][1]=five" - ) - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({ - "one[two][three][0]" => "four", "one[two][three][1]" => "five" - }) - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][1]=four&one[two][three][0]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][1]=four&one[two][three][0]=five" - ) - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({ - "one[two][three][1]" => "four", "one[two][three][0]" => "five" - }) - end -end - -describe Addressable::URI, "when parsed from " + - "'?one[two][three][2]=four&one[two][three][1]=five'" do - before do - @uri = Addressable::URI.parse( - "?one[two][three][2]=four&one[two][three][1]=five" - ) - end - - it "should have the correct query values" do - expect(@uri.query_values).to eq({ - "one[two][three][2]" => "four", "one[two][three][1]" => "five" - }) - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.詹姆斯.com/'" do - before do - @uri = Addressable::URI.parse("http://www.詹姆斯.com/") - end - - it "should be equivalent to 'http://www.xn--8ws00zhy3a.com/'" do - expect(@uri).to eq( - Addressable::URI.parse("http://www.xn--8ws00zhy3a.com/") - ) - end - - it "should not have domain name encoded during normalization" do - expect(Addressable::URI.normalized_encode(@uri.to_s)).to eq( - "http://www.詹姆斯.com/" - ) - end - - it "should have an origin of 'http://www.xn--8ws00zhy3a.com'" do - expect(@uri.origin).to eq('http://www.xn--8ws00zhy3a.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.詹姆斯.com/ some spaces /'" do - before do - @uri = Addressable::URI.parse("http://www.詹姆斯.com/ some spaces /") - end - - it "should be equivalent to " + - "'http://www.xn--8ws00zhy3a.com/%20some%20spaces%20/'" do - expect(@uri).to eq( - Addressable::URI.parse( - "http://www.xn--8ws00zhy3a.com/%20some%20spaces%20/") - ) - end - - it "should not have domain name encoded during normalization" do - expect(Addressable::URI.normalized_encode(@uri.to_s)).to eq( - "http://www.詹姆斯.com/%20some%20spaces%20/" - ) - end - - it "should have an origin of 'http://www.xn--8ws00zhy3a.com'" do - expect(@uri.origin).to eq('http://www.xn--8ws00zhy3a.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.xn--8ws00zhy3a.com/'" do - before do - @uri = Addressable::URI.parse("http://www.xn--8ws00zhy3a.com/") - end - - it "should be displayed as http://www.詹姆斯.com/" do - expect(@uri.display_uri.to_s).to eq("http://www.詹姆斯.com/") - end - - it "should properly force the encoding" do - display_string = @uri.display_uri.to_str - expect(display_string).to eq("http://www.詹姆斯.com/") - if display_string.respond_to?(:encoding) - expect(display_string.encoding.to_s).to eq(Encoding::UTF_8.to_s) - end - end - - it "should have an origin of 'http://www.xn--8ws00zhy3a.com'" do - expect(@uri.origin).to eq('http://www.xn--8ws00zhy3a.com') - end -end - -describe Addressable::URI, "when parsed from " + - "'http://www.詹姆斯.com/atomtests/iri/詹.html'" do - before do - @uri = Addressable::URI.parse("http://www.詹姆斯.com/atomtests/iri/詹.html") - end - - it "should normalize to " + - "http://www.xn--8ws00zhy3a.com/atomtests/iri/%E8%A9%B9.html" do - expect(@uri.normalize.to_s).to eq( - "http://www.xn--8ws00zhy3a.com/atomtests/iri/%E8%A9%B9.html" - ) - expect(@uri.normalize!.to_s).to eq( - "http://www.xn--8ws00zhy3a.com/atomtests/iri/%E8%A9%B9.html" - ) - end -end - -describe Addressable::URI, "when parsed from a percent-encoded IRI" do - before do - @uri = Addressable::URI.parse( - "http://www.%E3%81%BB%E3%82%93%E3%81%A8%E3%81%86%E3%81%AB%E3%81%AA" + - "%E3%81%8C%E3%81%84%E3%82%8F%E3%81%91%E3%81%AE%E3%82%8F%E3%81%8B%E3" + - "%82%89%E3%81%AA%E3%81%84%E3%81%A9%E3%82%81%E3%81%84%E3%82%93%E3%82" + - "%81%E3%81%84%E3%81%AE%E3%82%89%E3%81%B9%E3%82%8B%E3%81%BE%E3%81%A0" + - "%E3%81%AA%E3%81%8C%E3%81%8F%E3%81%97%E3%81%AA%E3%81%84%E3%81%A8%E3" + - "%81%9F%E3%82%8A%E3%81%AA%E3%81%84.w3.mag.keio.ac.jp" - ) - end - - it "should normalize to something sane" do - expect(@uri.normalize.to_s).to eq( - "http://www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3f" + - "g11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp/" - ) - expect(@uri.normalize!.to_s).to eq( - "http://www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3f" + - "g11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp/" - ) - end - - it "should have the correct origin" do - expect(@uri.origin).to eq( - "http://www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3f" + - "g11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp" - ) - end -end - -describe Addressable::URI, "with a base uri of 'http://a/b/c/d;p?q'" do - before do - @uri = Addressable::URI.parse("http://a/b/c/d;p?q") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g:h' should resolve to g:h" do - expect((@uri + "g:h").to_s).to eq("g:h") - expect(Addressable::URI.join(@uri, "g:h").to_s).to eq("g:h") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g' should resolve to http://a/b/c/g" do - expect((@uri + "g").to_s).to eq("http://a/b/c/g") - expect(Addressable::URI.join(@uri.to_s, "g").to_s).to eq("http://a/b/c/g") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with './g' should resolve to http://a/b/c/g" do - expect((@uri + "./g").to_s).to eq("http://a/b/c/g") - expect(Addressable::URI.join(@uri.to_s, "./g").to_s).to eq("http://a/b/c/g") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g/' should resolve to http://a/b/c/g/" do - expect((@uri + "g/").to_s).to eq("http://a/b/c/g/") - expect(Addressable::URI.join(@uri.to_s, "g/").to_s).to eq("http://a/b/c/g/") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '/g' should resolve to http://a/g" do - expect((@uri + "/g").to_s).to eq("http://a/g") - expect(Addressable::URI.join(@uri.to_s, "/g").to_s).to eq("http://a/g") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '//g' should resolve to http://g" do - expect((@uri + "//g").to_s).to eq("http://g") - expect(Addressable::URI.join(@uri.to_s, "//g").to_s).to eq("http://g") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '?y' should resolve to http://a/b/c/d;p?y" do - expect((@uri + "?y").to_s).to eq("http://a/b/c/d;p?y") - expect(Addressable::URI.join(@uri.to_s, "?y").to_s).to eq("http://a/b/c/d;p?y") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g?y' should resolve to http://a/b/c/g?y" do - expect((@uri + "g?y").to_s).to eq("http://a/b/c/g?y") - expect(Addressable::URI.join(@uri.to_s, "g?y").to_s).to eq("http://a/b/c/g?y") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '#s' should resolve to http://a/b/c/d;p?q#s" do - expect((@uri + "#s").to_s).to eq("http://a/b/c/d;p?q#s") - expect(Addressable::URI.join(@uri.to_s, "#s").to_s).to eq( - "http://a/b/c/d;p?q#s" - ) - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g#s' should resolve to http://a/b/c/g#s" do - expect((@uri + "g#s").to_s).to eq("http://a/b/c/g#s") - expect(Addressable::URI.join(@uri.to_s, "g#s").to_s).to eq("http://a/b/c/g#s") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g?y#s' should resolve to http://a/b/c/g?y#s" do - expect((@uri + "g?y#s").to_s).to eq("http://a/b/c/g?y#s") - expect(Addressable::URI.join( - @uri.to_s, "g?y#s").to_s).to eq("http://a/b/c/g?y#s") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with ';x' should resolve to http://a/b/c/;x" do - expect((@uri + ";x").to_s).to eq("http://a/b/c/;x") - expect(Addressable::URI.join(@uri.to_s, ";x").to_s).to eq("http://a/b/c/;x") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g;x' should resolve to http://a/b/c/g;x" do - expect((@uri + "g;x").to_s).to eq("http://a/b/c/g;x") - expect(Addressable::URI.join(@uri.to_s, "g;x").to_s).to eq("http://a/b/c/g;x") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with 'g;x?y#s' should resolve to http://a/b/c/g;x?y#s" do - expect((@uri + "g;x?y#s").to_s).to eq("http://a/b/c/g;x?y#s") - expect(Addressable::URI.join( - @uri.to_s, "g;x?y#s").to_s).to eq("http://a/b/c/g;x?y#s") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '' should resolve to http://a/b/c/d;p?q" do - expect((@uri + "").to_s).to eq("http://a/b/c/d;p?q") - expect(Addressable::URI.join(@uri.to_s, "").to_s).to eq("http://a/b/c/d;p?q") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '.' should resolve to http://a/b/c/" do - expect((@uri + ".").to_s).to eq("http://a/b/c/") - expect(Addressable::URI.join(@uri.to_s, ".").to_s).to eq("http://a/b/c/") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with './' should resolve to http://a/b/c/" do - expect((@uri + "./").to_s).to eq("http://a/b/c/") - expect(Addressable::URI.join(@uri.to_s, "./").to_s).to eq("http://a/b/c/") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '..' should resolve to http://a/b/" do - expect((@uri + "..").to_s).to eq("http://a/b/") - expect(Addressable::URI.join(@uri.to_s, "..").to_s).to eq("http://a/b/") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../' should resolve to http://a/b/" do - expect((@uri + "../").to_s).to eq("http://a/b/") - expect(Addressable::URI.join(@uri.to_s, "../").to_s).to eq("http://a/b/") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../g' should resolve to http://a/b/g" do - expect((@uri + "../g").to_s).to eq("http://a/b/g") - expect(Addressable::URI.join(@uri.to_s, "../g").to_s).to eq("http://a/b/g") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../..' should resolve to http://a/" do - expect((@uri + "../..").to_s).to eq("http://a/") - expect(Addressable::URI.join(@uri.to_s, "../..").to_s).to eq("http://a/") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../../' should resolve to http://a/" do - expect((@uri + "../../").to_s).to eq("http://a/") - expect(Addressable::URI.join(@uri.to_s, "../../").to_s).to eq("http://a/") - end - - # Section 5.4.1 of RFC 3986 - it "when joined with '../../g' should resolve to http://a/g" do - expect((@uri + "../../g").to_s).to eq("http://a/g") - expect(Addressable::URI.join(@uri.to_s, "../../g").to_s).to eq("http://a/g") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '../../../g' should resolve to http://a/g" do - expect((@uri + "../../../g").to_s).to eq("http://a/g") - expect(Addressable::URI.join(@uri.to_s, "../../../g").to_s).to eq("http://a/g") - end - - it "when joined with '../.././../g' should resolve to http://a/g" do - expect((@uri + "../.././../g").to_s).to eq("http://a/g") - expect(Addressable::URI.join(@uri.to_s, "../.././../g").to_s).to eq( - "http://a/g" - ) - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '../../../../g' should resolve to http://a/g" do - expect((@uri + "../../../../g").to_s).to eq("http://a/g") - expect(Addressable::URI.join( - @uri.to_s, "../../../../g").to_s).to eq("http://a/g") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '/./g' should resolve to http://a/g" do - expect((@uri + "/./g").to_s).to eq("http://a/g") - expect(Addressable::URI.join(@uri.to_s, "/./g").to_s).to eq("http://a/g") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '/../g' should resolve to http://a/g" do - expect((@uri + "/../g").to_s).to eq("http://a/g") - expect(Addressable::URI.join(@uri.to_s, "/../g").to_s).to eq("http://a/g") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g.' should resolve to http://a/b/c/g." do - expect((@uri + "g.").to_s).to eq("http://a/b/c/g.") - expect(Addressable::URI.join(@uri.to_s, "g.").to_s).to eq("http://a/b/c/g.") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '.g' should resolve to http://a/b/c/.g" do - expect((@uri + ".g").to_s).to eq("http://a/b/c/.g") - expect(Addressable::URI.join(@uri.to_s, ".g").to_s).to eq("http://a/b/c/.g") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g..' should resolve to http://a/b/c/g.." do - expect((@uri + "g..").to_s).to eq("http://a/b/c/g..") - expect(Addressable::URI.join(@uri.to_s, "g..").to_s).to eq("http://a/b/c/g..") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with '..g' should resolve to http://a/b/c/..g" do - expect((@uri + "..g").to_s).to eq("http://a/b/c/..g") - expect(Addressable::URI.join(@uri.to_s, "..g").to_s).to eq("http://a/b/c/..g") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with './../g' should resolve to http://a/b/g" do - expect((@uri + "./../g").to_s).to eq("http://a/b/g") - expect(Addressable::URI.join(@uri.to_s, "./../g").to_s).to eq("http://a/b/g") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with './g/.' should resolve to http://a/b/c/g/" do - expect((@uri + "./g/.").to_s).to eq("http://a/b/c/g/") - expect(Addressable::URI.join(@uri.to_s, "./g/.").to_s).to eq("http://a/b/c/g/") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g/./h' should resolve to http://a/b/c/g/h" do - expect((@uri + "g/./h").to_s).to eq("http://a/b/c/g/h") - expect(Addressable::URI.join(@uri.to_s, "g/./h").to_s).to eq("http://a/b/c/g/h") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g/../h' should resolve to http://a/b/c/h" do - expect((@uri + "g/../h").to_s).to eq("http://a/b/c/h") - expect(Addressable::URI.join(@uri.to_s, "g/../h").to_s).to eq("http://a/b/c/h") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g;x=1/./y' " + - "should resolve to http://a/b/c/g;x=1/y" do - expect((@uri + "g;x=1/./y").to_s).to eq("http://a/b/c/g;x=1/y") - expect(Addressable::URI.join( - @uri.to_s, "g;x=1/./y").to_s).to eq("http://a/b/c/g;x=1/y") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g;x=1/../y' should resolve to http://a/b/c/y" do - expect((@uri + "g;x=1/../y").to_s).to eq("http://a/b/c/y") - expect(Addressable::URI.join( - @uri.to_s, "g;x=1/../y").to_s).to eq("http://a/b/c/y") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g?y/./x' " + - "should resolve to http://a/b/c/g?y/./x" do - expect((@uri + "g?y/./x").to_s).to eq("http://a/b/c/g?y/./x") - expect(Addressable::URI.join( - @uri.to_s, "g?y/./x").to_s).to eq("http://a/b/c/g?y/./x") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g?y/../x' " + - "should resolve to http://a/b/c/g?y/../x" do - expect((@uri + "g?y/../x").to_s).to eq("http://a/b/c/g?y/../x") - expect(Addressable::URI.join( - @uri.to_s, "g?y/../x").to_s).to eq("http://a/b/c/g?y/../x") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g#s/./x' " + - "should resolve to http://a/b/c/g#s/./x" do - expect((@uri + "g#s/./x").to_s).to eq("http://a/b/c/g#s/./x") - expect(Addressable::URI.join( - @uri.to_s, "g#s/./x").to_s).to eq("http://a/b/c/g#s/./x") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'g#s/../x' " + - "should resolve to http://a/b/c/g#s/../x" do - expect((@uri + "g#s/../x").to_s).to eq("http://a/b/c/g#s/../x") - expect(Addressable::URI.join( - @uri.to_s, "g#s/../x").to_s).to eq("http://a/b/c/g#s/../x") - end - - # Section 5.4.2 of RFC 3986 - it "when joined with 'http:g' should resolve to http:g" do - expect((@uri + "http:g").to_s).to eq("http:g") - expect(Addressable::URI.join(@uri.to_s, "http:g").to_s).to eq("http:g") - end - - # Edge case to be sure - it "when joined with '//example.com/' should " + - "resolve to http://example.com/" do - expect((@uri + "//example.com/").to_s).to eq("http://example.com/") - expect(Addressable::URI.join( - @uri.to_s, "//example.com/").to_s).to eq("http://example.com/") - end - - it "when joined with a bogus object a TypeError should be raised" do - expect do - Addressable::URI.join(@uri, 42) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when converting the path " + - "'relative/path/to/something'" do - before do - @path = 'relative/path/to/something' - end - - it "should convert to " + - "\'relative/path/to/something\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("relative/path/to/something") - end - - it "should join with an absolute file path correctly" do - @base = Addressable::URI.convert_path("/absolute/path/") - @uri = Addressable::URI.convert_path(@path) - expect((@base + @uri).to_str).to eq( - "file:///absolute/path/relative/path/to/something" - ) - end -end - -describe Addressable::URI, "when converting a bogus path" do - it "should raise a TypeError" do - expect do - Addressable::URI.convert_path(42) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when given a UNIX root directory" do - before do - @path = "/" - end - - it "should convert to \'file:///\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given a Windows root directory" do - before do - @path = "C:\\" - end - - it "should convert to \'file:///c:/\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///c:/") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given the path '/one/two/'" do - before do - @path = '/one/two/' - end - - it "should convert to " + - "\'file:///one/two/\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///one/two/") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given the tld " do - it "'uk' should have a tld of 'uk'" do - uri = Addressable::URI.parse("http://example.com") - uri.tld = "uk" - - expect(uri.tld).to eq("uk") - end - - context "which " do - let (:uri) { Addressable::URI.parse("http://www.comrade.net/path/to/source/") } - - it "contains a subdomain" do - uri.tld = "co.uk" - - expect(uri.to_s).to eq("http://www.comrade.co.uk/path/to/source/") - end - - it "is part of the domain" do - uri.tld = "com" - - expect(uri.to_s).to eq("http://www.comrade.com/path/to/source/") - end - end -end - -describe Addressable::URI, "when given the path " + - "'c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///c:/windows/My%20Documents%20100%20/foo.txt") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given the path " + - "'file://c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "file://c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///c:/windows/My%20Documents%20100%20/foo.txt") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given the path " + - "'file:c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "file:c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///c:/windows/My%20Documents%20100%20/foo.txt") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given the path " + - "'file:/c:\\windows\\My Documents 100%20\\foo.txt'" do - before do - @path = "file:/c:\\windows\\My Documents 100%20\\foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///c:/windows/My%20Documents%20100%20/foo.txt") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given the path " + - "'file:///c|/windows/My%20Documents%20100%20/foo.txt'" do - before do - @path = "file:///c|/windows/My%20Documents%20100%20/foo.txt" - end - - it "should convert to " + - "\'file:///c:/windows/My%20Documents%20100%20/foo.txt\'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("file:///c:/windows/My%20Documents%20100%20/foo.txt") - end - - it "should have an origin of 'file://'" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.origin).to eq('file://') - end -end - -describe Addressable::URI, "when given an http protocol URI" do - before do - @path = "http://example.com/" - end - - it "should not do any conversion at all" do - @uri = Addressable::URI.convert_path(@path) - expect(@uri.to_str).to eq("http://example.com/") - end -end - -class SuperString - def initialize(string) - @string = string.to_s - end - - def to_str - return @string - end -end - -describe Addressable::URI, "when parsing a non-String object" do - it "should correctly parse anything with a 'to_str' method" do - Addressable::URI.parse(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - expect do - Addressable::URI.parse(42) - end.to raise_error(TypeError) - end - - it "should correctly parse heuristically anything with a 'to_str' method" do - Addressable::URI.heuristic_parse(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - expect do - Addressable::URI.heuristic_parse(42) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when form encoding a hash" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.form_encode( - [["&one", "/1"], ["=two", "?2"], [":three", "#3"]] - )).to eq("%26one=%2F1&%3Dtwo=%3F2&%3Athree=%233") - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.form_encode( - {"q" => "one two three"} - )).to eq("q=one+two+three") - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.form_encode( - {"key" => nil} - )).to eq("key=") - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.form_encode( - {"q" => ["one", "two", "three"]} - )).to eq("q=one&q=two&q=three") - end - - it "should result in correctly encoded newlines" do - expect(Addressable::URI.form_encode( - {"text" => "one\ntwo\rthree\r\nfour\n\r"} - )).to eq("text=one%0D%0Atwo%0D%0Athree%0D%0Afour%0D%0A%0D%0A") - end - - it "should result in a sorted percent encoded sequence" do - expect(Addressable::URI.form_encode( - [["a", "1"], ["dup", "3"], ["dup", "2"]], true - )).to eq("a=1&dup=2&dup=3") - end -end - -describe Addressable::URI, "when form encoding a non-Array object" do - it "should raise a TypeError for objects than cannot be converted" do - expect do - Addressable::URI.form_encode(42) - end.to raise_error(TypeError) - end -end - -# See https://tools.ietf.org/html/rfc6749#appendix-B -describe Addressable::URI, "when form encoding the example value from OAuth 2" do - it "should result in correct values" do - expect(Addressable::URI.form_encode( - {"value" => " %&+£€"} - )).to eq("value=+%25%26%2B%C2%A3%E2%82%AC") - end -end - -# See https://tools.ietf.org/html/rfc6749#appendix-B -describe Addressable::URI, "when form unencoding the example value from OAuth 2" do - it "should result in correct values" do - expect(Addressable::URI.form_unencode( - "value=+%25%26%2B%C2%A3%E2%82%AC" - )).to eq([["value", " %&+£€"]]) - end -end - -describe Addressable::URI, "when form unencoding a string" do - it "should result in correct values" do - expect(Addressable::URI.form_unencode( - "%26one=%2F1&%3Dtwo=%3F2&%3Athree=%233" - )).to eq([["&one", "/1"], ["=two", "?2"], [":three", "#3"]]) - end - - it "should result in correct values" do - expect(Addressable::URI.form_unencode( - "q=one+two+three" - )).to eq([["q", "one two three"]]) - end - - it "should result in correct values" do - expect(Addressable::URI.form_unencode( - "text=one%0D%0Atwo%0D%0Athree%0D%0Afour%0D%0A%0D%0A" - )).to eq([["text", "one\ntwo\nthree\nfour\n\n"]]) - end - - it "should result in correct values" do - expect(Addressable::URI.form_unencode( - "a=1&dup=2&dup=3" - )).to eq([["a", "1"], ["dup", "2"], ["dup", "3"]]) - end - - it "should result in correct values" do - expect(Addressable::URI.form_unencode( - "key" - )).to eq([["key", nil]]) - end - - it "should result in correct values" do - expect(Addressable::URI.form_unencode("GivenName=Ren%C3%A9")).to eq( - [["GivenName", "René"]] - ) - end -end - -describe Addressable::URI, "when form unencoding a non-String object" do - it "should correctly parse anything with a 'to_str' method" do - Addressable::URI.form_unencode(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - expect do - Addressable::URI.form_unencode(42) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when normalizing a non-String object" do - it "should correctly parse anything with a 'to_str' method" do - Addressable::URI.normalize_component(SuperString.new(42)) - end - - it "should raise a TypeError for objects than cannot be converted" do - expect do - Addressable::URI.normalize_component(42) - end.to raise_error(TypeError) - end - - it "should raise a TypeError for objects than cannot be converted" do - expect do - Addressable::URI.normalize_component("component", 42) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when normalizing a path with an encoded slash" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.parse("/path%2Fsegment/").normalize.path).to eq( - "/path%2Fsegment/" - ) - end -end - -describe Addressable::URI, "when normalizing a path with special unicode" do - it "does not stop at or ignore null bytes" do - expect(Addressable::URI.parse("/path%00segment/").normalize.path).to eq( - "/path%00segment/" - ) - end - - it "does apply NFC unicode normalization" do - expect(Addressable::URI.parse("/%E2%84%A6").normalize.path).to eq( - "/%CE%A9" - ) - end - - it "does not apply NFKC unicode normalization" do - expect(Addressable::URI.parse("/%C2%AF%C2%A0").normalize.path).to eq( - "/%C2%AF%C2%A0" - ) - end -end - -describe Addressable::URI, "when normalizing a partially encoded string" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.normalize_component( - "partially % encoded%21" - )).to eq("partially%20%25%20encoded!") - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.normalize_component( - "partially %25 encoded!" - )).to eq("partially%20%25%20encoded!") - end -end - -describe Addressable::URI, "when normalizing a unicode sequence" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.normalize_component( - "/C%CC%A7" - )).to eq("/%C3%87") - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.normalize_component( - "/%C3%87" - )).to eq("/%C3%87") - end -end - -describe Addressable::URI, "when normalizing a multibyte string" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.normalize_component("günther")).to eq( - "g%C3%BCnther" - ) - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.normalize_component("g%C3%BCnther")).to eq( - "g%C3%BCnther" - ) - end -end - -describe Addressable::URI, "when normalizing a string but leaving some characters encoded" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.normalize_component("%58X%59Y%5AZ", "0-9a-zXY", "Y")).to eq( - "XX%59Y%5A%5A" - ) - end - - it "should not modify the character class" do - character_class = "0-9a-zXY" - - character_class_copy = character_class.dup - - Addressable::URI.normalize_component("%58X%59Y%5AZ", character_class, "Y") - - expect(character_class).to eq(character_class_copy) - end -end - -describe Addressable::URI, "when encoding IP literals" do - it "should work for IPv4" do - input = "http://127.0.0.1/" - expect(Addressable::URI.encode(input)).to eq(input) - end - - it "should work for IPv6" do - input = "http://[fe80::200:f8ff:fe21:67cf]/" - expect(Addressable::URI.encode(input)).to eq(input) - end -end - -describe Addressable::URI, "when encoding a string with existing encodings to upcase" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.encode_component("JK%4c", "0-9A-IKM-Za-z%", "L")).to eq("%4AK%4C") - end -end - -describe Addressable::URI, "when encoding a multibyte string" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.encode_component("günther")).to eq("g%C3%BCnther") - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.encode_component( - "günther", /[^a-zA-Z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\-\.\_\~]/ - )).to eq("g%C3%BCnther") - end -end - -describe Addressable::URI, "when form encoding a multibyte string" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.form_encode({"GivenName" => "René"})).to eq( - "GivenName=Ren%C3%A9" - ) - end -end - -describe Addressable::URI, "when encoding a string with ASCII chars 0-15" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.encode_component("one\ntwo")).to eq("one%0Atwo") - end - - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.encode_component( - "one\ntwo", /[^a-zA-Z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\-\.\_\~]/ - )).to eq("one%0Atwo") - end -end - -describe Addressable::URI, "when unencoding a multibyte string" do - it "should result in correct percent encoded sequence" do - expect(Addressable::URI.unencode_component("g%C3%BCnther")).to eq("günther") - end - - it "should consistently use UTF-8 internally" do - expect(Addressable::URI.unencode_component("ski=%BA%DAɫ")).to eq("ski=\xBA\xDAɫ") - end - - it "should not fail with UTF-8 incompatible string" do - url = "/M%E9/\xE9?p=\xFC".b - expect(Addressable::URI.unencode_component(url)).to eq("/M\xE9/\xE9?p=\xFC") - end - - it "should result in correct percent encoded sequence as a URI" do - expect(Addressable::URI.unencode( - "/path?g%C3%BCnther", ::Addressable::URI - )).to eq(Addressable::URI.new( - :path => "/path", :query => "günther" - )) - end -end - -describe Addressable::URI, "when partially unencoding a string" do - it "should unencode all characters by default" do - expect(Addressable::URI.unencode('%%25~%7e+%2b', String)).to eq('%%~~++') - end - - it "should unencode characters not in leave_encoded" do - expect(Addressable::URI.unencode('%%25~%7e+%2b', String, '~')).to eq('%%~%7e++') - end - - it "should leave characters in leave_encoded alone" do - expect(Addressable::URI.unencode('%%25~%7e+%2b', String, '%~+')).to eq('%%25~%7e+%2b') - end -end - -describe Addressable::URI, "when unencoding a bogus object" do - it "should raise a TypeError" do - expect do - Addressable::URI.unencode_component(42) - end.to raise_error(TypeError) - end - - it "should raise a TypeError" do - expect do - Addressable::URI.unencode("/path?g%C3%BCnther", Integer) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when encoding a bogus object" do - it "should raise a TypeError" do - expect do - Addressable::URI.encode(Object.new) - end.to raise_error(TypeError) - end - - it "should raise a TypeError" do - expect do - Addressable::URI.normalized_encode(Object.new) - end.to raise_error(TypeError) - end - - it "should raise a TypeError" do - expect do - Addressable::URI.encode_component("günther", Object.new) - end.to raise_error(TypeError) - end - - it "should raise a TypeError" do - expect do - Addressable::URI.encode_component(Object.new) - end.to raise_error(TypeError) - end -end - -describe Addressable::URI, "when given the input " + - "'http://example.com/'" do - before do - @input = "http://example.com/" - end - - it "should heuristically parse to 'http://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("http://example.com/") - end - - it "should not raise error when frozen" do - expect do - Addressable::URI.heuristic_parse(@input).freeze.to_s - end.not_to raise_error - end -end - -describe Addressable::URI, "when given the input " + - "'https://example.com/'" do - before do - @input = "https://example.com/" - end - - it "should heuristically parse to 'https://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("https://example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "'http:example.com/'" do - before do - @input = "http:example.com/" - end - - it "should heuristically parse to 'http://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("http://example.com/") - end - - it "should heuristically parse to 'http://example.com/' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("http://example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "'https:example.com/'" do - before do - @input = "https:example.com/" - end - - it "should heuristically parse to 'https://example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("https://example.com/") - end - - it "should heuristically parse to 'https://example.com/' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("https://example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "'http://example.com/example.com/'" do - before do - @input = "http://example.com/example.com/" - end - - it "should heuristically parse to 'http://example.com/example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("http://example.com/example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "'http://prefix\\.example.com/'" do - before do - @input = "http://prefix\\.example.com/" - end - - it "should heuristically parse to 'http://prefix/.example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.authority).to eq("prefix") - expect(@uri.to_s).to eq("http://prefix/.example.com/") - end - - it "should heuristically parse to 'http://prefix/.example.com/' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("http://prefix/.example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "'http://p:\\/'" do - before do - @input = "http://p:\\/" - end - - it "should heuristically parse to 'http://p//'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.authority).to eq("p") - expect(@uri.to_s).to eq("http://p//") - end - - it "should heuristically parse to 'http://p//' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("http://p//") - end -end - -describe Addressable::URI, "when given the input " + - "'http://p://'" do - before do - @input = "http://p://" - end - - it "should heuristically parse to 'http://p//'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.authority).to eq("p") - expect(@uri.to_s).to eq("http://p//") - end - - it "should heuristically parse to 'http://p//' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("http://p//") - end -end - -describe Addressable::URI, "when given the input " + - "'http://p://p'" do - before do - @input = "http://p://p" - end - - it "should heuristically parse to 'http://p//p'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.authority).to eq("p") - expect(@uri.to_s).to eq("http://p//p") - end - - it "should heuristically parse to 'http://p//p' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("http://p//p") - end -end - -describe Addressable::URI, "when given the input " + - "'http://prefix .example.com/'" do - before do - @input = "http://prefix .example.com/" - end - - # Justification here being that no browser actually tries to resolve this. - # They all treat this as a web search. - it "should heuristically parse to 'http://prefix%20.example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.authority).to eq("prefix%20.example.com") - expect(@uri.to_s).to eq("http://prefix%20.example.com/") - end - - it "should heuristically parse to 'http://prefix%20.example.com/' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("http://prefix%20.example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "' http://www.example.com/ '" do - before do - @input = " http://www.example.com/ " - end - - it "should heuristically parse to 'http://prefix%20.example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.scheme).to eq("http") - expect(@uri.path).to eq("/") - expect(@uri.to_s).to eq("http://www.example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "'http://prefix%2F.example.com/'" do - before do - @input = "http://prefix%2F.example.com/" - end - - it "should heuristically parse to 'http://prefix%2F.example.com/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.authority).to eq("prefix%2F.example.com") - expect(@uri.to_s).to eq("http://prefix%2F.example.com/") - end - - it "should heuristically parse to 'http://prefix%2F.example.com/' " + - "even with a scheme hint of 'ftp'" do - @uri = Addressable::URI.heuristic_parse(@input, {:scheme => 'ftp'}) - expect(@uri.to_s).to eq("http://prefix%2F.example.com/") - end -end - -describe Addressable::URI, "when given the input " + - "'/path/to/resource'" do - before do - @input = "/path/to/resource" - end - - it "should heuristically parse to '/path/to/resource'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("/path/to/resource") - end -end - -describe Addressable::URI, "when given the input " + - "'relative/path/to/resource'" do - before do - @input = "relative/path/to/resource" - end - - it "should heuristically parse to 'relative/path/to/resource'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("relative/path/to/resource") - end -end - -describe Addressable::URI, "when given the input " + - "'example.com'" do - before do - @input = "example.com" - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("http://example.com") - end -end - -describe Addressable::URI, "when given the input " + - "'example.com' and a scheme hint of 'ftp'" do - before do - @input = "example.com" - @hints = {:scheme => 'ftp'} - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input, @hints) - expect(@uri.to_s).to eq("ftp://example.com") - end -end - -describe Addressable::URI, "when given the input " + - "'example.com:21' and a scheme hint of 'ftp'" do - before do - @input = "example.com:21" - @hints = {:scheme => 'ftp'} - end - - it "should heuristically parse to 'http://example.com:21'" do - @uri = Addressable::URI.heuristic_parse(@input, @hints) - expect(@uri.to_s).to eq("ftp://example.com:21") - end -end - -describe Addressable::URI, "when given the input " + - "'example.com/path/to/resource'" do - before do - @input = "example.com/path/to/resource" - end - - it "should heuristically parse to 'http://example.com/path/to/resource'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("http://example.com/path/to/resource") - end -end - -describe Addressable::URI, "when given the input " + - "'http:///example.com'" do - before do - @input = "http:///example.com" - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("http://example.com") - end -end - -describe Addressable::URI, "when given the input which "\ - "start with digits and has specified port" do - before do - @input = "7777.example.org:8089" - end - - it "should heuristically parse to 'http://7777.example.org:8089'" do - uri = Addressable::URI.heuristic_parse(@input) - expect(uri.to_s).to eq("http://7777.example.org:8089") - end -end - -describe Addressable::URI, "when given the input " + - "'feed:///example.com'" do - before do - @input = "feed:///example.com" - end - - it "should heuristically parse to 'feed://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("feed://example.com") - end -end - -describe Addressable::URI, "when given the input " + - "'file://localhost/path/to/resource/'" do - before do - @input = "file://localhost/path/to/resource/" - end - - it "should heuristically parse to 'file:///path/to/resource/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("file:///path/to/resource/") - end -end - -describe Addressable::URI, "when given the input " + - "'file://path/to/resource/'" do - before do - @input = "file://path/to/resource/" - end - - it "should heuristically parse to 'file:///path/to/resource/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("file:///path/to/resource/") - end -end - -describe Addressable::URI, "when given the input " + - "'file://///path/to/resource/'" do - before do - @input = "file:///////path/to/resource/" - end - - it "should heuristically parse to 'file:////path/to/resource/'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("file:////path/to/resource/") - end -end - -describe Addressable::URI, "when given the input " + - "'feed://http://example.com'" do - before do - @input = "feed://http://example.com" - end - - it "should heuristically parse to 'feed:http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("feed:http://example.com") - end -end - -describe Addressable::URI, "when given the input " + - "::URI.parse('http://example.com')" do - before do - @input = ::URI.parse('http://example.com') - end - - it "should heuristically parse to 'http://example.com'" do - @uri = Addressable::URI.heuristic_parse(@input) - expect(@uri.to_s).to eq("http://example.com") - end -end - -describe Addressable::URI, "when given the input: 'user@domain.com'" do - before do - @input = "user@domain.com" - end - - context "for heuristic parse" do - it "should remain 'mailto:user@domain.com'" do - uri = Addressable::URI.heuristic_parse("mailto:#{@input}") - expect(uri.to_s).to eq("mailto:user@domain.com") - end - - it "should have a scheme of 'mailto'" do - uri = Addressable::URI.heuristic_parse(@input) - expect(uri.to_s).to eq("mailto:user@domain.com") - expect(uri.scheme).to eq("mailto") - end - - it "should remain 'acct:user@domain.com'" do - uri = Addressable::URI.heuristic_parse("acct:#{@input}") - expect(uri.to_s).to eq("acct:user@domain.com") - end - - context "HTTP" do - before do - @uri = Addressable::URI.heuristic_parse("http://#{@input}/") - end - - it "should remain 'http://user@domain.com/'" do - expect(@uri.to_s).to eq("http://user@domain.com/") - end - - it "should have the username 'user' for HTTP basic authentication" do - expect(@uri.user).to eq("user") - end - end - end -end - -describe Addressable::URI, "when assigning query values" do - before do - @uri = Addressable::URI.new - end - - it "should correctly assign {:a => 'a', :b => ['c', 'd', 'e']}" do - @uri.query_values = {:a => "a", :b => ["c", "d", "e"]} - expect(@uri.query).to eq("a=a&b=c&b=d&b=e") - end - - it "should raise an error attempting to assign {'a' => {'b' => ['c']}}" do - expect do - @uri.query_values = { 'a' => {'b' => ['c'] } } - end.to raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:b => '2', :a => {:c => '1'}}" do - expect do - @uri.query_values = {:b => '2', :a => {:c => '1'}} - end.to raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => [{:c => 'c', :d => 'd'}, " + - "{:e => 'e', :f => 'f'}]}" do - expect do - @uri.query_values = { - :a => "a", :b => [{:c => "c", :d => "d"}, {:e => "e", :f => "f"}] - } - end.to raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => [{:c => true, :d => 'd'}, " + - "{:e => 'e', :f => 'f'}]}" do - expect do - @uri.query_values = { - :a => 'a', :b => [{:c => true, :d => 'd'}, {:e => 'e', :f => 'f'}] - } - end.to raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => {:c => true, :d => 'd'}}" do - expect do - @uri.query_values = { - :a => 'a', :b => {:c => true, :d => 'd'} - } - end.to raise_error(TypeError) - end - - it "should raise an error attempting to assign " + - "{:a => 'a', :b => {:c => true, :d => 'd'}}" do - expect do - @uri.query_values = { - :a => 'a', :b => {:c => true, :d => 'd'} - } - end.to raise_error(TypeError) - end - - it "should correctly assign {:a => 1, :b => 1.5}" do - @uri.query_values = { :a => 1, :b => 1.5 } - expect(@uri.query).to eq("a=1&b=1.5") - end - - it "should raise an error attempting to assign " + - "{:z => 1, :f => [2, {999.1 => [3,'4']}, ['h', 'i']], " + - ":a => {:b => ['c', 'd'], :e => true, :y => 0.5}}" do - expect do - @uri.query_values = { - :z => 1, - :f => [ 2, {999.1 => [3,'4']}, ['h', 'i'] ], - :a => { :b => ['c', 'd'], :e => true, :y => 0.5 } - } - end.to raise_error(TypeError) - end - - it "should correctly assign {}" do - @uri.query_values = {} - expect(@uri.query).to eq('') - end - - it "should correctly assign nil" do - @uri.query_values = nil - expect(@uri.query).to eq(nil) - end - - it "should correctly sort {'ab' => 'c', :ab => 'a', :a => 'x'}" do - @uri.query_values = {'ab' => 'c', :ab => 'a', :a => 'x'} - expect(@uri.query).to eq("a=x&ab=a&ab=c") - end - - it "should correctly assign " + - "[['b', 'c'], ['b', 'a'], ['a', 'a']]" do - # Order can be guaranteed in this format, so preserve it. - @uri.query_values = [['b', 'c'], ['b', 'a'], ['a', 'a']] - expect(@uri.query).to eq("b=c&b=a&a=a") - end - - it "should preserve query string order" do - query_string = (('a'..'z').to_a.reverse.map { |e| "#{e}=#{e}" }).join("&") - @uri.query = query_string - original_uri = @uri.to_s - @uri.query_values = @uri.query_values(Array) - expect(@uri.to_s).to eq(original_uri) - end - - describe 'when a hash with mixed types is assigned to query_values' do - it 'should not raise an error' do - skip 'Issue #94' - expect { subject.query_values = { "page" => "1", :page => 2 } }.to_not raise_error - end - end -end - -describe Addressable::URI, "when assigning path values" do - before do - @uri = Addressable::URI.new - end - - it "should correctly assign paths containing colons" do - @uri.path = "acct:bob@sporkmonger.com" - expect(@uri.path).to eq("acct:bob@sporkmonger.com") - expect(@uri.normalize.to_str).to eq("acct%2Fbob@sporkmonger.com") - expect { @uri.to_s }.to raise_error( - Addressable::URI::InvalidURIError - ) - end - - it "should correctly assign paths containing colons" do - @uri.path = "/acct:bob@sporkmonger.com" - @uri.authority = "example.com" - expect(@uri.normalize.to_str).to eq("//example.com/acct:bob@sporkmonger.com") - end - - it "should correctly assign paths containing colons" do - @uri.path = "acct:bob@sporkmonger.com" - @uri.scheme = "something" - expect(@uri.normalize.to_str).to eq("something:acct:bob@sporkmonger.com") - end - - it "should not allow relative paths to be assigned on absolute URIs" do - expect do - @uri.scheme = "http" - @uri.host = "example.com" - @uri.path = "acct:bob@sporkmonger.com" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should not allow relative paths to be assigned on absolute URIs" do - expect do - @uri.path = "acct:bob@sporkmonger.com" - @uri.scheme = "http" - @uri.host = "example.com" - end.to raise_error(Addressable::URI::InvalidURIError) - end - - it "should not allow relative paths to be assigned on absolute URIs" do - expect do - @uri.path = "uuid:0b3ecf60-3f93-11df-a9c3-001f5bfffe12" - @uri.scheme = "urn" - end.not_to raise_error - end -end - -describe Addressable::URI, "when initializing a subclass of Addressable::URI" do - before do - @uri = Class.new(Addressable::URI).new - end - - it "should have the same class after being parsed" do - expect(@uri.class).to eq(Addressable::URI.parse(@uri).class) - end - - it "should have the same class as its duplicate" do - expect(@uri.class).to eq(@uri.dup.class) - end - - it "should have the same class after being normalized" do - expect(@uri.class).to eq(@uri.normalize.class) - end - - it "should have the same class after being merged" do - expect(@uri.class).to eq(@uri.merge(:path => 'path').class) - end - - it "should have the same class after being joined" do - expect(@uri.class).to eq(@uri.join('path').class) - end -end - -describe Addressable::URI, "support serialization roundtrip" do - before do - @uri = Addressable::URI.new( - :scheme => "http", - :user => "user", - :password => "password", - :host => "example.com", - :port => 80, - :path => "/path", - :query => "query=value", - :fragment => "fragment" - ) - end - - it "is in a working state after being serialized with Marshal" do - @uri = Addressable::URI.parse("http://example.com") - cloned_uri = Marshal.load(Marshal.dump(@uri)) - expect(cloned_uri.normalized_scheme).to be == @uri.normalized_scheme - end - - it "is in a working state after being serialized with YAML" do - @uri = Addressable::URI.parse("http://example.com") - cloned_uri = if YAML.respond_to?(:unsafe_load) - YAML.unsafe_load(YAML.dump(@uri)) - else - YAML.load(YAML.dump(@uri)) - end - expect(cloned_uri.normalized_scheme).to be == @uri.normalized_scheme - end -end - -describe Addressable::URI, "when initialized in a non-main `Ractor`" do - it "should have the same value as if used in the main `Ractor`" do - pending("Ruby 3.0+ for `Ractor` support") unless defined?(Ractor) - main = Addressable::URI.parse("http://example.com") - expect( - Ractor.new { Addressable::URI.parse("http://example.com") }.take - ).to eq(main) - end -end - -describe Addressable::URI, "when deferring validation" do - subject(:deferred) { uri.instance_variable_get(:@validation_deferred) } - - let(:uri) { Addressable::URI.parse("http://example.com") } - - it "defers validation within the block" do - uri.defer_validation do - expect(deferred).to be true - end - end - - it "always resets deferral afterward" do - expect { uri.defer_validation { raise "boom" } }.to raise_error("boom") - expect(deferred).to be false - end - - it "returns nil" do - res = uri.defer_validation {} - expect(res).to be nil - end -end - -describe Addressable::URI, "YAML safe loading" do - it "doesn't serialize anonymous objects" do - url = Addressable::URI.parse("http://example.com/") - expect(YAML.dump(url)).to_not include("!ruby/object {}") - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/spec_helper.rb b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/spec_helper.rb deleted file mode 100644 index bd8e3958..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/spec/spec_helper.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -require 'bundler/setup' -require 'rspec/its' - -begin - require 'coveralls' - Coveralls.wear! do - add_filter "spec/" - add_filter "vendor/" - end -rescue LoadError - warn "warning: coveralls gem not found; skipping Coveralls" - require 'simplecov' - SimpleCov.start do - add_filter "spec/" - add_filter "vendor/" - end -end if Gem.loaded_specs.key?("simplecov") - -class TestHelper - def self.native_supported? - mri = RUBY_ENGINE == "ruby" - windows = RUBY_PLATFORM.include?("mingw") - - mri && !windows - end -end - -RSpec.configure do |config| - config.warnings = true - config.filter_run_when_matching :focus -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/clobber.rake b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/clobber.rake deleted file mode 100644 index a9e32b34..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/clobber.rake +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -desc "Remove all build products" -task "clobber" diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/gem.rake b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/gem.rake deleted file mode 100644 index 70b1f97d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/gem.rake +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -require "rubygems/package_task" - -namespace :gem do - GEM_SPEC = Gem::Specification.new do |s| - s.name = PKG_NAME - s.version = PKG_VERSION - s.summary = PKG_SUMMARY - s.description = PKG_DESCRIPTION - - s.files = PKG_FILES.to_a - - s.extra_rdoc_files = %w( README.md ) - s.rdoc_options.concat ["--main", "README.md"] - - if !s.respond_to?(:add_development_dependency) - puts "Cannot build Gem with this version of RubyGems." - exit(1) - end - - s.required_ruby_version = ">= 2.2" - - s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 7.0" - s.add_development_dependency "bundler", ">= 1.0", "< 3.0" - - s.require_path = "lib" - - s.author = "Bob Aman" - s.email = "bob@sporkmonger.com" - s.homepage = "https://github.com/sporkmonger/addressable" - s.license = "Apache-2.0" - s.metadata = { - "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v#{PKG_VERSION}" - } - end - - Gem::PackageTask.new(GEM_SPEC) do |p| - p.gem_spec = GEM_SPEC - p.need_tar = true - p.need_zip = true - end - - desc "Generates .gemspec file" - task :gemspec do - spec_string = GEM_SPEC.to_ruby - File.open("#{GEM_SPEC.name}.gemspec", "w") do |file| - file.write spec_string - end - end - - desc "Show information about the gem" - task :debug do - puts GEM_SPEC.to_ruby - end - - desc "Install the gem" - task :install => ["clobber", "gem:package"] do - sh "gem install --local ./pkg/#{GEM_SPEC.full_name}.gem" - end - - desc "Uninstall the gem" - task :uninstall do - installed_list = Gem.source_index.find_name(PKG_NAME) - if installed_list && - (installed_list.collect { |s| s.version.to_s}.include?(PKG_VERSION)) - sh( - "gem uninstall --version '#{PKG_VERSION}' " + - "--ignore-dependencies --executables #{PKG_NAME}" - ) - end - end - - desc "Reinstall the gem" - task :reinstall => [:uninstall, :install] - - desc "Package for release" - task :release => ["gem:package", "gem:gemspec"] do |t| - v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z" - abort "Versions don't match #{v} vs #{PROJ.version}" if v != PKG_VERSION - pkg = "pkg/#{GEM_SPEC.full_name}" - - changelog = File.open("CHANGELOG.md") { |file| file.read } - - puts "Releasing #{PKG_NAME} v. #{PKG_VERSION}" - Rake::Task["git:tag:create"].invoke - end -end - -desc "Alias to gem:package" -task "gem" => "gem:package" - -task "gem:release" => "gem:gemspec" - -task "clobber" => ["gem:clobber_package"] diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/git.rake b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/git.rake deleted file mode 100644 index 1238c8d2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/git.rake +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -namespace :git do - namespace :tag do - desc "List tags from the Git repository" - task :list do - tags = `git tag -l` - tags.gsub!("\r", "") - tags = tags.split("\n").sort {|a, b| b <=> a } - puts tags.join("\n") - end - - desc "Create a new tag in the Git repository" - task :create do - changelog = File.open("CHANGELOG.md", "r") { |file| file.read } - puts "-" * 80 - puts changelog - puts "-" * 80 - puts - - v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z" - abort "Versions don't match #{v} vs #{PKG_VERSION}" if v != PKG_VERSION - - git_status = `git status` - if git_status !~ /^nothing to commit/ - abort "Working directory isn't clean." - end - - tag = "#{PKG_NAME}-#{PKG_VERSION}" - msg = "Release #{PKG_NAME}-#{PKG_VERSION}" - - existing_tags = `git tag -l #{PKG_NAME}-*`.split('\n') - if existing_tags.include?(tag) - warn("Tag already exists, deleting...") - unless system "git tag -d #{tag}" - abort "Tag deletion failed." - end - end - puts "Creating git tag '#{tag}'..." - unless system "git tag -a -m \"#{msg}\" #{tag}" - abort "Tag creation failed." - end - end - end -end - -task "gem:release" => "git:tag:create" diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/metrics.rake b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/metrics.rake deleted file mode 100644 index 107cc244..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/metrics.rake +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -namespace :metrics do - task :lines do - lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 - for file_name in FileList["lib/**/*.rb"] - f = File.open(file_name) - while line = f.gets - lines += 1 - next if line =~ /^\s*$/ - next if line =~ /^\s*#/ - codelines += 1 - end - puts "L: #{sprintf("%4d", lines)}, " + - "LOC #{sprintf("%4d", codelines)} | #{file_name}" - total_lines += lines - total_codelines += codelines - - lines, codelines = 0, 0 - end - - puts "Total: Lines #{total_lines}, LOC #{total_codelines}" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/profile.rake b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/profile.rake deleted file mode 100644 index b697d489..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/profile.rake +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -namespace :profile do - desc "Profile Template match memory allocations" - task :template_match_memory do - require "memory_profiler" - require "addressable/template" - - start_at = Time.now.to_f - template = Addressable::Template.new("http://example.com/{?one,two,three}") - report = MemoryProfiler.report do - 30_000.times do - template.match( - "http://example.com/?one=one&two=floo&three=me" - ) - end - end - end_at = Time.now.to_f - print_options = { scale_bytes: true, normalize_paths: true } - puts "\n\n" - - if ENV["CI"] - report.pretty_print(print_options) - else - t_allocated = report.scale_bytes(report.total_allocated_memsize) - t_retained = report.scale_bytes(report.total_retained_memsize) - - puts "Total allocated: #{t_allocated} (#{report.total_allocated} objects)" - puts "Total retained: #{t_retained} (#{report.total_retained} objects)" - puts "Took #{end_at - start_at} seconds" - - FileUtils.mkdir_p("tmp") - report.pretty_print(to_file: "tmp/memprof.txt", **print_options) - end - end - - desc "Profile URI parse memory allocations" - task :memory do - require "memory_profiler" - require "addressable/uri" - if ENV["IDNA_MODE"] == "pure" - Addressable.send(:remove_const, :IDNA) - load "addressable/idna/pure.rb" - end - - start_at = Time.now.to_f - report = MemoryProfiler.report do - 30_000.times do - Addressable::URI.parse( - "http://google.com/stuff/../?with_lots=of¶ms=asdff#!stuff" - ).normalize - end - end - end_at = Time.now.to_f - print_options = { scale_bytes: true, normalize_paths: true } - puts "\n\n" - - if ENV["CI"] - report.pretty_print(**print_options) - else - t_allocated = report.scale_bytes(report.total_allocated_memsize) - t_retained = report.scale_bytes(report.total_retained_memsize) - - puts "Total allocated: #{t_allocated} (#{report.total_allocated} objects)" - puts "Total retained: #{t_retained} (#{report.total_retained} objects)" - puts "Took #{end_at - start_at} seconds" - - FileUtils.mkdir_p("tmp") - report.pretty_print(to_file: "tmp/memprof.txt", **print_options) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/rspec.rake b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/rspec.rake deleted file mode 100644 index e3d9f014..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/rspec.rake +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -require "rspec/core/rake_task" - -namespace :spec do - RSpec::Core::RakeTask.new(:simplecov) do |t| - t.pattern = FileList['spec/**/*_spec.rb'] - t.rspec_opts = %w[--color --format documentation] unless ENV["CI"] - end - - namespace :simplecov do - desc "Browse the code coverage report." - task :browse => "spec:simplecov" do - require "launchy" - Launchy.open("coverage/index.html") - end - end -end - -desc "Alias to spec:simplecov" -task "spec" => "spec:simplecov" - -task "clobber" => ["spec:clobber_simplecov"] diff --git a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/yard.rake b/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/yard.rake deleted file mode 100644 index 515f9603..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/addressable-2.8.7/tasks/yard.rake +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -require "rake" - -begin - require "yard" - require "yard/rake/yardoc_task" - - namespace :doc do - desc "Generate Yardoc documentation" - YARD::Rake::YardocTask.new do |yardoc| - yardoc.name = "yard" - yardoc.options = ["--verbose", "--markup", "markdown"] - yardoc.files = FileList[ - "lib/**/*.rb", "ext/**/*.c", - "README.md", "CHANGELOG.md", "LICENSE.txt" - ].exclude(/idna/) - end - end - - task "clobber" => ["doc:clobber_yard"] - - desc "Alias to doc:yard" - task "doc" => "doc:yard" -rescue LoadError - # If yard isn't available, it's not the end of the world - desc "Alias to doc:rdoc" - task "doc" => "doc:rdoc" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/CHANGELOG.md deleted file mode 100644 index 81e452c5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -## 0.2.2 - -* The gem was missing - -## 0.2.1 - -* Fixed rdoc tasks, replaced Test::Unit with Minitest (Thanks to @yob, @strzibny for changes) -* Removed jeweler dependency - diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/LICENSE b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/LICENSE deleted file mode 100644 index 12ea103b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009 Jan Krutisch - -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/bundle/ruby/3.2.0/gems/afm-0.2.2/README.rdoc b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/README.rdoc deleted file mode 100644 index c54d7718..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/README.rdoc +++ /dev/null @@ -1,20 +0,0 @@ -= afm - -A very simple library to read Adobe Font Metrics files (afm). - -Currently simply parses the file and saves it in a few attributes. - - -== Note on Patches/Pull Requests - -* Fork the project. -* Make your feature addition or bug fix. -* Add tests for it. This is important so I don't break it in a - future version unintentionally. -* Commit, do not mess with rakefile, version, or history. - (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) -* Send me a pull request. Bonus points for topic branches. - -== Copyright - -Copyright (c) 2010 Jan Krutisch. See LICENSE for details. diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/Rakefile b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/Rakefile deleted file mode 100644 index 197264dd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/Rakefile +++ /dev/null @@ -1,23 +0,0 @@ -require 'rubygems' -require 'bundler/setup' -require 'rake' - -require 'rake/testtask' -Rake::TestTask.new(:test) do |test| - test.libs << 'lib' << 'test' - test.pattern = 'test/**/test_*.rb' - test.verbose = true -end - -task :default => :test - -require 'rdoc/task' - -RDoc::Task.new do |rdoc| - version = File.exist?('VERSION') ? File.read('VERSION') : "" - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "afm #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') -end diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/VERSION b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/VERSION deleted file mode 100644 index f4778493..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.2.2 \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/lib/afm.rb b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/lib/afm.rb deleted file mode 100644 index 52ed6bc3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/lib/afm.rb +++ /dev/null @@ -1,105 +0,0 @@ -module AFM - - ISO_LATIN1_ENCODING = %w( - .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef - .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef - .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef - .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef space - exclam quotedbl numbersign dollar percent ampersand quoteright - parenleft parenright asterisk plus comma minus period slash zero one - two three four five six seven eight nine colon semicolon less equal - greater question at A B C D E F G H I J K L M N O P Q R S - T U V W X Y Z bracketleft backslash bracketright asciicircum - underscore quoteleft a b c d e f g h i j k l m n o p q r s - t u v w x y z braceleft bar braceright asciitilde .notdef .notdef - .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef - .notdef .notdef .notdef .notdef .notdef .notdef .notdef dotlessi grave - acute circumflex tilde macron breve dotaccent dieresis .notdef ring - cedilla .notdef hungarumlaut ogonek caron space exclamdown cent - sterling currency yen brokenbar section dieresis copyright ordfeminine - guillemotleft logicalnot hyphen registered macron degree plusminus - twosuperior threesuperior acute mu paragraph periodcentered cedilla - onesuperior ordmasculine guillemotright onequarter onehalf threequarters - questiondown Agrave Aacute Acircumflex Atilde Adieresis Aring AE - Ccedilla Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex - Idieresis Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis - multiply Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn - germandbls agrave aacute acircumflex atilde adieresis aring ae - ccedilla egrave eacute ecircumflex edieresis igrave iacute icircumflex - idieresis eth ntilde ograve oacute ocircumflex otilde odieresis divide - oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis - ) - - - class Font - attr_reader :metadata, :char_metrics, :char_metrics_by_code, :kern_pairs - - # Loading a Font Metrics file by absolute path (no automatic font path resolution) - def initialize(filename) - @metadata = {} - @char_metrics = {} - @char_metrics_by_code = {} - @kern_pairs = [] - File.open(filename) do |file| - mode = :meta - file.each_line do |line| - case(line) - when /^StartFontMetrics/ ; mode = :meta - when /^StartCharMetrics/ ; mode = :char_metrics - when /^EndCharMetrics/ ; mode = :meta - when /^StartKernData/ ; mode = :kern_data - when /^StartKernPairs/ ; mode = :kern_pairs - when /^EndKernPairs/ ; mode = :kern_data - when /^EndKernData/ ; mode = :meta - else - case(mode) - when :meta - if match = line.match(/^([\w]+) (.*)$/) - @metadata[match[1]] = match[2] - end - when :char_metrics - metrics = {} - metrics[:charcode] = match[1].to_i if match = line.match(/C (-?\d+) *?;/) - metrics[:wx] = match[1].to_i if match = line.match(/WX (-?\d+) *?;/) - metrics[:name] = match[1] if match = line.match(/N ([.\w]+) *?;/) - if match = line.match(/B (-?\d+) (-?\d+) (-?\d+) (-?\d+) *?;/) - metrics[:boundingbox] = [match[1].to_i, match[2].to_i, match[3].to_i, match[4].to_i] - end - @char_metrics[metrics[:name]] = metrics if metrics[:name] - @char_metrics_by_code[metrics[:charcode]] = metrics if metrics[:charcode] && metrics[:charcode] > 0 - when :kern_pairs - if match = line.match(/^KPX ([.\w]+) ([.\w]+) (-?\d+)$/) - @kern_pairs << [match[1], match[2], match[3].to_i] - end - end - end - end - end - end - - # - # alias for new() - def self.from_file(file) - self.new(file) - end - - # - # Get metadata by key - def [](key) - @metadata[key] - end - # - # Get metrics for character. Takes an integer (charcode) or - # a one-char string. currently works only for Latin1 strings, - # since we only have a chartable for the Latin1 charset so far. - # (shamelessly stolen from AFM.pm by Gisle Aas) - def metrics_for(char) - glyph = if (char.kind_of?(Integer)) - ISO_LATIN1_ENCODING[char] - else - ISO_LATIN1_ENCODING[char.unpack("C*").first] - end - @char_metrics[glyph] - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/fixtures/Vera.afm b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/fixtures/Vera.afm deleted file mode 100644 index 5c236d99..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/fixtures/Vera.afm +++ /dev/null @@ -1,1783 +0,0 @@ -StartFontMetrics 2.0 -Comment Converted at Wed Sep 29 22:37:48 2010 by ttf2afm from font file `/Users/jankrutisch/Dropbox/fonts/Vera.ttf' -FontName BitstreamVeraSans-Roman -FullName Bitstream Vera Sans -FamilyName Bitstream Vera Sans -Weight Normal -ItalicAngle 0 -IsFixedPitch false -FontBBox -183 -235 1287 928 -UnderlinePosition -104 -UnderlineThickness 69 -Version Release 1.10 -Notice Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. -EncodingScheme FontSpecific -CapHeight 729 -XHeight 546 -Ascender 928 -Descender -235 -StartCharMetrics 268 -C -1 ; WX 600 ; N .notdef ; B 49 -176 549 705 ; -C -1 ; WX 0 ; N .null ; B 150 0 250 729 ; -C -1 ; WX 317 ; N CR ; B 150 0 250 729 ; -C -1 ; WX 317 ; N space ; B 150 0 250 729 ; -C 33 ; WX 400 ; N exclam ; B 150 0 250 729 ; -C -1 ; WX 459 ; N quotedbl ; B 96 458 363 729 ; -C -1 ; WX 837 ; N numbersign ; B 77 0 761 717 ; -C -1 ; WX 636 ; N dollar ; B 83 -146 553 759 ; -C -1 ; WX 950 ; N percent ; B 55 -14 895 742 ; -C -1 ; WX 779 ; N ampersand ; B 62 -14 749 742 ; -C -1 ; WX 274 ; N quotesingle ; B 96 458 179 729 ; -C 40 ; WX 390 ; N parenleft ; B 85 -131 310 758 ; -C -1 ; WX 390 ; N parenright ; B 80 -131 304 758 ; -C -1 ; WX 500 ; N asterisk ; B 29 286 470 742 ; -C -1 ; WX 837 ; N plus ; B 105 0 731 626 ; -C -1 ; WX 317 ; N comma ; B 77 -116 220 124 ; -C -1 ; WX 360 ; N hyphen ; B 48 233 312 313 ; -C -1 ; WX 317 ; N period ; B 106 0 209 124 ; -C -1 ; WX 336 ; N slash ; B 0 -92 336 729 ; -C -1 ; WX 636 ; N zero ; B 65 -14 569 742 ; -C -1 ; WX 636 ; N one ; B 109 0 543 729 ; -C -1 ; WX 636 ; N two ; B 73 0 536 742 ; -C -1 ; WX 636 ; N three ; B 76 -14 556 742 ; -C -1 ; WX 636 ; N four ; B 48 0 580 729 ; -C -1 ; WX 636 ; N five ; B 77 -14 548 729 ; -C -1 ; WX 636 ; N six ; B 69 -14 573 742 ; -C -1 ; WX 636 ; N seven ; B 82 0 550 729 ; -C -1 ; WX 636 ; N eight ; B 67 -14 567 742 ; -C -1 ; WX 636 ; N nine ; B 62 -14 565 742 ; -C -1 ; WX 336 ; N colon ; B 117 0 220 517 ; -C -1 ; WX 336 ; N semicolon ; B 77 -116 220 517 ; -C -1 ; WX 837 ; N less ; B 105 45 731 581 ; -C -1 ; WX 837 ; N equal ; B 105 171 731 454 ; -C -1 ; WX 837 ; N greater ; B 105 45 731 581 ; -C -1 ; WX 530 ; N question ; B 71 0 460 742 ; -C -1 ; WX 1000 ; N at ; B 65 -173 930 704 ; -C -1 ; WX 684 ; N A ; B 7 0 675 729 ; -C -1 ; WX 686 ; N B ; B 98 0 615 729 ; -C -1 ; WX 698 ; N C ; B 56 -14 644 742 ; -C -1 ; WX 770 ; N D ; B 98 0 710 729 ; -C -1 ; WX 631 ; N E ; B 98 0 567 729 ; -C -1 ; WX 575 ; N F ; B 98 0 517 729 ; -C -1 ; WX 774 ; N G ; B 56 -14 692 742 ; -C -1 ; WX 751 ; N H ; B 98 0 653 729 ; -C -1 ; WX 294 ; N I ; B 98 0 196 729 ; -C -1 ; WX 294 ; N J ; B -51 -200 196 729 ; -C -1 ; WX 655 ; N K ; B 98 0 676 729 ; -C -1 ; WX 557 ; N L ; B 98 0 551 729 ; -C -1 ; WX 862 ; N M ; B 98 0 765 729 ; -C -1 ; WX 748 ; N N ; B 98 0 649 729 ; -C -1 ; WX 787 ; N O ; B 56 -14 730 742 ; -C -1 ; WX 603 ; N P ; B 98 0 568 729 ; -C -1 ; WX 787 ; N Q ; B 56 -128 730 742 ; -C -1 ; WX 694 ; N R ; B 98 0 666 729 ; -C -1 ; WX 634 ; N S ; B 65 -14 579 742 ; -C -1 ; WX 610 ; N T ; B -2 0 613 729 ; -C -1 ; WX 731 ; N U ; B 86 -14 645 729 ; -C -1 ; WX 684 ; N V ; B 7 0 675 729 ; -C -1 ; WX 988 ; N W ; B 33 0 956 729 ; -C -1 ; WX 685 ; N X ; B 29 0 653 729 ; -C -1 ; WX 610 ; N Y ; B -1 0 612 729 ; -C -1 ; WX 685 ; N Z ; B 44 0 640 729 ; -C -1 ; WX 390 ; N bracketleft ; B 85 -131 292 759 ; -C -1 ; WX 336 ; N backslash ; B 0 -92 336 729 ; -C -1 ; WX 390 ; N bracketright ; B 97 -131 304 759 ; -C -1 ; WX 837 ; N asciicircum ; B 105 457 731 729 ; -C -1 ; WX 500 ; N underscore ; B -9 -235 509 -166 ; -C -1 ; WX 500 ; N grave ; B 83 617 316 799 ; -C -1 ; WX 612 ; N a ; B 60 -14 521 560 ; -C -1 ; WX 634 ; N b ; B 90 -14 580 759 ; -C -1 ; WX 549 ; N c ; B 55 -14 487 560 ; -C -1 ; WX 634 ; N d ; B 55 -14 543 759 ; -C -1 ; WX 615 ; N e ; B 55 -14 562 560 ; -C -1 ; WX 352 ; N f ; B 22 0 371 759 ; -C -1 ; WX 634 ; N g ; B 55 -208 543 560 ; -C -1 ; WX 633 ; N h ; B 90 0 548 759 ; -C -1 ; WX 277 ; N i ; B 94 0 184 759 ; -C -1 ; WX 277 ; N j ; B -18 -208 184 759 ; -C -1 ; WX 579 ; N k ; B 90 0 576 759 ; -C -1 ; WX 277 ; N l ; B 94 0 184 759 ; -C -1 ; WX 974 ; N m ; B 90 0 889 560 ; -C -1 ; WX 633 ; N n ; B 90 0 548 560 ; -C -1 ; WX 611 ; N o ; B 55 -14 557 560 ; -C -1 ; WX 634 ; N p ; B 90 -208 580 560 ; -C -1 ; WX 634 ; N q ; B 55 -208 543 560 ; -C -1 ; WX 411 ; N r ; B 90 0 411 560 ; -C -1 ; WX 520 ; N s ; B 54 -14 472 560 ; -C -1 ; WX 392 ; N t ; B 26 0 368 702 ; -C -1 ; WX 633 ; N u ; B 84 -14 542 546 ; -C -1 ; WX 591 ; N v ; B 29 0 562 546 ; -C -1 ; WX 817 ; N w ; B 41 0 775 546 ; -C -1 ; WX 591 ; N x ; B 28 0 559 546 ; -C -1 ; WX 591 ; N y ; B 29 -208 562 546 ; -C -1 ; WX 524 ; N z ; B 42 0 481 546 ; -C -1 ; WX 636 ; N braceleft ; B 125 -163 511 759 ; -C -1 ; WX 336 ; N bar ; B 126 -235 209 764 ; -C -1 ; WX 636 ; N braceright ; B 125 -163 511 759 ; -C -1 ; WX 837 ; N asciitilde ; B 105 228 731 398 ; -C -1 ; WX 684 ; N Adieresis ; B 7 0 675 913 ; -C -1 ; WX 684 ; N Aring ; B 7 0 675 928 ; -C -1 ; WX 698 ; N Ccedilla ; B 56 -192 644 742 ; -C -1 ; WX 631 ; N Eacute ; B 98 0 567 927 ; -C -1 ; WX 748 ; N Ntilde ; B 98 0 649 920 ; -C -1 ; WX 787 ; N Odieresis ; B 56 -14 730 913 ; -C -1 ; WX 731 ; N Udieresis ; B 86 -14 645 913 ; -C -1 ; WX 612 ; N aacute ; B 60 -14 521 799 ; -C -1 ; WX 612 ; N agrave ; B 60 -14 521 799 ; -C -1 ; WX 612 ; N acircumflex ; B 60 -14 521 799 ; -C -1 ; WX 612 ; N adieresis ; B 60 -14 521 757 ; -C -1 ; WX 612 ; N atilde ; B 60 -14 521 776 ; -C -1 ; WX 612 ; N aring ; B 60 -14 521 877 ; -C -1 ; WX 549 ; N ccedilla ; B 55 -192 487 560 ; -C -1 ; WX 615 ; N eacute ; B 55 -14 562 799 ; -C -1 ; WX 615 ; N egrave ; B 55 -14 562 799 ; -C -1 ; WX 615 ; N ecircumflex ; B 55 -14 562 799 ; -C -1 ; WX 615 ; N edieresis ; B 55 -14 562 757 ; -C -1 ; WX 277 ; N iacute ; B 70 0 304 799 ; -C -1 ; WX 277 ; N igrave ; B -27 0 206 799 ; -C -1 ; WX 277 ; N icircumflex ; B -16 0 294 799 ; -C -1 ; WX 277 ; N idieresis ; B -5 0 284 757 ; -C -1 ; WX 633 ; N ntilde ; B 90 0 548 776 ; -C -1 ; WX 611 ; N oacute ; B 55 -14 557 799 ; -C -1 ; WX 611 ; N ograve ; B 55 -14 557 799 ; -C -1 ; WX 611 ; N ocircumflex ; B 55 -14 557 799 ; -C -1 ; WX 611 ; N odieresis ; B 55 -14 557 757 ; -C -1 ; WX 611 ; N otilde ; B 55 -14 557 776 ; -C -1 ; WX 633 ; N uacute ; B 84 -14 542 799 ; -C -1 ; WX 633 ; N ugrave ; B 84 -14 542 799 ; -C -1 ; WX 633 ; N ucircumflex ; B 84 -14 542 799 ; -C -1 ; WX 633 ; N udieresis ; B 84 -14 542 757 ; -C -1 ; WX 500 ; N dagger ; B 27 -96 472 729 ; -C -1 ; WX 500 ; N degree ; B 95 432 404 742 ; -C -1 ; WX 636 ; N cent ; B 83 -152 517 699 ; -C -1 ; WX 636 ; N sterling ; B 62 0 547 742 ; -C -1 ; WX 500 ; N section ; B 44 -95 454 742 ; -C -1 ; WX 589 ; N bullet ; B 149 227 439 516 ; -C -1 ; WX 636 ; N paragraph ; B 77 -96 527 729 ; -C -1 ; WX 629 ; N germandbls ; B 90 -14 583 759 ; -C -1 ; WX 1000 ; N registered ; B 138 0 861 725 ; -C -1 ; WX 1000 ; N copyright ; B 138 0 861 725 ; -C -1 ; WX 1000 ; N trademark ; B 144 446 784 729 ; -C -1 ; WX 500 ; N acute ; B 181 616 415 799 ; -C -1 ; WX 500 ; N dieresis ; B 104 659 395 757 ; -C -1 ; WX 837 ; N notequal ; B 105 19 731 607 ; -C -1 ; WX 974 ; N AE ; B 3 0 910 729 ; -C -1 ; WX 787 ; N Oslash ; B 49 -34 736 761 ; -C -1 ; WX 833 ; N infinity ; B 107 107 726 491 ; -C -1 ; WX 837 ; N plusminus ; B 105 0 731 626 ; -C -1 ; WX 837 ; N lessequal ; B 105 0 731 582 ; -C -1 ; WX 837 ; N greaterequal ; B 105 0 731 582 ; -C -1 ; WX 636 ; N yen ; B 40 0 595 729 ; -C -1 ; WX 636 ; N mu ; B 84 -208 611 546 ; -C -1 ; WX 517 ; N partialdiff ; B 50 -12 469 646 ; -C -1 ; WX 673 ; N Sigma ; B 12 -191 653 719 ; -C -1 ; WX 756 ; N Pi ; B 76 -191 680 719 ; -C -1 ; WX 588 ; N pi ; B -15 -7 583 522 ; -C -1 ; WX 520 ; N integral ; B 22 -181 497 756 ; -C -1 ; WX 471 ; N ordfeminine ; B 56 229 403 742 ; -C -1 ; WX 471 ; N ordmasculine ; B 46 229 423 742 ; -C -1 ; WX 764 ; N Omega ; B 38 0 726 737 ; -C -1 ; WX 981 ; N ae ; B 60 -14 929 560 ; -C -1 ; WX 611 ; N oslash ; B 35 -45 576 591 ; -C -1 ; WX 530 ; N questiondown ; B 69 -14 458 729 ; -C -1 ; WX 400 ; N exclamdown ; B 150 0 250 729 ; -C -1 ; WX 837 ; N logicalnot ; B 105 140 731 420 ; -C -1 ; WX 637 ; N radical ; B 29 -20 637 811 ; -C -1 ; WX 636 ; N florin ; B 15 -208 625 759 ; -C -1 ; WX 837 ; N approxequal ; B 105 132 731 494 ; -C -1 ; WX 668 ; N Delta ; B -2 0 671 719 ; -C -1 ; WX 611 ; N guillemotleft ; B 77 68 518 517 ; -C -1 ; WX 611 ; N guillemotright ; B 94 68 535 517 ; -C -1 ; WX 1000 ; N ellipsis ; B 115 0 884 124 ; -C -1 ; WX 636 ; N nbspace ; B 7 0 675 927 ; -C -1 ; WX 684 ; N Agrave ; B 7 0 675 927 ; -C -1 ; WX 684 ; N Atilde ; B 7 0 675 920 ; -C -1 ; WX 787 ; N Otilde ; B 56 -14 730 920 ; -C -1 ; WX 1069 ; N OE ; B 56 0 1005 729 ; -C -1 ; WX 1022 ; N oe ; B 55 -14 970 560 ; -C -1 ; WX 500 ; N endash ; B 0 238 500 309 ; -C -1 ; WX 1000 ; N emdash ; B 0 238 1000 309 ; -C -1 ; WX 518 ; N quotedblleft ; B 84 488 428 729 ; -C -1 ; WX 518 ; N quotedblright ; B 84 488 428 729 ; -C -1 ; WX 317 ; N quoteleft ; B 84 488 228 729 ; -C -1 ; WX 317 ; N quoteright ; B 86 499 229 729 ; -C -1 ; WX 837 ; N divide ; B 105 73 731 554 ; -C -1 ; WX 494 ; N lozenge ; B 2 -232 491 807 ; -C -1 ; WX 591 ; N ydieresis ; B 29 -208 562 757 ; -C -1 ; WX 610 ; N Ydieresis ; B -1 0 612 913 ; -C -1 ; WX 166 ; N fraction ; B -183 -14 350 742 ; -C -1 ; WX 636 ; N currency ; B 45 40 591 586 ; -C -1 ; WX 399 ; N guilsinglleft ; B 77 68 306 517 ; -C -1 ; WX 399 ; N guilsinglright ; B 94 68 323 517 ; -C -1 ; WX 629 ; N fi ; B 22 0 536 759 ; -C -1 ; WX 629 ; N fl ; B 22 0 536 759 ; -C -1 ; WX 500 ; N daggerdbl ; B 27 -96 472 729 ; -C -1 ; WX 317 ; N periodcentered ; B 106 285 209 409 ; -C -1 ; WX 317 ; N quotesinglbase ; B 84 -116 228 124 ; -C -1 ; WX 518 ; N quotedblbase ; B 84 -116 428 124 ; -C -1 ; WX 1341 ; N perthousand ; B 55 -14 1287 742 ; -C -1 ; WX 684 ; N Acircumflex ; B 7 0 675 928 ; -C -1 ; WX 631 ; N Ecircumflex ; B 98 0 567 928 ; -C -1 ; WX 684 ; N Aacute ; B 7 0 675 927 ; -C -1 ; WX 631 ; N Edieresis ; B 98 0 567 913 ; -C -1 ; WX 631 ; N Egrave ; B 98 0 567 927 ; -C -1 ; WX 294 ; N Iacute ; B 79 0 265 927 ; -C -1 ; WX 294 ; N Icircumflex ; B 0 0 296 928 ; -C -1 ; WX 294 ; N Idieresis ; B 2 0 292 913 ; -C -1 ; WX 294 ; N Igrave ; B 28 0 215 927 ; -C -1 ; WX 787 ; N Oacute ; B 56 -14 730 927 ; -C -1 ; WX 787 ; N Ocircumflex ; B 56 -14 730 928 ; -C -1 ; WX 787 ; N Ograve ; B 56 -14 730 927 ; -C -1 ; WX 731 ; N Uacute ; B 86 -14 645 927 ; -C -1 ; WX 731 ; N Ucircumflex ; B 86 -14 645 928 ; -C -1 ; WX 731 ; N Ugrave ; B 86 -14 645 927 ; -C -1 ; WX 277 ; N dotlessi ; B 94 0 184 546 ; -C -1 ; WX 500 ; N circumflex ; B 94 616 405 799 ; -C -1 ; WX 500 ; N tilde ; B 88 639 411 776 ; -C -1 ; WX 500 ; N macron ; B 104 672 395 745 ; -C -1 ; WX 500 ; N breve ; B 97 645 402 785 ; -C -1 ; WX 500 ; N dotaccent ; B 200 658 299 757 ; -C -1 ; WX 500 ; N ring ; B 116 609 383 877 ; -C -1 ; WX 500 ; N cedilla ; B 142 -192 344 0 ; -C -1 ; WX 500 ; N hungarumlaut ; B 117 616 459 799 ; -C -1 ; WX 500 ; N ogonek ; B 162 -192 344 0 ; -C -1 ; WX 500 ; N caron ; B 94 616 405 799 ; -C -1 ; WX 562 ; N Lslash ; B -6 0 557 729 ; -C -1 ; WX 284 ; N lslash ; B 0 0 285 759 ; -C -1 ; WX 634 ; N Scaron ; B 65 -14 579 928 ; -C -1 ; WX 520 ; N scaron ; B 54 -14 472 799 ; -C -1 ; WX 685 ; N Zcaron ; B 44 0 640 928 ; -C -1 ; WX 524 ; N zcaron ; B 42 0 481 799 ; -C -1 ; WX 336 ; N brokenbar ; B 126 -170 209 699 ; -C -1 ; WX 774 ; N Eth ; B 4 0 715 729 ; -C -1 ; WX 611 ; N eth ; B 55 -14 557 759 ; -C -1 ; WX 610 ; N Yacute ; B -1 0 612 927 ; -C -1 ; WX 591 ; N yacute ; B 29 -208 562 799 ; -C -1 ; WX 604 ; N Thorn ; B 98 0 568 729 ; -C -1 ; WX 634 ; N thorn ; B 90 -208 580 759 ; -C -1 ; WX 837 ; N minus ; B 105 271 731 354 ; -C -1 ; WX 837 ; N multiply ; B 137 30 701 596 ; -C -1 ; WX 400 ; N onesuperior ; B 66 326 346 733 ; -C -1 ; WX 400 ; N twosuperior ; B 45 326 337 742 ; -C -1 ; WX 400 ; N threesuperior ; B 47 318 350 742 ; -C -1 ; WX 969 ; N onequarter ; B 66 -14 937 742 ; -C -1 ; WX 969 ; N onehalf ; B 66 -14 905 742 ; -C -1 ; WX 969 ; N threequarters ; B 47 -14 937 742 ; -C -1 ; WX 774 ; N Gbreve ; B 56 -14 692 928 ; -C -1 ; WX 634 ; N gbreve ; B 55 -208 543 785 ; -C -1 ; WX 294 ; N Idot ; B 98 0 197 914 ; -C -1 ; WX 634 ; N Scedilla ; B 65 -192 579 742 ; -C -1 ; WX 520 ; N scedilla ; B 54 -192 472 560 ; -C -1 ; WX 698 ; N Cacute ; B 56 -14 644 927 ; -C -1 ; WX 549 ; N cacute ; B 55 -14 487 799 ; -C -1 ; WX 698 ; N Ccaron ; B 56 -14 644 928 ; -C -1 ; WX 549 ; N ccaron ; B 55 -14 487 799 ; -C -1 ; WX 634 ; N dmacron ; B 55 -14 619 759 ; -C -1 ; WX 360 ; N sfthyphen ; B 48 233 312 313 ; -C -1 ; WX 317 ; N periodcentered ; B 106 285 209 409 ; -C -1 ; WX 636 ; N Euro ; B 0 -14 569 742 ; -C -1 ; WX 500 ; N c6459 ; B 104 631 395 730 ; -C -1 ; WX 500 ; N c6460 ; B 181 616 367 745 ; -C -1 ; WX 500 ; N c6461 ; B 88 631 411 738 ; -C -1 ; WX 500 ; N c6462 ; B 130 616 317 745 ; -C -1 ; WX 500 ; N c6463 ; B 101 616 398 746 ; -C -1 ; WX 500 ; N c6466 ; B 101 616 398 746 ; -C -1 ; WX 400 ; N c6467 ; B 30 326 369 733 ; -C -1 ; WX 500 ; N c6468 ; B 97 627 402 746 ; -C -1 ; WX 500 ; N c6469 ; B 200 631 299 731 ; -EndCharMetrics -StartKernData -StartKernPairs 1490 -KPX hyphen A -21 -KPX hyphen B -35 -KPX hyphen G 36 -KPX hyphen J 55 -KPX hyphen O 27 -KPX hyphen Q 36 -KPX hyphen T -91 -KPX hyphen V -58 -KPX hyphen W -40 -KPX hyphen X -49 -KPX hyphen Y -118 -KPX hyphen o 18 -KPX hyphen v -26 -KPX hyphen y -17 -KPX hyphen Adieresis -21 -KPX hyphen Odieresis 27 -KPX hyphen oacute 18 -KPX hyphen ograve 18 -KPX hyphen ocircumflex 18 -KPX hyphen odieresis 18 -KPX hyphen otilde 18 -KPX hyphen Agrave -21 -KPX hyphen Atilde -21 -KPX hyphen Otilde 27 -KPX hyphen ydieresis -17 -KPX hyphen Ydieresis -118 -KPX hyphen Acircumflex -21 -KPX hyphen Aacute -21 -KPX hyphen Oacute 27 -KPX hyphen Ocircumflex 27 -KPX hyphen Ograve 27 -KPX hyphen Yacute -118 -KPX hyphen yacute -17 -KPX hyphen Gbreve 36 -KPX A hyphen -21 -KPX A period -17 -KPX A colon -17 -KPX A A 27 -KPX A C -17 -KPX A G -17 -KPX A O -17 -KPX A Q -17 -KPX A T -77 -KPX A V -63 -KPX A W -54 -KPX A Y -77 -KPX A c -17 -KPX A d -17 -KPX A e -17 -KPX A f -35 -KPX A o -17 -KPX A q -17 -KPX A t -17 -KPX A v -58 -KPX A w -40 -KPX A y -67 -KPX A Adieresis 27 -KPX A Ccedilla -17 -KPX A Odieresis -17 -KPX A ccedilla -17 -KPX A eacute -17 -KPX A egrave -17 -KPX A ecircumflex -17 -KPX A edieresis -17 -KPX A oacute -17 -KPX A ograve -17 -KPX A ocircumflex -17 -KPX A odieresis -17 -KPX A otilde -17 -KPX A guillemotleft -35 -KPX A Agrave 27 -KPX A Atilde 27 -KPX A Otilde -17 -KPX A quotedblleft -128 -KPX A quotedblright -123 -KPX A ydieresis -67 -KPX A Ydieresis -77 -KPX A quotedblbase 22 -KPX A Acircumflex 27 -KPX A Aacute 27 -KPX A Oacute -17 -KPX A Ocircumflex -17 -KPX A Ograve -17 -KPX A Yacute -77 -KPX A yacute -67 -KPX A Gbreve -17 -KPX A Cacute -17 -KPX A cacute -17 -KPX A Ccaron -17 -KPX A ccaron -17 -KPX B C -17 -KPX B G -17 -KPX B O -17 -KPX B S -17 -KPX B V -30 -KPX B W -35 -KPX B Y -54 -KPX B Ccedilla -17 -KPX B Odieresis -17 -KPX B guillemotleft -30 -KPX B guillemotright -17 -KPX B Otilde -17 -KPX B quotedblleft -54 -KPX B quotedblright -54 -KPX B Ydieresis -54 -KPX B quotedblbase -40 -KPX B Oacute -17 -KPX B Ocircumflex -17 -KPX B Ograve -17 -KPX B Scaron -17 -KPX B Yacute -54 -KPX B Gbreve -17 -KPX B Scedilla -17 -KPX B Cacute -17 -KPX B Ccaron -17 -KPX C Y -17 -KPX C guillemotleft -17 -KPX C guillemotright -17 -KPX C quotedblright 18 -KPX C Ydieresis -17 -KPX C Yacute -17 -KPX D A -17 -KPX D V -17 -KPX D Y -54 -KPX D Adieresis -17 -KPX D guillemotleft -17 -KPX D guillemotright -17 -KPX D Agrave -17 -KPX D Atilde -17 -KPX D quotedblleft -21 -KPX D quotedblright -26 -KPX D Ydieresis -54 -KPX D quotedblbase -91 -KPX D Acircumflex -17 -KPX D Aacute -17 -KPX D Yacute -54 -KPX F period -160 -KPX F colon -77 -KPX F A -91 -KPX F S -17 -KPX F T -17 -KPX F a -91 -KPX F e -54 -KPX F i -72 -KPX F o -35 -KPX F r -72 -KPX F u -54 -KPX F y -91 -KPX F Adieresis -91 -KPX F aacute -91 -KPX F agrave -91 -KPX F acircumflex -91 -KPX F adieresis -91 -KPX F atilde -91 -KPX F aring -91 -KPX F eacute -54 -KPX F egrave -54 -KPX F ecircumflex -54 -KPX F edieresis -54 -KPX F oacute -35 -KPX F ograve -35 -KPX F ocircumflex -35 -KPX F odieresis -35 -KPX F otilde -35 -KPX F uacute -54 -KPX F ugrave -54 -KPX F ucircumflex -54 -KPX F udieresis -54 -KPX F Agrave -91 -KPX F Atilde -91 -KPX F quotedblleft -21 -KPX F ydieresis -91 -KPX F quotedblbase -183 -KPX F Acircumflex -91 -KPX F Aacute -91 -KPX F Scaron -17 -KPX F yacute -91 -KPX F Scedilla -17 -KPX G T -35 -KPX G Y -49 -KPX G guillemotleft -17 -KPX G guillemotright -17 -KPX G quotedblleft -21 -KPX G quotedblright -21 -KPX G Ydieresis -49 -KPX G quotedblbase -26 -KPX G Yacute -49 -KPX H period -17 -KPX H quotedblleft -35 -KPX H quotedblright -30 -KPX H quotedblbase -35 -KPX J hyphen -35 -KPX J A -17 -KPX J Adieresis -17 -KPX J guillemotleft -17 -KPX J guillemotright -17 -KPX J Agrave -17 -KPX J Atilde -17 -KPX J quotedblleft -35 -KPX J quotedblright -30 -KPX J quotedblbase -54 -KPX J Acircumflex -17 -KPX J Aacute -17 -KPX K hyphen -104 -KPX K A -17 -KPX K C -54 -KPX K O -54 -KPX K T -77 -KPX K U -26 -KPX K W -35 -KPX K Y -35 -KPX K a -17 -KPX K e -49 -KPX K o -49 -KPX K u -49 -KPX K y -72 -KPX K Adieresis -17 -KPX K Ccedilla -54 -KPX K Odieresis -54 -KPX K Udieresis -26 -KPX K aacute -17 -KPX K agrave -17 -KPX K acircumflex -17 -KPX K adieresis -17 -KPX K atilde -17 -KPX K aring -17 -KPX K eacute -49 -KPX K egrave -49 -KPX K ecircumflex -49 -KPX K edieresis -49 -KPX K oacute -49 -KPX K ograve -49 -KPX K ocircumflex -49 -KPX K odieresis -49 -KPX K otilde -49 -KPX K uacute -49 -KPX K ugrave -49 -KPX K ucircumflex -49 -KPX K udieresis -49 -KPX K guillemotleft -63 -KPX K Agrave -17 -KPX K Atilde -17 -KPX K Otilde -54 -KPX K quotedblleft -30 -KPX K quotedblright -30 -KPX K ydieresis -72 -KPX K Ydieresis -35 -KPX K Acircumflex -17 -KPX K Aacute -17 -KPX K Oacute -54 -KPX K Ocircumflex -54 -KPX K Ograve -54 -KPX K Uacute -26 -KPX K Ucircumflex -26 -KPX K Ugrave -26 -KPX K Yacute -35 -KPX K yacute -72 -KPX K Cacute -54 -KPX K Ccaron -54 -KPX L hyphen -17 -KPX L A 22 -KPX L O -35 -KPX L T -137 -KPX L U -49 -KPX L V -109 -KPX L W -91 -KPX L Y -132 -KPX L e -17 -KPX L o -17 -KPX L u -17 -KPX L y -91 -KPX L Adieresis 22 -KPX L Odieresis -35 -KPX L Udieresis -49 -KPX L eacute -17 -KPX L egrave -17 -KPX L ecircumflex -17 -KPX L edieresis -17 -KPX L oacute -17 -KPX L ograve -17 -KPX L ocircumflex -17 -KPX L odieresis -17 -KPX L otilde -17 -KPX L uacute -17 -KPX L ugrave -17 -KPX L ucircumflex -17 -KPX L udieresis -17 -KPX L Agrave 22 -KPX L Atilde 22 -KPX L Otilde -35 -KPX L quotedblleft -202 -KPX L quotedblright -262 -KPX L ydieresis -91 -KPX L Ydieresis -132 -KPX L Acircumflex 22 -KPX L Aacute 22 -KPX L Oacute -35 -KPX L Ocircumflex -35 -KPX L Ograve -35 -KPX L Uacute -49 -KPX L Ucircumflex -49 -KPX L Ugrave -49 -KPX L Yacute -132 -KPX L yacute -91 -KPX O hyphen 27 -KPX O period -40 -KPX O colon -17 -KPX O A -17 -KPX O V -17 -KPX O X -63 -KPX O Y -54 -KPX O Adieresis -17 -KPX O guillemotleft -17 -KPX O Agrave -17 -KPX O Atilde -17 -KPX O quotedblleft -21 -KPX O quotedblright -17 -KPX O Ydieresis -54 -KPX O quotedblbase -91 -KPX O Acircumflex -17 -KPX O Aacute -17 -KPX O Yacute -54 -KPX P hyphen -21 -KPX P period -155 -KPX P A -63 -KPX P Y -21 -KPX P a -44 -KPX P e -35 -KPX P i -21 -KPX P n -17 -KPX P o -35 -KPX P r -17 -KPX P s -17 -KPX P u -17 -KPX P Adieresis -63 -KPX P aacute -44 -KPX P agrave -44 -KPX P acircumflex -44 -KPX P adieresis -44 -KPX P atilde -44 -KPX P aring -44 -KPX P eacute -35 -KPX P egrave -35 -KPX P ecircumflex -35 -KPX P edieresis -35 -KPX P ntilde -17 -KPX P oacute -35 -KPX P ograve -35 -KPX P ocircumflex -35 -KPX P odieresis -35 -KPX P otilde -35 -KPX P uacute -17 -KPX P ugrave -17 -KPX P ucircumflex -17 -KPX P udieresis -17 -KPX P guillemotleft -17 -KPX P Agrave -63 -KPX P Atilde -63 -KPX P quotedblleft 18 -KPX P quotedblright 18 -KPX P Ydieresis -21 -KPX P quotedblbase -160 -KPX P Acircumflex -63 -KPX P Aacute -63 -KPX P scaron -17 -KPX P Yacute -21 -KPX P scedilla -17 -KPX Q hyphen 27 -KPX Q quotedblleft -21 -KPX Q quotedblright -17 -KPX Q quotedblbase -63 -KPX R hyphen -40 -KPX R period -35 -KPX R colon -30 -KPX R A -40 -KPX R C -49 -KPX R T -72 -KPX R V -54 -KPX R W -40 -KPX R Y -63 -KPX R a -21 -KPX R e -44 -KPX R o -44 -KPX R u -44 -KPX R y -54 -KPX R Adieresis -40 -KPX R Ccedilla -49 -KPX R aacute -21 -KPX R agrave -21 -KPX R acircumflex -21 -KPX R adieresis -21 -KPX R atilde -21 -KPX R aring -21 -KPX R eacute -44 -KPX R egrave -44 -KPX R ecircumflex -44 -KPX R edieresis -44 -KPX R oacute -44 -KPX R ograve -44 -KPX R ocircumflex -44 -KPX R odieresis -44 -KPX R otilde -44 -KPX R uacute -44 -KPX R ugrave -44 -KPX R ucircumflex -44 -KPX R udieresis -44 -KPX R guillemotleft -54 -KPX R guillemotright -17 -KPX R Agrave -40 -KPX R Atilde -40 -KPX R quotedblleft -72 -KPX R quotedblright -63 -KPX R ydieresis -54 -KPX R Ydieresis -63 -KPX R quotedblbase -17 -KPX R Acircumflex -40 -KPX R Aacute -40 -KPX R Yacute -63 -KPX R yacute -54 -KPX R Cacute -49 -KPX R Ccaron -49 -KPX S A 18 -KPX S Adieresis 18 -KPX S Agrave 18 -KPX S Atilde 18 -KPX S Acircumflex 18 -KPX S Aacute 18 -KPX T hyphen -91 -KPX T period -118 -KPX T colon -109 -KPX T A -77 -KPX T C -58 -KPX T T -17 -KPX T a -165 -KPX T c -169 -KPX T e -169 -KPX T i -30 -KPX T o -169 -KPX T r -146 -KPX T s -165 -KPX T u -151 -KPX T w -165 -KPX T y -155 -KPX T Adieresis -77 -KPX T Ccedilla -58 -KPX T aacute -165 -KPX T agrave -165 -KPX T acircumflex -165 -KPX T adieresis -165 -KPX T atilde -165 -KPX T aring -165 -KPX T ccedilla -169 -KPX T eacute -169 -KPX T egrave -169 -KPX T ecircumflex -169 -KPX T edieresis -169 -KPX T oacute -169 -KPX T ograve -169 -KPX T ocircumflex -169 -KPX T odieresis -169 -KPX T otilde -169 -KPX T uacute -151 -KPX T ugrave -151 -KPX T ucircumflex -151 -KPX T udieresis -151 -KPX T guillemotleft -91 -KPX T guillemotright -54 -KPX T Agrave -77 -KPX T Atilde -77 -KPX T quotedblright -21 -KPX T ydieresis -155 -KPX T quotedblbase -128 -KPX T Acircumflex -77 -KPX T Aacute -77 -KPX T scaron -165 -KPX T yacute -155 -KPX T scedilla -165 -KPX T Cacute -58 -KPX T cacute -169 -KPX T Ccaron -58 -KPX T ccaron -169 -KPX U Z -17 -KPX U Zcaron -17 -KPX V hyphen -58 -KPX V period -128 -KPX V colon -81 -KPX V A -63 -KPX V O -17 -KPX V a -77 -KPX V e -77 -KPX V i -21 -KPX V o -77 -KPX V u -67 -KPX V y -26 -KPX V Adieresis -63 -KPX V Odieresis -17 -KPX V aacute -77 -KPX V agrave -77 -KPX V acircumflex -77 -KPX V adieresis -77 -KPX V atilde -77 -KPX V aring -77 -KPX V eacute -77 -KPX V egrave -77 -KPX V ecircumflex -77 -KPX V edieresis -77 -KPX V oacute -77 -KPX V ograve -77 -KPX V ocircumflex -77 -KPX V odieresis -77 -KPX V otilde -77 -KPX V uacute -67 -KPX V ugrave -67 -KPX V ucircumflex -67 -KPX V udieresis -67 -KPX V guillemotleft -86 -KPX V guillemotright -54 -KPX V Agrave -63 -KPX V Atilde -63 -KPX V Otilde -17 -KPX V ydieresis -26 -KPX V quotedblbase -137 -KPX V Acircumflex -63 -KPX V Aacute -63 -KPX V Oacute -17 -KPX V Ocircumflex -17 -KPX V Ograve -17 -KPX V yacute -26 -KPX W hyphen -40 -KPX W period -114 -KPX W colon -58 -KPX W A -54 -KPX W a -63 -KPX W e -58 -KPX W i -21 -KPX W o -58 -KPX W r -44 -KPX W u -35 -KPX W y -17 -KPX W Adieresis -54 -KPX W aacute -63 -KPX W agrave -63 -KPX W acircumflex -63 -KPX W adieresis -63 -KPX W atilde -63 -KPX W aring -63 -KPX W eacute -58 -KPX W egrave -58 -KPX W ecircumflex -58 -KPX W edieresis -58 -KPX W oacute -58 -KPX W ograve -58 -KPX W ocircumflex -58 -KPX W odieresis -58 -KPX W otilde -58 -KPX W uacute -35 -KPX W ugrave -35 -KPX W ucircumflex -35 -KPX W udieresis -35 -KPX W guillemotleft -54 -KPX W guillemotright -17 -KPX W Agrave -54 -KPX W Atilde -54 -KPX W quotedblleft -17 -KPX W ydieresis -17 -KPX W quotedblbase -128 -KPX W Acircumflex -54 -KPX W Aacute -54 -KPX W yacute -17 -KPX X hyphen -49 -KPX X C -72 -KPX X O -63 -KPX X T -17 -KPX X e -44 -KPX X Ccedilla -72 -KPX X Odieresis -63 -KPX X eacute -44 -KPX X egrave -44 -KPX X ecircumflex -44 -KPX X edieresis -44 -KPX X guillemotleft -54 -KPX X Otilde -63 -KPX X quotedblleft -77 -KPX X quotedblright -40 -KPX X quotedblbase -21 -KPX X Oacute -63 -KPX X Ocircumflex -63 -KPX X Ograve -63 -KPX X Cacute -72 -KPX X Ccaron -72 -KPX Y hyphen -118 -KPX Y period -202 -KPX Y colon -132 -KPX Y A -77 -KPX Y C -54 -KPX Y O -54 -KPX Y a -137 -KPX Y e -132 -KPX Y i -35 -KPX Y o -132 -KPX Y u -114 -KPX Y Adieresis -77 -KPX Y Ccedilla -54 -KPX Y Odieresis -54 -KPX Y aacute -137 -KPX Y agrave -137 -KPX Y acircumflex -137 -KPX Y adieresis -137 -KPX Y atilde -137 -KPX Y aring -137 -KPX Y eacute -132 -KPX Y egrave -132 -KPX Y ecircumflex -132 -KPX Y edieresis -132 -KPX Y oacute -132 -KPX Y ograve -132 -KPX Y ocircumflex -132 -KPX Y odieresis -132 -KPX Y otilde -132 -KPX Y uacute -114 -KPX Y ugrave -114 -KPX Y ucircumflex -114 -KPX Y udieresis -114 -KPX Y guillemotleft -109 -KPX Y guillemotright -72 -KPX Y Agrave -77 -KPX Y Atilde -77 -KPX Y Otilde -54 -KPX Y quotedblleft -54 -KPX Y quotedblright -17 -KPX Y quotedblbase -128 -KPX Y Acircumflex -77 -KPX Y Aacute -77 -KPX Y Oacute -54 -KPX Y Ocircumflex -54 -KPX Y Ograve -54 -KPX Y Cacute -54 -KPX Y Ccaron -54 -KPX Z hyphen -17 -KPX Z quotedblleft -17 -KPX Z quotedblright -17 -KPX Z quotedblbase -17 -KPX e x -17 -KPX f hyphen -54 -KPX f period -72 -KPX f colon -35 -KPX f t -17 -KPX f w -17 -KPX f y -17 -KPX f guillemotleft -35 -KPX f guillemotright -17 -KPX f quotedblleft 31 -KPX f ydieresis -17 -KPX f quotedblbase -114 -KPX f yacute -17 -KPX k a -17 -KPX k e -35 -KPX k o -35 -KPX k u -30 -KPX k y -35 -KPX k aacute -17 -KPX k agrave -17 -KPX k acircumflex -17 -KPX k adieresis -17 -KPX k atilde -17 -KPX k aring -17 -KPX k eacute -35 -KPX k egrave -35 -KPX k ecircumflex -35 -KPX k edieresis -35 -KPX k oacute -35 -KPX k ograve -35 -KPX k ocircumflex -35 -KPX k odieresis -35 -KPX k otilde -35 -KPX k uacute -30 -KPX k ugrave -30 -KPX k ucircumflex -30 -KPX k udieresis -30 -KPX k ydieresis -35 -KPX k yacute -35 -KPX n quotedblleft -72 -KPX n quotedblright -54 -KPX n quotedblbase -44 -KPX o hyphen 18 -KPX o period -17 -KPX o x -30 -KPX o quotedblleft -72 -KPX o quotedblright -35 -KPX o quotedblbase -63 -KPX r hyphen -63 -KPX r period -91 -KPX r colon -17 -KPX r c -21 -KPX r d -17 -KPX r e -21 -KPX r g -17 -KPX r h -17 -KPX r m -17 -KPX r n -17 -KPX r o -21 -KPX r q -17 -KPX r r -17 -KPX r x -26 -KPX r ccedilla -21 -KPX r eacute -21 -KPX r egrave -21 -KPX r ecircumflex -21 -KPX r edieresis -21 -KPX r ntilde -17 -KPX r oacute -21 -KPX r ograve -21 -KPX r ocircumflex -21 -KPX r odieresis -21 -KPX r otilde -21 -KPX r guillemotleft -35 -KPX r quotedblright 41 -KPX r quotedblbase -151 -KPX r gbreve -17 -KPX r cacute -21 -KPX r ccaron -21 -KPX v hyphen -26 -KPX v period -77 -KPX v colon -54 -KPX v guillemotleft -17 -KPX v guillemotright -17 -KPX v quotedblright -17 -KPX v quotedblbase -132 -KPX w period -91 -KPX w colon -54 -KPX w guillemotleft -17 -KPX w guillemotright -17 -KPX w quotedblbase -104 -KPX x c -17 -KPX x e -30 -KPX x o -30 -KPX x ccedilla -17 -KPX x eacute -30 -KPX x egrave -30 -KPX x ecircumflex -30 -KPX x edieresis -30 -KPX x oacute -30 -KPX x ograve -30 -KPX x ocircumflex -30 -KPX x odieresis -30 -KPX x otilde -30 -KPX x cacute -17 -KPX x ccaron -17 -KPX y hyphen -17 -KPX y period -142 -KPX y colon -72 -KPX y guillemotleft -17 -KPX y guillemotright -17 -KPX y quotedblbase -146 -KPX Adieresis hyphen -21 -KPX Adieresis period -17 -KPX Adieresis colon -17 -KPX Adieresis A 27 -KPX Adieresis C -17 -KPX Adieresis G -17 -KPX Adieresis O -17 -KPX Adieresis Q -17 -KPX Adieresis T -77 -KPX Adieresis V -63 -KPX Adieresis W -54 -KPX Adieresis Y -77 -KPX Adieresis c -17 -KPX Adieresis d -17 -KPX Adieresis e -17 -KPX Adieresis f -35 -KPX Adieresis o -17 -KPX Adieresis q -17 -KPX Adieresis t -17 -KPX Adieresis v -58 -KPX Adieresis w -40 -KPX Adieresis y -67 -KPX Adieresis Adieresis 27 -KPX Adieresis Ccedilla -17 -KPX Adieresis Odieresis -17 -KPX Adieresis ccedilla -17 -KPX Adieresis eacute -17 -KPX Adieresis egrave -17 -KPX Adieresis ecircumflex -17 -KPX Adieresis edieresis -17 -KPX Adieresis oacute -17 -KPX Adieresis ograve -17 -KPX Adieresis ocircumflex -17 -KPX Adieresis odieresis -17 -KPX Adieresis otilde -17 -KPX Adieresis guillemotleft -35 -KPX Adieresis Agrave 27 -KPX Adieresis Atilde 27 -KPX Adieresis Otilde -17 -KPX Adieresis quotedblleft -128 -KPX Adieresis quotedblright -123 -KPX Adieresis ydieresis -67 -KPX Adieresis Ydieresis -77 -KPX Adieresis quotedblbase 22 -KPX Adieresis Acircumflex 27 -KPX Adieresis Aacute 27 -KPX Adieresis Oacute -17 -KPX Adieresis Ocircumflex -17 -KPX Adieresis Ograve -17 -KPX Adieresis Yacute -77 -KPX Adieresis yacute -67 -KPX Adieresis Gbreve -17 -KPX Adieresis Cacute -17 -KPX Adieresis cacute -17 -KPX Adieresis Ccaron -17 -KPX Adieresis ccaron -17 -KPX Ccedilla Y -17 -KPX Ccedilla guillemotleft -17 -KPX Ccedilla guillemotright -17 -KPX Ccedilla quotedblright 18 -KPX Ccedilla Ydieresis -17 -KPX Ccedilla Yacute -17 -KPX Odieresis hyphen 27 -KPX Odieresis period -40 -KPX Odieresis colon -17 -KPX Odieresis A -17 -KPX Odieresis V -17 -KPX Odieresis X -63 -KPX Odieresis Y -54 -KPX Odieresis Adieresis -17 -KPX Odieresis guillemotleft -17 -KPX Odieresis Agrave -17 -KPX Odieresis Atilde -17 -KPX Odieresis quotedblleft -21 -KPX Odieresis quotedblright -17 -KPX Odieresis Ydieresis -54 -KPX Odieresis quotedblbase -91 -KPX Odieresis Acircumflex -17 -KPX Odieresis Aacute -17 -KPX Odieresis Yacute -54 -KPX Udieresis Z -17 -KPX Udieresis Zcaron -17 -KPX eacute x -17 -KPX egrave x -17 -KPX ecircumflex x -17 -KPX edieresis x -17 -KPX ntilde quotedblleft -72 -KPX ntilde quotedblright -54 -KPX ntilde quotedblbase -44 -KPX oacute hyphen 18 -KPX oacute period -17 -KPX oacute x -30 -KPX oacute quotedblleft -72 -KPX oacute quotedblright -35 -KPX oacute quotedblbase -63 -KPX ograve hyphen 18 -KPX ograve period -17 -KPX ograve x -30 -KPX ograve quotedblleft -72 -KPX ograve quotedblright -35 -KPX ograve quotedblbase -63 -KPX ocircumflex hyphen 18 -KPX ocircumflex period -17 -KPX ocircumflex x -30 -KPX ocircumflex quotedblleft -72 -KPX ocircumflex quotedblright -35 -KPX ocircumflex quotedblbase -63 -KPX odieresis hyphen 18 -KPX odieresis period -17 -KPX odieresis x -30 -KPX odieresis quotedblleft -72 -KPX odieresis quotedblright -35 -KPX odieresis quotedblbase -63 -KPX otilde hyphen 18 -KPX otilde period -17 -KPX otilde x -30 -KPX otilde quotedblleft -72 -KPX otilde quotedblright -35 -KPX otilde quotedblbase -63 -KPX germandbls hyphen 18 -KPX germandbls quotedblleft -54 -KPX germandbls quotedblright -54 -KPX germandbls quotedblbase -40 -KPX AE quotedblleft -40 -KPX AE quotedblright -44 -KPX AE quotedblbase -54 -KPX guillemotleft B -17 -KPX guillemotleft C -17 -KPX guillemotleft D -17 -KPX guillemotleft G -17 -KPX guillemotleft J -17 -KPX guillemotleft T -54 -KPX guillemotleft V -54 -KPX guillemotleft W -17 -KPX guillemotleft Y -72 -KPX guillemotleft v -17 -KPX guillemotleft w -17 -KPX guillemotleft y -17 -KPX guillemotleft Ccedilla -17 -KPX guillemotleft AE 73 -KPX guillemotleft ydieresis -17 -KPX guillemotleft Ydieresis -72 -KPX guillemotleft Yacute -72 -KPX guillemotleft yacute -17 -KPX guillemotleft Gbreve -17 -KPX guillemotleft Cacute -17 -KPX guillemotleft Ccaron -17 -KPX guillemotright A -35 -KPX guillemotright B -35 -KPX guillemotright C -17 -KPX guillemotright D -17 -KPX guillemotright J -17 -KPX guillemotright O -17 -KPX guillemotright T -91 -KPX guillemotright V -86 -KPX guillemotright W -54 -KPX guillemotright X -54 -KPX guillemotright Y -109 -KPX guillemotright v -17 -KPX guillemotright w -17 -KPX guillemotright y -17 -KPX guillemotright Adieresis -35 -KPX guillemotright Ccedilla -17 -KPX guillemotright Odieresis -17 -KPX guillemotright Agrave -35 -KPX guillemotright Atilde -35 -KPX guillemotright Otilde -17 -KPX guillemotright ydieresis -17 -KPX guillemotright Ydieresis -109 -KPX guillemotright Acircumflex -35 -KPX guillemotright Aacute -35 -KPX guillemotright Oacute -17 -KPX guillemotright Ocircumflex -17 -KPX guillemotright Ograve -17 -KPX guillemotright Yacute -109 -KPX guillemotright yacute -17 -KPX guillemotright Cacute -17 -KPX guillemotright Ccaron -17 -KPX Agrave hyphen -21 -KPX Agrave period -17 -KPX Agrave colon -17 -KPX Agrave A 27 -KPX Agrave C -17 -KPX Agrave G -17 -KPX Agrave O -17 -KPX Agrave Q -17 -KPX Agrave T -77 -KPX Agrave V -63 -KPX Agrave W -54 -KPX Agrave Y -77 -KPX Agrave c -17 -KPX Agrave d -17 -KPX Agrave e -17 -KPX Agrave f -35 -KPX Agrave o -17 -KPX Agrave q -17 -KPX Agrave t -17 -KPX Agrave v -58 -KPX Agrave w -40 -KPX Agrave y -67 -KPX Agrave Adieresis 27 -KPX Agrave Ccedilla -17 -KPX Agrave Odieresis -17 -KPX Agrave ccedilla -17 -KPX Agrave eacute -17 -KPX Agrave egrave -17 -KPX Agrave ecircumflex -17 -KPX Agrave edieresis -17 -KPX Agrave oacute -17 -KPX Agrave ograve -17 -KPX Agrave ocircumflex -17 -KPX Agrave odieresis -17 -KPX Agrave otilde -17 -KPX Agrave guillemotleft -35 -KPX Agrave Agrave 27 -KPX Agrave Atilde 27 -KPX Agrave Otilde -17 -KPX Agrave quotedblleft -128 -KPX Agrave quotedblright -123 -KPX Agrave ydieresis -67 -KPX Agrave Ydieresis -77 -KPX Agrave quotedblbase 22 -KPX Agrave Acircumflex 27 -KPX Agrave Aacute 27 -KPX Agrave Oacute -17 -KPX Agrave Ocircumflex -17 -KPX Agrave Ograve -17 -KPX Agrave Yacute -77 -KPX Agrave yacute -67 -KPX Agrave Gbreve -17 -KPX Agrave Cacute -17 -KPX Agrave cacute -17 -KPX Agrave Ccaron -17 -KPX Agrave ccaron -17 -KPX Atilde hyphen -21 -KPX Atilde period -17 -KPX Atilde colon -17 -KPX Atilde A 27 -KPX Atilde C -17 -KPX Atilde G -17 -KPX Atilde O -17 -KPX Atilde Q -17 -KPX Atilde T -77 -KPX Atilde V -63 -KPX Atilde W -54 -KPX Atilde Y -77 -KPX Atilde c -17 -KPX Atilde d -17 -KPX Atilde e -17 -KPX Atilde f -35 -KPX Atilde o -17 -KPX Atilde q -17 -KPX Atilde t -17 -KPX Atilde v -58 -KPX Atilde w -40 -KPX Atilde y -67 -KPX Atilde Adieresis 27 -KPX Atilde Ccedilla -17 -KPX Atilde Odieresis -17 -KPX Atilde ccedilla -17 -KPX Atilde eacute -17 -KPX Atilde egrave -17 -KPX Atilde ecircumflex -17 -KPX Atilde edieresis -17 -KPX Atilde oacute -17 -KPX Atilde ograve -17 -KPX Atilde ocircumflex -17 -KPX Atilde odieresis -17 -KPX Atilde otilde -17 -KPX Atilde guillemotleft -35 -KPX Atilde Agrave 27 -KPX Atilde Atilde 27 -KPX Atilde Otilde -17 -KPX Atilde quotedblleft -128 -KPX Atilde quotedblright -123 -KPX Atilde ydieresis -67 -KPX Atilde Ydieresis -77 -KPX Atilde quotedblbase 22 -KPX Atilde Acircumflex 27 -KPX Atilde Aacute 27 -KPX Atilde Oacute -17 -KPX Atilde Ocircumflex -17 -KPX Atilde Ograve -17 -KPX Atilde Yacute -77 -KPX Atilde yacute -67 -KPX Atilde Gbreve -17 -KPX Atilde Cacute -17 -KPX Atilde cacute -17 -KPX Atilde Ccaron -17 -KPX Atilde ccaron -17 -KPX Otilde hyphen 27 -KPX Otilde period -40 -KPX Otilde colon -17 -KPX Otilde A -17 -KPX Otilde V -17 -KPX Otilde X -63 -KPX Otilde Y -54 -KPX Otilde Adieresis -17 -KPX Otilde guillemotleft -17 -KPX Otilde Agrave -17 -KPX Otilde Atilde -17 -KPX Otilde quotedblleft -21 -KPX Otilde quotedblright -17 -KPX Otilde Ydieresis -54 -KPX Otilde quotedblbase -91 -KPX Otilde Acircumflex -17 -KPX Otilde Aacute -17 -KPX Otilde Yacute -54 -KPX quotedblleft A -128 -KPX quotedblleft B -30 -KPX quotedblleft C -35 -KPX quotedblleft D -30 -KPX quotedblleft F -30 -KPX quotedblleft G -35 -KPX quotedblleft H -30 -KPX quotedblleft J -30 -KPX quotedblleft K -30 -KPX quotedblleft L -30 -KPX quotedblleft O -35 -KPX quotedblleft P -30 -KPX quotedblleft Q -35 -KPX quotedblleft R -30 -KPX quotedblleft X -58 -KPX quotedblleft Z -17 -KPX quotedblleft f -35 -KPX quotedblleft n -54 -KPX quotedblleft o -72 -KPX quotedblleft r -54 -KPX quotedblleft v -35 -KPX quotedblleft w -35 -KPX quotedblleft y -35 -KPX quotedblleft Adieresis -128 -KPX quotedblleft Ccedilla -35 -KPX quotedblleft Odieresis -35 -KPX quotedblleft ntilde -54 -KPX quotedblleft oacute -72 -KPX quotedblleft ograve -72 -KPX quotedblleft ocircumflex -72 -KPX quotedblleft odieresis -72 -KPX quotedblleft otilde -72 -KPX quotedblleft germandbls -30 -KPX quotedblleft AE -188 -KPX quotedblleft Agrave -128 -KPX quotedblleft Atilde -128 -KPX quotedblleft Otilde -35 -KPX quotedblleft ydieresis -35 -KPX quotedblleft Acircumflex -128 -KPX quotedblleft Aacute -128 -KPX quotedblleft Oacute -35 -KPX quotedblleft Ocircumflex -35 -KPX quotedblleft Ograve -35 -KPX quotedblleft Zcaron -17 -KPX quotedblleft eth -35 -KPX quotedblleft yacute -35 -KPX quotedblleft Thorn -30 -KPX quotedblleft Gbreve -35 -KPX quotedblleft Cacute -35 -KPX quotedblleft Ccaron -35 -KPX ydieresis hyphen -17 -KPX ydieresis period -142 -KPX ydieresis colon -72 -KPX ydieresis guillemotleft -17 -KPX ydieresis guillemotright -17 -KPX ydieresis quotedblbase -146 -KPX Ydieresis hyphen -118 -KPX Ydieresis period -202 -KPX Ydieresis colon -132 -KPX Ydieresis A -77 -KPX Ydieresis C -54 -KPX Ydieresis O -54 -KPX Ydieresis a -137 -KPX Ydieresis e -132 -KPX Ydieresis i -35 -KPX Ydieresis o -132 -KPX Ydieresis u -114 -KPX Ydieresis Adieresis -77 -KPX Ydieresis Ccedilla -54 -KPX Ydieresis Odieresis -54 -KPX Ydieresis aacute -137 -KPX Ydieresis agrave -137 -KPX Ydieresis acircumflex -137 -KPX Ydieresis adieresis -137 -KPX Ydieresis atilde -137 -KPX Ydieresis aring -137 -KPX Ydieresis eacute -132 -KPX Ydieresis egrave -132 -KPX Ydieresis ecircumflex -132 -KPX Ydieresis edieresis -132 -KPX Ydieresis oacute -132 -KPX Ydieresis ograve -132 -KPX Ydieresis ocircumflex -132 -KPX Ydieresis odieresis -132 -KPX Ydieresis otilde -132 -KPX Ydieresis uacute -114 -KPX Ydieresis ugrave -114 -KPX Ydieresis ucircumflex -114 -KPX Ydieresis udieresis -114 -KPX Ydieresis guillemotleft -109 -KPX Ydieresis guillemotright -72 -KPX Ydieresis Agrave -77 -KPX Ydieresis Atilde -77 -KPX Ydieresis Otilde -54 -KPX Ydieresis quotedblleft -54 -KPX Ydieresis quotedblright -17 -KPX Ydieresis quotedblbase -128 -KPX Ydieresis Acircumflex -77 -KPX Ydieresis Aacute -77 -KPX Ydieresis Oacute -54 -KPX Ydieresis Ocircumflex -54 -KPX Ydieresis Ograve -54 -KPX Ydieresis Cacute -54 -KPX Ydieresis Ccaron -54 -KPX quotedblbase A 18 -KPX quotedblbase B -35 -KPX quotedblbase C -54 -KPX quotedblbase D -35 -KPX quotedblbase F -35 -KPX quotedblbase G -35 -KPX quotedblbase H -35 -KPX quotedblbase J 22 -KPX quotedblbase K -35 -KPX quotedblbase L -35 -KPX quotedblbase O -54 -KPX quotedblbase P -35 -KPX quotedblbase Q -54 -KPX quotedblbase R -35 -KPX quotedblbase T -137 -KPX quotedblbase V -183 -KPX quotedblbase W -123 -KPX quotedblbase X -35 -KPX quotedblbase Y -183 -KPX quotedblbase f -17 -KPX quotedblbase n -35 -KPX quotedblbase o -35 -KPX quotedblbase r -35 -KPX quotedblbase v -114 -KPX quotedblbase w -95 -KPX quotedblbase y -54 -KPX quotedblbase Adieresis 18 -KPX quotedblbase Ccedilla -54 -KPX quotedblbase Odieresis -54 -KPX quotedblbase ntilde -35 -KPX quotedblbase oacute -35 -KPX quotedblbase ograve -35 -KPX quotedblbase ocircumflex -35 -KPX quotedblbase odieresis -35 -KPX quotedblbase otilde -35 -KPX quotedblbase germandbls -35 -KPX quotedblbase AE 18 -KPX quotedblbase Agrave 18 -KPX quotedblbase Atilde 18 -KPX quotedblbase Otilde -54 -KPX quotedblbase ydieresis -54 -KPX quotedblbase Ydieresis -183 -KPX quotedblbase Acircumflex 18 -KPX quotedblbase Aacute 18 -KPX quotedblbase Oacute -54 -KPX quotedblbase Ocircumflex -54 -KPX quotedblbase Ograve -54 -KPX quotedblbase eth -35 -KPX quotedblbase Yacute -183 -KPX quotedblbase yacute -54 -KPX quotedblbase Thorn -35 -KPX quotedblbase Gbreve -35 -KPX quotedblbase Cacute -54 -KPX quotedblbase Ccaron -54 -KPX Acircumflex hyphen -21 -KPX Acircumflex period -17 -KPX Acircumflex colon -17 -KPX Acircumflex A 27 -KPX Acircumflex C -17 -KPX Acircumflex G -17 -KPX Acircumflex O -17 -KPX Acircumflex Q -17 -KPX Acircumflex T -77 -KPX Acircumflex V -63 -KPX Acircumflex W -54 -KPX Acircumflex Y -77 -KPX Acircumflex c -17 -KPX Acircumflex d -17 -KPX Acircumflex e -17 -KPX Acircumflex f -35 -KPX Acircumflex o -17 -KPX Acircumflex q -17 -KPX Acircumflex t -17 -KPX Acircumflex v -58 -KPX Acircumflex w -40 -KPX Acircumflex y -67 -KPX Acircumflex Adieresis 27 -KPX Acircumflex Ccedilla -17 -KPX Acircumflex Odieresis -17 -KPX Acircumflex ccedilla -17 -KPX Acircumflex eacute -17 -KPX Acircumflex egrave -17 -KPX Acircumflex ecircumflex -17 -KPX Acircumflex edieresis -17 -KPX Acircumflex oacute -17 -KPX Acircumflex ograve -17 -KPX Acircumflex ocircumflex -17 -KPX Acircumflex odieresis -17 -KPX Acircumflex otilde -17 -KPX Acircumflex guillemotleft -35 -KPX Acircumflex Agrave 27 -KPX Acircumflex Atilde 27 -KPX Acircumflex Otilde -17 -KPX Acircumflex quotedblleft -128 -KPX Acircumflex quotedblright -123 -KPX Acircumflex ydieresis -67 -KPX Acircumflex Ydieresis -77 -KPX Acircumflex quotedblbase 22 -KPX Acircumflex Acircumflex 27 -KPX Acircumflex Aacute 27 -KPX Acircumflex Oacute -17 -KPX Acircumflex Ocircumflex -17 -KPX Acircumflex Ograve -17 -KPX Acircumflex Yacute -77 -KPX Acircumflex yacute -67 -KPX Acircumflex Gbreve -17 -KPX Acircumflex Cacute -17 -KPX Acircumflex cacute -17 -KPX Acircumflex Ccaron -17 -KPX Acircumflex ccaron -17 -KPX Aacute hyphen -21 -KPX Aacute period -17 -KPX Aacute colon -17 -KPX Aacute A 27 -KPX Aacute C -17 -KPX Aacute G -17 -KPX Aacute O -17 -KPX Aacute Q -17 -KPX Aacute T -77 -KPX Aacute V -63 -KPX Aacute W -54 -KPX Aacute Y -77 -KPX Aacute c -17 -KPX Aacute d -17 -KPX Aacute e -17 -KPX Aacute f -35 -KPX Aacute o -17 -KPX Aacute q -17 -KPX Aacute t -17 -KPX Aacute v -58 -KPX Aacute w -40 -KPX Aacute y -67 -KPX Aacute Adieresis 27 -KPX Aacute Ccedilla -17 -KPX Aacute Odieresis -17 -KPX Aacute ccedilla -17 -KPX Aacute eacute -17 -KPX Aacute egrave -17 -KPX Aacute ecircumflex -17 -KPX Aacute edieresis -17 -KPX Aacute oacute -17 -KPX Aacute ograve -17 -KPX Aacute ocircumflex -17 -KPX Aacute odieresis -17 -KPX Aacute otilde -17 -KPX Aacute guillemotleft -35 -KPX Aacute Agrave 27 -KPX Aacute Atilde 27 -KPX Aacute Otilde -17 -KPX Aacute quotedblleft -128 -KPX Aacute quotedblright -123 -KPX Aacute ydieresis -67 -KPX Aacute Ydieresis -77 -KPX Aacute quotedblbase 22 -KPX Aacute Acircumflex 27 -KPX Aacute Aacute 27 -KPX Aacute Oacute -17 -KPX Aacute Ocircumflex -17 -KPX Aacute Ograve -17 -KPX Aacute Yacute -77 -KPX Aacute yacute -67 -KPX Aacute Gbreve -17 -KPX Aacute Cacute -17 -KPX Aacute cacute -17 -KPX Aacute Ccaron -17 -KPX Aacute ccaron -17 -KPX Oacute hyphen 27 -KPX Oacute period -40 -KPX Oacute colon -17 -KPX Oacute A -17 -KPX Oacute V -17 -KPX Oacute X -63 -KPX Oacute Y -54 -KPX Oacute Adieresis -17 -KPX Oacute guillemotleft -17 -KPX Oacute Agrave -17 -KPX Oacute Atilde -17 -KPX Oacute quotedblleft -21 -KPX Oacute quotedblright -17 -KPX Oacute Ydieresis -54 -KPX Oacute quotedblbase -91 -KPX Oacute Acircumflex -17 -KPX Oacute Aacute -17 -KPX Oacute Yacute -54 -KPX Ocircumflex hyphen 27 -KPX Ocircumflex period -40 -KPX Ocircumflex colon -17 -KPX Ocircumflex A -17 -KPX Ocircumflex V -17 -KPX Ocircumflex X -63 -KPX Ocircumflex Y -54 -KPX Ocircumflex Adieresis -17 -KPX Ocircumflex guillemotleft -17 -KPX Ocircumflex Agrave -17 -KPX Ocircumflex Atilde -17 -KPX Ocircumflex quotedblleft -21 -KPX Ocircumflex quotedblright -17 -KPX Ocircumflex Ydieresis -54 -KPX Ocircumflex quotedblbase -91 -KPX Ocircumflex Acircumflex -17 -KPX Ocircumflex Aacute -17 -KPX Ocircumflex Yacute -54 -KPX Ograve hyphen 27 -KPX Ograve period -40 -KPX Ograve colon -17 -KPX Ograve A -17 -KPX Ograve V -17 -KPX Ograve X -63 -KPX Ograve Y -54 -KPX Ograve Adieresis -17 -KPX Ograve guillemotleft -17 -KPX Ograve Agrave -17 -KPX Ograve Atilde -17 -KPX Ograve quotedblleft -21 -KPX Ograve quotedblright -17 -KPX Ograve Ydieresis -54 -KPX Ograve quotedblbase -91 -KPX Ograve Acircumflex -17 -KPX Ograve Aacute -17 -KPX Ograve Yacute -54 -KPX Uacute Z -17 -KPX Uacute Zcaron -17 -KPX Ucircumflex Z -17 -KPX Ucircumflex Zcaron -17 -KPX Ugrave Z -17 -KPX Ugrave Zcaron -17 -KPX Scaron A 18 -KPX Scaron Adieresis 18 -KPX Scaron Agrave 18 -KPX Scaron Atilde 18 -KPX Scaron Acircumflex 18 -KPX Scaron Aacute 18 -KPX Zcaron hyphen -17 -KPX Zcaron quotedblleft -17 -KPX Zcaron quotedblright -17 -KPX Zcaron quotedblbase -17 -KPX eth quotedblleft -44 -KPX eth quotedblright -54 -KPX eth quotedblbase -35 -KPX Yacute hyphen -118 -KPX Yacute period -202 -KPX Yacute colon -132 -KPX Yacute A -77 -KPX Yacute C -54 -KPX Yacute O -54 -KPX Yacute a -137 -KPX Yacute e -132 -KPX Yacute i -35 -KPX Yacute o -132 -KPX Yacute u -114 -KPX Yacute Adieresis -77 -KPX Yacute Ccedilla -54 -KPX Yacute Odieresis -54 -KPX Yacute aacute -137 -KPX Yacute agrave -137 -KPX Yacute acircumflex -137 -KPX Yacute adieresis -137 -KPX Yacute atilde -137 -KPX Yacute aring -137 -KPX Yacute eacute -132 -KPX Yacute egrave -132 -KPX Yacute ecircumflex -132 -KPX Yacute edieresis -132 -KPX Yacute oacute -132 -KPX Yacute ograve -132 -KPX Yacute ocircumflex -132 -KPX Yacute odieresis -132 -KPX Yacute otilde -132 -KPX Yacute uacute -114 -KPX Yacute ugrave -114 -KPX Yacute ucircumflex -114 -KPX Yacute udieresis -114 -KPX Yacute guillemotleft -109 -KPX Yacute guillemotright -72 -KPX Yacute Agrave -77 -KPX Yacute Atilde -77 -KPX Yacute Otilde -54 -KPX Yacute quotedblleft -54 -KPX Yacute quotedblright -17 -KPX Yacute quotedblbase -128 -KPX Yacute Acircumflex -77 -KPX Yacute Aacute -77 -KPX Yacute Oacute -54 -KPX Yacute Ocircumflex -54 -KPX Yacute Ograve -54 -KPX Yacute Cacute -54 -KPX Yacute Ccaron -54 -KPX yacute hyphen -17 -KPX yacute period -142 -KPX yacute colon -72 -KPX yacute guillemotleft -17 -KPX yacute guillemotright -17 -KPX yacute quotedblbase -146 -KPX Thorn period -72 -KPX Thorn colon -35 -KPX Thorn quotedblleft -17 -KPX Thorn quotedblbase -91 -KPX Gbreve T -35 -KPX Gbreve Y -49 -KPX Gbreve guillemotleft -17 -KPX Gbreve guillemotright -17 -KPX Gbreve quotedblleft -21 -KPX Gbreve quotedblright -21 -KPX Gbreve Ydieresis -49 -KPX Gbreve quotedblbase -26 -KPX Gbreve Yacute -49 -KPX Scedilla A 18 -KPX Scedilla Adieresis 18 -KPX Scedilla Agrave 18 -KPX Scedilla Atilde 18 -KPX Scedilla Acircumflex 18 -KPX Scedilla Aacute 18 -KPX Cacute Y -17 -KPX Cacute guillemotleft -17 -KPX Cacute guillemotright -17 -KPX Cacute quotedblright 18 -KPX Cacute Ydieresis -17 -KPX Cacute Yacute -17 -KPX Ccaron Y -17 -KPX Ccaron guillemotleft -17 -KPX Ccaron guillemotright -17 -KPX Ccaron quotedblright 18 -KPX Ccaron Ydieresis -17 -KPX Ccaron Yacute -17 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/helper.rb b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/helper.rb deleted file mode 100644 index 4361aa1c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/helper.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'rubygems' -require 'bundler/setup' -require 'minitest/autorun' -require 'afm' diff --git a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/test_afm.rb b/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/test_afm.rb deleted file mode 100644 index d02376e0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/afm-0.2.2/test/test_afm.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'helper' - -class TestAfm < Minitest::Test - - def setup - @font = AFM::Font.new(File.join(File.dirname(__FILE__), 'fixtures', 'Vera.afm')) - end - - def test_should_set_metadata - assert_equal "BitstreamVeraSans-Roman", @font.metadata['FontName'] - assert_equal "BitstreamVeraSans-Roman", @font['FontName'] - end - - def test_should_set_char_metrics - assert_equal 400, @font.char_metrics['exclam'][:wx] - assert_equal [85, -131, 310, 758], @font.char_metrics['parenleft'][:boundingbox] - end - - def test_should_set_char_metrics_by_code - assert_equal 400, @font.char_metrics_by_code[33][:wx] - assert_equal [85, -131, 310, 758], @font.char_metrics_by_code[40][:boundingbox] - end - - def test_should_get_char_metrics_by_char - assert_equal 400, @font.metrics_for("!")[:wx] - end - - def test_open_font_with_alternative_method - assert !AFM::Font.from_file(File.join(File.dirname(__FILE__), 'fixtures', 'Vera.afm')).nil? - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async.rb deleted file mode 100644 index dfbb7dbc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2017-2024, by Samuel Williams. -# Copyright, 2020, by Salim Semaoune. - -require_relative "async/version" -require_relative "async/reactor" - -require_relative "kernel/async" -require_relative "kernel/sync" - -# Asynchronous programming framework. -module Async -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/barrier.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/barrier.md deleted file mode 100644 index 03cdfa52..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/barrier.md +++ /dev/null @@ -1,42 +0,0 @@ -A synchronization primitive, which allows one task to wait for a number of other tasks to complete. It can be used in conjunction with {Semaphore}. - - -## Example - -~~~ ruby -require 'async' -require 'async/barrier' - -barrier = Async::Barrier.new -Sync do - Console.info("Barrier Example: sleep sort.") - - # Generate an array of 10 numbers: - numbers = 10.times.map{rand(10)} - sorted = [] - - # Sleep sort the numbers: - numbers.each do |number| - barrier.async do |task| - sleep(number) - sorted << number - end - end - - # Wait for all the numbers to be sorted: - barrier.wait - - Console.info("Sorted", sorted) -ensure - # Ensure all the tasks are stopped when we exit: - barrier.stop -end -~~~ - -### Output - -~~~ -0.0s info: Barrier Example: sleep sort. -9.0s info: Sorted - | [3, 3, 3, 4, 4, 5, 5, 5, 8, 9] -~~~ diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/barrier.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/barrier.rb deleted file mode 100644 index 274a2c75..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/barrier.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2024, by Samuel Williams. - -require_relative "list" -require_relative "task" - -module Async - # A general purpose synchronisation primitive, which allows one task to wait for a number of other tasks to complete. It can be used in conjunction with {Semaphore}. - # - # @public Since *Async v1*. - class Barrier - # Initialize the barrier. - # @parameter parent [Task | Semaphore | Nil] The parent for holding any children tasks. - # @public Since *Async v1*. - def initialize(parent: nil) - @tasks = List.new - - @parent = parent - end - - class TaskNode < List::Node - def initialize(task) - @task = task - end - - attr :task - end - - private_constant :TaskNode - - # Number of tasks being held by the barrier. - def size - @tasks.size - end - - # All tasks which have been invoked into the barrier. - attr :tasks - - # Execute a child task and add it to the barrier. - # @asynchronous Executes the given block concurrently. - def async(*arguments, parent: (@parent or Task.current), **options, &block) - task = parent.async(*arguments, **options, &block) - - @tasks.append(TaskNode.new(task)) - - return task - end - - # Whether there are any tasks being held by the barrier. - # @returns [Boolean] - def empty? - @tasks.empty? - end - - # Wait for all tasks to complete by invoking {Task#wait} on each waiting task, which may raise an error. As long as the task has completed, it will be removed from the barrier. - # @asynchronous Will wait for tasks to finish executing. - def wait - @tasks.each do |waiting| - task = waiting.task - begin - task.wait - ensure - @tasks.remove?(waiting) unless task.alive? - end - end - end - - # Stop all tasks held by the barrier. - # @asynchronous May wait for tasks to finish executing. - def stop - @tasks.each do |waiting| - waiting.task.stop - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/clock.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/clock.rb deleted file mode 100644 index f1d6ebc8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/clock.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2018-2022, by Samuel Williams. - -module Async - # A convenient wrapper around the internal monotonic clock. - # @public Since *Async v1*. - class Clock - # Get the current elapsed monotonic time. - def self.now - ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - end - - # Measure the execution of a block of code. - # @yields {...} The block to execute. - # @returns [Numeric] The total execution time. - def self.measure - start_time = self.now - - yield - - return self.now - start_time - end - - # Start measuring elapsed time from now. - # @returns [Clock] - def self.start - self.new.tap(&:start!) - end - - # Create a new clock with the initial total time. - # @parameter total [Numeric] The initial clock duration. - def initialize(total = 0) - @total = total - @started = nil - end - - # Start measuring a duration. - def start! - @started ||= Clock.now - end - - # Stop measuring a duration and append the duration to the current total. - def stop! - if @started - @total += (Clock.now - @started) - @started = nil - end - - return @total - end - - # The total elapsed time including any current duration. - def total - total = @total - - if @started - total += (Clock.now - @started) - end - - return total - end - - # Reset the total elapsed time. If the clock is currently running, reset the start time to now. - def reset! - @total = 0 - - if @started - @started = Clock.now - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/condition.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/condition.md deleted file mode 100644 index ef1d44f7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/condition.md +++ /dev/null @@ -1,31 +0,0 @@ -A synchronization primitive, which allows fibers to wait until a particular condition is (edge) triggered. Zero or more fibers can wait on a condition. When the condition is signalled, the fibers will be resumed in order. - -## Example - -~~~ ruby -require 'async' - -Sync do - condition = Async::Condition.new - - Async do - Console.info "Waiting for condition..." - value = condition.wait - Console.info "Condition was signalled: #{value}" - end - - Async do |task| - sleep(1) - Console.info "Signalling condition..." - condition.signal("Hello World") - end -end -~~~ - -### Output - -~~~ -0.0s info: Waiting for condition... -1.0s info: Signalling condition... -1.0s info: Condition was signalled: Hello World -~~~ diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/condition.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/condition.rb deleted file mode 100644 index 373e8a3e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/condition.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2017-2024, by Samuel Williams. -# Copyright, 2017, by Kent Gruber. - -require "fiber" -require_relative "list" - -module Async - # A synchronization primitive, which allows fibers to wait until a particular condition is (edge) triggered. - # @public Since *Async v1*. - class Condition - # Create a new condition. - def initialize - @waiting = List.new - end - - class FiberNode < List::Node - def initialize(fiber) - @fiber = fiber - end - - def transfer(*arguments) - @fiber.transfer(*arguments) - end - - def alive? - @fiber.alive? - end - end - - private_constant :FiberNode - - # Queue up the current fiber and wait on yielding the task. - # @returns [Object] - def wait - @waiting.stack(FiberNode.new(Fiber.current)) do - Fiber.scheduler.transfer - end - end - - # @deprecated Replaced by {#waiting?} - def empty? - @waiting.empty? - end - - # @returns [Boolean] Is any fiber waiting on this notification? - def waiting? - @waiting.size > 0 - end - - # Signal to a given task that it should resume operations. - # @parameter value [Object | Nil] The value to return to the waiting fibers. - def signal(value = nil) - return if @waiting.empty? - - waiting = self.exchange - - waiting.each do |fiber| - Fiber.scheduler.resume(fiber, value) if fiber.alive? - end - - return nil - end - - protected - - def exchange - waiting = @waiting - @waiting = List.new - return waiting - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/console.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/console.rb deleted file mode 100644 index 301595f6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/console.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024, by Samuel Williams. - -module Async - # Shims for the console gem, redirecting warnings and above to `Kernel#warn`. - # - # If you require this file, the `async` library will not depend on the `console` gem. - # - # That includes any gems that sit within the `Async` namespace. - # - # This is an experimental feature. - module Console - # Log a message at the debug level. The shim is silent. - def self.debug(...) - end - - # Log a message at the info level. The shim is silent. - def self.info(...) - end - - # Log a message at the warn level. The shim redirects to `Kernel#warn`. - def self.warn(*arguments, exception: nil, **options) - if exception - super(*arguments, exception.full_message, **options) - else - super(*arguments, **options) - end - end - - # Log a message at the error level. The shim redirects to `Kernel#warn`. - def self.error(...) - self.warn(...) - end - - # Log a message at the fatal level. The shim redirects to `Kernel#warn`. - def self.fatal(...) - self.warn(...) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/idler.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/idler.rb deleted file mode 100644 index c221969c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/idler.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024, by Samuel Williams. - -module Async - # A load balancing mechanism that can be used process work when the system is idle. - class Idler - # Create a new idler. - # - # @public Since *Async v2*. - # - # @parameter maximum_load [Numeric] The maximum load before we start shedding work. - # @parameter backoff [Numeric] The initial backoff time, used for delaying work. - # @parameter parent [Interface(:async) | Nil] The parent task to use for async operations. - def initialize(maximum_load = 0.8, backoff: 0.01, parent: nil) - @maximum_load = maximum_load - @backoff = backoff - @parent = parent - end - - # Wait until the system is idle, then execute the given block in a new task. - # - # @asynchronous Executes the given block concurrently. - # - # @parameter arguments [Array] The arguments to pass to the block. - # @parameter parent [Interface(:async) | Nil] The parent task to use for async operations. - # @parameter options [Hash] The options to pass to the task. - # @yields {|task| ...} When the system is idle, the block will be executed in a new task. - def async(*arguments, parent: (@parent or Task.current), **options, &block) - wait - - # It is crucial that we optimistically execute the child task, so that we prevent a tight loop invoking this method from consuming all available resources. - parent.async(*arguments, **options, &block) - end - - # Wait until the system is idle, according to the maximum load specified. - # - # If the scheduler is overloaded, this method will sleep for an exponentially increasing amount of time. - def wait - scheduler = Fiber.scheduler - backoff = nil - - while true - load = scheduler.load - - break if load < @maximum_load - - if backoff - sleep(backoff) - backoff *= 2.0 - else - scheduler.yield - backoff = @backoff - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/limited_queue.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/limited_queue.rb deleted file mode 100644 index 10511a1d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/limited_queue.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024, by Samuel Williams. - -# The implementation lives in `queue.rb` but later we may move it here for better autoload/inference. -require_relative "queue" diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/list.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/list.rb deleted file mode 100644 index 11e66164..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/list.rb +++ /dev/null @@ -1,311 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022-2024, by Samuel Williams. - -module Async - # A general doublely linked list. This is used internally by {Async::Barrier} and {Async::Condition} to manage child tasks. - class List - # Initialize a new, empty, list. - def initialize - @head = self - @tail = self - @size = 0 - end - - # @returns [String] A short summary of the list. - def to_s - sprintf("#<%s:0x%x size=%d>", self.class.name, object_id, @size) - end - - alias inspect to_s - - # Fast, safe, unbounded accumulation of children. - def to_a - items = [] - current = self - - while current.tail != self - unless current.tail.is_a?(Iterator) - items << current.tail - end - - current = current.tail - end - - return items - end - - # @attribute [Node | Nil] Points at the end of the list. - attr_accessor :head - - # @attribute [Node | Nil] Points at the start of the list. - attr_accessor :tail - - # @attribute [Integer] The number of nodes in the list. - attr :size - - # A callback that is invoked when an item is added to the list. - def added(node) - @size += 1 - return node - end - - # Append a node to the end of the list. - def append(node) - if node.head - raise ArgumentError, "Node is already in a list!" - end - - node.tail = self - @head.tail = node - node.head = @head - @head = node - - return added(node) - end - - # Prepend a node to the start of the list. - def prepend(node) - if node.head - raise ArgumentError, "Node is already in a list!" - end - - node.head = self - @tail.head = node - node.tail = @tail - @tail = node - - return added(node) - end - - # Add the node, yield, and the remove the node. - # @yields {|node| ...} Yields the node. - # @returns [Object] Returns the result of the block. - def stack(node, &block) - append(node) - return yield(node) - ensure - remove!(node) - end - - # A callback that is invoked when an item is removed from the list. - def removed(node) - @size -= 1 - return node - end - - # Remove the node if it is in a list. - # - # You should be careful to only remove nodes that are part of this list. - # - # @returns [Node] Returns the node if it was removed, otherwise nil. - def remove?(node) - if node.head - return remove!(node) - end - - return nil - end - - # Remove the node. If it was already removed, this will raise an error. - # - # You should be careful to only remove nodes that are part of this list. - # - # @raises [ArgumentError] If the node is not part of this list. - # @returns [Node] Returns the node if it was removed, otherwise nil. - def remove(node) - # One downside of this interface is we don't actually check if the node is part of the list defined by `self`. This means that there is a potential for a node to be removed from a different list using this method, which in can throw off book-keeping when lists track size, etc. - unless node.head - raise ArgumentError, "Node is not in a list!" - end - - remove!(node) - end - - private def remove!(node) - node.head.tail = node.tail - node.tail.head = node.head - - # This marks the node as being removed, and causes remove to fail if called a 2nd time. - node.head = nil - # node.tail = nil - - return removed(node) - end - - # @returns [Boolean] Returns true if the list is empty. - def empty? - @size == 0 - end - - # def validate!(node = nil) - # previous = self - # current = @tail - # found = node.equal?(self) - - # while true - # break if current.equal?(self) - - # if current.head != previous - # raise "Invalid previous linked list node!" - # end - - # if current.is_a?(List) and !current.equal?(self) - # raise "Invalid list in list node!" - # end - - # if node - # found ||= current.equal?(node) - # end - - # previous = current - # current = current.tail - # end - - # if node and !found - # raise "Node not found in list!" - # end - # end - - # Iterate over each node in the linked list. It is generally safe to remove the current node, any previous node or any future node during iteration. - # - # @yields {|node| ...} Yields each node in the list. - # @returns [List] Returns self. - def each(&block) - return to_enum unless block_given? - - Iterator.each(self, &block) - - return self - end - - # Determine whether the given node is included in the list. - # - # @parameter needle [Node] The node to search for. - # @returns [Boolean] Returns true if the node is in the list. - def include?(needle) - self.each do |item| - return true if needle.equal?(item) - end - - return false - end - - # @returns [Node] Returns the first node in the list, if it is not empty. - def first - # validate! - - current = @tail - - while !current.equal?(self) - if current.is_a?(Iterator) - current = current.tail - else - return current - end - end - - return nil - end - - # @returns [Node] Returns the last node in the list, if it is not empty. - def last - # validate! - - current = @head - - while !current.equal?(self) - if current.is_a?(Iterator) - current = current.head - else - return current - end - end - - return nil - end - - # Shift the first node off the list, if it is not empty. - def shift - if node = first - remove!(node) - end - end - - # A linked list Node. - class Node - attr_accessor :head - attr_accessor :tail - - alias inspect to_s - end - - class Iterator < Node - def initialize(list) - @list = list - - # Insert the iterator as the first item in the list: - @tail = list.tail - @tail.head = self - list.tail = self - @head = list - end - - def remove! - @head.tail = @tail - @tail.head = @head - @head = nil - @tail = nil - @list = nil - end - - def move_next - # Move to the next item (which could be an iterator or the end): - @tail.head = @head - @head.tail = @tail - @head = @tail - @tail = @tail.tail - @head.tail = self - @tail.head = self - end - - def move_current - while true - # Are we at the end of the list? - if @tail.equal?(@list) - return nil - end - - if @tail.is_a?(Iterator) - move_next - else - return @tail - end - end - end - - def each - while current = move_current - yield current - - if current.equal?(@tail) - move_next - end - end - end - - def self.each(list, &block) - return if list.empty? - - iterator = Iterator.new(list) - - iterator.each(&block) - ensure - iterator&.remove! - end - end - - private_constant :Iterator - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/node.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/node.rb deleted file mode 100644 index e4042508..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/node.rb +++ /dev/null @@ -1,324 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2017-2024, by Samuel Williams. -# Copyright, 2017, by Kent Gruber. -# Copyright, 2022, by Shannon Skipper. - -require "fiber/annotation" - -require_relative "list" - -module Async - # A list of children tasks. - class Children < List - # Create an empty list of children tasks. - def initialize - super - @transient_count = 0 - end - - # Some children may be marked as transient. Transient children do not prevent the parent from finishing. - # @returns [Boolean] Whether the node has transient children. - def transients? - @transient_count > 0 - end - - # Whether all children are considered finished. Ignores transient children. - def finished? - @size == @transient_count - end - - # Whether the children is empty, preserved for compatibility. - def nil? - empty? - end - - # Adjust the number of transient children, assuming it has changed. - # - # Despite being public, this is not intended to be called directly. It is used internally by {Node#transient=}. - # - # @parameter transient [Boolean] Whether to increment or decrement the transient count. - def adjust_transient_count(transient) - if transient - @transient_count += 1 - else - @transient_count -= 1 - end - end - - private - - def added(node) - if node.transient? - @transient_count += 1 - end - - return super - end - - def removed(node) - if node.transient? - @transient_count -= 1 - end - - return super - end - end - - # A node in a tree, used for implementing the task hierarchy. - class Node - # Create a new node in the tree. - # @parameter parent [Node | Nil] This node will attach to the given parent. - def initialize(parent = nil, annotation: nil, transient: false) - @parent = nil - @children = nil - - @annotation = annotation - @object_name = nil - - @transient = transient - - @head = nil - @tail = nil - - if parent - parent.add_child(self) - end - end - - # @returns [Node] The root node in the hierarchy. - def root - @parent&.root || self - end - - # @private - attr_accessor :head - - # @private - attr_accessor :tail - - # @attribute [Node] The parent node. - attr :parent - - # @attribute [Children | Nil] Optional list of children. - attr :children - - # @attribute [String | Nil] A useful identifier for the current node. - attr :annotation - - # Whether this node has any children. - # @returns [Boolean] - def children? - @children && !@children.empty? - end - - # Represents whether a node is transient. Transient nodes are not considered - # when determining if a node is finished. This is useful for tasks which are - # internal to an object rather than explicit user concurrency. For example, - # a child task which is pruning a connection pool is transient, because it - # is not directly related to the parent task, and should not prevent the - # parent task from finishing. - def transient? - @transient - end - - # Change the transient state of the node. - # - # A transient node is not considered when determining if a node is finished, and propagates up if the parent is consumed. - # - # @parameter value [Boolean] Whether the node is transient. - def transient=(value) - if @transient != value - @transient = value - - @parent&.children&.adjust_transient_count(value) - end - end - - # Annotate the node with a description. - # - # @parameter annotation [String] The description to annotate the node with. - def annotate(annotation) - if block_given? - begin - current_annotation = @annotation - @annotation = annotation - return yield - ensure - @annotation = current_annotation - end - else - @annotation = annotation - end - end - - # A description of the node, including the annotation and object name. - # - # @returns [String] The description of the node. - def description - @object_name ||= "#{self.class}:#{format '%#018x', object_id}#{@transient ? ' transient' : nil}" - - if annotation = self.annotation - "#{@object_name} #{annotation}" - elsif line = self.backtrace(0, 1)&.first - "#{@object_name} #{line}" - else - @object_name - end - end - - # Provides a backtrace for nodes that have an active execution context. - # - # @returns [Array(Thread::Backtrace::Locations) | Nil] The backtrace of the node, if available. - def backtrace(*arguments) - nil - end - - # @returns [String] A description of the node. - def to_s - "\#<#{self.description}>" - end - - alias inspect to_s - - # Change the parent of this node. - # - # @parameter parent [Node | Nil] The parent to attach to, or nil to detach. - # @returns [Node] Itself. - def parent=(parent) - return if @parent.equal?(parent) - - if @parent - @parent.remove_child(self) - @parent = nil - end - - if parent - parent.add_child(self) - end - - return self - end - - protected def set_parent(parent) - @parent = parent - end - - protected def add_child(child) - @children ||= Children.new - @children.append(child) - child.set_parent(self) - end - - protected def remove_child(child) - @children.remove(child) - child.set_parent(nil) - end - - # Whether the node can be consumed (deleted) safely. By default, checks if the children set is empty. - # - # @returns [Boolean] - def finished? - @children.nil? || @children.finished? - end - - # If the node has a parent, and is {finished?}, then remove this node from - # the parent. - def consume - if parent = @parent and finished? - parent.remove_child(self) - - # If we have children, then we need to move them to our the parent if they are not finished: - if @children - while child = @children.shift - if child.finished? - child.set_parent(nil) - else - parent.add_child(child) - end - end - - @children = nil - end - - parent.consume - end - end - - # Traverse the task tree. - # - # @returns [Enumerator] An enumerator which will traverse the tree if no block is given. - # @yields {|node, level| ...} The node and the level relative to the given root. - def traverse(&block) - return enum_for(:traverse) unless block_given? - - self.traverse_recurse(&block) - end - - protected def traverse_recurse(level = 0, &block) - yield self, level - - @children&.each do |child| - child.traverse_recurse(level + 1, &block) - end - end - - # Immediately terminate all children tasks, including transient tasks. Internally invokes `stop(false)` on all children. This should be considered a last ditch effort and is used when closing the scheduler. - def terminate - # Attempt to stop the current task immediately, and all children: - stop(false) - - # If that doesn't work, take more serious action: - @children&.each do |child| - child.terminate - end - - return @children.nil? - end - - # Attempt to stop the current node immediately, including all non-transient children. Invokes {#stop_children} to stop all children. - # - # @parameter later [Boolean] Whether to defer stopping until some point in the future. - def stop(later = false) - # The implementation of this method may defer calling `stop_children`. - stop_children(later) - end - - # Attempt to stop all non-transient children. - private def stop_children(later = false) - @children&.each do |child| - child.stop(later) unless child.transient? - end - end - - # Whether the node has been stopped. - def stopped? - @children.nil? - end - - # Print the hierarchy of the task tree from the given node. - # - # @parameter out [IO] The output stream to write to. - # @parameter backtrace [Boolean] Whether to print the backtrace of each node. - def print_hierarchy(out = $stdout, backtrace: true) - self.traverse do |node, level| - indent = "\t" * level - - out.puts "#{indent}#{node}" - - print_backtrace(out, indent, node) if backtrace - end - end - - private - - def print_backtrace(out, indent, node) - if backtrace = node.backtrace - backtrace.each_with_index do |line, index| - out.puts "#{indent}#{index.zero? ? "→ " : " "}#{line}" - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/notification.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/notification.rb deleted file mode 100644 index f7ac780f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/notification.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2018-2024, by Samuel Williams. - -require_relative "condition" - -module Async - # A synchronization primitive, which allows fibers to wait until a notification is received. Does not block the task which signals the notification. Waiting tasks are resumed on next iteration of the reactor. - # @public Since *Async v1*. - class Notification < Condition - # Signal to a given task that it should resume operations. - def signal(value = nil, task: Task.current) - return if @waiting.empty? - - Fiber.scheduler.push Signal.new(self.exchange, value) - - return nil - end - - Signal = Struct.new(:waiting, :value) do - def alive? - true - end - - def transfer - waiting.each do |fiber| - fiber.transfer(value) if fiber.alive? - end - end - end - - private_constant :Signal - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/queue.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/queue.rb deleted file mode 100644 index 429b5868..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/queue.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2018-2024, by Samuel Williams. -# Copyright, 2019, by Ryan Musgrave. -# Copyright, 2020-2022, by Bruno Sutic. - -require_relative "notification" - -module Async - # A queue which allows items to be processed in order. - # - # It has a compatible interface with {Notification} and {Condition}, except that it's multi-value. - # - # @public Since *Async v1*. - class Queue - # Create a new queue. - # - # @parameter parent [Interface(:async) | Nil] The parent task to use for async operations. - # @parameter available [Notification] The notification to use for signaling when items are available. - def initialize(parent: nil, available: Notification.new) - @items = [] - @parent = parent - @available = available - end - - # @attribute [Array] The items in the queue. - attr :items - - # @returns [Integer] The number of items in the queue. - def size - @items.size - end - - # @returns [Boolean] Whether the queue is empty. - def empty? - @items.empty? - end - - # Add an item to the queue. - def push(item) - @items << item - - @available.signal unless self.empty? - end - - # Compatibility with {::Queue#push}. - def <<(item) - self.push(item) - end - - # Add multiple items to the queue. - def enqueue(*items) - @items.concat(items) - - @available.signal unless self.empty? - end - - # Remove and return the next item from the queue. - def dequeue - while @items.empty? - @available.wait - end - - @items.shift - end - - # Compatibility with {::Queue#pop}. - def pop - self.dequeue - end - - # Process each item in the queue. - # - # @asynchronous Executes the given block concurrently for each item. - # - # @parameter arguments [Array] The arguments to pass to the block. - # @parameter parent [Interface(:async) | Nil] The parent task to use for async operations. - # @parameter options [Hash] The options to pass to the task. - # @yields {|task| ...} When the system is idle, the block will be executed in a new task. - def async(parent: (@parent or Task.current), **options, &block) - while item = self.dequeue - parent.async(item, **options, &block) - end - end - - # Enumerate each item in the queue. - def each - while item = self.dequeue - yield item - end - end - - # Signal the queue with a value, the same as {#enqueue}. - def signal(value = nil) - self.enqueue(value) - end - - # Wait for an item to be available, the same as {#dequeue}. - def wait - self.dequeue - end - end - - # A queue which limits the number of items that can be enqueued. - # @public Since *Async v1*. - class LimitedQueue < Queue - # Create a new limited queue. - # - # @parameter limit [Integer] The maximum number of items that can be enqueued. - # @parameter full [Notification] The notification to use for signaling when the queue is full. - def initialize(limit = 1, full: Notification.new, **options) - super(**options) - - @limit = limit - @full = full - end - - # @attribute [Integer] The maximum number of items that can be enqueued. - attr :limit - - # @returns [Boolean] Whether trying to enqueue an item would block. - def limited? - @items.size >= @limit - end - - # Add an item to the queue. - # - # If the queue is full, this method will block until there is space available. - # - # @parameter item [Object] The item to add to the queue. - def push(item) - while limited? - @full.wait - end - - super - end - - # Add multiple items to the queue. - # - # If the queue is full, this method will block until there is space available. - # - # @parameter items [Array] The items to add to the queue. - def enqueue(*items) - while !items.empty? - while limited? - @full.wait - end - - available = @limit - @items.size - @items.concat(items.shift(available)) - - @available.signal unless self.empty? - end - end - - # Remove and return the next item from the queue. - # - # If the queue is empty, this method will block until an item is available. - # - # @returns [Object] The next item in the queue. - def dequeue - item = super - - @full.signal - - return item - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/reactor.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/reactor.rb deleted file mode 100644 index bab99827..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/reactor.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2017-2024, by Samuel Williams. -# Copyright, 2017, by Kent Gruber. -# Copyright, 2018, by Sokolov Yura. - -require_relative "scheduler" - -module Async - # A wrapper around the the scheduler which binds it to the current thread automatically. - class Reactor < Scheduler - # @deprecated Replaced by {Kernel::Async}. - def self.run(...) - Async(...) - end - - # Initialize the reactor and assign it to the current Fiber scheduler. - def initialize(...) - super - - Fiber.set_scheduler(self) - end - - # Close the reactor and remove it from the current Fiber scheduler. - def scheduler_close - self.close - end - - public :sleep - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/scheduler.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/scheduler.rb deleted file mode 100644 index f859b1ef..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/scheduler.rb +++ /dev/null @@ -1,577 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2020-2024, by Samuel Williams. -# Copyright, 2020, by Jun Jiang. -# Copyright, 2021, by Julien Portalier. - -require_relative "clock" -require_relative "task" -require_relative "timeout" -require_relative "worker_pool" - -require "io/event" - -require "console" -require "resolv" - -module Async - begin - require "fiber/profiler" - Profiler = Fiber::Profiler - rescue LoadError - # Fiber::Profiler is not available. - Profiler = nil - end - - # Handles scheduling of fibers. Implements the fiber scheduler interface. - class Scheduler < Node - WORKER_POOL = ENV.fetch("ASYNC_SCHEDULER_WORKER_POOL", nil).then do |value| - value == "true" ? true : nil - end - - # Raised when an operation is attempted on a closed scheduler. - class ClosedError < RuntimeError - # Create a new error. - # - # @parameter message [String] The error message. - def initialize(message = "Scheduler is closed!") - super - end - end - - # Whether the fiber scheduler is supported. - # @public Since *Async v1*. - def self.supported? - true - end - - # Create a new scheduler. - # - # @public Since *Async v1*. - # @parameter parent [Node | Nil] The parent node to use for task hierarchy. - # @parameter selector [IO::Event::Selector] The selector to use for event handling. - def initialize(parent = nil, selector: nil, profiler: Profiler&.default, worker_pool: WORKER_POOL) - super(parent) - - @selector = selector || ::IO::Event::Selector.new(Fiber.current) - @profiler = profiler - - @interrupted = false - - @blocked = 0 - - @busy_time = 0.0 - @idle_time = 0.0 - - @timers = ::IO::Event::Timers.new - if worker_pool == true - @worker_pool = WorkerPool.new - else - @worker_pool = worker_pool - end - - if @worker_pool - self.singleton_class.prepend(WorkerPool::BlockingOperationWait) - end - end - - # Compute the scheduler load according to the busy and idle times that are updated by the run loop. - # - # @returns [Float] The load of the scheduler. 0.0 means no load, 1.0 means fully loaded or over-loaded. - def load - total_time = @busy_time + @idle_time - - # If the total time is zero, then the load is zero: - return 0.0 if total_time.zero? - - # We normalize to a 1 second window: - if total_time > 1.0 - ratio = 1.0 / total_time - @busy_time *= ratio - @idle_time *= ratio - - # We don't need to divide here as we've already normalised it to a 1s window: - return @busy_time - else - return @busy_time / total_time - end - end - - # Invoked when the fiber scheduler is being closed. - # - # Executes the run loop until all tasks are finished, then closes the scheduler. - def scheduler_close(error = $!) - # If the execution context (thread) was handling an exception, we want to exit as quickly as possible: - unless error - self.run - end - ensure - self.close - end - - # Terminate all child tasks. - def terminate - # If that doesn't work, take more serious action: - @children&.each do |child| - child.terminate - end - - return @children.nil? - end - - # Terminate all child tasks and close the scheduler. - # @public Since *Async v1*. - def close - self.run_loop do - until self.terminate - self.run_once! - end - end - - Kernel.raise "Closing scheduler with blocked operations!" if @blocked > 0 - ensure - # We want `@selector = nil` to be a visible side effect from this point forward, specifically in `#interrupt` and `#unblock`. If the selector is closed, then we don't want to push any fibers to it. - selector = @selector - @selector = nil - - selector&.close - - worker_pool = @worker_pool - @worker_pool = nil - - worker_pool&.close - - consume - end - - # @returns [Boolean] Whether the scheduler has been closed. - # @public Since *Async v1*. - def closed? - @selector.nil? - end - - # @returns [String] A description of the scheduler. - def to_s - "\#<#{self.description} #{@children&.size || 0} children (#{stopped? ? 'stopped' : 'running'})>" - end - - # Interrupt the event loop and cause it to exit. - # @asynchronous May be called from any thread. - def interrupt - @interrupted = true - @selector&.wakeup - end - - # Transfer from the calling fiber to the event loop. - def transfer - @selector.transfer - end - - # Yield the current fiber and resume it on the next iteration of the event loop. - def yield - @selector.yield - end - - # Schedule a fiber (or equivalent object) to be resumed on the next loop through the reactor. - # @parameter fiber [Fiber | Object] The object to be resumed on the next iteration of the run-loop. - def push(fiber) - @selector.push(fiber) - end - - # Raise an exception on a specified fiber with the given arguments. - # - # This internally schedules the current fiber to be ready, before raising the exception, so that it will later resume execution. - # - # @parameter fiber [Fiber] The fiber to raise the exception on. - # @parameter *arguments [Array] The arguments to pass to the fiber. - def raise(...) - @selector.raise(...) - end - - # Resume execution of the specified fiber. - # - # @parameter fiber [Fiber] The fiber to resume. - # @parameter arguments [Array] The arguments to pass to the fiber. - def resume(fiber, *arguments) - @selector.resume(fiber, *arguments) - end - - # Invoked when a fiber tries to perform a blocking operation which cannot continue. A corresponding call {unblock} must be performed to allow this fiber to continue. - # - # @public Since *Async v2*. - # @asynchronous May only be called on same thread as fiber scheduler. - # - # @parameter blocker [Object] The object that is blocking the fiber. - # @parameter timeout [Float | Nil] The maximum time to block, or if nil, indefinitely. - def block(blocker, timeout) - # $stderr.puts "block(#{blocker}, #{Fiber.current}, #{timeout})" - fiber = Fiber.current - - if timeout - timer = @timers.after(timeout) do - if fiber.alive? - fiber.transfer(false) - end - end - end - - begin - @blocked += 1 - @selector.transfer - ensure - @blocked -= 1 - end - ensure - timer&.cancel! - end - - # Unblock a fiber that was previously blocked. - # - # @public Since *Async v2* and *Ruby v3.1*. - # @asynchronous May be called from any thread. - # - # @parameter blocker [Object] The object that was blocking the fiber. - # @parameter fiber [Fiber] The fiber to unblock. - def unblock(blocker, fiber) - # $stderr.puts "unblock(#{blocker}, #{fiber})" - - # This operation is protected by the GVL: - if selector = @selector - selector.push(fiber) - selector.wakeup - end - end - - # Sleep for the specified duration. - # - # @public Since *Async v2* and *Ruby v3.1*. - # @asynchronous May be non-blocking. - # - # @parameter duration [Numeric | Nil] The time in seconds to sleep, or if nil, indefinitely. - def kernel_sleep(duration = nil) - if duration - self.block(nil, duration) - else - self.transfer - end - end - - # Resolve the address of the given hostname. - # - # @public Since *Async v2*. - # @asynchronous May be non-blocking. - # - # @parameter hostname [String] The hostname to resolve. - def address_resolve(hostname) - # On some platforms, hostnames may contain a device-specific suffix (e.g. %en0). We need to strip this before resolving. - # See for more details. - hostname = hostname.split("%", 2).first - ::Resolv.getaddresses(hostname) - end - - # Wait for the specified IO to become ready for the specified events. - # - # @public Since *Async v2*. - # @asynchronous May be non-blocking. - # - # @parameter io [IO] The IO object to wait on. - # @parameter events [Integer] The events to wait for, e.g. `IO::READABLE`, `IO::WRITABLE`, etc. - # @parameter timeout [Float | Nil] The maximum time to wait, or if nil, indefinitely. - def io_wait(io, events, timeout = nil) - fiber = Fiber.current - - if timeout - # If an explicit timeout is specified, we expect that the user will handle it themselves: - timer = @timers.after(timeout) do - fiber.transfer - end - elsif timeout = io.timeout - # Otherwise, if we default to the io's timeout, we raise an exception: - timer = @timers.after(timeout) do - fiber.raise(::IO::TimeoutError, "Timeout (#{timeout}s) while waiting for IO to become ready!") - end - end - - return @selector.io_wait(fiber, io, events) - ensure - timer&.cancel! - end - - if ::IO::Event::Support.buffer? - # Read from the specified IO into the buffer. - # - # @public Since *Async v2* and Ruby with `IO::Buffer` support. - # @asynchronous May be non-blocking. - # - # @parameter io [IO] The IO object to read from. - # @parameter buffer [IO::Buffer] The buffer to read into. - # @parameter length [Integer] The minimum number of bytes to read. - # @parameter offset [Integer] The offset within the buffer to read into. - def io_read(io, buffer, length, offset = 0) - fiber = Fiber.current - - if timeout = io.timeout - timer = @timers.after(timeout) do - fiber.raise(::IO::TimeoutError, "Timeout (#{timeout}s) while waiting for IO to become readable!") - end - end - - @selector.io_read(fiber, io, buffer, length, offset) - ensure - timer&.cancel! - end - - if RUBY_ENGINE != "ruby" || RUBY_VERSION >= "3.3.1" - # Write the specified buffer to the IO. - # - # @public Since *Async v2* and *Ruby v3.3.1* with `IO::Buffer` support. - # @asynchronous May be non-blocking. - # - # @parameter io [IO] The IO object to write to. - # @parameter buffer [IO::Buffer] The buffer to write from. - # @parameter length [Integer] The minimum number of bytes to write. - # @parameter offset [Integer] The offset within the buffer to write from. - def io_write(io, buffer, length, offset = 0) - fiber = Fiber.current - - if timeout = io.timeout - timer = @timers.after(timeout) do - fiber.raise(::IO::TimeoutError, "Timeout (#{timeout}s) while waiting for IO to become writable!") - end - end - - @selector.io_write(fiber, io, buffer, length, offset) - ensure - timer&.cancel! - end - end - end - - # Wait for the specified process ID to exit. - # - # @public Since *Async v2*. - # @asynchronous May be non-blocking. - # - # @parameter pid [Integer] The process ID to wait for. - # @parameter flags [Integer] A bit-mask of flags suitable for `Process::Status.wait`. - # @returns [Process::Status] A process status instance. - # @asynchronous May be non-blocking.. - def process_wait(pid, flags) - return @selector.process_wait(Fiber.current, pid, flags) - end - - # Run one iteration of the event loop. - # - # When terminating the event loop, we already know we are finished. So we don't need to check the task tree. This is a logical requirement because `run_once` ignores transient tasks. For example, a single top level transient task is not enough to keep the reactor running, but during termination we must still process it in order to terminate child tasks. - # - # @parameter timeout [Float | Nil] The maximum timeout, or if nil, indefinite. - # @returns [Boolean] Whether there is more work to do. - private def run_once!(timeout = nil) - start_time = Async::Clock.now - - interval = @timers.wait_interval - - # If there is no interval to wait (thus no timers), and no tasks, we could be done: - if interval.nil? - # Allow the user to specify a maximum interval if we would otherwise be sleeping indefinitely: - interval = timeout - elsif interval < 0 - # We have timers ready to fire, don't sleep in the selctor: - interval = 0 - elsif timeout and interval > timeout - interval = timeout - end - - begin - @selector.select(interval) - rescue Errno::EINTR - # Ignore. - end - - @timers.fire - - # Compute load: - end_time = Async::Clock.now - total_duration = end_time - start_time - idle_duration = @selector.idle_duration - busy_duration = total_duration - idle_duration - - @busy_time += busy_duration - @idle_time += idle_duration - - # The reactor still has work to do: - return true - end - - # Run one iteration of the event loop. - # - # @public Since *Async v1*. - # @asynchronous Must be invoked from blocking (root) fiber. - # - # @parameter timeout [Float | Nil] The maximum timeout, or if nil, indefinite. - # @returns [Boolean] Whether there is more work to do. - def run_once(timeout = nil) - Kernel.raise "Running scheduler on non-blocking fiber!" unless Fiber.blocking? - - if self.finished? - self.stop - end - - # If we are finished, we stop the task tree and exit: - if @children.nil? - return false - end - - return run_once!(timeout) - end - - # Checks and clears the interrupted state of the scheduler. - # - # @returns [Boolean] Whether the reactor has been interrupted. - private def interrupted? - if @interrupted - @interrupted = false - return true - end - - if Thread.pending_interrupt? - return true - end - - return false - end - - # Stop all children, including transient children. - # - # @public Since *Async v1*. - def stop - @children&.each do |child| - child.stop - end - end - - private def run_loop(&block) - interrupt = nil - - begin - # In theory, we could use Exception here to be a little bit safer, but we've only shown the case for SignalException to be a problem, so let's not over-engineer this. - Thread.handle_interrupt(::SignalException => :never) do - until self.interrupted? - # If we are finished, we need to exit: - break unless yield - end - end - rescue Interrupt => interrupt - # If an interrupt did occur during an iteration of the event loop, we need to handle it. More specifically, `self.stop` is not safe to interrupt without potentially corrupting the task tree. - Thread.handle_interrupt(::SignalException => :never) do - Console.debug(self) do |buffer| - buffer.puts "Scheduler interrupted: #{interrupt.inspect}" - self.print_hierarchy(buffer) - end - - self.stop - end - - retry - end - - # If the event loop was interrupted, and we finished exiting normally (due to the interrupt), we need to re-raise the interrupt so that the caller can handle it too. - if interrupt - Kernel.raise(interrupt) - end - end - - # Run the reactor until all tasks are finished. Proxies arguments to {#async} immediately before entering the loop, if a block is provided. - # - # Forwards all parameters to {#async} if a block is given. - # - # @public Since *Async v1*. - # - # @yields {|task| ...} The top level task, if a block is given. - # @returns [Task] The initial task that was scheduled into the reactor. - def run(...) - Kernel.raise ClosedError if @selector.nil? - - begin - @profiler&.start - - initial_task = self.async(...) if block_given? - - self.run_loop do - run_once - end - - return initial_task - ensure - @profiler&.stop - end - end - - # Start an asynchronous task within the specified reactor. The task will be executed until the first blocking call, at which point it will yield and and this method will return. - # - # @public Since *Async v1*. - # @asynchronous May context switch immediately to new task. - # @deprecated Use {#run} or {Task#async} instead. - # - # @yields {|task| ...} Executed within the task. - # @returns [Task] The task that was scheduled into the reactor. - def async(*arguments, **options, &block) - # warn "Async::Scheduler#async is deprecated. Use `run` or `Task#async` instead.", uplevel: 1, category: :deprecated - - Kernel.raise ClosedError if @selector.nil? - - task = Task.new(Task.current? || self, **options, &block) - - task.run(*arguments) - - return task - end - - def fiber(...) - return async(...).fiber - end - - # Invoke the block, but after the specified timeout, raise {TimeoutError} in any currenly blocking operation. If the block runs to completion before the timeout occurs or there are no non-blocking operations after the timeout expires, the code will complete without any exception. - # - # @public Since *Async v1*. - # @asynchronous May raise an exception at any interruption point (e.g. blocking operations). - # - # @parameter duration [Numeric] The time in seconds, in which the task should complete. - # @parameter exception [Class] The exception class to raise. - # @parameter message [String] The message to pass to the exception. - # @yields {|timeout| ...} The block to execute with a timeout. - def with_timeout(duration, exception = TimeoutError, message = "execution expired", &block) - fiber = Fiber.current - - timer = @timers.after(duration) do - if fiber.alive? - fiber.raise(exception, message) - end - end - - if block.arity.zero? - yield - else - yield Timeout.new(@timers, timer) - end - ensure - timer&.cancel! - end - - # Invoke the block, but after the specified timeout, raise the specified exception with the given message. If the block runs to completion before the timeout occurs or there are no non-blocking operations after the timeout expires, the code will complete without any exception. - # - # @public Since *Async v1* and *Ruby v3.1*. May be invoked from `Timeout.timeout`. - # @asynchronous May raise an exception at any interruption point (e.g. blocking operations). - # - # @parameter duration [Numeric] The time in seconds, in which the task should complete. - # @parameter exception [Class] The exception class to raise. - # @parameter message [String] The message to pass to the exception. - # @yields {|duration| ...} The block to execute with a timeout. - def timeout_after(duration, exception, message, &block) - with_timeout(duration, exception, message) do - yield duration - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/semaphore.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/semaphore.md deleted file mode 100644 index 2524693d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/semaphore.md +++ /dev/null @@ -1,41 +0,0 @@ -A synchronization primitive, which limits access to a given resource, such as a limited number of database connections, open files, or network connections. - -## Example - -~~~ ruby -require 'async' -require 'async/semaphore' -require 'net/http' - -Sync do - # Only allow two concurrent tasks at a time: - semaphore = Async::Semaphore.new(2) - - # Generate an array of 10 numbers: - terms = ['ruby', 'python', 'go', 'java', 'c++'] - - # Search for the terms: - terms.each do |term| - semaphore.async do |task| - Console.info("Searching for #{term}...") - response = Net::HTTP.get(URI "https://www.google.com/search?q=#{term}") - Console.info("Got response #{response.size} bytes.") - end - end -end -~~~ - -### Output - -~~~ -0.0s info: Searching for ruby... [ec=0x3c] [pid=50523] -0.04s info: Searching for python... [ec=0x21c] [pid=50523] -1.7s info: Got response 182435 bytes. [ec=0x3c] [pid=50523] -1.71s info: Searching for go... [ec=0x834] [pid=50523] -3.0s info: Got response 204854 bytes. [ec=0x21c] [pid=50523] -3.0s info: Searching for java... [ec=0xf64] [pid=50523] -4.32s info: Got response 103235 bytes. [ec=0x834] [pid=50523] -4.32s info: Searching for c++... [ec=0x12d4] [pid=50523] -4.65s info: Got response 109697 bytes. [ec=0xf64] [pid=50523] -6.64s info: Got response 87249 bytes. [ec=0x12d4] [pid=50523] -~~~ diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/semaphore.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/semaphore.rb deleted file mode 100644 index cf307ab8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/semaphore.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2018-2024, by Samuel Williams. - -require_relative "list" - -module Async - # A synchronization primitive, which limits access to a given resource. - # @public Since *Async v1*. - class Semaphore - # @parameter limit [Integer] The maximum number of times the semaphore can be acquired before it blocks. - # @parameter parent [Task | Semaphore | Nil] The parent for holding any children tasks. - def initialize(limit = 1, parent: nil) - @count = 0 - @limit = limit - @waiting = List.new - - @parent = parent - end - - # The current number of tasks that have acquired the semaphore. - attr :count - - # The maximum number of tasks that can acquire the semaphore. - attr :limit - - # The tasks waiting on this semaphore. - attr :waiting - - # Allow setting the limit. This is useful for cases where the semaphore is used to limit the number of concurrent tasks, but the number of tasks is not known in advance or needs to be modified. - # - # On increasing the limit, some tasks may be immediately resumed. On decreasing the limit, some tasks may execute until the count is < than the limit. - # - # @parameter limit [Integer] The new limit. - def limit= limit - difference = limit - @limit - @limit = limit - - # We can't suspend - if difference > 0 - difference.times do - break unless node = @waiting.first - - node.resume - end - end - end - - # Is the semaphore currently acquired? - def empty? - @count.zero? - end - - # Whether trying to acquire this semaphore would block. - def blocking? - @count >= @limit - end - - # Run an async task. Will wait until the semaphore is ready until spawning and running the task. - def async(*arguments, parent: (@parent or Task.current), **options) - wait - - parent.async(**options) do |task| - @count += 1 - - begin - yield task, *arguments - ensure - self.release - end - end - end - - # Acquire the semaphore, block if we are at the limit. - # If no block is provided, you must call release manually. - # @yields {...} When the semaphore can be acquired. - # @returns The result of the block if invoked. - def acquire - wait - - @count += 1 - - return unless block_given? - - begin - return yield - ensure - self.release - end - end - - # Release the semaphore. Must match up with a corresponding call to `acquire`. Will release waiting fibers in FIFO order. - def release - @count -= 1 - - while (@limit - @count) > 0 and node = @waiting.first - node.resume - end - end - - private - - class FiberNode < List::Node - def initialize(fiber) - @fiber = fiber - end - - def resume - if @fiber.alive? - Fiber.scheduler.resume(@fiber) - end - end - end - - private_constant :FiberNode - - # Wait until the semaphore becomes available. - def wait - return unless blocking? - - @waiting.stack(FiberNode.new(Fiber.current)) do - Fiber.scheduler.transfer while blocking? - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/task.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/task.md deleted file mode 100644 index 43893725..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/task.md +++ /dev/null @@ -1,30 +0,0 @@ -A sequence of instructions, defined by a block, which is executed sequentially and managed by the scheduler. A task can be in one of the following states: `initialized`, `running`, `completed`, `failed`, `cancelled` or `stopped`. - -```mermaid -stateDiagram-v2 -[*] --> Initialized -Initialized --> Running : Run - -Running --> Completed : Return Value -Running --> Failed : Exception - -Completed --> [*] -Failed --> [*] - -Running --> Stopped : Stop -Stopped --> [*] -Completed --> Stopped : Stop -Failed --> Stopped : Stop -Initialized --> Stopped : Stop -``` - -## Example - -```ruby -require 'async' - -# Create an asynchronous task that sleeps for 1 second: -Async do |task| - sleep(1) -end -``` diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/task.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/task.rb deleted file mode 100644 index e3c06afa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/task.rb +++ /dev/null @@ -1,459 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2017-2024, by Samuel Williams. -# Copyright, 2017, by Kent Gruber. -# Copyright, 2017, by Devin Christensen. -# Copyright, 2020, by Patrik Wenger. -# Copyright, 2023, by Math Ieu. - -require "fiber" -require "console" - -require_relative "node" -require_relative "condition" - -Fiber.attr_accessor :async_task - -module Async - # Raised when a task is explicitly stopped. - class Stop < Exception - # Used to defer stopping the current task until later. - class Later - # Create a new stop later operation. - # - # @parameter task [Task] The task to stop later. - def initialize(task) - @task = task - end - - # @returns [Boolean] Whether the task is alive. - def alive? - true - end - - # Transfer control to the operation - this will stop the task. - def transfer - @task.stop - end - end - end - - # Raised if a timeout occurs on a specific Fiber. Handled gracefully by `Task`. - # @public Since *Async v1*. - class TimeoutError < StandardError - # Create a new timeout error. - # - # @parameter message [String] The error message. - def initialize(message = "execution expired") - super - end - end - - # @public Since *Async v1*. - class Task < Node - # Raised when a child task is created within a task that has finished execution. - class FinishedError < RuntimeError - # Create a new finished error. - # - # @parameter message [String] The error message. - def initialize(message = "Cannot create child task within a task that has finished execution!") - super - end - end - - # @deprecated With no replacement. - def self.yield - Fiber.scheduler.transfer - end - - # Run the given block of code in a task, asynchronously, in the given scheduler. - def self.run(scheduler, *arguments, **options, &block) - self.new(scheduler, **options, &block).tap do |task| - task.run(*arguments) - end - end - - # Create a new task. - # @parameter reactor [Reactor] the reactor this task will run within. - # @parameter parent [Task] the parent task. - def initialize(parent = Task.current?, finished: nil, **options, &block) - super(parent, **options) - - # These instance variables are critical to the state of the task. - # In the initialized state, the @block should be set, but the @fiber should be nil. - # In the running state, the @fiber should be set. - # In a finished state, the @block should be nil, and the @fiber should be nil. - @block = block - @fiber = nil - - @status = :initialized - @result = nil - @finished = finished - - @defer_stop = nil - end - - # @returns [Scheduler] The scheduler for this task. - def reactor - self.root - end - - # @returns [Array(Thread::Backtrace::Location) | Nil] The backtrace of the task, if available. - def backtrace(*arguments) - @fiber&.backtrace(*arguments) - end - - # Annotate the task with a description. - # - # This will internally try to annotate the fiber if it is running, otherwise it will annotate the task itself. - # - # @parameter annotation [String] The description to annotate the task with. - def annotate(annotation, &block) - if @fiber - @fiber.annotate(annotation, &block) - else - super - end - end - - # @returns [Object] The annotation of the task. - def annotation - if @fiber - @fiber.annotation - else - super - end - end - - # @returns [String] A description of the task and it's current status. - def to_s - "\#<#{self.description} (#{@status})>" - end - - # @deprecated Prefer {Kernel#sleep} except when compatibility with `stable-v1` is required. - def sleep(duration = nil) - super - end - - # Execute the given block of code, raising the specified exception if it exceeds the given duration during a non-blocking operation. - def with_timeout(duration, exception = TimeoutError, message = "execution expired", &block) - Fiber.scheduler.with_timeout(duration, exception, message, &block) - end - - # Yield back to the reactor and allow other fibers to execute. - def yield - Fiber.scheduler.yield - end - - # @attribute [Fiber] The fiber which is being used for the execution of this task. - attr :fiber - - # @returns [Boolean] Whether the internal fiber is alive, i.e. it is actively executing. - def alive? - @fiber&.alive? - end - - # Whether we can remove this node from the reactor graph. - # @returns [Boolean] - def finished? - # If the block is nil and the fiber is nil, it means the task has finished execution. This becomes true after `finish!` is called. - super && @block.nil? && @fiber.nil? - end - - # @returns [Boolean] Whether the task is running. - def running? - @status == :running - end - - # @returns [Boolean] Whether the task failed with an exception. - def failed? - @status == :failed - end - - # @returns [Boolean] Whether the task has been stopped. - def stopped? - @status == :stopped - end - - # @returns [Boolean] Whether the task has completed execution and generated a result. - def completed? - @status == :completed - end - - # Alias for {#completed?}. - def complete? - self.completed? - end - - # @attribute [Symbol] The status of the execution of the task, one of `:initialized`, `:running`, `:complete`, `:stopped` or `:failed`. - attr :status - - # Begin the execution of the task. - # - # @raises [RuntimeError] If the task is already running. - def run(*arguments) - if @status == :initialized - @status = :running - - schedule do - @block.call(self, *arguments) - rescue => error - # I'm not completely happy with this overhead, but the alternative is to not log anything which makes debugging extremely difficult. Maybe we can introduce a debug wrapper which adds extra logging. - if @finished.nil? - warn(self, "Task may have ended with unhandled exception.", exception: error) - end - - raise - end - else - raise RuntimeError, "Task already running!" - end - end - - # Run an asynchronous task as a child of the current task. - # - # @public Since *Async v1*. - # @asynchronous May context switch immediately to the new task. - # - # @yields {|task| ...} in the context of the new task. - # @raises [FinishedError] If the task has already finished. - # @returns [Task] The child task. - def async(*arguments, **options, &block) - raise FinishedError if self.finished? - - task = Task.new(self, **options, &block) - - # When calling an async block, we deterministically execute it until the first blocking operation. We don't *have* to do this - we could schedule it for later execution, but it's useful to: - # - # - Fail at the point of the method call where possible. - # - Execute determinstically where possible. - # - Avoid scheduler overhead if no blocking operation is performed. - # - # There are different strategies (greedy vs non-greedy). We are currently using a greedy strategy. - task.run(*arguments) - - return task - end - - # Retrieve the current result of the task. Will cause the caller to wait until result is available. If the task resulted in an unhandled error (derived from `StandardError`), this will be raised. If the task was stopped, this will return `nil`. - # - # Conceptually speaking, waiting on a task should return a result, and if it throws an exception, this is certainly an exceptional case that should represent a failure in your program, not an expected outcome. In other words, you should not design your programs to expect exceptions from `#wait` as a normal flow control, and prefer to catch known exceptions within the task itself and return a result that captures the intention of the failure, e.g. a `TimeoutError` might simply return `nil` or `false` to indicate that the operation did not generate a valid result (as a timeout was an expected outcome of the internal operation in this case). - # - # @raises [RuntimeError] If the task's fiber is the current fiber. - # @returns [Object] The final expression/result of the task's block. - def wait - raise "Cannot wait on own fiber!" if Fiber.current.equal?(@fiber) - - # `finish!` will set both of these to nil before signaling the condition: - if @block || @fiber - @finished ||= Condition.new - @finished.wait - end - - if @status == :failed - raise @result - else - return @result - end - end - - # Access the result of the task without waiting. May be nil if the task is not completed. Does not raise exceptions. - attr :result - - # Stop the task and all of its children. - # - # If `later` is false, it means that `stop` has been invoked directly. When `later` is true, it means that `stop` is invoked by `stop_children` or some other indirect mechanism. In that case, if we encounter the "current" fiber, we can't stop it right away, as it's currently performing `#stop`. Stopping it immediately would interrupt the current stop traversal, so we need to schedule the stop to occur later. - # - # @parameter later [Boolean] Whether to stop the task later, or immediately. - def stop(later = false) - if self.stopped? - # If the task is already stopped, a `stop` state transition re-enters the same state which is a no-op. However, we will also attempt to stop any running children too. This can happen if the children did not stop correctly the first time around. Doing this should probably be considered a bug, but it's better to be safe than sorry. - return stopped! - end - - # If the fiber is alive, we need to stop it: - if @fiber&.alive? - # As the task is now exiting, we want to ensure the event loop continues to execute until the task finishes. - self.transient = false - - # If we are deferring stop... - if @defer_stop == false - # Don't stop now... but update the state so we know we need to stop later. - @defer_stop = true - return false - end - - if self.current? - # If the fiber is current, and later is `true`, we need to schedule the fiber to be stopped later, as it's currently invoking `stop`: - if later - # If the fiber is the current fiber and we want to stop it later, schedule it: - Fiber.scheduler.push(Stop::Later.new(self)) - else - # Otherwise, raise the exception directly: - raise Stop, "Stopping current task!" - end - else - # If the fiber is not curent, we can raise the exception directly: - begin - # There is a chance that this will stop the fiber that originally called stop. If that happens, the exception handling in `#stopped` will rescue the exception and re-raise it later. - Fiber.scheduler.raise(@fiber, Stop) - rescue FiberError - # In some cases, this can cause a FiberError (it might be resumed already), so we schedule it to be stopped later: - Fiber.scheduler.push(Stop::Later.new(self)) - end - end - else - # We are not running, but children might be, so transition directly into stopped state: - stop! - end - end - - # Defer the handling of stop. During the execution of the given block, if a stop is requested, it will be deferred until the block exits. This is useful for ensuring graceful shutdown of servers and other long-running tasks. You should wrap the response handling code in a defer_stop block to ensure that the task is stopped when the response is complete but not before. - # - # You can nest calls to defer_stop, but the stop will only be deferred until the outermost block exits. - # - # If stop is invoked a second time, it will be immediately executed. - # - # @yields {} The block of code to execute. - # @public Since *Async v1*. - def defer_stop - # Tri-state variable for controlling stop: - # - nil: defer_stop has not been called. - # - false: defer_stop has been called and we are not stopping. - # - true: defer_stop has been called and we will stop when exiting the block. - if @defer_stop.nil? - begin - # If we are not deferring stop already, we can defer it now: - @defer_stop = false - - yield - rescue Stop - # If we are exiting due to a stop, we shouldn't try to invoke stop again: - @defer_stop = nil - raise - ensure - defer_stop = @defer_stop - - # We need to ensure the state is reset before we exit the block: - @defer_stop = nil - - # If we were asked to stop, we should do so now: - if defer_stop - raise Stop, "Stopping current task (was deferred)!" - end - end - else - # If we are deferring stop already, entering it again is a no-op. - yield - end - end - - # @returns [Boolean] Whether stop has been deferred. - def stop_deferred? - @defer_stop - end - - # Lookup the {Task} for the current fiber. Raise `RuntimeError` if none is available. - # @returns [Task] - # @raises[RuntimeError] If task was not {set!} for the current fiber. - def self.current - Fiber.current.async_task or raise RuntimeError, "No async task available!" - end - - # Check if there is a task defined for the current fiber. - # @returns [Interface(:async) | Nil] - def self.current? - Fiber.current.async_task - end - - # @returns [Boolean] Whether this task is the currently executing task. - def current? - Fiber.current.equal?(@fiber) - end - - private - - def warn(...) - Console.warn(...) - end - - # Finish the current task, moving any children to the parent. - def finish! - # Don't hold references to the fiber or block after the task has finished: - @fiber = nil - @block = nil # If some how we went directly from initialized to finished. - - # Attempt to remove this node from the task tree. - consume - - # If this task was being used as a future, signal completion here: - if @finished - @finished.signal(self) - @finished = nil - end - end - - # State transition into the completed state. - def completed!(result) - @result = result - @status = :completed - end - - # State transition into the failed state. - def failed!(exception = false) - @result = exception - @status = :failed - end - - def stopped! - # Console.info(self, status:) {"Task #{self} was stopped with #{@children&.size.inspect} children!"} - @status = :stopped - - stopped = false - - begin - # We are not running, but children might be so we should stop them: - stop_children(true) - rescue Stop - stopped = true - # If we are stopping children, and one of them tries to stop the current task, we should ignore it. We will be stopped later. - retry - end - - if stopped - raise Stop, "Stopping current task!" - end - end - - def stop! - stopped! - - finish! - end - - def schedule(&block) - @fiber = Fiber.new(annotation: self.annotation) do - begin - completed!(yield) - rescue Stop - stopped! - rescue StandardError => error - failed!(error) - rescue Exception => exception - failed!(exception) - - # This is a critical failure, we should stop the reactor: - raise - ensure - # Console.info(self) {"Task ensure $! = #{$!} with #{@children&.size.inspect} children!"} - finish! - end - end - - @fiber.async_task = self - - self.root.resume(@fiber) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/timeout.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/timeout.rb deleted file mode 100644 index 412aeeef..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/timeout.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2025, by Samuel Williams. - -module Async - # Represents a flexible timeout that can be rescheduled or extended. - # @public Since *Async v2.24*. - class Timeout - # Initialize a new timeout. - def initialize(timers, handle) - @timers = timers - @handle = handle - end - - # @returns [Numeric] The time remaining until the timeout occurs, in seconds. - def duration - @handle.time - @timers.now - end - - # Update the duration of the timeout. - # - # The duration is relative to the current time, e.g. setting the duration to 5 means the timeout will occur in 5 seconds from now. - # - # @parameter value [Numeric] The new duration to assign to the timeout, in seconds. - def duration=(value) - self.reschedule(@timers.now + value) - end - - # Adjust the timeout by the specified duration. - # - # The duration is relative to the timeout time, e.g. adjusting the timeout by 5 increases the current duration by 5 seconds. - # - # @parameter duration [Numeric] The duration to adjust the timeout by, in seconds. - # @returns [Numeric] The new time at which the timeout will occur. - def adjust(duration) - self.reschedule(time + duration) - end - - # @returns [Numeric] The time at which the timeout will occur, in seconds since {now}. - def time - @handle.time - end - - # Assign a new time to the timeout, rescheduling it if necessary. - # - # @parameter value [Numeric] The new time to assign to the timeout. - # @returns [Numeric] The new time at which the timeout will occur. - def time=(value) - self.reschedule(value) - end - - # @returns [Numeric] The current time in the scheduler, relative to the time of this timeout, in seconds. - def now - @timers.now - end - - # Cancel the timeout, preventing it from executing. - def cancel! - @handle.cancel! - end - - # @returns [Boolean] Whether the timeout has been cancelled. - def cancelled? - @handle.cancelled? - end - - # Raised when attempting to reschedule a cancelled timeout. - class CancelledError < RuntimeError - end - - # Reschedule the timeout to occur at the specified time. - # - # @parameter time [Numeric] The new time to schedule the timeout for. - # @returns [Numeric] The new time at which the timeout will occur. - private def reschedule(time) - if block = @handle&.block - @handle.cancel! - - @handle = @timers.schedule(time, block) - - return time - else - raise CancelledError, "Cannot reschedule a cancelled timeout!" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/variable.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/variable.rb deleted file mode 100644 index 9dffc550..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/variable.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2021-2024, by Samuel Williams. - -require_relative "condition" - -module Async - # A synchronization primitive that allows one task to wait for another task to resolve a value. - class Variable - # Create a new variable. - # - # @parameter condition [Condition] The condition to use for synchronization. - def initialize(condition = Condition.new) - @condition = condition - @value = nil - end - - # Resolve the value. - # - # Signals all waiting tasks. - # - # @parameter value [Object] The value to resolve. - def resolve(value = true) - @value = value - condition = @condition - @condition = nil - - self.freeze - - condition.signal(value) - end - - # Alias for {#resolve}. - def value=(value) - self.resolve(value) - end - - # Whether the value has been resolved. - # - # @returns [Boolean] Whether the value has been resolved. - def resolved? - @condition.nil? - end - - # Wait for the value to be resolved. - # - # @returns [Object] The resolved value. - def wait - @condition&.wait - return @value - end - - # Alias for {#wait}. - def value - self.wait - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/version.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/version.rb deleted file mode 100644 index a1c640fc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/version.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2017-2024, by Samuel Williams. - -module Async - VERSION = "2.24.0" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/waiter.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/waiter.md deleted file mode 100644 index 3a1270cb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/waiter.md +++ /dev/null @@ -1,50 +0,0 @@ -A synchronization primitive, which allows you to wait for tasks to complete in order of completion. This is useful for implementing a task pool, where you want to wait for the first task to complete, and then cancel the rest. - -If you try to wait for more things than you have added, you will deadlock. - -## Example - -~~~ ruby -require 'async' -require 'async/semaphore' -require 'async/barrier' -require 'async/waiter' - -Sync do - barrier = Async::Barrier.new - waiter = Async::Waiter.new(parent: barrier) - semaphore = Async::Semaphore.new(2, parent: waiter) - - # Sleep sort the numbers: - generator = Async do - while true - semaphore.async do |task| - number = rand(1..10) - sleep(number) - end - end - end - - numbers = [] - - 4.times do - # Wait for all the numbers to be sorted: - numbers << waiter.wait - end - - # Don't generate any more numbers: - generator.stop - - # Stop all tasks which we don't care about: - barrier.stop - - Console.info("Smallest", numbers) -end -~~~ - -### Output - -~~~ -0.0s info: Smallest - | [3, 3, 1, 2] -~~~ diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/waiter.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/waiter.rb deleted file mode 100644 index 7f1608aa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/waiter.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022-2024, by Samuel Williams. -# Copyright, 2024, by Patrik Wenger. - -module Async - # A composable synchronization primitive, which allows one task to wait for a number of other tasks to complete. It can be used in conjunction with {Semaphore} and/or {Barrier}. - class Waiter - # Create a waiter instance. - # - # @parameter parent [Interface(:async) | Nil] The parent task to use for asynchronous operations. - # @parameter finished [Async::Condition] The condition to signal when a task completes. - def initialize(parent: nil, finished: Async::Condition.new) - @finished = finished - @done = [] - - @parent = parent - end - - # Execute a child task and add it to the waiter. - # @asynchronous Executes the given block concurrently. - def async(parent: (@parent or Task.current), **options, &block) - parent.async(**options) do |task| - yield(task) - ensure - @done << task - @finished.signal - end - end - - # Wait for the first `count` tasks to complete. - # @parameter count [Integer | Nil] The number of tasks to wait for. - # @returns [Array(Async::Task)] If an integer is given, the tasks which have completed. - # @returns [Async::Task] Otherwise, the first task to complete. - def first(count = nil) - minimum = count || 1 - - while @done.size < minimum - @finished.wait - end - - return @done.shift(*count) - end - - # Wait for the first `count` tasks to complete. - # @parameter count [Integer | Nil] The number of tasks to wait for. - def wait(count = nil) - if count - first(count).map(&:wait) - else - first.wait - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/worker_pool.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/worker_pool.rb deleted file mode 100644 index ca931db3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/async/worker_pool.rb +++ /dev/null @@ -1,182 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024, by Samuel Williams. - -require "etc" - -module Async - # A simple work pool that offloads work to a background thread. - # - # @private - class WorkerPool - # Used to augment the scheduler to add support for blocking operations. - module BlockingOperationWait - # Wait for the given work to be executed. - # - # @public Since *Async v2.21* and *Ruby v3.4*. - # @asynchronous May be non-blocking. - # - # @parameter work [Proc] The work to execute on a background thread. - # @returns [Object] The result of the work. - def blocking_operation_wait(work) - @worker_pool.call(work) - end - end - - # Execute the given work in a background thread. - class Promise - # Create a new promise. - # - # @parameter work [Proc] The work to be done. - def initialize(work) - @work = work - @state = :pending - @value = nil - @guard = ::Mutex.new - @condition = ::ConditionVariable.new - @thread = nil - end - - # Execute the work and resolve the promise. - def call - work = nil - - @guard.synchronize do - @thread = ::Thread.current - - return unless work = @work - end - - resolve(work.call) - rescue Exception => error - reject(error) - end - - private def resolve(value) - @guard.synchronize do - @work = nil - @thread = nil - @value = value - @state = :resolved - @condition.broadcast - end - end - - private def reject(error) - @guard.synchronize do - @work = nil - @thread = nil - @value = error - @state = :failed - @condition.broadcast - end - end - - # Cancel the work and raise an exception in the background thread. - def cancel - return unless @work - - @guard.synchronize do - @work = nil - @state = :cancelled - @thread&.raise(Interrupt) - end - end - - # Wait for the work to be done. - # - # @returns [Object] The result of the work. - def wait - @guard.synchronize do - while @state == :pending - @condition.wait(@guard) - end - - if @state == :failed - raise @value - else - return @value - end - end - end - end - - # A background worker thread. - class Worker - # Create a new worker. - def initialize - @work = ::Thread::Queue.new - @thread = ::Thread.new(&method(:run)) - end - - # Execute work until the queue is closed. - def run - while work = @work.pop - work.call - end - end - - # Close the worker thread. - def close - if thread = @thread - @thread = nil - thread.kill - end - end - - # Call the work and notify the scheduler when it is done. - def call(work) - promise = Promise.new(work) - - @work.push(promise) - - begin - return promise.wait - ensure - promise.cancel - end - end - end - - # Create a new work pool. - # - # @parameter size [Integer] The number of threads to use. - def initialize(size: Etc.nprocessors) - @ready = ::Thread::Queue.new - - size.times do - @ready.push(Worker.new) - end - end - - # Close the work pool. Kills all outstanding work. - def close - if ready = @ready - @ready = nil - ready.close - - while worker = ready.pop - worker.close - end - end - end - - # Offload work to a thread. - # - # @parameter work [Proc] The work to be done. - def call(work) - if ready = @ready - worker = ready.pop - - begin - worker.call(work) - ensure - ready.push(worker) - end - else - raise RuntimeError, "No worker available!" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/kernel/async.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/kernel/async.rb deleted file mode 100644 index 46c41c96..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/kernel/async.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2024, by Samuel Williams. - -require_relative "../async/reactor" - -module Kernel - # Run the given block of code in a task, asynchronously, creating a reactor if necessary. - # - # The preferred method to invoke asynchronous behavior at the top level. - # - # - When invoked within an existing reactor task, it will run the given block - # asynchronously. Will return the task once it has been scheduled. - # - When invoked at the top level, will create and run a reactor, and invoke - # the block as an asynchronous task. Will block until the reactor finishes - # running. - # - # @yields {|task| ...} The block that will execute asynchronously. - # @parameter task [Async::Task] The task that is executing the given block. - # - # @public Since *Async v1*. - # @asynchronous May block until given block completes executing. - def Async(...) - if current = ::Async::Task.current? - return current.async(...) - elsif scheduler = Fiber.scheduler - ::Async::Task.run(scheduler, ...) - else - # This calls Fiber.set_scheduler(self): - reactor = ::Async::Reactor.new - - begin - return reactor.run(...) - ensure - Fiber.set_scheduler(nil) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/kernel/sync.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/kernel/sync.rb deleted file mode 100644 index ee38fe44..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/kernel/sync.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2024, by Samuel Williams. -# Copyright, 2020, by Brian Morearty. -# Copyright, 2024, by Patrik Wenger. - -require_relative "../async/reactor" - -# Extensions to all Ruby objects. -module Kernel - # Run the given block of code synchronously, but within a reactor if not already in one. - # - # @yields {|task| ...} The block that will execute asynchronously. - # @parameter task [Async::Task] The task that is executing the given block. - # - # @public Since *Async v1*. - # @asynchronous Will block until given block completes executing. - def Sync(annotation: nil, &block) - if task = ::Async::Task.current? - if annotation - task.annotate(annotation) {yield task} - else - yield task - end - elsif scheduler = Fiber.scheduler - ::Async::Task.run(scheduler, &block).wait - else - # This calls Fiber.set_scheduler(self): - reactor = Async::Reactor.new - - begin - return reactor.run(annotation: annotation, finished: ::Async::Condition.new, &block).wait - ensure - Fiber.set_scheduler(nil) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/metrics/provider/async.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/metrics/provider/async.rb deleted file mode 100644 index a4252d48..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/metrics/provider/async.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024, by Samuel Williams. - -require_relative "async/task" diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/metrics/provider/async/task.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/metrics/provider/async/task.rb deleted file mode 100644 index 29b3e8a7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/metrics/provider/async/task.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024, by Samuel Williams. - -require_relative "../../../async/task" -require "metrics/provider" - -Metrics::Provider(Async::Task) do - ASYNC_TASK_SCHEDULED = Metrics.metric("async.task.scheduled", :counter, description: "The number of tasks scheduled.") - ASYNC_TASK_FINISHED = Metrics.metric("async.task.finished", :counter, description: "The number of tasks finished.") - - def schedule(&block) - ASYNC_TASK_SCHEDULED.emit(1) - - super(&block) - ensure - ASYNC_TASK_FINISHED.emit(1) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async.rb deleted file mode 100644 index ba4de707..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024, by Samuel Williams. - -require_relative "async/task" -require_relative "async/barrier" diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async/barrier.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async/barrier.rb deleted file mode 100644 index ffa6721a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async/barrier.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022, by Samuel Williams. - -require_relative "../../../async/barrier" -require "traces/provider" - -Traces::Provider(Async::Barrier) do - def wait - attributes = { - "size" => self.size - } - - Traces.trace("async.barrier.wait", attributes: attributes) {super} - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async/task.rb b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async/task.rb deleted file mode 100644 index c7c5fd55..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/lib/traces/provider/async/task.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022, by Samuel Williams. - -require_relative "../../../async/task" -require "traces/provider" - -Traces::Provider(Async::Task) do - def schedule(&block) - # If we are not actively tracing anything, then we can skip this: - unless Traces.active? - return super(&block) - end - - unless self.transient? - trace_context = Traces.trace_context - end - - attributes = { - # We use the instance variable as it corresponds to the user-provided block. - "block" => @block, - "transient" => self.transient?, - } - - # Run the trace in the context of the child task: - super do - Traces.trace_context = trace_context - - if annotation = self.annotation - attributes["annotation"] = annotation - end - - Traces.trace("async.task", attributes: attributes) do - # Yes, this is correct, we already called super above: - yield - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/license.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/license.md deleted file mode 100644 index 7e747023..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/license.md +++ /dev/null @@ -1,47 +0,0 @@ -# MIT License - -Copyright, 2017-2024, by Samuel Williams. -Copyright, 2017, by Kent Gruber. -Copyright, 2017, by Devin Christensen. -Copyright, 2018, by Sokolov Yura. -Copyright, 2018, by Jiang Jinyang. -Copyright, 2019, by Jeremy Jung. -Copyright, 2019, by Ryan Musgrave. -Copyright, 2020-2023, by Olle Jonsson. -Copyright, 2020, by Salim Semaoune. -Copyright, 2020, by Brian Morearty. -Copyright, 2020, by Stefan Wrobel. -Copyright, 2020-2024, by Patrik Wenger. -Copyright, 2020, by Ken Muryoi. -Copyright, 2020, by Jun Jiang. -Copyright, 2020-2022, by Bruno Sutic. -Copyright, 2021, by Julien Portalier. -Copyright, 2022, by Shannon Skipper. -Copyright, 2022, by Masafumi Okura. -Copyright, 2022, by Trevor Turk. -Copyright, 2022, by Masayuki Yamamoto. -Copyright, 2023, by Leon Löchner. -Copyright, 2023, by Colin Kelley. -Copyright, 2023, by Math Ieu. -Copyright, 2023, by Emil Tin. -Copyright, 2023, by Gert Goet. -Copyright, 2024, by Dimitar Peychinov. -Copyright, 2024, by Jamie McCarthy. - -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/bundle/ruby/3.2.0/gems/async-2.24.0/readme.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/readme.md deleted file mode 100644 index 1b8244de..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# ![Async](assets/logo.webp) - -Async is a composable asynchronous I/O framework for Ruby based on [io-event](https://github.com/socketry/io-event). - -> "Lately I've been looking into `async`, as one of my projects – -> [tus-ruby-server](https://github.com/janko/tus-ruby-server) – would really benefit from non-blocking I/O. It's really -> beautifully designed." *– [janko](https://github.com/janko)* - -[![Development Status](https://github.com/socketry/async/workflows/Test/badge.svg)](https://github.com/socketry/async/actions?workflow=Test) - -## Features - - - Scalable event-driven I/O for Ruby. Thousands of clients per process\! - - Light weight fiber-based concurrency. No need for callbacks\! - - Multi-thread/process containers for parallelism. - - Growing eco-system of event-driven components. - -## Usage - -Please see the [project documentation](https://socketry.github.io/async/) for more details. - - - [Getting Started](https://socketry.github.io/async/guides/getting-started/index) - This guide shows how to add async to your project and run code asynchronously. - - - [Asynchronous Tasks](https://socketry.github.io/async/guides/asynchronous-tasks/index) - This guide explains how asynchronous tasks work and how to use them. - - - [Scheduler](https://socketry.github.io/async/guides/scheduler/index) - This guide gives an overview of how the scheduler is implemented. - - - [Compatibility](https://socketry.github.io/async/guides/compatibility/index) - This guide gives an overview of the compatibility of Async with Ruby and other frameworks. - - - [Best Practices](https://socketry.github.io/async/guides/best-practices/index) - This guide gives an overview of best practices for using Async. - - - [Debugging](https://socketry.github.io/async/guides/debugging/index) - This guide explains how to debug issues with programs that use Async. - -## Releases - -Please see the [project releases](https://socketry.github.io/async/releases/index) for all releases. - -### v2.24.0 - - - Ruby v3.1 support is dropped. - - `Async::Wrapper` which was previously deprecated, is now removed. - - [Flexible Timeouts](https://socketry.github.io/async/releases/index#flexible-timeouts) - -### v2.23.0 - - - Rename `ASYNC_SCHEDULER_DEFAULT_WORKER_POOL` to `ASYNC_SCHEDULER_WORKER_POOL`. - - [Fiber Stall Profiler](https://socketry.github.io/async/releases/index#fiber-stall-profiler) - -### v2.21.1 - - - [Worker Pool](https://socketry.github.io/async/releases/index#worker-pool) - -### v2.20.0 - - - [Traces and Metrics Providers](https://socketry.github.io/async/releases/index#traces-and-metrics-providers) - -### v2.19.0 - - - [Async::Scheduler Debugging](https://socketry.github.io/async/releases/index#async::scheduler-debugging) - - [Console Shims](https://socketry.github.io/async/releases/index#console-shims) - -### v2.18.0 - - - Add support for `Sync(annotation:)`, so that you can annotate the block with a description of what it does, even if it doesn't create a new task. - -### v2.17.0 - - - Introduce `Async::Queue#push` and `Async::Queue#pop` for compatibility with `::Queue`. - -### v2.16.0 - - - [Better Handling of Async and Sync in Nested Fibers](https://socketry.github.io/async/releases/index#better-handling-of-async-and-sync-in-nested-fibers) - -## See Also - - - [async-http](https://github.com/socketry/async-http) — Asynchronous HTTP client/server. - - [async-websocket](https://github.com/socketry/async-websocket) — Asynchronous client and server websockets. - - [async-dns](https://github.com/socketry/async-dns) — Asynchronous DNS resolver and server. - - [falcon](https://github.com/socketry/falcon) — A rack compatible server built on top of `async-http`. - - [rubydns](https://github.com/ioquatix/rubydns) — An easy to use Ruby DNS server. - - [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot) — A client for making slack bots. - -## Contributing - -We welcome contributions to this project. - -1. Fork it. -2. Create your feature branch (`git checkout -b my-new-feature`). -3. Commit your changes (`git commit -am 'Add some feature'`). -4. Push to the branch (`git push origin my-new-feature`). -5. Create new Pull Request. - -### Developer Certificate of Origin - -In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed. - -### Community Guidelines - -This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers. diff --git a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/releases.md b/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/releases.md deleted file mode 100644 index b044efaf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/async-2.24.0/releases.md +++ /dev/null @@ -1,154 +0,0 @@ -# Releases - -## v2.24.0 - - - Ruby v3.1 support is dropped. - - `Async::Wrapper` which was previously deprecated, is now removed. - -### Flexible Timeouts - -When {ruby Async::Scheduler\#with\_timeout} is invoked with a block, it can receive a {ruby Async::Timeout} instance. This allows you to adjust or cancel the timeout while the block is executing. This is useful for long-running tasks that may need to adjust their timeout based on external factors. - -``` ruby -Async do - Async::Scheduler.with_timeout(5) do |timeout| - # Do some work that may take a while... - - if some_condition - timeout.cancel! # Cancel the timeout - else - # Add 10 seconds to the current timeout: - timeout.adjust(10) - - # Reduce the timeout by 10 seconds: - timeout.adjust(-10) - - # Set the timeout to 10 seconds from now: - timeout.duration = 10 - - # Increase the current duration: - timeout.duration += 10 - end - end -end -``` - -## v2.23.0 - - - Rename `ASYNC_SCHEDULER_DEFAULT_WORKER_POOL` to `ASYNC_SCHEDULER_WORKER_POOL`. - -### Fiber Stall Profiler - -After several iterations of experimentation, we are officially introducing the fiber stall profiler, implemented using the optional `fiber-profiler` gem. This gem is not included by default, but can be added to your project: - -``` bash -$ bundle add fiber-profiler -``` - -After adding the gem, you can enable the fiber stall profiler by setting the `FIBER_PROFILER_CAPTURE=true` environment variable: - -``` bash -$ FIBER_PROFILER_CAPTURE=true bundle exec ruby -rasync -e 'Async{Fiber.blocking{sleep 0.1}}' -Fiber stalled for 0.105 seconds --e:1 in c-call '##blocking' (0.105s) - -e:1 in c-call 'Kernel#sleep' (0.105s) -Skipped 1 calls that were too short to be meaningful. -``` - -The fiber profiler will help you find problems with your code that cause the event loop to stall, which can be a common source of performance issues in asynchronous code. - -## v2.21.1 - -### Worker Pool - -Ruby 3.4 will feature a new fiber scheduler hook, `blocking_operation_wait` which allows the scheduler to redirect the work given to `rb_nogvl` to a worker pool. - -The Async scheduler optionally supports this feature using a worker pool, by using the following environment variable: - - ASYNC_SCHEDULER_WORKER_POOL=true - -This will cause the scheduler to use a worker pool for general blocking operations, rather than blocking the event loop. - -It should be noted that this isn't a net win, as the overhead of using a worker pool can be significant compared to the `rb_nogvl` work. As such, it is recommended to benchmark your application with and without the worker pool to determine if it is beneficial. - -## v2.20.0 - -### Traces and Metrics Providers - -Async now has [traces](https://github.com/socketry/traces) and [metrics](https://github.com/socketry/metrics) providers for various core classes. This allows you to emit traces and metrics to a suitable backend (including DataDog, New Relic, OpenTelemetry, etc.) for monitoring and debugging purposes. - -To take advantage of this feature, you will need to introduce your own `config/traces.rb` and `config/metrics.rb`. Async's own repository includes these files for testing purposes, you could copy them into your own project and modify them as needed. - -## v2.19.0 - -### Async::Scheduler Debugging - -Occasionally on issues, I encounter people asking for help and I need more information. Pressing Ctrl-C to exit a hung program is common, but it usually doesn't provide enough information to diagnose the problem. Setting the `CONSOLE_LEVEL=debug` environment variable will now print additional information about the scheduler when you interrupt it, including a backtrace of the current tasks. - - > CONSOLE_LEVEL=debug bundle exec ruby ./test.rb - ^C 0.0s debug: Async::Reactor [oid=0x974] [ec=0x988] [pid=9116] [2024-11-08 14:12:03 +1300] - | Scheduler interrupted: Interrupt - | # - | # - | → /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `transfer' - | /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `block' - | /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:207:in `kernel_sleep' - | /Users/samuel/Developer/socketry/async/test.rb:7:in `sleep' - | /Users/samuel/Developer/socketry/async/test.rb:7:in `sleepy' - | /Users/samuel/Developer/socketry/async/test.rb:12:in `block in ' - | /Users/samuel/Developer/socketry/async/lib/async/task.rb:197:in `block in run' - | /Users/samuel/Developer/socketry/async/lib/async/task.rb:420:in `block in schedule' - /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:317:in `select': Interrupt - ... (backtrace continues) ... - -This gives better visibility into what the scheduler is doing, and should help diagnose issues. - -### Console Shims - -The `async` gem depends on `console` gem, because my goal was to have good logging by default without thinking about it too much. However, some users prefer to avoid using the `console` gem for logging, so I've added an experimental set of shims which should allow you to bypass the `console` gem entirely. - -``` ruby -require 'async/console' -require 'async' - -Async{raise "Boom"} -``` - -Will now use `Kernel#warn` to print the task failure warning: - - # - Task may have ended with unhandled exception. - (irb):4:in `block in ': Boom (RuntimeError) - from /home/samuel/Developer/socketry/async/lib/async/task.rb:197:in `block in run' - from /home/samuel/Developer/socketry/async/lib/async/task.rb:420:in `block in schedule' - -## v2.18.0 - - - Add support for `Sync(annotation:)`, so that you can annotate the block with a description of what it does, even if it doesn't create a new task. - -## v2.17.0 - - - Introduce `Async::Queue#push` and `Async::Queue#pop` for compatibility with `::Queue`. - -## v2.16.0 - -### Better Handling of Async and Sync in Nested Fibers - -Interleaving bare fibers within `Async` and `Sync` blocks should not cause problems, but it presents a number of issues in the current implementation. Tracking the parent-child relationship between tasks, when they are interleaved with bare fibers, is difficult. The current implementation assumes that if there is no parent task, then it should create a new reactor. This is not always the case, as the parent task might not be visible due to nested Fibers. As a result, `Async` will create a new reactor, trying to stop the existing one, causing major internal consistency issues. - -I encountered this issue when trying to use `Async` within a streaming response in Rails. The `protocol-rack` [uses a normal fiber to wrap streaming responses](https://github.com/socketry/protocol-rack/blob/cb1ca44e9deadb9369bdb2ea03416556aa927c5c/lib/protocol/rack/body/streaming.rb#L24-L28), and if you try to use `Async` within it, it will create a new reactor, causing the server to lock up. - -Ideally, `Async` and `Sync` helpers should work when any `Fiber.scheduler` is defined. Right now, it's unrealistic to expect `Async::Task` to work in any scheduler, but at the very least, the following should work: - -``` ruby -reactor = Async::Reactor.new # internally calls Fiber.set_scheduler - -# This should run in the above reactor, rather than creating a new one. -Async do - puts "Hello World" -end -``` - -In order to do this, bare `Async` and `Sync` blocks should use `Fiber.scheduler` as a parent if possible. - -See for more details. diff --git a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/BSDL b/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/BSDL deleted file mode 100644 index 66d93598..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/BSDL +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (C) 1993-2013 Yukihiro Matsumoto. 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 AUTHOR 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 AUTHOR 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/bundle/ruby/3.2.0/gems/base64-0.3.0/COPYING b/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/COPYING deleted file mode 100644 index 48e5a96d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/COPYING +++ /dev/null @@ -1,56 +0,0 @@ -Ruby is copyrighted free software by Yukihiro Matsumoto . -You can redistribute it and/or modify it under either the terms of the -2-clause BSDL (see the file BSDL), or the conditions below: - -1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - -2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a. place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b. use the modified software only within your corporation or - organization. - - c. give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d. make other distribution arrangements with the author. - -3. You may distribute the software in object code or binary form, - provided that you do at least ONE of the following: - - a. distribute the binaries and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b. accompany the distribution with the machine-readable source of - the software. - - c. give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d. make other distribution arrangements with the author. - -4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under these terms. - - For the list of those files and their copying conditions, see the - file LEGAL. - -5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - -6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. diff --git a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/LEGAL b/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/LEGAL deleted file mode 100644 index f2d80147..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/LEGAL +++ /dev/null @@ -1,60 +0,0 @@ -# -*- rdoc -*- - -= LEGAL NOTICE INFORMATION --------------------------- - -All the files in this distribution are covered under either the Ruby's -license (see the file COPYING) or public-domain except some files -mentioned below. - -== MIT License ->>> - 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. - -== Old-style BSD license ->>> - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - - IMPORTANT NOTE:: - - From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change - paragraph 3 above is now null and void. diff --git a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/README.md b/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/README.md deleted file mode 100644 index a29c58e7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Base64 - -The Base64 module provides for the encoding (`#encode64`, `#strict_encode64`, -`#urlsafe_encode64`) and decoding (`#decode64`, `#strict_decode64`, -`#urlsafe_decode64`) of binary data using a Base64 representation. - -## Installation - -Add this line to your application's Gemfile: - -```ruby -gem 'base64' -``` - -And then execute: - - $ bundle install - -Or install it yourself as: - - $ gem install base64 - -## Usage - -A simple encoding and decoding. - -```ruby -require "base64" - -enc = Base64.encode64('Send reinforcements') - # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n" -plain = Base64.decode64(enc) - # -> "Send reinforcements" -``` - -The purpose of using base64 to encode data is that it translates any -binary data into purely printable characters. - -## Development - -After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. - -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). - -## Contributing - -Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/base64. - diff --git a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/lib/base64.rb b/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/lib/base64.rb deleted file mode 100644 index 8c0145d2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/lib/base64.rb +++ /dev/null @@ -1,381 +0,0 @@ -# frozen_string_literal: true -# -# \Module \Base64 provides methods for: -# -# - \Encoding a binary string (containing non-ASCII characters) -# as a string of printable ASCII characters. -# - Decoding such an encoded string. -# -# \Base64 is commonly used in contexts where binary data -# is not allowed or supported: -# -# - Images in HTML or CSS files, or in URLs. -# - Email attachments. -# -# A \Base64-encoded string is about one-third larger that its source. -# See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64] -# for more information. -# -# This module provides three pairs of encode/decode methods. -# Your choices among these methods should depend on: -# -# - Which character set is to be used for encoding and decoding. -# - Whether "padding" is to be used. -# - Whether encoded strings are to contain newlines. -# -# Note: Examples on this page assume that the including program has executed: -# -# require 'base64' -# -# == \Encoding Character Sets -# -# A \Base64-encoded string consists only of characters from a 64-character set: -# -# - ('A'..'Z'). -# - ('a'..'z'). -# - ('0'..'9'). -# - =, the 'padding' character. -# - Either: -# - %w[+ /]: -# {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045]; -# _not_ safe for URLs. -# - %w[- _]: -# {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648]; -# safe for URLs. -# -# If you are working with \Base64-encoded strings that will come from -# or be put into URLs, you should choose this encoder-decoder pair -# of RFC-4648-compliant methods: -# -# - Base64.urlsafe_encode64 and Base64.urlsafe_decode64. -# -# Otherwise, you may choose any of the pairs in this module, -# including the pair above, or the RFC-2045-compliant pairs: -# -# - Base64.encode64 and Base64.decode64. -# - Base64.strict_encode64 and Base64.strict_decode64. -# -# == Padding -# -# \Base64-encoding changes a triplet of input bytes -# into a quartet of output characters. -# -# Padding in Encode Methods -# -# Padding -- extending an encoded string with zero, one, or two trailing -# = characters -- is performed by methods Base64.encode64, -# Base64.strict_encode64, and, by default, Base64.urlsafe_encode64: -# -# Base64.encode64('s') # => "cw==\n" -# Base64.strict_encode64('s') # => "cw==" -# Base64.urlsafe_encode64('s') # => "cw==" -# Base64.urlsafe_encode64('s', padding: false) # => "cw" -# -# When padding is performed, the encoded string is always of length 4n, -# where +n+ is a non-negative integer: -# -# - Input bytes of length 3n generate unpadded output characters -# of length 4n: -# -# # n = 1: 3 bytes => 4 characters. -# Base64.strict_encode64('123') # => "MDEy" -# # n = 2: 6 bytes => 8 characters. -# Base64.strict_encode64('123456') # => "MDEyMzQ1" -# -# - Input bytes of length 3n+1 generate padded output characters -# of length 4(n+1), with two padding characters at the end: -# -# # n = 1: 4 bytes => 8 characters. -# Base64.strict_encode64('1234') # => "MDEyMw==" -# # n = 2: 7 bytes => 12 characters. -# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng==" -# -# - Input bytes of length 3n+2 generate padded output characters -# of length 4(n+1), with one padding character at the end: -# -# # n = 1: 5 bytes => 8 characters. -# Base64.strict_encode64('12345') # => "MDEyMzQ=" -# # n = 2: 8 bytes => 12 characters. -# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc=" -# -# When padding is suppressed, for a positive integer n: -# -# - Input bytes of length 3n generate unpadded output characters -# of length 4n: -# -# # n = 1: 3 bytes => 4 characters. -# Base64.urlsafe_encode64('123', padding: false) # => "MDEy" -# # n = 2: 6 bytes => 8 characters. -# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1" -# -# - Input bytes of length 3n+1 generate unpadded output characters -# of length 4n+2, with two padding characters at the end: -# -# # n = 1: 4 bytes => 6 characters. -# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw" -# # n = 2: 7 bytes => 10 characters. -# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng" -# -# - Input bytes of length 3n+2 generate unpadded output characters -# of length 4n+3, with one padding character at the end: -# -# # n = 1: 5 bytes => 7 characters. -# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ" -# # m = 2: 8 bytes => 11 characters. -# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc" -# -# Padding in Decode Methods -# -# All of the \Base64 decode methods support (but do not require) padding. -# -# \Method Base64.decode64 does not check the size of the padding: -# -# Base64.decode64("MDEyMzQ1Njc") # => "01234567" -# Base64.decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.decode64("MDEyMzQ1Njc==") # => "01234567" -# -# \Method Base64.strict_decode64 strictly enforces padding size: -# -# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError -# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError -# -# \Method Base64.urlsafe_decode64 allows padding in the encoded string, -# which if present, must be correct: -# see {Padding}[Base64.html#module-Base64-label-Padding], above: -# -# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" -# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. -# -# == Newlines -# -# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64 -# has an embedded newline character -# after each 60-character sequence, and, if non-empty, at the end: -# -# # No newline if empty. -# encoded = Base64.encode64("\x00" * 0) -# encoded.index("\n") # => nil -# -# # Newline at end of short output. -# encoded = Base64.encode64("\x00" * 1) -# encoded.size # => 4 -# encoded.index("\n") # => 4 -# -# # Newline at end of longer output. -# encoded = Base64.encode64("\x00" * 45) -# encoded.size # => 60 -# encoded.index("\n") # => 60 -# -# # Newlines embedded and at end of still longer output. -# encoded = Base64.encode64("\x00" * 46) -# encoded.size # => 65 -# encoded.rindex("\n") # => 65 -# encoded.split("\n").map {|s| s.size } # => [60, 4] -# -# The string to be encoded may itself contain newlines, -# which are encoded as \Base64: -# -# # Base64.encode64("\n\n\n") # => "CgoK\n" -# s = "This is line 1\nThis is line 2\n" -# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" -# -module Base64 - - VERSION = "0.3.0" - - module_function - - # :call-seq: - # Base64.encode64(string) -> encoded_string - # - # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters - # + or /; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; - # see {Padding}[Base64.html#module-Base64-label-Padding] above. - # - # Base64.encode64('*') # => "Kg==\n" - # - # The returned string ends with a newline character, and if sufficiently long - # will have one or more embedded newline characters; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.encode64('*') # => "Kg==\n" - # Base64.encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" - # - # The string to be encoded may itself contain newlines, - # which will be encoded as ordinary \Base64: - # - # Base64.encode64("\n\n\n") # => "CgoK\n" - # s = "This is line 1\nThis is line 2\n" - # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # - def encode64(bin) - [bin].pack("m") - end - - # :call-seq: - # Base64.decode(encoded_string) -> decoded_string - # - # Returns a string containing the decoding of an RFC-2045-compliant - # \Base64-encoded string +encoded_string+: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-\Base64 characters in +encoded_string+ are ignored; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # these include newline characters and characters - and /: - # - # Base64.decode64("\x00\n-_") # => "" - # - # Padding in +encoded_string+ (even if incorrect) is ignored: - # - # Base64.decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" - # - def decode64(str) - str.unpack1("m") - end - - # :call-seq: - # Base64.strict_encode64(string) -> encoded_string - # - # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters - # + or /; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; - # see {Padding}[Base64.html#module-Base64-label-Padding] above. - # - # Base64.strict_encode64('*') # => "Kg==\n" - # - # The returned string will have no newline characters, regardless of its length; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.strict_encode64('*') # => "Kg==" - # Base64.strict_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - # The string to be encoded may itself contain newlines, - # which will be encoded as ordinary \Base64: - # - # Base64.strict_encode64("\n\n\n") # => "CgoK" - # s = "This is line 1\nThis is line 2\n" - # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # - def strict_encode64(bin) - [bin].pack("m0") - end - - # :call-seq: - # Base64.strict_decode64(encoded_string) -> decoded_string - # - # Returns a string containing the decoding of an RFC-2045-compliant - # \Base64-encoded string +encoded_string+: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-\Base64 characters in +encoded_string+ are not allowed; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # these include newline characters and characters - and /: - # - # Base64.strict_decode64("\n") # Raises ArgumentError - # Base64.strict_decode64('-') # Raises ArgumentError - # Base64.strict_decode64('_') # Raises ArgumentError - # - # Padding in +encoded_string+, if present, must be correct: - # - # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError - # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError - # - def strict_decode64(str) - str.unpack1("m0") - end - - # :call-seq: - # Base64.urlsafe_encode64(string) -> encoded_string - # - # Returns the RFC-4648-compliant \Base64-encoding of +string+. - # - # Per RFC 4648, the returned string will not contain the URL-unsafe characters - # + or /, - # but instead may contain the URL-safe characters - # - and _; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" - # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" - # - # By default, the returned string may have padding; - # see {Padding}[Base64.html#module-Base64-label-Padding], above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # - # Optionally, you can suppress padding: - # - # Base64.urlsafe_encode64('*', padding: false) # => "Kg" - # - # The returned string will have no newline characters, regardless of its length; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # Base64.urlsafe_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - def urlsafe_encode64(bin, padding: true) - str = strict_encode64(bin) - str.chomp!("==") or str.chomp!("=") unless padding - str.tr!("+/", "-_") - str - end - - # :call-seq: - # Base64.urlsafe_decode64(encoded_string) -> decoded_string - # - # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +encoded_string+: - # - # +encoded_string+ may not contain non-Base64 characters; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.urlsafe_decode64('+') # Raises ArgumentError. - # Base64.urlsafe_decode64('/') # Raises ArgumentError. - # Base64.urlsafe_decode64("\n") # Raises ArgumentError. - # - # Padding in +encoded_string+, if present, must be correct: - # see {Padding}[Base64.html#module-Base64-label-Padding], above: - # - # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. - # - def urlsafe_decode64(str) - # NOTE: RFC 4648 does say nothing about unpadded input, but says that - # "the excess pad characters MAY also be ignored", so it is inferred that - # unpadded input is also acceptable. - if !str.end_with?("=") && str.length % 4 != 0 - str = str.ljust((str.length + 3) & ~3, "=") - str.tr!("-_", "+/") - else - str = str.tr("-_", "+/") - end - strict_decode64(str) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/sig/base64.rbs b/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/sig/base64.rbs deleted file mode 100644 index 147e874c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/base64-0.3.0/sig/base64.rbs +++ /dev/null @@ -1,355 +0,0 @@ -# -# Module Base64 provides methods for: -# -# * Encoding a binary string (containing non-ASCII characters) as a string of -# printable ASCII characters. -# * Decoding such an encoded string. -# -# Base64 is commonly used in contexts where binary data is not allowed or -# supported: -# -# * Images in HTML or CSS files, or in URLs. -# * Email attachments. -# -# A Base64-encoded string is about one-third larger that its source. See the -# [Wikipedia article](https://en.wikipedia.org/wiki/Base64) for more -# information. -# -# This module provides three pairs of encode/decode methods. Your choices among -# these methods should depend on: -# -# * Which character set is to be used for encoding and decoding. -# * Whether "padding" is to be used. -# * Whether encoded strings are to contain newlines. -# -# Note: Examples on this page assume that the including program has executed: -# -# require 'base64' -# -# ## Encoding Character Sets -# -# A Base64-encoded string consists only of characters from a 64-character set: -# -# * `('A'..'Z')`. -# * `('a'..'z')`. -# * `('0'..'9')`. -# * `=`, the 'padding' character. -# * Either: -# * `%w[+ /]`: -# [RFC-2045-compliant](https://datatracker.ietf.org/doc/html/rfc2045); -# *not* safe for URLs. -# * `%w[- _]`: -# [RFC-4648-compliant](https://datatracker.ietf.org/doc/html/rfc4648); -# safe for URLs. -# -# If you are working with Base64-encoded strings that will come from or be put -# into URLs, you should choose this encoder-decoder pair of RFC-4648-compliant -# methods: -# -# * Base64.urlsafe_encode64 and Base64.urlsafe_decode64. -# -# Otherwise, you may choose any of the pairs in this module, including the pair -# above, or the RFC-2045-compliant pairs: -# -# * Base64.encode64 and Base64.decode64. -# * Base64.strict_encode64 and Base64.strict_decode64. -# -# ## Padding -# -# Base64-encoding changes a triplet of input bytes into a quartet of output -# characters. -# -# **Padding in Encode Methods** -# -# Padding -- extending an encoded string with zero, one, or two trailing `=` -# characters -- is performed by methods Base64.encode64, Base64.strict_encode64, -# and, by default, Base64.urlsafe_encode64: -# -# Base64.encode64('s') # => "cw==\n" -# Base64.strict_encode64('s') # => "cw==" -# Base64.urlsafe_encode64('s') # => "cw==" -# Base64.urlsafe_encode64('s', padding: false) # => "cw" -# -# When padding is performed, the encoded string is always of length *4n*, where -# `n` is a non-negative integer: -# -# * Input bytes of length *3n* generate unpadded output characters of length -# *4n*: -# -# # n = 1: 3 bytes => 4 characters. -# Base64.strict_encode64('123') # => "MDEy" -# # n = 2: 6 bytes => 8 characters. -# Base64.strict_encode64('123456') # => "MDEyMzQ1" -# -# * Input bytes of length *3n+1* generate padded output characters of length -# *4(n+1)*, with two padding characters at the end: -# -# # n = 1: 4 bytes => 8 characters. -# Base64.strict_encode64('1234') # => "MDEyMw==" -# # n = 2: 7 bytes => 12 characters. -# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng==" -# -# * Input bytes of length *3n+2* generate padded output characters of length -# *4(n+1)*, with one padding character at the end: -# -# # n = 1: 5 bytes => 8 characters. -# Base64.strict_encode64('12345') # => "MDEyMzQ=" -# # n = 2: 8 bytes => 12 characters. -# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc=" -# -# When padding is suppressed, for a positive integer *n*: -# -# * Input bytes of length *3n* generate unpadded output characters of length -# *4n*: -# -# # n = 1: 3 bytes => 4 characters. -# Base64.urlsafe_encode64('123', padding: false) # => "MDEy" -# # n = 2: 6 bytes => 8 characters. -# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1" -# -# * Input bytes of length *3n+1* generate unpadded output characters of length -# *4n+2*, with two padding characters at the end: -# -# # n = 1: 4 bytes => 6 characters. -# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw" -# # n = 2: 7 bytes => 10 characters. -# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng" -# -# * Input bytes of length *3n+2* generate unpadded output characters of length -# *4n+3*, with one padding character at the end: -# -# # n = 1: 5 bytes => 7 characters. -# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ" -# # m = 2: 8 bytes => 11 characters. -# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc" -# -# **Padding in Decode Methods** -# -# All of the Base64 decode methods support (but do not require) padding. -# -# Method Base64.decode64 does not check the size of the padding: -# -# Base64.decode64("MDEyMzQ1Njc") # => "01234567" -# Base64.decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.decode64("MDEyMzQ1Njc==") # => "01234567" -# -# Method Base64.strict_decode64 strictly enforces padding size: -# -# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError -# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError -# -# Method Base64.urlsafe_decode64 allows padding in `str`, which if present, must -# be correct: see [Padding](Base64.html#module-Base64-label-Padding), above: -# -# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" -# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. -# -# ## Newlines -# -# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64 has -# an embedded newline character after each 60-character sequence, and, if -# non-empty, at the end: -# -# # No newline if empty. -# encoded = Base64.encode64("\x00" * 0) -# encoded.index("\n") # => nil -# -# # Newline at end of short output. -# encoded = Base64.encode64("\x00" * 1) -# encoded.size # => 4 -# encoded.index("\n") # => 4 -# -# # Newline at end of longer output. -# encoded = Base64.encode64("\x00" * 45) -# encoded.size # => 60 -# encoded.index("\n") # => 60 -# -# # Newlines embedded and at end of still longer output. -# encoded = Base64.encode64("\x00" * 46) -# encoded.size # => 65 -# encoded.rindex("\n") # => 65 -# encoded.split("\n").map {|s| s.size } # => [60, 4] -# -# The string to be encoded may itself contain newlines, which are encoded as -# Base64: -# -# # Base64.encode64("\n\n\n") # => "CgoK\n" -# s = "This is line 1\nThis is line 2\n" -# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" -# -module Base64 - # - # Returns a string containing the decoding of an RFC-2045-compliant - # Base64-encoded string `str`: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-Base64 characters in `str` are ignored; see [Encoding Character - # Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: these - # include newline characters and characters `-` and `/`: - # - # Base64.decode64("\x00\n-_") # => "" - # - # Padding in `str` (even if incorrect) is ignored: - # - # Base64.decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" - # - def self?.decode64: (String str) -> String - - # - # Returns a string containing the RFC-2045-compliant Base64-encoding of `bin`. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters `+` or - # `/`; see [Encoding Character - # Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: - # - # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; see - # [Padding](Base64.html#module-Base64-label-Padding) above. - # - # Base64.encode64('*') # => "Kg==\n" - # - # The returned string ends with a newline character, and if sufficiently long - # will have one or more embedded newline characters; see - # [Newlines](Base64.html#module-Base64-label-Newlines) above: - # - # Base64.encode64('*') # => "Kg==\n" - # Base64.encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" - # - # The string to be encoded may itself contain newlines, which will be encoded as - # ordinary Base64: - # - # Base64.encode64("\n\n\n") # => "CgoK\n" - # s = "This is line 1\nThis is line 2\n" - # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # - def self?.encode64: (String bin) -> String - - # - # Returns a string containing the decoding of an RFC-2045-compliant - # Base64-encoded string `str`: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-Base64 characters in `str` not allowed; see [Encoding Character - # Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: these - # include newline characters and characters `-` and `/`: - # - # Base64.strict_decode64("\n") # Raises ArgumentError - # Base64.strict_decode64('-') # Raises ArgumentError - # Base64.strict_decode64('_') # Raises ArgumentError - # - # Padding in `str`, if present, must be correct: - # - # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError - # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError - # - def self?.strict_decode64: (String str) -> String - - # - # Returns a string containing the RFC-2045-compliant Base64-encoding of `bin`. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters `+` or - # `/`; see [Encoding Character - # Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: - # - # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; see - # [Padding](Base64.html#module-Base64-label-Padding) above. - # - # Base64.strict_encode64('*') # => "Kg==\n" - # - # The returned string will have no newline characters, regardless of its length; - # see [Newlines](Base64.html#module-Base64-label-Newlines) above: - # - # Base64.strict_encode64('*') # => "Kg==" - # Base64.strict_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - # The string to be encoded may itself contain newlines, which will be encoded as - # ordinary Base64: - # - # Base64.strict_encode64("\n\n\n") # => "CgoK" - # s = "This is line 1\nThis is line 2\n" - # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # - def self?.strict_encode64: (String bin) -> String - - # - # Returns the decoding of an RFC-4648-compliant Base64-encoded string `str`: - # - # `str` may not contain non-Base64 characters; see [Encoding Character - # Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: - # - # Base64.urlsafe_decode64('+') # Raises ArgumentError. - # Base64.urlsafe_decode64('/') # Raises ArgumentError. - # Base64.urlsafe_decode64("\n") # Raises ArgumentError. - # - # Padding in `str`, if present, must be correct: see - # [Padding](Base64.html#module-Base64-label-Padding), above: - # - # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. - # - def self?.urlsafe_decode64: (String str) -> String - - # - # Returns the RFC-4648-compliant Base64-encoding of `bin`. - # - # Per RFC 4648, the returned string will not contain the URL-unsafe characters - # `+` or `/`, but instead may contain the URL-safe characters `-` and `_`; see - # [Encoding Character - # Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: - # - # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" - # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" - # - # By default, the returned string may have padding; see - # [Padding](Base64.html#module-Base64-label-Padding), above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # - # Optionally, you can suppress padding: - # - # Base64.urlsafe_encode64('*', padding: false) # => "Kg" - # - # The returned string will have no newline characters, regardless of its length; - # see [Newlines](Base64.html#module-Base64-label-Newlines) above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # Base64.urlsafe_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - def self?.urlsafe_encode64: (String bin, ?padding: boolish) -> String -end diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/dependabot.yml b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/dependabot.yml deleted file mode 100644 index b18fd293..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: 'github-actions' - directory: '/' - schedule: - interval: 'weekly' diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/workflows/push_gem.yml b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/workflows/push_gem.yml deleted file mode 100644 index 5019826c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/workflows/push_gem.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish gem to rubygems.org - -on: - push: - tags: - - 'v*' - -permissions: - contents: read - -jobs: - push: - if: github.repository == 'ruby/benchmark' - runs-on: ubuntu-latest - - environment: - name: rubygems.org - url: https://rubygems.org/gems/benchmark - - permissions: - contents: write - id-token: write - - steps: - - name: Harden Runner - uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 - with: - egress-policy: audit - - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - - name: Set up Ruby - uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0 - with: - bundler-cache: true - ruby-version: ruby - - - name: Publish to RubyGems - uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1 - - - name: Create GitHub release - run: | - tag_name="$(git describe --tags --abbrev=0)" - gh release create "${tag_name}" --verify-tag --generate-notes - env: - GITHUB_TOKEN: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }} diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/workflows/test.yml b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/workflows/test.yml deleted file mode 100644 index 74a4e7e0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.github/workflows/test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: test - -on: [push, pull_request] - -jobs: - ruby-versions: - uses: ruby/actions/.github/workflows/ruby_versions.yml@master - with: - min_version: 2.5 - - test: - needs: ruby-versions - name: build (${{ matrix.ruby }} / ${{ matrix.os }}) - strategy: - matrix: - ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} - os: [ ubuntu-latest, macos-latest, windows-latest ] - exclude: - - { os: macos-latest, ruby: 2.5 } - - { os: windows-latest, ruby: truffleruby-head } - - { os: windows-latest, ruby: truffleruby } - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: Install dependencies - run: bundle install - - name: Run test - run: rake test diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.gitignore b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.gitignore deleted file mode 100644 index 4ea57987..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/.bundle/ -/.yardoc -/_yardoc/ -/coverage/ -/doc/ -/pkg/ -/spec/reports/ -/tmp/ -Gemfile.lock diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/BSDL b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/BSDL deleted file mode 100644 index 66d93598..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/BSDL +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (C) 1993-2013 Yukihiro Matsumoto. 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 AUTHOR 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 AUTHOR 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/bundle/ruby/3.2.0/gems/benchmark-0.4.1/COPYING b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/COPYING deleted file mode 100644 index 48e5a96d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/COPYING +++ /dev/null @@ -1,56 +0,0 @@ -Ruby is copyrighted free software by Yukihiro Matsumoto . -You can redistribute it and/or modify it under either the terms of the -2-clause BSDL (see the file BSDL), or the conditions below: - -1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - -2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a. place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b. use the modified software only within your corporation or - organization. - - c. give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d. make other distribution arrangements with the author. - -3. You may distribute the software in object code or binary form, - provided that you do at least ONE of the following: - - a. distribute the binaries and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b. accompany the distribution with the machine-readable source of - the software. - - c. give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d. make other distribution arrangements with the author. - -4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under these terms. - - For the list of those files and their copying conditions, see the - file LEGAL. - -5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - -6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/Gemfile b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/Gemfile deleted file mode 100644 index 3dc28835..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source "https://rubygems.org" - -gemspec - -group :development do - gem "bundler" - gem "rake" - gem "test-unit" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/README.md b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/README.md deleted file mode 100644 index c5705939..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# Benchmark - -The Benchmark module provides methods for benchmarking Ruby code, giving detailed reports on the time taken for each task. - -## Installation - -Add this line to your application's Gemfile: - -```ruby -gem 'benchmark' -``` - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install benchmark - -## Usage - -The Benchmark module provides methods to measure and report the time used to execute Ruby code. - -Measure the time to construct the string given by the expression "a"*1_000_000_000: - -```ruby -require 'benchmark' -puts Benchmark.measure { "a"*1_000_000_000 } -``` - -On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: - -``` -0.350000 0.400000 0.750000 ( 0.835234) -``` - -This report shows the user CPU time, system CPU time, the total time (sum of user CPU time, system CPU time, children's user CPU time, and children's system CPU time), and the elapsed real time. The unit of time is seconds. - -Do some experiments sequentially using the #bm method: - -```ruby -require 'benchmark' -n = 5000000 -Benchmark.bm do |x| - x.report { for i in 1..n; a = "1"; end } - x.report { n.times do ; a = "1"; end } - x.report { 1.upto(n) do ; a = "1"; end } -end -``` - -The result: - -``` - user system total real -1.010000 0.000000 1.010000 ( 1.014479) -1.000000 0.000000 1.000000 ( 0.998261) -0.980000 0.000000 0.980000 ( 0.981335) -``` - -Continuing the previous example, put a label in each report: - -```ruby -require 'benchmark' -n = 5000000 -Benchmark.bm(7) do |x| - x.report("for:") { for i in 1..n; a = "1"; end } - x.report("times:") { n.times do ; a = "1"; end } - x.report("upto:") { 1.upto(n) do ; a = "1"; end } -end -``` - -The result: - -``` - user system total real -for: 1.010000 0.000000 1.010000 ( 1.015688) -times: 1.000000 0.000000 1.000000 ( 1.003611) -upto: 1.030000 0.000000 1.030000 ( 1.028098) -``` - -The times for some benchmarks depend on the order in which items are run. These differences are due to the cost of memory allocation and garbage collection. To avoid these discrepancies, the #bmbm method is provided. For example, to compare ways to sort an array of floats: - -```ruby -require 'benchmark' -array = (1..1000000).map { rand } -Benchmark.bmbm do |x| - x.report("sort!") { array.dup.sort! } - x.report("sort") { array.dup.sort } -end -``` - -The result: - -``` -Rehearsal ----------------------------------------- -sort! 1.490000 0.010000 1.500000 ( 1.490520) -sort 1.460000 0.000000 1.460000 ( 1.463025) --------------------------------- total: 2.960000sec - user system total real -sort! 1.460000 0.000000 1.460000 ( 1.460465) -sort 1.450000 0.010000 1.460000 ( 1.448327) -``` - -Report statistics of sequential experiments with unique labels, using the #benchmark method: - -```ruby -require 'benchmark' -include Benchmark # we need the CAPTION and FORMAT constants -n = 5000000 -Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - tf = x.report("for:") { for i in 1..n; a = "1"; end } - tt = x.report("times:") { n.times do ; a = "1"; end } - tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - [tf+tt+tu, (tf+tt+tu)/3] -end -``` - -The result: - -``` - user system total real -for: 0.950000 0.000000 0.950000 ( 0.952039) -times: 0.980000 0.000000 0.980000 ( 0.984938) -upto: 0.950000 0.000000 0.950000 ( 0.946787) ->total: 2.880000 0.000000 2.880000 ( 2.883764) ->avg: 0.960000 0.000000 0.960000 ( 0.961255) -``` - -## Development - -After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. - -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). - -## Contributing - -Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/benchmark. diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/Rakefile b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/Rakefile deleted file mode 100644 index 8830e057..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/Rakefile +++ /dev/null @@ -1,8 +0,0 @@ -require "bundler/gem_tasks" -require "rake/testtask" - -Rake::TestTask.new(:test) do |t| - t.test_files = FileList["test/**/test_*.rb"] -end - -task :default => :test diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/benchmark.gemspec b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/benchmark.gemspec deleted file mode 100644 index 35deff8d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/benchmark.gemspec +++ /dev/null @@ -1,32 +0,0 @@ -name = File.basename(__FILE__, ".gemspec") -version = ["lib", Array.new(name.count("-")+1, ".").join("/")].find do |dir| - break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line| - /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1 - end rescue nil -end - -Gem::Specification.new do |spec| - spec.name = name - spec.version = version - spec.authors = ["Yukihiro Matsumoto"] - spec.email = ["matz@ruby-lang.org"] - - spec.summary = %q{a performance benchmarking library} - spec.description = spec.summary - spec.homepage = "https://github.com/ruby/benchmark" - spec.licenses = ["Ruby", "BSD-2-Clause"] - - spec.required_ruby_version = ">= 2.1.0" - - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = spec.homepage - - # Specify which files should be added to the gem when it is released. - # The `git ls-files -z` loads the files in the RubyGem that have been added into git. - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - end - spec.bindir = "exe" - spec.executables = [] - spec.require_paths = ["lib"] -end diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/bin/console b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/bin/console deleted file mode 100644 index 87e7b95e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/bin/console +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby - -require "bundler/setup" -require "benchmark" - -# You can add fixtures and/or initialization code here to make experimenting -# with your gem easier. You can also use a different console, if you like. - -# (If you use this, don't forget to add pry to your Gemfile!) -# require "pry" -# Pry.start - -require "irb" -IRB.start(__FILE__) diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/bin/setup b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/bin/setup deleted file mode 100644 index dce67d86..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/bin/setup +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' -set -vx - -bundle install - -# Do any other automated setup that you need to do here diff --git a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/lib/benchmark.rb b/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/lib/benchmark.rb deleted file mode 100644 index 0d1b8df6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/benchmark-0.4.1/lib/benchmark.rb +++ /dev/null @@ -1,595 +0,0 @@ -# frozen_string_literal: true -#-- -# benchmark.rb - a performance benchmarking library -# -# $Id$ -# -# Created by Gotoken (gotoken@notwork.org). -# -# Documentation by Gotoken (original RD), Lyle Johnson (RDoc conversion), and -# Gavin Sinclair (editing). -#++ -# -# == Overview -# -# The Benchmark module provides methods for benchmarking Ruby code, giving -# detailed reports on the time taken for each task. -# - -# The Benchmark module provides methods to measure and report the time -# used to execute Ruby code. -# -# * Measure the time to construct the string given by the expression -# "a"*1_000_000_000: -# -# require 'benchmark' -# -# puts Benchmark.measure { "a"*1_000_000_000 } -# -# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: -# -# 0.350000 0.400000 0.750000 ( 0.835234) -# -# This report shows the user CPU time, system CPU time, the total time -# (sum of user CPU time, system CPU time, children's user CPU time, -# and children's system CPU time), and the elapsed real time. The unit -# of time is seconds. -# -# * Do some experiments sequentially using the #bm method: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm do |x| -# x.report { for i in 1..n; a = "1"; end } -# x.report { n.times do ; a = "1"; end } -# x.report { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# 1.010000 0.000000 1.010000 ( 1.014479) -# 1.000000 0.000000 1.000000 ( 0.998261) -# 0.980000 0.000000 0.980000 ( 0.981335) -# -# * Continuing the previous example, put a label in each report: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm(7) do |x| -# x.report("for:") { for i in 1..n; a = "1"; end } -# x.report("times:") { n.times do ; a = "1"; end } -# x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# for: 1.010000 0.000000 1.010000 ( 1.015688) -# times: 1.000000 0.000000 1.000000 ( 1.003611) -# upto: 1.030000 0.000000 1.030000 ( 1.028098) -# -# * The times for some benchmarks depend on the order in which items -# are run. These differences are due to the cost of memory -# allocation and garbage collection. To avoid these discrepancies, -# the #bmbm method is provided. For example, to compare ways to -# sort an array of floats: -# -# require 'benchmark' -# -# array = (1..1000000).map { rand } -# -# Benchmark.bmbm do |x| -# x.report("sort!") { array.dup.sort! } -# x.report("sort") { array.dup.sort } -# end -# -# The result: -# -# Rehearsal ----------------------------------------- -# sort! 1.490000 0.010000 1.500000 ( 1.490520) -# sort 1.460000 0.000000 1.460000 ( 1.463025) -# -------------------------------- total: 2.960000sec -# -# user system total real -# sort! 1.460000 0.000000 1.460000 ( 1.460465) -# sort 1.450000 0.010000 1.460000 ( 1.448327) -# -# * Report statistics of sequential experiments with unique labels, -# using the #benchmark method: -# -# require 'benchmark' -# include Benchmark # we need the CAPTION and FORMAT constants -# -# n = 5000000 -# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| -# tf = x.report("for:") { for i in 1..n; a = "1"; end } -# tt = x.report("times:") { n.times do ; a = "1"; end } -# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# [tf+tt+tu, (tf+tt+tu)/3] -# end -# -# The result: -# -# user system total real -# for: 0.950000 0.000000 0.950000 ( 0.952039) -# times: 0.980000 0.000000 0.980000 ( 0.984938) -# upto: 0.950000 0.000000 0.950000 ( 0.946787) -# >total: 2.880000 0.000000 2.880000 ( 2.883764) -# >avg: 0.960000 0.000000 0.960000 ( 0.961255) - -module Benchmark - - VERSION = "0.4.1" - - BENCHMARK_VERSION = "2002-04-25" # :nodoc: - - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - - def benchmark(caption = "", label_width = nil, format = nil, *labels) # :yield: report - sync = $stdout.sync - $stdout.sync = true - label_width ||= 0 - label_width += 1 - format ||= FORMAT - report = Report.new(label_width, format) - results = yield(report) - - print " " * report.width + caption unless caption.empty? - report.list.each { |i| - print i.label.to_s.ljust(report.width) - print i.format(report.format, *format) - } - - Array === results and results.grep(Tms).each {|t| - print((labels.shift || t.label || "").ljust(label_width), t.format(format)) - } - report.list - ensure - $stdout.sync = sync unless sync.nil? - end - - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - - def bm(label_width = 0, *labels, &blk) # :yield: report - benchmark(CAPTION, label_width, FORMAT, *labels, &blk) - end - - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - def bmbm(width = 0) # :yield: job - job = Job.new(width) - yield(job) - width = job.width + 1 - sync = $stdout.sync - $stdout.sync = true - - # rehearsal - puts 'Rehearsal '.ljust(width+CAPTION.length,'-') - ets = job.list.inject(Tms.new) { |sum,(label,item)| - print label.ljust(width) - res = Benchmark.measure(&item) - print res.format - sum + res - }.format("total: %tsec") - print " #{ets}\n\n".rjust(width+CAPTION.length+2,'-') - - # take - print ' '*width + CAPTION - job.list.map { |label,item| - GC.start - print label.ljust(width) - Benchmark.measure(label, &item).tap { |res| print res } - } - ensure - $stdout.sync = sync unless sync.nil? - end - - # - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - def measure(label = "") # :yield: - t0, r0 = Process.times, Process.clock_gettime(Process::CLOCK_MONOTONIC) - yield - t1, r1 = Process.times, Process.clock_gettime(Process::CLOCK_MONOTONIC) - Benchmark::Tms.new(t1.utime - t0.utime, - t1.stime - t0.stime, - t1.cutime - t0.cutime, - t1.cstime - t0.cstime, - r1 - r0, - label) - end - - # - # Returns the elapsed real time used to execute the given block. - # The unit of time is seconds. - # - # Benchmark.realtime { "a" * 1_000_000_000 } - # #=> 0.5098029999935534 - # - def realtime # :yield: - r0 = Process.clock_gettime(Process::CLOCK_MONOTONIC) - yield - Process.clock_gettime(Process::CLOCK_MONOTONIC) - r0 - end - - module_function :benchmark, :measure, :realtime, :bm, :bmbm - - # - # A Job is a sequence of labelled blocks to be processed by the - # Benchmark.bmbm method. It is of little direct interest to the user. - # - class Job # :nodoc: - # - # Returns an initialized Job instance. - # Usually, one doesn't call this method directly, as new - # Job objects are created by the #bmbm method. - # +width+ is a initial value for the label offset used in formatting; - # the #bmbm method passes its +width+ argument to this constructor. - # - def initialize(width) - @width = width - @list = [] - end - - # - # Registers the given label and block pair in the job list. - # - def item(label = "", &blk) # :yield: - raise ArgumentError, "no block" unless block_given? - label = label.to_s - w = label.length - @width = w if @width < w - @list << [label, blk] - self - end - - alias report item - - # An array of 2-element arrays, consisting of label and block pairs. - attr_reader :list - - # Length of the widest label in the #list. - attr_reader :width - end - - # - # This class is used by the Benchmark.benchmark and Benchmark.bm methods. - # It is of little direct interest to the user. - # - class Report # :nodoc: - # - # Returns an initialized Report instance. - # Usually, one doesn't call this method directly, as new - # Report objects are created by the #benchmark and #bm methods. - # +width+ and +format+ are the label offset and - # format string used by Tms#format. - # - def initialize(width = 0, format = nil) - @width, @format, @list = width, format, [] - end - - # - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - def item(label = "", *format, &blk) # :yield: - w = label.to_s.length - @width = w if @width < w - @list << res = Benchmark.measure(label, &blk) - res - end - - alias report item - - # An array of Benchmark::Tms objects representing each item. - attr_reader :width, :format, :list - end - - - - # - # A data object, representing the times associated with a benchmark - # measurement. - # - class Tms - - # Default caption, see also Benchmark::CAPTION - CAPTION = " user system total real\n" - - # Default format string, see also Benchmark::FORMAT - FORMAT = "%10.6u %10.6y %10.6t %10.6r\n" - - # User CPU time - attr_reader :utime - - # System CPU time - attr_reader :stime - - # User CPU time of children - attr_reader :cutime - - # System CPU time of children - attr_reader :cstime - - # Elapsed real time - attr_reader :real - - # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ - attr_reader :total - - # Label - attr_reader :label - - # - # Returns an initialized Tms object which has - # +utime+ as the user CPU time, +stime+ as the system CPU time, - # +cutime+ as the children's user CPU time, +cstime+ as the children's - # system CPU time, +real+ as the elapsed real time and +label+ as the label. - # - def initialize(utime = 0.0, stime = 0.0, cutime = 0.0, cstime = 0.0, real = 0.0, label = nil) - @utime, @stime, @cutime, @cstime, @real, @label = utime, stime, cutime, cstime, real, label.to_s - @total = @utime + @stime + @cutime + @cstime - end - - # - # Returns a new Tms object whose times are the sum of the times for this - # Tms object, plus the time required to execute the code block (+blk+). - # - def add(&blk) # :yield: - self + Benchmark.measure(&blk) - end - - # - # An in-place version of #add. - # Changes the times of this Tms object by making it the sum of the times - # for this Tms object, plus the time required to execute - # the code block (+blk+). - # - def add!(&blk) - t = Benchmark.measure(&blk) - @utime = utime + t.utime - @stime = stime + t.stime - @cutime = cutime + t.cutime - @cstime = cstime + t.cstime - @real = real + t.real - self - end - - # - # Returns a new Tms object obtained by memberwise summation - # of the individual times for this Tms object with those of the +other+ - # Tms object. - # This method and #/() are useful for taking statistics. - # - def +(other); memberwise(:+, other) end - - # - # Returns a new Tms object obtained by memberwise subtraction - # of the individual times for the +other+ Tms object from those of this - # Tms object. - # - def -(other); memberwise(:-, other) end - - # - # Returns a new Tms object obtained by memberwise multiplication - # of the individual times for this Tms object by +x+. - # - def *(x); memberwise(:*, x) end - - # - # Returns a new Tms object obtained by memberwise division - # of the individual times for this Tms object by +x+. - # This method and #+() are useful for taking statistics. - # - def /(x); memberwise(:/, x) end - - # - # Returns the contents of this Tms object as - # a formatted string, according to a +format+ string - # like that passed to Kernel.format. In addition, #format - # accepts the following extensions: - # - # %u:: Replaced by the user CPU time, as reported by Tms#utime. - # %y:: Replaced by the system CPU time, as reported by Tms#stime (Mnemonic: y of "s*y*stem") - # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime - # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime - # %t:: Replaced by the total CPU time, as reported by Tms#total - # %r:: Replaced by the elapsed real time, as reported by Tms#real - # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") - # - # If +format+ is not given, FORMAT is used as default value, detailing the - # user, system, total and real elapsed time. - # - def format(format = nil, *args) - str = (format || FORMAT).dup - str.gsub!(/(%[-+.\d]*)n/) { "#{$1}s" % label } - str.gsub!(/(%[-+.\d]*)u/) { "#{$1}f" % utime } - str.gsub!(/(%[-+.\d]*)y/) { "#{$1}f" % stime } - str.gsub!(/(%[-+.\d]*)U/) { "#{$1}f" % cutime } - str.gsub!(/(%[-+.\d]*)Y/) { "#{$1}f" % cstime } - str.gsub!(/(%[-+.\d]*)t/) { "#{$1}f" % total } - str.gsub!(/(%[-+.\d]*)r/) { "(#{$1}f)" % real } - format ? str % args : str - end - - # - # Same as #format. - # - def to_s - format - end - - # - # Returns a new 6-element array, consisting of the - # label, user CPU time, system CPU time, children's - # user CPU time, children's system CPU time and elapsed - # real time. - # - def to_a - [@label, @utime, @stime, @cutime, @cstime, @real] - end - - # - # Returns a hash containing the same data as `to_a`. - # - def to_h - { - label: @label, - utime: @utime, - stime: @stime, - cutime: @cutime, - cstime: @cstime, - real: @real - } - end - - protected - - # - # Returns a new Tms object obtained by memberwise operation +op+ - # of the individual times for this Tms object with those of the other - # Tms object (+x+). - # - # +op+ can be a mathematical operation such as +, -, - # *, / - # - def memberwise(op, x) - case x - when Benchmark::Tms - Benchmark::Tms.new(utime.__send__(op, x.utime), - stime.__send__(op, x.stime), - cutime.__send__(op, x.cutime), - cstime.__send__(op, x.cstime), - real.__send__(op, x.real) - ) - else - Benchmark::Tms.new(utime.__send__(op, x), - stime.__send__(op, x), - cutime.__send__(op, x), - cstime.__send__(op, x), - real.__send__(op, x) - ) - end - end - end - - # The default caption string (heading above the output times). - CAPTION = Benchmark::Tms::CAPTION - - # The default format string used to display times. See also Benchmark::Tms#format. - FORMAT = Benchmark::Tms::FORMAT -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/LICENSE b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/LICENSE deleted file mode 100644 index a1f19ff9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/LICENSE +++ /dev/null @@ -1,56 +0,0 @@ -Ruby is copyrighted free software by Yukihiro Matsumoto . -You can redistribute it and/or modify it under either the terms of the -2-clause BSDL (see the file BSDL), or the conditions below: - - 1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - - 2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a) place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b) use the modified software only within your corporation or - organization. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 3. You may distribute the software in object code or binary form, - provided that you do at least ONE of the following: - - a) distribute the binaries and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b) accompany the distribution with the machine-readable source of - the software. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under these terms. - - For the list of those files and their copying conditions, see the - file LEGAL. - - 5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - - 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/bigdecimal.gemspec b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/bigdecimal.gemspec deleted file mode 100644 index b6ef8fd9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/bigdecimal.gemspec +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -name = File.basename(__FILE__, '.*') -source_version = ["", "ext/#{name}/"].find do |dir| - begin - break File.foreach(File.join(__dir__, "#{dir}#{name}.c")) {|line| - break $1.sub("-", ".") if /^#define\s+#{name.upcase}_VERSION\s+"(.+)"/o =~ line - } - rescue Errno::ENOENT - end -end or raise "can't find #{name.upcase}_VERSION" - -Gem::Specification.new do |s| - s.name = name - s.version = source_version - s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"] - s.email = ["mrkn@mrkn.jp"] - - s.summary = "Arbitrary-precision decimal floating-point number library." - s.description = "This library provides arbitrary-precision decimal floating-point number class." - s.homepage = "https://github.com/ruby/bigdecimal" - s.licenses = ["Ruby", "BSD-2-Clause"] - - s.require_paths = %w[lib] - s.files = %w[ - LICENSE - bigdecimal.gemspec - lib/bigdecimal.rb - lib/bigdecimal/jacobian.rb - lib/bigdecimal/ludcmp.rb - lib/bigdecimal/math.rb - lib/bigdecimal/newton.rb - lib/bigdecimal/util.rb - sample/linear.rb - sample/nlsolve.rb - sample/pi.rb - ] - if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby' - s.platform = 'java' - else - s.extensions = %w[ext/bigdecimal/extconf.rb] - s.files += %w[ - ext/bigdecimal/bigdecimal.c - ext/bigdecimal/bigdecimal.h - ext/bigdecimal/bits.h - ext/bigdecimal/feature.h - ext/bigdecimal/missing.c - ext/bigdecimal/missing.h - ext/bigdecimal/missing/dtoa.c - ext/bigdecimal/static_assert.h - ] - end - - s.required_ruby_version = Gem::Requirement.new(">= 2.5.0") - - s.metadata["changelog_uri"] = s.homepage + "/blob/master/CHANGES.md" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/Makefile b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/Makefile deleted file mode 100644 index 39a836d7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/Makefile +++ /dev/null @@ -1,270 +0,0 @@ - -SHELL = /bin/sh - -# V=0 quiet, V=1 verbose. other values don't work. -V = 0 -V0 = $(V:0=) -Q1 = $(V:1=) -Q = $(Q1:0=@) -ECHO1 = $(V:1=@ :) -ECHO = $(ECHO1:0=@ echo) -NULLCMD = : - -#### Start of system configuration section. #### - -srcdir = . -topdir = /home/nakamoto/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0 -hdrdir = $(topdir) -arch_hdrdir = /home/nakamoto/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/x86_64-linux -PATH_SEPARATOR = : -VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby -prefix = $(DESTDIR)/home/nakamoto/.rvm/rubies/ruby-3.2.2 -rubysitearchprefix = $(rubylibprefix)/$(sitearch) -rubyarchprefix = $(rubylibprefix)/$(arch) -rubylibprefix = $(libdir)/$(RUBY_BASE_NAME) -exec_prefix = $(prefix) -vendorarchhdrdir = $(vendorhdrdir)/$(sitearch) -sitearchhdrdir = $(sitehdrdir)/$(sitearch) -rubyarchhdrdir = $(rubyhdrdir)/$(arch) -vendorhdrdir = $(rubyhdrdir)/vendor_ruby -sitehdrdir = $(rubyhdrdir)/site_ruby -rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME) -vendorarchdir = $(vendorlibdir)/$(sitearch) -vendorlibdir = $(vendordir)/$(ruby_version) -vendordir = $(rubylibprefix)/vendor_ruby -sitearchdir = $(sitelibdir)/$(sitearch) -sitelibdir = $(sitedir)/$(ruby_version) -sitedir = $(rubylibprefix)/site_ruby -rubyarchdir = $(rubylibdir)/$(arch) -rubylibdir = $(rubylibprefix)/$(ruby_version) -sitearchincludedir = $(includedir)/$(sitearch) -archincludedir = $(includedir)/$(arch) -sitearchlibdir = $(libdir)/$(sitearch) -archlibdir = $(libdir)/$(arch) -ridir = $(datarootdir)/$(RI_BASE_NAME) -mandir = $(datarootdir)/man -localedir = $(datarootdir)/locale -libdir = $(exec_prefix)/lib -psdir = $(docdir) -pdfdir = $(docdir) -dvidir = $(docdir) -htmldir = $(docdir) -infodir = $(datarootdir)/info -docdir = $(datarootdir)/doc/$(PACKAGE) -oldincludedir = $(DESTDIR)/usr/include -includedir = $(prefix)/include -runstatedir = $(localstatedir)/run -localstatedir = $(prefix)/var -sharedstatedir = $(prefix)/com -sysconfdir = $(prefix)/etc -datadir = $(datarootdir) -datarootdir = $(prefix)/share -libexecdir = $(exec_prefix)/libexec -sbindir = $(exec_prefix)/sbin -bindir = $(exec_prefix)/bin -archdir = $(rubyarchdir) - - -CC_WRAPPER = -CC = gcc -CXX = g++ -LIBRUBY = $(LIBRUBY_SO) -LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a -LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME) -LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS) -empty = -OUTFLAG = -o $(empty) -COUTFLAG = -o $(empty) -CSRCFLAG = $(empty) - -RUBY_EXTCONF_H = -cflags = $(optflags) $(debugflags) $(warnflags) -cxxflags = -optflags = -O3 -fno-fast-math -debugflags = -ggdb3 -warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -cppflags = -CCDLFLAGS = -fPIC -CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG) -INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -DEFS = -CPPFLAGS = -DHAVE_BUILTIN___BUILTIN_CLZ -DHAVE_BUILTIN___BUILTIN_CLZL -DHAVE_BUILTIN___BUILTIN_CLZLL -DHAVE_FLOAT_H -DHAVE_MATH_H -DHAVE_STDBOOL_H -DHAVE_STDLIB_H -DHAVE_X86INTRIN_H -DHAVE_LABS -DHAVE_LLABS -DHAVE_FINITE -DHAVE_RUBY_ATOMIC_H -DHAVE_RUBY_INTERNAL_HAS_BUILTIN_H -DHAVE_RUBY_INTERNAL_STATIC_ASSERT_H -DHAVE_RB_RATIONAL_NUM -DHAVE_RB_RATIONAL_DEN -DHAVE_RB_COMPLEX_REAL -DHAVE_RB_COMPLEX_IMAG -DHAVE_RB_OPTS_EXCEPTION_P -DHAVE_RB_CATEGORY_WARN -DHAVE_CONST_RB_WARN_CATEGORY_DEPRECATED $(DEFS) $(cppflags) -CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG) -ldflags = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -dldflags = -Wl,--compress-debug-sections=zlib -ARCH_FLAG = -DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG) -LDSHARED = $(CC) -shared -LDSHAREDXX = $(CXX) -shared -AR = gcc-ar -EXEEXT = - -RUBY_INSTALL_NAME = $(RUBY_BASE_NAME) -RUBY_SO_NAME = ruby -RUBYW_INSTALL_NAME = -RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version) -RUBYW_BASE_NAME = rubyw -RUBY_BASE_NAME = ruby - -arch = x86_64-linux -sitearch = $(arch) -ruby_version = 3.2.0 -ruby = $(bindir)/$(RUBY_BASE_NAME) -RUBY = $(ruby) -BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME) -ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h - -RM = rm -f -RM_RF = rm -fr -RMDIRS = rmdir --ignore-fail-on-non-empty -p -MAKEDIRS = /usr/bin/mkdir -p -INSTALL = /usr/bin/install -c -INSTALL_PROG = $(INSTALL) -m 0755 -INSTALL_DATA = $(INSTALL) -m 644 -COPY = cp -TOUCH = exit > - -#### End of system configuration section. #### - -preload = -libpath = . $(libdir) -LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir) -DEFFILE = - -CLEANFILES = mkmf.log -DISTCLEANFILES = -DISTCLEANDIRS = - -extout = -extout_prefix = -target_prefix = -LOCAL_LIBS = -LIBS = $(LIBRUBYARG_SHARED) -lm -lpthread -lc -ORIG_SRCS = bigdecimal.c missing.c -SRCS = $(ORIG_SRCS) -OBJS = bigdecimal.o missing.o -HDRS = $(srcdir)/bigdecimal.h $(srcdir)/bits.h $(srcdir)/feature.h $(srcdir)/missing.h $(srcdir)/static_assert.h -LOCAL_HDRS = -TARGET = bigdecimal -TARGET_NAME = bigdecimal -TARGET_ENTRY = Init_$(TARGET_NAME) -DLLIB = $(TARGET).so -EXTSTATIC = -STATIC_LIB = - -TIMESTAMP_DIR = . -BINDIR = $(bindir) -RUBYCOMMONDIR = $(sitedir)$(target_prefix) -RUBYLIBDIR = $(sitelibdir)$(target_prefix) -RUBYARCHDIR = $(sitearchdir)$(target_prefix) -HDRDIR = $(sitehdrdir)$(target_prefix) -ARCHHDRDIR = $(sitearchhdrdir)$(target_prefix) -TARGET_SO_DIR = -TARGET_SO = $(TARGET_SO_DIR)$(DLLIB) -CLEANLIBS = $(TARGET_SO) false -CLEANOBJS = $(OBJS) *.bak -TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time -BIGDECIMAL_RB = $(srcdir)/../../lib/bigdecimal.rb - -all: $(DLLIB) -static: $(STATIC_LIB) -.PHONY: all install static install-so install-rb -.PHONY: clean clean-so clean-static clean-rb - -clean-static:: -clean-rb-default:: -clean-rb:: -clean-so:: -clean: clean-so clean-static clean-rb-default clean-rb - -$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time - -distclean-rb-default:: -distclean-rb:: -distclean-so:: -distclean-static:: -distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb - -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log - -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) - -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true - -realclean: distclean -install: install-so install-rb - -install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP) - $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) -clean-static:: - -$(Q)$(RM) $(STATIC_LIB) -install-rb: pre-install-rb do-install-rb install-rb-default -install-rb-default: pre-install-rb-default do-install-rb-default -pre-install-rb: Makefile -pre-install-rb-default: Makefile -do-install-rb: -do-install-rb-default: -pre-install-rb-default: - @$(NULLCMD) -$(TARGET_SO_DIR_TIMESTAMP): - $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR) - $(Q) $(TOUCH) $@ - -site-install: site-install-so site-install-rb -site-install-so: install-so -site-install-rb: install-rb - -.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S - -.cc.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cc.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.mm.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.mm.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.cxx.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cxx.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.cpp.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cpp.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.c.o: - $(ECHO) compiling $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.c.S: - $(ECHO) translating $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.m.o: - $(ECHO) compiling $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.m.S: - $(ECHO) translating $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -$(TARGET_SO): $(OBJS) Makefile - $(ECHO) linking shared-object $(DLLIB) - -$(Q)$(RM) $(@) - $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) - - - -$(OBJS): $(HDRS) $(ruby_headers) diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bigdecimal.c b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bigdecimal.c deleted file mode 100644 index 486aee86..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bigdecimal.c +++ /dev/null @@ -1,7761 +0,0 @@ -/* - * - * Ruby BigDecimal(Variable decimal precision) extension library. - * - * Copyright(C) 2002 by Shigeo Kobayashi(shigeo@tinyforest.gr.jp) - * - */ - -/* #define BIGDECIMAL_DEBUG 1 */ - -#include "bigdecimal.h" -#include "ruby/util.h" - -#ifndef BIGDECIMAL_DEBUG -# undef NDEBUG -# define NDEBUG -#endif -#include - -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_IEEEFP_H -#include -#endif - -#include "bits.h" -#include "static_assert.h" - -#define BIGDECIMAL_VERSION "3.2.2" - -/* #define ENABLE_NUMERIC_STRING */ - -#define SIGNED_VALUE_MAX INTPTR_MAX -#define SIGNED_VALUE_MIN INTPTR_MIN -#define MUL_OVERFLOW_SIGNED_VALUE_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, SIGNED_VALUE_MIN, SIGNED_VALUE_MAX) - -VALUE rb_cBigDecimal; -VALUE rb_mBigMath; - -static ID id_BigDecimal_exception_mode; -static ID id_BigDecimal_rounding_mode; -static ID id_BigDecimal_precision_limit; - -static ID id_up; -static ID id_down; -static ID id_truncate; -static ID id_half_up; -static ID id_default; -static ID id_half_down; -static ID id_half_even; -static ID id_banker; -static ID id_ceiling; -static ID id_ceil; -static ID id_floor; -static ID id_to_r; -static ID id_eq; -static ID id_half; - -#define RBD_NUM_ROUNDING_MODES 11 - -static struct { - ID id; - uint8_t mode; -} rbd_rounding_modes[RBD_NUM_ROUNDING_MODES]; - -/* MACRO's to guard objects from GC by keeping them in stack */ -#ifdef RBIMPL_ATTR_MAYBE_UNUSED -#define ENTER(n) RBIMPL_ATTR_MAYBE_UNUSED() volatile VALUE vStack[n];int iStack=0 -#else -#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0 -#endif -#define PUSH(x) (vStack[iStack++] = (VALUE)(x)) -#define SAVE(p) PUSH((p)->obj) -#define GUARD_OBJ(p,y) ((p)=(y), SAVE(p)) - -#define BASE_FIG BIGDECIMAL_COMPONENT_FIGURES -#define BASE BIGDECIMAL_BASE - -#define HALF_BASE (BASE/2) -#define BASE1 (BASE/10) - -#define LOG10_2 0.3010299956639812 - -#ifndef RRATIONAL_ZERO_P -# define RRATIONAL_ZERO_P(x) (FIXNUM_P(rb_rational_num(x)) && \ - FIX2LONG(rb_rational_num(x)) == 0) -#endif - -#ifndef RRATIONAL_NEGATIVE_P -# define RRATIONAL_NEGATIVE_P(x) RTEST(rb_funcall((x), '<', 1, INT2FIX(0))) -#endif - -#ifndef DECIMAL_SIZE_OF_BITS -#define DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999) -/* an approximation of ceil(n * log10(2)), upto 65536 at least */ -#endif - -#ifdef PRIsVALUE -# define RB_OBJ_CLASSNAME(obj) rb_obj_class(obj) -# define RB_OBJ_STRING(obj) (obj) -#else -# define PRIsVALUE "s" -# define RB_OBJ_CLASSNAME(obj) rb_obj_classname(obj) -# define RB_OBJ_STRING(obj) StringValueCStr(obj) -#endif - -#ifndef MAYBE_UNUSED -# define MAYBE_UNUSED(x) x -#endif - -#define BIGDECIMAL_POSITIVE_P(bd) ((bd)->sign > 0) -#define BIGDECIMAL_NEGATIVE_P(bd) ((bd)->sign < 0) - -/* - * ================== Memory allocation ============================ - */ - -#ifdef BIGDECIMAL_DEBUG -static size_t rbd_allocation_count = 0; /* Memory allocation counter */ -static inline void -atomic_allocation_count_inc(void) -{ - RUBY_ATOMIC_SIZE_INC(rbd_allocation_count); -} -static inline void -atomic_allocation_count_dec_nounderflow(void) -{ - if (rbd_allocation_count == 0) return; - RUBY_ATOMIC_SIZE_DEC(rbd_allocation_count); -} -static void -check_allocation_count_nonzero(void) -{ - if (rbd_allocation_count != 0) return; - rb_bug("[bigdecimal][rbd_free_struct] Too many memory free calls"); -} -#else -# define atomic_allocation_count_inc() /* nothing */ -# define atomic_allocation_count_dec_nounderflow() /* nothing */ -# define check_allocation_count_nonzero() /* nothing */ -#endif /* BIGDECIMAL_DEBUG */ - -PUREFUNC(static inline size_t rbd_struct_size(size_t const)); - -static inline size_t -rbd_struct_size(size_t const internal_digits) -{ - size_t const frac_len = (internal_digits == 0) ? 1 : internal_digits; - return offsetof(Real, frac) + frac_len * sizeof(DECDIG); -} - -static inline Real * -rbd_allocate_struct(size_t const internal_digits) -{ - size_t const size = rbd_struct_size(internal_digits); - Real *real = ruby_xcalloc(1, size); - atomic_allocation_count_inc(); - real->MaxPrec = internal_digits; - return real; -} - -static size_t -rbd_calculate_internal_digits(size_t const digits, bool limit_precision) -{ - size_t const len = roomof(digits, BASE_FIG); - if (limit_precision) { - size_t const prec_limit = VpGetPrecLimit(); - if (prec_limit > 0) { - /* NOTE: 2 more digits for rounding and division */ - size_t const max_len = roomof(prec_limit, BASE_FIG) + 2; - if (len > max_len) - return max_len; - } - } - - return len; -} - -static inline Real * -rbd_allocate_struct_decimal_digits(size_t const decimal_digits, bool limit_precision) -{ - size_t const internal_digits = rbd_calculate_internal_digits(decimal_digits, limit_precision); - return rbd_allocate_struct(internal_digits); -} - -static VALUE BigDecimal_wrap_struct(VALUE obj, Real *vp); - -static Real * -rbd_reallocate_struct(Real *real, size_t const internal_digits) -{ - size_t const size = rbd_struct_size(internal_digits); - VALUE obj = real ? real->obj : 0; - Real *new_real = (Real *)ruby_xrealloc(real, size); - new_real->MaxPrec = internal_digits; - if (obj) { - new_real->obj = 0; - BigDecimal_wrap_struct(obj, new_real); - } - return new_real; -} - -static void -rbd_free_struct(Real *real) -{ - if (real != NULL) { - check_allocation_count_nonzero(); - ruby_xfree(real); - atomic_allocation_count_dec_nounderflow(); - } -} - -#define NewZero rbd_allocate_struct_zero -static Real * -rbd_allocate_struct_zero(int sign, size_t const digits, bool limit_precision) -{ - Real *real = rbd_allocate_struct_decimal_digits(digits, limit_precision); - VpSetZero(real, sign); - return real; -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_limited(int sign, size_t const digits)); -#define NewZeroLimited rbd_allocate_struct_zero_limited -static inline Real * -rbd_allocate_struct_zero_limited(int sign, size_t const digits) -{ - return rbd_allocate_struct_zero(sign, digits, true); -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_nolimit(int sign, size_t const digits)); -#define NewZeroNolimit rbd_allocate_struct_zero_nolimit -static inline Real * -rbd_allocate_struct_zero_nolimit(int sign, size_t const digits) -{ - return rbd_allocate_struct_zero(sign, digits, false); -} - -#define NewOne rbd_allocate_struct_one -static Real * -rbd_allocate_struct_one(int sign, size_t const digits, bool limit_precision) -{ - Real *real = rbd_allocate_struct_decimal_digits(digits, limit_precision); - VpSetOne(real); - if (sign < 0) - VpSetSign(real, VP_SIGN_NEGATIVE_FINITE); - return real; -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_limited(int sign, size_t const digits)); -#define NewOneLimited rbd_allocate_struct_one_limited -static inline Real * -rbd_allocate_struct_one_limited(int sign, size_t const digits) -{ - return rbd_allocate_struct_one(sign, digits, true); -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_nolimit(int sign, size_t const digits)); -#define NewOneNolimit rbd_allocate_struct_one_nolimit -static inline Real * -rbd_allocate_struct_one_nolimit(int sign, size_t const digits) -{ - return rbd_allocate_struct_one(sign, digits, false); -} - -/* - * ================== Ruby Interface part ========================== - */ -#define DoSomeOne(x,y,f) rb_num_coerce_bin(x,y,f) - -/* - * VP routines used in BigDecimal part - */ -static unsigned short VpGetException(void); -static void VpSetException(unsigned short f); -static void VpCheckException(Real *p, bool always); -static VALUE VpCheckGetValue(Real *p); -static void VpInternalRound(Real *c, size_t ixDigit, DECDIG vPrev, DECDIG v); -static int VpLimitRound(Real *c, size_t ixDigit); -static Real *VpCopy(Real *pv, Real const* const x); -static int VPrint(FILE *fp,const char *cntl_chr,Real *a); - -/* - * **** BigDecimal part **** - */ - -static VALUE BigDecimal_nan(void); -static VALUE BigDecimal_positive_infinity(void); -static VALUE BigDecimal_negative_infinity(void); -static VALUE BigDecimal_positive_zero(void); -static VALUE BigDecimal_negative_zero(void); - -static void -BigDecimal_delete(void *pv) -{ - rbd_free_struct(pv); -} - -static size_t -BigDecimal_memsize(const void *ptr) -{ - const Real *pv = ptr; - return (sizeof(*pv) + pv->MaxPrec * sizeof(DECDIG)); -} - -#ifndef HAVE_RB_EXT_RACTOR_SAFE -# undef RUBY_TYPED_FROZEN_SHAREABLE -# define RUBY_TYPED_FROZEN_SHAREABLE 0 -#endif - -static const rb_data_type_t BigDecimal_data_type = { - "BigDecimal", - { 0, BigDecimal_delete, BigDecimal_memsize, }, -#ifdef RUBY_TYPED_FREE_IMMEDIATELY - 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE | RUBY_TYPED_WB_PROTECTED -#endif -}; - -static Real * -rbd_allocate_struct_zero_wrap_klass(VALUE klass, int sign, size_t const digits, bool limit_precision) -{ - Real *real = rbd_allocate_struct_zero(sign, digits, limit_precision); - if (real != NULL) { - VALUE obj = TypedData_Wrap_Struct(klass, &BigDecimal_data_type, 0); - BigDecimal_wrap_struct(obj, real); - } - return real; -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_limited_wrap(int sign, size_t const digits)); -#define NewZeroWrapLimited rbd_allocate_struct_zero_limited_wrap -static inline Real * -rbd_allocate_struct_zero_limited_wrap(int sign, size_t const digits) -{ - return rbd_allocate_struct_zero_wrap_klass(rb_cBigDecimal, sign, digits, true); -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_nolimit_wrap(int sign, size_t const digits)); -#define NewZeroWrapNolimit rbd_allocate_struct_zero_nolimit_wrap -static inline Real * -rbd_allocate_struct_zero_nolimit_wrap(int sign, size_t const digits) -{ - return rbd_allocate_struct_zero_wrap_klass(rb_cBigDecimal, sign, digits, false); -} - -static Real * -rbd_allocate_struct_one_wrap_klass(VALUE klass, int sign, size_t const digits, bool limit_precision) -{ - Real *real = rbd_allocate_struct_one(sign, digits, limit_precision); - if (real != NULL) { - VALUE obj = TypedData_Wrap_Struct(klass, &BigDecimal_data_type, 0); - BigDecimal_wrap_struct(obj, real); - } - return real; -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_limited_wrap(int sign, size_t const digits)); -#define NewOneWrapLimited rbd_allocate_struct_one_limited_wrap -static inline Real * -rbd_allocate_struct_one_limited_wrap(int sign, size_t const digits) -{ - return rbd_allocate_struct_one_wrap_klass(rb_cBigDecimal, sign, digits, true); -} - -MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_nolimit_wrap(int sign, size_t const digits)); -#define NewOneWrapNolimit rbd_allocate_struct_one_nolimit_wrap -static inline Real * -rbd_allocate_struct_one_nolimit_wrap(int sign, size_t const digits) -{ - return rbd_allocate_struct_one_wrap_klass(rb_cBigDecimal, sign, digits, false); -} - -static inline int -is_kind_of_BigDecimal(VALUE const v) -{ - return rb_typeddata_is_kind_of(v, &BigDecimal_data_type); -} - -NORETURN(static void cannot_be_coerced_into_BigDecimal(VALUE, VALUE)); - -static void -cannot_be_coerced_into_BigDecimal(VALUE exc_class, VALUE v) -{ - VALUE str; - - if (rb_special_const_p(v)) { - str = rb_inspect(v); - } - else { - str = rb_class_name(rb_obj_class(v)); - } - - str = rb_str_cat2(rb_str_dup(str), " can't be coerced into BigDecimal"); - rb_exc_raise(rb_exc_new3(exc_class, str)); -} - -static inline VALUE BigDecimal_div2(VALUE, VALUE, VALUE); -static VALUE rb_inum_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception); -static VALUE rb_float_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception); -static VALUE rb_rational_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception); -static VALUE rb_cstr_convert_to_BigDecimal(const char *c_str, size_t digs, int raise_exception); -static VALUE rb_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception); - -static Real* -GetVpValueWithPrec(VALUE v, long prec, int must) -{ - const size_t digs = prec < 0 ? SIZE_MAX : (size_t)prec; - - switch(TYPE(v)) { - case T_FLOAT: - v = rb_float_convert_to_BigDecimal(v, digs, must); - break; - - case T_RATIONAL: - v = rb_rational_convert_to_BigDecimal(v, digs, must); - break; - - case T_DATA: - if (!is_kind_of_BigDecimal(v)) { - goto SomeOneMayDoIt; - } - break; - - case T_FIXNUM: { - char szD[128]; - snprintf(szD, 128, "%ld", FIX2LONG(v)); - v = rb_cstr_convert_to_BigDecimal(szD, VpBaseFig() * 2 + 1, must); - break; - } - -#ifdef ENABLE_NUMERIC_STRING - case T_STRING: { - const char *c_str = StringValueCStr(v); - v = rb_cstr_convert_to_BigDecimal(c_str, RSTRING_LEN(v) + VpBaseFig() + 1, must); - break; - } -#endif /* ENABLE_NUMERIC_STRING */ - - case T_BIGNUM: { - VALUE bg = rb_big2str(v, 10); - v = rb_cstr_convert_to_BigDecimal(RSTRING_PTR(bg), RSTRING_LEN(bg) + VpBaseFig() + 1, must); - RB_GC_GUARD(bg); - break; - } - - default: - goto SomeOneMayDoIt; - } - - Real *vp; - TypedData_Get_Struct(v, Real, &BigDecimal_data_type, vp); - return vp; - -SomeOneMayDoIt: - if (must) { - cannot_be_coerced_into_BigDecimal(rb_eTypeError, v); - } - return NULL; /* NULL means to coerce */ -} - -static inline Real* -GetVpValue(VALUE v, int must) -{ - return GetVpValueWithPrec(v, -1, must); -} - -/* call-seq: - * BigDecimal.double_fig -> integer - * - * Returns the number of digits a Float object is allowed to have; - * the result is system-dependent: - * - * BigDecimal.double_fig # => 16 - * - */ -static inline VALUE -BigDecimal_double_fig(VALUE self) -{ - return INT2FIX(VpDblFig()); -} - -/* call-seq: - * precs -> array - * - * Returns an Array of two Integer values that represent platform-dependent - * internal storage properties. - * - * This method is deprecated and will be removed in the future. - * Instead, use BigDecimal#n_significant_digits for obtaining the number of - * significant digits in scientific notation, and BigDecimal#precision for - * obtaining the number of digits in decimal notation. - * - */ - -static VALUE -BigDecimal_prec(VALUE self) -{ - ENTER(1); - Real *p; - VALUE obj; - - rb_category_warn(RB_WARN_CATEGORY_DEPRECATED, - "BigDecimal#precs is deprecated and will be removed in the future; " - "use BigDecimal#precision instead."); - - GUARD_OBJ(p, GetVpValue(self, 1)); - obj = rb_assoc_new(SIZET2NUM(p->Prec*VpBaseFig()), - SIZET2NUM(p->MaxPrec*VpBaseFig())); - return obj; -} - -static void -VpCountPrecisionAndScale(Real *p, ssize_t *out_precision, ssize_t *out_scale) -{ - if (out_precision == NULL && out_scale == NULL) - return; - if (VpIsZero(p) || !VpIsDef(p)) { - zero: - if (out_precision) *out_precision = 0; - if (out_scale) *out_scale = 0; - return; - } - - DECDIG x; - - ssize_t n = p->Prec; /* The length of frac without zeros. */ - while (n > 0 && p->frac[n-1] == 0) --n; - if (n == 0) goto zero; - - int nlz = BASE_FIG; - for (x = p->frac[0]; x > 0; x /= 10) --nlz; - - int ntz = 0; - for (x = p->frac[n-1]; x > 0 && x % 10 == 0; x /= 10) ++ntz; - - /* - * Calculate the precision and the scale - * ------------------------------------- - * - * The most significant digit is frac[0], and the least significant digit - * is frac[Prec-1]. When the exponent is zero, the decimal point is - * located just before frac[0]. - * - * When the exponent is negative, the decimal point moves to leftward. - * In this case, the precision can be calculated by - * - * precision = BASE_FIG * (-exponent + n) - ntz, - * - * and the scale is the same as precision. - * - * 0 . 0000 0000 | frac[0] ... frac[n-1] | - * |<----------| exponent == -2 | - * |---------------------------------->| precision - * |---------------------------------->| scale - * - * - * Conversely, when the exponent is positive, the decimal point moves to - * rightward. In this case, the scale equals to - * - * BASE_FIG * (n - exponent) - ntz. - * - * the precision equals to - * - * scale + BASE_FIG * exponent - nlz. - * - * | frac[0] frac[1] . frac[2] ... frac[n-1] | - * |---------------->| exponent == 2 | - * | |---------------------->| scale - * |---------------------------------------->| precision - */ - - ssize_t ex = p->exponent; - - /* Count the number of decimal digits before frac[1]. */ - ssize_t n_digits_head = BASE_FIG; - if (ex < 0) { - n_digits_head += (-ex) * BASE_FIG; /* The number of leading zeros before frac[0]. */ - ex = 0; - } - else if (ex > 0) { - /* Count the number of decimal digits without the leading zeros in - * the most significant digit in the integral part. - */ - n_digits_head -= nlz; /* Make the number of digits */ - } - - if (out_precision) { - ssize_t precision = n_digits_head; - - /* Count the number of decimal digits after frac[0]. */ - if (ex > (ssize_t)n) { - /* In this case the number is an integer with some trailing zeros. */ - precision += (ex - 1) * BASE_FIG; - } - else if (n > 0) { - precision += (n - 1) * BASE_FIG; - - if (ex < (ssize_t)n) { - precision -= ntz; - } - } - - *out_precision = precision; - } - - if (out_scale) { - ssize_t scale = 0; - - if (p->exponent < 0) { - scale = n_digits_head + (n - 1) * BASE_FIG - ntz; - } - else if (n > p->exponent) { - scale = (n - p->exponent) * BASE_FIG - ntz; - } - - *out_scale = scale; - } -} - -static void -BigDecimal_count_precision_and_scale(VALUE self, ssize_t *out_precision, ssize_t *out_scale) -{ - ENTER(1); - Real *p; - GUARD_OBJ(p, GetVpValue(self, 1)); - VpCountPrecisionAndScale(p, out_precision, out_scale); -} - -/* - * call-seq: - * precision -> integer - * - * Returns the number of decimal digits in +self+: - * - * BigDecimal("0").precision # => 0 - * BigDecimal("1").precision # => 1 - * BigDecimal("1.1").precision # => 2 - * BigDecimal("3.1415").precision # => 5 - * BigDecimal("-1e20").precision # => 21 - * BigDecimal("1e-20").precision # => 20 - * BigDecimal("Infinity").precision # => 0 - * BigDecimal("-Infinity").precision # => 0 - * BigDecimal("NaN").precision # => 0 - * - */ -static VALUE -BigDecimal_precision(VALUE self) -{ - ssize_t precision; - BigDecimal_count_precision_and_scale(self, &precision, NULL); - return SSIZET2NUM(precision); -} - -/* - * call-seq: - * scale -> integer - * - * Returns the number of decimal digits following the decimal digits in +self+. - * - * BigDecimal("0").scale # => 0 - * BigDecimal("1").scale # => 0 - * BigDecimal("1.1").scale # => 1 - * BigDecimal("3.1415").scale # => 4 - * BigDecimal("-1e20").precision # => 0 - * BigDecimal("1e-20").precision # => 20 - * BigDecimal("Infinity").scale # => 0 - * BigDecimal("-Infinity").scale # => 0 - * BigDecimal("NaN").scale # => 0 - */ -static VALUE -BigDecimal_scale(VALUE self) -{ - ssize_t scale; - BigDecimal_count_precision_and_scale(self, NULL, &scale); - return SSIZET2NUM(scale); -} - -/* - * call-seq: - * precision_scale -> [integer, integer] - * - * Returns a 2-length array; the first item is the result of - * BigDecimal#precision and the second one is of BigDecimal#scale. - * - * See BigDecimal#precision. - * See BigDecimal#scale. - */ -static VALUE -BigDecimal_precision_scale(VALUE self) -{ - ssize_t precision, scale; - BigDecimal_count_precision_and_scale(self, &precision, &scale); - return rb_assoc_new(SSIZET2NUM(precision), SSIZET2NUM(scale)); -} - -/* - * call-seq: - * n_significant_digits -> integer - * - * Returns the number of decimal significant digits in +self+. - * - * BigDecimal("0").n_significant_digits # => 0 - * BigDecimal("1").n_significant_digits # => 1 - * BigDecimal("1.1").n_significant_digits # => 2 - * BigDecimal("3.1415").n_significant_digits # => 5 - * BigDecimal("-1e20").n_significant_digits # => 1 - * BigDecimal("1e-20").n_significant_digits # => 1 - * BigDecimal("Infinity").n_significant_digits # => 0 - * BigDecimal("-Infinity").n_significant_digits # => 0 - * BigDecimal("NaN").n_significant_digits # => 0 - */ -static VALUE -BigDecimal_n_significant_digits(VALUE self) -{ - ENTER(1); - - Real *p; - GUARD_OBJ(p, GetVpValue(self, 1)); - if (VpIsZero(p) || !VpIsDef(p)) { - return INT2FIX(0); - } - - ssize_t n = p->Prec; /* The length of frac without trailing zeros. */ - for (n = p->Prec; n > 0 && p->frac[n-1] == 0; --n); - if (n == 0) return INT2FIX(0); - - DECDIG x; - int nlz = BASE_FIG; - for (x = p->frac[0]; x > 0; x /= 10) --nlz; - - int ntz = 0; - for (x = p->frac[n-1]; x > 0 && x % 10 == 0; x /= 10) ++ntz; - - ssize_t n_significant_digits = BASE_FIG*n - nlz - ntz; - return SSIZET2NUM(n_significant_digits); -} - -/* - * call-seq: - * hash -> integer - * - * Returns the integer hash value for +self+. - * - * Two instances of \BigDecimal have the same hash value if and only if - * they have equal: - * - * - Sign. - * - Fractional part. - * - Exponent. - * - */ -static VALUE -BigDecimal_hash(VALUE self) -{ - ENTER(1); - Real *p; - st_index_t hash; - - GUARD_OBJ(p, GetVpValue(self, 1)); - hash = (st_index_t)p->sign; - /* hash!=2: the case for 0(1),NaN(0) or +-Infinity(3) is sign itself */ - if(hash == 2 || hash == (st_index_t)-2) { - hash ^= rb_memhash(p->frac, sizeof(DECDIG)*p->Prec); - hash += p->exponent; - } - return ST2FIX(hash); -} - -/* - * call-seq: - * _dump -> string - * - * Returns a string representing the marshalling of +self+. - * See module Marshal. - * - * inf = BigDecimal('Infinity') # => Infinity - * dumped = inf._dump # => "9:Infinity" - * BigDecimal._load(dumped) # => Infinity - * - */ -static VALUE -BigDecimal_dump(int argc, VALUE *argv, VALUE self) -{ - ENTER(5); - Real *vp; - char *psz; - VALUE dummy; - volatile VALUE dump; - size_t len; - - rb_scan_args(argc, argv, "01", &dummy); - GUARD_OBJ(vp,GetVpValue(self, 1)); - dump = rb_str_new(0, VpNumOfChars(vp, "E")+50); - psz = RSTRING_PTR(dump); - snprintf(psz, RSTRING_LEN(dump), "%"PRIuSIZE":", VpMaxPrec(vp)*VpBaseFig()); - len = strlen(psz); - VpToString(vp, psz+len, RSTRING_LEN(dump)-len, 0, 0); - rb_str_resize(dump, strlen(psz)); - return dump; -} - -/* - * Internal method used to provide marshalling support. See the Marshal module. - */ -static VALUE -BigDecimal_load(VALUE self, VALUE str) -{ - ENTER(2); - Real *pv; - unsigned char *pch; - unsigned char ch; - unsigned long m=0; - - pch = (unsigned char *)StringValueCStr(str); - /* First get max prec */ - while((*pch) != (unsigned char)'\0' && (ch = *pch++) != (unsigned char)':') { - if(!ISDIGIT(ch)) { - rb_raise(rb_eTypeError, "load failed: invalid character in the marshaled string"); - } - m = m*10 + (unsigned long)(ch-'0'); - } - if (m > VpBaseFig()) m -= VpBaseFig(); - GUARD_OBJ(pv, VpNewRbClass(m, (char *)pch, self, true, true)); - m /= VpBaseFig(); - if (m && pv->MaxPrec > m) { - pv->MaxPrec = m+1; - } - return VpCheckGetValue(pv); -} - -static unsigned short -check_rounding_mode_option(VALUE const opts) -{ - VALUE mode; - char const *s; - long l; - - assert(RB_TYPE_P(opts, T_HASH)); - - if (NIL_P(opts)) - goto no_opt; - - mode = rb_hash_lookup2(opts, ID2SYM(id_half), Qundef); - if (mode == Qundef || NIL_P(mode)) - goto no_opt; - - if (SYMBOL_P(mode)) - mode = rb_sym2str(mode); - else if (!RB_TYPE_P(mode, T_STRING)) { - VALUE str_mode = rb_check_string_type(mode); - if (NIL_P(str_mode)) - goto invalid; - mode = str_mode; - } - s = RSTRING_PTR(mode); - l = RSTRING_LEN(mode); - switch (l) { - case 2: - if (strncasecmp(s, "up", 2) == 0) - return VP_ROUND_HALF_UP; - break; - case 4: - if (strncasecmp(s, "even", 4) == 0) - return VP_ROUND_HALF_EVEN; - else if (strncasecmp(s, "down", 4) == 0) - return VP_ROUND_HALF_DOWN; - break; - default: - break; - } - - invalid: - rb_raise(rb_eArgError, "invalid rounding mode (%"PRIsVALUE")", mode); - - no_opt: - return VpGetRoundMode(); -} - -static unsigned short -check_rounding_mode(VALUE const v) -{ - unsigned short sw; - ID id; - if (RB_TYPE_P(v, T_SYMBOL)) { - int i; - id = SYM2ID(v); - for (i = 0; i < RBD_NUM_ROUNDING_MODES; ++i) { - if (rbd_rounding_modes[i].id == id) { - return rbd_rounding_modes[i].mode; - } - } - rb_raise(rb_eArgError, "invalid rounding mode (%"PRIsVALUE")", v); - } - else { - sw = NUM2USHORT(v); - if (!VpIsRoundMode(sw)) { - rb_raise(rb_eArgError, "invalid rounding mode (%"PRIsVALUE")", v); - } - return sw; - } -} - -/* call-seq: - * BigDecimal.mode(mode, setting = nil) -> integer - * - * Returns an integer representing the mode settings - * for exception handling and rounding. - * - * These modes control exception handling: - * - * - \BigDecimal::EXCEPTION_NaN. - * - \BigDecimal::EXCEPTION_INFINITY. - * - \BigDecimal::EXCEPTION_UNDERFLOW. - * - \BigDecimal::EXCEPTION_OVERFLOW. - * - \BigDecimal::EXCEPTION_ZERODIVIDE. - * - \BigDecimal::EXCEPTION_ALL. - * - * Values for +setting+ for exception handling: - * - * - +true+: sets the given +mode+ to +true+. - * - +false+: sets the given +mode+ to +false+. - * - +nil+: does not modify the mode settings. - * - * You can use method BigDecimal.save_exception_mode - * to temporarily change, and then automatically restore, exception modes. - * - * For clarity, some examples below begin by setting all - * exception modes to +false+. - * - * This mode controls the way rounding is to be performed: - * - * - \BigDecimal::ROUND_MODE - * - * You can use method BigDecimal.save_rounding_mode - * to temporarily change, and then automatically restore, the rounding mode. - * - * NaNs - * - * Mode \BigDecimal::EXCEPTION_NaN controls behavior - * when a \BigDecimal NaN is created. - * - * Settings: - * - * - +false+ (default): Returns BigDecimal('NaN'). - * - +true+: Raises FloatDomainError. - * - * Examples: - * - * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0 - * BigDecimal('NaN') # => NaN - * BigDecimal.mode(BigDecimal::EXCEPTION_NaN, true) # => 2 - * BigDecimal('NaN') # Raises FloatDomainError - * - * Infinities - * - * Mode \BigDecimal::EXCEPTION_INFINITY controls behavior - * when a \BigDecimal Infinity or -Infinity is created. - * Settings: - * - * - +false+ (default): Returns BigDecimal('Infinity') - * or BigDecimal('-Infinity'). - * - +true+: Raises FloatDomainError. - * - * Examples: - * - * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0 - * BigDecimal('Infinity') # => Infinity - * BigDecimal('-Infinity') # => -Infinity - * BigDecimal.mode(BigDecimal::EXCEPTION_INFINITY, true) # => 1 - * BigDecimal('Infinity') # Raises FloatDomainError - * BigDecimal('-Infinity') # Raises FloatDomainError - * - * Underflow - * - * Mode \BigDecimal::EXCEPTION_UNDERFLOW controls behavior - * when a \BigDecimal underflow occurs. - * Settings: - * - * - +false+ (default): Returns BigDecimal('0') - * or BigDecimal('-Infinity'). - * - +true+: Raises FloatDomainError. - * - * Examples: - * - * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0 - * def flow_under - * x = BigDecimal('0.1') - * 100.times { x *= x } - * end - * flow_under # => 100 - * BigDecimal.mode(BigDecimal::EXCEPTION_UNDERFLOW, true) # => 4 - * flow_under # Raises FloatDomainError - * - * Overflow - * - * Mode \BigDecimal::EXCEPTION_OVERFLOW controls behavior - * when a \BigDecimal overflow occurs. - * Settings: - * - * - +false+ (default): Returns BigDecimal('Infinity') - * or BigDecimal('-Infinity'). - * - +true+: Raises FloatDomainError. - * - * Examples: - * - * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0 - * def flow_over - * x = BigDecimal('10') - * 100.times { x *= x } - * end - * flow_over # => 100 - * BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, true) # => 1 - * flow_over # Raises FloatDomainError - * - * Zero Division - * - * Mode \BigDecimal::EXCEPTION_ZERODIVIDE controls behavior - * when a zero-division occurs. - * Settings: - * - * - +false+ (default): Returns BigDecimal('Infinity') - * or BigDecimal('-Infinity'). - * - +true+: Raises FloatDomainError. - * - * Examples: - * - * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0 - * one = BigDecimal('1') - * zero = BigDecimal('0') - * one / zero # => Infinity - * BigDecimal.mode(BigDecimal::EXCEPTION_ZERODIVIDE, true) # => 16 - * one / zero # Raises FloatDomainError - * - * All Exceptions - * - * Mode \BigDecimal::EXCEPTION_ALL controls all of the above: - * - * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0 - * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, true) # => 23 - * - * Rounding - * - * Mode \BigDecimal::ROUND_MODE controls the way rounding is to be performed; - * its +setting+ values are: - * - * - +ROUND_UP+: Round away from zero. - * Aliased as +:up+. - * - +ROUND_DOWN+: Round toward zero. - * Aliased as +:down+ and +:truncate+. - * - +ROUND_HALF_UP+: Round toward the nearest neighbor; - * if the neighbors are equidistant, round away from zero. - * Aliased as +:half_up+ and +:default+. - * - +ROUND_HALF_DOWN+: Round toward the nearest neighbor; - * if the neighbors are equidistant, round toward zero. - * Aliased as +:half_down+. - * - +ROUND_HALF_EVEN+ (Banker's rounding): Round toward the nearest neighbor; - * if the neighbors are equidistant, round toward the even neighbor. - * Aliased as +:half_even+ and +:banker+. - * - +ROUND_CEILING+: Round toward positive infinity. - * Aliased as +:ceiling+ and +:ceil+. - * - +ROUND_FLOOR+: Round toward negative infinity. - * Aliased as +:floor:+. - * - */ -static VALUE -BigDecimal_mode(int argc, VALUE *argv, VALUE self) -{ - VALUE which; - VALUE val; - unsigned long f,fo; - - rb_scan_args(argc, argv, "11", &which, &val); - f = (unsigned long)NUM2INT(which); - - if (f & VP_EXCEPTION_ALL) { - /* Exception mode setting */ - fo = VpGetException(); - if (val == Qnil) return INT2FIX(fo); - if (val != Qfalse && val!=Qtrue) { - rb_raise(rb_eArgError, "second argument must be true or false"); - return Qnil; /* Not reached */ - } - if (f & VP_EXCEPTION_INFINITY) { - VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_INFINITY) : - (fo & (~VP_EXCEPTION_INFINITY)))); - } - fo = VpGetException(); - if (f & VP_EXCEPTION_NaN) { - VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_NaN) : - (fo & (~VP_EXCEPTION_NaN)))); - } - fo = VpGetException(); - if (f & VP_EXCEPTION_UNDERFLOW) { - VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_UNDERFLOW) : - (fo & (~VP_EXCEPTION_UNDERFLOW)))); - } - fo = VpGetException(); - if(f & VP_EXCEPTION_ZERODIVIDE) { - VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_ZERODIVIDE) : - (fo & (~VP_EXCEPTION_ZERODIVIDE)))); - } - fo = VpGetException(); - return INT2FIX(fo); - } - if (VP_ROUND_MODE == f) { - /* Rounding mode setting */ - unsigned short sw; - fo = VpGetRoundMode(); - if (NIL_P(val)) return INT2FIX(fo); - sw = check_rounding_mode(val); - fo = VpSetRoundMode(sw); - return INT2FIX(fo); - } - rb_raise(rb_eTypeError, "first argument for BigDecimal.mode invalid"); - return Qnil; -} - -static size_t -GetAddSubPrec(Real *a, Real *b) -{ - size_t mxs; - size_t mx = a->Prec; - SIGNED_VALUE d; - - if (!VpIsDef(a) || !VpIsDef(b)) return (size_t)-1L; - if (mx < b->Prec) mx = b->Prec; - if (a->exponent != b->exponent) { - mxs = mx; - d = a->exponent - b->exponent; - if (d < 0) d = -d; - mx = mx + (size_t)d; - if (mx < mxs) { - return VpException(VP_EXCEPTION_INFINITY, "Exponent overflow", 0); - } - } - return mx; -} - -static inline SIGNED_VALUE -check_int_precision(VALUE v) -{ - SIGNED_VALUE n; -#if SIZEOF_VALUE <= SIZEOF_LONG - n = (SIGNED_VALUE)NUM2LONG(v); -#elif SIZEOF_VALUE <= SIZEOF_LONG_LONG - n = (SIGNED_VALUE)NUM2LL(v); -#else -# error SIZEOF_VALUE is too large -#endif - if (n < 0) { - rb_raise(rb_eArgError, "negative precision"); - } - return n; -} - -static VALUE -BigDecimal_wrap_struct(VALUE obj, Real *vp) -{ - assert(is_kind_of_BigDecimal(obj)); - assert(vp != NULL); - - if (vp->obj == obj && RTYPEDDATA_DATA(obj) == vp) - return obj; - - assert(RTYPEDDATA_DATA(obj) == NULL); - assert(vp->obj == 0); - - RTYPEDDATA_DATA(obj) = vp; - vp->obj = obj; - RB_OBJ_FREEZE(obj); - return obj; -} - -VP_EXPORT Real * -VpNewRbClass(size_t mx, const char *str, VALUE klass, bool strict_p, bool raise_exception) -{ - VALUE obj = TypedData_Wrap_Struct(klass, &BigDecimal_data_type, 0); - Real *pv = VpAlloc(mx, str, strict_p, raise_exception); - if (!pv) - return NULL; - BigDecimal_wrap_struct(obj, pv); - return pv; -} - -VP_EXPORT Real * -VpCreateRbObject(size_t mx, const char *str, bool raise_exception) -{ - return VpNewRbClass(mx, str, rb_cBigDecimal, true, raise_exception); -} - -static Real * -VpCopy(Real *pv, Real const* const x) -{ - assert(x != NULL); - - pv = rbd_reallocate_struct(pv, x->MaxPrec); - pv->MaxPrec = x->MaxPrec; - pv->Prec = x->Prec; - pv->exponent = x->exponent; - pv->sign = x->sign; - pv->flag = x->flag; - MEMCPY(pv->frac, x->frac, DECDIG, pv->MaxPrec); - - return pv; -} - -/* Returns True if the value is Not a Number. */ -static VALUE -BigDecimal_IsNaN(VALUE self) -{ - Real *p = GetVpValue(self, 1); - if (VpIsNaN(p)) return Qtrue; - return Qfalse; -} - -/* Returns nil, -1, or +1 depending on whether the value is finite, - * -Infinity, or +Infinity. - */ -static VALUE -BigDecimal_IsInfinite(VALUE self) -{ - Real *p = GetVpValue(self, 1); - if (VpIsPosInf(p)) return INT2FIX(1); - if (VpIsNegInf(p)) return INT2FIX(-1); - return Qnil; -} - -/* Returns True if the value is finite (not NaN or infinite). */ -static VALUE -BigDecimal_IsFinite(VALUE self) -{ - Real *p = GetVpValue(self, 1); - if (VpIsNaN(p)) return Qfalse; - if (VpIsInf(p)) return Qfalse; - return Qtrue; -} - -static void -BigDecimal_check_num(Real *p) -{ - VpCheckException(p, true); -} - -static VALUE BigDecimal_split(VALUE self); - -/* Returns the value as an Integer. - * - * If the BigDecimal is infinity or NaN, raises FloatDomainError. - */ -static VALUE -BigDecimal_to_i(VALUE self) -{ - ENTER(5); - ssize_t e, nf; - Real *p; - - GUARD_OBJ(p, GetVpValue(self, 1)); - BigDecimal_check_num(p); - - e = VpExponent10(p); - if (e <= 0) return INT2FIX(0); - nf = VpBaseFig(); - if (e <= nf) { - return LONG2NUM((long)(VpGetSign(p) * (DECDIG_DBL_SIGNED)p->frac[0])); - } - else { - VALUE a = BigDecimal_split(self); - VALUE digits = RARRAY_AREF(a, 1); - VALUE numerator = rb_funcall(digits, rb_intern("to_i"), 0); - VALUE ret; - ssize_t dpower = e - (ssize_t)RSTRING_LEN(digits); - - if (BIGDECIMAL_NEGATIVE_P(p)) { - numerator = rb_funcall(numerator, '*', 1, INT2FIX(-1)); - } - if (dpower < 0) { - ret = rb_funcall(numerator, rb_intern("div"), 1, - rb_funcall(INT2FIX(10), rb_intern("**"), 1, - INT2FIX(-dpower))); - } - else { - ret = rb_funcall(numerator, '*', 1, - rb_funcall(INT2FIX(10), rb_intern("**"), 1, - INT2FIX(dpower))); - } - if (RB_TYPE_P(ret, T_FLOAT)) { - rb_raise(rb_eFloatDomainError, "Infinity"); - } - return ret; - } -} - -/* Returns a new Float object having approximately the same value as the - * BigDecimal number. Normal accuracy limits and built-in errors of binary - * Float arithmetic apply. - */ -static VALUE -BigDecimal_to_f(VALUE self) -{ - ENTER(1); - Real *p; - double d; - SIGNED_VALUE e; - char *buf; - volatile VALUE str; - - GUARD_OBJ(p, GetVpValue(self, 1)); - if (VpVtoD(&d, &e, p) != 1) - return rb_float_new(d); - if (e > (SIGNED_VALUE)(DBL_MAX_10_EXP+BASE_FIG)) - goto overflow; - if (e < (SIGNED_VALUE)(DBL_MIN_10_EXP-BASE_FIG)) - goto underflow; - - str = rb_str_new(0, VpNumOfChars(p, "E")); - buf = RSTRING_PTR(str); - VpToString(p, buf, RSTRING_LEN(str), 0, 0); - errno = 0; - d = strtod(buf, 0); - if (errno == ERANGE) { - if (d == 0.0) goto underflow; - if (fabs(d) >= HUGE_VAL) goto overflow; - } - return rb_float_new(d); - -overflow: - VpException(VP_EXCEPTION_OVERFLOW, "BigDecimal to Float conversion", 0); - if (BIGDECIMAL_NEGATIVE_P(p)) - return rb_float_new(VpGetDoubleNegInf()); - else - return rb_float_new(VpGetDoublePosInf()); - -underflow: - VpException(VP_EXCEPTION_UNDERFLOW, "BigDecimal to Float conversion", 0); - if (BIGDECIMAL_NEGATIVE_P(p)) - return rb_float_new(-0.0); - else - return rb_float_new(0.0); -} - - -/* Converts a BigDecimal to a Rational. - */ -static VALUE -BigDecimal_to_r(VALUE self) -{ - Real *p; - ssize_t sign, power, denomi_power; - VALUE a, digits, numerator; - - p = GetVpValue(self, 1); - BigDecimal_check_num(p); - - sign = VpGetSign(p); - power = VpExponent10(p); - a = BigDecimal_split(self); - digits = RARRAY_AREF(a, 1); - denomi_power = power - RSTRING_LEN(digits); - numerator = rb_funcall(digits, rb_intern("to_i"), 0); - - if (sign < 0) { - numerator = rb_funcall(numerator, '*', 1, INT2FIX(-1)); - } - if (denomi_power < 0) { - return rb_Rational(numerator, - rb_funcall(INT2FIX(10), rb_intern("**"), 1, - INT2FIX(-denomi_power))); - } - else { - return rb_Rational1(rb_funcall(numerator, '*', 1, - rb_funcall(INT2FIX(10), rb_intern("**"), 1, - INT2FIX(denomi_power)))); - } -} - -/* The coerce method provides support for Ruby type coercion. It is not - * enabled by default. - * - * This means that binary operations like + * / or - can often be performed - * on a BigDecimal and an object of another type, if the other object can - * be coerced into a BigDecimal value. - * - * e.g. - * a = BigDecimal("1.0") - * b = a / 2.0 #=> 0.5 - * - * Note that coercing a String to a BigDecimal is not supported by default; - * it requires a special compile-time option when building Ruby. - */ -static VALUE -BigDecimal_coerce(VALUE self, VALUE other) -{ - ENTER(2); - VALUE obj; - Real *b; - - if (RB_TYPE_P(other, T_FLOAT)) { - GUARD_OBJ(b, GetVpValueWithPrec(other, 0, 1)); - obj = rb_assoc_new(VpCheckGetValue(b), self); - } - else { - if (RB_TYPE_P(other, T_RATIONAL)) { - Real* pv = DATA_PTR(self); - GUARD_OBJ(b, GetVpValueWithPrec(other, pv->Prec*VpBaseFig(), 1)); - } - else { - GUARD_OBJ(b, GetVpValue(other, 1)); - } - obj = rb_assoc_new(b->obj, self); - } - - return obj; -} - -/* - * call-seq: - * +big_decimal -> self - * - * Returns +self+: - * - * +BigDecimal(5) # => 0.5e1 - * +BigDecimal(-5) # => -0.5e1 - * - */ - -static VALUE -BigDecimal_uplus(VALUE self) -{ - return self; -} - - /* - * call-seq: - * self + value -> bigdecimal - * - * Returns the \BigDecimal sum of +self+ and +value+: - * - * b = BigDecimal('111111.111') # => 0.111111111e6 - * b + 2 # => 0.111113111e6 - * b + 2.0 # => 0.111113111e6 - * b + Rational(2, 1) # => 0.111113111e6 - * b + Complex(2, 0) # => (0.111113111e6+0i) - * - * See the {Note About Precision}[BigDecimal.html#class-BigDecimal-label-A+Note+About+Precision]. - * - */ - -static VALUE -BigDecimal_add(VALUE self, VALUE r) -{ - ENTER(5); - Real *c, *a, *b; - size_t mx; - - GUARD_OBJ(a, GetVpValue(self, 1)); - if (RB_TYPE_P(r, T_FLOAT)) { - b = GetVpValueWithPrec(r, 0, 1); - } - else if (RB_TYPE_P(r, T_RATIONAL)) { - b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1); - } - else { - b = GetVpValue(r, 0); - } - - if (!b) return DoSomeOne(self,r,'+'); - SAVE(b); - - if (VpIsNaN(b)) return b->obj; - if (VpIsNaN(a)) return a->obj; - - mx = GetAddSubPrec(a, b); - if (mx == (size_t)-1L) { - GUARD_OBJ(c, NewZeroWrapLimited(1, VpBaseFig() + 1)); - VpAddSub(c, a, b, 1); - } - else { - GUARD_OBJ(c, NewZeroWrapLimited(1, mx * (VpBaseFig() + 1))); - if (!mx) { - VpSetInf(c, VpGetSign(a)); - } - else { - VpAddSub(c, a, b, 1); - } - } - return VpCheckGetValue(c); -} - - /* - * call-seq: - * self - value -> bigdecimal - * - * Returns the \BigDecimal difference of +self+ and +value+: - * - * b = BigDecimal('333333.333') # => 0.333333333e6 - * b - 2 # => 0.333331333e6 - * b - 2.0 # => 0.333331333e6 - * b - Rational(2, 1) # => 0.333331333e6 - * b - Complex(2, 0) # => (0.333331333e6+0i) - * - * See the {Note About Precision}[BigDecimal.html#class-BigDecimal-label-A+Note+About+Precision]. - * - */ -static VALUE -BigDecimal_sub(VALUE self, VALUE r) -{ - ENTER(5); - Real *c, *a, *b; - size_t mx; - - GUARD_OBJ(a, GetVpValue(self,1)); - if (RB_TYPE_P(r, T_FLOAT)) { - b = GetVpValueWithPrec(r, 0, 1); - } - else if (RB_TYPE_P(r, T_RATIONAL)) { - b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1); - } - else { - b = GetVpValue(r,0); - } - - if (!b) return DoSomeOne(self,r,'-'); - SAVE(b); - - if (VpIsNaN(b)) return b->obj; - if (VpIsNaN(a)) return a->obj; - - mx = GetAddSubPrec(a,b); - if (mx == (size_t)-1L) { - GUARD_OBJ(c, NewZeroWrapLimited(1, VpBaseFig() + 1)); - VpAddSub(c, a, b, -1); - } - else { - GUARD_OBJ(c, NewZeroWrapLimited(1, mx *(VpBaseFig() + 1))); - if (!mx) { - VpSetInf(c,VpGetSign(a)); - } - else { - VpAddSub(c, a, b, -1); - } - } - return VpCheckGetValue(c); -} - -static VALUE -BigDecimalCmp(VALUE self, VALUE r,char op) -{ - ENTER(5); - SIGNED_VALUE e; - Real *a, *b=0; - GUARD_OBJ(a, GetVpValue(self, 1)); - switch (TYPE(r)) { - case T_DATA: - if (!is_kind_of_BigDecimal(r)) break; - /* fall through */ - case T_FIXNUM: - /* fall through */ - case T_BIGNUM: - GUARD_OBJ(b, GetVpValue(r, 0)); - break; - - case T_FLOAT: - GUARD_OBJ(b, GetVpValueWithPrec(r, 0, 0)); - break; - - case T_RATIONAL: - GUARD_OBJ(b, GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 0)); - break; - - default: - break; - } - if (b == NULL) { - ID f = 0; - - switch (op) { - case '*': - return rb_num_coerce_cmp(self, r, rb_intern("<=>")); - - case '=': - return RTEST(rb_num_coerce_cmp(self, r, rb_intern("=="))) ? Qtrue : Qfalse; - - case 'G': - f = rb_intern(">="); - break; - - case 'L': - f = rb_intern("<="); - break; - - case '>': - /* fall through */ - case '<': - f = (ID)op; - break; - - default: - break; - } - return rb_num_coerce_relop(self, r, f); - } - SAVE(b); - e = VpComp(a, b); - if (e == 999) - return (op == '*') ? Qnil : Qfalse; - switch (op) { - case '*': - return INT2FIX(e); /* any op */ - - case '=': - if (e == 0) return Qtrue; - return Qfalse; - - case 'G': - if (e >= 0) return Qtrue; - return Qfalse; - - case '>': - if (e > 0) return Qtrue; - return Qfalse; - - case 'L': - if (e <= 0) return Qtrue; - return Qfalse; - - case '<': - if (e < 0) return Qtrue; - return Qfalse; - - default: - break; - } - - rb_bug("Undefined operation in BigDecimalCmp()"); - - UNREACHABLE; -} - -/* Returns True if the value is zero. */ -static VALUE -BigDecimal_zero(VALUE self) -{ - Real *a = GetVpValue(self, 1); - return VpIsZero(a) ? Qtrue : Qfalse; -} - -/* Returns self if the value is non-zero, nil otherwise. */ -static VALUE -BigDecimal_nonzero(VALUE self) -{ - Real *a = GetVpValue(self, 1); - return VpIsZero(a) ? Qnil : self; -} - -/* The comparison operator. - * a <=> b is 0 if a == b, 1 if a > b, -1 if a < b. - */ -static VALUE -BigDecimal_comp(VALUE self, VALUE r) -{ - return BigDecimalCmp(self, r, '*'); -} - -/* - * Tests for value equality; returns true if the values are equal. - * - * The == and === operators and the eql? method have the same implementation - * for BigDecimal. - * - * Values may be coerced to perform the comparison: - * - * BigDecimal('1.0') == 1.0 #=> true - */ -static VALUE -BigDecimal_eq(VALUE self, VALUE r) -{ - return BigDecimalCmp(self, r, '='); -} - -/* call-seq: - * self < other -> true or false - * - * Returns +true+ if +self+ is less than +other+, +false+ otherwise: - * - * b = BigDecimal('1.5') # => 0.15e1 - * b < 2 # => true - * b < 2.0 # => true - * b < Rational(2, 1) # => true - * b < 1.5 # => false - * - * Raises an exception if the comparison cannot be made. - * - */ -static VALUE -BigDecimal_lt(VALUE self, VALUE r) -{ - return BigDecimalCmp(self, r, '<'); -} - -/* call-seq: - * self <= other -> true or false - * - * Returns +true+ if +self+ is less or equal to than +other+, +false+ otherwise: - * - * b = BigDecimal('1.5') # => 0.15e1 - * b <= 2 # => true - * b <= 2.0 # => true - * b <= Rational(2, 1) # => true - * b <= 1.5 # => true - * b < 1 # => false - * - * Raises an exception if the comparison cannot be made. - * - */ -static VALUE -BigDecimal_le(VALUE self, VALUE r) -{ - return BigDecimalCmp(self, r, 'L'); -} - -/* call-seq: - * self > other -> true or false - * - * Returns +true+ if +self+ is greater than +other+, +false+ otherwise: - * - * b = BigDecimal('1.5') - * b > 1 # => true - * b > 1.0 # => true - * b > Rational(1, 1) # => true - * b > 2 # => false - * - * Raises an exception if the comparison cannot be made. - * - */ -static VALUE -BigDecimal_gt(VALUE self, VALUE r) -{ - return BigDecimalCmp(self, r, '>'); -} - -/* call-seq: - * self >= other -> true or false - * - * Returns +true+ if +self+ is greater than or equal to +other+, +false+ otherwise: - * - * b = BigDecimal('1.5') - * b >= 1 # => true - * b >= 1.0 # => true - * b >= Rational(1, 1) # => true - * b >= 1.5 # => true - * b > 2 # => false - * - * Raises an exception if the comparison cannot be made. - * - */ -static VALUE -BigDecimal_ge(VALUE self, VALUE r) -{ - return BigDecimalCmp(self, r, 'G'); -} - -/* - * call-seq: - * -self -> bigdecimal - * - * Returns the \BigDecimal negation of self: - * - * b0 = BigDecimal('1.5') - * b1 = -b0 # => -0.15e1 - * b2 = -b1 # => 0.15e1 - * - */ - -static VALUE -BigDecimal_neg(VALUE self) -{ - ENTER(5); - Real *c, *a; - GUARD_OBJ(a, GetVpValue(self, 1)); - GUARD_OBJ(c, NewZeroWrapLimited(1, a->Prec *(VpBaseFig() + 1))); - VpAsgn(c, a, -1); - return VpCheckGetValue(c); -} - -/* - * call-seq: - * a * b -> bigdecimal - * - * Multiply by the specified value. - * - * The result precision will be the precision of the sum of each precision. - * - * See BigDecimal#mult. - */ - -static VALUE -BigDecimal_mult(VALUE self, VALUE r) -{ - ENTER(5); - Real *c, *a, *b; - size_t mx; - - GUARD_OBJ(a, GetVpValue(self, 1)); - if (RB_TYPE_P(r, T_FLOAT)) { - b = GetVpValueWithPrec(r, 0, 1); - } - else if (RB_TYPE_P(r, T_RATIONAL)) { - b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1); - } - else { - b = GetVpValue(r,0); - } - - if (!b) return DoSomeOne(self, r, '*'); - SAVE(b); - - mx = a->Prec + b->Prec; - GUARD_OBJ(c, NewZeroWrapLimited(1, mx * (VpBaseFig() + 1))); - VpMult(c, a, b); - return VpCheckGetValue(c); -} - -static VALUE BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod); - -/* call-seq: - * a / b -> bigdecimal - * - * Divide by the specified value. - * - * The result precision will be the precision of the larger operand, - * but its minimum is 2*Float::DIG. - * - * See BigDecimal#div. - * See BigDecimal#quo. - */ -static VALUE -BigDecimal_div(VALUE self, VALUE r) -/* For c = self/r: with round operation */ -{ - if ( - !is_kind_of_BigDecimal(r) && - !RB_INTEGER_TYPE_P(r) && - !RB_TYPE_P(r, T_FLOAT) && - !RB_TYPE_P(r, T_RATIONAL) - ) { - return DoSomeOne(self, r, '/'); - } - return BigDecimal_div2(self, r, INT2FIX(0)); -} - -static VALUE BigDecimal_round(int argc, VALUE *argv, VALUE self); - -/* call-seq: - * quo(value) -> bigdecimal - * quo(value, digits) -> bigdecimal - * - * Divide by the specified value. - * - * digits:: If specified and less than the number of significant digits of - * the result, the result is rounded to the given number of digits, - * according to the rounding mode indicated by BigDecimal.mode. - * - * If digits is 0 or omitted, the result is the same as for the - * / operator. - * - * See BigDecimal#/. - * See BigDecimal#div. - */ -static VALUE -BigDecimal_quo(int argc, VALUE *argv, VALUE self) -{ - VALUE value, digits, result; - SIGNED_VALUE n = -1; - - argc = rb_scan_args(argc, argv, "11", &value, &digits); - if (argc > 1) { - n = check_int_precision(digits); - } - - if (n > 0) { - result = BigDecimal_div2(self, value, digits); - } - else { - result = BigDecimal_div(self, value); - } - - return result; -} - -/* - * %: mod = a%b = a - (a.to_f/b).floor * b - * div = (a.to_f/b).floor - */ -static VALUE -BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod) -{ - ENTER(8); - Real *c=NULL, *d=NULL, *res=NULL; - Real *a, *b; - ssize_t a_prec, b_prec; - size_t mx; - - TypedData_Get_Struct(self, Real, &BigDecimal_data_type, a); - SAVE(a); - - VALUE rr = r; - if (is_kind_of_BigDecimal(rr)) { - /* do nothing */ - } - else if (RB_INTEGER_TYPE_P(r)) { - rr = rb_inum_convert_to_BigDecimal(r, 0, true); - } - else if (RB_TYPE_P(r, T_FLOAT)) { - rr = rb_float_convert_to_BigDecimal(r, 0, true); - } - else if (RB_TYPE_P(r, T_RATIONAL)) { - rr = rb_rational_convert_to_BigDecimal(r, a->Prec*BASE_FIG, true); - } - - if (!is_kind_of_BigDecimal(rr)) { - return Qfalse; - } - - TypedData_Get_Struct(rr, Real, &BigDecimal_data_type, b); - SAVE(b); - - if (VpIsNaN(a) || VpIsNaN(b)) goto NaN; - if (VpIsInf(a) && VpIsInf(b)) goto NaN; - if (VpIsZero(b)) { - rb_raise(rb_eZeroDivError, "divided by 0"); - } - if (VpIsInf(a)) { - if (VpGetSign(a) == VpGetSign(b)) { - VALUE inf = BigDecimal_positive_infinity(); - TypedData_Get_Struct(inf, Real, &BigDecimal_data_type, *div); - } - else { - VALUE inf = BigDecimal_negative_infinity(); - TypedData_Get_Struct(inf, Real, &BigDecimal_data_type, *div); - } - VALUE nan = BigDecimal_nan(); - TypedData_Get_Struct(nan, Real, &BigDecimal_data_type, *mod); - return Qtrue; - } - if (VpIsInf(b)) { - VALUE zero = BigDecimal_positive_zero(); - TypedData_Get_Struct(zero, Real, &BigDecimal_data_type, *div); - *mod = a; - return Qtrue; - } - if (VpIsZero(a)) { - VALUE zero = BigDecimal_positive_zero(); - TypedData_Get_Struct(zero, Real, &BigDecimal_data_type, *div); - TypedData_Get_Struct(zero, Real, &BigDecimal_data_type, *mod); - return Qtrue; - } - - BigDecimal_count_precision_and_scale(self, &a_prec, NULL); - BigDecimal_count_precision_and_scale(rr, &b_prec, NULL); - - mx = (a_prec > b_prec) ? a_prec : b_prec; - mx *= 2; - - if (2*BIGDECIMAL_DOUBLE_FIGURES > mx) - mx = 2*BIGDECIMAL_DOUBLE_FIGURES; - - GUARD_OBJ(c, NewZeroWrapLimited(1, mx + 2*BASE_FIG)); - GUARD_OBJ(res, NewZeroWrapNolimit(1, mx*2 + 2*BASE_FIG)); - VpDivd(c, res, a, b); - - mx = c->Prec * BASE_FIG; - GUARD_OBJ(d, NewZeroWrapLimited(1, mx)); - VpActiveRound(d, c, VP_ROUND_DOWN, 0); - - VpMult(res, d, b); - VpAddSub(c, a, res, -1); - - if (!VpIsZero(c) && (VpGetSign(a) * VpGetSign(b) < 0)) { - /* result adjustment for negative case */ - res = rbd_reallocate_struct(res, d->MaxPrec); - res->MaxPrec = d->MaxPrec; - VpAddSub(res, d, VpOne(), -1); - GUARD_OBJ(d, NewZeroWrapLimited(1, GetAddSubPrec(c, b) * 2*BASE_FIG)); - VpAddSub(d, c, b, 1); - *div = res; - *mod = d; - } - else { - *div = d; - *mod = c; - } - return Qtrue; - - NaN: - { - VALUE nan = BigDecimal_nan(); - TypedData_Get_Struct(nan, Real, &BigDecimal_data_type, *div); - TypedData_Get_Struct(nan, Real, &BigDecimal_data_type, *mod); - } - return Qtrue; -} - -/* call-seq: - * a % b - * a.modulo(b) - * - * Returns the modulus from dividing by b. - * - * See BigDecimal#divmod. - */ -static VALUE -BigDecimal_mod(VALUE self, VALUE r) /* %: a%b = a - (a.to_f/b).floor * b */ -{ - ENTER(3); - Real *div = NULL, *mod = NULL; - - if (BigDecimal_DoDivmod(self, r, &div, &mod)) { - SAVE(div); SAVE(mod); - return VpCheckGetValue(mod); - } - return DoSomeOne(self, r, '%'); -} - -static VALUE -BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv) -{ - ENTER(10); - size_t mx; - Real *a = NULL, *b = NULL, *c = NULL, *res = NULL, *d = NULL, *rr = NULL, *ff = NULL; - Real *f = NULL; - - GUARD_OBJ(a, GetVpValue(self, 1)); - if (RB_TYPE_P(r, T_FLOAT)) { - b = GetVpValueWithPrec(r, 0, 1); - } - else if (RB_TYPE_P(r, T_RATIONAL)) { - b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1); - } - else { - b = GetVpValue(r, 0); - } - - if (!b) return DoSomeOne(self, r, rb_intern("remainder")); - SAVE(b); - - if (VpIsPosInf(b) || VpIsNegInf(b)) { - GUARD_OBJ(*dv, NewZeroWrapLimited(1, 1)); - VpSetZero(*dv, 1); - *rv = a; - return Qnil; - } - - mx = (a->MaxPrec + b->MaxPrec) *VpBaseFig(); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - GUARD_OBJ(res, NewZeroWrapNolimit(1, (mx+1) * 2 + (VpBaseFig() + 1))); - GUARD_OBJ(rr, NewZeroWrapNolimit(1, (mx+1) * 2 + (VpBaseFig() + 1))); - GUARD_OBJ(ff, NewZeroWrapNolimit(1, (mx+1) * 2 + (VpBaseFig() + 1))); - - VpDivd(c, res, a, b); - - mx = c->Prec *(VpBaseFig() + 1); - - GUARD_OBJ(d, NewZeroWrapLimited(1, mx)); - GUARD_OBJ(f, NewZeroWrapLimited(1, mx)); - - VpActiveRound(d, c, VP_ROUND_DOWN, 0); /* 0: round off */ - - VpFrac(f, c); - VpMult(rr, f, b); - VpAddSub(ff, res, rr, 1); - - *dv = d; - *rv = ff; - return Qnil; -} - -/* call-seq: - * remainder(value) - * - * Returns the remainder from dividing by the value. - * - * x.remainder(y) means x-y*(x/y).truncate - */ -static VALUE -BigDecimal_remainder(VALUE self, VALUE r) /* remainder */ -{ - VALUE f; - Real *d, *rv = 0; - f = BigDecimal_divremain(self, r, &d, &rv); - if (!NIL_P(f)) return f; - return VpCheckGetValue(rv); -} - -/* call-seq: - * divmod(value) - * - * Divides by the specified value, and returns the quotient and modulus - * as BigDecimal numbers. The quotient is rounded towards negative infinity. - * - * For example: - * - * require 'bigdecimal' - * - * a = BigDecimal("42") - * b = BigDecimal("9") - * - * q, m = a.divmod(b) - * - * c = q * b + m - * - * a == c #=> true - * - * The quotient q is (a/b).floor, and the modulus is the amount that must be - * added to q * b to get a. - */ -static VALUE -BigDecimal_divmod(VALUE self, VALUE r) -{ - ENTER(5); - Real *div = NULL, *mod = NULL; - - if (BigDecimal_DoDivmod(self, r, &div, &mod)) { - SAVE(div); SAVE(mod); - return rb_assoc_new(VpCheckGetValue(div), VpCheckGetValue(mod)); - } - return DoSomeOne(self,r,rb_intern("divmod")); -} - -/* - * Do the same manner as Float#div when n is nil. - * Do the same manner as BigDecimal#quo when n is 0. - */ -static inline VALUE -BigDecimal_div2(VALUE self, VALUE b, VALUE n) -{ - ENTER(5); - SIGNED_VALUE ix; - Real *res = NULL; - Real *av = NULL, *bv = NULL, *cv = NULL; - size_t mx, pl; - - if (NIL_P(n)) { /* div in Float sense */ - Real *div = NULL; - Real *mod; - if (BigDecimal_DoDivmod(self, b, &div, &mod)) { - return BigDecimal_to_i(VpCheckGetValue(div)); - } - return DoSomeOne(self, b, rb_intern("div")); - } - - /* div in BigDecimal sense */ - ix = check_int_precision(n); - - pl = VpSetPrecLimit(0); - if (ix == 0) ix = pl; - - GUARD_OBJ(av, GetVpValue(self, 1)); - if (RB_FLOAT_TYPE_P(b) && ix > BIGDECIMAL_DOUBLE_FIGURES) { - /* TODO: I want to refactor this precision control for a float value later - * by introducing an implicit conversion function instead of - * GetVpValueWithPrec. */ - GUARD_OBJ(bv, GetVpValueWithPrec(b, BIGDECIMAL_DOUBLE_FIGURES, 1)); - } - else { - GUARD_OBJ(bv, GetVpValueWithPrec(b, ix, 1)); - } - - if (ix == 0) { - ssize_t a_prec, b_prec; - VpCountPrecisionAndScale(av, &a_prec, NULL); - VpCountPrecisionAndScale(bv, &b_prec, NULL); - ix = ((a_prec > b_prec) ? a_prec : b_prec) + BIGDECIMAL_DOUBLE_FIGURES; - if (2 * BIGDECIMAL_DOUBLE_FIGURES > ix) - ix = 2 * BIGDECIMAL_DOUBLE_FIGURES; - } - - // VpDivd needs 2 extra DECDIGs. One more is needed for rounding. - GUARD_OBJ(cv, NewZeroWrapLimited(1, ix + 3 * VpBaseFig())); - - mx = bv->Prec + cv->MaxPrec - 1; - if (mx <= av->Prec) mx = av->Prec + 1; - GUARD_OBJ(res, NewZeroWrapNolimit(1, mx * VpBaseFig())); - VpDivd(cv, res, av, bv); - VpSetPrecLimit(pl); - if (!VpIsZero(res)) { - // Remainder value affects rounding result. - // ROUND_UP cv = 0.1e0 with ix=10 will be: - // 0.1e0 if remainder == 0 - // 0.1000000001e0 if remainder != 0 - size_t idx = roomof(ix, BASE_FIG); - while (cv->Prec <= idx) cv->frac[cv->Prec++] = 0; - if (cv->frac[idx] == 0 || cv->frac[idx] == HALF_BASE) cv->frac[idx]++; - } - VpLeftRound(cv, VpGetRoundMode(), ix); - return VpCheckGetValue(cv); -} - - /* - * Document-method: BigDecimal#div - * - * call-seq: - * div(value) -> integer - * div(value, digits) -> bigdecimal or integer - * - * Divide by the specified value. - * - * digits:: If specified and less than the number of significant digits of the - * result, the result is rounded to that number of digits, according - * to BigDecimal.mode. - * - * If digits is 0, the result is the same as for the / operator - * or #quo. - * - * If digits is not specified, the result is an integer, - * by analogy with Float#div; see also BigDecimal#divmod. - * - * See BigDecimal#/. - * See BigDecimal#quo. - * - * Examples: - * - * a = BigDecimal("4") - * b = BigDecimal("3") - * - * a.div(b, 3) # => 0.133e1 - * - * a.div(b, 0) # => 0.1333333333333333333e1 - * a / b # => 0.1333333333333333333e1 - * a.quo(b) # => 0.1333333333333333333e1 - * - * a.div(b) # => 1 - */ -static VALUE -BigDecimal_div3(int argc, VALUE *argv, VALUE self) -{ - VALUE b,n; - - rb_scan_args(argc, argv, "11", &b, &n); - - return BigDecimal_div2(self, b, n); -} - - /* - * call-seq: - * add(value, ndigits) -> new_bigdecimal - * - * Returns the \BigDecimal sum of +self+ and +value+ - * with a precision of +ndigits+ decimal digits. - * - * When +ndigits+ is less than the number of significant digits - * in the sum, the sum is rounded to that number of digits, - * according to the current rounding mode; see BigDecimal.mode. - * - * Examples: - * - * # Set the rounding mode. - * BigDecimal.mode(BigDecimal::ROUND_MODE, :half_up) - * b = BigDecimal('111111.111') - * b.add(1, 0) # => 0.111112111e6 - * b.add(1, 3) # => 0.111e6 - * b.add(1, 6) # => 0.111112e6 - * b.add(1, 15) # => 0.111112111e6 - * b.add(1.0, 15) # => 0.111112111e6 - * b.add(Rational(1, 1), 15) # => 0.111112111e6 - * - */ - -static VALUE -BigDecimal_add2(VALUE self, VALUE b, VALUE n) -{ - ENTER(2); - Real *cv; - SIGNED_VALUE mx = check_int_precision(n); - if (mx == 0) return BigDecimal_add(self, b); - else { - size_t pl = VpSetPrecLimit(0); - VALUE c = BigDecimal_add(self, b); - VpSetPrecLimit(pl); - GUARD_OBJ(cv, GetVpValue(c, 1)); - VpLeftRound(cv, VpGetRoundMode(), mx); - return VpCheckGetValue(cv); - } -} - -/* call-seq: - * sub(value, digits) -> bigdecimal - * - * Subtract the specified value. - * - * e.g. - * c = a.sub(b,n) - * - * digits:: If specified and less than the number of significant digits of the - * result, the result is rounded to that number of digits, according - * to BigDecimal.mode. - * - */ -static VALUE -BigDecimal_sub2(VALUE self, VALUE b, VALUE n) -{ - ENTER(2); - Real *cv; - SIGNED_VALUE mx = check_int_precision(n); - if (mx == 0) return BigDecimal_sub(self, b); - else { - size_t pl = VpSetPrecLimit(0); - VALUE c = BigDecimal_sub(self, b); - VpSetPrecLimit(pl); - GUARD_OBJ(cv, GetVpValue(c, 1)); - VpLeftRound(cv, VpGetRoundMode(), mx); - return VpCheckGetValue(cv); - } -} - - /* - * call-seq: - * mult(other, ndigits) -> bigdecimal - * - * Returns the \BigDecimal product of +self+ and +value+ - * with a precision of +ndigits+ decimal digits. - * - * When +ndigits+ is less than the number of significant digits - * in the sum, the sum is rounded to that number of digits, - * according to the current rounding mode; see BigDecimal.mode. - * - * Examples: - * - * # Set the rounding mode. - * BigDecimal.mode(BigDecimal::ROUND_MODE, :half_up) - * b = BigDecimal('555555.555') - * b.mult(3, 0) # => 0.1666666665e7 - * b.mult(3, 3) # => 0.167e7 - * b.mult(3, 6) # => 0.166667e7 - * b.mult(3, 15) # => 0.1666666665e7 - * b.mult(3.0, 0) # => 0.1666666665e7 - * b.mult(Rational(3, 1), 0) # => 0.1666666665e7 - * b.mult(Complex(3, 0), 0) # => (0.1666666665e7+0.0i) - * - */ - -static VALUE -BigDecimal_mult2(VALUE self, VALUE b, VALUE n) -{ - ENTER(2); - Real *cv; - SIGNED_VALUE mx = check_int_precision(n); - if (mx == 0) return BigDecimal_mult(self, b); - else { - size_t pl = VpSetPrecLimit(0); - VALUE c = BigDecimal_mult(self, b); - VpSetPrecLimit(pl); - GUARD_OBJ(cv, GetVpValue(c, 1)); - VpLeftRound(cv, VpGetRoundMode(), mx); - return VpCheckGetValue(cv); - } -} - -/* - * call-seq: - * abs -> bigdecimal - * - * Returns the \BigDecimal absolute value of +self+: - * - * BigDecimal('5').abs # => 0.5e1 - * BigDecimal('-3').abs # => 0.3e1 - * - */ - -static VALUE -BigDecimal_abs(VALUE self) -{ - ENTER(5); - Real *c, *a; - size_t mx; - - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec *(VpBaseFig() + 1); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpAsgn(c, a, 1); - VpChangeSign(c, 1); - return VpCheckGetValue(c); -} - -/* call-seq: - * sqrt(n) - * - * Returns the square root of the value. - * - * Result has at least n significant digits. - */ -static VALUE -BigDecimal_sqrt(VALUE self, VALUE nFig) -{ - ENTER(5); - Real *c, *a; - size_t mx, n; - - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec * (VpBaseFig() + 1); - - n = check_int_precision(nFig); - n += VpDblFig() + VpBaseFig(); - if (mx <= n) mx = n; - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpSqrt(c, a); - return VpCheckGetValue(c); -} - -/* Return the integer part of the number, as a BigDecimal. - */ -static VALUE -BigDecimal_fix(VALUE self) -{ - ENTER(5); - Real *c, *a; - size_t mx; - - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec *(VpBaseFig() + 1); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpActiveRound(c, a, VP_ROUND_DOWN, 0); /* 0: round off */ - return VpCheckGetValue(c); -} - -/* call-seq: - * round(n, mode) - * - * Round to the nearest integer (by default), returning the result as a - * BigDecimal if n is specified and positive, or as an Integer if it isn't. - * - * BigDecimal('3.14159').round #=> 3 - * BigDecimal('8.7').round #=> 9 - * BigDecimal('-9.9').round #=> -10 - * - * BigDecimal('3.14159').round(2).class.name #=> "BigDecimal" - * BigDecimal('3.14159').round.class.name #=> "Integer" - * BigDecimal('3.14159').round(0).class.name #=> "Integer" - * - * If n is specified and positive, the fractional part of the result has no - * more than that many digits. - * - * If n is specified and negative, at least that many digits to the left of the - * decimal point will be 0 in the result, and return value will be an Integer. - * - * BigDecimal('3.14159').round(3) #=> 3.142 - * BigDecimal('13345.234').round(-2) #=> 13300 - * - * The value of the optional mode argument can be used to determine how - * rounding is performed; see BigDecimal.mode. - */ -static VALUE -BigDecimal_round(int argc, VALUE *argv, VALUE self) -{ - ENTER(5); - Real *c, *a; - int iLoc = 0; - VALUE vLoc; - VALUE vRound; - int round_to_int = 0; - size_t mx, pl; - - unsigned short sw = VpGetRoundMode(); - - switch (rb_scan_args(argc, argv, "02", &vLoc, &vRound)) { - case 0: - iLoc = 0; - round_to_int = 1; - break; - case 1: - if (RB_TYPE_P(vLoc, T_HASH)) { - sw = check_rounding_mode_option(vLoc); - } - else { - iLoc = NUM2INT(vLoc); - if (iLoc < 1) round_to_int = 1; - } - break; - case 2: - iLoc = NUM2INT(vLoc); - if (RB_TYPE_P(vRound, T_HASH)) { - sw = check_rounding_mode_option(vRound); - } - else { - sw = check_rounding_mode(vRound); - } - break; - default: - break; - } - - pl = VpSetPrecLimit(0); - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec * (VpBaseFig() + 1); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpSetPrecLimit(pl); - VpActiveRound(c, a, sw, iLoc); - if (round_to_int) { - return BigDecimal_to_i(VpCheckGetValue(c)); - } - return VpCheckGetValue(c); -} - -/* call-seq: - * truncate(n) - * - * Truncate to the nearest integer (by default), returning the result as a - * BigDecimal. - * - * BigDecimal('3.14159').truncate #=> 3 - * BigDecimal('8.7').truncate #=> 8 - * BigDecimal('-9.9').truncate #=> -9 - * - * If n is specified and positive, the fractional part of the result has no - * more than that many digits. - * - * If n is specified and negative, at least that many digits to the left of the - * decimal point will be 0 in the result. - * - * BigDecimal('3.14159').truncate(3) #=> 3.141 - * BigDecimal('13345.234').truncate(-2) #=> 13300.0 - */ -static VALUE -BigDecimal_truncate(int argc, VALUE *argv, VALUE self) -{ - ENTER(5); - Real *c, *a; - int iLoc; - VALUE vLoc; - size_t mx, pl = VpSetPrecLimit(0); - - if (rb_scan_args(argc, argv, "01", &vLoc) == 0) { - iLoc = 0; - } - else { - iLoc = NUM2INT(vLoc); - } - - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec * (VpBaseFig() + 1); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpSetPrecLimit(pl); - VpActiveRound(c, a, VP_ROUND_DOWN, iLoc); /* 0: truncate */ - if (argc == 0) { - return BigDecimal_to_i(VpCheckGetValue(c)); - } - return VpCheckGetValue(c); -} - -/* Return the fractional part of the number, as a BigDecimal. - */ -static VALUE -BigDecimal_frac(VALUE self) -{ - ENTER(5); - Real *c, *a; - size_t mx; - - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec * (VpBaseFig() + 1); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpFrac(c, a); - return VpCheckGetValue(c); -} - -/* call-seq: - * floor(n) - * - * Return the largest integer less than or equal to the value, as a BigDecimal. - * - * BigDecimal('3.14159').floor #=> 3 - * BigDecimal('-9.1').floor #=> -10 - * - * If n is specified and positive, the fractional part of the result has no - * more than that many digits. - * - * If n is specified and negative, at least that - * many digits to the left of the decimal point will be 0 in the result. - * - * BigDecimal('3.14159').floor(3) #=> 3.141 - * BigDecimal('13345.234').floor(-2) #=> 13300.0 - */ -static VALUE -BigDecimal_floor(int argc, VALUE *argv, VALUE self) -{ - ENTER(5); - Real *c, *a; - int iLoc; - VALUE vLoc; - size_t mx, pl = VpSetPrecLimit(0); - - if (rb_scan_args(argc, argv, "01", &vLoc)==0) { - iLoc = 0; - } - else { - iLoc = NUM2INT(vLoc); - } - - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec * (VpBaseFig() + 1); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpSetPrecLimit(pl); - VpActiveRound(c, a, VP_ROUND_FLOOR, iLoc); -#ifdef BIGDECIMAL_DEBUG - VPrint(stderr, "floor: c=%\n", c); -#endif - if (argc == 0) { - return BigDecimal_to_i(VpCheckGetValue(c)); - } - return VpCheckGetValue(c); -} - -/* call-seq: - * ceil(n) - * - * Return the smallest integer greater than or equal to the value, as a BigDecimal. - * - * BigDecimal('3.14159').ceil #=> 4 - * BigDecimal('-9.1').ceil #=> -9 - * - * If n is specified and positive, the fractional part of the result has no - * more than that many digits. - * - * If n is specified and negative, at least that - * many digits to the left of the decimal point will be 0 in the result. - * - * BigDecimal('3.14159').ceil(3) #=> 3.142 - * BigDecimal('13345.234').ceil(-2) #=> 13400.0 - */ -static VALUE -BigDecimal_ceil(int argc, VALUE *argv, VALUE self) -{ - ENTER(5); - Real *c, *a; - int iLoc; - VALUE vLoc; - size_t mx, pl = VpSetPrecLimit(0); - - if (rb_scan_args(argc, argv, "01", &vLoc) == 0) { - iLoc = 0; - } else { - iLoc = NUM2INT(vLoc); - } - - GUARD_OBJ(a, GetVpValue(self, 1)); - mx = a->Prec * (VpBaseFig() + 1); - GUARD_OBJ(c, NewZeroWrapLimited(1, mx)); - VpSetPrecLimit(pl); - VpActiveRound(c, a, VP_ROUND_CEIL, iLoc); - if (argc == 0) { - return BigDecimal_to_i(VpCheckGetValue(c)); - } - return VpCheckGetValue(c); -} - -/* call-seq: - * to_s(s) - * - * Converts the value to a string. - * - * The default format looks like 0.xxxxEnn. - * - * The optional parameter s consists of either an integer; or an optional '+' - * or ' ', followed by an optional number, followed by an optional 'E' or 'F'. - * - * If there is a '+' at the start of s, positive values are returned with - * a leading '+'. - * - * A space at the start of s returns positive values with a leading space. - * - * If s contains a number, a space is inserted after each group of that many - * digits, starting from '.' and counting outwards. - * - * If s ends with an 'E', engineering notation (0.xxxxEnn) is used. - * - * If s ends with an 'F', conventional floating point notation is used. - * - * Examples: - * - * BigDecimal('-1234567890123.45678901234567890').to_s('5F') - * #=> '-123 45678 90123.45678 90123 45678 9' - * - * BigDecimal('1234567890123.45678901234567890').to_s('+8F') - * #=> '+12345 67890123.45678901 23456789' - * - * BigDecimal('1234567890123.45678901234567890').to_s(' F') - * #=> ' 1234567890123.4567890123456789' - */ -static VALUE -BigDecimal_to_s(int argc, VALUE *argv, VALUE self) -{ - ENTER(5); - int fmt = 0; /* 0: E format, 1: F format */ - int fPlus = 0; /* 0: default, 1: set ' ' before digits, 2: set '+' before digits. */ - Real *vp; - volatile VALUE str; - char *psz; - char ch; - size_t nc, mc = 0; - SIGNED_VALUE m; - VALUE f; - - GUARD_OBJ(vp, GetVpValue(self, 1)); - - if (rb_scan_args(argc, argv, "01", &f) == 1) { - if (RB_TYPE_P(f, T_STRING)) { - psz = StringValueCStr(f); - if (*psz == ' ') { - fPlus = 1; - psz++; - } - else if (*psz == '+') { - fPlus = 2; - psz++; - } - while ((ch = *psz++) != 0) { - if (ISSPACE(ch)) { - continue; - } - if (!ISDIGIT(ch)) { - if (ch == 'F' || ch == 'f') { - fmt = 1; /* F format */ - } - break; - } - mc = mc*10 + ch - '0'; - } - } - else { - m = NUM2INT(f); - if (m <= 0) { - rb_raise(rb_eArgError, "argument must be positive"); - } - mc = (size_t)m; - } - } - if (fmt) { - nc = VpNumOfChars(vp, "F"); - } - else { - nc = VpNumOfChars(vp, "E"); - } - if (mc > 0) { - nc += (nc + mc - 1) / mc + 1; - } - - str = rb_usascii_str_new(0, nc); - psz = RSTRING_PTR(str); - - if (fmt) { - VpToFString(vp, psz, RSTRING_LEN(str), mc, fPlus); - } - else { - VpToString (vp, psz, RSTRING_LEN(str), mc, fPlus); - } - rb_str_resize(str, strlen(psz)); - return str; -} - -/* Splits a BigDecimal number into four parts, returned as an array of values. - * - * The first value represents the sign of the BigDecimal, and is -1 or 1, or 0 - * if the BigDecimal is Not a Number. - * - * The second value is a string representing the significant digits of the - * BigDecimal, with no leading zeros. - * - * The third value is the base used for arithmetic (currently always 10) as an - * Integer. - * - * The fourth value is an Integer exponent. - * - * If the BigDecimal can be represented as 0.xxxxxx*10**n, then xxxxxx is the - * string of significant digits with no leading zeros, and n is the exponent. - * - * From these values, you can translate a BigDecimal to a float as follows: - * - * sign, significant_digits, base, exponent = a.split - * f = sign * "0.#{significant_digits}".to_f * (base ** exponent) - * - * (Note that the to_f method is provided as a more convenient way to translate - * a BigDecimal to a Float.) - */ -static VALUE -BigDecimal_split(VALUE self) -{ - ENTER(5); - Real *vp; - VALUE obj,str; - ssize_t e, s; - char *psz1; - - GUARD_OBJ(vp, GetVpValue(self, 1)); - str = rb_str_new(0, VpNumOfChars(vp, "E")); - psz1 = RSTRING_PTR(str); - VpSzMantissa(vp, psz1, RSTRING_LEN(str)); - s = 1; - if(psz1[0] == '-') { - size_t len = strlen(psz1 + 1); - - memmove(psz1, psz1 + 1, len); - psz1[len] = '\0'; - s = -1; - } - if (psz1[0] == 'N') s = 0; /* NaN */ - e = VpExponent10(vp); - obj = rb_ary_new2(4); - rb_ary_push(obj, INT2FIX(s)); - rb_ary_push(obj, str); - rb_str_resize(str, strlen(psz1)); - rb_ary_push(obj, INT2FIX(10)); - rb_ary_push(obj, SSIZET2NUM(e)); - return obj; -} - -/* Returns the exponent of the BigDecimal number, as an Integer. - * - * If the number can be represented as 0.xxxxxx*10**n where xxxxxx is a string - * of digits with no leading zeros, then n is the exponent. - */ -static VALUE -BigDecimal_exponent(VALUE self) -{ - ssize_t e = VpExponent10(GetVpValue(self, 1)); - return SSIZET2NUM(e); -} - -/* Returns a string representation of self. - * - * BigDecimal("1234.5678").inspect - * #=> "0.12345678e4" - */ -static VALUE -BigDecimal_inspect(VALUE self) -{ - ENTER(5); - Real *vp; - volatile VALUE str; - size_t nc; - - GUARD_OBJ(vp, GetVpValue(self, 1)); - nc = VpNumOfChars(vp, "E"); - - str = rb_str_new(0, nc); - VpToString(vp, RSTRING_PTR(str), RSTRING_LEN(str), 0, 0); - rb_str_resize(str, strlen(RSTRING_PTR(str))); - return str; -} - -static VALUE BigMath_s_exp(VALUE, VALUE, VALUE); -static VALUE BigMath_s_log(VALUE, VALUE, VALUE); - -#define BigMath_exp(x, n) BigMath_s_exp(rb_mBigMath, (x), (n)) -#define BigMath_log(x, n) BigMath_s_log(rb_mBigMath, (x), (n)) - -inline static int -is_integer(VALUE x) -{ - return (RB_TYPE_P(x, T_FIXNUM) || RB_TYPE_P(x, T_BIGNUM)); -} - -inline static int -is_negative(VALUE x) -{ - if (FIXNUM_P(x)) { - return FIX2LONG(x) < 0; - } - else if (RB_TYPE_P(x, T_BIGNUM)) { - return FIX2INT(rb_big_cmp(x, INT2FIX(0))) < 0; - } - else if (RB_TYPE_P(x, T_FLOAT)) { - return RFLOAT_VALUE(x) < 0.0; - } - return RTEST(rb_funcall(x, '<', 1, INT2FIX(0))); -} - -#define is_positive(x) (!is_negative(x)) - -inline static int -is_zero(VALUE x) -{ - VALUE num; - - switch (TYPE(x)) { - case T_FIXNUM: - return FIX2LONG(x) == 0; - - case T_BIGNUM: - return Qfalse; - - case T_RATIONAL: - num = rb_rational_num(x); - return FIXNUM_P(num) && FIX2LONG(num) == 0; - - default: - break; - } - - return RTEST(rb_funcall(x, id_eq, 1, INT2FIX(0))); -} - -inline static int -is_one(VALUE x) -{ - VALUE num, den; - - switch (TYPE(x)) { - case T_FIXNUM: - return FIX2LONG(x) == 1; - - case T_BIGNUM: - return Qfalse; - - case T_RATIONAL: - num = rb_rational_num(x); - den = rb_rational_den(x); - return FIXNUM_P(den) && FIX2LONG(den) == 1 && - FIXNUM_P(num) && FIX2LONG(num) == 1; - - default: - break; - } - - return RTEST(rb_funcall(x, id_eq, 1, INT2FIX(1))); -} - -inline static int -is_even(VALUE x) -{ - switch (TYPE(x)) { - case T_FIXNUM: - return (FIX2LONG(x) % 2) == 0; - - case T_BIGNUM: - { - unsigned long l; - rb_big_pack(x, &l, 1); - return l % 2 == 0; - } - - default: - break; - } - - return 0; -} - -static VALUE -bigdecimal_power_by_bigdecimal(Real const* x, Real const* exp, ssize_t const n) -{ - VALUE log_x, multiplied, y; - volatile VALUE obj = exp->obj; - - if (VpIsZero(exp)) { - return VpCheckGetValue(NewOneWrapLimited(1, n)); - } - - log_x = BigMath_log(x->obj, SSIZET2NUM(n+1)); - multiplied = BigDecimal_mult2(exp->obj, log_x, SSIZET2NUM(n+1)); - y = BigMath_exp(multiplied, SSIZET2NUM(n)); - RB_GC_GUARD(obj); - - return y; -} - -/* call-seq: - * power(n) - * power(n, prec) - * - * Returns the value raised to the power of n. - * - * Note that n must be an Integer. - * - * Also available as the operator **. - */ -static VALUE -BigDecimal_power(int argc, VALUE*argv, VALUE self) -{ - ENTER(5); - VALUE vexp, prec; - Real* exp = NULL; - Real *x, *y; - ssize_t mp, ma, n; - SIGNED_VALUE int_exp; - double d; - - rb_scan_args(argc, argv, "11", &vexp, &prec); - - GUARD_OBJ(x, GetVpValue(self, 1)); - n = NIL_P(prec) ? (ssize_t)(x->Prec*VpBaseFig()) : NUM2SSIZET(prec); - - if (VpIsNaN(x)) { - y = NewZeroWrapLimited(1, n); - VpSetNaN(y); - RB_GC_GUARD(y->obj); - return VpCheckGetValue(y); - } - - retry: - switch (TYPE(vexp)) { - case T_FIXNUM: - break; - - case T_BIGNUM: - break; - - case T_FLOAT: - d = RFLOAT_VALUE(vexp); - if (d == round(d)) { - if (FIXABLE(d)) { - vexp = LONG2FIX((long)d); - } - else { - vexp = rb_dbl2big(d); - } - goto retry; - } - if (NIL_P(prec)) { - n += BIGDECIMAL_DOUBLE_FIGURES; - } - exp = GetVpValueWithPrec(vexp, 0, 1); - break; - - case T_RATIONAL: - if (is_zero(rb_rational_num(vexp))) { - if (is_positive(vexp)) { - vexp = INT2FIX(0); - goto retry; - } - } - else if (is_one(rb_rational_den(vexp))) { - vexp = rb_rational_num(vexp); - goto retry; - } - exp = GetVpValueWithPrec(vexp, n, 1); - if (NIL_P(prec)) { - n += n; - } - break; - - case T_DATA: - if (is_kind_of_BigDecimal(vexp)) { - VALUE zero = INT2FIX(0); - VALUE rounded = BigDecimal_round(1, &zero, vexp); - if (RTEST(BigDecimal_eq(vexp, rounded))) { - vexp = BigDecimal_to_i(vexp); - goto retry; - } - if (NIL_P(prec)) { - GUARD_OBJ(y, GetVpValue(vexp, 1)); - n += y->Prec*VpBaseFig(); - } - exp = DATA_PTR(vexp); - break; - } - /* fall through */ - default: - rb_raise(rb_eTypeError, - "wrong argument type %"PRIsVALUE" (expected scalar Numeric)", - RB_OBJ_CLASSNAME(vexp)); - } - - if (VpIsZero(x)) { - if (is_negative(vexp)) { - y = NewZeroWrapNolimit(1, n); - if (BIGDECIMAL_NEGATIVE_P(x)) { - if (is_integer(vexp)) { - if (is_even(vexp)) { - /* (-0) ** (-even_integer) -> Infinity */ - VpSetPosInf(y); - } - else { - /* (-0) ** (-odd_integer) -> -Infinity */ - VpSetNegInf(y); - } - } - else { - /* (-0) ** (-non_integer) -> Infinity */ - VpSetPosInf(y); - } - } - else { - /* (+0) ** (-num) -> Infinity */ - VpSetPosInf(y); - } - RB_GC_GUARD(y->obj); - return VpCheckGetValue(y); - } - else if (is_zero(vexp)) { - return VpCheckGetValue(NewOneWrapLimited(1, n)); - } - else { - return VpCheckGetValue(NewZeroWrapLimited(1, n)); - } - } - - if (is_zero(vexp)) { - return VpCheckGetValue(NewOneWrapLimited(1, n)); - } - else if (is_one(vexp)) { - return self; - } - - if (VpIsInf(x)) { - if (is_negative(vexp)) { - if (BIGDECIMAL_NEGATIVE_P(x)) { - if (is_integer(vexp)) { - if (is_even(vexp)) { - /* (-Infinity) ** (-even_integer) -> +0 */ - return VpCheckGetValue(NewZeroWrapLimited(1, n)); - } - else { - /* (-Infinity) ** (-odd_integer) -> -0 */ - return VpCheckGetValue(NewZeroWrapLimited(-1, n)); - } - } - else { - /* (-Infinity) ** (-non_integer) -> -0 */ - return VpCheckGetValue(NewZeroWrapLimited(-1, n)); - } - } - else { - return VpCheckGetValue(NewZeroWrapLimited(1, n)); - } - } - else { - y = NewZeroWrapLimited(1, n); - if (BIGDECIMAL_NEGATIVE_P(x)) { - if (is_integer(vexp)) { - if (is_even(vexp)) { - VpSetPosInf(y); - } - else { - VpSetNegInf(y); - } - } - else { - /* TODO: support complex */ - rb_raise(rb_eMathDomainError, - "a non-integral exponent for a negative base"); - } - } - else { - VpSetPosInf(y); - } - return VpCheckGetValue(y); - } - } - - if (exp != NULL) { - return bigdecimal_power_by_bigdecimal(x, exp, n); - } - else if (RB_TYPE_P(vexp, T_BIGNUM)) { - VALUE abs_value = BigDecimal_abs(self); - if (is_one(abs_value)) { - return VpCheckGetValue(NewOneWrapLimited(1, n)); - } - else if (RTEST(rb_funcall(abs_value, '<', 1, INT2FIX(1)))) { - if (is_negative(vexp)) { - y = NewZeroWrapLimited(1, n); - VpSetInf(y, (is_even(vexp) ? 1 : -1) * VpGetSign(x)); - return VpCheckGetValue(y); - } - else if (BIGDECIMAL_NEGATIVE_P(x) && is_even(vexp)) { - return VpCheckGetValue(NewZeroWrapLimited(-1, n)); - } - else { - return VpCheckGetValue(NewZeroWrapLimited(1, n)); - } - } - else { - if (is_positive(vexp)) { - y = NewZeroWrapLimited(1, n); - VpSetInf(y, (is_even(vexp) ? 1 : -1) * VpGetSign(x)); - return VpCheckGetValue(y); - } - else if (BIGDECIMAL_NEGATIVE_P(x) && is_even(vexp)) { - return VpCheckGetValue(NewZeroWrapLimited(-1, n)); - } - else { - return VpCheckGetValue(NewZeroWrapLimited(1, n)); - } - } - } - - int_exp = FIX2LONG(vexp); - ma = int_exp; - if (ma < 0) ma = -ma; - if (ma == 0) ma = 1; - - if (VpIsDef(x)) { - mp = x->Prec * (VpBaseFig() + 1); - GUARD_OBJ(y, NewZeroWrapLimited(1, mp * (ma + 1))); - } - else { - GUARD_OBJ(y, NewZeroWrapLimited(1, 1)); - } - VpPowerByInt(y, x, int_exp); - if (!NIL_P(prec) && VpIsDef(y)) { - VpMidRound(y, VpGetRoundMode(), n); - } - return VpCheckGetValue(y); -} - -/* call-seq: - * self ** other -> bigdecimal - * - * Returns the \BigDecimal value of +self+ raised to power +other+: - * - * b = BigDecimal('3.14') - * b ** 2 # => 0.98596e1 - * b ** 2.0 # => 0.98596e1 - * b ** Rational(2, 1) # => 0.98596e1 - * - * Related: BigDecimal#power. - * - */ -static VALUE -BigDecimal_power_op(VALUE self, VALUE exp) -{ - return BigDecimal_power(1, &exp, self); -} - -/* :nodoc: - * - * private method for dup and clone the provided BigDecimal +other+ - */ -static VALUE -BigDecimal_initialize_copy(VALUE self, VALUE other) -{ - Real *pv = rb_check_typeddata(self, &BigDecimal_data_type); - Real *x = rb_check_typeddata(other, &BigDecimal_data_type); - - if (self != other) { - DATA_PTR(self) = VpCopy(pv, x); - } - return self; -} - -/* :nodoc: */ -static VALUE -BigDecimal_clone(VALUE self) -{ - return self; -} - -#ifdef HAVE_RB_OPTS_EXCEPTION_P -int rb_opts_exception_p(VALUE opts, int default_value); -#define opts_exception_p(opts) rb_opts_exception_p((opts), 1) -#else -static int -opts_exception_p(VALUE opts) -{ - static ID kwds[1]; - VALUE exception; - if (!kwds[0]) { - kwds[0] = rb_intern_const("exception"); - } - if (!rb_get_kwargs(opts, kwds, 0, 1, &exception)) return 1; - switch (exception) { - case Qtrue: case Qfalse: - break; - default: - rb_raise(rb_eArgError, "true or false is expected as exception: %+"PRIsVALUE, - exception); - } - return exception != Qfalse; -} -#endif - -static VALUE -check_exception(VALUE bd) -{ - assert(is_kind_of_BigDecimal(bd)); - - Real *vp; - TypedData_Get_Struct(bd, Real, &BigDecimal_data_type, vp); - VpCheckGetValue(vp); /* VpCheckGetValue performs exception check */ - - return bd; -} - -static VALUE -rb_uint64_convert_to_BigDecimal(uint64_t uval, RB_UNUSED_VAR(size_t digs), int raise_exception) -{ - VALUE obj = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, 0); - - Real *vp; - if (uval == 0) { - vp = rbd_allocate_struct(1); - vp->MaxPrec = 1; - vp->Prec = 1; - vp->exponent = 1; - VpSetZero(vp, 1); - vp->frac[0] = 0; - } - else if (uval < BASE) { - vp = rbd_allocate_struct(1); - vp->MaxPrec = 1; - vp->Prec = 1; - vp->exponent = 1; - VpSetSign(vp, 1); - vp->frac[0] = (DECDIG)uval; - } - else { - DECDIG buf[BIGDECIMAL_INT64_MAX_LENGTH] = {0,}; - DECDIG r = uval % BASE; - size_t len = 0, ntz = 0; - if (r == 0) { - // Count and skip trailing zeros - for (; r == 0 && uval > 0; ++ntz) { - uval /= BASE; - r = uval % BASE; - } - } - for (; uval > 0; ++len) { - // Store digits - buf[BIGDECIMAL_INT64_MAX_LENGTH - len - 1] = r; - uval /= BASE; - r = uval % BASE; - } - - const size_t exp = len + ntz; - vp = rbd_allocate_struct(len); - vp->MaxPrec = len; - vp->Prec = len; - vp->exponent = exp; - VpSetSign(vp, 1); - MEMCPY(vp->frac, buf + BIGDECIMAL_INT64_MAX_LENGTH - len, DECDIG, len); - } - - return BigDecimal_wrap_struct(obj, vp); -} - -static VALUE -rb_int64_convert_to_BigDecimal(int64_t ival, size_t digs, int raise_exception) -{ - const uint64_t uval = (ival < 0) ? (((uint64_t)-(ival+1))+1) : (uint64_t)ival; - VALUE bd = rb_uint64_convert_to_BigDecimal(uval, digs, raise_exception); - if (ival < 0) { - Real *vp; - TypedData_Get_Struct(bd, Real, &BigDecimal_data_type, vp); - VpSetSign(vp, -1); - } - return bd; -} - -static VALUE -rb_big_convert_to_BigDecimal(VALUE val, RB_UNUSED_VAR(size_t digs), int raise_exception) -{ - assert(RB_TYPE_P(val, T_BIGNUM)); - - int leading_zeros; - size_t size = rb_absint_size(val, &leading_zeros); - int sign = FIX2INT(rb_big_cmp(val, INT2FIX(0))); - if (sign < 0 && leading_zeros == 0) { - size += 1; - } - if (size <= sizeof(long)) { - if (sign < 0) { - return rb_int64_convert_to_BigDecimal(NUM2LONG(val), digs, raise_exception); - } - else { - return rb_uint64_convert_to_BigDecimal(NUM2ULONG(val), digs, raise_exception); - } - } -#if defined(SIZEOF_LONG_LONG) && SIZEOF_LONG < SIZEOF_LONG_LONG - else if (size <= sizeof(LONG_LONG)) { - if (sign < 0) { - return rb_int64_convert_to_BigDecimal(NUM2LL(val), digs, raise_exception); - } - else { - return rb_uint64_convert_to_BigDecimal(NUM2ULL(val), digs, raise_exception); - } - } -#endif - else { - VALUE str = rb_big2str(val, 10); - Real *vp = VpCreateRbObject(RSTRING_LEN(str) + BASE_FIG + 1, - RSTRING_PTR(str), true); - RB_GC_GUARD(str); - return check_exception(vp->obj); - } -} - -static VALUE -rb_inum_convert_to_BigDecimal(VALUE val, RB_UNUSED_VAR(size_t digs), int raise_exception) -{ - assert(RB_INTEGER_TYPE_P(val)); - if (FIXNUM_P(val)) { - return rb_int64_convert_to_BigDecimal(FIX2LONG(val), digs, raise_exception); - } - else { - return rb_big_convert_to_BigDecimal(val, digs, raise_exception); - } -} - -static VALUE -rb_float_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception) -{ - assert(RB_FLOAT_TYPE_P(val)); - - double d = RFLOAT_VALUE(val); - - if (isnan(d)) { - VALUE obj = BigDecimal_nan(); - return check_exception(obj); - } - else if (isinf(d)) { - VALUE obj; - if (d > 0) { - obj = BigDecimal_positive_infinity(); - } - else { - obj = BigDecimal_negative_infinity(); - } - return check_exception(obj); - } - else if (d == 0.0) { - if (1/d < 0.0) { - return BigDecimal_negative_zero(); - } - else { - return BigDecimal_positive_zero(); - } - } - - if (digs == SIZE_MAX) { - if (!raise_exception) - return Qnil; - rb_raise(rb_eArgError, - "can't omit precision for a %"PRIsVALUE".", - CLASS_OF(val)); - } - else if (digs > BIGDECIMAL_DOUBLE_FIGURES) { - if (!raise_exception) - return Qnil; - rb_raise(rb_eArgError, "precision too large."); - } - - /* Use the same logic in flo_to_s to convert a float to a decimal string */ - char buf[BIGDECIMAL_DOUBLE_FIGURES + BASE_FIG + 2 + 1]; /* sizeof(buf) == 28 in the typical case */ - int decpt, negative_p; - char *e; - const int mode = digs == 0 ? 0 : 2; - char *p = BigDecimal_dtoa(d, mode, (int)digs, &decpt, &negative_p, &e); - int len10 = (int)(e - p); - if (len10 > BIGDECIMAL_DOUBLE_FIGURES) { - /* TODO: Presumably, rounding should be done here. */ - len10 = BIGDECIMAL_DOUBLE_FIGURES; - } - memcpy(buf, p, len10); - xfree(p); - - VALUE inum; - size_t RB_UNUSED_VAR(prec) = 0; - SIGNED_VALUE exp = 0; - if (decpt > 0) { - if (decpt < len10) { - /* - * len10 |---------------| - * : |-------| frac_len10 = len10 - decpt - * decpt |-------| |--| ntz10 = BASE_FIG - frac_len10 % BASE_FIG - * : : : - * 00 dd dddd.dddd dd 00 - * prec |-----.----.----.-----| prec = exp + roomof(frac_len, BASE_FIG) - * exp |-----.----| exp = roomof(decpt, BASE_FIG) - */ - const size_t frac_len10 = len10 - decpt; - const size_t ntz10 = BASE_FIG - frac_len10 % BASE_FIG; - memset(buf + len10, '0', ntz10); - buf[len10 + ntz10] = '\0'; - inum = rb_cstr_to_inum(buf, 10, false); - - exp = roomof(decpt, BASE_FIG); - prec = exp + roomof(frac_len10, BASE_FIG); - } - else { - /* - * decpt |-----------------------| - * len10 |----------| : - * : |------------| exp10 - * : : : - * 00 dd dddd dd 00 0000 0000.0 - * : : : : - * : |--| ntz10 = exp10 % BASE_FIG - * prec |-----.----.-----| : - * : |----.----| exp10 / BASE_FIG - * exp |-----.----.-----.----.----| - */ - const size_t exp10 = decpt - len10; - const size_t ntz10 = exp10 % BASE_FIG; - - memset(buf + len10, '0', ntz10); - buf[len10 + ntz10] = '\0'; - inum = rb_cstr_to_inum(buf, 10, false); - - prec = roomof(len10 + ntz10, BASE_FIG); - exp = prec + exp10 / BASE_FIG; - } - } - else if (decpt == 0) { - /* - * len10 |------------| - * : : - * 0.dddd dddd dd 00 - * : : : - * : |--| ntz10 = prec * BASE_FIG - len10 - * prec |----.----.-----| roomof(len10, BASE_FIG) - */ - prec = roomof(len10, BASE_FIG); - const size_t ntz10 = prec * BASE_FIG - len10; - - memset(buf + len10, '0', ntz10); - buf[len10 + ntz10] = '\0'; - inum = rb_cstr_to_inum(buf, 10, false); - } - else { - /* - * len10 |---------------| - * : : - * decpt |-------| |--| ntz10 = prec * BASE_FIG - nlz10 - len10 - * : : : - * 0.0000 00 dd dddd dddd dd 00 - * : : : - * nlz10 |--| : decpt % BASE_FIG - * prec |-----.----.----.-----| roomof(decpt + len10, BASE_FIG) - exp - * exp |----| decpt / BASE_FIG - */ - decpt = -decpt; - - const size_t nlz10 = decpt % BASE_FIG; - exp = decpt / BASE_FIG; - prec = roomof(decpt + len10, BASE_FIG) - exp; - const size_t ntz10 = prec * BASE_FIG - nlz10 - len10; - - if (nlz10 > 0) { - memmove(buf + nlz10, buf, len10); - memset(buf, '0', nlz10); - } - memset(buf + nlz10 + len10, '0', ntz10); - buf[nlz10 + len10 + ntz10] = '\0'; - inum = rb_cstr_to_inum(buf, 10, false); - - exp = -exp; - } - - VALUE bd = rb_inum_convert_to_BigDecimal(inum, SIZE_MAX, raise_exception); - Real *vp; - TypedData_Get_Struct(bd, Real, &BigDecimal_data_type, vp); - assert(vp->Prec == prec); - vp->exponent = exp; - - if (negative_p) VpSetSign(vp, -1); - return bd; -} - -static VALUE -rb_rational_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception) -{ - assert(RB_TYPE_P(val, T_RATIONAL)); - - if (digs == SIZE_MAX) { - if (!raise_exception) - return Qnil; - rb_raise(rb_eArgError, - "can't omit precision for a %"PRIsVALUE".", - CLASS_OF(val)); - } - - VALUE num = rb_inum_convert_to_BigDecimal(rb_rational_num(val), 0, raise_exception); - VALUE d = BigDecimal_div2(num, rb_rational_den(val), SIZET2NUM(digs)); - return d; -} - -static VALUE -rb_cstr_convert_to_BigDecimal(const char *c_str, size_t digs, int raise_exception) -{ - if (digs == SIZE_MAX) - digs = 0; - - Real *vp = VpCreateRbObject(digs, c_str, raise_exception); - if (!vp) - return Qnil; - return VpCheckGetValue(vp); -} - -static inline VALUE -rb_str_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception) -{ - const char *c_str = StringValueCStr(val); - return rb_cstr_convert_to_BigDecimal(c_str, digs, raise_exception); -} - -static VALUE -rb_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception) -{ - switch (val) { - case Qnil: - case Qtrue: - case Qfalse: - if (raise_exception) { - const char *cname = NIL_P(val) ? "nil" : - val == Qtrue ? "true" : - val == Qfalse ? "false" : - NULL; - rb_raise(rb_eTypeError, - "can't convert %s into BigDecimal", cname); - } - return Qnil; - - default: - break; - } - - if (is_kind_of_BigDecimal(val)) { - if (digs == SIZE_MAX) - return check_exception(val); - - Real *vp; - TypedData_Get_Struct(val, Real, &BigDecimal_data_type, vp); - - VALUE copy = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, 0); - vp = VpCopy(NULL, vp); - /* TODO: rounding */ - BigDecimal_wrap_struct(copy, vp); - return VpCheckGetValue(vp); - } - else if (RB_INTEGER_TYPE_P(val)) { - return rb_inum_convert_to_BigDecimal(val, digs, raise_exception); - } - else if (RB_FLOAT_TYPE_P(val)) { - return rb_float_convert_to_BigDecimal(val, digs, raise_exception); - } - else if (RB_TYPE_P(val, T_RATIONAL)) { - return rb_rational_convert_to_BigDecimal(val, digs, raise_exception); - } - else if (RB_TYPE_P(val, T_COMPLEX)) { - VALUE im = rb_complex_imag(val); - if (!is_zero(im)) { - /* TODO: handle raise_exception */ - rb_raise(rb_eArgError, - "Unable to make a BigDecimal from non-zero imaginary number"); - } - return rb_convert_to_BigDecimal(rb_complex_real(val), digs, raise_exception); - } - else if (RB_TYPE_P(val, T_STRING)) { - return rb_str_convert_to_BigDecimal(val, digs, raise_exception); - } - - /* TODO: chheck to_d */ - /* TODO: chheck to_int */ - - VALUE str = rb_check_convert_type(val, T_STRING, "String", "to_str"); - if (!RB_TYPE_P(str, T_STRING)) { - if (raise_exception) { - rb_raise(rb_eTypeError, - "can't convert %"PRIsVALUE" into BigDecimal", rb_obj_class(val)); - } - return Qnil; - } - return rb_str_convert_to_BigDecimal(str, digs, raise_exception); -} - -/* call-seq: - * BigDecimal(value, exception: true) -> bigdecimal - * BigDecimal(value, ndigits, exception: true) -> bigdecimal - * - * Returns the \BigDecimal converted from +value+ - * with a precision of +ndigits+ decimal digits. - * - * When +ndigits+ is less than the number of significant digits - * in the value, the result is rounded to that number of digits, - * according to the current rounding mode; see BigDecimal.mode. - * - * When +ndigits+ is 0, the number of digits to correctly represent a float number - * is determined automatically. - * - * Returns +value+ converted to a \BigDecimal, depending on the type of +value+: - * - * - Integer, Float, Rational, Complex, or BigDecimal: converted directly: - * - * # Integer, Complex, or BigDecimal value does not require ndigits; ignored if given. - * BigDecimal(2) # => 0.2e1 - * BigDecimal(Complex(2, 0)) # => 0.2e1 - * BigDecimal(BigDecimal(2)) # => 0.2e1 - * # Float or Rational value requires ndigits. - * BigDecimal(2.0, 0) # => 0.2e1 - * BigDecimal(Rational(2, 1), 0) # => 0.2e1 - * - * - String: converted by parsing if it contains an integer or floating-point literal; - * leading and trailing whitespace is ignored: - * - * # String does not require ndigits; ignored if given. - * BigDecimal('2') # => 0.2e1 - * BigDecimal('2.0') # => 0.2e1 - * BigDecimal('0.2e1') # => 0.2e1 - * BigDecimal(' 2.0 ') # => 0.2e1 - * - * - Other type that responds to method :to_str: - * first converted to a string, then converted to a \BigDecimal, as above. - * - * - Other type: - * - * - Raises an exception if keyword argument +exception+ is +true+. - * - Returns +nil+ if keyword argument +exception+ is +false+. - * - * Raises an exception if +value+ evaluates to a Float - * and +digits+ is larger than Float::DIG + 1. - * - */ -static VALUE -f_BigDecimal(int argc, VALUE *argv, VALUE self) -{ - VALUE val, digs_v, opts = Qnil; - argc = rb_scan_args(argc, argv, "11:", &val, &digs_v, &opts); - int exception = opts_exception_p(opts); - - size_t digs = SIZE_MAX; /* this means digs is omitted */ - if (argc > 1) { - digs_v = rb_to_int(digs_v); - if (FIXNUM_P(digs_v)) { - long n = FIX2LONG(digs_v); - if (n < 0) - goto negative_digs; - digs = (size_t)n; - } - else { - if (RBIGNUM_NEGATIVE_P(digs_v)) { - negative_digs: - if (!exception) - return Qnil; - rb_raise(rb_eArgError, "negative precision"); - } - digs = NUM2SIZET(digs_v); - } - } - - return rb_convert_to_BigDecimal(val, digs, exception); -} - -/* call-seq: - * BigDecimal.interpret_loosely(string) -> bigdecimal - * - * Returns the +BigDecimal+ converted loosely from +string+. - */ - -static VALUE -BigDecimal_s_interpret_loosely(VALUE klass, VALUE str) -{ - char const *c_str = StringValueCStr(str); - Real *vp = VpNewRbClass(0, c_str, klass, false, true); - if (!vp) - return Qnil; - else - return VpCheckGetValue(vp); -} - - /* - * call-seq: - * BigDecimal.limit(digits) - * - * Limit the number of significant digits in newly created BigDecimal - * numbers to the specified value. Rounding is performed as necessary, - * as specified by BigDecimal.mode. - * - * A limit of 0, the default, means no upper limit. - * - * The limit specified by this method takes less priority over any limit - * specified to instance methods such as ceil, floor, truncate, or round. - */ -static VALUE -BigDecimal_limit(int argc, VALUE *argv, VALUE self) -{ - VALUE nFig; - VALUE nCur = SIZET2NUM(VpGetPrecLimit()); - - if (rb_scan_args(argc, argv, "01", &nFig) == 1) { - int nf; - if (NIL_P(nFig)) return nCur; - nf = NUM2INT(nFig); - if (nf < 0) { - rb_raise(rb_eArgError, "argument must be positive"); - } - VpSetPrecLimit(nf); - } - return nCur; -} - -/* Returns the sign of the value. - * - * Returns a positive value if > 0, a negative value if < 0. - * It behaves the same with zeros - - * it returns a positive value for a positive zero (BigDecimal('0')) and - * a negative value for a negative zero (BigDecimal('-0')). - * - * The specific value returned indicates the type and sign of the BigDecimal, - * as follows: - * - * BigDecimal::SIGN_NaN:: value is Not a Number - * BigDecimal::SIGN_POSITIVE_ZERO:: value is +0 - * BigDecimal::SIGN_NEGATIVE_ZERO:: value is -0 - * BigDecimal::SIGN_POSITIVE_INFINITE:: value is +Infinity - * BigDecimal::SIGN_NEGATIVE_INFINITE:: value is -Infinity - * BigDecimal::SIGN_POSITIVE_FINITE:: value is positive - * BigDecimal::SIGN_NEGATIVE_FINITE:: value is negative - */ -static VALUE -BigDecimal_sign(VALUE self) -{ /* sign */ - int s = GetVpValue(self, 1)->sign; - return INT2FIX(s); -} - -/* - * call-seq: BigDecimal.save_exception_mode { ... } - * - * Execute the provided block, but preserve the exception mode - * - * BigDecimal.save_exception_mode do - * BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) - * BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) - * - * BigDecimal(BigDecimal('Infinity')) - * BigDecimal(BigDecimal('-Infinity')) - * BigDecimal(BigDecimal('NaN')) - * end - * - * For use with the BigDecimal::EXCEPTION_* - * - * See BigDecimal.mode - */ -static VALUE -BigDecimal_save_exception_mode(VALUE self) -{ - unsigned short const exception_mode = VpGetException(); - int state; - VALUE ret = rb_protect(rb_yield, Qnil, &state); - VpSetException(exception_mode); - if (state) rb_jump_tag(state); - return ret; -} - -/* - * call-seq: BigDecimal.save_rounding_mode { ... } - * - * Execute the provided block, but preserve the rounding mode - * - * BigDecimal.save_rounding_mode do - * BigDecimal.mode(BigDecimal::ROUND_MODE, :up) - * puts BigDecimal.mode(BigDecimal::ROUND_MODE) - * end - * - * For use with the BigDecimal::ROUND_* - * - * See BigDecimal.mode - */ -static VALUE -BigDecimal_save_rounding_mode(VALUE self) -{ - unsigned short const round_mode = VpGetRoundMode(); - int state; - VALUE ret = rb_protect(rb_yield, Qnil, &state); - VpSetRoundMode(round_mode); - if (state) rb_jump_tag(state); - return ret; -} - -/* - * call-seq: BigDecimal.save_limit { ... } - * - * Execute the provided block, but preserve the precision limit - * - * BigDecimal.limit(100) - * puts BigDecimal.limit - * BigDecimal.save_limit do - * BigDecimal.limit(200) - * puts BigDecimal.limit - * end - * puts BigDecimal.limit - * - */ -static VALUE -BigDecimal_save_limit(VALUE self) -{ - size_t const limit = VpGetPrecLimit(); - int state; - VALUE ret = rb_protect(rb_yield, Qnil, &state); - VpSetPrecLimit(limit); - if (state) rb_jump_tag(state); - return ret; -} - -/* call-seq: - * BigMath.exp(decimal, numeric) -> BigDecimal - * - * Computes the value of e (the base of natural logarithms) raised to the - * power of +decimal+, to the specified number of digits of precision. - * - * If +decimal+ is infinity, returns Infinity. - * - * If +decimal+ is NaN, returns NaN. - */ -static VALUE -BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec) -{ - ssize_t prec, n, i; - Real* vx = NULL; - VALUE one, d, y; - int negative = 0; - int infinite = 0; - int nan = 0; - double flo; - - prec = NUM2SSIZET(vprec); - if (prec <= 0) { - rb_raise(rb_eArgError, "Zero or negative precision for exp"); - } - - /* TODO: the following switch statement is almost same as one in the - * BigDecimalCmp function. */ - switch (TYPE(x)) { - case T_DATA: - if (!is_kind_of_BigDecimal(x)) break; - vx = DATA_PTR(x); - negative = BIGDECIMAL_NEGATIVE_P(vx); - infinite = VpIsPosInf(vx) || VpIsNegInf(vx); - nan = VpIsNaN(vx); - break; - - case T_FIXNUM: - /* fall through */ - case T_BIGNUM: - vx = GetVpValue(x, 0); - break; - - case T_FLOAT: - flo = RFLOAT_VALUE(x); - negative = flo < 0; - infinite = isinf(flo); - nan = isnan(flo); - if (!infinite && !nan) { - vx = GetVpValueWithPrec(x, 0, 0); - } - break; - - case T_RATIONAL: - vx = GetVpValueWithPrec(x, prec, 0); - break; - - default: - break; - } - if (infinite) { - if (negative) { - return VpCheckGetValue(GetVpValueWithPrec(INT2FIX(0), prec, 1)); - } - else { - Real* vy = NewZeroWrapNolimit(1, prec); - VpSetInf(vy, VP_SIGN_POSITIVE_INFINITE); - RB_GC_GUARD(vy->obj); - return VpCheckGetValue(vy); - } - } - else if (nan) { - Real* vy = NewZeroWrapNolimit(1, prec); - VpSetNaN(vy); - RB_GC_GUARD(vy->obj); - return VpCheckGetValue(vy); - } - else if (vx == NULL) { - cannot_be_coerced_into_BigDecimal(rb_eArgError, x); - } - x = vx->obj; - - n = prec + BIGDECIMAL_DOUBLE_FIGURES; - negative = BIGDECIMAL_NEGATIVE_P(vx); - if (negative) { - VALUE x_zero = INT2NUM(1); - VALUE x_copy = f_BigDecimal(1, &x_zero, klass); - x = BigDecimal_initialize_copy(x_copy, x); - vx = DATA_PTR(x); - VpSetSign(vx, 1); - } - - one = VpCheckGetValue(NewOneWrapLimited(1, 1)); - y = one; - d = y; - i = 1; - - while (!VpIsZero((Real*)DATA_PTR(d))) { - SIGNED_VALUE const ey = VpExponent10(DATA_PTR(y)); - SIGNED_VALUE const ed = VpExponent10(DATA_PTR(d)); - ssize_t m = n - vabs(ey - ed); - - rb_thread_check_ints(); - - if (m <= 0) { - break; - } - else if ((size_t)m < BIGDECIMAL_DOUBLE_FIGURES) { - m = BIGDECIMAL_DOUBLE_FIGURES; - } - - d = BigDecimal_mult(d, x); /* d <- d * x */ - d = BigDecimal_div2(d, SSIZET2NUM(i), SSIZET2NUM(m)); /* d <- d / i */ - y = BigDecimal_add(y, d); /* y <- y + d */ - ++i; /* i <- i + 1 */ - } - - if (negative) { - return BigDecimal_div2(one, y, vprec); - } - else { - vprec = SSIZET2NUM(prec - VpExponent10(DATA_PTR(y))); - return BigDecimal_round(1, &vprec, y); - } - - RB_GC_GUARD(one); - RB_GC_GUARD(x); - RB_GC_GUARD(y); - RB_GC_GUARD(d); -} - -/* call-seq: - * BigMath.log(decimal, numeric) -> BigDecimal - * - * Computes the natural logarithm of +decimal+ to the specified number of - * digits of precision, +numeric+. - * - * If +decimal+ is zero or negative, raises Math::DomainError. - * - * If +decimal+ is positive infinity, returns Infinity. - * - * If +decimal+ is NaN, returns NaN. - */ -static VALUE -BigMath_s_log(VALUE klass, VALUE x, VALUE vprec) -{ - ssize_t prec, n, i; - SIGNED_VALUE expo; - Real* vx = NULL; - VALUE vn, one, two, w, x2, y, d; - int zero = 0; - int negative = 0; - int infinite = 0; - int nan = 0; - double flo; - long fix; - - if (!is_integer(vprec)) { - rb_raise(rb_eArgError, "precision must be an Integer"); - } - - prec = NUM2SSIZET(vprec); - if (prec <= 0) { - rb_raise(rb_eArgError, "Zero or negative precision for exp"); - } - - /* TODO: the following switch statement is almost same as one in the - * BigDecimalCmp function. */ - switch (TYPE(x)) { - case T_DATA: - if (!is_kind_of_BigDecimal(x)) break; - vx = DATA_PTR(x); - zero = VpIsZero(vx); - negative = BIGDECIMAL_NEGATIVE_P(vx); - infinite = VpIsPosInf(vx) || VpIsNegInf(vx); - nan = VpIsNaN(vx); - break; - - case T_FIXNUM: - fix = FIX2LONG(x); - zero = fix == 0; - negative = fix < 0; - goto get_vp_value; - - case T_BIGNUM: - i = FIX2INT(rb_big_cmp(x, INT2FIX(0))); - zero = i == 0; - negative = i < 0; -get_vp_value: - if (zero || negative) break; - vx = GetVpValue(x, 0); - break; - - case T_FLOAT: - flo = RFLOAT_VALUE(x); - zero = flo == 0; - negative = flo < 0; - infinite = isinf(flo); - nan = isnan(flo); - if (!zero && !negative && !infinite && !nan) { - vx = GetVpValueWithPrec(x, 0, 1); - } - break; - - case T_RATIONAL: - zero = RRATIONAL_ZERO_P(x); - negative = RRATIONAL_NEGATIVE_P(x); - if (zero || negative) break; - vx = GetVpValueWithPrec(x, prec, 1); - break; - - case T_COMPLEX: - rb_raise(rb_eMathDomainError, - "Complex argument for BigMath.log"); - - default: - break; - } - if (infinite && !negative) { - Real *vy = NewZeroWrapNolimit(1, prec); - RB_GC_GUARD(vy->obj); - VpSetInf(vy, VP_SIGN_POSITIVE_INFINITE); - return VpCheckGetValue(vy); - } - else if (nan) { - Real* vy = NewZeroWrapNolimit(1, prec); - RB_GC_GUARD(vy->obj); - VpSetNaN(vy); - return VpCheckGetValue(vy); - } - else if (zero || negative) { - rb_raise(rb_eMathDomainError, - "Zero or negative argument for log"); - } - else if (vx == NULL) { - cannot_be_coerced_into_BigDecimal(rb_eArgError, x); - } - x = VpCheckGetValue(vx); - - one = VpCheckGetValue(NewOneWrapLimited(1, 1)); - two = VpCheckGetValue(VpCreateRbObject(1, "2", true)); - - n = prec + BIGDECIMAL_DOUBLE_FIGURES; - vn = SSIZET2NUM(n); - expo = VpExponent10(vx); - if (expo < 0 || expo >= 3) { - char buf[DECIMAL_SIZE_OF_BITS(SIZEOF_VALUE * CHAR_BIT) + 4]; - snprintf(buf, sizeof(buf), "1E%"PRIdVALUE, -expo); - x = BigDecimal_mult2(x, VpCheckGetValue(VpCreateRbObject(1, buf, true)), vn); - } - else { - expo = 0; - } - w = BigDecimal_sub(x, one); - x = BigDecimal_div2(w, BigDecimal_add(x, one), vn); - x2 = BigDecimal_mult2(x, x, vn); - y = x; - d = y; - i = 1; - while (!VpIsZero((Real*)DATA_PTR(d))) { - SIGNED_VALUE const ey = VpExponent10(DATA_PTR(y)); - SIGNED_VALUE const ed = VpExponent10(DATA_PTR(d)); - ssize_t m = n - vabs(ey - ed); - if (m <= 0) { - break; - } - else if ((size_t)m < BIGDECIMAL_DOUBLE_FIGURES) { - m = BIGDECIMAL_DOUBLE_FIGURES; - } - - x = BigDecimal_mult2(x2, x, vn); - i += 2; - d = BigDecimal_div2(x, SSIZET2NUM(i), SSIZET2NUM(m)); - y = BigDecimal_add(y, d); - } - - y = BigDecimal_mult(y, two); - if (expo != 0) { - VALUE log10, vexpo, dy; - log10 = BigMath_s_log(klass, INT2FIX(10), vprec); - vexpo = VpCheckGetValue(GetVpValue(SSIZET2NUM(expo), 1)); - dy = BigDecimal_mult(log10, vexpo); - y = BigDecimal_add(y, dy); - } - - RB_GC_GUARD(one); - RB_GC_GUARD(two); - RB_GC_GUARD(vn); - RB_GC_GUARD(x2); - RB_GC_GUARD(y); - RB_GC_GUARD(d); - - return y; -} - -static VALUE BIGDECIMAL_NAN = Qnil; - -static VALUE -BigDecimal_nan(void) -{ - return BIGDECIMAL_NAN; -} - -static VALUE BIGDECIMAL_POSITIVE_INFINITY = Qnil; - -static VALUE -BigDecimal_positive_infinity(void) -{ - return BIGDECIMAL_POSITIVE_INFINITY; -} - -static VALUE BIGDECIMAL_NEGATIVE_INFINITY = Qnil; - -static VALUE -BigDecimal_negative_infinity(void) -{ - return BIGDECIMAL_NEGATIVE_INFINITY; -} - -static VALUE BIGDECIMAL_POSITIVE_ZERO = Qnil; - -static VALUE -BigDecimal_positive_zero(void) -{ - return BIGDECIMAL_POSITIVE_ZERO; -} - -static VALUE BIGDECIMAL_NEGATIVE_ZERO = Qnil; - -static VALUE -BigDecimal_negative_zero(void) -{ - return BIGDECIMAL_NEGATIVE_ZERO; -} - -static inline VALUE -BigDecimal_literal(const char *str) -{ - VALUE arg = rb_str_new_cstr(str); - VALUE val = f_BigDecimal(1, &arg, rb_cBigDecimal); - rb_gc_register_mark_object(val); - return val; -} - -#define BIGDECIMAL_LITERAL(var, val) (BIGDECIMAL_ ## var = BigDecimal_literal(#val)) - -/* Document-class: BigDecimal - * BigDecimal provides arbitrary-precision floating point decimal arithmetic. - * - * == Introduction - * - * Ruby provides built-in support for arbitrary precision integer arithmetic. - * - * For example: - * - * 42**13 #=> 1265437718438866624512 - * - * BigDecimal provides similar support for very large or very accurate floating - * point numbers. - * - * Decimal arithmetic is also useful for general calculation, because it - * provides the correct answers people expect--whereas normal binary floating - * point arithmetic often introduces subtle errors because of the conversion - * between base 10 and base 2. - * - * For example, try: - * - * sum = 0 - * 10_000.times do - * sum = sum + 0.0001 - * end - * print sum #=> 0.9999999999999062 - * - * and contrast with the output from: - * - * require 'bigdecimal' - * - * sum = BigDecimal("0") - * 10_000.times do - * sum = sum + BigDecimal("0.0001") - * end - * print sum #=> 0.1E1 - * - * Similarly: - * - * (BigDecimal("1.2") - BigDecimal("1.0")) == BigDecimal("0.2") #=> true - * - * (1.2 - 1.0) == 0.2 #=> false - * - * == A Note About Precision - * - * For a calculation using a \BigDecimal and another +value+, - * the precision of the result depends on the type of +value+: - * - * - If +value+ is a \Float, - * the precision is Float::DIG + 1. - * - If +value+ is a \Rational, the precision is larger than Float::DIG + 1. - * - If +value+ is a \BigDecimal, the precision is +value+'s precision in the - * internal representation, which is platform-dependent. - * - If +value+ is other object, the precision is determined by the result of +BigDecimal(value)+. - * - * == Special features of accurate decimal arithmetic - * - * Because BigDecimal is more accurate than normal binary floating point - * arithmetic, it requires some special values. - * - * === Infinity - * - * BigDecimal sometimes needs to return infinity, for example if you divide - * a value by zero. - * - * BigDecimal("1.0") / BigDecimal("0.0") #=> Infinity - * BigDecimal("-1.0") / BigDecimal("0.0") #=> -Infinity - * - * You can represent infinite numbers to BigDecimal using the strings - * 'Infinity', '+Infinity' and - * '-Infinity' (case-sensitive) - * - * === Not a Number - * - * When a computation results in an undefined value, the special value +NaN+ - * (for 'not a number') is returned. - * - * Example: - * - * BigDecimal("0.0") / BigDecimal("0.0") #=> NaN - * - * You can also create undefined values. - * - * NaN is never considered to be the same as any other value, even NaN itself: - * - * n = BigDecimal('NaN') - * n == 0.0 #=> false - * n == n #=> false - * - * === Positive and negative zero - * - * If a computation results in a value which is too small to be represented as - * a BigDecimal within the currently specified limits of precision, zero must - * be returned. - * - * If the value which is too small to be represented is negative, a BigDecimal - * value of negative zero is returned. - * - * BigDecimal("1.0") / BigDecimal("-Infinity") #=> -0.0 - * - * If the value is positive, a value of positive zero is returned. - * - * BigDecimal("1.0") / BigDecimal("Infinity") #=> 0.0 - * - * (See BigDecimal.mode for how to specify limits of precision.) - * - * Note that +-0.0+ and +0.0+ are considered to be the same for the purposes of - * comparison. - * - * Note also that in mathematics, there is no particular concept of negative - * or positive zero; true mathematical zero has no sign. - * - * == bigdecimal/util - * - * When you require +bigdecimal/util+, the #to_d method will be - * available on BigDecimal and the native Integer, Float, Rational, - * and String classes: - * - * require 'bigdecimal/util' - * - * 42.to_d # => 0.42e2 - * 0.5.to_d # => 0.5e0 - * (2/3r).to_d(3) # => 0.667e0 - * "0.5".to_d # => 0.5e0 - * - * == Methods for Working with \JSON - * - * - {::json_create}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-c-json_create]: - * Returns a new \BigDecimal object constructed from the given object. - * - {#as_json}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-i-as_json]: - * Returns a 2-element hash representing +self+. - * - {#to_json}[https://docs.ruby-lang.org/en/master/BigDecimal.html#method-i-to_json]: - * Returns a \JSON string representing +self+. - * - * These methods are provided by the {JSON gem}[https://github.com/flori/json]. To make these methods available: - * - * require 'json/add/bigdecimal' - * - * * == License - * - * Copyright (C) 2002 by Shigeo Kobayashi . - * - * BigDecimal is released under the Ruby and 2-clause BSD licenses. - * See LICENSE.txt for details. - * - * Maintained by mrkn and ruby-core members. - * - * Documented by zzak , mathew , and - * many other contributors. - */ -void -Init_bigdecimal(void) -{ -#ifdef HAVE_RB_EXT_RACTOR_SAFE - rb_ext_ractor_safe(true); -#endif - - id_BigDecimal_exception_mode = rb_intern_const("BigDecimal.exception_mode"); - id_BigDecimal_rounding_mode = rb_intern_const("BigDecimal.rounding_mode"); - id_BigDecimal_precision_limit = rb_intern_const("BigDecimal.precision_limit"); - - /* Initialize VP routines */ - VpInit(0UL); - - /* Class and method registration */ - rb_cBigDecimal = rb_define_class("BigDecimal", rb_cNumeric); - - /* Global function */ - rb_define_global_function("BigDecimal", f_BigDecimal, -1); - - /* Class methods */ - rb_undef_alloc_func(rb_cBigDecimal); - rb_undef_method(CLASS_OF(rb_cBigDecimal), "new"); - rb_define_singleton_method(rb_cBigDecimal, "interpret_loosely", BigDecimal_s_interpret_loosely, 1); - rb_define_singleton_method(rb_cBigDecimal, "mode", BigDecimal_mode, -1); - rb_define_singleton_method(rb_cBigDecimal, "limit", BigDecimal_limit, -1); - rb_define_singleton_method(rb_cBigDecimal, "double_fig", BigDecimal_double_fig, 0); - rb_define_singleton_method(rb_cBigDecimal, "_load", BigDecimal_load, 1); - - rb_define_singleton_method(rb_cBigDecimal, "save_exception_mode", BigDecimal_save_exception_mode, 0); - rb_define_singleton_method(rb_cBigDecimal, "save_rounding_mode", BigDecimal_save_rounding_mode, 0); - rb_define_singleton_method(rb_cBigDecimal, "save_limit", BigDecimal_save_limit, 0); - - /* Constants definition */ - - /* - * The version of bigdecimal library - */ - rb_define_const(rb_cBigDecimal, "VERSION", rb_str_new2(BIGDECIMAL_VERSION)); - - /* - * Base value used in internal calculations. On a 32 bit system, BASE - * is 10000, indicating that calculation is done in groups of 4 digits. - * (If it were larger, BASE**2 wouldn't fit in 32 bits, so you couldn't - * guarantee that two groups could always be multiplied together without - * overflow.) - */ - rb_define_const(rb_cBigDecimal, "BASE", INT2FIX((SIGNED_VALUE)VpBaseVal())); - - /* Exceptions */ - - /* - * 0xff: Determines whether overflow, underflow or zero divide result in - * an exception being thrown. See BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL", INT2FIX(VP_EXCEPTION_ALL)); - - /* - * 0x02: Determines what happens when the result of a computation is not a - * number (NaN). See BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN", INT2FIX(VP_EXCEPTION_NaN)); - - /* - * 0x01: Determines what happens when the result of a computation is - * infinity. See BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY", INT2FIX(VP_EXCEPTION_INFINITY)); - - /* - * 0x04: Determines what happens when the result of a computation is an - * underflow (a result too small to be represented). See BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW", INT2FIX(VP_EXCEPTION_UNDERFLOW)); - - /* - * 0x01: Determines what happens when the result of a computation is an - * overflow (a result too large to be represented). See BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW", INT2FIX(VP_EXCEPTION_OVERFLOW)); - - /* - * 0x10: Determines what happens when a division by zero is performed. - * See BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE", INT2FIX(VP_EXCEPTION_ZERODIVIDE)); - - /* - * 0x100: Determines what happens when a result must be rounded in order to - * fit in the appropriate number of significant digits. See - * BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "ROUND_MODE", INT2FIX(VP_ROUND_MODE)); - - /* 1: Indicates that values should be rounded away from zero. See - * BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "ROUND_UP", INT2FIX(VP_ROUND_UP)); - - /* 2: Indicates that values should be rounded towards zero. See - * BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "ROUND_DOWN", INT2FIX(VP_ROUND_DOWN)); - - /* 3: Indicates that digits >= 5 should be rounded up, others rounded down. - * See BigDecimal.mode. */ - rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP", INT2FIX(VP_ROUND_HALF_UP)); - - /* 4: Indicates that digits >= 6 should be rounded up, others rounded down. - * See BigDecimal.mode. - */ - rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN", INT2FIX(VP_ROUND_HALF_DOWN)); - /* 5: Round towards +Infinity. See BigDecimal.mode. */ - rb_define_const(rb_cBigDecimal, "ROUND_CEILING", INT2FIX(VP_ROUND_CEIL)); - - /* 6: Round towards -Infinity. See BigDecimal.mode. */ - rb_define_const(rb_cBigDecimal, "ROUND_FLOOR", INT2FIX(VP_ROUND_FLOOR)); - - /* 7: Round towards the even neighbor. See BigDecimal.mode. */ - rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN", INT2FIX(VP_ROUND_HALF_EVEN)); - - /* 0: Indicates that a value is not a number. See BigDecimal.sign. */ - rb_define_const(rb_cBigDecimal, "SIGN_NaN", INT2FIX(VP_SIGN_NaN)); - - /* 1: Indicates that a value is +0. See BigDecimal.sign. */ - rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO", INT2FIX(VP_SIGN_POSITIVE_ZERO)); - - /* -1: Indicates that a value is -0. See BigDecimal.sign. */ - rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO", INT2FIX(VP_SIGN_NEGATIVE_ZERO)); - - /* 2: Indicates that a value is positive and finite. See BigDecimal.sign. */ - rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE", INT2FIX(VP_SIGN_POSITIVE_FINITE)); - - /* -2: Indicates that a value is negative and finite. See BigDecimal.sign. */ - rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE", INT2FIX(VP_SIGN_NEGATIVE_FINITE)); - - /* 3: Indicates that a value is positive and infinite. See BigDecimal.sign. */ - rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE", INT2FIX(VP_SIGN_POSITIVE_INFINITE)); - - /* -3: Indicates that a value is negative and infinite. See BigDecimal.sign. */ - rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE", INT2FIX(VP_SIGN_NEGATIVE_INFINITE)); - - /* Positive zero value. */ - BIGDECIMAL_LITERAL(POSITIVE_ZERO, +0); - - /* Negative zero value. */ - BIGDECIMAL_LITERAL(NEGATIVE_ZERO, -0); - - /* Positive infinity[rdoc-ref:BigDecimal@Infinity] value. */ - rb_define_const(rb_cBigDecimal, "INFINITY", BIGDECIMAL_LITERAL(POSITIVE_INFINITY, +Infinity)); - - /* Negative infinity value. */ - BIGDECIMAL_LITERAL(NEGATIVE_INFINITY, -Infinity); - - /* '{Not a Number}[rdoc-ref:BigDecimal@Not+a+Number]' value. */ - rb_define_const(rb_cBigDecimal, "NAN", BIGDECIMAL_LITERAL(NAN, NaN)); - - /* instance methods */ - rb_define_method(rb_cBigDecimal, "precs", BigDecimal_prec, 0); - rb_define_method(rb_cBigDecimal, "precision", BigDecimal_precision, 0); - rb_define_method(rb_cBigDecimal, "scale", BigDecimal_scale, 0); - rb_define_method(rb_cBigDecimal, "precision_scale", BigDecimal_precision_scale, 0); - rb_define_method(rb_cBigDecimal, "n_significant_digits", BigDecimal_n_significant_digits, 0); - - rb_define_method(rb_cBigDecimal, "add", BigDecimal_add2, 2); - rb_define_method(rb_cBigDecimal, "sub", BigDecimal_sub2, 2); - rb_define_method(rb_cBigDecimal, "mult", BigDecimal_mult2, 2); - rb_define_method(rb_cBigDecimal, "div", BigDecimal_div3, -1); - rb_define_method(rb_cBigDecimal, "hash", BigDecimal_hash, 0); - rb_define_method(rb_cBigDecimal, "to_s", BigDecimal_to_s, -1); - rb_define_method(rb_cBigDecimal, "to_i", BigDecimal_to_i, 0); - rb_define_method(rb_cBigDecimal, "to_int", BigDecimal_to_i, 0); - rb_define_method(rb_cBigDecimal, "to_r", BigDecimal_to_r, 0); - rb_define_method(rb_cBigDecimal, "split", BigDecimal_split, 0); - rb_define_method(rb_cBigDecimal, "+", BigDecimal_add, 1); - rb_define_method(rb_cBigDecimal, "-", BigDecimal_sub, 1); - rb_define_method(rb_cBigDecimal, "+@", BigDecimal_uplus, 0); - rb_define_method(rb_cBigDecimal, "-@", BigDecimal_neg, 0); - rb_define_method(rb_cBigDecimal, "*", BigDecimal_mult, 1); - rb_define_method(rb_cBigDecimal, "/", BigDecimal_div, 1); - rb_define_method(rb_cBigDecimal, "quo", BigDecimal_quo, -1); - rb_define_method(rb_cBigDecimal, "%", BigDecimal_mod, 1); - rb_define_method(rb_cBigDecimal, "modulo", BigDecimal_mod, 1); - rb_define_method(rb_cBigDecimal, "remainder", BigDecimal_remainder, 1); - rb_define_method(rb_cBigDecimal, "divmod", BigDecimal_divmod, 1); - rb_define_method(rb_cBigDecimal, "clone", BigDecimal_clone, 0); - rb_define_method(rb_cBigDecimal, "dup", BigDecimal_clone, 0); - rb_define_method(rb_cBigDecimal, "to_f", BigDecimal_to_f, 0); - rb_define_method(rb_cBigDecimal, "abs", BigDecimal_abs, 0); - rb_define_method(rb_cBigDecimal, "sqrt", BigDecimal_sqrt, 1); - rb_define_method(rb_cBigDecimal, "fix", BigDecimal_fix, 0); - rb_define_method(rb_cBigDecimal, "round", BigDecimal_round, -1); - rb_define_method(rb_cBigDecimal, "frac", BigDecimal_frac, 0); - rb_define_method(rb_cBigDecimal, "floor", BigDecimal_floor, -1); - rb_define_method(rb_cBigDecimal, "ceil", BigDecimal_ceil, -1); - rb_define_method(rb_cBigDecimal, "power", BigDecimal_power, -1); - rb_define_method(rb_cBigDecimal, "**", BigDecimal_power_op, 1); - rb_define_method(rb_cBigDecimal, "<=>", BigDecimal_comp, 1); - rb_define_method(rb_cBigDecimal, "==", BigDecimal_eq, 1); - rb_define_method(rb_cBigDecimal, "===", BigDecimal_eq, 1); - rb_define_method(rb_cBigDecimal, "eql?", BigDecimal_eq, 1); - rb_define_method(rb_cBigDecimal, "<", BigDecimal_lt, 1); - rb_define_method(rb_cBigDecimal, "<=", BigDecimal_le, 1); - rb_define_method(rb_cBigDecimal, ">", BigDecimal_gt, 1); - rb_define_method(rb_cBigDecimal, ">=", BigDecimal_ge, 1); - rb_define_method(rb_cBigDecimal, "zero?", BigDecimal_zero, 0); - rb_define_method(rb_cBigDecimal, "nonzero?", BigDecimal_nonzero, 0); - rb_define_method(rb_cBigDecimal, "coerce", BigDecimal_coerce, 1); - rb_define_method(rb_cBigDecimal, "inspect", BigDecimal_inspect, 0); - rb_define_method(rb_cBigDecimal, "exponent", BigDecimal_exponent, 0); - rb_define_method(rb_cBigDecimal, "sign", BigDecimal_sign, 0); - rb_define_method(rb_cBigDecimal, "nan?", BigDecimal_IsNaN, 0); - rb_define_method(rb_cBigDecimal, "infinite?", BigDecimal_IsInfinite, 0); - rb_define_method(rb_cBigDecimal, "finite?", BigDecimal_IsFinite, 0); - rb_define_method(rb_cBigDecimal, "truncate", BigDecimal_truncate, -1); - rb_define_method(rb_cBigDecimal, "_dump", BigDecimal_dump, -1); - - rb_mBigMath = rb_define_module("BigMath"); - rb_define_singleton_method(rb_mBigMath, "exp", BigMath_s_exp, 2); - rb_define_singleton_method(rb_mBigMath, "log", BigMath_s_log, 2); - -#define ROUNDING_MODE(i, name, value) \ - id_##name = rb_intern_const(#name); \ - rbd_rounding_modes[i].id = id_##name; \ - rbd_rounding_modes[i].mode = value; - - ROUNDING_MODE(0, up, RBD_ROUND_UP); - ROUNDING_MODE(1, down, RBD_ROUND_DOWN); - ROUNDING_MODE(2, half_up, RBD_ROUND_HALF_UP); - ROUNDING_MODE(3, half_down, RBD_ROUND_HALF_DOWN); - ROUNDING_MODE(4, ceil, RBD_ROUND_CEIL); - ROUNDING_MODE(5, floor, RBD_ROUND_FLOOR); - ROUNDING_MODE(6, half_even, RBD_ROUND_HALF_EVEN); - - ROUNDING_MODE(7, default, RBD_ROUND_DEFAULT); - ROUNDING_MODE(8, truncate, RBD_ROUND_TRUNCATE); - ROUNDING_MODE(9, banker, RBD_ROUND_BANKER); - ROUNDING_MODE(10, ceiling, RBD_ROUND_CEILING); - -#undef ROUNDING_MODE - - id_to_r = rb_intern_const("to_r"); - id_eq = rb_intern_const("=="); - id_half = rb_intern_const("half"); - - (void)VPrint; /* suppress unused warning */ -} - -/* - * - * ============================================================================ - * - * vp_ routines begin from here. - * - * ============================================================================ - * - */ -#ifdef BIGDECIMAL_DEBUG -static int gfDebug = 1; /* Debug switch */ -#if 0 -static int gfCheckVal = 1; /* Value checking flag in VpNmlz() */ -#endif -#endif /* BIGDECIMAL_DEBUG */ - -static Real *VpConstOne; /* constant 1.0 */ -static Real *VpConstPt5; /* constant 0.5 */ -#define maxnr 100UL /* Maximum iterations for calculating sqrt. */ - /* used in VpSqrt() */ - -/* ETC */ -#define MemCmp(x,y,z) memcmp(x,y,z) -#define StrCmp(x,y) strcmp(x,y) - -enum op_sw { - OP_SW_ADD = 1, /* + */ - OP_SW_SUB, /* - */ - OP_SW_MULT, /* * */ - OP_SW_DIV /* / */ -}; - -static int VpIsDefOP(Real *c, Real *a, Real *b, enum op_sw sw); -static int AddExponent(Real *a, SIGNED_VALUE n); -static DECDIG VpAddAbs(Real *a,Real *b,Real *c); -static DECDIG VpSubAbs(Real *a,Real *b,Real *c); -static size_t VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, DECDIG *av, DECDIG *bv); -static int VpNmlz(Real *a); -static void VpFormatSt(char *psz, size_t fFmt); -static int VpRdup(Real *m, size_t ind_m); - -#ifdef BIGDECIMAL_DEBUG -# ifdef HAVE_RB_EXT_RACTOR_SAFE -# error Need to make rewiting gnAlloc atomic -# endif -static int gnAlloc = 0; /* Memory allocation counter */ -#endif /* BIGDECIMAL_DEBUG */ - -/* - * EXCEPTION Handling. - */ - -#define bigdecimal_set_thread_local_exception_mode(mode) \ - rb_thread_local_aset( \ - rb_thread_current(), \ - id_BigDecimal_exception_mode, \ - INT2FIX((int)(mode)) \ - ) - -static unsigned short -VpGetException (void) -{ - VALUE const vmode = rb_thread_local_aref( - rb_thread_current(), - id_BigDecimal_exception_mode - ); - - if (NIL_P(vmode)) { - bigdecimal_set_thread_local_exception_mode(BIGDECIMAL_EXCEPTION_MODE_DEFAULT); - return BIGDECIMAL_EXCEPTION_MODE_DEFAULT; - } - - return NUM2USHORT(vmode); -} - -static void -VpSetException(unsigned short f) -{ - bigdecimal_set_thread_local_exception_mode(f); -} - -static void -VpCheckException(Real *p, bool always) -{ - if (VpIsNaN(p)) { - VpException(VP_EXCEPTION_NaN, "Computation results in 'NaN' (Not a Number)", always); - } - else if (VpIsPosInf(p)) { - VpException(VP_EXCEPTION_INFINITY, "Computation results in 'Infinity'", always); - } - else if (VpIsNegInf(p)) { - VpException(VP_EXCEPTION_INFINITY, "Computation results in '-Infinity'", always); - } -} - -static VALUE -VpCheckGetValue(Real *p) -{ - VpCheckException(p, false); - return p->obj; -} - -/* - * Precision limit. - */ - -#define bigdecimal_set_thread_local_precision_limit(limit) \ - rb_thread_local_aset( \ - rb_thread_current(), \ - id_BigDecimal_precision_limit, \ - SIZET2NUM(limit) \ - ) -#define BIGDECIMAL_PRECISION_LIMIT_DEFAULT ((size_t)0) - -/* These 2 functions added at v1.1.7 */ -VP_EXPORT size_t -VpGetPrecLimit(void) -{ - VALUE const vlimit = rb_thread_local_aref( - rb_thread_current(), - id_BigDecimal_precision_limit - ); - - if (NIL_P(vlimit)) { - bigdecimal_set_thread_local_precision_limit(BIGDECIMAL_PRECISION_LIMIT_DEFAULT); - return BIGDECIMAL_PRECISION_LIMIT_DEFAULT; - } - - return NUM2SIZET(vlimit); -} - -VP_EXPORT size_t -VpSetPrecLimit(size_t n) -{ - size_t const s = VpGetPrecLimit(); - bigdecimal_set_thread_local_precision_limit(n); - return s; -} - -/* - * Rounding mode. - */ - -#define bigdecimal_set_thread_local_rounding_mode(mode) \ - rb_thread_local_aset( \ - rb_thread_current(), \ - id_BigDecimal_rounding_mode, \ - INT2FIX((int)(mode)) \ - ) - -VP_EXPORT unsigned short -VpGetRoundMode(void) -{ - VALUE const vmode = rb_thread_local_aref( - rb_thread_current(), - id_BigDecimal_rounding_mode - ); - - if (NIL_P(vmode)) { - bigdecimal_set_thread_local_rounding_mode(BIGDECIMAL_ROUNDING_MODE_DEFAULT); - return BIGDECIMAL_ROUNDING_MODE_DEFAULT; - } - - return NUM2USHORT(vmode); -} - -VP_EXPORT int -VpIsRoundMode(unsigned short n) -{ - switch (n) { - case VP_ROUND_UP: - case VP_ROUND_DOWN: - case VP_ROUND_HALF_UP: - case VP_ROUND_HALF_DOWN: - case VP_ROUND_CEIL: - case VP_ROUND_FLOOR: - case VP_ROUND_HALF_EVEN: - return 1; - - default: - return 0; - } -} - -VP_EXPORT unsigned short -VpSetRoundMode(unsigned short n) -{ - if (VpIsRoundMode(n)) { - bigdecimal_set_thread_local_rounding_mode(n); - return n; - } - - return VpGetRoundMode(); -} - -/* - * 0.0 & 1.0 generator - * These gZero_..... and gOne_..... can be any name - * referenced from nowhere except Zero() and One(). - * gZero_..... and gOne_..... must have global scope - * (to let the compiler know they may be changed in outside - * (... but not actually..)). - */ -volatile const double gOne_ABCED9B4_CE73__00400511F31D = 1.0; - -static double -One(void) -{ - return gOne_ABCED9B4_CE73__00400511F31D; -} - -/* - ---------------------------------------------------------------- - Value of sign in Real structure is reserved for future use. - short sign; - ==0 : NaN - 1 : Positive zero - -1 : Negative zero - 2 : Positive number - -2 : Negative number - 3 : Positive infinite number - -3 : Negative infinite number - ---------------------------------------------------------------- -*/ - -VP_EXPORT double -VpGetDoubleNaN(void) /* Returns the value of NaN */ -{ - return nan(""); -} - -VP_EXPORT double -VpGetDoublePosInf(void) /* Returns the value of +Infinity */ -{ - return HUGE_VAL; -} - -VP_EXPORT double -VpGetDoubleNegInf(void) /* Returns the value of -Infinity */ -{ - return -HUGE_VAL; -} - -VP_EXPORT double -VpGetDoubleNegZero(void) /* Returns the value of -0 */ -{ - static double nzero = 1000.0; - if (nzero != 0.0) nzero = (One()/VpGetDoubleNegInf()); - return nzero; -} - -#if 0 /* unused */ -VP_EXPORT int -VpIsNegDoubleZero(double v) -{ - double z = VpGetDoubleNegZero(); - return MemCmp(&v,&z,sizeof(v))==0; -} -#endif - -VP_EXPORT int -VpException(unsigned short f, const char *str,int always) -{ - unsigned short const exception_mode = VpGetException(); - - if (f == VP_EXCEPTION_OP) always = 1; - - if (always || (exception_mode & f)) { - switch(f) { - /* case VP_EXCEPTION_OVERFLOW: */ - case VP_EXCEPTION_ZERODIVIDE: - case VP_EXCEPTION_INFINITY: - case VP_EXCEPTION_NaN: - case VP_EXCEPTION_UNDERFLOW: - case VP_EXCEPTION_OP: - rb_raise(rb_eFloatDomainError, "%s", str); - break; - default: - rb_fatal("%s", str); - } - } - return 0; /* 0 Means VpException() raised no exception */ -} - -/* Throw exception or returns 0,when resulting c is Inf or NaN */ -/* sw=1:+ 2:- 3:* 4:/ */ -static int -VpIsDefOP(Real *c, Real *a, Real *b, enum op_sw sw) -{ - if (VpIsNaN(a) || VpIsNaN(b)) { - /* at least a or b is NaN */ - VpSetNaN(c); - goto NaN; - } - - if (VpIsInf(a)) { - if (VpIsInf(b)) { - switch(sw) { - case OP_SW_ADD: /* + */ - if (VpGetSign(a) == VpGetSign(b)) { - VpSetInf(c, VpGetSign(a)); - goto Inf; - } - else { - VpSetNaN(c); - goto NaN; - } - case OP_SW_SUB: /* - */ - if (VpGetSign(a) != VpGetSign(b)) { - VpSetInf(c, VpGetSign(a)); - goto Inf; - } - else { - VpSetNaN(c); - goto NaN; - } - case OP_SW_MULT: /* * */ - VpSetInf(c, VpGetSign(a)*VpGetSign(b)); - goto Inf; - case OP_SW_DIV: /* / */ - VpSetNaN(c); - goto NaN; - } - VpSetNaN(c); - goto NaN; - } - /* Inf op Finite */ - switch(sw) { - case OP_SW_ADD: /* + */ - case OP_SW_SUB: /* - */ - VpSetInf(c, VpGetSign(a)); - break; - case OP_SW_MULT: /* * */ - if (VpIsZero(b)) { - VpSetNaN(c); - goto NaN; - } - VpSetInf(c, VpGetSign(a)*VpGetSign(b)); - break; - case OP_SW_DIV: /* / */ - VpSetInf(c, VpGetSign(a)*VpGetSign(b)); - } - goto Inf; - } - - if (VpIsInf(b)) { - switch(sw) { - case OP_SW_ADD: /* + */ - VpSetInf(c, VpGetSign(b)); - break; - case OP_SW_SUB: /* - */ - VpSetInf(c, -VpGetSign(b)); - break; - case OP_SW_MULT: /* * */ - if (VpIsZero(a)) { - VpSetNaN(c); - goto NaN; - } - VpSetInf(c, VpGetSign(a)*VpGetSign(b)); - break; - case OP_SW_DIV: /* / */ - VpSetZero(c, VpGetSign(a)*VpGetSign(b)); - } - goto Inf; - } - return 1; /* Results OK */ - -Inf: - if (VpIsPosInf(c)) { - return VpException(VP_EXCEPTION_INFINITY, "Computation results to 'Infinity'", 0); - } - else { - return VpException(VP_EXCEPTION_INFINITY, "Computation results to '-Infinity'", 0); - } - -NaN: - return VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'", 0); -} - -/* - ---------------------------------------------------------------- -*/ - -/* - * returns number of chars needed to represent vp in specified format. - */ -VP_EXPORT size_t -VpNumOfChars(Real *vp,const char *pszFmt) -{ - SIGNED_VALUE ex; - size_t nc; - - if (vp == NULL) return BASE_FIG*2+6; - if (!VpIsDef(vp)) return 32; /* not sure,may be OK */ - - switch(*pszFmt) { - case 'F': - nc = BASE_FIG*(vp->Prec + 1)+2; - ex = vp->exponent; - if (ex < 0) { - nc += BASE_FIG*(size_t)(-ex); - } - else { - if ((size_t)ex > vp->Prec) { - nc += BASE_FIG*((size_t)ex - vp->Prec); - } - } - break; - case 'E': - /* fall through */ - default: - nc = BASE_FIG*(vp->Prec + 2)+6; /* 3: sign + exponent chars */ - } - return nc; -} - -/* - * Initializer for Vp routines and constants used. - * [Input] - * BaseVal: Base value(assigned to BASE) for Vp calculation. - * It must be the form BaseVal=10**n.(n=1,2,3,...) - * If Base <= 0L,then the BASE will be calculated so - * that BASE is as large as possible satisfying the - * relation MaxVal <= BASE*(BASE+1). Where the value - * MaxVal is the largest value which can be represented - * by one DECDIG word in the computer used. - * - * [Returns] - * BIGDECIMAL_DOUBLE_FIGURES ... OK - */ -VP_EXPORT size_t -VpInit(DECDIG BaseVal) -{ - /* Setup +/- Inf NaN -0 */ - VpGetDoubleNegZero(); - - /* Const 1.0 */ - VpConstOne = NewOneNolimit(1, 1); - - /* Const 0.5 */ - VpConstPt5 = NewOneNolimit(1, 1); - VpConstPt5->exponent = 0; - VpConstPt5->frac[0] = 5*BASE1; - -#ifdef BIGDECIMAL_DEBUG - gnAlloc = 0; -#endif /* BIGDECIMAL_DEBUG */ - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - printf("VpInit: BaseVal = %"PRIuDECDIG"\n", BaseVal); - printf("\tBASE = %"PRIuDECDIG"\n", BASE); - printf("\tHALF_BASE = %"PRIuDECDIG"\n", HALF_BASE); - printf("\tBASE1 = %"PRIuDECDIG"\n", BASE1); - printf("\tBASE_FIG = %u\n", BASE_FIG); - printf("\tBIGDECIMAL_DOUBLE_FIGURES = %d\n", BIGDECIMAL_DOUBLE_FIGURES); - } -#endif /* BIGDECIMAL_DEBUG */ - - return BIGDECIMAL_DOUBLE_FIGURES; -} - -VP_EXPORT Real * -VpOne(void) -{ - return VpConstOne; -} - -/* If exponent overflows,then raise exception or returns 0 */ -static int -AddExponent(Real *a, SIGNED_VALUE n) -{ - SIGNED_VALUE e = a->exponent; - SIGNED_VALUE m = e+n; - SIGNED_VALUE eb, mb; - if (e > 0) { - if (n > 0) { - if (MUL_OVERFLOW_SIGNED_VALUE_P(m, (SIGNED_VALUE)BASE_FIG) || - MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG)) - goto overflow; - mb = m*(SIGNED_VALUE)BASE_FIG; - eb = e*(SIGNED_VALUE)BASE_FIG; - if (eb - mb > 0) goto overflow; - } - } - else if (n < 0) { - if (MUL_OVERFLOW_SIGNED_VALUE_P(m, (SIGNED_VALUE)BASE_FIG) || - MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG)) - goto underflow; - mb = m*(SIGNED_VALUE)BASE_FIG; - eb = e*(SIGNED_VALUE)BASE_FIG; - if (mb - eb > 0) goto underflow; - } - a->exponent = m; - return 1; - -/* Overflow/Underflow ==> Raise exception or returns 0 */ -underflow: - VpSetZero(a, VpGetSign(a)); - return VpException(VP_EXCEPTION_UNDERFLOW, "Exponent underflow", 0); - -overflow: - VpSetInf(a, VpGetSign(a)); - return VpException(VP_EXCEPTION_OVERFLOW, "Exponent overflow", 0); -} - -Real * -bigdecimal_parse_special_string(const char *str) -{ - static const struct { - const char *str; - size_t len; - int sign; - } table[] = { - { SZ_INF, sizeof(SZ_INF) - 1, VP_SIGN_POSITIVE_INFINITE }, - { SZ_PINF, sizeof(SZ_PINF) - 1, VP_SIGN_POSITIVE_INFINITE }, - { SZ_NINF, sizeof(SZ_NINF) - 1, VP_SIGN_NEGATIVE_INFINITE }, - { SZ_NaN, sizeof(SZ_NaN) - 1, VP_SIGN_NaN } - }; - static const size_t table_length = sizeof(table) / sizeof(table[0]); - size_t i; - - for (i = 0; i < table_length; ++i) { - const char *p; - if (strncmp(str, table[i].str, table[i].len) != 0) { - continue; - } - - p = str + table[i].len; - while (*p && ISSPACE(*p)) ++p; - if (*p == '\0') { - Real *vp = rbd_allocate_struct(1); - vp->MaxPrec = 1; - switch (table[i].sign) { - default: - UNREACHABLE; break; - case VP_SIGN_POSITIVE_INFINITE: - VpSetPosInf(vp); - return vp; - case VP_SIGN_NEGATIVE_INFINITE: - VpSetNegInf(vp); - return vp; - case VP_SIGN_NaN: - VpSetNaN(vp); - return vp; - } - } - } - - return NULL; -} - -struct VpCtoV_args { - Real *a; - const char *int_chr; - size_t ni; - const char *frac; - size_t nf; - const char *exp_chr; - size_t ne; -}; - -static VALUE -call_VpCtoV(VALUE arg) -{ - struct VpCtoV_args *x = (struct VpCtoV_args *)arg; - return (VALUE)VpCtoV(x->a, x->int_chr, x->ni, x->frac, x->nf, x->exp_chr, x->ne); -} - -static int -protected_VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, const char *exp_chr, size_t ne, int free_on_error) -{ - struct VpCtoV_args args; - int state = 0; - - args.a = a; - args.int_chr = int_chr; - args.ni = ni; - args.frac = frac; - args.nf = nf; - args.exp_chr = exp_chr; - args.ne = ne; - - VALUE result = rb_protect(call_VpCtoV, (VALUE)&args, &state); - if (state) { - if (free_on_error) { - rbd_free_struct(a); - } - rb_jump_tag(state); - } - - return (int)result; -} - -/* - * Allocates variable. - * [Input] - * mx ... The number of decimal digits to be allocated, if zero then mx is determined by szVal. - * The mx will be the number of significant digits can to be stored. - * szVal ... The value assigned(char). If szVal==NULL, then zero is assumed. - * If szVal[0]=='#' then MaxPrec is not affected by the precision limit - * so that the full precision specified by szVal is allocated. - * - * [Returns] - * Pointer to the newly allocated variable, or - * NULL be returned if memory allocation is failed,or any error. - */ -VP_EXPORT Real * -VpAlloc(size_t mx, const char *szVal, int strict_p, int exc) -{ - const char *orig_szVal = szVal; - size_t i, j, ni, ipf, nf, ipe, ne, exp_seen, nalloc; - size_t len; - char v, *psz; - int sign=1; - Real *vp = NULL; - VALUE buf; - - if (szVal == NULL) { - return_zero: - /* necessary to be able to store */ - /* at least mx digits. */ - /* szVal==NULL ==> allocate zero value. */ - vp = rbd_allocate_struct(mx); - vp->MaxPrec = rbd_calculate_internal_digits(mx, false); /* Must false */ - VpSetZero(vp, 1); /* initialize vp to zero. */ - return vp; - } - - /* Skipping leading spaces */ - while (ISSPACE(*szVal)) szVal++; - - /* Check on Inf & NaN */ - if ((vp = bigdecimal_parse_special_string(szVal)) != NULL) { - return vp; - } - - /* Processing the leading one `#` */ - if (*szVal != '#') { - len = rbd_calculate_internal_digits(mx, true); - } - else { - len = rbd_calculate_internal_digits(mx, false); - ++szVal; - } - - /* Scanning digits */ - - /* A buffer for keeping scanned digits */ - buf = rb_str_tmp_new(strlen(szVal) + 1); - psz = RSTRING_PTR(buf); - - /* cursor: i for psz, and j for szVal */ - i = j = 0; - - /* Scanning: sign part */ - v = psz[i] = szVal[j]; - if ((v == '-') || (v == '+')) { - sign = -(v == '-'); - ++i; - ++j; - } - - /* Scanning: integer part */ - ni = 0; /* number of digits in the integer part */ - while ((v = psz[i] = szVal[j]) != '\0') { - if (!strict_p && ISSPACE(v)) { - v = psz[i] = '\0'; - break; - } - if (v == '_') { - if (ni > 0) { - v = szVal[j+1]; - if (v == '\0' || ISSPACE(v) || ISDIGIT(v)) { - ++j; - continue; - } - if (!strict_p) { - v = psz[i] = '\0'; - break; - } - } - goto invalid_value; - } - if (!ISDIGIT(v)) { - break; - } - ++ni; - ++i; - ++j; - } - - /* Scanning: fractional part */ - nf = 0; /* number of digits in the fractional part */ - ne = 0; /* number of digits in the exponential part */ - ipf = 0; /* index of the beginning of the fractional part */ - ipe = 0; /* index of the beginning of the exponential part */ - exp_seen = 0; - - if (v != '\0') { - /* Scanning fractional part */ - if ((psz[i] = szVal[j]) == '.') { - ++i; - ++j; - ipf = i; - while ((v = psz[i] = szVal[j]) != '\0') { - if (!strict_p && ISSPACE(v)) { - v = psz[i] = '\0'; - break; - } - if (v == '_') { - if (nf > 0 && ISDIGIT(szVal[j+1])) { - ++j; - continue; - } - if (!strict_p) { - v = psz[i] = '\0'; - break; - } - goto invalid_value; - } - if (!ISDIGIT(v)) break; - ++i; - ++j; - ++nf; - } - } - - /* Scanning exponential part */ - if (v != '\0') { - switch ((psz[i] = szVal[j])) { - case '\0': - break; - case 'e': case 'E': - case 'd': case 'D': - exp_seen = 1; - ++i; - ++j; - ipe = i; - v = psz[i] = szVal[j]; - if ((v == '-') || (v == '+')) { - ++i; - ++j; - } - while ((v = psz[i] = szVal[j]) != '\0') { - if (!strict_p && ISSPACE(v)) { - v = psz[i] = '\0'; - break; - } - if (v == '_') { - if (ne > 0 && ISDIGIT(szVal[j+1])) { - ++j; - continue; - } - if (!strict_p) { - v = psz[i] = '\0'; - if (ne == 0) { - exp_seen = 0; - } - break; - } - goto invalid_value; - } - if (!ISDIGIT(v)) break; - ++i; - ++j; - ++ne; - } - break; - default: - break; - } - } - - if (v != '\0') { - /* Scanning trailing spaces */ - while (ISSPACE(szVal[j])) ++j; - - /* Invalid character */ - if (szVal[j] && strict_p) { - goto invalid_value; - } - } - } - - psz[i] = '\0'; - - if (strict_p && ((ni == 0 && nf == 0) || (exp_seen && ne == 0))) { - VALUE str; - invalid_value: - if (!strict_p) { - goto return_zero; - } - if (!exc) { - return NULL; - } - str = rb_str_new2(orig_szVal); - rb_raise(rb_eArgError, "invalid value for BigDecimal(): \"%"PRIsVALUE"\"", str); - } - - nalloc = (ni + nf + BASE_FIG - 1) / BASE_FIG + 1; /* set effective allocation */ - /* units for szVal[] */ - if (len == 0) len = 1; - nalloc = Max(nalloc, len); - len = nalloc; - vp = rbd_allocate_struct(len); - vp->MaxPrec = len; /* set max precision */ - VpSetZero(vp, sign); - protected_VpCtoV(vp, psz, ni, psz + ipf, nf, psz + ipe, ne, true); - rb_str_resize(buf, 0); - return vp; -} - -/* - * Assignment(c=a). - * [Input] - * a ... RHSV - * isw ... switch for assignment. - * c = a when isw > 0 - * c = -a when isw < 0 - * if c->MaxPrec < a->Prec,then round operation - * will be performed. - * [Output] - * c ... LHSV - */ -VP_EXPORT size_t -VpAsgn(Real *c, Real *a, int isw) -{ - size_t n; - if (VpIsNaN(a)) { - VpSetNaN(c); - return 0; - } - if (VpIsInf(a)) { - VpSetInf(c, isw * VpGetSign(a)); - return 0; - } - - /* check if the RHS is zero */ - if (!VpIsZero(a)) { - c->exponent = a->exponent; /* store exponent */ - VpSetSign(c, isw * VpGetSign(a)); /* set sign */ - n = (a->Prec < c->MaxPrec) ? (a->Prec) : (c->MaxPrec); - c->Prec = n; - memcpy(c->frac, a->frac, n * sizeof(DECDIG)); - /* Needs round ? */ - if (isw != 10) { - /* Not in ActiveRound */ - if(c->Prec < a->Prec) { - VpInternalRound(c, n, (n>0) ? a->frac[n-1] : 0, a->frac[n]); - } - else { - VpLimitRound(c,0); - } - } - } - else { - /* The value of 'a' is zero. */ - VpSetZero(c, isw * VpGetSign(a)); - return 1; - } - return c->Prec * BASE_FIG; -} - -/* - * c = a + b when operation = 1 or 2 - * c = a - b when operation = -1 or -2. - * Returns number of significant digits of c - */ -VP_EXPORT size_t -VpAddSub(Real *c, Real *a, Real *b, int operation) -{ - short sw, isw; - Real *a_ptr, *b_ptr; - size_t n, na, nb, i; - DECDIG mrv; - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpAddSub(enter) a=% \n", a); - VPrint(stdout, " b=% \n", b); - printf(" operation=%d\n", operation); - } -#endif /* BIGDECIMAL_DEBUG */ - - if (!VpIsDefOP(c, a, b, (operation > 0) ? OP_SW_ADD : OP_SW_SUB)) return 0; /* No significant digits */ - - /* check if a or b is zero */ - if (VpIsZero(a)) { - /* a is zero,then assign b to c */ - if (!VpIsZero(b)) { - VpAsgn(c, b, operation); - } - else { - /* Both a and b are zero. */ - if (VpGetSign(a) < 0 && operation * VpGetSign(b) < 0) { - /* -0 -0 */ - VpSetZero(c, -1); - } - else { - VpSetZero(c, 1); - } - return 1; /* 0: 1 significant digits */ - } - return c->Prec * BASE_FIG; - } - if (VpIsZero(b)) { - /* b is zero,then assign a to c. */ - VpAsgn(c, a, 1); - return c->Prec*BASE_FIG; - } - - if (operation < 0) sw = -1; - else sw = 1; - - /* compare absolute value. As a result,|a_ptr|>=|b_ptr| */ - if (a->exponent > b->exponent) { - a_ptr = a; - b_ptr = b; - } /* |a|>|b| */ - else if (a->exponent < b->exponent) { - a_ptr = b; - b_ptr = a; - } /* |a|<|b| */ - else { - /* Exponent part of a and b is the same,then compare fraction */ - /* part */ - na = a->Prec; - nb = b->Prec; - n = Min(na, nb); - for (i=0; i < n; ++i) { - if (a->frac[i] > b->frac[i]) { - a_ptr = a; - b_ptr = b; - goto end_if; - } - else if (a->frac[i] < b->frac[i]) { - a_ptr = b; - b_ptr = a; - goto end_if; - } - } - if (na > nb) { - a_ptr = a; - b_ptr = b; - goto end_if; - } - else if (na < nb) { - a_ptr = b; - b_ptr = a; - goto end_if; - } - /* |a| == |b| */ - if (VpGetSign(a) + sw *VpGetSign(b) == 0) { - VpSetZero(c, 1); /* abs(a)=abs(b) and operation = '-' */ - return c->Prec * BASE_FIG; - } - a_ptr = a; - b_ptr = b; - } - -end_if: - isw = VpGetSign(a) + sw *VpGetSign(b); - /* - * isw = 0 ...( 1)+(-1),( 1)-( 1),(-1)+(1),(-1)-(-1) - * = 2 ...( 1)+( 1),( 1)-(-1) - * =-2 ...(-1)+(-1),(-1)-( 1) - * If isw==0, then c =(Sign a_ptr)(|a_ptr|-|b_ptr|) - * else c =(Sign ofisw)(|a_ptr|+|b_ptr|) - */ - if (isw) { /* addition */ - VpSetSign(c, 1); - mrv = VpAddAbs(a_ptr, b_ptr, c); - VpSetSign(c, isw / 2); - } - else { /* subtraction */ - VpSetSign(c, 1); - mrv = VpSubAbs(a_ptr, b_ptr, c); - if (a_ptr == a) { - VpSetSign(c,VpGetSign(a)); - } - else { - VpSetSign(c, VpGetSign(a_ptr) * sw); - } - } - VpInternalRound(c, 0, (c->Prec > 0) ? c->frac[c->Prec-1] : 0, mrv); - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpAddSub(result) c=% \n", c); - VPrint(stdout, " a=% \n", a); - VPrint(stdout, " b=% \n", b); - printf(" operation=%d\n", operation); - } -#endif /* BIGDECIMAL_DEBUG */ - return c->Prec * BASE_FIG; -} - -/* - * Addition of two values with variable precision - * a and b assuming abs(a)>abs(b). - * c = abs(a) + abs(b) ; where |a|>=|b| - */ -static DECDIG -VpAddAbs(Real *a, Real *b, Real *c) -{ - size_t word_shift; - size_t ap; - size_t bp; - size_t cp; - size_t a_pos; - size_t b_pos, b_pos_with_word_shift; - size_t c_pos; - DECDIG av, bv, carry, mrv; - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpAddAbs called: a = %\n", a); - VPrint(stdout, " b = %\n", b); - } -#endif /* BIGDECIMAL_DEBUG */ - - word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv); - a_pos = ap; - b_pos = bp; - c_pos = cp; - - if (word_shift == (size_t)-1L) return 0; /* Overflow */ - if (b_pos == (size_t)-1L) goto Assign_a; - - mrv = av + bv; /* Most right val. Used for round. */ - - /* Just assign the last few digits of b to c because a has no */ - /* corresponding digits to be added. */ - if (b_pos > 0) { - while (b_pos > 0 && b_pos + word_shift > a_pos) { - c->frac[--c_pos] = b->frac[--b_pos]; - } - } - if (b_pos == 0 && word_shift > a_pos) { - while (word_shift-- > a_pos) { - c->frac[--c_pos] = 0; - } - } - - /* Just assign the last few digits of a to c because b has no */ - /* corresponding digits to be added. */ - b_pos_with_word_shift = b_pos + word_shift; - while (a_pos > b_pos_with_word_shift) { - c->frac[--c_pos] = a->frac[--a_pos]; - } - carry = 0; /* set first carry be zero */ - - /* Now perform addition until every digits of b will be */ - /* exhausted. */ - while (b_pos > 0) { - c->frac[--c_pos] = a->frac[--a_pos] + b->frac[--b_pos] + carry; - if (c->frac[c_pos] >= BASE) { - c->frac[c_pos] -= BASE; - carry = 1; - } - else { - carry = 0; - } - } - - /* Just assign the first few digits of a with considering */ - /* the carry obtained so far because b has been exhausted. */ - while (a_pos > 0) { - c->frac[--c_pos] = a->frac[--a_pos] + carry; - if (c->frac[c_pos] >= BASE) { - c->frac[c_pos] -= BASE; - carry = 1; - } - else { - carry = 0; - } - } - if (c_pos) c->frac[c_pos - 1] += carry; - goto Exit; - -Assign_a: - VpAsgn(c, a, 1); - mrv = 0; - -Exit: - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpAddAbs exit: c=% \n", c); - } -#endif /* BIGDECIMAL_DEBUG */ - return mrv; -} - -/* - * c = abs(a) - abs(b) - */ -static DECDIG -VpSubAbs(Real *a, Real *b, Real *c) -{ - size_t word_shift; - size_t ap; - size_t bp; - size_t cp; - size_t a_pos; - size_t b_pos, b_pos_with_word_shift; - size_t c_pos; - DECDIG av, bv, borrow, mrv; - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpSubAbs called: a = %\n", a); - VPrint(stdout, " b = %\n", b); - } -#endif /* BIGDECIMAL_DEBUG */ - - word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv); - a_pos = ap; - b_pos = bp; - c_pos = cp; - if (word_shift == (size_t)-1L) return 0; /* Overflow */ - if (b_pos == (size_t)-1L) goto Assign_a; - - if (av >= bv) { - mrv = av - bv; - borrow = 0; - } - else { - mrv = 0; - borrow = 1; - } - - /* Just assign the values which are the BASE subtracted by */ - /* each of the last few digits of the b because the a has no */ - /* corresponding digits to be subtracted. */ - if (b_pos + word_shift > a_pos) { - while (b_pos > 0 && b_pos + word_shift > a_pos) { - c->frac[--c_pos] = BASE - b->frac[--b_pos] - borrow; - borrow = 1; - } - if (b_pos == 0) { - while (word_shift > a_pos) { - --word_shift; - c->frac[--c_pos] = BASE - borrow; - borrow = 1; - } - } - } - /* Just assign the last few digits of a to c because b has no */ - /* corresponding digits to subtract. */ - - b_pos_with_word_shift = b_pos + word_shift; - while (a_pos > b_pos_with_word_shift) { - c->frac[--c_pos] = a->frac[--a_pos]; - } - - /* Now perform subtraction until every digits of b will be */ - /* exhausted. */ - while (b_pos > 0) { - --c_pos; - if (a->frac[--a_pos] < b->frac[--b_pos] + borrow) { - c->frac[c_pos] = BASE + a->frac[a_pos] - b->frac[b_pos] - borrow; - borrow = 1; - } - else { - c->frac[c_pos] = a->frac[a_pos] - b->frac[b_pos] - borrow; - borrow = 0; - } - } - - /* Just assign the first few digits of a with considering */ - /* the borrow obtained so far because b has been exhausted. */ - while (a_pos > 0) { - --c_pos; - if (a->frac[--a_pos] < borrow) { - c->frac[c_pos] = BASE + a->frac[a_pos] - borrow; - borrow = 1; - } - else { - c->frac[c_pos] = a->frac[a_pos] - borrow; - borrow = 0; - } - } - if (c_pos) c->frac[c_pos - 1] -= borrow; - goto Exit; - -Assign_a: - VpAsgn(c, a, 1); - mrv = 0; - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpSubAbs exit: c=% \n", c); - } -#endif /* BIGDECIMAL_DEBUG */ - return mrv; -} - -/* - * Note: If(av+bv)>= HALF_BASE,then 1 will be added to the least significant - * digit of c(In case of addition). - * ------------------------- figure of output ----------------------------------- - * a = xxxxxxxxxxx - * b = xxxxxxxxxx - * c =xxxxxxxxxxxxxxx - * word_shift = | | - * right_word = | | (Total digits in RHSV) - * left_word = | | (Total digits in LHSV) - * a_pos = | - * b_pos = | - * c_pos = | - */ -static size_t -VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, DECDIG *av, DECDIG *bv) -{ - size_t left_word, right_word, word_shift; - - size_t const round_limit = (VpGetPrecLimit() + BASE_FIG - 1) / BASE_FIG; - - assert(a->exponent >= b->exponent); - - c->frac[0] = 0; - *av = *bv = 0; - - word_shift = (a->exponent - b->exponent); - left_word = b->Prec + word_shift; - right_word = Max(a->Prec, left_word); - left_word = c->MaxPrec - 1; /* -1 ... prepare for round up */ - - /* - * check if 'round' is needed. - */ - if (right_word > left_word) { /* round ? */ - /*--------------------------------- - * Actual size of a = xxxxxxAxx - * Actual size of b = xxxBxxxxx - * Max. size of c = xxxxxx - * Round off = |-----| - * c_pos = | - * right_word = | - * a_pos = | - */ - *c_pos = right_word = left_word + 1; /* Set resulting precision */ - /* be equal to that of c */ - if (a->Prec >= c->MaxPrec) { - /* - * a = xxxxxxAxxx - * c = xxxxxx - * a_pos = | - */ - *a_pos = left_word; - if (*a_pos <= round_limit) { - *av = a->frac[*a_pos]; /* av is 'A' shown in above. */ - } - } - else { - /* - * a = xxxxxxx - * c = xxxxxxxxxx - * a_pos = | - */ - *a_pos = a->Prec; - } - if (b->Prec + word_shift >= c->MaxPrec) { - /* - * a = xxxxxxxxx - * b = xxxxxxxBxxx - * c = xxxxxxxxxxx - * b_pos = | - */ - if (c->MaxPrec >= word_shift + 1) { - *b_pos = c->MaxPrec - word_shift - 1; - if (*b_pos + word_shift <= round_limit) { - *bv = b->frac[*b_pos]; - } - } - else { - *b_pos = -1L; - } - } - else { - /* - * a = xxxxxxxxxxxxxxxx - * b = xxxxxx - * c = xxxxxxxxxxxxx - * b_pos = | - */ - *b_pos = b->Prec; - } - } - else { /* The MaxPrec of c - 1 > The Prec of a + b */ - /* - * a = xxxxxxx - * b = xxxxxx - * c = xxxxxxxxxxx - * c_pos = | - */ - *b_pos = b->Prec; - *a_pos = a->Prec; - *c_pos = right_word + 1; - } - c->Prec = *c_pos; - c->exponent = a->exponent; - if (!AddExponent(c, 1)) return (size_t)-1L; - return word_shift; -} - -/* - * Return number of significant digits - * c = a * b , Where a = a0a1a2 ... an - * b = b0b1b2 ... bm - * c = c0c1c2 ... cl - * a0 a1 ... an * bm - * a0 a1 ... an * bm-1 - * . . . - * . . . - * a0 a1 .... an * b0 - * +_____________________________ - * c0 c1 c2 ...... cl - * nc <---| - * MaxAB |--------------------| - */ -VP_EXPORT size_t -VpMult(Real *c, Real *a, Real *b) -{ - size_t MxIndA, MxIndB, MxIndAB, MxIndC; - size_t ind_c, i, ii, nc; - size_t ind_as, ind_ae, ind_bs; - DECDIG carry; - DECDIG_DBL s; - Real *w; - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpMult(Enter): a=% \n", a); - VPrint(stdout, " b=% \n", b); - } -#endif /* BIGDECIMAL_DEBUG */ - - if (!VpIsDefOP(c, a, b, OP_SW_MULT)) return 0; /* No significant digit */ - - if (VpIsZero(a) || VpIsZero(b)) { - /* at least a or b is zero */ - VpSetZero(c, VpGetSign(a) * VpGetSign(b)); - return 1; /* 0: 1 significant digit */ - } - - if (VpIsOne(a)) { - VpAsgn(c, b, VpGetSign(a)); - goto Exit; - } - if (VpIsOne(b)) { - VpAsgn(c, a, VpGetSign(b)); - goto Exit; - } - if (b->Prec > a->Prec) { - /* Adjust so that digits(a)>digits(b) */ - w = a; - a = b; - b = w; - } - w = NULL; - MxIndA = a->Prec - 1; - MxIndB = b->Prec - 1; - MxIndC = c->MaxPrec - 1; - MxIndAB = a->Prec + b->Prec - 1; - - if (MxIndC < MxIndAB) { /* The Max. prec. of c < Prec(a)+Prec(b) */ - w = c; - c = NewZeroNolimit(1, (size_t)((MxIndAB + 1) * BASE_FIG)); - MxIndC = MxIndAB; - } - - /* set LHSV c info */ - - c->exponent = a->exponent; /* set exponent */ - if (!AddExponent(c, b->exponent)) { - if (w) rbd_free_struct(c); - return 0; - } - VpSetSign(c, VpGetSign(a) * VpGetSign(b)); /* set sign */ - carry = 0; - nc = ind_c = MxIndAB; - memset(c->frac, 0, (nc + 1) * sizeof(DECDIG)); /* Initialize c */ - c->Prec = nc + 1; /* set precision */ - for (nc = 0; nc < MxIndAB; ++nc, --ind_c) { - if (nc < MxIndB) { /* The left triangle of the Fig. */ - ind_as = MxIndA - nc; - ind_ae = MxIndA; - ind_bs = MxIndB; - } - else if (nc <= MxIndA) { /* The middle rectangular of the Fig. */ - ind_as = MxIndA - nc; - ind_ae = MxIndA - (nc - MxIndB); - ind_bs = MxIndB; - } - else /* if (nc > MxIndA) */ { /* The right triangle of the Fig. */ - ind_as = 0; - ind_ae = MxIndAB - nc - 1; - ind_bs = MxIndB - (nc - MxIndA); - } - - for (i = ind_as; i <= ind_ae; ++i) { - s = (DECDIG_DBL)a->frac[i] * b->frac[ind_bs--]; - carry = (DECDIG)(s / BASE); - s -= (DECDIG_DBL)carry * BASE; - c->frac[ind_c] += (DECDIG)s; - if (c->frac[ind_c] >= BASE) { - s = c->frac[ind_c] / BASE; - carry += (DECDIG)s; - c->frac[ind_c] -= (DECDIG)(s * BASE); - } - if (carry) { - ii = ind_c; - while (ii-- > 0) { - c->frac[ii] += carry; - if (c->frac[ii] >= BASE) { - carry = c->frac[ii] / BASE; - c->frac[ii] -= (carry * BASE); - } - else { - break; - } - } - } - } - } - if (w != NULL) { /* free work variable */ - VpNmlz(c); - VpAsgn(w, c, 1); - rbd_free_struct(c); - c = w; - } - else { - VpLimitRound(c,0); - } - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpMult(c=a*b): c=% \n", c); - VPrint(stdout, " a=% \n", a); - VPrint(stdout, " b=% \n", b); - } -#endif /*BIGDECIMAL_DEBUG */ - return c->Prec*BASE_FIG; -} - -/* - * c = a / b, remainder = r - */ -VP_EXPORT size_t -VpDivd(Real *c, Real *r, Real *a, Real *b) -{ - size_t word_a, word_b, word_c, word_r; - size_t i, n, ind_a, ind_b, ind_c, ind_r; - size_t nLoop; - DECDIG_DBL q, b1, b1p1, b1b2, b1b2p1, r1r2; - DECDIG borrow, borrow1, borrow2; - DECDIG_DBL qb; - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, " VpDivd(c=a/b) a=% \n", a); - VPrint(stdout, " b=% \n", b); - } -#endif /*BIGDECIMAL_DEBUG */ - - VpSetNaN(r); - if (!VpIsDefOP(c, a, b, OP_SW_DIV)) goto Exit; - if (VpIsZero(a) && VpIsZero(b)) { - VpSetNaN(c); - return VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'", 0); - } - if (VpIsZero(b)) { - VpSetInf(c, VpGetSign(a) * VpGetSign(b)); - return VpException(VP_EXCEPTION_ZERODIVIDE, "Divide by zero", 0); - } - if (VpIsZero(a)) { - /* numerator a is zero */ - VpSetZero(c, VpGetSign(a) * VpGetSign(b)); - VpSetZero(r, VpGetSign(a) * VpGetSign(b)); - goto Exit; - } - if (VpIsOne(b)) { - /* divide by one */ - VpAsgn(c, a, VpGetSign(b)); - VpSetZero(r, VpGetSign(a)); - goto Exit; - } - - word_a = a->Prec; - word_b = b->Prec; - word_c = c->MaxPrec; - word_r = r->MaxPrec; - - if (word_a >= word_r || word_b + word_c - 2 >= word_r) goto space_error; - - ind_r = 1; - r->frac[0] = 0; - while (ind_r <= word_a) { - r->frac[ind_r] = a->frac[ind_r - 1]; - ++ind_r; - } - while (ind_r < word_r) r->frac[ind_r++] = 0; - - ind_c = 0; - while (ind_c < word_c) c->frac[ind_c++] = 0; - - /* initial procedure */ - b1 = b1p1 = b->frac[0]; - if (b->Prec <= 1) { - b1b2p1 = b1b2 = b1p1 * BASE; - } - else { - b1p1 = b1 + 1; - b1b2p1 = b1b2 = b1 * BASE + b->frac[1]; - if (b->Prec > 2) ++b1b2p1; - } - - /* */ - /* loop start */ - ind_c = word_r - 1; - nLoop = Min(word_c,ind_c); - ind_c = 1; - while (ind_c < nLoop) { - if (r->frac[ind_c] == 0) { - ++ind_c; - continue; - } - r1r2 = (DECDIG_DBL)r->frac[ind_c] * BASE + r->frac[ind_c + 1]; - if (r1r2 == b1b2) { - /* The first two word digits is the same */ - ind_b = 2; - ind_a = ind_c + 2; - while (ind_b < word_b) { - if (r->frac[ind_a] < b->frac[ind_b]) goto div_b1p1; - if (r->frac[ind_a] > b->frac[ind_b]) break; - ++ind_a; - ++ind_b; - } - /* The first few word digits of r and b is the same and */ - /* the first different word digit of w is greater than that */ - /* of b, so quotient is 1 and just subtract b from r. */ - borrow = 0; /* quotient=1, then just r-b */ - ind_b = b->Prec - 1; - ind_r = ind_c + ind_b; - if (ind_r >= word_r) goto space_error; - n = ind_b; - for (i = 0; i <= n; ++i) { - if (r->frac[ind_r] < b->frac[ind_b] + borrow) { - r->frac[ind_r] += (BASE - (b->frac[ind_b] + borrow)); - borrow = 1; - } - else { - r->frac[ind_r] = r->frac[ind_r] - b->frac[ind_b] - borrow; - borrow = 0; - } - --ind_r; - --ind_b; - } - ++c->frac[ind_c]; - goto carry; - } - /* The first two word digits is not the same, */ - /* then compare magnitude, and divide actually. */ - if (r1r2 >= b1b2p1) { - q = r1r2 / b1b2p1; /* q == (DECDIG)q */ - c->frac[ind_c] += (DECDIG)q; - ind_r = b->Prec + ind_c - 1; - goto sub_mult; - } - -div_b1p1: - if (ind_c + 1 >= word_c) goto out_side; - q = r1r2 / b1p1; /* q == (DECDIG)q */ - c->frac[ind_c + 1] += (DECDIG)q; - ind_r = b->Prec + ind_c; - -sub_mult: - borrow1 = borrow2 = 0; - ind_b = word_b - 1; - if (ind_r >= word_r) goto space_error; - n = ind_b; - for (i = 0; i <= n; ++i) { - /* now, perform r = r - q * b */ - qb = q * b->frac[ind_b]; - if (qb < BASE) borrow1 = 0; - else { - borrow1 = (DECDIG)(qb / BASE); - qb -= (DECDIG_DBL)borrow1 * BASE; /* get qb < BASE */ - } - if(r->frac[ind_r] < qb) { - r->frac[ind_r] += (DECDIG)(BASE - qb); - borrow2 = borrow2 + borrow1 + 1; - } - else { - r->frac[ind_r] -= (DECDIG)qb; - borrow2 += borrow1; - } - if (borrow2) { - if(r->frac[ind_r - 1] < borrow2) { - r->frac[ind_r - 1] += (BASE - borrow2); - borrow2 = 1; - } - else { - r->frac[ind_r - 1] -= borrow2; - borrow2 = 0; - } - } - --ind_r; - --ind_b; - } - - r->frac[ind_r] -= borrow2; -carry: - ind_r = ind_c; - while (c->frac[ind_r] >= BASE) { - c->frac[ind_r] -= BASE; - --ind_r; - ++c->frac[ind_r]; - } - } - /* End of operation, now final arrangement */ -out_side: - c->Prec = word_c; - c->exponent = a->exponent; - if (!AddExponent(c, 2)) return 0; - if (!AddExponent(c, -(b->exponent))) return 0; - - VpSetSign(c, VpGetSign(a) * VpGetSign(b)); - VpNmlz(c); /* normalize c */ - r->Prec = word_r; - r->exponent = a->exponent; - if (!AddExponent(r, 1)) return 0; - VpSetSign(r, VpGetSign(a)); - VpNmlz(r); /* normalize r(remainder) */ - goto Exit; - -space_error: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - printf(" word_a=%"PRIuSIZE"\n", word_a); - printf(" word_b=%"PRIuSIZE"\n", word_b); - printf(" word_c=%"PRIuSIZE"\n", word_c); - printf(" word_r=%"PRIuSIZE"\n", word_r); - printf(" ind_r =%"PRIuSIZE"\n", ind_r); - } -#endif /* BIGDECIMAL_DEBUG */ - rb_bug("ERROR(VpDivd): space for remainder too small."); - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, " VpDivd(c=a/b), c=% \n", c); - VPrint(stdout, " r=% \n", r); - } -#endif /* BIGDECIMAL_DEBUG */ - return c->Prec * BASE_FIG; -} - -/* - * Input a = 00000xxxxxxxx En(5 preceding zeros) - * Output a = xxxxxxxx En-5 - */ -static int -VpNmlz(Real *a) -{ - size_t ind_a, i; - - if (!VpIsDef(a)) goto NoVal; - if (VpIsZero(a)) goto NoVal; - - ind_a = a->Prec; - while (ind_a--) { - if (a->frac[ind_a]) { - a->Prec = ind_a + 1; - i = 0; - while (a->frac[i] == 0) ++i; /* skip the first few zeros */ - if (i) { - a->Prec -= i; - if (!AddExponent(a, -(SIGNED_VALUE)i)) return 0; - memmove(&a->frac[0], &a->frac[i], a->Prec*sizeof(DECDIG)); - } - return 1; - } - } - /* a is zero(no non-zero digit) */ - VpSetZero(a, VpGetSign(a)); - return 0; - -NoVal: - a->frac[0] = 0; - a->Prec = 1; - return 0; -} - -/* - * VpComp = 0 ... if a=b, - * Pos ... a>b, - * Neg ... asign - b->sign; - else e = a->sign; - - if (e > 0) return 1; - else if (e < 0) return -1; - else return 0; - } - if (!VpIsDef(b)) { - e = -b->sign; - if (e > 0) return 1; - else return -1; - } - /* Zero check */ - if (VpIsZero(a)) { - if (VpIsZero(b)) return 0; /* both zero */ - val = -VpGetSign(b); - goto Exit; - } - if (VpIsZero(b)) { - val = VpGetSign(a); - goto Exit; - } - - /* compare sign */ - if (VpGetSign(a) > VpGetSign(b)) { - val = 1; /* a>b */ - goto Exit; - } - if (VpGetSign(a) < VpGetSign(b)) { - val = -1; /* aexponent > b->exponent) { - val = VpGetSign(a); - goto Exit; - } - if (a->exponent < b->exponent) { - val = -VpGetSign(b); - goto Exit; - } - - /* a and b have same exponent, then compare their significand. */ - mx = (a->Prec < b->Prec) ? a->Prec : b->Prec; - ind = 0; - while (ind < mx) { - if (a->frac[ind] > b->frac[ind]) { - val = VpGetSign(a); - goto Exit; - } - if (a->frac[ind] < b->frac[ind]) { - val = -VpGetSign(b); - goto Exit; - } - ++ind; - } - if (a->Prec > b->Prec) { - val = VpGetSign(a); - } - else if (a->Prec < b->Prec) { - val = -VpGetSign(b); - } - -Exit: - if (val > 1) val = 1; - else if (val < -1) val = -1; - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, " VpComp a=%\n", a); - VPrint(stdout, " b=%\n", b); - printf(" ans=%d\n", val); - } -#endif /* BIGDECIMAL_DEBUG */ - return (int)val; -} - -/* - * cntl_chr ... ASCIIZ Character, print control characters - * Available control codes: - * % ... VP variable. To print '%', use '%%'. - * \n ... new line - * \b ... backspace - * \t ... tab - * Note: % must not appear more than once - * a ... VP variable to be printed - */ -static int -VPrint(FILE *fp, const char *cntl_chr, Real *a) -{ - size_t i, j, nc, nd, ZeroSup, sep = 10; - DECDIG m, e, nn; - - j = 0; - nd = nc = 0; /* nd : number of digits in fraction part(every 10 digits, */ - /* nd<=10). */ - /* nc : number of characters printed */ - ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */ - while (*(cntl_chr + j)) { - if (*(cntl_chr + j) == '%' && *(cntl_chr + j + 1) != '%') { - nc = 0; - if (VpIsNaN(a)) { - fprintf(fp, SZ_NaN); - nc += 8; - } - else if (VpIsPosInf(a)) { - fprintf(fp, SZ_INF); - nc += 8; - } - else if (VpIsNegInf(a)) { - fprintf(fp, SZ_NINF); - nc += 9; - } - else if (!VpIsZero(a)) { - if (BIGDECIMAL_NEGATIVE_P(a)) { - fprintf(fp, "-"); - ++nc; - } - nc += fprintf(fp, "0."); - switch (*(cntl_chr + j + 1)) { - default: - break; - - case '0': case 'z': - ZeroSup = 0; - ++j; - sep = cntl_chr[j] == 'z' ? BIGDECIMAL_COMPONENT_FIGURES : 10; - break; - } - for (i = 0; i < a->Prec; ++i) { - m = BASE1; - e = a->frac[i]; - while (m) { - nn = e / m; - if (!ZeroSup || nn) { - nc += fprintf(fp, "%lu", (unsigned long)nn); /* The leading zero(s) */ - /* as 0.00xx will not */ - /* be printed. */ - ++nd; - ZeroSup = 0; /* Set to print succeeding zeros */ - } - if (nd >= sep) { /* print ' ' after every 10 digits */ - nd = 0; - nc += fprintf(fp, " "); - } - e = e - nn * m; - m /= 10; - } - } - nc += fprintf(fp, "E%"PRIdSIZE, VpExponent10(a)); - nc += fprintf(fp, " (%"PRIdVALUE", %"PRIuSIZE", %"PRIuSIZE")", a->exponent, a->Prec, a->MaxPrec); - } - else { - nc += fprintf(fp, "0.0"); - } - } - else { - ++nc; - if (*(cntl_chr + j) == '\\') { - switch (*(cntl_chr + j + 1)) { - case 'n': - fprintf(fp, "\n"); - ++j; - break; - case 't': - fprintf(fp, "\t"); - ++j; - break; - case 'b': - fprintf(fp, "\n"); - ++j; - break; - default: - fprintf(fp, "%c", *(cntl_chr + j)); - break; - } - } - else { - fprintf(fp, "%c", *(cntl_chr + j)); - if (*(cntl_chr + j) == '%') ++j; - } - } - j++; - } - - return (int)nc; -} - -static void -VpFormatSt(char *psz, size_t fFmt) -{ - size_t ie, i, nf = 0; - char ch; - - if (fFmt == 0) return; - - ie = strlen(psz); - for (i = 0; i < ie; ++i) { - ch = psz[i]; - if (!ch) break; - if (ISSPACE(ch) || ch=='-' || ch=='+') continue; - if (ch == '.') { nf = 0; continue; } - if (ch == 'E' || ch == 'e') break; - - if (++nf > fFmt) { - memmove(psz + i + 1, psz + i, ie - i + 1); - ++ie; - nf = 0; - psz[i] = ' '; - } - } -} - -VP_EXPORT ssize_t -VpExponent10(Real *a) -{ - ssize_t ex; - size_t n; - - if (!VpHasVal(a)) return 0; - - ex = a->exponent * (ssize_t)BASE_FIG; - n = BASE1; - while ((a->frac[0] / n) == 0) { - --ex; - n /= 10; - } - return ex; -} - -VP_EXPORT void -VpSzMantissa(Real *a, char *buf, size_t buflen) -{ - size_t i, n, ZeroSup; - DECDIG_DBL m, e, nn; - - if (VpIsNaN(a)) { - snprintf(buf, buflen, SZ_NaN); - return; - } - if (VpIsPosInf(a)) { - snprintf(buf, buflen, SZ_INF); - return; - } - if (VpIsNegInf(a)) { - snprintf(buf, buflen, SZ_NINF); - return; - } - - ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */ - if (!VpIsZero(a)) { - if (BIGDECIMAL_NEGATIVE_P(a)) *buf++ = '-'; - n = a->Prec; - for (i = 0; i < n; ++i) { - m = BASE1; - e = a->frac[i]; - while (m) { - nn = e / m; - if (!ZeroSup || nn) { - snprintf(buf, buflen, "%lu", (unsigned long)nn); /* The leading zero(s) */ - buf += strlen(buf); - /* as 0.00xx will be ignored. */ - ZeroSup = 0; /* Set to print succeeding zeros */ - } - e = e - nn * m; - m /= 10; - } - } - *buf = 0; - while (buf[-1] == '0') *(--buf) = 0; - } - else { - if (VpIsPosZero(a)) snprintf(buf, buflen, "0"); - else snprintf(buf, buflen, "-0"); - } -} - -VP_EXPORT int -VpToSpecialString(Real *a, char *buf, size_t buflen, int fPlus) -/* fPlus = 0: default, 1: set ' ' before digits, 2: set '+' before digits. */ -{ - if (VpIsNaN(a)) { - snprintf(buf, buflen, SZ_NaN); - return 1; - } - - if (VpIsPosInf(a)) { - if (fPlus == 1) { - *buf++ = ' '; - } - else if (fPlus == 2) { - *buf++ = '+'; - } - snprintf(buf, buflen, SZ_INF); - return 1; - } - if (VpIsNegInf(a)) { - snprintf(buf, buflen, SZ_NINF); - return 1; - } - if (VpIsZero(a)) { - if (VpIsPosZero(a)) { - if (fPlus == 1) snprintf(buf, buflen, " 0.0"); - else if (fPlus == 2) snprintf(buf, buflen, "+0.0"); - else snprintf(buf, buflen, "0.0"); - } - else snprintf(buf, buflen, "-0.0"); - return 1; - } - return 0; -} - -VP_EXPORT void -VpToString(Real *a, char *buf, size_t buflen, size_t fFmt, int fPlus) -/* fPlus = 0: default, 1: set ' ' before digits, 2: set '+' before digits. */ -{ - size_t i, n, ZeroSup; - DECDIG shift, m, e, nn; - char *p = buf; - size_t plen = buflen; - ssize_t ex; - - if (VpToSpecialString(a, buf, buflen, fPlus)) return; - - ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */ - -#define ADVANCE(n) do { \ - if (plen < n) goto overflow; \ - p += n; \ - plen -= n; \ -} while (0) - - if (BIGDECIMAL_NEGATIVE_P(a)) { - *p = '-'; - ADVANCE(1); - } - else if (fPlus == 1) { - *p = ' '; - ADVANCE(1); - } - else if (fPlus == 2) { - *p = '+'; - ADVANCE(1); - } - - *p = '0'; ADVANCE(1); - *p = '.'; ADVANCE(1); - - n = a->Prec; - for (i = 0; i < n; ++i) { - m = BASE1; - e = a->frac[i]; - while (m) { - nn = e / m; - if (!ZeroSup || nn) { - /* The reading zero(s) */ - size_t n = (size_t)snprintf(p, plen, "%lu", (unsigned long)nn); - if (n > plen) goto overflow; - ADVANCE(n); - /* as 0.00xx will be ignored. */ - ZeroSup = 0; /* Set to print succeeding zeros */ - } - e = e - nn * m; - m /= 10; - } - } - - ex = a->exponent * (ssize_t)BASE_FIG; - shift = BASE1; - while (a->frac[0] / shift == 0) { - --ex; - shift /= 10; - } - while (p - 1 > buf && p[-1] == '0') { - *(--p) = '\0'; - ++plen; - } - snprintf(p, plen, "e%"PRIdSIZE, ex); - if (fFmt) VpFormatSt(buf, fFmt); - - overflow: - return; -#undef ADVANCE -} - -VP_EXPORT void -VpToFString(Real *a, char *buf, size_t buflen, size_t fFmt, int fPlus) -/* fPlus = 0: default, 1: set ' ' before digits, 2: set '+' before digits. */ -{ - size_t i, n; - DECDIG m, e; - char *p = buf; - size_t plen = buflen, delim = fFmt; - ssize_t ex; - - if (VpToSpecialString(a, buf, buflen, fPlus)) return; - -#define APPEND(c, group) do { \ - if (plen < 1) goto overflow; \ - if (group && delim == 0) { \ - *p = ' '; \ - p += 1; \ - plen -= 1; \ - } \ - if (plen < 1) goto overflow; \ - *p = c; \ - p += 1; \ - plen -= 1; \ - if (group) delim = (delim + 1) % fFmt; \ -} while (0) - - - if (BIGDECIMAL_NEGATIVE_P(a)) { - APPEND('-', false); - } - else if (fPlus == 1) { - APPEND(' ', false); - } - else if (fPlus == 2) { - APPEND('+', false); - } - - n = a->Prec; - ex = a->exponent; - if (ex <= 0) { - APPEND('0', false); - APPEND('.', false); - } - while (ex < 0) { - for (i=0; i < BASE_FIG; ++i) { - APPEND('0', fFmt > 0); - } - ++ex; - } - - for (i = 0; i < n; ++i) { - m = BASE1; - e = a->frac[i]; - if (i == 0 && ex > 0) { - for (delim = 0; e / m == 0; delim++) { - m /= 10; - } - if (fFmt > 0) { - delim = 2*fFmt - (ex * BASE_FIG - delim) % fFmt; - } - } - while (m && (e || (i < n - 1) || ex > 0)) { - APPEND((char)(e / m + '0'), fFmt > 0); - e %= m; - m /= 10; - } - if (--ex == 0) { - APPEND('.', false); - delim = fFmt; - } - } - - while (ex > 0) { - for (i=0; i < BASE_FIG; ++i) { - APPEND('0', fFmt > 0); - } - if (--ex == 0) { - APPEND('.', false); - } - } - - *p = '\0'; - if (p - 1 > buf && p[-1] == '.') { - snprintf(p, plen, "0"); - } - - overflow: - return; -#undef APPEND -} - -/* - * [Output] - * a[] ... variable to be assigned the value. - * [Input] - * int_chr[] ... integer part(may include '+/-'). - * ni ... number of characters in int_chr[],not including '+/-'. - * frac[] ... fraction part. - * nf ... number of characters in frac[]. - * exp_chr[] ... exponent part(including '+/-'). - * ne ... number of characters in exp_chr[],not including '+/-'. - */ -VP_EXPORT int -VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, const char *exp_chr, size_t ne) -{ - size_t i, j, ind_a, ma, mi, me; - SIGNED_VALUE e, es, eb, ef; - int sign, signe, exponent_overflow; - - /* get exponent part */ - e = 0; - ma = a->MaxPrec; - mi = ni; - me = ne; - signe = 1; - exponent_overflow = 0; - memset(a->frac, 0, ma * sizeof(DECDIG)); - if (ne > 0) { - i = 0; - if (exp_chr[0] == '-') { - signe = -1; - ++i; - ++me; - } - else if (exp_chr[0] == '+') { - ++i; - ++me; - } - while (i < me) { - if (MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG)) { - es = e; - goto exp_overflow; - } - es = e * (SIGNED_VALUE)BASE_FIG; - if (MUL_OVERFLOW_SIGNED_VALUE_P(e, 10) || - SIGNED_VALUE_MAX - (exp_chr[i] - '0') < e * 10) - goto exp_overflow; - e = e * 10 + exp_chr[i] - '0'; - if (MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG)) - goto exp_overflow; - if (es > (SIGNED_VALUE)(e * BASE_FIG)) { - exp_overflow: - exponent_overflow = 1; - e = es; /* keep sign */ - break; - } - ++i; - } - } - - /* get integer part */ - i = 0; - sign = 1; - if (1 /*ni >= 0*/) { - if (int_chr[0] == '-') { - sign = -1; - ++i; - ++mi; - } - else if (int_chr[0] == '+') { - ++i; - ++mi; - } - } - - e = signe * e; /* e: The value of exponent part. */ - e = e + ni; /* set actual exponent size. */ - - if (e > 0) signe = 1; - else signe = -1; - - /* Adjust the exponent so that it is the multiple of BASE_FIG. */ - j = 0; - ef = 1; - while (ef) { - if (e >= 0) eb = e; - else eb = -e; - ef = eb / (SIGNED_VALUE)BASE_FIG; - ef = eb - ef * (SIGNED_VALUE)BASE_FIG; - if (ef) { - ++j; /* Means to add one more preceding zero */ - ++e; - } - } - - eb = e / (SIGNED_VALUE)BASE_FIG; - - if (exponent_overflow) { - int zero = 1; - for ( ; i < mi && zero; i++) zero = int_chr[i] == '0'; - for (i = 0; i < nf && zero; i++) zero = frac[i] == '0'; - if (!zero && signe > 0) { - VpSetInf(a, sign); - VpException(VP_EXCEPTION_INFINITY, "exponent overflow",0); - } - else VpSetZero(a, sign); - return 1; - } - - ind_a = 0; - while (i < mi) { - a->frac[ind_a] = 0; - while (j < BASE_FIG && i < mi) { - a->frac[ind_a] = a->frac[ind_a] * 10 + int_chr[i] - '0'; - ++j; - ++i; - } - if (i < mi) { - ++ind_a; - if (ind_a >= ma) goto over_flow; - j = 0; - } - } - - /* get fraction part */ - - i = 0; - while (i < nf) { - while (j < BASE_FIG && i < nf) { - a->frac[ind_a] = a->frac[ind_a] * 10 + frac[i] - '0'; - ++j; - ++i; - } - if (i < nf) { - ++ind_a; - if (ind_a >= ma) goto over_flow; - j = 0; - } - } - goto Final; - -over_flow: - rb_warn("Conversion from String to BigDecimal overflow (last few digits discarded)."); - -Final: - if (ind_a >= ma) ind_a = ma - 1; - while (j < BASE_FIG) { - a->frac[ind_a] = a->frac[ind_a] * 10; - ++j; - } - a->Prec = ind_a + 1; - a->exponent = eb; - VpSetSign(a, sign); - VpNmlz(a); - return 1; -} - -/* - * [Input] - * *m ... Real - * [Output] - * *d ... fraction part of m(d = 0.xxxxxxx). where # of 'x's is fig. - * *e ... exponent of m. - * BIGDECIMAL_DOUBLE_FIGURES ... Number of digits in a double variable. - * - * m -> d*10**e, 0Prec); - *d = 0.0; - div = 1.; - while (ind_m < mm) { - div /= (double)BASE; - *d = *d + (double)m->frac[ind_m++] * div; - } - *e = m->exponent * (SIGNED_VALUE)BASE_FIG; - *d *= VpGetSign(m); - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, " VpVtoD: m=%\n", m); - printf(" d=%e * 10 **%ld\n", *d, *e); - printf(" BIGDECIMAL_DOUBLE_FIGURES = %d\n", BIGDECIMAL_DOUBLE_FIGURES); - } -#endif /*BIGDECIMAL_DEBUG */ - return f; -} - -/* - * m <- d - */ -VP_EXPORT void -VpDtoV(Real *m, double d) -{ - size_t ind_m, mm; - SIGNED_VALUE ne; - DECDIG i; - double val, val2; - - if (isnan(d)) { - VpSetNaN(m); - goto Exit; - } - if (isinf(d)) { - if (d > 0.0) VpSetPosInf(m); - else VpSetNegInf(m); - goto Exit; - } - - if (d == 0.0) { - VpSetZero(m, 1); - goto Exit; - } - val = (d > 0.) ? d : -d; - ne = 0; - if (val >= 1.0) { - while (val >= 1.0) { - val /= (double)BASE; - ++ne; - } - } - else { - val2 = 1.0 / (double)BASE; - while (val < val2) { - val *= (double)BASE; - --ne; - } - } - /* Now val = 0.xxxxx*BASE**ne */ - - mm = m->MaxPrec; - memset(m->frac, 0, mm * sizeof(DECDIG)); - for (ind_m = 0; val > 0.0 && ind_m < mm; ind_m++) { - val *= (double)BASE; - i = (DECDIG)val; - val -= (double)i; - m->frac[ind_m] = i; - } - if (ind_m >= mm) ind_m = mm - 1; - VpSetSign(m, (d > 0.0) ? 1 : -1); - m->Prec = ind_m + 1; - m->exponent = ne; - - VpInternalRound(m, 0, (m->Prec > 0) ? m->frac[m->Prec-1] : 0, - (DECDIG)(val*(double)BASE)); - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - printf("VpDtoV d=%30.30e\n", d); - VPrint(stdout, " m=%\n", m); - } -#endif /* BIGDECIMAL_DEBUG */ - return; -} - -/* - * m <- ival - */ -#if 0 /* unused */ -VP_EXPORT void -VpItoV(Real *m, SIGNED_VALUE ival) -{ - size_t mm, ind_m; - size_t val, v1, v2, v; - int isign; - SIGNED_VALUE ne; - - if (ival == 0) { - VpSetZero(m, 1); - goto Exit; - } - isign = 1; - val = ival; - if (ival < 0) { - isign = -1; - val =(size_t)(-ival); - } - ne = 0; - ind_m = 0; - mm = m->MaxPrec; - while (ind_m < mm) { - m->frac[ind_m] = 0; - ++ind_m; - } - ind_m = 0; - while (val > 0) { - if (val) { - v1 = val; - v2 = 1; - while (v1 >= BASE) { - v1 /= BASE; - v2 *= BASE; - } - val = val - v2 * v1; - v = v1; - } - else { - v = 0; - } - m->frac[ind_m] = v; - ++ind_m; - ++ne; - } - m->Prec = ind_m - 1; - m->exponent = ne; - VpSetSign(m, isign); - VpNmlz(m); - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - printf(" VpItoV i=%d\n", ival); - VPrint(stdout, " m=%\n", m); - } -#endif /* BIGDECIMAL_DEBUG */ - return; -} -#endif - -/* - * y = SQRT(x), y*y - x =>0 - */ -VP_EXPORT int -VpSqrt(Real *y, Real *x) -{ - Real *f = NULL; - Real *r = NULL; - size_t y_prec; - SIGNED_VALUE n, e; - ssize_t nr; - double val; - - /* Zero or +Infinity ? */ - if (VpIsZero(x) || VpIsPosInf(x)) { - VpAsgn(y,x,1); - goto Exit; - } - - /* Negative ? */ - if (BIGDECIMAL_NEGATIVE_P(x)) { - VpSetNaN(y); - return VpException(VP_EXCEPTION_OP, "sqrt of negative value", 0); - } - - /* NaN ? */ - if (VpIsNaN(x)) { - VpSetNaN(y); - return VpException(VP_EXCEPTION_OP, "sqrt of 'NaN'(Not a Number)", 0); - } - - /* One ? */ - if (VpIsOne(x)) { - VpSetOne(y); - goto Exit; - } - - n = (SIGNED_VALUE)y->MaxPrec; - if (x->MaxPrec > (size_t)n) n = (ssize_t)x->MaxPrec; - - /* allocate temporally variables */ - /* TODO: reconsider MaxPrec of f and r */ - f = NewOneNolimit(1, y->MaxPrec * (BASE_FIG + 2)); - r = NewOneNolimit(1, (n + n) * (BASE_FIG + 2)); - - nr = 0; - y_prec = y->MaxPrec; - - VpVtoD(&val, &e, x); /* val <- x */ - e /= (SIGNED_VALUE)BASE_FIG; - n = e / 2; - if (e - n * 2 != 0) { - val /= BASE; - n = (e + 1) / 2; - } - VpDtoV(y, sqrt(val)); /* y <- sqrt(val) */ - y->exponent += n; - n = (SIGNED_VALUE)roomof(BIGDECIMAL_DOUBLE_FIGURES, BASE_FIG); - y->MaxPrec = Min((size_t)n , y_prec); - f->MaxPrec = y->MaxPrec + 1; - n = (SIGNED_VALUE)(y_prec * BASE_FIG); - if (n > (SIGNED_VALUE)maxnr) n = (SIGNED_VALUE)maxnr; - - /* - * Perform: y_{n+1} = (y_n - x/y_n) / 2 - */ - do { - y->MaxPrec *= 2; - if (y->MaxPrec > y_prec) y->MaxPrec = y_prec; - f->MaxPrec = y->MaxPrec; - VpDivd(f, r, x, y); /* f = x/y */ - VpAddSub(r, f, y, -1); /* r = f - y */ - VpMult(f, VpConstPt5, r); /* f = 0.5*r */ - if (VpIsZero(f)) - goto converge; - VpAddSub(r, f, y, 1); /* r = y + f */ - VpAsgn(y, r, 1); /* y = r */ - } while (++nr < n); - -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - printf("ERROR(VpSqrt): did not converge within %ld iterations.\n", nr); - } -#endif /* BIGDECIMAL_DEBUG */ - y->MaxPrec = y_prec; - -converge: - VpChangeSign(y, 1); -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VpMult(r, y, y); - VpAddSub(f, x, r, -1); - printf("VpSqrt: iterations = %"PRIdSIZE"\n", nr); - VPrint(stdout, " y =% \n", y); - VPrint(stdout, " x =% \n", x); - VPrint(stdout, " x-y*y = % \n", f); - } -#endif /* BIGDECIMAL_DEBUG */ - y->MaxPrec = y_prec; - -Exit: - rbd_free_struct(f); - rbd_free_struct(r); - return 1; -} - -/* - * Round relatively from the decimal point. - * f: rounding mode - * nf: digit location to round from the decimal point. - */ -VP_EXPORT int -VpMidRound(Real *y, unsigned short f, ssize_t nf) -{ - /* fracf: any positive digit under rounding position? */ - /* fracf_1further: any positive digits under one further than the rounding position? */ - /* exptoadd: number of digits needed to compensate negative nf */ - int fracf, fracf_1further; - ssize_t n,i,ix,ioffset, exptoadd; - DECDIG v, shifter; - DECDIG div; - - nf += y->exponent * (ssize_t)BASE_FIG; - exptoadd=0; - if (nf < 0) { - /* rounding position too left(large). */ - if (f != VP_ROUND_CEIL && f != VP_ROUND_FLOOR) { - VpSetZero(y, VpGetSign(y)); /* truncate everything */ - return 0; - } - exptoadd = -nf; - nf = 0; - } - - ix = nf / (ssize_t)BASE_FIG; - if ((size_t)ix >= y->Prec) return 0; /* rounding position too right(small). */ - v = y->frac[ix]; - - ioffset = nf - ix*(ssize_t)BASE_FIG; - n = (ssize_t)BASE_FIG - ioffset - 1; - for (shifter = 1, i = 0; i < n; ++i) shifter *= 10; - - /* so the representation used (in y->frac) is an array of DECDIG, where - each DECDIG contains a value between 0 and BASE-1, consisting of BASE_FIG - decimal places. - - (that numbers of decimal places are typed as ssize_t is somewhat confusing) - - nf is now position (in decimal places) of the digit from the start of - the array. - - ix is the position (in DECDIGs) of the DECDIG containing the decimal digit, - from the start of the array. - - v is the value of this DECDIG - - ioffset is the number of extra decimal places along of this decimal digit - within v. - - n is the number of decimal digits remaining within v after this decimal digit - shifter is 10**n, - - v % shifter are the remaining digits within v - v % (shifter * 10) are the digit together with the remaining digits within v - v / shifter are the digit's predecessors together with the digit - div = v / shifter / 10 is just the digit's precessors - (v / shifter) - div*10 is just the digit, which is what v ends up being reassigned to. - */ - - fracf = (v % (shifter * 10) > 0); - fracf_1further = ((v % shifter) > 0); - - v /= shifter; - div = v / 10; - v = v - div*10; - /* now v is just the digit required. - now fracf is whether the digit or any of the remaining digits within v are non-zero - now fracf_1further is whether any of the remaining digits within v are non-zero - */ - - /* now check all the remaining DECDIGs for zero-ness a whole DECDIG at a time. - if we spot any non-zeroness, that means that we found a positive digit under - rounding position, and we also found a positive digit under one further than - the rounding position, so both searches (to see if any such non-zero digit exists) - can stop */ - - for (i = ix + 1; (size_t)i < y->Prec; i++) { - if (y->frac[i] % BASE) { - fracf = fracf_1further = 1; - break; - } - } - - /* now fracf = does any positive digit exist under the rounding position? - now fracf_1further = does any positive digit exist under one further than the - rounding position? - now v = the first digit under the rounding position */ - - /* drop digits after pointed digit */ - memset(y->frac + ix + 1, 0, (y->Prec - (ix + 1)) * sizeof(DECDIG)); - - switch (f) { - case VP_ROUND_DOWN: /* Truncate */ - break; - case VP_ROUND_UP: /* Roundup */ - if (fracf) ++div; - break; - case VP_ROUND_HALF_UP: - if (v>=5) ++div; - break; - case VP_ROUND_HALF_DOWN: - if (v > 5 || (v == 5 && fracf_1further)) ++div; - break; - case VP_ROUND_CEIL: - if (fracf && BIGDECIMAL_POSITIVE_P(y)) ++div; - break; - case VP_ROUND_FLOOR: - if (fracf && BIGDECIMAL_NEGATIVE_P(y)) ++div; - break; - case VP_ROUND_HALF_EVEN: /* Banker's rounding */ - if (v > 5) ++div; - else if (v == 5) { - if (fracf_1further) { - ++div; - } - else { - if (ioffset == 0) { - /* v is the first decimal digit of its DECDIG; - need to grab the previous DECDIG if present - to check for evenness of the previous decimal - digit (which is same as that of the DECDIG since - base 10 has a factor of 2) */ - if (ix && (y->frac[ix-1] % 2)) ++div; - } - else { - if (div % 2) ++div; - } - } - } - break; - } - for (i = 0; i <= n; ++i) div *= 10; - if (div >= BASE) { - if (ix) { - y->frac[ix] = 0; - VpRdup(y, ix); - } - else { - short s = VpGetSign(y); - SIGNED_VALUE e = y->exponent; - VpSetOne(y); - VpSetSign(y, s); - y->exponent = e + 1; - } - } - else { - y->frac[ix] = div; - VpNmlz(y); - } - if (exptoadd > 0) { - y->exponent += (SIGNED_VALUE)(exptoadd / BASE_FIG); - exptoadd %= (ssize_t)BASE_FIG; - for (i = 0; i < exptoadd; i++) { - y->frac[0] *= 10; - if (y->frac[0] >= BASE) { - y->frac[0] /= BASE; - y->exponent++; - } - } - } - return 1; -} - -VP_EXPORT int -VpLeftRound(Real *y, unsigned short f, ssize_t nf) -/* - * Round from the left hand side of the digits. - */ -{ - DECDIG v; - if (!VpHasVal(y)) return 0; /* Unable to round */ - v = y->frac[0]; - nf -= VpExponent(y) * (ssize_t)BASE_FIG; - while ((v /= 10) != 0) nf--; - nf += (ssize_t)BASE_FIG-1; - return VpMidRound(y, f, nf); -} - -VP_EXPORT int -VpActiveRound(Real *y, Real *x, unsigned short f, ssize_t nf) -{ - /* First,assign whole value in truncation mode */ - if (VpAsgn(y, x, 10) <= 1) return 0; /* Zero,NaN,or Infinity */ - return VpMidRound(y, f, nf); -} - -static int -VpLimitRound(Real *c, size_t ixDigit) -{ - size_t ix = VpGetPrecLimit(); - if (!VpNmlz(c)) return -1; - if (!ix) return 0; - if (!ixDigit) ixDigit = c->Prec-1; - if ((ix + BASE_FIG - 1) / BASE_FIG > ixDigit + 1) return 0; - return VpLeftRound(c, VpGetRoundMode(), (ssize_t)ix); -} - -/* If I understand correctly, this is only ever used to round off the final decimal - digit of precision */ -static void -VpInternalRound(Real *c, size_t ixDigit, DECDIG vPrev, DECDIG v) -{ - int f = 0; - - unsigned short const rounding_mode = VpGetRoundMode(); - - if (VpLimitRound(c, ixDigit)) return; - if (!v) return; - - v /= BASE1; - switch (rounding_mode) { - case VP_ROUND_DOWN: - break; - case VP_ROUND_UP: - if (v) f = 1; - break; - case VP_ROUND_HALF_UP: - if (v >= 5) f = 1; - break; - case VP_ROUND_HALF_DOWN: - /* this is ok - because this is the last digit of precision, - the case where v == 5 and some further digits are nonzero - will never occur */ - if (v >= 6) f = 1; - break; - case VP_ROUND_CEIL: - if (v && BIGDECIMAL_POSITIVE_P(c)) f = 1; - break; - case VP_ROUND_FLOOR: - if (v && BIGDECIMAL_NEGATIVE_P(c)) f = 1; - break; - case VP_ROUND_HALF_EVEN: /* Banker's rounding */ - /* as per VP_ROUND_HALF_DOWN, because this is the last digit of precision, - there is no case to worry about where v == 5 and some further digits are nonzero */ - if (v > 5) f = 1; - else if (v == 5 && vPrev % 2) f = 1; - break; - } - if (f) { - VpRdup(c, ixDigit); - VpNmlz(c); - } -} - -/* - * Rounds up m(plus one to final digit of m). - */ -static int -VpRdup(Real *m, size_t ind_m) -{ - DECDIG carry; - - if (!ind_m) ind_m = m->Prec; - - carry = 1; - while (carry > 0 && ind_m--) { - m->frac[ind_m] += carry; - if (m->frac[ind_m] >= BASE) m->frac[ind_m] -= BASE; - else carry = 0; - } - if (carry > 0) { /* Overflow,count exponent and set fraction part be 1 */ - if (!AddExponent(m, 1)) return 0; - m->Prec = m->frac[0] = 1; - } - else { - VpNmlz(m); - } - return 1; -} - -/* - * y = x - fix(x) - */ -VP_EXPORT void -VpFrac(Real *y, Real *x) -{ - size_t my, ind_y, ind_x; - - if (!VpHasVal(x)) { - VpAsgn(y, x, 1); - goto Exit; - } - - if (x->exponent > 0 && (size_t)x->exponent >= x->Prec) { - VpSetZero(y, VpGetSign(x)); - goto Exit; - } - else if (x->exponent <= 0) { - VpAsgn(y, x, 1); - goto Exit; - } - - /* satisfy: x->exponent > 0 */ - - y->Prec = x->Prec - (size_t)x->exponent; - y->Prec = Min(y->Prec, y->MaxPrec); - y->exponent = 0; - VpSetSign(y, VpGetSign(x)); - ind_y = 0; - my = y->Prec; - ind_x = x->exponent; - while (ind_y < my) { - y->frac[ind_y] = x->frac[ind_x]; - ++ind_y; - ++ind_x; - } - VpNmlz(y); - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpFrac y=%\n", y); - VPrint(stdout, " x=%\n", x); - } -#endif /* BIGDECIMAL_DEBUG */ - return; -} - -/* - * y = x ** n - */ -VP_EXPORT int -VpPowerByInt(Real *y, Real *x, SIGNED_VALUE n) -{ - size_t s, ss; - ssize_t sign; - Real *w1 = NULL; - Real *w2 = NULL; - - if (VpIsZero(x)) { - if (n == 0) { - VpSetOne(y); - goto Exit; - } - sign = VpGetSign(x); - if (n < 0) { - n = -n; - if (sign < 0) sign = (n % 2) ? -1 : 1; - VpSetInf(y, sign); - } - else { - if (sign < 0) sign = (n % 2) ? -1 : 1; - VpSetZero(y,sign); - } - goto Exit; - } - if (VpIsNaN(x)) { - VpSetNaN(y); - goto Exit; - } - if (VpIsInf(x)) { - if (n == 0) { - VpSetOne(y); - goto Exit; - } - if (n > 0) { - VpSetInf(y, (n % 2 == 0 || VpIsPosInf(x)) ? 1 : -1); - goto Exit; - } - VpSetZero(y, (n % 2 == 0 || VpIsPosInf(x)) ? 1 : -1); - goto Exit; - } - - if (x->exponent == 1 && x->Prec == 1 && x->frac[0] == 1) { - /* abs(x) = 1 */ - VpSetOne(y); - if (BIGDECIMAL_POSITIVE_P(x)) goto Exit; - if ((n % 2) == 0) goto Exit; - VpSetSign(y, -1); - goto Exit; - } - - if (n > 0) sign = 1; - else if (n < 0) { - sign = -1; - n = -n; - } - else { - VpSetOne(y); - goto Exit; - } - - /* Allocate working variables */ - /* TODO: reconsider MaxPrec of w1 and w2 */ - w1 = NewZeroNolimit(1, (y->MaxPrec + 2) * BASE_FIG); - w2 = NewZeroNolimit(1, (w1->MaxPrec * 2 + 1) * BASE_FIG); - - /* calculation start */ - - VpAsgn(y, x, 1); - --n; - while (n > 0) { - VpAsgn(w1, x, 1); - s = 1; - while (ss = s, (s += s) <= (size_t)n) { - VpMult(w2, w1, w1); - VpAsgn(w1, w2, 1); - } - n -= (SIGNED_VALUE)ss; - VpMult(w2, y, w1); - VpAsgn(y, w2, 1); - } - if (sign < 0) { - VpDivd(w1, w2, VpConstOne, y); - VpAsgn(y, w1, 1); - } - -Exit: -#ifdef BIGDECIMAL_DEBUG - if (gfDebug) { - VPrint(stdout, "VpPowerByInt y=%\n", y); - VPrint(stdout, "VpPowerByInt x=%\n", x); - printf(" n=%"PRIdVALUE"\n", n); - } -#endif /* BIGDECIMAL_DEBUG */ - rbd_free_struct(w2); - rbd_free_struct(w1); - return 1; -} - -#ifdef BIGDECIMAL_DEBUG -int -VpVarCheck(Real * v) -/* - * Checks the validity of the Real variable v. - * [Input] - * v ... Real *, variable to be checked. - * [Returns] - * 0 ... correct v. - * other ... error - */ -{ - size_t i; - - if (v->MaxPrec == 0) { - printf("ERROR(VpVarCheck): Illegal Max. Precision(=%"PRIuSIZE")\n", - v->MaxPrec); - return 1; - } - if (v->Prec == 0 || v->Prec > v->MaxPrec) { - printf("ERROR(VpVarCheck): Illegal Precision(=%"PRIuSIZE")\n", v->Prec); - printf(" Max. Prec.=%"PRIuSIZE"\n", v->MaxPrec); - return 2; - } - for (i = 0; i < v->Prec; ++i) { - if (v->frac[i] >= BASE) { - printf("ERROR(VpVarCheck): Illegal fraction\n"); - printf(" Frac[%"PRIuSIZE"]=%"PRIuDECDIG"\n", i, v->frac[i]); - printf(" Prec. =%"PRIuSIZE"\n", v->Prec); - printf(" Exp. =%"PRIdVALUE"\n", v->exponent); - printf(" BASE =%"PRIuDECDIG"\n", BASE); - return 3; - } - } - return 0; -} -#endif /* BIGDECIMAL_DEBUG */ diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bigdecimal.h b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bigdecimal.h deleted file mode 100644 index 54fed811..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bigdecimal.h +++ /dev/null @@ -1,313 +0,0 @@ -/* - * - * Ruby BigDecimal(Variable decimal precision) extension library. - * - * Copyright(C) 2002 by Shigeo Kobayashi(shigeo@tinyforest.gr.jp) - * - */ - -#ifndef RUBY_BIG_DECIMAL_H -#define RUBY_BIG_DECIMAL_H 1 - -#define RUBY_NO_OLD_COMPATIBILITY -#include "ruby/ruby.h" -#include "missing.h" - -#ifdef HAVE_FLOAT_H -# include -#endif - -#ifdef HAVE_INT64_T -# define DECDIG uint32_t -# define DECDIG_DBL uint64_t -# define DECDIG_DBL_SIGNED int64_t -# define SIZEOF_DECDIG 4 -# define PRI_DECDIG_PREFIX "" -# ifdef PRI_LL_PREFIX -# define PRI_DECDIG_DBL_PREFIX PRI_LL_PREFIX -# else -# define PRI_DECDIG_DBL_PREFIX "l" -# endif -#else -# define DECDIG uint16_t -# define DECDIG_DBL uint32_t -# define DECDIG_DBL_SIGNED int32_t -# define SIZEOF_DECDIG 2 -# define PRI_DECDIG_PREFIX "h" -# define PRI_DECDIG_DBL_PREFIX "" -#endif - -#define PRIdDECDIG PRI_DECDIG_PREFIX"d" -#define PRIiDECDIG PRI_DECDIG_PREFIX"i" -#define PRIoDECDIG PRI_DECDIG_PREFIX"o" -#define PRIuDECDIG PRI_DECDIG_PREFIX"u" -#define PRIxDECDIG PRI_DECDIG_PREFIX"x" -#define PRIXDECDIG PRI_DECDIG_PREFIX"X" - -#define PRIdDECDIG_DBL PRI_DECDIG_DBL_PREFIX"d" -#define PRIiDECDIG_DBL PRI_DECDIG_DBL_PREFIX"i" -#define PRIoDECDIG_DBL PRI_DECDIG_DBL_PREFIX"o" -#define PRIuDECDIG_DBL PRI_DECDIG_DBL_PREFIX"u" -#define PRIxDECDIG_DBL PRI_DECDIG_DBL_PREFIX"x" -#define PRIXDECDIG_DBL PRI_DECDIG_DBL_PREFIX"X" - -#if SIZEOF_DECDIG == 4 -# define BIGDECIMAL_BASE ((DECDIG)1000000000U) -# define BIGDECIMAL_COMPONENT_FIGURES 9 -/* - * The number of components required for a 64-bit integer. - * - * INT64_MAX: 9_223372036_854775807 - * UINT64_MAX: 18_446744073_709551615 - */ -# define BIGDECIMAL_INT64_MAX_LENGTH 3 - -#elif SIZEOF_DECDIG == 2 -# define BIGDECIMAL_BASE ((DECDIG)10000U) -# define BIGDECIMAL_COMPONENT_FIGURES 4 -/* - * The number of components required for a 64-bit integer. - * - * INT64_MAX: 922_3372_0368_5477_5807 - * UINT64_MAX: 1844_6744_0737_0955_1615 - */ -# define BIGDECIMAL_INT64_MAX_LENGTH 5 - -#else -# error Unknown size of DECDIG -#endif - -#define BIGDECIMAL_DOUBLE_FIGURES (1+DBL_DIG) - -#if defined(__cplusplus) -extern "C" { -#if 0 -} /* satisfy cc-mode */ -#endif -#endif - -extern VALUE rb_cBigDecimal; - -/* - * NaN & Infinity - */ -#define SZ_NaN "NaN" -#define SZ_INF "Infinity" -#define SZ_PINF "+Infinity" -#define SZ_NINF "-Infinity" - -/* - * #define VP_EXPORT other than static to let VP_ routines - * be called from outside of this module. - */ -#define VP_EXPORT static - -/* Exception mode */ -#define VP_EXCEPTION_ALL ((unsigned short)0x00FF) -#define VP_EXCEPTION_INFINITY ((unsigned short)0x0001) -#define VP_EXCEPTION_NaN ((unsigned short)0x0002) -#define VP_EXCEPTION_UNDERFLOW ((unsigned short)0x0004) -#define VP_EXCEPTION_OVERFLOW ((unsigned short)0x0001) /* 0x0008) */ -#define VP_EXCEPTION_ZERODIVIDE ((unsigned short)0x0010) - -/* Following 2 exceptions can't controlled by user */ -#define VP_EXCEPTION_OP ((unsigned short)0x0020) - -#define BIGDECIMAL_EXCEPTION_MODE_DEFAULT 0U - -/* This is used in BigDecimal#mode */ -#define VP_ROUND_MODE ((unsigned short)0x0100) - -/* Rounding mode */ -#define VP_ROUND_UP RBD_ROUND_UP -#define VP_ROUND_DOWN RBD_ROUND_DOWN -#define VP_ROUND_HALF_UP RBD_ROUND_HALF_UP -#define VP_ROUND_HALF_DOWN RBD_ROUND_HALF_DOWN -#define VP_ROUND_CEIL RBD_ROUND_CEIL -#define VP_ROUND_FLOOR RBD_ROUND_FLOOR -#define VP_ROUND_HALF_EVEN RBD_ROUND_HALF_EVEN - -enum rbd_rounding_mode { - RBD_ROUND_UP = 1, - RBD_ROUND_DOWN = 2, - RBD_ROUND_HALF_UP = 3, - RBD_ROUND_HALF_DOWN = 4, - RBD_ROUND_CEIL = 5, - RBD_ROUND_FLOOR = 6, - RBD_ROUND_HALF_EVEN = 7, - - RBD_ROUND_DEFAULT = RBD_ROUND_HALF_UP, - RBD_ROUND_TRUNCATE = RBD_ROUND_DOWN, - RBD_ROUND_BANKER = RBD_ROUND_HALF_EVEN, - RBD_ROUND_CEILING = RBD_ROUND_CEIL -}; - -#define BIGDECIMAL_ROUNDING_MODE_DEFAULT VP_ROUND_HALF_UP - -/* Sign flag */ -#define VP_SIGN_NaN 0 /* NaN */ -#define VP_SIGN_POSITIVE_ZERO 1 /* Positive zero */ -#define VP_SIGN_NEGATIVE_ZERO -1 /* Negative zero */ -#define VP_SIGN_POSITIVE_FINITE 2 /* Positive finite number */ -#define VP_SIGN_NEGATIVE_FINITE -2 /* Negative finite number */ -#define VP_SIGN_POSITIVE_INFINITE 3 /* Positive infinite number */ -#define VP_SIGN_NEGATIVE_INFINITE -3 /* Negative infinite number */ - -/* The size of fraction part array */ -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) -#define FLEXIBLE_ARRAY_SIZE /* */ -#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define FLEXIBLE_ARRAY_SIZE 0 -#else -#define FLEXIBLE_ARRAY_SIZE 1 -#endif - -/* - * VP representation - * r = 0.xxxxxxxxx *BASE**exponent - */ -typedef struct { - VALUE obj; /* Back pointer(VALUE) for Ruby object. */ - size_t MaxPrec; /* Maximum precision size */ - /* This is the actual size of frac[] */ - /*(frac[0] to frac[MaxPrec] are available). */ - size_t Prec; /* Current precision size. */ - /* This indicates how much the */ - /* array frac[] is actually used. */ - SIGNED_VALUE exponent; /* Exponent part. */ - short sign; /* Attributes of the value. */ - /* - * ==0 : NaN - * 1 : Positive zero - * -1 : Negative zero - * 2 : Positive number - * -2 : Negative number - * 3 : Positive infinite number - * -3 : Negative infinite number - */ - short flag; /* Not used in vp_routines,space for user. */ - DECDIG frac[FLEXIBLE_ARRAY_SIZE]; /* Array of fraction part. */ -} Real; - -/* - * ------------------ - * EXPORTables. - * ------------------ - */ - -VP_EXPORT Real *VpNewRbClass(size_t mx, char const *str, VALUE klass, bool strict_p, bool raise_exception); - -VP_EXPORT Real *VpCreateRbObject(size_t mx, const char *str, bool raise_exception); - -#define VpBaseFig() BIGDECIMAL_COMPONENT_FIGURES -#define VpDblFig() BIGDECIMAL_DOUBLE_FIGURES -#define VpBaseVal() BIGDECIMAL_BASE - -/* Zero,Inf,NaN (isinf(),isnan() used to check) */ -VP_EXPORT double VpGetDoubleNaN(void); -VP_EXPORT double VpGetDoublePosInf(void); -VP_EXPORT double VpGetDoubleNegInf(void); -VP_EXPORT double VpGetDoubleNegZero(void); - -/* These 2 functions added at v1.1.7 */ -VP_EXPORT size_t VpGetPrecLimit(void); -VP_EXPORT size_t VpSetPrecLimit(size_t n); - -/* Round mode */ -VP_EXPORT int VpIsRoundMode(unsigned short n); -VP_EXPORT unsigned short VpGetRoundMode(void); -VP_EXPORT unsigned short VpSetRoundMode(unsigned short n); - -VP_EXPORT int VpException(unsigned short f,const char *str,int always); -#if 0 /* unused */ -VP_EXPORT int VpIsNegDoubleZero(double v); -#endif -VP_EXPORT size_t VpNumOfChars(Real *vp,const char *pszFmt); -VP_EXPORT size_t VpInit(DECDIG BaseVal); -VP_EXPORT Real *VpAlloc(size_t mx, const char *szVal, int strict_p, int exc); -VP_EXPORT size_t VpAsgn(Real *c, Real *a, int isw); -VP_EXPORT size_t VpAddSub(Real *c,Real *a,Real *b,int operation); -VP_EXPORT size_t VpMult(Real *c,Real *a,Real *b); -VP_EXPORT size_t VpDivd(Real *c,Real *r,Real *a,Real *b); -VP_EXPORT int VpComp(Real *a,Real *b); -VP_EXPORT ssize_t VpExponent10(Real *a); -VP_EXPORT void VpSzMantissa(Real *a, char *buf, size_t bufsize); -VP_EXPORT int VpToSpecialString(Real *a, char *buf, size_t bufsize, int fPlus); -VP_EXPORT void VpToString(Real *a, char *buf, size_t bufsize, size_t fFmt, int fPlus); -VP_EXPORT void VpToFString(Real *a, char *buf, size_t bufsize, size_t fFmt, int fPlus); -VP_EXPORT int VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, const char *exp_chr, size_t ne); -VP_EXPORT int VpVtoD(double *d, SIGNED_VALUE *e, Real *m); -VP_EXPORT void VpDtoV(Real *m,double d); -#if 0 /* unused */ -VP_EXPORT void VpItoV(Real *m,S_INT ival); -#endif -VP_EXPORT int VpSqrt(Real *y,Real *x); -VP_EXPORT int VpActiveRound(Real *y, Real *x, unsigned short f, ssize_t il); -VP_EXPORT int VpMidRound(Real *y, unsigned short f, ssize_t nf); -VP_EXPORT int VpLeftRound(Real *y, unsigned short f, ssize_t nf); -VP_EXPORT void VpFrac(Real *y, Real *x); -VP_EXPORT int VpPowerByInt(Real *y, Real *x, SIGNED_VALUE n); -#define VpPower VpPowerByInt - -/* VP constants */ -VP_EXPORT Real *VpOne(void); - -/* - * ------------------ - * MACRO definitions. - * ------------------ - */ -#define Abs(a) (((a)>= 0)?(a):(-(a))) -#define Max(a, b) (((a)>(b))?(a):(b)) -#define Min(a, b) (((a)>(b))?(b):(a)) - -#define VpMaxPrec(a) ((a)->MaxPrec) -#define VpPrec(a) ((a)->Prec) -#define VpGetFlag(a) ((a)->flag) - -/* Sign */ - -/* VpGetSign(a) returns 1,-1 if a>0,a<0 respectively */ -#define VpGetSign(a) (((a)->sign>0)?1:(-1)) -/* Change sign of a to a>0,a<0 if s = 1,-1 respectively */ -#define VpChangeSign(a,s) {if((s)>0) (a)->sign=(short)Abs((ssize_t)(a)->sign);else (a)->sign=-(short)Abs((ssize_t)(a)->sign);} -/* Sets sign of a to a>0,a<0 if s = 1,-1 respectively */ -#define VpSetSign(a,s) {if((s)>0) (a)->sign=(short)VP_SIGN_POSITIVE_FINITE;else (a)->sign=(short)VP_SIGN_NEGATIVE_FINITE;} - -/* 1 */ -#define VpSetOne(a) {(a)->Prec=(a)->exponent=(a)->frac[0]=1;(a)->sign=VP_SIGN_POSITIVE_FINITE;} - -/* ZEROs */ -#define VpIsPosZero(a) ((a)->sign==VP_SIGN_POSITIVE_ZERO) -#define VpIsNegZero(a) ((a)->sign==VP_SIGN_NEGATIVE_ZERO) -#define VpIsZero(a) (VpIsPosZero(a) || VpIsNegZero(a)) -#define VpSetPosZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_ZERO) -#define VpSetNegZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_ZERO) -#define VpSetZero(a,s) (void)(((s)>0)?VpSetPosZero(a):VpSetNegZero(a)) - -/* NaN */ -#define VpIsNaN(a) ((a)->sign==VP_SIGN_NaN) -#define VpSetNaN(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NaN) - -/* Infinity */ -#define VpIsPosInf(a) ((a)->sign==VP_SIGN_POSITIVE_INFINITE) -#define VpIsNegInf(a) ((a)->sign==VP_SIGN_NEGATIVE_INFINITE) -#define VpIsInf(a) (VpIsPosInf(a) || VpIsNegInf(a)) -#define VpIsDef(a) ( !(VpIsNaN(a)||VpIsInf(a)) ) -#define VpSetPosInf(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_INFINITE) -#define VpSetNegInf(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_INFINITE) -#define VpSetInf(a,s) (void)(((s)>0)?VpSetPosInf(a):VpSetNegInf(a)) -#define VpHasVal(a) (a->frac[0]) -#define VpIsOne(a) ((a->Prec==1)&&(a->frac[0]==1)&&(a->exponent==1)) -#define VpExponent(a) (a->exponent) -#ifdef BIGDECIMAL_DEBUG -int VpVarCheck(Real * v); -#endif /* BIGDECIMAL_DEBUG */ - -#if defined(__cplusplus) -#if 0 -{ /* satisfy cc-mode */ -#endif -} /* extern "C" { */ -#endif -#endif /* RUBY_BIG_DECIMAL_H */ diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bits.h b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bits.h deleted file mode 100644 index 6e1e4776..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/bits.h +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef BIGDECIMAL_BITS_H -#define BIGDECIMAL_BITS_H - -#include "feature.h" -#include "static_assert.h" - -#if defined(__x86_64__) && defined(HAVE_X86INTRIN_H) -# include /* for _lzcnt_u64, etc. */ -#elif defined(_MSC_VER) && defined(HAVE_INTRIN_H) -# include /* for the following intrinsics */ -#endif - -#if defined(_MSC_VER) && defined(__AVX2__) -# pragma intrinsic(__lzcnt) -# pragma intrinsic(__lzcnt64) -#endif - -#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0]))) -#define roomof(x, y) (((x) + (y) - 1) / (y)) -#define type_roomof(x, y) roomof(sizeof(x), sizeof(y)) - -#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \ - (a) == 0 ? 0 : \ - (a) == -1 ? (b) < -(max) : \ - (a) > 0 ? \ - ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \ - ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b))) - -#ifdef HAVE_UINT128_T -# define bit_length(x) \ - (unsigned int) \ - (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \ - sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : \ - 128 - nlz_int128((uint128_t)(x))) -#else -# define bit_length(x) \ - (unsigned int) \ - (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \ - 64 - nlz_int64((uint64_t)(x))) -#endif - -static inline unsigned nlz_int32(uint32_t x); -static inline unsigned nlz_int64(uint64_t x); -#ifdef HAVE_UINT128_T -static inline unsigned nlz_int128(uint128_t x); -#endif - -static inline unsigned int -nlz_int32(uint32_t x) -{ -#if defined(_MSC_VER) && defined(__AVX2__) && defined(HAVE___LZCNT) - /* Note: It seems there is no such thing like __LZCNT__ predefined in MSVC. - * AMD CPUs have had this instruction for decades (since K10) but for - * Intel, Haswell is the oldest one. We need to use __AVX2__ for maximum - * safety. */ - return (unsigned int)__lzcnt(x); - -#elif defined(__x86_64__) && defined(__LZCNT__) && defined(HAVE__LZCNT_U32) - return (unsigned int)_lzcnt_u32(x); - -#elif defined(_MSC_VER) && defined(HAVE__BITSCANREVERSE) - unsigned long r; - return _BitScanReverse(&r, x) ? (31 - (int)r) : 32; - -#elif __has_builtin(__builtin_clz) - STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT == 32); - return x ? (unsigned int)__builtin_clz(x) : 32; - -#else - uint32_t y; - unsigned n = 32; - y = x >> 16; if (y) {n -= 16; x = y;} - y = x >> 8; if (y) {n -= 8; x = y;} - y = x >> 4; if (y) {n -= 4; x = y;} - y = x >> 2; if (y) {n -= 2; x = y;} - y = x >> 1; if (y) {return n - 2;} - return (unsigned int)(n - x); -#endif -} - -static inline unsigned int -nlz_int64(uint64_t x) -{ -#if defined(_MSC_VER) && defined(__AVX2__) && defined(HAVE___LZCNT64) - return (unsigned int)__lzcnt64(x); - -#elif defined(__x86_64__) && defined(__LZCNT__) && defined(HAVE__LZCNT_U64) - return (unsigned int)_lzcnt_u64(x); - -#elif defined(_WIN64) && defined(_MSC_VER) && defined(HAVE__BITSCANREVERSE64) - unsigned long r; - return _BitScanReverse64(&r, x) ? (63u - (unsigned int)r) : 64; - -#elif __has_builtin(__builtin_clzl) && __has_builtin(__builtin_clzll) && !(defined(__sun) && defined(__sparc)) - if (x == 0) { - return 64; - } - else if (sizeof(long) * CHAR_BIT == 64) { - return (unsigned int)__builtin_clzl((unsigned long)x); - } - else if (sizeof(long long) * CHAR_BIT == 64) { - return (unsigned int)__builtin_clzll((unsigned long long)x); - } - else { - /* :FIXME: Is there a way to make this branch a compile-time error? */ - __builtin_unreachable(); - } - -#else - uint64_t y; - unsigned int n = 64; - y = x >> 32; if (y) {n -= 32; x = y;} - y = x >> 16; if (y) {n -= 16; x = y;} - y = x >> 8; if (y) {n -= 8; x = y;} - y = x >> 4; if (y) {n -= 4; x = y;} - y = x >> 2; if (y) {n -= 2; x = y;} - y = x >> 1; if (y) {return n - 2;} - return (unsigned int)(n - x); - -#endif -} - -#ifdef HAVE_UINT128_T -static inline unsigned int -nlz_int128(uint128_t x) -{ - uint64_t y = (uint64_t)(x >> 64); - - if (x == 0) { - return 128; - } - else if (y == 0) { - return (unsigned int)nlz_int64(x) + 64; - } - else { - return (unsigned int)nlz_int64(y); - } -} -#endif - -#endif /* BIGDECIMAL_BITS_H */ diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/extconf.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/extconf.rb deleted file mode 100644 index cf4290f5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/extconf.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: false -require 'mkmf' - -def have_builtin_func(name, check_expr, opt = "", &b) - checking_for checking_message(name.funcall_style, nil, opt) do - if try_compile(< -#endif - -#ifdef RBIMPL_HAS_BUILTIN -# define BIGDECIMAL_HAS_BUILTIN(...) RBIMPL_HAS_BUILTIN(__VA_ARGS__) - -#else -# /* The following section is copied from CRuby's builtin.h */ -# -# ifdef __has_builtin -# if defined(__INTEL_COMPILER) -# /* :TODO: Intel C Compiler has __has_builtin (since 19.1 maybe?), and is -# * reportedly broken. We have to skip them. However the situation can -# * change. They might improve someday. We need to revisit here later. */ -# elif defined(__GNUC__) && ! __has_builtin(__builtin_alloca) -# /* FreeBSD's defines its own *broken* version of -# * __has_builtin. Cygwin copied that content to be a victim of the -# * broken-ness. We don't take them into account. */ -# else -# define HAVE___HAS_BUILTIN 1 -# endif -# endif -# -# if defined(HAVE___HAS_BUILTIN) -# define BIGDECIMAL_HAS_BUILTIN(_) __has_builtin(_) -# -# elif defined(__GNUC__) -# define BIGDECIMAL_HAS_BUILTIN(_) BIGDECIMAL_HAS_BUILTIN_ ## _ -# if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 6)) -# define BIGDECIMAL_HAS_BUILTIN___builtin_clz 1 -# define BIGDECIMAL_HAS_BUILTIN___builtin_clzl 1 -# else -# define BIGDECIMAL_HAS_BUILTIN___builtin_clz 0 -# define BIGDECIMAL_HAS_BUILTIN___builtin_clzl 0 -# endif -# elif defined(_MSC_VER) -# define BIGDECIMAL_HAS_BUILTIN(_) 0 -# -# else -# define BIGDECIMAL_HAS_BUILTIN(_) BIGDECIMAL_HAS_BUILTIN_ ## _ -# define BIGDECIMAL_HAS_BUILTIN___builtin_clz HAVE_BUILTIN___BUILTIN_CLZ -# define BIGDECIMAL_HAS_BUILTIN___builtin_clzl HAVE_BUILTIN___BUILTIN_CLZL -# endif -#endif /* RBIMPL_HAS_BUILTIN */ - -#ifndef __has_builtin -# define __has_builtin(...) BIGDECIMAL_HAS_BUILTIN(__VA_ARGS__) -#endif - -#endif /* BIGDECIMAL_HAS_FEATURE_H */ diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing.c b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing.c deleted file mode 100644 index 1454c281..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing.c +++ /dev/null @@ -1,28 +0,0 @@ -#include - -#ifdef HAVE_RUBY_ATOMIC_H -# include -#endif - -#ifdef RUBY_ATOMIC_PTR_CAS -# define ATOMIC_PTR_CAS(var, old, new) RUBY_ATOMIC_PTR_CAS(var, old, new) -#endif - -#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -/* GCC warns about unknown sanitizer, which is annoying. */ -# undef NO_SANITIZE -# define NO_SANITIZE(x, y) \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wattributes\"") \ - __attribute__((__no_sanitize__(x))) y; \ - _Pragma("GCC diagnostic pop") \ - y -#endif - -#undef strtod -#define strtod BigDecimal_strtod -#undef dtoa -#define dtoa BigDecimal_dtoa -#undef hdtoa -#define hdtoa BigDecimal_hdtoa -#include "missing/dtoa.c" diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing.h b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing.h deleted file mode 100644 index 325554b5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing.h +++ /dev/null @@ -1,196 +0,0 @@ -#ifndef MISSING_H -#define MISSING_H 1 - -#if defined(__cplusplus) -extern "C" { -#if 0 -} /* satisfy cc-mode */ -#endif -#endif - -#ifdef HAVE_STDLIB_H -# include -#endif - -#ifdef HAVE_MATH_H -# include -#endif - -#ifndef RB_UNUSED_VAR -# if defined(_MSC_VER) && _MSC_VER >= 1911 -# define RB_UNUSED_VAR(x) x [[maybe_unused]] - -# elif defined(__has_cpp_attribute) && __has_cpp_attribute(maybe_unused) -# define RB_UNUSED_VAR(x) x [[maybe_unused]] - -# elif defined(__has_c_attribute) && __has_c_attribute(maybe_unused) -# define RB_UNUSED_VAR(x) x [[maybe_unused]] - -# elif defined(__GNUC__) -# define RB_UNUSED_VAR(x) x __attribute__ ((unused)) - -# else -# define RB_UNUSED_VAR(x) x -# endif -#endif /* RB_UNUSED_VAR */ - -#if defined(_MSC_VER) && _MSC_VER >= 1310 -# define HAVE___ASSUME 1 - -#elif defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1300 -# define HAVE___ASSUME 1 -#endif - -#ifndef UNREACHABLE -# if __has_builtin(__builtin_unreachable) -# define UNREACHABLE __builtin_unreachable() - -# elif defined(HAVE___ASSUME) -# define UNREACHABLE __assume(0) - -# else -# define UNREACHABLE /* unreachable */ -# endif -#endif /* UNREACHABLE */ - -/* bool */ - -#if defined(__bool_true_false_are_defined) -# /* Take that. */ - -#elif defined(HAVE_STDBOOL_H) -# include - -#else -typedef unsigned char _Bool; -# define bool _Bool -# define true ((_Bool)+1) -# define false ((_Bool)-1) -# define __bool_true_false_are_defined -#endif - -/* abs */ - -#ifndef HAVE_LABS -static inline long -labs(long const x) -{ - if (x < 0) return -x; - return x; -} -#endif - -#ifndef HAVE_LLABS -static inline LONG_LONG -llabs(LONG_LONG const x) -{ - if (x < 0) return -x; - return x; -} -#endif - -#ifdef vabs -# undef vabs -#endif -#if SIZEOF_VALUE <= SIZEOF_INT -# define vabs abs -#elif SIZEOF_VALUE <= SIZEOF_LONG -# define vabs labs -#elif SIZEOF_VALUE <= SIZEOF_LONG_LONG -# define vabs llabs -#endif - -/* finite */ - -#ifndef HAVE_FINITE -static int -finite(double) -{ - return !isnan(n) && !isinf(n); -} -#endif - -#ifndef isfinite -# ifndef HAVE_ISFINITE -# define HAVE_ISFINITE 1 -# define isfinite(x) finite(x) -# endif -#endif - -/* dtoa */ -char *BigDecimal_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve); - -/* rational */ - -#ifndef HAVE_RB_RATIONAL_NUM -static inline VALUE -rb_rational_num(VALUE rat) -{ -#ifdef RRATIONAL - return RRATIONAL(rat)->num; -#else - return rb_funcall(rat, rb_intern("numerator"), 0); -#endif -} -#endif - -#ifndef HAVE_RB_RATIONAL_DEN -static inline VALUE -rb_rational_den(VALUE rat) -{ -#ifdef RRATIONAL - return RRATIONAL(rat)->den; -#else - return rb_funcall(rat, rb_intern("denominator"), 0); -#endif -} -#endif - -/* complex */ - -#ifndef HAVE_RB_COMPLEX_REAL -static inline VALUE -rb_complex_real(VALUE cmp) -{ -#ifdef RCOMPLEX - return RCOMPLEX(cmp)->real; -#else - return rb_funcall(cmp, rb_intern("real"), 0); -#endif -} -#endif - -#ifndef HAVE_RB_COMPLEX_IMAG -static inline VALUE -rb_complex_imag(VALUE cmp) -{ -# ifdef RCOMPLEX - return RCOMPLEX(cmp)->imag; -# else - return rb_funcall(cmp, rb_intern("imag"), 0); -# endif -} -#endif - -/* st */ - -#ifndef ST2FIX -# undef RB_ST2FIX -# define RB_ST2FIX(h) LONG2FIX((long)(h)) -# define ST2FIX(h) RB_ST2FIX(h) -#endif - -/* warning */ - -#if !defined(HAVE_RB_CATEGORY_WARN) || !defined(HAVE_CONST_RB_WARN_CATEGORY_DEPRECATED) -# define rb_category_warn(category, ...) rb_warn(__VA_ARGS__) -#endif - -#if defined(__cplusplus) -#if 0 -{ /* satisfy cc-mode */ -#endif -} /* extern "C" { */ -#endif - -#endif /* MISSING_H */ diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing/dtoa.c b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing/dtoa.c deleted file mode 100644 index 41b0a221..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/missing/dtoa.c +++ /dev/null @@ -1,3462 +0,0 @@ -/**************************************************************** - * - * The author of this software is David M. Gay. - * - * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - ***************************************************************/ - -/* Please send bug reports to David M. Gay (dmg at acm dot org, - * with " at " changed at "@" and " dot " changed to "."). */ - -/* On a machine with IEEE extended-precision registers, it is - * necessary to specify double-precision (53-bit) rounding precision - * before invoking strtod or dtoa. If the machine uses (the equivalent - * of) Intel 80x87 arithmetic, the call - * _control87(PC_53, MCW_PC); - * does this with many compilers. Whether this or another call is - * appropriate depends on the compiler; for this to work, it may be - * necessary to #include "float.h" or another system-dependent header - * file. - */ - -/* strtod for IEEE-, VAX-, and IBM-arithmetic machines. - * - * This strtod returns a nearest machine number to the input decimal - * string (or sets errno to ERANGE). With IEEE arithmetic, ties are - * broken by the IEEE round-even rule. Otherwise ties are broken by - * biased rounding (add half and chop). - * - * Inspired loosely by William D. Clinger's paper "How to Read Floating - * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. - * - * Modifications: - * - * 1. We only require IEEE, IBM, or VAX double-precision - * arithmetic (not IEEE double-extended). - * 2. We get by with floating-point arithmetic in a case that - * Clinger missed -- when we're computing d * 10^n - * for a small integer d and the integer n is not too - * much larger than 22 (the maximum integer k for which - * we can represent 10^k exactly), we may be able to - * compute (d*10^k) * 10^(e-k) with just one roundoff. - * 3. Rather than a bit-at-a-time adjustment of the binary - * result in the hard case, we use floating-point - * arithmetic to determine the adjustment to within - * one bit; only in really hard cases do we need to - * compute a second residual. - * 4. Because of 3., we don't need a large table of powers of 10 - * for ten-to-e (just some small tables, e.g. of 10^k - * for 0 <= k <= 22). - */ - -/* - * #define IEEE_LITTLE_ENDIAN for IEEE-arithmetic machines where the least - * significant byte has the lowest address. - * #define IEEE_BIG_ENDIAN for IEEE-arithmetic machines where the most - * significant byte has the lowest address. - * #define Long int on machines with 32-bit ints and 64-bit longs. - * #define IBM for IBM mainframe-style floating-point arithmetic. - * #define VAX for VAX-style floating-point arithmetic (D_floating). - * #define No_leftright to omit left-right logic in fast floating-point - * computation of dtoa. - * #define Honor_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3 - * and strtod and dtoa should round accordingly. - * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3 - * and Honor_FLT_ROUNDS is not #defined. - * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines - * that use extended-precision instructions to compute rounded - * products and quotients) with IBM. - * #define ROUND_BIASED for IEEE-format with biased rounding. - * #define Inaccurate_Divide for IEEE-format with correctly rounded - * products but inaccurate quotients, e.g., for Intel i860. - * #define NO_LONG_LONG on machines that do not have a "long long" - * integer type (of >= 64 bits). On such machines, you can - * #define Just_16 to store 16 bits per 32-bit Long when doing - * high-precision integer arithmetic. Whether this speeds things - * up or slows things down depends on the machine and the number - * being converted. If long long is available and the name is - * something other than "long long", #define Llong to be the name, - * and if "unsigned Llong" does not work as an unsigned version of - * Llong, #define #ULLong to be the corresponding unsigned type. - * #define KR_headers for old-style C function headers. - * #define Bad_float_h if your system lacks a float.h or if it does not - * define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP, - * FLT_RADIX, FLT_ROUNDS, and DBL_MAX. - * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n) - * if memory is available and otherwise does something you deem - * appropriate. If MALLOC is undefined, malloc will be invoked - * directly -- and assumed always to succeed. - * #define Omit_Private_Memory to omit logic (added Jan. 1998) for making - * memory allocations from a private pool of memory when possible. - * When used, the private pool is PRIVATE_MEM bytes long: 2304 bytes, - * unless #defined to be a different length. This default length - * suffices to get rid of MALLOC calls except for unusual cases, - * such as decimal-to-binary conversion of a very long string of - * digits. The longest string dtoa can return is about 751 bytes - * long. For conversions by strtod of strings of 800 digits and - * all dtoa conversions in single-threaded executions with 8-byte - * pointers, PRIVATE_MEM >= 7400 appears to suffice; with 4-byte - * pointers, PRIVATE_MEM >= 7112 appears adequate. - * #define INFNAN_CHECK on IEEE systems to cause strtod to check for - * Infinity and NaN (case insensitively). On some systems (e.g., - * some HP systems), it may be necessary to #define NAN_WORD0 - * appropriately -- to the most significant word of a quiet NaN. - * (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.) - * When INFNAN_CHECK is #defined and No_Hex_NaN is not #defined, - * strtod also accepts (case insensitively) strings of the form - * NaN(x), where x is a string of hexadecimal digits and spaces; - * if there is only one string of hexadecimal digits, it is taken - * for the 52 fraction bits of the resulting NaN; if there are two - * or more strings of hex digits, the first is for the high 20 bits, - * the second and subsequent for the low 32 bits, with intervening - * white space ignored; but if this results in none of the 52 - * fraction bits being on (an IEEE Infinity symbol), then NAN_WORD0 - * and NAN_WORD1 are used instead. - * #define MULTIPLE_THREADS if the system offers preemptively scheduled - * multiple threads. In this case, you must provide (or suitably - * #define) two locks, acquired by ACQUIRE_DTOA_LOCK(n) and freed - * by FREE_DTOA_LOCK(n) for n = 0 or 1. (The second lock, accessed - * in pow5mult, ensures lazy evaluation of only one copy of high - * powers of 5; omitting this lock would introduce a small - * probability of wasting memory, but would otherwise be harmless.) - * You must also invoke freedtoa(s) to free the value s returned by - * dtoa. You may do so whether or not MULTIPLE_THREADS is #defined. - * #define NO_IEEE_Scale to disable new (Feb. 1997) logic in strtod that - * avoids underflows on inputs whose result does not underflow. - * If you #define NO_IEEE_Scale on a machine that uses IEEE-format - * floating-point numbers and flushes underflows to zero rather - * than implementing gradual underflow, then you must also #define - * Sudden_Underflow. - * #define YES_ALIAS to permit aliasing certain double values with - * arrays of ULongs. This leads to slightly better code with - * some compilers and was always used prior to 19990916, but it - * is not strictly legal and can cause trouble with aggressively - * optimizing compilers (e.g., gcc 2.95.1 under -O2). - * #define USE_LOCALE to use the current locale's decimal_point value. - * #define SET_INEXACT if IEEE arithmetic is being used and extra - * computation should be done to set the inexact flag when the - * result is inexact and avoid setting inexact when the result - * is exact. In this case, dtoa.c must be compiled in - * an environment, perhaps provided by #include "dtoa.c" in a - * suitable wrapper, that defines two functions, - * int get_inexact(void); - * void clear_inexact(void); - * such that get_inexact() returns a nonzero value if the - * inexact bit is already set, and clear_inexact() sets the - * inexact bit to 0. When SET_INEXACT is #defined, strtod - * also does extra computations to set the underflow and overflow - * flags when appropriate (i.e., when the result is tiny and - * inexact or when it is a numeric value rounded to +-infinity). - * #define NO_ERRNO if strtod should not assign errno = ERANGE when - * the result overflows to +-Infinity or underflows to 0. - */ - -#ifdef WORDS_BIGENDIAN -#define IEEE_BIG_ENDIAN -#else -#define IEEE_LITTLE_ENDIAN -#endif - -#ifdef __vax__ -#define VAX -#undef IEEE_BIG_ENDIAN -#undef IEEE_LITTLE_ENDIAN -#endif - -#if defined(__arm__) && !defined(__VFP_FP__) -#define IEEE_BIG_ENDIAN -#undef IEEE_LITTLE_ENDIAN -#endif - -#undef Long -#undef ULong - -#include - -#if (INT_MAX >> 30) && !(INT_MAX >> 31) -#define Long int -#define ULong unsigned int -#elif (LONG_MAX >> 30) && !(LONG_MAX >> 31) -#define Long long int -#define ULong unsigned long int -#else -#error No 32bit integer -#endif - -#if HAVE_LONG_LONG -#define Llong LONG_LONG -#else -#define NO_LONG_LONG -#endif - -#ifdef DEBUG -#include -#define Bug(x) {fprintf(stderr, "%s\n", (x)); exit(EXIT_FAILURE);} -#endif - -#ifndef ISDIGIT -#include -#define ISDIGIT(c) isdigit(c) -#endif -#include -#include -#include - -#ifdef USE_LOCALE -#include -#endif - -#ifdef MALLOC -extern void *MALLOC(size_t); -#else -#define MALLOC xmalloc -#endif -#ifdef FREE -extern void FREE(void*); -#else -#define FREE xfree -#endif -#ifndef NO_SANITIZE -#define NO_SANITIZE(x, y) y -#endif - -#ifndef Omit_Private_Memory -#ifndef PRIVATE_MEM -#define PRIVATE_MEM 2304 -#endif -#define PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double)) -static double private_mem[PRIVATE_mem], *pmem_next = private_mem; -#endif - -#undef IEEE_Arith -#undef Avoid_Underflow -#ifdef IEEE_BIG_ENDIAN -#define IEEE_Arith -#endif -#ifdef IEEE_LITTLE_ENDIAN -#define IEEE_Arith -#endif - -#ifdef Bad_float_h - -#ifdef IEEE_Arith -#define DBL_DIG 15 -#define DBL_MAX_10_EXP 308 -#define DBL_MAX_EXP 1024 -#define FLT_RADIX 2 -#endif /*IEEE_Arith*/ - -#ifdef IBM -#define DBL_DIG 16 -#define DBL_MAX_10_EXP 75 -#define DBL_MAX_EXP 63 -#define FLT_RADIX 16 -#define DBL_MAX 7.2370055773322621e+75 -#endif - -#ifdef VAX -#define DBL_DIG 16 -#define DBL_MAX_10_EXP 38 -#define DBL_MAX_EXP 127 -#define FLT_RADIX 2 -#define DBL_MAX 1.7014118346046923e+38 -#endif - -#ifndef LONG_MAX -#define LONG_MAX 2147483647 -#endif - -#else /* ifndef Bad_float_h */ -#include -#endif /* Bad_float_h */ - -#include - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* satisfy cc-mode */ -#endif -#endif - -#ifndef hexdigit -static const char hexdigit[] = "0123456789abcdef0123456789ABCDEF"; -#endif - -#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + defined(IBM) != 1 -Exactly one of IEEE_LITTLE_ENDIAN, IEEE_BIG_ENDIAN, VAX, or IBM should be defined. -#endif - -typedef union { double d; ULong L[2]; } U; - -#ifdef YES_ALIAS -typedef double double_u; -# define dval(x) (x) -# ifdef IEEE_LITTLE_ENDIAN -# define word0(x) (((ULong *)&(x))[1]) -# define word1(x) (((ULong *)&(x))[0]) -# else -# define word0(x) (((ULong *)&(x))[0]) -# define word1(x) (((ULong *)&(x))[1]) -# endif -#else -typedef U double_u; -# ifdef IEEE_LITTLE_ENDIAN -# define word0(x) ((x).L[1]) -# define word1(x) ((x).L[0]) -# else -# define word0(x) ((x).L[0]) -# define word1(x) ((x).L[1]) -# endif -# define dval(x) ((x).d) -#endif - -/* The following definition of Storeinc is appropriate for MIPS processors. - * An alternative that might be better on some machines is - * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff) - */ -#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm__) -#define Storeinc(a,b,c) (((unsigned short *)(a))[1] = (unsigned short)(b), \ -((unsigned short *)(a))[0] = (unsigned short)(c), (a)++) -#else -#define Storeinc(a,b,c) (((unsigned short *)(a))[0] = (unsigned short)(b), \ -((unsigned short *)(a))[1] = (unsigned short)(c), (a)++) -#endif - -/* #define P DBL_MANT_DIG */ -/* Ten_pmax = floor(P*log(2)/log(5)) */ -/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */ -/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */ -/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */ - -#ifdef IEEE_Arith -#define Exp_shift 20 -#define Exp_shift1 20 -#define Exp_msk1 0x100000 -#define Exp_msk11 0x100000 -#define Exp_mask 0x7ff00000 -#define P 53 -#define Bias 1023 -#define Emin (-1022) -#define Exp_1 0x3ff00000 -#define Exp_11 0x3ff00000 -#define Ebits 11 -#define Frac_mask 0xfffff -#define Frac_mask1 0xfffff -#define Ten_pmax 22 -#define Bletch 0x10 -#define Bndry_mask 0xfffff -#define Bndry_mask1 0xfffff -#define LSB 1 -#define Sign_bit 0x80000000 -#define Log2P 1 -#define Tiny0 0 -#define Tiny1 1 -#define Quick_max 14 -#define Int_max 14 -#ifndef NO_IEEE_Scale -#define Avoid_Underflow -#ifdef Flush_Denorm /* debugging option */ -#undef Sudden_Underflow -#endif -#endif - -#ifndef Flt_Rounds -#ifdef FLT_ROUNDS -#define Flt_Rounds FLT_ROUNDS -#else -#define Flt_Rounds 1 -#endif -#endif /*Flt_Rounds*/ - -#ifdef Honor_FLT_ROUNDS -#define Rounding rounding -#undef Check_FLT_ROUNDS -#define Check_FLT_ROUNDS -#else -#define Rounding Flt_Rounds -#endif - -#else /* ifndef IEEE_Arith */ -#undef Check_FLT_ROUNDS -#undef Honor_FLT_ROUNDS -#undef SET_INEXACT -#undef Sudden_Underflow -#define Sudden_Underflow -#ifdef IBM -#undef Flt_Rounds -#define Flt_Rounds 0 -#define Exp_shift 24 -#define Exp_shift1 24 -#define Exp_msk1 0x1000000 -#define Exp_msk11 0x1000000 -#define Exp_mask 0x7f000000 -#define P 14 -#define Bias 65 -#define Exp_1 0x41000000 -#define Exp_11 0x41000000 -#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */ -#define Frac_mask 0xffffff -#define Frac_mask1 0xffffff -#define Bletch 4 -#define Ten_pmax 22 -#define Bndry_mask 0xefffff -#define Bndry_mask1 0xffffff -#define LSB 1 -#define Sign_bit 0x80000000 -#define Log2P 4 -#define Tiny0 0x100000 -#define Tiny1 0 -#define Quick_max 14 -#define Int_max 15 -#else /* VAX */ -#undef Flt_Rounds -#define Flt_Rounds 1 -#define Exp_shift 23 -#define Exp_shift1 7 -#define Exp_msk1 0x80 -#define Exp_msk11 0x800000 -#define Exp_mask 0x7f80 -#define P 56 -#define Bias 129 -#define Exp_1 0x40800000 -#define Exp_11 0x4080 -#define Ebits 8 -#define Frac_mask 0x7fffff -#define Frac_mask1 0xffff007f -#define Ten_pmax 24 -#define Bletch 2 -#define Bndry_mask 0xffff007f -#define Bndry_mask1 0xffff007f -#define LSB 0x10000 -#define Sign_bit 0x8000 -#define Log2P 1 -#define Tiny0 0x80 -#define Tiny1 0 -#define Quick_max 15 -#define Int_max 15 -#endif /* IBM, VAX */ -#endif /* IEEE_Arith */ - -#ifndef IEEE_Arith -#define ROUND_BIASED -#endif - -#ifdef RND_PRODQUOT -#define rounded_product(a,b) ((a) = rnd_prod((a), (b))) -#define rounded_quotient(a,b) ((a) = rnd_quot((a), (b))) -extern double rnd_prod(double, double), rnd_quot(double, double); -#else -#define rounded_product(a,b) ((a) *= (b)) -#define rounded_quotient(a,b) ((a) /= (b)) -#endif - -#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) -#define Big1 0xffffffff - -#ifndef Pack_32 -#define Pack_32 -#endif - -#define FFFFFFFF 0xffffffffUL - -#ifdef NO_LONG_LONG -#undef ULLong -#ifdef Just_16 -#undef Pack_32 -/* When Pack_32 is not defined, we store 16 bits per 32-bit Long. - * This makes some inner loops simpler and sometimes saves work - * during multiplications, but it often seems to make things slightly - * slower. Hence the default is now to store 32 bits per Long. - */ -#endif -#else /* long long available */ -#ifndef Llong -#define Llong long long -#endif -#ifndef ULLong -#define ULLong unsigned Llong -#endif -#endif /* NO_LONG_LONG */ - -#define MULTIPLE_THREADS 1 - -#ifndef MULTIPLE_THREADS -#define ACQUIRE_DTOA_LOCK(n) /*nothing*/ -#define FREE_DTOA_LOCK(n) /*nothing*/ -#else -#define ACQUIRE_DTOA_LOCK(n) /*unused right now*/ -#define FREE_DTOA_LOCK(n) /*unused right now*/ -#endif - -#ifndef ATOMIC_PTR_CAS -#define ATOMIC_PTR_CAS(var, old, new) ((var) = (new), (old)) -#endif -#ifndef LIKELY -#define LIKELY(x) (x) -#endif -#ifndef UNLIKELY -#define UNLIKELY(x) (x) -#endif -#ifndef ASSUME -#define ASSUME(x) (void)(x) -#endif - -#define Kmax 15 - -struct Bigint { - struct Bigint *next; - int k, maxwds, sign, wds; - ULong x[1]; -}; - -typedef struct Bigint Bigint; - -static Bigint *freelist[Kmax+1]; - -static Bigint * -Balloc(int k) -{ - int x; - Bigint *rv; -#ifndef Omit_Private_Memory - size_t len; -#endif - - rv = 0; - ACQUIRE_DTOA_LOCK(0); - if (k <= Kmax) { - rv = freelist[k]; - while (rv) { - Bigint *rvn = rv; - rv = ATOMIC_PTR_CAS(freelist[k], rv, rv->next); - if (LIKELY(rvn == rv)) { - ASSUME(rv); - break; - } - } - } - if (!rv) { - x = 1 << k; -#ifdef Omit_Private_Memory - rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(ULong)); -#else - len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1) - /sizeof(double); - if (k <= Kmax) { - double *pnext = pmem_next; - while (pnext - private_mem + len <= PRIVATE_mem) { - double *p = pnext; - pnext = ATOMIC_PTR_CAS(pmem_next, pnext, pnext + len); - if (LIKELY(p == pnext)) { - rv = (Bigint*)pnext; - ASSUME(rv); - break; - } - } - } - if (!rv) - rv = (Bigint*)MALLOC(len*sizeof(double)); -#endif - rv->k = k; - rv->maxwds = x; - } - FREE_DTOA_LOCK(0); - rv->sign = rv->wds = 0; - return rv; -} - -static void -Bfree(Bigint *v) -{ - Bigint *vn; - if (v) { - if (v->k > Kmax) { - FREE(v); - return; - } - ACQUIRE_DTOA_LOCK(0); - do { - vn = v->next = freelist[v->k]; - } while (UNLIKELY(ATOMIC_PTR_CAS(freelist[v->k], vn, v) != vn)); - FREE_DTOA_LOCK(0); - } -} - -#define Bcopy(x,y) memcpy((char *)&(x)->sign, (char *)&(y)->sign, \ -(y)->wds*sizeof(Long) + 2*sizeof(int)) - -static Bigint * -multadd(Bigint *b, int m, int a) /* multiply by m and add a */ -{ - int i, wds; - ULong *x; -#ifdef ULLong - ULLong carry, y; -#else - ULong carry, y; -#ifdef Pack_32 - ULong xi, z; -#endif -#endif - Bigint *b1; - - wds = b->wds; - x = b->x; - i = 0; - carry = a; - do { -#ifdef ULLong - y = *x * (ULLong)m + carry; - carry = y >> 32; - *x++ = (ULong)(y & FFFFFFFF); -#else -#ifdef Pack_32 - xi = *x; - y = (xi & 0xffff) * m + carry; - z = (xi >> 16) * m + (y >> 16); - carry = z >> 16; - *x++ = (z << 16) + (y & 0xffff); -#else - y = *x * m + carry; - carry = y >> 16; - *x++ = y & 0xffff; -#endif -#endif - } while (++i < wds); - if (carry) { - if (wds >= b->maxwds) { - b1 = Balloc(b->k+1); - Bcopy(b1, b); - Bfree(b); - b = b1; - } - b->x[wds++] = (ULong)carry; - b->wds = wds; - } - return b; -} - -static Bigint * -s2b(const char *s, int nd0, int nd, ULong y9) -{ - Bigint *b; - int i, k; - Long x, y; - - x = (nd + 8) / 9; - for (k = 0, y = 1; x > y; y <<= 1, k++) ; -#ifdef Pack_32 - b = Balloc(k); - b->x[0] = y9; - b->wds = 1; -#else - b = Balloc(k+1); - b->x[0] = y9 & 0xffff; - b->wds = (b->x[1] = y9 >> 16) ? 2 : 1; -#endif - - i = 9; - if (9 < nd0) { - s += 9; - do { - b = multadd(b, 10, *s++ - '0'); - } while (++i < nd0); - s++; - } - else - s += 10; - for (; i < nd; i++) - b = multadd(b, 10, *s++ - '0'); - return b; -} - -static int -hi0bits(register ULong x) -{ - register int k = 0; - - if (!(x & 0xffff0000)) { - k = 16; - x <<= 16; - } - if (!(x & 0xff000000)) { - k += 8; - x <<= 8; - } - if (!(x & 0xf0000000)) { - k += 4; - x <<= 4; - } - if (!(x & 0xc0000000)) { - k += 2; - x <<= 2; - } - if (!(x & 0x80000000)) { - k++; - if (!(x & 0x40000000)) - return 32; - } - return k; -} - -static int -lo0bits(ULong *y) -{ - register int k; - register ULong x = *y; - - if (x & 7) { - if (x & 1) - return 0; - if (x & 2) { - *y = x >> 1; - return 1; - } - *y = x >> 2; - return 2; - } - k = 0; - if (!(x & 0xffff)) { - k = 16; - x >>= 16; - } - if (!(x & 0xff)) { - k += 8; - x >>= 8; - } - if (!(x & 0xf)) { - k += 4; - x >>= 4; - } - if (!(x & 0x3)) { - k += 2; - x >>= 2; - } - if (!(x & 1)) { - k++; - x >>= 1; - if (!x) - return 32; - } - *y = x; - return k; -} - -static Bigint * -i2b(int i) -{ - Bigint *b; - - b = Balloc(1); - b->x[0] = i; - b->wds = 1; - return b; -} - -static Bigint * -mult(Bigint *a, Bigint *b) -{ - Bigint *c; - int k, wa, wb, wc; - ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; - ULong y; -#ifdef ULLong - ULLong carry, z; -#else - ULong carry, z; -#ifdef Pack_32 - ULong z2; -#endif -#endif - - if (a->wds < b->wds) { - c = a; - a = b; - b = c; - } - k = a->k; - wa = a->wds; - wb = b->wds; - wc = wa + wb; - if (wc > a->maxwds) - k++; - c = Balloc(k); - for (x = c->x, xa = x + wc; x < xa; x++) - *x = 0; - xa = a->x; - xae = xa + wa; - xb = b->x; - xbe = xb + wb; - xc0 = c->x; -#ifdef ULLong - for (; xb < xbe; xc0++) { - if ((y = *xb++) != 0) { - x = xa; - xc = xc0; - carry = 0; - do { - z = *x++ * (ULLong)y + *xc + carry; - carry = z >> 32; - *xc++ = (ULong)(z & FFFFFFFF); - } while (x < xae); - *xc = (ULong)carry; - } - } -#else -#ifdef Pack_32 - for (; xb < xbe; xb++, xc0++) { - if ((y = *xb & 0xffff) != 0) { - x = xa; - xc = xc0; - carry = 0; - do { - z = (*x & 0xffff) * y + (*xc & 0xffff) + carry; - carry = z >> 16; - z2 = (*x++ >> 16) * y + (*xc >> 16) + carry; - carry = z2 >> 16; - Storeinc(xc, z2, z); - } while (x < xae); - *xc = (ULong)carry; - } - if ((y = *xb >> 16) != 0) { - x = xa; - xc = xc0; - carry = 0; - z2 = *xc; - do { - z = (*x & 0xffff) * y + (*xc >> 16) + carry; - carry = z >> 16; - Storeinc(xc, z, z2); - z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry; - carry = z2 >> 16; - } while (x < xae); - *xc = z2; - } - } -#else - for (; xb < xbe; xc0++) { - if (y = *xb++) { - x = xa; - xc = xc0; - carry = 0; - do { - z = *x++ * y + *xc + carry; - carry = z >> 16; - *xc++ = z & 0xffff; - } while (x < xae); - *xc = (ULong)carry; - } - } -#endif -#endif - for (xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ; - c->wds = wc; - return c; -} - -static Bigint *p5s; - -static Bigint * -pow5mult(Bigint *b, int k) -{ - Bigint *b1, *p5, *p51; - Bigint *p5tmp; - int i; - static const int p05[3] = { 5, 25, 125 }; - - if ((i = k & 3) != 0) - b = multadd(b, p05[i-1], 0); - - if (!(k >>= 2)) - return b; - if (!(p5 = p5s)) { - /* first time */ - ACQUIRE_DTOA_LOCK(1); - if (!(p5 = p5s)) { - p5 = i2b(625); - p5->next = 0; - p5tmp = ATOMIC_PTR_CAS(p5s, NULL, p5); - if (UNLIKELY(p5tmp)) { - Bfree(p5); - p5 = p5tmp; - } - } - FREE_DTOA_LOCK(1); - } - for (;;) { - if (k & 1) { - b1 = mult(b, p5); - Bfree(b); - b = b1; - } - if (!(k >>= 1)) - break; - if (!(p51 = p5->next)) { - ACQUIRE_DTOA_LOCK(1); - if (!(p51 = p5->next)) { - p51 = mult(p5,p5); - p51->next = 0; - p5tmp = ATOMIC_PTR_CAS(p5->next, NULL, p51); - if (UNLIKELY(p5tmp)) { - Bfree(p51); - p51 = p5tmp; - } - } - FREE_DTOA_LOCK(1); - } - p5 = p51; - } - return b; -} - -static Bigint * -lshift(Bigint *b, int k) -{ - int i, k1, n, n1; - Bigint *b1; - ULong *x, *x1, *xe, z; - -#ifdef Pack_32 - n = k >> 5; -#else - n = k >> 4; -#endif - k1 = b->k; - n1 = n + b->wds + 1; - for (i = b->maxwds; n1 > i; i <<= 1) - k1++; - b1 = Balloc(k1); - x1 = b1->x; - for (i = 0; i < n; i++) - *x1++ = 0; - x = b->x; - xe = x + b->wds; -#ifdef Pack_32 - if (k &= 0x1f) { - k1 = 32 - k; - z = 0; - do { - *x1++ = *x << k | z; - z = *x++ >> k1; - } while (x < xe); - if ((*x1 = z) != 0) - ++n1; - } -#else - if (k &= 0xf) { - k1 = 16 - k; - z = 0; - do { - *x1++ = *x << k & 0xffff | z; - z = *x++ >> k1; - } while (x < xe); - if (*x1 = z) - ++n1; - } -#endif - else - do { - *x1++ = *x++; - } while (x < xe); - b1->wds = n1 - 1; - Bfree(b); - return b1; -} - -static int -cmp(Bigint *a, Bigint *b) -{ - ULong *xa, *xa0, *xb, *xb0; - int i, j; - - i = a->wds; - j = b->wds; -#ifdef DEBUG - if (i > 1 && !a->x[i-1]) - Bug("cmp called with a->x[a->wds-1] == 0"); - if (j > 1 && !b->x[j-1]) - Bug("cmp called with b->x[b->wds-1] == 0"); -#endif - if (i -= j) - return i; - xa0 = a->x; - xa = xa0 + j; - xb0 = b->x; - xb = xb0 + j; - for (;;) { - if (*--xa != *--xb) - return *xa < *xb ? -1 : 1; - if (xa <= xa0) - break; - } - return 0; -} - -NO_SANITIZE("unsigned-integer-overflow", static Bigint * diff(Bigint *a, Bigint *b)); -static Bigint * -diff(Bigint *a, Bigint *b) -{ - Bigint *c; - int i, wa, wb; - ULong *xa, *xae, *xb, *xbe, *xc; -#ifdef ULLong - ULLong borrow, y; -#else - ULong borrow, y; -#ifdef Pack_32 - ULong z; -#endif -#endif - - i = cmp(a,b); - if (!i) { - c = Balloc(0); - c->wds = 1; - c->x[0] = 0; - return c; - } - if (i < 0) { - c = a; - a = b; - b = c; - i = 1; - } - else - i = 0; - c = Balloc(a->k); - c->sign = i; - wa = a->wds; - xa = a->x; - xae = xa + wa; - wb = b->wds; - xb = b->x; - xbe = xb + wb; - xc = c->x; - borrow = 0; -#ifdef ULLong - do { - y = (ULLong)*xa++ - *xb++ - borrow; - borrow = y >> 32 & (ULong)1; - *xc++ = (ULong)(y & FFFFFFFF); - } while (xb < xbe); - while (xa < xae) { - y = *xa++ - borrow; - borrow = y >> 32 & (ULong)1; - *xc++ = (ULong)(y & FFFFFFFF); - } -#else -#ifdef Pack_32 - do { - y = (*xa & 0xffff) - (*xb & 0xffff) - borrow; - borrow = (y & 0x10000) >> 16; - z = (*xa++ >> 16) - (*xb++ >> 16) - borrow; - borrow = (z & 0x10000) >> 16; - Storeinc(xc, z, y); - } while (xb < xbe); - while (xa < xae) { - y = (*xa & 0xffff) - borrow; - borrow = (y & 0x10000) >> 16; - z = (*xa++ >> 16) - borrow; - borrow = (z & 0x10000) >> 16; - Storeinc(xc, z, y); - } -#else - do { - y = *xa++ - *xb++ - borrow; - borrow = (y & 0x10000) >> 16; - *xc++ = y & 0xffff; - } while (xb < xbe); - while (xa < xae) { - y = *xa++ - borrow; - borrow = (y & 0x10000) >> 16; - *xc++ = y & 0xffff; - } -#endif -#endif - while (!*--xc) - wa--; - c->wds = wa; - return c; -} - -static double -ulp(double x_) -{ - register Long L; - double_u x, a; - dval(x) = x_; - - L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1; -#ifndef Avoid_Underflow -#ifndef Sudden_Underflow - if (L > 0) { -#endif -#endif -#ifdef IBM - L |= Exp_msk1 >> 4; -#endif - word0(a) = L; - word1(a) = 0; -#ifndef Avoid_Underflow -#ifndef Sudden_Underflow - } - else { - L = -L >> Exp_shift; - if (L < Exp_shift) { - word0(a) = 0x80000 >> L; - word1(a) = 0; - } - else { - word0(a) = 0; - L -= Exp_shift; - word1(a) = L >= 31 ? 1 : 1 << 31 - L; - } - } -#endif -#endif - return dval(a); -} - -static double -b2d(Bigint *a, int *e) -{ - ULong *xa, *xa0, w, y, z; - int k; - double_u d; -#ifdef VAX - ULong d0, d1; -#else -#define d0 word0(d) -#define d1 word1(d) -#endif - - xa0 = a->x; - xa = xa0 + a->wds; - y = *--xa; -#ifdef DEBUG - if (!y) Bug("zero y in b2d"); -#endif - k = hi0bits(y); - *e = 32 - k; -#ifdef Pack_32 - if (k < Ebits) { - d0 = Exp_1 | y >> (Ebits - k); - w = xa > xa0 ? *--xa : 0; - d1 = y << ((32-Ebits) + k) | w >> (Ebits - k); - goto ret_d; - } - z = xa > xa0 ? *--xa : 0; - if (k -= Ebits) { - d0 = Exp_1 | y << k | z >> (32 - k); - y = xa > xa0 ? *--xa : 0; - d1 = z << k | y >> (32 - k); - } - else { - d0 = Exp_1 | y; - d1 = z; - } -#else - if (k < Ebits + 16) { - z = xa > xa0 ? *--xa : 0; - d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k; - w = xa > xa0 ? *--xa : 0; - y = xa > xa0 ? *--xa : 0; - d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k; - goto ret_d; - } - z = xa > xa0 ? *--xa : 0; - w = xa > xa0 ? *--xa : 0; - k -= Ebits + 16; - d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k; - y = xa > xa0 ? *--xa : 0; - d1 = w << k + 16 | y << k; -#endif -ret_d: -#ifdef VAX - word0(d) = d0 >> 16 | d0 << 16; - word1(d) = d1 >> 16 | d1 << 16; -#else -#undef d0 -#undef d1 -#endif - return dval(d); -} - -static Bigint * -d2b(double d_, int *e, int *bits) -{ - double_u d; - Bigint *b; - int de, k; - ULong *x, y, z; -#ifndef Sudden_Underflow - int i; -#endif -#ifdef VAX - ULong d0, d1; -#endif - dval(d) = d_; -#ifdef VAX - d0 = word0(d) >> 16 | word0(d) << 16; - d1 = word1(d) >> 16 | word1(d) << 16; -#else -#define d0 word0(d) -#define d1 word1(d) -#endif - -#ifdef Pack_32 - b = Balloc(1); -#else - b = Balloc(2); -#endif - x = b->x; - - z = d0 & Frac_mask; - d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ -#ifdef Sudden_Underflow - de = (int)(d0 >> Exp_shift); -#ifndef IBM - z |= Exp_msk11; -#endif -#else - if ((de = (int)(d0 >> Exp_shift)) != 0) - z |= Exp_msk1; -#endif -#ifdef Pack_32 - if ((y = d1) != 0) { - if ((k = lo0bits(&y)) != 0) { - x[0] = y | z << (32 - k); - z >>= k; - } - else - x[0] = y; -#ifndef Sudden_Underflow - i = -#endif - b->wds = (x[1] = z) ? 2 : 1; - } - else { -#ifdef DEBUG - if (!z) - Bug("Zero passed to d2b"); -#endif - k = lo0bits(&z); - x[0] = z; -#ifndef Sudden_Underflow - i = -#endif - b->wds = 1; - k += 32; - } -#else - if (y = d1) { - if (k = lo0bits(&y)) - if (k >= 16) { - x[0] = y | z << 32 - k & 0xffff; - x[1] = z >> k - 16 & 0xffff; - x[2] = z >> k; - i = 2; - } - else { - x[0] = y & 0xffff; - x[1] = y >> 16 | z << 16 - k & 0xffff; - x[2] = z >> k & 0xffff; - x[3] = z >> k+16; - i = 3; - } - else { - x[0] = y & 0xffff; - x[1] = y >> 16; - x[2] = z & 0xffff; - x[3] = z >> 16; - i = 3; - } - } - else { -#ifdef DEBUG - if (!z) - Bug("Zero passed to d2b"); -#endif - k = lo0bits(&z); - if (k >= 16) { - x[0] = z; - i = 0; - } - else { - x[0] = z & 0xffff; - x[1] = z >> 16; - i = 1; - } - k += 32; - } - while (!x[i]) - --i; - b->wds = i + 1; -#endif -#ifndef Sudden_Underflow - if (de) { -#endif -#ifdef IBM - *e = (de - Bias - (P-1) << 2) + k; - *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask); -#else - *e = de - Bias - (P-1) + k; - *bits = P - k; -#endif -#ifndef Sudden_Underflow - } - else { - *e = de - Bias - (P-1) + 1 + k; -#ifdef Pack_32 - *bits = 32*i - hi0bits(x[i-1]); -#else - *bits = (i+2)*16 - hi0bits(x[i]); -#endif - } -#endif - return b; -} -#undef d0 -#undef d1 - -static double -ratio(Bigint *a, Bigint *b) -{ - double_u da, db; - int k, ka, kb; - - dval(da) = b2d(a, &ka); - dval(db) = b2d(b, &kb); -#ifdef Pack_32 - k = ka - kb + 32*(a->wds - b->wds); -#else - k = ka - kb + 16*(a->wds - b->wds); -#endif -#ifdef IBM - if (k > 0) { - word0(da) += (k >> 2)*Exp_msk1; - if (k &= 3) - dval(da) *= 1 << k; - } - else { - k = -k; - word0(db) += (k >> 2)*Exp_msk1; - if (k &= 3) - dval(db) *= 1 << k; - } -#else - if (k > 0) - word0(da) += k*Exp_msk1; - else { - k = -k; - word0(db) += k*Exp_msk1; - } -#endif - return dval(da) / dval(db); -} - -static const double -tens[] = { - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - 1e20, 1e21, 1e22 -#ifdef VAX - , 1e23, 1e24 -#endif -}; - -static const double -#ifdef IEEE_Arith -bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 }; -static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, -#ifdef Avoid_Underflow - 9007199254740992.*9007199254740992.e-256 - /* = 2^106 * 1e-53 */ -#else - 1e-256 -#endif -}; -/* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */ -/* flag unnecessarily. It leads to a song and dance at the end of strtod. */ -#define Scale_Bit 0x10 -#define n_bigtens 5 -#else -#ifdef IBM -bigtens[] = { 1e16, 1e32, 1e64 }; -static const double tinytens[] = { 1e-16, 1e-32, 1e-64 }; -#define n_bigtens 3 -#else -bigtens[] = { 1e16, 1e32 }; -static const double tinytens[] = { 1e-16, 1e-32 }; -#define n_bigtens 2 -#endif -#endif - -#ifndef IEEE_Arith -#undef INFNAN_CHECK -#endif - -#ifdef INFNAN_CHECK - -#ifndef NAN_WORD0 -#define NAN_WORD0 0x7ff80000 -#endif - -#ifndef NAN_WORD1 -#define NAN_WORD1 0 -#endif - -static int -match(const char **sp, char *t) -{ - int c, d; - const char *s = *sp; - - while (d = *t++) { - if ((c = *++s) >= 'A' && c <= 'Z') - c += 'a' - 'A'; - if (c != d) - return 0; - } - *sp = s + 1; - return 1; -} - -#ifndef No_Hex_NaN -static void -hexnan(double *rvp, const char **sp) -{ - ULong c, x[2]; - const char *s; - int havedig, udx0, xshift; - - x[0] = x[1] = 0; - havedig = xshift = 0; - udx0 = 1; - s = *sp; - while (c = *(const unsigned char*)++s) { - if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'a' && c <= 'f') - c += 10 - 'a'; - else if (c >= 'A' && c <= 'F') - c += 10 - 'A'; - else if (c <= ' ') { - if (udx0 && havedig) { - udx0 = 0; - xshift = 1; - } - continue; - } - else if (/*(*/ c == ')' && havedig) { - *sp = s + 1; - break; - } - else - return; /* invalid form: don't change *sp */ - havedig = 1; - if (xshift) { - xshift = 0; - x[0] = x[1]; - x[1] = 0; - } - if (udx0) - x[0] = (x[0] << 4) | (x[1] >> 28); - x[1] = (x[1] << 4) | c; - } - if ((x[0] &= 0xfffff) || x[1]) { - word0(*rvp) = Exp_mask | x[0]; - word1(*rvp) = x[1]; - } -} -#endif /*No_Hex_NaN*/ -#endif /* INFNAN_CHECK */ - -NO_SANITIZE("unsigned-integer-overflow", double strtod(const char *s00, char **se)); -double -strtod(const char *s00, char **se) -{ -#ifdef Avoid_Underflow - int scale; -#endif - int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, - e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; - const char *s, *s0, *s1; - double aadj, adj; - double_u aadj1, rv, rv0; - Long L; - ULong y, z; - Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; -#ifdef SET_INEXACT - int inexact, oldinexact; -#endif -#ifdef Honor_FLT_ROUNDS - int rounding; -#endif -#ifdef USE_LOCALE - const char *s2; -#endif - - errno = 0; - sign = nz0 = nz = 0; - dval(rv) = 0.; - for (s = s00;;s++) - switch (*s) { - case '-': - sign = 1; - /* no break */ - case '+': - if (*++s) - goto break2; - /* no break */ - case 0: - goto ret0; - case '\t': - case '\n': - case '\v': - case '\f': - case '\r': - case ' ': - continue; - default: - goto break2; - } -break2: - if (*s == '0') { - if (s[1] == 'x' || s[1] == 'X') { - s0 = ++s; - adj = 0; - aadj = 1.0; - nd0 = -4; - - if (!*++s || !(s1 = strchr(hexdigit, *s))) goto ret0; - if (*s == '0') { - while (*++s == '0'); - s1 = strchr(hexdigit, *s); - } - if (s1 != NULL) { - do { - adj += aadj * ((s1 - hexdigit) & 15); - nd0 += 4; - aadj /= 16; - } while (*++s && (s1 = strchr(hexdigit, *s))); - } - - if (*s == '.') { - dsign = 1; - if (!*++s || !(s1 = strchr(hexdigit, *s))) goto ret0; - if (nd0 < 0) { - while (*s == '0') { - s++; - nd0 -= 4; - } - } - for (; *s && (s1 = strchr(hexdigit, *s)); ++s) { - adj += aadj * ((s1 - hexdigit) & 15); - if ((aadj /= 16) == 0.0) { - while (strchr(hexdigit, *++s)); - break; - } - } - } - else { - dsign = 0; - } - - if (*s == 'P' || *s == 'p') { - dsign = 0x2C - *++s; /* +: 2B, -: 2D */ - if (abs(dsign) == 1) s++; - else dsign = 1; - - nd = 0; - c = *s; - if (c < '0' || '9' < c) goto ret0; - do { - nd *= 10; - nd += c; - nd -= '0'; - c = *++s; - /* Float("0x0."+("0"*267)+"1fp2095") */ - if (nd + dsign * nd0 > 2095) { - while ('0' <= c && c <= '9') c = *++s; - break; - } - } while ('0' <= c && c <= '9'); - nd0 += nd * dsign; - } - else { - if (dsign) goto ret0; - } - dval(rv) = ldexp(adj, nd0); - goto ret; - } - nz0 = 1; - while (*++s == '0') ; - if (!*s) - goto ret; - } - s0 = s; - y = z = 0; - for (nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) - if (nd < 9) - y = 10*y + c - '0'; - else if (nd < DBL_DIG + 2) - z = 10*z + c - '0'; - nd0 = nd; -#ifdef USE_LOCALE - s1 = localeconv()->decimal_point; - if (c == *s1) { - c = '.'; - if (*++s1) { - s2 = s; - for (;;) { - if (*++s2 != *s1) { - c = 0; - break; - } - if (!*++s1) { - s = s2; - break; - } - } - } - } -#endif - if (c == '.') { - if (!ISDIGIT(s[1])) - goto dig_done; - c = *++s; - if (!nd) { - for (; c == '0'; c = *++s) - nz++; - if (c > '0' && c <= '9') { - s0 = s; - nf += nz; - nz = 0; - goto have_dig; - } - goto dig_done; - } - for (; c >= '0' && c <= '9'; c = *++s) { -have_dig: - nz++; - if (nd > DBL_DIG * 4) { - continue; - } - if (c -= '0') { - nf += nz; - for (i = 1; i < nz; i++) - if (nd++ < 9) - y *= 10; - else if (nd <= DBL_DIG + 2) - z *= 10; - if (nd++ < 9) - y = 10*y + c; - else if (nd <= DBL_DIG + 2) - z = 10*z + c; - nz = 0; - } - } - } -dig_done: - e = 0; - if (c == 'e' || c == 'E') { - if (!nd && !nz && !nz0) { - goto ret0; - } - s00 = s; - esign = 0; - switch (c = *++s) { - case '-': - esign = 1; - case '+': - c = *++s; - } - if (c >= '0' && c <= '9') { - while (c == '0') - c = *++s; - if (c > '0' && c <= '9') { - L = c - '0'; - s1 = s; - while ((c = *++s) >= '0' && c <= '9') - L = 10*L + c - '0'; - if (s - s1 > 8 || L > 19999) - /* Avoid confusion from exponents - * so large that e might overflow. - */ - e = 19999; /* safe for 16 bit ints */ - else - e = (int)L; - if (esign) - e = -e; - } - else - e = 0; - } - else - s = s00; - } - if (!nd) { - if (!nz && !nz0) { -#ifdef INFNAN_CHECK - /* Check for Nan and Infinity */ - switch (c) { - case 'i': - case 'I': - if (match(&s,"nf")) { - --s; - if (!match(&s,"inity")) - ++s; - word0(rv) = 0x7ff00000; - word1(rv) = 0; - goto ret; - } - break; - case 'n': - case 'N': - if (match(&s, "an")) { - word0(rv) = NAN_WORD0; - word1(rv) = NAN_WORD1; -#ifndef No_Hex_NaN - if (*s == '(') /*)*/ - hexnan(&rv, &s); -#endif - goto ret; - } - } -#endif /* INFNAN_CHECK */ -ret0: - s = s00; - sign = 0; - } - goto ret; - } - e1 = e -= nf; - - /* Now we have nd0 digits, starting at s0, followed by a - * decimal point, followed by nd-nd0 digits. The number we're - * after is the integer represented by those digits times - * 10**e */ - - if (!nd0) - nd0 = nd; - k = nd < DBL_DIG + 2 ? nd : DBL_DIG + 2; - dval(rv) = y; - if (k > 9) { -#ifdef SET_INEXACT - if (k > DBL_DIG) - oldinexact = get_inexact(); -#endif - dval(rv) = tens[k - 9] * dval(rv) + z; - } - bd0 = bb = bd = bs = delta = 0; - if (nd <= DBL_DIG -#ifndef RND_PRODQUOT -#ifndef Honor_FLT_ROUNDS - && Flt_Rounds == 1 -#endif -#endif - ) { - if (!e) - goto ret; - if (e > 0) { - if (e <= Ten_pmax) { -#ifdef VAX - goto vax_ovfl_check; -#else -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) { - dval(rv) = -dval(rv); - sign = 0; - } -#endif - /* rv = */ rounded_product(dval(rv), tens[e]); - goto ret; -#endif - } - i = DBL_DIG - nd; - if (e <= Ten_pmax + i) { - /* A fancier test would sometimes let us do - * this for larger i values. - */ -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) { - dval(rv) = -dval(rv); - sign = 0; - } -#endif - e -= i; - dval(rv) *= tens[i]; -#ifdef VAX - /* VAX exponent range is so narrow we must - * worry about overflow here... - */ -vax_ovfl_check: - word0(rv) -= P*Exp_msk1; - /* rv = */ rounded_product(dval(rv), tens[e]); - if ((word0(rv) & Exp_mask) - > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) - goto ovfl; - word0(rv) += P*Exp_msk1; -#else - /* rv = */ rounded_product(dval(rv), tens[e]); -#endif - goto ret; - } - } -#ifndef Inaccurate_Divide - else if (e >= -Ten_pmax) { -#ifdef Honor_FLT_ROUNDS - /* round correctly FLT_ROUNDS = 2 or 3 */ - if (sign) { - dval(rv) = -dval(rv); - sign = 0; - } -#endif - /* rv = */ rounded_quotient(dval(rv), tens[-e]); - goto ret; - } -#endif - } - e1 += nd - k; - -#ifdef IEEE_Arith -#ifdef SET_INEXACT - inexact = 1; - if (k <= DBL_DIG) - oldinexact = get_inexact(); -#endif -#ifdef Avoid_Underflow - scale = 0; -#endif -#ifdef Honor_FLT_ROUNDS - if ((rounding = Flt_Rounds) >= 2) { - if (sign) - rounding = rounding == 2 ? 0 : 2; - else - if (rounding != 2) - rounding = 0; - } -#endif -#endif /*IEEE_Arith*/ - - /* Get starting approximation = rv * 10**e1 */ - - if (e1 > 0) { - if ((i = e1 & 15) != 0) - dval(rv) *= tens[i]; - if (e1 &= ~15) { - if (e1 > DBL_MAX_10_EXP) { -ovfl: -#ifndef NO_ERRNO - errno = ERANGE; -#endif - /* Can't trust HUGE_VAL */ -#ifdef IEEE_Arith -#ifdef Honor_FLT_ROUNDS - switch (rounding) { - case 0: /* toward 0 */ - case 3: /* toward -infinity */ - word0(rv) = Big0; - word1(rv) = Big1; - break; - default: - word0(rv) = Exp_mask; - word1(rv) = 0; - } -#else /*Honor_FLT_ROUNDS*/ - word0(rv) = Exp_mask; - word1(rv) = 0; -#endif /*Honor_FLT_ROUNDS*/ -#ifdef SET_INEXACT - /* set overflow bit */ - dval(rv0) = 1e300; - dval(rv0) *= dval(rv0); -#endif -#else /*IEEE_Arith*/ - word0(rv) = Big0; - word1(rv) = Big1; -#endif /*IEEE_Arith*/ - if (bd0) - goto retfree; - goto ret; - } - e1 >>= 4; - for (j = 0; e1 > 1; j++, e1 >>= 1) - if (e1 & 1) - dval(rv) *= bigtens[j]; - /* The last multiplication could overflow. */ - word0(rv) -= P*Exp_msk1; - dval(rv) *= bigtens[j]; - if ((z = word0(rv) & Exp_mask) - > Exp_msk1*(DBL_MAX_EXP+Bias-P)) - goto ovfl; - if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) { - /* set to largest number */ - /* (Can't trust DBL_MAX) */ - word0(rv) = Big0; - word1(rv) = Big1; - } - else - word0(rv) += P*Exp_msk1; - } - } - else if (e1 < 0) { - e1 = -e1; - if ((i = e1 & 15) != 0) - dval(rv) /= tens[i]; - if (e1 >>= 4) { - if (e1 >= 1 << n_bigtens) - goto undfl; -#ifdef Avoid_Underflow - if (e1 & Scale_Bit) - scale = 2*P; - for (j = 0; e1 > 0; j++, e1 >>= 1) - if (e1 & 1) - dval(rv) *= tinytens[j]; - if (scale && (j = 2*P + 1 - ((word0(rv) & Exp_mask) - >> Exp_shift)) > 0) { - /* scaled rv is denormal; zap j low bits */ - if (j >= 32) { - word1(rv) = 0; - if (j >= 53) - word0(rv) = (P+2)*Exp_msk1; - else - word0(rv) &= 0xffffffff << (j-32); - } - else - word1(rv) &= 0xffffffff << j; - } -#else - for (j = 0; e1 > 1; j++, e1 >>= 1) - if (e1 & 1) - dval(rv) *= tinytens[j]; - /* The last multiplication could underflow. */ - dval(rv0) = dval(rv); - dval(rv) *= tinytens[j]; - if (!dval(rv)) { - dval(rv) = 2.*dval(rv0); - dval(rv) *= tinytens[j]; -#endif - if (!dval(rv)) { -undfl: - dval(rv) = 0.; -#ifndef NO_ERRNO - errno = ERANGE; -#endif - if (bd0) - goto retfree; - goto ret; - } -#ifndef Avoid_Underflow - word0(rv) = Tiny0; - word1(rv) = Tiny1; - /* The refinement below will clean - * this approximation up. - */ - } -#endif - } - } - - /* Now the hard part -- adjusting rv to the correct value.*/ - - /* Put digits into bd: true value = bd * 10^e */ - - bd0 = s2b(s0, nd0, nd, y); - - for (;;) { - bd = Balloc(bd0->k); - Bcopy(bd, bd0); - bb = d2b(dval(rv), &bbe, &bbbits); /* rv = bb * 2^bbe */ - bs = i2b(1); - - if (e >= 0) { - bb2 = bb5 = 0; - bd2 = bd5 = e; - } - else { - bb2 = bb5 = -e; - bd2 = bd5 = 0; - } - if (bbe >= 0) - bb2 += bbe; - else - bd2 -= bbe; - bs2 = bb2; -#ifdef Honor_FLT_ROUNDS - if (rounding != 1) - bs2++; -#endif -#ifdef Avoid_Underflow - j = bbe - scale; - i = j + bbbits - 1; /* logb(rv) */ - if (i < Emin) /* denormal */ - j += P - Emin; - else - j = P + 1 - bbbits; -#else /*Avoid_Underflow*/ -#ifdef Sudden_Underflow -#ifdef IBM - j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3); -#else - j = P + 1 - bbbits; -#endif -#else /*Sudden_Underflow*/ - j = bbe; - i = j + bbbits - 1; /* logb(rv) */ - if (i < Emin) /* denormal */ - j += P - Emin; - else - j = P + 1 - bbbits; -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - bb2 += j; - bd2 += j; -#ifdef Avoid_Underflow - bd2 += scale; -#endif - i = bb2 < bd2 ? bb2 : bd2; - if (i > bs2) - i = bs2; - if (i > 0) { - bb2 -= i; - bd2 -= i; - bs2 -= i; - } - if (bb5 > 0) { - bs = pow5mult(bs, bb5); - bb1 = mult(bs, bb); - Bfree(bb); - bb = bb1; - } - if (bb2 > 0) - bb = lshift(bb, bb2); - if (bd5 > 0) - bd = pow5mult(bd, bd5); - if (bd2 > 0) - bd = lshift(bd, bd2); - if (bs2 > 0) - bs = lshift(bs, bs2); - delta = diff(bb, bd); - dsign = delta->sign; - delta->sign = 0; - i = cmp(delta, bs); -#ifdef Honor_FLT_ROUNDS - if (rounding != 1) { - if (i < 0) { - /* Error is less than an ulp */ - if (!delta->x[0] && delta->wds <= 1) { - /* exact */ -#ifdef SET_INEXACT - inexact = 0; -#endif - break; - } - if (rounding) { - if (dsign) { - adj = 1.; - goto apply_adj; - } - } - else if (!dsign) { - adj = -1.; - if (!word1(rv) - && !(word0(rv) & Frac_mask)) { - y = word0(rv) & Exp_mask; -#ifdef Avoid_Underflow - if (!scale || y > 2*P*Exp_msk1) -#else - if (y) -#endif - { - delta = lshift(delta,Log2P); - if (cmp(delta, bs) <= 0) - adj = -0.5; - } - } -apply_adj: -#ifdef Avoid_Underflow - if (scale && (y = word0(rv) & Exp_mask) - <= 2*P*Exp_msk1) - word0(adj) += (2*P+1)*Exp_msk1 - y; -#else -#ifdef Sudden_Underflow - if ((word0(rv) & Exp_mask) <= - P*Exp_msk1) { - word0(rv) += P*Exp_msk1; - dval(rv) += adj*ulp(dval(rv)); - word0(rv) -= P*Exp_msk1; - } - else -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - dval(rv) += adj*ulp(dval(rv)); - } - break; - } - adj = ratio(delta, bs); - if (adj < 1.) - adj = 1.; - if (adj <= 0x7ffffffe) { - /* adj = rounding ? ceil(adj) : floor(adj); */ - y = adj; - if (y != adj) { - if (!((rounding>>1) ^ dsign)) - y++; - adj = y; - } - } -#ifdef Avoid_Underflow - if (scale && (y = word0(rv) & Exp_mask) <= 2*P*Exp_msk1) - word0(adj) += (2*P+1)*Exp_msk1 - y; -#else -#ifdef Sudden_Underflow - if ((word0(rv) & Exp_mask) <= P*Exp_msk1) { - word0(rv) += P*Exp_msk1; - adj *= ulp(dval(rv)); - if (dsign) - dval(rv) += adj; - else - dval(rv) -= adj; - word0(rv) -= P*Exp_msk1; - goto cont; - } -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - adj *= ulp(dval(rv)); - if (dsign) - dval(rv) += adj; - else - dval(rv) -= adj; - goto cont; - } -#endif /*Honor_FLT_ROUNDS*/ - - if (i < 0) { - /* Error is less than half an ulp -- check for - * special case of mantissa a power of two. - */ - if (dsign || word1(rv) || word0(rv) & Bndry_mask -#ifdef IEEE_Arith -#ifdef Avoid_Underflow - || (word0(rv) & Exp_mask) <= (2*P+1)*Exp_msk1 -#else - || (word0(rv) & Exp_mask) <= Exp_msk1 -#endif -#endif - ) { -#ifdef SET_INEXACT - if (!delta->x[0] && delta->wds <= 1) - inexact = 0; -#endif - break; - } - if (!delta->x[0] && delta->wds <= 1) { - /* exact result */ -#ifdef SET_INEXACT - inexact = 0; -#endif - break; - } - delta = lshift(delta,Log2P); - if (cmp(delta, bs) > 0) - goto drop_down; - break; - } - if (i == 0) { - /* exactly half-way between */ - if (dsign) { - if ((word0(rv) & Bndry_mask1) == Bndry_mask1 - && word1(rv) == ( -#ifdef Avoid_Underflow - (scale && (y = word0(rv) & Exp_mask) <= 2*P*Exp_msk1) - ? (0xffffffff & (0xffffffff << (2*P+1-(y>>Exp_shift)))) : -#endif - 0xffffffff)) { - /*boundary case -- increment exponent*/ - word0(rv) = (word0(rv) & Exp_mask) - + Exp_msk1 -#ifdef IBM - | Exp_msk1 >> 4 -#endif - ; - word1(rv) = 0; -#ifdef Avoid_Underflow - dsign = 0; -#endif - break; - } - } - else if (!(word0(rv) & Bndry_mask) && !word1(rv)) { -drop_down: - /* boundary case -- decrement exponent */ -#ifdef Sudden_Underflow /*{{*/ - L = word0(rv) & Exp_mask; -#ifdef IBM - if (L < Exp_msk1) -#else -#ifdef Avoid_Underflow - if (L <= (scale ? (2*P+1)*Exp_msk1 : Exp_msk1)) -#else - if (L <= Exp_msk1) -#endif /*Avoid_Underflow*/ -#endif /*IBM*/ - goto undfl; - L -= Exp_msk1; -#else /*Sudden_Underflow}{*/ -#ifdef Avoid_Underflow - if (scale) { - L = word0(rv) & Exp_mask; - if (L <= (2*P+1)*Exp_msk1) { - if (L > (P+2)*Exp_msk1) - /* round even ==> */ - /* accept rv */ - break; - /* rv = smallest denormal */ - goto undfl; - } - } -#endif /*Avoid_Underflow*/ - L = (word0(rv) & Exp_mask) - Exp_msk1; -#endif /*Sudden_Underflow}}*/ - word0(rv) = L | Bndry_mask1; - word1(rv) = 0xffffffff; -#ifdef IBM - goto cont; -#else - break; -#endif - } -#ifndef ROUND_BIASED - if (!(word1(rv) & LSB)) - break; -#endif - if (dsign) - dval(rv) += ulp(dval(rv)); -#ifndef ROUND_BIASED - else { - dval(rv) -= ulp(dval(rv)); -#ifndef Sudden_Underflow - if (!dval(rv)) - goto undfl; -#endif - } -#ifdef Avoid_Underflow - dsign = 1 - dsign; -#endif -#endif - break; - } - if ((aadj = ratio(delta, bs)) <= 2.) { - if (dsign) - aadj = dval(aadj1) = 1.; - else if (word1(rv) || word0(rv) & Bndry_mask) { -#ifndef Sudden_Underflow - if (word1(rv) == Tiny1 && !word0(rv)) - goto undfl; -#endif - aadj = 1.; - dval(aadj1) = -1.; - } - else { - /* special case -- power of FLT_RADIX to be */ - /* rounded down... */ - - if (aadj < 2./FLT_RADIX) - aadj = 1./FLT_RADIX; - else - aadj *= 0.5; - dval(aadj1) = -aadj; - } - } - else { - aadj *= 0.5; - dval(aadj1) = dsign ? aadj : -aadj; -#ifdef Check_FLT_ROUNDS - switch (Rounding) { - case 2: /* towards +infinity */ - dval(aadj1) -= 0.5; - break; - case 0: /* towards 0 */ - case 3: /* towards -infinity */ - dval(aadj1) += 0.5; - } -#else - if (Flt_Rounds == 0) - dval(aadj1) += 0.5; -#endif /*Check_FLT_ROUNDS*/ - } - y = word0(rv) & Exp_mask; - - /* Check for overflow */ - - if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) { - dval(rv0) = dval(rv); - word0(rv) -= P*Exp_msk1; - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; - if ((word0(rv) & Exp_mask) >= - Exp_msk1*(DBL_MAX_EXP+Bias-P)) { - if (word0(rv0) == Big0 && word1(rv0) == Big1) - goto ovfl; - word0(rv) = Big0; - word1(rv) = Big1; - goto cont; - } - else - word0(rv) += P*Exp_msk1; - } - else { -#ifdef Avoid_Underflow - if (scale && y <= 2*P*Exp_msk1) { - if (aadj <= 0x7fffffff) { - if ((z = (int)aadj) <= 0) - z = 1; - aadj = z; - dval(aadj1) = dsign ? aadj : -aadj; - } - word0(aadj1) += (2*P+1)*Exp_msk1 - y; - } - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; -#else -#ifdef Sudden_Underflow - if ((word0(rv) & Exp_mask) <= P*Exp_msk1) { - dval(rv0) = dval(rv); - word0(rv) += P*Exp_msk1; - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; -#ifdef IBM - if ((word0(rv) & Exp_mask) < P*Exp_msk1) -#else - if ((word0(rv) & Exp_mask) <= P*Exp_msk1) -#endif - { - if (word0(rv0) == Tiny0 && word1(rv0) == Tiny1) - goto undfl; - word0(rv) = Tiny0; - word1(rv) = Tiny1; - goto cont; - } - else - word0(rv) -= P*Exp_msk1; - } - else { - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; - } -#else /*Sudden_Underflow*/ - /* Compute adj so that the IEEE rounding rules will - * correctly round rv + adj in some half-way cases. - * If rv * ulp(rv) is denormalized (i.e., - * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid - * trouble from bits lost to denormalization; - * example: 1.2e-307 . - */ - if (y <= (P-1)*Exp_msk1 && aadj > 1.) { - dval(aadj1) = (double)(int)(aadj + 0.5); - if (!dsign) - dval(aadj1) = -dval(aadj1); - } - adj = dval(aadj1) * ulp(dval(rv)); - dval(rv) += adj; -#endif /*Sudden_Underflow*/ -#endif /*Avoid_Underflow*/ - } - z = word0(rv) & Exp_mask; -#ifndef SET_INEXACT -#ifdef Avoid_Underflow - if (!scale) -#endif - if (y == z) { - /* Can we stop now? */ - L = (Long)aadj; - aadj -= L; - /* The tolerances below are conservative. */ - if (dsign || word1(rv) || word0(rv) & Bndry_mask) { - if (aadj < .4999999 || aadj > .5000001) - break; - } - else if (aadj < .4999999/FLT_RADIX) - break; - } -#endif -cont: - Bfree(bb); - Bfree(bd); - Bfree(bs); - Bfree(delta); - } -#ifdef SET_INEXACT - if (inexact) { - if (!oldinexact) { - word0(rv0) = Exp_1 + (70 << Exp_shift); - word1(rv0) = 0; - dval(rv0) += 1.; - } - } - else if (!oldinexact) - clear_inexact(); -#endif -#ifdef Avoid_Underflow - if (scale) { - word0(rv0) = Exp_1 - 2*P*Exp_msk1; - word1(rv0) = 0; - dval(rv) *= dval(rv0); -#ifndef NO_ERRNO - /* try to avoid the bug of testing an 8087 register value */ - if (word0(rv) == 0 && word1(rv) == 0) - errno = ERANGE; -#endif - } -#endif /* Avoid_Underflow */ -#ifdef SET_INEXACT - if (inexact && !(word0(rv) & Exp_mask)) { - /* set underflow bit */ - dval(rv0) = 1e-300; - dval(rv0) *= dval(rv0); - } -#endif -retfree: - Bfree(bb); - Bfree(bd); - Bfree(bs); - Bfree(bd0); - Bfree(delta); -ret: - if (se) - *se = (char *)s; - return sign ? -dval(rv) : dval(rv); -} - -NO_SANITIZE("unsigned-integer-overflow", static int quorem(Bigint *b, Bigint *S)); -static int -quorem(Bigint *b, Bigint *S) -{ - int n; - ULong *bx, *bxe, q, *sx, *sxe; -#ifdef ULLong - ULLong borrow, carry, y, ys; -#else - ULong borrow, carry, y, ys; -#ifdef Pack_32 - ULong si, z, zs; -#endif -#endif - - n = S->wds; -#ifdef DEBUG - /*debug*/ if (b->wds > n) - /*debug*/ Bug("oversize b in quorem"); -#endif - if (b->wds < n) - return 0; - sx = S->x; - sxe = sx + --n; - bx = b->x; - bxe = bx + n; - q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ -#ifdef DEBUG - /*debug*/ if (q > 9) - /*debug*/ Bug("oversized quotient in quorem"); -#endif - if (q) { - borrow = 0; - carry = 0; - do { -#ifdef ULLong - ys = *sx++ * (ULLong)q + carry; - carry = ys >> 32; - y = *bx - (ys & FFFFFFFF) - borrow; - borrow = y >> 32 & (ULong)1; - *bx++ = (ULong)(y & FFFFFFFF); -#else -#ifdef Pack_32 - si = *sx++; - ys = (si & 0xffff) * q + carry; - zs = (si >> 16) * q + (ys >> 16); - carry = zs >> 16; - y = (*bx & 0xffff) - (ys & 0xffff) - borrow; - borrow = (y & 0x10000) >> 16; - z = (*bx >> 16) - (zs & 0xffff) - borrow; - borrow = (z & 0x10000) >> 16; - Storeinc(bx, z, y); -#else - ys = *sx++ * q + carry; - carry = ys >> 16; - y = *bx - (ys & 0xffff) - borrow; - borrow = (y & 0x10000) >> 16; - *bx++ = y & 0xffff; -#endif -#endif - } while (sx <= sxe); - if (!*bxe) { - bx = b->x; - while (--bxe > bx && !*bxe) - --n; - b->wds = n; - } - } - if (cmp(b, S) >= 0) { - q++; - borrow = 0; - carry = 0; - bx = b->x; - sx = S->x; - do { -#ifdef ULLong - ys = *sx++ + carry; - carry = ys >> 32; - y = *bx - (ys & FFFFFFFF) - borrow; - borrow = y >> 32 & (ULong)1; - *bx++ = (ULong)(y & FFFFFFFF); -#else -#ifdef Pack_32 - si = *sx++; - ys = (si & 0xffff) + carry; - zs = (si >> 16) + (ys >> 16); - carry = zs >> 16; - y = (*bx & 0xffff) - (ys & 0xffff) - borrow; - borrow = (y & 0x10000) >> 16; - z = (*bx >> 16) - (zs & 0xffff) - borrow; - borrow = (z & 0x10000) >> 16; - Storeinc(bx, z, y); -#else - ys = *sx++ + carry; - carry = ys >> 16; - y = *bx - (ys & 0xffff) - borrow; - borrow = (y & 0x10000) >> 16; - *bx++ = y & 0xffff; -#endif -#endif - } while (sx <= sxe); - bx = b->x; - bxe = bx + n; - if (!*bxe) { - while (--bxe > bx && !*bxe) - --n; - b->wds = n; - } - } - return q; -} - -#ifndef MULTIPLE_THREADS -static char *dtoa_result; -#endif - -#ifndef MULTIPLE_THREADS -static char * -rv_alloc(int i) -{ - return dtoa_result = MALLOC(i); -} -#else -#define rv_alloc(i) MALLOC(i) -#endif - -static char * -nrv_alloc(const char *s, char **rve, size_t n) -{ - char *rv, *t; - - t = rv = rv_alloc(n); - while ((*t = *s++) != 0) t++; - if (rve) - *rve = t; - return rv; -} - -#define rv_strdup(s, rve) nrv_alloc((s), (rve), strlen(s)+1) - -#ifndef MULTIPLE_THREADS -/* freedtoa(s) must be used to free values s returned by dtoa - * when MULTIPLE_THREADS is #defined. It should be used in all cases, - * but for consistency with earlier versions of dtoa, it is optional - * when MULTIPLE_THREADS is not defined. - */ - -static void -freedtoa(char *s) -{ - FREE(s); -} -#endif - -static const char INFSTR[] = "Infinity"; -static const char NANSTR[] = "NaN"; -static const char ZEROSTR[] = "0"; - -/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string. - * - * Inspired by "How to Print Floating-Point Numbers Accurately" by - * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 112-126]. - * - * Modifications: - * 1. Rather than iterating, we use a simple numeric overestimate - * to determine k = floor(log10(d)). We scale relevant - * quantities using O(log2(k)) rather than O(k) multiplications. - * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't - * try to generate digits strictly left to right. Instead, we - * compute with fewer bits and propagate the carry if necessary - * when rounding the final digit up. This is often faster. - * 3. Under the assumption that input will be rounded nearest, - * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22. - * That is, we allow equality in stopping tests when the - * round-nearest rule will give the same floating-point value - * as would satisfaction of the stopping test with strict - * inequality. - * 4. We remove common factors of powers of 2 from relevant - * quantities. - * 5. When converting floating-point integers less than 1e16, - * we use floating-point arithmetic rather than resorting - * to multiple-precision integers. - * 6. When asked to produce fewer than 15 digits, we first try - * to get by with floating-point arithmetic; we resort to - * multiple-precision integer arithmetic only if we cannot - * guarantee that the floating-point calculation has given - * the correctly rounded result. For k requested digits and - * "uniformly" distributed input, the probability is - * something like 10^(k-15) that we must resort to the Long - * calculation. - */ - -char * -dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve) -{ - /* Arguments ndigits, decpt, sign are similar to those - of ecvt and fcvt; trailing zeros are suppressed from - the returned string. If not null, *rve is set to point - to the end of the return value. If d is +-Infinity or NaN, - then *decpt is set to 9999. - - mode: - 0 ==> shortest string that yields d when read in - and rounded to nearest. - 1 ==> like 0, but with Steele & White stopping rule; - e.g. with IEEE P754 arithmetic , mode 0 gives - 1e23 whereas mode 1 gives 9.999999999999999e22. - 2 ==> max(1,ndigits) significant digits. This gives a - return value similar to that of ecvt, except - that trailing zeros are suppressed. - 3 ==> through ndigits past the decimal point. This - gives a return value similar to that from fcvt, - except that trailing zeros are suppressed, and - ndigits can be negative. - 4,5 ==> similar to 2 and 3, respectively, but (in - round-nearest mode) with the tests of mode 0 to - possibly return a shorter string that rounds to d. - With IEEE arithmetic and compilation with - -DHonor_FLT_ROUNDS, modes 4 and 5 behave the same - as modes 2 and 3 when FLT_ROUNDS != 1. - 6-9 ==> Debugging modes similar to mode - 4: don't try - fast floating-point estimate (if applicable). - - Values of mode other than 0-9 are treated as mode 0. - - Sufficient space is allocated to the return value - to hold the suppressed trailing zeros. - */ - - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, - j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, - spec_case, try_quick, half = 0; - Long L; -#ifndef Sudden_Underflow - int denorm; - ULong x; -#endif - Bigint *b, *b1, *delta, *mlo = 0, *mhi = 0, *S; - double ds; - double_u d, d2, eps; - char *s, *s0; -#ifdef Honor_FLT_ROUNDS - int rounding; -#endif -#ifdef SET_INEXACT - int inexact, oldinexact; -#endif - - dval(d) = d_; - -#ifndef MULTIPLE_THREADS - if (dtoa_result) { - freedtoa(dtoa_result); - dtoa_result = 0; - } -#endif - - if (word0(d) & Sign_bit) { - /* set sign for everything, including 0's and NaNs */ - *sign = 1; - word0(d) &= ~Sign_bit; /* clear sign bit */ - } - else - *sign = 0; - -#if defined(IEEE_Arith) + defined(VAX) -#ifdef IEEE_Arith - if ((word0(d) & Exp_mask) == Exp_mask) -#else - if (word0(d) == 0x8000) -#endif - { - /* Infinity or NaN */ - *decpt = 9999; -#ifdef IEEE_Arith - if (!word1(d) && !(word0(d) & 0xfffff)) - return rv_strdup(INFSTR, rve); -#endif - return rv_strdup(NANSTR, rve); - } -#endif -#ifdef IBM - dval(d) += 0; /* normalize */ -#endif - if (!dval(d)) { - *decpt = 1; - return rv_strdup(ZEROSTR, rve); - } - -#ifdef SET_INEXACT - try_quick = oldinexact = get_inexact(); - inexact = 1; -#endif -#ifdef Honor_FLT_ROUNDS - if ((rounding = Flt_Rounds) >= 2) { - if (*sign) - rounding = rounding == 2 ? 0 : 2; - else - if (rounding != 2) - rounding = 0; - } -#endif - - b = d2b(dval(d), &be, &bbits); -#ifdef Sudden_Underflow - i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)); -#else - if ((i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) != 0) { -#endif - dval(d2) = dval(d); - word0(d2) &= Frac_mask1; - word0(d2) |= Exp_11; -#ifdef IBM - if (j = 11 - hi0bits(word0(d2) & Frac_mask)) - dval(d2) /= 1 << j; -#endif - - /* log(x) ~=~ log(1.5) + (x-1.5)/1.5 - * log10(x) = log(x) / log(10) - * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10)) - * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2) - * - * This suggests computing an approximation k to log10(d) by - * - * k = (i - Bias)*0.301029995663981 - * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 ); - * - * We want k to be too large rather than too small. - * The error in the first-order Taylor series approximation - * is in our favor, so we just round up the constant enough - * to compensate for any error in the multiplication of - * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077, - * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14, - * adding 1e-13 to the constant term more than suffices. - * Hence we adjust the constant term to 0.1760912590558. - * (We could get a more accurate k by invoking log10, - * but this is probably not worthwhile.) - */ - - i -= Bias; -#ifdef IBM - i <<= 2; - i += j; -#endif -#ifndef Sudden_Underflow - denorm = 0; - } - else { - /* d is denormalized */ - - i = bbits + be + (Bias + (P-1) - 1); - x = i > 32 ? word0(d) << (64 - i) | word1(d) >> (i - 32) - : word1(d) << (32 - i); - dval(d2) = x; - word0(d2) -= 31*Exp_msk1; /* adjust exponent */ - i -= (Bias + (P-1) - 1) + 1; - denorm = 1; - } -#endif - ds = (dval(d2)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981; - k = (int)ds; - if (ds < 0. && ds != k) - k--; /* want k = floor(ds) */ - k_check = 1; - if (k >= 0 && k <= Ten_pmax) { - if (dval(d) < tens[k]) - k--; - k_check = 0; - } - j = bbits - i - 1; - if (j >= 0) { - b2 = 0; - s2 = j; - } - else { - b2 = -j; - s2 = 0; - } - if (k >= 0) { - b5 = 0; - s5 = k; - s2 += k; - } - else { - b2 -= k; - b5 = -k; - s5 = 0; - } - if (mode < 0 || mode > 9) - mode = 0; - -#ifndef SET_INEXACT -#ifdef Check_FLT_ROUNDS - try_quick = Rounding == 1; -#else - try_quick = 1; -#endif -#endif /*SET_INEXACT*/ - - if (mode > 5) { - mode -= 4; - try_quick = 0; - } - leftright = 1; - ilim = ilim1 = -1; - switch (mode) { - case 0: - case 1: - i = 18; - ndigits = 0; - break; - case 2: - leftright = 0; - /* no break */ - case 4: - if (ndigits <= 0) - ndigits = 1; - ilim = ilim1 = i = ndigits; - break; - case 3: - leftright = 0; - /* no break */ - case 5: - i = ndigits + k + 1; - ilim = i; - ilim1 = i - 1; - if (i <= 0) - i = 1; - } - s = s0 = rv_alloc(i+1); - -#ifdef Honor_FLT_ROUNDS - if (mode > 1 && rounding != 1) - leftright = 0; -#endif - - if (ilim >= 0 && ilim <= Quick_max && try_quick) { - - /* Try to get by with floating-point arithmetic. */ - - i = 0; - dval(d2) = dval(d); - k0 = k; - ilim0 = ilim; - ieps = 2; /* conservative */ - if (k > 0) { - ds = tens[k&0xf]; - j = k >> 4; - if (j & Bletch) { - /* prevent overflows */ - j &= Bletch - 1; - dval(d) /= bigtens[n_bigtens-1]; - ieps++; - } - for (; j; j >>= 1, i++) - if (j & 1) { - ieps++; - ds *= bigtens[i]; - } - dval(d) /= ds; - } - else if ((j1 = -k) != 0) { - dval(d) *= tens[j1 & 0xf]; - for (j = j1 >> 4; j; j >>= 1, i++) - if (j & 1) { - ieps++; - dval(d) *= bigtens[i]; - } - } - if (k_check && dval(d) < 1. && ilim > 0) { - if (ilim1 <= 0) - goto fast_failed; - ilim = ilim1; - k--; - dval(d) *= 10.; - ieps++; - } - dval(eps) = ieps*dval(d) + 7.; - word0(eps) -= (P-1)*Exp_msk1; - if (ilim == 0) { - S = mhi = 0; - dval(d) -= 5.; - if (dval(d) > dval(eps)) - goto one_digit; - if (dval(d) < -dval(eps)) - goto no_digits; - goto fast_failed; - } -#ifndef No_leftright - if (leftright) { - /* Use Steele & White method of only - * generating digits needed. - */ - dval(eps) = 0.5/tens[ilim-1] - dval(eps); - for (i = 0;;) { - L = (int)dval(d); - dval(d) -= L; - *s++ = '0' + (int)L; - if (dval(d) < dval(eps)) - goto ret1; - if (1. - dval(d) < dval(eps)) - goto bump_up; - if (++i >= ilim) - break; - dval(eps) *= 10.; - dval(d) *= 10.; - } - } - else { -#endif - /* Generate ilim digits, then fix them up. */ - dval(eps) *= tens[ilim-1]; - for (i = 1;; i++, dval(d) *= 10.) { - L = (Long)(dval(d)); - if (!(dval(d) -= L)) - ilim = i; - *s++ = '0' + (int)L; - if (i == ilim) { - if (dval(d) > 0.5 + dval(eps)) - goto bump_up; - else if (dval(d) < 0.5 - dval(eps)) { - while (*--s == '0') ; - s++; - goto ret1; - } - half = 1; - if ((*(s-1) - '0') & 1) { - goto bump_up; - } - break; - } - } -#ifndef No_leftright - } -#endif -fast_failed: - s = s0; - dval(d) = dval(d2); - k = k0; - ilim = ilim0; - } - - /* Do we have a "small" integer? */ - - if (be >= 0 && k <= Int_max) { - /* Yes. */ - ds = tens[k]; - if (ndigits < 0 && ilim <= 0) { - S = mhi = 0; - if (ilim < 0 || dval(d) <= 5*ds) - goto no_digits; - goto one_digit; - } - for (i = 1;; i++, dval(d) *= 10.) { - L = (Long)(dval(d) / ds); - dval(d) -= L*ds; -#ifdef Check_FLT_ROUNDS - /* If FLT_ROUNDS == 2, L will usually be high by 1 */ - if (dval(d) < 0) { - L--; - dval(d) += ds; - } -#endif - *s++ = '0' + (int)L; - if (!dval(d)) { -#ifdef SET_INEXACT - inexact = 0; -#endif - break; - } - if (i == ilim) { -#ifdef Honor_FLT_ROUNDS - if (mode > 1) - switch (rounding) { - case 0: goto ret1; - case 2: goto bump_up; - } -#endif - dval(d) += dval(d); - if (dval(d) > ds || (dval(d) == ds && (L & 1))) { -bump_up: - while (*--s == '9') - if (s == s0) { - k++; - *s = '0'; - break; - } - ++*s++; - } - break; - } - } - goto ret1; - } - - m2 = b2; - m5 = b5; - if (leftright) { - i = -#ifndef Sudden_Underflow - denorm ? be + (Bias + (P-1) - 1 + 1) : -#endif -#ifdef IBM - 1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3); -#else - 1 + P - bbits; -#endif - b2 += i; - s2 += i; - mhi = i2b(1); - } - if (m2 > 0 && s2 > 0) { - i = m2 < s2 ? m2 : s2; - b2 -= i; - m2 -= i; - s2 -= i; - } - if (b5 > 0) { - if (leftright) { - if (m5 > 0) { - mhi = pow5mult(mhi, m5); - b1 = mult(mhi, b); - Bfree(b); - b = b1; - } - if ((j = b5 - m5) != 0) - b = pow5mult(b, j); - } - else - b = pow5mult(b, b5); - } - S = i2b(1); - if (s5 > 0) - S = pow5mult(S, s5); - - /* Check for special case that d is a normalized power of 2. */ - - spec_case = 0; - if ((mode < 2 || leftright) -#ifdef Honor_FLT_ROUNDS - && rounding == 1 -#endif - ) { - if (!word1(d) && !(word0(d) & Bndry_mask) -#ifndef Sudden_Underflow - && word0(d) & (Exp_mask & ~Exp_msk1) -#endif - ) { - /* The special case */ - b2 += Log2P; - s2 += Log2P; - spec_case = 1; - } - } - - /* Arrange for convenient computation of quotients: - * shift left if necessary so divisor has 4 leading 0 bits. - * - * Perhaps we should just compute leading 28 bits of S once - * and for all and pass them and a shift to quorem, so it - * can do shifts and ors to compute the numerator for q. - */ -#ifdef Pack_32 - if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) != 0) - i = 32 - i; -#else - if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf) != 0) - i = 16 - i; -#endif - if (i > 4) { - i -= 4; - b2 += i; - m2 += i; - s2 += i; - } - else if (i < 4) { - i += 28; - b2 += i; - m2 += i; - s2 += i; - } - if (b2 > 0) - b = lshift(b, b2); - if (s2 > 0) - S = lshift(S, s2); - if (k_check) { - if (cmp(b,S) < 0) { - k--; - b = multadd(b, 10, 0); /* we botched the k estimate */ - if (leftright) - mhi = multadd(mhi, 10, 0); - ilim = ilim1; - } - } - if (ilim <= 0 && (mode == 3 || mode == 5)) { - if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) { - /* no digits, fcvt style */ -no_digits: - k = -1 - ndigits; - goto ret; - } -one_digit: - *s++ = '1'; - k++; - goto ret; - } - if (leftright) { - if (m2 > 0) - mhi = lshift(mhi, m2); - - /* Compute mlo -- check for special case - * that d is a normalized power of 2. - */ - - mlo = mhi; - if (spec_case) { - mhi = Balloc(mhi->k); - Bcopy(mhi, mlo); - mhi = lshift(mhi, Log2P); - } - - for (i = 1;;i++) { - dig = quorem(b,S) + '0'; - /* Do we yet have the shortest decimal string - * that will round to d? - */ - j = cmp(b, mlo); - delta = diff(S, mhi); - j1 = delta->sign ? 1 : cmp(b, delta); - Bfree(delta); -#ifndef ROUND_BIASED - if (j1 == 0 && mode != 1 && !(word1(d) & 1) -#ifdef Honor_FLT_ROUNDS - && rounding >= 1 -#endif - ) { - if (dig == '9') - goto round_9_up; - if (j > 0) - dig++; -#ifdef SET_INEXACT - else if (!b->x[0] && b->wds <= 1) - inexact = 0; -#endif - *s++ = dig; - goto ret; - } -#endif - if (j < 0 || (j == 0 && mode != 1 -#ifndef ROUND_BIASED - && !(word1(d) & 1) -#endif - )) { - if (!b->x[0] && b->wds <= 1) { -#ifdef SET_INEXACT - inexact = 0; -#endif - goto accept_dig; - } -#ifdef Honor_FLT_ROUNDS - if (mode > 1) - switch (rounding) { - case 0: goto accept_dig; - case 2: goto keep_dig; - } -#endif /*Honor_FLT_ROUNDS*/ - if (j1 > 0) { - b = lshift(b, 1); - j1 = cmp(b, S); - if ((j1 > 0 || (j1 == 0 && (dig & 1))) && dig++ == '9') - goto round_9_up; - } -accept_dig: - *s++ = dig; - goto ret; - } - if (j1 > 0) { -#ifdef Honor_FLT_ROUNDS - if (!rounding) - goto accept_dig; -#endif - if (dig == '9') { /* possible if i == 1 */ -round_9_up: - *s++ = '9'; - goto roundoff; - } - *s++ = dig + 1; - goto ret; - } -#ifdef Honor_FLT_ROUNDS -keep_dig: -#endif - *s++ = dig; - if (i == ilim) - break; - b = multadd(b, 10, 0); - if (mlo == mhi) - mlo = mhi = multadd(mhi, 10, 0); - else { - mlo = multadd(mlo, 10, 0); - mhi = multadd(mhi, 10, 0); - } - } - } - else - for (i = 1;; i++) { - *s++ = dig = quorem(b,S) + '0'; - if (!b->x[0] && b->wds <= 1) { -#ifdef SET_INEXACT - inexact = 0; -#endif - goto ret; - } - if (i >= ilim) - break; - b = multadd(b, 10, 0); - } - - /* Round off last digit */ - -#ifdef Honor_FLT_ROUNDS - switch (rounding) { - case 0: goto trimzeros; - case 2: goto roundoff; - } -#endif - b = lshift(b, 1); - j = cmp(b, S); - if (j > 0 || (j == 0 && (dig & 1))) { - roundoff: - while (*--s == '9') - if (s == s0) { - k++; - *s++ = '1'; - goto ret; - } - if (!half || (*s - '0') & 1) - ++*s; - } - else { - while (*--s == '0') ; - } - s++; -ret: - Bfree(S); - if (mhi) { - if (mlo && mlo != mhi) - Bfree(mlo); - Bfree(mhi); - } -ret1: -#ifdef SET_INEXACT - if (inexact) { - if (!oldinexact) { - word0(d) = Exp_1 + (70 << Exp_shift); - word1(d) = 0; - dval(d) += 1.; - } - } - else if (!oldinexact) - clear_inexact(); -#endif - Bfree(b); - *s = 0; - *decpt = k + 1; - if (rve) - *rve = s; - return s0; -} - -/*- - * Copyright (c) 2004-2008 David Schultz - * 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 AUTHOR 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 AUTHOR 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. - */ - -#define DBL_MANH_SIZE 20 -#define DBL_MANL_SIZE 32 -#define DBL_ADJ (DBL_MAX_EXP - 2) -#define SIGFIGS ((DBL_MANT_DIG + 3) / 4 + 1) -#define dexp_get(u) ((int)(word0(u) >> Exp_shift) & ~Exp_msk1) -#define dexp_set(u,v) (word0(u) = (((int)(word0(u)) & ~Exp_mask) | ((v) << Exp_shift))) -#define dmanh_get(u) ((uint32_t)(word0(u) & Frac_mask)) -#define dmanl_get(u) ((uint32_t)word1(u)) - - -/* - * This procedure converts a double-precision number in IEEE format - * into a string of hexadecimal digits and an exponent of 2. Its - * behavior is bug-for-bug compatible with dtoa() in mode 2, with the - * following exceptions: - * - * - An ndigits < 0 causes it to use as many digits as necessary to - * represent the number exactly. - * - The additional xdigs argument should point to either the string - * "0123456789ABCDEF" or the string "0123456789abcdef", depending on - * which case is desired. - * - This routine does not repeat dtoa's mistake of setting decpt - * to 9999 in the case of an infinity or NaN. INT_MAX is used - * for this purpose instead. - * - * Note that the C99 standard does not specify what the leading digit - * should be for non-zero numbers. For instance, 0x1.3p3 is the same - * as 0x2.6p2 is the same as 0x4.cp3. This implementation always makes - * the leading digit a 1. This ensures that the exponent printed is the - * actual base-2 exponent, i.e., ilogb(d). - * - * Inputs: d, xdigs, ndigits - * Outputs: decpt, sign, rve - */ -char * -hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve) -{ - U u; - char *s, *s0; - int bufsize; - uint32_t manh, manl; - - u.d = d; - if (word0(u) & Sign_bit) { - /* set sign for everything, including 0's and NaNs */ - *sign = 1; - word0(u) &= ~Sign_bit; /* clear sign bit */ - } - else - *sign = 0; - - if (isinf(d)) { /* FP_INFINITE */ - *decpt = INT_MAX; - return rv_strdup(INFSTR, rve); - } - else if (isnan(d)) { /* FP_NAN */ - *decpt = INT_MAX; - return rv_strdup(NANSTR, rve); - } - else if (d == 0.0) { /* FP_ZERO */ - *decpt = 1; - return rv_strdup(ZEROSTR, rve); - } - else if (dexp_get(u)) { /* FP_NORMAL */ - *decpt = dexp_get(u) - DBL_ADJ; - } - else { /* FP_SUBNORMAL */ - u.d *= 5.363123171977039e+154 /* 0x1p514 */; - *decpt = dexp_get(u) - (514 + DBL_ADJ); - } - - if (ndigits == 0) /* dtoa() compatibility */ - ndigits = 1; - - /* - * If ndigits < 0, we are expected to auto-size, so we allocate - * enough space for all the digits. - */ - bufsize = (ndigits > 0) ? ndigits : SIGFIGS; - s0 = rv_alloc(bufsize+1); - - /* Round to the desired number of digits. */ - if (SIGFIGS > ndigits && ndigits > 0) { - float redux = 1.0f; - int offset = 4 * ndigits + DBL_MAX_EXP - 4 - DBL_MANT_DIG; - dexp_set(u, offset); - u.d += redux; - u.d -= redux; - *decpt += dexp_get(u) - offset; - } - - manh = dmanh_get(u); - manl = dmanl_get(u); - *s0 = '1'; - for (s = s0 + 1; s < s0 + bufsize; s++) { - *s = xdigs[(manh >> (DBL_MANH_SIZE - 4)) & 0xf]; - manh = (manh << 4) | (manl >> (DBL_MANL_SIZE - 4)); - manl <<= 4; - } - - /* If ndigits < 0, we are expected to auto-size the precision. */ - if (ndigits < 0) { - for (ndigits = SIGFIGS; s0[ndigits - 1] == '0'; ndigits--) - ; - } - - s = s0 + ndigits; - *s = '\0'; - if (rve != NULL) - *rve = s; - return (s0); -} - -#ifdef __cplusplus -#if 0 -{ /* satisfy cc-mode */ -#endif -} -#endif diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/static_assert.h b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/static_assert.h deleted file mode 100644 index 9295729b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/ext/bigdecimal/static_assert.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef BIGDECIMAL_STATIC_ASSERT_H -#define BIGDECIMAL_STATIC_ASSERT_H - -#include "feature.h" - -#ifdef HAVE_RUBY_INTERNAL_STATIC_ASSERT_H -# include -#endif - -#ifdef RBIMPL_STATIC_ASSERT -# define STATIC_ASSERT RBIMPL_STATIC_ASSERT -#endif - -#ifndef STATIC_ASSERT -# /* The following section is copied from CRuby's static_assert.h */ - -# if defined(__cplusplus) && defined(__cpp_static_assert) -# /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */ -# define BIGDECIMAL_STATIC_ASSERT0 static_assert - -# elif defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER >= 1600 -# define BIGDECIMAL_STATIC_ASSERT0 static_assert - -# elif defined(__INTEL_CXX11_MODE__) -# define BIGDECIMAL_STATIC_ASSERT0 static_assert - -# elif defined(__cplusplus) && __cplusplus >= 201103L -# define BIGDECIMAL_STATIC_ASSERT0 static_assert - -# elif defined(__cplusplus) && __has_extension(cxx_static_assert) -# define BIGDECIMAL_STATIC_ASSERT0 __extension__ static_assert - -# elif defined(__STDC_VERSION__) && __has_extension(c_static_assert) -# define BIGDECIMAL_STATIC_ASSERT0 __extension__ _Static_assert - -# elif defined(__STDC_VERSION__) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -# define BIGDECIMAL_STATIC_ASSERT0 __extension__ _Static_assert -#endif - -# if defined(__DOXYGEN__) -# define STATIC_ASSERT static_assert - -# elif defined(BIGDECIMAL_STATIC_ASSERT0) -# define STATIC_ASSERT(name, expr) \ - BIGDECIMAL_STATIC_ASSERT0(expr, #name ": " #expr) - -# else -# define STATIC_ASSERT(name, expr) \ - typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)] -# endif -#endif /* STATIC_ASSERT */ - - -#endif /* BIGDECIMAL_STATIC_ASSERT_H */ diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal.rb deleted file mode 100644 index 82b3e1b7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal.rb +++ /dev/null @@ -1,5 +0,0 @@ -if RUBY_ENGINE == 'jruby' - JRuby::Util.load_ext("org.jruby.ext.bigdecimal.BigDecimalLibrary") -else - require 'bigdecimal.so' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal.so b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal.so deleted file mode 100644 index 9198af48..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/jacobian.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/jacobian.rb deleted file mode 100644 index 4448024c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/jacobian.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: false - -require 'bigdecimal' - -# require 'bigdecimal/jacobian' -# -# Provides methods to compute the Jacobian matrix of a set of equations at a -# point x. In the methods below: -# -# f is an Object which is used to compute the Jacobian matrix of the equations. -# It must provide the following methods: -# -# f.values(x):: returns the values of all functions at x -# -# f.zero:: returns 0.0 -# f.one:: returns 1.0 -# f.two:: returns 2.0 -# f.ten:: returns 10.0 -# -# f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal. -# -# x is the point at which to compute the Jacobian. -# -# fx is f.values(x). -# -module Jacobian - module_function - - # Determines the equality of two numbers by comparing to zero, or using the epsilon value - def isEqual(a,b,zero=0.0,e=1.0e-8) - aa = a.abs - bb = b.abs - if aa == zero && bb == zero then - true - else - if ((a-b)/(aa+bb)).abs < e then - true - else - false - end - end - end - - - # Computes the derivative of +f[i]+ at +x[i]+. - # +fx+ is the value of +f+ at +x+. - def dfdxi(f,fx,x,i) - nRetry = 0 - n = x.size - xSave = x[i] - ok = 0 - ratio = f.ten*f.ten*f.ten - dx = x[i].abs/ratio - dx = fx[i].abs/ratio if isEqual(dx,f.zero,f.zero,f.eps) - dx = f.one/f.ten if isEqual(dx,f.zero,f.zero,f.eps) - until ok>0 do - deriv = [] - nRetry += 1 - if nRetry > 100 - raise "Singular Jacobian matrix. No change at x[" + i.to_s + "]" - end - dx = dx*f.two - x[i] += dx - fxNew = f.values(x) - for j in 0...n do - if !isEqual(fxNew[j],fx[j],f.zero,f.eps) then - ok += 1 - deriv <<= (fxNew[j]-fx[j])/dx - else - deriv <<= f.zero - end - end - x[i] = xSave - end - deriv - end - - # Computes the Jacobian of +f+ at +x+. +fx+ is the value of +f+ at +x+. - def jacobian(f,fx,x) - n = x.size - dfdx = Array.new(n*n) - for i in 0...n do - df = dfdxi(f,fx,x,i) - for j in 0...n do - dfdx[j*n+i] = df[j] - end - end - dfdx - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/ludcmp.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/ludcmp.rb deleted file mode 100644 index dd265e48..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/ludcmp.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: false -require 'bigdecimal' - -# -# Solves a*x = b for x, using LU decomposition. -# -module LUSolve - module_function - - # Performs LU decomposition of the n by n matrix a. - def ludecomp(a,n,zero=0,one=1) - prec = BigDecimal.limit(nil) - ps = [] - scales = [] - for i in 0...n do # pick up largest(abs. val.) element in each row. - ps <<= i - nrmrow = zero - ixn = i*n - for j in 0...n do - biggst = a[ixn+j].abs - nrmrow = biggst if biggst>nrmrow - end - if nrmrow>zero then - scales <<= one.div(nrmrow,prec) - else - raise "Singular matrix" - end - end - n1 = n - 1 - for k in 0...n1 do # Gaussian elimination with partial pivoting. - biggst = zero; - for i in k...n do - size = a[ps[i]*n+k].abs*scales[ps[i]] - if size>biggst then - biggst = size - pividx = i - end - end - raise "Singular matrix" if biggst<=zero - if pividx!=k then - j = ps[k] - ps[k] = ps[pividx] - ps[pividx] = j - end - pivot = a[ps[k]*n+k] - for i in (k+1)...n do - psin = ps[i]*n - a[psin+k] = mult = a[psin+k].div(pivot,prec) - if mult!=zero then - pskn = ps[k]*n - for j in (k+1)...n do - a[psin+j] -= mult.mult(a[pskn+j],prec) - end - end - end - end - raise "Singular matrix" if a[ps[n1]*n+n1] == zero - ps - end - - # Solves a*x = b for x, using LU decomposition. - # - # a is a matrix, b is a constant vector, x is the solution vector. - # - # ps is the pivot, a vector which indicates the permutation of rows performed - # during LU decomposition. - def lusolve(a,b,ps,zero=0.0) - prec = BigDecimal.limit(nil) - n = ps.size - x = [] - for i in 0...n do - dot = zero - psin = ps[i]*n - for j in 0...i do - dot = a[psin+j].mult(x[j],prec) + dot - end - x <<= b[ps[i]] - dot - end - (n-1).downto(0) do |i| - dot = zero - psin = ps[i]*n - for j in (i+1)...n do - dot = a[psin+j].mult(x[j],prec) + dot - end - x[i] = (x[i]-dot).div(a[psin+i],prec) - end - x - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/math.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/math.rb deleted file mode 100644 index 3ab84d84..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/math.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: false -require 'bigdecimal' - -# -#-- -# Contents: -# sqrt(x, prec) -# sin (x, prec) -# cos (x, prec) -# atan(x, prec) -# PI (prec) -# E (prec) == exp(1.0,prec) -# -# where: -# x ... BigDecimal number to be computed. -# prec ... Number of digits to be obtained. -#++ -# -# Provides mathematical functions. -# -# Example: -# -# require "bigdecimal/math" -# -# include BigMath -# -# a = BigDecimal((PI(100)/2).to_s) -# puts sin(a,100) # => 0.99999999999999999999......e0 -# -module BigMath - module_function - - # call-seq: - # sqrt(decimal, numeric) -> BigDecimal - # - # Computes the square root of +decimal+ to the specified number of digits of - # precision, +numeric+. - # - # BigMath.sqrt(BigDecimal('2'), 16).to_s - # #=> "0.1414213562373095048801688724e1" - # - def sqrt(x, prec) - x.sqrt(prec) - end - - # call-seq: - # sin(decimal, numeric) -> BigDecimal - # - # Computes the sine of +decimal+ to the specified number of digits of - # precision, +numeric+. - # - # If +decimal+ is Infinity or NaN, returns NaN. - # - # BigMath.sin(BigMath.PI(5)/4, 5).to_s - # #=> "0.70710678118654752440082036563292800375e0" - # - def sin(x, prec) - raise ArgumentError, "Zero or negative precision for sin" if prec <= 0 - return BigDecimal("NaN") if x.infinite? || x.nan? - n = prec + BigDecimal.double_fig - one = BigDecimal("1") - two = BigDecimal("2") - x = -x if neg = x < 0 - if x > (twopi = two * BigMath.PI(prec)) - if x > 30 - x %= twopi - else - x -= twopi while x > twopi - end - end - x1 = x - x2 = x.mult(x,n) - sign = 1 - y = x - d = y - i = one - z = one - while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) - m = BigDecimal.double_fig if m < BigDecimal.double_fig - sign = -sign - x1 = x2.mult(x1,n) - i += two - z *= (i-one) * i - d = sign * x1.div(z,m) - y += d - end - neg ? -y : y - end - - # call-seq: - # cos(decimal, numeric) -> BigDecimal - # - # Computes the cosine of +decimal+ to the specified number of digits of - # precision, +numeric+. - # - # If +decimal+ is Infinity or NaN, returns NaN. - # - # BigMath.cos(BigMath.PI(4), 16).to_s - # #=> "-0.999999999999999999999999999999856613163740061349e0" - # - def cos(x, prec) - raise ArgumentError, "Zero or negative precision for cos" if prec <= 0 - return BigDecimal("NaN") if x.infinite? || x.nan? - n = prec + BigDecimal.double_fig - one = BigDecimal("1") - two = BigDecimal("2") - x = -x if x < 0 - if x > (twopi = two * BigMath.PI(prec)) - if x > 30 - x %= twopi - else - x -= twopi while x > twopi - end - end - x1 = one - x2 = x.mult(x,n) - sign = 1 - y = one - d = y - i = BigDecimal("0") - z = one - while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) - m = BigDecimal.double_fig if m < BigDecimal.double_fig - sign = -sign - x1 = x2.mult(x1,n) - i += two - z *= (i-one) * i - d = sign * x1.div(z,m) - y += d - end - y - end - - # call-seq: - # atan(decimal, numeric) -> BigDecimal - # - # Computes the arctangent of +decimal+ to the specified number of digits of - # precision, +numeric+. - # - # If +decimal+ is NaN, returns NaN. - # - # BigMath.atan(BigDecimal('-1'), 16).to_s - # #=> "-0.785398163397448309615660845819878471907514682065e0" - # - def atan(x, prec) - raise ArgumentError, "Zero or negative precision for atan" if prec <= 0 - return BigDecimal("NaN") if x.nan? - pi = PI(prec) - x = -x if neg = x < 0 - return pi.div(neg ? -2 : 2, prec) if x.infinite? - return pi / (neg ? -4 : 4) if x.round(prec) == 1 - x = BigDecimal("1").div(x, prec) if inv = x > 1 - x = (-1 + sqrt(1 + x**2, prec))/x if dbl = x > 0.5 - n = prec + BigDecimal.double_fig - y = x - d = y - t = x - r = BigDecimal("3") - x2 = x.mult(x,n) - while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) - m = BigDecimal.double_fig if m < BigDecimal.double_fig - t = -t.mult(x2,n) - d = t.div(r,m) - y += d - r += 2 - end - y *= 2 if dbl - y = pi / 2 - y if inv - y = -y if neg - y - end - - # call-seq: - # PI(numeric) -> BigDecimal - # - # Computes the value of pi to the specified number of digits of precision, - # +numeric+. - # - # BigMath.PI(10).to_s - # #=> "0.3141592653589793238462643388813853786957412e1" - # - def PI(prec) - raise ArgumentError, "Zero or negative precision for PI" if prec <= 0 - n = prec + BigDecimal.double_fig - zero = BigDecimal("0") - one = BigDecimal("1") - two = BigDecimal("2") - - m25 = BigDecimal("-0.04") - m57121 = BigDecimal("-57121") - - pi = zero - - d = one - k = one - t = BigDecimal("-80") - while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0) - m = BigDecimal.double_fig if m < BigDecimal.double_fig - t = t*m25 - d = t.div(k,m) - k = k+two - pi = pi + d - end - - d = one - k = one - t = BigDecimal("956") - while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0) - m = BigDecimal.double_fig if m < BigDecimal.double_fig - t = t.div(m57121,n) - d = t.div(k,m) - pi = pi + d - k = k+two - end - pi - end - - # call-seq: - # E(numeric) -> BigDecimal - # - # Computes e (the base of natural logarithms) to the specified number of - # digits of precision, +numeric+. - # - # BigMath.E(10).to_s - # #=> "0.271828182845904523536028752390026306410273e1" - # - def E(prec) - raise ArgumentError, "Zero or negative precision for E" if prec <= 0 - BigMath.exp(1, prec) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/newton.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/newton.rb deleted file mode 100644 index 85bacb7f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/newton.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: false -require "bigdecimal/ludcmp" -require "bigdecimal/jacobian" - -# -# newton.rb -# -# Solves the nonlinear algebraic equation system f = 0 by Newton's method. -# This program is not dependent on BigDecimal. -# -# To call: -# n = nlsolve(f,x) -# where n is the number of iterations required, -# x is the initial value vector -# f is an Object which is used to compute the values of the equations to be solved. -# It must provide the following methods: -# -# f.values(x):: returns the values of all functions at x -# -# f.zero:: returns 0.0 -# f.one:: returns 1.0 -# f.two:: returns 2.0 -# f.ten:: returns 10.0 -# -# f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal. -# -# On exit, x is the solution vector. -# -module Newton - include LUSolve - include Jacobian - module_function - - def norm(fv,zero=0.0) # :nodoc: - s = zero - n = fv.size - for i in 0...n do - s += fv[i]*fv[i] - end - s - end - - # See also Newton - def nlsolve(f,x) - nRetry = 0 - n = x.size - - f0 = f.values(x) - zero = f.zero - one = f.one - two = f.two - p5 = one/two - d = norm(f0,zero) - minfact = f.ten*f.ten*f.ten - minfact = one/minfact - e = f.eps - while d >= e do - nRetry += 1 - # Not yet converged. => Compute Jacobian matrix - dfdx = jacobian(f,f0,x) - # Solve dfdx*dx = -f0 to estimate dx - dx = lusolve(dfdx,f0,ludecomp(dfdx,n,zero,one),zero) - fact = two - xs = x.dup - begin - fact *= p5 - if fact < minfact then - raise "Failed to reduce function values." - end - for i in 0...n do - x[i] = xs[i] - dx[i]*fact - end - f0 = f.values(x) - dn = norm(f0,zero) - end while(dn>=d) - d = dn - end - nRetry - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/util.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/util.rb deleted file mode 100644 index cb514435..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/lib/bigdecimal/util.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: false -# -#-- -# bigdecimal/util extends various native classes to provide the #to_d method, -# and provides BigDecimal#to_d and BigDecimal#to_digits. -#++ - -require 'bigdecimal' - -class Integer < Numeric - # call-seq: - # int.to_d -> bigdecimal - # - # Returns the value of +int+ as a BigDecimal. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # 42.to_d # => 0.42e2 - # - # See also Kernel.BigDecimal. - # - def to_d - BigDecimal(self) - end -end - - -class Float < Numeric - # call-seq: - # float.to_d -> bigdecimal - # float.to_d(precision) -> bigdecimal - # - # Returns the value of +float+ as a BigDecimal. - # The +precision+ parameter is used to determine the number of - # significant digits for the result. When +precision+ is set to +0+, - # the number of digits to represent the float being converted is determined - # automatically. - # The default +precision+ is +0+. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # 0.5.to_d # => 0.5e0 - # 1.234.to_d # => 0.1234e1 - # 1.234.to_d(2) # => 0.12e1 - # - # See also Kernel.BigDecimal. - # - def to_d(precision=0) - BigDecimal(self, precision) - end -end - - -class String - # call-seq: - # str.to_d -> bigdecimal - # - # Returns the result of interpreting leading characters in +str+ - # as a BigDecimal. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # "0.5".to_d # => 0.5e0 - # "123.45e1".to_d # => 0.12345e4 - # "45.67 degrees".to_d # => 0.4567e2 - # - # See also Kernel.BigDecimal. - # - def to_d - BigDecimal.interpret_loosely(self) - end -end - - -class BigDecimal < Numeric - # call-seq: - # a.to_digits -> string - # - # Converts a BigDecimal to a String of the form "nnnnnn.mmm". - # This method is deprecated; use BigDecimal#to_s("F") instead. - # - # require 'bigdecimal/util' - # - # d = BigDecimal("3.14") - # d.to_digits # => "3.14" - # - def to_digits - if self.nan? || self.infinite? || self.zero? - self.to_s - else - i = self.to_i.to_s - _,f,_,z = self.frac.split - i + "." + ("0"*(-z)) + f - end - end - - # call-seq: - # a.to_d -> bigdecimal - # - # Returns self. - # - # require 'bigdecimal/util' - # - # d = BigDecimal("3.14") - # d.to_d # => 0.314e1 - # - def to_d - self - end -end - - -class Rational < Numeric - # call-seq: - # rat.to_d(precision) -> bigdecimal - # - # Returns the value as a BigDecimal. - # - # The required +precision+ parameter is used to determine the number of - # significant digits for the result. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # Rational(22, 7).to_d(3) # => 0.314e1 - # - # See also Kernel.BigDecimal. - # - def to_d(precision) - BigDecimal(self, precision) - end -end - - -class Complex < Numeric - # call-seq: - # cmp.to_d -> bigdecimal - # cmp.to_d(precision) -> bigdecimal - # - # Returns the value as a BigDecimal. - # - # The +precision+ parameter is required for a rational complex number. - # This parameter is used to determine the number of significant digits - # for the result. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # Complex(0.1234567, 0).to_d(4) # => 0.1235e0 - # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1 - # - # See also Kernel.BigDecimal. - # - def to_d(*args) - BigDecimal(self) unless self.imag.zero? # to raise error - - if args.length == 0 - case self.real - when Rational - BigDecimal(self.real) # to raise error - end - end - self.real.to_d(*args) - end -end - - -class NilClass - # call-seq: - # nil.to_d -> bigdecimal - # - # Returns nil represented as a BigDecimal. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # nil.to_d # => 0.0 - # - def to_d - BigDecimal(0) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/linear.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/linear.rb deleted file mode 100644 index 516c2473..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/linear.rb +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/local/bin/ruby -# frozen_string_literal: false - -# -# linear.rb -# -# Solves linear equation system(A*x = b) by LU decomposition method. -# where A is a coefficient matrix,x is an answer vector,b is a constant vector. -# -# USAGE: -# ruby linear.rb [input file solved] -# - -# :stopdoc: -require "bigdecimal" -require "bigdecimal/ludcmp" - -# -# NOTE: -# Change following BigDecimal.limit() if needed. -BigDecimal.limit(100) -# - -include LUSolve -def rd_order(na) - printf("Number of equations ?") if(na <= 0) - n = ARGF.gets().to_i -end - -na = ARGV.size -zero = BigDecimal("0.0") -one = BigDecimal("1.0") - -while (n=rd_order(na))>0 - a = [] - as= [] - b = [] - if na <= 0 - # Read data from console. - printf("\nEnter coefficient matrix element A[i,j]\n") - for i in 0...n do - for j in 0...n do - printf("A[%d,%d]? ",i,j); s = ARGF.gets - a << BigDecimal(s) - as << BigDecimal(s) - end - printf("Contatant vector element b[%d] ? ",i) - b << BigDecimal(ARGF.gets) - end - else - # Read data from specified file. - printf("Coefficient matrix and constant vector.\n") - for i in 0...n do - s = ARGF.gets - printf("%d) %s",i,s) - s = s.split - for j in 0...n do - a << BigDecimal(s[j]) - as << BigDecimal(s[j]) - end - b << BigDecimal(s[n]) - end - end - x = lusolve(a,b,ludecomp(a,n,zero,one),zero) - printf("Answer(x[i] & (A*x-b)[i]) follows\n") - for i in 0...n do - printf("x[%d]=%s ",i,x[i].to_s) - s = zero - for j in 0...n do - s = s + as[i*n+j]*x[j] - end - printf(" & %s\n",(s-b[i]).to_s) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/nlsolve.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/nlsolve.rb deleted file mode 100644 index c2227dac..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/nlsolve.rb +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/local/bin/ruby -# frozen_string_literal: false - -# -# nlsolve.rb -# An example for solving nonlinear algebraic equation system. -# - -require "bigdecimal" -require "bigdecimal/newton" -include Newton - -class Function # :nodoc: all - def initialize() - @zero = BigDecimal("0.0") - @one = BigDecimal("1.0") - @two = BigDecimal("2.0") - @ten = BigDecimal("10.0") - @eps = BigDecimal("1.0e-16") - end - def zero;@zero;end - def one ;@one ;end - def two ;@two ;end - def ten ;@ten ;end - def eps ;@eps ;end - def values(x) # <= defines functions solved - f = [] - f1 = x[0]*x[0] + x[1]*x[1] - @two # f1 = x**2 + y**2 - 2 => 0 - f2 = x[0] - x[1] # f2 = x - y => 0 - f <<= f1 - f <<= f2 - f - end -end - -f = BigDecimal.limit(100) -f = Function.new -x = [f.zero,f.zero] # Initial values -n = nlsolve(f,x) -p x diff --git a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/pi.rb b/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/pi.rb deleted file mode 100644 index ea966389..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.2.2/sample/pi.rb +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/local/bin/ruby -# frozen_string_literal: false - -# -# pi.rb -# -# Calculates 3.1415.... (the number of times that a circle's diameter -# will fit around the circle) using J. Machin's formula. -# - -require "bigdecimal" -require "bigdecimal/math.rb" - -include BigMath - -if ARGV.size == 1 - print "PI("+ARGV[0]+"):\n" - p PI(ARGV[0].to_i) -else - print "TRY: ruby pi.rb 1000 \n" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/Gemfile b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/Gemfile deleted file mode 100644 index 044fba3b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" -gemspec - -gem "rake" -group :development do - gem "rspec-helpers", :require => false - gem "luna-rspec-formatters", :require => false - gem "pry", :require => false unless ENV[ - "CI" - ] -end diff --git a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/History.markdown b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/History.markdown deleted file mode 100644 index bac42704..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/History.markdown +++ /dev/null @@ -1,25 +0,0 @@ -## 1.1.0 / 2016-06-28 - -### Minor Enhancements - -* Support jruby (#8) - -## 1.0.0 / 2016-04-28 - -### Major enhancements - -- Merge Simple::ANSI and Colorator. (#7) - -### Minor Enhancements - -- Delete unnecessary `Symbol#to_sym` (#2) -- Change argument name of `Enumerator#each` for better code legibility (#3) - -### Development Fixes - -- Convert to new RSpec expectation syntax (#1) -- Fix `String#blue` result in README (#4) - -## 0.1 / 2013-04-13 - -Birthday! diff --git a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/LICENSE b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/LICENSE deleted file mode 100644 index b3b6be9a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) Parker Moore - -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/bundle/ruby/3.2.0/gems/colorator-1.1.0/README.markdown b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/README.markdown deleted file mode 100644 index 9cf886de..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/README.markdown +++ /dev/null @@ -1,47 +0,0 @@ -# colorator - -Colorize your text for the terminal - -[![Build Status](https://travis-ci.org/octopress/colorator.png?branch=master)](https://travis-ci.org/octopress/colorator) - -## Example - -```ruby -"this string".red -# => \e[31mthis string\e[0m -"my string".blue -# => \e[34mmy string\e[0m -# etc... -``` - -## Supported Colors - -- `red` -- `black` -- `green` -- `yellow` -- `magenta` -- `white` -- `blue` -- `cyan` -- `bold` - -## Other supported Ansi methods - -- `clear_line` -- `has_ansi?`, `has_color?` -- `strip_ansi`, `strip_color` -- `reset_ansi`, `reset_color` -- `clear_screen` -- `ansi_jump` - -## Why - -There are a bunch of gems that provide functionality like this, but none have -as simple an API as this. Just call `"string".color` and your text will be -colorized. - -## License - -MIT. Written as a single Ruby file by Brandon Mathis, converted into a gem by -Parker Moore. diff --git a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/Rakefile b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/Rakefile deleted file mode 100644 index b7e9ed54..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -require "bundler/gem_tasks" -require "rspec/core/rake_task" - -RSpec::Core::RakeTask.new(:spec) - -task :default => :spec diff --git a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/colorator.gemspec b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/colorator.gemspec deleted file mode 100644 index a4bd0cd0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/colorator.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -require File.expand_path('lib/colorator.rb', __dir__) - -Gem::Specification.new do |spec| - spec.name = "colorator" - spec.summary = "Colorize your text in the terminal." - spec.version = Colorator::VERSION - spec.authors = ["Parker Moore", "Brandon Mathis"] - spec.email = ["parkrmoore@gmail.com", "brandon@imathis.com"] - spec.homepage = "https://github.com/octopress/colorator" - spec.licenses = ["MIT"] - - all = `git ls-files -z`.split("\x0").reject { |f| f.start_with?(".") } - spec.files = all.select { |f| File.basename(f) == f || f =~ %r{^(bin|lib)/} } - spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] - - spec.extra_rdoc_files = ["README.markdown", "LICENSE"] - spec.rdoc_options = ["--charset=UTF-8"] - - spec.add_development_dependency "rspec", "~> 3.1" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/lib/colorator.rb b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/lib/colorator.rb deleted file mode 100644 index 107f6e3a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/lib/colorator.rb +++ /dev/null @@ -1,111 +0,0 @@ -$:.unshift File.dirname(__FILE__) - -module Colorator - module_function - VERSION = "1.1.0" - - # -------------------------------------------------------------------------- - - ANSI_MATCHR = /\x1b.*?[jkmsuABGKH]/ - ANSI_COLORS = { - :black => 30, - :red => 31, - :green => 32, - :yellow => 33, - :blue => 34, - :magenta => 35, - :cyan => 36, - :white => 37, - :bold => 1 - } - - # -------------------------------------------------------------------------- - # Allows you to check if a string currently has ansi. - # -------------------------------------------------------------------------- - - def has_ansi?(str) - str.match(ANSI_MATCHR).is_a?( - MatchData - ) - end - - # -------------------------------------------------------------------------- - # Jump the cursor, moving it up and then back down to it's spot, allowing - # you to do fancy things like multiple output (downloads) the way that Docker - # does them in an async way without breaking term. - # -------------------------------------------------------------------------- - - def ansi_jump(str, num) - "\x1b[#{num}A#{clear_line(str)}\x1b[#{ - num - }B" - end - - # -------------------------------------------------------------------------- - - def reset_ansi(str = "") - "\x1b[0m#{ - str - }" - end - - # -------------------------------------------------------------------------- - - def clear_line(str = "") - "\x1b[2K\r#{ - str - }" - end - - # -------------------------------------------------------------------------- - # Strip ANSI from the current string, making it just a normal string. - # -------------------------------------------------------------------------- - - def strip_ansi(str) - str.gsub( - ANSI_MATCHR, "" - ) - end - - # -------------------------------------------------------------------------- - # Clear the screen's current view, so the user gets a clean output. - # -------------------------------------------------------------------------- - - def clear_screen(str = "") - "\x1b[H\x1b[2J#{ - str - }" - end - - # -------------------------------------------------------------------------- - - def colorize(str = "", color) - "\x1b[#{color}m#{str}\x1b[0m" - end - - # -------------------------------------------------------------------------- - - Colorator::ANSI_COLORS.each do |color, code| - define_singleton_method color do |str| - colorize( - str, code - ) - end - end - - # -------------------------------------------------------------------------- - - class << self - alias reset_color reset_ansi - alias strip_color strip_ansi - alias has_color? has_ansi? - end - - # -------------------------------------------------------------------------- - - CORE_METHODS = ( - public_methods - Object.methods - ) -end - -require "colorator/core_ext" diff --git a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/lib/colorator/core_ext.rb b/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/lib/colorator/core_ext.rb deleted file mode 100644 index f2e0bf0d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/colorator-1.1.0/lib/colorator/core_ext.rb +++ /dev/null @@ -1,9 +0,0 @@ -class String - Colorator::CORE_METHODS.each do |method| - define_method method do |*args| - Colorator.public_send(method, - self, *args - ) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/CHANGELOG.md deleted file mode 100644 index 30810b72..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/CHANGELOG.md +++ /dev/null @@ -1,603 +0,0 @@ -## Current - -## Release v1.3.5, edge v0.7.2 (15 January 2025) - -concurrent-ruby: - -* (#1062) Remove dependency on logger. - -concurrent-ruby-edge: - -* (#1062) Remove dependency on logger. - -## Release v1.3.4 (10 August 2024) - -* (#1060) Fix bug with return value of `Concurrent.available_processor_count` when `cpu.cfs_quota_us` is -1. -* (#1058) Add `Concurrent.cpu_shares` that is cgroups aware. - -## Release v1.3.3 (9 June 2024) - -* (#1053) Improve the speed of `Concurrent.physical_processor_count` on Windows. - -## Release v1.3.2, edge v0.7.1 (7 June 2024) - -concurrent-ruby: - -* (#1051) Remove dependency on `win32ole`. - -concurrent-ruby-edge: - -* (#1052) Fix dependency on `concurrent-ruby` to allow the latest release. - -## Release v1.3.1 (29 May 2024) - -* Release 1.3.0 was broken when pushed to RubyGems. 1.3.1 is a packaging fix. - -## Release v1.3.0 (28 May 2024) - -* (#1042) Align Java Executor Service behavior for `shuttingdown?`, `shutdown?` -* (#1038) Add `Concurrent.available_processor_count` that is cgroups aware. - -## Release v1.2.3 (16 Jan 2024) - -* See [the GitHub release](https://github.com/ruby-concurrency/concurrent-ruby/releases/tag/v1.2.3) for details. - -## Release v1.2.2 (24 Feb 2023) - -* (#993) Fix arguments passed to `Concurrent::Map`'s `default_proc`. - -## Release v1.2.1 (24 Feb 2023) - -* (#990) Add missing `require 'fiber'` for `FiberLocalVar`. -* (#989) Optimize `Concurrent::Map#[]` on CRuby by letting the backing Hash handle the `default_proc`. - -## Release v1.2.0 (23 Jan 2023) - -* (#962) Fix ReentrantReadWriteLock to use the same granularity for locals as for Mutex it uses. -* (#983) Add FiberLocalVar -* (#934) concurrent-ruby now supports requiring individual classes (public classes listed in the docs), e.g., `require 'concurrent/map'` -* (#976) Let `Promises.any_fulfilled_future` take an `Event` -* Improve documentation of various classes -* (#975) Set the Ruby compatibility version at 2.3 -* (#972) Remove Rubinius-related code - -## Release v1.1.10 (22 Mar 2022) - -concurrent-ruby: - -* (#951) Set the Ruby compatibility version at 2.2 -* (#939, #933) The `caller_runs` fallback policy no longer blocks reads from the job queue by worker threads -* (#938, #761, #652) You can now explicitly `prune_pool` a thread pool (Sylvain Joyeux) -* (#937, #757, #670) We switched the Yahoo stock API for demos to Alpha Vantage (Gustavo Caso) -* (#932, #931) We changed how `SafeTaskExecutor` handles local jump errors (Aaron Jensen) -* (#927) You can use keyword arguments in your initialize when using `Async` (Matt Larraz) -* (#926, #639) We removed timeout from `TimerTask` because it wasn't sound, and now it's a no-op with a warning (Jacob Atzen) -* (#919) If you double-lock a re-entrant read-write lock, we promote to locked for writing (zp yuan) -* (#915) `monotonic_time` now accepts an optional unit parameter, as Ruby's `clock_gettime` (Jean Boussier) - -## Release v1.1.9 (5 Jun 2021) - -concurrent-ruby: - -* (#866) Child promise state not set to :pending immediately after #execute when parent has completed -* (#905, #872) Fix RubyNonConcurrentPriorityQueue#delete method -* (2df0337d) Make sure locks are not shared on shared when objects are dup/cloned -* (#900, #906, #796, #847, #911) Fix Concurrent::Set tread-safety issues on CRuby -* (#907) Add new ConcurrentMap backend for TruffleRuby - -## Release v1.1.8 (20 January 2021) - -concurrent-ruby: - -* (#885) Fix race condition in TVar for stale reads -* (#884) RubyThreadLocalVar: Do not iterate over hash which might conflict with new pair addition - -## Release v1.1.7 (6 August 2020) - -concurrent-ruby: - -* (#879) Consider falsy value on `Concurrent::Map#compute_if_absent` for fast non-blocking path -* (#876) Reset Async queue on forking, makes Async fork-safe -* (#856) Avoid running problematic code in RubyThreadLocalVar on MRI that occasionally results in segfault -* (#853) Introduce ThreadPoolExecutor without a Queue - -## Release v1.1.6, edge v0.6.0 (10 Feb 2020) - -concurrent-ruby: - -* (#841) Concurrent.disable_at_exit_handlers! is no longer needed and was deprecated. -* (#841) AbstractExecutorService#auto_terminate= was deprecated and has no effect. - Set :auto_terminate option instead when executor is initialized. - -## Release v1.1.6.pre1, edge v0.6.0.pre1 (26 Jan 2020) - -concurrent-ruby: - -* (#828) Allow to name executors, the name is also used to name their threads -* (#838) Implement #dup and #clone for structs -* (#821) Safer finalizers for thread local variables -* Documentation fixes -* (#814) Use Ruby's Etc.nprocessors if available -* (#812) Fix directory structure not to mess with packaging tools -* (#840) Fix termination of pools on JRuby - -concurrent-ruby-edge: - -* Add WrappingExecutor (#830) - -## Release v1.1.5, edge v0.5.0 (10 Mar 2019) - -concurrent-ruby: - -* fix potential leak of context on JRuby and Java 7 - -concurrent-ruby-edge: - -* Add finalized Concurrent::Cancellation -* Add finalized Concurrent::Throttle -* Add finalized Concurrent::Promises::Channel -* Add new Concurrent::ErlangActor - -## Release v1.1.4 (14 Dec 2018) - -* (#780) Remove java_alias of 'submit' method of Runnable to let executor service work on java 11 -* (#776) Fix NameError on defining a struct with a name which is already taken in an ancestor - -## Release v1.1.3 (7 Nov 2018) - -* (#775) fix partial require of the gem (although not officially supported) - -## Release v1.1.2 (6 Nov 2018) - -* (#773) more defensive 1.9.3 support - -## Release v1.1.1, edge v0.4.1 (1 Nov 2018) - -* (#768) add support for 1.9.3 back - -## Release v1.1.0, edge v0.4.0 (31 OCt 2018) (yanked) - -* (#768) yanked because of issues with removed 1.9.3 support - -## Release v1.1.0.pre2, edge v0.4.0.pre2 (18 Sep 2018) - -concurrent-ruby: - -* fixed documentation and README links -* fix Set for TruffleRuby and Rubinius -* use properly supported TruffleRuby APIs - -concurrent-ruby-edge: - -* add Promises.zip_futures_over_on - -## Release v1.1.0.pre1, edge v0.4.0.pre1 (15 Aug 2018) - -concurrent-ruby: - -* requires at least Ruby 2.0 -* [Promises](http://ruby-concurrency.github.io/concurrent-ruby/1.1.0/Concurrent/Promises.html) - are moved from `concurrent-ruby-edge` to `concurrent-ruby` -* Add support for TruffleRuby - * (#734) Fix Array/Hash/Set construction broken on TruffleRuby - * AtomicReference fixed -* CI stabilization -* remove sharp dependency edge -> core -* remove warnings -* documentation updates -* Exchanger is no longer documented as edge since it was already available in - `concurrent-ruby` -* (#644) Fix Map#each and #each_pair not returning enumerator outside of MRI -* (#659) Edge promises fail during error handling -* (#741) Raise on recursive Delay#value call -* (#727) #717 fix global IO executor on JRuby -* (#740) Drop support for CRuby 1.9, JRuby 1.7, Rubinius. -* (#737) Move AtomicMarkableReference out of Edge -* (#708) Prefer platform specific memory barriers -* (#735) Fix wrong expected exception in channel spec assertion -* (#729) Allow executor option in `Promise#then` -* (#725) fix timeout check to use timeout_interval -* (#719) update engine detection -* (#660) Add specs for Promise#zip/Promise.zip ordering -* (#654) Promise.zip execution changes -* (#666) Add thread safe set implementation -* (#651) #699 #to_s, #inspect should not output negative object IDs. -* (#685) Avoid RSpec warnings about raise_error -* (#680) Avoid RSpec monkey patching, persist spec results locally, use RSpec - v3.7.0 -* (#665) Initialize the monitor for new subarrays on Rubinius -* (#661) Fix error handling in edge promises - -concurrent-ruby-edge: - -* (#659) Edge promises fail during error handling -* Edge files clearly separated in `lib-edge` -* added ReInclude - -## Release v1.0.5, edge v0.3.1 (26 Feb 2017) - -concurrent-ruby: - -* Documentation for Event and Semaphore -* Use Unsafe#fullFence and #loadFence directly since the shortcuts were removed in JRuby -* Do not depend on org.jruby.util.unsafe.UnsafeHolder - -concurrent-ruby-edge: - -* (#620) Actors on Pool raise an error -* (#624) Delayed promises did not interact correctly with flatting - * Fix arguments yielded by callback methods -* Overridable default executor in promises factory methods -* Asking actor to terminate will always resolve to `true` - -## Release v1.0.4, edge v0.3.0 (27 Dec 2016) - -concurrent-ruby: - -* Nothing - -concurrent-ruby-edge: - -* New promises' API renamed, lots of improvements, edge bumped to 0.3.0 - * **Incompatible** with previous 0.2.3 version - * see https://github.com/ruby-concurrency/concurrent-ruby/pull/522 - -## Release v1.0.3 (17 Dec 2016) - -* Trigger execution of flattened delayed futures -* Avoid forking for processor_count if possible -* Semaphore Mutex and JRuby parity -* Adds Map#each as alias to Map#each_pair -* Fix uninitialized instance variables -* Make Fixnum, Bignum merger ready -* Allows Promise#then to receive an executor -* TimerSet now survives a fork -* Reject promise on any exception -* Allow ThreadLocalVar to be initialized with a block -* Support Alpha with `Concurrent::processor_count` -* Fixes format-security error when compiling ruby_193_compatible.h -* Concurrent::Atom#swap fixed: reraise the exceptions from block - -## Release v1.0.2 (2 May 2016) - -* Fix bug with `Concurrent::Map` MRI backend `#inspect` method -* Fix bug with `Concurrent::Map` MRI backend using `Hash#value?` -* Improved documentation and examples -* Minor updates to Edge - -## Release v1.0.1 (27 February 2016) - -* Fix "uninitialized constant Concurrent::ReentrantReadWriteLock" error. -* Better handling of `autoload` vs. `require`. -* Improved API for Edge `Future` zipping. -* Fix reference leak in Edge `Future` constructor . -* Fix bug which prevented thread pools from surviving a `fork`. -* Fix bug in which `TimerTask` did not correctly specify all its dependencies. -* Improved support for JRuby+Truffle -* Improved error messages. -* Improved documentation. -* Updated README and CONTRIBUTING. - -## Release v1.0.0 (13 November 2015) - -* Rename `attr_volatile_with_cas` to `attr_atomic` -* Add `clear_each` to `LockFreeStack` -* Update `AtomicReference` documentation -* Further updates and improvements to the synchronization layer. -* Performance and memory usage performance with `Actor` logging. -* Fixed `ThreadPoolExecutor` task count methods. -* Improved `Async` performance for both short and long-lived objects. -* Fixed bug in `LockFreeLinkedSet`. -* Fixed bug in which `Agent#await` triggered a validation failure. -* Further `Channel` updates. -* Adopted a project Code of Conduct -* Cleared interpreter warnings -* Fixed bug in `ThreadPoolExecutor` task count methods -* Fixed bug in 'LockFreeLinkedSet' -* Improved Java extension loading -* Handle Exception children in Edge::Future -* Continued improvements to channel -* Removed interpreter warnings. -* Shared constants now in `lib/concurrent/constants.rb` -* Refactored many tests. -* Improved synchronization layer/memory model documentation. -* Bug fix in Edge `Future#flat` -* Brand new `Channel` implementation in Edge gem. -* Simplification of `RubySingleThreadExecutor` -* `Async` improvements - - Each object uses its own `SingleThreadExecutor` instead of the global thread pool. - - No longer supports executor injection - - Much better documentation -* `Atom` updates - - No longer `Dereferenceable` - - Now `Observable` - - Added a `#reset` method -* Brand new `Agent` API and implementation. Now functionally equivalent to Clojure. -* Continued improvements to the synchronization layer -* Merged in the `thread_safe` gem - - `Concurrent::Array` - - `Concurrent::Hash` - - `Concurrent::Map` (formerly ThreadSafe::Cache) - - `Concurrent::Tuple` -* Minor improvements to Concurrent::Map -* Complete rewrite of `Exchanger` -* Removed all deprecated code (classes, methods, constants, etc.) -* Updated Agent, MutexAtomic, and BufferedChannel to inherit from Synchronization::Object. -* Many improved tests -* Some internal reorganization - -## Release v0.9.1 (09 August 2015) - -* Fixed a Rubiniux bug in synchronization object -* Fixed all interpreter warnings (except circular references) -* Fixed require statements when requiring `Atom` alone -* Significantly improved `ThreadLocalVar` on non-JRuby platforms -* Fixed error handling in Edge `Concurrent.zip` -* `AtomicFixnum` methods `#increment` and `#decrement` now support optional delta -* New `AtomicFixnum#update` method -* Minor optimizations in `ReadWriteLock` -* New `ReentrantReadWriteLock` class -* `ThreadLocalVar#bind` method is now public -* Refactored many tests - -## Release v0.9.0 (10 July 2015) - -* Updated `AtomicReference` - - `AtomicReference#try_update` now simply returns instead of raising exception - - `AtomicReference#try_update!` was added to raise exceptions if an update - fails. Note: this is the same behavior as the old `try_update` -* Pure Java implementations of - - `AtomicBoolean` - - `AtomicFixnum` - - `Semaphore` -* Fixed bug when pruning Ruby thread pools -* Fixed bug in time calculations within `ScheduledTask` -* Default `count` in `CountDownLatch` to 1 -* Use monotonic clock for all timers via `Concurrent.monotonic_time` - - Use `Process.clock_gettime(Process::CLOCK_MONOTONIC)` when available - - Fallback to `java.lang.System.nanoTime()` on unsupported JRuby versions - - Pure Ruby implementation for everything else - - Effects `Concurrent.timer`, `Concurrent.timeout`, `TimerSet`, `TimerTask`, and `ScheduledTask` -* Deprecated all clock-time based timer scheduling - - Only support scheduling by delay - - Effects `Concurrent.timer`, `TimerSet`, and `ScheduledTask` -* Added new `ReadWriteLock` class -* Consistent `at_exit` behavior for Java and Ruby thread pools. -* Added `at_exit` handler to Ruby thread pools (already in Java thread pools) - - Ruby handler stores the object id and retrieves from `ObjectSpace` - - JRuby disables `ObjectSpace` by default so that handler stores the object reference -* Added a `:stop_on_exit` option to thread pools to enable/disable `at_exit` handler -* Updated thread pool docs to better explain shutting down thread pools -* Simpler `:executor` option syntax for all abstractions which support this option -* Added `Executor#auto_terminate?` predicate method (for thread pools) -* Added `at_exit` handler to `TimerSet` -* Simplified auto-termination of the global executors - - Can now disable auto-termination of global executors - - Added shutdown/kill/wait_for_termination variants for global executors -* Can now disable auto-termination for *all* executors (the nuclear option) -* Simplified auto-termination of the global executors -* Deprecated terms "task pool" and "operation pool" - - New terms are "io executor" and "fast executor" - - New functions added with new names - - Deprecation warnings added to functions referencing old names -* Moved all thread pool related functions from `Concurrent::Configuration` to `Concurrent` - - Old functions still exist with deprecation warnings - - New functions have updated names as appropriate -* All high-level abstractions default to the "io executor" -* Fixed bug in `Actor` causing it to prematurely warm global thread pools on gem load - - This also fixed a `RejectedExecutionError` bug when running with minitest/autorun via JRuby -* Moved global logger up to the `Concurrent` namespace and refactored the code -* Optimized the performance of `Delay` - - Fixed a bug in which no executor option on construction caused block execution on a global thread pool -* Numerous improvements and bug fixes to `TimerSet` -* Fixed deadlock of `Future` when the handler raises Exception -* Added shared specs for more classes -* New concurrency abstractions including: - - `Atom` - - `Maybe` - - `ImmutableStruct` - - `MutableStruct` - - `SettableStruct` -* Created an Edge gem for unstable abstractions including - - `Actor` - - `Agent` - - `Channel` - - `Exchanger` - - `LazyRegister` - - **new Future Framework** - unified - implementation of Futures and Promises which combines Features of previous `Future`, - `Promise`, `IVar`, `Event`, `Probe`, `dataflow`, `Delay`, `TimerTask` into single framework. It uses extensively - new synchronization layer to make all the paths **lock-free** with exception of blocking threads on `#wait`. - It offers better performance and does not block threads when not required. -* Actor framework changes: - - fixed reset loop in Pool - - Pool can use any actor as a worker, abstract worker class is no longer needed. - - Actor events not have format `[:event_name, *payload]` instead of just the Symbol. - - Actor now uses new Future/Promise Framework instead of `IVar` for better interoperability - - Behaviour definition array was simplified to `[BehaviourClass1, [BehaviourClass2, *initialization_args]]` - - Linking behavior responds to :linked message by returning array of linked actors - - Supervised behavior is removed in favour of just Linking - - RestartingContext is supervised by default now, `supervise: true` is not required any more - - Events can be private and public, so far only difference is that Linking will - pass to linked actors only public messages. Adding private :restarting and - :resetting events which are send before the actor restarts or resets allowing - to add callbacks to cleanup current child actors. - - Print also object_id in Reference to_s - - Add AbstractContext#default_executor to be able to override executor class wide - - Add basic IO example - - Documentation somewhat improved - - All messages should have same priority. It's now possible to send `actor << job1 << job2 << :terminate!` and - be sure that both jobs are processed first. -* Refactored `Channel` to use newer synchronization objects -* Added `#reset` and `#cancel` methods to `TimerSet` -* Added `#cancel` method to `Future` and `ScheduledTask` -* Refactored `TimerSet` to use `ScheduledTask` -* Updated `Async` with a factory that initializes the object -* Deprecated `Concurrent.timer` and `Concurrent.timeout` -* Reduced max threads on pure-Ruby thread pools (abends around 14751 threads) -* Moved many private/internal classes/modules into "namespace" modules -* Removed brute-force killing of threads in tests -* Fixed a thread pool bug when the operating system cannot allocate more threads - -## Release v0.8.0 (25 January 2015) - -* C extension for MRI have been extracted into the `concurrent-ruby-ext` companion gem. - Please see the README for more detail. -* Better variable isolation in `Promise` and `Future` via an `:args` option -* Continued to update intermittently failing tests - -## Release v0.7.2 (24 January 2015) - -* New `Semaphore` class based on [java.util.concurrent.Semaphore](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Semaphore.html) -* New `Promise.all?` and `Promise.any?` class methods -* Renamed `:overflow_policy` on thread pools to `:fallback_policy` -* Thread pools still accept the `:overflow_policy` option but display a warning -* Thread pools now implement `fallback_policy` behavior when not running (rather than universally rejecting tasks) -* Fixed minor `set_deref_options` constructor bug in `Promise` class -* Fixed minor `require` bug in `ThreadLocalVar` class -* Fixed race condition bug in `TimerSet` class -* Fixed race condition bug in `TimerSet` class -* Fixed signal bug in `TimerSet#post` method -* Numerous non-functional updates to clear warning when running in debug mode -* Fixed more intermittently failing tests -* Tests now run on new Travis build environment -* Multiple documentation updates - -## Release v0.7.1 (4 December 2014) - -Please see the [roadmap](https://github.com/ruby-concurrency/concurrent-ruby/issues/142) for more information on the next planned release. - -* Added `flat_map` method to `Promise` -* Added `zip` method to `Promise` -* Fixed bug with logging in `Actor` -* Improvements to `Promise` tests -* Removed actor-experimental warning -* Added an `IndirectImmediateExecutor` class -* Allow disabling auto termination of global executors -* Fix thread leaking in `ThreadLocalVar` (uses `Ref` gem on non-JRuby systems) -* Fix thread leaking when pruning pure-Ruby thread pools -* Prevent `Actor` from using an `ImmediateExecutor` (causes deadlock) -* Added missing synchronizations to `TimerSet` -* Fixed bug with return value of `Concurrent::Actor::Utils::Pool#ask` -* Fixed timing bug in `TimerTask` -* Fixed bug when creating a `JavaThreadPoolExecutor` with minimum pool size of zero -* Removed confusing warning when not using native extensions -* Improved documentation - -## Release v0.7.0 (13 August 2014) - -* Merge the [atomic](https://github.com/ruby-concurrency/atomic) gem - - Pure Ruby `MutexAtomic` atomic reference class - - Platform native atomic reference classes `CAtomic`, `JavaAtomic`, and `RbxAtomic` - - Automated [build process](https://github.com/ruby-concurrency/rake-compiler-dev-box) - - Fat binary releases for [multiple platforms](https://rubygems.org/gems/concurrent-ruby/versions) including Windows (32/64), Linux (32/64), OS X (64-bit), Solaris (64-bit), and JRuby -* C native `CAtomicBoolean` -* C native `CAtomicFixnum` -* Refactored intermittently failing tests -* Added `dataflow!` and `dataflow_with!` methods to match `Future#value!` method -* Better handling of timeout in `Agent` -* Actor Improvements - - Fine-grained implementation using chain of behaviors. Each behavior is responsible for single aspect like: `Termination`, `Pausing`, `Linking`, `Supervising`, etc. Users can create custom Actors easily based on their needs. - - Supervision was added. `RestartingContext` will pause on error waiting on its supervisor to decide what to do next ( options are `:terminate!`, `:resume!`, `:reset!`, `:restart!`). Supervising behavior also supports strategies `:one_for_one` and `:one_for_all`. - - Linking was added to be able to monitor actor's events like: `:terminated`, `:paused`, `:restarted`, etc. - - Dead letter routing added. Rejected envelopes are collected in a configurable actor (default: `Concurrent::Actor.root.ask!(:dead_letter_routing)`) - - Old `Actor` class removed and replaced by new implementation previously called `Actress`. `Actress` was kept as an alias for `Actor` to keep compatibility. - - `Utils::Broadcast` actor which allows Publish–subscribe pattern. -* More executors for managing serialized operations - - `SerializedExecution` mixin module - - `SerializedExecutionDelegator` for serializing *any* executor -* Updated `Async` with serialized execution -* Updated `ImmediateExecutor` and `PerThreadExecutor` with full executor service lifecycle -* Added a `Delay` to root `Actress` initialization -* Minor bug fixes to thread pools -* Refactored many intermittently failing specs -* Removed Java interop warning `executor.rb:148 warning: ambiguous Java methods found, using submit(java.lang.Runnable)` -* Fixed minor bug in `RubyCachedThreadPool` overflow policy -* Updated tests to use [RSpec 3.0](http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3) -* Removed deprecated `Actor` class -* Better support for Rubinius - -## Release v0.6.1 (14 June 2014) - -* Many improvements to `Concurrent::Actress` -* Bug fixes to `Concurrent::RubyThreadPoolExecutor` -* Fixed several brittle tests -* Moved documentation to http://ruby-concurrency.github.io/concurrent-ruby/frames.html - -## Release v0.6.0 (25 May 2014) - -* Added `Concurrent::Observable` to encapsulate our thread safe observer sets -* Improvements to new `Channel` -* Major improvements to `CachedThreadPool` and `FixedThreadPool` -* Added `SingleThreadExecutor` -* Added `Current::timer` function -* Added `TimerSet` executor -* Added `AtomicBoolean` -* `ScheduledTask` refactoring -* Pure Ruby and JRuby-optimized `PriorityQueue` classes -* Updated `Agent` behavior to more closely match Clojure -* Observer sets support block callbacks to the `add_observer` method -* New algorithm for thread creation in `RubyThreadPoolExecutor` -* Minor API updates to `Event` -* Rewritten `TimerTask` now an `Executor` instead of a `Runnable` -* Fixed many brittle specs -* Renamed `FixedThreadPool` and `CachedThreadPool` to `RubyFixedThreadPool` and `RubyCachedThreadPool` -* Created JRuby optimized `JavaFixedThreadPool` and `JavaCachedThreadPool` -* Consolidated fixed thread pool tests into `spec/concurrent/fixed_thread_pool_shared.rb` and `spec/concurrent/cached_thread_pool_shared.rb` -* `FixedThreadPool` now subclasses `RubyFixedThreadPool` or `JavaFixedThreadPool` as appropriate -* `CachedThreadPool` now subclasses `RubyCachedThreadPool` or `JavaCachedThreadPool` as appropriate -* New `Delay` class -* `Concurrent::processor_count` helper function -* New `Async` module -* Renamed `NullThreadPool` to `PerThreadExecutor` -* Deprecated `Channel` (we are planning a new implementation based on [Go](http://golangtutorials.blogspot.com/2011/06/channels-in-go.html)) -* Added gem-level [configuration](http://robots.thoughtbot.com/mygem-configure-block) -* Deprecated `$GLOBAL_THREAD_POOL` in lieu of gem-level configuration -* Removed support for Ruby [1.9.2](https://www.ruby-lang.org/en/news/2013/12/17/maintenance-of-1-8-7-and-1-9-2/) -* New `RubyThreadPoolExecutor` and `JavaThreadPoolExecutor` classes -* All thread pools now extend the appropriate thread pool executor classes -* All thread pools now support `:overflow_policy` (based on Java's [reject policies](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html)) -* Deprecated `UsesGlobalThreadPool` in lieu of explicit `:executor` option (dependency injection) on `Future`, `Promise`, and `Agent` -* Added `Concurrent::dataflow_with(executor, *inputs)` method to support executor dependency injection for dataflow -* Software transactional memory with `TVar` and `Concurrent::atomically` -* First implementation of [new, high-performance](https://github.com/ruby-concurrency/concurrent-ruby/pull/49) `Channel` -* `Actor` is deprecated in favor of new experimental actor implementation [#73](https://github.com/ruby-concurrency/concurrent-ruby/pull/73). To avoid namespace collision it is living in `Actress` namespace until `Actor` is removed in next release. - -## Release v0.5.0 - -This is the most significant release of this gem since its inception. This release includes many improvements and optimizations. It also includes several bug fixes. The major areas of focus for this release were: - -* Stability improvements on Ruby versions with thread-level parallelism ([JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) -* Creation of new low-level concurrency abstractions -* Internal refactoring to use the new low-level abstractions - -Most of these updates had no effect on the gem API. There are a few notable exceptions which were unavoidable. Please read the [release notes](API-Updates-in-v0.5.0) for more information. - -Specific changes include: - -* New class `IVar` -* New class `MVar` -* New class `ThreadLocalVar` -* New class `AtomicFixnum` -* New class method `dataflow` -* New class `Condition` -* New class `CountDownLatch` -* New class `DependencyCounter` -* New class `SafeTaskExecutor` -* New class `CopyOnNotifyObserverSet` -* New class `CopyOnWriteObserverSet` -* `Future` updated with `execute` API -* `ScheduledTask` updated with `execute` API -* New `Promise` API -* `Future` now extends `IVar` -* `Postable#post?` now returns an `IVar` -* Thread safety fixes to `Dereferenceable` -* Thread safety fixes to `Obligation` -* Thread safety fixes to `Supervisor` -* Thread safety fixes to `Event` -* Various other thread safety (race condition) fixes -* Refactored brittle tests -* Implemented pending tests -* Added JRuby and Rubinius as Travis CI build targets -* Added [CodeClimate](https://codeclimate.com/) code review -* Improved YARD documentation diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/Gemfile b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/Gemfile deleted file mode 100644 index 1786c8b2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/Gemfile +++ /dev/null @@ -1,36 +0,0 @@ -source 'https://rubygems.org' - -version = File.read("#{__dir__}/lib/concurrent-ruby/concurrent/version.rb")[/'(.+)'/, 1] or raise -edge_version = File.read("#{__dir__}/lib/concurrent-ruby-edge/concurrent/edge/version.rb")[/'(.+)'/, 1] or raise - -no_path = ENV['NO_PATH'] -options = no_path ? {} : { path: '.' } - -gem 'concurrent-ruby', version, options -gem 'concurrent-ruby-edge', edge_version, options -gem 'concurrent-ruby-ext', version, options.merge(platform: :mri) - -group :development do - gem 'rake', '~> 13.0' - gem 'rake-compiler', '~> 1.0', '>= 1.0.7', '!= 1.2.4' - gem 'rake-compiler-dock', '~> 1.0' - gem 'pry', '~> 0.11', platforms: :mri -end - -group :documentation, optional: true do - gem 'yard', '~> 0.9.0', require: false - gem 'redcarpet', '~> 3.0', platforms: :mri # understands github markdown - gem 'md-ruby-eval', '~> 0.6' -end - -group :testing do - gem 'rspec', '~> 3.7' - gem 'timecop', '~> 0.9' - gem 'sigdump', require: false -end - -# made opt-in since it will not install on jruby 1.7 -group :coverage, optional: !ENV['COVERAGE'] do - gem 'simplecov', '~> 0.16.0', require: false - gem 'coveralls', '~> 0.8.2', require: false -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/LICENSE.txt b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/LICENSE.txt deleted file mode 100644 index 1026f28d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) Jerry D'Antonio -- released under the MIT license. - -http://www.opensource.org/licenses/mit-license.php - -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/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/README.md b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/README.md deleted file mode 100644 index 63ee743c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/README.md +++ /dev/null @@ -1,407 +0,0 @@ -# Concurrent Ruby - -[![Gem Version](https://badge.fury.io/rb/concurrent-ruby.svg)](http://badge.fury.io/rb/concurrent-ruby) -[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT) -[![Gitter chat](https://img.shields.io/badge/IRC%20(gitter)-devs%20%26%20users-brightgreen.svg)](https://gitter.im/ruby-concurrency/concurrent-ruby) - -Modern concurrency tools for Ruby. Inspired by -[Erlang](http://www.erlang.org/doc/reference_manual/processes.html), -[Clojure](http://clojure.org/concurrent_programming), -[Scala](http://akka.io/), -[Haskell](http://www.haskell.org/haskellwiki/Applications_and_libraries/Concurrency_and_parallelism#Concurrent_Haskell), -[F#](http://blogs.msdn.com/b/dsyme/archive/2010/02/15/async-and-parallel-design-patterns-in-f-part-3-agents.aspx), -[C#](http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx), -[Java](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/package-summary.html), -and classic concurrency patterns. - - - -The design goals of this gem are: - -* Be an 'unopinionated' toolbox that provides useful utilities without debating which is better - or why -* Remain free of external gem dependencies -* Stay true to the spirit of the languages providing inspiration -* But implement in a way that makes sense for Ruby -* Keep the semantics as idiomatic Ruby as possible -* Support features that make sense in Ruby -* Exclude features that don't make sense in Ruby -* Be small, lean, and loosely coupled -* Thread-safety -* Backward compatibility - -## Contributing - -**This gem depends on -[contributions](https://github.com/ruby-concurrency/concurrent-ruby/graphs/contributors) and we -appreciate your help. Would you like to contribute? Great! Have a look at -[issues with `looking-for-contributor` label](https://github.com/ruby-concurrency/concurrent-ruby/issues?q=is%3Aissue+is%3Aopen+label%3Alooking-for-contributor).** And if you pick something up let us know on the issue. - -You can also get started by triaging issues which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to concurrent-ruby on CodeTriage](https://www.codetriage.com/ruby-concurrency/concurrent-ruby). [![Open Source Helpers](https://www.codetriage.com/ruby-concurrency/concurrent-ruby/badges/users.svg)](https://www.codetriage.com/ruby-concurrency/concurrent-ruby) - -## Thread Safety - -*Concurrent Ruby makes one of the strongest thread safety guarantees of any Ruby concurrency -library, providing consistent behavior and guarantees on all three main Ruby interpreters -(MRI/CRuby, JRuby, TruffleRuby).* - -Every abstraction in this library is thread safe. Specific thread safety guarantees are documented -with each abstraction. - -It is critical to remember, however, that Ruby is a language of mutable references. *No* -concurrency library for Ruby can ever prevent the user from making thread safety mistakes (such as -sharing a mutable object between threads and modifying it on both threads) or from creating -deadlocks through incorrect use of locks. All the library can do is provide safe abstractions which -encourage safe practices. Concurrent Ruby provides more safe concurrency abstractions than any -other Ruby library, many of which support the mantra of -["Do not communicate by sharing memory; instead, share memory by communicating"](https://blog.golang.org/share-memory-by-communicating). -Concurrent Ruby is also the only Ruby library which provides a full suite of thread safe and -immutable variable types and data structures. - -We've also initiated discussion to document the [memory model](docs-source/synchronization.md) of Ruby which -would provide consistent behaviour and guarantees on all three main Ruby interpreters -(MRI/CRuby, JRuby, TruffleRuby). - -## Features & Documentation - -**The primary site for documentation is the automatically generated -[API documentation](http://ruby-concurrency.github.io/concurrent-ruby/index.html) which is up to -date with latest release.** This readme matches the master so may contain new stuff not yet -released. - -We also have a [IRC (gitter)](https://gitter.im/ruby-concurrency/concurrent-ruby). - -### Versioning - -* `concurrent-ruby` uses [Semantic Versioning](http://semver.org/) -* `concurrent-ruby-ext` has always same version as `concurrent-ruby` -* `concurrent-ruby-edge` will always be 0.y.z therefore following - [point 4](http://semver.org/#spec-item-4) applies *"Major version zero - (0.y.z) is for initial development. Anything may change at any time. The - public API should not be considered stable."* However we additionally use - following rules: - * Minor version increment means incompatible changes were made - * Patch version increment means only compatible changes were made - - -#### General-purpose Concurrency Abstractions - -* [Async](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Async.html): - A mixin module that provides simple asynchronous behavior to a class. Loosely based on Erlang's - [gen_server](http://www.erlang.org/doc/man/gen_server.html). -* [ScheduledTask](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ScheduledTask.html): - Like a Future scheduled for a specific future time. -* [TimerTask](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/TimerTask.html): - A Thread that periodically wakes up to perform work at regular intervals. -* [Promises](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promises.html): - Unified implementation of futures and promises which combines features of previous `Future`, - `Promise`, `IVar`, `Event`, `dataflow`, `Delay`, and (partially) `TimerTask` into a single - framework. It extensively uses the new synchronization layer to make all the features - **non-blocking** and **lock-free**, with the exception of obviously blocking operations like - `#wait`, `#value`. It also offers better performance. - -#### Thread-safe Value Objects, Structures, and Collections - -Collection classes that were originally part of the (deprecated) `thread_safe` gem: - -* [Array](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Array.html) A thread-safe - subclass of Ruby's standard [Array](http://ruby-doc.org/core/Array.html). -* [Hash](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Hash.html) A thread-safe - subclass of Ruby's standard [Hash](http://ruby-doc.org/core/Hash.html). -* [Set](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Set.html) A thread-safe - subclass of Ruby's standard [Set](http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html). -* [Map](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Map.html) A hash-like object - that should have much better performance characteristics, especially under high concurrency, - than `Concurrent::Hash`. -* [Tuple](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Tuple.html) A fixed size - array with volatile (synchronized, thread safe) getters/setters. - -Value objects inspired by other languages: - -* [Maybe](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Maybe.html) A thread-safe, - immutable object representing an optional value, based on - [Haskell Data.Maybe](https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html). - -Structure classes derived from Ruby's [Struct](http://ruby-doc.org/core/Struct.html): - -* [ImmutableStruct](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ImmutableStruct.html) - Immutable struct where values are set at construction and cannot be changed later. -* [MutableStruct](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/MutableStruct.html) - Synchronized, mutable struct where values can be safely changed at any time. -* [SettableStruct](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/SettableStruct.html) - Synchronized, write-once struct where values can be set at most once, either at construction - or any time thereafter. - -Thread-safe variables: - -* [Agent](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Agent.html): A way to - manage shared, mutable, *asynchronous*, independent state. Based on Clojure's - [Agent](http://clojure.org/agents). -* [Atom](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Atom.html): A way to manage - shared, mutable, *synchronous*, independent state. Based on Clojure's - [Atom](http://clojure.org/atoms). -* [AtomicBoolean](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/AtomicBoolean.html) - A boolean value that can be updated atomically. -* [AtomicFixnum](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/AtomicFixnum.html) - A numeric value that can be updated atomically. -* [AtomicReference](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/AtomicReference.html) - An object reference that may be updated atomically. -* [Exchanger](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Exchanger.html) - A synchronization point at which threads can pair and swap elements within pairs. Based on - Java's [Exchanger](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html). -* [MVar](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/MVar.html) A synchronized - single element container. Based on Haskell's - [MVar](https://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Concurrent-MVar.html) and - Scala's [MVar](http://docs.typelevel.org/api/scalaz/nightly/index.html#scalaz.concurrent.MVar$). -* [ThreadLocalVar](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ThreadLocalVar.html) - A variable where the value is different for each thread. -* [TVar](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/TVar.html) A transactional - variable implementing software transactional memory (STM). Based on Clojure's - [Ref](http://clojure.org/refs). - -#### Java-inspired ThreadPools and Other Executors - -* See the [thread pool](http://ruby-concurrency.github.io/concurrent-ruby/master/file.thread_pools.html) - overview, which also contains a list of other Executors available. - -#### Thread Synchronization Classes and Algorithms - -* [CountDownLatch](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/CountDownLatch.html) - A synchronization object that allows one thread to wait on multiple other threads. -* [CyclicBarrier](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/CyclicBarrier.html) - A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point. -* [Event](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Event.html) Old school - kernel-style event. -* [ReadWriteLock](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ReadWriteLock.html) - A lock that supports multiple readers but only one writer. -* [ReentrantReadWriteLock](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ReentrantReadWriteLock.html) - A read/write lock with reentrant and upgrade features. -* [Semaphore](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Semaphore.html) - A counting-based locking mechanism that uses permits. -* [AtomicMarkableReference](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/AtomicMarkableReference.html) - -#### Deprecated - -Deprecated features are still available and bugs are being fixed, but new features will not be added. - -* ~~[Future](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Future.html): - An asynchronous operation that produces a value.~~ Replaced by - [Promises](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promises.html). - * ~~[.dataflow](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent.html#dataflow-class_method): - Built on Futures, Dataflow allows you to create a task that will be scheduled when all of - its data dependencies are available.~~ Replaced by - [Promises](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promises.html). -* ~~[Promise](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promise.html): Similar - to Futures, with more features.~~ Replaced by - [Promises](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promises.html). -* ~~[Delay](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Delay.html) Lazy evaluation - of a block yielding an immutable result. Based on Clojure's - [delay](https://clojuredocs.org/clojure.core/delay).~~ Replaced by - [Promises](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promises.html). -* ~~[IVar](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/IVar.html) Similar to a - "future" but can be manually assigned once, after which it becomes immutable.~~ Replaced by - [Promises](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promises.html). - -### Edge Features - -These are available in the `concurrent-ruby-edge` companion gem. - -These features are under active development and may change frequently. They are expected not to -keep backward compatibility (there may also lack tests and documentation). Semantic versions will -be obeyed though. Features developed in `concurrent-ruby-edge` are expected to move to -`concurrent-ruby` when final. - -* [Actor](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Actor.html): Implements - the Actor Model, where concurrent actors exchange messages. - *Status: Partial documentation and tests; depends on new future/promise framework; stability is good.* -* [Channel](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Channel.html): - Communicating Sequential Processes ([CSP](https://en.wikipedia.org/wiki/Communicating_sequential_processes)). - Functionally equivalent to Go [channels](https://tour.golang.org/concurrency/2) with additional - inspiration from Clojure [core.async](https://clojure.github.io/core.async/). - *Status: Partial documentation and tests.* -* [LazyRegister](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/LazyRegister.html) -* [LockFreeLinkedSet](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Edge/LockFreeLinkedSet.html) - *Status: will be moved to core soon.* -* [LockFreeStack](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/LockFreeStack.html) - *Status: missing documentation and tests.* -* [Promises::Channel](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Promises/Channel.html) - A first in first out channel that accepts messages with push family of methods and returns - messages with pop family of methods. - Pop and push operations can be represented as futures, see `#pop_op` and `#push_op`. - The capacity of the channel can be limited to support back pressure, use capacity option in `#initialize`. - `#pop` method blocks ans `#pop_op` returns pending future if there is no message in the channel. - If the capacity is limited the `#push` method blocks and `#push_op` returns pending future. -* [Cancellation](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Cancellation.html) - The Cancellation abstraction provides cooperative cancellation. - - The standard methods `Thread#raise` of `Thread#kill` available in Ruby - are very dangerous (see linked the blog posts bellow). - Therefore concurrent-ruby provides an alternative. - - * - * - * - - It provides an object which represents a task which can be executed, - the task has to get the reference to the object and periodically cooperatively check that it is not cancelled. - Good practices to make tasks cancellable: - * check cancellation every cycle of a loop which does significant work, - * do all blocking actions in a loop with a timeout then on timeout check cancellation - and if ok block again with the timeout -* [Throttle](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Throttle.html) - A tool managing concurrency level of tasks. -* [ErlangActor](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ErlangActor.html) - Actor implementation which precisely matches Erlang actor behaviour. - Requires at least Ruby 2.1 otherwise it's not loaded. -* [WrappingExecutor](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/WrappingExecutor.html) - A delegating executor which modifies each task before the task is given to - the target executor it delegates to. - -## Supported Ruby versions - -* MRI 2.3 and above -* Latest JRuby 9000 -* Latest TruffleRuby - -## Usage - -Everything within this gem can be loaded simply by requiring it: - -```ruby -require 'concurrent' -``` - -You can also require a specific abstraction [part of the public documentation](https://ruby-concurrency.github.io/concurrent-ruby/master/index.html) since concurrent-ruby 1.2.0, for example: -```ruby -require 'concurrent/map' -require 'concurrent/atomic/atomic_reference' -require 'concurrent/executor/fixed_thread_pool' -``` - -To use the tools in the Edge gem it must be required separately: - -```ruby -require 'concurrent-edge' -``` - -If the library does not behave as expected, `Concurrent.use_simple_logger(:DEBUG)` could -help to reveal the problem. - -## Installation - -```shell -gem install concurrent-ruby -``` - -or add the following line to Gemfile: - -```ruby -gem 'concurrent-ruby', require: 'concurrent' -``` - -and run `bundle install` from your shell. - -### Edge Gem Installation - -The Edge gem must be installed separately from the core gem: - -```shell -gem install concurrent-ruby-edge -``` - -or add the following line to Gemfile: - -```ruby -gem 'concurrent-ruby-edge', require: 'concurrent-edge' -``` - -and run `bundle install` from your shell. - - -### C Extensions for MRI - -Potential performance improvements may be achieved under MRI by installing optional C extensions. -To minimise installation errors the C extensions are available in the `concurrent-ruby-ext` -extension gem. `concurrent-ruby` and `concurrent-ruby-ext` are always released together with same -version. Simply install the extension gem too: - -```ruby -gem install concurrent-ruby-ext -``` - -or add the following line to Gemfile: - -```ruby -gem 'concurrent-ruby-ext' -``` - -and run `bundle install` from your shell. - -In code it is only necessary to - -```ruby -require 'concurrent' -``` - -The `concurrent-ruby` gem will automatically detect the presence of the `concurrent-ruby-ext` gem -and load the appropriate C extensions. - -#### Note For gem developers - -No gems should depend on `concurrent-ruby-ext`. Doing so will force C extensions on your users. The -best practice is to depend on `concurrent-ruby` and let users to decide if they want C extensions. - -## Building the gem - -### Requirements - -* Recent CRuby -* JRuby, `rbenv install jruby-9.2.17.0` -* Set env variable `CONCURRENT_JRUBY_HOME` to point to it, e.g. `/usr/local/opt/rbenv/versions/jruby-9.2.17.0` -* Install Docker, required for Windows builds - -### Publishing the Gem - -* Update `version.rb` -* Update the CHANGELOG -* Add the new version to `docs-source/signpost.md`. Needs to be done only if there are visible changes in the documentation. -* Commit (and push) the changes. -* Use `bundle exec rake release` to release the gem. - It consists of `['release:checks', 'release:build', 'release:test', 'release:publish']` steps. - It will ask at the end before publishing anything. Steps can also be executed individually. - -## Maintainers - -* [Benoit Daloze](https://github.com/eregon) -* [Matthew Draper](https://github.com/matthewd) -* [Rafael França](https://github.com/rafaelfranca) -* [Charles Oliver Nutter](https://github.com/headius) -* [Ben Sheldon](https://github.com/bensheldon) -* [Samuel Williams](https://github.com/ioquatix) - -### Special Thanks to - -* [Jerry D'Antonio](https://github.com/jdantonio) for creating the gem -* [Brian Durand](https://github.com/bdurand) for the `ref` gem -* [Charles Oliver Nutter](https://github.com/headius) for the `atomic` and `thread_safe` gems -* [thedarkone](https://github.com/thedarkone) for the `thread_safe` gem - -to the past maintainers - -* [Chris Seaton](https://github.com/chrisseaton) -* [Petr Chalupa](https://github.com/pitr-ch) -* [Michele Della Torre](https://github.com/mighe) -* [Paweł Obrok](https://github.com/obrok) -* [Lucas Allan](https://github.com/lucasallan) - -and to [Ruby Association](https://www.ruby.or.jp/en/) for sponsoring a project -["Enhancing Ruby’s concurrency tooling"](https://www.ruby.or.jp/en/news/20181106) in 2018. - -## License and Copyright - -*Concurrent Ruby* is free software released under the -[MIT License](http://www.opensource.org/licenses/MIT). - -The *Concurrent Ruby* [logo](https://raw.githubusercontent.com/ruby-concurrency/concurrent-ruby/master/docs-source/logo/concurrent-ruby-logo-300x300.png) was -designed by [David Jones](https://twitter.com/zombyboy). It is Copyright © 2014 -[Jerry D'Antonio](https://twitter.com/jerrydantonio). All Rights Reserved. diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/Rakefile b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/Rakefile deleted file mode 100644 index 3d157d47..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/Rakefile +++ /dev/null @@ -1,344 +0,0 @@ -version = File.read("#{__dir__}/lib/concurrent-ruby/concurrent/version.rb")[/'(.+)'/, 1] or raise -edge_version = File.read("#{__dir__}/lib/concurrent-ruby-edge/concurrent/edge/version.rb")[/'(.+)'/, 1] or raise - -core_gemspec = Gem::Specification.load File.join(__dir__, 'concurrent-ruby.gemspec') -ext_gemspec = Gem::Specification.load File.join(__dir__, 'concurrent-ruby-ext.gemspec') -edge_gemspec = Gem::Specification.load File.join(__dir__, 'concurrent-ruby-edge.gemspec') - -require 'rake/javaextensiontask' - -ENV['JRUBY_HOME'] = ENV['CONCURRENT_JRUBY_HOME'] if ENV['CONCURRENT_JRUBY_HOME'] && RUBY_ENGINE != 'jruby' - -Rake::JavaExtensionTask.new('concurrent_ruby', core_gemspec) do |ext| - ext.ext_dir = 'ext/concurrent-ruby' - ext.lib_dir = 'lib/concurrent-ruby/concurrent' - ext.source_version = '8' - ext.target_version = '8' -end - -if RUBY_ENGINE == 'ruby' - require 'rake/extensiontask' - - Rake::ExtensionTask.new('concurrent_ruby_ext', ext_gemspec) do |ext| - ext.ext_dir = 'ext/concurrent-ruby-ext' - ext.lib_dir = 'lib/concurrent-ruby/concurrent' - ext.source_pattern = '*.{c,h}' - - ext.cross_compile = true - ext.cross_platform = ['x86-mingw32', 'x64-mingw32'] - end -end - -def which?(executable) - !`which #{executable} 2>/dev/null`.empty? -end - -require 'rake_compiler_dock' -namespace :repackage do - desc '* with Windows fat distributions' - task :all do - Dir.chdir(__dir__) do - # store gems in vendor cache for docker - Bundler.with_original_env do - sh 'bundle package' - end - - # build only the jar file not the whole gem for java platform, the jar is part the concurrent-ruby-x.y.z.gem - Rake::Task['lib/concurrent-ruby/concurrent/concurrent_ruby.jar'].invoke - - # build all gem files - rack_compiler_dock_kwargs = {} - if which?('podman') and (!which?('docker') || `docker --version`.include?('podman')) - # podman and only podman available, so RakeCompilerDock will use podman, otherwise it uses docker - rack_compiler_dock_kwargs = { - options: ['--privileged'], # otherwise the directory in the image is empty - runas: false - } - end - %w[x86-mingw32 x64-mingw32].each do |plat| - RakeCompilerDock.sh( - "bundle install --local && bundle exec rake native:#{plat} gem --trace", - platform: plat, - **rack_compiler_dock_kwargs) - end - end - end -end - -require 'rubygems' -require 'rubygems/package_task' - -Gem::PackageTask.new(core_gemspec) {} if core_gemspec -Gem::PackageTask.new(ext_gemspec) {} if ext_gemspec && RUBY_ENGINE != 'jruby' -Gem::PackageTask.new(edge_gemspec) {} if edge_gemspec - -CLEAN.include( - 'lib/concurrent-ruby/concurrent/concurrent_ruby_ext.*', - 'lib/concurrent-ruby/concurrent/2.*', - 'lib/concurrent-ruby/concurrent/*.jar') - -begin - require 'rspec' - require 'rspec/core/rake_task' - - RSpec::Core::RakeTask.new(:spec) - - namespace :spec do - desc '* Configured for ci' - RSpec::Core::RakeTask.new(:ci) do |t| - options = %w[ --color - --backtrace - --order defined - --format documentation ] - t.rspec_opts = [*options].join(' ') - end - - desc '* test packaged and installed gems instead of local files' - task :installed do - Bundler.with_original_env do - Dir.chdir(__dir__) do - sh "gem install pkg/concurrent-ruby-#{version}.gem" - sh "gem install pkg/concurrent-ruby-ext-#{version}.gem" if RUBY_ENGINE == 'ruby' - sh "gem install pkg/concurrent-ruby-edge-#{edge_version}.gem" - ENV['NO_PATH'] = 'true' - sh 'bundle update' - sh 'bundle exec rake spec:ci' - end - end - end - end - - desc 'executed in CI' - task :ci => [:compile, 'spec:ci'] - - desc 'run each spec file in a separate process to help find missing requires' - task 'spec:isolated' do - glob = "#{ENV['DIR'] || 'spec'}/**/*_spec.rb" - from = ENV['FROM'] - env = { 'ISOLATED' => 'true' } - Dir[glob].each do |spec| - next if from and from != spec - from = nil if from == spec - - sh env, 'rspec', spec - end - end - - task :default => [:clobber, :compile, :spec] -rescue LoadError => e - puts 'RSpec is not installed, skipping test task definitions: ' + e.message -end - -current_yard_version_name = version - -begin - require 'yard' - require 'md_ruby_eval' - require_relative 'support/yard_full_types' - - common_yard_options = ['--no-yardopts', - '--no-document', - '--no-private', - '--embed-mixins', - '--markup', 'markdown', - '--title', 'Concurrent Ruby', - '--template', 'default', - '--template-path', 'yard-template', - '--default-return', 'undocumented'] - - desc 'Generate YARD Documentation (signpost, master)' - task :yard => ['yard:signpost', 'yard:master'] - - namespace :yard do - - desc '* eval markdown files' - task :eval_md do - Dir.chdir File.join(__dir__, 'docs-source') do - sh 'bundle exec md-ruby-eval --auto' - end - end - - task :update_readme do - Dir.chdir __dir__ do - content = File.read(File.join('README.md')). - gsub(/\[([\w ]+)\]\(http:\/\/ruby-concurrency\.github\.io\/concurrent-ruby\/master\/.*\)/) do |_| - case $1 - when 'LockFreeLinkedSet' - "{Concurrent::Edge::#{$1} #{$1}}" - when '.dataflow' - '{Concurrent.dataflow Concurrent.dataflow}' - when 'thread pool' - '{file:thread_pools.md thread pool}' - else - "{Concurrent::#{$1} #{$1}}" - end - end - FileUtils.mkpath 'tmp' - File.write 'tmp/README.md', content - end - end - - define_yard_task = -> name do - output_dir = "docs/#{name}" - - removal_name = "remove.#{name}" - task removal_name do - Dir.chdir __dir__ do - FileUtils.rm_rf output_dir - end - end - - desc "* of #{name} into subdir #{name}" - YARD::Rake::YardocTask.new(name) do |yard| - yard.options.push( - '--output-dir', output_dir, - '--main', 'tmp/README.md', - *common_yard_options) - yard.files = ['./lib/concurrent-ruby/**/*.rb', - './lib/concurrent-ruby-edge/**/*.rb', - './ext/concurrent_ruby_ext/**/*.c', - '-', - 'docs-source/thread_pools.md', - 'docs-source/promises.out.md', - 'docs-source/medium-example.out.rb', - 'LICENSE.txt', - 'CHANGELOG.md'] - end - Rake::Task[name].prerequisites.push removal_name, - # 'yard:eval_md', - 'yard:update_readme' - end - - define_yard_task.call current_yard_version_name - define_yard_task.call 'master' - - desc "* signpost for versions" - YARD::Rake::YardocTask.new(:signpost) do |yard| - yard.options.push( - '--output-dir', 'docs', - '--main', 'docs-source/signpost.md', - *common_yard_options) - yard.files = ['no-lib'] - end - end - -rescue LoadError => e - puts 'YARD is not installed, skipping documentation task definitions: ' + e.message -end - -desc 'build, test, and publish the gem' -task :release => ['release:checks', 'release:build', 'release:test', 'release:publish'] - -namespace :release do - # Depends on environment of @pitr-ch - - task :checks do - raise '$CONCURRENT_JRUBY_HOME must be set' unless ENV['CONCURRENT_JRUBY_HOME'] - - Dir.chdir(__dir__) do - sh 'test -z "$(git status --porcelain)"' do |ok, res| - unless ok - begin - status = `git status --porcelain` - STDOUT.puts 'There are local changes that you might want to commit.', status, 'Continue? (y/n)' - input = STDIN.gets.strip.downcase - end until %w(y n).include?(input) - exit 1 if input == 'n' - end - end - sh 'git fetch' - sh 'test $(git show-ref --verify --hash refs/heads/master) = ' + - '$(git show-ref --verify --hash refs/remotes/origin/master)' do |ok, res| - unless ok - begin - STDOUT.puts 'Local master branch is not pushed to origin.', 'Continue? (y/n)' - input = STDIN.gets.strip.downcase - end until %w(y n).include?(input) - exit 1 if input == 'n' - end - end - end - end - - desc '* build all *.gem files necessary for release' - task :build => [:clobber, 'repackage:all'] - - desc '* test actual installed gems instead of cloned repository on MRI and JRuby' - task :test do - raise '$CONCURRENT_JRUBY_HOME must be set' unless ENV['CONCURRENT_JRUBY_HOME'] - - Dir.chdir(__dir__) do - puts "Testing with the installed gem" - - Bundler.with_original_env do - sh 'ruby -v' - sh 'bundle install' - sh 'bundle exec rake spec:installed' - - env = { "PATH" => "#{ENV.fetch('CONCURRENT_JRUBY_HOME')}/bin:#{ENV['PATH']}" } - sh env, 'ruby -v' - sh env, 'bundle install' - sh env, 'bundle exec rake spec:installed' - end - - puts 'Windows build is untested' - end - end - - desc '* do all nested steps' - task :publish => ['publish:ask', 'publish:tag', 'publish:rubygems', 'publish:post_steps'] - - namespace :publish do - publish_base = nil - publish_edge = nil - - task :ask do - begin - STDOUT.puts 'Do you want to publish anything now? (y/n)' - input = STDIN.gets.strip.downcase - end until %w(y n).include?(input) - exit 1 if input == 'n' - - begin - STDOUT.puts 'Do you want to publish `concurrent-ruby`? (y/n)' - input = STDIN.gets.strip.downcase - end until %w(y n).include?(input) - publish_base = input == 'y' - - begin - STDOUT.puts 'Do you want to publish `concurrent-ruby-edge`? (y/n)' - input = STDIN.gets.strip.downcase - end until %w(y n).include?(input) - publish_edge = input == 'y' - end - - desc '** tag HEAD with current version and push to github' - task :tag => :ask do - Dir.chdir(__dir__) do - sh "git tag v#{version}" if publish_base - sh "git push origin v#{version}" if publish_base - sh "git tag edge-v#{edge_version}" if publish_edge - sh "git push origin edge-v#{edge_version}" if publish_edge - end - end - - desc '** push all *.gem files to rubygems' - task :rubygems => :ask do - Dir.chdir(__dir__) do - sh "gem push pkg/concurrent-ruby-#{version}.gem" if publish_base - sh "gem push pkg/concurrent-ruby-edge-#{edge_version}.gem" if publish_edge - sh "gem push pkg/concurrent-ruby-ext-#{version}.gem" if publish_base - sh "gem push pkg/concurrent-ruby-ext-#{version}-x64-mingw32.gem" if publish_base - sh "gem push pkg/concurrent-ruby-ext-#{version}-x86-mingw32.gem" if publish_base - end - end - - desc '** print post release steps' - task :post_steps do - # TODO: (petr 05-Jun-2021) automate and renew the process - puts 'Manually: create a release on GitHub with relevant changelog part' - puts 'Manually: send email same as release with relevant changelog part' - puts 'Manually: tweet' - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/ConcurrentRubyService.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/ConcurrentRubyService.java deleted file mode 100644 index fb6be96d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/ConcurrentRubyService.java +++ /dev/null @@ -1,17 +0,0 @@ -import org.jruby.Ruby; -import org.jruby.runtime.load.BasicLibraryService; - -import java.io.IOException; - -public class ConcurrentRubyService implements BasicLibraryService { - - public boolean basicLoad(final Ruby runtime) throws IOException { - new com.concurrent_ruby.ext.AtomicReferenceLibrary().load(runtime, false); - new com.concurrent_ruby.ext.JavaAtomicBooleanLibrary().load(runtime, false); - new com.concurrent_ruby.ext.JavaAtomicFixnumLibrary().load(runtime, false); - new com.concurrent_ruby.ext.JavaSemaphoreLibrary().load(runtime, false); - new com.concurrent_ruby.ext.SynchronizationLibrary().load(runtime, false); - new com.concurrent_ruby.ext.JRubyMapBackendLibrary().load(runtime, false); - return true; - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/AtomicReferenceLibrary.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/AtomicReferenceLibrary.java deleted file mode 100644 index dfa9e770..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/AtomicReferenceLibrary.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.concurrent_ruby.ext; - -import java.lang.reflect.Field; -import java.io.IOException; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; -import org.jruby.Ruby; -import org.jruby.RubyClass; -import org.jruby.RubyModule; -import org.jruby.RubyNumeric; -import org.jruby.RubyObject; -import org.jruby.anno.JRubyClass; -import org.jruby.anno.JRubyMethod; -import org.jruby.runtime.ObjectAllocator; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; -import org.jruby.runtime.load.Library; - -/** - * This library adds an atomic reference type to JRuby for use in the atomic - * library. We do a native version to avoid the implicit value coercion that - * normally happens through JI. - * - * @author headius - */ -public class AtomicReferenceLibrary implements Library { - public void load(Ruby runtime, boolean wrap) throws IOException { - RubyModule concurrentMod = runtime.defineModule("Concurrent"); - RubyClass atomicCls = concurrentMod.defineClassUnder("JavaAtomicReference", runtime.getObject(), JRUBYREFERENCE_ALLOCATOR); - try { - sun.misc.Unsafe.class.getMethod("getAndSetObject", Object.class); - atomicCls.setAllocator(JRUBYREFERENCE8_ALLOCATOR); - } catch (Exception e) { - // leave it as Java 6/7 version - } - atomicCls.defineAnnotatedMethods(JRubyReference.class); - } - - private static final ObjectAllocator JRUBYREFERENCE_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JRubyReference(runtime, klazz); - } - }; - - private static final ObjectAllocator JRUBYREFERENCE8_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JRubyReference8(runtime, klazz); - } - }; - - @JRubyClass(name="JRubyReference", parent="Object") - public static class JRubyReference extends RubyObject { - volatile IRubyObject reference; - - static final sun.misc.Unsafe UNSAFE; - static final long referenceOffset; - - static { - try { - UNSAFE = UnsafeHolder.U; - Class k = JRubyReference.class; - referenceOffset = UNSAFE.objectFieldOffset(k.getDeclaredField("reference")); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - public JRubyReference(Ruby runtime, RubyClass klass) { - super(runtime, klass); - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context) { - UNSAFE.putObject(this, referenceOffset, context.nil); - return context.nil; - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context, IRubyObject value) { - UNSAFE.putObject(this, referenceOffset, value); - return context.nil; - } - - @JRubyMethod(name = {"get", "value"}) - public IRubyObject get() { - return reference; - } - - @JRubyMethod(name = {"set", "value="}) - public IRubyObject set(IRubyObject newValue) { - UNSAFE.putObjectVolatile(this, referenceOffset, newValue); - return newValue; - } - - @JRubyMethod(name = {"compare_and_set", "compare_and_swap"}) - public IRubyObject compare_and_set(ThreadContext context, IRubyObject expectedValue, IRubyObject newValue) { - Ruby runtime = context.runtime; - - if (expectedValue instanceof RubyNumeric) { - // numerics are not always idempotent in Ruby, so we need to do slower logic - return compareAndSetNumeric(context, expectedValue, newValue); - } - - return runtime.newBoolean(UNSAFE.compareAndSwapObject(this, referenceOffset, expectedValue, newValue)); - } - - @JRubyMethod(name = {"get_and_set", "swap"}) - public IRubyObject get_and_set(ThreadContext context, IRubyObject newValue) { - // less-efficient version for Java 6 and 7 - while (true) { - IRubyObject oldValue = get(); - if (UNSAFE.compareAndSwapObject(this, referenceOffset, oldValue, newValue)) { - return oldValue; - } - } - } - - private IRubyObject compareAndSetNumeric(ThreadContext context, IRubyObject expectedValue, IRubyObject newValue) { - Ruby runtime = context.runtime; - - // loop until: - // * reference CAS would succeed for same-valued objects - // * current and expected have different values as determined by #equals - while (true) { - IRubyObject current = reference; - - if (!(current instanceof RubyNumeric)) { - // old value is not numeric, CAS fails - return runtime.getFalse(); - } - - RubyNumeric currentNumber = (RubyNumeric)current; - if (!currentNumber.equals(expectedValue)) { - // current number does not equal expected, fail CAS - return runtime.getFalse(); - } - - // check that current has not changed, or else allow loop to repeat - boolean success = UNSAFE.compareAndSwapObject(this, referenceOffset, current, newValue); - if (success) { - // value is same and did not change in interim...success - return runtime.getTrue(); - } - } - } - } - - private static final class UnsafeHolder { - private UnsafeHolder(){} - - public static final sun.misc.Unsafe U = loadUnsafe(); - - private static sun.misc.Unsafe loadUnsafe() { - try { - Class unsafeClass = Class.forName("sun.misc.Unsafe"); - Field f = unsafeClass.getDeclaredField("theUnsafe"); - f.setAccessible(true); - return (sun.misc.Unsafe) f.get(null); - } catch (Exception e) { - return null; - } - } - } - - public static class JRubyReference8 extends JRubyReference { - public JRubyReference8(Ruby runtime, RubyClass klass) { - super(runtime, klass); - } - - @Override - public IRubyObject get_and_set(ThreadContext context, IRubyObject newValue) { - // efficient version for Java 8 - return (IRubyObject)UNSAFE.getAndSetObject(this, referenceOffset, newValue); - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JRubyMapBackendLibrary.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JRubyMapBackendLibrary.java deleted file mode 100644 index a09f9162..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JRubyMapBackendLibrary.java +++ /dev/null @@ -1,248 +0,0 @@ -package com.concurrent_ruby.ext; - -import org.jruby.*; -import org.jruby.anno.JRubyClass; -import org.jruby.anno.JRubyMethod; -import com.concurrent_ruby.ext.jsr166e.ConcurrentHashMap; -import com.concurrent_ruby.ext.jsr166e.ConcurrentHashMapV8; -import com.concurrent_ruby.ext.jsr166e.nounsafe.*; -import org.jruby.runtime.Block; -import org.jruby.runtime.ObjectAllocator; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; -import org.jruby.runtime.load.Library; - -import java.io.IOException; -import java.util.Map; - -import static org.jruby.runtime.Visibility.PRIVATE; - -/** - * Native Java implementation to avoid the JI overhead. - * - * @author thedarkone - */ -public class JRubyMapBackendLibrary implements Library { - public void load(Ruby runtime, boolean wrap) throws IOException { - - RubyModule concurrentMod = runtime.defineModule("Concurrent"); - RubyModule thread_safeMod = concurrentMod.defineModuleUnder("Collection"); - RubyClass jrubyRefClass = thread_safeMod.defineClassUnder("JRubyMapBackend", runtime.getObject(), BACKEND_ALLOCATOR); - jrubyRefClass.setAllocator(BACKEND_ALLOCATOR); - jrubyRefClass.defineAnnotatedMethods(JRubyMapBackend.class); - } - - private static final ObjectAllocator BACKEND_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JRubyMapBackend(runtime, klazz); - } - }; - - @JRubyClass(name="JRubyMapBackend", parent="Object") - public static class JRubyMapBackend extends RubyObject { - // Defaults used by the CHM - static final int DEFAULT_INITIAL_CAPACITY = 16; - static final float DEFAULT_LOAD_FACTOR = 0.75f; - - public static final boolean CAN_USE_UNSAFE_CHM = canUseUnsafeCHM(); - - private ConcurrentHashMap map; - - private static ConcurrentHashMap newCHM(int initialCapacity, float loadFactor) { - if (CAN_USE_UNSAFE_CHM) { - return new ConcurrentHashMapV8(initialCapacity, loadFactor); - } else { - return new com.concurrent_ruby.ext.jsr166e.nounsafe.ConcurrentHashMapV8(initialCapacity, loadFactor); - } - } - - private static ConcurrentHashMap newCHM() { - return newCHM(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR); - } - - private static boolean canUseUnsafeCHM() { - try { - new com.concurrent_ruby.ext.jsr166e.ConcurrentHashMapV8(); // force class load and initialization - return true; - } catch (Throwable t) { // ensuring we really do catch everything - // Doug's Unsafe setup errors always have this "Could not ini.." message - if (isCausedBySecurityException(t)) { - return false; - } - throw (t instanceof RuntimeException ? (RuntimeException) t : new RuntimeException(t)); - } - } - - private static boolean isCausedBySecurityException(Throwable t) { - while (t != null) { - if ((t.getMessage() != null && t.getMessage().contains("Could not initialize intrinsics")) || t instanceof SecurityException) { - return true; - } - t = t.getCause(); - } - return false; - } - - public JRubyMapBackend(Ruby runtime, RubyClass klass) { - super(runtime, klass); - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context) { - map = newCHM(); - return context.getRuntime().getNil(); - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context, IRubyObject options) { - map = toCHM(context, options); - return context.getRuntime().getNil(); - } - - private ConcurrentHashMap toCHM(ThreadContext context, IRubyObject options) { - Ruby runtime = context.getRuntime(); - if (!options.isNil() && options.respondsTo("[]")) { - IRubyObject rInitialCapacity = options.callMethod(context, "[]", runtime.newSymbol("initial_capacity")); - IRubyObject rLoadFactor = options.callMethod(context, "[]", runtime.newSymbol("load_factor")); - int initialCapacity = !rInitialCapacity.isNil() ? RubyNumeric.num2int(rInitialCapacity.convertToInteger()) : DEFAULT_INITIAL_CAPACITY; - float loadFactor = !rLoadFactor.isNil() ? (float)RubyNumeric.num2dbl(rLoadFactor.convertToFloat()) : DEFAULT_LOAD_FACTOR; - return newCHM(initialCapacity, loadFactor); - } else { - return newCHM(); - } - } - - @JRubyMethod(name = "[]", required = 1) - public IRubyObject op_aref(ThreadContext context, IRubyObject key) { - IRubyObject value; - return ((value = map.get(key)) == null) ? context.getRuntime().getNil() : value; - } - - @JRubyMethod(name = {"[]="}, required = 2) - public IRubyObject op_aset(IRubyObject key, IRubyObject value) { - map.put(key, value); - return value; - } - - @JRubyMethod - public IRubyObject put_if_absent(IRubyObject key, IRubyObject value) { - IRubyObject result = map.putIfAbsent(key, value); - return result == null ? getRuntime().getNil() : result; - } - - @JRubyMethod - public IRubyObject compute_if_absent(final ThreadContext context, final IRubyObject key, final Block block) { - return map.computeIfAbsent(key, new ConcurrentHashMap.Fun() { - @Override - public IRubyObject apply(IRubyObject key) { - return block.yieldSpecific(context); - } - }); - } - - @JRubyMethod - public IRubyObject compute_if_present(final ThreadContext context, final IRubyObject key, final Block block) { - IRubyObject result = map.computeIfPresent(key, new ConcurrentHashMap.BiFun() { - @Override - public IRubyObject apply(IRubyObject key, IRubyObject oldValue) { - IRubyObject result = block.yieldSpecific(context, oldValue == null ? context.getRuntime().getNil() : oldValue); - return result.isNil() ? null : result; - } - }); - return result == null ? context.getRuntime().getNil() : result; - } - - @JRubyMethod - public IRubyObject compute(final ThreadContext context, final IRubyObject key, final Block block) { - IRubyObject result = map.compute(key, new ConcurrentHashMap.BiFun() { - @Override - public IRubyObject apply(IRubyObject key, IRubyObject oldValue) { - IRubyObject result = block.yieldSpecific(context, oldValue == null ? context.getRuntime().getNil() : oldValue); - return result.isNil() ? null : result; - } - }); - return result == null ? context.getRuntime().getNil() : result; - } - - @JRubyMethod - public IRubyObject merge_pair(final ThreadContext context, final IRubyObject key, final IRubyObject value, final Block block) { - IRubyObject result = map.merge(key, value, new ConcurrentHashMap.BiFun() { - @Override - public IRubyObject apply(IRubyObject oldValue, IRubyObject newValue) { - IRubyObject result = block.yieldSpecific(context, oldValue == null ? context.getRuntime().getNil() : oldValue); - return result.isNil() ? null : result; - } - }); - return result == null ? context.getRuntime().getNil() : result; - } - - @JRubyMethod - public RubyBoolean replace_pair(IRubyObject key, IRubyObject oldValue, IRubyObject newValue) { - return getRuntime().newBoolean(map.replace(key, oldValue, newValue)); - } - - @JRubyMethod(name = "key?", required = 1) - public RubyBoolean has_key_p(IRubyObject key) { - return map.containsKey(key) ? getRuntime().getTrue() : getRuntime().getFalse(); - } - - @JRubyMethod - public IRubyObject key(IRubyObject value) { - final IRubyObject key = map.findKey(value); - return key == null ? getRuntime().getNil() : key; - } - - @JRubyMethod - public IRubyObject replace_if_exists(IRubyObject key, IRubyObject value) { - IRubyObject result = map.replace(key, value); - return result == null ? getRuntime().getNil() : result; - } - - @JRubyMethod - public IRubyObject get_and_set(IRubyObject key, IRubyObject value) { - IRubyObject result = map.put(key, value); - return result == null ? getRuntime().getNil() : result; - } - - @JRubyMethod - public IRubyObject delete(IRubyObject key) { - IRubyObject result = map.remove(key); - return result == null ? getRuntime().getNil() : result; - } - - @JRubyMethod - public RubyBoolean delete_pair(IRubyObject key, IRubyObject value) { - return getRuntime().newBoolean(map.remove(key, value)); - } - - @JRubyMethod - public IRubyObject clear() { - map.clear(); - return this; - } - - @JRubyMethod - public IRubyObject each_pair(ThreadContext context, Block block) { - for (Map.Entry entry : map.entrySet()) { - block.yieldSpecific(context, entry.getKey(), entry.getValue()); - } - return this; - } - - @JRubyMethod - public RubyFixnum size(ThreadContext context) { - return context.getRuntime().newFixnum(map.size()); - } - - @JRubyMethod - public IRubyObject get_or_default(IRubyObject key, IRubyObject defaultValue) { - return map.getValueOrDefault(key, defaultValue); - } - - @JRubyMethod(visibility = PRIVATE) - public JRubyMapBackend initialize_copy(ThreadContext context, IRubyObject other) { - map = newCHM(); - return this; - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicBooleanLibrary.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicBooleanLibrary.java deleted file mode 100644 index b5660762..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicBooleanLibrary.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.concurrent_ruby.ext; - -import org.jruby.Ruby; -import org.jruby.RubyBoolean; -import org.jruby.RubyClass; -import org.jruby.RubyModule; -import org.jruby.RubyNil; -import org.jruby.RubyObject; -import org.jruby.anno.JRubyClass; -import org.jruby.anno.JRubyMethod; -import org.jruby.runtime.ObjectAllocator; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; -import org.jruby.runtime.load.Library; - -import java.io.IOException; -import java.util.concurrent.atomic.AtomicBoolean; - -public class JavaAtomicBooleanLibrary implements Library { - - public void load(Ruby runtime, boolean wrap) throws IOException { - RubyModule concurrentMod = runtime.defineModule("Concurrent"); - RubyClass atomicCls = concurrentMod.defineClassUnder("JavaAtomicBoolean", runtime.getObject(), JRUBYREFERENCE_ALLOCATOR); - atomicCls.defineAnnotatedMethods(JavaAtomicBoolean.class); - } - - private static final ObjectAllocator JRUBYREFERENCE_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JavaAtomicBoolean(runtime, klazz); - } - }; - - @JRubyClass(name = "JavaAtomicBoolean", parent = "Object") - public static class JavaAtomicBoolean extends RubyObject { - - private AtomicBoolean atomicBoolean; - - public JavaAtomicBoolean(Ruby runtime, RubyClass metaClass) { - super(runtime, metaClass); - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context, IRubyObject value) { - atomicBoolean = new AtomicBoolean(convertRubyBooleanToJavaBoolean(value)); - return context.nil; - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context) { - atomicBoolean = new AtomicBoolean(); - return context.nil; - } - - @JRubyMethod(name = "value") - public IRubyObject value() { - return getRuntime().newBoolean(atomicBoolean.get()); - } - - @JRubyMethod(name = "true?") - public IRubyObject isAtomicTrue() { - return getRuntime().newBoolean(atomicBoolean.get()); - } - - @JRubyMethod(name = "false?") - public IRubyObject isAtomicFalse() { - return getRuntime().newBoolean((atomicBoolean.get() == false)); - } - - @JRubyMethod(name = "value=") - public IRubyObject setAtomic(ThreadContext context, IRubyObject newValue) { - atomicBoolean.set(convertRubyBooleanToJavaBoolean(newValue)); - return context.nil; - } - - @JRubyMethod(name = "make_true") - public IRubyObject makeTrue() { - return getRuntime().newBoolean(atomicBoolean.compareAndSet(false, true)); - } - - @JRubyMethod(name = "make_false") - public IRubyObject makeFalse() { - return getRuntime().newBoolean(atomicBoolean.compareAndSet(true, false)); - } - - private boolean convertRubyBooleanToJavaBoolean(IRubyObject newValue) { - if (newValue instanceof RubyBoolean.False || newValue instanceof RubyNil) { - return false; - } else { - return true; - } - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicFixnumLibrary.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicFixnumLibrary.java deleted file mode 100644 index 672bfc04..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaAtomicFixnumLibrary.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.concurrent_ruby.ext; - -import java.io.IOException; -import java.util.concurrent.atomic.AtomicLong; -import org.jruby.Ruby; -import org.jruby.RubyClass; -import org.jruby.RubyFixnum; -import org.jruby.RubyModule; -import org.jruby.RubyObject; -import org.jruby.anno.JRubyClass; -import org.jruby.anno.JRubyMethod; -import org.jruby.runtime.ObjectAllocator; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; -import org.jruby.runtime.load.Library; -import org.jruby.runtime.Block; - -public class JavaAtomicFixnumLibrary implements Library { - - public void load(Ruby runtime, boolean wrap) throws IOException { - RubyModule concurrentMod = runtime.defineModule("Concurrent"); - RubyClass atomicCls = concurrentMod.defineClassUnder("JavaAtomicFixnum", runtime.getObject(), JRUBYREFERENCE_ALLOCATOR); - - atomicCls.defineAnnotatedMethods(JavaAtomicFixnum.class); - } - - private static final ObjectAllocator JRUBYREFERENCE_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JavaAtomicFixnum(runtime, klazz); - } - }; - - @JRubyClass(name = "JavaAtomicFixnum", parent = "Object") - public static class JavaAtomicFixnum extends RubyObject { - - private AtomicLong atomicLong; - - public JavaAtomicFixnum(Ruby runtime, RubyClass metaClass) { - super(runtime, metaClass); - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context) { - this.atomicLong = new AtomicLong(0); - return context.nil; - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context, IRubyObject value) { - this.atomicLong = new AtomicLong(rubyFixnumToLong(value)); - return context.nil; - } - - @JRubyMethod(name = "value") - public IRubyObject getValue() { - return getRuntime().newFixnum(atomicLong.get()); - } - - @JRubyMethod(name = "value=") - public IRubyObject setValue(ThreadContext context, IRubyObject newValue) { - atomicLong.set(rubyFixnumToLong(newValue)); - return context.nil; - } - - @JRubyMethod(name = {"increment", "up"}) - public IRubyObject increment() { - return getRuntime().newFixnum(atomicLong.incrementAndGet()); - } - - @JRubyMethod(name = {"increment", "up"}) - public IRubyObject increment(IRubyObject value) { - long delta = rubyFixnumToLong(value); - return getRuntime().newFixnum(atomicLong.addAndGet(delta)); - } - - @JRubyMethod(name = {"decrement", "down"}) - public IRubyObject decrement() { - return getRuntime().newFixnum(atomicLong.decrementAndGet()); - } - - @JRubyMethod(name = {"decrement", "down"}) - public IRubyObject decrement(IRubyObject value) { - long delta = rubyFixnumToLong(value); - return getRuntime().newFixnum(atomicLong.addAndGet(-delta)); - } - - @JRubyMethod(name = "compare_and_set") - public IRubyObject compareAndSet(ThreadContext context, IRubyObject expect, IRubyObject update) { - return getRuntime().newBoolean(atomicLong.compareAndSet(rubyFixnumToLong(expect), rubyFixnumToLong(update))); - } - - @JRubyMethod - public IRubyObject update(ThreadContext context, Block block) { - for (;;) { - long _oldValue = atomicLong.get(); - IRubyObject oldValue = getRuntime().newFixnum(_oldValue); - IRubyObject newValue = block.yield(context, oldValue); - if (atomicLong.compareAndSet(_oldValue, rubyFixnumToLong(newValue))) { - return newValue; - } - } - } - - private long rubyFixnumToLong(IRubyObject value) { - if (value instanceof RubyFixnum) { - RubyFixnum fixNum = (RubyFixnum) value; - return fixNum.getLongValue(); - } else { - throw getRuntime().newArgumentError("value must be a Fixnum"); - } - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaSemaphoreLibrary.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaSemaphoreLibrary.java deleted file mode 100644 index d887f250..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/JavaSemaphoreLibrary.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.concurrent_ruby.ext; - -import java.io.IOException; -import java.util.concurrent.Semaphore; -import org.jruby.Ruby; -import org.jruby.RubyClass; -import org.jruby.RubyFixnum; -import org.jruby.RubyModule; -import org.jruby.RubyNumeric; -import org.jruby.RubyObject; -import org.jruby.anno.JRubyClass; -import org.jruby.anno.JRubyMethod; -import org.jruby.runtime.Block; -import org.jruby.runtime.ObjectAllocator; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; - -public class JavaSemaphoreLibrary { - - public void load(Ruby runtime, boolean wrap) throws IOException { - RubyModule concurrentMod = runtime.defineModule("Concurrent"); - RubyClass atomicCls = concurrentMod.defineClassUnder("JavaSemaphore", runtime.getObject(), JRUBYREFERENCE_ALLOCATOR); - - atomicCls.defineAnnotatedMethods(JavaSemaphore.class); - } - - private static final ObjectAllocator JRUBYREFERENCE_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JavaSemaphore(runtime, klazz); - } - }; - - @JRubyClass(name = "JavaSemaphore", parent = "Object") - public static class JavaSemaphore extends RubyObject { - - private JRubySemaphore semaphore; - - public JavaSemaphore(Ruby runtime, RubyClass metaClass) { - super(runtime, metaClass); - } - - @JRubyMethod - public IRubyObject initialize(ThreadContext context, IRubyObject value) { - this.semaphore = new JRubySemaphore(rubyFixnumInt(value, "count")); - return context.nil; - } - - @JRubyMethod - public IRubyObject acquire(ThreadContext context, final Block block) throws InterruptedException { - return this.acquire(context, 1, block); - } - - @JRubyMethod - public IRubyObject acquire(ThreadContext context, IRubyObject permits, final Block block) throws InterruptedException { - return this.acquire(context, rubyFixnumToPositiveInt(permits, "permits"), block); - } - - @JRubyMethod(name = "available_permits") - public IRubyObject availablePermits(ThreadContext context) { - return getRuntime().newFixnum(this.semaphore.availablePermits()); - } - - @JRubyMethod(name = "drain_permits") - public IRubyObject drainPermits(ThreadContext context) { - return getRuntime().newFixnum(this.semaphore.drainPermits()); - } - - @JRubyMethod(name = "try_acquire") - public IRubyObject tryAcquire(ThreadContext context, final Block block) throws InterruptedException { - int permitsInt = 1; - boolean acquired = semaphore.tryAcquire(permitsInt); - - return triedAcquire(context, permitsInt, acquired, block); - } - - @JRubyMethod(name = "try_acquire") - public IRubyObject tryAcquire(ThreadContext context, IRubyObject permits, final Block block) throws InterruptedException { - int permitsInt = rubyFixnumToPositiveInt(permits, "permits"); - boolean acquired = semaphore.tryAcquire(permitsInt); - - return triedAcquire(context, permitsInt, acquired, block); - } - - @JRubyMethod(name = "try_acquire") - public IRubyObject tryAcquire(ThreadContext context, IRubyObject permits, IRubyObject timeout, final Block block) throws InterruptedException { - int permitsInt = rubyFixnumToPositiveInt(permits, "permits"); - boolean acquired = semaphore.tryAcquire( - permitsInt, - rubyNumericToLong(timeout, "timeout"), - java.util.concurrent.TimeUnit.SECONDS - ); - - return triedAcquire(context, permitsInt, acquired, block); - } - - @JRubyMethod - public IRubyObject release(ThreadContext context) { - this.semaphore.release(1); - return getRuntime().newBoolean(true); - } - - @JRubyMethod - public IRubyObject release(ThreadContext context, IRubyObject permits) { - this.semaphore.release(rubyFixnumToPositiveInt(permits, "permits")); - return getRuntime().newBoolean(true); - } - - @JRubyMethod(name = "reduce_permits") - public IRubyObject reducePermits(ThreadContext context, IRubyObject reduction) throws InterruptedException { - this.semaphore.publicReducePermits(rubyFixnumToNonNegativeInt(reduction, "reduction")); - return context.nil; - } - - private IRubyObject acquire(ThreadContext context, int permits, final Block block) throws InterruptedException { - this.semaphore.acquire(permits); - - if (!block.isGiven()) return context.nil; - - try { - return block.yieldSpecific(context); - } finally { - this.semaphore.release(permits); - } - } - - private IRubyObject triedAcquire(ThreadContext context, int permits, boolean acquired, final Block block) { - if (!block.isGiven()) return getRuntime().newBoolean(acquired); - if (!acquired) return context.nil; - - try { - return block.yieldSpecific(context); - } finally { - this.semaphore.release(permits); - } - } - - private int rubyFixnumInt(IRubyObject value, String paramName) { - if (value instanceof RubyFixnum) { - RubyFixnum fixNum = (RubyFixnum) value; - return (int) fixNum.getLongValue(); - } else { - throw getRuntime().newArgumentError(paramName + " must be integer"); - } - } - - private int rubyFixnumToNonNegativeInt(IRubyObject value, String paramName) { - if (value instanceof RubyFixnum && ((RubyFixnum) value).getLongValue() >= 0) { - RubyFixnum fixNum = (RubyFixnum) value; - return (int) fixNum.getLongValue(); - } else { - throw getRuntime().newArgumentError(paramName + " must be a non-negative integer"); - } - } - - private int rubyFixnumToPositiveInt(IRubyObject value, String paramName) { - if (value instanceof RubyFixnum && ((RubyFixnum) value).getLongValue() > 0) { - RubyFixnum fixNum = (RubyFixnum) value; - return (int) fixNum.getLongValue(); - } else { - throw getRuntime().newArgumentError(paramName + " must be an integer greater than zero"); - } - } - - private long rubyNumericToLong(IRubyObject value, String paramName) { - if (value instanceof RubyNumeric && ((RubyNumeric) value).getDoubleValue() > 0) { - RubyNumeric fixNum = (RubyNumeric) value; - return fixNum.getLongValue(); - } else { - throw getRuntime().newArgumentError(paramName + " must be a float greater than zero"); - } - } - - class JRubySemaphore extends Semaphore { - - public JRubySemaphore(int permits) { - super(permits); - } - - public JRubySemaphore(int permits, boolean value) { - super(permits, value); - } - - public void publicReducePermits(int i) { - reducePermits(i); - } - - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/SynchronizationLibrary.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/SynchronizationLibrary.java deleted file mode 100644 index f0c75ee4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/SynchronizationLibrary.java +++ /dev/null @@ -1,292 +0,0 @@ -package com.concurrent_ruby.ext; - -import org.jruby.Ruby; -import org.jruby.RubyBasicObject; -import org.jruby.RubyClass; -import org.jruby.RubyModule; -import org.jruby.RubyObject; -import org.jruby.RubyThread; -import org.jruby.anno.JRubyClass; -import org.jruby.anno.JRubyMethod; -import org.jruby.runtime.Block; -import org.jruby.runtime.ObjectAllocator; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.Visibility; -import org.jruby.runtime.builtin.IRubyObject; -import org.jruby.runtime.load.Library; -import sun.misc.Unsafe; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -public class SynchronizationLibrary implements Library { - - private static final Unsafe UNSAFE = loadUnsafe(); - private static final boolean FULL_FENCE = supportsFences(); - - private static Unsafe loadUnsafe() { - try { - Class ncdfe = Class.forName("sun.misc.Unsafe"); - Field f = ncdfe.getDeclaredField("theUnsafe"); - f.setAccessible(true); - return (Unsafe) f.get((java.lang.Object) null); - } catch (Exception var2) { - return null; - } catch (NoClassDefFoundError var3) { - return null; - } - } - - private static boolean supportsFences() { - if (UNSAFE == null) { - return false; - } else { - try { - Method m = UNSAFE.getClass().getDeclaredMethod("fullFence", new Class[0]); - if (m != null) { - return true; - } - } catch (Exception var1) { - // nothing - } - - return false; - } - } - - private static final ObjectAllocator OBJECT_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new Object(runtime, klazz); - } - }; - - private static final ObjectAllocator ABSTRACT_LOCKABLE_OBJECT_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new AbstractLockableObject(runtime, klazz); - } - }; - - private static final ObjectAllocator JRUBY_LOCKABLE_OBJECT_ALLOCATOR = new ObjectAllocator() { - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JRubyLockableObject(runtime, klazz); - } - }; - - public void load(Ruby runtime, boolean wrap) throws IOException { - RubyModule synchronizationModule = runtime. - defineModule("Concurrent"). - defineModuleUnder("Synchronization"); - - RubyModule jrubyAttrVolatileModule = synchronizationModule.defineModuleUnder("JRubyAttrVolatile"); - jrubyAttrVolatileModule.defineAnnotatedMethods(JRubyAttrVolatile.class); - - defineClass(runtime, synchronizationModule, "AbstractObject", "Object", - Object.class, OBJECT_ALLOCATOR); - - defineClass(runtime, synchronizationModule, "Object", "AbstractLockableObject", - AbstractLockableObject.class, ABSTRACT_LOCKABLE_OBJECT_ALLOCATOR); - - defineClass(runtime, synchronizationModule, "AbstractLockableObject", "JRubyLockableObject", - JRubyLockableObject.class, JRUBY_LOCKABLE_OBJECT_ALLOCATOR); - - defineClass(runtime, synchronizationModule, "Object", "JRuby", - JRuby.class, new ObjectAllocator() { - @Override - public IRubyObject allocate(Ruby runtime, RubyClass klazz) { - return new JRuby(runtime, klazz); - } - }); - } - - private RubyClass defineClass( - Ruby runtime, - RubyModule namespace, - String parentName, - String name, - Class javaImplementation, - ObjectAllocator allocator) { - final RubyClass parentClass = namespace.getClass(parentName); - - if (parentClass == null) { - System.out.println("not found " + parentName); - throw runtime.newRuntimeError(namespace.toString() + "::" + parentName + " is missing"); - } - - final RubyClass newClass = namespace.defineClassUnder(name, parentClass, allocator); - newClass.defineAnnotatedMethods(javaImplementation); - return newClass; - } - - // Facts: - // - all ivar reads are without any synchronisation of fences see - // https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/runtime/ivars/VariableAccessor.java#L110-110 - // - writes depend on UnsafeHolder.U, null -> SynchronizedVariableAccessor, !null -> StampedVariableAccessor - // SynchronizedVariableAccessor wraps with synchronized block, StampedVariableAccessor uses fullFence or - // volatilePut - // TODO (pitr 16-Sep-2015): what do we do in Java 9 ? - - // module JRubyAttrVolatile - public static class JRubyAttrVolatile { - - // volatile threadContext is used as a memory barrier per the JVM memory model happens-before semantic - // on volatile fields. any volatile field could have been used but using the thread context is an - // attempt to avoid code elimination. - private static volatile int volatileField; - - @JRubyMethod(name = "full_memory_barrier", visibility = Visibility.PUBLIC, module = true) - public static IRubyObject fullMemoryBarrier(ThreadContext context, IRubyObject module) { - // Prevent reordering of ivar writes with publication of this instance - if (!FULL_FENCE) { - // Assuming that following volatile read and write is not eliminated it simulates fullFence. - // If it's eliminated it'll cause problems only on non-x86 platforms. - // http://shipilev.net/blog/2014/jmm-pragmatics/#_happens_before_test_your_understanding - final int volatileRead = volatileField; - volatileField = context.getLine(); - } else { - UNSAFE.fullFence(); - } - return context.nil; - } - - @JRubyMethod(name = "instance_variable_get_volatile", visibility = Visibility.PUBLIC, module = true) - public static IRubyObject instanceVariableGetVolatile( - ThreadContext context, - IRubyObject module, - IRubyObject self, - IRubyObject name) { - // Ensure we ses latest value with loadFence - if (!FULL_FENCE) { - // piggybacking on volatile read, simulating loadFence - final int volatileRead = volatileField; - return ((RubyBasicObject) self).instance_variable_get(context, name); - } else { - UNSAFE.loadFence(); - return ((RubyBasicObject) self).instance_variable_get(context, name); - } - } - - @JRubyMethod(name = "instance_variable_set_volatile", visibility = Visibility.PUBLIC, module = true) - public static IRubyObject InstanceVariableSetVolatile( - ThreadContext context, - IRubyObject module, - IRubyObject self, - IRubyObject name, - IRubyObject value) { - // Ensure we make last update visible - if (!FULL_FENCE) { - // piggybacking on volatile write, simulating storeFence - final IRubyObject result = ((RubyBasicObject) self).instance_variable_set(name, value); - volatileField = context.getLine(); - return result; - } else { - // JRuby uses StampedVariableAccessor which calls fullFence - // so no additional steps needed. - // See https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/runtime/ivars/StampedVariableAccessor.java#L151-L159 - return ((RubyBasicObject) self).instance_variable_set(name, value); - } - } - } - - @JRubyClass(name = "Object", parent = "AbstractObject") - public static class Object extends RubyObject { - - public Object(Ruby runtime, RubyClass metaClass) { - super(runtime, metaClass); - } - } - - @JRubyClass(name = "AbstractLockableObject", parent = "Object") - public static class AbstractLockableObject extends Object { - - public AbstractLockableObject(Ruby runtime, RubyClass metaClass) { - super(runtime, metaClass); - } - } - - @JRubyClass(name = "JRubyLockableObject", parent = "AbstractLockableObject") - public static class JRubyLockableObject extends AbstractLockableObject { - - public JRubyLockableObject(Ruby runtime, RubyClass metaClass) { - super(runtime, metaClass); - } - - @JRubyMethod(name = "synchronize", visibility = Visibility.PROTECTED) - public IRubyObject rubySynchronize(ThreadContext context, Block block) { - synchronized (this) { - return block.yield(context, null); - } - } - - @JRubyMethod(name = "ns_wait", optional = 1, visibility = Visibility.PROTECTED) - public IRubyObject nsWait(ThreadContext context, IRubyObject[] args) { - Ruby runtime = context.runtime; - if (args.length > 1) { - throw runtime.newArgumentError(args.length, 1); - } - Double timeout = null; - if (args.length > 0 && !args[0].isNil()) { - timeout = args[0].convertToFloat().getDoubleValue(); - if (timeout < 0) { - throw runtime.newArgumentError("time interval must be positive"); - } - } - if (Thread.interrupted()) { - throw runtime.newConcurrencyError("thread interrupted"); - } - boolean success = false; - try { - success = context.getThread().wait_timeout(this, timeout); - } catch (InterruptedException ie) { - throw runtime.newConcurrencyError(ie.getLocalizedMessage()); - } finally { - // An interrupt or timeout may have caused us to miss - // a notify that we consumed, so do another notify in - // case someone else is available to pick it up. - if (!success) { - this.notify(); - } - } - return this; - } - - @JRubyMethod(name = "ns_signal", visibility = Visibility.PROTECTED) - public IRubyObject nsSignal(ThreadContext context) { - notify(); - return this; - } - - @JRubyMethod(name = "ns_broadcast", visibility = Visibility.PROTECTED) - public IRubyObject nsBroadcast(ThreadContext context) { - notifyAll(); - return this; - } - } - - @JRubyClass(name = "JRuby") - public static class JRuby extends RubyObject { - public JRuby(Ruby runtime, RubyClass metaClass) { - super(runtime, metaClass); - } - - @JRubyMethod(name = "sleep_interruptibly", visibility = Visibility.PUBLIC, module = true) - public static IRubyObject sleepInterruptibly(final ThreadContext context, IRubyObject receiver, final Block block) { - try { - context.getThread().executeBlockingTask(new RubyThread.BlockingTask() { - @Override - public void run() throws InterruptedException { - block.call(context); - } - - @Override - public void wakeup() { - context.getThread().getNativeThread().interrupt(); - } - }); - } catch (InterruptedException e) { - throw context.runtime.newThreadError("interrupted in Concurrent::Synchronization::JRuby.sleep_interruptibly"); - } - return context.nil; - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMap.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMap.java deleted file mode 100644 index e11e15aa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMap.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.concurrent_ruby.ext.jsr166e; - -import java.util.Map; -import java.util.Set; - -public interface ConcurrentHashMap { - /** Interface describing a function of one argument */ - public interface Fun { T apply(A a); } - /** Interface describing a function of two arguments */ - public interface BiFun { T apply(A a, B b); } - - public V get(K key); - public V put(K key, V value); - public V putIfAbsent(K key, V value); - public V computeIfAbsent(K key, Fun mf); - public V computeIfPresent(K key, BiFun mf); - public V compute(K key, BiFun mf); - public V merge(K key, V value, BiFun mf); - public boolean replace(K key, V oldVal, V newVal); - public V replace(K key, V value); - public boolean containsKey(K key); - public boolean remove(Object key, Object value); - public V remove(K key); - public void clear(); - public Set> entrySet(); - public int size(); - public V getValueOrDefault(Object key, V defaultValue); - - public boolean containsValue(V value); - public K findKey(V value); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMapV8.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMapV8.java deleted file mode 100644 index dc9901fb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMapV8.java +++ /dev/null @@ -1,3863 +0,0 @@ -/* - * Written by Doug Lea with assistance from members of JCP JSR-166 - * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// This is based on the 1.79 version. - -package com.concurrent_ruby.ext.jsr166e; - -import org.jruby.RubyClass; -import org.jruby.RubyNumeric; -import org.jruby.RubyObject; -import org.jruby.exceptions.RaiseException; -import com.concurrent_ruby.ext.jsr166y.ThreadLocalRandom; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; - -import java.util.Arrays; -import java.util.Map; -import java.util.Set; -import java.util.Collection; -import java.util.Hashtable; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Enumeration; -import java.util.ConcurrentModificationException; -import java.util.NoSuchElementException; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.locks.AbstractQueuedSynchronizer; - -import java.io.Serializable; - -/** - * A hash table supporting full concurrency of retrievals and - * high expected concurrency for updates. This class obeys the - * same functional specification as {@link java.util.Hashtable}, and - * includes versions of methods corresponding to each method of - * {@code Hashtable}. However, even though all operations are - * thread-safe, retrieval operations do not entail locking, - * and there is not any support for locking the entire table - * in a way that prevents all access. This class is fully - * interoperable with {@code Hashtable} in programs that rely on its - * thread safety but not on its synchronization details. - * - *

Retrieval operations (including {@code get}) generally do not - * block, so may overlap with update operations (including {@code put} - * and {@code remove}). Retrievals reflect the results of the most - * recently completed update operations holding upon their - * onset. (More formally, an update operation for a given key bears a - * happens-before relation with any (non-null) retrieval for - * that key reporting the updated value.) For aggregate operations - * such as {@code putAll} and {@code clear}, concurrent retrievals may - * reflect insertion or removal of only some entries. Similarly, - * Iterators and Enumerations return elements reflecting the state of - * the hash table at some point at or since the creation of the - * iterator/enumeration. They do not throw {@link - * ConcurrentModificationException}. However, iterators are designed - * to be used by only one thread at a time. Bear in mind that the - * results of aggregate status methods including {@code size}, {@code - * isEmpty}, and {@code containsValue} are typically useful only when - * a map is not undergoing concurrent updates in other threads. - * Otherwise the results of these methods reflect transient states - * that may be adequate for monitoring or estimation purposes, but not - * for program control. - * - *

The table is dynamically expanded when there are too many - * collisions (i.e., keys that have distinct hash codes but fall into - * the same slot modulo the table size), with the expected average - * effect of maintaining roughly two bins per mapping (corresponding - * to a 0.75 load factor threshold for resizing). There may be much - * variance around this average as mappings are added and removed, but - * overall, this maintains a commonly accepted time/space tradeoff for - * hash tables. However, resizing this or any other kind of hash - * table may be a relatively slow operation. When possible, it is a - * good idea to provide a size estimate as an optional {@code - * initialCapacity} constructor argument. An additional optional - * {@code loadFactor} constructor argument provides a further means of - * customizing initial table capacity by specifying the table density - * to be used in calculating the amount of space to allocate for the - * given number of elements. Also, for compatibility with previous - * versions of this class, constructors may optionally specify an - * expected {@code concurrencyLevel} as an additional hint for - * internal sizing. Note that using many keys with exactly the same - * {@code hashCode()} is a sure way to slow down performance of any - * hash table. - * - *

A {@link Set} projection of a ConcurrentHashMapV8 may be created - * (using {@link #newKeySet()} or {@link #newKeySet(int)}), or viewed - * (using {@link #keySet(Object)} when only keys are of interest, and the - * mapped values are (perhaps transiently) not used or all take the - * same mapping value. - * - *

A ConcurrentHashMapV8 can be used as scalable frequency map (a - * form of histogram or multiset) by using {@link LongAdder} values - * and initializing via {@link #computeIfAbsent}. For example, to add - * a count to a {@code ConcurrentHashMapV8 freqs}, you - * can use {@code freqs.computeIfAbsent(k -> new - * LongAdder()).increment();} - * - *

This class and its views and iterators implement all of the - * optional methods of the {@link Map} and {@link Iterator} - * interfaces. - * - *

Like {@link Hashtable} but unlike {@link HashMap}, this class - * does not allow {@code null} to be used as a key or value. - * - *

ConcurrentHashMapV8s support parallel operations using the {@link - * ForkJoinPool#commonPool}. (Tasks that may be used in other contexts - * are available in class {@link ForkJoinTasks}). These operations are - * designed to be safely, and often sensibly, applied even with maps - * that are being concurrently updated by other threads; for example, - * when computing a snapshot summary of the values in a shared - * registry. There are three kinds of operation, each with four - * forms, accepting functions with Keys, Values, Entries, and (Key, - * Value) arguments and/or return values. (The first three forms are - * also available via the {@link #keySet()}, {@link #values()} and - * {@link #entrySet()} views). Because the elements of a - * ConcurrentHashMapV8 are not ordered in any particular way, and may be - * processed in different orders in different parallel executions, the - * correctness of supplied functions should not depend on any - * ordering, or on any other objects or values that may transiently - * change while computation is in progress; and except for forEach - * actions, should ideally be side-effect-free. - * - *

    - *
  • forEach: Perform a given action on each element. - * A variant form applies a given transformation on each element - * before performing the action.
  • - * - *
  • search: Return the first available non-null result of - * applying a given function on each element; skipping further - * search when a result is found.
  • - * - *
  • reduce: Accumulate each element. The supplied reduction - * function cannot rely on ordering (more formally, it should be - * both associative and commutative). There are five variants: - * - *
      - * - *
    • Plain reductions. (There is not a form of this method for - * (key, value) function arguments since there is no corresponding - * return type.)
    • - * - *
    • Mapped reductions that accumulate the results of a given - * function applied to each element.
    • - * - *
    • Reductions to scalar doubles, longs, and ints, using a - * given basis value.
    • - * - * - *
    - *
- * - *

The concurrency properties of bulk operations follow - * from those of ConcurrentHashMapV8: Any non-null result returned - * from {@code get(key)} and related access methods bears a - * happens-before relation with the associated insertion or - * update. The result of any bulk operation reflects the - * composition of these per-element relations (but is not - * necessarily atomic with respect to the map as a whole unless it - * is somehow known to be quiescent). Conversely, because keys - * and values in the map are never null, null serves as a reliable - * atomic indicator of the current lack of any result. To - * maintain this property, null serves as an implicit basis for - * all non-scalar reduction operations. For the double, long, and - * int versions, the basis should be one that, when combined with - * any other value, returns that other value (more formally, it - * should be the identity element for the reduction). Most common - * reductions have these properties; for example, computing a sum - * with basis 0 or a minimum with basis MAX_VALUE. - * - *

Search and transformation functions provided as arguments - * should similarly return null to indicate the lack of any result - * (in which case it is not used). In the case of mapped - * reductions, this also enables transformations to serve as - * filters, returning null (or, in the case of primitive - * specializations, the identity basis) if the element should not - * be combined. You can create compound transformations and - * filterings by composing them yourself under this "null means - * there is nothing there now" rule before using them in search or - * reduce operations. - * - *

Methods accepting and/or returning Entry arguments maintain - * key-value associations. They may be useful for example when - * finding the key for the greatest value. Note that "plain" Entry - * arguments can be supplied using {@code new - * AbstractMap.SimpleEntry(k,v)}. - * - *

Bulk operations may complete abruptly, throwing an - * exception encountered in the application of a supplied - * function. Bear in mind when handling such exceptions that other - * concurrently executing functions could also have thrown - * exceptions, or would have done so if the first exception had - * not occurred. - * - *

Parallel speedups for bulk operations compared to sequential - * processing are common but not guaranteed. Operations involving - * brief functions on small maps may execute more slowly than - * sequential loops if the underlying work to parallelize the - * computation is more expensive than the computation itself. - * Similarly, parallelization may not lead to much actual parallelism - * if all processors are busy performing unrelated tasks. - * - *

All arguments to all task methods must be non-null. - * - *

jsr166e note: During transition, this class - * uses nested functional interfaces with different names but the - * same forms as those expected for JDK8. - * - *

This class is a member of the - * - * Java Collections Framework. - * - * @since 1.5 - * @author Doug Lea - * @param the type of keys maintained by this map - * @param the type of mapped values - */ -public class ConcurrentHashMapV8 - implements ConcurrentMap, Serializable, ConcurrentHashMap { - private static final long serialVersionUID = 7249069246763182397L; - - /** - * A partitionable iterator. A Spliterator can be traversed - * directly, but can also be partitioned (before traversal) by - * creating another Spliterator that covers a non-overlapping - * portion of the elements, and so may be amenable to parallel - * execution. - * - *

This interface exports a subset of expected JDK8 - * functionality. - * - *

Sample usage: Here is one (of the several) ways to compute - * the sum of the values held in a map using the ForkJoin - * framework. As illustrated here, Spliterators are well suited to - * designs in which a task repeatedly splits off half its work - * into forked subtasks until small enough to process directly, - * and then joins these subtasks. Variants of this style can also - * be used in completion-based designs. - * - *

-     * {@code ConcurrentHashMapV8 m = ...
-     * // split as if have 8 * parallelism, for load balance
-     * int n = m.size();
-     * int p = aForkJoinPool.getParallelism() * 8;
-     * int split = (n < p)? n : p;
-     * long sum = aForkJoinPool.invoke(new SumValues(m.valueSpliterator(), split, null));
-     * // ...
-     * static class SumValues extends RecursiveTask {
-     *   final Spliterator s;
-     *   final int split;             // split while > 1
-     *   final SumValues nextJoin;    // records forked subtasks to join
-     *   SumValues(Spliterator s, int depth, SumValues nextJoin) {
-     *     this.s = s; this.depth = depth; this.nextJoin = nextJoin;
-     *   }
-     *   public Long compute() {
-     *     long sum = 0;
-     *     SumValues subtasks = null; // fork subtasks
-     *     for (int s = split >>> 1; s > 0; s >>>= 1)
-     *       (subtasks = new SumValues(s.split(), s, subtasks)).fork();
-     *     while (s.hasNext())        // directly process remaining elements
-     *       sum += s.next();
-     *     for (SumValues t = subtasks; t != null; t = t.nextJoin)
-     *       sum += t.join();         // collect subtask results
-     *     return sum;
-     *   }
-     * }
-     * }
- */ - public static interface Spliterator extends Iterator { - /** - * Returns a Spliterator covering approximately half of the - * elements, guaranteed not to overlap with those subsequently - * returned by this Spliterator. After invoking this method, - * the current Spliterator will not produce any of - * the elements of the returned Spliterator, but the two - * Spliterators together will produce all of the elements that - * would have been produced by this Spliterator had this - * method not been called. The exact number of elements - * produced by the returned Spliterator is not guaranteed, and - * may be zero (i.e., with {@code hasNext()} reporting {@code - * false}) if this Spliterator cannot be further split. - * - * @return a Spliterator covering approximately half of the - * elements - * @throws IllegalStateException if this Spliterator has - * already commenced traversing elements - */ - Spliterator split(); - } - - - /* - * Overview: - * - * The primary design goal of this hash table is to maintain - * concurrent readability (typically method get(), but also - * iterators and related methods) while minimizing update - * contention. Secondary goals are to keep space consumption about - * the same or better than java.util.HashMap, and to support high - * initial insertion rates on an empty table by many threads. - * - * Each key-value mapping is held in a Node. Because Node fields - * can contain special values, they are defined using plain Object - * types. Similarly in turn, all internal methods that use them - * work off Object types. And similarly, so do the internal - * methods of auxiliary iterator and view classes. All public - * generic typed methods relay in/out of these internal methods, - * supplying null-checks and casts as needed. This also allows - * many of the public methods to be factored into a smaller number - * of internal methods (although sadly not so for the five - * variants of put-related operations). The validation-based - * approach explained below leads to a lot of code sprawl because - * retry-control precludes factoring into smaller methods. - * - * The table is lazily initialized to a power-of-two size upon the - * first insertion. Each bin in the table normally contains a - * list of Nodes (most often, the list has only zero or one Node). - * Table accesses require volatile/atomic reads, writes, and - * CASes. Because there is no other way to arrange this without - * adding further indirections, we use intrinsics - * (sun.misc.Unsafe) operations. The lists of nodes within bins - * are always accurately traversable under volatile reads, so long - * as lookups check hash code and non-nullness of value before - * checking key equality. - * - * We use the top two bits of Node hash fields for control - * purposes -- they are available anyway because of addressing - * constraints. As explained further below, these top bits are - * used as follows: - * 00 - Normal - * 01 - Locked - * 11 - Locked and may have a thread waiting for lock - * 10 - Node is a forwarding node - * - * The lower 30 bits of each Node's hash field contain a - * transformation of the key's hash code, except for forwarding - * nodes, for which the lower bits are zero (and so always have - * hash field == MOVED). - * - * Insertion (via put or its variants) of the first node in an - * empty bin is performed by just CASing it to the bin. This is - * by far the most common case for put operations under most - * key/hash distributions. Other update operations (insert, - * delete, and replace) require locks. We do not want to waste - * the space required to associate a distinct lock object with - * each bin, so instead use the first node of a bin list itself as - * a lock. Blocking support for these locks relies on the builtin - * "synchronized" monitors. However, we also need a tryLock - * construction, so we overlay these by using bits of the Node - * hash field for lock control (see above), and so normally use - * builtin monitors only for blocking and signalling using - * wait/notifyAll constructions. See Node.tryAwaitLock. - * - * Using the first node of a list as a lock does not by itself - * suffice though: When a node is locked, any update must first - * validate that it is still the first node after locking it, and - * retry if not. Because new nodes are always appended to lists, - * once a node is first in a bin, it remains first until deleted - * or the bin becomes invalidated (upon resizing). However, - * operations that only conditionally update may inspect nodes - * until the point of update. This is a converse of sorts to the - * lazy locking technique described by Herlihy & Shavit. - * - * The main disadvantage of per-bin locks is that other update - * operations on other nodes in a bin list protected by the same - * lock can stall, for example when user equals() or mapping - * functions take a long time. However, statistically, under - * random hash codes, this is not a common problem. Ideally, the - * frequency of nodes in bins follows a Poisson distribution - * (http://en.wikipedia.org/wiki/Poisson_distribution) with a - * parameter of about 0.5 on average, given the resizing threshold - * of 0.75, although with a large variance because of resizing - * granularity. Ignoring variance, the expected occurrences of - * list size k are (exp(-0.5) * pow(0.5, k) / factorial(k)). The - * first values are: - * - * 0: 0.60653066 - * 1: 0.30326533 - * 2: 0.07581633 - * 3: 0.01263606 - * 4: 0.00157952 - * 5: 0.00015795 - * 6: 0.00001316 - * 7: 0.00000094 - * 8: 0.00000006 - * more: less than 1 in ten million - * - * Lock contention probability for two threads accessing distinct - * elements is roughly 1 / (8 * #elements) under random hashes. - * - * Actual hash code distributions encountered in practice - * sometimes deviate significantly from uniform randomness. This - * includes the case when N > (1<<30), so some keys MUST collide. - * Similarly for dumb or hostile usages in which multiple keys are - * designed to have identical hash codes. Also, although we guard - * against the worst effects of this (see method spread), sets of - * hashes may differ only in bits that do not impact their bin - * index for a given power-of-two mask. So we use a secondary - * strategy that applies when the number of nodes in a bin exceeds - * a threshold, and at least one of the keys implements - * Comparable. These TreeBins use a balanced tree to hold nodes - * (a specialized form of red-black trees), bounding search time - * to O(log N). Each search step in a TreeBin is around twice as - * slow as in a regular list, but given that N cannot exceed - * (1<<64) (before running out of addresses) this bounds search - * steps, lock hold times, etc, to reasonable constants (roughly - * 100 nodes inspected per operation worst case) so long as keys - * are Comparable (which is very common -- String, Long, etc). - * TreeBin nodes (TreeNodes) also maintain the same "next" - * traversal pointers as regular nodes, so can be traversed in - * iterators in the same way. - * - * The table is resized when occupancy exceeds a percentage - * threshold (nominally, 0.75, but see below). Only a single - * thread performs the resize (using field "sizeCtl", to arrange - * exclusion), but the table otherwise remains usable for reads - * and updates. Resizing proceeds by transferring bins, one by - * one, from the table to the next table. Because we are using - * power-of-two expansion, the elements from each bin must either - * stay at same index, or move with a power of two offset. We - * eliminate unnecessary node creation by catching cases where old - * nodes can be reused because their next fields won't change. On - * average, only about one-sixth of them need cloning when a table - * doubles. The nodes they replace will be garbage collectable as - * soon as they are no longer referenced by any reader thread that - * may be in the midst of concurrently traversing table. Upon - * transfer, the old table bin contains only a special forwarding - * node (with hash field "MOVED") that contains the next table as - * its key. On encountering a forwarding node, access and update - * operations restart, using the new table. - * - * Each bin transfer requires its bin lock. However, unlike other - * cases, a transfer can skip a bin if it fails to acquire its - * lock, and revisit it later (unless it is a TreeBin). Method - * rebuild maintains a buffer of TRANSFER_BUFFER_SIZE bins that - * have been skipped because of failure to acquire a lock, and - * blocks only if none are available (i.e., only very rarely). - * The transfer operation must also ensure that all accessible - * bins in both the old and new table are usable by any traversal. - * When there are no lock acquisition failures, this is arranged - * simply by proceeding from the last bin (table.length - 1) up - * towards the first. Upon seeing a forwarding node, traversals - * (see class Iter) arrange to move to the new table - * without revisiting nodes. However, when any node is skipped - * during a transfer, all earlier table bins may have become - * visible, so are initialized with a reverse-forwarding node back - * to the old table until the new ones are established. (This - * sometimes requires transiently locking a forwarding node, which - * is possible under the above encoding.) These more expensive - * mechanics trigger only when necessary. - * - * The traversal scheme also applies to partial traversals of - * ranges of bins (via an alternate Traverser constructor) - * to support partitioned aggregate operations. Also, read-only - * operations give up if ever forwarded to a null table, which - * provides support for shutdown-style clearing, which is also not - * currently implemented. - * - * Lazy table initialization minimizes footprint until first use, - * and also avoids resizings when the first operation is from a - * putAll, constructor with map argument, or deserialization. - * These cases attempt to override the initial capacity settings, - * but harmlessly fail to take effect in cases of races. - * - * The element count is maintained using a LongAdder, which avoids - * contention on updates but can encounter cache thrashing if read - * too frequently during concurrent access. To avoid reading so - * often, resizing is attempted either when a bin lock is - * contended, or upon adding to a bin already holding two or more - * nodes (checked before adding in the xIfAbsent methods, after - * adding in others). Under uniform hash distributions, the - * probability of this occurring at threshold is around 13%, - * meaning that only about 1 in 8 puts check threshold (and after - * resizing, many fewer do so). But this approximation has high - * variance for small table sizes, so we check on any collision - * for sizes <= 64. The bulk putAll operation further reduces - * contention by only committing count updates upon these size - * checks. - * - * Maintaining API and serialization compatibility with previous - * versions of this class introduces several oddities. Mainly: We - * leave untouched but unused constructor arguments referring to - * concurrencyLevel. We accept a loadFactor constructor argument, - * but apply it only to initial table capacity (which is the only - * time that we can guarantee to honor it.) We also declare an - * unused "Segment" class that is instantiated in minimal form - * only when serializing. - */ - - /* ---------------- Constants -------------- */ - - /** - * The largest possible table capacity. This value must be - * exactly 1<<30 to stay within Java array allocation and indexing - * bounds for power of two table sizes, and is further required - * because the top two bits of 32bit hash fields are used for - * control purposes. - */ - private static final int MAXIMUM_CAPACITY = 1 << 30; - - /** - * The default initial table capacity. Must be a power of 2 - * (i.e., at least 1) and at most MAXIMUM_CAPACITY. - */ - private static final int DEFAULT_CAPACITY = 16; - - /** - * The largest possible (non-power of two) array size. - * Needed by toArray and related methods. - */ - static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; - - /** - * The default concurrency level for this table. Unused but - * defined for compatibility with previous versions of this class. - */ - private static final int DEFAULT_CONCURRENCY_LEVEL = 16; - - /** - * The load factor for this table. Overrides of this value in - * constructors affect only the initial table capacity. The - * actual floating point value isn't normally used -- it is - * simpler to use expressions such as {@code n - (n >>> 2)} for - * the associated resizing threshold. - */ - private static final float LOAD_FACTOR = 0.75f; - - /** - * The buffer size for skipped bins during transfers. The - * value is arbitrary but should be large enough to avoid - * most locking stalls during resizes. - */ - private static final int TRANSFER_BUFFER_SIZE = 32; - - /** - * The bin count threshold for using a tree rather than list for a - * bin. The value reflects the approximate break-even point for - * using tree-based operations. - * Note that Doug's version defaults to 8, but when dealing with - * Ruby objects it is actually beneficial to avoid TreeNodes - * as long as possible as it usually means going into Ruby land. - */ - private static final int TREE_THRESHOLD = 16; - - /* - * Encodings for special uses of Node hash fields. See above for - * explanation. - */ - static final int MOVED = 0x80000000; // hash field for forwarding nodes - static final int LOCKED = 0x40000000; // set/tested only as a bit - static final int WAITING = 0xc0000000; // both bits set/tested together - static final int HASH_BITS = 0x3fffffff; // usable bits of normal node hash - - /* ---------------- Fields -------------- */ - - /** - * The array of bins. Lazily initialized upon first insertion. - * Size is always a power of two. Accessed directly by iterators. - */ - transient volatile Node[] table; - - /** - * The counter maintaining number of elements. - */ - private transient final LongAdder counter; - - /** - * Table initialization and resizing control. When negative, the - * table is being initialized or resized. Otherwise, when table is - * null, holds the initial table size to use upon creation, or 0 - * for default. After initialization, holds the next element count - * value upon which to resize the table. - */ - private transient volatile int sizeCtl; - - // views - private transient KeySetView keySet; - private transient ValuesView values; - private transient EntrySetView entrySet; - - /** For serialization compatibility. Null unless serialized; see below */ - private Segment[] segments; - - /* ---------------- Table element access -------------- */ - - /* - * Volatile access methods are used for table elements as well as - * elements of in-progress next table while resizing. Uses are - * null checked by callers, and implicitly bounds-checked, relying - * on the invariants that tab arrays have non-zero size, and all - * indices are masked with (tab.length - 1) which is never - * negative and always less than length. Note that, to be correct - * wrt arbitrary concurrency errors by users, bounds checks must - * operate on local variables, which accounts for some odd-looking - * inline assignments below. - */ - - static final Node tabAt(Node[] tab, int i) { // used by Iter - return (Node)UNSAFE.getObjectVolatile(tab, ((long)i< 1 ? 64 : 1; - - /** - * Spins a while if LOCKED bit set and this node is the first - * of its bin, and then sets WAITING bits on hash field and - * blocks (once) if they are still set. It is OK for this - * method to return even if lock is not available upon exit, - * which enables these simple single-wait mechanics. - * - * The corresponding signalling operation is performed within - * callers: Upon detecting that WAITING has been set when - * unlocking lock (via a failed CAS from non-waiting LOCKED - * state), unlockers acquire the sync lock and perform a - * notifyAll. - * - * The initial sanity check on tab and bounds is not currently - * necessary in the only usages of this method, but enables - * use in other future contexts. - */ - final void tryAwaitLock(Node[] tab, int i) { - if (tab != null && i >= 0 && i < tab.length) { // sanity check - int r = ThreadLocalRandom.current().nextInt(); // randomize spins - int spins = MAX_SPINS, h; - while (tabAt(tab, i) == this && ((h = hash) & LOCKED) != 0) { - if (spins >= 0) { - r ^= r << 1; r ^= r >>> 3; r ^= r << 10; // xorshift - if (r >= 0 && --spins == 0) - Thread.yield(); // yield before block - } - else if (casHash(h, h | WAITING)) { - synchronized (this) { - if (tabAt(tab, i) == this && - (hash & WAITING) == WAITING) { - try { - wait(); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - } - } - else - notifyAll(); // possibly won race vs signaller - } - break; - } - } - } - } - - // Unsafe mechanics for casHash - private static final sun.misc.Unsafe UNSAFE; - private static final long hashOffset; - - static { - try { - UNSAFE = getUnsafe(); - Class k = Node.class; - hashOffset = UNSAFE.objectFieldOffset - (k.getDeclaredField("hash")); - } catch (Exception e) { - throw new Error(e); - } - } - } - - /* ---------------- TreeBins -------------- */ - - /** - * Nodes for use in TreeBins - */ - static final class TreeNode extends Node { - TreeNode parent; // red-black tree links - TreeNode left; - TreeNode right; - TreeNode prev; // needed to unlink next upon deletion - boolean red; - - TreeNode(int hash, Object key, Object val, Node next, TreeNode parent) { - super(hash, key, val, next); - this.parent = parent; - } - } - - /** - * A specialized form of red-black tree for use in bins - * whose size exceeds a threshold. - * - * TreeBins use a special form of comparison for search and - * related operations (which is the main reason we cannot use - * existing collections such as TreeMaps). TreeBins contain - * Comparable elements, but may contain others, as well as - * elements that are Comparable but not necessarily Comparable - * for the same T, so we cannot invoke compareTo among them. To - * handle this, the tree is ordered primarily by hash value, then - * by getClass().getName() order, and then by Comparator order - * among elements of the same class. On lookup at a node, if - * elements are not comparable or compare as 0, both left and - * right children may need to be searched in the case of tied hash - * values. (This corresponds to the full list search that would be - * necessary if all elements were non-Comparable and had tied - * hashes.) The red-black balancing code is updated from - * pre-jdk-collections - * (http://gee.cs.oswego.edu/dl/classes/collections/RBCell.java) - * based in turn on Cormen, Leiserson, and Rivest "Introduction to - * Algorithms" (CLR). - * - * TreeBins also maintain a separate locking discipline than - * regular bins. Because they are forwarded via special MOVED - * nodes at bin heads (which can never change once established), - * we cannot use those nodes as locks. Instead, TreeBin - * extends AbstractQueuedSynchronizer to support a simple form of - * read-write lock. For update operations and table validation, - * the exclusive form of lock behaves in the same way as bin-head - * locks. However, lookups use shared read-lock mechanics to allow - * multiple readers in the absence of writers. Additionally, - * these lookups do not ever block: While the lock is not - * available, they proceed along the slow traversal path (via - * next-pointers) until the lock becomes available or the list is - * exhausted, whichever comes first. (These cases are not fast, - * but maximize aggregate expected throughput.) The AQS mechanics - * for doing this are straightforward. The lock state is held as - * AQS getState(). Read counts are negative; the write count (1) - * is positive. There are no signalling preferences among readers - * and writers. Since we don't need to export full Lock API, we - * just override the minimal AQS methods and use them directly. - */ - static final class TreeBin extends AbstractQueuedSynchronizer { - private static final long serialVersionUID = 2249069246763182397L; - transient TreeNode root; // root of tree - transient TreeNode first; // head of next-pointer list - - /* AQS overrides */ - public final boolean isHeldExclusively() { return getState() > 0; } - public final boolean tryAcquire(int ignore) { - if (compareAndSetState(0, 1)) { - setExclusiveOwnerThread(Thread.currentThread()); - return true; - } - return false; - } - public final boolean tryRelease(int ignore) { - setExclusiveOwnerThread(null); - setState(0); - return true; - } - public final int tryAcquireShared(int ignore) { - for (int c;;) { - if ((c = getState()) > 0) - return -1; - if (compareAndSetState(c, c -1)) - return 1; - } - } - public final boolean tryReleaseShared(int ignore) { - int c; - do {} while (!compareAndSetState(c = getState(), c + 1)); - return c == -1; - } - - /** From CLR */ - private void rotateLeft(TreeNode p) { - if (p != null) { - TreeNode r = p.right, pp, rl; - if ((rl = p.right = r.left) != null) - rl.parent = p; - if ((pp = r.parent = p.parent) == null) - root = r; - else if (pp.left == p) - pp.left = r; - else - pp.right = r; - r.left = p; - p.parent = r; - } - } - - /** From CLR */ - private void rotateRight(TreeNode p) { - if (p != null) { - TreeNode l = p.left, pp, lr; - if ((lr = p.left = l.right) != null) - lr.parent = p; - if ((pp = l.parent = p.parent) == null) - root = l; - else if (pp.right == p) - pp.right = l; - else - pp.left = l; - l.right = p; - p.parent = l; - } - } - - @SuppressWarnings("unchecked") final TreeNode getTreeNode - (int h, Object k, TreeNode p) { - return getTreeNode(h, (RubyObject)k, p); - } - - /** - * Returns the TreeNode (or null if not found) for the given key - * starting at given root. - */ - @SuppressWarnings("unchecked") final TreeNode getTreeNode - (int h, RubyObject k, TreeNode p) { - RubyClass c = k.getMetaClass(); boolean kNotComparable = !k.respondsTo("<=>"); - while (p != null) { - int dir, ph; RubyObject pk; RubyClass pc; - if ((ph = p.hash) == h) { - if ((pk = (RubyObject)p.key) == k || k.equals(pk)) - return p; - if (c != (pc = (RubyClass)pk.getMetaClass()) || - kNotComparable || - (dir = rubyCompare(k, pk)) == 0) { - dir = (c == pc) ? 0 : c.getName().compareTo(pc.getName()); - if (dir == 0) { // if still stuck, need to check both sides - TreeNode r = null, pl, pr; - // try to recurse on the right - if ((pr = p.right) != null && h >= pr.hash && (r = getTreeNode(h, k, pr)) != null) - return r; - // try to continue iterating on the left side - else if ((pl = p.left) != null && h <= pl.hash) - dir = -1; - else // no matching node found - return null; - } - } - } - else - dir = (h < ph) ? -1 : 1; - p = (dir > 0) ? p.right : p.left; - } - return null; - } - - int rubyCompare(RubyObject l, RubyObject r) { - ThreadContext context = l.getMetaClass().getRuntime().getCurrentContext(); - IRubyObject result; - try { - result = l.callMethod(context, "<=>", r); - } catch (RaiseException e) { - // handle objects "lying" about responding to <=>, ie: an Array containing non-comparable keys - if (context.runtime.getNoMethodError().isInstance(e.getException())) { - return 0; - } - throw e; - } - - return result.isNil() ? 0 : RubyNumeric.num2int(result.convertToInteger()); - } - - /** - * Wrapper for getTreeNode used by CHM.get. Tries to obtain - * read-lock to call getTreeNode, but during failure to get - * lock, searches along next links. - */ - final Object getValue(int h, Object k) { - Node r = null; - int c = getState(); // Must read lock state first - for (Node e = first; e != null; e = e.next) { - if (c <= 0 && compareAndSetState(c, c - 1)) { - try { - r = getTreeNode(h, k, root); - } finally { - releaseShared(0); - } - break; - } - else if ((e.hash & HASH_BITS) == h && k.equals(e.key)) { - r = e; - break; - } - else - c = getState(); - } - return r == null ? null : r.val; - } - - @SuppressWarnings("unchecked") final TreeNode putTreeNode - (int h, Object k, Object v) { - return putTreeNode(h, (RubyObject)k, v); - } - - /** - * Finds or adds a node. - * @return null if added - */ - @SuppressWarnings("unchecked") final TreeNode putTreeNode - (int h, RubyObject k, Object v) { - RubyClass c = k.getMetaClass(); - boolean kNotComparable = !k.respondsTo("<=>"); - TreeNode pp = root, p = null; - int dir = 0; - while (pp != null) { // find existing node or leaf to insert at - int ph; RubyObject pk; RubyClass pc; - p = pp; - if ((ph = p.hash) == h) { - if ((pk = (RubyObject)p.key) == k || k.equals(pk)) - return p; - if (c != (pc = pk.getMetaClass()) || - kNotComparable || - (dir = rubyCompare(k, pk)) == 0) { - dir = (c == pc) ? 0 : c.getName().compareTo(pc.getName()); - if (dir == 0) { // if still stuck, need to check both sides - TreeNode r = null, pr; - // try to recurse on the right - if ((pr = p.right) != null && h >= pr.hash && (r = getTreeNode(h, k, pr)) != null) - return r; - else // continue descending down the left subtree - dir = -1; - } - } - } - else - dir = (h < ph) ? -1 : 1; - pp = (dir > 0) ? p.right : p.left; - } - - TreeNode f = first; - TreeNode x = first = new TreeNode(h, (Object)k, v, f, p); - if (p == null) - root = x; - else { // attach and rebalance; adapted from CLR - TreeNode xp, xpp; - if (f != null) - f.prev = x; - if (dir <= 0) - p.left = x; - else - p.right = x; - x.red = true; - while (x != null && (xp = x.parent) != null && xp.red && - (xpp = xp.parent) != null) { - TreeNode xppl = xpp.left; - if (xp == xppl) { - TreeNode y = xpp.right; - if (y != null && y.red) { - y.red = false; - xp.red = false; - xpp.red = true; - x = xpp; - } - else { - if (x == xp.right) { - rotateLeft(x = xp); - xpp = (xp = x.parent) == null ? null : xp.parent; - } - if (xp != null) { - xp.red = false; - if (xpp != null) { - xpp.red = true; - rotateRight(xpp); - } - } - } - } - else { - TreeNode y = xppl; - if (y != null && y.red) { - y.red = false; - xp.red = false; - xpp.red = true; - x = xpp; - } - else { - if (x == xp.left) { - rotateRight(x = xp); - xpp = (xp = x.parent) == null ? null : xp.parent; - } - if (xp != null) { - xp.red = false; - if (xpp != null) { - xpp.red = true; - rotateLeft(xpp); - } - } - } - } - } - TreeNode r = root; - if (r != null && r.red) - r.red = false; - } - return null; - } - - /** - * Removes the given node, that must be present before this - * call. This is messier than typical red-black deletion code - * because we cannot swap the contents of an interior node - * with a leaf successor that is pinned by "next" pointers - * that are accessible independently of lock. So instead we - * swap the tree linkages. - */ - final void deleteTreeNode(TreeNode p) { - TreeNode next = (TreeNode)p.next; // unlink traversal pointers - TreeNode pred = p.prev; - if (pred == null) - first = next; - else - pred.next = next; - if (next != null) - next.prev = pred; - TreeNode replacement; - TreeNode pl = p.left; - TreeNode pr = p.right; - if (pl != null && pr != null) { - TreeNode s = pr, sl; - while ((sl = s.left) != null) // find successor - s = sl; - boolean c = s.red; s.red = p.red; p.red = c; // swap colors - TreeNode sr = s.right; - TreeNode pp = p.parent; - if (s == pr) { // p was s's direct parent - p.parent = s; - s.right = p; - } - else { - TreeNode sp = s.parent; - if ((p.parent = sp) != null) { - if (s == sp.left) - sp.left = p; - else - sp.right = p; - } - if ((s.right = pr) != null) - pr.parent = s; - } - p.left = null; - if ((p.right = sr) != null) - sr.parent = p; - if ((s.left = pl) != null) - pl.parent = s; - if ((s.parent = pp) == null) - root = s; - else if (p == pp.left) - pp.left = s; - else - pp.right = s; - replacement = sr; - } - else - replacement = (pl != null) ? pl : pr; - TreeNode pp = p.parent; - if (replacement == null) { - if (pp == null) { - root = null; - return; - } - replacement = p; - } - else { - replacement.parent = pp; - if (pp == null) - root = replacement; - else if (p == pp.left) - pp.left = replacement; - else - pp.right = replacement; - p.left = p.right = p.parent = null; - } - if (!p.red) { // rebalance, from CLR - TreeNode x = replacement; - while (x != null) { - TreeNode xp, xpl; - if (x.red || (xp = x.parent) == null) { - x.red = false; - break; - } - if (x == (xpl = xp.left)) { - TreeNode sib = xp.right; - if (sib != null && sib.red) { - sib.red = false; - xp.red = true; - rotateLeft(xp); - sib = (xp = x.parent) == null ? null : xp.right; - } - if (sib == null) - x = xp; - else { - TreeNode sl = sib.left, sr = sib.right; - if ((sr == null || !sr.red) && - (sl == null || !sl.red)) { - sib.red = true; - x = xp; - } - else { - if (sr == null || !sr.red) { - if (sl != null) - sl.red = false; - sib.red = true; - rotateRight(sib); - sib = (xp = x.parent) == null ? null : xp.right; - } - if (sib != null) { - sib.red = (xp == null) ? false : xp.red; - if ((sr = sib.right) != null) - sr.red = false; - } - if (xp != null) { - xp.red = false; - rotateLeft(xp); - } - x = root; - } - } - } - else { // symmetric - TreeNode sib = xpl; - if (sib != null && sib.red) { - sib.red = false; - xp.red = true; - rotateRight(xp); - sib = (xp = x.parent) == null ? null : xp.left; - } - if (sib == null) - x = xp; - else { - TreeNode sl = sib.left, sr = sib.right; - if ((sl == null || !sl.red) && - (sr == null || !sr.red)) { - sib.red = true; - x = xp; - } - else { - if (sl == null || !sl.red) { - if (sr != null) - sr.red = false; - sib.red = true; - rotateLeft(sib); - sib = (xp = x.parent) == null ? null : xp.left; - } - if (sib != null) { - sib.red = (xp == null) ? false : xp.red; - if ((sl = sib.left) != null) - sl.red = false; - } - if (xp != null) { - xp.red = false; - rotateRight(xp); - } - x = root; - } - } - } - } - } - if (p == replacement && (pp = p.parent) != null) { - if (p == pp.left) // detach pointers - pp.left = null; - else if (p == pp.right) - pp.right = null; - p.parent = null; - } - } - } - - /* ---------------- Collision reduction methods -------------- */ - - /** - * Spreads higher bits to lower, and also forces top 2 bits to 0. - * Because the table uses power-of-two masking, sets of hashes - * that vary only in bits above the current mask will always - * collide. (Among known examples are sets of Float keys holding - * consecutive whole numbers in small tables.) To counter this, - * we apply a transform that spreads the impact of higher bits - * downward. There is a tradeoff between speed, utility, and - * quality of bit-spreading. Because many common sets of hashes - * are already reasonably distributed across bits (so don't benefit - * from spreading), and because we use trees to handle large sets - * of collisions in bins, we don't need excessively high quality. - */ - private static final int spread(int h) { - h ^= (h >>> 18) ^ (h >>> 12); - return (h ^ (h >>> 10)) & HASH_BITS; - } - - /** - * Replaces a list bin with a tree bin. Call only when locked. - * Fails to replace if the given key is non-comparable or table - * is, or needs, resizing. - */ - private final void replaceWithTreeBin(Node[] tab, int index, Object key) { - if ((key instanceof Comparable) && - (tab.length >= MAXIMUM_CAPACITY || counter.sum() < (long)sizeCtl)) { - TreeBin t = new TreeBin(); - for (Node e = tabAt(tab, index); e != null; e = e.next) - t.putTreeNode(e.hash & HASH_BITS, e.key, e.val); - setTabAt(tab, index, new Node(MOVED, t, null, null)); - } - } - - /* ---------------- Internal access and update methods -------------- */ - - /** Implementation for get and containsKey */ - private final Object internalGet(Object k) { - int h = spread(k.hashCode()); - retry: for (Node[] tab = table; tab != null;) { - Node e, p; Object ek, ev; int eh; // locals to read fields once - for (e = tabAt(tab, (tab.length - 1) & h); e != null; e = e.next) { - if ((eh = e.hash) == MOVED) { - if ((ek = e.key) instanceof TreeBin) // search TreeBin - return ((TreeBin)ek).getValue(h, k); - else { // restart with new table - tab = (Node[])ek; - continue retry; - } - } - else if ((eh & HASH_BITS) == h && (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) - return ev; - } - break; - } - return null; - } - - /** - * Implementation for the four public remove/replace methods: - * Replaces node value with v, conditional upon match of cv if - * non-null. If resulting value is null, delete. - */ - private final Object internalReplace(Object k, Object v, Object cv) { - int h = spread(k.hashCode()); - Object oldVal = null; - for (Node[] tab = table;;) { - Node f; int i, fh; Object fk; - if (tab == null || - (f = tabAt(tab, i = (tab.length - 1) & h)) == null) - break; - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean validated = false; - boolean deleted = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - validated = true; - TreeNode p = t.getTreeNode(h, k, t.root); - if (p != null) { - Object pv = p.val; - if (cv == null || cv == pv || cv.equals(pv)) { - oldVal = pv; - if ((p.val = v) == null) { - deleted = true; - t.deleteTreeNode(p); - } - } - } - } - } finally { - t.release(0); - } - if (validated) { - if (deleted) - counter.add(-1L); - break; - } - } - else - tab = (Node[])fk; - } - else if ((fh & HASH_BITS) != h && f.next == null) // precheck - break; // rules out possible existence - else if ((fh & LOCKED) != 0) { - checkForResize(); // try resizing if can't get lock - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - boolean validated = false; - boolean deleted = false; - try { - if (tabAt(tab, i) == f) { - validated = true; - for (Node e = f, pred = null;;) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - ((ev = e.val) != null) && - ((ek = e.key) == k || k.equals(ek))) { - if (cv == null || cv == ev || cv.equals(ev)) { - oldVal = ev; - if ((e.val = v) == null) { - deleted = true; - Node en = e.next; - if (pred != null) - pred.next = en; - else - setTabAt(tab, i, en); - } - } - break; - } - pred = e; - if ((e = e.next) == null) - break; - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (validated) { - if (deleted) - counter.add(-1L); - break; - } - } - } - return oldVal; - } - - /* - * Internal versions of the six insertion methods, each a - * little more complicated than the last. All have - * the same basic structure as the first (internalPut): - * 1. If table uninitialized, create - * 2. If bin empty, try to CAS new node - * 3. If bin stale, use new table - * 4. if bin converted to TreeBin, validate and relay to TreeBin methods - * 5. Lock and validate; if valid, scan and add or update - * - * The others interweave other checks and/or alternative actions: - * * Plain put checks for and performs resize after insertion. - * * putIfAbsent prescans for mapping without lock (and fails to add - * if present), which also makes pre-emptive resize checks worthwhile. - * * computeIfAbsent extends form used in putIfAbsent with additional - * mechanics to deal with, calls, potential exceptions and null - * returns from function call. - * * compute uses the same function-call mechanics, but without - * the prescans - * * merge acts as putIfAbsent in the absent case, but invokes the - * update function if present - * * putAll attempts to pre-allocate enough table space - * and more lazily performs count updates and checks. - * - * Someday when details settle down a bit more, it might be worth - * some factoring to reduce sprawl. - */ - - /** Implementation for put */ - private final Object internalPut(Object k, Object v) { - int h = spread(k.hashCode()); - int count = 0; - for (Node[] tab = table;;) { - int i; Node f; int fh; Object fk; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length - 1) & h)) == null) { - if (casTabAt(tab, i, null, new Node(h, k, v, null))) - break; // no lock when adding to empty bin - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - Object oldVal = null; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 2; - TreeNode p = t.putTreeNode(h, k, v); - if (p != null) { - oldVal = p.val; - p.val = v; - } - } - } finally { - t.release(0); - } - if (count != 0) { - if (oldVal != null) - return oldVal; - break; - } - } - else - tab = (Node[])fk; - } - else if ((fh & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - Object oldVal = null; - try { // needed in case equals() throws - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - oldVal = ev; - e.val = v; - break; - } - Node last = e; - if ((e = e.next) == null) { - last.next = new Node(h, k, v, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { // unlock and signal if needed - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (oldVal != null) - return oldVal; - if (tab.length <= 64) - count = 2; - break; - } - } - } - counter.add(1L); - if (count > 1) - checkForResize(); - return null; - } - - /** Implementation for putIfAbsent */ - private final Object internalPutIfAbsent(Object k, Object v) { - int h = spread(k.hashCode()); - int count = 0; - for (Node[] tab = table;;) { - int i; Node f; int fh; Object fk, fv; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length - 1) & h)) == null) { - if (casTabAt(tab, i, null, new Node(h, k, v, null))) - break; - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - Object oldVal = null; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 2; - TreeNode p = t.putTreeNode(h, k, v); - if (p != null) - oldVal = p.val; - } - } finally { - t.release(0); - } - if (count != 0) { - if (oldVal != null) - return oldVal; - break; - } - } - else - tab = (Node[])fk; - } - else if ((fh & HASH_BITS) == h && (fv = f.val) != null && - ((fk = f.key) == k || k.equals(fk))) - return fv; - else { - Node g = f.next; - if (g != null) { // at least 2 nodes -- search and maybe resize - for (Node e = g;;) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) - return ev; - if ((e = e.next) == null) { - checkForResize(); - break; - } - } - } - if (((fh = f.hash) & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (tabAt(tab, i) == f && f.casHash(fh, fh | LOCKED)) { - Object oldVal = null; - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - oldVal = ev; - break; - } - Node last = e; - if ((e = e.next) == null) { - last.next = new Node(h, k, v, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (oldVal != null) - return oldVal; - if (tab.length <= 64) - count = 2; - break; - } - } - } - } - counter.add(1L); - if (count > 1) - checkForResize(); - return null; - } - - /** Implementation for computeIfAbsent */ - private final Object internalComputeIfAbsent(K k, - Fun mf) { - int h = spread(k.hashCode()); - Object val = null; - int count = 0; - for (Node[] tab = table;;) { - Node f; int i, fh; Object fk, fv; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length - 1) & h)) == null) { - Node node = new Node(fh = h | LOCKED, k, null, null); - if (casTabAt(tab, i, null, node)) { - count = 1; - try { - if ((val = mf.apply(k)) != null) - node.val = val; - } finally { - if (val == null) - setTabAt(tab, i, null); - if (!node.casHash(fh, h)) { - node.hash = h; - synchronized (node) { node.notifyAll(); }; - } - } - } - if (count != 0) - break; - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean added = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 1; - TreeNode p = t.getTreeNode(h, k, t.root); - if (p != null) - val = p.val; - else if ((val = mf.apply(k)) != null) { - added = true; - count = 2; - t.putTreeNode(h, k, val); - } - } - } finally { - t.release(0); - } - if (count != 0) { - if (!added) - return val; - break; - } - } - else - tab = (Node[])fk; - } - else if ((fh & HASH_BITS) == h && (fv = f.val) != null && - ((fk = f.key) == k || k.equals(fk))) - return fv; - else { - Node g = f.next; - if (g != null) { - for (Node e = g;;) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) - return ev; - if ((e = e.next) == null) { - checkForResize(); - break; - } - } - } - if (((fh = f.hash) & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (tabAt(tab, i) == f && f.casHash(fh, fh | LOCKED)) { - boolean added = false; - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - val = ev; - break; - } - Node last = e; - if ((e = e.next) == null) { - if ((val = mf.apply(k)) != null) { - added = true; - last.next = new Node(h, k, val, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - } - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (!added) - return val; - if (tab.length <= 64) - count = 2; - break; - } - } - } - } - if (val != null) { - counter.add(1L); - if (count > 1) - checkForResize(); - } - return val; - } - - /** Implementation for compute */ - @SuppressWarnings("unchecked") private final Object internalCompute - (K k, boolean onlyIfPresent, BiFun mf) { - int h = spread(k.hashCode()); - Object val = null; - int delta = 0; - int count = 0; - for (Node[] tab = table;;) { - Node f; int i, fh; Object fk; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length - 1) & h)) == null) { - if (onlyIfPresent) - break; - Node node = new Node(fh = h | LOCKED, k, null, null); - if (casTabAt(tab, i, null, node)) { - try { - count = 1; - if ((val = mf.apply(k, null)) != null) { - node.val = val; - delta = 1; - } - } finally { - if (delta == 0) - setTabAt(tab, i, null); - if (!node.casHash(fh, h)) { - node.hash = h; - synchronized (node) { node.notifyAll(); }; - } - } - } - if (count != 0) - break; - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 1; - TreeNode p = t.getTreeNode(h, k, t.root); - Object pv; - if (p == null) { - if (onlyIfPresent) - break; - pv = null; - } else - pv = p.val; - if ((val = mf.apply(k, (V)pv)) != null) { - if (p != null) - p.val = val; - else { - count = 2; - delta = 1; - t.putTreeNode(h, k, val); - } - } - else if (p != null) { - delta = -1; - t.deleteTreeNode(p); - } - } - } finally { - t.release(0); - } - if (count != 0) - break; - } - else - tab = (Node[])fk; - } - else if ((fh & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f, pred = null;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - val = mf.apply(k, (V)ev); - if (val != null) - e.val = val; - else { - delta = -1; - Node en = e.next; - if (pred != null) - pred.next = en; - else - setTabAt(tab, i, en); - } - break; - } - pred = e; - if ((e = e.next) == null) { - if (!onlyIfPresent && (val = mf.apply(k, null)) != null) { - pred.next = new Node(h, k, val, null); - delta = 1; - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - } - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (tab.length <= 64) - count = 2; - break; - } - } - } - if (delta != 0) { - counter.add((long)delta); - if (count > 1) - checkForResize(); - } - return val; - } - - /** Implementation for merge */ - @SuppressWarnings("unchecked") private final Object internalMerge - (K k, V v, BiFun mf) { - int h = spread(k.hashCode()); - Object val = null; - int delta = 0; - int count = 0; - for (Node[] tab = table;;) { - int i; Node f; int fh; Object fk, fv; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length - 1) & h)) == null) { - if (casTabAt(tab, i, null, new Node(h, k, v, null))) { - delta = 1; - val = v; - break; - } - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 1; - TreeNode p = t.getTreeNode(h, k, t.root); - val = (p == null) ? v : mf.apply((V)p.val, v); - if (val != null) { - if (p != null) - p.val = val; - else { - count = 2; - delta = 1; - t.putTreeNode(h, k, val); - } - } - else if (p != null) { - delta = -1; - t.deleteTreeNode(p); - } - } - } finally { - t.release(0); - } - if (count != 0) - break; - } - else - tab = (Node[])fk; - } - else if ((fh & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f, pred = null;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - val = mf.apply((V)ev, v); - if (val != null) - e.val = val; - else { - delta = -1; - Node en = e.next; - if (pred != null) - pred.next = en; - else - setTabAt(tab, i, en); - } - break; - } - pred = e; - if ((e = e.next) == null) { - val = v; - pred.next = new Node(h, k, val, null); - delta = 1; - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (tab.length <= 64) - count = 2; - break; - } - } - } - if (delta != 0) { - counter.add((long)delta); - if (count > 1) - checkForResize(); - } - return val; - } - - /** Implementation for putAll */ - private final void internalPutAll(Map m) { - tryPresize(m.size()); - long delta = 0L; // number of uncommitted additions - boolean npe = false; // to throw exception on exit for nulls - try { // to clean up counts on other exceptions - for (Map.Entry entry : m.entrySet()) { - Object k, v; - if (entry == null || (k = entry.getKey()) == null || - (v = entry.getValue()) == null) { - npe = true; - break; - } - int h = spread(k.hashCode()); - for (Node[] tab = table;;) { - int i; Node f; int fh; Object fk; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length - 1) & h)) == null){ - if (casTabAt(tab, i, null, new Node(h, k, v, null))) { - ++delta; - break; - } - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean validated = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - validated = true; - TreeNode p = t.getTreeNode(h, k, t.root); - if (p != null) - p.val = v; - else { - t.putTreeNode(h, k, v); - ++delta; - } - } - } finally { - t.release(0); - } - if (validated) - break; - } - else - tab = (Node[])fk; - } - else if ((fh & LOCKED) != 0) { - counter.add(delta); - delta = 0L; - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - int count = 0; - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - e.val = v; - break; - } - Node last = e; - if ((e = e.next) == null) { - ++delta; - last.next = new Node(h, k, v, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (count > 1) { - counter.add(delta); - delta = 0L; - checkForResize(); - } - break; - } - } - } - } - } finally { - if (delta != 0) - counter.add(delta); - } - if (npe) - throw new NullPointerException(); - } - - /* ---------------- Table Initialization and Resizing -------------- */ - - /** - * Returns a power of two table size for the given desired capacity. - * See Hackers Delight, sec 3.2 - */ - private static final int tableSizeFor(int c) { - int n = c - 1; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1; - } - - /** - * Initializes table, using the size recorded in sizeCtl. - */ - private final Node[] initTable() { - Node[] tab; int sc; - while ((tab = table) == null) { - if ((sc = sizeCtl) < 0) - Thread.yield(); // lost initialization race; just spin - else if (UNSAFE.compareAndSwapInt(this, sizeCtlOffset, sc, -1)) { - try { - if ((tab = table) == null) { - int n = (sc > 0) ? sc : DEFAULT_CAPACITY; - tab = table = new Node[n]; - sc = n - (n >>> 2); - } - } finally { - sizeCtl = sc; - } - break; - } - } - return tab; - } - - /** - * If table is too small and not already resizing, creates next - * table and transfers bins. Rechecks occupancy after a transfer - * to see if another resize is already needed because resizings - * are lagging additions. - */ - private final void checkForResize() { - Node[] tab; int n, sc; - while ((tab = table) != null && - (n = tab.length) < MAXIMUM_CAPACITY && - (sc = sizeCtl) >= 0 && counter.sum() >= (long)sc && - UNSAFE.compareAndSwapInt(this, sizeCtlOffset, sc, -1)) { - try { - if (tab == table) { - table = rebuild(tab); - sc = (n << 1) - (n >>> 1); - } - } finally { - sizeCtl = sc; - } - } - } - - /** - * Tries to presize table to accommodate the given number of elements. - * - * @param size number of elements (doesn't need to be perfectly accurate) - */ - private final void tryPresize(int size) { - int c = (size >= (MAXIMUM_CAPACITY >>> 1)) ? MAXIMUM_CAPACITY : - tableSizeFor(size + (size >>> 1) + 1); - int sc; - while ((sc = sizeCtl) >= 0) { - Node[] tab = table; int n; - if (tab == null || (n = tab.length) == 0) { - n = (sc > c) ? sc : c; - if (UNSAFE.compareAndSwapInt(this, sizeCtlOffset, sc, -1)) { - try { - if (table == tab) { - table = new Node[n]; - sc = n - (n >>> 2); - } - } finally { - sizeCtl = sc; - } - } - } - else if (c <= sc || n >= MAXIMUM_CAPACITY) - break; - else if (UNSAFE.compareAndSwapInt(this, sizeCtlOffset, sc, -1)) { - try { - if (table == tab) { - table = rebuild(tab); - sc = (n << 1) - (n >>> 1); - } - } finally { - sizeCtl = sc; - } - } - } - } - - /* - * Moves and/or copies the nodes in each bin to new table. See - * above for explanation. - * - * @return the new table - */ - private static final Node[] rebuild(Node[] tab) { - int n = tab.length; - Node[] nextTab = new Node[n << 1]; - Node fwd = new Node(MOVED, nextTab, null, null); - int[] buffer = null; // holds bins to revisit; null until needed - Node rev = null; // reverse forwarder; null until needed - int nbuffered = 0; // the number of bins in buffer list - int bufferIndex = 0; // buffer index of current buffered bin - int bin = n - 1; // current non-buffered bin or -1 if none - - for (int i = bin;;) { // start upwards sweep - int fh; Node f; - if ((f = tabAt(tab, i)) == null) { - if (bin >= 0) { // Unbuffered; no lock needed (or available) - if (!casTabAt(tab, i, f, fwd)) - continue; - } - else { // transiently use a locked forwarding node - Node g = new Node(MOVED|LOCKED, nextTab, null, null); - if (!casTabAt(tab, i, f, g)) - continue; - setTabAt(nextTab, i, null); - setTabAt(nextTab, i + n, null); - setTabAt(tab, i, fwd); - if (!g.casHash(MOVED|LOCKED, MOVED)) { - g.hash = MOVED; - synchronized (g) { g.notifyAll(); } - } - } - } - else if ((fh = f.hash) == MOVED) { - Object fk = f.key; - if (fk instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean validated = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - validated = true; - splitTreeBin(nextTab, i, t); - setTabAt(tab, i, fwd); - } - } finally { - t.release(0); - } - if (!validated) - continue; - } - } - else if ((fh & LOCKED) == 0 && f.casHash(fh, fh|LOCKED)) { - boolean validated = false; - try { // split to lo and hi lists; copying as needed - if (tabAt(tab, i) == f) { - validated = true; - splitBin(nextTab, i, f); - setTabAt(tab, i, fwd); - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (!validated) - continue; - } - else { - if (buffer == null) // initialize buffer for revisits - buffer = new int[TRANSFER_BUFFER_SIZE]; - if (bin < 0 && bufferIndex > 0) { - int j = buffer[--bufferIndex]; - buffer[bufferIndex] = i; - i = j; // swap with another bin - continue; - } - if (bin < 0 || nbuffered >= TRANSFER_BUFFER_SIZE) { - f.tryAwaitLock(tab, i); - continue; // no other options -- block - } - if (rev == null) // initialize reverse-forwarder - rev = new Node(MOVED, tab, null, null); - if (tabAt(tab, i) != f || (f.hash & LOCKED) == 0) - continue; // recheck before adding to list - buffer[nbuffered++] = i; - setTabAt(nextTab, i, rev); // install place-holders - setTabAt(nextTab, i + n, rev); - } - - if (bin > 0) - i = --bin; - else if (buffer != null && nbuffered > 0) { - bin = -1; - i = buffer[bufferIndex = --nbuffered]; - } - else - return nextTab; - } - } - - /** - * Splits a normal bin with list headed by e into lo and hi parts; - * installs in given table. - */ - private static void splitBin(Node[] nextTab, int i, Node e) { - int bit = nextTab.length >>> 1; // bit to split on - int runBit = e.hash & bit; - Node lastRun = e, lo = null, hi = null; - for (Node p = e.next; p != null; p = p.next) { - int b = p.hash & bit; - if (b != runBit) { - runBit = b; - lastRun = p; - } - } - if (runBit == 0) - lo = lastRun; - else - hi = lastRun; - for (Node p = e; p != lastRun; p = p.next) { - int ph = p.hash & HASH_BITS; - Object pk = p.key, pv = p.val; - if ((ph & bit) == 0) - lo = new Node(ph, pk, pv, lo); - else - hi = new Node(ph, pk, pv, hi); - } - setTabAt(nextTab, i, lo); - setTabAt(nextTab, i + bit, hi); - } - - /** - * Splits a tree bin into lo and hi parts; installs in given table. - */ - private static void splitTreeBin(Node[] nextTab, int i, TreeBin t) { - int bit = nextTab.length >>> 1; - TreeBin lt = new TreeBin(); - TreeBin ht = new TreeBin(); - int lc = 0, hc = 0; - for (Node e = t.first; e != null; e = e.next) { - int h = e.hash & HASH_BITS; - Object k = e.key, v = e.val; - if ((h & bit) == 0) { - ++lc; - lt.putTreeNode(h, k, v); - } - else { - ++hc; - ht.putTreeNode(h, k, v); - } - } - Node ln, hn; // throw away trees if too small - if (lc <= (TREE_THRESHOLD >>> 1)) { - ln = null; - for (Node p = lt.first; p != null; p = p.next) - ln = new Node(p.hash, p.key, p.val, ln); - } - else - ln = new Node(MOVED, lt, null, null); - setTabAt(nextTab, i, ln); - if (hc <= (TREE_THRESHOLD >>> 1)) { - hn = null; - for (Node p = ht.first; p != null; p = p.next) - hn = new Node(p.hash, p.key, p.val, hn); - } - else - hn = new Node(MOVED, ht, null, null); - setTabAt(nextTab, i + bit, hn); - } - - /** - * Implementation for clear. Steps through each bin, removing all - * nodes. - */ - private final void internalClear() { - long delta = 0L; // negative number of deletions - int i = 0; - Node[] tab = table; - while (tab != null && i < tab.length) { - int fh; Object fk; - Node f = tabAt(tab, i); - if (f == null) - ++i; - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - for (Node p = t.first; p != null; p = p.next) { - if (p.val != null) { // (currently always true) - p.val = null; - --delta; - } - } - t.first = null; - t.root = null; - ++i; - } - } finally { - t.release(0); - } - } - else - tab = (Node[])fk; - } - else if ((fh & LOCKED) != 0) { - counter.add(delta); // opportunistically update count - delta = 0L; - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - try { - if (tabAt(tab, i) == f) { - for (Node e = f; e != null; e = e.next) { - if (e.val != null) { // (currently always true) - e.val = null; - --delta; - } - } - setTabAt(tab, i, null); - ++i; - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - } - } - if (delta != 0) - counter.add(delta); - } - - /* ----------------Table Traversal -------------- */ - - /** - * Encapsulates traversal for methods such as containsValue; also - * serves as a base class for other iterators and bulk tasks. - * - * At each step, the iterator snapshots the key ("nextKey") and - * value ("nextVal") of a valid node (i.e., one that, at point of - * snapshot, has a non-null user value). Because val fields can - * change (including to null, indicating deletion), field nextVal - * might not be accurate at point of use, but still maintains the - * weak consistency property of holding a value that was once - * valid. To support iterator.remove, the nextKey field is not - * updated (nulled out) when the iterator cannot advance. - * - * Internal traversals directly access these fields, as in: - * {@code while (it.advance() != null) { process(it.nextKey); }} - * - * Exported iterators must track whether the iterator has advanced - * (in hasNext vs next) (by setting/checking/nulling field - * nextVal), and then extract key, value, or key-value pairs as - * return values of next(). - * - * The iterator visits once each still-valid node that was - * reachable upon iterator construction. It might miss some that - * were added to a bin after the bin was visited, which is OK wrt - * consistency guarantees. Maintaining this property in the face - * of possible ongoing resizes requires a fair amount of - * bookkeeping state that is difficult to optimize away amidst - * volatile accesses. Even so, traversal maintains reasonable - * throughput. - * - * Normally, iteration proceeds bin-by-bin traversing lists. - * However, if the table has been resized, then all future steps - * must traverse both the bin at the current index as well as at - * (index + baseSize); and so on for further resizings. To - * paranoically cope with potential sharing by users of iterators - * across threads, iteration terminates if a bounds checks fails - * for a table read. - * - * This class extends ForkJoinTask to streamline parallel - * iteration in bulk operations (see BulkTask). This adds only an - * int of space overhead, which is close enough to negligible in - * cases where it is not needed to not worry about it. Because - * ForkJoinTask is Serializable, but iterators need not be, we - * need to add warning suppressions. - */ - @SuppressWarnings("serial") static class Traverser { - final ConcurrentHashMapV8 map; - Node next; // the next entry to use - K nextKey; // cached key field of next - V nextVal; // cached val field of next - Node[] tab; // current table; updated if resized - int index; // index of bin to use next - int baseIndex; // current index of initial table - int baseLimit; // index bound for initial table - int baseSize; // initial table size - - /** Creates iterator for all entries in the table. */ - Traverser(ConcurrentHashMapV8 map) { - this.map = map; - } - - /** Creates iterator for split() methods */ - Traverser(Traverser it) { - ConcurrentHashMapV8 m; Node[] t; - if ((m = this.map = it.map) == null) - t = null; - else if ((t = it.tab) == null && // force parent tab initialization - (t = it.tab = m.table) != null) - it.baseLimit = it.baseSize = t.length; - this.tab = t; - this.baseSize = it.baseSize; - it.baseLimit = this.index = this.baseIndex = - ((this.baseLimit = it.baseLimit) + it.baseIndex + 1) >>> 1; - } - - /** - * Advances next; returns nextVal or null if terminated. - * See above for explanation. - */ - final V advance() { - Node e = next; - V ev = null; - outer: do { - if (e != null) // advance past used/skipped node - e = e.next; - while (e == null) { // get to next non-null bin - ConcurrentHashMapV8 m; - Node[] t; int b, i, n; Object ek; // checks must use locals - if ((t = tab) != null) - n = t.length; - else if ((m = map) != null && (t = tab = m.table) != null) - n = baseLimit = baseSize = t.length; - else - break outer; - if ((b = baseIndex) >= baseLimit || - (i = index) < 0 || i >= n) - break outer; - if ((e = tabAt(t, i)) != null && e.hash == MOVED) { - if ((ek = e.key) instanceof TreeBin) - e = ((TreeBin)ek).first; - else { - tab = (Node[])ek; - continue; // restarts due to null val - } - } // visit upper slots if present - index = (i += baseSize) < n ? i : (baseIndex = b + 1); - } - nextKey = (K) e.key; - } while ((ev = (V) e.val) == null); // skip deleted or special nodes - next = e; - return nextVal = ev; - } - - public final void remove() { - Object k = nextKey; - if (k == null && (advance() == null || (k = nextKey) == null)) - throw new IllegalStateException(); - map.internalReplace(k, null, null); - } - - public final boolean hasNext() { - return nextVal != null || advance() != null; - } - - public final boolean hasMoreElements() { return hasNext(); } - public final void setRawResult(Object x) { } - public R getRawResult() { return null; } - public boolean exec() { return true; } - } - - /* ---------------- Public operations -------------- */ - - /** - * Creates a new, empty map with the default initial table size (16). - */ - public ConcurrentHashMapV8() { - this.counter = new LongAdder(); - } - - /** - * Creates a new, empty map with an initial table size - * accommodating the specified number of elements without the need - * to dynamically resize. - * - * @param initialCapacity The implementation performs internal - * sizing to accommodate this many elements. - * @throws IllegalArgumentException if the initial capacity of - * elements is negative - */ - public ConcurrentHashMapV8(int initialCapacity) { - if (initialCapacity < 0) - throw new IllegalArgumentException(); - int cap = ((initialCapacity >= (MAXIMUM_CAPACITY >>> 1)) ? - MAXIMUM_CAPACITY : - tableSizeFor(initialCapacity + (initialCapacity >>> 1) + 1)); - this.counter = new LongAdder(); - this.sizeCtl = cap; - } - - /** - * Creates a new map with the same mappings as the given map. - * - * @param m the map - */ - public ConcurrentHashMapV8(Map m) { - this.counter = new LongAdder(); - this.sizeCtl = DEFAULT_CAPACITY; - internalPutAll(m); - } - - /** - * Creates a new, empty map with an initial table size based on - * the given number of elements ({@code initialCapacity}) and - * initial table density ({@code loadFactor}). - * - * @param initialCapacity the initial capacity. The implementation - * performs internal sizing to accommodate this many elements, - * given the specified load factor. - * @param loadFactor the load factor (table density) for - * establishing the initial table size - * @throws IllegalArgumentException if the initial capacity of - * elements is negative or the load factor is nonpositive - * - * @since 1.6 - */ - public ConcurrentHashMapV8(int initialCapacity, float loadFactor) { - this(initialCapacity, loadFactor, 1); - } - - /** - * Creates a new, empty map with an initial table size based on - * the given number of elements ({@code initialCapacity}), table - * density ({@code loadFactor}), and number of concurrently - * updating threads ({@code concurrencyLevel}). - * - * @param initialCapacity the initial capacity. The implementation - * performs internal sizing to accommodate this many elements, - * given the specified load factor. - * @param loadFactor the load factor (table density) for - * establishing the initial table size - * @param concurrencyLevel the estimated number of concurrently - * updating threads. The implementation may use this value as - * a sizing hint. - * @throws IllegalArgumentException if the initial capacity is - * negative or the load factor or concurrencyLevel are - * nonpositive - */ - public ConcurrentHashMapV8(int initialCapacity, - float loadFactor, int concurrencyLevel) { - if (!(loadFactor > 0.0f) || initialCapacity < 0 || concurrencyLevel <= 0) - throw new IllegalArgumentException(); - if (initialCapacity < concurrencyLevel) // Use at least as many bins - initialCapacity = concurrencyLevel; // as estimated threads - long size = (long)(1.0 + (long)initialCapacity / loadFactor); - int cap = (size >= (long)MAXIMUM_CAPACITY) ? - MAXIMUM_CAPACITY : tableSizeFor((int)size); - this.counter = new LongAdder(); - this.sizeCtl = cap; - } - - /** - * Creates a new {@link Set} backed by a ConcurrentHashMapV8 - * from the given type to {@code Boolean.TRUE}. - * - * @return the new set - */ - public static KeySetView newKeySet() { - return new KeySetView(new ConcurrentHashMapV8(), - Boolean.TRUE); - } - - /** - * Creates a new {@link Set} backed by a ConcurrentHashMapV8 - * from the given type to {@code Boolean.TRUE}. - * - * @param initialCapacity The implementation performs internal - * sizing to accommodate this many elements. - * @throws IllegalArgumentException if the initial capacity of - * elements is negative - * @return the new set - */ - public static KeySetView newKeySet(int initialCapacity) { - return new KeySetView(new ConcurrentHashMapV8(initialCapacity), - Boolean.TRUE); - } - - /** - * {@inheritDoc} - */ - public boolean isEmpty() { - return counter.sum() <= 0L; // ignore transient negative values - } - - /** - * {@inheritDoc} - */ - public int size() { - long n = counter.sum(); - return ((n < 0L) ? 0 : - (n > (long)Integer.MAX_VALUE) ? Integer.MAX_VALUE : - (int)n); - } - - /** - * Returns the number of mappings. This method should be used - * instead of {@link #size} because a ConcurrentHashMapV8 may - * contain more mappings than can be represented as an int. The - * value returned is a snapshot; the actual count may differ if - * there are ongoing concurrent insertions or removals. - * - * @return the number of mappings - */ - public long mappingCount() { - long n = counter.sum(); - return (n < 0L) ? 0L : n; // ignore transient negative values - } - - /** - * Returns the value to which the specified key is mapped, - * or {@code null} if this map contains no mapping for the key. - * - *

More formally, if this map contains a mapping from a key - * {@code k} to a value {@code v} such that {@code key.equals(k)}, - * then this method returns {@code v}; otherwise it returns - * {@code null}. (There can be at most one such mapping.) - * - * @throws NullPointerException if the specified key is null - */ - @SuppressWarnings("unchecked") public V get(Object key) { - if (key == null) - throw new NullPointerException(); - return (V)internalGet(key); - } - - /** - * Returns the value to which the specified key is mapped, - * or the given defaultValue if this map contains no mapping for the key. - * - * @param key the key - * @param defaultValue the value to return if this map contains - * no mapping for the given key - * @return the mapping for the key, if present; else the defaultValue - * @throws NullPointerException if the specified key is null - */ - @SuppressWarnings("unchecked") public V getValueOrDefault(Object key, V defaultValue) { - if (key == null) - throw new NullPointerException(); - V v = (V) internalGet(key); - return v == null ? defaultValue : v; - } - - /** - * Tests if the specified object is a key in this table. - * - * @param key possible key - * @return {@code true} if and only if the specified object - * is a key in this table, as determined by the - * {@code equals} method; {@code false} otherwise - * @throws NullPointerException if the specified key is null - */ - public boolean containsKey(Object key) { - if (key == null) - throw new NullPointerException(); - return internalGet(key) != null; - } - - /** - * Returns {@code true} if this map maps one or more keys to the - * specified value. Note: This method may require a full traversal - * of the map, and is much slower than method {@code containsKey}. - * - * @param value value whose presence in this map is to be tested - * @return {@code true} if this map maps one or more keys to the - * specified value - * @throws NullPointerException if the specified value is null - */ - public boolean containsValue(Object value) { - if (value == null) - throw new NullPointerException(); - Object v; - Traverser it = new Traverser(this); - while ((v = it.advance()) != null) { - if (v == value || value.equals(v)) - return true; - } - return false; - } - - public K findKey(Object value) { - if (value == null) - throw new NullPointerException(); - Object v; - Traverser it = new Traverser(this); - while ((v = it.advance()) != null) { - if (v == value || value.equals(v)) - return it.nextKey; - } - return null; - } - - /** - * Legacy method testing if some key maps into the specified value - * in this table. This method is identical in functionality to - * {@link #containsValue}, and exists solely to ensure - * full compatibility with class {@link java.util.Hashtable}, - * which supported this method prior to introduction of the - * Java Collections framework. - * - * @param value a value to search for - * @return {@code true} if and only if some key maps to the - * {@code value} argument in this table as - * determined by the {@code equals} method; - * {@code false} otherwise - * @throws NullPointerException if the specified value is null - */ - public boolean contains(Object value) { - return containsValue(value); - } - - /** - * Maps the specified key to the specified value in this table. - * Neither the key nor the value can be null. - * - *

The value can be retrieved by calling the {@code get} method - * with a key that is equal to the original key. - * - * @param key key with which the specified value is to be associated - * @param value value to be associated with the specified key - * @return the previous value associated with {@code key}, or - * {@code null} if there was no mapping for {@code key} - * @throws NullPointerException if the specified key or value is null - */ - @SuppressWarnings("unchecked") public V put(K key, V value) { - if (key == null || value == null) - throw new NullPointerException(); - return (V)internalPut(key, value); - } - - /** - * {@inheritDoc} - * - * @return the previous value associated with the specified key, - * or {@code null} if there was no mapping for the key - * @throws NullPointerException if the specified key or value is null - */ - @SuppressWarnings("unchecked") public V putIfAbsent(K key, V value) { - if (key == null || value == null) - throw new NullPointerException(); - return (V)internalPutIfAbsent(key, value); - } - - /** - * Copies all of the mappings from the specified map to this one. - * These mappings replace any mappings that this map had for any of the - * keys currently in the specified map. - * - * @param m mappings to be stored in this map - */ - public void putAll(Map m) { - internalPutAll(m); - } - - /** - * If the specified key is not already associated with a value, - * computes its value using the given mappingFunction and enters - * it into the map unless null. This is equivalent to - *

 {@code
-     * if (map.containsKey(key))
-     *   return map.get(key);
-     * value = mappingFunction.apply(key);
-     * if (value != null)
-     *   map.put(key, value);
-     * return value;}
- * - * except that the action is performed atomically. If the - * function returns {@code null} no mapping is recorded. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and no mapping is recorded. Some - * attempted update operations on this map by other threads may be - * blocked while computation is in progress, so the computation - * should be short and simple, and must not attempt to update any - * other mappings of this Map. The most appropriate usage is to - * construct a new object serving as an initial mapped value, or - * memoized result, as in: - * - *
 {@code
-     * map.computeIfAbsent(key, new Fun() {
-     *   public V map(K k) { return new Value(f(k)); }});}
- * - * @param key key with which the specified value is to be associated - * @param mappingFunction the function to compute a value - * @return the current (existing or computed) value associated with - * the specified key, or null if the computed value is null - * @throws NullPointerException if the specified key or mappingFunction - * is null - * @throws IllegalStateException if the computation detectably - * attempts a recursive update to this map that would - * otherwise never complete - * @throws RuntimeException or Error if the mappingFunction does so, - * in which case the mapping is left unestablished - */ - @SuppressWarnings("unchecked") public V computeIfAbsent - (K key, Fun mappingFunction) { - if (key == null || mappingFunction == null) - throw new NullPointerException(); - return (V)internalComputeIfAbsent(key, mappingFunction); - } - - /** - * If the given key is present, computes a new mapping value given a key and - * its current mapped value. This is equivalent to - *
 {@code
-     *   if (map.containsKey(key)) {
-     *     value = remappingFunction.apply(key, map.get(key));
-     *     if (value != null)
-     *       map.put(key, value);
-     *     else
-     *       map.remove(key);
-     *   }
-     * }
- * - * except that the action is performed atomically. If the - * function returns {@code null}, the mapping is removed. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and the current mapping is left - * unchanged. Some attempted update operations on this map by - * other threads may be blocked while computation is in progress, - * so the computation should be short and simple, and must not - * attempt to update any other mappings of this Map. For example, - * to either create or append new messages to a value mapping: - * - * @param key key with which the specified value is to be associated - * @param remappingFunction the function to compute a value - * @return the new value associated with the specified key, or null if none - * @throws NullPointerException if the specified key or remappingFunction - * is null - * @throws IllegalStateException if the computation detectably - * attempts a recursive update to this map that would - * otherwise never complete - * @throws RuntimeException or Error if the remappingFunction does so, - * in which case the mapping is unchanged - */ - @SuppressWarnings("unchecked") public V computeIfPresent - (K key, BiFun remappingFunction) { - if (key == null || remappingFunction == null) - throw new NullPointerException(); - return (V)internalCompute(key, true, remappingFunction); - } - - /** - * Computes a new mapping value given a key and - * its current mapped value (or {@code null} if there is no current - * mapping). This is equivalent to - *
 {@code
-     *   value = remappingFunction.apply(key, map.get(key));
-     *   if (value != null)
-     *     map.put(key, value);
-     *   else
-     *     map.remove(key);
-     * }
- * - * except that the action is performed atomically. If the - * function returns {@code null}, the mapping is removed. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and the current mapping is left - * unchanged. Some attempted update operations on this map by - * other threads may be blocked while computation is in progress, - * so the computation should be short and simple, and must not - * attempt to update any other mappings of this Map. For example, - * to either create or append new messages to a value mapping: - * - *
 {@code
-     * Map map = ...;
-     * final String msg = ...;
-     * map.compute(key, new BiFun() {
-     *   public String apply(Key k, String v) {
-     *    return (v == null) ? msg : v + msg;});}}
- * - * @param key key with which the specified value is to be associated - * @param remappingFunction the function to compute a value - * @return the new value associated with the specified key, or null if none - * @throws NullPointerException if the specified key or remappingFunction - * is null - * @throws IllegalStateException if the computation detectably - * attempts a recursive update to this map that would - * otherwise never complete - * @throws RuntimeException or Error if the remappingFunction does so, - * in which case the mapping is unchanged - */ - @SuppressWarnings("unchecked") public V compute - (K key, BiFun remappingFunction) { - if (key == null || remappingFunction == null) - throw new NullPointerException(); - return (V)internalCompute(key, false, remappingFunction); - } - - /** - * If the specified key is not already associated - * with a value, associate it with the given value. - * Otherwise, replace the value with the results of - * the given remapping function. This is equivalent to: - *
 {@code
-     *   if (!map.containsKey(key))
-     *     map.put(value);
-     *   else {
-     *     newValue = remappingFunction.apply(map.get(key), value);
-     *     if (value != null)
-     *       map.put(key, value);
-     *     else
-     *       map.remove(key);
-     *   }
-     * }
- * except that the action is performed atomically. If the - * function returns {@code null}, the mapping is removed. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and the current mapping is left - * unchanged. Some attempted update operations on this map by - * other threads may be blocked while computation is in progress, - * so the computation should be short and simple, and must not - * attempt to update any other mappings of this Map. - */ - @SuppressWarnings("unchecked") public V merge - (K key, V value, BiFun remappingFunction) { - if (key == null || value == null || remappingFunction == null) - throw new NullPointerException(); - return (V)internalMerge(key, value, remappingFunction); - } - - /** - * Removes the key (and its corresponding value) from this map. - * This method does nothing if the key is not in the map. - * - * @param key the key that needs to be removed - * @return the previous value associated with {@code key}, or - * {@code null} if there was no mapping for {@code key} - * @throws NullPointerException if the specified key is null - */ - @SuppressWarnings("unchecked") public V remove(Object key) { - if (key == null) - throw new NullPointerException(); - return (V)internalReplace(key, null, null); - } - - /** - * {@inheritDoc} - * - * @throws NullPointerException if the specified key is null - */ - public boolean remove(Object key, Object value) { - if (key == null) - throw new NullPointerException(); - if (value == null) - return false; - return internalReplace(key, null, value) != null; - } - - /** - * {@inheritDoc} - * - * @throws NullPointerException if any of the arguments are null - */ - public boolean replace(K key, V oldValue, V newValue) { - if (key == null || oldValue == null || newValue == null) - throw new NullPointerException(); - return internalReplace(key, newValue, oldValue) != null; - } - - /** - * {@inheritDoc} - * - * @return the previous value associated with the specified key, - * or {@code null} if there was no mapping for the key - * @throws NullPointerException if the specified key or value is null - */ - @SuppressWarnings("unchecked") public V replace(K key, V value) { - if (key == null || value == null) - throw new NullPointerException(); - return (V)internalReplace(key, value, null); - } - - /** - * Removes all of the mappings from this map. - */ - public void clear() { - internalClear(); - } - - /** - * Returns a {@link Set} view of the keys contained in this map. - * The set is backed by the map, so changes to the map are - * reflected in the set, and vice-versa. - * - * @return the set view - */ - public KeySetView keySet() { - KeySetView ks = keySet; - return (ks != null) ? ks : (keySet = new KeySetView(this, null)); - } - - /** - * Returns a {@link Set} view of the keys in this map, using the - * given common mapped value for any additions (i.e., {@link - * Collection#add} and {@link Collection#addAll}). This is of - * course only appropriate if it is acceptable to use the same - * value for all additions from this view. - * - * @param mappedValue the mapped value to use for any - * additions. - * @return the set view - * @throws NullPointerException if the mappedValue is null - */ - public KeySetView keySet(V mappedValue) { - if (mappedValue == null) - throw new NullPointerException(); - return new KeySetView(this, mappedValue); - } - - /** - * Returns a {@link Collection} view of the values contained in this map. - * The collection is backed by the map, so changes to the map are - * reflected in the collection, and vice-versa. - */ - public ValuesView values() { - ValuesView vs = values; - return (vs != null) ? vs : (values = new ValuesView(this)); - } - - /** - * Returns a {@link Set} view of the mappings contained in this map. - * The set is backed by the map, so changes to the map are - * reflected in the set, and vice-versa. The set supports element - * removal, which removes the corresponding mapping from the map, - * via the {@code Iterator.remove}, {@code Set.remove}, - * {@code removeAll}, {@code retainAll}, and {@code clear} - * operations. It does not support the {@code add} or - * {@code addAll} operations. - * - *

The view's {@code iterator} is a "weakly consistent" iterator - * that will never throw {@link ConcurrentModificationException}, - * and guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not guaranteed to) - * reflect any modifications subsequent to construction. - */ - public Set> entrySet() { - EntrySetView es = entrySet; - return (es != null) ? es : (entrySet = new EntrySetView(this)); - } - - /** - * Returns an enumeration of the keys in this table. - * - * @return an enumeration of the keys in this table - * @see #keySet() - */ - public Enumeration keys() { - return new KeyIterator(this); - } - - /** - * Returns an enumeration of the values in this table. - * - * @return an enumeration of the values in this table - * @see #values() - */ - public Enumeration elements() { - return new ValueIterator(this); - } - - /** - * Returns a partitionable iterator of the keys in this map. - * - * @return a partitionable iterator of the keys in this map - */ - public Spliterator keySpliterator() { - return new KeyIterator(this); - } - - /** - * Returns a partitionable iterator of the values in this map. - * - * @return a partitionable iterator of the values in this map - */ - public Spliterator valueSpliterator() { - return new ValueIterator(this); - } - - /** - * Returns a partitionable iterator of the entries in this map. - * - * @return a partitionable iterator of the entries in this map - */ - public Spliterator> entrySpliterator() { - return new EntryIterator(this); - } - - /** - * Returns the hash code value for this {@link Map}, i.e., - * the sum of, for each key-value pair in the map, - * {@code key.hashCode() ^ value.hashCode()}. - * - * @return the hash code value for this map - */ - public int hashCode() { - int h = 0; - Traverser it = new Traverser(this); - Object v; - while ((v = it.advance()) != null) { - h += it.nextKey.hashCode() ^ v.hashCode(); - } - return h; - } - - /** - * Returns a string representation of this map. The string - * representation consists of a list of key-value mappings (in no - * particular order) enclosed in braces ("{@code {}}"). Adjacent - * mappings are separated by the characters {@code ", "} (comma - * and space). Each key-value mapping is rendered as the key - * followed by an equals sign ("{@code =}") followed by the - * associated value. - * - * @return a string representation of this map - */ - public String toString() { - Traverser it = new Traverser(this); - StringBuilder sb = new StringBuilder(); - sb.append('{'); - Object v; - if ((v = it.advance()) != null) { - for (;;) { - Object k = it.nextKey; - sb.append(k == this ? "(this Map)" : k); - sb.append('='); - sb.append(v == this ? "(this Map)" : v); - if ((v = it.advance()) == null) - break; - sb.append(',').append(' '); - } - } - return sb.append('}').toString(); - } - - /** - * Compares the specified object with this map for equality. - * Returns {@code true} if the given object is a map with the same - * mappings as this map. This operation may return misleading - * results if either map is concurrently modified during execution - * of this method. - * - * @param o object to be compared for equality with this map - * @return {@code true} if the specified object is equal to this map - */ - public boolean equals(Object o) { - if (o != this) { - if (!(o instanceof Map)) - return false; - Map m = (Map) o; - Traverser it = new Traverser(this); - Object val; - while ((val = it.advance()) != null) { - Object v = m.get(it.nextKey); - if (v == null || (v != val && !v.equals(val))) - return false; - } - for (Map.Entry e : m.entrySet()) { - Object mk, mv, v; - if ((mk = e.getKey()) == null || - (mv = e.getValue()) == null || - (v = internalGet(mk)) == null || - (mv != v && !mv.equals(v))) - return false; - } - } - return true; - } - - /* ----------------Iterators -------------- */ - - @SuppressWarnings("serial") static final class KeyIterator extends Traverser - implements Spliterator, Enumeration { - KeyIterator(ConcurrentHashMapV8 map) { super(map); } - KeyIterator(Traverser it) { - super(it); - } - public KeyIterator split() { - if (nextKey != null) - throw new IllegalStateException(); - return new KeyIterator(this); - } - @SuppressWarnings("unchecked") public final K next() { - if (nextVal == null && advance() == null) - throw new NoSuchElementException(); - Object k = nextKey; - nextVal = null; - return (K) k; - } - - public final K nextElement() { return next(); } - } - - @SuppressWarnings("serial") static final class ValueIterator extends Traverser - implements Spliterator, Enumeration { - ValueIterator(ConcurrentHashMapV8 map) { super(map); } - ValueIterator(Traverser it) { - super(it); - } - public ValueIterator split() { - if (nextKey != null) - throw new IllegalStateException(); - return new ValueIterator(this); - } - - @SuppressWarnings("unchecked") public final V next() { - Object v; - if ((v = nextVal) == null && (v = advance()) == null) - throw new NoSuchElementException(); - nextVal = null; - return (V) v; - } - - public final V nextElement() { return next(); } - } - - @SuppressWarnings("serial") static final class EntryIterator extends Traverser - implements Spliterator> { - EntryIterator(ConcurrentHashMapV8 map) { super(map); } - EntryIterator(Traverser it) { - super(it); - } - public EntryIterator split() { - if (nextKey != null) - throw new IllegalStateException(); - return new EntryIterator(this); - } - - @SuppressWarnings("unchecked") public final Map.Entry next() { - Object v; - if ((v = nextVal) == null && (v = advance()) == null) - throw new NoSuchElementException(); - Object k = nextKey; - nextVal = null; - return new MapEntry((K)k, (V)v, map); - } - } - - /** - * Exported Entry for iterators - */ - static final class MapEntry implements Map.Entry { - final K key; // non-null - V val; // non-null - final ConcurrentHashMapV8 map; - MapEntry(K key, V val, ConcurrentHashMapV8 map) { - this.key = key; - this.val = val; - this.map = map; - } - public final K getKey() { return key; } - public final V getValue() { return val; } - public final int hashCode() { return key.hashCode() ^ val.hashCode(); } - public final String toString(){ return key + "=" + val; } - - public final boolean equals(Object o) { - Object k, v; Map.Entry e; - return ((o instanceof Map.Entry) && - (k = (e = (Map.Entry)o).getKey()) != null && - (v = e.getValue()) != null && - (k == key || k.equals(key)) && - (v == val || v.equals(val))); - } - - /** - * Sets our entry's value and writes through to the map. The - * value to return is somewhat arbitrary here. Since we do not - * necessarily track asynchronous changes, the most recent - * "previous" value could be different from what we return (or - * could even have been removed in which case the put will - * re-establish). We do not and cannot guarantee more. - */ - public final V setValue(V value) { - if (value == null) throw new NullPointerException(); - V v = val; - val = value; - map.put(key, value); - return v; - } - } - - /* ---------------- Serialization Support -------------- */ - - /** - * Stripped-down version of helper class used in previous version, - * declared for the sake of serialization compatibility - */ - static class Segment implements Serializable { - private static final long serialVersionUID = 2249069246763182397L; - final float loadFactor; - Segment(float lf) { this.loadFactor = lf; } - } - - /** - * Saves the state of the {@code ConcurrentHashMapV8} instance to a - * stream (i.e., serializes it). - * @param s the stream - * @serialData - * the key (Object) and value (Object) - * for each key-value mapping, followed by a null pair. - * The key-value mappings are emitted in no particular order. - */ - @SuppressWarnings("unchecked") private void writeObject(java.io.ObjectOutputStream s) - throws java.io.IOException { - if (segments == null) { // for serialization compatibility - segments = (Segment[]) - new Segment[DEFAULT_CONCURRENCY_LEVEL]; - for (int i = 0; i < segments.length; ++i) - segments[i] = new Segment(LOAD_FACTOR); - } - s.defaultWriteObject(); - Traverser it = new Traverser(this); - Object v; - while ((v = it.advance()) != null) { - s.writeObject(it.nextKey); - s.writeObject(v); - } - s.writeObject(null); - s.writeObject(null); - segments = null; // throw away - } - - /** - * Reconstitutes the instance from a stream (that is, deserializes it). - * @param s the stream - */ - @SuppressWarnings("unchecked") private void readObject(java.io.ObjectInputStream s) - throws java.io.IOException, ClassNotFoundException { - s.defaultReadObject(); - this.segments = null; // unneeded - // initialize transient final field - UNSAFE.putObjectVolatile(this, counterOffset, new LongAdder()); - - // Create all nodes, then place in table once size is known - long size = 0L; - Node p = null; - for (;;) { - K k = (K) s.readObject(); - V v = (V) s.readObject(); - if (k != null && v != null) { - int h = spread(k.hashCode()); - p = new Node(h, k, v, p); - ++size; - } - else - break; - } - if (p != null) { - boolean init = false; - int n; - if (size >= (long)(MAXIMUM_CAPACITY >>> 1)) - n = MAXIMUM_CAPACITY; - else { - int sz = (int)size; - n = tableSizeFor(sz + (sz >>> 1) + 1); - } - int sc = sizeCtl; - boolean collide = false; - if (n > sc && - UNSAFE.compareAndSwapInt(this, sizeCtlOffset, sc, -1)) { - try { - if (table == null) { - init = true; - Node[] tab = new Node[n]; - int mask = n - 1; - while (p != null) { - int j = p.hash & mask; - Node next = p.next; - Node q = p.next = tabAt(tab, j); - setTabAt(tab, j, p); - if (!collide && q != null && q.hash == p.hash) - collide = true; - p = next; - } - table = tab; - counter.add(size); - sc = n - (n >>> 2); - } - } finally { - sizeCtl = sc; - } - if (collide) { // rescan and convert to TreeBins - Node[] tab = table; - for (int i = 0; i < tab.length; ++i) { - int c = 0; - for (Node e = tabAt(tab, i); e != null; e = e.next) { - if (++c > TREE_THRESHOLD && - (e.key instanceof Comparable)) { - replaceWithTreeBin(tab, i, e.key); - break; - } - } - } - } - } - if (!init) { // Can only happen if unsafely published. - while (p != null) { - internalPut(p.key, p.val); - p = p.next; - } - } - } - } - - - // ------------------------------------------------------- - - // Sams - /** Interface describing a void action of one argument */ - public interface Action { void apply(A a); } - /** Interface describing a void action of two arguments */ - public interface BiAction { void apply(A a, B b); } - /** Interface describing a function of one argument */ - public interface Generator { T apply(); } - /** Interface describing a function mapping its argument to a double */ - public interface ObjectToDouble { double apply(A a); } - /** Interface describing a function mapping its argument to a long */ - public interface ObjectToLong { long apply(A a); } - /** Interface describing a function mapping its argument to an int */ - public interface ObjectToInt {int apply(A a); } - /** Interface describing a function mapping two arguments to a double */ - public interface ObjectByObjectToDouble { double apply(A a, B b); } - /** Interface describing a function mapping two arguments to a long */ - public interface ObjectByObjectToLong { long apply(A a, B b); } - /** Interface describing a function mapping two arguments to an int */ - public interface ObjectByObjectToInt {int apply(A a, B b); } - /** Interface describing a function mapping a double to a double */ - public interface DoubleToDouble { double apply(double a); } - /** Interface describing a function mapping a long to a long */ - public interface LongToLong { long apply(long a); } - /** Interface describing a function mapping an int to an int */ - public interface IntToInt { int apply(int a); } - /** Interface describing a function mapping two doubles to a double */ - public interface DoubleByDoubleToDouble { double apply(double a, double b); } - /** Interface describing a function mapping two longs to a long */ - public interface LongByLongToLong { long apply(long a, long b); } - /** Interface describing a function mapping two ints to an int */ - public interface IntByIntToInt { int apply(int a, int b); } - - - /* ----------------Views -------------- */ - - /** - * Base class for views. - */ - static abstract class CHMView { - final ConcurrentHashMapV8 map; - CHMView(ConcurrentHashMapV8 map) { this.map = map; } - - /** - * Returns the map backing this view. - * - * @return the map backing this view - */ - public ConcurrentHashMapV8 getMap() { return map; } - - public final int size() { return map.size(); } - public final boolean isEmpty() { return map.isEmpty(); } - public final void clear() { map.clear(); } - - // implementations below rely on concrete classes supplying these - abstract public Iterator iterator(); - abstract public boolean contains(Object o); - abstract public boolean remove(Object o); - - private static final String oomeMsg = "Required array size too large"; - - public final Object[] toArray() { - long sz = map.mappingCount(); - if (sz > (long)(MAX_ARRAY_SIZE)) - throw new OutOfMemoryError(oomeMsg); - int n = (int)sz; - Object[] r = new Object[n]; - int i = 0; - Iterator it = iterator(); - while (it.hasNext()) { - if (i == n) { - if (n >= MAX_ARRAY_SIZE) - throw new OutOfMemoryError(oomeMsg); - if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1) - n = MAX_ARRAY_SIZE; - else - n += (n >>> 1) + 1; - r = Arrays.copyOf(r, n); - } - r[i++] = it.next(); - } - return (i == n) ? r : Arrays.copyOf(r, i); - } - - @SuppressWarnings("unchecked") public final T[] toArray(T[] a) { - long sz = map.mappingCount(); - if (sz > (long)(MAX_ARRAY_SIZE)) - throw new OutOfMemoryError(oomeMsg); - int m = (int)sz; - T[] r = (a.length >= m) ? a : - (T[])java.lang.reflect.Array - .newInstance(a.getClass().getComponentType(), m); - int n = r.length; - int i = 0; - Iterator it = iterator(); - while (it.hasNext()) { - if (i == n) { - if (n >= MAX_ARRAY_SIZE) - throw new OutOfMemoryError(oomeMsg); - if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1) - n = MAX_ARRAY_SIZE; - else - n += (n >>> 1) + 1; - r = Arrays.copyOf(r, n); - } - r[i++] = (T)it.next(); - } - if (a == r && i < n) { - r[i] = null; // null-terminate - return r; - } - return (i == n) ? r : Arrays.copyOf(r, i); - } - - public final int hashCode() { - int h = 0; - for (Iterator it = iterator(); it.hasNext();) - h += it.next().hashCode(); - return h; - } - - public final String toString() { - StringBuilder sb = new StringBuilder(); - sb.append('['); - Iterator it = iterator(); - if (it.hasNext()) { - for (;;) { - Object e = it.next(); - sb.append(e == this ? "(this Collection)" : e); - if (!it.hasNext()) - break; - sb.append(',').append(' '); - } - } - return sb.append(']').toString(); - } - - public final boolean containsAll(Collection c) { - if (c != this) { - for (Iterator it = c.iterator(); it.hasNext();) { - Object e = it.next(); - if (e == null || !contains(e)) - return false; - } - } - return true; - } - - public final boolean removeAll(Collection c) { - boolean modified = false; - for (Iterator it = iterator(); it.hasNext();) { - if (c.contains(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - } - - public final boolean retainAll(Collection c) { - boolean modified = false; - for (Iterator it = iterator(); it.hasNext();) { - if (!c.contains(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - } - - } - - /** - * A view of a ConcurrentHashMapV8 as a {@link Set} of keys, in - * which additions may optionally be enabled by mapping to a - * common value. This class cannot be directly instantiated. See - * {@link #keySet}, {@link #keySet(Object)}, {@link #newKeySet()}, - * {@link #newKeySet(int)}. - */ - public static class KeySetView extends CHMView implements Set, java.io.Serializable { - private static final long serialVersionUID = 7249069246763182397L; - private final V value; - KeySetView(ConcurrentHashMapV8 map, V value) { // non-public - super(map); - this.value = value; - } - - /** - * Returns the default mapped value for additions, - * or {@code null} if additions are not supported. - * - * @return the default mapped value for additions, or {@code null} - * if not supported. - */ - public V getMappedValue() { return value; } - - // implement Set API - - public boolean contains(Object o) { return map.containsKey(o); } - public boolean remove(Object o) { return map.remove(o) != null; } - - /** - * Returns a "weakly consistent" iterator that will never - * throw {@link ConcurrentModificationException}, and - * guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not - * guaranteed to) reflect any modifications subsequent to - * construction. - * - * @return an iterator over the keys of this map - */ - public Iterator iterator() { return new KeyIterator(map); } - public boolean add(K e) { - V v; - if ((v = value) == null) - throw new UnsupportedOperationException(); - if (e == null) - throw new NullPointerException(); - return map.internalPutIfAbsent(e, v) == null; - } - public boolean addAll(Collection c) { - boolean added = false; - V v; - if ((v = value) == null) - throw new UnsupportedOperationException(); - for (K e : c) { - if (e == null) - throw new NullPointerException(); - if (map.internalPutIfAbsent(e, v) == null) - added = true; - } - return added; - } - public boolean equals(Object o) { - Set c; - return ((o instanceof Set) && - ((c = (Set)o) == this || - (containsAll(c) && c.containsAll(this)))); - } - } - - /** - * A view of a ConcurrentHashMapV8 as a {@link Collection} of - * values, in which additions are disabled. This class cannot be - * directly instantiated. See {@link #values}, - * - *

The view's {@code iterator} is a "weakly consistent" iterator - * that will never throw {@link ConcurrentModificationException}, - * and guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not guaranteed to) - * reflect any modifications subsequent to construction. - */ - public static final class ValuesView extends CHMView - implements Collection { - ValuesView(ConcurrentHashMapV8 map) { super(map); } - public final boolean contains(Object o) { return map.containsValue(o); } - public final boolean remove(Object o) { - if (o != null) { - Iterator it = new ValueIterator(map); - while (it.hasNext()) { - if (o.equals(it.next())) { - it.remove(); - return true; - } - } - } - return false; - } - - /** - * Returns a "weakly consistent" iterator that will never - * throw {@link ConcurrentModificationException}, and - * guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not - * guaranteed to) reflect any modifications subsequent to - * construction. - * - * @return an iterator over the values of this map - */ - public final Iterator iterator() { - return new ValueIterator(map); - } - public final boolean add(V e) { - throw new UnsupportedOperationException(); - } - public final boolean addAll(Collection c) { - throw new UnsupportedOperationException(); - } - } - - /** - * A view of a ConcurrentHashMapV8 as a {@link Set} of (key, value) - * entries. This class cannot be directly instantiated. See - * {@link #entrySet}. - */ - public static final class EntrySetView extends CHMView - implements Set> { - EntrySetView(ConcurrentHashMapV8 map) { super(map); } - public final boolean contains(Object o) { - Object k, v, r; Map.Entry e; - return ((o instanceof Map.Entry) && - (k = (e = (Map.Entry)o).getKey()) != null && - (r = map.get(k)) != null && - (v = e.getValue()) != null && - (v == r || v.equals(r))); - } - public final boolean remove(Object o) { - Object k, v; Map.Entry e; - return ((o instanceof Map.Entry) && - (k = (e = (Map.Entry)o).getKey()) != null && - (v = e.getValue()) != null && - map.remove(k, v)); - } - - /** - * Returns a "weakly consistent" iterator that will never - * throw {@link ConcurrentModificationException}, and - * guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not - * guaranteed to) reflect any modifications subsequent to - * construction. - * - * @return an iterator over the entries of this map - */ - public final Iterator> iterator() { - return new EntryIterator(map); - } - - public final boolean add(Entry e) { - K key = e.getKey(); - V value = e.getValue(); - if (key == null || value == null) - throw new NullPointerException(); - return map.internalPut(key, value) == null; - } - public final boolean addAll(Collection> c) { - boolean added = false; - for (Entry e : c) { - if (add(e)) - added = true; - } - return added; - } - public boolean equals(Object o) { - Set c; - return ((o instanceof Set) && - ((c = (Set)o) == this || - (containsAll(c) && c.containsAll(this)))); - } - } - - // Unsafe mechanics - private static final sun.misc.Unsafe UNSAFE; - private static final long counterOffset; - private static final long sizeCtlOffset; - private static final long ABASE; - private static final int ASHIFT; - - static { - int ss; - try { - UNSAFE = getUnsafe(); - Class k = ConcurrentHashMapV8.class; - counterOffset = UNSAFE.objectFieldOffset - (k.getDeclaredField("counter")); - sizeCtlOffset = UNSAFE.objectFieldOffset - (k.getDeclaredField("sizeCtl")); - Class sc = Node[].class; - ABASE = UNSAFE.arrayBaseOffset(sc); - ss = UNSAFE.arrayIndexScale(sc); - } catch (Exception e) { - throw new Error(e); - } - if ((ss & (ss-1)) != 0) - throw new Error("data type scale not a power of two"); - ASHIFT = 31 - Integer.numberOfLeadingZeros(ss); - } - - /** - * Returns a sun.misc.Unsafe. Suitable for use in a 3rd party package. - * Replace with a simple call to Unsafe.getUnsafe when integrating - * into a jdk. - * - * @return a sun.misc.Unsafe - */ - private static sun.misc.Unsafe getUnsafe() { - try { - return sun.misc.Unsafe.getUnsafe(); - } catch (SecurityException se) { - try { - return java.security.AccessController.doPrivileged - (new java.security - .PrivilegedExceptionAction() { - public sun.misc.Unsafe run() throws Exception { - java.lang.reflect.Field f = sun.misc - .Unsafe.class.getDeclaredField("theUnsafe"); - f.setAccessible(true); - return (sun.misc.Unsafe) f.get(null); - }}); - } catch (java.security.PrivilegedActionException e) { - throw new RuntimeException("Could not initialize intrinsics", - e.getCause()); - } - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/LongAdder.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/LongAdder.java deleted file mode 100644 index 47a923c8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/LongAdder.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Written by Doug Lea with assistance from members of JCP JSR-166 - * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// This is based on 1.9 version. - -package com.concurrent_ruby.ext.jsr166e; -import java.util.concurrent.atomic.AtomicLong; -import java.io.IOException; -import java.io.Serializable; -import java.io.ObjectInputStream; - -/** - * One or more variables that together maintain an initially zero - * {@code long} sum. When updates (method {@link #add}) are contended - * across threads, the set of variables may grow dynamically to reduce - * contention. Method {@link #sum} (or, equivalently, {@link - * #longValue}) returns the current total combined across the - * variables maintaining the sum. - * - *

This class is usually preferable to {@link AtomicLong} when - * multiple threads update a common sum that is used for purposes such - * as collecting statistics, not for fine-grained synchronization - * control. Under low update contention, the two classes have similar - * characteristics. But under high contention, expected throughput of - * this class is significantly higher, at the expense of higher space - * consumption. - * - *

This class extends {@link Number}, but does not define - * methods such as {@code hashCode} and {@code compareTo} because - * instances are expected to be mutated, and so are not useful as - * collection keys. - * - *

jsr166e note: This class is targeted to be placed in - * java.util.concurrent.atomic. - * - * @since 1.8 - * @author Doug Lea - */ -public class LongAdder extends Striped64 implements Serializable { - private static final long serialVersionUID = 7249069246863182397L; - - /** - * Version of plus for use in retryUpdate - */ - final long fn(long v, long x) { return v + x; } - - /** - * Creates a new adder with initial sum of zero. - */ - public LongAdder() { - } - - /** - * Adds the given value. - * - * @param x the value to add - */ - public void add(long x) { - Cell[] as; long b, v; HashCode hc; Cell a; int n; - if ((as = cells) != null || !casBase(b = base, b + x)) { - boolean uncontended = true; - int h = (hc = threadHashCode.get()).code; - if (as == null || (n = as.length) < 1 || - (a = as[(n - 1) & h]) == null || - !(uncontended = a.cas(v = a.value, v + x))) - retryUpdate(x, hc, uncontended); - } - } - - /** - * Equivalent to {@code add(1)}. - */ - public void increment() { - add(1L); - } - - /** - * Equivalent to {@code add(-1)}. - */ - public void decrement() { - add(-1L); - } - - /** - * Returns the current sum. The returned value is NOT an - * atomic snapshot: Invocation in the absence of concurrent - * updates returns an accurate result, but concurrent updates that - * occur while the sum is being calculated might not be - * incorporated. - * - * @return the sum - */ - public long sum() { - long sum = base; - Cell[] as = cells; - if (as != null) { - int n = as.length; - for (int i = 0; i < n; ++i) { - Cell a = as[i]; - if (a != null) - sum += a.value; - } - } - return sum; - } - - /** - * Resets variables maintaining the sum to zero. This method may - * be a useful alternative to creating a new adder, but is only - * effective if there are no concurrent updates. Because this - * method is intrinsically racy, it should only be used when it is - * known that no threads are concurrently updating. - */ - public void reset() { - internalReset(0L); - } - - /** - * Equivalent in effect to {@link #sum} followed by {@link - * #reset}. This method may apply for example during quiescent - * points between multithreaded computations. If there are - * updates concurrent with this method, the returned value is - * not guaranteed to be the final value occurring before - * the reset. - * - * @return the sum - */ - public long sumThenReset() { - long sum = base; - Cell[] as = cells; - base = 0L; - if (as != null) { - int n = as.length; - for (int i = 0; i < n; ++i) { - Cell a = as[i]; - if (a != null) { - sum += a.value; - a.value = 0L; - } - } - } - return sum; - } - - /** - * Returns the String representation of the {@link #sum}. - * @return the String representation of the {@link #sum} - */ - public String toString() { - return Long.toString(sum()); - } - - /** - * Equivalent to {@link #sum}. - * - * @return the sum - */ - public long longValue() { - return sum(); - } - - /** - * Returns the {@link #sum} as an {@code int} after a narrowing - * primitive conversion. - */ - public int intValue() { - return (int)sum(); - } - - /** - * Returns the {@link #sum} as a {@code float} - * after a widening primitive conversion. - */ - public float floatValue() { - return (float)sum(); - } - - /** - * Returns the {@link #sum} as a {@code double} after a widening - * primitive conversion. - */ - public double doubleValue() { - return (double)sum(); - } - - private void writeObject(java.io.ObjectOutputStream s) - throws java.io.IOException { - s.defaultWriteObject(); - s.writeLong(sum()); - } - - private void readObject(ObjectInputStream s) - throws IOException, ClassNotFoundException { - s.defaultReadObject(); - busy = 0; - cells = null; - base = s.readLong(); - } - -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/Striped64.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/Striped64.java deleted file mode 100644 index 93a277fb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/Striped64.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Written by Doug Lea with assistance from members of JCP JSR-166 - * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// This is based on 1.5 version. - -package com.concurrent_ruby.ext.jsr166e; -import java.util.Random; - -/** - * A package-local class holding common representation and mechanics - * for classes supporting dynamic striping on 64bit values. The class - * extends Number so that concrete subclasses must publicly do so. - */ -abstract class Striped64 extends Number { - /* - * This class maintains a lazily-initialized table of atomically - * updated variables, plus an extra "base" field. The table size - * is a power of two. Indexing uses masked per-thread hash codes. - * Nearly all declarations in this class are package-private, - * accessed directly by subclasses. - * - * Table entries are of class Cell; a variant of AtomicLong padded - * to reduce cache contention on most processors. Padding is - * overkill for most Atomics because they are usually irregularly - * scattered in memory and thus don't interfere much with each - * other. But Atomic objects residing in arrays will tend to be - * placed adjacent to each other, and so will most often share - * cache lines (with a huge negative performance impact) without - * this precaution. - * - * In part because Cells are relatively large, we avoid creating - * them until they are needed. When there is no contention, all - * updates are made to the base field. Upon first contention (a - * failed CAS on base update), the table is initialized to size 2. - * The table size is doubled upon further contention until - * reaching the nearest power of two greater than or equal to the - * number of CPUS. Table slots remain empty (null) until they are - * needed. - * - * A single spinlock ("busy") is used for initializing and - * resizing the table, as well as populating slots with new Cells. - * There is no need for a blocking lock: When the lock is not - * available, threads try other slots (or the base). During these - * retries, there is increased contention and reduced locality, - * which is still better than alternatives. - * - * Per-thread hash codes are initialized to random values. - * Contention and/or table collisions are indicated by failed - * CASes when performing an update operation (see method - * retryUpdate). Upon a collision, if the table size is less than - * the capacity, it is doubled in size unless some other thread - * holds the lock. If a hashed slot is empty, and lock is - * available, a new Cell is created. Otherwise, if the slot - * exists, a CAS is tried. Retries proceed by "double hashing", - * using a secondary hash (Marsaglia XorShift) to try to find a - * free slot. - * - * The table size is capped because, when there are more threads - * than CPUs, supposing that each thread were bound to a CPU, - * there would exist a perfect hash function mapping threads to - * slots that eliminates collisions. When we reach capacity, we - * search for this mapping by randomly varying the hash codes of - * colliding threads. Because search is random, and collisions - * only become known via CAS failures, convergence can be slow, - * and because threads are typically not bound to CPUS forever, - * may not occur at all. However, despite these limitations, - * observed contention rates are typically low in these cases. - * - * It is possible for a Cell to become unused when threads that - * once hashed to it terminate, as well as in the case where - * doubling the table causes no thread to hash to it under - * expanded mask. We do not try to detect or remove such cells, - * under the assumption that for long-running instances, observed - * contention levels will recur, so the cells will eventually be - * needed again; and for short-lived ones, it does not matter. - */ - - /** - * Padded variant of AtomicLong supporting only raw accesses plus CAS. - * The value field is placed between pads, hoping that the JVM doesn't - * reorder them. - * - * JVM intrinsics note: It would be possible to use a release-only - * form of CAS here, if it were provided. - */ - static final class Cell { - volatile long p0, p1, p2, p3, p4, p5, p6; - volatile long value; - volatile long q0, q1, q2, q3, q4, q5, q6; - Cell(long x) { value = x; } - - final boolean cas(long cmp, long val) { - return UNSAFE.compareAndSwapLong(this, valueOffset, cmp, val); - } - - // Unsafe mechanics - private static final sun.misc.Unsafe UNSAFE; - private static final long valueOffset; - static { - try { - UNSAFE = getUnsafe(); - Class ak = Cell.class; - valueOffset = UNSAFE.objectFieldOffset - (ak.getDeclaredField("value")); - } catch (Exception e) { - throw new Error(e); - } - } - - } - - /** - * Holder for the thread-local hash code. The code is initially - * random, but may be set to a different value upon collisions. - */ - static final class HashCode { - static final Random rng = new Random(); - int code; - HashCode() { - int h = rng.nextInt(); // Avoid zero to allow xorShift rehash - code = (h == 0) ? 1 : h; - } - } - - /** - * The corresponding ThreadLocal class - */ - static final class ThreadHashCode extends ThreadLocal { - public HashCode initialValue() { return new HashCode(); } - } - - /** - * Static per-thread hash codes. Shared across all instances to - * reduce ThreadLocal pollution and because adjustments due to - * collisions in one table are likely to be appropriate for - * others. - */ - static final ThreadHashCode threadHashCode = new ThreadHashCode(); - - /** Number of CPUS, to place bound on table size */ - static final int NCPU = Runtime.getRuntime().availableProcessors(); - - /** - * Table of cells. When non-null, size is a power of 2. - */ - transient volatile Cell[] cells; - - /** - * Base value, used mainly when there is no contention, but also as - * a fallback during table initialization races. Updated via CAS. - */ - transient volatile long base; - - /** - * Spinlock (locked via CAS) used when resizing and/or creating Cells. - */ - transient volatile int busy; - - /** - * Package-private default constructor - */ - Striped64() { - } - - /** - * CASes the base field. - */ - final boolean casBase(long cmp, long val) { - return UNSAFE.compareAndSwapLong(this, baseOffset, cmp, val); - } - - /** - * CASes the busy field from 0 to 1 to acquire lock. - */ - final boolean casBusy() { - return UNSAFE.compareAndSwapInt(this, busyOffset, 0, 1); - } - - /** - * Computes the function of current and new value. Subclasses - * should open-code this update function for most uses, but the - * virtualized form is needed within retryUpdate. - * - * @param currentValue the current value (of either base or a cell) - * @param newValue the argument from a user update call - * @return result of the update function - */ - abstract long fn(long currentValue, long newValue); - - /** - * Handles cases of updates involving initialization, resizing, - * creating new Cells, and/or contention. See above for - * explanation. This method suffers the usual non-modularity - * problems of optimistic retry code, relying on rechecked sets of - * reads. - * - * @param x the value - * @param hc the hash code holder - * @param wasUncontended false if CAS failed before call - */ - final void retryUpdate(long x, HashCode hc, boolean wasUncontended) { - int h = hc.code; - boolean collide = false; // True if last slot nonempty - for (;;) { - Cell[] as; Cell a; int n; long v; - if ((as = cells) != null && (n = as.length) > 0) { - if ((a = as[(n - 1) & h]) == null) { - if (busy == 0) { // Try to attach new Cell - Cell r = new Cell(x); // Optimistically create - if (busy == 0 && casBusy()) { - boolean created = false; - try { // Recheck under lock - Cell[] rs; int m, j; - if ((rs = cells) != null && - (m = rs.length) > 0 && - rs[j = (m - 1) & h] == null) { - rs[j] = r; - created = true; - } - } finally { - busy = 0; - } - if (created) - break; - continue; // Slot is now non-empty - } - } - collide = false; - } - else if (!wasUncontended) // CAS already known to fail - wasUncontended = true; // Continue after rehash - else if (a.cas(v = a.value, fn(v, x))) - break; - else if (n >= NCPU || cells != as) - collide = false; // At max size or stale - else if (!collide) - collide = true; - else if (busy == 0 && casBusy()) { - try { - if (cells == as) { // Expand table unless stale - Cell[] rs = new Cell[n << 1]; - for (int i = 0; i < n; ++i) - rs[i] = as[i]; - cells = rs; - } - } finally { - busy = 0; - } - collide = false; - continue; // Retry with expanded table - } - h ^= h << 13; // Rehash - h ^= h >>> 17; - h ^= h << 5; - } - else if (busy == 0 && cells == as && casBusy()) { - boolean init = false; - try { // Initialize table - if (cells == as) { - Cell[] rs = new Cell[2]; - rs[h & 1] = new Cell(x); - cells = rs; - init = true; - } - } finally { - busy = 0; - } - if (init) - break; - } - else if (casBase(v = base, fn(v, x))) - break; // Fall back on using base - } - hc.code = h; // Record index for next time - } - - - /** - * Sets base and all cells to the given value. - */ - final void internalReset(long initialValue) { - Cell[] as = cells; - base = initialValue; - if (as != null) { - int n = as.length; - for (int i = 0; i < n; ++i) { - Cell a = as[i]; - if (a != null) - a.value = initialValue; - } - } - } - - // Unsafe mechanics - private static final sun.misc.Unsafe UNSAFE; - private static final long baseOffset; - private static final long busyOffset; - static { - try { - UNSAFE = getUnsafe(); - Class sk = Striped64.class; - baseOffset = UNSAFE.objectFieldOffset - (sk.getDeclaredField("base")); - busyOffset = UNSAFE.objectFieldOffset - (sk.getDeclaredField("busy")); - } catch (Exception e) { - throw new Error(e); - } - } - - /** - * Returns a sun.misc.Unsafe. Suitable for use in a 3rd party package. - * Replace with a simple call to Unsafe.getUnsafe when integrating - * into a jdk. - * - * @return a sun.misc.Unsafe - */ - private static sun.misc.Unsafe getUnsafe() { - try { - return sun.misc.Unsafe.getUnsafe(); - } catch (SecurityException se) { - try { - return java.security.AccessController.doPrivileged - (new java.security - .PrivilegedExceptionAction() { - public sun.misc.Unsafe run() throws Exception { - java.lang.reflect.Field f = sun.misc - .Unsafe.class.getDeclaredField("theUnsafe"); - f.setAccessible(true); - return (sun.misc.Unsafe) f.get(null); - }}); - } catch (java.security.PrivilegedActionException e) { - throw new RuntimeException("Could not initialize intrinsics", - e.getCause()); - } - } - } - -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/ConcurrentHashMapV8.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/ConcurrentHashMapV8.java deleted file mode 100644 index a4e73ea1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/ConcurrentHashMapV8.java +++ /dev/null @@ -1,3800 +0,0 @@ -/* - * Written by Doug Lea with assistance from members of JCP JSR-166 - * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// This is based on the 1.79 version. - -package com.concurrent_ruby.ext.jsr166e.nounsafe; - -import org.jruby.RubyClass; -import org.jruby.RubyNumeric; -import org.jruby.RubyObject; -import org.jruby.exceptions.RaiseException; -import com.concurrent_ruby.ext.jsr166e.ConcurrentHashMap; -import com.concurrent_ruby.ext.jsr166y.ThreadLocalRandom; -import org.jruby.runtime.ThreadContext; -import org.jruby.runtime.builtin.IRubyObject; - -import java.util.Arrays; -import java.util.Map; -import java.util.Set; -import java.util.Collection; -import java.util.Hashtable; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Enumeration; -import java.util.ConcurrentModificationException; -import java.util.NoSuchElementException; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; -import java.util.concurrent.atomic.AtomicReferenceArray; -import java.util.concurrent.locks.AbstractQueuedSynchronizer; - -import java.io.Serializable; - -/** - * A hash table supporting full concurrency of retrievals and - * high expected concurrency for updates. This class obeys the - * same functional specification as {@link java.util.Hashtable}, and - * includes versions of methods corresponding to each method of - * {@code Hashtable}. However, even though all operations are - * thread-safe, retrieval operations do not entail locking, - * and there is not any support for locking the entire table - * in a way that prevents all access. This class is fully - * interoperable with {@code Hashtable} in programs that rely on its - * thread safety but not on its synchronization details. - * - *

Retrieval operations (including {@code get}) generally do not - * block, so may overlap with update operations (including {@code put} - * and {@code remove}). Retrievals reflect the results of the most - * recently completed update operations holding upon their - * onset. (More formally, an update operation for a given key bears a - * happens-before relation with any (non-null) retrieval for - * that key reporting the updated value.) For aggregate operations - * such as {@code putAll} and {@code clear}, concurrent retrievals may - * reflect insertion or removal of only some entries. Similarly, - * Iterators and Enumerations return elements reflecting the state of - * the hash table at some point at or since the creation of the - * iterator/enumeration. They do not throw {@link - * ConcurrentModificationException}. However, iterators are designed - * to be used by only one thread at a time. Bear in mind that the - * results of aggregate status methods including {@code size}, {@code - * isEmpty}, and {@code containsValue} are typically useful only when - * a map is not undergoing concurrent updates in other threads. - * Otherwise the results of these methods reflect transient states - * that may be adequate for monitoring or estimation purposes, but not - * for program control. - * - *

The table is dynamically expanded when there are too many - * collisions (i.e., keys that have distinct hash codes but fall into - * the same slot modulo the table size), with the expected average - * effect of maintaining roughly two bins per mapping (corresponding - * to a 0.75 load factor threshold for resizing). There may be much - * variance around this average as mappings are added and removed, but - * overall, this maintains a commonly accepted time/space tradeoff for - * hash tables. However, resizing this or any other kind of hash - * table may be a relatively slow operation. When possible, it is a - * good idea to provide a size estimate as an optional {@code - * initialCapacity} constructor argument. An additional optional - * {@code loadFactor} constructor argument provides a further means of - * customizing initial table capacity by specifying the table density - * to be used in calculating the amount of space to allocate for the - * given number of elements. Also, for compatibility with previous - * versions of this class, constructors may optionally specify an - * expected {@code concurrencyLevel} as an additional hint for - * internal sizing. Note that using many keys with exactly the same - * {@code hashCode()} is a sure way to slow down performance of any - * hash table. - * - *

A {@link Set} projection of a ConcurrentHashMapV8 may be created - * (using {@link #newKeySet()} or {@link #newKeySet(int)}), or viewed - * (using {@link #keySet(Object)} when only keys are of interest, and the - * mapped values are (perhaps transiently) not used or all take the - * same mapping value. - * - *

A ConcurrentHashMapV8 can be used as scalable frequency map (a - * form of histogram or multiset) by using {@link LongAdder} values - * and initializing via {@link #computeIfAbsent}. For example, to add - * a count to a {@code ConcurrentHashMapV8 freqs}, you - * can use {@code freqs.computeIfAbsent(k -> new - * LongAdder()).increment();} - * - *

This class and its views and iterators implement all of the - * optional methods of the {@link Map} and {@link Iterator} - * interfaces. - * - *

Like {@link Hashtable} but unlike {@link HashMap}, this class - * does not allow {@code null} to be used as a key or value. - * - *

ConcurrentHashMapV8s support parallel operations using the {@link - * ForkJoinPool#commonPool}. (Tasks that may be used in other contexts - * are available in class {@link ForkJoinTasks}). These operations are - * designed to be safely, and often sensibly, applied even with maps - * that are being concurrently updated by other threads; for example, - * when computing a snapshot summary of the values in a shared - * registry. There are three kinds of operation, each with four - * forms, accepting functions with Keys, Values, Entries, and (Key, - * Value) arguments and/or return values. (The first three forms are - * also available via the {@link #keySet()}, {@link #values()} and - * {@link #entrySet()} views). Because the elements of a - * ConcurrentHashMapV8 are not ordered in any particular way, and may be - * processed in different orders in different parallel executions, the - * correctness of supplied functions should not depend on any - * ordering, or on any other objects or values that may transiently - * change while computation is in progress; and except for forEach - * actions, should ideally be side-effect-free. - * - *

- * - *

The concurrency properties of bulk operations follow - * from those of ConcurrentHashMapV8: Any non-null result returned - * from {@code get(key)} and related access methods bears a - * happens-before relation with the associated insertion or - * update. The result of any bulk operation reflects the - * composition of these per-element relations (but is not - * necessarily atomic with respect to the map as a whole unless it - * is somehow known to be quiescent). Conversely, because keys - * and values in the map are never null, null serves as a reliable - * atomic indicator of the current lack of any result. To - * maintain this property, null serves as an implicit basis for - * all non-scalar reduction operations. For the double, long, and - * int versions, the basis should be one that, when combined with - * any other value, returns that other value (more formally, it - * should be the identity element for the reduction). Most common - * reductions have these properties; for example, computing a sum - * with basis 0 or a minimum with basis MAX_VALUE. - * - *

Search and transformation functions provided as arguments - * should similarly return null to indicate the lack of any result - * (in which case it is not used). In the case of mapped - * reductions, this also enables transformations to serve as - * filters, returning null (or, in the case of primitive - * specializations, the identity basis) if the element should not - * be combined. You can create compound transformations and - * filterings by composing them yourself under this "null means - * there is nothing there now" rule before using them in search or - * reduce operations. - * - *

Methods accepting and/or returning Entry arguments maintain - * key-value associations. They may be useful for example when - * finding the key for the greatest value. Note that "plain" Entry - * arguments can be supplied using {@code new - * AbstractMap.SimpleEntry(k,v)}. - * - *

Bulk operations may complete abruptly, throwing an - * exception encountered in the application of a supplied - * function. Bear in mind when handling such exceptions that other - * concurrently executing functions could also have thrown - * exceptions, or would have done so if the first exception had - * not occurred. - * - *

Parallel speedups for bulk operations compared to sequential - * processing are common but not guaranteed. Operations involving - * brief functions on small maps may execute more slowly than - * sequential loops if the underlying work to parallelize the - * computation is more expensive than the computation itself. - * Similarly, parallelization may not lead to much actual parallelism - * if all processors are busy performing unrelated tasks. - * - *

All arguments to all task methods must be non-null. - * - *

jsr166e note: During transition, this class - * uses nested functional interfaces with different names but the - * same forms as those expected for JDK8. - * - *

This class is a member of the - * - * Java Collections Framework. - * - * @since 1.5 - * @author Doug Lea - * @param the type of keys maintained by this map - * @param the type of mapped values - */ -public class ConcurrentHashMapV8 - implements ConcurrentMap, Serializable, ConcurrentHashMap { - private static final long serialVersionUID = 7249069246763182397L; - - /** - * A partitionable iterator. A Spliterator can be traversed - * directly, but can also be partitioned (before traversal) by - * creating another Spliterator that covers a non-overlapping - * portion of the elements, and so may be amenable to parallel - * execution. - * - *

This interface exports a subset of expected JDK8 - * functionality. - * - *

Sample usage: Here is one (of the several) ways to compute - * the sum of the values held in a map using the ForkJoin - * framework. As illustrated here, Spliterators are well suited to - * designs in which a task repeatedly splits off half its work - * into forked subtasks until small enough to process directly, - * and then joins these subtasks. Variants of this style can also - * be used in completion-based designs. - * - *

-     * {@code ConcurrentHashMapV8 m = ...
-     * // split as if have 8 * parallelism, for load balance
-     * int n = m.size();
-     * int p = aForkJoinPool.getParallelism() * 8;
-     * int split = (n < p)? n : p;
-     * long sum = aForkJoinPool.invoke(new SumValues(m.valueSpliterator(), split, null));
-     * // ...
-     * static class SumValues extends RecursiveTask {
-     *   final Spliterator s;
-     *   final int split;             // split while > 1
-     *   final SumValues nextJoin;    // records forked subtasks to join
-     *   SumValues(Spliterator s, int depth, SumValues nextJoin) {
-     *     this.s = s; this.depth = depth; this.nextJoin = nextJoin;
-     *   }
-     *   public Long compute() {
-     *     long sum = 0;
-     *     SumValues subtasks = null; // fork subtasks
-     *     for (int s = split >>> 1; s > 0; s >>>= 1)
-     *       (subtasks = new SumValues(s.split(), s, subtasks)).fork();
-     *     while (s.hasNext())        // directly process remaining elements
-     *       sum += s.next();
-     *     for (SumValues t = subtasks; t != null; t = t.nextJoin)
-     *       sum += t.join();         // collect subtask results
-     *     return sum;
-     *   }
-     * }
-     * }
- */ - public static interface Spliterator extends Iterator { - /** - * Returns a Spliterator covering approximately half of the - * elements, guaranteed not to overlap with those subsequently - * returned by this Spliterator. After invoking this method, - * the current Spliterator will not produce any of - * the elements of the returned Spliterator, but the two - * Spliterators together will produce all of the elements that - * would have been produced by this Spliterator had this - * method not been called. The exact number of elements - * produced by the returned Spliterator is not guaranteed, and - * may be zero (i.e., with {@code hasNext()} reporting {@code - * false}) if this Spliterator cannot be further split. - * - * @return a Spliterator covering approximately half of the - * elements - * @throws IllegalStateException if this Spliterator has - * already commenced traversing elements - */ - Spliterator split(); - } - - - /* - * Overview: - * - * The primary design goal of this hash table is to maintain - * concurrent readability (typically method get(), but also - * iterators and related methods) while minimizing update - * contention. Secondary goals are to keep space consumption about - * the same or better than java.util.HashMap, and to support high - * initial insertion rates on an empty table by many threads. - * - * Each key-value mapping is held in a Node. Because Node fields - * can contain special values, they are defined using plain Object - * types. Similarly in turn, all internal methods that use them - * work off Object types. And similarly, so do the internal - * methods of auxiliary iterator and view classes. All public - * generic typed methods relay in/out of these internal methods, - * supplying null-checks and casts as needed. This also allows - * many of the public methods to be factored into a smaller number - * of internal methods (although sadly not so for the five - * variants of put-related operations). The validation-based - * approach explained below leads to a lot of code sprawl because - * retry-control precludes factoring into smaller methods. - * - * The table is lazily initialized to a power-of-two size upon the - * first insertion. Each bin in the table normally contains a - * list of Nodes (most often, the list has only zero or one Node). - * Table accesses require volatile/atomic reads, writes, and - * CASes. Because there is no other way to arrange this without - * adding further indirections, we use intrinsics - * (sun.misc.Unsafe) operations. The lists of nodes within bins - * are always accurately traversable under volatile reads, so long - * as lookups check hash code and non-nullness of value before - * checking key equality. - * - * We use the top two bits of Node hash fields for control - * purposes -- they are available anyway because of addressing - * constraints. As explained further below, these top bits are - * used as follows: - * 00 - Normal - * 01 - Locked - * 11 - Locked and may have a thread waiting for lock - * 10 - Node is a forwarding node - * - * The lower 30 bits of each Node's hash field contain a - * transformation of the key's hash code, except for forwarding - * nodes, for which the lower bits are zero (and so always have - * hash field == MOVED). - * - * Insertion (via put or its variants) of the first node in an - * empty bin is performed by just CASing it to the bin. This is - * by far the most common case for put operations under most - * key/hash distributions. Other update operations (insert, - * delete, and replace) require locks. We do not want to waste - * the space required to associate a distinct lock object with - * each bin, so instead use the first node of a bin list itself as - * a lock. Blocking support for these locks relies on the builtin - * "synchronized" monitors. However, we also need a tryLock - * construction, so we overlay these by using bits of the Node - * hash field for lock control (see above), and so normally use - * builtin monitors only for blocking and signalling using - * wait/notifyAll constructions. See Node.tryAwaitLock. - * - * Using the first node of a list as a lock does not by itself - * suffice though: When a node is locked, any update must first - * validate that it is still the first node after locking it, and - * retry if not. Because new nodes are always appended to lists, - * once a node is first in a bin, it remains first until deleted - * or the bin becomes invalidated (upon resizing). However, - * operations that only conditionally update may inspect nodes - * until the point of update. This is a converse of sorts to the - * lazy locking technique described by Herlihy & Shavit. - * - * The main disadvantage of per-bin locks is that other update - * operations on other nodes in a bin list protected by the same - * lock can stall, for example when user equals() or mapping - * functions take a long time. However, statistically, under - * random hash codes, this is not a common problem. Ideally, the - * frequency of nodes in bins follows a Poisson distribution - * (http://en.wikipedia.org/wiki/Poisson_distribution) with a - * parameter of about 0.5 on average, given the resizing threshold - * of 0.75, although with a large variance because of resizing - * granularity. Ignoring variance, the expected occurrences of - * list size k are (exp(-0.5) * pow(0.5, k) / factorial(k)). The - * first values are: - * - * 0: 0.60653066 - * 1: 0.30326533 - * 2: 0.07581633 - * 3: 0.01263606 - * 4: 0.00157952 - * 5: 0.00015795 - * 6: 0.00001316 - * 7: 0.00000094 - * 8: 0.00000006 - * more: less than 1 in ten million - * - * Lock contention probability for two threads accessing distinct - * elements is roughly 1 / (8 * #elements) under random hashes. - * - * Actual hash code distributions encountered in practice - * sometimes deviate significantly from uniform randomness. This - * includes the case when N > (1<<30), so some keys MUST collide. - * Similarly for dumb or hostile usages in which multiple keys are - * designed to have identical hash codes. Also, although we guard - * against the worst effects of this (see method spread), sets of - * hashes may differ only in bits that do not impact their bin - * index for a given power-of-two mask. So we use a secondary - * strategy that applies when the number of nodes in a bin exceeds - * a threshold, and at least one of the keys implements - * Comparable. These TreeBins use a balanced tree to hold nodes - * (a specialized form of red-black trees), bounding search time - * to O(log N). Each search step in a TreeBin is around twice as - * slow as in a regular list, but given that N cannot exceed - * (1<<64) (before running out of addresses) this bounds search - * steps, lock hold times, etc, to reasonable constants (roughly - * 100 nodes inspected per operation worst case) so long as keys - * are Comparable (which is very common -- String, Long, etc). - * TreeBin nodes (TreeNodes) also maintain the same "next" - * traversal pointers as regular nodes, so can be traversed in - * iterators in the same way. - * - * The table is resized when occupancy exceeds a percentage - * threshold (nominally, 0.75, but see below). Only a single - * thread performs the resize (using field "sizeCtl", to arrange - * exclusion), but the table otherwise remains usable for reads - * and updates. Resizing proceeds by transferring bins, one by - * one, from the table to the next table. Because we are using - * power-of-two expansion, the elements from each bin must either - * stay at same index, or move with a power of two offset. We - * eliminate unnecessary node creation by catching cases where old - * nodes can be reused because their next fields won't change. On - * average, only about one-sixth of them need cloning when a table - * doubles. The nodes they replace will be garbage collectable as - * soon as they are no longer referenced by any reader thread that - * may be in the midst of concurrently traversing table. Upon - * transfer, the old table bin contains only a special forwarding - * node (with hash field "MOVED") that contains the next table as - * its key. On encountering a forwarding node, access and update - * operations restart, using the new table. - * - * Each bin transfer requires its bin lock. However, unlike other - * cases, a transfer can skip a bin if it fails to acquire its - * lock, and revisit it later (unless it is a TreeBin). Method - * rebuild maintains a buffer of TRANSFER_BUFFER_SIZE bins that - * have been skipped because of failure to acquire a lock, and - * blocks only if none are available (i.e., only very rarely). - * The transfer operation must also ensure that all accessible - * bins in both the old and new table are usable by any traversal. - * When there are no lock acquisition failures, this is arranged - * simply by proceeding from the last bin (table.length - 1) up - * towards the first. Upon seeing a forwarding node, traversals - * (see class Iter) arrange to move to the new table - * without revisiting nodes. However, when any node is skipped - * during a transfer, all earlier table bins may have become - * visible, so are initialized with a reverse-forwarding node back - * to the old table until the new ones are established. (This - * sometimes requires transiently locking a forwarding node, which - * is possible under the above encoding.) These more expensive - * mechanics trigger only when necessary. - * - * The traversal scheme also applies to partial traversals of - * ranges of bins (via an alternate Traverser constructor) - * to support partitioned aggregate operations. Also, read-only - * operations give up if ever forwarded to a null table, which - * provides support for shutdown-style clearing, which is also not - * currently implemented. - * - * Lazy table initialization minimizes footprint until first use, - * and also avoids resizings when the first operation is from a - * putAll, constructor with map argument, or deserialization. - * These cases attempt to override the initial capacity settings, - * but harmlessly fail to take effect in cases of races. - * - * The element count is maintained using a LongAdder, which avoids - * contention on updates but can encounter cache thrashing if read - * too frequently during concurrent access. To avoid reading so - * often, resizing is attempted either when a bin lock is - * contended, or upon adding to a bin already holding two or more - * nodes (checked before adding in the xIfAbsent methods, after - * adding in others). Under uniform hash distributions, the - * probability of this occurring at threshold is around 13%, - * meaning that only about 1 in 8 puts check threshold (and after - * resizing, many fewer do so). But this approximation has high - * variance for small table sizes, so we check on any collision - * for sizes <= 64. The bulk putAll operation further reduces - * contention by only committing count updates upon these size - * checks. - * - * Maintaining API and serialization compatibility with previous - * versions of this class introduces several oddities. Mainly: We - * leave untouched but unused constructor arguments referring to - * concurrencyLevel. We accept a loadFactor constructor argument, - * but apply it only to initial table capacity (which is the only - * time that we can guarantee to honor it.) We also declare an - * unused "Segment" class that is instantiated in minimal form - * only when serializing. - */ - - /* ---------------- Constants -------------- */ - - /** - * The largest possible table capacity. This value must be - * exactly 1<<30 to stay within Java array allocation and indexing - * bounds for power of two table sizes, and is further required - * because the top two bits of 32bit hash fields are used for - * control purposes. - */ - private static final int MAXIMUM_CAPACITY = 1 << 30; - - /** - * The default initial table capacity. Must be a power of 2 - * (i.e., at least 1) and at most MAXIMUM_CAPACITY. - */ - private static final int DEFAULT_CAPACITY = 16; - - /** - * The largest possible (non-power of two) array size. - * Needed by toArray and related methods. - */ - static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; - - /** - * The default concurrency level for this table. Unused but - * defined for compatibility with previous versions of this class. - */ - private static final int DEFAULT_CONCURRENCY_LEVEL = 16; - - /** - * The load factor for this table. Overrides of this value in - * constructors affect only the initial table capacity. The - * actual floating point value isn't normally used -- it is - * simpler to use expressions such as {@code n - (n >>> 2)} for - * the associated resizing threshold. - */ - private static final float LOAD_FACTOR = 0.75f; - - /** - * The buffer size for skipped bins during transfers. The - * value is arbitrary but should be large enough to avoid - * most locking stalls during resizes. - */ - private static final int TRANSFER_BUFFER_SIZE = 32; - - /** - * The bin count threshold for using a tree rather than list for a - * bin. The value reflects the approximate break-even point for - * using tree-based operations. - * Note that Doug's version defaults to 8, but when dealing with - * Ruby objects it is actually beneficial to avoid TreeNodes - * as long as possible as it usually means going into Ruby land. - */ - private static final int TREE_THRESHOLD = 16; - - /* - * Encodings for special uses of Node hash fields. See above for - * explanation. - */ - static final int MOVED = 0x80000000; // hash field for forwarding nodes - static final int LOCKED = 0x40000000; // set/tested only as a bit - static final int WAITING = 0xc0000000; // both bits set/tested together - static final int HASH_BITS = 0x3fffffff; // usable bits of normal node hash - - /* ---------------- Fields -------------- */ - - /** - * The array of bins. Lazily initialized upon first insertion. - * Size is always a power of two. Accessed directly by iterators. - */ - transient volatile AtomicReferenceArray table; - - /** - * The counter maintaining number of elements. - */ - private transient LongAdder counter; - - /** - * Table initialization and resizing control. When negative, the - * table is being initialized or resized. Otherwise, when table is - * null, holds the initial table size to use upon creation, or 0 - * for default. After initialization, holds the next element count - * value upon which to resize the table. - */ - private transient volatile int sizeCtl; - - // views - private transient KeySetView keySet; - private transient ValuesView values; - private transient EntrySetView entrySet; - - /** For serialization compatibility. Null unless serialized; see below */ - private Segment[] segments; - - static AtomicIntegerFieldUpdater SIZE_CTRL_UPDATER = AtomicIntegerFieldUpdater.newUpdater(ConcurrentHashMapV8.class, "sizeCtl"); - - /* ---------------- Table element access -------------- */ - - /* - * Volatile access methods are used for table elements as well as - * elements of in-progress next table while resizing. Uses are - * null checked by callers, and implicitly bounds-checked, relying - * on the invariants that tab arrays have non-zero size, and all - * indices are masked with (tab.length - 1) which is never - * negative and always less than length. Note that, to be correct - * wrt arbitrary concurrency errors by users, bounds checks must - * operate on local variables, which accounts for some odd-looking - * inline assignments below. - */ - - static final Node tabAt(AtomicReferenceArray tab, int i) { // used by Iter - return tab.get(i); - } - - private static final boolean casTabAt(AtomicReferenceArray tab, int i, Node c, Node v) { - return tab.compareAndSet(i, c, v); - } - - private static final void setTabAt(AtomicReferenceArray tab, int i, Node v) { - tab.set(i, v); - } - - /* ---------------- Nodes -------------- */ - - /** - * Key-value entry. Note that this is never exported out as a - * user-visible Map.Entry (see MapEntry below). Nodes with a hash - * field of MOVED are special, and do not contain user keys or - * values. Otherwise, keys are never null, and null val fields - * indicate that a node is in the process of being deleted or - * created. For purposes of read-only access, a key may be read - * before a val, but can only be used after checking val to be - * non-null. - */ - static class Node { - volatile int hash; - final Object key; - volatile Object val; - volatile Node next; - - static AtomicIntegerFieldUpdater HASH_UPDATER = AtomicIntegerFieldUpdater.newUpdater(Node.class, "hash"); - - Node(int hash, Object key, Object val, Node next) { - this.hash = hash; - this.key = key; - this.val = val; - this.next = next; - } - - /** CompareAndSet the hash field */ - final boolean casHash(int cmp, int val) { - return HASH_UPDATER.compareAndSet(this, cmp, val); - } - - /** The number of spins before blocking for a lock */ - static final int MAX_SPINS = - Runtime.getRuntime().availableProcessors() > 1 ? 64 : 1; - - /** - * Spins a while if LOCKED bit set and this node is the first - * of its bin, and then sets WAITING bits on hash field and - * blocks (once) if they are still set. It is OK for this - * method to return even if lock is not available upon exit, - * which enables these simple single-wait mechanics. - * - * The corresponding signalling operation is performed within - * callers: Upon detecting that WAITING has been set when - * unlocking lock (via a failed CAS from non-waiting LOCKED - * state), unlockers acquire the sync lock and perform a - * notifyAll. - * - * The initial sanity check on tab and bounds is not currently - * necessary in the only usages of this method, but enables - * use in other future contexts. - */ - final void tryAwaitLock(AtomicReferenceArray tab, int i) { - if (tab != null && i >= 0 && i < tab.length()) { // sanity check - int r = ThreadLocalRandom.current().nextInt(); // randomize spins - int spins = MAX_SPINS, h; - while (tabAt(tab, i) == this && ((h = hash) & LOCKED) != 0) { - if (spins >= 0) { - r ^= r << 1; r ^= r >>> 3; r ^= r << 10; // xorshift - if (r >= 0 && --spins == 0) - Thread.yield(); // yield before block - } - else if (casHash(h, h | WAITING)) { - synchronized (this) { - if (tabAt(tab, i) == this && - (hash & WAITING) == WAITING) { - try { - wait(); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - } - } - else - notifyAll(); // possibly won race vs signaller - } - break; - } - } - } - } - } - - /* ---------------- TreeBins -------------- */ - - /** - * Nodes for use in TreeBins - */ - static final class TreeNode extends Node { - TreeNode parent; // red-black tree links - TreeNode left; - TreeNode right; - TreeNode prev; // needed to unlink next upon deletion - boolean red; - - TreeNode(int hash, Object key, Object val, Node next, TreeNode parent) { - super(hash, key, val, next); - this.parent = parent; - } - } - - /** - * A specialized form of red-black tree for use in bins - * whose size exceeds a threshold. - * - * TreeBins use a special form of comparison for search and - * related operations (which is the main reason we cannot use - * existing collections such as TreeMaps). TreeBins contain - * Comparable elements, but may contain others, as well as - * elements that are Comparable but not necessarily Comparable - * for the same T, so we cannot invoke compareTo among them. To - * handle this, the tree is ordered primarily by hash value, then - * by getClass().getName() order, and then by Comparator order - * among elements of the same class. On lookup at a node, if - * elements are not comparable or compare as 0, both left and - * right children may need to be searched in the case of tied hash - * values. (This corresponds to the full list search that would be - * necessary if all elements were non-Comparable and had tied - * hashes.) The red-black balancing code is updated from - * pre-jdk-collections - * (http://gee.cs.oswego.edu/dl/classes/collections/RBCell.java) - * based in turn on Cormen, Leiserson, and Rivest "Introduction to - * Algorithms" (CLR). - * - * TreeBins also maintain a separate locking discipline than - * regular bins. Because they are forwarded via special MOVED - * nodes at bin heads (which can never change once established), - * we cannot use those nodes as locks. Instead, TreeBin - * extends AbstractQueuedSynchronizer to support a simple form of - * read-write lock. For update operations and table validation, - * the exclusive form of lock behaves in the same way as bin-head - * locks. However, lookups use shared read-lock mechanics to allow - * multiple readers in the absence of writers. Additionally, - * these lookups do not ever block: While the lock is not - * available, they proceed along the slow traversal path (via - * next-pointers) until the lock becomes available or the list is - * exhausted, whichever comes first. (These cases are not fast, - * but maximize aggregate expected throughput.) The AQS mechanics - * for doing this are straightforward. The lock state is held as - * AQS getState(). Read counts are negative; the write count (1) - * is positive. There are no signalling preferences among readers - * and writers. Since we don't need to export full Lock API, we - * just override the minimal AQS methods and use them directly. - */ - static final class TreeBin extends AbstractQueuedSynchronizer { - private static final long serialVersionUID = 2249069246763182397L; - transient TreeNode root; // root of tree - transient TreeNode first; // head of next-pointer list - - /* AQS overrides */ - public final boolean isHeldExclusively() { return getState() > 0; } - public final boolean tryAcquire(int ignore) { - if (compareAndSetState(0, 1)) { - setExclusiveOwnerThread(Thread.currentThread()); - return true; - } - return false; - } - public final boolean tryRelease(int ignore) { - setExclusiveOwnerThread(null); - setState(0); - return true; - } - public final int tryAcquireShared(int ignore) { - for (int c;;) { - if ((c = getState()) > 0) - return -1; - if (compareAndSetState(c, c -1)) - return 1; - } - } - public final boolean tryReleaseShared(int ignore) { - int c; - do {} while (!compareAndSetState(c = getState(), c + 1)); - return c == -1; - } - - /** From CLR */ - private void rotateLeft(TreeNode p) { - if (p != null) { - TreeNode r = p.right, pp, rl; - if ((rl = p.right = r.left) != null) - rl.parent = p; - if ((pp = r.parent = p.parent) == null) - root = r; - else if (pp.left == p) - pp.left = r; - else - pp.right = r; - r.left = p; - p.parent = r; - } - } - - /** From CLR */ - private void rotateRight(TreeNode p) { - if (p != null) { - TreeNode l = p.left, pp, lr; - if ((lr = p.left = l.right) != null) - lr.parent = p; - if ((pp = l.parent = p.parent) == null) - root = l; - else if (pp.right == p) - pp.right = l; - else - pp.left = l; - l.right = p; - p.parent = l; - } - } - - @SuppressWarnings("unchecked") final TreeNode getTreeNode - (int h, Object k, TreeNode p) { - return getTreeNode(h, (RubyObject)k, p); - } - - /** - * Returns the TreeNode (or null if not found) for the given key - * starting at given root. - */ - @SuppressWarnings("unchecked") final TreeNode getTreeNode - (int h, RubyObject k, TreeNode p) { - RubyClass c = k.getMetaClass(); boolean kNotComparable = !k.respondsTo("<=>"); - while (p != null) { - int dir, ph; RubyObject pk; RubyClass pc; - if ((ph = p.hash) == h) { - if ((pk = (RubyObject)p.key) == k || k.equals(pk)) - return p; - if (c != (pc = (RubyClass)pk.getMetaClass()) || - kNotComparable || - (dir = rubyCompare(k, pk)) == 0) { - dir = (c == pc) ? 0 : c.getName().compareTo(pc.getName()); - if (dir == 0) { // if still stuck, need to check both sides - TreeNode r = null, pl, pr; - // try to recurse on the right - if ((pr = p.right) != null && h >= pr.hash && (r = getTreeNode(h, k, pr)) != null) - return r; - // try to continue iterating on the left side - else if ((pl = p.left) != null && h <= pl.hash) - dir = -1; - else // no matching node found - return null; - } - } - } - else - dir = (h < ph) ? -1 : 1; - p = (dir > 0) ? p.right : p.left; - } - return null; - } - - int rubyCompare(RubyObject l, RubyObject r) { - ThreadContext context = l.getMetaClass().getRuntime().getCurrentContext(); - IRubyObject result; - try { - result = l.callMethod(context, "<=>", r); - } catch (RaiseException e) { - // handle objects "lying" about responding to <=>, ie: an Array containing non-comparable keys - if (context.runtime.getNoMethodError().isInstance(e.getException())) { - return 0; - } - throw e; - } - - return result.isNil() ? 0 : RubyNumeric.num2int(result.convertToInteger()); - } - - /** - * Wrapper for getTreeNode used by CHM.get. Tries to obtain - * read-lock to call getTreeNode, but during failure to get - * lock, searches along next links. - */ - final Object getValue(int h, Object k) { - Node r = null; - int c = getState(); // Must read lock state first - for (Node e = first; e != null; e = e.next) { - if (c <= 0 && compareAndSetState(c, c - 1)) { - try { - r = getTreeNode(h, k, root); - } finally { - releaseShared(0); - } - break; - } - else if ((e.hash & HASH_BITS) == h && k.equals(e.key)) { - r = e; - break; - } - else - c = getState(); - } - return r == null ? null : r.val; - } - - @SuppressWarnings("unchecked") final TreeNode putTreeNode - (int h, Object k, Object v) { - return putTreeNode(h, (RubyObject)k, v); - } - - /** - * Finds or adds a node. - * @return null if added - */ - @SuppressWarnings("unchecked") final TreeNode putTreeNode - (int h, RubyObject k, Object v) { - RubyClass c = k.getMetaClass(); - boolean kNotComparable = !k.respondsTo("<=>"); - TreeNode pp = root, p = null; - int dir = 0; - while (pp != null) { // find existing node or leaf to insert at - int ph; RubyObject pk; RubyClass pc; - p = pp; - if ((ph = p.hash) == h) { - if ((pk = (RubyObject)p.key) == k || k.equals(pk)) - return p; - if (c != (pc = pk.getMetaClass()) || - kNotComparable || - (dir = rubyCompare(k, pk)) == 0) { - dir = (c == pc) ? 0 : c.getName().compareTo(pc.getName()); - if (dir == 0) { // if still stuck, need to check both sides - TreeNode r = null, pr; - // try to recurse on the right - if ((pr = p.right) != null && h >= pr.hash && (r = getTreeNode(h, k, pr)) != null) - return r; - else // continue descending down the left subtree - dir = -1; - } - } - } - else - dir = (h < ph) ? -1 : 1; - pp = (dir > 0) ? p.right : p.left; - } - - TreeNode f = first; - TreeNode x = first = new TreeNode(h, (Object)k, v, f, p); - if (p == null) - root = x; - else { // attach and rebalance; adapted from CLR - TreeNode xp, xpp; - if (f != null) - f.prev = x; - if (dir <= 0) - p.left = x; - else - p.right = x; - x.red = true; - while (x != null && (xp = x.parent) != null && xp.red && - (xpp = xp.parent) != null) { - TreeNode xppl = xpp.left; - if (xp == xppl) { - TreeNode y = xpp.right; - if (y != null && y.red) { - y.red = false; - xp.red = false; - xpp.red = true; - x = xpp; - } - else { - if (x == xp.right) { - rotateLeft(x = xp); - xpp = (xp = x.parent) == null ? null : xp.parent; - } - if (xp != null) { - xp.red = false; - if (xpp != null) { - xpp.red = true; - rotateRight(xpp); - } - } - } - } - else { - TreeNode y = xppl; - if (y != null && y.red) { - y.red = false; - xp.red = false; - xpp.red = true; - x = xpp; - } - else { - if (x == xp.left) { - rotateRight(x = xp); - xpp = (xp = x.parent) == null ? null : xp.parent; - } - if (xp != null) { - xp.red = false; - if (xpp != null) { - xpp.red = true; - rotateLeft(xpp); - } - } - } - } - } - TreeNode r = root; - if (r != null && r.red) - r.red = false; - } - return null; - } - - /** - * Removes the given node, that must be present before this - * call. This is messier than typical red-black deletion code - * because we cannot swap the contents of an interior node - * with a leaf successor that is pinned by "next" pointers - * that are accessible independently of lock. So instead we - * swap the tree linkages. - */ - final void deleteTreeNode(TreeNode p) { - TreeNode next = (TreeNode)p.next; // unlink traversal pointers - TreeNode pred = p.prev; - if (pred == null) - first = next; - else - pred.next = next; - if (next != null) - next.prev = pred; - TreeNode replacement; - TreeNode pl = p.left; - TreeNode pr = p.right; - if (pl != null && pr != null) { - TreeNode s = pr, sl; - while ((sl = s.left) != null) // find successor - s = sl; - boolean c = s.red; s.red = p.red; p.red = c; // swap colors - TreeNode sr = s.right; - TreeNode pp = p.parent; - if (s == pr) { // p was s's direct parent - p.parent = s; - s.right = p; - } - else { - TreeNode sp = s.parent; - if ((p.parent = sp) != null) { - if (s == sp.left) - sp.left = p; - else - sp.right = p; - } - if ((s.right = pr) != null) - pr.parent = s; - } - p.left = null; - if ((p.right = sr) != null) - sr.parent = p; - if ((s.left = pl) != null) - pl.parent = s; - if ((s.parent = pp) == null) - root = s; - else if (p == pp.left) - pp.left = s; - else - pp.right = s; - replacement = sr; - } - else - replacement = (pl != null) ? pl : pr; - TreeNode pp = p.parent; - if (replacement == null) { - if (pp == null) { - root = null; - return; - } - replacement = p; - } - else { - replacement.parent = pp; - if (pp == null) - root = replacement; - else if (p == pp.left) - pp.left = replacement; - else - pp.right = replacement; - p.left = p.right = p.parent = null; - } - if (!p.red) { // rebalance, from CLR - TreeNode x = replacement; - while (x != null) { - TreeNode xp, xpl; - if (x.red || (xp = x.parent) == null) { - x.red = false; - break; - } - if (x == (xpl = xp.left)) { - TreeNode sib = xp.right; - if (sib != null && sib.red) { - sib.red = false; - xp.red = true; - rotateLeft(xp); - sib = (xp = x.parent) == null ? null : xp.right; - } - if (sib == null) - x = xp; - else { - TreeNode sl = sib.left, sr = sib.right; - if ((sr == null || !sr.red) && - (sl == null || !sl.red)) { - sib.red = true; - x = xp; - } - else { - if (sr == null || !sr.red) { - if (sl != null) - sl.red = false; - sib.red = true; - rotateRight(sib); - sib = (xp = x.parent) == null ? null : xp.right; - } - if (sib != null) { - sib.red = (xp == null) ? false : xp.red; - if ((sr = sib.right) != null) - sr.red = false; - } - if (xp != null) { - xp.red = false; - rotateLeft(xp); - } - x = root; - } - } - } - else { // symmetric - TreeNode sib = xpl; - if (sib != null && sib.red) { - sib.red = false; - xp.red = true; - rotateRight(xp); - sib = (xp = x.parent) == null ? null : xp.left; - } - if (sib == null) - x = xp; - else { - TreeNode sl = sib.left, sr = sib.right; - if ((sl == null || !sl.red) && - (sr == null || !sr.red)) { - sib.red = true; - x = xp; - } - else { - if (sl == null || !sl.red) { - if (sr != null) - sr.red = false; - sib.red = true; - rotateLeft(sib); - sib = (xp = x.parent) == null ? null : xp.left; - } - if (sib != null) { - sib.red = (xp == null) ? false : xp.red; - if ((sl = sib.left) != null) - sl.red = false; - } - if (xp != null) { - xp.red = false; - rotateRight(xp); - } - x = root; - } - } - } - } - } - if (p == replacement && (pp = p.parent) != null) { - if (p == pp.left) // detach pointers - pp.left = null; - else if (p == pp.right) - pp.right = null; - p.parent = null; - } - } - } - - /* ---------------- Collision reduction methods -------------- */ - - /** - * Spreads higher bits to lower, and also forces top 2 bits to 0. - * Because the table uses power-of-two masking, sets of hashes - * that vary only in bits above the current mask will always - * collide. (Among known examples are sets of Float keys holding - * consecutive whole numbers in small tables.) To counter this, - * we apply a transform that spreads the impact of higher bits - * downward. There is a tradeoff between speed, utility, and - * quality of bit-spreading. Because many common sets of hashes - * are already reasonably distributed across bits (so don't benefit - * from spreading), and because we use trees to handle large sets - * of collisions in bins, we don't need excessively high quality. - */ - private static final int spread(int h) { - h ^= (h >>> 18) ^ (h >>> 12); - return (h ^ (h >>> 10)) & HASH_BITS; - } - - /** - * Replaces a list bin with a tree bin. Call only when locked. - * Fails to replace if the given key is non-comparable or table - * is, or needs, resizing. - */ - private final void replaceWithTreeBin(AtomicReferenceArray tab, int index, Object key) { - if ((key instanceof Comparable) && - (tab.length() >= MAXIMUM_CAPACITY || counter.sum() < (long)sizeCtl)) { - TreeBin t = new TreeBin(); - for (Node e = tabAt(tab, index); e != null; e = e.next) - t.putTreeNode(e.hash & HASH_BITS, e.key, e.val); - setTabAt(tab, index, new Node(MOVED, t, null, null)); - } - } - - /* ---------------- Internal access and update methods -------------- */ - - /** Implementation for get and containsKey */ - private final Object internalGet(Object k) { - int h = spread(k.hashCode()); - retry: for (AtomicReferenceArray tab = table; tab != null;) { - Node e, p; Object ek, ev; int eh; // locals to read fields once - for (e = tabAt(tab, (tab.length() - 1) & h); e != null; e = e.next) { - if ((eh = e.hash) == MOVED) { - if ((ek = e.key) instanceof TreeBin) // search TreeBin - return ((TreeBin)ek).getValue(h, k); - else { // restart with new table - tab = (AtomicReferenceArray)ek; - continue retry; - } - } - else if ((eh & HASH_BITS) == h && (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) - return ev; - } - break; - } - return null; - } - - /** - * Implementation for the four public remove/replace methods: - * Replaces node value with v, conditional upon match of cv if - * non-null. If resulting value is null, delete. - */ - private final Object internalReplace(Object k, Object v, Object cv) { - int h = spread(k.hashCode()); - Object oldVal = null; - for (AtomicReferenceArray tab = table;;) { - Node f; int i, fh; Object fk; - if (tab == null || - (f = tabAt(tab, i = (tab.length() - 1) & h)) == null) - break; - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean validated = false; - boolean deleted = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - validated = true; - TreeNode p = t.getTreeNode(h, k, t.root); - if (p != null) { - Object pv = p.val; - if (cv == null || cv == pv || cv.equals(pv)) { - oldVal = pv; - if ((p.val = v) == null) { - deleted = true; - t.deleteTreeNode(p); - } - } - } - } - } finally { - t.release(0); - } - if (validated) { - if (deleted) - counter.add(-1L); - break; - } - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & HASH_BITS) != h && f.next == null) // precheck - break; // rules out possible existence - else if ((fh & LOCKED) != 0) { - checkForResize(); // try resizing if can't get lock - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - boolean validated = false; - boolean deleted = false; - try { - if (tabAt(tab, i) == f) { - validated = true; - for (Node e = f, pred = null;;) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - ((ev = e.val) != null) && - ((ek = e.key) == k || k.equals(ek))) { - if (cv == null || cv == ev || cv.equals(ev)) { - oldVal = ev; - if ((e.val = v) == null) { - deleted = true; - Node en = e.next; - if (pred != null) - pred.next = en; - else - setTabAt(tab, i, en); - } - } - break; - } - pred = e; - if ((e = e.next) == null) - break; - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (validated) { - if (deleted) - counter.add(-1L); - break; - } - } - } - return oldVal; - } - - /* - * Internal versions of the six insertion methods, each a - * little more complicated than the last. All have - * the same basic structure as the first (internalPut): - * 1. If table uninitialized, create - * 2. If bin empty, try to CAS new node - * 3. If bin stale, use new table - * 4. if bin converted to TreeBin, validate and relay to TreeBin methods - * 5. Lock and validate; if valid, scan and add or update - * - * The others interweave other checks and/or alternative actions: - * * Plain put checks for and performs resize after insertion. - * * putIfAbsent prescans for mapping without lock (and fails to add - * if present), which also makes pre-emptive resize checks worthwhile. - * * computeIfAbsent extends form used in putIfAbsent with additional - * mechanics to deal with, calls, potential exceptions and null - * returns from function call. - * * compute uses the same function-call mechanics, but without - * the prescans - * * merge acts as putIfAbsent in the absent case, but invokes the - * update function if present - * * putAll attempts to pre-allocate enough table space - * and more lazily performs count updates and checks. - * - * Someday when details settle down a bit more, it might be worth - * some factoring to reduce sprawl. - */ - - /** Implementation for put */ - private final Object internalPut(Object k, Object v) { - int h = spread(k.hashCode()); - int count = 0; - for (AtomicReferenceArray tab = table;;) { - int i; Node f; int fh; Object fk; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length() - 1) & h)) == null) { - if (casTabAt(tab, i, null, new Node(h, k, v, null))) - break; // no lock when adding to empty bin - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - Object oldVal = null; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 2; - TreeNode p = t.putTreeNode(h, k, v); - if (p != null) { - oldVal = p.val; - p.val = v; - } - } - } finally { - t.release(0); - } - if (count != 0) { - if (oldVal != null) - return oldVal; - break; - } - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - Object oldVal = null; - try { // needed in case equals() throws - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - oldVal = ev; - e.val = v; - break; - } - Node last = e; - if ((e = e.next) == null) { - last.next = new Node(h, k, v, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { // unlock and signal if needed - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (oldVal != null) - return oldVal; - if (tab.length() <= 64) - count = 2; - break; - } - } - } - counter.add(1L); - if (count > 1) - checkForResize(); - return null; - } - - /** Implementation for putIfAbsent */ - private final Object internalPutIfAbsent(Object k, Object v) { - int h = spread(k.hashCode()); - int count = 0; - for (AtomicReferenceArray tab = table;;) { - int i; Node f; int fh; Object fk, fv; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length() - 1) & h)) == null) { - if (casTabAt(tab, i, null, new Node(h, k, v, null))) - break; - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - Object oldVal = null; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 2; - TreeNode p = t.putTreeNode(h, k, v); - if (p != null) - oldVal = p.val; - } - } finally { - t.release(0); - } - if (count != 0) { - if (oldVal != null) - return oldVal; - break; - } - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & HASH_BITS) == h && (fv = f.val) != null && - ((fk = f.key) == k || k.equals(fk))) - return fv; - else { - Node g = f.next; - if (g != null) { // at least 2 nodes -- search and maybe resize - for (Node e = g;;) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) - return ev; - if ((e = e.next) == null) { - checkForResize(); - break; - } - } - } - if (((fh = f.hash) & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (tabAt(tab, i) == f && f.casHash(fh, fh | LOCKED)) { - Object oldVal = null; - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - oldVal = ev; - break; - } - Node last = e; - if ((e = e.next) == null) { - last.next = new Node(h, k, v, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (oldVal != null) - return oldVal; - if (tab.length() <= 64) - count = 2; - break; - } - } - } - } - counter.add(1L); - if (count > 1) - checkForResize(); - return null; - } - - /** Implementation for computeIfAbsent */ - private final Object internalComputeIfAbsent(K k, - Fun mf) { - int h = spread(k.hashCode()); - Object val = null; - int count = 0; - for (AtomicReferenceArray tab = table;;) { - Node f; int i, fh; Object fk, fv; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length() - 1) & h)) == null) { - Node node = new Node(fh = h | LOCKED, k, null, null); - if (casTabAt(tab, i, null, node)) { - count = 1; - try { - if ((val = mf.apply(k)) != null) - node.val = val; - } finally { - if (val == null) - setTabAt(tab, i, null); - if (!node.casHash(fh, h)) { - node.hash = h; - synchronized (node) { node.notifyAll(); }; - } - } - } - if (count != 0) - break; - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean added = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 1; - TreeNode p = t.getTreeNode(h, k, t.root); - if (p != null) - val = p.val; - else if ((val = mf.apply(k)) != null) { - added = true; - count = 2; - t.putTreeNode(h, k, val); - } - } - } finally { - t.release(0); - } - if (count != 0) { - if (!added) - return val; - break; - } - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & HASH_BITS) == h && (fv = f.val) != null && - ((fk = f.key) == k || k.equals(fk))) - return fv; - else { - Node g = f.next; - if (g != null) { - for (Node e = g;;) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) - return ev; - if ((e = e.next) == null) { - checkForResize(); - break; - } - } - } - if (((fh = f.hash) & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (tabAt(tab, i) == f && f.casHash(fh, fh | LOCKED)) { - boolean added = false; - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - val = ev; - break; - } - Node last = e; - if ((e = e.next) == null) { - if ((val = mf.apply(k)) != null) { - added = true; - last.next = new Node(h, k, val, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - } - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (!added) - return val; - if (tab.length() <= 64) - count = 2; - break; - } - } - } - } - if (val != null) { - counter.add(1L); - if (count > 1) - checkForResize(); - } - return val; - } - - /** Implementation for compute */ - @SuppressWarnings("unchecked") private final Object internalCompute - (K k, boolean onlyIfPresent, BiFun mf) { - int h = spread(k.hashCode()); - Object val = null; - int delta = 0; - int count = 0; - for (AtomicReferenceArray tab = table;;) { - Node f; int i, fh; Object fk; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length() - 1) & h)) == null) { - if (onlyIfPresent) - break; - Node node = new Node(fh = h | LOCKED, k, null, null); - if (casTabAt(tab, i, null, node)) { - try { - count = 1; - if ((val = mf.apply(k, null)) != null) { - node.val = val; - delta = 1; - } - } finally { - if (delta == 0) - setTabAt(tab, i, null); - if (!node.casHash(fh, h)) { - node.hash = h; - synchronized (node) { node.notifyAll(); }; - } - } - } - if (count != 0) - break; - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 1; - TreeNode p = t.getTreeNode(h, k, t.root); - Object pv; - if (p == null) { - if (onlyIfPresent) - break; - pv = null; - } else - pv = p.val; - if ((val = mf.apply(k, (V)pv)) != null) { - if (p != null) - p.val = val; - else { - count = 2; - delta = 1; - t.putTreeNode(h, k, val); - } - } - else if (p != null) { - delta = -1; - t.deleteTreeNode(p); - } - } - } finally { - t.release(0); - } - if (count != 0) - break; - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f, pred = null;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - val = mf.apply(k, (V)ev); - if (val != null) - e.val = val; - else { - delta = -1; - Node en = e.next; - if (pred != null) - pred.next = en; - else - setTabAt(tab, i, en); - } - break; - } - pred = e; - if ((e = e.next) == null) { - if (!onlyIfPresent && (val = mf.apply(k, null)) != null) { - pred.next = new Node(h, k, val, null); - delta = 1; - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - } - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (tab.length() <= 64) - count = 2; - break; - } - } - } - if (delta != 0) { - counter.add((long)delta); - if (count > 1) - checkForResize(); - } - return val; - } - - /** Implementation for merge */ - @SuppressWarnings("unchecked") private final Object internalMerge - (K k, V v, BiFun mf) { - int h = spread(k.hashCode()); - Object val = null; - int delta = 0; - int count = 0; - for (AtomicReferenceArray tab = table;;) { - int i; Node f; int fh; Object fk, fv; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length() - 1) & h)) == null) { - if (casTabAt(tab, i, null, new Node(h, k, v, null))) { - delta = 1; - val = v; - break; - } - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - count = 1; - TreeNode p = t.getTreeNode(h, k, t.root); - val = (p == null) ? v : mf.apply((V)p.val, v); - if (val != null) { - if (p != null) - p.val = val; - else { - count = 2; - delta = 1; - t.putTreeNode(h, k, val); - } - } - else if (p != null) { - delta = -1; - t.deleteTreeNode(p); - } - } - } finally { - t.release(0); - } - if (count != 0) - break; - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & LOCKED) != 0) { - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f, pred = null;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - val = mf.apply((V)ev, v); - if (val != null) - e.val = val; - else { - delta = -1; - Node en = e.next; - if (pred != null) - pred.next = en; - else - setTabAt(tab, i, en); - } - break; - } - pred = e; - if ((e = e.next) == null) { - val = v; - pred.next = new Node(h, k, val, null); - delta = 1; - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (tab.length() <= 64) - count = 2; - break; - } - } - } - if (delta != 0) { - counter.add((long)delta); - if (count > 1) - checkForResize(); - } - return val; - } - - /** Implementation for putAll */ - private final void internalPutAll(Map m) { - tryPresize(m.size()); - long delta = 0L; // number of uncommitted additions - boolean npe = false; // to throw exception on exit for nulls - try { // to clean up counts on other exceptions - for (Map.Entry entry : m.entrySet()) { - Object k, v; - if (entry == null || (k = entry.getKey()) == null || - (v = entry.getValue()) == null) { - npe = true; - break; - } - int h = spread(k.hashCode()); - for (AtomicReferenceArray tab = table;;) { - int i; Node f; int fh; Object fk; - if (tab == null) - tab = initTable(); - else if ((f = tabAt(tab, i = (tab.length() - 1) & h)) == null){ - if (casTabAt(tab, i, null, new Node(h, k, v, null))) { - ++delta; - break; - } - } - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean validated = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - validated = true; - TreeNode p = t.getTreeNode(h, k, t.root); - if (p != null) - p.val = v; - else { - t.putTreeNode(h, k, v); - ++delta; - } - } - } finally { - t.release(0); - } - if (validated) - break; - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & LOCKED) != 0) { - counter.add(delta); - delta = 0L; - checkForResize(); - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - int count = 0; - try { - if (tabAt(tab, i) == f) { - count = 1; - for (Node e = f;; ++count) { - Object ek, ev; - if ((e.hash & HASH_BITS) == h && - (ev = e.val) != null && - ((ek = e.key) == k || k.equals(ek))) { - e.val = v; - break; - } - Node last = e; - if ((e = e.next) == null) { - ++delta; - last.next = new Node(h, k, v, null); - if (count >= TREE_THRESHOLD) - replaceWithTreeBin(tab, i, k); - break; - } - } - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (count != 0) { - if (count > 1) { - counter.add(delta); - delta = 0L; - checkForResize(); - } - break; - } - } - } - } - } finally { - if (delta != 0) - counter.add(delta); - } - if (npe) - throw new NullPointerException(); - } - - /* ---------------- Table Initialization and Resizing -------------- */ - - /** - * Returns a power of two table size for the given desired capacity. - * See Hackers Delight, sec 3.2 - */ - private static final int tableSizeFor(int c) { - int n = c - 1; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1; - } - - /** - * Initializes table, using the size recorded in sizeCtl. - */ - private final AtomicReferenceArray initTable() { - AtomicReferenceArray tab; int sc; - while ((tab = table) == null) { - if ((sc = sizeCtl) < 0) - Thread.yield(); // lost initialization race; just spin - else if (SIZE_CTRL_UPDATER.compareAndSet(this, sc, -1)) { - try { - if ((tab = table) == null) { - int n = (sc > 0) ? sc : DEFAULT_CAPACITY; - tab = table = new AtomicReferenceArray(n); - sc = n - (n >>> 2); - } - } finally { - sizeCtl = sc; - } - break; - } - } - return tab; - } - - /** - * If table is too small and not already resizing, creates next - * table and transfers bins. Rechecks occupancy after a transfer - * to see if another resize is already needed because resizings - * are lagging additions. - */ - private final void checkForResize() { - AtomicReferenceArray tab; int n, sc; - while ((tab = table) != null && - (n = tab.length()) < MAXIMUM_CAPACITY && - (sc = sizeCtl) >= 0 && counter.sum() >= (long)sc && - SIZE_CTRL_UPDATER.compareAndSet(this, sc, -1)) { - try { - if (tab == table) { - table = rebuild(tab); - sc = (n << 1) - (n >>> 1); - } - } finally { - sizeCtl = sc; - } - } - } - - /** - * Tries to presize table to accommodate the given number of elements. - * - * @param size number of elements (doesn't need to be perfectly accurate) - */ - private final void tryPresize(int size) { - int c = (size >= (MAXIMUM_CAPACITY >>> 1)) ? MAXIMUM_CAPACITY : - tableSizeFor(size + (size >>> 1) + 1); - int sc; - while ((sc = sizeCtl) >= 0) { - AtomicReferenceArray tab = table; int n; - if (tab == null || (n = tab.length()) == 0) { - n = (sc > c) ? sc : c; - if (SIZE_CTRL_UPDATER.compareAndSet(this, sc, -1)) { - try { - if (table == tab) { - table = new AtomicReferenceArray(n); - sc = n - (n >>> 2); - } - } finally { - sizeCtl = sc; - } - } - } - else if (c <= sc || n >= MAXIMUM_CAPACITY) - break; - else if (SIZE_CTRL_UPDATER.compareAndSet(this, sc, -1)) { - try { - if (table == tab) { - table = rebuild(tab); - sc = (n << 1) - (n >>> 1); - } - } finally { - sizeCtl = sc; - } - } - } - } - - /* - * Moves and/or copies the nodes in each bin to new table. See - * above for explanation. - * - * @return the new table - */ - private static final AtomicReferenceArray rebuild(AtomicReferenceArray tab) { - int n = tab.length(); - AtomicReferenceArray nextTab = new AtomicReferenceArray(n << 1); - Node fwd = new Node(MOVED, nextTab, null, null); - int[] buffer = null; // holds bins to revisit; null until needed - Node rev = null; // reverse forwarder; null until needed - int nbuffered = 0; // the number of bins in buffer list - int bufferIndex = 0; // buffer index of current buffered bin - int bin = n - 1; // current non-buffered bin or -1 if none - - for (int i = bin;;) { // start upwards sweep - int fh; Node f; - if ((f = tabAt(tab, i)) == null) { - if (bin >= 0) { // Unbuffered; no lock needed (or available) - if (!casTabAt(tab, i, f, fwd)) - continue; - } - else { // transiently use a locked forwarding node - Node g = new Node(MOVED|LOCKED, nextTab, null, null); - if (!casTabAt(tab, i, f, g)) - continue; - setTabAt(nextTab, i, null); - setTabAt(nextTab, i + n, null); - setTabAt(tab, i, fwd); - if (!g.casHash(MOVED|LOCKED, MOVED)) { - g.hash = MOVED; - synchronized (g) { g.notifyAll(); } - } - } - } - else if ((fh = f.hash) == MOVED) { - Object fk = f.key; - if (fk instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - boolean validated = false; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - validated = true; - splitTreeBin(nextTab, i, t); - setTabAt(tab, i, fwd); - } - } finally { - t.release(0); - } - if (!validated) - continue; - } - } - else if ((fh & LOCKED) == 0 && f.casHash(fh, fh|LOCKED)) { - boolean validated = false; - try { // split to lo and hi lists; copying as needed - if (tabAt(tab, i) == f) { - validated = true; - splitBin(nextTab, i, f); - setTabAt(tab, i, fwd); - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - if (!validated) - continue; - } - else { - if (buffer == null) // initialize buffer for revisits - buffer = new int[TRANSFER_BUFFER_SIZE]; - if (bin < 0 && bufferIndex > 0) { - int j = buffer[--bufferIndex]; - buffer[bufferIndex] = i; - i = j; // swap with another bin - continue; - } - if (bin < 0 || nbuffered >= TRANSFER_BUFFER_SIZE) { - f.tryAwaitLock(tab, i); - continue; // no other options -- block - } - if (rev == null) // initialize reverse-forwarder - rev = new Node(MOVED, tab, null, null); - if (tabAt(tab, i) != f || (f.hash & LOCKED) == 0) - continue; // recheck before adding to list - buffer[nbuffered++] = i; - setTabAt(nextTab, i, rev); // install place-holders - setTabAt(nextTab, i + n, rev); - } - - if (bin > 0) - i = --bin; - else if (buffer != null && nbuffered > 0) { - bin = -1; - i = buffer[bufferIndex = --nbuffered]; - } - else - return nextTab; - } - } - - /** - * Splits a normal bin with list headed by e into lo and hi parts; - * installs in given table. - */ - private static void splitBin(AtomicReferenceArray nextTab, int i, Node e) { - int bit = nextTab.length() >>> 1; // bit to split on - int runBit = e.hash & bit; - Node lastRun = e, lo = null, hi = null; - for (Node p = e.next; p != null; p = p.next) { - int b = p.hash & bit; - if (b != runBit) { - runBit = b; - lastRun = p; - } - } - if (runBit == 0) - lo = lastRun; - else - hi = lastRun; - for (Node p = e; p != lastRun; p = p.next) { - int ph = p.hash & HASH_BITS; - Object pk = p.key, pv = p.val; - if ((ph & bit) == 0) - lo = new Node(ph, pk, pv, lo); - else - hi = new Node(ph, pk, pv, hi); - } - setTabAt(nextTab, i, lo); - setTabAt(nextTab, i + bit, hi); - } - - /** - * Splits a tree bin into lo and hi parts; installs in given table. - */ - private static void splitTreeBin(AtomicReferenceArray nextTab, int i, TreeBin t) { - int bit = nextTab.length() >>> 1; - TreeBin lt = new TreeBin(); - TreeBin ht = new TreeBin(); - int lc = 0, hc = 0; - for (Node e = t.first; e != null; e = e.next) { - int h = e.hash & HASH_BITS; - Object k = e.key, v = e.val; - if ((h & bit) == 0) { - ++lc; - lt.putTreeNode(h, k, v); - } - else { - ++hc; - ht.putTreeNode(h, k, v); - } - } - Node ln, hn; // throw away trees if too small - if (lc <= (TREE_THRESHOLD >>> 1)) { - ln = null; - for (Node p = lt.first; p != null; p = p.next) - ln = new Node(p.hash, p.key, p.val, ln); - } - else - ln = new Node(MOVED, lt, null, null); - setTabAt(nextTab, i, ln); - if (hc <= (TREE_THRESHOLD >>> 1)) { - hn = null; - for (Node p = ht.first; p != null; p = p.next) - hn = new Node(p.hash, p.key, p.val, hn); - } - else - hn = new Node(MOVED, ht, null, null); - setTabAt(nextTab, i + bit, hn); - } - - /** - * Implementation for clear. Steps through each bin, removing all - * nodes. - */ - private final void internalClear() { - long delta = 0L; // negative number of deletions - int i = 0; - AtomicReferenceArray tab = table; - while (tab != null && i < tab.length()) { - int fh; Object fk; - Node f = tabAt(tab, i); - if (f == null) - ++i; - else if ((fh = f.hash) == MOVED) { - if ((fk = f.key) instanceof TreeBin) { - TreeBin t = (TreeBin)fk; - t.acquire(0); - try { - if (tabAt(tab, i) == f) { - for (Node p = t.first; p != null; p = p.next) { - if (p.val != null) { // (currently always true) - p.val = null; - --delta; - } - } - t.first = null; - t.root = null; - ++i; - } - } finally { - t.release(0); - } - } - else - tab = (AtomicReferenceArray)fk; - } - else if ((fh & LOCKED) != 0) { - counter.add(delta); // opportunistically update count - delta = 0L; - f.tryAwaitLock(tab, i); - } - else if (f.casHash(fh, fh | LOCKED)) { - try { - if (tabAt(tab, i) == f) { - for (Node e = f; e != null; e = e.next) { - if (e.val != null) { // (currently always true) - e.val = null; - --delta; - } - } - setTabAt(tab, i, null); - ++i; - } - } finally { - if (!f.casHash(fh | LOCKED, fh)) { - f.hash = fh; - synchronized (f) { f.notifyAll(); }; - } - } - } - } - if (delta != 0) - counter.add(delta); - } - - /* ----------------Table Traversal -------------- */ - - /** - * Encapsulates traversal for methods such as containsValue; also - * serves as a base class for other iterators and bulk tasks. - * - * At each step, the iterator snapshots the key ("nextKey") and - * value ("nextVal") of a valid node (i.e., one that, at point of - * snapshot, has a non-null user value). Because val fields can - * change (including to null, indicating deletion), field nextVal - * might not be accurate at point of use, but still maintains the - * weak consistency property of holding a value that was once - * valid. To support iterator.remove, the nextKey field is not - * updated (nulled out) when the iterator cannot advance. - * - * Internal traversals directly access these fields, as in: - * {@code while (it.advance() != null) { process(it.nextKey); }} - * - * Exported iterators must track whether the iterator has advanced - * (in hasNext vs next) (by setting/checking/nulling field - * nextVal), and then extract key, value, or key-value pairs as - * return values of next(). - * - * The iterator visits once each still-valid node that was - * reachable upon iterator construction. It might miss some that - * were added to a bin after the bin was visited, which is OK wrt - * consistency guarantees. Maintaining this property in the face - * of possible ongoing resizes requires a fair amount of - * bookkeeping state that is difficult to optimize away amidst - * volatile accesses. Even so, traversal maintains reasonable - * throughput. - * - * Normally, iteration proceeds bin-by-bin traversing lists. - * However, if the table has been resized, then all future steps - * must traverse both the bin at the current index as well as at - * (index + baseSize); and so on for further resizings. To - * paranoically cope with potential sharing by users of iterators - * across threads, iteration terminates if a bounds checks fails - * for a table read. - * - * This class extends ForkJoinTask to streamline parallel - * iteration in bulk operations (see BulkTask). This adds only an - * int of space overhead, which is close enough to negligible in - * cases where it is not needed to not worry about it. Because - * ForkJoinTask is Serializable, but iterators need not be, we - * need to add warning suppressions. - */ - @SuppressWarnings("serial") static class Traverser { - final ConcurrentHashMapV8 map; - Node next; // the next entry to use - K nextKey; // cached key field of next - V nextVal; // cached val field of next - AtomicReferenceArray tab; // current table; updated if resized - int index; // index of bin to use next - int baseIndex; // current index of initial table - int baseLimit; // index bound for initial table - int baseSize; // initial table size - - /** Creates iterator for all entries in the table. */ - Traverser(ConcurrentHashMapV8 map) { - this.map = map; - } - - /** Creates iterator for split() methods */ - Traverser(Traverser it) { - ConcurrentHashMapV8 m; AtomicReferenceArray t; - if ((m = this.map = it.map) == null) - t = null; - else if ((t = it.tab) == null && // force parent tab initialization - (t = it.tab = m.table) != null) - it.baseLimit = it.baseSize = t.length(); - this.tab = t; - this.baseSize = it.baseSize; - it.baseLimit = this.index = this.baseIndex = - ((this.baseLimit = it.baseLimit) + it.baseIndex + 1) >>> 1; - } - - /** - * Advances next; returns nextVal or null if terminated. - * See above for explanation. - */ - final V advance() { - Node e = next; - V ev = null; - outer: do { - if (e != null) // advance past used/skipped node - e = e.next; - while (e == null) { // get to next non-null bin - ConcurrentHashMapV8 m; - AtomicReferenceArray t; int b, i, n; Object ek; // checks must use locals - if ((t = tab) != null) - n = t.length(); - else if ((m = map) != null && (t = tab = m.table) != null) - n = baseLimit = baseSize = t.length(); - else - break outer; - if ((b = baseIndex) >= baseLimit || - (i = index) < 0 || i >= n) - break outer; - if ((e = tabAt(t, i)) != null && e.hash == MOVED) { - if ((ek = e.key) instanceof TreeBin) - e = ((TreeBin)ek).first; - else { - tab = (AtomicReferenceArray)ek; - continue; // restarts due to null val - } - } // visit upper slots if present - index = (i += baseSize) < n ? i : (baseIndex = b + 1); - } - nextKey = (K) e.key; - } while ((ev = (V) e.val) == null); // skip deleted or special nodes - next = e; - return nextVal = ev; - } - - public final void remove() { - Object k = nextKey; - if (k == null && (advance() == null || (k = nextKey) == null)) - throw new IllegalStateException(); - map.internalReplace(k, null, null); - } - - public final boolean hasNext() { - return nextVal != null || advance() != null; - } - - public final boolean hasMoreElements() { return hasNext(); } - public final void setRawResult(Object x) { } - public R getRawResult() { return null; } - public boolean exec() { return true; } - } - - /* ---------------- Public operations -------------- */ - - /** - * Creates a new, empty map with the default initial table size (16). - */ - public ConcurrentHashMapV8() { - this.counter = new LongAdder(); - } - - /** - * Creates a new, empty map with an initial table size - * accommodating the specified number of elements without the need - * to dynamically resize. - * - * @param initialCapacity The implementation performs internal - * sizing to accommodate this many elements. - * @throws IllegalArgumentException if the initial capacity of - * elements is negative - */ - public ConcurrentHashMapV8(int initialCapacity) { - if (initialCapacity < 0) - throw new IllegalArgumentException(); - int cap = ((initialCapacity >= (MAXIMUM_CAPACITY >>> 1)) ? - MAXIMUM_CAPACITY : - tableSizeFor(initialCapacity + (initialCapacity >>> 1) + 1)); - this.counter = new LongAdder(); - this.sizeCtl = cap; - } - - /** - * Creates a new map with the same mappings as the given map. - * - * @param m the map - */ - public ConcurrentHashMapV8(Map m) { - this.counter = new LongAdder(); - this.sizeCtl = DEFAULT_CAPACITY; - internalPutAll(m); - } - - /** - * Creates a new, empty map with an initial table size based on - * the given number of elements ({@code initialCapacity}) and - * initial table density ({@code loadFactor}). - * - * @param initialCapacity the initial capacity. The implementation - * performs internal sizing to accommodate this many elements, - * given the specified load factor. - * @param loadFactor the load factor (table density) for - * establishing the initial table size - * @throws IllegalArgumentException if the initial capacity of - * elements is negative or the load factor is nonpositive - * - * @since 1.6 - */ - public ConcurrentHashMapV8(int initialCapacity, float loadFactor) { - this(initialCapacity, loadFactor, 1); - } - - /** - * Creates a new, empty map with an initial table size based on - * the given number of elements ({@code initialCapacity}), table - * density ({@code loadFactor}), and number of concurrently - * updating threads ({@code concurrencyLevel}). - * - * @param initialCapacity the initial capacity. The implementation - * performs internal sizing to accommodate this many elements, - * given the specified load factor. - * @param loadFactor the load factor (table density) for - * establishing the initial table size - * @param concurrencyLevel the estimated number of concurrently - * updating threads. The implementation may use this value as - * a sizing hint. - * @throws IllegalArgumentException if the initial capacity is - * negative or the load factor or concurrencyLevel are - * nonpositive - */ - public ConcurrentHashMapV8(int initialCapacity, - float loadFactor, int concurrencyLevel) { - if (!(loadFactor > 0.0f) || initialCapacity < 0 || concurrencyLevel <= 0) - throw new IllegalArgumentException(); - if (initialCapacity < concurrencyLevel) // Use at least as many bins - initialCapacity = concurrencyLevel; // as estimated threads - long size = (long)(1.0 + (long)initialCapacity / loadFactor); - int cap = (size >= (long)MAXIMUM_CAPACITY) ? - MAXIMUM_CAPACITY : tableSizeFor((int)size); - this.counter = new LongAdder(); - this.sizeCtl = cap; - } - - /** - * Creates a new {@link Set} backed by a ConcurrentHashMapV8 - * from the given type to {@code Boolean.TRUE}. - * - * @return the new set - */ - public static KeySetView newKeySet() { - return new KeySetView(new ConcurrentHashMapV8(), - Boolean.TRUE); - } - - /** - * Creates a new {@link Set} backed by a ConcurrentHashMapV8 - * from the given type to {@code Boolean.TRUE}. - * - * @param initialCapacity The implementation performs internal - * sizing to accommodate this many elements. - * @throws IllegalArgumentException if the initial capacity of - * elements is negative - * @return the new set - */ - public static KeySetView newKeySet(int initialCapacity) { - return new KeySetView(new ConcurrentHashMapV8(initialCapacity), - Boolean.TRUE); - } - - /** - * {@inheritDoc} - */ - public boolean isEmpty() { - return counter.sum() <= 0L; // ignore transient negative values - } - - /** - * {@inheritDoc} - */ - public int size() { - long n = counter.sum(); - return ((n < 0L) ? 0 : - (n > (long)Integer.MAX_VALUE) ? Integer.MAX_VALUE : - (int)n); - } - - /** - * Returns the number of mappings. This method should be used - * instead of {@link #size} because a ConcurrentHashMapV8 may - * contain more mappings than can be represented as an int. The - * value returned is a snapshot; the actual count may differ if - * there are ongoing concurrent insertions or removals. - * - * @return the number of mappings - */ - public long mappingCount() { - long n = counter.sum(); - return (n < 0L) ? 0L : n; // ignore transient negative values - } - - /** - * Returns the value to which the specified key is mapped, - * or {@code null} if this map contains no mapping for the key. - * - *

More formally, if this map contains a mapping from a key - * {@code k} to a value {@code v} such that {@code key.equals(k)}, - * then this method returns {@code v}; otherwise it returns - * {@code null}. (There can be at most one such mapping.) - * - * @throws NullPointerException if the specified key is null - */ - @SuppressWarnings("unchecked") public V get(Object key) { - if (key == null) - throw new NullPointerException(); - return (V)internalGet(key); - } - - /** - * Returns the value to which the specified key is mapped, - * or the given defaultValue if this map contains no mapping for the key. - * - * @param key the key - * @param defaultValue the value to return if this map contains - * no mapping for the given key - * @return the mapping for the key, if present; else the defaultValue - * @throws NullPointerException if the specified key is null - */ - @SuppressWarnings("unchecked") public V getValueOrDefault(Object key, V defaultValue) { - if (key == null) - throw new NullPointerException(); - V v = (V) internalGet(key); - return v == null ? defaultValue : v; - } - - /** - * Tests if the specified object is a key in this table. - * - * @param key possible key - * @return {@code true} if and only if the specified object - * is a key in this table, as determined by the - * {@code equals} method; {@code false} otherwise - * @throws NullPointerException if the specified key is null - */ - public boolean containsKey(Object key) { - if (key == null) - throw new NullPointerException(); - return internalGet(key) != null; - } - - /** - * Returns {@code true} if this map maps one or more keys to the - * specified value. Note: This method may require a full traversal - * of the map, and is much slower than method {@code containsKey}. - * - * @param value value whose presence in this map is to be tested - * @return {@code true} if this map maps one or more keys to the - * specified value - * @throws NullPointerException if the specified value is null - */ - public boolean containsValue(Object value) { - if (value == null) - throw new NullPointerException(); - Object v; - Traverser it = new Traverser(this); - while ((v = it.advance()) != null) { - if (v == value || value.equals(v)) - return true; - } - return false; - } - - public K findKey(Object value) { - if (value == null) - throw new NullPointerException(); - Object v; - Traverser it = new Traverser(this); - while ((v = it.advance()) != null) { - if (v == value || value.equals(v)) - return it.nextKey; - } - return null; - } - - /** - * Legacy method testing if some key maps into the specified value - * in this table. This method is identical in functionality to - * {@link #containsValue}, and exists solely to ensure - * full compatibility with class {@link java.util.Hashtable}, - * which supported this method prior to introduction of the - * Java Collections framework. - * - * @param value a value to search for - * @return {@code true} if and only if some key maps to the - * {@code value} argument in this table as - * determined by the {@code equals} method; - * {@code false} otherwise - * @throws NullPointerException if the specified value is null - */ - public boolean contains(Object value) { - return containsValue(value); - } - - /** - * Maps the specified key to the specified value in this table. - * Neither the key nor the value can be null. - * - *

The value can be retrieved by calling the {@code get} method - * with a key that is equal to the original key. - * - * @param key key with which the specified value is to be associated - * @param value value to be associated with the specified key - * @return the previous value associated with {@code key}, or - * {@code null} if there was no mapping for {@code key} - * @throws NullPointerException if the specified key or value is null - */ - @SuppressWarnings("unchecked") public V put(K key, V value) { - if (key == null || value == null) - throw new NullPointerException(); - return (V)internalPut(key, value); - } - - /** - * {@inheritDoc} - * - * @return the previous value associated with the specified key, - * or {@code null} if there was no mapping for the key - * @throws NullPointerException if the specified key or value is null - */ - @SuppressWarnings("unchecked") public V putIfAbsent(K key, V value) { - if (key == null || value == null) - throw new NullPointerException(); - return (V)internalPutIfAbsent(key, value); - } - - /** - * Copies all of the mappings from the specified map to this one. - * These mappings replace any mappings that this map had for any of the - * keys currently in the specified map. - * - * @param m mappings to be stored in this map - */ - public void putAll(Map m) { - internalPutAll(m); - } - - /** - * If the specified key is not already associated with a value, - * computes its value using the given mappingFunction and enters - * it into the map unless null. This is equivalent to - *

 {@code
-     * if (map.containsKey(key))
-     *   return map.get(key);
-     * value = mappingFunction.apply(key);
-     * if (value != null)
-     *   map.put(key, value);
-     * return value;}
- * - * except that the action is performed atomically. If the - * function returns {@code null} no mapping is recorded. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and no mapping is recorded. Some - * attempted update operations on this map by other threads may be - * blocked while computation is in progress, so the computation - * should be short and simple, and must not attempt to update any - * other mappings of this Map. The most appropriate usage is to - * construct a new object serving as an initial mapped value, or - * memoized result, as in: - * - *
 {@code
-     * map.computeIfAbsent(key, new Fun() {
-     *   public V map(K k) { return new Value(f(k)); }});}
- * - * @param key key with which the specified value is to be associated - * @param mappingFunction the function to compute a value - * @return the current (existing or computed) value associated with - * the specified key, or null if the computed value is null - * @throws NullPointerException if the specified key or mappingFunction - * is null - * @throws IllegalStateException if the computation detectably - * attempts a recursive update to this map that would - * otherwise never complete - * @throws RuntimeException or Error if the mappingFunction does so, - * in which case the mapping is left unestablished - */ - @SuppressWarnings("unchecked") public V computeIfAbsent - (K key, Fun mappingFunction) { - if (key == null || mappingFunction == null) - throw new NullPointerException(); - return (V)internalComputeIfAbsent(key, mappingFunction); - } - - /** - * If the given key is present, computes a new mapping value given a key and - * its current mapped value. This is equivalent to - *
 {@code
-     *   if (map.containsKey(key)) {
-     *     value = remappingFunction.apply(key, map.get(key));
-     *     if (value != null)
-     *       map.put(key, value);
-     *     else
-     *       map.remove(key);
-     *   }
-     * }
- * - * except that the action is performed atomically. If the - * function returns {@code null}, the mapping is removed. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and the current mapping is left - * unchanged. Some attempted update operations on this map by - * other threads may be blocked while computation is in progress, - * so the computation should be short and simple, and must not - * attempt to update any other mappings of this Map. For example, - * to either create or append new messages to a value mapping: - * - * @param key key with which the specified value is to be associated - * @param remappingFunction the function to compute a value - * @return the new value associated with the specified key, or null if none - * @throws NullPointerException if the specified key or remappingFunction - * is null - * @throws IllegalStateException if the computation detectably - * attempts a recursive update to this map that would - * otherwise never complete - * @throws RuntimeException or Error if the remappingFunction does so, - * in which case the mapping is unchanged - */ - @SuppressWarnings("unchecked") public V computeIfPresent - (K key, BiFun remappingFunction) { - if (key == null || remappingFunction == null) - throw new NullPointerException(); - return (V)internalCompute(key, true, remappingFunction); - } - - /** - * Computes a new mapping value given a key and - * its current mapped value (or {@code null} if there is no current - * mapping). This is equivalent to - *
 {@code
-     *   value = remappingFunction.apply(key, map.get(key));
-     *   if (value != null)
-     *     map.put(key, value);
-     *   else
-     *     map.remove(key);
-     * }
- * - * except that the action is performed atomically. If the - * function returns {@code null}, the mapping is removed. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and the current mapping is left - * unchanged. Some attempted update operations on this map by - * other threads may be blocked while computation is in progress, - * so the computation should be short and simple, and must not - * attempt to update any other mappings of this Map. For example, - * to either create or append new messages to a value mapping: - * - *
 {@code
-     * Map map = ...;
-     * final String msg = ...;
-     * map.compute(key, new BiFun() {
-     *   public String apply(Key k, String v) {
-     *    return (v == null) ? msg : v + msg;});}}
- * - * @param key key with which the specified value is to be associated - * @param remappingFunction the function to compute a value - * @return the new value associated with the specified key, or null if none - * @throws NullPointerException if the specified key or remappingFunction - * is null - * @throws IllegalStateException if the computation detectably - * attempts a recursive update to this map that would - * otherwise never complete - * @throws RuntimeException or Error if the remappingFunction does so, - * in which case the mapping is unchanged - */ - @SuppressWarnings("unchecked") public V compute - (K key, BiFun remappingFunction) { - if (key == null || remappingFunction == null) - throw new NullPointerException(); - return (V)internalCompute(key, false, remappingFunction); - } - - /** - * If the specified key is not already associated - * with a value, associate it with the given value. - * Otherwise, replace the value with the results of - * the given remapping function. This is equivalent to: - *
 {@code
-     *   if (!map.containsKey(key))
-     *     map.put(value);
-     *   else {
-     *     newValue = remappingFunction.apply(map.get(key), value);
-     *     if (value != null)
-     *       map.put(key, value);
-     *     else
-     *       map.remove(key);
-     *   }
-     * }
- * except that the action is performed atomically. If the - * function returns {@code null}, the mapping is removed. If the - * function itself throws an (unchecked) exception, the exception - * is rethrown to its caller, and the current mapping is left - * unchanged. Some attempted update operations on this map by - * other threads may be blocked while computation is in progress, - * so the computation should be short and simple, and must not - * attempt to update any other mappings of this Map. - */ - @SuppressWarnings("unchecked") public V merge - (K key, V value, BiFun remappingFunction) { - if (key == null || value == null || remappingFunction == null) - throw new NullPointerException(); - return (V)internalMerge(key, value, remappingFunction); - } - - /** - * Removes the key (and its corresponding value) from this map. - * This method does nothing if the key is not in the map. - * - * @param key the key that needs to be removed - * @return the previous value associated with {@code key}, or - * {@code null} if there was no mapping for {@code key} - * @throws NullPointerException if the specified key is null - */ - @SuppressWarnings("unchecked") public V remove(Object key) { - if (key == null) - throw new NullPointerException(); - return (V)internalReplace(key, null, null); - } - - /** - * {@inheritDoc} - * - * @throws NullPointerException if the specified key is null - */ - public boolean remove(Object key, Object value) { - if (key == null) - throw new NullPointerException(); - if (value == null) - return false; - return internalReplace(key, null, value) != null; - } - - /** - * {@inheritDoc} - * - * @throws NullPointerException if any of the arguments are null - */ - public boolean replace(K key, V oldValue, V newValue) { - if (key == null || oldValue == null || newValue == null) - throw new NullPointerException(); - return internalReplace(key, newValue, oldValue) != null; - } - - /** - * {@inheritDoc} - * - * @return the previous value associated with the specified key, - * or {@code null} if there was no mapping for the key - * @throws NullPointerException if the specified key or value is null - */ - @SuppressWarnings("unchecked") public V replace(K key, V value) { - if (key == null || value == null) - throw new NullPointerException(); - return (V)internalReplace(key, value, null); - } - - /** - * Removes all of the mappings from this map. - */ - public void clear() { - internalClear(); - } - - /** - * Returns a {@link Set} view of the keys contained in this map. - * The set is backed by the map, so changes to the map are - * reflected in the set, and vice-versa. - * - * @return the set view - */ - public KeySetView keySet() { - KeySetView ks = keySet; - return (ks != null) ? ks : (keySet = new KeySetView(this, null)); - } - - /** - * Returns a {@link Set} view of the keys in this map, using the - * given common mapped value for any additions (i.e., {@link - * Collection#add} and {@link Collection#addAll}). This is of - * course only appropriate if it is acceptable to use the same - * value for all additions from this view. - * - * @param mappedValue the mapped value to use for any - * additions. - * @return the set view - * @throws NullPointerException if the mappedValue is null - */ - public KeySetView keySet(V mappedValue) { - if (mappedValue == null) - throw new NullPointerException(); - return new KeySetView(this, mappedValue); - } - - /** - * Returns a {@link Collection} view of the values contained in this map. - * The collection is backed by the map, so changes to the map are - * reflected in the collection, and vice-versa. - */ - public ValuesView values() { - ValuesView vs = values; - return (vs != null) ? vs : (values = new ValuesView(this)); - } - - /** - * Returns a {@link Set} view of the mappings contained in this map. - * The set is backed by the map, so changes to the map are - * reflected in the set, and vice-versa. The set supports element - * removal, which removes the corresponding mapping from the map, - * via the {@code Iterator.remove}, {@code Set.remove}, - * {@code removeAll}, {@code retainAll}, and {@code clear} - * operations. It does not support the {@code add} or - * {@code addAll} operations. - * - *

The view's {@code iterator} is a "weakly consistent" iterator - * that will never throw {@link ConcurrentModificationException}, - * and guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not guaranteed to) - * reflect any modifications subsequent to construction. - */ - public Set> entrySet() { - EntrySetView es = entrySet; - return (es != null) ? es : (entrySet = new EntrySetView(this)); - } - - /** - * Returns an enumeration of the keys in this table. - * - * @return an enumeration of the keys in this table - * @see #keySet() - */ - public Enumeration keys() { - return new KeyIterator(this); - } - - /** - * Returns an enumeration of the values in this table. - * - * @return an enumeration of the values in this table - * @see #values() - */ - public Enumeration elements() { - return new ValueIterator(this); - } - - /** - * Returns a partitionable iterator of the keys in this map. - * - * @return a partitionable iterator of the keys in this map - */ - public Spliterator keySpliterator() { - return new KeyIterator(this); - } - - /** - * Returns a partitionable iterator of the values in this map. - * - * @return a partitionable iterator of the values in this map - */ - public Spliterator valueSpliterator() { - return new ValueIterator(this); - } - - /** - * Returns a partitionable iterator of the entries in this map. - * - * @return a partitionable iterator of the entries in this map - */ - public Spliterator> entrySpliterator() { - return new EntryIterator(this); - } - - /** - * Returns the hash code value for this {@link Map}, i.e., - * the sum of, for each key-value pair in the map, - * {@code key.hashCode() ^ value.hashCode()}. - * - * @return the hash code value for this map - */ - public int hashCode() { - int h = 0; - Traverser it = new Traverser(this); - Object v; - while ((v = it.advance()) != null) { - h += it.nextKey.hashCode() ^ v.hashCode(); - } - return h; - } - - /** - * Returns a string representation of this map. The string - * representation consists of a list of key-value mappings (in no - * particular order) enclosed in braces ("{@code {}}"). Adjacent - * mappings are separated by the characters {@code ", "} (comma - * and space). Each key-value mapping is rendered as the key - * followed by an equals sign ("{@code =}") followed by the - * associated value. - * - * @return a string representation of this map - */ - public String toString() { - Traverser it = new Traverser(this); - StringBuilder sb = new StringBuilder(); - sb.append('{'); - Object v; - if ((v = it.advance()) != null) { - for (;;) { - Object k = it.nextKey; - sb.append(k == this ? "(this Map)" : k); - sb.append('='); - sb.append(v == this ? "(this Map)" : v); - if ((v = it.advance()) == null) - break; - sb.append(',').append(' '); - } - } - return sb.append('}').toString(); - } - - /** - * Compares the specified object with this map for equality. - * Returns {@code true} if the given object is a map with the same - * mappings as this map. This operation may return misleading - * results if either map is concurrently modified during execution - * of this method. - * - * @param o object to be compared for equality with this map - * @return {@code true} if the specified object is equal to this map - */ - public boolean equals(Object o) { - if (o != this) { - if (!(o instanceof Map)) - return false; - Map m = (Map) o; - Traverser it = new Traverser(this); - Object val; - while ((val = it.advance()) != null) { - Object v = m.get(it.nextKey); - if (v == null || (v != val && !v.equals(val))) - return false; - } - for (Map.Entry e : m.entrySet()) { - Object mk, mv, v; - if ((mk = e.getKey()) == null || - (mv = e.getValue()) == null || - (v = internalGet(mk)) == null || - (mv != v && !mv.equals(v))) - return false; - } - } - return true; - } - - /* ----------------Iterators -------------- */ - - @SuppressWarnings("serial") static final class KeyIterator extends Traverser - implements Spliterator, Enumeration { - KeyIterator(ConcurrentHashMapV8 map) { super(map); } - KeyIterator(Traverser it) { - super(it); - } - public KeyIterator split() { - if (nextKey != null) - throw new IllegalStateException(); - return new KeyIterator(this); - } - @SuppressWarnings("unchecked") public final K next() { - if (nextVal == null && advance() == null) - throw new NoSuchElementException(); - Object k = nextKey; - nextVal = null; - return (K) k; - } - - public final K nextElement() { return next(); } - } - - @SuppressWarnings("serial") static final class ValueIterator extends Traverser - implements Spliterator, Enumeration { - ValueIterator(ConcurrentHashMapV8 map) { super(map); } - ValueIterator(Traverser it) { - super(it); - } - public ValueIterator split() { - if (nextKey != null) - throw new IllegalStateException(); - return new ValueIterator(this); - } - - @SuppressWarnings("unchecked") public final V next() { - Object v; - if ((v = nextVal) == null && (v = advance()) == null) - throw new NoSuchElementException(); - nextVal = null; - return (V) v; - } - - public final V nextElement() { return next(); } - } - - @SuppressWarnings("serial") static final class EntryIterator extends Traverser - implements Spliterator> { - EntryIterator(ConcurrentHashMapV8 map) { super(map); } - EntryIterator(Traverser it) { - super(it); - } - public EntryIterator split() { - if (nextKey != null) - throw new IllegalStateException(); - return new EntryIterator(this); - } - - @SuppressWarnings("unchecked") public final Map.Entry next() { - Object v; - if ((v = nextVal) == null && (v = advance()) == null) - throw new NoSuchElementException(); - Object k = nextKey; - nextVal = null; - return new MapEntry((K)k, (V)v, map); - } - } - - /** - * Exported Entry for iterators - */ - static final class MapEntry implements Map.Entry { - final K key; // non-null - V val; // non-null - final ConcurrentHashMapV8 map; - MapEntry(K key, V val, ConcurrentHashMapV8 map) { - this.key = key; - this.val = val; - this.map = map; - } - public final K getKey() { return key; } - public final V getValue() { return val; } - public final int hashCode() { return key.hashCode() ^ val.hashCode(); } - public final String toString(){ return key + "=" + val; } - - public final boolean equals(Object o) { - Object k, v; Map.Entry e; - return ((o instanceof Map.Entry) && - (k = (e = (Map.Entry)o).getKey()) != null && - (v = e.getValue()) != null && - (k == key || k.equals(key)) && - (v == val || v.equals(val))); - } - - /** - * Sets our entry's value and writes through to the map. The - * value to return is somewhat arbitrary here. Since we do not - * necessarily track asynchronous changes, the most recent - * "previous" value could be different from what we return (or - * could even have been removed in which case the put will - * re-establish). We do not and cannot guarantee more. - */ - public final V setValue(V value) { - if (value == null) throw new NullPointerException(); - V v = val; - val = value; - map.put(key, value); - return v; - } - } - - /* ---------------- Serialization Support -------------- */ - - /** - * Stripped-down version of helper class used in previous version, - * declared for the sake of serialization compatibility - */ - static class Segment implements Serializable { - private static final long serialVersionUID = 2249069246763182397L; - final float loadFactor; - Segment(float lf) { this.loadFactor = lf; } - } - - /** - * Saves the state of the {@code ConcurrentHashMapV8} instance to a - * stream (i.e., serializes it). - * @param s the stream - * @serialData - * the key (Object) and value (Object) - * for each key-value mapping, followed by a null pair. - * The key-value mappings are emitted in no particular order. - */ - @SuppressWarnings("unchecked") private void writeObject(java.io.ObjectOutputStream s) - throws java.io.IOException { - if (segments == null) { // for serialization compatibility - segments = (Segment[]) - new Segment[DEFAULT_CONCURRENCY_LEVEL]; - for (int i = 0; i < segments.length; ++i) - segments[i] = new Segment(LOAD_FACTOR); - } - s.defaultWriteObject(); - Traverser it = new Traverser(this); - Object v; - while ((v = it.advance()) != null) { - s.writeObject(it.nextKey); - s.writeObject(v); - } - s.writeObject(null); - s.writeObject(null); - segments = null; // throw away - } - - /** - * Reconstitutes the instance from a stream (that is, deserializes it). - * @param s the stream - */ - @SuppressWarnings("unchecked") private void readObject(java.io.ObjectInputStream s) - throws java.io.IOException, ClassNotFoundException { - s.defaultReadObject(); - this.segments = null; // unneeded - // initialize transient final field - this.counter = new LongAdder(); - - // Create all nodes, then place in table once size is known - long size = 0L; - Node p = null; - for (;;) { - K k = (K) s.readObject(); - V v = (V) s.readObject(); - if (k != null && v != null) { - int h = spread(k.hashCode()); - p = new Node(h, k, v, p); - ++size; - } - else - break; - } - if (p != null) { - boolean init = false; - int n; - if (size >= (long)(MAXIMUM_CAPACITY >>> 1)) - n = MAXIMUM_CAPACITY; - else { - int sz = (int)size; - n = tableSizeFor(sz + (sz >>> 1) + 1); - } - int sc = sizeCtl; - boolean collide = false; - if (n > sc && - SIZE_CTRL_UPDATER.compareAndSet(this, sc, -1)) { - try { - if (table == null) { - init = true; - AtomicReferenceArray tab = new AtomicReferenceArray(n); - int mask = n - 1; - while (p != null) { - int j = p.hash & mask; - Node next = p.next; - Node q = p.next = tabAt(tab, j); - setTabAt(tab, j, p); - if (!collide && q != null && q.hash == p.hash) - collide = true; - p = next; - } - table = tab; - counter.add(size); - sc = n - (n >>> 2); - } - } finally { - sizeCtl = sc; - } - if (collide) { // rescan and convert to TreeBins - AtomicReferenceArray tab = table; - for (int i = 0; i < tab.length(); ++i) { - int c = 0; - for (Node e = tabAt(tab, i); e != null; e = e.next) { - if (++c > TREE_THRESHOLD && - (e.key instanceof Comparable)) { - replaceWithTreeBin(tab, i, e.key); - break; - } - } - } - } - } - if (!init) { // Can only happen if unsafely published. - while (p != null) { - internalPut(p.key, p.val); - p = p.next; - } - } - } - } - - - // ------------------------------------------------------- - - // Sams - /** Interface describing a void action of one argument */ - public interface Action { void apply(A a); } - /** Interface describing a void action of two arguments */ - public interface BiAction { void apply(A a, B b); } - /** Interface describing a function of one argument */ - public interface Generator { T apply(); } - /** Interface describing a function mapping its argument to a double */ - public interface ObjectToDouble { double apply(A a); } - /** Interface describing a function mapping its argument to a long */ - public interface ObjectToLong { long apply(A a); } - /** Interface describing a function mapping its argument to an int */ - public interface ObjectToInt {int apply(A a); } - /** Interface describing a function mapping two arguments to a double */ - public interface ObjectByObjectToDouble { double apply(A a, B b); } - /** Interface describing a function mapping two arguments to a long */ - public interface ObjectByObjectToLong { long apply(A a, B b); } - /** Interface describing a function mapping two arguments to an int */ - public interface ObjectByObjectToInt {int apply(A a, B b); } - /** Interface describing a function mapping a double to a double */ - public interface DoubleToDouble { double apply(double a); } - /** Interface describing a function mapping a long to a long */ - public interface LongToLong { long apply(long a); } - /** Interface describing a function mapping an int to an int */ - public interface IntToInt { int apply(int a); } - /** Interface describing a function mapping two doubles to a double */ - public interface DoubleByDoubleToDouble { double apply(double a, double b); } - /** Interface describing a function mapping two longs to a long */ - public interface LongByLongToLong { long apply(long a, long b); } - /** Interface describing a function mapping two ints to an int */ - public interface IntByIntToInt { int apply(int a, int b); } - - - /* ----------------Views -------------- */ - - /** - * Base class for views. - */ - static abstract class CHMView { - final ConcurrentHashMapV8 map; - CHMView(ConcurrentHashMapV8 map) { this.map = map; } - - /** - * Returns the map backing this view. - * - * @return the map backing this view - */ - public ConcurrentHashMapV8 getMap() { return map; } - - public final int size() { return map.size(); } - public final boolean isEmpty() { return map.isEmpty(); } - public final void clear() { map.clear(); } - - // implementations below rely on concrete classes supplying these - abstract public Iterator iterator(); - abstract public boolean contains(Object o); - abstract public boolean remove(Object o); - - private static final String oomeMsg = "Required array size too large"; - - public final Object[] toArray() { - long sz = map.mappingCount(); - if (sz > (long)(MAX_ARRAY_SIZE)) - throw new OutOfMemoryError(oomeMsg); - int n = (int)sz; - Object[] r = new Object[n]; - int i = 0; - Iterator it = iterator(); - while (it.hasNext()) { - if (i == n) { - if (n >= MAX_ARRAY_SIZE) - throw new OutOfMemoryError(oomeMsg); - if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1) - n = MAX_ARRAY_SIZE; - else - n += (n >>> 1) + 1; - r = Arrays.copyOf(r, n); - } - r[i++] = it.next(); - } - return (i == n) ? r : Arrays.copyOf(r, i); - } - - @SuppressWarnings("unchecked") public final T[] toArray(T[] a) { - long sz = map.mappingCount(); - if (sz > (long)(MAX_ARRAY_SIZE)) - throw new OutOfMemoryError(oomeMsg); - int m = (int)sz; - T[] r = (a.length >= m) ? a : - (T[])java.lang.reflect.Array - .newInstance(a.getClass().getComponentType(), m); - int n = r.length; - int i = 0; - Iterator it = iterator(); - while (it.hasNext()) { - if (i == n) { - if (n >= MAX_ARRAY_SIZE) - throw new OutOfMemoryError(oomeMsg); - if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1) - n = MAX_ARRAY_SIZE; - else - n += (n >>> 1) + 1; - r = Arrays.copyOf(r, n); - } - r[i++] = (T)it.next(); - } - if (a == r && i < n) { - r[i] = null; // null-terminate - return r; - } - return (i == n) ? r : Arrays.copyOf(r, i); - } - - public final int hashCode() { - int h = 0; - for (Iterator it = iterator(); it.hasNext();) - h += it.next().hashCode(); - return h; - } - - public final String toString() { - StringBuilder sb = new StringBuilder(); - sb.append('['); - Iterator it = iterator(); - if (it.hasNext()) { - for (;;) { - Object e = it.next(); - sb.append(e == this ? "(this Collection)" : e); - if (!it.hasNext()) - break; - sb.append(',').append(' '); - } - } - return sb.append(']').toString(); - } - - public final boolean containsAll(Collection c) { - if (c != this) { - for (Iterator it = c.iterator(); it.hasNext();) { - Object e = it.next(); - if (e == null || !contains(e)) - return false; - } - } - return true; - } - - public final boolean removeAll(Collection c) { - boolean modified = false; - for (Iterator it = iterator(); it.hasNext();) { - if (c.contains(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - } - - public final boolean retainAll(Collection c) { - boolean modified = false; - for (Iterator it = iterator(); it.hasNext();) { - if (!c.contains(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - } - - } - - /** - * A view of a ConcurrentHashMapV8 as a {@link Set} of keys, in - * which additions may optionally be enabled by mapping to a - * common value. This class cannot be directly instantiated. See - * {@link #keySet}, {@link #keySet(Object)}, {@link #newKeySet()}, - * {@link #newKeySet(int)}. - */ - public static class KeySetView extends CHMView implements Set, java.io.Serializable { - private static final long serialVersionUID = 7249069246763182397L; - private final V value; - KeySetView(ConcurrentHashMapV8 map, V value) { // non-public - super(map); - this.value = value; - } - - /** - * Returns the default mapped value for additions, - * or {@code null} if additions are not supported. - * - * @return the default mapped value for additions, or {@code null} - * if not supported. - */ - public V getMappedValue() { return value; } - - // implement Set API - - public boolean contains(Object o) { return map.containsKey(o); } - public boolean remove(Object o) { return map.remove(o) != null; } - - /** - * Returns a "weakly consistent" iterator that will never - * throw {@link ConcurrentModificationException}, and - * guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not - * guaranteed to) reflect any modifications subsequent to - * construction. - * - * @return an iterator over the keys of this map - */ - public Iterator iterator() { return new KeyIterator(map); } - public boolean add(K e) { - V v; - if ((v = value) == null) - throw new UnsupportedOperationException(); - if (e == null) - throw new NullPointerException(); - return map.internalPutIfAbsent(e, v) == null; - } - public boolean addAll(Collection c) { - boolean added = false; - V v; - if ((v = value) == null) - throw new UnsupportedOperationException(); - for (K e : c) { - if (e == null) - throw new NullPointerException(); - if (map.internalPutIfAbsent(e, v) == null) - added = true; - } - return added; - } - public boolean equals(Object o) { - Set c; - return ((o instanceof Set) && - ((c = (Set)o) == this || - (containsAll(c) && c.containsAll(this)))); - } - } - - /** - * A view of a ConcurrentHashMapV8 as a {@link Collection} of - * values, in which additions are disabled. This class cannot be - * directly instantiated. See {@link #values}, - * - *

The view's {@code iterator} is a "weakly consistent" iterator - * that will never throw {@link ConcurrentModificationException}, - * and guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not guaranteed to) - * reflect any modifications subsequent to construction. - */ - public static final class ValuesView extends CHMView - implements Collection { - ValuesView(ConcurrentHashMapV8 map) { super(map); } - public final boolean contains(Object o) { return map.containsValue(o); } - public final boolean remove(Object o) { - if (o != null) { - Iterator it = new ValueIterator(map); - while (it.hasNext()) { - if (o.equals(it.next())) { - it.remove(); - return true; - } - } - } - return false; - } - - /** - * Returns a "weakly consistent" iterator that will never - * throw {@link ConcurrentModificationException}, and - * guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not - * guaranteed to) reflect any modifications subsequent to - * construction. - * - * @return an iterator over the values of this map - */ - public final Iterator iterator() { - return new ValueIterator(map); - } - public final boolean add(V e) { - throw new UnsupportedOperationException(); - } - public final boolean addAll(Collection c) { - throw new UnsupportedOperationException(); - } - } - - /** - * A view of a ConcurrentHashMapV8 as a {@link Set} of (key, value) - * entries. This class cannot be directly instantiated. See - * {@link #entrySet}. - */ - public static final class EntrySetView extends CHMView - implements Set> { - EntrySetView(ConcurrentHashMapV8 map) { super(map); } - public final boolean contains(Object o) { - Object k, v, r; Map.Entry e; - return ((o instanceof Map.Entry) && - (k = (e = (Map.Entry)o).getKey()) != null && - (r = map.get(k)) != null && - (v = e.getValue()) != null && - (v == r || v.equals(r))); - } - public final boolean remove(Object o) { - Object k, v; Map.Entry e; - return ((o instanceof Map.Entry) && - (k = (e = (Map.Entry)o).getKey()) != null && - (v = e.getValue()) != null && - map.remove(k, v)); - } - - /** - * Returns a "weakly consistent" iterator that will never - * throw {@link ConcurrentModificationException}, and - * guarantees to traverse elements as they existed upon - * construction of the iterator, and may (but is not - * guaranteed to) reflect any modifications subsequent to - * construction. - * - * @return an iterator over the entries of this map - */ - public final Iterator> iterator() { - return new EntryIterator(map); - } - - public final boolean add(Entry e) { - K key = e.getKey(); - V value = e.getValue(); - if (key == null || value == null) - throw new NullPointerException(); - return map.internalPut(key, value) == null; - } - public final boolean addAll(Collection> c) { - boolean added = false; - for (Entry e : c) { - if (add(e)) - added = true; - } - return added; - } - public boolean equals(Object o) { - Set c; - return ((o instanceof Set) && - ((c = (Set)o) == this || - (containsAll(c) && c.containsAll(this)))); - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/LongAdder.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/LongAdder.java deleted file mode 100644 index ecf552a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/LongAdder.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Written by Doug Lea with assistance from members of JCP JSR-166 - * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// This is based on 1.9 version. - -package com.concurrent_ruby.ext.jsr166e.nounsafe; - -import java.util.concurrent.atomic.AtomicLong; -import java.io.IOException; -import java.io.Serializable; -import java.io.ObjectInputStream; - -/** - * One or more variables that together maintain an initially zero - * {@code long} sum. When updates (method {@link #add}) are contended - * across threads, the set of variables may grow dynamically to reduce - * contention. Method {@link #sum} (or, equivalently, {@link - * #longValue}) returns the current total combined across the - * variables maintaining the sum. - * - *

This class is usually preferable to {@link AtomicLong} when - * multiple threads update a common sum that is used for purposes such - * as collecting statistics, not for fine-grained synchronization - * control. Under low update contention, the two classes have similar - * characteristics. But under high contention, expected throughput of - * this class is significantly higher, at the expense of higher space - * consumption. - * - *

This class extends {@link Number}, but does not define - * methods such as {@code hashCode} and {@code compareTo} because - * instances are expected to be mutated, and so are not useful as - * collection keys. - * - *

jsr166e note: This class is targeted to be placed in - * java.util.concurrent.atomic. - * - * @since 1.8 - * @author Doug Lea - */ -public class LongAdder extends Striped64 implements Serializable { - private static final long serialVersionUID = 7249069246863182397L; - - /** - * Version of plus for use in retryUpdate - */ - final long fn(long v, long x) { return v + x; } - - /** - * Creates a new adder with initial sum of zero. - */ - public LongAdder() { - } - - /** - * Adds the given value. - * - * @param x the value to add - */ - public void add(long x) { - Cell[] as; long b, v; HashCode hc; Cell a; int n; - if ((as = cells) != null || !casBase(b = base, b + x)) { - boolean uncontended = true; - int h = (hc = threadHashCode.get()).code; - if (as == null || (n = as.length) < 1 || - (a = as[(n - 1) & h]) == null || - !(uncontended = a.cas(v = a.value, v + x))) - retryUpdate(x, hc, uncontended); - } - } - - /** - * Equivalent to {@code add(1)}. - */ - public void increment() { - add(1L); - } - - /** - * Equivalent to {@code add(-1)}. - */ - public void decrement() { - add(-1L); - } - - /** - * Returns the current sum. The returned value is NOT an - * atomic snapshot: Invocation in the absence of concurrent - * updates returns an accurate result, but concurrent updates that - * occur while the sum is being calculated might not be - * incorporated. - * - * @return the sum - */ - public long sum() { - long sum = base; - Cell[] as = cells; - if (as != null) { - int n = as.length; - for (int i = 0; i < n; ++i) { - Cell a = as[i]; - if (a != null) - sum += a.value; - } - } - return sum; - } - - /** - * Resets variables maintaining the sum to zero. This method may - * be a useful alternative to creating a new adder, but is only - * effective if there are no concurrent updates. Because this - * method is intrinsically racy, it should only be used when it is - * known that no threads are concurrently updating. - */ - public void reset() { - internalReset(0L); - } - - /** - * Equivalent in effect to {@link #sum} followed by {@link - * #reset}. This method may apply for example during quiescent - * points between multithreaded computations. If there are - * updates concurrent with this method, the returned value is - * not guaranteed to be the final value occurring before - * the reset. - * - * @return the sum - */ - public long sumThenReset() { - long sum = base; - Cell[] as = cells; - base = 0L; - if (as != null) { - int n = as.length; - for (int i = 0; i < n; ++i) { - Cell a = as[i]; - if (a != null) { - sum += a.value; - a.value = 0L; - } - } - } - return sum; - } - - /** - * Returns the String representation of the {@link #sum}. - * @return the String representation of the {@link #sum} - */ - public String toString() { - return Long.toString(sum()); - } - - /** - * Equivalent to {@link #sum}. - * - * @return the sum - */ - public long longValue() { - return sum(); - } - - /** - * Returns the {@link #sum} as an {@code int} after a narrowing - * primitive conversion. - */ - public int intValue() { - return (int)sum(); - } - - /** - * Returns the {@link #sum} as a {@code float} - * after a widening primitive conversion. - */ - public float floatValue() { - return (float)sum(); - } - - /** - * Returns the {@link #sum} as a {@code double} after a widening - * primitive conversion. - */ - public double doubleValue() { - return (double)sum(); - } - - private void writeObject(java.io.ObjectOutputStream s) - throws java.io.IOException { - s.defaultWriteObject(); - s.writeLong(sum()); - } - - private void readObject(ObjectInputStream s) - throws IOException, ClassNotFoundException { - s.defaultReadObject(); - busy = 0; - cells = null; - base = s.readLong(); - } - -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/Striped64.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/Striped64.java deleted file mode 100644 index f5216424..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166e/nounsafe/Striped64.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Written by Doug Lea with assistance from members of JCP JSR-166 - * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// This is based on 1.5 version. - -package com.concurrent_ruby.ext.jsr166e.nounsafe; - -import java.util.Random; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; - -/** - * A package-local class holding common representation and mechanics - * for classes supporting dynamic striping on 64bit values. The class - * extends Number so that concrete subclasses must publicly do so. - */ -abstract class Striped64 extends Number { - /* - * This class maintains a lazily-initialized table of atomically - * updated variables, plus an extra "base" field. The table size - * is a power of two. Indexing uses masked per-thread hash codes. - * Nearly all declarations in this class are package-private, - * accessed directly by subclasses. - * - * Table entries are of class Cell; a variant of AtomicLong padded - * to reduce cache contention on most processors. Padding is - * overkill for most Atomics because they are usually irregularly - * scattered in memory and thus don't interfere much with each - * other. But Atomic objects residing in arrays will tend to be - * placed adjacent to each other, and so will most often share - * cache lines (with a huge negative performance impact) without - * this precaution. - * - * In part because Cells are relatively large, we avoid creating - * them until they are needed. When there is no contention, all - * updates are made to the base field. Upon first contention (a - * failed CAS on base update), the table is initialized to size 2. - * The table size is doubled upon further contention until - * reaching the nearest power of two greater than or equal to the - * number of CPUS. Table slots remain empty (null) until they are - * needed. - * - * A single spinlock ("busy") is used for initializing and - * resizing the table, as well as populating slots with new Cells. - * There is no need for a blocking lock: When the lock is not - * available, threads try other slots (or the base). During these - * retries, there is increased contention and reduced locality, - * which is still better than alternatives. - * - * Per-thread hash codes are initialized to random values. - * Contention and/or table collisions are indicated by failed - * CASes when performing an update operation (see method - * retryUpdate). Upon a collision, if the table size is less than - * the capacity, it is doubled in size unless some other thread - * holds the lock. If a hashed slot is empty, and lock is - * available, a new Cell is created. Otherwise, if the slot - * exists, a CAS is tried. Retries proceed by "double hashing", - * using a secondary hash (Marsaglia XorShift) to try to find a - * free slot. - * - * The table size is capped because, when there are more threads - * than CPUs, supposing that each thread were bound to a CPU, - * there would exist a perfect hash function mapping threads to - * slots that eliminates collisions. When we reach capacity, we - * search for this mapping by randomly varying the hash codes of - * colliding threads. Because search is random, and collisions - * only become known via CAS failures, convergence can be slow, - * and because threads are typically not bound to CPUS forever, - * may not occur at all. However, despite these limitations, - * observed contention rates are typically low in these cases. - * - * It is possible for a Cell to become unused when threads that - * once hashed to it terminate, as well as in the case where - * doubling the table causes no thread to hash to it under - * expanded mask. We do not try to detect or remove such cells, - * under the assumption that for long-running instances, observed - * contention levels will recur, so the cells will eventually be - * needed again; and for short-lived ones, it does not matter. - */ - - /** - * Padded variant of AtomicLong supporting only raw accesses plus CAS. - * The value field is placed between pads, hoping that the JVM doesn't - * reorder them. - * - * JVM intrinsics note: It would be possible to use a release-only - * form of CAS here, if it were provided. - */ - static final class Cell { - volatile long p0, p1, p2, p3, p4, p5, p6; - volatile long value; - volatile long q0, q1, q2, q3, q4, q5, q6; - - static AtomicLongFieldUpdater VALUE_UPDATER = AtomicLongFieldUpdater.newUpdater(Cell.class, "value"); - - Cell(long x) { value = x; } - - final boolean cas(long cmp, long val) { - return VALUE_UPDATER.compareAndSet(this, cmp, val); - } - - } - - /** - * Holder for the thread-local hash code. The code is initially - * random, but may be set to a different value upon collisions. - */ - static final class HashCode { - static final Random rng = new Random(); - int code; - HashCode() { - int h = rng.nextInt(); // Avoid zero to allow xorShift rehash - code = (h == 0) ? 1 : h; - } - } - - /** - * The corresponding ThreadLocal class - */ - static final class ThreadHashCode extends ThreadLocal { - public HashCode initialValue() { return new HashCode(); } - } - - /** - * Static per-thread hash codes. Shared across all instances to - * reduce ThreadLocal pollution and because adjustments due to - * collisions in one table are likely to be appropriate for - * others. - */ - static final ThreadHashCode threadHashCode = new ThreadHashCode(); - - /** Number of CPUS, to place bound on table size */ - static final int NCPU = Runtime.getRuntime().availableProcessors(); - - /** - * Table of cells. When non-null, size is a power of 2. - */ - transient volatile Cell[] cells; - - /** - * Base value, used mainly when there is no contention, but also as - * a fallback during table initialization races. Updated via CAS. - */ - transient volatile long base; - - /** - * Spinlock (locked via CAS) used when resizing and/or creating Cells. - */ - transient volatile int busy; - - AtomicLongFieldUpdater BASE_UPDATER = AtomicLongFieldUpdater.newUpdater(Striped64.class, "base"); - AtomicIntegerFieldUpdater BUSY_UPDATER = AtomicIntegerFieldUpdater.newUpdater(Striped64.class, "busy"); - - /** - * Package-private default constructor - */ - Striped64() { - } - - /** - * CASes the base field. - */ - final boolean casBase(long cmp, long val) { - return BASE_UPDATER.compareAndSet(this, cmp, val); - } - - /** - * CASes the busy field from 0 to 1 to acquire lock. - */ - final boolean casBusy() { - return BUSY_UPDATER.compareAndSet(this, 0, 1); - } - - /** - * Computes the function of current and new value. Subclasses - * should open-code this update function for most uses, but the - * virtualized form is needed within retryUpdate. - * - * @param currentValue the current value (of either base or a cell) - * @param newValue the argument from a user update call - * @return result of the update function - */ - abstract long fn(long currentValue, long newValue); - - /** - * Handles cases of updates involving initialization, resizing, - * creating new Cells, and/or contention. See above for - * explanation. This method suffers the usual non-modularity - * problems of optimistic retry code, relying on rechecked sets of - * reads. - * - * @param x the value - * @param hc the hash code holder - * @param wasUncontended false if CAS failed before call - */ - final void retryUpdate(long x, HashCode hc, boolean wasUncontended) { - int h = hc.code; - boolean collide = false; // True if last slot nonempty - for (;;) { - Cell[] as; Cell a; int n; long v; - if ((as = cells) != null && (n = as.length) > 0) { - if ((a = as[(n - 1) & h]) == null) { - if (busy == 0) { // Try to attach new Cell - Cell r = new Cell(x); // Optimistically create - if (busy == 0 && casBusy()) { - boolean created = false; - try { // Recheck under lock - Cell[] rs; int m, j; - if ((rs = cells) != null && - (m = rs.length) > 0 && - rs[j = (m - 1) & h] == null) { - rs[j] = r; - created = true; - } - } finally { - busy = 0; - } - if (created) - break; - continue; // Slot is now non-empty - } - } - collide = false; - } - else if (!wasUncontended) // CAS already known to fail - wasUncontended = true; // Continue after rehash - else if (a.cas(v = a.value, fn(v, x))) - break; - else if (n >= NCPU || cells != as) - collide = false; // At max size or stale - else if (!collide) - collide = true; - else if (busy == 0 && casBusy()) { - try { - if (cells == as) { // Expand table unless stale - Cell[] rs = new Cell[n << 1]; - for (int i = 0; i < n; ++i) - rs[i] = as[i]; - cells = rs; - } - } finally { - busy = 0; - } - collide = false; - continue; // Retry with expanded table - } - h ^= h << 13; // Rehash - h ^= h >>> 17; - h ^= h << 5; - } - else if (busy == 0 && cells == as && casBusy()) { - boolean init = false; - try { // Initialize table - if (cells == as) { - Cell[] rs = new Cell[2]; - rs[h & 1] = new Cell(x); - cells = rs; - init = true; - } - } finally { - busy = 0; - } - if (init) - break; - } - else if (casBase(v = base, fn(v, x))) - break; // Fall back on using base - } - hc.code = h; // Record index for next time - } - - - /** - * Sets base and all cells to the given value. - */ - final void internalReset(long initialValue) { - Cell[] as = cells; - base = initialValue; - if (as != null) { - int n = as.length; - for (int i = 0; i < n; ++i) { - Cell a = as[i]; - if (a != null) - a.value = initialValue; - } - } - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166y/ThreadLocalRandom.java b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166y/ThreadLocalRandom.java deleted file mode 100644 index 3ea409ff..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/ext/concurrent-ruby/com/concurrent_ruby/ext/jsr166y/ThreadLocalRandom.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Written by Doug Lea with assistance from members of JCP JSR-166 - * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// This is based on 1.16 version - -package com.concurrent_ruby.ext.jsr166y; - -import java.util.Random; - -/** - * A random number generator isolated to the current thread. Like the - * global {@link java.util.Random} generator used by the {@link - * java.lang.Math} class, a {@code ThreadLocalRandom} is initialized - * with an internally generated seed that may not otherwise be - * modified. When applicable, use of {@code ThreadLocalRandom} rather - * than shared {@code Random} objects in concurrent programs will - * typically encounter much less overhead and contention. Use of - * {@code ThreadLocalRandom} is particularly appropriate when multiple - * tasks (for example, each a {@link ForkJoinTask}) use random numbers - * in parallel in thread pools. - * - *

Usages of this class should typically be of the form: - * {@code ThreadLocalRandom.current().nextX(...)} (where - * {@code X} is {@code Int}, {@code Long}, etc). - * When all usages are of this form, it is never possible to - * accidently share a {@code ThreadLocalRandom} across multiple threads. - * - *

This class also provides additional commonly used bounded random - * generation methods. - * - * @since 1.7 - * @author Doug Lea - */ -public class ThreadLocalRandom extends Random { - // same constants as Random, but must be redeclared because private - private static final long multiplier = 0x5DEECE66DL; - private static final long addend = 0xBL; - private static final long mask = (1L << 48) - 1; - - /** - * The random seed. We can't use super.seed. - */ - private long rnd; - - /** - * Initialization flag to permit calls to setSeed to succeed only - * while executing the Random constructor. We can't allow others - * since it would cause setting seed in one part of a program to - * unintentionally impact other usages by the thread. - */ - boolean initialized; - - // Padding to help avoid memory contention among seed updates in - // different TLRs in the common case that they are located near - // each other. - private long pad0, pad1, pad2, pad3, pad4, pad5, pad6, pad7; - - /** - * The actual ThreadLocal - */ - private static final ThreadLocal localRandom = - new ThreadLocal() { - protected ThreadLocalRandom initialValue() { - return new ThreadLocalRandom(); - } - }; - - - /** - * Constructor called only by localRandom.initialValue. - */ - ThreadLocalRandom() { - super(); - initialized = true; - } - - /** - * Returns the current thread's {@code ThreadLocalRandom}. - * - * @return the current thread's {@code ThreadLocalRandom} - */ - public static ThreadLocalRandom current() { - return localRandom.get(); - } - - /** - * Throws {@code UnsupportedOperationException}. Setting seeds in - * this generator is not supported. - * - * @throws UnsupportedOperationException always - */ - public void setSeed(long seed) { - if (initialized) - throw new UnsupportedOperationException(); - rnd = (seed ^ multiplier) & mask; - } - - protected int next(int bits) { - rnd = (rnd * multiplier + addend) & mask; - return (int) (rnd >>> (48-bits)); - } - - /** - * Returns a pseudorandom, uniformly distributed value between the - * given least value (inclusive) and bound (exclusive). - * - * @param least the least value returned - * @param bound the upper bound (exclusive) - * @throws IllegalArgumentException if least greater than or equal - * to bound - * @return the next value - */ - public int nextInt(int least, int bound) { - if (least >= bound) - throw new IllegalArgumentException(); - return nextInt(bound - least) + least; - } - - /** - * Returns a pseudorandom, uniformly distributed value - * between 0 (inclusive) and the specified value (exclusive). - * - * @param n the bound on the random number to be returned. Must be - * positive. - * @return the next value - * @throws IllegalArgumentException if n is not positive - */ - public long nextLong(long n) { - if (n <= 0) - throw new IllegalArgumentException("n must be positive"); - // Divide n by two until small enough for nextInt. On each - // iteration (at most 31 of them but usually much less), - // randomly choose both whether to include high bit in result - // (offset) and whether to continue with the lower vs upper - // half (which makes a difference only if odd). - long offset = 0; - while (n >= Integer.MAX_VALUE) { - int bits = next(2); - long half = n >>> 1; - long nextn = ((bits & 2) == 0) ? half : n - half; - if ((bits & 1) == 0) - offset += n - nextn; - n = nextn; - } - return offset + nextInt((int) n); - } - - /** - * Returns a pseudorandom, uniformly distributed value between the - * given least value (inclusive) and bound (exclusive). - * - * @param least the least value returned - * @param bound the upper bound (exclusive) - * @return the next value - * @throws IllegalArgumentException if least greater than or equal - * to bound - */ - public long nextLong(long least, long bound) { - if (least >= bound) - throw new IllegalArgumentException(); - return nextLong(bound - least) + least; - } - - /** - * Returns a pseudorandom, uniformly distributed {@code double} value - * between 0 (inclusive) and the specified value (exclusive). - * - * @param n the bound on the random number to be returned. Must be - * positive. - * @return the next value - * @throws IllegalArgumentException if n is not positive - */ - public double nextDouble(double n) { - if (n <= 0) - throw new IllegalArgumentException("n must be positive"); - return nextDouble() * n; - } - - /** - * Returns a pseudorandom, uniformly distributed value between the - * given least value (inclusive) and bound (exclusive). - * - * @param least the least value returned - * @param bound the upper bound (exclusive) - * @return the next value - * @throws IllegalArgumentException if least greater than or equal - * to bound - */ - public double nextDouble(double least, double bound) { - if (least >= bound) - throw new IllegalArgumentException(); - return nextDouble() * (bound - least) + least; - } - - private static final long serialVersionUID = -5851777807851030925L; -} diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent-ruby.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent-ruby.rb deleted file mode 100644 index e9a3dea4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent-ruby.rb +++ /dev/null @@ -1,5 +0,0 @@ -# This file is here so that there is a file with the same name as the gem that -# can be required by Bundler.require. Applications should normally -# require 'concurrent'. - -require_relative "concurrent" diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent.rb deleted file mode 100644 index 87de46f1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent.rb +++ /dev/null @@ -1,134 +0,0 @@ -require 'concurrent/version' -require 'concurrent/constants' -require 'concurrent/errors' -require 'concurrent/configuration' - -require 'concurrent/atomics' -require 'concurrent/executors' -require 'concurrent/synchronization' - -require 'concurrent/atomic/atomic_markable_reference' -require 'concurrent/atomic/atomic_reference' -require 'concurrent/agent' -require 'concurrent/atom' -require 'concurrent/array' -require 'concurrent/hash' -require 'concurrent/set' -require 'concurrent/map' -require 'concurrent/tuple' -require 'concurrent/async' -require 'concurrent/dataflow' -require 'concurrent/delay' -require 'concurrent/exchanger' -require 'concurrent/future' -require 'concurrent/immutable_struct' -require 'concurrent/ivar' -require 'concurrent/maybe' -require 'concurrent/mutable_struct' -require 'concurrent/mvar' -require 'concurrent/promise' -require 'concurrent/scheduled_task' -require 'concurrent/settable_struct' -require 'concurrent/timer_task' -require 'concurrent/tvar' -require 'concurrent/promises' - -require 'concurrent/thread_safe/synchronized_delegator' -require 'concurrent/thread_safe/util' - -require 'concurrent/options' - -# @!macro internal_implementation_note -# -# @note **Private Implementation:** This abstraction is a private, internal -# implementation detail. It should never be used directly. - -# @!macro monotonic_clock_warning -# -# @note Time calculations on all platforms and languages are sensitive to -# changes to the system clock. To alleviate the potential problems -# associated with changing the system clock while an application is running, -# most modern operating systems provide a monotonic clock that operates -# independently of the system clock. A monotonic clock cannot be used to -# determine human-friendly clock times. A monotonic clock is used exclusively -# for calculating time intervals. Not all Ruby platforms provide access to an -# operating system monotonic clock. On these platforms a pure-Ruby monotonic -# clock will be used as a fallback. An operating system monotonic clock is both -# faster and more reliable than the pure-Ruby implementation. The pure-Ruby -# implementation should be fast and reliable enough for most non-realtime -# operations. At this time the common Ruby platforms that provide access to an -# operating system monotonic clock are MRI 2.1 and above and JRuby (all versions). -# -# @see http://linux.die.net/man/3/clock_gettime Linux clock_gettime(3) - -# @!macro copy_options -# -# ## Copy Options -# -# Object references in Ruby are mutable. This can lead to serious -# problems when the {#value} of an object is a mutable reference. Which -# is always the case unless the value is a `Fixnum`, `Symbol`, or similar -# "primitive" data type. Each instance can be configured with a few -# options that can help protect the program from potentially dangerous -# operations. Each of these options can be optionally set when the object -# instance is created: -# -# * `:dup_on_deref` When true the object will call the `#dup` method on -# the `value` object every time the `#value` method is called -# (default: false) -# * `:freeze_on_deref` When true the object will call the `#freeze` -# method on the `value` object every time the `#value` method is called -# (default: false) -# * `:copy_on_deref` When given a `Proc` object the `Proc` will be run -# every time the `#value` method is called. The `Proc` will be given -# the current `value` as its only argument and the result returned by -# the block will be the return value of the `#value` call. When `nil` -# this option will be ignored (default: nil) -# -# When multiple deref options are set the order of operations is strictly defined. -# The order of deref operations is: -# * `:copy_on_deref` -# * `:dup_on_deref` -# * `:freeze_on_deref` -# -# Because of this ordering there is no need to `#freeze` an object created by a -# provided `:copy_on_deref` block. Simply set `:freeze_on_deref` to `true`. -# Setting both `:dup_on_deref` to `true` and `:freeze_on_deref` to `true` is -# as close to the behavior of a "pure" functional language (like Erlang, Clojure, -# or Haskell) as we are likely to get in Ruby. - -# @!macro deref_options -# -# @option opts [Boolean] :dup_on_deref (false) Call `#dup` before -# returning the data from {#value} -# @option opts [Boolean] :freeze_on_deref (false) Call `#freeze` before -# returning the data from {#value} -# @option opts [Proc] :copy_on_deref (nil) When calling the {#value} -# method, call the given proc passing the internal value as the sole -# argument then return the new value returned from the proc. - -# @!macro executor_and_deref_options -# -# @param [Hash] opts the options used to define the behavior at update and deref -# and to specify the executor on which to perform actions -# @option opts [Executor] :executor when set use the given `Executor` instance. -# Three special values are also supported: `:io` returns the global pool for -# long, blocking (IO) tasks, `:fast` returns the global pool for short, fast -# operations, and `:immediate` returns the global `ImmediateExecutor` object. -# @!macro deref_options - -# @!macro warn.edge -# @api Edge -# @note **Edge Features** are under active development and may change frequently. -# -# - Deprecations are not added before incompatible changes. -# - Edge version: _major_ is always 0, _minor_ bump means incompatible change, -# _patch_ bump means compatible change. -# - Edge features may also lack tests and documentation. -# - Features developed in `concurrent-ruby-edge` are expected to move -# to `concurrent-ruby` when finalised. - - -# {include:file:README.md} -module Concurrent -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/agent.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/agent.rb deleted file mode 100644 index dc8a2600..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/agent.rb +++ /dev/null @@ -1,588 +0,0 @@ -require 'concurrent/configuration' -require 'concurrent/atomic/atomic_reference' -require 'concurrent/atomic/count_down_latch' -require 'concurrent/atomic/thread_local_var' -require 'concurrent/collection/copy_on_write_observer_set' -require 'concurrent/concern/observable' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # `Agent` is inspired by Clojure's [agent](http://clojure.org/agents) - # function. An agent is a shared, mutable variable providing independent, - # uncoordinated, *asynchronous* change of individual values. Best used when - # the value will undergo frequent, complex updates. Suitable when the result - # of an update does not need to be known immediately. `Agent` is (mostly) - # functionally equivalent to Clojure's agent, except where the runtime - # prevents parity. - # - # Agents are reactive, not autonomous - there is no imperative message loop - # and no blocking receive. The state of an Agent should be itself immutable - # and the `#value` of an Agent is always immediately available for reading by - # any thread without any messages, i.e. observation does not require - # cooperation or coordination. - # - # Agent action dispatches are made using the various `#send` methods. These - # methods always return immediately. At some point later, in another thread, - # the following will happen: - # - # 1. The given `action` will be applied to the state of the Agent and the - # `args`, if any were supplied. - # 2. The return value of `action` will be passed to the validator lambda, - # if one has been set on the Agent. - # 3. If the validator succeeds or if no validator was given, the return value - # of the given `action` will become the new `#value` of the Agent. See - # `#initialize` for details. - # 4. If any observers were added to the Agent, they will be notified. See - # `#add_observer` for details. - # 5. If during the `action` execution any other dispatches are made (directly - # or indirectly), they will be held until after the `#value` of the Agent - # has been changed. - # - # If any exceptions are thrown by an action function, no nested dispatches - # will occur, and the exception will be cached in the Agent itself. When an - # Agent has errors cached, any subsequent interactions will immediately throw - # an exception, until the agent's errors are cleared. Agent errors can be - # examined with `#error` and the agent restarted with `#restart`. - # - # The actions of all Agents get interleaved amongst threads in a thread pool. - # At any point in time, at most one action for each Agent is being executed. - # Actions dispatched to an agent from another single agent or thread will - # occur in the order they were sent, potentially interleaved with actions - # dispatched to the same agent from other sources. The `#send` method should - # be used for actions that are CPU limited, while the `#send_off` method is - # appropriate for actions that may block on IO. - # - # Unlike in Clojure, `Agent` cannot participate in `Concurrent::TVar` transactions. - # - # ## Example - # - # ``` - # def next_fibonacci(set = nil) - # return [0, 1] if set.nil? - # set + [set[-2..-1].reduce{|sum,x| sum + x }] - # end - # - # # create an agent with an initial value - # agent = Concurrent::Agent.new(next_fibonacci) - # - # # send a few update requests - # 5.times do - # agent.send{|set| next_fibonacci(set) } - # end - # - # # wait for them to complete - # agent.await - # - # # get the current value - # agent.value #=> [0, 1, 1, 2, 3, 5, 8] - # ``` - # - # ## Observation - # - # Agents support observers through the {Concurrent::Observable} mixin module. - # Notification of observers occurs every time an action dispatch returns and - # the new value is successfully validated. Observation will *not* occur if the - # action raises an exception, if validation fails, or when a {#restart} occurs. - # - # When notified the observer will receive three arguments: `time`, `old_value`, - # and `new_value`. The `time` argument is the time at which the value change - # occurred. The `old_value` is the value of the Agent when the action began - # processing. The `new_value` is the value to which the Agent was set when the - # action completed. Note that `old_value` and `new_value` may be the same. - # This is not an error. It simply means that the action returned the same - # value. - # - # ## Nested Actions - # - # It is possible for an Agent action to post further actions back to itself. - # The nested actions will be enqueued normally then processed *after* the - # outer action completes, in the order they were sent, possibly interleaved - # with action dispatches from other threads. Nested actions never deadlock - # with one another and a failure in a nested action will never affect the - # outer action. - # - # Nested actions can be called using the Agent reference from the enclosing - # scope or by passing the reference in as a "send" argument. Nested actions - # cannot be post using `self` from within the action block/proc/lambda; `self` - # in this context will not reference the Agent. The preferred method for - # dispatching nested actions is to pass the Agent as an argument. This allows - # Ruby to more effectively manage the closing scope. - # - # Prefer this: - # - # ``` - # agent = Concurrent::Agent.new(0) - # agent.send(agent) do |value, this| - # this.send {|v| v + 42 } - # 3.14 - # end - # agent.value #=> 45.14 - # ``` - # - # Over this: - # - # ``` - # agent = Concurrent::Agent.new(0) - # agent.send do |value| - # agent.send {|v| v + 42 } - # 3.14 - # end - # ``` - # - # @!macro agent_await_warning - # - # **NOTE** Never, *under any circumstances*, call any of the "await" methods - # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action - # block/proc/lambda. The call will block the Agent and will always fail. - # Calling either {#await} or {#wait} (with a timeout of `nil`) will - # hopelessly deadlock the Agent with no possibility of recovery. - # - # @!macro thread_safe_variable_comparison - # - # @see http://clojure.org/Agents Clojure Agents - # @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State - class Agent < Synchronization::LockableObject - include Concern::Observable - - ERROR_MODES = [:continue, :fail].freeze - private_constant :ERROR_MODES - - AWAIT_FLAG = ::Object.new - private_constant :AWAIT_FLAG - - AWAIT_ACTION = ->(value, latch) { latch.count_down; AWAIT_FLAG } - private_constant :AWAIT_ACTION - - DEFAULT_ERROR_HANDLER = ->(agent, error) { nil } - private_constant :DEFAULT_ERROR_HANDLER - - DEFAULT_VALIDATOR = ->(value) { true } - private_constant :DEFAULT_VALIDATOR - - Job = Struct.new(:action, :args, :executor, :caller) - private_constant :Job - - # Raised during action processing or any other time in an Agent's lifecycle. - class Error < StandardError - def initialize(message = nil) - message ||= 'agent must be restarted before jobs can post' - super(message) - end - end - - # Raised when a new value obtained during action processing or at `#restart` - # fails validation. - class ValidationError < Error - def initialize(message = nil) - message ||= 'invalid value' - super(message) - end - end - - # The error mode this Agent is operating in. See {#initialize} for details. - attr_reader :error_mode - - # Create a new `Agent` with the given initial value and options. - # - # The `:validator` option must be `nil` or a side-effect free proc/lambda - # which takes one argument. On any intended value change the validator, if - # provided, will be called. If the new value is invalid the validator should - # return `false` or raise an error. - # - # The `:error_handler` option must be `nil` or a proc/lambda which takes two - # arguments. When an action raises an error or validation fails, either by - # returning false or raising an error, the error handler will be called. The - # arguments to the error handler will be a reference to the agent itself and - # the error object which was raised. - # - # The `:error_mode` may be either `:continue` (the default if an error - # handler is given) or `:fail` (the default if error handler nil or not - # given). - # - # If an action being run by the agent throws an error or doesn't pass - # validation the error handler, if present, will be called. After the - # handler executes if the error mode is `:continue` the Agent will continue - # as if neither the action that caused the error nor the error itself ever - # happened. - # - # If the mode is `:fail` the Agent will become {#failed?} and will stop - # accepting new action dispatches. Any previously queued actions will be - # held until {#restart} is called. The {#value} method will still work, - # returning the value of the Agent before the error. - # - # @param [Object] initial the initial value - # @param [Hash] opts the configuration options - # - # @option opts [Symbol] :error_mode either `:continue` or `:fail` - # @option opts [nil, Proc] :error_handler the (optional) error handler - # @option opts [nil, Proc] :validator the (optional) validation procedure - def initialize(initial, opts = {}) - super() - synchronize { ns_initialize(initial, opts) } - end - - # The current value (state) of the Agent, irrespective of any pending or - # in-progress actions. The value is always available and is non-blocking. - # - # @return [Object] the current value - def value - @current.value # TODO (pitr 12-Sep-2015): broken unsafe read? - end - - alias_method :deref, :value - - # When {#failed?} and {#error_mode} is `:fail`, returns the error object - # which caused the failure, else `nil`. When {#error_mode} is `:continue` - # will *always* return `nil`. - # - # @return [nil, Error] the error which caused the failure when {#failed?} - def error - @error.value - end - - alias_method :reason, :error - - # @!macro agent_send - # - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Action dispatches are only allowed when the Agent - # is not {#failed?}. - # - # The action must be a block/proc/lambda which takes 1 or more arguments. - # The first argument is the current {#value} of the Agent. Any arguments - # passed to the send method via the `args` parameter will be passed to the - # action as the remaining arguments. The action must return the new value - # of the Agent. - # - # * {#send} and {#send!} should be used for actions that are CPU limited - # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that - # may block on IO - # * {#send_via} and {#send_via!} are used when a specific executor is to - # be used for the action - # - # @param [Array] args zero or more arguments to be passed to - # the action - # @param [Proc] action the action dispatch to be enqueued - # - # @yield [agent, value, *args] process the old value and return the new - # @yieldparam [Object] value the current {#value} of the Agent - # @yieldparam [Array] args zero or more arguments to pass to the - # action - # @yieldreturn [Object] the new value of the Agent - # - # @!macro send_return - # @return [Boolean] true if the action is successfully enqueued, false if - # the Agent is {#failed?} - def send(*args, &action) - enqueue_action_job(action, args, Concurrent.global_fast_executor) - end - - # @!macro agent_send - # - # @!macro send_bang_return_and_raise - # @return [Boolean] true if the action is successfully enqueued - # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} - def send!(*args, &action) - raise Error.new unless send(*args, &action) - true - end - - # @!macro agent_send - # @!macro send_return - def send_off(*args, &action) - enqueue_action_job(action, args, Concurrent.global_io_executor) - end - - alias_method :post, :send_off - - # @!macro agent_send - # @!macro send_bang_return_and_raise - def send_off!(*args, &action) - raise Error.new unless send_off(*args, &action) - true - end - - # @!macro agent_send - # @!macro send_return - # @param [Concurrent::ExecutorService] executor the executor on which the - # action is to be dispatched - def send_via(executor, *args, &action) - enqueue_action_job(action, args, executor) - end - - # @!macro agent_send - # @!macro send_bang_return_and_raise - # @param [Concurrent::ExecutorService] executor the executor on which the - # action is to be dispatched - def send_via!(executor, *args, &action) - raise Error.new unless send_via(executor, *args, &action) - true - end - - # Dispatches an action to the Agent and returns immediately. Subsequently, - # in a thread from a thread pool, the {#value} will be set to the return - # value of the action. Appropriate for actions that may block on IO. - # - # @param [Proc] action the action dispatch to be enqueued - # @return [Concurrent::Agent] self - # @see #send_off - def <<(action) - send_off(&action) - self - end - - # Blocks the current thread (indefinitely!) until all actions dispatched - # thus far, from this thread or nested by the Agent, have occurred. Will - # block when {#failed?}. Will never return if a failed Agent is {#restart} - # with `:clear_actions` true. - # - # Returns a reference to `self` to support method chaining: - # - # ``` - # current_value = agent.await.value - # ``` - # - # @return [Boolean] self - # - # @!macro agent_await_warning - def await - wait(nil) - self - end - - # Blocks the current thread until all actions dispatched thus far, from this - # thread or nested by the Agent, have occurred, or the timeout (in seconds) - # has elapsed. - # - # @param [Float] timeout the maximum number of seconds to wait - # @return [Boolean] true if all actions complete before timeout else false - # - # @!macro agent_await_warning - def await_for(timeout) - wait(timeout.to_f) - end - - # Blocks the current thread until all actions dispatched thus far, from this - # thread or nested by the Agent, have occurred, or the timeout (in seconds) - # has elapsed. - # - # @param [Float] timeout the maximum number of seconds to wait - # @return [Boolean] true if all actions complete before timeout - # - # @raise [Concurrent::TimeoutError] when timeout is reached - # - # @!macro agent_await_warning - def await_for!(timeout) - raise Concurrent::TimeoutError unless wait(timeout.to_f) - true - end - - # Blocks the current thread until all actions dispatched thus far, from this - # thread or nested by the Agent, have occurred, or the timeout (in seconds) - # has elapsed. Will block indefinitely when timeout is nil or not given. - # - # Provided mainly for consistency with other classes in this library. Prefer - # the various `await` methods instead. - # - # @param [Float] timeout the maximum number of seconds to wait - # @return [Boolean] true if all actions complete before timeout else false - # - # @!macro agent_await_warning - def wait(timeout = nil) - latch = Concurrent::CountDownLatch.new(1) - enqueue_await_job(latch) - latch.wait(timeout) - end - - # Is the Agent in a failed state? - # - # @see #restart - def failed? - !@error.value.nil? - end - - alias_method :stopped?, :failed? - - # When an Agent is {#failed?}, changes the Agent {#value} to `new_value` - # then un-fails the Agent so that action dispatches are allowed again. If - # the `:clear_actions` option is give and true, any actions queued on the - # Agent that were being held while it was failed will be discarded, - # otherwise those held actions will proceed. The `new_value` must pass the - # validator if any, or `restart` will raise an exception and the Agent will - # remain failed with its old {#value} and {#error}. Observers, if any, will - # not be notified of the new state. - # - # @param [Object] new_value the new value for the Agent once restarted - # @param [Hash] opts the configuration options - # @option opts [Symbol] :clear_actions true if all enqueued but unprocessed - # actions should be discarded on restart, else false (default: false) - # @return [Boolean] true - # - # @raise [Concurrent:AgentError] when not failed - def restart(new_value, opts = {}) - clear_actions = opts.fetch(:clear_actions, false) - synchronize do - raise Error.new('agent is not failed') unless failed? - raise ValidationError unless ns_validate(new_value) - @current.value = new_value - @error.value = nil - @queue.clear if clear_actions - ns_post_next_job unless @queue.empty? - end - true - end - - class << self - - # Blocks the current thread (indefinitely!) until all actions dispatched - # thus far to all the given Agents, from this thread or nested by the - # given Agents, have occurred. Will block when any of the agents are - # failed. Will never return if a failed Agent is restart with - # `:clear_actions` true. - # - # @param [Array] agents the Agents on which to wait - # @return [Boolean] true - # - # @!macro agent_await_warning - def await(*agents) - agents.each { |agent| agent.await } - true - end - - # Blocks the current thread until all actions dispatched thus far to all - # the given Agents, from this thread or nested by the given Agents, have - # occurred, or the timeout (in seconds) has elapsed. - # - # @param [Float] timeout the maximum number of seconds to wait - # @param [Array] agents the Agents on which to wait - # @return [Boolean] true if all actions complete before timeout else false - # - # @!macro agent_await_warning - def await_for(timeout, *agents) - end_at = Concurrent.monotonic_time + timeout.to_f - ok = agents.length.times do |i| - break false if (delay = end_at - Concurrent.monotonic_time) < 0 - break false unless agents[i].await_for(delay) - end - !!ok - end - - # Blocks the current thread until all actions dispatched thus far to all - # the given Agents, from this thread or nested by the given Agents, have - # occurred, or the timeout (in seconds) has elapsed. - # - # @param [Float] timeout the maximum number of seconds to wait - # @param [Array] agents the Agents on which to wait - # @return [Boolean] true if all actions complete before timeout - # - # @raise [Concurrent::TimeoutError] when timeout is reached - # @!macro agent_await_warning - def await_for!(timeout, *agents) - raise Concurrent::TimeoutError unless await_for(timeout, *agents) - true - end - end - - private - - def ns_initialize(initial, opts) - @error_mode = opts[:error_mode] - @error_handler = opts[:error_handler] - - if @error_mode && !ERROR_MODES.include?(@error_mode) - raise ArgumentError.new('unrecognized error mode') - elsif @error_mode.nil? - @error_mode = @error_handler ? :continue : :fail - end - - @error_handler ||= DEFAULT_ERROR_HANDLER - @validator = opts.fetch(:validator, DEFAULT_VALIDATOR) - @current = Concurrent::AtomicReference.new(initial) - @error = Concurrent::AtomicReference.new(nil) - @caller = Concurrent::ThreadLocalVar.new(nil) - @queue = [] - - self.observers = Collection::CopyOnNotifyObserverSet.new - end - - def enqueue_action_job(action, args, executor) - raise ArgumentError.new('no action given') unless action - job = Job.new(action, args, executor, @caller.value || Thread.current.object_id) - synchronize { ns_enqueue_job(job) } - end - - def enqueue_await_job(latch) - synchronize do - if (index = ns_find_last_job_for_thread) - job = Job.new(AWAIT_ACTION, [latch], Concurrent.global_immediate_executor, - Thread.current.object_id) - ns_enqueue_job(job, index+1) - else - latch.count_down - true - end - end - end - - def ns_enqueue_job(job, index = nil) - # a non-nil index means this is an await job - return false if index.nil? && failed? - index ||= @queue.length - @queue.insert(index, job) - # if this is the only job, post to executor - ns_post_next_job if @queue.length == 1 - true - end - - def ns_post_next_job - @queue.first.executor.post { execute_next_job } - end - - def execute_next_job - job = synchronize { @queue.first } - old_value = @current.value - - @caller.value = job.caller # for nested actions - new_value = job.action.call(old_value, *job.args) - @caller.value = nil - - return if new_value == AWAIT_FLAG - - if ns_validate(new_value) - @current.value = new_value - observers.notify_observers(Time.now, old_value, new_value) - else - handle_error(ValidationError.new) - end - rescue => error - handle_error(error) - ensure - synchronize do - @queue.shift - unless failed? || @queue.empty? - ns_post_next_job - end - end - end - - def ns_validate(value) - @validator.call(value) - rescue - false - end - - def handle_error(error) - # stop new jobs from posting - @error.value = error if @error_mode == :fail - @error_handler.call(self, error) - rescue - # do nothing - end - - def ns_find_last_job_for_thread - @queue.rindex { |job| job.caller == Thread.current.object_id } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/array.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/array.rb deleted file mode 100644 index c8761af8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/array.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/thread_safe/util' - -module Concurrent - - # @!macro concurrent_array - # - # A thread-safe subclass of Array. This version locks against the object - # itself for every method call, ensuring only one thread can be reading - # or writing at a time. This includes iteration methods like `#each`. - # - # @note `a += b` is **not** a **thread-safe** operation on - # `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` - # which is concatenation of `a` and `b`, then it writes the concatenation to `a`. - # The read and write are independent operations they do not form a single atomic - # operation therefore when two `+=` operations are executed concurrently updates - # may be lost. Use `#concat` instead. - # - # @see http://ruby-doc.org/core/Array.html Ruby standard library `Array` - - # @!macro internal_implementation_note - ArrayImplementation = case - when Concurrent.on_cruby? - # Array is not fully thread-safe on CRuby, see - # https://github.com/ruby-concurrency/concurrent-ruby/issues/929 - # So we will need to add synchronization here - ::Array - - when Concurrent.on_jruby? - require 'jruby/synchronized' - - class JRubyArray < ::Array - include JRuby::Synchronized - end - JRubyArray - - when Concurrent.on_truffleruby? - require 'concurrent/thread_safe/util/data_structures' - - class TruffleRubyArray < ::Array - end - - ThreadSafe::Util.make_synchronized_on_truffleruby TruffleRubyArray - TruffleRubyArray - - else - warn 'Possibly unsupported Ruby implementation' - ::Array - end - private_constant :ArrayImplementation - - # @!macro concurrent_array - class Array < ArrayImplementation - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/async.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/async.rb deleted file mode 100644 index 97c5a6b2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/async.rb +++ /dev/null @@ -1,449 +0,0 @@ -require 'concurrent/configuration' -require 'concurrent/ivar' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # A mixin module that provides simple asynchronous behavior to a class, - # turning it into a simple actor. Loosely based on Erlang's - # [gen_server](http://www.erlang.org/doc/man/gen_server.html), but without - # supervision or linking. - # - # A more feature-rich {Concurrent::Actor} is also available when the - # capabilities of `Async` are too limited. - # - # ```cucumber - # Feature: - # As a stateful, plain old Ruby class - # I want safe, asynchronous behavior - # So my long-running methods don't block the main thread - # ``` - # - # The `Async` module is a way to mix simple yet powerful asynchronous - # capabilities into any plain old Ruby object or class, turning each object - # into a simple Actor. Method calls are processed on a background thread. The - # caller is free to perform other actions while processing occurs in the - # background. - # - # Method calls to the asynchronous object are made via two proxy methods: - # `async` (alias `cast`) and `await` (alias `call`). These proxy methods post - # the method call to the object's background thread and return a "future" - # which will eventually contain the result of the method call. - # - # This behavior is loosely patterned after Erlang's `gen_server` behavior. - # When an Erlang module implements the `gen_server` behavior it becomes - # inherently asynchronous. The `start` or `start_link` function spawns a - # process (similar to a thread but much more lightweight and efficient) and - # returns the ID of the process. Using the process ID, other processes can - # send messages to the `gen_server` via the `cast` and `call` methods. Unlike - # Erlang's `gen_server`, however, `Async` classes do not support linking or - # supervision trees. - # - # ## Basic Usage - # - # When this module is mixed into a class, objects of the class become inherently - # asynchronous. Each object gets its own background thread on which to post - # asynchronous method calls. Asynchronous method calls are executed in the - # background one at a time in the order they are received. - # - # To create an asynchronous class, simply mix in the `Concurrent::Async` module: - # - # ``` - # class Hello - # include Concurrent::Async - # - # def hello(name) - # "Hello, #{name}!" - # end - # end - # ``` - # - # Mixing this module into a class provides each object two proxy methods: - # `async` and `await`. These methods are thread safe with respect to the - # enclosing object. The former proxy allows methods to be called - # asynchronously by posting to the object's internal thread. The latter proxy - # allows a method to be called synchronously but does so safely with respect - # to any pending asynchronous method calls and ensures proper ordering. Both - # methods return a {Concurrent::IVar} which can be inspected for the result - # of the proxied method call. Calling a method with `async` will return a - # `:pending` `IVar` whereas `await` will return a `:complete` `IVar`. - # - # ``` - # class Echo - # include Concurrent::Async - # - # def echo(msg) - # print "#{msg}\n" - # end - # end - # - # horn = Echo.new - # horn.echo('zero') # synchronous, not thread-safe - # # returns the actual return value of the method - # - # horn.async.echo('one') # asynchronous, non-blocking, thread-safe - # # returns an IVar in the :pending state - # - # horn.await.echo('two') # synchronous, blocking, thread-safe - # # returns an IVar in the :complete state - # ``` - # - # ## Let It Fail - # - # The `async` and `await` proxy methods have built-in error protection based - # on Erlang's famous "let it fail" philosophy. Instance methods should not be - # programmed defensively. When an exception is raised by a delegated method - # the proxy will rescue the exception, expose it to the caller as the `reason` - # attribute of the returned future, then process the next method call. - # - # ## Calling Methods Internally - # - # External method calls should *always* use the `async` and `await` proxy - # methods. When one method calls another method, the `async` proxy should - # rarely be used and the `await` proxy should *never* be used. - # - # When an object calls one of its own methods using the `await` proxy the - # second call will be enqueued *behind* the currently running method call. - # Any attempt to wait on the result will fail as the second call will never - # run until after the current call completes. - # - # Calling a method using the `await` proxy from within a method that was - # itself called using `async` or `await` will irreversibly deadlock the - # object. Do *not* do this, ever. - # - # ## Instance Variables and Attribute Accessors - # - # Instance variables do not need to be thread-safe so long as they are private. - # Asynchronous method calls are processed in the order they are received and - # are processed one at a time. Therefore private instance variables can only - # be accessed by one thread at a time. This is inherently thread-safe. - # - # When using private instance variables within asynchronous methods, the best - # practice is to read the instance variable into a local variable at the start - # of the method then update the instance variable at the *end* of the method. - # This way, should an exception be raised during method execution the internal - # state of the object will not have been changed. - # - # ### Reader Attributes - # - # The use of `attr_reader` is discouraged. Internal state exposed externally, - # when necessary, should be done through accessor methods. The instance - # variables exposed by these methods *must* be thread-safe, or they must be - # called using the `async` and `await` proxy methods. These two approaches are - # subtly different. - # - # When internal state is accessed via the `async` and `await` proxy methods, - # the returned value represents the object's state *at the time the call is - # processed*, which may *not* be the state of the object at the time the call - # is made. - # - # To get the state *at the current* time, irrespective of an enqueued method - # calls, a reader method must be called directly. This is inherently unsafe - # unless the instance variable is itself thread-safe, preferably using one - # of the thread-safe classes within this library. Because the thread-safe - # classes within this library are internally-locking or non-locking, they can - # be safely used from within asynchronous methods without causing deadlocks. - # - # Generally speaking, the best practice is to *not* expose internal state via - # reader methods. The best practice is to simply use the method's return value. - # - # ### Writer Attributes - # - # Writer attributes should never be used with asynchronous classes. Changing - # the state externally, even when done in the thread-safe way, is not logically - # consistent. Changes to state need to be timed with respect to all asynchronous - # method calls which my be in-process or enqueued. The only safe practice is to - # pass all necessary data to each method as arguments and let the method update - # the internal state as necessary. - # - # ## Class Constants, Variables, and Methods - # - # ### Class Constants - # - # Class constants do not need to be thread-safe. Since they are read-only and - # immutable they may be safely read both externally and from within - # asynchronous methods. - # - # ### Class Variables - # - # Class variables should be avoided. Class variables represent shared state. - # Shared state is anathema to concurrency. Should there be a need to share - # state using class variables they *must* be thread-safe, preferably - # using the thread-safe classes within this library. When updating class - # variables, never assign a new value/object to the variable itself. Assignment - # is not thread-safe in Ruby. Instead, use the thread-safe update functions - # of the variable itself to change the value. - # - # The best practice is to *never* use class variables with `Async` classes. - # - # ### Class Methods - # - # Class methods which are pure functions are safe. Class methods which modify - # class variables should be avoided, for all the reasons listed above. - # - # ## An Important Note About Thread Safe Guarantees - # - # > Thread safe guarantees can only be made when asynchronous method calls - # > are not mixed with direct method calls. Use only direct method calls - # > when the object is used exclusively on a single thread. Use only - # > `async` and `await` when the object is shared between threads. Once you - # > call a method using `async` or `await`, you should no longer call methods - # > directly on the object. Use `async` and `await` exclusively from then on. - # - # @example - # - # class Echo - # include Concurrent::Async - # - # def echo(msg) - # print "#{msg}\n" - # end - # end - # - # horn = Echo.new - # horn.echo('zero') # synchronous, not thread-safe - # # returns the actual return value of the method - # - # horn.async.echo('one') # asynchronous, non-blocking, thread-safe - # # returns an IVar in the :pending state - # - # horn.await.echo('two') # synchronous, blocking, thread-safe - # # returns an IVar in the :complete state - # - # @see Concurrent::Actor - # @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia - # @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server - # @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ - module Async - - # @!method self.new(*args, &block) - # - # Instantiate a new object and ensure proper initialization of the - # synchronization mechanisms. - # - # @param [Array] args Zero or more arguments to be passed to the - # object's initializer. - # @param [Proc] block Optional block to pass to the object's initializer. - # @return [Object] A properly initialized object of the asynchronous class. - - # Check for the presence of a method on an object and determine if a given - # set of arguments matches the required arity. - # - # @param [Object] obj the object to check against - # @param [Symbol] method the method to check the object for - # @param [Array] args zero or more arguments for the arity check - # - # @raise [NameError] the object does not respond to `method` method - # @raise [ArgumentError] the given `args` do not match the arity of `method` - # - # @note This check is imperfect because of the way Ruby reports the arity of - # methods with a variable number of arguments. It is possible to determine - # if too few arguments are given but impossible to determine if too many - # arguments are given. This check may also fail to recognize dynamic behavior - # of the object, such as methods simulated with `method_missing`. - # - # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity - # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? - # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing - # - # @!visibility private - def self.validate_argc(obj, method, *args) - argc = args.length - arity = obj.method(method).arity - - if arity >= 0 && argc != arity - raise ArgumentError.new("wrong number of arguments (#{argc} for #{arity})") - elsif arity < 0 && (arity = (arity + 1).abs) > argc - raise ArgumentError.new("wrong number of arguments (#{argc} for #{arity}..*)") - end - end - - # @!visibility private - def self.included(base) - base.singleton_class.send(:alias_method, :original_new, :new) - base.extend(ClassMethods) - super(base) - end - - # @!visibility private - module ClassMethods - def new(*args, &block) - obj = original_new(*args, &block) - obj.send(:init_synchronization) - obj - end - ruby2_keywords :new if respond_to?(:ruby2_keywords, true) - end - private_constant :ClassMethods - - # Delegates asynchronous, thread-safe method calls to the wrapped object. - # - # @!visibility private - class AsyncDelegator < Synchronization::LockableObject - safe_initialization! - - # Create a new delegator object wrapping the given delegate. - # - # @param [Object] delegate the object to wrap and delegate method calls to - def initialize(delegate) - super() - @delegate = delegate - @queue = [] - @executor = Concurrent.global_io_executor - @ruby_pid = $$ - end - - # Delegates method calls to the wrapped object. - # - # @param [Symbol] method the method being called - # @param [Array] args zero or more arguments to the method - # - # @return [IVar] the result of the method call - # - # @raise [NameError] the object does not respond to `method` method - # @raise [ArgumentError] the given `args` do not match the arity of `method` - def method_missing(method, *args, &block) - super unless @delegate.respond_to?(method) - Async::validate_argc(@delegate, method, *args) - - ivar = Concurrent::IVar.new - synchronize do - reset_if_forked - @queue.push [ivar, method, args, block] - @executor.post { perform } if @queue.length == 1 - end - - ivar - end - - # Check whether the method is responsive - # - # @param [Symbol] method the method being called - def respond_to_missing?(method, include_private = false) - @delegate.respond_to?(method) || super - end - - # Perform all enqueued tasks. - # - # This method must be called from within the executor. It must not be - # called while already running. It will loop until the queue is empty. - def perform - loop do - ivar, method, args, block = synchronize { @queue.first } - break unless ivar # queue is empty - - begin - ivar.set(@delegate.send(method, *args, &block)) - rescue => error - ivar.fail(error) - end - - synchronize do - @queue.shift - return if @queue.empty? - end - end - end - - def reset_if_forked - if $$ != @ruby_pid - @queue.clear - @ruby_pid = $$ - end - end - end - private_constant :AsyncDelegator - - # Delegates synchronous, thread-safe method calls to the wrapped object. - # - # @!visibility private - class AwaitDelegator - - # Create a new delegator object wrapping the given delegate. - # - # @param [AsyncDelegator] delegate the object to wrap and delegate method calls to - def initialize(delegate) - @delegate = delegate - end - - # Delegates method calls to the wrapped object. - # - # @param [Symbol] method the method being called - # @param [Array] args zero or more arguments to the method - # - # @return [IVar] the result of the method call - # - # @raise [NameError] the object does not respond to `method` method - # @raise [ArgumentError] the given `args` do not match the arity of `method` - def method_missing(method, *args, &block) - ivar = @delegate.send(method, *args, &block) - ivar.wait - ivar - end - - # Check whether the method is responsive - # - # @param [Symbol] method the method being called - def respond_to_missing?(method, include_private = false) - @delegate.respond_to?(method) || super - end - end - private_constant :AwaitDelegator - - # Causes the chained method call to be performed asynchronously on the - # object's thread. The delegated method will return a future in the - # `:pending` state and the method call will have been scheduled on the - # object's thread. The final disposition of the method call can be obtained - # by inspecting the returned future. - # - # @!macro async_thread_safety_warning - # @note The method call is guaranteed to be thread safe with respect to - # all other method calls against the same object that are called with - # either `async` or `await`. The mutable nature of Ruby references - # (and object orientation in general) prevent any other thread safety - # guarantees. Do NOT mix direct method calls with delegated method calls. - # Use *only* delegated method calls when sharing the object between threads. - # - # @return [Concurrent::IVar] the pending result of the asynchronous operation - # - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of - # the requested method - def async - @__async_delegator__ - end - alias_method :cast, :async - - # Causes the chained method call to be performed synchronously on the - # current thread. The delegated will return a future in either the - # `:fulfilled` or `:rejected` state and the delegated method will have - # completed. The final disposition of the delegated method can be obtained - # by inspecting the returned future. - # - # @!macro async_thread_safety_warning - # - # @return [Concurrent::IVar] the completed result of the synchronous operation - # - # @raise [NameError] the object does not respond to the requested method - # @raise [ArgumentError] the given `args` do not match the arity of the - # requested method - def await - @__await_delegator__ - end - alias_method :call, :await - - # Initialize the internal serializer and other stnchronization mechanisms. - # - # @note This method *must* be called immediately upon object construction. - # This is the only way thread-safe initialization can be guaranteed. - # - # @!visibility private - def init_synchronization - return self if defined?(@__async_initialized__) && @__async_initialized__ - @__async_initialized__ = true - @__async_delegator__ = AsyncDelegator.new(self) - @__await_delegator__ = AwaitDelegator.new(@__async_delegator__) - self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atom.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atom.rb deleted file mode 100644 index f590a23d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atom.rb +++ /dev/null @@ -1,222 +0,0 @@ -require 'concurrent/atomic/atomic_reference' -require 'concurrent/collection/copy_on_notify_observer_set' -require 'concurrent/concern/observable' -require 'concurrent/synchronization/object' - -# @!macro thread_safe_variable_comparison -# -# ## Thread-safe Variable Classes -# -# Each of the thread-safe variable classes is designed to solve a different -# problem. In general: -# -# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, -# uncoordinated, *asynchronous* change of individual values. Best used when -# the value will undergo frequent, complex updates. Suitable when the result -# of an update does not need to be known immediately. -# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, -# uncoordinated, *synchronous* change of individual values. Best used when -# the value will undergo frequent reads but only occasional, though complex, -# updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated -# atomically. Updates are synchronous but fast. Best used when updates a -# simple set operations. Not suitable when updates are complex. -# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar -# but optimized for the given data type. -# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used -# when two or more threads need to exchange data. The threads will pair then -# block on each other until the exchange is complete. -# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread -# must give a value to another, which must take the value. The threads will -# block on each other until the exchange is complete. -# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which -# holds a different value for each thread which has access. Often used as -# an instance variable in objects which must maintain different state -# for different threads. -# * *{Concurrent::TVar}:* Shared, mutable variables which provide -# *coordinated*, *synchronous*, change of *many* stated. Used when multiple -# value must change together, in an all-or-nothing transaction. - - -module Concurrent - - # Atoms provide a way to manage shared, synchronous, independent state. - # - # An atom is initialized with an initial value and an optional validation - # proc. At any time the value of the atom can be synchronously and safely - # changed. If a validator is given at construction then any new value - # will be checked against the validator and will be rejected if the - # validator returns false or raises an exception. - # - # There are two ways to change the value of an atom: {#compare_and_set} and - # {#swap}. The former will set the new value if and only if it validates and - # the current value matches the new value. The latter will atomically set the - # new value to the result of running the given block if and only if that - # value validates. - # - # ## Example - # - # ``` - # def next_fibonacci(set = nil) - # return [0, 1] if set.nil? - # set + [set[-2..-1].reduce{|sum,x| sum + x }] - # end - # - # # create an atom with an initial value - # atom = Concurrent::Atom.new(next_fibonacci) - # - # # send a few update requests - # 5.times do - # atom.swap{|set| next_fibonacci(set) } - # end - # - # # get the current value - # atom.value #=> [0, 1, 1, 2, 3, 5, 8] - # ``` - # - # ## Observation - # - # Atoms support observers through the {Concurrent::Observable} mixin module. - # Notification of observers occurs every time the value of the Atom changes. - # When notified the observer will receive three arguments: `time`, `old_value`, - # and `new_value`. The `time` argument is the time at which the value change - # occurred. The `old_value` is the value of the Atom when the change began - # The `new_value` is the value to which the Atom was set when the change - # completed. Note that `old_value` and `new_value` may be the same. This is - # not an error. It simply means that the change operation returned the same - # value. - # - # Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. - # - # @!macro thread_safe_variable_comparison - # - # @see http://clojure.org/atoms Clojure Atoms - # @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State - class Atom < Synchronization::Object - include Concern::Observable - - safe_initialization! - attr_atomic(:value) - private :value=, :swap_value, :compare_and_set_value, :update_value - public :value - alias_method :deref, :value - - # @!method value - # The current value of the atom. - # - # @return [Object] The current value. - - # Create a new atom with the given initial value. - # - # @param [Object] value The initial value - # @param [Hash] opts The options used to configure the atom - # @option opts [Proc] :validator (nil) Optional proc used to validate new - # values. It must accept one and only one argument which will be the - # intended new value. The validator will return true if the new value - # is acceptable else return false (preferably) or raise an exception. - # - # @!macro deref_options - # - # @raise [ArgumentError] if the validator is not a `Proc` (when given) - def initialize(value, opts = {}) - super() - @Validator = opts.fetch(:validator, -> v { true }) - self.observers = Collection::CopyOnNotifyObserverSet.new - self.value = value - end - - # Atomically swaps the value of atom using the given block. The current - # value will be passed to the block, as will any arguments passed as - # arguments to the function. The new value will be validated against the - # (optional) validator proc given at construction. If validation fails the - # value will not be changed. - # - # Internally, {#swap} reads the current value, applies the block to it, and - # attempts to compare-and-set it in. Since another thread may have changed - # the value in the intervening time, it may have to retry, and does so in a - # spin loop. The net effect is that the value will always be the result of - # the application of the supplied block to a current value, atomically. - # However, because the block might be called multiple times, it must be free - # of side effects. - # - # @note The given block may be called multiple times, and thus should be free - # of side effects. - # - # @param [Object] args Zero or more arguments passed to the block. - # - # @yield [value, args] Calculates a new value for the atom based on the - # current value and any supplied arguments. - # @yieldparam value [Object] The current value of the atom. - # @yieldparam args [Object] All arguments passed to the function, in order. - # @yieldreturn [Object] The intended new value of the atom. - # - # @return [Object] The final value of the atom after all operations and - # validations are complete. - # - # @raise [ArgumentError] When no block is given. - def swap(*args) - raise ArgumentError.new('no block given') unless block_given? - - loop do - old_value = value - new_value = yield(old_value, *args) - begin - break old_value unless valid?(new_value) - break new_value if compare_and_set(old_value, new_value) - rescue - break old_value - end - end - end - - # Atomically sets the value of atom to the new value if and only if the - # current value of the atom is identical to the old value and the new - # value successfully validates against the (optional) validator given - # at construction. - # - # @param [Object] old_value The expected current value. - # @param [Object] new_value The intended new value. - # - # @return [Boolean] True if the value is changed else false. - def compare_and_set(old_value, new_value) - if valid?(new_value) && compare_and_set_value(old_value, new_value) - observers.notify_observers(Time.now, old_value, new_value) - true - else - false - end - end - - # Atomically sets the value of atom to the new value without regard for the - # current value so long as the new value successfully validates against the - # (optional) validator given at construction. - # - # @param [Object] new_value The intended new value. - # - # @return [Object] The final value of the atom after all operations and - # validations are complete. - def reset(new_value) - old_value = value - if valid?(new_value) - self.value = new_value - observers.notify_observers(Time.now, old_value, new_value) - new_value - else - old_value - end - end - - private - - # Is the new value valid? - # - # @param [Object] new_value The intended new value. - # @return [Boolean] false if the validator function returns false or raises - # an exception else true - def valid?(new_value) - @Validator.call(new_value) - rescue - false - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb deleted file mode 100644 index f775691a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb +++ /dev/null @@ -1,127 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first - -require 'concurrent/atomic/mutex_atomic_boolean' - -module Concurrent - - ################################################################### - - # @!macro atomic_boolean_method_initialize - # - # Creates a new `AtomicBoolean` with the given initial value. - # - # @param [Boolean] initial the initial value - - # @!macro atomic_boolean_method_value_get - # - # Retrieves the current `Boolean` value. - # - # @return [Boolean] the current value - - # @!macro atomic_boolean_method_value_set - # - # Explicitly sets the value. - # - # @param [Boolean] value the new value to be set - # - # @return [Boolean] the current value - - # @!macro atomic_boolean_method_true_question - # - # Is the current value `true` - # - # @return [Boolean] true if the current value is `true`, else false - - # @!macro atomic_boolean_method_false_question - # - # Is the current value `false` - # - # @return [Boolean] true if the current value is `false`, else false - - # @!macro atomic_boolean_method_make_true - # - # Explicitly sets the value to true. - # - # @return [Boolean] true if value has changed, otherwise false - - # @!macro atomic_boolean_method_make_false - # - # Explicitly sets the value to false. - # - # @return [Boolean] true if value has changed, otherwise false - - ################################################################### - - # @!macro atomic_boolean_public_api - # - # @!method initialize(initial = false) - # @!macro atomic_boolean_method_initialize - # - # @!method value - # @!macro atomic_boolean_method_value_get - # - # @!method value=(value) - # @!macro atomic_boolean_method_value_set - # - # @!method true? - # @!macro atomic_boolean_method_true_question - # - # @!method false? - # @!macro atomic_boolean_method_false_question - # - # @!method make_true - # @!macro atomic_boolean_method_make_true - # - # @!method make_false - # @!macro atomic_boolean_method_make_false - - ################################################################### - - # @!visibility private - # @!macro internal_implementation_note - AtomicBooleanImplementation = case - when Concurrent.on_cruby? && Concurrent.c_extensions_loaded? - CAtomicBoolean - when Concurrent.on_jruby? - JavaAtomicBoolean - else - MutexAtomicBoolean - end - private_constant :AtomicBooleanImplementation - - # @!macro atomic_boolean - # - # A boolean value that can be updated atomically. Reads and writes to an atomic - # boolean and thread-safe and guaranteed to succeed. Reads and writes may block - # briefly but no explicit locking is required. - # - # @!macro thread_safe_variable_comparison - # - # Performance: - # - # ``` - # Testing with ruby 2.1.2 - # Testing with Concurrent::MutexAtomicBoolean... - # 2.790000 0.000000 2.790000 ( 2.791454) - # Testing with Concurrent::CAtomicBoolean... - # 0.740000 0.000000 0.740000 ( 0.740206) - # - # Testing with jruby 1.9.3 - # Testing with Concurrent::MutexAtomicBoolean... - # 5.240000 2.520000 7.760000 ( 3.683000) - # Testing with Concurrent::JavaAtomicBoolean... - # 3.340000 0.010000 3.350000 ( 0.855000) - # ``` - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean - # - # @!macro atomic_boolean_public_api - class AtomicBoolean < AtomicBooleanImplementation - # @return [String] Short string representation. - def to_s - format '%s value:%s>', super[0..-2], value - end - - alias_method :inspect, :to_s - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb deleted file mode 100644 index 26cd05d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb +++ /dev/null @@ -1,144 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first - -require 'concurrent/atomic/mutex_atomic_fixnum' - -module Concurrent - - ################################################################### - - # @!macro atomic_fixnum_method_initialize - # - # Creates a new `AtomicFixnum` with the given initial value. - # - # @param [Fixnum] initial the initial value - # @raise [ArgumentError] if the initial value is not a `Fixnum` - - # @!macro atomic_fixnum_method_value_get - # - # Retrieves the current `Fixnum` value. - # - # @return [Fixnum] the current value - - # @!macro atomic_fixnum_method_value_set - # - # Explicitly sets the value. - # - # @param [Fixnum] value the new value to be set - # - # @return [Fixnum] the current value - # - # @raise [ArgumentError] if the new value is not a `Fixnum` - - # @!macro atomic_fixnum_method_increment - # - # Increases the current value by the given amount (defaults to 1). - # - # @param [Fixnum] delta the amount by which to increase the current value - # - # @return [Fixnum] the current value after incrementation - - # @!macro atomic_fixnum_method_decrement - # - # Decreases the current value by the given amount (defaults to 1). - # - # @param [Fixnum] delta the amount by which to decrease the current value - # - # @return [Fixnum] the current value after decrementation - - # @!macro atomic_fixnum_method_compare_and_set - # - # Atomically sets the value to the given updated value if the current - # value == the expected value. - # - # @param [Fixnum] expect the expected value - # @param [Fixnum] update the new value - # - # @return [Boolean] true if the value was updated else false - - # @!macro atomic_fixnum_method_update - # - # Pass the current value to the given block, replacing it - # with the block's result. May retry if the value changes - # during the block's execution. - # - # @yield [Object] Calculate a new value for the atomic reference using - # given (old) value - # @yieldparam [Object] old_value the starting value of the atomic reference - # - # @return [Object] the new value - - ################################################################### - - # @!macro atomic_fixnum_public_api - # - # @!method initialize(initial = 0) - # @!macro atomic_fixnum_method_initialize - # - # @!method value - # @!macro atomic_fixnum_method_value_get - # - # @!method value=(value) - # @!macro atomic_fixnum_method_value_set - # - # @!method increment(delta = 1) - # @!macro atomic_fixnum_method_increment - # - # @!method decrement(delta = 1) - # @!macro atomic_fixnum_method_decrement - # - # @!method compare_and_set(expect, update) - # @!macro atomic_fixnum_method_compare_and_set - # - # @!method update - # @!macro atomic_fixnum_method_update - - ################################################################### - - # @!visibility private - # @!macro internal_implementation_note - AtomicFixnumImplementation = case - when Concurrent.on_cruby? && Concurrent.c_extensions_loaded? - CAtomicFixnum - when Concurrent.on_jruby? - JavaAtomicFixnum - else - MutexAtomicFixnum - end - private_constant :AtomicFixnumImplementation - - # @!macro atomic_fixnum - # - # A numeric value that can be updated atomically. Reads and writes to an atomic - # fixnum and thread-safe and guaranteed to succeed. Reads and writes may block - # briefly but no explicit locking is required. - # - # @!macro thread_safe_variable_comparison - # - # Performance: - # - # ``` - # Testing with ruby 2.1.2 - # Testing with Concurrent::MutexAtomicFixnum... - # 3.130000 0.000000 3.130000 ( 3.136505) - # Testing with Concurrent::CAtomicFixnum... - # 0.790000 0.000000 0.790000 ( 0.785550) - # - # Testing with jruby 1.9.3 - # Testing with Concurrent::MutexAtomicFixnum... - # 5.460000 2.460000 7.920000 ( 3.715000) - # Testing with Concurrent::JavaAtomicFixnum... - # 4.520000 0.030000 4.550000 ( 1.187000) - # ``` - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong - # - # @!macro atomic_fixnum_public_api - class AtomicFixnum < AtomicFixnumImplementation - # @return [String] Short string representation. - def to_s - format '%s value:%s>', super[0..-2], value - end - - alias_method :inspect, :to_s - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb deleted file mode 100644 index e16be657..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'concurrent/errors' -require 'concurrent/synchronization/object' - -module Concurrent - # An atomic reference which maintains an object reference along with a mark bit - # that can be updated atomically. - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html - # java.util.concurrent.atomic.AtomicMarkableReference - class AtomicMarkableReference < ::Concurrent::Synchronization::Object - - attr_atomic(:reference) - private :reference, :reference=, :swap_reference, :compare_and_set_reference, :update_reference - - def initialize(value = nil, mark = false) - super() - self.reference = immutable_array(value, mark) - end - - # Atomically sets the value and mark to the given updated value and - # mark given both: - # - the current value == the expected value && - # - the current mark == the expected mark - # - # @param [Object] expected_val the expected value - # @param [Object] new_val the new value - # @param [Boolean] expected_mark the expected mark - # @param [Boolean] new_mark the new mark - # - # @return [Boolean] `true` if successful. A `false` return indicates - # that the actual value was not equal to the expected value or the - # actual mark was not equal to the expected mark - def compare_and_set(expected_val, new_val, expected_mark, new_mark) - # Memoize a valid reference to the current AtomicReference for - # later comparison. - current = reference - curr_val, curr_mark = current - - # Ensure that that the expected marks match. - return false unless expected_mark == curr_mark - - if expected_val.is_a? Numeric - # If the object is a numeric, we need to ensure we are comparing - # the numerical values - return false unless expected_val == curr_val - else - # Otherwise, we need to ensure we are comparing the object identity. - # Theoretically, this could be incorrect if a user monkey-patched - # `Object#equal?`, but they should know that they are playing with - # fire at that point. - return false unless expected_val.equal? curr_val - end - - prospect = immutable_array(new_val, new_mark) - - compare_and_set_reference current, prospect - end - - alias_method :compare_and_swap, :compare_and_set - - # Gets the current reference and marked values. - # - # @return [Array] the current reference and marked values - def get - reference - end - - # Gets the current value of the reference - # - # @return [Object] the current value of the reference - def value - reference[0] - end - - # Gets the current marked value - # - # @return [Boolean] the current marked value - def mark - reference[1] - end - - alias_method :marked?, :mark - - # _Unconditionally_ sets to the given value of both the reference and - # the mark. - # - # @param [Object] new_val the new value - # @param [Boolean] new_mark the new mark - # - # @return [Array] both the new value and the new mark - def set(new_val, new_mark) - self.reference = immutable_array(new_val, new_mark) - end - - # Pass the current value and marked state to the given block, replacing it - # with the block's results. May retry if the value changes during the - # block's execution. - # - # @yield [Object] Calculate a new value and marked state for the atomic - # reference using given (old) value and (old) marked - # @yieldparam [Object] old_val the starting value of the atomic reference - # @yieldparam [Boolean] old_mark the starting state of marked - # - # @return [Array] the new value and new mark - def update - loop do - old_val, old_mark = reference - new_val, new_mark = yield old_val, old_mark - - if compare_and_set old_val, new_val, old_mark, new_mark - return immutable_array(new_val, new_mark) - end - end - end - - # Pass the current value to the given block, replacing it - # with the block's result. Raise an exception if the update - # fails. - # - # @yield [Object] Calculate a new value and marked state for the atomic - # reference using given (old) value and (old) marked - # @yieldparam [Object] old_val the starting value of the atomic reference - # @yieldparam [Boolean] old_mark the starting state of marked - # - # @return [Array] the new value and marked state - # - # @raise [Concurrent::ConcurrentUpdateError] if the update fails - def try_update! - old_val, old_mark = reference - new_val, new_mark = yield old_val, old_mark - - unless compare_and_set old_val, new_val, old_mark, new_mark - fail ::Concurrent::ConcurrentUpdateError, - 'AtomicMarkableReference: Update failed due to race condition.', - 'Note: If you would like to guarantee an update, please use ' + - 'the `AtomicMarkableReference#update` method.' - end - - immutable_array(new_val, new_mark) - end - - # Pass the current value to the given block, replacing it with the - # block's result. Simply return nil if update fails. - # - # @yield [Object] Calculate a new value and marked state for the atomic - # reference using given (old) value and (old) marked - # @yieldparam [Object] old_val the starting value of the atomic reference - # @yieldparam [Boolean] old_mark the starting state of marked - # - # @return [Array] the new value and marked state, or nil if - # the update failed - def try_update - old_val, old_mark = reference - new_val, new_mark = yield old_val, old_mark - - return unless compare_and_set old_val, new_val, old_mark, new_mark - - immutable_array(new_val, new_mark) - end - - private - - def immutable_array(*args) - args.freeze - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb deleted file mode 100644 index bb5fb774..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb +++ /dev/null @@ -1,135 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first - -require 'concurrent/atomic_reference/atomic_direct_update' -require 'concurrent/atomic_reference/numeric_cas_wrapper' -require 'concurrent/atomic_reference/mutex_atomic' - -# Shim for TruffleRuby::AtomicReference -if Concurrent.on_truffleruby? && !defined?(TruffleRuby::AtomicReference) - # @!visibility private - module TruffleRuby - AtomicReference = Truffle::AtomicReference - end -end - -module Concurrent - - # @!macro internal_implementation_note - AtomicReferenceImplementation = case - when Concurrent.on_cruby? && Concurrent.c_extensions_loaded? - # @!visibility private - # @!macro internal_implementation_note - class CAtomicReference - include AtomicDirectUpdate - include AtomicNumericCompareAndSetWrapper - alias_method :compare_and_swap, :compare_and_set - end - CAtomicReference - when Concurrent.on_jruby? - # @!visibility private - # @!macro internal_implementation_note - class JavaAtomicReference - include AtomicDirectUpdate - end - JavaAtomicReference - when Concurrent.on_truffleruby? - class TruffleRubyAtomicReference < TruffleRuby::AtomicReference - include AtomicDirectUpdate - alias_method :value, :get - alias_method :value=, :set - alias_method :compare_and_swap, :compare_and_set - alias_method :swap, :get_and_set - end - TruffleRubyAtomicReference - else - MutexAtomicReference - end - private_constant :AtomicReferenceImplementation - - # An object reference that may be updated atomically. All read and write - # operations have java volatile semantic. - # - # @!macro thread_safe_variable_comparison - # - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html - # - # @!method initialize(value = nil) - # @!macro atomic_reference_method_initialize - # @param [Object] value The initial value. - # - # @!method get - # @!macro atomic_reference_method_get - # Gets the current value. - # @return [Object] the current value - # - # @!method set(new_value) - # @!macro atomic_reference_method_set - # Sets to the given value. - # @param [Object] new_value the new value - # @return [Object] the new value - # - # @!method get_and_set(new_value) - # @!macro atomic_reference_method_get_and_set - # Atomically sets to the given value and returns the old value. - # @param [Object] new_value the new value - # @return [Object] the old value - # - # @!method compare_and_set(old_value, new_value) - # @!macro atomic_reference_method_compare_and_set - # - # Atomically sets the value to the given updated value if - # the current value == the expected value. - # - # @param [Object] old_value the expected value - # @param [Object] new_value the new value - # - # @return [Boolean] `true` if successful. A `false` return indicates - # that the actual value was not equal to the expected value. - # - # @!method update - # Pass the current value to the given block, replacing it - # with the block's result. May retry if the value changes - # during the block's execution. - # - # @yield [Object] Calculate a new value for the atomic reference using - # given (old) value - # @yieldparam [Object] old_value the starting value of the atomic reference - # @return [Object] the new value - # - # @!method try_update - # Pass the current value to the given block, replacing it - # with the block's result. Return nil if the update fails. - # - # @yield [Object] Calculate a new value for the atomic reference using - # given (old) value - # @yieldparam [Object] old_value the starting value of the atomic reference - # @note This method was altered to avoid raising an exception by default. - # Instead, this method now returns `nil` in case of failure. For more info, - # please see: https://github.com/ruby-concurrency/concurrent-ruby/pull/336 - # @return [Object] the new value, or nil if update failed - # - # @!method try_update! - # Pass the current value to the given block, replacing it - # with the block's result. Raise an exception if the update - # fails. - # - # @yield [Object] Calculate a new value for the atomic reference using - # given (old) value - # @yieldparam [Object] old_value the starting value of the atomic reference - # @note This behavior mimics the behavior of the original - # `AtomicReference#try_update` API. The reason this was changed was to - # avoid raising exceptions (which are inherently slow) by default. For more - # info: https://github.com/ruby-concurrency/concurrent-ruby/pull/336 - # @return [Object] the new value - # @raise [Concurrent::ConcurrentUpdateError] if the update fails - class AtomicReference < AtomicReferenceImplementation - - # @return [String] Short string representation. - def to_s - format '%s value:%s>', super[0..-2], get - end - - alias_method :inspect, :to_s - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb deleted file mode 100644 index d883aed6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb +++ /dev/null @@ -1,100 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/atomic/mutex_count_down_latch' -require 'concurrent/atomic/java_count_down_latch' - -module Concurrent - - ################################################################### - - # @!macro count_down_latch_method_initialize - # - # Create a new `CountDownLatch` with the initial `count`. - # - # @param [new] count the initial count - # - # @raise [ArgumentError] if `count` is not an integer or is less than zero - - # @!macro count_down_latch_method_wait - # - # Block on the latch until the counter reaches zero or until `timeout` is reached. - # - # @param [Fixnum] timeout the number of seconds to wait for the counter or `nil` - # to block indefinitely - # @return [Boolean] `true` if the `count` reaches zero else false on `timeout` - - # @!macro count_down_latch_method_count_down - # - # Signal the latch to decrement the counter. Will signal all blocked threads when - # the `count` reaches zero. - - # @!macro count_down_latch_method_count - # - # The current value of the counter. - # - # @return [Fixnum] the current value of the counter - - ################################################################### - - # @!macro count_down_latch_public_api - # - # @!method initialize(count = 1) - # @!macro count_down_latch_method_initialize - # - # @!method wait(timeout = nil) - # @!macro count_down_latch_method_wait - # - # @!method count_down - # @!macro count_down_latch_method_count_down - # - # @!method count - # @!macro count_down_latch_method_count - - ################################################################### - - # @!visibility private - # @!macro internal_implementation_note - CountDownLatchImplementation = case - when Concurrent.on_jruby? - JavaCountDownLatch - else - MutexCountDownLatch - end - private_constant :CountDownLatchImplementation - - # @!macro count_down_latch - # - # A synchronization object that allows one thread to wait on multiple other threads. - # The thread that will wait creates a `CountDownLatch` and sets the initial value - # (normally equal to the number of other threads). The initiating thread passes the - # latch to the other threads then waits for the other threads by calling the `#wait` - # method. Each of the other threads calls `#count_down` when done with its work. - # When the latch counter reaches zero the waiting thread is unblocked and continues - # with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. - # - # @!macro count_down_latch_public_api - # @example Waiter and Decrementer - # latch = Concurrent::CountDownLatch.new(3) - # - # waiter = Thread.new do - # latch.wait() - # puts ("Waiter released") - # end - # - # decrementer = Thread.new do - # sleep(1) - # latch.count_down - # puts latch.count - # - # sleep(1) - # latch.count_down - # puts latch.count - # - # sleep(1) - # latch.count_down - # puts latch.count - # end - # - # [waiter, decrementer].each(&:join) - class CountDownLatch < CountDownLatchImplementation - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb deleted file mode 100644 index 9ebe29dd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb +++ /dev/null @@ -1,128 +0,0 @@ -require 'concurrent/synchronization/lockable_object' -require 'concurrent/utility/native_integer' - -module Concurrent - - # A synchronization aid that allows a set of threads to all wait for each - # other to reach a common barrier point. - # @example - # barrier = Concurrent::CyclicBarrier.new(3) - # jobs = Array.new(3) { |i| -> { sleep i; p done: i } } - # process = -> (i) do - # # waiting to start at the same time - # barrier.wait - # # execute job - # jobs[i].call - # # wait for others to finish - # barrier.wait - # end - # threads = 2.times.map do |i| - # Thread.new(i, &process) - # end - # - # # use main as well - # process.call 2 - # - # # here we can be sure that all jobs are processed - class CyclicBarrier < Synchronization::LockableObject - - # @!visibility private - Generation = Struct.new(:status) - private_constant :Generation - - # Create a new `CyclicBarrier` that waits for `parties` threads - # - # @param [Fixnum] parties the number of parties - # @yield an optional block that will be executed that will be executed after - # the last thread arrives and before the others are released - # - # @raise [ArgumentError] if `parties` is not an integer or is less than zero - def initialize(parties, &block) - Utility::NativeInteger.ensure_integer_and_bounds parties - Utility::NativeInteger.ensure_positive_and_no_zero parties - - super(&nil) - synchronize { ns_initialize parties, &block } - end - - # @return [Fixnum] the number of threads needed to pass the barrier - def parties - synchronize { @parties } - end - - # @return [Fixnum] the number of threads currently waiting on the barrier - def number_waiting - synchronize { @number_waiting } - end - - # Blocks on the barrier until the number of waiting threads is equal to - # `parties` or until `timeout` is reached or `reset` is called - # If a block has been passed to the constructor, it will be executed once by - # the last arrived thread before releasing the others - # @param [Fixnum] timeout the number of seconds to wait for the counter or - # `nil` to block indefinitely - # @return [Boolean] `true` if the `count` reaches zero else false on - # `timeout` or on `reset` or if the barrier is broken - def wait(timeout = nil) - synchronize do - - return false unless @generation.status == :waiting - - @number_waiting += 1 - - if @number_waiting == @parties - @action.call if @action - ns_generation_done @generation, :fulfilled - true - else - generation = @generation - if ns_wait_until(timeout) { generation.status != :waiting } - generation.status == :fulfilled - else - ns_generation_done generation, :broken, false - false - end - end - end - end - - # resets the barrier to its initial state - # If there is at least one waiting thread, it will be woken up, the `wait` - # method will return false and the barrier will be broken - # If the barrier is broken, this method restores it to the original state - # - # @return [nil] - def reset - synchronize { ns_generation_done @generation, :reset } - end - - # A barrier can be broken when: - # - a thread called the `reset` method while at least one other thread was waiting - # - at least one thread timed out on `wait` method - # - # A broken barrier can be restored using `reset` it's safer to create a new one - # @return [Boolean] true if the barrier is broken otherwise false - def broken? - synchronize { @generation.status != :waiting } - end - - protected - - def ns_generation_done(generation, status, continue = true) - generation.status = status - ns_next_generation if continue - ns_broadcast - end - - def ns_next_generation - @generation = Generation.new(:waiting) - @number_waiting = 0 - end - - def ns_initialize(parties, &block) - @parties = parties - @action = block - ns_next_generation - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/event.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/event.rb deleted file mode 100644 index ccf84c9d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/event.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'thread' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # Old school kernel-style event reminiscent of Win32 programming in C++. - # - # When an `Event` is created it is in the `unset` state. Threads can choose to - # `#wait` on the event, blocking until released by another thread. When one - # thread wants to alert all blocking threads it calls the `#set` method which - # will then wake up all listeners. Once an `Event` has been set it remains set. - # New threads calling `#wait` will return immediately. An `Event` may be - # `#reset` at any time once it has been set. - # - # @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx - # @example - # event = Concurrent::Event.new - # - # t1 = Thread.new do - # puts "t1 is waiting" - # event.wait(1) - # puts "event occurred" - # end - # - # t2 = Thread.new do - # puts "t2 calling set" - # event.set - # end - # - # [t1, t2].each(&:join) - # - # # prints: - # # t1 is waiting - # # t2 calling set - # # event occurred - class Event < Synchronization::LockableObject - - # Creates a new `Event` in the unset state. Threads calling `#wait` on the - # `Event` will block. - def initialize - super - synchronize { ns_initialize } - end - - # Is the object in the set state? - # - # @return [Boolean] indicating whether or not the `Event` has been set - def set? - synchronize { @set } - end - - # Trigger the event, setting the state to `set` and releasing all threads - # waiting on the event. Has no effect if the `Event` has already been set. - # - # @return [Boolean] should always return `true` - def set - synchronize { ns_set } - end - - def try? - synchronize { @set ? false : ns_set } - end - - # Reset a previously set event back to the `unset` state. - # Has no effect if the `Event` has not yet been set. - # - # @return [Boolean] should always return `true` - def reset - synchronize do - if @set - @set = false - @iteration +=1 - end - true - end - end - - # Wait a given number of seconds for the `Event` to be set by another - # thread. Will wait forever when no `timeout` value is given. Returns - # immediately if the `Event` has already been set. - # - # @return [Boolean] true if the `Event` was set before timeout else false - def wait(timeout = nil) - synchronize do - unless @set - iteration = @iteration - ns_wait_until(timeout) { iteration < @iteration || @set } - else - true - end - end - end - - protected - - def ns_set - unless @set - @set = true - ns_broadcast - end - true - end - - def ns_initialize - @set = false - @iteration = 0 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb deleted file mode 100644 index e90fc24f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'concurrent/constants' -require_relative 'locals' - -module Concurrent - - # A `FiberLocalVar` is a variable where the value is different for each fiber. - # Each variable may have a default value, but when you modify the variable only - # the current fiber will ever see that change. - # - # This is similar to Ruby's built-in fiber-local variables (`Thread.current[:name]`), - # but with these major advantages: - # * `FiberLocalVar` has its own identity, it doesn't need a Symbol. - # * Each Ruby's built-in fiber-local variable leaks some memory forever (it's a Symbol held forever on the fiber), - # so it's only OK to create a small amount of them. - # `FiberLocalVar` has no such issue and it is fine to create many of them. - # * Ruby's built-in fiber-local variables leak forever the value set on each fiber (unless set to nil explicitly). - # `FiberLocalVar` automatically removes the mapping for each fiber once the `FiberLocalVar` instance is GC'd. - # - # @example - # v = FiberLocalVar.new(14) - # v.value #=> 14 - # v.value = 2 - # v.value #=> 2 - # - # @example - # v = FiberLocalVar.new(14) - # - # Fiber.new do - # v.value #=> 14 - # v.value = 1 - # v.value #=> 1 - # end.resume - # - # Fiber.new do - # v.value #=> 14 - # v.value = 2 - # v.value #=> 2 - # end.resume - # - # v.value #=> 14 - class FiberLocalVar - LOCALS = FiberLocals.new - - # Creates a fiber local variable. - # - # @param [Object] default the default value when otherwise unset - # @param [Proc] default_block Optional block that gets called to obtain the - # default value for each fiber - def initialize(default = nil, &default_block) - if default && block_given? - raise ArgumentError, "Cannot use both value and block as default value" - end - - if block_given? - @default_block = default_block - @default = nil - else - @default_block = nil - @default = default - end - - @index = LOCALS.next_index(self) - end - - # Returns the value in the current fiber's copy of this fiber-local variable. - # - # @return [Object] the current value - def value - LOCALS.fetch(@index) { default } - end - - # Sets the current fiber's copy of this fiber-local variable to the specified value. - # - # @param [Object] value the value to set - # @return [Object] the new value - def value=(value) - LOCALS.set(@index, value) - end - - # Bind the given value to fiber local storage during - # execution of the given block. - # - # @param [Object] value the value to bind - # @yield the operation to be performed with the bound variable - # @return [Object] the value - def bind(value) - if block_given? - old_value = self.value - self.value = value - begin - yield - ensure - self.value = old_value - end - end - end - - protected - - # @!visibility private - def default - if @default_block - self.value = @default_block.call - else - @default - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/java_count_down_latch.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/java_count_down_latch.rb deleted file mode 100644 index 3c119bc3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/java_count_down_latch.rb +++ /dev/null @@ -1,43 +0,0 @@ -if Concurrent.on_jruby? - require 'concurrent/utility/native_extension_loader' - - module Concurrent - - # @!macro count_down_latch - # @!visibility private - # @!macro internal_implementation_note - class JavaCountDownLatch - - # @!macro count_down_latch_method_initialize - def initialize(count = 1) - Utility::NativeInteger.ensure_integer_and_bounds(count) - Utility::NativeInteger.ensure_positive(count) - @latch = java.util.concurrent.CountDownLatch.new(count) - end - - # @!macro count_down_latch_method_wait - def wait(timeout = nil) - result = nil - if timeout.nil? - Synchronization::JRuby.sleep_interruptibly { @latch.await } - result = true - else - Synchronization::JRuby.sleep_interruptibly do - result = @latch.await(1000 * timeout, java.util.concurrent.TimeUnit::MILLISECONDS) - end - end - result - end - - # @!macro count_down_latch_method_count_down - def count_down - @latch.countDown - end - - # @!macro count_down_latch_method_count - def count - @latch.getCount - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/locals.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/locals.rb deleted file mode 100644 index 0a276aed..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/locals.rb +++ /dev/null @@ -1,189 +0,0 @@ -require 'fiber' -require 'concurrent/utility/engine' -require 'concurrent/constants' - -module Concurrent - # @!visibility private - # @!macro internal_implementation_note - # - # An abstract implementation of local storage, with sub-classes for - # per-thread and per-fiber locals. - # - # Each execution context (EC, thread or fiber) has a lazily initialized array - # of local variable values. Each time a new local variable is created, we - # allocate an "index" for it. - # - # For example, if the allocated index is 1, that means slot #1 in EVERY EC's - # locals array will be used for the value of that variable. - # - # The good thing about using a per-EC structure to hold values, rather than - # a global, is that no synchronization is needed when reading and writing - # those values (since the structure is only ever accessed by a single - # thread). - # - # Of course, when a local variable is GC'd, 1) we need to recover its index - # for use by other new local variables (otherwise the locals arrays could - # get bigger and bigger with time), and 2) we need to null out all the - # references held in the now-unused slots (both to avoid blocking GC of those - # objects, and also to prevent "stale" values from being passed on to a new - # local when the index is reused). - # - # Because we need to null out freed slots, we need to keep references to - # ALL the locals arrays, so we can null out the appropriate slots in all of - # them. This is why we need to use a finalizer to clean up the locals array - # when the EC goes out of scope. - class AbstractLocals - def initialize - @free = [] - @lock = Mutex.new - @all_arrays = {} - @next = 0 - end - - def synchronize - @lock.synchronize { yield } - end - - if Concurrent.on_cruby? - def weak_synchronize - yield - end - else - alias_method :weak_synchronize, :synchronize - end - - def next_index(local) - index = synchronize do - if @free.empty? - @next += 1 - else - @free.pop - end - end - - # When the local goes out of scope, we should free the associated index - # and all values stored into it. - ObjectSpace.define_finalizer(local, local_finalizer(index)) - - index - end - - def free_index(index) - weak_synchronize do - # The cost of GC'ing a TLV is linear in the number of ECs using local - # variables. But that is natural! More ECs means more storage is used - # per local variable. So naturally more CPU time is required to free - # more storage. - # - # DO NOT use each_value which might conflict with new pair assignment - # into the hash in #set method. - @all_arrays.values.each do |locals| - locals[index] = nil - end - - # free index has to be published after the arrays are cleared: - @free << index - end - end - - def fetch(index) - locals = self.locals - value = locals ? locals[index] : nil - - if nil == value - yield - elsif NULL.equal?(value) - nil - else - value - end - end - - def set(index, value) - locals = self.locals! - locals[index] = (nil == value ? NULL : value) - - value - end - - private - - # When the local goes out of scope, clean up that slot across all locals currently assigned. - def local_finalizer(index) - proc do - free_index(index) - end - end - - # When a thread/fiber goes out of scope, remove the array from @all_arrays. - def thread_fiber_finalizer(array_object_id) - proc do - weak_synchronize do - @all_arrays.delete(array_object_id) - end - end - end - - # Returns the locals for the current scope, or nil if none exist. - def locals - raise NotImplementedError - end - - # Returns the locals for the current scope, creating them if necessary. - def locals! - raise NotImplementedError - end - end - - # @!visibility private - # @!macro internal_implementation_note - # An array-backed storage of indexed variables per thread. - class ThreadLocals < AbstractLocals - def locals - Thread.current.thread_variable_get(:concurrent_thread_locals) - end - - def locals! - thread = Thread.current - locals = thread.thread_variable_get(:concurrent_thread_locals) - - unless locals - locals = thread.thread_variable_set(:concurrent_thread_locals, []) - weak_synchronize do - @all_arrays[locals.object_id] = locals - end - # When the thread goes out of scope, we should delete the associated locals: - ObjectSpace.define_finalizer(thread, thread_fiber_finalizer(locals.object_id)) - end - - locals - end - end - - # @!visibility private - # @!macro internal_implementation_note - # An array-backed storage of indexed variables per fiber. - class FiberLocals < AbstractLocals - def locals - Thread.current[:concurrent_fiber_locals] - end - - def locals! - thread = Thread.current - locals = thread[:concurrent_fiber_locals] - - unless locals - locals = thread[:concurrent_fiber_locals] = [] - weak_synchronize do - @all_arrays[locals.object_id] = locals - end - # When the fiber goes out of scope, we should delete the associated locals: - ObjectSpace.define_finalizer(Fiber.current, thread_fiber_finalizer(locals.object_id)) - end - - locals - end - end - - private_constant :AbstractLocals, :ThreadLocals, :FiberLocals -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb deleted file mode 100644 index ebf23a24..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'concurrent/utility/engine' -require_relative 'fiber_local_var' -require_relative 'thread_local_var' - -module Concurrent - # @!visibility private - def self.mutex_owned_per_thread? - return false if Concurrent.on_jruby? || Concurrent.on_truffleruby? - - mutex = Mutex.new - # Lock the mutex: - mutex.synchronize do - # Check if the mutex is still owned in a child fiber: - Fiber.new { mutex.owned? }.resume - end - end - - if mutex_owned_per_thread? - LockLocalVar = ThreadLocalVar - else - LockLocalVar = FiberLocalVar - end - - # Either {FiberLocalVar} or {ThreadLocalVar} depending on whether Mutex (and Monitor) - # are held, respectively, per Fiber or per Thread. - class LockLocalVar - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb deleted file mode 100644 index 015996b0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb +++ /dev/null @@ -1,68 +0,0 @@ -require 'concurrent/synchronization/safe_initialization' - -module Concurrent - - # @!macro atomic_boolean - # @!visibility private - # @!macro internal_implementation_note - class MutexAtomicBoolean - extend Concurrent::Synchronization::SafeInitialization - - # @!macro atomic_boolean_method_initialize - def initialize(initial = false) - super() - @Lock = ::Mutex.new - @value = !!initial - end - - # @!macro atomic_boolean_method_value_get - def value - synchronize { @value } - end - - # @!macro atomic_boolean_method_value_set - def value=(value) - synchronize { @value = !!value } - end - - # @!macro atomic_boolean_method_true_question - def true? - synchronize { @value } - end - - # @!macro atomic_boolean_method_false_question - def false? - synchronize { !@value } - end - - # @!macro atomic_boolean_method_make_true - def make_true - synchronize { ns_make_value(true) } - end - - # @!macro atomic_boolean_method_make_false - def make_false - synchronize { ns_make_value(false) } - end - - protected - - # @!visibility private - def synchronize - if @Lock.owned? - yield - else - @Lock.synchronize { yield } - end - end - - private - - # @!visibility private - def ns_make_value(value) - old = @value - @value = value - old != @value - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb deleted file mode 100644 index 0ca39557..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb +++ /dev/null @@ -1,81 +0,0 @@ -require 'concurrent/synchronization/safe_initialization' -require 'concurrent/utility/native_integer' - -module Concurrent - - # @!macro atomic_fixnum - # @!visibility private - # @!macro internal_implementation_note - class MutexAtomicFixnum - extend Concurrent::Synchronization::SafeInitialization - - # @!macro atomic_fixnum_method_initialize - def initialize(initial = 0) - super() - @Lock = ::Mutex.new - ns_set(initial) - end - - # @!macro atomic_fixnum_method_value_get - def value - synchronize { @value } - end - - # @!macro atomic_fixnum_method_value_set - def value=(value) - synchronize { ns_set(value) } - end - - # @!macro atomic_fixnum_method_increment - def increment(delta = 1) - synchronize { ns_set(@value + delta.to_i) } - end - - alias_method :up, :increment - - # @!macro atomic_fixnum_method_decrement - def decrement(delta = 1) - synchronize { ns_set(@value - delta.to_i) } - end - - alias_method :down, :decrement - - # @!macro atomic_fixnum_method_compare_and_set - def compare_and_set(expect, update) - synchronize do - if @value == expect.to_i - @value = update.to_i - true - else - false - end - end - end - - # @!macro atomic_fixnum_method_update - def update - synchronize do - @value = yield @value - end - end - - protected - - # @!visibility private - def synchronize - if @Lock.owned? - yield - else - @Lock.synchronize { yield } - end - end - - private - - # @!visibility private - def ns_set(value) - Utility::NativeInteger.ensure_integer_and_bounds value - @value = value - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb deleted file mode 100644 index 29aa1caa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'concurrent/synchronization/lockable_object' -require 'concurrent/utility/native_integer' - -module Concurrent - - # @!macro count_down_latch - # @!visibility private - # @!macro internal_implementation_note - class MutexCountDownLatch < Synchronization::LockableObject - - # @!macro count_down_latch_method_initialize - def initialize(count = 1) - Utility::NativeInteger.ensure_integer_and_bounds count - Utility::NativeInteger.ensure_positive count - - super() - synchronize { ns_initialize count } - end - - # @!macro count_down_latch_method_wait - def wait(timeout = nil) - synchronize { ns_wait_until(timeout) { @count == 0 } } - end - - # @!macro count_down_latch_method_count_down - def count_down - synchronize do - @count -= 1 if @count > 0 - ns_broadcast if @count == 0 - end - end - - # @!macro count_down_latch_method_count - def count - synchronize { @count } - end - - protected - - def ns_initialize(count) - @count = count - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb deleted file mode 100644 index 4347289f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb +++ /dev/null @@ -1,131 +0,0 @@ -require 'concurrent/synchronization/lockable_object' -require 'concurrent/utility/native_integer' - -module Concurrent - - # @!macro semaphore - # @!visibility private - # @!macro internal_implementation_note - class MutexSemaphore < Synchronization::LockableObject - - # @!macro semaphore_method_initialize - def initialize(count) - Utility::NativeInteger.ensure_integer_and_bounds count - - super() - synchronize { ns_initialize count } - end - - # @!macro semaphore_method_acquire - def acquire(permits = 1) - Utility::NativeInteger.ensure_integer_and_bounds permits - Utility::NativeInteger.ensure_positive permits - - synchronize do - try_acquire_timed(permits, nil) - end - - return unless block_given? - - begin - yield - ensure - release(permits) - end - end - - # @!macro semaphore_method_available_permits - def available_permits - synchronize { @free } - end - - # @!macro semaphore_method_drain_permits - # - # Acquires and returns all permits that are immediately available. - # - # @return [Integer] - def drain_permits - synchronize do - @free.tap { |_| @free = 0 } - end - end - - # @!macro semaphore_method_try_acquire - def try_acquire(permits = 1, timeout = nil) - Utility::NativeInteger.ensure_integer_and_bounds permits - Utility::NativeInteger.ensure_positive permits - - acquired = synchronize do - if timeout.nil? - try_acquire_now(permits) - else - try_acquire_timed(permits, timeout) - end - end - - return acquired unless block_given? - return unless acquired - - begin - yield - ensure - release(permits) - end - end - - # @!macro semaphore_method_release - def release(permits = 1) - Utility::NativeInteger.ensure_integer_and_bounds permits - Utility::NativeInteger.ensure_positive permits - - synchronize do - @free += permits - permits.times { ns_signal } - end - nil - end - - # Shrinks the number of available permits by the indicated reduction. - # - # @param [Fixnum] reduction Number of permits to remove. - # - # @raise [ArgumentError] if `reduction` is not an integer or is negative - # - # @raise [ArgumentError] if `@free` - `@reduction` is less than zero - # - # @return [nil] - # - # @!visibility private - def reduce_permits(reduction) - Utility::NativeInteger.ensure_integer_and_bounds reduction - Utility::NativeInteger.ensure_positive reduction - - synchronize { @free -= reduction } - nil - end - - protected - - # @!visibility private - def ns_initialize(count) - @free = count - end - - private - - # @!visibility private - def try_acquire_now(permits) - if @free >= permits - @free -= permits - true - else - false - end - end - - # @!visibility private - def try_acquire_timed(permits, timeout) - ns_wait_until(timeout) { try_acquire_now(permits) } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb deleted file mode 100644 index b26bd17a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb +++ /dev/null @@ -1,255 +0,0 @@ -require 'thread' -require 'concurrent/atomic/atomic_fixnum' -require 'concurrent/errors' -require 'concurrent/synchronization/object' -require 'concurrent/synchronization/lock' - -module Concurrent - - # Ruby read-write lock implementation - # - # Allows any number of concurrent readers, but only one concurrent writer - # (And if the "write" lock is taken, any readers who come along will have to wait) - # - # If readers are already active when a writer comes along, the writer will wait for - # all the readers to finish before going ahead. - # Any additional readers that come when the writer is already waiting, will also - # wait (so writers are not starved). - # - # This implementation is based on `java.util.concurrent.ReentrantReadWriteLock`. - # - # @example - # lock = Concurrent::ReadWriteLock.new - # lock.with_read_lock { data.retrieve } - # lock.with_write_lock { data.modify! } - # - # @note Do **not** try to acquire the write lock while already holding a read lock - # **or** try to acquire the write lock while you already have it. - # This will lead to deadlock - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock - class ReadWriteLock < Synchronization::Object - - # @!visibility private - WAITING_WRITER = 1 << 15 - - # @!visibility private - RUNNING_WRITER = 1 << 29 - - # @!visibility private - MAX_READERS = WAITING_WRITER - 1 - - # @!visibility private - MAX_WRITERS = RUNNING_WRITER - MAX_READERS - 1 - - safe_initialization! - - # Implementation notes: - # A goal is to make the uncontended path for both readers/writers lock-free - # Only if there is reader-writer or writer-writer contention, should locks be used - # Internal state is represented by a single integer ("counter"), and updated - # using atomic compare-and-swap operations - # When the counter is 0, the lock is free - # Each reader increments the counter by 1 when acquiring a read lock - # (and decrements by 1 when releasing the read lock) - # The counter is increased by (1 << 15) for each writer waiting to acquire the - # write lock, and by (1 << 29) if the write lock is taken - - # Create a new `ReadWriteLock` in the unlocked state. - def initialize - super() - @Counter = AtomicFixnum.new(0) # single integer which represents lock state - @ReadLock = Synchronization::Lock.new - @WriteLock = Synchronization::Lock.new - end - - # Execute a block operation within a read lock. - # - # @yield the task to be performed within the lock. - # - # @return [Object] the result of the block operation. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - def with_read_lock - raise ArgumentError.new('no block given') unless block_given? - acquire_read_lock - begin - yield - ensure - release_read_lock - end - end - - # Execute a block operation within a write lock. - # - # @yield the task to be performed within the lock. - # - # @return [Object] the result of the block operation. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - def with_write_lock - raise ArgumentError.new('no block given') unless block_given? - acquire_write_lock - begin - yield - ensure - release_write_lock - end - end - - # Acquire a read lock. If a write lock has been acquired will block until - # it is released. Will not block if other read locks have been acquired. - # - # @return [Boolean] true if the lock is successfully acquired - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - def acquire_read_lock - while true - c = @Counter.value - raise ResourceLimitError.new('Too many reader threads') if max_readers?(c) - - # If a writer is waiting when we first queue up, we need to wait - if waiting_writer?(c) - @ReadLock.wait_until { !waiting_writer? } - - # after a reader has waited once, they are allowed to "barge" ahead of waiting writers - # but if a writer is *running*, the reader still needs to wait (naturally) - while true - c = @Counter.value - if running_writer?(c) - @ReadLock.wait_until { !running_writer? } - else - return if @Counter.compare_and_set(c, c+1) - end - end - else - break if @Counter.compare_and_set(c, c+1) - end - end - true - end - - # Release a previously acquired read lock. - # - # @return [Boolean] true if the lock is successfully released - def release_read_lock - while true - c = @Counter.value - if @Counter.compare_and_set(c, c-1) - # If one or more writers were waiting, and we were the last reader, wake a writer up - if waiting_writer?(c) && running_readers(c) == 1 - @WriteLock.signal - end - break - end - end - true - end - - # Acquire a write lock. Will block and wait for all active readers and writers. - # - # @return [Boolean] true if the lock is successfully acquired - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of writers - # is exceeded. - def acquire_write_lock - while true - c = @Counter.value - raise ResourceLimitError.new('Too many writer threads') if max_writers?(c) - - if c == 0 # no readers OR writers running - # if we successfully swap the RUNNING_WRITER bit on, then we can go ahead - break if @Counter.compare_and_set(0, RUNNING_WRITER) - elsif @Counter.compare_and_set(c, c+WAITING_WRITER) - while true - # Now we have successfully incremented, so no more readers will be able to increment - # (they will wait instead) - # However, readers OR writers could decrement right here, OR another writer could increment - @WriteLock.wait_until do - # So we have to do another check inside the synchronized section - # If a writer OR reader is running, then go to sleep - c = @Counter.value - !running_writer?(c) && !running_readers?(c) - end - - # We just came out of a wait - # If we successfully turn the RUNNING_WRITER bit on with an atomic swap, - # Then we are OK to stop waiting and go ahead - # Otherwise go back and wait again - c = @Counter.value - break if !running_writer?(c) && !running_readers?(c) && @Counter.compare_and_set(c, c+RUNNING_WRITER-WAITING_WRITER) - end - break - end - end - true - end - - # Release a previously acquired write lock. - # - # @return [Boolean] true if the lock is successfully released - def release_write_lock - return true unless running_writer? - c = @Counter.update { |counter| counter - RUNNING_WRITER } - @ReadLock.broadcast - @WriteLock.signal if waiting_writers(c) > 0 - true - end - - # Queries if the write lock is held by any thread. - # - # @return [Boolean] true if the write lock is held else false` - def write_locked? - @Counter.value >= RUNNING_WRITER - end - - # Queries whether any threads are waiting to acquire the read or write lock. - # - # @return [Boolean] true if any threads are waiting for a lock else false - def has_waiters? - waiting_writer?(@Counter.value) - end - - private - - # @!visibility private - def running_readers(c = @Counter.value) - c & MAX_READERS - end - - # @!visibility private - def running_readers?(c = @Counter.value) - (c & MAX_READERS) > 0 - end - - # @!visibility private - def running_writer?(c = @Counter.value) - c >= RUNNING_WRITER - end - - # @!visibility private - def waiting_writers(c = @Counter.value) - (c & MAX_WRITERS) / WAITING_WRITER - end - - # @!visibility private - def waiting_writer?(c = @Counter.value) - c >= WAITING_WRITER - end - - # @!visibility private - def max_readers?(c = @Counter.value) - (c & MAX_READERS) == MAX_READERS - end - - # @!visibility private - def max_writers?(c = @Counter.value) - (c & MAX_WRITERS) == MAX_WRITERS - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb deleted file mode 100644 index 6d72a3a0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb +++ /dev/null @@ -1,379 +0,0 @@ -require 'thread' -require 'concurrent/atomic/atomic_reference' -require 'concurrent/atomic/atomic_fixnum' -require 'concurrent/errors' -require 'concurrent/synchronization/object' -require 'concurrent/synchronization/lock' -require 'concurrent/atomic/lock_local_var' - -module Concurrent - - # Re-entrant read-write lock implementation - # - # Allows any number of concurrent readers, but only one concurrent writer - # (And while the "write" lock is taken, no read locks can be obtained either. - # Hence, the write lock can also be called an "exclusive" lock.) - # - # If another thread has taken a read lock, any thread which wants a write lock - # will block until all the readers release their locks. However, once a thread - # starts waiting to obtain a write lock, any additional readers that come along - # will also wait (so writers are not starved). - # - # A thread can acquire both a read and write lock at the same time. A thread can - # also acquire a read lock OR a write lock more than once. Only when the read (or - # write) lock is released as many times as it was acquired, will the thread - # actually let it go, allowing other threads which might have been waiting - # to proceed. Therefore the lock can be upgraded by first acquiring - # read lock and then write lock and that the lock can be downgraded by first - # having both read and write lock a releasing just the write lock. - # - # If both read and write locks are acquired by the same thread, it is not strictly - # necessary to release them in the same order they were acquired. In other words, - # the following code is legal: - # - # @example - # lock = Concurrent::ReentrantReadWriteLock.new - # lock.acquire_write_lock - # lock.acquire_read_lock - # lock.release_write_lock - # # At this point, the current thread is holding only a read lock, not a write - # # lock. So other threads can take read locks, but not a write lock. - # lock.release_read_lock - # # Now the current thread is not holding either a read or write lock, so - # # another thread could potentially acquire a write lock. - # - # This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. - # - # @example - # lock = Concurrent::ReentrantReadWriteLock.new - # lock.with_read_lock { data.retrieve } - # lock.with_write_lock { data.modify! } - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock - class ReentrantReadWriteLock < Synchronization::Object - - # Implementation notes: - # - # A goal is to make the uncontended path for both readers/writers mutex-free - # Only if there is reader-writer or writer-writer contention, should mutexes be used - # Otherwise, a single CAS operation is all we need to acquire/release a lock - # - # Internal state is represented by a single integer ("counter"), and updated - # using atomic compare-and-swap operations - # When the counter is 0, the lock is free - # Each thread which has one OR MORE read locks increments the counter by 1 - # (and decrements by 1 when releasing the read lock) - # The counter is increased by (1 << 15) for each writer waiting to acquire the - # write lock, and by (1 << 29) if the write lock is taken - # - # Additionally, each thread uses a thread-local variable to count how many times - # it has acquired a read lock, AND how many times it has acquired a write lock. - # It uses a similar trick; an increment of 1 means a read lock was taken, and - # an increment of (1 << 15) means a write lock was taken - # This is what makes re-entrancy possible - # - # 2 rules are followed to ensure good liveness properties: - # 1) Once a writer has queued up and is waiting for a write lock, no other thread - # can take a lock without waiting - # 2) When a write lock is released, readers are given the "first chance" to wake - # up and acquire a read lock - # Following these rules means readers and writers tend to "take turns", so neither - # can starve the other, even under heavy contention - - # @!visibility private - READER_BITS = 15 - # @!visibility private - WRITER_BITS = 14 - - # Used with @Counter: - # @!visibility private - WAITING_WRITER = 1 << READER_BITS - # @!visibility private - RUNNING_WRITER = 1 << (READER_BITS + WRITER_BITS) - # @!visibility private - MAX_READERS = WAITING_WRITER - 1 - # @!visibility private - MAX_WRITERS = RUNNING_WRITER - MAX_READERS - 1 - - # Used with @HeldCount: - # @!visibility private - WRITE_LOCK_HELD = 1 << READER_BITS - # @!visibility private - READ_LOCK_MASK = WRITE_LOCK_HELD - 1 - # @!visibility private - WRITE_LOCK_MASK = MAX_WRITERS - - safe_initialization! - - # Create a new `ReentrantReadWriteLock` in the unlocked state. - def initialize - super() - @Counter = AtomicFixnum.new(0) # single integer which represents lock state - @ReadQueue = Synchronization::Lock.new # used to queue waiting readers - @WriteQueue = Synchronization::Lock.new # used to queue waiting writers - @HeldCount = LockLocalVar.new(0) # indicates # of R & W locks held by this thread - end - - # Execute a block operation within a read lock. - # - # @yield the task to be performed within the lock. - # - # @return [Object] the result of the block operation. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - def with_read_lock - raise ArgumentError.new('no block given') unless block_given? - acquire_read_lock - begin - yield - ensure - release_read_lock - end - end - - # Execute a block operation within a write lock. - # - # @yield the task to be performed within the lock. - # - # @return [Object] the result of the block operation. - # - # @raise [ArgumentError] when no block is given. - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - def with_write_lock - raise ArgumentError.new('no block given') unless block_given? - acquire_write_lock - begin - yield - ensure - release_write_lock - end - end - - # Acquire a read lock. If a write lock is held by another thread, will block - # until it is released. - # - # @return [Boolean] true if the lock is successfully acquired - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of readers - # is exceeded. - def acquire_read_lock - if (held = @HeldCount.value) > 0 - # If we already have a lock, there's no need to wait - if held & READ_LOCK_MASK == 0 - # But we do need to update the counter, if we were holding a write - # lock but not a read lock - @Counter.update { |c| c + 1 } - end - @HeldCount.value = held + 1 - return true - end - - while true - c = @Counter.value - raise ResourceLimitError.new('Too many reader threads') if max_readers?(c) - - # If a writer is waiting OR running when we first queue up, we need to wait - if waiting_or_running_writer?(c) - # Before going to sleep, check again with the ReadQueue mutex held - @ReadQueue.synchronize do - @ReadQueue.ns_wait if waiting_or_running_writer? - end - # Note: the above 'synchronize' block could have used #wait_until, - # but that waits repeatedly in a loop, checking the wait condition - # each time it wakes up (to protect against spurious wakeups) - # But we are already in a loop, which is only broken when we successfully - # acquire the lock! So we don't care about spurious wakeups, and would - # rather not pay the extra overhead of using #wait_until - - # After a reader has waited once, they are allowed to "barge" ahead of waiting writers - # But if a writer is *running*, the reader still needs to wait (naturally) - while true - c = @Counter.value - if running_writer?(c) - @ReadQueue.synchronize do - @ReadQueue.ns_wait if running_writer? - end - elsif @Counter.compare_and_set(c, c+1) - @HeldCount.value = held + 1 - return true - end - end - elsif @Counter.compare_and_set(c, c+1) - @HeldCount.value = held + 1 - return true - end - end - end - - # Try to acquire a read lock and return true if we succeed. If it cannot be - # acquired immediately, return false. - # - # @return [Boolean] true if the lock is successfully acquired - def try_read_lock - if (held = @HeldCount.value) > 0 - if held & READ_LOCK_MASK == 0 - # If we hold a write lock, but not a read lock... - @Counter.update { |c| c + 1 } - end - @HeldCount.value = held + 1 - return true - else - c = @Counter.value - if !waiting_or_running_writer?(c) && @Counter.compare_and_set(c, c+1) - @HeldCount.value = held + 1 - return true - end - end - false - end - - # Release a previously acquired read lock. - # - # @return [Boolean] true if the lock is successfully released - def release_read_lock - held = @HeldCount.value = @HeldCount.value - 1 - rlocks_held = held & READ_LOCK_MASK - if rlocks_held == 0 - c = @Counter.update { |counter| counter - 1 } - # If one or more writers were waiting, and we were the last reader, wake a writer up - if waiting_or_running_writer?(c) && running_readers(c) == 0 - @WriteQueue.signal - end - elsif rlocks_held == READ_LOCK_MASK - raise IllegalOperationError, "Cannot release a read lock which is not held" - end - true - end - - # Acquire a write lock. Will block and wait for all active readers and writers. - # - # @return [Boolean] true if the lock is successfully acquired - # - # @raise [Concurrent::ResourceLimitError] if the maximum number of writers - # is exceeded. - def acquire_write_lock - if (held = @HeldCount.value) >= WRITE_LOCK_HELD - # if we already have a write (exclusive) lock, there's no need to wait - @HeldCount.value = held + WRITE_LOCK_HELD - return true - end - - while true - c = @Counter.value - raise ResourceLimitError.new('Too many writer threads') if max_writers?(c) - - # To go ahead and take the lock without waiting, there must be no writer - # running right now, AND no writers who came before us still waiting to - # acquire the lock - # Additionally, if any read locks have been taken, we must hold all of them - if held > 0 && @Counter.compare_and_set(1, c+RUNNING_WRITER) - # If we are the only one reader and successfully swap the RUNNING_WRITER bit on, then we can go ahead - @HeldCount.value = held + WRITE_LOCK_HELD - return true - elsif @Counter.compare_and_set(c, c+WAITING_WRITER) - while true - # Now we have successfully incremented, so no more readers will be able to increment - # (they will wait instead) - # However, readers OR writers could decrement right here - @WriteQueue.synchronize do - # So we have to do another check inside the synchronized section - # If a writer OR another reader is running, then go to sleep - c = @Counter.value - @WriteQueue.ns_wait if running_writer?(c) || running_readers(c) != held - end - # Note: if you are thinking of replacing the above 'synchronize' block - # with #wait_until, read the comment in #acquire_read_lock first! - - # We just came out of a wait - # If we successfully turn the RUNNING_WRITER bit on with an atomic swap, - # then we are OK to stop waiting and go ahead - # Otherwise go back and wait again - c = @Counter.value - if !running_writer?(c) && - running_readers(c) == held && - @Counter.compare_and_set(c, c+RUNNING_WRITER-WAITING_WRITER) - @HeldCount.value = held + WRITE_LOCK_HELD - return true - end - end - end - end - end - - # Try to acquire a write lock and return true if we succeed. If it cannot be - # acquired immediately, return false. - # - # @return [Boolean] true if the lock is successfully acquired - def try_write_lock - if (held = @HeldCount.value) >= WRITE_LOCK_HELD - @HeldCount.value = held + WRITE_LOCK_HELD - return true - else - c = @Counter.value - if !waiting_or_running_writer?(c) && - running_readers(c) == held && - @Counter.compare_and_set(c, c+RUNNING_WRITER) - @HeldCount.value = held + WRITE_LOCK_HELD - return true - end - end - false - end - - # Release a previously acquired write lock. - # - # @return [Boolean] true if the lock is successfully released - def release_write_lock - held = @HeldCount.value = @HeldCount.value - WRITE_LOCK_HELD - wlocks_held = held & WRITE_LOCK_MASK - if wlocks_held == 0 - c = @Counter.update { |counter| counter - RUNNING_WRITER } - @ReadQueue.broadcast - @WriteQueue.signal if waiting_writers(c) > 0 - elsif wlocks_held == WRITE_LOCK_MASK - raise IllegalOperationError, "Cannot release a write lock which is not held" - end - true - end - - private - - # @!visibility private - def running_readers(c = @Counter.value) - c & MAX_READERS - end - - # @!visibility private - def running_readers?(c = @Counter.value) - (c & MAX_READERS) > 0 - end - - # @!visibility private - def running_writer?(c = @Counter.value) - c >= RUNNING_WRITER - end - - # @!visibility private - def waiting_writers(c = @Counter.value) - (c & MAX_WRITERS) >> READER_BITS - end - - # @!visibility private - def waiting_or_running_writer?(c = @Counter.value) - c >= WAITING_WRITER - end - - # @!visibility private - def max_readers?(c = @Counter.value) - (c & MAX_READERS) == MAX_READERS - end - - # @!visibility private - def max_writers?(c = @Counter.value) - (c & MAX_WRITERS) == MAX_WRITERS - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/semaphore.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/semaphore.rb deleted file mode 100644 index f0799f0f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/semaphore.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'concurrent/atomic/mutex_semaphore' - -module Concurrent - - ################################################################### - - # @!macro semaphore_method_initialize - # - # Create a new `Semaphore` with the initial `count`. - # - # @param [Fixnum] count the initial count - # - # @raise [ArgumentError] if `count` is not an integer - - # @!macro semaphore_method_acquire - # - # Acquires the given number of permits from this semaphore, - # blocking until all are available. If a block is given, - # yields to it and releases the permits afterwards. - # - # @param [Fixnum] permits Number of permits to acquire - # - # @raise [ArgumentError] if `permits` is not an integer or is less than zero - # - # @return [nil, BasicObject] Without a block, `nil` is returned. If a block - # is given, its return value is returned. - - # @!macro semaphore_method_available_permits - # - # Returns the current number of permits available in this semaphore. - # - # @return [Integer] - - # @!macro semaphore_method_drain_permits - # - # Acquires and returns all permits that are immediately available. - # - # @return [Integer] - - # @!macro semaphore_method_try_acquire - # - # Acquires the given number of permits from this semaphore, - # only if all are available at the time of invocation or within - # `timeout` interval. If a block is given, yields to it if the permits - # were successfully acquired, and releases them afterward, returning the - # block's return value. - # - # @param [Fixnum] permits the number of permits to acquire - # - # @param [Fixnum] timeout the number of seconds to wait for the counter - # or `nil` to return immediately - # - # @raise [ArgumentError] if `permits` is not an integer or is less than zero - # - # @return [true, false, nil, BasicObject] `false` if no permits are - # available, `true` when acquired a permit. If a block is given, the - # block's return value is returned if the permits were acquired; if not, - # `nil` is returned. - - # @!macro semaphore_method_release - # - # Releases the given number of permits, returning them to the semaphore. - # - # @param [Fixnum] permits Number of permits to return to the semaphore. - # - # @raise [ArgumentError] if `permits` is not a number or is less than zero - # - # @return [nil] - - ################################################################### - - # @!macro semaphore_public_api - # - # @!method initialize(count) - # @!macro semaphore_method_initialize - # - # @!method acquire(permits = 1) - # @!macro semaphore_method_acquire - # - # @!method available_permits - # @!macro semaphore_method_available_permits - # - # @!method drain_permits - # @!macro semaphore_method_drain_permits - # - # @!method try_acquire(permits = 1, timeout = nil) - # @!macro semaphore_method_try_acquire - # - # @!method release(permits = 1) - # @!macro semaphore_method_release - - ################################################################### - - # @!visibility private - # @!macro internal_implementation_note - SemaphoreImplementation = if Concurrent.on_jruby? - require 'concurrent/utility/native_extension_loader' - JavaSemaphore - else - MutexSemaphore - end - private_constant :SemaphoreImplementation - - # @!macro semaphore - # - # A counting semaphore. Conceptually, a semaphore maintains a set of - # permits. Each {#acquire} blocks if necessary until a permit is - # available, and then takes it. Each {#release} adds a permit, potentially - # releasing a blocking acquirer. - # However, no actual permit objects are used; the Semaphore just keeps a - # count of the number available and acts accordingly. - # Alternatively, permits may be acquired within a block, and automatically - # released after the block finishes executing. - # - # @!macro semaphore_public_api - # @example - # semaphore = Concurrent::Semaphore.new(2) - # - # t1 = Thread.new do - # semaphore.acquire - # puts "Thread 1 acquired semaphore" - # end - # - # t2 = Thread.new do - # semaphore.acquire - # puts "Thread 2 acquired semaphore" - # end - # - # t3 = Thread.new do - # semaphore.acquire - # puts "Thread 3 acquired semaphore" - # end - # - # t4 = Thread.new do - # sleep(2) - # puts "Thread 4 releasing semaphore" - # semaphore.release - # end - # - # [t1, t2, t3, t4].each(&:join) - # - # # prints: - # # Thread 3 acquired semaphore - # # Thread 2 acquired semaphore - # # Thread 4 releasing semaphore - # # Thread 1 acquired semaphore - # - # @example - # semaphore = Concurrent::Semaphore.new(1) - # - # puts semaphore.available_permits - # semaphore.acquire do - # puts semaphore.available_permits - # end - # puts semaphore.available_permits - # - # # prints: - # # 1 - # # 0 - # # 1 - class Semaphore < SemaphoreImplementation - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb deleted file mode 100644 index 3b7e12b5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb +++ /dev/null @@ -1,111 +0,0 @@ -require 'concurrent/constants' -require_relative 'locals' - -module Concurrent - - # A `ThreadLocalVar` is a variable where the value is different for each thread. - # Each variable may have a default value, but when you modify the variable only - # the current thread will ever see that change. - # - # This is similar to Ruby's built-in thread-local variables (`Thread#thread_variable_get`), - # but with these major advantages: - # * `ThreadLocalVar` has its own identity, it doesn't need a Symbol. - # * Each Ruby's built-in thread-local variable leaks some memory forever (it's a Symbol held forever on the thread), - # so it's only OK to create a small amount of them. - # `ThreadLocalVar` has no such issue and it is fine to create many of them. - # * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). - # `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. - # - # @!macro thread_safe_variable_comparison - # - # @example - # v = ThreadLocalVar.new(14) - # v.value #=> 14 - # v.value = 2 - # v.value #=> 2 - # - # @example - # v = ThreadLocalVar.new(14) - # - # t1 = Thread.new do - # v.value #=> 14 - # v.value = 1 - # v.value #=> 1 - # end - # - # t2 = Thread.new do - # v.value #=> 14 - # v.value = 2 - # v.value #=> 2 - # end - # - # v.value #=> 14 - class ThreadLocalVar - LOCALS = ThreadLocals.new - - # Creates a thread local variable. - # - # @param [Object] default the default value when otherwise unset - # @param [Proc] default_block Optional block that gets called to obtain the - # default value for each thread - def initialize(default = nil, &default_block) - if default && block_given? - raise ArgumentError, "Cannot use both value and block as default value" - end - - if block_given? - @default_block = default_block - @default = nil - else - @default_block = nil - @default = default - end - - @index = LOCALS.next_index(self) - end - - # Returns the value in the current thread's copy of this thread-local variable. - # - # @return [Object] the current value - def value - LOCALS.fetch(@index) { default } - end - - # Sets the current thread's copy of this thread-local variable to the specified value. - # - # @param [Object] value the value to set - # @return [Object] the new value - def value=(value) - LOCALS.set(@index, value) - end - - # Bind the given value to thread local storage during - # execution of the given block. - # - # @param [Object] value the value to bind - # @yield the operation to be performed with the bound variable - # @return [Object] the value - def bind(value) - if block_given? - old_value = self.value - self.value = value - begin - yield - ensure - self.value = old_value - end - end - end - - protected - - # @!visibility private - def default - if @default_block - self.value = @default_block.call - else - @default - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb deleted file mode 100644 index 5d2d7edd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'concurrent/errors' - -module Concurrent - - # Define update methods that use direct paths - # - # @!visibility private - # @!macro internal_implementation_note - module AtomicDirectUpdate - def update - true until compare_and_set(old_value = get, new_value = yield(old_value)) - new_value - end - - def try_update - old_value = get - new_value = yield old_value - - return unless compare_and_set old_value, new_value - - new_value - end - - def try_update! - old_value = get - new_value = yield old_value - unless compare_and_set(old_value, new_value) - if $VERBOSE - raise ConcurrentUpdateError, "Update failed" - else - raise ConcurrentUpdateError, "Update failed", ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE - end - end - new_value - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb deleted file mode 100644 index e5e2a637..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'concurrent/atomic_reference/atomic_direct_update' -require 'concurrent/atomic_reference/numeric_cas_wrapper' -require 'concurrent/synchronization/safe_initialization' - -module Concurrent - - # @!visibility private - # @!macro internal_implementation_note - class MutexAtomicReference - extend Concurrent::Synchronization::SafeInitialization - include AtomicDirectUpdate - include AtomicNumericCompareAndSetWrapper - alias_method :compare_and_swap, :compare_and_set - - # @!macro atomic_reference_method_initialize - def initialize(value = nil) - super() - @Lock = ::Mutex.new - @value = value - end - - # @!macro atomic_reference_method_get - def get - synchronize { @value } - end - alias_method :value, :get - - # @!macro atomic_reference_method_set - def set(new_value) - synchronize { @value = new_value } - end - alias_method :value=, :set - - # @!macro atomic_reference_method_get_and_set - def get_and_set(new_value) - synchronize do - old_value = @value - @value = new_value - old_value - end - end - alias_method :swap, :get_and_set - - # @!macro atomic_reference_method_compare_and_set - def _compare_and_set(old_value, new_value) - synchronize do - if @value.equal? old_value - @value = new_value - true - else - false - end - end - end - - protected - - # @!visibility private - def synchronize - if @Lock.owned? - yield - else - @Lock.synchronize { yield } - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb deleted file mode 100644 index 709a3822..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Concurrent - - # Special "compare and set" handling of numeric values. - # - # @!visibility private - # @!macro internal_implementation_note - module AtomicNumericCompareAndSetWrapper - - # @!macro atomic_reference_method_compare_and_set - def compare_and_set(old_value, new_value) - if old_value.kind_of? Numeric - while true - old = get - - return false unless old.kind_of? Numeric - - return false unless old == old_value - - result = _compare_and_set(old, new_value) - return result if result - end - else - _compare_and_set(old_value, new_value) - end - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomics.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomics.rb deleted file mode 100644 index 16cbe661..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/atomics.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'concurrent/atomic/atomic_reference' -require 'concurrent/atomic/atomic_boolean' -require 'concurrent/atomic/atomic_fixnum' -require 'concurrent/atomic/cyclic_barrier' -require 'concurrent/atomic/count_down_latch' -require 'concurrent/atomic/event' -require 'concurrent/atomic/read_write_lock' -require 'concurrent/atomic/reentrant_read_write_lock' -require 'concurrent/atomic/semaphore' -require 'concurrent/atomic/thread_local_var' diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb deleted file mode 100644 index 7c700bd7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb +++ /dev/null @@ -1,107 +0,0 @@ -require 'concurrent/synchronization/lockable_object' - -module Concurrent - module Collection - - # A thread safe observer set implemented using copy-on-read approach: - # observers are added and removed from a thread safe collection; every time - # a notification is required the internal data structure is copied to - # prevent concurrency issues - # - # @api private - class CopyOnNotifyObserverSet < Synchronization::LockableObject - - def initialize - super() - synchronize { ns_initialize } - end - - # @!macro observable_add_observer - def add_observer(observer = nil, func = :update, &block) - if observer.nil? && block.nil? - raise ArgumentError, 'should pass observer as a first argument or block' - elsif observer && block - raise ArgumentError.new('cannot provide both an observer and a block') - end - - if block - observer = block - func = :call - end - - synchronize do - @observers[observer] = func - observer - end - end - - # @!macro observable_delete_observer - def delete_observer(observer) - synchronize do - @observers.delete(observer) - observer - end - end - - # @!macro observable_delete_observers - def delete_observers - synchronize do - @observers.clear - self - end - end - - # @!macro observable_count_observers - def count_observers - synchronize { @observers.count } - end - - # Notifies all registered observers with optional args - # @param [Object] args arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - def notify_observers(*args, &block) - observers = duplicate_observers - notify_to(observers, *args, &block) - self - end - - # Notifies all registered observers with optional args and deletes them. - # - # @param [Object] args arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - def notify_and_delete_observers(*args, &block) - observers = duplicate_and_clear_observers - notify_to(observers, *args, &block) - self - end - - protected - - def ns_initialize - @observers = {} - end - - private - - def duplicate_and_clear_observers - synchronize do - observers = @observers.dup - @observers.clear - observers - end - end - - def duplicate_observers - synchronize { @observers.dup } - end - - def notify_to(observers, *args) - raise ArgumentError.new('cannot give arguments and a block') if block_given? && !args.empty? - observers.each do |observer, function| - args = yield if block_given? - observer.send(function, *args) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb deleted file mode 100644 index bcb6750d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb +++ /dev/null @@ -1,111 +0,0 @@ -require 'concurrent/synchronization/lockable_object' - -module Concurrent - module Collection - - # A thread safe observer set implemented using copy-on-write approach: - # every time an observer is added or removed the whole internal data structure is - # duplicated and replaced with a new one. - # - # @api private - class CopyOnWriteObserverSet < Synchronization::LockableObject - - def initialize - super() - synchronize { ns_initialize } - end - - # @!macro observable_add_observer - def add_observer(observer = nil, func = :update, &block) - if observer.nil? && block.nil? - raise ArgumentError, 'should pass observer as a first argument or block' - elsif observer && block - raise ArgumentError.new('cannot provide both an observer and a block') - end - - if block - observer = block - func = :call - end - - synchronize do - new_observers = @observers.dup - new_observers[observer] = func - @observers = new_observers - observer - end - end - - # @!macro observable_delete_observer - def delete_observer(observer) - synchronize do - new_observers = @observers.dup - new_observers.delete(observer) - @observers = new_observers - observer - end - end - - # @!macro observable_delete_observers - def delete_observers - self.observers = {} - self - end - - # @!macro observable_count_observers - def count_observers - observers.count - end - - # Notifies all registered observers with optional args - # @param [Object] args arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - def notify_observers(*args, &block) - notify_to(observers, *args, &block) - self - end - - # Notifies all registered observers with optional args and deletes them. - # - # @param [Object] args arguments to be passed to each observer - # @return [CopyOnWriteObserverSet] self - def notify_and_delete_observers(*args, &block) - old = clear_observers_and_return_old - notify_to(old, *args, &block) - self - end - - protected - - def ns_initialize - @observers = {} - end - - private - - def notify_to(observers, *args) - raise ArgumentError.new('cannot give arguments and a block') if block_given? && !args.empty? - observers.each do |observer, function| - args = yield if block_given? - observer.send(function, *args) - end - end - - def observers - synchronize { @observers } - end - - def observers=(new_set) - synchronize { @observers = new_set } - end - - def clear_observers_and_return_old - synchronize do - old_observers = @observers - @observers = {} - old_observers - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/java_non_concurrent_priority_queue.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/java_non_concurrent_priority_queue.rb deleted file mode 100644 index 2be9e437..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/java_non_concurrent_priority_queue.rb +++ /dev/null @@ -1,84 +0,0 @@ -if Concurrent.on_jruby? - - module Concurrent - module Collection - - - # @!macro priority_queue - # - # @!visibility private - # @!macro internal_implementation_note - class JavaNonConcurrentPriorityQueue - - # @!macro priority_queue_method_initialize - def initialize(opts = {}) - order = opts.fetch(:order, :max) - if [:min, :low].include?(order) - @queue = java.util.PriorityQueue.new(11) # 11 is the default initial capacity - else - @queue = java.util.PriorityQueue.new(11, java.util.Collections.reverseOrder()) - end - end - - # @!macro priority_queue_method_clear - def clear - @queue.clear - true - end - - # @!macro priority_queue_method_delete - def delete(item) - found = false - while @queue.remove(item) do - found = true - end - found - end - - # @!macro priority_queue_method_empty - def empty? - @queue.size == 0 - end - - # @!macro priority_queue_method_include - def include?(item) - @queue.contains(item) - end - alias_method :has_priority?, :include? - - # @!macro priority_queue_method_length - def length - @queue.size - end - alias_method :size, :length - - # @!macro priority_queue_method_peek - def peek - @queue.peek - end - - # @!macro priority_queue_method_pop - def pop - @queue.poll - end - alias_method :deq, :pop - alias_method :shift, :pop - - # @!macro priority_queue_method_push - def push(item) - raise ArgumentError.new('cannot enqueue nil') if item.nil? - @queue.add(item) - end - alias_method :<<, :push - alias_method :enq, :push - - # @!macro priority_queue_method_from_list - def self.from_list(list, opts = {}) - queue = new(opts) - list.each{|item| queue << item } - queue - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb deleted file mode 100644 index 3704410b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb +++ /dev/null @@ -1,160 +0,0 @@ -require 'concurrent/synchronization/object' - -module Concurrent - - # @!macro warn.edge - class LockFreeStack < Synchronization::Object - - safe_initialization! - - class Node - # TODO (pitr-ch 20-Dec-2016): Could be unified with Stack class? - - # @return [Node] - attr_reader :next_node - - # @return [Object] - attr_reader :value - - # @!visibility private - # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised - attr_writer :value - - def initialize(value, next_node) - @value = value - @next_node = next_node - end - - singleton_class.send :alias_method, :[], :new - end - - # The singleton for empty node - EMPTY = Node[nil, nil] - def EMPTY.next_node - self - end - - attr_atomic(:head) - private :head, :head=, :swap_head, :compare_and_set_head, :update_head - - # @!visibility private - def self.of1(value) - new Node[value, EMPTY] - end - - # @!visibility private - def self.of2(value1, value2) - new Node[value1, Node[value2, EMPTY]] - end - - # @param [Node] head - def initialize(head = EMPTY) - super() - self.head = head - end - - # @param [Node] head - # @return [true, false] - def empty?(head = head()) - head.equal? EMPTY - end - - # @param [Node] head - # @param [Object] value - # @return [true, false] - def compare_and_push(head, value) - compare_and_set_head head, Node[value, head] - end - - # @param [Object] value - # @return [self] - def push(value) - while true - current_head = head - return self if compare_and_set_head current_head, Node[value, current_head] - end - end - - # @return [Node] - def peek - head - end - - # @param [Node] head - # @return [true, false] - def compare_and_pop(head) - compare_and_set_head head, head.next_node - end - - # @return [Object] - def pop - while true - current_head = head - return current_head.value if compare_and_set_head current_head, current_head.next_node - end - end - - # @param [Node] head - # @return [true, false] - def compare_and_clear(head) - compare_and_set_head head, EMPTY - end - - include Enumerable - - # @param [Node] head - # @return [self] - def each(head = nil) - return to_enum(:each, head) unless block_given? - it = head || peek - until it.equal?(EMPTY) - yield it.value - it = it.next_node - end - self - end - - # @return [true, false] - def clear - while true - current_head = head - return false if current_head == EMPTY - return true if compare_and_set_head current_head, EMPTY - end - end - - # @param [Node] head - # @return [true, false] - def clear_if(head) - compare_and_set_head head, EMPTY - end - - # @param [Node] head - # @param [Node] new_head - # @return [true, false] - def replace_if(head, new_head) - compare_and_set_head head, new_head - end - - # @return [self] - # @yield over the cleared stack - # @yieldparam [Object] value - def clear_each(&block) - while true - current_head = head - return self if current_head == EMPTY - if compare_and_set_head current_head, EMPTY - each current_head, &block - return self - end - end - end - - # @return [String] Short string representation. - def to_s - format '%s %s>', super[0..-2], to_a.to_s - end - - alias_method :inspect, :to_s - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb deleted file mode 100644 index e0cf9990..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'thread' -require 'concurrent/collection/map/non_concurrent_map_backend' - -module Concurrent - - # @!visibility private - module Collection - - # @!visibility private - class MriMapBackend < NonConcurrentMapBackend - - def initialize(options = nil, &default_proc) - super(options, &default_proc) - @write_lock = Mutex.new - end - - def []=(key, value) - @write_lock.synchronize { super } - end - - def compute_if_absent(key) - if NULL != (stored_value = @backend.fetch(key, NULL)) # fast non-blocking path for the most likely case - stored_value - else - @write_lock.synchronize { super } - end - end - - def compute_if_present(key) - @write_lock.synchronize { super } - end - - def compute(key) - @write_lock.synchronize { super } - end - - def merge_pair(key, value) - @write_lock.synchronize { super } - end - - def replace_pair(key, old_value, new_value) - @write_lock.synchronize { super } - end - - def replace_if_exists(key, new_value) - @write_lock.synchronize { super } - end - - def get_and_set(key, value) - @write_lock.synchronize { super } - end - - def delete(key) - @write_lock.synchronize { super } - end - - def delete_pair(key, value) - @write_lock.synchronize { super } - end - - def clear - @write_lock.synchronize { super } - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb deleted file mode 100644 index ca5fd9b4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb +++ /dev/null @@ -1,148 +0,0 @@ -require 'concurrent/constants' - -module Concurrent - - # @!visibility private - module Collection - - # @!visibility private - class NonConcurrentMapBackend - - # WARNING: all public methods of the class must operate on the @backend - # directly without calling each other. This is important because of the - # SynchronizedMapBackend which uses a non-reentrant mutex for performance - # reasons. - def initialize(options = nil, &default_proc) - validate_options_hash!(options) if options.kind_of?(::Hash) - set_backend(default_proc) - @default_proc = default_proc - end - - def [](key) - @backend[key] - end - - def []=(key, value) - @backend[key] = value - end - - def compute_if_absent(key) - if NULL != (stored_value = @backend.fetch(key, NULL)) - stored_value - else - @backend[key] = yield - end - end - - def replace_pair(key, old_value, new_value) - if pair?(key, old_value) - @backend[key] = new_value - true - else - false - end - end - - def replace_if_exists(key, new_value) - if NULL != (stored_value = @backend.fetch(key, NULL)) - @backend[key] = new_value - stored_value - end - end - - def compute_if_present(key) - if NULL != (stored_value = @backend.fetch(key, NULL)) - store_computed_value(key, yield(stored_value)) - end - end - - def compute(key) - store_computed_value(key, yield(get_or_default(key, nil))) - end - - def merge_pair(key, value) - if NULL == (stored_value = @backend.fetch(key, NULL)) - @backend[key] = value - else - store_computed_value(key, yield(stored_value)) - end - end - - def get_and_set(key, value) - stored_value = get_or_default(key, nil) - @backend[key] = value - stored_value - end - - def key?(key) - @backend.key?(key) - end - - def delete(key) - @backend.delete(key) - end - - def delete_pair(key, value) - if pair?(key, value) - @backend.delete(key) - true - else - false - end - end - - def clear - @backend.clear - self - end - - def each_pair - dupped_backend.each_pair do |k, v| - yield k, v - end - self - end - - def size - @backend.size - end - - def get_or_default(key, default_value) - @backend.fetch(key, default_value) - end - - private - - def set_backend(default_proc) - if default_proc - @backend = ::Hash.new { |_h, key| default_proc.call(self, key) } - else - @backend = {} - end - end - - def initialize_copy(other) - super - set_backend(@default_proc) - self - end - - def dupped_backend - @backend.dup - end - - def pair?(key, expected_value) - NULL != (stored_value = @backend.fetch(key, NULL)) && expected_value.equal?(stored_value) - end - - def store_computed_value(key, new_value) - if new_value.nil? - @backend.delete(key) - nil - else - @backend[key] = new_value - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb deleted file mode 100644 index efa161ed..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'concurrent/collection/map/non_concurrent_map_backend' - -module Concurrent - - # @!visibility private - module Collection - - # @!visibility private - class SynchronizedMapBackend < NonConcurrentMapBackend - - def initialize(*args, &block) - super - - # WARNING: Mutex is a non-reentrant lock, so the synchronized methods are - # not allowed to call each other. - @mutex = Mutex.new - end - - def [](key) - @mutex.synchronize { super } - end - - def []=(key, value) - @mutex.synchronize { super } - end - - def compute_if_absent(key) - @mutex.synchronize { super } - end - - def compute_if_present(key) - @mutex.synchronize { super } - end - - def compute(key) - @mutex.synchronize { super } - end - - def merge_pair(key, value) - @mutex.synchronize { super } - end - - def replace_pair(key, old_value, new_value) - @mutex.synchronize { super } - end - - def replace_if_exists(key, new_value) - @mutex.synchronize { super } - end - - def get_and_set(key, value) - @mutex.synchronize { super } - end - - def key?(key) - @mutex.synchronize { super } - end - - def delete(key) - @mutex.synchronize { super } - end - - def delete_pair(key, value) - @mutex.synchronize { super } - end - - def clear - @mutex.synchronize { super } - end - - def size - @mutex.synchronize { super } - end - - def get_or_default(key, default_value) - @mutex.synchronize { super } - end - - private - def dupped_backend - @mutex.synchronize { super } - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb deleted file mode 100644 index 68a1b388..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb +++ /dev/null @@ -1,14 +0,0 @@ -module Concurrent - - # @!visibility private - module Collection - - # @!visibility private - class TruffleRubyMapBackend < TruffleRuby::ConcurrentMap - def initialize(options = nil) - options ||= {} - super(initial_capacity: options[:initial_capacity], load_factor: options[:load_factor]) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb deleted file mode 100644 index 694cd7ac..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb +++ /dev/null @@ -1,143 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/collection/java_non_concurrent_priority_queue' -require 'concurrent/collection/ruby_non_concurrent_priority_queue' - -module Concurrent - module Collection - - # @!visibility private - # @!macro internal_implementation_note - NonConcurrentPriorityQueueImplementation = case - when Concurrent.on_jruby? - JavaNonConcurrentPriorityQueue - else - RubyNonConcurrentPriorityQueue - end - private_constant :NonConcurrentPriorityQueueImplementation - - # @!macro priority_queue - # - # A queue collection in which the elements are sorted based on their - # comparison (spaceship) operator `<=>`. Items are added to the queue - # at a position relative to their priority. On removal the element - # with the "highest" priority is removed. By default the sort order is - # from highest to lowest, but a lowest-to-highest sort order can be - # set on construction. - # - # The API is based on the `Queue` class from the Ruby standard library. - # - # The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm - # stored in an array. The algorithm is based on the work of Robert Sedgewick - # and Kevin Wayne. - # - # The JRuby native implementation is a thin wrapper around the standard - # library `java.util.NonConcurrentPriorityQueue`. - # - # When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. - # When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. - # - # @note This implementation is *not* thread safe. - # - # @see http://en.wikipedia.org/wiki/Priority_queue - # @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html - # - # @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 - # @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html - # - # @!visibility private - class NonConcurrentPriorityQueue < NonConcurrentPriorityQueueImplementation - - alias_method :has_priority?, :include? - - alias_method :size, :length - - alias_method :deq, :pop - alias_method :shift, :pop - - alias_method :<<, :push - alias_method :enq, :push - - # @!method initialize(opts = {}) - # @!macro priority_queue_method_initialize - # - # Create a new priority queue with no items. - # - # @param [Hash] opts the options for creating the queue - # @option opts [Symbol] :order (:max) dictates the order in which items are - # stored: from highest to lowest when `:max` or `:high`; from lowest to - # highest when `:min` or `:low` - - # @!method clear - # @!macro priority_queue_method_clear - # - # Removes all of the elements from this priority queue. - - # @!method delete(item) - # @!macro priority_queue_method_delete - # - # Deletes all items from `self` that are equal to `item`. - # - # @param [Object] item the item to be removed from the queue - # @return [Object] true if the item is found else false - - # @!method empty? - # @!macro priority_queue_method_empty - # - # Returns `true` if `self` contains no elements. - # - # @return [Boolean] true if there are no items in the queue else false - - # @!method include?(item) - # @!macro priority_queue_method_include - # - # Returns `true` if the given item is present in `self` (that is, if any - # element == `item`), otherwise returns false. - # - # @param [Object] item the item to search for - # - # @return [Boolean] true if the item is found else false - - # @!method length - # @!macro priority_queue_method_length - # - # The current length of the queue. - # - # @return [Fixnum] the number of items in the queue - - # @!method peek - # @!macro priority_queue_method_peek - # - # Retrieves, but does not remove, the head of this queue, or returns `nil` - # if this queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - - # @!method pop - # @!macro priority_queue_method_pop - # - # Retrieves and removes the head of this queue, or returns `nil` if this - # queue is empty. - # - # @return [Object] the head of the queue or `nil` when empty - - # @!method push(item) - # @!macro priority_queue_method_push - # - # Inserts the specified element into this priority queue. - # - # @param [Object] item the item to insert onto the queue - - # @!method self.from_list(list, opts = {}) - # @!macro priority_queue_method_from_list - # - # Create a new priority queue from the given list. - # - # @param [Enumerable] list the list to build the queue from - # @param [Hash] opts the options for creating the queue - # - # @return [NonConcurrentPriorityQueue] the newly created and populated queue - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb deleted file mode 100644 index 322b4ac2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb +++ /dev/null @@ -1,160 +0,0 @@ -module Concurrent - module Collection - - # @!macro priority_queue - # - # @!visibility private - # @!macro internal_implementation_note - class RubyNonConcurrentPriorityQueue - - # @!macro priority_queue_method_initialize - def initialize(opts = {}) - order = opts.fetch(:order, :max) - @comparator = [:min, :low].include?(order) ? -1 : 1 - clear - end - - # @!macro priority_queue_method_clear - def clear - @queue = [nil] - @length = 0 - true - end - - # @!macro priority_queue_method_delete - def delete(item) - return false if empty? - original_length = @length - k = 1 - while k <= @length - if @queue[k] == item - swap(k, @length) - @length -= 1 - sink(k) || swim(k) - @queue.pop - else - k += 1 - end - end - @length != original_length - end - - # @!macro priority_queue_method_empty - def empty? - size == 0 - end - - # @!macro priority_queue_method_include - def include?(item) - @queue.include?(item) - end - alias_method :has_priority?, :include? - - # @!macro priority_queue_method_length - def length - @length - end - alias_method :size, :length - - # @!macro priority_queue_method_peek - def peek - empty? ? nil : @queue[1] - end - - # @!macro priority_queue_method_pop - def pop - return nil if empty? - max = @queue[1] - swap(1, @length) - @length -= 1 - sink(1) - @queue.pop - max - end - alias_method :deq, :pop - alias_method :shift, :pop - - # @!macro priority_queue_method_push - def push(item) - raise ArgumentError.new('cannot enqueue nil') if item.nil? - @length += 1 - @queue << item - swim(@length) - true - end - alias_method :<<, :push - alias_method :enq, :push - - # @!macro priority_queue_method_from_list - def self.from_list(list, opts = {}) - queue = new(opts) - list.each{|item| queue << item } - queue - end - - private - - # Exchange the values at the given indexes within the internal array. - # - # @param [Integer] x the first index to swap - # @param [Integer] y the second index to swap - # - # @!visibility private - def swap(x, y) - temp = @queue[x] - @queue[x] = @queue[y] - @queue[y] = temp - end - - # Are the items at the given indexes ordered based on the priority - # order specified at construction? - # - # @param [Integer] x the first index from which to retrieve a comparable value - # @param [Integer] y the second index from which to retrieve a comparable value - # - # @return [Boolean] true if the two elements are in the correct priority order - # else false - # - # @!visibility private - def ordered?(x, y) - (@queue[x] <=> @queue[y]) == @comparator - end - - # Percolate down to maintain heap invariant. - # - # @param [Integer] k the index at which to start the percolation - # - # @!visibility private - def sink(k) - success = false - - while (j = (2 * k)) <= @length do - j += 1 if j < @length && ! ordered?(j, j+1) - break if ordered?(k, j) - swap(k, j) - success = true - k = j - end - - success - end - - # Percolate up to maintain heap invariant. - # - # @param [Integer] k the index at which to start the percolation - # - # @!visibility private - def swim(k) - success = false - - while k > 1 && ! ordered?(k/2, k) do - swap(k, k/2) - k = k/2 - success = true - end - - success - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/deprecation.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/deprecation.rb deleted file mode 100644 index 35ae4b2c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/deprecation.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'concurrent/concern/logging' - -module Concurrent - module Concern - - # @!visibility private - # @!macro internal_implementation_note - module Deprecation - # TODO require additional parameter: a version. Display when it'll be removed based on that. Error if not removed. - include Concern::Logging - - def deprecated(message, strip = 2) - caller_line = caller(strip).first if strip > 0 - klass = if Module === self - self - else - self.class - end - message = if strip > 0 - format("[DEPRECATED] %s\ncalled on: %s", message, caller_line) - else - format('[DEPRECATED] %s', message) - end - log WARN, klass.to_s, message - end - - def deprecated_method(old_name, new_name) - deprecated "`#{old_name}` is deprecated and it'll removed in next release, use `#{new_name}` instead", 3 - end - - extend self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/dereferenceable.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/dereferenceable.rb deleted file mode 100644 index dc172ba7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/dereferenceable.rb +++ /dev/null @@ -1,73 +0,0 @@ -module Concurrent - module Concern - - # Object references in Ruby are mutable. This can lead to serious problems when - # the `#value` of a concurrent object is a mutable reference. Which is always the - # case unless the value is a `Fixnum`, `Symbol`, or similar "primitive" data type. - # Most classes in this library that expose a `#value` getter method do so using the - # `Dereferenceable` mixin module. - # - # @!macro copy_options - module Dereferenceable - # NOTE: This module is going away in 2.0. In the mean time we need it to - # play nicely with the synchronization layer. This means that the - # including class SHOULD be synchronized and it MUST implement a - # `#synchronize` method. Not doing so will lead to runtime errors. - - # Return the value this object represents after applying the options specified - # by the `#set_deref_options` method. - # - # @return [Object] the current value of the object - def value - synchronize { apply_deref_options(@value) } - end - alias_method :deref, :value - - protected - - # Set the internal value of this object - # - # @param [Object] value the new value - def value=(value) - synchronize{ @value = value } - end - - # @!macro dereferenceable_set_deref_options - # Set the options which define the operations #value performs before - # returning data to the caller (dereferencing). - # - # @note Most classes that include this module will call `#set_deref_options` - # from within the constructor, thus allowing these options to be set at - # object creation. - # - # @param [Hash] opts the options defining dereference behavior. - # @option opts [String] :dup_on_deref (false) call `#dup` before returning the data - # @option opts [String] :freeze_on_deref (false) call `#freeze` before returning the data - # @option opts [String] :copy_on_deref (nil) call the given `Proc` passing - # the internal value and returning the value returned from the proc - def set_deref_options(opts = {}) - synchronize{ ns_set_deref_options(opts) } - end - - # @!macro dereferenceable_set_deref_options - # @!visibility private - def ns_set_deref_options(opts) - @dup_on_deref = opts[:dup_on_deref] || opts[:dup] - @freeze_on_deref = opts[:freeze_on_deref] || opts[:freeze] - @copy_on_deref = opts[:copy_on_deref] || opts[:copy] - @do_nothing_on_deref = !(@dup_on_deref || @freeze_on_deref || @copy_on_deref) - nil - end - - # @!visibility private - def apply_deref_options(value) - return nil if value.nil? - return value if @do_nothing_on_deref - value = @copy_on_deref.call(value) if @copy_on_deref - value = value.dup if @dup_on_deref - value = value.freeze if @freeze_on_deref - value - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/logging.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/logging.rb deleted file mode 100644 index d1aae81a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/logging.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'concurrent/atomic/atomic_reference' - -module Concurrent - module Concern - - # Include where logging is needed - # - # @!visibility private - module Logging - # The same as Logger::Severity but we copy it here to avoid a dependency on the logger gem just for these 7 constants - DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN = 0, 1, 2, 3, 4, 5 - SEV_LABEL = %w[DEBUG INFO WARN ERROR FATAL ANY].freeze - - # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger - # @param [Integer] level one of Concurrent::Concern::Logging constants - # @param [String] progname e.g. a path of an Actor - # @param [String, nil] message when nil block is used to generate the message - # @yieldreturn [String] a message - def log(level, progname, message = nil, &block) - logger = if defined?(@logger) && @logger - @logger - else - Concurrent.global_logger - end - logger.call level, progname, message, &block - rescue => error - $stderr.puts "`Concurrent.global_logger` failed to log #{[level, progname, message, block]}\n" + - "#{error.message} (#{error.class})\n#{error.backtrace.join "\n"}" - end - end - end -end - -module Concurrent - extend Concern::Logging - - # Create a simple logger with provided level and output. - def self.create_simple_logger(level = :FATAL, output = $stderr) - level = Concern::Logging.const_get(level) unless level.is_a?(Integer) - - # TODO (pitr-ch 24-Dec-2016): figure out why it had to be replaced, stdlogger was deadlocking - lambda do |severity, progname, message = nil, &block| - return false if severity < level - - message = block ? block.call : message - formatted_message = case message - when String - message - when Exception - format "%s (%s)\n%s", - message.message, message.class, (message.backtrace || []).join("\n") - else - message.inspect - end - - output.print format "[%s] %5s -- %s: %s\n", - Time.now.strftime('%Y-%m-%d %H:%M:%S.%L'), - Concern::Logging::SEV_LABEL[severity], - progname, - formatted_message - true - end - end - - # Use logger created by #create_simple_logger to log concurrent-ruby messages. - def self.use_simple_logger(level = :FATAL, output = $stderr) - Concurrent.global_logger = create_simple_logger level, output - end - - # Create a stdlib logger with provided level and output. - # If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+. - # @deprecated - def self.create_stdlib_logger(level = :FATAL, output = $stderr) - require 'logger' - logger = Logger.new(output) - logger.level = level - logger.formatter = lambda do |severity, datetime, progname, msg| - formatted_message = case msg - when String - msg - when Exception - format "%s (%s)\n%s", - msg.message, msg.class, (msg.backtrace || []).join("\n") - else - msg.inspect - end - format "[%s] %5s -- %s: %s\n", - datetime.strftime('%Y-%m-%d %H:%M:%S.%L'), - severity, - progname, - formatted_message - end - - lambda do |loglevel, progname, message = nil, &block| - logger.add loglevel, message, progname, &block - end - end - - # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. - # @deprecated - def self.use_stdlib_logger(level = :FATAL, output = $stderr) - Concurrent.global_logger = create_stdlib_logger level, output - end - - # TODO (pitr-ch 27-Dec-2016): remove deadlocking stdlib_logger methods - - # Suppresses all output when used for logging. - NULL_LOGGER = lambda { |level, progname, message = nil, &block| } - - # @!visibility private - GLOBAL_LOGGER = AtomicReference.new(create_simple_logger(:WARN)) - private_constant :GLOBAL_LOGGER - - def self.global_logger - GLOBAL_LOGGER.value - end - - def self.global_logger=(value) - GLOBAL_LOGGER.value = value - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/obligation.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/obligation.rb deleted file mode 100644 index 2c9ac120..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/obligation.rb +++ /dev/null @@ -1,220 +0,0 @@ -require 'thread' -require 'timeout' - -require 'concurrent/atomic/event' -require 'concurrent/concern/dereferenceable' - -module Concurrent - module Concern - - module Obligation - include Concern::Dereferenceable - # NOTE: The Dereferenceable module is going away in 2.0. In the mean time - # we need it to place nicely with the synchronization layer. This means - # that the including class SHOULD be synchronized and it MUST implement a - # `#synchronize` method. Not doing so will lead to runtime errors. - - # Has the obligation been fulfilled? - # - # @return [Boolean] - def fulfilled? - state == :fulfilled - end - alias_method :realized?, :fulfilled? - - # Has the obligation been rejected? - # - # @return [Boolean] - def rejected? - state == :rejected - end - - # Is obligation completion still pending? - # - # @return [Boolean] - def pending? - state == :pending - end - - # Is the obligation still unscheduled? - # - # @return [Boolean] - def unscheduled? - state == :unscheduled - end - - # Has the obligation completed processing? - # - # @return [Boolean] - def complete? - [:fulfilled, :rejected].include? state - end - - # Is the obligation still awaiting completion of processing? - # - # @return [Boolean] - def incomplete? - ! complete? - end - - # The current value of the obligation. Will be `nil` while the state is - # pending or the operation has been rejected. - # - # @param [Numeric] timeout the maximum time in seconds to wait. - # @return [Object] see Dereferenceable#deref - def value(timeout = nil) - wait timeout - deref - end - - # Wait until obligation is complete or the timeout has been reached. - # - # @param [Numeric] timeout the maximum time in seconds to wait. - # @return [Obligation] self - def wait(timeout = nil) - event.wait(timeout) if timeout != 0 && incomplete? - self - end - - # Wait until obligation is complete or the timeout is reached. Will re-raise - # any exceptions raised during processing (but will not raise an exception - # on timeout). - # - # @param [Numeric] timeout the maximum time in seconds to wait. - # @return [Obligation] self - # @raise [Exception] raises the reason when rejected - def wait!(timeout = nil) - wait(timeout).tap { raise self if rejected? } - end - alias_method :no_error!, :wait! - - # The current value of the obligation. Will be `nil` while the state is - # pending or the operation has been rejected. Will re-raise any exceptions - # raised during processing (but will not raise an exception on timeout). - # - # @param [Numeric] timeout the maximum time in seconds to wait. - # @return [Object] see Dereferenceable#deref - # @raise [Exception] raises the reason when rejected - def value!(timeout = nil) - wait(timeout) - if rejected? - raise self - else - deref - end - end - - # The current state of the obligation. - # - # @return [Symbol] the current state - def state - synchronize { @state } - end - - # If an exception was raised during processing this will return the - # exception object. Will return `nil` when the state is pending or if - # the obligation has been successfully fulfilled. - # - # @return [Exception] the exception raised during processing or `nil` - def reason - synchronize { @reason } - end - - # @example allows Obligation to be risen - # rejected_ivar = Ivar.new.fail - # raise rejected_ivar - def exception(*args) - raise 'obligation is not rejected' unless rejected? - reason.exception(*args) - end - - protected - - # @!visibility private - def get_arguments_from(opts = {}) - [*opts.fetch(:args, [])] - end - - # @!visibility private - def init_obligation - @event = Event.new - @value = @reason = nil - end - - # @!visibility private - def event - @event - end - - # @!visibility private - def set_state(success, value, reason) - if success - @value = value - @state = :fulfilled - else - @reason = reason - @state = :rejected - end - end - - # @!visibility private - def state=(value) - synchronize { ns_set_state(value) } - end - - # Atomic compare and set operation - # State is set to `next_state` only if `current state == expected_current`. - # - # @param [Symbol] next_state - # @param [Symbol] expected_current - # - # @return [Boolean] true is state is changed, false otherwise - # - # @!visibility private - def compare_and_set_state(next_state, *expected_current) - synchronize do - if expected_current.include? @state - @state = next_state - true - else - false - end - end - end - - # Executes the block within mutex if current state is included in expected_states - # - # @return block value if executed, false otherwise - # - # @!visibility private - def if_state(*expected_states) - synchronize do - raise ArgumentError.new('no block given') unless block_given? - - if expected_states.include? @state - yield - else - false - end - end - end - - protected - - # Am I in the current state? - # - # @param [Symbol] expected The state to check against - # @return [Boolean] true if in the expected state else false - # - # @!visibility private - def ns_check_state?(expected) - @state == expected - end - - # @!visibility private - def ns_set_state(value) - @state = value - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/observable.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/observable.rb deleted file mode 100644 index b5132714..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concern/observable.rb +++ /dev/null @@ -1,110 +0,0 @@ -require 'concurrent/collection/copy_on_notify_observer_set' -require 'concurrent/collection/copy_on_write_observer_set' - -module Concurrent - module Concern - - # The [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) is one - # of the most useful design patterns. - # - # The workflow is very simple: - # - an `observer` can register itself to a `subject` via a callback - # - many `observers` can be registered to the same `subject` - # - the `subject` notifies all registered observers when its status changes - # - an `observer` can deregister itself when is no more interested to receive - # event notifications - # - # In a single threaded environment the whole pattern is very easy: the - # `subject` can use a simple data structure to manage all its subscribed - # `observer`s and every `observer` can react directly to every event without - # caring about synchronization. - # - # In a multi threaded environment things are more complex. The `subject` must - # synchronize the access to its data structure and to do so currently we're - # using two specialized ObserverSet: {Concurrent::Concern::CopyOnWriteObserverSet} - # and {Concurrent::Concern::CopyOnNotifyObserverSet}. - # - # When implementing and `observer` there's a very important rule to remember: - # **there are no guarantees about the thread that will execute the callback** - # - # Let's take this example - # ``` - # class Observer - # def initialize - # @count = 0 - # end - # - # def update - # @count += 1 - # end - # end - # - # obs = Observer.new - # [obj1, obj2, obj3, obj4].each { |o| o.add_observer(obs) } - # # execute [obj1, obj2, obj3, obj4] - # ``` - # - # `obs` is wrong because the variable `@count` can be accessed by different - # threads at the same time, so it should be synchronized (using either a Mutex - # or an AtomicFixum) - module Observable - - # @!macro observable_add_observer - # - # Adds an observer to this set. If a block is passed, the observer will be - # created by this method and no other params should be passed. - # - # @param [Object] observer the observer to add - # @param [Symbol] func the function to call on the observer during notification. - # Default is :update - # @return [Object] the added observer - def add_observer(observer = nil, func = :update, &block) - observers.add_observer(observer, func, &block) - end - - # As `#add_observer` but can be used for chaining. - # - # @param [Object] observer the observer to add - # @param [Symbol] func the function to call on the observer during notification. - # @return [Observable] self - def with_observer(observer = nil, func = :update, &block) - add_observer(observer, func, &block) - self - end - - # @!macro observable_delete_observer - # - # Remove `observer` as an observer on this object so that it will no - # longer receive notifications. - # - # @param [Object] observer the observer to remove - # @return [Object] the deleted observer - def delete_observer(observer) - observers.delete_observer(observer) - end - - # @!macro observable_delete_observers - # - # Remove all observers associated with this object. - # - # @return [Observable] self - def delete_observers - observers.delete_observers - self - end - - # @!macro observable_count_observers - # - # Return the number of observers associated with this object. - # - # @return [Integer] the observers count - def count_observers - observers.count_observers - end - - protected - - attr_accessor :observers - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concurrent_ruby.jar b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concurrent_ruby.jar deleted file mode 100644 index d5b8d275..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/concurrent_ruby.jar and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/configuration.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/configuration.rb deleted file mode 100644 index 5571d39b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/configuration.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'thread' -require 'concurrent/delay' -require 'concurrent/errors' -require 'concurrent/concern/deprecation' -require 'concurrent/executor/immediate_executor' -require 'concurrent/executor/fixed_thread_pool' -require 'concurrent/executor/cached_thread_pool' -require 'concurrent/utility/processor_counter' - -module Concurrent - extend Concern::Deprecation - - autoload :Options, 'concurrent/options' - autoload :TimerSet, 'concurrent/executor/timer_set' - autoload :ThreadPoolExecutor, 'concurrent/executor/thread_pool_executor' - - # @!visibility private - GLOBAL_FAST_EXECUTOR = Delay.new { Concurrent.new_fast_executor } - private_constant :GLOBAL_FAST_EXECUTOR - - # @!visibility private - GLOBAL_IO_EXECUTOR = Delay.new { Concurrent.new_io_executor } - private_constant :GLOBAL_IO_EXECUTOR - - # @!visibility private - GLOBAL_TIMER_SET = Delay.new { TimerSet.new } - private_constant :GLOBAL_TIMER_SET - - # @!visibility private - GLOBAL_IMMEDIATE_EXECUTOR = ImmediateExecutor.new - private_constant :GLOBAL_IMMEDIATE_EXECUTOR - - # Disables AtExit handlers including pool auto-termination handlers. - # When disabled it will be the application programmer's responsibility - # to ensure that the handlers are shutdown properly prior to application - # exit by calling `AtExit.run` method. - # - # @note this option should be needed only because of `at_exit` ordering - # issues which may arise when running some of the testing frameworks. - # E.g. Minitest's test-suite runs itself in `at_exit` callback which - # executes after the pools are already terminated. Then auto termination - # needs to be disabled and called manually after test-suite ends. - # @note This method should *never* be called - # from within a gem. It should *only* be used from within the main - # application and even then it should be used only when necessary. - # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. - # - def self.disable_at_exit_handlers! - deprecated "Method #disable_at_exit_handlers! has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841." - end - - # Global thread pool optimized for short, fast *operations*. - # - # @return [ThreadPoolExecutor] the thread pool - def self.global_fast_executor - GLOBAL_FAST_EXECUTOR.value! - end - - # Global thread pool optimized for long, blocking (IO) *tasks*. - # - # @return [ThreadPoolExecutor] the thread pool - def self.global_io_executor - GLOBAL_IO_EXECUTOR.value! - end - - def self.global_immediate_executor - GLOBAL_IMMEDIATE_EXECUTOR - end - - # Global thread pool user for global *timers*. - # - # @return [Concurrent::TimerSet] the thread pool - def self.global_timer_set - GLOBAL_TIMER_SET.value! - end - - # General access point to global executors. - # @param [Symbol, Executor] executor_identifier symbols: - # - :fast - {Concurrent.global_fast_executor} - # - :io - {Concurrent.global_io_executor} - # - :immediate - {Concurrent.global_immediate_executor} - # @return [Executor] - def self.executor(executor_identifier) - Options.executor(executor_identifier) - end - - def self.new_fast_executor(opts = {}) - FixedThreadPool.new( - [2, Concurrent.processor_count].max, - auto_terminate: opts.fetch(:auto_terminate, true), - idletime: 60, # 1 minute - max_queue: 0, # unlimited - fallback_policy: :abort, # shouldn't matter -- 0 max queue - name: "fast" - ) - end - - def self.new_io_executor(opts = {}) - CachedThreadPool.new( - auto_terminate: opts.fetch(:auto_terminate, true), - fallback_policy: :abort, # shouldn't matter -- 0 max queue - name: "io" - ) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/constants.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/constants.rb deleted file mode 100644 index 676c2afb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/constants.rb +++ /dev/null @@ -1,8 +0,0 @@ -module Concurrent - - # Various classes within allows for +nil+ values to be stored, - # so a special +NULL+ token is required to indicate the "nil-ness". - # @!visibility private - NULL = ::Object.new - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/dataflow.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/dataflow.rb deleted file mode 100644 index d55f19d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/dataflow.rb +++ /dev/null @@ -1,81 +0,0 @@ -require 'concurrent/future' -require 'concurrent/atomic/atomic_fixnum' - -module Concurrent - - # @!visibility private - class DependencyCounter # :nodoc: - - def initialize(count, &block) - @counter = AtomicFixnum.new(count) - @block = block - end - - def update(time, value, reason) - if @counter.decrement == 0 - @block.call - end - end - end - - # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. - # {include:file:docs-source/dataflow.md} - # - # @param [Future] inputs zero or more `Future` operations that this dataflow depends upon - # - # @yield The operation to perform once all the dependencies are met - # @yieldparam [Future] inputs each of the `Future` inputs to the dataflow - # @yieldreturn [Object] the result of the block operation - # - # @return [Object] the result of all the operations - # - # @raise [ArgumentError] if no block is given - # @raise [ArgumentError] if any of the inputs are not `IVar`s - def dataflow(*inputs, &block) - dataflow_with(Concurrent.global_io_executor, *inputs, &block) - end - module_function :dataflow - - def dataflow_with(executor, *inputs, &block) - call_dataflow(:value, executor, *inputs, &block) - end - module_function :dataflow_with - - def dataflow!(*inputs, &block) - dataflow_with!(Concurrent.global_io_executor, *inputs, &block) - end - module_function :dataflow! - - def dataflow_with!(executor, *inputs, &block) - call_dataflow(:value!, executor, *inputs, &block) - end - module_function :dataflow_with! - - private - - def call_dataflow(method, executor, *inputs, &block) - raise ArgumentError.new('an executor must be provided') if executor.nil? - raise ArgumentError.new('no block given') unless block_given? - unless inputs.all? { |input| input.is_a? IVar } - raise ArgumentError.new("Not all dependencies are IVars.\nDependencies: #{ inputs.inspect }") - end - - result = Future.new(executor: executor) do - values = inputs.map { |input| input.send(method) } - block.call(*values) - end - - if inputs.empty? - result.execute - else - counter = DependencyCounter.new(inputs.size) { result.execute } - - inputs.each do |input| - input.add_observer counter - end - end - - result - end - module_function :call_dataflow -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/delay.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/delay.rb deleted file mode 100644 index 0d6d91a5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/delay.rb +++ /dev/null @@ -1,199 +0,0 @@ -require 'thread' -require 'concurrent/concern/obligation' -require 'concurrent/executor/immediate_executor' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # This file has circular require issues. It must be autoloaded here. - autoload :Options, 'concurrent/options' - - # Lazy evaluation of a block yielding an immutable result. Useful for - # expensive operations that may never be needed. It may be non-blocking, - # supports the `Concern::Obligation` interface, and accepts the injection of - # custom executor upon which to execute the block. Processing of - # block will be deferred until the first time `#value` is called. - # At that time the caller can choose to return immediately and let - # the block execute asynchronously, block indefinitely, or block - # with a timeout. - # - # When a `Delay` is created its state is set to `pending`. The value and - # reason are both `nil`. The first time the `#value` method is called the - # enclosed operation will be run and the calling thread will block. Other - # threads attempting to call `#value` will block as well. Once the operation - # is complete the *value* will be set to the result of the operation or the - # *reason* will be set to the raised exception, as appropriate. All threads - # blocked on `#value` will return. Subsequent calls to `#value` will immediately - # return the cached value. The operation will only be run once. This means that - # any side effects created by the operation will only happen once as well. - # - # `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread - # safety of the reference returned by `#value`. - # - # @!macro copy_options - # - # @!macro delay_note_regarding_blocking - # @note The default behavior of `Delay` is to block indefinitely when - # calling either `value` or `wait`, executing the delayed operation on - # the current thread. This makes the `timeout` value completely - # irrelevant. To enable non-blocking behavior, use the `executor` - # constructor option. This will cause the delayed operation to be - # execute on the given executor, allowing the call to timeout. - # - # @see Concurrent::Concern::Dereferenceable - class Delay < Synchronization::LockableObject - include Concern::Obligation - - # NOTE: Because the global thread pools are lazy-loaded with these objects - # there is a performance hit every time we post a new task to one of these - # thread pools. Subsequently it is critical that `Delay` perform as fast - # as possible post-completion. This class has been highly optimized using - # the benchmark script `examples/lazy_and_delay.rb`. Do NOT attempt to - # DRY-up this class or perform other refactoring with running the - # benchmarks and ensuring that performance is not negatively impacted. - - # Create a new `Delay` in the `:pending` state. - # - # @!macro executor_and_deref_options - # - # @yield the delayed operation to perform - # - # @raise [ArgumentError] if no block is given - def initialize(opts = {}, &block) - raise ArgumentError.new('no block given') unless block_given? - super(&nil) - synchronize { ns_initialize(opts, &block) } - end - - # Return the value this object represents after applying the options - # specified by the `#set_deref_options` method. If the delayed operation - # raised an exception this method will return nil. The exception object - # can be accessed via the `#reason` method. - # - # @param [Numeric] timeout the maximum number of seconds to wait - # @return [Object] the current value of the object - # - # @!macro delay_note_regarding_blocking - def value(timeout = nil) - if @executor # TODO (pitr 12-Sep-2015): broken unsafe read? - super - else - # this function has been optimized for performance and - # should not be modified without running new benchmarks - synchronize do - execute = @evaluation_started = true unless @evaluation_started - if execute - begin - set_state(true, @task.call, nil) - rescue => ex - set_state(false, nil, ex) - end - elsif incomplete? - raise IllegalOperationError, 'Recursive call to #value during evaluation of the Delay' - end - end - if @do_nothing_on_deref - @value - else - apply_deref_options(@value) - end - end - end - - # Return the value this object represents after applying the options - # specified by the `#set_deref_options` method. If the delayed operation - # raised an exception, this method will raise that exception (even when) - # the operation has already been executed). - # - # @param [Numeric] timeout the maximum number of seconds to wait - # @return [Object] the current value of the object - # @raise [Exception] when `#rejected?` raises `#reason` - # - # @!macro delay_note_regarding_blocking - def value!(timeout = nil) - if @executor - super - else - result = value - raise @reason if @reason - result - end - end - - # Return the value this object represents after applying the options - # specified by the `#set_deref_options` method. - # - # @param [Integer] timeout (nil) the maximum number of seconds to wait for - # the value to be computed. When `nil` the caller will block indefinitely. - # - # @return [Object] self - # - # @!macro delay_note_regarding_blocking - def wait(timeout = nil) - if @executor - execute_task_once - super(timeout) - else - value - end - self - end - - # Reconfigures the block returning the value if still `#incomplete?` - # - # @yield the delayed operation to perform - # @return [true, false] if success - def reconfigure(&block) - synchronize do - raise ArgumentError.new('no block given') unless block_given? - unless @evaluation_started - @task = block - true - else - false - end - end - end - - protected - - def ns_initialize(opts, &block) - init_obligation - set_deref_options(opts) - @executor = opts[:executor] - - @task = block - @state = :pending - @evaluation_started = false - end - - private - - # @!visibility private - def execute_task_once # :nodoc: - # this function has been optimized for performance and - # should not be modified without running new benchmarks - execute = task = nil - synchronize do - execute = @evaluation_started = true unless @evaluation_started - task = @task - end - - if execute - executor = Options.executor_from_options(executor: @executor) - executor.post do - begin - result = task.call - success = true - rescue => ex - reason = ex - end - synchronize do - set_state(success, result, reason) - event.set - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/errors.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/errors.rb deleted file mode 100644 index 74f1fc3d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/errors.rb +++ /dev/null @@ -1,74 +0,0 @@ -module Concurrent - - Error = Class.new(StandardError) - - # Raised when errors occur during configuration. - ConfigurationError = Class.new(Error) - - # Raised when an asynchronous operation is cancelled before execution. - CancelledOperationError = Class.new(Error) - - # Raised when a lifecycle method (such as `stop`) is called in an improper - # sequence or when the object is in an inappropriate state. - LifecycleError = Class.new(Error) - - # Raised when an attempt is made to violate an immutability guarantee. - ImmutabilityError = Class.new(Error) - - # Raised when an operation is attempted which is not legal given the - # receiver's current state - IllegalOperationError = Class.new(Error) - - # Raised when an object's methods are called when it has not been - # properly initialized. - InitializationError = Class.new(Error) - - # Raised when an object with a start/stop lifecycle has been started an - # excessive number of times. Often used in conjunction with a restart - # policy or strategy. - MaxRestartFrequencyError = Class.new(Error) - - # Raised when an attempt is made to modify an immutable object - # (such as an `IVar`) after its final state has been set. - class MultipleAssignmentError < Error - attr_reader :inspection_data - - def initialize(message = nil, inspection_data = nil) - @inspection_data = inspection_data - super message - end - - def inspect - format '%s %s>', super[0..-2], @inspection_data.inspect - end - end - - # Raised by an `Executor` when it is unable to process a given task, - # possibly because of a reject policy or other internal error. - RejectedExecutionError = Class.new(Error) - - # Raised when any finite resource, such as a lock counter, exceeds its - # maximum limit/threshold. - ResourceLimitError = Class.new(Error) - - # Raised when an operation times out. - TimeoutError = Class.new(Error) - - # Aggregates multiple exceptions. - class MultipleErrors < Error - attr_reader :errors - - def initialize(errors, message = "#{errors.size} errors") - @errors = errors - super [*message, - *errors.map { |e| [format('%s (%s)', e.message, e.class), *e.backtrace] }.flatten(1) - ].join("\n") - end - end - - # @!macro internal_implementation_note - class ConcurrentUpdateError < ThreadError - # frozen pre-allocated backtrace to speed ConcurrentUpdateError - CONC_UP_ERR_BACKTRACE = ['backtrace elided; set verbose to enable'].freeze - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/exchanger.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/exchanger.rb deleted file mode 100644 index a5405d25..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/exchanger.rb +++ /dev/null @@ -1,353 +0,0 @@ -require 'concurrent/constants' -require 'concurrent/errors' -require 'concurrent/maybe' -require 'concurrent/atomic/atomic_reference' -require 'concurrent/atomic/count_down_latch' -require 'concurrent/utility/engine' -require 'concurrent/utility/monotonic_time' - -module Concurrent - - # @!macro exchanger - # - # A synchronization point at which threads can pair and swap elements within - # pairs. Each thread presents some object on entry to the exchange method, - # matches with a partner thread, and receives its partner's object on return. - # - # @!macro thread_safe_variable_comparison - # - # This implementation is very simple, using only a single slot for each - # exchanger (unlike more advanced implementations which use an "arena"). - # This approach will work perfectly fine when there are only a few threads - # accessing a single `Exchanger`. Beyond a handful of threads the performance - # will degrade rapidly due to contention on the single slot, but the algorithm - # will remain correct. - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html java.util.concurrent.Exchanger - # @example - # - # exchanger = Concurrent::Exchanger.new - # - # threads = [ - # Thread.new { puts "first: " << exchanger.exchange('foo', 1) }, #=> "first: bar" - # Thread.new { puts "second: " << exchanger.exchange('bar', 1) } #=> "second: foo" - # ] - # threads.each {|t| t.join(2) } - - # @!visibility private - class AbstractExchanger < Synchronization::Object - - # @!visibility private - CANCEL = ::Object.new - private_constant :CANCEL - - def initialize - super - end - - # @!macro exchanger_method_do_exchange - # - # Waits for another thread to arrive at this exchange point (unless the - # current thread is interrupted), and then transfers the given object to - # it, receiving its object in return. The timeout value indicates the - # approximate number of seconds the method should block while waiting - # for the exchange. When the timeout value is `nil` the method will - # block indefinitely. - # - # @param [Object] value the value to exchange with another thread - # @param [Numeric, nil] timeout in seconds, `nil` blocks indefinitely - # - # @!macro exchanger_method_exchange - # - # In some edge cases when a `timeout` is given a return value of `nil` may be - # ambiguous. Specifically, if `nil` is a valid value in the exchange it will - # be impossible to tell whether `nil` is the actual return value or if it - # signifies timeout. When `nil` is a valid value in the exchange consider - # using {#exchange!} or {#try_exchange} instead. - # - # @return [Object] the value exchanged by the other thread or `nil` on timeout - def exchange(value, timeout = nil) - (value = do_exchange(value, timeout)) == CANCEL ? nil : value - end - - # @!macro exchanger_method_do_exchange - # @!macro exchanger_method_exchange_bang - # - # On timeout a {Concurrent::TimeoutError} exception will be raised. - # - # @return [Object] the value exchanged by the other thread - # @raise [Concurrent::TimeoutError] on timeout - def exchange!(value, timeout = nil) - if (value = do_exchange(value, timeout)) == CANCEL - raise Concurrent::TimeoutError - else - value - end - end - - # @!macro exchanger_method_do_exchange - # @!macro exchanger_method_try_exchange - # - # The return value will be a {Concurrent::Maybe} set to `Just` on success or - # `Nothing` on timeout. - # - # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with - # the item exchanged by the other thread as `#value`; on timeout a - # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` - # - # @example - # - # exchanger = Concurrent::Exchanger.new - # - # result = exchanger.exchange(:foo, 0.5) - # - # if result.just? - # puts result.value #=> :bar - # else - # puts 'timeout' - # end - def try_exchange(value, timeout = nil) - if (value = do_exchange(value, timeout)) == CANCEL - Concurrent::Maybe.nothing(Concurrent::TimeoutError) - else - Concurrent::Maybe.just(value) - end - end - - private - - # @!macro exchanger_method_do_exchange - # - # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout - def do_exchange(value, timeout) - raise NotImplementedError - end - end - - # @!macro internal_implementation_note - # @!visibility private - class RubyExchanger < AbstractExchanger - # A simplified version of java.util.concurrent.Exchanger written by - # Doug Lea, Bill Scherer, and Michael Scott with assistance from members - # of JCP JSR-166 Expert Group and released to the public domain. It does - # not include the arena or the multi-processor spin loops. - # http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/concurrent/Exchanger.java - - safe_initialization! - - class Node < Concurrent::Synchronization::Object - attr_atomic :value - safe_initialization! - - def initialize(item) - super() - @Item = item - @Latch = Concurrent::CountDownLatch.new - self.value = nil - end - - def latch - @Latch - end - - def item - @Item - end - end - private_constant :Node - - def initialize - super - end - - private - - attr_atomic(:slot) - - # @!macro exchanger_method_do_exchange - # - # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout - def do_exchange(value, timeout) - - # ALGORITHM - # - # From the original Java version: - # - # > The basic idea is to maintain a "slot", which is a reference to - # > a Node containing both an Item to offer and a "hole" waiting to - # > get filled in. If an incoming "occupying" thread sees that the - # > slot is null, it CAS'es (compareAndSets) a Node there and waits - # > for another to invoke exchange. That second "fulfilling" thread - # > sees that the slot is non-null, and so CASes it back to null, - # > also exchanging items by CASing the hole, plus waking up the - # > occupying thread if it is blocked. In each case CAS'es may - # > fail because a slot at first appears non-null but is null upon - # > CAS, or vice-versa. So threads may need to retry these - # > actions. - # - # This version: - # - # An exchange occurs between an "occupier" thread and a "fulfiller" thread. - # The "slot" is used to setup this interaction. The first thread in the - # exchange puts itself into the slot (occupies) and waits for a fulfiller. - # The second thread removes the occupier from the slot and attempts to - # perform the exchange. Removing the occupier also frees the slot for - # another occupier/fulfiller pair. - # - # Because the occupier and the fulfiller are operating independently and - # because there may be contention with other threads, any failed operation - # indicates contention. Both the occupier and the fulfiller operate within - # spin loops. Any failed actions along the happy path will cause the thread - # to repeat the loop and try again. - # - # When a timeout value is given the thread must be cognizant of time spent - # in the spin loop. The remaining time is checked every loop. When the time - # runs out the thread will exit. - # - # A "node" is the data structure used to perform the exchange. Only the - # occupier's node is necessary. It's the node used for the exchange. - # Each node has an "item," a "hole" (self), and a "latch." The item is the - # node's initial value. It never changes. It's what the fulfiller returns on - # success. The occupier's hole is where the fulfiller put its item. It's the - # item that the occupier returns on success. The latch is used for synchronization. - # Because a thread may act as either an occupier or fulfiller (or possibly - # both in periods of high contention) every thread creates a node when - # the exchange method is first called. - # - # The following steps occur within the spin loop. If any actions fail - # the thread will loop and try again, so long as there is time remaining. - # If time runs out the thread will return CANCEL. - # - # Check the slot for an occupier: - # - # * If the slot is empty try to occupy - # * If the slot is full try to fulfill - # - # Attempt to occupy: - # - # * Attempt to CAS myself into the slot - # * Go to sleep and wait to be woken by a fulfiller - # * If the sleep is successful then the fulfiller completed its happy path - # - Return the value from my hole (the value given by the fulfiller) - # * When the sleep fails (time ran out) attempt to cancel the operation - # - Attempt to CAS myself out of the hole - # - If successful there is no contention - # - Return CANCEL - # - On failure, I am competing with a fulfiller - # - Attempt to CAS my hole to CANCEL - # - On success - # - Let the fulfiller deal with my cancel - # - Return CANCEL - # - On failure the fulfiller has completed its happy path - # - Return th value from my hole (the fulfiller's value) - # - # Attempt to fulfill: - # - # * Attempt to CAS the occupier out of the slot - # - On failure loop again - # * Attempt to CAS my item into the occupier's hole - # - On failure the occupier is trying to cancel - # - Loop again - # - On success we are on the happy path - # - Wake the sleeping occupier - # - Return the occupier's item - - value = NULL if value.nil? # The sentinel allows nil to be a valid value - me = Node.new(value) # create my node in case I need to occupy - end_at = Concurrent.monotonic_time + timeout.to_f # The time to give up - - result = loop do - other = slot - if other && compare_and_set_slot(other, nil) - # try to fulfill - if other.compare_and_set_value(nil, value) - # happy path - other.latch.count_down - break other.item - end - elsif other.nil? && compare_and_set_slot(nil, me) - # try to occupy - timeout = end_at - Concurrent.monotonic_time if timeout - if me.latch.wait(timeout) - # happy path - break me.value - else - # attempt to remove myself from the slot - if compare_and_set_slot(me, nil) - break CANCEL - elsif !me.compare_and_set_value(nil, CANCEL) - # I've failed to block the fulfiller - break me.value - end - end - end - break CANCEL if timeout && Concurrent.monotonic_time >= end_at - end - - result == NULL ? nil : result - end - end - - if Concurrent.on_jruby? - require 'concurrent/utility/native_extension_loader' - - # @!macro internal_implementation_note - # @!visibility private - class JavaExchanger < AbstractExchanger - - def initialize - @exchanger = java.util.concurrent.Exchanger.new - end - - private - - # @!macro exchanger_method_do_exchange - # - # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout - def do_exchange(value, timeout) - result = nil - if timeout.nil? - Synchronization::JRuby.sleep_interruptibly do - result = @exchanger.exchange(value) - end - else - Synchronization::JRuby.sleep_interruptibly do - result = @exchanger.exchange(value, 1000 * timeout, java.util.concurrent.TimeUnit::MILLISECONDS) - end - end - result - rescue java.util.concurrent.TimeoutException - CANCEL - end - end - end - - # @!visibility private - # @!macro internal_implementation_note - ExchangerImplementation = case - when Concurrent.on_jruby? - JavaExchanger - else - RubyExchanger - end - private_constant :ExchangerImplementation - - # @!macro exchanger - class Exchanger < ExchangerImplementation - - # @!method initialize - # Creates exchanger instance - - # @!method exchange(value, timeout = nil) - # @!macro exchanger_method_do_exchange - # @!macro exchanger_method_exchange - - # @!method exchange!(value, timeout = nil) - # @!macro exchanger_method_do_exchange - # @!macro exchanger_method_exchange_bang - - # @!method try_exchange(value, timeout = nil) - # @!macro exchanger_method_do_exchange - # @!macro exchanger_method_try_exchange - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb deleted file mode 100644 index ac429531..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb +++ /dev/null @@ -1,131 +0,0 @@ -require 'concurrent/errors' -require 'concurrent/concern/deprecation' -require 'concurrent/executor/executor_service' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # @!macro abstract_executor_service_public_api - # @!visibility private - class AbstractExecutorService < Synchronization::LockableObject - include ExecutorService - include Concern::Deprecation - - # The set of possible fallback policies that may be set at thread pool creation. - FALLBACK_POLICIES = [:abort, :discard, :caller_runs].freeze - - # @!macro executor_service_attr_reader_fallback_policy - attr_reader :fallback_policy - - attr_reader :name - - # Create a new thread pool. - def initialize(opts = {}, &block) - super(&nil) - synchronize do - @auto_terminate = opts.fetch(:auto_terminate, true) - @name = opts.fetch(:name) if opts.key?(:name) - ns_initialize(opts, &block) - end - end - - def to_s - name ? "#{super[0..-2]} name: #{name}>" : super - end - - # @!macro executor_service_method_shutdown - def shutdown - raise NotImplementedError - end - - # @!macro executor_service_method_kill - def kill - raise NotImplementedError - end - - # @!macro executor_service_method_wait_for_termination - def wait_for_termination(timeout = nil) - raise NotImplementedError - end - - # @!macro executor_service_method_running_question - def running? - synchronize { ns_running? } - end - - # @!macro executor_service_method_shuttingdown_question - def shuttingdown? - synchronize { ns_shuttingdown? } - end - - # @!macro executor_service_method_shutdown_question - def shutdown? - synchronize { ns_shutdown? } - end - - # @!macro executor_service_method_auto_terminate_question - def auto_terminate? - synchronize { @auto_terminate } - end - - # @!macro executor_service_method_auto_terminate_setter - def auto_terminate=(value) - deprecated "Method #auto_terminate= has no effect. Set :auto_terminate option when executor is initialized." - end - - private - - # Returns an action which executes the `fallback_policy` once the queue - # size reaches `max_queue`. The reason for the indirection of an action - # is so that the work can be deferred outside of synchronization. - # - # @param [Array] args the arguments to the task which is being handled. - # - # @!visibility private - def fallback_action(*args) - case fallback_policy - when :abort - lambda { raise RejectedExecutionError } - when :discard - lambda { false } - when :caller_runs - lambda { - begin - yield(*args) - rescue => ex - # let it fail - log DEBUG, ex - end - true - } - else - lambda { fail "Unknown fallback policy #{fallback_policy}" } - end - end - - def ns_execute(*args, &task) - raise NotImplementedError - end - - # @!macro executor_service_method_ns_shutdown_execution - # - # Callback method called when an orderly shutdown has completed. - # The default behavior is to signal all waiting threads. - def ns_shutdown_execution - # do nothing - end - - # @!macro executor_service_method_ns_kill_execution - # - # Callback method called when the executor has been killed. - # The default behavior is to do nothing. - def ns_kill_execution - # do nothing - end - - def ns_auto_terminate? - @auto_terminate - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb deleted file mode 100644 index de50ed17..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/executor/thread_pool_executor' - -module Concurrent - - # A thread pool that dynamically grows and shrinks to fit the current workload. - # New threads are created as needed, existing threads are reused, and threads - # that remain idle for too long are killed and removed from the pool. These - # pools are particularly suited to applications that perform a high volume of - # short-lived tasks. - # - # On creation a `CachedThreadPool` has zero running threads. New threads are - # created on the pool as new operations are `#post`. The size of the pool - # will grow until `#max_length` threads are in the pool or until the number - # of threads exceeds the number of running and pending operations. When a new - # operation is post to the pool the first available idle thread will be tasked - # with the new operation. - # - # Should a thread crash for any reason the thread will immediately be removed - # from the pool. Similarly, threads which remain idle for an extended period - # of time will be killed and reclaimed. Thus these thread pools are very - # efficient at reclaiming unused resources. - # - # The API and behavior of this class are based on Java's `CachedThreadPool` - # - # @!macro thread_pool_options - class CachedThreadPool < ThreadPoolExecutor - - # @!macro cached_thread_pool_method_initialize - # - # Create a new thread pool. - # - # @param [Hash] opts the options defining pool behavior. - # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy - # - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- - def initialize(opts = {}) - defaults = { idletime: DEFAULT_THREAD_IDLETIMEOUT } - overrides = { min_threads: 0, - max_threads: DEFAULT_MAX_POOL_SIZE, - max_queue: DEFAULT_MAX_QUEUE_SIZE } - super(defaults.merge(opts).merge(overrides)) - end - - private - - # @!macro cached_thread_pool_method_initialize - # @!visibility private - def ns_initialize(opts) - super(opts) - if Concurrent.on_jruby? - @max_queue = 0 - @executor = java.util.concurrent.Executors.newCachedThreadPool( - DaemonThreadFactory.new(ns_auto_terminate?)) - @executor.setRejectedExecutionHandler(FALLBACK_POLICY_CLASSES[@fallback_policy].new) - @executor.setKeepAliveTime(opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT), java.util.concurrent.TimeUnit::SECONDS) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/executor_service.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/executor_service.rb deleted file mode 100644 index 7e344919..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/executor_service.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'concurrent/concern/logging' - -module Concurrent - - ################################################################### - - # @!macro executor_service_method_post - # - # Submit a task to the executor for asynchronous processing. - # - # @param [Array] args zero or more arguments to be passed to the task - # - # @yield the asynchronous task to perform - # - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # - # @raise [ArgumentError] if no task is given - - # @!macro executor_service_method_left_shift - # - # Submit a task to the executor for asynchronous processing. - # - # @param [Proc] task the asynchronous task to perform - # - # @return [self] returns itself - - # @!macro executor_service_method_can_overflow_question - # - # Does the task queue have a maximum size? - # - # @return [Boolean] True if the task queue has a maximum size else false. - - # @!macro executor_service_method_serialized_question - # - # Does this executor guarantee serialization of its operations? - # - # @return [Boolean] True if the executor guarantees that all operations - # will be post in the order they are received and no two operations may - # occur simultaneously. Else false. - - ################################################################### - - # @!macro executor_service_public_api - # - # @!method post(*args, &task) - # @!macro executor_service_method_post - # - # @!method <<(task) - # @!macro executor_service_method_left_shift - # - # @!method can_overflow? - # @!macro executor_service_method_can_overflow_question - # - # @!method serialized? - # @!macro executor_service_method_serialized_question - - ################################################################### - - # @!macro executor_service_attr_reader_fallback_policy - # @return [Symbol] The fallback policy in effect. Either `:abort`, `:discard`, or `:caller_runs`. - - # @!macro executor_service_method_shutdown - # - # Begin an orderly shutdown. Tasks already in the queue will be executed, - # but no new tasks will be accepted. Has no additional effect if the - # thread pool is not running. - - # @!macro executor_service_method_kill - # - # Begin an immediate shutdown. In-progress tasks will be allowed to - # complete but enqueued tasks will be dismissed and no new tasks - # will be accepted. Has no additional effect if the thread pool is - # not running. - - # @!macro executor_service_method_wait_for_termination - # - # Block until executor shutdown is complete or until `timeout` seconds have - # passed. - # - # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` - # must be called before this method (or on another thread). - # - # @param [Integer] timeout the maximum number of seconds to wait for shutdown to complete - # - # @return [Boolean] `true` if shutdown complete or false on `timeout` - - # @!macro executor_service_method_running_question - # - # Is the executor running? - # - # @return [Boolean] `true` when running, `false` when shutting down or shutdown - - # @!macro executor_service_method_shuttingdown_question - # - # Is the executor shuttingdown? - # - # @return [Boolean] `true` when not running and not shutdown, else `false` - - # @!macro executor_service_method_shutdown_question - # - # Is the executor shutdown? - # - # @return [Boolean] `true` when shutdown, `false` when shutting down or running - - # @!macro executor_service_method_auto_terminate_question - # - # Is the executor auto-terminate when the application exits? - # - # @return [Boolean] `true` when auto-termination is enabled else `false`. - - # @!macro executor_service_method_auto_terminate_setter - # - # - # Set the auto-terminate behavior for this executor. - # @deprecated Has no effect - # @param [Boolean] value The new auto-terminate value to set for this executor. - # @return [Boolean] `true` when auto-termination is enabled else `false`. - - ################################################################### - - # @!macro abstract_executor_service_public_api - # - # @!macro executor_service_public_api - # - # @!attribute [r] fallback_policy - # @!macro executor_service_attr_reader_fallback_policy - # - # @!method shutdown - # @!macro executor_service_method_shutdown - # - # @!method kill - # @!macro executor_service_method_kill - # - # @!method wait_for_termination(timeout = nil) - # @!macro executor_service_method_wait_for_termination - # - # @!method running? - # @!macro executor_service_method_running_question - # - # @!method shuttingdown? - # @!macro executor_service_method_shuttingdown_question - # - # @!method shutdown? - # @!macro executor_service_method_shutdown_question - # - # @!method auto_terminate? - # @!macro executor_service_method_auto_terminate_question - # - # @!method auto_terminate=(value) - # @!macro executor_service_method_auto_terminate_setter - - ################################################################### - - # @!macro executor_service_public_api - # @!visibility private - module ExecutorService - include Concern::Logging - - # @!macro executor_service_method_post - def post(*args, &task) - raise NotImplementedError - end - - # @!macro executor_service_method_left_shift - def <<(task) - post(&task) - self - end - - # @!macro executor_service_method_can_overflow_question - # - # @note Always returns `false` - def can_overflow? - false - end - - # @!macro executor_service_method_serialized_question - # - # @note Always returns `false` - def serialized? - false - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb deleted file mode 100644 index 8324c067..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb +++ /dev/null @@ -1,224 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/executor/thread_pool_executor' - -module Concurrent - - # @!macro thread_pool_executor_constant_default_max_pool_size - # Default maximum number of threads that will be created in the pool. - - # @!macro thread_pool_executor_constant_default_min_pool_size - # Default minimum number of threads that will be retained in the pool. - - # @!macro thread_pool_executor_constant_default_max_queue_size - # Default maximum number of tasks that may be added to the task queue. - - # @!macro thread_pool_executor_constant_default_thread_timeout - # Default maximum number of seconds a thread in the pool may remain idle - # before being reclaimed. - - # @!macro thread_pool_executor_constant_default_synchronous - # Default value of the :synchronous option. - - # @!macro thread_pool_executor_attr_reader_max_length - # The maximum number of threads that may be created in the pool. - # @return [Integer] The maximum number of threads that may be created in the pool. - - # @!macro thread_pool_executor_attr_reader_min_length - # The minimum number of threads that may be retained in the pool. - # @return [Integer] The minimum number of threads that may be retained in the pool. - - # @!macro thread_pool_executor_attr_reader_largest_length - # The largest number of threads that have been created in the pool since construction. - # @return [Integer] The largest number of threads that have been created in the pool since construction. - - # @!macro thread_pool_executor_attr_reader_scheduled_task_count - # The number of tasks that have been scheduled for execution on the pool since construction. - # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction. - - # @!macro thread_pool_executor_attr_reader_completed_task_count - # The number of tasks that have been completed by the pool since construction. - # @return [Integer] The number of tasks that have been completed by the pool since construction. - - # @!macro thread_pool_executor_method_active_count - # The number of threads that are actively executing tasks. - # @return [Integer] The number of threads that are actively executing tasks. - - # @!macro thread_pool_executor_attr_reader_idletime - # The number of seconds that a thread may be idle before being reclaimed. - # @return [Integer] The number of seconds that a thread may be idle before being reclaimed. - - # @!macro thread_pool_executor_attr_reader_synchronous - # Whether or not a value of 0 for :max_queue option means the queue must perform direct hand-off or rather unbounded queue. - # @return [true, false] - - # @!macro thread_pool_executor_attr_reader_max_queue - # The maximum number of tasks that may be waiting in the work queue at any one time. - # When the queue size reaches `max_queue` subsequent tasks will be rejected in - # accordance with the configured `fallback_policy`. - # - # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time. - # When the queue size reaches `max_queue` subsequent tasks will be rejected in - # accordance with the configured `fallback_policy`. - - # @!macro thread_pool_executor_attr_reader_length - # The number of threads currently in the pool. - # @return [Integer] The number of threads currently in the pool. - - # @!macro thread_pool_executor_attr_reader_queue_length - # The number of tasks in the queue awaiting execution. - # @return [Integer] The number of tasks in the queue awaiting execution. - - # @!macro thread_pool_executor_attr_reader_remaining_capacity - # Number of tasks that may be enqueued before reaching `max_queue` and rejecting - # new tasks. A value of -1 indicates that the queue may grow without bound. - # - # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting - # new tasks. A value of -1 indicates that the queue may grow without bound. - - # @!macro thread_pool_executor_method_prune_pool - # Prune the thread pool of unneeded threads - # - # What is being pruned is controlled by the min_threads and idletime - # parameters passed at pool creation time - # - # This is a no-op on some pool implementation (e.g. the Java one). The Ruby - # pool will auto-prune each time a new job is posted. You will need to call - # this method explicitly in case your application post jobs in bursts (a - # lot of jobs and then nothing for long periods) - - # @!macro thread_pool_executor_public_api - # - # @!macro abstract_executor_service_public_api - # - # @!attribute [r] max_length - # @!macro thread_pool_executor_attr_reader_max_length - # - # @!attribute [r] min_length - # @!macro thread_pool_executor_attr_reader_min_length - # - # @!attribute [r] largest_length - # @!macro thread_pool_executor_attr_reader_largest_length - # - # @!attribute [r] scheduled_task_count - # @!macro thread_pool_executor_attr_reader_scheduled_task_count - # - # @!attribute [r] completed_task_count - # @!macro thread_pool_executor_attr_reader_completed_task_count - # - # @!attribute [r] idletime - # @!macro thread_pool_executor_attr_reader_idletime - # - # @!attribute [r] max_queue - # @!macro thread_pool_executor_attr_reader_max_queue - # - # @!attribute [r] length - # @!macro thread_pool_executor_attr_reader_length - # - # @!attribute [r] queue_length - # @!macro thread_pool_executor_attr_reader_queue_length - # - # @!attribute [r] remaining_capacity - # @!macro thread_pool_executor_attr_reader_remaining_capacity - # - # @!method can_overflow? - # @!macro executor_service_method_can_overflow_question - # - # @!method prune_pool - # @!macro thread_pool_executor_method_prune_pool - - - - - # @!macro thread_pool_options - # - # **Thread Pool Options** - # - # Thread pools support several configuration options: - # - # * `idletime`: The number of seconds that a thread may be idle before being reclaimed. - # * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and - # a `-worker-` name is given to its threads if supported by used Ruby - # implementation. `` is uniq for each thread. - # * `max_queue`: The maximum number of tasks that may be waiting in the work queue at - # any one time. When the queue size reaches `max_queue` and no new threads can be created, - # subsequent tasks will be rejected in accordance with the configured `fallback_policy`. - # * `auto_terminate`: When true (default), the threads started will be marked as daemon. - # * `fallback_policy`: The policy defining how rejected tasks are handled. - # - # Three fallback policies are supported: - # - # * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. - # * `:discard`: Discard the task and return false. - # * `:caller_runs`: Execute the task on the calling thread. - # - # **Shutting Down Thread Pools** - # - # Killing a thread pool while tasks are still being processed, either by calling - # the `#kill` method or at application exit, will have unpredictable results. There - # is no way for the thread pool to know what resources are being used by the - # in-progress tasks. When those tasks are killed the impact on those resources - # cannot be predicted. The *best* practice is to explicitly shutdown all thread - # pools using the provided methods: - # - # * Call `#shutdown` to initiate an orderly termination of all in-progress tasks - # * Call `#wait_for_termination` with an appropriate timeout interval an allow - # the orderly shutdown to complete - # * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time - # - # On some runtime platforms (most notably the JVM) the application will not - # exit until all thread pools have been shutdown. To prevent applications from - # "hanging" on exit, all threads can be marked as daemon according to the - # `:auto_terminate` option. - # - # ```ruby - # pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon - # pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon - # ``` - # - # @note Failure to properly shutdown a thread pool can lead to unpredictable results. - # Please read *Shutting Down Thread Pools* for more information. - # - # @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface - # @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- - - - - - - # @!macro fixed_thread_pool - # - # A thread pool that reuses a fixed number of threads operating off an unbounded queue. - # At any point, at most `num_threads` will be active processing tasks. When all threads are busy new - # tasks `#post` to the thread pool are enqueued until a thread becomes available. - # Should a thread crash for any reason the thread will immediately be removed - # from the pool and replaced. - # - # The API and behavior of this class are based on Java's `FixedThreadPool` - # - # @!macro thread_pool_options - class FixedThreadPool < ThreadPoolExecutor - - # @!macro fixed_thread_pool_method_initialize - # - # Create a new thread pool. - # - # @param [Integer] num_threads the number of threads to allocate - # @param [Hash] opts the options defining pool behavior. - # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy - # - # @raise [ArgumentError] if `num_threads` is less than or equal to zero - # @raise [ArgumentError] if `fallback_policy` is not a known policy - # - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- - def initialize(num_threads, opts = {}) - raise ArgumentError.new('number of threads must be greater than zero') if num_threads.to_i < 1 - defaults = { max_queue: DEFAULT_MAX_QUEUE_SIZE, - idletime: DEFAULT_THREAD_IDLETIMEOUT } - overrides = { min_threads: num_threads, - max_threads: num_threads } - super(defaults.merge(opts).merge(overrides)) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/immediate_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/immediate_executor.rb deleted file mode 100644 index 282df7a0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/immediate_executor.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'concurrent/atomic/event' -require 'concurrent/executor/abstract_executor_service' -require 'concurrent/executor/serial_executor_service' - -module Concurrent - - # An executor service which runs all operations on the current thread, - # blocking as necessary. Operations are performed in the order they are - # received and no two operations can be performed simultaneously. - # - # This executor service exists mainly for testing an debugging. When used - # it immediately runs every `#post` operation on the current thread, blocking - # that thread until the operation is complete. This can be very beneficial - # during testing because it makes all operations deterministic. - # - # @note Intended for use primarily in testing and debugging. - class ImmediateExecutor < AbstractExecutorService - include SerialExecutorService - - # Creates a new executor - def initialize - @stopped = Concurrent::Event.new - end - - # @!macro executor_service_method_post - def post(*args, &task) - raise ArgumentError.new('no block given') unless block_given? - return false unless running? - task.call(*args) - true - end - - # @!macro executor_service_method_left_shift - def <<(task) - post(&task) - self - end - - # @!macro executor_service_method_running_question - def running? - ! shutdown? - end - - # @!macro executor_service_method_shuttingdown_question - def shuttingdown? - false - end - - # @!macro executor_service_method_shutdown_question - def shutdown? - @stopped.set? - end - - # @!macro executor_service_method_shutdown - def shutdown - @stopped.set - true - end - alias_method :kill, :shutdown - - # @!macro executor_service_method_wait_for_termination - def wait_for_termination(timeout = nil) - @stopped.wait(timeout) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb deleted file mode 100644 index 4f9769fa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'concurrent/executor/immediate_executor' -require 'concurrent/executor/simple_executor_service' - -module Concurrent - # An executor service which runs all operations on a new thread, blocking - # until it completes. Operations are performed in the order they are received - # and no two operations can be performed simultaneously. - # - # This executor service exists mainly for testing an debugging. When used it - # immediately runs every `#post` operation on a new thread, blocking the - # current thread until the operation is complete. This is similar to how the - # ImmediateExecutor works, but the operation has the full stack of the new - # thread at its disposal. This can be helpful when the operations will spawn - # more operations on the same executor and so on - such a situation might - # overflow the single stack in case of an ImmediateExecutor, which is - # inconsistent with how it would behave for a threaded executor. - # - # @note Intended for use primarily in testing and debugging. - class IndirectImmediateExecutor < ImmediateExecutor - # Creates a new executor - def initialize - super - @internal_executor = SimpleExecutorService.new - end - - # @!macro executor_service_method_post - def post(*args, &task) - raise ArgumentError.new("no block given") unless block_given? - return false unless running? - - event = Concurrent::Event.new - @internal_executor.post do - begin - task.call(*args) - ensure - event.set - end - end - event.wait - - true - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb deleted file mode 100644 index b2bc69a6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb +++ /dev/null @@ -1,100 +0,0 @@ -require 'concurrent/utility/engine' - -if Concurrent.on_jruby? - require 'concurrent/errors' - require 'concurrent/executor/abstract_executor_service' - - module Concurrent - - # @!macro abstract_executor_service_public_api - # @!visibility private - class JavaExecutorService < AbstractExecutorService - java_import 'java.lang.Runnable' - - FALLBACK_POLICY_CLASSES = { - abort: java.util.concurrent.ThreadPoolExecutor::AbortPolicy, - discard: java.util.concurrent.ThreadPoolExecutor::DiscardPolicy, - caller_runs: java.util.concurrent.ThreadPoolExecutor::CallerRunsPolicy - }.freeze - private_constant :FALLBACK_POLICY_CLASSES - - def post(*args, &task) - raise ArgumentError.new('no block given') unless block_given? - return fallback_action(*args, &task).call unless running? - @executor.submit Job.new(args, task) - true - rescue Java::JavaUtilConcurrent::RejectedExecutionException - raise RejectedExecutionError - end - - def wait_for_termination(timeout = nil) - if timeout.nil? - ok = @executor.awaitTermination(60, java.util.concurrent.TimeUnit::SECONDS) until ok - true - else - @executor.awaitTermination(1000 * timeout, java.util.concurrent.TimeUnit::MILLISECONDS) - end - end - - def shutdown - synchronize do - @executor.shutdown - nil - end - end - - def kill - synchronize do - @executor.shutdownNow - nil - end - end - - private - - def ns_running? - !(ns_shuttingdown? || ns_shutdown?) - end - - def ns_shuttingdown? - @executor.isShutdown && !@executor.isTerminated - end - - def ns_shutdown? - @executor.isTerminated - end - - class Job - include Runnable - def initialize(args, block) - @args = args - @block = block - end - - def run - @block.call(*@args) - end - end - private_constant :Job - end - - class DaemonThreadFactory - # hide include from YARD - send :include, java.util.concurrent.ThreadFactory - - def initialize(daemonize = true) - @daemonize = daemonize - @java_thread_factory = java.util.concurrent.Executors.defaultThreadFactory - end - - def newThread(runnable) - thread = @java_thread_factory.newThread(runnable) - thread.setDaemon(@daemonize) - return thread - end - end - - private_constant :DaemonThreadFactory - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb deleted file mode 100644 index 7aa24f2d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb +++ /dev/null @@ -1,30 +0,0 @@ -if Concurrent.on_jruby? - - require 'concurrent/executor/java_executor_service' - require 'concurrent/executor/serial_executor_service' - - module Concurrent - - # @!macro single_thread_executor - # @!macro abstract_executor_service_public_api - # @!visibility private - class JavaSingleThreadExecutor < JavaExecutorService - include SerialExecutorService - - # @!macro single_thread_executor_method_initialize - def initialize(opts = {}) - super(opts) - end - - private - - def ns_initialize(opts) - @executor = java.util.concurrent.Executors.newSingleThreadExecutor( - DaemonThreadFactory.new(ns_auto_terminate?) - ) - @fallback_policy = opts.fetch(:fallback_policy, :discard) - raise ArgumentError.new("#{@fallback_policy} is not a valid fallback policy") unless FALLBACK_POLICY_CLASSES.keys.include?(@fallback_policy) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb deleted file mode 100644 index 598a5f91..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb +++ /dev/null @@ -1,145 +0,0 @@ -if Concurrent.on_jruby? - - require 'concurrent/executor/java_executor_service' - - module Concurrent - - # @!macro thread_pool_executor - # @!macro thread_pool_options - # @!visibility private - class JavaThreadPoolExecutor < JavaExecutorService - - # @!macro thread_pool_executor_constant_default_max_pool_size - DEFAULT_MAX_POOL_SIZE = java.lang.Integer::MAX_VALUE # 2147483647 - - # @!macro thread_pool_executor_constant_default_min_pool_size - DEFAULT_MIN_POOL_SIZE = 0 - - # @!macro thread_pool_executor_constant_default_max_queue_size - DEFAULT_MAX_QUEUE_SIZE = 0 - - # @!macro thread_pool_executor_constant_default_thread_timeout - DEFAULT_THREAD_IDLETIMEOUT = 60 - - # @!macro thread_pool_executor_constant_default_synchronous - DEFAULT_SYNCHRONOUS = false - - # @!macro thread_pool_executor_attr_reader_max_length - attr_reader :max_length - - # @!macro thread_pool_executor_attr_reader_max_queue - attr_reader :max_queue - - # @!macro thread_pool_executor_attr_reader_synchronous - attr_reader :synchronous - - # @!macro thread_pool_executor_method_initialize - def initialize(opts = {}) - super(opts) - end - - # @!macro executor_service_method_can_overflow_question - def can_overflow? - @max_queue != 0 - end - - # @!macro thread_pool_executor_attr_reader_min_length - def min_length - @executor.getCorePoolSize - end - - # @!macro thread_pool_executor_attr_reader_max_length - def max_length - @executor.getMaximumPoolSize - end - - # @!macro thread_pool_executor_attr_reader_length - def length - @executor.getPoolSize - end - - # @!macro thread_pool_executor_attr_reader_largest_length - def largest_length - @executor.getLargestPoolSize - end - - # @!macro thread_pool_executor_attr_reader_scheduled_task_count - def scheduled_task_count - @executor.getTaskCount - end - - # @!macro thread_pool_executor_attr_reader_completed_task_count - def completed_task_count - @executor.getCompletedTaskCount - end - - # @!macro thread_pool_executor_method_active_count - def active_count - @executor.getActiveCount - end - - # @!macro thread_pool_executor_attr_reader_idletime - def idletime - @executor.getKeepAliveTime(java.util.concurrent.TimeUnit::SECONDS) - end - - # @!macro thread_pool_executor_attr_reader_queue_length - def queue_length - @executor.getQueue.size - end - - # @!macro thread_pool_executor_attr_reader_remaining_capacity - def remaining_capacity - @max_queue == 0 ? -1 : @executor.getQueue.remainingCapacity - end - - # @!macro executor_service_method_running_question - def running? - super && !@executor.isTerminating - end - - # @!macro thread_pool_executor_method_prune_pool - def prune_pool - end - - private - - def ns_initialize(opts) - min_length = opts.fetch(:min_threads, DEFAULT_MIN_POOL_SIZE).to_i - max_length = opts.fetch(:max_threads, DEFAULT_MAX_POOL_SIZE).to_i - idletime = opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT).to_i - @max_queue = opts.fetch(:max_queue, DEFAULT_MAX_QUEUE_SIZE).to_i - @synchronous = opts.fetch(:synchronous, DEFAULT_SYNCHRONOUS) - @fallback_policy = opts.fetch(:fallback_policy, :abort) - - raise ArgumentError.new("`synchronous` cannot be set unless `max_queue` is 0") if @synchronous && @max_queue > 0 - raise ArgumentError.new("`max_threads` cannot be less than #{DEFAULT_MIN_POOL_SIZE}") if max_length < DEFAULT_MIN_POOL_SIZE - raise ArgumentError.new("`max_threads` cannot be greater than #{DEFAULT_MAX_POOL_SIZE}") if max_length > DEFAULT_MAX_POOL_SIZE - raise ArgumentError.new("`min_threads` cannot be less than #{DEFAULT_MIN_POOL_SIZE}") if min_length < DEFAULT_MIN_POOL_SIZE - raise ArgumentError.new("`min_threads` cannot be more than `max_threads`") if min_length > max_length - raise ArgumentError.new("#{fallback_policy} is not a valid fallback policy") unless FALLBACK_POLICY_CLASSES.include?(@fallback_policy) - - if @max_queue == 0 - if @synchronous - queue = java.util.concurrent.SynchronousQueue.new - else - queue = java.util.concurrent.LinkedBlockingQueue.new - end - else - queue = java.util.concurrent.LinkedBlockingQueue.new(@max_queue) - end - - @executor = java.util.concurrent.ThreadPoolExecutor.new( - min_length, - max_length, - idletime, - java.util.concurrent.TimeUnit::SECONDS, - queue, - DaemonThreadFactory.new(ns_auto_terminate?), - FALLBACK_POLICY_CLASSES[@fallback_policy].new) - - end - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb deleted file mode 100644 index 1f7301b9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb +++ /dev/null @@ -1,82 +0,0 @@ -require 'concurrent/executor/abstract_executor_service' -require 'concurrent/atomic/event' - -module Concurrent - - # @!macro abstract_executor_service_public_api - # @!visibility private - class RubyExecutorService < AbstractExecutorService - safe_initialization! - - def initialize(*args, &block) - super - @StopEvent = Event.new - @StoppedEvent = Event.new - end - - def post(*args, &task) - raise ArgumentError.new('no block given') unless block_given? - deferred_action = synchronize { - if running? - ns_execute(*args, &task) - else - fallback_action(*args, &task) - end - } - if deferred_action - deferred_action.call - else - true - end - end - - def shutdown - synchronize do - break unless running? - stop_event.set - ns_shutdown_execution - end - true - end - - def kill - synchronize do - break if shutdown? - stop_event.set - ns_kill_execution - stopped_event.set - end - true - end - - def wait_for_termination(timeout = nil) - stopped_event.wait(timeout) - end - - private - - def stop_event - @StopEvent - end - - def stopped_event - @StoppedEvent - end - - def ns_shutdown_execution - stopped_event.set - end - - def ns_running? - !stop_event.set? - end - - def ns_shuttingdown? - !(ns_running? || ns_shutdown?) - end - - def ns_shutdown? - stopped_event.set? - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb deleted file mode 100644 index 916337d4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'concurrent/executor/ruby_thread_pool_executor' - -module Concurrent - - # @!macro single_thread_executor - # @!macro abstract_executor_service_public_api - # @!visibility private - class RubySingleThreadExecutor < RubyThreadPoolExecutor - - # @!macro single_thread_executor_method_initialize - def initialize(opts = {}) - super( - min_threads: 1, - max_threads: 1, - max_queue: 0, - idletime: DEFAULT_THREAD_IDLETIMEOUT, - fallback_policy: opts.fetch(:fallback_policy, :discard), - ) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb deleted file mode 100644 index 9375acf3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb +++ /dev/null @@ -1,373 +0,0 @@ -require 'thread' -require 'concurrent/atomic/event' -require 'concurrent/concern/logging' -require 'concurrent/executor/ruby_executor_service' -require 'concurrent/utility/monotonic_time' - -module Concurrent - - # @!macro thread_pool_executor - # @!macro thread_pool_options - # @!visibility private - class RubyThreadPoolExecutor < RubyExecutorService - - # @!macro thread_pool_executor_constant_default_max_pool_size - DEFAULT_MAX_POOL_SIZE = 2_147_483_647 # java.lang.Integer::MAX_VALUE - - # @!macro thread_pool_executor_constant_default_min_pool_size - DEFAULT_MIN_POOL_SIZE = 0 - - # @!macro thread_pool_executor_constant_default_max_queue_size - DEFAULT_MAX_QUEUE_SIZE = 0 - - # @!macro thread_pool_executor_constant_default_thread_timeout - DEFAULT_THREAD_IDLETIMEOUT = 60 - - # @!macro thread_pool_executor_constant_default_synchronous - DEFAULT_SYNCHRONOUS = false - - # @!macro thread_pool_executor_attr_reader_max_length - attr_reader :max_length - - # @!macro thread_pool_executor_attr_reader_min_length - attr_reader :min_length - - # @!macro thread_pool_executor_attr_reader_idletime - attr_reader :idletime - - # @!macro thread_pool_executor_attr_reader_max_queue - attr_reader :max_queue - - # @!macro thread_pool_executor_attr_reader_synchronous - attr_reader :synchronous - - # @!macro thread_pool_executor_method_initialize - def initialize(opts = {}) - super(opts) - end - - # @!macro thread_pool_executor_attr_reader_largest_length - def largest_length - synchronize { @largest_length } - end - - # @!macro thread_pool_executor_attr_reader_scheduled_task_count - def scheduled_task_count - synchronize { @scheduled_task_count } - end - - # @!macro thread_pool_executor_attr_reader_completed_task_count - def completed_task_count - synchronize { @completed_task_count } - end - - # @!macro thread_pool_executor_method_active_count - def active_count - synchronize do - @pool.length - @ready.length - end - end - - # @!macro executor_service_method_can_overflow_question - def can_overflow? - synchronize { ns_limited_queue? } - end - - # @!macro thread_pool_executor_attr_reader_length - def length - synchronize { @pool.length } - end - - # @!macro thread_pool_executor_attr_reader_queue_length - def queue_length - synchronize { @queue.length } - end - - # @!macro thread_pool_executor_attr_reader_remaining_capacity - def remaining_capacity - synchronize do - if ns_limited_queue? - @max_queue - @queue.length - else - -1 - end - end - end - - # @!visibility private - def remove_busy_worker(worker) - synchronize { ns_remove_busy_worker worker } - end - - # @!visibility private - def ready_worker(worker, last_message) - synchronize { ns_ready_worker worker, last_message } - end - - # @!visibility private - def worker_died(worker) - synchronize { ns_worker_died worker } - end - - # @!visibility private - def worker_task_completed - synchronize { @completed_task_count += 1 } - end - - # @!macro thread_pool_executor_method_prune_pool - def prune_pool - synchronize { ns_prune_pool } - end - - private - - # @!visibility private - def ns_initialize(opts) - @min_length = opts.fetch(:min_threads, DEFAULT_MIN_POOL_SIZE).to_i - @max_length = opts.fetch(:max_threads, DEFAULT_MAX_POOL_SIZE).to_i - @idletime = opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT).to_i - @max_queue = opts.fetch(:max_queue, DEFAULT_MAX_QUEUE_SIZE).to_i - @synchronous = opts.fetch(:synchronous, DEFAULT_SYNCHRONOUS) - @fallback_policy = opts.fetch(:fallback_policy, :abort) - - raise ArgumentError.new("`synchronous` cannot be set unless `max_queue` is 0") if @synchronous && @max_queue > 0 - raise ArgumentError.new("#{@fallback_policy} is not a valid fallback policy") unless FALLBACK_POLICIES.include?(@fallback_policy) - raise ArgumentError.new("`max_threads` cannot be less than #{DEFAULT_MIN_POOL_SIZE}") if @max_length < DEFAULT_MIN_POOL_SIZE - raise ArgumentError.new("`max_threads` cannot be greater than #{DEFAULT_MAX_POOL_SIZE}") if @max_length > DEFAULT_MAX_POOL_SIZE - raise ArgumentError.new("`min_threads` cannot be less than #{DEFAULT_MIN_POOL_SIZE}") if @min_length < DEFAULT_MIN_POOL_SIZE - raise ArgumentError.new("`min_threads` cannot be more than `max_threads`") if min_length > max_length - - @pool = [] # all workers - @ready = [] # used as a stash (most idle worker is at the start) - @queue = [] # used as queue - # @ready or @queue is empty at all times - @scheduled_task_count = 0 - @completed_task_count = 0 - @largest_length = 0 - @workers_counter = 0 - @ruby_pid = $$ # detects if Ruby has forked - - @gc_interval = opts.fetch(:gc_interval, @idletime / 2.0).to_i # undocumented - @next_gc_time = Concurrent.monotonic_time + @gc_interval - end - - # @!visibility private - def ns_limited_queue? - @max_queue != 0 - end - - # @!visibility private - def ns_execute(*args, &task) - ns_reset_if_forked - - if ns_assign_worker(*args, &task) || ns_enqueue(*args, &task) - @scheduled_task_count += 1 - else - return fallback_action(*args, &task) - end - - ns_prune_pool if @next_gc_time < Concurrent.monotonic_time - nil - end - - # @!visibility private - def ns_shutdown_execution - ns_reset_if_forked - - if @pool.empty? - # nothing to do - stopped_event.set - end - - if @queue.empty? - # no more tasks will be accepted, just stop all workers - @pool.each(&:stop) - end - end - - # @!visibility private - def ns_kill_execution - # TODO log out unprocessed tasks in queue - # TODO try to shutdown first? - @pool.each(&:kill) - @pool.clear - @ready.clear - end - - # tries to assign task to a worker, tries to get one from @ready or to create new one - # @return [true, false] if task is assigned to a worker - # - # @!visibility private - def ns_assign_worker(*args, &task) - # keep growing if the pool is not at the minimum yet - worker, _ = (@ready.pop if @pool.size >= @min_length) || ns_add_busy_worker - if worker - worker << [task, args] - true - else - false - end - rescue ThreadError - # Raised when the operating system refuses to create the new thread - return false - end - - # tries to enqueue task - # @return [true, false] if enqueued - # - # @!visibility private - def ns_enqueue(*args, &task) - return false if @synchronous - - if !ns_limited_queue? || @queue.size < @max_queue - @queue << [task, args] - true - else - false - end - end - - # @!visibility private - def ns_worker_died(worker) - ns_remove_busy_worker worker - replacement_worker = ns_add_busy_worker - ns_ready_worker replacement_worker, Concurrent.monotonic_time, false if replacement_worker - end - - # creates new worker which has to receive work to do after it's added - # @return [nil, Worker] nil of max capacity is reached - # - # @!visibility private - def ns_add_busy_worker - return if @pool.size >= @max_length - - @workers_counter += 1 - @pool << (worker = Worker.new(self, @workers_counter)) - @largest_length = @pool.length if @pool.length > @largest_length - worker - end - - # handle ready worker, giving it new job or assigning back to @ready - # - # @!visibility private - def ns_ready_worker(worker, last_message, success = true) - task_and_args = @queue.shift - if task_and_args - worker << task_and_args - else - # stop workers when !running?, do not return them to @ready - if running? - raise unless last_message - @ready.push([worker, last_message]) - else - worker.stop - end - end - end - - # removes a worker which is not in not tracked in @ready - # - # @!visibility private - def ns_remove_busy_worker(worker) - @pool.delete(worker) - stopped_event.set if @pool.empty? && !running? - true - end - - # try oldest worker if it is idle for enough time, it's returned back at the start - # - # @!visibility private - def ns_prune_pool - now = Concurrent.monotonic_time - stopped_workers = 0 - while !@ready.empty? && (@pool.size - stopped_workers > @min_length) - worker, last_message = @ready.first - if now - last_message > self.idletime - stopped_workers += 1 - @ready.shift - worker << :stop - else break - end - end - - @next_gc_time = Concurrent.monotonic_time + @gc_interval - end - - def ns_reset_if_forked - if $$ != @ruby_pid - @queue.clear - @ready.clear - @pool.clear - @scheduled_task_count = 0 - @completed_task_count = 0 - @largest_length = 0 - @workers_counter = 0 - @ruby_pid = $$ - end - end - - # @!visibility private - class Worker - include Concern::Logging - - def initialize(pool, id) - # instance variables accessed only under pool's lock so no need to sync here again - @queue = Queue.new - @pool = pool - @thread = create_worker @queue, pool, pool.idletime - - if @thread.respond_to?(:name=) - @thread.name = [pool.name, 'worker', id].compact.join('-') - end - end - - def <<(message) - @queue << message - end - - def stop - @queue << :stop - end - - def kill - @thread.kill - end - - private - - def create_worker(queue, pool, idletime) - Thread.new(queue, pool, idletime) do |my_queue, my_pool, my_idletime| - catch(:stop) do - loop do - - case message = my_queue.pop - when :stop - my_pool.remove_busy_worker(self) - throw :stop - - else - task, args = message - run_task my_pool, task, args - my_pool.ready_worker(self, Concurrent.monotonic_time) - end - end - end - end - end - - def run_task(pool, task, args) - task.call(*args) - pool.worker_task_completed - rescue => ex - # let it fail - log DEBUG, ex - rescue Exception => ex - log ERROR, ex - pool.worker_died(self) - throw :stop - end - end - - private_constant :Worker - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb deleted file mode 100644 index f796b857..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # A simple utility class that executes a callable and returns and array of three elements: - # success - indicating if the callable has been executed without errors - # value - filled by the callable result if it has been executed without errors, nil otherwise - # reason - the error risen by the callable if it has been executed with errors, nil otherwise - class SafeTaskExecutor < Synchronization::LockableObject - - def initialize(task, opts = {}) - @task = task - @exception_class = opts.fetch(:rescue_exception, false) ? Exception : StandardError - super() # ensures visibility - end - - # @return [Array] - def execute(*args) - success = true - value = reason = nil - - synchronize do - begin - value = @task.call(*args) - success = true - rescue @exception_class => ex - reason = ex - success = false - end - end - - [success, value, reason] - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb deleted file mode 100644 index f1c38ecf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'concurrent/executor/executor_service' - -module Concurrent - - # Indicates that the including `ExecutorService` guarantees - # that all operations will occur in the order they are post and that no - # two operations may occur simultaneously. This module provides no - # functionality and provides no guarantees. That is the responsibility - # of the including class. This module exists solely to allow the including - # object to be interrogated for its serialization status. - # - # @example - # class Foo - # include Concurrent::SerialExecutor - # end - # - # foo = Foo.new - # - # foo.is_a? Concurrent::ExecutorService #=> true - # foo.is_a? Concurrent::SerialExecutor #=> true - # foo.serialized? #=> true - # - # @!visibility private - module SerialExecutorService - include ExecutorService - - # @!macro executor_service_method_serialized_question - # - # @note Always returns `true` - def serialized? - true - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb deleted file mode 100644 index 4db7c7f0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb +++ /dev/null @@ -1,107 +0,0 @@ -require 'concurrent/errors' -require 'concurrent/concern/logging' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # Ensures passed jobs in a serialized order never running at the same time. - class SerializedExecution < Synchronization::LockableObject - include Concern::Logging - - def initialize() - super() - synchronize { ns_initialize } - end - - Job = Struct.new(:executor, :args, :block) do - def call - block.call(*args) - end - end - - # Submit a task to the executor for asynchronous processing. - # - # @param [Executor] executor to be used for this job - # - # @param [Array] args zero or more arguments to be passed to the task - # - # @yield the asynchronous task to perform - # - # @return [Boolean] `true` if the task is queued, `false` if the executor - # is not running - # - # @raise [ArgumentError] if no task is given - def post(executor, *args, &task) - posts [[executor, args, task]] - true - end - - # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not - # be interleaved by other tasks. - # - # @param [Array, Proc)>] posts array of triplets where - # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) - def posts(posts) - # if can_overflow? - # raise ArgumentError, 'SerializedExecution does not support thread-pools which can overflow' - # end - - return nil if posts.empty? - - jobs = posts.map { |executor, args, task| Job.new executor, args, task } - - job_to_post = synchronize do - if @being_executed - @stash.push(*jobs) - nil - else - @being_executed = true - @stash.push(*jobs[1..-1]) - jobs.first - end - end - - call_job job_to_post if job_to_post - true - end - - private - - def ns_initialize - @being_executed = false - @stash = [] - end - - def call_job(job) - did_it_run = begin - job.executor.post { work(job) } - true - rescue RejectedExecutionError => ex - false - end - - # TODO not the best idea to run it myself - unless did_it_run - begin - work job - rescue => ex - # let it fail - log DEBUG, ex - end - end - end - - # ensures next job is executed if any is stashed - def work(job) - job.call - ensure - synchronize do - job = @stash.shift || (@being_executed = false) - end - - # TODO maybe be able to tell caching pool to just enqueue this job, because the current one end at the end - # of this block - call_job job if job - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb deleted file mode 100644 index 8197781b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'delegate' -require 'concurrent/executor/serial_executor_service' -require 'concurrent/executor/serialized_execution' - -module Concurrent - - # A wrapper/delegator for any `ExecutorService` that - # guarantees serialized execution of tasks. - # - # @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) - # @see Concurrent::SerializedExecution - class SerializedExecutionDelegator < SimpleDelegator - include SerialExecutorService - - def initialize(executor) - @executor = executor - @serializer = SerializedExecution.new - super(executor) - end - - # @!macro executor_service_method_post - def post(*args, &task) - raise ArgumentError.new('no block given') unless block_given? - return false unless running? - @serializer.post(@executor, *args, &task) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb deleted file mode 100644 index 0bc62afd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'concurrent/atomic/atomic_boolean' -require 'concurrent/atomic/atomic_fixnum' -require 'concurrent/atomic/event' -require 'concurrent/executor/executor_service' -require 'concurrent/executor/ruby_executor_service' - -module Concurrent - - # An executor service in which every operation spawns a new, - # independently operating thread. - # - # This is perhaps the most inefficient executor service in this - # library. It exists mainly for testing an debugging. Thread creation - # and management is expensive in Ruby and this executor performs no - # resource pooling. This can be very beneficial during testing and - # debugging because it decouples the using code from the underlying - # executor implementation. In production this executor will likely - # lead to suboptimal performance. - # - # @note Intended for use primarily in testing and debugging. - class SimpleExecutorService < RubyExecutorService - - # @!macro executor_service_method_post - def self.post(*args) - raise ArgumentError.new('no block given') unless block_given? - Thread.new(*args) do - Thread.current.abort_on_exception = false - yield(*args) - end - true - end - - # @!macro executor_service_method_left_shift - def self.<<(task) - post(&task) - self - end - - # @!macro executor_service_method_post - def post(*args, &task) - raise ArgumentError.new('no block given') unless block_given? - return false unless running? - @count.increment - Thread.new(*args) do - Thread.current.abort_on_exception = false - begin - yield(*args) - ensure - @count.decrement - @stopped.set if @running.false? && @count.value == 0 - end - end - end - - # @!macro executor_service_method_left_shift - def <<(task) - post(&task) - self - end - - # @!macro executor_service_method_running_question - def running? - @running.true? - end - - # @!macro executor_service_method_shuttingdown_question - def shuttingdown? - @running.false? && ! @stopped.set? - end - - # @!macro executor_service_method_shutdown_question - def shutdown? - @stopped.set? - end - - # @!macro executor_service_method_shutdown - def shutdown - @running.make_false - @stopped.set if @count.value == 0 - true - end - - # @!macro executor_service_method_kill - def kill - @running.make_false - @stopped.set - true - end - - # @!macro executor_service_method_wait_for_termination - def wait_for_termination(timeout = nil) - @stopped.wait(timeout) - end - - private - - def ns_initialize(*args) - @running = Concurrent::AtomicBoolean.new(true) - @stopped = Concurrent::Event.new - @count = Concurrent::AtomicFixnum.new(0) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb deleted file mode 100644 index 220eb0ff..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/executor/ruby_single_thread_executor' - -module Concurrent - - if Concurrent.on_jruby? - require 'concurrent/executor/java_single_thread_executor' - end - - SingleThreadExecutorImplementation = case - when Concurrent.on_jruby? - JavaSingleThreadExecutor - else - RubySingleThreadExecutor - end - private_constant :SingleThreadExecutorImplementation - - # @!macro single_thread_executor - # - # A thread pool with a single thread an unlimited queue. Should the thread - # die for any reason it will be removed and replaced, thus ensuring that - # the executor will always remain viable and available to process jobs. - # - # A common pattern for background processing is to create a single thread - # on which an infinite loop is run. The thread's loop blocks on an input - # source (perhaps blocking I/O or a queue) and processes each input as it - # is received. This pattern has several issues. The thread itself is highly - # susceptible to errors during processing. Also, the thread itself must be - # constantly monitored and restarted should it die. `SingleThreadExecutor` - # encapsulates all these behaviors. The task processor is highly resilient - # to errors from within tasks. Also, should the thread die it will - # automatically be restarted. - # - # The API and behavior of this class are based on Java's `SingleThreadExecutor`. - # - # @!macro abstract_executor_service_public_api - class SingleThreadExecutor < SingleThreadExecutorImplementation - - # @!macro single_thread_executor_method_initialize - # - # Create a new thread pool. - # - # @option opts [Symbol] :fallback_policy (:discard) the policy for handling new - # tasks that are received when the queue size has reached - # `max_queue` or the executor has shut down - # - # @raise [ArgumentError] if `:fallback_policy` is not one of the values specified - # in `FALLBACK_POLICIES` - # - # @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html - # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html - - # @!method initialize(opts = {}) - # @!macro single_thread_executor_method_initialize - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb deleted file mode 100644 index 253d46a9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/executor/ruby_thread_pool_executor' - -module Concurrent - - if Concurrent.on_jruby? - require 'concurrent/executor/java_thread_pool_executor' - end - - ThreadPoolExecutorImplementation = case - when Concurrent.on_jruby? - JavaThreadPoolExecutor - else - RubyThreadPoolExecutor - end - private_constant :ThreadPoolExecutorImplementation - - # @!macro thread_pool_executor - # - # An abstraction composed of one or more threads and a task queue. Tasks - # (blocks or `proc` objects) are submitted to the pool and added to the queue. - # The threads in the pool remove the tasks and execute them in the order - # they were received. - # - # A `ThreadPoolExecutor` will automatically adjust the pool size according - # to the bounds set by `min-threads` and `max-threads`. When a new task is - # submitted and fewer than `min-threads` threads are running, a new thread - # is created to handle the request, even if other worker threads are idle. - # If there are more than `min-threads` but less than `max-threads` threads - # running, a new thread will be created only if the queue is full. - # - # Threads that are idle for too long will be garbage collected, down to the - # configured minimum options. Should a thread crash it, too, will be garbage collected. - # - # `ThreadPoolExecutor` is based on the Java class of the same name. From - # the official Java documentation; - # - # > Thread pools address two different problems: they usually provide - # > improved performance when executing large numbers of asynchronous tasks, - # > due to reduced per-task invocation overhead, and they provide a means - # > of bounding and managing the resources, including threads, consumed - # > when executing a collection of tasks. Each ThreadPoolExecutor also - # > maintains some basic statistics, such as the number of completed tasks. - # > - # > To be useful across a wide range of contexts, this class provides many - # > adjustable parameters and extensibility hooks. However, programmers are - # > urged to use the more convenient Executors factory methods - # > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), - # > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single - # > background thread), that preconfigure settings for the most common usage - # > scenarios. - # - # @!macro thread_pool_options - # - # @!macro thread_pool_executor_public_api - class ThreadPoolExecutor < ThreadPoolExecutorImplementation - - # @!macro thread_pool_executor_method_initialize - # - # Create a new thread pool. - # - # @param [Hash] opts the options which configure the thread pool. - # - # @option opts [Integer] :max_threads (DEFAULT_MAX_POOL_SIZE) the maximum - # number of threads to be created - # @option opts [Integer] :min_threads (DEFAULT_MIN_POOL_SIZE) When a new task is submitted - # and fewer than `min_threads` are running, a new thread is created - # @option opts [Integer] :idletime (DEFAULT_THREAD_IDLETIMEOUT) the maximum - # number of seconds a thread may be idle before being reclaimed - # @option opts [Integer] :max_queue (DEFAULT_MAX_QUEUE_SIZE) the maximum - # number of tasks allowed in the work queue at any one time; a value of - # zero means the queue may grow without bound - # @option opts [Symbol] :fallback_policy (:abort) the policy for handling new - # tasks that are received when the queue size has reached - # `max_queue` or the executor has shut down - # @option opts [Boolean] :synchronous (DEFAULT_SYNCHRONOUS) whether or not a value of 0 - # for :max_queue means the queue must perform direct hand-off rather than unbounded. - # @raise [ArgumentError] if `:max_threads` is less than one - # @raise [ArgumentError] if `:min_threads` is less than zero - # @raise [ArgumentError] if `:fallback_policy` is not one of the values specified - # in `FALLBACK_POLICIES` - # - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html - - # @!method initialize(opts = {}) - # @!macro thread_pool_executor_method_initialize - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/timer_set.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/timer_set.rb deleted file mode 100644 index 759dce09..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/timer_set.rb +++ /dev/null @@ -1,176 +0,0 @@ -require 'concurrent/scheduled_task' -require 'concurrent/atomic/event' -require 'concurrent/collection/non_concurrent_priority_queue' -require 'concurrent/executor/executor_service' -require 'concurrent/executor/single_thread_executor' -require 'concurrent/errors' -require 'concurrent/options' - -module Concurrent - - # Executes a collection of tasks, each after a given delay. A master task - # monitors the set and schedules each task for execution at the appropriate - # time. Tasks are run on the global thread pool or on the supplied executor. - # Each task is represented as a `ScheduledTask`. - # - # @see Concurrent::ScheduledTask - # - # @!macro monotonic_clock_warning - class TimerSet < RubyExecutorService - - # Create a new set of timed tasks. - # - # @!macro executor_options - # - # @param [Hash] opts the options used to specify the executor on which to perform actions - # @option opts [Executor] :executor when set use the given `Executor` instance. - # Three special values are also supported: `:task` returns the global task pool, - # `:operation` returns the global operation pool, and `:immediate` returns a new - # `ImmediateExecutor` object. - def initialize(opts = {}) - super(opts) - end - - # Post a task to be execute run after a given delay (in seconds). If the - # delay is less than 1/100th of a second the task will be immediately post - # to the executor. - # - # @param [Float] delay the number of seconds to wait for before executing the task. - # @param [Array] args the arguments passed to the task on execution. - # - # @yield the task to be performed. - # - # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post - # is successful; false after shutdown. - # - # @raise [ArgumentError] if the intended execution time is not in the future. - # @raise [ArgumentError] if no block is given. - def post(delay, *args, &task) - raise ArgumentError.new('no block given') unless block_given? - return false unless running? - opts = { executor: @task_executor, - args: args, - timer_set: self } - task = ScheduledTask.execute(delay, opts, &task) # may raise exception - task.unscheduled? ? false : task - end - - # Begin an immediate shutdown. In-progress tasks will be allowed to - # complete but enqueued tasks will be dismissed and no new tasks - # will be accepted. Has no additional effect if the thread pool is - # not running. - def kill - shutdown - end - - private :<< - - private - - # Initialize the object. - # - # @param [Hash] opts the options to create the object with. - # @!visibility private - def ns_initialize(opts) - @queue = Collection::NonConcurrentPriorityQueue.new(order: :min) - @task_executor = Options.executor_from_options(opts) || Concurrent.global_io_executor - @timer_executor = SingleThreadExecutor.new - @condition = Event.new - @ruby_pid = $$ # detects if Ruby has forked - end - - # Post the task to the internal queue. - # - # @note This is intended as a callback method from ScheduledTask - # only. It is not intended to be used directly. Post a task - # by using the `SchedulesTask#execute` method. - # - # @!visibility private - def post_task(task) - synchronize { ns_post_task(task) } - end - - # @!visibility private - def ns_post_task(task) - return false unless ns_running? - ns_reset_if_forked - if (task.initial_delay) <= 0.01 - task.executor.post { task.process_task } - else - @queue.push(task) - # only post the process method when the queue is empty - @timer_executor.post(&method(:process_tasks)) if @queue.length == 1 - @condition.set - end - true - end - - # Remove the given task from the queue. - # - # @note This is intended as a callback method from `ScheduledTask` - # only. It is not intended to be used directly. Cancel a task - # by using the `ScheduledTask#cancel` method. - # - # @!visibility private - def remove_task(task) - synchronize { @queue.delete(task) } - end - - # `ExecutorService` callback called during shutdown. - # - # @!visibility private - def ns_shutdown_execution - ns_reset_if_forked - @queue.clear - @timer_executor.kill - stopped_event.set - end - - def ns_reset_if_forked - if $$ != @ruby_pid - @queue.clear - @condition.reset - @ruby_pid = $$ - end - end - - # Run a loop and execute tasks in the scheduled order and at the approximate - # scheduled time. If no tasks remain the thread will exit gracefully so that - # garbage collection can occur. If there are no ready tasks it will sleep - # for up to 60 seconds waiting for the next scheduled task. - # - # @!visibility private - def process_tasks - loop do - task = synchronize { @condition.reset; @queue.peek } - break unless task - - now = Concurrent.monotonic_time - diff = task.schedule_time - now - - if diff <= 0 - # We need to remove the task from the queue before passing - # it to the executor, to avoid race conditions where we pass - # the peek'ed task to the executor and then pop a different - # one that's been added in the meantime. - # - # Note that there's no race condition between the peek and - # this pop - this pop could retrieve a different task from - # the peek, but that task would be due to fire now anyway - # (because @queue is a priority queue, and this thread is - # the only reader, so whatever timer is at the head of the - # queue now must have the same pop time, or a closer one, as - # when we peeked). - task = synchronize { @queue.pop } - begin - task.executor.post { task.process_task } - rescue RejectedExecutionError - # ignore and continue - end - else - @condition.wait([diff, 60].min) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executors.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executors.rb deleted file mode 100644 index eb1972ce..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executors.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'concurrent/executor/abstract_executor_service' -require 'concurrent/executor/cached_thread_pool' -require 'concurrent/executor/executor_service' -require 'concurrent/executor/fixed_thread_pool' -require 'concurrent/executor/immediate_executor' -require 'concurrent/executor/indirect_immediate_executor' -require 'concurrent/executor/java_executor_service' -require 'concurrent/executor/java_single_thread_executor' -require 'concurrent/executor/java_thread_pool_executor' -require 'concurrent/executor/ruby_executor_service' -require 'concurrent/executor/ruby_single_thread_executor' -require 'concurrent/executor/ruby_thread_pool_executor' -require 'concurrent/executor/cached_thread_pool' -require 'concurrent/executor/safe_task_executor' -require 'concurrent/executor/serial_executor_service' -require 'concurrent/executor/serialized_execution' -require 'concurrent/executor/serialized_execution_delegator' -require 'concurrent/executor/single_thread_executor' -require 'concurrent/executor/thread_pool_executor' -require 'concurrent/executor/timer_set' diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/future.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/future.rb deleted file mode 100644 index 1af182ec..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/future.rb +++ /dev/null @@ -1,141 +0,0 @@ -require 'thread' -require 'concurrent/constants' -require 'concurrent/errors' -require 'concurrent/ivar' -require 'concurrent/executor/safe_task_executor' - -require 'concurrent/options' - -# TODO (pitr-ch 14-Mar-2017): deprecate, Future, Promise, etc. - - -module Concurrent - - # {include:file:docs-source/future.md} - # - # @!macro copy_options - # - # @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module - # @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function - # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future - class Future < IVar - - # Create a new `Future` in the `:unscheduled` state. - # - # @yield the asynchronous operation to perform - # - # @!macro executor_and_deref_options - # - # @option opts [object, Array] :args zero or more arguments to be passed the task - # block on execution - # - # @raise [ArgumentError] if no block is given - def initialize(opts = {}, &block) - raise ArgumentError.new('no block given') unless block_given? - super(NULL, opts.merge(__task_from_block__: block), &nil) - end - - # Execute an `:unscheduled` `Future`. Immediately sets the state to `:pending` and - # passes the block to a new thread/thread pool for eventual execution. - # Does nothing if the `Future` is in any state other than `:unscheduled`. - # - # @return [Future] a reference to `self` - # - # @example Instance and execute in separate steps - # future = Concurrent::Future.new{ sleep(1); 42 } - # future.state #=> :unscheduled - # future.execute - # future.state #=> :pending - # - # @example Instance and execute in one line - # future = Concurrent::Future.new{ sleep(1); 42 }.execute - # future.state #=> :pending - def execute - if compare_and_set_state(:pending, :unscheduled) - @executor.post{ safe_execute(@task, @args) } - self - end - end - - # Create a new `Future` object with the given block, execute it, and return the - # `:pending` object. - # - # @yield the asynchronous operation to perform - # - # @!macro executor_and_deref_options - # - # @option opts [object, Array] :args zero or more arguments to be passed the task - # block on execution - # - # @raise [ArgumentError] if no block is given - # - # @return [Future] the newly created `Future` in the `:pending` state - # - # @example - # future = Concurrent::Future.execute{ sleep(1); 42 } - # future.state #=> :pending - def self.execute(opts = {}, &block) - Future.new(opts, &block).execute - end - - # @!macro ivar_set_method - def set(value = NULL, &block) - check_for_block_or_value!(block_given?, value) - synchronize do - if @state != :unscheduled - raise MultipleAssignmentError - else - @task = block || Proc.new { value } - end - end - execute - end - - # Attempt to cancel the operation if it has not already processed. - # The operation can only be cancelled while still `pending`. It cannot - # be cancelled once it has begun processing or has completed. - # - # @return [Boolean] was the operation successfully cancelled. - def cancel - if compare_and_set_state(:cancelled, :pending) - complete(false, nil, CancelledOperationError.new) - true - else - false - end - end - - # Has the operation been successfully cancelled? - # - # @return [Boolean] - def cancelled? - state == :cancelled - end - - # Wait the given number of seconds for the operation to complete. - # On timeout attempt to cancel the operation. - # - # @param [Numeric] timeout the maximum time in seconds to wait. - # @return [Boolean] true if the operation completed before the timeout - # else false - def wait_or_cancel(timeout) - wait(timeout) - if complete? - true - else - cancel - false - end - end - - protected - - def ns_initialize(value, opts) - super - @state = :unscheduled - @task = opts[:__task_from_block__] - @executor = Options.executor_from_options(opts) || Concurrent.global_io_executor - @args = get_arguments_from(opts) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/hash.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/hash.rb deleted file mode 100644 index db0208e0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/hash.rb +++ /dev/null @@ -1,52 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/thread_safe/util' - -module Concurrent - - # @!macro concurrent_hash - # - # A thread-safe subclass of Hash. This version locks against the object - # itself for every method call, ensuring only one thread can be reading - # or writing at a time. This includes iteration methods like `#each`, - # which takes the lock repeatedly when reading an item. - # - # @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` - - # @!macro internal_implementation_note - HashImplementation = case - when Concurrent.on_cruby? - # Hash is not fully thread-safe on CRuby, see - # https://bugs.ruby-lang.org/issues/19237 - # https://github.com/ruby/ruby/commit/ffd52412ab - # https://github.com/ruby-concurrency/concurrent-ruby/issues/929 - # So we will need to add synchronization here (similar to Concurrent::Map). - ::Hash - - when Concurrent.on_jruby? - require 'jruby/synchronized' - - class JRubyHash < ::Hash - include JRuby::Synchronized - end - JRubyHash - - when Concurrent.on_truffleruby? - require 'concurrent/thread_safe/util/data_structures' - - class TruffleRubyHash < ::Hash - end - - ThreadSafe::Util.make_synchronized_on_truffleruby TruffleRubyHash - TruffleRubyHash - - else - warn 'Possibly unsupported Ruby implementation' - ::Hash - end - private_constant :HashImplementation - - # @!macro concurrent_hash - class Hash < HashImplementation - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/immutable_struct.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/immutable_struct.rb deleted file mode 100644 index 48462e83..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/immutable_struct.rb +++ /dev/null @@ -1,101 +0,0 @@ -require 'concurrent/synchronization/abstract_struct' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # A thread-safe, immutable variation of Ruby's standard `Struct`. - # - # @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` - module ImmutableStruct - include Synchronization::AbstractStruct - - def self.included(base) - base.safe_initialization! - end - - # @!macro struct_values - def values - ns_values - end - - alias_method :to_a, :values - - # @!macro struct_values_at - def values_at(*indexes) - ns_values_at(indexes) - end - - # @!macro struct_inspect - def inspect - ns_inspect - end - - alias_method :to_s, :inspect - - # @!macro struct_merge - def merge(other, &block) - ns_merge(other, &block) - end - - # @!macro struct_to_h - def to_h - ns_to_h - end - - # @!macro struct_get - def [](member) - ns_get(member) - end - - # @!macro struct_equality - def ==(other) - ns_equality(other) - end - - # @!macro struct_each - def each(&block) - return enum_for(:each) unless block_given? - ns_each(&block) - end - - # @!macro struct_each_pair - def each_pair(&block) - return enum_for(:each_pair) unless block_given? - ns_each_pair(&block) - end - - # @!macro struct_select - def select(&block) - return enum_for(:select) unless block_given? - ns_select(&block) - end - - private - - # @!visibility private - def initialize_copy(original) - super(original) - ns_initialize_copy - end - - # @!macro struct_new - def self.new(*args, &block) - clazz_name = nil - if args.length == 0 - raise ArgumentError.new('wrong number of arguments (0 for 1+)') - elsif args.length > 0 && args.first.is_a?(String) - clazz_name = args.shift - end - FACTORY.define_struct(clazz_name, args, &block) - end - - FACTORY = Class.new(Synchronization::LockableObject) do - def define_struct(name, members, &block) - synchronize do - Synchronization::AbstractStruct.define_struct_class(ImmutableStruct, Synchronization::Object, name, members, &block) - end - end - end.new - private_constant :FACTORY - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/ivar.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/ivar.rb deleted file mode 100644 index 4165038f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/ivar.rb +++ /dev/null @@ -1,208 +0,0 @@ -require 'concurrent/constants' -require 'concurrent/errors' -require 'concurrent/collection/copy_on_write_observer_set' -require 'concurrent/concern/obligation' -require 'concurrent/concern/observable' -require 'concurrent/executor/safe_task_executor' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # An `IVar` is like a future that you can assign. As a future is a value that - # is being computed that you can wait on, an `IVar` is a value that is waiting - # to be assigned, that you can wait on. `IVars` are single assignment and - # deterministic. - # - # Then, express futures as an asynchronous computation that assigns an `IVar`. - # The `IVar` becomes the primitive on which [futures](Future) and - # [dataflow](Dataflow) are built. - # - # An `IVar` is a single-element container that is normally created empty, and - # can only be set once. The I in `IVar` stands for immutable. Reading an - # `IVar` normally blocks until it is set. It is safe to set and read an `IVar` - # from different threads. - # - # If you want to have some parallel task set the value in an `IVar`, you want - # a `Future`. If you want to create a graph of parallel tasks all executed - # when the values they depend on are ready you want `dataflow`. `IVar` is - # generally a low-level primitive. - # - # ## Examples - # - # Create, set and get an `IVar` - # - # ```ruby - # ivar = Concurrent::IVar.new - # ivar.set 14 - # ivar.value #=> 14 - # ivar.set 2 # would now be an error - # ``` - # - # ## See Also - # - # 1. For the theory: Arvind, R. Nikhil, and K. Pingali. - # [I-Structures: Data structures for parallel computing](http://dl.acm.org/citation.cfm?id=69562). - # In Proceedings of Workshop on Graph Reduction, 1986. - # 2. For recent application: - # [DataDrivenFuture in Habanero Java from Rice](http://www.cs.rice.edu/~vs3/hjlib/doc/edu/rice/hj/api/HjDataDrivenFuture.html). - class IVar < Synchronization::LockableObject - include Concern::Obligation - include Concern::Observable - - # Create a new `IVar` in the `:pending` state with the (optional) initial value. - # - # @param [Object] value the initial value - # @param [Hash] opts the options to create a message with - # @option opts [String] :dup_on_deref (false) call `#dup` before returning - # the data - # @option opts [String] :freeze_on_deref (false) call `#freeze` before - # returning the data - # @option opts [String] :copy_on_deref (nil) call the given `Proc` passing - # the internal value and returning the value returned from the proc - def initialize(value = NULL, opts = {}, &block) - if value != NULL && block_given? - raise ArgumentError.new('provide only a value or a block') - end - super(&nil) - synchronize { ns_initialize(value, opts, &block) } - end - - # Add an observer on this object that will receive notification on update. - # - # Upon completion the `IVar` will notify all observers in a thread-safe way. - # The `func` method of the observer will be called with three arguments: the - # `Time` at which the `Future` completed the asynchronous operation, the - # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on - # fulfillment). - # - # @param [Object] observer the object that will be notified of changes - # @param [Symbol] func symbol naming the method to call when this - # `Observable` has changes` - def add_observer(observer = nil, func = :update, &block) - raise ArgumentError.new('cannot provide both an observer and a block') if observer && block - direct_notification = false - - if block - observer = block - func = :call - end - - synchronize do - if event.set? - direct_notification = true - else - observers.add_observer(observer, func) - end - end - - observer.send(func, Time.now, self.value, reason) if direct_notification - observer - end - - # @!macro ivar_set_method - # Set the `IVar` to a value and wake or notify all threads waiting on it. - # - # @!macro ivar_set_parameters_and_exceptions - # @param [Object] value the value to store in the `IVar` - # @yield A block operation to use for setting the value - # @raise [ArgumentError] if both a value and a block are given - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # - # @return [IVar] self - def set(value = NULL) - check_for_block_or_value!(block_given?, value) - raise MultipleAssignmentError unless compare_and_set_state(:processing, :pending) - - begin - value = yield if block_given? - complete_without_notification(true, value, nil) - rescue => ex - complete_without_notification(false, nil, ex) - end - - notify_observers(self.value, reason) - self - end - - # @!macro ivar_fail_method - # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. - # - # @param [Object] reason for the failure - # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already - # been set or otherwise completed - # @return [IVar] self - def fail(reason = StandardError.new) - complete(false, nil, reason) - end - - # Attempt to set the `IVar` with the given value or block. Return a - # boolean indicating the success or failure of the set operation. - # - # @!macro ivar_set_parameters_and_exceptions - # - # @return [Boolean] true if the value was set else false - def try_set(value = NULL, &block) - set(value, &block) - true - rescue MultipleAssignmentError - false - end - - protected - - # @!visibility private - def ns_initialize(value, opts) - value = yield if block_given? - init_obligation - self.observers = Collection::CopyOnWriteObserverSet.new - set_deref_options(opts) - - @state = :pending - if value != NULL - ns_complete_without_notification(true, value, nil) - end - end - - # @!visibility private - def safe_execute(task, args = []) - if compare_and_set_state(:processing, :pending) - success, val, reason = SafeTaskExecutor.new(task, rescue_exception: true).execute(*@args) - complete(success, val, reason) - yield(success, val, reason) if block_given? - end - end - - # @!visibility private - def complete(success, value, reason) - complete_without_notification(success, value, reason) - notify_observers(self.value, reason) - self - end - - # @!visibility private - def complete_without_notification(success, value, reason) - synchronize { ns_complete_without_notification(success, value, reason) } - self - end - - # @!visibility private - def notify_observers(value, reason) - observers.notify_and_delete_observers{ [Time.now, value, reason] } - end - - # @!visibility private - def ns_complete_without_notification(success, value, reason) - raise MultipleAssignmentError if [:fulfilled, :rejected].include? @state - set_state(success, value, reason) - event.set - end - - # @!visibility private - def check_for_block_or_value!(block_given, value) # :nodoc: - if (block_given && value != NULL) || (! block_given && value == NULL) - raise ArgumentError.new('must set with either a value or a block') - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/map.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/map.rb deleted file mode 100644 index b263f83d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/map.rb +++ /dev/null @@ -1,350 +0,0 @@ -require 'thread' -require 'concurrent/constants' -require 'concurrent/utility/engine' - -module Concurrent - # @!visibility private - module Collection - - # @!visibility private - MapImplementation = case - when Concurrent.on_jruby? - require 'concurrent/utility/native_extension_loader' - # noinspection RubyResolve - JRubyMapBackend - when Concurrent.on_cruby? - require 'concurrent/collection/map/mri_map_backend' - MriMapBackend - when Concurrent.on_truffleruby? - if defined?(::TruffleRuby::ConcurrentMap) - require 'concurrent/collection/map/truffleruby_map_backend' - TruffleRubyMapBackend - else - require 'concurrent/collection/map/synchronized_map_backend' - SynchronizedMapBackend - end - else - warn 'Concurrent::Map: unsupported Ruby engine, using a fully synchronized Concurrent::Map implementation' - require 'concurrent/collection/map/synchronized_map_backend' - SynchronizedMapBackend - end - end - - # `Concurrent::Map` is a hash-like object and should have much better performance - # characteristics, especially under high concurrency, than `Concurrent::Hash`. - # However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` - # -- for instance, it does not necessarily retain ordering by insertion time as `Hash` - # does. For most uses it should do fine though, and we recommend you consider - # `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. - class Map < Collection::MapImplementation - - # @!macro map.atomic_method - # This method is atomic. - - # @!macro map.atomic_method_with_block - # This method is atomic. - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - - # @!method []=(key, value) - # Set a value with key - # @param [Object] key - # @param [Object] value - # @return [Object] the new value - - # @!method compute_if_absent(key) - # Compute and store new value for key if the key is absent. - # @param [Object] key - # @yield new value - # @yieldreturn [Object] new value - # @return [Object] new value or current value - # @!macro map.atomic_method_with_block - - # @!method compute_if_present(key) - # Compute and store new value for key if the key is present. - # @param [Object] key - # @yield new value - # @yieldparam old_value [Object] - # @yieldreturn [Object, nil] new value, when nil the key is removed - # @return [Object, nil] new value or nil - # @!macro map.atomic_method_with_block - - # @!method compute(key) - # Compute and store new value for key. - # @param [Object] key - # @yield compute new value from old one - # @yieldparam old_value [Object, nil] old_value, or nil when key is absent - # @yieldreturn [Object, nil] new value, when nil the key is removed - # @return [Object, nil] new value or nil - # @!macro map.atomic_method_with_block - - # @!method merge_pair(key, value) - # If the key is absent, the value is stored, otherwise new value is - # computed with a block. - # @param [Object] key - # @param [Object] value - # @yield compute new value from old one - # @yieldparam old_value [Object] old value - # @yieldreturn [Object, nil] new value, when nil the key is removed - # @return [Object, nil] new value or nil - # @!macro map.atomic_method_with_block - - # @!method replace_pair(key, old_value, new_value) - # Replaces old_value with new_value if key exists and current value - # matches old_value - # @param [Object] key - # @param [Object] old_value - # @param [Object] new_value - # @return [true, false] true if replaced - # @!macro map.atomic_method - - # @!method replace_if_exists(key, new_value) - # Replaces current value with new_value if key exists - # @param [Object] key - # @param [Object] new_value - # @return [Object, nil] old value or nil - # @!macro map.atomic_method - - # @!method get_and_set(key, value) - # Get the current value under key and set new value. - # @param [Object] key - # @param [Object] value - # @return [Object, nil] old value or nil when the key was absent - # @!macro map.atomic_method - - # @!method delete(key) - # Delete key and its value. - # @param [Object] key - # @return [Object, nil] old value or nil when the key was absent - # @!macro map.atomic_method - - # @!method delete_pair(key, value) - # Delete pair and its value if current value equals the provided value. - # @param [Object] key - # @param [Object] value - # @return [true, false] true if deleted - # @!macro map.atomic_method - - # NonConcurrentMapBackend handles default_proc natively - unless defined?(Collection::NonConcurrentMapBackend) and self < Collection::NonConcurrentMapBackend - - # @param [Hash, nil] options options to set the :initial_capacity or :load_factor. Ignored on some Rubies. - # @param [Proc] default_proc Optional block to compute the default value if the key is not set, like `Hash#default_proc` - def initialize(options = nil, &default_proc) - if options.kind_of?(::Hash) - validate_options_hash!(options) - else - options = nil - end - - super(options) - @default_proc = default_proc - end - - # Get a value with key - # @param [Object] key - # @return [Object] the value - def [](key) - if value = super # non-falsy value is an existing mapping, return it right away - value - # re-check is done with get_or_default(key, NULL) instead of a simple !key?(key) in order to avoid a race condition, whereby by the time the current thread gets to the key?(key) call - # a key => value mapping might have already been created by a different thread (key?(key) would then return true, this elsif branch wouldn't be taken and an incorrect +nil+ value - # would be returned) - # note: nil == value check is not technically necessary - elsif @default_proc && nil == value && NULL == (value = get_or_default(key, NULL)) - @default_proc.call(self, key) - else - value - end - end - end - - alias_method :get, :[] - alias_method :put, :[]= - - # Get a value with key, or default_value when key is absent, - # or fail when no default_value is given. - # @param [Object] key - # @param [Object] default_value - # @yield default value for a key - # @yieldparam key [Object] - # @yieldreturn [Object] default value - # @return [Object] the value or default value - # @raise [KeyError] when key is missing and no default_value is provided - # @!macro map_method_not_atomic - # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended - # to be use as a concurrency primitive with strong happens-before - # guarantees. It is not intended to be used as a high-level abstraction - # supporting complex operations. All read and write operations are - # thread safe, but no guarantees are made regarding race conditions - # between the fetch operation and yielding to the block. Additionally, - # this method does not support recursion. This is due to internal - # constraints that are very unlikely to change in the near future. - def fetch(key, default_value = NULL) - if NULL != (value = get_or_default(key, NULL)) - value - elsif block_given? - yield key - elsif NULL != default_value - default_value - else - raise_fetch_no_key - end - end - - # Fetch value with key, or store default value when key is absent, - # or fail when no default_value is given. This is a two step operation, - # therefore not atomic. The store can overwrite other concurrently - # stored value. - # @param [Object] key - # @param [Object] default_value - # @yield default value for a key - # @yieldparam key [Object] - # @yieldreturn [Object] default value - # @return [Object] the value or default value - def fetch_or_store(key, default_value = NULL) - fetch(key) do - put(key, block_given? ? yield(key) : (NULL == default_value ? raise_fetch_no_key : default_value)) - end - end - - # Insert value into map with key if key is absent in one atomic step. - # @param [Object] key - # @param [Object] value - # @return [Object, nil] the previous value when key was present or nil when there was no key - def put_if_absent(key, value) - computed = false - result = compute_if_absent(key) do - computed = true - value - end - computed ? nil : result - end unless method_defined?(:put_if_absent) - - # Is the value stored in the map. Iterates over all values. - # @param [Object] value - # @return [true, false] - def value?(value) - each_value do |v| - return true if value.equal?(v) - end - false - end - - # All keys - # @return [::Array] keys - def keys - arr = [] - each_pair { |k, v| arr << k } - arr - end unless method_defined?(:keys) - - # All values - # @return [::Array] values - def values - arr = [] - each_pair { |k, v| arr << v } - arr - end unless method_defined?(:values) - - # Iterates over each key. - # @yield for each key in the map - # @yieldparam key [Object] - # @return [self] - # @!macro map.atomic_method_with_block - def each_key - each_pair { |k, v| yield k } - end unless method_defined?(:each_key) - - # Iterates over each value. - # @yield for each value in the map - # @yieldparam value [Object] - # @return [self] - # @!macro map.atomic_method_with_block - def each_value - each_pair { |k, v| yield v } - end unless method_defined?(:each_value) - - # Iterates over each key value pair. - # @yield for each key value pair in the map - # @yieldparam key [Object] - # @yieldparam value [Object] - # @return [self] - # @!macro map.atomic_method_with_block - def each_pair - return enum_for :each_pair unless block_given? - super - end - - alias_method :each, :each_pair unless method_defined?(:each) - - # Find key of a value. - # @param [Object] value - # @return [Object, nil] key or nil when not found - def key(value) - each_pair { |k, v| return k if v == value } - nil - end unless method_defined?(:key) - - # Is map empty? - # @return [true, false] - def empty? - each_pair { |k, v| return false } - true - end unless method_defined?(:empty?) - - # The size of map. - # @return [Integer] size - def size - count = 0 - each_pair { |k, v| count += 1 } - count - end unless method_defined?(:size) - - # @!visibility private - def marshal_dump - raise TypeError, "can't dump hash with default proc" if @default_proc - h = {} - each_pair { |k, v| h[k] = v } - h - end - - # @!visibility private - def marshal_load(hash) - initialize - populate_from(hash) - end - - undef :freeze - - # @!visibility private - def inspect - format '%s entries=%d default_proc=%s>', to_s[0..-2], size.to_s, @default_proc.inspect - end - - private - - def raise_fetch_no_key - raise KeyError, 'key not found' - end - - def initialize_copy(other) - super - populate_from(other) - end - - def populate_from(hash) - hash.each_pair { |k, v| self[k] = v } - self - end - - def validate_options_hash!(options) - if (initial_capacity = options[:initial_capacity]) && (!initial_capacity.kind_of?(Integer) || initial_capacity < 0) - raise ArgumentError, ":initial_capacity must be a positive Integer" - end - if (load_factor = options[:load_factor]) && (!load_factor.kind_of?(Numeric) || load_factor <= 0 || load_factor > 1) - raise ArgumentError, ":load_factor must be a number between 0 and 1" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/maybe.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/maybe.rb deleted file mode 100644 index 317c82b8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/maybe.rb +++ /dev/null @@ -1,229 +0,0 @@ -require 'concurrent/synchronization/object' - -module Concurrent - - # A `Maybe` encapsulates an optional value. A `Maybe` either contains a value - # of (represented as `Just`), or it is empty (represented as `Nothing`). Using - # `Maybe` is a good way to deal with errors or exceptional cases without - # resorting to drastic measures such as exceptions. - # - # `Maybe` is a replacement for the use of `nil` with better type checking. - # - # For compatibility with {Concurrent::Concern::Obligation} the predicate and - # accessor methods are aliased as `fulfilled?`, `rejected?`, `value`, and - # `reason`. - # - # ## Motivation - # - # A common pattern in languages with pattern matching, such as Erlang and - # Haskell, is to return *either* a value *or* an error from a function - # Consider this Erlang code: - # - # ```erlang - # case file:consult("data.dat") of - # {ok, Terms} -> do_something_useful(Terms); - # {error, Reason} -> lager:error(Reason) - # end. - # ``` - # - # In this example the standard library function `file:consult` returns a - # [tuple](http://erlang.org/doc/reference_manual/data_types.html#id69044) - # with two elements: an [atom](http://erlang.org/doc/reference_manual/data_types.html#id64134) - # (similar to a ruby symbol) and a variable containing ancillary data. On - # success it returns the atom `ok` and the data from the file. On failure it - # returns `error` and a string with an explanation of the problem. With this - # pattern there is no ambiguity regarding success or failure. If the file is - # empty the return value cannot be misinterpreted as an error. And when an - # error occurs the return value provides useful information. - # - # In Ruby we tend to return `nil` when an error occurs or else we raise an - # exception. Both of these idioms are problematic. Returning `nil` is - # ambiguous because `nil` may also be a valid value. It also lacks - # information pertaining to the nature of the error. Raising an exception - # is both expensive and usurps the normal flow of control. All of these - # problems can be solved with the use of a `Maybe`. - # - # A `Maybe` is unambiguous with regard to whether or not it contains a value. - # When `Just` it contains a value, when `Nothing` it does not. When `Just` - # the value it contains may be `nil`, which is perfectly valid. When - # `Nothing` the reason for the lack of a value is contained as well. The - # previous Erlang example can be duplicated in Ruby in a principled way by - # having functions return `Maybe` objects: - # - # ```ruby - # result = MyFileUtils.consult("data.dat") # returns a Maybe - # if result.just? - # do_something_useful(result.value) # or result.just - # else - # logger.error(result.reason) # or result.nothing - # end - # ``` - # - # @example Returning a Maybe from a Function - # module MyFileUtils - # def self.consult(path) - # file = File.open(path, 'r') - # Concurrent::Maybe.just(file.read) - # rescue => ex - # return Concurrent::Maybe.nothing(ex) - # ensure - # file.close if file - # end - # end - # - # maybe = MyFileUtils.consult('bogus.file') - # maybe.just? #=> false - # maybe.nothing? #=> true - # maybe.reason #=> # - # - # maybe = MyFileUtils.consult('README.md') - # maybe.just? #=> true - # maybe.nothing? #=> false - # maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." - # - # @example Using Maybe with a Block - # result = Concurrent::Maybe.from do - # Client.find(10) # Client is an ActiveRecord model - # end - # - # # -- if the record was found - # result.just? #=> true - # result.value #=> # - # - # # -- if the record was not found - # result.just? #=> false - # result.reason #=> ActiveRecord::RecordNotFound - # - # @example Using Maybe with the Null Object Pattern - # # In a Rails controller... - # result = ClientService.new(10).find # returns a Maybe - # render json: result.or(NullClient.new) - # - # @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe - # @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe - class Maybe < Synchronization::Object - include Comparable - safe_initialization! - - # Indicates that the given attribute has not been set. - # When `Just` the {#nothing} getter will return `NONE`. - # When `Nothing` the {#just} getter will return `NONE`. - NONE = ::Object.new.freeze - - # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. - attr_reader :just - - # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. - attr_reader :nothing - - private_class_method :new - - # Create a new `Maybe` using the given block. - # - # Runs the given block passing all function arguments to the block as block - # arguments. If the block runs to completion without raising an exception - # a new `Just` is created with the value set to the return value of the - # block. If the block raises an exception a new `Nothing` is created with - # the reason being set to the raised exception. - # - # @param [Array] args Zero or more arguments to pass to the block. - # @yield The block from which to create a new `Maybe`. - # @yieldparam [Array] args Zero or more block arguments passed as - # arguments to the function. - # - # @return [Maybe] The newly created object. - # - # @raise [ArgumentError] when no block given. - def self.from(*args) - raise ArgumentError.new('no block given') unless block_given? - begin - value = yield(*args) - return new(value, NONE) - rescue => ex - return new(NONE, ex) - end - end - - # Create a new `Just` with the given value. - # - # @param [Object] value The value to set for the new `Maybe` object. - # - # @return [Maybe] The newly created object. - def self.just(value) - return new(value, NONE) - end - - # Create a new `Nothing` with the given (optional) reason. - # - # @param [Exception] error The reason to set for the new `Maybe` object. - # When given a string a new `StandardError` will be created with the - # argument as the message. When no argument is given a new - # `StandardError` with an empty message will be created. - # - # @return [Maybe] The newly created object. - def self.nothing(error = '') - if error.is_a?(Exception) - nothing = error - else - nothing = StandardError.new(error.to_s) - end - return new(NONE, nothing) - end - - # Is this `Maybe` a `Just` (successfully fulfilled with a value)? - # - # @return [Boolean] True if `Just` or false if `Nothing`. - def just? - ! nothing? - end - alias :fulfilled? :just? - - # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? - # - # @return [Boolean] True if `Nothing` or false if `Just`. - def nothing? - @nothing != NONE - end - alias :rejected? :nothing? - - alias :value :just - - alias :reason :nothing - - # Comparison operator. - # - # @return [Integer] 0 if self and other are both `Nothing`; - # -1 if self is `Nothing` and other is `Just`; - # 1 if self is `Just` and other is nothing; - # `self.just <=> other.just` if both self and other are `Just`. - def <=>(other) - if nothing? - other.nothing? ? 0 : -1 - else - other.nothing? ? 1 : just <=> other.just - end - end - - # Return either the value of self or the given default value. - # - # @return [Object] The value of self when `Just`; else the given default. - def or(other) - just? ? just : other - end - - private - - # Create a new `Maybe` with the given attributes. - # - # @param [Object] just The value when `Just` else `NONE`. - # @param [Exception, Object] nothing The exception when `Nothing` else `NONE`. - # - # @return [Maybe] The new `Maybe`. - # - # @!visibility private - def initialize(just, nothing) - @just = just - @nothing = nothing - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/mutable_struct.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/mutable_struct.rb deleted file mode 100644 index 5d0e9b9a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/mutable_struct.rb +++ /dev/null @@ -1,239 +0,0 @@ -require 'concurrent/synchronization/abstract_struct' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # An thread-safe variation of Ruby's standard `Struct`. Values can be set at - # construction or safely changed at any time during the object's lifecycle. - # - # @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` - module MutableStruct - include Synchronization::AbstractStruct - - # @!macro struct_new - # - # Factory for creating new struct classes. - # - # ``` - # new([class_name] [, member_name]+>) -> StructClass click to toggle source - # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass - # new(value, ...) -> obj - # StructClass[value, ...] -> obj - # ``` - # - # The first two forms are used to create a new struct subclass `class_name` - # that can contain a value for each member_name . This subclass can be - # used to create instances of the structure like any other Class . - # - # If the `class_name` is omitted an anonymous struct class will be created. - # Otherwise, the name of this struct will appear as a constant in the struct class, - # so it must be unique for all structs under this base class and must start with a - # capital letter. Assigning a struct class to a constant also gives the class - # the name of the constant. - # - # If a block is given it will be evaluated in the context of `StructClass`, passing - # the created class as a parameter. This is the recommended way to customize a struct. - # Subclassing an anonymous struct creates an extra anonymous class that will never be used. - # - # The last two forms create a new instance of a struct subclass. The number of value - # parameters must be less than or equal to the number of attributes defined for the - # struct. Unset parameters default to nil. Passing more parameters than number of attributes - # will raise an `ArgumentError`. - # - # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` - - # @!macro struct_values - # - # Returns the values for this struct as an Array. - # - # @return [Array] the values for this struct - # - def values - synchronize { ns_values } - end - alias_method :to_a, :values - - # @!macro struct_values_at - # - # Returns the struct member values for each selector as an Array. - # - # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). - # - # @param [Fixnum, Range] indexes the index(es) from which to obatin the values (in order) - def values_at(*indexes) - synchronize { ns_values_at(indexes) } - end - - # @!macro struct_inspect - # - # Describe the contents of this struct in a string. - # - # @return [String] the contents of this struct in a string - def inspect - synchronize { ns_inspect } - end - alias_method :to_s, :inspect - - # @!macro struct_merge - # - # Returns a new struct containing the contents of `other` and the contents - # of `self`. If no block is specified, the value for entries with duplicate - # keys will be that of `other`. Otherwise the value for each duplicate key - # is determined by calling the block with the key, its value in `self` and - # its value in `other`. - # - # @param [Hash] other the hash from which to set the new values - # @yield an options block for resolving duplicate keys - # @yieldparam [String, Symbol] member the name of the member which is duplicated - # @yieldparam [Object] selfvalue the value of the member in `self` - # @yieldparam [Object] othervalue the value of the member in `other` - # - # @return [Synchronization::AbstractStruct] a new struct with the new values - # - # @raise [ArgumentError] of given a member that is not defined in the struct - def merge(other, &block) - synchronize { ns_merge(other, &block) } - end - - # @!macro struct_to_h - # - # Returns a hash containing the names and values for the struct’s members. - # - # @return [Hash] the names and values for the struct’s members - def to_h - synchronize { ns_to_h } - end - - # @!macro struct_get - # - # Attribute Reference - # - # @param [Symbol, String, Integer] member the string or symbol name of the member - # for which to obtain the value or the member's index - # - # @return [Object] the value of the given struct member or the member at the given index. - # - # @raise [NameError] if the member does not exist - # @raise [IndexError] if the index is out of range. - def [](member) - synchronize { ns_get(member) } - end - - # @!macro struct_equality - # - # Equality - # - # @return [Boolean] true if other has the same struct subclass and has - # equal member values (according to `Object#==`) - def ==(other) - synchronize { ns_equality(other) } - end - - # @!macro struct_each - # - # Yields the value of each struct member in order. If no block is given - # an enumerator is returned. - # - # @yield the operation to be performed on each struct member - # @yieldparam [Object] value each struct value (in order) - def each(&block) - return enum_for(:each) unless block_given? - synchronize { ns_each(&block) } - end - - # @!macro struct_each_pair - # - # Yields the name and value of each struct member in order. If no block is - # given an enumerator is returned. - # - # @yield the operation to be performed on each struct member/value pair - # @yieldparam [Object] member each struct member (in order) - # @yieldparam [Object] value each struct value (in order) - def each_pair(&block) - return enum_for(:each_pair) unless block_given? - synchronize { ns_each_pair(&block) } - end - - # @!macro struct_select - # - # Yields each member value from the struct to the block and returns an Array - # containing the member values from the struct for which the given block - # returns a true value (equivalent to `Enumerable#select`). - # - # @yield the operation to be performed on each struct member - # @yieldparam [Object] value each struct value (in order) - # - # @return [Array] an array containing each value for which the block returns true - def select(&block) - return enum_for(:select) unless block_given? - synchronize { ns_select(&block) } - end - - # @!macro struct_set - # - # Attribute Assignment - # - # Sets the value of the given struct member or the member at the given index. - # - # @param [Symbol, String, Integer] member the string or symbol name of the member - # for which to obtain the value or the member's index - # - # @return [Object] the value of the given struct member or the member at the given index. - # - # @raise [NameError] if the name does not exist - # @raise [IndexError] if the index is out of range. - def []=(member, value) - if member.is_a? Integer - length = synchronize { @values.length } - if member >= length - raise IndexError.new("offset #{member} too large for struct(size:#{length})") - end - synchronize { @values[member] = value } - else - send("#{member}=", value) - end - rescue NoMethodError - raise NameError.new("no member '#{member}' in struct") - end - - private - - # @!visibility private - def initialize_copy(original) - synchronize do - super(original) - ns_initialize_copy - end - end - - # @!macro struct_new - def self.new(*args, &block) - clazz_name = nil - if args.length == 0 - raise ArgumentError.new('wrong number of arguments (0 for 1+)') - elsif args.length > 0 && args.first.is_a?(String) - clazz_name = args.shift - end - FACTORY.define_struct(clazz_name, args, &block) - end - - FACTORY = Class.new(Synchronization::LockableObject) do - def define_struct(name, members, &block) - synchronize do - clazz = Synchronization::AbstractStruct.define_struct_class(MutableStruct, Synchronization::LockableObject, name, members, &block) - members.each_with_index do |member, index| - clazz.send :remove_method, member - clazz.send(:define_method, member) do - synchronize { @values[index] } - end - clazz.send(:define_method, "#{member}=") do |value| - synchronize { @values[index] = value } - end - end - clazz - end - end - end.new - private_constant :FACTORY - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/mvar.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/mvar.rb deleted file mode 100644 index dfc41950..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/mvar.rb +++ /dev/null @@ -1,242 +0,0 @@ -require 'concurrent/concern/dereferenceable' -require 'concurrent/synchronization/object' - -module Concurrent - - # An `MVar` is a synchronized single element container. They are empty or - # contain one item. Taking a value from an empty `MVar` blocks, as does - # putting a value into a full one. You can either think of them as blocking - # queue of length one, or a special kind of mutable variable. - # - # On top of the fundamental `#put` and `#take` operations, we also provide a - # `#mutate` that is atomic with respect to operations on the same instance. - # These operations all support timeouts. - # - # We also support non-blocking operations `#try_put!` and `#try_take!`, a - # `#set!` that ignores existing values, a `#value` that returns the value - # without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields - # `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. - # You shouldn't use these operations in the first instance. - # - # `MVar` is a [Dereferenceable](Dereferenceable). - # - # `MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala. - # - # Note that unlike the original Haskell paper, our `#take` is blocking. This is how - # Haskell and Scala do it today. - # - # @!macro copy_options - # - # ## See Also - # - # 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th - # ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991. - # - # 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794). - # In Proceedings of the 23rd Symposium on Principles of Programming Languages - # (PoPL), 1996. - class MVar < Synchronization::Object - include Concern::Dereferenceable - safe_initialization! - - # Unique value that represents that an `MVar` was empty - EMPTY = ::Object.new - - # Unique value that represents that an `MVar` timed out before it was able - # to produce a value. - TIMEOUT = ::Object.new - - # Create a new `MVar`, either empty or with an initial value. - # - # @param [Hash] opts the options controlling how the future will be processed - # - # @!macro deref_options - def initialize(value = EMPTY, opts = {}) - @value = value - @mutex = Mutex.new - @empty_condition = ConditionVariable.new - @full_condition = ConditionVariable.new - set_deref_options(opts) - end - - # Remove the value from an `MVar`, leaving it empty, and blocking if there - # isn't a value. A timeout can be set to limit the time spent blocked, in - # which case it returns `TIMEOUT` if the time is exceeded. - # @return [Object] the value that was taken, or `TIMEOUT` - def take(timeout = nil) - @mutex.synchronize do - wait_for_full(timeout) - - # If we timed out we'll still be empty - if unlocked_full? - value = @value - @value = EMPTY - @empty_condition.signal - apply_deref_options(value) - else - TIMEOUT - end - end - end - - # acquires lock on the from an `MVAR`, yields the value to provided block, - # and release lock. A timeout can be set to limit the time spent blocked, - # in which case it returns `TIMEOUT` if the time is exceeded. - # @return [Object] the value returned by the block, or `TIMEOUT` - def borrow(timeout = nil) - @mutex.synchronize do - wait_for_full(timeout) - - # if we timeoud out we'll still be empty - if unlocked_full? - yield @value - else - TIMEOUT - end - end - end - - # Put a value into an `MVar`, blocking if there is already a value until - # it is empty. A timeout can be set to limit the time spent blocked, in - # which case it returns `TIMEOUT` if the time is exceeded. - # @return [Object] the value that was put, or `TIMEOUT` - def put(value, timeout = nil) - @mutex.synchronize do - wait_for_empty(timeout) - - # If we timed out we won't be empty - if unlocked_empty? - @value = value - @full_condition.signal - apply_deref_options(value) - else - TIMEOUT - end - end - end - - # Atomically `take`, yield the value to a block for transformation, and then - # `put` the transformed value. Returns the transformed value. A timeout can - # be set to limit the time spent blocked, in which case it returns `TIMEOUT` - # if the time is exceeded. - # @return [Object] the transformed value, or `TIMEOUT` - def modify(timeout = nil) - raise ArgumentError.new('no block given') unless block_given? - - @mutex.synchronize do - wait_for_full(timeout) - - # If we timed out we'll still be empty - if unlocked_full? - value = @value - @value = yield value - @full_condition.signal - apply_deref_options(value) - else - TIMEOUT - end - end - end - - # Non-blocking version of `take`, that returns `EMPTY` instead of blocking. - def try_take! - @mutex.synchronize do - if unlocked_full? - value = @value - @value = EMPTY - @empty_condition.signal - apply_deref_options(value) - else - EMPTY - end - end - end - - # Non-blocking version of `put`, that returns whether or not it was successful. - def try_put!(value) - @mutex.synchronize do - if unlocked_empty? - @value = value - @full_condition.signal - true - else - false - end - end - end - - # Non-blocking version of `put` that will overwrite an existing value. - def set!(value) - @mutex.synchronize do - old_value = @value - @value = value - @full_condition.signal - apply_deref_options(old_value) - end - end - - # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. - def modify! - raise ArgumentError.new('no block given') unless block_given? - - @mutex.synchronize do - value = @value - @value = yield value - if unlocked_empty? - @empty_condition.signal - else - @full_condition.signal - end - apply_deref_options(value) - end - end - - # Returns if the `MVar` is currently empty. - def empty? - @mutex.synchronize { @value == EMPTY } - end - - # Returns if the `MVar` currently contains a value. - def full? - !empty? - end - - protected - - def synchronize(&block) - @mutex.synchronize(&block) - end - - private - - def unlocked_empty? - @value == EMPTY - end - - def unlocked_full? - ! unlocked_empty? - end - - def wait_for_full(timeout) - wait_while(@full_condition, timeout) { unlocked_empty? } - end - - def wait_for_empty(timeout) - wait_while(@empty_condition, timeout) { unlocked_full? } - end - - def wait_while(condition, timeout) - if timeout.nil? - while yield - condition.wait(@mutex) - end - else - stop = Concurrent.monotonic_time + timeout - while yield && timeout > 0.0 - condition.wait(@mutex, timeout) - timeout = stop - Concurrent.monotonic_time - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/options.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/options.rb deleted file mode 100644 index bdd22a9d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/options.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'concurrent/configuration' - -module Concurrent - - # @!visibility private - module Options - - # Get the requested `Executor` based on the values set in the options hash. - # - # @param [Hash] opts the options defining the requested executor - # @option opts [Executor] :executor when set use the given `Executor` instance. - # Three special values are also supported: `:fast` returns the global fast executor, - # `:io` returns the global io executor, and `:immediate` returns a new - # `ImmediateExecutor` object. - # - # @return [Executor, nil] the requested thread pool, or nil when no option specified - # - # @!visibility private - def self.executor_from_options(opts = {}) # :nodoc: - if identifier = opts.fetch(:executor, nil) - executor(identifier) - else - nil - end - end - - def self.executor(executor_identifier) - case executor_identifier - when :fast - Concurrent.global_fast_executor - when :io - Concurrent.global_io_executor - when :immediate - Concurrent.global_immediate_executor - when Concurrent::ExecutorService - executor_identifier - else - raise ArgumentError, "executor not recognized by '#{executor_identifier}'" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promise.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promise.rb deleted file mode 100644 index c717f9b0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promise.rb +++ /dev/null @@ -1,580 +0,0 @@ -require 'thread' -require 'concurrent/constants' -require 'concurrent/errors' -require 'concurrent/ivar' -require 'concurrent/executor/safe_task_executor' - -require 'concurrent/options' - -module Concurrent - - PromiseExecutionError = Class.new(StandardError) - - # Promises are inspired by the JavaScript [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) - # and [Promises/A+](http://promises-aplus.github.io/promises-spec/) specifications. - # - # > A promise represents the eventual value returned from the single - # > completion of an operation. - # - # Promises are similar to futures and share many of the same behaviours. - # Promises are far more robust, however. Promises can be chained in a tree - # structure where each promise may have zero or more children. Promises are - # chained using the `then` method. The result of a call to `then` is always - # another promise. Promises are resolved asynchronously (with respect to the - # main thread) but in a strict order: parents are guaranteed to be resolved - # before their children, children before their younger siblings. The `then` - # method takes two parameters: an optional block to be executed upon parent - # resolution and an optional callable to be executed upon parent failure. The - # result of each promise is passed to each of its children upon resolution. - # When a promise is rejected all its children will be summarily rejected and - # will receive the reason. - # - # Promises have several possible states: *:unscheduled*, *:pending*, - # *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as - # `#incomplete?` and `#complete?`. When a Promise is created it is set to - # *:unscheduled*. Once the `#execute` method is called the state becomes - # *:pending*. Once a job is pulled from the thread pool's queue and is given - # to a thread for processing (often immediately upon `#post`) the state - # becomes *:processing*. The future will remain in this state until processing - # is complete. A future that is in the *:unscheduled*, *:pending*, or - # *:processing* is considered `#incomplete?`. A `#complete?` Promise is either - # *:rejected*, indicating that an exception was thrown during processing, or - # *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value` - # will be updated to reflect the result of the operation. If *:rejected* the - # `reason` will be updated with a reference to the thrown exception. The - # predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and - # `#fulfilled?` can be called at any time to obtain the state of the Promise, - # as can the `#state` method, which returns a symbol. - # - # Retrieving the value of a promise is done through the `value` (alias: - # `deref`) method. Obtaining the value of a promise is a potentially blocking - # operation. When a promise is *rejected* a call to `value` will return `nil` - # immediately. When a promise is *fulfilled* a call to `value` will - # immediately return the current value. When a promise is *pending* a call to - # `value` will block until the promise is either *rejected* or *fulfilled*. A - # *timeout* value can be passed to `value` to limit how long the call will - # block. If `nil` the call will block indefinitely. If `0` the call will not - # block. Any other integer or float value will indicate the maximum number of - # seconds to block. - # - # Promises run on the global thread pool. - # - # @!macro copy_options - # - # ### Examples - # - # Start by requiring promises - # - # ```ruby - # require 'concurrent/promise' - # ``` - # - # Then create one - # - # ```ruby - # p = Concurrent::Promise.execute do - # # do something - # 42 - # end - # ``` - # - # Promises can be chained using the `then` method. The `then` method accepts a - # block and an executor, to be executed on fulfillment, and a callable argument to be executed - # on rejection. The result of the each promise is passed as the block argument - # to chained promises. - # - # ```ruby - # p = Concurrent::Promise.new{10}.then{|x| x * 2}.then{|result| result - 10 }.execute - # ``` - # - # And so on, and so on, and so on... - # - # ```ruby - # p = Concurrent::Promise.fulfill(20). - # then{|result| result - 10 }. - # then{|result| result * 3 }. - # then(executor: different_executor){|result| result % 5 }.execute - # ``` - # - # The initial state of a newly created Promise depends on the state of its parent: - # - if parent is *unscheduled* the child will be *unscheduled* - # - if parent is *pending* the child will be *pending* - # - if parent is *fulfilled* the child will be *pending* - # - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*) - # - # Promises are executed asynchronously from the main thread. By the time a - # child Promise finishes initialization it may be in a different state than its - # parent (by the time a child is created its parent may have completed - # execution and changed state). Despite being asynchronous, however, the order - # of execution of Promise objects in a chain (or tree) is strictly defined. - # - # There are multiple ways to create and execute a new `Promise`. Both ways - # provide identical behavior: - # - # ```ruby - # # create, operate, then execute - # p1 = Concurrent::Promise.new{ "Hello World!" } - # p1.state #=> :unscheduled - # p1.execute - # - # # create and immediately execute - # p2 = Concurrent::Promise.new{ "Hello World!" }.execute - # - # # execute during creation - # p3 = Concurrent::Promise.execute{ "Hello World!" } - # ``` - # - # Once the `execute` method is called a `Promise` becomes `pending`: - # - # ```ruby - # p = Concurrent::Promise.execute{ "Hello, world!" } - # p.state #=> :pending - # p.pending? #=> true - # ``` - # - # Wait a little bit, and the promise will resolve and provide a value: - # - # ```ruby - # p = Concurrent::Promise.execute{ "Hello, world!" } - # sleep(0.1) - # - # p.state #=> :fulfilled - # p.fulfilled? #=> true - # p.value #=> "Hello, world!" - # ``` - # - # If an exception occurs, the promise will be rejected and will provide - # a reason for the rejection: - # - # ```ruby - # p = Concurrent::Promise.execute{ raise StandardError.new("Here comes the Boom!") } - # sleep(0.1) - # - # p.state #=> :rejected - # p.rejected? #=> true - # p.reason #=> "#" - # ``` - # - # #### Rejection - # - # When a promise is rejected all its children will be rejected and will - # receive the rejection `reason` as the rejection callable parameter: - # - # ```ruby - # p = Concurrent::Promise.execute { Thread.pass; raise StandardError } - # - # c1 = p.then(-> reason { 42 }) - # c2 = p.then(-> reason { raise 'Boom!' }) - # - # c1.wait.state #=> :fulfilled - # c1.value #=> 45 - # c2.wait.state #=> :rejected - # c2.reason #=> # - # ``` - # - # Once a promise is rejected it will continue to accept children that will - # receive immediately rejection (they will be executed asynchronously). - # - # #### Aliases - # - # The `then` method is the most generic alias: it accepts a block to be - # executed upon parent fulfillment and a callable to be executed upon parent - # rejection. At least one of them should be passed. The default block is `{ - # |result| result }` that fulfills the child with the parent value. The - # default callable is `{ |reason| raise reason }` that rejects the child with - # the parent reason. - # - # - `on_success { |result| ... }` is the same as `then {|result| ... }` - # - `rescue { |reason| ... }` is the same as `then(Proc.new { |reason| ... } )` - # - `rescue` is aliased by `catch` and `on_error` - class Promise < IVar - - # Initialize a new Promise with the provided options. - # - # @!macro executor_and_deref_options - # - # @!macro promise_init_options - # - # @option opts [Promise] :parent the parent `Promise` when building a chain/tree - # @option opts [Proc] :on_fulfill fulfillment handler - # @option opts [Proc] :on_reject rejection handler - # @option opts [object, Array] :args zero or more arguments to be passed - # the task block on execution - # - # @yield The block operation to be performed asynchronously. - # - # @raise [ArgumentError] if no block is given - # - # @see http://wiki.commonjs.org/wiki/Promises/A - # @see http://promises-aplus.github.io/promises-spec/ - def initialize(opts = {}, &block) - opts.delete_if { |k, v| v.nil? } - super(NULL, opts.merge(__promise_body_from_block__: block), &nil) - end - - # Create a new `Promise` and fulfill it immediately. - # - # @!macro executor_and_deref_options - # - # @!macro promise_init_options - # - # @raise [ArgumentError] if no block is given - # - # @return [Promise] the newly created `Promise` - def self.fulfill(value, opts = {}) - Promise.new(opts).tap { |p| p.send(:synchronized_set_state!, true, value, nil) } - end - - # Create a new `Promise` and reject it immediately. - # - # @!macro executor_and_deref_options - # - # @!macro promise_init_options - # - # @raise [ArgumentError] if no block is given - # - # @return [Promise] the newly created `Promise` - def self.reject(reason, opts = {}) - Promise.new(opts).tap { |p| p.send(:synchronized_set_state!, false, nil, reason) } - end - - # Execute an `:unscheduled` `Promise`. Immediately sets the state to `:pending` and - # passes the block to a new thread/thread pool for eventual execution. - # Does nothing if the `Promise` is in any state other than `:unscheduled`. - # - # @return [Promise] a reference to `self` - def execute - if root? - if compare_and_set_state(:pending, :unscheduled) - set_pending - realize(@promise_body) - end - else - compare_and_set_state(:pending, :unscheduled) - @parent.execute - end - self - end - - # @!macro ivar_set_method - # - # @raise [Concurrent::PromiseExecutionError] if not the root promise - def set(value = NULL, &block) - raise PromiseExecutionError.new('supported only on root promise') unless root? - check_for_block_or_value!(block_given?, value) - synchronize do - if @state != :unscheduled - raise MultipleAssignmentError - else - @promise_body = block || Proc.new { |result| value } - end - end - execute - end - - # @!macro ivar_fail_method - # - # @raise [Concurrent::PromiseExecutionError] if not the root promise - def fail(reason = StandardError.new) - set { raise reason } - end - - # Create a new `Promise` object with the given block, execute it, and return the - # `:pending` object. - # - # @!macro executor_and_deref_options - # - # @!macro promise_init_options - # - # @return [Promise] the newly created `Promise` in the `:pending` state - # - # @raise [ArgumentError] if no block is given - # - # @example - # promise = Concurrent::Promise.execute{ sleep(1); 42 } - # promise.state #=> :pending - def self.execute(opts = {}, &block) - new(opts, &block).execute - end - - # Chain a new promise off the current promise. - # - # @return [Promise] the new promise - # @yield The block operation to be performed asynchronously. - # @overload then(rescuer, executor, &block) - # @param [Proc] rescuer An optional rescue block to be executed if the - # promise is rejected. - # @param [ThreadPool] executor An optional thread pool executor to be used - # in the new Promise - # @overload then(rescuer, executor: executor, &block) - # @param [Proc] rescuer An optional rescue block to be executed if the - # promise is rejected. - # @param [ThreadPool] executor An optional thread pool executor to be used - # in the new Promise - def then(*args, &block) - if args.last.is_a?(::Hash) - executor = args.pop[:executor] - rescuer = args.first - else - rescuer, executor = args - end - - executor ||= @executor - - raise ArgumentError.new('rescuers and block are both missing') if rescuer.nil? && !block_given? - block = Proc.new { |result| result } unless block_given? - child = Promise.new( - parent: self, - executor: executor, - on_fulfill: block, - on_reject: rescuer - ) - - synchronize do - child.state = :pending if @state == :pending - child.on_fulfill(apply_deref_options(@value)) if @state == :fulfilled - child.on_reject(@reason) if @state == :rejected - @children << child - end - - child - end - - # Chain onto this promise an action to be undertaken on success - # (fulfillment). - # - # @yield The block to execute - # - # @return [Promise] self - def on_success(&block) - raise ArgumentError.new('no block given') unless block_given? - self.then(&block) - end - - # Chain onto this promise an action to be undertaken on failure - # (rejection). - # - # @yield The block to execute - # - # @return [Promise] self - def rescue(&block) - self.then(block) - end - - alias_method :catch, :rescue - alias_method :on_error, :rescue - - # Yield the successful result to the block that returns a promise. If that - # promise is also successful the result is the result of the yielded promise. - # If either part fails the whole also fails. - # - # @example - # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 - # - # @return [Promise] - def flat_map(&block) - child = Promise.new( - parent: self, - executor: ImmediateExecutor.new, - ) - - on_error { |e| child.on_reject(e) } - on_success do |result1| - begin - inner = block.call(result1) - inner.execute - inner.on_success { |result2| child.on_fulfill(result2) } - inner.on_error { |e| child.on_reject(e) } - rescue => e - child.on_reject(e) - end - end - - child - end - - # Builds a promise that produces the result of promises in an Array - # and fails if any of them fails. - # - # @overload zip(*promises) - # @param [Array] promises - # - # @overload zip(*promises, opts) - # @param [Array] promises - # @param [Hash] opts the configuration options - # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. - # @option opts [Boolean] :execute (true) execute promise before returning - # - # @return [Promise] - def self.zip(*promises) - opts = promises.last.is_a?(::Hash) ? promises.pop.dup : {} - opts[:executor] ||= ImmediateExecutor.new - zero = if !opts.key?(:execute) || opts.delete(:execute) - fulfill([], opts) - else - Promise.new(opts) { [] } - end - - promises.reduce(zero) do |p1, p2| - p1.flat_map do |results| - p2.then do |next_result| - results << next_result - end - end - end - end - - # Builds a promise that produces the result of self and others in an Array - # and fails if any of them fails. - # - # @overload zip(*promises) - # @param [Array] others - # - # @overload zip(*promises, opts) - # @param [Array] others - # @param [Hash] opts the configuration options - # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. - # @option opts [Boolean] :execute (true) execute promise before returning - # - # @return [Promise] - def zip(*others) - self.class.zip(self, *others) - end - - # Aggregates a collection of promises and executes the `then` condition - # if all aggregated promises succeed. Executes the `rescue` handler with - # a `Concurrent::PromiseExecutionError` if any of the aggregated promises - # fail. Upon execution will execute any of the aggregate promises that - # were not already executed. - # - # @!macro promise_self_aggregate - # - # The returned promise will not yet have been executed. Additional `#then` - # and `#rescue` handlers may still be provided. Once the returned promise - # is execute the aggregate promises will be also be executed (if they have - # not been executed already). The results of the aggregate promises will - # be checked upon completion. The necessary `#then` and `#rescue` blocks - # on the aggregating promise will then be executed as appropriate. If the - # `#rescue` handlers are executed the raises exception will be - # `Concurrent::PromiseExecutionError`. - # - # @param [Array] promises Zero or more promises to aggregate - # @return [Promise] an unscheduled (not executed) promise that aggregates - # the promises given as arguments - def self.all?(*promises) - aggregate(:all?, *promises) - end - - # Aggregates a collection of promises and executes the `then` condition - # if any aggregated promises succeed. Executes the `rescue` handler with - # a `Concurrent::PromiseExecutionError` if any of the aggregated promises - # fail. Upon execution will execute any of the aggregate promises that - # were not already executed. - # - # @!macro promise_self_aggregate - def self.any?(*promises) - aggregate(:any?, *promises) - end - - protected - - def ns_initialize(value, opts) - super - - @executor = Options.executor_from_options(opts) || Concurrent.global_io_executor - @args = get_arguments_from(opts) - - @parent = opts.fetch(:parent) { nil } - @on_fulfill = opts.fetch(:on_fulfill) { Proc.new { |result| result } } - @on_reject = opts.fetch(:on_reject) { Proc.new { |reason| raise reason } } - - @promise_body = opts[:__promise_body_from_block__] || Proc.new { |result| result } - @state = :unscheduled - @children = [] - end - - # Aggregate a collection of zero or more promises under a composite promise, - # execute the aggregated promises and collect them into a standard Ruby array, - # call the given Ruby `Ennnumerable` predicate (such as `any?`, `all?`, `none?`, - # or `one?`) on the collection checking for the success or failure of each, - # then executing the composite's `#then` handlers if the predicate returns - # `true` or executing the composite's `#rescue` handlers if the predicate - # returns false. - # - # @!macro promise_self_aggregate - def self.aggregate(method, *promises) - composite = Promise.new do - completed = promises.collect do |promise| - promise.execute if promise.unscheduled? - promise.wait - promise - end - unless completed.empty? || completed.send(method){|promise| promise.fulfilled? } - raise PromiseExecutionError - end - end - composite - end - - # @!visibility private - def set_pending - synchronize do - @state = :pending - @children.each { |c| c.set_pending } - end - end - - # @!visibility private - def root? # :nodoc: - @parent.nil? - end - - # @!visibility private - def on_fulfill(result) - realize Proc.new { @on_fulfill.call(result) } - nil - end - - # @!visibility private - def on_reject(reason) - realize Proc.new { @on_reject.call(reason) } - nil - end - - # @!visibility private - def notify_child(child) - if_state(:fulfilled) { child.on_fulfill(apply_deref_options(@value)) } - if_state(:rejected) { child.on_reject(@reason) } - end - - # @!visibility private - def complete(success, value, reason) - children_to_notify = synchronize do - set_state!(success, value, reason) - @children.dup - end - - children_to_notify.each { |child| notify_child(child) } - observers.notify_and_delete_observers{ [Time.now, self.value, reason] } - end - - # @!visibility private - def realize(task) - @executor.post do - success, value, reason = SafeTaskExecutor.new(task, rescue_exception: true).execute(*@args) - complete(success, value, reason) - end - end - - # @!visibility private - def set_state!(success, value, reason) - set_state(success, value, reason) - event.set - end - - # @!visibility private - def synchronized_set_state!(success, value, reason) - synchronize { set_state!(success, value, reason) } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb deleted file mode 100644 index c5df8fe9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb +++ /dev/null @@ -1,2178 +0,0 @@ -require 'concurrent/synchronization/object' -require 'concurrent/atomic/atomic_boolean' -require 'concurrent/atomic/atomic_fixnum' -require 'concurrent/collection/lock_free_stack' -require 'concurrent/configuration' -require 'concurrent/errors' -require 'concurrent/re_include' -require 'concurrent/utility/monotonic_time' - -module Concurrent - - # {include:file:docs-source/promises-main.md} - module Promises - - # @!macro promises.param.default_executor - # @param [Executor, :io, :fast] default_executor Instance of an executor or a name of the - # global executor. Default executor propagates to chained futures unless overridden with - # executor parameter or changed with {AbstractEventFuture#with_default_executor}. - # - # @!macro promises.param.executor - # @param [Executor, :io, :fast] executor Instance of an executor or a name of the - # global executor. The task is executed on it, default executor remains unchanged. - # - # @!macro promises.param.args - # @param [Object] args arguments which are passed to the task when it's executed. - # (It might be prepended with other arguments, see the @yield section). - # - # @!macro promises.shortcut.on - # Shortcut of {#$0_on} with default `:io` executor supplied. - # @see #$0_on - # - # @!macro promises.shortcut.using - # Shortcut of {#$0_using} with default `:io` executor supplied. - # @see #$0_using - # - # @!macro promise.param.task-future - # @yieldreturn will become result of the returned Future. - # Its returned value becomes {Future#value} fulfilling it, - # raised exception becomes {Future#reason} rejecting it. - # - # @!macro promise.param.callback - # @yieldreturn is forgotten. - - # Container of all {Future}, {Event} factory methods. They are never constructed directly with - # new. - module FactoryMethods - extend ReInclude - extend self - - module Configuration - # @return [Executor, :io, :fast] the executor which is used when none is supplied - # to a factory method. The method can be overridden in the receivers of - # `include FactoryMethod` - def default_executor - :io - end - end - - include Configuration - - # @!macro promises.shortcut.on - # @return [ResolvableEvent] - def resolvable_event - resolvable_event_on default_executor - end - - # Creates a resolvable event, user is responsible for resolving the event once - # by calling {Promises::ResolvableEvent#resolve}. - # - # @!macro promises.param.default_executor - # @return [ResolvableEvent] - def resolvable_event_on(default_executor = self.default_executor) - ResolvableEventPromise.new(default_executor).future - end - - # @!macro promises.shortcut.on - # @return [ResolvableFuture] - def resolvable_future - resolvable_future_on default_executor - end - - # Creates resolvable future, user is responsible for resolving the future once by - # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, - # or {Promises::ResolvableFuture#reject} - # - # @!macro promises.param.default_executor - # @return [ResolvableFuture] - def resolvable_future_on(default_executor = self.default_executor) - ResolvableFuturePromise.new(default_executor).future - end - - # @!macro promises.shortcut.on - # @return [Future] - def future(*args, &task) - future_on(default_executor, *args, &task) - end - - # Constructs a new Future which will be resolved after block is evaluated on default executor. - # Evaluation begins immediately. - # - # @!macro promises.param.default_executor - # @!macro promises.param.args - # @yield [*args] to the task. - # @!macro promise.param.task-future - # @return [Future] - def future_on(default_executor, *args, &task) - ImmediateEventPromise.new(default_executor).future.then(*args, &task) - end - - # Creates a resolved future with will be either fulfilled with the given value or rejected with - # the given reason. - # - # @param [true, false] fulfilled - # @param [Object] value - # @param [Object] reason - # @!macro promises.param.default_executor - # @return [Future] - def resolved_future(fulfilled, value, reason, default_executor = self.default_executor) - ImmediateFuturePromise.new(default_executor, fulfilled, value, reason).future - end - - # Creates a resolved future which will be fulfilled with the given value. - # - # @!macro promises.param.default_executor - # @param [Object] value - # @return [Future] - def fulfilled_future(value, default_executor = self.default_executor) - resolved_future true, value, nil, default_executor - end - - # Creates a resolved future which will be rejected with the given reason. - # - # @!macro promises.param.default_executor - # @param [Object] reason - # @return [Future] - def rejected_future(reason, default_executor = self.default_executor) - resolved_future false, nil, reason, default_executor - end - - # Creates resolved event. - # - # @!macro promises.param.default_executor - # @return [Event] - def resolved_event(default_executor = self.default_executor) - ImmediateEventPromise.new(default_executor).event - end - - # General constructor. Behaves differently based on the argument's type. It's provided for convenience - # but it's better to be explicit. - # - # @see rejected_future, resolved_event, fulfilled_future - # @!macro promises.param.default_executor - # @return [Event, Future] - # - # @overload make_future(nil, default_executor = self.default_executor) - # @param [nil] nil - # @return [Event] resolved event. - # - # @overload make_future(a_future, default_executor = self.default_executor) - # @param [Future] a_future - # @return [Future] a future which will be resolved when a_future is. - # - # @overload make_future(an_event, default_executor = self.default_executor) - # @param [Event] an_event - # @return [Event] an event which will be resolved when an_event is. - # - # @overload make_future(exception, default_executor = self.default_executor) - # @param [Exception] exception - # @return [Future] a rejected future with the exception as its reason. - # - # @overload make_future(value, default_executor = self.default_executor) - # @param [Object] value when none of the above overloads fits - # @return [Future] a fulfilled future with the value. - def make_future(argument = nil, default_executor = self.default_executor) - case argument - when AbstractEventFuture - # returning wrapper would change nothing - argument - when Exception - rejected_future argument, default_executor - when nil - resolved_event default_executor - else - fulfilled_future argument, default_executor - end - end - - # @!macro promises.shortcut.on - # @return [Future, Event] - def delay(*args, &task) - delay_on default_executor, *args, &task - end - - # Creates a new event or future which is resolved only after it is touched, - # see {Concurrent::AbstractEventFuture#touch}. - # - # @!macro promises.param.default_executor - # @overload delay_on(default_executor, *args, &task) - # If task is provided it returns a {Future} representing the result of the task. - # @!macro promises.param.args - # @yield [*args] to the task. - # @!macro promise.param.task-future - # @return [Future] - # @overload delay_on(default_executor) - # If no task is provided, it returns an {Event} - # @return [Event] - def delay_on(default_executor, *args, &task) - event = DelayPromise.new(default_executor).event - task ? event.chain(*args, &task) : event - end - - # @!macro promises.shortcut.on - # @return [Future, Event] - def schedule(intended_time, *args, &task) - schedule_on default_executor, intended_time, *args, &task - end - - # Creates a new event or future which is resolved in intended_time. - # - # @!macro promises.param.default_executor - # @!macro promises.param.intended_time - # @param [Numeric, Time] intended_time `Numeric` means to run in `intended_time` seconds. - # `Time` means to run on `intended_time`. - # @overload schedule_on(default_executor, intended_time, *args, &task) - # If task is provided it returns a {Future} representing the result of the task. - # @!macro promises.param.args - # @yield [*args] to the task. - # @!macro promise.param.task-future - # @return [Future] - # @overload schedule_on(default_executor, intended_time) - # If no task is provided, it returns an {Event} - # @return [Event] - def schedule_on(default_executor, intended_time, *args, &task) - event = ScheduledPromise.new(default_executor, intended_time).event - task ? event.chain(*args, &task) : event - end - - # @!macro promises.shortcut.on - # @return [Future] - def zip_futures(*futures_and_or_events) - zip_futures_on default_executor, *futures_and_or_events - end - - # Creates a new future which is resolved after all futures_and_or_events are resolved. - # Its value is an array of zipped future values. Its reason is an array of reasons for rejection. - # If there is an error it rejects. - # @!macro promises.event-conversion - # If event is supplied, which does not have value and can be only resolved, it's - # represented as `:fulfilled` with value `nil`. - # - # @!macro promises.param.default_executor - # @param [AbstractEventFuture] futures_and_or_events - # @return [Future] - def zip_futures_on(default_executor, *futures_and_or_events) - ZipFuturesPromise.new_blocked_by(futures_and_or_events, default_executor).future - end - - alias_method :zip, :zip_futures - - # @!macro promises.shortcut.on - # @return [Event] - def zip_events(*futures_and_or_events) - zip_events_on default_executor, *futures_and_or_events - end - - # Creates a new event which is resolved after all futures_and_or_events are resolved. - # (Future is resolved when fulfilled or rejected.) - # - # @!macro promises.param.default_executor - # @param [AbstractEventFuture] futures_and_or_events - # @return [Event] - def zip_events_on(default_executor, *futures_and_or_events) - ZipEventsPromise.new_blocked_by(futures_and_or_events, default_executor).event - end - - # @!macro promises.shortcut.on - # @return [Future] - def any_resolved_future(*futures_and_or_events) - any_resolved_future_on default_executor, *futures_and_or_events - end - - alias_method :any, :any_resolved_future - - # Creates a new future which is resolved after the first futures_and_or_events is resolved. - # Its result equals the result of the first resolved future. - # @!macro promises.any-touch - # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed - # futures un-executed if they are not required any more. - # @!macro promises.event-conversion - # - # @!macro promises.param.default_executor - # @param [AbstractEventFuture] futures_and_or_events - # @return [Future] - def any_resolved_future_on(default_executor, *futures_and_or_events) - AnyResolvedFuturePromise.new_blocked_by(futures_and_or_events, default_executor).future - end - - # @!macro promises.shortcut.on - # @return [Future] - def any_fulfilled_future(*futures_and_or_events) - any_fulfilled_future_on default_executor, *futures_and_or_events - end - - # Creates a new future which is resolved after the first futures_and_or_events is fulfilled. - # Its result equals the result of the first resolved future or if all futures_and_or_events reject, - # it has reason of the last rejected future. - # @!macro promises.any-touch - # @!macro promises.event-conversion - # - # @!macro promises.param.default_executor - # @param [AbstractEventFuture] futures_and_or_events - # @return [Future] - def any_fulfilled_future_on(default_executor, *futures_and_or_events) - AnyFulfilledFuturePromise.new_blocked_by(futures_and_or_events, default_executor).future - end - - # @!macro promises.shortcut.on - # @return [Event] - def any_event(*futures_and_or_events) - any_event_on default_executor, *futures_and_or_events - end - - # Creates a new event which becomes resolved after the first futures_and_or_events resolves. - # @!macro promises.any-touch - # - # @!macro promises.param.default_executor - # @param [AbstractEventFuture] futures_and_or_events - # @return [Event] - def any_event_on(default_executor, *futures_and_or_events) - AnyResolvedEventPromise.new_blocked_by(futures_and_or_events, default_executor).event - end - - # TODO consider adding first(count, *futures) - # TODO consider adding zip_by(slice, *futures) processing futures in slices - # TODO or rather a generic aggregator taking a function - end - - module InternalStates - # @!visibility private - class State - def resolved? - raise NotImplementedError - end - - def to_sym - raise NotImplementedError - end - end - - # @!visibility private - class Pending < State - def resolved? - false - end - - def to_sym - :pending - end - end - - # @!visibility private - class Reserved < Pending - end - - # @!visibility private - class ResolvedWithResult < State - def resolved? - true - end - - def to_sym - :resolved - end - - def result - [fulfilled?, value, reason] - end - - def fulfilled? - raise NotImplementedError - end - - def value - raise NotImplementedError - end - - def reason - raise NotImplementedError - end - - def apply - raise NotImplementedError - end - end - - # @!visibility private - class Fulfilled < ResolvedWithResult - - def initialize(value) - @Value = value - end - - def fulfilled? - true - end - - def apply(args, block) - block.call value, *args - end - - def value - @Value - end - - def reason - nil - end - - def to_sym - :fulfilled - end - end - - # @!visibility private - class FulfilledArray < Fulfilled - def apply(args, block) - block.call(*value, *args) - end - end - - # @!visibility private - class Rejected < ResolvedWithResult - def initialize(reason) - @Reason = reason - end - - def fulfilled? - false - end - - def value - nil - end - - def reason - @Reason - end - - def to_sym - :rejected - end - - def apply(args, block) - block.call reason, *args - end - end - - # @!visibility private - class PartiallyRejected < ResolvedWithResult - def initialize(value, reason) - super() - @Value = value - @Reason = reason - end - - def fulfilled? - false - end - - def to_sym - :rejected - end - - def value - @Value - end - - def reason - @Reason - end - - def apply(args, block) - block.call(*reason, *args) - end - end - - # @!visibility private - PENDING = Pending.new - # @!visibility private - RESERVED = Reserved.new - # @!visibility private - RESOLVED = Fulfilled.new(nil) - - def RESOLVED.to_sym - :resolved - end - end - - private_constant :InternalStates - - # @!macro promises.shortcut.event-future - # @see Event#$0 - # @see Future#$0 - - # @!macro promises.param.timeout - # @param [Numeric] timeout the maximum time in second to wait. - - # @!macro promises.warn.blocks - # @note This function potentially blocks current thread until the Future is resolved. - # Be careful it can deadlock. Try to chain instead. - - # Common ancestor of {Event} and {Future} classes, many shared methods are defined here. - class AbstractEventFuture < Synchronization::Object - safe_initialization! - attr_atomic(:internal_state) - private :internal_state=, :swap_internal_state, :compare_and_set_internal_state, :update_internal_state - # @!method internal_state - # @!visibility private - - include InternalStates - - def initialize(promise, default_executor) - super() - @Lock = Mutex.new - @Condition = ConditionVariable.new - @Promise = promise - @DefaultExecutor = default_executor - @Callbacks = LockFreeStack.new - @Waiters = AtomicFixnum.new 0 - self.internal_state = PENDING - end - - private :initialize - - # Returns its state. - # @return [Symbol] - # - # @overload an_event.state - # @return [:pending, :resolved] - # @overload a_future.state - # Both :fulfilled, :rejected implies :resolved. - # @return [:pending, :fulfilled, :rejected] - def state - internal_state.to_sym - end - - # Is it in pending state? - # @return [Boolean] - def pending? - !internal_state.resolved? - end - - # Is it in resolved state? - # @return [Boolean] - def resolved? - internal_state.resolved? - end - - # Propagates touch. Requests all the delayed futures, which it depends on, to be - # executed. This method is called by any other method requiring resolved state, like {#wait}. - # @return [self] - def touch - @Promise.touch - self - end - - # @!macro promises.touches - # Calls {Concurrent::AbstractEventFuture#touch}. - - # @!macro promises.method.wait - # Wait (block the Thread) until receiver is {#resolved?}. - # @!macro promises.touches - # - # @!macro promises.warn.blocks - # @!macro promises.param.timeout - # @return [self, true, false] self implies timeout was not used, true implies timeout was used - # and it was resolved, false implies it was not resolved within timeout. - def wait(timeout = nil) - result = wait_until_resolved(timeout) - timeout ? result : self - end - - # Returns default executor. - # @return [Executor] default executor - # @see #with_default_executor - # @see FactoryMethods#future_on - # @see FactoryMethods#resolvable_future - # @see FactoryMethods#any_fulfilled_future_on - # @see similar - def default_executor - @DefaultExecutor - end - - # @!macro promises.shortcut.on - # @return [Future] - def chain(*args, &task) - chain_on @DefaultExecutor, *args, &task - end - - # Chains the task to be executed asynchronously on executor after it is resolved. - # - # @!macro promises.param.executor - # @!macro promises.param.args - # @return [Future] - # @!macro promise.param.task-future - # - # @overload an_event.chain_on(executor, *args, &task) - # @yield [*args] to the task. - # @overload a_future.chain_on(executor, *args, &task) - # @yield [fulfilled, value, reason, *args] to the task. - # @yieldparam [true, false] fulfilled - # @yieldparam [Object] value - # @yieldparam [Object] reason - def chain_on(executor, *args, &task) - ChainPromise.new_blocked_by1(self, executor, executor, args, &task).future - end - - # @return [String] Short string representation. - def to_s - format '%s %s>', super[0..-2], state - end - - alias_method :inspect, :to_s - - # Resolves the resolvable when receiver is resolved. - # - # @param [Resolvable] resolvable - # @return [self] - def chain_resolvable(resolvable) - on_resolution! { resolvable.resolve_with internal_state } - end - - alias_method :tangle, :chain_resolvable - - # @!macro promises.shortcut.using - # @return [self] - def on_resolution(*args, &callback) - on_resolution_using @DefaultExecutor, *args, &callback - end - - # Stores the callback to be executed synchronously on resolving thread after it is - # resolved. - # - # @!macro promises.param.args - # @!macro promise.param.callback - # @return [self] - # - # @overload an_event.on_resolution!(*args, &callback) - # @yield [*args] to the callback. - # @overload a_future.on_resolution!(*args, &callback) - # @yield [fulfilled, value, reason, *args] to the callback. - # @yieldparam [true, false] fulfilled - # @yieldparam [Object] value - # @yieldparam [Object] reason - def on_resolution!(*args, &callback) - add_callback :callback_on_resolution, args, callback - end - - # Stores the callback to be executed asynchronously on executor after it is resolved. - # - # @!macro promises.param.executor - # @!macro promises.param.args - # @!macro promise.param.callback - # @return [self] - # - # @overload an_event.on_resolution_using(executor, *args, &callback) - # @yield [*args] to the callback. - # @overload a_future.on_resolution_using(executor, *args, &callback) - # @yield [fulfilled, value, reason, *args] to the callback. - # @yieldparam [true, false] fulfilled - # @yieldparam [Object] value - # @yieldparam [Object] reason - def on_resolution_using(executor, *args, &callback) - add_callback :async_callback_on_resolution, executor, args, callback - end - - # @!macro promises.method.with_default_executor - # Crates new object with same class with the executor set as its new default executor. - # Any futures depending on it will use the new default executor. - # @!macro promises.shortcut.event-future - # @abstract - # @return [AbstractEventFuture] - def with_default_executor(executor) - raise NotImplementedError - end - - # @!visibility private - def resolve_with(state, raise_on_reassign = true, reserved = false) - if compare_and_set_internal_state(reserved ? RESERVED : PENDING, state) - # go to synchronized block only if there were waiting threads - @Lock.synchronize { @Condition.broadcast } unless @Waiters.value == 0 - call_callbacks state - else - return rejected_resolution(raise_on_reassign, state) - end - self - end - - # For inspection. - # @!visibility private - # @return [Array] - def blocks - @Callbacks.each_with_object([]) do |(method, args), promises| - promises.push(args[0]) if method == :callback_notify_blocked - end - end - - # For inspection. - # @!visibility private - def callbacks - @Callbacks.each.to_a - end - - # For inspection. - # @!visibility private - def promise - @Promise - end - - # For inspection. - # @!visibility private - def touched? - promise.touched? - end - - # For inspection. - # @!visibility private - def waiting_threads - @Waiters.each.to_a - end - - # @!visibility private - def add_callback_notify_blocked(promise, index) - add_callback :callback_notify_blocked, promise, index - end - - # @!visibility private - def add_callback_clear_delayed_node(node) - add_callback(:callback_clear_delayed_node, node) - end - - # @!visibility private - def with_hidden_resolvable - # TODO (pitr-ch 10-Dec-2018): documentation, better name if in edge - self - end - - private - - def add_callback(method, *args) - state = internal_state - if state.resolved? - call_callback method, state, args - else - @Callbacks.push [method, args] - state = internal_state - # take back if it was resolved in the meanwhile - call_callbacks state if state.resolved? - end - self - end - - def callback_clear_delayed_node(state, node) - node.value = nil - end - - # @return [Boolean] - def wait_until_resolved(timeout) - return true if resolved? - - touch - - @Lock.synchronize do - @Waiters.increment - begin - if timeout - start = Concurrent.monotonic_time - until resolved? - break if @Condition.wait(@Lock, timeout) == nil # nil means timeout - timeout -= (Concurrent.monotonic_time - start) - break if timeout <= 0 - end - else - until resolved? - @Condition.wait(@Lock, timeout) - end - end - ensure - # JRuby may raise ConcurrencyError - @Waiters.decrement - end - end - resolved? - end - - def call_callback(method, state, args) - self.send method, state, *args - end - - def call_callbacks(state) - method, args = @Callbacks.pop - while method - call_callback method, state, args - method, args = @Callbacks.pop - end - end - - def with_async(executor, *args, &block) - Concurrent.executor(executor).post(*args, &block) - end - - def async_callback_on_resolution(state, executor, args, callback) - with_async(executor, state, args, callback) do |st, ar, cb| - callback_on_resolution st, ar, cb - end - end - - def callback_notify_blocked(state, promise, index) - promise.on_blocker_resolution self, index - end - end - - # Represents an event which will happen in future (will be resolved). The event is either - # pending or resolved. It should be always resolved. Use {Future} to communicate rejections and - # cancellation. - class Event < AbstractEventFuture - - alias_method :then, :chain - - - # @!macro promises.method.zip - # Creates a new event or a future which will be resolved when receiver and other are. - # Returns an event if receiver and other are events, otherwise returns a future. - # If just one of the parties is Future then the result - # of the returned future is equal to the result of the supplied future. If both are futures - # then the result is as described in {FactoryMethods#zip_futures_on}. - # - # @return [Future, Event] - def zip(other) - if other.is_a?(Future) - ZipFutureEventPromise.new_blocked_by2(other, self, @DefaultExecutor).future - else - ZipEventEventPromise.new_blocked_by2(self, other, @DefaultExecutor).event - end - end - - alias_method :&, :zip - - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. - # - # @return [Event] - def any(event_or_future) - AnyResolvedEventPromise.new_blocked_by2(self, event_or_future, @DefaultExecutor).event - end - - alias_method :|, :any - - # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. - # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. - # - # @return [Event] - def delay - event = DelayPromise.new(@DefaultExecutor).event - ZipEventEventPromise.new_blocked_by2(self, event, @DefaultExecutor).event - end - - # @!macro promise.method.schedule - # Creates new event dependent on receiver scheduled to execute on/in intended_time. - # In time is interpreted from the moment the receiver is resolved, therefore it inserts - # delay into the chain. - # - # @!macro promises.param.intended_time - # @return [Event] - def schedule(intended_time) - chain do - event = ScheduledPromise.new(@DefaultExecutor, intended_time).event - ZipEventEventPromise.new_blocked_by2(self, event, @DefaultExecutor).event - end.flat_event - end - - # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. - # - # @return [Future] - def to_future - future = Promises.resolvable_future - ensure - chain_resolvable(future) - end - - # Returns self, since this is event - # @return [Event] - def to_event - self - end - - # @!macro promises.method.with_default_executor - # @return [Event] - def with_default_executor(executor) - EventWrapperPromise.new_blocked_by1(self, executor).event - end - - private - - def rejected_resolution(raise_on_reassign, state) - raise Concurrent::MultipleAssignmentError.new('Event can be resolved only once') if raise_on_reassign - return false - end - - def callback_on_resolution(state, args, callback) - callback.call(*args) - end - end - - # Represents a value which will become available in future. May reject with a reason instead, - # e.g. when the tasks raises an exception. - class Future < AbstractEventFuture - - # Is it in fulfilled state? - # @return [Boolean] - def fulfilled? - state = internal_state - state.resolved? && state.fulfilled? - end - - # Is it in rejected state? - # @return [Boolean] - def rejected? - state = internal_state - state.resolved? && !state.fulfilled? - end - - # @!macro promises.warn.nil - # @note Make sure returned `nil` is not confused with timeout, no value when rejected, - # no reason when fulfilled, etc. - # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. - - # @!macro promises.method.value - # Return value of the future. - # @!macro promises.touches - # - # @!macro promises.warn.blocks - # @!macro promises.warn.nil - # @!macro promises.param.timeout - # @!macro promises.param.timeout_value - # @param [Object] timeout_value a value returned by the method when it times out - # @return [Object, nil, timeout_value] the value of the Future when fulfilled, - # timeout_value on timeout, - # nil on rejection. - def value(timeout = nil, timeout_value = nil) - if wait_until_resolved timeout - internal_state.value - else - timeout_value - end - end - - # Returns reason of future's rejection. - # @!macro promises.touches - # - # @!macro promises.warn.blocks - # @!macro promises.warn.nil - # @!macro promises.param.timeout - # @!macro promises.param.timeout_value - # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. - def reason(timeout = nil, timeout_value = nil) - if wait_until_resolved timeout - internal_state.reason - else - timeout_value - end - end - - # Returns triplet fulfilled?, value, reason. - # @!macro promises.touches - # - # @!macro promises.warn.blocks - # @!macro promises.param.timeout - # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil - # on timeout. - def result(timeout = nil) - internal_state.result if wait_until_resolved timeout - end - - # @!macro promises.method.wait - # @raise [Exception] {#reason} on rejection - def wait!(timeout = nil) - result = wait_until_resolved!(timeout) - timeout ? result : self - end - - # @!macro promises.method.value - # @return [Object, nil, timeout_value] the value of the Future when fulfilled, - # or nil on rejection, - # or timeout_value on timeout. - # @raise [Exception] {#reason} on rejection - def value!(timeout = nil, timeout_value = nil) - if wait_until_resolved! timeout - internal_state.value - else - timeout_value - end - end - - # Allows rejected Future to be risen with `raise` method. - # If the reason is not an exception `Runtime.new(reason)` is returned. - # - # @example - # raise Promises.rejected_future(StandardError.new("boom")) - # raise Promises.rejected_future("or just boom") - # @raise [Concurrent::Error] when raising not rejected future - # @return [Exception] - def exception(*args) - raise Concurrent::Error, 'it is not rejected' unless rejected? - raise ArgumentError unless args.size <= 1 - reason = Array(internal_state.reason).flatten.compact - if reason.size > 1 - ex = Concurrent::MultipleErrors.new reason - ex.set_backtrace(caller) - ex - else - ex = if reason[0].respond_to? :exception - reason[0].exception(*args) - else - RuntimeError.new(reason[0]).exception(*args) - end - ex.set_backtrace Array(ex.backtrace) + caller - ex - end - end - - # @!macro promises.shortcut.on - # @return [Future] - def then(*args, &task) - then_on @DefaultExecutor, *args, &task - end - - # Chains the task to be executed asynchronously on executor after it fulfills. Does not run - # the task if it rejects. It will resolve though, triggering any dependent futures. - # - # @!macro promises.param.executor - # @!macro promises.param.args - # @!macro promise.param.task-future - # @return [Future] - # @yield [value, *args] to the task. - def then_on(executor, *args, &task) - ThenPromise.new_blocked_by1(self, executor, executor, args, &task).future - end - - # @!macro promises.shortcut.on - # @return [Future] - def rescue(*args, &task) - rescue_on @DefaultExecutor, *args, &task - end - - # Chains the task to be executed asynchronously on executor after it rejects. Does not run - # the task if it fulfills. It will resolve though, triggering any dependent futures. - # - # @!macro promises.param.executor - # @!macro promises.param.args - # @!macro promise.param.task-future - # @return [Future] - # @yield [reason, *args] to the task. - def rescue_on(executor, *args, &task) - RescuePromise.new_blocked_by1(self, executor, executor, args, &task).future - end - - # @!macro promises.method.zip - # @return [Future] - def zip(other) - if other.is_a?(Future) - ZipFuturesPromise.new_blocked_by2(self, other, @DefaultExecutor).future - else - ZipFutureEventPromise.new_blocked_by2(self, other, @DefaultExecutor).future - end - end - - alias_method :&, :zip - - # Creates a new event which will be resolved when the first of receiver, `event_or_future` - # resolves. Returning future will have value nil if event_or_future is event and resolves - # first. - # - # @return [Future] - def any(event_or_future) - AnyResolvedFuturePromise.new_blocked_by2(self, event_or_future, @DefaultExecutor).future - end - - alias_method :|, :any - - # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. - # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. - # - # @return [Future] - def delay - event = DelayPromise.new(@DefaultExecutor).event - ZipFutureEventPromise.new_blocked_by2(self, event, @DefaultExecutor).future - end - - # @!macro promise.method.schedule - # @return [Future] - def schedule(intended_time) - chain do - event = ScheduledPromise.new(@DefaultExecutor, intended_time).event - ZipFutureEventPromise.new_blocked_by2(self, event, @DefaultExecutor).future - end.flat - end - - # @!macro promises.method.with_default_executor - # @return [Future] - def with_default_executor(executor) - FutureWrapperPromise.new_blocked_by1(self, executor).future - end - - # Creates new future which will have result of the future returned by receiver. If receiver - # rejects it will have its rejection. - # - # @param [Integer] level how many levels of futures should flatten - # @return [Future] - def flat_future(level = 1) - FlatFuturePromise.new_blocked_by1(self, level, @DefaultExecutor).future - end - - alias_method :flat, :flat_future - - # Creates new event which will be resolved when the returned event by receiver is. - # Be careful if the receiver rejects it will just resolve since Event does not hold reason. - # - # @return [Event] - def flat_event - FlatEventPromise.new_blocked_by1(self, @DefaultExecutor).event - end - - # @!macro promises.shortcut.using - # @return [self] - def on_fulfillment(*args, &callback) - on_fulfillment_using @DefaultExecutor, *args, &callback - end - - # Stores the callback to be executed synchronously on resolving thread after it is - # fulfilled. Does nothing on rejection. - # - # @!macro promises.param.args - # @!macro promise.param.callback - # @return [self] - # @yield [value, *args] to the callback. - def on_fulfillment!(*args, &callback) - add_callback :callback_on_fulfillment, args, callback - end - - # Stores the callback to be executed asynchronously on executor after it is - # fulfilled. Does nothing on rejection. - # - # @!macro promises.param.executor - # @!macro promises.param.args - # @!macro promise.param.callback - # @return [self] - # @yield [value, *args] to the callback. - def on_fulfillment_using(executor, *args, &callback) - add_callback :async_callback_on_fulfillment, executor, args, callback - end - - # @!macro promises.shortcut.using - # @return [self] - def on_rejection(*args, &callback) - on_rejection_using @DefaultExecutor, *args, &callback - end - - # Stores the callback to be executed synchronously on resolving thread after it is - # rejected. Does nothing on fulfillment. - # - # @!macro promises.param.args - # @!macro promise.param.callback - # @return [self] - # @yield [reason, *args] to the callback. - def on_rejection!(*args, &callback) - add_callback :callback_on_rejection, args, callback - end - - # Stores the callback to be executed asynchronously on executor after it is - # rejected. Does nothing on fulfillment. - # - # @!macro promises.param.executor - # @!macro promises.param.args - # @!macro promise.param.callback - # @return [self] - # @yield [reason, *args] to the callback. - def on_rejection_using(executor, *args, &callback) - add_callback :async_callback_on_rejection, executor, args, callback - end - - # Allows to use futures as green threads. The receiver has to evaluate to a future which - # represents what should be done next. It basically flattens indefinitely until non Future - # values is returned which becomes result of the returned future. Any encountered exception - # will become reason of the returned future. - # - # @return [Future] - # @param [#call(value)] run_test - # an object which when called returns either Future to keep running with - # or nil, then the run completes with the value. - # The run_test can be used to extract the Future from deeper structure, - # or to distinguish Future which is a resulting value from a future - # which is suppose to continue running. - # @example - # body = lambda do |v| - # v += 1 - # v < 5 ? Promises.future(v, &body) : v - # end - # Promises.future(0, &body).run.value! # => 5 - def run(run_test = method(:run_test)) - RunFuturePromise.new_blocked_by1(self, @DefaultExecutor, run_test).future - end - - # @!visibility private - def apply(args, block) - internal_state.apply args, block - end - - # Converts future to event which is resolved when future is resolved by fulfillment or rejection. - # - # @return [Event] - def to_event - event = Promises.resolvable_event - ensure - chain_resolvable(event) - end - - # Returns self, since this is a future - # @return [Future] - def to_future - self - end - - # @return [String] Short string representation. - def to_s - if resolved? - format '%s with %s>', super[0..-2], (fulfilled? ? value : reason).inspect - else - super - end - end - - alias_method :inspect, :to_s - - private - - def run_test(v) - v if v.is_a?(Future) - end - - def rejected_resolution(raise_on_reassign, state) - if raise_on_reassign - if internal_state == RESERVED - raise Concurrent::MultipleAssignmentError.new( - "Future can be resolved only once. It is already reserved.") - else - raise Concurrent::MultipleAssignmentError.new( - "Future can be resolved only once. It's #{result}, trying to set #{state.result}.", - current_result: result, - new_result: state.result) - end - end - return false - end - - def wait_until_resolved!(timeout = nil) - result = wait_until_resolved(timeout) - raise self if rejected? - result - end - - def async_callback_on_fulfillment(state, executor, args, callback) - with_async(executor, state, args, callback) do |st, ar, cb| - callback_on_fulfillment st, ar, cb - end - end - - def async_callback_on_rejection(state, executor, args, callback) - with_async(executor, state, args, callback) do |st, ar, cb| - callback_on_rejection st, ar, cb - end - end - - def callback_on_fulfillment(state, args, callback) - state.apply args, callback if state.fulfilled? - end - - def callback_on_rejection(state, args, callback) - state.apply args, callback unless state.fulfilled? - end - - def callback_on_resolution(state, args, callback) - callback.call(*state.result, *args) - end - - end - - # Marker module of Future, Event resolved manually. - module Resolvable - include InternalStates - end - - # A Event which can be resolved by user. - class ResolvableEvent < Event - include Resolvable - - # @!macro raise_on_reassign - # @raise [MultipleAssignmentError] when already resolved and raise_on_reassign is true. - - # @!macro promise.param.raise_on_reassign - # @param [Boolean] raise_on_reassign should method raise exception if already resolved - # @return [self, false] false is returned when raise_on_reassign is false and the receiver - # is already resolved. - # - - # Makes the event resolved, which triggers all dependent futures. - # - # @!macro promise.param.raise_on_reassign - # @!macro promise.param.reserved - # @param [true, false] reserved - # Set to true if the resolvable is {#reserve}d by you, - # marks resolution of reserved resolvable events and futures explicitly. - # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. - def resolve(raise_on_reassign = true, reserved = false) - resolve_with RESOLVED, raise_on_reassign, reserved - end - - # Creates new event wrapping receiver, effectively hiding the resolve method. - # - # @return [Event] - def with_hidden_resolvable - @with_hidden_resolvable ||= EventWrapperPromise.new_blocked_by1(self, @DefaultExecutor).event - end - - # Behaves as {AbstractEventFuture#wait} but has one additional optional argument - # resolve_on_timeout. - # - # @param [true, false] resolve_on_timeout - # If it times out and the argument is true it will also resolve the event. - # @return [self, true, false] - # @see AbstractEventFuture#wait - def wait(timeout = nil, resolve_on_timeout = false) - super(timeout) or if resolve_on_timeout - # if it fails to resolve it was resolved in the meantime - # so return true as if there was no timeout - !resolve(false) - else - false - end - end - end - - # A Future which can be resolved by user. - class ResolvableFuture < Future - include Resolvable - - # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, - # which triggers all dependent futures. - # - # @param [true, false] fulfilled - # @param [Object] value - # @param [Object] reason - # @!macro promise.param.raise_on_reassign - # @!macro promise.param.reserved - def resolve(fulfilled = true, value = nil, reason = nil, raise_on_reassign = true, reserved = false) - resolve_with(fulfilled ? Fulfilled.new(value) : Rejected.new(reason), raise_on_reassign, reserved) - end - - # Makes the future fulfilled with `value`, - # which triggers all dependent futures. - # - # @param [Object] value - # @!macro promise.param.raise_on_reassign - # @!macro promise.param.reserved - def fulfill(value, raise_on_reassign = true, reserved = false) - resolve_with Fulfilled.new(value), raise_on_reassign, reserved - end - - # Makes the future rejected with `reason`, - # which triggers all dependent futures. - # - # @param [Object] reason - # @!macro promise.param.raise_on_reassign - # @!macro promise.param.reserved - def reject(reason, raise_on_reassign = true, reserved = false) - resolve_with Rejected.new(reason), raise_on_reassign, reserved - end - - # Evaluates the block and sets its result as future's value fulfilling, if the block raises - # an exception the future rejects with it. - # - # @yield [*args] to the block. - # @yieldreturn [Object] value - # @return [self] - def evaluate_to(*args, &block) - promise.evaluate_to(*args, block) - end - - # Evaluates the block and sets its result as future's value fulfilling, if the block raises - # an exception the future rejects with it. - # - # @yield [*args] to the block. - # @yieldreturn [Object] value - # @return [self] - # @raise [Exception] also raise reason on rejection. - def evaluate_to!(*args, &block) - promise.evaluate_to(*args, block).wait! - end - - # @!macro promises.resolvable.resolve_on_timeout - # @param [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] resolve_on_timeout - # If it times out and the argument is not nil it will also resolve the future - # to the provided resolution. - - # Behaves as {AbstractEventFuture#wait} but has one additional optional argument - # resolve_on_timeout. - # - # @!macro promises.resolvable.resolve_on_timeout - # @return [self, true, false] - # @see AbstractEventFuture#wait - def wait(timeout = nil, resolve_on_timeout = nil) - super(timeout) or if resolve_on_timeout - # if it fails to resolve it was resolved in the meantime - # so return true as if there was no timeout - !resolve(*resolve_on_timeout, false) - else - false - end - end - - # Behaves as {Future#wait!} but has one additional optional argument - # resolve_on_timeout. - # - # @!macro promises.resolvable.resolve_on_timeout - # @return [self, true, false] - # @raise [Exception] {#reason} on rejection - # @see Future#wait! - def wait!(timeout = nil, resolve_on_timeout = nil) - super(timeout) or if resolve_on_timeout - if resolve(*resolve_on_timeout, false) - false - else - # if it fails to resolve it was resolved in the meantime - # so return true as if there was no timeout - raise self if rejected? - true - end - else - false - end - end - - # Behaves as {Future#value} but has one additional optional argument - # resolve_on_timeout. - # - # @!macro promises.resolvable.resolve_on_timeout - # @return [Object, timeout_value, nil] - # @see Future#value - def value(timeout = nil, timeout_value = nil, resolve_on_timeout = nil) - if wait_until_resolved timeout - internal_state.value - else - if resolve_on_timeout - unless resolve(*resolve_on_timeout, false) - # if it fails to resolve it was resolved in the meantime - # so return value as if there was no timeout - return internal_state.value - end - end - timeout_value - end - end - - # Behaves as {Future#value!} but has one additional optional argument - # resolve_on_timeout. - # - # @!macro promises.resolvable.resolve_on_timeout - # @return [Object, timeout_value, nil] - # @raise [Exception] {#reason} on rejection - # @see Future#value! - def value!(timeout = nil, timeout_value = nil, resolve_on_timeout = nil) - if wait_until_resolved! timeout - internal_state.value - else - if resolve_on_timeout - unless resolve(*resolve_on_timeout, false) - # if it fails to resolve it was resolved in the meantime - # so return value as if there was no timeout - raise self if rejected? - return internal_state.value - end - end - timeout_value - end - end - - # Behaves as {Future#reason} but has one additional optional argument - # resolve_on_timeout. - # - # @!macro promises.resolvable.resolve_on_timeout - # @return [Exception, timeout_value, nil] - # @see Future#reason - def reason(timeout = nil, timeout_value = nil, resolve_on_timeout = nil) - if wait_until_resolved timeout - internal_state.reason - else - if resolve_on_timeout - unless resolve(*resolve_on_timeout, false) - # if it fails to resolve it was resolved in the meantime - # so return value as if there was no timeout - return internal_state.reason - end - end - timeout_value - end - end - - # Behaves as {Future#result} but has one additional optional argument - # resolve_on_timeout. - # - # @!macro promises.resolvable.resolve_on_timeout - # @return [::Array(Boolean, Object, Exception), nil] - # @see Future#result - def result(timeout = nil, resolve_on_timeout = nil) - if wait_until_resolved timeout - internal_state.result - else - if resolve_on_timeout - unless resolve(*resolve_on_timeout, false) - # if it fails to resolve it was resolved in the meantime - # so return value as if there was no timeout - internal_state.result - end - end - # otherwise returns nil - end - end - - # Creates new future wrapping receiver, effectively hiding the resolve method and similar. - # - # @return [Future] - def with_hidden_resolvable - @with_hidden_resolvable ||= FutureWrapperPromise.new_blocked_by1(self, @DefaultExecutor).future - end - end - - # @abstract - # @private - class AbstractPromise < Synchronization::Object - safe_initialization! - include InternalStates - - def initialize(future) - super() - @Future = future - end - - def future - @Future - end - - alias_method :event, :future - - def default_executor - future.default_executor - end - - def state - future.state - end - - def touch - end - - def to_s - format '%s %s>', super[0..-2], @Future - end - - alias_method :inspect, :to_s - - def delayed_because - nil - end - - private - - def resolve_with(new_state, raise_on_reassign = true) - @Future.resolve_with(new_state, raise_on_reassign) - end - - # @return [Future] - def evaluate_to(*args, block) - resolve_with Fulfilled.new(block.call(*args)) - rescue Exception => error - resolve_with Rejected.new(error) - raise error unless error.is_a?(StandardError) - end - end - - class ResolvableEventPromise < AbstractPromise - def initialize(default_executor) - super ResolvableEvent.new(self, default_executor) - end - end - - class ResolvableFuturePromise < AbstractPromise - def initialize(default_executor) - super ResolvableFuture.new(self, default_executor) - end - - public :evaluate_to - end - - # @abstract - class InnerPromise < AbstractPromise - end - - # @abstract - class BlockedPromise < InnerPromise - - private_class_method :new - - def self.new_blocked_by1(blocker, *args, &block) - blocker_delayed = blocker.promise.delayed_because - promise = new(blocker_delayed, 1, *args, &block) - blocker.add_callback_notify_blocked promise, 0 - promise - end - - def self.new_blocked_by2(blocker1, blocker2, *args, &block) - blocker_delayed1 = blocker1.promise.delayed_because - blocker_delayed2 = blocker2.promise.delayed_because - delayed = if blocker_delayed1 && blocker_delayed2 - # TODO (pitr-ch 23-Dec-2016): use arrays when we know it will not grow (only flat adds delay) - LockFreeStack.of2(blocker_delayed1, blocker_delayed2) - else - blocker_delayed1 || blocker_delayed2 - end - promise = new(delayed, 2, *args, &block) - blocker1.add_callback_notify_blocked promise, 0 - blocker2.add_callback_notify_blocked promise, 1 - promise - end - - def self.new_blocked_by(blockers, *args, &block) - delayed = blockers.reduce(nil) { |d, f| add_delayed d, f.promise.delayed_because } - promise = new(delayed, blockers.size, *args, &block) - blockers.each_with_index { |f, i| f.add_callback_notify_blocked promise, i } - promise - end - - def self.add_delayed(delayed1, delayed2) - if delayed1 && delayed2 - delayed1.push delayed2 - delayed1 - else - delayed1 || delayed2 - end - end - - def initialize(delayed, blockers_count, future) - super(future) - @Delayed = delayed - @Countdown = AtomicFixnum.new blockers_count - end - - def on_blocker_resolution(future, index) - countdown = process_on_blocker_resolution(future, index) - resolvable = resolvable?(countdown, future, index) - - on_resolvable(future, index) if resolvable - end - - def delayed_because - @Delayed - end - - def touch - clear_and_propagate_touch - end - - # for inspection only - def blocked_by - blocked_by = [] - ObjectSpace.each_object(AbstractEventFuture) { |o| blocked_by.push o if o.blocks.include? self } - blocked_by - end - - private - - def clear_and_propagate_touch(stack_or_element = @Delayed) - return if stack_or_element.nil? - - if stack_or_element.is_a? LockFreeStack - stack_or_element.clear_each { |element| clear_and_propagate_touch element } - else - stack_or_element.touch unless stack_or_element.nil? # if still present - end - end - - # @return [true,false] if resolvable - def resolvable?(countdown, future, index) - countdown.zero? - end - - def process_on_blocker_resolution(future, index) - @Countdown.decrement - end - - def on_resolvable(resolved_future, index) - raise NotImplementedError - end - end - - # @abstract - class BlockedTaskPromise < BlockedPromise - def initialize(delayed, blockers_count, default_executor, executor, args, &task) - raise ArgumentError, 'no block given' unless block_given? - super delayed, 1, Future.new(self, default_executor) - @Executor = executor - @Task = task - @Args = args - end - - def executor - @Executor - end - end - - class ThenPromise < BlockedTaskPromise - private - - def initialize(delayed, blockers_count, default_executor, executor, args, &task) - super delayed, blockers_count, default_executor, executor, args, &task - end - - def on_resolvable(resolved_future, index) - if resolved_future.fulfilled? - Concurrent.executor(@Executor).post(resolved_future, @Args, @Task) do |future, args, task| - evaluate_to lambda { future.apply args, task } - end - else - resolve_with resolved_future.internal_state - end - end - end - - class RescuePromise < BlockedTaskPromise - private - - def initialize(delayed, blockers_count, default_executor, executor, args, &task) - super delayed, blockers_count, default_executor, executor, args, &task - end - - def on_resolvable(resolved_future, index) - if resolved_future.rejected? - Concurrent.executor(@Executor).post(resolved_future, @Args, @Task) do |future, args, task| - evaluate_to lambda { future.apply args, task } - end - else - resolve_with resolved_future.internal_state - end - end - end - - class ChainPromise < BlockedTaskPromise - private - - def on_resolvable(resolved_future, index) - if Future === resolved_future - Concurrent.executor(@Executor).post(resolved_future, @Args, @Task) do |future, args, task| - evaluate_to(*future.result, *args, task) - end - else - Concurrent.executor(@Executor).post(@Args, @Task) do |args, task| - evaluate_to(*args, task) - end - end - end - end - - # will be immediately resolved - class ImmediateEventPromise < InnerPromise - def initialize(default_executor) - super Event.new(self, default_executor).resolve_with(RESOLVED) - end - end - - class ImmediateFuturePromise < InnerPromise - def initialize(default_executor, fulfilled, value, reason) - super Future.new(self, default_executor). - resolve_with(fulfilled ? Fulfilled.new(value) : Rejected.new(reason)) - end - end - - class AbstractFlatPromise < BlockedPromise - - def initialize(delayed_because, blockers_count, event_or_future) - delayed = LockFreeStack.of1(self) - super(delayed, blockers_count, event_or_future) - # noinspection RubyArgCount - @Touched = AtomicBoolean.new false - @DelayedBecause = delayed_because || LockFreeStack.new - - event_or_future.add_callback_clear_delayed_node delayed.peek - end - - def touch - if @Touched.make_true - clear_and_propagate_touch @DelayedBecause - end - end - - private - - def touched? - @Touched.value - end - - def on_resolvable(resolved_future, index) - resolve_with resolved_future.internal_state - end - - def resolvable?(countdown, future, index) - !@Future.internal_state.resolved? && super(countdown, future, index) - end - - def add_delayed_of(future) - delayed = future.promise.delayed_because - if touched? - clear_and_propagate_touch delayed - else - BlockedPromise.add_delayed @DelayedBecause, delayed - clear_and_propagate_touch @DelayedBecause if touched? - end - end - - end - - class FlatEventPromise < AbstractFlatPromise - - private - - def initialize(delayed, blockers_count, default_executor) - super delayed, 2, Event.new(self, default_executor) - end - - def process_on_blocker_resolution(future, index) - countdown = super(future, index) - if countdown.nonzero? - internal_state = future.internal_state - - unless internal_state.fulfilled? - resolve_with RESOLVED - return countdown - end - - value = internal_state.value - case value - when AbstractEventFuture - add_delayed_of value - value.add_callback_notify_blocked self, nil - countdown - else - resolve_with RESOLVED - end - end - countdown - end - - end - - class FlatFuturePromise < AbstractFlatPromise - - private - - def initialize(delayed, blockers_count, levels, default_executor) - raise ArgumentError, 'levels has to be higher than 0' if levels < 1 - # flat promise may result to a future having delayed futures, therefore we have to have empty stack - # to be able to add new delayed futures - super delayed || LockFreeStack.new, 1 + levels, Future.new(self, default_executor) - end - - def process_on_blocker_resolution(future, index) - countdown = super(future, index) - if countdown.nonzero? - internal_state = future.internal_state - - unless internal_state.fulfilled? - resolve_with internal_state - return countdown - end - - value = internal_state.value - case value - when AbstractEventFuture - add_delayed_of value - value.add_callback_notify_blocked self, nil - countdown - else - evaluate_to(lambda { raise TypeError, "returned value #{value.inspect} is not a Future" }) - end - end - countdown - end - - end - - class RunFuturePromise < AbstractFlatPromise - - private - - def initialize(delayed, blockers_count, default_executor, run_test) - super delayed, 1, Future.new(self, default_executor) - @RunTest = run_test - end - - def process_on_blocker_resolution(future, index) - internal_state = future.internal_state - - unless internal_state.fulfilled? - resolve_with internal_state - return 0 - end - - value = internal_state.value - continuation_future = @RunTest.call value - - if continuation_future - add_delayed_of continuation_future - continuation_future.add_callback_notify_blocked self, nil - else - resolve_with internal_state - end - - 1 - end - end - - class ZipEventEventPromise < BlockedPromise - def initialize(delayed, blockers_count, default_executor) - super delayed, 2, Event.new(self, default_executor) - end - - private - - def on_resolvable(resolved_future, index) - resolve_with RESOLVED - end - end - - class ZipFutureEventPromise < BlockedPromise - def initialize(delayed, blockers_count, default_executor) - super delayed, 2, Future.new(self, default_executor) - @result = nil - end - - private - - def process_on_blocker_resolution(future, index) - # first blocking is future, take its result - @result = future.internal_state if index == 0 - # super has to be called after above to piggyback on volatile @Countdown - super future, index - end - - def on_resolvable(resolved_future, index) - resolve_with @result - end - end - - class EventWrapperPromise < BlockedPromise - def initialize(delayed, blockers_count, default_executor) - super delayed, 1, Event.new(self, default_executor) - end - - private - - def on_resolvable(resolved_future, index) - resolve_with RESOLVED - end - end - - class FutureWrapperPromise < BlockedPromise - def initialize(delayed, blockers_count, default_executor) - super delayed, 1, Future.new(self, default_executor) - end - - private - - def on_resolvable(resolved_future, index) - resolve_with resolved_future.internal_state - end - end - - class ZipFuturesPromise < BlockedPromise - - private - - def initialize(delayed, blockers_count, default_executor) - super(delayed, blockers_count, Future.new(self, default_executor)) - @Resolutions = ::Array.new(blockers_count, nil) - - on_resolvable nil, nil if blockers_count == 0 - end - - def process_on_blocker_resolution(future, index) - # TODO (pitr-ch 18-Dec-2016): Can we assume that array will never break under parallel access when never re-sized? - @Resolutions[index] = future.internal_state # has to be set before countdown in super - super future, index - end - - def on_resolvable(resolved_future, index) - all_fulfilled = true - values = ::Array.new(@Resolutions.size) - reasons = ::Array.new(@Resolutions.size) - - @Resolutions.each_with_index do |internal_state, i| - fulfilled, values[i], reasons[i] = internal_state.result - all_fulfilled &&= fulfilled - end - - if all_fulfilled - resolve_with FulfilledArray.new(values) - else - resolve_with PartiallyRejected.new(values, reasons) - end - end - end - - class ZipEventsPromise < BlockedPromise - - private - - def initialize(delayed, blockers_count, default_executor) - super delayed, blockers_count, Event.new(self, default_executor) - - on_resolvable nil, nil if blockers_count == 0 - end - - def on_resolvable(resolved_future, index) - resolve_with RESOLVED - end - end - - # @abstract - class AbstractAnyPromise < BlockedPromise - end - - class AnyResolvedEventPromise < AbstractAnyPromise - - private - - def initialize(delayed, blockers_count, default_executor) - super delayed, blockers_count, Event.new(self, default_executor) - end - - def resolvable?(countdown, future, index) - true - end - - def on_resolvable(resolved_future, index) - resolve_with RESOLVED, false - end - end - - class AnyResolvedFuturePromise < AbstractAnyPromise - - private - - def initialize(delayed, blockers_count, default_executor) - super delayed, blockers_count, Future.new(self, default_executor) - end - - def resolvable?(countdown, future, index) - true - end - - def on_resolvable(resolved_future, index) - resolve_with resolved_future.internal_state, false - end - end - - class AnyFulfilledFuturePromise < AnyResolvedFuturePromise - - private - - def resolvable?(countdown, event_or_future, index) - (event_or_future.is_a?(Event) ? event_or_future.resolved? : event_or_future.fulfilled?) || - # inlined super from BlockedPromise - countdown.zero? - end - end - - class DelayPromise < InnerPromise - - def initialize(default_executor) - event = Event.new(self, default_executor) - @Delayed = LockFreeStack.of1(self) - super event - event.add_callback_clear_delayed_node @Delayed.peek - end - - def touch - @Future.resolve_with RESOLVED - end - - def delayed_because - @Delayed - end - - end - - class ScheduledPromise < InnerPromise - def intended_time - @IntendedTime - end - - def inspect - "#{to_s[0..-2]} intended_time: #{@IntendedTime}>" - end - - private - - def initialize(default_executor, intended_time) - super Event.new(self, default_executor) - - @IntendedTime = intended_time - - in_seconds = begin - now = Time.now - schedule_time = if @IntendedTime.is_a? Time - @IntendedTime - else - now + @IntendedTime - end - [0, schedule_time.to_f - now.to_f].max - end - - Concurrent.global_timer_set.post(in_seconds) do - @Future.resolve_with RESOLVED - end - end - end - - extend FactoryMethods - - private_constant :AbstractPromise, - :ResolvableEventPromise, - :ResolvableFuturePromise, - :InnerPromise, - :BlockedPromise, - :BlockedTaskPromise, - :ThenPromise, - :RescuePromise, - :ChainPromise, - :ImmediateEventPromise, - :ImmediateFuturePromise, - :AbstractFlatPromise, - :FlatFuturePromise, - :FlatEventPromise, - :RunFuturePromise, - :ZipEventEventPromise, - :ZipFutureEventPromise, - :EventWrapperPromise, - :FutureWrapperPromise, - :ZipFuturesPromise, - :ZipEventsPromise, - :AbstractAnyPromise, - :AnyResolvedFuturePromise, - :AnyFulfilledFuturePromise, - :AnyResolvedEventPromise, - :DelayPromise, - :ScheduledPromise - - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/re_include.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/re_include.rb deleted file mode 100644 index 600bc6a5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/re_include.rb +++ /dev/null @@ -1,60 +0,0 @@ -module Concurrent - - # Methods form module A included to a module B, which is already included into class C, - # will not be visible in the C class. If this module is extended to B then A's methods - # are correctly made visible to C. - # - # @example - # module A - # def a - # :a - # end - # end - # - # module B1 - # end - # - # class C1 - # include B1 - # end - # - # module B2 - # extend Concurrent::ReInclude - # end - # - # class C2 - # include B2 - # end - # - # B1.send :include, A - # B2.send :include, A - # - # C1.new.respond_to? :a # => false - # C2.new.respond_to? :a # => true - # - # @!visibility private - module ReInclude - # @!visibility private - def included(base) - (@re_include_to_bases ||= []) << [:include, base] - super(base) - end - - # @!visibility private - def extended(base) - (@re_include_to_bases ||= []) << [:extend, base] - super(base) - end - - # @!visibility private - def include(*modules) - result = super(*modules) - modules.reverse.each do |module_being_included| - (@re_include_to_bases ||= []).each do |method, mod| - mod.send method, module_being_included - end - end - result - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/scheduled_task.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/scheduled_task.rb deleted file mode 100644 index efe9e193..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/scheduled_task.rb +++ /dev/null @@ -1,331 +0,0 @@ -require 'concurrent/constants' -require 'concurrent/errors' -require 'concurrent/configuration' -require 'concurrent/ivar' -require 'concurrent/collection/copy_on_notify_observer_set' -require 'concurrent/utility/monotonic_time' - -require 'concurrent/options' - -module Concurrent - - # `ScheduledTask` is a close relative of `Concurrent::Future` but with one - # important difference: A `Future` is set to execute as soon as possible - # whereas a `ScheduledTask` is set to execute after a specified delay. This - # implementation is loosely based on Java's - # [ScheduledExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html). - # It is a more feature-rich variant of {Concurrent.timer}. - # - # The *intended* schedule time of task execution is set on object construction - # with the `delay` argument. The delay is a numeric (floating point or integer) - # representing a number of seconds in the future. Any other value or a numeric - # equal to or less than zero will result in an exception. The *actual* schedule - # time of task execution is set when the `execute` method is called. - # - # The constructor can also be given zero or more processing options. Currently - # the only supported options are those recognized by the - # [Dereferenceable](Dereferenceable) module. - # - # The final constructor argument is a block representing the task to be performed. - # If no block is given an `ArgumentError` will be raised. - # - # **States** - # - # `ScheduledTask` mixes in the [Obligation](Obligation) module thus giving it - # "future" behavior. This includes the expected lifecycle states. `ScheduledTask` - # has one additional state, however. While the task (block) is being executed the - # state of the object will be `:processing`. This additional state is necessary - # because it has implications for task cancellation. - # - # **Cancellation** - # - # A `:pending` task can be cancelled using the `#cancel` method. A task in any - # other state, including `:processing`, cannot be cancelled. The `#cancel` - # method returns a boolean indicating the success of the cancellation attempt. - # A cancelled `ScheduledTask` cannot be restarted. It is immutable. - # - # **Obligation and Observation** - # - # The result of a `ScheduledTask` can be obtained either synchronously or - # asynchronously. `ScheduledTask` mixes in both the [Obligation](Obligation) - # module and the - # [Observable](http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html) - # module from the Ruby standard library. With one exception `ScheduledTask` - # behaves identically to [Future](Observable) with regard to these modules. - # - # @!macro copy_options - # - # @example Basic usage - # - # require 'concurrent/scheduled_task' - # require 'csv' - # require 'open-uri' - # - # class Ticker - # def get_year_end_closing(symbol, year, api_key) - # uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" - # data = [] - # csv = URI.parse(uri).read - # if csv.include?('call frequency') - # return :rate_limit_exceeded - # end - # CSV.parse(csv, headers: true) do |row| - # data << row['close'].to_f if row['timestamp'].include?(year.to_s) - # end - # year_end = data.first - # year_end - # rescue => e - # p e - # end - # end - # - # api_key = ENV['ALPHAVANTAGE_KEY'] - # abort(error_message) unless api_key - # - # # Future - # price = Concurrent::Future.execute{ Ticker.new.get_year_end_closing('TWTR', 2013, api_key) } - # price.state #=> :pending - # price.pending? #=> true - # price.value(0) #=> nil (does not block) - # - # sleep(1) # do other stuff - # - # price.value #=> 63.65 (after blocking if necessary) - # price.state #=> :fulfilled - # price.fulfilled? #=> true - # price.value #=> 63.65 - # - # @example Successful task execution - # - # task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } - # task.state #=> :unscheduled - # task.execute - # task.state #=> pending - # - # # wait for it... - # sleep(3) - # - # task.unscheduled? #=> false - # task.pending? #=> false - # task.fulfilled? #=> true - # task.rejected? #=> false - # task.value #=> 'What does the fox say?' - # - # @example One line creation and execution - # - # task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute - # task.state #=> pending - # - # task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } - # task.state #=> pending - # - # @example Failed task execution - # - # task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } - # task.pending? #=> true - # - # # wait for it... - # sleep(3) - # - # task.unscheduled? #=> false - # task.pending? #=> false - # task.fulfilled? #=> false - # task.rejected? #=> true - # task.value #=> nil - # task.reason #=> # - # - # @example Task execution with observation - # - # observer = Class.new{ - # def update(time, value, reason) - # puts "The task completed at #{time} with value '#{value}'" - # end - # }.new - # - # task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } - # task.add_observer(observer) - # task.execute - # task.pending? #=> true - # - # # wait for it... - # sleep(3) - # - # #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' - # - # @!macro monotonic_clock_warning - # - # @see Concurrent.timer - class ScheduledTask < IVar - include Comparable - - # The executor on which to execute the task. - # @!visibility private - attr_reader :executor - - # Schedule a task for execution at a specified future time. - # - # @param [Float] delay the number of seconds to wait for before executing the task - # - # @yield the task to be performed - # - # @!macro executor_and_deref_options - # - # @option opts [object, Array] :args zero or more arguments to be passed the task - # block on execution - # - # @raise [ArgumentError] When no block is given - # @raise [ArgumentError] When given a time that is in the past - def initialize(delay, opts = {}, &task) - raise ArgumentError.new('no block given') unless block_given? - raise ArgumentError.new('seconds must be greater than zero') if delay.to_f < 0.0 - - super(NULL, opts, &nil) - - synchronize do - ns_set_state(:unscheduled) - @parent = opts.fetch(:timer_set, Concurrent.global_timer_set) - @args = get_arguments_from(opts) - @delay = delay.to_f - @task = task - @time = nil - @executor = Options.executor_from_options(opts) || Concurrent.global_io_executor - self.observers = Collection::CopyOnNotifyObserverSet.new - end - end - - # The `delay` value given at instantiation. - # - # @return [Float] the initial delay. - def initial_delay - synchronize { @delay } - end - - # The monotonic time at which the the task is scheduled to be executed. - # - # @return [Float] the schedule time or nil if `unscheduled` - def schedule_time - synchronize { @time } - end - - # Comparator which orders by schedule time. - # - # @!visibility private - def <=>(other) - schedule_time <=> other.schedule_time - end - - # Has the task been cancelled? - # - # @return [Boolean] true if the task is in the given state else false - def cancelled? - synchronize { ns_check_state?(:cancelled) } - end - - # In the task execution in progress? - # - # @return [Boolean] true if the task is in the given state else false - def processing? - synchronize { ns_check_state?(:processing) } - end - - # Cancel this task and prevent it from executing. A task can only be - # cancelled if it is pending or unscheduled. - # - # @return [Boolean] true if successfully cancelled else false - def cancel - if compare_and_set_state(:cancelled, :pending, :unscheduled) - complete(false, nil, CancelledOperationError.new) - # To avoid deadlocks this call must occur outside of #synchronize - # Changing the state above should prevent redundant calls - @parent.send(:remove_task, self) - else - false - end - end - - # Reschedule the task using the original delay and the current time. - # A task can only be reset while it is `:pending`. - # - # @return [Boolean] true if successfully rescheduled else false - def reset - synchronize{ ns_reschedule(@delay) } - end - - # Reschedule the task using the given delay and the current time. - # A task can only be reset while it is `:pending`. - # - # @param [Float] delay the number of seconds to wait for before executing the task - # - # @return [Boolean] true if successfully rescheduled else false - # - # @raise [ArgumentError] When given a time that is in the past - def reschedule(delay) - delay = delay.to_f - raise ArgumentError.new('seconds must be greater than zero') if delay < 0.0 - synchronize{ ns_reschedule(delay) } - end - - # Execute an `:unscheduled` `ScheduledTask`. Immediately sets the state to `:pending` - # and starts counting down toward execution. Does nothing if the `ScheduledTask` is - # in any state other than `:unscheduled`. - # - # @return [ScheduledTask] a reference to `self` - def execute - if compare_and_set_state(:pending, :unscheduled) - synchronize{ ns_schedule(@delay) } - end - self - end - - # Create a new `ScheduledTask` object with the given block, execute it, and return the - # `:pending` object. - # - # @param [Float] delay the number of seconds to wait for before executing the task - # - # @!macro executor_and_deref_options - # - # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state - # - # @raise [ArgumentError] if no block is given - def self.execute(delay, opts = {}, &task) - new(delay, opts, &task).execute - end - - # Execute the task. - # - # @!visibility private - def process_task - safe_execute(@task, @args) - end - - protected :set, :try_set, :fail, :complete - - protected - - # Schedule the task using the given delay and the current time. - # - # @param [Float] delay the number of seconds to wait for before executing the task - # - # @return [Boolean] true if successfully rescheduled else false - # - # @!visibility private - def ns_schedule(delay) - @delay = delay - @time = Concurrent.monotonic_time + @delay - @parent.send(:post_task, self) - end - - # Reschedule the task using the given delay and the current time. - # A task can only be reset while it is `:pending`. - # - # @param [Float] delay the number of seconds to wait for before executing the task - # - # @return [Boolean] true if successfully rescheduled else false - # - # @!visibility private - def ns_reschedule(delay) - return false unless ns_check_state?(:pending) - @parent.send(:remove_task, self) && ns_schedule(delay) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/set.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/set.rb deleted file mode 100644 index eee4effd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/set.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/thread_safe/util' -require 'set' - -module Concurrent - - # @!macro concurrent_set - # - # A thread-safe subclass of Set. This version locks against the object - # itself for every method call, ensuring only one thread can be reading - # or writing at a time. This includes iteration methods like `#each`. - # - # @note `a += b` is **not** a **thread-safe** operation on - # `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` - # which is union of `a` and `b`, then it writes the union to `a`. - # The read and write are independent operations they do not form a single atomic - # operation therefore when two `+=` operations are executed concurrently updates - # may be lost. Use `#merge` instead. - # - # @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` - - # @!macro internal_implementation_note - SetImplementation = case - when Concurrent.on_cruby? - # The CRuby implementation of Set is written in Ruby itself and is - # not thread safe for certain methods. - require 'monitor' - require 'concurrent/thread_safe/util/data_structures' - - class CRubySet < ::Set - end - - ThreadSafe::Util.make_synchronized_on_cruby CRubySet - CRubySet - - when Concurrent.on_jruby? - require 'jruby/synchronized' - - class JRubySet < ::Set - include JRuby::Synchronized - end - - JRubySet - - when Concurrent.on_truffleruby? - require 'concurrent/thread_safe/util/data_structures' - - class TruffleRubySet < ::Set - end - - ThreadSafe::Util.make_synchronized_on_truffleruby TruffleRubySet - TruffleRubySet - - else - warn 'Possibly unsupported Ruby implementation' - ::Set - end - private_constant :SetImplementation - - # @!macro concurrent_set - class Set < SetImplementation - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/settable_struct.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/settable_struct.rb deleted file mode 100644 index 99b85619..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/settable_struct.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'concurrent/errors' -require 'concurrent/synchronization/abstract_struct' -require 'concurrent/synchronization/lockable_object' - -module Concurrent - - # An thread-safe, write-once variation of Ruby's standard `Struct`. - # Each member can have its value set at most once, either at construction - # or any time thereafter. Attempting to assign a value to a member - # that has already been set will result in a `Concurrent::ImmutabilityError`. - # - # @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` - # @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword - module SettableStruct - include Synchronization::AbstractStruct - - # @!macro struct_values - def values - synchronize { ns_values } - end - alias_method :to_a, :values - - # @!macro struct_values_at - def values_at(*indexes) - synchronize { ns_values_at(indexes) } - end - - # @!macro struct_inspect - def inspect - synchronize { ns_inspect } - end - alias_method :to_s, :inspect - - # @!macro struct_merge - def merge(other, &block) - synchronize { ns_merge(other, &block) } - end - - # @!macro struct_to_h - def to_h - synchronize { ns_to_h } - end - - # @!macro struct_get - def [](member) - synchronize { ns_get(member) } - end - - # @!macro struct_equality - def ==(other) - synchronize { ns_equality(other) } - end - - # @!macro struct_each - def each(&block) - return enum_for(:each) unless block_given? - synchronize { ns_each(&block) } - end - - # @!macro struct_each_pair - def each_pair(&block) - return enum_for(:each_pair) unless block_given? - synchronize { ns_each_pair(&block) } - end - - # @!macro struct_select - def select(&block) - return enum_for(:select) unless block_given? - synchronize { ns_select(&block) } - end - - # @!macro struct_set - # - # @raise [Concurrent::ImmutabilityError] if the given member has already been set - def []=(member, value) - if member.is_a? Integer - length = synchronize { @values.length } - if member >= length - raise IndexError.new("offset #{member} too large for struct(size:#{length})") - end - synchronize do - unless @values[member].nil? - raise Concurrent::ImmutabilityError.new('struct member has already been set') - end - @values[member] = value - end - else - send("#{member}=", value) - end - rescue NoMethodError - raise NameError.new("no member '#{member}' in struct") - end - - private - - # @!visibility private - def initialize_copy(original) - synchronize do - super(original) - ns_initialize_copy - end - end - - # @!macro struct_new - def self.new(*args, &block) - clazz_name = nil - if args.length == 0 - raise ArgumentError.new('wrong number of arguments (0 for 1+)') - elsif args.length > 0 && args.first.is_a?(String) - clazz_name = args.shift - end - FACTORY.define_struct(clazz_name, args, &block) - end - - FACTORY = Class.new(Synchronization::LockableObject) do - def define_struct(name, members, &block) - synchronize do - clazz = Synchronization::AbstractStruct.define_struct_class(SettableStruct, Synchronization::LockableObject, name, members, &block) - members.each_with_index do |member, index| - clazz.send :remove_method, member if clazz.instance_methods.include? member - clazz.send(:define_method, member) do - synchronize { @values[index] } - end - clazz.send(:define_method, "#{member}=") do |value| - synchronize do - unless @values[index].nil? - raise Concurrent::ImmutabilityError.new('struct member has already been set') - end - @values[index] = value - end - end - end - clazz - end - end - end.new - private_constant :FACTORY - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization.rb deleted file mode 100644 index 6d8cf4bd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first - -require 'concurrent/synchronization/object' -require 'concurrent/synchronization/lockable_object' -require 'concurrent/synchronization/condition' -require 'concurrent/synchronization/lock' - -module Concurrent - # @!visibility private - module Synchronization - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb deleted file mode 100644 index d9050b31..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb +++ /dev/null @@ -1,102 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first -require 'concurrent/utility/monotonic_time' -require 'concurrent/synchronization/object' - -module Concurrent - module Synchronization - - # @!visibility private - class AbstractLockableObject < Synchronization::Object - - protected - - # @!macro synchronization_object_method_synchronize - # - # @yield runs the block synchronized against this object, - # equivalent of java's `synchronize(this) {}` - # @note can by made public in descendants if required by `public :synchronize` - def synchronize - raise NotImplementedError - end - - # @!macro synchronization_object_method_ns_wait_until - # - # Wait until condition is met or timeout passes, - # protects against spurious wake-ups. - # @param [Numeric, nil] timeout in seconds, `nil` means no timeout - # @yield condition to be met - # @yieldreturn [true, false] - # @return [true, false] if condition met - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def wait_until(timeout = nil, &condition) - # synchronize { ns_wait_until(timeout, &condition) } - # end - # ``` - def ns_wait_until(timeout = nil, &condition) - if timeout - wait_until = Concurrent.monotonic_time + timeout - loop do - now = Concurrent.monotonic_time - condition_result = condition.call - return condition_result if now >= wait_until || condition_result - ns_wait wait_until - now - end - else - ns_wait timeout until condition.call - true - end - end - - # @!macro synchronization_object_method_ns_wait - # - # Wait until another thread calls #signal or #broadcast, - # spurious wake-ups can happen. - # - # @param [Numeric, nil] timeout in seconds, `nil` means no timeout - # @return [self] - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def wait(timeout = nil) - # synchronize { ns_wait(timeout) } - # end - # ``` - def ns_wait(timeout = nil) - raise NotImplementedError - end - - # @!macro synchronization_object_method_ns_signal - # - # Signal one waiting thread. - # @return [self] - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def signal - # synchronize { ns_signal } - # end - # ``` - def ns_signal - raise NotImplementedError - end - - # @!macro synchronization_object_method_ns_broadcast - # - # Broadcast to all waiting threads. - # @return [self] - # @note only to be used inside synchronized block - # @note to provide direct access to this method in a descendant add method - # ``` - # def broadcast - # synchronize { ns_broadcast } - # end - # ``` - def ns_broadcast - raise NotImplementedError - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb deleted file mode 100644 index 7cd2decf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Concurrent - module Synchronization - - # @!visibility private - # @!macro internal_implementation_note - class AbstractObject - def initialize - # nothing to do - end - - # @!visibility private - # @abstract - def full_memory_barrier - raise NotImplementedError - end - - def self.attr_volatile(*names) - raise NotImplementedError - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb deleted file mode 100644 index 28816c51..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb +++ /dev/null @@ -1,171 +0,0 @@ -module Concurrent - module Synchronization - - # @!visibility private - # @!macro internal_implementation_note - module AbstractStruct - - # @!visibility private - def initialize(*values) - super() - ns_initialize(*values) - end - - # @!macro struct_length - # - # Returns the number of struct members. - # - # @return [Fixnum] the number of struct members - def length - self.class::MEMBERS.length - end - alias_method :size, :length - - # @!macro struct_members - # - # Returns the struct members as an array of symbols. - # - # @return [Array] the struct members as an array of symbols - def members - self.class::MEMBERS.dup - end - - protected - - # @!macro struct_values - # - # @!visibility private - def ns_values - @values.dup - end - - # @!macro struct_values_at - # - # @!visibility private - def ns_values_at(indexes) - @values.values_at(*indexes) - end - - # @!macro struct_to_h - # - # @!visibility private - def ns_to_h - length.times.reduce({}){|memo, i| memo[self.class::MEMBERS[i]] = @values[i]; memo} - end - - # @!macro struct_get - # - # @!visibility private - def ns_get(member) - if member.is_a? Integer - if member >= @values.length - raise IndexError.new("offset #{member} too large for struct(size:#{@values.length})") - end - @values[member] - else - send(member) - end - rescue NoMethodError - raise NameError.new("no member '#{member}' in struct") - end - - # @!macro struct_equality - # - # @!visibility private - def ns_equality(other) - self.class == other.class && self.values == other.values - end - - # @!macro struct_each - # - # @!visibility private - def ns_each - values.each{|value| yield value } - end - - # @!macro struct_each_pair - # - # @!visibility private - def ns_each_pair - @values.length.times do |index| - yield self.class::MEMBERS[index], @values[index] - end - end - - # @!macro struct_select - # - # @!visibility private - def ns_select - values.select{|value| yield value } - end - - # @!macro struct_inspect - # - # @!visibility private - def ns_inspect - struct = pr_underscore(self.class.ancestors[1]) - clazz = ((self.class.to_s =~ /^#" - end - - # @!macro struct_merge - # - # @!visibility private - def ns_merge(other, &block) - self.class.new(*self.to_h.merge(other, &block).values) - end - - # @!visibility private - def ns_initialize_copy - @values = @values.map do |val| - begin - val.clone - rescue TypeError - val - end - end - end - - # @!visibility private - def pr_underscore(clazz) - word = clazz.to_s.dup # dup string to workaround JRuby 9.2.0.0 bug https://github.com/jruby/jruby/issues/5229 - word.gsub!(/::/, '/') - word.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2') - word.gsub!(/([a-z\d])([A-Z])/,'\1_\2') - word.tr!("-", "_") - word.downcase! - word - end - - # @!visibility private - def self.define_struct_class(parent, base, name, members, &block) - clazz = Class.new(base || Object) do - include parent - self.const_set(:MEMBERS, members.collect{|member| member.to_s.to_sym}.freeze) - def ns_initialize(*values) - raise ArgumentError.new('struct size differs') if values.length > length - @values = values.fill(nil, values.length..length-1) - end - end - unless name.nil? - begin - parent.send :remove_const, name if parent.const_defined?(name, false) - parent.const_set(name, clazz) - clazz - rescue NameError - raise NameError.new("identifier #{name} needs to be constant") - end - end - members.each_with_index do |member, index| - clazz.send :remove_method, member if clazz.instance_methods(false).include? member - clazz.send(:define_method, member) do - @values[index] - end - end - clazz.class_exec(&block) unless block.nil? - clazz.singleton_class.send :alias_method, :[], :new - clazz - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/condition.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/condition.rb deleted file mode 100644 index 5daa68be..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/condition.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 'concurrent/synchronization/lockable_object' - -module Concurrent - module Synchronization - - # @!visibility private - # TODO (pitr-ch 04-Dec-2016): should be in edge - class Condition < LockableObject - safe_initialization! - - # TODO (pitr 12-Sep-2015): locks two objects, improve - # TODO (pitr 26-Sep-2015): study - # http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/util/concurrent/locks/AbstractQueuedSynchronizer.java#AbstractQueuedSynchronizer.Node - - singleton_class.send :alias_method, :private_new, :new - private_class_method :new - - def initialize(lock) - super() - @Lock = lock - end - - def wait(timeout = nil) - @Lock.synchronize { ns_wait(timeout) } - end - - def ns_wait(timeout = nil) - synchronize { super(timeout) } - end - - def wait_until(timeout = nil, &condition) - @Lock.synchronize { ns_wait_until(timeout, &condition) } - end - - def ns_wait_until(timeout = nil, &condition) - synchronize { super(timeout, &condition) } - end - - def signal - @Lock.synchronize { ns_signal } - end - - def ns_signal - synchronize { super } - end - - def broadcast - @Lock.synchronize { ns_broadcast } - end - - def ns_broadcast - synchronize { super } - end - end - - class LockableObject < LockableObjectImplementation - def new_condition - Condition.private_new(self) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb deleted file mode 100644 index 139e08d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first - -module Concurrent - module Synchronization - case - when Concurrent.on_cruby? - def self.full_memory_barrier - # relying on undocumented behavior of CRuby, GVL acquire has lock which ensures visibility of ivars - # https://github.com/ruby/ruby/blob/ruby_2_2/thread_pthread.c#L204-L211 - end - - when Concurrent.on_jruby? - require 'concurrent/utility/native_extension_loader' - def self.full_memory_barrier - JRubyAttrVolatile.full_memory_barrier - end - - when Concurrent.on_truffleruby? - def self.full_memory_barrier - TruffleRuby.full_memory_barrier - end - - else - warn 'Possibly unsupported Ruby implementation' - def self.full_memory_barrier - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/jruby_lockable_object.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/jruby_lockable_object.rb deleted file mode 100644 index 76930461..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/jruby_lockable_object.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first - -module Concurrent - module Synchronization - - if Concurrent.on_jruby? - - # @!visibility private - # @!macro internal_implementation_note - class JRubyLockableObject < AbstractLockableObject - - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/lock.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/lock.rb deleted file mode 100644 index f90e0b5f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/lock.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'concurrent/synchronization/lockable_object' - -module Concurrent - module Synchronization - - # @!visibility private - # TODO (pitr-ch 04-Dec-2016): should be in edge - class Lock < LockableObject - # TODO use JavaReentrantLock on JRuby - - public :synchronize - - def wait(timeout = nil) - synchronize { ns_wait(timeout) } - end - - public :ns_wait - - def wait_until(timeout = nil, &condition) - synchronize { ns_wait_until(timeout, &condition) } - end - - public :ns_wait_until - - def signal - synchronize { ns_signal } - end - - public :ns_signal - - def broadcast - synchronize { ns_broadcast } - end - - public :ns_broadcast - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb deleted file mode 100644 index 08d2ff66..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'concurrent/utility/engine' -require 'concurrent/synchronization/abstract_lockable_object' -require 'concurrent/synchronization/mutex_lockable_object' -require 'concurrent/synchronization/jruby_lockable_object' - -module Concurrent - module Synchronization - - # @!visibility private - # @!macro internal_implementation_note - LockableObjectImplementation = case - when Concurrent.on_cruby? - MutexLockableObject - when Concurrent.on_jruby? - JRubyLockableObject - when Concurrent.on_truffleruby? - MutexLockableObject - else - warn 'Possibly unsupported Ruby implementation' - MonitorLockableObject - end - private_constant :LockableObjectImplementation - - # Safe synchronization under any Ruby implementation. - # It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. - # Provides a single layer which can improve its implementation over time without changes needed to - # the classes using it. Use {Synchronization::Object} not this abstract class. - # - # @note this object does not support usage together with - # [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) - # and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). - # `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and - # `Thread#wakeup` will not work on all platforms. - # - # @see Event implementation as an example of this class use - # - # @example simple - # class AnClass < Synchronization::Object - # def initialize - # super - # synchronize { @value = 'asd' } - # end - # - # def value - # synchronize { @value } - # end - # end - # - # @!visibility private - class LockableObject < LockableObjectImplementation - - # TODO (pitr 12-Sep-2015): make private for c-r, prohibit subclassing - # TODO (pitr 12-Sep-2015): we inherit too much ourselves :/ - - # @!method initialize(*args, &block) - # @!macro synchronization_object_method_initialize - - # @!method synchronize - # @!macro synchronization_object_method_synchronize - - # @!method wait_until(timeout = nil, &condition) - # @!macro synchronization_object_method_ns_wait_until - - # @!method wait(timeout = nil) - # @!macro synchronization_object_method_ns_wait - - # @!method signal - # @!macro synchronization_object_method_ns_signal - - # @!method broadcast - # @!macro synchronization_object_method_ns_broadcast - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb deleted file mode 100644 index acc9745a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb +++ /dev/null @@ -1,89 +0,0 @@ -require 'concurrent/synchronization/abstract_lockable_object' - -module Concurrent - module Synchronization - - # @!visibility private - # @!macro internal_implementation_note - module ConditionSignalling - protected - - def ns_signal - @__Condition__.signal - self - end - - def ns_broadcast - @__Condition__.broadcast - self - end - end - - - # @!visibility private - # @!macro internal_implementation_note - class MutexLockableObject < AbstractLockableObject - include ConditionSignalling - - safe_initialization! - - def initialize - super() - @__Lock__ = ::Mutex.new - @__Condition__ = ::ConditionVariable.new - end - - def initialize_copy(other) - super - @__Lock__ = ::Mutex.new - @__Condition__ = ::ConditionVariable.new - end - - protected - - def synchronize - if @__Lock__.owned? - yield - else - @__Lock__.synchronize { yield } - end - end - - def ns_wait(timeout = nil) - @__Condition__.wait @__Lock__, timeout - self - end - end - - # @!visibility private - # @!macro internal_implementation_note - class MonitorLockableObject < AbstractLockableObject - include ConditionSignalling - - safe_initialization! - - def initialize - super() - @__Lock__ = ::Monitor.new - @__Condition__ = @__Lock__.new_cond - end - - def initialize_copy(other) - super - @__Lock__ = ::Monitor.new - @__Condition__ = @__Lock__.new_cond - end - - protected - - def synchronize # TODO may be a problem with lock.synchronize { lock.wait } - @__Lock__.synchronize { yield } - end - - def ns_wait(timeout = nil) - @__Condition__.wait timeout - self - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/object.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/object.rb deleted file mode 100644 index 59219070..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/object.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first - -require 'concurrent/synchronization/safe_initialization' -require 'concurrent/synchronization/volatile' -require 'concurrent/atomic/atomic_reference' - -module Concurrent - module Synchronization - - # Abstract object providing final, volatile, ans CAS extensions to build other concurrent abstractions. - # - final instance variables see {Object.safe_initialization!} - # - volatile instance variables see {Object.attr_volatile} - # - volatile instance variables see {Object.attr_atomic} - # @!visibility private - class Object < AbstractObject - include Volatile - - # TODO make it a module if possible - - # @!method self.attr_volatile(*names) - # Creates methods for reading and writing (as `attr_accessor` does) to a instance variable with - # volatile (Java) semantic. The instance variable should be accessed only through generated methods. - # - # @param [::Array] names of the instance variables to be volatile - # @return [::Array] names of defined method names - - # Has to be called by children. - def initialize - super - __initialize_atomic_fields__ - end - - def self.safe_initialization! - extend SafeInitialization unless safe_initialization? - end - - def self.safe_initialization? - self.singleton_class < SafeInitialization - end - - # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains - # any instance variables with CamelCase names and isn't {.safe_initialization?}. - # @raise when offend found - # @return [true] - def self.ensure_safe_initialization_when_final_fields_are_present - Object.class_eval do - def self.new(*args, &block) - object = super(*args, &block) - ensure - has_final_field = object.instance_variables.any? { |v| v.to_s =~ /^@[A-Z]/ } - if has_final_field && !safe_initialization? - raise "there was an instance of #{object.class} with final field but not marked with safe_initialization!" - end - end - end - true - end - - # Creates methods for reading and writing to a instance variable with - # volatile (Java) semantic as {.attr_volatile} does. - # The instance variable should be accessed only through generated methods. - # This method generates following methods: `value`, `value=(new_value) #=> new_value`, - # `swap_value(new_value) #=> old_value`, - # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. - # @param [::Array] names of the instance variables to be volatile with CAS. - # @return [::Array] names of defined method names. - # @!macro attr_atomic - # @!method $1 - # @return [Object] The $1. - # @!method $1=(new_$1) - # Set the $1. - # @return [Object] new_$1. - # @!method swap_$1(new_$1) - # Set the $1 to new_$1 and return the old $1. - # @return [Object] old $1 - # @!method compare_and_set_$1(expected_$1, new_$1) - # Sets the $1 to new_$1 if the current $1 is expected_$1 - # @return [true, false] - # @!method update_$1(&block) - # Updates the $1 using the block. - # @yield [Object] Calculate a new $1 using given (old) $1 - # @yieldparam [Object] old $1 - # @return [Object] new $1 - def self.attr_atomic(*names) - @__atomic_fields__ ||= [] - @__atomic_fields__ += names - safe_initialization! - define_initialize_atomic_fields - - names.each do |name| - ivar = :"@Atomic#{name.to_s.gsub(/(?:^|_)(.)/) { $1.upcase }}" - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{name} - #{ivar}.get - end - - def #{name}=(value) - #{ivar}.set value - end - - def swap_#{name}(value) - #{ivar}.swap value - end - - def compare_and_set_#{name}(expected, value) - #{ivar}.compare_and_set expected, value - end - - def update_#{name}(&block) - #{ivar}.update(&block) - end - RUBY - end - names.flat_map { |n| [n, :"#{n}=", :"swap_#{n}", :"compare_and_set_#{n}", :"update_#{n}"] } - end - - # @param [true, false] inherited should inherited volatile with CAS fields be returned? - # @return [::Array] Returns defined volatile with CAS fields on this class. - def self.atomic_attributes(inherited = true) - @__atomic_fields__ ||= [] - ((superclass.atomic_attributes if superclass.respond_to?(:atomic_attributes) && inherited) || []) + @__atomic_fields__ - end - - # @return [true, false] is the attribute with name atomic? - def self.atomic_attribute?(name) - atomic_attributes.include? name - end - - private - - def self.define_initialize_atomic_fields - assignments = @__atomic_fields__.map do |name| - "@Atomic#{name.to_s.gsub(/(?:^|_)(.)/) { $1.upcase }} = Concurrent::AtomicReference.new(nil)" - end.join("\n") - - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def __initialize_atomic_fields__ - super - #{assignments} - end - RUBY - end - - private_class_method :define_initialize_atomic_fields - - def __initialize_atomic_fields__ - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb deleted file mode 100644 index f785e352..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'concurrent/synchronization/full_memory_barrier' - -module Concurrent - module Synchronization - - # @!visibility private - # @!macro internal_implementation_note - # - # By extending this module, a class and all its children are marked to be constructed safely. Meaning that - # all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures - # same behaviour as Java's final fields. - # - # Due to using Kernel#extend, the module is not included again if already present in the ancestors, - # which avoids extra overhead. - # - # @example - # class AClass < Concurrent::Synchronization::Object - # extend Concurrent::Synchronization::SafeInitialization - # - # def initialize - # @AFinalValue = 'value' # published safely, #foo will never return nil - # end - # - # def foo - # @AFinalValue - # end - # end - module SafeInitialization - def new(*args, &block) - super(*args, &block) - ensure - Concurrent::Synchronization.full_memory_barrier - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/volatile.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/volatile.rb deleted file mode 100644 index 46e8ba6a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/synchronization/volatile.rb +++ /dev/null @@ -1,101 +0,0 @@ -require 'concurrent/utility/native_extension_loader' # load native parts first -require 'concurrent/utility/engine' -require 'concurrent/synchronization/full_memory_barrier' - -module Concurrent - module Synchronization - - # Volatile adds the attr_volatile class method when included. - # - # @example - # class Foo - # include Concurrent::Synchronization::Volatile - # - # attr_volatile :bar - # - # def initialize - # self.bar = 1 - # end - # end - # - # foo = Foo.new - # foo.bar - # => 1 - # foo.bar = 2 - # => 2 - # - # @!visibility private - module Volatile - def self.included(base) - base.extend(ClassMethods) - end - - def full_memory_barrier - Synchronization.full_memory_barrier - end - - module ClassMethods - if Concurrent.on_cruby? - def attr_volatile(*names) - names.each do |name| - ivar = :"@volatile_#{name}" - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{name} - #{ivar} - end - - def #{name}=(value) - #{ivar} = value - end - RUBY - end - names.map { |n| [n, :"#{n}="] }.flatten - end - - elsif Concurrent.on_jruby? - def attr_volatile(*names) - names.each do |name| - ivar = :"@volatile_#{name}" - - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{name} - ::Concurrent::Synchronization::JRubyAttrVolatile.instance_variable_get_volatile(self, :#{ivar}) - end - - def #{name}=(value) - ::Concurrent::Synchronization::JRubyAttrVolatile.instance_variable_set_volatile(self, :#{ivar}, value) - end - RUBY - - end - names.map { |n| [n, :"#{n}="] }.flatten - end - - else - warn 'Possibly unsupported Ruby implementation' unless Concurrent.on_truffleruby? - - def attr_volatile(*names) - names.each do |name| - ivar = :"@volatile_#{name}" - - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{name} - ::Concurrent::Synchronization.full_memory_barrier - #{ivar} - end - - def #{name}=(value) - #{ivar} = value - ::Concurrent::Synchronization.full_memory_barrier - end - RUBY - end - - names.map { |n| [n, :"#{n}="] }.flatten - end - end - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb deleted file mode 100644 index 019d8438..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'delegate' -require 'monitor' - -module Concurrent - # This class provides a trivial way to synchronize all calls to a given object - # by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls - # around the delegated `#send`. Example: - # - # array = [] # not thread-safe on many impls - # array = SynchronizedDelegator.new([]) # thread-safe - # - # A simple `Monitor` provides a very coarse-grained way to synchronize a given - # object, in that it will cause synchronization for methods that have no need - # for it, but this is a trivial way to get thread-safety where none may exist - # currently on some implementations. - # - # This class is currently being considered for inclusion into stdlib, via - # https://bugs.ruby-lang.org/issues/8556 - # - # @!visibility private - class SynchronizedDelegator < SimpleDelegator - def setup - @old_abort = Thread.abort_on_exception - Thread.abort_on_exception = true - end - - def teardown - Thread.abort_on_exception = @old_abort - end - - def initialize(obj) - __setobj__(obj) - @monitor = Monitor.new - end - - def method_missing(method, *args, &block) - monitor = @monitor - begin - monitor.enter - super - ensure - monitor.exit - end - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util.rb deleted file mode 100644 index c67084a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util.rb +++ /dev/null @@ -1,16 +0,0 @@ -module Concurrent - - # @!visibility private - module ThreadSafe - - # @!visibility private - module Util - - # TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger - FIXNUM_BIT_SIZE = (0.size * 8) - 2 - MAX_INT = (2 ** FIXNUM_BIT_SIZE) - 1 - # TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter - CPU_COUNT = 16 # is there a way to determine this? - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/adder.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/adder.rb deleted file mode 100644 index 852b403b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/adder.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'concurrent/thread_safe/util' -require 'concurrent/thread_safe/util/striped64' - -module Concurrent - - # @!visibility private - module ThreadSafe - - # @!visibility private - module Util - - # A Ruby port of the Doug Lea's jsr166e.LongAdder class version 1.8 - # available in public domain. - # - # Original source code available here: - # http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/LongAdder.java?revision=1.8 - # - # One or more variables that together maintain an initially zero - # sum. When updates (method +add+) are contended across threads, - # the set of variables may grow dynamically to reduce contention. - # Method +sum+ returns the current total combined across the - # variables maintaining the sum. - # - # This class is usually preferable to single +Atomic+ reference when - # multiple threads update a common sum that is used for purposes such - # as collecting statistics, not for fine-grained synchronization - # control. Under low update contention, the two classes have similar - # characteristics. But under high contention, expected throughput of - # this class is significantly higher, at the expense of higher space - # consumption. - # - # @!visibility private - class Adder < Striped64 - # Adds the given value. - def add(x) - if (current_cells = cells) || !cas_base_computed {|current_base| current_base + x} - was_uncontended = true - hash = hash_code - unless current_cells && (cell = current_cells.volatile_get_by_hash(hash)) && (was_uncontended = cell.cas_computed {|current_value| current_value + x}) - retry_update(x, hash, was_uncontended) {|current_value| current_value + x} - end - end - end - - def increment - add(1) - end - - def decrement - add(-1) - end - - # Returns the current sum. The returned value is _NOT_ an - # atomic snapshot: Invocation in the absence of concurrent - # updates returns an accurate result, but concurrent updates that - # occur while the sum is being calculated might not be - # incorporated. - def sum - x = base - if current_cells = cells - current_cells.each do |cell| - x += cell.value if cell - end - end - x - end - - def reset - internal_reset(0) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb deleted file mode 100644 index 01eb98f4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb +++ /dev/null @@ -1,52 +0,0 @@ -require 'concurrent/thread_safe/util' -require 'concurrent/utility/engine' - -# Shim for TruffleRuby.synchronized -if Concurrent.on_truffleruby? && !TruffleRuby.respond_to?(:synchronized) - module TruffleRuby - def self.synchronized(object, &block) - Truffle::System.synchronized(object, &block) - end - end -end - -module Concurrent - module ThreadSafe - module Util - def self.make_synchronized_on_cruby(klass) - klass.class_eval do - def initialize(*args, &block) - @_monitor = Monitor.new - super - end - - def initialize_copy(other) - # make sure a copy is not sharing a monitor with the original object! - @_monitor = Monitor.new - super - end - end - - klass.superclass.instance_methods(false).each do |method| - klass.class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{method}(*args) - monitor = @_monitor - monitor or raise("BUG: Internal monitor was not properly initialized. Please report this to the concurrent-ruby developers.") - monitor.synchronize { super } - end - RUBY - end - end - - def self.make_synchronized_on_truffleruby(klass) - klass.superclass.instance_methods(false).each do |method| - klass.class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{method}(*args, &block) - TruffleRuby.synchronized(self) { super(*args, &block) } - end - RUBY - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/power_of_two_tuple.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/power_of_two_tuple.rb deleted file mode 100644 index b54be39c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/power_of_two_tuple.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'concurrent/thread_safe/util' -require 'concurrent/tuple' - -module Concurrent - - # @!visibility private - module ThreadSafe - - # @!visibility private - module Util - - # @!visibility private - class PowerOfTwoTuple < Concurrent::Tuple - - def initialize(size) - raise ArgumentError, "size must be a power of 2 (#{size.inspect} provided)" unless size > 0 && size & (size - 1) == 0 - super(size) - end - - def hash_to_index(hash) - (size - 1) & hash - end - - def volatile_get_by_hash(hash) - volatile_get(hash_to_index(hash)) - end - - def volatile_set_by_hash(hash, value) - volatile_set(hash_to_index(hash), value) - end - - def next_in_size_table - self.class.new(size << 1) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/striped64.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/striped64.rb deleted file mode 100644 index 4169c3d3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/striped64.rb +++ /dev/null @@ -1,246 +0,0 @@ -require 'concurrent/thread_safe/util' -require 'concurrent/thread_safe/util/power_of_two_tuple' -require 'concurrent/thread_safe/util/volatile' -require 'concurrent/thread_safe/util/xor_shift_random' - -module Concurrent - - # @!visibility private - module ThreadSafe - - # @!visibility private - module Util - - # A Ruby port of the Doug Lea's jsr166e.Striped64 class version 1.6 - # available in public domain. - # - # Original source code available here: - # http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/Striped64.java?revision=1.6 - # - # Class holding common representation and mechanics for classes supporting - # dynamic striping on 64bit values. - # - # This class maintains a lazily-initialized table of atomically updated - # variables, plus an extra +base+ field. The table size is a power of two. - # Indexing uses masked per-thread hash codes. Nearly all methods on this - # class are private, accessed directly by subclasses. - # - # Table entries are of class +Cell+; a variant of AtomicLong padded to - # reduce cache contention on most processors. Padding is overkill for most - # Atomics because they are usually irregularly scattered in memory and thus - # don't interfere much with each other. But Atomic objects residing in - # arrays will tend to be placed adjacent to each other, and so will most - # often share cache lines (with a huge negative performance impact) without - # this precaution. - # - # In part because +Cell+s are relatively large, we avoid creating them until - # they are needed. When there is no contention, all updates are made to the - # +base+ field. Upon first contention (a failed CAS on +base+ update), the - # table is initialized to size 2. The table size is doubled upon further - # contention until reaching the nearest power of two greater than or equal - # to the number of CPUS. Table slots remain empty (+nil+) until they are - # needed. - # - # A single spinlock (+busy+) is used for initializing and resizing the - # table, as well as populating slots with new +Cell+s. There is no need for - # a blocking lock: When the lock is not available, threads try other slots - # (or the base). During these retries, there is increased contention and - # reduced locality, which is still better than alternatives. - # - # Per-thread hash codes are initialized to random values. Contention and/or - # table collisions are indicated by failed CASes when performing an update - # operation (see method +retry_update+). Upon a collision, if the table size - # is less than the capacity, it is doubled in size unless some other thread - # holds the lock. If a hashed slot is empty, and lock is available, a new - # +Cell+ is created. Otherwise, if the slot exists, a CAS is tried. Retries - # proceed by "double hashing", using a secondary hash (XorShift) to try to - # find a free slot. - # - # The table size is capped because, when there are more threads than CPUs, - # supposing that each thread were bound to a CPU, there would exist a - # perfect hash function mapping threads to slots that eliminates collisions. - # When we reach capacity, we search for this mapping by randomly varying the - # hash codes of colliding threads. Because search is random, and collisions - # only become known via CAS failures, convergence can be slow, and because - # threads are typically not bound to CPUS forever, may not occur at all. - # However, despite these limitations, observed contention rates are - # typically low in these cases. - # - # It is possible for a +Cell+ to become unused when threads that once hashed - # to it terminate, as well as in the case where doubling the table causes no - # thread to hash to it under expanded mask. We do not try to detect or - # remove such cells, under the assumption that for long-running instances, - # observed contention levels will recur, so the cells will eventually be - # needed again; and for short-lived ones, it does not matter. - # - # @!visibility private - class Striped64 - - # Padded variant of AtomicLong supporting only raw accesses plus CAS. - # The +value+ field is placed between pads, hoping that the JVM doesn't - # reorder them. - # - # Optimisation note: It would be possible to use a release-only - # form of CAS here, if it were provided. - # - # @!visibility private - class Cell < Concurrent::AtomicReference - - alias_method :cas, :compare_and_set - - def cas_computed - cas(current_value = value, yield(current_value)) - end - - # @!visibility private - def self.padding - # TODO: this only adds padding after the :value slot, need to find a way to add padding before the slot - # TODO (pitr-ch 28-Jul-2018): the padding instance vars may not be created - # hide from yardoc in a method - attr_reader :padding_0, :padding_1, :padding_2, :padding_3, :padding_4, :padding_5, :padding_6, :padding_7, :padding_8, :padding_9, :padding_10, :padding_11 - end - padding - end - - extend Volatile - attr_volatile :cells, # Table of cells. When non-null, size is a power of 2. - :base, # Base value, used mainly when there is no contention, but also as a fallback during table initialization races. Updated via CAS. - :busy # Spinlock (locked via CAS) used when resizing and/or creating Cells. - - alias_method :busy?, :busy - - def initialize - super() - self.busy = false - self.base = 0 - end - - # Handles cases of updates involving initialization, resizing, - # creating new Cells, and/or contention. See above for - # explanation. This method suffers the usual non-modularity - # problems of optimistic retry code, relying on rechecked sets of - # reads. - # - # Arguments: - # [+x+] - # the value - # [+hash_code+] - # hash code used - # [+x+] - # false if CAS failed before call - def retry_update(x, hash_code, was_uncontended) # :yields: current_value - hash = hash_code - collided = false # True if last slot nonempty - while true - if current_cells = cells - if !(cell = current_cells.volatile_get_by_hash(hash)) - if busy? - collided = false - else # Try to attach new Cell - if try_to_install_new_cell(Cell.new(x), hash) # Optimistically create and try to insert new cell - break - else - redo # Slot is now non-empty - end - end - elsif !was_uncontended # CAS already known to fail - was_uncontended = true # Continue after rehash - elsif cell.cas_computed {|current_value| yield current_value} - break - elsif current_cells.size >= CPU_COUNT || cells != current_cells # At max size or stale - collided = false - elsif collided && expand_table_unless_stale(current_cells) - collided = false - redo # Retry with expanded table - else - collided = true - end - hash = XorShiftRandom.xorshift(hash) - - elsif try_initialize_cells(x, hash) || cas_base_computed {|current_base| yield current_base} - break - end - end - self.hash_code = hash - end - - private - # Static per-thread hash code key. Shared across all instances to - # reduce Thread locals pollution and because adjustments due to - # collisions in one table are likely to be appropriate for - # others. - THREAD_LOCAL_KEY = "#{name}.hash_code".to_sym - - # A thread-local hash code accessor. The code is initially - # random, but may be set to a different value upon collisions. - def hash_code - Thread.current[THREAD_LOCAL_KEY] ||= XorShiftRandom.get - end - - def hash_code=(hash) - Thread.current[THREAD_LOCAL_KEY] = hash - end - - # Sets base and all +cells+ to the given value. - def internal_reset(initial_value) - current_cells = cells - self.base = initial_value - if current_cells - current_cells.each do |cell| - cell.value = initial_value if cell - end - end - end - - def cas_base_computed - cas_base(current_base = base, yield(current_base)) - end - - def free? - !busy? - end - - def try_initialize_cells(x, hash) - if free? && !cells - try_in_busy do - unless cells # Recheck under lock - new_cells = PowerOfTwoTuple.new(2) - new_cells.volatile_set_by_hash(hash, Cell.new(x)) - self.cells = new_cells - end - end - end - end - - def expand_table_unless_stale(current_cells) - try_in_busy do - if current_cells == cells # Recheck under lock - new_cells = current_cells.next_in_size_table - current_cells.each_with_index {|x, i| new_cells.volatile_set(i, x)} - self.cells = new_cells - end - end - end - - def try_to_install_new_cell(new_cell, hash) - try_in_busy do - # Recheck under lock - if (current_cells = cells) && !current_cells.volatile_get(i = current_cells.hash_to_index(hash)) - current_cells.volatile_set(i, new_cell) - end - end - end - - def try_in_busy - if cas_busy(false, true) - begin - yield - ensure - self.busy = false - end - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/volatile.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/volatile.rb deleted file mode 100644 index cdac2a39..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/volatile.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'concurrent/thread_safe/util' - -module Concurrent - - # @!visibility private - module ThreadSafe - - # @!visibility private - module Util - - # @!visibility private - module Volatile - - # Provides +volatile+ (in the JVM's sense) attribute accessors implemented - # atop of +Concurrent::AtomicReference+. - # - # Usage: - # class Foo - # extend Concurrent::ThreadSafe::Util::Volatile - # attr_volatile :foo, :bar - # - # def initialize(bar) - # super() # must super() into parent initializers before using the volatile attribute accessors - # self.bar = bar - # end - # - # def hello - # my_foo = foo # volatile read - # self.foo = 1 # volatile write - # cas_foo(1, 2) # => true | a strong CAS - # end - # end - def attr_volatile(*attr_names) - return if attr_names.empty? - include(Module.new do - atomic_ref_setup = attr_names.map {|attr_name| "@__#{attr_name} = Concurrent::AtomicReference.new"} - initialize_copy_setup = attr_names.zip(atomic_ref_setup).map do |attr_name, ref_setup| - "#{ref_setup}(other.instance_variable_get(:@__#{attr_name}).get)" - end - class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 - def initialize(*) - super - #{atomic_ref_setup.join('; ')} - end - - def initialize_copy(other) - super - #{initialize_copy_setup.join('; ')} - end - RUBY_EVAL - - attr_names.each do |attr_name| - class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 - def #{attr_name} - @__#{attr_name}.get - end - - def #{attr_name}=(value) - @__#{attr_name}.set(value) - end - - def compare_and_set_#{attr_name}(old_value, new_value) - @__#{attr_name}.compare_and_set(old_value, new_value) - end - RUBY_EVAL - - alias_method :"cas_#{attr_name}", :"compare_and_set_#{attr_name}" - alias_method :"lazy_set_#{attr_name}", :"#{attr_name}=" - end - end) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/xor_shift_random.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/xor_shift_random.rb deleted file mode 100644 index c231d182..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/thread_safe/util/xor_shift_random.rb +++ /dev/null @@ -1,50 +0,0 @@ -require 'concurrent/thread_safe/util' - -module Concurrent - - # @!visibility private - module ThreadSafe - - # @!visibility private - module Util - - # A xorshift random number (positive +Fixnum+s) generator, provides - # reasonably cheap way to generate thread local random numbers without - # contending for the global +Kernel.rand+. - # - # Usage: - # x = XorShiftRandom.get # uses Kernel.rand to generate an initial seed - # while true - # if (x = XorShiftRandom.xorshift).odd? # thread-locally generate a next random number - # do_something_at_random - # end - # end - module XorShiftRandom - extend self - MAX_XOR_SHIFTABLE_INT = MAX_INT - 1 - - # Generates an initial non-zero positive +Fixnum+ via +Kernel.rand+. - def get - Kernel.rand(MAX_XOR_SHIFTABLE_INT) + 1 # 0 can't be xorshifted - end - - # xorshift based on: http://www.jstatsoft.org/v08/i14/paper - if 0.size == 4 - # using the "yˆ=y>>a; yˆ=y<>c;" transform with the (a,b,c) tuple with values (3,1,14) to minimise Bignum overflows - def xorshift(x) - x ^= x >> 3 - x ^= (x << 1) & MAX_INT # cut-off Bignum overflow - x ^= x >> 14 - end - else - # using the "yˆ=y>>a; yˆ=y<>c;" transform with the (a,b,c) tuple with values (1,1,54) to minimise Bignum overflows - def xorshift(x) - x ^= x >> 1 - x ^= (x << 1) & MAX_INT # cut-off Bignum overflow - x ^= x >> 54 - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/timer_task.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/timer_task.rb deleted file mode 100644 index dd2037f6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/timer_task.rb +++ /dev/null @@ -1,361 +0,0 @@ -require 'concurrent/collection/copy_on_notify_observer_set' -require 'concurrent/concern/dereferenceable' -require 'concurrent/concern/observable' -require 'concurrent/atomic/atomic_boolean' -require 'concurrent/executor/executor_service' -require 'concurrent/executor/ruby_executor_service' -require 'concurrent/executor/safe_task_executor' -require 'concurrent/scheduled_task' - -module Concurrent - - # A very common concurrency pattern is to run a thread that performs a task at - # regular intervals. The thread that performs the task sleeps for the given - # interval then wakes up and performs the task. Lather, rinse, repeat... This - # pattern causes two problems. First, it is difficult to test the business - # logic of the task because the task itself is tightly coupled with the - # concurrency logic. Second, an exception raised while performing the task can - # cause the entire thread to abend. In a long-running application where the - # task thread is intended to run for days/weeks/years a crashed task thread - # can pose a significant problem. `TimerTask` alleviates both problems. - # - # When a `TimerTask` is launched it starts a thread for monitoring the - # execution interval. The `TimerTask` thread does not perform the task, - # however. Instead, the TimerTask launches the task on a separate thread. - # Should the task experience an unrecoverable crash only the task thread will - # crash. This makes the `TimerTask` very fault tolerant. Additionally, the - # `TimerTask` thread can respond to the success or failure of the task, - # performing logging or ancillary operations. - # - # One other advantage of `TimerTask` is that it forces the business logic to - # be completely decoupled from the concurrency logic. The business logic can - # be tested separately then passed to the `TimerTask` for scheduling and - # running. - # - # A `TimerTask` supports two different types of interval calculations. - # A fixed delay will always wait the same amount of time between the - # completion of one task and the start of the next. A fixed rate will - # attempt to maintain a constant rate of execution regardless of the - # duration of the task. For example, if a fixed rate task is scheduled - # to run every 60 seconds but the task itself takes 10 seconds to - # complete, the next task will be scheduled to run 50 seconds after - # the start of the previous task. If the task takes 70 seconds to - # complete, the next task will be start immediately after the previous - # task completes. Tasks will not be executed concurrently. - # - # In some cases it may be necessary for a `TimerTask` to affect its own - # execution cycle. To facilitate this, a reference to the TimerTask instance - # is passed as an argument to the provided block every time the task is - # executed. - # - # The `TimerTask` class includes the `Dereferenceable` mixin module so the - # result of the last execution is always available via the `#value` method. - # Dereferencing options can be passed to the `TimerTask` during construction or - # at any later time using the `#set_deref_options` method. - # - # `TimerTask` supports notification through the Ruby standard library - # {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html - # Observable} module. On execution the `TimerTask` will notify the observers - # with three arguments: time of execution, the result of the block (or nil on - # failure), and any raised exceptions (or nil on success). - # - # @!macro copy_options - # - # @example Basic usage - # task = Concurrent::TimerTask.new{ puts 'Boom!' } - # task.execute - # - # task.execution_interval #=> 60 (default) - # - # # wait 60 seconds... - # #=> 'Boom!' - # - # task.shutdown #=> true - # - # @example Configuring `:execution_interval` - # task = Concurrent::TimerTask.new(execution_interval: 5) do - # puts 'Boom!' - # end - # - # task.execution_interval #=> 5 - # - # @example Immediate execution with `:run_now` - # task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } - # task.execute - # - # #=> 'Boom!' - # - # @example Configuring `:interval_type` with either :fixed_delay or :fixed_rate, default is :fixed_delay - # task = Concurrent::TimerTask.new(execution_interval: 5, interval_type: :fixed_rate) do - # puts 'Boom!' - # end - # task.interval_type #=> :fixed_rate - # - # @example Last `#value` and `Dereferenceable` mixin - # task = Concurrent::TimerTask.new( - # dup_on_deref: true, - # execution_interval: 5 - # ){ Time.now } - # - # task.execute - # Time.now #=> 2013-11-07 18:06:50 -0500 - # sleep(10) - # task.value #=> 2013-11-07 18:06:55 -0500 - # - # @example Controlling execution from within the block - # timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| - # task.execution_interval.to_i.times{ print 'Boom! ' } - # print "\n" - # task.execution_interval += 1 - # if task.execution_interval > 5 - # puts 'Stopping...' - # task.shutdown - # end - # end - # - # timer_task.execute - # #=> Boom! - # #=> Boom! Boom! - # #=> Boom! Boom! Boom! - # #=> Boom! Boom! Boom! Boom! - # #=> Boom! Boom! Boom! Boom! Boom! - # #=> Stopping... - # - # @example Observation - # class TaskObserver - # def update(time, result, ex) - # if result - # print "(#{time}) Execution successfully returned #{result}\n" - # else - # print "(#{time}) Execution failed with error #{ex}\n" - # end - # end - # end - # - # task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } - # task.add_observer(TaskObserver.new) - # task.execute - # sleep 4 - # - # #=> (2013-10-13 19:08:58 -0400) Execution successfully returned 42 - # #=> (2013-10-13 19:08:59 -0400) Execution successfully returned 42 - # #=> (2013-10-13 19:09:00 -0400) Execution successfully returned 42 - # task.shutdown - # - # task = Concurrent::TimerTask.new(execution_interval: 1){ sleep } - # task.add_observer(TaskObserver.new) - # task.execute - # - # #=> (2013-10-13 19:07:25 -0400) Execution timed out - # #=> (2013-10-13 19:07:27 -0400) Execution timed out - # #=> (2013-10-13 19:07:29 -0400) Execution timed out - # task.shutdown - # - # task = Concurrent::TimerTask.new(execution_interval: 1){ raise StandardError } - # task.add_observer(TaskObserver.new) - # task.execute - # - # #=> (2013-10-13 19:09:37 -0400) Execution failed with error StandardError - # #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError - # #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError - # task.shutdown - # - # @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html - # @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html - class TimerTask < RubyExecutorService - include Concern::Dereferenceable - include Concern::Observable - - # Default `:execution_interval` in seconds. - EXECUTION_INTERVAL = 60 - - # Maintain the interval between the end of one execution and the start of the next execution. - FIXED_DELAY = :fixed_delay - - # Maintain the interval between the start of one execution and the start of the next. - # If execution time exceeds the interval, the next execution will start immediately - # after the previous execution finishes. Executions will not run concurrently. - FIXED_RATE = :fixed_rate - - # Default `:interval_type` - DEFAULT_INTERVAL_TYPE = FIXED_DELAY - - # Create a new TimerTask with the given task and configuration. - # - # @!macro timer_task_initialize - # @param [Hash] opts the options defining task execution. - # @option opts [Float] :execution_interval number of seconds between - # task executions (default: EXECUTION_INTERVAL) - # @option opts [Boolean] :run_now Whether to run the task immediately - # upon instantiation or to wait until the first # execution_interval - # has passed (default: false) - # @options opts [Symbol] :interval_type method to calculate the interval - # between executions, can be either :fixed_rate or :fixed_delay. - # (default: :fixed_delay) - # @option opts [Executor] executor, default is `global_io_executor` - # - # @!macro deref_options - # - # @raise ArgumentError when no block is given. - # - # @yield to the block after :execution_interval seconds have passed since - # the last yield - # @yieldparam task a reference to the `TimerTask` instance so that the - # block can control its own lifecycle. Necessary since `self` will - # refer to the execution context of the block rather than the running - # `TimerTask`. - # - # @return [TimerTask] the new `TimerTask` - def initialize(opts = {}, &task) - raise ArgumentError.new('no block given') unless block_given? - super - set_deref_options opts - end - - # Is the executor running? - # - # @return [Boolean] `true` when running, `false` when shutting down or shutdown - def running? - @running.true? - end - - # Execute a previously created `TimerTask`. - # - # @return [TimerTask] a reference to `self` - # - # @example Instance and execute in separate steps - # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } - # task.running? #=> false - # task.execute - # task.running? #=> true - # - # @example Instance and execute in one line - # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute - # task.running? #=> true - def execute - synchronize do - if @running.false? - @running.make_true - schedule_next_task(@run_now ? 0 : @execution_interval) - end - end - self - end - - # Create and execute a new `TimerTask`. - # - # @!macro timer_task_initialize - # - # @example - # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } - # task.running? #=> true - def self.execute(opts = {}, &task) - TimerTask.new(opts, &task).execute - end - - # @!attribute [rw] execution_interval - # @return [Fixnum] Number of seconds after the task completes before the - # task is performed again. - def execution_interval - synchronize { @execution_interval } - end - - # @!attribute [rw] execution_interval - # @return [Fixnum] Number of seconds after the task completes before the - # task is performed again. - def execution_interval=(value) - if (value = value.to_f) <= 0.0 - raise ArgumentError.new('must be greater than zero') - else - synchronize { @execution_interval = value } - end - end - - # @!attribute [r] interval_type - # @return [Symbol] method to calculate the interval between executions - attr_reader :interval_type - - # @!attribute [rw] timeout_interval - # @return [Fixnum] Number of seconds the task can run before it is - # considered to have failed. - def timeout_interval - warn 'TimerTask timeouts are now ignored as these were not able to be implemented correctly' - end - - # @!attribute [rw] timeout_interval - # @return [Fixnum] Number of seconds the task can run before it is - # considered to have failed. - def timeout_interval=(value) - warn 'TimerTask timeouts are now ignored as these were not able to be implemented correctly' - end - - private :post, :<< - - private - - def ns_initialize(opts, &task) - set_deref_options(opts) - - self.execution_interval = opts[:execution] || opts[:execution_interval] || EXECUTION_INTERVAL - if opts[:interval_type] && ![FIXED_DELAY, FIXED_RATE].include?(opts[:interval_type]) - raise ArgumentError.new('interval_type must be either :fixed_delay or :fixed_rate') - end - if opts[:timeout] || opts[:timeout_interval] - warn 'TimeTask timeouts are now ignored as these were not able to be implemented correctly' - end - - @run_now = opts[:now] || opts[:run_now] - @interval_type = opts[:interval_type] || DEFAULT_INTERVAL_TYPE - @task = Concurrent::SafeTaskExecutor.new(task) - @executor = opts[:executor] || Concurrent.global_io_executor - @running = Concurrent::AtomicBoolean.new(false) - @value = nil - - self.observers = Collection::CopyOnNotifyObserverSet.new - end - - # @!visibility private - def ns_shutdown_execution - @running.make_false - super - end - - # @!visibility private - def ns_kill_execution - @running.make_false - super - end - - # @!visibility private - def schedule_next_task(interval = execution_interval) - ScheduledTask.execute(interval, executor: @executor, args: [Concurrent::Event.new], &method(:execute_task)) - nil - end - - # @!visibility private - def execute_task(completion) - return nil unless @running.true? - start_time = Concurrent.monotonic_time - _success, value, reason = @task.execute(self) - if completion.try? - self.value = value - schedule_next_task(calculate_next_interval(start_time)) - time = Time.now - observers.notify_observers do - [time, self.value, reason] - end - end - nil - end - - # @!visibility private - def calculate_next_interval(start_time) - if @interval_type == FIXED_RATE - run_time = Concurrent.monotonic_time - start_time - [execution_interval - run_time, 0].max - else # FIXED_DELAY - execution_interval - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/tuple.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/tuple.rb deleted file mode 100644 index 56212cfd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/tuple.rb +++ /dev/null @@ -1,82 +0,0 @@ -require 'concurrent/atomic/atomic_reference' - -module Concurrent - - # A fixed size array with volatile (synchronized, thread safe) getters/setters. - # Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal. - # - # @example - # tuple = Concurrent::Tuple.new(16) - # - # tuple.set(0, :foo) #=> :foo | volatile write - # tuple.get(0) #=> :foo | volatile read - # tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS - # tuple.cas(0, :foo, :baz) #=> false | strong CAS - # tuple.get(0) #=> :bar | volatile read - # - # @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia - # @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple - # @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable - class Tuple - include Enumerable - - # The (fixed) size of the tuple. - attr_reader :size - - # Create a new tuple of the given size. - # - # @param [Integer] size the number of elements in the tuple - def initialize(size) - @size = size - @tuple = tuple = ::Array.new(size) - i = 0 - while i < size - tuple[i] = Concurrent::AtomicReference.new - i += 1 - end - end - - # Get the value of the element at the given index. - # - # @param [Integer] i the index from which to retrieve the value - # @return [Object] the value at the given index or nil if the index is out of bounds - def get(i) - return nil if i >= @size || i < 0 - @tuple[i].get - end - alias_method :volatile_get, :get - - # Set the element at the given index to the given value - # - # @param [Integer] i the index for the element to set - # @param [Object] value the value to set at the given index - # - # @return [Object] the new value of the element at the given index or nil if the index is out of bounds - def set(i, value) - return nil if i >= @size || i < 0 - @tuple[i].set(value) - end - alias_method :volatile_set, :set - - # Set the value at the given index to the new value if and only if the current - # value matches the given old value. - # - # @param [Integer] i the index for the element to set - # @param [Object] old_value the value to compare against the current value - # @param [Object] new_value the value to set at the given index - # - # @return [Boolean] true if the value at the given element was set else false - def compare_and_set(i, old_value, new_value) - return false if i >= @size || i < 0 - @tuple[i].compare_and_set(old_value, new_value) - end - alias_method :cas, :compare_and_set - - # Calls the given block once for each element in self, passing that element as a parameter. - # - # @yieldparam [Object] ref the `Concurrent::AtomicReference` object at the current index - def each - @tuple.each {|ref| yield ref.get} - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/tvar.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/tvar.rb deleted file mode 100644 index 5d02ef09..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/tvar.rb +++ /dev/null @@ -1,222 +0,0 @@ -require 'set' -require 'concurrent/synchronization/object' - -module Concurrent - - # A `TVar` is a transactional variable - a single-element container that - # is used as part of a transaction - see `Concurrent::atomically`. - # - # @!macro thread_safe_variable_comparison - # - # {include:file:docs-source/tvar.md} - class TVar < Synchronization::Object - safe_initialization! - - # Create a new `TVar` with an initial value. - def initialize(value) - @value = value - @lock = Mutex.new - end - - # Get the value of a `TVar`. - def value - Concurrent::atomically do - Transaction::current.read(self) - end - end - - # Set the value of a `TVar`. - def value=(value) - Concurrent::atomically do - Transaction::current.write(self, value) - end - end - - # @!visibility private - def unsafe_value # :nodoc: - @value - end - - # @!visibility private - def unsafe_value=(value) # :nodoc: - @value = value - end - - # @!visibility private - def unsafe_lock # :nodoc: - @lock - end - - end - - # Run a block that reads and writes `TVar`s as a single atomic transaction. - # With respect to the value of `TVar` objects, the transaction is atomic, in - # that it either happens or it does not, consistent, in that the `TVar` - # objects involved will never enter an illegal state, and isolated, in that - # transactions never interfere with each other. You may recognise these - # properties from database transactions. - # - # There are some very important and unusual semantics that you must be aware of: - # - # * Most importantly, the block that you pass to atomically may be executed - # more than once. In most cases your code should be free of - # side-effects, except for via TVar. - # - # * If an exception escapes an atomically block it will abort the transaction. - # - # * It is undefined behaviour to use callcc or Fiber with atomically. - # - # * If you create a new thread within an atomically, it will not be part of - # the transaction. Creating a thread counts as a side-effect. - # - # Transactions within transactions are flattened to a single transaction. - # - # @example - # a = new TVar(100_000) - # b = new TVar(100) - # - # Concurrent::atomically do - # a.value -= 10 - # b.value += 10 - # end - def atomically - raise ArgumentError.new('no block given') unless block_given? - - # Get the current transaction - - transaction = Transaction::current - - # Are we not already in a transaction (not nested)? - - if transaction.nil? - # New transaction - - begin - # Retry loop - - loop do - - # Create a new transaction - - transaction = Transaction.new - Transaction::current = transaction - - # Run the block, aborting on exceptions - - begin - result = yield - rescue Transaction::AbortError => e - transaction.abort - result = Transaction::ABORTED - rescue Transaction::LeaveError => e - transaction.abort - break result - rescue => e - transaction.abort - raise e - end - # If we can commit, break out of the loop - - if result != Transaction::ABORTED - if transaction.commit - break result - end - end - end - ensure - # Clear the current transaction - - Transaction::current = nil - end - else - # Nested transaction - flatten it and just run the block - - yield - end - end - - # Abort a currently running transaction - see `Concurrent::atomically`. - def abort_transaction - raise Transaction::AbortError.new - end - - # Leave a transaction without committing or aborting - see `Concurrent::atomically`. - def leave_transaction - raise Transaction::LeaveError.new - end - - module_function :atomically, :abort_transaction, :leave_transaction - - private - - # @!visibility private - class Transaction - - ABORTED = ::Object.new - - OpenEntry = Struct.new(:value, :modified) - - AbortError = Class.new(StandardError) - LeaveError = Class.new(StandardError) - - def initialize - @open_tvars = {} - end - - def read(tvar) - entry = open(tvar) - entry.value - end - - def write(tvar, value) - entry = open(tvar) - entry.modified = true - entry.value = value - end - - def open(tvar) - entry = @open_tvars[tvar] - - unless entry - unless tvar.unsafe_lock.try_lock - Concurrent::abort_transaction - end - - entry = OpenEntry.new(tvar.unsafe_value, false) - @open_tvars[tvar] = entry - end - - entry - end - - def abort - unlock - end - - def commit - @open_tvars.each do |tvar, entry| - if entry.modified - tvar.unsafe_value = entry.value - end - end - - unlock - end - - def unlock - @open_tvars.each_key do |tvar| - tvar.unsafe_lock.unlock - end - end - - def self.current - Thread.current[:current_tvar_transaction] - end - - def self.current=(transaction) - Thread.current[:current_tvar_transaction] = transaction - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/engine.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/engine.rb deleted file mode 100644 index 0c574b2a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/engine.rb +++ /dev/null @@ -1,45 +0,0 @@ -module Concurrent - # @!visibility private - module Utility - - # @!visibility private - module EngineDetector - def on_cruby? - RUBY_ENGINE == 'ruby' - end - - def on_jruby? - RUBY_ENGINE == 'jruby' - end - - def on_truffleruby? - RUBY_ENGINE == 'truffleruby' - end - - def on_windows? - !(RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/).nil? - end - - def on_osx? - !(RbConfig::CONFIG['host_os'] =~ /darwin|mac os/).nil? - end - - def on_linux? - !(RbConfig::CONFIG['host_os'] =~ /linux/).nil? - end - - def ruby_version(version = RUBY_VERSION, comparison, major, minor, patch) - result = (version.split('.').map(&:to_i) <=> [major, minor, patch]) - comparisons = { :== => [0], - :>= => [1, 0], - :<= => [-1, 0], - :> => [1], - :< => [-1] } - comparisons.fetch(comparison).include? result - end - end - end - - # @!visibility private - extend Utility::EngineDetector -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/monotonic_time.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/monotonic_time.rb deleted file mode 100644 index 1c987d8a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/monotonic_time.rb +++ /dev/null @@ -1,19 +0,0 @@ -module Concurrent - - # @!macro monotonic_get_time - # - # Returns the current time as tracked by the application monotonic clock. - # - # @param [Symbol] unit the time unit to be returned, can be either - # :float_second, :float_millisecond, :float_microsecond, :second, - # :millisecond, :microsecond, or :nanosecond default to :float_second. - # - # @return [Float] The current monotonic time since some unspecified - # starting point - # - # @!macro monotonic_clock_warning - def monotonic_time(unit = :float_second) - Process.clock_gettime(Process::CLOCK_MONOTONIC, unit) - end - module_function :monotonic_time -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb deleted file mode 100644 index bf7bab35..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb +++ /dev/null @@ -1,77 +0,0 @@ -require 'concurrent/utility/engine' -# Synchronization::AbstractObject must be defined before loading the extension -require 'concurrent/synchronization/abstract_object' - -module Concurrent - # @!visibility private - module Utility - # @!visibility private - module NativeExtensionLoader - - def allow_c_extensions? - Concurrent.on_cruby? - end - - def c_extensions_loaded? - defined?(@c_extensions_loaded) && @c_extensions_loaded - end - - def load_native_extensions - if Concurrent.on_cruby? && !c_extensions_loaded? - ['concurrent/concurrent_ruby_ext', - "concurrent/#{RUBY_VERSION[0..2]}/concurrent_ruby_ext" - ].each { |p| try_load_c_extension p } - end - - if Concurrent.on_jruby? && !java_extensions_loaded? - begin - require 'concurrent/concurrent_ruby.jar' - set_java_extensions_loaded - rescue LoadError => e - raise e, "Java extensions are required for JRuby.\n" + e.message, e.backtrace - end - end - end - - private - - def load_error_path(error) - if error.respond_to? :path - error.path - else - error.message.split(' -- ').last - end - end - - def set_c_extensions_loaded - @c_extensions_loaded = true - end - - def java_extensions_loaded? - defined?(@java_extensions_loaded) && @java_extensions_loaded - end - - def set_java_extensions_loaded - @java_extensions_loaded = true - end - - def try_load_c_extension(path) - require path - set_c_extensions_loaded - rescue LoadError => e - if load_error_path(e) == path - # move on with pure-Ruby implementations - # TODO (pitr-ch 12-Jul-2018): warning on verbose? - else - raise e - end - end - - end - end - - # @!visibility private - extend Utility::NativeExtensionLoader -end - -Concurrent.load_native_extensions diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/native_integer.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/native_integer.rb deleted file mode 100644 index de1cdc30..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/native_integer.rb +++ /dev/null @@ -1,54 +0,0 @@ -module Concurrent - # @!visibility private - module Utility - # @private - module NativeInteger - # http://stackoverflow.com/questions/535721/ruby-max-integer - MIN_VALUE = -(2**(0.size * 8 - 2)) - MAX_VALUE = (2**(0.size * 8 - 2) - 1) - - def ensure_upper_bound(value) - if value > MAX_VALUE - raise RangeError.new("#{value} is greater than the maximum value of #{MAX_VALUE}") - end - value - end - - def ensure_lower_bound(value) - if value < MIN_VALUE - raise RangeError.new("#{value} is less than the maximum value of #{MIN_VALUE}") - end - value - end - - def ensure_integer(value) - unless value.is_a?(Integer) - raise ArgumentError.new("#{value} is not an Integer") - end - value - end - - def ensure_integer_and_bounds(value) - ensure_integer value - ensure_upper_bound value - ensure_lower_bound value - end - - def ensure_positive(value) - if value < 0 - raise ArgumentError.new("#{value} cannot be negative") - end - value - end - - def ensure_positive_and_no_zero(value) - if value < 1 - raise ArgumentError.new("#{value} cannot be negative or zero") - end - value - end - - extend self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/processor_counter.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/processor_counter.rb deleted file mode 100644 index 2489cbd7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/utility/processor_counter.rb +++ /dev/null @@ -1,220 +0,0 @@ -require 'etc' -require 'rbconfig' -require 'concurrent/delay' - -module Concurrent - # @!visibility private - module Utility - - # @!visibility private - class ProcessorCounter - def initialize - @processor_count = Delay.new { compute_processor_count } - @physical_processor_count = Delay.new { compute_physical_processor_count } - @cpu_quota = Delay.new { compute_cpu_quota } - @cpu_shares = Delay.new { compute_cpu_shares } - end - - def processor_count - @processor_count.value - end - - def physical_processor_count - @physical_processor_count.value - end - - def available_processor_count - cpu_count = processor_count.to_f - quota = cpu_quota - - return cpu_count if quota.nil? - - # cgroup cpus quotas have no limits, so they can be set to higher than the - # real count of cores. - if quota > cpu_count - cpu_count - else - quota - end - end - - def cpu_quota - @cpu_quota.value - end - - def cpu_shares - @cpu_shares.value - end - - private - - def compute_processor_count - if Concurrent.on_jruby? - java.lang.Runtime.getRuntime.availableProcessors - else - Etc.nprocessors - end - end - - def compute_physical_processor_count - ppc = case RbConfig::CONFIG["target_os"] - when /darwin\d\d/ - IO.popen("/usr/sbin/sysctl -n hw.physicalcpu", &:read).to_i - when /linux/ - cores = {} # unique physical ID / core ID combinations - phy = 0 - IO.read("/proc/cpuinfo").scan(/^physical id.*|^core id.*/) do |ln| - if ln.start_with?("physical") - phy = ln[/\d+/] - elsif ln.start_with?("core") - cid = phy + ":" + ln[/\d+/] - cores[cid] = true if not cores[cid] - end - end - cores.count - when /mswin|mingw/ - # Get-CimInstance introduced in PowerShell 3 or earlier: https://learn.microsoft.com/en-us/previous-versions/powershell/module/cimcmdlets/get-ciminstance?view=powershell-3.0 - result = run('powershell -command "Get-CimInstance -ClassName Win32_Processor -Property NumberOfCores | Select-Object -Property NumberOfCores"') - if !result || $?.exitstatus != 0 - # fallback to deprecated wmic for older systems - result = run("wmic cpu get NumberOfCores") - end - if !result || $?.exitstatus != 0 - # Bail out if both commands returned something unexpected - processor_count - else - # powershell: "\nNumberOfCores\n-------------\n 4\n\n\n" - # wmic: "NumberOfCores \n\n4 \n\n\n\n" - result.scan(/\d+/).map(&:to_i).reduce(:+) - end - else - processor_count - end - # fall back to logical count if physical info is invalid - ppc > 0 ? ppc : processor_count - rescue - return 1 - end - - def run(command) - IO.popen(command, &:read) - rescue Errno::ENOENT - end - - def compute_cpu_quota - if RbConfig::CONFIG["target_os"].include?("linux") - if File.exist?("/sys/fs/cgroup/cpu.max") - # cgroups v2: https://docs.kernel.org/admin-guide/cgroup-v2.html#cpu-interface-files - cpu_max = File.read("/sys/fs/cgroup/cpu.max") - return nil if cpu_max.start_with?("max ") # no limit - max, period = cpu_max.split.map(&:to_f) - max / period - elsif File.exist?("/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us") - # cgroups v1: https://kernel.googlesource.com/pub/scm/linux/kernel/git/glommer/memcg/+/cpu_stat/Documentation/cgroups/cpu.txt - max = File.read("/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us").to_i - # If the cpu.cfs_quota_us is -1, cgroup does not adhere to any CPU time restrictions - # https://docs.kernel.org/scheduler/sched-bwc.html#management - return nil if max <= 0 - period = File.read("/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us").to_f - max / period - end - end - end - - def compute_cpu_shares - if RbConfig::CONFIG["target_os"].include?("linux") - if File.exist?("/sys/fs/cgroup/cpu.weight") - # cgroups v2: https://docs.kernel.org/admin-guide/cgroup-v2.html#cpu-interface-files - # Ref: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2254-cgroup-v2#phase-1-convert-from-cgroups-v1-settings-to-v2 - weight = File.read("/sys/fs/cgroup/cpu.weight").to_f - ((((weight - 1) * 262142) / 9999) + 2) / 1024 - elsif File.exist?("/sys/fs/cgroup/cpu/cpu.shares") - # cgroups v1: https://kernel.googlesource.com/pub/scm/linux/kernel/git/glommer/memcg/+/cpu_stat/Documentation/cgroups/cpu.txt - File.read("/sys/fs/cgroup/cpu/cpu.shares").to_f / 1024 - end - end - end - end - end - - # create the default ProcessorCounter on load - @processor_counter = Utility::ProcessorCounter.new - singleton_class.send :attr_reader, :processor_counter - - # Number of processors seen by the OS and used for process scheduling. For - # performance reasons the calculated value will be memoized on the first - # call. - # - # When running under JRuby the Java runtime call - # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According - # to the Java documentation this "value may change during a particular - # invocation of the virtual machine... [applications] should therefore - # occasionally poll this property." We still memoize this value once under - # JRuby. - # - # Otherwise Ruby's Etc.nprocessors will be used. - # - # @return [Integer] number of processors seen by the OS or Java runtime - # - # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() - def self.processor_count - processor_counter.processor_count - end - - # Number of physical processor cores on the current system. For performance - # reasons the calculated value will be memoized on the first call. - # - # On Windows the Win32 API will be queried for the `NumberOfCores from - # Win32_Processor`. This will return the total number "of cores for the - # current instance of the processor." On Unix-like operating systems either - # the `hwprefs` or `sysctl` utility will be called in a subshell and the - # returned value will be used. In the rare case where none of these methods - # work or an exception is raised the function will simply return 1. - # - # @return [Integer] number physical processor cores on the current system - # - # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb - # - # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx - # @see http://www.unix.com/man-page/osx/1/HWPREFS/ - # @see http://linux.die.net/man/8/sysctl - def self.physical_processor_count - processor_counter.physical_processor_count - end - - # Number of processors cores available for process scheduling. - # This method takes in account the CPU quota if the process is inside a cgroup with a - # dedicated CPU quota (typically Docker). - # Otherwise it returns the same value as #processor_count but as a Float. - # - # For performance reasons the calculated value will be memoized on the first - # call. - # - # @return [Float] number of available processors - def self.available_processor_count - processor_counter.available_processor_count - end - - # The maximum number of processors cores available for process scheduling. - # Returns `nil` if there is no enforced limit, or a `Float` if the - # process is inside a cgroup with a dedicated CPU quota (typically Docker). - # - # Note that nothing prevents setting a CPU quota higher than the actual number of - # cores on the system. - # - # For performance reasons the calculated value will be memoized on the first - # call. - # - # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set - def self.cpu_quota - processor_counter.cpu_quota - end - - # The CPU shares requested by the process. For performance reasons the calculated - # value will be memoized on the first call. - # - # @return [Float, nil] CPU shares requested by the process, or nil if not set - def self.cpu_shares - processor_counter.cpu_shares - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/version.rb b/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/version.rb deleted file mode 100644 index f773e44f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Concurrent - VERSION = '1.3.5' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/Changes.md b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/Changes.md deleted file mode 100644 index 8f077fc6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/Changes.md +++ /dev/null @@ -1,185 +0,0 @@ -# connection_pool Changelog - -2.5.3 ------- - -- Fix TruffleRuby/JRuby crash [#201] - -2.5.2 ------- - -- Rollback inadvertant change to `auto_reload_after_fork` default. [#200] - -2.5.1 ------- - -- Pass options to TimedStack in `checkout` [#195] -- Optimize connection lookup [#196] -- Fixes for use with Ractors - -2.5.0 ------- - -- Reap idle connections [#187] -```ruby -idle_timeout = 60 -pool = ConnectionPool.new ... -pool.reap(idle_timeout, &:close) -``` -- `ConnectionPool#idle` returns the count of connections not in use [#187] - -2.4.1 ------- - -- New `auto_reload_after_fork` config option to disable auto-drop [#177, shayonj] - -2.4.0 ------- - -- Automatically drop all connections after fork [#166] - -2.3.0 ------- - -- Minimum Ruby version is now 2.5.0 -- Add pool size to TimeoutError message - -2.2.5 ------- - -- Fix argument forwarding on Ruby 2.7 [#149] - -2.2.4 ------- - -- Add `reload` to close all connections, recreating them afterwards [Andrew Marshall, #140] -- Add `then` as a way to use a pool or a bare connection with the same code path [#138] - -2.2.3 ------- - -- Pool now throws `ConnectionPool::TimeoutError` on timeout. [#130] -- Use monotonic clock present in all modern Rubies [Tero Tasanen, #109] -- Remove code hacks necessary for JRuby 1.7 -- Expose wrapped pool from ConnectionPool::Wrapper [Thomas Lecavelier, #113] - -2.2.2 ------- - -- Add pool `size` and `available` accessors for metrics and monitoring - purposes [#97, robholland] - -2.2.1 ------- - -- Allow CP::Wrapper to use an existing pool [#87, etiennebarrie] -- Use monotonic time for more accurate timeouts [#84, jdantonio] - -2.2.0 ------- - -- Rollback `Timeout` handling introduced in 2.1.1 and 2.1.2. It seems - impossible to safely work around the issue. Please never, ever use - `Timeout.timeout` in your code or you will see rare but mysterious bugs. [#75] - -2.1.3 ------- - -- Don't increment created count until connection is successfully - created. [mylesmegyesi, #73] - -2.1.2 ------- - -- The connection\_pool will now close any connections which respond to - `close` (Dalli) or `disconnect!` (Redis). This ensures discarded connections - from the fix in 2.1.1 are torn down ASAP and don't linger open. - - -2.1.1 ------- - -- Work around a subtle race condition with code which uses `Timeout.timeout` and - checks out a connection within the timeout block. This might cause - connections to get into a bad state and raise very odd errors. [tamird, #67] - - -2.1.0 ------- - -- Refactoring to better support connection pool subclasses [drbrain, - #55] -- `with` should return value of the last expression [#59] - - -2.0.0 ------ - -- The connection pool is now lazy. Connections are created as needed - and retained until the pool is shut down. [drbrain, #52] - -1.2.0 ------ - -- Add `with(options)` and `checkout(options)`. [mattcamuto] - Allows the caller to override the pool timeout. -```ruby -@pool.with(:timeout => 2) do |conn| -end -``` - -1.1.0 ------ - -- New `#shutdown` method (simao) - - This method accepts a block and calls the block for each - connection in the pool. After calling this method, trying to get a - connection from the pool raises `PoolShuttingDownError`. - -1.0.0 ------ - -- `#with_connection` is now gone in favor of `#with`. - -- We no longer pollute the top level namespace with our internal -`TimedStack` class. - -0.9.3 --------- - -- `#with_connection` is now deprecated in favor of `#with`. - - A warning will be issued in the 0.9 series and the method will be - removed in 1.0. - -- We now reuse objects when possible. - - This means that under no contention, the same object will be checked - out from the pool after subsequent calls to `ConnectionPool#with`. - - This change should have no impact on end user performance. If - anything, it should be an improvement, depending on what objects you - are pooling. - -0.9.2 --------- - -- Fix reentrant checkout leading to early checkin. - -0.9.1 --------- - -- Fix invalid superclass in version.rb - -0.9.0 --------- - -- Move method\_missing magic into ConnectionPool::Wrapper (djanowski) -- Remove BasicObject superclass (djanowski) - -0.1.0 --------- - -- More precise timeouts and better error message -- ConnectionPool now subclasses BasicObject so `method_missing` is more effective. diff --git a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/LICENSE b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/LICENSE deleted file mode 100644 index 7673cbfb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2011 Mike Perham - -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/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/README.md b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/README.md deleted file mode 100644 index 804929c9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/README.md +++ /dev/null @@ -1,167 +0,0 @@ -connection\_pool -================= -[![Build Status](https://github.com/mperham/connection_pool/actions/workflows/ci.yml/badge.svg)](https://github.com/mperham/connection_pool/actions/workflows/ci.yml) - -Generic connection pooling for Ruby. - -MongoDB has its own connection pool. -ActiveRecord has its own connection pool. -This is a generic connection pool that can be used with anything, e.g. Redis, Dalli and other Ruby network clients. - -Usage ------ - -Create a pool of objects to share amongst the fibers or threads in your Ruby application: - -``` ruby -$memcached = ConnectionPool.new(size: 5, timeout: 5) { Dalli::Client.new } -``` - -Then use the pool in your application: - -``` ruby -$memcached.with do |conn| - conn.get('some-count') -end -``` - -If all the objects in the connection pool are in use, `with` will block -until one becomes available. -If no object is available within `:timeout` seconds, -`with` will raise a `ConnectionPool::TimeoutError` (a subclass of `Timeout::Error`). - -You can also use `ConnectionPool#then` to support _both_ a -connection pool and a raw client. - -```ruby -# Compatible with a raw Redis::Client, and ConnectionPool Redis -$redis.then { |r| r.set 'foo' 'bar' } -``` - -Optionally, you can specify a timeout override using the with-block semantics: - -``` ruby -$memcached.with(timeout: 2.0) do |conn| - conn.get('some-count') -end -``` - -This will only modify the resource-get timeout for this particular -invocation. -This is useful if you want to fail-fast on certain non-critical -sections when a resource is not available, or conversely if you are comfortable blocking longer on a particular resource. -This is not implemented in the `ConnectionPool::Wrapper` class. - -## Migrating to a Connection Pool - -You can use `ConnectionPool::Wrapper` to wrap a single global connection, making it easier to migrate existing connection code over time: - -``` ruby -$redis = ConnectionPool::Wrapper.new(size: 5, timeout: 3) { Redis.new } -$redis.sadd('foo', 1) -$redis.smembers('foo') -``` - -The wrapper uses `method_missing` to checkout a connection, run the requested method and then immediately check the connection back into the pool. -It's **not** high-performance so you'll want to port your performance sensitive code to use `with` as soon as possible. - -``` ruby -$redis.with do |conn| - conn.sadd('foo', 1) - conn.smembers('foo') -end -``` - -Once you've ported your entire system to use `with`, you can simply remove `Wrapper` and use the simpler and faster `ConnectionPool`. - - -## Shutdown - -You can shut down a ConnectionPool instance once it should no longer be used. -Further checkout attempts will immediately raise an error but existing checkouts will work. - -```ruby -cp = ConnectionPool.new { Redis.new } -cp.shutdown { |c| c.close } -``` - -Shutting down a connection pool will block until all connections are checked in and closed. -**Note that shutting down is completely optional**; Ruby's garbage collector will reclaim unreferenced pools under normal circumstances. - -## Reload - -You can reload a ConnectionPool instance in the case it is desired to close all connections to the pool and, unlike `shutdown`, afterwards recreate connections so the pool may continue to be used. -Reloading may be useful after forking the process. - -```ruby -cp = ConnectionPool.new { Redis.new } -cp.reload { |conn| conn.quit } -cp.with { |conn| conn.get('some-count') } -``` - -Like `shutdown`, this will block until all connections are checked in and closed. - -## Reap - -You can reap idle connections in the ConnectionPool instance to close connections that were created but have not been used for a certain amount of time. This can be useful to run periodically in a separate thread especially if keeping the connection open is resource intensive. - -You can specify how many seconds the connections have to be idle for them to be reaped. -Defaults to 60 seconds. - -```ruby -cp = ConnectionPool.new { Redis.new } -cp.reap(300) { |conn| conn.close } # Reaps connections that have been idle for 300 seconds (5 minutes). -``` - -### Reaper Thread - -You can start your own reaper thread to reap idle connections in the ConnectionPool instance on a regular interval. - -```ruby -cp = ConnectionPool.new { Redis.new } - -# Start a reaper thread to reap connections that have been idle for 300 seconds (5 minutes). -Thread.new do - loop do - cp.reap(300) { |conn| conn.close } - sleep 300 - end -end -``` - -## Current State - -There are several methods that return information about a pool. - -```ruby -cp = ConnectionPool.new(size: 10) { Redis.new } -cp.size # => 10 -cp.available # => 10 -cp.idle # => 0 - -cp.with do |conn| - cp.size # => 10 - cp.available # => 9 - cp.idle # => 0 -end - -cp.idle # => 1 -``` - -Notes ------ - -- Connections are lazily created as needed. -- There is no provision for repairing or checking the health of a connection; - connections should be self-repairing. This is true of the Dalli and Redis - clients. -- **WARNING**: Don't ever use `Timeout.timeout` in your Ruby code or you will see - occasional silent corruption and mysterious errors. The Timeout API is unsafe - and cannot be used correctly, ever. Use proper socket timeout options as - exposed by Net::HTTP, Redis, Dalli, etc. - - -Author ------- - -Mike Perham, [@getajobmike](https://twitter.com/getajobmike), diff --git a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/connection_pool.gemspec b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/connection_pool.gemspec deleted file mode 100644 index 32289f25..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/connection_pool.gemspec +++ /dev/null @@ -1,24 +0,0 @@ -require "./lib/connection_pool/version" - -Gem::Specification.new do |s| - s.name = "connection_pool" - s.version = ConnectionPool::VERSION - s.platform = Gem::Platform::RUBY - s.authors = ["Mike Perham", "Damian Janowski"] - s.email = ["mperham@gmail.com", "damian@educabilia.com"] - s.homepage = "https://github.com/mperham/connection_pool" - s.description = s.summary = "Generic connection pool for Ruby" - - s.files = ["Changes.md", "LICENSE", "README.md", "connection_pool.gemspec", - "lib/connection_pool.rb", "lib/connection_pool/timed_stack.rb", - "lib/connection_pool/version.rb", "lib/connection_pool/wrapper.rb"] - s.executables = [] - s.require_paths = ["lib"] - s.license = "MIT" - s.add_development_dependency "bundler" - s.add_development_dependency "minitest", ">= 5.0.0" - s.add_development_dependency "rake" - s.required_ruby_version = ">= 2.5.0" - - s.metadata = {"changelog_uri" => "https://github.com/mperham/connection_pool/blob/main/Changes.md", "rubygems_mfa_required" => "true"} -end diff --git a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool.rb b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool.rb deleted file mode 100644 index 081d8bdf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool.rb +++ /dev/null @@ -1,184 +0,0 @@ -require "timeout" -require_relative "connection_pool/version" - -class ConnectionPool - class Error < ::RuntimeError; end - - class PoolShuttingDownError < ::ConnectionPool::Error; end - - class TimeoutError < ::Timeout::Error; end -end - -# Generic connection pool class for sharing a limited number of objects or network connections -# among many threads. Note: pool elements are lazily created. -# -# Example usage with block (faster): -# -# @pool = ConnectionPool.new { Redis.new } -# @pool.with do |redis| -# redis.lpop('my-list') if redis.llen('my-list') > 0 -# end -# -# Using optional timeout override (for that single invocation) -# -# @pool.with(timeout: 2.0) do |redis| -# redis.lpop('my-list') if redis.llen('my-list') > 0 -# end -# -# Example usage replacing an existing connection (slower): -# -# $redis = ConnectionPool.wrap { Redis.new } -# -# def do_work -# $redis.lpop('my-list') if $redis.llen('my-list') > 0 -# end -# -# Accepts the following options: -# - :size - number of connections to pool, defaults to 5 -# - :timeout - amount of time to wait for a connection if none currently available, defaults to 5 seconds -# - :auto_reload_after_fork - automatically drop all connections after fork, defaults to true -# -class ConnectionPool - DEFAULTS = {size: 5, timeout: 5, auto_reload_after_fork: true}.freeze - - def self.wrap(options, &block) - Wrapper.new(options, &block) - end - - if Process.respond_to?(:fork) - INSTANCES = ObjectSpace::WeakMap.new - private_constant :INSTANCES - - def self.after_fork - INSTANCES.values.each do |pool| - next unless pool.auto_reload_after_fork - - # We're on after fork, so we know all other threads are dead. - # All we need to do is to ensure the main thread doesn't have a - # checked out connection - pool.checkin(force: true) - pool.reload do |connection| - # Unfortunately we don't know what method to call to close the connection, - # so we try the most common one. - connection.close if connection.respond_to?(:close) - end - end - nil - end - - if ::Process.respond_to?(:_fork) # MRI 3.1+ - module ForkTracker - def _fork - pid = super - if pid == 0 - ConnectionPool.after_fork - end - pid - end - end - Process.singleton_class.prepend(ForkTracker) - end - else - INSTANCES = nil - private_constant :INSTANCES - - def self.after_fork - # noop - end - end - - def initialize(options = {}, &block) - raise ArgumentError, "Connection pool requires a block" unless block - - options = DEFAULTS.merge(options) - - @size = Integer(options.fetch(:size)) - @timeout = options.fetch(:timeout) - @auto_reload_after_fork = options.fetch(:auto_reload_after_fork) - - @available = TimedStack.new(@size, &block) - @key = :"pool-#{@available.object_id}" - @key_count = :"pool-#{@available.object_id}-count" - INSTANCES[self] = self if @auto_reload_after_fork && INSTANCES - end - - def with(options = {}) - Thread.handle_interrupt(Exception => :never) do - conn = checkout(options) - begin - Thread.handle_interrupt(Exception => :immediate) do - yield conn - end - ensure - checkin - end - end - end - alias_method :then, :with - - def checkout(options = {}) - if ::Thread.current[@key] - ::Thread.current[@key_count] += 1 - ::Thread.current[@key] - else - ::Thread.current[@key_count] = 1 - ::Thread.current[@key] = @available.pop(options[:timeout] || @timeout, options) - end - end - - def checkin(force: false) - if ::Thread.current[@key] - if ::Thread.current[@key_count] == 1 || force - @available.push(::Thread.current[@key]) - ::Thread.current[@key] = nil - ::Thread.current[@key_count] = nil - else - ::Thread.current[@key_count] -= 1 - end - elsif !force - raise ConnectionPool::Error, "no connections are checked out" - end - - nil - end - - ## - # Shuts down the ConnectionPool by passing each connection to +block+ and - # then removing it from the pool. Attempting to checkout a connection after - # shutdown will raise +ConnectionPool::PoolShuttingDownError+. - def shutdown(&block) - @available.shutdown(&block) - end - - ## - # Reloads the ConnectionPool by passing each connection to +block+ and then - # removing it the pool. Subsequent checkouts will create new connections as - # needed. - def reload(&block) - @available.shutdown(reload: true, &block) - end - - ## Reaps idle connections that have been idle for over +idle_seconds+. - # +idle_seconds+ defaults to 60. - def reap(idle_seconds = 60, &block) - @available.reap(idle_seconds, &block) - end - - # Size of this connection pool - attr_reader :size - # Automatically drop all connections after fork - attr_reader :auto_reload_after_fork - - # Number of pool entries available for checkout at this instant. - def available - @available.length - end - - # Number of pool entries created and idle in the pool. - def idle - @available.idle - end -end - -require_relative "connection_pool/timed_stack" -require_relative "connection_pool/wrapper" diff --git a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/timed_stack.rb b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/timed_stack.rb deleted file mode 100644 index 189431ee..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/timed_stack.rb +++ /dev/null @@ -1,221 +0,0 @@ -## -# The TimedStack manages a pool of homogeneous connections (or any resource -# you wish to manage). Connections are created lazily up to a given maximum -# number. -# -# Examples: -# -# ts = TimedStack.new(1) { MyConnection.new } -# -# # fetch a connection -# conn = ts.pop -# -# # return a connection -# ts.push conn -# -# conn = ts.pop -# ts.pop timeout: 5 -# #=> raises ConnectionPool::TimeoutError after 5 seconds -class ConnectionPool::TimedStack - attr_reader :max - - ## - # Creates a new pool with +size+ connections that are created from the given - # +block+. - def initialize(size = 0, &block) - @create_block = block - @created = 0 - @que = [] - @max = size - @mutex = Thread::Mutex.new - @resource = Thread::ConditionVariable.new - @shutdown_block = nil - end - - ## - # Returns +obj+ to the stack. +options+ is ignored in TimedStack but may be - # used by subclasses that extend TimedStack. - def push(obj, options = {}) - @mutex.synchronize do - if @shutdown_block - @created -= 1 unless @created == 0 - @shutdown_block.call(obj) - else - store_connection obj, options - end - - @resource.broadcast - end - end - alias_method :<<, :push - - ## - # Retrieves a connection from the stack. If a connection is available it is - # immediately returned. If no connection is available within the given - # timeout a ConnectionPool::TimeoutError is raised. - # - # +:timeout+ is the only checked entry in +options+ and is preferred over - # the +timeout+ argument (which will be removed in a future release). Other - # options may be used by subclasses that extend TimedStack. - def pop(timeout = 0.5, options = {}) - options, timeout = timeout, 0.5 if Hash === timeout - timeout = options.fetch :timeout, timeout - - deadline = current_time + timeout - @mutex.synchronize do - loop do - raise ConnectionPool::PoolShuttingDownError if @shutdown_block - if (conn = try_fetch_connection(options)) - return conn - end - - connection = try_create(options) - return connection if connection - - to_wait = deadline - current_time - raise ConnectionPool::TimeoutError, "Waited #{timeout} sec, #{length}/#{@max} available" if to_wait <= 0 - @resource.wait(@mutex, to_wait) - end - end - end - - ## - # Shuts down the TimedStack by passing each connection to +block+ and then - # removing it from the pool. Attempting to checkout a connection after - # shutdown will raise +ConnectionPool::PoolShuttingDownError+ unless - # +:reload+ is +true+. - def shutdown(reload: false, &block) - raise ArgumentError, "shutdown must receive a block" unless block - - @mutex.synchronize do - @shutdown_block = block - @resource.broadcast - - shutdown_connections - @shutdown_block = nil if reload - end - end - - ## - # Reaps connections that were checked in more than +idle_seconds+ ago. - def reap(idle_seconds, &block) - raise ArgumentError, "reap must receive a block" unless block - raise ArgumentError, "idle_seconds must be a number" unless idle_seconds.is_a?(Numeric) - raise ConnectionPool::PoolShuttingDownError if @shutdown_block - - idle.times do - conn = - @mutex.synchronize do - raise ConnectionPool::PoolShuttingDownError if @shutdown_block - - reserve_idle_connection(idle_seconds) - end - break unless conn - - block.call(conn) - end - end - - ## - # Returns +true+ if there are no available connections. - def empty? - (@created - @que.length) >= @max - end - - ## - # The number of connections available on the stack. - def length - @max - @created + @que.length - end - - ## - # The number of connections created and available on the stack. - def idle - @que.length - end - - private - - def current_time - Process.clock_gettime(Process::CLOCK_MONOTONIC) - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # This method must returns a connection from the stack if one exists. Allows - # subclasses with expensive match/search algorithms to avoid double-handling - # their stack. - def try_fetch_connection(options = nil) - connection_stored?(options) && fetch_connection(options) - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # This method must returns true if a connection is available on the stack. - def connection_stored?(options = nil) - !@que.empty? - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # This method must return a connection from the stack. - def fetch_connection(options = nil) - @que.pop&.first - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # This method must shut down all connections on the stack. - def shutdown_connections(options = nil) - while (conn = try_fetch_connection(options)) - @created -= 1 unless @created == 0 - @shutdown_block.call(conn) - end - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # This method returns the oldest idle connection if it has been idle for more than idle_seconds. - # This requires that the stack is kept in order of checked in time (oldest first). - def reserve_idle_connection(idle_seconds) - return unless idle_connections?(idle_seconds) - - @created -= 1 unless @created == 0 - - @que.shift.first - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # Returns true if the first connection in the stack has been idle for more than idle_seconds - def idle_connections?(idle_seconds) - connection_stored? && (current_time - @que.first.last > idle_seconds) - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # This method must return +obj+ to the stack. - def store_connection(obj, options = nil) - @que.push [obj, current_time] - end - - ## - # This is an extension point for TimedStack and is called with a mutex. - # - # This method must create a connection if and only if the total number of - # connections allowed has not been met. - def try_create(options = nil) - unless @created == @max - object = @create_block.call - @created += 1 - object - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/version.rb b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/version.rb deleted file mode 100644 index 02620939..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ConnectionPool - VERSION = "2.5.3" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/wrapper.rb b/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/wrapper.rb deleted file mode 100644 index 8630bee3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/connection_pool-2.5.3/lib/connection_pool/wrapper.rb +++ /dev/null @@ -1,56 +0,0 @@ -class ConnectionPool - class Wrapper < ::BasicObject - METHODS = [:with, :pool_shutdown, :wrapped_pool] - - def initialize(options = {}, &block) - @pool = options.fetch(:pool) { ::ConnectionPool.new(options, &block) } - end - - def wrapped_pool - @pool - end - - def with(&block) - @pool.with(&block) - end - - def pool_shutdown(&block) - @pool.shutdown(&block) - end - - def pool_size - @pool.size - end - - def pool_available - @pool.available - end - - def respond_to?(id, *args) - METHODS.include?(id) || with { |c| c.respond_to?(id, *args) } - end - - # rubocop:disable Style/MissingRespondToMissing - if ::RUBY_VERSION >= "3.0.0" - def method_missing(name, *args, **kwargs, &block) - with do |connection| - connection.send(name, *args, **kwargs, &block) - end - end - elsif ::RUBY_VERSION >= "2.7.0" - ruby2_keywords def method_missing(name, *args, &block) - with do |connection| - connection.send(name, *args, &block) - end - end - else - def method_missing(name, *args, &block) - with do |connection| - connection.send(name, *args, &block) - end - end - end - # rubocop:enable Style/MethodMissingSuper - # rubocop:enable Style/MissingRespondToMissing - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/bake/console.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/bake/console.rb deleted file mode 100644 index 6f045d80..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/bake/console.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2020-2024, by Samuel Williams. - -# Increase the verbosity of the logger to info. -def info - require_relative "../lib/console" - - Console.logger.info! -end - -# Increase the verbosity of the logger to debug. -def debug - require_relative "../lib/console" - - Console.logger.debug! -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console.rb deleted file mode 100644 index 3647491b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. -# Copyright, 2019, by Bryan Powell. -# Copyright, 2020, by Michael Adams. -# Copyright, 2021, by Cédric Boutillier. - -require_relative "console/version" -require_relative "console/interface" - -# @namespace -module Console - Console.extend(Interface) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/adapter.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/adapter.rb deleted file mode 100644 index b483ae18..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/adapter.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2023-2024, by Samuel Williams. - -module Console - # This namespace is reserved for logging adapters provided by other gems. - module Adapter - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/capture.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/capture.rb deleted file mode 100644 index 66c117a0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/capture.rb +++ /dev/null @@ -1,125 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -require_relative "filter" -require_relative "output/failure" - -module Console - # A buffer which captures all logged messages into a buffer. - class Capture - # Create a new log capture buffer. - def initialize - @records = [] - @verbose = false - end - - # @attribute [Array(Hash)] All records captured by this buffer. - attr :records - - # @deprecated Use {#records} instead of {#buffer}. - alias buffer records - - alias to_a records - - # @attribute [Boolean] If true, the buffer will capture verbose messages. - attr :verbose - - # Whether the buffer includes any records with the given subject or message pattern. - # - # @returns [Boolean] True if the buffer includes any records with the given pattern. - def include?(pattern) - @records.any? do |record| - record[:subject].to_s&.match?(pattern) or record[:message].to_s&.match?(pattern) - end - end - - # Iterate over all records in the buffer. - # - # @yields {|record| ...} each record in the buffer. - # @parameter record [Hash] The record itself. - def each(&block) - @records.each(&block) - end - - include Enumerable - - # @returns [Hash] The first record in the buffer. - def first - @records.first - end - - # @returns [Hash] The last record in the buffer. - def last - @records.last - end - - # Clear all records from the buffer. - def clear - @records.clear - end - - # @returns [Boolean] True if the buffer is empty. - def empty? - @records.empty? - end - - # Sets the verbose flag which controls whether verbose messages are captured. - def verbose!(value = true) - @verbose = value - end - - # @returns [Boolean] True if the buffer is capturing verbose messages. - def verbose? - @verbose - end - - # Record a log message in the buffer. - # - # @parameter subject [Object] The subject of the log message. - # @parameter arguments [Array] The arguments to the log message. - # @parameter severity [Symbol] The severity of the log message. - # @parameter event [Event] The event associated with the log message. - # @parameter options [Hash] Additional options to pass to the log message. - # @yields {|buffer| ...} A block which can be used to write additional information to the log message. - # @parameter buffer [IO] The (optional) buffer to write to. - def call(subject = nil, *arguments, severity: UNKNOWN, event: nil, **options, &block) - record = { - time: ::Time.now.iso8601, - severity: severity, - **options, - } - - if subject - record[:subject] = subject - end - - if event - record[:event] = event.to_hash - end - - if arguments.any? - record[:arguments] = arguments - end - - if annotation = Fiber.current.annotation - record[:annotation] = annotation - end - - if block_given? - if block.arity.zero? - record[:message] = yield - else - buffer = StringIO.new - yield buffer - record[:message] = buffer.string - end - else - record[:message] = arguments.join(" ") - end - - @records << record - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/clock.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/clock.rb deleted file mode 100644 index 4d139826..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/clock.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2021-2025, by Samuel Williams. - -module Console - # A simple clock utility for tracking and formatting time. - module Clock - # Format a duration in seconds as a human readable string. - # - # @parameter duration [Numeric] The duration in seconds. - # @returns [String] The formatted duration. - def self.formatted_duration(duration) - if duration < 60.0 - return "#{duration.round(2)}s" - end - - duration /= 60.0 - - if duration < 60.0 - return "#{duration.floor}m" - end - - duration /= 60.0 - - if duration < 24.0 - return "#{duration.floor}h" - end - - duration /= 24.0 - - return "#{duration.floor}d" - end - - # @returns [Time] The current monotonic time. - def self.now - ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/compatible/logger.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/compatible/logger.rb deleted file mode 100644 index ce7ca2a3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/compatible/logger.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022-2025, by Samuel Williams. - -require "logger" - -module Console - # @namespace - module Compatible - # A compatible interface for {::Logger} which can be used with {Console}. - class Logger < ::Logger - # A compatible log device which can be used with {Console}. Suitable for use with code which (incorrectly) assumes that the log device a public interface and has certain methods/behaviours. - class LogDevice - # Create a new log device. - # - # @parameter subject [String] The subject of the log messages. - # @parameter output [Console::Interface] The output interface. - def initialize(subject, output) - @subject = subject - @output = output - end - - # Write a message to the log device. - # - # @parameter message [String] The message to write. - def write(message) - @output.call(@subject, message) - end - - # Log a message with the given severity. - # - # @paraemter arguments [Array] The arguments to log. - # @parameter options [Hash] Additional options. - def call(*arguments, **options) - @output.call(*arguments, **options) - end - - # Reopen the log device. This is a no-op. - def reopen - end - - # Close the log device. This is a no-op. - def close - end - end - - # Create a new (compatible) logger. - # - # @parameter subject [String] The subject of the log messages. - # @parameter output [Console::Interface] The output interface. - def initialize(subject, output = Console) - super(nil) - - @progname = subject - @logdev = LogDevice.new(subject, output) - end - - # Log a message with the given severity. - # - # @parameter severity [Integer] The severity of the message. - # @parameter message [String] The message to log. - # @parameter progname [String] The program name. - # @returns [Boolean] True if the message was logged. - def add(severity, message = nil, progname = nil) - severity ||= UNKNOWN - - if @logdev.nil? or severity < level - return true - end - - if progname.nil? - progname = @progname - end - - if message.nil? - if block_given? - message = yield - else - message = progname - progname = @progname - end - end - - @logdev.call( - progname, message, - severity: format_severity(severity) - ) - - return true - end - - # Format the severity. - # - # @parameter value [Integer] The severity value. - # @returns [Symbol] The formatted severity. - def format_severity(value) - super.downcase.to_sym - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/config.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/config.rb deleted file mode 100644 index 28c5d91c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/config.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2025, by Samuel Williams. - -require_relative "filter" -require_relative "event" -require_relative "resolver" -require_relative "output" -require_relative "logger" - -module Console - # Represents a configuration for the traces library. - class Config - PATH = ENV.fetch("CONSOLE_CONFIG_PATH", "config/console.rb") - - # Load the configuration from the given path. - # @parameter path [String] The path to the configuration file. - # @returns [Config] The loaded configuration. - def self.load(path) - config = self.new - - if File.exist?(path) - config.instance_eval(File.read(path), path) - end - - return config - end - - # Load the default configuration. - # @returns [Config] The default configuration. - def self.default - @default ||= self.load(PATH).freeze - end - - # Set the default log level based on `$DEBUG` and `$VERBOSE`. - # You can also specify CONSOLE_LEVEL=debug or CONSOLE_LEVEL=info in environment. - # https://mislav.net/2011/06/ruby-verbose-mode/ has more details about how it all fits together. - # - # @parameter env [Hash] The environment to read the log level from. - # @returns [Integer | Symbol] The default log level. - def log_level(env = ENV) - Logger.default_log_level(env) - end - - # Controls verbose output using `$VERBOSE`. - def verbose?(env = ENV) - !$VERBOSE.nil? || env["CONSOLE_VERBOSE"] - end - - # Create an output with the given output and options. - # - # @parameter output [IO] The output to write log messages to. - # @parameter env [Hash] The environment to read configuration from. - # @parameter options [Hash] Additional options to pass to the output. - # @returns [Output] The created output. - def make_output(io = nil, env = ENV, **options) - Output.new(io, env, **options) - end - - # Create a resolver with the given logger. - # - # @parameter logger [Logger] The logger to set the log levels on. - # @returns [Resolver | Nil] The created resolver. - def make_resolver(logger) - Resolver.default_resolver(logger) - end - - # Create a logger with the given output and options. - # - # @parameter output [IO] The output to write log messages to. - # @parameter env [Hash] The environment to read configuration from. - # @parameter options [Hash] Additional options to pass to the logger. - # @returns [Logger] The created logger. - def make_logger(io = $stderr, env = ENV, **options) - if options[:verbose].nil? - options[:verbose] = self.verbose?(env) - end - - if options[:level].nil? - options[:level] = self.log_level(env) - end - - output = self.make_output(io, env, **options) - - logger = Logger.new(output, **options) - - make_resolver(logger) - - return logger - end - - # Load the default configuration. - DEFAULT = self.default - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event.rb deleted file mode 100644 index a1e20455..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -require_relative "event/spawn" -require_relative "event/failure" - -module Console - # Structured event logging. - module Event - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/failure.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/failure.rb deleted file mode 100644 index 2d571d2d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/failure.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. -# Copyright, 2021, by Robert Schulze. -# Copyright, 2024, by Patrik Wenger. - -require_relative "generic" - -module Console - module Event - # Represents a failure of some kind, usually with an attached exception. - # - # ```ruby - # begin - # raise "Something went wrong!" - # rescue => exception - # Console::Event::Failure.log("Something went wrong!", exception) - # end - # ``` - # - # Generally, you should use the {Console.error} method to log failures, as it will automatically create a failure event for you. - class Failure < Generic - # For the purpose of efficiently formatting backtraces, we need to know the root directory of the project. - # - # @returns [String | Nil] The root directory of the project, or nil if it could not be determined. - def self.default_root - Dir.getwd - rescue # e.g. Errno::EMFILE - nil - end - - # Create a new failure event for the given exception. - # - # @parameter exception [Exception] The exception to log. - def self.for(exception) - self.new(exception, self.default_root) - end - - # Log a failure event with the given exception. - # - # @parameter subject [String] The subject of the log message. - # @parameter exception [Exception] The exception to log. - # @parameter options [Hash] Additional options pass to the logger output. - def self.log(subject, exception, **options) - Console.error(subject, **self.for(exception).to_hash, **options) - end - - # @attribute [Exception] The exception which caused the failure. - attr_reader :exception - - # Create a new failure event for the given exception. - # - # @parameter exception [Exception] The exception to log. - # @parameter root [String] The root directory of the project. - def initialize(exception, root = self.class.default_root) - @exception = exception - @root = root - end - - # Convert the failure event to a hash. - # - # @returns [Hash] The hash representation of the failure event. - def to_hash - Hash.new.tap do |hash| - hash[:type] = :failure - hash[:root] = @root if @root - extract(@exception, hash) - end - end - - # Log the failure event. - # - # @parameter arguments [Array] The arguments to log. - # @parameter options [Hash] Additional options to pass to the logger output. - def emit(*arguments, **options) - options[:severity] ||= :error - - super - end - - private - - def extract(exception, hash) - hash[:class] = exception.class.name - - if exception.respond_to?(:detailed_message) - message = exception.detailed_message - - # We want to remove the trailling exception class as we format it differently: - message.sub!(/\s*\(.*?\)$/, "") - - hash[:message] = message - else - hash[:message] = exception.message - end - - hash[:backtrace] = exception.backtrace - - if cause = exception.cause - hash[:cause] = Hash.new.tap do |cause_hash| - extract(cause, cause_hash) - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/generic.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/generic.rb deleted file mode 100644 index 53eeed29..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/generic.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -module Console - module Event - # A generic event which can be used to represent structured data. - class Generic - # Convert the event to a hash suitable for JSON serialization. - # - # @returns [Hash] The hash representation of the event. - def to_hash - {} - end - - # Convert the event to a hash suitable for JSON serialization. - # - # @returns [Hash] The hash representation of the event. - def as_json(...) - to_hash - end - - # Serialize the event to JSON. - # - # @returns [String] The JSON representation of the event. - def to_json(...) - JSON.generate(as_json, ...) - end - - # Convert the event to a string (JSON). - # - # @returns [String] The string representation of the event. - def to_s - to_json - end - - # Log the event using the given output interface. - # - # @parameter arguments [Array] The arguments to log. - # @parameter options [Hash] Additional options to pass to the logger output. - def emit(*arguments, **options) - Console.call(*arguments, event: self, **options) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/spawn.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/spawn.rb deleted file mode 100644 index 7004fc8f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/event/spawn.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -require_relative "generic" -require_relative "../clock" - -module Console - module Event - # Represents a child process spawn event. - # - # ```ruby - # Console.info(self, **Console::Event::Spawn.for("ls", "-l")) - # - # event = Console::Event::Spawn.for("ls", "-l") - # event.status = Process.wait - # ``` - class Spawn < Generic - # Create a new spawn event. - # - # @parameter arguments [Array] The arguments to the command, similar to how you would pass them to `Kernel.system` or `Process.spawn`. - # @parameter options [Hash] The options to pass to the command, similar to how you would pass them to `Kernel.system` or `Process.spawn`. - # @returns [Spawn] The new spawn event representing the command. - def self.for(*arguments, **options) - # Extract out the command environment: - if arguments.first.is_a?(Hash) - environment = arguments.shift - self.new(environment, arguments, options) - else - self.new(nil, arguments, options) - end - end - - # Create a new spawn event. - # - # @parameter environment [Hash] The environment to use when running the command. - # @parameter arguments [Array] The arguments used for command execution. - # @parameter options [Hash] The options to pass to the command, similar to how you would pass them to `Kernel.system` or `Process.spawn`. - def initialize(environment, arguments, options) - @environment = environment - @arguments = arguments - @options = options - - @start_time = Clock.now - - @end_time = nil - @status = nil - end - - # @attribute [Numeric] The start time of the command. - attr :start_time - - # @attribute [Numeric] The end time of the command. - attr :end_time - - # @attribute [Process::Status] The status of the command, if it has completed. - attr :status - - # Set the status of the command, and record the end time. - # - # @parameter status [Process::Status] The status of the command. - def status=(status) - @end_time = Time.now - @status = status - end - - # Calculate the duration of the command, if it has completed. - # - # @returns [Numeric] The duration of the command. - def duration - if @end_time - @end_time - @start_time - end - end - - # Convert the spawn event to a hash suitable for JSON serialization. - # - # @returns [Hash] The hash representation of the spawn event. - def to_hash - Hash.new.tap do |hash| - hash[:type] = :spawn - hash[:environment] = @environment if @environment&.any? - hash[:arguments] = @arguments if @arguments&.any? - hash[:options] = @options if @options&.any? - - hash[:status] = @status.to_i if @status - - if duration = self.duration - hash[:duration] = duration - end - end - end - - # Log the spawn event. - # - # @parameter arguments [Array] The arguments to log. - # @parameter options [Hash] Additional options to pass to the logger output. - def emit(*arguments, **options) - options[:severity] ||= :info - super - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/filter.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/filter.rb deleted file mode 100644 index 0883fa5c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/filter.rb +++ /dev/null @@ -1,225 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. -# Copyright, 2019, by Bryan Powell. -# Copyright, 2020, by Michael Adams. -# Copyright, 2021, by Robert Schulze. - -module Console - UNKNOWN = :unknown - - # A log filter which can be used to filter log messages based on severity, subject, and other criteria. - class Filter - if Object.const_defined?(:Ractor) and RUBY_VERSION >= "3.1" - # Define a method which can be shared between ractors. - def self.define_immutable_method(name, &block) - block = Ractor.make_shareable(block) - self.define_method(name, &block) - end - else - # Define a method. - def self.define_immutable_method(name, &block) - define_method(name, &block) - end - end - - # Create a new log filter with specific log levels. - # - # ```ruby - # class MyLogger < Console::Filter[debug: 0, okay: 1, bad: 2, terrible: 3] - # ``` - # - # @parameter levels [Hash(Symbol, Integer)] A hash of log levels. - def self.[] **levels - klass = Class.new(self) - minimum_level, maximum_level = levels.values.minmax - - klass.instance_exec do - const_set(:LEVELS, levels.freeze) - const_set(:MINIMUM_LEVEL, minimum_level) - const_set(:MAXIMUM_LEVEL, maximum_level) - - levels.each do |name, level| - const_set(name.to_s.upcase, level) - - define_immutable_method(name) do |subject = nil, *arguments, **options, &block| - if self.enabled?(subject, level) - @output.call(subject, *arguments, severity: name, **@options, **options, &block) - end - - return nil - end - - define_immutable_method("#{name}!") do - @level = level - end - - define_immutable_method("#{name}?") do - @level <= level - end - end - end - - return klass - end - - # Create a new log filter. - # - # @parameter output [Console::Output] The output destination. - # @parameter verbose [Boolean] Enable verbose output. - # @parameter level [Integer] The log level. - # @parameter options [Hash] Additional options. - def initialize(output, verbose: true, level: nil, **options) - @output = output - @verbose = verbose - - # Set the log level using the behaviour implemented in `level=`: - if level - self.level = level - else - @level = self.class::DEFAULT_LEVEL - end - - @subjects = {} - - @options = options - end - - # Create a new log filter with the given options, from an existing log filter. - # - # @parameter level [Integer] The log level. - # @parameter verbose [Boolean] Enable verbose output. - # @parameter options [Hash] Additional options. - # @returns [Console::Filter] The new log filter. - def with(level: @level, verbose: @verbose, **options) - dup.tap do |logger| - logger.level = level - logger.verbose! if verbose - logger.options = @options.merge(options) - end - end - - # @attribute [Console::Output] The output destination. - attr_accessor :output - - # @attribute [Boolean] Whether to enable verbose output. - attr :verbose - - # @attribute [Integer] The current log level. - attr :level - - # @attribute [Hash(Module, Integer)] The log levels for specific subject (classes). - attr :subjects - - # @attribute [Hash] Additional options. - attr_accessor :options - - # Set the log level. - # - # @parameter level [Integer | Symbol] The log level. - def level= level - if level.is_a? Symbol - @level = self.class::LEVELS[level] - else - @level = level - end - end - - # Set verbose output (enable by default with no arguments). - # - # @parameter value [Boolean] Enable or disable verbose output. - def verbose!(value = true) - @verbose = value - @output.verbose!(value) - end - - # Disable all logging. - def off! - @level = self.class::MAXIMUM_LEVEL + 1 - end - - # Enable all logging. - def all! - @level = self.class::MINIMUM_LEVEL - 1 - end - - # Filter log messages based on the subject and log level. - # - # You must provide the subject's class, not an instance of the class. - # - # @parameter subject [Module] The subject to filter. - # @parameter level [Integer] The log level. - def filter(subject, level) - unless subject.is_a?(Module) - raise ArgumentError, "Expected a class, got #{subject.inspect}" - end - - @subjects[subject] = level - end - - # Whether logging is enabled for the given subject and log level. - # - # You can enable and disable logging for classes. This function checks if logging for a given subject is enabled. - # - # @parameter subject [Module | Object] The subject to check. - # @parameter level [Integer] The log level. - # @returns [Boolean] Whether logging is enabled. - def enabled?(subject, level = self.class::MINIMUM_LEVEL) - subject = subject.class unless subject.is_a?(Module) - - if specific_level = @subjects[subject] - return level >= specific_level - end - - if level >= @level - return true - end - end - - # Enable specific log level for the given class. - # - # @parameter name [Module] The class to enable. - def enable(subject, level = self.class::MINIMUM_LEVEL) - # Set the filter level of logging for a given subject which passes all log messages: - filter(subject, level) - end - - # Disable logging for the given class. - # - # @parameter name [Module] The class to disable. - def disable(subject) - # Set the filter level of the logging for a given subject which filters all log messages: - filter(subject, self.class::MAXIMUM_LEVEL + 1) - end - - # Clear any specific filters for the given class. - # - # @parameter subject [Module] The class to disable. - def clear(subject) - unless subject.is_a?(Module) - raise ArgumentError, "Expected a class, got #{subject.inspect}" - end - - @subjects.delete(subject) - end - - # Log a message with the given severity. - # - # @parameter subject [Object] The subject of the log message. - # @parameter arguments [Array] The arguments to log. - # @parameter options [Hash] Additional options to pass to the output. - # @parameter block [Proc] A block passed to the output. - # @returns [Nil] Always returns nil. - def call(subject, *arguments, **options, &block) - severity = options[:severity] || UNKNOWN - level = self.class::LEVELS[severity] - - if self.enabled?(subject, level) - @output.call(subject, *arguments, **options, &block) - end - - return nil - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/format.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/format.rb deleted file mode 100644 index 9015eb78..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/format.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2023-2025, by Samuel Williams. - -require_relative "format/safe" - -module Console - module Format - # A safe format for converting objects to strings. - # - # @returns [Console::Format::Safe] - def self.default - Safe.new(format: ::JSON) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/format/safe.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/format/safe.rb deleted file mode 100644 index 9660c79d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/format/safe.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2023-2025, by Samuel Williams. - -require "json" - -module Console - # @namespace - module Format - # A safe format for converting objects to strings. - # - # Handles issues like circular references and encoding errors. - class Safe - # Create a new safe format. - # - # @parameter format [JSON] The format to use for serialization. - # @parameter limit [Integer] The maximum depth to recurse into objects. - # @parameter encoding [Encoding] The encoding to use for strings. - def initialize(format: ::JSON, limit: 8, encoding: ::Encoding::UTF_8) - @format = format - @limit = limit - @encoding = encoding - end - - # Dump the given object to a string. - # - # @parameter object [Object] The object to dump. - # @returns [String] The dumped object. - def dump(object) - @format.dump(object, @limit) - rescue SystemStackError, StandardError => error - @format.dump(safe_dump(object, error)) - end - - private - - # Filter the backtrace to remove duplicate frames and reduce verbosity. - # - # @parameter error [Exception] The exception to filter. - # @returns [Array(String)] The filtered backtrace. - def filter_backtrace(error) - frames = error.backtrace - filtered = {} - filtered_count = nil - skipped = nil - - frames = frames.filter_map do |frame| - if filtered[frame] - if filtered_count == nil - filtered_count = 1 - skipped = frame.dup - else - filtered_count += 1 - nil - end - else - if skipped - if filtered_count > 1 - skipped.replace("[... #{filtered_count} frames skipped ...]") - end - - filtered_count = nil - skipped = nil - end - - filtered[frame] = true - frame - end - end - - if skipped && filtered_count > 1 - skipped.replace("[... #{filtered_count} frames skipped ...]") - end - - return frames - end - - # Dump the given object to a string, replacing it with a safe representation if there is an error. - # - # This is a slow path so we try to avoid it. - # - # @parameter object [Object] The object to dump. - # @parameter error [Exception] The error that occurred while dumping the object. - # @returns [Hash] The dumped (truncated) object including error details. - def safe_dump(object, error) - object = safe_dump_recurse(object) - - object[:truncated] = true - object[:error] = { - class: safe_dump_recurse(error.class.name), - message: safe_dump_recurse(error.message), - backtrace: safe_dump_recurse(filter_backtrace(error)), - } - - return object - end - - # Replace the given object with a safe truncated representation. - # - # @parameter object [Object] The object to replace. - # @returns [String] The replacement string. - def replacement_for(object) - case object - when Array - "[...]" - when Hash - "{...}" - else - "..." - end - end - - # Create a new hash with identity comparison. - def default_objects - Hash.new.compare_by_identity - end - - # This will recursively generate a safe version of the object. Nested hashes and arrays will be transformed recursively. Strings will be encoded with the given encoding. Primitive values will be returned as-is. Other values will be converted using `as_json` if available, otherwise `to_s`. - # - # @parameter object [Object] The object to dump. - # @parameter limit [Integer] The maximum depth to recurse into objects. - # @parameter objects [Hash] The objects that have already been visited. - # @returns [Object] The dumped object as a primitive representation. - def safe_dump_recurse(object, limit = @limit, objects = default_objects) - if limit <= 0 || objects[object] - return replacement_for(object) - end - - case object - when Hash - objects[object] = true - - object.to_h do |key, value| - [ - String(key).encode(@encoding, invalid: :replace, undef: :replace), - safe_dump_recurse(value, limit - 1, objects) - ] - end - when Array - objects[object] = true - - object.map do |value| - safe_dump_recurse(value, limit - 1, objects) - end - when String - object.encode(@encoding, invalid: :replace, undef: :replace) - when Numeric, TrueClass, FalseClass, NilClass - object - else - objects[object] = true - - # We could do something like this but the chance `as_json` will blow up. - # We'd need to be extremely careful about it. - # if object.respond_to?(:as_json) - # safe_dump_recurse(object.as_json, limit - 1, objects) - # else - - safe_dump_recurse(object.to_s, limit - 1, objects) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/interface.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/interface.rb deleted file mode 100644 index d7f0f5e6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/interface.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024-2025, by Samuel Williams. - -require "fiber/local" -require_relative "config" - -module Console - # The public logger interface. - module Interface - extend Fiber::Local - - # Create a new (thread local) logger instance. - def self.local - Config::DEFAULT.make_logger - end - - # Get the current logger instance. - def logger - Interface.instance - end - - # Set the current logger instance. - # - # The current logger instance is assigned per-fiber. - def logger= instance - Interface.instance= instance - end - - # Emit a debug log message. - def debug(...) - Interface.instance.debug(...) - end - - # Emit an informational log message. - def info(...) - Interface.instance.info(...) - end - - # Emit a warning log message. - def warn(...) - Interface.instance.warn(...) - end - - # Emit an error log message. - def error(...) - Interface.instance.error(...) - end - - # Emit a fatal log message. - def fatal(...) - Interface.instance.fatal(...) - end - - # Emit a log message with arbitrary arguments and options. - def call(...) - Interface.instance.call(...) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/logger.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/logger.rb deleted file mode 100644 index db0b36bf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/logger.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. -# Copyright, 2021, by Bryan Powell. -# Copyright, 2021, by Robert Schulze. -# Copyright, 2025, by Shigeru Nakajima. - -require_relative "filter" - -require_relative "output" -require_relative "output/failure" - -require_relative "progress" - -module Console - # The standard logger interface with support for log levels and verbosity. - # - # The log levels are: `debug`, `info`, `warn`, `error`, and `fatal`. - class Logger < Filter[debug: 0, info: 1, warn: 2, error: 3, fatal: 4] - # Set the default log level based on `$DEBUG` and `$VERBOSE`. - # You can also specify CONSOLE_LEVEL=debug or CONSOLE_LEVEL=info in environment. - # https://mislav.net/2011/06/ruby-verbose-mode/ has more details about how it all fits together. - # - # @parameter env [Hash] The environment to read the log level from. - # @parameter verbose [Boolean] The verbose flag. - # @parameter debug [Boolean] The debug flag. - # @returns [Integer] The default log level. - def self.default_log_level(env = ENV, verbose: $VERBOSE, debug: $DEBUG) - if level = env["CONSOLE_LEVEL"] - LEVELS[level.to_sym] || level.to_i - elsif debug - DEBUG - elsif verbose.nil? - WARN - else - INFO - end - end - - DEFAULT_LEVEL = 1 - - # Create a new logger. - # - # @parameter output [Console::Output] The output destination. - # @parameter options [Hash] Additional options. - def initialize(output, **options) - # This is the expected default behaviour, but it may be nice to have a way to override it. - output = Output::Failure.new(output, **options) - - super(output, **options) - end - - # Create a progress indicator for the given subject. - # - # @parameter subject [String] The subject of the progress indicator. - # @parameter total [Integer] The total number of items to process. - # @parameter options [Hash] Additional options passed to {Progress}. - # @returns [Progress] The progress indicator. - def progress(subject, total, **options) - options[:severity] ||= :info - - Progress.new(subject, total, **options) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output.rb deleted file mode 100644 index a872c1dc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2021-2025, by Samuel Williams. - -require_relative "output/default" -require_relative "output/serialized" -require_relative "output/terminal" -require_relative "output/null" - -module Console - # Output handling. - module Output - # Create a new output based on the environment. - # - # The environment variable `CONSOLE_OUTPUT` can be used to specify a list of output classes to wrap around the output. If not specified the {Default} output is used. - # - # The output argument is deliberately unders-specified but can be an IO object or an instance of {Output}. - # - # @parameter output [Console::Output] The output to wrap OR an IO object. - # @parameter env [Hash] The environment to read configuration from. - # @parameter options [Hash] Additional options to customize the output. - # @returns [Console::Output] The output instance. - def self.new(output = nil, env = ENV, **options) - if names = env["CONSOLE_OUTPUT"] - names = names.split(",").reverse - - names.inject(output) do |output, name| - Output.const_get(name).new(output, **options) - end - else - return Output::Default.new(output, **options) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/default.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/default.rb deleted file mode 100644 index 482e72f2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/default.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2021-2025, by Samuel Williams. - -require_relative "terminal" -require_relative "serialized" -require_relative "failure" - -module Console - module Output - # Default output format selection. - module Default - # Create a new output format based on the given stream. - # - # @parameter io [IO] The output stream. - # @parameter env [Hash] Environment variables (defaults to ENV for testing). - # @parameter options [Hash] Additional options to customize the output. - # @returns [Console::Output::Terminal | Console::Output::Serialized] The output instance, depending on whether the `io` is a terminal or not. - def self.new(stream, env: ENV, **options) - stream ||= $stderr - - if stream.tty? || mail?(env) - output = Terminal.new(stream, **options) - else - output = Serialized.new(stream, **options) - end - - return output - end - - private - - # Detect if we're running in a cron job or mail context where human-readable output is preferred. - # Cron jobs often have MAILTO set and lack TERM, or have minimal TERM values. - def self.mail?(env = ENV) - # Check for common cron environment indicators - return true if env.key?("MAILTO") && !env["MAILTO"].empty? - - false - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/failure.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/failure.rb deleted file mode 100644 index 7c3e8825..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/failure.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024-2025, by Samuel Williams. - -require_relative "wrapper" -require_relative "../event/failure" - -module Console - module Output - # A wrapper for outputting failure messages, which can include exceptions. - class Failure < Wrapper - # Create a new failure output wrapper. - def initialize(output, **options) - super(output, **options) - end - - # The exception must be either the last argument or passed as an option. - # - # @parameter subject [String] The subject of the message. - # @parameter arguments [Array] The arguments to output. - # @parameter exception [Exception] The exception to output. - # @parameter options [Hash] Additional options to pass to the output. - # @parameter block [Proc] An optional block to pass to the output. - def call(subject = nil, *arguments, exception: nil, **options, &block) - if exception.nil? - last = arguments.last - if last.is_a?(Exception) - options[:event] = Event::Failure.for(last) - end - elsif exception.is_a?(Exception) - options[:event] = Event::Failure.for(exception) - else - # We don't know what this is, so we just pass it through: - options[:exception] = exception - end - - super(subject, *arguments, **options, &block) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/null.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/null.rb deleted file mode 100644 index cb468716..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/null.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2023-2025, by Samuel Williams. - -module Console - module Output - # A null output that does nothing. - class Null - # Create a new null output. - def initialize(...) - end - - # The last output is always self. - def last_output - self - end - - # Do nothing. - def call(...) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/sensitive.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/sensitive.rb deleted file mode 100644 index 55790b1e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/sensitive.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2021-2025, by Samuel Williams. - -require_relative "wrapper" - -module Console - module Output - # Redact sensitive information from output. - class Sensitive < Wrapper - # Default redaction pattern. - REDACT = / - phone - | email - | full_?name - | first_?name - | last_?name - - | device_name - | user_agent - - | zip - | address - | location - | latitude - | longitude - - | ip - | gps - - | sex - | gender - - | token - | password - /xi - - # Create a new sensitive output wrapper. - # - # @parameter output [Console::Output] The output to wrap. - # @parameter redact [Regexp] The pattern to redact. - # @parameter options [Hash] Additional options to pass to the output. - def initialize(output, redact: REDACT, **options) - super(output, **options) - - @redact = redact - end - - # Check if the given text should be redacted. - # - # @parameter text [String] The text to check. - # @returns [Boolean] Whether the text should be redacted. - def redact?(text) - text.match?(@redact) - end - - # Redact sensitive information from a hash. - # - # @parameter arguments [Hash] The hash to redact. - # @parameter filter [Proc] An optional filter to apply to redacted text. - # @returns [Hash] The redacted hash. - def redact_hash(arguments, filter) - arguments.transform_values do |value| - redact(value, filter) - end - end - - # Redact sensitive information from an array. - # - # @parameter array [Array] The array to redact. - # @parameter filter [Proc] An optional filter to apply to redacted text. - # @returns [Array] The redacted array. - def redact_array(array, filter) - array.map do |value| - redact(value, filter) - end - end - - # Redact sensitive information from the given argument. - # - # @parameter argument [String | Array | Hash] The argument to redact. - # @parameter filter [Proc] An optional filter to apply to redacted text. - # @returns [String | Array | Hash] The redacted argument. - def redact(argument, filter) - case argument - when String - if filter - filter.call(argument) - elsif redact?(argument) - "[REDACTED]" - else - argument - end - when Array - redact_array(argument, filter) - when Hash - redact_hash(argument, filter) - else - redact(argument.to_s, filter) - end - end - - # A simple filter for redacting sensitive information. - class Filter - # Create a new filter. - # - # @parameter substitutions [Hash] The substitutions to apply. - def initialize(substitutions) - @substitutions = substitutions - @pattern = Regexp.union(substitutions.keys) - end - - # Apply the filter to the given text. This will replace all occurrences of the pattern with the corresponding substitution. - # - # @parameter text [String] The text to filter. - # @returns [String] The filtered text. - def call(text) - text.gsub(@pattern, @substitutions) - end - end - - # Write a message to the output, filtering sensitive information if necessary. - # - # @parameter subject [String] The subject of the message. - # @parameter arguments [Array] The arguments to output. - # @parameter sensitive [Boolean | Filter | Hash] Whether to filter sensitive information. - # @parameter options [Hash] Additional options to pass to the output. - # @parameter block [Proc] An optional block to pass to the output. - def call(subject = nil, *arguments, sensitive: true, **options, &block) - if sensitive - if sensitive.respond_to?(:call) - filter = sensitive - elsif sensitive.is_a?(Hash) - filter = Filter.new(sensitive) - end - - subject = redact(subject, filter) - arguments = redact_array(arguments, filter) - end - - super(subject, *arguments, **options) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/serialized.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/serialized.rb deleted file mode 100644 index eee32434..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/serialized.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -require_relative "../format" -require "time" -require "fiber/annotation" - -module Console - module Output - # Serialize log messages in a structured format. - class Serialized - # Create a new serialized output. - # - # @parameter io [IO] The output stream. - # @parameter format [Console::Format] The format to use for serializing log messages. - # @parameter options [Hash] Additional options to customize the output. - def initialize(stream, format: Format.default, **options) - @stream = stream - @format = format - end - - # This a final output that then writes to an IO object. - def last_output - self - end - - # @attribute [IO] The output stream. - attr :stream - - # @attribute [Console::Format] The format to use for serializing log messages. - attr :format - - # Serialize the given record. - # - # @parameter record [Hash] The record to serialize. - # @returns [String] The serialized record. - def dump(record) - @format.dump(record) - end - - # Output the given log message. - # - # @parameter subject [String] The subject of the log message. - # @parameter arguments [Array] The arguments to log. - # @parameter severity [Symbol] The severity of the log message. - # @parameter options [Hash] Additional options. - # @parameter block [Proc] An optional block used to generate the log message. - def call(subject = nil, *arguments, severity: UNKNOWN, **options, &block) - record = { - time: Time.now.iso8601, - severity: severity, - oid: subject.object_id, - pid: Process.pid, - } - - # We want to log just a brief subject: - if subject.is_a?(String) - record[:subject] = subject - elsif subject.is_a?(Module) - record[:subject] = subject.name - else - record[:subject] = subject.class.name - end - - if annotation = Fiber.current.annotation - record[:annotation] = annotation - end - - message = arguments - - if block_given? - if block.arity.zero? - message << yield - else - buffer = StringIO.new - yield buffer - message << buffer.string - end - end - - if message.size == 1 - record[:message] = message.first - elsif message.any? - record[:message] = message - end - - record.update(options) - - @stream.write(self.dump(record) << "\n") - end - end - - # @deprecated This is a legacy constant, please use `Serialized` instead. - JSON = Serialized - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/split.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/split.rb deleted file mode 100644 index 027ed9a3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/split.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022-2025, by Samuel Williams. - -module Console - module Output - # Split output into multiple outputs. - class Split - # Create a new split output. - # - # @parameter outputs [Array(Console::Output)] The outputs to split into. - def self.[](*outputs) - self.new(outputs) - end - - # Create a new split output. - # - # @parameter outputs [Array(Console::Output)] The outputs to split into. - def initialize(outputs) - @outputs = outputs - end - - # Set the verbose flag for all outputs. - # - # @parameter value [Boolean] The new value. - def verbose!(value = true) - @outputs.each{|output| output.verbose!(value)} - end - - # Invoke the outputs. If a block is used, it may be invoked multiple times. - def call(...) - @outputs.each do |output| - output.call(...) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/terminal.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/terminal.rb deleted file mode 100644 index f84e3186..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/terminal.rb +++ /dev/null @@ -1,309 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. -# Copyright, 2021, by Robert Schulze. - -require_relative "../clock" -require_relative "../terminal" - -require "json" -require "fiber" -require "fiber/annotation" -require "stringio" - -module Console - module Output - # Represents a terminal output, and formats log messages for display. - class Terminal - # Represents an output buffer that formats lines with a prefix. - class Buffer < StringIO - # Create a new buffer with the given prefix. - # - # @parameter prefix [String] The prefix to use for each line. - def initialize(prefix = nil) - @prefix = prefix - - super() - end - - # @attribute [String] The prefix to use for each line. - attr :prefix - - # Write lines using the given prefix. - # - # @parameter lines [Array] The lines to write. - # @parameter prefix [String] The prefix to use for each line. - def puts(*lines, prefix: @prefix) - lines.each do |line| - self.write(prefix) if prefix - super(line) - end - end - - alias << puts - end - - # The environment variable used to store the start time of the console terminal output. - CONSOLE_START_AT = "CONSOLE_START_AT" - - # Exports CONSOLE_START_AT which can be used to synchronize the start times of all child processes when they log using delta time. - def self.start_at!(env = ENV) - if time_string = env[CONSOLE_START_AT] - start_at = Time.parse(time_string) rescue nil - end - - unless start_at - start_at = Time.now - env[CONSOLE_START_AT] = start_at.to_s - end - - return start_at - end - - # Create a new terminal output. - # - # @parameter stream [IO] The output stream. - # @parameter verbose [Boolean] Whether to print verbose output. - # @parameter start_at [Time] The start time of the terminal output. - # @parameter format [Console::Terminal::Format] The format to use for terminal output. - # @parameter options [Hash] Additional options to customize the output. - def initialize(stream, verbose: nil, start_at: Terminal.start_at!, format: nil, **options) - @stream = stream - @start_at = start_at - - @terminal = format.nil? ? Console::Terminal.for(@stream) : format.new(@stream) - - if verbose.nil? - @verbose = !@terminal.colors? - else - @verbose = verbose - end - - @terminal[:logger_suffix] ||= @terminal.style(:white, nil, :faint) - @terminal[:subject] ||= @terminal.style(nil, nil, :bold) - @terminal[:debug] = @terminal.style(:cyan) - @terminal[:info] = @terminal.style(:green) - @terminal[:warn] = @terminal.style(:yellow) - @terminal[:error] = @terminal.style(:red) - @terminal[:fatal] = @terminal[:error] - - @terminal[:annotation] = @terminal.reset - @terminal[:value] = @terminal.style(:blue) - - @formatters = {} - self.register_formatters - end - - # This a final output. - def last_output - self - end - - # @attribute [IO] The output stream. - attr :stream - - # @attribute [Boolean] Whether to print verbose output. - attr_accessor :verbose - - # @attribute [Time] The start time of the terminal output. - attr :start - - # @attribute [Console::Terminal::Format] The format to use for terminal output. - attr :terminal - - # Set the verbose output. - # - # @parameter value [Boolean] Whether to print verbose output. - def verbose!(value = true) - @verbose = value - end - - # Register all formatters in the given namespace. - def register_formatters(namespace = Console::Terminal::Formatter) - namespace.constants.each do |name| - formatter = namespace.const_get(name) - @formatters[formatter::KEY] = formatter.new(@terminal) - end - end - - # The default severity for log messages, if not specified. - UNKNOWN = :unknown - - # Log a message with the given severity. - # - # @parameter subject [String] The subject of the log message. - # @parameter arguments [Array] The arguments to log. - # @parameter name [String | Nil] The optional name of the log message, used as a prefix, otherwise defaults to the severity name. - # @parameter severity [Symbol] The severity of the log message. - # @parameter event [Hash] The event to log. - # @parameter options [Hash] Additional options. - # @yields {|buffer, terminal| ...} An optional block used to generate the log message. - # @parameter buffer [Console::Output::Terminal::Buffer] The output buffer. - # @parameter terminal [Console::Terminal] The terminal instance. - def call(subject = nil, *arguments, name: nil, severity: UNKNOWN, event: nil, **options, &block) - width = @terminal.width - - prefix = build_prefix(name || severity.to_s) - indent = " " * prefix.size - - buffer = Buffer.new("#{indent}| ") - indent_size = buffer.prefix.size - - format_subject(severity, prefix, subject, buffer) - - arguments.each do |argument| - format_argument(argument, buffer) - end - - if block_given? - if block.arity.zero? - format_argument(yield, buffer) - else - yield(buffer, @terminal) - end - end - - if event - format_event(event, buffer, width - indent_size) - end - - if options&.any? - format_options(options, buffer) - end - - @stream.write buffer.string - end - - protected - - def format_event(event, buffer, width) - event = event.to_hash - type = event[:type] - - if formatter = @formatters[type] - formatter.format(event, buffer, verbose: @verbose, width: width) - else - format_value(::JSON.pretty_generate(event), buffer) - end - end - - def format_options(options, output) - format_value(::JSON.pretty_generate(options), output) - end - - def format_argument(argument, output) - argument.to_s.each_line do |line| - output.puts line - end - end - - def format_subject(severity, prefix, subject, buffer) - if subject.is_a?(String) - format_string_subject(severity, prefix, subject, buffer) - elsif subject.is_a?(Module) - format_string_subject(severity, prefix, subject.to_s, buffer) - else - format_object_subject(severity, prefix, subject, buffer) - end - end - - def default_suffix(object = nil) - buffer = +"" - - if @verbose - if annotation = Fiber.current.annotation - # While typically annotations should be strings, that is not always the case. - annotation = annotation.to_s - - # If the annotation is empty, we don't want to print it, as it will look like a formatting bug. - if annotation.size > 0 - buffer << ": #{@terminal[:annotation]}#{annotation}#{@terminal.reset}" - end - end - end - - buffer << " #{@terminal[:logger_suffix]}" - - if object - buffer << "[oid=0x#{object.object_id.to_s(16)}] " - end - - buffer << "[ec=0x#{Fiber.current.object_id.to_s(16)}] [pid=#{Process.pid}] [#{::Time.now}]#{@terminal.reset}" - - return buffer - end - - def format_object_subject(severity, prefix, subject, output) - prefix_style = @terminal[severity] - - if @verbose - suffix = default_suffix(subject) - end - - prefix = "#{prefix_style}#{prefix}:#{@terminal.reset} " - - output.puts "#{@terminal[:subject]}#{subject.class}#{@terminal.reset}#{suffix}", prefix: prefix - end - - def format_string_subject(severity, prefix, subject, output) - prefix_style = @terminal[severity] - - if @verbose - suffix = default_suffix - end - - prefix = "#{prefix_style}#{prefix}:#{@terminal.reset} " - - output.puts "#{@terminal[:subject]}#{subject}#{@terminal.reset}#{suffix}", prefix: prefix - end - - def format_value(value, output) - string = value.to_s - - string.each_line do |line| - line.chomp! - output.puts "#{@terminal[:value]}#{line}#{@terminal.reset}" - end - end - - def time_offset_prefix - Clock.formatted_duration(Time.now - @start_at).rjust(6) - end - - def build_prefix(name) - if @verbose - "#{time_offset_prefix} #{name.rjust(8)}" - else - time_offset_prefix - end - end - end - - # Terminal text output. - module Text - # Create a new terminal output. - # - # @parameter output [IO] The output stream. - # @parameter options [Hash] Additional options to customize the output. - # @returns [Console::Output::Terminal] The terminal output instance. - def self.new(output, **options) - Terminal.new(output, format: Console::Terminal::Text, **options) - end - end - - # Terminal XTerm output. - module XTerm - # Create a new terminal output. - # - # You can use this to force XTerm output on a non-TTY output streams that support XTerm escape codes. - # - # @parameter output [IO] The output stream. - # @parameter options [Hash] Additional options to customize the output. - # @returns [Console::Output::Terminal] The terminal output instance. - def self.new(output, **options) - Terminal.new(output, format: Console::Terminal::XTerm, **options) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/wrapper.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/wrapper.rb deleted file mode 100644 index 5ad5e02d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/output/wrapper.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2021-2025, by Samuel Williams. - -module Console - module Output - # A generic wrapper for output handling. - class Wrapper - # Create a new wrapper output. - # - # @parameter delegate [Console::Output] The output to delegate to. - # @parameter options [Hash] Additional options to customize the output. - def initialize(delegate, **options) - @delegate = delegate - end - - # @attribute [Console::Output] The output to delegate to. - attr :delegate - - # The last output is the last output of the delegate. - def last_output - @delegate.last_output - end - - # Set the verbose flag for the delegate. - # - # @parameter value [Boolean] The new value. - def verbose!(value = true) - @delegate.verbose!(value) - end - - # Invoke the delegate. - def call(...) - @delegate.call(...) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/progress.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/progress.rb deleted file mode 100644 index 1baf271a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/progress.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2020-2025, by Samuel Williams. -# Copyright, 2022, by Anton Sozontov. - -require_relative "clock" - -module Console - # A simple progress indicator - class Progress - # @deprecated Use {Clock.now} instead. - def self.now - Clock.now - end - - # Create a new progress indicator. - # - # @parameter subject [Object] The subject of the progress indicator. - # @parameter total [Integer] The total number of steps. - # @parameter minimum_output_duration [Numeric] The minimum duration between outputs. - # @parameter options [Hash] Additional options to customize the output. - def initialize(subject, total = 0, minimum_output_duration: 0.1, **options) - @subject = subject - @options = options - - @start_time = Clock.now - - @last_output_time = nil - @minimum_output_duration = minimum_output_duration - - @current = 0 - @total = total - end - - # @attribute [Object] The subject of the progress indicator. - attr :subject - - # @attribute [Numeric] The minimum duration between outputs. - attr :minimum_output_duration - - # @attribute [Time] The time the progress indicator was started. - attr :start_time - - # @attribute [Numeric] The current number of steps completed. - attr :current - - # @attribute [Numeric] The total number of steps. - attr :total - - # @returns [Numeric] The duration since the progress indicator was started. - def duration - Clock.now - @start_time - end - - # @returns [Rational] The ratio of steps completed to total steps. - def ratio - Rational(@current.to_f, @total.to_f) - end - - # @returns [Numeric] The number of steps remaining. - def remaining - @total - @current - end - - # @returns [Numeric | Nil] The average duration per step, or `nil` if no steps have been completed. - def average_duration - if @current > 0 - duration / @current - end - end - - # @returns [Numeric | Nil] The estimated remaining time, or `nil` if no steps have been completed. - def estimated_remaining_time - if average_duration = self.average_duration - average_duration * remaining - end - end - - # Generate an appropriate event for the progress indicator. - # - # @returns [Hash] The progress indicator as a hash. - def to_hash - Hash.new.tap do |hash| - hash[:type] = :progress - hash[:current] = @current - hash[:total] = @total - - hash[:duration] = self.duration - hash[:estimated_remaining_time] = self.estimated_remaining_time - end - end - - # Increment the progress indicator by the given amount. - # - # @parameter amount [Numeric] The amount to increment by. - # @returns [Progress] The progress indicator itself. - def increment(amount = 1) - @current += amount - - if output? - Console.call(@subject, self.to_s, event: self.to_hash, **@options) - @last_output_time = Clock.now - end - - return self - end - - # Resize the progress indicator to the given total. - # - # @parameter total [Numeric] The new total number of steps. - # @returns [Progress] The progress indicator itself. - def resize(total) - @total = total - - Console.call(@subject, self.to_s, event: self.to_hash, **@options) - @last_output_time = Clock.now - - return self - end - - # Augment the progress indicator with additional information. - # - # @parameter *arguments [Array] The arguments to log. - # @parameter **options [Hash] Additional options to log. - # @parameter &block [Proc] An optional block used to generate the log message. - def mark(*arguments, **options, &block) - Console.call(@subject, *arguments, **options, **@options, &block) - end - - # @returns [String] A human-readable representation of the progress indicator. - def to_s - if estimated_remaining_time = self.estimated_remaining_time - "#{@current}/#{@total} completed in #{Clock.formatted_duration(self.duration)}, #{Clock.formatted_duration(estimated_remaining_time)} remaining." - else - "#{@current}/#{@total} completed, waiting for estimate..." - end - end - - private - - # Compute a time delta since the last output, used for rate limiting the output. - # - # @returns [Numeric | Nil] The duration since the last output. - def duration_since_last_output - if @last_output_time - Clock.now - @last_output_time - end - end - - # Whether an output should be generated at this time, taking into account the remaining steps, and the duration since the last output. - # - # @returns [Boolean] Whether an output should be generated. - def output? - if remaining.zero? - return true - elsif duration = duration_since_last_output - return duration > @minimum_output_duration - else - return true - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/resolver.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/resolver.rb deleted file mode 100644 index 9c82b3a3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/resolver.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. -# Copyright, 2021, by Robert Schulze. - -require_relative "filter" - -module Console - # Represents a class resolver that can be used to set log levels for different classes as they become available. - class Resolver - # You can change the log level for different classes using CONSOLE_$LEVEL env vars. - # - # e.g. `CONSOLE_WARN=Acorn,Banana CONSOLE_DEBUG=Cat` will set the log level for the classes Acorn and Banana to `warn` and Cat to `debug`. This overrides the default log level. - # - # You can enable all log levels for a given class by using `CONSOLE_ON=MyClass`. Similarly you can disable all logging using `CONSOLE_OFF=MyClass`. - # - # @parameter logger [Logger] A logger instance to set the logging levels on. - # @parameter env [Hash] The environment to read levels from. - # @returns [Nil] If there were no custom logging levels specified in the environment. - # @returns [Resolver] If there were custom logging levels, then the created resolver is returned. - def self.default_resolver(logger, env = ENV) - # Find all CONSOLE_$LEVEL variables from environment: - levels = logger.class::LEVELS - .map{|label, level| [level, env["CONSOLE_#{label.upcase}"]&.split(",")]} - .to_h - .compact - - off_klasses = env["CONSOLE_OFF"]&.split(",") - on_klasses = env["CONSOLE_ON"]&.split(",") - - resolver = nil - - # If we have any levels, then create a class resolver, and each time a class is resolved, set the log level for that class to the specified level: - if on_klasses&.any? - resolver ||= Resolver.new - - resolver.bind(on_klasses) do |klass| - logger.enable(klass, logger.class::MINIMUM_LEVEL - 1) - end - end - - if off_klasses&.any? - resolver ||= Resolver.new - - resolver.bind(off_klasses) do |klass| - logger.disable(klass) - end - end - - levels.each do |level, names| - resolver ||= Resolver.new - - resolver.bind(names) do |klass| - logger.enable(klass, level) - end - end - - return resolver - end - - # Create a new class resolver. - def initialize - @names = {} - - @trace_point = TracePoint.new(:class, &self.method(:resolve)) - end - - # Bind the given class names to the given block. When the class name is resolved into an actual class, the block will be called with the class as an argument. - # - # If the class is already defined, the block will be called immediately. - # - # If the class is not defined, the block will be called when the class is defined, using a trace point. - # - # @parameter names [Array(String)] The class names to bind. - # @parameter block [Proc] The block to call when the class is resolved. - def bind(names, &block) - names.each do |name| - if klass = Object.const_get(name) rescue nil - yield klass - else - @names[name] = block - end - end - - if @names.any? - @trace_point.enable - else - @trace_point.disable - end - end - - # @returns [Boolean] True if the resolver is waiting for classes to be defined. - def waiting? - @trace_point.enabled? - end - - # Invoked by the trace point when a class is defined. - # - # This will call the block associated with the class name, if any, and remove it from the list of names to resolve. - # - # If the list of names is empty, the trace point will be disabled. - # - # @parameter trace_point [TracePoint] The trace point that triggered the event. - def resolve(trace_point) - if block = @names.delete(trace_point.self.to_s) - block.call(trace_point.self) - end - - if @names.empty? - @trace_point.disable - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal.rb deleted file mode 100644 index 72299719..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -require_relative "terminal/text" -require_relative "terminal/xterm" -require_relative "terminal/formatter" - -module Console - module Terminal - # Create a new terminal output for the given stream. - def self.for(stream) - if stream.tty? - XTerm.new(stream) - else - Text.new(stream) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter.rb deleted file mode 100644 index 9fcd54c5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2025, by Samuel Williams. - -require_relative "formatter/progress" -require_relative "formatter/failure" -require_relative "formatter/spawn" - -module Console - module Terminal - # Formatters for various types of events. - module Formatter - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/failure.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/failure.rb deleted file mode 100644 index 9aa4f692..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/failure.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024-2025, by Samuel Williams. - -module Console - module Terminal - module Formatter - # Format a failure event, including the exception message and backtrace. - class Failure - # The key used to identify this formatter. - KEY = :failure - - # Create a new failure formatter. - # - # @param terminal [Terminal::Text] The terminal to use for formatting. - def initialize(terminal) - @terminal = terminal - - @terminal[:exception_title] ||= @terminal.style(:red, nil, :bold) - @terminal[:exception_detail] ||= @terminal.style(:yellow) - @terminal[:exception_backtrace] ||= @terminal.style(:red) - @terminal[:exception_backtrace_other] ||= @terminal.style(:red, nil, :faint) - @terminal[:exception_message] ||= @terminal.style(:default) - end - - # Format the given event. - # - # @parameter event [Hash] The event to format. - # @parameter stream [IO] The stream to write the formatted event to. - # @parameter prefix [String] The prefix to use before the title. - # @parameter verbose [Boolean] Whether to include additional information. - # @parameter options [Hash] Additional options. - def format(event, stream, prefix: nil, verbose: false, **options) - title = event[:class] - message = event[:message] - backtrace = event[:backtrace] - root = event[:root] - - lines = message.lines.map(&:chomp) - - stream.puts " #{prefix}#{@terminal[:exception_title]}#{title}#{@terminal.reset}: #{lines.shift}" - - lines.each do |line| - stream.puts " #{@terminal[:exception_detail]}#{line}#{@terminal.reset}" - end - - root_pattern = /^#{root}\// if root - - backtrace&.each_with_index do |line, index| - path, offset, message = line.split(":", 3) - style = :exception_backtrace - - # Make the path a bit more readable: - if root_pattern and path.sub!(root_pattern, "").nil? - style = :exception_backtrace_other - end - - stream.puts " #{index == 0 ? "→" : " "} #{@terminal[style]}#{path}:#{offset}#{@terminal[:exception_message]} #{message}#{@terminal.reset}" - end - - if cause = event[:cause] - format(cause, stream, prefix: "Caused by ", verbose: verbose, **options) - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/progress.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/progress.rb deleted file mode 100644 index 5f244c1e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/progress.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2020-2025, by Samuel Williams. - -module Console - module Terminal - module Formatter - # Format a progress event, including the current progress and total. - class Progress - # The key used to identify this formatter. - KEY = :progress - - # The block characters used to render the progress bar. - BLOCK = [ - " ", - "▏", - "▎", - "▍", - "▌", - "▋", - "▊", - "▉", - "█", - ] - - # Create a new progress formatter. - # - # @param terminal [Terminal::Text] The terminal to use for formatting. - def initialize(terminal) - @terminal = terminal - @terminal[:progress_bar] ||= terminal.style(:blue, :white) - end - - # Format the given event. - # - # @parameter event [Hash] The event to format. - # @parameter stream [IO] The stream to write the formatted event to. - # @parameter verbose [Boolean] Whether to include additional information. - # @parameter width [Integer] The width of the progress bar. - def format(event, stream, verbose: false, width: 80) - current = event[:current].to_f - total = event[:total].to_f - value = current / total - - # Clamp value to 1.0 to avoid rendering issues: - if value > 1.0 - value = 1.0 - end - - stream.puts "#{@terminal[:progress_bar]}#{self.bar(value, width-10)}#{@terminal.reset} #{sprintf('%6.2f', value * 100)}%" - end - - private - - # Render a progress bar with the given value and width. - def bar(value, width) - blocks = width * value - full_blocks = blocks.floor - partial_block = ((blocks - full_blocks) * BLOCK.size).floor - - if partial_block.zero? - BLOCK.last * full_blocks - else - "#{BLOCK.last * full_blocks}#{BLOCK[partial_block]}" - end.ljust(width) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/spawn.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/spawn.rb deleted file mode 100644 index 2bf15b03..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/formatter/spawn.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -module Console - module Terminal - module Formatter - # Format a spawn event, including the command and arguments. - class Spawn - # The key used to identify this formatter. - KEY = :spawn - - # Create a new spawn formatter. - # - # @param terminal [Terminal::Text] The terminal to use for formatting. - def initialize(terminal) - @terminal = terminal - @terminal[:spawn_command] ||= @terminal.style(:blue, nil, :bold) - end - - # Format the given event. - # - # @parameter event [Hash] The event to format. - # @parameter stream [IO] The stream to write the formatted event to. - # @parameter verbose [Boolean] Whether to include additional information. - # @parameter width [Integer] The width of the progress bar. - def format(event, stream, verbose: false, width: 80) - environment, arguments, options = event.values_at(:environment, :arguments, :options) - - arguments = arguments.flatten.collect(&:to_s) - - stream.puts "#{@terminal[:spawn_command]}#{arguments.join(' ')}#{@terminal.reset}#{chdir_string(options)}" - - if verbose and environment - environment.each do |key, value| - stream.puts "export #{key}=#{value}" - end - end - end - - private - - # Generate a string to represent the working directory. - def chdir_string(options) - if options and chdir = options[:chdir] - " in #{chdir}" - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/text.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/text.rb deleted file mode 100644 index 4a6a9509..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/text.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -require "io/console" - -module Console - # Styled terminal output. - module Terminal - # A simple text-based terminal output. - class Text - # Create a new text terminal output. - # - # @parameter stream [IO] The stream to write to. - def initialize(stream) - @stream = stream - @styles = {reset: self.reset} - end - - # @attribute [IO] The stream to write to. - attr :stream - - # Get the style associated with the given key. - # - # @parameter key [Symbol] The key to look up. - # @returns [String] The style associated with the key. - def [] key - @styles[key] - end - - # Set the style associated with the given key. - # - # @parameter key [Symbol] The key to associate the style with. - # @parameter value [String] The style to associate with the key. - def []= key, value - @styles[key] = value - end - - # @returns [Boolean] Whether the terminal supports colors. - def colors? - false - end - - # @returns [Tuple(Integer, Integer)] The size of the terminal, or a default value of [24, 80]. - def size - [24, 80] - end - - # @returns [Integer] The width of the terminal. - def width - self.size.last - end - - # Generate a style string for the given foreground, background, and attributes. - # - # @returns [String | Nil] The style string if colors are supported, otherwise nil. - def style(foreground, background = nil, *attributes) - end - - # Generate a reset sequence. - # - # @returns [String | Nil] The reset sequence if colors are supported, otherwise nil. - def reset - end - - # Write the given arguments to the output stream using the given style. The reset sequence is automatically appended. - # - # @parameter arguments [Array] The arguments to write. - # @parameter style [Symbol] The style to apply. - def write(*arguments, style: nil) - if style and prefix = self[style] - @stream.write(prefix) - @stream.write(*arguments) - @stream.write(self.reset) - else - @stream.write(*arguments) - end - end - - # Write the given arguments to the output stream using the given style. The reset sequence is automatically - # appended at the end of each line. - # - # @parameter arguments [Array] The arguments to write, each on a new line. - # @parameter style [Symbol] The style to apply. - def puts(*arguments, style: nil) - if style and prefix = self[style] - arguments.each do |argument| - argument.to_s.lines.each do |line| - @stream.write(prefix, line.chomp) - @stream.puts(self.reset) - end - end - else - @stream.puts(*arguments) - end - end - - # Print rich text to the output stream. - # - # - When the argument is a symbol, look up the style and inject it into the output stream. - # - When the argument is a proc/lambda, call it with self as the argument. - # - When the argument is anything else, write it directly to the output. - # - # @parameter arguments [Array] The arguments to print. - def print(*arguments) - arguments.each do |argument| - case argument - when Symbol - @stream.write(self[argument]) - when Proc - argument.call(self) - else - @stream.write(argument) - end - end - end - - # Print rich text to the output stream, followed by the reset sequence and a newline. - # - # @parameter arguments [Array] The arguments to print. - def print_line(*arguments) - print(*arguments) - @stream.puts(self.reset) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/xterm.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/xterm.rb deleted file mode 100644 index 5cf532d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/terminal/xterm.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -require "io/console" - -require_relative "text" - -module Console - # Styled terminal output. - module Terminal - # XTerm style terminal output. - class XTerm < Text - # XTerm color codes. - COLORS = { - black: 0, - red: 1, - green: 2, - yellow: 3, - blue: 4, - magenta: 5, - cyan: 6, - white: 7, - default: 9, - }.freeze - - # XTerm attribute codes. - ATTRIBUTES = { - normal: 0, - bold: 1, - bright: 1, - faint: 2, - italic: 3, - underline: 4, - blink: 5, - reverse: 7, - hidden: 8, - }.freeze - - # Whether the terminal supports colors. - def colors? - true - end - - # The size of the terminal. - def size - @stream.winsize - rescue Errno::ENOTTY - # Fake it... - [24, 80] - end - - # The width of the terminal. - def width - size.last - end - - # Apply the given style to the output. - # - # @parameter foreground [Symbol] The foreground color. - # @parameter background [Symbol] The background color. - # @parameter attributes [Array(Symbol)] The attributes to apply. - # @returns [String] The style code. - def style(foreground, background = nil, *attributes) - tokens = [] - - if foreground - tokens << 30 + COLORS.fetch(foreground) - end - - if background - tokens << 40 + COLORS.fetch(background) - end - - attributes.each do |attribute| - tokens << ATTRIBUTES.fetch(attribute){attribute.to_i} - end - - return "\e[#{tokens.join(';')}m" - end - - # Reset the style. - # - # @returns [String] The reset code. - def reset - "\e[0m" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/version.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/version.rb deleted file mode 100644 index 43c1a425..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/version.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2019-2025, by Samuel Williams. - -module Console - VERSION = "1.31.0" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/warn.rb b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/warn.rb deleted file mode 100644 index 99f363a3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/lib/console/warn.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2024-2025, by Samuel Williams. - -require_relative "logger" - -module Console - # Whether the current fiber is emitting a warning. - Fiber.attr_accessor :console_warn - - # Redirect warnings to Console.warn. - module Warn - # Redirect warnings to {Console.warn}. - def warn(message, **options) - fiber = Fiber.current - - # We do this to be extra pendantic about avoiding infinite recursion. - return super if fiber.console_warn - - begin - fiber.console_warn = true - message.chomp! - - Console::Interface.instance.warn(message, **options) - ensure - fiber.console_warn = false - end - end - end - - ::Warning.extend(Warn) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/license.md b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/license.md deleted file mode 100644 index 3e48094c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/license.md +++ /dev/null @@ -1,32 +0,0 @@ -# MIT License - -Copyright, 2019-2025, by Samuel Williams. -Copyright, 2019-2021, by Bryan Powell. -Copyright, 2019, by Cyril Roelandt. -Copyright, 2020, by Olle Jonsson. -Copyright, 2020, by Michael Adams. -Copyright, 2021, by Cédric Boutillier. -Copyright, 2021, by Robert Schulze. -Copyright, 2022, by Anton Sozontov. -Copyright, 2022, by William T. Nelson. -Copyright, 2023, by Felix Yan. -Copyright, 2024, by Patrik Wenger. -Copyright, 2025, by Shigeru Nakajima. - -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/bundle/ruby/3.2.0/gems/console-1.31.0/readme.md b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/readme.md deleted file mode 100644 index 7bbf0b35..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/readme.md +++ /dev/null @@ -1,92 +0,0 @@ -# Console - -Provides beautiful console logging for Ruby applications. Implements fast, buffered log output. - -[![Development Status](https://github.com/socketry/console/workflows/Test/badge.svg)](https://github.com/socketry/console/actions?workflow=Test) - -## Motivation - -When Ruby decided to reverse the order of exception backtraces, I finally gave up using the built in logging and decided restore sanity to the output of my programs once and for all\! - -## Features - - - Thread safe global logger with per-fiber context. - - Carry along context with nested loggers. - - Enable/disable log levels per-class. - - Detailed logging of exceptions. - - Beautiful logging to the terminal or structured logging using JSON. - -## Usage - -Please see the [project documentation](https://socketry.github.io/console/) for more details. - - - [Getting Started](https://socketry.github.io/console/guides/getting-started/index) - This guide explains how to use `console` for logging. - - - [Command Line](https://socketry.github.io/console/guides/command-line/index) - This guide explains how the `console` gem can be controlled using environment variables. - - - [Configuration](https://socketry.github.io/console/guides/configuration/index) - This guide explains how to implement per-project configuration for the `console` gem. - - - [Integration](https://socketry.github.io/console/guides/integration/index) - This guide explains how to integrate the `console` output into different systems. - - - [Events](https://socketry.github.io/console/guides/events/index) - This guide explains how to log structured events with a well-defined schema. - -## Releases - -Please see the [project releases](https://socketry.github.io/console/releases/index) for all releases. - -### v1.31.0 - - - [Ractor compatibility.](https://socketry.github.io/console/releases/index#ractor-compatibility.) - - [Symbol log level compatibility.](https://socketry.github.io/console/releases/index#symbol-log-level-compatibility.) - - [Improved output format selection for cron jobs and email contexts.](https://socketry.github.io/console/releases/index#improved-output-format-selection-for-cron-jobs-and-email-contexts.) - -### v1.30.0 - - - [Introduce `Console::Config` for fine grained configuration.](https://socketry.github.io/console/releases/index#introduce-console::config-for-fine-grained-configuration.) - -### v1.29.3 - - - Serialized output now uses `IO#write` with a single string to reduce the chance of interleaved output. - -### v1.29.2 - - - Always return `nil` from `Console::Filter` logging methods. - -### v1.29.1 - - - Fix logging `exception:` keyword argument when the value was not an exception. - -### v1.29.0 - - - Don't make `Kernel#warn` redirection to `Console.warn` the default behavior, you must `require 'console/warn'` to enable it. - - Remove deprecated `Console::Logger#failure`. - - [Consistent handling of exceptions.](https://socketry.github.io/console/releases/index#consistent-handling-of-exceptions.) - -### v1.28.0 - - - Add support for `Kernel#warn` redirection to `Console.warn`. - -## Contributing - -We welcome contributions to this project. - -1. Fork it. -2. Create your feature branch (`git checkout -b my-new-feature`). -3. Commit your changes (`git commit -am 'Add some feature'`). -4. Push to the branch (`git push origin my-new-feature`). -5. Create new Pull Request. - -### Developer Certificate of Origin - -In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed. - -### Community Guidelines - -This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers. - -## See Also - - - [console-adapter-rails](https://github.com/socketry/console-adapter-rails) - - [console-adapter-sidekiq](https://github.com/socketry/console-adapter-sidekiq) - - [console-output-datadog](https://github.com/socketry/console-output-datadog) - - [sus-fixtures-console](https://github.com/sus-rb/sus-fixtures-console) diff --git a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/releases.md b/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/releases.md deleted file mode 100644 index 3bbb1eb2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/console-1.31.0/releases.md +++ /dev/null @@ -1,115 +0,0 @@ -# Releases - -## v1.31.0 - -### Ractor compatibility. - -The console library now works correctly with Ruby's Ractor concurrency model. Previously, attempting to use console logging within Ractors would fail with errors about non-shareable objects. This has been fixed by ensuring the default configuration is properly frozen. - -``` ruby -# This now works without errors: -ractor = Ractor.new do - require 'console' - Console.info('Hello from Ractor!') - 'Ractor completed successfully' -end - -result = ractor.take -puts result # => 'Ractor completed successfully' -``` - -The fix is minimal and maintains full backward compatibility while enabling safe parallel logging across multiple Ractors. - -### Symbol log level compatibility. - -Previously, returning symbols from custom `log_level` methods in configuration files would cause runtime errors like "comparison of Integer with :debug failed". This has been fixed to properly convert symbols to their corresponding integer values. - -``` ruby -# config/console.rb - This now works correctly: -def log_level(env = ENV) - :debug # Automatically converted to Console::Logger::LEVELS[:debug] -end -``` - -While this fix maintains backward compatibility, the recommended approach is still to use integer values directly: - -``` ruby -# config/console.rb - Recommended approach: -def log_level(env = ENV) - Console::Logger::LEVELS[:debug] # Returns 0 -end -``` - -### Improved output format selection for cron jobs and email contexts. - -When `MAILTO` environment variable is set (typically in cron jobs), the console library now prefers human-readable terminal output instead of JSON serialized output, even when the output stream is not a TTY. This ensures that cron job output sent via email is formatted in a readable way for administrators. - -``` ruby -# Previously in cron jobs (non-TTY), this would output JSON: -# {"time":"2025-06-07T10:30:00Z","severity":"info","subject":"CronJob","message":["Task completed"]} - -# Now with MAILTO set, it outputs human-readable format: -# 0.1s info: CronJob -# | Task completed -``` - -This change is conservative and only affects environments where `MAILTO` is explicitly set, ensuring compatibility with existing deployments. - -## v1.30.0 - -### Introduce `Console::Config` for fine grained configuration. - -Introduced a new explicit configuration interface via config/console.rb to enhance logging setup in complex applications. This update gives the application code an opportunity to load files if required and control aspects such as log level, output, and more. Users can override default behaviors (e.g., make\_output, make\_logger, and log\_level) for improved customization. - -``` ruby -# config/console.rb -def log_level(env = ENV) - # Set a custom log level, e.g., force debug mode: - :debug -end - -def make_logger(output = $stderr, env = ENV, **options) - # Custom logger configuration with verbose output: - options[:verbose] = true - - Logger.new(output, **options) -end -``` - -This approach provides a standard way to hook into the log setup process, allowing tailored adjustments for reliable and customizable logging behavior. - -## v1.29.3 - - - Serialized output now uses `IO#write` with a single string to reduce the chance of interleaved output. - -## v1.29.2 - - - Always return `nil` from `Console::Filter` logging methods. - -## v1.29.1 - - - Fix logging `exception:` keyword argument when the value was not an exception. - -## v1.29.0 - - - Don't make `Kernel#warn` redirection to `Console.warn` the default behavior, you must `require 'console/warn'` to enable it. - - Remove deprecated `Console::Logger#failure`. - -### Consistent handling of exceptions. - -`Console.call` and all wrapper methods will now consistently handle exceptions that are the last positional argument or keyword argument. This means that the following code will work as expected: - -``` ruby -begin -rescue => error - # Last positional argument: - Console.warn(self, "There may be an issue", error) - - # Keyword argument (preferable): - Console.error(self, "There is an issue", exception: error) -end -``` - -## v1.28.0 - - - Add support for `Kernel#warn` redirection to `Console.warn`. diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/LICENSE.txt b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/LICENSE.txt deleted file mode 100644 index 07b1b7fe..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/LICENSE.txt +++ /dev/null @@ -1,33 +0,0 @@ -Copyright (C) 2005-2016 James Edward Gray II. All rights reserved. -Copyright (C) 2007-2017 Yukihiro Matsumoto. All rights reserved. -Copyright (C) 2017 SHIBATA Hiroshi. All rights reserved. -Copyright (C) 2017 Olivier Lacan. All rights reserved. -Copyright (C) 2017 Espartaco Palma. All rights reserved. -Copyright (C) 2017 Marcus Stollsteimer. All rights reserved. -Copyright (C) 2017 pavel. All rights reserved. -Copyright (C) 2017-2018 Steven Daniels. All rights reserved. -Copyright (C) 2018 Tomohiro Ogoke. All rights reserved. -Copyright (C) 2018 Kouhei Sutou. All rights reserved. -Copyright (C) 2018 Mitsutaka Mimura. All rights reserved. -Copyright (C) 2018 Vladislav. 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 AUTHOR 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 AUTHOR 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/bundle/ruby/3.2.0/gems/csv-3.3.5/NEWS.md b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/NEWS.md deleted file mode 100644 index 58e44322..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/NEWS.md +++ /dev/null @@ -1,1009 +0,0 @@ -# News - -## 3.3.5 - 2025-06-01 - -### Improvements - - * docs: Fixed `StringScanner` document URL. - * GH-343 - * Patch by Petrik de Heus - -### Thanks - - * Petrik de Heus - -## 3.3.4 - 2025-04-13 - -### Improvements - - * `csv-filter`: Removed an experimental command line tool. - * GH-341 - -## 3.3.3 - 2025-03-20 - -### Improvements - - * `csv-filter`: Added an experimental command line tool to filter a CSV. - * Patch by Burdette Lamar - -### Fixes - - * Fixed wrong EOF detection for `ARGF` - * GH-328 - * Reported by Takeshi Nishimatsu - - * Fixed a regression bug that `CSV.open` rejects integer mode. - * GH-336 - * Reported by Dave Burgess - -### Thanks - - * Takeshi Nishimatsu - - * Burdette Lamar - - * Dave Burgess - -## 3.3.2 - 2024-12-21 - -### Fixes - - * Fixed a parse bug with a quoted line with `col_sep` and an empty - line. This was introduced in 3.3.1. - * GH-324 - * Reported by stoodfarback - -### Thanks - - * stoodfarback - -## 3.3.1 - 2024-12-15 - -### Improvements - - * `CSV.open`: Changed to detect BOM by default. Note that this isn't - enabled on Windows because Ruby may have a bug. See also: - https://bugs.ruby-lang.org/issues/20526 - * GH-301 - * Reported by Junichi Ito - - * Improved performance. - * GH-311 - * GH-312 - * Patch by Vladimir Kochnev - - * `CSV.open`: Added support for `StringIO` as an input. - * GH-300 - * GH-302 - * Patch by Marcelo - - * Added a built-in time converter. You can use it by `converters: - :time`. - * GH-313 - * Patch by Bart de Water - - * Added `CSV::TSV` for tab-separated values. - * GH-272 - * GH-319 - * Reported by kojix2 - * Patch by Jas - -### Thanks - - * Junichi Ito - - * Vladimir Kochnev - - * Marcelo - - * Bart de Water - - * kojix2 - - * Jas - -## 3.3.0 - 2024-03-22 - -### Fixes - - * Fixed a regression parse bug in 3.2.9 that parsing with - `:skip_lines` may cause wrong result. - -## 3.2.9 - 2024-03-22 - -### Fixes - - * Fixed a parse bug that wrong result may be happen when: - - * `:skip_lines` is used - * `:row_separator` is `"\r\n"` - * There is a line that includes `\n` as a column value - - Reported by Ryo Tsukamoto. - - GH-296 - -### Thanks - - * Ryo Tsukamoto - -## 3.2.8 - 2023-11-08 - -### Improvements - - * Added `CSV::InvalidEncodingError`. - - Patch by Kosuke Shibata. - - GH-287 - -### Thanks - - * Kosuke Shibata - -## 3.2.7 - 2023-06-26 - -### Improvements - - * Removed an unused internal variable. - [GH-273](https://github.com/ruby/csv/issues/273) - [Patch by Mau Magnaguagno] - - * Changed to use `https://` instead of `http://` in documents. - [GH-274](https://github.com/ruby/csv/issues/274) - [Patch by Vivek Bharath Akupatni] - - * Added prefix to a helper module in test. - [GH-278](https://github.com/ruby/csv/issues/278) - [Patch by Luke Gruber] - - * Added a documentation for `liberal_parsing: {backslash_quotes: true}`. - [GH-280](https://github.com/ruby/csv/issues/280) - [Patch by Mark Schneider] - -### Fixes - - * Fixed a wrong execution result in documents. - [GH-276](https://github.com/ruby/csv/issues/276) - [Patch by Yuki Tsujimoto] - - * Fixed a bug that the same line is used multiple times. - [GH-279](https://github.com/ruby/csv/issues/279) - [Reported by Gabriel Nagy] - -### Thanks - - * Mau Magnaguagno - - * Vivek Bharath Akupatni - - * Yuki Tsujimoto - - * Luke Gruber - - * Mark Schneider - - * Gabriel Nagy - -## 3.2.6 - 2022-12-08 - -### Improvements - - * `CSV#read` consumes the same lines with other methods like - `CSV#shift`. - [[GitHub#258](https://github.com/ruby/csv/issues/258)] - [Reported by Lhoussaine Ghallou] - - * All `Enumerable` based methods consume the same lines with other - methods. This may have a performance penalty. - [[GitHub#260](https://github.com/ruby/csv/issues/260)] - [Reported by Lhoussaine Ghallou] - - * Simplify some implementations. - [[GitHub#262](https://github.com/ruby/csv/pull/262)] - [[GitHub#263](https://github.com/ruby/csv/pull/263)] - [Patch by Mau Magnaguagno] - -### Fixes - - * Fixed `CSV.generate_lines` document. - [[GitHub#257](https://github.com/ruby/csv/pull/257)] - [Patch by Sampat Badhe] - -### Thanks - - * Sampat Badhe - - * Lhoussaine Ghallou - - * Mau Magnaguagno - -## 3.2.5 - 2022-08-26 - -### Improvements - - * Added `CSV.generate_lines`. - [[GitHub#255](https://github.com/ruby/csv/issues/255)] - [Reported by OKURA Masafumi] - [[GitHub#256](https://github.com/ruby/csv/pull/256)] - [Patch by Eriko Sugiyama] - -### Thanks - - * OKURA Masafumi - - * Eriko Sugiyama - -## 3.2.4 - 2022-08-22 - -### Improvements - - * Cleaned up internal implementations. - [[GitHub#249](https://github.com/ruby/csv/pull/249)] - [[GitHub#250](https://github.com/ruby/csv/pull/250)] - [[GitHub#251](https://github.com/ruby/csv/pull/251)] - [Patch by Mau Magnaguagno] - - * Added support for RFC 3339 style time. - [[GitHub#248](https://github.com/ruby/csv/pull/248)] - [Patch by Thierry Lambert] - - * Added support for transcoding String CSV. Syntax is - `from-encoding:to-encoding`. - [[GitHub#254](https://github.com/ruby/csv/issues/254)] - [Reported by Richard Stueven] - - * Added quoted information to `CSV::FieldInfo`. - [[GitHub#254](https://github.com/ruby/csv/pull/253)] - [Reported by Hirokazu SUZUKI] - -### Fixes - - * Fixed a link in documents. - [[GitHub#244](https://github.com/ruby/csv/pull/244)] - [Patch by Peter Zhu] - -### Thanks - - * Peter Zhu - - * Mau Magnaguagno - - * Thierry Lambert - - * Richard Stueven - - * Hirokazu SUZUKI - -## 3.2.3 - 2022-04-09 - -### Improvements - - * Added contents summary to `CSV::Table#inspect`. - [GitHub#229][Patch by Eriko Sugiyama] - [GitHub#235][Patch by Sampat Badhe] - - * Suppressed `$INPUT_RECORD_SEPARATOR` deprecation warning by - `Warning.warn`. - [GitHub#233][Reported by Jean byroot Boussier] - - * Improved error message for liberal parsing with quoted values. - [GitHub#231][Patch by Nikolay Rys] - - * Fixed typos in documentation. - [GitHub#236][Patch by Sampat Badhe] - - * Added `:max_field_size` option and deprecated `:field_size_limit` option. - [GitHub#238][Reported by Dan Buettner] - - * Added `:symbol_raw` to built-in header converters. - [GitHub#237][Reported by taki] - [GitHub#239][Patch by Eriko Sugiyama] - -### Fixes - - * Fixed a bug that some texts may be dropped unexpectedly. - [Bug #18245][ruby-core:105587][Reported by Hassan Abdul Rehman] - - * Fixed a bug that `:field_size_limit` doesn't work with not complex row. - [GitHub#238][Reported by Dan Buettner] - -### Thanks - - * Hassan Abdul Rehman - - * Eriko Sugiyama - - * Jean byroot Boussier - - * Nikolay Rys - - * Sampat Badhe - - * Dan Buettner - - * taki - -## 3.2.2 - 2021-12-24 - -### Improvements - - * Added a validation for invalid option combination. - [GitHub#225][Patch by adamroyjones] - - * Improved documentation for developers. - [GitHub#227][Patch by Eriko Sugiyama] - -### Fixes - - * Fixed a bug that all of `ARGF` contents may not be consumed. - [GitHub#228][Reported by Rafael Navaza] - -### Thanks - - * adamroyjones - - * Eriko Sugiyama - - * Rafael Navaza - -## 3.2.1 - 2021-10-23 - -### Improvements - - * doc: Fixed wrong class name. - [GitHub#217][Patch by Vince] - - * Changed to always use `"\n"` for the default row separator on Ruby - 3.0 or later because `$INPUT_RECORD_SEPARATOR` was deprecated - since Ruby 3.0. - - * Added support for Ractor. - [GitHub#218][Patch by rm155] - - * Users who want to use the built-in converters in non-main - Ractors need to call `Ractor.make_shareable(CSV::Converters)` - and/or `Ractor.make_shareable(CSV::HeaderConverters)` before - creating non-main Ractors. - -### Thanks - - * Vince - - * Joakim Antman - - * rm155 - -## 3.2.0 - 2021-06-06 - -### Improvements - - * `CSV.open`: Added support for `:newline` option. - [GitHub#198][Patch by Nobuyoshi Nakada] - - * `CSV::Table#each`: Added support for column mode with duplicated - headers. - [GitHub#206][Reported by Yaroslav Berezovskiy] - - * `Object#CSV`: Added support for Ruby 3.0. - - * `CSV::Row`: Added support for pattern matching. - [GitHub#207][Patch by Kevin Newton] - -### Fixes - - * Fixed typos in documentation. - [GitHub#196][GitHub#205][Patch by Sampat Badhe] - -### Thanks - - * Sampat Badhe - - * Nobuyoshi Nakada - - * Yaroslav Berezovskiy - - * Kevin Newton - -## 3.1.9 - 2020-11-23 - -### Fixes - - * Fixed a compatibility bug that the line to be processed by - `skip_lines:` has a row separator. - [GitHub#194][Reported by Josef Šimánek] - -### Thanks - - * Josef Šimánek - -## 3.1.8 - 2020-11-18 - -### Improvements - - * Improved documentation. - [Patch by Burdette Lamar] - -### Thanks - - * Burdette Lamar - -## 3.1.7 - 2020-08-04 - -### Improvements - - * Improved document. - [GitHub#158][GitHub#160][GitHub#161] - [Patch by Burdette Lamar] - - * Updated required Ruby version to 2.5.0 or later. - [GitHub#159] - [Patch by Gabriel Nagy] - - * Removed stringio 0.1.3 or later dependency. - -### Thanks - - * Burdette Lamar - - * Gabriel Nagy - -## 3.1.6 - 2020-07-20 - -### Improvements - - * Improved document. - [GitHub#127][GitHub#135][GitHub#136][GitHub#137][GitHub#139][GitHub#140] - [GitHub#141][GitHub#142][GitHub#143][GitHub#145][GitHub#146][GitHub#148] - [GitHub#148][GitHub#151][GitHub#152][GitHub#154][GitHub#155][GitHub#157] - [Patch by Burdette Lamar] - - * `CSV.open`: Added support for `undef: :replace`. - [GitHub#129][Patch by Koichi ITO] - - * `CSV.open`: Added support for `invalid: :replace`. - [GitHub#129][Patch by Koichi ITO] - - * Don't run quotable check for invalid encoding field values. - [GitHub#131][Patch by Koichi ITO] - - * Added support for specifying the target indexes and names to - `force_quotes:`. - [GitHub#153][Reported by Aleksandr] - - * `CSV.generate`: Changed to use the encoding of the first non-ASCII - field rather than the encoding of ASCII only field. - - * Changed to require the stringio gem 0.1.3 or later. - -### Thanks - - * Burdette Lamar - - * Koichi ITO - - * Aleksandr - -## 3.1.5 - 2020-05-18 - -### Improvements - - * Improved document. - [GitHub#124][Patch by Burdette Lamar] - -### Fixes - - * Added missing document files. - [GitHub#125][Reported by joast] - -### Thanks - - * Burdette Lamar - - * joast - -## 3.1.4 - 2020-05-17 - -### Improvements - - * Improved document. - [GitHub#122][Patch by Burdette Lamar] - - * Stopped to dropping stack trace for exception caused by - `CSV.parse_line`. - [GitHub#120][Reported by Kyle d'Oliveira] - -### Fixes - - * Fixed a bug that `:write_nil_value` or `:write_empty_value` don't - work with non `String` objects. - [GitHub#123][Reported by asm256] - -### Thanks - - * Burdette Lamar - - * asm256 - - * Kyle d'Oliveira - -## 3.1.3 - 2020-05-09 - -### Improvements - - * `CSV::Row#dup`: Copied deeply. - [GitHub#108][Patch by Jim Kane] - -### Fixes - - * Fixed a infinite loop bug for zero length match `skip_lines`. - [GitHub#110][Patch by Mike MacDonald] - - * `CSV.generate`: Fixed a bug that encoding isn't set correctly. - [GitHub#110][Patch by Seiei Miyagi] - - * Fixed document for the `:strip` option. - [GitHub#114][Patch by TOMITA Masahiro] - - * Fixed a parse bug when split charcter exists in middle of column - value. - [GitHub#115][Reported by TOMITA Masahiro] - -### Thanks - - * Jim Kane - - * Mike MacDonald - - * Seiei Miyagi - - * TOMITA Masahiro - -## 3.1.2 - 2019-10-12 - -### Improvements - - * Added `:col_sep` check. - [GitHub#94][Reported by Florent Beaurain] - - * Suppressed warnings. - [GitHub#96][Patch by Nobuyoshi Nakada] - - * Improved documentation. - [GitHub#101][GitHub#102][Patch by Vitor Oliveira] - -### Fixes - - * Fixed a typo in documentation. - [GitHub#95][Patch by Yuji Yaginuma] - - * Fixed a multibyte character handling bug. - [GitHub#97][Patch by koshigoe] - - * Fixed typos in documentation. - [GitHub#100][Patch by Vitor Oliveira] - - * Fixed a bug that seeked `StringIO` isn't accepted. - [GitHub#98][Patch by MATSUMOTO Katsuyoshi] - - * Fixed a bug that `CSV.generate_line` doesn't work with - `Encoding.default_internal`. - [GitHub#105][Reported by David Rodríguez] - -### Thanks - - * Florent Beaurain - - * Yuji Yaginuma - - * Nobuyoshi Nakada - - * koshigoe - - * Vitor Oliveira - - * MATSUMOTO Katsuyoshi - - * David Rodríguez - -## 3.1.1 - 2019-04-26 - -### Improvements - - * Added documentation for `strip` option. - [GitHub#88][Patch by hayashiyoshino] - - * Added documentation for `write_converters`, `write_nil_value` and - `write_empty_value` options. - [GitHub#87][Patch by Masafumi Koba] - - * Added documentation for `quote_empty` option. - [GitHub#89][Patch by kawa\_tech] - -### Fixes - - * Fixed a bug that `strip; true` removes a newline. - -### Thanks - - * hayashiyoshino - - * Masafumi Koba - - * kawa\_tech - -## 3.1.0 - 2019-04-17 - -### Fixes - - * Fixed a backward incompatibility bug that `CSV#eof?` may raises an - error. - [GitHub#86][Reported by krororo] - -### Thanks - - * krororo - -## 3.0.9 - 2019-04-15 - -### Fixes - - * Fixed a test for Windows. - -## 3.0.8 - 2019-04-11 - -### Fixes - - * Fixed a bug that `strip: String` doesn't work. - -## 3.0.7 - 2019-04-08 - -### Improvements - - * Improve parse performance 1.5x by introducing loose parser. - -### Fixes - - * Fix performance regression in 3.0.5. - - * Fix a bug that `CSV#line` returns wrong value when you - use `quote_char: nil`. - -## 3.0.6 - 2019-03-30 - -### Improvements - - * `CSV.foreach`: Added support for `mode`. - -## 3.0.5 - 2019-03-24 - -### Improvements - - * Added `:liberal_parsing => {backslash_quote: true}` option. - [GitHub#74][Patch by 284km] - - * Added `:write_converters` option. - [GitHub#73][Patch by Danillo Souza] - - * Added `:write_nil_value` option. - - * Added `:write_empty_value` option. - - * Improved invalid byte line number detection. - [GitHub#78][Patch by Alyssa Ross] - - * Added `quote_char: nil` optimization. - [GitHub#79][Patch by 284km] - - * Improved error message. - [GitHub#81][Patch by Andrés Torres] - - * Improved IO-like implementation for `StringIO` data. - [GitHub#80][Patch by Genadi Samokovarov] - - * Added `:strip` option. - [GitHub#58] - -### Fixes - - * Fixed a compatibility bug that `CSV#each` doesn't care `CSV#shift`. - [GitHub#76][Patch by Alyssa Ross] - - * Fixed a compatibility bug that `CSV#eof?` doesn't care `CSV#each` - and `CSV#shift`. - [GitHub#77][Reported by Chi Leung] - - * Fixed a compatibility bug that invalid line isn't ignored. - [GitHub#82][Reported by krororo] - - * Fixed a bug that `:skip_lines` doesn't work with multibyte characters data. - [GitHub#83][Reported by ff2248] - -### Thanks - - * Alyssa Ross - - * 284km - - * Chi Leung - - * Danillo Souza - - * Andrés Torres - - * Genadi Samokovarov - - * krororo - - * ff2248 - -## 3.0.4 - 2019-01-25 - -### Improvements - - * Removed duplicated `CSV::Row#include?` implementations. - [GitHub#69][Patch by Max Schwenk] - - * Removed duplicated `CSV::Row#header?` implementations. - [GitHub#70][Patch by Max Schwenk] - -### Fixes - - * Fixed a typo in document. - [GitHub#72][Patch by Artur Beljajev] - - * Fixed a compatibility bug when row headers are changed. - [GitHub#71][Reported by tomoyuki kosaka] - -### Thanks - - * Max Schwenk - - * Artur Beljajev - - * tomoyuki kosaka - -## 3.0.3 - 2019-01-12 - -### Improvements - - * Migrated benchmark tool to benchmark-driver from benchmark-ips. - [GitHub#57][Patch by 284km] - - * Added `liberal_parsing: {double_quote_outside_quote: true}` parse - option. - [GitHub#66][Reported by Watson] - - * Added `quote_empty:` write option. - [GitHub#35][Reported by Dave Myron] - -### Fixes - - * Fixed a compatibility bug that `CSV.generate` always return - `ASCII-8BIT` encoding string. - [GitHub#63][Patch by Watson] - - * Fixed a compatibility bug that `CSV.parse("", headers: true)` - doesn't return `CSV::Table`. - [GitHub#64][Reported by Watson][Patch by 284km] - - * Fixed a compatibility bug that multiple-characters column - separator doesn't work. - [GitHub#67][Reported by Jesse Reiss] - - * Fixed a compatibility bug that double `#each` parse twice. - [GitHub#68][Reported by Max Schwenk] - -### Thanks - - * Watson - - * 284km - - * Jesse Reiss - - * Dave Myron - - * Max Schwenk - -## 3.0.2 - 2018-12-23 - -### Improvements - - * Changed to use strscan in parser. - [GitHub#52][Patch by 284km] - - * Improves CSV write performance. - 3.0.2 will be about 2 times faster than 3.0.1. - - * Improves CSV parse performance for complex case. - 3.0.2 will be about 2 times faster than 3.0.1. - -### Fixes - - * Fixed a parse error bug for new line only input with `headers` option. - [GitHub#53][Reported by Chris Beer] - - * Fixed some typos in document. - [GitHub#54][Patch by Victor Shepelev] - -### Thanks - - * 284km - - * Chris Beer - - * Victor Shepelev - -## 3.0.1 - 2018-12-07 - -### Improvements - - * Added a test. - [GitHub#38][Patch by 284km] - - * `CSV::Row#dup`: Changed to duplicate internal data. - [GitHub#39][Reported by André Guimarães Sakata] - - * Documented `:nil_value` and `:empty_value` options. - [GitHub#41][Patch by OwlWorks] - - * Added support for separator detection for non-seekable inputs. - [GitHub#45][Patch by Ilmari Karonen] - - * Removed needless code. - [GitHub#48][Patch by Espartaco Palma] - - * Added support for parsing header only CSV with `headers: true`. - [GitHub#47][Patch by Kazuma Shibasaka] - - * Added support for coverage report in CI. - [GitHub#48][Patch by Espartaco Palma] - - * Improved auto CR row separator detection. - [GitHub#51][Reported by Yuki Kurihara] - -### Fixes - - * Fixed a typo in document. - [GitHub#40][Patch by Marcus Stollsteimer] - -### Thanks - - * 284km - - * André Guimarães Sakata - - * Marcus Stollsteimer - - * OwlWorks - - * Ilmari Karonen - - * Espartaco Palma - - * Kazuma Shibasaka - - * Yuki Kurihara - -## 3.0.0 - 2018-06-06 - -### Fixes - - * Fixed a bug that header isn't returned for empty row. - [GitHub#37][Patch by Grace Lee] - -### Thanks - - * Grace Lee - -## 1.0.2 - 2018-05-03 - -### Improvements - - * Split file for CSV::VERSION - - * Code cleanup: Split csv.rb into a more manageable structure - [GitHub#19][Patch by Espartaco Palma] - [GitHub#20][Patch by Steven Daniels] - - * Use CSV::MalformedCSVError for invalid encoding line - [GitHub#26][Reported by deepj] - - * Support implicit Row <-> Array conversion - [Bug #10013][ruby-core:63582][Reported by Dawid Janczak] - - * Update class docs - [GitHub#32][Patch by zverok] - - * Add `Row#each_pair` - [GitHub#33][Patch by zverok] - - * Improve CSV performance - [GitHub#30][Patch by Watson] - - * Add :nil_value and :empty_value option - -### Fixes - - * Fix a bug that "bom|utf-8" doesn't work - [GitHub#23][Reported by Pavel Lobashov] - - * `CSV::Row#to_h`, `#to_hash`: uses the same value as `Row#[]` - [Bug #14482][Reported by tomoya ishida] - - * Make row separator detection more robust - [GitHub#25][Reported by deepj] - - * Fix a bug that too much separator when col_sep is `" "` - [Bug #8784][ruby-core:63582][Reported by Sylvain Laperche] - -### Thanks - - * Espartaco Palma - - * Steven Daniels - - * deepj - - * Dawid Janczak - - * zverok - - * Watson - - * Pavel Lobashov - - * tomoya ishida - - * Sylvain Laperche - - * Ryunosuke Sato - -## 1.0.1 - 2018-02-09 - -### Improvements - - * `CSV::Table#delete`: Added bulk delete support. You can delete - multiple rows and columns at once. - [GitHub#4][Patch by Vladislav] - - * Updated Gem description. - [GitHub#11][Patch by Marcus Stollsteimer] - - * Code cleanup. - [GitHub#12][Patch by Marcus Stollsteimer] - [GitHub#14][Patch by Steven Daniels] - [GitHub#18][Patch by takkanm] - - * `CSV::Table#dig`: Added. - [GitHub#15][Patch by Tomohiro Ogoke] - - * `CSV::Row#dig`: Added. - [GitHub#15][Patch by Tomohiro Ogoke] - - * Added ISO 8601 support to date time converter. - [GitHub#16] - -### Fixes - - * Fixed wrong `CSV::VERSION`. - [GitHub#10][Reported by Marcus Stollsteimer] - - * `CSV.generate`: Fixed a regression bug that `String` argument is - ignored. - [GitHub#13][Patch by pavel] - -### Thanks - - * Vladislav - - * Marcus Stollsteimer - - * Steven Daniels - - * takkanm - - * Tomohiro Ogoke - - * pavel diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/README.md b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/README.md deleted file mode 100644 index cf61a358..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# CSV - -This library provides a complete interface to CSV files and data. It offers tools to enable you to read and write to and from Strings or IO objects, as needed. - -## Installation - -Add this line to your application's Gemfile: - -```ruby -gem 'csv' -``` - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install csv - -## Usage - -```ruby -require "csv" - -CSV.foreach("path/to/file.csv") do |row| - # use row here... -end -``` - -## Documentation - -- [API](https://ruby.github.io/csv/): all classes, methods, and constants. -- [Recipes](https://ruby.github.io/csv/doc/csv/recipes/recipes_rdoc.html): specific code for specific tasks. - -## Development - -After checking out the repo, run `ruby run-test.rb` to check if your changes can pass the test. - -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). - -## Contributing - -Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/csv. - -### NOTE: About RuboCop - -We don't use RuboCop because we can manage our coding style by ourselves. We want to accept small fluctuations in our coding style because we use Ruby. -Please do not submit issues and PRs that aim to introduce RuboCop in this repository. - -## License - -The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause). - -See LICENSE.txt for details. diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/arguments/io.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/arguments/io.rdoc deleted file mode 100644 index f5fe1d19..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/arguments/io.rdoc +++ /dev/null @@ -1,5 +0,0 @@ -* Argument +io+ should be an IO object that is: - * Open for reading; on return, the IO object will be closed. - * Positioned at the beginning. - To position at the end, for appending, use method CSV.generate. - For any other positioning, pass a preset \StringIO object instead. diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/col_sep.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/col_sep.rdoc deleted file mode 100644 index b8be8699..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/col_sep.rdoc +++ /dev/null @@ -1,57 +0,0 @@ -====== Option +col_sep+ - -Specifies the \String column separator to be used -for both parsing and generating. -The \String will be transcoded into the data's \Encoding before use. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:col_sep) # => "," (comma) - -Using the default (comma): - str = CSV.generate do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo,0\nbar,1\nbaz,2\n" - ary = CSV.parse(str) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Using +:+ (colon): - col_sep = ':' - str = CSV.generate(col_sep: col_sep) do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo:0\nbar:1\nbaz:2\n" - ary = CSV.parse(str, col_sep: col_sep) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Using +::+ (two colons): - col_sep = '::' - str = CSV.generate(col_sep: col_sep) do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo::0\nbar::1\nbaz::2\n" - ary = CSV.parse(str, col_sep: col_sep) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Using '' (empty string): - col_sep = '' - str = CSV.generate(col_sep: col_sep) do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo0\nbar1\nbaz2\n" - ---- - -Raises an exception if parsing with the empty \String: - col_sep = '' - # Raises ArgumentError (:col_sep must be 1 or more characters: "") - CSV.parse("foo0\nbar1\nbaz2\n", col_sep: col_sep) - diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/quote_char.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/quote_char.rdoc deleted file mode 100644 index 67fd3af6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/quote_char.rdoc +++ /dev/null @@ -1,42 +0,0 @@ -====== Option +quote_char+ - -Specifies the character (\String of length 1) used used to quote fields -in both parsing and generating. -This String will be transcoded into the data's \Encoding before use. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:quote_char) # => "\"" (double quote) - -This is useful for an application that incorrectly uses ' (single-quote) -to quote fields, instead of the correct " (double-quote). - -Using the default (double quote): - str = CSV.generate do |csv| - csv << ['foo', 0] - csv << ["'bar'", 1] - csv << ['"baz"', 2] - end - str # => "foo,0\n'bar',1\n\"\"\"baz\"\"\",2\n" - ary = CSV.parse(str) - ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]] - -Using ' (single-quote): - quote_char = "'" - str = CSV.generate(quote_char: quote_char) do |csv| - csv << ['foo', 0] - csv << ["'bar'", 1] - csv << ['"baz"', 2] - end - str # => "foo,0\n'''bar''',1\n\"baz\",2\n" - ary = CSV.parse(str, quote_char: quote_char) - ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]] - ---- - -Raises an exception if the \String length is greater than 1: - # Raises ArgumentError (:quote_char has to be nil or a single character String) - CSV.new('', quote_char: 'xx') - -Raises an exception if the value is not a \String: - # Raises ArgumentError (:quote_char has to be nil or a single character String) - CSV.new('', quote_char: :foo) diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/row_sep.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/row_sep.rdoc deleted file mode 100644 index eae15b4a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/common/row_sep.rdoc +++ /dev/null @@ -1,91 +0,0 @@ -====== Option +row_sep+ - -Specifies the row separator, a \String or the \Symbol :auto (see below), -to be used for both parsing and generating. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:row_sep) # => :auto - ---- - -When +row_sep+ is a \String, that \String becomes the row separator. -The String will be transcoded into the data's Encoding before use. - -Using "\n": - row_sep = "\n" - str = CSV.generate(row_sep: row_sep) do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo,0\nbar,1\nbaz,2\n" - ary = CSV.parse(str) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Using | (pipe): - row_sep = '|' - str = CSV.generate(row_sep: row_sep) do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo,0|bar,1|baz,2|" - ary = CSV.parse(str, row_sep: row_sep) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Using -- (two hyphens): - row_sep = '--' - str = CSV.generate(row_sep: row_sep) do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo,0--bar,1--baz,2--" - ary = CSV.parse(str, row_sep: row_sep) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Using '' (empty string): - row_sep = '' - str = CSV.generate(row_sep: row_sep) do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo,0bar,1baz,2" - ary = CSV.parse(str, row_sep: row_sep) - ary # => [["foo", "0bar", "1baz", "2"]] - ---- - -When +row_sep+ is the \Symbol +:auto+ (the default), -generating uses "\n" as the row separator: - str = CSV.generate do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo,0\nbar,1\nbaz,2\n" - -Parsing, on the other hand, invokes auto-discovery of the row separator. - -Auto-discovery reads ahead in the data looking for the next \r\n, +\n+, or +\r+ sequence. -The sequence will be selected even if it occurs in a quoted field, -assuming that you would have the same line endings there. - -Example: - str = CSV.generate do |csv| - csv << [:foo, 0] - csv << [:bar, 1] - csv << [:baz, 2] - end - str # => "foo,0\nbar,1\nbaz,2\n" - ary = CSV.parse(str) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -The default $INPUT_RECORD_SEPARATOR ($/) is used -if any of the following is true: -* None of those sequences is found. -* Data is +ARGF+, +STDIN+, +STDOUT+, or +STDERR+. -* The stream is only available for output. - -Obviously, discovery takes a little time. Set manually if speed is important. Also note that IO objects should be opened in binary mode on Windows if this feature will be used as the line-ending translation can cause problems with resetting the document position to where it was before the read ahead. diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/force_quotes.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/force_quotes.rdoc deleted file mode 100644 index 11afd1a1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/force_quotes.rdoc +++ /dev/null @@ -1,17 +0,0 @@ -====== Option +force_quotes+ - -Specifies the boolean that determines whether each output field is to be double-quoted. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:force_quotes) # => false - -For examples in this section: - ary = ['foo', 0, nil] - -Using the default, +false+: - str = CSV.generate_line(ary) - str # => "foo,0,\n" - -Using +true+: - str = CSV.generate_line(ary, force_quotes: true) - str # => "\"foo\",\"0\",\"\"\n" diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/quote_empty.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/quote_empty.rdoc deleted file mode 100644 index 4c5645c6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/quote_empty.rdoc +++ /dev/null @@ -1,12 +0,0 @@ -====== Option +quote_empty+ - -Specifies the boolean that determines whether an empty value is to be double-quoted. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:quote_empty) # => true - -With the default +true+: - CSV.generate_line(['"', ""]) # => "\"\"\"\",\"\"\n" - -With +false+: - CSV.generate_line(['"', ""], quote_empty: false) # => "\"\"\"\",\n" diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_converters.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_converters.rdoc deleted file mode 100644 index d1a9cc74..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_converters.rdoc +++ /dev/null @@ -1,25 +0,0 @@ -====== Option +write_converters+ - -Specifies converters to be used in generating fields. -See {Write Converters}[#class-CSV-label-Write+Converters] - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:write_converters) # => nil - -With no write converter: - str = CSV.generate_line(["\na\n", "\tb\t", " c "]) - str # => "\"\na\n\",\tb\t, c \n" - -With a write converter: - strip_converter = proc {|field| field.strip } - str = CSV.generate_line(["\na\n", "\tb\t", " c "], write_converters: strip_converter) - str # => "a,b,c\n" - -With two write converters (called in order): - upcase_converter = proc {|field| field.upcase } - downcase_converter = proc {|field| field.downcase } - write_converters = [upcase_converter, downcase_converter] - str = CSV.generate_line(['a', 'b', 'c'], write_converters: write_converters) - str # => "a,b,c\n" - -See also {Write Converters}[#class-CSV-label-Write+Converters] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_empty_value.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_empty_value.rdoc deleted file mode 100644 index 67be5662..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_empty_value.rdoc +++ /dev/null @@ -1,15 +0,0 @@ -====== Option +write_empty_value+ - -Specifies the object that is to be substituted for each field -that has an empty \String. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:write_empty_value) # => "" - -Without the option: - str = CSV.generate_line(['a', '', 'c', '']) - str # => "a,\"\",c,\"\"\n" - -With the option: - str = CSV.generate_line(['a', '', 'c', ''], write_empty_value: "x") - str # => "a,x,c,x\n" diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_headers.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_headers.rdoc deleted file mode 100644 index c56aa48a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_headers.rdoc +++ /dev/null @@ -1,29 +0,0 @@ -====== Option +write_headers+ - -Specifies the boolean that determines whether a header row is included in the output; -ignored if there are no headers. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:write_headers) # => nil - -Without +write_headers+: - file_path = 't.csv' - CSV.open(file_path,'w', - :headers => ['Name','Value'] - ) do |csv| - csv << ['foo', '0'] - end - CSV.open(file_path) do |csv| - csv.shift - end # => ["foo", "0"] - -With +write_headers+": - CSV.open(file_path,'w', - :write_headers => true, - :headers => ['Name','Value'] - ) do |csv| - csv << ['foo', '0'] - end - CSV.open(file_path) do |csv| - csv.shift - end # => ["Name", "Value"] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_nil_value.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_nil_value.rdoc deleted file mode 100644 index 65d33ff5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/generating/write_nil_value.rdoc +++ /dev/null @@ -1,14 +0,0 @@ -====== Option +write_nil_value+ - -Specifies the object that is to be substituted for each +nil+-valued field. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:write_nil_value) # => nil - -Without the option: - str = CSV.generate_line(['a', nil, 'c', nil]) - str # => "a,,c,\n" - -With the option: - str = CSV.generate_line(['a', nil, 'c', nil], write_nil_value: "x") - str # => "a,x,c,x\n" diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/converters.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/converters.rdoc deleted file mode 100644 index 211fa48d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/converters.rdoc +++ /dev/null @@ -1,46 +0,0 @@ -====== Option +converters+ - -Specifies converters to be used in parsing fields. -See {Field Converters}[#class-CSV-label-Field+Converters] - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:converters) # => nil - -The value may be a field converter name -(see {Stored Converters}[#class-CSV-label-Stored+Converters]): - str = '1,2,3' - # Without a converter - array = CSV.parse_line(str) - array # => ["1", "2", "3"] - # With built-in converter :integer - array = CSV.parse_line(str, converters: :integer) - array # => [1, 2, 3] - -The value may be a converter list -(see {Converter Lists}[#class-CSV-label-Converter+Lists]): - str = '1,3.14159' - # Without converters - array = CSV.parse_line(str) - array # => ["1", "3.14159"] - # With built-in converters - array = CSV.parse_line(str, converters: [:integer, :float]) - array # => [1, 3.14159] - -The value may be a \Proc custom converter: -(see {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters]): - str = ' foo , bar , baz ' - # Without a converter - array = CSV.parse_line(str) - array # => [" foo ", " bar ", " baz "] - # With a custom converter - array = CSV.parse_line(str, converters: proc {|field| field.strip }) - array # => ["foo", "bar", "baz"] - -See also {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters] - ---- - -Raises an exception if the converter is not a converter name or a \Proc: - str = 'foo,0' - # Raises NoMethodError (undefined method `arity' for nil:NilClass) - CSV.parse(str, converters: :foo) diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/empty_value.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/empty_value.rdoc deleted file mode 100644 index 7d3bcc07..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/empty_value.rdoc +++ /dev/null @@ -1,13 +0,0 @@ -====== Option +empty_value+ - -Specifies the object that is to be substituted -for each field that has an empty \String. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:empty_value) # => "" (empty string) - -With the default, "": - CSV.parse_line('a,"",b,"",c') # => ["a", "", "b", "", "c"] - -With a different object: - CSV.parse_line('a,"",b,"",c', empty_value: 'x') # => ["a", "x", "b", "x", "c"] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/field_size_limit.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/field_size_limit.rdoc deleted file mode 100644 index 797c5776..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/field_size_limit.rdoc +++ /dev/null @@ -1,39 +0,0 @@ -====== Option +field_size_limit+ - -Specifies the \Integer field size limit. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:field_size_limit) # => nil - -This is a maximum size CSV will read ahead looking for the closing quote for a field. -(In truth, it reads to the first line ending beyond this size.) -If a quote cannot be found within the limit CSV will raise a MalformedCSVError, -assuming the data is faulty. -You can use this limit to prevent what are effectively DoS attacks on the parser. -However, this limit can cause a legitimate parse to fail; -therefore the default value is +nil+ (no limit). - -For the examples in this section: - str = <<~EOT - "a","b" - " - 2345 - ","" - EOT - str # => "\"a\",\"b\"\n\"\n2345\n\",\"\"\n" - -Using the default +nil+: - ary = CSV.parse(str) - ary # => [["a", "b"], ["\n2345\n", ""]] - -Using 50: - field_size_limit = 50 - ary = CSV.parse(str, field_size_limit: field_size_limit) - ary # => [["a", "b"], ["\n2345\n", ""]] - ---- - -Raises an exception if a field is too long: - big_str = "123456789\n" * 1024 - # Raises CSV::MalformedCSVError (Field size exceeded in line 1.) - CSV.parse('valid,fields,"' + big_str + '"', field_size_limit: 2048) diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/header_converters.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/header_converters.rdoc deleted file mode 100644 index 30918080..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/header_converters.rdoc +++ /dev/null @@ -1,43 +0,0 @@ -====== Option +header_converters+ - -Specifies converters to be used in parsing headers. -See {Header Converters}[#class-CSV-label-Header+Converters] - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:header_converters) # => nil - -Identical in functionality to option {converters}[#class-CSV-label-Option+converters] -except that: -- The converters apply only to the header row. -- The built-in header converters are +:downcase+ and +:symbol+. - -This section assumes prior execution of: - str = <<-EOT - Name,Value - foo,0 - bar,1 - baz,2 - EOT - # With no header converter - table = CSV.parse(str, headers: true) - table.headers # => ["Name", "Value"] - -The value may be a header converter name -(see {Stored Converters}[#class-CSV-label-Stored+Converters]): - table = CSV.parse(str, headers: true, header_converters: :downcase) - table.headers # => ["name", "value"] - -The value may be a converter list -(see {Converter Lists}[#class-CSV-label-Converter+Lists]): - header_converters = [:downcase, :symbol] - table = CSV.parse(str, headers: true, header_converters: header_converters) - table.headers # => [:name, :value] - -The value may be a \Proc custom converter -(see {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters]): - upcase_converter = proc {|field| field.upcase } - table = CSV.parse(str, headers: true, header_converters: upcase_converter) - table.headers # => ["NAME", "VALUE"] - -See also {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters] - diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/headers.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/headers.rdoc deleted file mode 100644 index 0ea151f2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/headers.rdoc +++ /dev/null @@ -1,63 +0,0 @@ -====== Option +headers+ - -Specifies a boolean, \Symbol, \Array, or \String to be used -to define column headers. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:headers) # => false - ---- - -Without +headers+: - str = <<-EOT - Name,Count - foo,0 - bar,1 - bax,2 - EOT - csv = CSV.new(str) - csv # => # - csv.headers # => nil - csv.shift # => ["Name", "Count"] - ---- - -If set to +true+ or the \Symbol +:first_row+, -the first row of the data is treated as a row of headers: - str = <<-EOT - Name,Count - foo,0 - bar,1 - bax,2 - EOT - csv = CSV.new(str, headers: true) - csv # => # - csv.headers # => ["Name", "Count"] - csv.shift # => # - ---- - -If set to an \Array, the \Array elements are treated as headers: - str = <<-EOT - foo,0 - bar,1 - bax,2 - EOT - csv = CSV.new(str, headers: ['Name', 'Count']) - csv - csv.headers # => ["Name", "Count"] - csv.shift # => # - ---- - -If set to a \String +str+, method CSV::parse_line(str, options) is called -with the current +options+, and the returned \Array is treated as headers: - str = <<-EOT - foo,0 - bar,1 - bax,2 - EOT - csv = CSV.new(str, headers: 'Name,Count') - csv - csv.headers # => ["Name", "Count"] - csv.shift # => # diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/liberal_parsing.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/liberal_parsing.rdoc deleted file mode 100644 index 603de286..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/liberal_parsing.rdoc +++ /dev/null @@ -1,38 +0,0 @@ -====== Option +liberal_parsing+ - -Specifies the boolean or hash value that determines whether -CSV will attempt to parse input not conformant with RFC 4180, -such as double quotes in unquoted fields. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:liberal_parsing) # => false - -For the next two examples: - str = 'is,this "three, or four",fields' - -Without +liberal_parsing+: - # Raises CSV::MalformedCSVError (Illegal quoting in str 1.) - CSV.parse_line(str) - -With +liberal_parsing+: - ary = CSV.parse_line(str, liberal_parsing: true) - ary # => ["is", "this \"three", " or four\"", "fields"] - -Use the +backslash_quote+ sub-option to parse values that use -a backslash to escape a double-quote character. This -causes the parser to treat \" as if it were -"". - -For the next two examples: - str = 'Show,"Harry \"Handcuff\" Houdini, the one and only","Tampa Theater"' - -With +liberal_parsing+, but without the +backslash_quote+ sub-option: - # Incorrect interpretation of backslash; incorrectly interprets the quoted comma as a field separator. - ary = CSV.parse_line(str, liberal_parsing: true) - ary # => ["Show", "\"Harry \\\"Handcuff\\\" Houdini", " the one and only\"", "Tampa Theater"] - puts ary[1] # => "Harry \"Handcuff\" Houdini - -With +liberal_parsing+ and its +backslash_quote+ sub-option: - ary = CSV.parse_line(str, liberal_parsing: { backslash_quote: true }) - ary # => ["Show", "Harry \"Handcuff\" Houdini, the one and only", "Tampa Theater"] - puts ary[1] # => Harry "Handcuff" Houdini, the one and only diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/nil_value.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/nil_value.rdoc deleted file mode 100644 index 412e8795..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/nil_value.rdoc +++ /dev/null @@ -1,12 +0,0 @@ -====== Option +nil_value+ - -Specifies the object that is to be substituted for each null (no-text) field. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:nil_value) # => nil - -With the default, +nil+: - CSV.parse_line('a,,b,,c') # => ["a", nil, "b", nil, "c"] - -With a different object: - CSV.parse_line('a,,b,,c', nil_value: 0) # => ["a", 0, "b", 0, "c"] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/return_headers.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/return_headers.rdoc deleted file mode 100644 index 45d2e3f3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/return_headers.rdoc +++ /dev/null @@ -1,22 +0,0 @@ -====== Option +return_headers+ - -Specifies the boolean that determines whether method #shift -returns or ignores the header row. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:return_headers) # => false - -Examples: - str = <<-EOT - Name,Count - foo,0 - bar,1 - bax,2 - EOT - # Without return_headers first row is str. - csv = CSV.new(str, headers: true) - csv.shift # => # - # With return_headers first row is headers. - csv = CSV.new(str, headers: true, return_headers: true) - csv.shift # => # - diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/skip_blanks.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/skip_blanks.rdoc deleted file mode 100644 index 2c8f7b7b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/skip_blanks.rdoc +++ /dev/null @@ -1,31 +0,0 @@ -====== Option +skip_blanks+ - -Specifies a boolean that determines whether blank lines in the input will be ignored; -a line that contains a column separator is not considered to be blank. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:skip_blanks) # => false - -See also option {skiplines}[#class-CSV-label-Option+skip_lines]. - -For examples in this section: - str = <<-EOT - foo,0 - - bar,1 - baz,2 - - , - EOT - -Using the default, +false+: - ary = CSV.parse(str) - ary # => [["foo", "0"], [], ["bar", "1"], ["baz", "2"], [], [nil, nil]] - -Using +true+: - ary = CSV.parse(str, skip_blanks: true) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]] - -Using a truthy value: - ary = CSV.parse(str, skip_blanks: :foo) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/skip_lines.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/skip_lines.rdoc deleted file mode 100644 index 1481c40a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/skip_lines.rdoc +++ /dev/null @@ -1,37 +0,0 @@ -====== Option +skip_lines+ - -Specifies an object to use in identifying comment lines in the input that are to be ignored: -* If a \Regexp, ignores lines that match it. -* If a \String, converts it to a \Regexp, ignores lines that match it. -* If +nil+, no lines are considered to be comments. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:skip_lines) # => nil - -For examples in this section: - str = <<-EOT - # Comment - foo,0 - bar,1 - baz,2 - # Another comment - EOT - str # => "# Comment\nfoo,0\nbar,1\nbaz,2\n# Another comment\n" - -Using the default, +nil+: - ary = CSV.parse(str) - ary # => [["# Comment"], ["foo", "0"], ["bar", "1"], ["baz", "2"], ["# Another comment"]] - -Using a \Regexp: - ary = CSV.parse(str, skip_lines: /^#/) - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Using a \String: - ary = CSV.parse(str, skip_lines: '#') - ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - ---- - -Raises an exception if given an object that is not a \Regexp, a \String, or +nil+: - # Raises ArgumentError (:skip_lines has to respond to #match: 0) - CSV.parse(str, skip_lines: 0) diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/strip.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/strip.rdoc deleted file mode 100644 index 56ae4310..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/strip.rdoc +++ /dev/null @@ -1,15 +0,0 @@ -====== Option +strip+ - -Specifies the boolean value that determines whether -whitespace is stripped from each input field. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:strip) # => false - -With default value +false+: - ary = CSV.parse_line(' a , b ') - ary # => [" a ", " b "] - -With value +true+: - ary = CSV.parse_line(' a , b ', strip: true) - ary # => ["a", "b"] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/unconverted_fields.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/unconverted_fields.rdoc deleted file mode 100644 index 3e7f839d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/options/parsing/unconverted_fields.rdoc +++ /dev/null @@ -1,27 +0,0 @@ -====== Option +unconverted_fields+ - -Specifies the boolean that determines whether unconverted field values are to be available. - -Default value: - CSV::DEFAULT_OPTIONS.fetch(:unconverted_fields) # => nil - -The unconverted field values are those found in the source data, -prior to any conversions performed via option +converters+. - -When option +unconverted_fields+ is +true+, -each returned row (\Array or \CSV::Row) has an added method, -+unconverted_fields+, that returns the unconverted field values: - str = <<-EOT - foo,0 - bar,1 - baz,2 - EOT - # Without unconverted_fields - csv = CSV.parse(str, converters: :integer) - csv # => [["foo", 0], ["bar", 1], ["baz", 2]] - csv.first.respond_to?(:unconverted_fields) # => false - # With unconverted_fields - csv = CSV.parse(str, converters: :integer, unconverted_fields: true) - csv # => [["foo", 0], ["bar", 1], ["baz", 2]] - csv.first.respond_to?(:unconverted_fields) # => true - csv.first.unconverted_fields # => ["foo", "0"] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/filtering.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/filtering.rdoc deleted file mode 100644 index d92afb72..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/filtering.rdoc +++ /dev/null @@ -1,226 +0,0 @@ -== Recipes for Filtering \CSV - -These recipes are specific code examples for specific \CSV filtering tasks. - -For other recipes, see {Recipes for CSV}[./recipes_rdoc.html]. - -All code snippets on this page assume that the following has been executed: - require 'csv' - -=== Contents - -- {Source and Output Formats}[#label-Source+and+Output+Formats] - - {Filtering String to String}[#label-Filtering+String+to+String] - - {Recipe: Filter String to String parsing Headers}[#label-Recipe-3A+Filter+String+to+String+parsing+Headers] - - {Recipe: Filter String to String parsing and writing Headers}[#label-Recipe-3A+Filter+String+to+String+parsing+and+writing+Headers] - - {Recipe: Filter String to String Without Headers}[#label-Recipe-3A+Filter+String+to+String+Without+Headers] - - {Filtering String to IO Stream}[#label-Filtering+String+to+IO+Stream] - - {Recipe: Filter String to IO Stream parsing Headers}[#label-Recipe-3A+Filter+String+to+IO+Stream+parsing+Headers] - - {Recipe: Filter String to IO Stream parsing and writing Headers}[#label-Recipe-3A+Filter+String+to+IO+Stream+parsing+and+writing+Headers] - - {Recipe: Filter String to IO Stream Without Headers}[#label-Recipe-3A+Filter+String+to+IO+Stream+Without+Headers] - - {Filtering IO Stream to String}[#label-Filtering+IO+Stream+to+String] - - {Recipe: Filter IO Stream to String parsing Headers}[#label-Recipe-3A+Filter+IO+Stream+to+String+parsing+Headers] - - {Recipe: Filter IO Stream to String parsing and writing Headers}[#label-Recipe-3A+Filter+IO+Stream+to+String+parsing+and+writing+Headers] - - {Recipe: Filter IO Stream to String Without Headers}[#label-Recipe-3A+Filter+IO+Stream+to+String+Without+Headers] - - {Filtering IO Stream to IO Stream}[#label-Filtering+IO+Stream+to+IO+Stream] - - {Recipe: Filter IO Stream to IO Stream parsing Headers}[#label-Recipe-3A+Filter+IO+Stream+to+IO+Stream+parsing+Headers] - - {Recipe: Filter IO Stream to IO Stream parsing and writing Headers}[#label-Recipe-3A+Filter+IO+Stream+to+IO+Stream+parsing+and+writing+Headers] - - {Recipe: Filter IO Stream to IO Stream Without Headers}[#label-Recipe-3A+Filter+IO+Stream+to+IO+Stream+Without+Headers] - -=== Source and Output Formats - -You can use a Unix-style "filter" for \CSV data. -The filter reads source \CSV data and writes output \CSV data as modified by the filter. -The input and output \CSV data may be any mixture of \Strings and \IO streams. - -==== Filtering \String to \String - -You can filter one \String to another, with or without headers. - -===== Recipe: Filter \String to \String parsing Headers - -Use class method CSV.filter with option +headers+ to filter a \String to another \String: - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - out_string = '' - CSV.filter(in_string, out_string, headers: true) do |row| - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \String to \String parsing and writing Headers - -Use class method CSV.filter with option +headers+ and +out_write_headers+ to filter a \String to another \String including header row: - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - out_string = '' - CSV.filter(in_string, out_string, headers: true, out_write_headers: true) do |row| - unless row.is_a?(Array) - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - end - out_string # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \String to \String Without Headers - -Use class method CSV.filter without option +headers+ to filter a \String to another \String: - in_string = "foo,0\nbar,1\nbaz,2\n" - out_string = '' - CSV.filter(in_string, out_string) do |row| - row[0] = row[0].upcase - row[1] *= 4 - end - out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" - -==== Filtering \String to \IO Stream - -You can filter a \String to an \IO stream, with or without headers. - -===== Recipe: Filter \String to \IO Stream parsing Headers - -Use class method CSV.filter with option +headers+ to filter a \String to an \IO stream: - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.open(path, 'w') do |out_io| - CSV.filter(in_string, out_io, headers: true) do |row| - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - end - p File.read(path) # => "FOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \String to \IO Stream parsing and writing Headers - -Use class method CSV.filter with option +headers+ and +out_write_headers+ to filter a \String to an \IO stream including header row: - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.open(path, 'w') do |out_io| - CSV.filter(in_string, out_io, headers: true, out_write_headers: true ) do |row| - unless row.is_a?(Array) - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - end - end - p File.read(path) # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \String to \IO Stream Without Headers - -Use class method CSV.filter without option +headers+ to filter a \String to an \IO stream: - in_string = "foo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.open(path, 'w') do |out_io| - CSV.filter(in_string, out_io) do |row| - row[0] = row[0].upcase - row[1] *= 4 - end - end - p File.read(path) # => "FOO,0000\nBAR,1111\nBAZ,2222\n" - -==== Filtering \IO Stream to \String - -You can filter an \IO stream to a \String, with or without headers. - -===== Recipe: Filter \IO Stream to \String parsing Headers - -Use class method CSV.filter with option +headers+ to filter an \IO stream to a \String: - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.write(path, in_string) - out_string = '' - File.open(path) do |in_io| - CSV.filter(in_io, out_string, headers: true) do |row| - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - end - out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \IO Stream to \String parsing and writing Headers - -Use class method CSV.filter with option +headers+ and +out_write_headers+ to filter an \IO stream to a \String including header row: - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.write(path, in_string) - out_string = '' - File.open(path) do |in_io| - CSV.filter(in_io, out_string, headers: true, out_write_headers: true) do |row| - unless row.is_a?(Array) - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - end - end - out_string # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \IO Stream to \String Without Headers - -Use class method CSV.filter without option +headers+ to filter an \IO stream to a \String: - in_string = "foo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.write(path, in_string) - out_string = '' - File.open(path) do |in_io| - CSV.filter(in_io, out_string) do |row| - row[0] = row[0].upcase - row[1] *= 4 - end - end - out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" - -==== Filtering \IO Stream to \IO Stream - -You can filter an \IO stream to another \IO stream, with or without headers. - -===== Recipe: Filter \IO Stream to \IO Stream parsing Headers - -Use class method CSV.filter with option +headers+ to filter an \IO stream to another \IO stream: - in_path = 't.csv' - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - File.write(in_path, in_string) - out_path = 'u.csv' - File.open(in_path) do |in_io| - File.open(out_path, 'w') do |out_io| - CSV.filter(in_io, out_io, headers: true) do |row| - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - end - end - p File.read(out_path) # => "FOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \IO Stream to \IO Stream parsing and writing Headers - -Use class method CSV.filter with option +headers+ and +out_write_headers+ to filter an \IO stream to another \IO stream including header row: - in_path = 't.csv' - in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - File.write(in_path, in_string) - out_path = 'u.csv' - File.open(in_path) do |in_io| - File.open(out_path, 'w') do |out_io| - CSV.filter(in_io, out_io, headers: true, out_write_headers: true) do |row| - unless row.is_a?(Array) - row['Name'] = row['Name'].upcase - row['Value'] *= 4 - end - end - end - end - p File.read(out_path) # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n" - -===== Recipe: Filter \IO Stream to \IO Stream Without Headers - -Use class method CSV.filter without option +headers+ to filter an \IO stream to another \IO stream: - in_path = 't.csv' - in_string = "foo,0\nbar,1\nbaz,2\n" - File.write(in_path, in_string) - out_path = 'u.csv' - File.open(in_path) do |in_io| - File.open(out_path, 'w') do |out_io| - CSV.filter(in_io, out_io) do |row| - row[0] = row[0].upcase - row[1] *= 4 - end - end - end - p File.read(out_path) # => "FOO,0000\nBAR,1111\nBAZ,2222\n" diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/generating.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/generating.rdoc deleted file mode 100644 index d96ff85c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/generating.rdoc +++ /dev/null @@ -1,298 +0,0 @@ -== Recipes for Generating \CSV - -These recipes are specific code examples for specific \CSV generating tasks. - -For other recipes, see {Recipes for CSV}[./recipes_rdoc.html]. - -All code snippets on this page assume that the following has been executed: - require 'csv' - -=== Contents - -- {Output Formats}[#label-Output+Formats] - - {Generating to a String}[#label-Generating+to+a+String] - - {Recipe: Generate to String with Headers}[#label-Recipe-3A+Generate+to+String+with+Headers] - - {Recipe: Generate to String Without Headers}[#label-Recipe-3A+Generate+to+String+Without+Headers] - - {Generating to a File}[#label-Generating+to+a+File] - - {Recipe: Generate to File with Headers}[#label-Recipe-3A+Generate+to+File+with+Headers] - - {Recipe: Generate to File Without Headers}[#label-Recipe-3A+Generate+to+File+Without+Headers] - - {Generating to IO an Stream}[#label-Generating+to+an+IO+Stream] - - {Recipe: Generate to IO Stream with Headers}[#label-Recipe-3A+Generate+to+IO+Stream+with+Headers] - - {Recipe: Generate to IO Stream Without Headers}[#label-Recipe-3A+Generate+to+IO+Stream+Without+Headers] -- {Converting Fields}[#label-Converting+Fields] - - {Recipe: Filter Generated Field Strings}[#label-Recipe-3A+Filter+Generated+Field+Strings] - - {Recipe: Specify Multiple Write Converters}[#label-Recipe-3A+Specify+Multiple+Write+Converters] -- {RFC 4180 Compliance}[#label-RFC+4180+Compliance] - - {Row Separator}[#label-Row+Separator] - - {Recipe: Generate Compliant Row Separator}[#label-Recipe-3A+Generate+Compliant+Row+Separator] - - {Recipe: Generate Non-Compliant Row Separator}[#label-Recipe-3A+Generate+Non-Compliant+Row+Separator] - - {Column Separator}[#label-Column+Separator] - - {Recipe: Generate Compliant Column Separator}[#label-Recipe-3A+Generate+Compliant+Column+Separator] - - {Recipe: Generate Non-Compliant Column Separator}[#label-Recipe-3A+Generate+Non-Compliant+Column+Separator] - - {Quotes}[#label-Quotes] - - {Recipe: Quote All Fields}[#label-Recipe-3A+Quote+All+Fields] - - {Recipe: Quote Empty Fields}[#label-Recipe-3A+Quote+Empty+Fields] - - {Recipe: Generate Compliant Quote Character}[#label-Recipe-3A+Generate+Compliant+Quote+Character] - - {Recipe: Generate Non-Compliant Quote Character}[#label-Recipe-3A+Generate+Non-Compliant+Quote+Character] - -=== Output Formats - -You can generate \CSV output to a \String, to a \File (via its path), or to an \IO stream. - -==== Generating to a \String - -You can generate \CSV output to a \String, with or without headers. - -===== Recipe: Generate to \String with Headers - -Use class method CSV.generate with option +headers+ to generate to a \String. - -This example uses method CSV#<< to append the rows -that are to be generated: - output_string = CSV.generate('', headers: ['Name', 'Value'], write_headers: true) do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "Name,Value\nFoo,0\nBar,1\nBaz,2\n" - -===== Recipe: Generate to \String Without Headers - -Use class method CSV.generate without option +headers+ to generate to a \String. - -This example uses method CSV#<< to append the rows -that are to be generated: - output_string = CSV.generate do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "Foo,0\nBar,1\nBaz,2\n" - -==== Generating to a \File - -You can generate /CSV data to a \File, with or without headers. - -===== Recipe: Generate to \File with Headers - -Use class method CSV.open with option +headers+ generate to a \File. - -This example uses method CSV#<< to append the rows -that are to be generated: - path = 't.csv' - CSV.open(path, 'w', headers: ['Name', 'Value'], write_headers: true) do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - p File.read(path) # => "Name,Value\nFoo,0\nBar,1\nBaz,2\n" - -===== Recipe: Generate to \File Without Headers - -Use class method CSV.open without option +headers+ to generate to a \File. - -This example uses method CSV#<< to append the rows -that are to be generated: - path = 't.csv' - CSV.open(path, 'w') do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - p File.read(path) # => "Foo,0\nBar,1\nBaz,2\n" - -==== Generating to an \IO Stream - -You can generate \CSV data to an \IO stream, with or without headers. - -==== Recipe: Generate to \IO Stream with Headers - -Use class method CSV.new with option +headers+ to generate \CSV data to an \IO stream: - path = 't.csv' - File.open(path, 'w') do |file| - csv = CSV.new(file, headers: ['Name', 'Value'], write_headers: true) - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - p File.read(path) # => "Name,Value\nFoo,0\nBar,1\nBaz,2\n" - -===== Recipe: Generate to \IO Stream Without Headers - -Use class method CSV.new without option +headers+ to generate \CSV data to an \IO stream: - path = 't.csv' - File.open(path, 'w') do |file| - csv = CSV.new(file) - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - p File.read(path) # => "Foo,0\nBar,1\nBaz,2\n" - -=== Converting Fields - -You can use _write_ _converters_ to convert fields when generating \CSV. - -==== Recipe: Filter Generated Field Strings - -Use option :write_converters and a custom converter to convert field values when generating \CSV. - -This example defines and uses a custom write converter to strip whitespace from generated fields: - strip_converter = proc {|field| field.respond_to?(:strip) ? field.strip : field } - output_string = CSV.generate(write_converters: strip_converter) do |csv| - csv << [' foo ', 0] - csv << [' bar ', 1] - csv << [' baz ', 2] - end - output_string # => "foo,0\nbar,1\nbaz,2\n" - -==== Recipe: Specify Multiple Write Converters - -Use option :write_converters and multiple custom converters -to convert field values when generating \CSV. - -This example defines and uses two custom write converters to strip and upcase generated fields: - strip_converter = proc {|field| field.respond_to?(:strip) ? field.strip : field } - upcase_converter = proc {|field| field.respond_to?(:upcase) ? field.upcase : field } - converters = [strip_converter, upcase_converter] - output_string = CSV.generate(write_converters: converters) do |csv| - csv << [' foo ', 0] - csv << [' bar ', 1] - csv << [' baz ', 2] - end - output_string # => "FOO,0\nBAR,1\nBAZ,2\n" - -=== RFC 4180 Compliance - -By default, \CSV generates data that is compliant with -{RFC 4180}[https://www.rfc-editor.org/rfc/rfc4180] -with respect to: -- Column separator. -- Quote character. - -==== Row Separator - -RFC 4180 specifies the row separator CRLF (Ruby "\r\n"). - -===== Recipe: Generate Compliant Row Separator - -For strict compliance, use option +:row_sep+ to specify row separator "\r\n": - output_string = CSV.generate('', row_sep: "\r\n") do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "Foo,0\r\nBar,1\r\nBaz,2\r\n" - -===== Recipe: Generate Non-Compliant Row Separator - -For data with non-compliant row separators, use option +:row_sep+ with a different value: -This example source uses semicolon (";') as its row separator: - output_string = CSV.generate('', row_sep: ";") do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "Foo,0;Bar,1;Baz,2;" - -==== Column Separator - -RFC 4180 specifies column separator COMMA (Ruby ","). - -===== Recipe: Generate Compliant Column Separator - -Because the \CSV default comma separator is ",", -you need not specify option +:col_sep+ for compliant data: - output_string = CSV.generate('') do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "Foo,0\nBar,1\nBaz,2\n" - -===== Recipe: Generate Non-Compliant Column Separator - -For data with non-compliant column separators, use option +:col_sep+. -This example source uses TAB ("\t") as its column separator: - output_string = CSV.generate('', col_sep: "\t") do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "Foo\t0\nBar\t1\nBaz\t2\n" - -==== Quotes - -IFC 4180 allows most fields to be quoted or not. -By default, \CSV does not quote most fields. - -However, a field containing the current row separator, column separator, -or quote character is automatically quoted, producing IFC 4180 compliance: - # Field contains row separator. - output_string = CSV.generate('') do |csv| - row_sep = csv.row_sep - csv << ["Foo#{row_sep}Foo", 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "\"Foo\nFoo\",0\nBar,1\nBaz,2\n" - # Field contains column separator. - output_string = CSV.generate('') do |csv| - col_sep = csv.col_sep - csv << ["Foo#{col_sep}Foo", 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "\"Foo,Foo\",0\nBar,1\nBaz,2\n" - # Field contains quote character. - output_string = CSV.generate('') do |csv| - quote_char = csv.quote_char - csv << ["Foo#{quote_char}Foo", 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "\"Foo\"\"Foo\",0\nBar,1\nBaz,2\n" - -===== Recipe: Quote All Fields - -Use option +:force_quotes+ to force quoted fields: - output_string = CSV.generate('', force_quotes: true) do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "\"Foo\",\"0\"\n\"Bar\",\"1\"\n\"Baz\",\"2\"\n" - -===== Recipe: Quote Empty Fields - -Use option +:quote_empty+ to force quoting for empty fields: - output_string = CSV.generate('', quote_empty: true) do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['', 2] - end - output_string # => "Foo,0\nBar,1\n\"\",2\n" - -===== Recipe: Generate Compliant Quote Character - -RFC 4180 specifies quote character DQUOTE (Ruby "\""). - -Because the \CSV default quote character is also "\"", -you need not specify option +:quote_char+ for compliant data: - output_string = CSV.generate('', force_quotes: true) do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "\"Foo\",\"0\"\n\"Bar\",\"1\"\n\"Baz\",\"2\"\n" - -===== Recipe: Generate Non-Compliant Quote Character - -For data with non-compliant quote characters, use option +:quote_char+. -This example source uses SQUOTE ("'") as its quote character: - output_string = CSV.generate('', quote_char: "'", force_quotes: true) do |csv| - csv << ['Foo', 0] - csv << ['Bar', 1] - csv << ['Baz', 2] - end - output_string # => "'Foo','0'\n'Bar','1'\n'Baz','2'\n" diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/parsing.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/parsing.rdoc deleted file mode 100644 index 63673072..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/parsing.rdoc +++ /dev/null @@ -1,554 +0,0 @@ -== Recipes for Parsing \CSV - -These recipes are specific code examples for specific \CSV parsing tasks. - -For other recipes, see {Recipes for CSV}[./recipes_rdoc.html]. - -All code snippets on this page assume that the following has been executed: - require 'csv' - -=== Contents - -- {Source Formats}[#label-Source+Formats] - - {Parsing from a String}[#label-Parsing+from+a+String] - - {Recipe: Parse from String with Headers}[#label-Recipe-3A+Parse+from+String+with+Headers] - - {Recipe: Parse from String Without Headers}[#label-Recipe-3A+Parse+from+String+Without+Headers] - - {Parsing from a File}[#label-Parsing+from+a+File] - - {Recipe: Parse from File with Headers}[#label-Recipe-3A+Parse+from+File+with+Headers] - - {Recipe: Parse from File Without Headers}[#label-Recipe-3A+Parse+from+File+Without+Headers] - - {Parsing from an IO Stream}[#label-Parsing+from+an+IO+Stream] - - {Recipe: Parse from IO Stream with Headers}[#label-Recipe-3A+Parse+from+IO+Stream+with+Headers] - - {Recipe: Parse from IO Stream Without Headers}[#label-Recipe-3A+Parse+from+IO+Stream+Without+Headers] -- {RFC 4180 Compliance}[#label-RFC+4180+Compliance] - - {Row Separator}[#label-Row+Separator] - - {Recipe: Handle Compliant Row Separator}[#label-Recipe-3A+Handle+Compliant+Row+Separator] - - {Recipe: Handle Non-Compliant Row Separator}[#label-Recipe-3A+Handle+Non-Compliant+Row+Separator] - - {Column Separator}[#label-Column+Separator] - - {Recipe: Handle Compliant Column Separator}[#label-Recipe-3A+Handle+Compliant+Column+Separator] - - {Recipe: Handle Non-Compliant Column Separator}[#label-Recipe-3A+Handle+Non-Compliant+Column+Separator] - - {Quote Character}[#label-Quote+Character] - - {Recipe: Handle Compliant Quote Character}[#label-Recipe-3A+Handle+Compliant+Quote+Character] - - {Recipe: Handle Non-Compliant Quote Character}[#label-Recipe-3A+Handle+Non-Compliant+Quote+Character] - - {Recipe: Allow Liberal Parsing}[#label-Recipe-3A+Allow+Liberal+Parsing] -- {Special Handling}[#label-Special+Handling] - - {Special Line Handling}[#label-Special+Line+Handling] - - {Recipe: Ignore Blank Lines}[#label-Recipe-3A+Ignore+Blank+Lines] - - {Recipe: Ignore Selected Lines}[#label-Recipe-3A+Ignore+Selected+Lines] - - {Special Field Handling}[#label-Special+Field+Handling] - - {Recipe: Strip Fields}[#label-Recipe-3A+Strip+Fields] - - {Recipe: Handle Null Fields}[#label-Recipe-3A+Handle+Null+Fields] - - {Recipe: Handle Empty Fields}[#label-Recipe-3A+Handle+Empty+Fields] -- {Converting Fields}[#label-Converting+Fields] - - {Converting Fields to Objects}[#label-Converting+Fields+to+Objects] - - {Recipe: Convert Fields to Integers}[#label-Recipe-3A+Convert+Fields+to+Integers] - - {Recipe: Convert Fields to Floats}[#label-Recipe-3A+Convert+Fields+to+Floats] - - {Recipe: Convert Fields to Numerics}[#label-Recipe-3A+Convert+Fields+to+Numerics] - - {Recipe: Convert Fields to Dates}[#label-Recipe-3A+Convert+Fields+to+Dates] - - {Recipe: Convert Fields to DateTimes}[#label-Recipe-3A+Convert+Fields+to+DateTimes] - - {Recipe: Convert Fields to Times}[#label-Recipe-3A+Convert+Fields+to+Times] - - {Recipe: Convert Assorted Fields to Objects}[#label-Recipe-3A+Convert+Assorted+Fields+to+Objects] - - {Recipe: Convert Fields to Other Objects}[#label-Recipe-3A+Convert+Fields+to+Other+Objects] - - {Recipe: Filter Field Strings}[#label-Recipe-3A+Filter+Field+Strings] - - {Recipe: Register Field Converters}[#label-Recipe-3A+Register+Field+Converters] - - {Using Multiple Field Converters}[#label-Using+Multiple+Field+Converters] - - {Recipe: Specify Multiple Field Converters in Option :converters}[#label-Recipe-3A+Specify+Multiple+Field+Converters+in+Option+-3Aconverters] - - {Recipe: Specify Multiple Field Converters in a Custom Converter List}[#label-Recipe-3A+Specify+Multiple+Field+Converters+in+a+Custom+Converter+List] -- {Converting Headers}[#label-Converting+Headers] - - {Recipe: Convert Headers to Lowercase}[#label-Recipe-3A+Convert+Headers+to+Lowercase] - - {Recipe: Convert Headers to Symbols}[#label-Recipe-3A+Convert+Headers+to+Symbols] - - {Recipe: Filter Header Strings}[#label-Recipe-3A+Filter+Header+Strings] - - {Recipe: Register Header Converters}[#label-Recipe-3A+Register+Header+Converters] - - {Using Multiple Header Converters}[#label-Using+Multiple+Header+Converters] - - {Recipe: Specify Multiple Header Converters in Option :header_converters}[#label-Recipe-3A+Specify+Multiple+Header+Converters+in+Option+-3Aheader_converters] - - {Recipe: Specify Multiple Header Converters in a Custom Header Converter List}[#label-Recipe-3A+Specify+Multiple+Header+Converters+in+a+Custom+Header+Converter+List] -- {Diagnostics}[#label-Diagnostics] - - {Recipe: Capture Unconverted Fields}[#label-Recipe-3A+Capture+Unconverted+Fields] - - {Recipe: Capture Field Info}[#label-Recipe-3A+Capture+Field+Info] - -=== Source Formats - -You can parse \CSV data from a \String, from a \File (via its path), or from an \IO stream. - -==== Parsing from a \String - -You can parse \CSV data from a \String, with or without headers. - -===== Recipe: Parse from \String with Headers - -Use class method CSV.parse with option +headers+ to read a source \String all at once -(may have memory resource implications): - string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - CSV.parse(string, headers: true) # => # - -Use instance method CSV#each with option +headers+ to read a source \String one row at a time: - CSV.new(string, headers: true).each do |row| - p row - end -Output: - # - # - # - -===== Recipe: Parse from \String Without Headers - -Use class method CSV.parse without option +headers+ to read a source \String all at once -(may have memory resource implications): - string = "foo,0\nbar,1\nbaz,2\n" - CSV.parse(string) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Use instance method CSV#each without option +headers+ to read a source \String one row at a time: - CSV.new(string).each do |row| - p row - end -Output: - ["foo", "0"] - ["bar", "1"] - ["baz", "2"] - -==== Parsing from a \File - -You can parse \CSV data from a \File, with or without headers. - -===== Recipe: Parse from \File with Headers - -Use class method CSV.read with option +headers+ to read a file all at once: - string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.write(path, string) - CSV.read(path, headers: true) # => # - -Use class method CSV.foreach with option +headers+ to read one row at a time: - CSV.foreach(path, headers: true) do |row| - p row - end -Output: - # - # - # - -===== Recipe: Parse from \File Without Headers - -Use class method CSV.read without option +headers+ to read a file all at once: - string = "foo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.write(path, string) - CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Use class method CSV.foreach without option +headers+ to read one row at a time: - CSV.foreach(path) do |row| - p row - end -Output: - ["foo", "0"] - ["bar", "1"] - ["baz", "2"] - -==== Parsing from an \IO Stream - -You can parse \CSV data from an \IO stream, with or without headers. - -===== Recipe: Parse from \IO Stream with Headers - -Use class method CSV.parse with option +headers+ to read an \IO stream all at once: - string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.write(path, string) - File.open(path) do |file| - CSV.parse(file, headers: true) - end # => # - -Use class method CSV.foreach with option +headers+ to read one row at a time: - File.open(path) do |file| - CSV.foreach(file, headers: true) do |row| - p row - end - end -Output: - # - # - # - -===== Recipe: Parse from \IO Stream Without Headers - -Use class method CSV.parse without option +headers+ to read an \IO stream all at once: - string = "foo,0\nbar,1\nbaz,2\n" - path = 't.csv' - File.write(path, string) - File.open(path) do |file| - CSV.parse(file) - end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -Use class method CSV.foreach without option +headers+ to read one row at a time: - File.open(path) do |file| - CSV.foreach(file) do |row| - p row - end - end -Output: - ["foo", "0"] - ["bar", "1"] - ["baz", "2"] - -=== RFC 4180 Compliance - -By default, \CSV parses data that is compliant with -{RFC 4180}[https://www.rfc-editor.org/rfc/rfc4180] -with respect to: -- Row separator. -- Column separator. -- Quote character. - -==== Row Separator - -RFC 4180 specifies the row separator CRLF (Ruby "\r\n"). - -Although the \CSV default row separator is "\n", -the parser also by default handles row separator "\r" and the RFC-compliant "\r\n". - -===== Recipe: Handle Compliant Row Separator - -For strict compliance, use option +:row_sep+ to specify row separator "\r\n", -which allows the compliant row separator: - source = "foo,1\r\nbar,1\r\nbaz,2\r\n" - CSV.parse(source, row_sep: "\r\n") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]] -But rejects other row separators: - source = "foo,1\nbar,1\nbaz,2\n" - CSV.parse(source, row_sep: "\r\n") # Raised MalformedCSVError - source = "foo,1\rbar,1\rbaz,2\r" - CSV.parse(source, row_sep: "\r\n") # Raised MalformedCSVError - source = "foo,1\n\rbar,1\n\rbaz,2\n\r" - CSV.parse(source, row_sep: "\r\n") # Raised MalformedCSVError - -===== Recipe: Handle Non-Compliant Row Separator - -For data with non-compliant row separators, use option +:row_sep+. -This example source uses semicolon (";") as its row separator: - source = "foo,1;bar,1;baz,2;" - CSV.parse(source, row_sep: ';') # => [["foo", "1"], ["bar", "1"], ["baz", "2"]] - -==== Column Separator - -RFC 4180 specifies column separator COMMA (Ruby ","). - -===== Recipe: Handle Compliant Column Separator - -Because the \CSV default comma separator is ',', -you need not specify option +:col_sep+ for compliant data: - source = "foo,1\nbar,1\nbaz,2\n" - CSV.parse(source) # => [["foo", "1"], ["bar", "1"], ["baz", "2"]] - -===== Recipe: Handle Non-Compliant Column Separator - -For data with non-compliant column separators, use option +:col_sep+. -This example source uses TAB ("\t") as its column separator: - source = "foo,1\tbar,1\tbaz,2" - CSV.parse(source, col_sep: "\t") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]] - -==== Quote Character - -RFC 4180 specifies quote character DQUOTE (Ruby "\""). - -===== Recipe: Handle Compliant Quote Character - -Because the \CSV default quote character is "\"", -you need not specify option +:quote_char+ for compliant data: - source = "\"foo\",\"1\"\n\"bar\",\"1\"\n\"baz\",\"2\"\n" - CSV.parse(source) # => [["foo", "1"], ["bar", "1"], ["baz", "2"]] - -===== Recipe: Handle Non-Compliant Quote Character - -For data with non-compliant quote characters, use option +:quote_char+. -This example source uses SQUOTE ("'") as its quote character: - source = "'foo','1'\n'bar','1'\n'baz','2'\n" - CSV.parse(source, quote_char: "'") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]] - -==== Recipe: Allow Liberal Parsing - -Use option +:liberal_parsing+ to specify that \CSV should -attempt to parse input not conformant with RFC 4180, such as double quotes in unquoted fields: - source = 'is,this "three, or four",fields' - CSV.parse(source) # Raises MalformedCSVError - CSV.parse(source, liberal_parsing: true) # => [["is", "this \"three", " or four\"", "fields"]] - -=== Special Handling - -You can use parsing options to specify special handling for certain lines and fields. - -==== Special Line Handling - -Use parsing options to specify special handling for blank lines, or for other selected lines. - -===== Recipe: Ignore Blank Lines - -Use option +:skip_blanks+ to ignore blank lines: - source = <<-EOT - foo,0 - - bar,1 - baz,2 - - , - EOT - parsed = CSV.parse(source, skip_blanks: true) - parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]] - -===== Recipe: Ignore Selected Lines - -Use option +:skip_lines+ to ignore selected lines. - source = <<-EOT - # Comment - foo,0 - bar,1 - baz,2 - # Another comment - EOT - parsed = CSV.parse(source, skip_lines: /^#/) - parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - -==== Special Field Handling - -Use parsing options to specify special handling for certain field values. - -===== Recipe: Strip Fields - -Use option +:strip+ to strip parsed field values: - CSV.parse_line(' a , b ', strip: true) # => ["a", "b"] - -===== Recipe: Handle Null Fields - -Use option +:nil_value+ to specify a value that will replace each field -that is null (no text): - CSV.parse_line('a,,b,,c', nil_value: 0) # => ["a", 0, "b", 0, "c"] - -===== Recipe: Handle Empty Fields - -Use option +:empty_value+ to specify a value that will replace each field -that is empty (\String of length 0); - CSV.parse_line('a,"",b,"",c', empty_value: 'x') # => ["a", "x", "b", "x", "c"] - -=== Converting Fields - -You can use field converters to change parsed \String fields into other objects, -or to otherwise modify the \String fields. - -==== Converting Fields to Objects - -Use field converters to change parsed \String objects into other, more specific, objects. - -There are built-in field converters for converting to objects of certain classes: -- \Float -- \Integer -- \Date -- \DateTime -- \Time - -Other built-in field converters include: -- +:numeric+: converts to \Integer and \Float. -- +:all+: converts to \DateTime, \Integer, \Float. - -You can also define field converters to convert to objects of other classes. - -===== Recipe: Convert Fields to Integers - -Convert fields to \Integer objects using built-in converter +:integer+: - source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, converters: :integer) - parsed.map {|row| row['Value'].class} # => [Integer, Integer, Integer] - -===== Recipe: Convert Fields to Floats - -Convert fields to \Float objects using built-in converter +:float+: - source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, converters: :float) - parsed.map {|row| row['Value'].class} # => [Float, Float, Float] - -===== Recipe: Convert Fields to Numerics - -Convert fields to \Integer and \Float objects using built-in converter +:numeric+: - source = "Name,Value\nfoo,0\nbar,1.1\nbaz,2.2\n" - parsed = CSV.parse(source, headers: true, converters: :numeric) - parsed.map {|row| row['Value'].class} # => [Integer, Float, Float] - -===== Recipe: Convert Fields to Dates - -Convert fields to \Date objects using built-in converter +:date+: - source = "Name,Date\nfoo,2001-02-03\nbar,2001-02-04\nbaz,2001-02-03\n" - parsed = CSV.parse(source, headers: true, converters: :date) - parsed.map {|row| row['Date'].class} # => [Date, Date, Date] - -===== Recipe: Convert Fields to DateTimes - -Convert fields to \DateTime objects using built-in converter +:date_time+: - source = "Name,DateTime\nfoo,2001-02-03\nbar,2001-02-04\nbaz,2020-05-07T14:59:00-05:00\n" - parsed = CSV.parse(source, headers: true, converters: :date_time) - parsed.map {|row| row['DateTime'].class} # => [DateTime, DateTime, DateTime] - -===== Recipe: Convert Fields to Times - -Convert fields to \Time objects using built-in converter +:time+: - source = "Name,Time\nfoo,2001-02-03\nbar,2001-02-04\nbaz,2020-05-07T14:59:00-05:00\n" - parsed = CSV.parse(source, headers: true, converters: :time) - parsed.map {|row| row['Time'].class} # => [Time, Time, Time] - -===== Recipe: Convert Assorted Fields to Objects - -Convert assorted fields to objects using built-in converter +:all+: - source = "Type,Value\nInteger,0\nFloat,1.0\nDateTime,2001-02-04\n" - parsed = CSV.parse(source, headers: true, converters: :all) - parsed.map {|row| row['Value'].class} # => [Integer, Float, DateTime] - -===== Recipe: Convert Fields to Other Objects - -Define a custom field converter to convert \String fields into other objects. -This example defines and uses a custom field converter -that converts each column-1 value to a \Rational object: - rational_converter = proc do |field, field_context| - field_context.index == 1 ? field.to_r : field - end - source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, converters: rational_converter) - parsed.map {|row| row['Value'].class} # => [Rational, Rational, Rational] - -==== Recipe: Filter Field Strings - -Define a custom field converter to modify \String fields. -This example defines and uses a custom field converter -that strips whitespace from each field value: - strip_converter = proc {|field| field.strip } - source = "Name,Value\n foo , 0 \n bar , 1 \n baz , 2 \n" - parsed = CSV.parse(source, headers: true, converters: strip_converter) - parsed['Name'] # => ["foo", "bar", "baz"] - parsed['Value'] # => ["0", "1", "2"] - -==== Recipe: Register Field Converters - -Register a custom field converter, assigning it a name; -then refer to the converter by its name: - rational_converter = proc do |field, field_context| - field_context.index == 1 ? field.to_r : field - end - CSV::Converters[:rational] = rational_converter - source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, converters: :rational) - parsed['Value'] # => [(0/1), (1/1), (2/1)] - -==== Using Multiple Field Converters - -You can use multiple field converters in either of these ways: -- Specify converters in option +:converters+. -- Specify converters in a custom converter list. - -===== Recipe: Specify Multiple Field Converters in Option +:converters+ - -Apply multiple field converters by specifying them in option +:converters+: - source = "Name,Value\nfoo,0\nbar,1.0\nbaz,2.0\n" - parsed = CSV.parse(source, headers: true, converters: [:integer, :float]) - parsed['Value'] # => [0, 1.0, 2.0] - -===== Recipe: Specify Multiple Field Converters in a Custom Converter List - -Apply multiple field converters by defining and registering a custom converter list: - strip_converter = proc {|field| field.strip } - CSV::Converters[:strip] = strip_converter - CSV::Converters[:my_converters] = [:integer, :float, :strip] - source = "Name,Value\n foo , 0 \n bar , 1.0 \n baz , 2.0 \n" - parsed = CSV.parse(source, headers: true, converters: :my_converters) - parsed['Name'] # => ["foo", "bar", "baz"] - parsed['Value'] # => [0, 1.0, 2.0] - -=== Converting Headers - -You can use header converters to modify parsed \String headers. - -Built-in header converters include: -- +:symbol+: converts \String header to \Symbol. -- +:downcase+: converts \String header to lowercase. - -You can also define header converters to otherwise modify header \Strings. - -==== Recipe: Convert Headers to Lowercase - -Convert headers to lowercase using built-in converter +:downcase+: - source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, header_converters: :downcase) - parsed.headers # => ["name", "value"] - -==== Recipe: Convert Headers to Symbols - -Convert headers to downcased Symbols using built-in converter +:symbol+: - source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, header_converters: :symbol) - parsed.headers # => [:name, :value] - parsed.headers.map {|header| header.class} # => [Symbol, Symbol] - -==== Recipe: Filter Header Strings - -Define a custom header converter to modify \String fields. -This example defines and uses a custom header converter -that capitalizes each header \String: - capitalize_converter = proc {|header| header.capitalize } - source = "NAME,VALUE\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, header_converters: capitalize_converter) - parsed.headers # => ["Name", "Value"] - -==== Recipe: Register Header Converters - -Register a custom header converter, assigning it a name; -then refer to the converter by its name: - capitalize_converter = proc {|header| header.capitalize } - CSV::HeaderConverters[:capitalize] = capitalize_converter - source = "NAME,VALUE\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, headers: true, header_converters: :capitalize) - parsed.headers # => ["Name", "Value"] - -==== Using Multiple Header Converters - -You can use multiple header converters in either of these ways: -- Specify header converters in option +:header_converters+. -- Specify header converters in a custom header converter list. - -===== Recipe: Specify Multiple Header Converters in Option :header_converters - -Apply multiple header converters by specifying them in option +:header_converters+: - source = "Name,Value\nfoo,0\nbar,1.0\nbaz,2.0\n" - parsed = CSV.parse(source, headers: true, header_converters: [:downcase, :symbol]) - parsed.headers # => [:name, :value] - -===== Recipe: Specify Multiple Header Converters in a Custom Header Converter List - -Apply multiple header converters by defining and registering a custom header converter list: - CSV::HeaderConverters[:my_header_converters] = [:symbol, :downcase] - source = "NAME,VALUE\nfoo,0\nbar,1.0\nbaz,2.0\n" - parsed = CSV.parse(source, headers: true, header_converters: :my_header_converters) - parsed.headers # => [:name, :value] - -=== Diagnostics - -==== Recipe: Capture Unconverted Fields - -To capture unconverted field values, use option +:unconverted_fields+: - source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - parsed = CSV.parse(source, converters: :integer, unconverted_fields: true) - parsed # => [["Name", "Value"], ["foo", 0], ["bar", 1], ["baz", 2]] - parsed.each {|row| p row.unconverted_fields } -Output: - ["Name", "Value"] - ["foo", "0"] - ["bar", "1"] - ["baz", "2"] - -==== Recipe: Capture Field Info - -To capture field info in a custom converter, accept two block arguments. -The first is the field value; the second is a +CSV::FieldInfo+ object: - strip_converter = proc {|field, field_info| p field_info; field.strip } - source = " foo , 0 \n bar , 1 \n baz , 2 \n" - parsed = CSV.parse(source, converters: strip_converter) - parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -Output: - # - # - # - # - # - # diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/recipes.rdoc b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/recipes.rdoc deleted file mode 100644 index 9bf7885b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/doc/csv/recipes/recipes.rdoc +++ /dev/null @@ -1,6 +0,0 @@ -== Recipes for \CSV - -The recipes are specific code examples for specific tasks. See: -- {Recipes for Parsing CSV}[./parsing_rdoc.html] -- {Recipes for Generating CSV}[./generating_rdoc.html] -- {Recipes for Filtering CSV}[./filtering_rdoc.html] diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv.rb deleted file mode 100644 index aef96ac9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv.rb +++ /dev/null @@ -1,3017 +0,0 @@ -# encoding: US-ASCII -# frozen_string_literal: true -# = csv.rb -- CSV Reading and Writing -# -# Created by James Edward Gray II on 2005-10-31. -# -# See CSV for documentation. -# -# == Description -# -# Welcome to the new and improved CSV. -# -# This version of the CSV library began its life as FasterCSV. FasterCSV was -# intended as a replacement to Ruby's then standard CSV library. It was -# designed to address concerns users of that library had and it had three -# primary goals: -# -# 1. Be significantly faster than CSV while remaining a pure Ruby library. -# 2. Use a smaller and easier to maintain code base. (FasterCSV eventually -# grew larger, was also but considerably richer in features. The parsing -# core remains quite small.) -# 3. Improve on the CSV interface. -# -# Obviously, the last one is subjective. I did try to defer to the original -# interface whenever I didn't have a compelling reason to change it though, so -# hopefully this won't be too radically different. -# -# We must have met our goals because FasterCSV was renamed to CSV and replaced -# the original library as of Ruby 1.9. If you are migrating code from 1.8 or -# earlier, you may have to change your code to comply with the new interface. -# -# == What's the Different From the Old CSV? -# -# I'm sure I'll miss something, but I'll try to mention most of the major -# differences I am aware of, to help others quickly get up to speed: -# -# === \CSV Parsing -# -# * This parser is m17n aware. See CSV for full details. -# * This library has a stricter parser and will throw MalformedCSVErrors on -# problematic data. -# * This library has a less liberal idea of a line ending than CSV. What you -# set as the :row_sep is law. It can auto-detect your line endings -# though. -# * The old library returned empty lines as [nil]. This library calls -# them []. -# * This library has a much faster parser. -# -# === Interface -# -# * CSV now uses keyword parameters to set options. -# * CSV no longer has generate_row() or parse_row(). -# * The old CSV's Reader and Writer classes have been dropped. -# * CSV::open() is now more like Ruby's open(). -# * CSV objects now support most standard IO methods. -# * CSV now has a new() method used to wrap objects like String and IO for -# reading and writing. -# * CSV::generate() is different from the old method. -# * CSV no longer supports partial reads. It works line-by-line. -# * CSV no longer allows the instance methods to override the separators for -# performance reasons. They must be set in the constructor. -# -# If you use this library and find yourself missing any functionality I have -# trimmed, please {let me know}[mailto:james@grayproductions.net]. -# -# == Documentation -# -# See CSV for documentation. -# -# == What is CSV, really? -# -# CSV maintains a pretty strict definition of CSV taken directly from -# {the RFC}[https://www.ietf.org/rfc/rfc4180.txt]. I relax the rules in only one -# place and that is to make using this library easier. CSV will parse all valid -# CSV. -# -# What you don't want to do is to feed CSV invalid data. Because of the way the -# CSV format works, it's common for a parser to need to read until the end of -# the file to be sure a field is invalid. This consumes a lot of time and memory. -# -# Luckily, when working with invalid CSV, Ruby's built-in methods will almost -# always be superior in every way. For example, parsing non-quoted fields is as -# easy as: -# -# data.split(",") -# -# == Questions and/or Comments -# -# Feel free to email {James Edward Gray II}[mailto:james@grayproductions.net] -# with any questions. - -require "forwardable" -require "date" -require "time" -require "stringio" - -require_relative "csv/fields_converter" -require_relative "csv/input_record_separator" -require_relative "csv/parser" -require_relative "csv/row" -require_relative "csv/table" -require_relative "csv/writer" - -# == \CSV -# -# === \CSV Data -# -# \CSV (comma-separated values) data is a text representation of a table: -# - A _row_ _separator_ delimits table rows. -# A common row separator is the newline character "\n". -# - A _column_ _separator_ delimits fields in a row. -# A common column separator is the comma character ",". -# -# This \CSV \String, with row separator "\n" -# and column separator ",", -# has three rows and two columns: -# "foo,0\nbar,1\nbaz,2\n" -# -# Despite the name \CSV, a \CSV representation can use different separators. -# -# For more about tables, see the Wikipedia article -# "{Table (information)}[https://en.wikipedia.org/wiki/Table_(information)]", -# especially its section -# "{Simple table}[https://en.wikipedia.org/wiki/Table_(information)#Simple_table]" -# -# == \Class \CSV -# -# Class \CSV provides methods for: -# - Parsing \CSV data from a \String object, a \File (via its file path), or an \IO object. -# - Generating \CSV data to a \String object. -# -# To make \CSV available: -# require 'csv' -# -# All examples here assume that this has been done. -# -# == Keeping It Simple -# -# A \CSV object has dozens of instance methods that offer fine-grained control -# of parsing and generating \CSV data. -# For many needs, though, simpler approaches will do. -# -# This section summarizes the singleton methods in \CSV -# that allow you to parse and generate without explicitly -# creating \CSV objects. -# For details, follow the links. -# -# === Simple Parsing -# -# Parsing methods commonly return either of: -# - An \Array of Arrays of Strings: -# - The outer \Array is the entire "table". -# - Each inner \Array is a row. -# - Each \String is a field. -# - A CSV::Table object. For details, see -# {\CSV with Headers}[#class-CSV-label-CSV+with+Headers]. -# -# ==== Parsing a \String -# -# The input to be parsed can be a string: -# string = "foo,0\nbar,1\nbaz,2\n" -# -# \Method CSV.parse returns the entire \CSV data: -# CSV.parse(string) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# \Method CSV.parse_line returns only the first row: -# CSV.parse_line(string) # => ["foo", "0"] -# -# \CSV extends class \String with instance method String#parse_csv, -# which also returns only the first row: -# string.parse_csv # => ["foo", "0"] -# -# ==== Parsing Via a \File Path -# -# The input to be parsed can be in a file: -# string = "foo,0\nbar,1\nbaz,2\n" -# path = 't.csv' -# File.write(path, string) -# -# \Method CSV.read returns the entire \CSV data: -# CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# \Method CSV.foreach iterates, passing each row to the given block: -# CSV.foreach(path) do |row| -# p row -# end -# Output: -# ["foo", "0"] -# ["bar", "1"] -# ["baz", "2"] -# -# \Method CSV.table returns the entire \CSV data as a CSV::Table object: -# CSV.table(path) # => # -# -# ==== Parsing from an Open \IO Stream -# -# The input to be parsed can be in an open \IO stream: -# -# \Method CSV.read returns the entire \CSV data: -# File.open(path) do |file| -# CSV.read(file) -# end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# As does method CSV.parse: -# File.open(path) do |file| -# CSV.parse(file) -# end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# \Method CSV.parse_line returns only the first row: -# File.open(path) do |file| -# CSV.parse_line(file) -# end # => ["foo", "0"] -# -# \Method CSV.foreach iterates, passing each row to the given block: -# File.open(path) do |file| -# CSV.foreach(file) do |row| -# p row -# end -# end -# Output: -# ["foo", "0"] -# ["bar", "1"] -# ["baz", "2"] -# -# \Method CSV.table returns the entire \CSV data as a CSV::Table object: -# File.open(path) do |file| -# CSV.table(file) -# end # => # -# -# === Simple Generating -# -# \Method CSV.generate returns a \String; -# this example uses method CSV#<< to append the rows -# that are to be generated: -# output_string = CSV.generate do |csv| -# csv << ['foo', 0] -# csv << ['bar', 1] -# csv << ['baz', 2] -# end -# output_string # => "foo,0\nbar,1\nbaz,2\n" -# -# \Method CSV.generate_line returns a \String containing the single row -# constructed from an \Array: -# CSV.generate_line(['foo', '0']) # => "foo,0\n" -# -# \CSV extends class \Array with instance method Array#to_csv, -# which forms an \Array into a \String: -# ['foo', '0'].to_csv # => "foo,0\n" -# -# === "Filtering" \CSV -# -# \Method CSV.filter provides a Unix-style filter for \CSV data. -# The input data is processed to form the output data: -# in_string = "foo,0\nbar,1\nbaz,2\n" -# out_string = '' -# CSV.filter(in_string, out_string) do |row| -# row[0] = row[0].upcase -# row[1] *= 4 -# end -# out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n" -# -# == \CSV Objects -# -# There are three ways to create a \CSV object: -# - \Method CSV.new returns a new \CSV object. -# - \Method CSV.instance returns a new or cached \CSV object. -# - \Method \CSV() also returns a new or cached \CSV object. -# -# === Instance Methods -# -# \CSV has three groups of instance methods: -# - Its own internally defined instance methods. -# - Methods included by module Enumerable. -# - Methods delegated to class IO. See below. -# -# ==== Delegated Methods -# -# For convenience, a CSV object will delegate to many methods in class IO. -# (A few have wrapper "guard code" in \CSV.) You may call: -# * IO#binmode -# * #binmode? -# * IO#close -# * IO#close_read -# * IO#close_write -# * IO#closed? -# * #eof -# * #eof? -# * IO#external_encoding -# * IO#fcntl -# * IO#fileno -# * #flock -# * IO#flush -# * IO#fsync -# * IO#internal_encoding -# * #ioctl -# * IO#isatty -# * #path -# * IO#pid -# * IO#pos -# * IO#pos= -# * IO#reopen -# * #rewind -# * IO#seek -# * #stat -# * IO#string -# * IO#sync -# * IO#sync= -# * IO#tell -# * #to_i -# * #to_io -# * IO#truncate -# * IO#tty? -# -# === Options -# -# The default values for options are: -# DEFAULT_OPTIONS = { -# # For both parsing and generating. -# col_sep: ",", -# row_sep: :auto, -# quote_char: '"', -# # For parsing. -# field_size_limit: nil, -# converters: nil, -# unconverted_fields: nil, -# headers: false, -# return_headers: false, -# header_converters: nil, -# skip_blanks: false, -# skip_lines: nil, -# liberal_parsing: false, -# nil_value: nil, -# empty_value: "", -# strip: false, -# # For generating. -# write_headers: nil, -# quote_empty: true, -# force_quotes: false, -# write_converters: nil, -# write_nil_value: nil, -# write_empty_value: "", -# } -# -# ==== Options for Parsing -# -# Options for parsing, described in detail below, include: -# - +row_sep+: Specifies the row separator; used to delimit rows. -# - +col_sep+: Specifies the column separator; used to delimit fields. -# - +quote_char+: Specifies the quote character; used to quote fields. -# - +field_size_limit+: Specifies the maximum field size + 1 allowed. -# Deprecated since 3.2.3. Use +max_field_size+ instead. -# - +max_field_size+: Specifies the maximum field size allowed. -# - +converters+: Specifies the field converters to be used. -# - +unconverted_fields+: Specifies whether unconverted fields are to be available. -# - +headers+: Specifies whether data contains headers, -# or specifies the headers themselves. -# - +return_headers+: Specifies whether headers are to be returned. -# - +header_converters+: Specifies the header converters to be used. -# - +skip_blanks+: Specifies whether blanks lines are to be ignored. -# - +skip_lines+: Specifies how comments lines are to be recognized. -# - +strip+: Specifies whether leading and trailing whitespace are to be -# stripped from fields. This must be compatible with +col_sep+; if it is not, -# then an +ArgumentError+ exception will be raised. -# - +liberal_parsing+: Specifies whether \CSV should attempt to parse -# non-compliant data. -# - +nil_value+: Specifies the object that is to be substituted for each null (no-text) field. -# - +empty_value+: Specifies the object that is to be substituted for each empty field. -# -# :include: ../doc/csv/options/common/row_sep.rdoc -# -# :include: ../doc/csv/options/common/col_sep.rdoc -# -# :include: ../doc/csv/options/common/quote_char.rdoc -# -# :include: ../doc/csv/options/parsing/field_size_limit.rdoc -# -# :include: ../doc/csv/options/parsing/converters.rdoc -# -# :include: ../doc/csv/options/parsing/unconverted_fields.rdoc -# -# :include: ../doc/csv/options/parsing/headers.rdoc -# -# :include: ../doc/csv/options/parsing/return_headers.rdoc -# -# :include: ../doc/csv/options/parsing/header_converters.rdoc -# -# :include: ../doc/csv/options/parsing/skip_blanks.rdoc -# -# :include: ../doc/csv/options/parsing/skip_lines.rdoc -# -# :include: ../doc/csv/options/parsing/strip.rdoc -# -# :include: ../doc/csv/options/parsing/liberal_parsing.rdoc -# -# :include: ../doc/csv/options/parsing/nil_value.rdoc -# -# :include: ../doc/csv/options/parsing/empty_value.rdoc -# -# ==== Options for Generating -# -# Options for generating, described in detail below, include: -# - +row_sep+: Specifies the row separator; used to delimit rows. -# - +col_sep+: Specifies the column separator; used to delimit fields. -# - +quote_char+: Specifies the quote character; used to quote fields. -# - +write_headers+: Specifies whether headers are to be written. -# - +force_quotes+: Specifies whether each output field is to be quoted. -# - +quote_empty+: Specifies whether each empty output field is to be quoted. -# - +write_converters+: Specifies the field converters to be used in writing. -# - +write_nil_value+: Specifies the object that is to be substituted for each +nil+-valued field. -# - +write_empty_value+: Specifies the object that is to be substituted for each empty field. -# -# :include: ../doc/csv/options/common/row_sep.rdoc -# -# :include: ../doc/csv/options/common/col_sep.rdoc -# -# :include: ../doc/csv/options/common/quote_char.rdoc -# -# :include: ../doc/csv/options/generating/write_headers.rdoc -# -# :include: ../doc/csv/options/generating/force_quotes.rdoc -# -# :include: ../doc/csv/options/generating/quote_empty.rdoc -# -# :include: ../doc/csv/options/generating/write_converters.rdoc -# -# :include: ../doc/csv/options/generating/write_nil_value.rdoc -# -# :include: ../doc/csv/options/generating/write_empty_value.rdoc -# -# === \CSV with Headers -# -# CSV allows to specify column names of CSV file, whether they are in data, or -# provided separately. If headers are specified, reading methods return an instance -# of CSV::Table, consisting of CSV::Row. -# -# # Headers are part of data -# data = CSV.parse(<<~ROWS, headers: true) -# Name,Department,Salary -# Bob,Engineering,1000 -# Jane,Sales,2000 -# John,Management,5000 -# ROWS -# -# data.class #=> CSV::Table -# data.first #=> # -# data.first.to_h #=> {"Name"=>"Bob", "Department"=>"Engineering", "Salary"=>"1000"} -# -# # Headers provided by developer -# data = CSV.parse('Bob,Engineering,1000', headers: %i[name department salary]) -# data.first #=> # -# -# === \Converters -# -# By default, each value (field or header) parsed by \CSV is formed into a \String. -# You can use a _field_ _converter_ or _header_ _converter_ -# to intercept and modify the parsed values: -# - See {Field Converters}[#class-CSV-label-Field+Converters]. -# - See {Header Converters}[#class-CSV-label-Header+Converters]. -# -# Also by default, each value to be written during generation is written 'as-is'. -# You can use a _write_ _converter_ to modify values before writing. -# - See {Write Converters}[#class-CSV-label-Write+Converters]. -# -# ==== Specifying \Converters -# -# You can specify converters for parsing or generating in the +options+ -# argument to various \CSV methods: -# - Option +converters+ for converting parsed field values. -# - Option +header_converters+ for converting parsed header values. -# - Option +write_converters+ for converting values to be written (generated). -# -# There are three forms for specifying converters: -# - A converter proc: executable code to be used for conversion. -# - A converter name: the name of a stored converter. -# - A converter list: an array of converter procs, converter names, and converter lists. -# -# ===== Converter Procs -# -# This converter proc, +strip_converter+, accepts a value +field+ -# and returns field.strip: -# strip_converter = proc {|field| field.strip } -# In this call to CSV.parse, -# the keyword argument converters: string_converter -# specifies that: -# - \Proc +string_converter+ is to be called for each parsed field. -# - The converter's return value is to replace the +field+ value. -# Example: -# string = " foo , 0 \n bar , 1 \n baz , 2 \n" -# array = CSV.parse(string, converters: strip_converter) -# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# A converter proc can receive a second argument, +field_info+, -# that contains details about the field. -# This modified +strip_converter+ displays its arguments: -# strip_converter = proc do |field, field_info| -# p [field, field_info] -# field.strip -# end -# string = " foo , 0 \n bar , 1 \n baz , 2 \n" -# array = CSV.parse(string, converters: strip_converter) -# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# Output: -# [" foo ", #] -# [" 0 ", #] -# [" bar ", #] -# [" 1 ", #] -# [" baz ", #] -# [" 2 ", #] -# Each CSV::FieldInfo object shows: -# - The 0-based field index. -# - The 1-based line index. -# - The field header, if any. -# -# ===== Stored \Converters -# -# A converter may be given a name and stored in a structure where -# the parsing methods can find it by name. -# -# The storage structure for field converters is the \Hash CSV::Converters. -# It has several built-in converter procs: -# - :integer: converts each \String-embedded integer into a true \Integer. -# - :float: converts each \String-embedded float into a true \Float. -# - :date: converts each \String-embedded date into a true \Date. -# - :date_time: converts each \String-embedded date-time into a true \DateTime -# - :time: converts each \String-embedded time into a true \Time -# . -# This example creates a converter proc, then stores it: -# strip_converter = proc {|field| field.strip } -# CSV::Converters[:strip] = strip_converter -# Then the parsing method call can refer to the converter -# by its name, :strip: -# string = " foo , 0 \n bar , 1 \n baz , 2 \n" -# array = CSV.parse(string, converters: :strip) -# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# The storage structure for header converters is the \Hash CSV::HeaderConverters, -# which works in the same way. -# It also has built-in converter procs: -# - :downcase: Downcases each header. -# - :symbol: Converts each header to a \Symbol. -# -# There is no such storage structure for write headers. -# -# In order for the parsing methods to access stored converters in non-main-Ractors, the -# storage structure must be made shareable first. -# Therefore, Ractor.make_shareable(CSV::Converters) and -# Ractor.make_shareable(CSV::HeaderConverters) must be called before the creation -# of Ractors that use the converters stored in these structures. (Since making the storage -# structures shareable involves freezing them, any custom converters that are to be used -# must be added first.) -# -# ===== Converter Lists -# -# A _converter_ _list_ is an \Array that may include any assortment of: -# - Converter procs. -# - Names of stored converters. -# - Nested converter lists. -# -# Examples: -# numeric_converters = [:integer, :float] -# date_converters = [:date, :date_time] -# [numeric_converters, strip_converter] -# [strip_converter, date_converters, :float] -# -# Like a converter proc, a converter list may be named and stored in either -# \CSV::Converters or CSV::HeaderConverters: -# CSV::Converters[:custom] = [strip_converter, date_converters, :float] -# CSV::HeaderConverters[:custom] = [:downcase, :symbol] -# -# There are two built-in converter lists: -# CSV::Converters[:numeric] # => [:integer, :float] -# CSV::Converters[:all] # => [:date_time, :numeric] -# -# ==== Field \Converters -# -# With no conversion, all parsed fields in all rows become Strings: -# string = "foo,0\nbar,1\nbaz,2\n" -# ary = CSV.parse(string) -# ary # => # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# When you specify a field converter, each parsed field is passed to the converter; -# its return value becomes the stored value for the field. -# A converter might, for example, convert an integer embedded in a \String -# into a true \Integer. -# (In fact, that's what built-in field converter +:integer+ does.) -# -# There are three ways to use field \converters. -# -# - Using option {converters}[#class-CSV-label-Option+converters] with a parsing method: -# ary = CSV.parse(string, converters: :integer) -# ary # => [0, 1, 2] # => [["foo", 0], ["bar", 1], ["baz", 2]] -# - Using option {converters}[#class-CSV-label-Option+converters] with a new \CSV instance: -# csv = CSV.new(string, converters: :integer) -# # Field converters in effect: -# csv.converters # => [:integer] -# csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]] -# - Using method #convert to add a field converter to a \CSV instance: -# csv = CSV.new(string) -# # Add a converter. -# csv.convert(:integer) -# csv.converters # => [:integer] -# csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]] -# -# Installing a field converter does not affect already-read rows: -# csv = CSV.new(string) -# csv.shift # => ["foo", "0"] -# # Add a converter. -# csv.convert(:integer) -# csv.converters # => [:integer] -# csv.read # => [["bar", 1], ["baz", 2]] -# -# There are additional built-in \converters, and custom \converters are also supported. -# -# ===== Built-In Field \Converters -# -# The built-in field converters are in \Hash CSV::Converters: -# - Each key is a field converter name. -# - Each value is one of: -# - A \Proc field converter. -# - An \Array of field converter names. -# -# Display: -# CSV::Converters.each_pair do |name, value| -# if value.kind_of?(Proc) -# p [name, value.class] -# else -# p [name, value] -# end -# end -# Output: -# [:integer, Proc] -# [:float, Proc] -# [:numeric, [:integer, :float]] -# [:date, Proc] -# [:date_time, Proc] -# [:time, Proc] -# [:all, [:date_time, :numeric]] -# -# Each of these converters transcodes values to UTF-8 before attempting conversion. -# If a value cannot be transcoded to UTF-8 the conversion will -# fail and the value will remain unconverted. -# -# Converter +:integer+ converts each field that Integer() accepts: -# data = '0,1,2,x' -# # Without the converter -# csv = CSV.parse_line(data) -# csv # => ["0", "1", "2", "x"] -# # With the converter -# csv = CSV.parse_line(data, converters: :integer) -# csv # => [0, 1, 2, "x"] -# -# Converter +:float+ converts each field that Float() accepts: -# data = '1.0,3.14159,x' -# # Without the converter -# csv = CSV.parse_line(data) -# csv # => ["1.0", "3.14159", "x"] -# # With the converter -# csv = CSV.parse_line(data, converters: :float) -# csv # => [1.0, 3.14159, "x"] -# -# Converter +:numeric+ converts with both +:integer+ and +:float+.. -# -# Converter +:date+ converts each field that Date::parse accepts: -# data = '2001-02-03,x' -# # Without the converter -# csv = CSV.parse_line(data) -# csv # => ["2001-02-03", "x"] -# # With the converter -# csv = CSV.parse_line(data, converters: :date) -# csv # => [#, "x"] -# -# Converter +:date_time+ converts each field that DateTime::parse accepts: -# data = '2020-05-07T14:59:00-05:00,x' -# # Without the converter -# csv = CSV.parse_line(data) -# csv # => ["2020-05-07T14:59:00-05:00", "x"] -# # With the converter -# csv = CSV.parse_line(data, converters: :date_time) -# csv # => [#, "x"] -# -# Converter +time+ converts each field that Time::parse accepts: -# data = '2020-05-07T14:59:00-05:00,x' -# # Without the converter -# csv = CSV.parse_line(data) -# csv # => ["2020-05-07T14:59:00-05:00", "x"] -# # With the converter -# csv = CSV.parse_line(data, converters: :time) -# csv # => [2020-05-07 14:59:00 -0500, "x"] -# -# Converter +:numeric+ converts with both +:date_time+ and +:numeric+.. -# -# As seen above, method #convert adds \converters to a \CSV instance, -# and method #converters returns an \Array of the \converters in effect: -# csv = CSV.new('0,1,2') -# csv.converters # => [] -# csv.convert(:integer) -# csv.converters # => [:integer] -# csv.convert(:date) -# csv.converters # => [:integer, :date] -# -# ===== Custom Field \Converters -# -# You can define a custom field converter: -# strip_converter = proc {|field| field.strip } -# string = " foo , 0 \n bar , 1 \n baz , 2 \n" -# array = CSV.parse(string, converters: strip_converter) -# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# You can register the converter in \Converters \Hash, -# which allows you to refer to it by name: -# CSV::Converters[:strip] = strip_converter -# string = " foo , 0 \n bar , 1 \n baz , 2 \n" -# array = CSV.parse(string, converters: :strip) -# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] -# -# ==== Header \Converters -# -# Header converters operate only on headers (and not on other rows). -# -# There are three ways to use header \converters; -# these examples use built-in header converter +:downcase+, -# which downcases each parsed header. -# -# - Option +header_converters+ with a singleton parsing method: -# string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2" -# tbl = CSV.parse(string, headers: true, header_converters: :downcase) -# tbl.class # => CSV::Table -# tbl.headers # => ["name", "count"] -# -# - Option +header_converters+ with a new \CSV instance: -# csv = CSV.new(string, header_converters: :downcase) -# # Header converters in effect: -# csv.header_converters # => [:downcase] -# tbl = CSV.parse(string, headers: true) -# tbl.headers # => ["Name", "Count"] -# -# - Method #header_convert adds a header converter to a \CSV instance: -# csv = CSV.new(string) -# # Add a header converter. -# csv.header_convert(:downcase) -# csv.header_converters # => [:downcase] -# tbl = CSV.parse(string, headers: true) -# tbl.headers # => ["Name", "Count"] -# -# ===== Built-In Header \Converters -# -# The built-in header \converters are in \Hash CSV::HeaderConverters. -# The keys there are the names of the \converters: -# CSV::HeaderConverters.keys # => [:downcase, :symbol] -# -# Converter +:downcase+ converts each header by downcasing it: -# string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2" -# tbl = CSV.parse(string, headers: true, header_converters: :downcase) -# tbl.class # => CSV::Table -# tbl.headers # => ["name", "count"] -# -# Converter +:symbol+ converts each header by making it into a \Symbol: -# string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2" -# tbl = CSV.parse(string, headers: true, header_converters: :symbol) -# tbl.headers # => [:name, :count] -# Details: -# - Strips leading and trailing whitespace. -# - Downcases the header. -# - Replaces embedded spaces with underscores. -# - Removes non-word characters. -# - Makes the string into a \Symbol. -# -# ===== Custom Header \Converters -# -# You can define a custom header converter: -# upcase_converter = proc {|header| header.upcase } -# string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" -# table = CSV.parse(string, headers: true, header_converters: upcase_converter) -# table # => # -# table.headers # => ["NAME", "VALUE"] -# You can register the converter in \HeaderConverters \Hash, -# which allows you to refer to it by name: -# CSV::HeaderConverters[:upcase] = upcase_converter -# table = CSV.parse(string, headers: true, header_converters: :upcase) -# table # => # -# table.headers # => ["NAME", "VALUE"] -# -# ===== Write \Converters -# -# When you specify a write converter for generating \CSV, -# each field to be written is passed to the converter; -# its return value becomes the new value for the field. -# A converter might, for example, strip whitespace from a field. -# -# Using no write converter (all fields unmodified): -# output_string = CSV.generate do |csv| -# csv << [' foo ', 0] -# csv << [' bar ', 1] -# csv << [' baz ', 2] -# end -# output_string # => " foo ,0\n bar ,1\n baz ,2\n" -# Using option +write_converters+ with two custom write converters: -# strip_converter = proc {|field| field.respond_to?(:strip) ? field.strip : field } -# upcase_converter = proc {|field| field.respond_to?(:upcase) ? field.upcase : field } -# write_converters = [strip_converter, upcase_converter] -# output_string = CSV.generate(write_converters: write_converters) do |csv| -# csv << [' foo ', 0] -# csv << [' bar ', 1] -# csv << [' baz ', 2] -# end -# output_string # => "FOO,0\nBAR,1\nBAZ,2\n" -# -# === Character Encodings (M17n or Multilingualization) -# -# This new CSV parser is m17n savvy. The parser works in the Encoding of the IO -# or String object being read from or written to. Your data is never transcoded -# (unless you ask Ruby to transcode it for you) and will literally be parsed in -# the Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the -# Encoding of your data. This is accomplished by transcoding the parser itself -# into your Encoding. -# -# Some transcoding must take place, of course, to accomplish this multiencoding -# support. For example, :col_sep, :row_sep, and -# :quote_char must be transcoded to match your data. Hopefully this -# makes the entire process feel transparent, since CSV's defaults should just -# magically work for your data. However, you can set these values manually in -# the target Encoding to avoid the translation. -# -# It's also important to note that while all of CSV's core parser is now -# Encoding agnostic, some features are not. For example, the built-in -# converters will try to transcode data to UTF-8 before making conversions. -# Again, you can provide custom converters that are aware of your Encodings to -# avoid this translation. It's just too hard for me to support native -# conversions in all of Ruby's Encodings. -# -# Anyway, the practical side of this is simple: make sure IO and String objects -# passed into CSV have the proper Encoding set and everything should just work. -# CSV methods that allow you to open IO objects (CSV::foreach(), CSV::open(), -# CSV::read(), and CSV::readlines()) do allow you to specify the Encoding. -# -# One minor exception comes when generating CSV into a String with an Encoding -# that is not ASCII compatible. There's no existing data for CSV to use to -# prepare itself and thus you will probably need to manually specify the desired -# Encoding for most of those cases. It will try to guess using the fields in a -# row of output though, when using CSV::generate_line() or Array#to_csv(). -# -# I try to point out any other Encoding issues in the documentation of methods -# as they come up. -# -# This has been tested to the best of my ability with all non-"dummy" Encodings -# Ruby ships with. However, it is brave new code and may have some bugs. -# Please feel free to {report}[mailto:james@grayproductions.net] any issues you -# find with it. -# -class CSV - - # The error thrown when the parser encounters illegal CSV formatting. - class MalformedCSVError < RuntimeError - attr_reader :line_number - alias_method :lineno, :line_number - def initialize(message, line_number) - @line_number = line_number - super("#{message} in line #{line_number}.") - end - end - - # The error thrown when the parser encounters invalid encoding in CSV. - class InvalidEncodingError < MalformedCSVError - attr_reader :encoding - def initialize(encoding, line_number) - @encoding = encoding - super("Invalid byte sequence in #{encoding}", line_number) - end - end - - # - # A FieldInfo Struct contains details about a field's position in the data - # source it was read from. CSV will pass this Struct to some blocks that make - # decisions based on field structure. See CSV.convert_fields() for an - # example. - # - # index:: The zero-based index of the field in its row. - # line:: The line of the data source this row is from. - # header:: The header for the column, when available. - # quoted?:: True or false, whether the original value is quoted or not. - # - FieldInfo = Struct.new(:index, :line, :header, :quoted?) - - # A Regexp used to find and convert some common Date formats. - DateMatcher = / \A(?: (\w+,?\s+)?\w+\s+\d{1,2},?\s+\d{2,4} | - \d{4}-\d{2}-\d{2} )\z /x - # A Regexp used to find and convert some common (Date)Time formats. - DateTimeMatcher = - / \A(?: (\w+,?\s+)?\w+\s+\d{1,2}\s+\d{1,2}:\d{1,2}:\d{1,2},?\s+\d{2,4} | - # ISO-8601 and RFC-3339 (space instead of T) recognized by (Date)Time.parse - \d{4}-\d{2}-\d{2} - (?:[T\s]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?(?:[+-]\d{2}(?::\d{2})|Z)?)?)? - )\z /x - - # The encoding used by all converters. - ConverterEncoding = Encoding.find("UTF-8") - - # A \Hash containing the names and \Procs for the built-in field converters. - # See {Built-In Field Converters}[#class-CSV-label-Built-In+Field+Converters]. - # - # This \Hash is intentionally left unfrozen, and may be extended with - # custom field converters. - # See {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters]. - Converters = { - integer: lambda { |f| - Integer(f.encode(ConverterEncoding)) rescue f - }, - float: lambda { |f| - Float(f.encode(ConverterEncoding)) rescue f - }, - numeric: [:integer, :float], - date: lambda { |f| - begin - e = f.encode(ConverterEncoding) - e.match?(DateMatcher) ? Date.parse(e) : f - rescue # encoding conversion or date parse errors - f - end - }, - date_time: lambda { |f| - begin - e = f.encode(ConverterEncoding) - e.match?(DateTimeMatcher) ? DateTime.parse(e) : f - rescue # encoding conversion or date parse errors - f - end - }, - time: lambda { |f| - begin - e = f.encode(ConverterEncoding) - e.match?(DateTimeMatcher) ? Time.parse(e) : f - rescue # encoding conversion or parse errors - f - end - }, - all: [:date_time, :numeric], - } - - # A \Hash containing the names and \Procs for the built-in header converters. - # See {Built-In Header Converters}[#class-CSV-label-Built-In+Header+Converters]. - # - # This \Hash is intentionally left unfrozen, and may be extended with - # custom field converters. - # See {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters]. - HeaderConverters = { - downcase: lambda { |h| h.encode(ConverterEncoding).downcase }, - symbol: lambda { |h| - h.encode(ConverterEncoding).downcase.gsub(/[^\s\w]+/, "").strip. - gsub(/\s+/, "_").to_sym - }, - symbol_raw: lambda { |h| h.encode(ConverterEncoding).to_sym } - } - - # Default values for method options. - DEFAULT_OPTIONS = { - # For both parsing and generating. - col_sep: ",", - row_sep: :auto, - quote_char: '"', - # For parsing. - field_size_limit: nil, - max_field_size: nil, - converters: nil, - unconverted_fields: nil, - headers: false, - return_headers: false, - header_converters: nil, - skip_blanks: false, - skip_lines: nil, - liberal_parsing: false, - nil_value: nil, - empty_value: "", - strip: false, - # For generating. - write_headers: nil, - quote_empty: true, - force_quotes: false, - write_converters: nil, - write_nil_value: nil, - write_empty_value: "", - }.freeze - - class << self - # :call-seq: - # instance(string, **options) - # instance(io = $stdout, **options) - # instance(string, **options) {|csv| ... } - # instance(io = $stdout, **options) {|csv| ... } - # - # Creates or retrieves cached \CSV objects. - # For arguments and options, see CSV.new. - # - # This API is not Ractor-safe. - # - # --- - # - # With no block given, returns a \CSV object. - # - # The first call to +instance+ creates and caches a \CSV object: - # s0 = 's0' - # csv0 = CSV.instance(s0) - # csv0.class # => CSV - # - # Subsequent calls to +instance+ with that _same_ +string+ or +io+ - # retrieve that same cached object: - # csv1 = CSV.instance(s0) - # csv1.class # => CSV - # csv1.equal?(csv0) # => true # Same CSV object - # - # A subsequent call to +instance+ with a _different_ +string+ or +io+ - # creates and caches a _different_ \CSV object. - # s1 = 's1' - # csv2 = CSV.instance(s1) - # csv2.equal?(csv0) # => false # Different CSV object - # - # All the cached objects remains available: - # csv3 = CSV.instance(s0) - # csv3.equal?(csv0) # true # Same CSV object - # csv4 = CSV.instance(s1) - # csv4.equal?(csv2) # true # Same CSV object - # - # --- - # - # When a block is given, calls the block with the created or retrieved - # \CSV object; returns the block's return value: - # CSV.instance(s0) {|csv| :foo } # => :foo - def instance(data = $stdout, **options) - # create a _signature_ for this method call, data object and options - sig = [data.object_id] + - options.values_at(*DEFAULT_OPTIONS.keys) - - # fetch or create the instance for this signature - @@instances ||= Hash.new - instance = (@@instances[sig] ||= new(data, **options)) - - if block_given? - yield instance # run block, if given, returning result - else - instance # or return the instance - end - end - - # :call-seq: - # filter(in_string_or_io, **options) {|row| ... } -> array_of_arrays or csv_table - # filter(in_string_or_io, out_string_or_io, **options) {|row| ... } -> array_of_arrays or csv_table - # filter(**options) {|row| ... } -> array_of_arrays or csv_table - # - # - Parses \CSV from a source (\String, \IO stream, or ARGF). - # - Calls the given block with each parsed row: - # - Without headers, each row is an \Array. - # - With headers, each row is a CSV::Row. - # - Generates \CSV to an output (\String, \IO stream, or STDOUT). - # - Returns the parsed source: - # - Without headers, an \Array of \Arrays. - # - With headers, a CSV::Table. - # - # When +in_string_or_io+ is given, but not +out_string_or_io+, - # parses from the given +in_string_or_io+ - # and generates to STDOUT. - # - # \String input without headers: - # - # in_string = "foo,0\nbar,1\nbaz,2" - # CSV.filter(in_string) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]] - # - # Output (to STDOUT): - # - # FOO,0 - # BAR,-1 - # BAZ,-2 - # - # \String input with headers: - # - # in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2" - # CSV.filter(in_string, headers: true) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end # => # - # - # Output (to STDOUT): - # - # Name,Value - # FOO,0 - # BAR,-1 - # BAZ,-2 - # - # \IO stream input without headers: - # - # File.write('t.csv', "foo,0\nbar,1\nbaz,2") - # File.open('t.csv') do |in_io| - # CSV.filter(in_io) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end - # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]] - # - # Output (to STDOUT): - # - # FOO,0 - # BAR,-1 - # BAZ,-2 - # - # \IO stream input with headers: - # - # File.write('t.csv', "Name,Value\nfoo,0\nbar,1\nbaz,2") - # File.open('t.csv') do |in_io| - # CSV.filter(in_io, headers: true) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end - # end # => # - # - # Output (to STDOUT): - # - # Name,Value - # FOO,0 - # BAR,-1 - # BAZ,-2 - # - # When both +in_string_or_io+ and +out_string_or_io+ are given, - # parses from +in_string_or_io+ and generates to +out_string_or_io+. - # - # \String output without headers: - # - # in_string = "foo,0\nbar,1\nbaz,2" - # out_string = '' - # CSV.filter(in_string, out_string) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]] - # out_string # => "FOO,0\nBAR,-1\nBAZ,-2\n" - # - # \String output with headers: - # - # in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2" - # out_string = '' - # CSV.filter(in_string, out_string, headers: true) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end # => # - # out_string # => "Name,Value\nFOO,0\nBAR,-1\nBAZ,-2\n" - # - # \IO stream output without headers: - # - # in_string = "foo,0\nbar,1\nbaz,2" - # File.open('t.csv', 'w') do |out_io| - # CSV.filter(in_string, out_io) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end - # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]] - # File.read('t.csv') # => "FOO,0\nBAR,-1\nBAZ,-2\n" - # - # \IO stream output with headers: - # - # in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2" - # File.open('t.csv', 'w') do |out_io| - # CSV.filter(in_string, out_io, headers: true) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end - # end # => # - # File.read('t.csv') # => "Name,Value\nFOO,0\nBAR,-1\nBAZ,-2\n" - # - # When neither +in_string_or_io+ nor +out_string_or_io+ given, - # parses from {ARGF}[rdoc-ref:ARGF] - # and generates to STDOUT. - # - # Without headers: - # - # # Put Ruby code into a file. - # ruby = <<-EOT - # require 'csv' - # CSV.filter do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end - # EOT - # File.write('t.rb', ruby) - # # Put some CSV into a file. - # File.write('t.csv', "foo,0\nbar,1\nbaz,2") - # # Run the Ruby code with CSV filename as argument. - # system(Gem.ruby, "t.rb", "t.csv") - # - # Output (to STDOUT): - # - # FOO,0 - # BAR,-1 - # BAZ,-2 - # - # With headers: - # - # # Put Ruby code into a file. - # ruby = <<-EOT - # require 'csv' - # CSV.filter(headers: true) do |row| - # row[0].upcase! - # row[1] = - row[1].to_i - # end - # EOT - # File.write('t.rb', ruby) - # # Put some CSV into a file. - # File.write('t.csv', "Name,Value\nfoo,0\nbar,1\nbaz,2") - # # Run the Ruby code with CSV filename as argument. - # system(Gem.ruby, "t.rb", "t.csv") - # - # Output (to STDOUT): - # - # Name,Value - # FOO,0 - # BAR,-1 - # BAZ,-2 - # - # Arguments: - # - # * Argument +in_string_or_io+ must be a \String or an \IO stream. - # * Argument +out_string_or_io+ must be a \String or an \IO stream. - # * Arguments **options must be keyword options. - # - # - Each option defined as an {option for parsing}[#class-CSV-label-Options+for+Parsing] - # is used for parsing the filter input. - # - Each option defined as an {option for generating}[#class-CSV-label-Options+for+Generating] - # is used for generator the filter input. - # - # However, there are three options that may be used for both parsing and generating: - # +col_sep+, +quote_char+, and +row_sep+. - # - # Therefore for method +filter+ (and method +filter+ only), - # there are special options that allow these parsing and generating options - # to be specified separately: - # - # - Options +input_col_sep+ and +output_col_sep+ - # (and their aliases +in_col_sep+ and +out_col_sep+) - # specify the column separators for parsing and generating. - # - Options +input_quote_char+ and +output_quote_char+ - # (and their aliases +in_quote_char+ and +out_quote_char+) - # specify the quote characters for parsing and generting. - # - Options +input_row_sep+ and +output_row_sep+ - # (and their aliases +in_row_sep+ and +out_row_sep+) - # specify the row separators for parsing and generating. - # - # Example options (for column separators): - # - # CSV.filter # Default for both parsing and generating. - # CSV.filter(in_col_sep: ';') # ';' for parsing, default for generating. - # CSV.filter(out_col_sep: '|') # Default for parsing, '|' for generating. - # CSV.filter(in_col_sep: ';', out_col_sep: '|') # ';' for parsing, '|' for generating. - # - # Note that for a special option (e.g., +input_col_sep+) - # and its corresponding "regular" option (e.g., +col_sep+), - # the two are mutually overriding. - # - # Another example (possibly surprising): - # - # CSV.filter(in_col_sep: ';', col_sep: '|') # '|' for both parsing(!) and generating. - # - def filter(input=nil, output=nil, **options) - # parse options for input, output, or both - in_options, out_options = Hash.new, {row_sep: InputRecordSeparator.value} - options.each do |key, value| - case key - when /\Ain(?:put)?_(.+)\Z/ - in_options[$1.to_sym] = value - when /\Aout(?:put)?_(.+)\Z/ - out_options[$1.to_sym] = value - else - in_options[key] = value - out_options[key] = value - end - end - - # build input and output wrappers - input = new(input || ARGF, **in_options) - output = new(output || $stdout, **out_options) - - # process headers - need_manual_header_output = - (in_options[:headers] and - out_options[:headers] == true and - out_options[:write_headers]) - if need_manual_header_output - first_row = input.shift - if first_row - if first_row.is_a?(Row) - headers = first_row.headers - yield headers - output << headers - end - yield first_row - output << first_row - end - end - - # read, yield, write - input.each do |row| - yield row - output << row - end - end - - # - # :call-seq: - # foreach(path_or_io, mode='r', **options) {|row| ... ) - # foreach(path_or_io, mode='r', **options) -> new_enumerator - # - # Calls the block with each row read from source +path_or_io+. - # - # \Path input without headers: - # - # string = "foo,0\nbar,1\nbaz,2\n" - # in_path = 't.csv' - # File.write(in_path, string) - # CSV.foreach(in_path) {|row| p row } - # - # Output: - # - # ["foo", "0"] - # ["bar", "1"] - # ["baz", "2"] - # - # \Path input with headers: - # - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # in_path = 't.csv' - # File.write(in_path, string) - # CSV.foreach(in_path, headers: true) {|row| p row } - # - # Output: - # - # - # - # - # - # \IO stream input without headers: - # - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # File.open('t.csv') do |in_io| - # CSV.foreach(in_io) {|row| p row } - # end - # - # Output: - # - # ["foo", "0"] - # ["bar", "1"] - # ["baz", "2"] - # - # \IO stream input with headers: - # - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # File.open('t.csv') do |in_io| - # CSV.foreach(in_io, headers: true) {|row| p row } - # end - # - # Output: - # - # - # - # - # - # With no block given, returns an \Enumerator: - # - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # CSV.foreach(path) # => # - # - # Arguments: - # * Argument +path_or_io+ must be a file path or an \IO stream. - # * Argument +mode+, if given, must be a \File mode. - # See {Access Modes}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Access+Modes]. - # * Arguments **options must be keyword options. - # See {Options for Parsing}[#class-CSV-label-Options+for+Parsing]. - # * This method optionally accepts an additional :encoding option - # that you can use to specify the Encoding of the data read from +path+ or +io+. - # You must provide this unless your data is in the encoding - # given by Encoding::default_external. - # Parsing will use this to determine how to parse the data. - # You may provide a second Encoding to - # have the data transcoded as it is read. For example, - # encoding: 'UTF-32BE:UTF-8' - # would read +UTF-32BE+ data from the file - # but transcode it to +UTF-8+ before parsing. - def foreach(path, mode="r", **options, &block) - return to_enum(__method__, path, mode, **options) unless block_given? - open(path, mode, **options) do |csv| - csv.each(&block) - end - end - - # - # :call-seq: - # generate(csv_string, **options) {|csv| ... } - # generate(**options) {|csv| ... } - # - # * Argument +csv_string+, if given, must be a \String object; - # defaults to a new empty \String. - # * Arguments +options+, if given, should be generating options. - # See {Options for Generating}[#class-CSV-label-Options+for+Generating]. - # - # --- - # - # Creates a new \CSV object via CSV.new(csv_string, **options); - # calls the block with the \CSV object, which the block may modify; - # returns the \String generated from the \CSV object. - # - # Note that a passed \String *is* modified by this method. - # Pass csv_string.dup if the \String must be preserved. - # - # This method has one additional option: :encoding, - # which sets the base Encoding for the output if no no +str+ is specified. - # CSV needs this hint if you plan to output non-ASCII compatible data. - # - # --- - # - # Add lines: - # input_string = "foo,0\nbar,1\nbaz,2\n" - # output_string = CSV.generate(input_string) do |csv| - # csv << ['bat', 3] - # csv << ['bam', 4] - # end - # output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" - # input_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" - # output_string.equal?(input_string) # => true # Same string, modified - # - # Add lines into new string, preserving old string: - # input_string = "foo,0\nbar,1\nbaz,2\n" - # output_string = CSV.generate(input_string.dup) do |csv| - # csv << ['bat', 3] - # csv << ['bam', 4] - # end - # output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n" - # input_string # => "foo,0\nbar,1\nbaz,2\n" - # output_string.equal?(input_string) # => false # Different strings - # - # Create lines from nothing: - # output_string = CSV.generate do |csv| - # csv << ['foo', 0] - # csv << ['bar', 1] - # csv << ['baz', 2] - # end - # output_string # => "foo,0\nbar,1\nbaz,2\n" - # - # --- - # - # Raises an exception if +csv_string+ is not a \String object: - # # Raises TypeError (no implicit conversion of Integer into String) - # CSV.generate(0) - # - def generate(str=nil, **options) - encoding = options[:encoding] - # add a default empty String, if none was given - if str - str = StringIO.new(str) - str.seek(0, IO::SEEK_END) - str.set_encoding(encoding) if encoding - else - str = +"" - str.force_encoding(encoding) if encoding - end - csv = new(str, **options) # wrap - yield csv # yield for appending - csv.string # return final String - end - - # :call-seq: - # CSV.generate_line(ary) - # CSV.generate_line(ary, **options) - # - # Returns the \String created by generating \CSV from +ary+ - # using the specified +options+. - # - # Argument +ary+ must be an \Array. - # - # Special options: - # * Option :row_sep defaults to "\n"> on Ruby 3.0 or later - # and $INPUT_RECORD_SEPARATOR ($/) otherwise.: - # $INPUT_RECORD_SEPARATOR # => "\n" - # * This method accepts an additional option, :encoding, which sets the base - # Encoding for the output. This method will try to guess your Encoding from - # the first non-+nil+ field in +row+, if possible, but you may need to use - # this parameter as a backup plan. - # - # For other +options+, - # see {Options for Generating}[#class-CSV-label-Options+for+Generating]. - # - # --- - # - # Returns the \String generated from an \Array: - # CSV.generate_line(['foo', '0']) # => "foo,0\n" - # - # --- - # - # Raises an exception if +ary+ is not an \Array: - # # Raises NoMethodError (undefined method `find' for :foo:Symbol) - # CSV.generate_line(:foo) - # - def generate_line(row, **options) - options = {row_sep: InputRecordSeparator.value}.merge(options) - str = +"" - if options[:encoding] - str.force_encoding(options[:encoding]) - else - fallback_encoding = nil - output_encoding = nil - row.each do |field| - next unless field.is_a?(String) - fallback_encoding ||= field.encoding - next if field.ascii_only? - output_encoding = field.encoding - break - end - output_encoding ||= fallback_encoding - if output_encoding - str.force_encoding(output_encoding) - end - end - (new(str, **options) << row).string - end - - # :call-seq: - # CSV.generate_lines(rows) - # CSV.generate_lines(rows, **options) - # - # Returns the \String created by generating \CSV from - # using the specified +options+. - # - # Argument +rows+ must be an \Array of row. Row is \Array of \String or \CSV::Row. - # - # Special options: - # * Option :row_sep defaults to "\n" on Ruby 3.0 or later - # and $INPUT_RECORD_SEPARATOR ($/) otherwise.: - # $INPUT_RECORD_SEPARATOR # => "\n" - # * This method accepts an additional option, :encoding, which sets the base - # Encoding for the output. This method will try to guess your Encoding from - # the first non-+nil+ field in +row+, if possible, but you may need to use - # this parameter as a backup plan. - # - # For other +options+, - # see {Options for Generating}[#class-CSV-label-Options+for+Generating]. - # - # --- - # - # Returns the \String generated from an - # CSV.generate_lines([['foo', '0'], ['bar', '1'], ['baz', '2']]) # => "foo,0\nbar,1\nbaz,2\n" - # - # --- - # - # Raises an exception - # # Raises NoMethodError (undefined method `each' for :foo:Symbol) - # CSV.generate_lines(:foo) - # - def generate_lines(rows, **options) - self.generate(**options) do |csv| - rows.each do |row| - csv << row - end - end - end - - # - # :call-seq: - # open(path_or_io, mode = "rb", **options ) -> new_csv - # open(path_or_io, mode = "rb", **options ) { |csv| ... } -> object - # - # possible options elements: - # keyword form: - # :invalid => nil # raise error on invalid byte sequence (default) - # :invalid => :replace # replace invalid byte sequence - # :undef => :replace # replace undefined conversion - # :replace => string # replacement string ("?" or "\uFFFD" if not specified) - # - # * Argument +path_or_io+, must be a file path or an \IO stream. - # :include: ../doc/csv/arguments/io.rdoc - # * Argument +mode+, if given, must be a \File mode. - # See {Access Modes}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Access+Modes]. - # * Arguments **options must be keyword options. - # See {Options for Generating}[#class-CSV-label-Options+for+Generating]. - # * This method optionally accepts an additional :encoding option - # that you can use to specify the Encoding of the data read from +path+ or +io+. - # You must provide this unless your data is in the encoding - # given by Encoding::default_external. - # Parsing will use this to determine how to parse the data. - # You may provide a second Encoding to - # have the data transcoded as it is read. For example, - # encoding: 'UTF-32BE:UTF-8' - # would read +UTF-32BE+ data from the file - # but transcode it to +UTF-8+ before parsing. - # - # --- - # - # These examples assume prior execution of: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # - # string_io = StringIO.new - # string_io << "foo,0\nbar,1\nbaz,2\n" - # - # --- - # - # With no block given, returns a new \CSV object. - # - # Create a \CSV object using a file path: - # csv = CSV.open(path) - # csv # => # - # - # Create a \CSV object using an open \File: - # csv = CSV.open(File.open(path)) - # csv # => # - # - # Create a \CSV object using a \StringIO: - # csv = CSV.open(string_io) - # csv # => # - # --- - # - # With a block given, calls the block with the created \CSV object; - # returns the block's return value: - # - # Using a file path: - # csv = CSV.open(path) {|csv| p csv} - # csv # => # - # Output: - # # - # - # Using an open \File: - # csv = CSV.open(File.open(path)) {|csv| p csv} - # csv # => # - # Output: - # # - # - # Using a \StringIO: - # csv = CSV.open(string_io) {|csv| p csv} - # csv # => # - # Output: - # # - # --- - # - # Raises an exception if the argument is not a \String object or \IO object: - # # Raises TypeError (no implicit conversion of Symbol into String) - # CSV.open(:foo) - def open(filename_or_io, mode="r", **options) - # wrap a File opened with the remaining +args+ with no newline - # decorator - file_opts = {} - may_enable_bom_detection_automatically(filename_or_io, - mode, - options, - file_opts) - file_opts.merge!(options) - unless file_opts.key?(:newline) - file_opts[:universal_newline] ||= false - end - options.delete(:invalid) - options.delete(:undef) - options.delete(:replace) - options.delete_if {|k, _| /newline\z/.match?(k)} - - if filename_or_io.is_a?(StringIO) - f = create_stringio(filename_or_io.string, mode, **file_opts) - else - begin - f = File.open(filename_or_io, mode, **file_opts) - rescue ArgumentError => e - raise unless /needs binmode/.match?(e.message) and mode == "r" - mode = "rb" - file_opts = {encoding: Encoding.default_external}.merge(file_opts) - retry - end - end - - begin - csv = new(f, **options) - rescue Exception - f.close - raise - end - - # handle blocks like Ruby's open(), not like the CSV library - if block_given? - begin - yield csv - ensure - csv.close - end - else - csv - end - end - - # - # :call-seq: - # parse(string) -> array_of_arrays - # parse(io) -> array_of_arrays - # parse(string, headers: ..., **options) -> csv_table - # parse(io, headers: ..., **options) -> csv_table - # parse(string, **options) {|row| ... } - # parse(io, **options) {|row| ... } - # - # Parses +string+ or +io+ using the specified +options+. - # - # - Argument +string+ should be a \String object; - # it will be put into a new StringIO object positioned at the beginning. - # :include: ../doc/csv/arguments/io.rdoc - # - Argument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing] - # - # ====== Without Option +headers+ - # - # Without {option +headers+}[#class-CSV-label-Option+headers] case. - # - # These examples assume prior execution of: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # - # --- - # - # With no block given, returns an \Array of Arrays formed from the source. - # - # Parse a \String: - # a_of_a = CSV.parse(string) - # a_of_a # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - # - # Parse an open \File: - # a_of_a = File.open(path) do |file| - # CSV.parse(file) - # end - # a_of_a # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - # - # --- - # - # With a block given, calls the block with each parsed row: - # - # Parse a \String: - # CSV.parse(string) {|row| p row } - # - # Output: - # ["foo", "0"] - # ["bar", "1"] - # ["baz", "2"] - # - # Parse an open \File: - # File.open(path) do |file| - # CSV.parse(file) {|row| p row } - # end - # - # Output: - # ["foo", "0"] - # ["bar", "1"] - # ["baz", "2"] - # - # ====== With Option +headers+ - # - # With {option +headers+}[#class-CSV-label-Option+headers] case. - # - # These examples assume prior execution of: - # string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # - # --- - # - # With no block given, returns a CSV::Table object formed from the source. - # - # Parse a \String: - # csv_table = CSV.parse(string, headers: ['Name', 'Count']) - # csv_table # => # - # - # Parse an open \File: - # csv_table = File.open(path) do |file| - # CSV.parse(file, headers: ['Name', 'Count']) - # end - # csv_table # => # - # - # --- - # - # With a block given, calls the block with each parsed row, - # which has been formed into a CSV::Row object: - # - # Parse a \String: - # CSV.parse(string, headers: ['Name', 'Count']) {|row| p row } - # - # Output: - # # - # # - # # - # - # Parse an open \File: - # File.open(path) do |file| - # CSV.parse(file, headers: ['Name', 'Count']) {|row| p row } - # end - # - # Output: - # # - # # - # # - # - # --- - # - # Raises an exception if the argument is not a \String object or \IO object: - # # Raises NoMethodError (undefined method `close' for :foo:Symbol) - # CSV.parse(:foo) - # - # --- - # - # Please make sure if your text contains \BOM or not. CSV.parse will not remove - # \BOM automatically. You might want to remove \BOM before calling CSV.parse : - # # remove BOM on calling File.open - # File.open(path, encoding: 'bom|utf-8') do |file| - # CSV.parse(file, headers: true) do |row| - # # you can get value by column name because BOM is removed - # p row['Name'] - # end - # end - # - # Output: - # # "foo" - # # "bar" - # # "baz" - def parse(str, **options, &block) - csv = new(str, **options) - - return csv.each(&block) if block_given? - - # slurp contents, if no block is given - begin - csv.read - ensure - csv.close - end - end - - # :call-seq: - # CSV.parse_line(string) -> new_array or nil - # CSV.parse_line(io) -> new_array or nil - # CSV.parse_line(string, **options) -> new_array or nil - # CSV.parse_line(io, **options) -> new_array or nil - # CSV.parse_line(string, headers: true, **options) -> csv_row or nil - # CSV.parse_line(io, headers: true, **options) -> csv_row or nil - # - # Returns the data created by parsing the first line of +string+ or +io+ - # using the specified +options+. - # - # - Argument +string+ should be a \String object; - # it will be put into a new StringIO object positioned at the beginning. - # :include: ../doc/csv/arguments/io.rdoc - # - Argument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing] - # - # ====== Without Option +headers+ - # - # Without option +headers+, returns the first row as a new \Array. - # - # These examples assume prior execution of: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # - # Parse the first line from a \String object: - # CSV.parse_line(string) # => ["foo", "0"] - # - # Parse the first line from a File object: - # File.open(path) do |file| - # CSV.parse_line(file) # => ["foo", "0"] - # end # => ["foo", "0"] - # - # Returns +nil+ if the argument is an empty \String: - # CSV.parse_line('') # => nil - # - # ====== With Option +headers+ - # - # With {option +headers+}[#class-CSV-label-Option+headers], - # returns the first row as a CSV::Row object. - # - # These examples assume prior execution of: - # string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # - # Parse the first line from a \String object: - # CSV.parse_line(string, headers: true) # => # - # - # Parse the first line from a File object: - # File.open(path) do |file| - # CSV.parse_line(file, headers: true) - # end # => # - # - # --- - # - # Raises an exception if the argument is +nil+: - # # Raises ArgumentError (Cannot parse nil as CSV): - # CSV.parse_line(nil) - # - def parse_line(line, **options) - new(line, **options).each.first - end - - # - # :call-seq: - # read(source, **options) -> array_of_arrays - # read(source, headers: true, **options) -> csv_table - # - # Opens the given +source+ with the given +options+ (see CSV.open), - # reads the source (see CSV#read), and returns the result, - # which will be either an \Array of Arrays or a CSV::Table. - # - # Without headers: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - # - # With headers: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # CSV.read(path, headers: true) # => # - def read(path, **options) - open(path, **options) { |csv| csv.read } - end - - # :call-seq: - # CSV.readlines(source, **options) - # - # Alias for CSV.read. - def readlines(path, **options) - read(path, **options) - end - - # :call-seq: - # CSV.table(source, **options) - # - # Calls CSV.read with +source+, +options+, and certain default options: - # - +headers+: +true+ - # - +converters+: +:numeric+ - # - +header_converters+: +:symbol+ - # - # Returns a CSV::Table object. - # - # Example: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # CSV.table(path) # => # - def table(path, **options) - default_options = { - headers: true, - converters: :numeric, - header_converters: :symbol, - } - options = default_options.merge(options) - read(path, **options) - end - - ON_WINDOWS = /mingw|mswin/.match?(RUBY_PLATFORM) - private_constant :ON_WINDOWS - - private - def may_enable_bom_detection_automatically(filename_or_io, - mode, - options, - file_opts) - if filename_or_io.is_a?(StringIO) - # Support to StringIO was dropped for Ruby 2.6 and earlier without BOM support: - # https://github.com/ruby/stringio/pull/47 - return if RUBY_VERSION < "2.7" - else - # "bom|utf-8" may be buggy on Windows: - # https://bugs.ruby-lang.org/issues/20526 - return if ON_WINDOWS - end - return unless Encoding.default_external == Encoding::UTF_8 - return if options.key?(:encoding) - return if options.key?(:external_encoding) - return if mode.is_a?(String) and mode.include?(":") - file_opts[:encoding] = "bom|utf-8" - end - - if RUBY_VERSION < "2.7" - def create_stringio(str, mode, opts) - opts.delete_if {|k, _| k == :universal_newline or DEFAULT_OPTIONS.key?(k)} - raise ArgumentError, "Unsupported options parsing StringIO: #{opts.keys}" unless opts.empty? - StringIO.new(str, mode) - end - else - def create_stringio(str, mode, opts) - StringIO.new(str, mode, **opts) - end - end - end - - # :call-seq: - # CSV.new(string) - # CSV.new(io) - # CSV.new(string, **options) - # CSV.new(io, **options) - # - # Returns the new \CSV object created using +string+ or +io+ - # and the specified +options+. - # - # - Argument +string+ should be a \String object; - # it will be put into a new StringIO object positioned at the beginning. - # :include: ../doc/csv/arguments/io.rdoc - # - Argument +options+: See: - # * {Options for Parsing}[#class-CSV-label-Options+for+Parsing] - # * {Options for Generating}[#class-CSV-label-Options+for+Generating] - # For performance reasons, the options cannot be overridden - # in a \CSV object, so those specified here will endure. - # - # In addition to the \CSV instance methods, several \IO methods are delegated. - # See {Delegated Methods}[#class-CSV-label-Delegated+Methods]. - # - # --- - # - # Create a \CSV object from a \String object: - # csv = CSV.new('foo,0') - # csv # => # - # - # Create a \CSV object from a \File object: - # File.write('t.csv', 'foo,0') - # csv = CSV.new(File.open('t.csv')) - # csv # => # - # - # --- - # - # Raises an exception if the argument is +nil+: - # # Raises ArgumentError (Cannot parse nil as CSV): - # CSV.new(nil) - # - def initialize(data, - col_sep: ",", - row_sep: :auto, - quote_char: '"', - field_size_limit: nil, - max_field_size: nil, - converters: nil, - unconverted_fields: nil, - headers: false, - return_headers: false, - write_headers: nil, - header_converters: nil, - skip_blanks: false, - force_quotes: false, - skip_lines: nil, - liberal_parsing: false, - internal_encoding: nil, - external_encoding: nil, - encoding: nil, - nil_value: nil, - empty_value: "", - strip: false, - quote_empty: true, - write_converters: nil, - write_nil_value: nil, - write_empty_value: "") - raise ArgumentError.new("Cannot parse nil as CSV") if data.nil? - - if data.is_a?(String) - if encoding - if encoding.is_a?(String) - data_external_encoding, data_internal_encoding = encoding.split(":", 2) - if data_internal_encoding - data = data.encode(data_internal_encoding, data_external_encoding) - else - data = data.dup.force_encoding(data_external_encoding) - end - else - data = data.dup.force_encoding(encoding) - end - end - @io = StringIO.new(data) - else - @io = data - end - @encoding = determine_encoding(encoding, internal_encoding) - - @base_fields_converter_options = { - nil_value: nil_value, - empty_value: empty_value, - } - @write_fields_converter_options = { - nil_value: write_nil_value, - empty_value: write_empty_value, - } - @initial_converters = converters - @initial_header_converters = header_converters - @initial_write_converters = write_converters - - if max_field_size.nil? and field_size_limit - max_field_size = field_size_limit - 1 - end - @parser_options = { - column_separator: col_sep, - row_separator: row_sep, - quote_character: quote_char, - max_field_size: max_field_size, - unconverted_fields: unconverted_fields, - headers: headers, - return_headers: return_headers, - skip_blanks: skip_blanks, - skip_lines: skip_lines, - liberal_parsing: liberal_parsing, - encoding: @encoding, - nil_value: nil_value, - empty_value: empty_value, - strip: strip, - } - @parser = nil - @parser_enumerator = nil - @eof_error = nil - - @writer_options = { - encoding: @encoding, - force_encoding: (not encoding.nil?), - force_quotes: force_quotes, - headers: headers, - write_headers: write_headers, - column_separator: col_sep, - row_separator: row_sep, - quote_character: quote_char, - quote_empty: quote_empty, - } - - @writer = nil - writer if @writer_options[:write_headers] - end - - class TSV < CSV - def initialize(data, **options) - super(data, **({col_sep: "\t"}.merge(options))) - end - end - - # :call-seq: - # csv.col_sep -> string - # - # Returns the encoded column separator; used for parsing and writing; - # see {Option +col_sep+}[#class-CSV-label-Option+col_sep]: - # CSV.new('').col_sep # => "," - def col_sep - parser.column_separator - end - - # :call-seq: - # csv.row_sep -> string - # - # Returns the encoded row separator; used for parsing and writing; - # see {Option +row_sep+}[#class-CSV-label-Option+row_sep]: - # CSV.new('').row_sep # => "\n" - def row_sep - parser.row_separator - end - - # :call-seq: - # csv.quote_char -> character - # - # Returns the encoded quote character; used for parsing and writing; - # see {Option +quote_char+}[#class-CSV-label-Option+quote_char]: - # CSV.new('').quote_char # => "\"" - def quote_char - parser.quote_character - end - - # :call-seq: - # csv.field_size_limit -> integer or nil - # - # Returns the limit for field size; used for parsing; - # see {Option +field_size_limit+}[#class-CSV-label-Option+field_size_limit]: - # CSV.new('').field_size_limit # => nil - # - # Deprecated since 3.2.3. Use +max_field_size+ instead. - def field_size_limit - parser.field_size_limit - end - - # :call-seq: - # csv.max_field_size -> integer or nil - # - # Returns the limit for field size; used for parsing; - # see {Option +max_field_size+}[#class-CSV-label-Option+max_field_size]: - # CSV.new('').max_field_size # => nil - # - # Since 3.2.3. - def max_field_size - parser.max_field_size - end - - # :call-seq: - # csv.skip_lines -> regexp or nil - # - # Returns the \Regexp used to identify comment lines; used for parsing; - # see {Option +skip_lines+}[#class-CSV-label-Option+skip_lines]: - # CSV.new('').skip_lines # => nil - def skip_lines - parser.skip_lines - end - - # :call-seq: - # csv.converters -> array - # - # Returns an \Array containing field converters; - # see {Field Converters}[#class-CSV-label-Field+Converters]: - # csv = CSV.new('') - # csv.converters # => [] - # csv.convert(:integer) - # csv.converters # => [:integer] - # csv.convert(proc {|x| x.to_s }) - # csv.converters - # - # Notes that you need to call - # +Ractor.make_shareable(CSV::Converters)+ on the main Ractor to use - # this method. - def converters - parser_fields_converter.map do |converter| - name = Converters.rassoc(converter) - name ? name.first : converter - end - end - - # :call-seq: - # csv.unconverted_fields? -> object - # - # Returns the value that determines whether unconverted fields are to be - # available; used for parsing; - # see {Option +unconverted_fields+}[#class-CSV-label-Option+unconverted_fields]: - # CSV.new('').unconverted_fields? # => nil - def unconverted_fields? - parser.unconverted_fields? - end - - # :call-seq: - # csv.headers -> object - # - # Returns the value that determines whether headers are used; used for parsing; - # see {Option +headers+}[#class-CSV-label-Option+headers]: - # CSV.new('').headers # => nil - def headers - if @writer - @writer.headers - else - parsed_headers = parser.headers - return parsed_headers if parsed_headers - raw_headers = @parser_options[:headers] - raw_headers = nil if raw_headers == false - raw_headers - end - end - - # :call-seq: - # csv.return_headers? -> true or false - # - # Returns the value that determines whether headers are to be returned; used for parsing; - # see {Option +return_headers+}[#class-CSV-label-Option+return_headers]: - # CSV.new('').return_headers? # => false - def return_headers? - parser.return_headers? - end - - # :call-seq: - # csv.write_headers? -> true or false - # - # Returns the value that determines whether headers are to be written; used for generating; - # see {Option +write_headers+}[#class-CSV-label-Option+write_headers]: - # CSV.new('').write_headers? # => nil - def write_headers? - @writer_options[:write_headers] - end - - # :call-seq: - # csv.header_converters -> array - # - # Returns an \Array containing header converters; used for parsing; - # see {Header Converters}[#class-CSV-label-Header+Converters]: - # CSV.new('').header_converters # => [] - # - # Notes that you need to call - # +Ractor.make_shareable(CSV::HeaderConverters)+ on the main Ractor - # to use this method. - def header_converters - header_fields_converter.map do |converter| - name = HeaderConverters.rassoc(converter) - name ? name.first : converter - end - end - - # :call-seq: - # csv.skip_blanks? -> true or false - # - # Returns the value that determines whether blank lines are to be ignored; used for parsing; - # see {Option +skip_blanks+}[#class-CSV-label-Option+skip_blanks]: - # CSV.new('').skip_blanks? # => false - def skip_blanks? - parser.skip_blanks? - end - - # :call-seq: - # csv.force_quotes? -> true or false - # - # Returns the value that determines whether all output fields are to be quoted; - # used for generating; - # see {Option +force_quotes+}[#class-CSV-label-Option+force_quotes]: - # CSV.new('').force_quotes? # => false - def force_quotes? - @writer_options[:force_quotes] - end - - # :call-seq: - # csv.liberal_parsing? -> true or false - # - # Returns the value that determines whether illegal input is to be handled; used for parsing; - # see {Option +liberal_parsing+}[#class-CSV-label-Option+liberal_parsing]: - # CSV.new('').liberal_parsing? # => false - def liberal_parsing? - parser.liberal_parsing? - end - - # :call-seq: - # csv.encoding -> encoding - # - # Returns the encoding used for parsing and generating; - # see {Character Encodings (M17n or Multilingualization)}[#class-CSV-label-Character+Encodings+-28M17n+or+Multilingualization-29]: - # CSV.new('').encoding # => # - attr_reader :encoding - - # :call-seq: - # csv.line_no -> integer - # - # Returns the count of the rows parsed or generated. - # - # Parsing: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # CSV.open(path) do |csv| - # csv.each do |row| - # p [csv.lineno, row] - # end - # end - # Output: - # [1, ["foo", "0"]] - # [2, ["bar", "1"]] - # [3, ["baz", "2"]] - # - # Generating: - # CSV.generate do |csv| - # p csv.lineno; csv << ['foo', 0] - # p csv.lineno; csv << ['bar', 1] - # p csv.lineno; csv << ['baz', 2] - # end - # Output: - # 0 - # 1 - # 2 - def lineno - if @writer - @writer.lineno - else - parser.lineno - end - end - - # :call-seq: - # csv.line -> array - # - # Returns the line most recently read: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # CSV.open(path) do |csv| - # csv.each do |row| - # p [csv.lineno, csv.line] - # end - # end - # Output: - # [1, "foo,0\n"] - # [2, "bar,1\n"] - # [3, "baz,2\n"] - def line - parser.line - end - - ### IO and StringIO Delegation ### - - extend Forwardable - def_delegators :@io, :binmode, :close, :close_read, :close_write, - :closed?, :external_encoding, :fcntl, - :fileno, :flush, :fsync, :internal_encoding, - :isatty, :pid, :pos, :pos=, :reopen, - :seek, :string, :sync, :sync=, :tell, - :truncate, :tty? - - def binmode? - if @io.respond_to?(:binmode?) - @io.binmode? - else - false - end - end - - def flock(*args) - raise NotImplementedError unless @io.respond_to?(:flock) - @io.flock(*args) - end - - def ioctl(*args) - raise NotImplementedError unless @io.respond_to?(:ioctl) - @io.ioctl(*args) - end - - def path - @io.path if @io.respond_to?(:path) - end - - def stat(*args) - raise NotImplementedError unless @io.respond_to?(:stat) - @io.stat(*args) - end - - def to_i - raise NotImplementedError unless @io.respond_to?(:to_i) - @io.to_i - end - - def to_io - @io.respond_to?(:to_io) ? @io.to_io : @io - end - - def eof? - return false if @eof_error - begin - parser_enumerator.peek - false - rescue MalformedCSVError => error - @eof_error = error - false - rescue StopIteration - true - end - end - alias_method :eof, :eof? - - # Rewinds the underlying IO object and resets CSV's lineno() counter. - def rewind - @parser = nil - @parser_enumerator = nil - @eof_error = nil - @writer.rewind if @writer - @io.rewind - end - - ### End Delegation ### - - # :call-seq: - # csv << row -> self - # - # Appends a row to +self+. - # - # - Argument +row+ must be an \Array object or a CSV::Row object. - # - The output stream must be open for writing. - # - # --- - # - # Append Arrays: - # CSV.generate do |csv| - # csv << ['foo', 0] - # csv << ['bar', 1] - # csv << ['baz', 2] - # end # => "foo,0\nbar,1\nbaz,2\n" - # - # Append CSV::Rows: - # headers = [] - # CSV.generate do |csv| - # csv << CSV::Row.new(headers, ['foo', 0]) - # csv << CSV::Row.new(headers, ['bar', 1]) - # csv << CSV::Row.new(headers, ['baz', 2]) - # end # => "foo,0\nbar,1\nbaz,2\n" - # - # Headers in CSV::Row objects are not appended: - # headers = ['Name', 'Count'] - # CSV.generate do |csv| - # csv << CSV::Row.new(headers, ['foo', 0]) - # csv << CSV::Row.new(headers, ['bar', 1]) - # csv << CSV::Row.new(headers, ['baz', 2]) - # end # => "foo,0\nbar,1\nbaz,2\n" - # - # --- - # - # Raises an exception if +row+ is not an \Array or \CSV::Row: - # CSV.generate do |csv| - # # Raises NoMethodError (undefined method `collect' for :foo:Symbol) - # csv << :foo - # end - # - # Raises an exception if the output stream is not opened for writing: - # path = 't.csv' - # File.write(path, '') - # File.open(path) do |file| - # CSV.open(file) do |csv| - # # Raises IOError (not opened for writing) - # csv << ['foo', 0] - # end - # end - def <<(row) - writer << row - self - end - alias_method :add_row, :<< - alias_method :puts, :<< - - # :call-seq: - # convert(converter_name) -> array_of_procs - # convert {|field, field_info| ... } -> array_of_procs - # - # - With no block, installs a field converter (a \Proc). - # - With a block, defines and installs a custom field converter. - # - Returns the \Array of installed field converters. - # - # - Argument +converter_name+, if given, should be the name - # of an existing field converter. - # - # See {Field Converters}[#class-CSV-label-Field+Converters]. - # --- - # - # With no block, installs a field converter: - # csv = CSV.new('') - # csv.convert(:integer) - # csv.convert(:float) - # csv.convert(:date) - # csv.converters # => [:integer, :float, :date] - # - # --- - # - # The block, if given, is called for each field: - # - Argument +field+ is the field value. - # - Argument +field_info+ is a CSV::FieldInfo object - # containing details about the field. - # - # The examples here assume the prior execution of: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # - # Example giving a block: - # csv = CSV.open(path) - # csv.convert {|field, field_info| p [field, field_info]; field.upcase } - # csv.read # => [["FOO", "0"], ["BAR", "1"], ["BAZ", "2"]] - # - # Output: - # ["foo", #] - # ["0", #] - # ["bar", #] - # ["1", #] - # ["baz", #] - # ["2", #] - # - # The block need not return a \String object: - # csv = CSV.open(path) - # csv.convert {|field, field_info| field.to_sym } - # csv.read # => [[:foo, :"0"], [:bar, :"1"], [:baz, :"2"]] - # - # If +converter_name+ is given, the block is not called: - # csv = CSV.open(path) - # csv.convert(:integer) {|field, field_info| fail 'Cannot happen' } - # csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]] - # - # --- - # - # Raises a parse-time exception if +converter_name+ is not the name of a built-in - # field converter: - # csv = CSV.open(path) - # csv.convert(:nosuch) => [nil] - # # Raises NoMethodError (undefined method `arity' for nil:NilClass) - # csv.read - def convert(name = nil, &converter) - parser_fields_converter.add_converter(name, &converter) - end - - # :call-seq: - # header_convert(converter_name) -> array_of_procs - # header_convert {|header, field_info| ... } -> array_of_procs - # - # - With no block, installs a header converter (a \Proc). - # - With a block, defines and installs a custom header converter. - # - Returns the \Array of installed header converters. - # - # - Argument +converter_name+, if given, should be the name - # of an existing header converter. - # - # See {Header Converters}[#class-CSV-label-Header+Converters]. - # --- - # - # With no block, installs a header converter: - # csv = CSV.new('') - # csv.header_convert(:symbol) - # csv.header_convert(:downcase) - # csv.header_converters # => [:symbol, :downcase] - # - # --- - # - # The block, if given, is called for each header: - # - Argument +header+ is the header value. - # - Argument +field_info+ is a CSV::FieldInfo object - # containing details about the header. - # - # The examples here assume the prior execution of: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # - # Example giving a block: - # csv = CSV.open(path, headers: true) - # csv.header_convert {|header, field_info| p [header, field_info]; header.upcase } - # table = csv.read - # table # => # - # table.headers # => ["NAME", "VALUE"] - # - # Output: - # ["Name", #] - # ["Value", #] - - # The block need not return a \String object: - # csv = CSV.open(path, headers: true) - # csv.header_convert {|header, field_info| header.to_sym } - # table = csv.read - # table.headers # => [:Name, :Value] - # - # If +converter_name+ is given, the block is not called: - # csv = CSV.open(path, headers: true) - # csv.header_convert(:downcase) {|header, field_info| fail 'Cannot happen' } - # table = csv.read - # table.headers # => ["name", "value"] - # --- - # - # Raises a parse-time exception if +converter_name+ is not the name of a built-in - # field converter: - # csv = CSV.open(path, headers: true) - # csv.header_convert(:nosuch) - # # Raises NoMethodError (undefined method `arity' for nil:NilClass) - # csv.read - def header_convert(name = nil, &converter) - header_fields_converter.add_converter(name, &converter) - end - - include Enumerable - - # :call-seq: - # csv.each -> enumerator - # csv.each {|row| ...} - # - # Calls the block with each successive row. - # The data source must be opened for reading. - # - # Without headers: - # string = "foo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string) - # csv.each do |row| - # p row - # end - # Output: - # ["foo", "0"] - # ["bar", "1"] - # ["baz", "2"] - # - # With headers: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string, headers: true) - # csv.each do |row| - # p row - # end - # Output: - # - # - # - # - # --- - # - # Raises an exception if the source is not opened for reading: - # string = "foo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string) - # csv.close - # # Raises IOError (not opened for reading) - # csv.each do |row| - # p row - # end - def each(&block) - return to_enum(__method__) unless block_given? - begin - while true - yield(parser_enumerator.next) - end - rescue StopIteration - end - end - - # :call-seq: - # csv.read -> array or csv_table - # - # Forms the remaining rows from +self+ into: - # - A CSV::Table object, if headers are in use. - # - An \Array of Arrays, otherwise. - # - # The data source must be opened for reading. - # - # Without headers: - # string = "foo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # csv = CSV.open(path) - # csv.read # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - # - # With headers: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # path = 't.csv' - # File.write(path, string) - # csv = CSV.open(path, headers: true) - # csv.read # => # - # - # --- - # - # Raises an exception if the source is not opened for reading: - # string = "foo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string) - # csv.close - # # Raises IOError (not opened for reading) - # csv.read - def read - rows = to_a - if parser.use_headers? - Table.new(rows, headers: parser.headers) - else - rows - end - end - alias_method :readlines, :read - - # :call-seq: - # csv.header_row? -> true or false - # - # Returns +true+ if the next row to be read is a header row\; - # +false+ otherwise. - # - # Without headers: - # string = "foo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string) - # csv.header_row? # => false - # - # With headers: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string, headers: true) - # csv.header_row? # => true - # csv.shift # => # - # csv.header_row? # => false - # - # --- - # - # Raises an exception if the source is not opened for reading: - # string = "foo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string) - # csv.close - # # Raises IOError (not opened for reading) - # csv.header_row? - def header_row? - parser.header_row? - end - - # :call-seq: - # csv.shift -> array, csv_row, or nil - # - # Returns the next row of data as: - # - An \Array if no headers are used. - # - A CSV::Row object if headers are used. - # - # The data source must be opened for reading. - # - # Without headers: - # string = "foo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string) - # csv.shift # => ["foo", "0"] - # csv.shift # => ["bar", "1"] - # csv.shift # => ["baz", "2"] - # csv.shift # => nil - # - # With headers: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string, headers: true) - # csv.shift # => # - # csv.shift # => # - # csv.shift # => # - # csv.shift # => nil - # - # --- - # - # Raises an exception if the source is not opened for reading: - # string = "foo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string) - # csv.close - # # Raises IOError (not opened for reading) - # csv.shift - def shift - if @eof_error - eof_error, @eof_error = @eof_error, nil - raise eof_error - end - begin - parser_enumerator.next - rescue StopIteration - nil - end - end - alias_method :gets, :shift - alias_method :readline, :shift - - # :call-seq: - # csv.inspect -> string - # - # Returns a \String showing certain properties of +self+: - # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # csv = CSV.new(string, headers: true) - # s = csv.inspect - # s # => "#" - def inspect - str = ["#<", self.class.to_s, " io_type:"] - # show type of wrapped IO - if @io == $stdout then str << "$stdout" - elsif @io == $stdin then str << "$stdin" - elsif @io == $stderr then str << "$stderr" - else str << @io.class.to_s - end - # show IO.path(), if available - if @io.respond_to?(:path) and (p = @io.path) - str << " io_path:" << p.inspect - end - # show encoding - str << " encoding:" << @encoding.name - # show other attributes - ["lineno", "col_sep", "row_sep", "quote_char"].each do |attr_name| - if a = __send__(attr_name) - str << " " << attr_name << ":" << a.inspect - end - end - ["skip_blanks", "liberal_parsing"].each do |attr_name| - if a = __send__("#{attr_name}?") - str << " " << attr_name << ":" << a.inspect - end - end - _headers = headers - str << " headers:" << _headers.inspect if _headers - str << ">" - begin - str.join('') - rescue # any encoding error - str.map do |s| - e = Encoding::Converter.asciicompat_encoding(s.encoding) - e ? s.encode(e) : s.force_encoding("ASCII-8BIT") - end.join('') - end - end - - private - - def determine_encoding(encoding, internal_encoding) - # honor the IO encoding if we can, otherwise default to ASCII-8BIT - io_encoding = raw_encoding - return io_encoding if io_encoding - - return Encoding.find(internal_encoding) if internal_encoding - - if encoding - encoding, = encoding.split(":", 2) if encoding.is_a?(String) - return Encoding.find(encoding) - end - - Encoding.default_internal || Encoding.default_external - end - - def normalize_converters(converters) - converters ||= [] - unless converters.is_a?(Array) - converters = [converters] - end - converters.collect do |converter| - case converter - when Proc # custom code block - [nil, converter] - else # by name - [converter, nil] - end - end - end - - # - # Processes +fields+ with @converters, or @header_converters - # if +headers+ is passed as +true+, returning the converted field set. Any - # converter that changes the field into something other than a String halts - # the pipeline of conversion for that field. This is primarily an efficiency - # shortcut. - # - def convert_fields(fields, headers = false) - if headers - header_fields_converter.convert(fields, nil, 0) - else - parser_fields_converter.convert(fields, @headers, lineno) - end - end - - # - # Returns the encoding of the internal IO object. - # - def raw_encoding - if @io.respond_to? :internal_encoding - @io.internal_encoding || @io.external_encoding - elsif @io.respond_to? :encoding - @io.encoding - else - nil - end - end - - def parser_fields_converter - @parser_fields_converter ||= build_parser_fields_converter - end - - def build_parser_fields_converter - specific_options = { - builtin_converters_name: :Converters, - } - options = @base_fields_converter_options.merge(specific_options) - build_fields_converter(@initial_converters, options) - end - - def header_fields_converter - @header_fields_converter ||= build_header_fields_converter - end - - def build_header_fields_converter - specific_options = { - builtin_converters_name: :HeaderConverters, - accept_nil: true, - } - options = @base_fields_converter_options.merge(specific_options) - build_fields_converter(@initial_header_converters, options) - end - - def writer_fields_converter - @writer_fields_converter ||= build_writer_fields_converter - end - - def build_writer_fields_converter - build_fields_converter(@initial_write_converters, - @write_fields_converter_options) - end - - def build_fields_converter(initial_converters, options) - fields_converter = FieldsConverter.new(options) - normalize_converters(initial_converters).each do |name, converter| - fields_converter.add_converter(name, &converter) - end - fields_converter - end - - def parser - @parser ||= Parser.new(@io, parser_options) - end - - def parser_options - @parser_options.merge(header_fields_converter: header_fields_converter, - fields_converter: parser_fields_converter) - end - - def parser_enumerator - @parser_enumerator ||= parser.parse - end - - def writer - @writer ||= Writer.new(@io, writer_options) - end - - def writer_options - @writer_options.merge(header_fields_converter: header_fields_converter, - fields_converter: writer_fields_converter) - end -end - -# Passes +args+ to CSV::instance. -# -# CSV("CSV,data").read -# #=> [["CSV", "data"]] -# -# If a block is given, the instance is passed the block and the return value -# becomes the return value of the block. -# -# CSV("CSV,data") { |c| -# c.read.any? { |a| a.include?("data") } -# } #=> true -# -# CSV("CSV,data") { |c| -# c.read.any? { |a| a.include?("zombies") } -# } #=> false -# -# CSV options may also be given. -# -# io = StringIO.new -# CSV(io, col_sep: ";") { |csv| csv << ["a", "b", "c"] } -# -# This API is not Ractor-safe. -# -def CSV(*args, **options, &block) - CSV.instance(*args, **options, &block) -end - -require_relative "csv/version" -require_relative "csv/core_ext/array" -require_relative "csv/core_ext/string" diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/array.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/array.rb deleted file mode 100644 index ad1b881b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/array.rb +++ /dev/null @@ -1,9 +0,0 @@ -class Array - # Equivalent to CSV::generate_line(self, options) - # - # ["CSV", "data"].to_csv - # #=> "CSV,data\n" - def to_csv(**options) - CSV.generate_line(self, **options) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/string.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/string.rb deleted file mode 100644 index 61286d0f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/core_ext/string.rb +++ /dev/null @@ -1,9 +0,0 @@ -class String - # Equivalent to CSV::parse_line(self, options) - # - # "CSV,data".parse_csv - # #=> ["CSV", "data"] - def parse_csv(**options) - CSV.parse_line(self, **options) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/fields_converter.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/fields_converter.rb deleted file mode 100644 index 8ea13408..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/fields_converter.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -class CSV - # Note: Don't use this class directly. This is an internal class. - class FieldsConverter - include Enumerable - - NO_QUOTED_FIELDS = [] # :nodoc: - def NO_QUOTED_FIELDS.[](_index) - false - end - NO_QUOTED_FIELDS.freeze - - # - # A CSV::FieldsConverter is a data structure for storing the - # fields converter properties to be passed as a parameter - # when parsing a new file (e.g. CSV::Parser.new(@io, parser_options)) - # - - def initialize(options={}) - @converters = [] - @nil_value = options[:nil_value] - @empty_value = options[:empty_value] - @empty_value_is_empty_string = (@empty_value == "") - @accept_nil = options[:accept_nil] - @builtin_converters_name = options[:builtin_converters_name] - @need_static_convert = need_static_convert? - end - - def add_converter(name=nil, &converter) - if name.nil? # custom converter - @converters << converter - else # named converter - combo = builtin_converters[name] - case combo - when Array # combo converter - combo.each do |sub_name| - add_converter(sub_name) - end - else # individual named converter - @converters << combo - end - end - end - - def each(&block) - @converters.each(&block) - end - - def empty? - @converters.empty? - end - - def convert(fields, headers, lineno, quoted_fields=NO_QUOTED_FIELDS) - return fields unless need_convert? - - fields.collect.with_index do |field, index| - if field.nil? - field = @nil_value - elsif field.is_a?(String) and field.empty? - field = @empty_value unless @empty_value_is_empty_string - end - @converters.each do |converter| - break if field.nil? and @accept_nil - if converter.arity == 1 # straight field converter - field = converter[field] - else # FieldInfo converter - if headers - header = headers[index] - else - header = nil - end - quoted = quoted_fields[index] - field = converter[field, FieldInfo.new(index, lineno, header, quoted)] - end - break unless field.is_a?(String) # short-circuit pipeline for speed - end - field # final state of each field, converted or original - end - end - - private - def need_static_convert? - not (@nil_value.nil? and @empty_value_is_empty_string) - end - - def need_convert? - @need_static_convert or - (not @converters.empty?) - end - - def builtin_converters - @builtin_converters ||= ::CSV.const_get(@builtin_converters_name) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/input_record_separator.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/input_record_separator.rb deleted file mode 100644 index 7a99343c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/input_record_separator.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "English" -require "stringio" - -class CSV - module InputRecordSeparator - class << self - if RUBY_VERSION >= "3.0.0" - def value - "\n" - end - else - def value - $INPUT_RECORD_SEPARATOR - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/parser.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/parser.rb deleted file mode 100644 index 4a74e40d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/parser.rb +++ /dev/null @@ -1,1302 +0,0 @@ -# frozen_string_literal: true - -require "strscan" - -require_relative "input_record_separator" -require_relative "row" -require_relative "table" - -class CSV - # Note: Don't use this class directly. This is an internal class. - class Parser - # - # A CSV::Parser is m17n aware. The parser works in the Encoding of the IO - # or String object being read from or written to. Your data is never transcoded - # (unless you ask Ruby to transcode it for you) and will literally be parsed in - # the Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the - # Encoding of your data. This is accomplished by transcoding the parser itself - # into your Encoding. - # - - class << self - ARGF_OBJECT_ID = ARGF.object_id - # Convenient method to check whether the give input reached EOF - # or not. - def eof?(input) - # We can't use input != ARGF in Ractor. Because ARGF isn't a - # shareable object. - input.object_id != ARGF_OBJECT_ID and - input.respond_to?(:eof) and - input.eof? - end - end - - # Raised when encoding is invalid. - class InvalidEncoding < StandardError - end - - # Raised when unexpected case is happen. - class UnexpectedError < StandardError - end - - # - # CSV::Scanner receives a CSV output, scans it and return the content. - # It also controls the life cycle of the object with its methods +keep_start+, - # +keep_end+, +keep_back+, +keep_drop+. - # - # Uses StringScanner (the official strscan gem). Strscan provides lexical - # scanning operations on a String. We inherit its object and take advantage - # on the methods. For more information, please visit: - # https://docs.ruby-lang.org/en/master/StringScanner.html - # - class Scanner < StringScanner - alias_method :scan_all, :scan - - def initialize(*args) - super - @keeps = [] - end - - def each_line(row_separator) - position = pos - rest.each_line(row_separator) do |line| - position += line.bytesize - self.pos = position - yield(line) - end - end - - def keep_start - @keeps.push(pos) - end - - def keep_end - start = @keeps.pop - string.byteslice(start, pos - start) - end - - def keep_back - self.pos = @keeps.pop - end - - def keep_drop - @keeps.pop - end - end - - # - # CSV::InputsScanner receives IO inputs, encoding and the chunk_size. - # It also controls the life cycle of the object with its methods +keep_start+, - # +keep_end+, +keep_back+, +keep_drop+. - # - # CSV::InputsScanner.scan() tries to match with pattern at the current position. - # If there's a match, the scanner advances the "scan pointer" and returns the matched string. - # Otherwise, the scanner returns nil. - # - # CSV::InputsScanner.rest() returns the "rest" of the string (i.e. everything after the scan pointer). - # If there is no more data (eos? = true), it returns "". - # - class InputsScanner - def initialize(inputs, encoding, row_separator, chunk_size: 8192) - @inputs = inputs.dup - @encoding = encoding - @row_separator = row_separator - @chunk_size = chunk_size - @last_scanner = @inputs.empty? - @keeps = [] - read_chunk - end - - def each_line(row_separator) - return enum_for(__method__, row_separator) unless block_given? - buffer = nil - input = @scanner.rest - position = @scanner.pos - offset = 0 - n_row_separator_chars = row_separator.size - # trace(__method__, :start, input) - while true - input.each_line(row_separator) do |line| - @scanner.pos += line.bytesize - if buffer - if n_row_separator_chars == 2 and - buffer.end_with?(row_separator[0]) and - line.start_with?(row_separator[1]) - buffer << line[0] - line = line[1..-1] - position += buffer.bytesize + offset - @scanner.pos = position - offset = 0 - yield(buffer) - buffer = nil - next if line.empty? - else - buffer << line - line = buffer - buffer = nil - end - end - if line.end_with?(row_separator) - position += line.bytesize + offset - @scanner.pos = position - offset = 0 - yield(line) - else - buffer = line - end - end - break unless read_chunk - input = @scanner.rest - position = @scanner.pos - offset = -buffer.bytesize if buffer - end - yield(buffer) if buffer - end - - def scan(pattern) - # trace(__method__, pattern, :start) - value = @scanner.scan(pattern) - # trace(__method__, pattern, :done, :last, value) if @last_scanner - return value if @last_scanner - - read_chunk if value and @scanner.eos? - # trace(__method__, pattern, :done, value) - value - end - - def scan_all(pattern) - # trace(__method__, pattern, :start) - value = @scanner.scan(pattern) - # trace(__method__, pattern, :done, :last, value) if @last_scanner - return value if @last_scanner - - # trace(__method__, pattern, :done, :nil) if value.nil? - return nil if value.nil? - while @scanner.eos? and read_chunk and (sub_value = @scanner.scan(pattern)) - # trace(__method__, pattern, :sub, sub_value) - value << sub_value - end - # trace(__method__, pattern, :done, value) - value - end - - def eos? - @scanner.eos? - end - - def keep_start - # trace(__method__, :start) - adjust_last_keep - @keeps.push([@scanner, @scanner.pos, nil]) - # trace(__method__, :done) - end - - def keep_end - # trace(__method__, :start) - scanner, start, buffer = @keeps.pop - if scanner == @scanner - keep = @scanner.string.byteslice(start, @scanner.pos - start) - else - keep = @scanner.string.byteslice(0, @scanner.pos) - end - if buffer - buffer << keep - keep = buffer - end - # trace(__method__, :done, keep) - keep - end - - def keep_back - # trace(__method__, :start) - scanner, start, buffer = @keeps.pop - if buffer - # trace(__method__, :rescan, start, buffer) - string = @scanner.string - if scanner == @scanner - keep = string.byteslice(start, - string.bytesize - @scanner.pos - start) - else - keep = string - end - if keep and not keep.empty? - @inputs.unshift(StringIO.new(keep)) - @last_scanner = false - end - @scanner = StringScanner.new(buffer) - else - if @scanner != scanner - message = "scanners are different but no buffer: " - message += "#{@scanner.inspect}(#{@scanner.object_id}): " - message += "#{scanner.inspect}(#{scanner.object_id})" - raise UnexpectedError, message - end - # trace(__method__, :repos, start, buffer) - @scanner.pos = start - last_scanner, last_start, last_buffer = @keeps.last - # Drop the last buffer when the last buffer is the same data - # in the last keep. If we keep it, we have duplicated data - # by the next keep_back. - if last_scanner == @scanner and - last_buffer and - last_buffer == last_scanner.string.byteslice(last_start, start) - @keeps.last[2] = nil - end - end - read_chunk if @scanner.eos? - end - - def keep_drop - _, _, buffer = @keeps.pop - # trace(__method__, :done, :empty) unless buffer - return unless buffer - - last_keep = @keeps.last - # trace(__method__, :done, :no_last_keep) unless last_keep - return unless last_keep - - if last_keep[2] - last_keep[2] << buffer - else - last_keep[2] = buffer - end - # trace(__method__, :done) - end - - def rest - @scanner.rest - end - - def check(pattern) - @scanner.check(pattern) - end - - private - def trace(*args) - pp([*args, @scanner, @scanner&.string, @scanner&.pos, @keeps]) - end - - def adjust_last_keep - # trace(__method__, :start) - - keep = @keeps.last - # trace(__method__, :done, :empty) if keep.nil? - return if keep.nil? - - scanner, start, buffer = keep - string = @scanner.string - if @scanner != scanner - start = 0 - end - if start == 0 and @scanner.eos? - keep_data = string - else - keep_data = string.byteslice(start, @scanner.pos - start) - end - if keep_data - if buffer - buffer << keep_data - else - keep[2] = keep_data.dup - end - end - - # trace(__method__, :done) - end - - def read_chunk - return false if @last_scanner - - adjust_last_keep - - input = @inputs.first - case input - when StringIO - string = input.read - raise InvalidEncoding unless string.valid_encoding? - # trace(__method__, :stringio, string) - @scanner = StringScanner.new(string) - @inputs.shift - @last_scanner = @inputs.empty? - true - else - chunk = input.gets(@row_separator, @chunk_size) - if chunk - raise InvalidEncoding unless chunk.valid_encoding? - # trace(__method__, :chunk, chunk) - @scanner = StringScanner.new(chunk) - if Parser.eof?(input) - @inputs.shift - @last_scanner = @inputs.empty? - end - true - else - # trace(__method__, :no_chunk) - @scanner = StringScanner.new("".encode(@encoding)) - @inputs.shift - @last_scanner = @inputs.empty? - if @last_scanner - false - else - read_chunk - end - end - end - end - end - - def initialize(input, options) - @input = input - @options = options - @samples = [] - - prepare - end - - def column_separator - @column_separator - end - - def row_separator - @row_separator - end - - def quote_character - @quote_character - end - - def field_size_limit - @max_field_size&.succ - end - - def max_field_size - @max_field_size - end - - def skip_lines - @skip_lines - end - - def unconverted_fields? - @unconverted_fields - end - - def headers - @headers - end - - def header_row? - @use_headers and @headers.nil? - end - - def return_headers? - @return_headers - end - - def skip_blanks? - @skip_blanks - end - - def liberal_parsing? - @liberal_parsing - end - - def lineno - @lineno - end - - def line - last_line - end - - def parse(&block) - return to_enum(__method__) unless block_given? - - if @return_headers and @headers and @raw_headers - headers = Row.new(@headers, @raw_headers, true) - if @unconverted_fields - headers = add_unconverted_fields(headers, []) - end - yield headers - end - - begin - @scanner ||= build_scanner - __send__(@parse_method, &block) - rescue InvalidEncoding - if @scanner - ignore_broken_line - lineno = @lineno - else - lineno = @lineno + 1 - end - raise InvalidEncodingError.new(@encoding, lineno) - rescue UnexpectedError => error - if @scanner - ignore_broken_line - lineno = @lineno - else - lineno = @lineno + 1 - end - message = "This should not be happen: #{error.message}: " - message += "Please report this to https://github.com/ruby/csv/issues" - raise MalformedCSVError.new(message, lineno) - end - end - - def use_headers? - @use_headers - end - - private - # A set of tasks to prepare the file in order to parse it - def prepare - prepare_variable - prepare_quote_character - prepare_backslash - prepare_skip_lines - prepare_strip - prepare_separators - validate_strip_and_col_sep_options - prepare_quoted - prepare_unquoted - prepare_line - prepare_header - prepare_parser - end - - def prepare_variable - @encoding = @options[:encoding] - liberal_parsing = @options[:liberal_parsing] - if liberal_parsing - @liberal_parsing = true - if liberal_parsing.is_a?(Hash) - @double_quote_outside_quote = - liberal_parsing[:double_quote_outside_quote] - @backslash_quote = liberal_parsing[:backslash_quote] - else - @double_quote_outside_quote = false - @backslash_quote = false - end - else - @liberal_parsing = false - @backslash_quote = false - end - @unconverted_fields = @options[:unconverted_fields] - @max_field_size = @options[:max_field_size] - @skip_blanks = @options[:skip_blanks] - @fields_converter = @options[:fields_converter] - @header_fields_converter = @options[:header_fields_converter] - end - - def prepare_quote_character - @quote_character = @options[:quote_character] - if @quote_character.nil? - @escaped_quote_character = nil - @escaped_quote = nil - else - @quote_character = @quote_character.to_s.encode(@encoding) - if @quote_character.length != 1 - message = ":quote_char has to be nil or a single character String" - raise ArgumentError, message - end - @escaped_quote_character = Regexp.escape(@quote_character) - @escaped_quote = Regexp.new(@escaped_quote_character) - end - end - - def prepare_backslash - return unless @backslash_quote - - @backslash_character = "\\".encode(@encoding) - - @escaped_backslash_character = Regexp.escape(@backslash_character) - @escaped_backslash = Regexp.new(@escaped_backslash_character) - if @quote_character.nil? - @backslash_quote_character = nil - else - @backslash_quote_character = - @backslash_character + @escaped_quote_character - end - end - - def prepare_skip_lines - skip_lines = @options[:skip_lines] - case skip_lines - when String - @skip_lines = skip_lines.encode(@encoding) - when Regexp, nil - @skip_lines = skip_lines - else - unless skip_lines.respond_to?(:match) - message = - ":skip_lines has to respond to \#match: #{skip_lines.inspect}" - raise ArgumentError, message - end - @skip_lines = skip_lines - end - end - - def prepare_strip - @strip = @options[:strip] - @escaped_strip = nil - @strip_value = nil - @rstrip_value = nil - if @strip.is_a?(String) - case @strip.length - when 0 - raise ArgumentError, ":strip must not be an empty String" - when 1 - # ok - else - raise ArgumentError, ":strip doesn't support 2 or more characters yet" - end - @strip = @strip.encode(@encoding) - @escaped_strip = Regexp.escape(@strip) - if @quote_character - @strip_value = Regexp.new(@escaped_strip + - "+".encode(@encoding)) - @rstrip_value = Regexp.new(@escaped_strip + - "+\\z".encode(@encoding)) - end - elsif @strip - strip_values = " \t\f\v" - @escaped_strip = strip_values.encode(@encoding) - if @quote_character - @strip_value = Regexp.new("[#{strip_values}]+".encode(@encoding)) - @rstrip_value = Regexp.new("[#{strip_values}]+\\z".encode(@encoding)) - end - end - end - - begin - StringScanner.new("x").scan("x") - rescue TypeError - STRING_SCANNER_SCAN_ACCEPT_STRING = false - else - STRING_SCANNER_SCAN_ACCEPT_STRING = true - end - - def prepare_separators - column_separator = @options[:column_separator] - @column_separator = column_separator.to_s.encode(@encoding) - if @column_separator.size < 1 - message = ":col_sep must be 1 or more characters: " - message += column_separator.inspect - raise ArgumentError, message - end - @row_separator = - resolve_row_separator(@options[:row_separator]).encode(@encoding) - - @escaped_column_separator = Regexp.escape(@column_separator) - @escaped_first_column_separator = Regexp.escape(@column_separator[0]) - if @column_separator.size > 1 - @column_end = Regexp.new(@escaped_column_separator) - @column_ends = @column_separator.each_char.collect do |char| - Regexp.new(Regexp.escape(char)) - end - @first_column_separators = Regexp.new(@escaped_first_column_separator + - "+".encode(@encoding)) - else - if STRING_SCANNER_SCAN_ACCEPT_STRING - @column_end = @column_separator - else - @column_end = Regexp.new(@escaped_column_separator) - end - @column_ends = nil - @first_column_separators = nil - end - - escaped_row_separator = Regexp.escape(@row_separator) - @row_end = Regexp.new(escaped_row_separator) - if @row_separator.size > 1 - @row_ends = @row_separator.each_char.collect do |char| - Regexp.new(Regexp.escape(char)) - end - else - @row_ends = nil - end - - @cr = "\r".encode(@encoding) - @lf = "\n".encode(@encoding) - @line_end = Regexp.new("\r\n|\n|\r".encode(@encoding)) - @not_line_end = Regexp.new("[^\r\n]+".encode(@encoding)) - end - - # This method verifies that there are no (obvious) ambiguities with the - # provided +col_sep+ and +strip+ parsing options. For example, if +col_sep+ - # and +strip+ were both equal to +\t+, then there would be no clear way to - # parse the input. - def validate_strip_and_col_sep_options - return unless @strip - - if @strip.is_a?(String) - if @column_separator.start_with?(@strip) || @column_separator.end_with?(@strip) - raise ArgumentError, - "The provided strip (#{@escaped_strip}) and " \ - "col_sep (#{@escaped_column_separator}) options are incompatible." - end - else - if Regexp.new("\\A[#{@escaped_strip}]|[#{@escaped_strip}]\\z").match?(@column_separator) - raise ArgumentError, - "The provided strip (true) and " \ - "col_sep (#{@escaped_column_separator}) options are incompatible." - end - end - end - - def prepare_quoted - if @quote_character - @quotes = Regexp.new(@escaped_quote_character + - "+".encode(@encoding)) - no_quoted_values = @escaped_quote_character.dup - if @backslash_quote - no_quoted_values << @escaped_backslash_character - end - @quoted_value = Regexp.new("[^".encode(@encoding) + - no_quoted_values + - "]+".encode(@encoding)) - end - if @escaped_strip - @split_column_separator = Regexp.new(@escaped_strip + - "*".encode(@encoding) + - @escaped_column_separator + - @escaped_strip + - "*".encode(@encoding)) - else - if @column_separator == " ".encode(@encoding) - @split_column_separator = Regexp.new(@escaped_column_separator) - else - @split_column_separator = @column_separator - end - end - end - - def prepare_unquoted - return if @quote_character.nil? - - no_unquoted_values = "\r\n".encode(@encoding) - no_unquoted_values << @escaped_first_column_separator - unless @liberal_parsing - no_unquoted_values << @escaped_quote_character - end - @unquoted_value = Regexp.new("[^".encode(@encoding) + - no_unquoted_values + - "]+".encode(@encoding)) - end - - def resolve_row_separator(separator) - if separator == :auto - cr = "\r".encode(@encoding) - lf = "\n".encode(@encoding) - if @input.is_a?(StringIO) - pos = @input.pos - separator = detect_row_separator(@input.read, cr, lf) - @input.seek(pos) - elsif @input.respond_to?(:gets) - if @input.is_a?(File) - chunk_size = 32 * 1024 - else - chunk_size = 1024 - end - begin - while separator == :auto - # - # if we run out of data, it's probably a single line - # (ensure will set default value) - # - break unless sample = @input.gets(nil, chunk_size) - - # extend sample if we're unsure of the line ending - if sample.end_with?(cr) - sample << (@input.gets(nil, 1) || "") - end - - @samples << sample - - separator = detect_row_separator(sample, cr, lf) - end - rescue IOError - # do nothing: ensure will set default - end - end - separator = InputRecordSeparator.value if separator == :auto - end - separator.to_s.encode(@encoding) - end - - def detect_row_separator(sample, cr, lf) - lf_index = sample.index(lf) - if lf_index - cr_index = sample[0, lf_index].index(cr) - else - cr_index = sample.index(cr) - end - if cr_index and lf_index - if cr_index + 1 == lf_index - cr + lf - elsif cr_index < lf_index - cr - else - lf - end - elsif cr_index - cr - elsif lf_index - lf - else - :auto - end - end - - def prepare_line - @lineno = 0 - @last_line = nil - @scanner = nil - end - - def last_line - if @scanner - @last_line ||= @scanner.keep_end - else - @last_line - end - end - - def prepare_header - @return_headers = @options[:return_headers] - - headers = @options[:headers] - case headers - when Array - @raw_headers = headers - quoted_fields = FieldsConverter::NO_QUOTED_FIELDS - @use_headers = true - when String - @raw_headers, quoted_fields = parse_headers(headers) - @use_headers = true - when nil, false - @raw_headers = nil - @use_headers = false - else - @raw_headers = nil - @use_headers = true - end - if @raw_headers - @headers = adjust_headers(@raw_headers, quoted_fields) - else - @headers = nil - end - end - - def parse_headers(row) - quoted_fields = [] - converter = lambda do |field, info| - quoted_fields << info.quoted? - field - end - headers = CSV.parse_line(row, - col_sep: @column_separator, - row_sep: @row_separator, - quote_char: @quote_character, - converters: [converter]) - [headers, quoted_fields] - end - - def adjust_headers(headers, quoted_fields) - adjusted_headers = @header_fields_converter.convert(headers, nil, @lineno, quoted_fields) - adjusted_headers.each {|h| h.freeze if h.is_a? String} - adjusted_headers - end - - def prepare_parser - @may_quoted = may_quoted? - if @quote_character.nil? - @parse_method = :parse_no_quote - elsif @liberal_parsing or @strip - @parse_method = :parse_quotable_robust - else - @parse_method = :parse_quotable_loose - end - end - - def may_quoted? - return false if @quote_character.nil? - - if @input.is_a?(StringIO) - pos = @input.pos - sample = @input.read - @input.seek(pos) - else - return false if @samples.empty? - sample = @samples.first - end - sample[0, 128].index(@quote_character) - end - - class UnoptimizedStringIO # :nodoc: - def initialize(string) - @io = StringIO.new(string, "rb:#{string.encoding}") - end - - def gets(*args) - @io.gets(*args) - end - - def each_line(*args, &block) - @io.each_line(*args, &block) - end - - def eof? - @io.eof? - end - end - - SCANNER_TEST = (ENV["CSV_PARSER_SCANNER_TEST"] == "yes") - if SCANNER_TEST - SCANNER_TEST_CHUNK_SIZE_NAME = "CSV_PARSER_SCANNER_TEST_CHUNK_SIZE" - SCANNER_TEST_CHUNK_SIZE_VALUE = ENV[SCANNER_TEST_CHUNK_SIZE_NAME] - def build_scanner - inputs = @samples.collect do |sample| - UnoptimizedStringIO.new(sample) - end - if @input.is_a?(StringIO) - inputs << UnoptimizedStringIO.new(@input.read) - else - inputs << @input - end - begin - chunk_size_value = ENV[SCANNER_TEST_CHUNK_SIZE_NAME] - rescue # Ractor::IsolationError - # Ractor on Ruby 3.0 can't read ENV value. - chunk_size_value = SCANNER_TEST_CHUNK_SIZE_VALUE - end - chunk_size = Integer((chunk_size_value || "1"), 10) - InputsScanner.new(inputs, - @encoding, - @row_separator, - chunk_size: chunk_size) - end - else - def build_scanner - string = nil - if @samples.empty? and @input.is_a?(StringIO) - string = @input.read - elsif @samples.size == 1 and Parser.eof?(@input) - string = @samples[0] - end - if string - unless string.valid_encoding? - index = string.lines(@row_separator).index do |line| - !line.valid_encoding? - end - if index - raise InvalidEncodingError.new(@encoding, @lineno + index + 1) - end - end - Scanner.new(string) - else - inputs = @samples.collect do |sample| - StringIO.new(sample) - end - inputs << @input - InputsScanner.new(inputs, @encoding, @row_separator) - end - end - end - - def skip_needless_lines - return unless @skip_lines - - until @scanner.eos? - @scanner.keep_start - line = @scanner.scan_all(@not_line_end) || "".encode(@encoding) - line << @row_separator if parse_row_end - if skip_line?(line) - @lineno += 1 - @scanner.keep_drop - else - @scanner.keep_back - return - end - end - end - - def skip_line?(line) - line = line.delete_suffix(@row_separator) - case @skip_lines - when String - line.include?(@skip_lines) - when Regexp - @skip_lines.match?(line) - else - @skip_lines.match(line) - end - end - - def validate_field_size(field) - return unless @max_field_size - return if field.size <= @max_field_size - ignore_broken_line - message = "Field size exceeded: #{field.size} > #{@max_field_size}" - raise MalformedCSVError.new(message, @lineno) - end - - def parse_no_quote(&block) - @scanner.each_line(@row_separator) do |line| - next if @skip_lines and skip_line?(line) - original_line = line - line = line.delete_suffix(@row_separator) - - if line.empty? - next if @skip_blanks - row = [] - else - line = strip_value(line) - row = line.split(@split_column_separator, -1) - if @max_field_size - row.each do |column| - validate_field_size(column) - end - end - n_columns = row.size - i = 0 - while i < n_columns - row[i] = nil if row[i].empty? - i += 1 - end - end - @last_line = original_line - emit_row(row, &block) - end - end - - def parse_quotable_loose(&block) - @scanner.keep_start - @scanner.each_line(@row_separator) do |line| - if @skip_lines and skip_line?(line) - @scanner.keep_drop - @scanner.keep_start - next - end - original_line = line - line = line.delete_suffix(@row_separator) - - if line.empty? - if @skip_blanks - @scanner.keep_drop - @scanner.keep_start - next - end - row = [] - quoted_fields = FieldsConverter::NO_QUOTED_FIELDS - elsif line.include?(@cr) or line.include?(@lf) - @scanner.keep_back - @parse_method = :parse_quotable_robust - return parse_quotable_robust(&block) - else - row = line.split(@split_column_separator, -1) - quoted_fields = [] - n_columns = row.size - i = 0 - while i < n_columns - column = row[i] - if column.empty? - quoted_fields << false - row[i] = nil - else - n_quotes = column.count(@quote_character) - if n_quotes.zero? - quoted_fields << false - # no quote - elsif n_quotes == 2 and - column.start_with?(@quote_character) and - column.end_with?(@quote_character) - quoted_fields << true - row[i] = column[1..-2] - else - @scanner.keep_back - @parse_method = :parse_quotable_robust - return parse_quotable_robust(&block) - end - validate_field_size(row[i]) - end - i += 1 - end - end - @scanner.keep_drop - @scanner.keep_start - @last_line = original_line - emit_row(row, quoted_fields, &block) - end - @scanner.keep_drop - end - - def parse_quotable_robust(&block) - row = [] - quoted_fields = [] - skip_needless_lines - start_row - while true - @quoted_column_value = false - @unquoted_column_value = false - @scanner.scan_all(@strip_value) if @strip_value - value = parse_column_value - if value - @scanner.scan_all(@strip_value) if @strip_value - validate_field_size(value) - end - if parse_column_end - row << value - quoted_fields << @quoted_column_value - elsif parse_row_end - if row.empty? and value.nil? - emit_row([], &block) unless @skip_blanks - else - row << value - quoted_fields << @quoted_column_value - emit_row(row, quoted_fields, &block) - row = [] - quoted_fields.clear - end - skip_needless_lines - start_row - elsif @scanner.eos? - break if row.empty? and value.nil? - row << value - quoted_fields << @quoted_column_value - emit_row(row, quoted_fields, &block) - break - else - if @quoted_column_value - if liberal_parsing? and (new_line = @scanner.check(@line_end)) - message = - "Illegal end-of-line sequence outside of a quoted field " + - "<#{new_line.inspect}>" - else - message = "Any value after quoted field isn't allowed" - end - ignore_broken_line - raise MalformedCSVError.new(message, @lineno) - elsif @unquoted_column_value and - (new_line = @scanner.scan(@line_end)) - ignore_broken_line - message = "Unquoted fields do not allow new line " + - "<#{new_line.inspect}>" - raise MalformedCSVError.new(message, @lineno) - elsif @scanner.rest.start_with?(@quote_character) - ignore_broken_line - message = "Illegal quoting" - raise MalformedCSVError.new(message, @lineno) - elsif (new_line = @scanner.scan(@line_end)) - ignore_broken_line - message = "New line must be <#{@row_separator.inspect}> " + - "not <#{new_line.inspect}>" - raise MalformedCSVError.new(message, @lineno) - else - ignore_broken_line - raise MalformedCSVError.new("TODO: Meaningful message", - @lineno) - end - end - end - end - - def parse_column_value - if @liberal_parsing - quoted_value = parse_quoted_column_value - if quoted_value - @scanner.scan_all(@strip_value) if @strip_value - unquoted_value = parse_unquoted_column_value - if unquoted_value - if @double_quote_outside_quote - unquoted_value = unquoted_value.gsub(@quote_character * 2, - @quote_character) - if quoted_value.empty? # %Q{""...} case - return @quote_character + unquoted_value - end - end - @quote_character + quoted_value + @quote_character + unquoted_value - else - quoted_value - end - else - parse_unquoted_column_value - end - elsif @may_quoted - parse_quoted_column_value || - parse_unquoted_column_value - else - parse_unquoted_column_value || - parse_quoted_column_value - end - end - - def parse_unquoted_column_value - value = @scanner.scan_all(@unquoted_value) - return nil unless value - - @unquoted_column_value = true - if @first_column_separators - while true - @scanner.keep_start - is_column_end = @column_ends.all? do |column_end| - @scanner.scan(column_end) - end - @scanner.keep_back - break if is_column_end - sub_separator = @scanner.scan_all(@first_column_separators) - break if sub_separator.nil? - value << sub_separator - sub_value = @scanner.scan_all(@unquoted_value) - break if sub_value.nil? - value << sub_value - end - end - value.gsub!(@backslash_quote_character, @quote_character) if @backslash_quote - if @rstrip_value - value.gsub!(@rstrip_value, "") - end - value - end - - def parse_quoted_column_value - quotes = @scanner.scan_all(@quotes) - return nil unless quotes - - @quoted_column_value = true - n_quotes = quotes.size - if (n_quotes % 2).zero? - quotes[0, (n_quotes - 2) / 2] - else - value = quotes[0, n_quotes / 2] - while true - quoted_value = @scanner.scan_all(@quoted_value) - value << quoted_value if quoted_value - if @backslash_quote - if @scanner.scan(@escaped_backslash) - if @scanner.scan(@escaped_quote) - value << @quote_character - else - value << @backslash_character - end - next - end - end - - quotes = @scanner.scan_all(@quotes) - unless quotes - ignore_broken_line - message = "Unclosed quoted field" - raise MalformedCSVError.new(message, @lineno) - end - n_quotes = quotes.size - if n_quotes == 1 - break - else - value << quotes[0, n_quotes / 2] - break if (n_quotes % 2) == 1 - end - end - value - end - end - - def parse_column_end - return true if @scanner.scan(@column_end) - return false unless @column_ends - - @scanner.keep_start - if @column_ends.all? {|column_end| @scanner.scan(column_end)} - @scanner.keep_drop - true - else - @scanner.keep_back - false - end - end - - def parse_row_end - return true if @scanner.scan(@row_end) - return false unless @row_ends - @scanner.keep_start - if @row_ends.all? {|row_end| @scanner.scan(row_end)} - @scanner.keep_drop - true - else - @scanner.keep_back - false - end - end - - def strip_value(value) - return value unless @strip - return value if value.nil? - - case @strip - when String - while value.delete_prefix!(@strip) - # do nothing - end - while value.delete_suffix!(@strip) - # do nothing - end - else - value.strip! - end - value - end - - def ignore_broken_line - @scanner.scan_all(@not_line_end) - @scanner.scan_all(@line_end) - @lineno += 1 - end - - def start_row - if @last_line - @last_line = nil - else - @scanner.keep_drop - end - @scanner.keep_start - end - - def emit_row(row, quoted_fields=FieldsConverter::NO_QUOTED_FIELDS, &block) - @lineno += 1 - - raw_row = row - if @use_headers - if @headers.nil? - @headers = adjust_headers(row, quoted_fields) - return unless @return_headers - row = Row.new(@headers, row, true) - else - row = Row.new(@headers, - @fields_converter.convert(raw_row, @headers, @lineno, quoted_fields)) - end - else - # convert fields, if needed... - row = @fields_converter.convert(raw_row, nil, @lineno, quoted_fields) - end - - # inject unconverted fields and accessor, if requested... - if @unconverted_fields and not row.respond_to?(:unconverted_fields) - add_unconverted_fields(row, raw_row) - end - - yield(row) - end - - # This method injects an instance variable unconverted_fields into - # +row+ and an accessor method for +row+ called unconverted_fields(). The - # variable is set to the contents of +fields+. - def add_unconverted_fields(row, fields) - class << row - attr_reader :unconverted_fields - end - row.instance_variable_set(:@unconverted_fields, fields) - row - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/row.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/row.rb deleted file mode 100644 index 86323f7d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/row.rb +++ /dev/null @@ -1,757 +0,0 @@ -# frozen_string_literal: true - -require "forwardable" - -class CSV - # = \CSV::Row - # A \CSV::Row instance represents a \CSV table row. - # (see {class CSV}[../CSV.html]). - # - # The instance may have: - # - Fields: each is an object, not necessarily a \String. - # - Headers: each serves a key, and also need not be a \String. - # - # === Instance Methods - # - # \CSV::Row has three groups of instance methods: - # - Its own internally defined instance methods. - # - Methods included by module Enumerable. - # - Methods delegated to class Array.: - # * Array#empty? - # * Array#length - # * Array#size - # - # == Creating a \CSV::Row Instance - # - # Commonly, a new \CSV::Row instance is created by parsing \CSV source - # that has headers: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.each {|row| p row } - # Output: - # # - # # - # # - # - # You can also create a row directly. See ::new. - # - # == Headers - # - # Like a \CSV::Table, a \CSV::Row has headers. - # - # A \CSV::Row that was created by parsing \CSV source - # inherits its headers from the table: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table.first - # row.headers # => ["Name", "Value"] - # - # You can also create a new row with headers; - # like the keys in a \Hash, the headers need not be Strings: - # row = CSV::Row.new([:name, :value], ['foo', 0]) - # row.headers # => [:name, :value] - # - # The new row retains its headers even if added to a table - # that has headers: - # table << row # => # - # row.headers # => [:name, :value] - # row[:name] # => "foo" - # row['Name'] # => nil - # - # - # - # == Accessing Fields - # - # You may access a field in a \CSV::Row with either its \Integer index - # (\Array-style) or its header (\Hash-style). - # - # Fetch a field using method #[]: - # row = CSV::Row.new(['Name', 'Value'], ['foo', 0]) - # row[1] # => 0 - # row['Value'] # => 0 - # - # Set a field using method #[]=: - # row = CSV::Row.new(['Name', 'Value'], ['foo', 0]) - # row # => # - # row[0] = 'bar' - # row['Value'] = 1 - # row # => # - # - class Row - # :call-seq: - # CSV::Row.new(headers, fields, header_row = false) -> csv_row - # - # Returns the new \CSV::Row instance constructed from - # arguments +headers+ and +fields+; both should be Arrays; - # note that the fields need not be Strings: - # row = CSV::Row.new(['Name', 'Value'], ['foo', 0]) - # row # => # - # - # If the \Array lengths are different, the shorter is +nil+-filled: - # row = CSV::Row.new(['Name', 'Value', 'Date', 'Size'], ['foo', 0]) - # row # => # - # - # Each \CSV::Row object is either a field row or a header row; - # by default, a new row is a field row; for the row created above: - # row.field_row? # => true - # row.header_row? # => false - # - # If the optional argument +header_row+ is given as +true+, - # the created row is a header row: - # row = CSV::Row.new(['Name', 'Value'], ['foo', 0], header_row = true) - # row # => # - # row.field_row? # => false - # row.header_row? # => true - def initialize(headers, fields, header_row = false) - @header_row = header_row - headers.each { |h| h.freeze if h.is_a? String } - - # handle extra headers or fields - @row = if headers.size >= fields.size - headers.zip(fields) - else - fields.zip(headers).each(&:reverse!) - end - end - - # Internal data format used to compare equality. - attr_reader :row - protected :row - - ### Array Delegation ### - - extend Forwardable - def_delegators :@row, :empty?, :length, :size - - # :call-seq: - # row.initialize_copy(other_row) -> self - # - # Calls superclass method. - def initialize_copy(other) - super_return_value = super - @row = @row.collect(&:dup) - super_return_value - end - - # :call-seq: - # row.header_row? -> true or false - # - # Returns +true+ if this is a header row, +false+ otherwise. - def header_row? - @header_row - end - - # :call-seq: - # row.field_row? -> true or false - # - # Returns +true+ if this is a field row, +false+ otherwise. - def field_row? - not header_row? - end - - # :call-seq: - # row.headers -> array_of_headers - # - # Returns the headers for this row: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table.first - # row.headers # => ["Name", "Value"] - def headers - @row.map(&:first) - end - - # :call-seq: - # field(index) -> value - # field(header) -> value - # field(header, offset) -> value - # - # Returns the field value for the given +index+ or +header+. - # - # --- - # - # Fetch field value by \Integer index: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.field(0) # => "foo" - # row.field(1) # => "bar" - # - # Counts backward from the last column if +index+ is negative: - # row.field(-1) # => "0" - # row.field(-2) # => "foo" - # - # Returns +nil+ if +index+ is out of range: - # row.field(2) # => nil - # row.field(-3) # => nil - # - # --- - # - # Fetch field value by header (first found): - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.field('Name') # => "Foo" - # - # Fetch field value by header, ignoring +offset+ leading fields: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.field('Name', 2) # => "Baz" - # - # Returns +nil+ if the header does not exist. - def field(header_or_index, minimum_index = 0) - # locate the pair - finder = (header_or_index.is_a?(Integer) || header_or_index.is_a?(Range)) ? :[] : :assoc - pair = @row[minimum_index..-1].public_send(finder, header_or_index) - - # return the field if we have a pair - if pair.nil? - nil - else - header_or_index.is_a?(Range) ? pair.map(&:last) : pair.last - end - end - alias_method :[], :field - - # - # :call-seq: - # fetch(header) -> value - # fetch(header, default) -> value - # fetch(header) {|row| ... } -> value - # - # Returns the field value as specified by +header+. - # - # --- - # - # With the single argument +header+, returns the field value - # for that header (first found): - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.fetch('Name') # => "Foo" - # - # Raises exception +KeyError+ if the header does not exist. - # - # --- - # - # With arguments +header+ and +default+ given, - # returns the field value for the header (first found) - # if the header exists, otherwise returns +default+: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.fetch('Name', '') # => "Foo" - # row.fetch(:nosuch, '') # => "" - # - # --- - # - # With argument +header+ and a block given, - # returns the field value for the header (first found) - # if the header exists; otherwise calls the block - # and returns its return value: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.fetch('Name') {|header| fail 'Cannot happen' } # => "Foo" - # row.fetch(:nosuch) {|header| "Header '#{header} not found'" } # => "Header 'nosuch not found'" - def fetch(header, *varargs) - raise ArgumentError, "Too many arguments" if varargs.length > 1 - pair = @row.assoc(header) - if pair - pair.last - else - if block_given? - yield header - elsif varargs.empty? - raise KeyError, "key not found: #{header}" - else - varargs.first - end - end - end - - # :call-seq: - # row.has_key?(header) -> true or false - # - # Returns +true+ if there is a field with the given +header+, - # +false+ otherwise. - def has_key?(header) - !!@row.assoc(header) - end - alias_method :include?, :has_key? - alias_method :key?, :has_key? - alias_method :member?, :has_key? - alias_method :header?, :has_key? - - # - # :call-seq: - # row[index] = value -> value - # row[header, offset] = value -> value - # row[header] = value -> value - # - # Assigns the field value for the given +index+ or +header+; - # returns +value+. - # - # --- - # - # Assign field value by \Integer index: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row[0] = 'Bat' - # row[1] = 3 - # row # => # - # - # Counts backward from the last column if +index+ is negative: - # row[-1] = 4 - # row[-2] = 'Bam' - # row # => # - # - # Extends the row with nil:nil if positive +index+ is not in the row: - # row[4] = 5 - # row # => # - # - # Raises IndexError if negative +index+ is too small (too far from zero). - # - # --- - # - # Assign field value by header (first found): - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row['Name'] = 'Bat' - # row # => # - # - # Assign field value by header, ignoring +offset+ leading fields: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row['Name', 2] = 4 - # row # => # - # - # Append new field by (new) header: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row['New'] = 6 - # row# => # - def []=(*args) - value = args.pop - - if args.first.is_a? Integer - if @row[args.first].nil? # extending past the end with index - @row[args.first] = [nil, value] - @row.map! { |pair| pair.nil? ? [nil, nil] : pair } - else # normal index assignment - @row[args.first][1] = value - end - else - index = index(*args) - if index.nil? # appending a field - self << [args.first, value] - else # normal header assignment - @row[index][1] = value - end - end - end - - # - # :call-seq: - # row << [header, value] -> self - # row << hash -> self - # row << value -> self - # - # Adds a field to +self+; returns +self+: - # - # If the argument is a 2-element \Array [header, value], - # a field is added with the given +header+ and +value+: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row << ['NAME', 'Bat'] - # row # => # - # - # If the argument is a \Hash, each key-value pair is added - # as a field with header +key+ and value +value+. - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row << {NAME: 'Bat', name: 'Bam'} - # row # => # - # - # Otherwise, the given +value+ is added as a field with no header. - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row << 'Bag' - # row # => # - def <<(arg) - if arg.is_a?(Array) and arg.size == 2 # appending a header and name - @row << arg - elsif arg.is_a?(Hash) # append header and name pairs - arg.each { |pair| @row << pair } - else # append field value - @row << [nil, arg] - end - - self # for chaining - end - - # :call-seq: - # row.push(*values) -> self - # - # Appends each of the given +values+ to +self+ as a field; returns +self+: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.push('Bat', 'Bam') - # row # => # - def push(*args) - args.each { |arg| self << arg } - - self # for chaining - end - - # - # :call-seq: - # delete(index) -> [header, value] or nil - # delete(header) -> [header, value] or empty_array - # delete(header, offset) -> [header, value] or empty_array - # - # Removes a specified field from +self+; returns the 2-element \Array - # [header, value] if the field exists. - # - # If an \Integer argument +index+ is given, - # removes and returns the field at offset +index+, - # or returns +nil+ if the field does not exist: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.delete(1) # => ["Name", "Bar"] - # row.delete(50) # => nil - # - # Otherwise, if the single argument +header+ is given, - # removes and returns the first-found field with the given header, - # of returns a new empty \Array if the field does not exist: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.delete('Name') # => ["Name", "Foo"] - # row.delete('NAME') # => [] - # - # If argument +header+ and \Integer argument +offset+ are given, - # removes and returns the first-found field with the given header - # whose +index+ is at least as large as +offset+: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.delete('Name', 1) # => ["Name", "Bar"] - # row.delete('NAME', 1) # => [] - def delete(header_or_index, minimum_index = 0) - if header_or_index.is_a? Integer # by index - @row.delete_at(header_or_index) - elsif i = index(header_or_index, minimum_index) # by header - @row.delete_at(i) - else - [ ] - end - end - - # :call-seq: - # row.delete_if {|header, value| ... } -> self - # - # Removes fields from +self+ as selected by the block; returns +self+. - # - # Removes each field for which the block returns a truthy value: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.delete_if {|header, value| value.start_with?('B') } # => true - # row # => # - # row.delete_if {|header, value| header.start_with?('B') } # => false - # - # If no block is given, returns a new Enumerator: - # row.delete_if # => #:delete_if> - def delete_if(&block) - return enum_for(__method__) { size } unless block_given? - - @row.delete_if(&block) - - self # for chaining - end - - # :call-seq: - # self.fields(*specifiers) -> array_of_fields - # - # Returns field values per the given +specifiers+, which may be any mixture of: - # - \Integer index. - # - \Range of \Integer indexes. - # - 2-element \Array containing a header and offset. - # - Header. - # - \Range of headers. - # - # For +specifier+ in one of the first four cases above, - # returns the result of self.field(specifier); see #field. - # - # Although there may be any number of +specifiers+, - # the examples here will illustrate one at a time. - # - # When the specifier is an \Integer +index+, - # returns self.field(index)L - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.fields(1) # => ["Bar"] - # - # When the specifier is a \Range of \Integers +range+, - # returns self.field(range): - # row.fields(1..2) # => ["Bar", "Baz"] - # - # When the specifier is a 2-element \Array +array+, - # returns self.field(array)L - # row.fields('Name', 1) # => ["Foo", "Bar"] - # - # When the specifier is a header +header+, - # returns self.field(header)L - # row.fields('Name') # => ["Foo"] - # - # When the specifier is a \Range of headers +range+, - # forms a new \Range +new_range+ from the indexes of - # range.start and range.end, - # and returns self.field(new_range): - # source = "Name,NAME,name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.fields('Name'..'NAME') # => ["Foo", "Bar"] - # - # Returns all fields if no argument given: - # row.fields # => ["Foo", "Bar", "Baz"] - def fields(*headers_and_or_indices) - if headers_and_or_indices.empty? # return all fields--no arguments - @row.map(&:last) - else # or work like values_at() - all = [] - headers_and_or_indices.each do |h_or_i| - if h_or_i.is_a? Range - index_begin = h_or_i.begin.is_a?(Integer) ? h_or_i.begin : - index(h_or_i.begin) - index_end = h_or_i.end.is_a?(Integer) ? h_or_i.end : - index(h_or_i.end) - new_range = h_or_i.exclude_end? ? (index_begin...index_end) : - (index_begin..index_end) - all.concat(fields.values_at(new_range)) - else - all << field(*Array(h_or_i)) - end - end - return all - end - end - alias_method :values_at, :fields - - # :call-seq: - # index(header) -> index - # index(header, offset) -> index - # - # Returns the index for the given header, if it exists; - # otherwise returns +nil+. - # - # With the single argument +header+, returns the index - # of the first-found field with the given +header+: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.index('Name') # => 0 - # row.index('NAME') # => nil - # - # With arguments +header+ and +offset+, - # returns the index of the first-found field with given +header+, - # but ignoring the first +offset+ fields: - # row.index('Name', 1) # => 1 - # row.index('Name', 3) # => nil - def index(header, minimum_index = 0) - # find the pair - index = headers[minimum_index..-1].index(header) - # return the index at the right offset, if we found one - index.nil? ? nil : index + minimum_index - end - - # :call-seq: - # row.field?(value) -> true or false - # - # Returns +true+ if +value+ is a field in this row, +false+ otherwise: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.field?('Bar') # => true - # row.field?('BAR') # => false - def field?(data) - fields.include? data - end - - include Enumerable - - # :call-seq: - # row.each {|header, value| ... } -> self - # - # Calls the block with each header-value pair; returns +self+: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.each {|header, value| p [header, value] } - # Output: - # ["Name", "Foo"] - # ["Name", "Bar"] - # ["Name", "Baz"] - # - # If no block is given, returns a new Enumerator: - # row.each # => #:each> - def each(&block) - return enum_for(__method__) { size } unless block_given? - - @row.each(&block) - - self # for chaining - end - - alias_method :each_pair, :each - - # :call-seq: - # row == other -> true or false - # - # Returns +true+ if +other+ is a /CSV::Row that has the same - # fields (headers and values) in the same order as +self+; - # otherwise returns +false+: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # other_row = table[0] - # row == other_row # => true - # other_row = table[1] - # row == other_row # => false - def ==(other) - return @row == other.row if other.is_a? CSV::Row - @row == other - end - - # :call-seq: - # row.to_h -> hash - # - # Returns the new \Hash formed by adding each header-value pair in +self+ - # as a key-value pair in the \Hash. - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.to_h # => {"Name"=>"foo", "Value"=>"0"} - # - # Header order is preserved, but repeated headers are ignored: - # source = "Name,Name,Name\nFoo,Bar,Baz\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.to_h # => {"Name"=>"Foo"} - def to_h - hash = {} - each do |key, _value| - hash[key] = self[key] unless hash.key?(key) - end - hash - end - alias_method :to_hash, :to_h - - # :call-seq: - # row.deconstruct_keys(keys) -> hash - # - # Returns the new \Hash suitable for pattern matching containing only the - # keys specified as an argument. - def deconstruct_keys(keys) - if keys.nil? - to_h - else - keys.to_h { |key| [key, self[key]] } - end - end - - alias_method :to_ary, :to_a - - # :call-seq: - # row.deconstruct -> array - # - # Returns the new \Array suitable for pattern matching containing the values - # of the row. - def deconstruct - fields - end - - # :call-seq: - # row.to_csv -> csv_string - # - # Returns the row as a \CSV String. Headers are not included: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.to_csv # => "foo,0\n" - def to_csv(**options) - fields.to_csv(**options) - end - alias_method :to_s, :to_csv - - # :call-seq: - # row.dig(index_or_header, *identifiers) -> object - # - # Finds and returns the object in nested object that is specified - # by +index_or_header+ and +specifiers+. - # - # The nested objects may be instances of various classes. - # See {Dig Methods}[rdoc-ref:dig_methods.rdoc]. - # - # Examples: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.dig(1) # => "0" - # row.dig('Value') # => "0" - # row.dig(5) # => nil - def dig(index_or_header, *indexes) - value = field(index_or_header) - if value.nil? - nil - elsif indexes.empty? - value - else - unless value.respond_to?(:dig) - raise TypeError, "#{value.class} does not have \#dig method" - end - value.dig(*indexes) - end - end - - # :call-seq: - # row.inspect -> string - # - # Returns an ASCII-compatible \String showing: - # - Class \CSV::Row. - # - Header-value pairs. - # Example: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # row = table[0] - # row.inspect # => "#" - def inspect - str = ["#<", self.class.to_s] - each do |header, field| - str << " " << (header.is_a?(Symbol) ? header.to_s : header.inspect) << - ":" << field.inspect - end - str << ">" - begin - str.join('') - rescue # any encoding error - str.map do |s| - e = Encoding::Converter.asciicompat_encoding(s.encoding) - e ? s.encode(e) : s.force_encoding("ASCII-8BIT") - end.join('') - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/table.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/table.rb deleted file mode 100644 index fb19f545..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/table.rb +++ /dev/null @@ -1,1055 +0,0 @@ -# frozen_string_literal: true - -require "forwardable" - -class CSV - # = \CSV::Table - # A \CSV::Table instance represents \CSV data. - # (see {class CSV}[../CSV.html]). - # - # The instance may have: - # - Rows: each is a Table::Row object. - # - Headers: names for the columns. - # - # === Instance Methods - # - # \CSV::Table has three groups of instance methods: - # - Its own internally defined instance methods. - # - Methods included by module Enumerable. - # - Methods delegated to class Array.: - # * Array#empty? - # * Array#length - # * Array#size - # - # == Creating a \CSV::Table Instance - # - # Commonly, a new \CSV::Table instance is created by parsing \CSV source - # using headers: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.class # => CSV::Table - # - # You can also create an instance directly. See ::new. - # - # == Headers - # - # If a table has headers, the headers serve as labels for the columns of data. - # Each header serves as the label for its column. - # - # The headers for a \CSV::Table object are stored as an \Array of Strings. - # - # Commonly, headers are defined in the first row of \CSV source: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.headers # => ["Name", "Value"] - # - # If no headers are defined, the \Array is empty: - # table = CSV::Table.new([]) - # table.headers # => [] - # - # == Access Modes - # - # \CSV::Table provides three modes for accessing table data: - # - \Row mode. - # - Column mode. - # - Mixed mode (the default for a new table). - # - # The access mode for a\CSV::Table instance affects the behavior - # of some of its instance methods: - # - #[] - # - #[]= - # - #delete - # - #delete_if - # - #each - # - #values_at - # - # === \Row Mode - # - # Set a table to row mode with method #by_row!: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_row! # => # - # - # Specify a single row by an \Integer index: - # # Get a row. - # table[1] # => # - # # Set a row, then get it. - # table[1] = CSV::Row.new(['Name', 'Value'], ['bam', 3]) - # table[1] # => # - # - # Specify a sequence of rows by a \Range: - # # Get rows. - # table[1..2] # => [#, #] - # # Set rows, then get them. - # table[1..2] = [ - # CSV::Row.new(['Name', 'Value'], ['bat', 4]), - # CSV::Row.new(['Name', 'Value'], ['bad', 5]), - # ] - # table[1..2] # => [["Name", #], ["Value", #]] - # - # === Column Mode - # - # Set a table to column mode with method #by_col!: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_col! # => # - # - # Specify a column by an \Integer index: - # # Get a column. - # table[0] - # # Set a column, then get it. - # table[0] = ['FOO', 'BAR', 'BAZ'] - # table[0] # => ["FOO", "BAR", "BAZ"] - # - # Specify a column by its \String header: - # # Get a column. - # table['Name'] # => ["FOO", "BAR", "BAZ"] - # # Set a column, then get it. - # table['Name'] = ['Foo', 'Bar', 'Baz'] - # table['Name'] # => ["Foo", "Bar", "Baz"] - # - # === Mixed Mode - # - # In mixed mode, you can refer to either rows or columns: - # - An \Integer index refers to a row. - # - A \Range index refers to multiple rows. - # - A \String index refers to a column. - # - # Set a table to mixed mode with method #by_col_or_row!: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_col_or_row! # => # - # - # Specify a single row by an \Integer index: - # # Get a row. - # table[1] # => # - # # Set a row, then get it. - # table[1] = CSV::Row.new(['Name', 'Value'], ['bam', 3]) - # table[1] # => # - # - # Specify a sequence of rows by a \Range: - # # Get rows. - # table[1..2] # => [#, #] - # # Set rows, then get them. - # table[1] = CSV::Row.new(['Name', 'Value'], ['bat', 4]) - # table[2] = CSV::Row.new(['Name', 'Value'], ['bad', 5]) - # table[1..2] # => [["Name", #], ["Value", #]] - # - # Specify a column by its \String header: - # # Get a column. - # table['Name'] # => ["foo", "bat", "bad"] - # # Set a column, then get it. - # table['Name'] = ['Foo', 'Bar', 'Baz'] - # table['Name'] # => ["Foo", "Bar", "Baz"] - class Table - # :call-seq: - # CSV::Table.new(array_of_rows, headers = nil) -> csv_table - # - # Returns a new \CSV::Table object. - # - # - Argument +array_of_rows+ must be an \Array of CSV::Row objects. - # - Argument +headers+, if given, may be an \Array of Strings. - # - # --- - # - # Create an empty \CSV::Table object: - # table = CSV::Table.new([]) - # table # => # - # - # Create a non-empty \CSV::Table object: - # rows = [ - # CSV::Row.new([], []), - # CSV::Row.new([], []), - # CSV::Row.new([], []), - # ] - # table = CSV::Table.new(rows) - # table # => # - # - # --- - # - # If argument +headers+ is an \Array of Strings, - # those Strings become the table's headers: - # table = CSV::Table.new([], headers: ['Name', 'Age']) - # table.headers # => ["Name", "Age"] - # - # If argument +headers+ is not given and the table has rows, - # the headers are taken from the first row: - # rows = [ - # CSV::Row.new(['Foo', 'Bar'], []), - # CSV::Row.new(['foo', 'bar'], []), - # CSV::Row.new(['FOO', 'BAR'], []), - # ] - # table = CSV::Table.new(rows) - # table.headers # => ["Foo", "Bar"] - # - # If argument +headers+ is not given and the table is empty (has no rows), - # the headers are also empty: - # table = CSV::Table.new([]) - # table.headers # => [] - # - # --- - # - # Raises an exception if argument +array_of_rows+ is not an \Array object: - # # Raises NoMethodError (undefined method `first' for :foo:Symbol): - # CSV::Table.new(:foo) - # - # Raises an exception if an element of +array_of_rows+ is not a \CSV::Table object: - # # Raises NoMethodError (undefined method `headers' for :foo:Symbol): - # CSV::Table.new([:foo]) - def initialize(array_of_rows, headers: nil) - @table = array_of_rows - @headers = headers - unless @headers - if @table.empty? - @headers = [] - else - @headers = @table.first.headers - end - end - - @mode = :col_or_row - end - - # The current access mode for indexing and iteration. - attr_reader :mode - - # Internal data format used to compare equality. - attr_reader :table - protected :table - - ### Array Delegation ### - - extend Forwardable - def_delegators :@table, :empty?, :length, :size - - # :call-seq: - # table.by_col -> table_dup - # - # Returns a duplicate of +self+, in column mode - # (see {Column Mode}[#class-CSV::Table-label-Column+Mode]): - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.mode # => :col_or_row - # dup_table = table.by_col - # dup_table.mode # => :col - # dup_table.equal?(table) # => false # It's a dup - # - # This may be used to chain method calls without changing the mode - # (but also will affect performance and memory usage): - # dup_table.by_col['Name'] - # - # Also note that changes to the duplicate table will not affect the original. - def by_col - self.class.new(@table.dup).by_col! - end - - # :call-seq: - # table.by_col! -> self - # - # Sets the mode for +self+ to column mode - # (see {Column Mode}[#class-CSV::Table-label-Column+Mode]); returns +self+: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.mode # => :col_or_row - # table1 = table.by_col! - # table.mode # => :col - # table1.equal?(table) # => true # Returned self - def by_col! - @mode = :col - - self - end - - # :call-seq: - # table.by_col_or_row -> table_dup - # - # Returns a duplicate of +self+, in mixed mode - # (see {Mixed Mode}[#class-CSV::Table-label-Mixed+Mode]): - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true).by_col! - # table.mode # => :col - # dup_table = table.by_col_or_row - # dup_table.mode # => :col_or_row - # dup_table.equal?(table) # => false # It's a dup - # - # This may be used to chain method calls without changing the mode - # (but also will affect performance and memory usage): - # dup_table.by_col_or_row['Name'] - # - # Also note that changes to the duplicate table will not affect the original. - def by_col_or_row - self.class.new(@table.dup).by_col_or_row! - end - - # :call-seq: - # table.by_col_or_row! -> self - # - # Sets the mode for +self+ to mixed mode - # (see {Mixed Mode}[#class-CSV::Table-label-Mixed+Mode]); returns +self+: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true).by_col! - # table.mode # => :col - # table1 = table.by_col_or_row! - # table.mode # => :col_or_row - # table1.equal?(table) # => true # Returned self - def by_col_or_row! - @mode = :col_or_row - - self - end - - # :call-seq: - # table.by_row -> table_dup - # - # Returns a duplicate of +self+, in row mode - # (see {Row Mode}[#class-CSV::Table-label-Row+Mode]): - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.mode # => :col_or_row - # dup_table = table.by_row - # dup_table.mode # => :row - # dup_table.equal?(table) # => false # It's a dup - # - # This may be used to chain method calls without changing the mode - # (but also will affect performance and memory usage): - # dup_table.by_row[1] - # - # Also note that changes to the duplicate table will not affect the original. - def by_row - self.class.new(@table.dup).by_row! - end - - # :call-seq: - # table.by_row! -> self - # - # Sets the mode for +self+ to row mode - # (see {Row Mode}[#class-CSV::Table-label-Row+Mode]); returns +self+: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.mode # => :col_or_row - # table1 = table.by_row! - # table.mode # => :row - # table1.equal?(table) # => true # Returned self - def by_row! - @mode = :row - - self - end - - # :call-seq: - # table.headers -> array_of_headers - # - # Returns a new \Array containing the \String headers for the table. - # - # If the table is not empty, returns the headers from the first row: - # rows = [ - # CSV::Row.new(['Foo', 'Bar'], []), - # CSV::Row.new(['FOO', 'BAR'], []), - # CSV::Row.new(['foo', 'bar'], []), - # ] - # table = CSV::Table.new(rows) - # table.headers # => ["Foo", "Bar"] - # table.delete(0) - # table.headers # => ["FOO", "BAR"] - # table.delete(0) - # table.headers # => ["foo", "bar"] - # - # If the table is empty, returns a copy of the headers in the table itself: - # table.delete(0) - # table.headers # => ["Foo", "Bar"] - def headers - if @table.empty? - @headers.dup - else - @table.first.headers - end - end - - # :call-seq: - # table[n] -> row or column_data - # table[range] -> array_of_rows or array_of_column_data - # table[header] -> array_of_column_data - # - # Returns data from the table; does not modify the table. - # - # --- - # - # Fetch a \Row by Its \Integer Index:: - # - Form: table[n], +n+ an integer. - # - Access mode: :row or :col_or_row. - # - Return value: _nth_ row of the table, if that row exists; - # otherwise +nil+. - # - # Returns the _nth_ row of the table if that row exists: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_row! # => # - # table[1] # => # - # table.by_col_or_row! # => # - # table[1] # => # - # - # Counts backward from the last row if +n+ is negative: - # table[-1] # => # - # - # Returns +nil+ if +n+ is too large or too small: - # table[4] # => nil - # table[-4] # => nil - # - # Raises an exception if the access mode is :row - # and +n+ is not an \Integer: - # table.by_row! # => # - # # Raises TypeError (no implicit conversion of String into Integer): - # table['Name'] - # - # --- - # - # Fetch a Column by Its \Integer Index:: - # - Form: table[n], +n+ an \Integer. - # - Access mode: :col. - # - Return value: _nth_ column of the table, if that column exists; - # otherwise an \Array of +nil+ fields of length self.size. - # - # Returns the _nth_ column of the table if that column exists: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_col! # => # - # table[1] # => ["0", "1", "2"] - # - # Counts backward from the last column if +n+ is negative: - # table[-2] # => ["foo", "bar", "baz"] - # - # Returns an \Array of +nil+ fields if +n+ is too large or too small: - # table[4] # => [nil, nil, nil] - # table[-4] # => [nil, nil, nil] - # - # --- - # - # Fetch Rows by \Range:: - # - Form: table[range], +range+ a \Range object. - # - Access mode: :row or :col_or_row. - # - Return value: rows from the table, beginning at row range.start, - # if those rows exists. - # - # Returns rows from the table, beginning at row range.first, - # if those rows exist: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_row! # => # - # rows = table[1..2] # => # - # rows # => [#, #] - # table.by_col_or_row! # => # - # rows = table[1..2] # => # - # rows # => [#, #] - # - # If there are too few rows, returns all from range.start to the end: - # rows = table[1..50] # => # - # rows # => [#, #] - # - # Special case: if range.start == table.size, returns an empty \Array: - # table[table.size..50] # => [] - # - # If range.end is negative, calculates the ending index from the end: - # rows = table[0..-1] - # rows # => [#, #, #] - # - # If range.start is negative, calculates the starting index from the end: - # rows = table[-1..2] - # rows # => [#] - # - # If range.start is larger than table.size, returns +nil+: - # table[4..4] # => nil - # - # --- - # - # Fetch Columns by \Range:: - # - Form: table[range], +range+ a \Range object. - # - Access mode: :col. - # - Return value: column data from the table, beginning at column range.start, - # if those columns exist. - # - # Returns column values from the table, if the column exists; - # the values are arranged by row: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_col! - # table[0..1] # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - # - # Special case: if range.start == headers.size, - # returns an \Array (size: table.size) of empty \Arrays: - # table[table.headers.size..50] # => [[], [], []] - # - # If range.end is negative, calculates the ending index from the end: - # table[0..-1] # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - # - # If range.start is negative, calculates the starting index from the end: - # table[-2..2] # => [["foo", "0"], ["bar", "1"], ["baz", "2"]] - # - # If range.start is larger than table.size, - # returns an \Array of +nil+ values: - # table[4..4] # => [nil, nil, nil] - # - # --- - # - # Fetch a Column by Its \String Header:: - # - Form: table[header], +header+ a \String header. - # - Access mode: :col or :col_or_row - # - Return value: column data from the table, if that +header+ exists. - # - # Returns column values from the table, if the column exists: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_col! # => # - # table['Name'] # => ["foo", "bar", "baz"] - # table.by_col_or_row! # => # - # col = table['Name'] - # col # => ["foo", "bar", "baz"] - # - # Modifying the returned column values does not modify the table: - # col[0] = 'bat' - # col # => ["bat", "bar", "baz"] - # table['Name'] # => ["foo", "bar", "baz"] - # - # Returns an \Array of +nil+ values if there is no such column: - # table['Nosuch'] # => [nil, nil, nil] - def [](index_or_header) - if @mode == :row or # by index - (@mode == :col_or_row and (index_or_header.is_a?(Integer) or index_or_header.is_a?(Range))) - @table[index_or_header] - else # by header - @table.map { |row| row[index_or_header] } - end - end - - # :call-seq: - # table[n] = row -> row - # table[n] = field_or_array_of_fields -> field_or_array_of_fields - # table[header] = field_or_array_of_fields -> field_or_array_of_fields - # - # Puts data onto the table. - # - # --- - # - # Set a \Row by Its \Integer Index:: - # - Form: table[n] = row, +n+ an \Integer, - # +row+ a \CSV::Row instance or an \Array of fields. - # - Access mode: :row or :col_or_row. - # - Return value: +row+. - # - # If the row exists, it is replaced: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # new_row = CSV::Row.new(['Name', 'Value'], ['bat', 3]) - # table.by_row! # => # - # return_value = table[0] = new_row - # return_value.equal?(new_row) # => true # Returned the row - # table[0].to_h # => {"Name"=>"bat", "Value"=>3} - # - # With access mode :col_or_row: - # table.by_col_or_row! # => # - # table[0] = CSV::Row.new(['Name', 'Value'], ['bam', 4]) - # table[0].to_h # => {"Name"=>"bam", "Value"=>4} - # - # With an \Array instead of a \CSV::Row, inherits headers from the table: - # array = ['bad', 5] - # return_value = table[0] = array - # return_value.equal?(array) # => true # Returned the array - # table[0].to_h # => {"Name"=>"bad", "Value"=>5} - # - # If the row does not exist, extends the table by adding rows: - # assigns rows with +nil+ as needed: - # table.size # => 3 - # table[5] = ['bag', 6] - # table.size # => 6 - # table[3] # => nil - # table[4]# => nil - # table[5].to_h # => {"Name"=>"bag", "Value"=>6} - # - # Note that the +nil+ rows are actually +nil+, not a row of +nil+ fields. - # - # --- - # - # Set a Column by Its \Integer Index:: - # - Form: table[n] = array_of_fields, +n+ an \Integer, - # +array_of_fields+ an \Array of \String fields. - # - Access mode: :col. - # - Return value: +array_of_fields+. - # - # If the column exists, it is replaced: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # new_col = [3, 4, 5] - # table.by_col! # => # - # return_value = table[1] = new_col - # return_value.equal?(new_col) # => true # Returned the column - # table[1] # => [3, 4, 5] - # # The rows, as revised: - # table.by_row! # => # - # table[0].to_h # => {"Name"=>"foo", "Value"=>3} - # table[1].to_h # => {"Name"=>"bar", "Value"=>4} - # table[2].to_h # => {"Name"=>"baz", "Value"=>5} - # table.by_col! # => # - # - # If there are too few values, fills with +nil+ values: - # table[1] = [0] - # table[1] # => [0, nil, nil] - # - # If there are too many values, ignores the extra values: - # table[1] = [0, 1, 2, 3, 4] - # table[1] # => [0, 1, 2] - # - # If a single value is given, replaces all fields in the column with that value: - # table[1] = 'bat' - # table[1] # => ["bat", "bat", "bat"] - # - # --- - # - # Set a Column by Its \String Header:: - # - Form: table[header] = field_or_array_of_fields, - # +header+ a \String header, +field_or_array_of_fields+ a field value - # or an \Array of \String fields. - # - Access mode: :col or :col_or_row. - # - Return value: +field_or_array_of_fields+. - # - # If the column exists, it is replaced: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # new_col = [3, 4, 5] - # table.by_col! # => # - # return_value = table['Value'] = new_col - # return_value.equal?(new_col) # => true # Returned the column - # table['Value'] # => [3, 4, 5] - # # The rows, as revised: - # table.by_row! # => # - # table[0].to_h # => {"Name"=>"foo", "Value"=>3} - # table[1].to_h # => {"Name"=>"bar", "Value"=>4} - # table[2].to_h # => {"Name"=>"baz", "Value"=>5} - # table.by_col! # => # - # - # If there are too few values, fills with +nil+ values: - # table['Value'] = [0] - # table['Value'] # => [0, nil, nil] - # - # If there are too many values, ignores the extra values: - # table['Value'] = [0, 1, 2, 3, 4] - # table['Value'] # => [0, 1, 2] - # - # If the column does not exist, extends the table by adding columns: - # table['Note'] = ['x', 'y', 'z'] - # table['Note'] # => ["x", "y", "z"] - # # The rows, as revised: - # table.by_row! - # table[0].to_h # => {"Name"=>"foo", "Value"=>0, "Note"=>"x"} - # table[1].to_h # => {"Name"=>"bar", "Value"=>1, "Note"=>"y"} - # table[2].to_h # => {"Name"=>"baz", "Value"=>2, "Note"=>"z"} - # table.by_col! - # - # If a single value is given, replaces all fields in the column with that value: - # table['Value'] = 'bat' - # table['Value'] # => ["bat", "bat", "bat"] - def []=(index_or_header, value) - if @mode == :row or # by index - (@mode == :col_or_row and index_or_header.is_a? Integer) - if value.is_a? Array - @table[index_or_header] = Row.new(headers, value) - else - @table[index_or_header] = value - end - else # set column - unless index_or_header.is_a? Integer - index = @headers.index(index_or_header) || @headers.size - @headers[index] = index_or_header - end - if value.is_a? Array # multiple values - @table.each_with_index do |row, i| - if row.header_row? - row[index_or_header] = index_or_header - else - row[index_or_header] = value[i] - end - end - else # repeated value - @table.each do |row| - if row.header_row? - row[index_or_header] = index_or_header - else - row[index_or_header] = value - end - end - end - end - end - - # :call-seq: - # table.values_at(*indexes) -> array_of_rows - # table.values_at(*headers) -> array_of_columns_data - # - # If the access mode is :row or :col_or_row, - # and each argument is either an \Integer or a \Range, - # returns rows. - # Otherwise, returns columns data. - # - # In either case, the returned values are in the order - # specified by the arguments. Arguments may be repeated. - # - # --- - # - # Returns rows as an \Array of \CSV::Row objects. - # - # No argument: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.values_at # => [] - # - # One index: - # values = table.values_at(0) - # values # => [#] - # - # Two indexes: - # values = table.values_at(2, 0) - # values # => [#, #] - # - # One \Range: - # values = table.values_at(1..2) - # values # => [#, #] - # - # \Ranges and indexes: - # values = table.values_at(0..1, 1..2, 0, 2) - # pp values - # Output: - # [#, - # #, - # #, - # #, - # #, - # #] - # - # --- - # - # Returns columns data as row Arrays, - # each consisting of the specified columns data for that row: - # values = table.values_at('Name') - # values # => [["foo"], ["bar"], ["baz"]] - # values = table.values_at('Value', 'Name') - # values # => [["0", "foo"], ["1", "bar"], ["2", "baz"]] - def values_at(*indices_or_headers) - if @mode == :row or # by indices - ( @mode == :col_or_row and indices_or_headers.all? do |index| - index.is_a?(Integer) or - ( index.is_a?(Range) and - index.first.is_a?(Integer) and - index.last.is_a?(Integer) ) - end ) - @table.values_at(*indices_or_headers) - else # by headers - @table.map { |row| row.values_at(*indices_or_headers) } - end - end - - # :call-seq: - # table << row_or_array -> self - # - # If +row_or_array+ is a \CSV::Row object, - # it is appended to the table: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table << CSV::Row.new(table.headers, ['bat', 3]) - # table[3] # => # - # - # If +row_or_array+ is an \Array, it is used to create a new - # \CSV::Row object which is then appended to the table: - # table << ['bam', 4] - # table[4] # => # - def <<(row_or_array) - if row_or_array.is_a? Array # append Array - @table << Row.new(headers, row_or_array) - else # append Row - @table << row_or_array - end - - self # for chaining - end - - # - # :call-seq: - # table.push(*rows_or_arrays) -> self - # - # A shortcut for appending multiple rows. Equivalent to: - # rows.each {|row| self << row } - # - # Each argument may be either a \CSV::Row object or an \Array: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # rows = [ - # CSV::Row.new(table.headers, ['bat', 3]), - # ['bam', 4] - # ] - # table.push(*rows) - # table[3..4] # => [#, #] - def push(*rows) - rows.each { |row| self << row } - - self # for chaining - end - - # :call-seq: - # table.delete(*indexes) -> deleted_values - # table.delete(*headers) -> deleted_values - # - # If the access mode is :row or :col_or_row, - # and each argument is either an \Integer or a \Range, - # returns deleted rows. - # Otherwise, returns deleted columns data. - # - # In either case, the returned values are in the order - # specified by the arguments. Arguments may be repeated. - # - # --- - # - # Returns rows as an \Array of \CSV::Row objects. - # - # One index: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # deleted_values = table.delete(0) - # deleted_values # => [#] - # - # Two indexes: - # table = CSV.parse(source, headers: true) - # deleted_values = table.delete(2, 0) - # deleted_values # => [#, #] - # - # --- - # - # Returns columns data as column Arrays. - # - # One header: - # table = CSV.parse(source, headers: true) - # deleted_values = table.delete('Name') - # deleted_values # => ["foo", "bar", "baz"] - # - # Two headers: - # table = CSV.parse(source, headers: true) - # deleted_values = table.delete('Value', 'Name') - # deleted_values # => [["0", "1", "2"], ["foo", "bar", "baz"]] - def delete(*indexes_or_headers) - if indexes_or_headers.empty? - raise ArgumentError, "wrong number of arguments (given 0, expected 1+)" - end - deleted_values = indexes_or_headers.map do |index_or_header| - if @mode == :row or # by index - (@mode == :col_or_row and index_or_header.is_a? Integer) - @table.delete_at(index_or_header) - else # by header - if index_or_header.is_a? Integer - @headers.delete_at(index_or_header) - else - @headers.delete(index_or_header) - end - @table.map { |row| row.delete(index_or_header).last } - end - end - if indexes_or_headers.size == 1 - deleted_values[0] - else - deleted_values - end - end - - # :call-seq: - # table.delete_if {|row_or_column| ... } -> self - # - # Removes rows or columns for which the block returns a truthy value; - # returns +self+. - # - # Removes rows when the access mode is :row or :col_or_row; - # calls the block with each \CSV::Row object: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_row! # => # - # table.size # => 3 - # table.delete_if {|row| row['Name'].start_with?('b') } - # table.size # => 1 - # - # Removes columns when the access mode is :col; - # calls the block with each column as a 2-element array - # containing the header and an \Array of column fields: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_col! # => # - # table.headers.size # => 2 - # table.delete_if {|column_data| column_data[1].include?('2') } - # table.headers.size # => 1 - # - # Returns a new \Enumerator if no block is given: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.delete_if # => #:delete_if> - def delete_if(&block) - return enum_for(__method__) { @mode == :row or @mode == :col_or_row ? size : headers.size } unless block_given? - - if @mode == :row or @mode == :col_or_row # by index - @table.delete_if(&block) - else # by header - headers.each do |header| - delete(header) if yield([header, self[header]]) - end - end - - self # for chaining - end - - include Enumerable - - # :call-seq: - # table.each {|row_or_column| ... ) -> self - # - # Calls the block with each row or column; returns +self+. - # - # When the access mode is :row or :col_or_row, - # calls the block with each \CSV::Row object: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.by_row! # => # - # table.each {|row| p row } - # Output: - # # - # # - # # - # - # When the access mode is :col, - # calls the block with each column as a 2-element array - # containing the header and an \Array of column fields: - # table.by_col! # => # - # table.each {|column_data| p column_data } - # Output: - # ["Name", ["foo", "bar", "baz"]] - # ["Value", ["0", "1", "2"]] - # - # Returns a new \Enumerator if no block is given: - # table.each # => #:each> - def each(&block) - return enum_for(__method__) { @mode == :col ? headers.size : size } unless block_given? - - if @mode == :col - headers.each.with_index do |header, i| - yield([header, @table.map {|row| row[header, i]}]) - end - else - @table.each(&block) - end - - self # for chaining - end - - # :call-seq: - # table == other_table -> true or false - # - # Returns +true+ if all each row of +self+ == - # the corresponding row of +other_table+, otherwise, +false+. - # - # The access mode does no affect the result. - # - # Equal tables: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # other_table = CSV.parse(source, headers: true) - # table == other_table # => true - # - # Different row count: - # other_table.delete(2) - # table == other_table # => false - # - # Different last row: - # other_table << ['bat', 3] - # table == other_table # => false - def ==(other) - return @table == other.table if other.is_a? CSV::Table - @table == other - end - - # :call-seq: - # table.to_a -> array_of_arrays - # - # Returns the table as an \Array of \Arrays; - # the headers are in the first row: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.to_a # => [["Name", "Value"], ["foo", "0"], ["bar", "1"], ["baz", "2"]] - def to_a - array = [headers] - @table.each do |row| - array.push(row.fields) unless row.header_row? - end - - array - end - - # :call-seq: - # table.to_csv(**options) -> csv_string - # - # Returns the table as \CSV string. - # See {Options for Generating}[../CSV.html#class-CSV-label-Options+for+Generating]. - # - # Defaults option +write_headers+ to +true+: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.to_csv # => "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # - # Omits the headers if option +write_headers+ is given as +false+ - # (see {Option +write_headers+}[../CSV.html#class-CSV-label-Option+write_headers]): - # table.to_csv(write_headers: false) # => "foo,0\nbar,1\nbaz,2\n" - # - # Limit rows if option +limit+ is given like +2+: - # table.to_csv(limit: 2) # => "Name,Value\nfoo,0\nbar,1\n" - def to_csv(write_headers: true, limit: nil, **options) - array = write_headers ? [headers.to_csv(**options)] : [] - limit ||= @table.size - limit = @table.size + 1 + limit if limit < 0 - limit = 0 if limit < 0 - @table.first(limit).each do |row| - array.push(row.fields.to_csv(**options)) unless row.header_row? - end - - array.join("") - end - alias_method :to_s, :to_csv - - # - # Extracts the nested value specified by the sequence of +index+ or +header+ objects by calling dig at each step, - # returning nil if any intermediate step is nil. - # - def dig(index_or_header, *index_or_headers) - value = self[index_or_header] - if value.nil? - nil - elsif index_or_headers.empty? - value - else - unless value.respond_to?(:dig) - raise TypeError, "#{value.class} does not have \#dig method" - end - value.dig(*index_or_headers) - end - end - - # :call-seq: - # table.inspect => string - # - # Returns a US-ASCII-encoded \String showing table: - # - Class: CSV::Table. - # - Access mode: :row, :col, or :col_or_row. - # - Size: Row count, including the header row. - # - # Example: - # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" - # table = CSV.parse(source, headers: true) - # table.inspect # => "#\nName,Value\nfoo,0\nbar,1\nbaz,2\n" - # - def inspect - inspected = +"#<#{self.class} mode:#{@mode} row_count:#{to_a.size}>" - summary = to_csv(limit: 5) - inspected << "\n" << summary if summary.encoding.ascii_compatible? - inspected - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/version.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/version.rb deleted file mode 100644 index 227f7f75..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/version.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -class CSV - # The version of the installed library. - VERSION = "3.3.5" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/writer.rb b/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/writer.rb deleted file mode 100644 index b59f111e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/csv-3.3.5/lib/csv/writer.rb +++ /dev/null @@ -1,209 +0,0 @@ -# frozen_string_literal: true - -require_relative "input_record_separator" -require_relative "row" - -class CSV - # Note: Don't use this class directly. This is an internal class. - class Writer - # - # A CSV::Writer receives an output, prepares the header, format and output. - # It allows us to write new rows in the object and rewind it. - # - attr_reader :lineno - attr_reader :headers - - def initialize(output, options) - @output = output - @options = options - @lineno = 0 - @fields_converter = nil - prepare - if @options[:write_headers] and @headers - self << @headers - end - @fields_converter = @options[:fields_converter] - end - - # - # Adds a new row - # - def <<(row) - case row - when Row - row = row.fields - when Hash - row = @headers.collect {|header| row[header]} - end - - @headers ||= row if @use_headers - @lineno += 1 - - if @fields_converter - row = @fields_converter.convert(row, nil, lineno) - end - - i = -1 - converted_row = row.collect do |field| - i += 1 - quote(field, i) - end - line = converted_row.join(@column_separator) + @row_separator - if @output_encoding - line = line.encode(@output_encoding) - end - @output << line - - self - end - - # - # Winds back to the beginning - # - def rewind - @lineno = 0 - @headers = nil if @options[:headers].nil? - end - - private - def prepare - @encoding = @options[:encoding] - - prepare_header - prepare_format - prepare_output - end - - def prepare_header - headers = @options[:headers] - case headers - when Array - @headers = headers - @use_headers = true - when String - @headers = CSV.parse_line(headers, - col_sep: @options[:column_separator], - row_sep: @options[:row_separator], - quote_char: @options[:quote_character]) - @use_headers = true - when true - @headers = nil - @use_headers = true - else - @headers = nil - @use_headers = false - end - return unless @headers - - converter = @options[:header_fields_converter] - @headers = converter.convert(@headers, nil, 0, []) - @headers.each do |header| - header.freeze if header.is_a?(String) - end - end - - def prepare_force_quotes_fields(force_quotes) - @force_quotes_fields = {} - force_quotes.each do |name_or_index| - case name_or_index - when Integer - index = name_or_index - @force_quotes_fields[index] = true - when String, Symbol - name = name_or_index.to_s - if @headers.nil? - message = ":headers is required when you use field name " + - "in :force_quotes: " + - "#{name_or_index.inspect}: #{force_quotes.inspect}" - raise ArgumentError, message - end - index = @headers.index(name) - next if index.nil? - @force_quotes_fields[index] = true - else - message = ":force_quotes element must be " + - "field index or field name: " + - "#{name_or_index.inspect}: #{force_quotes.inspect}" - raise ArgumentError, message - end - end - end - - def prepare_format - @column_separator = @options[:column_separator].to_s.encode(@encoding) - row_separator = @options[:row_separator] - if row_separator == :auto - @row_separator = InputRecordSeparator.value.encode(@encoding) - else - @row_separator = row_separator.to_s.encode(@encoding) - end - @quote_character = @options[:quote_character] - force_quotes = @options[:force_quotes] - if force_quotes.is_a?(Array) - prepare_force_quotes_fields(force_quotes) - @force_quotes = false - elsif force_quotes - @force_quotes_fields = nil - @force_quotes = true - else - @force_quotes_fields = nil - @force_quotes = false - end - unless @force_quotes - @quotable_pattern = - Regexp.new("[\r\n".encode(@encoding) + - Regexp.escape(@column_separator) + - Regexp.escape(@quote_character.encode(@encoding)) + - "]".encode(@encoding)) - end - @quote_empty = @options.fetch(:quote_empty, true) - end - - def prepare_output - @output_encoding = nil - return unless @output.is_a?(StringIO) - - output_encoding = @output.internal_encoding || @output.external_encoding - if @encoding != output_encoding - if @options[:force_encoding] - @output_encoding = output_encoding - else - compatible_encoding = Encoding.compatible?(@encoding, output_encoding) - if compatible_encoding - @output.set_encoding(compatible_encoding) - @output.seek(0, IO::SEEK_END) - end - end - end - end - - def quote_field(field) - field = String(field) - encoded_quote_character = @quote_character.encode(field.encoding) - encoded_quote_character + - field.gsub(encoded_quote_character, - encoded_quote_character * 2) + - encoded_quote_character - end - - def quote(field, i) - if @force_quotes - quote_field(field) - elsif @force_quotes_fields and @force_quotes_fields[i] - quote_field(field) - else - if field.nil? # represent +nil+ fields as empty unquoted fields - "" - else - field = String(field) # Stringify fields - # represent empty fields as empty quoted fields - if (@quote_empty and field.empty?) or (field.valid_encoding? and @quotable_pattern.match?(field)) - quote_field(field) - else - field # unquoted field - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/LICENSE.txt b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/LICENSE.txt deleted file mode 100644 index a009caef..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (C) 1993-2013 Yukihiro Matsumoto. 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 AUTHOR 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 AUTHOR 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/bundle/ruby/3.2.0/gems/drb-2.2.3/drb.gemspec b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/drb.gemspec deleted file mode 100644 index 40f16697..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/drb.gemspec +++ /dev/null @@ -1,42 +0,0 @@ -begin - require_relative "lib/drb/version" -rescue LoadError # Fallback to load version file in ruby core repository - require_relative "version" -end - -Gem::Specification.new do |spec| - spec.name = "drb" - spec.version = DRb::VERSION - spec.authors = ["Masatoshi SEKI"] - spec.email = ["seki@ruby-lang.org"] - - spec.summary = %q{Distributed object system for Ruby} - spec.description = %q{Distributed object system for Ruby} - spec.homepage = "https://github.com/ruby/drb" - spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0") - spec.licenses = ["Ruby", "BSD-2-Clause"] - - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = spec.homepage - spec.metadata["changelog_uri"] = - "#{spec.homepage}/releases/tag/v#{spec.version}" - - spec.files = %w[ - LICENSE.txt - drb.gemspec - lib/drb.rb - lib/drb/acl.rb - lib/drb/drb.rb - lib/drb/eq.rb - lib/drb/extserv.rb - lib/drb/extservm.rb - lib/drb/gw.rb - lib/drb/observer.rb - lib/drb/ssl.rb - lib/drb/timeridconv.rb - lib/drb/unix.rb - lib/drb/version.rb - lib/drb/weakidconv.rb - ] - spec.require_paths = ["lib"] -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb.rb deleted file mode 100644 index 2bb4716f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: false -require 'drb/drb' - diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/acl.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/acl.rb deleted file mode 100644 index b004656f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/acl.rb +++ /dev/null @@ -1,239 +0,0 @@ -# frozen_string_literal: false -# Copyright (c) 2000,2002,2003 Masatoshi SEKI -# -# acl.rb is copyrighted free software by Masatoshi SEKI. -# You can redistribute it and/or modify it under the same terms as Ruby. - -require 'ipaddr' - -## -# Simple Access Control Lists. -# -# Access control lists are composed of "allow" and "deny" halves to control -# access. Use "all" or "*" to match any address. To match a specific address -# use any address or address mask that IPAddr can understand. -# -# Example: -# -# list = %w[ -# deny all -# allow 192.168.1.1 -# allow ::ffff:192.168.1.2 -# allow 192.168.1.3 -# ] -# -# # From Socket#peeraddr, see also ACL#allow_socket? -# addr = ["AF_INET", 10, "lc630", "192.168.1.3"] -# -# acl = ACL.new -# p acl.allow_addr?(addr) # => true -# -# acl = ACL.new(list, ACL::DENY_ALLOW) -# p acl.allow_addr?(addr) # => true - -class ACL - - ## - # The current version of ACL - - VERSION=["2.0.0"] - - ## - # An entry in an ACL - - class ACLEntry - - ## - # Creates a new entry using +str+. - # - # +str+ may be "*" or "all" to match any address, an IP address string - # to match a specific address, an IP address mask per IPAddr, or one - # containing "*" to match part of an IPv4 address. - # - # IPAddr::InvalidPrefixError may be raised when an IP network - # address with an invalid netmask/prefix is given. - - def initialize(str) - if str == '*' or str == 'all' - @pat = [:all] - elsif str.include?('*') - @pat = [:name, dot_pat(str)] - else - begin - @pat = [:ip, IPAddr.new(str)] - rescue IPAddr::InvalidPrefixError - # In this case, `str` shouldn't be a host name pattern - # because it contains a slash. - raise - rescue ArgumentError - @pat = [:name, dot_pat(str)] - end - end - end - - private - - ## - # Creates a regular expression to match IPv4 addresses - - def dot_pat_str(str) - list = str.split('.').collect { |s| - (s == '*') ? '.+' : s - } - list.join("\\.") - end - - private - - ## - # Creates a Regexp to match an address. - - def dot_pat(str) - /\A#{dot_pat_str(str)}\z/ - end - - public - - ## - # Matches +addr+ against this entry. - - def match(addr) - case @pat[0] - when :all - true - when :ip - begin - ipaddr = IPAddr.new(addr[3]) - ipaddr = ipaddr.ipv4_mapped if @pat[1].ipv6? && ipaddr.ipv4? - rescue ArgumentError - return false - end - (@pat[1].include?(ipaddr)) ? true : false - when :name - (@pat[1] =~ addr[2]) ? true : false - else - false - end - end - end - - ## - # A list of ACLEntry objects. Used to implement the allow and deny halves - # of an ACL - - class ACLList - - ## - # Creates an empty ACLList - - def initialize - @list = [] - end - - public - - ## - # Matches +addr+ against each ACLEntry in this list. - - def match(addr) - @list.each do |e| - return true if e.match(addr) - end - false - end - - public - - ## - # Adds +str+ as an ACLEntry in this list - - def add(str) - @list.push(ACLEntry.new(str)) - end - - end - - ## - # Default to deny - - DENY_ALLOW = 0 - - ## - # Default to allow - - ALLOW_DENY = 1 - - ## - # Creates a new ACL from +list+ with an evaluation +order+ of DENY_ALLOW or - # ALLOW_DENY. - # - # An ACL +list+ is an Array of "allow" or "deny" and an address or address - # mask or "all" or "*" to match any address: - # - # %w[ - # deny all - # allow 192.0.2.2 - # allow 192.0.2.128/26 - # ] - - def initialize(list=nil, order = DENY_ALLOW) - @order = order - @deny = ACLList.new - @allow = ACLList.new - install_list(list) if list - end - - public - - ## - # Allow connections from Socket +soc+? - - def allow_socket?(soc) - allow_addr?(soc.peeraddr) - end - - public - - ## - # Allow connections from addrinfo +addr+? It must be formatted like - # Socket#peeraddr: - # - # ["AF_INET", 10, "lc630", "192.0.2.1"] - - def allow_addr?(addr) - case @order - when DENY_ALLOW - return true if @allow.match(addr) - return false if @deny.match(addr) - return true - when ALLOW_DENY - return false if @deny.match(addr) - return true if @allow.match(addr) - return false - else - false - end - end - - public - - ## - # Adds +list+ of ACL entries to this ACL. - - def install_list(list) - i = 0 - while i < list.size - permission, domain = list.slice(i,2) - case permission.downcase - when 'allow' - @allow.add(domain) - when 'deny' - @deny.add(domain) - else - raise "Invalid ACL entry #{list}" - end - i += 2 - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/drb.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/drb.rb deleted file mode 100644 index 8073ac09..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/drb.rb +++ /dev/null @@ -1,1993 +0,0 @@ -# frozen_string_literal: false -# -# = drb/drb.rb -# -# Distributed Ruby: _dRuby_ -# -# Copyright (c) 1999-2003 Masatoshi SEKI. You can redistribute it and/or -# modify it under the same terms as Ruby. -# -# Author:: Masatoshi SEKI -# -# Documentation:: William Webber (william@williamwebber.com) -# -# == Overview -# -# dRuby is a distributed object system for Ruby. It allows an object in one -# Ruby process to invoke methods on an object in another Ruby process on the -# same or a different machine. -# -# The Ruby standard library contains the core classes of the dRuby package. -# However, the full package also includes access control lists and the -# Rinda tuple-space distributed task management system, as well as a -# large number of samples. The full dRuby package can be downloaded from -# the dRuby home page (see *References*). -# -# For an introduction and examples of usage see the documentation to the -# DRb module. -# -# == References -# -# [http://www2a.biglobe.ne.jp/~seki/ruby/druby.html] -# The dRuby home page, in Japanese. Contains the full dRuby package -# and links to other Japanese-language sources. -# -# [http://www2a.biglobe.ne.jp/~seki/ruby/druby.en.html] -# The English version of the dRuby home page. -# -# [https://web.archive.org/web/20160611151955/https://pragprog.com/book/sidruby/the-druby-book] -# The dRuby Book: Distributed and Parallel Computing with Ruby -# by Masatoshi Seki and Makoto Inoue -# -# [http://ruby-doc.com/docs/ProgrammingRuby/html/ospace.html] -# The chapter from *Programming* *Ruby* by Dave Thomas and Andy Hunt -# which discusses dRuby. -# -# [http://www.clio.ne.jp/home/web-i31s/Flotuard/Ruby/PRC2K_seki/dRuby.en.html] -# Translation of presentation on Ruby by Masatoshi Seki. - -require 'socket' -require 'io/wait' -require 'monitor' -require_relative 'eq' -require_relative 'version' - -# -# == Overview -# -# dRuby is a distributed object system for Ruby. It is written in -# pure Ruby and uses its own protocol. No add-in services are needed -# beyond those provided by the Ruby runtime, such as TCP sockets. It -# does not rely on or interoperate with other distributed object -# systems such as CORBA, RMI, or .NET. -# -# dRuby allows methods to be called in one Ruby process upon a Ruby -# object located in another Ruby process, even on another machine. -# References to objects can be passed between processes. Method -# arguments and return values are dumped and loaded in marshalled -# format. All of this is done transparently to both the caller of the -# remote method and the object that it is called upon. -# -# An object in a remote process is locally represented by a -# DRb::DRbObject instance. This acts as a sort of proxy for the -# remote object. Methods called upon this DRbObject instance are -# forwarded to its remote object. This is arranged dynamically at run -# time. There are no statically declared interfaces for remote -# objects, such as CORBA's IDL. -# -# dRuby calls made into a process are handled by a DRb::DRbServer -# instance within that process. This reconstitutes the method call, -# invokes it upon the specified local object, and returns the value to -# the remote caller. Any object can receive calls over dRuby. There -# is no need to implement a special interface, or mixin special -# functionality. Nor, in the general case, does an object need to -# explicitly register itself with a DRbServer in order to receive -# dRuby calls. -# -# One process wishing to make dRuby calls upon another process must -# somehow obtain an initial reference to an object in the remote -# process by some means other than as the return value of a remote -# method call, as there is initially no remote object reference it can -# invoke a method upon. This is done by attaching to the server by -# URI. Each DRbServer binds itself to a URI such as -# 'druby://example.com:8787'. A DRbServer can have an object attached -# to it that acts as the server's *front* *object*. A DRbObject can -# be explicitly created from the server's URI. This DRbObject's -# remote object will be the server's front object. This front object -# can then return references to other Ruby objects in the DRbServer's -# process. -# -# Method calls made over dRuby behave largely the same as normal Ruby -# method calls made within a process. Method calls with blocks are -# supported, as are raising exceptions. In addition to a method's -# standard errors, a dRuby call may also raise one of the -# dRuby-specific errors, all of which are subclasses of DRb::DRbError. -# -# Any type of object can be passed as an argument to a dRuby call or -# returned as its return value. By default, such objects are dumped -# or marshalled at the local end, then loaded or unmarshalled at the -# remote end. The remote end therefore receives a copy of the local -# object, not a distributed reference to it; methods invoked upon this -# copy are executed entirely in the remote process, not passed on to -# the local original. This has semantics similar to pass-by-value. -# -# However, if an object cannot be marshalled, a dRuby reference to it -# is passed or returned instead. This will turn up at the remote end -# as a DRbObject instance. All methods invoked upon this remote proxy -# are forwarded to the local object, as described in the discussion of -# DRbObjects. This has semantics similar to the normal Ruby -# pass-by-reference. -# -# The easiest way to signal that we want an otherwise marshallable -# object to be passed or returned as a DRbObject reference, rather -# than marshalled and sent as a copy, is to include the -# DRb::DRbUndumped mixin module. -# -# dRuby supports calling remote methods with blocks. As blocks (or -# rather the Proc objects that represent them) are not marshallable, -# the block executes in the local, not the remote, context. Each -# value yielded to the block is passed from the remote object to the -# local block, then the value returned by each block invocation is -# passed back to the remote execution context to be collected, before -# the collected values are finally returned to the local context as -# the return value of the method invocation. -# -# == Examples of usage -# -# For more dRuby samples, see the +samples+ directory in the full -# dRuby distribution. -# -# === dRuby in client/server mode -# -# This illustrates setting up a simple client-server drb -# system. Run the server and client code in different terminals, -# starting the server code first. -# -# ==== Server code -# -# require 'drb/drb' -# -# # The URI for the server to connect to -# URI="druby://localhost:8787" -# -# class TimeServer -# -# def get_current_time -# return Time.now -# end -# -# end -# -# # The object that handles requests on the server -# FRONT_OBJECT=TimeServer.new -# -# DRb.start_service(URI, FRONT_OBJECT) -# # Wait for the drb server thread to finish before exiting. -# DRb.thread.join -# -# ==== Client code -# -# require 'drb/drb' -# -# # The URI to connect to -# SERVER_URI="druby://localhost:8787" -# -# # Start a local DRbServer to handle callbacks. -# # -# # Not necessary for this small example, but will be required -# # as soon as we pass a non-marshallable object as an argument -# # to a dRuby call. -# # -# # Note: this must be called at least once per process to take any effect. -# # This is particularly important if your application forks. -# DRb.start_service -# -# timeserver = DRbObject.new_with_uri(SERVER_URI) -# puts timeserver.get_current_time -# -# === Remote objects under dRuby -# -# This example illustrates returning a reference to an object -# from a dRuby call. The Logger instances live in the server -# process. References to them are returned to the client process, -# where methods can be invoked upon them. These methods are -# executed in the server process. -# -# ==== Server code -# -# require 'drb/drb' -# -# URI="druby://localhost:8787" -# -# class Logger -# -# # Make dRuby send Logger instances as dRuby references, -# # not copies. -# include DRb::DRbUndumped -# -# def initialize(n, fname) -# @name = n -# @filename = fname -# end -# -# def log(message) -# File.open(@filename, "a") do |f| -# f.puts("#{Time.now}: #{@name}: #{message}") -# end -# end -# -# end -# -# # We have a central object for creating and retrieving loggers. -# # This retains a local reference to all loggers created. This -# # is so an existing logger can be looked up by name, but also -# # to prevent loggers from being garbage collected. A dRuby -# # reference to an object is not sufficient to prevent it being -# # garbage collected! -# class LoggerFactory -# -# def initialize(bdir) -# @basedir = bdir -# @loggers = {} -# end -# -# def get_logger(name) -# if !@loggers.has_key? name -# # make the filename safe, then declare it to be so -# fname = name.gsub(/[.\/\\\:]/, "_") -# @loggers[name] = Logger.new(name, @basedir + "/" + fname) -# end -# return @loggers[name] -# end -# -# end -# -# FRONT_OBJECT=LoggerFactory.new("/tmp/dlog") -# -# DRb.start_service(URI, FRONT_OBJECT) -# DRb.thread.join -# -# ==== Client code -# -# require 'drb/drb' -# -# SERVER_URI="druby://localhost:8787" -# -# DRb.start_service -# -# log_service=DRbObject.new_with_uri(SERVER_URI) -# -# ["loga", "logb", "logc"].each do |logname| -# -# logger=log_service.get_logger(logname) -# -# logger.log("Hello, world!") -# logger.log("Goodbye, world!") -# logger.log("=== EOT ===") -# -# end -# -# == Security -# -# As with all network services, security needs to be considered when -# using dRuby. By allowing external access to a Ruby object, you are -# not only allowing outside clients to call the methods you have -# defined for that object, but by default to execute arbitrary Ruby -# code on your server. Consider the following: -# -# # !!! UNSAFE CODE !!! -# ro = DRbObject::new_with_uri("druby://your.server.com:8989") -# class << ro -# undef :instance_eval # force call to be passed to remote object -# end -# ro.instance_eval("`rm -rf *`") -# -# The dangers posed by instance_eval and friends are such that a -# DRbServer should only be used when clients are trusted. -# -# A DRbServer can be configured with an access control list to -# selectively allow or deny access from specified IP addresses. The -# main druby distribution provides the ACL class for this purpose. In -# general, this mechanism should only be used alongside, rather than -# as a replacement for, a good firewall. -# -# == dRuby internals -# -# dRuby is implemented using three main components: a remote method -# call marshaller/unmarshaller; a transport protocol; and an -# ID-to-object mapper. The latter two can be directly, and the first -# indirectly, replaced, in order to provide different behaviour and -# capabilities. -# -# Marshalling and unmarshalling of remote method calls is performed by -# a DRb::DRbMessage instance. This uses the Marshal module to dump -# the method call before sending it over the transport layer, then -# reconstitute it at the other end. There is normally no need to -# replace this component, and no direct way is provided to do so. -# However, it is possible to implement an alternative marshalling -# scheme as part of an implementation of the transport layer. -# -# The transport layer is responsible for opening client and server -# network connections and forwarding dRuby request across them. -# Normally, it uses DRb::DRbMessage internally to manage marshalling -# and unmarshalling. The transport layer is managed by -# DRb::DRbProtocol. Multiple protocols can be installed in -# DRbProtocol at the one time; selection between them is determined by -# the scheme of a dRuby URI. The default transport protocol is -# selected by the scheme 'druby:', and implemented by -# DRb::DRbTCPSocket. This uses plain TCP/IP sockets for -# communication. An alternative protocol, using UNIX domain sockets, -# is implemented by DRb::DRbUNIXSocket in the file drb/unix.rb, and -# selected by the scheme 'drbunix:'. A sample implementation over -# HTTP can be found in the samples accompanying the main dRuby -# distribution. -# -# The ID-to-object mapping component maps dRuby object ids to the -# objects they refer to, and vice versa. The implementation to use -# can be specified as part of a DRb::DRbServer's configuration. The -# default implementation is provided by DRb::DRbIdConv. It uses an -# object's ObjectSpace id as its dRuby id. This means that the dRuby -# reference to that object only remains meaningful for the lifetime of -# the object's process and the lifetime of the object within that -# process. A modified implementation is provided by DRb::TimerIdConv -# in the file drb/timeridconv.rb. This implementation retains a local -# reference to all objects exported over dRuby for a configurable -# period of time (defaulting to ten minutes), to prevent them being -# garbage-collected within this time. Another sample implementation -# is provided in sample/name.rb in the main dRuby distribution. This -# allows objects to specify their own id or "name". A dRuby reference -# can be made persistent across processes by having each process -# register an object using the same dRuby name. -# -module DRb - - # Superclass of all errors raised in the DRb module. - class DRbError < RuntimeError; end - - # Error raised when an error occurs on the underlying communication - # protocol. - class DRbConnError < DRbError; end - - class DRbObjectSpace # :nodoc: - # This is an internal class for DRbIdConv. This must not be used - # by users. - - include MonitorMixin - - def initialize - super() - @map = ObjectSpace::WeakMap.new - end - - def to_id(obj) - synchronize do - @map[obj.__id__] = obj - obj.__id__ - end - end - - def to_obj(ref) - synchronize do - obj = @map[ref] - raise RangeError.new("invalid reference") unless obj.__id__ == ref - obj - end - end - end - - # :nodoc: - # - # This is an internal singleton instance. This must not be used - # by users. - DRB_OBJECT_SPACE = DRbObjectSpace.new - - # Class responsible for converting between an object and its id. - # - # This, the default implementation, uses an object's local ObjectSpace - # __id__ as its id. This means that an object's identification over - # drb remains valid only while that object instance remains alive - # within the server runtime. - # - # For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb - # and DRbNameIdConv in sample/name.rb in the full drb distribution. - class DRbIdConv - - # Convert an object reference id to an object. - # - # This implementation looks up the reference id in the local object - # space and returns the object it refers to. - def to_obj(ref) - DRB_OBJECT_SPACE.to_obj(ref) - end - - # Convert an object into a reference id. - # - # This implementation returns the object's __id__ in the local - # object space. - def to_id(obj) - (nil == obj) ? nil : DRB_OBJECT_SPACE.to_id(obj) - end - end - - # Mixin module making an object undumpable or unmarshallable. - # - # If an object which includes this module is returned by method - # called over drb, then the object remains in the server space - # and a reference to the object is returned, rather than the - # object being marshalled and moved into the client space. - module DRbUndumped - def _dump(dummy) # :nodoc: - raise TypeError, 'can\'t dump' - end - end - - # Error raised by the DRb module when an attempt is made to refer to - # the context's current drb server but the context does not have one. - # See #current_server. - class DRbServerNotFound < DRbError; end - - # Error raised by the DRbProtocol module when it cannot find any - # protocol implementation support the scheme specified in a URI. - class DRbBadURI < DRbError; end - - # Error raised by a dRuby protocol when it doesn't support the - # scheme specified in a URI. See DRb::DRbProtocol. - class DRbBadScheme < DRbError; end - - # An exception wrapping a DRb::DRbUnknown object - class DRbUnknownError < DRbError - - # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ - def initialize(unknown) - @unknown = unknown - super(unknown.name) - end - - # Get the wrapped DRb::DRbUnknown object. - attr_reader :unknown - - def self._load(s) # :nodoc: - Marshal::load(s) - end - - def _dump(lv) # :nodoc: - Marshal::dump(@unknown) - end - end - - # An exception wrapping an error object - class DRbRemoteError < DRbError - - # Creates a new remote error that wraps the Exception +error+ - def initialize(error) - @reason = error.class.to_s - super("#{error.message} (#{error.class})") - set_backtrace(error.backtrace) - end - - # the class of the error, as a string. - attr_reader :reason - end - - # Class wrapping a marshalled object whose type is unknown locally. - # - # If an object is returned by a method invoked over drb, but the - # class of the object is unknown in the client namespace, or - # the object is a constant unknown in the client namespace, then - # the still-marshalled object is returned wrapped in a DRbUnknown instance. - # - # If this object is passed as an argument to a method invoked over - # drb, then the wrapped object is passed instead. - # - # The class or constant name of the object can be read from the - # +name+ attribute. The marshalled object is held in the +buf+ - # attribute. - class DRbUnknown - - # Create a new DRbUnknown object. - # - # +buf+ is a string containing a marshalled object that could not - # be unmarshalled. +err+ is the error message that was raised - # when the unmarshalling failed. It is used to determine the - # name of the unmarshalled object. - def initialize(err, buf) - case err.to_s - when /uninitialized constant (\S+)/ - @name = $1 - when /undefined class\/module (\S+)/ - @name = $1 - else - @name = nil - end - @buf = buf - end - - # The name of the unknown thing. - # - # Class name for unknown objects; variable name for unknown - # constants. - attr_reader :name - - # Buffer contained the marshalled, unknown object. - attr_reader :buf - - def self._load(s) # :nodoc: - begin - Marshal::load(s) - rescue NameError, ArgumentError - DRbUnknown.new($!, s) - end - end - - def _dump(lv) # :nodoc: - @buf - end - - # Attempt to load the wrapped marshalled object again. - # - # If the class of the object is now known locally, the object - # will be unmarshalled and returned. Otherwise, a new - # but identical DRbUnknown object will be returned. - def reload - self.class._load(@buf) - end - - # Create a DRbUnknownError exception containing this object. - def exception - DRbUnknownError.new(self) - end - end - - # An Array wrapper that can be sent to another server via DRb. - # - # All entries in the array will be dumped or be references that point to - # the local server. - - class DRbArray - - # Creates a new DRbArray that either dumps or wraps all the items in the - # Array +ary+ so they can be loaded by a remote DRb server. - - def initialize(ary) - @ary = ary.collect { |obj| - if obj.kind_of? DRbUndumped - DRbObject.new(obj) - else - begin - Marshal.dump(obj) - obj - rescue - DRbObject.new(obj) - end - end - } - end - - def self._load(s) # :nodoc: - Marshal::load(s) - end - - def _dump(lv) # :nodoc: - Marshal.dump(@ary) - end - end - - # Handler for sending and receiving drb messages. - # - # This takes care of the low-level marshalling and unmarshalling - # of drb requests and responses sent over the wire between server - # and client. This relieves the implementor of a new drb - # protocol layer with having to deal with these details. - # - # The user does not have to directly deal with this object in - # normal use. - class DRbMessage - def initialize(config) # :nodoc: - @load_limit = config[:load_limit] - @argc_limit = config[:argc_limit] - end - - def dump(obj, error=false) # :nodoc: - case obj - when DRbUndumped - obj = make_proxy(obj, error) - when Object - # nothing - else - obj = make_proxy(obj, error) - end - begin - str = Marshal::dump(obj) - rescue - str = Marshal::dump(make_proxy(obj, error)) - end - [str.size].pack('N') + str - end - - def load(soc) # :nodoc: - begin - sz = soc.read(4) # sizeof (N) - rescue - raise(DRbConnError, $!.message, $!.backtrace) - end - raise(DRbConnError, 'connection closed') if sz.nil? - raise(DRbConnError, 'premature header') if sz.size < 4 - sz = sz.unpack('N')[0] - raise(DRbConnError, "too large packet #{sz}") if @load_limit < sz - begin - str = soc.read(sz) - rescue - raise(DRbConnError, $!.message, $!.backtrace) - end - raise(DRbConnError, 'connection closed') if str.nil? - raise(DRbConnError, 'premature marshal format(can\'t read)') if str.size < sz - DRb.mutex.synchronize do - begin - Marshal::load(str) - rescue NameError, ArgumentError - DRbUnknown.new($!, str) - end - end - end - - def send_request(stream, ref, msg_id, arg, b) # :nodoc: - ary = [] - ary.push(dump(ref.__drbref)) - ary.push(dump(msg_id.id2name)) - ary.push(dump(arg.length)) - arg.each do |e| - ary.push(dump(e)) - end - ary.push(dump(b)) - stream.write(ary.join('')) - rescue - raise(DRbConnError, $!.message, $!.backtrace) - end - - def recv_request(stream) # :nodoc: - ref = load(stream) - ro = DRb.to_obj(ref) - msg = load(stream) - argc = load(stream) - raise(DRbConnError, "too many arguments") if @argc_limit < argc - argv = Array.new(argc, nil) - argc.times do |n| - argv[n] = load(stream) - end - block = load(stream) - return ro, msg, argv, block - end - - def send_reply(stream, succ, result) # :nodoc: - stream.write(dump(succ) + dump(result, !succ)) - rescue - raise(DRbConnError, $!.message, $!.backtrace) - end - - def recv_reply(stream) # :nodoc: - succ = load(stream) - result = load(stream) - [succ, result] - end - - private - def make_proxy(obj, error=false) # :nodoc: - if error - DRbRemoteError.new(obj) - else - DRbObject.new(obj) - end - end - end - - # Module managing the underlying network protocol(s) used by drb. - # - # By default, drb uses the DRbTCPSocket protocol. Other protocols - # can be defined. A protocol must define the following class methods: - # - # [open(uri, config)] Open a client connection to the server at +uri+, - # using configuration +config+. Return a protocol - # instance for this connection. - # [open_server(uri, config)] Open a server listening at +uri+, - # using configuration +config+. Return a - # protocol instance for this listener. - # [uri_option(uri, config)] Take a URI, possibly containing an option - # component (e.g. a trailing '?param=val'), - # and return a [uri, option] tuple. - # - # All of these methods should raise a DRbBadScheme error if the URI - # does not identify the protocol they support (e.g. "druby:" for - # the standard Ruby protocol). This is how the DRbProtocol module, - # given a URI, determines which protocol implementation serves that - # protocol. - # - # The protocol instance returned by #open_server must have the - # following methods: - # - # [accept] Accept a new connection to the server. Returns a protocol - # instance capable of communicating with the client. - # [close] Close the server connection. - # [uri] Get the URI for this server. - # - # The protocol instance returned by #open must have the following methods: - # - # [send_request (ref, msg_id, arg, b)] - # Send a request to +ref+ with the given message id and arguments. - # This is most easily implemented by calling DRbMessage.send_request, - # providing a stream that sits on top of the current protocol. - # [recv_reply] - # Receive a reply from the server and return it as a [success-boolean, - # reply-value] pair. This is most easily implemented by calling - # DRb.recv_reply, providing a stream that sits on top of the - # current protocol. - # [alive?] - # Is this connection still alive? - # [close] - # Close this connection. - # - # The protocol instance returned by #open_server().accept() must have - # the following methods: - # - # [recv_request] - # Receive a request from the client and return a [object, message, - # args, block] tuple. This is most easily implemented by calling - # DRbMessage.recv_request, providing a stream that sits on top of - # the current protocol. - # [send_reply(succ, result)] - # Send a reply to the client. This is most easily implemented - # by calling DRbMessage.send_reply, providing a stream that sits - # on top of the current protocol. - # [close] - # Close this connection. - # - # A new protocol is registered with the DRbProtocol module using - # the add_protocol method. - # - # For examples of other protocols, see DRbUNIXSocket in drb/unix.rb, - # and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full - # drb distribution. - module DRbProtocol - - # Add a new protocol to the DRbProtocol module. - def add_protocol(prot) - @protocol.push(prot) - end - module_function :add_protocol - - # Open a client connection to +uri+ with the configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. If a protocol accepts the - # URI, but an error occurs in opening it, a DRbConnError is raised. - def open(uri, config, first=true) - @protocol.each do |prot| - begin - return prot.open(uri, config) - rescue DRbBadScheme - rescue DRbConnError - raise($!) - rescue - raise(DRbConnError, "#{uri} - #{$!.inspect}") - end - end - if first && (config[:auto_load] != false) - auto_load(uri) - return open(uri, config, false) - end - raise DRbBadURI, 'can\'t parse uri:' + uri - end - module_function :open - - # Open a server listening for connections at +uri+ with - # configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open a server at the URI. Each protocol signals that it does - # not handle that URI by raising a DRbBadScheme error. If no protocol - # recognises the URI, then a DRbBadURI error is raised. If a protocol - # accepts the URI, but an error occurs in opening it, the underlying - # error is passed on to the caller. - def open_server(uri, config, first=true) - @protocol.each do |prot| - begin - return prot.open_server(uri, config) - rescue DRbBadScheme - end - end - if first && (config[:auto_load] != false) - auto_load(uri) - return open_server(uri, config, false) - end - raise DRbBadURI, 'can\'t parse uri:' + uri - end - module_function :open_server - - # Parse +uri+ into a [uri, option] pair. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to parse the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. - def uri_option(uri, config, first=true) - @protocol.each do |prot| - begin - uri, opt = prot.uri_option(uri, config) - # opt = nil if opt == '' - return uri, opt - rescue DRbBadScheme - end - end - if first && (config[:auto_load] != false) - auto_load(uri) - return uri_option(uri, config, false) - end - raise DRbBadURI, 'can\'t parse uri:' + uri - end - module_function :uri_option - - def auto_load(uri) # :nodoc: - if /\Adrb([a-z0-9]+):/ =~ uri - require("drb/#{$1}") rescue nil - end - end - module_function :auto_load - end - - # The default drb protocol which communicates over a TCP socket. - # - # The DRb TCP protocol URI looks like: - # druby://:?. The option is optional. - - class DRbTCPSocket - # :stopdoc: - private - def self.parse_uri(uri) - if /\Adruby:\/\/(.*?):(\d+)(\?(.*))?\z/ =~ uri - host = $1 - port = $2.to_i - option = $4 - [host, port, option] - else - raise(DRbBadScheme, uri) unless uri.start_with?('druby:') - raise(DRbBadURI, 'can\'t parse uri:' + uri) - end - end - - public - - # Open a client connection to +uri+ (DRb URI string) using configuration - # +config+. - # - # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a - # recognized protocol. See DRb::DRbServer.new for information on built-in - # URI protocols. - def self.open(uri, config) - host, port, = parse_uri(uri) - soc = TCPSocket.open(host, port) - self.new(uri, soc, config) - end - - # Returns the hostname of this server - def self.getservername - host = Socket::gethostname - begin - Socket::getaddrinfo(host, nil, - Socket::AF_UNSPEC, - Socket::SOCK_STREAM, - 0, - Socket::AI_PASSIVE)[0][3] - rescue - 'localhost' - end - end - - # For the families available for +host+, returns a TCPServer on +port+. - # If +port+ is 0 the first available port is used. IPv4 servers are - # preferred over IPv6 servers. - def self.open_server_inaddr_any(host, port) - infos = Socket::getaddrinfo(host, nil, - Socket::AF_UNSPEC, - Socket::SOCK_STREAM, - 0, - Socket::AI_PASSIVE) - families = Hash[*infos.collect { |af, *_| af }.uniq.zip([]).flatten] - return TCPServer.open('0.0.0.0', port) if families.has_key?('AF_INET') - return TCPServer.open('::', port) if families.has_key?('AF_INET6') - return TCPServer.open(port) - # :stopdoc: - end - - # Open a server listening for connections at +uri+ using - # configuration +config+. - def self.open_server(uri, config) - uri = 'druby://:0' unless uri - host, port, _ = parse_uri(uri) - config = {:tcp_original_host => host}.update(config) - if host.size == 0 - host = getservername - soc = open_server_inaddr_any(host, port) - else - soc = TCPServer.open(host, port) - end - port = soc.addr[1] if port == 0 - config[:tcp_port] = port - uri = "druby://#{host}:#{port}" - self.new(uri, soc, config) - end - - # Parse +uri+ into a [uri, option] pair. - def self.uri_option(uri, config) - host, port, option = parse_uri(uri) - return "druby://#{host}:#{port}", option - end - - # Create a new DRbTCPSocket instance. - # - # +uri+ is the URI we are connected to. - # +soc+ is the tcp socket we are bound to. +config+ is our - # configuration. - def initialize(uri, soc, config={}) - @uri = uri - @socket = soc - @config = config - @acl = config[:tcp_acl] - @msg = DRbMessage.new(config) - set_sockopt(@socket) - @shutdown_pipe_r, @shutdown_pipe_w = IO.pipe - end - - # Get the URI that we are connected to. - attr_reader :uri - - # Get the address of our TCP peer (the other end of the socket - # we are bound to. - def peeraddr - @socket.peeraddr - end - - # Get the socket. - def stream; @socket; end - - # On the client side, send a request to the server. - def send_request(ref, msg_id, arg, b) - @msg.send_request(stream, ref, msg_id, arg, b) - end - - # On the server side, receive a request from the client. - def recv_request - @msg.recv_request(stream) - end - - # On the server side, send a reply to the client. - def send_reply(succ, result) - @msg.send_reply(stream, succ, result) - end - - # On the client side, receive a reply from the server. - def recv_reply - @msg.recv_reply(stream) - end - - public - - # Close the connection. - # - # If this is an instance returned by #open_server, then this stops - # listening for new connections altogether. If this is an instance - # returned by #open or by #accept, then it closes this particular - # client-server session. - def close - shutdown - if @socket - @socket.close - @socket = nil - end - close_shutdown_pipe - end - - def close_shutdown_pipe - @shutdown_pipe_w.close - @shutdown_pipe_r.close - end - private :close_shutdown_pipe - - # On the server side, for an instance returned by #open_server, - # accept a client connection and return a new instance to handle - # the server's side of this client-server session. - def accept - while true - s = accept_or_shutdown - return nil unless s - break if (@acl ? @acl.allow_socket?(s) : true) - s.close - end - if @config[:tcp_original_host].to_s.size == 0 - uri = "druby://#{s.addr[3]}:#{@config[:tcp_port]}" - else - uri = @uri - end - self.class.new(uri, s, @config) - end - - def accept_or_shutdown - readables, = IO.select([@socket, @shutdown_pipe_r]) - if readables.include? @shutdown_pipe_r - return nil - end - @socket.accept - end - private :accept_or_shutdown - - # Graceful shutdown - def shutdown - @shutdown_pipe_w.close - end - - # Check to see if this connection is alive. - def alive? - return false unless @socket - if @socket.to_io.wait_readable(0) - close - return false - end - true - end - - def set_sockopt(soc) # :nodoc: - soc.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) - rescue IOError, Errno::ECONNRESET, Errno::EINVAL - # closed/shutdown socket, ignore error - end - end - - module DRbProtocol - @protocol = [DRbTCPSocket] # default - end - - class DRbURIOption # :nodoc: I don't understand the purpose of this class... - def initialize(option) - @option = option.to_s - end - attr_reader :option - def to_s; @option; end - - def ==(other) - return false unless DRbURIOption === other - @option == other.option - end - - def hash - @option.hash - end - - alias eql? == - end - - # Object wrapping a reference to a remote drb object. - # - # Method calls on this object are relayed to the remote - # object that this object is a stub for. - class DRbObject - - # Unmarshall a marshalled DRbObject. - # - # If the referenced object is located within the local server, then - # the object itself is returned. Otherwise, a new DRbObject is - # created to act as a stub for the remote referenced object. - def self._load(s) - uri, ref = Marshal.load(s) - - if DRb.here?(uri) - obj = DRb.to_obj(ref) - return obj - end - - self.new_with(uri, ref) - end - - # Creates a DRb::DRbObject given the reference information to the remote - # host +uri+ and object +ref+. - - def self.new_with(uri, ref) - it = self.allocate - it.instance_variable_set(:@uri, uri) - it.instance_variable_set(:@ref, ref) - it - end - - # Create a new DRbObject from a URI alone. - def self.new_with_uri(uri) - self.new(nil, uri) - end - - # Marshall this object. - # - # The URI and ref of the object are marshalled. - def _dump(lv) - Marshal.dump([@uri, @ref]) - end - - # Create a new remote object stub. - # - # +obj+ is the (local) object we want to create a stub for. Normally - # this is +nil+. +uri+ is the URI of the remote object that this - # will be a stub for. - def initialize(obj, uri=nil) - @uri = nil - @ref = nil - case obj - when Object - is_nil = obj.nil? - when BasicObject - is_nil = false - end - - if is_nil - return if uri.nil? - @uri, option = DRbProtocol.uri_option(uri, DRb.config) - @ref = DRbURIOption.new(option) unless option.nil? - else - @uri = uri ? uri : (DRb.uri rescue nil) - @ref = obj ? DRb.to_id(obj) : nil - end - end - - # Get the URI of the remote object. - def __drburi - @uri - end - - # Get the reference of the object, if local. - def __drbref - @ref - end - - undef :to_s - undef :to_a if respond_to?(:to_a) - - # Routes respond_to? to the referenced remote object. - def respond_to?(msg_id, priv=false) - case msg_id - when :_dump - true - when :marshal_dump - false - else - method_missing(:respond_to?, msg_id, priv) - end - end - - # Routes method calls to the referenced remote object. - ruby2_keywords def method_missing(msg_id, *a, &b) - if DRb.here?(@uri) - obj = DRb.to_obj(@ref) - DRb.current_server.check_insecure_method(obj, msg_id) - return obj.__send__(msg_id, *a, &b) - end - - succ, result = self.class.with_friend(@uri) do - DRbConn.open(@uri) do |conn| - conn.send_message(self, msg_id, a, b) - end - end - - if succ - return result - elsif DRbUnknown === result - raise result - else - bt = self.class.prepare_backtrace(@uri, result) - result.set_backtrace(bt + caller) - raise result - end - end - - # Given the +uri+ of another host executes the block provided. - def self.with_friend(uri) # :nodoc: - friend = DRb.fetch_server(uri) - return yield() unless friend - - save = Thread.current['DRb'] - Thread.current['DRb'] = { 'server' => friend } - return yield - ensure - Thread.current['DRb'] = save if friend - end - - # Returns a modified backtrace from +result+ with the +uri+ where each call - # in the backtrace came from. - def self.prepare_backtrace(uri, result) # :nodoc: - prefix = "(#{uri}) " - bt = [] - result.backtrace.each do |x| - break if /[`']__send__'$/ =~ x - if /\A\(druby:\/\// =~ x - bt.push(x) - else - bt.push(prefix + x) - end - end - bt - end - - def pretty_print(q) # :nodoc: - q.pp_object(self) - end - - def pretty_print_cycle(q) # :nodoc: - q.object_address_group(self) { - q.breakable - q.text '...' - } - end - end - - class ThreadObject - include MonitorMixin - - def initialize(&blk) - super() - @wait_ev = new_cond - @req_ev = new_cond - @res_ev = new_cond - @status = :wait - @req = nil - @res = nil - @thread = Thread.new(self, &blk) - end - - def alive? - @thread.alive? - end - - def kill - @thread.kill - @thread.join - end - - def method_missing(msg, *arg, &blk) - synchronize do - @wait_ev.wait_until { @status == :wait } - @req = [msg] + arg - @status = :req - @req_ev.broadcast - @res_ev.wait_until { @status == :res } - value = @res - @req = @res = nil - @status = :wait - @wait_ev.broadcast - return value - end - end - - def _execute() - synchronize do - @req_ev.wait_until { @status == :req } - @res = yield(@req) - @status = :res - @res_ev.signal - end - end - end - - # Class handling the connection between a DRbObject and the - # server the real object lives on. - # - # This class maintains a pool of connections, to reduce the - # overhead of starting and closing down connections for each - # method call. - # - # This class is used internally by DRbObject. The user does - # not normally need to deal with it directly. - class DRbConn - POOL_SIZE = 16 # :nodoc: - - def self.make_pool - ThreadObject.new do |queue| - pool = [] - while true - queue._execute do |message| - case(message[0]) - when :take then - remote_uri = message[1] - conn = nil - new_pool = [] - pool.each do |c| - if conn.nil? and c.uri == remote_uri - conn = c if c.alive? - else - new_pool.push c - end - end - pool = new_pool - conn - when :store then - conn = message[1] - pool.unshift(conn) - pool.pop.close while pool.size > POOL_SIZE - conn - else - nil - end - end - end - end - end - @pool_proxy = nil - - def self.stop_pool - @pool_proxy&.kill - @pool_proxy = nil - end - - def self.open(remote_uri) # :nodoc: - begin - @pool_proxy = make_pool unless @pool_proxy&.alive? - - conn = @pool_proxy.take(remote_uri) - conn = self.new(remote_uri) unless conn - succ, result = yield(conn) - return succ, result - - ensure - if conn - if succ - @pool_proxy.store(conn) - else - conn.close - end - end - end - end - - def initialize(remote_uri) # :nodoc: - @uri = remote_uri - @protocol = DRbProtocol.open(remote_uri, DRb.config) - end - attr_reader :uri # :nodoc: - - def send_message(ref, msg_id, arg, block) # :nodoc: - @protocol.send_request(ref, msg_id, arg, block) - @protocol.recv_reply - end - - def close # :nodoc: - @protocol.close - @protocol = nil - end - - def alive? # :nodoc: - return false unless @protocol - @protocol.alive? - end - end - - # Class representing a drb server instance. - # - # A DRbServer must be running in the local process before any incoming - # dRuby calls can be accepted, or any local objects can be passed as - # dRuby references to remote processes, even if those local objects are - # never actually called remotely. You do not need to start a DRbServer - # in the local process if you are only making outgoing dRuby calls - # passing marshalled parameters. - # - # Unless multiple servers are being used, the local DRbServer is normally - # started by calling DRb.start_service. - class DRbServer - @@acl = nil - @@idconv = DRbIdConv.new - @@secondary_server = nil - @@argc_limit = 256 - @@load_limit = 0xffffffff - @@verbose = false - - # Set the default value for the :argc_limit option. - # - # See #new(). The initial default value is 256. - def self.default_argc_limit(argc) - @@argc_limit = argc - end - - # Set the default value for the :load_limit option. - # - # See #new(). The initial default value is 25 MB. - def self.default_load_limit(sz) - @@load_limit = sz - end - - # Set the default access control list to +acl+. The default ACL is +nil+. - # - # See also DRb::ACL and #new() - def self.default_acl(acl) - @@acl = acl - end - - # Set the default value for the :id_conv option. - # - # See #new(). The initial default value is a DRbIdConv instance. - def self.default_id_conv(idconv) - @@idconv = idconv - end - - # Set the default value of the :verbose option. - # - # See #new(). The initial default value is false. - def self.verbose=(on) - @@verbose = on - end - - # Get the default value of the :verbose option. - def self.verbose - @@verbose - end - - def self.make_config(hash={}) # :nodoc: - default_config = { - :idconv => @@idconv, - :verbose => @@verbose, - :tcp_acl => @@acl, - :load_limit => @@load_limit, - :argc_limit => @@argc_limit, - } - default_config.update(hash) - end - - # Create a new DRbServer instance. - # - # +uri+ is the URI to bind to. This is normally of the form - # 'druby://:' where is a hostname of - # the local machine. If nil, then the system's default hostname - # will be bound to, on a port selected by the system; these value - # can be retrieved from the +uri+ attribute. 'druby:' specifies - # the default dRuby transport protocol: another protocol, such - # as 'drbunix:', can be specified instead. - # - # +front+ is the front object for the server, that is, the object - # to which remote method calls on the server will be passed. If - # nil, then the server will not accept remote method calls. - # - # If +config_or_acl+ is a hash, it is the configuration to - # use for this server. The following options are recognised: - # - # :idconv :: an id-to-object conversion object. This defaults - # to an instance of the class DRb::DRbIdConv. - # :verbose :: if true, all unsuccessful remote calls on objects - # in the server will be logged to $stdout. false - # by default. - # :tcp_acl :: the access control list for this server. See - # the ACL class from the main dRuby distribution. - # :load_limit :: the maximum message size in bytes accepted by - # the server. Defaults to 25 MB (26214400). - # :argc_limit :: the maximum number of arguments to a remote - # method accepted by the server. Defaults to - # 256. - # The default values of these options can be modified on - # a class-wide basis by the class methods #default_argc_limit, - # #default_load_limit, #default_acl, #default_id_conv, - # and #verbose= - # - # If +config_or_acl+ is not a hash, but is not nil, it is - # assumed to be the access control list for this server. - # See the :tcp_acl option for more details. - # - # If no other server is currently set as the primary server, - # this will become the primary server. - # - # The server will immediately start running in its own thread. - def initialize(uri=nil, front=nil, config_or_acl=nil) - if Hash === config_or_acl - config = config_or_acl.dup - else - acl = config_or_acl || @@acl - config = { - :tcp_acl => acl - } - end - - @config = self.class.make_config(config) - - @protocol = DRbProtocol.open_server(uri, @config) - @uri = @protocol.uri - @exported_uri = [@uri] - - @front = front - @idconv = @config[:idconv] - - @grp = ThreadGroup.new - @thread = run - - DRb.regist_server(self) - end - - # The URI of this DRbServer. - attr_reader :uri - - # The main thread of this DRbServer. - # - # This is the thread that listens for and accepts connections - # from clients, not that handles each client's request-response - # session. - attr_reader :thread - - # The front object of the DRbServer. - # - # This object receives remote method calls made on the server's - # URI alone, with an object id. - attr_reader :front - - # The configuration of this DRbServer - attr_reader :config - - # Set whether to operate in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - def verbose=(v); @config[:verbose]=v; end - - # Get whether the server is in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - def verbose; @config[:verbose]; end - - # Is this server alive? - def alive? - @thread.alive? - end - - # Is +uri+ the URI for this server? - def here?(uri) - @exported_uri.include?(uri) - end - - # Stop this server. - def stop_service - DRb.remove_server(self) - if Thread.current['DRb'] && Thread.current['DRb']['server'] == self - Thread.current['DRb']['stop_service'] = true - else - shutdown - end - end - - # Convert a dRuby reference to the local object it refers to. - def to_obj(ref) - return front if ref.nil? - return front[ref.to_s] if DRbURIOption === ref - @idconv.to_obj(ref) - end - - # Convert a local object to a dRuby reference. - def to_id(obj) - return nil if obj.__id__ == front.__id__ - @idconv.to_id(obj) - end - - private - - def shutdown - current = Thread.current - if @protocol.respond_to? :shutdown - @protocol.shutdown - else - [@thread, *@grp.list].each { |thread| - thread.kill unless thread == current # xxx: Thread#kill - } - end - @thread.join unless @thread == current - end - - ## - # Starts the DRb main loop in a new thread. - - def run - Thread.start do - begin - while main_loop - end - ensure - @protocol.close if @protocol - end - end - end - - # List of insecure methods. - # - # These methods are not callable via dRuby. - INSECURE_METHOD = [ - :__send__ - ] - - # Has a method been included in the list of insecure methods? - def insecure_method?(msg_id) - INSECURE_METHOD.include?(msg_id) - end - - # Coerce an object to a string, providing our own representation if - # to_s is not defined for the object. - def any_to_s(obj) - "#{obj}:#{obj.class}" - rescue - Kernel.instance_method(:to_s).bind_call(obj) - end - - # Check that a method is callable via dRuby. - # - # +obj+ is the object we want to invoke the method on. +msg_id+ is the - # method name, as a Symbol. - # - # If the method is an insecure method (see #insecure_method?) a - # SecurityError is thrown. If the method is private or undefined, - # a NameError is thrown. - def check_insecure_method(obj, msg_id) - return true if Proc === obj && msg_id == :__drb_yield - raise(ArgumentError, "#{any_to_s(msg_id)} is not a symbol") unless Symbol == msg_id.class - raise(SecurityError, "insecure method '#{msg_id}'") if insecure_method?(msg_id) - - case obj - when Object - if obj.private_methods.include?(msg_id) - desc = any_to_s(obj) - raise NoMethodError, "private method '#{msg_id}' called for #{desc}" - elsif obj.protected_methods.include?(msg_id) - desc = any_to_s(obj) - raise NoMethodError, "protected method '#{msg_id}' called for #{desc}" - else - true - end - else - if Kernel.instance_method(:private_methods).bind(obj).call.include?(msg_id) - desc = any_to_s(obj) - raise NoMethodError, "private method '#{msg_id}' called for #{desc}" - elsif Kernel.instance_method(:protected_methods).bind(obj).call.include?(msg_id) - desc = any_to_s(obj) - raise NoMethodError, "protected method '#{msg_id}' called for #{desc}" - else - true - end - end - end - public :check_insecure_method - - class InvokeMethod # :nodoc: - def initialize(drb_server, client) - @drb_server = drb_server - @client = client - end - - def perform - begin - setup_message - ensure - @result = nil - @succ = false - end - - if @block - @result = perform_with_block - else - @result = perform_without_block - end - @succ = true - case @result - when Array - if @msg_id == :to_ary - @result = DRbArray.new(@result) - end - end - return @succ, @result - rescue NoMemoryError, SystemExit, SystemStackError, SecurityError - raise - rescue Exception - @result = $! - return @succ, @result - end - - private - def init_with_client - obj, msg, argv, block = @client.recv_request - @obj = obj - @msg_id = msg.intern - @argv = argv - @block = block - end - - def check_insecure_method - @drb_server.check_insecure_method(@obj, @msg_id) - end - - def setup_message - init_with_client - check_insecure_method - end - - def block_yield(x) - if x.size == 1 && x[0].class == Array - x[0] = DRbArray.new(x[0]) - end - @block.call(*x) - end - - def perform_with_block - @obj.__send__(@msg_id, *@argv) do |*x| - jump_error = nil - begin - block_value = block_yield(x) - rescue LocalJumpError - jump_error = $! - end - if jump_error - case jump_error.reason - when :break - break(jump_error.exit_value) - else - raise jump_error - end - end - block_value - end - end - - def perform_without_block - if Proc === @obj && @msg_id == :__drb_yield - if @argv.size == 1 - ary = @argv - else - ary = [@argv] - end - ary.collect(&@obj)[0] - else - @obj.__send__(@msg_id, *@argv) - end - end - - end - - def error_print(exception) - exception.backtrace.inject(true) do |first, x| - if first - $stderr.puts "#{x}: #{exception} (#{exception.class})" - else - $stderr.puts "\tfrom #{x}" - end - false - end - end - - # The main loop performed by a DRbServer's internal thread. - # - # Accepts a connection from a client, and starts up its own - # thread to handle it. This thread loops, receiving requests - # from the client, invoking them on a local object, and - # returning responses, until the client closes the connection - # or a local method call fails. - def main_loop - client0 = @protocol.accept - return nil if !client0 - Thread.start(client0) do |client| - @grp.add Thread.current - Thread.current['DRb'] = { 'client' => client , - 'server' => self } - DRb.mutex.synchronize do - client_uri = client.uri - @exported_uri << client_uri unless @exported_uri.include?(client_uri) - end - _last_invoke_method = nil - loop do - begin - succ = false - invoke_method = InvokeMethod.new(self, client) - succ, result = invoke_method.perform - error_print(result) if !succ && verbose - unless DRbConnError === result && result.message == 'connection closed' - client.send_reply(succ, result) - end - rescue Exception => e - error_print(e) if verbose - ensure - _last_invoke_method = invoke_method - client.close unless succ - if Thread.current['DRb']['stop_service'] - shutdown - break - end - break unless succ - end - end - end - end - end - - @primary_server = nil - - # Start a dRuby server locally. - # - # The new dRuby server will become the primary server, even - # if another server is currently the primary server. - # - # +uri+ is the URI for the server to bind to. If nil, - # the server will bind to random port on the default local host - # name and use the default dRuby protocol. - # - # +front+ is the server's front object. This may be nil. - # - # +config+ is the configuration for the new server. This may - # be nil. - # - # See DRbServer::new. - def start_service(uri=nil, front=nil, config=nil) - @primary_server = DRbServer.new(uri, front, config) - end - module_function :start_service - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - attr_accessor :primary_server - module_function :primary_server=, :primary_server - - # Get the 'current' server. - # - # In the context of execution taking place within the main - # thread of a dRuby server (typically, as a result of a remote - # call on the server or one of its objects), the current - # server is that server. Otherwise, the current server is - # the primary server. - # - # If the above rule fails to find a server, a DRbServerNotFound - # error is raised. - def current_server - drb = Thread.current['DRb'] - server = (drb && drb['server']) ? drb['server'] : @primary_server - raise DRbServerNotFound unless server - return server - end - module_function :current_server - - # Stop the local dRuby server. - # - # This operates on the primary server. If there is no primary - # server currently running, it is a noop. - def stop_service - @primary_server.stop_service if @primary_server - @primary_server = nil - end - module_function :stop_service - - # Get the URI defining the local dRuby space. - # - # This is the URI of the current server. See #current_server. - def uri - drb = Thread.current['DRb'] - client = (drb && drb['client']) - if client - uri = client.uri - return uri if uri - end - current_server.uri - end - module_function :uri - - # Is +uri+ the URI for the current local server? - def here?(uri) - current_server.here?(uri) rescue false - # (current_server.uri rescue nil) == uri - end - module_function :here? - - # Get the configuration of the current server. - # - # If there is no current server, this returns the default configuration. - # See #current_server and DRbServer::make_config. - def config - current_server.config - rescue - DRbServer.make_config - end - module_function :config - - # Get the front object of the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - def front - current_server.front - end - module_function :front - - # Convert a reference into an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - def to_obj(ref) - current_server.to_obj(ref) - end - - # Get a reference id for an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - def to_id(obj) - current_server.to_id(obj) - end - module_function :to_id - module_function :to_obj - - # Get the thread of the primary server. - # - # This returns nil if there is no primary server. See #primary_server. - def thread - @primary_server ? @primary_server.thread : nil - end - module_function :thread - - # Set the default id conversion object. - # - # This is expected to be an instance such as DRb::DRbIdConv that responds to - # #to_id and #to_obj that can convert objects to and from DRb references. - # - # See DRbServer#default_id_conv. - def install_id_conv(idconv) - DRbServer.default_id_conv(idconv) - end - module_function :install_id_conv - - # Set the default ACL to +acl+. - # - # See DRb::DRbServer.default_acl. - def install_acl(acl) - DRbServer.default_acl(acl) - end - module_function :install_acl - - @mutex = Thread::Mutex.new - def mutex # :nodoc: - @mutex - end - module_function :mutex - - @server = {} - # Registers +server+ with DRb. - # - # This is called when a new DRb::DRbServer is created. - # - # If there is no primary server then +server+ becomes the primary server. - # - # Example: - # - # require 'drb' - # - # s = DRb::DRbServer.new # automatically calls regist_server - # DRb.fetch_server s.uri #=> # - def regist_server(server) - @server[server.uri] = server - mutex.synchronize do - @primary_server = server unless @primary_server - end - end - module_function :regist_server - - # Removes +server+ from the list of registered servers. - def remove_server(server) - @server.delete(server.uri) - mutex.synchronize do - if @primary_server == server - @primary_server = nil - end - end - end - module_function :remove_server - - # Retrieves the server with the given +uri+. - # - # See also regist_server and remove_server. - def fetch_server(uri) - @server[uri] - end - module_function :fetch_server -end - -# :stopdoc: -DRbObject = DRb::DRbObject -DRbUndumped = DRb::DRbUndumped -DRbIdConv = DRb::DRbIdConv diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/eq.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/eq.rb deleted file mode 100644 index 15ca5cae..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/eq.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: false -module DRb - class DRbObject # :nodoc: - def ==(other) - return false unless DRbObject === other - (@ref == other.__drbref) && (@uri == other.__drburi) - end - - def hash - [@uri, @ref].hash - end - - alias eql? == - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/extserv.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/extserv.rb deleted file mode 100644 index 9523fe84..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/extserv.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: false -=begin - external service - Copyright (c) 2000,2002 Masatoshi SEKI -=end - -require_relative 'drb' -require 'monitor' - -module DRb - class ExtServ - include MonitorMixin - include DRbUndumped - - def initialize(there, name, server=nil) - super() - @server = server || DRb::primary_server - @name = name - ro = DRbObject.new(nil, there) - synchronize do - @invoker = ro.register(name, DRbObject.new(self, @server.uri)) - end - end - attr_reader :server - - def front - DRbObject.new(nil, @server.uri) - end - - def stop_service - synchronize do - @invoker.unregister(@name) - server = @server - @server = nil - server.stop_service - true - end - end - - def alive? - @server ? @server.alive? : false - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/extservm.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/extservm.rb deleted file mode 100644 index 9333a108..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/extservm.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: false -=begin - external service manager - Copyright (c) 2000 Masatoshi SEKI -=end - -require_relative 'drb' -require 'monitor' - -module DRb - class ExtServManager - include DRbUndumped - include MonitorMixin - - @@command = {} - - def self.command - @@command - end - - def self.command=(cmd) - @@command = cmd - end - - def initialize - super() - @cond = new_cond - @servers = {} - @waiting = [] - @queue = Thread::Queue.new - @thread = invoke_thread - @uri = nil - end - attr_accessor :uri - - def service(name) - synchronize do - while true - server = @servers[name] - return server if server && server.alive? # server may be `false' - invoke_service(name) - @cond.wait - end - end - end - - def register(name, ro) - synchronize do - @servers[name] = ro - @cond.signal - end - self - end - alias regist register - - def unregister(name) - synchronize do - @servers.delete(name) - end - end - alias unregist unregister - - private - def invoke_thread - Thread.new do - while name = @queue.pop - invoke_service_command(name, @@command[name]) - end - end - end - - def invoke_service(name) - @queue.push(name) - end - - def invoke_service_command(name, command) - raise "invalid command. name: #{name}" unless command - synchronize do - return if @servers.include?(name) - @servers[name] = false - end - uri = @uri || DRb.uri - if command.respond_to? :to_ary - command = command.to_ary + [uri, name] - pid = spawn(*command) - else - pid = spawn("#{command} #{uri} #{name}") - end - th = Process.detach(pid) - th[:drb_service] = name - th - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/gw.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/gw.rb deleted file mode 100644 index 65a52547..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/gw.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: false -require_relative 'drb' -require 'monitor' - -module DRb - - # Gateway id conversion forms a gateway between different DRb protocols or - # networks. - # - # The gateway needs to install this id conversion and create servers for - # each of the protocols or networks it will be a gateway between. It then - # needs to create a server that attaches to each of these networks. For - # example: - # - # require 'drb/drb' - # require 'drb/unix' - # require 'drb/gw' - # - # DRb.install_id_conv DRb::GWIdConv.new - # gw = DRb::GW.new - # s1 = DRb::DRbServer.new 'drbunix:/path/to/gateway', gw - # s2 = DRb::DRbServer.new 'druby://example:10000', gw - # - # s1.thread.join - # s2.thread.join - # - # Each client must register services with the gateway, for example: - # - # DRb.start_service 'drbunix:', nil # an anonymous server - # gw = DRbObject.new nil, 'drbunix:/path/to/gateway' - # gw[:unix] = some_service - # DRb.thread.join - - class GWIdConv < DRbIdConv - def to_obj(ref) # :nodoc: - if Array === ref && ref[0] == :DRbObject - return DRbObject.new_with(ref[1], ref[2]) - end - super(ref) - end - end - - # The GW provides a synchronized store for participants in the gateway to - # communicate. - - class GW - include MonitorMixin - - # Creates a new GW - - def initialize - super() - @hash = {} - end - - # Retrieves +key+ from the GW - - def [](key) - synchronize do - @hash[key] - end - end - - # Stores value +v+ at +key+ in the GW - - def []=(key, v) - synchronize do - @hash[key] = v - end - end - end - - class DRbObject # :nodoc: - def self._load(s) - uri, ref = Marshal.load(s) - if DRb.uri == uri - return ref ? DRb.to_obj(ref) : DRb.front - end - - self.new_with(DRb.uri, [:DRbObject, uri, ref]) - end - - def _dump(lv) - if DRb.uri == @uri - if Array === @ref && @ref[0] == :DRbObject - Marshal.dump([@ref[1], @ref[2]]) - else - Marshal.dump([@uri, @ref]) # ?? - end - else - Marshal.dump([DRb.uri, [:DRbObject, @uri, @ref]]) - end - end - end -end - -=begin -DRb.install_id_conv(DRb::GWIdConv.new) - -front = DRb::GW.new - -s1 = DRb::DRbServer.new('drbunix:/tmp/gw_b_a', front) -s2 = DRb::DRbServer.new('drbunix:/tmp/gw_b_c', front) - -s1.thread.join -s2.thread.join -=end - -=begin -# foo.rb - -require 'drb/drb' - -class Foo - include DRbUndumped - def initialize(name, peer=nil) - @name = name - @peer = peer - end - - def ping(obj) - puts "#{@name}: ping: #{obj.inspect}" - @peer.ping(self) if @peer - end -end -=end - -=begin -# gw_a.rb -require 'drb/unix' -require 'foo' - -obj = Foo.new('a') -DRb.start_service("drbunix:/tmp/gw_a", obj) - -robj = DRbObject.new_with_uri('drbunix:/tmp/gw_b_a') -robj[:a] = obj - -DRb.thread.join -=end - -=begin -# gw_c.rb -require 'drb/unix' -require 'foo' - -foo = Foo.new('c', nil) - -DRb.start_service("drbunix:/tmp/gw_c", nil) - -robj = DRbObject.new_with_uri("drbunix:/tmp/gw_b_c") - -puts "c->b" -a = robj[:a] -sleep 2 - -a.ping(foo) - -DRb.thread.join -=end - diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/observer.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/observer.rb deleted file mode 100644 index 0fb7301e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/observer.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: false -require 'observer' - -module DRb - # The Observable module extended to DRb. See Observable for details. - module DRbObservable - include Observable - - # Notifies observers of a change in state. See also - # Observable#notify_observers - def notify_observers(*arg) - if defined? @observer_state and @observer_state - if defined? @observer_peers - @observer_peers.each do |observer, method| - begin - observer.__send__(method, *arg) - rescue - delete_observer(observer) - end - end - end - @observer_state = false - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/ssl.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/ssl.rb deleted file mode 100644 index 9ec55d36..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/ssl.rb +++ /dev/null @@ -1,354 +0,0 @@ -# frozen_string_literal: false -require 'socket' -require 'openssl' -require_relative 'drb' -require 'singleton' - -module DRb - - # The protocol for DRb over an SSL socket - # - # The URI for a DRb socket over SSL is: - # drbssl://:?. The option is optional - class DRbSSLSocket < DRbTCPSocket - - # SSLConfig handles the needed SSL information for establishing a - # DRbSSLSocket connection, including generating the X509 / RSA pair. - # - # An instance of this config can be passed to DRbSSLSocket.new, - # DRbSSLSocket.open and DRbSSLSocket.open_server - # - # See DRb::DRbSSLSocket::SSLConfig.new for more details - class SSLConfig - - # Default values for a SSLConfig instance. - # - # See DRb::DRbSSLSocket::SSLConfig.new for more details - DEFAULT = { - :SSLCertificate => nil, - :SSLPrivateKey => nil, - :SSLClientCA => nil, - :SSLCACertificatePath => nil, - :SSLCACertificateFile => nil, - :SSLTmpDhCallback => nil, - :SSLVerifyMode => ::OpenSSL::SSL::VERIFY_NONE, - :SSLVerifyDepth => nil, - :SSLVerifyCallback => nil, # custom verification - :SSLCertificateStore => nil, - # Must specify if you use auto generated certificate. - :SSLCertName => nil, # e.g. [["CN","fqdn.example.com"]] - :SSLCertComment => "Generated by Ruby/OpenSSL" - } - - # Create a new DRb::DRbSSLSocket::SSLConfig instance - # - # The DRb::DRbSSLSocket will take either a +config+ Hash or an instance - # of SSLConfig, and will setup the certificate for its session for the - # configuration. If want it to generate a generic certificate, the bare - # minimum is to provide the :SSLCertName - # - # === Config options - # - # From +config+ Hash: - # - # :SSLCertificate :: - # An instance of OpenSSL::X509::Certificate. If this is not provided, - # then a generic X509 is generated, with a correspond :SSLPrivateKey - # - # :SSLPrivateKey :: - # A private key instance, like OpenSSL::PKey::RSA. This key must be - # the key that signed the :SSLCertificate - # - # :SSLClientCA :: - # An OpenSSL::X509::Certificate, or Array of certificates that will - # used as ClientCAs in the SSL Context - # - # :SSLCACertificatePath :: - # A path to the directory of CA certificates. The certificates must - # be in PEM format. - # - # :SSLCACertificateFile :: - # A path to a CA certificate file, in PEM format. - # - # :SSLTmpDhCallback :: - # A DH callback. See OpenSSL::SSL::SSLContext.tmp_dh_callback - # - # :SSLMinVersion :: - # This is the minimum SSL version to allow. See - # OpenSSL::SSL::SSLContext#min_version=. - # - # :SSLMaxVersion :: - # This is the maximum SSL version to allow. See - # OpenSSL::SSL::SSLContext#max_version=. - # - # :SSLVerifyMode :: - # This is the SSL verification mode. See OpenSSL::SSL::VERIFY_* for - # available modes. The default is OpenSSL::SSL::VERIFY_NONE - # - # :SSLVerifyDepth :: - # Number of CA certificates to walk, when verifying a certificate - # chain. - # - # :SSLVerifyCallback :: - # A callback to be used for additional verification. See - # OpenSSL::SSL::SSLContext.verify_callback - # - # :SSLCertificateStore :: - # A OpenSSL::X509::Store used for verification of certificates - # - # :SSLCertName :: - # Issuer name for the certificate. This is required when generating - # the certificate (if :SSLCertificate and :SSLPrivateKey were not - # given). The value of this is to be an Array of pairs: - # - # [["C", "Raleigh"], ["ST","North Carolina"], - # ["CN","fqdn.example.com"]] - # - # See also OpenSSL::X509::Name - # - # :SSLCertComment :: - # A comment to be used for generating the certificate. The default is - # "Generated by Ruby/OpenSSL" - # - # - # === Example - # - # These values can be added after the fact, like a Hash. - # - # require 'drb/ssl' - # c = DRb::DRbSSLSocket::SSLConfig.new {} - # c[:SSLCertificate] = - # OpenSSL::X509::Certificate.new(File.read('mycert.crt')) - # c[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read('mycert.key')) - # c[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER - # c[:SSLCACertificatePath] = "/etc/ssl/certs/" - # c.setup_certificate - # - # or - # - # require 'drb/ssl' - # c = DRb::DRbSSLSocket::SSLConfig.new({ - # :SSLCertName => [["CN" => DRb::DRbSSLSocket.getservername]] - # }) - # c.setup_certificate - # - def initialize(config) - @config = config - @cert = config[:SSLCertificate] - @pkey = config[:SSLPrivateKey] - @ssl_ctx = nil - end - - # A convenience method to access the values like a Hash - def [](key); - @config[key] || DEFAULT[key] - end - - # Connect to IO +tcp+, with context of the current certificate - # configuration - def connect(tcp) - ssl = ::OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx) - ssl.sync = true - ssl.connect - ssl - end - - # Accept connection to IO +tcp+, with context of the current certificate - # configuration - def accept(tcp) - ssl = OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx) - ssl.sync = true - ssl.accept - ssl - end - - # Ensures that :SSLCertificate and :SSLPrivateKey have been provided - # or that a new certificate is generated with the other parameters - # provided. - def setup_certificate - if @cert && @pkey - return - end - - rsa = OpenSSL::PKey::RSA.new(2048){|p, n| - next unless self[:verbose] - case p - when 0; $stderr.putc "." # BN_generate_prime - when 1; $stderr.putc "+" # BN_generate_prime - when 2; $stderr.putc "*" # searching good prime, - # n = #of try, - # but also data from BN_generate_prime - when 3; $stderr.putc "\n" # found good prime, n==0 - p, n==1 - q, - # but also data from BN_generate_prime - else; $stderr.putc "*" # BN_generate_prime - end - } - - cert = OpenSSL::X509::Certificate.new - cert.version = 2 # This means v3 - cert.serial = 0 - name = OpenSSL::X509::Name.new(self[:SSLCertName]) - cert.subject = name - cert.issuer = name - cert.not_before = Time.now - cert.not_after = Time.now + (365*24*60*60) - cert.public_key = rsa.public_key - - ef = OpenSSL::X509::ExtensionFactory.new(nil,cert) - cert.extensions = [ - ef.create_extension("basicConstraints","CA:FALSE"), - ef.create_extension("subjectKeyIdentifier", "hash") ] - ef.issuer_certificate = cert - cert.add_extension(ef.create_extension("authorityKeyIdentifier", - "keyid:always,issuer:always")) - if comment = self[:SSLCertComment] - cert.add_extension(ef.create_extension("nsComment", comment)) - end - cert.sign(rsa, "SHA256") - - @cert = cert - @pkey = rsa - end - - # Establish the OpenSSL::SSL::SSLContext with the configuration - # parameters provided. - def setup_ssl_context - ctx = ::OpenSSL::SSL::SSLContext.new - ctx.cert = @cert - ctx.key = @pkey - ctx.min_version = self[:SSLMinVersion] - ctx.max_version = self[:SSLMaxVersion] - ctx.client_ca = self[:SSLClientCA] - ctx.ca_path = self[:SSLCACertificatePath] - ctx.ca_file = self[:SSLCACertificateFile] - ctx.tmp_dh_callback = self[:SSLTmpDhCallback] - ctx.verify_mode = self[:SSLVerifyMode] - ctx.verify_depth = self[:SSLVerifyDepth] - ctx.verify_callback = self[:SSLVerifyCallback] - ctx.cert_store = self[:SSLCertificateStore] - @ssl_ctx = ctx - end - end - - # Parse the dRuby +uri+ for an SSL connection. - # - # Expects drbssl://... - # - # Raises DRbBadScheme or DRbBadURI if +uri+ is not matching or malformed - def self.parse_uri(uri) # :nodoc: - if /\Adrbssl:\/\/(.*?):(\d+)(\?(.*))?\z/ =~ uri - host = $1 - port = $2.to_i - option = $4 - [host, port, option] - else - raise(DRbBadScheme, uri) unless uri.start_with?('drbssl:') - raise(DRbBadURI, 'can\'t parse uri:' + uri) - end - end - - # Return an DRb::DRbSSLSocket instance as a client-side connection, - # with the SSL connected. This is called from DRb::start_service or while - # connecting to a remote object: - # - # DRb.start_service 'drbssl://localhost:0', front, config - # - # +uri+ is the URI we are connected to, - # 'drbssl://localhost:0' above, +config+ is our - # configuration. Either a Hash or DRb::DRbSSLSocket::SSLConfig - def self.open(uri, config) - host, port, = parse_uri(uri) - soc = TCPSocket.open(host, port) - ssl_conf = SSLConfig::new(config) - ssl_conf.setup_ssl_context - ssl = ssl_conf.connect(soc) - self.new(uri, ssl, ssl_conf, true) - end - - # Returns a DRb::DRbSSLSocket instance as a server-side connection, with - # the SSL connected. This is called from DRb::start_service or while - # connecting to a remote object: - # - # DRb.start_service 'drbssl://localhost:0', front, config - # - # +uri+ is the URI we are connected to, - # 'drbssl://localhost:0' above, +config+ is our - # configuration. Either a Hash or DRb::DRbSSLSocket::SSLConfig - def self.open_server(uri, config) - uri = 'drbssl://:0' unless uri - host, port, = parse_uri(uri) - if host.size == 0 - host = getservername - soc = open_server_inaddr_any(host, port) - else - soc = TCPServer.open(host, port) - end - port = soc.addr[1] if port == 0 - @uri = "drbssl://#{host}:#{port}" - - ssl_conf = SSLConfig.new(config) - ssl_conf.setup_certificate - ssl_conf.setup_ssl_context - self.new(@uri, soc, ssl_conf, false) - end - - # This is a convenience method to parse +uri+ and separate out any - # additional options appended in the +uri+. - # - # Returns an option-less uri and the option => [uri,option] - # - # The +config+ is completely unused, so passing nil is sufficient. - def self.uri_option(uri, config) # :nodoc: - host, port, option = parse_uri(uri) - return "drbssl://#{host}:#{port}", option - end - - # Create a DRb::DRbSSLSocket instance. - # - # +uri+ is the URI we are connected to. - # +soc+ is the tcp socket we are bound to. - # +config+ is our configuration. Either a Hash or SSLConfig - # +is_established+ is a boolean of whether +soc+ is currently established - # - # This is called automatically based on the DRb protocol. - def initialize(uri, soc, config, is_established) - @ssl = is_established ? soc : nil - super(uri, soc.to_io, config) - end - - # Returns the SSL stream - def stream; @ssl; end # :nodoc: - - # Closes the SSL stream before closing the dRuby connection. - def close # :nodoc: - if @ssl - @ssl.close - @ssl = nil - end - super - end - - def accept # :nodoc: - begin - while true - soc = accept_or_shutdown - return nil unless soc - break if (@acl ? @acl.allow_socket?(soc) : true) - soc.close - end - begin - ssl = @config.accept(soc) - rescue Exception - soc.close - raise - end - self.class.new(uri, ssl, @config, true) - rescue OpenSSL::SSL::SSLError - warn("#{$!.message} (#{$!.class})", uplevel: 0) if @config[:verbose] - retry - end - end - end - - DRbProtocol.add_protocol(DRbSSLSocket) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/timeridconv.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/timeridconv.rb deleted file mode 100644 index 3ead98a7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/timeridconv.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: false -require_relative 'drb' -require 'monitor' - -module DRb - - # Timer id conversion keeps objects alive for a certain amount of time after - # their last access. The default time period is 600 seconds and can be - # changed upon initialization. - # - # To use TimerIdConv: - # - # DRb.install_id_conv TimerIdConv.new 60 # one minute - - class TimerIdConv < DRbIdConv - class TimerHolder2 # :nodoc: - include MonitorMixin - - class InvalidIndexError < RuntimeError; end - - def initialize(keeping=600) - super() - @sentinel = Object.new - @gc = {} - @renew = {} - @keeping = keeping - @expires = nil - end - - def add(obj) - synchronize do - rotate - key = obj.__id__ - @renew[key] = obj - invoke_keeper - return key - end - end - - def fetch(key) - synchronize do - rotate - obj = peek(key) - raise InvalidIndexError if obj == @sentinel - @renew[key] = obj # KeepIt - return obj - end - end - - private - def peek(key) - return @renew.fetch(key) { @gc.fetch(key, @sentinel) } - end - - def invoke_keeper - return if @expires - @expires = Time.now + @keeping - on_gc - end - - def on_gc - return unless Thread.main.alive? - return if @expires.nil? - Thread.new { rotate } if @expires < Time.now - ObjectSpace.define_finalizer(Object.new) {on_gc} - end - - def rotate - synchronize do - if @expires &.< Time.now - @gc = @renew # GCed - @renew = {} - @expires = @gc.empty? ? nil : Time.now + @keeping - end - end - end - end - - # Creates a new TimerIdConv which will hold objects for +keeping+ seconds. - def initialize(keeping=600) - @holder = TimerHolder2.new(keeping) - end - - def to_obj(ref) # :nodoc: - return super if ref.nil? - @holder.fetch(ref) - rescue TimerHolder2::InvalidIndexError - raise "invalid reference" - end - - def to_id(obj) # :nodoc: - return @holder.add(obj) - end - end -end - -# DRb.install_id_conv(TimerIdConv.new) diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/unix.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/unix.rb deleted file mode 100644 index 1e371ccf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/unix.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: false -require 'socket' -require_relative 'drb' -require 'tmpdir' - -raise(LoadError, "UNIXServer is required") unless defined?(UNIXServer) - -module DRb - - # Implements DRb over a UNIX socket - # - # DRb UNIX socket URIs look like drbunix:?. The - # option is optional. - - class DRbUNIXSocket < DRbTCPSocket - # :stopdoc: - def self.parse_uri(uri) - if /\Adrbunix:(.*?)(\?(.*))?\z/ =~ uri - filename = $1 - option = $3 - [filename, option] - else - raise(DRbBadScheme, uri) unless uri.start_with?('drbunix:') - raise(DRbBadURI, 'can\'t parse uri:' + uri) - end - end - - def self.open(uri, config) - filename, = parse_uri(uri) - soc = UNIXSocket.open(filename) - self.new(uri, soc, config) - end - - def self.open_server(uri, config) - filename, = parse_uri(uri) - if filename.size == 0 - soc = temp_server - filename = soc.path - uri = 'drbunix:' + soc.path - else - soc = UNIXServer.open(filename) - end - owner = config[:UNIXFileOwner] - group = config[:UNIXFileGroup] - if owner || group - require 'etc' - owner = Etc.getpwnam( owner ).uid if owner - group = Etc.getgrnam( group ).gid if group - File.chown owner, group, filename - end - mode = config[:UNIXFileMode] - File.chmod(mode, filename) if mode - - self.new(uri, soc, config, true) - end - - def self.uri_option(uri, config) - filename, option = parse_uri(uri) - return "drbunix:#{filename}", option - end - - def initialize(uri, soc, config={}, server_mode = false) - super(uri, soc, config) - set_sockopt(@socket) - @server_mode = server_mode - @acl = nil - end - - # import from tempfile.rb - Max_try = 10 - private - def self.temp_server - tmpdir = Dir::tmpdir - n = 0 - while true - begin - tmpname = sprintf('%s/druby%d.%d', tmpdir, $$, n) - lock = tmpname + '.lock' - unless File.exist?(tmpname) or File.exist?(lock) - Dir.mkdir(lock) - break - end - rescue - raise "cannot generate tempfile '%s'" % tmpname if n >= Max_try - #sleep(1) - end - n += 1 - end - soc = UNIXServer.new(tmpname) - Dir.rmdir(lock) - soc - end - - public - def close - return unless @socket - shutdown # DRbProtocol#shutdown - path = @socket.path if @server_mode - @socket.close - File.unlink(path) if @server_mode - @socket = nil - close_shutdown_pipe - end - - def accept - s = accept_or_shutdown - return nil unless s - self.class.new(nil, s, @config) - end - - def set_sockopt(soc) - # no-op for now - end - end - - DRbProtocol.add_protocol(DRbUNIXSocket) - # :startdoc: -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/version.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/version.rb deleted file mode 100644 index 176ea4c4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module DRb - VERSION = "2.2.3" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/weakidconv.rb b/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/weakidconv.rb deleted file mode 100644 index 951af8a8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/drb-2.2.3/lib/drb/weakidconv.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: false -require_relative 'drb' - -module DRb - - # DRb::WeakIdConv is deprecated since 2.2.1. You don't need to use - # DRb::WeakIdConv instead of DRb::DRbIdConv. It's the same class. - # - # This file still exists for backward compatibility. - # - # To use WeakIdConv: - # - # DRb.start_service(nil, nil, {:idconv => DRb::WeakIdConv.new}) - - def self.const_missing(name) # :nodoc: - case name - when :WeakIdConv - warn("DRb::WeakIdConv is deprecated. " + - "You can use the DRb::DRbIdConv. " + - "You don't need to use this.", - uplevel: 1) - const_set(:WeakIdConv, DRbIdConv) - singleton_class.remove_method(:const_missing) - DRbIdConv - else - super - end - end -end - -# DRb.install_id_conv(WeakIdConv.new) diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/.gitignore b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/.gitignore deleted file mode 100644 index 616915ca..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.gemspec -pkg -Gemfile.lock diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/CHANGELOG.rdoc b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/CHANGELOG.rdoc deleted file mode 100644 index f7dd9fb3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/CHANGELOG.rdoc +++ /dev/null @@ -1,149 +0,0 @@ -= Changelog - -== 0.5.1 / 2014-04-23 - -- new features: - - Support for receiving binary messages - -- changed: - - Allow additional close codes to be sent by apps - - Raise better errors on missing Sec-WebSocket-Key2 - - Updated http_parser.rb dependency to 0.6.0 - -- bug fixes: - - Abort if HTTP request URI is invalid - - Force close connections that have been sent a close handshake after a timeout - -- improved spec compliance on: - - Missing continuation frames - - Fragmented control frames - - Close behaviour after protocol errors - -== 0.5.0 / 2013-03-05 - -- new features: - - onclose handler is now passed a hash containing was_clean (set to true in drafts 03 and above when a connection is closed with a closing handshake, either by the server or the client), the close code, and reason (drafts 06 and above). Close code 1005 indicates that no code was supplied, and 1006 that the connection was closed abnormally. - - use Connection#support_close_codes? to easily check whether close codes are supported by the WebSocket protocol (drafts 06 and above) - - closes connection with 1007 close code if text frame contains invalid UTF8 - - added Handshake#secure? for checking whether the connection is secure (either ssl or behind an ssl proxy) - -- changed: - - Defaults to sending no close code rather than 1000 (consistent with browsers) - - Allows sending a 3xxx close code - - Renamed Connection#close_websocket to Connection#close (again for consistency with browsers). Old method is available till 0.6. - - Sends reasons with internally generated closure (previously only sent code) - - Echos close code when replying to close handshake - -== 0.4.0 / 2013-01-22 - -- new features: - - on_open handler is now passed a handshake object which exposes the request headers, path, and query parameters - - Easily access the protocol version via Handshake#protocol_version - - Easily access the origin via Handshake#origin - -- changed: - - Removed Connection#request - change to using handshake passed to on_open - -- internals: - - Uses the http_parser.rb gem - -== 0.3.8 / 2012-07-12 - -- bug fixes: - - Fixed support for Ruby 1.8.7 which was broken in 0.3.7 - -== 0.3.7 / 2012-07-11 - -- new features: - - Supports sending 1009 error code when incoming frame is too large to handle, and added associated exception class WSMessageTooBigError [Martyn Loughran] - - Supports overriding the maximum frame size by setting the max_frame_size accessor on the connection object (in bytes). Default unchanged at 10MB. [Martyn Loughran] - -- bug fixes: - - Fixes some encoding issues on Ruby 1.9 [Dingding Ye] - - Raises a HandshakeError if WS header is empty [Markus Fenske] - - Connection#send would mutate passed string to BINARY encoding. The fix still mutates the string by forcing the encoding back to UTF-8 before returning, but if the passed string was encoded as UTF-8 this is equivalent [Martyn Loughran] - -== 0.3.6 / 2011-12-23 - -- new features: - - Supports sending ping & pong messages - - Supports binding to received ping & pong messages - -== 0.3.5 / 2011-10-24 - -- new features: - - Support WebSocket draft 13 - -== 0.3.2 / 2011-10-09 - -- bugfixes: - - Handling of messages with > 2 frames - - Encode string passed to onmessage handler as UTF-8 on Ruby 1.9 - - Add 10MB frame length limit to all draft versions - -== 0.3.1 / 2011-07-28 - -- new features: - - Support WebSocket drafts 07 & 08 - -== 0.3.0 / 2011-05-06 - -- new features: - - Support WebSocket drafts 05 & 06 -- changes: - - Accept request headers in a case insensitive manner - - Change handling of errors. Previously some application errors were caught - internally and were invisible unless an onerror callback was supplied. See - readme for details - -== 0.2.1 / 2011-03-01 - -- bugfixes: - - Performance improvements to draft 76 framing - - Limit frame lengths for draft 76 - - Better error handling for draft 76 handshake - - Ruby 1.9 support - -== 0.2.0 / 2010-11-23 - -- new features: - - Support for WebSocket draft 03 -- bugfixes: - - Handle case when handshake split into two receive_data calls - - Stricter regexp matching of frames - -== 0.1.4 / 2010-08-23 - -- new features: - - Allow custom ssl certificate to be used by passing :tls_options - - Protect against errors caused by non limited frame lengths - - Use custom exceptions rather than RuntimeError -- bugfixes: - - Handle invalid HTTP request with HandshakeError - -== 0.1.3 / 2010-07-18 - -- new features: - - onerror callback -- bugfixes: - - proper handling of zero spaces in key1 or key2(prevent ZeroDivisionError) - - convert received data to utf-8 to prevent ruby 1.9 errors - - fix handling of null bytes within a frame - -== 0.1.2 / 2010-06-16 - -- new features: - - none -- bugfixes: - - allow $ character inside header key - -== 0.1.1 / 2010-06-13 - -- new features: - - wss/ssl support -- bugfixes: - - can't & strings - -== 0.1.0 / 2010-06-12 - -- initial release \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/Gemfile b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/Gemfile deleted file mode 100644 index 633ac0cb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source "http://rubygems.org" - -gemspec - -gem "em-websocket-client", git: "git@github.com:movitto/em-websocket-client.git", branch: "expose-websocket-api" -gem "em-spec", "~> 0.2.6" -gem "em-http-request", "~> 1.1.1" -gem "rspec", "~> 3.5.0" -gem "rake" diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/LICENCE b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/LICENCE deleted file mode 100644 index d4df7ada..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/LICENCE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2009-2014 Ilya Grigorik, Martyn Loughran - -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/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/README.md b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/README.md deleted file mode 100644 index d1127160..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# EM-WebSocket - -[![Gem Version](https://badge.fury.io/rb/em-websocket.png)](http://rubygems.org/gems/em-websocket) -[![Analytics](https://ga-beacon.appspot.com/UA-71196-10/em-websocket/readme)](https://github.com/igrigorik/ga-beacon) - -EventMachine based, async, Ruby WebSocket server. Take a look at examples directory, or check out the blog post: [Ruby & Websockets: TCP for the Web](http://www.igvita.com/2009/12/22/ruby-websockets-tcp-for-the-browser/). - -## Simple server example - -```ruby -require 'em-websocket' - -EM.run { - EM::WebSocket.run(:host => "0.0.0.0", :port => 8080) do |ws| - ws.onopen { |handshake| - puts "WebSocket connection open" - - # Access properties on the EM::WebSocket::Handshake object, e.g. - # path, query_string, origin, headers - - # Publish message to the client - ws.send "Hello Client, you connected to #{handshake.path}" - } - - ws.onclose { puts "Connection closed" } - - ws.onmessage { |msg| - puts "Recieved message: #{msg}" - ws.send "Pong: #{msg}" - } - end -} -``` - -## Protocols supported, and protocol specific functionality - -Supports all WebSocket protocols in use in the wild (and a few that are not): drafts 75, 76, 1-17, rfc. - -While some of the changes between protocols are unimportant from the point of view of application developers, a few drafts did introduce new functionality. It's possible to easily test for this functionality by using - -### Ping & pong supported - -Call `ws.pingable?` to check whether ping & pong is supported by the protocol in use. - -It's possible to send a ping frame (`ws.ping(body = '')`), which the client must respond to with a pong, or the server can send an unsolicited pong frame (`ws.pong(body = '')`) which the client should not respond to. These methods can be used regardless of protocol version; they return true if the protocol supports ping&pong or false otherwise. - -When receiving a ping, the server will automatically respond with a pong as the spec requires (so you should _not_ write an onping handler that replies with a pong), however it is possible to bind to ping & pong events if desired by using the `onping` and `onpong` methods. - -### Healthchecks - -It's possible to send a regular `HTTP GET` request to the `/healthcheck` endpoint and receive a `200` response from the server. - -### Close codes and reasons - -A WebSocket connection can be closed cleanly, regardless of protocol, by calling `ws.close(code = nil, body = nil)`. - -Early protocols just close the TCP connection, draft 3 introduced a close handshake, and draft 6 added close codes and reasons to the close handshake. Call `ws.supports_close_codes?` to check whether close codes are supported (i.e. the protocol version is 6 or above). - -The `onclose` callback is passed a hash which may contain following keys (depending on the protocol version): - -* `was_clean`: boolean indicating whether the connection was closed via the close handshake. -* `code`: the close code. There are two special close codes which the server may set (as defined in the WebSocket spec): - * 1005: no code was supplied - * 1006: abnormal closure (the same as `was_clean: false`) -* `reason`: the close reason - -Acceptable close codes are defined in the WebSocket rfc (). The following codes can be supplies when calling `ws.close(code)`: - -* 1000: a generic normal close -* range 3xxx: reserved for libraries, frameworks, and applications (and can be registered with IANA) -* range 4xxx: for private use - -If unsure use a code in the 4xxx range. em-websocket may also close a connection with one of the following close codes: - -* 1002: WebSocket protocol error. -* 1009: Message too big to process. By default em-websocket will accept frames up to 10MB in size. If a frame is larger than this the connection will be closed without reading the frame data. The limit can be overriden globally (`EM::WebSocket.max_frame_size = bytes`) or on a specific connection (`ws.max_frame_size = bytes`). - -## Secure server - -It is possible to accept secure `wss://` connections by passing `:secure => true` when opening the connection. Pass a `:tls_options` hash containing keys as described in http://www.rubydoc.info/github/eventmachine/eventmachine/EventMachine/Connection:start_tls - -**Warning**: Safari 5 does not currently support prompting on untrusted SSL certificates therefore using a self signed certificate may leave you scratching your head. - -```ruby -EM::WebSocket.start({ - :host => "0.0.0.0", - :port => 443, - :secure => true, - :tls_options => { - :private_key_file => "/private/key", - :cert_chain_file => "/ssl/certificate" - } -}) do |ws| - # ... -end -``` - -It's possible to check whether an incoming connection is secure by reading `handshake.secure?` in the onopen callback. - -## Running behind an SSL Proxy/Terminator, like Stunnel - -The `:secure_proxy => true` option makes it possible to use em-websocket behind a secure SSL proxy/terminator like [Stunnel](http://www.stunnel.org/) which does the actual encryption & decryption. - -Note that this option is only required to support drafts 75 & 76 correctly (e.g. Safari 5.1.x & earlier, and Safari on iOS 5.x & earlier). - -```ruby -EM::WebSocket.start({ - :host => "0.0.0.0", - :port => 8080, - :secure_proxy => true -}) do |ws| - # ... -end -``` - -## Handling errors - -There are two kinds of errors that need to be handled -- WebSocket protocol errors and errors in application code. - -WebSocket protocol errors (for example invalid data in the handshake or invalid message frames) raise errors which descend from `EM::WebSocket::WebSocketError`. Such errors are rescued internally and the WebSocket connection will be closed immediately or an error code sent to the browser in accordance to the WebSocket specification. It is possible to be notified in application code of such errors by including an `onerror` callback. - -```ruby -ws.onerror { |error| - if error.kind_of?(EM::WebSocket::WebSocketError) - # ... - end -} -``` - -Application errors are treated differently. If no `onerror` callback has been defined these errors will propagate to the EventMachine reactor, typically causing your program to terminate. If you wish to handle exceptions, simply supply an `onerror callback` and check for exceptions which are not descendant from `EM::WebSocket::WebSocketError`. - -It is also possible to log all errors when developing by including the `:debug => true` option when initialising the WebSocket server. - -## Emulating WebSockets in older browsers - -It is possible to emulate WebSockets in older browsers using flash emulation. For example take a look at the [web-socket-js](https://github.com/gimite/web-socket-js) project. - -Using flash emulation does require some minimal support from em-websocket which is enabled by default. If flash connects to the WebSocket port and requests a policy file (which it will do if it fails to receive a policy file on port 843 after a timeout), em-websocket will return one. Also see for an example policy file server which you can run on port 843. - -## Examples & Projects using em-websocket - -* [Pusher](http://pusher.com) - Realtime Messaging Service -* [Livereload](https://github.com/mockko/livereload) - LiveReload applies CSS/JS changes to Safari or Chrome w/o reloading -* [Twitter AMQP WebSocket Example](http://github.com/rubenfonseca/twitter-amqp-websocket-example) -* examples/multicast.rb - broadcast all ruby tweets to all subscribers -* examples/echo.rb - server <> client exchange via a websocket diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/Rakefile b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/Rakefile deleted file mode 100644 index 0bd27180..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/Rakefile +++ /dev/null @@ -1,11 +0,0 @@ -require 'bundler' -Bundler::GemHelper.install_tasks - -require 'rspec/core/rake_task' - -RSpec::Core::RakeTask.new do |t| - t.rspec_opts = ["-c", "-f progress", "-r ./spec/helper.rb"] - t.pattern = 'spec/**/*_spec.rb' -end - -task :default => :spec diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/echo.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/echo.rb deleted file mode 100644 index 4e648860..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/echo.rb +++ /dev/null @@ -1,24 +0,0 @@ -require File.expand_path('../../lib/em-websocket', __FILE__) - -EM.run { - EM::WebSocket.run(:host => "0.0.0.0", :port => 8080, :debug => false) do |ws| - ws.onopen { |handshake| - puts "WebSocket opened #{{ - :path => handshake.path, - :query => handshake.query, - :origin => handshake.origin, - }}" - - ws.send "Hello Client!" - } - ws.onmessage { |msg| - ws.send "Pong: #{msg}" - } - ws.onclose { - puts "WebSocket closed" - } - ws.onerror { |e| - puts "Error: #{e.message}" - } - end -} diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/multicast.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/multicast.rb deleted file mode 100644 index b1692d56..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/multicast.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'em-websocket' -# requires the twitter-stream gem -require 'twitter/json_stream' -require 'json' - -# -# broadcast all ruby related tweets to all connected users! -# - -username = ARGV.shift -password = ARGV.shift -raise "need username and password" if !username or !password - -EventMachine.run { - @channel = EM::Channel.new - - @twitter = Twitter::JSONStream.connect( - :path => '/1/statuses/filter.json?track=ruby', - :auth => "#{username}:#{password}", - :ssl => true - ) - - @twitter.each_item do |status| - status = JSON.parse(status) - @channel.push "#{status['user']['screen_name']}: #{status['text']}" - end - - - EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug => true) do |ws| - - ws.onopen { - sid = @channel.subscribe { |msg| ws.send msg } - @channel.push "#{sid} connected!" - - ws.onmessage { |msg| - @channel.push "<#{sid}>: #{msg}" - } - - ws.onclose { - @channel.unsubscribe(sid) - } - } - - end - - puts "Server started" -} diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/ping.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/ping.rb deleted file mode 100644 index fe569c3b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/ping.rb +++ /dev/null @@ -1,24 +0,0 @@ -require File.expand_path('../../lib/em-websocket', __FILE__) - -EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug => false) do |ws| - timer = nil - ws.onopen { - puts "Ping supported: #{ws.pingable?}" - timer = EM.add_periodic_timer(1) { - p ["Sent ping", ws.ping('hello')] - } - } - ws.onpong { |value| - puts "Received pong: #{value}" - } - ws.onping { |value| - puts "Received ping: #{value}" - } - ws.onclose { - EM.cancel_timer(timer) - puts "WebSocket closed" - } - ws.onerror { |e| - puts "Error: #{e.message}" - } -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/test.html b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/test.html deleted file mode 100644 index 07d4636b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/examples/test.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - -
- - diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket.rb deleted file mode 100644 index 3eaa105b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket.rb +++ /dev/null @@ -1,24 +0,0 @@ -$:.unshift(File.dirname(__FILE__) + '/../lib') - -require "eventmachine" - -%w[ - debugger websocket connection - handshake - handshake75 handshake76 handshake04 - framing76 framing03 framing04 framing05 framing07 - close75 close03 close05 close06 - masking04 - message_processor_03 message_processor_06 - handler handler75 handler76 handler03 handler05 handler06 handler07 handler08 handler13 -].each do |file| - require "em-websocket/#{file}" -end - -unless ''.respond_to?(:getbyte) - class String - def getbyte(i) - self[i] - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close03.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close03.rb deleted file mode 100644 index 8981776f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close03.rb +++ /dev/null @@ -1,14 +0,0 @@ -module EventMachine - module WebSocket - module Close03 - def close_websocket(code, body) - # TODO: Ideally send body data and check that it matches in ack - send_frame(:close, '') - @state = :closing - start_close_timeout - end - - def supports_close_codes?; false; end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close05.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close05.rb deleted file mode 100644 index 8f8c1508..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close05.rb +++ /dev/null @@ -1,14 +0,0 @@ -module EventMachine - module WebSocket - module Close05 - def close_websocket(code, body) - # TODO: Ideally send body data and check that it matches in ack - send_frame(:close, "\x53") - @state = :closing - start_close_timeout - end - - def supports_close_codes?; false; end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close06.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close06.rb deleted file mode 100644 index 14cc80ec..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close06.rb +++ /dev/null @@ -1,19 +0,0 @@ -module EventMachine - module WebSocket - module Close06 - def close_websocket(code, body) - if code - close_data = [code].pack('n') - close_data << body if body - send_frame(:close, close_data) - else - send_frame(:close, '') - end - @state = :closing - start_close_timeout - end - - def supports_close_codes?; true; end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close75.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close75.rb deleted file mode 100644 index 9d6ba020..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/close75.rb +++ /dev/null @@ -1,11 +0,0 @@ -module EventMachine - module WebSocket - module Close75 - def close_websocket(code, body) - @connection.close_connection_after_writing - end - - def supports_close_codes?; false; end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/connection.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/connection.rb deleted file mode 100644 index a55881df..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/connection.rb +++ /dev/null @@ -1,349 +0,0 @@ -module EventMachine - module WebSocket - class Connection < EventMachine::Connection - include Debugger - - attr_writer :max_frame_size - - # define WebSocket callbacks - def onopen(&blk); @onopen = blk; end - def onclose(&blk); @onclose = blk; end - def onerror(&blk); @onerror = blk; end - def onmessage(&blk); @onmessage = blk; end - def onbinary(&blk); @onbinary = blk; end - def onping(&blk); @onping = blk; end - def onpong(&blk); @onpong = blk; end - - def trigger_on_message(msg) - @onmessage.call(msg) if defined? @onmessage - end - def trigger_on_binary(msg) - @onbinary.call(msg) if defined? @onbinary - end - def trigger_on_open(handshake) - @onopen.call(handshake) if defined? @onopen - end - def trigger_on_close(event = {}) - @onclose.call(event) if defined? @onclose - end - def trigger_on_ping(data) - @onping.call(data) if defined? @onping - end - def trigger_on_pong(data) - @onpong.call(data) if defined? @onpong - end - def trigger_on_error(reason) - return false unless defined? @onerror - @onerror.call(reason) - true - end - - def initialize(options) - @options = options - @debug = options[:debug] || false - @secure = options[:secure] || false - @secure_proxy = options[:secure_proxy] || false - @tls_options = options[:tls_options] || {} - @close_timeout = options[:close_timeout] - @outbound_limit = options[:outbound_limit] || 0 - - @handler = nil - - debug [:initialize] - end - - # Use this method to close the websocket connection cleanly - # This sends a close frame and waits for acknowlegement before closing - # the connection - def close(code = nil, body = nil) - if code && !acceptable_close_code?(code) - raise "Application code may only use codes from 1000, 3000-4999" - end - - close_websocket_private(code, body) - end - - # Deprecated, to be removed in version 0.6 - alias :close_websocket :close - - def post_init - start_tls(@tls_options) if @secure - end - - def receive_data(data) - debug [:receive_data, data] - - if @handler - @handler.receive_data(data) - else - dispatch(data) - end - rescue => e - debug [:error, e] - - # There is no code defined for application errors, so use 3000 - # (which is reserved for frameworks) - close_websocket_private(3000, "Application error") - - # These are application errors - raise unless onerror defined - trigger_on_error(e) || raise(e) - end - - def send_data(data) - if @outbound_limit > 0 && - get_outbound_data_size + data.bytesize > @outbound_limit - abort(:outbound_limit_reached) - return 0 - end - - super(data) - end - - def unbind - debug [:unbind, :connection] - - @handler.unbind if @handler - rescue => e - debug [:error, e] - # These are application errors - raise unless onerror defined - trigger_on_error(e) || raise(e) - end - - def dispatch(data) - if data.match(%r|^GET /healthcheck|) - send_healthcheck_response - elsif data.match(/\A/) - send_flash_cross_domain_file - else - @handshake ||= begin - handshake = Handshake.new(@secure || @secure_proxy) - - handshake.callback { |upgrade_response, handler_klass| - debug [:accepting_ws_version, handshake.protocol_version] - debug [:upgrade_response, upgrade_response] - self.send_data(upgrade_response) - @handler = handler_klass.new(self, @debug) - @handshake = nil - trigger_on_open(handshake) - } - - handshake.errback { |e| - debug [:error, e] - trigger_on_error(e) - # Handshake errors require the connection to be aborted - abort(:handshake_error) - } - - handshake - end - - @handshake.receive_data(data) - end - end - - def send_healthcheck_response - debug [:healthcheck, 'OK'] - - healthcheck_res = ["HTTP/1.1 200 OK"] - healthcheck_res << "Content-Type: text/plain" - healthcheck_res << "Content-Length: 2" - - healthcheck_res = healthcheck_res.join("\r\n") + "\r\n\r\nOK" - - send_data healthcheck_res - - # handle the healthcheck request transparently - # no need to notify the user about this connection - @onclose = nil - close_connection_after_writing - end - - def send_flash_cross_domain_file - file = '' - debug [:cross_domain, file] - send_data file - - # handle the cross-domain request transparently - # no need to notify the user about this connection - @onclose = nil - close_connection_after_writing - end - - # Cache encodings since it's moderately expensive to look them up each time - ENCODING_SUPPORTED = "string".respond_to?(:force_encoding) - UTF8 = Encoding.find("UTF-8") if ENCODING_SUPPORTED - BINARY = Encoding.find("BINARY") if ENCODING_SUPPORTED - - # Send a WebSocket text frame. - # - # A WebSocketError may be raised if the connection is in an opening or a - # closing state, or if the passed in data is not valid UTF-8 - # - def send_text(data) - # If we're using Ruby 1.9, be pedantic about encodings - if ENCODING_SUPPORTED - # Also accept ascii only data in other encodings for convenience - unless (data.encoding == UTF8 && data.valid_encoding?) || data.ascii_only? - raise WebSocketError, "Data sent to WebSocket must be valid UTF-8 but was #{data.encoding} (valid: #{data.valid_encoding?})" - end - # This labels the encoding as binary so that it can be combined with - # the BINARY framing - data.force_encoding(BINARY) - else - # TODO: Check that data is valid UTF-8 - end - - if @handler - @handler.send_text_frame(data) - else - raise WebSocketError, "Cannot send data before onopen callback" - end - - # Revert data back to the original encoding (which we assume is UTF-8) - # Doing this to avoid duping the string - there may be a better way - data.force_encoding(UTF8) if ENCODING_SUPPORTED - return nil - end - - alias :send :send_text - - # Send a WebSocket binary frame. - # - def send_binary(data) - if @handler - @handler.send_frame(:binary, data) - else - raise WebSocketError, "Cannot send binary before onopen callback" - end - end - - # Send a ping to the client. The client must respond with a pong. - # - # In the case that the client is running a WebSocket draft < 01, false - # is returned since ping & pong are not supported - # - def ping(body = '') - if @handler - @handler.pingable? ? @handler.send_frame(:ping, body) && true : false - else - raise WebSocketError, "Cannot ping before onopen callback" - end - end - - # Send an unsolicited pong message, as allowed by the protocol. The - # client is not expected to respond to this message. - # - # em-websocket automatically takes care of sending pong replies to - # incoming ping messages, as the protocol demands. - # - def pong(body = '') - if @handler - @handler.pingable? ? @handler.send_frame(:pong, body) && true : false - else - raise WebSocketError, "Cannot ping before onopen callback" - end - end - - # Test whether the connection is pingable (i.e. the WebSocket draft in - # use is >= 01) - def pingable? - if @handler - @handler.pingable? - else - raise WebSocketError, "Cannot test whether pingable before onopen callback" - end - end - - def supports_close_codes? - if @handler - @handler.supports_close_codes? - else - raise WebSocketError, "Cannot test before onopen callback" - end - end - - def state - @handler ? @handler.state : :handshake - end - - # Returns the IP address for the remote peer - def remote_ip - get_peername[2,6].unpack('nC4')[1..4].join('.') - end - - # Returns the maximum frame size which this connection is configured to - # accept. This can be set globally or on a per connection basis, and - # defaults to a value of 10MB if not set. - # - # The behaviour when a too large frame is received varies by protocol, - # but in the newest protocols the connection will be closed with the - # correct close code (1009) immediately after receiving the frame header - # - def max_frame_size - defined?(@max_frame_size) ? @max_frame_size : WebSocket.max_frame_size - end - - def close_timeout - @close_timeout || WebSocket.close_timeout - end - - private - - # As definited in draft 06 7.2.2, some failures require that the server - # abort the websocket connection rather than close cleanly - def abort(reason) - debug [:abort, reason] - close_connection - end - - def close_websocket_private(code, body) - if @handler - debug [:closing, code] - @handler.close_websocket(code, body) - else - # The handshake hasn't completed - should be safe to terminate - abort(:handshake_incomplete) - end - end - - # Allow applications to close with 1000, 1003, 1008, 1011, 3xxx or 4xxx. - # - # em-websocket uses a few other codes internally which should not be - # used by applications - # - # Browsers generally allow connections to be closed with code 1000, - # 3xxx, and 4xxx. em-websocket allows closing with a few other codes - # which seem reasonable (for discussion see - # https://github.com/igrigorik/em-websocket/issues/98) - # - # Usage from the rfc: - # - # 1000 indicates a normal closure - # - # 1003 indicates that an endpoint is terminating the connection - # because it has received a type of data it cannot accept - # - # 1008 indicates that an endpoint is terminating the connection because - # it has received a message that violates its policy - # - # 1011 indicates that a server is terminating the connection because it - # encountered an unexpected condition that prevented it from fulfilling - # the request - # - # Status codes in the range 3000-3999 are reserved for use by libraries, - # frameworks, and applications - # - # Status codes in the range 4000-4999 are reserved for private use and - # thus can't be registered - # - def acceptable_close_code?(code) - case code - when 1000, 1003, 1008, 1011, (3000..4999) - true - else - false - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/debugger.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/debugger.rb deleted file mode 100644 index a5b32668..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/debugger.rb +++ /dev/null @@ -1,17 +0,0 @@ -module EventMachine - module WebSocket - module Debugger - - private - - def debug(*data) - if @debug - require 'pp' - pp data - puts - end - end - - end - end -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing03.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing03.rb deleted file mode 100644 index 61e6ab8b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing03.rb +++ /dev/null @@ -1,162 +0,0 @@ -# encoding: BINARY - -module EventMachine - module WebSocket - module Framing03 - def initialize_framing - @data = '' - @application_data_buffer = '' # Used for MORE frames - @frame_type = nil - end - - def process_data - error = false - - while !error && @data.size > 1 - pointer = 0 - - more = ((@data.getbyte(pointer) & 0b10000000) == 0b10000000) ^ fin - # Ignoring rsv1-3 for now - opcode = @data.getbyte(0) & 0b00001111 - pointer += 1 - - # Ignoring rsv4 - length = @data.getbyte(pointer) & 0b01111111 - pointer += 1 - - payload_length = case length - when 127 # Length defined by 8 bytes - # Check buffer size - if @data.getbyte(pointer+8-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - # Only using the last 4 bytes for now, till I work out how to - # unpack 8 bytes. I'm sure 4GB frames will do for now :) - l = @data[(pointer+4)..(pointer+7)].unpack('N').first - pointer += 8 - l - when 126 # Length defined by 2 bytes - # Check buffer size - if @data.getbyte(pointer+2-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - l = @data[pointer..(pointer+1)].unpack('n').first - pointer += 2 - l - else - length - end - - if payload_length > @connection.max_frame_size - raise WSMessageTooBigError, "Frame length too long (#{payload_length} bytes)" - end - - # Check buffer size - if @data.getbyte(pointer+payload_length-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - # Throw away data up to pointer - @data.slice!(0...pointer) - - # Read application data - application_data = @data.slice!(0...payload_length) - - frame_type = opcode_to_type(opcode) - - if frame_type == :continuation && !@frame_type - raise WSProtocolError, 'Continuation frame not expected' - end - - if more - debug [:moreframe, frame_type, application_data] - @application_data_buffer << application_data - # The message type is passed in the first frame - @frame_type ||= frame_type - else - # Message is complete - if frame_type == :continuation - @application_data_buffer << application_data - message(@frame_type, '', @application_data_buffer) - @application_data_buffer = '' - @frame_type = nil - else - message(frame_type, '', application_data) - end - end - end # end while - end - - def send_frame(frame_type, application_data) - debug [:sending_frame, frame_type, application_data] - - if @state == :closing && data_frame?(frame_type) - raise WebSocketError, "Cannot send data frame since connection is closing" - end - - frame = '' - - opcode = type_to_opcode(frame_type) - byte1 = opcode # since more, rsv1-3 are 0 - frame << byte1 - - length = application_data.size - if length <= 125 - byte2 = length # since rsv4 is 0 - frame << byte2 - elsif length < 65536 # write 2 byte length - frame << 126 - frame << [length].pack('n') - else # write 8 byte length - frame << 127 - frame << [length >> 32, length & 0xFFFFFFFF].pack("NN") - end - - frame << application_data - - @connection.send_data(frame) - end - - def send_text_frame(data) - send_frame(:text, data) - end - - private - - # This allows flipping the more bit to fin for draft 04 - def fin; false; end - - FRAME_TYPES = { - :continuation => 0, - :close => 1, - :ping => 2, - :pong => 3, - :text => 4, - :binary => 5 - } - FRAME_TYPES_INVERSE = FRAME_TYPES.invert - # Frames are either data frames or control frames - DATA_FRAMES = [:text, :binary, :continuation] - - def type_to_opcode(frame_type) - FRAME_TYPES[frame_type] || raise("Unknown frame type") - end - - def opcode_to_type(opcode) - FRAME_TYPES_INVERSE[opcode] || raise(WSProtocolError, "Unknown opcode #{opcode}") - end - - def data_frame?(type) - DATA_FRAMES.include?(type) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing04.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing04.rb deleted file mode 100644 index 41352e63..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing04.rb +++ /dev/null @@ -1,15 +0,0 @@ -# encoding: BINARY - -module EventMachine - module WebSocket - # The only difference between draft 03 framing and draft 04 framing is - # that the MORE bit has been changed to a FIN bit - module Framing04 - include Framing03 - - private - - def fin; true; end - end - end -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing05.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing05.rb deleted file mode 100644 index 636336aa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing05.rb +++ /dev/null @@ -1,163 +0,0 @@ -# encoding: BINARY - -module EventMachine - module WebSocket - module Framing05 - def initialize_framing - @data = MaskedString.new - @application_data_buffer = '' # Used for MORE frames - @frame_type = nil - end - - def process_data - error = false - - while !error && @data.size > 5 # mask plus first byte present - pointer = 0 - - @data.read_mask - pointer += 4 - - fin = (@data.getbyte(pointer) & 0b10000000) == 0b10000000 - # Ignoring rsv1-3 for now - opcode = @data.getbyte(pointer) & 0b00001111 - pointer += 1 - - # Ignoring rsv4 - length = @data.getbyte(pointer) & 0b01111111 - pointer += 1 - - payload_length = case length - when 127 # Length defined by 8 bytes - # Check buffer size - if @data.getbyte(pointer+8-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - # Only using the last 4 bytes for now, till I work out how to - # unpack 8 bytes. I'm sure 4GB frames will do for now :) - l = @data.getbytes(pointer+4, 4).unpack('N').first - pointer += 8 - l - when 126 # Length defined by 2 bytes - # Check buffer size - if @data.getbyte(pointer+2-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - l = @data.getbytes(pointer, 2).unpack('n').first - pointer += 2 - l - else - length - end - - if payload_length > @connection.max_frame_size - raise WSMessageTooBigError, "Frame length too long (#{payload_length} bytes)" - end - - # Check buffer size - if @data.getbyte(pointer+payload_length-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - # Read application data - application_data = @data.getbytes(pointer, payload_length) - pointer += payload_length - - # Throw away data up to pointer - @data.unset_mask - @data.slice!(0...pointer) - - frame_type = opcode_to_type(opcode) - - if frame_type == :continuation && !@frame_type - raise WSProtocolError, 'Continuation frame not expected' - end - - if !fin - debug [:moreframe, frame_type, application_data] - @application_data_buffer << application_data - @frame_type = frame_type - else - # Message is complete - if frame_type == :continuation - @application_data_buffer << application_data - message(@frame_type, '', @application_data_buffer) - @application_data_buffer = '' - @frame_type = nil - else - message(frame_type, '', application_data) - end - end - end # end while - end - - def send_frame(frame_type, application_data) - debug [:sending_frame, frame_type, application_data] - - if @state == :closing && data_frame?(frame_type) - raise WebSocketError, "Cannot send data frame since connection is closing" - end - - frame = '' - - opcode = type_to_opcode(frame_type) - byte1 = opcode | 0b10000000 # fin bit set, rsv1-3 are 0 - frame << byte1 - - length = application_data.size - if length <= 125 - byte2 = length # since rsv4 is 0 - frame << byte2 - elsif length < 65536 # write 2 byte length - frame << 126 - frame << [length].pack('n') - else # write 8 byte length - frame << 127 - frame << [length >> 32, length & 0xFFFFFFFF].pack("NN") - end - - frame << application_data - - @connection.send_data(frame) - end - - def send_text_frame(data) - send_frame(:text, data) - end - - private - - FRAME_TYPES = { - :continuation => 0, - :close => 1, - :ping => 2, - :pong => 3, - :text => 4, - :binary => 5 - } - FRAME_TYPES_INVERSE = FRAME_TYPES.invert - # Frames are either data frames or control frames - DATA_FRAMES = [:text, :binary, :continuation] - - def type_to_opcode(frame_type) - FRAME_TYPES[frame_type] || raise("Unknown frame type") - end - - def opcode_to_type(opcode) - FRAME_TYPES_INVERSE[opcode] || raise(WSProtocolError, "Unknown opcode #{opcode}") - end - - def data_frame?(type) - DATA_FRAMES.include?(type) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing07.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing07.rb deleted file mode 100644 index 58318e41..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing07.rb +++ /dev/null @@ -1,185 +0,0 @@ -# encoding: BINARY - -module EventMachine - module WebSocket - module Framing07 - - def initialize_framing - @data = MaskedString.new - @application_data_buffer = '' # Used for MORE frames - @frame_type = nil - end - - def process_data - error = false - - while !error && @data.size >= 2 - pointer = 0 - - fin = (@data.getbyte(pointer) & 0b10000000) == 0b10000000 - # Ignoring rsv1-3 for now - opcode = @data.getbyte(pointer) & 0b00001111 - pointer += 1 - - mask = (@data.getbyte(pointer) & 0b10000000) == 0b10000000 - length = @data.getbyte(pointer) & 0b01111111 - pointer += 1 - - # raise WebSocketError, 'Data from client must be masked' unless mask - - payload_length = case length - when 127 # Length defined by 8 bytes - # Check buffer size - if @data.getbyte(pointer+8-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - # Only using the last 4 bytes for now, till I work out how to - # unpack 8 bytes. I'm sure 4GB frames will do for now :) - l = @data.getbytes(pointer+4, 4).unpack('N').first - pointer += 8 - l - when 126 # Length defined by 2 bytes - # Check buffer size - if @data.getbyte(pointer+2-1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - l = @data.getbytes(pointer, 2).unpack('n').first - pointer += 2 - l - else - length - end - - # Compute the expected frame length - frame_length = pointer + payload_length - frame_length += 4 if mask - - if frame_length > @connection.max_frame_size - raise WSMessageTooBigError, "Frame length too long (#{frame_length} bytes)" - end - - # Check buffer size - if @data.getbyte(frame_length - 1) == nil - debug [:buffer_incomplete, @data] - error = true - next - end - - # Remove frame header - @data.slice!(0...pointer) - pointer = 0 - - # Read application data (unmasked if required) - @data.read_mask if mask - pointer += 4 if mask - application_data = @data.getbytes(pointer, payload_length) - pointer += payload_length - @data.unset_mask if mask - - # Throw away data up to pointer - @data.slice!(0...pointer) - - frame_type = opcode_to_type(opcode) - - if frame_type == :continuation - if !@frame_type - raise WSProtocolError, 'Continuation frame not expected' - end - else # Not a continuation frame - if @frame_type && data_frame?(frame_type) - raise WSProtocolError, "Continuation frame expected" - end - end - - # Validate that control frames are not fragmented - if !fin && !data_frame?(frame_type) - raise WSProtocolError, 'Control frames must not be fragmented' - end - - if !fin - debug [:moreframe, frame_type, application_data] - @application_data_buffer << application_data - # The message type is passed in the first frame - @frame_type ||= frame_type - else - # Message is complete - if frame_type == :continuation - @application_data_buffer << application_data - message(@frame_type, '', @application_data_buffer) - @application_data_buffer = '' - @frame_type = nil - else - message(frame_type, '', application_data) - end - end - end # end while - end - - def send_frame(frame_type, application_data) - debug [:sending_frame, frame_type, application_data] - - if @state == :closing && data_frame?(frame_type) - raise WebSocketError, "Cannot send data frame since connection is closing" - end - - frame = '' - - opcode = type_to_opcode(frame_type) - byte1 = opcode | 0b10000000 # fin bit set, rsv1-3 are 0 - frame << byte1 - - length = application_data.size - if length <= 125 - byte2 = length # since rsv4 is 0 - frame << byte2 - elsif length < 65536 # write 2 byte length - frame << 126 - frame << [length].pack('n') - else # write 8 byte length - frame << 127 - frame << [length >> 32, length & 0xFFFFFFFF].pack("NN") - end - - frame << application_data - - @connection.send_data(frame) - end - - def send_text_frame(data) - send_frame(:text, data) - end - - private - - FRAME_TYPES = { - :continuation => 0, - :text => 1, - :binary => 2, - :close => 8, - :ping => 9, - :pong => 10, - } - FRAME_TYPES_INVERSE = FRAME_TYPES.invert - # Frames are either data frames or control frames - DATA_FRAMES = [:text, :binary, :continuation] - - def type_to_opcode(frame_type) - FRAME_TYPES[frame_type] || raise("Unknown frame type") - end - - def opcode_to_type(opcode) - FRAME_TYPES_INVERSE[opcode] || raise(WSProtocolError, "Unknown opcode #{opcode}") - end - - def data_frame?(type) - DATA_FRAMES.include?(type) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing76.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing76.rb deleted file mode 100644 index 55982ffa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/framing76.rb +++ /dev/null @@ -1,105 +0,0 @@ -# encoding: BINARY - -module EventMachine - module WebSocket - module Framing76 - def initialize_framing - @data = '' - end - - def process_data - debug [:message, @data] - - # This algorithm comes straight from the spec - # http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76#section-5.3 - - error = false - - while !error - return if @data.size == 0 - - pointer = 0 - frame_type = @data.getbyte(pointer) - pointer += 1 - - if (frame_type & 0x80) == 0x80 - # If the high-order bit of the /frame type/ byte is set - length = 0 - - loop do - return false if !@data.getbyte(pointer) - b = @data.getbyte(pointer) - pointer += 1 - b_v = b & 0x7F - length = length * 128 + b_v - break unless (b & 0x80) == 0x80 - end - - if length > @connection.max_frame_size - raise WSMessageTooBigError, "Frame length too long (#{length} bytes)" - end - - if @data.getbyte(pointer+length-1) == nil - debug [:buffer_incomplete, @data] - # Incomplete data - leave @data to accumulate - error = true - else - # Straight from spec - I'm sure this isn't crazy... - # 6. Read /length/ bytes. - # 7. Discard the read bytes. - @data = @data[(pointer+length)..-1] - - # If the /frame type/ is 0xFF and the /length/ was 0, then close - if length == 0 - @connection.send_data("\xff\x00") - @state = :closing - @connection.close_connection_after_writing - else - error = true - end - end - else - # If the high-order bit of the /frame type/ byte is _not_ set - - if @data.getbyte(0) != 0x00 - # Close the connection since this buffer can never match - raise WSProtocolError, "Invalid frame received" - end - - # Addition to the spec to protect against malicious requests - if @data.size > @connection.max_frame_size - raise WSMessageTooBigError, "Frame length too long (#{@data.size} bytes)" - end - - msg = @data.slice!(/\A\x00[^\xff]*\xff/) - if msg - msg.gsub!(/\A\x00|\xff\z/, '') - if @state == :closing - debug [:ignored_message, msg] - else - msg.force_encoding('UTF-8') if msg.respond_to?(:force_encoding) - @connection.trigger_on_message(msg) - end - else - error = true - end - end - end - - false - end - - # frames need to start with 0x00-0x7f byte and end with - # an 0xFF byte. Per spec, we can also set the first - # byte to a value betweent 0x80 and 0xFF, followed by - # a leading length indicator - def send_text_frame(data) - debug [:sending_text_frame, data] - ary = ["\x00", data, "\xff"] - ary.collect{ |s| s.force_encoding('UTF-8') if s.respond_to?(:force_encoding) } - @connection.send_data(ary.join) - end - - end - end -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler.rb deleted file mode 100644 index 98cdd4ea..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler.rb +++ /dev/null @@ -1,97 +0,0 @@ -module EventMachine - module WebSocket - class Handler - def self.klass_factory(version) - case version - when 75 - Handler75 - when 76 - Handler76 - when 1..3 - # We'll use handler03 - I believe they're all compatible - Handler03 - when 5 - Handler05 - when 6 - Handler06 - when 7 - Handler07 - when 8 - # drafts 9, 10, 11 and 12 should never change the version - # number as they are all the same as version 08. - Handler08 - when 13 - # drafts 13 to 17 all identify as version 13 as they are - # only minor changes or text changes. - Handler13 - else - # According to spec should abort the connection - raise HandshakeError, "Protocol version #{version} not supported" - end - end - - include Debugger - - attr_reader :request, :state - - def initialize(connection, debug = false) - @connection = connection - @debug = debug - @state = :connected - @close_timer = nil - initialize_framing - end - - def receive_data(data) - @data << data - process_data - rescue WSProtocolError => e - fail_websocket(e) - end - - def close_websocket(code, body) - # Implemented in subclass - end - - # Used to avoid un-acked and unclosed remaining open indefinitely - def start_close_timeout - @close_timer = EM::Timer.new(@connection.close_timeout) { - @connection.close_connection - e = WSProtocolError.new("Close handshake un-acked after #{@connection.close_timeout}s, closing tcp connection") - @connection.trigger_on_error(e) - } - end - - # This corresponds to "Fail the WebSocket Connection" in the spec. - def fail_websocket(e) - debug [:error, e] - close_websocket(e.code, e.message) - @connection.close_connection_after_writing - @connection.trigger_on_error(e) - end - - def unbind - @state = :closed - - @close_timer.cancel if @close_timer - - @close_info = defined?(@close_info) ? @close_info : { - :code => 1006, - :was_clean => false, - } - - @connection.trigger_on_close(@close_info) - end - - def ping - # Overridden in subclass - false - end - - def pingable? - # Also Overridden - false - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler03.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler03.rb deleted file mode 100644 index ac4b3ac4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler03.rb +++ /dev/null @@ -1,9 +0,0 @@ -module EventMachine - module WebSocket - class Handler03 < Handler - include Framing03 - include MessageProcessor03 - include Close03 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler05.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler05.rb deleted file mode 100644 index 4e48e152..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler05.rb +++ /dev/null @@ -1,9 +0,0 @@ -module EventMachine - module WebSocket - class Handler05 < Handler - include Framing05 - include MessageProcessor03 - include Close05 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler06.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler06.rb deleted file mode 100644 index ad55ef71..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler06.rb +++ /dev/null @@ -1,9 +0,0 @@ -module EventMachine - module WebSocket - class Handler06 < Handler - include Framing05 - include MessageProcessor06 - include Close06 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler07.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler07.rb deleted file mode 100644 index d080cf59..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler07.rb +++ /dev/null @@ -1,9 +0,0 @@ -module EventMachine - module WebSocket - class Handler07 < Handler - include Framing07 - include MessageProcessor06 - include Close06 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler08.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler08.rb deleted file mode 100644 index 632057f3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler08.rb +++ /dev/null @@ -1,9 +0,0 @@ -module EventMachine - module WebSocket - class Handler08 < Handler - include Framing07 - include MessageProcessor06 - include Close06 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler13.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler13.rb deleted file mode 100644 index 1dc465d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler13.rb +++ /dev/null @@ -1,9 +0,0 @@ -module EventMachine - module WebSocket - class Handler13 < Handler - include Framing07 - include MessageProcessor06 - include Close06 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler75.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler75.rb deleted file mode 100644 index d9a90d37..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler75.rb +++ /dev/null @@ -1,9 +0,0 @@ -module EventMachine - module WebSocket - class Handler75 < Handler - include Handshake75 - include Framing76 - include Close75 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler76.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler76.rb deleted file mode 100644 index c4aaa377..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handler76.rb +++ /dev/null @@ -1,14 +0,0 @@ -# encoding: BINARY - -module EventMachine - module WebSocket - class Handler76 < Handler - include Handshake76 - include Framing76 - include Close75 - - # "\377\000" is octet version and "\xff\x00" is hex version - TERMINATE_STRING = "\xff\x00" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake.rb deleted file mode 100644 index 12b79044..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake.rb +++ /dev/null @@ -1,156 +0,0 @@ -require "http/parser" -require "uri" - -module EventMachine - module WebSocket - - # Resposible for creating the server handshake response - class Handshake - include EM::Deferrable - - attr_reader :parser, :protocol_version - - # Unfortunately drafts 75 & 76 require knowledge of whether the - # connection is being terminated as ws/wss in order to generate the - # correct handshake response - def initialize(secure) - @parser = Http::Parser.new - @secure = secure - - @parser.on_headers_complete = proc { |headers| - @headers = Hash[headers.map { |k,v| [k.downcase, v] }] - } - end - - def receive_data(data) - @parser << data - - if defined? @headers - process(@headers, @parser.upgrade_data) - end - rescue HTTP::Parser::Error => e - fail(HandshakeError.new("Invalid HTTP header: #{e.message}")) - end - - # Returns the WebSocket upgrade headers as a hash. - # - # Keys are strings, unmodified from the request. - # - def headers - @parser.headers - end - - # The same as headers, except that the hash keys are downcased - # - def headers_downcased - @headers - end - - # Returns the request path (excluding any query params) - # - def path - @path - end - - # Returns the query params as a string foo=bar&baz=... - def query_string - @query_string - end - - def query - Hash[query_string.split('&').map { |c| c.split('=', 2) }] - end - - # Returns the WebSocket origin header if provided - # - def origin - @headers["origin"] || @headers["sec-websocket-origin"] || nil - end - - def secure? - @secure - end - - private - - def process(headers, remains) - unless @parser.http_method == "GET" - raise HandshakeError, "Must be GET request" - end - - # Validate request path - # - # According to http://tools.ietf.org/search/rfc2616#section-5.1.2, an - # invalid Request-URI should result in a 400 status code, but - # HandshakeError's currently result in a WebSocket abort. It's not - # clear which should take precedence, but an abort will do just fine. - begin - uri = URI.parse(@parser.request_url) - @path = uri.path - @query_string = uri.query || "" - rescue URI::InvalidURIError - raise HandshakeError, "Invalid request URI: #{@parser.request_url}" - end - - # Validate Upgrade - unless @parser.upgrade? - raise HandshakeError, "Not an upgrade request" - end - upgrade = @headers['upgrade'] - unless upgrade.kind_of?(String) && upgrade.downcase == 'websocket' - raise HandshakeError, "Invalid upgrade header: #{upgrade.inspect}" - end - - # Determine version heuristically - version = if @headers['sec-websocket-version'] - # Used from drafts 04 onwards - @headers['sec-websocket-version'].to_i - elsif @headers['sec-websocket-draft'] - # Used in drafts 01 - 03 - @headers['sec-websocket-draft'].to_i - elsif @headers['sec-websocket-key1'] - 76 - else - 75 - end - - # Additional handling of bytes after the header if required - case version - when 75 - if !remains.empty? - raise HandshakeError, "Extra bytes after header" - end - when 76, 1..3 - if remains.length < 8 - # The whole third-key has not been received yet. - return nil - elsif remains.length > 8 - raise HandshakeError, "Extra bytes after third key" - end - @headers['third-key'] = remains - end - - handshake_klass = case version - when 75 - Handshake75 - when 76, 1..3 - Handshake76 - when 5, 6, 7, 8, 13 - Handshake04 - else - # According to spec should abort the connection - raise HandshakeError, "Protocol version #{version} not supported" - end - - upgrade_response = handshake_klass.handshake(@headers, @parser.request_url, @secure) - - handler_klass = Handler.klass_factory(version) - - @protocol_version = version - succeed(upgrade_response, handler_klass) - rescue HandshakeError => e - fail(e) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake04.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake04.rb deleted file mode 100644 index 76007876..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake04.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'digest/sha1' -require 'base64' - -module EventMachine - module WebSocket - module Handshake04 - def self.handshake(headers, _, __) - # Required - unless key = headers['sec-websocket-key'] - raise HandshakeError, "sec-websocket-key header is required" - end - - string_to_sign = "#{key}258EAFA5-E914-47DA-95CA-C5AB0DC85B11" - signature = Base64.encode64(Digest::SHA1.digest(string_to_sign)).chomp - - upgrade = ["HTTP/1.1 101 Switching Protocols"] - upgrade << "Upgrade: websocket" - upgrade << "Connection: Upgrade" - upgrade << "Sec-WebSocket-Accept: #{signature}" - if protocol = headers['sec-websocket-protocol'] - validate_protocol!(protocol) - upgrade << "Sec-WebSocket-Protocol: #{protocol}" - end - - # TODO: Support sec-websocket-protocol selection - # TODO: sec-websocket-extensions - - return upgrade.join("\r\n") + "\r\n\r\n" - end - - def self.validate_protocol!(protocol) - raise HandshakeError, "Invalid WebSocket-Protocol: empty" if protocol.empty? - # TODO: Validate characters - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake75.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake75.rb deleted file mode 100644 index 65b744fc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake75.rb +++ /dev/null @@ -1,28 +0,0 @@ -module EventMachine - module WebSocket - module Handshake75 - def self.handshake(headers, path, secure) - scheme = (secure ? "wss" : "ws") - location = "#{scheme}://#{headers['host']}#{path}" - - upgrade = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" - upgrade << "Upgrade: WebSocket\r\n" - upgrade << "Connection: Upgrade\r\n" - upgrade << "WebSocket-Origin: #{headers['origin']}\r\n" - upgrade << "WebSocket-Location: #{location}\r\n" - if protocol = headers['sec-websocket-protocol'] - validate_protocol!(protocol) - upgrade << "Sec-WebSocket-Protocol: #{protocol}\r\n" - end - upgrade << "\r\n" - - return upgrade - end - - def self.validate_protocol!(protocol) - raise HandshakeError, "Invalid WebSocket-Protocol: empty" if protocol.empty? - # TODO: Validate characters - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake76.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake76.rb deleted file mode 100644 index c18260de..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/handshake76.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'digest/md5' - -module EventMachine::WebSocket - module Handshake76 - class << self - def handshake(headers, path, secure) - challenge_response = solve_challenge( - headers['sec-websocket-key1'], - headers['sec-websocket-key2'], - headers['third-key'] - ) - - scheme = (secure ? "wss" : "ws") - location = "#{scheme}://#{headers['host']}#{path}" - - upgrade = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n" - upgrade << "Upgrade: WebSocket\r\n" - upgrade << "Connection: Upgrade\r\n" - upgrade << "Sec-WebSocket-Location: #{location}\r\n" - upgrade << "Sec-WebSocket-Origin: #{headers['origin']}\r\n" - if protocol = headers['sec-websocket-protocol'] - validate_protocol!(protocol) - upgrade << "Sec-WebSocket-Protocol: #{protocol}\r\n" - end - upgrade << "\r\n" - upgrade << challenge_response - - return upgrade - end - - private - - def solve_challenge(first, second, third) - # Refer to 5.2 4-9 of the draft 76 - sum = [numbers_over_spaces(first)].pack("N*") + - [numbers_over_spaces(second)].pack("N*") + - third - Digest::MD5.digest(sum) - end - - def numbers_over_spaces(string) - unless string - raise HandshakeError, "WebSocket key1 or key2 is missing" - end - - numbers = string.scan(/[0-9]/).join.to_i - - spaces = string.scan(/ /).size - # As per 5.2.5, abort the connection if spaces are zero. - raise HandshakeError, "Websocket Key1 or Key2 does not contain spaces - this is a symptom of a cross-protocol attack" if spaces == 0 - - # As per 5.2.6, abort if numbers is not an integral multiple of spaces - if numbers % spaces != 0 - raise HandshakeError, "Invalid Key #{string.inspect}" - end - - quotient = numbers / spaces - - if quotient > 2**32-1 - raise HandshakeError, "Challenge computation out of range for key #{string.inspect}" - end - - return quotient - end - - def validate_protocol!(protocol) - raise HandshakeError, "Invalid WebSocket-Protocol: empty" if protocol.empty? - # TODO: Validate characters - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/masking04.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/masking04.rb deleted file mode 100644 index ad050e9a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/masking04.rb +++ /dev/null @@ -1,37 +0,0 @@ -module EventMachine - module WebSocket - class MaskedString < String - # Read a 4 bit XOR mask - further requested bytes will be unmasked - def read_mask - if respond_to?(:encoding) && encoding.name != "ASCII-8BIT" - raise "MaskedString only operates on BINARY strings" - end - raise "Too short" if bytesize < 4 # TODO - change - @masking_key = String.new(self[0..3]) - end - - # Removes the mask, behaves like a normal string again - def unset_mask - @masking_key = nil - end - - def getbyte(index) - if defined?(@masking_key) && @masking_key - masked_char = super - masked_char ? masked_char ^ @masking_key.getbyte(index % 4) : nil - else - super - end - end - - def getbytes(start_index, count) - data = '' - data.force_encoding('ASCII-8BIT') if data.respond_to?(:force_encoding) - count.times do |i| - data << getbyte(start_index + i) - end - data - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/message_processor_03.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/message_processor_03.rb deleted file mode 100644 index c5dec700..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/message_processor_03.rb +++ /dev/null @@ -1,47 +0,0 @@ -# encoding: BINARY - -module EventMachine - module WebSocket - module MessageProcessor03 - def message(message_type, extension_data, application_data) - case message_type - when :close - @close_info = { - :code => 1005, - :reason => "", - :was_clean => true, - } - if @state == :closing - # TODO: Check that message body matches sent data - # We can close connection immediately since there is no more data - # is allowed to be sent or received on this connection - @connection.close_connection - else - # Acknowlege close - # The connection is considered closed - send_frame(:close, application_data) - @connection.close_connection_after_writing - end - when :ping - # Pong back the same data - send_frame(:pong, application_data) - @connection.trigger_on_ping(application_data) - when :pong - @connection.trigger_on_pong(application_data) - when :text - if application_data.respond_to?(:force_encoding) - application_data.force_encoding("UTF-8") - end - @connection.trigger_on_message(application_data) - when :binary - @connection.trigger_on_binary(application_data) - end - end - - # Ping & Pong supported - def pingable? - true - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/message_processor_06.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/message_processor_06.rb deleted file mode 100644 index 25ca5d2d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/message_processor_06.rb +++ /dev/null @@ -1,78 +0,0 @@ -module EventMachine - module WebSocket - module MessageProcessor06 - def message(message_type, extension_data, application_data) - debug [:message_received, message_type, application_data] - - case message_type - when :close - status_code = case application_data.length - when 0 - # close messages MAY contain a body - nil - when 1 - # Illegal close frame - raise WSProtocolError, "Close frames with a body must contain a 2 byte status code" - else - application_data.slice!(0, 2).unpack('n').first - end - - debug [:close_frame_received, status_code, application_data] - - @close_info = { - :code => status_code || 1005, - :reason => application_data, - :was_clean => true, - } - - if @state == :closing - # We can close connection immediately since no more data may be - # sent or received on this connection - @connection.close_connection - elsif @state == :connected - # Acknowlege close & echo status back to client - # The connection is considered closed - close_data = [status_code || 1000].pack('n') - send_frame(:close, close_data) - @connection.close_connection_after_writing - end - when :ping - # There are a couple of protections here against malicious/broken WebSocket abusing ping frames. - # - # 1. Delay 200ms before replying. This reduces the number of pings from WebSocket clients behaving as - # `for (;;) { send_ping(conn); rcv_pong(conn); }`. The spec says we "SHOULD respond with Pong frame as soon - # as is practical". - # 2. Reply at most every 200ms. This reduces the number of pong frames sent to WebSocket clients behaving as - # `for (;;) { send_ping(conn); }`. The spec says "If an endpoint receives a Ping frame and has not yet sent - # Pong frame(s) in response to previous Ping frame(s), the endpoint MAY elect to send a Pong frame for only - # the most recently processed Ping frame." - @most_recent_pong_application_data = application_data - if @pong_timer == nil then - @pong_timer = EventMachine.add_timer(0.2) do - @pong_timer = nil - send_frame(:pong, @most_recent_pong_application_data) - end - end - @connection.trigger_on_ping(application_data) - when :pong - @connection.trigger_on_pong(application_data) - when :text - if application_data.respond_to?(:force_encoding) - application_data.force_encoding("UTF-8") - unless application_data.valid_encoding? - raise InvalidDataError, "Invalid UTF8 data" - end - end - @connection.trigger_on_message(application_data) - when :binary - @connection.trigger_on_binary(application_data) - end - end - - # Ping & Pong supported - def pingable? - true - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/version.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/version.rb deleted file mode 100644 index ecdedbe4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/version.rb +++ /dev/null @@ -1,5 +0,0 @@ -module EventMachine - module Websocket - VERSION = "0.5.3" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/websocket.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/websocket.rb deleted file mode 100644 index 02e4d86f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/lib/em-websocket/websocket.rb +++ /dev/null @@ -1,56 +0,0 @@ -module EventMachine - module WebSocket - class << self - attr_accessor :max_frame_size - attr_accessor :close_timeout - end - @max_frame_size = 10 * 1024 * 1024 # 10MB - # Connections are given 60s to close after being sent a close handshake - @close_timeout = 60 - - # All errors raised by em-websocket should descend from this class - class WebSocketError < RuntimeError; end - - # Used for errors that occur during WebSocket handshake - class HandshakeError < WebSocketError; end - - # Used for errors which should cause the connection to close. - # See RFC6455 §7.4.1 for a full description of meanings - class WSProtocolError < WebSocketError - def code; 1002; end - end - - class InvalidDataError < WSProtocolError - def code; 1007; end - end - - # 1009: Message too big to process - class WSMessageTooBigError < WSProtocolError - def code; 1009; end - end - - # Start WebSocket server, including starting eventmachine run loop - def self.start(options, &blk) - EM.epoll - EM.run { - trap("TERM") { stop } - trap("INT") { stop } - - run(options, &blk) - } - end - - # Start WebSocket server inside eventmachine run loop - def self.run(options) - host, port = options.values_at(:host, :port) - EM.start_server(host, port, Connection, options) do |c| - yield c - end - end - - def self.stop - puts "Terminating WebSocket Server" - EM.stop - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/helper.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/helper.rb deleted file mode 100644 index 76e45b56..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/helper.rb +++ /dev/null @@ -1,173 +0,0 @@ -# encoding: BINARY - -require 'rubygems' -require 'rspec' -require 'em-spec/rspec' -require 'em-http' - -require 'em-websocket' -require 'em-websocket-client' - -require 'integration/shared_examples' -require 'integration/gte_03_examples' - -RSpec.configure do |c| - c.mock_with :rspec -end - -class FakeWebSocketClient < EM::Connection - attr_reader :handshake_response, :packets - - def onopen(&blk); @onopen = blk; end - def onclose(&blk); @onclose = blk; end - def onerror(&blk); @onerror = blk; end - def onmessage(&blk); @onmessage = blk; end - - def initialize - @state = :new - @packets = [] - end - - def receive_data(data) - # puts "RECEIVE DATA #{data}" - if @state == :new - @handshake_response = data - @onopen.call if defined? @onopen - @state = :open - else - @onmessage.call(data) if defined? @onmessage - @packets << data - end - end - - def send(application_data) - send_frame(:text, application_data) - end - - def send_frame(type, application_data) - send_data construct_frame(type, application_data) - end - - def unbind - @onclose.call if defined? @onclose - end - - private - - def construct_frame(type, data) - "\x00#{data}\xff" - end -end - -class Draft03FakeWebSocketClient < FakeWebSocketClient - private - - def construct_frame(type, data) - frame = "" - frame << EM::WebSocket::Framing03::FRAME_TYPES[type] - frame << encoded_length(data.size) - frame << data - end - - def encoded_length(length) - if length <= 125 - [length].pack('C') # since rsv4 is 0 - elsif length < 65536 # write 2 byte length - "\126#{[length].pack('n')}" - else # write 8 byte length - "\127#{[length >> 32, length & 0xFFFFFFFF].pack("NN")}" - end - end -end - -class Draft05FakeWebSocketClient < Draft03FakeWebSocketClient - private - - def construct_frame(type, data) - frame = "" - frame << "\x00\x00\x00\x00" # Mask with nothing for simplicity - frame << (EM::WebSocket::Framing05::FRAME_TYPES[type] | 0b10000000) - frame << encoded_length(data.size) - frame << data - end -end - -class Draft07FakeWebSocketClient < Draft05FakeWebSocketClient - private - - def construct_frame(type, data) - frame = "" - frame << (EM::WebSocket::Framing07::FRAME_TYPES[type] | 0b10000000) - # Should probably mask the data, but I get away without bothering since - # the server doesn't enforce that incoming frames are masked - frame << encoded_length(data.size) - frame << data - end -end - -# Wrapper around em-websocket-client -class Draft75WebSocketClient - def onopen(&blk); @onopen = blk; end - def onclose(&blk); @onclose = blk; end - def onerror(&blk); @onerror = blk; end - def onmessage(&blk); @onmessage = blk; end - - def initialize - @ws = EventMachine::WebSocketClient.connect('ws://127.0.0.1:12345/', - :version => 75, - :origin => 'http://example.com') - @ws.errback { |err| @onerror.call if defined? @onerror } - @ws.callback { @onopen.call if defined? @onopen } - @ws.stream { |msg| @onmessage.call(msg) if defined? @onmessage } - @ws.disconnect { @onclose.call if defined? @onclose } - end - - def send(message) - @ws.send_msg(message) - end - - def close_connection - @ws.close_connection - end -end - -def start_server(opts = {}) - EM::WebSocket.run({:host => "0.0.0.0", :port => 12345}.merge(opts)) { |ws| - yield ws if block_given? - } -end - -def format_request(r) - data = "#{r[:method]} #{r[:path]} HTTP/1.1\r\n" - header_lines = r[:headers].map { |k,v| "#{k}: #{v}" } - data << [header_lines, '', r[:body]].join("\r\n") - data -end - -def format_response(r) - data = r[:protocol] || "HTTP/1.1 101 WebSocket Protocol Handshake\r\n" - header_lines = r[:headers].map { |k,v| "#{k}: #{v}" } - data << [header_lines, '', r[:body]].join("\r\n") - data -end - -RSpec::Matchers.define :succeed_with_upgrade do |response| - match do |actual| - success = nil - actual.callback { |upgrade_response, handler_klass| - success = (upgrade_response.lines.sort == format_response(response).lines.sort) - } - success - end -end - -RSpec::Matchers.define :fail_with_error do |error_klass, error_message| - match do |actual| - success = nil - actual.errback { |e| - success = (e.class == error_klass) - success &= (e.message == error_message) if error_message - } - success - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/common_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/common_spec.rb deleted file mode 100644 index c89f871c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/common_spec.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'helper' - -# These tests are not specific to any particular draft of the specification -# -describe "WebSocket server" do - include EM::SpecHelper - default_timeout 1 - - it "should fail on non WebSocket requests" do - em { - EM.add_timer(0.1) do - http = EM::HttpRequest.new('http://127.0.0.1:12345/').get :timeout => 0 - http.errback { done } - http.callback { fail } - end - - start_server - } - end - - it "should expose the WebSocket request headers, path and query params" do - em { - EM.add_timer(0.1) do - ws = EventMachine::WebSocketClient.connect('ws://127.0.0.1:12345/', - :origin => 'http://example.com') - ws.errback { fail } - ws.callback { ws.close_connection } - ws.stream { |msg| } - end - - start_server do |ws| - ws.onopen { |handshake| - headers = handshake.headers - headers["Connection"].should == "Upgrade" - headers["Upgrade"].should == "websocket" - headers["Host"].to_s.should == "127.0.0.1:12345" - handshake.path.should == "/" - handshake.query.should == {} - handshake.origin.should == 'http://example.com' - } - ws.onclose { - ws.state.should == :closed - done - } - end - } - end - - it "should expose the WebSocket path and query params when nonempty" do - em { - EM.add_timer(0.1) do - ws = EventMachine::WebSocketClient.connect('ws://127.0.0.1:12345/hello?foo=bar&baz=qux') - ws.errback { fail } - ws.callback { - ws.close_connection - } - ws.stream { |msg| } - end - - start_server do |ws| - ws.onopen { |handshake| - handshake.path.should == '/hello' - handshake.query_string.split('&').sort. - should == ["baz=qux", "foo=bar"] - handshake.query.should == {"foo"=>"bar", "baz"=>"qux"} - } - ws.onclose { - ws.state.should == :closed - done - } - end - } - end - - it "should raise an exception if frame sent before handshake complete" do - em { - # 1. Start WebSocket server - start_server { |ws| - # 3. Try to send a message to the socket - lambda { - ws.send('early message') - }.should raise_error('Cannot send data before onopen callback') - done - } - - # 2. Connect a dumb TCP connection (will not send handshake) - EM.connect('0.0.0.0', 12345, EM::Connection) - } - end - - it "should allow the server to be started inside an existing EM" do - em { - EM.add_timer(0.1) do - http = EM::HttpRequest.new('http://127.0.0.1:12345/').get :timeout => 0 - http.errback { |e| done } - http.callback { fail } - end - - start_server do |ws| - ws.onopen { |handshake| - headers = handshake.headers - headers["Host"].to_s.should == "127.0.0.1:12345" - } - ws.onclose { - ws.state.should == :closed - done - } - end - } - end - - context "outbound limit set" do - it "should close the connection if the limit is reached" do - em { - start_server(:outbound_limit => 150) do |ws| - # Increase the message size by one on each loop - ws.onmessage{|msg| ws.send(msg + "x") } - ws.onclose{|status| - status[:code].should == 1006 # Unclean - status[:was_clean].should be false - } - end - - EM.add_timer(0.1) do - ws = EventMachine::WebSocketClient.connect('ws://127.0.0.1:12345/') - ws.callback { ws.send_msg "hello" } - ws.disconnect { done } # Server closed the connection - ws.stream { |msg| - # minus frame size ? (getting 146 max here) - msg.data.size.should <= 150 - # Return back the message - ws.send_msg(msg.data) - } - end - } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft03_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft03_spec.rb deleted file mode 100644 index f299ab6d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft03_spec.rb +++ /dev/null @@ -1,298 +0,0 @@ -require 'helper' - -describe "draft03" do - include EM::SpecHelper - default_timeout 1 - - before :each do - @request = { - :port => 80, - :method => "GET", - :path => "/demo", - :headers => { - 'Host' => 'example.com', - 'Connection' => 'Upgrade', - 'Sec-WebSocket-Key2' => '12998 5 Y3 1 .P00', - 'Sec-WebSocket-Protocol' => 'sample', - 'Upgrade' => 'WebSocket', - 'Sec-WebSocket-Key1' => '4 @1 46546xW%0l 1 5', - 'Origin' => 'http://example.com', - 'Sec-WebSocket-Draft' => '3' - }, - :body => '^n:ds[4U' - } - - @response = { - :headers => { - "Upgrade" => "WebSocket", - "Connection" => "Upgrade", - "Sec-WebSocket-Location" => "ws://example.com/demo", - "Sec-WebSocket-Origin" => "http://example.com", - "Sec-WebSocket-Protocol" => "sample" - }, - :body => "8jKS\'y:G*Co,Wxa-" - } - end - - def start_client - client = EM.connect('0.0.0.0', 12345, Draft03FakeWebSocketClient) - client.send_data(format_request(@request)) - yield client if block_given? - return client - end - - it_behaves_like "a websocket server" do - let(:version) { 3 } - end - - it_behaves_like "a WebSocket server drafts 3 and above" do - let(:version) { 3 } - end - - # These examples are straight from the spec - # http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-03#section-4.6 - describe "examples from the spec" do - it "should accept a single-frame text message" do - em { - start_server { |ws| - ws.onmessage { |msg| - msg.should == 'Hello' - done - } - } - start_client { |client| - client.onopen { - client.send_data("\x04\x05Hello") - } - } - } - end - - it "should accept a fragmented text message" do - em { - start_server { |ws| - ws.onmessage { |msg| - msg.should == 'Hello' - done - } - } - - connection = start_client - - # Send frame - connection.onopen { - connection.send_data("\x84\x03Hel") - connection.send_data("\x00\x02lo") - } - } - end - - it "should accept a ping request and respond with the same body" do - em { - start_server - - connection = start_client - - # Send frame - connection.onopen { - connection.send_data("\x02\x05Hello") - } - - connection.onmessage { |frame| - next if frame.nil? - frame.should == "\x03\x05Hello" - done - } - } - end - - it "should accept a 256 bytes binary message in a single frame" do - em { - data = "a" * 256 - - start_server { |ws| - ws.onbinary { |msg| - msg.encoding.should == Encoding.find("BINARY") if defined?(Encoding) - msg.should == data - done - } - } - - connection = start_client - - # Send frame - connection.onopen { - connection.send_data("\x05\x7E\x01\x00" + data) - } - } - end - - it "should accept a 64KiB binary message in a single frame" do - em { - data = "a" * 65536 - - start_server { |ws| - ws.onbinary { |msg| - msg.encoding.should == Encoding.find("BINARY") if defined?(Encoding) - msg.should == data - done - } - } - - connection = start_client - - # Send frame - connection.onopen { - connection.send_data("\x05\x7F\x00\x00\x00\x00\x00\x01\x00\x00" + data) - } - } - end - end - - describe "close handling" do - it "should respond to a new close frame with a close frame" do - em { - start_server - - connection = start_client - - # Send close frame - connection.onopen { - connection.send_data("\x01\x00") - } - - # Check that close ack received - connection.onmessage { |frame| - frame.should == "\x01\x00" - done - } - } - end - - it "should close the connection on receiving a close acknowlegement and call onclose with close code 1005 and was_clean=true (initiated by server)" do - em { - ack_received = false - - start_server { |ws| - ws.onopen { - # 2. Send a close frame - EM.next_tick { - ws.close - } - } - - # 5. Onclose event on server - ws.onclose { |event| - event.should == { - :code => 1005, - :reason => "", - :was_clean => true, - } - done - } - } - - # 1. Create a fake client which sends draft 76 handshake - connection = start_client - - # 3. Check that close frame recieved and acknowlege it - connection.onmessage { |frame| - frame.should == "\x01\x00" - ack_received = true - connection.send_data("\x01\x00") - } - - # 4. Check that connection is closed _after_ the ack - connection.onclose { - ack_received.should == true - } - } - end - - # it "should repur" - # - it "should return close code 1005 and was_clean=true after closing handshake (initiated by client)" do - em { - start_server { |ws| - ws.onclose { |event| - event.should == { - :code => 1005, - :reason => "", - :was_clean => true, - } - done - } - } - start_client { |client| - client.onopen { - client.send_data("\x01\x00") - } - } - } - end - - it "should not allow data frame to be sent after close frame sent" do - em { - start_server { |ws| - ws.onopen { - # 2. Send a close frame - EM.next_tick { - ws.close - } - - # 3. Check that exception raised if I attempt to send more data - EM.add_timer(0.1) { - lambda { - ws.send('hello world') - }.should raise_error(EM::WebSocket::WebSocketError, 'Cannot send data frame since connection is closing') - done - } - } - } - - # 1. Create a fake client which sends draft 76 handshake - start_client - } - end - - it "should still respond to control frames after close frame sent" do - em { - start_server { |ws| - ws.onopen { - # 2. Send a close frame - EM.next_tick { - ws.close - } - } - } - - # 1. Create a fake client which sends draft 76 handshake - connection = start_client - - connection.onmessage { |frame| - if frame == "\x01\x00" - # 3. After the close frame is received send a ping frame, but - # don't respond with a close ack - connection.send_data("\x02\x05Hello") - else - # 4. Check that the pong is received - frame.should == "\x03\x05Hello" - done - end - } - } - end - - it "should report that close codes are not supported" do - em { - start_server { |ws| - ws.onopen { - ws.supports_close_codes?.should == false - done - } - } - start_client - } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft05_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft05_spec.rb deleted file mode 100644 index e07ea282..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft05_spec.rb +++ /dev/null @@ -1,50 +0,0 @@ -require 'helper' - -describe "draft05" do - include EM::SpecHelper - default_timeout 1 - - before :each do - @request = { - :port => 80, - :method => "GET", - :path => "/demo", - :headers => { - 'Host' => 'example.com', - 'Upgrade' => 'websocket', - 'Connection' => 'Upgrade', - 'Sec-WebSocket-Key' => 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Protocol' => 'sample', - 'Sec-WebSocket-Origin' => 'http://example.com', - 'Sec-WebSocket-Version' => '5' - } - } - end - - def start_client - client = EM.connect('0.0.0.0', 12345, Draft05FakeWebSocketClient) - client.send_data(format_request(@request)) - yield client if block_given? - return client - end - - it_behaves_like "a websocket server" do - let(:version) { 5 } - end - - it_behaves_like "a WebSocket server drafts 3 and above" do - let(:version) { 5 } - end - - it "should report that close codes are not supported" do - em { - start_server { |ws| - ws.onopen { - ws.supports_close_codes?.should == false - done - } - } - start_client - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft06_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft06_spec.rb deleted file mode 100644 index ae213cba..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft06_spec.rb +++ /dev/null @@ -1,145 +0,0 @@ -require 'helper' - -describe "draft06" do - include EM::SpecHelper - default_timeout 1 - - before :each do - @request = { - :port => 80, - :method => "GET", - :path => "/demo", - :headers => { - 'Host' => 'example.com', - 'Upgrade' => 'websocket', - 'Connection' => 'Upgrade', - 'Sec-WebSocket-Key' => 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Protocol' => 'sample', - 'Sec-WebSocket-Origin' => 'http://example.com', - 'Sec-WebSocket-Version' => '6' - } - } - - @response = { - :protocol => "HTTP/1.1 101 Switching Protocols\r\n", - :headers => { - "Upgrade" => "websocket", - "Connection" => "Upgrade", - "Sec-WebSocket-Accept" => "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", - "Sec-WebSocket-Protocol" => "sample", - } - } - end - - def start_client - client = EM.connect('0.0.0.0', 12345, Draft05FakeWebSocketClient) - client.send_data(format_request(@request)) - yield client if block_given? - return client - end - - it_behaves_like "a websocket server" do - let(:version) { 6 } - end - - it_behaves_like "a WebSocket server drafts 3 and above" do - let(:version) { 6 } - end - - it "should open connection" do - em { - start_server { |server| - server.onopen { - server.instance_variable_get(:@handler).class.should == EventMachine::WebSocket::Handler06 - } - } - - start_client { |client| - client.onopen { - client.handshake_response.lines.sort. - should == format_response(@response).lines.sort - done - } - } - } - end - - it "should accept a single-frame text message (masked)" do - em { - start_server { |server| - server.onmessage { |msg| - msg.should == 'Hello' - if msg.respond_to?(:encoding) - msg.encoding.should == Encoding.find("UTF-8") - end - done - } - server.onerror { - fail - } - } - - start_client { |client| - client.onopen { - client.send_data("\x00\x00\x01\x00\x84\x05Ielln") - } - } - } - end - - it "should return close code and reason if closed via handshake" do - em { - start_server { |ws| - ws.onclose { |event| - # 2. Receive close event in server - event.should == { - :code => 4004, - :reason => "close reason", - :was_clean => true, - } - done - } - } - start_client { |client| - client.onopen { - # 1: Send close handshake - close_data = [4004].pack('n') - close_data << "close reason" - client.send_frame(:close, close_data) - } - } - } - end - - it "should return close code 1005 if no code was specified" do - em { - start_server { |ws| - ws.onclose { |event| - event.should == { - :code => 1005, - :reason => "", - :was_clean => true, - } - done - } - } - start_client { |client| - client.onopen { - client.send_frame(:close, '') - } - } - } - end - - it "should report that close codes are supported" do - em { - start_server { |ws| - ws.onopen { - ws.supports_close_codes?.should == true - done - } - } - start_client - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft13_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft13_spec.rb deleted file mode 100644 index 10dc2a33..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft13_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -# encoding: BINARY - -require 'helper' - -describe "draft13" do - include EM::SpecHelper - default_timeout 1 - - before :each do - @request = { - :port => 80, - :method => "GET", - :path => "/demo", - :headers => { - 'Host' => 'example.com', - 'Upgrade' => 'websocket', - 'Connection' => 'Upgrade', - 'Sec-WebSocket-Key' => 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Protocol' => 'sample', - 'Sec-WebSocket-Origin' => 'http://example.com', - 'Sec-WebSocket-Version' => '13' - } - } - - @response = { - :protocol => "HTTP/1.1 101 Switching Protocols\r\n", - :headers => { - "Upgrade" => "websocket", - "Connection" => "Upgrade", - "Sec-WebSocket-Accept" => "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", - "Sec-WebSocket-Protocol" => "sample", - } - } - end - - def start_client - client = EM.connect('0.0.0.0', 12345, Draft07FakeWebSocketClient) - client.send_data(format_request(@request)) - yield client if block_given? - return client - end - - it_behaves_like "a websocket server" do - let(:version) { 13 } - end - - it_behaves_like "a WebSocket server drafts 3 and above" do - let(:version) { 13 } - end - - it "should send back the correct handshake response" do - em { - start_server - - connection = start_client - - connection.onopen { - connection.handshake_response.lines.sort. - should == format_response(@response).lines.sort - done - } - } - end - - # TODO: This test would be much nicer with a real websocket client... - it "should support sending pings and binding to onpong" do - em { - start_server { |ws| - ws.onopen { - ws.should be_pingable - EM.next_tick { - ws.ping('hello').should == true - } - - } - ws.onpong { |data| - data.should == 'hello' - done - } - } - - connection = start_client - - # Confusing, fake onmessage means any data after the handshake - connection.onmessage { |data| - # This is what a ping looks like - data.should == "\x89\x05hello" - # This is what a pong looks like - connection.send_data("\x8a\x05hello") - } - } - end - - it "should report that close codes are supported" do - em { - start_server { |ws| - ws.onopen { - ws.supports_close_codes?.should == true - done - } - } - start_client - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft75_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft75_spec.rb deleted file mode 100644 index 8d9faec4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft75_spec.rb +++ /dev/null @@ -1,123 +0,0 @@ -require 'helper' - -# These integration tests are older and use a different testing style to the -# integration tests for newer drafts. They use EM::HttpRequest which happens -# to currently estabish a websocket connection using the draft75 protocol. -# -describe "WebSocket server draft75" do - include EM::SpecHelper - default_timeout 1 - - def start_client - client = Draft75WebSocketClient.new - yield client if block_given? - return client - end - - it_behaves_like "a websocket server" do - let(:version) { 75 } - end - - it "should automatically complete WebSocket handshake" do - em { - MSG = "Hello World!" - EventMachine.add_timer(0.1) do - ws = EventMachine::WebSocketClient.connect('ws://127.0.0.1:12345/') - ws.errback { fail } - ws.callback { } - - ws.stream { |msg| - msg.data.should == MSG - EventMachine.stop - } - end - - start_server { |ws| - ws.onopen { - ws.send MSG - } - } - } - end - - it "should split multiple messages into separate callbacks" do - em { - messages = %w[1 2] - received = [] - - EventMachine.add_timer(0.1) do - ws = EventMachine::WebSocketClient.connect('ws://127.0.0.1:12345/') - ws.errback { fail } - ws.stream {|msg|} - ws.callback { - ws.send_msg messages[0] - ws.send_msg messages[1] - } - end - - start_server { |ws| - ws.onopen {} - ws.onclose {} - ws.onmessage {|msg| - msg.should == messages[received.size] - received.push msg - - EventMachine.stop if received.size == messages.size - } - } - } - end - - it "should call onclose callback when client closes connection" do - em { - EventMachine.add_timer(0.1) do - ws = EventMachine::WebSocketClient.connect('ws://127.0.0.1:12345/') - ws.errback { fail } - ws.callback { - ws.close_connection - } - ws.stream{|msg|} - end - - start_server { |ws| - ws.onopen {} - ws.onclose { - ws.state.should == :closed - EventMachine.stop - } - } - } - end - - it "should call onerror callback with raised exception and close connection on bad handshake" do - em { - EventMachine.add_timer(0.1) do - http = EM::HttpRequest.new('http://127.0.0.1:12345/').get - http.errback { } - http.callback { fail } - end - - start_server { |ws| - ws.onopen { fail } - ws.onclose { EventMachine.stop } - ws.onerror {|e| - e.should be_an_instance_of EventMachine::WebSocket::HandshakeError - e.message.should match('Not an upgrade request') - EventMachine.stop - } - } - } - end - - it "should report that close codes are not supported" do - em { - start_server { |ws| - ws.onopen { - ws.supports_close_codes?.should == false - done - } - } - start_client - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft76_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft76_spec.rb deleted file mode 100644 index f1a14e60..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/draft76_spec.rb +++ /dev/null @@ -1,234 +0,0 @@ -# encoding: BINARY - -require 'helper' - -describe "WebSocket server draft76" do - include EM::SpecHelper - default_timeout 1 - - before :each do - @request = { - :port => 80, - :method => "GET", - :path => "/demo", - :headers => { - 'Host' => 'example.com', - 'Connection' => 'Upgrade', - 'Sec-WebSocket-Key2' => '12998 5 Y3 1 .P00', - 'Sec-WebSocket-Protocol' => 'sample', - 'Upgrade' => 'WebSocket', - 'Sec-WebSocket-Key1' => '4 @1 46546xW%0l 1 5', - 'Origin' => 'http://example.com' - }, - :body => '^n:ds[4U' - } - - @response = { - :headers => { - "Upgrade" => "WebSocket", - "Connection" => "Upgrade", - "Sec-WebSocket-Location" => "ws://example.com/demo", - "Sec-WebSocket-Origin" => "http://example.com", - "Sec-WebSocket-Protocol" => "sample" - }, - :body => "8jKS\'y:G*Co,Wxa-" - } - end - - def start_client - client = EM.connect('0.0.0.0', 12345, FakeWebSocketClient) - client.send_data(format_request(@request)) - yield client if block_given? - return client - end - - it_behaves_like "a websocket server" do - let(:version) { 76 } - end - - it "should send back the correct handshake response" do - em { - start_server - - start_client { |connection| - connection.onopen { - connection.handshake_response.lines.sort. - should == format_response(@response).lines.sort - done - } - } - } - end - - it "should send closing frame back and close the connection after recieving closing frame" do - em { - start_server - - connection = start_client - - # Send closing frame after handshake complete - connection.onopen { - connection.send_data(EM::WebSocket::Handler76::TERMINATE_STRING) - } - - # Check that this causes a termination string to be returned and the - # connection close - connection.onclose { - connection.packets[0].should == - EM::WebSocket::Handler76::TERMINATE_STRING - done - } - } - end - - it "should ignore any data received after the closing frame" do - em { - start_server { |ws| - # Fail if foobar message is received - ws.onmessage { |msg| - fail - } - } - - connection = start_client - - # Send closing frame after handshake complete, followed by another msg - connection.onopen { - connection.send_data(EM::WebSocket::Handler76::TERMINATE_STRING) - connection.send('foobar') - } - - connection.onclose { - done - } - } - end - - it "should accept null bytes within the frame after a line return" do - em { - start_server { |ws| - ws.onmessage { |msg| - msg.should == "\n\000" - } - } - - connection = start_client - - # Send closing frame after handshake complete - connection.onopen { - connection.send_data("\000\n\000\377") - connection.send_data(EM::WebSocket::Handler76::TERMINATE_STRING) - } - - connection.onclose { - done - } - } - end - - it "should handle unreasonable frame lengths by calling onerror callback" do - em { - start_server { |server| - server.onerror { |error| - error.should be_an_instance_of EM::WebSocket::WSMessageTooBigError - error.message.should == "Frame length too long (1180591620717411303296 bytes)" - done - } - } - - client = start_client - - # This particular frame indicates a message length of - # 1180591620717411303296 bytes. Such a message would previously cause - # a "bignum too big to convert into `long'" error. - # However it is clearly unreasonable and should be rejected. - client.onopen { - client.send_data("\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00") - } - } - end - - it "should handle impossible frames by calling onerror callback" do - em { - start_server { |server| - server.onerror { |error| - error.should be_an_instance_of EM::WebSocket::WSProtocolError - error.message.should == "Invalid frame received" - done - } - } - - client = start_client - - client.onopen { - client.send_data("foobar") # Does not start with \x00 or \xff - } - } - end - - it "should handle invalid http requests by raising HandshakeError passed to onerror callback" do - em { - start_server { |server| - server.onerror { |error| - error.should be_an_instance_of EM::WebSocket::HandshakeError - error.message.should == "Invalid HTTP header: Could not parse data entirely (1 != 29)" - done - } - } - - client = EM.connect('0.0.0.0', 12345, FakeWebSocketClient) - client.send_data("This is not a HTTP header\r\n\r\n") - } - end - - it "should handle handshake request split into two TCP packets" do - em { - start_server - - # Create a fake client which sends draft 76 handshake - connection = EM.connect('0.0.0.0', 12345, FakeWebSocketClient) - data = format_request(@request) - # Sends first half of the request - connection.send_data(data[0...(data.length / 2)]) - - connection.onopen { - connection.handshake_response.lines.sort. - should == format_response(@response).lines.sort - done - } - - EM.add_timer(0.1) do - # Sends second half of the request - connection.send_data(data[(data.length / 2)..-1]) - end - } - end - - it "should report that close codes are not supported" do - em { - start_server { |ws| - ws.onopen { - ws.supports_close_codes?.should == false - done - } - } - start_client - } - end - - it "should call onclose when the server closes the connection [antiregression]" do - em { - start_server { |ws| - ws.onopen { - EM.add_timer(0.1) { - ws.close() - } - } - ws.onclose { - done - } - } - start_client - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/gte_03_examples.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/gte_03_examples.rb deleted file mode 100644 index f8416185..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/gte_03_examples.rb +++ /dev/null @@ -1,42 +0,0 @@ -shared_examples_for "a WebSocket server drafts 3 and above" do - it "should force close connections after a timeout if close handshake is not sent by the client" do - em { - server_onerror_fired = false - server_onclose_fired = false - client_got_close_handshake = false - - start_server(:close_timeout => 0.1) { |ws| - ws.onopen { - # 1: Send close handshake to client - EM.next_tick { ws.close(4999, "Close message") } - } - - ws.onerror { |e| - # 3: Client should receive onerror - e.class.should == EM::WebSocket::WSProtocolError - e.message.should == "Close handshake un-acked after 0.1s, closing tcp connection" - server_onerror_fired = true - } - - ws.onclose { - server_onclose_fired = true - } - } - start_client { |client| - client.onmessage { |msg| - # 2: Client does not respond to close handshake (the fake client - # doesn't understand them at all hence this is in onmessage) - msg.should =~ /Close message/ if version >= 6 - client_got_close_handshake = true - } - - client.onclose { - server_onerror_fired.should == true - server_onclose_fired.should == true - client_got_close_handshake.should == true - done - } - } - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/shared_examples.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/shared_examples.rb deleted file mode 100644 index 0cd6b424..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/integration/shared_examples.rb +++ /dev/null @@ -1,265 +0,0 @@ -# encoding: UTF-8 - -# These tests are run against all draft versions -# -shared_examples_for "a websocket server" do - it "should expose the protocol version" do - em { - start_server { |ws| - ws.onopen { |handshake| - handshake.protocol_version.should == version - done - } - } - - start_client - } - end - - it "should expose the origin header" do - em { - start_server { |ws| - ws.onopen { |handshake| - handshake.origin.should == 'http://example.com' - done - } - } - - start_client - } - end - - it "should expose the remote IP address" do - em { - start_server { |ws| - ws.onopen { - ws.remote_ip.should == "127.0.0.1" - done - } - } - - start_client - } - end - - it "should send messages successfully" do - em { - start_server { |ws| - ws.onmessage { |message| - message.should == "hello server" - done - } - } - - start_client { |client| - client.onopen { - client.send("hello server") - } - } - } - end - - it "should allow connection to be closed with valid close code" do - em { - start_server { |ws| - ws.onopen { - ws.close(4004, "Bye bye") - done - } - } - - start_client - # TODO: Use a real client which understands how to respond to closing - # handshakes, sending the handshake currently untested - } - end - - it "should raise error if if invalid close code is used" do - em { - start_server { |ws| - ws.onopen { - lambda { - ws.close(2000) - }.should raise_error("Application code may only use codes from 1000, 3000-4999") - done - } - } - - start_client - } - end - - it "should call onclose with was_clean set to false if connection closed without closing handshake by server" do - em { - start_server { |ws| - ws.onopen { - # Close tcp connection (no close handshake) - ws.close_connection - } - ws.onclose { |event| - event.should == {:code => 1006, :was_clean => false} - done - } - } - start_client - } - end - - it "should call onclose with was_clean set to false if connection closed without closing handshake by client" do - em { - start_server { |ws| - ws.onclose { |event| - event.should == {:code => 1006, :was_clean => false} - done - } - } - start_client { |client| - client.onopen { - # Close tcp connection (no close handshake) - client.close_connection - } - } - } - end - - it "should call onerror if an application error raised in onopen" do - em { - start_server { |ws| - ws.onopen { - raise "application error" - } - - ws.onerror { |e| - e.message.should == "application error" - done - } - } - - start_client - } - end - - it "should call onerror if an application error raised in onmessage" do - em { - start_server { |server| - server.onmessage { - raise "application error" - } - - server.onerror { |e| - e.message.should == "application error" - done - } - } - - start_client { |client| - client.onopen { - client.send('a message') - } - } - } - end - - it "should call onerror in an application error raised in onclose" do - em { - start_server { |server| - server.onclose { - raise "application error" - } - - server.onerror { |e| - e.message.should == "application error" - done - } - } - - start_client { |client| - client.onopen { - EM.add_timer(0.1) { - client.close_connection - } - } - } - } - end - - it "should close the connection when a too long frame is sent" do - em { - start_server { |server| - server.max_frame_size = 20 - - server.onerror { |e| - # 3: Error should be reported to server - e.class.should == EventMachine::WebSocket::WSMessageTooBigError - e.message.should =~ /Frame length too long/ - } - } - - start_client { |client| - client.onopen { - EM.next_tick { - client.send("This message is longer than 20 characters") - } - - } - - client.onmessage { |msg| - # 4: This is actually the close message. Really need to use a real - # WebSocket client in these tests... - done - } - - client.onclose { - # 4: Drafts 75 & 76 don't send a close message, they just close the - # connection - done - } - } - } - end - - # Only run these tests on ruby 1.9 - if "a".respond_to?(:force_encoding) - it "should raise error if you try to send non utf8 text data to ws" do - em { - start_server { |server| - server.onopen { - # Create a string which claims to be UTF-8 but which is not - s = "ê" # utf-8 string - s.encode!("ISO-8859-1") - s.force_encoding("UTF-8") - s.valid_encoding?.should == false # now invalid utf8 - - # Send non utf8 encoded data - server.send(s) - } - server.onerror { |error| - error.class.should == EventMachine::WebSocket::WebSocketError - error.message.should == "Data sent to WebSocket must be valid UTF-8 but was UTF-8 (valid: false)" - done - } - } - - start_client { } - } - end - - it "should not change the encoding of strings sent to send [antiregression]" do - em { - start_server { |server| - server.onopen { - s = "example string" - s.force_encoding("UTF-8") - - server.send(s) - - s.encoding.should == Encoding.find("UTF-8") - done - } - } - - start_client { } - } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/framing_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/framing_spec.rb deleted file mode 100644 index b2a8d33b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/framing_spec.rb +++ /dev/null @@ -1,298 +0,0 @@ -# encoding: BINARY - -require 'helper' - -describe EM::WebSocket::Framing03 do - class FramingContainer - include EM::WebSocket::Framing03 - - def initialize - @connection = Object.new - def @connection.max_frame_size - 1000000 - end - end - - def <<(data) - @data << data - process_data - end - - def debug(*args); end - end - - before :each do - @f = FramingContainer.new - @f.initialize_framing - end - - describe "basic examples" do - it "connection close" do - @f.should_receive(:message).with(:close, '', '') - @f << 0b00000001 - @f << 0b00000000 - end - - it "ping" do - @f.should_receive(:message).with(:ping, '', '') - @f << 0b00000010 - @f << 0b00000000 - end - - it "pong" do - @f.should_receive(:message).with(:pong, '', '') - @f << 0b00000011 - @f << 0b00000000 - end - - it "text" do - @f.should_receive(:message).with(:text, '', 'foo') - @f << 0b00000100 - @f << 0b00000011 - @f << 'foo' - end - - it "Text in two frames" do - @f.should_receive(:message).with(:text, '', 'hello world') - @f << 0b10000100 - @f << 0b00000110 - @f << "hello " - @f << 0b00000000 - @f << 0b00000101 - @f << "world" - end - - it "2 byte extended payload length text frame" do - data = 'a' * 256 - @f.should_receive(:message).with(:text, '', data) - @f << 0b00000100 # Single frame, text - @f << 0b01111110 # Length 126 (so read 2 bytes) - @f << 0b00000001 # Two bytes in network byte order (256) - @f << 0b00000000 - @f << data - end - end - - # These examples are straight from the spec - # http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-03#section-4.6 - describe "examples from the spec" do - it "a single-frame text message" do - @f.should_receive(:message).with(:text, '', 'Hello') - @f << "\x04\x05Hello" - end - - it "a fragmented text message" do - @f.should_receive(:message).with(:text, '', 'Hello') - @f << "\x84\x03Hel" - @f << "\x00\x02lo" - end - - it "Ping request and response" do - @f.should_receive(:message).with(:ping, '', 'Hello') - @f << "\x02\x05Hello" - end - - it "256 bytes binary message in a single frame" do - data = "a"*256 - @f.should_receive(:message).with(:binary, '', data) - @f << "\x05\x7E\x01\x00" + data - end - - it "64KiB binary message in a single frame" do - data = "a"*65536 - @f.should_receive(:message).with(:binary, '', data) - @f << "\x05\x7F\x00\x00\x00\x00\x00\x01\x00\x00" + data - end - end - - describe "other tests" do - it "should accept a fragmented unmasked text message in 3 frames" do - @f.should_receive(:message).with(:text, '', 'Hello world') - @f << "\x84\x03Hel" - @f << "\x80\x02lo" - @f << "\x00\x06 world" - end - end - - describe "error cases" do - it "should raise an exception on continuation frame without preceeding more frame" do - lambda { - @f << 0b00000000 # Single frame, continuation - @f << 0b00000001 # Length 1 - @f << 'f' - }.should raise_error(EM::WebSocket::WebSocketError, 'Continuation frame not expected') - end - end -end - -# These examples are straight from the spec -# http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-03#section-4.6 -describe EM::WebSocket::Framing04 do - class FramingContainer04 - include EM::WebSocket::Framing04 - - def initialize - @connection = Object.new - def @connection.max_frame_size - 1000000 - end - end - - def <<(data) - @data << data - process_data - end - - def debug(*args); end - end - - before :each do - @f = FramingContainer04.new - @f.initialize_framing - end - - describe "examples from the spec" do - it "a single-frame text message" do - @f.should_receive(:message).with(:text, '', 'Hello') - @f << "\x84\x05\x48\x65\x6c\x6c\x6f" # "\x84\x05Hello" - end - - it "a fragmented text message" do - @f.should_receive(:message).with(:text, '', 'Hello') - @f << "\x04\x03Hel" - @f << "\x80\x02lo" - end - - it "Ping request" do - @f.should_receive(:message).with(:ping, '', 'Hello') - @f << "\x82\x05Hello" - end - - it "a pong response" do - @f.should_receive(:message).with(:pong, '', 'Hello') - @f << "\x83\x05Hello" - end - - it "256 bytes binary message in a single frame" do - data = "a"*256 - @f.should_receive(:message).with(:binary, '', data) - @f << "\x85\x7E\x01\x00" + data - end - - it "64KiB binary message in a single frame" do - data = "a"*65536 - @f.should_receive(:message).with(:binary, '', data) - @f << "\x85\x7F\x00\x00\x00\x00\x00\x01\x00\x00" + data - end - end - - describe "other tests" do - it "should accept a fragmented unmasked text message in 3 frames" do - @f.should_receive(:message).with(:text, '', 'Hello world') - @f << "\x04\x03Hel" - @f << "\x00\x02lo" - @f << "\x80\x06 world" - end - end -end - -describe EM::WebSocket::Framing07 do - class FramingContainer07 - include EM::WebSocket::Framing07 - - def initialize - @connection = Object.new - def @connection.max_frame_size - 1000000 - end - end - - def <<(data) - @data << data - process_data - end - - def debug(*args); end - end - - before :each do - @f = FramingContainer07.new - @f.initialize_framing - end - - # These examples are straight from the spec - # http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07#section-4.6 - describe "examples from the spec" do - it "a single-frame unmakedtext message" do - @f.should_receive(:message).with(:text, '', 'Hello') - @f << "\x81\x05\x48\x65\x6c\x6c\x6f" # "\x84\x05Hello" - end - - it "a single-frame masked text message" do - @f.should_receive(:message).with(:text, '', 'Hello') - @f << "\x81\x85\x37\xfa\x21\x3d\x7f\x9f\x4d\x51\x58" # "\x84\x05Hello" - end - - it "a fragmented unmasked text message" do - @f.should_receive(:message).with(:text, '', 'Hello') - @f << "\x01\x03Hel" - @f << "\x80\x02lo" - end - - it "Ping request" do - @f.should_receive(:message).with(:ping, '', 'Hello') - @f << "\x89\x05Hello" - end - - it "a pong response" do - @f.should_receive(:message).with(:pong, '', 'Hello') - @f << "\x8a\x05Hello" - end - - it "256 bytes binary message in a single unmasked frame" do - data = "a"*256 - @f.should_receive(:message).with(:binary, '', data) - @f << "\x82\x7E\x01\x00" + data - end - - it "64KiB binary message in a single unmasked frame" do - data = "a"*65536 - @f.should_receive(:message).with(:binary, '', data) - @f << "\x82\x7F\x00\x00\x00\x00\x00\x01\x00\x00" + data - end - end - - describe "other tests" do - it "should raise a WSProtocolError if an invalid frame type is requested" do - lambda { - # Opcode 3 is not supported by this draft - @f << "\x83\x05Hello" - }.should raise_error(EventMachine::WebSocket::WSProtocolError, "Unknown opcode 3") - end - - it "should accept a fragmented unmasked text message in 3 frames" do - @f.should_receive(:message).with(:text, '', 'Hello world') - @f << "\x01\x03Hel" - @f << "\x00\x02lo" - @f << "\x80\x06 world" - end - - it "should raise if non-fin frame is followed by a non-continuation data frame (continuation frame would be expected)" do - lambda { - @f << 0b00000001 # Not fin, text - @f << 0b00000001 # Length 1 - @f << 'f' - @f << 0b10000001 # fin, text (continutation expected) - @f << 0b00000001 # Length 1 - @f << 'b' - }.should raise_error(EM::WebSocket::WebSocketError, 'Continuation frame expected') - end - - it "should raise on non-fin control frames (control frames must not be fragmented)" do - lambda { - @f << 0b00001010 # Not fin, pong (opcode 10) - @f << 0b00000000 # Length 1 - }.should raise_error(EM::WebSocket::WebSocketError, 'Control frames must not be fragmented') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/handshake_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/handshake_spec.rb deleted file mode 100644 index 2754ba76..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/handshake_spec.rb +++ /dev/null @@ -1,216 +0,0 @@ -require 'helper' - -describe EM::WebSocket::Handshake do - def handshake(request, secure = false) - handshake = EM::WebSocket::Handshake.new(secure) - handshake.receive_data(format_request(request)) - handshake - end - - before :each do - @request = { - :port => 80, - :method => "GET", - :path => "/demo", - :headers => { - 'Host' => 'example.com', - 'Connection' => 'Upgrade', - 'Sec-WebSocket-Key2' => '12998 5 Y3 1 .P00', - 'Sec-WebSocket-Protocol' => 'sample', - 'Upgrade' => 'WebSocket', - 'Sec-WebSocket-Key1' => '4 @1 46546xW%0l 1 5', - 'Origin' => 'http://example.com' - }, - :body => '^n:ds[4U' - } - @secure_request = @request.merge(:port => 443) - - @response = { - :headers => { - "Upgrade" => "WebSocket", - "Connection" => "Upgrade", - "Sec-WebSocket-Location" => "ws://example.com/demo", - "Sec-WebSocket-Origin" => "http://example.com", - "Sec-WebSocket-Protocol" => "sample" - }, - :body => "8jKS\'y:G*Co,Wxa-" - } - @secure_response = @response.merge(:headers => @response[:headers].merge('Sec-WebSocket-Location' => "wss://example.com/demo")) - end - - it "should handle good request" do - handshake(@request).should succeed_with_upgrade(@response) - end - - it "should handle good request to secure default port if secure mode is enabled" do - handshake(@secure_request, true). - should succeed_with_upgrade(@secure_response) - end - - it "should not handle good request to secure default port if secure mode is disabled" do - handshake(@secure_request, false). - should_not succeed_with_upgrade(@secure_response) - end - - it "should handle good request on nondefault port" do - @request[:port] = 8081 - @request[:headers]['Host'] = 'example.com:8081' - @response[:headers]['Sec-WebSocket-Location'] = - 'ws://example.com:8081/demo' - - handshake(@request).should succeed_with_upgrade(@response) - end - - it "should handle good request to secure nondefault port" do - @secure_request[:port] = 8081 - @secure_request[:headers]['Host'] = 'example.com:8081' - @secure_response[:headers]['Sec-WebSocket-Location'] = 'wss://example.com:8081/demo' - - handshake(@secure_request, true). - should succeed_with_upgrade(@secure_response) - end - - it "should handle good request with no protocol" do - @request[:headers].delete('Sec-WebSocket-Protocol') - @response[:headers].delete("Sec-WebSocket-Protocol") - - handshake(@request).should succeed_with_upgrade(@response) - end - - it "should handle extra headers by simply ignoring them" do - @request[:headers]['EmptyValue'] = "" - @request[:headers]['AKey'] = "AValue" - - handshake(@request).should succeed_with_upgrade(@response) - end - - it "should raise error on HTTP request" do - @request[:headers] = { - 'Host' => 'www.google.com', - 'User-Agent' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 GTB6 GTBA', - 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - 'Accept-Language' => 'en-us,en;q=0.5', - 'Accept-Encoding' => 'gzip,deflate', - 'Accept-Charset' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', - 'Keep-Alive' => '300', - 'Connection' => 'keep-alive', - } - - handshake(@request).should fail_with_error(EM::WebSocket::HandshakeError) - end - - it "should raise error on wrong method" do - @request[:method] = 'POST' - - handshake(@request).should fail_with_error(EM::WebSocket::HandshakeError) - end - - it "should raise error if upgrade header incorrect" do - @request[:headers]['Upgrade'] = 'NonWebSocket' - - handshake(@request).should fail_with_error(EM::WebSocket::HandshakeError) - end - - it "should raise error if Sec-WebSocket-Protocol is empty" do - @request[:headers]['Sec-WebSocket-Protocol'] = '' - - handshake(@request).should fail_with_error(EM::WebSocket::HandshakeError) - end - - %w[Sec-WebSocket-Key1 Sec-WebSocket-Key2].each do |header| - it "should raise error if #{header} has zero spaces" do - @request[:headers][header] = 'nospaces' - - handshake(@request). - should fail_with_error(EM::WebSocket::HandshakeError, 'Websocket Key1 or Key2 does not contain spaces - this is a symptom of a cross-protocol attack') - end - end - - it "should raise error if Sec-WebSocket-Key1 is missing" do - @request[:headers].delete("Sec-WebSocket-Key1") - - # The error message isn't correct since key1 is used to heuristically - # determine the protocol version in use, however this test at least checks - # that the handshake does correctly fail - handshake(@request). - should fail_with_error(EM::WebSocket::HandshakeError, 'Extra bytes after header') - end - - it "should raise error if Sec-WebSocket-Key2 is missing" do - @request[:headers].delete("Sec-WebSocket-Key2") - - handshake(@request). - should fail_with_error(EM::WebSocket::HandshakeError, 'WebSocket key1 or key2 is missing') - end - - it "should raise error if spaces do not divide numbers in Sec-WebSocket-Key* " do - @request[:headers]['Sec-WebSocket-Key2'] = '12998 5 Y3 1.P00' - - handshake(@request). - should fail_with_error(EM::WebSocket::HandshakeError, 'Invalid Key "12998 5 Y3 1.P00"') - end - - it "should raise error if the HTTP header is empty" do - handshake = EM::WebSocket::Handshake.new(false) - handshake.receive_data("\r\n\r\nfoobar") - - handshake. - should fail_with_error(EM::WebSocket::HandshakeError, 'Invalid HTTP header: Could not parse data entirely (4 != 10)') - end - - # This might seems crazy, but very occasionally we saw multiple "Upgrade: - # WebSocket" headers in the wild. RFC 4.2.1 isn't particularly clear on this - # point, so for now I have decided not to accept --@mloughran - it "should raise error on multiple upgrade headers" do - handshake = EM::WebSocket::Handshake.new(false) - - # Add a duplicate upgrade header - headers = format_request(@request) - upgrade_header = "Upgrade: WebSocket\r\n" - headers.gsub!(upgrade_header, "#{upgrade_header}#{upgrade_header}") - - handshake.receive_data(headers) - - handshake.errback { |e| - e.class.should == EM::WebSocket::HandshakeError - e.message.should == 'Invalid upgrade header: ["WebSocket", "WebSocket"]' - } - end - - it "should cope with requests where the header is split" do - request = format_request(@request) - incomplete_request = request[0...(request.length / 2)] - rest = request[(request.length / 2)..-1] - handshake = EM::WebSocket::Handshake.new(false) - handshake.receive_data(incomplete_request) - - handshake.instance_variable_get(:@deferred_status).should == nil - - # Send the remaining header - handshake.receive_data(rest) - - handshake(@request).should succeed_with_upgrade(@response) - end - - it "should cope with requests where the third key is split" do - request = format_request(@request) - # Removes last two bytes of the third key - incomplete_request = request[0..-3] - rest = request[-2..-1] - handshake = EM::WebSocket::Handshake.new(false) - handshake.receive_data(incomplete_request) - - handshake.instance_variable_get(:@deferred_status).should == nil - - # Send the remaining third key - handshake.receive_data(rest) - - handshake(@request).should succeed_with_upgrade(@response) - end - - it "should fail if the request URI is invalid" do - @request[:path] = "/%" - handshake(@request).should \ - fail_with_error(EM::WebSocket::HandshakeError, 'Invalid request URI: /%') - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/masking_spec.rb b/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/masking_spec.rb deleted file mode 100644 index 065aa955..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/em-websocket-0.5.3/spec/unit/masking_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# encoding: BINARY - -require 'helper' - -describe EM::WebSocket::MaskedString do - it "should allow reading 4 byte mask and unmasking byte / bytes" do - t = EM::WebSocket::MaskedString.new("\x00\x00\x00\x01\x00\x01\x00\x01") - t.read_mask - t.getbyte(3).should == 0x00 - t.getbytes(4, 4).should == "\x00\x01\x00\x00" - t.getbytes(5, 3).should == "\x01\x00\x00" - end - - it "should return nil from getbyte if index requested is out of range" do - t = EM::WebSocket::MaskedString.new("\x00\x00\x00\x00\x53") - t.read_mask - t.getbyte(4).should == 0x53 - t.getbyte(5).should == nil - end - - it "should allow switching masking on and off" do - t = EM::WebSocket::MaskedString.new("\x02\x00\x00\x00\x03") - t.getbyte(4).should == 0x03 - t.read_mask - t.getbyte(4).should == 0x01 - t.unset_mask - t.getbyte(4).should == 0x03 - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.github/workflows/ruby.yml b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.github/workflows/ruby.yml deleted file mode 100644 index d35c1887..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.github/workflows/ruby.yml +++ /dev/null @@ -1,41 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake -# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby - -name: Ruby - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - test: - runs-on: ${{ matrix.os }}-latest - strategy: - fail-fast: false - matrix: - os: [ubuntu, macos] - ruby-version: [2.5, 2.6, 2.7, 3.0, head, debug, truffleruby] - continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }} - steps: - - uses: actions/checkout@v2 - - name: Install libcurl header - run: | - if ${{ matrix.os == 'macos' }} - then - brew install curl - else - sudo apt update && sudo apt install -y --no-install-recommends libcurl4-openssl-dev - fi - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Run tests - run: bundle exec rake diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.gitignore b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.gitignore deleted file mode 100644 index 75a08dc6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.gem -.bundle -Gemfile.lock -.DS_Store -.yardoc -doc -coverage -.idea diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.rspec b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.rspec deleted file mode 100644 index 7d8b8b7f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/.rspec +++ /dev/null @@ -1,3 +0,0 @@ ---tty ---color ---format documentation diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/CHANGELOG.md deleted file mode 100644 index 80597998..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/CHANGELOG.md +++ /dev/null @@ -1,375 +0,0 @@ -# Changelog - -## Master - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.15.0...master) - -* Added `redirect_url` value to available informations and `Easy::Mirror`. - ([Adrien Rey-Jarthon](https://github.com/jarthod) - -## 0.15.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.14.0...v0.15.0) - -## 0.12.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.11.0...v0.12.0) - -- Removed deprecated `CURLE_SSL_CACERT` pinned in curl v7.62.0 ([@arku](https://github.com/arku) in [#158](https://github.com/typhoeus/ethon/pull/158)) - - -## 0.11.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.10.1...v0.11.0) - -## 0.10.1 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.10.0...v0.10.1) - -## 0.10.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.9.1...v0.10.0) - -## 0.9.1 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.9.0...v0.9.1) - -## 0.9.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.8.1...v0.9.0) - -## 0.8.1 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.8.0...v0.8.1) - -* Support optional escaping of params. - ([Tasos Laskos](https://github.com/zapotek) -* `Easy::Mirror`: Reduced object allocations and method calls during info handling. - ([Tasos Laskos](https://github.com/zapotek) - -## 0.8.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.3...v0.7.4) - -* `Easy::Mirror`: Reduced object allocations and method calls during info handling. - ([Tasos Laskos](https://github.com/zapotek) - -## 0.7.4 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.3...v0.7.4) - -* Support different array encodings for params. - ([Marcello Barnaba](https://github.com/ifad), [\#104](https://github.com/typhoeus/ethon/pull/104)) -* Programtic access to version infos. - ([Jonas Wagner](https://github.com/jwagner), [\#90](https://github.com/typhoeus/ethon/pull/90)) - - -## 0.7.3 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.2...v0.7.3) - -* `Ethon::Curl::FDSet` - * Set `:fd_array` size to the current MS Windows `FD_SETSIZE` (2048). - ([Tasos Laskos](https://github.com/zapotek) - -* Added `redirect_time` value to available informations and `Easy::Mirror`. - ([Adrien Jarthon](https://github.com/jarthod) - -## 0.7.2 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.1...v0.7.2) - -* FFI data-types updated to be more correct. - -## 0.7.1 - -* MS Windows determination delegated to `Gem.windows?` for better accuracy. -* FFI data-types updated to work on MS Windows. - -## 0.7.0 - -Not backwards compatible changes: - -* `mime-types` are no longer a dependency. The gem will be still used if available to determine the mime type of a file which is uploaded. That means you have to have take care of the gem installation yourself. - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.3...v0.7.0) - -## 0.6.3 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.2...v0.6.3) - -## 0.6.2 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.1...v0.6.2) - -## 0.6.1 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.0...v0.6.1) - -The changelog entries are coming soon! - -## 0.6.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.12...v0.6.0) - -The changelog entries are coming soon! - -Bugfixes: - - * URL-encode nullbytes in parameters instead of escaping them to `\\0`. - ([Tasos Laskos](https://github.com/zapotek) - -## 0.5.12 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.11...v0.5.12) - -Enhancements: - -* Performance optimizations. - ([Kyle Oppenheim](https://github.com/koppenheim) and [Richie Vos](https://github.com/richievos), [\#48](https://github.com/typhoeus/ethon/pull/48)) -* Reuse memory pointer. - ([Richie Vos](https://github.com/richievos), [\#49](https://github.com/typhoeus/ethon/pull/49)) - -Bugfixes: - -* Fix windows install. - ([Derik Olsson](https://github.com/derikolsson), [\#47](https://github.com/typhoeus/ethon/pull/47)) -* Handle urls that already contain query params. - ([Turner King](https://github.com/turnerking ), [\#45](https://github.com/typhoeus/ethon/pull/45)) - -## 0.5.11 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.10...v0.5.11) - -Enhancements: - -* Add support for postredirs, unrestricted_auth. -* Add support for cookie, cookiejar, cookiefile. - ([erwanlr](https://github.com/erwanlr), [\#46](https://github.com/typhoeus/ethon/pull/46)) -* Relax ffi requirements. - ([voxik](https://github.com/voxik), [\#40](https://github.com/typhoeus/ethon/pull/40)) -* Various documentation improvements. - ([Craig Little](https://github.com/craiglittle)) - -Bugfixes: - -* Fix the memory leaks. - ([Richie Vos](https://github.com/richievos), [\#45](https://github.com/typhoeus/ethon/pull/45)) - -## 0.5.10 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.9...v0.5.10) - -Enhancements: - -* Allow custom requests. - ([Nathan Sutton](https://github.com/nate), [\#36](https://github.com/typhoeus/ethon/pull/36)) -* Use updated version of FFI. - -Bugfixes: - -* Fix windows install issue. - ([brainsucker](https://github.com/brainsucker), [\#38](https://github.com/typhoeus/ethon/pull/38)) - -## 0.5.9 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.8...v0.5.9) - -Enhancements: - -* Allow to set multiple protocols. - -## 0.5.8 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.7...v0.5.8) - -Enhancements: - -* Add support for protocols and redir_protocols( - [libcurl SASL buffer overflow vulnerability](http://curl.haxx.se/docs/adv_20130206.html)). -* Add max_send_speed_large and max_recv_speed_large([Paul Schuegraf](https://github.com/pschuegr), [\#33](https://github.com/typhoeus/ethon/pull/33)) - -## 0.5.7 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.6...v0.5.7) - -Enhancements: - -* Use new version of ffi. - -## 0.5.6 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.4...v0.5.6) - -Bugfixes: - -* Easy#reset resets on_complete callbacks. - -## 0.5.4 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.3...v0.5.4) - -Enhancements: - -* Use Libc#getdtablesize to get the FDSet size. -* New libcurl option accept_encoding. -* Documentation updates. - -## 0.5.3 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.2...v0.5.3) - -Enhancements: - -* Deprecate Easy#prepare. It is no longer necessary. -* Unroll metaprogramming for easy and multi options. -* More specs. - -Bugfixes: - -* Correct size for FDSets -* Add proxytypes to enums. - -## 0.5.2 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.1...v0.5.2) - -Enhancements: - -* New libcurl option keypasswd. - -Bugfixes: - -* Correct request logging when using multi interface. -* Remove invalid libcurl option sslcertpasswd. - -## 0.5.1 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.0...v0.5.1) - -Bugfixes: - -* Mark Curl.select and Curl.easy_perform as blocking so that the GIL is - released by ffi. - -## 0.5.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.4...v0.5.0) - -Enhancements: - -* New libcurl option proxyuserpwd -* Rename response_header to response_headers - -Bugfixes: - -* Mark Curl.select and Curl.easy_perform as blocking so that the GIL is - released by ffi. - -## 0.4.4 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.3...v0.4.4) - -Enhancements: - -* Prepare multi explicit like easy - -## 0.4.3 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.2...v0.4.3) - -Enhancements: - -* Remove deprecated libcurl option put -* More documentation -* New libcurl option connecttimeout_ms and timeout_ms -* Support multi options - -Bugfixes: - -* Handle nil values in query params - -## 0.4.2 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.1...v0.4.2) - -Enhancements: - -* New libcurl option forbid_reuse -* Use libcurls escape instead of CGI::escape - -## 0.4.1 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.0...v0.4.1) - -Bugfixes: - -* Handle nested hash in an array in params correct - ( [\#201](https://github.com/typhoeus/typhoeus/issues/201) ) - -## 0.4.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.3.0...v0.4.0) - -Enhancements: - -* ruby 1.8.7 compatible -* Ethon.logger -* Deal with string param/body -* More documentation - -Bugfixes: - -* Add multi_cleanup to curl - -## 0.3.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.2.0...v0.3.0) - -Enhancements: - -* New libcurl option proxyport -* Raise invalid value error when providing a wrong key for sslversion or httpauth - -Bugfixes: - -* Libcurl option sslversion is handled correct - -## 0.2.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.1.0...v0.2.0) - -Enhancements: - -* GET requests are using custom requests only when there is a request body -* Easy#on_complete takes multiple callbacks -* raise Errors::GlobalInit when libcurls global_init failed instead of - runtime error -* raise Errors::InvalidOption if option is invalid - -## 0.1.0 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.0.2...v0.1.0) - -Enhancements: - -* Documentation - ( [Alex P](https://github.com/ifesdjeen), [\#13](https://github.com/typhoeus/ethon/issues/13) ) -* New libcurl option dns_cache_timeout - ( [Chris Heald](https://github.com/cheald), [\#192](https://github.com/typhoeus/typhoeus/pull/192) ) - -Bugfixes: - -* Libcurl option ssl_verifyhost takes an integer. -* Add space between header key and value. - -## 0.0.2 - -[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.0.1...v0.0.2) - -Bugfixes: - -* Add libcurl.so.4 to ffi_lib in order to load correct lib on Debian. -* Escape zero bytes. - -## 0.0.1 Initial version diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Gemfile b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Gemfile deleted file mode 100644 index a2f41e1c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Gemfile +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -source "https://rubygems.org" -gemspec - -if Gem.ruby_version < Gem::Version.new("1.9.3") - gem "rake", "< 11" -else - gem "rake" -end - -group :development, :test do - gem "rspec", "~> 3.4" - - gem "sinatra" - - if Gem.ruby_version < Gem::Version.new("2.0.0") - gem "json", "< 2" - else - gem "json" - end - - if Gem.ruby_version >= Gem::Version.new("2.0.0") - gem "mime-types", "~> 1.18" - end - - if Gem.ruby_version >= Gem::Version.new("2.2.0") - gem "mustermann" - elsif Gem.ruby_version >= Gem::Version.new("2.1.0") - gem "mustermann", "0.4.0" - elsif Gem.ruby_version >= Gem::Version.new("2.0.0") - gem "mustermann", "0.3.1" - end - - if Gem.ruby_version >= Gem::Version.new("3.0.0") - gem "webrick" - end -end - -group :perf do - gem "benchmark-ips" - gem "patron" - gem "curb" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Guardfile b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Guardfile deleted file mode 100644 index 37d79f0b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Guardfile +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true -# vim:set filetype=ruby: -guard( - "rspec", - :all_after_pass => false, - :cli => "--fail-fast --tty --format documentation --colour") do - - watch(%r{^spec/.+_spec\.rb$}) - watch(%r{^lib/(.+)\.rb$}) { |match| "spec/#{match[1]}_spec.rb" } -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/LICENSE b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/LICENSE deleted file mode 100644 index f064c17b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2012-2016 Hans Hasselberg - -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/bundle/ruby/3.2.0/gems/ethon-0.16.0/README.md b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/README.md deleted file mode 100644 index 9f9f567b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/README.md +++ /dev/null @@ -1,118 +0,0 @@ -[![Gem Version](https://badge.fury.io/rb/ethon.svg)](https://badge.fury.io/rb/ethon) -[![Build Status](https://github.com/typhoeus/ethon/workflows/Ruby/badge.svg)](https://github.com/typhoeus/ethon/actions/workflows/ruby.yml) - -# Ethon - -In Greek mythology, Ethon, the son of Typhoeus and Echidna, is a gigantic eagle. So much for the history. -In the modern world, Ethon is a very basic libcurl wrapper using ffi. - -* [Documentation](http://rubydoc.info/github/typhoeus/ethon/frames/Ethon) -* [Website](http://typhoeus.github.com/) -* [Mailing list](http://groups.google.com/group/typhoeus) - -## Installation - -With bundler: - - gem "ethon" - -With rubygems: - - gem install ethon - -## Usage - -Making the first request is simple: - -```ruby -easy = Ethon::Easy.new(url: "www.example.com") -easy.perform -#=> :ok -``` - -You have access to various options, such as following redirects: - -```ruby -easy = Ethon::Easy.new(url: "www.example.com", followlocation: true) -easy.perform -#=> :ok -``` - -Once you're done you can inspect the response code and body: - -```ruby -easy = Ethon::Easy.new(url: "www.example.com", followlocation: true) -easy.perform -easy.response_code -#=> 200 -easy.response_body -#=> " :ok -``` - -```ruby -easy = Ethon::Easy.new -easy.http_request("www.example.com", :post, { params: { a: 1 }, body: { b: 2 } }) -easy.perform -#=> :ok -``` - -This is really handy when making requests since you don't have to care about setting -everything up correctly. - -## Http2 -Standard http2 servers require the client to connect once and create a session (multi) and then add simple requests to the multi handler. -The `perform` method then takes all the requests in the multi handler and sends them to the server. - -See the following example -```ruby -multi = Ethon::Multi.new -easy = Ethon::Easy.new - -easy.http_request("www.example.com/get", :get, { http_version: :httpv2_0 }) - -# Sending a request with http version 2 will send an Upgrade header to the server, which many older servers will not support -# See below for more info: https://everything.curl.dev/http/http2 -# If this is a problem, send the below: -easy.http_request("www.example.com/get", :get, { http_version: :httpv2_prior_knowledge }) - -# To set the server to use http2 with https and http1 with http, send the following: -easy.http_request("www.example.com/get", :get, { http_version: :httpv2_tls } - -multi.add(easy) -multi.perform -``` - -## LICENSE - -(The MIT License) - -Copyright © 2012-2016 [Hans Hasselberg](http://www.hans.io) - -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/bundle/ruby/3.2.0/gems/ethon-0.16.0/Rakefile b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Rakefile deleted file mode 100644 index a5bc61b0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/Rakefile +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -require "bundler" -Bundler.setup - -require "rake" -require "rspec/core/rake_task" -$LOAD_PATH.unshift File.expand_path("../lib", __FILE__) -require "ethon/version" - -task :gem => :build -task :build do - system "gem build ethon.gemspec" -end - -task :install => :build do - system "gem install ethon-#{Ethon::VERSION}.gem" -end - -task :release => :build do - system "git tag -a v#{Ethon::VERSION} -m 'Tagging #{Ethon::VERSION}'" - system "git push --tags" - system "gem push ethon-#{Ethon::VERSION}.gem" -end - -RSpec::Core::RakeTask.new(:spec) do |t| - t.verbose = false - t.ruby_opts = "-W -I./spec -rspec_helper" -end - -desc "Start up the test servers" -task :start do - require_relative 'spec/support/boot' - begin - Boot.start_servers(:rake) - rescue Exception - end -end - -task :default => :spec - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/ethon.gemspec b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/ethon.gemspec deleted file mode 100644 index 561330b4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/ethon.gemspec +++ /dev/null @@ -1,26 +0,0 @@ -# encoding: utf-8 -# frozen_string_literal: true -lib = File.expand_path('../lib/', __FILE__) -$:.unshift lib unless $:.include?(lib) - -require 'ethon/version' - -Gem::Specification.new do |s| - s.name = "ethon" - s.version = Ethon::VERSION - s.platform = Gem::Platform::RUBY - s.authors = ["Hans Hasselberg"] - s.email = ["me@hans.io"] - s.homepage = "https://github.com/typhoeus/ethon" - s.summary = "Libcurl wrapper." - s.description = "Very lightweight libcurl wrapper." - - s.required_rubygems_version = ">= 1.3.6" - s.license = 'MIT' - - s.add_dependency('ffi', ['>= 1.15.0']) - - s.files = `git ls-files`.split("\n") - s.test_files = `git ls-files -- spec/*`.split("\n") - s.require_path = 'lib' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon.rb deleted file mode 100644 index 461b4c36..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -require 'logger' -require 'ffi' -require 'thread' -begin - require 'mime/types/columnar' -rescue LoadError - begin - require 'mime/types' - rescue LoadError - end -end -require 'tempfile' - -require 'ethon/libc' -require 'ethon/curl' -require 'ethon/easy' -require 'ethon/errors' -require 'ethon/loggable' -require 'ethon/multi' -require 'ethon/version' - -# Ethon is a very simple libcurl. -# It provides direct access to libcurl functionality -# as well as some helpers for doing http requests. -# -# Ethon was extracted from Typhoeus. If you want to -# see how others use Ethon look at the Typhoeus code. -# -# @see https://www.github.com/typhoeus/typhoeus Typhoeus -# -# @note Please update to the latest libcurl version in order -# to benefit from all features and bugfixes. -# http://curl.haxx.se/download.html -module Ethon -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curl.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curl.rb deleted file mode 100644 index f9194c7d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curl.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true -require 'ethon/curls/codes' -require 'ethon/curls/options' -require 'ethon/curls/infos' -require 'ethon/curls/form_options' -require 'ethon/curls/messages' -require 'ethon/curls/functions' - -module Ethon - - # FFI Wrapper module for Curl. Holds constants and required initializers. - # - # @api private - module Curl - extend ::FFI::Library - extend Ethon::Curls::Codes - extend Ethon::Curls::Options - extend Ethon::Curls::Infos - extend Ethon::Curls::FormOptions - extend Ethon::Curls::Messages - - # :nodoc: - def self.windows? - Libc.windows? - end - - require 'ethon/curls/constants' - require 'ethon/curls/settings' - require 'ethon/curls/classes' - extend Ethon::Curls::Functions - - @blocking = true - - @@initialized = false - @@curl_mutex = Mutex.new - - class << self - # This function sets up the program environment that libcurl needs. - # Think of it as an extension of the library loader. - # - # This function must be called at least once within a program (a program is all the - # code that shares a memory space) before the program calls any other function in libcurl. - # The environment it sets up is constant for the life of the program and is the same for - # every program, so multiple calls have the same effect as one call. - # - # The flags option is a bit pattern that tells libcurl exactly what features to init, - # as described below. Set the desired bits by ORing the values together. In normal - # operation, you must specify CURL_GLOBAL_ALL. Don't use any other value unless - # you are familiar with it and mean to control internal operations of libcurl. - # - # This function is not thread safe. You must not call it when any other thread in - # the program (i.e. a thread sharing the same memory) is running. This doesn't just - # mean no other thread that is using libcurl. Because curl_global_init() calls - # functions of other libraries that are similarly thread unsafe, it could conflict with - # any other thread that uses these other libraries. - # - # @raise [ Ethon::Errors::GlobalInit ] If Curl.global_init fails. - def init - @@curl_mutex.synchronize { - if not @@initialized - raise Errors::GlobalInit.new if Curl.global_init(GLOBAL_ALL) != 0 - @@initialized = true - Ethon.logger.debug("ETHON: Libcurl initialized") if Ethon.logger - end - } - end - - # This function releases resources acquired by curl_global_init. - # You should call curl_global_cleanup once for each call you make to - # curl_global_init, after you are done using libcurl. - # This function is not thread safe. You must not call it when any other thread in the - # program (i.e. a thread sharing the same memory) is running. This doesn't just - # mean no other thread that is using libcurl. Because curl_global_cleanup calls functions of other - # libraries that are similarly thread unsafe, it could conflict with - # any other thread that uses these other libraries. - # See the description in libcurl of global environment requirements - # for details of how to use this function. - def cleanup - @@curl_mutex.synchronize { - if @@initialized - Curl.global_cleanup() - @@initialized = false - Ethon.logger.debug("ETHON: Libcurl cleanup") if Ethon.logger - end - } - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb deleted file mode 100644 index e663ac8c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curl - # :nodoc: - class MsgData < ::FFI::Union - layout :whatever, :pointer, :code, :easy_code - end - - # :nodoc: - class Msg < ::FFI::Struct - layout :code, :msg_code, :easy_handle, :pointer, :data, MsgData - end - - class VersionInfoData < ::FFI::Struct - layout :curl_version, :uint8, - :version, :string, - :version_num, :int, - :host, :string, - :features, :int, - :ssl_version, :string, - :ssl_version_num, :long, - :libz_version, :string, - :protocols, :pointer - end - - # :nodoc: - class FDSet < ::FFI::Struct - if Curl.windows? - layout :fd_count, :uint, - # TODO: Make it future proof by dynamically grabbing FD_SETSIZE. - :fd_array, [:uint, 2048] - - def clear; self[:fd_count] = 0; end - else - # https://github.com/typhoeus/ethon/issues/182 - FD_SETSIZE = begin - # Allow to override the (new) default cap - if ENV['ETHON_FD_SIZE'] - ENV['ETHON_FD_SIZE'] - - # auto-detect ulimit, but cap at 2^16 - else - [::Ethon::Libc.getdtablesize, 65_536].min - end - end - - layout :fds_bits, [:long, FD_SETSIZE / ::FFI::Type::LONG.size] - - # :nodoc: - def clear; super; end - end - end - - # :nodoc: - class Timeval < ::FFI::Struct - if Curl.windows? - layout :sec, :long, - :usec, :long - else - layout :sec, :time_t, - :usec, :suseconds_t - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/codes.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/codes.rb deleted file mode 100644 index 4b53096a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/codes.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curls # :nodoc: - - # This module contains all easy and - # multi return codes. - module Codes - - # Libcurl error codes, refer - # https://github.com/bagder/curl/blob/master/include/curl/curl.h for details - def easy_codes - [ - :ok, - :unsupported_protocol, - :failed_init, - :url_malformat, - :not_built_in, - :couldnt_resolve_proxy, - :couldnt_resolve_host, - :couldnt_connect, - :ftp_weird_server_reply, - :remote_access_denied, - :ftp_accept_failed, - :ftp_weird_pass_reply, - :ftp_accept_timeout, - :ftp_weird_pasv_reply, - :ftp_weird_227_format, - :ftp_cant_get_host, - :obsolete16, - :ftp_couldnt_set_type, - :partial_file, - :ftp_couldnt_retr_file, - :obsolete20, - :quote_error, - :http_returned_error, - :write_error, - :obsolete24, - :upload_failed, - :read_error, - :out_of_memory, - :operation_timedout, - :obsolete29, - :ftp_port_failed, - :ftp_couldnt_use_rest, - :obsolete32, - :range_error, - :http_post_error, - :ssl_connect_error, - :bad_download_resume, - :file_couldnt_read_file, - :ldap_cannot_bind, - :ldap_search_failed, - :obsolete40, - :function_not_found, - :aborted_by_callback, - :bad_function_argument, - :obsolete44, - :interface_failed, - :obsolete46, - :too_many_redirects , - :unknown_option, - :telnet_option_syntax , - :obsolete50, - :peer_failed_verification, - :got_nothing, - :ssl_engine_notfound, - :ssl_engine_setfailed, - :send_error, - :recv_error, - :obsolete57, - :ssl_certproblem, - :ssl_cipher, - :bad_content_encoding, - :ldap_invalid_url, - :filesize_exceeded, - :use_ssl_failed, - :send_fail_rewind, - :ssl_engine_initfailed, - :login_denied, - :tftp_notfound, - :tftp_perm, - :remote_disk_full, - :tftp_illegal, - :tftp_unknownid, - :remote_file_exists, - :tftp_nosuchuser, - :conv_failed, - :conv_reqd, - :ssl_cacert_badfile, - :remote_file_not_found, - :ssh, - :ssl_shutdown_failed, - :again, - :ssl_crl_badfile, - :ssl_issuer_error, - :ftp_pret_failed, - :rtsp_cseq_error, - :rtsp_session_error, - :ftp_bad_file_list, - :chunk_failed, - :last - ] - end - - # Curl-Multi socket error codes, refer - # https://github.com/bagder/curl/blob/master/include/curl/multi.h for details - def multi_codes - [ - :call_multi_perform, -1, - :ok, - :bad_handle, - :bad_easy_handle, - :out_of_memory, - :internal_error, - :bad_socket, - :unknown_option, - :last - ] - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/constants.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/constants.rb deleted file mode 100644 index 3c7c32d9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/constants.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curl - # :nodoc: - VERSION_NOW = 3 - - # Flag. Initialize SSL. - GLOBAL_SSL = 0x01 - # Flag. Initialize win32 socket libraries. - GLOBAL_WIN32 = 0x02 - # Flag. Initialize everything possible. - GLOBAL_ALL = (GLOBAL_SSL | GLOBAL_WIN32) - # Flag. Initialize everything by default. - GLOBAL_DEFAULT = GLOBAL_ALL - - # :nodoc: - EasyCode = enum(:easy_code, easy_codes) - # :nodoc: - MultiCode = enum(:multi_code, multi_codes) - - # :nodoc: - EasyOption = enum(:easy_option, easy_options(:enum).to_a.flatten) - # :nodoc: - MultiOption = enum(:multi_option, multi_options(:enum).to_a.flatten) - - # Used by curl_debug_callback when setting CURLOPT_DEBUGFUNCTION - # https://github.com/bagder/curl/blob/master/include/curl/curl.h#L378 for details - DebugInfoType = enum(:debug_info_type, debug_info_types) - - # :nodoc: - InfoType = enum(info_types.to_a.flatten) - - # Info details, refer - # https://github.com/bagder/curl/blob/master/src/tool_writeout.c#L66 for details - Info = enum(:info, infos.to_a.flatten) - - # Form options, used by FormAdd for temporary storage, refer - # https://github.com/bagder/curl/blob/master/lib/formdata.h#L51 for details - FormOption = enum(:form_option, form_options) - - # :nodoc: - MsgCode = enum(:msg_code, msg_codes) - - VERSION_IPV6 = (1<<0) # IPv6-enabled - VERSION_KERBEROS4 = (1<<1) # kerberos auth is supported - VERSION_SSL = (1<<2) # SSL options are present - VERSION_LIBZ = (1<<3) # libz features are present - VERSION_NTLM = (1<<4) # NTLM auth is supported - VERSION_GSSNEGOTIATE = (1<<5) # Negotiate auth supp - VERSION_DEBUG = (1<<6) # built with debug capabilities - VERSION_ASYNCHDNS = (1<<7) # asynchronous dns resolves - VERSION_SPNEGO = (1<<8) # SPNEGO auth is supported - VERSION_LARGEFILE = (1<<9) # supports files bigger than 2GB - VERSION_IDN = (1<<10) # International Domain Names support - VERSION_SSPI = (1<<11) # SSPI is supported - VERSION_CONV = (1<<12) # character conversions supported - VERSION_CURLDEBUG = (1<<13) # debug memory tracking supported - VERSION_TLSAUTH_SRP = (1<<14) # TLS-SRP auth is supported - VERSION_NTLM_WB = (1<<15) # NTLM delegating to winbind helper - VERSION_HTTP2 = (1<<16) # HTTP2 support built - VERSION_GSSAPI = (1<<17) # GSS-API is supported - - SOCKET_BAD = -1 - SOCKET_TIMEOUT = SOCKET_BAD - - PollAction = enum(:poll_action, [ - :none, - :in, - :out, - :inout, - :remove - ]) - - SocketReadiness = bitmask(:socket_readiness, [ - :in, # CURL_CSELECT_IN - 0x01 (bit 0) - :out, # CURL_CSELECT_OUT - 0x02 (bit 1) - :err, # CURL_CSELECT_ERR - 0x04 (bit 2) - ]) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/form_options.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/form_options.rb deleted file mode 100644 index ce5f0793..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/form_options.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curls - - # This module contains the available options for forms. - module FormOptions - - # Form options, used by FormAdd for temporary storage, refer - # https://github.com/bagder/curl/blob/master/lib/formdata.h#L51 for details - def form_options - [ - :none, - :copyname, - :ptrname, - :namelength, - :copycontents, - :ptrcontents, - :contentslength, - :filecontent, - :array, - :obsolete, - :file, - :buffer, - :bufferptr, - :bufferlength, - :contenttype, - :contentheader, - :filename, - :end, - :obsolete2, - :stream, - :last - ] - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/functions.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/functions.rb deleted file mode 100644 index 2c01bea4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/functions.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curls - - # This module contains the functions to be attached in order to work with - # libcurl. - module Functions - - # :nodoc: - def self.extended(base) - base.attach_function :global_init, :curl_global_init, [:long], :int - base.attach_function :global_cleanup, :curl_global_cleanup, [], :void - base.attach_function :free, :curl_free, [:pointer], :void - - base.attach_function :easy_init, :curl_easy_init, [], :pointer - base.attach_function :easy_cleanup, :curl_easy_cleanup, [:pointer], :void - base.attach_function :easy_getinfo, :curl_easy_getinfo, [:pointer, :info, :varargs], :easy_code - base.attach_function :easy_setopt, :curl_easy_setopt, [:pointer, :easy_option, :varargs], :easy_code - base.instance_variable_set(:@blocking, true) - base.attach_function :easy_perform, :curl_easy_perform, [:pointer], :easy_code - base.attach_function :easy_strerror, :curl_easy_strerror, [:easy_code], :string - base.attach_function :easy_escape, :curl_easy_escape, [:pointer, :pointer, :int], :pointer - base.attach_function :easy_reset, :curl_easy_reset, [:pointer], :void - base.attach_function :easy_duphandle, :curl_easy_duphandle, [:pointer], :pointer - - base.attach_function :formadd, :curl_formadd, [:pointer, :pointer, :varargs], :int - base.attach_function :formfree, :curl_formfree, [:pointer], :void - - base.attach_function :multi_init, :curl_multi_init, [], :pointer - base.attach_function :multi_cleanup, :curl_multi_cleanup, [:pointer], :void - base.attach_function :multi_add_handle, :curl_multi_add_handle, [:pointer, :pointer], :multi_code - base.attach_function :multi_remove_handle, :curl_multi_remove_handle, [:pointer, :pointer], :multi_code - base.attach_function :multi_info_read, :curl_multi_info_read, [:pointer, :pointer], Curl::Msg.ptr - base.attach_function :multi_perform, :curl_multi_perform, [:pointer, :pointer], :multi_code - base.attach_function :multi_timeout, :curl_multi_timeout, [:pointer, :pointer], :multi_code - base.attach_function :multi_fdset, :curl_multi_fdset, [:pointer, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::FDSet.ptr, :pointer], :multi_code - base.attach_function :multi_strerror, :curl_multi_strerror, [:int], :string - base.attach_function :multi_setopt, :curl_multi_setopt, [:pointer, :multi_option, :varargs], :multi_code - base.attach_function :multi_socket_action, :curl_multi_socket_action, [:pointer, :int, :socket_readiness, :pointer], :multi_code - - base.attach_function :version, :curl_version, [], :string - base.attach_function :version_info, :curl_version_info, [], Curl::VersionInfoData.ptr - - base.attach_function :slist_append, :curl_slist_append, [:pointer, :string], :pointer - base.attach_function :slist_free_all, :curl_slist_free_all, [:pointer], :void - base.instance_variable_set(:@blocking, true) - - if Curl.windows? - base.ffi_lib 'ws2_32' - else - base.ffi_lib ::FFI::Library::LIBC - end - - base.attach_function :select, [:int, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::Timeval.ptr], :int - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/infos.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/infos.rb deleted file mode 100644 index d285f5b9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/infos.rb +++ /dev/null @@ -1,151 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curls - - # This module contains logic for the available informations - # on an easy, eg.: connect_time. - module Infos - - # Return info types. - # - # @example Return info types. - # Ethon::Curl.info_types - # - # @return [ Hash ] The info types. - def info_types - { - :string =>0x100000, - :long => 0x200000, - :double =>0x300000, - :slist => 0x400000 - } - end - - # http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTDEBUGFUNCTION - # https://github.com/bagder/curl/blob/master/include/curl/curl.h#L378 - # - # @example Return debug info types. - # Ethon::Curl.debug_info_types - # - # @return [ Hash ] The info types available to curl_debug_callback. - def debug_info_types - [ - :text, 0, - :header_in, - :header_out, - :data_in, - :data_out, - :ssl_data_in, - :ssl_data_out - ] - end - - # Return Info details, refer - # https://github.com/bagder/curl/blob/master/src/tool_writeout.c#L66 for details - # - # @example Return infos. - # Ethon::Curl.infos - # - # @return [ Hash ] The infos. - def infos - { - :effective_url => info_types[:string] + 1, - :response_code => info_types[:long] + 2, - :total_time => info_types[:double] + 3, - :namelookup_time => info_types[:double] + 4, - :connect_time => info_types[:double] + 5, - :pretransfer_time => info_types[:double] + 6, - :size_upload => info_types[:double] + 7, - :size_download => info_types[:double] + 8, - :speed_download => info_types[:double] + 9, - :speed_upload => info_types[:double] + 10, - :header_size => info_types[:long] + 11, - :request_size => info_types[:long] + 12, - :ssl_verifyresult => info_types[:long] + 13, - :filetime => info_types[:long] + 14, - :content_length_download =>info_types[:double] + 15, - :content_length_upload => info_types[:double] + 16, - :starttransfer_time => info_types[:double] + 17, - :content_type => info_types[:string] + 18, - :redirect_time => info_types[:double] + 19, - :redirect_count => info_types[:long] + 20, - :private => info_types[:string] + 21, - :http_connectcode => info_types[:long] + 22, - :httpauth_avail => info_types[:long] + 23, - :proxyauth_avail => info_types[:long] + 24, - :os_errno => info_types[:long] + 25, - :num_connects => info_types[:long] + 26, - :ssl_engines => info_types[:slist] + 27, - :cookielist => info_types[:slist] + 28, - :lastsocket => info_types[:long] + 29, - :ftp_entry_path => info_types[:string] + 30, - :redirect_url => info_types[:string] + 31, - :primary_ip => info_types[:string] + 32, - :appconnect_time => info_types[:double] + 33, - :certinfo => info_types[:slist] + 34, - :condition_unmet => info_types[:long] + 35, - :rtsp_session_id => info_types[:string] + 36, - :rtsp_client_cseq => info_types[:long] + 37, - :rtsp_server_cseq => info_types[:long] + 38, - :rtsp_cseq_recv => info_types[:long] + 39, - :primary_port => info_types[:long] + 40, - :local_ip => info_types[:string] + 41, - :local_port => info_types[:long] + 42, - :last =>42 - } - end - - # Return info as string. - # - # @example Return info. - # Curl.get_info_string(:primary_ip, easy) - # - # @param [ Symbol ] option The option name. - # @param [ ::FFI::Pointer ] handle The easy handle. - # - # @return [ String ] The info. - def get_info_string(option, handle) - string_ptr = ::FFI::MemoryPointer.new(:pointer) - - if easy_getinfo(handle, option, :pointer, string_ptr) == :ok - ptr=string_ptr.read_pointer - ptr.null? ? nil : ptr.read_string - end - end - - # Return info as integer. - # - # @example Return info. - # Curl.get_info_long(:response_code, easy) - # - # @param [ Symbol ] option The option name. - # @param [ ::FFI::Pointer ] handle The easy handle. - # - # @return [ Integer ] The info. - def get_info_long(option, handle) - long_ptr = ::FFI::MemoryPointer.new(:long) - - if easy_getinfo(handle, option, :pointer, long_ptr) == :ok - long_ptr.read_long - end - end - - # Return info as float - # - # @example Return info. - # Curl.get_info_double(:response_code, easy) - # - # @param [ Symbol ] option The option name. - # @param [ ::FFI::Pointer ] handle The easy handle. - # - # @return [ Float ] The info. - def get_info_double(option, handle) - double_ptr = ::FFI::MemoryPointer.new(:double) - - if easy_getinfo(handle, option, :pointer, double_ptr) == :ok - double_ptr.read_double - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/messages.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/messages.rb deleted file mode 100644 index 72bc54d5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/messages.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curls - - # This module contains available message codes. - module Messages - - # Return message codes. - # - # @example Return message codes. - # Ethon::Curl.msg_codes - # - # @return [ Array ] The messages codes. - def msg_codes - [:none, :done, :last] - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb deleted file mode 100644 index 0c391d44..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb +++ /dev/null @@ -1,503 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curls - - # This module contains logic for setting options on - # easy or multi interface. - module Options - - OPTION_STRINGS = { :easy => 'easy_options', :multi => 'multi_options' }.freeze - FOPTION_STRINGS = { :easy => 'EASY_OPTIONS', :multi => 'MULTI_OPTIONS' }.freeze - FUNCS = { :easy => 'easy_setopt', :multi => 'multi_setopt' }.freeze - # Sets appropriate option for easy, depending on value type. - def set_option(option, value, handle, type = :easy) - type = type.to_sym unless type.is_a?(Symbol) - raise NameError, "Ethon::Curls::Options unknown type #{type}." unless respond_to?(OPTION_STRINGS[type]) - opthash=send(OPTION_STRINGS[type], nil) - raise Errors::InvalidOption.new(option) unless opthash.include?(option) - - case opthash[option][:type] - when :none - return if value.nil? - value=1 - va_type=:long - when :int - return if value.nil? - va_type=:long - value=value.to_i - when :bool - return if value.nil? - va_type=:long - value=(value&&value!=0) ? 1 : 0 - when :time - return if value.nil? - va_type=:long - value=value.to_i - when :enum - return if value.nil? - va_type=:long - value = case value - when Symbol - opthash[option][:opts][value] - when String - opthash[option][:opts][value.to_sym] - else - value - end.to_i - when :bitmask - return if value.nil? - va_type=:long - value = case value - when Symbol - opthash[option][:opts][value] - when Array - value.inject(0) { |res,v| res|opthash[option][:opts][v] } - else - value - end.to_i - when :string - va_type=:string - value=value.to_s unless value.nil? - when :string_as_pointer - va_type = :pointer - s = '' - s = value.to_s unless value.nil? - value = FFI::MemoryPointer.new(:char, s.bytesize) - value.put_bytes(0, s) - when :string_escape_null - va_type=:string - value=Util.escape_zero_byte(value) unless value.nil? - when :ffipointer - va_type=:pointer - raise Errors::InvalidValue.new(option,value) unless value.nil? or value.is_a? FFI::Pointer - when :curl_slist - va_type=:pointer - raise Errors::InvalidValue.new(option,value) unless value.nil? or value.is_a? FFI::Pointer - when :buffer - raise NotImplementedError, "Ethon::Curls::Options option #{option} buffer type not implemented." - when :dontuse_object - raise NotImplementedError, "Ethon::Curls::Options option #{option} type not implemented." - when :cbdata - raise NotImplementedError, "Ethon::Curls::Options option #{option} callback data type not implemented. Use Ruby closures." - when :callback - va_type=:callback - raise Errors::InvalidValue.new(option,value) unless value.nil? or value.is_a? Proc - when :socket_callback - va_type=:socket_callback - raise Errors::InvalidValue.new(option,value) unless value.nil? or value.is_a? Proc - when :timer_callback - va_type=:timer_callback - raise Errors::InvalidValue.new(option,value) unless value.nil? or value.is_a? Proc - when :debug_callback - va_type=:debug_callback - raise Errors::InvalidValue.new(option,value) unless value.nil? or value.is_a? Proc - when :progress_callback - va_type=:progress_callback - raise Errors::InvalidValue.new(option,value) unless value.nil? or value.is_a? Proc - when :off_t - return if value.nil? - va_type=:int64 - value=value.to_i - end - - if va_type==:long or va_type==:int64 then - bits=FFI.type_size(va_type)*8 - tv=((value<0) ? value.abs-1 : value) - raise Errors::InvalidValue.new(option,value) unless tv<(1< 0, - :objectpoint => 10000, - :functionpoint => 20000, - :off_t => 30000 - } - OPTION_TYPE_MAP = { - :none => :long, - :int => :long, - :bool => :long, - :time => :long, - :enum => :long, # Two ways to specify values (as opts parameter): - # * Array of symbols, these will number sequentially - # starting at 0. Skip elements with nil. (see :netrc) - # * Hash of :symbol => enum_value (See :proxytype) - :bitmask => :long, # Three ways to specify values (as opts parameter): - # * Hash of :symbol => bitmask_value or Array. - # An Array can be an array of already defined - # Symbols, which represents a bitwise or of those - # symbols. (See :httpauth) - # * Array of symbols, these will number the bits - # sequentially (i.e. 0, 1, 2, 4, etc.). Skip - # elements with nil. The last element can be a - # Hash, which will be interpreted as above. - # (See :protocols) - # :all defaults to all bits set - :string => :objectpoint, - :string_escape_null => :objectpoint, - :string_as_pointer => :objectpoint, - :ffipointer => :objectpoint, # FFI::Pointer - :curl_slist => :objectpoint, - :buffer => :objectpoint, # A memory buffer of size defined in the options - :dontuse_object => :objectpoint, # An object we don't support (e.g. FILE*) - :cbdata => :objectpoint, - :callback => :functionpoint, - :socket_callback => :functionpoint, - :timer_callback => :functionpoint, - :debug_callback => :functionpoint, - :progress_callback => :functionpoint, - :off_t => :off_t, - } - - def self.option(ftype,name,type,num,opts=nil) - case type - when :enum - if opts.is_a? Array then - opts=Hash[opts.each_with_index.to_a] - elsif not opts.is_a? Hash then - raise TypeError, "Ethon::Curls::Options #{ftype} #{name} Expected opts to be an Array or a Hash." - end - - when :bitmask - if opts.is_a? Array then - if opts.last.is_a? Hash then - hopts=opts.pop - else - hopts={} - end - opts.each_with_index do |v,i| - next if v.nil? - if i==0 then - hopts[v]=0 - else - hopts[v]=1<<(i-1) - end - end - opts=hopts - elsif not opts.is_a? Hash then - raise TypeError, "Ethon::Curls::Options #{ftype} #{name} Expected opts to be an Array or a Hash." - end - opts[:all]=-1 unless opts.include? :all - opts.each do |k,v| - if v.is_a? Array then - opts[k]=v.map { |b| opts[b] }.inject :| - end - end - - when :buffer - raise TypeError, "Ethon::Curls::Options #{ftype} #{name} Expected opts to be an Array or a Hash." unless opts.is_a? Integer - - else - raise ArgumentError, "Ethon::Curls::Options #{ftype} #{name} Expected no opts." unless opts.nil? - end - opthash=const_get(FOPTION_STRINGS[ftype]) - opthash[name] = { :type => type, - :opt => OPTION_TYPE_BASE[OPTION_TYPE_MAP[type]] + num, - :opts => opts } - end - - def self.option_alias(ftype,name,*aliases) - opthash=const_get(FOPTION_STRINGS[ftype]) - aliases.each { |a| opthash[a]=opthash[name] } - end - - def self.option_type(type) - cname = FOPTION_STRINGS[type] - const_set(cname, {}) - define_method(OPTION_STRINGS[type]) do |rt| - return Ethon::Curls::Options.const_get(cname).map { |k, v| [k, v[:opt]] } if rt == :enum - Ethon::Curls::Options.const_get(cname) - end - end - - # Curl multi options, refer - # Defined @ https://github.com/bagder/curl/blob/master/include/curl/multi.h - # Documentation @ http://curl.haxx.se/libcurl/c/curl_multi_setopt.html - option_type :multi - - option :multi, :socketfunction, :socket_callback, 1 - option :multi, :socketdata, :cbdata, 2 - option :multi, :pipelining, :int, 3 - option :multi, :timerfunction, :timer_callback, 4 - option :multi, :timerdata, :cbdata, 5 - option :multi, :maxconnects, :int, 6 - option :multi, :max_host_connections, :int, 7 - option :multi, :max_pipeline_length, :int, 8 - option :multi, :content_length_penalty_size, :off_t, 9 - option :multi, :chunk_length_penalty_size, :off_t, 10 - option :multi, :pipelining_site_bl, :dontuse_object, 11 - option :multi, :pipelining_server_bl, :dontuse_object, 12 - option :multi, :max_total_connections, :int, 3 - - # Curl easy options - # Defined @ https://github.com/bagder/curl/blob/master/include/curl/curl.h - # Documentation @ http://curl.haxx.se/libcurl/c/curl_easy_setopt.html - ## BEHAVIOR OPTIONS - option_type :easy - - option :easy, :verbose, :bool, 41 - option :easy, :header, :bool, 42 - option :easy, :noprogress, :bool, 43 - option :easy, :nosignal, :bool, 99 - option :easy, :wildcardmatch, :bool, 197 - ## CALLBACK OPTIONS - option :easy, :writefunction, :callback, 11 - option :easy, :file, :cbdata, 1 - option_alias :easy, :file, :writedata - option :easy, :readfunction, :callback, 12 - option :easy, :infile, :cbdata, 9 - option_alias :easy, :infile, :readdata - option :easy, :ioctlfunction, :callback, 130 - option :easy, :ioctldata, :cbdata, 131 - option :easy, :seekfunction, :callback, 167 - option :easy, :seekdata, :cbdata, 168 - option :easy, :sockoptfunction, :callback, 148 - option :easy, :sockoptdata, :cbdata, 149 - option :easy, :opensocketfunction, :callback, 163 - option :easy, :opensocketdata, :cbdata, 164 - option :easy, :closesocketfunction, :callback, 208 - option :easy, :closesocketdata, :cbdata, 209 - option :easy, :path_as_is, :bool, 234 - option :easy, :progressfunction, :progress_callback, 56 - option :easy, :progressdata, :cbdata, 57 - option :easy, :headerfunction, :callback, 79 - option :easy, :writeheader, :cbdata, 29 - option_alias :easy, :writeheader, :headerdata - option :easy, :debugfunction, :debug_callback, 94 - option :easy, :debugdata, :cbdata, 95 - option :easy, :ssl_ctx_function, :callback, 108 - option :easy, :ssl_ctx_data, :cbdata, 109 - option :easy, :conv_to_network_function, :callback, 143 - option :easy, :conv_from_network_function, :callback, 142 - option :easy, :conv_from_utf8_function, :callback, 144 - option :easy, :interleavefunction, :callback, 196 - option :easy, :interleavedata, :cbdata, 195 - option :easy, :chunk_bgn_function, :callback, 198 - option :easy, :chunk_end_function, :callback, 199 - option :easy, :chunk_data, :cbdata, 201 - option :easy, :fnmatch_function, :callback, 200 - option :easy, :fnmatch_data, :cbdata, 202 - option :easy, :xferinfofunction, :progress_callback, 219 - option :easy, :xferinfodata, :cbdata, 57 - ## ERROR OPTIONS - option :easy, :errorbuffer, :buffer, 10, 256 - option :easy, :stderr, :dontuse_object, 37 - option :easy, :failonerror, :bool, 45 - ## NETWORK OPTIONS - option :easy, :url, :string, 2 - option :easy, :protocols, :bitmask, 181, [nil, :http, :https, :ftp, :ftps, :scp, :sftp, :telnet, :ldap, :ldaps, :dict, :file, :tftp, :imap, :imaps, :pop3, :pop3s, :smtp, :smtps, :rtsp, :rtmp, :rtmpt, :rtmpe, :rtmpte, :rtmps, :rtmpts, :gopher] - option :easy, :redir_protocols, :bitmask, 182, [nil, :http, :https, :ftp, :ftps, :scp, :sftp, :telnet, :ldap, :ldaps, :dict, :file, :tftp, :imap, :imaps, :pop3, :pop3s, :smtp, :smtps, :rtsp, :rtmp, :rtmpt, :rtmpe, :rtmpte, :rtmps, :rtmpts, :gopher] - option :easy, :proxy, :string, 4 - option :easy, :proxyport, :int, 59 - option :easy, :proxytype, :enum, 101, [:http, :http_1_0, :https, nil, :socks4, :socks5, :socks4a, :socks5_hostname] - option :easy, :noproxy, :string, 177 - option :easy, :httpproxytunnel, :bool, 61 - option :easy, :socks5_gssapi_service, :string, 179 - option :easy, :socks5_gssapi_nec, :bool, 180 - option :easy, :interface, :string, 62 - option :easy, :localport, :int, 139 - option :easy, :localportrange, :int, 140 - option :easy, :dns_cache_timeout, :int, 92 - option :easy, :dns_use_global_cache, :bool, 91 # Obsolete - option :easy, :dns_interface, :string, 221 - option :easy, :dns_local_ip4, :string, 222 - option :easy, :dns_shuffle_addresses, :bool, 275 - option :easy, :buffersize, :int, 98 - option :easy, :port, :int, 3 - option :easy, :tcp_nodelay, :bool, 121 - option :easy, :address_scope, :int, 171 - option :easy, :tcp_fastopen, :bool, 212 - option :easy, :tcp_keepalive, :bool, 213 - option :easy, :tcp_keepidle, :int, 214 - option :easy, :tcp_keepintvl, :int, 215 - ## NAMES and PASSWORDS OPTIONS (Authentication) - option :easy, :netrc, :enum, 51, [:ignored, :optional, :required] - option :easy, :netrc_file, :string, 118 - option :easy, :userpwd, :string, 5 - option :easy, :proxyuserpwd, :string, 6 - option :easy, :username, :string, 173 - option :easy, :password, :string, 174 - option :easy, :proxyusername, :string, 175 - option :easy, :proxypassword, :string, 176 - option :easy, :httpauth, :bitmask, 107, [:none, :basic, :digest, :gssnegotiate, :ntlm, :digest_ie, :ntlm_wb, {:only => 1<<31, :any => ~0x10, :anysafe => ~0x11, :auto => 0x1f}] - option :easy, :tlsauth_type, :enum, 206, [:none, :srp] - option :easy, :tlsauth_username, :string, 204 - option :easy, :tlsauth_password, :string, 205 - option :easy, :proxyauth, :bitmask, 111, [:none, :basic, :digest, :gssnegotiate, :ntlm, :digest_ie, :ntlm_wb, {:only => 1<<31, :any => ~0x10, :anysafe => ~0x11, :auto => 0x1f}] - option :easy, :sasl_ir, :bool, 218 - ## HTTP OPTIONS - option :easy, :autoreferer, :bool, 58 - option :easy, :accept_encoding, :string, 102 - option_alias :easy, :accept_encoding, :encoding - option :easy, :transfer_encoding, :bool, 207 - option :easy, :followlocation, :bool, 52 - option :easy, :unrestricted_auth, :bool, 105 - option :easy, :maxredirs, :int, 68 - option :easy, :postredir, :bitmask, 161, [:get_all, :post_301, :post_302, :post_303, {:post_all => [:post_301, :post_302, :post_303]}] - option_alias :easy, :postredir, :post301 - option :easy, :put, :bool, 54 - option :easy, :post, :bool, 47 - option :easy, :postfields, :string, 15 - option :easy, :postfieldsize, :int, 60 - option :easy, :postfieldsize_large, :off_t, 120 - option :easy, :copypostfields, :string_as_pointer, 165 - option :easy, :httppost, :ffipointer, 24 - option :easy, :referer, :string, 16 - option :easy, :useragent, :string, 18 - option :easy, :httpheader, :curl_slist, 23 - option :easy, :http200aliases, :curl_slist, 104 - option :easy, :cookie, :string, 22 - option :easy, :cookiefile, :string, 31 - option :easy, :cookiejar, :string, 82 - option :easy, :cookiesession, :bool, 96 - option :easy, :cookielist, :string, 135 - option :easy, :httpget, :bool, 80 - option :easy, :http_version, :enum, 84, [:none, :httpv1_0, :httpv1_1, :httpv2_0, :httpv2_tls, :httpv2_prior_knowledge] - option :easy, :ignore_content_length, :bool, 136 - option :easy, :http_content_decoding, :bool, 158 - option :easy, :http_transfer_decoding, :bool, 157 - ## SMTP OPTIONS - option :easy, :mail_from, :string, 186 - option :easy, :mail_rcpt, :curl_slist, 187 - option :easy, :mail_auth, :string, 217 - ## TFTP OPTIONS - option :easy, :tftp_blksize, :int, 178 - ## FTP OPTIONS - option :easy, :ftpport, :string, 17 - option :easy, :quote, :curl_slist, 28 - option :easy, :postquote, :curl_slist, 39 - option :easy, :prequote, :curl_slist, 93 - option :easy, :dirlistonly, :bool, 48 - option_alias :easy, :dirlistonly, :ftplistonly - option :easy, :append, :bool, 50 - option_alias :easy, :append, :ftpappend - option :easy, :ftp_use_eprt, :bool, 106 - option :easy, :ftp_use_epsv, :bool, 85 - option :easy, :ftp_use_pret, :bool, 188 - option :easy, :ftp_create_missing_dirs, :bool, 110 - option :easy, :ftp_response_timeout, :int, 112 - option_alias :easy, :ftp_response_timeout, :server_response_timeout - option :easy, :ftp_alternative_to_user, :string, 147 - option :easy, :ftp_skip_pasv_ip, :bool, 137 - option :easy, :ftpsslauth, :enum, 129, [:default, :ssl, :tls] - option :easy, :ftp_ssl_ccc, :enum, 154, [:none, :passive, :active] - option :easy, :ftp_account, :string, 134 - option :easy, :ftp_filemethod, :enum, 138, [:default, :multicwd, :nocwd, :singlecwd] - ## RTSP OPTIONS - option :easy, :rtsp_request, :enum, 189, [:none, :options, :describe, :announce, :setup, :play, :pause, :teardown, :get_parameter, :set_parameter, :record, :receive] - option :easy, :rtsp_session_id, :string, 190 - option :easy, :rtsp_stream_uri, :string, 191 - option :easy, :rtsp_transport, :string, 192 - option_alias :easy, :httpheader, :rtspheader - option :easy, :rtsp_client_cseq, :int, 193 - option :easy, :rtsp_server_cseq, :int, 194 - ## PROTOCOL OPTIONS - option :easy, :transfertext, :bool, 53 - option :easy, :proxy_transfer_mode, :bool, 166 - option :easy, :crlf, :bool, 27 - option :easy, :range, :string, 7 - option :easy, :resume_from, :int, 21 - option :easy, :resume_from_large, :off_t, 116 - option :easy, :customrequest, :string, 36 - option :easy, :filetime, :bool, 69 - option :easy, :nobody, :bool, 44 - option :easy, :infilesize, :int, 14 - option :easy, :infilesize_large, :off_t, 115 - option :easy, :upload, :bool, 46 - option :easy, :maxfilesize, :int, 114 - option :easy, :maxfilesize_large, :off_t, 117 - option :easy, :timecondition, :enum, 33, [:none, :ifmodsince, :ifunmodsince, :lastmod] - option :easy, :timevalue, :time, 34 - ## CONNECTION OPTIONS - option :easy, :timeout, :int, 13 - option :easy, :timeout_ms, :int, 155 - option :easy, :low_speed_limit, :int, 19 - option :easy, :low_speed_time, :int, 20 - option :easy, :max_send_speed_large, :off_t, 145 - option :easy, :max_recv_speed_large, :off_t, 146 - option :easy, :maxconnects, :int, 71 - option :easy, :fresh_connect, :bool, 74 - option :easy, :forbid_reuse, :bool, 75 - option :easy, :connecttimeout, :int, 78 - option :easy, :connecttimeout_ms, :int, 156 - option :easy, :ipresolve, :enum, 113, [:whatever, :v4, :v6] - option :easy, :connect_only, :bool, 141 - option :easy, :use_ssl, :enum, 119, [:none, :try, :control, :all] - option_alias :easy, :use_ssl, :ftp_ssl - option :easy, :resolve, :curl_slist, 203 - option :easy, :dns_servers, :string, 211 - option :easy, :accepttimeout_ms, :int, 212 - option :easy, :unix_socket_path, :string, 231 - option :easy, :pipewait, :bool, 237 - option_alias :easy, :unix_socket_path, :unix_socket - ## SSL and SECURITY OPTIONS - option :easy, :sslcert, :string, 25 - option :easy, :sslcerttype, :string, 86 - option :easy, :sslkey, :string, 87 - option :easy, :sslkeytype, :string, 88 - option :easy, :keypasswd, :string, 26 - option_alias :easy, :keypasswd, :sslcertpasswd - option_alias :easy, :keypasswd, :sslkeypasswd - option :easy, :sslengine, :string, 89 - option :easy, :sslengine_default, :none, 90 - option :easy, :sslversion, :enum, 32, [:default, :tlsv1, :sslv2, :sslv3, :tlsv1_0, :tlsv1_1, :tlsv1_2, :tlsv1_3] - option :easy, :ssl_verifypeer, :bool, 64 - option :easy, :cainfo, :string, 65 - option :easy, :issuercert, :string, 170 - option :easy, :capath, :string, 97 - option :easy, :crlfile, :string, 169 - option :easy, :ssl_verifyhost, :int, 81 - option :easy, :certinfo, :bool, 172 - option :easy, :random_file, :string, 76 - option :easy, :egdsocket, :string, 77 - option :easy, :ssl_cipher_list, :string, 83 - option :easy, :ssl_sessionid_cache, :bool, 150 - option :easy, :ssl_options, :bitmask, 216, [nil, :allow_beast] - option :easy, :krblevel, :string, 63 - option_alias :easy, :krblevel, :krb4level - option :easy, :gssapi_delegation, :bitmask, 210, [:none, :policy_flag, :flag] - option :easy, :pinnedpublickey, :string, 230 - option_alias :easy, :pinnedpublickey, :pinned_public_key - ## PROXY SSL OPTIONS - option :easy, :proxy_cainfo, :string, 246 - option :easy, :proxy_capath, :string, 247 - option :easy, :proxy_ssl_verifypeer, :bool, 248 - option :easy, :proxy_ssl_verifyhost, :int, 249 - option :easy, :proxy_sslversion, :enum, 250, [:default, :tlsv1, :sslv2, :sslv3, :tlsv1_0, :tlsv1_1, :tlsv1_2, :tlsv1_3] - option :easy, :proxy_tlsauth_username, :string, 251 - option :easy, :proxy_tlsauth_password, :string, 252 - option :easy, :proxy_tlsauth_type, :enum, 253, [:none, :srp] - option :easy, :proxy_sslcert, :string, 254 - option :easy, :proxy_sslcerttype, :string, 255 - option :easy, :proxy_sslkey, :string, 256 - option :easy, :proxy_sslkeytype, :string, 257 - option :easy, :proxy_keypasswd, :string, 258 - option_alias :easy, :proxy_keypasswd, :proxy_sslcertpasswd - option_alias :easy, :proxy_keypasswd, :proxy_sslkeypasswd - option :easy, :proxy_ssl_cipher_list, :string, 259 - option :easy, :proxy_crlfile, :string, 260 - option :easy, :proxy_ssl_options, :bitmask, 261, [nil, :allow_beast] - option :easy, :pre_proxy, :string, 262 - option :easy, :proxy_pinnedpublickey, :string, 263 - option_alias :easy, :proxy_pinnedpublickey, :proxy_pinned_public_key - option :easy, :proxy_issuercert, :string, 296 - ## SSH OPTIONS - option :easy, :ssh_auth_types, :bitmask, 151, [:none, :publickey, :password, :host, :keyboard, :agent, {:any => [:all], :default => [:any]}] - option :easy, :ssh_host_public_key_md5, :string, 162 - option :easy, :ssh_public_keyfile, :string, 152 - option :easy, :ssh_private_keyfile, :string, 153 - option :easy, :ssh_knownhosts, :string, 183 - option :easy, :ssh_keyfunction, :callback, 184 - option :easy, :khstat, :enum, -1, [:fine_add_to_file, :fine, :reject, :defer] # Kludge to make this enum available... Access via CurL::EASY_OPTIONS[:khstat][:opt] - option :easy, :ssh_keydata, :cbdata, 185 - ## OTHER OPTIONS - option :easy, :private, :cbdata, 103 - option :easy, :share, :dontuse_object, 100 - option :easy, :new_file_perms, :int, 159 - option :easy, :new_directory_perms, :int, 160 - ## TELNET OPTIONS - option :easy, :telnetoptions, :curl_slist, 70 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/settings.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/settings.rb deleted file mode 100644 index 8c0161b4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/curls/settings.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Curl - callback :callback, [:pointer, :size_t, :size_t, :pointer], :size_t - callback :socket_callback, [:pointer, :int, :poll_action, :pointer, :pointer], :multi_code - callback :timer_callback, [:pointer, :long, :pointer], :multi_code - callback :debug_callback, [:pointer, :debug_info_type, :pointer, :size_t, :pointer], :int - callback :progress_callback, [:pointer, :long_long, :long_long, :long_long, :long_long], :int - ffi_lib_flags :now, :global - ffi_lib ['libcurl', 'libcurl.so.4'] - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy.rb deleted file mode 100644 index 355a5194..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy.rb +++ /dev/null @@ -1,315 +0,0 @@ -# frozen_string_literal: true -require 'ethon/easy/informations' -require 'ethon/easy/features' -require 'ethon/easy/callbacks' -require 'ethon/easy/options' -require 'ethon/easy/header' -require 'ethon/easy/util' -require 'ethon/easy/params' -require 'ethon/easy/form' -require 'ethon/easy/http' -require 'ethon/easy/operations' -require 'ethon/easy/response_callbacks' -require 'ethon/easy/debug_info' -require 'ethon/easy/mirror' - -module Ethon - - # This is the class representing the libcurl easy interface - # See http://curl.haxx.se/libcurl/c/libcurl-easy.html for more informations. - # - # @example You can access the libcurl easy interface through this class, every request is based on it. The simplest setup looks like that: - # - # e = Ethon::Easy.new(url: "www.example.com") - # e.perform - # #=> :ok - # - # @example You can the reuse this Easy for the next request: - # - # e.reset # reset easy handle - # e.url = "www.google.com" - # e.followlocation = true - # e.perform - # #=> :ok - # - # @see initialize - class Easy - include Ethon::Easy::Informations - include Ethon::Easy::Callbacks - include Ethon::Easy::Options - include Ethon::Easy::Header - include Ethon::Easy::Http - include Ethon::Easy::Operations - include Ethon::Easy::ResponseCallbacks - extend Ethon::Easy::Features - - # Returns the curl return code. - # - # @return [ Symbol ] The return code. - # * :ok: All fine. Proceed as usual. - # * :unsupported_protocol: The URL you passed to libcurl used a - # protocol that this libcurl does not support. The support - # might be a compile-time option that you didn't use, it can - # be a misspelled protocol string or just a protocol - # libcurl has no code for. - # * :failed_init: Very early initialization code failed. This - # is likely to be an internal error or problem, or a - # resource problem where something fundamental couldn't - # get done at init time. - # * :url_malformat: The URL was not properly formatted. - # * :not_built_in: A requested feature, protocol or option - # was not found built-in in this libcurl due to a build-time - # decision. This means that a feature or option was not enabled - # or explicitly disabled when libcurl was built and in - # order to get it to function you have to get a rebuilt libcurl. - # * :couldnt_resolve_proxy: Couldn't resolve proxy. The given - # proxy host could not be resolved. - # * :couldnt_resolve_host: Couldn't resolve host. The given remote - # host was not resolved. - # * :couldnt_connect: Failed to connect() to host or proxy. - # * :ftp_weird_server_reply: After connecting to a FTP server, - # libcurl expects to get a certain reply back. This error - # code implies that it got a strange or bad reply. The given - # remote server is probably not an OK FTP server. - # * :remote_access_denied: We were denied access to the resource - # given in the URL. For FTP, this occurs while trying to - # change to the remote directory. - # * :ftp_accept_failed: While waiting for the server to connect - # back when an active FTP session is used, an error code was - # sent over the control connection or similar. - # * :ftp_weird_pass_reply: After having sent the FTP password to - # the server, libcurl expects a proper reply. This error code - # indicates that an unexpected code was returned. - # * :ftp_accept_timeout: During an active FTP session while - # waiting for the server to connect, the CURLOPT_ACCEPTTIMOUT_MS - # (or the internal default) timeout expired. - # * :ftp_weird_pasv_reply: libcurl failed to get a sensible result - # back from the server as a response to either a PASV or a - # EPSV command. The server is flawed. - # * :ftp_weird_227_format: FTP servers return a 227-line as a response - # to a PASV command. If libcurl fails to parse that line, - # this return code is passed back. - # * :ftp_cant_get_host: An internal failure to lookup the host used - # for the new connection. - # * :ftp_couldnt_set_type: Received an error when trying to set - # the transfer mode to binary or ASCII. - # * :partial_file: A file transfer was shorter or larger than - # expected. This happens when the server first reports an expected - # transfer size, and then delivers data that doesn't match the - # previously given size. - # * :ftp_couldnt_retr_file: This was either a weird reply to a - # 'RETR' command or a zero byte transfer complete. - # * :quote_error: When sending custom "QUOTE" commands to the - # remote server, one of the commands returned an error code that - # was 400 or higher (for FTP) or otherwise indicated unsuccessful - # completion of the command. - # * :http_returned_error: This is returned if CURLOPT_FAILONERROR is - # set TRUE and the HTTP server returns an error code that is >= 400. - # * :write_error: An error occurred when writing received data to a - # local file, or an error was returned to libcurl from a write callback. - # * :upload_failed: Failed starting the upload. For FTP, the server - # typically denied the STOR command. The error buffer usually - # contains the server's explanation for this. - # * :read_error: There was a problem reading a local file or an error - # returned by the read callback. - # * :out_of_memory: A memory allocation request failed. This is serious - # badness and things are severely screwed up if this ever occurs. - # * :operation_timedout: Operation timeout. The specified time-out - # period was reached according to the conditions. - # * :ftp_port_failed: The FTP PORT command returned error. This mostly - # happens when you haven't specified a good enough address for - # libcurl to use. See CURLOPT_FTPPORT. - # * :ftp_couldnt_use_rest: The FTP REST command returned error. This - # should never happen if the server is sane. - # * :range_error: The server does not support or accept range requests. - # * :http_post_error: This is an odd error that mainly occurs due to - # internal confusion. - # * :ssl_connect_error: A problem occurred somewhere in the SSL/TLS - # handshake. You really want the error buffer and read the message - # there as it pinpoints the problem slightly more. Could be - # certificates (file formats, paths, permissions), passwords, and others. - # * :bad_download_resume: The download could not be resumed because - # the specified offset was out of the file boundary. - # * :file_couldnt_read_file: A file given with FILE:// couldn't be - # opened. Most likely because the file path doesn't identify an - # existing file. Did you check file permissions? - # * :ldap_cannot_bind: LDAP cannot bind. LDAP bind operation failed. - # * :ldap_search_failed: LDAP search failed. - # * :function_not_found: Function not found. A required zlib function was not found. - # * :aborted_by_callback: Aborted by callback. A callback returned - # "abort" to libcurl. - # * :bad_function_argument: Internal error. A function was called with - # a bad parameter. - # * :interface_failed: Interface error. A specified outgoing interface - # could not be used. Set which interface to use for outgoing - # connections' source IP address with CURLOPT_INTERFACE. - # * :too_many_redirects: Too many redirects. When following redirects, - # libcurl hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS. - # * :unknown_option: An option passed to libcurl is not recognized/known. - # Refer to the appropriate documentation. This is most likely a - # problem in the program that uses libcurl. The error buffer might - # contain more specific information about which exact option it concerns. - # * :telnet_option_syntax: A telnet option string was Illegally formatted. - # * :peer_failed_verification: The remote server's SSL certificate or - # SSH md5 fingerprint was deemed not OK. - # * :got_nothing: Nothing was returned from the server, and under the - # circumstances, getting nothing is considered an error. - # * :ssl_engine_notfound: The specified crypto engine wasn't found. - # * :ssl_engine_setfailed: Failed setting the selected SSL crypto engine as default! - # * :send_error: Failed sending network data. - # * :recv_error: Failure with receiving network data. - # * :ssl_certproblem: problem with the local client certificate. - # * :ssl_cipher: Couldn't use specified cipher. - # * :bad_content_encoding: Unrecognized transfer encoding. - # * :ldap_invalid_url: Invalid LDAP URL. - # * :filesize_exceeded: Maximum file size exceeded. - # * :use_ssl_failed: Requested FTP SSL level failed. - # * :send_fail_rewind: When doing a send operation curl had to rewind the data to - # retransmit, but the rewinding operation failed. - # * :ssl_engine_initfailed: Initiating the SSL Engine failed. - # * :login_denied: The remote server denied curl to login - # * :tftp_notfound: File not found on TFTP server. - # * :tftp_perm: Permission problem on TFTP server. - # * :remote_disk_full: Out of disk space on the server. - # * :tftp_illegal: Illegal TFTP operation. - # * :tftp_unknownid: Unknown TFTP transfer ID. - # * :remote_file_exists: File already exists and will not be overwritten. - # * :tftp_nosuchuser: This error should never be returned by a properly - # functioning TFTP server. - # * :conv_failed: Character conversion failed. - # * :conv_reqd: Caller must register conversion callbacks. - # * :ssl_cacert_badfile: Problem with reading the SSL CA cert (path? access rights?): - # * :remote_file_not_found: The resource referenced in the URL does not exist. - # * :ssh: An unspecified error occurred during the SSH session. - # * :ssl_shutdown_failed: Failed to shut down the SSL connection. - # * :again: Socket is not ready for send/recv wait till it's ready and try again. - # This return code is only returned from curl_easy_recv(3) and curl_easy_send(3) - # * :ssl_crl_badfile: Failed to load CRL file - # * :ssl_issuer_error: Issuer check failed - # * :ftp_pret_failed: The FTP server does not understand the PRET command at - # all or does not support the given argument. Be careful when - # using CURLOPT_CUSTOMREQUEST, a custom LIST command will be sent with PRET CMD - # before PASV as well. - # * :rtsp_cseq_error: Mismatch of RTSP CSeq numbers. - # * :rtsp_session_error: Mismatch of RTSP Session Identifiers. - # * :ftp_bad_file_list: Unable to parse FTP file list (during FTP wildcard downloading). - # * :chunk_failed: Chunk callback reported error. - # * :obsolete: These error codes will never be returned. They were used in an old - # libcurl version and are currently unused. - # - # @see http://curl.haxx.se/libcurl/c/libcurl-errors.html - attr_accessor :return_code - - # Initialize a new Easy. - # It initializes curl, if not already done and applies the provided options. - # Look into {Ethon::Easy::Options Options} to see what you can provide in the - # options hash. - # - # @example Create a new Easy. - # Easy.new(url: "www.google.de") - # - # @param [ Hash ] options The options to set. - # @option options :headers [ Hash ] Request headers. - # - # @return [ Easy ] A new Easy. - # - # @see Ethon::Easy::Options - # @see http://curl.haxx.se/libcurl/c/curl_easy_setopt.html - def initialize(options = {}) - Curl.init - set_attributes(options) - set_callbacks - end - - # Set given options. - # - # @example Set options. - # easy.set_attributes(options) - # - # @param [ Hash ] options The options. - # - # @raise InvalidOption - # - # @see initialize - def set_attributes(options) - options.each_pair do |key, value| - method = "#{key}=" - unless respond_to?(method) - raise Errors::InvalidOption.new(key) - end - send(method, value) - end - end - - # Reset easy. This means resetting all options and instance variables. - # Also the easy handle is resetted. - # - # @example Reset. - # easy.reset - def reset - @url = nil - @escape = nil - @hash = nil - @on_complete = nil - @on_headers = nil - @on_body = nil - @on_progress = nil - @procs = nil - @mirror = nil - Curl.easy_reset(handle) - set_callbacks - end - - # Clones libcurl session handle. This means that all options that is set in - # the current handle will be set on duplicated handle. - def dup - e = super - e.handle = Curl.easy_duphandle(handle) - e.instance_variable_set(:@body_write_callback, nil) - e.instance_variable_set(:@header_write_callback, nil) - e.instance_variable_set(:@debug_callback, nil) - e.instance_variable_set(:@progress_callback, nil) - e.set_callbacks - e - end - # Url escapes the value. - # - # @example Url escape. - # easy.escape(value) - # - # @param [ String ] value The value to escape. - # - # @return [ String ] The escaped value. - # - # @api private - def escape(value) - string_pointer = Curl.easy_escape(handle, value, value.bytesize) - returned_string = string_pointer.read_string - Curl.free(string_pointer) - returned_string - end - - # Returns the informations available through libcurl as - # a hash. - # - # @return [ Hash ] The informations hash. - def to_hash - Kernel.warn("Ethon: Easy#to_hash is deprecated and will be removed, please use #mirror.") - mirror.to_hash - end - - def mirror - @mirror ||= Mirror.from_easy(self) - end - - # Return pretty log out. - # - # @example Return log out. - # easy.log_inspect - # - # @return [ String ] The log out. - def log_inspect - "EASY #{mirror.log_informations.map{|k, v| "#{k}=#{v}"}.flatten.join(' ')}" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/callbacks.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/callbacks.rb deleted file mode 100644 index 73f2f210..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/callbacks.rb +++ /dev/null @@ -1,149 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - - # This module contains all the logic around the callbacks, - # which are needed to interact with libcurl. - # - # @api private - module Callbacks - - # :nodoc: - def self.included(base) - base.send(:attr_accessor, *[:response_body, :response_headers, :debug_info]) - end - - # Set writefunction and headerfunction callback. - # They are called by libcurl in order to provide the header and - # the body from the request. - # - # @example Set callbacks. - # easy.set_callbacks - def set_callbacks - Curl.set_option(:writefunction, body_write_callback, handle) - Curl.set_option(:headerfunction, header_write_callback, handle) - Curl.set_option(:debugfunction, debug_callback, handle) - @response_body = String.new - @response_headers = String.new - @headers_called = false - @debug_info = Ethon::Easy::DebugInfo.new - end - - # Returns the body write callback. - # - # @example Return the callback. - # easy.body_write_callback - # - # @return [ Proc ] The callback. - def body_write_callback - @body_write_callback ||= proc do |stream, size, num, object| - headers - result = body(chunk = stream.read_string(size * num)) - @response_body << chunk if result == :unyielded - result != :abort ? size * num : -1 - end - end - - # Returns the header write callback. - # - # @example Return the callback. - # easy.header_write_callback - # - # @return [ Proc ] The callback. - def header_write_callback - @header_write_callback ||= proc {|stream, size, num, object| - result = headers - @response_headers << stream.read_string(size * num) - result != :abort ? size * num : -1 - } - end - - # Returns the debug callback. This callback is currently used - # write the raw http request headers. - # - # @example Return the callback. - # easy.debug_callback - # - # @return [ Proc ] The callback. - def debug_callback - @debug_callback ||= proc {|handle, type, data, size, udata| - message = data.read_string(size) - @debug_info.add type, message - print message unless [:data_in, :data_out].include?(type) - 0 - } - end - - def set_progress_callback - if Curl.version_info[:version] >= "7.32.0" - Curl.set_option(:xferinfofunction, progress_callback, handle) - else - Curl.set_option(:progressfunction, progress_callback, handle) - end - end - - # Returns the progress callback. - # - # @example Return the callback. - # easy.progress_callback - # - # @return [ Proc ] The callback. - def progress_callback - @progress_callback ||= proc { |_, dltotal, dlnow, ultotal, ulnow| - progress(dltotal, dlnow, ultotal, ulnow) - 0 - } - end - - # Set the read callback. This callback is used by libcurl to - # read data when performing a PUT request. - # - # @example Set the callback. - # easy.set_read_callback("a=1") - # - # @param [ String ] body The body. - def set_read_callback(body) - @request_body_read = 0 - readfunction do |stream, size, num, object| - size = size * num - body_size = if body.respond_to?(:bytesize) - body.bytesize - elsif body.respond_to?(:size) - body.size - elsif body.is_a?(File) - File.size(body.path) - end - - left = body_size - @request_body_read - size = left if size > left - - if size > 0 - chunk = if body.respond_to?(:byteslice) - body.byteslice(@request_body_read, size) - elsif body.respond_to?(:read) - body.read(size) - else - body[@request_body_read, size] - end - - stream.write_string( - chunk, size - ) - @request_body_read += size - end - size - end - end - - # Returns the body read callback. - # - # @example Return the callback. - # easy.read_callback - # - # @return [ Proc ] The callback. - def read_callback - @read_callback - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/debug_info.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/debug_info.rb deleted file mode 100644 index d8f15edb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/debug_info.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - - # This class is used to store and retreive debug information, - # which is only saved when verbose is set to true. - # - # @api private - class DebugInfo - - MESSAGE_TYPES = Ethon::Curl::DebugInfoType.to_h.keys - - class Message - attr_reader :type, :message - - def initialize(type, message) - @type = type - @message = message - end - end - - def initialize - @messages = [] - end - - def add(type, message) - @messages << Message.new(type, message) - end - - def messages_for(type) - @messages.select {|m| m.type == type }.map(&:message) - end - - MESSAGE_TYPES.each do |type| - eval %Q|def #{type}; messages_for(:#{type}); end| - end - - def to_a - @messages.map(&:message) - end - - def to_h - Hash[MESSAGE_TYPES.map {|k| [k, send(k)] }] - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/features.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/features.rb deleted file mode 100644 index c4a8962e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/features.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - - # This module contains class methods for feature checks - module Features - # Returns true if this curl version supports zlib. - # - # @example Return wether zlib is supported. - # Ethon::Easy.supports_zlib? - # - # @return [ Boolean ] True if supported, else false. - def supports_zlib? - !!(Curl.version_info[:features] & Curl::VERSION_LIBZ) - end - - # Returns true if this curl version supports AsynchDNS. - # - # @example - # Ethon::Easy.supports_asynch_dns? - # - # @return [ Boolean ] True if supported, else false. - def supports_asynch_dns? - !!(Curl.version_info[:features] & Curl::VERSION_ASYNCHDNS) - end - - alias :supports_timeout_ms? :supports_asynch_dns? - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/form.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/form.rb deleted file mode 100644 index 681d0f9d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/form.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true -require 'ethon/easy/util' -require 'ethon/easy/queryable' - -module Ethon - class Easy - - # This class represents a form and is used to send a payload in the - # request body via POST/PUT. - # It handles multipart forms, too. - # - # @api private - class Form - include Ethon::Easy::Util - include Ethon::Easy::Queryable - - # Return a new Form. - # - # @example Return a new Form. - # Form.new({}) - # - # @param [ Hash ] params The parameter with which to initialize the form. - # - # @return [ Form ] A new Form. - def initialize(easy, params, multipart = nil) - @easy = easy - @params = params || {} - @multipart = multipart - end - - # Return a pointer to the first form element in libcurl. - # - # @example Return the first form element. - # form.first - # - # @return [ FFI::Pointer ] The first element. - def first - @first ||= FFI::MemoryPointer.new(:pointer) - end - - # Return a pointer to the last form element in libcurl. - # - # @example Return the last form element. - # form.last - # - # @return [ FFI::Pointer ] The last element. - def last - @last ||= FFI::MemoryPointer.new(:pointer) - end - - # Return if form is multipart. The form is multipart - # when it contains a file or multipart option is set on the form during creation. - # - # @example Return if form is multipart. - # form.multipart? - # - # @return [ Boolean ] True if form is multipart, else false. - def multipart? - return true if @multipart - query_pairs.any?{|pair| pair.respond_to?(:last) && pair.last.is_a?(Array)} - end - - # Add form elements to libcurl. - # - # @example Add form to libcurl. - # form.materialize - def materialize - query_pairs.each { |pair| form_add(pair.first.to_s, pair.last) } - end - - private - - def form_add(name, content) - case content - when Array - Curl.formadd(first, last, - :form_option, :copyname, :pointer, name, - :form_option, :namelength, :long, name.bytesize, - :form_option, :file, :string, content[2], - :form_option, :filename, :string, content[0], - :form_option, :contenttype, :string, content[1], - :form_option, :end - ) - else - Curl.formadd(first, last, - :form_option, :copyname, :pointer, name, - :form_option, :namelength, :long, name.bytesize, - :form_option, :copycontents, :pointer, content.to_s, - :form_option, :contentslength, :long, content ? content.to_s.bytesize : 0, - :form_option, :end - ) - end - - setup_garbage_collection - end - - def setup_garbage_collection - # first is a pointer to a pointer. Since it's a MemoryPointer it will - # auto clean itself up, but we need to clean up the object it points - # to. So this results in (pseudo-c): - # form_data_cleanup_handler = *first - # curl_form_free(form_data_cleanup_handler) - @form_data_cleanup_handler ||= FFI::AutoPointer.new(@first.get_pointer(0), Curl.method(:formfree)) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/header.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/header.rb deleted file mode 100644 index 8984a249..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/header.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - # This module contains the logic around adding headers to libcurl. - # - # @api private - module Header - # Return headers, return empty hash if none. - # - # @example Return the headers. - # easy.headers - # - # @return [ Hash ] The headers. - def headers - @headers ||= {} - end - - # Set the headers. - # - # @example Set the headers. - # easy.headers = {'User-Agent' => 'ethon'} - # - # @param [ Hash ] headers The headers. - def headers=(headers) - headers ||= {} - header_list = nil - headers.each do |k, v| - header_list = Curl.slist_append(header_list, compose_header(k,v)) - end - Curl.set_option(:httpheader, header_list, handle) - - @header_list = header_list && FFI::AutoPointer.new(header_list, Curl.method(:slist_free_all)) - end - - # Return header_list. - # - # @example Return header_list. - # easy.header_list - # - # @return [ FFI::Pointer ] The header list. - def header_list - @header_list - end - - # Compose libcurl header string from key and value. - # Also replaces null bytes, because libcurl will complain - # otherwise. - # - # @example Compose header. - # easy.compose_header('User-Agent', 'Ethon') - # - # @param [ String ] key The header name. - # @param [ String ] value The header value. - # - # @return [ String ] The composed header. - def compose_header(key, value) - Util.escape_zero_byte("#{key}: #{value}") - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http.rb deleted file mode 100644 index 43598305..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true -require 'ethon/easy/http/actionable' -require 'ethon/easy/http/post' -require 'ethon/easy/http/get' -require 'ethon/easy/http/head' -require 'ethon/easy/http/put' -require 'ethon/easy/http/delete' -require 'ethon/easy/http/patch' -require 'ethon/easy/http/options' -require 'ethon/easy/http/custom' - -module Ethon - class Easy - - # This module contains logic about making valid HTTP requests. - module Http - - # Set specified options in order to make a HTTP request. - # Look at {Ethon::Easy::Options Options} to see what you can - # provide in the options hash. - # - # @example Set options for HTTP request. - # easy.http_request("www.google.com", :get, {}) - # - # @param [ String ] url The url. - # @param [ String ] action_name The HTTP action name. - # @param [ Hash ] options The options hash. - # - # @option options :params [ Hash ] Params hash which - # is attached to the url. - # @option options :body [ Hash ] Body hash which - # becomes the request body. It is a PUT body for - # PUT requests and a POST for everything else. - # @option options :headers [ Hash ] Request headers. - # - # @return [ void ] - # - # @see Ethon::Easy::Options - def http_request(url, action_name, options = {}) - fabricate(url, action_name, options).setup(self) - end - - private - - # Return the corresponding action class. - # - # @example Return the action. - # Action.fabricate(:get) - # Action.fabricate(:smash) - # - # @param [ String ] url The url. - # @param [ String ] action_name The HTTP action name. - # @param [ Hash ] options The option hash. - # - # @return [ Easy::Ethon::Actionable ] The request instance. - def fabricate(url, action_name, options) - constant_name = action_name.to_s.capitalize - - if Ethon::Easy::Http.const_defined?(constant_name) - Ethon::Easy::Http.const_get(constant_name).new(url, options) - else - Ethon::Easy::Http::Custom.new(constant_name.upcase, url, options) - end - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/actionable.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/actionable.rb deleted file mode 100644 index 374a21ce..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/actionable.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true -require 'ethon/easy/http/putable' -require 'ethon/easy/http/postable' - -module Ethon - class Easy - module Http - # This module represents a Http Action and is a factory - # for more real actions like GET, HEAD, POST and PUT. - module Actionable - - QUERY_OPTIONS = [ :params, :body, :params_encoding ] - - # Create a new action. - # - # @example Create a new action. - # Action.new("www.example.com", {}) - # - # @param [ String ] url The url. - # @param [ Hash ] options The options. - # - # @return [ Action ] A new action. - def initialize(url, options) - @url = url - @options, @query_options = parse_options(options) - end - - # Return the url. - # - # @example Return url. - # action.url - # - # @return [ String ] The url. - def url - @url - end - - # Return the options hash. - # - # @example Return options. - # action.options - # - # @return [ Hash ] The options. - def options - @options - end - - # Returns the query options hash. - # - # @example Return query options. - # action.query_options - # - # @return [ Hash ] The query options. - def query_options - @query_options - end - - # Return the params. - # - # @example Return params. - # action.params - # - # @return [ Params ] The params. - def params - @params ||= Params.new(@easy, query_options.fetch(:params, nil)) - end - - # Return the form. - # - # @example Return form. - # action.form - # - # @return [ Form ] The form. - def form - @form ||= Form.new(@easy, query_options.fetch(:body, nil), options.fetch(:multipart, nil)) - end - - # Get the requested array encoding. By default it's - # :typhoeus, but it can also be set to :rack. - # - # @example Get encoding from options - # action.params_encoding - # - def params_encoding - @params_encoding ||= query_options.fetch(:params_encoding, :typhoeus) - end - - # Setup everything necessary for a proper request. - # - # @example setup. - # action.setup(easy) - # - # @param [ easy ] easy the easy to setup. - def setup(easy) - @easy = easy - - # Order is important, @easy will be used to provide access to options - # relevant to the following operations (like whether or not to escape - # values). - easy.set_attributes(options) - - set_form(easy) unless form.empty? - - if params.empty? - easy.url = url - else - set_params(easy) - end - end - - # Setup request with params. - # - # @example Setup nothing. - # action.set_params(easy) - # - # @param [ Easy ] easy The easy to setup. - def set_params(easy) - params.escape = easy.escape? - params.params_encoding = params_encoding - - base_url, base_params = url.split('?') - base_url << '?' - base_url << base_params.to_s - base_url << '&' if base_params - base_url << params.to_s - - easy.url = base_url - end - - # Setup request with form. - # - # @example Setup nothing. - # action.set_form(easy) - # - # @param [ Easy ] easy The easy to setup. - def set_form(easy) - end - - private - - def parse_options(options) - query_options = {} - options = options.dup - - QUERY_OPTIONS.each do |query_option| - if options.key?(query_option) - query_options[query_option] = options.delete(query_option) - end - end - - return options, query_options - end - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/custom.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/custom.rb deleted file mode 100644 index a00f3e34..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/custom.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This class knows everything about making requests for custom HTTP verbs. - class Custom - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Postable - - def initialize(verb, url, options) - @verb = verb - super(url, options) - end - - # Setup easy to make a request. - # - # @example Setup. - # custom.set_params(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - easy.customrequest = @verb - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/delete.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/delete.rb deleted file mode 100644 index 9cc22263..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/delete.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This class knows everything about making DELETE requests. - class Delete - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Postable - - # Setup easy to make a DELETE request. - # - # @example Setup customrequest. - # delete.setup(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - easy.customrequest = "DELETE" - end - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/get.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/get.rb deleted file mode 100644 index 6175e429..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/get.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This class knows everything about making GET requests. - class Get - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Postable - - # Setup easy to make a GET request. - # - # @example Setup. - # get.set_params(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - easy.customrequest = "GET" unless form.empty? - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/head.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/head.rb deleted file mode 100644 index d9bdbd28..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/head.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This class knows everything about making HEAD requests. - class Head - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Postable - - # Setup easy to make a HEAD request. - # - # @example Setup. - # get.set_params(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - easy.nobody = true - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/options.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/options.rb deleted file mode 100644 index 6e12c29c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/options.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This class knows everything about making OPTIONS requests. - class Options - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Postable - - # Setup easy to make a OPTIONS request. - # - # @example Setup. - # options.setup(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - easy.customrequest = "OPTIONS" - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/patch.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/patch.rb deleted file mode 100644 index e6163830..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/patch.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This class knows everything about making PATCH requests. - class Patch - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Postable - - # Setup easy to make a PATCH request. - # - # @example Setup. - # patch.setup(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - easy.customrequest = "PATCH" - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/post.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/post.rb deleted file mode 100644 index f773f790..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/post.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - # This class knows everything about making POST requests. - class Post - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Postable - - # Setup easy to make a POST request. - # - # @example Setup. - # post.setup(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - if form.empty? - easy.postfieldsize = 0 - easy.copypostfields = "" - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/postable.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/postable.rb deleted file mode 100644 index bd42f63f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/postable.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This module contains logic for setting up a [multipart] POST body. - module Postable - - # Set things up when form is provided. - # Deals with multipart forms. - # - # @example Setup. - # post.set_form(easy) - # - # @param [ Easy ] easy The easy to setup. - def set_form(easy) - easy.url ||= url - form.params_encoding = params_encoding - if form.multipart? - form.escape = false - form.materialize - easy.httppost = form.first.read_pointer - else - form.escape = easy.escape? - easy.postfieldsize = form.to_s.bytesize - easy.copypostfields = form.to_s - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/put.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/put.rb deleted file mode 100644 index 202cbeed..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/put.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This class knows everything about making PUT requests. - class Put - include Ethon::Easy::Http::Actionable - include Ethon::Easy::Http::Putable - - # Setup easy to make a PUT request. - # - # @example Setup. - # put.setup(easy) - # - # @param [ Easy ] easy The easy to setup. - def setup(easy) - super - if form.empty? - easy.upload = true - easy.infilesize = 0 - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/putable.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/putable.rb deleted file mode 100644 index a639f06d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/http/putable.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - module Http - - # This module contains logic about setting up a PUT body. - module Putable - # Set things up when form is provided. - # Deals with multipart forms. - # - # @example Setup. - # put.set_form(easy) - # - # @param [ Easy ] easy The easy to setup. - def set_form(easy) - easy.upload = true - form.escape = true - form.params_encoding = params_encoding - easy.infilesize = form.to_s.bytesize - easy.set_read_callback(form.to_s) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/informations.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/informations.rb deleted file mode 100644 index cac62a36..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/informations.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - - # This module contains the methods to return informations - # from the easy handle. See http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html - # for more information. - module Informations - - # Holds available informations and their type, which is needed to - # request the informations from libcurl. - AVAILABLE_INFORMATIONS = { - # Return the available HTTP auth methods. - :httpauth_avail => :long, - - # Return the total time in seconds for the previous - # transfer, including name resolution, TCP connection, etc. - :total_time => :double, - - # Return the time, in seconds, it took from the start - # until the first byte was received by libcurl. This - # includes pre-transfer time and also the time the - # server needs to calculate the result. - :starttransfer_time => :double, - - # Return the time, in seconds, it took from the start - # until the SSL/SSH connect/handshake to the remote - # host was completed. This time is most often very near - # to the pre-transfer time, except for cases such as HTTP - # pipelining where the pre-transfer time can be delayed - # due to waits in line for the pipeline and more. - :appconnect_time => :double, - - # Return the time, in seconds, it took from the start - # until the file transfer was just about to begin. This - # includes all pre-transfer commands and negotiations - # that are specific to the particular protocol(s) involved. - # It does not involve the sending of the protocol- - # specific request that triggers a transfer. - :pretransfer_time => :double, - - # Return the time, in seconds, it took from the start - # until the connect to the remote host (or proxy) was completed. - :connect_time => :double, - - # Return the time, in seconds, it took from the - # start until the name resolution was completed. - :namelookup_time => :double, - - # Return the time, in seconds, it took for all redirection steps - # include name lookup, connect, pretransfer and transfer before the - # final transaction was started. time_redirect shows the complete - # execution time for multiple redirections. (Added in 7.12.3) - :redirect_time => :double, - - # Return the last used effective url. - :effective_url => :string, - - # Return the string holding the IP address of the most recent - # connection done with this curl handle. This string - # may be IPv6 if that's enabled. - :primary_ip => :string, - - # Return the last received HTTP, FTP or SMTP response code. - # The value will be zero if no server response code has - # been received. Note that a proxy's CONNECT response should - # be read with http_connect_code and not this. - :response_code => :long, - - :request_size => :long, - - # Return the total number of redirections that were - # actually followed. - :redirect_count => :long, - - # URL a redirect would take you to, had you enabled redirects (Added in 7.18.2) - :redirect_url => :string, - - # Return the bytes, the total amount of bytes that were uploaded - :size_upload => :double, - - # Return the bytes, the total amount of bytes that were downloaded. - # The amount is only for the latest transfer and will be reset again - # for each new transfer. This counts actual payload data, what's - # also commonly called body. All meta and header data are excluded - # and will not be counted in this number. - :size_download => :double, - - # Return the bytes/second, the average upload speed that curl - # measured for the complete upload - :speed_upload => :double, - - # Return the bytes/second, the average download speed that curl - # measured for the complete download - :speed_download => :double - } - - AVAILABLE_INFORMATIONS.each do |name, type| - eval %Q|def #{name}; Curl.send(:get_info_#{type}, :#{name}, handle); end| - end - - # Returns true if this curl version supports zlib. - # - # @example Return wether zlib is supported. - # easy.supports_zlib? - # - # @return [ Boolean ] True if supported, else false. - # @deprecated Please use the static version instead - def supports_zlib? - Kernel.warn("Ethon: Easy#supports_zlib? is deprecated and will be removed, please use Easy#.") - Easy.supports_zlib? - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/mirror.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/mirror.rb deleted file mode 100644 index f485c9f7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/mirror.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - class Mirror - attr_reader :options - alias_method :to_hash, :options - - INFORMATIONS_TO_MIRROR = Informations::AVAILABLE_INFORMATIONS.keys + - [:return_code, :response_headers, :response_body, :debug_info] - - INFORMATIONS_TO_LOG = [:effective_url, :response_code, :return_code, :total_time] - - def self.from_easy(easy) - options = {} - INFORMATIONS_TO_MIRROR.each do |info| - options[info] = easy.send(info) - end - new(options) - end - - def initialize(options = {}) - @options = options - end - - def log_informations - Hash[*INFORMATIONS_TO_LOG.map do |info| - [info, options[info]] - end.flatten] - end - - INFORMATIONS_TO_MIRROR.each do |info| - eval %Q|def #{info}; options[#{info}]; end| - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/operations.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/operations.rb deleted file mode 100644 index ad5397d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/operations.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - # This module contains the logic to prepare and perform - # an easy. - module Operations - # Returns a pointer to the curl easy handle. - # - # @example Return the handle. - # easy.handle - # - # @return [ FFI::Pointer ] A pointer to the curl easy handle. - def handle - @handle ||= FFI::AutoPointer.new(Curl.easy_init, Curl.method(:easy_cleanup)) - end - - # Sets a pointer to the curl easy handle. - # @param [ ::FFI::Pointer ] Easy handle that will be assigned. - def handle=(h) - @handle = h - end - - # Perform the easy request. - # - # @example Perform the request. - # easy.perform - # - # @return [ Integer ] The return code. - def perform - @return_code = Curl.easy_perform(handle) - if Ethon.logger.debug? - Ethon.logger.debug { "ETHON: performed #{log_inspect}" } - end - complete - @return_code - end - - # Clean up the easy. - # - # @example Perform clean up. - # easy.cleanup - # - # @return the result of the free which is nil - def cleanup - handle.free - end - - # Prepare the easy. Options, headers and callbacks - # were set. - # - # @example Prepare easy. - # easy.prepare - # - # @deprecated It is no longer necessary to call prepare. - def prepare - Ethon.logger.warn( - "ETHON: It is no longer necessary to call "+ - "Easy#prepare. It's going to be removed "+ - "in future versions." - ) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/options.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/options.rb deleted file mode 100644 index 30c4df6a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - - # This module contains the logic and knowledge about the - # available options on easy. - module Options - attr_reader :url - - def url=(value) - @url = value - Curl.set_option(:url, value, handle) - end - - def escape=( b ) - @escape = b - end - - def escape? - return true if !defined?(@escape) || @escape.nil? - @escape - end - - def multipart=(b) - @multipart = b - end - - def multipart? - !!@multipart - end - - Curl.easy_options(nil).each do |opt, props| - method_name = "#{opt}=".freeze - unless method_defined? method_name - define_method(method_name) do |value| - Curl.set_option(opt, value, handle) - value - end - end - next if props[:type] != :callback || method_defined?(opt) - define_method(opt) do |&block| - @procs ||= {} - @procs[opt.to_sym] = block - Curl.set_option(opt, block, handle) - nil - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/params.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/params.rb deleted file mode 100644 index 41dad8b4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/params.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -require 'ethon/easy/util' -require 'ethon/easy/queryable' - -module Ethon - class Easy - - # This class represents HTTP request parameters. - # - # @api private - class Params - include Ethon::Easy::Util - include Ethon::Easy::Queryable - - # Create a new Params. - # - # @example Create a new Params. - # Params.new({}) - # - # @param [ Hash ] params The params to use. - # - # @return [ Params ] A new Params. - def initialize(easy, params) - @easy = easy - @params = params || {} - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/queryable.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/queryable.rb deleted file mode 100644 index 47f79014..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/queryable.rb +++ /dev/null @@ -1,154 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - - # This module contains logic about building - # query parameters for url or form. - module Queryable - - # :nodoc: - def self.included(base) - base.send(:attr_accessor, :escape) - base.send(:attr_accessor, :params_encoding) - end - - # Return wether there are elements in params or not. - # - # @example Return if params is empty. - # form.empty? - # - # @return [ Boolean ] True if params is empty, else false. - def empty? - @params.empty? - end - - # Return the string representation of params. - # - # @example Return string representation. - # params.to_s - # - # @return [ String ] The string representation. - def to_s - @to_s ||= query_pairs.map{ |pair| - return pair if pair.is_a?(String) - - if escape && @easy - pair.map{ |e| @easy.escape(e.to_s) }.join("=") - else - pair.join("=") - end - }.join('&') - end - - # Return the query pairs. - # - # @example Return the query pairs. - # params.query_pairs - # - # @return [ Array ] The query pairs. - def query_pairs - @query_pairs ||= build_query_pairs(@params) - end - - # Return query pairs build from a hash. - # - # @example Build query pairs. - # action.build_query_pairs({a: 1, b: 2}) - # #=> [[:a, 1], [:b, 2]] - # - # @param [ Hash ] hash The hash to go through. - # - # @return [ Array ] The array of query pairs. - def build_query_pairs(hash) - return [hash] if hash.is_a?(String) - - pairs = [] - recursively_generate_pairs(hash, nil, pairs) - pairs - end - - # Return file info for a file. - # - # @example Return file info. - # action.file_info(File.open('fubar', 'r')) - # - # @param [ File ] file The file to handle. - # - # @return [ Array ] Array of informations. - def file_info(file) - filename = File.basename(file.path) - [ - filename, - mime_type(filename), - File.expand_path(file.path) - ] - end - - private - - def mime_type(filename) - if defined?(MIME) && t = MIME::Types.type_for(filename).first - t.to_s - else - 'application/octet-stream' - end - end - - def recursively_generate_pairs(h, prefix, pairs) - case h - when Hash - encode_hash_pairs(h, prefix, pairs) - when Array - if params_encoding == :rack - encode_rack_array_pairs(h, prefix, pairs) - elsif params_encoding == :multi - encode_multi_array_pairs(h, prefix, pairs) - elsif params_encoding == :none - pairs << [prefix, h] - else - encode_indexed_array_pairs(h, prefix, pairs) - end - end - end - - def encode_hash_pairs(h, prefix, pairs) - h.each_pair do |k,v| - key = prefix.nil? ? k : "#{prefix}[#{k}]" - pairs_for(v, key, pairs) - end - end - - def encode_indexed_array_pairs(h, prefix, pairs) - h.each_with_index do |v, i| - key = "#{prefix}[#{i}]" - pairs_for(v, key, pairs) - end - end - - def encode_rack_array_pairs(h, prefix, pairs) - h.each do |v| - key = "#{prefix}[]" - pairs_for(v, key, pairs) - end - end - - def encode_multi_array_pairs(h, prefix, pairs) - h.each_with_index do |v, i| - key = prefix - pairs_for(v, key, pairs) - end - end - - def pairs_for(v, key, pairs) - case v - when Hash, Array - recursively_generate_pairs(v, key, pairs) - when File, Tempfile - pairs << [key, file_info(v)] - else - pairs << [key, v] - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb deleted file mode 100644 index c5dd1a79..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb +++ /dev/null @@ -1,136 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy - - # This module contains the logic for the response callbacks. - # The on_complete callback is the only one at the moment. - # - # You can set multiple callbacks, which are then executed - # in the same order. - # - # easy.on_complete { p 1 } - # easy.on_complete { p 2 } - # easy.complete - # #=> 1 - # #=> 2 - # - # You can clear the callbacks: - # - # easy.on_complete { p 1 } - # easy.on_complete { p 2 } - # easy.on_complete.clear - # easy.on_complete - # #=> [] - module ResponseCallbacks - - # Set on_headers callback. - # - # @example Set on_headers. - # request.on_headers { p "yay" } - # - # @param [ Block ] block The block to execute. - def on_headers(&block) - @on_headers ||= [] - @on_headers << block if block_given? - @on_headers - end - - # Execute on_headers callbacks. - # - # @example Execute on_headers. - # request.headers - def headers - return if @headers_called - @headers_called = true - if defined?(@on_headers) and not @on_headers.nil? - result = nil - @on_headers.each do |callback| - result = callback.call(self) - break if result == :abort - end - result - end - end - - # Set on_complete callback. - # - # @example Set on_complete. - # request.on_complete { p "yay" } - # - # @param [ Block ] block The block to execute. - def on_complete(&block) - @on_complete ||= [] - @on_complete << block if block_given? - @on_complete - end - - # Execute on_complete callbacks. - # - # @example Execute on_completes. - # request.complete - def complete - headers unless @response_headers.empty? - if defined?(@on_complete) and not @on_complete.nil? - @on_complete.each{ |callback| callback.call(self) } - end - end - - # Set on_progress callback. - # - # @example Set on_progress. - # request.on_progress {|dltotal, dlnow, ultotal, ulnow| p "#{dltotal} #{dlnow} #{ultotal} #{ulnow}" } - # - # @param [ Block ] block The block to execute. - def on_progress(&block) - @on_progress ||= [] - if block_given? - @on_progress << block - set_progress_callback - self.noprogress = 0 - end - @on_progress - end - - # Execute on_progress callbacks. - # - # @example Execute on_progress. - # request.body(1, 1, 1, 1) - def progress(dltotal, dlnow, ultotal, ulnow) - if defined?(@on_progress) and not @on_progress.nil? - @on_progress.each{ |callback| callback.call(dltotal, dlnow, ultotal, ulnow) } - end - end - - # Set on_body callback. - # - # @example Set on_body. - # request.on_body { |chunk| p "yay" } - # - # @param [ Block ] block The block to execute. - def on_body(&block) - @on_body ||= [] - @on_body << block if block_given? - @on_body - end - - # Execute on_body callbacks. - # - # @example Execute on_body. - # request.body("This data came from HTTP.") - # - # @return [ Object ] If there are no on_body callbacks, returns the symbol :unyielded. - def body(chunk) - if defined?(@on_body) and not @on_body.nil? - result = nil - @on_body.each do |callback| - result = callback.call(chunk, self) - break if result == :abort - end - result - else - :unyielded - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/util.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/util.rb deleted file mode 100644 index 7649782e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/easy/util.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Easy # :nodoc: - - # This module contains small helpers. - # - # @api private - module Util - - # Escapes zero bytes in strings. - # - # @example Escape zero bytes. - # Util.escape_zero_byte("1\0") - # #=> "1\\0" - # - # @param [ Object ] value The value to escape. - # - # @return [ String, Object ] Escaped String if - # zero byte found, original object if not. - def escape_zero_byte(value) - return value unless value.to_s.include?(0.chr) - value.to_s.gsub(0.chr, '\\\0') - end - - extend self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors.rb deleted file mode 100644 index 17eecadf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -require 'ethon/errors/ethon_error' -require 'ethon/errors/global_init' -require 'ethon/errors/multi_timeout' -require 'ethon/errors/multi_fdset' -require 'ethon/errors/multi_add' -require 'ethon/errors/multi_remove' -require 'ethon/errors/select' -require 'ethon/errors/invalid_option' -require 'ethon/errors/invalid_value' - -module Ethon - - # This namespace contains all errors raised by ethon. - module Errors - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/ethon_error.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/ethon_error.rb deleted file mode 100644 index 84dbf6c5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/ethon_error.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Default Ethon error class for all custom errors. - class EthonError < StandardError - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/global_init.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/global_init.rb deleted file mode 100644 index 816b7749..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/global_init.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raises when global_init failed. - class GlobalInit < EthonError - def initialize - super("An error occured initializing curl.") - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_option.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_option.rb deleted file mode 100644 index 4e558f5c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_option.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raises when option is invalid. - class InvalidOption < EthonError - def initialize(option) - super("The option: #{option} is invalid.") - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_value.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_value.rb deleted file mode 100644 index aedb1096..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_value.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raises when option is invalid. - class InvalidValue < EthonError - def initialize(option, value) - super("The value: #{value} is invalid for option: #{option}.") - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_add.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_add.rb deleted file mode 100644 index a569a31a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_add.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raises when multi_add_handle failed. - class MultiAdd < EthonError - def initialize(code, easy) - super("An error occured adding the easy handle: #{easy} to the multi: #{code}") - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_fdset.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_fdset.rb deleted file mode 100644 index e84be729..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_fdset.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raises when multi_fdset failed. - class MultiFdset < EthonError - def initialize(code) - super("An error occured getting the fdset: #{code}") - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_remove.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_remove.rb deleted file mode 100644 index 36074b3c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_remove.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raises when multi_remove_handle failed. - class MultiRemove < EthonError - def initialize(code, easy) - super("An error occured removing the easy handle: #{easy} from the multi: #{code}") - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_timeout.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_timeout.rb deleted file mode 100644 index 79be3a7f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/multi_timeout.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raised when multi_timeout failed. - class MultiTimeout < EthonError - def initialize(code) - super("An error occured getting the timeout: #{code}") - # "An error occured getting the timeout: #{code}: #{Curl.multi_strerror(code)}" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/select.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/select.rb deleted file mode 100644 index 464a43b7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/errors/select.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true -module Ethon - module Errors - - # Raised when select failed. - class Select < EthonError - def initialize(errno) - super("An error occured on select: #{errno}") - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/libc.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/libc.rb deleted file mode 100644 index 1fddb8ac..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/libc.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -module Ethon - - # FFI Wrapper module for Libc. - # - # @api private - module Libc - extend FFI::Library - ffi_lib 'c' - - # :nodoc: - def self.windows? - Gem.win_platform? - end - - unless windows? - attach_function :getdtablesize, [], :int - attach_function :free, [:pointer], :void - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/loggable.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/loggable.rb deleted file mode 100644 index 02b74781..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/loggable.rb +++ /dev/null @@ -1,59 +0,0 @@ -# encoding: utf-8 -# frozen_string_literal: true -module Ethon - - # Contains logging behaviour. - module Loggable - - # Get the logger. - # - # @note Will try to grab Rails' logger first before creating a new logger - # with stdout. - # - # @example Get the logger. - # Loggable.logger - # - # @return [ Logger ] The logger. - def logger - return @logger if defined?(@logger) - @logger = rails_logger || default_logger - end - - # Set the logger. - # - # @example Set the logger. - # Loggable.logger = Logger.new($stdout) - # - # @param [ Logger ] logger The logger to set. - # - # @return [ Logger ] The new logger. - def logger=(logger) - @logger = logger - end - - private - - # Gets the default Ethon logger - stdout. - # - # @example Get the default logger. - # Loggable.default_logger - # - # @return [ Logger ] The default logger. - def default_logger - logger = Logger.new($stdout) - logger.level = Logger::INFO - logger - end - - # Get the Rails logger if it's defined. - # - # @example Get Rails' logger. - # Loggable.rails_logger - # - # @return [ Logger ] The Rails logger. - def rails_logger - defined?(::Rails) && ::Rails.respond_to?(:logger) && ::Rails.logger - end - end - extend Loggable -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi.rb deleted file mode 100644 index 0919583b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi.rb +++ /dev/null @@ -1,126 +0,0 @@ -# frozen_string_literal: true -require 'ethon/easy/util' -require 'ethon/multi/stack' -require 'ethon/multi/operations' -require 'ethon/multi/options' - -module Ethon - - # This class represents libcurl multi. - class Multi - include Ethon::Multi::Stack - include Ethon::Multi::Operations - include Ethon::Multi::Options - - # Create a new multi. Initialize curl in case - # it didn't happen before. - # - # @example Create a new Multi. - # Multi.new - # - # @param [ Hash ] options The options. - # - # @option options :socketdata [String] - # Pass a pointer to whatever you want passed to the - # curl_socket_callback's forth argument, the userp pointer. This is not - # used by libcurl but only passed-thru as-is. Set the callback pointer - # with CURLMOPT_SOCKETFUNCTION. - # @option options :pipelining [Boolean] - # Pass a long set to 1 to enable or 0 to disable. Enabling pipelining - # on a multi handle will make it attempt to perform HTTP Pipelining as - # far as possible for transfers using this handle. This means that if - # you add a second request that can use an already existing connection, - # the second request will be "piped" on the same connection rather than - # being executed in parallel. (Added in 7.16.0) - # @option options :timerfunction [Proc] - # Pass a pointer to a function matching the curl_multi_timer_callback - # prototype. This function will then be called when the timeout value - # changes. The timeout value is at what latest time the application - # should call one of the "performing" functions of the multi interface - # (curl_multi_socket_action(3) and curl_multi_perform(3)) - to allow - # libcurl to keep timeouts and retries etc to work. A timeout value of - # -1 means that there is no timeout at all, and 0 means that the - # timeout is already reached. Libcurl attempts to limit calling this - # only when the fixed future timeout time actually changes. See also - # CURLMOPT_TIMERDATA. This callback can be used instead of, or in - # addition to, curl_multi_timeout(3). (Added in 7.16.0) - # @option options :timerdata [String] - # Pass a pointer to whatever you want passed to the - # curl_multi_timer_callback's third argument, the userp pointer. This - # is not used by libcurl but only passed-thru as-is. Set the callback - # pointer with CURLMOPT_TIMERFUNCTION. (Added in 7.16.0) - # @option options :maxconnects [Integer] - # Pass a long. The set number will be used as the maximum amount of - # simultaneously open connections that libcurl may cache. Default is - # 10, and libcurl will enlarge the size for each added easy handle to - # make it fit 4 times the number of added easy handles. - # By setting this option, you can prevent the cache size from growing - # beyond the limit set by you. - # When the cache is full, curl closes the oldest one in the cache to - # prevent the number of open connections from increasing. - # This option is for the multi handle's use only, when using the easy - # interface you should instead use the CURLOPT_MAXCONNECTS option. - # (Added in 7.16.3) - # @option options :max_total_connections [Integer] - # Pass a long. The set number will be used as the maximum amount of - # simultaneously open connections in total. For each new session, - # libcurl will open a new connection up to the limit set by - # CURLMOPT_MAX_TOTAL_CONNECTIONS. When the limit is reached, the - # sessions will be pending until there are available connections. - # If CURLMOPT_PIPELINING is 1, libcurl will try to pipeline if the host - # is capable of it. - # The default value is 0, which means that there is no limit. However, - # for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING - # is 1 will not be treated as unlimited. Instead it will open only 1 - # connection and try to pipeline on it. - # (Added in 7.30.0) - # @option options :execution_mode [Boolean] - # Either :perform (default) or :socket_action, specifies the usage - # method that will be used on this multi object. The default :perform - # mode provides a #perform function that uses curl_multi_perform - # behind the scenes to automatically continue execution until all - # requests have completed. The :socket_action mode provides an API - # that allows the {Multi} object to be integrated into an external - # IO loop, by calling #socket_action and responding to the - # socketfunction and timerfunction callbacks, using the underlying - # curl_multi_socket_action semantics. - # - # @return [ Multi ] The new multi. - def initialize(options = {}) - Curl.init - @execution_mode = options.delete(:execution_mode) || :perform - set_attributes(options) - init_vars - end - - # Set given options. - # - # @example Set options. - # multi.set_attributes(options) - # - # @raise InvalidOption - # - # @see initialize - # - # @api private - def set_attributes(options) - options.each_pair do |key, value| - unless respond_to?("#{key}=") - raise Errors::InvalidOption.new(key) - end - method("#{key}=").call(value) - end - end - - private - - # Internal function to gate functions to a specific execution mode - # - # @raise ArgumentError - # - # @api private - def ensure_execution_mode(expected_mode) - raise ArgumentError, "Expected the Multi to be in #{expected_mode} but it was in #{@execution_mode}" if expected_mode != @execution_mode - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/operations.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/operations.rb deleted file mode 100644 index b5c27969..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/operations.rb +++ /dev/null @@ -1,228 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Multi # :nodoc - # This module contains logic to run a multi. - module Operations - STARTED_MULTI = "ETHON: started MULTI" - PERFORMED_MULTI = "ETHON: performed MULTI" - - # Return the multi handle. Inititialize multi handle, - # in case it didn't happened already. - # - # @example Return multi handle. - # multi.handle - # - # @return [ FFI::Pointer ] The multi handle. - def handle - @handle ||= FFI::AutoPointer.new(Curl.multi_init, Curl.method(:multi_cleanup)) - end - - # Initialize variables. - # - # @example Initialize variables. - # multi.init_vars - # - # @return [ void ] - def init_vars - if @execution_mode == :perform - @timeout = ::FFI::MemoryPointer.new(:long) - @timeval = Curl::Timeval.new - @fd_read = Curl::FDSet.new - @fd_write = Curl::FDSet.new - @fd_excep = Curl::FDSet.new - @max_fd = ::FFI::MemoryPointer.new(:int) - elsif @execution_mode == :socket_action - @running_count_pointer = FFI::MemoryPointer.new(:int) - end - end - - # Perform multi. - # - # @return [ nil ] - # - # @example Perform multi. - # multi.perform - def perform - ensure_execution_mode(:perform) - - Ethon.logger.debug(STARTED_MULTI) - while ongoing? - run - timeout = get_timeout - next if timeout == 0 - reset_fds - set_fds(timeout) - end - Ethon.logger.debug(PERFORMED_MULTI) - nil - end - - # Prepare multi. - # - # @return [ nil ] - # - # @example Prepare multi. - # multi.prepare - # - # @deprecated It is no longer necessary to call prepare. - def prepare - Ethon.logger.warn( - "ETHON: It is no longer necessay to call "+ - "Multi#prepare. Its going to be removed "+ - "in future versions." - ) - end - - # Continue execution with an external IO loop. - # - # @example When no sockets are ready yet, or to begin. - # multi.socket_action - # - # @example When a socket is readable - # multi.socket_action(io_object, [:in]) - # - # @example When a socket is readable and writable - # multi.socket_action(io_object, [:in, :out]) - # - # @return [ Symbol ] The Curl.multi_socket_action return code. - def socket_action(io = nil, readiness = 0) - ensure_execution_mode(:socket_action) - - fd = if io.nil? - ::Ethon::Curl::SOCKET_TIMEOUT - elsif io.is_a?(Integer) - io - else - io.fileno - end - - code = Curl.multi_socket_action(handle, fd, readiness, @running_count_pointer) - @running_count = @running_count_pointer.read_int - - check - - code - end - - # Return whether the multi still contains requests or not. - # - # @example Return if ongoing. - # multi.ongoing? - # - # @return [ Boolean ] True if ongoing, else false. - def ongoing? - easy_handles.size > 0 || (!defined?(@running_count) || running_count > 0) - end - - private - - # Get timeout. - # - # @example Get timeout. - # multi.get_timeout - # - # @return [ Integer ] The timeout. - # - # @raise [ Ethon::Errors::MultiTimeout ] If getting the timeout fails. - def get_timeout - code = Curl.multi_timeout(handle, @timeout) - raise Errors::MultiTimeout.new(code) unless code == :ok - timeout = @timeout.read_long - timeout = 1 if timeout < 0 - timeout - end - - # Reset file describtors. - # - # @example Reset fds. - # multi.reset_fds - # - # @return [ void ] - def reset_fds - @fd_read.clear - @fd_write.clear - @fd_excep.clear - end - - # Set fds. - # - # @example Set fds. - # multi.set_fds - # - # @return [ void ] - # - # @raise [ Ethon::Errors::MultiFdset ] If setting the file descriptors fails. - # @raise [ Ethon::Errors::Select ] If select fails. - def set_fds(timeout) - code = Curl.multi_fdset(handle, @fd_read, @fd_write, @fd_excep, @max_fd) - raise Errors::MultiFdset.new(code) unless code == :ok - max_fd = @max_fd.read_int - if max_fd == -1 - sleep(0.001) - else - @timeval[:sec] = timeout / 1000 - @timeval[:usec] = (timeout * 1000) % 1000000 - loop do - code = Curl.select(max_fd + 1, @fd_read, @fd_write, @fd_excep, @timeval) - break unless code < 0 && ::FFI.errno == Errno::EINTR::Errno - end - raise Errors::Select.new(::FFI.errno) if code < 0 - end - end - - # Check. - # - # @example Check. - # multi.check - # - # @return [ void ] - def check - msgs_left = ::FFI::MemoryPointer.new(:int) - while true - msg = Curl.multi_info_read(handle, msgs_left) - break if msg.null? - next if msg[:code] != :done - easy = easy_handles.find{ |e| e.handle == msg[:easy_handle] } - easy.return_code = msg[:data][:code] - Ethon.logger.debug { "ETHON: performed #{easy.log_inspect}" } - delete(easy) - easy.complete - end - end - - # Run. - # - # @example Run - # multi.run - # - # @return [ void ] - def run - running_count_pointer = FFI::MemoryPointer.new(:int) - begin code = trigger(running_count_pointer) end while code == :call_multi_perform - check - end - - # Trigger. - # - # @example Trigger. - # multi.trigger - # - # @return [ Symbol ] The Curl.multi_perform return code. - def trigger(running_count_pointer) - code = Curl.multi_perform(handle, running_count_pointer) - @running_count = running_count_pointer.read_int - code - end - - # Return number of running requests. - # - # @example Return count. - # multi.running_count - # - # @return [ Integer ] Number running requests. - def running_count - @running_count ||= nil - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/options.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/options.rb deleted file mode 100644 index 08a3c03e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/options.rb +++ /dev/null @@ -1,117 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Multi - - # This module contains the logic and knowledge about the - # available options on multi. - module Options - - # Sets max_total_connections option. - # - # @example Set max_total_connections option. - # multi.max_total_conections = $value - # - # @param [ String ] value The value to set. - # - # @return [ void ] - def max_total_connections=(value) - Curl.set_option(:max_total_connections, value_for(value, :int), handle, :multi) - end - - # Sets maxconnects option. - # - # @example Set maxconnects option. - # multi.maxconnects = $value - # - # @param [ String ] value The value to set. - # - # @return [ void ] - def maxconnects=(value) - Curl.set_option(:maxconnects, value_for(value, :int), handle, :multi) - end - - # Sets pipelining option. - # - # @example Set pipelining option. - # multi.pipelining = $value - # - # @param [ String ] value The value to set. - # - # @return [ void ] - def pipelining=(value) - Curl.set_option(:pipelining, value_for(value, :int), handle, :multi) - end - - # Sets socketdata option. - # - # @example Set socketdata option. - # multi.socketdata = $value - # - # @param [ String ] value The value to set. - # - # @return [ void ] - def socketdata=(value) - Curl.set_option(:socketdata, value_for(value, :string), handle, :multi) - end - - # Sets socketfunction option. - # - # @example Set socketfunction option. - # multi.socketfunction = $value - # - # @param [ String ] value The value to set. - # - # @return [ void ] - def socketfunction=(value) - Curl.set_option(:socketfunction, value_for(value, :string), handle, :multi) - end - - # Sets timerdata option. - # - # @example Set timerdata option. - # multi.timerdata = $value - # - # @param [ String ] value The value to set. - # - # @return [ void ] - def timerdata=(value) - Curl.set_option(:timerdata, value_for(value, :string), handle, :multi) - end - - # Sets timerfunction option. - # - # @example Set timerfunction option. - # multi.timerfunction = $value - # - # @param [ String ] value The value to set. - # - # @return [ void ] - def timerfunction=(value) - Curl.set_option(:timerfunction, value_for(value, :string), handle, :multi) - end - - private - - # Return the value to set to multi handle. It is converted with the help - # of bool_options, enum_options and int_options. - # - # @example Return casted the value. - # multi.value_for(:verbose) - # - # @return [ Object ] The casted value. - def value_for(value, type, option = nil) - return nil if value.nil? - - if type == :bool - value ? 1 : 0 - elsif type == :int - value.to_i - elsif value.is_a?(String) - Ethon::Easy::Util.escape_zero_byte(value) - else - value - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/stack.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/stack.rb deleted file mode 100644 index 4c6381c1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/multi/stack.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -module Ethon - class Multi - - # This module provides the multi stack behaviour. - module Stack - - # Return easy handles. - # - # @example Return easy handles. - # multi.easy_handles - # - # @return [ Array ] The easy handles. - def easy_handles - @easy_handles ||= [] - end - - # Add an easy to the stack. - # - # @example Add easy. - # multi.add(easy) - # - # @param [ Easy ] easy The easy to add. - # - # @raise [ Ethon::Errors::MultiAdd ] If adding an easy failed. - def add(easy) - return nil if easy_handles.include?(easy) - - code = Curl.multi_add_handle(handle, easy.handle) - raise Errors::MultiAdd.new(code, easy) unless code == :ok - easy_handles << easy - end - - # Delete an easy from stack. - # - # @example Delete easy from stack. - # - # @param [ Easy ] easy The easy to delete. - # - # @raise [ Ethon::Errors::MultiRemove ] If removing an easy failed. - def delete(easy) - if easy_handles.delete(easy) - code = Curl.multi_remove_handle(handle, easy.handle) - raise Errors::MultiRemove.new(code, handle) unless code == :ok - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/version.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/version.rb deleted file mode 100644 index 640f68d3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/lib/ethon/version.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -module Ethon - - # Ethon version. - VERSION = '0.16.0' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/benchmarks.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/benchmarks.rb deleted file mode 100644 index 6cd68ca0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/benchmarks.rb +++ /dev/null @@ -1,104 +0,0 @@ -# encoding: utf-8 -# frozen_string_literal: true -require 'ethon' -require 'open-uri' -require 'patron' -require 'curb' -require 'net/http' -require 'cgi' -require 'benchmark/ips' - -require_relative '../spec/support/server' -require_relative '../spec/support/localhost_server' - -LocalhostServer.new(TESTSERVER.new, 3000) -LocalhostServer.new(TESTSERVER.new, 3001) -LocalhostServer.new(TESTSERVER.new, 3002) - -url = 'http://localhost:3000/'.freeze -uri = URI.parse('http://localhost:3000/').freeze -ethon = Ethon::Easy.new(url: url) -patron = Patron::Session.new -patron_url = Patron::Session.new(base_url: url) -curb = Curl::Easy.new(url) - -puts '[Creation]' -Benchmark.ips do |x| - x.report('String.new') { '' } - x.report('Easy.new') { Ethon::Easy.new } -end - -puts '[Escape]' -Benchmark.ips do |x| - x.report('CGI.escape') { CGI.escape("まつもと") } - x.report('Easy.escape') { ethon.escape("まつもと") } -end - -puts '[Requests]' -Benchmark.ips do |x| - x.report('net/http') { Net::HTTP.get_response(uri) } - x.report('open-uri') { open url } - - x.report('patron') do - patron.base_url = url - patron.get('/') - end - - x.report('patron reuse') { patron_url.get('/') } - - x.report('curb') do - curb.url = url - curb.perform - end - - x.report('curb reuse') { curb.perform } - - x.report('Easy.perform') do - ethon.url = url - ethon.perform - end - - x.report('Easy.perform reuse') { ethon.perform } -end - -puts "[ 4 delayed Requests ]" -Benchmark.ips do |x| - x.report('net/http') do - 3.times do |i| - uri = URI.parse("http://localhost:300#{i}/?delay=1") - Net::HTTP.get_response(uri) - end - end - - x.report("open-uri") do - 3.times do |i| - open("http://localhost:300#{i}/?delay=1") - end - end - - x.report("patron") do - sess = Patron::Session.new - 3.times do |i| - sess.base_url = "http://localhost:300#{i}/?delay=1" - sess.get("/") - end - end - - x.report("Easy.perform") do - easy = Ethon::Easy.new - 3.times do |i| - easy.url = "http://localhost:300#{i}/?delay=1" - easy.perform - end - end - - x.report("Multi.perform") do - multi = Ethon::Multi.new - 3.times do |i| - easy = Ethon::Easy.new - easy.url = "http://localhost:300#{i}/?delay=1" - multi.add(easy) - end - multi.perform - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/memory_leaks.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/memory_leaks.rb deleted file mode 100644 index 32000b80..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/memory_leaks.rb +++ /dev/null @@ -1,114 +0,0 @@ -# frozen_string_literal: true -require 'ethon' -require 'ethon/easy' - -require_relative 'perf_spec_helper' -require 'rspec/autorun' - -describe "low-level interactions with libcurl" do - describe Ethon::Multi do - memory_leak_test("init") do - Ethon::Multi.new - end - - memory_leak_test("handle") do - Ethon::Multi.new.handle - end - end - - describe Ethon::Easy do - memory_leak_test("init") do - Ethon::Easy.new - end - - memory_leak_test("handle") do - Ethon::Easy.new.handle - end - - memory_leak_test("headers") do - Ethon::Easy.new.headers = { "a" => 1, "b" => 2, "c" => 3, "d" => 4} - end - - memory_leak_test("escape") do - Ethon::Easy.new.escape("the_sky&is_blue") - end - end - - - describe Ethon::Easy::Form do - memory_leak_test("init") do - Ethon::Easy::Form.new(nil, {}) - end - - memory_leak_test("first") do - Ethon::Easy::Form.new(nil, {}).first - end - - memory_leak_test("last") do - Ethon::Easy::Form.new(nil, {}).last - end - - memory_leak_test("materialized with some params") do - form = Ethon::Easy::Form.new(nil, { "a" => "1" }) - form.materialize - end - - memory_leak_test("materialized with a file") do - File.open(__FILE__, "r") do |file| - form = Ethon::Easy::Form.new(nil, { "a" => file }) - form.materialize - end - end - end -end - -describe "higher level operations" do - memory_leak_test("a simple request") do - Ethon::Easy.new(:url => "http://localhost:3001/", - :forbid_reuse => true).perform - end - - memory_leak_test("a request with headers") do - Ethon::Easy.new(:url => "http://localhost:3001/", - :headers => { "Content-Type" => "application/json", - "Something" => "1", - "Else" => "qwerty", - "Long-String" => "aassddffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz"}, - :forbid_reuse => true).perform - end - - memory_leak_test("a request with headers and params") do - easy = Ethon::Easy.new(:url => "http://localhost:3001/", - :headers => { "Content-Type" => "application/json", - "Something" => "1", - "Else" => "qwerty", - "Long-String" => "aassddffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz"}, - :forbid_reuse => true) - easy.http_request("http://localhost:3001/", - :get, - :params => { "param1" => "value1", - "param2" => "value2", - "param3" => "value3", - "param4" => "value4"}) - end - - memory_leak_test("a request with headers, params, and body") do - easy = Ethon::Easy.new(:url => "http://localhost:3001/", - :headers => { "Content-Type" => "application/json", - "Something" => "1", - "Else" => "qwerty", - "Long-String" => "aassddffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz"}, - :forbid_reuse => true) - easy.http_request("http://localhost:3001/", - :get, - :params => { "param1" => "value1", - "param2" => "value2", - "param3" => "value3", - "param4" => "value4"}, - :body => { - "body1" => "value1", - "body2" => "value2", - "body3" => "value3" - }) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/perf_spec_helper.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/perf_spec_helper.rb deleted file mode 100644 index 35fd623d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/perf_spec_helper.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -#### SETUP -require 'bundler' -Bundler.setup -require 'rspec' - -require 'support/localhost_server' -require 'support/server' -require_relative 'support/memory_test_helpers' - -require 'logger' - -if ENV['VERBOSE'] - Ethon.logger = Logger.new($stdout) - Ethon.logger.level = Logger::DEBUG -end - -RSpec.configure do |config| - config.before(:suite) do - LocalhostServer.new(TESTSERVER.new, 3001) - end - config.include(MemoryTestHelpers) - config.extend(MemoryTestHelpers::TestMethods) -end - -MemoryTestHelpers.setup -MemoryTestHelpers.logger = Logger.new($stdout) -MemoryTestHelpers.logger.level = Logger::INFO -MemoryTestHelpers.logger.formatter = proc do |severity, datetime, progname, msg| - "\t\t#{msg}\n" -end - -if ENV['VERBOSE'] - MemoryTestHelpers.logger.level = Logger::DEBUG -end - -MemoryTestHelpers.iterations = ENV.fetch("ITERATIONS", 10_000).to_i diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/memory_test_helpers.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/memory_test_helpers.rb deleted file mode 100644 index bfb6ff47..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/memory_test_helpers.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true -require_relative 'ruby_object_leak_tracker' -require_relative 'os_memory_leak_tracker' - -module MemoryTestHelpers - class << self - attr_accessor :gc_proc, :iterations, :logger - - def setup - if RUBY_PLATFORM == "java" - # for leak detection - JRuby.objectspace = true if defined?(JRuby) - # for gc - require 'java' - java_import 'java.lang.System' - self.gc_proc = proc { System.gc } - else - self.gc_proc = proc { GC.start } - end - end - end - - module TestMethods - def memory_leak_test(description, &block) - context(description) do - it "doesn't leak ruby objects" do - object_leak_tracker = RubyObjectLeakTracker.new - track_memory_usage(object_leak_tracker, &block) - object_leak_tracker.total_difference_between_runs.should be <= 10 - end - - it "doesn't leak OS memory (C interop check)" do - os_memory_leak_tracker = OSMemoryLeakTracker.new - track_memory_usage(os_memory_leak_tracker, &block) - os_memory_leak_tracker.total_difference_between_runs.should be <= 10 - end - end - end - end - - def track_memory_usage(tracker) - # Intentionally do all this setup before we do any testing - logger = MemoryTestHelpers.logger - iterations = MemoryTestHelpers.iterations - - checkpoint_frequency = (iterations / 10.0).to_i - gc_frequency = 20 - - warmup_iterations = [(iterations / 3.0).to_i, 500].min - logger.info "Performing #{warmup_iterations} warmup iterations" - warmup_iterations.times do - yield - MemoryTestHelpers.gc_proc.call - end - tracker.capture_initial_memory_usage - - logger.info "Performing #{iterations} iterations (checkpoint every #{checkpoint_frequency})" - - iterations.times do |i| - yield - - last_iteration = (i == iterations - 1) - checkpoint = last_iteration || (i % checkpoint_frequency == 0) - - if checkpoint || (i % gc_frequency == 0) - MemoryTestHelpers.gc_proc.call - end - - if checkpoint - logger.info "Iteration #{i} checkpoint" - tracker.capture_memory_usage - tracker.dump_status(logger) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/os_memory_leak_tracker.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/os_memory_leak_tracker.rb deleted file mode 100644 index d9e62d4b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/os_memory_leak_tracker.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -class OSMemoryLeakTracker - attr_reader :current_run - - def initialize - @previous_run = @current_run = 0 - end - - def difference_between_runs(basis=@previous_run) - @current_run - basis - end - - def total_difference_between_runs - difference_between_runs(@initial_count_run) - end - - def capture_initial_memory_usage - capture_memory_usage - @initial_count_run = @current_run - end - - def capture_memory_usage - @previous_run = @current_run - @current_run = rss_bytes - end - - def dump_status(logger) - delta = difference_between_runs - logger.add(log_level(delta), sprintf("\tTotal memory usage (kb): %d (%+d)", current_run, delta)) - end - - private - # amount of memory the current process "is using", in RAM - # (doesn't include any swap memory that it may be using, just that in actual RAM) - # Code loosely based on https://github.com/rdp/os/blob/master/lib/os.rb - # returns 0 on windows - def rss_bytes - if ENV['OS'] == 'Windows_NT' - 0 - else - `ps -o rss= -p #{Process.pid}`.to_i # in kilobytes - end - end - - def log_level(delta) - delta > 0 ? Logger::WARN : Logger::DEBUG - end -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/ruby_object_leak_tracker.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/ruby_object_leak_tracker.rb deleted file mode 100644 index afcce5a8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/profile/support/ruby_object_leak_tracker.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -class RubyObjectLeakTracker - attr_reader :previous_count_hash, :current_count_hash - - def initialize - @previous_count_hash = @current_count_hash = {} - end - - def difference_between_runs(basis=@previous_count_hash) - @difference_between_runs ||= Hash[@current_count_hash.map do |object_class, count| - [object_class, count - (basis[object_class] || 0)] - end] - end - - def total_difference_between_runs - difference_between_runs(@initial_count_hash).values.inject(0) { |sum, count| sum + count } - end - - def capture_initial_memory_usage - capture_memory_usage - @initial_count_hash = @current_count_hash - end - - def capture_memory_usage - @difference_between_runs = nil - @previous_count_hash = @current_count_hash - - class_to_count = Hash.new { |hash, key| hash[key] = 0 } - ObjectSpace.each_object { |obj| class_to_count[obj.class] += 1 } - - sorted_class_to_count = class_to_count.sort_by { |k, v| -v } - @current_count_hash = Hash[sorted_class_to_count] - end - - def dump_status(logger) - diff = difference_between_runs - most_used_objects = current_count_hash.to_a.sort_by(&:last).reverse[0, 20] - - most_used_objects.each do |object_class, count| - delta = diff[object_class] - logger.add(log_level(delta), sprintf("\t%s: %d (%+d)", object_class, count, delta)) - end - end - - private - def log_level(delta) - delta > 0 ? Logger::WARN : Logger::DEBUG - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/curl_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/curl_spec.rb deleted file mode 100644 index 24d37263..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/curl_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Curl do - describe ".init" do - before { Ethon::Curl.send(:class_variable_set, :@@initialized, false) } - - context "when global_init fails" do - it "raises global init error" do - expect(Ethon::Curl).to receive(:global_init).and_return(1) - expect{ Ethon::Curl.init }.to raise_error(Ethon::Errors::GlobalInit) - end - end - - context "when global_init works" do - before { expect(Ethon::Curl).to receive(:global_init).and_return(0) } - - it "doesn't raises global init error" do - expect{ Ethon::Curl.init }.to_not raise_error - end - - it "logs" do - expect(Ethon.logger).to receive(:debug) - Ethon::Curl.init - end - end - - context "when global_cleanup is called" do - before { expect(Ethon::Curl).to receive(:global_cleanup) } - - it "logs" do - expect(Ethon.logger).to receive(:debug).twice - Ethon::Curl.init - Ethon::Curl.cleanup - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/callbacks_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/callbacks_spec.rb deleted file mode 100644 index 2fa75da9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/callbacks_spec.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Callbacks do - let!(:easy) { Ethon::Easy.new } - - describe "#set_callbacks" do - before do - expect(Ethon::Curl).to receive(:set_option).exactly(3).times - end - - it "sets write-, debug-, and headerfunction" do - easy.set_callbacks - end - - it "resets @response_body" do - easy.set_callbacks - expect(easy.instance_variable_get(:@response_body)).to eq("") - end - - it "resets @response_headers" do - easy.set_callbacks - expect(easy.instance_variable_get(:@response_headers)).to eq("") - end - - it "resets @debug_info" do - easy.set_callbacks - expect(easy.instance_variable_get(:@debug_info).to_a).to eq([]) - end - end - - describe "#progress_callback" do - it "returns 0" do - expect(easy.progress_callback.call(0,1,1,1,1)).to be(0) - end - end - - describe "#body_write_callback" do - let(:body_write_callback) { easy.instance_variable_get(:@body_write_callback) } - let(:stream) { double(:read_string => "") } - context "when body returns not :abort" do - it "returns number bigger than 0" do - expect(body_write_callback.call(stream, 1, 1, nil) > 0).to be(true) - end - end - - context "when body returns :abort" do - before do - easy.on_body.clear - easy.on_body { :abort } - end - let(:body_write_callback) { easy.instance_variable_get(:@body_write_callback) } - - it "returns -1 to indicate abort to libcurl" do - expect(body_write_callback.call(stream, 1, 1, nil)).to eq(-1) - end - end - end - - describe "#header_write_callback" do - let(:header_write_callback) { easy.instance_variable_get(:@header_write_callback) } - let(:stream) { double(:read_string => "") } - context "when header returns not :abort" do - it "returns number bigger than 0" do - expect(header_write_callback.call(stream, 1, 1, nil) > 0).to be(true) - end - end - - context "when header returns :abort" do - before do - easy.on_headers.clear - easy.on_headers { :abort } - end - let(:header_write_callback) { easy.instance_variable_get(:@header_write_callback) } - - it "returns -1 to indicate abort to libcurl" do - expect(header_write_callback.call(stream, 1, 1, nil)).to eq(-1) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/debug_info_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/debug_info_spec.rb deleted file mode 100644 index 8dccc388..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/debug_info_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::DebugInfo do - let(:easy) { Ethon::Easy.new } - - before do - easy.url = "http://localhost:3001/" - easy.perform - end - - describe "#debug_info" do - context "when verbose is not set to true" do - it "does not save any debug info after a request" do - expect(easy.debug_info.to_a.length).to eq(0) - expect(easy.debug_info.to_h.values.flatten.length).to eq(0) - end - end - - context "when verbose is set to true" do - before do - easy.verbose = true - easy.perform - end - - after do - easy.verbose = false - easy.reset - end - - it "saves debug info after a request" do - expect(easy.debug_info.to_a.length).to be > 0 - end - - it "saves request headers" do - expect(easy.debug_info.header_out.join).to include('GET / HTTP/1.1') - end - - it "saves response headers" do - expect(easy.debug_info.header_in.length).to be > 0 - expect(easy.response_headers).to include(easy.debug_info.header_in.join) - end - - it "saves incoming data" do - expect(easy.debug_info.data_in.length).to be > 0 - expect(easy.response_body).to include(easy.debug_info.data_in.join) - end - - it "saves debug text" do - expect(easy.debug_info.text.length).to be > 0 - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/features_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/features_spec.rb deleted file mode 100644 index b174948f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/features_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Informations do - - describe "#supports_asynch_dns?" do - it "returns boolean" do - expect([true, false].include? Ethon::Easy.supports_asynch_dns?).to be_truthy - end - end - - describe "#supports_zlib?" do - it "returns boolean" do - expect([true, false].include? Ethon::Easy.supports_zlib?).to be_truthy - end - end - - describe "#supports_timeout_ms?" do - it "returns boolean" do - expect([true, false].include? Ethon::Easy.supports_timeout_ms?).to be_truthy - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/form_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/form_spec.rb deleted file mode 100644 index 4cd34d96..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/form_spec.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Form do - let(:hash) { {} } - let!(:easy) { Ethon::Easy.new } - let(:form) { Ethon::Easy::Form.new(easy, hash) } - - describe ".new" do - it "assigns attribute to @params" do - expect(form.instance_variable_get(:@params)).to eq(hash) - end - end - - describe "#first" do - it "returns a pointer" do - expect(form.first).to be_a(FFI::Pointer) - end - end - - describe "#last" do - it "returns a pointer" do - expect(form.first).to be_a(FFI::Pointer) - end - end - - describe "#multipart?" do - before { form.instance_variable_set(:@query_pairs, pairs) } - - context "when query_pairs contains string values" do - let(:pairs) { [['a', '1'], ['b', '2']] } - - it "returns false" do - expect(form.multipart?).to be_falsey - end - end - - context "when query_pairs contains file" do - let(:pairs) { [['a', '1'], ['b', ['path', 'encoding', 'abs_path']]] } - - it "returns true" do - expect(form.multipart?).to be_truthy - end - end - - context "when options contains multipart=true" do - before { form.instance_variable_set(:@multipart, true) } - let(:pairs) { [['a', '1'], ['b', '2']] } - - it "returns true" do - expect(form.multipart?).to be_truthy - end - end - end - - describe "#materialize" do - before { form.instance_variable_set(:@query_pairs, pairs) } - - context "when query_pairs contains string values" do - let(:pairs) { [['a', '1']] } - - it "adds params to form" do - expect(Ethon::Curl).to receive(:formadd) - form.materialize - end - end - - context "when query_pairs contains nil" do - let(:pairs) { [['a', nil]] } - - it "adds params to form" do - expect(Ethon::Curl).to receive(:formadd) - form.materialize - end - end - - context "when query_pairs contains file" do - let(:pairs) { [['a', ["file", "type", "path/file"]]] } - - it "adds file to form" do - expect(Ethon::Curl).to receive(:formadd) - form.materialize - end - end - - context "when query_pairs contains file and string values" do - let(:pairs) { [['a', ["file", "type", "path/file"]], ['b', '1']] } - - it "adds file to form" do - expect(Ethon::Curl).to receive(:formadd).twice - form.materialize - end - end - - context "when query_pairs contains file, string and int values" do - let(:pairs) { [['a', ["file", "type", "path/file"]], ['b', '1'], ['c', 1]] } - - it "adds file to form" do - expect(Ethon::Curl).to receive(:formadd).exactly(3).times - form.materialize - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/header_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/header_spec.rb deleted file mode 100644 index 4931fc75..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/header_spec.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Header do - let(:easy) { Ethon::Easy.new } - - describe "#headers=" do - let(:headers) { { 'User-Agent' => 'Ethon' } } - - it "sets header" do - expect_any_instance_of(Ethon::Easy).to receive(:set_callbacks) - expect(Ethon::Curl).to receive(:set_option) - easy.headers = headers - end - - context "when requesting" do - before do - easy.headers = headers - easy.url = "http://localhost:3001" - easy.perform - end - - it "sends" do - expect(easy.response_body).to include('"HTTP_USER_AGENT":"Ethon"') - end - - context "when header value contains null byte" do - let(:headers) { { 'User-Agent' => "Ethon\0" } } - - it "escapes" do - expect(easy.response_body).to include('"HTTP_USER_AGENT":"Ethon\\\\0"') - end - end - - context "when header value has leading whitespace" do - let(:headers) { { 'User-Agent' => " Ethon" } } - - it "removes" do - expect(easy.response_body).to include('"HTTP_USER_AGENT":"Ethon"') - end - end - - context "when header value has traiing whitespace" do - let(:headers) { { 'User-Agent' => "Ethon " } } - - it "removes" do - expect(easy.response_body).to include('"HTTP_USER_AGENT":"Ethon"') - end - end - end - end - - describe "#compose_header" do - it "has space in between" do - expect(easy.compose_header('a', 'b')).to eq('a: b') - end - - context "when value is a symbol" do - it "works" do - expect{ easy.compose_header('a', :b) }.to_not raise_error - end - end - end - - describe "#header_list" do - context "when no set_headers" do - it "returns nil" do - expect(easy.header_list).to eq(nil) - end - end - - context "when set_headers" do - it "returns pointer to header list" do - easy.headers = {'User-Agent' => 'Custom'} - expect(easy.header_list).to be_a(FFI::Pointer) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/custom_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/custom_spec.rb deleted file mode 100644 index ba0978b8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/custom_spec.rb +++ /dev/null @@ -1,177 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Custom do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:custom) { described_class.new("PURGE", url, {:params => params, :body => form}) } - - describe "#setup" do - context "when nothing" do - it "sets url" do - custom.setup(easy) - expect(easy.url).to eq(url) - end - - it "makes a custom request" do - custom.setup(easy) - easy.perform - expect(easy.response_body).to include('"REQUEST_METHOD":"PURGE"') - end - end - - context "when params" do - let(:params) { {:a => "1&"} } - - it "attaches escaped to url" do - custom.setup(easy) - expect(easy.url).to eq("#{url}?a=1%26") - end - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - custom.setup(easy) - easy.perform - end - - it "is a custom verb" do - expect(easy.response_body).to include('"REQUEST_METHOD":"PURGE"') - end - - it "does not use application/x-www-form-urlencoded content type" do - expect(easy.response_body).to_not include('"CONTENT_TYPE":"application/x-www-form-urlencoded"') - end - - it "requests parameterized url" do - expect(easy.response_body).to include('"REQUEST_URI":"http://localhost:3001/?a=1%26"') - end - end - end - - context "when body" do - context "when multipart" do - let(:form) { {:a => File.open(__FILE__, 'r')} } - - it "sets httppost" do - expect(easy).to receive(:httppost=) - custom.setup(easy) - end - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - custom.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a custom verb" do - expect(easy.response_body).to include('"REQUEST_METHOD":"PURGE"') - end - - it "uses multipart/form-data content type" do - expect(easy.response_body).to include('"CONTENT_TYPE":"multipart/form-data') - end - - it "submits a body" do - expect(easy.response_body).to match('"body":".+"') - end - - it "submits the data" do - expect(easy.response_body).to include('"filename":"custom_spec.rb"') - end - end - end - - context "when not multipart" do - let(:form) { {:a => "1&b=2"} } - let(:encoded) { "a=1%26b%3D2" } - - it "sets escaped copypostfields" do - expect(easy).to receive(:copypostfields=).with(encoded) - custom.setup(easy) - end - - it "sets postfieldsize" do - expect(easy).to receive(:postfieldsize=).with(encoded.bytesize) - custom.setup(easy) - end - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - custom.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a custom verb" do - expect(easy.response_body).to include('"REQUEST_METHOD":"PURGE"') - end - - it "uses multipart/form-data content type" do - expect(easy.response_body).to include('"CONTENT_TYPE":"application/x-www-form-urlencoded') - end - - it "submits a body" do - expect(easy.response_body).to match('"body":"a=1%26b%3D2"') - end - - it "submits the data" do - expect(easy.response_body).to include('"rack.request.form_hash":{"a":"1&b=2"}') - end - end - end - - context "when string" do - let(:form) { "{a: 1}" } - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - custom.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "sends string" do - expect(easy.response_body).to include('"body":"{a: 1}"') - end - end - end - end - - context "when params and body" do - let(:form) { {:a => "1"} } - let(:params) { {:b => "2"} } - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - custom.setup(easy) - easy.perform - end - - it "url contains params" do - expect(easy.response_body).to include('"REQUEST_URI":"http://localhost:3001/?b=2"') - end - - it "body contains form" do - expect(easy.response_body).to include('"body":"a=1"') - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/delete_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/delete_spec.rb deleted file mode 100644 index fe7e55e5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/delete_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Delete do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:delete) { described_class.new(url, {:params => params, :body => form}) } - - context "when requesting" do - before do - delete.setup(easy) - easy.perform - end - - it "makes a delete request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"DELETE"') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/get_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/get_spec.rb deleted file mode 100644 index e3a7e4fa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/get_spec.rb +++ /dev/null @@ -1,126 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Get do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:options) { {} } - let(:get) { described_class.new(url, {:params => params, :body => form}.merge(options)) } - - describe "#setup" do - it "sets url" do - get.setup(easy) - expect(easy.url).to eq(url) - end - - context "when body" do - let(:form) { { :a => 1 } } - - it "sets customrequest" do - expect(easy).to receive(:customrequest=).with("GET") - get.setup(easy) - end - end - - context "when no body" do - it "doesn't set customrequest" do - expect(easy).to receive(:customrequest=).never - get.setup(easy) - end - end - - context "when requesting" do - before do - get.setup(easy) - easy.perform - end - - context "when url already contains params" do - let(:url) { "http://localhost:3001/?query=here" } - let(:params) { {:a => "1&b=2"} } - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a get request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"GET"') - end - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?query=here&a=1%26b%3D2") - end - end - - context "when params and no body" do - let(:params) { {:a => "1&b=2"} } - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a get request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"GET"') - end - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?a=1%26b%3D2") - end - end - - context "when params and body" do - let(:params) { {:a => "1&b=2"} } - let(:form) { {:b => "2"} } - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a get request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"GET"') - end - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?a=1%26b%3D2") - end - end - - context "with :escape" do - let(:params) { {:a => "1&b=2"} } - - context 'missing' do - it "escapes values" do - expect(easy.url).to eq("#{url}?a=1%26b%3D2") - end - end - - context 'nil' do - let(:options) { {:escape => nil} } - - it "escapes values" do - expect(easy.url).to eq("#{url}?a=1%26b%3D2") - end - end - - context 'true' do - let(:options) { {:escape => true} } - - it "escapes values" do - expect(easy.url).to eq("#{url}?a=1%26b%3D2") - end - end - - context 'false' do - let(:options) { {:escape => false} } - - it "sends raw values" do - expect(easy.url).to eq("#{url}?a=1&b=2") - end - end - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/head_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/head_spec.rb deleted file mode 100644 index 5a04f062..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/head_spec.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Head do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:head) { described_class.new(url, {:params => params, :body => form}) } - - describe "#setup" do - context "when nothing" do - it "sets nobody" do - expect(easy).to receive(:nobody=).with(true) - head.setup(easy) - end - - it "sets url" do - head.setup(easy) - expect(easy.url).to eq(url) - end - end - - context "when params" do - let(:params) { {:a => "1&b=2"} } - - it "sets nobody" do - expect(easy).to receive(:nobody=).with(true) - head.setup(easy) - end - - it "attaches escaped to url" do - head.setup(easy) - expect(easy.url).to eq("#{url}?a=1%26b%3D2") - end - - context "when requesting" do - before do - head.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "has no body" do - expect(easy.response_body).to be_empty - end - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?a=1%26b%3D2") - end - - context "when url already contains params" do - let(:url) { "http://localhost:3001/?query=here" } - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?query=here&a=1%26b%3D2") - end - end - end - end - - context "when body" do - let(:form) { {:a => 1} } - - context "when requesting" do - before do - head.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/options_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/options_spec.rb deleted file mode 100644 index 99ca96fc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/options_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Options do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:options) { described_class.new(url, {:params => params, :body => form}) } - - describe "#setup" do - it "sets customrequest" do - expect(easy).to receive(:customrequest=).with("OPTIONS") - options.setup(easy) - end - - it "sets url" do - options.setup(easy) - expect(easy.url).to eq(url) - end - - context "when requesting" do - let(:params) { {:a => "1&b=2"} } - - before do - options.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a options request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"OPTIONS"') - end - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?a=1%26b%3D2") - end - - context "when url already contains params" do - let(:url) { "http://localhost:3001/?query=here" } - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?query=here&a=1%26b%3D2") - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/patch_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/patch_spec.rb deleted file mode 100644 index a74cec7a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/patch_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Patch do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:patch) { described_class.new(url, {:params => params, :body => form}) } - - describe "#setup" do - it "sets customrequest" do - expect(easy).to receive(:customrequest=).with("PATCH") - patch.setup(easy) - end - - it "sets url" do - patch.setup(easy) - expect(easy.url).to eq(url) - end - - context "when requesting" do - let(:params) { {:a => "1&b=2"} } - - before do - patch.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a patch request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"PATCH"') - end - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?a=1%26b%3D2") - end - - context "when url already contains params" do - let(:url) { "http://localhost:3001/?query=here" } - - it "requests parameterized url" do - expect(easy.effective_url).to eq("http://localhost:3001/?query=here&a=1%26b%3D2") - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/post_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/post_spec.rb deleted file mode 100644 index a65ceff0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/post_spec.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Post do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:options) { Hash.new } - let(:post) { described_class.new(url, options.merge({:params => params, :body => form})) } - - describe "#setup" do - context "when nothing" do - it "sets url" do - post.setup(easy) - expect(easy.url).to eq(url) - end - - it "sets postfield_size" do - expect(easy).to receive(:postfieldsize=).with(0) - post.setup(easy) - end - - it "sets copy_postfields" do - expect(easy).to receive(:copypostfields=).with("") - post.setup(easy) - end - - it "makes a post request" do - post.setup(easy) - easy.perform - expect(easy.response_body).to include('"REQUEST_METHOD":"POST"') - end - end - - context "when params" do - let(:params) { {:a => "1&"} } - - it "attaches escaped to url" do - post.setup(easy) - expect(easy.url).to eq("#{url}?a=1%26") - end - - context "with arrays" do - let(:params) { {:a => %w( foo bar )} } - - context "by default" do - it "encodes them with indexes" do - post.setup(easy) - expect(easy.url).to eq("#{url}?a%5B0%5D=foo&a%5B1%5D=bar") - end - end - - context "when params_encoding is :rack" do - let(:options) { {:params_encoding => :rack} } - it "encodes them without indexes" do - post.setup(easy) - expect(easy.url).to eq("#{url}?a%5B%5D=foo&a%5B%5D=bar") - end - end - end - - context "with :escape" do - context 'missing' do - it "escapes values" do - post.setup(easy) - expect(easy.url).to eq("#{url}?a=1%26") - end - end - - context 'nil' do - let(:options) { {:escape => nil} } - - it "escapes values" do - post.setup(easy) - expect(easy.url).to eq("#{url}?a=1%26") - end - end - - context 'true' do - let(:options) { {:escape => true} } - - it "escapes values" do - post.setup(easy) - expect(easy.url).to eq("#{url}?a=1%26") - end - end - - context 'false' do - let(:options) { {:escape => false} } - - it "sends raw values" do - post.setup(easy) - expect(easy.url).to eq("#{url}?a=1&") - end - end - end - - it "sets postfieldsize" do - expect(easy).to receive(:postfieldsize=).with(0) - post.setup(easy) - end - - it "sets copypostfields" do - expect(easy).to receive(:copypostfields=).with("") - post.setup(easy) - end - - context "when requesting" do - let(:postredir) { nil } - - before do - easy.headers = { 'Expect' => '' } - post.setup(easy) - easy.postredir = postredir - easy.followlocation = true - easy.perform - end - - it "is a post" do - expect(easy.response_body).to include('"REQUEST_METHOD":"POST"') - end - - it "uses application/x-www-form-urlencoded content type" do - expect(easy.response_body).to include('"CONTENT_TYPE":"application/x-www-form-urlencoded"') - end - - it "requests parameterized url" do - expect(easy.response_body).to include('"REQUEST_URI":"http://localhost:3001/?a=1%26"') - end - - context "when redirection" do - let(:url) { "localhost:3001/redirect" } - - context "when no postredirs" do - it "is a get" do - expect(easy.response_body).to include('"REQUEST_METHOD":"GET"') - end - end - - unless ENV['TRAVIS'] - context "when postredirs" do - let(:postredir) { :post_all } - - it "is a post" do - expect(easy.response_body).to include('"REQUEST_METHOD":"POST"') - end - end - end - end - end - end - - context "when body" do - context "when multipart" do - let(:form) { {:a => File.open(__FILE__, 'r')} } - - it "sets httppost" do - expect(easy).to receive(:httppost=) - post.setup(easy) - end - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - post.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a post" do - expect(easy.response_body).to include('"REQUEST_METHOD":"POST"') - end - - it "uses multipart/form-data content type" do - expect(easy.response_body).to include('"CONTENT_TYPE":"multipart/form-data') - end - - it "submits a body" do - expect(easy.response_body).to match('"body":".+"') - end - - it "submits the data" do - expect(easy.response_body).to include('"filename":"post_spec.rb"') - end - end - end - - context "when not multipart" do - let(:form) { {:a => "1&b=2"} } - let(:encoded) { "a=1%26b%3D2" } - - it "sets escaped copypostfields" do - expect(easy).to receive(:copypostfields=).with(encoded) - post.setup(easy) - end - - it "sets postfieldsize" do - expect(easy).to receive(:postfieldsize=).with(encoded.bytesize) - post.setup(easy) - end - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - post.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "is a post" do - expect(easy.response_body).to include('"REQUEST_METHOD":"POST"') - end - - it "uses multipart/form-data content type" do - expect(easy.response_body).to include('"CONTENT_TYPE":"application/x-www-form-urlencoded') - end - - it "submits a body" do - expect(easy.response_body).to match('"body":"a=1%26b%3D2"') - end - - it "submits the data" do - expect(easy.response_body).to include('"rack.request.form_hash":{"a":"1&b=2"}') - end - end - end - - context "when string" do - let(:form) { "{a: 1}" } - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - post.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "sends string" do - expect(easy.response_body).to include('"body":"{a: 1}"') - end - end - end - - context "when binary with null bytes" do - let(:form) { [1, 0, 1].pack('c*') } - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - post.setup(easy) - easy.perform - end - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "sends binary data" do - expect(easy.response_body).to include('"body":"\\u0001\\u0000\\u0001"') - end - end - end - - context "when arrays" do - let(:form) { {:a => %w( foo bar )} } - - context "by default" do - it "sets copypostfields with indexed, escaped representation" do - expect(easy).to receive(:copypostfields=).with('a%5B0%5D=foo&a%5B1%5D=bar') - post.setup(easy) - end - end - - context "when params_encoding is :rack" do - let(:options) { {:params_encoding => :rack} } - - it "sets copypostfields with non-indexed, escaped representation" do - expect(easy).to receive(:copypostfields=).with('a%5B%5D=foo&a%5B%5D=bar') - post.setup(easy) - end - end - end - end - - context "when params and body" do - let(:form) { {:a => "1"} } - let(:params) { {:b => "2"} } - - context "when requesting" do - before do - easy.headers = { 'Expect' => '' } - post.setup(easy) - easy.perform - end - - it "url contains params" do - expect(easy.response_body).to include('"REQUEST_URI":"http://localhost:3001/?b=2"') - end - - it "body contains form" do - expect(easy.response_body).to include('"body":"a=1"') - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/put_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/put_spec.rb deleted file mode 100644 index f294c371..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http/put_spec.rb +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http::Put do - let(:easy) { Ethon::Easy.new } - let(:url) { "http://localhost:3001/" } - let(:params) { nil } - let(:form) { nil } - let(:options) { Hash.new } - let(:put) { described_class.new(url, options.merge({:params => params, :body => form})) } - - describe "#setup" do - context "when nothing" do - it "sets url" do - put.setup(easy) - expect(easy.url).to eq(url) - end - - it "sets upload" do - expect(easy).to receive(:upload=).with(true) - put.setup(easy) - end - - it "sets infilesize" do - expect(easy).to receive(:infilesize=).with(0) - put.setup(easy) - end - - context "when requesting" do - it "makes a put request" do - put.setup(easy) - easy.perform - expect(easy.response_body).to include('"REQUEST_METHOD":"PUT"') - end - end - end - - context "when params" do - let(:params) { {:a => "1&"} } - - it "attaches escaped to url" do - put.setup(easy) - expect(easy.url).to eq("#{url}?a=1%26") - end - - context "with arrays" do - let(:params) { {:a => %w( foo bar )} } - - context "by default" do - it "encodes them with indexes" do - put.setup(easy) - expect(easy.url).to eq("#{url}?a%5B0%5D=foo&a%5B1%5D=bar") - end - end - - context "when params_encoding is :rack" do - let(:options) { {:params_encoding => :rack} } - it "encodes them without indexes" do - put.setup(easy) - expect(easy.url).to eq("#{url}?a%5B%5D=foo&a%5B%5D=bar") - end - end - end - - it "sets upload" do - expect(easy).to receive(:upload=).with(true) - put.setup(easy) - end - - it "sets infilesize" do - expect(easy).to receive(:infilesize=).with(0) - put.setup(easy) - end - - context "when requesting" do - before do - put.setup(easy) - easy.perform - end - - it "makes a put request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"PUT"') - end - end - end - - context "when body" do - let(:form) { {:a => "1&b=2"} } - - it "sets infilesize" do - expect(easy).to receive(:infilesize=).with(11) - put.setup(easy) - end - - it "sets readfunction" do - expect(easy).to receive(:readfunction) - put.setup(easy) - end - - it "sets upload" do - expect(easy).to receive(:upload=).with(true) - put.setup(easy) - end - - context "when requesting" do - context "sending string body" do - before do - easy.headers = { 'Expect' => '' } - put.setup(easy) - easy.perform - end - - it "makes a put request" do - expect(easy.response_body).to include('"REQUEST_METHOD":"PUT"') - end - - it "submits a body" do - expect(easy.response_body).to include('"body":"a=1%26b%3D2"') - end - end - - context "when injecting a file as body" do - let(:file) { File.open(__FILE__) } - let(:easy) do - e = Ethon::Easy.new(:url => url, :upload => true) - e.set_read_callback(file) - e.infilesize = File.size(file.path) - e - end - - before do - easy.headers = { 'Expect' => '' } - easy.perform - end - - it "submits file" do - expect(easy.response_body).to include("injecting") - end - end - end - - context "when arrays" do - let(:form) { {:a => %w( foo bar )} } - - before do - put.setup(easy) - easy.perform - end - - context "by default" do - it "submits an indexed, escaped representation" do - expect(easy.response_body).to include('"body":"a%5B0%5D=foo&a%5B1%5D=bar"') - end - end - - context "when params_encoding is :rack" do - let(:options) { {:params_encoding => :rack} } - - it "submits an non-indexed, escaped representation" do - expect(easy.response_body).to include('"body":"a%5B%5D=foo&a%5B%5D=bar"') - end - end - end - end - - context "when params and body" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http_spec.rb deleted file mode 100644 index b74a2df7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/http_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Http do - let(:easy) { Ethon::Easy.new } - - describe "#http_request" do - let(:url) { "http://localhost:3001/" } - let(:action_name) { :get } - let(:options) { {} } - - let(:get) { double(:setup) } - let(:get_class) { Ethon::Easy::Http::Get } - - it "instanciates action" do - expect(get).to receive(:setup) - expect(get_class).to receive(:new).and_return(get) - easy.http_request(url, action_name, options) - end - - context "when requesting" do - [ :get, :post, :put, :delete, :head, :patch, :options ].map do |action| - it "returns ok" do - easy.http_request(url, action, options) - easy.perform - expect(easy.return_code).to be(:ok) - end - - unless action == :head - it "makes a #{action.to_s.upcase} request" do - easy.http_request(url, action, options) - easy.perform - expect(easy.response_body).to include("\"REQUEST_METHOD\":\"#{action.to_s.upcase}\"") - end - - it "streams the response body from the #{action.to_s.upcase} request" do - bytes_read = 0 - easy.on_body { |chunk, response| bytes_read += chunk.bytesize } - easy.http_request(url, action, options) - easy.perform - content_length = ((easy.response_headers =~ /Content-Length: (\d+)/) && $1.to_i) - expect(bytes_read).to eq(content_length) - expect(easy.response_body).to eq("") - end - - it "notifies when headers are ready" do - headers = [] - easy.on_headers { |r| headers << r.response_headers } - easy.http_request(url, action, options) - easy.perform - expect(headers).to eq([easy.response_headers]) - expect(headers.first).to match(/Content-Length: (\d+)/) - end - end - end - - it "makes requests with custom HTTP verbs" do - easy.http_request(url, :purge, options) - easy.perform - expect(easy.response_body).to include(%{"REQUEST_METHOD":"PURGE"}) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/informations_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/informations_spec.rb deleted file mode 100644 index 3526847a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/informations_spec.rb +++ /dev/null @@ -1,126 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Informations do - let(:easy) { Ethon::Easy.new } - - before do - easy.url = "http://localhost:3001" - easy.perform - end - - describe "#httpauth_avail" do - it "returns" do - expect(easy.httpauth_avail).to be - end - end - - describe "#total_time" do - it "returns float" do - expect(easy.total_time).to be_a(Float) - end - end - - describe "#starttransfer_time" do - it "returns float" do - expect(easy.starttransfer_time).to be_a(Float) - end - end - - describe "#appconnect_time" do - it "returns float" do - expect(easy.appconnect_time).to be_a(Float) - end - end - - describe "#pretransfer_time" do - it "returns float" do - expect(easy.pretransfer_time).to be_a(Float) - end - end - - describe "#connect_time" do - it "returns float" do - expect(easy.connect_time).to be_a(Float) - end - end - - describe "#namelookup_time" do - it "returns float" do - expect(easy.namelookup_time).to be_a(Float) - end - end - - describe "#redirect_time" do - it "returns float" do - expect(easy.redirect_time).to be_a(Float) - end - end - - describe "#effective_url" do - it "returns url" do - expect(easy.effective_url).to match(/^http:\/\/localhost:3001\/?/) - end - end - - describe "#primary_ip" do - it "returns localhost" do - expect(easy.primary_ip).to match(/::1|127\.0\.0\.1/) - end - end - - describe "#response_code" do - it "returns 200" do - expect(easy.response_code).to eq(200) - end - end - - describe "#redirect_count" do - it "returns 0" do - expect(easy.redirect_count).to eq(0) - end - end - - describe "#redirect_url" do - it "returns nil as there is no redirect" do - expect(easy.redirect_url).to be(nil) - end - end - - describe "#request_size" do - it "returns 53" do - expect(easy.request_size).to eq(53) - end - end - - describe "#supports_zlib?" do - it "returns true" do - expect(Kernel).to receive(:warn) - expect(easy.supports_zlib?).to be_truthy - end - end - - describe "#size_upload" do - it "returns float" do - expect(easy.size_upload).to be_a(Float) - end - end - - describe "#size_download" do - it "returns float" do - expect(easy.size_download).to be_a(Float) - end - end - - describe "#speed_upload" do - it "returns float" do - expect(easy.speed_upload).to be_a(Float) - end - end - - describe "#speed_download" do - it "returns float" do - expect(easy.speed_download).to be_a(Float) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/mirror_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/mirror_spec.rb deleted file mode 100644 index 29d150d1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/mirror_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Mirror do - let(:options) { nil } - let(:mirror) { described_class.new(options) } - - describe "::INFORMATIONS_TO_LOG" do - [ - :return_code, :response_code, :response_body, :response_headers, - :total_time, :starttransfer_time, :appconnect_time, - :pretransfer_time, :connect_time, :namelookup_time, :redirect_time, - :size_upload, :size_download, :speed_upload, :speed_upload, - :effective_url, :primary_ip, :redirect_count, :redirect_url, :debug_info - ].each do |name| - it "contains #{name}" do - expect(described_class::INFORMATIONS_TO_MIRROR).to include(name) - end - end - end - - describe "#to_hash" do - let(:options) { {:return_code => 1} } - - it "returns mirror as hash" do - expect(mirror.to_hash).to eq(options) - end - end - - describe "#log_informations" do - let(:options) { {:return_code => 1} } - - it "returns hash" do - expect(mirror.log_informations).to be_a(Hash) - end - - it "only calls methods that exist" do - described_class::INFORMATIONS_TO_LOG.each do |method_name| - expect(mirror.respond_to? method_name).to eql(true) - end - end - - it "includes return code" do - expect(mirror.log_informations).to include(options) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/operations_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/operations_spec.rb deleted file mode 100644 index a3ddc86b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/operations_spec.rb +++ /dev/null @@ -1,271 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Operations do - let(:easy) { Ethon::Easy.new } - - describe "#handle" do - it "returns a pointer" do - expect(easy.handle).to be_a(FFI::Pointer) - end - end - - - describe "#perform" do - let(:url) { nil } - let(:timeout) { nil } - let(:connect_timeout) { nil } - let(:follow_location) { nil } - let(:max_redirs) { nil } - let(:user_pwd) { nil } - let(:http_auth) { nil } - let(:headers) { nil } - let(:protocols) { nil } - let(:redir_protocols) { nil } - let(:username) { nil } - let(:password) { nil } - - before do - Ethon.logger.level = Logger::DEBUG - easy.url = url - easy.timeout = timeout - easy.connecttimeout = connect_timeout - easy.followlocation = follow_location - easy.maxredirs = max_redirs - easy.httpauth = http_auth - easy.headers = headers - easy.protocols = protocols - easy.redir_protocols = redir_protocols - - if user_pwd - easy.userpwd = user_pwd - else - easy.username = username - easy.password = password - end - - easy.perform - end - - it "calls Curl.easy_perform" do - expect(Ethon::Curl).to receive(:easy_perform) - easy.perform - end - - it "calls Curl.easy_cleanup" do - expect_any_instance_of(FFI::AutoPointer).to receive(:free) - easy.cleanup - end - - it "logs" do - expect(Ethon.logger).to receive(:debug) - easy.perform - end - - it "doesn't log after completing because completing could reset" do - easy.on_complete{ expect(Ethon.logger).to receive(:debug).never } - easy.perform - end - - context "when url" do - let(:url) { "http://localhost:3001/" } - - it "returns ok" do - expect(easy.return_code).to eq(:ok) - end - - it "sets response body" do - expect(easy.response_body).to be - end - - it "sets response headers" do - expect(easy.response_headers).to be - end - - context "when request timed out" do - let(:url) { "http://localhost:3001/?delay=1" } - let(:timeout) { 1 } - - it "returns operation_timedout" do - expect(easy.return_code).to eq(:operation_timedout) - end - end - - context "when connection timed out" do - let(:url) { "http://localhost:3009" } - let(:connect_timeout) { 1 } - - it "returns couldnt_connect" do - expect(easy.return_code).to eq(:couldnt_connect) - end - end - - context "when no follow location" do - let(:url) { "http://localhost:3001/redirect" } - let(:follow_location) { false } - - it "doesn't follow" do - expect(easy.response_code).to eq(302) - expect(easy.redirect_url).to eq("http://localhost:3001/") - end - end - - context "when follow location" do - let(:url) { "http://localhost:3001/redirect" } - let(:follow_location) { true } - - it "follows" do - expect(easy.response_code).to eq(200) - expect(easy.redirect_url).to eq(nil) - end - - context "when infinite redirect loop" do - let(:url) { "http://localhost:3001/bad_redirect" } - let(:max_redirs) { 5 } - - context "when max redirect set" do - it "follows only x times" do - expect(easy.response_code).to eq(302) - expect(easy.redirect_url).to eq("http://localhost:3001/bad_redirect") - end - end - end - end - - context "when user agent" do - let(:headers) { { 'User-Agent' => 'Ethon' } } - - it "sets" do - expect(easy.response_body).to include('"HTTP_USER_AGENT":"Ethon"') - end - end - end - - context "when auth url" do - before { easy.url = url } - - context "when basic auth" do - let(:url) { "http://localhost:3001/auth_basic/username/password" } - - context "when no user_pwd" do - it "returns 401" do - expect(easy.response_code).to eq(401) - end - end - - context "when invalid user_pwd" do - let(:user_pwd) { "invalid:invalid" } - - it "returns 401" do - expect(easy.response_code).to eq(401) - end - end - - context "when valid user_pwd" do - let(:user_pwd) { "username:password" } - - it "returns 200" do - expect(easy.response_code).to eq(200) - end - end - - context "when user and password" do - let(:username) { "username" } - let(:password) { "password" } - - it "returns 200" do - expect(easy.response_code).to eq(200) - end - end - end - - context "when ntlm" do - let(:url) { "http://localhost:3001/auth_ntlm" } - let(:http_auth) { :ntlm } - - context "when no user_pwd" do - it "returns 401" do - expect(easy.response_code).to eq(401) - end - end - - context "when user_pwd" do - let(:user_pwd) { "username:password" } - - it "returns 200" do - expect(easy.response_code).to eq(200) - end - end - end - end - - context "when protocols" do - context "when asking for a allowed url" do - let(:url) { "http://localhost:3001" } - let(:protocols) { :http } - - it "returns ok" do - expect(easy.return_code).to be(:ok) - end - end - - context "when asking for a not allowed url" do - let(:url) { "http://localhost:3001" } - let(:protocols) { :https } - - it "returns unsupported_protocol" do - expect(easy.return_code).to be(:unsupported_protocol) - end - end - end - - context "when multiple protocols" do - context "when asking for a allowed url" do - let(:protocols) { [:http, :https] } - - context "when http" do - let(:url) { "http://localhost:3001" } - - it "returns ok for http" do - expect(easy.return_code).to be(:ok) - end - end - - context "when https" do - let(:url) { "https://localhost:3001" } - - it "returns ssl_connect_error for https" do - expect(easy.return_code).to be(:ssl_connect_error) - end - end - end - - context "when asking for a not allowed url" do - let(:url) { "ssh://localhost" } - let(:protocols) { [:https, :http] } - - it "returns unsupported_protocol" do - expect(easy.return_code).to be(:unsupported_protocol) - end - end - end - - context "when redir_protocols" do - context "when redirecting to a not allowed url" do - let(:url) { "http://localhost:3001/redirect" } - let(:follow_location) { true } - let(:redir_protocols) { :https } - - it "returns unsupported_protocol" do - expect(easy.return_code).to be(:unsupported_protocol) - end - end - end - - context "when no url" do - it "returns url_malformat" do - expect(easy.perform).to eq(:url_malformat) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/options_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/options_spec.rb deleted file mode 100644 index e135bd99..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/options_spec.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Options do - let(:easy) { Ethon::Easy.new } - - [ - :accept_encoding, :cainfo, :capath, :connecttimeout, :connecttimeout_ms, :cookie, - :cookiejar, :cookiefile, :copypostfields, :customrequest, :dns_cache_timeout, - :followlocation, :forbid_reuse, :http_version, :httpauth, :httpget, :httppost, - :infilesize, :interface, :keypasswd, :maxredirs, :nobody, :nosignal, - :postfieldsize, :postredir, :protocols, :proxy, :proxyauth, :proxyport, :proxytype, - :proxyuserpwd, :readdata, :readfunction, :redir_protocols, :ssl_verifyhost, - :ssl_verifypeer, :sslcert, :sslcerttype, :sslkey, :sslkeytype, :sslversion, - :timeout, :timeout_ms, :unrestricted_auth, :upload, :url, :useragent, - :userpwd, :verbose, :pipewait, :dns_shuffle_addresses, :path_as_is - ].each do |name| - describe "#{name}=" do - it "responds_to" do - expect(easy).to respond_to("#{name}=") - end - - it "sets option" do - expect_any_instance_of(Ethon::Easy).to receive(:set_callbacks) - expect(Ethon::Curl).to receive(:set_option).with(name, anything, anything) - value = case name - when :http_version - :httpv1_0 - when :httpauth - :basic - when :protocols, :redir_protocols - :http - when :postredir - :post_301 - when :proxytype - :http - when :sslversion - :default - when :httppost - FFI::Pointer::NULL - else - 1 - end - easy.method("#{name}=").call(value) - end - end - end - - describe '#escape?' do - context 'by default' do - it 'returns true' do - expect(easy.escape?).to be_truthy - end - end - - context 'when #escape=nil' do - it 'returns true' do - easy.escape = nil - expect(easy.escape?).to be_truthy - end - end - - context 'when #escape=true' do - it 'returns true' do - easy.escape = true - expect(easy.escape?).to be_truthy - end - end - - context 'when #escape=false' do - it 'returns true' do - easy.escape = false - expect(easy.escape?).to be_falsey - end - end - end - - describe '#multipart?' do - context 'by default' do - it 'returns false' do - expect(easy.multipart?).to be_falsey - end - end - - context 'when #multipart=nil' do - it 'returns false' do - easy.multipart = nil - expect(easy.multipart?).to be_falsey - end - end - - context 'when #multipart=true' do - it 'returns true' do - easy.multipart = true - expect(easy.multipart?).to be_truthy - end - end - - context 'when #multipart=false' do - it 'returns false' do - easy.multipart = false - expect(easy.multipart?).to be_falsey - end - end - end - - describe "#httppost=" do - it "raises unless given a FFI::Pointer" do - expect{ easy.httppost = 1 }.to raise_error(Ethon::Errors::InvalidValue) - end - end - - context "when requesting" do - let(:url) { "localhost:3001" } - let(:timeout) { nil } - let(:timeout_ms) { nil } - let(:connecttimeout) { nil } - let(:connecttimeout_ms) { nil } - let(:userpwd) { nil } - - before do - easy.url = url - easy.timeout = timeout - easy.timeout_ms = timeout_ms - easy.connecttimeout = connecttimeout - easy.connecttimeout_ms = connecttimeout_ms - easy.userpwd = userpwd - easy.perform - end - - context "when userpwd" do - context "when contains /" do - let(:url) { "localhost:3001/auth_basic/test/te%2Fst" } - let(:userpwd) { "test:te/st" } - - it "works" do - expect(easy.response_code).to eq(200) - end - end - end - - context "when timeout" do - let(:timeout) { 1 } - - context "when request takes longer" do - let(:url) { "localhost:3001?delay=2" } - - it "times out" do - expect(easy.return_code).to eq(:operation_timedout) - end - end - end - - context "when connecttimeout" do - let(:connecttimeout) { 1 } - - context "when cannot connect" do - let(:url) { "localhost:3002" } - - it "times out" do - expect(easy.return_code).to eq(:couldnt_connect) - end - end - end - - if Ethon::Easy.supports_timeout_ms? - context "when timeout_ms" do - let(:timeout_ms) { 100 } - - context "when request takes longer" do - let(:url) { "localhost:3001?delay=1" } - - it "times out" do - expect(easy.return_code).to eq(:operation_timedout) - end - end - end - - context "when connecttimeout_ms" do - let(:connecttimeout_ms) { 100 } - - context "when cannot connect" do - let(:url) { "localhost:3002" } - - it "times out" do - # this can either lead to a timeout or couldnt connect depending on which happens first - expect([:couldnt_connect, :operation_timedout]).to include(easy.return_code) - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/queryable_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/queryable_spec.rb deleted file mode 100644 index 89c4d115..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/queryable_spec.rb +++ /dev/null @@ -1,235 +0,0 @@ -# encoding: utf-8 -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Queryable do - let(:hash) { {} } - let!(:easy) { Ethon::Easy.new } - let(:params) { Ethon::Easy::Params.new(easy, hash) } - - describe "#to_s" do - context "when query_pairs empty" do - before { params.instance_variable_set(:@query_pairs, []) } - - it "returns empty string" do - expect(params.to_s).to eq("") - end - end - - context "when query_pairs not empty" do - context "when escape" do - before do - params.escape = true - end - - { - '!' => '%21', '*' => '%2A', "'" => '%27', '(' => '%28', - ')' => '%29', ';' => '%3B', ':' => '%3A', '@' => '%40', - '&' => '%26', '=' => '%3D', '+' => '%2B', '$' => '%24', - ',' => '%2C', '/' => '%2F', '?' => '%3F', '#' => '%23', - '[' => '%5B', ']' => '%5D', - - '<' => '%3C', '>' => '%3E', '"' => '%22', '{' => '%7B', - '}' => '%7D', '|' => '%7C', '\\' => '%5C', '`' => '%60', - '^' => '%5E', '%' => '%25', ' ' => '%20', "\0" => '%00', - - 'まつもと' => '%E3%81%BE%E3%81%A4%E3%82%82%E3%81%A8', - }.each do |value, percent| - it "turns #{value.inspect} into #{percent}" do - params.instance_variable_set(:@query_pairs, [[:a, value]]) - expect(params.to_s).to eq("a=#{percent}") - end - end - - { - '.' => '%2E', '-' => '%2D', '_' => '%5F', '~' => '%7E', - }.each do |value, percent| - it "leaves #{value.inspect} instead of turning into #{percent}" do - params.instance_variable_set(:@query_pairs, [[:a, value]]) - expect(params.to_s).to eq("a=#{value}") - end - end - end - - context "when no escape" do - before { params.instance_variable_set(:@query_pairs, [[:a, 1], [:b, 2]]) } - - it "returns concatenated query string" do - expect(params.to_s).to eq("a=1&b=2") - end - end - end - - context "when query_pairs contains a string" do - before { params.instance_variable_set(:@query_pairs, ["{a: 1}"]) } - - it "returns correct string" do - expect(params.to_s).to eq("{a: 1}") - end - end - end - - describe "#build_query_pairs" do - let(:pairs) { params.method(:build_query_pairs).call(hash) } - - context "when params is empty" do - it "returns empty array" do - expect(pairs).to eq([]) - end - end - - context "when params is string" do - let(:hash) { "{a: 1}" } - - it "wraps it in an array" do - expect(pairs).to eq([hash]) - end - end - - context "when params is simple hash" do - let(:hash) { {:a => 1, :b => 2} } - - it "transforms" do - expect(pairs).to include([:a, 1]) - expect(pairs).to include([:b, 2]) - end - end - - context "when params is a nested hash" do - let(:hash) { {:a => 1, :b => {:c => 2}} } - - it "transforms" do - expect(pairs).to include([:a, 1]) - expect(pairs).to include(["b[c]", 2]) - end - end - - context "when params contains an array" do - let(:hash) { {:a => 1, :b => [2, 3]} } - - context "by default" do - it "transforms" do - expect(pairs).to include([:a, 1]) - expect(pairs).to include(["b[0]", 2]) - expect(pairs).to include(["b[1]", 3]) - end - end - - context "when params_encoding is :rack" do - before { params.params_encoding = :rack } - it "transforms without indexes" do - expect(pairs).to include([:a, 1]) - expect(pairs).to include(["b[]", 2]) - expect(pairs).to include(["b[]", 3]) - end - end - - context "when params_encoding is :none" do - before { params.params_encoding = :none } - it "does no transformation" do - expect(pairs).to include([:a, 1]) - expect(pairs).to include([:b, [2, 3]]) - end - end - end - - context "when params contains something nested in an array" do - context "when string" do - let(:hash) { {:a => {:b => ["hello", "world"]}} } - - it "transforms" do - expect(pairs).to eq([["a[b][0]", "hello"], ["a[b][1]", "world"]]) - end - end - - context "when hash" do - let(:hash) { {:a => {:b => [{:c =>1}, {:d => 2}]}} } - - it "transforms" do - expect(pairs).to eq([["a[b][0][c]", 1], ["a[b][1][d]", 2]]) - end - end - - context "when file" do - let(:file) { File.open("spec/spec_helper.rb") } - let(:file_info) { params.method(:file_info).call(file) } - let(:hash) { {:a => {:b => [file]}} } - let(:mime_type) { file_info[1] } - - it "transforms" do - expect(pairs).to eq([["a[b][0]", file_info]]) - end - - context "when MIME" do - if defined?(MIME) - context "when mime type" do - it "sets mime type to text" do - expect(mime_type).to eq("application/x-ruby") - end - end - end - - context "when no mime type" do - let(:file) { Tempfile.new("fubar") } - - it "sets mime type to default application/octet-stream" do - expect(mime_type).to eq("application/octet-stream") - end - end - end - - context "when no MIME" do - before { hide_const("MIME") } - - it "sets mime type to default application/octet-stream" do - expect(mime_type).to eq("application/octet-stream") - end - end - end - end - - - context "when params contains file" do - let(:file) { Tempfile.new("fubar") } - let(:file_info) { params.method(:file_info).call(file) } - let(:hash) { {:a => 1, :b => file} } - - it "transforms" do - expect(pairs).to include([:a, 1]) - expect(pairs).to include([:b, file_info]) - end - end - - context "when params key contains a null byte" do - let(:hash) { {:a => "1\0" } } - - it "preserves" do - expect(pairs).to eq([[:a, "1\0"]]) - end - end - - context "when params value contains a null byte" do - let(:hash) { {"a\0" => 1 } } - - it "preserves" do - expect(pairs).to eq([["a\0", 1]]) - end - end - end - - describe "#empty?" do - context "when params empty" do - it "returns true" do - expect(params.empty?).to be_truthy - end - end - - context "when params not empty" do - let(:hash) { {:a => 1} } - - it "returns false" do - expect(params.empty?).to be_falsey - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/response_callbacks_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/response_callbacks_spec.rb deleted file mode 100644 index f142fad7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/response_callbacks_spec.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::ResponseCallbacks do - let(:easy) { Ethon::Easy.new } - - [:on_complete, :on_headers, :on_body, :on_progress].each do |callback_type| - describe "##{callback_type}" do - it "responds" do - expect(easy).to respond_to("#{callback_type}") - end - - context "when no block given" do - it "returns @#{callback_type}" do - expect(easy.send("#{callback_type}")).to eq([]) - end - end - - context "when block given" do - it "stores" do - easy.send(callback_type) { p 1 } - expect(easy.instance_variable_get("@#{callback_type}").size).to eq(1) - end - end - - context "when multiple blocks given" do - it "stores" do - easy.send(callback_type) { p 1 } - easy.send(callback_type) { p 2 } - expect(easy.instance_variable_get("@#{callback_type}").size).to eq(2) - end - end - end - end - - describe "#complete" do - before do - easy.on_complete {|r| String.new(r.url) } - end - - it "executes blocks and passes self" do - expect(String).to receive(:new).with(easy.url) - easy.complete - end - - context "when @on_complete nil" do - it "doesn't raise" do - easy.instance_variable_set(:@on_complete, nil) - expect{ easy.complete }.to_not raise_error - end - end - end - - describe "#headers" do - before do - easy.on_headers {|r| String.new(r.url) } - end - - it "executes blocks and passes self" do - expect(String).to receive(:new).with(easy.url) - easy.headers - end - - context "when @on_headers nil" do - it "doesn't raise" do - easy.instance_variable_set(:@on_headers, nil) - expect{ easy.headers }.to_not raise_error - end - end - end - - describe "#progress" do - context "when requesting for realz" do - it "executes callback" do - post = Ethon::Easy::Http::Post.new("http://localhost:3001", {:body => "bar=fu"}) - post.setup(easy) - @called = false - @has_dltotal = false - @has_ultotal = false - easy.on_progress { @called = true } - easy.on_progress { |dltotal, _, _, _| @has_dltotal ||= true } - easy.on_progress { |_, _, ultotal, _| @has_ultotal ||= true } - easy.perform - expect(@called).to be true - expect(@has_dltotal).to be true - expect(@has_ultotal).to be true - end - end - - context "when pretending" do - before do - @dltotal = nil - @dlnow = nil - @ultotal = nil - @ulnow = nil - easy.on_progress { |dltotal, dlnow, ultotal, ulnow| @dltotal = dltotal ; @dlnow = dlnow; @ultotal = ultotal; @ulnow = ulnow } - end - - it "executes blocks and passes dltotal" do - easy.progress(1, 2, 3, 4) - expect(@dltotal).to eq(1) - end - - it "executes blocks and passes dlnow" do - easy.progress(1, 2, 3, 4) - expect(@dlnow).to eq(2) - end - - it "executes blocks and passes ultotal" do - easy.progress(1, 2, 3, 4) - expect(@ultotal).to eq(3) - end - - it "executes blocks and passes ulnow" do - easy.progress(1, 2, 3, 4) - expect(@ulnow).to eq(4) - end - - context "when @on_progress nil" do - it "doesn't raise" do - easy.instance_variable_set(:@on_progress, nil) - expect{ easy.progress(1, 2, 3, 4) }.to_not raise_error - end - end - end - end - - describe "#body" do - before do - @chunk = nil - @r = nil - easy.on_body { |chunk, r| @chunk = chunk ; @r = r } - end - - it "executes blocks and passes self" do - easy.body("the chunk") - expect(@r).to be(easy) - end - - it "executes blocks and passes chunk" do - easy.body("the chunk") - expect(@chunk).to eq("the chunk") - end - - context "when @on_body nil" do - it "doesn't raise" do - easy.instance_variable_set(:@on_body, nil) - expect{ easy.body("the chunk") }.to_not raise_error - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/util_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/util_spec.rb deleted file mode 100644 index 048c5bdf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy/util_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy::Util do - class Dummy - include Ethon::Easy::Util - end - - let(:klass) { Dummy.new } - - describe "escape_zero_byte" do - context "when value has no zero byte" do - let(:value) { "hello world" } - - it "returns same value" do - expect(klass.escape_zero_byte(value)).to be(value) - end - end - - context "when value has zero byte" do - let(:value) { "hello \0world" } - - it "returns escaped" do - expect(klass.escape_zero_byte(value)).to eq("hello \\0world") - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy_spec.rb deleted file mode 100644 index c0e95655..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/easy_spec.rb +++ /dev/null @@ -1,203 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Easy do - let(:easy) { Ethon::Easy.new } - - describe ".new" do - it "inits curl" do - expect(Ethon::Curl).to receive(:init) - easy - end - - context "when options are empty" do - it "sets only callbacks" do - expect_any_instance_of(Ethon::Easy).to receive(:set_callbacks) - expect(Ethon::Easy).to receive(:set_option).never - easy - end - end - - context "when options not empty" do - context "when followlocation is set" do - let(:options) { { :followlocation => true } } - let(:easy) { Ethon::Easy.new(options) } - - it "sets followlocation" do - expect_any_instance_of(Ethon::Easy).to receive(:set_callbacks) - expect(Ethon::Curl).to receive(:set_option).with(:followlocation, true, anything) - easy - end - end - end - end - - describe "#set_attributes" do - context "when options are empty" do - it "sets only callbacks" do - expect_any_instance_of(Ethon::Easy).to receive(:set_callbacks) - expect(Ethon::Easy).to receive(:set_option).never - easy - end - end - - context "when options aren't empty" do - context "when valid key" do - it "sets" do - expect(easy).to receive(:verbose=).with(true) - easy.set_attributes({:verbose => true}) - end - end - - context "when invalid key" do - it "raises invalid option error" do - expect{ easy.set_attributes({:fubar => 1}) }.to raise_error(Ethon::Errors::InvalidOption) - end - end - end - end - - describe "#reset" do - before { easy.url = "www.example.com" } - - it "resets url" do - easy.reset - expect(easy.url).to be_nil - end - - it "resets escape?" do - easy.escape = false - easy.reset - expect(easy.escape?).to be_truthy - end - - it "resets hash" do - easy.reset - expect(easy.instance_variable_get(:@hash)).to be_nil - end - - it "resets easy handle" do - expect(Ethon::Curl).to receive(:easy_reset) - easy.reset - end - - it "resets on_complete" do - easy.on_complete { p 1 } - easy.reset - expect(easy.on_complete).to be_empty - end - - it "resets on_headers" do - easy.on_headers { p 1 } - easy.reset - expect(easy.on_headers).to be_empty - end - - it "resets on_body" do - easy.on_body { p 1 } - easy.reset - expect(easy.on_body).to be_empty - end - end - - describe "#dup" do - let!(:easy) do - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/" - easy.on_complete { 'on_complete' } - easy.on_headers { 'on_headers' } - easy.on_progress { 'on_progress' } - easy.response_body = String.new('test_body') - easy.response_headers = String.new('test_headers') - easy - end - let!(:e) { easy.dup } - - it "sets a new handle" do - expect(e.handle).not_to eq(easy.handle) - end - - it "preserves url" do - expect(e.url).to eq(easy.url) - end - - it "preserves on_complete callback" do - expect(e.on_complete).to be(easy.on_complete) - end - - it "preserves on_headers callback" do - expect(e.on_headers).to be(easy.on_headers) - end - - it 'preserves body_write_callback of original handle' do - expect { easy.perform }.to change { easy.response_body } - expect { easy.perform }.not_to change { e.response_body } - end - - it "preserves on_progress callback" do - expect(e.on_progress).to be(easy.on_progress) - end - - it 'sets new body_write_callback of duplicated handle' do - expect { e.perform }.to change { e.response_body } - expect { e.perform }.not_to change { easy.response_body } - end - - it 'preserves headers_write_callback of original handle' do - expect { easy.perform }.to change { easy.response_headers } - expect { easy.perform }.not_to change { e.response_headers } - end - - it 'sets new headers_write_callback of duplicated handle' do - expect { e.perform }.to change { e.response_headers } - expect { e.perform }.not_to change { easy.response_headers } - end - - it "resets response_body" do - expect(e.response_body).to be_empty - end - - it "resets response_headers" do - expect(e.response_headers).to be_empty - end - - it "sets response_body for duplicated Easy" do - e.perform - expect(e.response_body).not_to be_empty - end - - it "sets response_headers for duplicated Easy" do - e.perform - expect(e.response_headers).not_to be_empty - end - - it "preserves response_body for original Easy" do - e.perform - expect(easy.response_body).to eq('test_body') - end - - it "preserves response_headers for original Easy" do - e.perform - expect(easy.response_headers).to eq('test_headers') - end - end - - describe "#mirror" do - it "returns a Mirror" do - expect(easy.mirror).to be_a(Ethon::Easy::Mirror) - end - - it "builds from easy" do - expect(Ethon::Easy::Mirror).to receive(:from_easy).with(easy) - easy.mirror - end - end - - describe "#log_inspect" do - [ :url, :response_code, :return_code, :total_time ].each do |name| - it "contains #{name}" do - expect(easy.log_inspect).to match name.to_s - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/libc_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/libc_spec.rb deleted file mode 100644 index a323151e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/libc_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Libc do - describe "#getdtablesize", :if => !Ethon::Curl.windows? do - it "returns an integer" do - expect(Ethon::Libc.getdtablesize).to be_a(Integer) - end - - it "returns bigger zero", :if => !Ethon::Curl.windows? do - expect(Ethon::Libc.getdtablesize).to_not be_zero - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/loggable_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/loggable_spec.rb deleted file mode 100644 index 117cba3b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/loggable_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -require "spec_helper" - -describe Ethon::Loggable do - - describe "#logger=" do - - let(:logger) do - Logger.new($stdout).tap do |log| - log.level = Logger::INFO - end - end - - before do - Ethon.logger = logger - end - - it "sets the logger" do - expect(Ethon.logger).to eq(logger) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/operations_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/operations_spec.rb deleted file mode 100644 index 781b62aa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/operations_spec.rb +++ /dev/null @@ -1,298 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Multi::Operations do - let(:multi) { Ethon::Multi.new } - let(:easy) { Ethon::Easy.new } - let(:pointer) { FFI::MemoryPointer.new(:int) } - - describe "#handle" do - it "returns a pointer" do - expect(multi.handle).to be_a(FFI::Pointer) - end - end - - describe "#running_count" do - context "when hydra has no easy" do - it "returns nil" do - expect(multi.send(:running_count)).to be_nil - end - end - - context "when hydra has easy" do - before do - easy.url = "http://localhost:3001/" - multi.add(easy) - multi.send(:trigger, pointer) - end - - it "returns 1" do - expect(multi.send(:running_count)).to eq(1) - end - end - - context "when hydra has more easys" do - let(:another_easy) { Ethon::Easy.new } - - before do - easy.url = "http://localhost:3001/" - another_easy.url = "http://localhost:3001/" - multi.add(easy) - multi.add(another_easy) - multi.send(:trigger, pointer) - end - - it "returns 2" do - expect(multi.send(:running_count)).to eq(2) - end - end - end - - describe "#get_timeout" do - context "when code ok" do - let(:timeout) { 1 } - - before do - expect(Ethon::Curl).to receive(:multi_timeout).and_return(:ok) - multi.instance_variable_set(:@timeout, double(:read_long => timeout)) - end - - it "doesn't raise" do - expect{ multi.send(:get_timeout) }.to_not raise_error - end - - context "when timeout smaller zero" do - let(:timeout) { -1 } - - it "returns 1" do - expect(multi.send(:get_timeout)).to eq(1) - end - end - - context "when timeout bigger or equal zero" do - let(:timeout) { 2 } - - it "returns timeout" do - expect(multi.send(:get_timeout)).to eq(timeout) - end - end - end - - context "when code not ok" do - before { expect(Ethon::Curl).to receive(:multi_timeout).and_return(:not_ok) } - - it "raises MultiTimeout error" do - expect{ multi.send(:get_timeout) }.to raise_error(Ethon::Errors::MultiTimeout) - end - end - end - - describe "#set_fds" do - let(:timeout) { 1 } - let(:max_fd) { 1 } - - context "when code ok" do - before { expect(Ethon::Curl).to receive(:multi_fdset).and_return(:ok) } - - it "doesn't raise" do - expect{ multi.method(:set_fds).call(timeout) }.to_not raise_error - end - - context "when max_fd -1" do - let(:max_fd) { -1 } - - before do - multi.instance_variable_set(:@max_fd, double(:read_int => max_fd)) - expect(multi).to receive(:sleep).with(0.001) - end - - it "waits 100ms" do - multi.method(:set_fds).call(timeout) - end - end - - context "when max_fd not -1" do - context "when code smaller zero" do - before { expect(Ethon::Curl).to receive(:select).and_return(-1) } - - it "raises Select error" do - expect{ multi.method(:set_fds).call(timeout) }.to raise_error(Ethon::Errors::Select) - end - end - - context "when code bigger or equal zero" do - before { expect(Ethon::Curl).to receive(:select).and_return(0) } - - it "doesn't raise" do - expect{ multi.method(:set_fds).call(timeout) }.to_not raise_error - end - end - end - end - - context "when code not ok" do - before { expect(Ethon::Curl).to receive(:multi_fdset).and_return(:not_ok) } - - it "raises MultiFdset error" do - expect{ multi.method(:set_fds).call(timeout) }.to raise_error(Ethon::Errors::MultiFdset) - end - end - end - - describe "#perform" do - context "when no easy handles" do - it "returns nil" do - expect(multi.perform).to be_nil - end - - it "logs" do - expect(Ethon.logger).to receive(:debug).twice - multi.perform - end - end - - context "when easy handle" do - before do - easy.url = "http://localhost:3001/" - multi.add(easy) - end - - it "requests" do - multi.perform - end - - it "sets easy" do - multi.perform - expect(easy.response_code).to eq(200) - end - end - - context "when four easy handles" do - let(:easies) do - ary = [] - 4.times do - ary << another_easy = Ethon::Easy.new - another_easy.url = "http://localhost:3001/" - end - ary - end - - before do - easies.each { |e| multi.add(e) } - multi.perform - end - - it "sets response codes" do - expect(easies.all?{ |e| e.response_code == 200 }).to be_truthy - end - end - end - - describe "#ongoing?" do - context "when easy_handles" do - before { multi.easy_handles << 1 } - - context "when running_count not greater 0" do - before { multi.instance_variable_set(:@running_count, 0) } - - it "returns true" do - expect(multi.method(:ongoing?).call).to be_truthy - end - end - - context "when running_count greater 0" do - before { multi.instance_variable_set(:@running_count, 1) } - - it "returns true" do - expect(multi.method(:ongoing?).call).to be_truthy - end - end - end - - context "when no easy_handles" do - context "when running_count not greater 0" do - before { multi.instance_variable_set(:@running_count, 0) } - - it "returns false" do - expect(multi.method(:ongoing?).call).to be_falsey - end - end - - context "when running_count greater 0" do - before { multi.instance_variable_set(:@running_count, 1) } - - it "returns true" do - expect(multi.method(:ongoing?).call).to be_truthy - end - end - end - end - - describe "#init_vars" do - it "sets @timeout" do - expect(multi.instance_variable_get(:@timeout)).to be_a(FFI::MemoryPointer) - end - - it "sets @timeval" do - expect(multi.instance_variable_get(:@timeval)).to be_a(Ethon::Curl::Timeval) - end - - it "sets @fd_read" do - expect(multi.instance_variable_get(:@fd_read)).to be_a(Ethon::Curl::FDSet) - end - - it "sets @fd_write" do - expect(multi.instance_variable_get(:@fd_write)).to be_a(Ethon::Curl::FDSet) - end - - it "sets @fd_excep" do - expect(multi.instance_variable_get(:@fd_excep)).to be_a(Ethon::Curl::FDSet) - end - - it "sets @max_fd" do - expect(multi.instance_variable_get(:@max_fd)).to be_a(FFI::MemoryPointer) - end - end - - describe "#reset_fds" do - after { multi.method(:reset_fds).call } - - it "resets @fd_read" do - expect(multi.instance_variable_get(:@fd_read)).to receive(:clear) - end - - it "resets @fd_write" do - expect(multi.instance_variable_get(:@fd_write)).to receive(:clear) - end - - it "resets @fd_excep" do - expect(multi.instance_variable_get(:@fd_excep)).to receive(:clear) - end - end - - describe "#check" do - it { skip("untested") } - end - - describe "#run" do - it { skip("untested") } - end - - describe "#trigger" do - it "calls multi perform" do - expect(Ethon::Curl).to receive(:multi_perform) - multi.send(:trigger, pointer) - end - - it "sets running count" do - multi.instance_variable_set(:@running_count, nil) - multi.send(:trigger, pointer) - expect(multi.instance_variable_get(:@running_count)).to_not be_nil - end - - it "returns multi perform code" do - expect(Ethon::Curl).to receive(:multi_perform).and_return(:ok) - expect(multi.send(:trigger, pointer)).to eq(:ok) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/options_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/options_spec.rb deleted file mode 100644 index b4832c68..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/options_spec.rb +++ /dev/null @@ -1,182 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Multi::Options do - let(:multi) { Ethon::Multi.new } - - [ - :maxconnects, :pipelining, :socketdata, :socketfunction, - :timerdata, :timerfunction, :max_total_connections - ].each do |name| - describe "#{name}=" do - it "responds_to" do - expect(multi).to respond_to("#{name}=") - end - - it "sets option" do - expect(Ethon::Curl).to receive(:set_option).with(name, anything, anything, anything) - multi.method("#{name}=").call(1) - end - end - end - - context "socket_action mode" do - let(:multi) { Ethon::Multi.new(execution_mode: :socket_action) } - - describe "#socketfunction callbacks" do - it "allows multi_code return values" do - calls = [] - multi.socketfunction = proc do |handle, sock, what, userp, socketp| - calls << what - :ok - end - - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/?delay=1" - multi.add(easy) - expect(calls).to eq([]) - 5.times do - multi.socket_action - break unless calls.empty? - sleep 0.1 - end - expect(calls.last).to eq(:in).or(eq(:out)) - multi.delete(easy) - expect(calls.last).to eq(:remove) - end - - it "allows integer return values (compatibility)" do - called = false - multi.socketfunction = proc do |handle, sock, what, userp, socketp| - called = true - 0 - end - - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/?delay=1" - multi.add(easy) - 5.times do - multi.socket_action - break if called - sleep 0.1 - end - multi.delete(easy) - - expect(called).to be_truthy - end - - it "errors on invalid return codes" do - called = false - multi.socketfunction = proc do |handle, sock, what, userp, socketp| - called = true - "hi" - end - - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/?delay=1" - multi.add(easy) - expect { - 5.times do - multi.socket_action - break if called - sleep 0.1 - end - }.to raise_error(ArgumentError) - expect { multi.delete(easy) }.to raise_error(ArgumentError) - end - end - - describe "#timerfunction callbacks" do - it "allows multi_code return values" do - calls = [] - multi.timerfunction = proc do |handle, timeout_ms, userp| - calls << timeout_ms - :ok - end - - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/?delay=1" - multi.add(easy) - expect(calls.last).to be >= 0 # adds an immediate timeout - - multi.delete(easy) - expect(calls.last).to eq(-1) # cancels the timer - end - - it "allows integer return values (compatibility)" do - called = false - multi.timerfunction = proc do |handle, timeout_ms, userp| - called = true - 0 - end - - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/?delay=1" - multi.add(easy) - multi.socket_action - multi.delete(easy) - - expect(called).to be_truthy - end - - it "errors on invalid return codes" do - called = false - multi.timerfunction = proc do |handle, timeout_ms, userp| - called = true - "hi" - end - - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/?delay=1" - expect { multi.add(easy) }.to raise_error(ArgumentError) - end - end - end - - describe "#value_for" do - context "when option in bool" do - context "when value true" do - let(:value) { true } - - it "returns 1" do - expect(multi.method(:value_for).call(value, :bool)).to eq(1) - end - end - - context "when value false" do - let(:value) { false } - - it "returns 0" do - expect(multi.method(:value_for).call(value, :bool)).to eq(0) - end - end - end - - - context "when value in int" do - let(:value) { "2" } - - it "returns value casted to int" do - expect(multi.method(:value_for).call(value, :int)).to eq(2) - end - end - - context "when value in unspecific_options" do - context "when value a string" do - let(:value) { "www.example.\0com" } - - it "returns zero byte escaped string" do - expect(multi.method(:value_for).call(value, nil)).to eq("www.example.\\0com") - end - end - - context "when value not a string" do - let(:value) { 1 } - - it "returns value" do - expect(multi.method(:value_for).call(value, nil)).to eq(1) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/stack_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/stack_spec.rb deleted file mode 100644 index 5eb5900c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi/stack_spec.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Multi::Stack do - let(:multi) { Ethon::Multi.new } - let(:easy) { Ethon::Easy.new } - - describe "#add" do - context "when easy already added" do - before { multi.add(easy) } - - it "returns nil" do - expect(multi.add(easy)).to be_nil - end - end - - context "when easy new" do - it "adds easy to multi" do - expect(Ethon::Curl).to receive(:multi_add_handle).and_return(:ok) - multi.add(easy) - end - - it "adds easy to easy_handles" do - multi.add(easy) - expect(multi.easy_handles).to include(easy) - end - end - - context "when multi_add_handle fails" do - it "raises multi add error" do - expect(Ethon::Curl).to receive(:multi_add_handle).and_return(:bad_easy_handle) - expect{ multi.add(easy) }.to raise_error(Ethon::Errors::MultiAdd) - end - end - - context "when multi cleaned up before" do - it "raises multi add error" do - Ethon::Curl.multi_cleanup(multi.handle) - expect{ multi.add(easy) }.to raise_error(Ethon::Errors::MultiAdd) - end - end - end - - describe "#delete" do - context "when easy in easy_handles" do - before { multi.add(easy) } - - it "deletes easy from multi" do - expect(Ethon::Curl).to receive(:multi_remove_handle).and_return(:ok) - multi.delete(easy) - end - - it "deletes easy from easy_handles" do - multi.delete(easy) - expect(multi.easy_handles).to_not include(easy) - end - end - - context "when easy is not in easy_handles" do - it "does nothing" do - expect(Ethon::Curl).to receive(:multi_add_handle).and_return(:ok) - multi.add(easy) - end - - it "adds easy to easy_handles" do - multi.add(easy) - expect(multi.easy_handles).to include(easy) - end - end - - context "when multi_remove_handle fails" do - before { multi.add(easy) } - - it "raises multi remove error" do - expect(Ethon::Curl).to receive(:multi_remove_handle).and_return(:bad_easy_handle) - expect{ multi.delete(easy) }.to raise_error(Ethon::Errors::MultiRemove) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi_spec.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi_spec.rb deleted file mode 100644 index a483357c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/ethon/multi_spec.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true -require 'spec_helper' - -describe Ethon::Multi do - describe ".new" do - it "inits curl" do - expect(Ethon::Curl).to receive(:init) - Ethon::Multi.new - end - - context "with default options" do - it "allows running #perform with the default execution_mode" do - Ethon::Multi.new.perform - end - - it "refuses to run #socket_action" do - expect { Ethon::Multi.new.socket_action }.to raise_error(ArgumentError) - end - end - - context "when options not empty" do - context "when pipelining is set" do - let(:options) { { :pipelining => true } } - - it "sets pipelining" do - expect_any_instance_of(Ethon::Multi).to receive(:pipelining=).with(true) - Ethon::Multi.new(options) - end - end - - context "when execution_mode option is :socket_action" do - let(:options) { { :execution_mode => :socket_action } } - let(:multi) { Ethon::Multi.new(options) } - - it "refuses to run #perform" do - expect { multi.perform }.to raise_error(ArgumentError) - end - - it "allows running #socket_action" do - multi.socket_action - end - end - end - end - - describe "#socket_action" do - let(:options) { { :execution_mode => :socket_action } } - let(:select_state) { { :readers => [], :writers => [], :timeout => 0 } } - let(:multi) { - multi = Ethon::Multi.new(options) - multi.timerfunction = proc do |handle, timeout_ms, userp| - timeout_ms = nil if timeout_ms == -1 - select_state[:timeout] = timeout_ms - :ok - end - multi.socketfunction = proc do |handle, sock, what, userp, socketp| - case what - when :remove - select_state[:readers].delete(sock) - select_state[:writers].delete(sock) - when :in - select_state[:readers].push(sock) unless select_state[:readers].include? sock - select_state[:writers].delete(sock) - when :out - select_state[:readers].delete(sock) - select_state[:writers].push(sock) unless select_state[:writers].include? sock - when :inout - select_state[:readers].push(sock) unless select_state[:readers].include? sock - select_state[:writers].push(sock) unless select_state[:writers].include? sock - else - raise ArgumentError, "invalid value for 'what' in socketfunction callback" - end - :ok - end - multi - } - - def fds_to_ios(fds) - fds.map do |fd| - IO.for_fd(fd).tap { |io| io.autoclose = false } - end - end - - def perform_socket_action_until_complete - multi.socket_action # start things off - - while multi.ongoing? - readers, writers, _ = IO.select( - fds_to_ios(select_state[:readers]), - fds_to_ios(select_state[:writers]), - [], - select_state[:timeout] - ) - - to_notify = Hash.new { |hash, key| hash[key] = [] } - unless readers.nil? - readers.each do |reader| - to_notify[reader] << :in - end - end - unless writers.nil? - writers.each do |writer| - to_notify[writer] << :out - end - end - - to_notify.each do |io, readiness| - multi.socket_action(io, readiness) - end - - # if we didn't have anything to notify, then we timed out - multi.socket_action if to_notify.empty? - end - ensure - multi.easy_handles.dup.each do |h| - multi.delete(h) - end - end - - it "supports an end-to-end request" do - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/" - multi.add(easy) - - perform_socket_action_until_complete - - expect(multi.ongoing?).to eq(false) - end - - it "supports multiple concurrent requests" do - handles = [] - 10.times do - easy = Ethon::Easy.new - easy.url = "http://localhost:3001/?delay=1" - multi.add(easy) - handles << easy - end - - start = Time.now - perform_socket_action_until_complete - duration = Time.now - start - - # these should have happened concurrently - expect(duration).to be < 2 - expect(multi.ongoing?).to eq(false) - - handles.each do |handle| - expect(handle.response_code).to eq(200) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/spec_helper.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/spec_helper.rb deleted file mode 100644 index 55bc9ecb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/spec_helper.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -$LOAD_PATH.unshift(File.dirname(__FILE__)) -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) - -require 'bundler' -Bundler.setup -require "ethon" -require 'rspec' - -if defined? require_relative - require_relative 'support/localhost_server' - require_relative 'support/server' -else - require 'support/localhost_server' - require 'support/server' -end - -# Ethon.logger = Logger.new($stdout).tap do |log| -# log.level = Logger::DEBUG -# end - -RSpec.configure do |config| - # config.order = :rand - - config.before(:suite) do - LocalhostServer.new(TESTSERVER.new, 3001) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/support/localhost_server.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/support/localhost_server.rb deleted file mode 100644 index a7b119a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/support/localhost_server.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true -require 'rack' -require 'rack/handler/webrick' -require 'net/http' - -# The code for this is inspired by Capybara's server: -# http://github.com/jnicklas/capybara/blob/0.3.9/lib/capybara/server.rb -class LocalhostServer - READY_MESSAGE = "Server ready" - - class Identify - def initialize(app) - @app = app - end - - def call(env) - if env["PATH_INFO"] == "/__identify__" - [200, {}, [LocalhostServer::READY_MESSAGE]] - else - @app.call(env) - end - end - end - - attr_reader :port - - def initialize(rack_app, port = nil) - @port = port || find_available_port - @rack_app = rack_app - concurrently { boot } - wait_until(10, "Boot failed.") { booted? } - end - - private - - def find_available_port - server = TCPServer.new('127.0.0.1', 0) - server.addr[1] - ensure - server.close if server - end - - def boot - # Use WEBrick since it's part of the ruby standard library and is available on all ruby interpreters. - options = { :Port => port } - options.merge!(:AccessLog => [], :Logger => WEBrick::BasicLog.new(StringIO.new)) unless ENV['VERBOSE_SERVER'] - Rack::Handler::WEBrick.run(Identify.new(@rack_app), **options) - end - - def booted? - res = ::Net::HTTP.get_response("localhost", '/__identify__', port) - if res.is_a?(::Net::HTTPSuccess) or res.is_a?(::Net::HTTPRedirection) - return res.body == READY_MESSAGE - end - rescue Errno::ECONNREFUSED, Errno::EBADF - return false - end - - def concurrently - if should_use_subprocess? - pid = Process.fork do - trap(:INT) { ::Rack::Handler::WEBrick.shutdown } - yield - exit # manually exit; otherwise this sub-process will re-run the specs that haven't run yet. - end - - at_exit do - Process.kill('INT', pid) - begin - Process.wait(pid) - rescue Errno::ECHILD - # ignore this error...I think it means the child process has already exited. - end - end - else - Thread.new { yield } - end - end - - def should_use_subprocess? - # !ENV['THREADED'] - false - end - - def wait_until(timeout, error_message, &block) - start_time = Time.now - - while true - return if yield - raise TimeoutError.new(error_message) if (Time.now - start_time) > timeout - sleep(0.05) - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/support/server.rb b/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/support/server.rb deleted file mode 100644 index ab8ffd3f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ethon-0.16.0/spec/support/server.rb +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true -require 'json' -require 'zlib' -require 'sinatra/base' - -TESTSERVER = Sinatra.new do - set :logging, nil - - fail_count = 0 - - post '/file' do - { - 'content-type' => params[:file][:type], - 'filename' => params[:file][:filename], - 'content' => params[:file][:tempfile].read, - 'request-content-type' => request.env['CONTENT_TYPE'] - }.to_json - end - - get '/multiple-headers' do - [200, { 'Set-Cookie' => %w[ foo bar ], 'Content-Type' => 'text/plain' }, ['']] - end - - get '/fail/:number' do - if fail_count >= params[:number].to_i - "ok" - else - fail_count += 1 - error 500, "oh noes!" - end - end - - get '/fail_forever' do - error 500, "oh noes!" - end - - get '/redirect' do - redirect '/' - end - - post '/redirect' do - redirect '/' - end - - get '/bad_redirect' do - redirect '/bad_redirect' - end - - get '/auth_basic/:username/:password' do - @auth ||= Rack::Auth::Basic::Request.new(request.env) - # Check that we've got a basic auth, and that it's credentials match the ones - # provided in the request - if @auth.provided? && @auth.basic? && @auth.credentials == [ params[:username], params[:password] ] - # auth is valid - confirm it - true - else - # invalid auth - request the authentication - response['WWW-Authenticate'] = %(Basic realm="Testing HTTP Auth") - throw(:halt, [401, "Not authorized\n"]) - end - end - - get '/auth_ntlm' do - # we're just checking for the existence if NTLM auth header here. It's validation - # is too troublesome and really doesn't bother is much, it's up to libcurl to make - # it valid - response['WWW-Authenticate'] = 'NTLM' - is_ntlm_auth = /^NTLM/ =~ request.env['HTTP_AUTHORIZATION'] - true if is_ntlm_auth - throw(:halt, [401, "Not authorized\n"]) if !is_ntlm_auth - end - - get '/gzipped' do - req_env = request.env.to_json - z = Zlib::Deflate.new - gzipped_env = z.deflate(req_env, Zlib::FINISH) - z.close - response['Content-Encoding'] = 'gzip' - gzipped_env - end - - get '/**' do - sleep params["delay"].to_i if params.has_key?("delay") - request.env.merge!(:body => request.body.read).to_json - end - - head '/**' do - sleep params["delay"].to_i if params.has_key?("delay") - end - - put '/**' do - request.env.merge!(:body => request.body.read).to_json - end - - post '/**' do - request.env.merge!(:body => request.body.read).to_json - end - - delete '/**' do - request.env.merge!(:body => request.body.read).to_json - end - - patch '/**' do - request.env.merge!(:body => request.body.read).to_json - end - - options '/**' do - request.env.merge!(:body => request.body.read).to_json - end - - route 'PURGE', '/**' do - request.env.merge!(:body => request.body.read).to_json - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/CHANGELOG.md deleted file mode 100644 index cd42c39f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/CHANGELOG.md +++ /dev/null @@ -1,179 +0,0 @@ -# Changelog - -## 1.2.7 (May 12, 2018) -* Fix segfault on large numbers of connections [#843] - -## 1.2.6 (April 30, 2018) -* *Fix segfault when an Exception is raised from unbind callback (for real this time!)* -* Fix race condition while initializing the machine [#756] -* Fix for newer compilers where bind() and std::bind() conflict [#830, #831] -* Be verbose about SSL connection errors [#807] -* Avoid explicitly calling class methods when in class scope -* Java: Add EM_PROTO_SSL/TLS definitions [#773, #791] -* Java: return zero when sending data to a closed connection [#475, #804] -* Pure Ruby: Connection::error? calls report_connection_error_status [#801] - -## 1.2.5 (July 27, 2017) -* Java: Use long for larger values in oneshot timer intervals [#784, #794] - -## 1.2.4 (July 27, 2017) -* Java: Add EM_PROTO_SSL/TLS definitions [#773, #791] -* Fix IPv6 UDP get_peername [#788] -* Allow for larger values in oneshot timer intervals [#784, #793] -* Update extconf.rb to allow MinGW builds with OpenSSL 1.1.0 [#785] - -## 1.2.3 (February 22, 2017) -* Pure Ruby: Add get_sockname [#308, #772] -* Fix segfault when an Exception is raised from unbind callback [#765, #766] -* Allow destructors to throw when compiling in >= C++11 [#767] - -## 1.2.2 (January 23, 2017) -* Java: Fix Fixnum deprecated warning in Ruby 2.4+ [#759] -* Fix uncaught C++ exception in file watcher and raise InvalidSignature [#512, #757] -* Fix connection count off-by-one for epoll and kqueue [#750] -* Fix uninitialized variable warning in EM::P::HttpClient [#749] -* Fix missing initial value for EventableDescriptor NextHeartbeat [#748] -* Fix hostname resolution on Solaris, Ilumos, SmartOS, et al [#745, #746] -* Improve reliability of tests, reduce public Internet accesses in tests [#656, #666, #749] - -## 1.2.1 (November 15, 2016) -* Throw strerror(errno) when getsockname or getpeername fail [#683] -* Use a single concrete implementation of getpeername/getsockname, the rest pure virtuals [#683] -* Use gai_strerror to get the failure string from getaddrinfo [#744] -* Fix deregistering descriptor when using KQUEUE [#728] -* Fix to enable to work an example code in EM::Pool [#731] -* LineText2: Add regular expression delimiter support [#706] -* Pure Ruby: EM rescue ECONNREFUSED on initial TCP connect [#741] -* Pure Ruby: EM SSL (working start_tls) [#712] -* Pure Ruby: EM fixes [#707] -* Java: Use Acceptors to get peer and sock names if not present in Connections [#743] - -## 1.2.0.1 (March 15, 2016) -* Fix crash when accepting IPv6 connections due to struct sockaddr_in [#698, #699] - -## 1.2.0 (March 15, 2016) -* Integrate work from the EventMachine-LE 1.1.x versions [#570] -* Add start_tls options :ecdh_curve, :dhparam, :fail_if_no_peer_cert [#195, #275, #399, #665] -* Add start_tls option :ssl_version for choosing SSL/TLS versions and ciphers [#359, #348, #603, #654] -* Add start_tls option :sni_hostname to be passed to TLS params [#593] -* Add method EM::Channel#num_subscribers to get the number of subscribers to a channel [#640] -* Add support for proc-sources in EM::Iterator [#639] -* Factor out method cleanup_machine to cleanup code from EM.run [#650] -* Replace Exception class with StandardError [#637] -* Close socket on close_connection even after close_connection_after_writing [#694] -* Allow reusing of datagram socket/setting bind device [#662] -* Handle deferred exceptions in reactor thread [#486] -* Reimplement Queue to avoid shift/push performance problem [#311] -* Windows: Switch from gethostbyname to getaddrinfo, support IPv6 addresses [#303, #630] -* Windows: Use rake-compiler-dock to cross-compile gems [#627] -* Windows: Add AppVeyor configuration for Windows CI testing [#578] -* Windows: Bump rake-compiler to version 0.9.x [#542] -* Fix compilation on AIX (w/ XLC) [#693] -* Fix build on OpenBSD [#690] -* Fix OpenSSL compile issue on AIX 7.1 [#678] -* Fix EventMachine.fork_reactor keeps the threadpool of the original process [#425] -* Fix to prevent event machine from stopping when a raise is done in an unbind [#327] - -## 1.0.9.1 (January 14, 2016) -* Fix EPROTO not defined on Windows [#676] -* Fix missing cast to struct sockaddr * [#671] -* Fix bug in OpenSSL path detection [#675] - -## 1.0.9 (January 13, 2016) -* Try more ways to detect OpenSSL [#602, #643, #661, #663, #668, #669] -* Use WSAGetLastError in pipe.cpp same as ed.cpp [#659] -* Test compiler flags with the C++ compiler and add them to CXXFLAGS [#634, #651] -* Restore silent-fail on unsupported EM.epoll and EM.kqueue [#638, #649] -* getDescriptorByFileno deprecated in JRuby 1.7.x, removed in JRuby 9000 [#642, #648] -* Add -Wno-address always-true because on Windows rb_fd_select [#578] -* Remove the WITHOUT_SSL constant [#578] -* Fix SSL error when the server replies a TLS Alert to our ClientHello [#544, #653] -* Use WSAStringToAddress in lieu of inet_pton for IPv6 address detection on Windows [#595, #632] -* Fix nasty TCP/IPv6 bug [#595, #632] -* Use select_large_fdset on Solaris [#611, #625] -* Detect the Solaris Studio compiler [#611, #625] -* Throw a message with strerror included [#136, #621] - -## 1.0.8 (August 6, 2015) -* fix kqueue assertion failed, postpone ArmKqueueWriter until all events are processed [#51, #176, #372, #401, #619] -* fix Rubinius GC, crank the machine from Ruby space when running Rubinius [#201, #202, #617] -* test to show that LineText2 preserves whitespace and newlines [#32, #622] -* bump up compiler warnings and resolve them [#616] -* fix Windows x64 use uintptr_t instead of unsigned long for binding pointers [#612, #615] -* fix linetext2 unroll tail recursion to avoid stack level too deep [#609] -* fix for compilation with SSL on windows [#601] -* open file descriptors and sockets with O_CLOEXEC where possible [#298, #488, #591] -* fix SmtpClient: send second EHLO after STARTTLS. [#589] -* fix nul-terminated strings in C, use StringValueCStr instead of StringValuePtr - -## 1.0.7 (February 10, 2015) -* fix delay in kqueue/epoll reactor shutdown when timers exist [#587] -* fix memory leak introduced in v1.0.5 [#586] -* expose EM.set_simultaneous_accept_count [#420] -* fix busy loop when EM.run and EM.next_tick are invoked from exception handler [#452] - -## 1.0.6 (February 3, 2015) -* add support for Rubinius Process::Status [#568] -* small bugfixes for SmtpServer [#449] -* update buftok.rb [#547] -* fix assertion on Write() [#525] -* work around mkmf.rb bug preventing gem installation [#574] -* add pause/resume support to jruby reactor [#556] -* fix pure ruby reactor to use 127.0.0.1 instead of localhost [#439] -* fix compilation under macruby [#243] -* add chunked encoding to http client [#111] -* fix errors on win32 when dealing with pipes [1ea45498] [#105] - -## 1.0.5 (February 2, 2015) -* use monotonic clocks on Linux, OS X, Solaris, and Windows [#563] -* use the rb_fd_* API to get autosized fd_sets [#502] -* add basic tests that the DNS resolver isn't leaking timers [#571] -* update to test-unit 2.x and improve various unit tests [#551] -* remove EventMachine_t::Popen code marked by ifdef OBSOLETE [#551] -* ruby 2.0 may fail at Queue.pop, so rescue and complain to $stderr [#551] -* set file handle to INVALID_HANDLE_VALUE after closing the file [#565] -* use `defined?` instead of rescuing NameError for flow control [#535] -* fix closing files and sockets on Windows [#564] -* fix file uploads in Windows [#562] -* catch failure to fork [#539] -* use chunks for SSL write [#545] - -## 1.0.4 (December 19, 2014) -* add starttls_options to smtp server [#552] -* fix closesocket on windows [#497] -* fix build on ruby 2.2 [#503] -* fix build error on ruby 1.9 [#508] -* fix timer leak during dns resolution [#489] -* add concurrency validation to EM::Iterator [#468] -* add get_file_descriptor to get fd for a signature [#467] -* add EM.attach_server and EM.attach_socket_server [#465, #466] -* calling pause from receive_data takes effect immediately [#464] -* reactor_running? returns false after fork [#455] -* fix infinite loop on double close [edc4d0e6, #441, #445] -* fix compilation issue on llvm [#433] -* fix socket error codes on win32 [ff811a81] -* fix EM.stop latency when timers exist [8b613d05, #426] -* fix infinite loop when system time changes [1427a2c80, #428] -* fix crash when callin attach/detach in the same tick [#427] -* fix compilation issue on solaris [#416] - -## 1.0.3 (March 8, 2013) -* EM.system was broken in 1.0.2 release [#413] - -## 1.0.2 (March 8, 2013) -* binary win32 gems now include fastfilereader shim [#222] -* fix long-standing connection timeout issues [27fdd5b, igrigorik/em-http-request#222] -* http and line protocol cleanups [#193, #151] -* reactor return value cleanup [#225] -* fix double require from gemspec [#284] -* fix smtp server reset behavior [#351] -* fix EM.system argument handling [#322] -* ruby 1.9 compat in smtp server and stomp protocols [#349, #315] -* fix pause from post_init [#380] - -## 1.0.1 (February 27, 2013) -* use rb_wait_for_single_fd() on ruby 2.0 to fix rb_thread_select() deprecation [#363] -* fix epoll/kqueue mode in ruby 2.0 by removing calls to rb_enable_interrupt() [#248, #389] -* fix memory leak when verifying ssl cerificates [#403] -* fix initial connection delay [#393, #374] -* fix build on windows [#371] diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/GNU b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/GNU deleted file mode 100644 index 3b70c5be..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/GNU +++ /dev/null @@ -1,281 +0,0 @@ -. - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your - freedom to share and change it. By contrast, the GNU General Public - License is intended to guarantee your freedom to share and change free - software--to make sure the software is free for all its users. This - General Public License applies to most of the Free Software - Foundation's software and to any other program whose authors commit to - using it. (Some other Free Software Foundation software is covered by - the GNU Lesser General Public License instead.) You can apply it to - your programs, too. - - When we speak of free software, we are referring to freedom, not - price. Our General Public Licenses are designed to make sure that you - have the freedom to distribute copies of free software (and charge for - this service if you wish), that you receive source code or can get it - if you want it, that you can change the software or use pieces of it - in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid - anyone to deny you these rights or to ask you to surrender the rights. - These restrictions translate to certain responsibilities for you if you - distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether - gratis or for a fee, you must give the recipients all the rights that - you have. You must make sure that they, too, receive or can get the - source code. And you must show them these terms so they know their - rights. - - We protect your rights with two steps: (1) copyright the software, and - (2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software - patents. We wish to avoid the danger that redistributors of a free - program will individually obtain patent licenses, in effect making the - program proprietary. To prevent this, we have made it clear that any - patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains - a notice placed by the copyright holder saying it may be distributed - under the terms of this General Public License. The "Program", below, - refers to any such program or work, and a "work based on the Program" - means either the Program or any derivative work under copyright law: - that is to say, a work containing the Program or a portion of it, - either verbatim or with modifications and/or translated into another - language. (Hereinafter, translation is included without limitation in - the term "modification".) Each licensee is addressed as "you". - - Activities other than copying, distribution and modification are not - covered by this License; they are outside its scope. The act of - running the Program is not restricted, and the output from the Program - is covered only if its contents constitute a work based on the - Program (independent of having been made by running the Program). - Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's - source code as you receive it, in any medium, provided that you - conspicuously and appropriately publish on each copy an appropriate - copyright notice and disclaimer of warranty; keep intact all the - notices that refer to this License and to the absence of any warranty; - and give any other recipients of the Program a copy of this License - along with the Program. - - You may charge a fee for the physical act of transferring a copy, and - you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion - of it, thus forming a work based on the Program, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the Program, - and can be reasonably considered independent and separate works in - themselves, then this License, and its terms, do not apply to those - sections when you distribute them as separate works. But when you - distribute the same sections as part of a whole which is a work based - on the Program, the distribution of the whole must be on the terms of - this License, whose permissions for other licensees extend to the - entire whole, and thus to each and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or contest - your rights to work written entirely by you; rather, the intent is to - exercise the right to control the distribution of derivative or - collective works based on the Program. - - In addition, mere aggregation of another work not based on the Program - with the Program (or with a work based on the Program) on a volume of - a storage or distribution medium does not bring the other work under - the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms of - Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete source - code means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to - control compilation and installation of the executable. However, as a - special exception, the source code distributed need not include - anything that is normally distributed (in either source or binary - form) with the major components (compiler, kernel, and so on) of the - operating system on which the executable runs, unless that component - itself accompanies the executable. - - If distribution of executable or object code is made by offering - access to copy from a designated place, then offering equivalent - access to copy the source code from the same place counts as - distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense or distribute the Program is - void, and will automatically terminate your rights under this License. - However, parties who have received copies, or rights, from you under - this License will not have their licenses terminated so long as such - parties remain in full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify or - distribute the Program or its derivative works. These actions are - prohibited by law if you do not accept this License. Therefore, by - modifying or distributing the Program (or any work based on the - Program), you indicate your acceptance of this License to do so, and - all its terms and conditions for copying, distributing or modifying - the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program subject to - these terms and conditions. You may not impose any further - restrictions on the recipients' exercise of the rights granted herein. - You are not responsible for enforcing compliance by third parties to - this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent issues), - conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot - distribute so as to satisfy simultaneously your obligations under this - License and any other pertinent obligations, then as a consequence you - may not distribute the Program at all. For example, if a patent - license would not permit royalty-free redistribution of the Program by - all those who receive copies directly or indirectly through you, then - the only way you could satisfy both it and this License would be to - refrain entirely from distribution of the Program. - - If any portion of this section is held invalid or unenforceable under - any particular circumstance, the balance of the section is intended to - apply and the section as a whole is intended to apply in other - circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of any - such claims; this section has the sole purpose of protecting the - integrity of the free software distribution system, which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is willing - to distribute software through any other system and a licensee cannot - impose that choice. - - This section is intended to make thoroughly clear what is believed to - be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, the - original copyright holder who places the Program under this License - may add an explicit geographical distribution limitation excluding - those countries, so that distribution is permitted only in or among - countries not thus excluded. In such case, this License incorporates - the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions - of the General Public License from time to time. Such new versions will - be similar in spirit to the present version, but may differ in detail to - address new problems or concerns. - - Each version is given a distinguishing version number. If the Program - specifies a version number of this License which applies to it and "any - later version", you have the option of following the terms and conditions - either of that version or of any later version published by the Free - Software Foundation. If the Program does not specify a version number of - this License, you may choose any version ever published by the Free Software - Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the author - to ask for permission. For software which is copyrighted by the Free - Software Foundation, write to the Free Software Foundation; we sometimes - make exceptions for this. Our decision will be guided by the two goals - of preserving the free status of all derivatives of our free software and - of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY - FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN - OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES - PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED - OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS - TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, - REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING - WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR - REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, - INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING - OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED - TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY - YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER - PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGES. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/LICENSE b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/LICENSE deleted file mode 100644 index fbe8c83b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/LICENSE +++ /dev/null @@ -1,60 +0,0 @@ -EventMachine is copyrighted free software owned by Francis Cianfrocca -(blackhedd ... gmail.com). The Owner of this software permits you to -redistribute and/or modify the software under either the terms of the GPL -version 2 (see the file GPL), or the conditions below ("Ruby License"): - - 1. You may make and give away verbatim copies of the source form of this - software without restriction, provided that you retain ALL of the - original copyright notices and associated disclaimers. - - 2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a) place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b) use the modified software only within your corporation or - organization. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the Owner. - - 3. You may distribute the software in object code or binary form, - provided that you do at least ONE of the following: - - a) distribute the binaries and library files of the software, - together with instructions (in a manual page or equivalent) - on where to get the original distribution. - - b) accompany the distribution with the machine-readable source of - the software. - - c) give non-standard binaries non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the Owner. - - 4. You may modify and include parts of the software into any other - software (possibly commercial), provided you comply with the terms in - Sections 1, 2, and 3 above. But some files in the distribution - are not written by the Owner, so they may be made available to you - under different terms. - - For the list of those files and their copying conditions, see the - file LEGAL. - - 5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whoever generated them, - and may be sold commercially, and may be aggregated with this - software. - - 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/README.md b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/README.md deleted file mode 100644 index 4b17cb4a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# About EventMachine [![Build Status](https://travis-ci.org/eventmachine/eventmachine.svg?branch=master)](https://travis-ci.org/eventmachine/eventmachine) [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/e9b0603462905d5b9118/maintainability)](https://codeclimate.com/github/eventmachine/eventmachine/maintainability) - - -## What is EventMachine ## - -EventMachine is an event-driven I/O and lightweight concurrency library for Ruby. -It provides event-driven I/O using the [Reactor pattern](http://en.wikipedia.org/wiki/Reactor_pattern), -much like [JBoss Netty](http://www.jboss.org/netty), [Apache MINA](http://mina.apache.org/), -Python's [Twisted](http://twistedmatrix.com), [Node.js](http://nodejs.org), libevent and libev. - -EventMachine is designed to simultaneously meet two key needs: - - * Extremely high scalability, performance and stability for the most demanding production environments. - * An API that eliminates the complexities of high-performance threaded network programming, - allowing engineers to concentrate on their application logic. - -This unique combination makes EventMachine a premier choice for designers of critical networked -applications, including Web servers and proxies, email and IM production systems, authentication/authorization -processors, and many more. - -EventMachine has been around since the early 2000s and is a mature and battle-tested library. - - -## What EventMachine is good for? ## - - * Scalable event-driven servers. Examples: [Thin](http://code.macournoyer.com/thin/) or [Goliath](https://github.com/postrank-labs/goliath/). - * Scalable asynchronous clients for various protocols, RESTful APIs and so on. Examples: [em-http-request](https://github.com/igrigorik/em-http-request) or [amqp gem](https://github.com/ruby-amqp/amqp). - * Efficient network proxies with custom logic. Examples: [Proxymachine](https://github.com/mojombo/proxymachine/). - * File and network monitoring tools. Examples: [eventmachine-tail](https://github.com/jordansissel/eventmachine-tail) and [logstash](https://github.com/logstash/logstash). - - - -## What platforms are supported by EventMachine? ## - -EventMachine supports Ruby 1.8.7 through 2.6, REE, JRuby and **works well on Windows** as well -as many operating systems from the Unix family (Linux, Mac OS X, BSD flavors). - - - -## Install the gem ## - -Install it with [RubyGems](https://rubygems.org/) - - gem install eventmachine - -or add this to your Gemfile if you use [Bundler](http://gembundler.com/): - - gem "eventmachine" - - - -## Getting started ## - -For an introduction to EventMachine, check out: - - * [blog post about EventMachine by Ilya Grigorik](http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/). - * [EventMachine Introductions by Dan Sinclair](http://everburning.com/news/eventmachine-introductions.html). - - -### Server example: Echo server ### - -Here's a fully-functional echo server written with EventMachine: - -```ruby - require 'eventmachine' - - module EchoServer - def post_init - puts "-- someone connected to the echo server!" - end - - def receive_data data - send_data ">>>you sent: #{data}" - close_connection if data =~ /quit/i - end - - def unbind - puts "-- someone disconnected from the echo server!" - end -end - -# Note that this will block current thread. -EventMachine.run { - EventMachine.start_server "127.0.0.1", 8081, EchoServer -} -``` - - -## EventMachine documentation ## - -Currently we only have [reference documentation](http://rdoc.info/github/eventmachine/eventmachine/frames) and a [wiki](https://github.com/eventmachine/eventmachine/wiki). - - -## Community and where to get help ## - - * Join the [mailing list](http://groups.google.com/group/eventmachine) (Google Group) - * Join IRC channel #eventmachine on irc.freenode.net - - -## License and copyright ## - -EventMachine is copyrighted free software made available under the terms -of either the GPL or Ruby's License. - -Copyright: (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. - - -## Alternatives ## - -If you are unhappy with EventMachine and want to use Ruby, check out [Celluloid](https://celluloid.io/). diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/DocumentationGuidesIndex.md b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/DocumentationGuidesIndex.md deleted file mode 100644 index b8ce5a2a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/DocumentationGuidesIndex.md +++ /dev/null @@ -1,27 +0,0 @@ -# EventMachine documentation guides # - -Welcome to the documentation guides for [EventMachine](http://github.com/eventmachine/eventmachine), -a fast and simple event-processing library for Ruby programs (à la JBoss Netty, Twisted, Node.js -and so on). - -## Guide list ## - - * {file:docs/GettingStarted.md Getting started with EventMachine} - * {file:docs/EventDrivenServers.md Writing event-driven servers} - * {file:docs/EventDrivenClients.md Writing event-driven clients} - * {file:docs/ConnectionFailureAndRecovery.md Connection Failure and Recovery} - * {file:docs/TLS.md TLS (aka SSL)} - * {file:docs/Ecosystem.md EventMachine ecosystem}: Thin, Goliath, em-http-request, em-websockets, Proxymachine and beyond - * {file:docs/BlockingEventLoop.md On blocking the event loop: why it is harmful for performance and how to avoid it} - * {file:docs/LightweightConcurrency.md Lightweight concurrency with EventMachine} - * {file:docs/Deferrables.md Deferrables} - * {file:docs/ModernKernelInputOutputAPIs.md Brief introduction to epoll, kqueue, select} - * {file:docs/WorkingWithOtherIOSources.md Working with other IO sources such as the keyboard} - - -## Tell us what you think! ## - -Please take a moment and tell us what you think about this guide on the [EventMachine mailing list](http://bit.ly/jW3cR3) -or in the #eventmachine channel on irc.freenode.net: what was unclear? What wasn't covered? -Maybe you don't like the guide style or the grammar and spelling are incorrect? Reader feedback is -key to making documentation better. diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/GettingStarted.md b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/GettingStarted.md deleted file mode 100644 index 63acbb78..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/GettingStarted.md +++ /dev/null @@ -1,521 +0,0 @@ -# @title Getting Started with Ruby EventMachine -# @markup markdown -# @author Michael S. Klishin, Dan Sinclair - -# Getting started with Ruby EventMachine # - - -## About this guide ## - -This guide is a quick tutorial that helps you to get started with EventMachine for writing event-driven -servers, clients and using it as a lightweight concurrency library. -It should take about 20 minutes to read and study the provided code examples. This guide covers - - * Installing EventMachine via [Rubygems](http://rubygems.org) and [Bundler](http://gembundler.com). - * Building an Echo server, the "Hello, world"-like code example of network servers. - * Building a simple chat, both server and client. - * Building a very small asynchronous Websockets client. - - -## Covered versions ## - -This guide covers EventMachine v0.12.10 and 1.0 (including betas). - - -## Level ## - -This guide assumes you are comfortable (but not necessary a guru) with the command line. On Microsoft Windows™, -we recommend you to use [JRuby](http://jruby.org) when running these examples. - - -## Installing EventMachine ## - -### Make sure you have Ruby installed ### - -This guide assumes you have one of the supported Ruby implementations installed: - - * Ruby 1.8.7 - * Ruby 1.9.2 - * [JRuby](http://jruby.org) (we recommend 1.6) - * [Rubinius](http://rubini.us) 1.2 or higher - * [Ruby Enterprise Edition](http://www.rubyenterpriseedition.com) - -EventMachine works on Microsoft Windows™. - - -### With Rubygems ### - -To install the EventMachine gem do - - gem install eventmachine - - -### With Bundler ### - - gem "eventmachine" - - -### Verifying your installation ### - -Lets verify your installation with this quick IRB session: - - irb -rubygems - - ruby-1.9.2-p180 :001 > require "eventmachine" - => true - ruby-1.9.2-p180 :002 > EventMachine::VERSION - => "1.0.0.beta.3" - - -## An Echo Server Example ## - -Lets begin with the classic "Hello, world"-like example, an echo server. The echo server responds clients with the -same data that was provided. First, here's the code: - -{include:file:examples/guides/getting\_started/01\_eventmachine\_echo_server.rb} - - -When run, the server binds to port 10000. We can connect using Telnet and verify it's working: - - telnet localhost 10000 - -On my machine the output looks like: - - ~ telnet localhost 10000 - Trying 127.0.0.1... - Connected to localhost. - Escape character is '^]'. - -Let's send something to our server. Type in "Hello, EventMachine" and hit Enter. The server will respond with -the same string: - - ~ telnet localhost 10000 - Trying 127.0.0.1... - Connected to localhost. - Escape character is '^]'. - Hello, EventMachine - # (here we hit Enter) - Hello, EventMachine - # (this ^^^ is our echo server reply) - -It works! Congratulations, you now can tell your Node.js-loving friends that you "have done some event-driven programming, too". -Oh, and to stop Telnet, hit Control + Shift + ] and then Control + C. - -Lets walk this example line by line and see what's going on. These lines - - require 'rubygems' # or use Bundler.setup - require 'eventmachine' - -probably look familiar: you use [RubyGems](http://rubygems.org) (or [Bundler](http://gembundler.com/)) for dependencies and then require EventMachine gem. Boring. - -Next: - - class EchoServer < EventMachine::Connection - def receive_data(data) - send_data(data) - end - end - -Is the implementation of our echo server. We define a class that inherits from {EventMachine::Connection} -and a handler (aka callback) for one event: when we receive data from a client. - -EventMachine handles the connection setup, receiving data and passing it to our handler, {EventMachine::Connection#receive_data}. - -Then we implement our protocol logic, which in the case of Echo is pretty trivial: we send back whatever we receive. -To do so, we're using {EventMachine::Connection#send_data}. - -Lets modify the example to recognize `exit` command: - -{include:file:examples/guides/getting\_started/02\_eventmachine\_echo_server\_that\_recognizes\_exit\_command.rb} - -Our `receive\_data` changed slightly and now looks like this: - - def receive_data(data) - if data.strip =~ /exit$/i - EventMachine.stop_event_loop - else - send_data(data) - end - end - -Because incoming data has trailing newline character, we strip it off before matching it against a simple regular -expression. If the data ends in `exit`, we stop EventMachine event loop with {EventMachine.stop_event_loop}. This unblocks -main thread and it finishes execution, and our little program exits as the result. - -To summarize this first example: - - * Subclass {EventMachine::Connection} and override {EventMachine::Connection#send_data} to handle incoming data. - * Use {EventMachine.run} to start EventMachine event loop and then bind echo server with {EventMachine.start_server}. - * To stop the event loop, use {EventMachine.stop_event_loop} (aliased as {EventMachine.stop}) - -Lets move on to a slightly more sophisticated example that will introduce several more features and methods -EventMachine has to offer. - - -## A Simple Chat Server Example ## - -Next we will write a simple chat. Initially clients will still use telnet to connect, but then we will add little -client application that will serve as a proxy between telnet and the chat server. This example is certainly longer -(~ 150 lines with whitespace and comments) so instead of looking at the final version and going through it line by line, -we will instead begin with a very simple version that only keeps track of connected clients and then add features -as we go. - -To set some expectations about our example: - - * It will keep track of connected clients - * It will support a couple of commands, à la IRC - * It will support direct messages using Twitter-like @usernames - * It won't use MongoDB, fibers or distributed map/reduce for anything but will be totally [Web Scale™](http://bit.ly/webscaletm) nonetheless. Maybe even [ROFLscale](http://bit.ly/roflscalevideo). - -### Step one: detecting connections and disconnectons ### - -First step looks like this: - -{include:file:examples/guides/getting\_started/04\_simple\_chat\_server\_step\_one.rb} - -We see familiar {EventMachine.run} and {EventMachine.start_server}, but also {EventMachine::Connection#post_init} and {EventMachine::Connection#unbind} we haven't -met yet. We don't use them in this code, so when are they run? Like {EventMachine::Connection#receive_data}, these methods are callbacks. EventMachine calls them -when certain events happen: - - * {EventMachine#post_init} is called by the event loop immediately after the network connection has been established. - In the chat server example case, this is when a new client connects. - * {EventMachine#unbind} is called when client disconnects, connection is closed or is lost (because of a network issue, for example). - -All our chat server does so far is logging connections or disconnections. What we want it to do next is to keep track of connected clients. - - -### Step two: keep track of connected clients ### - -Next iteration of the code looks like this: - -{include:file:examples/guides/getting\_started/05\_simple\_chat\_server\_step\_two.rb} - -While the code we added is very straightforward, we have to clarify one this first: subclasses of {EventMachine::Connection} are instantiated by -EventMachine for every new connected peer. So for 10 connected chat clients, there will be 10 separate `SimpleChatServer` instances in our -server process. Like any other objects, they can be stored in a collection, can provide public API other objects use, can instantiate or inject -dependencies and in general live a happy life all Ruby objects live until garbage collection happens. - -In the example above we use a @@class_variable to keep track of connected clients. In Ruby, @@class variables are accessible from instance -methods so we can add new connections to the list from `SimpleChatServer#post_init` and remove them in `SimpleChatServer#unbind`. We can also -filter connections by some criteria, as `SimpleChatServer#other_peers demonstrates`. - -So, we keep track of connections but how do we identify them? For a chat app, it's pretty common to use usernames for that. Lets ask our clients -to enter usernames when they connect. - - -### Step three: adding usernames ## - -To add usernames, we need to add a few things: - - * We need to invite newly connected clients to enter their username. - * A reader (getter) method on our {EventMachine::Connection} subclass. - * An idea of connection state (keeping track of whether a particular participant had entered username before). - -Here is one way to do it: - -{include:file:examples/guides/getting\_started/06\_simple\_chat\_server\_step\_three.rb} - -This is quite an update so lets take a look at each method individually. First, `SimpleChatServer#post_init`: - - def post_init - @username = nil - puts "A client has connected..." - ask_username - end - -To keep track of username we ask chat participants for, we add @username instance variable to our connection class. Connection -instances are just Ruby objects associated with a particular connected peer, so using @ivars is very natural. To make username -value accessible to other objects, we added a reader method that was not shown on the snippet above. - -Lets dig into `SimpleChatServer#ask_username`: - - def ask_username - self.send_line("[info] Enter your username:") - end # ask_username - - # ... - - def send_line(line) - self.send_data("#{line}\n") - end # send_line(line) - -Nothing new here, we are using {EventMachine::Connection#send_data} which we have seen before. - - -In `SimpleChatServer#receive_data` we now have to check if the username was entered or we need -to ask for it: - - def receive_data(data) - if entered_username? - handle_chat_message(data.strip) - else - handle_username(data.strip) - end - end - - # ... - - def entered_username? - !@username.nil? && !@username.empty? - end # entered_username? - -Finally, handler of chat messages is not yet implemented: - - def handle_chat_message(msg) - raise NotImplementedError - end - -Lets try this example out using Telnet: - - ~ telnet localhost 10000 - Trying 127.0.0.1... - Connected to localhost. - Escape character is '^]'. - [info] Enter your username: - antares_ - [info] Ohai, antares_ - -and the server output: - - A client has connected... - antares_ has joined - -This version requires you to remember how to terminate your Telnet session (Ctrl + Shift + ], then Ctrl + C). -It is annoying, so why don't we add the same `exit` command to our chat server? - - -### Step four: adding exit command and delivering chat messages #### - -{include:file:examples/guides/getting\_started/07\_simple\_chat\_server\_step\_four.rb} - -TBD - -Lets test-drive this version. Client A: - - ~ telnet localhost 10000 - Trying 127.0.0.1... - Connected to localhost. - Escape character is '^]'. - [info] Enter your username: - michael - [info] Ohai, michael - Hi everyone - michael: Hi everyone - joe has joined the room - # here ^^^ client B connects, lets greet him - hi joe - michael: hi joe - joe: hey michael - # ^^^ client B replies - exit - # ^^^ out command in action - Connection closed by foreign host. - -Client B: - - ~ telnet localhost 10000 - Trying 127.0.0.1... - Connected to localhost. - Escape character is '^]'. - [info] Enter your username: - joe - [info] Ohai, joe - michael: hi joe - # ^^^ client A greets us, lets reply - hey michael - joe: hey michael - exit - # ^^^ out command in action - Connection closed by foreign host. - -And finally, the server output: - - A client has connected... - michael has joined - A client has connected... - _antares has joined - [info] _antares has left - [info] michael has left - -Our little char server now supports usernames, sending messages and the `exit` command. Next up, private (aka direct) messages. - - -### Step five: adding direct messages and one more command ### - -To add direct messages, we come up with a simple convention: private messages begin with @username and may have optional colon before -message text, like this: - - @joe: hey, how do you like eventmachine? - -This convention makes parsing of messages simple so that we can concentrate on delivering them to a particular client connection. -Remember when we added `username` reader on our connection class? That tiny change makes this step possible: when a new direct -message comes in, we extract username and message text and then find then connection for @username in question: - - # - # Message handling - # - - def handle_chat_message(msg) - if command?(msg) - self.handle_command(msg) - else - if direct_message?(msg) - self.handle_direct_message(msg) - else - self.announce(msg, "#{@username}:") - end - end - end # handle_chat_message(msg) - - def direct_message?(input) - input =~ DM_REGEXP - end # direct_message?(input) - - def handle_direct_message(input) - username, message = parse_direct_message(input) - - if connection = @@connected_clients.find { |c| c.username == username } - puts "[dm] @#{@username} => @#{username}" - connection.send_line("[dm] @#{@username}: #{message}") - else - send_line "@#{username} is not in the room. Here's who is: #{usernames.join(', ')}" - end - end # handle_direct_message(input) - - def parse_direct_message(input) - return [$1, $2] if input =~ DM_REGEXP - end # parse_direct_message(input) - -This snippet demonstrates how one connection instance can obtain another connection instance and send data to it. -This is a very powerful feature, consider just a few use cases: - - * Peer-to-peer protocols - * Content-aware routing - * Efficient streaming with optional filtering - -Less common use cases include extending C++ core of EventMachine to provide access to hardware that streams events that -can be re-broadcasted to any interested parties connected via TCP, UDP or something like AMQP or WebSockets. With this, -sky is the limit. Actually, EventMachine has several features for efficient proxying data between connections. -We will not cover them in this guide. - -One last feature that we are going to add to our chat server is the `status` command that tells you current server time and how many people -are there in the chat room: - - # - # Commands handling - # - - def command?(input) - input =~ /(exit|status)$/i - end # command?(input) - - def handle_command(cmd) - case cmd - when /exit$/i then self.close_connection - when /status$/i then self.send_line("[chat server] It's #{Time.now.strftime('%H:%M')} and there are #{self.number_of_connected_clients} people in the room") - end - end # handle_command(cmd) - -Hopefully this piece of code is easy to follow. Try adding a few more commands, for example, the `whoishere` command that lists people -currently in the chat room. - -In the end, our chat server looks like this: - -{include:file:examples/guides/getting\_started/08\_simple\_chat\_server\_step\_five.rb} - -We are almost done with the server but there are some closing thoughts. - - -### Step six: final version ### - -Just in case, here is the final version of the chat server code we have built: - -{include:file:examples/guides/getting\_started/03\_simple\_chat\_server.rb} - - -### Step seven: future directions and some closing thoughts ### - -The chat server is just about 150 lines of Ruby including empty lines and comments, yet it has a few features most of chat server -examples never add. We did not, however, implement many other features that popular IRC clients like [Colloquy](http://colloquy.info) have: - - * Chat moderation - * Multiple rooms - * Connection timeout detection - -How would one go about implementing them? We thought it is worth discussing what else EventMachine has to offer and what ecosystem projects -one can use to build a really feature-rich Web-based IRC chat client. - -With multiple rooms it's more or less straightforward, just add one more hash and a bunch of commands and use the information about which rooms participant -is in when you are delivering messages. There is nothing in EventMachine itself that can make the job much easier for developer. - -To implement chat moderation feature you may want to do a few things: - - * Work with client IP addresses. Maybe we want to consider everyone who connects from certain IPs a moderator. - * Access persistent data about usernames of moderators and their credentials. - -Does EventMachine have anything to offer here? It does. To obtain peer IP address, take a look at {EventMachine::Connection#get_peername}. The name of this method is -a little bit misleading and originates from low-level socket programming APIs. - -#### A whirlwind tour of the EventMachine ecosystem #### - -To work with data stores you can use several database drivers that ship with EventMachine itself, however, quite often there are some 3rd party projects in -the EventMachine ecosystem that have more features, are faster or just better maintained. So we figured it will be helpful to provide a few pointers -to some of those projects: - - * For MySQL, check out [em-mysql](https://github.com/eventmachine/em-mysql) project. - * For PostgreSQL, have a look at Mike Perham's [EventMachine-based PostgreSQL driver](https://github.com/mperham/em_postgresql). - * For Redis, there is a young but already popular [em-hiredis](https://github.com/mloughran/em-hiredis) library that combines EventMachine's non-blocking I/O with - extreme performance of the official Redis C client, [hiredis](https://github.com/antirez/hiredis). - * For MongoDB, see [em-mongo](https://github.com/bcg/em-mongo) - * For Cassandra, Mike Perham [added transport agnosticism feature](http://www.mikeperham.com/2010/02/09/cassandra-and-eventmachine/) to the [cassandra gem](https://rubygems.org/gems/cassandra). - -[Riak](http://www.basho.com/products_riak_overview.php) and CouchDB talk HTTP so it's possible to use [em-http-request](https://github.com/igrigorik/em-http-request). -If you are aware of EventMachine-based non-blocking drivers for these databases, as well as for HBase, let us know on the [EventMachine mailing list](http://groups.google.com/group/eventmachine). -Also, EventMachine supports TLS (aka SSL) and works well on [JRuby](http://jruby.org) and Windows. - -Learn more in our {file:docs/Ecosystem.md EventMachine ecosystem} and {file:docs/TLS.md TLS (aka SSL)} guides. - - -#### Connection loss detection #### - -Finally, connection loss detection. When our chat participant closes her laptop lid, how do we know that she is no longer active? The answer is, when EventMachine -detects TCP connectin closure, it calls {EventMachine::Connection#unbind}. Version 1.0.beta3 and later also pass an optional argument to that method. The argument -indicates what error (if any) caused the connection to be closed. - -Learn more in our {file:docs/ConnectionFailureAndRecovery.md Connection Failure and Recovery} guide. - - -#### What the Chat Server Example doesn't demonstrate #### - -This chat server also leaves out something production quality clients and servers must take care of: buffering. We intentionally did not include any buffering in -our chat server example: it would only distract you from learning what you really came here to learn: how to use EventMachine to build blazing fast asynchronous -networking programs quickly. However, {EventMachine::Connection#receive_data} does not offer any guarantees that you will be receiving "whole messages" all the time, -largely because the underlying transport (UDP or TCP) does not offer such guarantees. Many protocols, for example, AMQP, mandate that large content chunks are -split into smaller _frames_ of certain size. This means that [amq-client](https://github.com/ruby-amqp/amq-client) library, for instance, that has EventMachine-based driver, -has to deal with figuring out when exactly we received "the whole message". To do so, it uses buffering and employs various checks to detect _frame boundaries_. -So **don't be deceived by the simplicity of this chat example**: it intentionally leaves framing out, but real world protocols usually require it. - - - -## A (Proxying) Chat Client Example ## - -TBD - - -## Wrapping up ## - -This tutorial ends here. Congratulations! You have learned quite a bit about EventMachine. - - -## What to read next ## - -The documentation is organized as a {file:docs/DocumentationGuidesIndex.md number of guides}, covering all kinds of -topics. TBD - - -## Tell us what you think! ## - -Please take a moment and tell us what you think about this guide on the [EventMachine mailing list](http://bit.ly/jW3cR3) -or in the #eventmachine channel on irc.freenode.net: what was unclear? What wasn't covered? -Maybe you don't like the guide style or the grammar and spelling are incorrect? Reader feedback is -key to making documentation better. diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/ChangeLog b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/ChangeLog deleted file mode 100644 index c7a6c48e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/ChangeLog +++ /dev/null @@ -1,211 +0,0 @@ -01Oct06: Replaced EventMachine#open_datagram_server with a version that can - take a Class or a Module, instead of just a Module. Thanks to Tobias - Gustafsson for pointing out the missing case. -04Oct06: Supported subsecond timer resolutions, per request by Jason Roelofs. -05Oct06: Added EventMachine#set_quantum, which sets the timer resolution. -15Nov06: Added Connection#set_comm_inactivity_timeout. -15Nov06: Checked in a Line-and-Text Protocol Handler. -18Nov06: Checked in a Header-and-Body Protocol Handler. -22Nov06: Changed EventMachine#reconnect: no longer excepts when called on an - already-connected handler. -28Nov06: Supported a binary-unix gem. -19Dec06: Added EventMachine#set_effective_user. -05Jan07: Upped max outstanding timers to 1000. -15May07: Applied Solaris patches from Brett Eisenberg -22May07: Cleaned up the license text in all the source files. -22May07: Released version 0.7.2 - -23May07: Per suggestion from Bill Kelly, fixed a bug with the initialization - of the network libraries under Windows. The goal is to enable EM to - be used without Ruby. -28May07: Applied patch from Bill Kelly, refactors the declarations of - event names to make EM easier to use from C programs without Ruby. -31May07: Added a preliminary implementation of EventMachine#popen. -01Jun07: Added EM, a "pseudo-alias" for EventMachine. -01Jun07: Added EM#next_tick. -01Jun07: Added EM::Connection#get_outbound_data_size -05Jun07: Removed the code which loads a pure-Ruby EM library in case the - compiled extension is unavailable. Suggested by Moshe Litvin. -06Jun07: Preliminary epoll implementation. -12Jun07: Added an evented popen implementation that, like Ruby's, is - full-duplex and makes the subprocess PID available to the caller. -06Jul07: Performance-tweaked the callback dispatcher in eventmachine.rb. -10Jul07: Released version 0.8.0. -12Jul07: Applied patches from Tim Pease to fix Solaris build problems. -15Jul07: Created a new provisional source branch, experiments/jruby-1. - This is a preliminary implementation of the EM reactor in Java, - suitable for use with JRuby. -17Jul07: Added EventMachine#stop_server, per request from Kirk Haines, - and associated unit tests. -22Jul07: Added EventMachine#stream_file_data. This is a very fast and scalable - way of sending data from static files over network connections. It - has separate implementations for small files and large file, and - has tunings to minimize memory consumption. -26Jul07: Added some patches by Kirk Haines to improve the behavior of - EM::Connection#send_file_data_to_connection. -26Jul07: Added a C++ module for directly integrating EM into C++ programs - with no Ruby dependencies. Needs example code. -29Jul07: Added EventMachine::Protocols::LineText2. -29Jul07: Added EventMachine::Protocols::Stomp. -30Jul07: Added sys/stat.h to project.h to fix compilation bug on Darwin. -13Aug07: Added EventMachine#reactor_running? -15Aug07: Added parameters for EventMachine::Connection:start_tls that can be - used to specify client-side private keys and certificates. -17Aug07: Added EventMachine#run_block, a sugaring for a common use case. -24Aug07: Added a preliminary keyboard handler. Needs docs and testing on - windows. -26Aug07: Created EventMachine::Spawnable, an implementation of Erlang-like - processes. -27Aug07: Silenced some -w warnings, requested by James Edward Gray II. -30Aug07: Added cookies to EM::HttpClient#request. -04Sep07: Added an initial implementation of an evented SMTP client. -04Sep07: Added an initial implementation of an evented SMTP server. -10Sep07: Changed EM#spawn to run spawned blocks in the context of the - SpawnedProcess object, not of whatever was the active object at the - time of the spawn. -14Sep07: Heartbeats weren't working with EPOLL. Noticed by Brian Candler. -15Sep07: Added some features, tests and documents to Deferrable. -16Sep07: Added [:content] parameter to EM::Protocols::SmtpClient#send. -16Sep07: Bumped version to 0.9.0 in anticipation of a release. -18Sep07: Released version 0.9.0. -19Sep07: Added #receive_reset to EM::Protocols::SmtpServer. -19Sep07: User overrides of EM::Protocols::SmtpServer#receive_recipient can now - return a Deferrable. Also fixed bug: SmtpClient now raises a protocol - error if none of its RCPT TO: commands are accepted by the server. -26Sep07: Fixed missing keyboard support for Windows. -03Oct07: Added a default handler for RuntimeErrors emitted from user-written - code. Suggested by Brian Candler. -19Oct07: Set the SO_BROADCAST option automatically on all UDP sockets. -10Nov07: Forced integer conversion of send_datagram's port parameter. -Suggested by Matthieu Riou. -12Nov07: Added saslauth.rb, a protocol module to replace the Cyrus SASL -daemons saslauthd and pwcheck. -15Nov07: Fixed bug reported by Mark Zvillius. We were failing to dispatch - zero-length datagrams under certain conditions. -19Nov07: Added EventMachine#set_max_timers. Requested by Matthieu Riou and - others. -19Nov07: Fixed bug with EM::Connection#start_tls. Was not working with server - connections. Reported by Michael S. Fischer. -26Nov07: Supported a hack for EventMachine#popen so it can return an exit - status from subprocesses. Requested by Michael S. Fischer. -30Nov07: Changed Pipe descriptors so that the child-side of the socketpair is - NOT set nonblocking. Suggested by Duane Johnson. -05Dec07: Re-enabled the pure-Ruby implementation. -06Dec07: Released Version 0.10.0. -13Dec07: Added EM::DeferrableChildProcess -24Dec07: Added a SASL client for simple password authentication. -27Dec07: Removed the hookable error handler. No one was using it and it significantly - degraded performance. -30Dec07: Implemented Kqueue support for OSX and BSD. -04Jan08: Fixed bug in epoll ("Bad file descriptor"), patch supplied by Chris - Heath. -04Jan08: Fixed bug reported by Michael S. Fischer. We were terminating - SSL connections that sent data before the handshake was complete. -08Jan08: Added an OpenBSD branch for extconf.rb, contributed by Guillaume - Sellier. -19Jan08: Added EM::Connection::get_sockname per request by Michael Fischer. -19Jan08: Supported IPv6 addresses. -30Apr08: Set the NODELAY option on sockets that we connect to other servers. - Omission noted by Roger Pack. -14May08: Generated a 0.12 release. -15May08: Supported EM#get_sockname for acceptors (TCP server sockets). - Requested by Roger Pack. -15May08; Accepted a patch from Dan Aquino that allows the interval of a - PeriodicTimer to be changed on the fly. -15Jun08: Supported nested calls to EM#run. Many people contributed ideas to - this, notably raggi and tmm1. -20Jul08: Accepted patch from tmm1 for EM#fork_reactor. -28Jul08: Added a Postgres3 implementation, written by FCianfrocca. -14Aug08: Added a patch by Mike Murphy to support basic auth in the http -client. -28Aug08: Added a patch by tmm1 to fix a longstanding problem with Java -data-sends. -13Sep08: Added LineText2#set_binary_mode, a back-compatibility alias. -13Sep08: Modified the load order of protocol libraries in eventmachine.rb - to permit a modification of HeaderAndContentProtocol. -13Sep08: Modified HeaderAndContent to use LineText2, which is less buggy - than LineAndTextProtocol. This change may be reversed if we can fix - the bugs in buftok. -13Sep08: Improved the password handling in the Postgres protocol handler. -15Sep08: Added attach/detach, contributed by Aman Gupta (tmm1) and Riham Aldakkak, - to support working with file descriptors not created in the reactor. -16Sep08: Added an optional version string to the HTTP client. This is a hack - that allows a client to specify a version 1.0 request, which - keeps the server from sending a chunked response. The right way to - solve this, of course, is to support chunked responses. -23Sep08: ChangeLog Summary for Merge of branches/raggi -Most notable work and patches by Aman Gupta, Roger Pack, and James Tucker. -Patches / Tickets also submitted by: Jeremy Evans, aanand, darix, mmmurf, -danielaquino, macournoyer. - - Moved docs into docs/ dir - - Major refactor of rakefile, added generic rakefile helpers in tasks - - Added example CPP build rakefile in tasks/cpp.rake - - Moved rake tests out to tasks/tests.rake - - Added svn ignores where appropriate - - Fixed jruby build on older java platforms - - Gem now builds from Rakefile rather than directly via extconf - - Gem unified for jruby, C++ and pure ruby. - - Correction for pure C++ build, removing ruby dependency - - Fix for CYGWIN builds on ipv6 - - Major refactor for extconf.rb - - Working mingw builds - - extconf optionally uses pkg_config over manual configuration - - extconf builds for 1.9 on any system that has 1.9 - - extconf no longer links pthread explicitly - - looks for kqueue on all *nix systems - - better error output on std::runtime_error, now says where it came from - - Fixed some tests on jruby - - Added test for general send_data flaw, required for a bugfix in jruby build - - Added timeout to epoll tests - - Added fixes for java reactor ruby api - - Small addition of some docs in httpclient.rb and httpcli2.rb - - Some refactor and fixes in smtpserver.rb - - Added parenthesis where possible to avoid excess ruby warnings - - Refactor of $eventmachine_library logic for accuracy and maintenance, jruby - - EM::start_server now supports unix sockets - - EM::connect now supports unix sockets - - EM::defer @threadqueue now handled more gracefully - - Added better messages on exceptions raised - - Fix edge case in timer fires - - Explicitly require buftok.rb - - Add protocols to autoload, rather than require them all immediately - - Fix a bug in pr_eventmachine for outbound_q - - Refactors to take some of the use of defer out of tests. - - Fixes in EM.defer under start/stop conditions. Reduced scope of threads. -23Sep08: Added patch from tmm1 to avoid popen errors on exit. -30Sep08: Added File.exists? checks in the args for start_tls, as suggested by - Brian Lopez (brianmario). -10Nov08: ruby 1.9 compatibility enhancements -28Nov08: Allow for older ruby builds where RARRAY_LEN is not defined -03Dec08: allow passing arguments to popen handlers -13Jan09: SSL support for httpclient2 (David Smalley) -22Jan09: Fixed errors on OSX with the kqueue reactor, fixed errors in the pure - ruby reactor. Added EM.current_time. Added EM.epoll? and EM.kqueue? -27Jan09: Reactor errors are now raised as ruby RuntimeErrors. -28Jan09: Documentation patch from alloy -29Jan09: (Late sign-off) Use a longer timeout for connect_server (Ilya - Grigorik) -07Feb09: Fix signal handling issues with threads+epoll -07Feb09: Use rb_thread_schedule in the epoll reactor -07Feb09: Use TRAP_BEG/END and rb_thread_schedule in kqueue reactor -08Feb09: Added fastfilereader from swiftiply -08Feb09: 1.9 fix for rb_trap_immediate -08Feb09: Enable rb_thread_blocking_region for 1.9.0 and 1.9.1 -10Feb09: Support win32 builds for fastfilereader -10Feb09: Added a new event to indicate completion of SSL handshake on TCP - connections -10Feb09: Working get_peer_cert method. Returns the certificate as a Ruby - String in PEM format. (Jake Douglas) -10Feb09: Added EM.get_max_timers -11Feb09: Fix compile options for sun compiler (Alasdairrr) -11Feb09: get_status returns a Process::Status object -12Feb09: Add EM::Protocols::Memcache with simple get/set functionality -19Feb09: Add catch-all EM.error_handler -20Feb09: Support miniunit (1.9) -20Feb09: Return success on content-length = 0 instead of start waiting forever - (Ugo Riboni) -25Feb09: Allow next_tick to be used to pre-schedule reactor operations before - EM.run -26Feb09: Added EM.get_connection_count -01Mar09: Switch back to extconf for compiling gem extensions -01Mar09: fixed a small bug with basic auth (mmmurf) diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/DEFERRABLES b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/DEFERRABLES deleted file mode 100644 index 6e8856cc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/DEFERRABLES +++ /dev/null @@ -1,246 +0,0 @@ -EventMachine (EM) adds two different formalisms for lightweight concurrency -to the Ruby programmer's toolbox: spawned processes and deferrables. This -note will show you how to use deferrables. For more information, see the -separate document LIGHTWEIGHT_CONCURRENCY. - -=== What are Deferrables? - -EventMachine's Deferrable borrows heavily from the "deferred" object in -Python's "Twisted" event-handling framework. Here's a minimal example that -illustrates Deferrable: - - require 'eventmachine' - - class MyClass - include EM::Deferrable - - def print_value x - puts "MyClass instance received #{x}" - end - end - - EM.run { - df = MyClass.new - df.callback {|x| - df.print_value(x) - EM.stop - } - - EM::Timer.new(2) { - df.set_deferred_status :succeeded, 100 - } - } - - -This program will spin for two seconds, print out the string "MyClass -instance received 100" and then exit. The Deferrable pattern relies on -an unusual metaphor that may be unfamiliar to you, unless you've used -Python's Twisted. You may need to read the following material through -more than once before you get the idea. - -EventMachine::Deferrable is simply a Ruby Module that you can include -in your own classes. (There also is a class named -EventMachine::DefaultDeferrable for when you want to create one without -including it in code of your own.) - -An object that includes EventMachine::Deferrable is like any other Ruby -object: it can be created whenever you want, returned from your functions, -or passed as an argument to other functions. - -The Deferrable pattern allows you to specify any number of Ruby code -blocks (callbacks or errbacks) that will be executed at some future time -when the status of the Deferrable object changes. - -How might that be useful? Well, imagine that you're implementing an HTTP -server, but you need to make a call to some other server in order to fulfill -a client request. - -When you receive a request from one of your clients, you can create and -return a Deferrable object. Some other section of your program can add a -callback to the Deferrable that will cause the client's request to be -fulfilled. Simultaneously, you initiate an event-driven or threaded client -request to some different server. And then your EM program will continue to -process other events and service other client requests. - -When your client request to the other server completes some time later, you -will call the #set_deferred_status method on the Deferrable object, passing -either a success or failure status, and an arbitrary number of parameters -(which might include the data you received from the other server). - -At that point, the status of the Deferrable object becomes known, and its -callback or errback methods are immediately executed. Callbacks and errbacks -are code blocks that are attached to Deferrable objects at any time through -the methods #callback and #errback. - -The deep beauty of this pattern is that it decouples the disposition of one -operation (such as a client request to an outboard server) from the -subsequent operations that depend on that disposition (which may include -responding to a different client or any other operation). - -The code which invokes the deferred operation (that will eventually result -in a success or failure status together with associated data) is completely -separate from the code which depends on that status and data. This achieves -one of the primary goals for which threading is typically used in -sophisticated applications, with none of the nondeterminacy or debugging -difficulties of threads. - -As soon as the deferred status of a Deferrable becomes known by way of a call -to #set_deferred_status, the Deferrable will IMMEDIATELY execute all of its -callbacks or errbacks in the order in which they were added to the Deferrable. - -Callbacks and errbacks can be added to a Deferrable object at any time, not -just when the object is created. They can even be added after the status of -the object has been determined! (In this case, they will be executed -immediately when they are added.) - -A call to Deferrable#set_deferred_status takes :succeeded or :failed as its -first argument. (This determines whether the object will call its callbacks -or its errbacks.) #set_deferred_status also takes zero or more additional -parameters, that will in turn be passed as parameters to the callbacks or -errbacks. - -In general, you can only call #set_deferred_status ONCE on a Deferrable -object. A call to #set_deferred_status will not return until all of the -associated callbacks or errbacks have been called. If you add callbacks or -errbacks AFTER making a call to #set_deferred_status, those additional -callbacks or errbacks will execute IMMEDIATELY. Any given callback or -errback will be executed AT MOST once. - -It's possible to call #set_deferred_status AGAIN, during the execution a -callback or errback. This makes it possible to change the parameters which -will be sent to the callbacks or errbacks farther down the chain, enabling -some extremely elegant use-cases. You can transform the data returned from -a deferred operation in arbitrary ways as needed by subsequent users, without -changing any of the code that generated the original data. - -A call to #set_deferred_status will not return until all of the associated -callbacks or errbacks have been called. If you add callbacks or errbacks -AFTER making a call to #set_deferred_status, those additional callbacks or -errbacks will execute IMMEDIATELY. - -Let's look at some more sample code. It turns out that many of the internal -protocol implementations in the EventMachine package rely on Deferrable. One -of these is EM::Protocols::HttpClient. - -To make an evented HTTP request, use the module function -EM::Protocols::HttpClient#request, which returns a Deferrable object. -Here's how: - - require 'eventmachine' - - EM.run { - df = EM::Protocols::HttpClient.request( :host=>"www.example.com", - :request=>"/index.html" ) - - df.callback {|response| - puts "Succeeded: #{response[:content]}" - EM.stop - } - - df.errback {|response| - puts "ERROR: #{response[:status]}" - EM.stop - } - } - -(See the documentation of EventMachine::Protocols::HttpClient for information -on the object returned by #request.) - -In this code, we make a call to HttpClient#request, which immediately returns -a Deferrable object. In the background, an HTTP client request is being made -to www.example.com, although your code will continue to run concurrently. - -At some future point, the HTTP client request will complete, and the code in -EM::Protocols::HttpClient will process either a valid HTTP response (including -returned content), or an error. - -At that point, EM::Protocols::HttpClient will call -EM::Deferrable#set_deferred_status on the Deferrable object that was returned -to your program, as the return value from EM::Protocols::HttpClient.request. -You don't have to do anything to make this happen. All you have to do is tell -the Deferrable what to do in case of either success, failure, or both. - -In our code sample, we set one callback and one errback. The former will be -called if the HTTP call succeeds, and the latter if it fails. (For -simplicity, we have both of them calling EM#stop to end the program, although -real programs would be very unlikely to do this.) - -Setting callbacks and errbacks is optional. They are handlers to defined -events in the lifecycle of the Deferrable event. It's not an error if you -fail to set either a callback, an errback, or both. But of course your -program will then fail to receive those notifications. - -If through some bug it turns out that #set_deferred_status is never called -on a Deferrable object, then that object's callbacks or errbacks will NEVER -be called. It's also possible to set a timeout on a Deferrable. If the -timeout elapses before any other call to #set_deferred_status, the Deferrable -object will behave as is you had called set_deferred_status(:failed) on it. - - -Now let's modify the example to illustrate some additional points: - - require 'eventmachine' - - EM.run { - df = EM::Protocols::HttpClient.request( :host=>"www.example.com", - :request=>"/index.html" ) - - df.callback {|response| - df.set_deferred_status :succeeded, response[:content] - } - - df.callback {|string| - puts "Succeeded: #{string}" - EM.stop - } - - df.errback {|response| - puts "ERROR: #{response[:status]}" - EM.stop - } - } - - -Just for the sake of illustration, we've now set two callbacks instead of -one. If the deferrable operation (the HTTP client-request) succeeds, then -both of the callbacks will be executed in order. - -But notice that we've also made our own call to #set_deferred_status in the -first callback. This isn't required, because the HttpClient implementation -already made a call to #set_deferred_status. (Otherwise, of course, the -callback would not be executing.) - -But we used #set_deferred_status in the first callback in order to change the -parameters that will be sent to subsequent callbacks in the chain. In this -way, you can construct powerful sequences of layered functionality. If you -want, you can even change the status of the Deferrable from :succeeded to -:failed, which would abort the chain of callback calls, and invoke the chain -of errbacks instead. - -Now of course it's somewhat trivial to define two callbacks in the same -method, even with the parameter-changing effect we just described. It would -be much more interesting to pass the Deferrable to some other function (for -example, a function defined in another module or a different gem), that would -in turn add callbacks and/or errbacks of its own. That would illustrate the -true power of the Deferrable pattern: to isolate the HTTP client-request -from other functions that use the data that it returns without caring where -those data came from. - -Remember that you can add a callback or an errback to a Deferrable at any -point in time, regardless of whether the status of the deferred operation is -known (more precisely, regardless of when #set_deferred_status is called on -the object). Even hours or days later. - -When you add a callback or errback to a Deferrable object on which -#set_deferred_status has not yet been called, the callback/errback is queued -up for future execution, inside the Deferrable object. When you add a -callback or errback to a Deferrable on which #set_deferred_status has -already been called, the callback/errback will be executed immediately. -Your code doesn't have to worry about the ordering, and there are no timing -issues, as there would be with a threaded approach. - -For more information on Deferrables and their typical usage patterns, look -in the EM unit tests. There are also quite a few sugarings (including -EM::Deferrable#future) that make typical Deferrable usages syntactically -easier to work with. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/EPOLL b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/EPOLL deleted file mode 100644 index 13cea8f4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/EPOLL +++ /dev/null @@ -1,141 +0,0 @@ -EventMachine now supports epoll, bringing large increases in performance and scalability to Ruby programs. - -Epoll(7) is a alternative mechanism for multiplexed I/O that is available in Linux 2.6 kernels. -It features significantly greater performance than the standard select(2) mechanism, when used in -applications that require very large numbers of open I/O descriptors. - -EventMachine has always used select(2) because its behavior is well standardized and broadly supported. -But select becomes unreasonably slow when a program has a -very large number of file descriptors or sockets. Ruby's version of select hardcodes a limit -of 1024 descriptors per process, but heavily loaded processes will start to show performance -degradation even after only a few hundred descriptors are in use. - -Epoll is an extended version of the poll(2) call, and it solves the problems with select. Programs -based on epoll can easily scale past Ruby's 1024-descriptor limit, potentially to tens of thousands -of connectors, with no significant impact on performance. - -(Another alternative which is very similar to epoll in principle is kqueue, supplied on BSD and its -variants.) - - - -This note shows you how to use epoll in your programs. - -=== Compiling EventMachine to use epoll. - -You don't have to do anything to get epoll support in EventMachine. -When you compile EventMachine on a platform that supports epoll, EM will -automatically generate a Makefile that includes epoll. (At this writing, this will only work -on Linux 2.6 kernels.) If you compile EM on a platform without epoll, then epoll support will -be omitted from the Makefile, and EM will work just as it always has. - -=== Using epoll in your programs. - -First, you need to tell EventMachine to use epoll instead of select (but see below, as this requirement -will be removed in a future EventMachine version). Second, you need to prepare your program to use -more than 1024 descriptors, an operation that generally requires superuser privileges. Third, you will probably -want your process to drop the superuser privileges after you increase your process's descriptor limit. - -=== Using EventMachine#epoll - -Call the method EventMachine#epoll anytime before you call EventMachine#run, and your program will -automatically use epoll, if available. It's safe to call EventMachine#epoll on any platform because -it compiles to a no-op on platforms that don't support epoll. - - require 'rubygems' - require 'eventmachine' - - EM.epoll - EM.run { - ... - } - - -EventMachine#epoll was included in this initial release only to avoid changing the behavior of existing -programs. However, it's expected that a future release of EM will convert EventMachine#epoll to a no-op, -and run epoll by default on platforms that support it. - -=== Using EventMachine#set_descriptor_table_size - -In Linux (as in every Unix-like platform), every process has a internal table that determines the maximum -number of file and socket descriptors you may have open at any given time. The size of this table is -generally fixed at 1024, although it may be increased within certain system-defined hard and soft limits. - -If you want your EventMachine program to support more than 1024 total descriptors, you must use -EventMachine#set_descriptor_table_size, as follows: - - require 'rubygems' - require 'eventmachine' - - new_size = EM.set_descriptor_table_size( 60000 ) - $>.puts "New descriptor-table size is #{new_size}" - - EM.run { - ... - } - -If successful, this example will increase the maximum number of descriptors that epoll can use to 60,000. -Call EventMachine#set_descriptor_table_size without an argument at any time to find out the current -size of the descriptor table. - -Using EventMachine#set_descriptor_table_size ONLY affects the number of descriptors that can be used -by epoll. It has no useful effect on platforms that don't support epoll, and it does NOT increase the -number of descriptors that Ruby's own I/O functions can use. - -#set_descriptor_table_size can fail if your process is not running as superuser, or if you try to set a -table size that exceeds the hard limits imposed by your system. In the latter case, try a smaller number. - - -=== Using EventMachine#set_effective_user - -In general, you must run your program with elevated or superuser privileges if you want to increase -your descriptor-table size beyond 1024 descriptors. This is easy enough to verify. Try running the -sample program given above, that increases the descriptor limit to 60,000. You will probably find that -the table size will not be increased if you don't run your program as root or with elevated privileges. - -But of course network servers, especially long-running ones, should not run with elevated privileges. -You will want to drop superuser privileges as soon as possible after initialization. To do this, -use EventMachine#set_effective_user: - - require 'rubygems' - require 'eventmachine' - - # (Here, program is running as superuser) - - EM.set_descriptor_table_size( 60000 ) - EM.set_effective_user( "nobody" ) - # (Here, program is running as nobody) - - EM.run { - ... - } - -Of course, you will need to replace "nobody" in the example with the name of an unprivileged user -that is valid on your system. What if you want to drop privileges after opening a server socket -on a privileged (low-numbered) port? Easy, just call #set_effective_user after opening your sockets: - - require 'rubygems' - require 'eventmachine' - - # (Here, program is running as superuser) - - EM.set_descriptor_table_size( 60000 ) - - EM.run { - EM.start_server( "0.0.0.0", 80, MyHttpServer ) - EM.start_server( "0.0.0.0", 443, MyEncryptedHttpServer ) - - EM.set_effective_user( "nobody" ) - # (Here, program is running as nobody) - - ... - } - - -Because EventMachine#set_effective_user is used to enforce security -requirements, it has no nonfatal errors. If you try to set a nonexistent or invalid effective user, -#set_effective_user will abort your program, rather than continue to run with elevated privileges. - -EventMachine#set_effective_user is a silent no-op on platforms that don't support it, such as Windows. - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/INSTALL b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/INSTALL deleted file mode 100644 index dee2e429..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/INSTALL +++ /dev/null @@ -1,13 +0,0 @@ -If you have obtained an EventMachine source-tarball (.tar.gz): -unzip and untar the tarball, and enter the directory that is -created. In that directory, say: -ruby setup.rb -(You may need to be root to execute this command.) - -To create documentation for EventMachine, simply type: -rake rdoc -in the distro directory. Rdocs will be created in subdirectory rdoc. - -If you have obtained a gem version of EventMachine, install it in the -usual way (gem install eventmachine). You may need superuser privileges -to execute this command. diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/KEYBOARD b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/KEYBOARD deleted file mode 100644 index 6c699e49..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/KEYBOARD +++ /dev/null @@ -1,42 +0,0 @@ -EventMachine (EM) can respond to keyboard events. This gives your event-driven -programs the ability to respond to input from local users. - -Programming EM to handle keyboard input in Ruby is simplicity itself. Just use -EventMachine#open_keyboard, and supply the name of a Ruby module or class that -will receive the input: - - require 'rubygems' - require 'eventmachine' - - module MyKeyboardHandler - def receive_data keystrokes - puts "I received the following data from the keyboard: #{keystrokes}" - end - end - - EM.run { - EM.open_keyboard(MyKeyboardHandler) - } - -If you want EM to send line-buffered keyboard input to your program, just -include the LineText2 protocol module in your handler class or module: - - require 'rubygems' - require 'eventmachine' - - module MyKeyboardHandler - include EM::Protocols::LineText2 - def receive_line data - puts "I received the following line from the keyboard: #{data}" - end - end - - EM.run { - EM.open_keyboard(MyKeyboardHandler) - } - -As we said, simplicity itself. You can call EventMachine#open_keyboard at any -time while the EM reactor loop is running. In other words, the method -invocation may appear anywhere in an EventMachine#run block, or in any code -invoked in the #run block. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/LEGAL b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/LEGAL deleted file mode 100644 index ee018255..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/LEGAL +++ /dev/null @@ -1,25 +0,0 @@ -LEGAL NOTICE INFORMATION ------------------------- - -EventMachine is Copyright (C) 2006-07 by Francis Cianfrocca. - -EventMachine is copyrighted software owned by Francis Cianfrocca -(blackhedd ... gmail.com). You may redistribute and/or modify this -software as long as you comply with either the terms of the GPL -(see the file GPL), or Ruby's license (see the file COPYING). - -Your use of all the files in this distribution is controlled by these -license terms, except for those files specifically mentioned below: - - - -setup.rb - This file is Copyright (C) 2000-2005 by Minero Aoki - You can distribute/modify this file under the terms of - the GNU LGPL, Lesser General Public License version 2.1. - - -lib/em/buftok.rb - This file is Copyright (C) 2007 by Tony Arcieri. This file is - covered by the terms of Ruby's License (see the file COPYING). - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/LIGHTWEIGHT_CONCURRENCY b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/LIGHTWEIGHT_CONCURRENCY deleted file mode 100644 index 3c2cfa03..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/LIGHTWEIGHT_CONCURRENCY +++ /dev/null @@ -1,130 +0,0 @@ -EventMachine (EM) adds two different formalisms for lightweight concurrency to -the Ruby programmer's toolbox: spawned processes and deferrables. This note -will show you how to use them. - - -=== What is Lightweight Concurrency? - -We use the term "Lightweight Concurrency" (LC) to refer to concurrency -mechanisms that are lighter than Ruby threads. By "lighter," we mean: less -resource-intensive in one or more dimensions, usually including memory and -CPU usage. In general, you turn to LC in the hope of improving the -performance and scalability of your programs. - -In addition to the two EventMachine mechanisms we will discuss here, Ruby -has at least one other LC construct: Fibers, which are currently under -development in Ruby 1.9. - -The technical feature that makes all of these LC mechanisms different from -standard Ruby threads is that they are not scheduled automatically. - -When you create and run Ruby threads, you can assume (within certain -constraints) that your threads will all be scheduled fairly by Ruby's runtime. -Ruby itself is responsible for giving each of your threads its own share of -the total runtime. - -But with LC, your program is responsible for causing different execution -paths to run. In effect, your program has to act as a "thread scheduler." -Scheduled entities in LC run to completion and are never preempted. The -runtime system has far less work to do since it has no need to interrupt -threads or to schedule them fairly. This is what makes LC lighter and faster. - -You'll learn exactly how LC scheduling works in practice as we work through -specific examples. - - -=== EventMachine Lightweight Concurrency - -Recall that EM provides a reactor loop that must be running in order for -your programs to perform event-driven logic. An EM program typically has a -structure like this: - - require 'eventmachine' - - # your initializations - - EM.run { - # perform event-driven I/O here, including network clients, - # servers, timers, and thread-pool operations. - } - - # your cleanup - # end of the program - - -EventMachine#run executes the reactor loop, which causes your code to be -called as events of interest to your program occur. The block you pass to -EventMachine#run is executed right after the reactor loop starts, and is -the right place to start socket acceptors, etc. - -Because the reactor loop runs constantly in an EM program (until it is -stopped by a call to EventMachine#stop), it has the ability to schedule -blocks of code for asynchronous execution. Unlike a pre-emptive thread -scheduler, it's NOT able to interrupt code blocks while they execute. But -the scheduling capability it does have is enough to enable lightweight -concurrency. - - -For information on Spawned Processes, see the separate document -SPAWNED_PROCESSES. - -For information on Deferrables, see the separate document DEFERRABLES. - - -=== [SIDEBAR]: I Heard That EventMachine Doesn't Work With Ruby Threads. - -This is incorrect. EM is fully interoperable with all versions of Ruby -threads, and has been since its earliest releases. - -It's very true that EM encourages an "evented" (non-threaded) programming -style. The specific benefits of event-driven programming are far better -performance and scalability for well-written programs, and far easier -debugging. - -The benefit of using threads for similar applications is a possibly more -intuitive programming model, as well as the fact that threads are already -familiar to most programmers. Also, bugs in threaded programs often fail -to show up until programs go into production. These factors create the -illusion that threaded programs are easier to write. - -However, some operations that occur frequently in professional-caliber -applications simply can't be done without threads. (The classic example -is making calls to database client-libraries that block on network I/O -until they complete.) - -EventMachine not only allows the use of Ruby threads in these cases, but -it even provides a built-in thread-pool object to make them easier to -work with. - -You may have heard a persistent criticism that evented I/O is fundamentally -incompatible with Ruby threads. It is true that some well-publicized attempts -to incorporate event-handling libraries into Ruby were not successful. But -EventMachine was designed from the ground up with Ruby compatibility in mind, -so EM never suffered from the problems that defeated the earlier attempts. - - -=== [SIDEBAR]: I Heard That EventMachine Doesn't Work Very Well On Windows. - -This too is incorrect. EventMachine is an extension written in C++ and Java, -and therefore it requires compilation. Many Windows computers (and some Unix -computers, especially in production environments) don't have a build stack. -Attempting to install EventMachine on a machine without a compiler usually -produces a confusing error. - -In addition, Ruby has a much-debated issue with Windows compiler versions. -Ruby on Windows works best with Visual Studio 6, a compiler version that is -long out-of-print, no longer supported by Microsoft, and difficult to obtain. -(This problem is not specific to EventMachine.) - -Shortly after EventMachine was first released, the compiler issues led to -criticism that EM was incompatible with Windows. Since that time, every -EventMachine release has been supplied in a precompiled binary form for -Windows users, that does not require you to compile the code yourself. EM -binary Gems for Windows are compiled using Visual Studio 6. - -EventMachine does supply some advanced features (such as Linux EPOLL support, -reduced-privilege operation, UNIX-domain sockets, etc.) that have no -meaningful implementation on Windows. Apart from these special cases, all EM -functionality (including lightweight concurrency) works perfectly well on -Windows. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/PURE_RUBY b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/PURE_RUBY deleted file mode 100644 index 157d59eb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/PURE_RUBY +++ /dev/null @@ -1,75 +0,0 @@ -EventMachine is supplied in three alternative versions. - -1) A version that includes a Ruby extension written in C++. This version requires compilation; -2) A version for JRuby that contains a precompiled JAR file written in Java; -3) A pure Ruby version that has no external dependencies and can run in any Ruby environment. - -The Java version of EventMachine is packaged in a distinct manner and must be installed using a -special procedure. This version is described fully in a different document, and not considered -further here. - -The C++ and pure-Ruby versions, however, are shipped in the same distribution. You use the same -files (either tarball or Ruby gem) to install both of these versions. - -If you intend to use the C++ version, you must successfully compile EventMachine after you install it. -(The gem installation attempts to perform this step automatically.) - -If you choose not to compile the EventMachine C++ extension, or if your compilation fails for any -reason, you still have a fully-functional installation of the pure-Ruby version of EM. - -However, for technical reasons, a default EM installation (whether or not the compilation succeeds) -will always assume that the compiled ("extension") implementation should be used. - -If you want your EM program to use the pure Ruby version, you must specifically request it. There -are two ways to do this: by setting either a Ruby global variable, or an environment string. - -The following code will invoke the pure-Ruby implementation of EM: - - $eventmachine_library = :pure_ruby - require 'eventmachine' - - EM.library_type #=> "pure_ruby" - -Notice that this requires a code change and is not the preferred way to select pure Ruby, unless -for some reason you are absolutely sure you will never want the compiled implementation. - -Setting the following environment string has the same effect: - - export EVENTMACHINE_LIBRARY="pure_ruby" - -This technique gives you the flexibility to select either version at runtime with no code changes. - -Support - -The EventMachine development team has committed to support precisely the same APIs for all the -various implementations of EM. - -This means that you can expect any EM program to behave identically, whether you use pure Ruby, -the compiled C++ extension, or JRuby. Deviations from this behavior are to be considered bugs -and should be reported as such. - -There is a small number of exceptions to this rule, which arise from underlying platform -distinctions. Notably, EM#epoll is a silent no-op in the pure Ruby implementation. - - -When Should You Use the Pure-Ruby Implementation of EM? - - -Use the pure Ruby implementation of EM when you must support a platform for which no C++ compiler -is available, or on which the standard EM C++ code can't be compiled. - -Keep in mind that you don't need a C++ compiler in order to deploy EM applications that rely on -the compiled version, so long as appropriate C++ runtime libraries are available on the target platform. - -In extreme cases, you may find that you can develop software with the compiled EM version, but are -not allowed to install required runtime libraries on the deployment system(s). This would be another -case in which the pure Ruby implementation can be useful. - -In general you should avoid the pure Ruby version of EM when performance and scalability are important. -EM in pure Ruby will necessarily run slower than the compiled version. Depending on your application -this may or may not be a key issue. - -Also, since EPOLL is not supported in pure Ruby, your applications will be affected by Ruby's built-in -limit of 1024 file and socket descriptors that may be open in a single process. For maximum scalability -and performance, always use EPOLL if possible. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/RELEASE_NOTES b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/RELEASE_NOTES deleted file mode 100644 index 6110820a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/RELEASE_NOTES +++ /dev/null @@ -1,94 +0,0 @@ -RUBY/EventMachine RELEASE NOTES - --------------------------------------------------- -Version: 0.9.0, released xxXXX07 -Added Erlang-like distributed-computing features - --------------------------------------------------- -Version: 0.8.0, released 23Jun07 -Added an epoll implementation for Linux 2.6 kernels. -Added evented #popen. - --------------------------------------------------- -Version: 0.7.3, released 22May07 -Added a large variety of small features. See the ChangeLog. - --------------------------------------------------- -Version: 0.7.1, released xxNov06 -Added protocol handlers for line-oriented protocols. -Various bug fixes. - --------------------------------------------------- -Version: 0.7.0, released 20Nov06 -Added a fix in em.cpp/ConnectToServer to fix a fatal exception that -occurred in FreeBSD when connecting successfully to a remote server. - --------------------------------------------------- -Version: 0.6.0, released xxJul06 -Added deferred operations, suggested by Don Stocks, amillionhitpoints@yahoo.com. - --------------------------------------------------- -Version: 0.5.4, released xxJun06 -Added get_peername support for streams and datagrams. - --------------------------------------------------- -Version: 0.5.3, released 17May06 -Fixed bugs in extconf.rb, thanks to Daniel Harple, dharple@generalconsumption.org. -Added proper setup.rb and rake tasks, thanks to Austin Ziegler. -Fixed a handful of reported problems with builds on various platforms. - --------------------------------------------------- -Version: 0.5.2, released 05May06 -Made several nonvisible improvements to the Windows -implementation. -Added an exception-handling patch contributed by Jeff Rose, jeff@rosejn.net. -Added a dir-config patch contributed anonymously. -Supported builds on Solaris. - --------------------------------------------------- -Version: 0.5.1, released 05May06 -Made it possible to pass a Class rather than a Module -to a protocol handler. -Added Windows port. - --------------------------------------------------- -Version: 0.5.0, released 30Apr06 -Added a preliminary SSL/TLS extension. This will probably -change over the next few releases. - --------------------------------------------------- -Version: 0.4.5, released 29Apr06 -Changed ext files so the ruby.h is installed after unistd.h -otherwise it doesn't compile on gcc 4.1 - --------------------------------------------------- -Version: 0.4.2, released 19Apr06 -Changed the Ruby-glue so the extension will play nicer -in the sandbox with Ruby threads. -Added an EventMachine::run_without_threads API to -switch off the thread-awareness for better performance -in programs that do not spin any Ruby threads. - --------------------------------------------------- -Version: 0.4.1, released 15Apr06 -Reworked the shared-object interface to make it easier to -use EventMachine from languages other than Ruby. - --------------------------------------------------- -Version: 0.3.2, released 12Apr06 -Added support for a user-supplied block in EventMachine#connect. - --------------------------------------------------- -Version: 0.3.1, released 11Apr06 -Fixed bug that prevented EventMachine from being run multiple -times in a single process. - --------------------------------------------------- -Version: 0.3.0, released 10Apr06 -Added method EventHandler::Connection::post_init - --------------------------------------------------- -Version: 0.2.0, released 10Apr06 -Added method EventHandler::stop - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/SMTP b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/SMTP deleted file mode 100644 index 92bf3110..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/SMTP +++ /dev/null @@ -1,4 +0,0 @@ -This note details the usage of EventMachine's built-in support for SMTP. EM -supports both client and server connections, which will be described in -separate sections. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/SPAWNED_PROCESSES b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/SPAWNED_PROCESSES deleted file mode 100644 index ee68e3e8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/SPAWNED_PROCESSES +++ /dev/null @@ -1,148 +0,0 @@ -EventMachine (EM) adds two different formalisms for lightweight concurrency -to the Ruby programmer's toolbox: spawned processes and deferrables. This -note will show you how to use spawned processes. For more information, see -the separate document LIGHTWEIGHT_CONCURRENCY. - - -=== What are Spawned Processes? - -Spawned Processes in EventMachine are inspired directly by the "processes" -found in the Erlang programming language. EM deliberately borrows much (but -not all) of Erlang's terminology. However, EM's spawned processes differ from -Erlang's in ways that reflect not only Ruby style, but also the fact that -Ruby is not a functional language like Erlang. - -Let's proceed with a complete, working code sample that we will analyze line -by line. Here's an EM implementation of the "ping-pong" program that also -appears in the Erlang tutorial: - - - require 'eventmachine' - - EM.run { - pong = EM.spawn {|x, ping| - puts "Pong received #{x}" - ping.notify( x-1 ) - } - - ping = EM.spawn {|x| - if x > 0 - puts "Pinging #{x}" - pong.notify x, self - else - EM.stop - end - } - - ping.notify 3 - } - -If you run this program, you'll see the following output: - - Pinging 3 - Pong received 3 - Pinging 2 - Pong received 2 - Pinging 1 - Pong received 1 - -Let's take it step by step. - -EventMachine#spawn works very much like the built-in function spawn in -Erlang. It returns a reference to a Ruby object of class -EventMachine::SpawnedProcess, which is actually a schedulable entity. In -Erlang, the value returned from spawn is called a "process identifier" or -"pid." But we'll refer to the Ruby object returned from EM#spawn simply as a -"spawned process." - -You pass a Ruby block with zero or more parameters to EventMachine#spawn. -Like all Ruby blocks, this one is a closure, so it can refer to variables -defined in the local context when you call EM#spawn. - -However, the code block passed to EM#spawn does NOT execute immediately by -default. Rather, it will execute only when the Spawned Object is "notified." -In Erlang, this process is called "message passing," and is done with the -operator !, but in Ruby it's done simply by calling the #notify method of a -spawned-process object. The parameters you pass to #notify must match those -defined in the block that was originally passed to EM#spawn. - -When you call the #notify method of a spawned-process object, EM's reactor -core will execute the code block originally passed to EM#spawn, at some point -in the future. (#notify itself merely adds a notification to the object's -message queue and ALWAYS returns immediately.) - -When a SpawnedProcess object executes a notification, it does so in the -context of the SpawnedProcess object itself. The notified code block can see -local context from the point at which EM#spawn was called. However, the value -of "self" inside the notified code block is a reference to the SpawnedProcesss -object itself. - -An EM spawned process is nothing more than a Ruby object with a message -queue attached to it. You can have any number of spawned processes in your -program without compromising scalability. You can notify a spawned process -any number of times, and each notification will cause a "message" to be -placed in the queue of the spawned process. Spawned processes with non-empty -message queues are scheduled for execution automatically by the EM reactor. -Spawned processes with no visible references are garbage-collected like any -other Ruby object. - -Back to our code sample: - - pong = EM.spawn {|x, ping| - puts "Pong received #{x}" - ping.notify( x-1 ) - } - -This simply creates a spawned process and assigns it to the local variable -pong. You can see that the spawned code block takes a numeric parameter and a -reference to another spawned process. When pong is notified, it expects to -receive arguments corresponding to these two parameters. It simply prints out -the number it receives as the first argument. Then it notifies the spawned -process referenced by the second argument, passing it the first argument -minus 1. - -And then the block ends, which is crucial because otherwise nothing else -can run. (Remember that in LC, scheduled entities run to completion and are -never preempted.) - -On to the next bit of the code sample: - - ping = EM.spawn {|x| - if x > 0 - puts "Pinging #{x}" - pong.notify x, self - else - EM.stop - end - } - -Here, we're spawning a process that takes a single (numeric) parameter. If -the parameter is greater than zero, the block writes it to the console. It -then notifies the spawned process referenced by the pong local variable, -passing as arguments its number argument, and a reference to itself. The -latter reference, as you saw above, is used by pong to send a return -notification. - -If the ping process receives a zero value, it will stop the reactor loop and -end the program. - -Now we've created a pair of spawned processes, but nothing else has happened. -If we stop now, the program will spin in the EM reactor loop, doing nothing -at all. Our spawned processes will never be scheduled for execution. - -But look at the next line in the code sample: - - ping.notify 3 - -This line gets the ping-pong ball rolling. We call ping's #notify method, -passing the argument 3. This causes a message to be sent to the ping spawned -process. The message contains the single argument, and it causes the EM -reactor to schedule the ping process. And this in turn results in the -execution of the Ruby code block passed to EM#spawn when ping was created. -Everything else proceeds as a result of the messages that are subsequently -passed to each other by the spawned processes. - -[TODO, present the outbound network i/o use case, and clarify that spawned -processes are interleaved with normal i/o operations and don't interfere -with them at all. Also, blame Erlang for the confusing term "process"] - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/TODO b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/TODO deleted file mode 100644 index 686a0d53..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/docs/old/TODO +++ /dev/null @@ -1,8 +0,0 @@ -TODO List: - -12Aug06: Noticed by Don Stocks. A TCP connect-request that results -in a failed DNS resolution fires a fatal error back to user code. -Uuuuuugly. We should probably cause an unbind event to get fired -instead, and add some parameterization so the caller can detect -the nature of the failure. - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/01_eventmachine_echo_server.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/01_eventmachine_echo_server.rb deleted file mode 100644 index 51c5c7db..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/01_eventmachine_echo_server.rb +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class EchoServer < EM::Connection - def receive_data(data) - send_data(data) - end -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, EchoServer) -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/02_eventmachine_echo_server_that_recognizes_exit_command.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/02_eventmachine_echo_server_that_recognizes_exit_command.rb deleted file mode 100644 index 4cfff19b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/02_eventmachine_echo_server_that_recognizes_exit_command.rb +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class EchoServer < EM::Connection - def receive_data(data) - if data.strip =~ /exit$/i - EventMachine.stop - else - send_data(data) - end - end -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, EchoServer) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/03_simple_chat_server.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/03_simple_chat_server.rb deleted file mode 100644 index 3352551e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/03_simple_chat_server.rb +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class SimpleChatServer < EM::Connection - - @@connected_clients = Array.new - DM_REGEXP = /^@([a-zA-Z0-9]+)\s*:?\s*(.+)/.freeze - - attr_reader :username - - - # - # EventMachine handlers - # - - def post_init - @username = nil - - puts "A client has connected..." - ask_username - end - - def unbind - @@connected_clients.delete(self) - puts "[info] #{@username} has left" if entered_username? - end - - def receive_data(data) - if entered_username? - handle_chat_message(data.strip) - else - handle_username(data.strip) - end - end - - - # - # Username handling - # - - def entered_username? - !@username.nil? && !@username.empty? - end # entered_username? - - def handle_username(input) - if input.empty? - send_line("Blank usernames are not allowed. Try again.") - ask_username - else - @username = input - @@connected_clients.push(self) - self.other_peers.each { |c| c.send_data("#{@username} has joined the room\n") } - puts "#{@username} has joined" - - self.send_line("[info] Ohai, #{@username}") - end - end # handle_username(input) - - def ask_username - self.send_line("[info] Enter your username:") - end # ask_username - - - # - # Message handling - # - - def handle_chat_message(msg) - if command?(msg) - self.handle_command(msg) - else - if direct_message?(msg) - self.handle_direct_message(msg) - else - self.announce(msg, "#{@username}:") - end - end - end # handle_chat_message(msg) - - def direct_message?(input) - input =~ DM_REGEXP - end # direct_message?(input) - - def handle_direct_message(input) - username, message = parse_direct_message(input) - - if connection = @@connected_clients.find { |c| c.username == username } - puts "[dm] @#{@username} => @#{username}" - connection.send_line("[dm] @#{@username}: #{message}") - else - send_line "@#{username} is not in the room. Here's who is: #{usernames.join(', ')}" - end - end # handle_direct_message(input) - - def parse_direct_message(input) - return [$1, $2] if input =~ DM_REGEXP - end # parse_direct_message(input) - - - # - # Commands handling - # - - def command?(input) - input =~ /(exit|status)$/i - end # command?(input) - - def handle_command(cmd) - case cmd - when /exit$/i then self.close_connection - when /status$/i then self.send_line("[chat server] It's #{Time.now.strftime('%H:%M')} and there are #{self.number_of_connected_clients} people in the room") - end - end # handle_command(cmd) - - - # - # Helpers - # - - def announce(msg = nil, prefix = "[chat server]") - @@connected_clients.each { |c| c.send_line("#{prefix} #{msg}") } unless msg.empty? - end # announce(msg) - - def number_of_connected_clients - @@connected_clients.size - end # number_of_connected_clients - - def other_peers - @@connected_clients.reject { |c| self == c } - end # other_peers - - def send_line(line) - self.send_data("#{line}\n") - end # send_line(line) - - def usernames - @@connected_clients.map { |c| c.username } - end # usernames -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, SimpleChatServer) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/04_simple_chat_server_step_one.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/04_simple_chat_server_step_one.rb deleted file mode 100644 index bb283a7a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/04_simple_chat_server_step_one.rb +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class SimpleChatServer < EM::Connection - - # - # EventMachine handlers - # - - def post_init - puts "A client has connected..." - end - - def unbind - puts "A client has left..." - end -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, SimpleChatServer) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/05_simple_chat_server_step_two.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/05_simple_chat_server_step_two.rb deleted file mode 100644 index 1361c5da..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/05_simple_chat_server_step_two.rb +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class SimpleChatServer < EM::Connection - - @@connected_clients = Array.new - - - # - # EventMachine handlers - # - - def post_init - @@connected_clients.push(self) - puts "A client has connected..." - end - - def unbind - @@connected_clients.delete(self) - puts "A client has left..." - end - - - - - # - # Helpers - # - - def other_peers - @@connected_clients.reject { |c| self == c } - end # other_peers -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, SimpleChatServer) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/06_simple_chat_server_step_three.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/06_simple_chat_server_step_three.rb deleted file mode 100644 index d9b85e21..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/06_simple_chat_server_step_three.rb +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class SimpleChatServer < EM::Connection - - @@connected_clients = Array.new - - - attr_reader :username - - - # - # EventMachine handlers - # - - def post_init - @username = nil - - puts "A client has connected..." - ask_username - end - - def unbind - @@connected_clients.delete(self) - puts "A client has left..." - end - - def receive_data(data) - if entered_username? - handle_chat_message(data.strip) - else - handle_username(data.strip) - end - end - - - - - # - # Username handling - # - - def entered_username? - !@username.nil? && !@username.empty? - end # entered_username? - - def handle_username(input) - if input.empty? - send_line("Blank usernames are not allowed. Try again.") - ask_username - else - @username = input - @@connected_clients.push(self) - self.other_peers.each { |c| c.send_data("#{@username} has joined the room\n") } - puts "#{@username} has joined" - - self.send_line("[info] Ohai, #{@username}") - end - end # handle_username(input) - - def ask_username - self.send_line("[info] Enter your username:") - end # ask_username - - - - # - # Message handling - # - - def handle_chat_message(msg) - raise NotImplementedError - end - - - - # - # Helpers - # - - def other_peers - @@connected_clients.reject { |c| self == c } - end # other_peers - - def send_line(line) - self.send_data("#{line}\n") - end # send_line(line) -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, SimpleChatServer) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/07_simple_chat_server_step_four.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/07_simple_chat_server_step_four.rb deleted file mode 100644 index d4948af8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/07_simple_chat_server_step_four.rb +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class SimpleChatServer < EM::Connection - - @@connected_clients = Array.new - - - attr_reader :username - - - # - # EventMachine handlers - # - - def post_init - @username = nil - - puts "A client has connected..." - ask_username - end - - def unbind - @@connected_clients.delete(self) - puts "[info] #{@username} has left" if entered_username? - end - - def receive_data(data) - if entered_username? - handle_chat_message(data.strip) - else - handle_username(data.strip) - end - end - - - - - # - # Username handling - # - - def entered_username? - !@username.nil? && !@username.empty? - end # entered_username? - - def handle_username(input) - if input.empty? - send_line("Blank usernames are not allowed. Try again.") - ask_username - else - @username = input - @@connected_clients.push(self) - self.other_peers.each { |c| c.send_data("#{@username} has joined the room\n") } - puts "#{@username} has joined" - - self.send_line("[info] Ohai, #{@username}") - end - end # handle_username(input) - - def ask_username - self.send_line("[info] Enter your username:") - end # ask_username - - - - # - # Message handling - # - - def handle_chat_message(msg) - if command?(msg) - self.handle_command(msg) - else - self.announce(msg, "#{@username}:") - end - end - - - # - # Commands handling - # - - def command?(input) - input =~ /exit$/i - end # command?(input) - - def handle_command(cmd) - case cmd - when /exit$/i then self.close_connection - end - end # handle_command(cmd) - - - - # - # Helpers - # - - def announce(msg = nil, prefix = "[chat server]") - @@connected_clients.each { |c| c.send_line("#{prefix} #{msg}") } unless msg.empty? - end # announce(msg) - - def other_peers - @@connected_clients.reject { |c| self == c } - end # other_peers - - def send_line(line) - self.send_data("#{line}\n") - end # send_line(line) -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, SimpleChatServer) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/08_simple_chat_server_step_five.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/08_simple_chat_server_step_five.rb deleted file mode 100644 index 03da66bf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/guides/getting_started/08_simple_chat_server_step_five.rb +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' # or use Bundler.setup -require 'eventmachine' - -class SimpleChatServer < EM::Connection - - @@connected_clients = Array.new - DM_REGEXP = /^@([a-zA-Z0-9]+)\s*:?\s+(.+)/.freeze - - attr_reader :username - - - # - # EventMachine handlers - # - - def post_init - @username = nil - - puts "A client has connected..." - ask_username - end - - def unbind - @@connected_clients.delete(self) - puts "[info] #{@username} has left" if entered_username? - end - - def receive_data(data) - if entered_username? - handle_chat_message(data.strip) - else - handle_username(data.strip) - end - end - - - # - # Username handling - # - - def entered_username? - !@username.nil? && !@username.empty? - end # entered_username? - - def handle_username(input) - if input.empty? - send_line("Blank usernames are not allowed. Try again.") - ask_username - else - @username = input - @@connected_clients.push(self) - self.other_peers.each { |c| c.send_data("#{@username} has joined the room\n") } - puts "#{@username} has joined" - - self.send_line("[info] Ohai, #{@username}") - end - end # handle_username(input) - - def ask_username - self.send_line("[info] Enter your username:") - end # ask_username - - - # - # Message handling - # - - def handle_chat_message(msg) - if command?(msg) - self.handle_command(msg) - else - if direct_message?(msg) - self.handle_direct_message(msg) - else - self.announce(msg, "#{@username}:") - end - end - end # handle_chat_message(msg) - - def direct_message?(input) - input =~ DM_REGEXP - end # direct_message?(input) - - def handle_direct_message(input) - username, message = parse_direct_message(input) - - if connection = @@connected_clients.find { |c| c.username == username } - puts "[dm] @#{@username} => @#{username}" - connection.send_line("[dm] @#{@username}: #{message}") - else - send_line "@#{username} is not in the room. Here's who is: #{usernames.join(', ')}" - end - end # handle_direct_message(input) - - def parse_direct_message(input) - return [$1, $2] if input =~ DM_REGEXP - end # parse_direct_message(input) - - - # - # Commands handling - # - - def command?(input) - input =~ /(exit|status)$/i - end # command?(input) - - def handle_command(cmd) - case cmd - when /exit$/i then self.close_connection - when /status$/i then self.send_line("[chat server] It's #{Time.now.strftime('%H:%M')} and there are #{self.number_of_connected_clients} people in the room") - end - end # handle_command(cmd) - - - # - # Helpers - # - - def announce(msg = nil, prefix = "[chat server]") - @@connected_clients.each { |c| c.send_line("#{prefix} #{msg}") } unless msg.empty? - end # announce(msg) - - def other_peers - @@connected_clients.reject { |c| self == c } - end # other_peers - - def send_line(line) - self.send_data("#{line}\n") - end # send_line(line) -end - -EventMachine.run do - # hit Control + C to stop - Signal.trap("INT") { EventMachine.stop } - Signal.trap("TERM") { EventMachine.stop } - - EventMachine.start_server("0.0.0.0", 10000, SimpleChatServer) -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_channel.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_channel.rb deleted file mode 100644 index 16e8d083..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_channel.rb +++ /dev/null @@ -1,43 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -EM.run do - - # Create a channel to push data to, this could be stocks... - RandChannel = EM::Channel.new - - # The server simply subscribes client connections to the channel on connect, - # and unsubscribes them on disconnect. - class Server < EM::Connection - def self.start(host = '127.0.0.1', port = 8000) - EM.start_server(host, port, self) - end - - def post_init - @sid = RandChannel.subscribe { |m| send_data "#{m.inspect}\n" } - end - - def unbind - RandChannel.unsubscribe @sid - end - end - Server.start - - # Two client connections, that just print what they receive. - 2.times do - EM.connect('127.0.0.1', 8000) do |c| - c.extend EM::P::LineText2 - def c.receive_line(line) - puts "Subscriber: #{signature} got #{line}" - end - EM.add_timer(2) { c.close_connection } - end - end - - # This part of the example is more fake, but imagine sleep was in fact a - # long running calculation to achieve the value. - 40.times do - EM.defer lambda { v = sleep(rand * 2); RandChannel << [Time.now, v] } - end - - EM.add_timer(5) { EM.stop } -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_queue.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_queue.rb deleted file mode 100644 index 761ea764..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_queue.rb +++ /dev/null @@ -1,2 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_array.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_array.rb deleted file mode 100644 index 81b0ae3e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_array.rb +++ /dev/null @@ -1,15 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -EM.run do - array = (1..100).to_a - - tickloop = EM.tick_loop do - if array.empty? - :stop - else - puts array.shift - end - end - - tickloop.on_stop { EM.stop } -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_counter.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_counter.rb deleted file mode 100644 index 58e51ffd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_counter.rb +++ /dev/null @@ -1,32 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -class TickCounter - attr_reader :start_time, :count - - def initialize - reset - @tick_loop = EM.tick_loop(method(:tick)) - end - - def reset - @count = 0 - @start_time = EM.current_time - end - - def tick - @count += 1 - end - - def rate - @count / (EM.current_time - @start_time) - end -end - -period = 5 -EM.run do - counter = TickCounter.new - EM.add_periodic_timer(period) do - puts "Ticks per second: #{counter.rate} (mean of last #{period}s)" - counter.reset - end -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/helper.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/helper.rb deleted file mode 100644 index 835ded27..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/examples/old/helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') -require 'eventmachine' \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/Makefile b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/Makefile deleted file mode 100644 index 4667ce7a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/Makefile +++ /dev/null @@ -1,269 +0,0 @@ - -SHELL = /bin/sh - -# V=0 quiet, V=1 verbose. other values don't work. -V = 0 -V0 = $(V:0=) -Q1 = $(V:1=) -Q = $(Q1:0=@) -ECHO1 = $(V:1=@ :) -ECHO = $(ECHO1:0=@ echo) -NULLCMD = : - -#### Start of system configuration section. #### - -srcdir = . -topdir = /home/nakamoto/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0 -hdrdir = $(topdir) -arch_hdrdir = /home/nakamoto/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/x86_64-linux -PATH_SEPARATOR = : -VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby -prefix = $(DESTDIR)/home/nakamoto/.rvm/rubies/ruby-3.2.2 -rubysitearchprefix = $(rubylibprefix)/$(sitearch) -rubyarchprefix = $(rubylibprefix)/$(arch) -rubylibprefix = $(libdir)/$(RUBY_BASE_NAME) -exec_prefix = $(prefix) -vendorarchhdrdir = $(vendorhdrdir)/$(sitearch) -sitearchhdrdir = $(sitehdrdir)/$(sitearch) -rubyarchhdrdir = $(rubyhdrdir)/$(arch) -vendorhdrdir = $(rubyhdrdir)/vendor_ruby -sitehdrdir = $(rubyhdrdir)/site_ruby -rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME) -vendorarchdir = $(vendorlibdir)/$(sitearch) -vendorlibdir = $(vendordir)/$(ruby_version) -vendordir = $(rubylibprefix)/vendor_ruby -sitearchdir = $(sitelibdir)/$(sitearch) -sitelibdir = $(sitedir)/$(ruby_version) -sitedir = $(rubylibprefix)/site_ruby -rubyarchdir = $(rubylibdir)/$(arch) -rubylibdir = $(rubylibprefix)/$(ruby_version) -sitearchincludedir = $(includedir)/$(sitearch) -archincludedir = $(includedir)/$(arch) -sitearchlibdir = $(libdir)/$(sitearch) -archlibdir = $(libdir)/$(arch) -ridir = $(datarootdir)/$(RI_BASE_NAME) -mandir = $(datarootdir)/man -localedir = $(datarootdir)/locale -libdir = $(exec_prefix)/lib -psdir = $(docdir) -pdfdir = $(docdir) -dvidir = $(docdir) -htmldir = $(docdir) -infodir = $(datarootdir)/info -docdir = $(datarootdir)/doc/$(PACKAGE) -oldincludedir = $(DESTDIR)/usr/include -includedir = $(prefix)/include -runstatedir = $(localstatedir)/run -localstatedir = $(prefix)/var -sharedstatedir = $(prefix)/com -sysconfdir = $(prefix)/etc -datadir = $(datarootdir) -datarootdir = $(prefix)/share -libexecdir = $(exec_prefix)/libexec -sbindir = $(exec_prefix)/sbin -bindir = $(exec_prefix)/bin -archdir = $(rubyarchdir) - - -CC_WRAPPER = -CC = gcc -CXX = g++ -LIBRUBY = $(LIBRUBY_SO) -LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a -LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME) -LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS) -empty = -OUTFLAG = -o $(empty) -COUTFLAG = -o $(empty) -CSRCFLAG = $(empty) - -RUBY_EXTCONF_H = -cflags = $(optflags) $(debugflags) $(warnflags) -cxxflags = -optflags = -O3 -fno-fast-math -debugflags = -ggdb3 -warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -cppflags = -CCDLFLAGS = -fPIC -CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG) -INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -DEFS = -CPPFLAGS = -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H -DWITH_SSL -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_FD_SELECT -DHAVE_TYPE_RB_FDSET_T -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_TIME_NEW -DHAVE_INOTIFY_INIT -DHAVE_INOTIFY -DHAVE_WRITEV -DHAVE_PIPE2 -DHAVE_ACCEPT4 -DHAVE_CONST_SOCK_CLOEXEC -DOS_UNIX -DHAVE_EPOLL_CREATE -DHAVE_EPOLL -DHAVE_CLOCK_GETTIME -DHAVE_CONST_CLOCK_MONOTONIC_RAW -DHAVE_CONST_CLOCK_MONOTONIC -DHAVE_MAKE_PAIR $(DEFS) $(cppflags) -CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG) -ldflags = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -dldflags = -Wl,--compress-debug-sections=zlib -ARCH_FLAG = -DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG) -LDSHARED = $(CXX) -shared -LDSHAREDXX = $(CXX) -shared -AR = gcc-ar -EXEEXT = - -RUBY_INSTALL_NAME = $(RUBY_BASE_NAME) -RUBY_SO_NAME = ruby -RUBYW_INSTALL_NAME = -RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version) -RUBYW_BASE_NAME = rubyw -RUBY_BASE_NAME = ruby - -arch = x86_64-linux -sitearch = $(arch) -ruby_version = 3.2.0 -ruby = $(bindir)/$(RUBY_BASE_NAME) -RUBY = $(ruby) -BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME) -ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h - -RM = rm -f -RM_RF = rm -fr -RMDIRS = rmdir --ignore-fail-on-non-empty -p -MAKEDIRS = /usr/bin/mkdir -p -INSTALL = /usr/bin/install -c -INSTALL_PROG = $(INSTALL) -m 0755 -INSTALL_DATA = $(INSTALL) -m 644 -COPY = cp -TOUCH = exit > - -#### End of system configuration section. #### - -preload = -libpath = . $(libdir) -LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir) -DEFFILE = - -CLEANFILES = mkmf.log -DISTCLEANFILES = -DISTCLEANDIRS = - -extout = -extout_prefix = -target_prefix = -LOCAL_LIBS = -LIBS = $(LIBRUBYARG_SHARED) -lssl -lcrypto -lcrypto -lssl -lm -lpthread -lc -ORIG_SRCS = binder.cpp cmain.cpp ed.cpp em.cpp kb.cpp page.cpp pipe.cpp rubymain.cpp ssl.cpp -SRCS = $(ORIG_SRCS) -OBJS = binder.o cmain.o ed.o em.o kb.o page.o pipe.o rubymain.o ssl.o -HDRS = $(srcdir)/binder.h $(srcdir)/ed.h $(srcdir)/em.h $(srcdir)/eventmachine.h $(srcdir)/page.h $(srcdir)/project.h $(srcdir)/ssl.h -LOCAL_HDRS = -TARGET = rubyeventmachine -TARGET_NAME = rubyeventmachine -TARGET_ENTRY = Init_$(TARGET_NAME) -DLLIB = $(TARGET).so -EXTSTATIC = -STATIC_LIB = - -TIMESTAMP_DIR = . -BINDIR = $(bindir) -RUBYCOMMONDIR = $(sitedir)$(target_prefix) -RUBYLIBDIR = $(sitelibdir)$(target_prefix) -RUBYARCHDIR = $(sitearchdir)$(target_prefix) -HDRDIR = $(sitehdrdir)$(target_prefix) -ARCHHDRDIR = $(sitearchhdrdir)$(target_prefix) -TARGET_SO_DIR = -TARGET_SO = $(TARGET_SO_DIR)$(DLLIB) -CLEANLIBS = $(TARGET_SO) false -CLEANOBJS = $(OBJS) *.bak -TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time - -all: $(DLLIB) -static: $(STATIC_LIB) -.PHONY: all install static install-so install-rb -.PHONY: clean clean-so clean-static clean-rb - -clean-static:: -clean-rb-default:: -clean-rb:: -clean-so:: -clean: clean-so clean-static clean-rb-default clean-rb - -$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time - -distclean-rb-default:: -distclean-rb:: -distclean-so:: -distclean-static:: -distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb - -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log - -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) - -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true - -realclean: distclean -install: install-so install-rb - -install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP) - $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) -clean-static:: - -$(Q)$(RM) $(STATIC_LIB) -install-rb: pre-install-rb do-install-rb install-rb-default -install-rb-default: pre-install-rb-default do-install-rb-default -pre-install-rb: Makefile -pre-install-rb-default: Makefile -do-install-rb: -do-install-rb-default: -pre-install-rb-default: - @$(NULLCMD) -$(TARGET_SO_DIR_TIMESTAMP): - $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR) - $(Q) $(TOUCH) $@ - -site-install: site-install-so site-install-rb -site-install-so: install-so -site-install-rb: install-rb - -.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S - -.cc.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cc.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.mm.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.mm.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.cxx.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cxx.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.cpp.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cpp.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.c.o: - $(ECHO) compiling $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.c.S: - $(ECHO) translating $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.m.o: - $(ECHO) compiling $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.m.S: - $(ECHO) translating $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -$(TARGET_SO): $(OBJS) Makefile - $(ECHO) linking shared-object $(DLLIB) - -$(Q)$(RM) $(@) - $(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) - - - -$(OBJS): $(HDRS) $(ruby_headers) diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/binder.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/binder.cpp deleted file mode 100644 index 5b90876e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/binder.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: binder.cpp -Date: 07Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#include "project.h" - -#define DEV_URANDOM "/dev/urandom" - - -std::map Bindable_t::BindingBag; - - -/******************************** -STATIC Bindable_t::CreateBinding -********************************/ - -uintptr_t Bindable_t::CreateBinding() -{ - static uintptr_t num = 0; - while(BindingBag[++num]) {} - return num; -} - -#if 0 -string Bindable_t::CreateBinding() -{ - static int index = 0; - static string seed; - - if ((index >= 1000000) || (seed.length() == 0)) { - #ifdef OS_UNIX - int fd = open (DEV_URANDOM, O_RDONLY); - if (fd < 0) - throw std::runtime_error ("No entropy device"); - - unsigned char u[16]; - size_t r = read (fd, u, sizeof(u)); - if (r < sizeof(u)) - throw std::runtime_error ("Unable to read entropy device"); - - unsigned char *u1 = (unsigned char*)u; - char u2 [sizeof(u) * 2 + 1]; - - for (size_t i=0; i < sizeof(u); i++) - sprintf (u2 + (i * 2), "%02x", u1[i]); - - seed = string (u2); - #endif - - - #ifdef OS_WIN32 - UUID uuid; - UuidCreate (&uuid); - unsigned char *uuidstring = NULL; - UuidToString (&uuid, &uuidstring); - if (!uuidstring) - throw std::runtime_error ("Unable to read uuid"); - seed = string ((const char*)uuidstring); - - RpcStringFree (&uuidstring); - #endif - - index = 0; - - - } - - stringstream ss; - ss << seed << (++index); - return ss.str(); -} -#endif - -/***************************** -STATIC: Bindable_t::GetObject -*****************************/ - -Bindable_t *Bindable_t::GetObject (const uintptr_t binding) -{ - std::map::const_iterator i = BindingBag.find (binding); - if (i != BindingBag.end()) - return i->second; - else - return NULL; -} - - -/********************** -Bindable_t::Bindable_t -**********************/ - -Bindable_t::Bindable_t() -{ - Binding = Bindable_t::CreateBinding(); - BindingBag [Binding] = this; -} - - - -/*********************** -Bindable_t::~Bindable_t -***********************/ - -Bindable_t::~Bindable_t() NO_EXCEPT_FALSE -{ - BindingBag.erase (Binding); -} - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/binder.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/binder.h deleted file mode 100644 index dd32c8d4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/binder.h +++ /dev/null @@ -1,52 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: binder.h -Date: 07Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#ifndef __ObjectBindings__H_ -#define __ObjectBindings__H_ - - -#if __cplusplus >= 201103L -#define NO_EXCEPT_FALSE noexcept(false) -#else -#define NO_EXCEPT_FALSE -#endif - -class Bindable_t -{ - public: - static uintptr_t CreateBinding(); - static Bindable_t *GetObject (const uintptr_t); - static std::map BindingBag; - - public: - Bindable_t(); - virtual ~Bindable_t() NO_EXCEPT_FALSE; - - const uintptr_t GetBinding() {return Binding;} - - private: - uintptr_t Binding; -}; - - - - - -#endif // __ObjectBindings__H_ - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/cmain.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/cmain.cpp deleted file mode 100644 index f58c2cde..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/cmain.cpp +++ /dev/null @@ -1,988 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: cmain.cpp -Date: 06Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#include "project.h" - -/* 21Sep09: ruby 1.9 defines macros for common i/o functions that point to rb_w32_* implementations. - We need to undef the stat to fix a build failure in evma_send_file_data_to_connection. - See http://groups.google.com/group/eventmachine/browse_thread/thread/fc60d9bb738ffc71 -*/ -#if defined(BUILD_FOR_RUBY) && defined(OS_WIN32) -#undef stat -#undef fstat -#endif - -static EventMachine_t *EventMachine; -static Poller_t Poller = Poller_Default; - -extern "C" void ensure_eventmachine (const char *caller = "unknown caller") -{ - if (!EventMachine) { - const int err_size = 128; - char err_string[err_size]; - snprintf (err_string, err_size, "eventmachine not initialized: %s", caller); - #ifdef BUILD_FOR_RUBY - rb_raise(rb_eRuntimeError, "%s", err_string); - #else - throw std::runtime_error (err_string); - #endif - } -} - -/*********************** -evma_initialize_library -***********************/ - -extern "C" void evma_initialize_library (EMCallback cb) -{ - if (EventMachine) - #ifdef BUILD_FOR_RUBY - rb_raise(rb_eRuntimeError, "eventmachine already initialized: evma_initialize_library"); - #else - throw std::runtime_error ("eventmachine already initialized: evma_initialize_library"); - #endif - - EventMachine = new EventMachine_t (cb, Poller); -} - - -/******************** -evma_release_library -********************/ - -extern "C" void evma_release_library() -{ - ensure_eventmachine("evma_release_library"); - delete EventMachine; - EventMachine = NULL; -} - - -/********************* -evma_run_machine_once -*********************/ - -extern "C" bool evma_run_machine_once() -{ - ensure_eventmachine("evma_run_machine_once"); - return EventMachine->RunOnce(); -} - - -/**************** -evma_run_machine -****************/ - -extern "C" void evma_run_machine() -{ - ensure_eventmachine("evma_run_machine"); - EventMachine->Run(); -} - - -/************************** -evma_install_oneshot_timer -**************************/ - -extern "C" const uintptr_t evma_install_oneshot_timer (uint64_t milliseconds) -{ - ensure_eventmachine("evma_install_oneshot_timer"); - return EventMachine->InstallOneshotTimer (milliseconds); -} - - -/********************** -evma_connect_to_server -**********************/ - -extern "C" const uintptr_t evma_connect_to_server (const char *bind_addr, int bind_port, const char *server, int port) -{ - ensure_eventmachine("evma_connect_to_server"); - return EventMachine->ConnectToServer (bind_addr, bind_port, server, port); -} - -/*************************** -evma_connect_to_unix_server -***************************/ - -extern "C" const uintptr_t evma_connect_to_unix_server (const char *server) -{ - ensure_eventmachine("evma_connect_to_unix_server"); - return EventMachine->ConnectToUnixServer (server); -} - -/************** -evma_attach_fd -**************/ - -extern "C" const uintptr_t evma_attach_fd (int file_descriptor, int watch_mode) -{ - ensure_eventmachine("evma_attach_fd"); - return EventMachine->AttachFD (file_descriptor, watch_mode ? true : false); -} - -/************** -evma_detach_fd -**************/ - -extern "C" int evma_detach_fd (const uintptr_t binding) -{ - ensure_eventmachine("evma_detach_fd"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return EventMachine->DetachFD (ed); - else - #ifdef BUILD_FOR_RUBY - rb_raise(rb_eRuntimeError, "invalid binding to detach"); - #else - throw std::runtime_error ("invalid binding to detach"); - #endif - return -1; -} - -/************************ -evma_get_file_descriptor -************************/ - -extern "C" int evma_get_file_descriptor (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_file_descriptor"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->GetSocket(); - else - #ifdef BUILD_FOR_RUBY - rb_raise(rb_eRuntimeError, "invalid binding to get_fd"); - #else - throw std::runtime_error ("invalid binding to get_fd"); - #endif - return -1; -} - -/*********************** -evma_is_notify_readable -***********************/ - -extern "C" int evma_is_notify_readable (const uintptr_t binding) -{ - ConnectionDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - return cd->IsNotifyReadable() ? 1 : 0; - return -1; -} - -/************************ -evma_set_notify_readable -************************/ - -extern "C" void evma_set_notify_readable (const uintptr_t binding, int mode) -{ - ConnectionDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - cd->SetNotifyReadable (mode ? true : false); -} - -/*********************** -evma_is_notify_writable -***********************/ - -extern "C" int evma_is_notify_writable (const uintptr_t binding) -{ - ConnectionDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - return cd->IsNotifyWritable() ? 1 : 0; - return -1; -} - -/************************ -evma_set_notify_writable -************************/ - -extern "C" void evma_set_notify_writable (const uintptr_t binding, int mode) -{ - ConnectionDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - cd->SetNotifyWritable (mode ? true : false); -} - -/********** -evma_pause -**********/ - -extern "C" int evma_pause (const uintptr_t binding) -{ - EventableDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - return cd->Pause() ? 1 : 0; - - return 0; -} - -/*********** -evma_resume -***********/ - -extern "C" int evma_resume (const uintptr_t binding) -{ - EventableDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - return cd->Resume() ? 1 : 0; - - return 0; -} - -/************** -evma_is_paused -**************/ - -extern "C" int evma_is_paused (const uintptr_t binding) -{ - EventableDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - return cd->IsPaused() ? 1 : 0; - - return 0; -} - -/************************ -evma_num_close_scheduled -************************/ - -extern "C" int evma_num_close_scheduled () -{ - ensure_eventmachine("evma_num_close_scheduled"); - return EventMachine->NumCloseScheduled; -} - -/********************** -evma_create_tcp_server -**********************/ - -extern "C" const uintptr_t evma_create_tcp_server (const char *address, int port) -{ - ensure_eventmachine("evma_create_tcp_server"); - return EventMachine->CreateTcpServer (address, port); -} - -/****************************** -evma_create_unix_domain_server -******************************/ - -extern "C" const uintptr_t evma_create_unix_domain_server (const char *filename) -{ - ensure_eventmachine("evma_create_unix_domain_server"); - return EventMachine->CreateUnixDomainServer (filename); -} - -/*********************** -evma_attach_sd -************************/ - -extern "C" const uintptr_t evma_attach_sd (int sd) -{ - ensure_eventmachine("evma_attach_sd"); - return EventMachine->AttachSD (sd); -} - -/************************* -evma_open_datagram_socket -*************************/ - -extern "C" const uintptr_t evma_open_datagram_socket (const char *address, int port) -{ - ensure_eventmachine("evma_open_datagram_socket"); - return EventMachine->OpenDatagramSocket (address, port); -} - -/****************** -evma_open_keyboard -******************/ - -extern "C" const uintptr_t evma_open_keyboard() -{ - ensure_eventmachine("evma_open_keyboard"); - return EventMachine->OpenKeyboard(); -} - -/******************* -evma_watch_filename -*******************/ - -extern "C" const uintptr_t evma_watch_filename (const char *fname) -{ - ensure_eventmachine("evma_watch_filename"); - return EventMachine->WatchFile(fname); -} - -/********************* -evma_unwatch_filename -*********************/ - -extern "C" void evma_unwatch_filename (const uintptr_t sig) -{ - ensure_eventmachine("evma_unwatch_file"); - EventMachine->UnwatchFile(sig); -} - -/************** -evma_watch_pid -**************/ - -extern "C" const uintptr_t evma_watch_pid (int pid) -{ - ensure_eventmachine("evma_watch_pid"); - return EventMachine->WatchPid(pid); -} - -/**************** -evma_unwatch_pid -****************/ - -extern "C" void evma_unwatch_pid (const uintptr_t sig) -{ - ensure_eventmachine("evma_unwatch_pid"); - EventMachine->UnwatchPid(sig); -} - -/**************************** -evma_send_data_to_connection -****************************/ - -extern "C" int evma_send_data_to_connection (const uintptr_t binding, const char *data, int data_length) -{ - ensure_eventmachine("evma_send_data_to_connection"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->SendOutboundData(data, data_length); - return -1; -} - -/****************** -evma_send_datagram -******************/ - -extern "C" int evma_send_datagram (const uintptr_t binding, const char *data, int data_length, const char *address, int port) -{ - ensure_eventmachine("evma_send_datagram"); - DatagramDescriptor *dd = dynamic_cast (Bindable_t::GetObject (binding)); - if (dd) - return dd->SendOutboundDatagram(data, data_length, address, port); - return -1; -} - - -/********************* -evma_close_connection -*********************/ - -extern "C" void evma_close_connection (const uintptr_t binding, int after_writing) -{ - ensure_eventmachine("evma_close_connection"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - ed->ScheduleClose (after_writing ? true : false); -} - -/*********************************** -evma_report_connection_error_status -***********************************/ - -extern "C" int evma_report_connection_error_status (const uintptr_t binding) -{ - ensure_eventmachine("evma_report_connection_error_status"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->ReportErrorStatus(); - return -1; -} - -/******************** -evma_stop_tcp_server -********************/ - -extern "C" void evma_stop_tcp_server (const uintptr_t binding) -{ - ensure_eventmachine("evma_stop_tcp_server"); - AcceptorDescriptor::StopAcceptor (binding); -} - - -/***************** -evma_stop_machine -*****************/ - -extern "C" void evma_stop_machine() -{ - ensure_eventmachine("evma_stop_machine"); - EventMachine->ScheduleHalt(); -} - -/***************** -evma_stopping -*****************/ - -extern "C" bool evma_stopping() -{ - ensure_eventmachine("evma_stopping"); - return EventMachine->Stopping(); -} - -/************** -evma_start_tls -**************/ - -extern "C" void evma_start_tls (const uintptr_t binding) -{ - ensure_eventmachine("evma_start_tls"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - ed->StartTls(); -} - -/****************** -evma_set_tls_parms -******************/ - -extern "C" void evma_set_tls_parms (const uintptr_t binding, const char *privatekey_filename, const char *certchain_filename, int verify_peer, int fail_if_no_peer_cert, const char *sni_hostname, const char *cipherlist, const char *ecdh_curve, const char *dhparam, int ssl_version) -{ - ensure_eventmachine("evma_set_tls_parms"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - ed->SetTlsParms (privatekey_filename, certchain_filename, (verify_peer == 1 ? true : false), (fail_if_no_peer_cert == 1 ? true : false), sni_hostname, cipherlist, ecdh_curve, dhparam, ssl_version); -} - -/****************** -evma_get_peer_cert -******************/ - -#ifdef WITH_SSL -extern "C" X509 *evma_get_peer_cert (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_peer_cert"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->GetPeerCert(); - return NULL; -} -#endif - -/****************** -evma_get_cipher_bits -******************/ - -#ifdef WITH_SSL -extern "C" int evma_get_cipher_bits (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_cipher_bits"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->GetCipherBits(); - return -1; -} -#endif - -/****************** -evma_get_cipher_name -******************/ - -#ifdef WITH_SSL -extern "C" const char *evma_get_cipher_name (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_cipher_name"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->GetCipherName(); - return NULL; -} -#endif - -/****************** -evma_get_cipher_protocol -******************/ - -#ifdef WITH_SSL -extern "C" const char *evma_get_cipher_protocol (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_cipher_protocol"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->GetCipherProtocol(); - return NULL; -} -#endif - -/****************** -evma_get_sni_hostname -******************/ - -#ifdef WITH_SSL -extern "C" const char *evma_get_sni_hostname (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_sni_hostname"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) - return ed->GetSNIHostname(); - return NULL; -} -#endif - -/******************** -evma_accept_ssl_peer -********************/ - -#ifdef WITH_SSL -extern "C" void evma_accept_ssl_peer (const uintptr_t binding) -{ - ensure_eventmachine("evma_accept_ssl_peer"); - ConnectionDescriptor *cd = dynamic_cast (Bindable_t::GetObject (binding)); - if (cd) - cd->AcceptSslPeer(); -} -#endif - -/***************** -evma_get_peername -*****************/ - -extern "C" int evma_get_peername (const uintptr_t binding, struct sockaddr *sa, socklen_t *len) -{ - ensure_eventmachine("evma_get_peername"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) { - return ed->GetPeername (sa, len) ? 1 : 0; - } - else - return 0; -} - -/***************** -evma_get_sockname -*****************/ - -extern "C" int evma_get_sockname (const uintptr_t binding, struct sockaddr *sa, socklen_t *len) -{ - ensure_eventmachine("evma_get_sockname"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) { - return ed->GetSockname (sa, len) ? 1 : 0; - } - else - return 0; -} - -/*********************** -evma_get_subprocess_pid -***********************/ - -#ifdef OS_UNIX -extern "C" int evma_get_subprocess_pid (const uintptr_t binding, pid_t *pid) -{ - ensure_eventmachine("evma_get_subprocess_pid"); - PipeDescriptor *pd = dynamic_cast (Bindable_t::GetObject (binding)); - if (pd) { - return pd->GetSubprocessPid (pid) ? 1 : 0; - } - else if (pid && EventMachine->SubprocessPid) { - *pid = EventMachine->SubprocessPid; - return 1; - } - else - return 0; -} -#else -extern "C" int evma_get_subprocess_pid (const uintptr_t binding UNUSED, pid_t *pid UNUSED) -{ - return 0; -} -#endif - -/************************** -evma_get_subprocess_status -**************************/ - -extern "C" int evma_get_subprocess_status (const uintptr_t binding UNUSED, int *status) -{ - ensure_eventmachine("evma_get_subprocess_status"); - if (status) { - *status = EventMachine->SubprocessExitStatus; - return 1; - } - else - return 0; -} - -/************************* -evma_get_connection_count -*************************/ - -extern "C" int evma_get_connection_count() -{ - ensure_eventmachine("evma_get_connection_count"); - return EventMachine->GetConnectionCount(); -} - -/********************* -evma_signal_loopbreak -*********************/ - -extern "C" void evma_signal_loopbreak() -{ - ensure_eventmachine("evma_signal_loopbreak"); - EventMachine->SignalLoopBreaker(); -} - - - -/******************************** -evma_get_comm_inactivity_timeout -********************************/ - -extern "C" float evma_get_comm_inactivity_timeout (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_comm_inactivity_timeout"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) { - return ((float)ed->GetCommInactivityTimeout() / 1000); - } - else - return 0.0; //Perhaps this should be an exception. Access to an unknown binding. -} - -/******************************** -evma_set_comm_inactivity_timeout -********************************/ - -extern "C" int evma_set_comm_inactivity_timeout (const uintptr_t binding, float value) -{ - ensure_eventmachine("evma_set_comm_inactivity_timeout"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) { - return ed->SetCommInactivityTimeout ((uint64_t)(value * 1000)); - } - else - return 0; //Perhaps this should be an exception. Access to an unknown binding. -} - - -/******************************** -evma_get_pending_connect_timeout -********************************/ - -extern "C" float evma_get_pending_connect_timeout (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_pending_connect_timeout"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) { - return ((float)ed->GetPendingConnectTimeout() / 1000); - } - else - return 0.0; -} - - -/******************************** -evma_set_pending_connect_timeout -********************************/ - -extern "C" int evma_set_pending_connect_timeout (const uintptr_t binding, float value) -{ - ensure_eventmachine("evma_set_pending_connect_timeout"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - if (ed) { - return ed->SetPendingConnectTimeout ((uint64_t)(value * 1000)); - } - else - return 0; -} - - -/********************** -evma_set_timer_quantum -**********************/ - -extern "C" void evma_set_timer_quantum (int interval) -{ - ensure_eventmachine("evma_set_timer_quantum"); - EventMachine->SetTimerQuantum (interval); -} - - -/************************ -evma_get_max_timer_count -************************/ - -extern "C" int evma_get_max_timer_count() -{ - return EventMachine_t::GetMaxTimerCount(); -} - -/************************ -evma_set_max_timer_count -************************/ - -extern "C" void evma_set_max_timer_count (int ct) -{ - // This may only be called if the reactor is not running. - - if (EventMachine) - #ifdef BUILD_FOR_RUBY - rb_raise(rb_eRuntimeError, "eventmachine already initialized: evma_set_max_timer_count"); - #else - throw std::runtime_error ("eventmachine already initialized: evma_set_max_timer_count"); - #endif - EventMachine_t::SetMaxTimerCount (ct); -} - -/****************** -evma_get/set_simultaneous_accept_count -******************/ - -extern "C" void evma_set_simultaneous_accept_count (int count) -{ - EventMachine_t::SetSimultaneousAcceptCount(count); -} - -extern "C" int evma_get_simultaneous_accept_count() -{ - return EventMachine_t::GetSimultaneousAcceptCount(); -} - - -/****************** -evma_setuid_string -******************/ - -extern "C" void evma_setuid_string (const char *username) -{ - // We do NOT need to be running an EM instance because this method is static. - EventMachine_t::SetuidString (username); -} - - -/********** -evma_popen -**********/ - -extern "C" const uintptr_t evma_popen (char * const*cmd_strings) -{ - ensure_eventmachine("evma_popen"); - return EventMachine->Socketpair (cmd_strings); -} - - -/*************************** -evma_get_outbound_data_size -***************************/ - -extern "C" int evma_get_outbound_data_size (const uintptr_t binding) -{ - ensure_eventmachine("evma_get_outbound_data_size"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (binding)); - return ed ? ed->GetOutboundDataSize() : 0; -} - - -/************** -evma_set_epoll -**************/ - -extern "C" void evma_set_epoll (int use) -{ - if (use) - Poller = Poller_Epoll; - else - Poller = Poller_Default; -} - -/*************** -evma_set_kqueue -***************/ - -extern "C" void evma_set_kqueue (int use) -{ - if (use) - Poller = Poller_Kqueue; - else - Poller = Poller_Default; -} - - -/********************** -evma_set_rlimit_nofile -**********************/ - -extern "C" int evma_set_rlimit_nofile (int nofiles) -{ - return EventMachine_t::SetRlimitNofile (nofiles); -} - - -/********************************* -evma_send_file_data_to_connection -*********************************/ - -extern "C" int evma_send_file_data_to_connection (const uintptr_t binding, const char *filename) -{ - /* This is a sugaring over send_data_to_connection that reads a file into a - * locally-allocated buffer, and sends the file data to the remote peer. - * Return the number of bytes written to the caller. - * TODO, needs to impose a limit on the file size. This is intended only for - * small files. (I don't know, maybe 8K or less.) For larger files, use interleaved - * I/O to avoid slowing the rest of the system down. - * TODO: we should return a code rather than barf, in case of file-not-found. - * TODO, does this compile on Windows? - * TODO, given that we want this to work only with small files, how about allocating - * the buffer on the stack rather than the heap? - * - * Modified 25Jul07. This now returns -1 on file-too-large; 0 for success, and a positive - * errno in case of other errors. - * - * Contributed by Kirk Haines. - */ - - char data[32*1024]; - int r; - - ensure_eventmachine("evma_send_file_data_to_connection"); - -#if defined(OS_WIN32) - int Fd = open (filename, O_RDONLY|O_BINARY); -#else - int Fd = open (filename, O_RDONLY); -#endif - if (Fd < 0) - return errno; - // From here on, all early returns MUST close Fd. - - struct stat st; - if (fstat (Fd, &st)) { - int e = errno; - close (Fd); - return e; - } - - off_t filesize = st.st_size; - if (filesize <= 0) { - close (Fd); - return 0; - } - else if (filesize > (off_t) sizeof(data)) { - close (Fd); - return -1; - } - - r = read (Fd, data, filesize); - if (r != filesize) { - int e = errno; - close (Fd); - return e; - } - evma_send_data_to_connection (binding, data, r); - close (Fd); - - return 0; -} - - -/**************** -evma_start_proxy -*****************/ - -extern "C" void evma_start_proxy (const uintptr_t from, const uintptr_t to, const unsigned long bufsize, const unsigned long length) -{ - ensure_eventmachine("evma_start_proxy"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (from)); - if (ed) - ed->StartProxy(to, bufsize, length); -} - - -/*************** -evma_stop_proxy -****************/ - -extern "C" void evma_stop_proxy (const uintptr_t from) -{ - ensure_eventmachine("evma_stop_proxy"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (from)); - if (ed) - ed->StopProxy(); -} - -/****************** -evma_proxied_bytes -*******************/ - -extern "C" unsigned long evma_proxied_bytes (const uintptr_t from) -{ - ensure_eventmachine("evma_proxied_bytes"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (from)); - if (ed) - return ed->GetProxiedBytes(); - else - return 0; -} - - -/*************************** -evma_get_last_activity_time -****************************/ - -extern "C" uint64_t evma_get_last_activity_time(const uintptr_t from) -{ - ensure_eventmachine("evma_get_last_activity_time"); - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (from)); - if (ed) - return ed->GetLastActivity(); - else - return 0; -} - - -/*************************** -evma_get_heartbeat_interval -****************************/ - -extern "C" float evma_get_heartbeat_interval() -{ - ensure_eventmachine("evma_get_heartbeat_interval"); - return EventMachine->GetHeartbeatInterval(); -} - - -/*************************** -evma_set_heartbeat_interval -****************************/ - -extern "C" int evma_set_heartbeat_interval(float interval) -{ - ensure_eventmachine("evma_set_heartbeat_interval"); - return EventMachine->SetHeartbeatInterval(interval); -} - - -/************************** -evma_get_current_loop_time -***************************/ - -extern "C" uint64_t evma_get_current_loop_time() -{ - ensure_eventmachine("evma_get_current_loop_time"); - return EventMachine->GetCurrentLoopTime(); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ed.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ed.cpp deleted file mode 100644 index a469dff0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ed.cpp +++ /dev/null @@ -1,2096 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: ed.cpp -Date: 06Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#include "project.h" - - - -/******************** -SetSocketNonblocking -********************/ - -bool SetSocketNonblocking (SOCKET sd) -{ - #ifdef OS_UNIX - int val = fcntl (sd, F_GETFL, 0); - return (fcntl (sd, F_SETFL, val | O_NONBLOCK) != SOCKET_ERROR) ? true : false; - #endif - - #ifdef OS_WIN32 - #ifdef BUILD_FOR_RUBY - // 14Jun09 Ruby provides its own wrappers for ioctlsocket. On 1.8 this is a simple wrapper, - // however, 1.9 keeps its own state about the socket. - // NOTE: F_GETFL is not supported - return (fcntl (sd, F_SETFL, O_NONBLOCK) == 0) ? true : false; - #else - unsigned long one = 1; - return (ioctlsocket (sd, FIONBIO, &one) == 0) ? true : false; - #endif - #endif -} - -/************ -SetFdCloexec -************/ - -#ifdef OS_UNIX -bool SetFdCloexec (int fd) -{ - int flags = fcntl(fd, F_GETFD, 0); - assert (flags >= 0); - flags |= FD_CLOEXEC; - return (fcntl(fd, F_SETFD, FD_CLOEXEC) == 0) ? true : false; -} -#else -bool SetFdCloexec (int fd UNUSED) -{ - return true; -} -#endif - -/**************************************** -EventableDescriptor::EventableDescriptor -****************************************/ - -EventableDescriptor::EventableDescriptor (SOCKET sd, EventMachine_t *em): - bCloseNow (false), - bCloseAfterWriting (false), - MySocket (sd), - bAttached (false), - bWatchOnly (false), - EventCallback (NULL), - bCallbackUnbind (true), - UnbindReasonCode (0), - ProxyTarget(NULL), - ProxiedFrom(NULL), - ProxiedBytes(0), - MaxOutboundBufSize(0), - MyEventMachine (em), - PendingConnectTimeout(20000000), - InactivityTimeout (0), - NextHeartbeat (0), - bPaused (false) -{ - /* There are three ways to close a socket, all of which should - * automatically signal to the event machine that this object - * should be removed from the polling scheduler. - * First is a hard close, intended for bad errors or possible - * security violations. It immediately closes the connection - * and puts this object into an error state. - * Second is to set bCloseNow, which will cause the event machine - * to delete this object (and thus close the connection in our - * destructor) the next chance it gets. bCloseNow also inhibits - * the writing of new data on the socket (but not necessarily - * the reading of new data). - * The third way is to set bCloseAfterWriting, which inhibits - * the writing of new data and converts to bCloseNow as soon - * as everything in the outbound queue has been written. - * bCloseAfterWriting is really for use only by protocol handlers - * (for example, HTTP writes an HTML page and then closes the - * connection). All of the error states we generate internally - * cause an immediate close to be scheduled, which may have the - * effect of discarding outbound data. - */ - - if (sd == INVALID_SOCKET) - throw std::runtime_error ("bad eventable descriptor"); - if (MyEventMachine == NULL) - throw std::runtime_error ("bad em in eventable descriptor"); - CreatedAt = MyEventMachine->GetCurrentLoopTime(); - LastActivity = MyEventMachine->GetCurrentLoopTime(); - - #ifdef HAVE_EPOLL - EpollEvent.events = 0; - EpollEvent.data.ptr = this; - #endif -} - - -/***************************************** -EventableDescriptor::~EventableDescriptor -*****************************************/ - -EventableDescriptor::~EventableDescriptor() NO_EXCEPT_FALSE -{ - if (NextHeartbeat) - MyEventMachine->ClearHeartbeat(NextHeartbeat, this); - if (EventCallback && bCallbackUnbind) - (*EventCallback)(GetBinding(), EM_CONNECTION_UNBOUND, NULL, UnbindReasonCode); - if (ProxiedFrom) { - (*EventCallback)(ProxiedFrom->GetBinding(), EM_PROXY_TARGET_UNBOUND, NULL, 0); - ProxiedFrom->StopProxy(); - } - MyEventMachine->NumCloseScheduled--; - StopProxy(); - Close(); -} - - -/************************************* -EventableDescriptor::SetEventCallback -*************************************/ - -void EventableDescriptor::SetEventCallback (EMCallback cb) -{ - EventCallback = cb; -} - - -/************************** -EventableDescriptor::Close -**************************/ - -void EventableDescriptor::Close() -{ - /* EventMachine relies on the fact that when close(fd) - * is called that the fd is removed from any - * epoll event queues. - * - * However, this is not *always* the behavior of close(fd) - * - * See man 4 epoll Q6/A6 and then consider what happens - * when using pipes with eventmachine. - * (As is often done when communicating with a subprocess) - * - * The pipes end up looking like: - * - * ls -l /proc//fd - * ... - * lr-x------ 1 root root 64 2011-08-19 21:31 3 -> pipe:[940970] - * l-wx------ 1 root root 64 2011-08-19 21:31 4 -> pipe:[940970] - * - * This meets the critera from man 4 epoll Q6/A4 for not - * removing fds from epoll event queues until all fds - * that reference the underlying file have been removed. - * - * If the EventableDescriptor associated with fd 3 is deleted, - * its dtor will call EventableDescriptor::Close(), - * which will call ::close(int fd). - * - * However, unless the EventableDescriptor associated with fd 4 is - * also deleted before the next call to epoll_wait, events may fire - * for fd 3 that were registered with an already deleted - * EventableDescriptor. - * - * Therefore, it is necessary to notify EventMachine that - * the fd associated with this EventableDescriptor is - * closing. - * - * EventMachine also never closes fds for STDIN, STDOUT and - * STDERR (0, 1 & 2) - */ - - // Close the socket right now. Intended for emergencies. - if (MySocket != INVALID_SOCKET) { - MyEventMachine->Deregister (this); - - // Do not close STDIN, STDOUT, STDERR - if (MySocket > 2 && !bAttached) { - shutdown (MySocket, 1); - close (MySocket); - } - - MySocket = INVALID_SOCKET; - } -} - - -/********************************* -EventableDescriptor::ShouldDelete -*********************************/ - -bool EventableDescriptor::ShouldDelete() -{ - /* For use by a socket manager, which needs to know if this object - * should be removed from scheduling events and deleted. - * Has an immediate close been scheduled, or are we already closed? - * If either of these are the case, return true. In theory, the manager will - * then delete us, which in turn will make sure the socket is closed. - * Note, if bCloseAfterWriting is true, we check a virtual method to see - * if there is outbound data to write, and only request a close if there is none. - */ - - return ((MySocket == INVALID_SOCKET) || bCloseNow || (bCloseAfterWriting && (GetOutboundDataSize() <= 0))); -} - - -/********************************** -EventableDescriptor::ScheduleClose -**********************************/ - -void EventableDescriptor::ScheduleClose (bool after_writing) -{ - if (IsCloseScheduled()) { - if (!after_writing) { - // If closing has become more urgent, then upgrade the scheduled - // after_writing close to one NOW. - bCloseNow = true; - } - return; - } - MyEventMachine->NumCloseScheduled++; - // KEEP THIS SYNCHRONIZED WITH ::IsCloseScheduled. - if (after_writing) - bCloseAfterWriting = true; - else - bCloseNow = true; -} - - -/************************************* -EventableDescriptor::IsCloseScheduled -*************************************/ - -bool EventableDescriptor::IsCloseScheduled() -{ - // KEEP THIS SYNCHRONIZED WITH ::ScheduleClose. - return (bCloseNow || bCloseAfterWriting); -} - - -/******************************* -EventableDescriptor::StartProxy -*******************************/ - -void EventableDescriptor::StartProxy(const uintptr_t to, const unsigned long bufsize, const unsigned long length) -{ - EventableDescriptor *ed = dynamic_cast (Bindable_t::GetObject (to)); - if (ed) { - StopProxy(); - ProxyTarget = ed; - BytesToProxy = length; - ProxiedBytes = 0; - ed->SetProxiedFrom(this, bufsize); - return; - } - throw std::runtime_error ("Tried to proxy to an invalid descriptor"); -} - - -/****************************** -EventableDescriptor::StopProxy -******************************/ - -void EventableDescriptor::StopProxy() -{ - if (ProxyTarget) { - ProxyTarget->SetProxiedFrom(NULL, 0); - ProxyTarget = NULL; - } -} - - -/*********************************** -EventableDescriptor::SetProxiedFrom -***********************************/ - -void EventableDescriptor::SetProxiedFrom(EventableDescriptor *from, const unsigned long bufsize) -{ - if (from != NULL && ProxiedFrom != NULL) - throw std::runtime_error ("Tried to proxy to a busy target"); - - ProxiedFrom = from; - MaxOutboundBufSize = bufsize; -} - - -/******************************************** -EventableDescriptor::_GenericInboundDispatch -********************************************/ - -void EventableDescriptor::_GenericInboundDispatch(const char *buf, unsigned long size) -{ - assert(EventCallback); - - if (ProxyTarget) { - if (BytesToProxy > 0) { - unsigned long proxied = std::min(BytesToProxy, size); - ProxyTarget->SendOutboundData(buf, proxied); - ProxiedBytes += (unsigned long) proxied; - BytesToProxy -= proxied; - if (BytesToProxy == 0) { - StopProxy(); - (*EventCallback)(GetBinding(), EM_PROXY_COMPLETED, NULL, 0); - if (proxied < size) { - (*EventCallback)(GetBinding(), EM_CONNECTION_READ, buf + proxied, size - proxied); - } - } - } else { - ProxyTarget->SendOutboundData(buf, size); - ProxiedBytes += size; - } - } else { - (*EventCallback)(GetBinding(), EM_CONNECTION_READ, buf, size); - } -} - - -/********************************* -EventableDescriptor::_GenericGetPeername -*********************************/ - -bool EventableDescriptor::_GenericGetPeername (struct sockaddr *s, socklen_t *len) -{ - if (!s) - return false; - - int gp = getpeername (GetSocket(), s, len); - if (gp == -1) { - char buf[200]; - snprintf (buf, sizeof(buf)-1, "unable to get peer name: %s", strerror(errno)); - throw std::runtime_error (buf); - } - - return true; -} - -/********************************* -EventableDescriptor::_GenericGetSockname -*********************************/ - -bool EventableDescriptor::_GenericGetSockname (struct sockaddr *s, socklen_t *len) -{ - if (!s) - return false; - - int gp = getsockname (GetSocket(), s, len); - if (gp == -1) { - char buf[200]; - snprintf (buf, sizeof(buf)-1, "unable to get sock name: %s", strerror(errno)); - throw std::runtime_error (buf); - } - - return true; -} - - -/********************************************* -EventableDescriptor::GetPendingConnectTimeout -*********************************************/ - -uint64_t EventableDescriptor::GetPendingConnectTimeout() -{ - return PendingConnectTimeout / 1000; -} - - -/********************************************* -EventableDescriptor::SetPendingConnectTimeout -*********************************************/ - -int EventableDescriptor::SetPendingConnectTimeout (uint64_t value) -{ - if (value > 0) { - PendingConnectTimeout = value * 1000; - MyEventMachine->QueueHeartbeat(this); - return 1; - } - return 0; -} - - -/************************************* -EventableDescriptor::GetNextHeartbeat -*************************************/ - -uint64_t EventableDescriptor::GetNextHeartbeat() -{ - if (NextHeartbeat) - MyEventMachine->ClearHeartbeat(NextHeartbeat, this); - - NextHeartbeat = 0; - - if (!ShouldDelete()) { - uint64_t time_til_next = InactivityTimeout; - if (IsConnectPending()) { - if (time_til_next == 0 || PendingConnectTimeout < time_til_next) - time_til_next = PendingConnectTimeout; - } - if (time_til_next == 0) - return 0; - NextHeartbeat = time_til_next + MyEventMachine->GetRealTime(); - } - - return NextHeartbeat; -} - - -/****************************************** -ConnectionDescriptor::ConnectionDescriptor -******************************************/ - -ConnectionDescriptor::ConnectionDescriptor (SOCKET sd, EventMachine_t *em): - EventableDescriptor (sd, em), - bConnectPending (false), - bNotifyReadable (false), - bNotifyWritable (false), - bReadAttemptedAfterClose (false), - bWriteAttemptedAfterClose (false), - OutboundDataSize (0), - #ifdef WITH_SSL - SslBox (NULL), - bHandshakeSignaled (false), - bSslVerifyPeer (false), - bSslPeerAccepted(false), - #endif - #ifdef HAVE_KQUEUE - bGotExtraKqueueEvent(false), - #endif - bIsServer (false) -{ - // 22Jan09: Moved ArmKqueueWriter into SetConnectPending() to fix assertion failure in _WriteOutboundData() - // 5May09: Moved EPOLLOUT into SetConnectPending() so it doesn't happen for attached read pipes -} - - -/******************************************* -ConnectionDescriptor::~ConnectionDescriptor -*******************************************/ - -ConnectionDescriptor::~ConnectionDescriptor() -{ - // Run down any stranded outbound data. - for (size_t i=0; i < OutboundPages.size(); i++) - OutboundPages[i].Free(); - - #ifdef WITH_SSL - if (SslBox) - delete SslBox; - #endif -} - - -/*********************************** -ConnectionDescriptor::_UpdateEvents -************************************/ - -void ConnectionDescriptor::_UpdateEvents() -{ - _UpdateEvents(true, true); -} - -void ConnectionDescriptor::_UpdateEvents(bool read, bool write) -{ - if (MySocket == INVALID_SOCKET) - return; - - if (!read && !write) - return; - - #ifdef HAVE_EPOLL - unsigned int old = EpollEvent.events; - - if (read) { - if (SelectForRead()) - EpollEvent.events |= EPOLLIN; - else - EpollEvent.events &= ~EPOLLIN; - } - - if (write) { - if (SelectForWrite()) - EpollEvent.events |= EPOLLOUT; - else - EpollEvent.events &= ~EPOLLOUT; - } - - if (old != EpollEvent.events) - MyEventMachine->Modify (this); - #endif - - #ifdef HAVE_KQUEUE - if (read && SelectForRead()) - MyEventMachine->ArmKqueueReader (this); - bKqueueArmWrite = SelectForWrite(); - if (write && bKqueueArmWrite) - MyEventMachine->Modify (this); - #endif -} - -/*************************************** -ConnectionDescriptor::SetConnectPending -****************************************/ - -void ConnectionDescriptor::SetConnectPending(bool f) -{ - bConnectPending = f; - MyEventMachine->QueueHeartbeat(this); - _UpdateEvents(); -} - - -/********************************** -ConnectionDescriptor::SetAttached -***********************************/ - -void ConnectionDescriptor::SetAttached(bool state) -{ - bAttached = state; -} - - -/********************************** -ConnectionDescriptor::SetWatchOnly -***********************************/ - -void ConnectionDescriptor::SetWatchOnly(bool watching) -{ - bWatchOnly = watching; - _UpdateEvents(); -} - - -/********************************* -ConnectionDescriptor::HandleError -*********************************/ - -void ConnectionDescriptor::HandleError() -{ - if (bWatchOnly) { - // An EPOLLHUP | EPOLLIN condition will call Read() before HandleError(), in which case the - // socket is already detached and invalid, so we don't need to do anything. - if (MySocket == INVALID_SOCKET) return; - - // HandleError() is called on WatchOnly descriptors by the epoll reactor - // when it gets a EPOLLERR | EPOLLHUP. Usually this would show up as a readable and - // writable event on other reactors, so we have to fire those events ourselves. - if (bNotifyReadable) Read(); - if (bNotifyWritable) Write(); - } else { - ScheduleClose (false); - } -} - - -/*********************************** -ConnectionDescriptor::ScheduleClose -***********************************/ - -void ConnectionDescriptor::ScheduleClose (bool after_writing) -{ - if (bWatchOnly) - throw std::runtime_error ("cannot close 'watch only' connections"); - - EventableDescriptor::ScheduleClose(after_writing); -} - - -/*************************************** -ConnectionDescriptor::SetNotifyReadable -****************************************/ - -void ConnectionDescriptor::SetNotifyReadable(bool readable) -{ - if (!bWatchOnly) - throw std::runtime_error ("notify_readable must be on 'watch only' connections"); - - bNotifyReadable = readable; - _UpdateEvents(true, false); -} - - -/*************************************** -ConnectionDescriptor::SetNotifyWritable -****************************************/ - -void ConnectionDescriptor::SetNotifyWritable(bool writable) -{ - if (!bWatchOnly) - throw std::runtime_error ("notify_writable must be on 'watch only' connections"); - - bNotifyWritable = writable; - _UpdateEvents(false, true); -} - - -/************************************** -ConnectionDescriptor::SendOutboundData -**************************************/ - -int ConnectionDescriptor::SendOutboundData (const char *data, unsigned long length) -{ - if (bWatchOnly) - throw std::runtime_error ("cannot send data on a 'watch only' connection"); - - if (ProxiedFrom && MaxOutboundBufSize && (unsigned int)(GetOutboundDataSize() + length) > MaxOutboundBufSize) - ProxiedFrom->Pause(); - - #ifdef WITH_SSL - if (SslBox) { - if (length > 0) { - unsigned long writed = 0; - char *p = (char*)data; - - while (writed < length) { - int to_write = SSLBOX_INPUT_CHUNKSIZE; - int remaining = length - writed; - - if (remaining < SSLBOX_INPUT_CHUNKSIZE) - to_write = remaining; - - int w = SslBox->PutPlaintext (p, to_write); - if (w < 0) { - ScheduleClose (false); - }else - _DispatchCiphertext(); - - p += to_write; - writed += to_write; - } - } - // TODO: What's the correct return value? - return 1; // That's a wild guess, almost certainly wrong. - } - else - #endif - return _SendRawOutboundData (data, length); -} - - - -/****************************************** -ConnectionDescriptor::_SendRawOutboundData -******************************************/ - -int ConnectionDescriptor::_SendRawOutboundData (const char *data, unsigned long length) -{ - /* This internal method is called to schedule bytes that - * will be sent out to the remote peer. - * It's not directly accessed by the caller, who hits ::SendOutboundData, - * which may or may not filter or encrypt the caller's data before - * sending it here. - */ - - // Highly naive and incomplete implementation. - // There's no throttle for runaways (which should abort only this connection - // and not the whole process), and no coalescing of small pages. - // (Well, not so bad, small pages are coalesced in ::Write) - - if (IsCloseScheduled()) - return 0; - // 25Mar10: Ignore 0 length packets as they are not meaningful in TCP (as opposed to UDP) - // and can cause the assert(nbytes>0) to fail when OutboundPages has a bunch of 0 length pages. - if (length == 0) - return 0; - - if (!data && (length > 0)) - throw std::runtime_error ("bad outbound data"); - char *buffer = (char *) malloc (length + 1); - if (!buffer) - throw std::runtime_error ("no allocation for outbound data"); - - memcpy (buffer, data, length); - buffer [length] = 0; - OutboundPages.push_back (OutboundPage (buffer, length)); - OutboundDataSize += length; - - _UpdateEvents(false, true); - - return length; -} - - - -/*********************************** -ConnectionDescriptor::SelectForRead -***********************************/ - -bool ConnectionDescriptor::SelectForRead() -{ - /* A connection descriptor is always scheduled for read, - * UNLESS it's in a pending-connect state. - * On Linux, unlike Unix, a nonblocking socket on which - * connect has been called, does NOT necessarily select - * both readable and writable in case of error. - * The socket will select writable when the disposition - * of the connect is known. On the other hand, a socket - * which successfully connects and selects writable may - * indeed have some data available on it, so it will - * select readable in that case, violating expectations! - * So we will not poll for readability until the socket - * is known to be in a connected state. - */ - - if (bPaused) - return false; - else if (bConnectPending) - return false; - else if (bWatchOnly) - return bNotifyReadable ? true : false; - else - return true; -} - - -/************************************ -ConnectionDescriptor::SelectForWrite -************************************/ - -bool ConnectionDescriptor::SelectForWrite() -{ - /* Cf the notes under SelectForRead. - * In a pending-connect state, we ALWAYS select for writable. - * In a normal state, we only select for writable when we - * have outgoing data to send. - */ - - if (bPaused) - return false; - else if (bConnectPending) - return true; - else if (bWatchOnly) - return bNotifyWritable ? true : false; - else - return (GetOutboundDataSize() > 0); -} - -/*************************** -ConnectionDescriptor::Pause -***************************/ - -bool ConnectionDescriptor::Pause() -{ - if (bWatchOnly) - throw std::runtime_error ("cannot pause/resume 'watch only' connections, set notify readable/writable instead"); - - bool old = bPaused; - bPaused = true; - _UpdateEvents(); - return old == false; -} - -/**************************** -ConnectionDescriptor::Resume -****************************/ - -bool ConnectionDescriptor::Resume() -{ - if (bWatchOnly) - throw std::runtime_error ("cannot pause/resume 'watch only' connections, set notify readable/writable instead"); - - bool old = bPaused; - bPaused = false; - _UpdateEvents(); - return old == true; -} - -/************************** -ConnectionDescriptor::Read -**************************/ - -void ConnectionDescriptor::Read() -{ - /* Read and dispatch data on a socket that has selected readable. - * It's theoretically possible to get and dispatch incoming data on - * a socket that has already been scheduled for closing or close-after-writing. - * In those cases, we'll leave it up the to protocol handler to "do the - * right thing" (which probably means to ignore the incoming data). - * - * 22Aug06: Chris Ochs reports that on FreeBSD, it's possible to come - * here with the socket already closed, after the process receives - * a ctrl-C signal (not sure if that's TERM or INT on BSD). The application - * was one in which network connections were doing a lot of interleaved reads - * and writes. - * Since we always write before reading (in order to keep the outbound queues - * as light as possible), I think what happened is that an interrupt caused - * the socket to be closed in ConnectionDescriptor::Write. We'll then - * come here in the same pass through the main event loop, and won't get - * cleaned up until immediately after. - * We originally asserted that the socket was valid when we got here. - * To deal properly with the possibility that we are closed when we get here, - * I removed the assert. HOWEVER, the potential for an infinite loop scares me, - * so even though this is really clunky, I added a flag to assert that we never - * come here more than once after being closed. (FCianfrocca) - */ - - SOCKET sd = GetSocket(); - //assert (sd != INVALID_SOCKET); (original, removed 22Aug06) - if (sd == INVALID_SOCKET) { - assert (!bReadAttemptedAfterClose); - bReadAttemptedAfterClose = true; - return; - } - - if (bWatchOnly) { - if (bNotifyReadable && EventCallback) - (*EventCallback)(GetBinding(), EM_CONNECTION_NOTIFY_READABLE, NULL, 0); - return; - } - - LastActivity = MyEventMachine->GetCurrentLoopTime(); - - int total_bytes_read = 0; - char readbuffer [16 * 1024 + 1]; - - for (int i=0; i < 10; i++) { - // Don't read just one buffer and then move on. This is faster - // if there is a lot of incoming. - // But don't read indefinitely. Give other sockets a chance to run. - // NOTICE, we're reading one less than the buffer size. - // That's so we can put a guard byte at the end of what we send - // to user code. - - - int r = read (sd, readbuffer, sizeof(readbuffer) - 1); -#ifdef OS_WIN32 - int e = WSAGetLastError(); -#else - int e = errno; -#endif - //cerr << ""; - - if (r > 0) { - total_bytes_read += r; - - // Add a null-terminator at the the end of the buffer - // that we will send to the callback. - // DO NOT EVER CHANGE THIS. We want to explicitly allow users - // to be able to depend on this behavior, so they will have - // the option to do some things faster. Additionally it's - // a security guard against buffer overflows. - readbuffer [r] = 0; - _DispatchInboundData (readbuffer, r); - if (bPaused) - break; - } - else if (r == 0) { - break; - } - else { - #ifdef OS_UNIX - if ((e != EINPROGRESS) && (e != EWOULDBLOCK) && (e != EAGAIN) && (e != EINTR)) { - #endif - #ifdef OS_WIN32 - if ((e != WSAEINPROGRESS) && (e != WSAEWOULDBLOCK)) { - #endif - // 26Mar11: Previously, all read errors were assumed to be EWOULDBLOCK and ignored. - // Now, instead, we call Close() on errors like ECONNRESET and ENOTCONN. - UnbindReasonCode = e; - Close(); - break; - } else { - // Basically a would-block, meaning we've read everything there is to read. - break; - } - } - - } - - - if (total_bytes_read == 0) { - // If we read no data on a socket that selected readable, - // it generally means the other end closed the connection gracefully. - ScheduleClose (false); - //bCloseNow = true; - } - -} - - - -/****************************************** -ConnectionDescriptor::_DispatchInboundData -******************************************/ - -#ifdef WITH_SSL -void ConnectionDescriptor::_DispatchInboundData (const char *buffer, unsigned long size) -{ - if (SslBox) { - SslBox->PutCiphertext (buffer, size); - - int s; - char B [2048]; - while ((s = SslBox->GetPlaintext (B, sizeof(B) - 1)) > 0) { - _CheckHandshakeStatus(); - B [s] = 0; - _GenericInboundDispatch(B, s); - } - - // If our SSL handshake had a problem, shut down the connection. - if (s == -2) { - #ifndef EPROTO // OpenBSD does not have EPROTO - #define EPROTO EINTR - #endif - #ifdef OS_UNIX - UnbindReasonCode = EPROTO; - #endif - #ifdef OS_WIN32 - UnbindReasonCode = WSAECONNABORTED; - #endif - ScheduleClose(false); - return; - } - - _CheckHandshakeStatus(); - _DispatchCiphertext(); - } - else { - _GenericInboundDispatch(buffer, size); - } -} -#else -void ConnectionDescriptor::_DispatchInboundData (const char *buffer, unsigned long size) -{ - _GenericInboundDispatch(buffer, size); -} -#endif - - - -/******************************************* -ConnectionDescriptor::_CheckHandshakeStatus -*******************************************/ - -void ConnectionDescriptor::_CheckHandshakeStatus() -{ - #ifdef WITH_SSL - if (SslBox && (!bHandshakeSignaled) && SslBox->IsHandshakeCompleted()) { - bHandshakeSignaled = true; - if (EventCallback) - (*EventCallback)(GetBinding(), EM_SSL_HANDSHAKE_COMPLETED, NULL, 0); - } - #endif -} - - - -/*************************** -ConnectionDescriptor::Write -***************************/ - -void ConnectionDescriptor::Write() -{ - /* A socket which is in a pending-connect state will select - * writable when the disposition of the connect is known. - * At that point, check to be sure there are no errors, - * and if none, then promote the socket out of the pending - * state. - * TODO: I haven't figured out how Windows signals errors on - * unconnected sockets. Maybe it does the untraditional but - * logical thing and makes the socket selectable for error. - * If so, it's unsupported here for the time being, and connect - * errors will have to be caught by the timeout mechanism. - */ - - if (bConnectPending) { - int error; - socklen_t len; - len = sizeof(error); - #ifdef OS_UNIX - int o = getsockopt (GetSocket(), SOL_SOCKET, SO_ERROR, &error, &len); - #endif - #ifdef OS_WIN32 - int o = getsockopt (GetSocket(), SOL_SOCKET, SO_ERROR, (char*)&error, &len); - #endif - if ((o == 0) && (error == 0)) { - if (EventCallback) - (*EventCallback)(GetBinding(), EM_CONNECTION_COMPLETED, "", 0); - - // 5May09: Moved epoll/kqueue read/write arming into SetConnectPending, so it can be called - // from EventMachine_t::AttachFD as well. - SetConnectPending (false); - } - else { - if (o == 0) - UnbindReasonCode = error; - ScheduleClose (false); - //bCloseNow = true; - } - } - else { - - if (bNotifyWritable) { - if (EventCallback) - (*EventCallback)(GetBinding(), EM_CONNECTION_NOTIFY_WRITABLE, NULL, 0); - - _UpdateEvents(false, true); - return; - } - - assert(!bWatchOnly); - - /* 5May09: Kqueue bugs on OSX cause one extra writable event to fire even though we're using - EV_ONESHOT. We ignore this extra event once, but only the first time. If it happens again, - we should fall through to the assert(nbytes>0) failure to catch any EM bugs which might cause - ::Write to be called in a busy-loop. - */ - #ifdef HAVE_KQUEUE - if (MyEventMachine->GetPoller() == Poller_Kqueue) { - if (OutboundDataSize == 0 && !bGotExtraKqueueEvent) { - bGotExtraKqueueEvent = true; - return; - } else if (OutboundDataSize > 0) { - bGotExtraKqueueEvent = false; - } - } - #endif - - _WriteOutboundData(); - } -} - - -/**************************************** -ConnectionDescriptor::_WriteOutboundData -****************************************/ - -void ConnectionDescriptor::_WriteOutboundData() -{ - /* This is a helper function called by ::Write. - * It's possible for a socket to select writable and then no longer - * be writable by the time we get around to writing. The kernel might - * have used up its available output buffers between the select call - * and when we get here. So this condition is not an error. - * - * 20Jul07, added the same kind of protection against an invalid socket - * that is at the top of ::Read. Not entirely how this could happen in - * real life (connection-reset from the remote peer, perhaps?), but I'm - * doing it to address some reports of crashing under heavy loads. - */ - - SOCKET sd = GetSocket(); - //assert (sd != INVALID_SOCKET); - if (sd == INVALID_SOCKET) { - assert (!bWriteAttemptedAfterClose); - bWriteAttemptedAfterClose = true; - return; - } - - LastActivity = MyEventMachine->GetCurrentLoopTime(); - size_t nbytes = 0; - - #ifdef HAVE_WRITEV - int iovcnt = OutboundPages.size(); - // Max of 16 outbound pages at a time - if (iovcnt > 16) iovcnt = 16; - - iovec iov[16]; - - for(int i = 0; i < iovcnt; i++){ - OutboundPage *op = &(OutboundPages[i]); - #ifdef CC_SUNWspro - // TODO: The void * cast works fine on Solaris 11, but - // I don't know at what point that changed from older Solaris. - iov[i].iov_base = (char *)(op->Buffer + op->Offset); - #else - iov[i].iov_base = (void *)(op->Buffer + op->Offset); - #endif - iov[i].iov_len = op->Length - op->Offset; - - nbytes += iov[i].iov_len; - } - #else - char output_buffer [16 * 1024]; - - while ((OutboundPages.size() > 0) && (nbytes < sizeof(output_buffer))) { - OutboundPage *op = &(OutboundPages[0]); - if ((nbytes + op->Length - op->Offset) < sizeof (output_buffer)) { - memcpy (output_buffer + nbytes, op->Buffer + op->Offset, op->Length - op->Offset); - nbytes += (op->Length - op->Offset); - op->Free(); - OutboundPages.pop_front(); - } - else { - int len = sizeof(output_buffer) - nbytes; - memcpy (output_buffer + nbytes, op->Buffer + op->Offset, len); - op->Offset += len; - nbytes += len; - } - } - #endif - - // We should never have gotten here if there were no data to write, - // so assert that as a sanity check. - // Don't bother to make sure nbytes is less than output_buffer because - // if it were we probably would have crashed already. - assert (nbytes > 0); - - assert (GetSocket() != INVALID_SOCKET); - #ifdef HAVE_WRITEV - int bytes_written = writev (GetSocket(), iov, iovcnt); - #else - int bytes_written = write (GetSocket(), output_buffer, nbytes); - #endif - - bool err = false; -#ifdef OS_WIN32 - int e = WSAGetLastError(); -#else - int e = errno; -#endif - if (bytes_written < 0) { - err = true; - bytes_written = 0; - } - - assert (bytes_written >= 0); - OutboundDataSize -= bytes_written; - - if (ProxiedFrom && MaxOutboundBufSize && (unsigned int)GetOutboundDataSize() < MaxOutboundBufSize && ProxiedFrom->IsPaused()) - ProxiedFrom->Resume(); - - #ifdef HAVE_WRITEV - if (!err) { - unsigned int sent = bytes_written; - std::deque::iterator op = OutboundPages.begin(); - - for (int i = 0; i < iovcnt; i++) { - if (iov[i].iov_len <= sent) { - // Sent this page in full, free it. - op->Free(); - OutboundPages.pop_front(); - - sent -= iov[i].iov_len; - } else { - // Sent part (or none) of this page, increment offset to send the remainder - op->Offset += sent; - break; - } - - // Shouldn't be possible run out of pages before the loop ends - assert(op != OutboundPages.end()); - *op++; - } - } - #else - if ((size_t)bytes_written < nbytes) { - int len = nbytes - bytes_written; - char *buffer = (char*) malloc (len + 1); - if (!buffer) - throw std::runtime_error ("bad alloc throwing back data"); - memcpy (buffer, output_buffer + bytes_written, len); - buffer [len] = 0; - OutboundPages.push_front (OutboundPage (buffer, len)); - } - #endif - - _UpdateEvents(false, true); - - if (err) { - #ifdef OS_UNIX - if ((e != EINPROGRESS) && (e != EWOULDBLOCK) && (e != EINTR)) { - #endif - #ifdef OS_WIN32 - if ((e != WSAEINPROGRESS) && (e != WSAEWOULDBLOCK)) { - #endif - UnbindReasonCode = e; - Close(); - } - } -} - - -/*************************************** -ConnectionDescriptor::ReportErrorStatus -***************************************/ - -int ConnectionDescriptor::ReportErrorStatus() -{ - if (MySocket == INVALID_SOCKET) { - return -1; - } - - int error; - socklen_t len; - len = sizeof(error); - #ifdef OS_UNIX - int o = getsockopt (GetSocket(), SOL_SOCKET, SO_ERROR, &error, &len); - #endif - #ifdef OS_WIN32 - int o = getsockopt (GetSocket(), SOL_SOCKET, SO_ERROR, (char*)&error, &len); - #endif - if ((o == 0) && (error == 0)) - return 0; - else if (o == 0) - return error; - else - return -1; -} - - -/****************************** -ConnectionDescriptor::StartTls -******************************/ - -#ifdef WITH_SSL -void ConnectionDescriptor::StartTls() -{ - if (SslBox) - throw std::runtime_error ("SSL/TLS already running on connection"); - - SslBox = new SslBox_t (bIsServer, PrivateKeyFilename, CertChainFilename, bSslVerifyPeer, bSslFailIfNoPeerCert, SniHostName, CipherList, EcdhCurve, DhParam, Protocols, GetBinding()); - _DispatchCiphertext(); - -} -#else -void ConnectionDescriptor::StartTls() -{ - throw std::runtime_error ("Encryption not available on this event-machine"); -} -#endif - - -/********************************* -ConnectionDescriptor::SetTlsParms -*********************************/ - -#ifdef WITH_SSL -void ConnectionDescriptor::SetTlsParms (const char *privkey_filename, const char *certchain_filename, bool verify_peer, bool fail_if_no_peer_cert, const char *sni_hostname, const char *cipherlist, const char *ecdh_curve, const char *dhparam, int protocols) -{ - if (SslBox) - throw std::runtime_error ("call SetTlsParms before calling StartTls"); - if (privkey_filename && *privkey_filename) - PrivateKeyFilename = privkey_filename; - if (certchain_filename && *certchain_filename) - CertChainFilename = certchain_filename; - bSslVerifyPeer = verify_peer; - bSslFailIfNoPeerCert = fail_if_no_peer_cert; - - if (sni_hostname && *sni_hostname) - SniHostName = sni_hostname; - if (cipherlist && *cipherlist) - CipherList = cipherlist; - if (ecdh_curve && *ecdh_curve) - EcdhCurve = ecdh_curve; - if (dhparam && *dhparam) - DhParam = dhparam; - - Protocols = protocols; -} -#else -void ConnectionDescriptor::SetTlsParms (const char *privkey_filename UNUSED, const char *certchain_filename UNUSED, bool verify_peer UNUSED, bool fail_if_no_peer_cert UNUSED, const char *sni_hostname UNUSED, const char *cipherlist UNUSED, const char *ecdh_curve UNUSED, const char *dhparam UNUSED, int protocols UNUSED) -{ - throw std::runtime_error ("Encryption not available on this event-machine"); -} -#endif - - -/********************************* -ConnectionDescriptor::GetPeerCert -*********************************/ - -#ifdef WITH_SSL -X509 *ConnectionDescriptor::GetPeerCert() -{ - if (!SslBox) - throw std::runtime_error ("SSL/TLS not running on this connection"); - return SslBox->GetPeerCert(); -} -#endif - - -/********************************* -ConnectionDescriptor::GetCipherBits -*********************************/ - -#ifdef WITH_SSL -int ConnectionDescriptor::GetCipherBits() -{ - if (!SslBox) - throw std::runtime_error ("SSL/TLS not running on this connection"); - return SslBox->GetCipherBits(); -} -#endif - - -/********************************* -ConnectionDescriptor::GetCipherName -*********************************/ - -#ifdef WITH_SSL -const char *ConnectionDescriptor::GetCipherName() -{ - if (!SslBox) - throw std::runtime_error ("SSL/TLS not running on this connection"); - return SslBox->GetCipherName(); -} -#endif - - -/********************************* -ConnectionDescriptor::GetCipherProtocol -*********************************/ - -#ifdef WITH_SSL -const char *ConnectionDescriptor::GetCipherProtocol() -{ - if (!SslBox) - throw std::runtime_error ("SSL/TLS not running on this connection"); - return SslBox->GetCipherProtocol(); -} -#endif - - -/********************************* -ConnectionDescriptor::GetSNIHostname -*********************************/ - -#ifdef WITH_SSL -const char *ConnectionDescriptor::GetSNIHostname() -{ - if (!SslBox) - throw std::runtime_error ("SSL/TLS not running on this connection"); - return SslBox->GetSNIHostname(); -} -#endif - - -/*********************************** -ConnectionDescriptor::VerifySslPeer -***********************************/ - -#ifdef WITH_SSL -bool ConnectionDescriptor::VerifySslPeer(const char *cert) -{ - bSslPeerAccepted = false; - - if (EventCallback) - (*EventCallback)(GetBinding(), EM_SSL_VERIFY, cert, strlen(cert)); - - return bSslPeerAccepted; -} -#endif - - -/*********************************** -ConnectionDescriptor::AcceptSslPeer -***********************************/ - -#ifdef WITH_SSL -void ConnectionDescriptor::AcceptSslPeer() -{ - bSslPeerAccepted = true; -} -#endif - - -/***************************************** -ConnectionDescriptor::_DispatchCiphertext -*****************************************/ - -#ifdef WITH_SSL -void ConnectionDescriptor::_DispatchCiphertext() -{ - assert (SslBox); - - - char BigBuf [SSLBOX_OUTPUT_CHUNKSIZE]; - bool did_work; - - do { - did_work = false; - - // try to drain ciphertext - while (SslBox->CanGetCiphertext()) { - int r = SslBox->GetCiphertext (BigBuf, sizeof(BigBuf)); - assert (r > 0); - _SendRawOutboundData (BigBuf, r); - did_work = true; - } - - // Pump the SslBox, in case it has queued outgoing plaintext - // This will return >0 if data was written, - // 0 if no data was written, and <0 if there was a fatal error. - bool pump; - do { - pump = false; - int w = SslBox->PutPlaintext (NULL, 0); - if (w > 0) { - did_work = true; - pump = true; - } - else if (w < 0) - ScheduleClose (false); - } while (pump); - - // try to put plaintext. INCOMPLETE, doesn't belong here? - // In SendOutboundData, we're spooling plaintext directly - // into SslBox. That may be wrong, we may need to buffer it - // up here! - /* - const char *ptr; - int ptr_length; - while (OutboundPlaintext.GetPage (&ptr, &ptr_length)) { - assert (ptr && (ptr_length > 0)); - int w = SslMachine.PutPlaintext (ptr, ptr_length); - if (w > 0) { - OutboundPlaintext.DiscardBytes (w); - did_work = true; - } - else - break; - } - */ - - } while (did_work); - -} -#endif - - - -/******************************* -ConnectionDescriptor::Heartbeat -*******************************/ - -void ConnectionDescriptor::Heartbeat() -{ - /* Only allow a certain amount of time to go by while waiting - * for a pending connect. If it expires, then kill the socket. - * For a connected socket, close it if its inactivity timer - * has expired. - */ - - if (bConnectPending) { - if ((MyEventMachine->GetCurrentLoopTime() - CreatedAt) >= PendingConnectTimeout) { - UnbindReasonCode = ETIMEDOUT; - ScheduleClose (false); - //bCloseNow = true; - } - } - else { - if (InactivityTimeout && ((MyEventMachine->GetCurrentLoopTime() - LastActivity) >= InactivityTimeout)) { - UnbindReasonCode = ETIMEDOUT; - ScheduleClose (false); - //bCloseNow = true; - } - } -} - - -/**************************************** -LoopbreakDescriptor::LoopbreakDescriptor -****************************************/ - -LoopbreakDescriptor::LoopbreakDescriptor (SOCKET sd, EventMachine_t *parent_em): - EventableDescriptor (sd, parent_em) -{ - /* This is really bad and ugly. Change someday if possible. - * We have to know about an event-machine (probably the one that owns us), - * so we can pass newly-created connections to it. - */ - - bCallbackUnbind = false; - - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - #endif - #ifdef HAVE_KQUEUE - MyEventMachine->ArmKqueueReader (this); - #endif -} - - - - -/************************* -LoopbreakDescriptor::Read -*************************/ - -void LoopbreakDescriptor::Read() -{ - // TODO, refactor, this code is probably in the wrong place. - assert (MyEventMachine); - MyEventMachine->_ReadLoopBreaker(); -} - - -/************************** -LoopbreakDescriptor::Write -**************************/ - -void LoopbreakDescriptor::Write() -{ - // Why are we here? - throw std::runtime_error ("bad code path in loopbreak"); -} - -/************************************** -AcceptorDescriptor::AcceptorDescriptor -**************************************/ - -AcceptorDescriptor::AcceptorDescriptor (SOCKET sd, EventMachine_t *parent_em): - EventableDescriptor (sd, parent_em) -{ - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - #endif - #ifdef HAVE_KQUEUE - MyEventMachine->ArmKqueueReader (this); - #endif -} - - -/*************************************** -AcceptorDescriptor::~AcceptorDescriptor -***************************************/ - -AcceptorDescriptor::~AcceptorDescriptor() -{ -} - -/**************************************** -STATIC: AcceptorDescriptor::StopAcceptor -****************************************/ - -void AcceptorDescriptor::StopAcceptor (const uintptr_t binding) -{ - // TODO: This is something of a hack, or at least it's a static method of the wrong class. - AcceptorDescriptor *ad = dynamic_cast (Bindable_t::GetObject (binding)); - if (ad) - ad->ScheduleClose (false); - else - throw std::runtime_error ("failed to close nonexistent acceptor"); -} - - -/************************ -AcceptorDescriptor::Read -************************/ - -void AcceptorDescriptor::Read() -{ - /* Accept up to a certain number of sockets on the listening connection. - * Don't try to accept all that are present, because this would allow a DoS attack - * in which no data were ever read or written. We should accept more than one, - * if available, to keep the partially accepted sockets from backing up in the kernel. - */ - - /* Make sure we use non-blocking i/o on the acceptor socket, since we're selecting it - * for readability. According to Stevens UNP, it's possible for an acceptor to select readable - * and then block when we call accept. For example, the other end resets the connection after - * the socket selects readable and before we call accept. The kernel will remove the dead - * socket from the accept queue. If the accept queue is now empty, accept will block. - */ - - - struct sockaddr_in6 pin; - socklen_t addrlen = sizeof (pin); - int accept_count = EventMachine_t::GetSimultaneousAcceptCount(); - - for (int i=0; i < accept_count; i++) { -#if defined(HAVE_CONST_SOCK_CLOEXEC) && defined(HAVE_ACCEPT4) - SOCKET sd = accept4 (GetSocket(), (struct sockaddr*)&pin, &addrlen, SOCK_CLOEXEC); - if (sd == INVALID_SOCKET) { - // We may be running in a kernel where - // SOCK_CLOEXEC is not supported - fall back: - sd = accept (GetSocket(), (struct sockaddr*)&pin, &addrlen); - } -#else - SOCKET sd = accept (GetSocket(), (struct sockaddr*)&pin, &addrlen); -#endif - if (sd == INVALID_SOCKET) { - // This breaks the loop when we've accepted everything on the kernel queue, - // up to 10 new connections. But what if the *first* accept fails? - // Does that mean anything serious is happening, beyond the situation - // described in the note above? - break; - } - - // Set the newly-accepted socket non-blocking and to close on exec. - // On Windows, this may fail because, weirdly, Windows inherits the non-blocking - // attribute that we applied to the acceptor socket into the accepted one. - if (!SetFdCloexec(sd) || !SetSocketNonblocking (sd)) { - //int val = fcntl (sd, F_GETFL, 0); - //if (fcntl (sd, F_SETFL, val | O_NONBLOCK) == -1) { - shutdown (sd, 1); - close (sd); - continue; - } - - // Disable slow-start (Nagle algorithm). Eventually make this configurable. - int one = 1; - setsockopt (sd, IPPROTO_TCP, TCP_NODELAY, (char*) &one, sizeof(one)); - - - ConnectionDescriptor *cd = new ConnectionDescriptor (sd, MyEventMachine); - if (!cd) - throw std::runtime_error ("no newly accepted connection"); - cd->SetServerMode(); - if (EventCallback) { - (*EventCallback) (GetBinding(), EM_CONNECTION_ACCEPTED, NULL, cd->GetBinding()); - } - #ifdef HAVE_EPOLL - cd->GetEpollEvent()->events = 0; - if (cd->SelectForRead()) - cd->GetEpollEvent()->events |= EPOLLIN; - if (cd->SelectForWrite()) - cd->GetEpollEvent()->events |= EPOLLOUT; - #endif - assert (MyEventMachine); - MyEventMachine->Add (cd); - #ifdef HAVE_KQUEUE - bKqueueArmWrite = cd->SelectForWrite(); - if (bKqueueArmWrite) - MyEventMachine->Modify (cd); - if (cd->SelectForRead()) - MyEventMachine->ArmKqueueReader (cd); - #endif - } - -} - - -/************************* -AcceptorDescriptor::Write -*************************/ - -void AcceptorDescriptor::Write() -{ - // Why are we here? - throw std::runtime_error ("bad code path in acceptor"); -} - - -/***************************** -AcceptorDescriptor::Heartbeat -*****************************/ - -void AcceptorDescriptor::Heartbeat() -{ - // No-op -} - - -/************************************** -DatagramDescriptor::DatagramDescriptor -**************************************/ - -DatagramDescriptor::DatagramDescriptor (SOCKET sd, EventMachine_t *parent_em): - EventableDescriptor (sd, parent_em), - OutboundDataSize (0) -{ - memset (&ReturnAddress, 0, sizeof(ReturnAddress)); - - /* Provisionally added 19Oct07. All datagram sockets support broadcasting. - * Until now, sending to a broadcast address would give EACCES (permission denied) - * on systems like Linux and BSD that require the SO_BROADCAST socket-option in order - * to accept a packet to a broadcast address. Solaris doesn't require it. I think - * Windows DOES require it but I'm not sure. - * - * Ruby does NOT do what we're doing here. In Ruby, you have to explicitly set SO_BROADCAST - * on a UDP socket in order to enable broadcasting. The reason for requiring the option - * in the first place is so that applications don't send broadcast datagrams by mistake. - * I imagine that could happen if a user of an application typed in an address that happened - * to be a broadcast address on that particular subnet. - * - * This is provisional because someone may eventually come up with a good reason not to - * do it for all UDP sockets. If that happens, then we'll need to add a usercode-level API - * to set the socket option, just like Ruby does. AND WE'LL ALSO BREAK CODE THAT DOESN'T - * EXPLICITLY SET THE OPTION. - */ - - int oval = 1; - setsockopt (GetSocket(), SOL_SOCKET, SO_BROADCAST, (char*)&oval, sizeof(oval)); - - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - #endif - #ifdef HAVE_KQUEUE - MyEventMachine->ArmKqueueReader (this); - #endif -} - - -/*************************************** -DatagramDescriptor::~DatagramDescriptor -***************************************/ - -DatagramDescriptor::~DatagramDescriptor() -{ - // Run down any stranded outbound data. - for (size_t i=0; i < OutboundPages.size(); i++) - OutboundPages[i].Free(); -} - - -/***************************** -DatagramDescriptor::Heartbeat -*****************************/ - -void DatagramDescriptor::Heartbeat() -{ - // Close it if its inactivity timer has expired. - - if (InactivityTimeout && ((MyEventMachine->GetCurrentLoopTime() - LastActivity) >= InactivityTimeout)) - ScheduleClose (false); - //bCloseNow = true; -} - - -/************************ -DatagramDescriptor::Read -************************/ - -void DatagramDescriptor::Read() -{ - SOCKET sd = GetSocket(); - assert (sd != INVALID_SOCKET); - LastActivity = MyEventMachine->GetCurrentLoopTime(); - - // This is an extremely large read buffer. - // In many cases you wouldn't expect to get any more than 4K. - char readbuffer [16 * 1024]; - - for (int i=0; i < 10; i++) { - // Don't read just one buffer and then move on. This is faster - // if there is a lot of incoming. - // But don't read indefinitely. Give other sockets a chance to run. - // NOTICE, we're reading one less than the buffer size. - // That's so we can put a guard byte at the end of what we send - // to user code. - - struct sockaddr_in6 sin; - socklen_t slen = sizeof (sin); - memset (&sin, 0, slen); - - int r = recvfrom (sd, readbuffer, sizeof(readbuffer) - 1, 0, (struct sockaddr*)&sin, &slen); - //cerr << ""; - - // In UDP, a zero-length packet is perfectly legal. - if (r >= 0) { - - // Add a null-terminator at the the end of the buffer - // that we will send to the callback. - // DO NOT EVER CHANGE THIS. We want to explicitly allow users - // to be able to depend on this behavior, so they will have - // the option to do some things faster. Additionally it's - // a security guard against buffer overflows. - readbuffer [r] = 0; - - - // Set up a "temporary" return address so that callers can "reply" to us - // from within the callback we are about to invoke. That means that ordinary - // calls to "send_data_to_connection" (which is of course misnamed in this - // case) will result in packets being sent back to the same place that sent - // us this one. - // There is a different call (evma_send_datagram) for cases where the caller - // actually wants to send a packet somewhere else. - - memset (&ReturnAddress, 0, sizeof(ReturnAddress)); - memcpy (&ReturnAddress, &sin, slen); - - _GenericInboundDispatch(readbuffer, r); - - } - else { - // Basically a would-block, meaning we've read everything there is to read. - break; - } - - } - - -} - - -/************************* -DatagramDescriptor::Write -*************************/ - -void DatagramDescriptor::Write() -{ - /* It's possible for a socket to select writable and then no longer - * be writable by the time we get around to writing. The kernel might - * have used up its available output buffers between the select call - * and when we get here. So this condition is not an error. - * This code is very reminiscent of ConnectionDescriptor::_WriteOutboundData, - * but differs in the that the outbound data pages (received from the - * user) are _message-structured._ That is, we send each of them out - * one message at a time. - * TODO, we are currently suppressing the EMSGSIZE error!!! - */ - - SOCKET sd = GetSocket(); - assert (sd != INVALID_SOCKET); - LastActivity = MyEventMachine->GetCurrentLoopTime(); - - assert (OutboundPages.size() > 0); - - // Send out up to 10 packets, then cycle the machine. - for (int i = 0; i < 10; i++) { - if (OutboundPages.size() <= 0) - break; - OutboundPage *op = &(OutboundPages[0]); - - // The nasty cast to (char*) is needed because Windows is brain-dead. - int s = sendto (sd, (char*)op->Buffer, op->Length, 0, (struct sockaddr*)&(op->From), - (op->From.sin6_family == AF_INET6 ? sizeof (struct sockaddr_in6) : sizeof (struct sockaddr_in))); -#ifdef OS_WIN32 - int e = WSAGetLastError(); -#else - int e = errno; -#endif - - OutboundDataSize -= op->Length; - op->Free(); - OutboundPages.pop_front(); - - if (s == SOCKET_ERROR) { - #ifdef OS_UNIX - if ((e != EINPROGRESS) && (e != EWOULDBLOCK) && (e != EINTR)) { - #endif - #ifdef OS_WIN32 - if ((e != WSAEINPROGRESS) && (e != WSAEWOULDBLOCK)) { - #endif - UnbindReasonCode = e; - Close(); - break; - } - } - } - - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - if (SelectForWrite()) - EpollEvent.events |= EPOLLOUT; - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif - #ifdef HAVE_KQUEUE - bKqueueArmWrite = SelectForWrite(); - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif -} - - -/********************************** -DatagramDescriptor::SelectForWrite -**********************************/ - -bool DatagramDescriptor::SelectForWrite() -{ - /* Changed 15Nov07, per bug report by Mark Zvillius. - * The outbound data size will be zero if there are zero-length outbound packets, - * so we now select writable in case the outbound page buffer is not empty. - * Note that the superclass ShouldDelete method still checks for outbound data size, - * which may be wrong. - */ - //return (GetOutboundDataSize() > 0); (Original) - return (OutboundPages.size() > 0); -} - - -/************************************ -DatagramDescriptor::SendOutboundData -************************************/ - -int DatagramDescriptor::SendOutboundData (const char *data, unsigned long length) -{ - // This is almost an exact clone of ConnectionDescriptor::_SendRawOutboundData. - // That means most of it could be factored to a common ancestor. Note that - // empty datagrams are meaningful, which isn't the case for TCP streams. - - if (IsCloseScheduled()) - return 0; - - if (!data && (length > 0)) - throw std::runtime_error ("bad outbound data"); - char *buffer = (char *) malloc (length + 1); - if (!buffer) - throw std::runtime_error ("no allocation for outbound data"); - memcpy (buffer, data, length); - buffer [length] = 0; - OutboundPages.push_back (OutboundPage (buffer, length, ReturnAddress)); - OutboundDataSize += length; - - #ifdef HAVE_EPOLL - EpollEvent.events = (EPOLLIN | EPOLLOUT); - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif - #ifdef HAVE_KQUEUE - bKqueueArmWrite = true; - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif - - return length; -} - - -/**************************************** -DatagramDescriptor::SendOutboundDatagram -****************************************/ - -int DatagramDescriptor::SendOutboundDatagram (const char *data, unsigned long length, const char *address, int port) -{ - // This is an exact clone of ConnectionDescriptor::SendOutboundData. - // That means it needs to move to a common ancestor. - // TODO: Refactor this so there's no overlap with SendOutboundData. - - if (IsCloseScheduled()) - //if (bCloseNow || bCloseAfterWriting) - return 0; - - if (!address || !*address || !port) - return 0; - - struct sockaddr_in6 addr_here; - size_t addr_here_len = sizeof addr_here; - if (0 != EventMachine_t::name2address (address, port, SOCK_DGRAM, (struct sockaddr *)&addr_here, &addr_here_len)) - return -1; - - if (!data && (length > 0)) - throw std::runtime_error ("bad outbound data"); - char *buffer = (char *) malloc (length + 1); - if (!buffer) - throw std::runtime_error ("no allocation for outbound data"); - memcpy (buffer, data, length); - buffer [length] = 0; - OutboundPages.push_back (OutboundPage (buffer, length, addr_here)); - OutboundDataSize += length; - - #ifdef HAVE_EPOLL - EpollEvent.events = (EPOLLIN | EPOLLOUT); - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif - #ifdef HAVE_KQUEUE - bKqueueArmWrite = true; - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif - - return length; -} - - -/********************************************** -ConnectionDescriptor::GetCommInactivityTimeout -**********************************************/ - -uint64_t ConnectionDescriptor::GetCommInactivityTimeout() -{ - return InactivityTimeout / 1000; -} - - -/********************************************** -ConnectionDescriptor::SetCommInactivityTimeout -**********************************************/ - -int ConnectionDescriptor::SetCommInactivityTimeout (uint64_t value) -{ - InactivityTimeout = value * 1000; - MyEventMachine->QueueHeartbeat(this); - return 1; -} - -/******************************* -DatagramDescriptor::GetPeername -*******************************/ - -bool DatagramDescriptor::GetPeername (struct sockaddr *s, socklen_t *len) -{ - bool ok = false; - if (s) { - *len = sizeof(ReturnAddress); - memset (s, 0, sizeof(ReturnAddress)); - memcpy (s, &ReturnAddress, sizeof(ReturnAddress)); - ok = true; - } - return ok; -} - - -/******************************************** -DatagramDescriptor::GetCommInactivityTimeout -********************************************/ - -uint64_t DatagramDescriptor::GetCommInactivityTimeout() -{ - return InactivityTimeout / 1000; -} - -/******************************************** -DatagramDescriptor::SetCommInactivityTimeout -********************************************/ - -int DatagramDescriptor::SetCommInactivityTimeout (uint64_t value) -{ - if (value > 0) { - InactivityTimeout = value * 1000; - MyEventMachine->QueueHeartbeat(this); - return 1; - } - return 0; -} - - -/************************************ -InotifyDescriptor::InotifyDescriptor -*************************************/ - -InotifyDescriptor::InotifyDescriptor (EventMachine_t *em): - EventableDescriptor(0, em) -{ - bCallbackUnbind = false; - - #ifndef HAVE_INOTIFY - throw std::runtime_error("no inotify support on this system"); - #else - - int fd = inotify_init(); - if (fd == -1) { - char buf[200]; - snprintf (buf, sizeof(buf)-1, "unable to create inotify descriptor: %s", strerror(errno)); - throw std::runtime_error (buf); - } - - MySocket = fd; - SetSocketNonblocking(MySocket); - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - #endif - - #endif -} - - -/************************************* -InotifyDescriptor::~InotifyDescriptor -**************************************/ - -InotifyDescriptor::~InotifyDescriptor() -{ - close(MySocket); - MySocket = INVALID_SOCKET; -} - -/*********************** -InotifyDescriptor::Read -************************/ - -void InotifyDescriptor::Read() -{ - assert (MyEventMachine); - MyEventMachine->_ReadInotifyEvents(); -} - - -/************************ -InotifyDescriptor::Write -*************************/ - -void InotifyDescriptor::Write() -{ - throw std::runtime_error("bad code path in inotify"); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ed.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ed.h deleted file mode 100644 index 4d7f7d4e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ed.h +++ /dev/null @@ -1,457 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: ed.h -Date: 06Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#ifndef __EventableDescriptor__H_ -#define __EventableDescriptor__H_ - - -class EventMachine_t; // forward reference -#ifdef WITH_SSL -class SslBox_t; // forward reference -#endif - -bool SetSocketNonblocking (SOCKET); -bool SetFdCloexec (int); - -/************************* -class EventableDescriptor -*************************/ - -class EventableDescriptor: public Bindable_t -{ - public: - EventableDescriptor (SOCKET, EventMachine_t*); - virtual ~EventableDescriptor() NO_EXCEPT_FALSE; - - SOCKET GetSocket() {return MySocket;} - void SetSocketInvalid() { MySocket = INVALID_SOCKET; } - void Close(); - - virtual void Read() = 0; - virtual void Write() = 0; - virtual void Heartbeat() = 0; - - // These methods tell us whether the descriptor - // should be selected or polled for read/write. - virtual bool SelectForRead() = 0; - virtual bool SelectForWrite() = 0; - - // are we scheduled for a close, or in an error state, or already closed? - bool ShouldDelete(); - // Do we have any data to write? This is used by ShouldDelete. - virtual int GetOutboundDataSize() {return 0;} - virtual bool IsWatchOnly(){ return bWatchOnly; } - - virtual void ScheduleClose (bool after_writing); - bool IsCloseScheduled(); - virtual void HandleError(){ ScheduleClose (false); } - - void SetEventCallback (EMCallback); - - virtual bool GetPeername (struct sockaddr*, socklen_t*) = 0; - virtual bool GetSockname (struct sockaddr*, socklen_t*) = 0; - virtual bool GetSubprocessPid (pid_t*) {return false;} - - virtual void StartTls() {} - virtual void SetTlsParms (const char *, const char *, bool, bool, const char *, const char *, const char *, const char *, int) {} - - #ifdef WITH_SSL - virtual X509 *GetPeerCert() {return NULL;} - virtual int GetCipherBits() {return -1;} - virtual const char *GetCipherName() {return NULL;} - virtual const char *GetCipherProtocol() {return NULL;} - virtual const char *GetSNIHostname() {return NULL;} - #endif - - virtual uint64_t GetCommInactivityTimeout() {return 0;} - virtual int SetCommInactivityTimeout (uint64_t) {return 0;} - uint64_t GetPendingConnectTimeout(); - int SetPendingConnectTimeout (uint64_t value); - uint64_t GetLastActivity() { return LastActivity; } - - #ifdef HAVE_EPOLL - struct epoll_event *GetEpollEvent() { return &EpollEvent; } - #endif - - #ifdef HAVE_KQUEUE - bool GetKqueueArmWrite() { return bKqueueArmWrite; } - #endif - - virtual void StartProxy(const uintptr_t, const unsigned long, const unsigned long); - virtual void StopProxy(); - virtual unsigned long GetProxiedBytes(){ return ProxiedBytes; }; - virtual void SetProxiedFrom(EventableDescriptor*, const unsigned long); - virtual int SendOutboundData(const char*,unsigned long){ return -1; } - virtual bool IsPaused(){ return bPaused; } - virtual bool Pause(){ bPaused = true; return bPaused; } - virtual bool Resume(){ bPaused = false; return bPaused; } - - void SetUnbindReasonCode(int code){ UnbindReasonCode = code; } - virtual int ReportErrorStatus(){ return 0; } - virtual bool IsConnectPending(){ return false; } - virtual uint64_t GetNextHeartbeat(); - - private: - bool bCloseNow; - bool bCloseAfterWriting; - - protected: - SOCKET MySocket; - bool bAttached; - bool bWatchOnly; - - EMCallback EventCallback; - void _GenericInboundDispatch (const char *buffer, unsigned long size); - bool _GenericGetPeername (struct sockaddr*, socklen_t*); - bool _GenericGetSockname (struct sockaddr*, socklen_t*); - - uint64_t CreatedAt; - bool bCallbackUnbind; - int UnbindReasonCode; - - unsigned long BytesToProxy; - EventableDescriptor *ProxyTarget; - EventableDescriptor *ProxiedFrom; - unsigned long ProxiedBytes; - - unsigned long MaxOutboundBufSize; - - #ifdef HAVE_EPOLL - struct epoll_event EpollEvent; - #endif - - #ifdef HAVE_KQUEUE - bool bKqueueArmWrite; - #endif - - EventMachine_t *MyEventMachine; - uint64_t PendingConnectTimeout; - uint64_t InactivityTimeout; - uint64_t LastActivity; - uint64_t NextHeartbeat; - bool bPaused; -}; - - - -/************************* -class LoopbreakDescriptor -*************************/ - -class LoopbreakDescriptor: public EventableDescriptor -{ - public: - LoopbreakDescriptor (SOCKET, EventMachine_t*); - virtual ~LoopbreakDescriptor() {} - - virtual void Read(); - virtual void Write(); - virtual void Heartbeat() {} - - virtual bool SelectForRead() {return true;} - virtual bool SelectForWrite() {return false;} - - virtual bool GetPeername (struct sockaddr* s, socklen_t* len) { return _GenericGetPeername (s, len); } - virtual bool GetSockname (struct sockaddr* s, socklen_t* len) { return _GenericGetSockname (s, len); } -}; - - -/************************** -class ConnectionDescriptor -**************************/ - -class ConnectionDescriptor: public EventableDescriptor -{ - public: - ConnectionDescriptor (SOCKET, EventMachine_t*); - virtual ~ConnectionDescriptor(); - - int SendOutboundData (const char*, unsigned long); - - void SetConnectPending (bool f); - virtual void ScheduleClose (bool after_writing); - virtual void HandleError(); - - void SetNotifyReadable (bool); - void SetNotifyWritable (bool); - void SetAttached (bool); - void SetWatchOnly (bool); - - bool Pause(); - bool Resume(); - - bool IsNotifyReadable(){ return bNotifyReadable; } - bool IsNotifyWritable(){ return bNotifyWritable; } - - virtual void Read(); - virtual void Write(); - virtual void Heartbeat(); - - virtual bool SelectForRead(); - virtual bool SelectForWrite(); - - // Do we have any data to write? This is used by ShouldDelete. - virtual int GetOutboundDataSize() {return OutboundDataSize;} - - virtual void StartTls(); - virtual void SetTlsParms (const char *, const char *, bool, bool, const char *, const char *, const char *, const char *, int); - - #ifdef WITH_SSL - virtual X509 *GetPeerCert(); - virtual int GetCipherBits(); - virtual const char *GetCipherName(); - virtual const char *GetCipherProtocol(); - virtual const char *GetSNIHostname(); - virtual bool VerifySslPeer(const char*); - virtual void AcceptSslPeer(); - #endif - - void SetServerMode() {bIsServer = true;} - - virtual bool GetPeername (struct sockaddr* s, socklen_t* len) { return _GenericGetPeername (s, len); } - virtual bool GetSockname (struct sockaddr* s, socklen_t* len) { return _GenericGetSockname (s, len); } - - virtual uint64_t GetCommInactivityTimeout(); - virtual int SetCommInactivityTimeout (uint64_t value); - - virtual int ReportErrorStatus(); - virtual bool IsConnectPending(){ return bConnectPending; } - - protected: - struct OutboundPage { - OutboundPage (const char *b, int l, int o=0): Buffer(b), Length(l), Offset(o) {} - void Free() {if (Buffer) free (const_cast(Buffer)); } - const char *Buffer; - int Length; - int Offset; - }; - - protected: - bool bConnectPending; - - bool bNotifyReadable; - bool bNotifyWritable; - - bool bReadAttemptedAfterClose; - bool bWriteAttemptedAfterClose; - - std::deque OutboundPages; - int OutboundDataSize; - - #ifdef WITH_SSL - SslBox_t *SslBox; - std::string CertChainFilename; - std::string PrivateKeyFilename; - std::string CipherList; - std::string EcdhCurve; - std::string DhParam; - int Protocols; - bool bHandshakeSignaled; - bool bSslVerifyPeer; - bool bSslFailIfNoPeerCert; - std::string SniHostName; - bool bSslPeerAccepted; - #endif - - #ifdef HAVE_KQUEUE - bool bGotExtraKqueueEvent; - #endif - - bool bIsServer; - - private: - void _UpdateEvents(); - void _UpdateEvents(bool, bool); - void _WriteOutboundData(); - void _DispatchInboundData (const char *buffer, unsigned long size); - void _DispatchCiphertext(); - int _SendRawOutboundData (const char *buffer, unsigned long size); - void _CheckHandshakeStatus(); - -}; - - -/************************ -class DatagramDescriptor -************************/ - -class DatagramDescriptor: public EventableDescriptor -{ - public: - DatagramDescriptor (SOCKET, EventMachine_t*); - virtual ~DatagramDescriptor(); - - virtual void Read(); - virtual void Write(); - virtual void Heartbeat(); - - virtual bool SelectForRead() {return true;} - virtual bool SelectForWrite(); - - int SendOutboundData (const char*, unsigned long); - int SendOutboundDatagram (const char*, unsigned long, const char*, int); - - // Do we have any data to write? This is used by ShouldDelete. - virtual int GetOutboundDataSize() {return OutboundDataSize;} - - virtual bool GetPeername (struct sockaddr* s, socklen_t* len); - virtual bool GetSockname (struct sockaddr* s, socklen_t* len) { return _GenericGetSockname (s, len); }; - - virtual uint64_t GetCommInactivityTimeout(); - virtual int SetCommInactivityTimeout (uint64_t value); - - protected: - struct OutboundPage { - OutboundPage (const char *b, int l, struct sockaddr_in6 f, int o=0): Buffer(b), Length(l), Offset(o), From(f) {} - void Free() {if (Buffer) free (const_cast(Buffer)); } - const char *Buffer; - int Length; - int Offset; - struct sockaddr_in6 From; - }; - - std::deque OutboundPages; - int OutboundDataSize; - - struct sockaddr_in6 ReturnAddress; -}; - - -/************************ -class AcceptorDescriptor -************************/ - -class AcceptorDescriptor: public EventableDescriptor -{ - public: - AcceptorDescriptor (SOCKET, EventMachine_t*); - virtual ~AcceptorDescriptor(); - - virtual void Read(); - virtual void Write(); - virtual void Heartbeat(); - - virtual bool SelectForRead() {return true;} - virtual bool SelectForWrite() {return false;} - - virtual bool GetPeername (struct sockaddr* s, socklen_t* len) { return _GenericGetPeername (s, len); } - virtual bool GetSockname (struct sockaddr* s, socklen_t* len) { return _GenericGetSockname (s, len); }; - - static void StopAcceptor (const uintptr_t binding); -}; - -/******************** -class PipeDescriptor -********************/ - -#ifdef OS_UNIX -class PipeDescriptor: public EventableDescriptor -{ - public: - PipeDescriptor (SOCKET, pid_t, EventMachine_t*); - virtual ~PipeDescriptor() NO_EXCEPT_FALSE; - - virtual void Read(); - virtual void Write(); - virtual void Heartbeat(); - - virtual bool SelectForRead(); - virtual bool SelectForWrite(); - - int SendOutboundData (const char*, unsigned long); - virtual int GetOutboundDataSize() {return OutboundDataSize;} - - virtual bool GetPeername (struct sockaddr* s, socklen_t* len) { return _GenericGetPeername (s, len); } - virtual bool GetSockname (struct sockaddr* s, socklen_t* len) { return _GenericGetSockname (s, len); } - - virtual bool GetSubprocessPid (pid_t*); - - protected: - struct OutboundPage { - OutboundPage (const char *b, int l, int o=0): Buffer(b), Length(l), Offset(o) {} - void Free() {if (Buffer) free (const_cast(Buffer)); } - const char *Buffer; - int Length; - int Offset; - }; - - protected: - bool bReadAttemptedAfterClose; - - std::deque OutboundPages; - int OutboundDataSize; - - pid_t SubprocessPid; - - private: - void _DispatchInboundData (const char *buffer, int size); -}; -#endif // OS_UNIX - - -/************************ -class KeyboardDescriptor -************************/ - -class KeyboardDescriptor: public EventableDescriptor -{ - public: - KeyboardDescriptor (EventMachine_t*); - virtual ~KeyboardDescriptor(); - - virtual void Read(); - virtual void Write(); - virtual void Heartbeat(); - - virtual bool SelectForRead() {return true;} - virtual bool SelectForWrite() {return false;} - - virtual bool GetPeername (struct sockaddr* s, socklen_t* len) { return _GenericGetPeername (s, len); } - virtual bool GetSockname (struct sockaddr* s, socklen_t* len) { return _GenericGetSockname (s, len); } - - protected: - bool bReadAttemptedAfterClose; - - private: - void _DispatchInboundData (const char *buffer, int size); -}; - - -/*********************** -class InotifyDescriptor -************************/ - -class InotifyDescriptor: public EventableDescriptor -{ - public: - InotifyDescriptor (EventMachine_t*); - virtual ~InotifyDescriptor(); - - void Read(); - void Write(); - - virtual void Heartbeat() {} - virtual bool SelectForRead() {return true;} - virtual bool SelectForWrite() {return false;} - - virtual bool GetPeername (struct sockaddr* s, socklen_t* len) { return false; } - virtual bool GetSockname (struct sockaddr* s, socklen_t* len) { return false; } -}; - -#endif // __EventableDescriptor__H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/em.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/em.cpp deleted file mode 100644 index 29074850..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/em.cpp +++ /dev/null @@ -1,2396 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: em.cpp -Date: 06Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -// THIS ENTIRE FILE WILL EVENTUALLY BE FOR UNIX BUILDS ONLY. -//#ifdef OS_UNIX - -#include "project.h" - -/* The numer of max outstanding timers was once a const enum defined in em.h. - * Now we define it here so that users can change its value if necessary. - */ -static unsigned int MaxOutstandingTimers = 100000; - -/* The number of accept() done at once in a single tick when the acceptor - * socket becomes readable. - */ -static unsigned int SimultaneousAcceptCount = 10; - -/* Internal helper to create a socket with SOCK_CLOEXEC set, and fall - * back to fcntl'ing it if the headers/runtime don't support it. - */ -SOCKET EmSocket (int domain, int type, int protocol) -{ - SOCKET sd; -#ifdef HAVE_SOCKET_CLOEXEC - sd = socket (domain, type | SOCK_CLOEXEC, protocol); - if (sd == INVALID_SOCKET) { - sd = socket (domain, type, protocol); - if (sd < 0) { - return sd; - } - SetFdCloexec(sd); - } -#else - sd = socket (domain, type, protocol); - if (sd == INVALID_SOCKET) { - return sd; - } - SetFdCloexec(sd); -#endif - return sd; -} - - -/*************************************** -STATIC EventMachine_t::GetMaxTimerCount -***************************************/ - -int EventMachine_t::GetMaxTimerCount() -{ - return MaxOutstandingTimers; -} - - -/*************************************** -STATIC EventMachine_t::SetMaxTimerCount -***************************************/ - -void EventMachine_t::SetMaxTimerCount (int count) -{ - /* Allow a user to increase the maximum number of outstanding timers. - * If this gets "too high" (a metric that is of course platform dependent), - * bad things will happen like performance problems and possible overuse - * of memory. - * The actual timer mechanism is very efficient so it's hard to know what - * the practical max, but 100,000 shouldn't be too problematical. - */ - if (count < 100) - count = 100; - MaxOutstandingTimers = count; -} - -int EventMachine_t::GetSimultaneousAcceptCount() -{ - return SimultaneousAcceptCount; -} - -void EventMachine_t::SetSimultaneousAcceptCount (int count) -{ - if (count < 1) - count = 1; - SimultaneousAcceptCount = count; -} - - -/****************************** -EventMachine_t::EventMachine_t -******************************/ - -EventMachine_t::EventMachine_t (EMCallback event_callback, Poller_t poller): - NumCloseScheduled (0), - HeartbeatInterval(2000000), - EventCallback (event_callback), - LoopBreakerReader (INVALID_SOCKET), - LoopBreakerWriter (INVALID_SOCKET), - bTerminateSignalReceived (false), - Poller (poller), - epfd (-1), - kqfd (-1) - #ifdef HAVE_INOTIFY - , inotify (NULL) - #endif -{ - // Default time-slice is just smaller than one hundred mills. - Quantum.tv_sec = 0; - Quantum.tv_usec = 90000; - - // Override the requested poller back to default if needed. - #if !defined(HAVE_EPOLL) && !defined(HAVE_KQUEUE) - Poller = Poller_Default; - #endif - - /* Initialize monotonic timekeeping on OS X before the first call to GetRealTime */ - #ifdef OS_DARWIN - (void) mach_timebase_info(&mach_timebase); - #endif - - #ifdef OS_WIN32 - TickCountTickover = 0; - LastTickCount = 0; - #endif - - // Make sure the current loop time is sane, in case we do any initializations of - // objects before we start running. - _UpdateTime(); - - /* We initialize the network library here (only on Windows of course) - * and initialize "loop breakers." Our destructor also does some network-level - * cleanup. There's thus an implicit assumption that any given instance of EventMachine_t - * will only call ::Run once. Is that a good assumption? Should we move some of these - * inits and de-inits into ::Run? - */ - #ifdef OS_WIN32 - WSADATA w; - WSAStartup (MAKEWORD (1, 1), &w); - #endif - - _InitializeLoopBreaker(); - SelectData = new SelectData_t(); -} - - -/******************************* -EventMachine_t::~EventMachine_t -*******************************/ - -EventMachine_t::~EventMachine_t() -{ - // Run down descriptors - size_t i; - for (i = 0; i < NewDescriptors.size(); i++) - delete NewDescriptors[i]; - for (i = 0; i < Descriptors.size(); i++) - delete Descriptors[i]; - - close (LoopBreakerReader); - close (LoopBreakerWriter); - - // Remove any file watch descriptors - while(!Files.empty()) { - std::map::iterator f = Files.begin(); - UnwatchFile (f->first); - } - - if (epfd != -1) - close (epfd); - if (kqfd != -1) - close (kqfd); - - delete SelectData; -} - - -/**************************** -EventMachine_t::ScheduleHalt -****************************/ - -void EventMachine_t::ScheduleHalt() -{ - /* This is how we stop the machine. - * This can be called by clients. Signal handlers will probably - * set the global flag. - * For now this means there can only be one EventMachine ever running at a time. - * - * IMPORTANT: keep this light, fast, and async-safe. Don't do anything frisky in here, - * because it may be called from signal handlers invoked from code that we don't - * control. At this writing (20Sep06), EM does NOT install any signal handlers of - * its own. - * - * We need a FAQ. And one of the questions is: how do I stop EM when Ctrl-C happens? - * The answer is to call evma_stop_machine, which calls here, from a SIGINT handler. - */ - bTerminateSignalReceived = true; - - /* Signal the loopbreaker so we break out of long-running select/epoll/kqueue and - * notice the halt boolean is set. Signalling the loopbreaker also uses a single - * signal-safe syscall. - */ - SignalLoopBreaker(); -} - -bool EventMachine_t::Stopping() -{ - return bTerminateSignalReceived; -} - -/******************************* -EventMachine_t::SetTimerQuantum -*******************************/ - -void EventMachine_t::SetTimerQuantum (int interval) -{ - /* We get a timer-quantum expressed in milliseconds. - */ - - if ((interval < 5) || (interval > 5*60*1000)) - throw std::runtime_error ("invalid timer-quantum"); - - Quantum.tv_sec = interval / 1000; - Quantum.tv_usec = (interval % 1000) * 1000; -} - - -/************************************* -(STATIC) EventMachine_t::SetuidString -*************************************/ - -#ifdef OS_UNIX -void EventMachine_t::SetuidString (const char *username) -{ - /* This method takes a caller-supplied username and tries to setuid - * to that user. There is no meaningful implementation (and no error) - * on Windows. On Unix, a failure to setuid the caller-supplied string - * causes a fatal abort, because presumably the program is calling here - * in order to fulfill a security requirement. If we fail silently, - * the user may continue to run with too much privilege. - * - * TODO, we need to decide on and document a way of generating C++ level errors - * that can be wrapped in documented Ruby exceptions, so users can catch - * and handle them. And distinguish it from errors that we WON'T let the Ruby - * user catch (like security-violations and resource-overallocation). - * A setuid failure here would be in the latter category. - */ - - if (!username || !*username) - throw std::runtime_error ("setuid_string failed: no username specified"); - - errno = 0; - struct passwd *p = getpwnam (username); - if (!p) { - if (errno) { - char buf[200]; - snprintf (buf, sizeof(buf)-1, "setuid_string failed: %s", strerror(errno)); - throw std::runtime_error (buf); - } else { - throw std::runtime_error ("setuid_string failed: unknown username"); - } - } - - if (setuid (p->pw_uid) != 0) - throw std::runtime_error ("setuid_string failed: no setuid"); - - // Success. -} -#else -void EventMachine_t::SetuidString (const char *username UNUSED) { } -#endif - -/**************************************** -(STATIC) EventMachine_t::SetRlimitNofile -****************************************/ - -#ifdef OS_UNIX -int EventMachine_t::SetRlimitNofile (int nofiles) -{ - struct rlimit rlim; - getrlimit (RLIMIT_NOFILE, &rlim); - if (nofiles >= 0) { - rlim.rlim_cur = nofiles; - if ((unsigned int)nofiles > rlim.rlim_max) - rlim.rlim_max = nofiles; - setrlimit (RLIMIT_NOFILE, &rlim); - // ignore the error return, for now at least. - // TODO, emit an error message someday when we have proper debug levels. - } - getrlimit (RLIMIT_NOFILE, &rlim); - return rlim.rlim_cur; -} -#else -int EventMachine_t::SetRlimitNofile (int nofiles UNUSED) { return 0; } -#endif - -/********************************* -EventMachine_t::SignalLoopBreaker -*********************************/ - -void EventMachine_t::SignalLoopBreaker() -{ - #ifdef OS_UNIX - (void)write (LoopBreakerWriter, "", 1); - #endif - #ifdef OS_WIN32 - sendto (LoopBreakerReader, "", 0, 0, (struct sockaddr*)&(LoopBreakerTarget), sizeof(LoopBreakerTarget)); - #endif -} - - -/************************************** -EventMachine_t::_InitializeLoopBreaker -**************************************/ - -void EventMachine_t::_InitializeLoopBreaker() -{ - /* A "loop-breaker" is a socket-descriptor that we can write to in order - * to break the main select loop. Primarily useful for things running on - * threads other than the main EM thread, so they can trigger processing - * of events that arise exogenously to the EM. - * Keep the loop-breaker pipe out of the main descriptor set, otherwise - * its events will get passed on to user code. - */ - - #ifdef OS_UNIX - int fd[2]; -#if defined (HAVE_CLOEXEC) && defined (HAVE_PIPE2) - int pipestatus = pipe2(fd, O_CLOEXEC); - if (pipestatus < 0) { - if (pipe(fd)) - throw std::runtime_error (strerror(errno)); - } -#else - if (pipe (fd)) - throw std::runtime_error (strerror(errno)); -#endif - if (!SetFdCloexec(fd[0]) || !SetFdCloexec(fd[1])) - throw std::runtime_error (strerror(errno)); - - LoopBreakerWriter = fd[1]; - LoopBreakerReader = fd[0]; - - /* 16Jan11: Make sure the pipe is non-blocking, so more than 65k loopbreaks - * in one tick do not fill up the pipe and block the process on write() */ - SetSocketNonblocking (LoopBreakerWriter); - #endif - - #ifdef OS_WIN32 - SOCKET sd = EmSocket (AF_INET, SOCK_DGRAM, 0); - if (sd == INVALID_SOCKET) - throw std::runtime_error ("no loop breaker socket"); - SetSocketNonblocking (sd); - - memset (&LoopBreakerTarget, 0, sizeof(LoopBreakerTarget)); - LoopBreakerTarget.sin_family = AF_INET; - LoopBreakerTarget.sin_addr.s_addr = inet_addr ("127.0.0.1"); - - srand ((int)time(NULL)); - int i; - for (i=0; i < 100; i++) { - int r = (rand() % 10000) + 20000; - LoopBreakerTarget.sin_port = htons (r); - if (bind (sd, (struct sockaddr*)&LoopBreakerTarget, sizeof(LoopBreakerTarget)) == 0) - break; - } - - if (i == 100) - throw std::runtime_error ("no loop breaker"); - LoopBreakerReader = sd; - #endif - - #ifdef HAVE_EPOLL - if (Poller == Poller_Epoll) { - epfd = epoll_create (MaxEpollDescriptors); - if (epfd == -1) { - char buf[200]; - snprintf (buf, sizeof(buf)-1, "unable to create epoll descriptor: %s", strerror(errno)); - throw std::runtime_error (buf); - } - int cloexec = fcntl (epfd, F_GETFD, 0); - assert (cloexec >= 0); - cloexec |= FD_CLOEXEC; - fcntl (epfd, F_SETFD, cloexec); - - assert (LoopBreakerReader >= 0); - LoopbreakDescriptor *ld = new LoopbreakDescriptor (LoopBreakerReader, this); - assert (ld); - Add (ld); - } - #endif - - #ifdef HAVE_KQUEUE - if (Poller == Poller_Kqueue) { - kqfd = kqueue(); - if (kqfd == -1) { - char buf[200]; - snprintf (buf, sizeof(buf)-1, "unable to create kqueue descriptor: %s", strerror(errno)); - throw std::runtime_error (buf); - } - // cloexec not needed. By definition, kqueues are not carried across forks. - - assert (LoopBreakerReader >= 0); - LoopbreakDescriptor *ld = new LoopbreakDescriptor (LoopBreakerReader, this); - assert (ld); - Add (ld); - } - #endif -} - -/*************************** -EventMachine_t::_UpdateTime -***************************/ - -void EventMachine_t::_UpdateTime() -{ - MyCurrentLoopTime = GetRealTime(); -} - -/*************************** -EventMachine_t::GetRealTime -***************************/ - -// Two great writeups of cross-platform monotonic time are at: -// http://www.python.org/dev/peps/pep-0418 -// http://nadeausoftware.com/articles/2012/04/c_c_tip_how_measure_elapsed_real_time_benchmarking -// Uncomment the #pragma messages to confirm which compile-time option was used -uint64_t EventMachine_t::GetRealTime() -{ - uint64_t current_time; - - #if defined(HAVE_CONST_CLOCK_MONOTONIC_RAW) - // #pragma message "GetRealTime: clock_gettime CLOCK_MONOTONIC_RAW" - // Linux 2.6.28 and above - struct timespec tv; - clock_gettime (CLOCK_MONOTONIC_RAW, &tv); - current_time = (((uint64_t)(tv.tv_sec)) * 1000000LL) + ((uint64_t)((tv.tv_nsec)/1000)); - - #elif defined(HAVE_CONST_CLOCK_MONOTONIC) - // #pragma message "GetRealTime: clock_gettime CLOCK_MONOTONIC" - // Linux, FreeBSD 5.0 and above, Solaris 8 and above, OpenBSD, NetBSD, DragonflyBSD - struct timespec tv; - clock_gettime (CLOCK_MONOTONIC, &tv); - current_time = (((uint64_t)(tv.tv_sec)) * 1000000LL) + ((uint64_t)((tv.tv_nsec)/1000)); - - #elif defined(HAVE_GETHRTIME) - // #pragma message "GetRealTime: gethrtime" - // Solaris and HP-UX - current_time = (uint64_t)gethrtime() / 1000; - - #elif defined(OS_DARWIN) - // #pragma message "GetRealTime: mach_absolute_time" - // Mac OS X - // https://developer.apple.com/library/mac/qa/qa1398/_index.html - current_time = mach_absolute_time() * mach_timebase.numer / mach_timebase.denom / 1000; - - #elif defined(OS_UNIX) - // #pragma message "GetRealTime: gettimeofday" - // Unix fallback - struct timeval tv; - gettimeofday (&tv, NULL); - current_time = (((uint64_t)(tv.tv_sec)) * 1000000LL) + ((uint64_t)(tv.tv_usec)); - - #elif defined(OS_WIN32) - // #pragma message "GetRealTime: GetTickCount" - // Future improvement: use GetTickCount64 in Windows Vista / Server 2008 - unsigned tick = GetTickCount(); - if (tick < LastTickCount) - TickCountTickover += 1; - LastTickCount = tick; - current_time = ((uint64_t)TickCountTickover << 32) + (uint64_t)tick; - current_time *= 1000; // convert to microseconds - - #else - // #pragma message "GetRealTime: time" - // Universal fallback - current_time = (uint64_t)time(NULL) * 1000000LL; - #endif - - return current_time; -} - -/*********************************** -EventMachine_t::_DispatchHeartbeats -***********************************/ - -void EventMachine_t::_DispatchHeartbeats() -{ - // Store the first processed heartbeat descriptor and bail out if - // we see it again. This fixes an infinite loop in case the system time - // is changed out from underneath MyCurrentLoopTime. - const EventableDescriptor *head = NULL; - - while (true) { - std::multimap::iterator i = Heartbeats.begin(); - if (i == Heartbeats.end()) - break; - if (i->first > MyCurrentLoopTime) - break; - - EventableDescriptor *ed = i->second; - if (ed == head) - break; - - ed->Heartbeat(); - QueueHeartbeat(ed); - - if (head == NULL) - head = ed; - } -} - -/****************************** -EventMachine_t::QueueHeartbeat -******************************/ - -void EventMachine_t::QueueHeartbeat(EventableDescriptor *ed) -{ - uint64_t heartbeat = ed->GetNextHeartbeat(); - - if (heartbeat) { - #ifndef HAVE_MAKE_PAIR - Heartbeats.insert (std::multimap::value_type (heartbeat, ed)); - #else - Heartbeats.insert (std::make_pair (heartbeat, ed)); - #endif - } -} - -/****************************** -EventMachine_t::ClearHeartbeat -******************************/ - -void EventMachine_t::ClearHeartbeat(uint64_t key, EventableDescriptor* ed) -{ - std::multimap::iterator it; - std::pair::iterator,std::multimap::iterator> ret; - ret = Heartbeats.equal_range (key); - for (it = ret.first; it != ret.second; ++it) { - if (it->second == ed) { - Heartbeats.erase (it); - break; - } - } -} - -/******************* -EventMachine_t::Run -*******************/ - -void EventMachine_t::Run() -{ - while (RunOnce()) ; -} - -/*********************** -EventMachine_t::RunOnce -***********************/ - -bool EventMachine_t::RunOnce() -{ - _UpdateTime(); - _RunTimers(); - - /* _Add must precede _Modify because the same descriptor might - * be on both lists during the same pass through the machine, - * and to modify a descriptor before adding it would fail. - */ - _AddNewDescriptors(); - _ModifyDescriptors(); - - switch (Poller) { - case Poller_Epoll: - _RunEpollOnce(); - break; - case Poller_Kqueue: - _RunKqueueOnce(); - break; - case Poller_Default: - _RunSelectOnce(); - break; - } - - _DispatchHeartbeats(); - _CleanupSockets(); - - if (bTerminateSignalReceived) - return false; - - return true; -} - - -/***************************** -EventMachine_t::_RunEpollOnce -*****************************/ - -void EventMachine_t::_RunEpollOnce() -{ - #ifdef HAVE_EPOLL - assert (epfd != -1); - int s; - - timeval tv = _TimeTilNextEvent(); - - #ifdef BUILD_FOR_RUBY - int ret = 0; - - #ifdef HAVE_RB_WAIT_FOR_SINGLE_FD - if ((ret = rb_wait_for_single_fd(epfd, RB_WAITFD_IN|RB_WAITFD_PRI, &tv)) < 1) { - #else - fd_set fdreads; - - FD_ZERO(&fdreads); - FD_SET(epfd, &fdreads); - - if ((ret = rb_thread_select(epfd + 1, &fdreads, NULL, NULL, &tv)) < 1) { - #endif - if (ret == -1) { - assert(errno != EINVAL); - assert(errno != EBADF); - } - return; - } - - TRAP_BEG; - s = epoll_wait (epfd, epoll_events, MaxEvents, 0); - TRAP_END; - #else - int duration = 0; - duration = duration + (tv.tv_sec * 1000); - duration = duration + (tv.tv_usec / 1000); - s = epoll_wait (epfd, epoll_events, MaxEvents, duration); - #endif - - if (s > 0) { - for (int i=0; i < s; i++) { - EventableDescriptor *ed = (EventableDescriptor*) epoll_events[i].data.ptr; - - if (ed->IsWatchOnly() && ed->GetSocket() == INVALID_SOCKET) - continue; - - assert(ed->GetSocket() != INVALID_SOCKET); - - if (epoll_events[i].events & EPOLLIN) - ed->Read(); - if (epoll_events[i].events & EPOLLOUT) - ed->Write(); - if (epoll_events[i].events & (EPOLLERR | EPOLLHUP)) - ed->HandleError(); - } - } - else if (s < 0) { - // epoll_wait can fail on error in a handful of ways. - // If this happens, then wait for a little while to avoid busy-looping. - // If the error was EINTR, we probably caught SIGCHLD or something, - // so keep the wait short. - timeval tv = {0, ((errno == EINTR) ? 5 : 50) * 1000}; - EmSelect (0, NULL, NULL, NULL, &tv); - } - #else - throw std::runtime_error ("epoll is not implemented on this platform"); - #endif -} - - -/****************************** -EventMachine_t::_RunKqueueOnce -******************************/ - -#ifdef HAVE_KQUEUE -void EventMachine_t::_RunKqueueOnce() -{ - assert (kqfd != -1); - int k; - - timeval tv = _TimeTilNextEvent(); - - struct timespec ts; - ts.tv_sec = tv.tv_sec; - ts.tv_nsec = tv.tv_usec * 1000; - - #ifdef BUILD_FOR_RUBY - int ret = 0; - - #ifdef HAVE_RB_WAIT_FOR_SINGLE_FD - if ((ret = rb_wait_for_single_fd(kqfd, RB_WAITFD_IN|RB_WAITFD_PRI, &tv)) < 1) { - #else - fd_set fdreads; - - FD_ZERO(&fdreads); - FD_SET(kqfd, &fdreads); - - if ((ret = rb_thread_select(kqfd + 1, &fdreads, NULL, NULL, &tv)) < 1) { - #endif - if (ret == -1) { - assert(errno != EINVAL); - assert(errno != EBADF); - } - return; - } - - TRAP_BEG; - ts.tv_sec = ts.tv_nsec = 0; - k = kevent (kqfd, NULL, 0, Karray, MaxEvents, &ts); - TRAP_END; - #else - k = kevent (kqfd, NULL, 0, Karray, MaxEvents, &ts); - #endif - - struct kevent *ke = Karray; - while (k > 0) { - switch (ke->filter) - { - case EVFILT_VNODE: - _HandleKqueueFileEvent (ke); - break; - - case EVFILT_PROC: - _HandleKqueuePidEvent (ke); - break; - - case EVFILT_READ: - case EVFILT_WRITE: - EventableDescriptor *ed = (EventableDescriptor*) (ke->udata); - assert (ed); - - if (ed->IsWatchOnly() && ed->GetSocket() == INVALID_SOCKET) - break; - - if (ke->filter == EVFILT_READ) - ed->Read(); - else if (ke->filter == EVFILT_WRITE) - ed->Write(); - else - std::cerr << "Discarding unknown kqueue event " << ke->filter << std::endl; - - break; - } - - --k; - ++ke; - } - - // TODO, replace this with rb_thread_blocking_region for 1.9 builds. - #ifdef BUILD_FOR_RUBY - if (!rb_thread_alone()) { - rb_thread_schedule(); - } - #endif -} -#else -void EventMachine_t::_RunKqueueOnce() -{ - throw std::runtime_error ("kqueue is not implemented on this platform"); -} -#endif - - -/********************************* -EventMachine_t::_TimeTilNextEvent -*********************************/ - -timeval EventMachine_t::_TimeTilNextEvent() -{ - // 29jul11: Changed calculation base from MyCurrentLoopTime to the - // real time. As MyCurrentLoopTime is set at the beginning of an - // iteration and this calculation is done at the end, evenmachine - // will potentially oversleep by the amount of time the iteration - // took to execute. - uint64_t next_event = 0; - uint64_t current_time = GetRealTime(); - - if (!Heartbeats.empty()) { - std::multimap::iterator heartbeats = Heartbeats.begin(); - next_event = heartbeats->first; - } - - if (!Timers.empty()) { - std::multimap::iterator timers = Timers.begin(); - if (next_event == 0 || timers->first < next_event) - next_event = timers->first; - } - - if (!NewDescriptors.empty() || !ModifiedDescriptors.empty()) { - next_event = current_time; - } - - timeval tv; - - if (NumCloseScheduled > 0 || bTerminateSignalReceived) { - tv.tv_sec = tv.tv_usec = 0; - } else if (next_event == 0) { - tv = Quantum; - } else { - if (next_event > current_time) { - uint64_t duration = next_event - current_time; - tv.tv_sec = duration / 1000000; - tv.tv_usec = duration % 1000000; - } else { - tv.tv_sec = tv.tv_usec = 0; - } - } - - return tv; -} - -/******************************* -EventMachine_t::_CleanupSockets -*******************************/ - -void EventMachine_t::_CleanupSockets() -{ - // TODO, rip this out and only delete the descriptors we know have died, - // rather than traversing the whole list. - // Modified 05Jan08 per suggestions by Chris Heath. It's possible that - // an EventableDescriptor will have a descriptor value of -1. That will - // happen if EventableDescriptor::Close was called on it. In that case, - // don't call epoll_ctl to remove the socket's filters from the epoll set. - // According to the epoll docs, this happens automatically when the - // descriptor is closed anyway. This is different from the case where - // the socket has already been closed but the descriptor in the ED object - // hasn't yet been set to INVALID_SOCKET. - // In kqueue, closing a descriptor automatically removes its event filters. - int i, j; - int nSockets = Descriptors.size(); - for (i=0, j=0; i < nSockets; i++) { - EventableDescriptor *ed = Descriptors[i]; - assert (ed); - if (ed->ShouldDelete()) { - #ifdef HAVE_EPOLL - if (Poller == Poller_Epoll) { - assert (epfd != -1); - if (ed->GetSocket() != INVALID_SOCKET) { - int e = epoll_ctl (epfd, EPOLL_CTL_DEL, ed->GetSocket(), ed->GetEpollEvent()); - // ENOENT or EBADF are not errors because the socket may be already closed when we get here. - if (e && (errno != ENOENT) && (errno != EBADF) && (errno != EPERM)) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to delete epoll event: %s", strerror(errno)); - throw std::runtime_error (buf); - } - } - ModifiedDescriptors.erase(ed); - } - #endif - delete ed; - } - else - Descriptors [j++] = ed; - } - while ((size_t)j < Descriptors.size()) - Descriptors.pop_back(); -} - -/********************************* -EventMachine_t::_ModifyEpollEvent -*********************************/ - -#ifdef HAVE_EPOLL -void EventMachine_t::_ModifyEpollEvent (EventableDescriptor *ed) -{ - if (Poller == Poller_Epoll) { - assert (epfd != -1); - assert (ed); - assert (ed->GetSocket() != INVALID_SOCKET); - int e = epoll_ctl (epfd, EPOLL_CTL_MOD, ed->GetSocket(), ed->GetEpollEvent()); - if (e) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to modify epoll event: %s", strerror(errno)); - throw std::runtime_error (buf); - } - } -} -#else -void EventMachine_t::_ModifyEpollEvent (EventableDescriptor *ed UNUSED) { } -#endif - - -/************************** -SelectData_t::SelectData_t -**************************/ - -SelectData_t::SelectData_t() -{ - maxsocket = 0; - rb_fd_init (&fdreads); - rb_fd_init (&fdwrites); - rb_fd_init (&fderrors); -} - -SelectData_t::~SelectData_t() -{ - rb_fd_term (&fdreads); - rb_fd_term (&fdwrites); - rb_fd_term (&fderrors); -} - -#ifdef BUILD_FOR_RUBY -/***************** -_SelectDataSelect -*****************/ - -#if defined(HAVE_RB_THREAD_BLOCKING_REGION) || defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL) -static VALUE _SelectDataSelect (void *v) -{ - SelectData_t *sd = (SelectData_t*)v; - sd->nSockets = rb_fd_select (sd->maxsocket+1, &(sd->fdreads), &(sd->fdwrites), &(sd->fderrors), &(sd->tv)); - return Qnil; -} -#endif - -/********************* -SelectData_t::_Select -*********************/ - -int SelectData_t::_Select() -{ - #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL) - // added in ruby 1.9.3 - rb_thread_call_without_gvl ((void *(*)(void *))_SelectDataSelect, (void*)this, RUBY_UBF_IO, 0); - return nSockets; - #elif defined(HAVE_TBR) - // added in ruby 1.9.1, deprecated in ruby 2.0.0 - rb_thread_blocking_region (_SelectDataSelect, (void*)this, RUBY_UBF_IO, 0); - return nSockets; - #else - return EmSelect (maxsocket+1, &fdreads, &fdwrites, &fderrors, &tv); - #endif -} -#endif - -void SelectData_t::_Clear() -{ - maxsocket = 0; - rb_fd_zero (&fdreads); - rb_fd_zero (&fdwrites); - rb_fd_zero (&fderrors); -} - -/****************************** -EventMachine_t::_RunSelectOnce -******************************/ - -void EventMachine_t::_RunSelectOnce() -{ - // Crank the event machine once. - // If there are no descriptors to process, then sleep - // for a few hundred mills to avoid busy-looping. - // This is based on a select loop. Alternately provide epoll - // if we know we're running on a 2.6 kernel. - // epoll will be effective if we provide it as an alternative, - // however it has the same problem interoperating with Ruby - // threads that select does. - - // Get ready for select() - SelectData->_Clear(); - - // Always read the loop-breaker reader. - // Changed 23Aug06, provisionally implemented for Windows with a UDP socket - // running on localhost with a randomly-chosen port. (*Puke*) - // Windows has a version of the Unix pipe() library function, but it doesn't - // give you back descriptors that are selectable. - rb_fd_set (LoopBreakerReader, &(SelectData->fdreads)); - if (SelectData->maxsocket < LoopBreakerReader) - SelectData->maxsocket = LoopBreakerReader; - - // prepare the sockets for reading and writing - size_t i; - for (i = 0; i < Descriptors.size(); i++) { - EventableDescriptor *ed = Descriptors[i]; - assert (ed); - SOCKET sd = ed->GetSocket(); - if (ed->IsWatchOnly() && sd == INVALID_SOCKET) - continue; - assert (sd != INVALID_SOCKET); - - if (ed->SelectForRead()) - rb_fd_set (sd, &(SelectData->fdreads)); - if (ed->SelectForWrite()) - rb_fd_set (sd, &(SelectData->fdwrites)); - - #ifdef OS_WIN32 - /* 21Sep09: on windows, a non-blocking connect() that fails does not come up as writable. - Instead, it is added to the error set. See http://www.mail-archive.com/openssl-users@openssl.org/msg58500.html - */ - if (ed->IsConnectPending()) - rb_fd_set (sd, &(SelectData->fderrors)); - #endif - - if (SelectData->maxsocket < sd) - SelectData->maxsocket = sd; - } - - - { // read and write the sockets - //timeval tv = {1, 0}; // Solaris fails if the microseconds member is >= 1000000. - //timeval tv = Quantum; - SelectData->tv = _TimeTilNextEvent(); - int s = SelectData->_Select(); - //rb_thread_blocking_region(xxx,(void*)&SelectData,RUBY_UBF_IO,0); - //int s = EmSelect (SelectData.maxsocket+1, &(SelectData.fdreads), &(SelectData.fdwrites), NULL, &(SelectData.tv)); - //int s = SelectData.nSockets; - if (s > 0) { - /* Changed 01Jun07. We used to handle the Loop-breaker right here. - * Now we do it AFTER all the regular descriptors. There's an - * incredibly important and subtle reason for this. Code on - * loop breakers is sometimes used to cause the reactor core to - * cycle (for example, to allow outbound network buffers to drain). - * If a loop-breaker handler reschedules itself (say, after determining - * that the write buffers are still too full), then it will execute - * IMMEDIATELY if _ReadLoopBreaker is done here instead of after - * the other descriptors are processed. That defeats the whole purpose. - */ - for (i=0; i < Descriptors.size(); i++) { - EventableDescriptor *ed = Descriptors[i]; - assert (ed); - SOCKET sd = ed->GetSocket(); - if (ed->IsWatchOnly() && sd == INVALID_SOCKET) - continue; - assert (sd != INVALID_SOCKET); - - if (rb_fd_isset (sd, &(SelectData->fdwrites))) { - // Double-check SelectForWrite() still returns true. If not, one of the callbacks must have - // modified some value since we checked SelectForWrite() earlier in this method. - if (ed->SelectForWrite()) - ed->Write(); - } - if (rb_fd_isset (sd, &(SelectData->fdreads))) - ed->Read(); - if (rb_fd_isset (sd, &(SelectData->fderrors))) - ed->HandleError(); - } - - if (rb_fd_isset (LoopBreakerReader, &(SelectData->fdreads))) - _ReadLoopBreaker(); - } - else if (s < 0) { - switch (errno) { - case EBADF: - _CleanBadDescriptors(); - break; - case EINVAL: - throw std::runtime_error ("Somehow EM passed an invalid nfds or invalid timeout to select(2), please report this!"); - break; - default: - // select can fail on error in a handful of ways. - // If this happens, then wait for a little while to avoid busy-looping. - // If the error was EINTR, we probably caught SIGCHLD or something, - // so keep the wait short. - timeval tv = {0, ((errno == EINTR) ? 5 : 50) * 1000}; - EmSelect (0, NULL, NULL, NULL, &tv); - } - } - } -} - -void EventMachine_t::_CleanBadDescriptors() -{ - size_t i; - - for (i = 0; i < Descriptors.size(); i++) { - EventableDescriptor *ed = Descriptors[i]; - if (ed->ShouldDelete()) - continue; - - SOCKET sd = ed->GetSocket(); - - struct timeval tv; - tv.tv_sec = 0; - tv.tv_usec = 0; - - rb_fdset_t fds; - rb_fd_init(&fds); - rb_fd_set(sd, &fds); - - int ret = rb_fd_select(sd + 1, &fds, NULL, NULL, &tv); - rb_fd_term(&fds); - - if (ret == -1) { - if (errno == EBADF) - ed->ScheduleClose(false); - } - } -} - -/******************************** -EventMachine_t::_ReadLoopBreaker -********************************/ - -void EventMachine_t::_ReadLoopBreaker() -{ - /* The loop breaker has selected readable. - * Read it ONCE (it may block if we try to read it twice) - * and send a loop-break event back to user code. - */ - char buffer [1024]; - (void)read (LoopBreakerReader, buffer, sizeof(buffer)); - if (EventCallback) - (*EventCallback)(0, EM_LOOPBREAK_SIGNAL, "", 0); -} - - -/************************** -EventMachine_t::_RunTimers -**************************/ - -void EventMachine_t::_RunTimers() -{ - // These are caller-defined timer handlers. - // We rely on the fact that multimaps sort by their keys to avoid - // inspecting the whole list every time we come here. - // Just keep inspecting and processing the list head until we hit - // one that hasn't expired yet. - - while (true) { - std::multimap::iterator i = Timers.begin(); - if (i == Timers.end()) - break; - if (i->first > MyCurrentLoopTime) - break; - if (EventCallback) - (*EventCallback) (0, EM_TIMER_FIRED, NULL, i->second.GetBinding()); - Timers.erase (i); - } -} - - - -/*********************************** -EventMachine_t::InstallOneshotTimer -***********************************/ - -const uintptr_t EventMachine_t::InstallOneshotTimer (uint64_t milliseconds) -{ - if (Timers.size() > MaxOutstandingTimers) - return false; - - uint64_t fire_at = GetRealTime(); - fire_at += ((uint64_t)milliseconds) * 1000LL; - - Timer_t t; - #ifndef HAVE_MAKE_PAIR - std::multimap::iterator i = Timers.insert (std::multimap::value_type (fire_at, t)); - #else - std::multimap::iterator i = Timers.insert (std::make_pair (fire_at, t)); - #endif - return i->second.GetBinding(); -} - - -/******************************* -EventMachine_t::ConnectToServer -*******************************/ - -const uintptr_t EventMachine_t::ConnectToServer (const char *bind_addr, int bind_port, const char *server, int port) -{ - /* We want to spend no more than a few seconds waiting for a connection - * to a remote host. So we use a nonblocking connect. - * Linux disobeys the usual rules for nonblocking connects. - * Per Stevens (UNP p.410), you expect a nonblocking connect to select - * both readable and writable on error, and not to return EINPROGRESS - * if the connect can be fulfilled immediately. Linux violates both - * of these expectations. - * Any kind of nonblocking connect on Linux returns EINPROGRESS. - * The socket will then return writable when the disposition of the - * connect is known, but it will not also be readable in case of - * error! Weirdly, it will be readable in case there is data to read!!! - * (Which can happen with protocols like SSH and SMTP.) - * I suppose if you were so inclined you could consider this logical, - * but it's not the way Unix has historically done it. - * So we ignore the readable flag and read getsockopt to see if there - * was an error connecting. A select timeout works as expected. - * In regard to getsockopt: Linux does the Berkeley-style thing, - * not the Solaris-style, and returns zero with the error code in - * the error parameter. - * Return the binding-text of the newly-created pending connection, - * or NULL if there was a problem. - */ - - if (!server || !*server || !port) - throw std::runtime_error ("invalid server or port"); - - struct sockaddr_storage bind_as; - size_t bind_as_len = sizeof bind_as; - int gai = name2address (server, port, SOCK_STREAM, (struct sockaddr *)&bind_as, &bind_as_len); - if (gai != 0) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to resolve address: %s", gai_strerror(gai)); - throw std::runtime_error (buf); - } - - SOCKET sd = EmSocket (bind_as.ss_family, SOCK_STREAM, 0); - if (sd == INVALID_SOCKET) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to create new socket: %s", strerror(errno)); - throw std::runtime_error (buf); - } - - // From here on, ALL error returns must close the socket. - // Set the new socket nonblocking. - if (!SetSocketNonblocking (sd)) { - close (sd); - throw std::runtime_error ("unable to set socket as non-blocking"); - } - // Disable slow-start (Nagle algorithm). - int one = 1; - setsockopt (sd, IPPROTO_TCP, TCP_NODELAY, (char*) &one, sizeof(one)); - // Set reuseaddr to improve performance on restarts - setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, (char*) &one, sizeof(one)); - - if (bind_addr) { - struct sockaddr_storage bind_to; - size_t bind_to_len = sizeof bind_to; - gai = name2address (bind_addr, bind_port, SOCK_STREAM, (struct sockaddr *)&bind_to, &bind_to_len); - if (gai != 0) { - close (sd); - char buf [200]; - snprintf (buf, sizeof(buf)-1, "invalid bind address: %s", gai_strerror(gai)); - throw std::runtime_error (buf); - } - if (bind (sd, (struct sockaddr *)&bind_to, bind_to_len) < 0) { - close (sd); - throw std::runtime_error ("couldn't bind to address"); - } - } - - uintptr_t out = 0; - - #ifdef OS_UNIX - int e_reason = 0; - if (connect (sd, (struct sockaddr *)&bind_as, bind_as_len) == 0) { - // This is a connect success, which Linux appears - // never to give when the socket is nonblocking, - // even if the connection is intramachine or to - // localhost. - - /* Changed this branch 08Aug06. Evidently some kernels - * (FreeBSD for example) will actually return success from - * a nonblocking connect. This is a pretty simple case, - * just set up the new connection and clear the pending flag. - * Thanks to Chris Ochs for helping track this down. - * This branch never gets taken on Linux or (oddly) OSX. - * The original behavior was to throw an unimplemented, - * which the user saw as a fatal exception. Very unfriendly. - * - * Tweaked 10Aug06. Even though the connect disposition is - * known, we still set the connect-pending flag. That way - * some needed initialization will happen in the ConnectionDescriptor. - * (To wit, the ConnectionCompleted event gets sent to the client.) - */ - ConnectionDescriptor *cd = new ConnectionDescriptor (sd, this); - if (!cd) - throw std::runtime_error ("no connection allocated"); - cd->SetConnectPending (true); - Add (cd); - out = cd->GetBinding(); - } - else if (errno == EINPROGRESS) { - // Errno will generally always be EINPROGRESS, but on Linux - // we have to look at getsockopt to be sure what really happened. - int error = 0; - socklen_t len; - len = sizeof(error); - int o = getsockopt (sd, SOL_SOCKET, SO_ERROR, &error, &len); - if ((o == 0) && (error == 0)) { - // Here, there's no disposition. - // Put the connection on the stack and wait for it to complete - // or time out. - ConnectionDescriptor *cd = new ConnectionDescriptor (sd, this); - if (!cd) - throw std::runtime_error ("no connection allocated"); - cd->SetConnectPending (true); - Add (cd); - out = cd->GetBinding(); - } else { - // Fall through to the !out case below. - e_reason = error; - } - } - else { - // The error from connect was something other then EINPROGRESS (EHOSTDOWN, etc). - // Fall through to the !out case below - e_reason = errno; - } - - if (!out) { - /* This could be connection refused or some such thing. - * We will come here on Linux if a localhost connection fails. - * Changed 16Jul06: Originally this branch was a no-op, and - * we'd drop down to the end of the method, close the socket, - * and return NULL, which would cause the caller to GET A - * FATAL EXCEPTION. Now we keep the socket around but schedule an - * immediate close on it, so the caller will get a close-event - * scheduled on it. This was only an issue for localhost connections - * to non-listening ports. We may eventually need to revise this - * revised behavior, in case it causes problems like making it hard - * for people to know that a failure occurred. - */ - ConnectionDescriptor *cd = new ConnectionDescriptor (sd, this); - if (!cd) - throw std::runtime_error ("no connection allocated"); - cd->SetUnbindReasonCode (e_reason); - cd->ScheduleClose (false); - Add (cd); - out = cd->GetBinding(); - } - #endif - - #ifdef OS_WIN32 - if (connect (sd, (struct sockaddr *)&bind_as, bind_as_len) == 0) { - // This is a connect success, which Windows appears - // never to give when the socket is nonblocking, - // even if the connection is intramachine or to - // localhost. - throw std::runtime_error ("unimplemented"); - } - else if (WSAGetLastError() == WSAEWOULDBLOCK) { - // Here, there's no disposition. - // Windows appears not to surface refused connections or - // such stuff at this point. - // Put the connection on the stack and wait for it to complete - // or time out. - ConnectionDescriptor *cd = new ConnectionDescriptor (sd, this); - if (!cd) - throw std::runtime_error ("no connection allocated"); - cd->SetConnectPending (true); - Add (cd); - out = cd->GetBinding(); - } - else { - // The error from connect was something other then WSAEWOULDBLOCK. - } - - #endif - - if (!out) - close (sd); - return out; -} - -/*********************************** -EventMachine_t::ConnectToUnixServer -***********************************/ - -#ifdef OS_UNIX -const uintptr_t EventMachine_t::ConnectToUnixServer (const char *server) -{ - /* Connect to a Unix-domain server, which by definition is running - * on the same host. - * There is no meaningful implementation on Windows. - * There's no need to do a nonblocking connect, since the connection - * is always local and can always be fulfilled immediately. - */ - - uintptr_t out = 0; - - if (!server || !*server) - return 0; - - sockaddr_un pun; - memset (&pun, 0, sizeof(pun)); - pun.sun_family = AF_LOCAL; - - // You ordinarily expect the server name field to be at least 1024 bytes long, - // but on Linux it can be MUCH shorter. - if (strlen(server) >= sizeof(pun.sun_path)) - throw std::runtime_error ("unix-domain server name is too long"); - - - strcpy (pun.sun_path, server); - - SOCKET fd = EmSocket (AF_LOCAL, SOCK_STREAM, 0); - if (fd == INVALID_SOCKET) - return 0; - - // From here on, ALL error returns must close the socket. - // NOTE: At this point, the socket is still a blocking socket. - if (connect (fd, (struct sockaddr*)&pun, sizeof(pun)) != 0) { - close (fd); - return 0; - } - - // Set the newly-connected socket nonblocking. - if (!SetSocketNonblocking (fd)) { - close (fd); - return 0; - } - - // Set up a connection descriptor and add it to the event-machine. - // Observe, even though we know the connection status is connect-success, - // we still set the "pending" flag, so some needed initializations take - // place. - ConnectionDescriptor *cd = new ConnectionDescriptor (fd, this); - if (!cd) - throw std::runtime_error ("no connection allocated"); - cd->SetConnectPending (true); - Add (cd); - out = cd->GetBinding(); - - if (!out) - close (fd); - - return out; -} -#else -const uintptr_t EventMachine_t::ConnectToUnixServer (const char *server UNUSED) -{ - throw std::runtime_error ("unix-domain connection unavailable on this platform"); -} -#endif - -/************************ -EventMachine_t::AttachFD -************************/ - -const uintptr_t EventMachine_t::AttachFD (SOCKET fd, bool watch_mode) -{ - #ifdef OS_UNIX - if (fcntl(fd, F_GETFL, 0) < 0) { - if (errno) { - throw std::runtime_error (strerror(errno)); - } else { - throw std::runtime_error ("invalid file descriptor"); - } - } - #endif - - #ifdef OS_WIN32 - // TODO: add better check for invalid file descriptors (see ioctlsocket or getsockopt) - if (fd == INVALID_SOCKET) - throw std::runtime_error ("invalid file descriptor"); - #endif - - {// Check for duplicate descriptors - size_t i; - for (i = 0; i < Descriptors.size(); i++) { - EventableDescriptor *ed = Descriptors[i]; - assert (ed); - if (ed->GetSocket() == fd) - throw std::runtime_error ("adding existing descriptor"); - } - - for (i = 0; i < NewDescriptors.size(); i++) { - EventableDescriptor *ed = NewDescriptors[i]; - assert (ed); - if (ed->GetSocket() == fd) - throw std::runtime_error ("adding existing new descriptor"); - } - } - - if (!watch_mode) - SetSocketNonblocking(fd); - - ConnectionDescriptor *cd = new ConnectionDescriptor (fd, this); - if (!cd) - throw std::runtime_error ("no connection allocated"); - - cd->SetAttached(true); - cd->SetWatchOnly(watch_mode); - cd->SetConnectPending (false); - - Add (cd); - - const uintptr_t out = cd->GetBinding(); - return out; -} - -/************************ -EventMachine_t::DetachFD -************************/ - -int EventMachine_t::DetachFD (EventableDescriptor *ed) -{ - if (!ed) - throw std::runtime_error ("detaching bad descriptor"); - - SOCKET fd = ed->GetSocket(); - - #ifdef HAVE_EPOLL - if (Poller == Poller_Epoll) { - if (ed->GetSocket() != INVALID_SOCKET) { - assert (epfd != -1); - int e = epoll_ctl (epfd, EPOLL_CTL_DEL, ed->GetSocket(), ed->GetEpollEvent()); - // ENOENT or EBADF are not errors because the socket may be already closed when we get here. - if (e && (errno != ENOENT) && (errno != EBADF)) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to delete epoll event: %s", strerror(errno)); - throw std::runtime_error (buf); - } - } - } - #endif - - #ifdef HAVE_KQUEUE - if (Poller == Poller_Kqueue) { - // remove any read/write events for this fd - struct kevent k; -#ifdef __NetBSD__ - EV_SET (&k, ed->GetSocket(), EVFILT_READ | EVFILT_WRITE, EV_DELETE, 0, 0, (intptr_t)ed); -#else - EV_SET (&k, ed->GetSocket(), EVFILT_READ | EVFILT_WRITE, EV_DELETE, 0, 0, ed); -#endif - int t = kevent (kqfd, &k, 1, NULL, 0, NULL); - if (t < 0 && (errno != ENOENT) && (errno != EBADF)) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to delete kqueue event: %s", strerror(errno)); - throw std::runtime_error (buf); - } - } - #endif - - // Prevent the descriptor from being modified, in case DetachFD was called from a timer or next_tick - ModifiedDescriptors.erase (ed); - - // Prevent the descriptor from being added, in case DetachFD was called in the same tick as AttachFD - for (size_t i = 0; i < NewDescriptors.size(); i++) { - if (ed == NewDescriptors[i]) { - NewDescriptors.erase(NewDescriptors.begin() + i); - break; - } - } - - // Set MySocket = INVALID_SOCKET so ShouldDelete() is true (and the descriptor gets deleted and removed), - // and also to prevent anyone from calling close() on the detached fd - ed->SetSocketInvalid(); - - return fd; -} - -/************ -name2address -************/ - -int EventMachine_t::name2address (const char *server, int port, int socktype, struct sockaddr *addr, size_t *addr_len) -{ - if (!server || !*server) - server = "0.0.0.0"; - - struct addrinfo *ai; - struct addrinfo hints; - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = socktype; - hints.ai_family = AF_UNSPEC; - hints.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG; - - char portstr[12]; - snprintf(portstr, sizeof(portstr), "%u", port); - - int gai = getaddrinfo (server, portstr, &hints, &ai); - if (gai == 0) { - assert (ai->ai_addrlen <= *addr_len); - memcpy (addr, ai->ai_addr, ai->ai_addrlen); - *addr_len = ai->ai_addrlen; - freeaddrinfo(ai); - } - - return gai; -} - - -/******************************* -EventMachine_t::CreateTcpServer -*******************************/ - -const uintptr_t EventMachine_t::CreateTcpServer (const char *server, int port) -{ - /* Create a TCP-acceptor (server) socket and add it to the event machine. - * Return the binding of the new acceptor to the caller. - * This binding will be referenced when the new acceptor sends events - * to indicate accepted connections. - */ - - - struct sockaddr_storage bind_here; - size_t bind_here_len = sizeof bind_here; - if (0 != name2address (server, port, SOCK_STREAM, (struct sockaddr *)&bind_here, &bind_here_len)) - return 0; - - SOCKET sd_accept = EmSocket (bind_here.ss_family, SOCK_STREAM, 0); - if (sd_accept == INVALID_SOCKET) { - goto fail; - } - - { // set reuseaddr to improve performance on restarts. - int oval = 1; - if (setsockopt (sd_accept, SOL_SOCKET, SO_REUSEADDR, (char*)&oval, sizeof(oval)) < 0) { - //__warning ("setsockopt failed while creating listener",""); - goto fail; - } - } - - { // set CLOEXEC. Only makes sense on Unix - #ifdef OS_UNIX - int cloexec = fcntl (sd_accept, F_GETFD, 0); - assert (cloexec >= 0); - cloexec |= FD_CLOEXEC; - fcntl (sd_accept, F_SETFD, cloexec); - #endif - } - - - if (bind (sd_accept, (struct sockaddr *)&bind_here, bind_here_len)) { - //__warning ("binding failed"); - goto fail; - } - - if (listen (sd_accept, 100)) { - //__warning ("listen failed"); - goto fail; - } - - return AttachSD(sd_accept); - - fail: - if (sd_accept != INVALID_SOCKET) - close (sd_accept); - return 0; -} - - -/********************************** -EventMachine_t::OpenDatagramSocket -**********************************/ - -const uintptr_t EventMachine_t::OpenDatagramSocket (const char *address, int port) -{ - uintptr_t output_binding = 0; - - struct sockaddr_storage bind_here; - size_t bind_here_len = sizeof bind_here; - if (0 != name2address (address, port, SOCK_DGRAM, (struct sockaddr *)&bind_here, &bind_here_len)) - return 0; - - // from here on, early returns must close the socket! - SOCKET sd = EmSocket (bind_here.ss_family, SOCK_DGRAM, 0); - if (sd == INVALID_SOCKET) - goto fail; - - { // set the SO_REUSEADDR on the socket before we bind, otherwise it won't work for a second one - int oval = 1; - if (setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, (char*)&oval, sizeof(oval)) < 0) - goto fail; - } - - // Set the new socket nonblocking. - if (!SetSocketNonblocking (sd)) - goto fail; - - if (bind (sd, (struct sockaddr *)&bind_here, bind_here_len) != 0) - goto fail; - - { // Looking good. - DatagramDescriptor *ds = new DatagramDescriptor (sd, this); - if (!ds) - throw std::runtime_error ("unable to allocate datagram-socket"); - Add (ds); - output_binding = ds->GetBinding(); - } - - return output_binding; - - fail: - if (sd != INVALID_SOCKET) - close (sd); - return 0; -} - - - -/******************* -EventMachine_t::Add -*******************/ - -void EventMachine_t::Add (EventableDescriptor *ed) -{ - if (!ed) - throw std::runtime_error ("added bad descriptor"); - ed->SetEventCallback (EventCallback); - NewDescriptors.push_back (ed); -} - - -/******************************* -EventMachine_t::ArmKqueueWriter -*******************************/ - -#ifdef HAVE_KQUEUE -void EventMachine_t::ArmKqueueWriter (EventableDescriptor *ed) -{ - if (Poller == Poller_Kqueue) { - if (!ed) - throw std::runtime_error ("added bad descriptor"); - struct kevent k; -#ifdef __NetBSD__ - EV_SET (&k, ed->GetSocket(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, (intptr_t)ed); -#else - EV_SET (&k, ed->GetSocket(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, ed); -#endif - int t = kevent (kqfd, &k, 1, NULL, 0, NULL); - if (t < 0) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "arm kqueue writer failed on %d: %s", ed->GetSocket(), strerror(errno)); - throw std::runtime_error (buf); - } - } -} -#else -void EventMachine_t::ArmKqueueWriter (EventableDescriptor *ed UNUSED) { } -#endif - -/******************************* -EventMachine_t::ArmKqueueReader -*******************************/ - -#ifdef HAVE_KQUEUE -void EventMachine_t::ArmKqueueReader (EventableDescriptor *ed) -{ - if (Poller == Poller_Kqueue) { - if (!ed) - throw std::runtime_error ("added bad descriptor"); - struct kevent k; -#ifdef __NetBSD__ - EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, (intptr_t)ed); -#else - EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, ed); -#endif - int t = kevent (kqfd, &k, 1, NULL, 0, NULL); - if (t < 0) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "arm kqueue reader failed on %d: %s", ed->GetSocket(), strerror(errno)); - throw std::runtime_error (buf); - } - } -} -#else -void EventMachine_t::ArmKqueueReader (EventableDescriptor *ed UNUSED) { } -#endif - -/********************************** -EventMachine_t::_AddNewDescriptors -**********************************/ - -void EventMachine_t::_AddNewDescriptors() -{ - /* Avoid adding descriptors to the main descriptor list - * while we're actually traversing the list. - * Any descriptors that are added as a result of processing timers - * or acceptors should go on a temporary queue and then added - * while we're not traversing the main list. - * Also, it (rarely) happens that a newly-created descriptor - * is immediately scheduled to close. It might be a good - * idea not to bother scheduling these for I/O but if - * we do that, we might bypass some important processing. - */ - - for (size_t i = 0; i < NewDescriptors.size(); i++) { - EventableDescriptor *ed = NewDescriptors[i]; - if (ed == NULL) - throw std::runtime_error ("adding bad descriptor"); - - #if HAVE_EPOLL - if (Poller == Poller_Epoll) { - assert (epfd != -1); - int e = epoll_ctl (epfd, EPOLL_CTL_ADD, ed->GetSocket(), ed->GetEpollEvent()); - if (e) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to add new descriptor: %s", strerror(errno)); - throw std::runtime_error (buf); - } - } - #endif - - #if HAVE_KQUEUE - /* - if (Poller == Poller_Kqueue) { - // INCOMPLETE. Some descriptors don't want to be readable. - assert (kqfd != -1); - struct kevent k; -#ifdef __NetBSD__ - EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, (intptr_t)ed); -#else - EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, ed); -#endif - int t = kevent (kqfd, &k, 1, NULL, 0, NULL); - assert (t == 0); - } - */ - #endif - - QueueHeartbeat(ed); - Descriptors.push_back (ed); - } - NewDescriptors.clear(); -} - - -/********************************** -EventMachine_t::_ModifyDescriptors -**********************************/ - -void EventMachine_t::_ModifyDescriptors() -{ - /* For implementations which don't level check every descriptor on - * every pass through the machine, as select does. - * If we're not selecting, then descriptors need a way to signal to the - * machine that their readable or writable status has changed. - * That's what the ::Modify call is for. We do it this way to avoid - * modifying descriptors during the loop traversal, where it can easily - * happen that an object (like a UDP socket) gets data written on it by - * the application during #post_init. That would take place BEFORE the - * descriptor even gets added to the epoll descriptor, so the modify - * operation will crash messily. - * Another really messy possibility is for a descriptor to put itself - * on the Modified list, and then get deleted before we get here. - * Remember, deletes happen after the I/O traversal and before the - * next pass through here. So we have to make sure when we delete a - * descriptor to remove it from the Modified list. - */ - - #ifdef HAVE_EPOLL - if (Poller == Poller_Epoll) { - std::set::iterator i = ModifiedDescriptors.begin(); - while (i != ModifiedDescriptors.end()) { - assert (*i); - _ModifyEpollEvent (*i); - ++i; - } - } - #endif - - #ifdef HAVE_KQUEUE - if (Poller == Poller_Kqueue) { - std::set::iterator i = ModifiedDescriptors.begin(); - while (i != ModifiedDescriptors.end()) { - assert (*i); - if ((*i)->GetKqueueArmWrite()) - ArmKqueueWriter (*i); - ++i; - } - } - #endif - - ModifiedDescriptors.clear(); -} - - -/********************** -EventMachine_t::Modify -**********************/ - -void EventMachine_t::Modify (EventableDescriptor *ed) -{ - if (!ed) - throw std::runtime_error ("modified bad descriptor"); - ModifiedDescriptors.insert (ed); -} - - -/*********************** -EventMachine_t::Deregister -***********************/ - -void EventMachine_t::Deregister (EventableDescriptor *ed) -{ - if (!ed) - throw std::runtime_error ("modified bad descriptor"); - #ifdef HAVE_EPOLL - // cut/paste from _CleanupSockets(). The error handling could be - // refactored out of there, but it is cut/paste all over the - // file already. - if (Poller == Poller_Epoll) { - assert (epfd != -1); - assert (ed->GetSocket() != INVALID_SOCKET); - int e = epoll_ctl (epfd, EPOLL_CTL_DEL, ed->GetSocket(), ed->GetEpollEvent()); - // ENOENT or EBADF are not errors because the socket may be already closed when we get here. - if (e && (errno != ENOENT) && (errno != EBADF) && (errno != EPERM)) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "unable to delete epoll event: %s", strerror(errno)); - throw std::runtime_error (buf); - } - ModifiedDescriptors.erase(ed); - } - #endif - - #ifdef HAVE_KQUEUE - if (Poller == Poller_Kqueue) { - assert (ed->GetSocket() != INVALID_SOCKET); - - ModifiedDescriptors.erase(ed); - } - #endif -} - - -/************************************** -EventMachine_t::CreateUnixDomainServer -**************************************/ - -#ifdef OS_UNIX -const uintptr_t EventMachine_t::CreateUnixDomainServer (const char *filename) -{ - /* Create a UNIX-domain acceptor (server) socket and add it to the event machine. - * Return the binding of the new acceptor to the caller. - * This binding will be referenced when the new acceptor sends events - * to indicate accepted connections. - * THERE IS NO MEANINGFUL IMPLEMENTATION ON WINDOWS. - */ - - struct sockaddr_un s_sun; - - SOCKET sd_accept = EmSocket (AF_LOCAL, SOCK_STREAM, 0); - if (sd_accept == INVALID_SOCKET) { - goto fail; - } - - if (!filename || !*filename) - goto fail; - unlink (filename); - - bzero (&s_sun, sizeof(s_sun)); - s_sun.sun_family = AF_LOCAL; - strncpy (s_sun.sun_path, filename, sizeof(s_sun.sun_path)-1); - - // don't bother with reuseaddr for a local socket. - - { // set CLOEXEC. Only makes sense on Unix - #ifdef OS_UNIX - int cloexec = fcntl (sd_accept, F_GETFD, 0); - assert (cloexec >= 0); - cloexec |= FD_CLOEXEC; - fcntl (sd_accept, F_SETFD, cloexec); - #endif - } - - if (bind (sd_accept, (struct sockaddr*)&s_sun, sizeof(s_sun))) { - //__warning ("binding failed"); - goto fail; - } - - if (listen (sd_accept, 100)) { - //__warning ("listen failed"); - goto fail; - } - - return AttachSD(sd_accept); - - fail: - if (sd_accept != INVALID_SOCKET) - close (sd_accept); - return 0; -} -#else -const uintptr_t EventMachine_t::CreateUnixDomainServer (const char *filename UNUSED) -{ - throw std::runtime_error ("unix-domain server unavailable on this platform"); -} -#endif - - -/************************************** -EventMachine_t::AttachSD -**************************************/ - -const uintptr_t EventMachine_t::AttachSD (SOCKET sd_accept) -{ - uintptr_t output_binding = 0; - - { - // Set the acceptor non-blocking. - // THIS IS CRUCIALLY IMPORTANT because we read it in a select loop. - if (!SetSocketNonblocking (sd_accept)) { - //int val = fcntl (sd_accept, F_GETFL, 0); - //if (fcntl (sd_accept, F_SETFL, val | O_NONBLOCK) == -1) { - goto fail; - } - } - - { // Looking good. - AcceptorDescriptor *ad = new AcceptorDescriptor (sd_accept, this); - if (!ad) - throw std::runtime_error ("unable to allocate acceptor"); - Add (ad); - output_binding = ad->GetBinding(); - } - - return output_binding; - - fail: - if (sd_accept != INVALID_SOCKET) - close (sd_accept); - return 0; -} - - -/************************** -EventMachine_t::Socketpair -**************************/ - -#ifdef OS_UNIX -const uintptr_t EventMachine_t::Socketpair (char * const * cmd_strings) -{ - // Make sure the incoming array of command strings is sane. - if (!cmd_strings) - return 0; - int j; - for (j=0; j < 2048 && cmd_strings[j]; j++) - ; - if ((j==0) || (j==2048)) - return 0; - - uintptr_t output_binding = 0; - - int sv[2]; - if (socketpair (AF_LOCAL, SOCK_STREAM, 0, sv) < 0) - return 0; - // from here, all early returns must close the pair of sockets. - - // Set the parent side of the socketpair nonblocking. - // We don't care about the child side, and most child processes will expect their - // stdout to be blocking. Thanks to Duane Johnson and Bill Kelly for pointing this out. - // Obviously DON'T set CLOEXEC. - if (!SetSocketNonblocking (sv[0])) { - close (sv[0]); - close (sv[1]); - return 0; - } - - pid_t f = fork(); - if (f > 0) { - close (sv[1]); - PipeDescriptor *pd = new PipeDescriptor (sv[0], f, this); - if (!pd) - throw std::runtime_error ("unable to allocate pipe"); - Add (pd); - output_binding = pd->GetBinding(); - } - else if (f == 0) { - close (sv[0]); - dup2 (sv[1], STDIN_FILENO); - close (sv[1]); - dup2 (STDIN_FILENO, STDOUT_FILENO); - execvp (cmd_strings[0], cmd_strings+1); - exit (-1); // end the child process if the exec doesn't work. - } - else - throw std::runtime_error ("no fork"); - - return output_binding; -} -#else -const uintptr_t EventMachine_t::Socketpair (char * const * cmd_strings UNUSED) -{ - throw std::runtime_error ("socketpair is currently unavailable on this platform"); -} -#endif - - - -/**************************** -EventMachine_t::OpenKeyboard -****************************/ - -const uintptr_t EventMachine_t::OpenKeyboard() -{ - KeyboardDescriptor *kd = new KeyboardDescriptor (this); - if (!kd) - throw std::runtime_error ("no keyboard-object allocated"); - Add (kd); - return kd->GetBinding(); -} - - -/********************************** -EventMachine_t::GetConnectionCount -**********************************/ - -int EventMachine_t::GetConnectionCount () -{ - int i = 0; - // Subtract one for epoll or kqueue because of the LoopbreakDescriptor - if (Poller == Poller_Epoll || Poller == Poller_Kqueue) - i = 1; - - return Descriptors.size() + NewDescriptors.size() - i; -} - - -/************************ -EventMachine_t::WatchPid -************************/ - -#ifdef HAVE_KQUEUE -const uintptr_t EventMachine_t::WatchPid (int pid) -{ - if (Poller != Poller_Kqueue) - throw std::runtime_error("must enable kqueue (EM.kqueue=true) for pid watching support"); - - struct kevent event; - int kqres; - - EV_SET(&event, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT | NOTE_FORK, 0, 0); - - // Attempt to register the event - kqres = kevent(kqfd, &event, 1, NULL, 0, NULL); - if (kqres == -1) { - char errbuf[200]; - sprintf(errbuf, "failed to register file watch descriptor with kqueue: %s", strerror(errno)); - throw std::runtime_error(errbuf); - } - Bindable_t* b = new Bindable_t(); - Pids.insert(std::make_pair (pid, b)); - - return b->GetBinding(); -} -#else -const uintptr_t EventMachine_t::WatchPid (int pid UNUSED) -{ - throw std::runtime_error("no pid watching support on this system"); -} -#endif - -/************************** -EventMachine_t::UnwatchPid -**************************/ - -void EventMachine_t::UnwatchPid (int pid) -{ - Bindable_t *b = Pids[pid]; - assert(b); - Pids.erase(pid); - - #ifdef HAVE_KQUEUE - struct kevent k; - - EV_SET(&k, pid, EVFILT_PROC, EV_DELETE, 0, 0, 0); - /*int t =*/ kevent (kqfd, &k, 1, NULL, 0, NULL); - // t==-1 if the process already exited; ignore this for now - #endif - - if (EventCallback) - (*EventCallback)(b->GetBinding(), EM_CONNECTION_UNBOUND, NULL, 0); - - delete b; -} - -void EventMachine_t::UnwatchPid (const uintptr_t sig) -{ - for(std::map::iterator i=Pids.begin(); i != Pids.end(); i++) - { - if (i->second->GetBinding() == sig) { - UnwatchPid (i->first); - return; - } - } - - throw std::runtime_error("attempted to remove invalid pid signature"); -} - - -/************************* -EventMachine_t::WatchFile -*************************/ - -const uintptr_t EventMachine_t::WatchFile (const char *fpath) -{ - struct stat sb; - int sres; - int wd = -1; - - sres = stat(fpath, &sb); - - if (sres == -1) { - char errbuf[300]; - sprintf(errbuf, "error registering file %s for watching: %s", fpath, strerror(errno)); - throw std::runtime_error(errbuf); - } - - #ifdef HAVE_INOTIFY - if (!inotify) { - inotify = new InotifyDescriptor(this); - assert (inotify); - Add(inotify); - } - - wd = inotify_add_watch(inotify->GetSocket(), fpath, - IN_MODIFY | IN_DELETE_SELF | IN_MOVE_SELF | IN_CREATE | IN_DELETE | IN_MOVE) ; - if (wd == -1) { - char errbuf[300]; - sprintf(errbuf, "failed to open file %s for registering with inotify: %s", fpath, strerror(errno)); - throw std::runtime_error(errbuf); - } - #endif - - #ifdef HAVE_KQUEUE - if (Poller != Poller_Kqueue) - throw std::runtime_error("must enable kqueue (EM.kqueue=true) for file watching support"); - - // With kqueue we have to open the file first and use the resulting fd to register for events - wd = open(fpath, O_RDONLY); - if (wd == -1) { - char errbuf[300]; - sprintf(errbuf, "failed to open file %s for registering with kqueue: %s", fpath, strerror(errno)); - throw std::runtime_error(errbuf); - } - _RegisterKqueueFileEvent(wd); - #endif - - if (wd != -1) { - Bindable_t* b = new Bindable_t(); - Files.insert(std::make_pair (wd, b)); - - return b->GetBinding(); - } - - throw std::runtime_error("no file watching support on this system"); // is this the right thing to do? -} - - -/*************************** -EventMachine_t::UnwatchFile -***************************/ - -void EventMachine_t::UnwatchFile (int wd) -{ - Bindable_t *b = Files[wd]; - assert(b); - Files.erase(wd); - - #ifdef HAVE_INOTIFY - inotify_rm_watch(inotify->GetSocket(), wd); - #elif HAVE_KQUEUE - // With kqueue, closing the monitored fd automatically clears all registered events for it - close(wd); - #endif - - if (EventCallback) - (*EventCallback)(b->GetBinding(), EM_CONNECTION_UNBOUND, NULL, 0); - - delete b; -} - -void EventMachine_t::UnwatchFile (const uintptr_t sig) -{ - for(std::map::iterator i=Files.begin(); i != Files.end(); i++) - { - if (i->second->GetBinding() == sig) { - UnwatchFile (i->first); - return; - } - } - throw std::runtime_error("attempted to remove invalid watch signature"); -} - - -/*********************************** -EventMachine_t::_ReadInotify_Events -************************************/ - -void EventMachine_t::_ReadInotifyEvents() -{ - #ifdef HAVE_INOTIFY - char buffer[1024]; - - assert(EventCallback); - - for (;;) { - int returned = read(inotify->GetSocket(), buffer, sizeof(buffer)); - assert(!(returned == 0 || (returned == -1 && errno == EINVAL))); - if (returned <= 0) { - break; - } - int current = 0; - while (current < returned) { - struct inotify_event* event = (struct inotify_event*)(buffer+current); - std::map::const_iterator bindable = Files.find(event->wd); - if (bindable != Files.end()) { - if (event->mask & (IN_MODIFY | IN_CREATE | IN_DELETE | IN_MOVE)){ - (*EventCallback)(bindable->second->GetBinding(), EM_CONNECTION_READ, "modified", 8); - } - if (event->mask & IN_MOVE_SELF){ - (*EventCallback)(bindable->second->GetBinding(), EM_CONNECTION_READ, "moved", 5); - } - if (event->mask & IN_DELETE_SELF) { - (*EventCallback)(bindable->second->GetBinding(), EM_CONNECTION_READ, "deleted", 7); - UnwatchFile ((int)event->wd); - } - } - current += sizeof(struct inotify_event) + event->len; - } - } - #endif -} - - -/************************************* -EventMachine_t::_HandleKqueuePidEvent -*************************************/ - -#ifdef HAVE_KQUEUE -void EventMachine_t::_HandleKqueuePidEvent(struct kevent *event) -{ - assert(EventCallback); - - if (event->fflags & NOTE_FORK) - (*EventCallback)(Pids [(int) event->ident]->GetBinding(), EM_CONNECTION_READ, "fork", 4); - if (event->fflags & NOTE_EXIT) { - (*EventCallback)(Pids [(int) event->ident]->GetBinding(), EM_CONNECTION_READ, "exit", 4); - // stop watching the pid if it died - UnwatchPid ((int)event->ident); - } -} -#endif - - -/************************************** -EventMachine_t::_HandleKqueueFileEvent -***************************************/ - -#ifdef HAVE_KQUEUE -void EventMachine_t::_HandleKqueueFileEvent(struct kevent *event) -{ - assert(EventCallback); - - if (event->fflags & NOTE_WRITE) - (*EventCallback)(Files [(int) event->ident]->GetBinding(), EM_CONNECTION_READ, "modified", 8); - if (event->fflags & NOTE_RENAME) - (*EventCallback)(Files [(int) event->ident]->GetBinding(), EM_CONNECTION_READ, "moved", 5); - if (event->fflags & NOTE_DELETE) { - (*EventCallback)(Files [(int) event->ident]->GetBinding(), EM_CONNECTION_READ, "deleted", 7); - UnwatchFile ((int)event->ident); - } -} -#endif - - -/**************************************** -EventMachine_t::_RegisterKqueueFileEvent -*****************************************/ - -#ifdef HAVE_KQUEUE -void EventMachine_t::_RegisterKqueueFileEvent(int fd) -{ - struct kevent newevent; - int kqres; - - // Setup the event with our fd and proper flags - EV_SET(&newevent, fd, EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_DELETE | NOTE_RENAME | NOTE_WRITE, 0, 0); - - // Attempt to register the event - kqres = kevent(kqfd, &newevent, 1, NULL, 0, NULL); - if (kqres == -1) { - char errbuf[200]; - sprintf(errbuf, "failed to register file watch descriptor with kqueue: %s", strerror(errno)); - close(fd); - throw std::runtime_error(errbuf); - } -} -#endif - - -/************************************ -EventMachine_t::GetHeartbeatInterval -*************************************/ - -float EventMachine_t::GetHeartbeatInterval() -{ - return ((float)HeartbeatInterval / 1000000); -} - - -/************************************ -EventMachine_t::SetHeartbeatInterval -*************************************/ - -int EventMachine_t::SetHeartbeatInterval(float interval) -{ - int iv = (int)(interval * 1000000); - if (iv > 0) { - HeartbeatInterval = iv; - return 1; - } - return 0; -} -//#endif // OS_UNIX diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/em.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/em.h deleted file mode 100644 index 874a1278..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/em.h +++ /dev/null @@ -1,308 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: em.h -Date: 06Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#ifndef __EventMachine__H_ -#define __EventMachine__H_ - -#ifdef BUILD_FOR_RUBY - #include - #ifdef HAVE_RB_THREAD_FD_SELECT - #define EmSelect rb_thread_fd_select - #else - // ruby 1.9.1 and below - #define EmSelect rb_thread_select - #endif - - #ifdef HAVE_RB_THREAD_CALL_WITHOUT_GVL - #include - #endif - - #ifdef HAVE_RB_WAIT_FOR_SINGLE_FD - #include - #endif - - #if defined(HAVE_RB_TRAP_IMMEDIATE) - #include - #elif defined(HAVE_RB_ENABLE_INTERRUPT) - extern "C" { - void rb_enable_interrupt(void); - void rb_disable_interrupt(void); - } - - #define TRAP_BEG rb_enable_interrupt() - #define TRAP_END do { rb_disable_interrupt(); rb_thread_check_ints(); } while(0) - #else - #define TRAP_BEG - #define TRAP_END - #endif - - // 1.9.0 compat - #ifndef RUBY_UBF_IO - #define RUBY_UBF_IO RB_UBF_DFL - #endif - #ifndef RSTRING_PTR - #define RSTRING_PTR(str) RSTRING(str)->ptr - #endif - #ifndef RSTRING_LEN - #define RSTRING_LEN(str) RSTRING(str)->len - #endif - #ifndef RSTRING_LENINT - #define RSTRING_LENINT(str) RSTRING_LEN(str) - #endif -#else - #define EmSelect select -#endif - -#if !defined(HAVE_TYPE_RB_FDSET_T) -#define fd_check(n) (((n) < FD_SETSIZE) ? 1 : 0*fprintf(stderr, "fd %d too large for select\n", (n))) -// These definitions are cribbed from include/ruby/intern.h in Ruby 1.9.3, -// with this change: any macros that read or write the nth element of an -// fdset first call fd_check to make sure n is in bounds. -typedef fd_set rb_fdset_t; -#define rb_fd_zero(f) FD_ZERO(f) -#define rb_fd_set(n, f) do { if (fd_check(n)) FD_SET((n), (f)); } while(0) -#define rb_fd_clr(n, f) do { if (fd_check(n)) FD_CLR((n), (f)); } while(0) -#define rb_fd_isset(n, f) (fd_check(n) ? FD_ISSET((n), (f)) : 0) -#define rb_fd_copy(d, s, n) (*(d) = *(s)) -#define rb_fd_dup(d, s) (*(d) = *(s)) -#define rb_fd_resize(n, f) ((void)(f)) -#define rb_fd_ptr(f) (f) -#define rb_fd_init(f) FD_ZERO(f) -#define rb_fd_init_copy(d, s) (*(d) = *(s)) -#define rb_fd_term(f) ((void)(f)) -#define rb_fd_max(f) FD_SETSIZE -#define rb_fd_select(n, rfds, wfds, efds, timeout) \ - select(fd_check((n)-1) ? (n) : FD_SETSIZE, (rfds), (wfds), (efds), (timeout)) -#define rb_thread_fd_select(n, rfds, wfds, efds, timeout) \ - rb_thread_select(fd_check((n)-1) ? (n) : FD_SETSIZE, (rfds), (wfds), (efds), (timeout)) -#endif - - -// This Solaris fix is adapted from eval_intern.h in Ruby 1.9.3: -// Solaris sys/select.h switches select to select_large_fdset to support larger -// file descriptors if FD_SETSIZE is larger than 1024 on 32bit environment. -// But Ruby doesn't change FD_SETSIZE because fd_set is allocated dynamically. -// So following definition is required to use select_large_fdset. -#ifdef HAVE_SELECT_LARGE_FDSET -#define select(n, r, w, e, t) select_large_fdset((n), (r), (w), (e), (t)) -extern "C" { - int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval *); -} -#endif - -class EventableDescriptor; -class InotifyDescriptor; -struct SelectData_t; - -/************* -enum Poller_t -*************/ -enum Poller_t { - Poller_Default, // typically Select - Poller_Epoll, - Poller_Kqueue -}; - - -/******************** -class EventMachine_t -********************/ - -class EventMachine_t -{ - public: - static int GetMaxTimerCount(); - static void SetMaxTimerCount (int); - - static int GetSimultaneousAcceptCount(); - static void SetSimultaneousAcceptCount (int); - - public: - EventMachine_t (EMCallback, Poller_t); - virtual ~EventMachine_t(); - - bool RunOnce(); - void Run(); - void ScheduleHalt(); - bool Stopping(); - void SignalLoopBreaker(); - const uintptr_t InstallOneshotTimer (uint64_t); - const uintptr_t ConnectToServer (const char *, int, const char *, int); - const uintptr_t ConnectToUnixServer (const char *); - - const uintptr_t CreateTcpServer (const char *, int); - const uintptr_t OpenDatagramSocket (const char *, int); - const uintptr_t CreateUnixDomainServer (const char*); - const uintptr_t AttachSD (SOCKET); - const uintptr_t OpenKeyboard(); - //const char *Popen (const char*, const char*); - const uintptr_t Socketpair (char* const*); - - void Add (EventableDescriptor*); - void Modify (EventableDescriptor*); - void Deregister (EventableDescriptor*); - - const uintptr_t AttachFD (SOCKET, bool); - int DetachFD (EventableDescriptor*); - - void ArmKqueueWriter (EventableDescriptor*); - void ArmKqueueReader (EventableDescriptor*); - - void SetTimerQuantum (int); - static void SetuidString (const char*); - static int SetRlimitNofile (int); - - pid_t SubprocessPid; - int SubprocessExitStatus; - - int GetConnectionCount(); - float GetHeartbeatInterval(); - int SetHeartbeatInterval(float); - - const uintptr_t WatchFile (const char*); - void UnwatchFile (int); - void UnwatchFile (const uintptr_t); - - #ifdef HAVE_KQUEUE - void _HandleKqueueFileEvent (struct kevent*); - void _RegisterKqueueFileEvent(int); - #endif - - const uintptr_t WatchPid (int); - void UnwatchPid (int); - void UnwatchPid (const uintptr_t); - - #ifdef HAVE_KQUEUE - void _HandleKqueuePidEvent (struct kevent*); - #endif - - uint64_t GetCurrentLoopTime() { return MyCurrentLoopTime; } - - void QueueHeartbeat(EventableDescriptor*); - void ClearHeartbeat(uint64_t, EventableDescriptor*); - - uint64_t GetRealTime(); - - Poller_t GetPoller() { return Poller; } - - static int name2address (const char *server, int port, int socktype, struct sockaddr *addr, size_t *addr_len); - - private: - void _RunTimers(); - void _UpdateTime(); - void _AddNewDescriptors(); - void _ModifyDescriptors(); - void _InitializeLoopBreaker(); - void _CleanupSockets(); - - void _RunSelectOnce(); - void _RunEpollOnce(); - void _RunKqueueOnce(); - - void _ModifyEpollEvent (EventableDescriptor*); - void _DispatchHeartbeats(); - timeval _TimeTilNextEvent(); - void _CleanBadDescriptors(); - - public: - void _ReadLoopBreaker(); - void _ReadInotifyEvents(); - int NumCloseScheduled; - - private: - enum { - MaxEpollDescriptors = 64*1024, - MaxEvents = 4096 - }; - int HeartbeatInterval; - EMCallback EventCallback; - - class Timer_t: public Bindable_t { - }; - - std::multimap Timers; - std::multimap Heartbeats; - std::map Files; - std::map Pids; - std::vector Descriptors; - std::vector NewDescriptors; - std::set ModifiedDescriptors; - - SOCKET LoopBreakerReader; - SOCKET LoopBreakerWriter; - #ifdef OS_WIN32 - struct sockaddr_in LoopBreakerTarget; - #endif - - timeval Quantum; - - uint64_t MyCurrentLoopTime; - - #ifdef OS_WIN32 - unsigned TickCountTickover; - unsigned LastTickCount; - #endif - - #ifdef OS_DARWIN - mach_timebase_info_data_t mach_timebase; - #endif - - private: - bool bTerminateSignalReceived; - SelectData_t *SelectData; - - Poller_t Poller; - - int epfd; // Epoll file-descriptor - #ifdef HAVE_EPOLL - struct epoll_event epoll_events [MaxEvents]; - #endif - - int kqfd; // Kqueue file-descriptor - #ifdef HAVE_KQUEUE - struct kevent Karray [MaxEvents]; - #endif - - #ifdef HAVE_INOTIFY - InotifyDescriptor *inotify; // pollable descriptor for our inotify instance - #endif -}; - - -/******************* -struct SelectData_t -*******************/ - -struct SelectData_t -{ - SelectData_t(); - ~SelectData_t(); - - int _Select(); - void _Clear(); - - SOCKET maxsocket; - rb_fdset_t fdreads; - rb_fdset_t fdwrites; - rb_fdset_t fderrors; - timeval tv; - int nSockets; -}; - -#endif // __EventMachine__H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/eventmachine.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/eventmachine.h deleted file mode 100644 index 5100e20d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/eventmachine.h +++ /dev/null @@ -1,143 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: eventmachine.h -Date: 15Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#ifndef __EVMA_EventMachine__H_ -#define __EVMA_EventMachine__H_ - -#if __cplusplus -extern "C" { -#endif - - enum { // Event names - EM_TIMER_FIRED = 100, - EM_CONNECTION_READ = 101, - EM_CONNECTION_UNBOUND = 102, - EM_CONNECTION_ACCEPTED = 103, - EM_CONNECTION_COMPLETED = 104, - EM_LOOPBREAK_SIGNAL = 105, - EM_CONNECTION_NOTIFY_READABLE = 106, - EM_CONNECTION_NOTIFY_WRITABLE = 107, - EM_SSL_HANDSHAKE_COMPLETED = 108, - EM_SSL_VERIFY = 109, - EM_PROXY_TARGET_UNBOUND = 110, - EM_PROXY_COMPLETED = 111 - }; - - enum { // SSL/TLS Protocols - EM_PROTO_SSLv2 = 2, - EM_PROTO_SSLv3 = 4, - EM_PROTO_TLSv1 = 8, - EM_PROTO_TLSv1_1 = 16, - EM_PROTO_TLSv1_2 = 32 - }; - - void evma_initialize_library (EMCallback); - bool evma_run_machine_once(); - void evma_run_machine(); - void evma_release_library(); - const uintptr_t evma_install_oneshot_timer (uint64_t milliseconds); - const uintptr_t evma_connect_to_server (const char *bind_addr, int bind_port, const char *server, int port); - const uintptr_t evma_connect_to_unix_server (const char *server); - - const uintptr_t evma_attach_fd (int file_descriptor, int watch_mode); - int evma_detach_fd (const uintptr_t binding); - int evma_get_file_descriptor (const uintptr_t binding); - int evma_is_notify_readable (const uintptr_t binding); - void evma_set_notify_readable (const uintptr_t binding, int mode); - int evma_is_notify_writable (const uintptr_t binding); - void evma_set_notify_writable (const uintptr_t binding, int mode); - - int evma_pause(const uintptr_t binding); - int evma_is_paused(const uintptr_t binding); - int evma_resume(const uintptr_t binding); - - int evma_num_close_scheduled(); - - void evma_stop_tcp_server (const uintptr_t binding); - const uintptr_t evma_create_tcp_server (const char *address, int port); - const uintptr_t evma_create_unix_domain_server (const char *filename); - const uintptr_t evma_attach_sd (int sd); - const uintptr_t evma_open_datagram_socket (const char *server, int port); - const uintptr_t evma_open_keyboard(); - void evma_set_tls_parms (const uintptr_t binding, const char *privatekey_filename, const char *certchain_filenane, int verify_peer, int fail_if_no_peer_cert, const char *sni_hostname, const char *cipherlist, const char *ecdh_curve, const char *dhparam, int protocols); - void evma_start_tls (const uintptr_t binding); - - #ifdef WITH_SSL - X509 *evma_get_peer_cert (const uintptr_t binding); - int evma_get_cipher_bits (const uintptr_t binding); - const char *evma_get_cipher_name (const uintptr_t binding); - const char *evma_get_cipher_protocol (const uintptr_t binding); - const char *evma_get_sni_hostname (const uintptr_t binding); - void evma_accept_ssl_peer (const uintptr_t binding); - #endif - - int evma_get_peername (const uintptr_t binding, struct sockaddr*, socklen_t*); - int evma_get_sockname (const uintptr_t binding, struct sockaddr*, socklen_t*); - int evma_get_subprocess_pid (const uintptr_t binding, pid_t*); - int evma_get_subprocess_status (const uintptr_t binding, int*); - int evma_get_connection_count(); - int evma_send_data_to_connection (const uintptr_t binding, const char *data, int data_length); - int evma_send_datagram (const uintptr_t binding, const char *data, int data_length, const char *address, int port); - float evma_get_comm_inactivity_timeout (const uintptr_t binding); - int evma_set_comm_inactivity_timeout (const uintptr_t binding, float value); - float evma_get_pending_connect_timeout (const uintptr_t binding); - int evma_set_pending_connect_timeout (const uintptr_t binding, float value); - int evma_get_outbound_data_size (const uintptr_t binding); - uint64_t evma_get_last_activity_time (const uintptr_t binding); - int evma_send_file_data_to_connection (const uintptr_t binding, const char *filename); - - void evma_close_connection (const uintptr_t binding, int after_writing); - int evma_report_connection_error_status (const uintptr_t binding); - void evma_signal_loopbreak(); - void evma_set_timer_quantum (int); - int evma_get_max_timer_count(); - void evma_set_max_timer_count (int); - int evma_get_simultaneous_accept_count(); - void evma_set_simultaneous_accept_count (int); - void evma_setuid_string (const char *username); - void evma_stop_machine(); - bool evma_stopping(); - float evma_get_heartbeat_interval(); - int evma_set_heartbeat_interval(float); - - const uintptr_t evma_popen (char * const*cmd_strings); - - const uintptr_t evma_watch_filename (const char *fname); - void evma_unwatch_filename (const uintptr_t binding); - - const uintptr_t evma_watch_pid (int); - void evma_unwatch_pid (const uintptr_t binding); - - void evma_start_proxy(const uintptr_t from, const uintptr_t to, const unsigned long bufsize, const unsigned long length); - void evma_stop_proxy(const uintptr_t from); - unsigned long evma_proxied_bytes(const uintptr_t from); - - int evma_set_rlimit_nofile (int n_files); - - void evma_set_epoll (int use); - void evma_set_kqueue (int use); - - uint64_t evma_get_current_loop_time(); -#if __cplusplus -} -#endif - - -#endif // __EventMachine__H_ - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/extconf.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/extconf.rb deleted file mode 100644 index 676b4c42..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/extconf.rb +++ /dev/null @@ -1,270 +0,0 @@ -require 'fileutils' -require 'mkmf' - -# Eager check devs tools -have_devel? if respond_to?(:have_devel?) - -def check_libs libs = [], fatal = false - libs.all? { |lib| have_library(lib) || (abort("could not find library: #{lib}") if fatal) } -end - -def check_heads heads = [], fatal = false - heads.all? { |head| have_header(head) || (abort("could not find header: #{head}") if fatal)} -end - -def add_define(name) - $defs.push("-D#{name}") -end - -## -# OpenSSL: - -# override append_library, so it actually appends (instead of prepending) -# this fixes issues with linking ssl, since libcrypto depends on symbols in libssl -def append_library(libs, lib) - libs + " " + format(LIBARG, lib) -end - -SSL_HEADS = %w(openssl/ssl.h openssl/err.h) -SSL_LIBS = %w(crypto ssl) -# OpenSSL 1.1.0 and above for Windows use the Unix library names -# OpenSSL 0.9.8 and 1.0.x for Windows use the *eay32 library names -SSL_LIBS_WIN = RUBY_PLATFORM =~ /mswin|mingw|bccwin/ ? %w(ssleay32 libeay32) : [] - -def dir_config_wrapper(pretty_name, name, idefault=nil, ldefault=nil) - inc, lib = dir_config(name, idefault, ldefault) - if inc && lib - # TODO: Remove when 2.0.0 is the minimum supported version - # Ruby versions not incorporating the mkmf fix at - # https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39717 - # do not properly search for lib directories, and must be corrected - unless lib && lib[-3, 3] == 'lib' - @libdir_basename = 'lib' - inc, lib = dir_config(name, idefault, ldefault) - end - unless idefault && ldefault - abort "-----\nCannot find #{pretty_name} include path #{inc}\n-----" unless inc && inc.split(File::PATH_SEPARATOR).any? { |dir| File.directory?(dir) } - abort "-----\nCannot find #{pretty_name} library path #{lib}\n-----" unless lib && lib.split(File::PATH_SEPARATOR).any? { |dir| File.directory?(dir) } - warn "-----\nUsing #{pretty_name} in path #{File.dirname inc}\n-----" - end - true - end -end - -def dir_config_search(pretty_name, name, paths, &b) - paths.each do |p| - if dir_config_wrapper('OpenSSL', 'ssl', p + '/include', p + '/lib') && yield - warn "-----\nFound #{pretty_name} in path #{p}\n-----" - return true - end - end - false -end - -def pkg_config_wrapper(pretty_name, name) - cflags, ldflags, libs = pkg_config(name) - unless [cflags, ldflags, libs].any?(&:nil?) || [cflags, ldflags, libs].any?(&:empty?) - warn "-----\nUsing #{pretty_name} from pkg-config #{cflags} && #{ldflags} && #{libs}\n-----" - true - end -end - -if ENV['CROSS_COMPILING'] - openssl_version = ENV.fetch("OPENSSL_VERSION", "1.0.2e") - openssl_dir = File.expand_path("~/.rake-compiler/builds/openssl-#{openssl_version}/") - if File.exist?(openssl_dir) - FileUtils.mkdir_p Dir.pwd+"/openssl/" - FileUtils.cp Dir[openssl_dir+"/include/openssl/*.h"], Dir.pwd+"/openssl/", :verbose => true - FileUtils.cp Dir[openssl_dir+"/lib*.a"], Dir.pwd, :verbose => true - $INCFLAGS << " -I#{Dir.pwd}" # for the openssl headers - add_define "WITH_SSL" - else - STDERR.puts - STDERR.puts "**************************************************************************************" - STDERR.puts "**** Cross-compiled OpenSSL not found" - STDERR.puts "**** Run: hg clone http://bitbucket.org/ged/ruby-pg && cd ruby-pg && rake openssl_libs" - STDERR.puts "**************************************************************************************" - STDERR.puts - end -elsif dir_config_wrapper('OpenSSL', 'ssl') - # If the user has provided a --with-ssl-dir argument, we must respect it or fail. - add_define 'WITH_SSL' if (check_libs(SSL_LIBS) || check_libs(SSL_LIBS_WIN)) && check_heads(SSL_HEADS) -elsif pkg_config_wrapper('OpenSSL', 'openssl') - # If we can detect OpenSSL by pkg-config, use it as the next-best option - add_define 'WITH_SSL' if (check_libs(SSL_LIBS) || check_libs(SSL_LIBS_WIN)) && check_heads(SSL_HEADS) -elsif (check_libs(SSL_LIBS) || check_libs(SSL_LIBS_WIN)) && check_heads(SSL_HEADS) - # If we don't even need any options to find a usable OpenSSL, go with it - add_define 'WITH_SSL' -elsif dir_config_search('OpenSSL', 'ssl', ['/usr/local', '/opt/local', '/usr/local/opt/openssl']) do - (check_libs(SSL_LIBS) || check_libs(SSL_LIBS_WIN)) && check_heads(SSL_HEADS) - end - # Finally, look for OpenSSL in alternate locations including MacPorts and HomeBrew - add_define 'WITH_SSL' -end - -add_define 'BUILD_FOR_RUBY' - -# Ruby features: - -have_var('rb_trap_immediate', ['ruby.h', 'rubysig.h']) -have_func('rb_thread_blocking_region') -have_func('rb_thread_call_without_gvl', 'ruby/thread.h') -have_func('rb_thread_fd_select') -have_type('rb_fdset_t', 'ruby/intern.h') -have_func('rb_wait_for_single_fd') -have_func('rb_enable_interrupt') -have_func('rb_time_new') - -# System features: - -add_define('HAVE_INOTIFY') if inotify = have_func('inotify_init', 'sys/inotify.h') -add_define('HAVE_OLD_INOTIFY') if !inotify && have_macro('__NR_inotify_init', 'sys/syscall.h') -have_func('writev', 'sys/uio.h') -have_func('pipe2', 'unistd.h') -have_func('accept4', 'sys/socket.h') -have_const('SOCK_CLOEXEC', 'sys/socket.h') - -# Minor platform details between *nix and Windows: - -if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/ - GNU_CHAIN = ENV['CROSS_COMPILING'] || $1 == 'mingw' - OS_WIN32 = true - add_define "OS_WIN32" -else - GNU_CHAIN = true - OS_UNIX = true - add_define 'OS_UNIX' - - add_define "HAVE_KQUEUE" if have_header("sys/event.h") && have_header("sys/queue.h") -end - -# Adjust number of file descriptors (FD) on Windows - -if RbConfig::CONFIG["host_os"] =~ /mingw/ - found = RbConfig::CONFIG.values_at("CFLAGS", "CPPFLAGS"). - any? { |v| v.include?("FD_SETSIZE") } - - add_define "FD_SETSIZE=32767" unless found -end - -# Main platform invariances: - -case RUBY_PLATFORM -when /mswin32/, /mingw32/, /bccwin32/ - check_heads(%w[windows.h winsock.h], true) - check_libs(%w[kernel32 rpcrt4 gdi32], true) - - if GNU_CHAIN - CONFIG['LDSHAREDXX'] = "$(CXX) -shared -static-libgcc -static-libstdc++" - else - $defs.push "-EHs" - $defs.push "-GR" - end - - # Newer versions of Ruby already define _WIN32_WINNT, which is needed - # to get access to newer POSIX networking functions (e.g. getaddrinfo) - add_define '_WIN32_WINNT=0x0501' unless have_func('getaddrinfo') - -when /solaris/ - add_define 'OS_SOLARIS8' - check_libs(%w[nsl socket], true) - - # If Ruby was compiled for 32-bits, then select() can only handle 1024 fds - # There is an alternate function, select_large_fdset, that supports more. - have_func('select_large_fdset', 'sys/select.h') - - if CONFIG['CC'] == 'cc' && ( - `cc -flags 2>&1` =~ /Sun/ || # detect SUNWspro compiler - `cc -V 2>&1` =~ /Sun/ # detect Solaris Studio compiler - ) - # SUN CHAIN - add_define 'CC_SUNWspro' - $preload = ["\nCXX = CC"] # hack a CXX= line into the makefile - $CFLAGS = CONFIG['CFLAGS'] = "-KPIC" - CONFIG['CCDLFLAGS'] = "-KPIC" - CONFIG['LDSHARED'] = "$(CXX) -G -KPIC -lCstd" - CONFIG['LDSHAREDXX'] = "$(CXX) -G -KPIC -lCstd" - else - # GNU CHAIN - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" - end - -when /openbsd/ - # OpenBSD branch contributed by Guillaume Sellier. - - # on Unix we need a g++ link, not gcc. On OpenBSD, linking against libstdc++ have to be explicitly done for shared libs - CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++ -fPIC" - CONFIG['LDSHAREDXX'] = "$(CXX) -shared -lstdc++ -fPIC" - -when /darwin/ - add_define 'OS_DARWIN' - - # on Unix we need a g++ link, not gcc. - # Ff line contributed by Daniel Harple. - CONFIG['LDSHARED'] = "$(CXX) " + CONFIG['LDSHARED'].split[1..-1].join(' ') - -when /linux/ - add_define 'HAVE_EPOLL' if have_func('epoll_create', 'sys/epoll.h') - - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" - -when /aix/ - CONFIG['LDSHARED'] = "$(CXX) -Wl,-bstatic -Wl,-bdynamic -Wl,-G -Wl,-brtl" - -when /cygwin/ - # For rubies built with Cygwin, CXX may be set to CC, which is just - # a wrapper for gcc. - # This will compile, but it will not link to the C++ std library. - # Explicitly set CXX to use g++. - CONFIG['CXX'] = "g++" - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" - -else - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" -end - -# Platform-specific time functions -if have_func('clock_gettime') - # clock_gettime is POSIX, but the monotonic clocks are not - have_const('CLOCK_MONOTONIC_RAW', 'time.h') # Linux - have_const('CLOCK_MONOTONIC', 'time.h') # Linux, Solaris, BSDs -else - have_func('gethrtime') # Older Solaris and HP-UX -end - -# Hack so that try_link will test with a C++ compiler instead of a C compiler -TRY_LINK.sub!('$(CC)', '$(CXX)') - -# This is our wishlist. We use whichever flags work on the host. -# In the future, add -Werror to make sure all warnings are resolved. -# deprecated-declarations are used in OS X OpenSSL -# ignored-qualifiers are used by the Bindings (would-be void *) -# unused-result because GCC 4.6 no longer silences (void) ignore_this(function) -# address because on Windows, rb_fd_select checks if &fds is non-NULL, which it cannot be -%w( - -Wall - -Wextra - -Wno-deprecated-declarations - -Wno-ignored-qualifiers - -Wno-unused-result - -Wno-address -).select do |flag| - try_link('int main() {return 0;}', flag) -end.each do |flag| - CONFIG['CXXFLAGS'] << ' ' << flag -end -puts "CXXFLAGS=#{CONFIG['CXXFLAGS']}" - -# Solaris C++ compiler doesn't have make_pair() -add_define 'HAVE_MAKE_PAIR' if try_link(< - using namespace std; - int main(){ pair tuple = make_pair(1,2); } -SRC -TRY_LINK.sub!('$(CXX)', '$(CC)') - -create_makefile "rubyeventmachine" diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/Makefile b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/Makefile deleted file mode 100644 index b190e8a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/Makefile +++ /dev/null @@ -1,269 +0,0 @@ - -SHELL = /bin/sh - -# V=0 quiet, V=1 verbose. other values don't work. -V = 0 -V0 = $(V:0=) -Q1 = $(V:1=) -Q = $(Q1:0=@) -ECHO1 = $(V:1=@ :) -ECHO = $(ECHO1:0=@ echo) -NULLCMD = : - -#### Start of system configuration section. #### - -srcdir = . -topdir = /home/nakamoto/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0 -hdrdir = $(topdir) -arch_hdrdir = /home/nakamoto/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/x86_64-linux -PATH_SEPARATOR = : -VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby -prefix = $(DESTDIR)/home/nakamoto/.rvm/rubies/ruby-3.2.2 -rubysitearchprefix = $(rubylibprefix)/$(sitearch) -rubyarchprefix = $(rubylibprefix)/$(arch) -rubylibprefix = $(libdir)/$(RUBY_BASE_NAME) -exec_prefix = $(prefix) -vendorarchhdrdir = $(vendorhdrdir)/$(sitearch) -sitearchhdrdir = $(sitehdrdir)/$(sitearch) -rubyarchhdrdir = $(rubyhdrdir)/$(arch) -vendorhdrdir = $(rubyhdrdir)/vendor_ruby -sitehdrdir = $(rubyhdrdir)/site_ruby -rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME) -vendorarchdir = $(vendorlibdir)/$(sitearch) -vendorlibdir = $(vendordir)/$(ruby_version) -vendordir = $(rubylibprefix)/vendor_ruby -sitearchdir = $(sitelibdir)/$(sitearch) -sitelibdir = $(sitedir)/$(ruby_version) -sitedir = $(rubylibprefix)/site_ruby -rubyarchdir = $(rubylibdir)/$(arch) -rubylibdir = $(rubylibprefix)/$(ruby_version) -sitearchincludedir = $(includedir)/$(sitearch) -archincludedir = $(includedir)/$(arch) -sitearchlibdir = $(libdir)/$(sitearch) -archlibdir = $(libdir)/$(arch) -ridir = $(datarootdir)/$(RI_BASE_NAME) -mandir = $(datarootdir)/man -localedir = $(datarootdir)/locale -libdir = $(exec_prefix)/lib -psdir = $(docdir) -pdfdir = $(docdir) -dvidir = $(docdir) -htmldir = $(docdir) -infodir = $(datarootdir)/info -docdir = $(datarootdir)/doc/$(PACKAGE) -oldincludedir = $(DESTDIR)/usr/include -includedir = $(prefix)/include -runstatedir = $(localstatedir)/run -localstatedir = $(prefix)/var -sharedstatedir = $(prefix)/com -sysconfdir = $(prefix)/etc -datadir = $(datarootdir) -datarootdir = $(prefix)/share -libexecdir = $(exec_prefix)/libexec -sbindir = $(exec_prefix)/sbin -bindir = $(exec_prefix)/bin -archdir = $(rubyarchdir) - - -CC_WRAPPER = -CC = gcc -CXX = g++ -LIBRUBY = $(LIBRUBY_SO) -LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a -LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME) -LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS) -empty = -OUTFLAG = -o $(empty) -COUTFLAG = -o $(empty) -CSRCFLAG = $(empty) - -RUBY_EXTCONF_H = -cflags = $(optflags) $(debugflags) $(warnflags) -cxxflags = -optflags = -O3 -fno-fast-math -debugflags = -ggdb3 -warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -cppflags = -CCDLFLAGS = -fPIC -CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG) -INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -DEFS = -CPPFLAGS = -DBUILD_FOR_RUBY -DOS_UNIX $(DEFS) $(cppflags) -CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG) -ldflags = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -dldflags = -Wl,--compress-debug-sections=zlib -ARCH_FLAG = -DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG) -LDSHARED = $(CXX) -shared -LDSHAREDXX = $(CXX) -shared -AR = gcc-ar -EXEEXT = - -RUBY_INSTALL_NAME = $(RUBY_BASE_NAME) -RUBY_SO_NAME = ruby -RUBYW_INSTALL_NAME = -RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version) -RUBYW_BASE_NAME = rubyw -RUBY_BASE_NAME = ruby - -arch = x86_64-linux -sitearch = $(arch) -ruby_version = 3.2.0 -ruby = $(bindir)/$(RUBY_BASE_NAME) -RUBY = $(ruby) -BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME) -ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h - -RM = rm -f -RM_RF = rm -fr -RMDIRS = rmdir --ignore-fail-on-non-empty -p -MAKEDIRS = /usr/bin/mkdir -p -INSTALL = /usr/bin/install -c -INSTALL_PROG = $(INSTALL) -m 0755 -INSTALL_DATA = $(INSTALL) -m 644 -COPY = cp -TOUCH = exit > - -#### End of system configuration section. #### - -preload = -libpath = . $(libdir) -LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir) -DEFFILE = - -CLEANFILES = mkmf.log -DISTCLEANFILES = -DISTCLEANDIRS = - -extout = -extout_prefix = -target_prefix = -LOCAL_LIBS = -LIBS = $(LIBRUBYARG_SHARED) -lm -lpthread -lc -ORIG_SRCS = mapper.cpp rubymain.cpp -SRCS = $(ORIG_SRCS) -OBJS = mapper.o rubymain.o -HDRS = $(srcdir)/mapper.h -LOCAL_HDRS = -TARGET = fastfilereaderext -TARGET_NAME = fastfilereaderext -TARGET_ENTRY = Init_$(TARGET_NAME) -DLLIB = $(TARGET).so -EXTSTATIC = -STATIC_LIB = - -TIMESTAMP_DIR = . -BINDIR = $(bindir) -RUBYCOMMONDIR = $(sitedir)$(target_prefix) -RUBYLIBDIR = $(sitelibdir)$(target_prefix) -RUBYARCHDIR = $(sitearchdir)$(target_prefix) -HDRDIR = $(sitehdrdir)$(target_prefix) -ARCHHDRDIR = $(sitearchhdrdir)$(target_prefix) -TARGET_SO_DIR = -TARGET_SO = $(TARGET_SO_DIR)$(DLLIB) -CLEANLIBS = $(TARGET_SO) false -CLEANOBJS = $(OBJS) *.bak -TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time - -all: $(DLLIB) -static: $(STATIC_LIB) -.PHONY: all install static install-so install-rb -.PHONY: clean clean-so clean-static clean-rb - -clean-static:: -clean-rb-default:: -clean-rb:: -clean-so:: -clean: clean-so clean-static clean-rb-default clean-rb - -$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time - -distclean-rb-default:: -distclean-rb:: -distclean-so:: -distclean-static:: -distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb - -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log - -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) - -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true - -realclean: distclean -install: install-so install-rb - -install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP) - $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) -clean-static:: - -$(Q)$(RM) $(STATIC_LIB) -install-rb: pre-install-rb do-install-rb install-rb-default -install-rb-default: pre-install-rb-default do-install-rb-default -pre-install-rb: Makefile -pre-install-rb-default: Makefile -do-install-rb: -do-install-rb-default: -pre-install-rb-default: - @$(NULLCMD) -$(TARGET_SO_DIR_TIMESTAMP): - $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR) - $(Q) $(TOUCH) $@ - -site-install: site-install-so site-install-rb -site-install-so: install-so -site-install-rb: install-rb - -.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S - -.cc.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cc.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.mm.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.mm.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.cxx.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cxx.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.cpp.o: - $(ECHO) compiling $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.cpp.S: - $(ECHO) translating $(<) - $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.c.o: - $(ECHO) compiling $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.c.S: - $(ECHO) translating $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -.m.o: - $(ECHO) compiling $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$< - -.m.S: - $(ECHO) translating $(<) - $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$< - -$(TARGET_SO): $(OBJS) Makefile - $(ECHO) linking shared-object $(DLLIB) - -$(Q)$(RM) $(@) - $(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) - - - -$(OBJS): $(HDRS) $(ruby_headers) diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/extconf.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/extconf.rb deleted file mode 100644 index e4d64e4a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/extconf.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'mkmf' - -def check_libs libs = [], fatal = false - libs.all? { |lib| have_library(lib) || (abort("could not find library: #{lib}") if fatal) } -end - -def check_heads heads = [], fatal = false - heads.all? { |head| have_header(head) || (abort("could not find header: #{head}") if fatal)} -end - -def add_define(name) - $defs.push("-D#{name}") -end - -# Eager check devs tools -have_devel? if respond_to?(:have_devel?) - -add_define 'BUILD_FOR_RUBY' - -# Minor platform details between *nix and Windows: - -if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/ - GNU_CHAIN = ENV['CROSS_COMPILING'] || $1 == 'mingw' - OS_WIN32 = true - add_define "OS_WIN32" -else - GNU_CHAIN = true - OS_UNIX = true - add_define 'OS_UNIX' -end - -# Adjust number of file descriptors (FD) on Windows - -if RbConfig::CONFIG["host_os"] =~ /mingw/ - found = RbConfig::CONFIG.values_at("CFLAGS", "CPPFLAGS"). - any? { |v| v.include?("FD_SETSIZE") } - - add_define "FD_SETSIZE=32767" unless found -end - -# Main platform invariances: - -case RUBY_PLATFORM -when /mswin32/, /mingw32/, /bccwin32/ - check_heads(%w[windows.h winsock.h], true) - check_libs(%w[kernel32 rpcrt4 gdi32], true) - - if GNU_CHAIN - CONFIG['LDSHAREDXX'] = "$(CXX) -shared -static-libgcc -static-libstdc++" - else - $defs.push "-EHs" - $defs.push "-GR" - end - -when /solaris/ - add_define 'OS_SOLARIS8' - check_libs(%w[nsl socket], true) - - if CONFIG['CC'] == 'cc' && ( - `cc -flags 2>&1` =~ /Sun/ || # detect SUNWspro compiler - `cc -V 2>&1` =~ /Sun/ # detect Solaris Studio compiler - ) - # SUN CHAIN - add_define 'CC_SUNWspro' - $preload = ["\nCXX = CC"] # hack a CXX= line into the makefile - $CFLAGS = CONFIG['CFLAGS'] = "-KPIC" - CONFIG['CCDLFLAGS'] = "-KPIC" - CONFIG['LDSHARED'] = "$(CXX) -G -KPIC -lCstd" - CONFIG['LDSHAREDXX'] = "$(CXX) -G -KPIC -lCstd" - else - # GNU CHAIN - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" - end - -when /openbsd/ - # OpenBSD branch contributed by Guillaume Sellier. - - # on Unix we need a g++ link, not gcc. On OpenBSD, linking against libstdc++ have to be explicitly done for shared libs - CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++ -fPIC" - CONFIG['LDSHAREDXX'] = "$(CXX) -shared -lstdc++ -fPIC" - -when /darwin/ - # on Unix we need a g++ link, not gcc. - # Ff line contributed by Daniel Harple. - CONFIG['LDSHARED'] = "$(CXX) " + CONFIG['LDSHARED'].split[1..-1].join(' ') - -when /linux/ - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" - -when /aix/ - CONFIG['LDSHARED'] = "$(CXX) -Wl,-bstatic -Wl,-bdynamic -Wl,-G -Wl,-brtl" - -when /cygwin/ - # For rubies built with Cygwin, CXX may be set to CC, which is just - # a wrapper for gcc. - # This will compile, but it will not link to the C++ std library. - # Explicitly set CXX to use g++. - CONFIG['CXX'] = "g++" - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" - -else - # on Unix we need a g++ link, not gcc. - CONFIG['LDSHARED'] = "$(CXX) -shared" -end - -create_makefile "fastfilereaderext" diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/mapper.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/mapper.cpp deleted file mode 100644 index f226f2d5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/mapper.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/***************************************************************************** - -$Id: mapper.cpp 4527 2007-07-04 10:21:34Z francis $ - -File: mapper.cpp -Date: 02Jul07 - -Copyright (C) 2007 by Francis Cianfrocca. All Rights Reserved. -Gmail: garbagecat10 - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - -////////////////////////////////////////////////////////////////////// -// UNIX implementation -////////////////////////////////////////////////////////////////////// - - -#ifdef OS_UNIX - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "mapper.h" - -/****************** -Mapper_t::Mapper_t -******************/ - -Mapper_t::Mapper_t (const std::string &filename) -{ - /* We ASSUME we can open the file. - * (More precisely, we assume someone else checked before we got here.) - */ - - Fd = open (filename.c_str(), O_RDONLY); - if (Fd < 0) - throw std::runtime_error (strerror (errno)); - - struct stat st; - if (fstat (Fd, &st)) - throw std::runtime_error (strerror (errno)); - FileSize = st.st_size; - - #ifdef OS_WIN32 - MapPoint = (char*) mmap (0, FileSize, PROT_READ, MAP_SHARED, Fd, 0); - #else - MapPoint = (const char*) mmap (0, FileSize, PROT_READ, MAP_SHARED, Fd, 0); - #endif - if (MapPoint == MAP_FAILED) - throw std::runtime_error (strerror (errno)); -} - - -/******************* -Mapper_t::~Mapper_t -*******************/ - -Mapper_t::~Mapper_t() -{ - Close(); -} - - -/*************** -Mapper_t::Close -***************/ - -void Mapper_t::Close() -{ - // Can be called multiple times. - // Calls to GetChunk are invalid after a call to Close. - if (MapPoint) { - #ifdef CC_SUNWspro - // TODO: The void * cast works fine on Solaris 11, but - // I don't know at what point that changed from older Solaris. - munmap ((char*)MapPoint, FileSize); - #else - munmap ((void*)MapPoint, FileSize); - #endif - MapPoint = NULL; - } - if (Fd >= 0) { - close (Fd); - Fd = -1; - } -} - -/****************** -Mapper_t::GetChunk -******************/ - -const char *Mapper_t::GetChunk (unsigned start) -{ - return MapPoint + start; -} - - - -#endif // OS_UNIX - - -////////////////////////////////////////////////////////////////////// -// WINDOWS implementation -////////////////////////////////////////////////////////////////////// - -#ifdef OS_WIN32 - -#include - -#include -#include -#include - -#include "mapper.h" - -/****************** -Mapper_t::Mapper_t -******************/ - -Mapper_t::Mapper_t (const std::string &filename) -{ - /* We ASSUME we can open the file. - * (More precisely, we assume someone else checked before we got here.) - */ - - hFile = INVALID_HANDLE_VALUE; - hMapping = NULL; - MapPoint = NULL; - FileSize = 0; - - hFile = CreateFile (filename.c_str(), GENERIC_READ|GENERIC_WRITE, FILE_SHARE_DELETE|FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - throw std::runtime_error ("File not found"); - - BY_HANDLE_FILE_INFORMATION i; - if (GetFileInformationByHandle (hFile, &i)) - FileSize = i.nFileSizeLow; - - hMapping = CreateFileMapping (hFile, NULL, PAGE_READWRITE, 0, 0, NULL); - if (!hMapping) - throw std::runtime_error ("File not mapped"); - - #ifdef OS_WIN32 - MapPoint = (char*) MapViewOfFile (hMapping, FILE_MAP_WRITE, 0, 0, 0); - #else - MapPoint = (const char*) MapViewOfFile (hMapping, FILE_MAP_WRITE, 0, 0, 0); - #endif - if (!MapPoint) - throw std::runtime_error ("Mappoint not read"); -} - - -/******************* -Mapper_t::~Mapper_t -*******************/ - -Mapper_t::~Mapper_t() -{ - Close(); -} - -/*************** -Mapper_t::Close -***************/ - -void Mapper_t::Close() -{ - // Can be called multiple times. - // Calls to GetChunk are invalid after a call to Close. - if (MapPoint) { - UnmapViewOfFile (MapPoint); - MapPoint = NULL; - } - if (hMapping != NULL) { - CloseHandle (hMapping); - hMapping = NULL; - } - if (hFile != INVALID_HANDLE_VALUE) { - CloseHandle (hFile); - hFile = INVALID_HANDLE_VALUE; - } -} - - -/****************** -Mapper_t::GetChunk -******************/ - -const char *Mapper_t::GetChunk (unsigned start) -{ - return MapPoint + start; -} - - - -#endif // OS_WINDOWS diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/mapper.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/mapper.h deleted file mode 100644 index 3db0eead..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/mapper.h +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** - -$Id: mapper.h 4529 2007-07-04 11:32:22Z francis $ - -File: mapper.h -Date: 02Jul07 - -Copyright (C) 2007 by Francis Cianfrocca. All Rights Reserved. -Gmail: garbagecat10 - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - -#ifndef __Mapper__H_ -#define __Mapper__H_ - - -/************** -class Mapper_t -**************/ - -class Mapper_t -{ - public: - Mapper_t (const std::string&); - virtual ~Mapper_t(); - - const char *GetChunk (unsigned); - void Close(); - size_t GetFileSize() {return FileSize;} - - private: - size_t FileSize; - - #ifdef OS_UNIX - private: - int Fd; - const char *MapPoint; - #endif // OS_UNIX - - #ifdef OS_WIN32 - private: - HANDLE hFile; - HANDLE hMapping; - char *MapPoint; - #endif // OS_WIN32 - -}; - - -#endif // __Mapper__H_ - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/rubymain.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/rubymain.cpp deleted file mode 100644 index b962bf02..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/fastfilereader/rubymain.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/***************************************************************************** - -$Id: rubymain.cpp 4529 2007-07-04 11:32:22Z francis $ - -File: rubymain.cpp -Date: 02Jul07 - -Copyright (C) 2007 by Francis Cianfrocca. All Rights Reserved. -Gmail: garbagecat10 - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - - -#include -#include - -#include -#include "mapper.h" - -static VALUE EmModule; -static VALUE FastFileReader; -static VALUE Mapper; - - - -/********* -mapper_dt -*********/ - -static void mapper_dt (void *ptr) -{ - if (ptr) - delete (Mapper_t*) ptr; -} - -/********** -mapper_new -**********/ - -static VALUE mapper_new (VALUE self, VALUE filename) -{ - Mapper_t *m = new Mapper_t (StringValueCStr (filename)); - if (!m) - rb_raise (rb_eStandardError, "No Mapper Object"); - VALUE v = Data_Wrap_Struct (Mapper, 0, mapper_dt, (void*)m); - return v; -} - - -/**************** -mapper_get_chunk -****************/ - -static VALUE mapper_get_chunk (VALUE self, VALUE start, VALUE length) -{ - Mapper_t *m = NULL; - Data_Get_Struct (self, Mapper_t, m); - if (!m) - rb_raise (rb_eStandardError, "No Mapper Object"); - - // TODO, what if some moron sends us a negative start value? - unsigned _start = NUM2INT (start); - unsigned _length = NUM2INT (length); - if ((_start + _length) > m->GetFileSize()) - rb_raise (rb_eStandardError, "Mapper Range Error"); - - const char *chunk = m->GetChunk (_start); - if (!chunk) - rb_raise (rb_eStandardError, "No Mapper Chunk"); - return rb_str_new (chunk, _length); -} - -/************ -mapper_close -************/ - -static VALUE mapper_close (VALUE self) -{ - Mapper_t *m = NULL; - Data_Get_Struct (self, Mapper_t, m); - if (!m) - rb_raise (rb_eStandardError, "No Mapper Object"); - m->Close(); - return Qnil; -} - -/*********** -mapper_size -***********/ - -static VALUE mapper_size (VALUE self) -{ - Mapper_t *m = NULL; - Data_Get_Struct (self, Mapper_t, m); - if (!m) - rb_raise (rb_eStandardError, "No Mapper Object"); - return INT2NUM (m->GetFileSize()); -} - - -/********************** -Init_fastfilereaderext -**********************/ - -extern "C" void Init_fastfilereaderext() -{ - EmModule = rb_define_module ("EventMachine"); - FastFileReader = rb_define_class_under (EmModule, "FastFileReader", rb_cObject); - Mapper = rb_define_class_under (FastFileReader, "Mapper", rb_cObject); - - rb_define_module_function (Mapper, "new", (VALUE(*)(...))mapper_new, 1); - rb_define_method (Mapper, "size", (VALUE(*)(...))mapper_size, 0); - rb_define_method (Mapper, "close", (VALUE(*)(...))mapper_close, 0); - rb_define_method (Mapper, "get_chunk", (VALUE(*)(...))mapper_get_chunk, 2); -} - - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/kb.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/kb.cpp deleted file mode 100644 index 2187ae22..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/kb.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: kb.cpp -Date: 24Aug07 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#include "project.h" - - -/************************************** -KeyboardDescriptor::KeyboardDescriptor -**************************************/ - -KeyboardDescriptor::KeyboardDescriptor (EventMachine_t *parent_em): - EventableDescriptor (0, parent_em), - bReadAttemptedAfterClose (false) -{ - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - #endif - #ifdef HAVE_KQUEUE - MyEventMachine->ArmKqueueReader (this); - #endif -} - - -/*************************************** -KeyboardDescriptor::~KeyboardDescriptor -***************************************/ - -KeyboardDescriptor::~KeyboardDescriptor() -{ -} - - -/************************* -KeyboardDescriptor::Write -*************************/ - -void KeyboardDescriptor::Write() -{ - // Why are we here? - throw std::runtime_error ("bad code path in keyboard handler"); -} - - -/***************************** -KeyboardDescriptor::Heartbeat -*****************************/ - -void KeyboardDescriptor::Heartbeat() -{ - // no-op -} - - -/************************ -KeyboardDescriptor::Read -************************/ - -void KeyboardDescriptor::Read() -{ - char c; - (void)read (GetSocket(), &c, 1); - _GenericInboundDispatch(&c, 1); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/page.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/page.cpp deleted file mode 100644 index a3a23400..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/page.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: page.cpp -Date: 30Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - -#include "project.h" - - -/****************** -PageList::PageList -******************/ - -PageList::PageList() -{ -} - - -/******************* -PageList::~PageList -*******************/ - -PageList::~PageList() -{ - while (HasPages()) - PopFront(); -} - - -/*************** -PageList::Front -***************/ - -void PageList::Front (const char **page, int *length) -{ - assert (page && length); - - if (HasPages()) { - Page p = Pages.front(); - *page = p.Buffer; - *length = p.Size; - } - else { - *page = NULL; - *length = 0; - } -} - - -/****************** -PageList::PopFront -******************/ - -void PageList::PopFront() -{ - if (HasPages()) { - Page p = Pages.front(); - Pages.pop_front(); - if (p.Buffer) - free ((void*)p.Buffer); - } -} - - -/****************** -PageList::HasPages -******************/ - -bool PageList::HasPages() -{ - return (Pages.size() > 0) ? true : false; -} - - -/************** -PageList::Push -**************/ - -void PageList::Push (const char *buf, int size) -{ - if (buf && (size > 0)) { - char *copy = (char*) malloc (size); - if (!copy) - throw std::runtime_error ("no memory in pagelist"); - memcpy (copy, buf, size); - Pages.push_back (Page (copy, size)); - } -} - - - - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/page.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/page.h deleted file mode 100644 index 969fc916..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/page.h +++ /dev/null @@ -1,51 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: page.h -Date: 30Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - -#ifndef __PageManager__H_ -#define __PageManager__H_ - - -/************** -class PageList -**************/ - -class PageList -{ - struct Page { - Page (const char *b, size_t s): Buffer(b), Size(s) {} - const char *Buffer; - size_t Size; - }; - - public: - PageList(); - virtual ~PageList(); - - void Push (const char*, int); - bool HasPages(); - void Front (const char**, int*); - void PopFront(); - - private: - std::deque Pages; -}; - - -#endif // __PageManager__H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/pipe.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/pipe.cpp deleted file mode 100644 index a5f0d9f1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/pipe.cpp +++ /dev/null @@ -1,354 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: pipe.cpp -Date: 30May07 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#include "project.h" - - -#ifdef OS_UNIX -// THIS ENTIRE FILE IS ONLY COMPILED ON UNIX-LIKE SYSTEMS. - -/****************************** -PipeDescriptor::PipeDescriptor -******************************/ - -PipeDescriptor::PipeDescriptor (int fd, pid_t subpid, EventMachine_t *parent_em): - EventableDescriptor (fd, parent_em), - bReadAttemptedAfterClose (false), - OutboundDataSize (0), - SubprocessPid (subpid) -{ - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - #endif - #ifdef HAVE_KQUEUE - MyEventMachine->ArmKqueueReader (this); - #endif -} - - -/******************************* -PipeDescriptor::~PipeDescriptor -*******************************/ - -PipeDescriptor::~PipeDescriptor() NO_EXCEPT_FALSE -{ - // Run down any stranded outbound data. - for (size_t i=0; i < OutboundPages.size(); i++) - OutboundPages[i].Free(); - - /* As a virtual destructor, we come here before the base-class - * destructor that closes our file-descriptor. - * We have to make sure the subprocess goes down (if it's not - * already down) and we have to reap the zombie. - * - * This implementation is PROVISIONAL and will surely be improved. - * The intention here is that we never block, hence the highly - * undesirable sleeps. But if we can't reap the subprocess even - * after sending it SIGKILL, then something is wrong and we - * throw a fatal exception, which is also not something we should - * be doing. - * - * Eventually the right thing to do will be to have the reactor - * core respond to SIGCHLD by chaining a handler on top of the - * one Ruby may have installed, and dealing with a list of dead - * children that are pending cleanup. - * - * Since we want to have a signal processor integrated into the - * client-visible API, let's wait until that is done before cleaning - * this up. - * - * Added a very ugly hack to support passing the subprocess's exit - * status to the user. It only makes logical sense for user code to access - * the subprocess exit status in the unbind callback. But unbind is called - * back during the EventableDescriptor destructor. So by that time there's - * no way to call back this object through an object binding, because it's - * already been cleaned up. We might have added a parameter to the unbind - * callback, but that would probably break a huge amount of existing code. - * So the hack-solution is to define an instance variable in the EventMachine - * object and stick the exit status in there, where it can easily be accessed - * with an accessor visible to user code. - * User code should ONLY access the exit status from within the unbind callback. - * Otherwise there's no guarantee it'll be valid. - * This hack won't make it impossible to run multiple EventMachines in a single - * process, but it will make it impossible to reliably nest unbind calls - * within other unbind calls. (Not sure if that's even possible.) - */ - - assert (MyEventMachine); - - /* Another hack to make the SubprocessPid available to get_subprocess_status */ - MyEventMachine->SubprocessPid = SubprocessPid; - - /* 01Mar09: Updated to use a small nanosleep in a loop. When nanosleep is interrupted by SIGCHLD, - * it resumes the system call after processing the signal (resulting in unnecessary latency). - * Calling nanosleep in a loop avoids this problem. - */ - struct timespec req = {0, 50000000}; // 0.05s - int n; - - // wait 0.5s for the process to die - for (n=0; n<10; n++) { - if (waitpid (SubprocessPid, &(MyEventMachine->SubprocessExitStatus), WNOHANG) != 0) return; - nanosleep (&req, NULL); - } - - // send SIGTERM and wait another 1s - kill (SubprocessPid, SIGTERM); - for (n=0; n<20; n++) { - nanosleep (&req, NULL); - if (waitpid (SubprocessPid, &(MyEventMachine->SubprocessExitStatus), WNOHANG) != 0) return; - } - - // send SIGKILL and wait another 5s - kill (SubprocessPid, SIGKILL); - for (n=0; n<100; n++) { - nanosleep (&req, NULL); - if (waitpid (SubprocessPid, &(MyEventMachine->SubprocessExitStatus), WNOHANG) != 0) return; - } - - // still not dead, give up! - throw std::runtime_error ("unable to reap subprocess"); -} - - - -/******************** -PipeDescriptor::Read -********************/ - -void PipeDescriptor::Read() -{ - int sd = GetSocket(); - if (sd == INVALID_SOCKET) { - assert (!bReadAttemptedAfterClose); - bReadAttemptedAfterClose = true; - return; - } - - LastActivity = MyEventMachine->GetCurrentLoopTime(); - - int total_bytes_read = 0; - char readbuffer [16 * 1024]; - - for (int i=0; i < 10; i++) { - // Don't read just one buffer and then move on. This is faster - // if there is a lot of incoming. - // But don't read indefinitely. Give other sockets a chance to run. - // NOTICE, we're reading one less than the buffer size. - // That's so we can put a guard byte at the end of what we send - // to user code. - // Use read instead of recv, which on Linux gives a "socket operation - // on nonsocket" error. - - - int r = read (sd, readbuffer, sizeof(readbuffer) - 1); - //cerr << ""; - - if (r > 0) { - total_bytes_read += r; - - // Add a null-terminator at the the end of the buffer - // that we will send to the callback. - // DO NOT EVER CHANGE THIS. We want to explicitly allow users - // to be able to depend on this behavior, so they will have - // the option to do some things faster. Additionally it's - // a security guard against buffer overflows. - readbuffer [r] = 0; - _GenericInboundDispatch(readbuffer, r); - } - else if (r == 0) { - break; - } - else { - // Basically a would-block, meaning we've read everything there is to read. - break; - } - - } - - - if (total_bytes_read == 0) { - // If we read no data on a socket that selected readable, - // it generally means the other end closed the connection gracefully. - ScheduleClose (false); - //bCloseNow = true; - } - -} - -/********************* -PipeDescriptor::Write -*********************/ - -void PipeDescriptor::Write() -{ - int sd = GetSocket(); - assert (sd != INVALID_SOCKET); - - LastActivity = MyEventMachine->GetCurrentLoopTime(); - char output_buffer [16 * 1024]; - size_t nbytes = 0; - - while ((OutboundPages.size() > 0) && (nbytes < sizeof(output_buffer))) { - OutboundPage *op = &(OutboundPages[0]); - if ((nbytes + op->Length - op->Offset) < sizeof (output_buffer)) { - memcpy (output_buffer + nbytes, op->Buffer + op->Offset, op->Length - op->Offset); - nbytes += (op->Length - op->Offset); - op->Free(); - OutboundPages.pop_front(); - } - else { - int len = sizeof(output_buffer) - nbytes; - memcpy (output_buffer + nbytes, op->Buffer + op->Offset, len); - op->Offset += len; - nbytes += len; - } - } - - // We should never have gotten here if there were no data to write, - // so assert that as a sanity check. - // Don't bother to make sure nbytes is less than output_buffer because - // if it were we probably would have crashed already. - assert (nbytes > 0); - - assert (GetSocket() != INVALID_SOCKET); - int bytes_written = write (GetSocket(), output_buffer, nbytes); -#ifdef OS_WIN32 - int e = WSAGetLastError(); -#else - int e = errno; -#endif - - if (bytes_written > 0) { - OutboundDataSize -= bytes_written; - if ((size_t)bytes_written < nbytes) { - int len = nbytes - bytes_written; - char *buffer = (char*) malloc (len + 1); - if (!buffer) - throw std::runtime_error ("bad alloc throwing back data"); - memcpy (buffer, output_buffer + bytes_written, len); - buffer [len] = 0; - OutboundPages.push_front (OutboundPage (buffer, len)); - } - #ifdef HAVE_EPOLL - EpollEvent.events = EPOLLIN; - if (SelectForWrite()) - EpollEvent.events |= EPOLLOUT; - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif - } - else { - #ifdef OS_UNIX - if ((e != EINPROGRESS) && (e != EWOULDBLOCK) && (e != EINTR)) - #endif - #ifdef OS_WIN32 - if ((e != WSAEINPROGRESS) && (e != WSAEWOULDBLOCK)) - #endif - Close(); - } -} - - -/************************* -PipeDescriptor::Heartbeat -*************************/ - -void PipeDescriptor::Heartbeat() -{ - // If an inactivity timeout is defined, then check for it. - if (InactivityTimeout && ((MyEventMachine->GetCurrentLoopTime() - LastActivity) >= InactivityTimeout)) - ScheduleClose (false); - //bCloseNow = true; -} - - -/***************************** -PipeDescriptor::SelectForRead -*****************************/ - -bool PipeDescriptor::SelectForRead() -{ - /* Pipe descriptors, being local by definition, don't have - * a pending state, so this is simpler than for the - * ConnectionDescriptor object. - */ - return bPaused ? false : true; -} - -/****************************** -PipeDescriptor::SelectForWrite -******************************/ - -bool PipeDescriptor::SelectForWrite() -{ - /* Pipe descriptors, being local by definition, don't have - * a pending state, so this is simpler than for the - * ConnectionDescriptor object. - */ - return (GetOutboundDataSize() > 0) && !bPaused ? true : false; -} - - - - -/******************************** -PipeDescriptor::SendOutboundData -********************************/ - -int PipeDescriptor::SendOutboundData (const char *data, unsigned long length) -{ - //if (bCloseNow || bCloseAfterWriting) - if (IsCloseScheduled()) - return 0; - - if (!data && (length > 0)) - throw std::runtime_error ("bad outbound data"); - char *buffer = (char *) malloc (length + 1); - if (!buffer) - throw std::runtime_error ("no allocation for outbound data"); - memcpy (buffer, data, length); - buffer [length] = 0; - OutboundPages.push_back (OutboundPage (buffer, length)); - OutboundDataSize += length; - #ifdef HAVE_EPOLL - EpollEvent.events = (EPOLLIN | EPOLLOUT); - assert (MyEventMachine); - MyEventMachine->Modify (this); - #endif - return length; -} - -/******************************** -PipeDescriptor::GetSubprocessPid -********************************/ - -bool PipeDescriptor::GetSubprocessPid (pid_t *pid) -{ - bool ok = false; - if (pid && (SubprocessPid > 0)) { - *pid = SubprocessPid; - ok = true; - } - return ok; -} - - -#endif // OS_UNIX - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/project.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/project.h deleted file mode 100644 index 757f7011..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/project.h +++ /dev/null @@ -1,174 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: project.h -Date: 06Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - -#ifndef __Project__H_ -#define __Project__H_ - - -#include -#include -#include -#include -#include -#include -#include -#include - - -#ifdef OS_UNIX -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -typedef int SOCKET; -#define INVALID_SOCKET -1 -#define SOCKET_ERROR -1 -#ifdef OS_SOLARIS8 -#include -#include -#ifndef AF_LOCAL -#define AF_LOCAL AF_UNIX -#endif -// INADDR_NONE is undefined on Solaris < 8. Thanks to Brett Eisenberg and Tim Pease. -#ifndef INADDR_NONE -#define INADDR_NONE ((unsigned long)-1) -#endif -#endif /* OS_SOLARIS8 */ - -#ifdef _AIX -#include -#ifndef AF_LOCAL -#define AF_LOCAL AF_UNIX -#endif -#endif /* _AIX */ - -#ifdef OS_DARWIN -#include -#include -#endif /* OS_DARWIN */ - -#endif /* OS_UNIX */ - -#ifdef OS_WIN32 -// 21Sep09: windows limits select() to 64 sockets by default, we increase it to 1024 here (before including winsock2.h) -// 18Jun12: fd_setsize must be changed in the ruby binary (not in this extension). redefining it also causes segvs, see eventmachine/eventmachine#333 -//#define FD_SETSIZE 1024 - -// WIN32_LEAN_AND_MEAN excludes APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets. -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include -#include -#include - -// Older versions of MinGW in the Ruby Dev Kit do not provide the getaddrinfo hint flags -#ifndef AI_ADDRCONFIG -#define AI_ADDRCONFIG 0x0400 -#endif - -#ifndef AI_NUMERICSERV -#define AI_NUMERICSERV 0x0008 -#endif - -// Use the Win32 wrapper library that Ruby owns to be able to close sockets with the close() function -#define RUBY_EXPORT -#include -#include -#endif /* OS_WIN32 */ - -#if !defined(_MSC_VER) || _MSC_VER > 1500 -#include -#endif - -#ifdef WITH_SSL -#include -#include -#endif - -#ifdef HAVE_EPOLL -#include -#endif - -#ifdef HAVE_KQUEUE -#include -#include -#endif - -#ifdef HAVE_INOTIFY -#include -#endif - -#ifdef HAVE_OLD_INOTIFY -#include -#include -static inline int inotify_init (void) { return syscall (__NR_inotify_init); } -static inline int inotify_add_watch (int fd, const char *name, __u32 mask) { return syscall (__NR_inotify_add_watch, fd, name, mask); } -static inline int inotify_rm_watch (int fd, __u32 wd) { return syscall (__NR_inotify_rm_watch, fd, wd); } -#define HAVE_INOTIFY 1 -#endif - -#ifdef HAVE_INOTIFY -#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event)) -#endif - -#ifdef HAVE_WRITEV -#include -#endif - -#if __cplusplus -extern "C" { -#endif - typedef void (*EMCallback)(const unsigned long, int, const char*, const unsigned long); -#if __cplusplus -} -#endif - -#if defined(__GNUC__) && (__GNUC__ >= 3) -#define UNUSED __attribute__ ((unused)) -#else -#define UNUSED -#endif - -#include "binder.h" -#include "em.h" -#include "ed.h" -#include "page.h" -#include "ssl.h" -#include "eventmachine.h" - -#endif // __Project__H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/rubymain.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/rubymain.cpp deleted file mode 100644 index 305f9cbd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/rubymain.cpp +++ /dev/null @@ -1,1515 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: rubymain.cpp -Date: 06Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - -#include "project.h" -#include "eventmachine.h" -#include - -#ifndef RFLOAT_VALUE -#define RFLOAT_VALUE(arg) RFLOAT(arg)->value -#endif - -/* Adapted from NUM2BSIG / BSIG2NUM in ext/fiddle/conversions.h, - * we'll call it a BSIG for Binding Signature here. */ -#if SIZEOF_VOIDP == SIZEOF_LONG -# define BSIG2NUM(x) (ULONG2NUM((unsigned long)(x))) -# define NUM2BSIG(x) (NUM2ULONG(x)) -# ifdef OS_WIN32 -# define PRIFBSIG "I32u" -# else -# define PRIFBSIG "lu" -# endif -#else -# define BSIG2NUM(x) (ULL2NUM((unsigned long long)(x))) -# define NUM2BSIG(x) (NUM2ULL(x)) -# ifdef OS_WIN32 -# define PRIFBSIG "I64u" -# else -# define PRIFBSIG "llu" -# endif -#endif - -/******* -Statics -*******/ - -static VALUE EmModule; -static VALUE EmConnection; -static VALUE EmConnsHash; -static VALUE EmTimersHash; - -static VALUE EM_eConnectionError; -static VALUE EM_eUnknownTimerFired; -static VALUE EM_eConnectionNotBound; -static VALUE EM_eUnsupported; -static VALUE EM_eInvalidSignature; - -static VALUE Intern_at_signature; -static VALUE Intern_at_timers; -static VALUE Intern_at_conns; -static VALUE Intern_at_error_handler; -static VALUE Intern_event_callback; -static VALUE Intern_run_deferred_callbacks; -static VALUE Intern_delete; -static VALUE Intern_call; -static VALUE Intern_at; -static VALUE Intern_receive_data; -static VALUE Intern_ssl_handshake_completed; -static VALUE Intern_ssl_verify_peer; -static VALUE Intern_notify_readable; -static VALUE Intern_notify_writable; -static VALUE Intern_proxy_target_unbound; -static VALUE Intern_proxy_completed; -static VALUE Intern_connection_completed; - -static VALUE rb_cProcStatus; - -struct em_event { - uintptr_t signature; - int event; - const char *data_str; - unsigned long data_num; -}; - -static inline VALUE ensure_conn(const uintptr_t signature) -{ - VALUE conn = rb_hash_aref (EmConnsHash, BSIG2NUM (signature)); - if (conn == Qnil) - rb_raise (EM_eConnectionNotBound, "unknown connection: %" PRIFBSIG, signature); - return conn; -} - - -/**************** -t_event_callback -****************/ - -static inline void event_callback (struct em_event* e) -{ - const uintptr_t signature = e->signature; - int event = e->event; - const char *data_str = e->data_str; - const unsigned long data_num = e->data_num; - - switch (event) { - case EM_CONNECTION_READ: - { - VALUE conn = rb_hash_aref (EmConnsHash, BSIG2NUM (signature)); - if (conn == Qnil) - rb_raise (EM_eConnectionNotBound, "received %lu bytes of data for unknown signature: %" PRIFBSIG, data_num, signature); - rb_funcall (conn, Intern_receive_data, 1, rb_str_new (data_str, data_num)); - return; - } - case EM_CONNECTION_ACCEPTED: - { - rb_funcall (EmModule, Intern_event_callback, 3, BSIG2NUM(signature), INT2FIX(event), ULONG2NUM(data_num)); - return; - } - case EM_CONNECTION_UNBOUND: - { - rb_funcall (EmModule, Intern_event_callback, 3, BSIG2NUM(signature), INT2FIX(event), ULONG2NUM(data_num)); - return; - } - case EM_CONNECTION_COMPLETED: - { - VALUE conn = ensure_conn(signature); - rb_funcall (conn, Intern_connection_completed, 0); - return; - } - case EM_CONNECTION_NOTIFY_READABLE: - { - VALUE conn = ensure_conn(signature); - rb_funcall (conn, Intern_notify_readable, 0); - return; - } - case EM_CONNECTION_NOTIFY_WRITABLE: - { - VALUE conn = ensure_conn(signature); - rb_funcall (conn, Intern_notify_writable, 0); - return; - } - case EM_LOOPBREAK_SIGNAL: - { - rb_funcall (EmModule, Intern_run_deferred_callbacks, 0); - return; - } - case EM_TIMER_FIRED: - { - VALUE timer = rb_funcall (EmTimersHash, Intern_delete, 1, ULONG2NUM (data_num)); - if (timer == Qnil) { - rb_raise (EM_eUnknownTimerFired, "no such timer: %lu", data_num); - } else if (timer == Qfalse) { - /* Timer Canceled */ - } else { - rb_funcall (timer, Intern_call, 0); - } - return; - } - #ifdef WITH_SSL - case EM_SSL_HANDSHAKE_COMPLETED: - { - VALUE conn = ensure_conn(signature); - rb_funcall (conn, Intern_ssl_handshake_completed, 0); - return; - } - case EM_SSL_VERIFY: - { - VALUE conn = ensure_conn(signature); - VALUE should_accept = rb_funcall (conn, Intern_ssl_verify_peer, 1, rb_str_new(data_str, data_num)); - if (RTEST(should_accept)) - evma_accept_ssl_peer (signature); - return; - } - #endif - case EM_PROXY_TARGET_UNBOUND: - { - VALUE conn = ensure_conn(signature); - rb_funcall (conn, Intern_proxy_target_unbound, 0); - return; - } - case EM_PROXY_COMPLETED: - { - VALUE conn = ensure_conn(signature); - rb_funcall (conn, Intern_proxy_completed, 0); - return; - } - } -} - -/******************* -event_error_handler -*******************/ - -static void event_error_handler(VALUE self UNUSED, VALUE err) -{ - VALUE error_handler = rb_ivar_get(EmModule, Intern_at_error_handler); - rb_funcall (error_handler, Intern_call, 1, err); -} - -/********************** -event_callback_wrapper -**********************/ - -static void event_callback_wrapper (const uintptr_t signature, int event, const char *data_str, const unsigned long data_num) -{ - struct em_event e; - e.signature = signature; - e.event = event; - e.data_str = data_str; - e.data_num = data_num; - - if (!rb_ivar_defined(EmModule, Intern_at_error_handler)) - event_callback(&e); - else - rb_rescue((VALUE (*)(ANYARGS))event_callback, (VALUE)&e, (VALUE (*)(ANYARGS))event_error_handler, Qnil); -} - -/************************** -t_initialize_event_machine -**************************/ - -static VALUE t_initialize_event_machine (VALUE self UNUSED) -{ - EmConnsHash = rb_ivar_get (EmModule, Intern_at_conns); - EmTimersHash = rb_ivar_get (EmModule, Intern_at_timers); - assert(EmConnsHash != Qnil); - assert(EmTimersHash != Qnil); - evma_initialize_library ((EMCallback)event_callback_wrapper); - return Qnil; -} - - -/****************** -t_run_machine_once -******************/ - -static VALUE t_run_machine_once (VALUE self UNUSED) -{ - return evma_run_machine_once () ? Qtrue : Qfalse; -} - - -/************* -t_run_machine -*************/ - -static VALUE t_run_machine (VALUE self UNUSED) -{ - evma_run_machine(); - return Qnil; -} - - -/******************* -t_add_oneshot_timer -*******************/ - -static VALUE t_add_oneshot_timer (VALUE self UNUSED, VALUE interval) -{ - const uintptr_t f = evma_install_oneshot_timer (FIX2LONG (interval)); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "ran out of timers; use #set_max_timers to increase limit"); - return BSIG2NUM (f); -} - - -/************** -t_start_server -**************/ - -static VALUE t_start_server (VALUE self UNUSED, VALUE server, VALUE port) -{ - const uintptr_t f = evma_create_tcp_server (StringValueCStr(server), FIX2INT(port)); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "no acceptor (port is in use or requires root privileges)"); - return BSIG2NUM (f); -} - -/************* -t_stop_server -*************/ - -static VALUE t_stop_server (VALUE self UNUSED, VALUE signature) -{ - evma_stop_tcp_server (NUM2BSIG (signature)); - return Qnil; -} - - -/******************* -t_start_unix_server -*******************/ - -static VALUE t_start_unix_server (VALUE self UNUSED, VALUE filename) -{ - const uintptr_t f = evma_create_unix_domain_server (StringValueCStr(filename)); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "no unix-domain acceptor"); - return BSIG2NUM (f); -} - -/******************** -t_attach_sd -********************/ - -static VALUE t_attach_sd(VALUE self UNUSED, VALUE sd) -{ - const uintptr_t f = evma_attach_sd(FIX2INT(sd)); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "no socket descriptor acceptor"); - return BSIG2NUM (f); -} - - -/*********** -t_send_data -***********/ - -static VALUE t_send_data (VALUE self UNUSED, VALUE signature, VALUE data, VALUE data_length) -{ - int b = evma_send_data_to_connection (NUM2BSIG (signature), StringValuePtr (data), FIX2INT (data_length)); - return INT2NUM (b); -} - - -/*********** -t_start_tls -***********/ - -static VALUE t_start_tls (VALUE self UNUSED, VALUE signature) -{ - evma_start_tls (NUM2BSIG (signature)); - return Qnil; -} - -/*************** -t_set_tls_parms -***************/ - -static VALUE t_set_tls_parms (VALUE self UNUSED, VALUE signature, VALUE privkeyfile, VALUE certchainfile, VALUE verify_peer, VALUE fail_if_no_peer_cert, VALUE snihostname, VALUE cipherlist, VALUE ecdh_curve, VALUE dhparam, VALUE ssl_version) -{ - /* set_tls_parms takes a series of positional arguments for specifying such things - * as private keys and certificate chains. - * It's expected that the parameter list will grow as we add more supported features. - * ALL of these parameters are optional, and can be specified as empty or NULL strings. - */ - evma_set_tls_parms (NUM2BSIG (signature), StringValueCStr (privkeyfile), StringValueCStr (certchainfile), (verify_peer == Qtrue ? 1 : 0), (fail_if_no_peer_cert == Qtrue ? 1 : 0), StringValueCStr (snihostname), StringValueCStr (cipherlist), StringValueCStr (ecdh_curve), StringValueCStr (dhparam), NUM2INT (ssl_version)); - return Qnil; -} - -/*************** -t_get_peer_cert -***************/ - -#ifdef WITH_SSL -static VALUE t_get_peer_cert (VALUE self UNUSED, VALUE signature) -{ - VALUE ret = Qnil; - - X509 *cert = NULL; - BUF_MEM *buf; - BIO *out; - - cert = evma_get_peer_cert (NUM2BSIG (signature)); - - if (cert != NULL) { - out = BIO_new(BIO_s_mem()); - PEM_write_bio_X509(out, cert); - BIO_get_mem_ptr(out, &buf); - ret = rb_str_new(buf->data, buf->length); - X509_free(cert); - BIO_free(out); - } - - return ret; -} -#else -static VALUE t_get_peer_cert (VALUE self UNUSED, VALUE signature UNUSED) -{ - return Qnil; -} -#endif - -/*************** -t_get_cipher_bits -***************/ - -#ifdef WITH_SSL -static VALUE t_get_cipher_bits (VALUE self UNUSED, VALUE signature) -{ - int bits = evma_get_cipher_bits (NUM2BSIG (signature)); - if (bits == -1) - return Qnil; - return INT2NUM (bits); -} -#else -static VALUE t_get_cipher_bits (VALUE self UNUSED, VALUE signature UNUSED) -{ - return Qnil; -} -#endif - -/*************** -t_get_cipher_name -***************/ - -#ifdef WITH_SSL -static VALUE t_get_cipher_name (VALUE self UNUSED, VALUE signature) -{ - const char *protocol = evma_get_cipher_name (NUM2BSIG (signature)); - if (protocol) - return rb_str_new2 (protocol); - - return Qnil; -} -#else -static VALUE t_get_cipher_name (VALUE self UNUSED, VALUE signature UNUSED) -{ - return Qnil; -} -#endif - -/*************** -t_get_cipher_protocol -***************/ - -#ifdef WITH_SSL -static VALUE t_get_cipher_protocol (VALUE self UNUSED, VALUE signature) -{ - const char *cipher = evma_get_cipher_protocol (NUM2BSIG (signature)); - if (cipher) - return rb_str_new2 (cipher); - - return Qnil; -} -#else -static VALUE t_get_cipher_protocol (VALUE self UNUSED, VALUE signature UNUSED) -{ - return Qnil; -} -#endif - -/*************** -t_get_sni_hostname -***************/ - -#ifdef WITH_SSL -static VALUE t_get_sni_hostname (VALUE self UNUSED, VALUE signature) -{ - const char *sni_hostname = evma_get_sni_hostname (NUM2BSIG (signature)); - if (sni_hostname) - return rb_str_new2 (sni_hostname); - - return Qnil; -} -#else -static VALUE t_get_sni_hostname (VALUE self UNUSED, VALUE signature UNUSED) -{ - return Qnil; -} -#endif - -/************** -t_get_peername -**************/ - -static VALUE t_get_peername (VALUE self UNUSED, VALUE signature) -{ - char buf[1024]; - socklen_t len = sizeof buf; - try { - if (evma_get_peername (NUM2BSIG (signature), (struct sockaddr*)buf, &len)) { - return rb_str_new (buf, len); - } - } catch (std::runtime_error e) { - rb_raise (rb_eRuntimeError, "%s", e.what()); - } - - return Qnil; -} - -/************** -t_get_sockname -**************/ - -static VALUE t_get_sockname (VALUE self UNUSED, VALUE signature) -{ - char buf[1024]; - socklen_t len = sizeof buf; - try { - if (evma_get_sockname (NUM2BSIG (signature), (struct sockaddr*)buf, &len)) { - return rb_str_new (buf, len); - } - } catch (std::runtime_error e) { - rb_raise (rb_eRuntimeError, "%s", e.what()); - } - - return Qnil; -} - -/******************** -t_get_subprocess_pid -********************/ - -static VALUE t_get_subprocess_pid (VALUE self UNUSED, VALUE signature) -{ - pid_t pid; - if (evma_get_subprocess_pid (NUM2BSIG (signature), &pid)) { - return INT2NUM (pid); - } - - return Qnil; -} - -/*********************** -t_get_subprocess_status -***********************/ - -static VALUE t_get_subprocess_status (VALUE self UNUSED, VALUE signature) -{ - VALUE proc_status = Qnil; - - int status; - pid_t pid; - - if (evma_get_subprocess_status (NUM2BSIG (signature), &status)) { - if (evma_get_subprocess_pid (NUM2BSIG (signature), &pid)) { - proc_status = rb_obj_alloc(rb_cProcStatus); - - /* MRI Ruby uses hidden instance vars */ - rb_iv_set(proc_status, "status", INT2FIX(status)); - rb_iv_set(proc_status, "pid", INT2FIX(pid)); - -#ifdef RUBINIUS - /* Rubinius uses standard instance vars */ - rb_iv_set(proc_status, "@pid", INT2FIX(pid)); - if (WIFEXITED(status)) { - rb_iv_set(proc_status, "@status", INT2FIX(WEXITSTATUS(status))); - } else if (WIFSIGNALED(status)) { - rb_iv_set(proc_status, "@termsig", INT2FIX(WTERMSIG(status))); - } else if (WIFSTOPPED(status)) { - rb_iv_set(proc_status, "@stopsig", INT2FIX(WSTOPSIG(status))); - } -#endif - } - } - - return proc_status; -} - -/********************** -t_get_connection_count -**********************/ - -static VALUE t_get_connection_count (VALUE self UNUSED) -{ - return INT2NUM(evma_get_connection_count()); -} - -/***************************** -t_get_comm_inactivity_timeout -*****************************/ - -static VALUE t_get_comm_inactivity_timeout (VALUE self UNUSED, VALUE signature) -{ - return rb_float_new(evma_get_comm_inactivity_timeout(NUM2BSIG (signature))); -} - -/***************************** -t_set_comm_inactivity_timeout -*****************************/ - -static VALUE t_set_comm_inactivity_timeout (VALUE self UNUSED, VALUE signature, VALUE timeout) -{ - float ti = RFLOAT_VALUE(timeout); - if (evma_set_comm_inactivity_timeout(NUM2BSIG(signature), ti)) { - return Qtrue; - } - return Qfalse; -} - -/***************************** -t_get_pending_connect_timeout -*****************************/ - -static VALUE t_get_pending_connect_timeout (VALUE self UNUSED, VALUE signature) -{ - return rb_float_new(evma_get_pending_connect_timeout(NUM2BSIG (signature))); -} - -/***************************** -t_set_pending_connect_timeout -*****************************/ - -static VALUE t_set_pending_connect_timeout (VALUE self UNUSED, VALUE signature, VALUE timeout) -{ - float ti = RFLOAT_VALUE(timeout); - if (evma_set_pending_connect_timeout(NUM2BSIG(signature), ti)) { - return Qtrue; - } - return Qfalse; -} - -/*************** -t_send_datagram -***************/ - -static VALUE t_send_datagram (VALUE self UNUSED, VALUE signature, VALUE data, VALUE data_length, VALUE address, VALUE port) -{ - int b = evma_send_datagram (NUM2BSIG (signature), StringValuePtr (data), FIX2INT (data_length), StringValueCStr(address), FIX2INT(port)); - if (b < 0) - rb_raise (EM_eConnectionError, "%s", "error in sending datagram"); // FIXME: this could be more specific. - return INT2NUM (b); -} - - -/****************** -t_close_connection -******************/ - -static VALUE t_close_connection (VALUE self UNUSED, VALUE signature, VALUE after_writing) -{ - evma_close_connection (NUM2BSIG (signature), ((after_writing == Qtrue) ? 1 : 0)); - return Qnil; -} - -/******************************** -t_report_connection_error_status -********************************/ - -static VALUE t_report_connection_error_status (VALUE self UNUSED, VALUE signature) -{ - int b = evma_report_connection_error_status (NUM2BSIG (signature)); - return INT2NUM (b); -} - - - -/**************** -t_connect_server -****************/ - -static VALUE t_connect_server (VALUE self UNUSED, VALUE server, VALUE port) -{ - // Avoid FIX2INT in this case, because it doesn't deal with type errors properly. - // Specifically, if the value of port comes in as a string rather than an integer, - // NUM2INT will throw a type error, but FIX2INT will generate garbage. - - try { - const uintptr_t f = evma_connect_to_server (NULL, 0, StringValueCStr(server), NUM2INT(port)); - if (!f) - rb_raise (EM_eConnectionError, "%s", "no connection"); - return BSIG2NUM (f); - } catch (std::runtime_error e) { - rb_raise (EM_eConnectionError, "%s", e.what()); - } - return Qnil; -} - -/********************* -t_bind_connect_server -*********************/ - -static VALUE t_bind_connect_server (VALUE self UNUSED, VALUE bind_addr, VALUE bind_port, VALUE server, VALUE port) -{ - // Avoid FIX2INT in this case, because it doesn't deal with type errors properly. - // Specifically, if the value of port comes in as a string rather than an integer, - // NUM2INT will throw a type error, but FIX2INT will generate garbage. - - try { - const uintptr_t f = evma_connect_to_server (StringValueCStr(bind_addr), NUM2INT(bind_port), StringValueCStr(server), NUM2INT(port)); - if (!f) - rb_raise (EM_eConnectionError, "%s", "no connection"); - return BSIG2NUM (f); - } catch (std::runtime_error e) { - rb_raise (EM_eConnectionError, "%s", e.what()); - } - return Qnil; -} - -/********************* -t_connect_unix_server -*********************/ - -static VALUE t_connect_unix_server (VALUE self UNUSED, VALUE serversocket) -{ - const uintptr_t f = evma_connect_to_unix_server (StringValueCStr(serversocket)); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "no connection"); - return BSIG2NUM (f); -} - -/*********** -t_attach_fd -***********/ - -static VALUE t_attach_fd (VALUE self UNUSED, VALUE file_descriptor, VALUE watch_mode) -{ - const uintptr_t f = evma_attach_fd (NUM2INT(file_descriptor), watch_mode == Qtrue); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "no connection"); - return BSIG2NUM (f); -} - -/*********** -t_detach_fd -***********/ - -static VALUE t_detach_fd (VALUE self UNUSED, VALUE signature) -{ - return INT2NUM(evma_detach_fd (NUM2BSIG (signature))); -} - -/********************* -t_get_file_descriptor -*********************/ -static VALUE t_get_file_descriptor (VALUE self UNUSED, VALUE signature) -{ - return INT2NUM(evma_get_file_descriptor (NUM2BSIG (signature))); -} - -/************** -t_get_sock_opt -**************/ - -static VALUE t_get_sock_opt (VALUE self UNUSED, VALUE signature, VALUE lev, VALUE optname) -{ - int fd = evma_get_file_descriptor (NUM2BSIG (signature)); - int level = NUM2INT(lev), option = NUM2INT(optname); - socklen_t len = 128; - char buf[128]; - - if (getsockopt(fd, level, option, buf, &len) < 0) - rb_sys_fail("getsockopt"); - - return rb_str_new(buf, len); -} - -/************** -t_set_sock_opt -**************/ - -static VALUE t_set_sock_opt (VALUE self UNUSED, VALUE signature, VALUE lev, VALUE optname, VALUE optval) -{ - int fd = evma_get_file_descriptor (NUM2BSIG (signature)); - int level = NUM2INT(lev), option = NUM2INT(optname); - int i; - const void *v; - socklen_t len; - - switch (TYPE(optval)) { - case T_FIXNUM: - i = FIX2INT(optval); - goto numval; - case T_FALSE: - i = 0; - goto numval; - case T_TRUE: - i = 1; - numval: - v = (void*)&i; len = sizeof(i); - break; - default: - StringValue(optval); - v = RSTRING_PTR(optval); - len = RSTRING_LENINT(optval); - break; - } - - - if (setsockopt(fd, level, option, (char *)v, len) < 0) - rb_sys_fail("setsockopt"); - - return INT2FIX(0); -} - -/******************** -t_is_notify_readable -********************/ - -static VALUE t_is_notify_readable (VALUE self UNUSED, VALUE signature) -{ - return evma_is_notify_readable(NUM2BSIG (signature)) ? Qtrue : Qfalse; -} - -/********************* -t_set_notify_readable -*********************/ - -static VALUE t_set_notify_readable (VALUE self UNUSED, VALUE signature, VALUE mode) -{ - evma_set_notify_readable(NUM2BSIG(signature), mode == Qtrue); - return Qnil; -} - -/******************** -t_is_notify_readable -********************/ - -static VALUE t_is_notify_writable (VALUE self UNUSED, VALUE signature) -{ - return evma_is_notify_writable(NUM2BSIG (signature)) ? Qtrue : Qfalse; -} - -/********************* -t_set_notify_writable -*********************/ - -static VALUE t_set_notify_writable (VALUE self UNUSED, VALUE signature, VALUE mode) -{ - evma_set_notify_writable(NUM2BSIG (signature), mode == Qtrue); - return Qnil; -} - -/******* -t_pause -*******/ - -static VALUE t_pause (VALUE self UNUSED, VALUE signature) -{ - return evma_pause(NUM2BSIG (signature)) ? Qtrue : Qfalse; -} - -/******** -t_resume -********/ - -static VALUE t_resume (VALUE self UNUSED, VALUE signature) -{ - return evma_resume(NUM2BSIG (signature)) ? Qtrue : Qfalse; -} - -/********** -t_paused_p -**********/ - -static VALUE t_paused_p (VALUE self UNUSED, VALUE signature) -{ - return evma_is_paused(NUM2BSIG (signature)) ? Qtrue : Qfalse; -} - -/********************* -t_num_close_scheduled -*********************/ - -static VALUE t_num_close_scheduled (VALUE self UNUSED) -{ - return INT2FIX(evma_num_close_scheduled()); -} - -/***************** -t_open_udp_socket -*****************/ - -static VALUE t_open_udp_socket (VALUE self UNUSED, VALUE server, VALUE port) -{ - const uintptr_t f = evma_open_datagram_socket (StringValueCStr(server), FIX2INT(port)); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "no datagram socket"); - return BSIG2NUM(f); -} - - - -/***************** -t_release_machine -*****************/ - -static VALUE t_release_machine (VALUE self UNUSED) -{ - evma_release_library(); - return Qnil; -} - - -/****** -t_stop -******/ - -static VALUE t_stop (VALUE self UNUSED) -{ - evma_stop_machine(); - return Qnil; -} - -/****************** -t_signal_loopbreak -******************/ - -static VALUE t_signal_loopbreak (VALUE self UNUSED) -{ - evma_signal_loopbreak(); - return Qnil; -} - -/************** -t_library_type -**************/ - -static VALUE t_library_type (VALUE self UNUSED) -{ - return rb_eval_string (":extension"); -} - - - -/******************* -t_set_timer_quantum -*******************/ - -static VALUE t_set_timer_quantum (VALUE self UNUSED, VALUE interval) -{ - evma_set_timer_quantum (FIX2INT (interval)); - return Qnil; -} - -/******************** -t_get_max_timer_count -********************/ - -static VALUE t_get_max_timer_count (VALUE self UNUSED) -{ - return INT2FIX (evma_get_max_timer_count()); -} - -/******************** -t_set_max_timer_count -********************/ - -static VALUE t_set_max_timer_count (VALUE self UNUSED, VALUE ct) -{ - evma_set_max_timer_count (FIX2INT (ct)); - return Qnil; -} - -/******************** -t_get/set_simultaneous_accept_count -********************/ - -static VALUE t_get_simultaneous_accept_count (VALUE self UNUSED) -{ - return INT2FIX (evma_get_simultaneous_accept_count()); -} - -static VALUE t_set_simultaneous_accept_count (VALUE self UNUSED, VALUE ct) -{ - evma_set_simultaneous_accept_count (FIX2INT (ct)); - return Qnil; -} - -/*************** -t_setuid_string -***************/ - -static VALUE t_setuid_string (VALUE self UNUSED, VALUE username) -{ - evma_setuid_string (StringValueCStr (username)); - return Qnil; -} - - - -/************** -t_invoke_popen -**************/ - -static VALUE t_invoke_popen (VALUE self UNUSED, VALUE cmd) -{ - #ifdef OS_WIN32 - rb_raise (EM_eUnsupported, "popen is not available on this platform"); - #endif - - int len = RARRAY_LEN(cmd); - if (len >= 2048) - rb_raise (rb_eRuntimeError, "%s", "too many arguments to popen"); - char *strings [2048]; - for (int i=0; i < len; i++) { - VALUE ix = INT2FIX (i); - VALUE s = rb_ary_aref (1, &ix, cmd); - strings[i] = StringValueCStr (s); - } - strings[len] = NULL; - - uintptr_t f = 0; - try { - f = evma_popen (strings); - } catch (std::runtime_error e) { - rb_raise (rb_eRuntimeError, "%s", e.what()); - } - if (!f) { - char *err = strerror (errno); - char buf[100]; - memset (buf, 0, sizeof(buf)); - snprintf (buf, sizeof(buf)-1, "no popen: %s", (err?err:"???")); - rb_raise (rb_eRuntimeError, "%s", buf); - } - return BSIG2NUM (f); -} - - -/*************** -t_read_keyboard -***************/ - -static VALUE t_read_keyboard (VALUE self UNUSED) -{ - const uintptr_t f = evma_open_keyboard(); - if (!f) - rb_raise (rb_eRuntimeError, "%s", "no keyboard reader"); - return BSIG2NUM (f); -} - - -/**************** -t_watch_filename -****************/ - -static VALUE t_watch_filename (VALUE self UNUSED, VALUE fname) -{ - try { - return BSIG2NUM(evma_watch_filename(StringValueCStr(fname))); - } catch (std::runtime_error e) { - rb_raise (EM_eUnsupported, "%s", e.what()); - } - return Qnil; -} - - -/****************** -t_unwatch_filename -******************/ - -static VALUE t_unwatch_filename (VALUE self UNUSED, VALUE sig) -{ - try { - evma_unwatch_filename(NUM2BSIG (sig)); - } catch (std::runtime_error e) { - rb_raise (EM_eInvalidSignature, "%s", e.what()); - } - - return Qnil; -} - - -/*********** -t_watch_pid -***********/ - -static VALUE t_watch_pid (VALUE self UNUSED, VALUE pid) -{ - try { - return BSIG2NUM(evma_watch_pid(NUM2INT(pid))); - } catch (std::runtime_error e) { - rb_raise (EM_eUnsupported, "%s", e.what()); - } - return Qnil; -} - - -/************* -t_unwatch_pid -*************/ - -static VALUE t_unwatch_pid (VALUE self UNUSED, VALUE sig) -{ - evma_unwatch_pid(NUM2BSIG (sig)); - return Qnil; -} - - -/********** -t__epoll_p -**********/ - -static VALUE t__epoll_p (VALUE self UNUSED) -{ - #ifdef HAVE_EPOLL - return Qtrue; - #else - return Qfalse; - #endif -} - -/******** -t__epoll -********/ - -static VALUE t__epoll (VALUE self UNUSED) -{ - if (t__epoll_p(self) == Qfalse) - return Qfalse; - - evma_set_epoll (1); - return Qtrue; -} - -/*********** -t__epoll_set -***********/ - -static VALUE t__epoll_set (VALUE self, VALUE val) -{ - if (t__epoll_p(self) == Qfalse && val == Qtrue) - rb_raise (EM_eUnsupported, "%s", "epoll is not supported on this platform"); - - evma_set_epoll (val == Qtrue ? 1 : 0); - return val; -} - - -/*********** -t__kqueue_p -***********/ - -static VALUE t__kqueue_p (VALUE self UNUSED) -{ - #ifdef HAVE_KQUEUE - return Qtrue; - #else - return Qfalse; - #endif -} - -/********* -t__kqueue -*********/ - -static VALUE t__kqueue (VALUE self UNUSED) -{ - if (t__kqueue_p(self) == Qfalse) - return Qfalse; - - evma_set_kqueue (1); - return Qtrue; -} - -/************* -t__kqueue_set -*************/ - -static VALUE t__kqueue_set (VALUE self, VALUE val) -{ - if (t__kqueue_p(self) == Qfalse && val == Qtrue) - rb_raise (EM_eUnsupported, "%s", "kqueue is not supported on this platform"); - - evma_set_kqueue (val == Qtrue ? 1 : 0); - return val; -} - - -/******** -t__ssl_p -********/ - -static VALUE t__ssl_p (VALUE self UNUSED) -{ - #ifdef WITH_SSL - return Qtrue; - #else - return Qfalse; - #endif -} - -/******** -t_stopping -********/ - -static VALUE t_stopping () -{ - if (evma_stopping()) { - return Qtrue; - } else { - return Qfalse; - } -} - - -/**************** -t_send_file_data -****************/ - -static VALUE t_send_file_data (VALUE self UNUSED, VALUE signature, VALUE filename) -{ - - /* The current implementation of evma_send_file_data_to_connection enforces a strict - * upper limit on the file size it will transmit (currently 32K). The function returns - * zero on success, -1 if the requested file exceeds its size limit, and a positive - * number for other errors. - * TODO: Positive return values are actually errno's, which is probably the wrong way to - * do this. For one thing it's ugly. For another, we can't be sure zero is never a real errno. - */ - - int b = evma_send_file_data_to_connection (NUM2BSIG (signature), StringValueCStr(filename)); - if (b == -1) - rb_raise(rb_eRuntimeError, "%s", "File too large. send_file_data() supports files under 32k."); - if (b > 0) { - char *err = strerror (b); - char buf[1024]; - memset (buf, 0, sizeof(buf)); - snprintf (buf, sizeof(buf)-1, ": %s %s", StringValueCStr(filename),(err?err:"???")); - - rb_raise (rb_eIOError, "%s", buf); - } - - return INT2NUM (0); -} - - -/******************* -t_set_rlimit_nofile -*******************/ - -static VALUE t_set_rlimit_nofile (VALUE self UNUSED, VALUE arg) -{ - arg = (NIL_P(arg)) ? -1 : NUM2INT (arg); - return INT2NUM (evma_set_rlimit_nofile (arg)); -} - -/*************************** -conn_get_outbound_data_size -***************************/ - -static VALUE conn_get_outbound_data_size (VALUE self) -{ - VALUE sig = rb_ivar_get (self, Intern_at_signature); - return INT2NUM (evma_get_outbound_data_size (NUM2BSIG (sig))); -} - - -/****************************** -conn_associate_callback_target -******************************/ - -static VALUE conn_associate_callback_target (VALUE self UNUSED, VALUE sig UNUSED) -{ - // No-op for the time being. - return Qnil; -} - - -/*************** -t_get_loop_time -****************/ - -static VALUE t_get_loop_time (VALUE self UNUSED) -{ - uint64_t current_time = evma_get_current_loop_time(); - if (current_time == 0) { - return Qnil; - } - - // Generally the industry has moved to 64-bit time_t, this is just in case we're 32-bit time_t. - if (sizeof(time_t) < 8 && current_time > INT_MAX) { - return rb_funcall(rb_cTime, Intern_at, 2, INT2NUM(current_time / 1000000), INT2NUM(current_time % 1000000)); - } else { - return rb_time_new(current_time / 1000000, current_time % 1000000); - } -} - - -/************* -t_start_proxy -**************/ - -static VALUE t_start_proxy (VALUE self UNUSED, VALUE from, VALUE to, VALUE bufsize, VALUE length) -{ - try { - evma_start_proxy(NUM2BSIG (from), NUM2BSIG (to), NUM2ULONG(bufsize), NUM2ULONG(length)); - } catch (std::runtime_error e) { - rb_raise (EM_eConnectionError, "%s", e.what()); - } - return Qnil; -} - - -/************ -t_stop_proxy -*************/ - -static VALUE t_stop_proxy (VALUE self UNUSED, VALUE from) -{ - try{ - evma_stop_proxy(NUM2BSIG (from)); - } catch (std::runtime_error e) { - rb_raise (EM_eConnectionError, "%s", e.what()); - } - return Qnil; -} - -/*************** -t_proxied_bytes -****************/ - -static VALUE t_proxied_bytes (VALUE self UNUSED, VALUE from) -{ - try{ - return BSIG2NUM(evma_proxied_bytes(NUM2BSIG (from))); - } catch (std::runtime_error e) { - rb_raise (EM_eConnectionError, "%s", e.what()); - } - return Qnil; -} - -/*************** -t_get_idle_time -****************/ - -static VALUE t_get_idle_time (VALUE self UNUSED, VALUE from) -{ - try{ - uint64_t current_time = evma_get_current_loop_time(); - uint64_t time = evma_get_last_activity_time(NUM2BSIG (from)); - if (current_time != 0 && time != 0) { - if (time >= current_time) - return BSIG2NUM(0); - else { - uint64_t diff = current_time - time; - float seconds = diff / (1000.0*1000.0); - return rb_float_new(seconds); - } - return Qnil; - } - } catch (std::runtime_error e) { - rb_raise (EM_eConnectionError, "%s", e.what()); - } - return Qnil; -} - -/************************ -t_get_heartbeat_interval -*************************/ - -static VALUE t_get_heartbeat_interval (VALUE self UNUSED) -{ - return rb_float_new(evma_get_heartbeat_interval()); -} - - -/************************ -t_set_heartbeat_interval -*************************/ - -static VALUE t_set_heartbeat_interval (VALUE self UNUSED, VALUE interval) -{ - float iv = RFLOAT_VALUE(interval); - if (evma_set_heartbeat_interval(iv)) - return Qtrue; - return Qfalse; -} - - -/********************* -Init_rubyeventmachine -*********************/ - -extern "C" void Init_rubyeventmachine() -{ - // Lookup Process::Status for get_subprocess_status - VALUE rb_mProcess = rb_const_get(rb_cObject, rb_intern("Process")); - rb_cProcStatus = rb_const_get(rb_mProcess, rb_intern("Status")); - - // Tuck away some symbol values so we don't have to look 'em up every time we need 'em. - Intern_at_signature = rb_intern ("@signature"); - Intern_at_timers = rb_intern ("@timers"); - Intern_at_conns = rb_intern ("@conns"); - Intern_at_error_handler = rb_intern("@error_handler"); - - Intern_event_callback = rb_intern ("event_callback"); - Intern_run_deferred_callbacks = rb_intern ("run_deferred_callbacks"); - Intern_delete = rb_intern ("delete"); - Intern_call = rb_intern ("call"); - Intern_at = rb_intern("at"); - Intern_receive_data = rb_intern ("receive_data"); - Intern_ssl_handshake_completed = rb_intern ("ssl_handshake_completed"); - Intern_ssl_verify_peer = rb_intern ("ssl_verify_peer"); - Intern_notify_readable = rb_intern ("notify_readable"); - Intern_notify_writable = rb_intern ("notify_writable"); - Intern_proxy_target_unbound = rb_intern ("proxy_target_unbound"); - Intern_proxy_completed = rb_intern ("proxy_completed"); - Intern_connection_completed = rb_intern ("connection_completed"); - - // INCOMPLETE, we need to define class Connections inside module EventMachine - // run_machine and run_machine_without_threads are now identical. - // Must deprecate the without_threads variant. - EmModule = rb_define_module ("EventMachine"); - EmConnection = rb_define_class_under (EmModule, "Connection", rb_cObject); - - rb_define_class_under (EmModule, "NoHandlerForAcceptedConnection", rb_eRuntimeError); - EM_eConnectionError = rb_define_class_under (EmModule, "ConnectionError", rb_eRuntimeError); - EM_eConnectionNotBound = rb_define_class_under (EmModule, "ConnectionNotBound", rb_eRuntimeError); - EM_eUnknownTimerFired = rb_define_class_under (EmModule, "UnknownTimerFired", rb_eRuntimeError); - EM_eUnsupported = rb_define_class_under (EmModule, "Unsupported", rb_eRuntimeError); - EM_eInvalidSignature = rb_define_class_under (EmModule, "InvalidSignature", rb_eRuntimeError); - - rb_define_module_function (EmModule, "initialize_event_machine", (VALUE(*)(...))t_initialize_event_machine, 0); - rb_define_module_function (EmModule, "run_machine_once", (VALUE(*)(...))t_run_machine_once, 0); - rb_define_module_function (EmModule, "run_machine", (VALUE(*)(...))t_run_machine, 0); - rb_define_module_function (EmModule, "run_machine_without_threads", (VALUE(*)(...))t_run_machine, 0); - rb_define_module_function (EmModule, "add_oneshot_timer", (VALUE(*)(...))t_add_oneshot_timer, 1); - rb_define_module_function (EmModule, "start_tcp_server", (VALUE(*)(...))t_start_server, 2); - rb_define_module_function (EmModule, "stop_tcp_server", (VALUE(*)(...))t_stop_server, 1); - rb_define_module_function (EmModule, "start_unix_server", (VALUE(*)(...))t_start_unix_server, 1); - rb_define_module_function (EmModule, "attach_sd", (VALUE(*)(...))t_attach_sd, 1); - rb_define_module_function (EmModule, "set_tls_parms", (VALUE(*)(...))t_set_tls_parms, 10); - rb_define_module_function (EmModule, "start_tls", (VALUE(*)(...))t_start_tls, 1); - rb_define_module_function (EmModule, "get_peer_cert", (VALUE(*)(...))t_get_peer_cert, 1); - rb_define_module_function (EmModule, "get_cipher_bits", (VALUE(*)(...))t_get_cipher_bits, 1); - rb_define_module_function (EmModule, "get_cipher_name", (VALUE(*)(...))t_get_cipher_name, 1); - rb_define_module_function (EmModule, "get_cipher_protocol", (VALUE(*)(...))t_get_cipher_protocol, 1); - rb_define_module_function (EmModule, "get_sni_hostname", (VALUE(*)(...))t_get_sni_hostname, 1); - rb_define_module_function (EmModule, "send_data", (VALUE(*)(...))t_send_data, 3); - rb_define_module_function (EmModule, "send_datagram", (VALUE(*)(...))t_send_datagram, 5); - rb_define_module_function (EmModule, "close_connection", (VALUE(*)(...))t_close_connection, 2); - rb_define_module_function (EmModule, "report_connection_error_status", (VALUE(*)(...))t_report_connection_error_status, 1); - rb_define_module_function (EmModule, "connect_server", (VALUE(*)(...))t_connect_server, 2); - rb_define_module_function (EmModule, "bind_connect_server", (VALUE(*)(...))t_bind_connect_server, 4); - rb_define_module_function (EmModule, "connect_unix_server", (VALUE(*)(...))t_connect_unix_server, 1); - - rb_define_module_function (EmModule, "attach_fd", (VALUE (*)(...))t_attach_fd, 2); - rb_define_module_function (EmModule, "detach_fd", (VALUE (*)(...))t_detach_fd, 1); - rb_define_module_function (EmModule, "get_file_descriptor", (VALUE (*)(...))t_get_file_descriptor, 1); - rb_define_module_function (EmModule, "get_sock_opt", (VALUE (*)(...))t_get_sock_opt, 3); - rb_define_module_function (EmModule, "set_sock_opt", (VALUE (*)(...))t_set_sock_opt, 4); - rb_define_module_function (EmModule, "set_notify_readable", (VALUE (*)(...))t_set_notify_readable, 2); - rb_define_module_function (EmModule, "set_notify_writable", (VALUE (*)(...))t_set_notify_writable, 2); - rb_define_module_function (EmModule, "is_notify_readable", (VALUE (*)(...))t_is_notify_readable, 1); - rb_define_module_function (EmModule, "is_notify_writable", (VALUE (*)(...))t_is_notify_writable, 1); - - rb_define_module_function (EmModule, "pause_connection", (VALUE (*)(...))t_pause, 1); - rb_define_module_function (EmModule, "resume_connection", (VALUE (*)(...))t_resume, 1); - rb_define_module_function (EmModule, "connection_paused?", (VALUE (*)(...))t_paused_p, 1); - rb_define_module_function (EmModule, "num_close_scheduled", (VALUE (*)(...))t_num_close_scheduled, 0); - - rb_define_module_function (EmModule, "start_proxy", (VALUE (*)(...))t_start_proxy, 4); - rb_define_module_function (EmModule, "stop_proxy", (VALUE (*)(...))t_stop_proxy, 1); - rb_define_module_function (EmModule, "get_proxied_bytes", (VALUE (*)(...))t_proxied_bytes, 1); - - rb_define_module_function (EmModule, "watch_filename", (VALUE (*)(...))t_watch_filename, 1); - rb_define_module_function (EmModule, "unwatch_filename", (VALUE (*)(...))t_unwatch_filename, 1); - - rb_define_module_function (EmModule, "watch_pid", (VALUE (*)(...))t_watch_pid, 1); - rb_define_module_function (EmModule, "unwatch_pid", (VALUE (*)(...))t_unwatch_pid, 1); - - rb_define_module_function (EmModule, "current_time", (VALUE(*)(...))t_get_loop_time, 0); - - rb_define_module_function (EmModule, "open_udp_socket", (VALUE(*)(...))t_open_udp_socket, 2); - rb_define_module_function (EmModule, "read_keyboard", (VALUE(*)(...))t_read_keyboard, 0); - rb_define_module_function (EmModule, "release_machine", (VALUE(*)(...))t_release_machine, 0); - rb_define_module_function (EmModule, "stop", (VALUE(*)(...))t_stop, 0); - rb_define_module_function (EmModule, "signal_loopbreak", (VALUE(*)(...))t_signal_loopbreak, 0); - rb_define_module_function (EmModule, "library_type", (VALUE(*)(...))t_library_type, 0); - rb_define_module_function (EmModule, "set_timer_quantum", (VALUE(*)(...))t_set_timer_quantum, 1); - rb_define_module_function (EmModule, "get_max_timer_count", (VALUE(*)(...))t_get_max_timer_count, 0); - rb_define_module_function (EmModule, "set_max_timer_count", (VALUE(*)(...))t_set_max_timer_count, 1); - rb_define_module_function (EmModule, "get_simultaneous_accept_count", (VALUE(*)(...))t_get_simultaneous_accept_count, 0); - rb_define_module_function (EmModule, "set_simultaneous_accept_count", (VALUE(*)(...))t_set_simultaneous_accept_count, 1); - rb_define_module_function (EmModule, "setuid_string", (VALUE(*)(...))t_setuid_string, 1); - rb_define_module_function (EmModule, "invoke_popen", (VALUE(*)(...))t_invoke_popen, 1); - rb_define_module_function (EmModule, "send_file_data", (VALUE(*)(...))t_send_file_data, 2); - rb_define_module_function (EmModule, "get_heartbeat_interval", (VALUE(*)(...))t_get_heartbeat_interval, 0); - rb_define_module_function (EmModule, "set_heartbeat_interval", (VALUE(*)(...))t_set_heartbeat_interval, 1); - rb_define_module_function (EmModule, "get_idle_time", (VALUE(*)(...))t_get_idle_time, 1); - - rb_define_module_function (EmModule, "get_peername", (VALUE(*)(...))t_get_peername, 1); - rb_define_module_function (EmModule, "get_sockname", (VALUE(*)(...))t_get_sockname, 1); - rb_define_module_function (EmModule, "get_subprocess_pid", (VALUE(*)(...))t_get_subprocess_pid, 1); - rb_define_module_function (EmModule, "get_subprocess_status", (VALUE(*)(...))t_get_subprocess_status, 1); - rb_define_module_function (EmModule, "get_comm_inactivity_timeout", (VALUE(*)(...))t_get_comm_inactivity_timeout, 1); - rb_define_module_function (EmModule, "set_comm_inactivity_timeout", (VALUE(*)(...))t_set_comm_inactivity_timeout, 2); - rb_define_module_function (EmModule, "get_pending_connect_timeout", (VALUE(*)(...))t_get_pending_connect_timeout, 1); - rb_define_module_function (EmModule, "set_pending_connect_timeout", (VALUE(*)(...))t_set_pending_connect_timeout, 2); - rb_define_module_function (EmModule, "set_rlimit_nofile", (VALUE(*)(...))t_set_rlimit_nofile, 1); - rb_define_module_function (EmModule, "get_connection_count", (VALUE(*)(...))t_get_connection_count, 0); - - rb_define_module_function (EmModule, "epoll", (VALUE(*)(...))t__epoll, 0); - rb_define_module_function (EmModule, "epoll=", (VALUE(*)(...))t__epoll_set, 1); - rb_define_module_function (EmModule, "epoll?", (VALUE(*)(...))t__epoll_p, 0); - - rb_define_module_function (EmModule, "kqueue", (VALUE(*)(...))t__kqueue, 0); - rb_define_module_function (EmModule, "kqueue=", (VALUE(*)(...))t__kqueue_set, 1); - rb_define_module_function (EmModule, "kqueue?", (VALUE(*)(...))t__kqueue_p, 0); - - rb_define_module_function (EmModule, "ssl?", (VALUE(*)(...))t__ssl_p, 0); - rb_define_module_function(EmModule, "stopping?",(VALUE(*)(...))t_stopping, 0); - - rb_define_method (EmConnection, "get_outbound_data_size", (VALUE(*)(...))conn_get_outbound_data_size, 0); - rb_define_method (EmConnection, "associate_callback_target", (VALUE(*)(...))conn_associate_callback_target, 1); - - // Connection states - rb_define_const (EmModule, "TimerFired", INT2NUM(EM_TIMER_FIRED )); - rb_define_const (EmModule, "ConnectionData", INT2NUM(EM_CONNECTION_READ )); - rb_define_const (EmModule, "ConnectionUnbound", INT2NUM(EM_CONNECTION_UNBOUND )); - rb_define_const (EmModule, "ConnectionAccepted", INT2NUM(EM_CONNECTION_ACCEPTED )); - rb_define_const (EmModule, "ConnectionCompleted", INT2NUM(EM_CONNECTION_COMPLETED )); - rb_define_const (EmModule, "LoopbreakSignalled", INT2NUM(EM_LOOPBREAK_SIGNAL )); - rb_define_const (EmModule, "ConnectionNotifyReadable", INT2NUM(EM_CONNECTION_NOTIFY_READABLE)); - rb_define_const (EmModule, "ConnectionNotifyWritable", INT2NUM(EM_CONNECTION_NOTIFY_WRITABLE)); - rb_define_const (EmModule, "SslHandshakeCompleted", INT2NUM(EM_SSL_HANDSHAKE_COMPLETED )); - rb_define_const (EmModule, "SslVerify", INT2NUM(EM_SSL_VERIFY )); - // EM_PROXY_TARGET_UNBOUND = 110, - // EM_PROXY_COMPLETED = 111 - - // SSL Protocols - rb_define_const (EmModule, "EM_PROTO_SSLv2", INT2NUM(EM_PROTO_SSLv2 )); - rb_define_const (EmModule, "EM_PROTO_SSLv3", INT2NUM(EM_PROTO_SSLv3 )); - rb_define_const (EmModule, "EM_PROTO_TLSv1", INT2NUM(EM_PROTO_TLSv1 )); - rb_define_const (EmModule, "EM_PROTO_TLSv1_1", INT2NUM(EM_PROTO_TLSv1_1)); - rb_define_const (EmModule, "EM_PROTO_TLSv1_2", INT2NUM(EM_PROTO_TLSv1_2)); -} - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ssl.cpp b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ssl.cpp deleted file mode 100644 index 8d5e038a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ssl.cpp +++ /dev/null @@ -1,619 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: ssl.cpp -Date: 30Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - -#ifdef WITH_SSL - -#include "project.h" - - -bool SslContext_t::bLibraryInitialized = false; - - - -static void InitializeDefaultCredentials(); -static EVP_PKEY *DefaultPrivateKey = NULL; -static X509 *DefaultCertificate = NULL; - -static char PrivateMaterials[] = { -"-----BEGIN RSA PRIVATE KEY-----\n" -"MIICXAIBAAKBgQDCYYhcw6cGRbhBVShKmbWm7UVsEoBnUf0cCh8AX+MKhMxwVDWV\n" -"Igdskntn3cSJjRtmgVJHIK0lpb/FYHQB93Ohpd9/Z18pDmovfFF9nDbFF0t39hJ/\n" -"AqSzFB3GiVPoFFZJEE1vJqh+3jzsSF5K56bZ6azz38VlZgXeSozNW5bXkQIDAQAB\n" -"AoGALA89gIFcr6BIBo8N5fL3aNHpZXjAICtGav+kTUpuxSiaym9cAeTHuAVv8Xgk\n" -"H2Wbq11uz+6JMLpkQJH/WZ7EV59DPOicXrp0Imr73F3EXBfR7t2EQDYHPMthOA1D\n" -"I9EtCzvV608Ze90hiJ7E3guGrGppZfJ+eUWCPgy8CZH1vRECQQDv67rwV/oU1aDo\n" -"6/+d5nqjeW6mWkGqTnUU96jXap8EIw6B+0cUKskwx6mHJv+tEMM2748ZY7b0yBlg\n" -"w4KDghbFAkEAz2h8PjSJG55LwqmXih1RONSgdN9hjB12LwXL1CaDh7/lkEhq0PlK\n" -"PCAUwQSdM17Sl0Xxm2CZiekTSlwmHrtqXQJAF3+8QJwtV2sRJp8u2zVe37IeH1cJ\n" -"xXeHyjTzqZ2803fnjN2iuZvzNr7noOA1/Kp+pFvUZUU5/0G2Ep8zolPUjQJAFA7k\n" -"xRdLk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\n" -"AQABo4IBEzCCAQ8wHQYDVR0OBBYEFPJvPd1Fcmd8o/Tm88r+NjYPICCkMIHfBgNV\n" -"HSMEgdcwgdSAFPJvPd1Fcmd8o/Tm88r+NjYPICCkoYGwpIGtMIGqMQswCQYDVQQG\n" -"EwJVUzERMA8GA1UECBMITmV3IFlvcmsxETAPBgNVBAcTCE5ldyBZb3JrMRYwFAYD\n" -"VQQKEw1TdGVhbWhlYXQubmV0MRQwEgYDVQQLEwtFbmdpbmVlcmluZzEdMBsGA1UE\n" -"AxMUb3BlbmNhLnN0ZWFtaGVhdC5uZXQxKDAmBgkqhkiG9w0BCQEWGWVuZ2luZWVy\n" -"aW5nQHN0ZWFtaGVhdC5uZXSCCQDZuFv087PrPjAMBgNVHRMEBTADAQH/MA0GCSqG\n" -"SIb3DQEBBQUAA4GBAC1CXey/4UoLgJiwcEMDxOvW74plks23090iziFIlGgcIhk0\n" -"Df6hTAs7H3MWww62ddvR8l07AWfSzSP5L6mDsbvq7EmQsmPODwb6C+i2aF3EDL8j\n" -"uw73m4YIGI0Zw2XdBpiOGkx2H56Kya6mJJe/5XORZedh1wpI7zki01tHYbcy\n" -"-----END CERTIFICATE-----\n"}; - -/* These private materials were made with: - * openssl req -new -x509 -keyout cakey.pem -out cacert.pem -nodes -days 6500 - * TODO: We need a full-blown capability to work with user-supplied - * keypairs and properly-signed certificates. - */ - - -/***************** -builtin_passwd_cb -*****************/ - -extern "C" int builtin_passwd_cb (char *buf UNUSED, int bufsize UNUSED, int rwflag UNUSED, void *userdata UNUSED) -{ - strcpy (buf, "kittycat"); - return 8; -} - -/**************************** -InitializeDefaultCredentials -****************************/ - -static void InitializeDefaultCredentials() -{ - BIO *bio = BIO_new_mem_buf (PrivateMaterials, -1); - assert (bio); - - if (DefaultPrivateKey) { - // we may come here in a restart. - EVP_PKEY_free (DefaultPrivateKey); - DefaultPrivateKey = NULL; - } - PEM_read_bio_PrivateKey (bio, &DefaultPrivateKey, builtin_passwd_cb, 0); - - if (DefaultCertificate) { - // we may come here in a restart. - X509_free (DefaultCertificate); - DefaultCertificate = NULL; - } - PEM_read_bio_X509 (bio, &DefaultCertificate, NULL, 0); - - BIO_free (bio); -} - - - -/************************** -SslContext_t::SslContext_t -**************************/ - -SslContext_t::SslContext_t (bool is_server, const std::string &privkeyfile, const std::string &certchainfile, const std::string &cipherlist, const std::string &ecdh_curve, const std::string &dhparam, int ssl_version) : - bIsServer (is_server), - pCtx (NULL), - PrivateKey (NULL), - Certificate (NULL) -{ - /* TODO: the usage of the specified private-key and cert-chain filenames only applies to - * client-side connections at this point. Server connections currently use the default materials. - * That needs to be fixed asap. - * Also, in this implementation, server-side connections use statically defined X-509 defaults. - * One thing I'm really not clear on is whether or not you have to explicitly free X509 and EVP_PKEY - * objects when we call our destructor, or whether just calling SSL_CTX_free is enough. - */ - - if (!bLibraryInitialized) { - bLibraryInitialized = true; - SSL_library_init(); - OpenSSL_add_ssl_algorithms(); - OpenSSL_add_all_algorithms(); - SSL_load_error_strings(); - ERR_load_crypto_strings(); - - InitializeDefaultCredentials(); - } - - pCtx = SSL_CTX_new (bIsServer ? SSLv23_server_method() : SSLv23_client_method()); - if (!pCtx) - throw std::runtime_error ("no SSL context"); - - SSL_CTX_set_options (pCtx, SSL_OP_ALL); - - #ifdef SSL_CTRL_CLEAR_OPTIONS - SSL_CTX_clear_options (pCtx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1); - # ifdef SSL_OP_NO_TLSv1_1 - SSL_CTX_clear_options (pCtx, SSL_OP_NO_TLSv1_1); - # endif - # ifdef SSL_OP_NO_TLSv1_2 - SSL_CTX_clear_options (pCtx, SSL_OP_NO_TLSv1_2); - # endif - #endif - - if (!(ssl_version & EM_PROTO_SSLv2)) - SSL_CTX_set_options (pCtx, SSL_OP_NO_SSLv2); - - if (!(ssl_version & EM_PROTO_SSLv3)) - SSL_CTX_set_options (pCtx, SSL_OP_NO_SSLv3); - - if (!(ssl_version & EM_PROTO_TLSv1)) - SSL_CTX_set_options (pCtx, SSL_OP_NO_TLSv1); - - #ifdef SSL_OP_NO_TLSv1_1 - if (!(ssl_version & EM_PROTO_TLSv1_1)) - SSL_CTX_set_options (pCtx, SSL_OP_NO_TLSv1_1); - #endif - - #ifdef SSL_OP_NO_TLSv1_2 - if (!(ssl_version & EM_PROTO_TLSv1_2)) - SSL_CTX_set_options (pCtx, SSL_OP_NO_TLSv1_2); - #endif - - #ifdef SSL_MODE_RELEASE_BUFFERS - SSL_CTX_set_mode (pCtx, SSL_MODE_RELEASE_BUFFERS); - #endif - - if (bIsServer) { - - // The SSL_CTX calls here do NOT allocate memory. - int e; - if (privkeyfile.length() > 0) - e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM); - else - e = SSL_CTX_use_PrivateKey (pCtx, DefaultPrivateKey); - if (e <= 0) ERR_print_errors_fp(stderr); - assert (e > 0); - - if (certchainfile.length() > 0) - e = SSL_CTX_use_certificate_chain_file (pCtx, certchainfile.c_str()); - else - e = SSL_CTX_use_certificate (pCtx, DefaultCertificate); - if (e <= 0) ERR_print_errors_fp(stderr); - assert (e > 0); - - if (dhparam.length() > 0) { - DH *dh; - BIO *bio; - - bio = BIO_new_file(dhparam.c_str(), "r"); - if (bio == NULL) { - char buf [500]; - snprintf (buf, sizeof(buf)-1, "dhparam: BIO_new_file(%s) failed", dhparam.c_str()); - throw std::runtime_error (buf); - } - - dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); - - if (dh == NULL) { - BIO_free(bio); - char buf [500]; - snprintf (buf, sizeof(buf)-1, "dhparam: PEM_read_bio_DHparams(%s) failed", dhparam.c_str()); - throw std::runtime_error (buf); - } - - SSL_CTX_set_tmp_dh(pCtx, dh); - - DH_free(dh); - BIO_free(bio); - } - - if (ecdh_curve.length() > 0) { - #if OPENSSL_VERSION_NUMBER >= 0x0090800fL && !defined(OPENSSL_NO_ECDH) - int nid; - EC_KEY *ecdh; - - nid = OBJ_sn2nid((const char *) ecdh_curve.c_str()); - if (nid == 0) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "ecdh_curve: Unknown curve name: %s", ecdh_curve.c_str()); - throw std::runtime_error (buf); - } - - ecdh = EC_KEY_new_by_curve_name(nid); - if (ecdh == NULL) { - char buf [200]; - snprintf (buf, sizeof(buf)-1, "ecdh_curve: Unable to create: %s", ecdh_curve.c_str()); - throw std::runtime_error (buf); - } - - SSL_CTX_set_options(pCtx, SSL_OP_SINGLE_ECDH_USE); - - SSL_CTX_set_tmp_ecdh(pCtx, ecdh); - - EC_KEY_free(ecdh); - #else - throw std::runtime_error ("No openssl ECDH support"); - #endif - } - } - - if (cipherlist.length() > 0) - SSL_CTX_set_cipher_list (pCtx, cipherlist.c_str()); - else - SSL_CTX_set_cipher_list (pCtx, "ALL:!ADH:!LOW:!EXP:!DES-CBC3-SHA:@STRENGTH"); - - if (bIsServer) { - SSL_CTX_sess_set_cache_size (pCtx, 128); - SSL_CTX_set_session_id_context (pCtx, (unsigned char*)"eventmachine", 12); - } - else { - int e; - if (privkeyfile.length() > 0) { - e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM); - if (e <= 0) ERR_print_errors_fp(stderr); - assert (e > 0); - } - if (certchainfile.length() > 0) { - e = SSL_CTX_use_certificate_chain_file (pCtx, certchainfile.c_str()); - if (e <= 0) ERR_print_errors_fp(stderr); - assert (e > 0); - } - } -} - - - -/*************************** -SslContext_t::~SslContext_t -***************************/ - -SslContext_t::~SslContext_t() -{ - if (pCtx) - SSL_CTX_free (pCtx); - if (PrivateKey) - EVP_PKEY_free (PrivateKey); - if (Certificate) - X509_free (Certificate); -} - - - -/****************** -SslBox_t::SslBox_t -******************/ - -SslBox_t::SslBox_t (bool is_server, const std::string &privkeyfile, const std::string &certchainfile, bool verify_peer, bool fail_if_no_peer_cert, const std::string &snihostname, const std::string &cipherlist, const std::string &ecdh_curve, const std::string &dhparam, int ssl_version, const uintptr_t binding): - bIsServer (is_server), - bHandshakeCompleted (false), - bVerifyPeer (verify_peer), - bFailIfNoPeerCert (fail_if_no_peer_cert), - pSSL (NULL), - pbioRead (NULL), - pbioWrite (NULL) -{ - /* TODO someday: make it possible to re-use SSL contexts so we don't have to create - * a new one every time we come here. - */ - - Context = new SslContext_t (bIsServer, privkeyfile, certchainfile, cipherlist, ecdh_curve, dhparam, ssl_version); - assert (Context); - - pbioRead = BIO_new (BIO_s_mem()); - assert (pbioRead); - - pbioWrite = BIO_new (BIO_s_mem()); - assert (pbioWrite); - - pSSL = SSL_new (Context->pCtx); - assert (pSSL); - - if (snihostname.length() > 0) { - SSL_set_tlsext_host_name (pSSL, snihostname.c_str()); - } - - SSL_set_bio (pSSL, pbioRead, pbioWrite); - - // Store a pointer to the binding signature in the SSL object so we can retrieve it later - SSL_set_ex_data(pSSL, 0, (void*) binding); - - if (bVerifyPeer) { - int mode = SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; - if (bFailIfNoPeerCert) - mode = mode | SSL_VERIFY_FAIL_IF_NO_PEER_CERT; - SSL_set_verify(pSSL, mode, ssl_verify_wrapper); - } - - if (!bIsServer) { - int e = SSL_connect (pSSL); - if (e != 1) - ERR_print_errors_fp(stderr); - } -} - - - -/******************* -SslBox_t::~SslBox_t -*******************/ - -SslBox_t::~SslBox_t() -{ - // Freeing pSSL will also free the associated BIOs, so DON'T free them separately. - if (pSSL) { - if (SSL_get_shutdown (pSSL) & SSL_RECEIVED_SHUTDOWN) - SSL_shutdown (pSSL); - else - SSL_clear (pSSL); - SSL_free (pSSL); - } - - delete Context; -} - - - -/*********************** -SslBox_t::PutCiphertext -***********************/ - -bool SslBox_t::PutCiphertext (const char *buf, int bufsize) -{ - assert (buf && (bufsize > 0)); - - assert (pbioRead); - int n = BIO_write (pbioRead, buf, bufsize); - - return (n == bufsize) ? true : false; -} - - -/********************** -SslBox_t::GetPlaintext -**********************/ - -int SslBox_t::GetPlaintext (char *buf, int bufsize) -{ - if (!SSL_is_init_finished (pSSL)) { - int e = bIsServer ? SSL_accept (pSSL) : SSL_connect (pSSL); - if (e != 1) { - int er = SSL_get_error (pSSL, e); - if (er != SSL_ERROR_WANT_READ) { - ERR_print_errors_fp(stderr); - // Return -1 for a nonfatal error, -2 for an error that should force the connection down. - return (er == SSL_ERROR_SSL) ? (-2) : (-1); - } - else - return 0; - } - bHandshakeCompleted = true; - // If handshake finished, FALL THROUGH and return the available plaintext. - } - - if (!SSL_is_init_finished (pSSL)) { - // We can get here if a browser abandons a handshake. - // The user can see a warning dialog and abort the connection. - //cerr << ""; - return 0; - } - - //cerr << "CIPH: " << SSL_get_cipher (pSSL) << endl; - - int n = SSL_read (pSSL, buf, bufsize); - if (n >= 0) { - return n; - } - else { - if (SSL_get_error (pSSL, n) == SSL_ERROR_WANT_READ) { - return 0; - } - else { - return -1; - } - } - - return 0; -} - - - -/************************** -SslBox_t::CanGetCiphertext -**************************/ - -bool SslBox_t::CanGetCiphertext() -{ - assert (pbioWrite); - return BIO_pending (pbioWrite) ? true : false; -} - - - -/*********************** -SslBox_t::GetCiphertext -***********************/ - -int SslBox_t::GetCiphertext (char *buf, int bufsize) -{ - assert (pbioWrite); - assert (buf && (bufsize > 0)); - - return BIO_read (pbioWrite, buf, bufsize); -} - - - -/********************** -SslBox_t::PutPlaintext -**********************/ - -int SslBox_t::PutPlaintext (const char *buf, int bufsize) -{ - // The caller will interpret the return value as the number of bytes written. - // WARNING WARNING WARNING, are there any situations in which a 0 or -1 return - // from SSL_write means we should immediately retry? The socket-machine loop - // will probably wait for a time-out cycle (perhaps a second) before re-trying. - // THIS WOULD CAUSE A PERCEPTIBLE DELAY! - - /* We internally queue any outbound plaintext that can't be dispatched - * because we're in the middle of a handshake or something. - * When we get called, try to send any queued data first, and then - * send the caller's data (or queue it). We may get called with no outbound - * data, which means we try to send the outbound queue and that's all. - * - * Return >0 if we wrote any data, 0 if we didn't, and <0 for a fatal error. - * Note that if we return 0, the connection is still considered live - * and we are signalling that we have accepted the outbound data (if any). - */ - - OutboundQ.Push (buf, bufsize); - - if (!SSL_is_init_finished (pSSL)) - return 0; - - bool fatal = false; - bool did_work = false; - int pending = BIO_pending(pbioWrite); - - while (OutboundQ.HasPages() && pending < SSLBOX_WRITE_BUFFER_SIZE) { - const char *page; - int length; - OutboundQ.Front (&page, &length); - assert (page && (length > 0)); - int n = SSL_write (pSSL, page, length); - pending = BIO_pending(pbioWrite); - - if (n > 0) { - did_work = true; - OutboundQ.PopFront(); - } - else { - int er = SSL_get_error (pSSL, n); - if ((er != SSL_ERROR_WANT_READ) && (er != SSL_ERROR_WANT_WRITE)) - fatal = true; - break; - } - } - - - if (did_work) - return 1; - else if (fatal) - return -1; - else - return 0; -} - -/********************** -SslBox_t::GetPeerCert -**********************/ - -X509 *SslBox_t::GetPeerCert() -{ - X509 *cert = NULL; - - if (pSSL) - cert = SSL_get_peer_certificate(pSSL); - - return cert; -} - -/********************** -SslBox_t::GetCipherBits -**********************/ - -int SslBox_t::GetCipherBits() -{ - int bits = -1; - if (pSSL) - SSL_get_cipher_bits(pSSL, &bits); - return bits; -} - -/********************** -SslBox_t::GetCipherName -**********************/ - -const char *SslBox_t::GetCipherName() -{ - if (pSSL) - return SSL_get_cipher_name(pSSL); - return NULL; -} - -/********************** -SslBox_t::GetCipherProtocol -**********************/ - -const char *SslBox_t::GetCipherProtocol() -{ - if (pSSL) - return SSL_get_cipher_version(pSSL); - return NULL; -} - -/********************** -SslBox_t::GetSNIHostname -**********************/ - -const char *SslBox_t::GetSNIHostname() -{ - #ifdef TLSEXT_NAMETYPE_host_name - if (pSSL) - return SSL_get_servername (pSSL, TLSEXT_NAMETYPE_host_name); - #endif - return NULL; -} - -/****************** -ssl_verify_wrapper -*******************/ - -extern "C" int ssl_verify_wrapper(int preverify_ok UNUSED, X509_STORE_CTX *ctx) -{ - uintptr_t binding; - X509 *cert; - SSL *ssl; - BUF_MEM *buf; - BIO *out; - int result; - - cert = X509_STORE_CTX_get_current_cert(ctx); - ssl = (SSL*) X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); - binding = (uintptr_t) SSL_get_ex_data(ssl, 0); - - out = BIO_new(BIO_s_mem()); - PEM_write_bio_X509(out, cert); - BIO_write(out, "\0", 1); - BIO_get_mem_ptr(out, &buf); - - ConnectionDescriptor *cd = dynamic_cast (Bindable_t::GetObject(binding)); - result = (cd->VerifySslPeer(buf->data) == true ? 1 : 0); - BIO_free(out); - - return result; -} - -#endif // WITH_SSL - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ssl.h b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ssl.h deleted file mode 100644 index 64ff6e18..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext/ssl.h +++ /dev/null @@ -1,103 +0,0 @@ -/***************************************************************************** - -$Id$ - -File: ssl.h -Date: 30Apr06 - -Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -Gmail: blackhedd - -This program is free software; you can redistribute it and/or modify -it under the terms of either: 1) the GNU General Public License -as published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version; or 2) Ruby's License. - -See the file COPYING for complete licensing information. - -*****************************************************************************/ - - -#ifndef __SslBox__H_ -#define __SslBox__H_ - - - - -#ifdef WITH_SSL - -/****************** -class SslContext_t -******************/ - -class SslContext_t -{ - public: - SslContext_t (bool is_server, const std::string &privkeyfile, const std::string &certchainfile, const std::string &cipherlist, const std::string &ecdh_curve, const std::string &dhparam, int ssl_version); - virtual ~SslContext_t(); - - private: - static bool bLibraryInitialized; - - private: - bool bIsServer; - SSL_CTX *pCtx; - - EVP_PKEY *PrivateKey; - X509 *Certificate; - - friend class SslBox_t; -}; - - -/************** -class SslBox_t -**************/ - -#define SSLBOX_INPUT_CHUNKSIZE 2019 -#define SSLBOX_OUTPUT_CHUNKSIZE 2048 -#define SSLBOX_WRITE_BUFFER_SIZE 8192 // (SSLBOX_OUTPUT_CHUNKSIZE * 4) - -class SslBox_t -{ - public: - SslBox_t (bool is_server, const std::string &privkeyfile, const std::string &certchainfile, bool verify_peer, bool fail_if_no_peer_cert, const std::string &snihostname, const std::string &cipherlist, const std::string &ecdh_curve, const std::string &dhparam, int ssl_version, const uintptr_t binding); - virtual ~SslBox_t(); - - int PutPlaintext (const char*, int); - int GetPlaintext (char*, int); - - bool PutCiphertext (const char*, int); - bool CanGetCiphertext(); - int GetCiphertext (char*, int); - bool IsHandshakeCompleted() {return bHandshakeCompleted;} - - X509 *GetPeerCert(); - int GetCipherBits(); - const char *GetCipherName(); - const char *GetCipherProtocol(); - const char *GetSNIHostname(); - - void Shutdown(); - - protected: - SslContext_t *Context; - - bool bIsServer; - bool bHandshakeCompleted; - bool bVerifyPeer; - bool bFailIfNoPeerCert; - SSL *pSSL; - BIO *pbioRead; - BIO *pbioWrite; - - PageList OutboundQ; -}; - -extern "C" int ssl_verify_wrapper(int, X509_STORE_CTX*); - -#endif // WITH_SSL - - -#endif // __SslBox__H_ - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/.classpath b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/.classpath deleted file mode 100644 index 11672ddd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/.project b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/.project deleted file mode 100644 index c7766db5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - em_reactor - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EmReactor.java b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EmReactor.java deleted file mode 100644 index 31642f3f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EmReactor.java +++ /dev/null @@ -1,613 +0,0 @@ -/** - * $Id$ - * - * Author:: Francis Cianfrocca (gmail: blackhedd) - * Homepage:: http://rubyeventmachine.com - * Date:: 15 Jul 2007 - * - * See EventMachine and EventMachine::Connection for documentation and - * usage examples. - * - * - *---------------------------------------------------------------------------- - * - * Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. - * Gmail: blackhedd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of either: 1) the GNU General Public License - * as published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version; or 2) Ruby's License. - * - * See the file COPYING for complete licensing information. - * - *--------------------------------------------------------------------------- - * - * - */ - -package com.rubyeventmachine; - -import java.io.*; -import java.nio.channels.*; -import java.util.*; -import java.nio.*; -import java.net.*; -import java.util.concurrent.atomic.*; -import java.security.*; - -public class EmReactor { - public final int EM_TIMER_FIRED = 100; - public final int EM_CONNECTION_READ = 101; - public final int EM_CONNECTION_UNBOUND = 102; - public final int EM_CONNECTION_ACCEPTED = 103; - public final int EM_CONNECTION_COMPLETED = 104; - public final int EM_LOOPBREAK_SIGNAL = 105; - public final int EM_CONNECTION_NOTIFY_READABLE = 106; - public final int EM_CONNECTION_NOTIFY_WRITABLE = 107; - public final int EM_SSL_HANDSHAKE_COMPLETED = 108; - public final int EM_SSL_VERIFY = 109; - public final int EM_PROXY_TARGET_UNBOUND = 110; - public final int EM_PROXY_COMPLETED = 111; - - public final int EM_PROTO_SSLv2 = 2; - public final int EM_PROTO_SSLv3 = 4; - public final int EM_PROTO_TLSv1 = 8; - public final int EM_PROTO_TLSv1_1 = 16; - public final int EM_PROTO_TLSv1_2 = 32; - - private Selector mySelector; - private TreeMap> Timers; - private HashMap Connections; - private HashMap Acceptors; - private ArrayList NewConnections; - private ArrayList UnboundConnections; - private ArrayList DetachedConnections; - - private boolean bRunReactor; - private long BindingIndex; - private AtomicBoolean loopBreaker; - private ByteBuffer myReadBuffer; - private int timerQuantum; - - public EmReactor() { - Timers = new TreeMap>(); - Connections = new HashMap(); - Acceptors = new HashMap(); - NewConnections = new ArrayList(); - UnboundConnections = new ArrayList(); - DetachedConnections = new ArrayList(); - - BindingIndex = 0; - loopBreaker = new AtomicBoolean(); - loopBreaker.set(false); - myReadBuffer = ByteBuffer.allocate(32*1024); // don't use a direct buffer. Ruby doesn't seem to like them. - timerQuantum = 98; - } - - /** - * This is a no-op stub, intended to be overridden in user code. - */ - public void eventCallback (long sig, int eventType, ByteBuffer data, long data2) { - System.out.println ("Default callback: "+sig+" "+eventType+" "+data+" "+data2); - } - public void eventCallback (long sig, int eventType, ByteBuffer data) { - eventCallback (sig, eventType, data, 0); - } - - - public void run() { - try { - mySelector = Selector.open(); - bRunReactor = true; - } catch (IOException e) { - throw new RuntimeException ("Could not open selector", e); - } - - while (bRunReactor) { - runLoopbreaks(); - if (!bRunReactor) break; - - runTimers(); - if (!bRunReactor) break; - - removeUnboundConnections(); - checkIO(); - addNewConnections(); - processIO(); - } - - close(); - } - - void addNewConnections() { - ListIterator iter = DetachedConnections.listIterator(0); - while (iter.hasNext()) { - EventableSocketChannel ec = iter.next(); - ec.cleanup(); - } - DetachedConnections.clear(); - - ListIterator iter2 = NewConnections.listIterator(0); - while (iter2.hasNext()) { - long b = iter2.next(); - - EventableChannel ec = Connections.get(b); - if (ec != null) { - try { - ec.register(); - } catch (ClosedChannelException e) { - UnboundConnections.add (ec.getBinding()); - } - } - } - NewConnections.clear(); - } - - void removeUnboundConnections() { - ListIterator iter = UnboundConnections.listIterator(0); - while (iter.hasNext()) { - long b = iter.next(); - - EventableChannel ec = Connections.remove(b); - if (ec != null) { - eventCallback (b, EM_CONNECTION_UNBOUND, null); - ec.close(); - - EventableSocketChannel sc = (EventableSocketChannel) ec; - if (sc != null && sc.isAttached()) - DetachedConnections.add (sc); - } - } - UnboundConnections.clear(); - } - - void checkIO() { - long timeout; - - if (NewConnections.size() > 0) { - timeout = -1; - } else if (!Timers.isEmpty()) { - long now = new Date().getTime(); - long k = Timers.firstKey(); - long diff = k-now; - - if (diff <= 0) - timeout = -1; // don't wait, just poll once - else - timeout = diff; - } else { - timeout = 0; // wait indefinitely - } - - try { - if (timeout == -1) - mySelector.selectNow(); - else - mySelector.select(timeout); - } catch (IOException e) { - e.printStackTrace(); - } - } - - void processIO() { - Iterator it = mySelector.selectedKeys().iterator(); - while (it.hasNext()) { - SelectionKey k = it.next(); - it.remove(); - - if (k.isConnectable()) - isConnectable(k); - - else if (k.isAcceptable()) - isAcceptable(k); - - else { - if (k.isWritable()) - isWritable(k); - - if (k.isReadable()) - isReadable(k); - } - } - } - - void isAcceptable (SelectionKey k) { - ServerSocketChannel ss = (ServerSocketChannel) k.channel(); - SocketChannel sn; - long b; - - for (int n = 0; n < 10; n++) { - try { - sn = ss.accept(); - if (sn == null) - break; - } catch (IOException e) { - e.printStackTrace(); - k.cancel(); - - ServerSocketChannel server = Acceptors.remove(k.attachment()); - if (server != null) - try{ server.close(); } catch (IOException ex) {}; - break; - } - - try { - sn.configureBlocking(false); - } catch (IOException e) { - e.printStackTrace(); - continue; - } - - b = createBinding(); - EventableSocketChannel ec = new EventableSocketChannel (sn, b, mySelector); - Connections.put (b, ec); - NewConnections.add (b); - - eventCallback (((Long)k.attachment()).longValue(), EM_CONNECTION_ACCEPTED, null, b); - } - } - - void isReadable (SelectionKey k) { - EventableChannel ec = (EventableChannel) k.attachment(); - long b = ec.getBinding(); - - if (ec.isWatchOnly()) { - if (ec.isNotifyReadable()) - eventCallback (b, EM_CONNECTION_NOTIFY_READABLE, null); - } else { - myReadBuffer.clear(); - - try { - ec.readInboundData (myReadBuffer); - myReadBuffer.flip(); - if (myReadBuffer.limit() > 0) - eventCallback (b, EM_CONNECTION_READ, myReadBuffer); - } catch (IOException e) { - UnboundConnections.add (b); - } - } - } - - void isWritable (SelectionKey k) { - EventableChannel ec = (EventableChannel) k.attachment(); - long b = ec.getBinding(); - - if (ec.isWatchOnly()) { - if (ec.isNotifyWritable()) - eventCallback (b, EM_CONNECTION_NOTIFY_WRITABLE, null); - } - else { - try { - if (!ec.writeOutboundData()) - UnboundConnections.add (b); - } catch (IOException e) { - UnboundConnections.add (b); - } - } - } - - void isConnectable (SelectionKey k) { - EventableSocketChannel ec = (EventableSocketChannel) k.attachment(); - long b = ec.getBinding(); - - try { - if (ec.finishConnecting()) - eventCallback (b, EM_CONNECTION_COMPLETED, null); - else - UnboundConnections.add (b); - } catch (IOException e) { - UnboundConnections.add (b); - } - } - - void close() { - try { - if (mySelector != null) - mySelector.close(); - } catch (IOException e) {} - mySelector = null; - - // run down open connections and sockets. - Iterator i = Acceptors.values().iterator(); - while (i.hasNext()) { - try { - i.next().close(); - } catch (IOException e) {} - } - - // 29Sep09: We create an ArrayList of the existing connections, then iterate over - // that to call unbind on them. This is because an unbind can trigger a reconnect, - // which will add to the Connections HashMap, causing a ConcurrentModificationException. - // XXX: The correct behavior here would be to latch the various reactor methods to return - // immediately if the reactor is shutting down. - ArrayList conns = new ArrayList(); - Iterator i2 = Connections.values().iterator(); - while (i2.hasNext()) { - EventableChannel ec = i2.next(); - if (ec != null) { - conns.add (ec); - } - } - Connections.clear(); - - ListIterator i3 = conns.listIterator(0); - while (i3.hasNext()) { - EventableChannel ec = i3.next(); - eventCallback (ec.getBinding(), EM_CONNECTION_UNBOUND, null); - ec.close(); - - EventableSocketChannel sc = (EventableSocketChannel) ec; - if (sc != null && sc.isAttached()) - DetachedConnections.add (sc); - } - - ListIterator i4 = DetachedConnections.listIterator(0); - while (i4.hasNext()) { - EventableSocketChannel ec = i4.next(); - ec.cleanup(); - } - DetachedConnections.clear(); - } - - void runLoopbreaks() { - if (loopBreaker.getAndSet(false)) { - eventCallback (0, EM_LOOPBREAK_SIGNAL, null); - } - } - - public void stop() { - bRunReactor = false; - signalLoopbreak(); - } - - void runTimers() { - long now = new Date().getTime(); - while (!Timers.isEmpty()) { - long k = Timers.firstKey(); - if (k > now) - break; - - ArrayList callbacks = Timers.get(k); - Timers.remove(k); - - // Fire all timers at this timestamp - ListIterator iter = callbacks.listIterator(0); - while (iter.hasNext()) { - eventCallback (0, EM_TIMER_FIRED, null, iter.next().longValue()); - } - } - } - - public long installOneshotTimer (long milliseconds) { - long s = createBinding(); - long deadline = new Date().getTime() + milliseconds; - - if (Timers.containsKey(deadline)) { - Timers.get(deadline).add(s); - } else { - ArrayList callbacks = new ArrayList(); - callbacks.add(s); - Timers.put(deadline, callbacks); - } - - return s; - } - - public long startTcpServer (SocketAddress sa) throws EmReactorException { - try { - ServerSocketChannel server = ServerSocketChannel.open(); - server.configureBlocking(false); - server.socket().bind (sa); - long s = createBinding(); - Acceptors.put(s, server); - server.register(mySelector, SelectionKey.OP_ACCEPT, s); - return s; - } catch (IOException e) { - throw new EmReactorException ("unable to open socket acceptor: " + e.toString()); - } - } - - public long startTcpServer (String address, int port) throws EmReactorException { - return startTcpServer (new InetSocketAddress (address, port)); - } - - public void stopTcpServer (long signature) throws IOException { - ServerSocketChannel server = Acceptors.remove(signature); - if (server != null) - server.close(); - else - throw new RuntimeException ("failed to close unknown acceptor"); - } - - public long openUdpSocket (InetSocketAddress address) throws IOException { - // TODO, don't throw an exception out of here. - DatagramChannel dg = DatagramChannel.open(); - dg.configureBlocking(false); - dg.socket().bind(address); - long b = createBinding(); - EventableChannel ec = new EventableDatagramChannel (dg, b, mySelector); - dg.register(mySelector, SelectionKey.OP_READ, ec); - Connections.put(b, ec); - return b; - } - - public long openUdpSocket (String address, int port) throws IOException { - return openUdpSocket (new InetSocketAddress (address, port)); - } - - public void sendData (long sig, ByteBuffer bb) throws IOException { - Connections.get(sig).scheduleOutboundData( bb ); - } - - public void sendData (long sig, byte[] data) throws IOException { - sendData (sig, ByteBuffer.wrap(data)); - } - - public void setCommInactivityTimeout (long sig, long mills) { - Connections.get(sig).setCommInactivityTimeout (mills); - } - - public void sendDatagram (long sig, byte[] data, int length, String recipAddress, int recipPort) { - sendDatagram (sig, ByteBuffer.wrap(data), recipAddress, recipPort); - } - - public void sendDatagram (long sig, ByteBuffer bb, String recipAddress, int recipPort) { - (Connections.get(sig)).scheduleOutboundDatagram( bb, recipAddress, recipPort); - } - - public long connectTcpServer (String address, int port) { - return connectTcpServer(null, 0, address, port); - } - - public long connectTcpServer (String bindAddr, int bindPort, String address, int port) { - long b = createBinding(); - - try { - SocketChannel sc = SocketChannel.open(); - sc.configureBlocking(false); - if (bindAddr != null) - sc.socket().bind(new InetSocketAddress (bindAddr, bindPort)); - - EventableSocketChannel ec = new EventableSocketChannel (sc, b, mySelector); - - if (sc.connect (new InetSocketAddress (address, port))) { - // Connection returned immediately. Can happen with localhost connections. - // WARNING, this code is untested due to lack of available test conditions. - // Ought to be be able to come here from a localhost connection, but that - // doesn't happen on Linux. (Maybe on FreeBSD?) - // The reason for not handling this until we can test it is that we - // really need to return from this function WITHOUT triggering any EM events. - // That's because until the user code has seen the signature we generated here, - // it won't be able to properly dispatch them. The C++ EM deals with this - // by setting pending mode as a flag in ALL eventable descriptors and making - // the descriptor select for writable. Then, it can send UNBOUND and - // CONNECTION_COMPLETED on the next pass through the loop, because writable will - // fire. - throw new RuntimeException ("immediate-connect unimplemented"); - } - else { - ec.setConnectPending(); - Connections.put (b, ec); - NewConnections.add (b); - } - } catch (IOException e) { - // Can theoretically come here if a connect failure can be determined immediately. - // I don't know how to make that happen for testing purposes. - throw new RuntimeException ("immediate-connect unimplemented: " + e.toString()); - } - return b; - } - - public void closeConnection (long sig, boolean afterWriting) { - EventableChannel ec = Connections.get(sig); - if (ec != null) - if (ec.scheduleClose (afterWriting)) - UnboundConnections.add (sig); - } - - long createBinding() { - return ++BindingIndex; - } - - public void signalLoopbreak() { - loopBreaker.set(true); - if (mySelector != null) - mySelector.wakeup(); - } - - public void startTls (long sig) throws NoSuchAlgorithmException, KeyManagementException { - Connections.get(sig).startTls(); - } - - public void setTimerQuantum (int mills) { - if (mills < 5 || mills > 2500) - throw new RuntimeException ("attempt to set invalid timer-quantum value: "+mills); - timerQuantum = mills; - } - - public Object[] getPeerName (long sig) { - EventableChannel channel = Connections.get(sig); - if (channel != null) { - return Connections.get(sig).getPeerName(); - } - else { - ServerSocketChannel acceptor = Acceptors.get(sig); - return new Object[] { acceptor.socket().getLocalPort(), - acceptor.socket().getInetAddress().getHostAddress() }; - } - } - - public Object[] getSockName (long sig) { - EventableChannel channel = Connections.get(sig); - if (channel != null) { - return Connections.get(sig).getSockName(); - } - else { - ServerSocketChannel acceptor = Acceptors.get(sig); - return new Object[] { acceptor.socket().getLocalPort(), - acceptor.socket().getInetAddress().getHostAddress() }; - } - } - - public long attachChannel (SocketChannel sc, boolean watch_mode) { - long b = createBinding(); - - EventableSocketChannel ec = new EventableSocketChannel (sc, b, mySelector); - - ec.setAttached(); - if (watch_mode) - ec.setWatchOnly(); - - Connections.put (b, ec); - NewConnections.add (b); - - return b; - } - - public SocketChannel detachChannel (long sig) { - EventableSocketChannel ec = (EventableSocketChannel) Connections.get (sig); - if (ec != null) { - UnboundConnections.add (sig); - return ec.getChannel(); - } else { - return null; - } - } - - public void setNotifyReadable (long sig, boolean mode) { - ((EventableSocketChannel) Connections.get(sig)).setNotifyReadable(mode); - } - - public void setNotifyWritable (long sig, boolean mode) { - ((EventableSocketChannel) Connections.get(sig)).setNotifyWritable(mode); - } - - public boolean isNotifyReadable (long sig) { - return Connections.get(sig).isNotifyReadable(); - } - - public boolean isNotifyWritable (long sig) { - return Connections.get(sig).isNotifyWritable(); - } - - public boolean pauseConnection (long sig) { - return ((EventableSocketChannel) Connections.get(sig)).pause(); - } - - public boolean resumeConnection (long sig) { - return ((EventableSocketChannel) Connections.get(sig)).resume(); - } - - public boolean isConnectionPaused (long sig) { - return ((EventableSocketChannel) Connections.get(sig)).isPaused(); - } - - public long getOutboundDataSize (long sig) { - return Connections.get(sig).getOutboundDataSize(); - } - - public int getConnectionCount() { - return Connections.size() + Acceptors.size(); - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EmReactorException.java b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EmReactorException.java deleted file mode 100644 index 69efaa3a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EmReactorException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * $Id$ - * - * Author:: Francis Cianfrocca (gmail: blackhedd) - * Homepage:: http://rubyeventmachine.com - * Date:: 15 Jul 2007 - * - * See EventMachine and EventMachine::Connection for documentation and - * usage examples. - * - * - *---------------------------------------------------------------------------- - * - * Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. - * Gmail: blackhedd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of either: 1) the GNU General Public License - * as published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version; or 2) Ruby's License. - * - * See the file COPYING for complete licensing information. - * - *--------------------------------------------------------------------------- - * - * - */ - -package com.rubyeventmachine; - -/** - * @author francis - * - */ -public class EmReactorException extends Exception { - static final long serialVersionUID = 0; - public EmReactorException (String msg) { - super (msg); - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableChannel.java b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableChannel.java deleted file mode 100644 index 3d4f5fd0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableChannel.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * $Id$ - * - * Author:: Francis Cianfrocca (gmail: blackhedd) - * Homepage:: http://rubyeventmachine.com - * Date:: 15 Jul 2007 - * - * See EventMachine and EventMachine::Connection for documentation and - * usage examples. - * - * - *---------------------------------------------------------------------------- - * - * Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. - * Gmail: blackhedd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of either: 1) the GNU General Public License - * as published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version; or 2) Ruby's License. - * - * See the file COPYING for complete licensing information. - * - *--------------------------------------------------------------------------- - * - * - */ - - -package com.rubyeventmachine; - -import java.nio.ByteBuffer; -import java.io.IOException; -import java.nio.channels.ClosedChannelException; - -public interface EventableChannel { - - public void scheduleOutboundData (ByteBuffer bb); - - public void scheduleOutboundDatagram (ByteBuffer bb, String recipAddress, int recipPort); - - public boolean scheduleClose (boolean afterWriting); - - public void startTls(); - - public long getBinding(); - - public void readInboundData (ByteBuffer dst) throws IOException; - - public void register() throws ClosedChannelException; - - /** - * This is called by the reactor after it finishes running. - * The idea is to free network resources. - */ - public void close(); - - public boolean writeOutboundData() throws IOException; - - public long getOutboundDataSize(); - - public void setCommInactivityTimeout (long seconds); - - public Object[] getPeerName(); - public Object[] getSockName(); - - public boolean isWatchOnly(); - - public boolean isNotifyReadable(); - public boolean isNotifyWritable(); - -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableDatagramChannel.java b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableDatagramChannel.java deleted file mode 100644 index df1c9fd2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableDatagramChannel.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * $Id$ - * - * Author:: Francis Cianfrocca (gmail: blackhedd) - * Homepage:: http://rubyeventmachine.com - * Date:: 15 Jul 2007 - * - * See EventMachine and EventMachine::Connection for documentation and - * usage examples. - * - * - *---------------------------------------------------------------------------- - * - * Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. - * Gmail: blackhedd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of either: 1) the GNU General Public License - * as published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version; or 2) Ruby's License. - * - * See the file COPYING for complete licensing information. - * - *--------------------------------------------------------------------------- - * - * - */ - - -package com.rubyeventmachine; - -import java.nio.ByteBuffer; -import java.nio.channels.ClosedChannelException; -import java.nio.channels.SelectionKey; -import java.nio.channels.Selector; -import java.nio.channels.DatagramChannel; -import java.util.LinkedList; -import java.io.*; -import java.net.*; - -public class EventableDatagramChannel implements EventableChannel { - - class Packet { - public ByteBuffer bb; - public SocketAddress recipient; - public Packet (ByteBuffer _bb, SocketAddress _recipient) { - bb = _bb; - recipient = _recipient; - } - } - - DatagramChannel channel; - long binding; - Selector selector; - boolean bCloseScheduled; - LinkedList outboundQ; - long outboundS; - SocketAddress returnAddress; - - - public EventableDatagramChannel (DatagramChannel dc, long _binding, Selector sel) throws ClosedChannelException { - channel = dc; - binding = _binding; - selector = sel; - bCloseScheduled = false; - outboundQ = new LinkedList(); - outboundS = 0; - - dc.register(selector, SelectionKey.OP_READ, this); - } - - public void scheduleOutboundData (ByteBuffer bb) { - try { - if ((!bCloseScheduled) && (bb.remaining() > 0)) { - outboundQ.addLast(new Packet(bb, returnAddress)); - outboundS += bb.remaining(); - channel.register(selector, SelectionKey.OP_WRITE | SelectionKey.OP_READ, this); - } - } catch (ClosedChannelException e) { - throw new RuntimeException ("no outbound data"); - } - } - - public void scheduleOutboundDatagram (ByteBuffer bb, String recipAddress, int recipPort) { - try { - if ((!bCloseScheduled) && (bb.remaining() > 0)) { - outboundQ.addLast(new Packet (bb, new InetSocketAddress (recipAddress, recipPort))); - outboundS += bb.remaining(); - channel.register(selector, SelectionKey.OP_WRITE | SelectionKey.OP_READ, this); - } - } catch (ClosedChannelException e) { - throw new RuntimeException ("no outbound data"); - } - } - - public boolean scheduleClose (boolean afterWriting) { - System.out.println ("NOT SCHEDULING CLOSE ON DATAGRAM"); - return false; - } - - public void startTls() { - throw new RuntimeException ("TLS is unimplemented on this Channel"); - } - - public long getBinding() { - return binding; - } - - public void register() throws ClosedChannelException { - // TODO - } - - /** - * Terminate with extreme prejudice. Don't assume there will be another pass through - * the reactor core. - */ - public void close() { - try { - channel.close(); - } catch (IOException e) { - } - } - - public void readInboundData (ByteBuffer dst) { - returnAddress = null; - try { - // If there is no datagram available (we're nonblocking after all), - // then channel.receive returns null. - returnAddress = channel.receive(dst); - } catch (IOException e) { - // probably a no-op. The caller will see the empty (or even partial) buffer - // and presumably do the right thing. - } - } - - public boolean writeOutboundData() { - while (!outboundQ.isEmpty()) { - Packet p = outboundQ.getFirst(); - int written = 0; - try { - // With a datagram socket, it's ok to send an empty buffer. - written = channel.send(p.bb, p.recipient); - outboundS -= written; - } - catch (IOException e) { - return false; - } - - /* Did we consume the whole outbound buffer? If yes, pop it off and - * keep looping. If no, the outbound network buffers are full, so break - * out of here. There's a flaw that affects outbound buffers that are intentionally - * empty. We can tell whether they got sent or not. So we assume they were. - * TODO: As implemented, this ALWAYS discards packets if they were at least - * partially written. This matches the behavior of the C++ EM. My judgment - * is that this is less surprising than fragmenting the data and sending multiple - * packets would be. I could be wrong, so this is subject to change. - */ - - if ((written > 0) || (p.bb.remaining() == 0)) - outboundQ.removeFirst(); - else - break; - } - - if (outboundQ.isEmpty()) { - try { - channel.register(selector, SelectionKey.OP_READ, this); - } catch (ClosedChannelException e) {} - } - - // ALWAYS drain the outbound queue before triggering a connection close. - // If anyone wants to close immediately, they're responsible for clearing - // the outbound queue. - return (bCloseScheduled && outboundQ.isEmpty()) ? false : true; - } - - public void setCommInactivityTimeout (long seconds) { - // TODO - System.out.println ("DATAGRAM: SET COMM INACTIVITY UNIMPLEMENTED " + seconds); - } - - public Object[] getPeerName () { - if (returnAddress != null) { - InetSocketAddress inetAddr = (InetSocketAddress) returnAddress; - return new Object[]{ inetAddr.getPort(), inetAddr.getHostName() }; - } else { - return null; - } - } - - public Object[] getSockName () { - DatagramSocket socket = channel.socket(); - return new Object[]{ socket.getLocalPort(), - socket.getLocalAddress().getHostAddress() }; - } - - public boolean isWatchOnly() { return false; } - public boolean isNotifyReadable() { return false; } - public boolean isNotifyWritable() { return false; } - public long getOutboundDataSize() { return outboundS; } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableSocketChannel.java b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableSocketChannel.java deleted file mode 100644 index 2905ec6c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/java/src/com/rubyeventmachine/EventableSocketChannel.java +++ /dev/null @@ -1,415 +0,0 @@ -/** - * $Id$ - * - * Author:: Francis Cianfrocca (gmail: blackhedd) - * Homepage:: http://rubyeventmachine.com - * Date:: 15 Jul 2007 - * - * See EventMachine and EventMachine::Connection for documentation and - * usage examples. - * - * - *---------------------------------------------------------------------------- - * - * Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. - * Gmail: blackhedd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of either: 1) the GNU General Public License - * as published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version; or 2) Ruby's License. - * - * See the file COPYING for complete licensing information. - * - *--------------------------------------------------------------------------- - * - * - */ - -/** - * - */ -package com.rubyeventmachine; - -/** - * @author francis - * - */ - -import java.nio.channels.*; -import java.nio.*; -import java.util.*; -import java.io.*; -import java.net.Socket; -import javax.net.ssl.*; -import javax.net.ssl.SSLEngineResult.*; -import java.lang.reflect.Field; - -import java.security.*; - -public class EventableSocketChannel implements EventableChannel { - Selector selector; - SelectionKey channelKey; - SocketChannel channel; - - long binding; - LinkedList outboundQ; - long outboundS; - - boolean bCloseScheduled; - boolean bConnectPending; - boolean bWatchOnly; - boolean bAttached; - boolean bNotifyReadable; - boolean bNotifyWritable; - boolean bPaused; - - SSLEngine sslEngine; - SSLContext sslContext; - - public EventableSocketChannel (SocketChannel sc, long _binding, Selector sel) { - channel = sc; - binding = _binding; - selector = sel; - bCloseScheduled = false; - bConnectPending = false; - bWatchOnly = false; - bAttached = false; - bNotifyReadable = false; - bNotifyWritable = false; - outboundQ = new LinkedList(); - outboundS = 0; - } - - public long getBinding() { - return binding; - } - - public SocketChannel getChannel() { - return channel; - } - - public void register() throws ClosedChannelException { - if (channelKey == null) { - int events = currentEvents(); - channelKey = channel.register(selector, events, this); - } - } - - /** - * Terminate with extreme prejudice. Don't assume there will be another pass through - * the reactor core. - */ - public void close() { - if (channelKey != null) { - channelKey.cancel(); - channelKey = null; - } - - if (bAttached) { - // attached channels are copies, so reset the file descriptor to prevent java from close()ing it - Field f; - FileDescriptor fd; - - try { - /* do _NOT_ clobber fdVal here, it will break epoll/kqueue on jdk6! - * channelKey.cancel() above does not occur until the next call to select - * and if fdVal is gone, we will continue to get events for this fd. - * - * instead, remove fdVal in cleanup(), which is processed via DetachedConnections, - * after UnboundConnections but before NewConnections. - */ - - f = channel.getClass().getDeclaredField("fd"); - f.setAccessible(true); - fd = (FileDescriptor) f.get(channel); - - f = fd.getClass().getDeclaredField("fd"); - f.setAccessible(true); - f.set(fd, -1); - } catch (java.lang.NoSuchFieldException e) { - e.printStackTrace(); - } catch (java.lang.IllegalAccessException e) { - e.printStackTrace(); - } - - return; - } - - try { - channel.close(); - } catch (IOException e) { - } - } - - public void cleanup() { - if (bAttached) { - Field f; - try { - f = channel.getClass().getDeclaredField("fdVal"); - f.setAccessible(true); - f.set(channel, -1); - } catch (java.lang.NoSuchFieldException e) { - e.printStackTrace(); - } catch (java.lang.IllegalAccessException e) { - e.printStackTrace(); - } - } - - channel = null; - } - - public void scheduleOutboundData (ByteBuffer bb) { - if (!bCloseScheduled && bb.remaining() > 0) { - if (sslEngine != null) { - try { - ByteBuffer b = ByteBuffer.allocate(32*1024); // TODO, preallocate this buffer. - sslEngine.wrap(bb, b); - b.flip(); - outboundQ.addLast(b); - outboundS += b.remaining(); - } catch (SSLException e) { - throw new RuntimeException ("ssl error"); - } - } - else { - outboundQ.addLast(bb); - outboundS += bb.remaining(); - } - - updateEvents(); - } - } - - public void scheduleOutboundDatagram (ByteBuffer bb, String recipAddress, int recipPort) { - throw new RuntimeException ("datagram sends not supported on this channel"); - } - - /** - * Called by the reactor when we have selected readable. - */ - public void readInboundData (ByteBuffer bb) throws IOException { - if (channel.read(bb) == -1) - throw new IOException ("eof"); - } - - public long getOutboundDataSize() { return outboundS; } - - /** - * Called by the reactor when we have selected writable. - * Return false to indicate an error that should cause the connection to close. - * TODO, VERY IMPORTANT: we're here because we selected writable, but it's always - * possible to become unwritable between the poll and when we get here. The way - * this code is written, we're depending on a nonblocking write NOT TO CONSUME - * the whole outbound buffer in this case, rather than firing an exception. - * We should somehow verify that this is indeed Java's defined behavior. - * @return - */ - public boolean writeOutboundData() throws IOException { - ByteBuffer[] bufs = new ByteBuffer[64]; - int i; - long written, toWrite; - while (!outboundQ.isEmpty()) { - i = 0; - toWrite = 0; - written = 0; - while (i < 64 && !outboundQ.isEmpty()) { - bufs[i] = outboundQ.removeFirst(); - toWrite += bufs[i].remaining(); - i++; - } - if (toWrite > 0) - written = channel.write(bufs, 0, i); - - outboundS -= written; - // Did we consume the whole outbound buffer? If yes, - // pop it off and keep looping. If no, the outbound network - // buffers are full, so break out of here. - if (written < toWrite) { - while (i > 0 && bufs[i-1].remaining() > 0) { - outboundQ.addFirst(bufs[i-1]); - i--; - } - break; - } - } - - if (outboundQ.isEmpty() && !bCloseScheduled) { - updateEvents(); - } - - // ALWAYS drain the outbound queue before triggering a connection close. - // If anyone wants to close immediately, they're responsible for clearing - // the outbound queue. - return (bCloseScheduled && outboundQ.isEmpty()) ? false : true; - } - - public void setConnectPending() { - bConnectPending = true; - updateEvents(); - } - - /** - * Called by the reactor when we have selected connectable. - * Return false to indicate an error that should cause the connection to close. - */ - public boolean finishConnecting() throws IOException { - channel.finishConnect(); - - bConnectPending = false; - updateEvents(); - return true; - } - - public boolean scheduleClose (boolean afterWriting) { - // TODO: What the hell happens here if bConnectPending is set? - if (!afterWriting) { - outboundQ.clear(); - outboundS = 0; - } - - if (outboundQ.isEmpty()) - return true; - else { - updateEvents(); - bCloseScheduled = true; - return false; - } - } - - public void startTls() { - if (sslEngine == null) { - try { - sslContext = SSLContext.getInstance("TLS"); - sslContext.init(null, null, null); // TODO, fill in the parameters. - sslEngine = sslContext.createSSLEngine(); // TODO, should use the parameterized version, to get Kerb stuff and session re-use. - sslEngine.setUseClientMode(false); - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException ("unable to start TLS"); // TODO, get rid of this. - } catch (KeyManagementException e) { - throw new RuntimeException ("unable to start TLS"); // TODO, get rid of this. - } - } - System.out.println ("Starting TLS"); - } - - public ByteBuffer dispatchInboundData (ByteBuffer bb) throws SSLException { - if (sslEngine != null) { - if (true) throw new RuntimeException ("TLS currently unimplemented"); - System.setProperty("javax.net.debug", "all"); - ByteBuffer w = ByteBuffer.allocate(32*1024); // TODO, WRONG, preallocate this buffer. - SSLEngineResult res = sslEngine.unwrap(bb, w); - if (res.getHandshakeStatus() == HandshakeStatus.NEED_TASK) { - Runnable r; - while ((r = sslEngine.getDelegatedTask()) != null) { - r.run(); - } - } - System.out.println (bb); - w.flip(); - return w; - } - else - return bb; - } - - public void setCommInactivityTimeout (long seconds) { - // TODO - System.out.println ("SOCKET: SET COMM INACTIVITY UNIMPLEMENTED " + seconds); - } - - public Object[] getPeerName () { - Socket sock = channel.socket(); - return new Object[]{ sock.getPort(), sock.getInetAddress().getHostAddress() }; - } - - public Object[] getSockName () { - Socket sock = channel.socket(); - return new Object[]{ sock.getLocalPort(), - sock.getLocalAddress().getHostAddress() }; - } - - public void setWatchOnly() { - bWatchOnly = true; - updateEvents(); - } - public boolean isWatchOnly() { return bWatchOnly; } - - public void setAttached() { - bAttached = true; - } - public boolean isAttached() { return bAttached; } - - public void setNotifyReadable (boolean mode) { - bNotifyReadable = mode; - updateEvents(); - } - public boolean isNotifyReadable() { return bNotifyReadable; } - - public void setNotifyWritable (boolean mode) { - bNotifyWritable = mode; - updateEvents(); - } - public boolean isNotifyWritable() { return bNotifyWritable; } - - public boolean pause() { - if (bWatchOnly) { - throw new RuntimeException ("cannot pause/resume 'watch only' connections, set notify readable/writable instead"); - } - boolean old = bPaused; - bPaused = true; - updateEvents(); - return !old; - } - - public boolean resume() { - if (bWatchOnly) { - throw new RuntimeException ("cannot pause/resume 'watch only' connections, set notify readable/writable instead"); - } - boolean old = bPaused; - bPaused = false; - updateEvents(); - return old; - } - - public boolean isPaused() { - return bPaused; - } - - private void updateEvents() { - if (channelKey == null) - return; - - int events = currentEvents(); - - if (channelKey.interestOps() != events) { - channelKey.interestOps(events); - } - } - - private int currentEvents() { - int events = 0; - - if (bWatchOnly) - { - if (bNotifyReadable) - events |= SelectionKey.OP_READ; - - if (bNotifyWritable) - events |= SelectionKey.OP_WRITE; - } - else if (!bPaused) - { - if (bConnectPending) - events |= SelectionKey.OP_CONNECT; - else { - events |= SelectionKey.OP_READ; - - if (!outboundQ.isEmpty()) - events |= SelectionKey.OP_WRITE; - } - } - - return events; - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/buftok.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/buftok.rb deleted file mode 100644 index caf4f770..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/buftok.rb +++ /dev/null @@ -1,59 +0,0 @@ -# BufferedTokenizer takes a delimiter upon instantiation, or acts line-based -# by default. It allows input to be spoon-fed from some outside source which -# receives arbitrary length datagrams which may-or-may-not contain the token -# by which entities are delimited. In this respect it's ideally paired with -# something like EventMachine (http://rubyeventmachine.com/). -class BufferedTokenizer - # New BufferedTokenizers will operate on lines delimited by a delimiter, - # which is by default the global input delimiter $/ ("\n"). - # - # The input buffer is stored as an array. This is by far the most efficient - # approach given language constraints (in C a linked list would be a more - # appropriate data structure). Segments of input data are stored in a list - # which is only joined when a token is reached, substantially reducing the - # number of objects required for the operation. - def initialize(delimiter = $/) - @delimiter = delimiter - @input = [] - @tail = '' - @trim = @delimiter.length - 1 - end - - # Extract takes an arbitrary string of input data and returns an array of - # tokenized entities, provided there were any available to extract. This - # makes for easy processing of datagrams using a pattern like: - # - # tokenizer.extract(data).map { |entity| Decode(entity) }.each do ... - # - # Using -1 makes split to return "" if the token is at the end of - # the string, meaning the last element is the start of the next chunk. - def extract(data) - if @trim > 0 - tail_end = @tail.slice!(-@trim, @trim) # returns nil if string is too short - data = tail_end + data if tail_end - end - - @input << @tail - entities = data.split(@delimiter, -1) - @tail = entities.shift - - unless entities.empty? - @input << @tail - entities.unshift @input.join - @input.clear - @tail = entities.pop - end - - entities - end - - # Flush the contents of the input buffer, i.e. return the input buffer even though - # a token has not yet been encountered - def flush - @input << @tail - buffer = @input.join - @input.clear - @tail = "" # @tail.clear is slightly faster, but not supported on 1.8.7 - buffer - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/callback.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/callback.rb deleted file mode 100644 index 4928febc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/callback.rb +++ /dev/null @@ -1,58 +0,0 @@ -module EventMachine - # Utility method for coercing arguments to an object that responds to :call. - # Accepts an object and a method name to send to, or a block, or an object - # that responds to :call. - # - # @example EventMachine.Callback used with a block. Returns that block. - # - # cb = EventMachine.Callback do |msg| - # puts(msg) - # end - # # returned object is a callable - # cb.call('hello world') - # - # - # @example EventMachine.Callback used with an object (to be more specific, class object) and a method name, returns an object that responds to #call - # - # cb = EventMachine.Callback(Object, :puts) - # # returned object is a callable that delegates to Kernel#puts (in this case Object.puts) - # cb.call('hello world') - # - # - # @example EventMachine.Callback used with an object that responds to #call. Returns the argument. - # - # cb = EventMachine.Callback(proc{ |msg| puts(msg) }) - # # returned object is a callable - # cb.call('hello world') - # - # - # @overload Callback(object, method) - # Wraps `method` invocation on `object` into an object that responds to #call that proxies all the arguments to that method - # @param [Object] Object to invoke method on - # @param [Symbol] Method name - # @return [<#call>] An object that responds to #call that takes any number of arguments and invokes method on object with those arguments - # - # @overload Callback(object) - # Returns callable object as is, without any coercion - # @param [<#call>] An object that responds to #call - # @return [<#call>] Its argument - # - # @overload Callback(&block) - # Returns block passed to it without any coercion - # @return [<#call>] Block passed to this method - # - # @raise [ArgumentError] When argument doesn't respond to #call, method name is missing or when invoked without arguments and block isn't given - # - # @return [<#call>] - def self.Callback(object = nil, method = nil, &blk) - if object && method - lambda { |*args| object.__send__ method, *args } - else - if object.respond_to? :call - object - else - blk || raise(ArgumentError) - end # if - end # if - end # self.Callback -end # EventMachine diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/channel.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/channel.rb deleted file mode 100644 index a919adff..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/channel.rb +++ /dev/null @@ -1,69 +0,0 @@ -module EventMachine - # Provides a simple thread-safe way to transfer data between (typically) long running - # tasks in {EventMachine.defer} and event loop thread. - # - # @example - # - # channel = EventMachine::Channel.new - # sid = channel.subscribe { |msg| p [:got, msg] } - # - # channel.push('hello world') - # channel.unsubscribe(sid) - # - # - class Channel - def initialize - @subs = {} - @uid = 0 - end - - # Return the number of current subscribers. - def num_subscribers - return @subs.size - end - - # Takes any arguments suitable for EM::Callback() and returns a subscriber - # id for use when unsubscribing. - # - # @return [Integer] Subscribe identifier - # @see #unsubscribe - def subscribe(*a, &b) - name = gen_id - EM.schedule { @subs[name] = EM::Callback(*a, &b) } - - name - end - - # Removes subscriber from the list. - # - # @param [Integer] Subscriber identifier - # @see #subscribe - def unsubscribe(name) - EM.schedule { @subs.delete name } - end - - # Add items to the channel, which are pushed out to all subscribers. - def push(*items) - items = items.dup - EM.schedule { items.each { |i| @subs.values.each { |s| s.call i } } } - end - alias << push - - # Fetches one message from the channel. - def pop(*a, &b) - EM.schedule { - name = subscribe do |*args| - unsubscribe(name) - EM::Callback(*a, &b).call(*args) - end - } - end - - private - - # @private - def gen_id - @uid += 1 - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/completion.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/completion.rb deleted file mode 100644 index 926535fd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/completion.rb +++ /dev/null @@ -1,304 +0,0 @@ -# = EM::Completion -# -# A completion is a callback container for various states of completion. In -# its most basic form it has a start state and a finish state. -# -# This implementation includes some hold-back from the EM::Deferrable -# interface in order to be compatible - but it has a much cleaner -# implementation. -# -# In general it is preferred that this implementation be used as a state -# callback container than EM::DefaultDeferrable or other classes including -# EM::Deferrable. This is because it is generally more sane to keep this level -# of state in a dedicated state-back container. This generally leads to more -# malleable interfaces and software designs, as well as eradicating nasty bugs -# that result from abstraction leakage. -# -# == Basic Usage -# -# As already mentioned, the basic usage of a Completion is simply for its two -# final states, :succeeded and :failed. -# -# An asynchronous operation will complete at some future point in time, and -# users often want to react to this event. API authors will want to expose -# some common interface to react to these events. -# -# In the following example, the user wants to know when a short lived -# connection has completed its exchange with the remote server. The simple -# protocol just waits for an ack to its message. -# -# class Protocol < EM::Connection -# include EM::P::LineText2 -# -# def initialize(message, completion) -# @message, @completion = message, completion -# @completion.completion { close_connection } -# @completion.timeout(1, :timeout) -# end -# -# def post_init -# send_data(@message) -# end -# -# def receive_line(line) -# case line -# when /ACK/i -# @completion.succeed line -# when /ERR/i -# @completion.fail :error, line -# else -# @completion.fail :unknown, line -# end -# end -# -# def unbind -# @completion.fail :disconnected unless @completion.completed? -# end -# end -# -# class API -# attr_reader :host, :port -# -# def initialize(host = 'example.org', port = 8000) -# @host, @port = host, port -# end -# -# def request(message) -# completion = EM::Deferrable::Completion.new -# EM.connect(host, port, Protocol, message, completion) -# completion -# end -# end -# -# api = API.new -# completion = api.request('stuff') -# completion.callback do |line| -# puts "API responded with: #{line}" -# end -# completion.errback do |type, line| -# case type -# when :error -# puts "API error: #{line}" -# when :unknown -# puts "API returned unknown response: #{line}" -# when :disconnected -# puts "API server disconnected prematurely" -# when :timeout -# puts "API server did not respond in a timely fashion" -# end -# end -# -# == Advanced Usage -# -# This completion implementation also supports more state callbacks and -# arbitrary states (unlike the original Deferrable API). This allows for basic -# stateful process encapsulation. One might use this to setup state callbacks -# for various states in an exchange like in the basic usage example, except -# where the applicaiton could be made to react to "connected" and -# "disconnected" states additionally. -# -# class Protocol < EM::Connection -# def initialize(completion) -# @response = [] -# @completion = completion -# @completion.stateback(:disconnected) do -# @completion.succeed @response.join -# end -# end -# -# def connection_completed -# @host, @port = Socket.unpack_sockaddr_in get_peername -# @completion.change_state(:connected, @host, @port) -# send_data("GET http://example.org/ HTTP/1.0\r\n\r\n") -# end -# -# def receive_data(data) -# @response << data -# end -# -# def unbind -# @completion.change_state(:disconnected, @host, @port) -# end -# end -# -# completion = EM::Deferrable::Completion.new -# completion.stateback(:connected) do |host, port| -# puts "Connected to #{host}:#{port}" -# end -# completion.stateback(:disconnected) do |host, port| -# puts "Disconnected from #{host}:#{port}" -# end -# completion.callback do |response| -# puts response -# end -# -# EM.connect('example.org', 80, Protocol, completion) -# -# == Timeout -# -# The Completion also has a timeout. The timeout is global and is not aware of -# states apart from completion states. The timeout is only engaged if #timeout -# is called, and it will call fail if it is reached. -# -# == Completion states -# -# By default there are two completion states, :succeeded and :failed. These -# states can be modified by subclassing and overrding the #completion_states -# method. Completion states are special, in that callbacks for all completion -# states are explcitly cleared when a completion state is entered. This -# prevents errors that could arise from accidental unterminated timeouts, and -# other such user errors. -# -# == Other notes -# -# Several APIs have been carried over from EM::Deferrable for compatibility -# reasons during a transitionary period. Specifically cancel_errback and -# cancel_callback are implemented, but their usage is to be strongly -# discouraged. Due to the already complex nature of reaction systems, dynamic -# callback deletion only makes the problem much worse. It is always better to -# add correct conditionals to the callback code, or use more states, than to -# address such implementaiton issues with conditional callbacks. - -module EventMachine - - class Completion - # This is totally not used (re-implemented), it's here in case people check - # for kind_of? - include EventMachine::Deferrable - - attr_reader :state, :value - - def initialize - @state = :unknown - @callbacks = Hash.new { |h,k| h[k] = [] } - @value = [] - @timeout_timer = nil - end - - # Enter the :succeeded state, setting the result value if given. - def succeed(*args) - change_state(:succeeded, *args) - end - # The old EM method: - alias set_deferred_success succeed - - # Enter the :failed state, setting the result value if given. - def fail(*args) - change_state(:failed, *args) - end - # The old EM method: - alias set_deferred_failure fail - - # Statebacks are called when you enter (or are in) the named state. - def stateback(state, *a, &b) - # The following is quite unfortunate special casing for :completed - # statebacks, but it's a necessary evil for latent completion - # definitions. - - if :completed == state || !completed? || @state == state - @callbacks[state] << EM::Callback(*a, &b) - end - execute_callbacks - self - end - - # Callbacks are called when you enter (or are in) a :succeeded state. - def callback(*a, &b) - stateback(:succeeded, *a, &b) - end - - # Errbacks are called when you enter (or are in) a :failed state. - def errback(*a, &b) - stateback(:failed, *a, &b) - end - - # Completions are called when you enter (or are in) either a :failed or a - # :succeeded state. They are stored as a special (reserved) state called - # :completed. - def completion(*a, &b) - stateback(:completed, *a, &b) - end - - # Enter a new state, setting the result value if given. If the state is one - # of :succeeded or :failed, then :completed callbacks will also be called. - def change_state(state, *args) - @value = args - @state = state - - EM.schedule { execute_callbacks } - end - - # The old EM method: - alias set_deferred_status change_state - - # Indicates that we've reached some kind of completion state, by default - # this is :succeeded or :failed. Due to these semantics, the :completed - # state is reserved for internal use. - def completed? - completion_states.any? { |s| state == s } - end - - # Completion states simply returns a list of completion states, by default - # this is :succeeded and :failed. - def completion_states - [:succeeded, :failed] - end - - # Schedule a time which if passes before we enter a completion state, this - # deferrable will be failed with the given arguments. - def timeout(time, *args) - cancel_timeout - @timeout_timer = EM::Timer.new(time) do - fail(*args) unless completed? - end - end - - # Disable the timeout - def cancel_timeout - if @timeout_timer - @timeout_timer.cancel - @timeout_timer = nil - end - end - - # Remove an errback. N.B. Some errbacks cannot be deleted. Usage is NOT - # recommended, this is an anti-pattern. - def cancel_errback(*a, &b) - @callbacks[:failed].delete(EM::Callback(*a, &b)) - end - - # Remove a callback. N.B. Some callbacks cannot be deleted. Usage is NOT - # recommended, this is an anti-pattern. - def cancel_callback(*a, &b) - @callbacks[:succeeded].delete(EM::Callback(*a, &b)) - end - - private - # Execute all callbacks for the current state. If in a completed state, then - # call any statebacks associated with the completed state. - def execute_callbacks - execute_state_callbacks(state) - if completed? - execute_state_callbacks(:completed) - clear_dead_callbacks - cancel_timeout - end - end - - # Iterate all callbacks for a given state, and remove then call them. - def execute_state_callbacks(state) - while callback = @callbacks[state].shift - callback.call(*value) - end - end - - # If we enter a completion state, clear other completion states after all - # callback chains are completed. This means that operation specific - # callbacks can't be dual-called, which is most common user error. - def clear_dead_callbacks - completion_states.each do |state| - @callbacks[state].clear - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/connection.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/connection.rb deleted file mode 100644 index 267aec2d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/connection.rb +++ /dev/null @@ -1,770 +0,0 @@ -module EventMachine - class FileNotFoundException < Exception - end - - # EventMachine::Connection is a class that is instantiated - # by EventMachine's processing loop whenever a new connection - # is created. (New connections can be either initiated locally - # to a remote server or accepted locally from a remote client.) - # When a Connection object is instantiated, it mixes in - # the functionality contained in the user-defined module - # specified in calls to {EventMachine.connect} or {EventMachine.start_server}. - # User-defined handler modules may redefine any or all of the standard - # methods defined here, as well as add arbitrary additional code - # that will also be mixed in. - # - # EventMachine manages one object inherited from EventMachine::Connection - # (and containing the mixed-in user code) for every network connection - # that is active at any given time. - # The event loop will automatically call methods on EventMachine::Connection - # objects whenever specific events occur on the corresponding connections, - # as described below. - # - # This class is never instantiated by user code, and does not publish an - # initialize method. The instance methods of EventMachine::Connection - # which may be called by the event loop are: - # - # * {#post_init} - # * {#connection_completed} - # * {#receive_data} - # * {#unbind} - # * {#ssl_verify_peer} (if TLS is used) - # * {#ssl_handshake_completed} - # - # All of the other instance methods defined here are called only by user code. - # - # @see file:docs/GettingStarted.md EventMachine tutorial - class Connection - # @private - attr_accessor :signature - - # @private - alias original_method method - - # Override .new so subclasses don't have to call super and can ignore - # connection-specific arguments - # - # @private - def self.new(sig, *args) - allocate.instance_eval do - # Store signature - @signature = sig - # associate_callback_target sig - - # Call a superclass's #initialize if it has one - initialize(*args) - - # post initialize callback - post_init - - self - end - end - - # Stubbed initialize so legacy superclasses can safely call super - # - # @private - def initialize(*args) - end - - # Called by the event loop immediately after the network connection has been established, - # and before resumption of the network loop. - # This method is generally not called by user code, but is called automatically - # by the event loop. The base-class implementation is a no-op. - # This is a very good place to initialize instance variables that will - # be used throughout the lifetime of the network connection. - # - # @see #connection_completed - # @see #unbind - # @see #send_data - # @see #receive_data - def post_init - end - - # Called by the event loop whenever data has been received by the network connection. - # It is never called by user code. {#receive_data} is called with a single parameter, a String containing - # the network protocol data, which may of course be binary. You will - # generally redefine this method to perform your own processing of the incoming data. - # - # Here's a key point which is essential to understanding the event-driven - # programming model: EventMachine knows absolutely nothing about the protocol - # which your code implements. You must not make any assumptions about - # the size of the incoming data packets, or about their alignment on any - # particular intra-message or PDU boundaries (such as line breaks). - # receive_data can and will send you arbitrary chunks of data, with the - # only guarantee being that the data is presented to your code in the order - # it was collected from the network. Don't even assume that the chunks of - # data will correspond to network packets, as EventMachine can and will coalesce - # several incoming packets into one, to improve performance. The implication for your - # code is that you generally will need to implement some kind of a state machine - # in your redefined implementation of receive_data. For a better understanding - # of this, read through the examples of specific protocol handlers in EventMachine::Protocols - # - # The base-class implementation (which will be invoked only if you didn't override it in your protocol handler) - # simply prints incoming data packet size to stdout. - # - # @param [String] data Opaque incoming data. - # @note Depending on the protocol, buffer sizes and OS networking stack configuration, incoming data may or may not be "a complete message". - # It is up to this handler to detect content boundaries to determine whether all the content (for example, full HTTP request) - # has been received and can be processed. - # - # @see #post_init - # @see #connection_completed - # @see #unbind - # @see #send_data - # @see file:docs/GettingStarted.md EventMachine tutorial - def receive_data data - puts "............>>>#{data.length}" - end - - # Called by EventMachine when the SSL/TLS handshake has - # been completed, as a result of calling #start_tls to initiate SSL/TLS on the connection. - # - # This callback exists because {#post_init} and {#connection_completed} are **not** reliable - # for indicating when an SSL/TLS connection is ready to have its certificate queried for. - # - # @see #get_peer_cert - def ssl_handshake_completed - end - - # Called by EventMachine when :verify_peer => true has been passed to {#start_tls}. - # It will be called with each certificate in the certificate chain provided by the remote peer. - # - # The cert will be passed as a String in PEM format, the same as in {#get_peer_cert}. It is up to user defined - # code to perform a check on the certificates. The return value from this callback is used to accept or deny the peer. - # A return value that is not nil or false triggers acceptance. If the peer is not accepted, the connection - # will be subsequently closed. - # - # @example This server always accepts all peers - # - # module AcceptServer - # def post_init - # start_tls(:verify_peer => true) - # end - # - # def ssl_verify_peer(cert) - # true - # end - # - # def ssl_handshake_completed - # $server_handshake_completed = true - # end - # end - # - # - # @example This server never accepts any peers - # - # module DenyServer - # def post_init - # start_tls(:verify_peer => true) - # end - # - # def ssl_verify_peer(cert) - # # Do not accept the peer. This should now cause the connection to shut down - # # without the SSL handshake being completed. - # false - # end - # - # def ssl_handshake_completed - # $server_handshake_completed = true - # end - # end - # - # @see #start_tls - def ssl_verify_peer(cert) - end - - # called by the framework whenever a connection (either a server or client connection) is closed. - # The close can occur because your code intentionally closes it (using {#close_connection} and {#close_connection_after_writing}), - # because the remote peer closed the connection, or because of a network error. - # You may not assume that the network connection is still open and able to send or - # receive data when the callback to unbind is made. This is intended only to give - # you a chance to clean up associations your code may have made to the connection - # object while it was open. - # - # If you want to detect which peer has closed the connection, you can override {#close_connection} in your protocol handler - # and set an @ivar. - # - # @example Overriding Connection#close_connection to distinguish connections closed on our side - # - # class MyProtocolHandler < EventMachine::Connection - # - # # ... - # - # def close_connection(*args) - # @intentionally_closed_connection = true - # super(*args) - # end - # - # def unbind - # if @intentionally_closed_connection - # # ... - # end - # end - # - # # ... - # - # end - # - # @see #post_init - # @see #connection_completed - # @see file:docs/GettingStarted.md EventMachine tutorial - def unbind - end - - # Called by the reactor after attempting to relay incoming data to a descriptor (set as a proxy target descriptor with - # {EventMachine.enable_proxy}) that has already been closed. - # - # @see EventMachine.enable_proxy - def proxy_target_unbound - end - - # called when the reactor finished proxying all - # of the requested bytes. - def proxy_completed - end - - # EventMachine::Connection#proxy_incoming_to is called only by user code. It sets up - # a low-level proxy relay for all data inbound for this connection, to the connection given - # as the argument. This is essentially just a helper method for enable_proxy. - # - # @see EventMachine.enable_proxy - def proxy_incoming_to(conn,bufsize=0) - EventMachine::enable_proxy(self, conn, bufsize) - end - - # A helper method for {EventMachine.disable_proxy} - def stop_proxying - EventMachine::disable_proxy(self) - end - - # The number of bytes proxied to another connection. Reset to zero when - # EventMachine::Connection#proxy_incoming_to is called, and incremented whenever data is proxied. - def get_proxied_bytes - EventMachine::get_proxied_bytes(@signature) - end - - # EventMachine::Connection#close_connection is called only by user code, and never - # by the event loop. You may call this method against a connection object in any - # callback handler, whether or not the callback was made against the connection - # you want to close. close_connection schedules the connection to be closed - # at the next available opportunity within the event loop. You may not assume that - # the connection is closed when close_connection returns. In particular, the framework - # will callback the unbind method for the particular connection at a point shortly - # after you call close_connection. You may assume that the unbind callback will - # take place sometime after your call to close_connection completes. In other words, - # the unbind callback will not re-enter your code "inside" of your call to close_connection. - # However, it's not guaranteed that a future version of EventMachine will not change - # this behavior. - # - # {#close_connection} will *silently discard* any outbound data which you have - # sent to the connection using {EventMachine::Connection#send_data} but which has not - # yet been sent across the network. If you want to avoid this behavior, use - # {EventMachine::Connection#close_connection_after_writing}. - # - def close_connection after_writing = false - EventMachine::close_connection @signature, after_writing - end - - # Removes given connection from the event loop. - # The connection's socket remains open and its file descriptor number is returned. - def detach - EventMachine::detach_fd @signature - end - - def get_sock_opt level, option - EventMachine::get_sock_opt @signature, level, option - end - - def set_sock_opt level, optname, optval - EventMachine::set_sock_opt @signature, level, optname, optval - end - - # A variant of {#close_connection}. - # All of the descriptive comments given for close_connection also apply to - # close_connection_after_writing, *with one exception*: if the connection has - # outbound data sent using send_dat but which has not yet been sent across the network, - # close_connection_after_writing will schedule the connection to be closed *after* - # all of the outbound data has been safely written to the remote peer. - # - # Depending on the amount of outgoing data and the speed of the network, - # considerable time may elapse between your call to close_connection_after_writing - # and the actual closing of the socket (at which time the unbind callback will be called - # by the event loop). During this time, you *may not* call send_data to transmit - # additional data (that is, the connection is closed for further writes). In very - # rare cases, you may experience a receive_data callback after your call to {#close_connection_after_writing}, - # depending on whether incoming data was in the process of being received on the connection - # at the moment when you called {#close_connection_after_writing}. Your protocol handler must - # be prepared to properly deal with such data (probably by ignoring it). - # - # @see #close_connection - # @see #send_data - def close_connection_after_writing - close_connection true - end - - # Call this method to send data to the remote end of the network connection. It takes a single String argument, - # which may contain binary data. Data is buffered to be sent at the end of this event loop tick (cycle). - # - # When used in a method that is event handler (for example, {#post_init} or {#connection_completed}, it will send - # data to the other end of the connection that generated the event. - # You can also call {#send_data} to write to other connections. For more information see The Chat Server Example in the - # {file:docs/GettingStarted.md EventMachine tutorial}. - # - # If you want to send some data and then immediately close the connection, make sure to use {#close_connection_after_writing} - # instead of {#close_connection}. - # - # - # @param [String] data Data to send asynchronously - # - # @see file:docs/GettingStarted.md EventMachine tutorial - # @see Connection#receive_data - # @see Connection#post_init - # @see Connection#unbind - def send_data data - data = data.to_s - size = data.bytesize if data.respond_to?(:bytesize) - size ||= data.size - EventMachine::send_data @signature, data, size - end - - # Returns true if the connection is in an error state, false otherwise. - # - # In general, you can detect the occurrence of communication errors or unexpected - # disconnection by the remote peer by handing the {#unbind} method. In some cases, however, - # it's useful to check the status of the connection using {#error?} before attempting to send data. - # This function is synchronous but it will return immediately without blocking. - # - # @return [Boolean] true if the connection is in an error state, false otherwise - def error? - errno = EventMachine::report_connection_error_status(@signature) - case errno - when 0 - false - when -1 - true - else - EventMachine::ERRNOS[errno] - end - end - - # Called by the event loop when a remote TCP connection attempt completes successfully. - # You can expect to get this notification after calls to {EventMachine.connect}. Remember that EventMachine makes remote connections - # asynchronously, just as with any other kind of network event. This method - # is intended primarily to assist with network diagnostics. For normal protocol - # handling, use #post_init to perform initial work on a new connection (such as sending initial set of data). - # {Connection#post_init} will always be called. This method will only be called in case of a successful completion. - # A connection attempt which fails will result a call to {Connection#unbind} after the failure. - # - # @see Connection#post_init - # @see Connection#unbind - # @see file:docs/GettingStarted.md EventMachine tutorial - def connection_completed - end - - # Call {#start_tls} at any point to initiate TLS encryption on connected streams. - # The method is smart enough to know whether it should perform a server-side - # or a client-side handshake. An appropriate place to call {#start_tls} is in - # your redefined {#post_init} method, or in the {#connection_completed} handler for - # an outbound connection. - # - # - # @option args [String] :cert_chain_file (nil) local path of a readable file that contants a chain of X509 certificates in - # the [PEM format](http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail), - # with the most-resolved certificate at the top of the file, successive intermediate - # certs in the middle, and the root (or CA) cert at the bottom. - # - # @option args [String] :private_key_file (nil) local path of a readable file that must contain a private key in the [PEM format](http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail). - # - # @option args [Boolean] :verify_peer (false) indicates whether a server should request a certificate from a peer, to be verified by user code. - # If true, the {#ssl_verify_peer} callback on the {EventMachine::Connection} object is called with each certificate - # in the certificate chain provided by the peer. See documentation on {#ssl_verify_peer} for how to use this. - # - # @option args [Boolean] :fail_if_no_peer_cert (false) Used in conjunction with verify_peer. If set the SSL handshake will be terminated if the peer does not provide a certificate. - # - # - # @option args [String] :cipher_list ("ALL:!ADH:!LOW:!EXP:!DES-CBC3-SHA:@STRENGTH") indicates the available SSL cipher values. Default value is "ALL:!ADH:!LOW:!EXP:!DES-CBC3-SHA:@STRENGTH". Check the format of the OpenSSL cipher string at http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT. - # - # @option args [String] :ecdh_curve (nil) The curve for ECDHE ciphers. See available ciphers with 'openssl ecparam -list_curves' - # - # @option args [String] :dhparam (nil) The local path of a file containing DH parameters for EDH ciphers in [PEM format](http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail) See: 'openssl dhparam' - # - # @option args [Array] :ssl_version (TLSv1 TLSv1_1 TLSv1_2) indicates the allowed SSL/TLS versions. Possible values are: {SSLv2}, {SSLv3}, {TLSv1}, {TLSv1_1}, {TLSv1_2}. - # - # @example Using TLS with EventMachine - # - # require 'rubygems' - # require 'eventmachine' - # - # module Handler - # def post_init - # start_tls(:private_key_file => '/tmp/server.key', :cert_chain_file => '/tmp/server.crt', :verify_peer => false) - # end - # end - # - # EventMachine.run do - # EventMachine.start_server("127.0.0.1", 9999, Handler) - # end - # - # @param [Hash] args - # - # @todo support passing an encryption parameter, which can be string or Proc, to get a passphrase - # for encrypted private keys. - # @todo support passing key material via raw strings or Procs that return strings instead of - # just filenames. - # - # @see #ssl_verify_peer - def start_tls args={} - priv_key = args[:private_key_file] - cert_chain = args[:cert_chain_file] - verify_peer = args[:verify_peer] - sni_hostname = args[:sni_hostname] - cipher_list = args[:cipher_list] - ssl_version = args[:ssl_version] - ecdh_curve = args[:ecdh_curve] - dhparam = args[:dhparam] - fail_if_no_peer_cert = args[:fail_if_no_peer_cert] - - [priv_key, cert_chain].each do |file| - next if file.nil? or file.empty? - raise FileNotFoundException, - "Could not find #{file} for start_tls" unless File.exist? file - end - - protocols_bitmask = 0 - if ssl_version.nil? - protocols_bitmask |= EventMachine::EM_PROTO_TLSv1 - protocols_bitmask |= EventMachine::EM_PROTO_TLSv1_1 - protocols_bitmask |= EventMachine::EM_PROTO_TLSv1_2 - else - [ssl_version].flatten.each do |p| - case p.to_s.downcase - when 'sslv2' - protocols_bitmask |= EventMachine::EM_PROTO_SSLv2 - when 'sslv3' - protocols_bitmask |= EventMachine::EM_PROTO_SSLv3 - when 'tlsv1' - protocols_bitmask |= EventMachine::EM_PROTO_TLSv1 - when 'tlsv1_1' - protocols_bitmask |= EventMachine::EM_PROTO_TLSv1_1 - when 'tlsv1_2' - protocols_bitmask |= EventMachine::EM_PROTO_TLSv1_2 - else - raise("Unrecognized SSL/TLS Protocol: #{p}") - end - end - end - - EventMachine::set_tls_parms(@signature, priv_key || '', cert_chain || '', verify_peer, fail_if_no_peer_cert, sni_hostname || '', cipher_list || '', ecdh_curve || '', dhparam || '', protocols_bitmask) - EventMachine::start_tls @signature - end - - # If [TLS](http://en.wikipedia.org/wiki/Transport_Layer_Security) is active on the connection, returns the remote [X509 certificate](http://en.wikipedia.org/wiki/X.509) - # as a string, in the popular [PEM format](http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail). This can then be used for arbitrary validation - # of a peer's certificate in your code. - # - # This should be called in/after the {#ssl_handshake_completed} callback, which indicates - # that SSL/TLS is active. Using this callback is important, because the certificate may not - # be available until the time it is executed. Using #post_init or #connection_completed is - # not adequate, because the SSL handshake may still be taking place. - # - # This method will return `nil` if: - # - # * EventMachine is not built with [OpenSSL](http://www.openssl.org) support - # * [TLS](http://en.wikipedia.org/wiki/Transport_Layer_Security) is not active on the connection - # * TLS handshake is not yet complete - # * Remote peer for any other reason has not presented a certificate - # - # - # @example Getting peer TLS certificate information in EventMachine - # - # module Handler - # def post_init - # puts "Starting TLS" - # start_tls - # end - # - # def ssl_handshake_completed - # puts get_peer_cert - # close_connection - # end - # - # def unbind - # EventMachine::stop_event_loop - # end - # end - # - # EventMachine.run do - # EventMachine.connect "mail.google.com", 443, Handler - # end - # - # # Will output: - # # -----BEGIN CERTIFICATE----- - # # MIIDIjCCAougAwIBAgIQbldpChBPqv+BdPg4iwgN8TANBgkqhkiG9w0BAQUFADBM - # # MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg - # # THRkLjEWMBQGA1UEAxMNVGhhd3RlIFNHQyBDQTAeFw0wODA1MDIxNjMyNTRaFw0w - # # OTA1MDIxNjMyNTRaMGkxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh - # # MRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgSW5jMRgw - # # FgYDVQQDEw9tYWlsLmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ - # # AoGBALlkxdh2QXegdElukCSOV2+8PKiONIS+8Tu9K7MQsYpqtLNC860zwOPQ2NLI - # # 3Zp4jwuXVTrtzGuiqf5Jioh35Ig3CqDXtLyZoypjZUQcq4mlLzHlhIQ4EhSjDmA7 - # # Ffw9y3ckSOQgdBQWNLbquHh9AbEUjmhkrYxIqKXeCnRKhv6nAgMBAAGjgecwgeQw - # # KAYDVR0lBCEwHwYIKwYBBQUHAwEGCCsGAQUFBwMCBglghkgBhvhCBAEwNgYDVR0f - # # BC8wLTAroCmgJ4YlaHR0cDovL2NybC50aGF3dGUuY29tL1RoYXd0ZVNHQ0NBLmNy - # # bDByBggrBgEFBQcBAQRmMGQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLnRoYXd0 - # # ZS5jb20wPgYIKwYBBQUHMAKGMmh0dHA6Ly93d3cudGhhd3RlLmNvbS9yZXBvc2l0 - # # b3J5L1RoYXd0ZV9TR0NfQ0EuY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEF - # # BQADgYEAsRwpLg1dgCR1gYDK185MFGukXMeQFUvhGqF8eT/CjpdvezyKVuz84gSu - # # 6ccMXgcPQZGQN/F4Xug+Q01eccJjRSVfdvR5qwpqCj+6BFl5oiKDBsveSkrmL5dz - # # s2bn7TdTSYKcLeBkjXxDLHGBqLJ6TNCJ3c4/cbbG5JhGvoema94= - # # -----END CERTIFICATE----- - # - # You can do whatever you want with the certificate String, such as load it - # as a certificate object using the OpenSSL library, and check its fields. - # - # @return [String] the remote [X509 certificate](http://en.wikipedia.org/wiki/X.509), in the popular [PEM format](http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail), - # if TLS is active on the connection - # - # @see Connection#start_tls - # @see Connection#ssl_handshake_completed - def get_peer_cert - EventMachine::get_peer_cert @signature - end - - def get_cipher_bits - EventMachine::get_cipher_bits @signature - end - - def get_cipher_name - EventMachine::get_cipher_name @signature - end - - def get_cipher_protocol - EventMachine::get_cipher_protocol @signature - end - - def get_sni_hostname - EventMachine::get_sni_hostname @signature - end - - # Sends UDP messages. - # - # This method may be called from any Connection object that refers - # to an open datagram socket (see EventMachine#open_datagram_socket). - # The method sends a UDP (datagram) packet containing the data you specify, - # to a remote peer specified by the IP address and port that you give - # as parameters to the method. - # Observe that you may send a zero-length packet (empty string). - # However, you may not send an arbitrarily-large data packet because - # your operating system will enforce a platform-specific limit on - # the size of the outbound packet. (Your kernel - # will respond in a platform-specific way if you send an overlarge - # packet: some will send a truncated packet, some will complain, and - # some will silently drop your request). - # On LANs, it's usually OK to send datagrams up to about 4000 bytes in length, - # but to be really safe, send messages smaller than the Ethernet-packet - # size (typically about 1400 bytes). Some very restrictive WANs - # will either drop or truncate packets larger than about 500 bytes. - # - # @param [String] data Data to send asynchronously - # @param [String] recipient_address IP address of the recipient - # @param [String] recipient_port Port of the recipient - def send_datagram data, recipient_address, recipient_port - data = data.to_s - size = data.bytesize if data.respond_to?(:bytesize) - size ||= data.size - EventMachine::send_datagram @signature, data, size, recipient_address, Integer(recipient_port) - end - - - # This method is used with stream-connections to obtain the identity - # of the remotely-connected peer. If a peername is available, this method - # returns a sockaddr structure. The method returns nil if no peername is available. - # You can use Socket.unpack_sockaddr_in and its variants to obtain the - # values contained in the peername structure returned from #get_peername. - # - # @example How to get peer IP address and port with EventMachine - # - # require 'socket' - # - # module Handler - # def receive_data data - # port, ip = Socket.unpack_sockaddr_in(get_peername) - # puts "got #{data.inspect} from #{ip}:#{port}" - # end - # end - def get_peername - EventMachine::get_peername @signature - end - - # Used with stream-connections to obtain the identity - # of the local side of the connection. If a local name is available, this method - # returns a sockaddr structure. The method returns nil if no local name is available. - # You can use {Socket.unpack_sockaddr_in} and its variants to obtain the - # values contained in the local-name structure returned from this method. - # - # @example - # - # require 'socket' - # - # module Handler - # def receive_data data - # port, ip = Socket.unpack_sockaddr_in(get_sockname) - # puts "got #{data.inspect}" - # end - # end - def get_sockname - EventMachine::get_sockname @signature - end - - # Returns the PID (kernel process identifier) of a subprocess - # associated with this Connection object. For use with {EventMachine.popen} - # and similar methods. Returns nil when there is no meaningful subprocess. - # - # @return [Integer] - def get_pid - EventMachine::get_subprocess_pid @signature - end - - # Returns a subprocess exit status. Only useful for {EventMachine.popen}. Call it in your - # {#unbind} handler. - # - # @return [Integer] - def get_status - EventMachine::get_subprocess_status @signature - end - - # The number of seconds since the last send/receive activity on this connection. - def get_idle_time - EventMachine::get_idle_time @signature - end - - # comm_inactivity_timeout returns the current value (float in seconds) of the inactivity-timeout - # property of network-connection and datagram-socket objects. A nonzero value - # indicates that the connection or socket will automatically be closed if no read or write - # activity takes place for at least that number of seconds. - # A zero value (the default) specifies that no automatic timeout will take place. - def comm_inactivity_timeout - EventMachine::get_comm_inactivity_timeout @signature - end - - # Allows you to set the inactivity-timeout property for - # a network connection or datagram socket. Specify a non-negative float value in seconds. - # If the value is greater than zero, the connection or socket will automatically be closed - # if no read or write activity takes place for at least that number of seconds. - # Specify a value of zero to indicate that no automatic timeout should take place. - # Zero is the default value. - def comm_inactivity_timeout= value - EventMachine::set_comm_inactivity_timeout @signature, value.to_f - end - alias set_comm_inactivity_timeout comm_inactivity_timeout= - - # The duration after which a TCP connection in the connecting state will fail. - # It is important to distinguish this value from {EventMachine::Connection#comm_inactivity_timeout}, - # which looks at how long since data was passed on an already established connection. - # The value is a float in seconds. - # - # @return [Float] The duration after which a TCP connection in the connecting state will fail, in seconds. - def pending_connect_timeout - EventMachine::get_pending_connect_timeout @signature - end - - # Sets the duration after which a TCP connection in a - # connecting state will fail. - # - # @param [Float, #to_f] value Connection timeout in seconds - def pending_connect_timeout= value - EventMachine::set_pending_connect_timeout @signature, value.to_f - end - alias set_pending_connect_timeout pending_connect_timeout= - - # Reconnect to a given host/port with the current instance - # - # @param [String] server Hostname or IP address - # @param [Integer] port Port to reconnect to - def reconnect server, port - EventMachine::reconnect server, port, self - end - - - # Like {EventMachine::Connection#send_data}, this sends data to the remote end of - # the network connection. {EventMachine::Connection#send_file_data} takes a - # filename as an argument, though, and sends the contents of the file, in one - # chunk. - # - # @param [String] filename Local path of the file to send - # - # @see #send_data - # @author Kirk Haines - def send_file_data filename - EventMachine::send_file_data @signature, filename - end - - # Open a file on the filesystem and send it to the remote peer. This returns an - # object of type {EventMachine::Deferrable}. The object's callbacks will be executed - # on the reactor main thread when the file has been completely scheduled for - # transmission to the remote peer. Its errbacks will be called in case of an error (such as file-not-found). - # This method employs various strategies to achieve the fastest possible performance, - # balanced against minimum consumption of memory. - # - # Warning: this feature has an implicit dependency on an outboard extension, - # evma_fastfilereader. You must install this extension in order to use {#stream_file_data} - # with files larger than a certain size (currently 8192 bytes). - # - # @option args [Boolean] :http_chunks (false) If true, this method will stream the file data in a format - # compatible with the HTTP chunked-transfer encoding - # - # @param [String] filename Local path of the file to stream - # @param [Hash] args Options - # - # @return [EventMachine::Deferrable] - def stream_file_data filename, args={} - EventMachine::FileStreamer.new( self, filename, args ) - end - - # Watches connection for readability. Only possible if the connection was created - # using {EventMachine.attach} and had {EventMachine.notify_readable}/{EventMachine.notify_writable} defined on the handler. - # - # @see #notify_readable? - def notify_readable= mode - EventMachine::set_notify_readable @signature, mode - end - - # @return [Boolean] true if the connection is being watched for readability. - def notify_readable? - EventMachine::is_notify_readable @signature - end - - # Watches connection for writeability. Only possible if the connection was created - # using {EventMachine.attach} and had {EventMachine.notify_readable}/{EventMachine.notify_writable} defined on the handler. - # - # @see #notify_writable? - def notify_writable= mode - EventMachine::set_notify_writable @signature, mode - end - - # Returns true if the connection is being watched for writability. - def notify_writable? - EventMachine::is_notify_writable @signature - end - - # Pause a connection so that {#send_data} and {#receive_data} events are not fired until {#resume} is called. - # @see #resume - def pause - EventMachine::pause_connection @signature - end - - # Resume a connection's {#send_data} and {#receive_data} events. - # @see #pause - def resume - EventMachine::resume_connection @signature - end - - # @return [Boolean] true if the connect was paused using {EventMachine::Connection#pause}. - # @see #pause - # @see #resume - def paused? - EventMachine::connection_paused? @signature - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/deferrable.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/deferrable.rb deleted file mode 100644 index 18a6d316..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/deferrable.rb +++ /dev/null @@ -1,210 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 Jul 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -module EventMachine - module Deferrable - autoload :Pool, 'em/deferrable/pool' - - # Specify a block to be executed if and when the Deferrable object receives - # a status of :succeeded. See #set_deferred_status for more information. - # - # Calling this method on a Deferrable object whose status is not yet known - # will cause the callback block to be stored on an internal list. - # If you call this method on a Deferrable whose status is :succeeded, the - # block will be executed immediately, receiving the parameters given to the - # prior #set_deferred_status call. - # - #-- - # If there is no status, add a callback to an internal list. - # If status is succeeded, execute the callback immediately. - # If status is failed, do nothing. - # - def callback &block - return unless block - @deferred_status ||= :unknown - if @deferred_status == :succeeded - block.call(*@deferred_args) - elsif @deferred_status != :failed - @callbacks ||= [] - @callbacks.unshift block # << block - end - self - end - - # Cancels an outstanding callback to &block if any. Undoes the action of #callback. - # - def cancel_callback block - @callbacks ||= [] - @callbacks.delete block - end - - # Specify a block to be executed if and when the Deferrable object receives - # a status of :failed. See #set_deferred_status for more information. - #-- - # If there is no status, add an errback to an internal list. - # If status is failed, execute the errback immediately. - # If status is succeeded, do nothing. - # - def errback &block - return unless block - @deferred_status ||= :unknown - if @deferred_status == :failed - block.call(*@deferred_args) - elsif @deferred_status != :succeeded - @errbacks ||= [] - @errbacks.unshift block # << block - end - self - end - - # Cancels an outstanding errback to &block if any. Undoes the action of #errback. - # - def cancel_errback block - @errbacks ||= [] - @errbacks.delete block - end - - # Sets the "disposition" (status) of the Deferrable object. See also the large set of - # sugarings for this method. - # Note that if you call this method without arguments, - # no arguments will be passed to the callback/errback. - # If the user has coded these with arguments, then the - # user code will throw an argument exception. - # Implementors of deferrable classes must - # document the arguments they will supply to user callbacks. - # - # OBSERVE SOMETHING VERY SPECIAL here: you may call this method even - # on the INSIDE of a callback. This is very useful when a previously-registered - # callback wants to change the parameters that will be passed to subsequently-registered - # ones. - # - # You may give either :succeeded or :failed as the status argument. - # - # If you pass :succeeded, then all of the blocks passed to the object using the #callback - # method (if any) will be executed BEFORE the #set_deferred_status method returns. All of the blocks - # passed to the object using #errback will be discarded. - # - # If you pass :failed, then all of the blocks passed to the object using the #errback - # method (if any) will be executed BEFORE the #set_deferred_status method returns. All of the blocks - # passed to the object using # callback will be discarded. - # - # If you pass any arguments to #set_deferred_status in addition to the status argument, - # they will be passed as arguments to any callbacks or errbacks that are executed. - # It's your responsibility to ensure that the argument lists specified in your callbacks and - # errbacks match the arguments given in calls to #set_deferred_status, otherwise Ruby will raise - # an ArgumentError. - # - #-- - # We're shifting callbacks off and discarding them as we execute them. - # This is valid because by definition callbacks are executed no more than - # once. It also has the magic effect of permitting recursive calls, which - # means that a callback can call #set_deferred_status and change the parameters - # that will be sent to subsequent callbacks down the chain. - # - # Changed @callbacks and @errbacks from push/shift to unshift/pop, per suggestion - # by Kirk Haines, to work around the memory leak bug that still exists in many Ruby - # versions. - # - # Changed 15Sep07: after processing callbacks or errbacks, CLEAR the other set of - # handlers. This gets us a little closer to the behavior of Twisted's "deferred," - # which only allows status to be set once. Prior to making this change, it was possible - # to "succeed" a Deferrable (triggering its callbacks), and then immediately "fail" it, - # triggering its errbacks! That is clearly undesirable, but it's just as undesirable - # to raise an exception is status is set more than once on a Deferrable. The latter - # behavior would invalidate the idiom of resetting arguments by setting status from - # within a callback or errback, but more seriously it would cause spurious errors - # if a Deferrable was timed out and then an attempt was made to succeed it. See the - # comments under the new method #timeout. - # - def set_deferred_status status, *args - cancel_timeout - @errbacks ||= nil - @callbacks ||= nil - @deferred_status = status - @deferred_args = args - case @deferred_status - when :succeeded - if @callbacks - while cb = @callbacks.pop - cb.call(*@deferred_args) - end - end - @errbacks.clear if @errbacks - when :failed - if @errbacks - while eb = @errbacks.pop - eb.call(*@deferred_args) - end - end - @callbacks.clear if @callbacks - end - end - - - # Setting a timeout on a Deferrable causes it to go into the failed state after - # the Timeout expires (passing no arguments to the object's errbacks). - # Setting the status at any time prior to a call to the expiration of the timeout - # will cause the timer to be cancelled. - def timeout seconds, *args - cancel_timeout - me = self - @deferred_timeout = EventMachine::Timer.new(seconds) {me.fail(*args)} - self - end - - # Cancels an outstanding timeout if any. Undoes the action of #timeout. - # - def cancel_timeout - @deferred_timeout ||= nil - if @deferred_timeout - @deferred_timeout.cancel - @deferred_timeout = nil - end - end - - - # Sugar for set_deferred_status(:succeeded, ...) - # - def succeed *args - set_deferred_status :succeeded, *args - end - alias set_deferred_success succeed - - # Sugar for set_deferred_status(:failed, ...) - # - def fail *args - set_deferred_status :failed, *args - end - alias set_deferred_failure fail - end - - - # DefaultDeferrable is an otherwise empty class that includes Deferrable. - # This is very useful when you just need to return a Deferrable object - # as a way of communicating deferred status to some other part of a program. - class DefaultDeferrable - include Deferrable - end -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/deferrable/pool.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/deferrable/pool.rb deleted file mode 100644 index 3c278eeb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/deferrable/pool.rb +++ /dev/null @@ -1,2 +0,0 @@ -warn "EM::Deferrable::Pool is deprecated, please use EM::Pool" -EM::Deferrable::Pool = EM::Pool \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/file_watch.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/file_watch.rb deleted file mode 100644 index 074ffedc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/file_watch.rb +++ /dev/null @@ -1,73 +0,0 @@ -module EventMachine - # Utility class that is useful for file monitoring. Supported events are - # - # * File is modified - # * File is deleted - # * File is moved - # - # @note On Mac OS X, file watching only works when kqueue is enabled - # - # @see EventMachine.watch_file - class FileWatch < Connection - # @private - Cmodified = 'modified'.freeze - # @private - Cdeleted = 'deleted'.freeze - # @private - Cmoved = 'moved'.freeze - - - # @private - def receive_data(data) - case data - when Cmodified - file_modified - when Cdeleted - file_deleted - when Cmoved - file_moved - end - end - - # Returns the path that is being monitored. - # - # @note Current implementation does not pick up on the new filename after a rename occurs. - # - # @return [String] - # @see EventMachine.watch_file - def path - @path - end - - # Will be called when the file is modified. Supposed to be redefined by subclasses. - # - # @abstract - def file_modified - end - - # Will be called when the file is deleted. Supposed to be redefined by subclasses. - # When the file is deleted, stop_watching will be called after this to make sure everything is - # cleaned up correctly. - # - # @note On Linux (with {http://en.wikipedia.org/wiki/Inotify inotify}), this method will not be called until *all* open file descriptors to - # the file have been closed. - # - # @abstract - def file_deleted - end - - # Will be called when the file is moved or renamed. Supposed to be redefined by subclasses. - # - # @abstract - def file_moved - end - - # Discontinue monitoring of the file. - # - # This involves cleaning up the underlying monitoring details with kqueue/inotify, and in turn firing {EventMachine::Connection#unbind}. - # This will be called automatically when a file is deleted. User code may call it as well. - def stop_watching - EventMachine::unwatch_filename(@signature) - end # stop_watching - end # FileWatch -end # EventMachine diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/future.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/future.rb deleted file mode 100644 index 4affbf51..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/future.rb +++ /dev/null @@ -1,61 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 Jul 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -#-- -# This defines EventMachine::Deferrable#future, which requires -# that the rest of EventMachine::Deferrable has already been seen. -# (It's in deferrable.rb.) - -module EventMachine - module Deferrable - - # A future is a sugaring of a typical deferrable usage. - #-- - # Evaluate arg (which may be an expression or a block). - # What's the class of arg? - # If arg is an ordinary expression, then return it. - # If arg is deferrable (responds to :set_deferred_status), - # then look at the arguments. If either callback or errback - # are defined, then use them. If neither are defined, then - # use the supplied block (if any) as the callback. - # Then return arg. - def self.future arg, cb=nil, eb=nil, &blk - arg = arg.call if arg.respond_to?(:call) - - if arg.respond_to?(:set_deferred_status) - if cb || eb - arg.callback(&cb) if cb - arg.errback(&eb) if eb - else - arg.callback(&blk) if blk - end - end - - arg - end - - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/iterator.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/iterator.rb deleted file mode 100644 index a30b9dd7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/iterator.rb +++ /dev/null @@ -1,252 +0,0 @@ -module EventMachine - # A simple iterator for concurrent asynchronous work. - # - # Unlike ruby's built-in iterators, the end of the current iteration cycle is signaled manually, - # instead of happening automatically after the yielded block finishes executing. For example: - # - # (0..10).each{ |num| } - # - # becomes: - # - # EM::Iterator.new(0..10).each{ |num,iter| iter.next } - # - # This is especially useful when doing asynchronous work via reactor libraries and - # functions. For example, given a sync and async http api: - # - # response = sync_http_get(url); ... - # async_http_get(url){ |response| ... } - # - # a synchronous iterator such as: - # - # responses = urls.map{ |url| sync_http_get(url) } - # ... - # puts 'all done!' - # - # could be written as: - # - # EM::Iterator.new(urls).map(proc{ |url,iter| - # async_http_get(url){ |res| - # iter.return(res) - # } - # }, proc{ |responses| - # ... - # puts 'all done!' - # }) - # - # Now, you can take advantage of the asynchronous api to issue requests in parallel. For example, - # to fetch 10 urls at a time, simply pass in a concurrency of 10: - # - # EM::Iterator.new(urls, 10).each do |url,iter| - # async_http_get(url){ iter.next } - # end - # - class Iterator - Stop = "EM::Stop" - # Create a new parallel async iterator with specified concurrency. - # - # i = EM::Iterator.new(1..100, 10) - # - # will create an iterator over the range that processes 10 items at a time. Iteration - # is started via #each, #map or #inject - # - # The list may either be an array-like object, or a proc that returns a new object - # to be processed each time it is called. If a proc is used, it must return - # EventMachine::Iterator::Stop to signal the end of the iterations. - # - def initialize(list, concurrency = 1) - raise ArgumentError, 'concurrency must be bigger than zero' unless (concurrency > 0) - if list.respond_to?(:call) - @list = nil - @list_proc = list - elsif list.respond_to?(:to_a) - @list = list.to_a.dup - @list_proc = nil - else - raise ArgumentError, 'argument must be a proc or an array' - end - @concurrency = concurrency - - @started = false - @ended = false - end - - # Change the concurrency of this iterator. Workers will automatically be spawned or destroyed - # to accomodate the new concurrency level. - # - def concurrency=(val) - old = @concurrency - @concurrency = val - - spawn_workers if val > old and @started and !@ended - end - attr_reader :concurrency - - # Iterate over a set of items using the specified block or proc. - # - # EM::Iterator.new(1..100).each do |num, iter| - # puts num - # iter.next - # end - # - # An optional second proc is invoked after the iteration is complete. - # - # EM::Iterator.new(1..100).each( - # proc{ |num,iter| iter.next }, - # proc{ puts 'all done' } - # ) - # - def each(foreach=nil, after=nil, &blk) - raise ArgumentError, 'proc or block required for iteration' unless foreach ||= blk - raise RuntimeError, 'cannot iterate over an iterator more than once' if @started or @ended - - @started = true - @pending = 0 - @workers = 0 - - all_done = proc{ - after.call if after and @ended and @pending == 0 - } - - @process_next = proc{ - # p [:process_next, :pending=, @pending, :workers=, @workers, :ended=, @ended, :concurrency=, @concurrency, :list=, @list] - unless @ended or @workers > @concurrency - item = next_item() - if item.equal?(Stop) - @ended = true - @workers -= 1 - all_done.call - else - @pending += 1 - - is_done = false - on_done = proc{ - raise RuntimeError, 'already completed this iteration' if is_done - is_done = true - - @pending -= 1 - - if @ended - all_done.call - else - EM.next_tick(@process_next) - end - } - class << on_done - alias :next :call - end - - foreach.call(item, on_done) - end - else - @workers -= 1 - end - } - - spawn_workers - - self - end - - # Collect the results of an asynchronous iteration into an array. - # - # EM::Iterator.new(%w[ pwd uptime uname date ], 2).map(proc{ |cmd,iter| - # EM.system(cmd){ |output,status| - # iter.return(output) - # } - # }, proc{ |results| - # p results - # }) - # - def map(foreach, after) - index = 0 - - inject([], proc{ |results,item,iter| - i = index - index += 1 - - is_done = false - on_done = proc{ |res| - raise RuntimeError, 'already returned a value for this iteration' if is_done - is_done = true - - results[i] = res - iter.return(results) - } - class << on_done - alias :return :call - def next - raise NoMethodError, 'must call #return on a map iterator' - end - end - - foreach.call(item, on_done) - }, proc{ |results| - after.call(results) - }) - end - - # Inject the results of an asynchronous iteration onto a given object. - # - # EM::Iterator.new(%w[ pwd uptime uname date ], 2).inject({}, proc{ |hash,cmd,iter| - # EM.system(cmd){ |output,status| - # hash[cmd] = status.exitstatus == 0 ? output.strip : nil - # iter.return(hash) - # } - # }, proc{ |results| - # p results - # }) - # - def inject(obj, foreach, after) - each(proc{ |item,iter| - is_done = false - on_done = proc{ |res| - raise RuntimeError, 'already returned a value for this iteration' if is_done - is_done = true - - obj = res - iter.next - } - class << on_done - alias :return :call - def next - raise NoMethodError, 'must call #return on an inject iterator' - end - end - - foreach.call(obj, item, on_done) - }, proc{ - after.call(obj) - }) - end - - private - - # Spawn workers to consume items from the iterator's enumerator based on the current concurrency level. - # - def spawn_workers - EM.next_tick(start_worker = proc{ - if @workers < @concurrency and !@ended - # p [:spawning_worker, :workers=, @workers, :concurrency=, @concurrency, :ended=, @ended] - @workers += 1 - @process_next.call - EM.next_tick(start_worker) - end - }) - nil - end - - # Return the next item from @list or @list_proc. - # Once items have run out, will return EM::Iterator::Stop. Procs must supply this themselves - def next_item - if @list_proc - @list_proc.call - else - @list.empty? ? Stop : @list.shift - end - end - end -end - -# TODO: pass in one object instead of two? .each{ |iter| puts iter.current; iter.next } -# TODO: support iter.pause/resume/stop/break/continue? -# TODO: create some exceptions instead of using RuntimeError diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/messages.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/messages.rb deleted file mode 100644 index 9a51c390..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/messages.rb +++ /dev/null @@ -1,66 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 Jul 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -=begin - -Message Routing in EventMachine. - -The goal here is to enable "routing points," objects that can send and receive -"messages," which are delimited streams of bytes. The boundaries of a message -are preserved as it passes through the reactor system. - -There will be several module methods defined in EventMachine to create route-point -objects (which will probably have a base class of EventMachine::MessageRouter -until someone suggests a better name). - -As with I/O objects, routing objects will receive events by having the router -core call methods on them. And of course user code can and will define handlers -to deal with events of interest. - -The message router base class only really needs a receive_message method. There will -be an EM module-method to send messages, in addition to the module methods to create -the various kinds of message receivers. - -The simplest kind of message receiver object can receive messages by being named -explicitly in a parameter to EM#send_message. More sophisticated receivers can define -pub-sub selectors and message-queue names. And they can also define channels for -route-points in other processes or even on other machines. - -A message is NOT a marshallable entity. Rather, it's a chunk of flat content more like -an Erlang message. Initially, all content submitted for transmission as a message will -have the to_s method called on it. Eventually, we'll be able to transmit certain structured -data types (XML and YAML documents, Structs within limits) and have them reconstructed -on the other end. - -A fundamental goal of the message-routing capability is to interoperate seamlessly with -external systems, including non-Ruby systems like ActiveMQ. We will define various protocol -handlers for things like Stomp and possibly AMQP, but these will be wrapped up and hidden -from the users of the basic routing capability. - -As with Erlang, a critical goal is for programs that are built to use message-passing to work -WITHOUT CHANGE when the code is re-based on a multi-process system. - -=end - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/pool.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/pool.rb deleted file mode 100644 index 2cb3662d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/pool.rb +++ /dev/null @@ -1,151 +0,0 @@ -module EventMachine - # A simple async resource pool based on a resource and work queue. Resources - # are enqueued and work waits for resources to become available. - # - # @example - # require 'em-http-request' - # - # EM.run do - # pool = EM::Pool.new - # spawn = lambda { pool.add EM::HttpRequest.new('http://example.org') } - # 10.times { spawn[] } - # done, scheduled = 0, 0 - # - # check = lambda do - # done += 1 - # if done >= scheduled - # EM.stop - # end - # end - # - # pool.on_error { |conn| spawn[] } - # - # 100.times do |i| - # scheduled += 1 - # pool.perform do |conn| - # req = conn.get :path => '/', :keepalive => true - # - # req.callback do - # p [:success, conn.object_id, i, req.response.size] - # check[] - # end - # - # req.errback { check[] } - # - # req - # end - # end - # end - # - # Resources are expected to be controlled by an object responding to a - # deferrable/completion style API with callback and errback blocks. - # - class Pool - - def initialize - @resources = EM::Queue.new - @removed = [] - @contents = [] - @on_error = nil - end - - def add resource - @contents << resource - requeue resource - end - - def remove resource - @contents.delete resource - @removed << resource - end - - # Returns a list for introspection purposes only. You should *NEVER* call - # modification or work oriented methods on objects in this list. A good - # example use case is periodic statistics collection against a set of - # connection resources. - # - # @example - # pool.contents.inject(0) { |sum, connection| connection.num_bytes } - def contents - @contents.dup - end - - # Define a default catch-all for when the deferrables returned by work - # blocks enter a failed state. By default all that happens is that the - # resource is returned to the pool. If on_error is defined, this block is - # responsible for re-adding the resource to the pool if it is still usable. - # In other words, it is generally assumed that on_error blocks explicitly - # handle the rest of the lifetime of the resource. - def on_error *a, &b - @on_error = EM::Callback(*a, &b) - end - - # Perform a given #call-able object or block. The callable object will be - # called with a resource from the pool as soon as one is available, and is - # expected to return a deferrable. - # - # The deferrable will have callback and errback added such that when the - # deferrable enters a finished state, the object is returned to the pool. - # - # If on_error is defined, then objects are not automatically returned to the - # pool. - def perform(*a, &b) - work = EM::Callback(*a, &b) - - @resources.pop do |resource| - if removed? resource - @removed.delete resource - reschedule work - else - process work, resource - end - end - end - alias reschedule perform - - # A peek at the number of enqueued jobs waiting for resources - def num_waiting - @resources.num_waiting - end - - # Removed will show resources in a partial pruned state. Resources in the - # removed list may not appear in the contents list if they are currently in - # use. - def removed? resource - @removed.include? resource - end - - protected - def requeue resource - @resources.push resource - end - - def failure resource - if @on_error - @contents.delete resource - @on_error.call resource - # Prevent users from calling a leak. - @removed.delete resource - else - requeue resource - end - end - - def completion deferrable, resource - deferrable.callback { requeue resource } - deferrable.errback { failure resource } - end - - def process work, resource - deferrable = work.call resource - if deferrable.kind_of?(EM::Deferrable) - completion deferrable, resource - else - raise ArgumentError, "deferrable expected from work" - end - rescue - failure resource - raise - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/process_watch.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/process_watch.rb deleted file mode 100644 index 66e89438..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/process_watch.rb +++ /dev/null @@ -1,45 +0,0 @@ -module EventMachine - - # This is subclassed from EventMachine::Connection for use with the process monitoring API. Read the - # documentation on the instance methods of this class, and for a full explanation see EventMachine.watch_process. - class ProcessWatch < Connection - # @private - Cfork = 'fork'.freeze - # @private - Cexit = 'exit'.freeze - - # @private - def receive_data(data) - case data - when Cfork - process_forked - when Cexit - process_exited - end - end - - # Returns the pid that EventMachine::watch_process was originally called with. - def pid - @pid - end - - # Should be redefined with the user's custom callback that will be fired when the prcess is forked. - # - # There is currently not an easy way to get the pid of the forked child. - def process_forked - end - - # Should be redefined with the user's custom callback that will be fired when the process exits. - # - # stop_watching is called automatically after this callback - def process_exited - end - - # Discontinue monitoring of the process. - # This will be called automatically when a process dies. User code may call it as well. - def stop_watching - EventMachine::unwatch_pid(@signature) - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/processes.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/processes.rb deleted file mode 100644 index 4bbc14f6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/processes.rb +++ /dev/null @@ -1,123 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 13 Dec 07 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-08 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - - -module EventMachine - - # EM::DeferrableChildProcess is a sugaring of a common use-case - # involving EM::popen. - # Call the #open method on EM::DeferrableChildProcess, passing - # a command-string. #open immediately returns an EM::Deferrable - # object. It also schedules the forking of a child process, which - # will execute the command passed to #open. - # When the forked child terminates, the Deferrable will be signalled - # and execute its callbacks, passing the data that the child process - # wrote to stdout. - # - class DeferrableChildProcess < EventMachine::Connection - include EventMachine::Deferrable - - # @private - def initialize - super - @data = [] - end - - # Sugars a common use-case involving forked child processes. - # #open takes a String argument containing an shell command - # string (including arguments if desired). #open immediately - # returns an EventMachine::Deferrable object, without blocking. - # - # It also invokes EventMachine#popen to run the passed-in - # command in a forked child process. - # - # When the forked child terminates, the Deferrable that - # #open calls its callbacks, passing the data returned - # from the child process. - # - def self.open cmd - EventMachine.popen( cmd, DeferrableChildProcess ) - end - - # @private - def receive_data data - @data << data - end - - # @private - def unbind - succeed( @data.join ) - end - end - - # @private - class SystemCmd < EventMachine::Connection - def initialize cb - @cb = cb - @output = [] - end - def receive_data data - @output << data - end - def unbind - @cb.call @output.join(''), get_status if @cb - end - end - - # EM::system is a simple wrapper for EM::popen. It is similar to Kernel::system, but requires a - # single string argument for the command and performs no shell expansion. - # - # The block or proc passed to EM::system is called with two arguments: the output generated by the command, - # and a Process::Status that contains information about the command's execution. - # - # EM.run{ - # EM.system('ls'){ |output,status| puts output if status.exitstatus == 0 } - # } - # - # You can also supply an additional proc to send some data to the process: - # - # EM.run{ - # EM.system('sh', proc{ |process| - # process.send_data("echo hello\n") - # process.send_data("exit\n") - # }, proc{ |out,status| - # puts(out) - # }) - # } - # - # Like EventMachine.popen, EventMachine.system currently does not work on windows. - # It returns the pid of the spawned process. - def EventMachine::system cmd, *args, &cb - cb ||= args.pop if args.last.is_a? Proc - init = args.pop if args.last.is_a? Proc - - # merge remaining arguments into the command - cmd = [cmd, *args] if args.any? - - EM.get_subprocess_pid(EM.popen(cmd, SystemCmd, cb) do |c| - init[c] if init - end.signature) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols.rb deleted file mode 100644 index 0c179064..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols.rb +++ /dev/null @@ -1,37 +0,0 @@ -module EventMachine - # This module contains various protocol implementations, including: - # - HttpClient and HttpClient2 - # - Stomp - # - Memcache - # - SmtpClient and SmtpServer - # - SASLauth and SASLauthclient - # - LineProtocol, LineAndTextProtocol and LineText2 - # - HeaderAndContentProtocol - # - Postgres3 - # - ObjectProtocol - # - # The protocol implementations live in separate files in the protocols/ subdirectory, - # but are auto-loaded when they are first referenced in your application. - # - # EventMachine::Protocols is also aliased to EM::P for easier usage. - # - module Protocols - # TODO : various autotools are completely useless with the lack of naming - # convention, we need to correct that! - autoload :TcpConnectTester, 'em/protocols/tcptest' - autoload :HttpClient, 'em/protocols/httpclient' - autoload :HttpClient2, 'em/protocols/httpclient2' - autoload :LineAndTextProtocol, 'em/protocols/line_and_text' - autoload :HeaderAndContentProtocol, 'em/protocols/header_and_content' - autoload :LineText2, 'em/protocols/linetext2' - autoload :Stomp, 'em/protocols/stomp' - autoload :SmtpClient, 'em/protocols/smtpclient' - autoload :SmtpServer, 'em/protocols/smtpserver' - autoload :SASLauth, 'em/protocols/saslauth' - autoload :Memcache, 'em/protocols/memcache' - autoload :Postgres3, 'em/protocols/postgres3' - autoload :ObjectProtocol, 'em/protocols/object_protocol' - autoload :Socks4, 'em/protocols/socks4' - autoload :LineProtocol, 'em/protocols/line_protocol' - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/header_and_content.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/header_and_content.rb deleted file mode 100644 index b5a465aa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/header_and_content.rb +++ /dev/null @@ -1,138 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 15 Nov 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -module EventMachine - module Protocols - - # === Usage - # - # class RequestHandler < EM::P::HeaderAndContentProtocol - # def receive_request headers, content - # p [:request, headers, content] - # end - # end - # - # EM.run{ - # EM.start_server 'localhost', 80, RequestHandler - # } - # - #-- - # Originally, this subclassed LineAndTextProtocol, which in - # turn relies on BufferedTokenizer, which doesn't gracefully - # handle the transitions between lines and binary text. - # Changed 13Sep08 by FCianfrocca. - class HeaderAndContentProtocol < Connection - include LineText2 - - ContentLengthPattern = /Content-length:\s*(\d+)/i - - def initialize *args - super - init_for_request - end - - def receive_line line - case @hc_mode - when :discard_blanks - unless line == "" - @hc_mode = :headers - receive_line line - end - when :headers - if line == "" - raise "unrecognized state" unless @hc_headers.length > 0 - if respond_to?(:receive_headers) - receive_headers @hc_headers - end - # @hc_content_length will be nil, not 0, if there was no content-length header. - if @hc_content_length.to_i > 0 - set_binary_mode @hc_content_length - else - dispatch_request - end - else - @hc_headers << line - if ContentLengthPattern =~ line - # There are some attacks that rely on sending multiple content-length - # headers. This is a crude protection, but needs to become tunable. - raise "extraneous content-length header" if @hc_content_length - @hc_content_length = $1.to_i - end - if @hc_headers.length == 1 and respond_to?(:receive_first_header_line) - receive_first_header_line line - end - end - else - raise "internal error, unsupported mode" - end - end - - def receive_binary_data text - @hc_content = text - dispatch_request - end - - def dispatch_request - if respond_to?(:receive_request) - receive_request @hc_headers, @hc_content - end - init_for_request - end - private :dispatch_request - - def init_for_request - @hc_mode = :discard_blanks - @hc_headers = [] - # originally was @hc_headers ||= []; @hc_headers.clear to get a performance - # boost, but it's counterproductive because a subclassed handler will have to - # call dup to use the header array we pass in receive_headers. - - @hc_content_length = nil - @hc_content = "" - end - private :init_for_request - - # Basically a convenience method. We might create a subclass that does this - # automatically. But it's such a performance killer. - def headers_2_hash hdrs - self.class.headers_2_hash hdrs - end - - class << self - def headers_2_hash hdrs - hash = {} - hdrs.each {|h| - if /\A([^\s:]+)\s*:\s*/ =~ h - tail = $'.dup - hash[ $1.downcase.gsub(/-/,"_").intern ] = tail - end - } - hash - end - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient.rb deleted file mode 100644 index 38b175ce..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient.rb +++ /dev/null @@ -1,300 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 July 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -module EventMachine - module Protocols - - # Note: This class is deprecated and will be removed. Please use EM-HTTP-Request instead. - # - # @example - # EventMachine.run { - # http = EventMachine::Protocols::HttpClient.request( - # :host => server, - # :port => 80, - # :request => "/index.html", - # :query_string => "parm1=value1&parm2=value2" - # ) - # http.callback {|response| - # puts response[:status] - # puts response[:headers] - # puts response[:content] - # } - # } - #-- - # TODO: - # Add streaming so we can support enormous POSTs. Current max is 20meg. - # Timeout for connections that run too long or hang somewhere in the middle. - # Persistent connections (HTTP/1.1), may need a associated delegate object. - # DNS: Some way to cache DNS lookups for hostnames we connect to. Ruby's - # DNS lookups are unbelievably slow. - # HEAD requests. - # Convenience methods for requests. get, post, url, etc. - # SSL. - # Handle status codes like 304, 100, etc. - # Refactor this code so that protocol errors all get handled one way (an exception?), - # instead of sprinkling set_deferred_status :failed calls everywhere. - class HttpClient < Connection - include EventMachine::Deferrable - - MaxPostContentLength = 20 * 1024 * 1024 - - def initialize - warn "HttpClient is deprecated and will be removed. EM-Http-Request should be used instead." - @connected = false - end - - # @param args [Hash] The request arguments - # @option args [String] :host The host IP/DNS name - # @option args [Integer] :port The port to connect too - # @option args [String] :verb The request type [GET | POST | DELETE | PUT] - # @option args [String] :request The request path - # @option args [Hash] :basic_auth The basic auth credentials (:username and :password) - # @option args [String] :content The request content - # @option args [String] :contenttype The content type (e.g. text/plain) - # @option args [String] :query_string The query string - # @option args [String] :host_header The host header to set - # @option args [String] :cookie Cookies to set - def self.request( args = {} ) - args[:port] ||= 80 - EventMachine.connect( args[:host], args[:port], self ) {|c| - # According to the docs, we will get here AFTER post_init is called. - c.instance_eval {@args = args} - } - end - - def post_init - @start_time = Time.now - @data = "" - @read_state = :base - end - - # We send the request when we get a connection. - # AND, we set an instance variable to indicate we passed through here. - # That allows #unbind to know whether there was a successful connection. - # NB: This naive technique won't work when we have to support multiple - # requests on a single connection. - def connection_completed - @connected = true - send_request @args - end - - def send_request args - args[:verb] ||= args[:method] # Support :method as an alternative to :verb. - args[:verb] ||= :get # IS THIS A GOOD IDEA, to default to GET if nothing was specified? - - verb = args[:verb].to_s.upcase - unless ["GET", "POST", "PUT", "DELETE", "HEAD"].include?(verb) - set_deferred_status :failed, {:status => 0} # TODO, not signalling the error type - return # NOTE THE EARLY RETURN, we're not sending any data. - end - - request = args[:request] || "/" - unless request[0,1] == "/" - request = "/" + request - end - - qs = args[:query_string] || "" - if qs.length > 0 and qs[0,1] != '?' - qs = "?" + qs - end - - version = args[:version] || "1.1" - - # Allow an override for the host header if it's not the connect-string. - host = args[:host_header] || args[:host] || "_" - # For now, ALWAYS tuck in the port string, although we may want to omit it if it's the default. - port = args[:port].to_i != 80 ? ":#{args[:port]}" : "" - - # POST items. - postcontenttype = args[:contenttype] || "application/octet-stream" - postcontent = args[:content] || "" - raise "oversized content in HTTP POST" if postcontent.length > MaxPostContentLength - - # ESSENTIAL for the request's line-endings to be CRLF, not LF. Some servers misbehave otherwise. - # TODO: We ASSUME the caller wants to send a 1.1 request. May not be a good assumption. - req = [ - "#{verb} #{request}#{qs} HTTP/#{version}", - "Host: #{host}#{port}", - "User-agent: Ruby EventMachine", - ] - - if verb == "POST" || verb == "PUT" - req << "Content-type: #{postcontenttype}" - req << "Content-length: #{postcontent.length}" - end - - # TODO, this cookie handler assumes it's getting a single, semicolon-delimited string. - # Eventually we will want to deal intelligently with arrays and hashes. - if args[:cookie] - req << "Cookie: #{args[:cookie]}" - end - - # Allow custom HTTP headers, e.g. SOAPAction - args[:custom_headers].each do |k,v| - req << "#{k}: #{v}" - end if args[:custom_headers] - - # Basic-auth stanza contributed by Matt Murphy. - if args[:basic_auth] - basic_auth_string = ["#{args[:basic_auth][:username]}:#{args[:basic_auth][:password]}"].pack('m').strip.gsub(/\n/,'') - req << "Authorization: Basic #{basic_auth_string}" - end - - req << "" - reqstring = req.map {|l| "#{l}\r\n"}.join - send_data reqstring - - if verb == "POST" || verb == "PUT" - send_data postcontent - end - end - - - def receive_data data - while data and data.length > 0 - case @read_state - when :base - # Perform any per-request initialization here and don't consume any data. - @data = "" - @headers = [] - @content_length = nil # not zero - @content = "" - @status = nil - @chunked = false - @chunk_length = nil - @read_state = :header - @connection_close = nil - when :header - ary = data.split( /\r?\n/m, 2 ) - if ary.length == 2 - data = ary.last - if ary.first == "" - if (@content_length and @content_length > 0) || @chunked || @connection_close - @read_state = :content - else - dispatch_response - @read_state = :base - end - else - @headers << ary.first - if @headers.length == 1 - parse_response_line - elsif ary.first =~ /\Acontent-length:\s*/i - # Only take the FIRST content-length header that appears, - # which we can distinguish because @content_length is nil. - # TODO, it's actually a fatal error if there is more than one - # content-length header, because the caller is presumptively - # a bad guy. (There is an exploit that depends on multiple - # content-length headers.) - @content_length ||= $'.to_i - elsif ary.first =~ /\Aconnection:\s*close/i - @connection_close = true - elsif ary.first =~ /\Atransfer-encoding:\s*chunked/i - @chunked = true - end - end - else - @data << data - data = "" - end - when :content - if @chunked && @chunk_length - bytes_needed = @chunk_length - @chunk_read - new_data = data[0, bytes_needed] - @chunk_read += new_data.length - @content += new_data - data = data[bytes_needed..-1] || "" - if @chunk_length == @chunk_read && data[0,2] == "\r\n" - @chunk_length = nil - data = data[2..-1] - end - elsif @chunked - if (m = data.match(/\A(\S*)\r\n/m)) - data = data[m[0].length..-1] - @chunk_length = m[1].to_i(16) - @chunk_read = 0 - if @chunk_length == 0 - dispatch_response - @read_state = :base - end - end - elsif @content_length - # If there was no content-length header, we have to wait until the connection - # closes. Everything we get until that point is content. - # TODO: Must impose a content-size limit, and also must implement chunking. - # Also, must support either temporary files for large content, or calling - # a content-consumer block supplied by the user. - bytes_needed = @content_length - @content.length - @content += data[0, bytes_needed] - data = data[bytes_needed..-1] || "" - if @content_length == @content.length - dispatch_response - @read_state = :base - end - else - @content << data - data = "" - end - end - end - end - - - # We get called here when we have received an HTTP response line. - # It's an opportunity to throw an exception or trigger other exceptional - # handling. - def parse_response_line - if @headers.first =~ /\AHTTP\/1\.[01] ([\d]{3})/ - @status = $1.to_i - else - set_deferred_status :failed, { - :status => 0 # crappy way of signifying an unrecognized response. TODO, find a better way to do this. - } - close_connection - end - end - private :parse_response_line - - def dispatch_response - @read_state = :base - set_deferred_status :succeeded, { - :content => @content, - :headers => @headers, - :status => @status - } - # TODO, we close the connection for now, but this is wrong for persistent clients. - close_connection - end - - def unbind - if !@connected - set_deferred_status :failed, {:status => 0} # YECCCCH. Find a better way to signal no-connect/network error. - elsif (@read_state == :content and @content_length == nil) - dispatch_response - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient2.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient2.rb deleted file mode 100644 index 0fb64e80..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient2.rb +++ /dev/null @@ -1,600 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 July 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -module EventMachine - module Protocols - - # Note: This class is deprecated and will be removed. Please use EM-HTTP-Request instead. - # - # === Usage - # - # EM.run{ - # conn = EM::Protocols::HttpClient2.connect 'google.com', 80 - # - # req = conn.get('/') - # req.callback{ |response| - # p(response.status) - # p(response.headers) - # p(response.content) - # } - # } - class HttpClient2 < Connection - include LineText2 - - def initialize - warn "HttpClient2 is deprecated and will be removed. EM-Http-Request should be used instead." - - @authorization = nil - @closed = nil - @requests = nil - end - - # @private - class Request - include Deferrable - - attr_reader :version - attr_reader :status - attr_reader :header_lines - attr_reader :headers - attr_reader :content - attr_reader :internal_error - - def initialize conn, args - @conn = conn - @args = args - @header_lines = [] - @headers = {} - @blanks = 0 - @chunk_trailer = nil - @chunking = nil - end - - def send_request - az = @args[:authorization] and az = "Authorization: #{az}\r\n" - - r = [ - "#{@args[:verb]} #{@args[:uri]} HTTP/#{@args[:version] || "1.1"}\r\n", - "Host: #{@args[:host_header] || "_"}\r\n", - az || "", - "\r\n" - ] - @conn.send_data r.join - end - - - #-- - # - def receive_line ln - if @chunk_trailer - receive_chunk_trailer(ln) - elsif @chunking - receive_chunk_header(ln) - else - receive_header_line(ln) - end - end - - #-- - # - def receive_chunk_trailer ln - if ln.length == 0 - @conn.pop_request - succeed(self) - else - p "Received chunk trailer line" - end - end - - #-- - # Allow up to ten blank lines before we get a real response line. - # Allow no more than 100 lines in the header. - # - def receive_header_line ln - if ln.length == 0 - if @header_lines.length > 0 - process_header - else - @blanks += 1 - if @blanks > 10 - @conn.close_connection - end - end - else - @header_lines << ln - if @header_lines.length > 100 - @internal_error = :bad_header - @conn.close_connection - end - end - end - - #-- - # Cf RFC 2616 pgh 3.6.1 for the format of HTTP chunks. - # - def receive_chunk_header ln - if ln.length > 0 - chunksize = ln.to_i(16) - if chunksize > 0 - @conn.set_text_mode(ln.to_i(16)) - else - @content = @content ? @content.join : '' - @chunk_trailer = true - end - else - # We correctly come here after each chunk gets read. - # p "Got A BLANK chunk line" - end - - end - - - #-- - # We get a single chunk. Append it to the incoming content and switch back to line mode. - # - def receive_chunked_text text - # p "RECEIVED #{text.length} CHUNK" - (@content ||= []) << text - end - - - #-- - # TODO, inefficient how we're handling this. Part of it is done so as to - # make sure we don't have problems in detecting chunked-encoding, content-length, - # etc. - # - HttpResponseRE = /\AHTTP\/(1.[01]) ([\d]{3})/i - ClenRE = /\AContent-length:\s*(\d+)/i - ChunkedRE = /\ATransfer-encoding:\s*chunked/i - ColonRE = /\:\s*/ - - def process_header - unless @header_lines.first =~ HttpResponseRE - @conn.close_connection - @internal_error = :bad_request - end - @version = $1.dup - @status = $2.dup.to_i - - clen = nil - chunks = nil - @header_lines.each_with_index do |e,ix| - if ix > 0 - hdr,val = e.split(ColonRE,2) - (@headers[hdr.downcase] ||= []) << val - end - - if clen == nil and e =~ ClenRE - clen = $1.dup.to_i - end - if e =~ ChunkedRE - chunks = true - end - end - - if clen - # If the content length is zero we should not call set_text_mode, - # because a value of zero will make it wait forever, hanging the - # connection. Just return success instead, with empty content. - if clen == 0 then - @content = "" - @conn.pop_request - succeed(self) - else - @conn.set_text_mode clen - end - elsif chunks - @chunking = true - else - # Chunked transfer, multipart, or end-of-connection. - # For end-of-connection, we need to go the unbind - # method and suppress its desire to fail us. - p "NO CLEN" - p @args[:uri] - p @header_lines - @internal_error = :unsupported_clen - @conn.close_connection - end - end - private :process_header - - - def receive_text text - @chunking ? receive_chunked_text(text) : receive_sized_text(text) - end - - #-- - # At the present time, we only handle contents that have a length - # specified by the content-length header. - # - def receive_sized_text text - @content = text - @conn.pop_request - succeed(self) - end - end - - # Make a connection to a remote HTTP server. - # Can take either a pair of arguments (which will be interpreted as - # a hostname/ip-address and a port), or a hash. - # If the arguments are a hash, then supported values include: - # :host => a hostname or ip-address - # :port => a port number - # :ssl => true to enable ssl - def self.connect *args - if args.length == 2 - args = {:host=>args[0], :port=>args[1]} - else - args = args.first - end - - h,prt,ssl = args[:host], Integer(args[:port]), (args[:tls] || args[:ssl]) - conn = EM.connect( h, prt, self ) - conn.start_tls if ssl - conn.set_default_host_header( h, prt, ssl ) - conn - end - - # Get a url - # - # req = conn.get(:uri => '/') - # req.callback{|response| puts response.content } - # - def get args - if args.is_a?(String) - args = {:uri=>args} - end - args[:verb] = "GET" - request args - end - - # Post to a url - # - # req = conn.post('/data') - # req.callback{|response| puts response.content } - #-- - # XXX there's no way to supply a POST body.. wtf? - def post args - if args.is_a?(String) - args = {:uri=>args} - end - args[:verb] = "POST" - request args - end - - - #-- - # Compute and remember a string to be used as the host header in HTTP requests - # unless the user overrides it with an argument to #request. - # - # @private - def set_default_host_header host, port, ssl - if (ssl and port != 443) or (!ssl and port != 80) - @host_header = "#{host}:#{port}" - else - @host_header = host - end - end - - - # @private - def post_init - super - @connected = EM::DefaultDeferrable.new - end - - # @private - def connection_completed - super - @connected.succeed - end - - #-- - # All pending requests, if any, must fail. - # We might come here without ever passing through connection_completed - # in case we can't connect to the server. We'll also get here when the - # connection closes (either because the server closes it, or we close it - # due to detecting an internal error or security violation). - # In either case, run down all pending requests, if any, and signal failure - # on them. - # - # Set and remember a flag (@closed) so we can immediately fail any - # subsequent requests. - # - # @private - def unbind - super - @closed = true - (@requests || []).each {|r| r.fail} - end - - # @private - def request args - args[:host_header] = @host_header unless args.has_key?(:host_header) - args[:authorization] = @authorization unless args.has_key?(:authorization) - r = Request.new self, args - if @closed - r.fail - else - (@requests ||= []).unshift r - @connected.callback {r.send_request} - end - r - end - - # @private - def receive_line ln - if req = @requests.last - req.receive_line ln - else - p "??????????" - p ln - end - end - - # @private - def receive_binary_data text - @requests.last.receive_text text - end - - #-- - # Called by a Request object when it completes. - # - # @private - def pop_request - @requests.pop - end - end - - -=begin - class HttpClient2x < Connection - include LineText2 - - # TODO: Make this behave appropriate in case a #connect fails. - # Currently, this produces no errors. - - # Make a connection to a remote HTTP server. - # Can take either a pair of arguments (which will be interpreted as - # a hostname/ip-address and a port), or a hash. - # If the arguments are a hash, then supported values include: - # :host => a hostname or ip-address; - # :port => a port number - #-- - # TODO, support optional encryption arguments like :ssl - def self.connect *args - if args.length == 2 - args = {:host=>args[0], :port=>args[1]} - else - args = args.first - end - - h,prt = args[:host],Integer(args[:port]) - EM.connect( h, prt, self, h, prt ) - end - - - #-- - # Sugars a connection that makes a single request and then - # closes the connection. Matches the behavior and the arguments - # of the original implementation of class HttpClient. - # - # Intended primarily for back compatibility, but the idiom - # is probably useful so it's not deprecated. - # We return a Deferrable, as did the original implementation. - # - # Because we're improving the way we deal with errors and exceptions - # (specifically, HTTP response codes other than 2xx will trigger the - # errback rather than the callback), this may break some existing code. - # - def self.request args - c = connect args - end - - #-- - # Requests can be pipelined. When we get a request, add it to the - # front of a queue as an array. The last element of the @requests - # array is always the oldest request received. Each element of the - # @requests array is a two-element array consisting of a hash with - # the original caller's arguments, and an initially-empty Ostruct - # containing the data we retrieve from the server's response. - # Maintain the instance variable @current_response, which is the response - # of the oldest pending request. That's just to make other code a little - # easier. If the variable doesn't exist when we come here, we're - # obviously the first request being made on the connection. - # - # The reason for keeping this method private (and requiring use of the - # convenience methods #get, #post, #head, etc) is to avoid the small - # performance penalty of canonicalizing the verb. - # - def request args - d = EventMachine::DefaultDeferrable.new - - if @closed - d.fail - return d - end - - o = OpenStruct.new - o.deferrable = d - (@requests ||= []).unshift [args, o] - @current_response ||= @requests.last.last - @connected.callback { - az = args[:authorization] and az = "Authorization: #{az}\r\n" - - r = [ - "#{args[:verb]} #{args[:uri]} HTTP/#{args[:version] || "1.1"}\r\n", - "Host: #{args[:host_header] || @host_header}\r\n", - az || "", - "\r\n" - ] - p r - send_data r.join - } - o.deferrable - end - private :request - - def get args - if args.is_a?(String) - args = {:uri=>args} - end - args[:verb] = "GET" - request args - end - - def initialize host, port - super - @host_header = "#{host}:#{port}" - end - def post_init - super - @connected = EM::DefaultDeferrable.new - end - - - def connection_completed - super - @connected.succeed - end - - #-- - # Make sure to throw away any leftover incoming data if we've - # been closed due to recognizing an error. - # - # Generate an internal error if we get an unreasonable number of - # header lines. It could be malicious. - # - def receive_line ln - p ln - return if @closed - - if ln.length > 0 - (@current_response.headers ||= []).push ln - abort_connection if @current_response.headers.length > 100 - else - process_received_headers - end - end - - #-- - # We come here when we've seen all the headers for a particular request. - # What we do next depends on the response line (which should be the - # first line in the header set), and whether there is content to read. - # We may transition into a text-reading state to read content, or - # we may abort the connection, or we may go right back into parsing - # responses for the next response in the chain. - # - # We make an ASSUMPTION that the first line is an HTTP response. - # Anything else produces an error that aborts the connection. - # This may not be enough, because it may be that responses to pipelined - # requests will come with a blank-line delimiter. - # - # Any non-2xx response will be treated as a fatal error, and abort the - # connection. We will set up the status and other response parameters. - # TODO: we will want to properly support 1xx responses, which some versions - # of IIS copiously generate. - # TODO: We need to give the option of not aborting the connection with certain - # non-200 responses, in order to work with NTLM and other authentication - # schemes that work at the level of individual connections. - # - # Some error responses will get sugarings. For example, we'll return the - # Location header in the response in case of a 301/302 response. - # - # Possible dispositions here: - # 1) No content to read (either content-length is zero or it's a HEAD request); - # 2) Switch to text mode to read a specific number of bytes; - # 3) Read a chunked or multipart response; - # 4) Read till the server closes the connection. - # - # Our reponse to the client can be either to wait till all the content - # has been read and then to signal caller's deferrable, or else to signal - # it when we finish the processing the headers and then expect the caller - # to have given us a block to call as the content comes in. And of course - # the latter gets stickier with chunks and multiparts. - # - HttpResponseRE = /\AHTTP\/(1.[01]) ([\d]{3})/i - ClenRE = /\AContent-length:\s*(\d+)/i - def process_received_headers - abort_connection unless @current_response.headers.first =~ HttpResponseRE - @current_response.version = $1.dup - st = $2.dup - @current_response.status = st.to_i - abort_connection unless st[0,1] == "2" - - clen = nil - @current_response.headers.each do |e| - if clen == nil and e =~ ClenRE - clen = $1.dup.to_i - end - end - - if clen - set_text_mode clen - end - end - private :process_received_headers - - - def receive_binary_data text - @current_response.content = text - @current_response.deferrable.succeed @current_response - @requests.pop - @current_response = (@requests.last || []).last - set_line_mode - end - - - - # We've received either a server error or an internal error. - # Close the connection and abort any pending requests. - #-- - # When should we call close_connection? It will cause #unbind - # to be fired. Should the user expect to see #unbind before - # we call #receive_http_error, or the other way around? - # - # Set instance variable @closed. That's used to inhibit further - # processing of any inbound data after an error has been recognized. - # - # We shouldn't have to worry about any leftover outbound data, - # because we call close_connection (not close_connection_after_writing). - # That ensures that any pipelined requests received after an error - # DO NOT get streamed out to the server on this connection. - # Very important. TODO, write a unit-test to establish that behavior. - # - def abort_connection - close_connection - @closed = true - @current_response.deferrable.fail( @current_response ) - end - - - #------------------------ - # Below here are user-overridable methods. - - end -=end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/line_and_text.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/line_and_text.rb deleted file mode 100644 index 784daf2f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/line_and_text.rb +++ /dev/null @@ -1,125 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 15 November 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# -# - -module EventMachine - module Protocols - # A protocol that handles line-oriented data with interspersed binary text. - # - # This version is optimized for performance. See EventMachine::Protocols::LineText2 - # for a version which is optimized for correctness with regard to binary text blocks - # that can switch back to line mode. - class LineAndTextProtocol < Connection - MaxBinaryLength = 32*1024*1024 - - def initialize *args - super - lbp_init_line_state - end - - def receive_data data - if @lbp_mode == :lines - begin - @lpb_buffer.extract(data).each do |line| - receive_line(line.chomp) if respond_to?(:receive_line) - end - rescue - receive_error('overlength line') if respond_to?(:receive_error) - close_connection - return - end - else - if @lbp_binary_limit > 0 - wanted = @lbp_binary_limit - @lbp_binary_bytes_received - chunk = nil - if data.length > wanted - chunk = data.slice!(0...wanted) - else - chunk = data - data = "" - end - @lbp_binary_buffer[@lbp_binary_bytes_received...(@lbp_binary_bytes_received+chunk.length)] = chunk - @lbp_binary_bytes_received += chunk.length - if @lbp_binary_bytes_received == @lbp_binary_limit - receive_binary_data(@lbp_binary_buffer) if respond_to?(:receive_binary_data) - lbp_init_line_state - end - receive_data(data) if data.length > 0 - else - receive_binary_data(data) if respond_to?(:receive_binary_data) - data = "" - end - end - end - - def unbind - if @lbp_mode == :binary and @lbp_binary_limit > 0 - if respond_to?(:receive_binary_data) - receive_binary_data( @lbp_binary_buffer[0...@lbp_binary_bytes_received] ) - end - end - end - - # Set up to read the supplied number of binary bytes. - # This recycles all the data currently waiting in the line buffer, if any. - # If the limit is nil, then ALL subsequent data will be treated as binary - # data and passed to the upstream protocol handler as we receive it. - # If a limit is given, we'll hold the incoming binary data and not - # pass it upstream until we've seen it all, or until there is an unbind - # (in which case we'll pass up a partial). - # Specifying nil for the limit (the default) means there is no limit. - # Specifiyng zero for the limit will cause an immediate transition back to line mode. - # - def set_binary_mode size = nil - if @lbp_mode == :lines - if size == 0 - receive_binary_data("") if respond_to?(:receive_binary_data) - # Do no more work here. Stay in line mode and keep consuming data. - else - @lbp_binary_limit = size.to_i # (nil will be stored as zero) - if @lbp_binary_limit > 0 - raise "Overlength" if @lbp_binary_limit > MaxBinaryLength # arbitrary sanity check - @lbp_binary_buffer = "\0" * @lbp_binary_limit - @lbp_binary_bytes_received = 0 - end - - @lbp_mode = :binary - receive_data @lpb_buffer.flush - end - else - raise "invalid operation" - end - end - - #-- - # For internal use, establish protocol baseline for handling lines. - def lbp_init_line_state - @lpb_buffer = BufferedTokenizer.new("\n") - @lbp_mode = :lines - end - private :lbp_init_line_state - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/line_protocol.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/line_protocol.rb deleted file mode 100644 index dfddae8c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/line_protocol.rb +++ /dev/null @@ -1,29 +0,0 @@ -module EventMachine - module Protocols - # LineProtocol will parse out newline terminated strings from a receive_data stream - # - # module Server - # include EM::P::LineProtocol - # - # def receive_line(line) - # send_data("you said: #{line}") - # end - # end - # - module LineProtocol - # @private - def receive_data data - (@buf ||= '') << data - - while @buf.slice!(/(.*?)\r?\n/) - receive_line($1) - end - end - - # Invoked with lines received over the network - def receive_line(line) - # stub - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/linetext2.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/linetext2.rb deleted file mode 100644 index 9fdf28bd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/linetext2.rb +++ /dev/null @@ -1,179 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 15 November 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -module EventMachine - module Protocols - # In the grand, time-honored tradition of re-inventing the wheel, we offer - # here YET ANOTHER protocol that handles line-oriented data with interspersed - # binary text. This one trades away some of the performance optimizations of - # EventMachine::Protocols::LineAndTextProtocol in order to get better correctness - # with regard to binary text blocks that can switch back to line mode. It also - # permits the line-delimiter to change in midstream. - # This was originally written to support Stomp. - module LineText2 - # TODO! We're not enforcing the limits on header lengths and text-lengths. - # When we get around to that, call #receive_error if the user defined it, otherwise - # throw exceptions. - - MaxBinaryLength = 32*1024*1024 - - #-- - # Will loop internally until there's no data left to read. - # That way the user-defined handlers we call can modify the - # handling characteristics on a per-token basis. - # - def receive_data data - return unless (data and data.length > 0) - - # Do this stuff in lieu of a constructor. - @lt2_mode ||= :lines - @lt2_delimiter ||= "\n" - @lt2_linebuffer ||= [] - - remaining_data = data - - while remaining_data.length > 0 - if @lt2_mode == :lines - delimiter_string = case @lt2_delimiter - when Regexp - remaining_data.slice(@lt2_delimiter) - else - @lt2_delimiter - end - ix = remaining_data.index(delimiter_string) if delimiter_string - if ix - @lt2_linebuffer << remaining_data[0...ix] - ln = @lt2_linebuffer.join - @lt2_linebuffer.clear - if @lt2_delimiter == "\n" - ln.chomp! - end - receive_line ln - remaining_data = remaining_data[(ix+delimiter_string.length)..-1] - else - @lt2_linebuffer << remaining_data - remaining_data = "" - end - elsif @lt2_mode == :text - if @lt2_textsize - needed = @lt2_textsize - @lt2_textpos - will_take = if remaining_data.length > needed - needed - else - remaining_data.length - end - - @lt2_textbuffer << remaining_data[0...will_take] - tail = remaining_data[will_take..-1] - - @lt2_textpos += will_take - if @lt2_textpos >= @lt2_textsize - # Reset line mode (the default behavior) BEFORE calling the - # receive_binary_data. This makes it possible for user code - # to call set_text_mode, enabling chains of text blocks - # (which can possibly be of different sizes). - set_line_mode - receive_binary_data @lt2_textbuffer.join - receive_end_of_binary_data - end - - remaining_data = tail - else - receive_binary_data remaining_data - remaining_data = "" - end - end - end - end - - # The line delimiter may be a regular expression or a string. Anything - # passed to set_delimiter other than a regular expression will be - # converted to a string. - def set_delimiter delim - @lt2_delimiter = case delim - when Regexp - delim - else - delim.to_s - end - end - - # Called internally but also exposed to user code, for the case in which - # processing of binary data creates a need to transition back to line mode. - # We support an optional parameter to "throw back" some data, which might - # be an umprocessed chunk of the transmitted binary data, or something else - # entirely. - def set_line_mode data="" - @lt2_mode = :lines - (@lt2_linebuffer ||= []).clear - receive_data data.to_s - end - - def set_text_mode size=nil - if size == 0 - set_line_mode - else - @lt2_mode = :text - (@lt2_textbuffer ||= []).clear - @lt2_textsize = size # which can be nil, signifying no limit - @lt2_textpos = 0 - end - end - - # Alias for #set_text_mode, added for back-compatibility with LineAndTextProtocol. - def set_binary_mode size=nil - set_text_mode size - end - - # In case of a dropped connection, we'll send a partial buffer to user code - # when in sized text mode. User overrides of #receive_binary_data need to - # be aware that they may get a short buffer. - def unbind - @lt2_mode ||= nil - if @lt2_mode == :text and @lt2_textpos > 0 - receive_binary_data @lt2_textbuffer.join - end - end - - # Stub. Should be subclassed by user code. - def receive_line ln - # no-op - end - - # Stub. Should be subclassed by user code. - def receive_binary_data data - # no-op - end - - # Stub. Should be subclassed by user code. - # This is called when transitioning internally from text mode - # back to line mode. Useful when client code doesn't want - # to keep track of how much data it's received. - def receive_end_of_binary_data - # no-op - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/memcache.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/memcache.rb deleted file mode 100644 index 1f81aaf9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/memcache.rb +++ /dev/null @@ -1,331 +0,0 @@ -module EventMachine - module Protocols - # Implements the Memcache protocol (http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt). - # Requires memcached >= 1.2.4 w/ noreply support - # - # == Usage example - # - # EM.run{ - # cache = EM::P::Memcache.connect 'localhost', 11211 - # - # cache.set :a, 'hello' - # cache.set :b, 'hi' - # cache.set :c, 'how are you?' - # cache.set :d, '' - # - # cache.get(:a){ |v| p v } - # cache.get_hash(:a, :b, :c, :d){ |v| p v } - # cache.get(:a,:b,:c,:d){ |a,b,c,d| p [a,b,c,d] } - # - # cache.get(:a,:z,:b,:y,:d){ |a,z,b,y,d| p [a,z,b,y,d] } - # - # cache.get(:missing){ |m| p [:missing=, m] } - # cache.set(:missing, 'abc'){ p :stored } - # cache.get(:missing){ |m| p [:missing=, m] } - # cache.del(:missing){ p :deleted } - # cache.get(:missing){ |m| p [:missing=, m] } - # } - # - module Memcache - include EM::Deferrable - - ## - # constants - - unless defined? Cempty - # @private - Cstored = 'STORED'.freeze - # @private - Cend = 'END'.freeze - # @private - Cdeleted = 'DELETED'.freeze - # @private - Cunknown = 'NOT_FOUND'.freeze - # @private - Cerror = 'ERROR'.freeze - - # @private - Cempty = ''.freeze - # @private - Cdelimiter = "\r\n".freeze - end - - ## - # commands - - # Get the value associated with one or multiple keys - # - # cache.get(:a){ |v| p v } - # cache.get(:a,:b,:c,:d){ |a,b,c,d| p [a,b,c,d] } - # - def get *keys - raise ArgumentError unless block_given? - - callback{ - keys = keys.map{|k| k.to_s.gsub(/\s/,'_') } - send_data "get #{keys.join(' ')}\r\n" - @get_cbs << [keys, proc{ |values| - yield *keys.map{ |k| values[k] } - }] - } - end - - # Set the value for a given key - # - # cache.set :a, 'hello' - # cache.set(:missing, 'abc'){ puts "stored the value!" } - # - def set key, val, exptime = 0, &cb - callback{ - val = val.to_s - send_cmd :set, key, 0, exptime, val.respond_to?(:bytesize) ? val.bytesize : val.size, !block_given? - send_data val - send_data Cdelimiter - @set_cbs << cb if cb - } - end - - # Gets multiple values as a hash - # - # cache.get_hash(:a, :b, :c, :d){ |h| puts h[:a] } - # - def get_hash *keys - raise ArgumentError unless block_given? - - get *keys do |*values| - yield keys.inject({}){ |hash, k| hash.update k => values[keys.index(k)] } - end - end - - # Delete the value associated with a key - # - # cache.del :a - # cache.del(:b){ puts "deleted the value!" } - # - def delete key, expires = 0, &cb - callback{ - send_data "delete #{key} #{expires}#{cb ? '' : ' noreply'}\r\n" - @del_cbs << cb if cb - } - end - alias del delete - - # Connect to a memcached server (must support NOREPLY, memcached >= 1.2.4) - def self.connect host = 'localhost', port = 11211 - EM.connect host, port, self, host, port - end - - def send_cmd cmd, key, flags = 0, exptime = 0, bytes = 0, noreply = false - send_data "#{cmd} #{key} #{flags} #{exptime} #{bytes}#{noreply ? ' noreply' : ''}\r\n" - end - private :send_cmd - - ## - # errors - - # @private - class ParserError < StandardError - end - - ## - # em hooks - - # @private - def initialize host, port = 11211 - @host, @port = host, port - end - - # @private - def connection_completed - @get_cbs = [] - @set_cbs = [] - @del_cbs = [] - - @values = {} - - @reconnecting = false - @connected = true - succeed - # set_delimiter "\r\n" - # set_line_mode - end - - #-- - # 19Feb09 Switched to a custom parser, LineText2 is recursive and can cause - # stack overflows when there is too much data. - # include EM::P::LineText2 - # @private - def receive_data data - (@buffer||='') << data - - while index = @buffer.index(Cdelimiter) - begin - line = @buffer.slice!(0,index+2) - process_cmd line - rescue ParserError - @buffer[0...0] = line - break - end - end - end - - #-- - # def receive_line line - # @private - def process_cmd line - case line.strip - when /^VALUE\s+(.+?)\s+(\d+)\s+(\d+)/ # VALUE - bytes = Integer($3) - # set_binary_mode bytes+2 - # @cur_key = $1 - if @buffer.size >= bytes + 2 - @values[$1] = @buffer.slice!(0,bytes) - @buffer.slice!(0,2) # \r\n - else - raise ParserError - end - - when Cend # END - if entry = @get_cbs.shift - keys, cb = entry - cb.call(@values) - end - @values = {} - - when Cstored # STORED - if cb = @set_cbs.shift - cb.call(true) - end - - when Cdeleted # DELETED - if cb = @del_cbs.shift - cb.call(true) - end - - when Cunknown # NOT_FOUND - if cb = @del_cbs.shift - cb.call(false) - end - - else - p [:MEMCACHE_UNKNOWN, line] - end - end - - #-- - # def receive_binary_data data - # @values[@cur_key] = data[0..-3] - # end - - # @private - def unbind - if @connected or @reconnecting - EM.add_timer(1){ reconnect @host, @port } - @connected = false - @reconnecting = true - @deferred_status = nil - else - raise 'Unable to connect to memcached server' - end - end - end - end -end - -if __FILE__ == $0 - # ruby -I ext:lib -r eventmachine -rubygems lib/protocols/memcache.rb - require 'em/spec' - - # @private - class TestConnection - include EM::P::Memcache - def send_data data - sent_data << data - end - def sent_data - @sent_data ||= '' - end - - def initialize - connection_completed - end - end - - EM.describe EM::Protocols::Memcache do - - before{ - @c = TestConnection.new - } - - should 'send get requests' do - @c.get('a'){} - @c.sent_data.should == "get a\r\n" - done - end - - should 'send set requests' do - @c.set('a', 1){} - @c.sent_data.should == "set a 0 0 1\r\n1\r\n" - done - end - - should 'use noreply on set without block' do - @c.set('a', 1) - @c.sent_data.should == "set a 0 0 1 noreply\r\n1\r\n" - done - end - - should 'send delete requests' do - @c.del('a') - @c.sent_data.should == "delete a 0 noreply\r\n" - done - end - - should 'work when get returns no values' do - @c.get('a'){ |a| - a.should.be.nil - done - } - - @c.receive_data "END\r\n" - end - - should 'invoke block on set' do - @c.set('a', 1){ - done - } - - @c.receive_data "STORED\r\n" - end - - should 'invoke block on delete' do - @c.delete('a'){ |found| - found.should.be.false - } - @c.delete('b'){ |found| - found.should.be.true - done - } - - @c.receive_data "NOT_FOUND\r\n" - @c.receive_data "DELETED\r\n" - end - - should 'parse split responses' do - @c.get('a'){ |a| - a.should == 'abc' - done - } - - @c.receive_data "VAL" - @c.receive_data "UE a 0 " - @c.receive_data "3\r\n" - @c.receive_data "ab" - @c.receive_data "c" - @c.receive_data "\r\n" - @c.receive_data "EN" - @c.receive_data "D\r\n" - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/object_protocol.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/object_protocol.rb deleted file mode 100644 index ec79cb4a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/object_protocol.rb +++ /dev/null @@ -1,46 +0,0 @@ -module EventMachine - module Protocols - # ObjectProtocol allows for easy communication using marshaled ruby objects - # - # module RubyServer - # include EM::P::ObjectProtocol - # - # def receive_object obj - # send_object({'you said' => obj}) - # end - # end - # - module ObjectProtocol - # By default returns Marshal, override to return JSON or YAML, or any - # other serializer/deserializer responding to #dump and #load. - def serializer - Marshal - end - - # @private - def receive_data data - (@buf ||= '') << data - - while @buf.size >= 4 - if @buf.size >= 4+(size=@buf.unpack('N').first) - @buf.slice!(0,4) - receive_object serializer.load(@buf.slice!(0,size)) - else - break - end - end - end - - # Invoked with ruby objects received over the network - def receive_object obj - # stub - end - - # Sends a ruby object over the network - def send_object obj - data = serializer.dump(obj) - send_data [data.respond_to?(:bytesize) ? data.bytesize : data.size, data].pack('Na*') - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/postgres3.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/postgres3.rb deleted file mode 100644 index 7d87505c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/postgres3.rb +++ /dev/null @@ -1,246 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 15 November 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-08 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# -# - -require 'postgres-pr/message' -require 'postgres-pr/connection' -require 'stringio' - -# @private -class StringIO - # Reads exactly +n+ bytes. - # - # If the data read is nil an EOFError is raised. - # - # If the data read is too short an IOError is raised - def readbytes(n) - str = read(n) - if str == nil - raise EOFError, "End of file reached" - end - if str.size < n - raise IOError, "data truncated" - end - str - end - alias read_exactly_n_bytes readbytes -end - - -module EventMachine - module Protocols - # PROVISIONAL IMPLEMENTATION of an evented Postgres client. - # This implements version 3 of the Postgres wire protocol, which will work - # with any Postgres version from roughly 7.4 onward. - # - # Objective: we want to access Postgres databases without requiring threads. - # Until now this has been a problem because the Postgres client implementations - # have all made use of blocking I/O calls, which is incompatible with a - # thread-free evented model. - # - # But rather than re-implement the Postgres Wire3 protocol, we're taking advantage - # of the existing postgres-pr library, which was originally written by Michael - # Neumann but (at this writing) appears to be no longer maintained. Still, it's - # in basically a production-ready state, and the wire protocol isn't that complicated - # anyway. - # - # We're tucking in a bunch of require statements that may not be present in garden-variety - # EM installations. Until we find a good way to only require these if a program - # requires postgres, this file will need to be required explicitly. - # - # We need to monkeypatch StringIO because it lacks the #readbytes method needed - # by postgres-pr. - # The StringIO monkeypatch is lifted from the standard library readbytes.rb, - # which adds method #readbytes directly to class IO. But StringIO is not a subclass of IO. - # It is modified to raise an IOError instead of TruncatedDataException since the exception is unused. - # - # We cloned the handling of postgres messages from lib/postgres-pr/connection.rb - # in the postgres-pr library, and modified it for event-handling. - # - # TODO: The password handling in dispatch_conn_message is totally incomplete. - # - # - # We return Deferrables from the user-level operations surfaced by this interface. - # Experimentally, we're using the pattern of always returning a boolean value as the - # first argument of a deferrable callback to indicate success or failure. This is - # instead of the traditional pattern of calling Deferrable#succeed or #fail, and - # requiring the user to define both a callback and an errback function. - # - # === Usage - # EM.run { - # db = EM.connect_unix_domain( "/tmp/.s.PGSQL.5432", EM::P::Postgres3 ) - # db.connect( dbname, username, psw ).callback do |status| - # if status - # db.query( "select * from some_table" ).callback do |status, result, errors| - # if status - # result.rows.each do |row| - # p row - # end - # end - # end - # end - # end - # } - class Postgres3 < EventMachine::Connection - include PostgresPR - - def initialize - @data = "" - @params = {} - end - - def connect db, user, psw=nil - d = EM::DefaultDeferrable.new - d.timeout 15 - - if @pending_query || @pending_conn - d.succeed false, "Operation already in progress" - else - @pending_conn = d - prms = {"user"=>user, "database"=>db} - @user = user - if psw - @password = psw - #prms["password"] = psw - end - send_data PostgresPR::StartupMessage.new( 3 << 16, prms ).dump - end - - d - end - - def query sql - d = EM::DefaultDeferrable.new - d.timeout 15 - - if @pending_query || @pending_conn - d.succeed false, "Operation already in progress" - else - @r = PostgresPR::Connection::Result.new - @e = [] - @pending_query = d - send_data PostgresPR::Query.dump(sql) - end - - d - end - - - def receive_data data - @data << data - while @data.length >= 5 - pktlen = @data[1...5].unpack("N").first - if @data.length >= (1 + pktlen) - pkt = @data.slice!(0...(1+pktlen)) - m = StringIO.open( pkt, "r" ) {|io| PostgresPR::Message.read( io ) } - if @pending_conn - dispatch_conn_message m - elsif @pending_query - dispatch_query_message m - else - raise "Unexpected message from database" - end - else - break # very important, break out of the while - end - end - end - - - def unbind - if o = (@pending_query || @pending_conn) - o.succeed false, "lost connection" - end - end - - # Cloned and modified from the postgres-pr. - def dispatch_conn_message msg - case msg - when AuthentificationClearTextPassword - raise ArgumentError, "no password specified" if @password.nil? - send_data PasswordMessage.new(@password).dump - - when AuthentificationCryptPassword - raise ArgumentError, "no password specified" if @password.nil? - send_data PasswordMessage.new(@password.crypt(msg.salt)).dump - - when AuthentificationMD5Password - raise ArgumentError, "no password specified" if @password.nil? - require 'digest/md5' - - m = Digest::MD5.hexdigest(@password + @user) - m = Digest::MD5.hexdigest(m + msg.salt) - m = 'md5' + m - send_data PasswordMessage.new(m).dump - - when AuthentificationKerberosV4, AuthentificationKerberosV5, AuthentificationSCMCredential - raise "unsupported authentification" - - when AuthentificationOk - when ErrorResponse - raise msg.field_values.join("\t") - when NoticeResponse - @notice_processor.call(msg) if @notice_processor - when ParameterStatus - @params[msg.key] = msg.value - when BackendKeyData - # TODO - #p msg - when ReadyForQuery - # TODO: use transaction status - pc,@pending_conn = @pending_conn,nil - pc.succeed true - else - raise "unhandled message type" - end - end - - # Cloned and modified from the postgres-pr. - def dispatch_query_message msg - case msg - when DataRow - @r.rows << msg.columns - when CommandComplete - @r.cmd_tag = msg.cmd_tag - when ReadyForQuery - pq,@pending_query = @pending_query,nil - pq.succeed true, @r, @e - when RowDescription - @r.fields = msg.fields - when CopyInResponse - when CopyOutResponse - when EmptyQueryResponse - when ErrorResponse - # TODO - @e << msg - when NoticeResponse - @notice_processor.call(msg) if @notice_processor - else - # TODO - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/saslauth.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/saslauth.rb deleted file mode 100644 index 9cabc518..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/saslauth.rb +++ /dev/null @@ -1,175 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 15 November 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# -# - -module EventMachine - module Protocols - - # Implements SASL authd. - # This is a very, very simple protocol that mimics the one used - # by saslauthd and pwcheck, two outboard daemons included in the - # standard SASL library distro. - # The only thing this is really suitable for is SASL PLAIN - # (user+password) authentication, but the SASL libs that are - # linked into standard servers (like imapd and sendmail) implement - # the other ones. - # - # SASL-auth is intended for reasonably fast operation inside a - # single machine, so it has no transport-security (although there - # have been multi-machine extensions incorporating transport-layer - # encryption). - # - # The standard saslauthd module generally runs privileged and does - # its work by referring to the system-account files. - # - # This feature was added to EventMachine to enable the development - # of custom authentication/authorization engines for standard servers. - # - # To use SASLauth, include it in a class that subclasses EM::Connection, - # and reimplement the validate method. - # - # The typical way to incorporate this module into an authentication - # daemon would be to set it as the handler for a UNIX-domain socket. - # The code might look like this: - # - # EM.start_unix_domain_server( "/var/run/saslauthd/mux", MyHandler ) - # File.chmod( 0777, "/var/run/saslauthd/mux") - # - # The chmod is probably needed to ensure that unprivileged clients can - # access the UNIX-domain socket. - # - # It's also a very good idea to drop superuser privileges (if any), after - # the UNIX-domain socket has been opened. - #-- - # Implementation details: assume the client can send us pipelined requests, - # and that the client will close the connection. - # - # The client sends us four values, each encoded as a two-byte length field in - # network order followed by the specified number of octets. - # The fields specify the username, password, service name (such as imap), - # and the "realm" name. We send back the barest minimum reply, a single - # field also encoded as a two-octet length in network order, followed by - # either "NO" or "OK" - simplicity itself. - # - # We enforce a maximum field size just as a sanity check. - # We do NOT automatically time out the connection. - # - # The code we use to parse out the values is ugly and probably slow. - # Improvements welcome. - # - module SASLauth - - MaxFieldSize = 128*1024 - def post_init - super - @sasl_data = "" - @sasl_values = [] - end - - def receive_data data - @sasl_data << data - while @sasl_data.length >= 2 - len = (@sasl_data[0,2].unpack("n")).first - raise "SASL Max Field Length exceeded" if len > MaxFieldSize - if @sasl_data.length >= (len + 2) - @sasl_values << @sasl_data[2,len] - @sasl_data.slice!(0...(2+len)) - if @sasl_values.length == 4 - send_data( validate(*@sasl_values) ? "\0\002OK" : "\0\002NO" ) - @sasl_values.clear - end - else - break - end - end - end - - def validate username, psw, sysname, realm - p username - p psw - p sysname - p realm - true - end - end - - # Implements the SASL authd client protocol. - # This is a very, very simple protocol that mimics the one used - # by saslauthd and pwcheck, two outboard daemons included in the - # standard SASL library distro. - # The only thing this is really suitable for is SASL PLAIN - # (user+password) authentication, but the SASL libs that are - # linked into standard servers (like imapd and sendmail) implement - # the other ones. - # - # You can use this module directly as a handler for EM Connections, - # or include it in a module or handler class of your own. - # - # First connect to a SASL server (it's probably a TCP server, or more - # likely a Unix-domain socket). Then call the #validate? method, - # passing at least a username and a password. #validate? returns - # a Deferrable which will either succeed or fail, depending - # on the status of the authentication operation. - # - module SASLauthclient - MaxFieldSize = 128*1024 - - def validate? username, psw, sysname=nil, realm=nil - - str = [username, psw, sysname, realm].map {|m| - [(m || "").length, (m || "")] - }.flatten.pack( "nA*" * 4 ) - send_data str - - d = EM::DefaultDeferrable.new - @queries.unshift d - d - end - - def post_init - @sasl_data = "" - @queries = [] - end - - def receive_data data - @sasl_data << data - - while @sasl_data.length > 2 - len = (@sasl_data[0,2].unpack("n")).first - raise "SASL Max Field Length exceeded" if len > MaxFieldSize - if @sasl_data.length >= (len + 2) - val = @sasl_data[2,len] - @sasl_data.slice!(0...(2+len)) - q = @queries.pop - (val == "NO") ? q.fail : q.succeed - else - break - end - end - end - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpclient.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpclient.rb deleted file mode 100644 index 25ad17a5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpclient.rb +++ /dev/null @@ -1,394 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 July 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -require 'ostruct' - -module EventMachine - module Protocols - - # Simple SMTP client - # - # @example - # email = EM::Protocols::SmtpClient.send( - # :domain=>"example.com", - # :host=>'localhost', - # :port=>25, # optional, defaults 25 - # :starttls=>true, # use ssl - # :from=>"sender@example.com", - # :to=> ["to_1@example.com", "to_2@example.com"], - # :header=> {"Subject" => "This is a subject line"}, - # :body=> "This is the body of the email" - # ) - # email.callback{ - # puts 'Email sent!' - # } - # email.errback{ |e| - # puts 'Email failed!' - # } - # - # Sending generated emails (using Mail) - # - # mail = Mail.new do - # from 'alice@example.com' - # to 'bob@example.com' - # subject 'This is a test email' - # body 'Hello, world!' - # end - # - # email = EM::P::SmtpClient.send( - # :domain=>'example.com', - # :from=>mail.from.first, - # :to=>mail.to, - # :message=>mail.to_s - # ) - # - class SmtpClient < Connection - include EventMachine::Deferrable - include EventMachine::Protocols::LineText2 - - def initialize - @succeeded = nil - @responder = nil - @code = nil - @msg = nil - end - - # :host => required String - # a string containing the IP address or host name of the SMTP server to connect to. - # :port => optional - # defaults to 25. - # :domain => required String - # This is passed as the argument to the EHLO command. - # :starttls => optional Boolean - # If it evaluates true, then the client will initiate STARTTLS with - # the server, and abort the connection if the negotiation doesn't succeed. - # TODO, need to be able to pass certificate parameters with this option. - # :auth => optional Hash of auth parameters - # If not given, then no auth will be attempted. - # (In that case, the connection will be aborted if the server requires auth.) - # Specify the hash value :type to determine the auth type, along with additional parameters - # depending on the type. - # Currently only :type => :plain is supported. Pass additional parameters :username (String), - # and :password (either a String or a Proc that will be called at auth-time). - # - # @example - # :auth => {:type=>:plain, :username=>"mickey@disney.com", :password=>"mouse"} - # - # :from => required String - # Specifies the sender of the message. Will be passed as the argument - # to the MAIL FROM. Do NOT enclose the argument in angle-bracket (<>) characters. - # The connection will abort if the server rejects the value. - # :to => required String or Array of Strings - # The recipient(s) of the message. Do NOT enclose - # any of the values in angle-brackets (<>) characters. It's NOT a fatal error if one or more - # recipients are rejected by the server. (Of course, if ALL of them are, the server will most - # likely trigger an error when we try to send data.) An array of codes containing the status - # of each requested recipient is available after the call completes. TODO, we should define - # an overridable stub that will be called on rejection of a recipient or a sender, giving - # user code the chance to try again or abort the connection. - # - # One of either :message, :content, or :header and :body is required: - # - # :message => String - # A valid RFC2822 Internet Message. - # :content => String - # Raw data which MUST be in correct SMTP body format, with escaped leading dots and a trailing - # dot line. - # :header => String or Hash of values to be transmitted in the header of the message. - # The hash keys are the names of the headers (do NOT append a trailing colon), and the values - # are strings containing the header values. TODO, support Arrays of header values, which would - # cause us to send that specific header line more than once. - # - # @example - # :header => {"Subject" => "Bogus", "CC" => "myboss@example.com"} - # - # :body => Optional String or Array of Strings, defaults blank. - # This will be passed as the body of the email message. - # TODO, this needs to be significantly beefed up. As currently written, this requires the caller - # to properly format the input into CRLF-delimited lines of 7-bit characters in the standard - # SMTP transmission format. We need to be able to automatically convert binary data, and add - # correct line-breaks to text data. - # - # :verbose => Optional. - # If true, will cause a lot of information (including the server-side of the - # conversation) to be dumped to $>. - # - def self.send args={} - args[:port] ||= 25 - args[:body] ||= "" - -=begin - (I don't think it's possible for EM#connect to throw an exception under normal - circumstances, so this original code is stubbed out. A connect-failure will result - in the #unbind method being called without calling #connection_completed.) - begin - EventMachine.connect( args[:host], args[:port], self) {|c| - # According to the EM docs, we will get here AFTER post_init is called. - c.args = args - c.set_comm_inactivity_timeout 60 - } - rescue - # We'll get here on a connect error. This code mimics the effect - # of a call to invoke_internal_error. Would be great to DRY this up. - # (Actually, it may be that we never get here, if EM#connect catches - # its errors internally.) - d = EM::DefaultDeferrable.new - d.set_deferred_status(:failed, {:error=>[:connect, 500, "unable to connect to server"]}) - d - end -=end - EventMachine.connect( args[:host], args[:port], self) {|c| - # According to the EM docs, we will get here AFTER post_init is called. - c.args = args - c.set_comm_inactivity_timeout 60 - } - end - - attr_writer :args - - # @private - def post_init - @return_values = OpenStruct.new - @return_values.start_time = Time.now - end - - # @private - def connection_completed - @responder = :receive_signon - @msg = [] - end - - # We can get here in a variety of ways, all of them being failures unless - # the @succeeded flag is set. If a protocol success was recorded, then don't - # set a deferred success because the caller will already have done it - # (no need to wait until the connection closes to invoke the callbacks). - # - # @private - def unbind - unless @succeeded - @return_values.elapsed_time = Time.now - @return_values.start_time - @return_values.responder = @responder - @return_values.code = @code - @return_values.message = @msg - set_deferred_status(:failed, @return_values) - end - end - - # @private - def receive_line ln - $>.puts ln if @args[:verbose] - @range = ln[0...1].to_i - @code = ln[0...3].to_i - @msg << ln[4..-1] - unless ln[3...4] == '-' - $>.puts @responder if @args[:verbose] - send @responder - @msg.clear - end - end - - private - - # We encountered an error from the server and will close the connection. - # Use the error and message the server returned. - # - def invoke_error - @return_values.elapsed_time = Time.now - @return_values.start_time - @return_values.responder = @responder - @return_values.code = @code - @return_values.message = @msg - set_deferred_status :failed, @return_values - send_data "QUIT\r\n" - close_connection_after_writing - end - - # We encountered an error on our side of the protocol and will close the connection. - # Use an extra-protocol error code (900) and use the message from the caller. - # - def invoke_internal_error msg = "???" - @return_values.elapsed_time = Time.now - @return_values.start_time - @return_values.responder = @responder - @return_values.code = 900 - @return_values.message = msg - set_deferred_status :failed, @return_values - send_data "QUIT\r\n" - close_connection_after_writing - end - - def send_ehlo - send_data "EHLO #{@args[:domain]}\r\n" - end - - def receive_signon - return invoke_error unless @range == 2 - send_ehlo - @responder = :receive_ehlo_response - end - def receive_ehlo_response - return invoke_error unless @range == 2 - @server_caps = @msg - invoke_starttls - end - - def invoke_starttls - if @args[:starttls] - # It would be more sociable to first ask if @server_caps contains - # the string "STARTTLS" before we invoke it, but hey, life's too short. - send_data "STARTTLS\r\n" - @responder = :receive_starttls_response - else - invoke_auth - end - end - def receive_starttls_response - return invoke_error unless @range == 2 - start_tls - invoke_ehlo_over_tls - end - - def invoke_ehlo_over_tls - send_ehlo - @responder = :receive_ehlo_over_tls_response - end - def receive_ehlo_over_tls_response - return invoke_error unless @range == 2 - invoke_auth - end - - # Perform an authentication. If the caller didn't request one, then fall through - # to the mail-from state. - def invoke_auth - if @args[:auth] - if @args[:auth][:type] == :plain - psw = @args[:auth][:password] - if psw.respond_to?(:call) - psw = psw.call - end - #str = Base64::encode64("\0#{@args[:auth][:username]}\0#{psw}").chomp - str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").gsub(/\n/, '') - send_data "AUTH PLAIN #{str}\r\n" - @responder = :receive_auth_response - else - return invoke_internal_error("unsupported auth type") - end - else - invoke_mail_from - end - end - def receive_auth_response - return invoke_error unless @range == 2 - invoke_mail_from - end - - def invoke_mail_from - send_data "MAIL FROM: <#{@args[:from]}>\r\n" - @responder = :receive_mail_from_response - end - def receive_mail_from_response - return invoke_error unless @range == 2 - invoke_rcpt_to - end - - def invoke_rcpt_to - @rcpt_responses ||= [] - l = @rcpt_responses.length - to = @args[:to].is_a?(Array) ? @args[:to] : [@args[:to].to_s] - if l < to.length - send_data "RCPT TO: <#{to[l]}>\r\n" - @responder = :receive_rcpt_to_response - else - e = @rcpt_responses.select {|rr| rr.last == 2} - if e and e.length > 0 - invoke_data - else - invoke_error - end - end - end - def receive_rcpt_to_response - @rcpt_responses << [@code, @msg, @range] - invoke_rcpt_to - end - - def escape_leading_dots(s) - s.gsub(/^\./, '..') - end - - def invoke_data - send_data "DATA\r\n" - @responder = :receive_data_response - end - def receive_data_response - return invoke_error unless @range == 3 - - # The data to send can be given in either @args[:message], @args[:content], or the - # combination of @args[:header] and @args[:body]. - # - # - @args[:message] (String) MUST be a valid RFC2822 Internet Message - # - # - @args[:content] (String) MUST be in correct SMTP body format, with escaped - # leading dots and a trailing dot line - # - # - @args[:header] (Hash or String) - # - @args[:body] (Array or String) - if @args[:message] - send_data escape_leading_dots(@args[:message].to_s) - send_data "\r\n.\r\n" - elsif @args[:content] - send_data @args[:content].to_s - else - # The header can be a hash or an array. - if @args[:header].is_a?(Hash) - (@args[:header] || {}).each {|k,v| send_data escape_leading_dots("#{k}: #{v}\r\n") } - else - send_data escape_leading_dots(@args[:header].to_s) - end - send_data "\r\n" - - if @args[:body].is_a?(Array) - @args[:body].each {|e| send_data escape_leading_dots(e)} - else - send_data escape_leading_dots(@args[:body].to_s) - end - - send_data "\r\n.\r\n" - end - - @responder = :receive_message_response - end - def receive_message_response - return invoke_error unless @range == 2 - send_data "QUIT\r\n" - close_connection_after_writing - @succeeded = true - @return_values.elapsed_time = Time.now - @return_values.start_time - @return_values.responder = @responder - @return_values.code = @code - @return_values.message = @msg - set_deferred_status :succeeded, @return_values - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpserver.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpserver.rb deleted file mode 100644 index e0f1f05d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpserver.rb +++ /dev/null @@ -1,666 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 July 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -module EventMachine - module Protocols - - # This is a protocol handler for the server side of SMTP. - # It's NOT a complete SMTP server obeying all the semantics of servers conforming to - # RFC2821. Rather, it uses overridable method stubs to communicate protocol states - # and data to user code. User code is responsible for doing the right things with the - # data in order to get complete and correct SMTP server behavior. - # - # Simple SMTP server example: - # - # class EmailServer < EM::P::SmtpServer - # def receive_plain_auth(user, pass) - # true - # end - # - # def get_server_domain - # "mock.smtp.server.local" - # end - # - # def get_server_greeting - # "mock smtp server greets you with impunity" - # end - # - # def receive_sender(sender) - # current.sender = sender - # true - # end - # - # def receive_recipient(recipient) - # current.recipient = recipient - # true - # end - # - # def receive_message - # current.received = true - # current.completed_at = Time.now - # - # p [:received_email, current] - # @current = OpenStruct.new - # true - # end - # - # def receive_ehlo_domain(domain) - # @ehlo_domain = domain - # true - # end - # - # def receive_data_command - # current.data = "" - # true - # end - # - # def receive_data_chunk(data) - # current.data << data.join("\n") - # true - # end - # - # def receive_transaction - # if @ehlo_domain - # current.ehlo_domain = @ehlo_domain - # @ehlo_domain = nil - # end - # true - # end - # - # def current - # @current ||= OpenStruct.new - # end - # - # def self.start(host = 'localhost', port = 1025) - # require 'ostruct' - # @server = EM.start_server host, port, self - # end - # - # def self.stop - # if @server - # EM.stop_server @server - # @server = nil - # end - # end - # - # def self.running? - # !!@server - # end - # end - # - # EM.run{ EmailServer.start } - # - #-- - # Useful paragraphs in RFC-2821: - # 4.3.2: Concise list of command-reply sequences, in essence a text representation - # of the command state-machine. - # - # STARTTLS is defined in RFC2487. - # Observe that there are important rules governing whether a publicly-referenced server - # (meaning one whose Internet address appears in public MX records) may require the - # non-optional use of TLS. - # Non-optional TLS does not apply to EHLO, NOOP, QUIT or STARTTLS. - class SmtpServer < EventMachine::Connection - include Protocols::LineText2 - - HeloRegex = /\AHELO\s*/i - EhloRegex = /\AEHLO\s*/i - QuitRegex = /\AQUIT/i - MailFromRegex = /\AMAIL FROM:\s*/i - RcptToRegex = /\ARCPT TO:\s*/i - DataRegex = /\ADATA/i - NoopRegex = /\ANOOP/i - RsetRegex = /\ARSET/i - VrfyRegex = /\AVRFY\s+/i - ExpnRegex = /\AEXPN\s+/i - HelpRegex = /\AHELP/i - StarttlsRegex = /\ASTARTTLS/i - AuthRegex = /\AAUTH\s+/i - - - # Class variable containing default parameters that can be overridden - # in application code. - # Individual objects of this class will make an instance-local copy of - # the class variable, so that they can be reconfigured on a per-instance - # basis. - # - # Chunksize is the number of data lines we'll buffer before - # sending them to the application. TODO, make this user-configurable. - # - @@parms = { - :chunksize => 4000, - :verbose => false - } - def self.parms= parms={} - @@parms.merge!(parms) - end - - - - def initialize *args - super - @parms = @@parms - init_protocol_state - end - - def parms= parms={} - @parms.merge!(parms) - end - - # In SMTP, the server talks first. But by a (perhaps flawed) axiom in EM, - # #post_init will execute BEFORE the block passed to #start_server, for any - # given accepted connection. Since in this class we'll probably be getting - # a lot of initialization parameters, we want the guts of post_init to - # run AFTER the application has initialized the connection object. So we - # use a spawn to schedule the post_init to run later. - # It's a little weird, I admit. A reasonable alternative would be to set - # parameters as a class variable and to do that before accepting any connections. - # - # OBSOLETE, now we have @@parms. But the spawn is nice to keep as an illustration. - # - def post_init - #send_data "220 #{get_server_greeting}\r\n" (ORIGINAL) - #(EM.spawn {|x| x.send_data "220 #{x.get_server_greeting}\r\n"}).notify(self) - (EM.spawn {|x| x.send_server_greeting}).notify(self) - end - - def send_server_greeting - send_data "220 #{get_server_greeting}\r\n" - end - - def receive_line ln - @@parms[:verbose] and $>.puts ">>> #{ln}" - - return process_data_line(ln) if @state.include?(:data) - return process_auth_line(ln) if @state.include?(:auth_incomplete) - - case ln - when EhloRegex - process_ehlo $'.dup - when HeloRegex - process_helo $'.dup - when MailFromRegex - process_mail_from $'.dup - when RcptToRegex - process_rcpt_to $'.dup - when DataRegex - process_data - when RsetRegex - process_rset - when VrfyRegex - process_vrfy - when ExpnRegex - process_expn - when HelpRegex - process_help - when NoopRegex - process_noop - when QuitRegex - process_quit - when StarttlsRegex - process_starttls - when AuthRegex - process_auth $'.dup - else - process_unknown - end - end - - # TODO - implement this properly, the implementation is a stub! - def process_help - send_data "250 Ok, but unimplemented\r\n" - end - - # RFC2821, 3.5.3 Meaning of VRFY or EXPN Success Response: - # A server MUST NOT return a 250 code in response to a VRFY or EXPN - # command unless it has actually verified the address. In particular, - # a server MUST NOT return 250 if all it has done is to verify that the - # syntax given is valid. In that case, 502 (Command not implemented) - # or 500 (Syntax error, command unrecognized) SHOULD be returned. - # - # TODO - implement this properly, the implementation is a stub! - def process_vrfy - send_data "502 Command not implemented\r\n" - end - # TODO - implement this properly, the implementation is a stub! - def process_expn - send_data "502 Command not implemented\r\n" - end - - #-- - # This is called at several points to restore the protocol state - # to a pre-transaction state. In essence, we "forget" having seen - # any valid command except EHLO and STARTTLS. - # We also have to callback user code, in case they're keeping track - # of senders, recipients, and whatnot. - # - # We try to follow the convention of avoiding the verb "receive" for - # internal method names except receive_line (which we inherit), and - # using only receive_xxx for user-overridable stubs. - # - # init_protocol_state is called when we initialize the connection as - # well as during reset_protocol_state. It does NOT call the user - # override method. This enables us to promise the users that they - # won't see the overridable fire except after EHLO and RSET, and - # after a message has been received. Although the latter may be wrong. - # The standard may allow multiple DATA segments with the same set of - # senders and recipients. - # - def reset_protocol_state - init_protocol_state - s,@state = @state,[] - @state << :starttls if s.include?(:starttls) - @state << :ehlo if s.include?(:ehlo) - receive_transaction - end - def init_protocol_state - @state ||= [] - end - - - #-- - # EHLO/HELO is always legal, per the standard. On success - # it always clears buffers and initiates a mail "transaction." - # Which means that a MAIL FROM must follow. - # - # Per the standard, an EHLO/HELO or a RSET "initiates" an email - # transaction. Thereafter, MAIL FROM must be received before - # RCPT TO, before DATA. Not sure what this specific ordering - # achieves semantically, but it does make it easier to - # implement. We also support user-specified requirements for - # STARTTLS and AUTH. We make it impossible to proceed to MAIL FROM - # without fulfilling tls and/or auth, if the user specified either - # or both as required. We need to check the extension standard - # for auth to see if a credential is discarded after a RSET along - # with all the rest of the state. We'll behave as if it is. - # Now clearly, we can't discard tls after its been negotiated - # without dropping the connection, so that flag doesn't get cleared. - # - def process_ehlo domain - if receive_ehlo_domain domain - send_data "250-#{get_server_domain}\r\n" - if @@parms[:starttls] - send_data "250-STARTTLS\r\n" - end - if @@parms[:auth] - send_data "250-AUTH PLAIN\r\n" - end - send_data "250-NO-SOLICITING\r\n" - # TODO, size needs to be configurable. - send_data "250 SIZE 20000000\r\n" - reset_protocol_state - @state << :ehlo - else - send_data "550 Requested action not taken\r\n" - end - end - - def process_helo domain - if receive_ehlo_domain domain.dup - send_data "250 #{get_server_domain}\r\n" - reset_protocol_state - @state << :ehlo - else - send_data "550 Requested action not taken\r\n" - end - end - - def process_quit - send_data "221 Ok\r\n" - close_connection_after_writing - end - - def process_noop - send_data "250 Ok\r\n" - end - - def process_unknown - send_data "500 Unknown command\r\n" - end - - #-- - # So far, only AUTH PLAIN is supported but we should do at least LOGIN as well. - # TODO, support clients that send AUTH PLAIN with no parameter, expecting a 3xx - # response and a continuation of the auth conversation. - # - def process_auth str - if @state.include?(:auth) - send_data "503 auth already issued\r\n" - elsif str =~ /\APLAIN\s?/i - if $'.length == 0 - # we got a partial response, so let the client know to send the rest - @state << :auth_incomplete - send_data("334 \r\n") - else - # we got the initial response, so go ahead & process it - process_auth_line($') - end - #elsif str =~ /\ALOGIN\s+/i - else - send_data "504 auth mechanism not available\r\n" - end - end - - def process_auth_line(line) - plain = line.unpack("m").first - _,user,psw = plain.split("\000") - - succeeded = proc { - send_data "235 authentication ok\r\n" - @state << :auth - } - failed = proc { - send_data "535 invalid authentication\r\n" - } - auth = receive_plain_auth user,psw - - if auth.respond_to?(:callback) - auth.callback(&succeeded) - auth.errback(&failed) - else - (auth ? succeeded : failed).call - end - - @state.delete :auth_incomplete - end - - #-- - # Unusually, we can deal with a Deferrable returned from the user application. - # This was added to deal with a special case in a particular application, but - # it would be a nice idea to add it to the other user-code callbacks. - # - def process_data - unless @state.include?(:rcpt) - send_data "503 Operation sequence error\r\n" - else - succeeded = proc { - send_data "354 Send it\r\n" - @state << :data - @databuffer = [] - } - failed = proc { - send_data "550 Operation failed\r\n" - } - - d = receive_data_command - - if d.respond_to?(:callback) - d.callback(&succeeded) - d.errback(&failed) - else - (d ? succeeded : failed).call - end - end - end - - def process_rset - reset_protocol_state - receive_reset - send_data "250 Ok\r\n" - end - - def unbind - connection_ended - end - - #-- - # STARTTLS may not be issued before EHLO, or unless the user has chosen - # to support it. - # - # If :starttls_options is present and :starttls is set in the parms - # pass the options in :starttls_options to start_tls. Do this if you want to use - # your own certificate - # e.g. {:cert_chain_file => "/etc/ssl/cert.pem", :private_key_file => "/etc/ssl/private/cert.key"} - - def process_starttls - if @@parms[:starttls] - if @state.include?(:starttls) - send_data "503 TLS Already negotiated\r\n" - elsif ! @state.include?(:ehlo) - send_data "503 EHLO required before STARTTLS\r\n" - else - send_data "220 Start TLS negotiation\r\n" - start_tls(@@parms[:starttls_options] || {}) - @state << :starttls - end - else - process_unknown - end - end - - - #-- - # Requiring TLS is touchy, cf RFC2784. - # Requiring AUTH seems to be much more reasonable. - # We don't currently support any notion of deriving an authentication from the TLS - # negotiation, although that would certainly be reasonable. - # We DON'T allow MAIL FROM to be given twice. - # We DON'T enforce all the various rules for validating the sender or - # the reverse-path (like whether it should be null), and notifying the reverse - # path in case of delivery problems. All of that is left to the calling application. - # - def process_mail_from sender - if (@@parms[:starttls]==:required and !@state.include?(:starttls)) - send_data "550 This server requires STARTTLS before MAIL FROM\r\n" - elsif (@@parms[:auth]==:required and !@state.include?(:auth)) - send_data "550 This server requires authentication before MAIL FROM\r\n" - elsif @state.include?(:mail_from) - send_data "503 MAIL already given\r\n" - else - unless receive_sender sender - send_data "550 sender is unacceptable\r\n" - else - send_data "250 Ok\r\n" - @state << :mail_from - end - end - end - - #-- - # Since we require :mail_from to have been seen before we process RCPT TO, - # we don't need to repeat the tests for TLS and AUTH. - # Note that we don't remember or do anything else with the recipients. - # All of that is on the user code. - # TODO: we should enforce user-definable limits on the total number of - # recipients per transaction. - # We might want to make sure that a given recipient is only seen once, but - # for now we'll let that be the user's problem. - # - # User-written code can return a deferrable from receive_recipient. - # - def process_rcpt_to rcpt - unless @state.include?(:mail_from) - send_data "503 MAIL is required before RCPT\r\n" - else - succeeded = proc { - send_data "250 Ok\r\n" - @state << :rcpt unless @state.include?(:rcpt) - } - failed = proc { - send_data "550 recipient is unacceptable\r\n" - } - - d = receive_recipient rcpt - - if d.respond_to?(:set_deferred_status) - d.callback(&succeeded) - d.errback(&failed) - else - (d ? succeeded : failed).call - end - -=begin - unless receive_recipient rcpt - send_data "550 recipient is unacceptable\r\n" - else - send_data "250 Ok\r\n" - @state << :rcpt unless @state.include?(:rcpt) - end -=end - end - end - - - # Send the incoming data to the application one chunk at a time, rather than - # one line at a time. That lets the application be a little more flexible about - # storing to disk, etc. - # Since we clear the chunk array every time we submit it, the caller needs to be - # aware to do things like dup it if he wants to keep it around across calls. - # - # Resets the transaction upon disposition of the incoming message. - # RFC5321 says this about the MAIL FROM command: - # "This command tells the SMTP-receiver that a new mail transaction is - # starting and to reset all its state tables and buffers, including any - # recipients or mail data." - # - # Equivalent behaviour is implemented by resetting after a completed transaction. - # - # User-written code can return a Deferrable as a response from receive_message. - # - def process_data_line ln - if ln == "." - if @databuffer.length > 0 - receive_data_chunk @databuffer - @databuffer.clear - end - - - succeeded = proc { - send_data "250 Message accepted\r\n" - reset_protocol_state - } - failed = proc { - send_data "550 Message rejected\r\n" - reset_protocol_state - } - d = receive_message - - if d.respond_to?(:set_deferred_status) - d.callback(&succeeded) - d.errback(&failed) - else - (d ? succeeded : failed).call - end - - @state.delete :data - else - # slice off leading . if any - ln.slice!(0...1) if ln[0] == ?. - @databuffer << ln - if @databuffer.length > @@parms[:chunksize] - receive_data_chunk @databuffer - @databuffer.clear - end - end - end - - - #------------------------------------------ - # Everything from here on can be overridden in user code. - - # The greeting returned in the initial connection message to the client. - def get_server_greeting - "EventMachine SMTP Server" - end - # The domain name returned in the first line of the response to a - # successful EHLO or HELO command. - def get_server_domain - "Ok EventMachine SMTP Server" - end - - # A false response from this user-overridable method will cause a - # 550 error to be returned to the remote client. - # - def receive_ehlo_domain domain - true - end - - # Return true or false to indicate that the authentication is acceptable. - def receive_plain_auth user, password - true - end - - # Receives the argument of the MAIL FROM command. Return false to - # indicate to the remote client that the sender is not accepted. - # This can only be successfully called once per transaction. - # - def receive_sender sender - true - end - - # Receives the argument of a RCPT TO command. Can be given multiple - # times per transaction. Return false to reject the recipient. - # - def receive_recipient rcpt - true - end - - # Sent when the remote peer issues the RSET command. - # Since RSET is not allowed to fail (according to the protocol), - # we ignore any return value from user overrides of this method. - # - def receive_reset - end - - # Sent when the remote peer has ended the connection. - # - def connection_ended - end - - # Called when the remote peer sends the DATA command. - # Returning false will cause us to send a 550 error to the peer. - # This can be useful for dealing with problems that arise from processing - # the whole set of sender and recipients. - # - def receive_data_command - true - end - - # Sent when data from the remote peer is available. The size can be controlled - # by setting the :chunksize parameter. This call can be made multiple times. - # The goal is to strike a balance between sending the data to the application one - # line at a time, and holding all of a very large message in memory. - # - def receive_data_chunk data - @smtps_msg_size ||= 0 - @smtps_msg_size += data.join.length - STDERR.write "<#{@smtps_msg_size}>" - end - - # Sent after a message has been completely received. User code - # must return true or false to indicate whether the message has - # been accepted for delivery. - def receive_message - @@parms[:verbose] and $>.puts "Received complete message" - true - end - - # This is called when the protocol state is reset. It happens - # when the remote client calls EHLO/HELO or RSET. - def receive_transaction - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/socks4.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/socks4.rb deleted file mode 100644 index 132f3209..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/socks4.rb +++ /dev/null @@ -1,66 +0,0 @@ -module EventMachine - module Protocols - # Basic SOCKS v4 client implementation - # - # Use as you would any regular connection: - # - # class MyConn < EM::P::Socks4 - # def post_init - # send_data("sup") - # end - # - # def receive_data(data) - # send_data("you said: #{data}") - # end - # end - # - # EM.connect socks_host, socks_port, MyConn, host, port - # - class Socks4 < Connection - def initialize(host, port) - @host = Socket.gethostbyname(host).last - @port = port - @socks_error_code = nil - @buffer = '' - setup_methods - end - - def setup_methods - class << self - def post_init; socks_post_init; end - def receive_data(*a); socks_receive_data(*a); end - end - end - - def restore_methods - class << self - remove_method :post_init - remove_method :receive_data - end - end - - def socks_post_init - header = [4, 1, @port, @host, 0].flatten.pack("CCnA4C") - send_data(header) - end - - def socks_receive_data(data) - @buffer << data - return if @buffer.size < 8 - - header_resp = @buffer.slice! 0, 8 - _, r = header_resp.unpack("cc") - if r != 90 - @socks_error_code = r - close_connection - return - end - - restore_methods - - post_init - receive_data(@buffer) unless @buffer.empty? - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/stomp.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/stomp.rb deleted file mode 100644 index ca6f078e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/stomp.rb +++ /dev/null @@ -1,205 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 15 November 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# -# - -module EventMachine - module Protocols - - # Implements Stomp (http://docs.codehaus.org/display/STOMP/Protocol). - # - # == Usage example - # - # module StompClient - # include EM::Protocols::Stomp - # - # def connection_completed - # connect :login => 'guest', :passcode => 'guest' - # end - # - # def receive_msg msg - # if msg.command == "CONNECTED" - # subscribe '/some/topic' - # else - # p ['got a message', msg] - # puts msg.body - # end - # end - # end - # - # EM.run{ - # EM.connect 'localhost', 61613, StompClient - # } - # - module Stomp - include LineText2 - - class Message - # The command associated with the message, usually 'CONNECTED' or 'MESSAGE' - attr_accessor :command - # Hash containing headers such as destination and message-id - attr_accessor :header - alias :headers :header - # Body of the message - attr_accessor :body - - # @private - def initialize - @header = {} - @state = :precommand - @content_length = nil - end - # @private - def consume_line line - if @state == :precommand - unless line =~ /\A\s*\Z/ - @command = line - @state = :headers - end - elsif @state == :headers - if line == "" - if @content_length - yield( [:sized_text, @content_length+1] ) - else - @state = :body - yield( [:unsized_text] ) - end - elsif line =~ /\A([^:]+):(.+)\Z/ - k = $1.dup.strip - v = $2.dup.strip - @header[k] = v - if k == "content-length" - @content_length = v.to_i - end - else - # This is a protocol error. How to signal it? - end - elsif @state == :body - @body = line - yield( [:dispatch] ) - end - end - end - - # @private - def send_frame verb, headers={}, body="" - body = body.to_s - ary = [verb, "\n"] - body_bytesize = body.bytesize if body.respond_to? :bytesize - body_bytesize ||= body.size - headers.each {|k,v| ary << "#{k}:#{v}\n" } - ary << "content-length: #{body_bytesize}\n" - ary << "content-type: text/plain; charset=UTF-8\n" unless headers.has_key? 'content-type' - ary << "\n" - ary << body - ary << "\0" - send_data ary.join - end - - # @private - def receive_line line - @stomp_initialized || init_message_reader - @stomp_message.consume_line(line) {|outcome| - if outcome.first == :sized_text - set_text_mode outcome[1] - elsif outcome.first == :unsized_text - set_delimiter "\0" - elsif outcome.first == :dispatch - receive_msg(@stomp_message) if respond_to?(:receive_msg) - init_message_reader - end - } - end - - # @private - def receive_binary_data data - @stomp_message.body = data[0..-2] - receive_msg(@stomp_message) if respond_to?(:receive_msg) - init_message_reader - end - - # @private - def init_message_reader - @stomp_initialized = true - set_delimiter "\n" - set_line_mode - @stomp_message = Message.new - end - - # Invoked with an incoming Stomp::Message received from the STOMP server - def receive_msg msg - # stub, overwrite this in your handler - end - - # CONNECT command, for authentication - # - # connect :login => 'guest', :passcode => 'guest' - # - def connect parms={} - send_frame "CONNECT", parms - end - - # SEND command, for publishing messages to a topic - # - # send '/topic/name', 'some message here' - # - def send destination, body, parms={} - send_frame "SEND", parms.merge( :destination=>destination ), body.to_s - end - - # SUBSCRIBE command, for subscribing to topics - # - # subscribe '/topic/name', false - # - def subscribe dest, ack=false - send_frame "SUBSCRIBE", {:destination=>dest, :ack=>(ack ? "client" : "auto")} - end - - # ACK command, for acknowledging receipt of messages - # - # module StompClient - # include EM::P::Stomp - # - # def connection_completed - # connect :login => 'guest', :passcode => 'guest' - # # subscribe with ack mode - # subscribe '/some/topic', true - # end - # - # def receive_msg msg - # if msg.command == "MESSAGE" - # ack msg.headers['message-id'] - # puts msg.body - # end - # end - # end - # - def ack msgid - send_frame "ACK", 'message-id'=> msgid - end - - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/tcptest.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/tcptest.rb deleted file mode 100644 index 31878930..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/protocols/tcptest.rb +++ /dev/null @@ -1,54 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 16 July 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# -# - -module EventMachine - module Protocols - - # @private - class TcpConnectTester < Connection - include EventMachine::Deferrable - - def self.test( host, port ) - EventMachine.connect( host, port, self ) - end - - def post_init - @start_time = Time.now - end - - def connection_completed - @completed = true - set_deferred_status :succeeded, (Time.now - @start_time) - close_connection - end - - def unbind - set_deferred_status :failed, (Time.now - @start_time) unless @completed - end - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb deleted file mode 100644 index 94fd1754..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb +++ /dev/null @@ -1,1284 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 8 Apr 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#------------------------------------------------------------------- -# -# - -# TODO List: -# TCP-connects currently assume non-blocking connect is available- need to -# degrade automatically on versions of Ruby prior to June 2006. -# - -require 'singleton' -require 'forwardable' -require 'socket' -require 'fcntl' -require 'set' -require 'openssl' - -module EventMachine - # @private - class Error < Exception; end - # @private - class UnknownTimerFired < RuntimeError; end - # @private - class Unsupported < RuntimeError; end - # @private - class ConnectionError < RuntimeError; end - # @private - class ConnectionNotBound < RuntimeError; end - - # Older versions of Ruby may not provide the SSLErrorWaitReadable - # OpenSSL class. Create an error class to act as a "proxy". - if defined?(OpenSSL::SSL::SSLErrorWaitReadable) - SSLConnectionWaitReadable = OpenSSL::SSL::SSLErrorWaitReadable - else - SSLConnectionWaitReadable = IO::WaitReadable - end - - # Older versions of Ruby may not provide the SSLErrorWaitWritable - # OpenSSL class. Create an error class to act as a "proxy". - if defined?(OpenSSL::SSL::SSLErrorWaitWritable) - SSLConnectionWaitWritable = OpenSSL::SSL::SSLErrorWaitWritable - else - SSLConnectionWaitWritable = IO::WaitWritable - end -end - -module EventMachine - class CertificateCreator - attr_reader :cert, :key - - def initialize - @key = OpenSSL::PKey::RSA.new(1024) - public_key = @key.public_key - subject = "/C=EventMachine/O=EventMachine/OU=EventMachine/CN=EventMachine" - @cert = OpenSSL::X509::Certificate.new - @cert.subject = @cert.issuer = OpenSSL::X509::Name.parse(subject) - @cert.not_before = Time.now - @cert.not_after = Time.now + 365 * 24 * 60 * 60 - @cert.public_key = public_key - @cert.serial = 0x0 - @cert.version = 2 - factory = OpenSSL::X509::ExtensionFactory.new - factory.subject_certificate = @cert - factory.issuer_certificate = @cert - @cert.extensions = [ - factory.create_extension("basicConstraints","CA:TRUE", true), - factory.create_extension("subjectKeyIdentifier", "hash") - ] - @cert.add_extension factory.create_extension("authorityKeyIdentifier", "keyid:always,issuer:always") - @cert.sign(@key, OpenSSL::Digest::SHA1.new) - end - end - - # @private - DefaultCertificate = CertificateCreator.new - - # @private - DefaultDHKey1024 = OpenSSL::PKey::DH.new <<-_end_of_pem_ ------BEGIN DH PARAMETERS----- -MIGHAoGBAJ0lOVy0VIr/JebWn0zDwY2h+rqITFOpdNr6ugsgvkDXuucdcChhYExJ -AV/ZD2AWPbrTqV76mGRgJg4EddgT1zG0jq3rnFdMj2XzkBYx3BVvfR0Arnby0RHR -T4h7KZ/2zmjvV+eF8kBUHBJAojUlzxKj4QeO2x20FP9X5xmNUXeDAgEC ------END DH PARAMETERS----- - _end_of_pem_ - - # @private - DefaultDHKey2048 = OpenSSL::PKey::DH.new <<-_end_of_pem_ ------BEGIN DH PARAMETERS----- -MIIBCAKCAQEA7E6kBrYiyvmKAMzQ7i8WvwVk9Y/+f8S7sCTN712KkK3cqd1jhJDY -JbrYeNV3kUIKhPxWHhObHKpD1R84UpL+s2b55+iMd6GmL7OYmNIT/FccKhTcveab -VBmZT86BZKYyf45hUF9FOuUM9xPzuK3Vd8oJQvfYMCd7LPC0taAEljQLR4Edf8E6 -YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3 -1bNveX5wInh5GDx1FGhKBZ+s1H+aedudCm7sCgRwv8lKWYGiHzObSma8A86KG+MD -7Lo5JquQ3DlBodj3IDyPrxIv96lvRPFtAwIBAg== ------END DH PARAMETERS----- - _end_of_pem_ -end - -# @private -module EventMachine - class << self - # This is mostly useful for automated tests. - # Return a distinctive symbol so the caller knows whether he's dealing - # with an extension or with a pure-Ruby library. - # @private - def library_type - :pure_ruby - end - - # @private - def initialize_event_machine - Reactor.instance.initialize_for_run - end - - # Changed 04Oct06: intervals from the caller are now in milliseconds, but our native-ruby - # processor still wants them in seconds. - # @private - def add_oneshot_timer interval - Reactor.instance.install_oneshot_timer(interval / 1000) - end - - # @private - def run_machine - Reactor.instance.run - end - - # @private - def release_machine - end - - - def stopping? - return Reactor.instance.stop_scheduled - end - - # @private - def stop - Reactor.instance.stop - end - - # @private - def connect_server host, port - bind_connect_server nil, nil, host, port - end - - # @private - def bind_connect_server bind_addr, bind_port, host, port - EvmaTCPClient.connect(bind_addr, bind_port, host, port).uuid - end - - # @private - def send_data target, data, datalength - selectable = Reactor.instance.get_selectable( target ) or raise "unknown send_data target" - selectable.send_data data - end - - # @private - def close_connection target, after_writing - selectable = Reactor.instance.get_selectable( target ) - selectable.schedule_close after_writing if selectable - end - - # @private - def start_tcp_server host, port - (s = EvmaTCPServer.start_server host, port) or raise "no acceptor" - s.uuid - end - - # @private - def stop_tcp_server sig - s = Reactor.instance.get_selectable(sig) - s.schedule_close - end - - # @private - def start_unix_server chain - (s = EvmaUNIXServer.start_server chain) or raise "no acceptor" - s.uuid - end - - # @private - def connect_unix_server chain - EvmaUNIXClient.connect(chain).uuid - end - - # @private - def signal_loopbreak - Reactor.instance.signal_loopbreak - end - - # @private - def get_peername sig - selectable = Reactor.instance.get_selectable( sig ) or raise "unknown get_peername target" - selectable.get_peername - end - - # @private - def get_sockname sig - selectable = Reactor.instance.get_selectable( sig ) or raise "unknown get_sockname target" - selectable.get_sockname - end - - # @private - def open_udp_socket host, port - EvmaUDPSocket.create(host, port).uuid - end - - # This is currently only for UDP! - # We need to make it work with unix-domain sockets as well. - # @private - def send_datagram target, data, datalength, host, port - selectable = Reactor.instance.get_selectable( target ) or raise "unknown send_data target" - selectable.send_datagram data, Socket::pack_sockaddr_in(port, host) - end - - - # Sets reactor quantum in milliseconds. The underlying Reactor function wants a (possibly - # fractional) number of seconds. - # @private - def set_timer_quantum interval - Reactor.instance.set_timer_quantum(( 1.0 * interval) / 1000.0) - end - - # This method is a harmless no-op in the pure-Ruby implementation. This is intended to ensure - # that user code behaves properly across different EM implementations. - # @private - def epoll - end - - # @private - def ssl? - true - end - - def tls_parm_set?(parm) - !(parm.nil? || parm.empty?) - end - - # This method takes a series of positional arguments for specifying such - # things as private keys and certificate chains. It's expected that the - # parameter list will grow as we add more supported features. ALL of these - # parameters are optional, and can be specified as empty or nil strings. - # @private - def set_tls_parms signature, priv_key, cert_chain, verify_peer, fail_if_no_peer_cert, sni_hostname, cipher_list, ecdh_curve, dhparam, protocols_bitmask - bitmask = protocols_bitmask - ssl_options = OpenSSL::SSL::OP_ALL - ssl_options |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2) && EM_PROTO_SSLv2 & bitmask == 0 - ssl_options |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3) && EM_PROTO_SSLv3 & bitmask == 0 - ssl_options |= OpenSSL::SSL::OP_NO_TLSv1 if defined?(OpenSSL::SSL::OP_NO_TLSv1) && EM_PROTO_TLSv1 & bitmask == 0 - ssl_options |= OpenSSL::SSL::OP_NO_TLSv1_1 if defined?(OpenSSL::SSL::OP_NO_TLSv1_1) && EM_PROTO_TLSv1_1 & bitmask == 0 - ssl_options |= OpenSSL::SSL::OP_NO_TLSv1_2 if defined?(OpenSSL::SSL::OP_NO_TLSv1_2) && EM_PROTO_TLSv1_2 & bitmask == 0 - @tls_parms ||= {} - @tls_parms[signature] = { - :verify_peer => verify_peer, - :fail_if_no_peer_cert => fail_if_no_peer_cert, - :ssl_options => ssl_options - } - @tls_parms[signature][:priv_key] = File.read(priv_key) if tls_parm_set?(priv_key) - @tls_parms[signature][:cert_chain] = File.read(cert_chain) if tls_parm_set?(cert_chain) - @tls_parms[signature][:sni_hostname] = sni_hostname if tls_parm_set?(sni_hostname) - @tls_parms[signature][:cipher_list] = cipher_list.gsub(/,\s*/, ':') if tls_parm_set?(cipher_list) - @tls_parms[signature][:dhparam] = File.read(dhparam) if tls_parm_set?(dhparam) - @tls_parms[signature][:ecdh_curve] = ecdh_curve if tls_parm_set?(ecdh_curve) - end - - def start_tls signature - selectable = Reactor.instance.get_selectable(signature) or raise "unknown io selectable for start_tls" - tls_parms = @tls_parms[signature] - ctx = OpenSSL::SSL::SSLContext.new - ctx.options = tls_parms[:ssl_options] - ctx.cert = DefaultCertificate.cert - ctx.key = DefaultCertificate.key - ctx.cert_store = OpenSSL::X509::Store.new - ctx.cert_store.set_default_paths - ctx.cert = OpenSSL::X509::Certificate.new(tls_parms[:cert_chain]) if tls_parms[:cert_chain] - ctx.key = OpenSSL::PKey::RSA.new(tls_parms[:priv_key]) if tls_parms[:priv_key] - verify_mode = OpenSSL::SSL::VERIFY_NONE - if tls_parms[:verify_peer] - verify_mode |= OpenSSL::SSL::VERIFY_PEER - end - if tls_parms[:fail_if_no_peer_cert] - verify_mode |= OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT - end - ctx.verify_mode = verify_mode - ctx.servername_cb = Proc.new do |_, server_name| - tls_parms[:server_name] = server_name - nil - end - ctx.ciphers = tls_parms[:cipher_list] if tls_parms[:cipher_list] - if selectable.is_server - ctx.tmp_dh_callback = Proc.new do |_, _, key_length| - if tls_parms[:dhparam] - OpenSSL::PKey::DH.new(tls_parms[:dhparam]) - else - case key_length - when 1024 then DefaultDHKey1024 - when 2048 then DefaultDHKey2048 - else - nil - end - end - end - if tls_parms[:ecdh_curve] && ctx.respond_to?(:tmp_ecdh_callback) - ctx.tmp_ecdh_callback = Proc.new do - OpenSSL::PKey::EC.new(tls_parms[:ecdh_curve]) - end - end - end - ssl_io = OpenSSL::SSL::SSLSocket.new(selectable, ctx) - ssl_io.sync_close = true - if tls_parms[:sni_hostname] - ssl_io.hostname = tls_parms[:sni_hostname] if ssl_io.respond_to?(:hostname=) - end - begin - selectable.is_server ? ssl_io.accept_nonblock : ssl_io.connect_nonblock - rescue; end - selectable.io = ssl_io - end - - def get_peer_cert signature - selectable = Reactor.instance.get_selectable(signature) or raise "unknown get_peer_cert target" - if selectable.io.respond_to?(:peer_cert) && selectable.io.peer_cert - selectable.io.peer_cert.to_pem - else - nil - end - end - - def get_cipher_name signature - selectable = Reactor.instance.get_selectable(signature) or raise "unknown get_cipher_name target" - selectable.io.respond_to?(:cipher) ? selectable.io.cipher[0] : nil - end - - def get_cipher_protocol signature - selectable = Reactor.instance.get_selectable(signature) or raise "unknown get_cipher_protocol target" - selectable.io.respond_to?(:cipher) ? selectable.io.cipher[1] : nil - end - - def get_cipher_bits signature - selectable = Reactor.instance.get_selectable(signature) or raise "unknown get_cipher_bits target" - selectable.io.respond_to?(:cipher) ? selectable.io.cipher[2] : nil - end - - def get_sni_hostname signature - @tls_parms ||= {} - if @tls_parms[signature] - @tls_parms[signature][:server_name] - else - nil - end - end - - # This method is a no-op in the pure-Ruby implementation. We simply return Ruby's built-in - # per-process file-descriptor limit. - # @private - def set_rlimit_nofile n - 1024 - end - - # This method is a harmless no-op in pure Ruby, which doesn't have a built-in limit - # on the number of available timers. - # @private - def set_max_timer_count n - end - - # @private - def get_sock_opt signature, level, optname - selectable = Reactor.instance.get_selectable( signature ) or raise "unknown get_sock_opt target" - selectable.getsockopt level, optname - end - - # @private - def set_sock_opt signature, level, optname, optval - selectable = Reactor.instance.get_selectable( signature ) or raise "unknown set_sock_opt target" - selectable.setsockopt level, optname, optval - end - - # @private - def send_file_data sig, filename - sz = File.size(filename) - raise "file too large" if sz > 32*1024 - data = - begin - File.read filename - rescue - "" - end - send_data sig, data, data.length - end - - # @private - def get_outbound_data_size sig - r = Reactor.instance.get_selectable( sig ) or raise "unknown get_outbound_data_size target" - r.get_outbound_data_size - end - - # @private - def read_keyboard - EvmaKeyboard.open.uuid - end - - # @private - def set_comm_inactivity_timeout sig, tm - r = Reactor.instance.get_selectable( sig ) or raise "unknown set_comm_inactivity_timeout target" - r.set_inactivity_timeout tm - end - - # @private - def set_pending_connect_timeout sig, tm - # Needs to be implemented. Currently a no-op stub to allow - # certain software to operate with the EM pure-ruby. - end - - # @private - def report_connection_error_status signature - get_sock_opt(signature, Socket::SOL_SOCKET, Socket::SO_ERROR).int - end - end -end - -module EventMachine - # @private - class Connection - # @private - def get_outbound_data_size - EventMachine::get_outbound_data_size @signature - end - end -end - -module EventMachine - - # Factored out so we can substitute other implementations - # here if desired, such as the one in ActiveRBAC. - # @private - module UuidGenerator - def self.generate - @ix ||= 0 - @ix += 1 - end - end -end - - -module EventMachine - # @private - TimerFired = 100 - # @private - ConnectionData = 101 - # @private - ConnectionUnbound = 102 - # @private - ConnectionAccepted = 103 - # @private - ConnectionCompleted = 104 - # @private - LoopbreakSignalled = 105 - # @private - ConnectionNotifyReadable = 106 - # @private - ConnectionNotifyWritable = 107 - # @private - SslHandshakeCompleted = 108 - # @private - SslVerify = 109 - # @private - EM_PROTO_SSLv2 = 2 - # @private - EM_PROTO_SSLv3 = 4 - # @private - EM_PROTO_TLSv1 = 8 - # @private - EM_PROTO_TLSv1_1 = 16 - # @private - EM_PROTO_TLSv1_2 = 32 -end - -module EventMachine - # @private - class Reactor - include Singleton - - HeartbeatInterval = 2 - - attr_reader :current_loop_time, :stop_scheduled - - def initialize - initialize_for_run - end - - def install_oneshot_timer interval - uuid = UuidGenerator::generate - #@timers << [Time.now + interval, uuid] - #@timers.sort! {|a,b| a.first <=> b.first} - @timers.add([Time.now + interval, uuid]) - uuid - end - - # Called before run, this is a good place to clear out arrays - # with cruft that may be left over from a previous run. - # @private - def initialize_for_run - @running = false - @stop_scheduled = false - @selectables ||= {}; @selectables.clear - @timers = SortedSet.new # [] - set_timer_quantum(0.1) - @current_loop_time = Time.now - @next_heartbeat = @current_loop_time + HeartbeatInterval - end - - def add_selectable io - @selectables[io.uuid] = io - end - - def get_selectable uuid - @selectables[uuid] - end - - def run - raise Error.new( "already running" ) if @running - @running = true - - begin - open_loopbreaker - - loop { - @current_loop_time = Time.now - - break if @stop_scheduled - run_timers - break if @stop_scheduled - crank_selectables - break if @stop_scheduled - run_heartbeats - } - ensure - close_loopbreaker - @selectables.each {|k, io| io.close} - @selectables.clear - - @running = false - end - - end - - def run_timers - @timers.each {|t| - if t.first <= @current_loop_time - @timers.delete t - EventMachine::event_callback "", TimerFired, t.last - else - break - end - } - #while @timers.length > 0 and @timers.first.first <= now - # t = @timers.shift - # EventMachine::event_callback "", TimerFired, t.last - #end - end - - def run_heartbeats - if @next_heartbeat <= @current_loop_time - @next_heartbeat = @current_loop_time + HeartbeatInterval - @selectables.each {|k,io| io.heartbeat} - end - end - - def crank_selectables - #$stderr.write 'R' - - readers = @selectables.values.select {|io| io.select_for_reading?} - writers = @selectables.values.select {|io| io.select_for_writing?} - - s = select( readers, writers, nil, @timer_quantum) - - s and s[1] and s[1].each {|w| w.eventable_write } - s and s[0] and s[0].each {|r| r.eventable_read } - - @selectables.delete_if {|k,io| - if io.close_scheduled? - io.close - begin - EventMachine::event_callback io.uuid, ConnectionUnbound, nil - rescue ConnectionNotBound; end - true - end - } - end - - # #stop - def stop - raise Error.new( "not running") unless @running - @stop_scheduled = true - end - - def open_loopbreaker - # Can't use an IO.pipe because they can't be set nonselectable in Windows. - # Pick a random localhost UDP port. - #@loopbreak_writer.close if @loopbreak_writer - #rd,@loopbreak_writer = IO.pipe - @loopbreak_reader = UDPSocket.new - @loopbreak_writer = UDPSocket.new - bound = false - 100.times { - @loopbreak_port = rand(10000) + 40000 - begin - @loopbreak_reader.bind "127.0.0.1", @loopbreak_port - bound = true - break - rescue - end - } - raise "Unable to bind Loopbreaker" unless bound - LoopbreakReader.new(@loopbreak_reader) - end - - def close_loopbreaker - @loopbreak_writer.close - @loopbreak_writer = nil - end - - def signal_loopbreak - begin - @loopbreak_writer.send('+',0,"127.0.0.1",@loopbreak_port) if @loopbreak_writer - rescue IOError; end - end - - def set_timer_quantum interval_in_seconds - @timer_quantum = interval_in_seconds - end - - end - -end - -# @private -class IO - extend Forwardable - def_delegator :@my_selectable, :close_scheduled? - def_delegator :@my_selectable, :select_for_reading? - def_delegator :@my_selectable, :select_for_writing? - def_delegator :@my_selectable, :eventable_read - def_delegator :@my_selectable, :eventable_write - def_delegator :@my_selectable, :uuid - def_delegator :@my_selectable, :is_server - def_delegator :@my_selectable, :is_server= - def_delegator :@my_selectable, :send_data - def_delegator :@my_selectable, :schedule_close - def_delegator :@my_selectable, :get_peername - def_delegator :@my_selectable, :get_sockname - def_delegator :@my_selectable, :send_datagram - def_delegator :@my_selectable, :get_outbound_data_size - def_delegator :@my_selectable, :set_inactivity_timeout - def_delegator :@my_selectable, :heartbeat - def_delegator :@my_selectable, :io - def_delegator :@my_selectable, :io= -end - -module EventMachine - # @private - class Selectable - - attr_accessor :io, :is_server - attr_reader :uuid - - def initialize io - @io = io - @uuid = UuidGenerator.generate - @is_server = false - @last_activity = Reactor.instance.current_loop_time - - if defined?(Fcntl::F_GETFL) - m = @io.fcntl(Fcntl::F_GETFL, 0) - @io.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK | m) - else - # Windows doesn't define F_GETFL. - # It's not very reliable about setting descriptors nonblocking either. - begin - s = Socket.for_fd(@io.fileno) - s.fcntl( Fcntl::F_SETFL, Fcntl::O_NONBLOCK ) - rescue Errno::EINVAL, Errno::EBADF - warn "Serious error: unable to set descriptor non-blocking" - end - end - # TODO, should set CLOEXEC on Unix? - - @close_scheduled = false - @close_requested = false - - se = self; @io.instance_eval { @my_selectable = se } - Reactor.instance.add_selectable @io - end - - def close_scheduled? - @close_scheduled - end - - def select_for_reading? - false - end - - def select_for_writing? - false - end - - def get_peername - nil - end - - def get_sockname - nil - end - - def set_inactivity_timeout tm - @inactivity_timeout = tm - end - - def heartbeat - end - - def schedule_close(after_writing=false) - if after_writing - @close_requested = true - else - @close_scheduled = true - end - end - end - -end - -module EventMachine - # @private - class StreamObject < Selectable - def initialize io - super io - @outbound_q = [] - end - - # If we have to close, or a close-after-writing has been requested, - # then don't read any more data. - def select_for_reading? - true unless (@close_scheduled || @close_requested) - end - - # If we have to close, don't select for writing. - # Otherwise, see if the protocol is ready to close. - # If not, see if he has data to send. - # If a close-after-writing has been requested and the outbound queue - # is empty, convert the status to close_scheduled. - def select_for_writing? - unless @close_scheduled - if @outbound_q.empty? - @close_scheduled = true if @close_requested - false - else - true - end - end - end - - # Proper nonblocking I/O was added to Ruby 1.8.4 in May 2006. - # If we have it, then we can read multiple times safely to improve - # performance. - # The last-activity clock ASSUMES that we only come here when we - # have selected readable. - # TODO, coalesce multiple reads into a single event. - # TODO, do the function check somewhere else and cache it. - def eventable_read - @last_activity = Reactor.instance.current_loop_time - begin - if io.respond_to?(:read_nonblock) - 10.times { - data = io.read_nonblock(4096) - EventMachine::event_callback uuid, ConnectionData, data - } - else - data = io.sysread(4096) - EventMachine::event_callback uuid, ConnectionData, data - end - rescue Errno::EAGAIN, Errno::EWOULDBLOCK, SSLConnectionWaitReadable - # no-op - rescue Errno::ECONNRESET, Errno::ECONNREFUSED, EOFError, Errno::EPIPE, OpenSSL::SSL::SSLError - @close_scheduled = true - EventMachine::event_callback uuid, ConnectionUnbound, nil - end - - end - - # Provisional implementation. Will be re-implemented in subclasses. - # TODO: Complete this implementation. As it stands, this only writes - # a single packet per cycle. Highly inefficient, but required unless - # we're running on a Ruby with proper nonblocking I/O (Ruby 1.8.4 - # built from sources from May 25, 2006 or newer). - # We need to improve the loop so it writes multiple times, however - # not more than a certain number of bytes per cycle, otherwise - # one busy connection could hog output buffers and slow down other - # connections. Also we should coalesce small writes. - # URGENT TODO: Coalesce small writes. They are a performance killer. - # The last-activity recorder ASSUMES we'll only come here if we've - # selected writable. - def eventable_write - # coalesce the outbound array here, perhaps - @last_activity = Reactor.instance.current_loop_time - while data = @outbound_q.shift do - begin - data = data.to_s - w = if io.respond_to?(:write_nonblock) - io.write_nonblock data - else - io.syswrite data - end - - if w < data.length - @outbound_q.unshift data[w..-1] - break - end - rescue Errno::EAGAIN, SSLConnectionWaitReadable, SSLConnectionWaitWritable - @outbound_q.unshift data - break - rescue EOFError, Errno::ECONNRESET, Errno::ECONNREFUSED, Errno::EPIPE, OpenSSL::SSL::SSLError - @close_scheduled = true - @outbound_q.clear - end - end - - end - - # #send_data - def send_data data - # TODO, coalesce here perhaps by being smarter about appending to @outbound_q.last? - unless @close_scheduled or @close_requested or !data or data.length <= 0 - @outbound_q << data.to_s - end - end - - # #get_peername - # This is defined in the normal way on connected stream objects. - # Return an object that is suitable for passing to Socket#unpack_sockaddr_in or variants. - # We could also use a convenience method that did the unpacking automatically. - def get_peername - io.getpeername - end - - # #get_sockname - # This is defined in the normal way on connected stream objects. - # Return an object that is suitable for passing to Socket#unpack_sockaddr_in or variants. - # We could also use a convenience method that did the unpacking automatically. - def get_sockname - io.getsockname - end - - # #get_outbound_data_size - def get_outbound_data_size - @outbound_q.inject(0) {|memo,obj| memo += (obj || "").length} - end - - def heartbeat - if @inactivity_timeout and @inactivity_timeout > 0 and (@last_activity + @inactivity_timeout) < Reactor.instance.current_loop_time - schedule_close true - end - end - end - - -end - - -#-------------------------------------------------------------- - - - -module EventMachine - # @private - class EvmaTCPClient < StreamObject - - def self.connect bind_addr, bind_port, host, port - sd = Socket.new( Socket::AF_INET, Socket::SOCK_STREAM, 0 ) - sd.bind( Socket.pack_sockaddr_in( bind_port, bind_addr )) if bind_addr - - begin - # TODO, this assumes a current Ruby snapshot. - # We need to degrade to a nonblocking connect otherwise. - sd.connect_nonblock( Socket.pack_sockaddr_in( port, host )) - rescue Errno::ECONNREFUSED, Errno::EINPROGRESS - end - EvmaTCPClient.new sd - end - - def initialize io - super - @pending = true - @handshake_complete = false - end - - def ready? - if RUBY_PLATFORM =~ /linux/ - io.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO).unpack("i").first == 1 # TCP_ESTABLISHED - else - io.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR).unpack("i").first == 0 # NO ERROR - end - end - - def handshake_complete? - if !@handshake_complete && io.respond_to?(:state) - if io.state =~ /^SSLOK/ - @handshake_complete = true - EventMachine::event_callback uuid, SslHandshakeCompleted, "" - EventMachine::event_callback uuid, SslVerify, io.peer_cert.to_pem if io.peer_cert - end - else - @handshake_complete = true - end - @handshake_complete - end - - def pending? - handshake_complete? - if @pending - if ready? - @pending = false - EventMachine::event_callback uuid, ConnectionCompleted, "" - end - end - @pending - end - - def select_for_writing? - pending? - super - end - - def select_for_reading? - pending? - super - end - end -end - - - -module EventMachine - # @private - class EvmaKeyboard < StreamObject - - def self.open - EvmaKeyboard.new STDIN - end - - - def initialize io - super - end - - - def select_for_writing? - false - end - - def select_for_reading? - true - end - - - end -end - - - -module EventMachine - # @private - class EvmaUNIXClient < StreamObject - - def self.connect chain - sd = Socket.new( Socket::AF_LOCAL, Socket::SOCK_STREAM, 0 ) - begin - # TODO, this assumes a current Ruby snapshot. - # We need to degrade to a nonblocking connect otherwise. - sd.connect_nonblock( Socket.pack_sockaddr_un( chain )) - rescue Errno::EINPROGRESS - end - EvmaUNIXClient.new sd - end - - - def initialize io - super - @pending = true - end - - - def select_for_writing? - @pending ? true : super - end - - def select_for_reading? - @pending ? false : super - end - - def eventable_write - if @pending - @pending = false - if 0 == io.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR).unpack("i").first - EventMachine::event_callback uuid, ConnectionCompleted, "" - end - else - super - end - end - - - - end -end - - -#-------------------------------------------------------------- - -module EventMachine - # @private - class EvmaTCPServer < Selectable - - # TODO, refactor and unify with EvmaUNIXServer. - - class << self - # Versions of ruby 1.8.4 later than May 26 2006 will work properly - # with an object of type TCPServer. Prior versions won't so we - # play it safe and just build a socket. - # - def start_server host, port - sd = Socket.new( Socket::AF_INET, Socket::SOCK_STREAM, 0 ) - sd.setsockopt( Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true ) - sd.bind( Socket.pack_sockaddr_in( port, host )) - sd.listen( 50 ) # 5 is what you see in all the books. Ain't enough. - EvmaTCPServer.new sd - end - end - - def initialize io - super io - end - - - def select_for_reading? - true - end - - #-- - # accept_nonblock returns an array consisting of the accepted - # socket and a sockaddr_in which names the peer. - # Don't accept more than 10 at a time. - def eventable_read - begin - 10.times { - descriptor,peername = io.accept_nonblock - sd = EvmaTCPClient.new descriptor - sd.is_server = true - EventMachine::event_callback uuid, ConnectionAccepted, sd.uuid - } - rescue Errno::EWOULDBLOCK, Errno::EAGAIN - end - end - - #-- - # - def schedule_close - @close_scheduled = true - end - - end -end - - -#-------------------------------------------------------------- - -module EventMachine - # @private - class EvmaUNIXServer < Selectable - - # TODO, refactor and unify with EvmaTCPServer. - - class << self - # Versions of ruby 1.8.4 later than May 26 2006 will work properly - # with an object of type TCPServer. Prior versions won't so we - # play it safe and just build a socket. - # - def start_server chain - sd = Socket.new( Socket::AF_LOCAL, Socket::SOCK_STREAM, 0 ) - sd.setsockopt( Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true ) - sd.bind( Socket.pack_sockaddr_un( chain )) - sd.listen( 50 ) # 5 is what you see in all the books. Ain't enough. - EvmaUNIXServer.new sd - end - end - - def initialize io - super io - end - - - def select_for_reading? - true - end - - #-- - # accept_nonblock returns an array consisting of the accepted - # socket and a sockaddr_in which names the peer. - # Don't accept more than 10 at a time. - def eventable_read - begin - 10.times { - descriptor,peername = io.accept_nonblock - sd = StreamObject.new descriptor - EventMachine::event_callback uuid, ConnectionAccepted, sd.uuid - } - rescue Errno::EWOULDBLOCK, Errno::EAGAIN - end - end - - #-- - # - def schedule_close - @close_scheduled = true - end - - end -end - - - -#-------------------------------------------------------------- - -module EventMachine - # @private - class LoopbreakReader < Selectable - - def select_for_reading? - true - end - - def eventable_read - io.sysread(128) - EventMachine::event_callback "", LoopbreakSignalled, "" - end - - end -end - - - -# @private -module EventMachine - # @private - class DatagramObject < Selectable - def initialize io - super io - @outbound_q = [] - end - - # #send_datagram - def send_datagram data, target - # TODO, coalesce here perhaps by being smarter about appending to @outbound_q.last? - unless @close_scheduled or @close_requested - @outbound_q << [data.to_s, target] - end - end - - # #select_for_writing? - def select_for_writing? - unless @close_scheduled - if @outbound_q.empty? - @close_scheduled = true if @close_requested - false - else - true - end - end - end - - # #select_for_reading? - def select_for_reading? - true - end - - # #get_outbound_data_size - def get_outbound_data_size - @outbound_q.inject(0) {|memo,obj| memo += (obj || "").length} - end - - - end - - -end - - -module EventMachine - # @private - class EvmaUDPSocket < DatagramObject - - class << self - def create host, port - sd = Socket.new( Socket::AF_INET, Socket::SOCK_DGRAM, 0 ) - sd.bind Socket::pack_sockaddr_in( port, host ) - EvmaUDPSocket.new sd - end - end - - # #eventable_write - # This really belongs in DatagramObject, but there is some UDP-specific stuff. - def eventable_write - 40.times { - break if @outbound_q.empty? - begin - data,target = @outbound_q.first - - # This damn better be nonblocking. - io.send data.to_s, 0, target - - @outbound_q.shift - rescue Errno::EAGAIN - # It's not been observed in testing that we ever get here. - # True to the definition, packets will be accepted and quietly dropped - # if the system is under pressure. - break - rescue EOFError, Errno::ECONNRESET - @close_scheduled = true - @outbound_q.clear - end - } - end - - # Proper nonblocking I/O was added to Ruby 1.8.4 in May 2006. - # If we have it, then we can read multiple times safely to improve - # performance. - def eventable_read - begin - if io.respond_to?(:recvfrom_nonblock) - 40.times { - data,@return_address = io.recvfrom_nonblock(16384) - EventMachine::event_callback uuid, ConnectionData, data - @return_address = nil - } - else - raise "unimplemented datagram-read operation on this Ruby" - end - rescue Errno::EAGAIN - # no-op - rescue Errno::ECONNRESET, EOFError - @close_scheduled = true - EventMachine::event_callback uuid, ConnectionUnbound, nil - end - end - - def send_data data - send_datagram data, @return_address - end - end -end - -# load base EM api on top, now that we have the underlying pure ruby -# implementation defined -require 'eventmachine' diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/queue.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/queue.rb deleted file mode 100644 index 9096ed02..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/queue.rb +++ /dev/null @@ -1,80 +0,0 @@ -module EventMachine - # A cross thread, reactor scheduled, linear queue. - # - # This class provides a simple queue abstraction on top of the reactor - # scheduler. It services two primary purposes: - # - # * API sugar for stateful protocols - # * Pushing processing onto the reactor thread - # - # @example - # - # q = EM::Queue.new - # q.push('one', 'two', 'three') - # 3.times do - # q.pop { |msg| puts(msg) } - # end - # - class Queue - def initialize - @sink = [] - @drain = [] - @popq = [] - end - - # Pop items off the queue, running the block on the reactor thread. The pop - # will not happen immediately, but at some point in the future, either in - # the next tick, if the queue has data, or when the queue is populated. - # - # @return [NilClass] nil - def pop(*a, &b) - cb = EM::Callback(*a, &b) - EM.schedule do - if @drain.empty? - @drain = @sink - @sink = [] - end - if @drain.empty? - @popq << cb - else - cb.call @drain.shift - end - end - nil # Always returns nil - end - - # Push items onto the queue in the reactor thread. The items will not appear - # in the queue immediately, but will be scheduled for addition during the - # next reactor tick. - def push(*items) - EM.schedule do - @sink.push(*items) - unless @popq.empty? - @drain = @sink - @sink = [] - @popq.shift.call @drain.shift until @drain.empty? || @popq.empty? - end - end - end - alias :<< :push - - # @return [Boolean] - # @note This is a peek, it's not thread safe, and may only tend toward accuracy. - def empty? - @drain.empty? && @sink.empty? - end - - # @return [Integer] Queue size - # @note This is a peek, it's not thread safe, and may only tend toward accuracy. - def size - @drain.size + @sink.size - end - - # @return [Integer] Waiting size - # @note This is a peek at the number of jobs that are currently waiting on the Queue - def num_waiting - @popq.size - end - - end # Queue -end # EventMachine diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/resolver.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/resolver.rb deleted file mode 100644 index 1d2d7aa0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/resolver.rb +++ /dev/null @@ -1,232 +0,0 @@ -module EventMachine - module DNS - class Resolver - - def self.windows? - if RUBY_PLATFORM =~ /mswin32|cygwin|mingw|bccwin/ - require 'win32/resolv' - true - else - false - end - end - - HOSTS_FILE = windows? ? Win32::Resolv.get_hosts_path : '/etc/hosts' - - @hosts = nil - @nameservers = nil - @socket = nil - - def self.resolve(hostname) - Request.new(socket, hostname) - end - - def self.socket - if @socket && @socket.error? - @socket = Socket.open - else - @socket ||= Socket.open - end - end - - def self.nameservers=(ns) - @nameservers = ns - end - - def self.nameservers - return @nameservers if @nameservers - - if windows? - _, ns = Win32::Resolv.get_resolv_info - return @nameservers = ns || [] - end - - @nameservers = [] - IO.readlines('/etc/resolv.conf').each do |line| - if line =~ /^nameserver (.+)$/ - @nameservers << $1.split(/\s+/).first - end - end - - @nameservers - rescue - @nameservers = [] - end - - def self.nameserver - nameservers.shuffle.first - end - - def self.hosts - return @hosts if @hosts - - @hosts = {} - IO.readlines(HOSTS_FILE).each do |line| - next if line =~ /^#/ - addr, host = line.split(/\s+/) - - next unless addr && host - @hosts[host] ||= [] - @hosts[host] << addr - end - - @hosts - rescue - @hosts = {} - end - end - - class RequestIdAlreadyUsed < RuntimeError; end - - class Socket < EventMachine::Connection - def self.open - EventMachine::open_datagram_socket('0.0.0.0', 0, self) - end - - def initialize - @nameserver = nil - end - - def post_init - @requests = {} - end - - def start_timer - @timer ||= EM.add_periodic_timer(0.1, &method(:tick)) - end - - def stop_timer - EM.cancel_timer(@timer) - @timer = nil - end - - def unbind - end - - def tick - @requests.each do |id,req| - req.tick - end - end - - def register_request(id, req) - if @requests.has_key?(id) - raise RequestIdAlreadyUsed - else - @requests[id] = req - end - - start_timer - end - - def deregister_request(id, req) - @requests.delete(id) - stop_timer if @requests.length == 0 - end - - def send_packet(pkt) - send_datagram(pkt, nameserver, 53) - end - - def nameserver=(ns) - @nameserver = ns - end - - def nameserver - @nameserver || Resolver.nameserver - end - - # Decodes the packet, looks for the request and passes the - # response over to the requester - def receive_data(data) - msg = nil - begin - msg = Resolv::DNS::Message.decode data - rescue - else - req = @requests[msg.id] - if req - @requests.delete(msg.id) - stop_timer if @requests.length == 0 - req.receive_answer(msg) - end - end - end - end - - class Request - include Deferrable - attr_accessor :retry_interval, :max_tries - - def initialize(socket, hostname) - @socket = socket - @hostname = hostname - @tries = 0 - @last_send = Time.at(0) - @retry_interval = 3 - @max_tries = 5 - - if addrs = Resolver.hosts[hostname] - succeed addrs - else - EM.next_tick { tick } - end - end - - def tick - # Break early if nothing to do - return if @last_send + @retry_interval > Time.now - if @tries < @max_tries - send - else - @socket.deregister_request(@id, self) - fail 'retries exceeded' - end - end - - def receive_answer(msg) - addrs = [] - msg.each_answer do |name,ttl,data| - if data.kind_of?(Resolv::DNS::Resource::IN::A) || - data.kind_of?(Resolv::DNS::Resource::IN::AAAA) - addrs << data.address.to_s - end - end - - if addrs.empty? - fail "rcode=#{msg.rcode}" - else - succeed addrs - end - end - - private - - def send - @tries += 1 - @last_send = Time.now - @socket.send_packet(packet.encode) - end - - def id - begin - @id = rand(65535) - @socket.register_request(@id, self) - rescue RequestIdAlreadyUsed - retry - end unless defined?(@id) - - @id - end - - def packet - msg = Resolv::DNS::Message.new - msg.id = id - msg.rd = 1 - msg.add_question @hostname, Resolv::DNS::Resource::IN::A - msg - end - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/spawnable.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/spawnable.rb deleted file mode 100644 index 35c087d0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/spawnable.rb +++ /dev/null @@ -1,84 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 25 Aug 2007 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -module EventMachine - # Support for Erlang-style processes. - # - class SpawnedProcess - # Send a message to the spawned process - def notify *x - me = self - EM.next_tick { - # A notification executes in the context of this - # SpawnedProcess object. That makes self and notify - # work as one would expect. - # - y = me.call(*x) - if y and y.respond_to?(:pull_out_yield_block) - a,b = y.pull_out_yield_block - set_receiver a - self.notify if b - end - } - end - alias_method :resume, :notify - alias_method :run, :notify # for formulations like (EM.spawn {xxx}).run - - def set_receiver blk - (class << self ; self ; end).class_eval do - remove_method :call if method_defined? :call - define_method :call, blk - end - end - - end - - # @private - class YieldBlockFromSpawnedProcess - def initialize block, notify - @block = [block,notify] - end - def pull_out_yield_block - @block - end - end - - # Spawn an erlang-style process - def self.spawn &block - s = SpawnedProcess.new - s.set_receiver block - s - end - - # @private - def self.yield &block - return YieldBlockFromSpawnedProcess.new( block, false ) - end - - # @private - def self.yield_and_notify &block - return YieldBlockFromSpawnedProcess.new( block, true ) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/streamer.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/streamer.rb deleted file mode 100644 index cf49c883..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/streamer.rb +++ /dev/null @@ -1,118 +0,0 @@ -module EventMachine - # Streams a file over a given connection. Streaming begins once the object is - # instantiated. Typically FileStreamer instances are not reused. - # - # Streaming uses buffering for files larger than 16K and uses so-called fast file reader (a C++ extension) - # if available (it is part of eventmachine gem itself). - # - # @example - # - # module FileSender - # def post_init - # streamer = EventMachine::FileStreamer.new(self, '/tmp/bigfile.tar') - # streamer.callback{ - # # file was sent successfully - # close_connection_after_writing - # } - # end - # end - # - # - # @author Francis Cianfrocca - class FileStreamer - include Deferrable - - # Use mapped streamer for files bigger than 16k - MappingThreshold = 16384 - # Wait until next tick to send more data when 50k is still in the outgoing buffer - BackpressureLevel = 50000 - # Send 16k chunks at a time - ChunkSize = 16384 - - # @param [EventMachine::Connection] connection - # @param [String] filename File path - # - # @option args [Boolean] :http_chunks (false) Use HTTP 1.1 style chunked-encoding semantics. - def initialize connection, filename, args = {} - @connection = connection - @http_chunks = args[:http_chunks] - - if File.exist?(filename) - @size = File.size(filename) - if @size <= MappingThreshold - stream_without_mapping filename - else - stream_with_mapping filename - end - else - fail "file not found" - end - end - - # @private - def stream_without_mapping filename - if @http_chunks - @connection.send_data "#{@size.to_s(16)}\r\n" - @connection.send_file_data filename - @connection.send_data "\r\n0\r\n\r\n" - else - @connection.send_file_data filename - end - succeed - end - private :stream_without_mapping - - # @private - def stream_with_mapping filename - ensure_mapping_extension_is_present - - @position = 0 - @mapping = EventMachine::FastFileReader::Mapper.new filename - stream_one_chunk - end - private :stream_with_mapping - - # Used internally to stream one chunk at a time over multiple reactor ticks - # @private - def stream_one_chunk - loop { - if @position < @size - if @connection.get_outbound_data_size > BackpressureLevel - EventMachine::next_tick {stream_one_chunk} - break - else - len = @size - @position - len = ChunkSize if (len > ChunkSize) - - @connection.send_data( "#{len.to_s(16)}\r\n" ) if @http_chunks - @connection.send_data( @mapping.get_chunk( @position, len )) - @connection.send_data("\r\n") if @http_chunks - - @position += len - end - else - @connection.send_data "0\r\n\r\n" if @http_chunks - @mapping.close - succeed - break - end - } - end - - # - # We use an outboard extension class to get memory-mapped files. - # It's outboard to avoid polluting the core distro, but that means - # there's a "hidden" dependency on it. The first time we get here in - # any run, try to load up the dependency extension. User code will see - # a LoadError if it's not available, but code that doesn't require - # mapped files will work fine without it. This is a somewhat difficult - # compromise between usability and proper modularization. - # - # @private - def ensure_mapping_extension_is_present - @@fastfilereader ||= (require 'fastfilereaderext') - end - private :ensure_mapping_extension_is_present - - end # FileStreamer -end # EventMachine diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/threaded_resource.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/threaded_resource.rb deleted file mode 100644 index 87704d5f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/threaded_resource.rb +++ /dev/null @@ -1,90 +0,0 @@ -module EventMachine - # = EventMachine::ThreadedResource - # - # A threaded resource is a "quick and dirty" wrapper around the concept of - # wiring up synchronous code into a standard EM::Pool. This is useful to keep - # interfaces coherent and provide a simple approach at "making an interface - # async-ish". - # - # General usage is to wrap libraries that do not support EventMachine, or to - # have a specific number of dedicated high-cpu worker resources. - # - # == Basic Usage example - # - # This example requires the cassandra gem. The cassandra gem contains an - # EventMachine interface, but it's sadly Fiber based and thus only works on - # 1.9. It also requires (potentially) complex stack switching logic to reach - # completion of nested operations. By contrast this approach provides a block - # in which normal synchronous code can occur, but makes no attempt to wire the - # IO into EventMachines C++ IO implementations, instead relying on the reactor - # pattern in rb_thread_select. - # - # cassandra_dispatcher = ThreadedResource.new do - # Cassandra.new('allthethings', '127.0.0.1:9160') - # end - # - # pool = EM::Pool.new - # - # pool.add cassandra_dispatcher - # - # # If we don't care about the result: - # pool.perform do |dispatcher| - # # The following block executes inside a dedicated thread, and should not - # # access EventMachine things: - # dispatcher.dispatch do |cassandra| - # cassandra.insert(:Things, '10', 'stuff' => 'things') - # end - # end - # - # # Example where we care about the result: - # pool.perform do |dispatcher| - # # The dispatch block is executed in the resources thread. - # completion = dispatcher.dispatch do |cassandra| - # cassandra.get(:Things, '10', 'stuff') - # end - # - # # This block will be yielded on the EM thread: - # completion.callback do |result| - # EM.do_something_with(result) - # end - # - # completion - # end - class ThreadedResource - - # The block should return the resource that will be yielded in a dispatch. - def initialize - @resource = yield - - @running = true - @queue = ::Queue.new - @thread = Thread.new do - @queue.pop.call while @running - end - end - - # Called on the EM thread, generally in a perform block to return a - # completion for the work. - def dispatch - completion = EM::Completion.new - @queue << lambda do - begin - result = yield @resource - completion.succeed result - rescue => e - completion.fail e - end - end - completion - end - - # Kill the internal thread. should only be used to cleanup - generally - # only required for tests. - def shutdown - @running = false - @queue << lambda {} - @thread.join - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/tick_loop.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/tick_loop.rb deleted file mode 100644 index a95d5161..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/tick_loop.rb +++ /dev/null @@ -1,85 +0,0 @@ -module EventMachine - # Creates and immediately starts an EventMachine::TickLoop - def self.tick_loop(*a, &b) - TickLoop.new(*a, &b).start - end - - # A TickLoop is useful when one needs to distribute amounts of work - # throughout ticks in order to maintain response times. It is also useful for - # simple repeated checks and metrics. - # @example - # # Here we run through an array one item per tick until it is empty, - # # printing each element. - # # When the array is empty, we return :stop from the callback, and the - # # loop will terminate. - # # When the loop terminates, the on_stop callbacks will be called. - # EM.run do - # array = (1..100).to_a - # - # tickloop = EM.tick_loop do - # if array.empty? - # :stop - # else - # puts array.shift - # end - # end - # - # tickloop.on_stop { EM.stop } - # end - # - class TickLoop - - # Arguments: A callback (EM::Callback) to call each tick. If the call - # returns +:stop+ then the loop will be stopped. Any other value is - # ignored. - def initialize(*a, &b) - @work = EM::Callback(*a, &b) - @stops = [] - @stopped = true - end - - # Arguments: A callback (EM::Callback) to call once on the next stop (or - # immediately if already stopped). - def on_stop(*a, &b) - if @stopped - EM::Callback(*a, &b).call - else - @stops << EM::Callback(*a, &b) - end - end - - # Stop the tick loop immediately, and call it's on_stop callbacks. - def stop - @stopped = true - until @stops.empty? - @stops.shift.call - end - end - - # Query if the loop is stopped. - def stopped? - @stopped - end - - # Start the tick loop, will raise argument error if the loop is already - # running. - def start - raise ArgumentError, "double start" unless @stopped - @stopped = false - schedule - end - - private - def schedule - EM.next_tick do - next if @stopped - if @work.call == :stop - stop - else - schedule - end - end - self - end - end -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/timers.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/timers.rb deleted file mode 100644 index 41cd9595..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/timers.rb +++ /dev/null @@ -1,61 +0,0 @@ -module EventMachine - # Creates a one-time timer - # - # timer = EventMachine::Timer.new(5) do - # # this will never fire because we cancel it - # end - # timer.cancel - # - class Timer - # Create a new timer that fires after a given number of seconds - def initialize interval, callback=nil, &block - @signature = EventMachine::add_timer(interval, callback || block) - end - - # Cancel the timer - def cancel - EventMachine.send :cancel_timer, @signature - end - end - - # Creates a periodic timer - # - # @example - # n = 0 - # timer = EventMachine::PeriodicTimer.new(5) do - # puts "the time is #{Time.now}" - # timer.cancel if (n+=1) > 5 - # end - # - class PeriodicTimer - # Create a new periodic timer that executes every interval seconds - def initialize interval, callback=nil, &block - @interval = interval - @code = callback || block - @cancelled = false - @work = method(:fire) - schedule - end - - # Cancel the periodic timer - def cancel - @cancelled = true - end - - # Fire the timer every interval seconds - attr_accessor :interval - - # @private - def schedule - EventMachine::add_timer @interval, @work - end - - # @private - def fire - unless @cancelled - @code.call - schedule - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/version.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/version.rb deleted file mode 100644 index ffc43103..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/em/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module EventMachine - VERSION = "1.2.7" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/eventmachine.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/eventmachine.rb deleted file mode 100644 index 08737476..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/eventmachine.rb +++ /dev/null @@ -1,1601 +0,0 @@ -if defined?(EventMachine.library_type) and EventMachine.library_type == :pure_ruby - # assume 'em/pure_ruby' was loaded already -elsif RUBY_PLATFORM =~ /java/ - require 'java' - require 'jeventmachine' -else - begin - require 'rubyeventmachine' - rescue LoadError - warn "Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'" - raise - end -end - -require 'em/version' -require 'em/pool' -require 'em/deferrable' -require 'em/future' -require 'em/streamer' -require 'em/spawnable' -require 'em/processes' -require 'em/iterator' -require 'em/buftok' -require 'em/timers' -require 'em/protocols' -require 'em/connection' -require 'em/callback' -require 'em/queue' -require 'em/channel' -require 'em/file_watch' -require 'em/process_watch' -require 'em/tick_loop' -require 'em/resolver' -require 'em/completion' -require 'em/threaded_resource' - -require 'shellwords' -require 'thread' -require 'resolv' - -# Top-level EventMachine namespace. If you are looking for EventMachine examples, see {file:docs/GettingStarted.md EventMachine tutorial}. -# -# ## Key methods ## -# ### Starting and stopping the event loop ### -# -# * {EventMachine.run} -# * {EventMachine.stop_event_loop} -# -# ### Implementing clients ### -# -# * {EventMachine.connect} -# -# ### Implementing servers ### -# -# * {EventMachine.start_server} -# -# ### Working with timers ### -# -# * {EventMachine.add_timer} -# * {EventMachine.add_periodic_timer} -# * {EventMachine.cancel_timer} -# -# ### Working with blocking tasks ### -# -# * {EventMachine.defer} -# * {EventMachine.next_tick} -# -# ### Efficient proxying ### -# -# * {EventMachine.enable_proxy} -# * {EventMachine.disable_proxy} -module EventMachine - class << self - # Exposed to allow joining on the thread, when run in a multithreaded - # environment. Performing other actions on the thread has undefined - # semantics (read: a dangerous endevor). - # - # @return [Thread] - attr_reader :reactor_thread - end - @next_tick_mutex = Mutex.new - @reactor_running = false - @next_tick_queue = [] - @tails = [] - @threadpool = @threadqueue = @resultqueue = nil - @all_threads_spawned = false - - # System errnos - # @private - ERRNOS = Errno::constants.grep(/^E/).inject(Hash.new(:unknown)) { |hash, name| - errno = Errno.__send__(:const_get, name) - hash[errno::Errno] = errno - hash - } - - # Initializes and runs an event loop. This method only returns if code inside the block passed to this method - # calls {EventMachine.stop_event_loop}. The block is executed after initializing its internal event loop but *before* running the loop, - # therefore this block is the right place to call any code that needs event loop to run, for example, {EventMachine.start_server}, - # {EventMachine.connect} or similar methods of libraries that use EventMachine under the hood - # (like `EventMachine::HttpRequest.new` or `AMQP.start`). - # - # Programs that are run for long periods of time (e.g. servers) usually start event loop by calling {EventMachine.run}, and let it - # run "forever". It's also possible to use {EventMachine.run} to make a single client-connection to a remote server, - # process the data flow from that single connection, and then call {EventMachine.stop_event_loop} to stop, in other words, - # to run event loop for a short period of time (necessary to complete some operation) and then shut it down. - # - # Once event loop is running, it is perfectly possible to start multiple servers and clients simultaneously: content-aware - # proxies like [Proxymachine](https://github.com/mojombo/proxymachine) do just that. - # - # ## Using EventMachine with Ruby on Rails and other Web application frameworks ## - # - # Standalone applications often run event loop on the main thread, thus blocking for their entire lifespan. In case of Web applications, - # if you are running an EventMachine-based app server such as [Thin](http://code.macournoyer.com/thin/) or [Goliath](https://github.com/postrank-labs/goliath/), - # they start event loop for you. Servers like Unicorn, Apache Passenger or Mongrel occupy main Ruby thread to serve HTTP(S) requests. This means - # that calling {EventMachine.run} on the same thread is not an option (it will result in Web server never binding to the socket). - # In that case, start event loop in a separate thread as demonstrated below. - # - # - # @example Starting EventMachine event loop in the current thread to run the "Hello, world"-like Echo server example - # - # #!/usr/bin/env ruby - # - # require 'rubygems' # or use Bundler.setup - # require 'eventmachine' - # - # class EchoServer < EM::Connection - # def receive_data(data) - # send_data(data) - # end - # end - # - # EventMachine.run do - # EventMachine.start_server("0.0.0.0", 10000, EchoServer) - # end - # - # - # @example Starting EventMachine event loop in a separate thread - # - # # doesn't block current thread, can be used with Ruby on Rails, Sinatra, Merb, Rack - # # and any other application server that occupies main Ruby thread. - # Thread.new { EventMachine.run } - # - # - # @note This method blocks calling thread. If you need to start EventMachine event loop from a Web app - # running on a non event-driven server (Unicorn, Apache Passenger, Mongrel), do it in a separate thread like demonstrated - # in one of the examples. - # @see file:docs/GettingStarted.md Getting started with EventMachine - # @see EventMachine.stop_event_loop - def self.run blk=nil, tail=nil, &block - # Obsoleted the use_threads mechanism. - # 25Nov06: Added the begin/ensure block. We need to be sure that release_machine - # gets called even if an exception gets thrown within any of the user code - # that the event loop runs. The best way to see this is to run a unit - # test with two functions, each of which calls {EventMachine.run} and each of - # which throws something inside of #run. Without the ensure, the second test - # will start without release_machine being called and will immediately throw - - # - if @reactor_running and @reactor_pid != Process.pid - # Reactor was started in a different parent, meaning we have forked. - # Clean up reactor state so a new reactor boots up in this child. - stop_event_loop - release_machine - cleanup_machine - @reactor_running = false - end - - tail and @tails.unshift(tail) - - if reactor_running? - (b = blk || block) and b.call # next_tick(b) - else - @conns = {} - @acceptors = {} - @timers = {} - @wrapped_exception = nil - @next_tick_queue ||= [] - @tails ||= [] - begin - initialize_event_machine - @reactor_pid = Process.pid - @reactor_thread = Thread.current - @reactor_running = true - - (b = blk || block) and add_timer(0, b) - if @next_tick_queue && !@next_tick_queue.empty? - add_timer(0) { signal_loopbreak } - end - - # Rubinius needs to come back into "Ruby space" for GC to work, - # so we'll crank the machine here. - if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx" - while run_machine_once; end - else - run_machine - end - - ensure - until @tails.empty? - @tails.pop.call - end - - release_machine - cleanup_machine - @reactor_running = false - @reactor_thread = nil - end - - raise @wrapped_exception if @wrapped_exception - end - end - - # Sugars a common use case. Will pass the given block to #run, but will terminate - # the reactor loop and exit the function as soon as the code in the block completes. - # (Normally, {EventMachine.run} keeps running indefinitely, even after the block supplied to it - # finishes running, until user code calls {EventMachine.stop}) - # - def self.run_block &block - pr = proc { - block.call - EventMachine::stop - } - run(&pr) - end - - # @return [Boolean] true if the calling thread is the same thread as the reactor. - def self.reactor_thread? - Thread.current == @reactor_thread - end - - # Runs the given callback on the reactor thread, or immediately if called - # from the reactor thread. Accepts the same arguments as {EventMachine::Callback} - def self.schedule(*a, &b) - cb = Callback(*a, &b) - if reactor_running? && reactor_thread? - cb.call - else - next_tick { cb.call } - end - end - - # Forks a new process, properly stops the reactor and then calls {EventMachine.run} inside of it again, passing your block. - def self.fork_reactor &block - # This implementation is subject to change, especially if we clean up the relationship - # of EM#run to @reactor_running. - # Original patch by Aman Gupta. - # - Kernel.fork do - if reactor_running? - stop_event_loop - release_machine - cleanup_machine - @reactor_running = false - @reactor_thread = nil - end - run block - end - end - - # Clean up Ruby space following a release_machine - def self.cleanup_machine - if @threadpool && !@threadpool.empty? - # Tell the threads to stop - @threadpool.each { |t| t.exit } - # Join the threads or bump the stragglers one more time - @threadpool.each { |t| t.join 0.01 || t.exit } - end - @threadpool = nil - @threadqueue = nil - @resultqueue = nil - @all_threads_spawned = false - @next_tick_queue = [] - end - - # Adds a block to call as the reactor is shutting down. - # - # These callbacks are called in the _reverse_ order to which they are added. - # - # @example Scheduling operations to be run when EventMachine event loop is stopped - # - # EventMachine.run do - # EventMachine.add_shutdown_hook { puts "b" } - # EventMachine.add_shutdown_hook { puts "a" } - # EventMachine.stop - # end - # - # # Outputs: - # # a - # # b - # - def self.add_shutdown_hook &block - @tails << block - end - - # Adds a one-shot timer to the event loop. - # Call it with one or two parameters. The first parameters is a delay-time - # expressed in *seconds* (not milliseconds). The second parameter, if - # present, must be an object that responds to :call. If 2nd parameter is not given, then you - # can also simply pass a block to the method call. - # - # This method may be called from the block passed to {EventMachine.run} - # or from any callback method. It schedules execution of the proc or block - # passed to it, after the passage of an interval of time equal to - # *at least* the number of seconds specified in the first parameter to - # the call. - # - # {EventMachine.add_timer} is a non-blocking method. Callbacks can and will - # be called during the interval of time that the timer is in effect. - # There is no built-in limit to the number of timers that can be outstanding at - # any given time. - # - # @example Setting a one-shot timer with EventMachine - # - # EventMachine.run { - # puts "Starting the run now: #{Time.now}" - # EventMachine.add_timer 5, proc { puts "Executing timer event: #{Time.now}" } - # EventMachine.add_timer(10) { puts "Executing timer event: #{Time.now}" } - # } - # - # @param [Integer] delay Delay in seconds - # @see EventMachine::Timer - # @see EventMachine.add_periodic_timer - def self.add_timer *args, &block - interval = args.shift - code = args.shift || block - if code - # check too many timers! - s = add_oneshot_timer((interval.to_f * 1000).to_i) - @timers[s] = code - s - end - end - - # Adds a periodic timer to the event loop. - # It takes the same parameters as the one-shot timer method, {EventMachine.add_timer}. - # This method schedules execution of the given block repeatedly, at intervals - # of time *at least* as great as the number of seconds given in the first - # parameter to the call. - # - # @example Write a dollar-sign to stderr every five seconds, without blocking - # - # EventMachine.run { - # EventMachine.add_periodic_timer( 5 ) { $stderr.write "$" } - # } - # - # @param [Integer] delay Delay in seconds - # - # @see EventMachine::PeriodicTimer - # @see EventMachine.add_timer - # - def self.add_periodic_timer *args, &block - interval = args.shift - code = args.shift || block - - EventMachine::PeriodicTimer.new(interval, code) - end - - - # Cancel a timer (can be a callback or an {EventMachine::Timer} instance). - # - # @param [#cancel, #call] timer_or_sig A timer to cancel - # @see EventMachine::Timer#cancel - def self.cancel_timer timer_or_sig - if timer_or_sig.respond_to? :cancel - timer_or_sig.cancel - else - @timers[timer_or_sig] = false if @timers.has_key?(timer_or_sig) - end - end - - - # Causes the processing loop to stop executing, which will cause all open connections and accepting servers - # to be run down and closed. Connection termination callbacks added using {EventMachine.add_shutdown_hook} - # will be called as part of running this method. - # - # When all of this processing is complete, the call to {EventMachine.run} which started the processing loop - # will return and program flow will resume from the statement following {EventMachine.run} call. - # - # @example Stopping a running EventMachine event loop - # - # require 'rubygems' - # require 'eventmachine' - # - # module Redmond - # def post_init - # puts "We're sending a dumb HTTP request to the remote peer." - # send_data "GET / HTTP/1.1\r\nHost: www.microsoft.com\r\n\r\n" - # end - # - # def receive_data data - # puts "We received #{data.length} bytes from the remote peer." - # puts "We're going to stop the event loop now." - # EventMachine::stop_event_loop - # end - # - # def unbind - # puts "A connection has terminated." - # end - # end - # - # puts "We're starting the event loop now." - # EventMachine.run { - # EventMachine.connect "www.microsoft.com", 80, Redmond - # } - # puts "The event loop has stopped." - # - # # This program will produce approximately the following output: - # # - # # We're starting the event loop now. - # # We're sending a dumb HTTP request to the remote peer. - # # We received 1440 bytes from the remote peer. - # # We're going to stop the event loop now. - # # A connection has terminated. - # # The event loop has stopped. - # - # - def self.stop_event_loop - EventMachine::stop - end - - # Initiates a TCP server (socket acceptor) on the specified IP address and port. - # - # The IP address must be valid on the machine where the program - # runs, and the process must be privileged enough to listen - # on the specified port (on Unix-like systems, superuser privileges - # are usually required to listen on any port lower than 1024). - # Only one listener may be running on any given address/port - # combination. start_server will fail if the given address and port - # are already listening on the machine, either because of a prior call - # to {.start_server} or some unrelated process running on the machine. - # If {.start_server} succeeds, the new network listener becomes active - # immediately and starts accepting connections from remote peers, - # and these connections generate callback events that are processed - # by the code specified in the handler parameter to {.start_server}. - # - # The optional handler which is passed to this method is the key - # to EventMachine's ability to handle particular network protocols. - # The handler parameter passed to start_server must be a Ruby Module - # that you must define. When the network server that is started by - # start_server accepts a new connection, it instantiates a new - # object of an anonymous class that is inherited from {EventMachine::Connection}, - # *into which your handler module have been included*. Arguments passed into start_server - # after the class name are passed into the constructor during the instantiation. - # - # Your handler module may override any of the methods in {EventMachine::Connection}, - # such as {EventMachine::Connection#receive_data}, in order to implement the specific behavior - # of the network protocol. - # - # Callbacks invoked in response to network events *always* take place - # within the execution context of the object derived from {EventMachine::Connection} - # extended by your handler module. There is one object per connection, and - # all of the callbacks invoked for a particular connection take the form - # of instance methods called against the corresponding {EventMachine::Connection} - # object. Therefore, you are free to define whatever instance variables you - # wish, in order to contain the per-connection state required by the network protocol you are - # implementing. - # - # {EventMachine.start_server} is usually called inside the block passed to {EventMachine.run}, - # but it can be called from any EventMachine callback. {EventMachine.start_server} will fail - # unless the EventMachine event loop is currently running (which is why - # it's often called in the block suppled to {EventMachine.run}). - # - # You may call start_server any number of times to start up network - # listeners on different address/port combinations. The servers will - # all run simultaneously. More interestingly, each individual call to start_server - # can specify a different handler module and thus implement a different - # network protocol from all the others. - # - # @example - # - # require 'rubygems' - # require 'eventmachine' - # - # # Here is an example of a server that counts lines of input from the remote - # # peer and sends back the total number of lines received, after each line. - # # Try the example with more than one client connection opened via telnet, - # # and you will see that the line count increments independently on each - # # of the client connections. Also very important to note, is that the - # # handler for the receive_data function, which our handler redefines, may - # # not assume that the data it receives observes any kind of message boundaries. - # # Also, to use this example, be sure to change the server and port parameters - # # to the start_server call to values appropriate for your environment. - # module LineCounter - # MaxLinesPerConnection = 10 - # - # def post_init - # puts "Received a new connection" - # @data_received = "" - # @line_count = 0 - # end - # - # def receive_data data - # @data_received << data - # while @data_received.slice!( /^[^\n]*[\n]/m ) - # @line_count += 1 - # send_data "received #{@line_count} lines so far\r\n" - # @line_count == MaxLinesPerConnection and close_connection_after_writing - # end - # end - # end - # - # EventMachine.run { - # host, port = "192.168.0.100", 8090 - # EventMachine.start_server host, port, LineCounter - # puts "Now accepting connections on address #{host}, port #{port}..." - # EventMachine.add_periodic_timer(10) { $stderr.write "*" } - # } - # - # @param [String] server Host to bind to. - # @param [Integer] port Port to bind to. - # @param [Module, Class] handler A module or class that implements connection callbacks - # - # @note Don't forget that in order to bind to ports < 1024 on Linux, *BSD and Mac OS X your process must have superuser privileges. - # - # @see file:docs/GettingStarted.md EventMachine tutorial - # @see EventMachine.stop_server - def self.start_server server, port=nil, handler=nil, *args, &block - begin - port = Integer(port) - rescue ArgumentError, TypeError - # there was no port, so server must be a unix domain socket - # the port argument is actually the handler, and the handler is one of the args - args.unshift handler if handler - handler = port - port = nil - end if port - - klass = klass_from_handler(Connection, handler, *args) - - s = if port - start_tcp_server server, port - else - start_unix_server server - end - @acceptors[s] = [klass,args,block] - s - end - - # Attach to an existing socket's file descriptor. The socket may have been - # started with {EventMachine.start_server}. - def self.attach_server sock, handler=nil, *args, &block - klass = klass_from_handler(Connection, handler, *args) - sd = sock.respond_to?(:fileno) ? sock.fileno : sock - s = attach_sd(sd) - @acceptors[s] = [klass,args,block,sock] - s - end - - # Stop a TCP server socket that was started with {EventMachine.start_server}. - # @see EventMachine.start_server - def self.stop_server signature - EventMachine::stop_tcp_server signature - end - - # Start a Unix-domain server. - # - # Note that this is an alias for {EventMachine.start_server}, which can be used to start both - # TCP and Unix-domain servers. - # - # @see EventMachine.start_server - def self.start_unix_domain_server filename, *args, &block - start_server filename, *args, &block - end - - # Initiates a TCP connection to a remote server and sets up event handling for the connection. - # {EventMachine.connect} requires event loop to be running (see {EventMachine.run}). - # - # {EventMachine.connect} takes the IP address (or hostname) and - # port of the remote server you want to connect to. - # It also takes an optional handler (a module or a subclass of {EventMachine::Connection}) which you must define, that - # contains the callbacks that will be invoked by the event loop on behalf of the connection. - # - # Learn more about connection lifecycle callbacks in the {file:docs/GettingStarted.md EventMachine tutorial} and - # {file:docs/ConnectionLifecycleCallbacks.md Connection lifecycle guide}. - # - # - # @example - # - # # Here's a program which connects to a web server, sends a naive - # # request, parses the HTTP header of the response, and then - # # (antisocially) ends the event loop, which automatically drops the connection - # # (and incidentally calls the connection's unbind method). - # module DumbHttpClient - # def post_init - # send_data "GET / HTTP/1.1\r\nHost: _\r\n\r\n" - # @data = "" - # @parsed = false - # end - # - # def receive_data data - # @data << data - # if !@parsed and @data =~ /[\n][\r]*[\n]/m - # @parsed = true - # puts "RECEIVED HTTP HEADER:" - # $`.each {|line| puts ">>> #{line}" } - # - # puts "Now we'll terminate the loop, which will also close the connection" - # EventMachine::stop_event_loop - # end - # end - # - # def unbind - # puts "A connection has terminated" - # end - # end - # - # EventMachine.run { - # EventMachine.connect "www.bayshorenetworks.com", 80, DumbHttpClient - # } - # puts "The event loop has ended" - # - # - # @example Defining protocol handler as a class - # - # class MyProtocolHandler < EventMachine::Connection - # def initialize *args - # super - # # whatever else you want to do here - # end - # - # # ... - # end - # - # - # @param [String] server Host to connect to - # @param [Integer] port Port to connect to - # @param [Module, Class] handler A module or class that implements connection lifecycle callbacks - # - # @see EventMachine.start_server - # @see file:docs/GettingStarted.md EventMachine tutorial - def self.connect server, port=nil, handler=nil, *args, &blk - # EventMachine::connect initiates a TCP connection to a remote - # server and sets up event-handling for the connection. - # It internally creates an object that should not be handled - # by the caller. HOWEVER, it's often convenient to get the - # object to set up interfacing to other objects in the system. - # We return the newly-created anonymous-class object to the caller. - # It's expected that a considerable amount of code will depend - # on this behavior, so don't change it. - # - # Ok, added support for a user-defined block, 13Apr06. - # This leads us to an interesting choice because of the - # presence of the post_init call, which happens in the - # initialize method of the new object. We call the user's - # block and pass the new object to it. This is a great - # way to do protocol-specific initiation. It happens - # AFTER post_init has been called on the object, which I - # certainly hope is the right choice. - # Don't change this lightly, because accepted connections - # are different from connected ones and we don't want - # to have them behave differently with respect to post_init - # if at all possible. - - bind_connect nil, nil, server, port, handler, *args, &blk - end - - # This method is like {EventMachine.connect}, but allows for a local address/port - # to bind the connection to. - # - # @see EventMachine.connect - def self.bind_connect bind_addr, bind_port, server, port=nil, handler=nil, *args - begin - port = Integer(port) - rescue ArgumentError, TypeError - # there was no port, so server must be a unix domain socket - # the port argument is actually the handler, and the handler is one of the args - args.unshift handler if handler - handler = port - port = nil - end if port - - klass = klass_from_handler(Connection, handler, *args) - - s = if port - if bind_addr - bind_connect_server bind_addr, bind_port.to_i, server, port - else - connect_server server, port - end - else - connect_unix_server server - end - - c = klass.new s, *args - @conns[s] = c - block_given? and yield c - c - end - - # {EventMachine.watch} registers a given file descriptor or IO object with the eventloop. The - # file descriptor will not be modified (it will remain blocking or non-blocking). - # - # The eventloop can be used to process readable and writable events on the file descriptor, using - # {EventMachine::Connection#notify_readable=} and {EventMachine::Connection#notify_writable=} - # - # {EventMachine::Connection#notify_readable?} and {EventMachine::Connection#notify_writable?} can be used - # to check what events are enabled on the connection. - # - # To detach the file descriptor, use {EventMachine::Connection#detach} - # - # @example - # - # module SimpleHttpClient - # def notify_readable - # header = @io.readline - # - # if header == "\r\n" - # # detach returns the file descriptor number (fd == @io.fileno) - # fd = detach - # end - # rescue EOFError - # detach - # end - # - # def unbind - # EM.next_tick do - # # socket is detached from the eventloop, but still open - # data = @io.read - # end - # end - # end - # - # EventMachine.run { - # sock = TCPSocket.new('site.com', 80) - # sock.write("GET / HTTP/1.0\r\n\r\n") - # conn = EventMachine.watch(sock, SimpleHttpClient) - # conn.notify_readable = true - # } - # - # @author Riham Aldakkak (eSpace Technologies) - def EventMachine::watch io, handler=nil, *args, &blk - attach_io io, true, handler, *args, &blk - end - - # Attaches an IO object or file descriptor to the eventloop as a regular connection. - # The file descriptor will be set as non-blocking, and EventMachine will process - # receive_data and send_data events on it as it would for any other connection. - # - # To watch a fd instead, use {EventMachine.watch}, which will not alter the state of the socket - # and fire notify_readable and notify_writable events instead. - def EventMachine::attach io, handler=nil, *args, &blk - attach_io io, false, handler, *args, &blk - end - - # @private - def EventMachine::attach_io io, watch_mode, handler=nil, *args - klass = klass_from_handler(Connection, handler, *args) - - if !watch_mode and klass.public_instance_methods.any?{|m| [:notify_readable, :notify_writable].include? m.to_sym } - raise ArgumentError, "notify_readable/writable with EM.attach is not supported. Use EM.watch(io){ |c| c.notify_readable = true }" - end - - if io.respond_to?(:fileno) - # getDescriptorByFileno deprecated in JRuby 1.7.x, removed in JRuby 9000 - if defined?(JRuby) && JRuby.runtime.respond_to?(:getDescriptorByFileno) - fd = JRuby.runtime.getDescriptorByFileno(io.fileno).getChannel - else - fd = io.fileno - end - else - fd = io - end - - s = attach_fd fd, watch_mode - c = klass.new s, *args - - c.instance_variable_set(:@io, io) - c.instance_variable_set(:@watch_mode, watch_mode) - c.instance_variable_set(:@fd, fd) - - @conns[s] = c - block_given? and yield c - c - end - - - # Connect to a given host/port and re-use the provided {EventMachine::Connection} instance. - # Consider also {EventMachine::Connection#reconnect}. - # - # @see EventMachine::Connection#reconnect - def self.reconnect server, port, handler - # Observe, the test for already-connected FAILS if we call a reconnect inside post_init, - # because we haven't set up the connection in @conns by that point. - # RESIST THE TEMPTATION to "fix" this problem by redefining the behavior of post_init. - # - # Changed 22Nov06: if called on an already-connected handler, just return the - # handler and do nothing more. Originally this condition raised an exception. - # We may want to change it yet again and call the block, if any. - - raise "invalid handler" unless handler.respond_to?(:connection_completed) - #raise "still connected" if @conns.has_key?(handler.signature) - return handler if @conns.has_key?(handler.signature) - - s = if port - connect_server server, port - else - connect_unix_server server - end - handler.signature = s - @conns[s] = handler - block_given? and yield handler - handler - end - - - # Make a connection to a Unix-domain socket. This method is simply an alias for {.connect}, - # which can connect to both TCP and Unix-domain sockets. Make sure that your process has sufficient - # permissions to open the socket it is given. - # - # @param [String] socketname Unix domain socket (local fully-qualified path) you want to connect to. - # - # @note UNIX sockets, as the name suggests, are not available on Microsoft Windows. - def self.connect_unix_domain socketname, *args, &blk - connect socketname, *args, &blk - end - - - # Used for UDP-based protocols. Its usage is similar to that of {EventMachine.start_server}. - # - # This method will create a new UDP (datagram) socket and - # bind it to the address and port that you specify. - # The normal callbacks (see {EventMachine.start_server}) will - # be called as events of interest occur on the newly-created - # socket, but there are some differences in how they behave. - # - # {Connection#receive_data} will be called when a datagram packet - # is received on the socket, but unlike TCP sockets, the message - # boundaries of the received data will be respected. In other words, - # if the remote peer sent you a datagram of a particular size, - # you may rely on {Connection#receive_data} to give you the - # exact data in the packet, with the original data length. - # Also observe that Connection#receive_data may be called with a - # *zero-length* data payload, since empty datagrams are permitted in UDP. - # - # {Connection#send_data} is available with UDP packets as with TCP, - # but there is an important difference. Because UDP communications - # are *connectionless*, there is no implicit recipient for the packets you - # send. Ordinarily you must specify the recipient for each packet you send. - # However, EventMachine provides for the typical pattern of receiving a UDP datagram - # from a remote peer, performing some operation, and then sending - # one or more packets in response to the same remote peer. - # To support this model easily, just use {Connection#send_data} - # in the code that you supply for {Connection#receive_data}. - # - # EventMachine will provide an implicit return address for any messages sent to - # {Connection#send_data} within the context of a {Connection#receive_data} callback, - # and your response will automatically go to the correct remote peer. - # - # Observe that the port number that you supply to {EventMachine.open_datagram_socket} - # may be zero. In this case, EventMachine will create a UDP socket - # that is bound to an [ephemeral port](http://en.wikipedia.org/wiki/Ephemeral_port). - # This is not appropriate for servers that must publish a well-known - # port to which remote peers may send datagrams. But it can be useful - # for clients that send datagrams to other servers. - # If you do this, you will receive any responses from the remote - # servers through the normal {Connection#receive_data} callback. - # Observe that you will probably have issues with firewalls blocking - # the ephemeral port numbers, so this technique is most appropriate for LANs. - # - # If you wish to send datagrams to arbitrary remote peers (not - # necessarily ones that have sent data to which you are responding), - # then see {Connection#send_datagram}. - # - # DO NOT call send_data from a datagram socket outside of a {Connection#receive_data} method. Use {Connection#send_datagram}. - # If you do use {Connection#send_data} outside of a {Connection#receive_data} method, you'll get a confusing error - # because there is no "peer," as #send_data requires (inside of {EventMachine::Connection#receive_data}, - # {EventMachine::Connection#send_data} "fakes" the peer as described above). - # - # @param [String] address IP address - # @param [String] port Port - # @param [Class, Module] handler A class or a module that implements connection lifecycle callbacks. - def self.open_datagram_socket address, port, handler=nil, *args - # Replaced the implementation on 01Oct06. Thanks to Tobias Gustafsson for pointing - # out that this originally did not take a class but only a module. - - - klass = klass_from_handler(Connection, handler, *args) - s = open_udp_socket address, port.to_i - c = klass.new s, *args - @conns[s] = c - block_given? and yield c - c - end - - - # For advanced users. This function sets the default timer granularity, which by default is - # slightly smaller than 100 milliseconds. Call this function to set a higher or lower granularity. - # The function affects the behavior of {EventMachine.add_timer} and {EventMachine.add_periodic_timer}. - # Most applications will not need to call this function. - # - # Avoid setting the quantum to very low values because that may reduce performance under some extreme conditions. - # We recommend that you not use values lower than 10. - # - # This method only can be used if event loop is running. - # - # @param [Integer] mills New timer granularity, in milliseconds - # - # @see EventMachine.add_timer - # @see EventMachine.add_periodic_timer - # @see EventMachine::Timer - # @see EventMachine.run - def self.set_quantum mills - set_timer_quantum mills.to_i - end - - # Sets the maximum number of timers and periodic timers that may be outstanding at any - # given time. You only need to call {.set_max_timers} if you need more than the default - # number of timers, which on most platforms is 1000. - # - # @note This method has to be used *before* event loop is started. - # - # @param [Integer] ct Maximum number of timers that may be outstanding at any given time - # - # @see EventMachine.add_timer - # @see EventMachine.add_periodic_timer - # @see EventMachine::Timer - def self.set_max_timers ct - set_max_timer_count ct - end - - # Gets the current maximum number of allowed timers - # - # @return [Integer] Maximum number of timers that may be outstanding at any given time - def self.get_max_timers - get_max_timer_count - end - - # Returns the total number of connections (file descriptors) currently held by the reactor. - # Note that a tick must pass after the 'initiation' of a connection for this number to increment. - # It's usually accurate, but don't rely on the exact precision of this number unless you really know EM internals. - # - # @example - # - # EventMachine.run { - # EventMachine.connect("rubyeventmachine.com", 80) - # # count will be 0 in this case, because connection is not - # # established yet - # count = EventMachine.connection_count - # } - # - # - # @example - # - # EventMachine.run { - # EventMachine.connect("rubyeventmachine.com", 80) - # - # EventMachine.next_tick { - # # In this example, count will be 1 since the connection has been established in - # # the next loop of the reactor. - # count = EventMachine.connection_count - # } - # } - # - # @return [Integer] Number of connections currently held by the reactor. - def self.connection_count - self.get_connection_count - end - - # The is the responder for the loopback-signalled event. - # It can be fired either by code running on a separate thread ({EventMachine.defer}) or on - # the main thread ({EventMachine.next_tick}). - # It will often happen that a next_tick handler will reschedule itself. We - # consume a copy of the tick queue so that tick events scheduled by tick events - # have to wait for the next pass through the reactor core. - # - # @private - def self.run_deferred_callbacks - until (@resultqueue ||= []).empty? - result,cback = @resultqueue.pop - cback.call result if cback - end - - # Capture the size at the start of this tick... - size = @next_tick_mutex.synchronize { @next_tick_queue.size } - size.times do |i| - callback = @next_tick_mutex.synchronize { @next_tick_queue.shift } - begin - callback.call - rescue - exception_raised = true - raise - ensure - # This is a little nasty. The problem is, if an exception occurs during - # the callback, then we need to send a signal to the reactor to actually - # do some work during the next_tick. The only mechanism we have from the - # ruby side is next_tick itself, although ideally, we'd just drop a byte - # on the loopback descriptor. - next_tick {} if exception_raised - end - end - end - - - # EventMachine.defer is used for integrating blocking operations into EventMachine's control flow. - # The action of {.defer} is to take the block specified in the first parameter (the "operation") - # and schedule it for asynchronous execution on an internal thread pool maintained by EventMachine. - # When the operation completes, it will pass the result computed by the block (if any) back to the - # EventMachine reactor. Then, EventMachine calls the block specified in the second parameter to - # {.defer} (the "callback"), as part of its normal event handling loop. The result computed by the - # operation block is passed as a parameter to the callback. You may omit the callback parameter if - # you don't need to execute any code after the operation completes. If the operation raises an - # unhandled exception, the exception will be passed to the third parameter to {.defer} (the - # "errback"), as part of its normal event handling loop. If no errback is provided, the exception - # will be allowed to blow through to the main thread immediately. - # - # ## Caveats ## - # - # Note carefully that the code in your deferred operation will be executed on a separate - # thread from the main EventMachine processing and all other Ruby threads that may exist in - # your program. Also, multiple deferred operations may be running at once! Therefore, you - # are responsible for ensuring that your operation code is threadsafe. - # - # Don't write a deferred operation that will block forever. If so, the current implementation will - # not detect the problem, and the thread will never be returned to the pool. EventMachine limits - # the number of threads in its pool, so if you do this enough times, your subsequent deferred - # operations won't get a chance to run. - # - # The threads within the EventMachine's thread pool have abort_on_exception set to true. As a result, - # if an unhandled exception is raised by the deferred operation and an errback is not provided, it - # will blow through to the main thread immediately. If the main thread is within an indiscriminate - # rescue block at that time, the exception could be handled improperly by the main thread. - # - # @example - # - # operation = proc { - # # perform a long-running operation here, such as a database query. - # "result" # as usual, the last expression evaluated in the block will be the return value. - # } - # callback = proc {|result| - # # do something with result here, such as send it back to a network client. - # } - # errback = proc {|error| - # # do something with error here, such as re-raising or logging. - # } - # - # EventMachine.defer(operation, callback, errback) - # - # @param [#call] op An operation you want to offload to EventMachine thread pool - # @param [#call] callback A callback that will be run on the event loop thread after `operation` finishes. - # @param [#call] errback An errback that will be run on the event loop thread after `operation` raises an exception. - # - # @see EventMachine.threadpool_size - def self.defer op = nil, callback = nil, errback = nil, &blk - # OBSERVE that #next_tick hacks into this mechanism, so don't make any changes here - # without syncing there. - # - # Running with $VERBOSE set to true gives a warning unless all ivars are defined when - # they appear in rvalues. But we DON'T ever want to initialize @threadqueue unless we - # need it, because the Ruby threads are so heavyweight. We end up with this bizarre - # way of initializing @threadqueue because EventMachine is a Module, not a Class, and - # has no constructor. - - unless @threadpool - @threadpool = [] - @threadqueue = ::Queue.new - @resultqueue = ::Queue.new - spawn_threadpool - end - - @threadqueue << [op||blk,callback,errback] - end - - - # @private - def self.spawn_threadpool - until @threadpool.size == @threadpool_size.to_i - thread = Thread.new do - Thread.current.abort_on_exception = true - while true - begin - op, cback, eback = *@threadqueue.pop - rescue ThreadError - $stderr.puts $!.message - break # Ruby 2.0 may fail at Queue.pop - end - begin - result = op.call - @resultqueue << [result, cback] - rescue Exception => error - raise error unless eback - @resultqueue << [error, eback] - end - signal_loopbreak - end - end - @threadpool << thread - end - @all_threads_spawned = true - end - - ## - # Returns +true+ if all deferred actions are done executing and their - # callbacks have been fired. - # - def self.defers_finished? - return false if @threadpool and !@all_threads_spawned - return false if @threadqueue and not @threadqueue.empty? - return false if @resultqueue and not @resultqueue.empty? - return false if @threadpool and @threadqueue.num_waiting != @threadpool.size - return true - end - - class << self - # @private - attr_reader :threadpool - - # Size of the EventMachine.defer threadpool (defaults to 20) - # @return [Number] - attr_accessor :threadpool_size - EventMachine.threadpool_size = 20 - end - - # Schedules a proc for execution immediately after the next "turn" through the reactor - # core. An advanced technique, this can be useful for improving memory management and/or - # application responsiveness, especially when scheduling large amounts of data for - # writing to a network connection. - # - # This method takes either a single argument (which must be a callable object) or a block. - # - # @param [#call] pr A callable object to run - def self.next_tick pr=nil, &block - # This works by adding to the @resultqueue that's used for #defer. - # The general idea is that next_tick is used when we want to give the reactor a chance - # to let other operations run, either to balance the load out more evenly, or to let - # outbound network buffers drain, or both. So we probably do NOT want to block, and - # we probably do NOT want to be spinning any threads. A program that uses next_tick - # but not #defer shouldn't suffer the penalty of having Ruby threads running. They're - # extremely expensive even if they're just sleeping. - - raise ArgumentError, "no proc or block given" unless ((pr && pr.respond_to?(:call)) or block) - @next_tick_mutex.synchronize do - @next_tick_queue << ( pr || block ) - end - signal_loopbreak if reactor_running? - end - - # A wrapper over the setuid system call. Particularly useful when opening a network - # server on a privileged port because you can use this call to drop privileges - # after opening the port. Also very useful after a call to {.set_descriptor_table_size}, - # which generally requires that you start your process with root privileges. - # - # This method is intended for use in enforcing security requirements, consequently - # it will throw a fatal error and end your program if it fails. - # - # @param [String] username The effective name of the user whose privilege-level your process should attain. - # - # @note This method has no effective implementation on Windows or in the pure-Ruby - # implementation of EventMachine - def self.set_effective_user username - EventMachine::setuid_string username - end - - - # Sets the maximum number of file or socket descriptors that your process may open. - # If you call this method with no arguments, it will simply return - # the current size of the descriptor table without attempting to change it. - # - # The new limit on open descriptors **only** applies to sockets and other descriptors - # that belong to EventMachine. It has **no effect** on the number of descriptors - # you can create in ordinary Ruby code. - # - # Not available on all platforms. Increasing the number of descriptors beyond its - # default limit usually requires superuser privileges. (See {.set_effective_user} - # for a way to drop superuser privileges while your program is running.) - # - # @param [Integer] n_descriptors The maximum number of file or socket descriptors that your process may open - # @return [Integer] The new descriptor table size. - def self.set_descriptor_table_size n_descriptors=nil - EventMachine::set_rlimit_nofile n_descriptors - end - - - - # Runs an external process. - # - # @example - # - # module RubyCounter - # def post_init - # # count up to 5 - # send_data "5\n" - # end - # def receive_data data - # puts "ruby sent me: #{data}" - # end - # def unbind - # puts "ruby died with exit status: #{get_status.exitstatus}" - # end - # end - # - # EventMachine.run { - # EventMachine.popen("ruby -e' $stdout.sync = true; gets.to_i.times{ |i| puts i+1; sleep 1 } '", RubyCounter) - # } - # - # @note This method is not supported on Microsoft Windows - # @see EventMachine::DeferrableChildProcess - # @see EventMachine.system - def self.popen cmd, handler=nil, *args - # At this moment, it's only available on Unix. - # Perhaps misnamed since the underlying function uses socketpair and is full-duplex. - - klass = klass_from_handler(Connection, handler, *args) - w = case cmd - when Array - cmd - when String - Shellwords::shellwords( cmd ) - end - w.unshift( w.first ) if w.first - s = invoke_popen( w ) - c = klass.new s, *args - @conns[s] = c - yield(c) if block_given? - c - end - - - # Tells you whether the EventMachine reactor loop is currently running. - # - # Useful when writing libraries that want to run event-driven code, but may - # be running in programs that are already event-driven. In such cases, if {EventMachine.reactor_running?} - # returns false, your code can invoke {EventMachine.run} and run your application code inside - # the block passed to that method. If this method returns true, just - # execute your event-aware code. - # - # @return [Boolean] true if the EventMachine reactor loop is currently running - def self.reactor_running? - @reactor_running && Process.pid == @reactor_pid - end - - - # (Experimental) - # - # @private - def self.open_keyboard handler=nil, *args - klass = klass_from_handler(Connection, handler, *args) - - s = read_keyboard - c = klass.new s, *args - @conns[s] = c - block_given? and yield c - c - end - - # EventMachine's file monitoring API. Currently supported are the following events - # on individual files, using inotify on Linux systems, and kqueue for *BSD and Mac OS X: - # - # * File modified (written to) - # * File moved/renamed - # * File deleted - # - # EventMachine::watch_file takes a filename and a handler Module containing your custom callback methods. - # This will setup the low level monitoring on the specified file, and create a new EventMachine::FileWatch - # object with your Module mixed in. FileWatch is a subclass of {EventMachine::Connection}, so callbacks on this object - # work in the familiar way. The callbacks that will be fired by EventMachine are: - # - # * file_modified - # * file_moved - # * file_deleted - # - # You can access the filename being monitored from within this object using {FileWatch#path}. - # - # When a file is deleted, {FileWatch#stop_watching} will be called after your file_deleted callback, - # to clean up the underlying monitoring and remove EventMachine's reference to the now-useless {FileWatch} instance. - # This will in turn call unbind, if you wish to use it. - # - # The corresponding system-level Errno will be raised when attempting to monitor non-existent files, - # files with wrong permissions, or if an error occurs dealing with inotify/kqueue. - # - # @example - # - # # Before running this example, make sure we have a file to monitor: - # # $ echo "bar" > /tmp/foo - # - # module Handler - # def file_modified - # puts "#{path} modified" - # end - # - # def file_moved - # puts "#{path} moved" - # end - # - # def file_deleted - # puts "#{path} deleted" - # end - # - # def unbind - # puts "#{path} monitoring ceased" - # end - # end - # - # # for efficient file watching, use kqueue on Mac OS X - # EventMachine.kqueue = true if EventMachine.kqueue? - # - # EventMachine.run { - # EventMachine.watch_file("/tmp/foo", Handler) - # } - # - # # $ echo "baz" >> /tmp/foo => "/tmp/foo modified" - # # $ mv /tmp/foo /tmp/oof => "/tmp/foo moved" - # # $ rm /tmp/oof => "/tmp/foo deleted" - # - # @note The ability to pick up on the new filename after a rename is not yet supported. - # Calling #path will always return the filename you originally used. - # - # @param [String] filename Local path to the file to watch. - # @param [Class, Module] handler A class or module that implements event handlers associated with the file. - def self.watch_file(filename, handler=nil, *args) - klass = klass_from_handler(FileWatch, handler, *args) - - s = EM::watch_filename(filename) - c = klass.new s, *args - # we have to set the path like this because of how Connection.new works - c.instance_variable_set("@path", filename) - @conns[s] = c - block_given? and yield c - c - end - - # EventMachine's process monitoring API. On Mac OS X and *BSD this method is implemented using kqueue. - # - # @example - # - # module ProcessWatcher - # def process_exited - # put 'the forked child died!' - # end - # end - # - # pid = fork{ sleep } - # - # EventMachine.run { - # EventMachine.watch_process(pid, ProcessWatcher) - # EventMachine.add_timer(1){ Process.kill('TERM', pid) } - # } - # - # @param [Integer] pid PID of the process to watch. - # @param [Class, Module] handler A class or module that implements event handlers associated with the file. - def self.watch_process(pid, handler=nil, *args) - pid = pid.to_i - - klass = klass_from_handler(ProcessWatch, handler, *args) - - s = EM::watch_pid(pid) - c = klass.new s, *args - # we have to set the path like this because of how Connection.new works - c.instance_variable_set("@pid", pid) - @conns[s] = c - block_given? and yield c - c - end - - # Catch-all for errors raised during event loop callbacks. - # - # @example - # - # EventMachine.error_handler{ |e| - # puts "Error raised during event loop: #{e.message}" - # } - # - # @param [#call] cb Global catch-all errback - def self.error_handler cb = nil, &blk - if cb or blk - @error_handler = cb || blk - elsif instance_variable_defined? :@error_handler - remove_instance_variable :@error_handler - end - end - - # This method allows for direct writing of incoming data back out to another descriptor, at the C++ level in the reactor. - # This is very efficient and especially useful for proxies where high performance is required. Propogating data from a server response - # all the way up to Ruby, and then back down to the reactor to be sent back to the client, is often unnecessary and - # incurs a significant performance decrease. - # - # The two arguments are instance of {EventMachine::Connection} subclasses, 'from' and 'to'. 'from' is the connection whose inbound data you want - # relayed back out. 'to' is the connection to write it to. - # - # Once you call this method, the 'from' connection will no longer get receive_data callbacks from the reactor, - # except in the case that 'to' connection has already closed when attempting to write to it. You can see - # in the example, that proxy_target_unbound will be called when this occurs. After that, further incoming - # data will be passed into receive_data as normal. - # - # Note also that this feature supports different types of descriptors: TCP, UDP, and pipes. You can relay - # data from one kind to another, for example, feed a pipe from a UDP stream. - # - # @example - # - # module ProxyConnection - # def initialize(client, request) - # @client, @request = client, request - # end - # - # def post_init - # EM::enable_proxy(self, @client) - # end - # - # def connection_completed - # send_data @request - # end - # - # def proxy_target_unbound - # close_connection - # end - # - # def unbind - # @client.close_connection_after_writing - # end - # end - # - # module ProxyServer - # def receive_data(data) - # (@buf ||= "") << data - # if @buf =~ /\r\n\r\n/ # all http headers received - # EventMachine.connect("10.0.0.15", 80, ProxyConnection, self, data) - # end - # end - # end - # - # EventMachine.run { - # EventMachine.start_server("127.0.0.1", 8080, ProxyServer) - # } - # - # @param [EventMachine::Connection] from Source of data to be proxies/streamed. - # @param [EventMachine::Connection] to Destination of data to be proxies/streamed. - # @param [Integer] bufsize Buffer size to use - # @param [Integer] length Maximum number of bytes to proxy. - # - # @see EventMachine.disable_proxy - def self.enable_proxy(from, to, bufsize=0, length=0) - EM::start_proxy(from.signature, to.signature, bufsize, length) - end - - # Takes just one argument, a {Connection} that has proxying enabled via {EventMachine.enable_proxy}. - # Calling this method will remove that functionality and your connection will begin receiving - # data via {Connection#receive_data} again. - # - # @param [EventMachine::Connection] from Source of data that is being proxied - # @see EventMachine.enable_proxy - def self.disable_proxy(from) - EM::stop_proxy(from.signature) - end - - # Retrieve the heartbeat interval. This is how often EventMachine will check for dead connections - # that have had an inactivity timeout set via {Connection#set_comm_inactivity_timeout}. - # Default is 2 seconds. - # - # @return [Integer] Heartbeat interval, in seconds - def self.heartbeat_interval - EM::get_heartbeat_interval - end - - # Set the heartbeat interval. This is how often EventMachine will check for dead connections - # that have had an inactivity timeout set via {Connection#set_comm_inactivity_timeout}. - # Takes a Numeric number of seconds. Default is 2. - # - # @param [Integer] time Heartbeat interval, in seconds - def self.heartbeat_interval=(time) - EM::set_heartbeat_interval time.to_f - end - - # @private - def self.event_callback conn_binding, opcode, data - # - # Changed 27Dec07: Eliminated the hookable error handling. - # No one was using it, and it degraded performance significantly. - # It's in original_event_callback, which is dead code. - # - # Changed 25Jul08: Added a partial solution to the problem of exceptions - # raised in user-written event-handlers. If such exceptions are not caught, - # we must cause the reactor to stop, and then re-raise the exception. - # Otherwise, the reactor doesn't stop and it's left on the call stack. - # This is partial because we only added it to #unbind, where it's critical - # (to keep unbind handlers from being re-entered when a stopping reactor - # runs down open connections). It should go on the other calls to user - # code, but the performance impact may be too large. - # - if opcode == ConnectionUnbound - if c = @conns.delete( conn_binding ) - begin - if c.original_method(:unbind).arity != 0 - c.unbind(data == 0 ? nil : EventMachine::ERRNOS[data]) - else - c.unbind - end - # If this is an attached (but not watched) connection, close the underlying io object. - if c.instance_variable_defined?(:@io) and !c.instance_variable_get(:@watch_mode) - io = c.instance_variable_get(:@io) - begin - io.close - rescue Errno::EBADF, IOError - end - end - # As noted above, unbind absolutely must not raise an exception or the reactor will crash. - # If there is no EM.error_handler, or if the error_handler retrows, then stop the reactor, - # stash the exception in $wrapped_exception, and the exception will be raised after the - # reactor is cleaned up (see the last line of self.run). - rescue Exception => error - if instance_variable_defined? :@error_handler - begin - @error_handler.call error - # No need to stop unless error_handler rethrows - rescue Exception => error - @wrapped_exception = error - stop - end - else - @wrapped_exception = error - stop - end - end - elsif c = @acceptors.delete( conn_binding ) - # no-op - else - if $! # Bubble user generated errors. - @wrapped_exception = $! - stop - else - raise ConnectionNotBound, "received ConnectionUnbound for an unknown signature: #{conn_binding}" - end - end - elsif opcode == ConnectionAccepted - accep,args,blk = @acceptors[conn_binding] - raise NoHandlerForAcceptedConnection unless accep - c = accep.new data, *args - @conns[data] = c - blk and blk.call(c) - c # (needed?) - ## - # The remaining code is a fallback for the pure ruby and java reactors. - # In the C++ reactor, these events are handled in the C event_callback() in rubymain.cpp - elsif opcode == ConnectionCompleted - c = @conns[conn_binding] or raise ConnectionNotBound, "received ConnectionCompleted for unknown signature: #{conn_binding}" - c.connection_completed - elsif opcode == SslHandshakeCompleted - c = @conns[conn_binding] or raise ConnectionNotBound, "received SslHandshakeCompleted for unknown signature: #{conn_binding}" - c.ssl_handshake_completed - elsif opcode == SslVerify - c = @conns[conn_binding] or raise ConnectionNotBound, "received SslVerify for unknown signature: #{conn_binding}" - c.close_connection if c.ssl_verify_peer(data) == false - elsif opcode == TimerFired - t = @timers.delete( data ) - return if t == false # timer cancelled - t or raise UnknownTimerFired, "timer data: #{data}" - t.call - elsif opcode == ConnectionData - c = @conns[conn_binding] or raise ConnectionNotBound, "received data #{data} for unknown signature: #{conn_binding}" - c.receive_data data - elsif opcode == LoopbreakSignalled - run_deferred_callbacks - elsif opcode == ConnectionNotifyReadable - c = @conns[conn_binding] or raise ConnectionNotBound - c.notify_readable - elsif opcode == ConnectionNotifyWritable - c = @conns[conn_binding] or raise ConnectionNotBound - c.notify_writable - end - end - - # - # - # @private - def self._open_file_for_writing filename, handler=nil - klass = klass_from_handler(Connection, handler) - - s = _write_file filename - c = klass.new s - @conns[s] = c - block_given? and yield c - c - end - - # @private - def self.klass_from_handler(klass = Connection, handler = nil, *args) - klass = if handler and handler.is_a?(Class) - raise ArgumentError, "must provide module or subclass of #{klass.name}" unless klass >= handler - handler - elsif handler - if defined?(handler::EM_CONNECTION_CLASS) - handler::EM_CONNECTION_CLASS - else - handler::const_set(:EM_CONNECTION_CLASS, Class.new(klass) {include handler}) - end - else - klass - end - - arity = klass.instance_method(:initialize).arity - expected = arity >= 0 ? arity : -(arity + 1) - if (arity >= 0 and args.size != expected) or (arity < 0 and args.size < expected) - raise ArgumentError, "wrong number of arguments for #{klass}#initialize (#{args.size} for #{expected})" - end - - klass - end -end # module EventMachine - -# Alias for {EventMachine} -EM = EventMachine -# Alias for {EventMachine::Protocols} -EM::P = EventMachine::Protocols diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/fastfilereaderext.so b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/fastfilereaderext.so deleted file mode 100644 index 06daaf95..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/fastfilereaderext.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/jeventmachine.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/jeventmachine.rb deleted file mode 100644 index 21a267d7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/jeventmachine.rb +++ /dev/null @@ -1,316 +0,0 @@ -#-- -# -# Author:: Francis Cianfrocca (gmail: blackhedd) -# Homepage:: http://rubyeventmachine.com -# Date:: 8 Apr 2006 -# -# See EventMachine and EventMachine::Connection for documentation and -# usage examples. -# -#---------------------------------------------------------------------------- -# -# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved. -# Gmail: blackhedd -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of either: 1) the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version; or 2) Ruby's License. -# -# See the file COPYING for complete licensing information. -# -#--------------------------------------------------------------------------- -# -# - -# This module provides "glue" for the Java version of the EventMachine reactor core. -# For C++ EventMachines, the analogous functionality is found in ext/rubymain.cpp, -# which is a garden-variety Ruby-extension glue module. - -require 'java' -require 'rubyeventmachine' -require 'socket' - -java_import java.io.FileDescriptor -java_import java.nio.channels.SocketChannel -java_import java.lang.reflect.Field - -module JavaFields - def set_field(key, value) - field = getClass.getDeclaredField(key) - field.setAccessible(true) - if field.getType.toString == 'int' - field.setInt(self, value) - else - field.set(self, value) - end - end - - def get_field(key) - field = getClass.getDeclaredField(key) - field.setAccessible(true) - field.get(self) - end -end - -FileDescriptor.send :include, JavaFields -SocketChannel.send :include, JavaFields - -module EventMachine - # TODO: These event numbers are defined in way too many places. - # DRY them up. - # @private - TimerFired = 100 - # @private - ConnectionData = 101 - # @private - ConnectionUnbound = 102 - # @private - ConnectionAccepted = 103 - # @private - ConnectionCompleted = 104 - # @private - LoopbreakSignalled = 105 - # @private - ConnectionNotifyReadable = 106 - # @private - ConnectionNotifyWritable = 107 - # @private - SslHandshakeCompleted = 108 - # @private - SslVerify = 109 - - # @private - EM_PROTO_SSLv2 = 2 - # @private - EM_PROTO_SSLv3 = 4 - # @private - EM_PROTO_TLSv1 = 8 - # @private - EM_PROTO_TLSv1_1 = 16 - # @private - EM_PROTO_TLSv1_2 = 32 - - # Exceptions that are defined in rubymain.cpp - class ConnectionError < RuntimeError; end - class ConnectionNotBound < RuntimeError; end - class UnknownTimerFired < RuntimeError; end - class Unsupported < RuntimeError; end - - # This thunk class used to be called EM, but that caused conflicts with - # the alias "EM" for module EventMachine. (FC, 20Jun08) - class JEM < com.rubyeventmachine.EmReactor - def eventCallback a1, a2, a3, a4 - s = String.from_java_bytes(a3.array[a3.position...a3.limit]) if a3 - EventMachine::event_callback a1, a2, s || a4 - nil - end - end - # class Connection < com.rubyeventmachine.Connection - # def associate_callback_target sig - # # No-op for the time being. - # end - # end - def self.initialize_event_machine - @em = JEM.new - end - def self.release_machine - @em = nil - end - def self.add_oneshot_timer interval - @em.installOneshotTimer interval - end - def self.run_machine - @em.run - end - def self.stop - @em.stop - end - def self.start_tcp_server server, port - @em.startTcpServer server, port - end - def self.stop_tcp_server sig - @em.stopTcpServer sig - end - def self.start_unix_server filename - # TEMPORARILY unsupported until someone figures out how to do it. - raise "unsupported on this platform" - end - def self.send_data sig, data, length - @em.sendData sig, data.to_java_bytes - rescue java.lang.NullPointerException - 0 - end - def self.send_datagram sig, data, length, address, port - @em.sendDatagram sig, data.to_java_bytes, length, address, port - end - def self.connect_server server, port - bind_connect_server nil, nil, server, port - end - def self.bind_connect_server bind_addr, bind_port, server, port - @em.connectTcpServer bind_addr, bind_port.to_i, server, port - end - def self.close_connection sig, after_writing - @em.closeConnection sig, after_writing - end - def self.set_comm_inactivity_timeout sig, interval - @em.setCommInactivityTimeout sig, interval - end - def self.set_pending_connect_timeout sig, val - end - def self.set_heartbeat_interval val - end - def self.start_tls sig - @em.startTls sig - end - def self.ssl? - false - end - def self.signal_loopbreak - @em.signalLoopbreak - end - def self.set_timer_quantum q - @em.setTimerQuantum q - end - def self.epoll - # Epoll is a no-op for Java. - # The latest Java versions run epoll when possible in NIO. - end - def self.epoll= val - end - def self.kqueue - end - def self.kqueue= val - end - def self.epoll? - false - end - def self.kqueue? - false - end - def self.set_rlimit_nofile n_descriptors - # Currently a no-op for Java. - end - def self.open_udp_socket server, port - @em.openUdpSocket server, port - end - def self.invoke_popen cmd - # TEMPORARILY unsupported until someone figures out how to do it. - raise "unsupported on this platform" - end - def self.read_keyboard - # TEMPORARILY unsupported until someone figures out how to do it. - raise "temporarily unsupported on this platform" - end - def self.set_max_timer_count num - # harmless no-op in Java. There's no built-in timer limit. - @max_timer_count = num - end - def self.get_max_timer_count - # harmless no-op in Java. There's no built-in timer limit. - @max_timer_count || 100_000 - end - def self.library_type - :java - end - def self.get_peername sig - if peer = @em.getPeerName(sig) - Socket.pack_sockaddr_in(*peer) - end - end - def self.get_sockname sig - if sockName = @em.getSockName(sig) - Socket.pack_sockaddr_in(*sockName) - end - end - # @private - def self.attach_fd fileno, watch_mode - # 3Aug09: We could pass in the actual SocketChannel, but then it would be modified (set as non-blocking), and - # we would need some logic to make sure detach_fd below didn't clobber it. For now, we just always make a new - # SocketChannel for the underlying file descriptor - # if fileno.java_kind_of? SocketChannel - # ch = fileno - # ch.configureBlocking(false) - # fileno = nil - # elsif fileno.java_kind_of? java.nio.channels.Channel - - if fileno.java_kind_of? java.nio.channels.Channel - field = fileno.getClass.getDeclaredField('fdVal') - field.setAccessible(true) - fileno = field.get(fileno) - else - raise ArgumentError, 'attach_fd requires Java Channel or POSIX fileno' unless fileno.is_a? Integer - end - - if fileno == 0 - raise "can't open STDIN as selectable in Java =(" - elsif fileno.is_a? Integer - # 8Aug09: The following code is specific to the sun jvm's SocketChannelImpl. Is there a cross-platform - # way of implementing this? If so, also remember to update EventableSocketChannel#close and #cleanup - fd = FileDescriptor.new - fd.set_field 'fd', fileno - - ch = SocketChannel.open - ch.configureBlocking(false) - ch.kill - ch.set_field 'fd', fd - ch.set_field 'fdVal', fileno - ch.set_field 'state', ch.get_field('ST_CONNECTED') - end - - @em.attachChannel(ch,watch_mode) - end - def self.detach_fd sig - if ch = @em.detachChannel(sig) - ch.get_field 'fdVal' - end - end - - def self.set_notify_readable sig, mode - @em.setNotifyReadable(sig, mode) - end - def self.set_notify_writable sig, mode - @em.setNotifyWritable(sig, mode) - end - - def self.is_notify_readable sig - @em.isNotifyReadable(sig) - end - def self.is_notify_writable sig - @em.isNotifyWritable(sig) - end - def self.get_connection_count - @em.getConnectionCount - end - - def self.pause_connection(sig) - @em.pauseConnection(sig) - end - def self.resume_connection(sig) - @em.resumeConnection(sig) - end - def self.connection_paused?(sig) - @em.isConnectionPaused(sig) - end - def self._get_outbound_data_size(sig) - @em.getOutboundDataSize(sig) - end - - - def self.set_tls_parms(sig, params) - end - def self.start_tls(sig) - end - def self.send_file_data(sig, filename) - end - - class Connection - def associate_callback_target sig - # No-op for the time being - end - def get_outbound_data_size - EM._get_outbound_data_size @signature - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.so b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.so deleted file mode 100644 index 7c25a130..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/package.rake b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/package.rake deleted file mode 100644 index 00419d0b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/package.rake +++ /dev/null @@ -1,120 +0,0 @@ -require 'rubygems' -require 'rubygems/package_task' - -begin - require 'rake/extensiontask' - require 'rake/javaextensiontask' -rescue LoadError => e - puts <<-MSG -rake-compiler gem seems to be missing. Please install it with - - gem install rake-compiler - -(add sudo if necessary). - MSG -end - -Gem::PackageTask.new(GEMSPEC) do |pkg| -end - -if RUBY_PLATFORM =~ /java/ - Rake::JavaExtensionTask.new("rubyeventmachine", GEMSPEC) do |ext| - ext.ext_dir = 'java/src' - end -else - def setup_cross_compilation(ext) - unless RUBY_PLATFORM =~ /mswin|mingw/ - ext.cross_compile = true - ext.cross_platform = ['x86-mingw32', 'x64-mingw32'] - end - end - def hack_cross_compilation(ext) - # inject 1.8/1.9 pure-ruby entry point - # HACK: add these dependencies to the task instead of using cross_compiling - if ext.cross_platform.is_a?(Array) - ext.cross_platform.each do |platform| - task = "native:#{GEMSPEC.name}:#{platform}" - if Rake::Task.task_defined?(task) - Rake::Task[task].prerequisites.unshift "lib/#{ext.name}.rb" - end - end - end - end - - em = Rake::ExtensionTask.new("rubyeventmachine", GEMSPEC) do |ext| - ext.ext_dir = 'ext' - ext.source_pattern = '*.{h,c,cpp}' - setup_cross_compilation(ext) - end - hack_cross_compilation em - - ff = Rake::ExtensionTask.new("fastfilereaderext", GEMSPEC) do |ext| - ext.ext_dir = 'ext/fastfilereader' - ext.source_pattern = '*.{h,c,cpp}' - setup_cross_compilation(ext) - end - hack_cross_compilation ff -end - -# Setup shim files that require 1.8 vs 1.9 extensions in win32 bin gems -%w[ rubyeventmachine fastfilereaderext ].each do |filename| - file("lib/#{filename}.rb") do |t| - File.open(t.name, 'wb') do |f| - f.write <<-eoruby - RUBY_VERSION =~ /(\\d+.\\d+)/ - require "\#{$1}/#{File.basename(t.name, '.rb')}" - eoruby - end - at_exit{ FileUtils.rm t.name if File.exist?(t.name) } - end -end - -task :cross_cxx do - ENV['CROSS_COMPILING'] = 'yes' - require 'rake/extensioncompiler' - ENV['CXX'] = "#{Rake::ExtensionCompiler.mingw_host}-g++" -end - -if Rake::Task.task_defined?(:cross) - task :cross => 'lib/rubyeventmachine.rb' - task :cross => 'lib/fastfilereaderext.rb' - task :cross => :cross_cxx -end - -def windows?; RUBY_PLATFORM =~ /mswin|mingw/; end -def sudo(cmd) - if windows? || (require 'etc'; Etc.getpwuid.uid == 0) - sh cmd - else - sh "sudo #{cmd}" - end -end -def gem_cmd(action, name, *args) - rb = Gem.ruby rescue nil - rb ||= (require 'rbconfig'; File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])) - sudo "#{rb} -r rubygems -e 'require %{rubygems/gem_runner}; Gem::GemRunner.new.run(%w{#{action} #{name} #{args.join(' ')}})'" -end - -Rake::Task[:clean].enhance [:clobber_package] - -# DevKit task following the example of Luis Lavena's test-ruby-c-extension -task :devkit do - begin - require "devkit" - rescue LoadError => e - abort "Failed to activate RubyInstaller's DevKit required for compilation." - end -end - -if RUBY_PLATFORM =~ /mingw|mswin/ - Rake::Task['compile'].prerequisites.unshift 'devkit' -end - -desc "Build binary gems for Windows with rake-compiler-dock" -task 'gem:windows' do - require 'rake_compiler_dock' - RakeCompilerDock.sh <<-EOT - RUBY_CC_VERSION="${RUBY_CC_VERSION//1.8.7/}" - bundle && rake cross native gem - EOT -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/test.rake b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/test.rake deleted file mode 100644 index 1185ac70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/test.rake +++ /dev/null @@ -1,8 +0,0 @@ -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << "tests" - t.libs << "lib" - t.pattern = 'tests/**/test_*.rb' - t.warning = true -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/test_pure.rake b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/test_pure.rake deleted file mode 100644 index 5a84ded2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/rakelib/test_pure.rake +++ /dev/null @@ -1,13 +0,0 @@ -require 'rake/testtask' - -Rake::TestTask.new(:test_pure) do |t| - t.libs << 'tests' - t.libs << 'lib' - t.test_files = Dir.glob('tests/**/test_pure*.rb') + Dir.glob('tests/**/test_ssl*.rb') - t.warning = true -end - -task :test_em_pure_ruby do - ENV['EM_PURE_RUBY'] = 'true' - Rake::Task['test_pure'].execute -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/client.crt b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/client.crt deleted file mode 100644 index 1919d976..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/client.crt +++ /dev/null @@ -1,31 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFRDCCAywCAQEwDQYJKoZIhvcNAQEFBQAwaDELMAkGA1UEBhMCRU0xFTATBgNV -BAgTDEV2ZW50TWFjaGluZTEVMBMGA1UEChMMRXZlbnRNYWNoaW5lMRQwEgYDVQQL -EwtEZXZlbG9wbWVudDEVMBMGA1UEAxMMRXZlbnRNYWNoaW5lMB4XDTA5MDMyOTAy -MzE0NloXDTEwMDMyOTAyMzE0NlowaDELMAkGA1UEBhMCRU0xFTATBgNVBAgTDEV2 -ZW50TWFjaGluZTEVMBMGA1UEChMMRXZlbnRNYWNoaW5lMRQwEgYDVQQLEwtEZXZl -bG9wbWVudDEVMBMGA1UEAxMMRXZlbnRNYWNoaW5lMIICIjANBgkqhkiG9w0BAQEF -AAOCAg8AMIICCgKCAgEAv1FSOIX1z7CQtVBFlrB0A3/V29T+22STKKmiRWYkKL5b -+hkrp9IZ5J4phZHgUVM2VDPOO2Oc2PU6dlGGZISg+UPERun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u+4CI7meAh5gXM5nyJGbZvRPsxj89CqYzyHCYs5HBP3AsviBvn26ziOF+c -544VmHd9HkIv8UTC29hh+R64RlgMQQQdaXFaUrFPTs/do0k8n/c2bPc0iTdfi5Q2 -gq6Vi8q6Ay5wGgTtRRbn/mWKuCFjEh94z6pF9Xr06NX0PuEOdf+Ls9vI5vz6G0w6 -0Li7devEN7EKBY+7Mcjg918yq9i5tEiMkUgT68788t3fTC+4iUQ5fDtdrHsaOlIR -8bs/XQVNE/s= ------END CERTIFICATE----- diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/client.key b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/client.key deleted file mode 100644 index 87a25311..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/client.key +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKAIBAAKCAgEAv1FSOIX1z7CQtVBFlrB0A3/V29T+22STKKmiRWYkKL5b+hkr -p9IZ5J4phZHgUVM2VDPOO2Oc2PU6dlGGZISg+UPERunTogxQKezCV0vcE9cKOwzx -CFDRvv5rK8aKMscfBLbNKocAXywuRRQmdxPiVRzbyPrl+qCr/EDLXAX3D77lS8n2 -AwDg19VyI+IgFUE+Dy5e1eLoY6nV+Mq+vNXdn3ttF3t+ngac5pj5Q9h+pD5p67ba -DHSnf/7cy2fa/LKrLolVHQR9G2K6cEfeM99NtcsMbkoPs4iI3FA05OVTQHXgC8C8 -cRxrb9APl95I/ep65OIaCJgcdYxJ3QD3qOtQo6/NQsGnjbyiUxaEpjfqyT1NuzWD -81Q8uXGNS8yD6dDynt/lseBjyp2nfC3uQ5fY18VdIcu0MJ9pezBUKrNuhlsyXXEZ -2DXj4sY8QOvIcBqSB/zmS1nGEK55xrtkaiaNrY8fe8wRVpcPLxy+P225NFw+B69F -JRA0Lj6Jt9BM4hV/3MSIEWwTVhuw4E02ywDYTzz1wq3ITf0tsbIPn0hX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dEEKkvMe0YBBSFH5kWK/dIOjqkgBDes20fVnuuz/tL1dZW7IiIP4dzaV -ZGEOwBEatCfqYetv6b/u3IUxDfS7Wg8CggEBALoOwkn5LGdQg+bpdZAKJspGnJWL -Kyr9Al2tvgc69rxfpZqS5eDLkYYCzWPpspSt0Axm1O7xOUDQDt42luaLNGJzHZ2Q -Hn0ZNMhyHpe8d8mIQngRjD+nuLI/uFUglPzabDOCOln2aycjg1mA6ecXP1XMEVbu -0RB/0IE36XTMfZ+u9+TRjkBLpmUaX1FdIQQWfwUou/LfaXotoQlhSGAcprLrncuJ -T44UATYEgO/q9pMM33bdE3eBYZHoT9mSvqoLCN4s0LuwOYItIxLKUj0GulL0VQOI -SZi+0A1c8cVDXgApkBrWPDQIR9JS4de0gW4hnDoUvHtUc2TYPRnz6N9MtFY= ------END RSA PRIVATE KEY----- diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/dhparam.pem b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/dhparam.pem deleted file mode 100644 index b6464ab8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/dhparam.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN DH PARAMETERS----- -MIICCAKCAgEAikiatXa5aAteOtd6hOO33npjCvJByD3dwuM8rWzz0DFZdUH9nFJi -b0VvTVweVECb6XZBsrDNLqGQykCrm43swSk5D9XQCGJLxFERD6yk3b90xaeCm3/a -b0Ek5ZVvV73Cc/YbVmpBiOHoTFpUFJLZ7pLMQUSn8y3qUlNcY9/88HuwFi1s1lRM -ovihSRyZMYAuYWOD4yuOuIcroKVjD6gWFrsW9XrALWny6vUXQrhk8Q3rj+wM6ZtE -5afcB0b6ZJtphrDfk3dFjOVG/zVT37VWgrY8GABrpo2ey0W0WIQJ7rDKLaPaI4kc -voOgC2K8Z3kSARZK+jULnwmBeYECz4EH/FF6FEp3GOKtkL4mqEkvh1n5EAesDOGl -iiX+RZXcUrZliSeifSXBTMJWWFVC0fkGIMb9PTZfZHyAC54lpuxzVki0HIyQG9Fs -41zBJ5e8eEoXXlfUYtduUC35YGy2IxSzYLAJE76rctAZSWghha9xLOCDFoLjMr8h -FosKeHKJcBQ0bc8ymOpRIfrYLWhc0Pz2zkpJ/4eYw9t7NYg7S+jP19IE0gUnuM9v -SpoYMtS28tP9nEdokdwuBKD0D3bJEBBefDlHgfXoMgvy9Hivc9PBGGNTNpyFPpwF -sWVAkfhoNMJMC5V7LZsze+lftiDtzVoLSPDa9bO4BK7b/MgwCxfOhGsCAQI= ------END DH PARAMETERS----- diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/em_test_helper.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/em_test_helper.rb deleted file mode 100644 index 20a3e59a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/em_test_helper.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'em/pure_ruby' if ENV['EM_PURE_RUBY'] -require 'eventmachine' -require 'test/unit' -require 'rbconfig' -require 'socket' - -puts "EM Library Type: #{EM.library_type}" - -class Test::Unit::TestCase - class EMTestTimeout < StandardError ; end - - def setup_timeout(timeout = TIMEOUT_INTERVAL) - EM.schedule { - EM.add_timer(timeout) { - raise EMTestTimeout, "Test was cancelled after #{timeout} seconds." - } - } - end - - def port_in_use?(port, host="127.0.0.1") - s = TCPSocket.new(host, port) - s.close - s - rescue Errno::ECONNREFUSED - false - end - - def next_port - @@port ||= 9000 - begin - @@port += 1 - end while port_in_use?(@@port) - - @@port - end - - # Returns true if the host have a localhost 127.0.0.1 IPv4. - def self.local_ipv4? - return @@has_local_ipv4 if defined?(@@has_local_ipv4) - begin - get_my_ipv4_address "127.0.0.1" - @@has_local_ipv4 = true - rescue - @@has_local_ipv4 = false - end - end - - # Returns true if the host have a public IPv4 and stores it in - # @@public_ipv4. - def self.public_ipv4? - return @@has_public_ipv4 if defined?(@@has_public_ipv4) - begin - @@public_ipv4 = get_my_ipv4_address "1.2.3.4" - @@has_public_ipv4 = true - rescue - @@has_public_ipv4 = false - end - end - - # Returns true if the host have a localhost ::1 IPv6. - def self.local_ipv6? - return @@has_local_ipv6 if defined?(@@has_local_ipv6) - begin - get_my_ipv6_address "::1" - @@has_local_ipv6 = true - rescue - @@has_local_ipv6 = false - end - end - - # Returns true if the host have a public IPv6 and stores it in - # @@public_ipv6. - def self.public_ipv6? - return @@has_public_ipv6 if defined?(@@has_public_ipv6) - begin - @@public_ipv6 = get_my_ipv6_address "2001::1" - @@has_public_ipv6 = true - rescue - @@has_public_ipv6 = false - end - end - - # Returns an array with the localhost addresses (IPv4 and/or IPv6). - def local_ips - return @@local_ips if defined?(@@local_ips) - @@local_ips = [] - @@local_ips << "127.0.0.1" if self.class.local_ipv4? - @@local_ips << "::1" if self.class.local_ipv6? - @@local_ips - end - - def exception_class - jruby? ? NativeException : RuntimeError - end - - module PlatformHelper - # http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/ - def windows? - RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ - end - - def solaris? - RUBY_PLATFORM =~ /solaris/ - end - - # http://stackoverflow.com/questions/1342535/how-can-i-tell-if-im-running-from-jruby-vs-ruby/1685970#1685970 - def jruby? - defined? JRUBY_VERSION - end - - def rbx? - defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx' - end - end - - include PlatformHelper - extend PlatformHelper - - # Tests run significantly slower on windows. YMMV - TIMEOUT_INTERVAL = windows? ? 1 : 0.25 - - def silent - backup, $VERBOSE = $VERBOSE, nil - begin - yield - ensure - $VERBOSE = backup - end - end - - - private - - def self.get_my_ipv4_address ip - orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily - UDPSocket.open(Socket::AF_INET) do |s| - s.connect ip, 1 - s.addr.last - end - ensure - Socket.do_not_reverse_lookup = orig - end - - def self.get_my_ipv6_address ip - orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily - UDPSocket.open(Socket::AF_INET6) do |s| - s.connect ip, 1 - s.addr.last - end - ensure - Socket.do_not_reverse_lookup = orig - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_attach.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_attach.rb deleted file mode 100644 index 4a55017c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_attach.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'em_test_helper' -require 'socket' - -class TestAttach < Test::Unit::TestCase - class EchoServer < EM::Connection - def receive_data data - $received_data << data - send_data data - end - end - - class EchoClient < EM::Connection - def initialize socket - self.notify_readable = true - @socket = socket - @socket.write("abc\n") - end - - def notify_readable - $read = @socket.readline - $fd = detach - end - - def unbind - EM.next_tick do - @socket.write("def\n") - EM.add_timer(0.1) { EM.stop } - end - end - end - - def setup - @port = next_port - $read, $r, $w, $fd = nil - $received_data = "" - end - - def teardown - [$r, $w].each do |io| - io.close rescue nil - end - $received_data = nil - end - - def test_attach - socket = nil - - EM.run { - EM.start_server "127.0.0.1", @port, EchoServer - socket = TCPSocket.new "127.0.0.1", @port - EM.watch socket, EchoClient, socket - } - - assert_equal $read, "abc\n" - unless jruby? # jruby filenos are not real - assert_equal $fd, socket.fileno - end - assert_equal false, socket.closed? - assert_equal socket.readline, "def\n" - end - - module PipeWatch - def notify_readable - $read = $r.readline - EM.stop - end - end - - def test_attach_server - omit_if(jruby?) - $before = TCPServer.new("127.0.0.1", @port) - sig = nil - EM.run { - sig = EM.attach_server $before, EchoServer - - handler = Class.new(EM::Connection) do - def initialize - send_data "hello world" - close_connection_after_writing - EM.add_timer(0.1) { EM.stop } - end - end - EM.connect("127.0.0.1", @port, handler) - } - - assert_equal false, $before.closed? - assert_equal "hello world", $received_data - assert sig.is_a?(Integer) - end - - def test_attach_pipe - EM.run{ - $r, $w = IO.pipe - EM.watch $r, PipeWatch do |c| - c.notify_readable = true - end - $w.write("ghi\n") - } - - assert_equal $read, "ghi\n" - end - - def test_set_readable - before, after = nil - - EM.run{ - $r, $w = IO.pipe - c = EM.watch $r, PipeWatch do |con| - con.notify_readable = false - end - - EM.next_tick{ - before = c.notify_readable? - c.notify_readable = true - after = c.notify_readable? - } - - $w.write("jkl\n") - } - - assert !before - assert after - assert_equal $read, "jkl\n" - end - - def test_read_write_pipe - result = nil - - pipe_reader = Module.new do - define_method :receive_data do |data| - result = data - EM.stop - end - end - - r,w = IO.pipe - - EM.run { - EM.attach r, pipe_reader - writer = EM.attach(w) - writer.send_data 'ghi' - - # XXX: Process will hang in Windows without this line - writer.close_connection_after_writing - } - - assert_equal "ghi", result - ensure - [r,w].each {|io| io.close rescue nil } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_basic.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_basic.rb deleted file mode 100644 index 4d725240..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_basic.rb +++ /dev/null @@ -1,321 +0,0 @@ -require 'em_test_helper' -require 'socket' - -class TestBasic < Test::Unit::TestCase - def setup - @port = next_port - end - - def test_connection_class_cache - mod = Module.new - a, b = nil, nil - EM.run { - EM.start_server '127.0.0.1', @port, mod - a = EM.connect '127.0.0.1', @port, mod - b = EM.connect '127.0.0.1', @port, mod - EM.stop - } - assert_equal a.class, b.class - assert_kind_of EM::Connection, a - end - - #------------------------------------- - - - def test_em - assert_nothing_raised do - EM.run { - setup_timeout - EM.add_timer 0 do - EM.stop - end - } - end - end - - #------------------------------------- - - def test_timer - assert_nothing_raised do - EM.run { - setup_timeout - n = 0 - EM.add_periodic_timer(0.1) { - n += 1 - EM.stop if n == 2 - } - } - end - end - - #------------------------------------- - - # This test once threw an already-running exception. - module Trivial - def post_init - EM.stop - end - end - - def test_server - assert_nothing_raised do - EM.run { - setup_timeout - EM.start_server "127.0.0.1", @port, Trivial - EM.connect "127.0.0.1", @port - } - end - end - - #-------------------------------------- - - # EM#run_block starts the reactor loop, runs the supplied block, and then STOPS - # the loop automatically. Contrast with EM#run, which keeps running the reactor - # even after the supplied block completes. - def test_run_block - assert !EM.reactor_running? - a = nil - EM.run_block { a = "Worked" } - assert a - assert !EM.reactor_running? - end - - class UnbindError < EM::Connection - ERR = Class.new(StandardError) - def initialize *args - super - end - def connection_completed - close_connection_after_writing - end - def unbind - raise ERR - end - end - - def test_unbind_error_during_stop - assert_raises( UnbindError::ERR ) { - EM.run { - EM.start_server "127.0.0.1", @port - EM.connect "127.0.0.1", @port, UnbindError do - EM.stop - end - } - } - end - - def test_unbind_error - EM.run { - EM.error_handler do |e| - assert(e.is_a?(UnbindError::ERR)) - EM.stop - end - EM.start_server "127.0.0.1", @port - EM.connect "127.0.0.1", @port, UnbindError - } - - # Remove the error handler before the next test - EM.error_handler(nil) - end - - module BrsTestSrv - def receive_data data - $received << data - end - def unbind - EM.stop - end - end - module BrsTestCli - def post_init - send_data $sent - close_connection_after_writing - end - end - - # From ticket #50 - def test_byte_range_send - $received = '' - $sent = (0..255).to_a.pack('C*') - EM::run { - EM::start_server "127.0.0.1", @port, BrsTestSrv - EM::connect "127.0.0.1", @port, BrsTestCli - - setup_timeout - } - assert_equal($sent, $received) - end - - def test_bind_connect - pend('FIXME: this test is broken on Windows') if windows? - - local_ip = UDPSocket.open {|s| s.connect('localhost', 80); s.addr.last } - - bind_port = next_port - - port, ip = nil - bound_server = Module.new do - define_method :post_init do - begin - port, ip = Socket.unpack_sockaddr_in(get_peername) - ensure - EM.stop - end - end - end - - EM.run do - setup_timeout - EM.start_server "127.0.0.1", @port, bound_server - EM.bind_connect local_ip, bind_port, "127.0.0.1", @port - end - - assert_equal bind_port, port - assert_equal local_ip, ip - end - - def test_invalid_address_bind_connect_dst - e = nil - EM.run do - begin - EM.bind_connect('localhost', nil, 'invalid.invalid', 80) - rescue Exception => e - # capture the exception - ensure - EM.stop - end - end - - assert_kind_of(EventMachine::ConnectionError, e) - assert_match(/unable to resolve address:.*not known/, e.message) - end - - def test_invalid_address_bind_connect_src - e = nil - EM.run do - begin - EM.bind_connect('invalid.invalid', nil, 'localhost', 80) - rescue Exception => e - # capture the exception - ensure - EM.stop - end - end - - assert_kind_of(EventMachine::ConnectionError, e) - assert_match(/invalid bind address:.*not known/, e.message) - end - - def test_reactor_thread? - assert !EM.reactor_thread? - EM.run { assert EM.reactor_thread?; EM.stop } - assert !EM.reactor_thread? - end - - def test_schedule_on_reactor_thread - x = false - EM.run do - EM.schedule { x = true } - EM.stop - end - assert x - end - - def test_schedule_from_thread - x = false - EM.run do - Thread.new { EM.schedule { x = true; EM.stop } }.join - end - assert x - end - - def test_set_heartbeat_interval - omit_if(jruby?) - interval = 0.5 - EM.run { - EM.set_heartbeat_interval interval - $interval = EM.get_heartbeat_interval - EM.stop - } - assert_equal(interval, $interval) - end - - module PostInitRaiser - ERR = Class.new(StandardError) - def post_init - raise ERR - end - end - - def test_bubble_errors_from_post_init - assert_raises(PostInitRaiser::ERR) do - EM.run do - EM.start_server "127.0.0.1", @port - EM.connect "127.0.0.1", @port, PostInitRaiser - end - end - end - - module InitializeRaiser - ERR = Class.new(StandardError) - def initialize - raise ERR - end - end - - def test_bubble_errors_from_initialize - assert_raises(InitializeRaiser::ERR) do - EM.run do - EM.start_server "127.0.0.1", @port - EM.connect "127.0.0.1", @port, InitializeRaiser - end - end - end - - def test_schedule_close - omit_if(jruby?) - localhost, port = '127.0.0.1', 9000 - timer_ran = false - num_close_scheduled = nil - EM.run do - assert_equal 0, EM.num_close_scheduled - EM.add_timer(1) { timer_ran = true; EM.stop } - EM.start_server localhost, port do |s| - s.close_connection - num_close_scheduled = EM.num_close_scheduled - end - EM.connect localhost, port do |c| - def c.unbind - EM.stop - end - end - end - assert !timer_ran - assert_equal 1, num_close_scheduled - end - - def test_error_handler_idempotent # issue 185 - errors = [] - ticks = [] - EM.error_handler do |e| - errors << e - end - - EM.run do - EM.next_tick do - ticks << :first - raise - end - EM.next_tick do - ticks << :second - end - EM.add_timer(0.001) { EM.stop } - end - - # Remove the error handler before the next test - EM.error_handler(nil) - - assert_equal 1, errors.size - assert_equal [:first, :second], ticks - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_channel.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_channel.rb deleted file mode 100644 index c54bf1da..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_channel.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'em_test_helper' - -class TestEMChannel < Test::Unit::TestCase - def test_channel_subscribe - s = 0 - EM.run do - c = EM::Channel.new - c.subscribe { |v| s = v; EM.stop } - c << 1 - end - assert_equal 1, s - end - - def test_channel_unsubscribe - s = 0 - EM.run do - c = EM::Channel.new - subscription = c.subscribe { |v| s = v } - c.unsubscribe(subscription) - c << 1 - EM.next_tick { EM.stop } - end - assert_not_equal 1, s - end - - def test_channel_pop - s = 0 - EM.run do - c = EM::Channel.new - c.pop{ |v| s = v } - c.push(1,2,3) - c << 4 - c << 5 - EM.next_tick { EM.stop } - end - assert_equal 1, s - end - - def test_channel_reactor_thread_push - out = [] - c = EM::Channel.new - c.subscribe { |v| out << v } - Thread.new { c.push(1,2,3) }.join - assert out.empty? - - EM.run { EM.next_tick { EM.stop } } - - assert_equal [1,2,3], out - end - - def test_channel_reactor_thread_callback - out = [] - c = EM::Channel.new - Thread.new { c.subscribe { |v| out << v } }.join - c.push(1,2,3) - assert out.empty? - - EM.run { EM.next_tick { EM.stop } } - - assert_equal [1,2,3], out - end - - def test_channel_num_subscribers - subs = 0 - EM.run do - c = EM::Channel.new - c.subscribe { |v| s = v } - c.subscribe { |v| s = v } - EM.next_tick { EM.stop } - subs = c.num_subscribers - end - - assert_equal subs, 2 - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_completion.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_completion.rb deleted file mode 100644 index 1bd9a8f4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_completion.rb +++ /dev/null @@ -1,178 +0,0 @@ -require 'em_test_helper' -require 'em/completion' - -class TestCompletion < Test::Unit::TestCase - def completion - @completion ||= EM::Completion.new - end - - def crank - # This is a slow solution, but this just executes the next tick queue - # once. It's the easiest way for now. - EM.run { EM.stop } - end - - def results - @results ||= [] - end - - def test_state - assert_equal :unknown, completion.state - end - - def test_succeed - completion.callback { |val| results << val } - completion.succeed :object - crank - assert_equal :succeeded, completion.state - assert_equal [:object], results - end - - def test_fail - completion.errback { |val| results << val } - completion.fail :object - crank - assert_equal :failed, completion.state - assert_equal [:object], results - end - - def test_callback - completion.callback { results << :callback } - completion.errback { results << :errback } - completion.succeed - crank - assert_equal [:callback], results - end - - def test_errback - completion.callback { results << :callback } - completion.errback { results << :errback } - completion.fail - crank - assert_equal [:errback], results - end - - def test_stateback - completion.stateback(:magic) { results << :stateback } - completion.change_state(:magic) - crank - assert_equal [:stateback], results - end - - def test_does_not_enqueue_when_completed - completion.callback { results << :callback } - completion.succeed - completion.errback { results << :errback } - completion.fail - crank - assert_equal [:callback], results - end - - def test_completed - assert_equal false, completion.completed? - completion.succeed - assert_equal true, completion.completed? - completion.fail - assert_equal true, completion.completed? - completion.change_state :magic - assert_equal false, completion.completed? - end - - def test_recursive_callbacks - completion.callback do |val| - results << val - completion.succeed :two - end - completion.callback do |val| - results << val - completion.succeed :three - end - completion.callback do |val| - results << val - end - completion.succeed :one - crank - assert_equal [:one, :two, :three], results - end - - def test_late_defined_callbacks - completion.callback { results << :one } - completion.succeed - crank - assert_equal [:one], results - completion.callback { results << :two } - crank - assert_equal [:one, :two], results - end - - def test_cleared_completions - completion.callback { results << :callback } - completion.errback { results << :errback } - - completion.succeed - crank - completion.fail - crank - completion.succeed - crank - - assert_equal [:callback], results - end - - def test_skip_completed_callbacks - completion.callback { results << :callback } - completion.succeed - crank - - completion.errback { results << :errback } - completion.fail - crank - - assert_equal [:callback], results - end - - def test_completions - completion.completion { results << :completion } - completion.succeed - crank - assert_equal [:completion], results - - completion.change_state(:unknown) - results.clear - - completion.completion { results << :completion } - completion.fail - crank - assert_equal [:completion], results - end - - def test_latent_completion - completion.completion { results << :completion } - completion.succeed - crank - completion.completion { results << :completion } - crank - assert_equal [:completion, :completion], results - end - - def test_timeout - args = [1, 2, 3] - EM.run do - completion.timeout(0.0001, *args) - completion.errback { |*errargs| results << errargs } - completion.completion { EM.stop } - EM.add_timer(0.1) { flunk 'test timed out' } - end - assert_equal [[1,2,3]], results - end - - def test_timeout_gets_cancelled - EM.run do - completion.timeout(0.0001, :timeout) - completion.errback { results << :errback } - completion.succeed - EM.add_timer(0.0002) { EM.stop } - end - assert_equal [], results - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_connection_count.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_connection_count.rb deleted file mode 100644 index 350c4177..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_connection_count.rb +++ /dev/null @@ -1,83 +0,0 @@ -require 'em_test_helper' - -class TestConnectionCount < Test::Unit::TestCase - def teardown - EM.epoll = false - EM.kqueue = false - end - - def test_idle_connection_count - count = nil - EM.run { - count = EM.connection_count - EM.stop_event_loop - } - assert_equal(0, count) - end - - # Run this again with epoll enabled (if available) - def test_idle_connection_count_epoll - EM.epoll if EM.epoll? - - count = nil - EM.run { - count = EM.connection_count - EM.stop_event_loop - } - assert_equal(0, count) - end - - # Run this again with kqueue enabled (if available) - def test_idle_connection_count_kqueue - EM.kqueue if EM.kqueue? - - count = nil - EM.run { - count = EM.connection_count - EM.stop_event_loop - } - assert_equal(0, count) - end - - module Client - def connection_completed - $client_conns += 1 - EM.stop if $client_conns == 3 - end - end - - def test_with_some_connections - EM.run { - $client_conns = 0 - $initial_conns = EM.connection_count - EM.start_server("127.0.0.1", 9999) - $server_conns = EM.connection_count - 3.times { EM.connect("127.0.0.1", 9999, Client) } - } - - assert_equal(0, $initial_conns) - assert_equal(1, $server_conns) - assert_equal(4, $client_conns + $server_conns) - end - - module DoubleCloseClient - def unbind - close_connection - $num_close_scheduled_1 = EM.num_close_scheduled - EM.next_tick do - $num_close_scheduled_2 = EM.num_close_scheduled - EM.stop - end - end - end - - def test_num_close_scheduled - omit_if(jruby?) - EM.run { - assert_equal(0, EM.num_close_scheduled) - EM.connect("127.0.0.1", 9999, DoubleCloseClient) # nothing listening on 9999 - } - assert_equal(1, $num_close_scheduled_1) - assert_equal(0, $num_close_scheduled_2) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_connection_write.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_connection_write.rb deleted file mode 100644 index 35533b52..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_connection_write.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'em_test_helper' - -class TestConnectionWrite < Test::Unit::TestCase - - # This test takes advantage of the fact that EM::_RunSelectOnce iterates over the connections twice: - # - once to determine which ones to call Write() on - # - and once to call Write() on each of them. - # - # But state may change in the meantime before Write() is finally called. - # And that is what we try to exploit to get Write() to be called when bWatchOnly is true, and bNotifyWritable is false, - # to cause an assertion failure. - - module SimpleClient - def notify_writable - $conn2.notify_writable = false # Being naughty in callback - # If this doesn't crash anything, the test passed! - end - end - - def test_with_naughty_callback - EM.run do - r1, _ = IO.pipe - r2, _ = IO.pipe - - # Adding EM.watches - $conn1 = EM.watch(r1, SimpleClient) - $conn2 = EM.watch(r2, SimpleClient) - - $conn1.notify_writable = true - $conn2.notify_writable = true - - EM.stop - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_defer.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_defer.rb deleted file mode 100644 index aeca127d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_defer.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'em_test_helper' - -class TestDefer < Test::Unit::TestCase - - def test_defers - n = 0 - n_times = 20 - EM.run { - n_times.times { - work_proc = proc { n += 1 } - callback = proc { EM.stop if n == n_times } - EM.defer work_proc, callback - } - } - assert_equal( n, n_times ) - end - - def test_errbacks - iterations = 20 - callback_parameter = rand(100) - callback_parameters = [] - callback_op = proc { callback_parameter } - callback = proc { |result| callback_parameters << result } - errback_parameter = Exception.new - errback_parameters = [] - errback_op = proc { raise errback_parameter } - errback = proc { |error| errback_parameters << error } - EventMachine.run do - (1..iterations).each { |index| EventMachine.defer(index.even? ? callback_op : errback_op, callback, errback) } - EventMachine.add_periodic_timer(0.1) { EventMachine.stop if EventMachine.defers_finished? } - end - assert_equal(callback_parameters.select { |parameter| parameter == callback_parameter }.length, iterations * 0.5) - assert_equal(errback_parameters.select{ |parameter| parameter == errback_parameter }.length, iterations * 0.5) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_deferrable.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_deferrable.rb deleted file mode 100644 index 5f286a77..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_deferrable.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'em_test_helper' - -class TestDeferrable < Test::Unit::TestCase - class Later - include EM::Deferrable - end - - def test_timeout_without_args - assert_nothing_raised do - EM.run { - df = Later.new - df.timeout(0) - df.errback { EM.stop } - EM.add_timer(0.01) { flunk "Deferrable was not timed out." } - } - end - end - - def test_timeout_with_args - args = nil - - EM.run { - df = Later.new - df.timeout(0, :timeout, :foo) - df.errback do |type, name| - args = [type, name] - EM.stop - end - - EM.add_timer(0.01) { flunk "Deferrable was not timed out." } - } - - assert_equal [:timeout, :foo], args - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_epoll.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_epoll.rb deleted file mode 100644 index 36f5609a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_epoll.rb +++ /dev/null @@ -1,142 +0,0 @@ -require 'em_test_helper' - - -class TestEpoll < Test::Unit::TestCase - - module TestEchoServer - def receive_data data - send_data data - close_connection_after_writing - end - end - - module TestEchoClient - def connection_completed - send_data "ABCDE" - $max += 1 - end - def receive_data data - raise "bad response" unless data == "ABCDE" - end - def unbind - $n -= 1 - EM.stop if $n == 0 - end - end - - - # We can set the rlimit/nofile of a process but we can only set it - # higher if we're running as root. - # On most systems, the default value is 1024. - def test_rlimit - omit_if(windows? || jruby?) - unless EM.set_descriptor_table_size >= 1024 - a = EM.set_descriptor_table_size - assert( a <= 1024 ) - a = EM.set_descriptor_table_size( 1024 ) - assert( a == 1024 ) - end - end - - # Run a high-volume version of this test by kicking the number of connections - # up past 512. (Each connection uses two sockets, a client and a server.) - # (Will require running the test as root) - # This test exercises TCP clients and servers. - # - # XXX this test causes all sort of weird issues on OSX (when run as part of the suite) - def _test_descriptors - EM.epoll - EM.set_descriptor_table_size 60000 - EM.run { - EM.start_server "127.0.0.1", 9800, TestEchoServer - $n = 0 - $max = 0 - 100.times { - EM.connect("127.0.0.1", 9800, TestEchoClient) {$n += 1} - } - } - assert_equal(0, $n) - assert_equal(100, $max) - end - - def setup - @port = next_port - end - - module TestDatagramServer - def receive_data dgm - $in = dgm - send_data "abcdefghij" - end - end - module TestDatagramClient - def initialize port - @port = port - end - - def post_init - send_datagram "1234567890", "127.0.0.1", @port - end - - def receive_data dgm - $out = dgm - EM.stop - end - end - - def test_datagrams - $in = $out = "" - EM.run { - EM.open_datagram_socket "127.0.0.1", @port, TestDatagramServer - EM.open_datagram_socket "127.0.0.1", 0, TestDatagramClient, @port - } - assert_equal( "1234567890", $in ) - assert_equal( "abcdefghij", $out ) - end - - # XXX this test fails randomly... - def _test_unix_domain - fn = "/tmp/xxx.chain" - EM.epoll - EM.set_descriptor_table_size 60000 - EM.run { - # The pure-Ruby version won't let us open the socket if the node already exists. - # Not sure, that actually may be correct and the compiled version is wrong. - # Pure Ruby also oddly won't let us make that many connections. This test used - # to run 100 times. Not sure where that lower connection-limit is coming from in - # pure Ruby. - # Let's not sweat the Unix-ness of the filename, since this test can't possibly - # work on Windows anyway. - # - File.unlink(fn) if File.exist?(fn) - EM.start_unix_domain_server fn, TestEchoServer - $n = 0 - $max = 0 - 50.times { - EM.connect_unix_domain(fn, TestEchoClient) {$n += 1} - } - EM::add_timer(1) { $stderr.puts("test_unix_domain timed out!"); EM::stop } - } - assert_equal(0, $n) - assert_equal(50, $max) - ensure - File.unlink(fn) if File.exist?(fn) - end - - def test_attach_detach - EM.epoll - EM.run { - EM.add_timer(0.01) { EM.stop } - - r, _ = IO.pipe - - # This tests a regression where detach in the same tick as attach crashes EM - EM.watch(r) do |connection| - connection.detach - end - } - - assert true - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_error_handler.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_error_handler.rb deleted file mode 100644 index 23c23f74..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_error_handler.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'em_test_helper' - -class TestErrorHandler < Test::Unit::TestCase - def setup - @exception = Class.new(StandardError) - end - - def test_error_handler - error = nil - - EM.error_handler{ |e| - error = e - EM.error_handler(nil) - EM.stop - } - - assert_nothing_raised do - EM.run{ - EM.add_timer(0){ - raise @exception, 'test' - } - } - end - - assert_equal error.class, @exception - assert_equal error.message, 'test' - end - - def test_without_error_handler - assert_raise @exception do - EM.run{ - EM.add_timer(0){ - raise @exception, 'test' - } - } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_exc.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_exc.rb deleted file mode 100644 index d9c860ae..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_exc.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'em_test_helper' - -class TestSomeExceptions < Test::Unit::TestCase - class DoomedConnectionError < StandardError - end - class DoomedConnection < EventMachine::Connection - def unbind - raise DoomedConnectionError - end - end - - # Read the commentary in EM#run. - # This test exercises the ensure block in #run that makes sure - # EM#release_machine gets called even if an exception is - # thrown within the user code. Without the ensured call to release_machine, - # the second call to EM#run will fail with a C++ exception - # because the machine wasn't cleaned up properly. - - def test_a - assert_raises(RuntimeError) { - EM.run { - raise "some exception" - } - } - end - - def test_b - assert_raises(RuntimeError) { - EM.run { - raise "some exception" - } - } - end - - def test_exception_on_unbind - assert_raises(DoomedConnectionError) { - EM.run { - EM.connect("localhost", 8888, DoomedConnection) - } - } - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_file_watch.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_file_watch.rb deleted file mode 100644 index 56020717..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_file_watch.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'em_test_helper' -require 'tempfile' - -class TestFileWatch < Test::Unit::TestCase - if windows? - def test_watch_file_raises_unsupported_error - assert_raises(EM::Unsupported) do - EM.run do - file = Tempfile.new("fake_file") - EM.watch_file(file.path) - end - end - end - elsif EM.respond_to? :watch_filename - module FileWatcher - def file_modified - $modified = true - end - def file_deleted - $deleted = true - end - def unbind - $unbind = true - EM.stop - end - end - - def setup - EM.kqueue = true if EM.kqueue? - end - - def teardown - EM.kqueue = false if EM.kqueue? - end - - def test_events - omit_if(solaris?) - EM.run{ - file = Tempfile.new('em-watch') - $tmp_path = file.path - - # watch it - watch = EM.watch_file(file.path, FileWatcher) - $path = watch.path - - # modify it - File.open(file.path, 'w'){ |f| f.puts 'hi' } - - # delete it - EM.add_timer(0.01){ file.close; file.delete } - } - - assert_equal($path, $tmp_path) - assert($modified) - assert($deleted) - assert($unbind) - end - - # Refer: https://github.com/eventmachine/eventmachine/issues/512 - def test_invalid_signature - # This works fine with kqueue, only fails with linux inotify. - omit_if(EM.kqueue?) - - EM.run { - file = Tempfile.new('foo') - - w1 = EventMachine.watch_file(file.path) - w2 = EventMachine.watch_file(file.path) - - assert_raise EventMachine::InvalidSignature do - w2.stop_watching - end - - EM.stop - } - end - else - warn "EM.watch_file not implemented, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests - def test_em_watch_file_unsupported - assert true - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_fork.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_fork.rb deleted file mode 100644 index 8b15bb58..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_fork.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'em_test_helper' - -class TestFork < Test::Unit::TestCase - - def test_fork_safe - omit_if(jruby?) - omit_if(windows?) - - fork_pid = nil - read, write = IO.pipe - EM.run do - fork_pid = fork do - write.puts "forked" - EM.run do - EM.next_tick do - write.puts "EM ran" - EM.stop - end - end - end - EM.stop - end - - sleep 0.1 - begin - Timeout::timeout 1 do - assert_equal "forked\n", read.readline - assert_equal "EM ran\n", read.readline - end - rescue Timeout::Error - Process.kill 'TERM', fork_pid - flunk "Timeout waiting for next_tick in new fork reactor" - end - ensure - read.close rescue nil - write.close rescue nil - end - - def test_fork_reactor - omit_if(jruby?) - omit_if(windows?) - - fork_pid = nil - read, write = IO.pipe - EM.run do - EM.defer do - write.puts Process.pid - EM.defer do - EM.stop - end - end - fork_pid = EM.fork_reactor do - EM.defer do - write.puts Process.pid - EM.stop - end - end - end - - sleep 0.1 - begin - Timeout::timeout 1 do - assert_equal Process.pid.to_s, read.readline.chomp - assert_equal fork_pid.to_s, read.readline.chomp - end - rescue Timeout::Error - Process.kill 'TERM', fork_pid - flunk "Timeout waiting for deferred block in fork_reactor" - end - ensure - read.close rescue nil - write.close rescue nil - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_futures.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_futures.rb deleted file mode 100644 index b4948567..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_futures.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'em_test_helper' - -class TestFutures < Test::Unit::TestCase - - def setup - end - - def teardown - end - - def test_future - assert_equal(100, EM::Deferrable.future(100) ) - - p1 = proc { 100 + 1 } - assert_equal(101, EM::Deferrable.future(p1) ) - end - - class MyFuture - include EM::Deferrable - def initialize *args - super - set_deferred_status :succeeded, 40 - end - end - - class MyErrorFuture - include EM::Deferrable - def initialize *args - super - set_deferred_status :failed, 41 - end - end - - - def test_future_1 - # Call future with one additional argument and it will be treated as a callback. - def my_future - MyFuture.new - end - - value = nil - EM::Deferrable.future my_future, proc {|v| value=v} - assert_equal( 40, value ) - end - - - def test_future_2 - # Call future with two additional arguments and they will be treated as a callback - # and an errback. - value = nil - EM::Deferrable.future MyErrorFuture.new, nil, proc {|v| value=v} - assert_equal( 41, value ) - end - - - def test_future_3 - # Call future with no additional arguments but with a block, and the block will be - # treated as a callback. - value = nil - EM::Deferrable.future MyFuture.new do |v| - value=v - end - assert_equal( 40, value ) - end - - - class RecursiveCallback - include EM::Deferrable - end - - # A Deferrable callback can call #set_deferred_status to change the values - # passed to subsequent callbacks. - # - def test_recursive_callbacks - n = 0 # counter assures that all the tests actually run. - rc = RecursiveCallback.new - rc.callback {|a| - assert_equal(100, a) - n += 1 - rc.set_deferred_status :succeeded, 101, 101 - } - rc.callback {|a,b| - assert_equal(101, a) - assert_equal(101, b) - n += 1 - rc.set_deferred_status :succeeded, 102, 102, 102 - } - rc.callback {|a,b,c| - assert_equal(102, a) - assert_equal(102, b) - assert_equal(102, c) - n += 1 - } - rc.set_deferred_status :succeeded, 100 - assert_equal(3, n) - end - - def test_syntactic_sugar - rc = RecursiveCallback.new - rc.set_deferred_success 100 - rc.set_deferred_failure 200 - end - - # It doesn't raise an error to set deferred status more than once. - # In fact, this is a desired and useful idiom when it happens INSIDE - # a callback or errback. - # However, it's less useful otherwise, and in fact would generally be - # indicative of a programming error. However, we would like to be resistant - # to such errors. So whenever we set deferred status, we also clear BOTH - # stacks of handlers. - # - def test_double_calls - s = 0 - e = 0 - - d = EM::DefaultDeferrable.new - d.callback {s += 1} - d.errback {e += 1} - - d.succeed # We expect the callback to be called, and the errback to be DISCARDED. - d.fail # Presumably an error. We expect the errback NOT to be called. - d.succeed # We expect the callback to have been discarded and NOT to be called again. - - assert_equal(1, s) - assert_equal(0, e) - end - - # Adding a callback to a Deferrable that is already in a success state executes the callback - # immediately. The same applies to a an errback added to an already-failed Deferrable. - # HOWEVER, we expect NOT to be able to add errbacks to succeeded Deferrables, or callbacks - # to failed ones. - # - # We illustrate this with a rather contrived test. The test calls #fail after #succeed, - # which ordinarily would not happen in a real program. - # - # What we're NOT attempting to specify is what happens if a Deferrable is succeeded and then - # failed (or vice-versa). Should we then be able to add callbacks/errbacks of the appropriate - # type for immediate execution? For now at least, the official answer is "don't do that." - # - def test_delayed_callbacks - s1 = 0 - s2 = 0 - e = 0 - - d = EM::DefaultDeferrable.new - d.callback {s1 += 1} - - d.succeed # Triggers and discards the callback. - - d.callback {s2 += 1} # This callback is executed immediately and discarded. - - d.errback {e += 1} # This errback should be DISCARDED and never execute. - d.fail # To prove it, fail and assert e is 0 - - assert_equal( [1,1], [s1,s2] ) - assert_equal( 0, e ) - end - - def test_timeout - n = 0 - EM.run { - d = EM::DefaultDeferrable.new - d.callback {n = 1; EM.stop} - d.errback {n = 2; EM.stop} - d.timeout(0.01) - } - assert_equal( 2, n ) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_handler_check.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_handler_check.rb deleted file mode 100644 index c4176941..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_handler_check.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'em_test_helper' - -class TestHandlerCheck < Test::Unit::TestCase - - class Foo < EM::Connection; end; - module TestModule; end; - - def test_with_correct_class - assert_nothing_raised do - EM.run { - EM.connect("127.0.0.1", 80, Foo) - EM.stop_event_loop - } - end - end - - def test_with_incorrect_class - assert_raise(ArgumentError) do - EM.run { - EM.connect("127.0.0.1", 80, String) - EM.stop_event_loop - } - end - end - - def test_with_module - assert_nothing_raised do - EM.run { - EM.connect("127.0.0.1", 80, TestModule) - EM.stop_event_loop - } - end - end - -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_hc.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_hc.rb deleted file mode 100644 index 28e32c9c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_hc.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'em_test_helper' - -class TestHeaderAndContentProtocol < Test::Unit::TestCase - - class SimpleTest < EM::P::HeaderAndContentProtocol - attr_reader :first_header, :my_headers, :request - - def receive_first_header_line hdr - @first_header ||= [] - @first_header << hdr - end - def receive_headers hdrs - @my_headers ||= [] - @my_headers << hdrs - end - def receive_request hdrs, content - @request ||= [] - @request << [hdrs, content] - end - end - - class StopOnUnbind < EM::Connection - def unbind - EM.add_timer(0.01) { EM.stop } - end - end - - def setup - @port = next_port - end - - def test_no_content - the_connection = nil - EM.run { - EM.start_server( "127.0.0.1", @port, SimpleTest ) do |conn| - the_connection = conn - end - setup_timeout - - EM.connect "127.0.0.1", @port, StopOnUnbind do |c| - c.send_data [ "aaa\n", "bbb\r\n", "ccc\n", "\n" ].join - c.close_connection_after_writing - end - } - assert_equal( ["aaa"], the_connection.first_header ) - assert_equal( [%w(aaa bbb ccc)], the_connection.my_headers ) - assert_equal( [[%w(aaa bbb ccc), ""]], the_connection.request ) - end - - def test_content - the_connection = nil - content = "A" * 50 - headers = ["aaa", "bbb", "Content-length: #{content.length}", "ccc"] - EM.run { - EM.start_server( "127.0.0.1", @port, SimpleTest ) do |conn| - the_connection = conn - end - setup_timeout - - EM.connect "127.0.0.1", @port, StopOnUnbind do |c| - headers.each { |h| c.send_data "#{h}\r\n" } - c.send_data "\n" - c.send_data content - c.close_connection_after_writing - end - } - assert_equal( ["aaa"], the_connection.first_header ) - assert_equal( [headers], the_connection.my_headers ) - assert_equal( [[headers, content]], the_connection.request ) - end - - def test_several_requests - the_connection = nil - content = "A" * 50 - headers = ["aaa", "bbb", "Content-length: #{content.length}", "ccc"] - EM.run { - EM.start_server( "127.0.0.1", @port, SimpleTest ) do |conn| - the_connection = conn - end - setup_timeout - - EM.connect( "127.0.0.1", @port, StopOnUnbind ) do |c| - 5.times do - headers.each { |h| c.send_data "#{h}\r\n" } - c.send_data "\n" - c.send_data content - end - c.close_connection_after_writing - end - } - assert_equal( ["aaa"] * 5, the_connection.first_header ) - assert_equal( [headers] * 5, the_connection.my_headers ) - assert_equal( [[headers, content]] * 5, the_connection.request ) - end - - - # def x_test_multiple_content_length_headers - # # This is supposed to throw a RuntimeError but it throws a C++ exception instead. - # the_connection = nil - # content = "A" * 50 - # headers = ["aaa", "bbb", ["Content-length: #{content.length}"]*2, "ccc"].flatten - # EM.run { - # EM.start_server( "127.0.0.1", @port, SimpleTest ) do |conn| - # the_connection = conn - # end - # EM.add_timer(4) {raise "test timed out"} - # test_proc = proc { - # t = TCPSocket.new "127.0.0.1", @port - # headers.each {|h| t.write "#{h}\r\n" } - # t.write "\n" - # t.write content - # t.close - # } - # EM.defer test_proc, proc { - # EM.stop - # } - # } - # end - - def test_interpret_headers - the_connection = nil - content = "A" * 50 - headers = [ - "GET / HTTP/1.0", - "Accept: aaa", - "User-Agent: bbb", - "Host: ccc", - "x-tempest-header:ddd" - ] - - EM.run { - EM.start_server( "127.0.0.1", @port, SimpleTest ) do |conn| - the_connection = conn - end - setup_timeout - - EM.connect( "127.0.0.1", @port, StopOnUnbind ) do |c| - headers.each { |h| c.send_data "#{h}\r\n" } - c.send_data "\n" - c.send_data content - c.close_connection_after_writing - end - } - - hsh = the_connection.headers_2_hash( the_connection.my_headers.shift ) - expect = { - :accept => "aaa", - :user_agent => "bbb", - :host => "ccc", - :x_tempest_header => "ddd" - } - assert_equal(expect, hsh) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_httpclient.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_httpclient.rb deleted file mode 100644 index 572a8022..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_httpclient.rb +++ /dev/null @@ -1,238 +0,0 @@ -require 'em_test_helper' - -class TestHttpClient < Test::Unit::TestCase - - def setup - @port = next_port - end - - #------------------------------------- - - def test_http_client - ok = false - EM.run { - c = silent { EM::P::HttpClient.send :request, :host => "www.google.com", :port => 80 } - c.callback { - ok = true - c.close_connection - EM.stop - } - c.errback {EM.stop} # necessary, otherwise a failure blocks the test suite forever. - } - assert ok - end - - #------------------------------------- - - def test_http_client_1 - ok = false - EM.run { - c = silent { EM::P::HttpClient.send :request, :host => "www.google.com", :port => 80 } - c.callback { - ok = true - c.close_connection - EM.stop - } - c.errback {EM.stop} - } - assert ok - end - - #------------------------------------- - - def test_http_client_2 - ok = false - EM.run { - c = silent { EM::P::HttpClient.send :request, :host => "www.google.com", :port => 80 } - c.callback { - ok = true - c.close_connection - EM.stop - } - c.errback {EM.stop} - } - assert ok - end - - - #----------------------------------------- - - # Test a server that returns a page with a zero content-length. - # This caused an early version of the HTTP client not to generate a response, - # causing this test to hang. Observe, there was no problem with responses - # lacking a content-length, just when the content-length was zero. - # - class EmptyContent < EM::Connection - def initialize *args - super - end - def receive_data data - send_data "HTTP/1.0 404 ...\r\nContent-length: 0\r\n\r\n" - close_connection_after_writing - end - end - - def test_http_empty_content - ok = false - EM.run { - EM.start_server "127.0.0.1", @port, EmptyContent - c = silent { EM::P::HttpClient.send :request, :host => "127.0.0.1", :port => @port } - c.callback { - ok = true - c.close_connection - EM.stop - } - } - assert ok - end - - - #--------------------------------------- - - class PostContent < EM::P::LineAndTextProtocol - def initialize *args - super - @lines = [] - end - def receive_line line - if line.length > 0 - @lines << line - else - process_headers - end - end - def receive_binary_data data - @post_content = data - send_response - end - def process_headers - if @lines.first =~ /\APOST ([^\s]+) HTTP\/1.1\Z/ - @uri = $1.dup - else - raise "bad request" - end - - @lines.each {|line| - if line =~ /\AContent-length:\s*(\d+)\Z/i - @content_length = $1.dup.to_i - elsif line =~ /\AContent-type:\s*(\d+)\Z/i - @content_type = $1.dup - end - } - - raise "invalid content length" unless @content_length - set_binary_mode @content_length - end - def send_response - send_data "HTTP/1.1 200 ...\r\nConnection: close\r\nContent-length: 10\r\nContent-type: text/html\r\n\r\n0123456789" - close_connection_after_writing - end - end - - # TODO, this is WRONG. The handler is asserting an HTTP 1.1 request, but the client - # is sending a 1.0 request. Gotta fix the client - def test_post - response = nil - EM.run { - EM.start_server '127.0.0.1', @port, PostContent - setup_timeout(2) - c = silent { EM::P::HttpClient.request( - :host => '127.0.0.1', - :port => @port, - :method => :post, - :request => "/aaa", - :content => "XYZ", - :content_type => "text/plain" - )} - c.callback {|r| - response = r - EM.stop - } - } - - assert_equal( 200, response[:status] ) - assert_equal( "0123456789", response[:content] ) - end - - - # TODO, need a more intelligent cookie tester. - # In fact, this whole test-harness needs a beefier server implementation. - def test_cookie - ok = false - EM.run { - c = silent { EM::Protocols::HttpClient.send :request, :host => "www.google.com", :port => 80, :cookie=>"aaa=bbb" } - c.callback { - ok = true - c.close_connection - EM.stop - } - c.errback {EM.stop} - } - assert ok - end - - # We can tell the client to send an HTTP/1.0 request (default is 1.1). - # This is useful for suppressing chunked responses until those are working. - def test_version_1_0 - ok = false - EM.run { - c = silent { EM::P::HttpClient.request( - :host => "www.google.com", - :port => 80, - :version => "1.0" - )} - c.callback { - ok = true - c.close_connection - EM.stop - } - c.errback {EM.stop} - } - assert ok - end - - #----------------------------------------- - - # Test a server that returns chunked encoding - # - class ChunkedEncodingContent < EventMachine::Connection - def initialize *args - super - end - def receive_data data - send_data ["HTTP/1.1 200 OK", - "Server: nginx/0.7.67", - "Date: Sat, 23 Oct 2010 16:41:32 GMT", - "Content-Type: application/json", - "Transfer-Encoding: chunked", - "Connection: keep-alive", - "", - "1800", - "chunk1" * 1024, - "5a", - "chunk2" * 15, - "0", - ""].join("\r\n") - close_connection_after_writing - end - end - - def test_http_chunked_encoding_content - ok = false - EM.run { - EM.start_server "127.0.0.1", @port, ChunkedEncodingContent - c = silent { EM::P::HttpClient.send :request, :host => "127.0.0.1", :port => @port } - c.callback { |result| - if result[:content] == "chunk1" * 1024 + "chunk2" * 15 - ok = true - end - c.close_connection - EM.stop - } - } - assert ok - end - -end - - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_httpclient2.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_httpclient2.rb deleted file mode 100644 index a00fcbcb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_httpclient2.rb +++ /dev/null @@ -1,128 +0,0 @@ -require 'em_test_helper' - -class TestHttpClient2 < Test::Unit::TestCase - class TestServer < EM::Connection - end - - def setup - @port = next_port - end - - # #connect returns an object which has made a connection to an HTTP server - # and exposes methods for making HTTP requests on that connection. - # #connect can take either a pair of parameters (a host and a port), - # or a single parameter which is a Hash. - # - def test_connect - EM.run { - setup_timeout(1) - EM.start_server '127.0.0.1', @port, TestServer - silent do - EM::P::HttpClient2.connect '127.0.0.1', @port - EM::P::HttpClient2.connect( :host=>'127.0.0.1', :port=>@port ) - end - EM.stop - } - end - - def test_bad_port - EM.run { - setup_timeout(1) - EM.start_server '127.0.0.1', @port, TestServer - assert_raises( ArgumentError ) { - silent { EM::P::HttpClient2.connect '127.0.0.1', "xxx" } - } - EM.stop - } - end - - def test_bad_server - err = nil - EM.run { - setup_timeout(1) - http = silent { EM::P::HttpClient2.connect '127.0.0.1', 9999 } - d = http.get "/" - d.errback { err = true; d.internal_error; EM.stop } - } - assert(err) - end - - def test_get - content = nil - EM.run { - setup_timeout(1) - http = silent { EM::P::HttpClient2.connect :host => "google.com", :port => 80, :version => '1.0' } - d = http.get "/" - d.callback { - content = d.content - EM.stop - } - } - assert(content) - end - - # Not a pipelined request because we wait for one response before we request the next. - # XXX this test is broken because it sends the second request to the first connection - # XXX right before the connection closes - def _test_get_multiple - content = nil - EM.run { - setup_timeout(1) - http = silent { EM::P::HttpClient2.connect "google.com", :version => '1.0' } - d = http.get "/" - d.callback { - e = http.get "/" - e.callback { - content = e.content - EM.stop - } - } - } - assert(content) - end - - def test_get_pipeline - headers, headers2 = nil, nil - EM.run { - setup_timeout(1) - http = silent { EM::P::HttpClient2.connect "google.com", 80 } - d = http.get("/") - d.callback { - headers = d.headers - } - e = http.get("/") - e.callback { - headers2 = e.headers - } - EM.tick_loop { EM.stop if headers && headers2 } - EM.add_timer(1) { EM.stop } - } - assert(headers) - assert(headers2) - end - - def test_authheader - EM.run { - setup_timeout(1) - EM.start_server '127.0.0.1', @port, TestServer - http = silent { EM::P::HttpClient2.connect '127.0.0.1', 18842 } - d = http.get :url=>"/", :authorization=>"Basic xxx" - d.callback {EM.stop} - d.errback {EM.stop} - } - end - - def test_https_get - omit_unless(EM.ssl?) - d = nil - EM.run { - setup_timeout(1) - http = silent { EM::P::HttpClient2.connect :host => 'www.google.com', :port => 443, :ssl => true, :version => '1.0' } - d = http.get "/" - d.callback {EM.stop} - d.errback {EM.stop} - } - assert_equal(200, d.status) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_idle_connection.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_idle_connection.rb deleted file mode 100644 index bfc57cd9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_idle_connection.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'em_test_helper' - -class TestIdleConnection < Test::Unit::TestCase - def setup - @port = next_port - end - - def test_idle_time - omit_if(!EM.respond_to?(:get_idle_time)) - - a, b = nil, nil - EM.run do - EM.start_server '127.0.0.1', @port, Module.new - conn = EM.connect '127.0.0.1', @port - EM.add_timer(0.3) do - a = conn.get_idle_time - conn.send_data 'a' - EM.next_tick do - EM.next_tick do - b = conn.get_idle_time - conn.close_connection - EM.stop - end - end - end - end - - assert_in_delta 0.3, a, 0.1 - assert_in_delta 0, b, 0.1 - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_inactivity_timeout.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_inactivity_timeout.rb deleted file mode 100644 index 15e39a2f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_inactivity_timeout.rb +++ /dev/null @@ -1,54 +0,0 @@ -require 'em_test_helper' - -class TestInactivityTimeout < Test::Unit::TestCase - - if EM.respond_to? :get_comm_inactivity_timeout - def test_default - EM.run { - c = EM.connect("127.0.0.1", 54321) - assert_equal 0.0, c.comm_inactivity_timeout - EM.stop - } - end - - def test_set_and_get - EM.run { - c = EM.connect("127.0.0.1", 54321) - c.comm_inactivity_timeout = 2.5 - assert_equal 2.5, c.comm_inactivity_timeout - EM.stop - } - end - - def test_for_real - start, finish = nil - - timeout_handler = Module.new do - define_method :unbind do - finish = Time.now - EM.stop - end - end - - EM.run { - setup_timeout - EM.heartbeat_interval = 0.01 - EM.start_server("127.0.0.1", 12345) - EM.add_timer(0.01) { - start = Time.now - c = EM.connect("127.0.0.1", 12345, timeout_handler) - c.comm_inactivity_timeout = 0.02 - } - } - - assert_in_delta(0.02, (finish - start), 0.02) - end - else - warn "EM.comm_inactivity_timeout not implemented, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests - def test_em_comm_inactivity_timeout_not_implemented - assert true - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ipv4.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ipv4.rb deleted file mode 100644 index bd11bbfe..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ipv4.rb +++ /dev/null @@ -1,95 +0,0 @@ -require 'em_test_helper' - -class TestIPv4 < Test::Unit::TestCase - # Runs a TCP server in the local IPv4 address, connects to it and sends a specific data. - # Timeout in 2 seconds. - def test_ipv4_tcp_local_server - omit_if(!Test::Unit::TestCase.public_ipv4?) - - @@received_data = nil - @local_port = next_port - setup_timeout(2) - - EM.run do - EM::start_server(@@public_ipv4, @local_port) do |s| - def s.receive_data data - @@received_data = data - EM.stop - end - end - - EM::connect(@@public_ipv4, @local_port) do |c| - c.send_data "ipv4/tcp" - end - end - - assert_equal "ipv4/tcp", @@received_data - end - - # Runs a UDP server in the local IPv4 address, connects to it and sends a specific data. - # Timeout in 2 seconds. - def test_ipv4_udp_local_server - omit_if(!Test::Unit::TestCase.public_ipv4?) - - @@received_data = nil - @local_port = next_port - setup_timeout(2) - - EM.run do - EM::open_datagram_socket(@@public_ipv4, @local_port) do |s| - def s.receive_data data - @@received_data = data - EM.stop - end - end - - EM::open_datagram_socket(@@public_ipv4, next_port) do |c| - c.send_datagram "ipv4/udp", @@public_ipv4, @local_port - end - end - - assert_equal "ipv4/udp", @@received_data - end - - # Try to connect via TCP to an invalid IPv4. EM.connect should raise - # EM::ConnectionError. - def test_tcp_connect_to_invalid_ipv4 - omit_if(!Test::Unit::TestCase.public_ipv4?) - - invalid_ipv4 = "9.9:9" - - EM.run do - begin - error = nil - EM.connect(invalid_ipv4, 1234) - rescue => e - error = e - ensure - EM.stop - assert_equal EM::ConnectionError, (error && error.class) - end - end - end - - # Try to send a UDP datagram to an invalid IPv4. EM.send_datagram should raise - # EM::ConnectionError. - def test_udp_send_datagram_to_invalid_ipv4 - omit_if(!Test::Unit::TestCase.public_ipv4?) - - invalid_ipv4 = "9.9:9" - - EM.run do - begin - error = nil - EM.open_datagram_socket(@@public_ipv4, next_port) do |c| - c.send_datagram "hello", invalid_ipv4, 1234 - end - rescue => e - error = e - ensure - EM.stop - assert_equal EM::ConnectionError, (error && error.class) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ipv6.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ipv6.rb deleted file mode 100644 index b52fef1f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ipv6.rb +++ /dev/null @@ -1,107 +0,0 @@ -require 'em_test_helper' - -class TestIPv6 < Test::Unit::TestCase - - if Test::Unit::TestCase.public_ipv6? - - # Runs a TCP server in the local IPv6 address, connects to it and sends a specific data. - # Timeout in 2 seconds. - def test_ipv6_tcp_local_server - @@received_data = nil - @local_port = next_port - setup_timeout(2) - - EM.run do - EM.start_server(@@public_ipv6, @local_port) do |s| - def s.receive_data data - @@received_data = data - EM.stop - end - end - - EM::connect(@@public_ipv6, @local_port) do |c| - def c.unbind(reason) - warn "unbind: #{reason.inspect}" if reason # XXX at least find out why it failed - end - c.send_data "ipv6/tcp" - end - end - - assert_equal "ipv6/tcp", @@received_data - end - - # Runs a UDP server in the local IPv6 address, connects to it and sends a specific data. - # Timeout in 2 seconds. - def test_ipv6_udp_local_server - @@received_data = nil - @local_port = next_port - @@remote_ip = nil - setup_timeout(2) - - EM.run do - EM.open_datagram_socket(@@public_ipv6, @local_port) do |s| - def s.receive_data data - _port, @@remote_ip = Socket.unpack_sockaddr_in(get_peername) - @@received_data = data - EM.stop - end - end - - EM.open_datagram_socket(@@public_ipv6, next_port) do |c| - c.send_datagram "ipv6/udp", @@public_ipv6, @local_port - end - end - assert_equal @@remote_ip, @@public_ipv6 - assert_equal "ipv6/udp", @@received_data - end - - # Try to connect via TCP to an invalid IPv6. EM.connect should raise - # EM::ConnectionError. - def test_tcp_connect_to_invalid_ipv6 - invalid_ipv6 = "1:A" - - EM.run do - begin - error = nil - EM.connect(invalid_ipv6, 1234) - rescue => e - error = e - ensure - EM.stop - assert_equal EM::ConnectionError, (error && error.class) - end - end - end - - # Try to send a UDP datagram to an invalid IPv6. EM.send_datagram should raise - # EM::ConnectionError. - def test_udp_send_datagram_to_invalid_ipv6 - invalid_ipv6 = "1:A" - - EM.run do - begin - error = nil - EM.open_datagram_socket(@@public_ipv6, next_port) do |c| - c.send_datagram "hello", invalid_ipv6, 1234 - end - rescue => e - error = e - ensure - EM.stop - assert_equal EM::ConnectionError, (error && error.class) - end - end - end - - - else - warn "no IPv6 in this host, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests. - def test_ipv6_unavailable - assert true - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_iterator.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_iterator.rb deleted file mode 100644 index 6ec4e464..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_iterator.rb +++ /dev/null @@ -1,118 +0,0 @@ -require 'em_test_helper' - -class TestIterator < Test::Unit::TestCase - - # By default, format the time with tenths-of-seconds. - # Some tests should ask for extra decimal places to ensure - # that delays between iterations will receive a changed time. - def get_time(n=1) - time = EM.current_time - time.strftime('%H:%M:%S.') + time.tv_usec.to_s[0, n] - end - - def test_default_concurrency - items = {} - list = 1..10 - EM.run { - EM::Iterator.new(list).each( proc {|num,iter| - time = get_time(3) - items[time] ||= [] - items[time] << num - EM::Timer.new(0.02) {iter.next} - }, proc {EM.stop}) - } - assert_equal(10, items.keys.size) - assert_equal(list.to_a.sort, items.values.flatten.sort) - end - - def test_default_concurrency_with_a_proc - items = {} - list = (1..10).to_a - original_list = list.dup - EM.run { - EM::Iterator.new(proc{list.pop || EM::Iterator::Stop}).each( proc {|num,iter| - time = get_time(3) - items[time] ||= [] - items[time] << num - EM::Timer.new(0.02) {iter.next} - }, proc {EM.stop}) - } - assert_equal(10, items.keys.size) - assert_equal(original_list.to_a.sort, items.values.flatten.sort) - end - - def test_concurrency_bigger_than_list_size - items = {} - list = [1,2,3] - EM.run { - EM::Iterator.new(list,10).each(proc {|num,iter| - time = get_time - items[time] ||= [] - items[time] << num - EM::Timer.new(1) {iter.next} - }, proc {EM.stop}) - } - assert_equal(1, items.keys.size) - assert_equal(list.to_a.sort, items.values.flatten.sort) - end - - def test_changing_concurrency_affects_active_iteration - items = {} - list = 1..25 - seen = 0 - EM.run { - i = EM::Iterator.new(list,1) - i.each(proc {|num,iter| - time = get_time - items[time] ||= [] - items[time] << num - if (seen += 1) == 5 - # The first 5 items will be distinct times - # The next 20 items will happen in 2 bursts - i.concurrency = 10 - end - EM::Timer.new(0.2) {iter.next} - }, proc {EM.stop}) - } - assert_in_delta(7, items.keys.size, 1) - assert_equal(list.to_a.sort, items.values.flatten.sort) - end - - def test_map - list = 100..150 - EM.run { - EM::Iterator.new(list).map(proc{ |num,iter| - EM.add_timer(0.01){ iter.return(num) } - }, proc{ |results| - assert_equal(list.to_a.size, results.size) - EM.stop - }) - } - end - - def test_inject - omit_if(windows?) - - list = %w[ pwd uptime uname date ] - EM.run { - EM::Iterator.new(list, 2).inject({}, proc{ |hash,cmd,iter| - EM.system(cmd){ |output,status| - hash[cmd] = status.exitstatus == 0 ? output.strip : nil - iter.return(hash) - } - }, proc{ |results| - assert_equal(results.keys.sort, list.sort) - EM.stop - }) - } - end - - def test_concurrency_is_0 - EM.run { - assert_raise ArgumentError do - EM::Iterator.new(1..5,0) - end - EM.stop - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_kb.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_kb.rb deleted file mode 100644 index 9c31f5fb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_kb.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'em_test_helper' - -class TestKeyboardEvents < Test::Unit::TestCase - - module KbHandler - include EM::Protocols::LineText2 - def receive_line d - EM::stop if d == "STOP" - end - end - - # This test doesn't actually do anything useful but is here to - # illustrate the usage. If you removed the timer and ran this test - # by itself on a console, and then typed into the console, it would - # work. - # I don't know how to get the test harness to simulate actual keystrokes. - # When someone figures that out, then we can make this a real test. - # - def test_kb - omit_if(jruby?) - omit_if(!$stdout.tty?) # don't run the test unless it stands a chance of validity. - EM.run do - EM.open_keyboard KbHandler - EM::Timer.new(1) { EM.stop } - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_line_protocol.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_line_protocol.rb deleted file mode 100644 index 2067a72e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_line_protocol.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'em_test_helper' - -class TestLineProtocol < Test::Unit::TestCase - class LineProtocolTestClass - include EM::Protocols::LineProtocol - - def lines - @lines ||= [] - end - - def receive_line(line) - lines << line - end - end - - def setup - @proto = LineProtocolTestClass.new - end - - def test_simple_split_line - @proto.receive_data("this is") - assert_equal([], @proto.lines) - - @proto.receive_data(" a test\n") - assert_equal(["this is a test"], @proto.lines) - end - - def test_simple_lines - @proto.receive_data("aaa\nbbb\r\nccc\nddd") - assert_equal(%w(aaa bbb ccc), @proto.lines) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ltp.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ltp.rb deleted file mode 100644 index 06c26851..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ltp.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'em_test_helper' - -class TestLineAndTextProtocol < Test::Unit::TestCase - - class TLP_LineBuffer < EM::P::LineAndTextProtocol - attr_reader :line_buffer - - def initialize - super - @line_buffer = [] - end - - def receive_line line - @line_buffer << line - end - end - - module StopClient - def set_receive_data(&blk) - @rdb = blk - end - - def receive_data data - @rdb.call(data) if @rdb - end - - def unbind - EM.add_timer(0.1) { EM.stop } - end - end - - def setup - @port = next_port - end - - def test_simple_lines - conn = nil - EM.run { - EM.start_server( "127.0.0.1", @port, TLP_LineBuffer ) do |c| - conn = c - end - setup_timeout - - EM.connect "127.0.0.1", @port, StopClient do |c| - c.send_data "aaa\nbbb\r\nccc\n" - c.close_connection_after_writing - end - } - assert_equal( %w(aaa bbb ccc), conn.line_buffer) - end - - #-------------------------------------------------------------------- - - class TLP_ErrorMessage < EM::P::LineAndTextProtocol - attr_reader :error_message - - def initialize - super - @error_message = [] - end - - def receive_line text - raise - end - - def receive_error text - @error_message << text - end - end - - def test_overlength_lines - conn = nil - EM.run { - EM.start_server( "127.0.0.1", @port, TLP_ErrorMessage ) do |c| - conn = c - end - setup_timeout - EM.connect "127.0.0.1", @port, StopClient do |c| - c.send_data "a" * (16*1024 + 1) - c.send_data "\n" - c.close_connection_after_writing - end - - } - assert_equal( ["overlength line"], conn.error_message ) - end - - - #-------------------------------------------------------------------- - - class LineAndTextTest < EM::P::LineAndTextProtocol - def receive_line line - if line =~ /content-length:\s*(\d+)/i - @content_length = $1.to_i - elsif line.length == 0 - set_binary_mode @content_length - end - end - def receive_binary_data text - send_data "received #{text.length} bytes" - close_connection_after_writing - end - end - - def test_lines_and_text - output = '' - EM.run { - EM.start_server( "127.0.0.1", @port, LineAndTextTest ) - setup_timeout - - EM.connect "127.0.0.1", @port, StopClient do |c| - c.set_receive_data { |data| output << data } - c.send_data "Content-length: 400\n" - c.send_data "\n" - c.send_data "A" * 400 - EM.add_timer(0.1) { c.close_connection_after_writing } - end - } - assert_equal( "received 400 bytes", output ) - end - - #-------------------------------------------------------------------- - - - class BinaryTextTest < EM::P::LineAndTextProtocol - def receive_line line - if line =~ /content-length:\s*(\d+)/i - set_binary_mode $1.to_i - else - raise "protocol error" - end - end - def receive_binary_data text - send_data "received #{text.length} bytes" - close_connection_after_writing - end - end - - def test_binary_text - output = '' - EM.run { - EM.start_server( "127.0.0.1", @port, BinaryTextTest ) - setup_timeout - - EM.connect "127.0.0.1", @port, StopClient do |c| - c.set_receive_data { |data| output << data } - c.send_data "Content-length: 10000\n" - c.send_data "A" * 10000 - EM.add_timer(0.1) { c.close_connection_after_writing } - end - } - assert_equal( "received 10000 bytes", output ) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ltp2.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ltp2.rb deleted file mode 100644 index 220fcbe1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ltp2.rb +++ /dev/null @@ -1,332 +0,0 @@ -require 'em_test_helper' - -# TODO!!! Need tests for overlength headers and text bodies. - -class TestLineText2 < Test::Unit::TestCase - - # Run each of these tests two ways: passing in the whole test-dataset in one chunk, - # and passing it in one character at a time. - - class Basic - include EM::Protocols::LineText2 - attr_reader :lines - def receive_line line - (@lines ||= []) << line - end - end - def test_basic - testdata = "Line 1\nLine 2\r\nLine 3\n" - - a = Basic.new - a.receive_data testdata - assert_equal( ["Line 1", "Line 2", "Line 3"], a.lines ) - - a = Basic.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - assert_equal( ["Line 1", "Line 2", "Line 3"], a.lines ) - end - - # The basic test above shows that extra newlines are chomped - # This test shows that newlines are preserved if the delimiter isn't \n - class PreserveNewlines - include EM::Protocols::LineText2 - attr_reader :lines - def initialize *args - super - @delim = "|" - set_delimiter @delim - end - def receive_line line - (@lines ||= []) << line - end - end - def test_preserve_newlines - a = PreserveNewlines.new - a.receive_data "aaa|bbb|ccc|\n|\r\n| \t ||" - assert_equal( ["aaa", "bbb", "ccc", "\n", "\r\n", " \t ", ""], a.lines ) - end - - class ChangeDelimiter - include EM::Protocols::LineText2 - attr_reader :lines - def initialize *args - super - @delim = "A" - set_delimiter @delim - end - def receive_line line - (@lines ||= []) << line - set_delimiter( @delim.succ! ) - end - end - - def test_change_delimiter - testdata = %Q(LineaALinebBLinecCLinedD) - - a = ChangeDelimiter.new - a.receive_data testdata - assert_equal( ["Linea", "Lineb", "Linec", "Lined"], a.lines ) - - a = ChangeDelimiter.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - assert_equal( ["Linea", "Lineb", "Linec", "Lined"], a.lines ) - end - - class RegexDelimiter - include EM::Protocols::LineText2 - attr_reader :lines - def initialize *args - super - @delim = /[A-D]/ - set_delimiter @delim - end - def receive_line line - (@lines ||= []) << line - end - end - - def test_regex_delimiter - testdata = %Q(LineaALinebBLinecCLinedD) - - a = RegexDelimiter.new - a.receive_data testdata - assert_equal( ["Linea", "Lineb", "Linec", "Lined"], a.lines ) - - a = RegexDelimiter.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - assert_equal( ["Linea", "Lineb", "Linec", "Lined"], a.lines ) - end - - #-- - # Test two lines followed by an empty line, ten bytes of binary data, then - # two more lines. - - class Binary - include EM::Protocols::LineText2 - attr_reader :lines, :body - def initialize *args - super - @lines = [] - @body = nil - end - def receive_line ln - if ln == "" - set_text_mode 10 - else - @lines << ln - end - end - def receive_binary_data data - @body = data - end - end - - def test_binary - testdata = %Q(Line 1 -Line 2 - -0000000000Line 3 -Line 4 -) - - a = Binary.new - a.receive_data testdata - assert_equal( ["Line 1", "Line 2", "Line 3", "Line 4"], a.lines) - assert_equal( "0000000000", a.body ) - - a = Binary.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - assert_equal( ["Line 1", "Line 2", "Line 3", "Line 4"], a.lines) - assert_equal( "0000000000", a.body ) - end - - - # Test unsized binary data. The expectation is that each chunk of it - # will be passed to us as it it received. - class UnsizedBinary - include EM::Protocols::LineText2 - attr_reader :n_calls, :body - def initialize *args - super - set_text_mode - end - def receive_binary_data data - @n_calls ||= 0 - @n_calls += 1 - (@body ||= "") << data - end - end - - def test_unsized_binary - testdata = "X\0" * 1000 - - a = UnsizedBinary.new - a.receive_data testdata - assert_equal( 1, a.n_calls ) - assert_equal( testdata, a.body ) - - a = UnsizedBinary.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - assert_equal( 2000, a.n_calls ) - assert_equal( testdata, a.body ) - end - - - # Test binary data with a "throw back" into line-mode. - class ThrowBack - include EM::Protocols::LineText2 - attr_reader :headers - def initialize *args - super - @headers = [] - @n_bytes = 0 - set_text_mode - end - def receive_binary_data data - wanted = 25 - @n_bytes - will_take = if data.length > wanted - data.length - wanted - else - data.length - end - @n_bytes += will_take - - if @n_bytes == 25 - set_line_mode( data[will_take..-1] ) - end - end - def receive_line ln - @headers << ln - end - end - def test_throw_back - testdata = "Line\n" * 10 - - a = ThrowBack.new - a.receive_data testdata - assert_equal( ["Line"] * 5, a.headers ) - - a = ThrowBack.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - assert_equal( ["Line"] * 5, a.headers ) - end - - # Test multi-character line delimiters. - # Also note that the test data has a "tail" with no delimiter, that will be - # discarded, but cf. the BinaryTail test. - # TODO!!! This test doesn't work in the byte-by-byte case. - class Multichar - include EM::Protocols::LineText2 - attr_reader :lines - def initialize *args - super - @lines = [] - set_delimiter "012" - end - def receive_line ln - @lines << ln - end - end - def test_multichar - testdata = "Line012Line012Line012Line" - - a = Multichar.new - a.receive_data testdata - assert_equal( ["Line"]*3, a.lines ) - - a = Multichar.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - # DOESN'T WORK in this case. Multi-character delimiters are broken. - #assert_equal( ["Line"]*3, a.lines ) - end - - # Test a binary "tail," when a sized binary transfer doesn't complete because - # of an unbind. We get a partial result. - class BinaryTail - include EM::Protocols::LineText2 - attr_reader :data - def initialize *args - super - @data = "" - set_text_mode 1000 - end - def receive_binary_data data - # we expect to get all the data in one chunk, even in the byte-by-byte case, - # because sized transfers by definition give us exactly one call to - # #receive_binary_data. - @data = data - end - end - def test_binary_tail - testdata = "0" * 500 - - a = BinaryTail.new - a.receive_data testdata - a.unbind - assert_equal( "0" * 500, a.data ) - - a = BinaryTail.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - a.unbind - assert_equal( "0" * 500, a.data ) - end - - - # Test an end-of-binary call. Arrange to receive binary data but don't bother counting it - # as it comes. Rely on getting receive_end_of_binary_data to signal the transition back to - # line mode. - # At the present time, this isn't strictly necessary with sized binary chunks because by - # definition we accumulate them and make exactly one call to receive_binary_data, but - # we may want to support a mode in the future that would break up large chunks into multiple - # calls. - class LazyBinary - include EM::Protocols::LineText2 - attr_reader :data, :end - def initialize *args - super - @data = "" - set_text_mode 1000 - end - def receive_binary_data data - # we expect to get all the data in one chunk, even in the byte-by-byte case, - # because sized transfers by definition give us exactly one call to - # #receive_binary_data. - @data = data - end - def receive_end_of_binary_data - @end = true - end - end - def test_receive_end_of_binary_data - testdata = "_" * 1000 - a = LazyBinary.new - testdata.length.times {|i| a.receive_data( testdata[i...i+1] ) } - assert_equal( "_" * 1000, a.data ) - assert( a.end ) - end - - - # This tests a bug fix in which calling set_text_mode failed when called - # inside receive_binary_data. - # - class BinaryPair - include EM::Protocols::LineText2 - attr_reader :sizes - def initialize *args - super - set_text_mode 1 - @sizes = [] - end - def receive_binary_data dt - @sizes << dt.length - set_text_mode( (dt.length == 1) ? 2 : 1 ) - end - end - def test_binary_pairs - test_data = "123" * 5 - a = BinaryPair.new - a.receive_data test_data - assert_equal( [1,2,1,2,1,2,1,2,1,2], a.sizes ) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_many_fds.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_many_fds.rb deleted file mode 100644 index 7c126dcc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_many_fds.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'em_test_helper' -require 'socket' - -class TestManyFDs < Test::Unit::TestCase - def setup - @port = next_port - end - - def test_connection_class_cache - mod = Module.new - a = nil - Process.setrlimit(Process::RLIMIT_NOFILE, 4096) rescue nil - EM.run { - EM.start_server '127.0.0.1', @port, mod - 1100.times do - a = EM.connect '127.0.0.1', @port, mod - assert_kind_of EM::Connection, a - end - EM.stop - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_next_tick.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_next_tick.rb deleted file mode 100644 index 9b60359c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_next_tick.rb +++ /dev/null @@ -1,104 +0,0 @@ -require 'em_test_helper' - -class TestNextTick < Test::Unit::TestCase - - def test_tick_arg - pr = proc {EM.stop} - EM.run { - EM.next_tick pr - } - assert true - end - - def test_tick_block - EM.run { - EM.next_tick {EM.stop} - } - assert true - end - - # This illustrates the solution to a long-standing problem. - # It's now possible to correctly nest calls to EM#run. - # See the source code commentary for EM#run for more info. - # - def test_run_run - EM.run { - EM.run { - EM.next_tick {EM.stop} - } - } - end - - def test_pre_run_queue - x = false - EM.next_tick { EM.stop; x = true } - EM.run { EM.add_timer(0.01) { EM.stop } } - assert x - end - - def test_cleanup_after_stop - x = true - EM.run{ - EM.next_tick{ - EM.stop - EM.next_tick{ x=false } - } - } - EM.run{ - EM.next_tick{ EM.stop } - } - assert x - end - - # We now support an additional parameter for EM#run. - # You can pass two procs to EM#run now. The first is executed as the normal - # run block. The second (if given) is scheduled for execution after the - # reactor loop completes. - # The reason for supporting this is subtle. There has always been an expectation - # that EM#run doesn't return until after the reactor loop ends. But now it's - # possible to nest calls to EM#run, which means that a nested call WILL - # RETURN. In order to write code that will run correctly either way, it's - # recommended to put any code which must execute after the reactor completes - # in the second parameter. - # - def test_run_run_2 - a = proc {EM.stop} - b = proc {assert true} - EM.run a, b - end - - - # This illustrates that EM#run returns when it's called nested. - # This isn't a feature, rather it's something to be wary of when writing code - # that must run correctly even if EM#run is called while a reactor is already - # running. - def test_run_run_3 - a = [] - EM.run { - EM.run proc {EM.stop}, proc {a << 2} - a << 1 - } - assert_equal( [1,2], a ) - end - - - def test_schedule_on_reactor_thread - x = false - EM.run do - EM.schedule { x = true } - EM.stop - end - assert x - end - - def test_schedule_from_thread - x = false - EM.run do - Thread.new { EM.schedule { x = true } }.join - assert !x - EM.next_tick { EM.stop } - end - assert x - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_object_protocol.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_object_protocol.rb deleted file mode 100644 index b1287ea8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_object_protocol.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'em_test_helper' - -class TestObjectProtocol < Test::Unit::TestCase - module Server - include EM::P::ObjectProtocol - def post_init - send_object :hello=>'world' - end - def receive_object obj - $server = obj - EM.stop - end - end - - module Client - include EM::P::ObjectProtocol - def receive_object obj - $client = obj - send_object 'you_said'=>obj - end - end - - def setup - @port = next_port - end - - def test_send_receive - EM.run{ - EM.start_server "127.0.0.1", @port, Server - EM.connect "127.0.0.1", @port, Client - } - - assert($client == {:hello=>'world'}) - assert($server == {'you_said'=>{:hello=>'world'}}) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pause.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pause.rb deleted file mode 100644 index d078a77f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pause.rb +++ /dev/null @@ -1,107 +0,0 @@ -require 'em_test_helper' - -class TestPause < Test::Unit::TestCase - if EM.respond_to? :pause_connection - def setup - @port = next_port - end - - def teardown - assert(!EM.reactor_running?) - end - - def test_pause_resume - server = nil - - s_rx = c_rx = 0 - - test_server = Module.new do - define_method :post_init do - server = self - end - - define_method :receive_data do |data| - s_rx += 1 - - EM.add_periodic_timer(0.01) { send_data 'hi' } - send_data 'hi' - - # pause server, now no outgoing data will actually - # be sent and no more incoming data will be received - pause - end - end - - test_client = Module.new do - def post_init - EM.add_periodic_timer(0.01) do - send_data 'hello' - end - end - - define_method :receive_data do |data| - c_rx += 1 - end - end - - EM.run do - EM.start_server "127.0.0.1", @port, test_server - EM.connect "127.0.0.1", @port, test_client - - EM.add_timer(0.05) do - assert_equal 1, s_rx - assert_equal 0, c_rx - assert server.paused? - - # resume server, queued outgoing and incoming data will be flushed - server.resume - - assert !server.paused? - - EM.add_timer(0.05) do - assert server.paused? - assert s_rx > 1 - assert c_rx > 0 - EM.stop - end - end - end - end - - def test_pause_in_receive_data - incoming = [] - - test_server = Module.new do - define_method(:receive_data) do |data| - incoming << data - pause - EM.add_timer(0.5){ close_connection } - end - define_method(:unbind) do - EM.stop - end - end - - buf = 'a' * 1024 - - EM.run do - EM.start_server "127.0.0.1", @port, test_server - cli = EM.connect "127.0.0.1", @port - 128.times do - cli.send_data buf - end - end - - assert_equal 1, incoming.size - assert incoming[0].bytesize > buf.bytesize - assert incoming[0].bytesize < buf.bytesize * 128 - end - else - warn "EM.pause_connection not implemented, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests - def test_em_pause_connection_not_implemented - assert true - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pending_connect_timeout.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pending_connect_timeout.rb deleted file mode 100644 index a3f7fa4d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pending_connect_timeout.rb +++ /dev/null @@ -1,52 +0,0 @@ -require 'em_test_helper' - -class TestPendingConnectTimeout < Test::Unit::TestCase - - if EM.respond_to? :get_pending_connect_timeout - def test_default - EM.run { - c = EM.connect("127.0.0.1", 54321) - assert_equal 20.0, c.pending_connect_timeout - EM.stop - } - end - - def test_set_and_get - EM.run { - c = EM.connect("127.0.0.1", 54321) - c.pending_connect_timeout = 2.5 - assert_equal 2.5, c.pending_connect_timeout - EM.stop - } - end - - def test_for_real - start, finish = nil - - timeout_handler = Module.new do - define_method :unbind do - finish = EM.current_time - EM.stop - end - end - - EM.run { - setup_timeout - EM.heartbeat_interval = 0.1 - start = EM.current_time - c = EM.connect('192.0.2.0', 54321, timeout_handler) - c.pending_connect_timeout = 0.2 - } - - assert_in_delta(0.2, (finish - start), 0.1) - end - else - warn "EM.pending_connect_timeout not implemented, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests - def test_em_pending_connect_timeout_not_implemented - assert true - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pool.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pool.rb deleted file mode 100644 index f859a9d1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pool.rb +++ /dev/null @@ -1,196 +0,0 @@ -require 'em_test_helper' - -class TestPool < Test::Unit::TestCase - def pool - @pool ||= EM::Pool.new - end - - def go - EM.run { yield } - end - - def stop - EM.stop - end - - def deferrable - @deferrable ||= EM::DefaultDeferrable.new - end - - def test_supports_more_work_than_resources - ran = false - go do - pool.perform do - ran = true - deferrable - end - stop - end - assert_equal false, ran - go do - pool.add :resource - stop - end - assert_equal true, ran - end - - def test_reques_resources_on_error - pooled_res, pooled_res2 = nil - pool.add :res - go do - pool.perform do |res| - pooled_res = res - deferrable - end - stop - end - deferrable.fail - go do - pool.perform do |res| - pooled_res2 = res - deferrable - end - stop - end - assert_equal :res, pooled_res - assert_equal pooled_res, pooled_res2 - end - - def test_supports_custom_on_error - eres = nil - pool.on_error do |res| - eres = res - end - performs = [] - pool.add :res - go do - pool.perform do |res| - performs << res - deferrable - end - pool.perform do |res| - performs << res - deferrable - end - deferrable.fail - stop - end - assert_equal :res, eres - # manual requeues required when error handler is installed: - assert_equal 1, performs.size - assert_equal :res, performs.first - end - - def test_catches_successful_deferrables - performs = [] - pool.add :res - go do - pool.perform { |res| performs << res; deferrable } - pool.perform { |res| performs << res; deferrable } - stop - end - assert_equal [:res], performs - deferrable.succeed - go { stop } - assert_equal [:res, :res], performs - end - - def test_prunes_locked_and_removed_resources - performs = [] - pool.add :res - deferrable.succeed - go do - pool.perform { |res| performs << res; pool.remove res; deferrable } - pool.perform { |res| performs << res; pool.remove res; deferrable } - stop - end - assert_equal [:res], performs - end - - # Contents is only to be used for inspection of the pool! - def test_contents - pool.add :res - assert_equal [:res], pool.contents - # Assert that modifying the contents list does not affect the pools - # contents. - pool.contents.delete(:res) - assert_equal [:res], pool.contents - end - - def test_contents_when_perform_errors_and_on_error_is_not_set - pool.add :res - assert_equal [:res], pool.contents - - pool.perform do |r| - d = EM::DefaultDeferrable.new - d.fail - d - end - - EM.run { EM.next_tick { EM.stop } } - - assert_equal [:res], pool.contents - end - - def test_contents_when_perform_errors_and_on_error_is_set - pool.add :res - res = nil - pool.on_error do |r| - res = r - end - assert_equal [:res], pool.contents - - pool.perform do |r| - d = EM::DefaultDeferrable.new - d.fail 'foo' - d - end - - EM.run { EM.next_tick { EM.stop } } - - assert_equal :res, res - assert_equal [], pool.contents - end - - def test_num_waiting - pool.add :res - assert_equal 0, pool.num_waiting - pool.perform { |r| EM::DefaultDeferrable.new } - assert_equal 0, pool.num_waiting - 10.times { pool.perform { |r| EM::DefaultDeferrable.new } } - EM.run { EM.next_tick { EM.stop } } - assert_equal 10, pool.num_waiting - end - - def test_exceptions_in_the_work_block_bubble_up_raise_and_fail_the_resource - pool.add :res - - res = nil - pool.on_error { |r| res = r } - pool.perform { raise 'boom' } - - assert_raises(RuntimeError) do - EM.run { EM.next_tick { EM.stop } } - end - - assert_equal [], pool.contents - assert_equal :res, res - end - - def test_removed_list_does_not_leak_on_errors - pool.add :res - - pool.on_error do |r| - # This is actually the wrong thing to do, and not required, but some users - # might do it. When they do, they would find that @removed would cause a - # slow leak. - pool.remove r - end - - pool.perform { d = EM::DefaultDeferrable.new; d.fail; d } - - EM.run { EM.next_tick { EM.stop } } - assert_equal [], pool.instance_variable_get(:@removed) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_process_watch.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_process_watch.rb deleted file mode 100644 index 6e0c49a7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_process_watch.rb +++ /dev/null @@ -1,50 +0,0 @@ -require 'em_test_helper' - -if EM.kqueue? - class TestProcessWatch < Test::Unit::TestCase - module ParentProcessWatcher - def process_forked - $forked = true - end - end - - module ChildProcessWatcher - def process_exited - $exited = true - end - def unbind - $unbind = true - EM.stop - end - end - - def setup - EM.kqueue = true - end - - def teardown - EM.kqueue = false - end - - def test_events - omit_if(rbx?) - omit_if(jruby?) - EM.run{ - # watch ourselves for a fork notification - EM.watch_process(Process.pid, ParentProcessWatcher) - $fork_pid = fork{ sleep } - child = EM.watch_process($fork_pid, ChildProcessWatcher) - $pid = child.pid - - EM.add_timer(0.2){ - Process.kill('TERM', $fork_pid) - } - } - - assert_equal($pid, $fork_pid) - assert($forked) - assert($exited) - assert($unbind) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_processes.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_processes.rb deleted file mode 100644 index dd03cf02..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_processes.rb +++ /dev/null @@ -1,128 +0,0 @@ -require 'em_test_helper' - -class TestProcesses < Test::Unit::TestCase - - if !windows? && !jruby? - - # EM::DeferrableChildProcess is a sugaring of a common use-case - # involving EM::popen. - # Call the #open method on EM::DeferrableChildProcess, passing - # a command-string. #open immediately returns an EM::Deferrable - # object. It also schedules the forking of a child process, which - # will execute the command passed to #open. - # When the forked child terminates, the Deferrable will be signalled - # and execute its callbacks, passing the data that the child process - # wrote to stdout. - # - def test_deferrable_child_process - ls = "" - EM.run { - d = EM::DeferrableChildProcess.open( "ls -ltr" ) - d.callback {|data_from_child| - ls = data_from_child - EM.stop - } - } - assert( ls.length > 0) - end - - def setup - $out = nil - $status = nil - end - - def test_em_system - EM.run{ - EM.system('ls'){ |out,status| $out, $status = out, status; EM.stop } - } - - assert( $out.length > 0 ) - assert_equal(0, $status.exitstatus) - assert_kind_of(Process::Status, $status) - end - - def test_em_system_pid - $pids = [] - - EM.run{ - $pids << EM.system('echo hi', proc{ |out,status|$pids << status.pid; EM.stop }) - } - - assert_equal $pids[0], $pids[1] - end - - def test_em_system_with_proc - EM.run{ - EM.system('ls', proc{ |out,status| $out, $status = out, status; EM.stop }) - } - - assert( $out.length > 0 ) - assert_equal(0, $status.exitstatus) - assert_kind_of(Process::Status, $status) - end - - def test_em_system_with_two_procs - EM.run{ - EM.system('sh', proc{ |process| - process.send_data("echo hello\n") - process.send_data("exit\n") - }, proc{ |out,status| - $out = out - $status = status - EM.stop - }) - } - - assert_equal("hello\n", $out) - end - - def test_em_system_cmd_arguments - EM.run{ - EM.system('echo', '1', '2', 'version', proc{ |process| - }, proc{ |out,status| - $out = out - $status = status - EM.stop - }) - } - - assert_match(/1 2 version/i, $out) - end - - def test_em_system_spaced_arguments - EM.run{ - EM.system('ruby', '-e', 'puts "hello"', proc{ |out,status| - $out = out - EM.stop - }) - } - - assert_equal("hello\n", $out) - end - - def test_em_popen_pause_resume - c_rx = 0 - - test_client = Module.new do - define_method :receive_data do |data| - c_rx += 1 - pause - EM.add_timer(0.5) { EM.stop } - end - end - - EM.run do - EM.popen('echo 1', test_client) - end - - assert_equal 1, c_rx - end - else - warn "EM.popen not implemented, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests - def test_em_popen_unsupported - assert true - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_proxy_connection.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_proxy_connection.rb deleted file mode 100644 index 11c0fb41..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_proxy_connection.rb +++ /dev/null @@ -1,180 +0,0 @@ -require 'em_test_helper' - -class TestProxyConnection < Test::Unit::TestCase - - if EM.respond_to?(:start_proxy) - module ProxyConnection - def initialize(client, request) - @client, @request = client, request - end - - def post_init - EM::enable_proxy(self, @client) - end - - def connection_completed - EM.next_tick { - send_data @request - } - end - - def proxy_target_unbound - $unbound_early = true - EM.stop - end - - def unbind - $proxied_bytes = self.get_proxied_bytes - @client.close_connection_after_writing - end - end - - module PartialProxyConnection - def initialize(client, request, length) - @client, @request, @length = client, request, length - end - - def post_init - EM::enable_proxy(self, @client, 0, @length) - end - - def receive_data(data) - $unproxied_data = data - @client.send_data(data) - end - - def connection_completed - EM.next_tick { - send_data @request - } - end - - def proxy_target_unbound - $unbound_early = true - EM.stop - end - - def proxy_completed - $proxy_completed = true - end - - def unbind - @client.close_connection_after_writing - end - end - - module Client - def connection_completed - send_data "EM rocks!" - end - - def receive_data(data) - $client_data = data - end - - def unbind - EM.stop - end - end - - module Client2 - include Client - def unbind; end - end - - module Server - def receive_data(data) - send_data "I know!" if data == "EM rocks!" - close_connection_after_writing - end - end - - module ProxyServer - def initialize port - @port = port - end - - def receive_data(data) - @proxy = EM.connect("127.0.0.1", @port, ProxyConnection, self, data) - end - end - - module PartialProxyServer - def initialize port - @port = port - end - - def receive_data(data) - EM.connect("127.0.0.1", @port, PartialProxyConnection, self, data, 1) - end - end - - module EarlyClosingProxy - def initialize port - @port = port - end - - def receive_data(data) - EM.connect("127.0.0.1", @port, ProxyConnection, self, data) - close_connection - end - end - - def setup - @port = next_port - @proxy_port = next_port - end - - def test_proxy_connection - EM.run { - EM.start_server("127.0.0.1", @port, Server) - EM.start_server("127.0.0.1", @proxy_port, ProxyServer, @port) - EM.connect("127.0.0.1", @proxy_port, Client) - } - - assert_equal("I know!", $client_data) - end - - def test_proxied_bytes - EM.run { - EM.start_server("127.0.0.1", @port, Server) - EM.start_server("127.0.0.1", @proxy_port, ProxyServer, @port) - EM.connect("127.0.0.1", @proxy_port, Client) - } - - assert_equal("I know!", $client_data) - assert_equal("I know!".bytesize, $proxied_bytes) - end - - def test_partial_proxy_connection - EM.run { - EM.start_server("127.0.0.1", @port, Server) - EM.start_server("127.0.0.1", @proxy_port, PartialProxyServer, @port) - EM.connect("127.0.0.1", @proxy_port, Client) - } - - assert_equal("I know!", $client_data) - assert_equal(" know!", $unproxied_data) - assert($proxy_completed) - end - - def test_early_close - $client_data = nil - EM.run { - EM.start_server("127.0.0.1", @port, Server) - EM.start_server("127.0.0.1", @proxy_port, EarlyClosingProxy, @port) - EM.connect("127.0.0.1", @proxy_port, Client2) - } - - assert($unbound_early) - end - else - warn "EM.start_proxy not implemented, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests - def test_em_start_proxy_not_implemented - assert !EM.respond_to?(:start_proxy) - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pure.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pure.rb deleted file mode 100644 index 8863a8d1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_pure.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'em_test_helper' - -class TestPure < Test::Unit::TestCase - - def setup - @port = next_port - end - - # These tests are intended to exercise problems that come up in the - # pure-Ruby implementation. However, we DON'T constrain them such that - # they only run in pure-Ruby. These tests need to work identically in - # any implementation. - - #------------------------------------- - - # The EM reactor needs to run down open connections and release other resources - # when it stops running. Make sure this happens even if user code throws a Ruby - # exception. - # If exception handling is incorrect, the second test will fail with a no-bind error - # because the TCP server opened in the first test will not have been closed. - - def test_exception_handling_releases_resources - exception = Class.new(StandardError) - - 2.times do - assert_raises(exception) do - EM.run do - EM.start_server "127.0.0.1", @port - raise exception - end - end - end - end - - # Under some circumstances, the pure Ruby library would emit an Errno::ECONNREFUSED - # exception on certain kinds of TCP connect-errors. - # It's always been something of an open question whether EM should throw an exception - # in these cases but the defined answer has always been to catch it the unbind method. - # With a connect failure, the latter will always fire, but connection_completed will - # never fire. So even though the point is arguable, it's incorrect for the pure Ruby - # version to throw an exception. - module TestConnrefused - def unbind - EM.stop - end - def connection_completed - raise "should never get here" - end - end - - def test_connrefused - assert_nothing_raised do - EM.run { - setup_timeout(2) - EM.connect "127.0.0.1", @port, TestConnrefused - } - end - end - - # Make sure connection_completed gets called as expected with TCP clients. This is the - # opposite of test_connrefused. - # If the test fails, it will hang because EM.stop never gets called. - # - module TestConnaccepted - def connection_completed - EM.stop - end - end - def test_connaccepted - assert_nothing_raised do - EM.run { - EM.start_server "127.0.0.1", @port - EM.connect "127.0.0.1", @port, TestConnaccepted - setup_timeout(1) - } - end - end - - def test_reactor_running - a = false - EM.run { - a = EM.reactor_running? - EM.next_tick {EM.stop} - } - assert a - end - - module TLSServer - def post_init - start_tls - end - - def ssl_handshake_completed - $server_handshake_completed = true - end - - def receive_data(data) - $server_received_data = data - send_data(data) - end - end - - module TLSClient - def post_init - start_tls - end - - def ssl_handshake_completed - $client_handshake_completed = true - end - - def connection_completed - send_data('Hello World!') - end - - def receive_data(data) - $client_received_data = data - close_connection - end - - def unbind - EM.stop_event_loop - end - end - - def test_start_tls - $client_handshake_completed, $server_handshake_completed = false, false - $client_received_data, $server_received_data = nil, nil - EM.run do - EM.start_server("127.0.0.1", 16789, TLSServer) - EM.connect("127.0.0.1", 16789, TLSClient) - end - - assert($client_handshake_completed) - assert($server_handshake_completed) - assert($client_received_data == "Hello World!") - assert($server_received_data == "Hello World!") - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_queue.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_queue.rb deleted file mode 100644 index 34278c05..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_queue.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'em_test_helper' - -class TestEMQueue < Test::Unit::TestCase - def test_queue_push - s = 0 - EM.run do - q = EM::Queue.new - q.push(1) - EM.next_tick { s = q.size; EM.stop } - end - assert_equal 1, s - end - - def test_queue_pop - x,y,z = nil - EM.run do - q = EM::Queue.new - q.push(1,2,3) - q.pop { |v| x = v } - q.pop { |v| y = v } - q.pop { |v| z = v; EM.stop } - end - assert_equal 1, x - assert_equal 2, y - assert_equal 3, z - end - - def test_queue_reactor_thread - q = EM::Queue.new - - Thread.new { q.push(1,2,3) }.join - assert q.empty? - EM.run { EM.next_tick { EM.stop } } - assert_equal 3, q.size - - x = nil - Thread.new { q.pop { |v| x = v } }.join - assert_equal nil, x - EM.run { EM.next_tick { EM.stop } } - assert_equal 1, x - end - - def test_num_waiting - q = EM::Queue.new - many = 3 - many.times { q.pop {} } - EM.run { EM.next_tick { EM.stop } } - assert_equal many, q.num_waiting - end - - def test_big_queue - EM.run do - q = EM::Queue.new - 2000.times do |i| - q.push(*0..1000) - q.pop { |v| assert_equal v, i % 1001 } - end - q.pop do - assert_equal 1_999_999, q.size - EM.stop - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_resolver.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_resolver.rb deleted file mode 100644 index 58ed5f57..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_resolver.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'em_test_helper' - -class TestResolver < Test::Unit::TestCase - def test_nameserver - assert_kind_of(String, EM::DNS::Resolver.nameserver) - end - - def test_nameservers - assert_kind_of(Array, EM::DNS::Resolver.nameservers) - end - - def test_hosts - assert_kind_of(Hash, EM::DNS::Resolver.hosts) - - # Make sure that blank or comment lines are skipped - refute(EM::DNS::Resolver.hosts.include? nil) - end - - def test_a - pend('FIXME: this test is broken on Windows') if windows? - - EM.run { - d = EM::DNS::Resolver.resolve "example.com" - d.errback { assert false } - d.callback { |r| - assert r - EM.stop - } - } - end - - def test_bad_host - EM.run { - d = EM::DNS::Resolver.resolve "asdfasasdf" - d.callback { assert false } - d.errback { assert true; EM.stop } - } - end - - def test_garbage - assert_raises( ArgumentError ) { - EM.run { - EM::DNS::Resolver.resolve 123 - } - } - end - - # There isn't a public DNS entry like 'example.com' with an A rrset - def test_a_pair - pend('FIXME: this test is broken on Windows') if windows? - - EM.run { - d = EM::DNS::Resolver.resolve "yahoo.com" - d.errback { |err| assert false, "failed to resolve yahoo.com: #{err}" } - d.callback { |r| - assert_kind_of(Array, r) - assert r.size > 1, "returned #{r.size} results: #{r.inspect}" - EM.stop - } - } - end - - def test_localhost - pend('FIXME: this test is broken on Windows') if windows? - - EM.run { - d = EM::DNS::Resolver.resolve "localhost" - d.errback { assert false } - d.callback { |r| - assert_include(["127.0.0.1", "::1"], r.first) - assert_kind_of(Array, r) - - EM.stop - } - } - end - - def test_timer_cleanup - pend('FIXME: this test is broken on Windows') if windows? - - EM.run { - d = EM::DNS::Resolver.resolve "example.com" - d.errback { |err| assert false, "failed to resolve example.com: #{err}" } - d.callback { |r| - # This isn't a great test, but it's hard to get more canonical - # confirmation that the timer is cancelled - assert_nil(EM::DNS::Resolver.socket.instance_variable_get(:@timer)) - - EM.stop - } - } - end - - def test_failure_timer_cleanup - EM.run { - d = EM::DNS::Resolver.resolve "asdfasdf" - d.callback { assert false } - d.errback { - assert_nil(EM::DNS::Resolver.socket.instance_variable_get(:@timer)) - - EM.stop - } - } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_running.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_running.rb deleted file mode 100644 index 693b3901..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_running.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'em_test_helper' - -class TestRunning < Test::Unit::TestCase - def test_running - assert_equal( false, EM::reactor_running? ) - r = false - EM.run { - r = EM::reactor_running? - EM.stop - } - assert_equal( true, r ) - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_sasl.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_sasl.rb deleted file mode 100644 index e80f6571..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_sasl.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'em_test_helper' - - -class TestSASL < Test::Unit::TestCase - - # SASL authentication is usually done with UNIX-domain sockets, but - # we'll use TCP so this test will work on Windows. As far as the - # protocol handlers are concerned, there's no difference. - - TestUser,TestPsw = "someone", "password" - - class SaslServer < EM::Connection - include EM::Protocols::SASLauth - def validate usr, psw, sys, realm - usr == TestUser and psw == TestPsw - end - end - - class SaslClient < EM::Connection - include EM::Protocols::SASLauthclient - end - - def setup - @port = next_port - end - - def test_sasl - resp = nil - EM.run { - EM.start_server( "127.0.0.1", @port, SaslServer ) - - c = EM.connect( "127.0.0.1", @port, SaslClient ) - d = c.validate?( TestUser, TestPsw ) - d.timeout 1 - d.callback { - resp = true - EM.stop - } - d.errback { - resp = false - EM.stop - } - } - assert_equal( true, resp ) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_send_file.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_send_file.rb deleted file mode 100644 index a784b505..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_send_file.rb +++ /dev/null @@ -1,217 +0,0 @@ -require 'em_test_helper' -require 'tempfile' - -class TestSendFile < Test::Unit::TestCase - - if EM.respond_to?(:send_file_data) - module TestModule - def initialize filename - @filename = filename - end - - def post_init - send_file_data @filename - close_connection_after_writing - end - end - - module TestClient - def data_to(&blk) - @data_to = blk - end - - def receive_data(data) - @data_to.call(data) if @data_to - end - - def unbind - EM.stop - end - end - - def setup - @file = Tempfile.new("em_test_file") - @filename = @file.path - @port = next_port - end - - def test_send_file - File.open( @filename, "w" ) {|f| - f << ("A" * 5000) - } - - data = '' - - EM.run { - EM.start_server "127.0.0.1", @port, TestModule, @filename - setup_timeout - - EM.connect "127.0.0.1", @port, TestClient do |c| - c.data_to { |d| data << d } - end - } - - assert_equal( "A" * 5000, data ) - end - - # EM::Connection#send_file_data has a strict upper limit on the filesize it will work with. - def test_send_large_file - File.open( @filename, "w" ) {|f| - f << ("A" * 1000000) - } - - data = '' - - assert_raises(RuntimeError) { - EM.run { - EM.start_server "127.0.0.1", @port, TestModule, @filename - setup_timeout - EM.connect "127.0.0.1", @port, TestClient do |c| - c.data_to { |d| data << d } - end - } - } - end - - module StreamTestModule - def initialize filename - @filename = filename - end - - def post_init - EM::Deferrable.future( stream_file_data(@filename)) { - close_connection_after_writing - } - end - end - - module ChunkStreamTestModule - def initialize filename - @filename = filename - end - - def post_init - EM::Deferrable.future( stream_file_data(@filename, :http_chunks=>true)) { - close_connection_after_writing - } - end - end - - def test_stream_file_data - File.open( @filename, "w" ) {|f| - f << ("A" * 1000) - } - - data = '' - - EM.run { - EM.start_server "127.0.0.1", @port, StreamTestModule, @filename - setup_timeout - EM.connect "127.0.0.1", @port, TestClient do |c| - c.data_to { |d| data << d } - end - } - - assert_equal( "A" * 1000, data ) - end - - def test_stream_chunked_file_data - File.open( @filename, "w" ) {|f| - f << ("A" * 1000) - } - - data = '' - - EM.run { - EM.start_server "127.0.0.1", @port, ChunkStreamTestModule, @filename - setup_timeout - EM.connect "127.0.0.1", @port, TestClient do |c| - c.data_to { |d| data << d } - end - } - - assert_equal( "3e8\r\n#{"A" * 1000}\r\n0\r\n\r\n", data ) - end - - module BadFileTestModule - def initialize filename - @filename = filename - end - - def post_init - de = stream_file_data( @filename+".wrong" ) - de.errback {|msg| - send_data msg - close_connection_after_writing - } - end - end - def test_stream_bad_file - data = '' - EM.run { - EM.start_server "127.0.0.1", @port, BadFileTestModule, @filename - setup_timeout(5) - EM.connect "127.0.0.1", @port, TestClient do |c| - c.data_to { |d| data << d } - end - } - - assert_equal( "file not found", data ) - end - else - warn "EM.send_file_data not implemented, skipping tests in #{__FILE__}" - - # Because some rubies will complain if a TestCase class has no tests - def test_em_send_file_data_not_implemented - assert !EM.respond_to?(:send_file_data) - end - end - - begin - require 'fastfilereaderext' - - def test_stream_large_file_data - File.open( @filename, "w" ) {|f| - f << ("A" * 10000) - } - - data = '' - - EM.run { - EM.start_server "127.0.0.1", @port, StreamTestModule, @filename - setup_timeout - EM.connect "127.0.0.1", @port, TestClient do |c| - c.data_to { |d| data << d } - end - } - - assert_equal( "A" * 10000, data ) - end - - def test_stream_large_chunked_file_data - File.open( @filename, "w" ) {|f| - f << ("A" * 100000) - } - - data = '' - - EM.run { - EM.start_server "127.0.0.1", @port, ChunkStreamTestModule, @filename - setup_timeout - EM.connect "127.0.0.1", @port, TestClient do |c| - c.data_to { |d| data << d } - end - } - - expected = [ - "4000\r\n#{"A" * 16384}\r\n" * 6, - "6a0\r\n#{"A" * 0x6a0}\r\n", - "0\r\n\r\n" - ].join - assert_equal( expected, data ) - end - rescue LoadError - warn "require 'fastfilereaderext' failed, skipping tests in #{__FILE__}" - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_servers.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_servers.rb deleted file mode 100644 index 2a170504..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_servers.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'em_test_helper' -require 'socket' - -class TestServers < Test::Unit::TestCase - - def setup - @port = next_port - end - - def server_alive? - port_in_use?(@port) - end - - def run_test_stop_server - EM.run { - sig = EM.start_server("127.0.0.1", @port) - assert server_alive?, "Server didn't start" - EM.stop_server sig - # Give the server some time to shutdown. - EM.add_timer(0.1) { - assert !server_alive?, "Server didn't stop" - EM.stop - } - } - end - - def test_stop_server - assert !server_alive?, "Port already in use" - 2.times { run_test_stop_server } - assert !server_alive?, "Servers didn't stop" - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_shutdown_hooks.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_shutdown_hooks.rb deleted file mode 100644 index b0e0c5cc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_shutdown_hooks.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'em_test_helper' - -class TestShutdownHooks < Test::Unit::TestCase - def test_shutdown_hooks - r = false - EM.run { - EM.add_shutdown_hook { r = true } - EM.stop - } - assert_equal( true, r ) - end - - def test_hook_order - r = [] - EM.run { - EM.add_shutdown_hook { r << 2 } - EM.add_shutdown_hook { r << 1 } - EM.stop - } - assert_equal( [1, 2], r ) - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_smtpclient.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_smtpclient.rb deleted file mode 100644 index 71ed5844..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_smtpclient.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'em_test_helper' - -class TestSmtpClient < Test::Unit::TestCase - - Localhost = "127.0.0.1" - Localport = 9801 - - def setup - end - - def teardown - end - - def test_a - # No real tests until we have a server implementation to test against. - # This is what the call looks like, though: - err = nil - EM.run { - d = EM::Protocols::SmtpClient.send :domain=>"example.com", - :host=>Localhost, - :port=>Localport, # optional, defaults 25 - :starttls=>true, - :from=>"sender@example.com", - :to=> ["to_1@example.com", "to_2@example.com"], - :header=> {"Subject" => "This is a subject line"}, - :body=> "This is the body of the email", - :verbose=>true - d.errback {|e| - err = e - EM.stop - } - } - assert(err) - end - - def test_content - err = nil - EM.run { - d = EM::Protocols::SmtpClient.send :domain=>"example.com", - :host=>Localhost, - :port=>Localport, # optional, defaults 25 - :starttls=>true, - :from=>"sender@example.com", - :to=> ["to_1@example.com", "to_2@example.com"], - :content => ["Subject: xxx\r\n\r\ndata\r\n.\r\n"], - :verbose=>true - d.errback {|e| - err = e - EM.stop - } - } - assert(err) - end - - - EM::Protocols::SmtpClient.__send__(:public, :escape_leading_dots) - - def test_escaping - smtp = EM::Protocols::SmtpClient.new :domain => "example.com" - - expectations = { - "Hello\r\n" => "Hello\r\n", - "\r\n.whatever\r\n" => "\r\n..whatever\r\n", - "\r\n.\r\n" => "\r\n..\r\n", - "\r\n.\r\n." => "\r\n..\r\n..", - ".\r\n.\r\n" => "..\r\n..\r\n", - "..\r\n" => "...\r\n" - } - - expectations.each do |input, output| - assert_equal output, smtp.escape_leading_dots(input) - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_smtpserver.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_smtpserver.rb deleted file mode 100644 index 18c50feb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_smtpserver.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'em_test_helper' - -class TestSmtpServer < Test::Unit::TestCase - - # Don't test on port 25. It requires superuser and there's probably - # a mail server already running there anyway. - Localhost = "127.0.0.1" - Localport = 25001 - - # This class is an example of what you need to write in order - # to implement a mail server. You override the methods you are - # interested in. Some, but not all, of these are illustrated here. - # - class Mailserver < EM::Protocols::SmtpServer - - attr_reader :my_msg_body, :my_sender, :my_recipients - - def initialize *args - super - end - def receive_sender sender - @my_sender = sender - #p sender - true - end - def receive_recipient rcpt - @my_recipients ||= [] - @my_recipients << rcpt - true - end - def receive_data_chunk c - @my_msg_body = c.last - end - def connection_ended - EM.stop - end - end - - def test_mail - c = nil - EM.run { - EM.start_server( Localhost, Localport, Mailserver ) {|conn| c = conn} - EM::Timer.new(2) {EM.stop} # prevent hanging the test suite in case of error - EM::Protocols::SmtpClient.send :host=>Localhost, - :port=>Localport, - :domain=>"bogus", - :from=>"me@example.com", - :to=>"you@example.com", - :header=> {"Subject"=>"Email subject line", "Reply-to"=>"me@example.com"}, - :body=>"Not much of interest here." - - } - assert_equal( "Not much of interest here.", c.my_msg_body ) - assert_equal( "", c.my_sender ) - assert_equal( [""], c.my_recipients ) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_sock_opt.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_sock_opt.rb deleted file mode 100644 index 60fba351..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_sock_opt.rb +++ /dev/null @@ -1,54 +0,0 @@ -require 'em_test_helper' -require 'socket' - -class TestSockOpt < Test::Unit::TestCase - def setup - assert(!EM.reactor_running?) - @port = next_port - end - - def teardown - assert(!EM.reactor_running?) - end - - def test_set_sock_opt - omit_if(windows?) - omit_if(!EM.respond_to?(:set_sock_opt)) - - val = nil - test_module = Module.new do - define_method :post_init do - val = set_sock_opt Socket::SOL_SOCKET, Socket::SO_BROADCAST, true - EM.stop - end - end - - EM.run do - EM.start_server '127.0.0.1', @port - EM.connect '127.0.0.1', @port, test_module - end - - assert_equal 0, val - end - - def test_get_sock_opt - omit_if(windows?) - omit_if(!EM.respond_to?(:set_sock_opt)) - - val = nil - test_module = Module.new do - define_method :connection_completed do - val = get_sock_opt Socket::SOL_SOCKET, Socket::SO_ERROR - EM.stop - end - end - - EM.run do - EM.start_server '127.0.0.1', @port - EM.connect '127.0.0.1', @port, test_module - end - - assert_equal "\0\0\0\0", val - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_spawn.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_spawn.rb deleted file mode 100644 index ab0a92f7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_spawn.rb +++ /dev/null @@ -1,293 +0,0 @@ - -require 'em_test_helper' - - - -class TestSpawn < Test::Unit::TestCase - - # Spawn a process that simply stops the reactor. - # Assert that the notification runs after the block that calls it. - # - def test_stop - x = nil - EM.run { - s = EM.spawn {EM.stop} - s.notify - x = true - } - assert x - end - - - # Pass a parameter to a spawned process. - # - def test_parms - val = 5 - EM.run { - s = EM.spawn {|v| val *= v; EM.stop} - s.notify 3 - } - assert_equal( 15, val ) - end - - # Pass multiple parameters to a spawned process. - # - def test_multiparms - val = 5 - EM.run { - s = EM.spawn {|v1,v2| val *= (v1 + v2); EM.stop} - s.notify 3,4 - } - assert_equal( 35, val ) - end - - - # This test demonstrates that a notification does not happen immediately, - # but rather is scheduled sometime after the current code path completes. - # - def test_race - x = 0 - EM.run { - s = EM.spawn {x *= 2; EM.stop} - s.notify - x = 2 - } - assert_equal( 4, x) - end - - - # Spawn a process and notify it 25 times to run fibonacci - # on a pair of global variables. - # - def test_fibonacci - x = 1 - y = 1 - EM.run { - s = EM.spawn {x,y = y,x+y} - 25.times {s.notify} - - t = EM.spawn {EM.stop} - t.notify - } - assert_equal( 121393, x) - assert_equal( 196418, y) - end - - # This one spawns 25 distinct processes, and notifies each one once, - # rather than notifying a single process 25 times. - # - def test_another_fibonacci - x = 1 - y = 1 - EM.run { - 25.times { - s = EM.spawn {x,y = y,x+y} - s.notify - } - - t = EM.spawn {EM.stop} - t.notify - } - assert_equal( 121393, x) - assert_equal( 196418, y) - end - - - # Make a chain of processes that notify each other in turn - # with intermediate fibonacci results. The final process in - # the chain stops the loop and returns the result. - # - def test_fibonacci_chain - a,b = nil - - EM.run { - nextpid = EM.spawn {|x,y| - a,b = x,y - EM.stop - } - - 25.times { - n = nextpid - nextpid = EM.spawn {|x,y| n.notify( y, x+y )} - } - - nextpid.notify( 1, 1 ) - } - - assert_equal( 121393, a) - assert_equal( 196418, b) - end - - - # EM#yield gives a spawed process to yield control to other processes - # (in other words, to stop running), and to specify a different code block - # that will run on its next notification. - # - def test_yield - a = 0 - EM.run { - n = EM.spawn { - a += 10 - EM.yield { - a += 20 - EM.yield { - a += 30 - EM.stop - } - } - } - n.notify - n.notify - n.notify - } - assert_equal( 60, a ) - end - - # EM#yield_and_notify behaves like EM#yield, except that it also notifies the - # yielding process. This may sound trivial, since the yield block will run very - # shortly after with no action by the program, but this actually can be very useful, - # because it causes the reactor core to execute once before the yielding process - # gets control back. So it can be used to allow heavily-used network connections - # to clear buffers, or allow other processes to process their notifications. - # - # Notice in this test code that only a simple notify is needed at the bottom - # of the initial block. Even so, all of the yielded blocks will execute. - # - def test_yield_and_notify - a = 0 - EM.run { - n = EM.spawn { - a += 10 - EM.yield_and_notify { - a += 20 - EM.yield_and_notify { - a += 30 - EM.stop - } - } - } - n.notify - } - assert_equal( 60, a ) - end - - # resume is an alias for notify. - # - def test_resume - EM.run { - n = EM.spawn {EM.stop} - n.resume - } - assert true - end - - # run is an idiomatic alias for notify. - # - def test_run - EM.run { - (EM.spawn {EM.stop}).run - } - assert true - end - - - # Clones the ping-pong example from the Erlang tutorial, in much less code. - # Illustrates that a spawned block executes in the context of a SpawnableObject. - # (Meaning, we can pass self as a parameter to another process that can then - # notify us.) - # - def test_ping_pong - n_pongs = 0 - EM.run { - pong = EM.spawn {|x, ping| - n_pongs += 1 - ping.notify( x-1 ) - } - ping = EM.spawn {|x| - if x > 0 - pong.notify x, self - else - EM.stop - end - } - ping.notify 3 - } - assert_equal( 3, n_pongs ) - end - - # Illustrates that you can call notify inside a notification, and it will cause - # the currently-executing process to be re-notified. Of course, the new notification - # won't run until sometime after the current one completes. - # - def test_self_notify - n = 0 - EM.run { - pid = EM.spawn {|x| - if x > 0 - n += x - notify( x-1 ) - else - EM.stop - end - } - pid.notify 3 - } - assert_equal( 6, n ) - end - - - # Illustrates that the block passed to #spawn executes in the context of a - # SpawnedProcess object, NOT in the local context. This can often be deceptive. - # - class BlockScopeTest - attr_reader :var - def run - # The following line correctly raises a NameError. - # The problem is that the programmer expected the spawned block to - # execute in the local context, but it doesn't. - # - # (EM.spawn { do_something }).notify ### NO! BAD! - - - - # The following line correctly passes self as a parameter to the - # notified process. - # - (EM.spawn {|obj| obj.do_something }).notify(self) - - - - # Here's another way to do it. This works because "myself" is bound - # in the local scope, unlike "self," so the spawned block sees it. - # - myself = self - (EM.spawn { myself.do_something }).notify - - - - # And we end the loop. - # This is a tangential point, but observe that #notify never blocks. - # It merely appends a message to the internal queue of a spawned process - # and returns. As it turns out, the reactor processes notifications for ALL - # spawned processes in the order that #notify is called. So there is a - # reasonable expectation that the process which stops the reactor will - # execute after the previous ones in this method. HOWEVER, this is NOT - # a documented behavior and is subject to change. - # - (EM.spawn {EM.stop}).notify - end - def do_something - @var ||= 0 - @var += 100 - end - end - - def test_block_scope - bs = BlockScopeTest.new - EM.run { - bs.run - } - assert_equal( 200, bs.var ) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_args.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_args.rb deleted file mode 100644 index d337628c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_args.rb +++ /dev/null @@ -1,78 +0,0 @@ -require "test/unit" -require 'tempfile' - -require 'em_test_helper' - -module EM - def self._set_mocks - class < priv_file) - end - assert_raises(EM::FileNotFoundException) do - conn.start_tls(:cert_chain_file => cert_file) - end - assert_raises(EM::FileNotFoundException) do - conn.start_tls(:private_key_file => priv_file, :cert_chain_file => cert_file) - end - end - - def test_tls_params_file_does_exist - priv_file = Tempfile.new('em_test') - cert_file = Tempfile.new('em_test') - priv_file_path = priv_file.path - cert_file_path = cert_file.path - conn = EM::Connection.new('foo') - params = {:private_key_file => priv_file_path, :cert_chain_file => cert_file_path} - begin - conn.start_tls params - rescue Object - assert(false, 'should not have raised an exception') - end - end -end if EM.ssl? diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_dhparam.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_dhparam.rb deleted file mode 100644 index 85f52d2f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_dhparam.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'em_test_helper' - -class TestSslDhParam < Test::Unit::TestCase - def setup - $dir = File.dirname(File.expand_path(__FILE__)) + '/' - $dhparam_file = File.join($dir, 'dhparam.pem') - end - - module Client - def post_init - start_tls - end - - def ssl_handshake_completed - $client_handshake_completed = true - $client_cipher_name = get_cipher_name - close_connection - end - - def unbind - EM.stop_event_loop - end - end - - module Server - def post_init - start_tls(:dhparam => $dhparam_file, :cipher_list => "DHE,EDH") - end - - def ssl_handshake_completed - $server_handshake_completed = true - $server_cipher_name = get_cipher_name - end - end - - module NoDhServer - def post_init - start_tls(:cipher_list => "DHE,EDH") - end - - def ssl_handshake_completed - $server_handshake_completed = true - $server_cipher_name = get_cipher_name - end - end - - def test_no_dhparam - omit_unless(EM.ssl?) - omit_if(EM.library_type == :pure_ruby) # DH will work with defaults - omit_if(rbx?) - - $client_handshake_completed, $server_handshake_completed = false, false - $server_cipher_name, $client_cipher_name = nil, nil - - EM.run { - EM.start_server("127.0.0.1", 16784, NoDhServer) - EM.connect("127.0.0.1", 16784, Client) - } - - assert(!$client_handshake_completed) - assert(!$server_handshake_completed) - end - - def test_dhparam - omit_unless(EM.ssl?) - omit_if(rbx?) - - $client_handshake_completed, $server_handshake_completed = false, false - $server_cipher_name, $client_cipher_name = nil, nil - - EM.run { - EM.start_server("127.0.0.1", 16784, Server) - EM.connect("127.0.0.1", 16784, Client) - } - - assert($client_handshake_completed) - assert($server_handshake_completed) - - assert($client_cipher_name.length > 0) - assert_equal($client_cipher_name, $server_cipher_name) - - assert_match(/^(DHE|EDH)/, $client_cipher_name) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_ecdh_curve.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_ecdh_curve.rb deleted file mode 100644 index 8dc167b6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_ecdh_curve.rb +++ /dev/null @@ -1,80 +0,0 @@ -require 'em_test_helper' - -class TestSslEcdhCurve < Test::Unit::TestCase - module Client - def post_init - start_tls - end - - def ssl_handshake_completed - $client_handshake_completed = true - $client_cipher_name = get_cipher_name - close_connection - end - - def unbind - EM.stop_event_loop - end - end - - module Server - def post_init - start_tls(:ecdh_curve => "prime256v1", :cipher_list => "ECDH") - end - - def ssl_handshake_completed - $server_handshake_completed = true - $server_cipher_name = get_cipher_name - end - end - - module NoCurveServer - def post_init - start_tls(:cipher_list => "ECDH") - end - - def ssl_handshake_completed - $server_handshake_completed = true - $server_cipher_name = get_cipher_name - end - end - - def test_no_ecdh_curve - omit_unless(EM.ssl?) - omit_if(rbx?) - - $client_handshake_completed, $server_handshake_completed = false, false - - EM.run { - EM.start_server("127.0.0.1", 16784, NoCurveServer) - EM.connect("127.0.0.1", 16784, Client) - } - - assert(!$client_handshake_completed) - assert(!$server_handshake_completed) - end - - def test_ecdh_curve - omit_unless(EM.ssl?) - omit_if(EM.library_type == :pure_ruby && RUBY_VERSION < "2.3.0") - omit_if(rbx?) - - $client_handshake_completed, $server_handshake_completed = false, false - $server_cipher_name, $client_cipher_name = nil, nil - - EM.run { - EM.start_server("127.0.0.1", 16784, Server) - EM.connect("127.0.0.1", 16784, Client) - } - - assert($client_handshake_completed) - assert($server_handshake_completed) - - assert($client_cipher_name.length > 0) - assert_equal($client_cipher_name, $server_cipher_name) - - assert_match(/^(AECDH|ECDHE)/, $client_cipher_name) - end - - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_extensions.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_extensions.rb deleted file mode 100644 index 0610ba88..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_extensions.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'em_test_helper' - -require 'socket' -require 'openssl' - -if EM.ssl? - class TestSslExtensions < Test::Unit::TestCase - - module Client - def ssl_handshake_completed - $client_handshake_completed = true - close_connection - end - - def unbind - EM.stop_event_loop - end - - def post_init - start_tls(:ssl_version => :tlsv1, :sni_hostname => 'example.com') - end - end - - module Server - def ssl_handshake_completed - $server_handshake_completed = true - $server_sni_hostname = get_sni_hostname - end - - def post_init - start_tls(:ssl_version => :TLSv1) - end - end - - def test_tlsext_sni_hostname - $server_handshake_completed = false - - EM.run do - EM.start_server("127.0.0.1", 16784, Server) - EM.connect("127.0.0.1", 16784, Client) - end - - assert($server_handshake_completed) - assert_equal('example.com', $server_sni_hostname) - end - end -else - warn "EM built without SSL support, skipping tests in #{__FILE__}" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_methods.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_methods.rb deleted file mode 100644 index c2e5744d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_methods.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'em_test_helper' - -class TestSSLMethods < Test::Unit::TestCase - - module ServerHandler - def post_init - start_tls - end - - def ssl_handshake_completed - $server_called_back = true - $server_cert_value = get_peer_cert - $server_cipher_bits = get_cipher_bits - $server_cipher_name = get_cipher_name - $server_cipher_protocol = get_cipher_protocol - end - end - - module ClientHandler - def post_init - start_tls - end - - def ssl_handshake_completed - $client_called_back = true - $client_cert_value = get_peer_cert - $client_cipher_bits = get_cipher_bits - $client_cipher_name = get_cipher_name - $client_cipher_protocol = get_cipher_protocol - EM.stop_event_loop - end - end - - def test_ssl_methods - omit_unless(EM.ssl?) - omit_if(rbx?) - $server_called_back, $client_called_back = false, false - $server_cert_value, $client_cert_value = nil, nil - $server_cipher_bits, $client_cipher_bits = nil, nil - $server_cipher_name, $client_cipher_name = nil, nil - $server_cipher_protocol, $client_cipher_protocol = nil, nil - - EM.run { - EM.start_server("127.0.0.1", 9999, ServerHandler) - EM.connect("127.0.0.1", 9999, ClientHandler) - } - - assert($server_called_back) - assert($client_called_back) - - assert($server_cert_value.is_a?(NilClass)) - assert($client_cert_value.is_a?(String)) - - assert($client_cipher_bits > 0) - assert_equal($client_cipher_bits, $server_cipher_bits) - - assert($client_cipher_name.length > 0) - assert_match(/AES/, $client_cipher_name) - assert_equal($client_cipher_name, $server_cipher_name) - - assert_match(/TLS/, $client_cipher_protocol) - assert_equal($client_cipher_protocol, $server_cipher_protocol) - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_protocols.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_protocols.rb deleted file mode 100644 index bcb68246..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_protocols.rb +++ /dev/null @@ -1,246 +0,0 @@ -require 'em_test_helper' - -require 'socket' -require 'openssl' - -if EM.ssl? - class TestSslProtocols < Test::Unit::TestCase - - module Client - def ssl_handshake_completed - $client_handshake_completed = true - close_connection - end - - def unbind - EM.stop_event_loop - end - end - - module Server - def ssl_handshake_completed - $server_handshake_completed = true - end - end - - module ClientAny - include Client - def post_init - start_tls(:ssl_version => %w(sslv2 sslv3 tlsv1 tlsv1_1 tlsv1_2)) - end - end - - module ClientDefault - include Client - def post_init - start_tls - end - end - - module ClientSSLv3 - include Client - def post_init - start_tls(:ssl_version => %w(SSLv3)) - end - end - - module ServerSSLv3 - include Server - def post_init - start_tls(:ssl_version => %w(SSLv3)) - end - end - - module ServerTLSv1CaseInsensitive - include Server - def post_init - start_tls(:ssl_version => %w(tlsv1)) - end - end - - module ServerAny - include Server - def post_init - start_tls(:ssl_version => %w(sslv2 sslv3 tlsv1 tlsv1_1 tlsv1_2)) - end - end - - module ServerDefault - include Server - def post_init - start_tls - end - end - - module InvalidProtocol - include Client - def post_init - start_tls(:ssl_version => %w(tlsv1 badinput)) - end - end - - def test_invalid_ssl_version - assert_raises(RuntimeError, "Unrecognized SSL/TLS Version: badinput") do - EM.run do - EM.start_server("127.0.0.1", 16784, InvalidProtocol) - EM.connect("127.0.0.1", 16784, InvalidProtocol) - end - end - end - - def test_any_to_v3 - $client_handshake_completed, $server_handshake_completed = false, false - EM.run do - EM.start_server("127.0.0.1", 16784, ServerSSLv3) - EM.connect("127.0.0.1", 16784, ClientAny) - end - - assert($client_handshake_completed) - assert($server_handshake_completed) - end - - def test_case_insensitivity - $client_handshake_completed, $server_handshake_completed = false, false - EM.run do - EM.start_server("127.0.0.1", 16784, ServerTLSv1CaseInsensitive) - EM.connect("127.0.0.1", 16784, ClientAny) - end - - assert($client_handshake_completed) - assert($server_handshake_completed) - end - - def test_v3_to_any - $client_handshake_completed, $server_handshake_completed = false, false - EM.run do - EM.start_server("127.0.0.1", 16784, ServerAny) - EM.connect("127.0.0.1", 16784, ClientSSLv3) - end - - assert($client_handshake_completed) - assert($server_handshake_completed) - end - - def test_v3_to_v3 - $client_handshake_completed, $server_handshake_completed = false, false - EM.run do - EM.start_server("127.0.0.1", 16784, ServerSSLv3) - EM.connect("127.0.0.1", 16784, ClientSSLv3) - end - - assert($client_handshake_completed) - assert($server_handshake_completed) - end - - def test_any_to_any - $client_handshake_completed, $server_handshake_completed = false, false - EM.run do - EM.start_server("127.0.0.1", 16784, ServerAny) - EM.connect("127.0.0.1", 16784, ClientAny) - end - - assert($client_handshake_completed) - assert($server_handshake_completed) - end - - def test_default_to_default - $client_handshake_completed, $server_handshake_completed = false, false - EM.run do - EM.start_server("127.0.0.1", 16784, ServerDefault) - EM.connect("127.0.0.1", 16784, ClientDefault) - end - - assert($client_handshake_completed) - assert($server_handshake_completed) - end - - module ServerV3StopAfterHandshake - def post_init - start_tls(:ssl_version => %w(SSLv3)) - end - - def ssl_handshake_completed - $server_handshake_completed = true - EM.stop_event_loop - end - end - - module ServerTLSv1StopAfterHandshake - def post_init - start_tls(:ssl_version => %w(TLSv1)) - end - - def ssl_handshake_completed - $server_handshake_completed = true - EM.stop_event_loop - end - end - - def test_v3_with_external_client - $server_handshake_completed = false - EM.run do - setup_timeout(2) - EM.start_server("127.0.0.1", 16784, ServerV3StopAfterHandshake) - EM.defer do - sock = TCPSocket.new("127.0.0.1", 16784) - ctx = OpenSSL::SSL::SSLContext.new - ctx.ssl_version = :SSLv3_client - ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx) - ssl.connect - ssl.close rescue nil - sock.close rescue nil - end - end - - assert($server_handshake_completed) - end - - def test_tlsv1_with_external_client - $server_handshake_completed = false - EM.run do - setup_timeout(2) - EM.start_server("127.0.0.1", 16784, ServerTLSv1StopAfterHandshake) - EM.defer do - sock = TCPSocket.new("127.0.0.1", 16784) - ctx = OpenSSL::SSL::SSLContext.new - ctx.ssl_version = :TLSv1_client - ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx) - ssl.connect - ssl.close rescue nil - sock.close rescue nil - end - end - - assert($server_handshake_completed) - end - - def test_tlsv1_required_with_external_client - $server_handshake_completed = false - - EM.run do - n = 0 - EM.add_periodic_timer(0.5) do - n += 1 - (EM.stop rescue nil) if n == 2 - end - EM.start_server("127.0.0.1", 16784, ServerTLSv1StopAfterHandshake) - EM.defer do - sock = TCPSocket.new("127.0.0.1", 16784) - ctx = OpenSSL::SSL::SSLContext.new - ctx.ssl_version = :SSLv3_client - ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx) - assert_raise OpenSSL::SSL::SSLError do - ssl.connect - end - ssl.close rescue nil - sock.close rescue nil - EM.stop rescue nil - end - end - - assert(!$server_handshake_completed) - end - end -else - warn "EM built without SSL support, skipping tests in #{__FILE__}" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_verify.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_verify.rb deleted file mode 100644 index a6d8fca7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ssl_verify.rb +++ /dev/null @@ -1,128 +0,0 @@ -require 'em_test_helper' - -class TestSslVerify < Test::Unit::TestCase - def setup - $dir = File.dirname(File.expand_path(__FILE__)) + '/' - $cert_from_file = File.read($dir+'client.crt') - end - - module ClientNoCert - def connection_completed - start_tls() - end - - def ssl_handshake_completed - $client_handshake_completed = true - close_connection - end - - def unbind - EM.stop_event_loop - end - end - - module Client - def connection_completed - start_tls(:private_key_file => $dir+'client.key', :cert_chain_file => $dir+'client.crt') - end - - def ssl_handshake_completed - $client_handshake_completed = true - close_connection - end - - def unbind - EM.stop_event_loop - end - end - - module AcceptServer - def post_init - start_tls(:verify_peer => true) - end - - def ssl_verify_peer(cert) - $cert_from_server = cert - true - end - - def ssl_handshake_completed - $server_handshake_completed = true - end - end - - module DenyServer - def post_init - start_tls(:verify_peer => true) - end - - def ssl_verify_peer(cert) - $cert_from_server = cert - # Do not accept the peer. This should now cause the connection to shut down without the SSL handshake being completed. - false - end - - def ssl_handshake_completed - $server_handshake_completed = true - end - end - - module FailServerNoPeerCert - def post_init - start_tls(:verify_peer => true, :fail_if_no_peer_cert => true) - end - - def ssl_verify_peer(cert) - raise "Verify peer should not get called for a client without a certificate" - end - - def ssl_handshake_completed - $server_handshake_completed = true - end - end - - def test_fail_no_peer_cert - omit_unless(EM.ssl?) - omit_if(rbx?) - - $client_handshake_completed, $server_handshake_completed = false, false - - EM.run { - EM.start_server("127.0.0.1", 16784, FailServerNoPeerCert) - EM.connect("127.0.0.1", 16784, ClientNoCert) - } - - assert(!$client_handshake_completed) - assert(!$server_handshake_completed) - end - - def test_accept_server - omit_unless(EM.ssl?) - omit_if(EM.library_type == :pure_ruby) # Server has a default cert chain - omit_if(rbx?) - $client_handshake_completed, $server_handshake_completed = false, false - EM.run { - EM.start_server("127.0.0.1", 16784, AcceptServer) - EM.connect("127.0.0.1", 16784, Client).instance_variable_get("@signature") - } - - assert_equal($cert_from_file, $cert_from_server) - assert($client_handshake_completed) - assert($server_handshake_completed) - end - - def test_deny_server - omit_unless(EM.ssl?) - omit_if(EM.library_type == :pure_ruby) # Server has a default cert chain - omit_if(rbx?) - $client_handshake_completed, $server_handshake_completed = false, false - EM.run { - EM.start_server("127.0.0.1", 16784, DenyServer) - EM.connect("127.0.0.1", 16784, Client) - } - - assert_equal($cert_from_file, $cert_from_server) - assert(!$client_handshake_completed) - assert(!$server_handshake_completed) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_stomp.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_stomp.rb deleted file mode 100644 index 53c0502a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_stomp.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'em_test_helper' - -class TestStomp < Test::Unit::TestCase - CONTENT_LENGTH_REGEX = /^content-length: (\d+)$/ - - def bytesize(str) - str = str.to_s - size = str.bytesize if str.respond_to?(:bytesize) # bytesize added in 1.9 - size || str.size - end - - class TStomp - include EM::P::Stomp - - def last_sent_content_length - @sent && Integer(@sent[CONTENT_LENGTH_REGEX, 1]) - end - - def send_data(string) - @sent = string - end - end - - def test_content_length_in_bytes - connection = TStomp.new - - queue = "queue" - failure_message = "header content-length is not the byte size of last sent body" - - body = "test" - connection.send queue, body - assert_equal bytesize(body), connection.last_sent_content_length, failure_message - - body = "test\u221A" - connection.send queue, body - assert_equal bytesize(body), connection.last_sent_content_length, failure_message - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_system.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_system.rb deleted file mode 100644 index fbbe2c9e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_system.rb +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 -require 'em_test_helper' - -class TestSystem < Test::Unit::TestCase - def setup - @filename = File.expand_path("../я манал dump.txt", __FILE__) - @test_data = 'a' * 100 - File.open(@filename, 'w'){|f| f.write(@test_data)} - end - - def test_system - omit_if(windows?) - - result = nil - status = nil - EM.run { - EM.system('cat', @filename){|out, state| - result = out - status = state.exitstatus - EM.stop - } - } - assert_equal(0, status) - assert_equal(@test_data, result) - end - - def test_system_with_string - omit_if(windows?) - - result = nil - status = nil - EM.run { - EM.system("cat '#@filename'"){|out, state| - result = out - status = state.exitstatus - EM.stop - } - } - assert_equal(0, status) - assert_equal(@test_data, result) - end - - def teardown - File.unlink(@filename) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_threaded_resource.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_threaded_resource.rb deleted file mode 100644 index 9bb39c6e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_threaded_resource.rb +++ /dev/null @@ -1,63 +0,0 @@ -require 'em_test_helper' - -class TestThreadedResource < Test::Unit::TestCase - def object - @object ||= {} - end - - def resource - @resource = EM::ThreadedResource.new do - object - end - end - - def teardown - resource.shutdown - end - - def test_dispatch_completion - EM.run do - EM.add_timer(3) do - EM.stop - fail 'Resource dispatch timed out' - end - completion = resource.dispatch do |o| - o[:foo] = :bar - :foo - end - completion.callback do |result| - assert_equal :foo, result - EM.stop - end - completion.errback do |error| - EM.stop - fail "Unexpected error: #{error.message}" - end - end - assert_equal :bar, object[:foo] - end - - def test_dispatch_failure - completion = resource.dispatch do |o| - raise 'boom' - end - completion.errback do |error| - assert_kind_of RuntimeError, error - assert_equal 'boom', error.message - end - end - - def test_dispatch_threading - main = Thread.current - resource.dispatch do |o| - o[:dispatch_thread] = Thread.current - end - assert_not_equal main, object[:dispatch_thread] - end - - def test_shutdown - # This test should get improved sometime. The method returning thread is - # NOT an api that will be maintained. - assert !resource.shutdown.alive? - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_tick_loop.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_tick_loop.rb deleted file mode 100644 index 39d86b54..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_tick_loop.rb +++ /dev/null @@ -1,59 +0,0 @@ -require "test/unit" -require 'em_test_helper' - -class TestEmTickLoop < Test::Unit::TestCase - def test_em_tick_loop - i = 0 - EM.tick_loop { i += 1; EM.stop if i == 10 } - EM.run { EM.add_timer(1) { EM.stop } } - assert_equal i, 10 - end - - def test_tick_loop_on_stop - t = nil - tick_loop = EM.tick_loop { :stop } - tick_loop.on_stop { t = true } - EM.run { EM.next_tick { EM.stop } } - assert t - end - - def test_start_twice - i = 0 - s = 0 - tick_loop = EM.tick_loop { i += 1; :stop } - tick_loop.on_stop { s += 1; EM.stop } - EM.run { EM.next_tick { EM.stop } } - assert_equal 1, i - assert_equal 1, s - tick_loop.start - EM.run { EM.next_tick { EM.stop } } - assert_equal 2, i - assert_equal 1, s # stop callbacks are only called once - end - - def test_stop - i, s = 0, 0 - tick_loop = EM.tick_loop { i += 1 } - tick_loop.on_stop { s += 1 } - EM.run { EM.next_tick { tick_loop.stop; EM.next_tick { EM.stop } } } - assert tick_loop.stopped? - assert_equal 1, i - assert_equal 1, s - end - - def test_immediate_stops - s = 0 - tick_loop = EM::TickLoop.new { } - tick_loop.on_stop { s += 1 } - tick_loop.on_stop { s += 1 } - assert_equal 2, s - end - - def test_stopped - tick_loop = EM::TickLoop.new { } - assert tick_loop.stopped? - tick_loop.start - assert !tick_loop.stopped? - end - -end \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_timers.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_timers.rb deleted file mode 100644 index 88b3b781..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_timers.rb +++ /dev/null @@ -1,130 +0,0 @@ -require 'em_test_helper' - -class TestTimers < Test::Unit::TestCase - - def test_timer_with_block - x = false - EM.run { - EM::Timer.new(0) { - x = true - EM.stop - } - } - assert x - end - - def test_timer_with_proc - x = false - EM.run { - EM::Timer.new(0, proc { - x = true - EM.stop - }) - } - assert x - end - - def test_timer_cancel - assert_nothing_raised do - EM.run { - timer = EM::Timer.new(0.01) { flunk "Timer was not cancelled." } - timer.cancel - - EM.add_timer(0.02) { EM.stop } - } - end - end - - def test_periodic_timer - x = 0 - EM.run { - EM::PeriodicTimer.new(0.01) do - x += 1 - EM.stop if x == 4 - end - } - - assert_equal 4, x - end - - def test_add_periodic_timer - x = 0 - EM.run { - t = EM.add_periodic_timer(0.01) do - x += 1 - EM.stop if x == 4 - end - assert t.respond_to?(:cancel) - } - assert_equal 4, x - end - - def test_periodic_timer_cancel - x = 0 - EM.run { - pt = EM::PeriodicTimer.new(0.01) { x += 1 } - pt.cancel - EM::Timer.new(0.02) { EM.stop } - } - assert_equal 0, x - end - - def test_add_periodic_timer_cancel - x = 0 - EM.run { - pt = EM.add_periodic_timer(0.01) { x += 1 } - EM.cancel_timer(pt) - EM.add_timer(0.02) { EM.stop } - } - assert_equal 0, x - end - - def test_periodic_timer_self_cancel - x = 0 - EM.run { - pt = EM::PeriodicTimer.new(0) { - x += 1 - if x == 4 - pt.cancel - EM.stop - end - } - } - assert_equal 4, x - end - - def test_oneshot_timer_large_future_value - large_value = 11948602000 - EM.run { - EM.add_timer(large_value) { EM.stop } - EM.add_timer(0.02) { EM.stop } - } - end - - # This test is only applicable to compiled versions of the reactor. - # Pure ruby and java versions have no built-in limit on the number of outstanding timers. - unless [:pure_ruby, :java].include? EM.library_type - def test_timer_change_max_outstanding - defaults = EM.get_max_timers - EM.set_max_timers(100) - - one_hundred_one_timers = lambda do - 101.times { EM.add_timer(0.01) {} } - EM.stop - end - - assert_raises(RuntimeError) do - EM.run( &one_hundred_one_timers ) - end - - EM.set_max_timers( 101 ) - - assert_nothing_raised do - EM.run( &one_hundred_one_timers ) - end - ensure - EM.set_max_timers(defaults) - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ud.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ud.rb deleted file mode 100644 index 3559756e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_ud.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'em_test_helper' - -class TestUserDefinedEvents < Test::Unit::TestCase - - def test_a - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_unbind_reason.rb b/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_unbind_reason.rb deleted file mode 100644 index ff9193e0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/eventmachine-1.2.7/tests/test_unbind_reason.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'em_test_helper' - -class TestUnbindReason < Test::Unit::TestCase - - class StubConnection < EM::Connection - attr_reader :error - def unbind(reason = nil) - @error = reason - EM.stop - end - end - - # RFC 5737 Address Blocks Reserved for Documentation - def test_connect_timeout - conn = nil - EM.run do - conn = EM.connect '192.0.2.0', 80, StubConnection - conn.pending_connect_timeout = 1 - end - assert_equal Errno::ETIMEDOUT, conn.error - end - - def test_connect_refused - pend('FIXME: this test is broken on Windows') if windows? - conn = nil - EM.run do - conn = EM.connect '127.0.0.1', 12388, StubConnection - end - assert_equal Errno::ECONNREFUSED, conn.error - end - - def test_optional_argument - pend('FIXME: this test is broken on Windows') if windows? - conn = nil - EM.run do - conn = EM.connect '127.0.0.1', 12388, StubConnection - end - assert_equal Errno::ECONNREFUSED, conn.error - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/CHANGELOG.md deleted file mode 100644 index 95f091aa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/CHANGELOG.md +++ /dev/null @@ -1,574 +0,0 @@ -# Faraday Changelog - -## The changelog has moved! - -This file is not being updated anymore. Instead, please check the [Releases](https://github.com/lostisland/faraday/releases) page. - -## [2.2.0](https://github.com/lostisland/faraday/compare/v2.1.0...v2.2.0) (2022-02-03) - -* Reintroduce the possibility to register middleware with symbols, strings or procs in [#1391](https://github.com/lostisland/faraday/pull/1391) - -## [2.1.0](https://github.com/lostisland/faraday/compare/v2.0.1...v2.1.0) (2022-01-15) - -* Fix test adapter thread safety by @iMacTia in [#1380](https://github.com/lostisland/faraday/pull/1380) -* Add default adapter options by @hirasawayuki in [#1382](https://github.com/lostisland/faraday/pull/1382) -* CI: Add Ruby 3.1 to matrix by @petergoldstein in [#1374](https://github.com/lostisland/faraday/pull/1374) -* docs: fix regex pattern in logger.md examples by @hirasawayuki in [#1378](https://github.com/lostisland/faraday/pull/1378) - -## [2.0.1](https://github.com/lostisland/faraday/compare/v2.0.0...v2.0.1) (2022-01-05) - -* Re-add `faraday-net_http` as default adapter by @iMacTia in [#1366](https://github.com/lostisland/faraday/pull/1366) -* Updated sample format in UPGRADING.md by @vimutter in [#1361](https://github.com/lostisland/faraday/pull/1361) -* docs: Make UPGRADING examples more copyable by @olleolleolle in [#1363](https://github.com/lostisland/faraday/pull/1363) - -## [2.0.0](https://github.com/lostisland/faraday/compare/v1.8.0...v2.0.0) (2022-01-04) - -The next major release is here, and it comes almost 2 years after the release of v1.0! - -This release changes the way you use Faraday and embraces a new paradigm of Faraday as an ecosystem, rather than a library. - -What does that mean? It means that Faraday is less of a bundled tool and more of a framework for the community to build on top of. - -As a result, all adapters and some middleware have moved out and are now shipped as standalone gems 🙌! - -But this doesn't mean that upgrading from Faraday 1.x to Faraday 2.0 should be hard, in fact we've listed everything you need to do in the [UPGRADING.md](https://github.com/lostisland/faraday/blob/main/UPGRADING.md) doc. - -Moreover, we've setup a new [awesome-faraday](https://github.com/lostisland/awesome-faraday) repository that will showcase a curated list of adapters and middleware 😎. - -This release was the result of the efforts of the core team and all the contributors, new and old, that have helped achieve this milestone 👏. - -## What's Changed - -* Autoloading, dependency loading and middleware registry cleanup by @iMacTia in [#1301](https://github.com/lostisland/faraday/pull/1301) -* Move JSON middleware (request and response) from faraday_middleware by @iMacTia in [#1300](https://github.com/lostisland/faraday/pull/1300) -* Remove deprecated `Faraday::Request#method` by @olleolleolle in [#1303](https://github.com/lostisland/faraday/pull/1303) -* Remove deprecated `Faraday::UploadIO` by @iMacTia in [#1307](https://github.com/lostisland/faraday/pull/1307) -* [1.x] Deprecate Authorization helpers in `Faraday::Connection` by @iMacTia in [#1306](https://github.com/lostisland/faraday/pull/1306) -* Drop deprecated auth helpers from Connection and refactor auth middleware by @iMacTia in [#1308](https://github.com/lostisland/faraday/pull/1308) -* Add Faraday 1.x examples in authentication.md docs by @iMacTia in [#1320](https://github.com/lostisland/faraday/pull/1320) -* Fix passing a URL with embedded basic auth by @iMacTia in [#1324](https://github.com/lostisland/faraday/pull/1324) -* Register JSON middleware by @mollerhoj in [#1331](https://github.com/lostisland/faraday/pull/1331) -* Retry middleware should handle string exception class name consistently by @jrochkind in [#1334](https://github.com/lostisland/faraday/pull/1334) -* Improve request info in exceptions raised by RaiseError Middleware by @willianzocolau in [#1335](https://github.com/lostisland/faraday/pull/1335) -* Remove net-http adapter and update docs by @iMacTia in [#1336](https://github.com/lostisland/faraday/pull/1336) -* Explain plan for faraday_middleware in UPGRADING.md by @iMacTia in [#1339](https://github.com/lostisland/faraday/pull/1339) -* Scripts folder cleanup by @iMacTia in [#1340](https://github.com/lostisland/faraday/pull/1340) -* Replace `Hash#merge` with `Utils#deep_merge` for connection options by @xkwd in [#1343](https://github.com/lostisland/faraday/pull/1343) -* Callable authorizers by @sled in [#1345](https://github.com/lostisland/faraday/pull/1345) -* Default value for exc error by @DariuszMusielak in [#1351](https://github.com/lostisland/faraday/pull/1351) -* Don't call `retry_block` unless a retry is going to happen by @jrochkind in [#1350](https://github.com/lostisland/faraday/pull/1350) -* Improve documentation for v2 by @iMacTia in [#1353](https://github.com/lostisland/faraday/pull/1353) -* Remove default `default_adapter` (yes, you read that right) by @iMacTia in [#1354](https://github.com/lostisland/faraday/pull/1354) -* Remove retry middleware by @iMacTia in [#1356](https://github.com/lostisland/faraday/pull/1356) -* Remove multipart middleware and all its documentation and tests by @iMacTia in [#1357](https://github.com/lostisland/faraday/pull/1357) - -## [1.9.3](https://github.com/lostisland/faraday/compare/v1.9.2...v1.9.3) (2022-01-06) - -* Re-add support for Ruby 2.4+ by @iMacTia in [#1371](https://github.com/lostisland/faraday/pull/1371) - -## [1.9.2](https://github.com/lostisland/faraday/compare/v1.9.1...v1.9.2) (2022-01-06) - -* Add alias with legacy name to gemified middleware by @iMacTia in [#1372](https://github.com/lostisland/faraday/pull/1372) - -## [1.9.1](https://github.com/lostisland/faraday/compare/v1.9.0...v1.9.1) (2022-01-06) - -* Update adapter dependencies in Gemspec by @iMacTia in [#1370](https://github.com/lostisland/faraday/pull/1370) - -## [1.9.0](https://github.com/lostisland/faraday/compare/v1.8.0...v1.9.0) (2022-01-06) - -* Use external multipart and retry middleware by @iMacTia in [#1367](https://github.com/lostisland/faraday/pull/1367) - -## [1.8.0](https://github.com/lostisland/faraday/releases/tag/v1.8.0) (2021-09-18) - -### Features - -* Backport authorization procs (#1322, @jarl-dk) - -## [v1.7.0](https://github.com/lostisland/faraday/releases/tag/v1.7.0) (2021-08-09) - -### Features - -* Add strict_mode to Test::Stubs (#1298, @yykamei) - -## [v1.6.0](https://github.com/lostisland/faraday/releases/tag/v1.6.0) (2021-08-01) - -### Misc - -* Use external Rack adapter (#1296, @iMacTia) - -## [v1.5.1](https://github.com/lostisland/faraday/releases/tag/v1.5.1) (2021-07-11) - -### Fixes - -* Fix JRuby incompatibility after moving out EM adapters (#1294, @ahorek) - -### Documentation - -* Update YARD to follow RackBuilder (#1292, @kachick) - -## [v1.5.0](https://github.com/lostisland/faraday/releases/tag/v1.5.0) (2021-07-04) - -### Misc - -* Use external httpclient adapter (#1289, @iMacTia) -* Use external patron adapter (#1290, @iMacTia) - -## [v1.4.3](https://github.com/lostisland/faraday/releases/tag/v1.4.3) (2021-06-24) - -### Fixes - -* Silence warning (#1286, @gurgeous) -* Always dup url_prefix in Connection#build_exclusive_url (#1288, @alexeyds) - -## [v1.4.2](https://github.com/lostisland/faraday/releases/tag/v1.4.2) (2021-05-22) - -### Fixes -* Add proxy setting when url_prefix is changed (#1276, @ci) -* Default proxy scheme to http:// if necessary, fixes #1282 (#1283, @gurgeous) - -### Documentation -* Improve introduction page (#1273, @gurgeous) -* Docs: add more middleware examples (#1277, @gurgeous) - -### Misc -* Use external `em_http` and `em_synchrony` adapters (#1274, @iMacTia) - -## [v1.4.1](https://github.com/lostisland/faraday/releases/tag/v1.4.1) (2021-04-18) - -### Fixes - -* Fix dependencies from external adapter gems (#1269, @iMacTia) - -## [v1.4.0](https://github.com/lostisland/faraday/releases/tag/v1.4.0) (2021-04-16) - -### Highlights - -With this release, we continue the work of gradually moving out adapters into their own gems 🎉 -Thanks to @MikeRogers0 for helping the Faraday team in progressing with this quest 👏 - -And thanks to @olleolleolle efforts, Faraday is becoming more inclusive than ever 🤗 -Faraday's `master` branch has been renamed into `main`, we have an official policy on inclusive language and even a rubocop plugin to check for non-inclusive words ❤️! -Checkout the "Misc" section below for more details 🙌 ! - -### Fixes - -* Fix NoMethodError undefined method 'coverage' (#1255, @Maroo-b) - -### Documentation - -* Some docs on EventMachine adapters. (#1232, @damau) -* CONTRIBUTING: Fix grammar and layout (#1261, @olleolleolle) - -### Misc - -* Replacing Net::HTTP::Persistent with faraday-net_http_persistent (#1250, @MikeRogers0) -* CI: Configure the regenerated Coveralls token (#1256, @olleolleolle) -* Replace Excon adapter with Faraday::Excon gem, and fix autoloading issue with Faraday::NetHttpPersistent (#1257, @iMacTia) -* Drop CodeClimate (#1259, @olleolleolle) -* CI: Rename default branch to main (#1263, @olleolleolle) -* Drop RDoc support file .document (#1264, @olleolleolle, @iMacTia) -* CONTRIBUTING: add a policy on inclusive language (#1262, @olleolleolle) -* Add rubocop-inclusivity (#1267, @olleolleolle, @iMacTia) - -## [v1.3.1](https://github.com/lostisland/faraday/releases/tag/v1.3.1) (2021-04-16) - -### Fixes - -* Escape colon in path segment (#1237, @yarafan) -* Handle IPv6 address String on Faraday::Connection#proxy_from_env (#1252, @cosmo0920) - -### Documentation - -* Fix broken Rubydoc.info links (#1236, @nickcampbell18) -* Add httpx to list of external adapters (#1246, @HoneyryderChuck) - -### Misc - -* Refactor CI to remove duplicated line (#1230, @tricknotes) -* Gemspec: Pick a good ruby2_keywords release (#1241, @olleolleolle) - -## [v1.3.0](https://github.com/lostisland/faraday/releases/tag/v1.3.0) (2020-12-31) - -### Highlights -Faraday v1.3.0 is the first release to officially support Ruby 3.0 in the CI pipeline 🎉 🍾! - -This is also the first release with a previously "included" adapter (Net::HTTP) being isolated into a [separate gem](https://github.com/lostisland/faraday-net_http) 🎊! -The new adapter is added to Faraday as a dependency for now, so that means full backwards-compatibility, but just to be safe be careful when upgrading! - -This is a huge step towards are Faraday v2.0 objective of pushing adapters and middleware into separate gems. -Many thanks to the Faraday Team, @JanDintel and everyone who attended the [ROSS Conf remote event](https://www.rossconf.io/event/remote/) - -### Features - -* Improves consistency with Faraday::Error and Faraday::RaiseError (#1229, @qsona, @iMacTia) - -### Fixes - -* Don't assign to global ::Timer (#1227, @bpo) - -### Documentation - -* CHANGELOG: add releases after 1.0 (#1225, @olleolleolle) -* Improves retry middleware documentation. (#1228, @iMacTia) - -### Misc - -* Move out Net::HTTP adapter (#1222, @JanDintel, @iMacTia) -* Adds Ruby 3.0 to CI Matrix (#1226, @iMacTia) - - -## [v1.2.0](https://github.com/lostisland/faraday/releases/tag/v1.2.0) (2020-12-23) - -### Features - -* Introduces `on_request` and `on_complete` methods in `Faraday::Middleware`. (#1194, @iMacTia) - -### Fixes - -* Require 'date' to avoid retry exception (#1206, @rustygeldmacher) -* Fix rdebug recursion issue (#1205, @native-api) -* Update call to `em_http_ssl_patch` (#1202, @kylekeesling) -* `EmHttp` adapter: drop superfluous loaded? check (#1213, @olleolleolle) -* Avoid 1 use of keyword hackery (#1211, @grosser) -* Fix #1219 `Net::HTTP` still uses env proxy (#1221, @iMacTia) - -### Documentation - -* Add comment in gemspec to explain exposure of `examples` and `spec` folders. (#1192, @iMacTia) -* Adapters, how to create them (#1193, @olleolleolle) -* Update documentation on using the logger (#1196, @tijmenb) -* Adjust the retry documentation and spec to align with implementation (#1198, @nbeyer) - -### Misc - -* Test against ruby head (#1208, @grosser) - -## [v1.1.0](https://github.com/lostisland/faraday/releases/tag/v1.1.0) (2020-10-17) - -### Features - -* Makes parameters sorting configurable (#1162 @wishdev) -* Introduces `flat_encode` option for multipart adapter. (#1163 @iMacTia) -* Include request info in exceptions raised by RaiseError Middleware (#1181 @SandroDamilano) - -### Fixes - -* Avoid `last arg as keyword param` warning when building user middleware on Ruby 2.7 (#1153 @dgholz) -* Limits net-http-persistent version to < 4.0 (#1156 @iMacTia) -* Update `typhoeus` to new stable version (`1.4`) (#1159 @AlexWayfer) -* Properly fix test failure with Rack 2.1+. (#1171 @voxik) - -### Documentation - -* Improves documentation on how to contribute to the site by using Docker. (#1175 @iMacTia) -* Remove retry_change_requests from documentation (#1185 @stim371) - -### Misc - -* Link from GitHub Actions badge to CI workflow (#1141 @olleolleolle) -* Return tests of `Test` adapter (#1147 @AlexWayfer) -* Add 1.0 release to wording in CONTRIBUTING (#1155 @olleolleolle) -* Fix linting bumping Rubocop to 0.90.0 (#1182 @iMacTia) -* Drop `git ls-files` in gemspec (#1183 @utkarsh2102) -* Upgrade CI to ruby/setup-ruby (#1187 @gogainda) - -## [v1.0.1](https://github.com/lostisland/faraday/releases/tag/v1.0.1) (2020-03-29) - -### Fixes - -* Use Net::HTTP#start(&block) to ensure closed TCP connections (#1117) -* Fully qualify constants to be checked (#1122) -* Allows `parse` method to be private/protected in response middleware (#1123) -* Encode Spaces in Query Strings as '%20' Instead of '+' (#1125) -* Limits rack to v2.0.x (#1127) -* Adapter Registry reads also use mutex (#1136) - -### Documentation - -* Retry middleware documentation fix (#1109) -* Docs(retry): precise usage of retry-after (#1111) -* README: Link the logo to the website (#1112) -* Website: add search bar (#1116) -* Fix request/response mix-up in docs text (#1132) - -## [v1.0](https://github.com/lostisland/faraday/releases/tag/v1.0.0) (2020-01-22) - -Features: - -* Add #trace support to Faraday::Connection #861 (@technoweenie) -* Add the log formatter that is easy to override and safe to inherit #889 (@prikha) -* Support standalone adapters #941 (@iMacTia) -* Introduce Faraday::ConflictError for 409 response code #979 (@lucasmoreno) -* Add support for setting `read_timeout` option separately #1003 (@springerigor) -* Refactor and cleanup timeout settings across adapters #1022 (@technoweenie) -* Create ParamPart class to allow multipart posts with JSON content and file upload at the same time #1017 (@jeremy-israel) -* Copy UploadIO const -> FilePart for consistency with ParamPart #1018, #1021 (@technoweenie) -* Implement streaming responses in the Excon adapter #1026 (@technoweenie) -* Add default implementation of `Middleware#close`. #1069 (@ioquatix) -* Add `Adapter#close` so that derived classes can call super. #1091 (@ioquatix) -* Add log_level option to logger default formatter #1079 (@amrrbakry) -* Fix empty array for FlatParamsEncoder `{key: []} -> "key="` #1084 (@mrexox) - -Bugs: - -* Explicitly require date for DateTime library in Retry middleware #844 (@nickpresta) -* Refactor Adapter as final endpoints #846 (@iMacTia) -* Separate Request and Response bodies in Faraday::Env #847 (@iMacTia) -* Implement Faraday::Connection#options to make HTTP requests with the OPTIONS verb. #857 (@technoweenie) -* Multipart: Drop Ruby 1.8 String behavior compat #892 (@olleolleolle) -* Fix Ruby warnings in Faraday::Options.memoized #962 (@technoweenie) -* Allow setting min/max SSL version for a Net::HTTP::Persistent connection #972, #973 (@bdewater, @olleolleolle) -* Fix instances of frozen empty string literals #1040 (@BobbyMcWho) -* remove temp_proxy and improve proxy tests #1063 (@technoweenie) -* improve error initializer consistency #1095 (@technoweenie) - -Misc: - -* Convert minitest suite to RSpec #832 (@iMacTia, with help from @gaynetdinov, @Insti, @technoweenie) -* Major effort to update code to RuboCop standards. #854 (@olleolleolle, @iMacTia, @technoweenie, @htwroclau, @jherdman, @Drenmi, @Insti) -* Rubocop #1044, #1047 (@BobbyMcWho, @olleolleolle) -* Documentation tweaks (@adsteel, @Hubro, @iMacTia, @olleolleolle, @technoweenie) -* Update license year #981 (@Kevin-Kawai) -* Configure Jekyll plugin jekyll-remote-theme to support Docker usage #999 (@Lewiscowles1986) -* Fix Ruby 2.7 warnings #1009 (@tenderlove) -* Cleanup adapter connections #1023 (@technoweenie) -* Describe clearing cached stubs #1045 (@viraptor) -* Add project metadata to the gemspec #1046 (@orien) - -## v0.17.4 - -Fixes: - -* NetHttp adapter: wrap Errno::EADDRNOTAVAIL (#1114, @embs) -* Fix === for subclasses of deprecated classes (#1243, @mervync) - -## v0.17.3 - -Fixes: - -* Reverts changes in error classes hierarchy. #1092 (@iMacTia) -* Fix Ruby 1.9 syntax errors and improve Error class testing #1094 (@BanzaiMan, - @mrexox, @technoweenie) - -Misc: - -* Stops using `&Proc.new` for block forwarding. #1083 (@olleolleolle) -* Update CI to test against ruby 2.0-2.7 #1087, #1099 (@iMacTia, @olleolleolle, - @technoweenie) -* require FARADAY_DEPRECATE=warn to show Faraday v1.0 deprecation warnings - #1098 (@technoweenie) - -## v0.17.1 - -Final release before Faraday v1.0, with important fixes for Ruby 2.7. - -Fixes: - -* RaiseError response middleware raises exception if HTTP client returns a nil - status. #1042 (@jonnyom, @BobbyMcWho) - -Misc: - -* Fix Ruby 2.7 warnings (#1009) -* Add `Faraday::Deprecate` to warn about upcoming v1.0 changes. (#1054, #1059, - #1076, #1077) -* Add release notes up to current in CHANGELOG.md (#1066) -* Port minimal rspec suite from main branch to run backported tests. (#1058) - -## v0.17.0 - -This release is the same as v0.15.4. It was pushed to cover up releases -v0.16.0-v0.16.2. - -## v0.15.4 - -* Expose `pool_size` as a option for the NetHttpPersistent adapter (#834) - -## v0.15.3 - -* Make Faraday::Request serialisable with Marshal. (#803) -* Add DEFAULT_EXCEPTIONS constant to Request::Retry (#814) -* Add support for Ruby 2.6 Net::HTTP write_timeout (#824) - -## v0.15.2 - -* Prevents `Net::HTTP` adapters to retry request internally by setting `max_retries` to 0 if available (Ruby 2.5+). (#799) -* Fixes `NestedParamsEncoder` handling of empty array values (#801) - -## v0.15.1 - -* NetHttpPersistent adapter better reuse of SSL connections (#793) -* Refactor: inline cached_connection (#797) -* Logger middleware: use $stdout instead of STDOUT (#794) -* Fix: do not memoize/reuse Patron session (#796) - -Also in this release: - -* Allow setting min/max ssl version for Net::HTTP (#792) -* Allow setting min/max ssl version for Excon (#795) - -## v0.15.0 - -Features: - -* Added retry block option to retry middleware. (#770) -* Retry middleware improvements (honour Retry-After header, retry statuses) (#773) -* Improve response logger middleware output (#784) - -Fixes: - -* Remove unused class error (#767) -* Fix minor typo in README (#760) -* Reuse persistent connections when using net-http-persistent (#778) -* Fix Retry middleware documentation (#781) -* Returns the http response when giving up on retrying by status (#783) - -## v0.14.0 - -Features: - -* Allow overriding env proxy #754 (@iMacTia) -* Remove legacy Typhoeus adapter #715 (@olleolleolle) -* External Typhoeus Adapter Compatibility #748 (@iMacTia) -* Warn about missing adapter when making a request #743 (@antstorm) -* Faraday::Adapter::Test stubs now support entire urls (with host) #741 (@erik-escobedo) - -Fixes: - -* If proxy is manually provided, this takes priority over `find_proxy` #724 (@iMacTia) -* Fixes the behaviour for Excon's open_timeout (not setting write_timeout anymore) #731 (@apachelogger) -* Handle all connection timeout messages in Patron #687 (@stayhero) - -## v0.13.1 - -* Fixes an incompatibility with Addressable::URI being used as uri_parser - -## v0.13.0 - -Features: - -* Dynamically reloads the proxy when performing a request on an absolute domain (#701) -* Adapter support for Net::HTTP::Persistent v3.0.0 (#619) - -Fixes: - -* Prefer #hostname over #host. (#714) -* Fixes an edge-case issue with response headers parsing (missing HTTP header) (#719) - -## v0.12.2 - -* Parse headers from aggregated proxy requests/responses (#681) -* Guard against invalid middleware configuration with warning (#685) -* Do not use :insecure option by default in Patron (#691) -* Fixes an issue with HTTPClient not raising a `Faraday::ConnectionFailed` (#702) -* Fixes YAML serialization/deserialization for `Faraday::Utils::Headers` (#690) -* Fixes an issue with Options having a nil value (#694) -* Fixes an issue with Faraday.default_connection not using Faraday.default_connection_options (#698) -* Fixes an issue with Options.merge! and Faraday instrumentation middleware (#710) - -## v0.12.1 - -* Fix an issue with Patron tests failing on jruby -* Fix an issue with new `rewind_files` feature that was causing an exception when the body was not an Hash -* Expose wrapped_exception in all client errors -* Add Authentication Section to the ReadMe - -## v0.12.0.1 - -* Hotfix release to address an issue with TravisCI deploy on Rubygems - -## v0.12.0 - -Features: - -* Proxy feature now relies on Ruby `URI::Generic#find_proxy` and can use `no_proxy` ENV variable (not compatible with ruby < 2.0) -* Adds support for `context` request option to pass arbitrary information to middlewares - -Fixes: - -* Fix an issue with options that was causing new options to override defaults ones unexpectedly -* Rewind `UploadIO`s on retry to fix a compatibility issue -* Make multipart boundary unique -* Improvements in `README.md` - -## v0.11.0 - -Features: - -* Add `filter` method to Logger middleware -* Add support for Ruby2.4 and Minitest 6 -* Introduce block syntax to customise the adapter - -Fixes: - -* Fix an issue that was allowing to override `default_connection_options` from a connection instance -* Fix a bug that was causing newline escape characters ("\n") to be used when building the Authorization header - -## v0.10.1 - -- Fix an issue with HTTPClient adapter that was causing the SSL to be reset on every request -- Rescue `IOError` instead of specific subclass -- `Faraday::Utils::Headers` can now be successfully serialised in YAML -- Handle `default_connection_options` set with hash - -## v0.10.0 - -Breaking changes: -- Drop support for Ruby 1.8 - -Features: -- Include wrapped exception/response in ClientErrors -- Add `response.reason_phrase` -- Provide option to selectively skip logging request/response headers -- Add regex support for pattern matching in `test` adapter - -Fixes: -- Add `Faraday.respond_to?` to find methods managed by `method_missing` -- em-http: `request.host` instead of `connection.host` should be taken for SSL validations -- Allow `default_connection_options` to be merged when options are passed as url parameter -- Improve splitting key-value pairs in raw HTTP headers - -## v0.9.2 - -Adapters: -- Enable gzip compression for httpclient -- Fixes default certificate store for httpclient not having default paths. -- Make excon adapter compatible with 0.44 excon version -- Add compatibility with Patron 0.4.20 -- Determine default port numbers in Net::HTTP adapters (Addressable compatibility) -- em-http: wrap "connection closed by server" as ConnectionFailed type -- Wrap Errno::ETIMEDOUT in Faraday::Error::TimeoutError - -Utils: -- Add Rack-compatible support for parsing `a[][b]=c` nested queries -- Encode nil values in queries different than empty strings. Before: `a=`; now: `a`. -- Have `Faraday::Utils::Headers#replace` clear internal key cache -- Dup the internal key cache when a Headers hash is copied - -Env and middleware: -- Ensure `env` stored on middleware response has reference to the response -- Ensure that Response properties are initialized during `on_complete` (VCR compatibility) -- Copy request options in Faraday::Connection#dup -- Env custom members should be copied by Env.from(env) -- Honour per-request `request.options.params_encoder` -- Fix `interval_randomness` data type for Retry middleware -- Add maximum interval option for Retry middleware - -## v0.9.1 - -* Refactor Net:HTTP adapter so that with_net_http_connection can be overridden to allow pooled connections. (@Ben-M) -* Add configurable methods that bypass `retry_if` in the Retry request middleware. (@mike-bourgeous) - -## v0.9.0 - -* Add HTTPClient adapter (@hakanensari) -* Improve Retry handler (@mislav) -* Remove autoloading by default (@technoweenie) -* Improve internal docs (@technoweenie, @mislav) -* Respect user/password in http proxy string (@mislav) -* Adapter options are structs. Reinforces consistent options across adapters - (@technoweenie) -* Stop stripping trailing / off base URLs in a Faraday::Connection. (@technoweenie) -* Add a configurable URI parser. (@technoweenie) -* Remove need to manually autoload when using the authorization header helpers on `Faraday::Connection`. (@technoweenie) -* `Faraday::Adapter::Test` respects the `Faraday::RequestOptions#params_encoder` option. (@technoweenie) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/LICENSE.md b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/LICENSE.md deleted file mode 100644 index 38776159..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009-2023 Rick Olson, Zack Hobson - -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/bundle/ruby/3.2.0/gems/faraday-2.13.1/README.md b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/README.md deleted file mode 100644 index 0cca6db8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# [![Faraday](./docs/_media/home-logo.svg)][website] - -[![Gem Version](https://badge.fury.io/rb/faraday.svg)](https://rubygems.org/gems/faraday) -[![GitHub Actions CI](https://github.com/lostisland/faraday/workflows/CI/badge.svg)](https://github.com/lostisland/faraday/actions?query=workflow%3ACI) -[![GitHub Discussions](https://img.shields.io/github/discussions/lostisland/faraday?logo=github)](https://github.com/lostisland/faraday/discussions) - -Faraday is an HTTP client library abstraction layer that provides a common interface over many -adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle. -Take a look at [Awesome Faraday][awesome] for a list of available adapters and middleware. - -## Why use Faraday? - -Faraday gives you the power of Rack middleware for manipulating HTTP requests and responses, -making it easier to build sophisticated API clients or web service libraries that abstract away -the details of how HTTP requests are made. - -Faraday comes with a lot of features out of the box, such as: -* Support for multiple adapters (Net::HTTP, Typhoeus, Patron, Excon, HTTPClient, and more) -* Persistent connections (keep-alive) -* Parallel requests -* Automatic response parsing (JSON, XML, YAML) -* Customization of the request/response cycle with middleware -* Support for streaming responses -* Support for uploading files -* And much more! - -## Getting Started - -The best starting point is the [Faraday Website][website], with its introduction and explanation. - -Need more details? See the [Faraday API Documentation][apidoc] to see how it works internally, or take a look at [Advanced techniques for calling HTTP APIs in Ruby](https://mattbrictson.com/blog/advanced-http-techniques-in-ruby) blog post from [@mattbrictson](https://github.com/mattbrictson) 🚀 - -## Supported Ruby versions - -This library aims to support and is [tested against][actions] the currently officially supported Ruby -implementations. This means that, even without a major release, we could add or drop support for Ruby versions, -following their [EOL](https://endoflife.date/ruby). -Currently that means we support Ruby 3.0+ - -If something doesn't work on one of these Ruby versions, it's a bug. - -This library may inadvertently work (or seem to work) on other Ruby -implementations and versions, however support will only be provided for the versions listed -above. - -If you would like this library to support another Ruby version, you may -volunteer to be a maintainer. Being a maintainer entails making sure all tests -run and pass on that implementation. When something breaks on your -implementation, you will be responsible for providing patches in a timely -fashion. If critical issues for a particular implementation exist at the time -of a major release, support for that Ruby version may be dropped. - -## Contribute - -Do you want to contribute to Faraday? -Open the issues page and check for the `help wanted` label! -But before you start coding, please read our [Contributing Guide][contributing] - -## Copyright - -© 2009 - 2023, the Faraday Team. Website and branding design by [Elena Lo Piccolo](https://elelopic.design). - -[awesome]: https://github.com/lostisland/awesome-faraday/#adapters -[website]: https://lostisland.github.io/faraday -[contributing]: https://github.com/lostisland/faraday/blob/main/.github/CONTRIBUTING.md -[apidoc]: https://www.rubydoc.info/github/lostisland/faraday -[actions]: https://github.com/lostisland/faraday/actions diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/Rakefile b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/Rakefile deleted file mode 100644 index a98c5113..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/Rakefile +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -require 'rspec/core/rake_task' -require 'bundler' - -Bundler::GemHelper.install_tasks - -RSpec::Core::RakeTask.new(:spec) do |task| - task.ruby_opts = %w[-W] -end - -task default: :spec diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/examples/client_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/examples/client_spec.rb deleted file mode 100644 index e30d86f7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/examples/client_spec.rb +++ /dev/null @@ -1,119 +0,0 @@ -# frozen_string_literal: true - -# Requires Ruby with rspec and faraday gems. -# rspec client_spec.rb - -require 'faraday' -require 'json' - -# Example API client -class Client - def initialize(conn) - @conn = conn - end - - def httpbingo(jname, params: {}) - res = @conn.get("/#{jname}", params) - data = JSON.parse(res.body) - data['origin'] - end - - def foo(params) - res = @conn.post('/foo', JSON.dump(params)) - res.status - end -end - -RSpec.describe Client do - let(:stubs) { Faraday::Adapter::Test::Stubs.new } - let(:conn) { Faraday.new { |b| b.adapter(:test, stubs) } } - let(:client) { Client.new(conn) } - - it 'parses origin' do - stubs.get('/ip') do |env| - # optional: you can inspect the Faraday::Env - expect(env.url.path).to eq('/ip') - [ - 200, - { 'Content-Type': 'application/javascript' }, - '{"origin": "127.0.0.1"}' - ] - end - - # uncomment to trigger stubs.verify_stubbed_calls failure - # stubs.get('/unused') { [404, {}, ''] } - - expect(client.httpbingo('ip')).to eq('127.0.0.1') - stubs.verify_stubbed_calls - end - - it 'handles 404' do - stubs.get('/api') do - [ - 404, - { 'Content-Type': 'application/javascript' }, - '{}' - ] - end - expect(client.httpbingo('api')).to be_nil - stubs.verify_stubbed_calls - end - - it 'handles exception' do - stubs.get('/api') do - raise Faraday::ConnectionFailed - end - - expect { client.httpbingo('api') }.to raise_error(Faraday::ConnectionFailed) - stubs.verify_stubbed_calls - end - - context 'When the test stub is run in strict_mode' do - let(:stubs) { Faraday::Adapter::Test::Stubs.new(strict_mode: true) } - - it 'verifies the all parameter values are identical' do - stubs.get('/api?abc=123') do - [ - 200, - { 'Content-Type': 'application/javascript' }, - '{"origin": "127.0.0.1"}' - ] - end - - # uncomment to raise Stubs::NotFound - # expect(client.httpbingo('api', params: { abc: 123, foo: 'Kappa' })).to eq('127.0.0.1') - expect(client.httpbingo('api', params: { abc: 123 })).to eq('127.0.0.1') - stubs.verify_stubbed_calls - end - end - - context 'When the Faraday connection is configured with FlatParamsEncoder' do - let(:conn) { Faraday.new(request: { params_encoder: Faraday::FlatParamsEncoder }) { |b| b.adapter(:test, stubs) } } - - it 'handles the same multiple URL parameters' do - stubs.get('/api?a=x&a=y&a=z') { [200, { 'Content-Type' => 'application/json' }, '{"origin": "127.0.0.1"}'] } - - # uncomment to raise Stubs::NotFound - # expect(client.httpbingo('api', params: { a: %w[x y] })).to eq('127.0.0.1') - expect(client.httpbingo('api', params: { a: %w[x y z] })).to eq('127.0.0.1') - stubs.verify_stubbed_calls - end - end - - context 'When you want to test the body, you can use a proc as well as string' do - it 'tests with a string' do - stubs.post('/foo', '{"name":"YK"}') { [200, {}, ''] } - - expect(client.foo(name: 'YK')).to eq 200 - stubs.verify_stubbed_calls - end - - it 'tests with a proc' do - check = ->(request_body) { JSON.parse(request_body).slice('name') == { 'name' => 'YK' } } - stubs.post('/foo', check) { [200, {}, ''] } - - expect(client.foo(name: 'YK', created_at: Time.now)).to eq 200 - stubs.verify_stubbed_calls - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/examples/client_test.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/examples/client_test.rb deleted file mode 100644 index 3aad9576..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/examples/client_test.rb +++ /dev/null @@ -1,144 +0,0 @@ -# frozen_string_literal: true - -# Requires Ruby with test-unit and faraday gems. -# ruby client_test.rb - -require 'faraday' -require 'json' -require 'test/unit' - -# Example API client -class Client - def initialize(conn) - @conn = conn - end - - def httpbingo(jname, params: {}) - res = @conn.get("/#{jname}", params) - data = JSON.parse(res.body) - data['origin'] - end - - def foo(params) - res = @conn.post('/foo', JSON.dump(params)) - res.status - end -end - -# Example API client test -class ClientTest < Test::Unit::TestCase - def test_httpbingo_name - stubs = Faraday::Adapter::Test::Stubs.new - stubs.get('/api') do |env| - # optional: you can inspect the Faraday::Env - assert_equal '/api', env.url.path - [ - 200, - { 'Content-Type': 'application/javascript' }, - '{"origin": "127.0.0.1"}' - ] - end - - # uncomment to trigger stubs.verify_stubbed_calls failure - # stubs.get('/unused') { [404, {}, ''] } - - cli = client(stubs) - assert_equal '127.0.0.1', cli.httpbingo('api') - stubs.verify_stubbed_calls - end - - def test_httpbingo_not_found - stubs = Faraday::Adapter::Test::Stubs.new - stubs.get('/api') do - [ - 404, - { 'Content-Type': 'application/javascript' }, - '{}' - ] - end - - cli = client(stubs) - assert_nil cli.httpbingo('api') - stubs.verify_stubbed_calls - end - - def test_httpbingo_exception - stubs = Faraday::Adapter::Test::Stubs.new - stubs.get('/api') do - raise Faraday::ConnectionFailed - end - - cli = client(stubs) - assert_raise Faraday::ConnectionFailed do - cli.httpbingo('api') - end - stubs.verify_stubbed_calls - end - - def test_strict_mode - stubs = Faraday::Adapter::Test::Stubs.new(strict_mode: true) - stubs.get('/api?abc=123') do - [ - 200, - { 'Content-Type': 'application/javascript' }, - '{"origin": "127.0.0.1"}' - ] - end - - cli = client(stubs) - assert_equal '127.0.0.1', cli.httpbingo('api', params: { abc: 123 }) - - # uncomment to raise Stubs::NotFound - # assert_equal '127.0.0.1', cli.httpbingo('api', params: { abc: 123, foo: 'Kappa' }) - stubs.verify_stubbed_calls - end - - def test_non_default_params_encoder - stubs = Faraday::Adapter::Test::Stubs.new(strict_mode: true) - stubs.get('/api?a=x&a=y&a=z') do - [ - 200, - { 'Content-Type': 'application/javascript' }, - '{"origin": "127.0.0.1"}' - ] - end - conn = Faraday.new(request: { params_encoder: Faraday::FlatParamsEncoder }) do |builder| - builder.adapter :test, stubs - end - - cli = Client.new(conn) - assert_equal '127.0.0.1', cli.httpbingo('api', params: { a: %w[x y z] }) - - # uncomment to raise Stubs::NotFound - # assert_equal '127.0.0.1', cli.httpbingo('api', params: { a: %w[x y] }) - stubs.verify_stubbed_calls - end - - def test_with_string_body - stubs = Faraday::Adapter::Test::Stubs.new do |stub| - stub.post('/foo', '{"name":"YK"}') { [200, {}, ''] } - end - cli = client(stubs) - assert_equal 200, cli.foo(name: 'YK') - - stubs.verify_stubbed_calls - end - - def test_with_proc_body - stubs = Faraday::Adapter::Test::Stubs.new do |stub| - check = ->(request_body) { JSON.parse(request_body).slice('name') == { 'name' => 'YK' } } - stub.post('/foo', check) { [200, {}, ''] } - end - cli = client(stubs) - assert_equal 200, cli.foo(name: 'YK', created_at: Time.now) - - stubs.verify_stubbed_calls - end - - def client(stubs) - conn = Faraday.new do |builder| - builder.adapter :test, stubs - end - Client.new(conn) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday.rb deleted file mode 100644 index 758a08de..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -require 'cgi' -require 'date' -require 'set' -require 'forwardable' -require 'faraday/version' -require 'faraday/methods' -require 'faraday/error' -require 'faraday/middleware_registry' -require 'faraday/utils' -require 'faraday/options' -require 'faraday/connection' -require 'faraday/rack_builder' -require 'faraday/parameters' -require 'faraday/middleware' -require 'faraday/adapter' -require 'faraday/request' -require 'faraday/response' -require 'faraday/net_http' -# This is the main namespace for Faraday. -# -# It provides methods to create {Connection} objects, and HTTP-related -# methods to use directly. -# -# @example Helpful class methods for easy usage -# Faraday.get "http://faraday.com" -# -# @example Helpful class method `.new` to create {Connection} objects. -# conn = Faraday.new "http://faraday.com" -# conn.get '/' -# -module Faraday - CONTENT_TYPE = 'Content-Type' - - class << self - # The root path that Faraday is being loaded from. - # - # This is the root from where the libraries are auto-loaded. - # - # @return [String] - attr_accessor :root_path - - # Gets or sets the path that the Faraday libs are loaded from. - # @return [String] - attr_accessor :lib_path - - # @overload default_adapter - # Gets the Symbol key identifying a default Adapter to use - # for the default {Faraday::Connection}. Defaults to `:net_http`. - # @return [Symbol] the default adapter - # @overload default_adapter=(adapter) - # Updates default adapter while resetting {.default_connection}. - # @return [Symbol] the new default_adapter. - attr_reader :default_adapter - - # Option for the default_adapter - # @return [Hash] default_adapter options - attr_accessor :default_adapter_options - - # Documented below, see default_connection - attr_writer :default_connection - - # Tells Faraday to ignore the environment proxy (http_proxy). - # Defaults to `false`. - # @return [Boolean] - attr_accessor :ignore_env_proxy - - # Initializes a new {Connection}. - # - # @param url [String,Hash] The optional String base URL to use as a prefix - # for all requests. Can also be the options Hash. Any of these - # values will be set on every request made, unless overridden - # for a specific request. - # @param options [Hash] - # @option options [String] :url Base URL - # @option options [Hash] :params Hash of unencoded URI query params. - # @option options [Hash] :headers Hash of unencoded HTTP headers. - # @option options [Hash] :request Hash of request options. - # @option options [Hash] :ssl Hash of SSL options. - # @option options [Hash] :proxy Hash of Proxy options. - # @return [Faraday::Connection] - # - # @example With an URL argument - # Faraday.new 'http://faraday.com' - # # => Faraday::Connection to http://faraday.com - # - # @example With an URL argument and an options hash - # Faraday.new 'http://faraday.com', params: { page: 1 } - # # => Faraday::Connection to http://faraday.com?page=1 - # - # @example With everything in an options hash - # Faraday.new url: 'http://faraday.com', - # params: { page: 1 } - # # => Faraday::Connection to http://faraday.com?page=1 - def new(url = nil, options = {}, &block) - options = Utils.deep_merge(default_connection_options, options) - Faraday::Connection.new(url, options, &block) - end - - # Documented elsewhere, see default_adapter reader - def default_adapter=(adapter) - @default_connection = nil - @default_adapter = adapter - end - - def respond_to_missing?(symbol, include_private = false) - default_connection.respond_to?(symbol, include_private) || super - end - - # @overload default_connection - # Gets the default connection used for simple scripts. - # @return [Faraday::Connection] a connection configured with - # the default_adapter. - # @overload default_connection=(connection) - # @param connection [Faraday::Connection] - # Sets the default {Faraday::Connection} for simple scripts that - # access the Faraday constant directly, such as - # Faraday.get "https://faraday.com". - def default_connection - @default_connection ||= Connection.new(default_connection_options) - end - - # Gets the default connection options used when calling {Faraday#new}. - # - # @return [Faraday::ConnectionOptions] - def default_connection_options - @default_connection_options ||= ConnectionOptions.new - end - - # Sets the default options used when calling {Faraday#new}. - # - # @param options [Hash, Faraday::ConnectionOptions] - def default_connection_options=(options) - @default_connection = nil - @default_connection_options = ConnectionOptions.from(options) - end - - private - - # Internal: Proxies method calls on the Faraday constant to - # .default_connection. - def method_missing(name, *args, &block) - if default_connection.respond_to?(name) - default_connection.send(name, *args, &block) - else - super - end - end - end - - self.ignore_env_proxy = false - self.root_path = File.expand_path __dir__ - self.lib_path = File.expand_path 'faraday', __dir__ - self.default_adapter = :net_http - self.default_adapter_options = {} -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter.rb deleted file mode 100644 index 1d9a4508..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # Base class for all Faraday adapters. Adapters are - # responsible for fulfilling a Faraday request. - class Adapter - extend MiddlewareRegistry - - CONTENT_LENGTH = 'Content-Length' - - # This module marks an Adapter as supporting parallel requests. - module Parallelism - attr_writer :supports_parallel - - def supports_parallel? - @supports_parallel - end - - def inherited(subclass) - super - subclass.supports_parallel = supports_parallel? - end - end - - extend Parallelism - self.supports_parallel = false - - def initialize(_app = nil, opts = {}, &block) - @app = lambda(&:response) - @connection_options = opts - @config_block = block - end - - # Yields or returns an adapter's configured connection. Depends on - # #build_connection being defined on this adapter. - # - # @param env [Faraday::Env, Hash] The env object for a faraday request. - # - # @return The return value of the given block, or the HTTP connection object - # if no block is given. - def connection(env) - conn = build_connection(env) - return conn unless block_given? - - yield conn - end - - # Close any persistent connections. The adapter should still be usable - # after calling close. - def close - # Possible implementation: - # @app.close if @app.respond_to?(:close) - end - - def call(env) - env.clear_body if env.needs_body? - env.response = Response.new - end - - private - - def save_response(env, status, body, headers = nil, reason_phrase = nil, finished: true) - env.status = status - env.body = body - env.reason_phrase = reason_phrase&.to_s&.strip - env.response_headers = Utils::Headers.new.tap do |response_headers| - response_headers.update headers unless headers.nil? - yield(response_headers) if block_given? - end - - env.response.finish(env) unless env.parallel? || !finished - env.response - end - - # Fetches either a read, write, or open timeout setting. Defaults to the - # :timeout value if a more specific one is not given. - # - # @param type [Symbol] Describes which timeout setting to get: :read, - # :write, or :open. - # @param options [Hash] Hash containing Symbol keys like :timeout, - # :read_timeout, :write_timeout, or :open_timeout - # - # @return [Integer, nil] Timeout duration in seconds, or nil if no timeout - # has been set. - def request_timeout(type, options) - key = TIMEOUT_KEYS.fetch(type) do - msg = "Expected :read, :write, :open. Got #{type.inspect} :(" - raise ArgumentError, msg - end - options[key] || options[:timeout] - end - - TIMEOUT_KEYS = { - read: :read_timeout, - open: :open_timeout, - write: :write_timeout - }.freeze - end -end - -require 'faraday/adapter/test' diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter/test.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter/test.rb deleted file mode 100644 index c637d139..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter/test.rb +++ /dev/null @@ -1,311 +0,0 @@ -# frozen_string_literal: true - -require 'timeout' - -module Faraday - class Adapter - # @example - # test = Faraday::Connection.new do - # use Faraday::Adapter::Test do |stub| - # # Define matcher to match the request - # stub.get '/resource.json' do - # # return static content - # [200, {'Content-Type' => 'application/json'}, 'hi world'] - # end - # - # # response with content generated based on request - # stub.get '/showget' do |env| - # [200, {'Content-Type' => 'text/plain'}, env[:method].to_s] - # end - # - # # A regular expression can be used as matching filter - # stub.get /\A\/items\/(\d+)\z/ do |env, meta| - # # in case regular expression is used, an instance of MatchData - # # can be received - # [200, - # {'Content-Type' => 'text/plain'}, - # "showing item: #{meta[:match_data][1]}" - # ] - # end - # - # # Test the request body is the same as the stubbed body - # stub.post('/bar', 'name=YK&word=call') { [200, {}, ''] } - # - # # You can pass a proc as a stubbed body and check the request body in your way. - # # In this case, the proc should return true or false. - # stub.post('/foo', ->(request_body) do - # JSON.parse(request_body).slice('name') == { 'name' => 'YK' } }) { [200, {}, ''] - # end - # - # # You can set strict_mode to exactly match the stubbed requests. - # stub.strict_mode = true - # end - # end - # - # resp = test.get '/resource.json' - # resp.body # => 'hi world' - # - # resp = test.get '/showget' - # resp.body # => 'get' - # - # resp = test.get '/items/1' - # resp.body # => 'showing item: 1' - # - # resp = test.get '/items/2' - # resp.body # => 'showing item: 2' - # - # resp = test.post '/bar', 'name=YK&word=call' - # resp.status # => 200 - # - # resp = test.post '/foo', JSON.dump(name: 'YK', created_at: Time.now) - # resp.status # => 200 - class Test < Faraday::Adapter - attr_accessor :stubs - - # A stack of Stubs - class Stubs - class NotFound < StandardError - end - - def initialize(strict_mode: false) - # { get: [Stub, Stub] } - @stack = {} - @consumed = {} - @strict_mode = strict_mode - @stubs_mutex = Monitor.new - yield(self) if block_given? - end - - def empty? - @stack.empty? - end - - # @param env [Faraday::Env] - def match(env) - request_method = env[:method] - return false unless @stack.key?(request_method) - - stack = @stack[request_method] - consumed = (@consumed[request_method] ||= []) - - @stubs_mutex.synchronize do - stub, meta = matches?(stack, env) - if stub - removed = stack.delete(stub) - consumed << removed unless removed.nil? - return stub, meta - end - end - matches?(consumed, env) - end - - def get(path, headers = {}, &block) - new_stub(:get, path, headers, &block) - end - - def head(path, headers = {}, &block) - new_stub(:head, path, headers, &block) - end - - def post(path, body = nil, headers = {}, &block) - new_stub(:post, path, headers, body, &block) - end - - def put(path, body = nil, headers = {}, &block) - new_stub(:put, path, headers, body, &block) - end - - def patch(path, body = nil, headers = {}, &block) - new_stub(:patch, path, headers, body, &block) - end - - def delete(path, headers = {}, &block) - new_stub(:delete, path, headers, &block) - end - - def options(path, headers = {}, &block) - new_stub(:options, path, headers, &block) - end - - # Raises an error if any of the stubbed calls have not been made. - def verify_stubbed_calls - failed_stubs = [] - @stack.each do |method, stubs| - next if stubs.empty? - - failed_stubs.concat( - stubs.map do |stub| - "Expected #{method} #{stub}." - end - ) - end - raise failed_stubs.join(' ') unless failed_stubs.empty? - end - - # Set strict_mode. If the value is true, this adapter tries to find matched requests strictly, - # which means that all of a path, parameters, and headers must be the same as an actual request. - def strict_mode=(value) - @strict_mode = value - @stack.each_value do |stubs| - stubs.each do |stub| - stub.strict_mode = value - end - end - end - - protected - - def new_stub(request_method, path, headers = {}, body = nil, &block) - normalized_path, host = - if path.is_a?(Regexp) - path - else - [ - Faraday::Utils.normalize_path(path), - Faraday::Utils.URI(path).host - ] - end - path, query = normalized_path.respond_to?(:split) ? normalized_path.split('?') : normalized_path - headers = Utils::Headers.new(headers) - - stub = Stub.new(host, path, query, headers, body, @strict_mode, block) - (@stack[request_method] ||= []) << stub - end - - # @param stack [Hash] - # @param env [Faraday::Env] - def matches?(stack, env) - stack.each do |stub| - match_result, meta = stub.matches?(env) - return stub, meta if match_result - end - nil - end - end - - # Stub request - Stub = Struct.new(:host, :path, :query, :headers, :body, :strict_mode, :block) do - # @param env [Faraday::Env] - def matches?(env) - request_host = env[:url].host - request_path = Faraday::Utils.normalize_path(env[:url].path) - request_headers = env.request_headers - request_body = env[:body] - - # meta is a hash used as carrier - # that will be yielded to consumer block - meta = {} - [(host.nil? || host == request_host) && - path_match?(request_path, meta) && - params_match?(env) && - body_match?(request_body) && - headers_match?(request_headers), meta] - end - - def path_match?(request_path, meta) - if path.is_a?(Regexp) - !!(meta[:match_data] = path.match(request_path)) - else - path == request_path - end - end - - # @param env [Faraday::Env] - def params_match?(env) - request_params = env[:params] - params = env.params_encoder.decode(query) || {} - - if strict_mode - return Set.new(params) == Set.new(request_params) - end - - params.keys.all? do |key| - request_params[key] == params[key] - end - end - - def headers_match?(request_headers) - if strict_mode - headers_with_user_agent = headers.dup.tap do |hs| - # NOTE: Set User-Agent in case it's not set when creating Stubs. - # Users would not want to set Faraday's User-Agent explicitly. - hs[:user_agent] ||= Connection::USER_AGENT - end - return Set.new(headers_with_user_agent) == Set.new(request_headers) - end - - headers.keys.all? do |key| - request_headers[key] == headers[key] - end - end - - def body_match?(request_body) - return true if body.to_s.empty? - - case body - when Proc - body.call(request_body) - else - request_body == body - end - end - - def to_s - "#{path} #{body}" - end - end - - def initialize(app, stubs = nil, &block) - super(app) - @stubs = stubs || Stubs.new - configure(&block) if block - end - - def configure - yield(stubs) - end - - # @param env [Faraday::Env] - def call(env) - super - - env.request.params_encoder ||= Faraday::Utils.default_params_encoder - env[:params] = env.params_encoder.decode(env[:url].query) || {} - stub, meta = stubs.match(env) - - unless stub - raise Stubs::NotFound, "no stubbed request for #{env[:method]} " \ - "#{env[:url]} #{env[:body]} #{env[:headers]}" - end - - block_arity = stub.block.arity - params = if block_arity >= 0 - [env, meta].take(block_arity) - else - [env, meta] - end - - timeout = request_timeout(:open, env[:request]) - timeout ||= request_timeout(:read, env[:request]) - - status, headers, body = - if timeout - ::Timeout.timeout(timeout, Faraday::TimeoutError) do - stub.block.call(*params) - end - else - stub.block.call(*params) - end - - # We need to explicitly pass `reason_phrase = nil` here to avoid keyword args conflicts. - # See https://github.com/lostisland/faraday/issues/1444 - # TODO: remove `nil` explicit reason_phrase once Ruby 3.0 becomes minimum req. version - save_response(env, status, body, headers, nil) - - @app.call(env) - end - end - end -end - -Faraday::Adapter.register_middleware(test: Faraday::Adapter::Test) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter_registry.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter_registry.rb deleted file mode 100644 index 1cd1e7e1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/adapter_registry.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -require 'monitor' - -module Faraday - # AdapterRegistry registers adapter class names so they can be looked up by a - # String or Symbol name. - class AdapterRegistry - def initialize - @lock = Monitor.new - @constants = {} - end - - def get(name) - klass = @lock.synchronize do - @constants[name] - end - return klass if klass - - Object.const_get(name).tap { |c| set(c, name) } - end - - def set(klass, name = nil) - name ||= klass.to_s - @lock.synchronize do - @constants[name] = klass - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/connection.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/connection.rb deleted file mode 100644 index 543cd4bb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/connection.rb +++ /dev/null @@ -1,564 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # Connection objects manage the default properties and the middleware - # stack for fulfilling an HTTP request. - # - # @example - # - # conn = Faraday::Connection.new 'http://httpbingo.org' - # - # # GET http://httpbingo.org/nigiri - # conn.get 'nigiri' - # # => # - # - class Connection - # A Set of allowed HTTP verbs. - METHODS = Set.new %i[get post put delete head patch options trace] - USER_AGENT = "Faraday v#{VERSION}".freeze - - # @return [Hash] URI query unencoded key/value pairs. - attr_reader :params - - # @return [Hash] unencoded HTTP header key/value pairs. - attr_reader :headers - - # @return [String] a URI with the prefix used for all requests from this - # Connection. This includes a default host name, scheme, port, and path. - attr_reader :url_prefix - - # @return [Faraday::RackBuilder] Builder for this Connection. - attr_reader :builder - - # @return [Hash] SSL options. - attr_reader :ssl - - # @return [Object] the parallel manager for this Connection. - attr_reader :parallel_manager - - # Sets the default parallel manager for this connection. - attr_writer :default_parallel_manager - - # @return [Hash] proxy options. - attr_reader :proxy - - # Initializes a new Faraday::Connection. - # - # @param url [URI, String] URI or String base URL to use as a prefix for all - # requests (optional). - # @param options [Hash, Faraday::ConnectionOptions] - # @option options [URI, String] :url ('http:/') URI or String base URL - # @option options [Hash String>] :params URI query unencoded - # key/value pairs. - # @option options [Hash String>] :headers Hash of unencoded HTTP - # header key/value pairs. - # @option options [Hash] :request Hash of request options. - # @option options [Hash] :ssl Hash of SSL options. - # @option options [Hash, URI, String] :proxy proxy options, either as a URL - # or as a Hash - # @option options [URI, String] :proxy[:uri] - # @option options [String] :proxy[:user] - # @option options [String] :proxy[:password] - # @yield [self] after all setup has been done - def initialize(url = nil, options = nil) - options = ConnectionOptions.from(options) - - if url.is_a?(Hash) || url.is_a?(ConnectionOptions) - options = Utils.deep_merge(options, url) - url = options.url - end - - @parallel_manager = nil - @headers = Utils::Headers.new - @params = Utils::ParamsHash.new - @options = options.request - @ssl = options.ssl - @default_parallel_manager = options.parallel_manager - @manual_proxy = nil - - @builder = options.builder || begin - # pass an empty block to Builder so it doesn't assume default middleware - options.new_builder(block_given? ? proc { |b| } : nil) - end - - self.url_prefix = url || 'http:/' - - @params.update(options.params) if options.params - @headers.update(options.headers) if options.headers - - initialize_proxy(url, options) - - yield(self) if block_given? - - @headers[:user_agent] ||= USER_AGENT - end - - def initialize_proxy(url, options) - @manual_proxy = !!options.proxy - @proxy = - if options.proxy - ProxyOptions.from(options.proxy) - else - proxy_from_env(url) - end - end - - # Sets the Hash of URI query unencoded key/value pairs. - # @param hash [Hash] - def params=(hash) - @params.replace hash - end - - # Sets the Hash of unencoded HTTP header key/value pairs. - # @param hash [Hash] - def headers=(hash) - @headers.replace hash - end - - extend Forwardable - - def_delegators :builder, :use, :request, :response, :adapter, :app - - # Closes the underlying resources and/or connections. In the case of - # persistent connections, this closes all currently open connections - # but does not prevent new connections from being made. - def close - app.close - end - - # @!method get(url = nil, params = nil, headers = nil) - # Makes a GET HTTP request without a body. - # @!scope class - # - # @param url [String, URI, nil] The optional String base URL to use as a prefix for - # all requests. Can also be the options Hash. - # @param params [Hash, nil] Hash of URI query unencoded key/value pairs. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @example - # conn.get '/items', { page: 1 }, :accept => 'application/json' - # - # # ElasticSearch example sending a body with GET. - # conn.get '/twitter/tweet/_search' do |req| - # req.headers[:content_type] = 'application/json' - # req.params[:routing] = 'kimchy' - # req.body = JSON.generate(query: {...}) - # end - # - # @yield [Faraday::Request] for further request customizations - # @return [Faraday::Response] - - # @!method head(url = nil, params = nil, headers = nil) - # Makes a HEAD HTTP request without a body. - # @!scope class - # - # @param url [String, URI, nil] The optional String base URL to use as a prefix for - # all requests. Can also be the options Hash. - # @param params [Hash, nil] Hash of URI query unencoded key/value pairs. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @example - # conn.head '/items/1' - # - # @yield [Faraday::Request] for further request customizations - # @return [Faraday::Response] - - # @!method delete(url = nil, params = nil, headers = nil) - # Makes a DELETE HTTP request without a body. - # @!scope class - # - # @param url [String, URI, nil] The optional String base URL to use as a prefix for - # all requests. Can also be the options Hash. - # @param params [Hash, nil] Hash of URI query unencoded key/value pairs. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @example - # conn.delete '/items/1' - # - # @yield [Faraday::Request] for further request customizations - # @return [Faraday::Response] - - # @!method trace(url = nil, params = nil, headers = nil) - # Makes a TRACE HTTP request without a body. - # @!scope class - # - # @param url [String, URI, nil] The optional String base URL to use as a prefix for - # all requests. Can also be the options Hash. - # @param params [Hash, nil] Hash of URI query unencoded key/value pairs. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @example - # conn.connect '/items/1' - # - # @yield [Faraday::Request] for further request customizations - # @return [Faraday::Response] - - # @!visibility private - METHODS_WITH_QUERY.each do |method| - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{method}(url = nil, params = nil, headers = nil) - run_request(:#{method}, url, nil, headers) do |request| - request.params.update(params) if params - yield request if block_given? - end - end - RUBY - end - - # @overload options() - # Returns current Connection options. - # - # @overload options(url, params = nil, headers = nil) - # Makes an OPTIONS HTTP request to the given URL. - # @param url [String, URI, nil] String base URL to sue as a prefix for all requests. - # @param params [Hash, nil] Hash of URI query unencoded key/value pairs. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @example - # conn.options '/items/1' - # - # @yield [Faraday::Request] for further request customizations - # @return [Faraday::Response] - def options(*args) - return @options if args.empty? - - url, params, headers = *args - run_request(:options, url, nil, headers) do |request| - request.params.update(params) if params - yield request if block_given? - end - end - - # @!method post(url = nil, body = nil, headers = nil) - # Makes a POST HTTP request with a body. - # @!scope class - # - # @param url [String, URI, nil] The optional String base URL to use as a prefix for - # all requests. Can also be the options Hash. - # @param body [String, nil] body for the request. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @example - # conn.post '/items', data, content_type: 'application/json' - # - # # Simple ElasticSearch indexing sample. - # conn.post '/twitter/tweet' do |req| - # req.headers[:content_type] = 'application/json' - # req.params[:routing] = 'kimchy' - # req.body = JSON.generate(user: 'kimchy', ...) - # end - # - # @yield [Faraday::Request] for further request customizations - # @return [Faraday::Response] - - # @!method put(url = nil, body = nil, headers = nil) - # Makes a PUT HTTP request with a body. - # @!scope class - # - # @param url [String, URI, nil] The optional String base URL to use as a prefix for - # all requests. Can also be the options Hash. - # @param body [String, nil] body for the request. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @example - # conn.put '/products/123', data, content_type: 'application/json' - # - # # Star a gist. - # conn.put 'https://api.github.com/gists/GIST_ID/star' do |req| - # req.headers['Accept'] = 'application/vnd.github+json' - # req.headers['Authorization'] = 'Bearer ' - # req.headers['X-GitHub-Api-Version'] = '2022-11-28' - # end - # - # @yield [Faraday::Request] for further request customizations - # @return [Faraday::Response] - - # @!visibility private - METHODS_WITH_BODY.each do |method| - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{method}(url = nil, body = nil, headers = nil, &block) - run_request(:#{method}, url, body, headers, &block) - end - RUBY - end - - # Check if the adapter is parallel-capable. - # - # @yield if the adapter isn't parallel-capable, or if no adapter is set yet. - # - # @return [Object, nil] a parallel manager or nil if yielded - # @api private - def default_parallel_manager - @default_parallel_manager ||= begin - adapter = @builder.adapter.klass if @builder.adapter - - if support_parallel?(adapter) - adapter.setup_parallel_manager - elsif block_given? - yield - end - end - end - - # Determine if this Faraday::Connection can make parallel requests. - # - # @return [Boolean] - def in_parallel? - !!@parallel_manager - end - - # Sets up the parallel manager to make a set of requests. - # - # @param manager [Object] The parallel manager that this Connection's - # Adapter uses. - # - # @yield a block to execute multiple requests. - # @return [void] - def in_parallel(manager = nil, &block) - @parallel_manager = manager || default_parallel_manager do - warn 'Warning: `in_parallel` called but no parallel-capable adapter ' \ - 'on Faraday stack' - warn caller[2, 10].join("\n") - nil - end - return yield unless @parallel_manager - - if @parallel_manager.respond_to?(:execute) - # Execute is the new method that is responsible for executing the block. - @parallel_manager.execute(&block) - else - # TODO: Old behaviour, deprecate and remove in 3.0 - yield - @parallel_manager.run - end - ensure - @parallel_manager = nil - end - - # Sets the Hash proxy options. - # - # @param new_value [Object] - def proxy=(new_value) - @manual_proxy = true - @proxy = new_value ? ProxyOptions.from(new_value) : nil - end - - def_delegators :url_prefix, :scheme, :scheme=, :host, :host=, :port, :port= - def_delegator :url_prefix, :path, :path_prefix - - # Parses the given URL with URI and stores the individual - # components in this connection. These components serve as defaults for - # requests made by this connection. - # - # @param url [String, URI] - # @param encoder [Object] - # - # @example - # - # conn = Faraday::Connection.new { ... } - # conn.url_prefix = "https://httpbingo.org/api" - # conn.scheme # => https - # conn.path_prefix # => "/api" - # - # conn.get("nigiri?page=2") # accesses https://httpbingo.org/api/nigiri - def url_prefix=(url, encoder = nil) - uri = @url_prefix = Utils.URI(url) - self.path_prefix = uri.path - - params.merge_query(uri.query, encoder) - uri.query = nil - - with_uri_credentials(uri) do |user, password| - set_basic_auth(user, password) - uri.user = uri.password = nil - end - - @proxy = proxy_from_env(url) unless @manual_proxy - end - - def set_basic_auth(user, password) - header = Faraday::Utils.basic_header_from(user, password) - headers[Faraday::Request::Authorization::KEY] = header - end - - # Sets the path prefix and ensures that it always has a leading - # slash. - # - # @param value [String] - # - # @return [String] the new path prefix - def path_prefix=(value) - url_prefix.path = if value - value = "/#{value}" unless value[0, 1] == '/' - value - end - end - - # Takes a relative url for a request and combines it with the defaults - # set on the connection instance. - # - # @param url [String, URI, nil] - # @param extra_params [Hash] - # - # @example - # conn = Faraday::Connection.new { ... } - # conn.url_prefix = "https://httpbingo.org/api?token=abc" - # conn.scheme # => https - # conn.path_prefix # => "/api" - # - # conn.build_url("nigiri?page=2") - # # => https://httpbingo.org/api/nigiri?token=abc&page=2 - # - # conn.build_url("nigiri", page: 2) - # # => https://httpbingo.org/api/nigiri?token=abc&page=2 - # - def build_url(url = nil, extra_params = nil) - uri = build_exclusive_url(url) - - query_values = params.dup.merge_query(uri.query, options.params_encoder) - query_values.update(extra_params) if extra_params - uri.query = - if query_values.empty? - nil - else - query_values.to_query(options.params_encoder) - end - - uri - end - - # Builds and runs the Faraday::Request. - # - # @param method [Symbol] HTTP method. - # @param url [String, URI, nil] String or URI to access. - # @param body [String, Hash, Array, nil] The request body that will eventually be converted to - # a string; middlewares can be used to support more complex types. - # @param headers [Hash, nil] unencoded HTTP header key/value pairs. - # - # @return [Faraday::Response] - def run_request(method, url, body, headers) - unless METHODS.include?(method) - raise ArgumentError, "unknown http method: #{method}" - end - - request = build_request(method) do |req| - req.options.proxy = proxy_for_request(url) - req.url(url) if url - req.headers.update(headers) if headers - req.body = body if body - yield(req) if block_given? - end - - builder.build_response(self, request) - end - - # Creates and configures the request object. - # - # @param method [Symbol] - # - # @yield [Faraday::Request] if block given - # @return [Faraday::Request] - def build_request(method) - Request.create(method) do |req| - req.params = params.dup - req.headers = headers.dup - req.options = options.dup - yield(req) if block_given? - end - end - - # Build an absolute URL based on url_prefix. - # - # @param url [String, URI, nil] - # @param params [Faraday::Utils::ParamsHash] A Faraday::Utils::ParamsHash to - # replace the query values - # of the resulting url (default: nil). - # - # @return [URI] - def build_exclusive_url(url = nil, params = nil, params_encoder = nil) - url = nil if url.respond_to?(:empty?) && url.empty? - base = url_prefix.dup - if url && !base.path.end_with?('/') - base.path = "#{base.path}/" # ensure trailing slash - end - # Ensure relative url will be parsed correctly (such as `service:search` ) - url = "./#{url}" if url.respond_to?(:start_with?) && !url.start_with?('http://', 'https://', '/', './', '../') - uri = url ? base + url : base - if params - uri.query = params.to_query(params_encoder || options.params_encoder) - end - uri.query = nil if uri.query && uri.query.empty? - uri - end - - # Creates a duplicate of this Faraday::Connection. - # - # @api private - # - # @return [Faraday::Connection] - def dup - self.class.new(build_exclusive_url, - headers: headers.dup, - params: params.dup, - builder: builder.dup, - ssl: ssl.dup, - request: options.dup) - end - - # Yields username and password extracted from a URI if they both exist. - # - # @param uri [URI] - # @yield [username, password] any username and password - # @yieldparam username [String] any username from URI - # @yieldparam password [String] any password from URI - # @return [void] - # @api private - def with_uri_credentials(uri) - return unless uri.user && uri.password - - yield(Utils.unescape(uri.user), Utils.unescape(uri.password)) - end - - def proxy_from_env(url) - return if Faraday.ignore_env_proxy - - uri = nil - case url - when String - uri = Utils.URI(url) - uri = if uri.host.nil? - find_default_proxy - else - URI.parse("#{uri.scheme}://#{uri.host}").find_proxy - end - when URI - uri = url.find_proxy - when nil - uri = find_default_proxy - end - ProxyOptions.from(uri) if uri - end - - def find_default_proxy - uri = ENV.fetch('http_proxy', nil) - return unless uri && !uri.empty? - - uri = "http://#{uri}" unless uri.match?(/^http/i) - uri - end - - def proxy_for_request(url) - return proxy if @manual_proxy - - if url && Utils.URI(url).absolute? - proxy_from_env(url) - else - proxy - end - end - - def support_parallel?(adapter) - adapter.respond_to?(:supports_parallel?) && adapter&.supports_parallel? - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/encoders/flat_params_encoder.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/encoders/flat_params_encoder.rb deleted file mode 100644 index bc10c8b9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/encoders/flat_params_encoder.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # FlatParamsEncoder manages URI params as a flat hash. Any Array values repeat - # the parameter multiple times. - module FlatParamsEncoder - class << self - extend Forwardable - def_delegators :'Faraday::Utils', :escape, :unescape - end - - # Encode converts the given param into a URI querystring. Keys and values - # will converted to strings and appropriately escaped for the URI. - # - # @param params [Hash] query arguments to convert. - # - # @example - # - # encode({a: %w[one two three], b: true, c: "C"}) - # # => 'a=one&a=two&a=three&b=true&c=C' - # - # @return [String] the URI querystring (without the leading '?') - def self.encode(params) - return nil if params.nil? - - unless params.is_a?(Array) - unless params.respond_to?(:to_hash) - raise TypeError, - "Can't convert #{params.class} into Hash." - end - params = params.to_hash - params = params.map do |key, value| - key = key.to_s if key.is_a?(Symbol) - [key, value] - end - - # Only to be used for non-Array inputs. Arrays should preserve order. - params.sort! if @sort_params - end - - # The params have form [['key1', 'value1'], ['key2', 'value2']]. - buffer = +'' - params.each do |key, value| - encoded_key = escape(key) - if value.nil? - buffer << "#{encoded_key}&" - elsif value.is_a?(Array) - if value.empty? - buffer << "#{encoded_key}=&" - else - value.each do |sub_value| - encoded_value = escape(sub_value) - buffer << "#{encoded_key}=#{encoded_value}&" - end - end - else - encoded_value = escape(value) - buffer << "#{encoded_key}=#{encoded_value}&" - end - end - buffer.chop - end - - # Decode converts the given URI querystring into a hash. - # - # @param query [String] query arguments to parse. - # - # @example - # - # decode('a=one&a=two&a=three&b=true&c=C') - # # => {"a"=>["one", "two", "three"], "b"=>"true", "c"=>"C"} - # - # @return [Hash] parsed keys and value strings from the querystring. - def self.decode(query) - return nil if query.nil? - - empty_accumulator = {} - - split_query = (query.split('&').map do |pair| - pair.split('=', 2) if pair && !pair.empty? - end).compact - split_query.each_with_object(empty_accumulator.dup) do |pair, accu| - pair[0] = unescape(pair[0]) - pair[1] = true if pair[1].nil? - if pair[1].respond_to?(:to_str) - pair[1] = unescape(pair[1].to_str.tr('+', ' ')) - end - if accu[pair[0]].is_a?(Array) - accu[pair[0]] << pair[1] - elsif accu[pair[0]] - accu[pair[0]] = [accu[pair[0]], pair[1]] - else - accu[pair[0]] = pair[1] - end - end - end - - class << self - attr_accessor :sort_params - end - - # Useful default for OAuth and caching. - @sort_params = true - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/encoders/nested_params_encoder.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/encoders/nested_params_encoder.rb deleted file mode 100644 index 3ca3e73e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/encoders/nested_params_encoder.rb +++ /dev/null @@ -1,183 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # Sub-module for encoding parameters into query-string. - module EncodeMethods - # @param params [nil, Array, #to_hash] parameters to be encoded - # - # @return [String] the encoded params - # - # @raise [TypeError] if params can not be converted to a Hash - def encode(params) - return nil if params.nil? - - unless params.is_a?(Array) - unless params.respond_to?(:to_hash) - raise TypeError, "Can't convert #{params.class} into Hash." - end - - params = params.to_hash - params = params.map do |key, value| - key = key.to_s if key.is_a?(Symbol) - [key, value] - end - - # Only to be used for non-Array inputs. Arrays should preserve order. - params.sort! if @sort_params - end - - # The params have form [['key1', 'value1'], ['key2', 'value2']]. - buffer = +'' - params.each do |parent, value| - encoded_parent = escape(parent) - buffer << "#{encode_pair(encoded_parent, value)}&" - end - buffer.chop - end - - protected - - def encode_pair(parent, value) - if value.is_a?(Hash) - encode_hash(parent, value) - elsif value.is_a?(Array) - encode_array(parent, value) - elsif value.nil? - parent - else - encoded_value = escape(value) - "#{parent}=#{encoded_value}" - end - end - - def encode_hash(parent, value) - value = value.map { |key, val| [escape(key), val] }.sort - - buffer = +'' - value.each do |key, val| - new_parent = "#{parent}%5B#{key}%5D" - buffer << "#{encode_pair(new_parent, val)}&" - end - buffer.chop - end - - def encode_array(parent, value) - return "#{parent}%5B%5D" if value.empty? - - buffer = +'' - value.each_with_index do |val, index| - new_parent = if @array_indices - "#{parent}%5B#{index}%5D" - else - "#{parent}%5B%5D" - end - buffer << "#{encode_pair(new_parent, val)}&" - end - buffer.chop - end - end - - # Sub-module for decoding query-string into parameters. - module DecodeMethods - # @param query [nil, String] - # - # @return [Array] the decoded params - # - # @raise [TypeError] if the nesting is incorrect - def decode(query) - return nil if query.nil? - - params = {} - query.split('&').each do |pair| - next if pair.empty? - - key, value = pair.split('=', 2) - key = unescape(key) - value = unescape(value.tr('+', ' ')) if value - decode_pair(key, value, params) - end - - dehash(params, 0) - end - - protected - - SUBKEYS_REGEX = /[^\[\]]+(?:\]?\[\])?/ - - def decode_pair(key, value, context) - subkeys = key.scan(SUBKEYS_REGEX) - subkeys.each_with_index do |subkey, i| - is_array = subkey =~ /[\[\]]+\Z/ - subkey = Regexp.last_match.pre_match if is_array - last_subkey = i == subkeys.length - 1 - - context = prepare_context(context, subkey, is_array, last_subkey) - add_to_context(is_array, context, value, subkey) if last_subkey - end - end - - def prepare_context(context, subkey, is_array, last_subkey) - if !last_subkey || is_array - context = new_context(subkey, is_array, context) - end - if context.is_a?(Array) && !is_array - context = match_context(context, subkey) - end - context - end - - def new_context(subkey, is_array, context) - value_type = is_array ? Array : Hash - if context[subkey] && !context[subkey].is_a?(value_type) - raise TypeError, "expected #{value_type.name} " \ - "(got #{context[subkey].class.name}) for param `#{subkey}'" - end - - context[subkey] ||= value_type.new - end - - def match_context(context, subkey) - context << {} if !context.last.is_a?(Hash) || context.last.key?(subkey) - context.last - end - - def add_to_context(is_array, context, value, subkey) - is_array ? context << value : context[subkey] = value - end - - # Internal: convert a nested hash with purely numeric keys into an array. - # FIXME: this is not compatible with Rack::Utils.parse_nested_query - # @!visibility private - def dehash(hash, depth) - hash.each do |key, value| - hash[key] = dehash(value, depth + 1) if value.is_a?(Hash) - end - - if depth.positive? && !hash.empty? && hash.keys.all? { |k| k =~ /^\d+$/ } - hash.sort.map(&:last) - else - hash - end - end - end - - # This is the default encoder for Faraday requests. - # Using this encoder, parameters will be encoded respecting their structure, - # so you can send objects such as Arrays or Hashes as parameters - # for your requests. - module NestedParamsEncoder - class << self - attr_accessor :sort_params, :array_indices - - extend Forwardable - def_delegators :'Faraday::Utils', :escape, :unescape - end - - # Useful default for OAuth and caching. - @sort_params = true - @array_indices = false - - extend EncodeMethods - extend DecodeMethods - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/error.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/error.rb deleted file mode 100644 index 8cf98977..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/error.rb +++ /dev/null @@ -1,165 +0,0 @@ -# frozen_string_literal: true - -# Faraday namespace. -module Faraday - # Faraday error base class. - class Error < StandardError - attr_reader :response, :wrapped_exception - - def initialize(exc = nil, response = nil) - @wrapped_exception = nil unless defined?(@wrapped_exception) - @response = nil unless defined?(@response) - super(exc_msg_and_response!(exc, response)) - end - - def backtrace - if @wrapped_exception - @wrapped_exception.backtrace - else - super - end - end - - def inspect - inner = +'' - inner << " wrapped=#{@wrapped_exception.inspect}" if @wrapped_exception - inner << " response=#{@response.inspect}" if @response - inner << " #{super}" if inner.empty? - %(#<#{self.class}#{inner}>) - end - - def response_status - return unless @response - - @response.is_a?(Faraday::Response) ? @response.status : @response[:status] - end - - def response_headers - return unless @response - - @response.is_a?(Faraday::Response) ? @response.headers : @response[:headers] - end - - def response_body - return unless @response - - @response.is_a?(Faraday::Response) ? @response.body : @response[:body] - end - - protected - - # Pulls out potential parent exception and response hash, storing them in - # instance variables. - # exc - Either an Exception, a string message, or a response hash. - # response - Hash - # :status - Optional integer HTTP response status - # :headers - String key/value hash of HTTP response header - # values. - # :body - Optional string HTTP response body. - # :request - Hash - # :method - Symbol with the request HTTP method. - # :url - URI object with the url requested. - # :url_path - String with the url path requested. - # :params - String key/value hash of query params - # present in the request. - # :headers - String key/value hash of HTTP request - # header values. - # :body - String HTTP request body. - # - # If a subclass has to call this, then it should pass a string message - # to `super`. See NilStatusError. - def exc_msg_and_response!(exc, response = nil) - if @response.nil? && @wrapped_exception.nil? - @wrapped_exception, msg, @response = exc_msg_and_response(exc, response) - return msg - end - - exc.to_s - end - - # Pulls out potential parent exception and response hash. - def exc_msg_and_response(exc, response = nil) - return [exc, exc.message, response] if exc.respond_to?(:backtrace) - - return [nil, "the server responded with status #{exc[:status]}", exc] \ - if exc.respond_to?(:each_key) - - [nil, exc.to_s, response] - end - end - - # Faraday client error class. Represents 4xx status responses. - class ClientError < Error - end - - # Raised by Faraday::Response::RaiseError in case of a 400 response. - class BadRequestError < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 401 response. - class UnauthorizedError < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 403 response. - class ForbiddenError < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 404 response. - class ResourceNotFound < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 407 response. - class ProxyAuthError < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 408 response. - class RequestTimeoutError < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 409 response. - class ConflictError < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 422 response. - class UnprocessableEntityError < ClientError - end - - # Raised by Faraday::Response::RaiseError in case of a 429 response. - class TooManyRequestsError < ClientError - end - - # Faraday server error class. Represents 5xx status responses. - class ServerError < Error - end - - # A unified client error for timeouts. - class TimeoutError < ServerError - def initialize(exc = 'timeout', response = nil) - super(exc, response) - end - end - - # Raised by Faraday::Response::RaiseError in case of a nil status in response. - class NilStatusError < ServerError - def initialize(exc, response = nil) - exc_msg_and_response!(exc, response) - super('http status could not be derived from the server response') - end - end - - # A unified error for failed connections. - class ConnectionFailed < Error - end - - # A unified client error for SSL errors. - class SSLError < Error - end - - # Raised by middlewares that parse the response, like the JSON response middleware. - class ParsingError < Error - end - - # Raised by Faraday::Middleware and subclasses when invalid default_options are used - class InitializationError < Error - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/logging/formatter.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/logging/formatter.rb deleted file mode 100644 index 2fd4bb1d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/logging/formatter.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -require 'pp' # This require is necessary for Hash#pretty_inspect to work, do not remove it, people rely on it. - -module Faraday - module Logging - # Serves as an integration point to customize logging - class Formatter - extend Forwardable - - DEFAULT_OPTIONS = { headers: true, bodies: false, errors: false, - log_level: :info }.freeze - - def initialize(logger:, options:) - @logger = logger - @options = DEFAULT_OPTIONS.merge(options) - unless %i[debug info warn error fatal].include?(@options[:log_level]) - @options[:log_level] = :info - end - @filter = [] - end - - def_delegators :@logger, :debug, :info, :warn, :error, :fatal - - def request(env) - public_send(log_level) do - "request: #{env.method.upcase} #{apply_filters(env.url.to_s)}" - end - - log_headers('request', env.request_headers) if log_headers?(:request) - log_body('request', env[:body]) if env[:body] && log_body?(:request) - end - - def response(env) - public_send(log_level) { "response: Status #{env.status}" } - - log_headers('response', env.response_headers) if log_headers?(:response) - log_body('response', env[:body]) if env[:body] && log_body?(:response) - end - - def exception(exc) - return unless log_errors? - - public_send(log_level) { "error: #{exc.full_message}" } - - log_headers('error', exc.response_headers) if exc.respond_to?(:response_headers) && log_headers?(:error) - return unless exc.respond_to?(:response_body) && exc.response_body && log_body?(:error) - - log_body('error', exc.response_body) - end - - def filter(filter_word, filter_replacement) - @filter.push([filter_word, filter_replacement]) - end - - private - - def dump_headers(headers) - return if headers.nil? - - headers.map { |k, v| "#{k}: #{v.inspect}" }.join("\n") - end - - def dump_body(body) - if body.respond_to?(:to_str) - body.to_str - else - pretty_inspect(body) - end - end - - def pretty_inspect(body) - body.pretty_inspect - end - - def log_headers?(type) - case @options[:headers] - when Hash - @options[:headers][type] - else - @options[:headers] - end - end - - def log_body?(type) - case @options[:bodies] - when Hash - @options[:bodies][type] - else - @options[:bodies] - end - end - - def log_errors? - @options[:errors] - end - - def apply_filters(output) - @filter.each do |pattern, replacement| - output = output.to_s.gsub(pattern, replacement) - end - output - end - - def log_level - @options[:log_level] - end - - def log_headers(type, headers) - public_send(log_level) { "#{type}: #{apply_filters(dump_headers(headers))}" } - end - - def log_body(type, body) - public_send(log_level) { "#{type}: #{apply_filters(dump_body(body))}" } - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/methods.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/methods.rb deleted file mode 100644 index 53e39037..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/methods.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -module Faraday - METHODS_WITH_QUERY = %w[get head delete trace].freeze - METHODS_WITH_BODY = %w[post put patch].freeze -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/middleware.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/middleware.rb deleted file mode 100644 index 52d8287b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/middleware.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -require 'monitor' - -module Faraday - # Middleware is the basic base class of any Faraday middleware. - class Middleware - extend MiddlewareRegistry - - attr_reader :app, :options - - DEFAULT_OPTIONS = {}.freeze - LOCK = Mutex.new - - def initialize(app = nil, options = {}) - @app = app - @options = self.class.default_options.merge(options) - end - - class << self - # Faraday::Middleware::default_options= allows user to set default options at the Faraday::Middleware - # class level. - # - # @example Set the Faraday::Response::RaiseError option, `include_request` to `false` - # my_app/config/initializers/my_faraday_middleware.rb - # - # Faraday::Response::RaiseError.default_options = { include_request: false } - # - def default_options=(options = {}) - validate_default_options(options) - LOCK.synchronize do - @default_options = default_options.merge(options) - end - end - - # default_options attr_reader that initializes class instance variable - # with the values of any Faraday::Middleware defaults, and merges with - # subclass defaults - def default_options - @default_options ||= DEFAULT_OPTIONS.merge(self::DEFAULT_OPTIONS) - end - - private - - def validate_default_options(options) - invalid_keys = options.keys.reject { |opt| self::DEFAULT_OPTIONS.key?(opt) } - return unless invalid_keys.any? - - raise(Faraday::InitializationError, - "Invalid options provided. Keys not found in #{self}::DEFAULT_OPTIONS: #{invalid_keys.join(', ')}") - end - end - - def call(env) - on_request(env) if respond_to?(:on_request) - app.call(env).on_complete do |environment| - on_complete(environment) if respond_to?(:on_complete) - end - rescue StandardError => e - on_error(e) if respond_to?(:on_error) - raise - end - - def close - if app.respond_to?(:close) - app.close - else - warn "#{app} does not implement \#close!" - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/middleware_registry.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/middleware_registry.rb deleted file mode 100644 index fc70e2b8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/middleware_registry.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -require 'monitor' - -module Faraday - # Adds the ability for other modules to register and lookup - # middleware classes. - module MiddlewareRegistry - def registered_middleware - @registered_middleware ||= {} - end - - # Register middleware class(es) on the current module. - # - # @param mappings [Hash] Middleware mappings from a lookup symbol to a middleware class. - # @return [void] - # - # @example Lookup by a constant - # - # module Faraday - # class Whatever < Middleware - # # Middleware looked up by :foo returns Faraday::Whatever::Foo. - # register_middleware(foo: Whatever) - # end - # end - def register_middleware(**mappings) - middleware_mutex do - registered_middleware.update(mappings) - end - end - - # Unregister a previously registered middleware class. - # - # @param key [Symbol] key for the registered middleware. - def unregister_middleware(key) - registered_middleware.delete(key) - end - - # Lookup middleware class with a registered Symbol shortcut. - # - # @param key [Symbol] key for the registered middleware. - # @return [Class] a middleware Class. - # @raise [Faraday::Error] if given key is not registered - # - # @example - # - # module Faraday - # class Whatever < Middleware - # register_middleware(foo: Whatever) - # end - # end - # - # Faraday::Middleware.lookup_middleware(:foo) - # # => Faraday::Whatever - def lookup_middleware(key) - load_middleware(key) || - raise(Faraday::Error, "#{key.inspect} is not registered on #{self}") - end - - private - - def middleware_mutex(&block) - @middleware_mutex ||= Monitor.new - @middleware_mutex.synchronize(&block) - end - - def load_middleware(key) - value = registered_middleware[key] - case value - when Module - value - when Symbol, String - middleware_mutex do - @registered_middleware[key] = const_get(value) - end - when Proc - middleware_mutex do - @registered_middleware[key] = value.call - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options.rb deleted file mode 100644 index b3e0dea1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options.rb +++ /dev/null @@ -1,219 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # Subclasses Struct with some special helpers for converting from a Hash to - # a Struct. - class Options < Struct - # Public - def self.from(value) - value ? new.update(value) : new - end - - # Public - def each - return to_enum(:each) unless block_given? - - members.each do |key| - yield(key.to_sym, send(key)) - end - end - - # Public - def update(obj) - obj.each do |key, value| - sub_options = self.class.options_for(key) - if sub_options - new_value = sub_options.from(value) if value - elsif value.is_a?(Hash) - new_value = value.dup - else - new_value = value - end - - send(:"#{key}=", new_value) unless new_value.nil? - end - self - end - - # Public - def delete(key) - value = send(key) - send(:"#{key}=", nil) - value - end - - # Public - def clear - members.each { |member| delete(member) } - end - - # Public - def merge!(other) - other.each do |key, other_value| - self_value = send(key) - sub_options = self.class.options_for(key) - new_value = if self_value && sub_options && other_value - self_value.merge(other_value) - else - other_value - end - send(:"#{key}=", new_value) unless new_value.nil? - end - self - end - - # Public - def merge(other) - dup.merge!(other) - end - - # Public - def deep_dup - self.class.from(self) - end - - # Public - def fetch(key, *args) - unless symbolized_key_set.include?(key.to_sym) - key_setter = "#{key}=" - if !args.empty? - send(key_setter, args.first) - elsif block_given? - send(key_setter, yield(key)) - else - raise self.class.fetch_error_class, "key not found: #{key.inspect}" - end - end - send(key) - end - - # Public - def values_at(*keys) - keys.map { |key| send(key) } - end - - # Public - def keys - members.reject { |member| send(member).nil? } - end - - # Public - def empty? - keys.empty? - end - - # Public - def each_key(&block) - return to_enum(:each_key) unless block - - keys.each(&block) - end - - # Public - def key?(key) - keys.include?(key) - end - - alias has_key? key? - - # Public - def each_value(&block) - return to_enum(:each_value) unless block - - values.each(&block) - end - - # Public - def value?(value) - values.include?(value) - end - - alias has_value? value? - - # Public - def to_hash - hash = {} - members.each do |key| - value = send(key) - hash[key.to_sym] = value unless value.nil? - end - hash - end - - # Internal - def inspect - values = [] - members.each do |member| - value = send(member) - values << "#{member}=#{value.inspect}" if value - end - values = values.empty? ? '(empty)' : values.join(', ') - - %(#<#{self.class} #{values}>) - end - - # Internal - def self.options(mapping) - attribute_options.update(mapping) - end - - # Internal - def self.options_for(key) - attribute_options[key] - end - - # Internal - def self.attribute_options - @attribute_options ||= {} - end - - def self.memoized(key, &block) - unless block - raise ArgumentError, '#memoized must be called with a block' - end - - memoized_attributes[key.to_sym] = block - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - remove_method(key) if method_defined?(key, false) - def #{key}() self[:#{key}]; end - RUBY - end - - def self.memoized_attributes - @memoized_attributes ||= {} - end - - def [](key) - key = key.to_sym - if (method = self.class.memoized_attributes[key]) - super(key) || (self[key] = instance_eval(&method)) - else - super - end - end - - def symbolized_key_set - @symbolized_key_set ||= Set.new(keys.map(&:to_sym)) - end - - def self.inherited(subclass) - super - subclass.attribute_options.update(attribute_options) - subclass.memoized_attributes.update(memoized_attributes) - end - - def self.fetch_error_class - @fetch_error_class ||= if Object.const_defined?(:KeyError) - ::KeyError - else - ::IndexError - end - end - end -end - -require 'faraday/options/request_options' -require 'faraday/options/ssl_options' -require 'faraday/options/proxy_options' -require 'faraday/options/connection_options' -require 'faraday/options/env' diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/connection_options.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/connection_options.rb deleted file mode 100644 index 0698940b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/connection_options.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # @!parse - # # ConnectionOptions contains the configurable properties for a Faraday - # # connection object. - # class ConnectionOptions < Options; end - ConnectionOptions = Options.new(:request, :proxy, :ssl, :builder, :url, - :parallel_manager, :params, :headers, - :builder_class) do - options request: RequestOptions, ssl: SSLOptions - - memoized(:request) { self.class.options_for(:request).new } - - memoized(:ssl) { self.class.options_for(:ssl).new } - - memoized(:builder_class) { RackBuilder } - - def new_builder(block) - builder_class.new(&block) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/env.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/env.rb deleted file mode 100644 index 63d814bb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/env.rb +++ /dev/null @@ -1,204 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # @!parse - # # @!attribute method - # # @return [Symbol] HTTP method (`:get`, `:post`) - # # - # # @!attribute body - # # @return [String] The request body that will eventually be converted to a - # # string. - # # - # # @!attribute url - # # @return [URI] URI instance for the current request. - # # - # # @!attribute request - # # @return [Hash] options for configuring the request. - # # Options for configuring the request. - # # - # # - `:timeout` - time limit for the entire request (Integer in - # # seconds) - # # - `:open_timeout` - time limit for just the connection phase (e.g. - # # handshake) (Integer in seconds) - # # - `:read_timeout` - time limit for the first response byte received from - # # the server (Integer in seconds) - # # - `:write_timeout` - time limit for the client to send the request to the - # # server (Integer in seconds) - # # - `:on_data` - Proc for streaming - # # - `:proxy` - Hash of proxy options - # # - `:uri` - Proxy server URI - # # - `:user` - Proxy server username - # # - `:password` - Proxy server password - # # - # # @!attribute request_headers - # # @return [Hash] HTTP Headers to be sent to the server. - # # - # # @!attribute ssl - # # @return [Hash] options for configuring SSL requests - # # - # # @!attribute parallel_manager - # # @return [Object] sent if the connection is in parallel mode - # # - # # @!attribute params - # # @return [Hash] - # # - # # @!attribute response - # # @return [Response] - # # - # # @!attribute response_headers - # # @return [Hash] HTTP headers from the server - # # - # # @!attribute status - # # @return [Integer] HTTP response status code - # # - # # @!attribute reason_phrase - # # @return [String] - # class Env < Options; end - Env = Options.new(:method, :request_body, :url, :request, - :request_headers, :ssl, :parallel_manager, :params, - :response, :response_headers, :status, - :reason_phrase, :response_body) do - const_set(:ContentLength, 'Content-Length') - const_set(:StatusesWithoutBody, Set.new([204, 304])) - const_set(:SuccessfulStatuses, 200..299) - - # A Set of HTTP verbs that typically send a body. If no body is set for - # these requests, the Content-Length header is set to 0. - const_set(:MethodsWithBodies, Set.new(Faraday::METHODS_WITH_BODY.map(&:to_sym))) - - options request: RequestOptions, - request_headers: Utils::Headers, response_headers: Utils::Headers - - extend Forwardable - - def_delegators :request, :params_encoder - - # Build a new Env from given value. Respects and updates `custom_members`. - # - # @param value [Object] a value fitting Option.from(v). - # @return [Env] from given value - def self.from(value) - env = super(value) - if value.respond_to?(:custom_members) - env.custom_members.update(value.custom_members) - end - env - end - - # @param key [Object] - def [](key) - return self[current_body] if key == :body - - if in_member_set?(key) - super(key) - else - custom_members[key] - end - end - - # @param key [Object] - # @param value [Object] - def []=(key, value) - if key == :body - super(current_body, value) - return - end - - if in_member_set?(key) - super(key, value) - else - custom_members[key] = value - end - end - - def current_body - !!status ? :response_body : :request_body - end - - def body - self[:body] - end - - def body=(value) - self[:body] = value - end - - # @return [Boolean] true if status is in the set of {SuccessfulStatuses}. - def success? - Env::SuccessfulStatuses.include?(status) - end - - # @return [Boolean] true if there's no body yet, and the method is in the - # set of {Env::MethodsWithBodies}. - def needs_body? - !body && Env::MethodsWithBodies.include?(method) - end - - # Sets content length to zero and the body to the empty string. - def clear_body - request_headers[Env::ContentLength] = '0' - self.body = +'' - end - - # @return [Boolean] true if the status isn't in the set of - # {Env::StatusesWithoutBody}. - def parse_body? - !Env::StatusesWithoutBody.include?(status) - end - - # @return [Boolean] true if there is a parallel_manager - def parallel? - !!parallel_manager - end - - def inspect - attrs = [nil] - members.each do |mem| - if (value = send(mem)) - attrs << "@#{mem}=#{value.inspect}" - end - end - attrs << "@custom=#{custom_members.inspect}" unless custom_members.empty? - %(#<#{self.class}#{attrs.join(' ')}>) - end - - def stream_response? - request.stream_response? - end - - def stream_response(&block) - size = 0 - yielded = false - block_result = block.call do |chunk| - if chunk.bytesize.positive? || size.positive? - yielded = true - size += chunk.bytesize - request.on_data.call(chunk, size, self) - end - end - request.on_data.call(+'', 0, self) unless yielded - block_result - end - - # @private - def custom_members - @custom_members ||= {} - end - - # @private - if members.first.is_a?(Symbol) - def in_member_set?(key) - self.class.member_set.include?(key.to_sym) - end - else - def in_member_set?(key) - self.class.member_set.include?(key.to_s) - end - end - - # @private - def self.member_set - @member_set ||= Set.new(members) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/proxy_options.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/proxy_options.rb deleted file mode 100644 index 028f3d2a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/proxy_options.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # @!parse - # # ProxyOptions contains the configurable properties for the proxy - # # configuration used when making an HTTP request. - # class ProxyOptions < Options; end - ProxyOptions = Options.new(:uri, :user, :password) do - extend Forwardable - def_delegators :uri, :scheme, :scheme=, :host, :host=, :port, :port=, - :path, :path= - - def self.from(value) - case value - when '' - value = nil - when String - # URIs without a scheme should default to http (like 'example:123'). - # This fixes #1282 and prevents a silent failure in some adapters. - value = "http://#{value}" unless value.include?('://') - value = { uri: Utils.URI(value) } - when URI - value = { uri: value } - when Hash, Options - if value[:uri] - value = value.dup.tap do |duped| - duped[:uri] = Utils.URI(duped[:uri]) - end - end - end - - super(value) - end - - memoized(:user) { uri&.user && Utils.unescape(uri.user) } - memoized(:password) { uri&.password && Utils.unescape(uri.password) } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/request_options.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/request_options.rb deleted file mode 100644 index 3bb67c8e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/request_options.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # @!parse - # # RequestOptions contains the configurable properties for a Faraday request. - # class RequestOptions < Options; end - RequestOptions = Options.new(:params_encoder, :proxy, :bind, - :timeout, :open_timeout, :read_timeout, - :write_timeout, :boundary, :oauth, - :context, :on_data) do - def []=(key, value) - if key && key.to_sym == :proxy - super(key, value ? ProxyOptions.from(value) : nil) - else - super(key, value) - end - end - - def stream_response? - on_data.is_a?(Proc) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/ssl_options.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/ssl_options.rb deleted file mode 100644 index 71eef15c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/options/ssl_options.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # @!parse - # # SSL-related options. - # # - # # @!attribute verify - # # @return [Boolean] whether to verify SSL certificates or not - # # - # # @!attribute verify_hostname - # # @return [Boolean] whether to enable hostname verification on server certificates - # # during the handshake or not (see https://github.com/ruby/openssl/pull/60) - # # - # # @!attribute hostname - # # @return [String] Server hostname used for SNI (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLSocket.html#method-i-hostname-3D) - # # - # # @!attribute ca_file - # # @return [String] CA file - # # - # # @!attribute ca_path - # # @return [String] CA path - # # - # # @!attribute verify_mode - # # @return [Integer] Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html) - # # - # # @!attribute cert_store - # # @return [OpenSSL::X509::Store] certificate store - # # - # # @!attribute client_cert - # # @return [String, OpenSSL::X509::Certificate] client certificate - # # - # # @!attribute client_key - # # @return [String, OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] client key - # # - # # @!attribute certificate - # # @return [OpenSSL::X509::Certificate] certificate (Excon only) - # # - # # @!attribute private_key - # # @return [OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] private key (Excon only) - # # - # # @!attribute verify_depth - # # @return [Integer] maximum depth for the certificate chain verification - # # - # # @!attribute version - # # @return [String, Symbol] SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D) - # # - # # @!attribute min_version - # # @return [String, Symbol] minimum SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D) - # # - # # @!attribute max_version - # # @return [String, Symbol] maximum SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D) - # # - # # @!attribute ciphers - # # @return [String] cipher list in OpenSSL format (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-ciphers-3D) - # class SSLOptions < Options; end - SSLOptions = Options.new(:verify, :verify_hostname, :hostname, - :ca_file, :ca_path, :verify_mode, - :cert_store, :client_cert, :client_key, - :certificate, :private_key, :verify_depth, - :version, :min_version, :max_version, :ciphers) do - # @return [Boolean] true if should verify - def verify? - verify != false - end - - # @return [Boolean] true if should not verify - def disable? - !verify? - end - - # @return [Boolean] true if should verify_hostname - def verify_hostname? - verify_hostname != false - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/parameters.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/parameters.rb deleted file mode 100644 index cfb35d08..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/parameters.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -require 'forwardable' -require 'faraday/encoders/nested_params_encoder' -require 'faraday/encoders/flat_params_encoder' diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/rack_builder.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/rack_builder.rb deleted file mode 100644 index cde394f9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/rack_builder.rb +++ /dev/null @@ -1,252 +0,0 @@ -# frozen_string_literal: true - -require 'faraday/adapter_registry' - -module Faraday - # A Builder that processes requests into responses by passing through an inner - # middleware stack (heavily inspired by Rack). - # - # @example - # Faraday::Connection.new(url: 'http://httpbingo.org') do |builder| - # builder.request :url_encoded # Faraday::Request::UrlEncoded - # builder.adapter :net_http # Faraday::Adapter::NetHttp - # end - class RackBuilder - # Used to detect missing arguments - NO_ARGUMENT = Object.new - - attr_accessor :handlers - - # Error raised when trying to modify the stack after calling `lock!` - class StackLocked < RuntimeError; end - - # borrowed from ActiveSupport::Dependencies::Reference & - # ActionDispatch::MiddlewareStack::Middleware - class Handler - REGISTRY = Faraday::AdapterRegistry.new - - attr_reader :name - - def initialize(klass, *args, **kwargs, &block) - @name = klass.to_s - REGISTRY.set(klass) if klass.respond_to?(:name) - @args = args - @kwargs = kwargs - @block = block - end - - def klass - REGISTRY.get(@name) - end - - def inspect - @name - end - - def ==(other) - if other.is_a? Handler - name == other.name - elsif other.respond_to? :name - klass == other - else - @name == other.to_s - end - end - - def build(app = nil) - klass.new(app, *@args, **@kwargs, &@block) - end - end - - def initialize(&block) - @adapter = nil - @handlers = [] - build(&block) - end - - def initialize_dup(original) - super - @adapter = original.adapter - @handlers = original.handlers.dup - end - - def build - raise_if_locked - block_given? ? yield(self) : request(:url_encoded) - adapter(Faraday.default_adapter, **Faraday.default_adapter_options) unless @adapter - end - - def [](idx) - @handlers[idx] - end - - # Locks the middleware stack to ensure no further modifications are made. - def lock! - @handlers.freeze - end - - def locked? - @handlers.frozen? - end - - def use(klass, ...) - if klass.is_a? Symbol - use_symbol(Faraday::Middleware, klass, ...) - else - raise_if_locked - raise_if_adapter(klass) - @handlers << self.class::Handler.new(klass, ...) - end - end - - def request(key, ...) - use_symbol(Faraday::Request, key, ...) - end - - def response(...) - use_symbol(Faraday::Response, ...) - end - - def adapter(klass = NO_ARGUMENT, *args, **kwargs, &block) - return @adapter if klass == NO_ARGUMENT || klass.nil? - - klass = Faraday::Adapter.lookup_middleware(klass) if klass.is_a?(Symbol) - @adapter = self.class::Handler.new(klass, *args, **kwargs, &block) - end - - ## methods to push onto the various positions in the stack: - - def insert(index, ...) - raise_if_locked - index = assert_index(index) - handler = self.class::Handler.new(...) - @handlers.insert(index, handler) - end - - alias insert_before insert - - def insert_after(index, ...) - index = assert_index(index) - insert(index + 1, ...) - end - - def swap(index, ...) - raise_if_locked - index = assert_index(index) - @handlers.delete_at(index) - insert(index, ...) - end - - def delete(handler) - raise_if_locked - @handlers.delete(handler) - end - - # Processes a Request into a Response by passing it through this Builder's - # middleware stack. - # - # @param connection [Faraday::Connection] - # @param request [Faraday::Request] - # - # @return [Faraday::Response] - def build_response(connection, request) - app.call(build_env(connection, request)) - end - - # The "rack app" wrapped in middleware. All requests are sent here. - # - # The builder is responsible for creating the app object. After this, - # the builder gets locked to ensure no further modifications are made - # to the middleware stack. - # - # Returns an object that responds to `call` and returns a Response. - def app - @app ||= begin - lock! - ensure_adapter! - to_app - end - end - - def to_app - # last added handler is the deepest and thus closest to the inner app - # adapter is always the last one - @handlers.reverse.inject(@adapter.build) do |app, handler| - handler.build(app) - end - end - - def ==(other) - other.is_a?(self.class) && - @handlers == other.handlers && - @adapter == other.adapter - end - - # ENV Keys - # :http_method - a symbolized request HTTP method (:get, :post) - # :body - the request body that will eventually be converted to a string. - # :url - URI instance for the current request. - # :status - HTTP response status code - # :request_headers - hash of HTTP Headers to be sent to the server - # :response_headers - Hash of HTTP headers from the server - # :parallel_manager - sent if the connection is in parallel mode - # :request - Hash of options for configuring the request. - # :timeout - open/read timeout Integer in seconds - # :open_timeout - read timeout Integer in seconds - # :proxy - Hash of proxy options - # :uri - Proxy Server URI - # :user - Proxy server username - # :password - Proxy server password - # :ssl - Hash of options for configuring SSL requests. - def build_env(connection, request) - exclusive_url = connection.build_exclusive_url( - request.path, request.params, - request.options.params_encoder - ) - - Env.new(request.http_method, request.body, exclusive_url, - request.options, request.headers, connection.ssl, - connection.parallel_manager) - end - - private - - LOCK_ERR = "can't modify middleware stack after making a request" - MISSING_ADAPTER_ERROR = "An attempt to run a request with a Faraday::Connection without adapter has been made.\n" \ - "Please set Faraday.default_adapter or provide one when initializing the connection.\n" \ - 'For more info, check https://lostisland.github.io/faraday/usage/.' - - def raise_if_locked - raise StackLocked, LOCK_ERR if locked? - end - - def raise_if_adapter(klass) - return unless is_adapter?(klass) - - raise 'Adapter should be set using the `adapter` method, not `use`' - end - - def ensure_adapter! - raise MISSING_ADAPTER_ERROR unless @adapter - end - - def adapter_set? - !@adapter.nil? - end - - def is_adapter?(klass) # rubocop:disable Naming/PredicateName - klass <= Faraday::Adapter - end - - def use_symbol(mod, key, ...) - use(mod.lookup_middleware(key), ...) - end - - def assert_index(index) - idx = index.is_a?(Integer) ? index : @handlers.index(index) - raise "No such handler: #{index.inspect}" unless idx - - idx - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request.rb deleted file mode 100644 index 8c5bf952..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true - -module Faraday - # Used to setup URLs, params, headers, and the request body in a sane manner. - # - # @example - # @connection.post do |req| - # req.url 'http://localhost', 'a' => '1' # 'http://localhost?a=1' - # req.headers['b'] = '2' # Header - # req.params['c'] = '3' # GET Param - # req['b'] = '2' # also Header - # req.body = 'abc' - # end - # - # @!attribute http_method - # @return [Symbol] the HTTP method of the Request - # @!attribute path - # @return [URI, String] the path - # @!attribute params - # @return [Hash] query parameters - # @!attribute headers - # @return [Faraday::Utils::Headers] headers - # @!attribute body - # @return [String] body - # @!attribute options - # @return [RequestOptions] options - Request = Struct.new(:http_method, :path, :params, :headers, :body, :options) do - extend MiddlewareRegistry - - alias_method :member_get, :[] - private :member_get - alias_method :member_set, :[]= - private :member_set - - # @param request_method [String] - # @yield [request] for block customization, if block given - # @yieldparam request [Request] - # @return [Request] - def self.create(request_method) - new(request_method).tap do |request| - yield(request) if block_given? - end - end - - remove_method :params= - # Replace params, preserving the existing hash type. - # - # @param hash [Hash] new params - def params=(hash) - if params - params.replace hash - else - member_set(:params, hash) - end - end - - remove_method :headers= - # Replace request headers, preserving the existing hash type. - # - # @param hash [Hash] new headers - def headers=(hash) - if headers - headers.replace hash - else - member_set(:headers, hash) - end - end - - # Update path and params. - # - # @param path [URI, String] - # @param params [Hash, nil] - # @return [void] - def url(path, params = nil) - if path.respond_to? :query - if (query = path.query) - path = path.dup - path.query = nil - end - else - anchor_index = path.index('#') - path = path.slice(0, anchor_index) unless anchor_index.nil? - path, query = path.split('?', 2) - end - self.path = path - self.params.merge_query query, options.params_encoder - self.params.update(params) if params - end - - # @param key [Object] key to look up in headers - # @return [Object] value of the given header name - def [](key) - headers[key] - end - - # @param key [Object] key of header to write - # @param value [Object] value of header - def []=(key, value) - headers[key] = value - end - - # Marshal serialization support. - # - # @return [Hash] the hash ready to be serialized in Marshal. - def marshal_dump - { - http_method: http_method, - body: body, - headers: headers, - path: path, - params: params, - options: options - } - end - - # Marshal serialization support. - # Restores the instance variables according to the +serialised+. - # @param serialised [Hash] the serialised object. - def marshal_load(serialised) - self.http_method = serialised[:http_method] - self.body = serialised[:body] - self.headers = serialised[:headers] - self.path = serialised[:path] - self.params = serialised[:params] - self.options = serialised[:options] - end - - # @return [Env] the Env for this Request - def to_env(connection) - Env.new(http_method, body, connection.build_exclusive_url(path, params), - options, headers, connection.ssl, connection.parallel_manager) - end - end -end - -require 'faraday/request/authorization' -require 'faraday/request/instrumentation' -require 'faraday/request/json' -require 'faraday/request/url_encoded' diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/authorization.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/authorization.rb deleted file mode 100644 index 43732432..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/authorization.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -module Faraday - class Request - # Request middleware for the Authorization HTTP header - class Authorization < Faraday::Middleware - KEY = 'Authorization' - - # @param app [#call] - # @param type [String, Symbol] Type of Authorization - # @param params [Array] parameters to build the Authorization header. - # If the type is `:basic`, then these can be a login and password pair. - # Otherwise, a single value is expected that will be appended after the type. - # This value can be a proc or an object responding to `.call`, in which case - # it will be invoked on each request. - def initialize(app, type, *params) - @type = type - @params = params - super(app) - end - - # @param env [Faraday::Env] - def on_request(env) - return if env.request_headers[KEY] - - env.request_headers[KEY] = header_from(@type, env, *@params) - end - - private - - # @param type [String, Symbol] - # @param env [Faraday::Env] - # @param params [Array] - # @return [String] a header value - def header_from(type, env, *params) - if type.to_s.casecmp('basic').zero? && params.size == 2 - Utils.basic_header_from(*params) - elsif params.size != 1 - raise ArgumentError, "Unexpected params received (got #{params.size} instead of 1)" - else - value = params.first - if (value.is_a?(Proc) && value.arity == 1) || (value.respond_to?(:call) && value.method(:call).arity == 1) - value = value.call(env) - elsif value.is_a?(Proc) || value.respond_to?(:call) - value = value.call - end - "#{type} #{value}" - end - end - end - end -end - -Faraday::Request.register_middleware(authorization: Faraday::Request::Authorization) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/instrumentation.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/instrumentation.rb deleted file mode 100644 index a5020598..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/instrumentation.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -module Faraday - class Request - # Middleware for instrumenting Requests. - class Instrumentation < Faraday::Middleware - # Options class used in Request::Instrumentation class. - Options = Faraday::Options.new(:name, :instrumenter) do - remove_method :name - # @return [String] - def name - self[:name] ||= 'request.faraday' - end - - remove_method :instrumenter - # @return [Class] - def instrumenter - self[:instrumenter] ||= ActiveSupport::Notifications - end - end - - # Instruments requests using Active Support. - # - # Measures time spent only for synchronous requests. - # - # @example Using ActiveSupport::Notifications to measure time spent - # for Faraday requests. - # ActiveSupport::Notifications - # .subscribe('request.faraday') do |name, starts, ends, _, env| - # url = env[:url] - # http_method = env[:method].to_s.upcase - # duration = ends - starts - # $stderr.puts '[%s] %s %s (%.3f s)' % - # [url.host, http_method, url.request_uri, duration] - # end - # @param app [#call] - # @param options [nil, Hash] Options hash - # @option options [String] :name ('request.faraday') - # Name of the instrumenter - # @option options [Class] :instrumenter (ActiveSupport::Notifications) - # Active Support instrumenter class. - def initialize(app, options = nil) - super(app) - @name, @instrumenter = Options.from(options) - .values_at(:name, :instrumenter) - end - - # @param env [Faraday::Env] - def call(env) - @instrumenter.instrument(@name, env) do - @app.call(env) - end - end - end - end -end - -Faraday::Request.register_middleware(instrumentation: Faraday::Request::Instrumentation) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/json.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/json.rb deleted file mode 100644 index f12ebe29..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/json.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -require 'json' - -module Faraday - class Request - # Request middleware that encodes the body as JSON. - # - # Processes only requests with matching Content-type or those without a type. - # If a request doesn't have a type but has a body, it sets the Content-type - # to JSON MIME-type. - # - # Doesn't try to encode bodies that already are in string form. - class Json < Middleware - MIME_TYPE = 'application/json' - MIME_TYPE_REGEX = %r{^application/(vnd\..+\+)?json$} - - def on_request(env) - match_content_type(env) do |data| - env[:body] = encode(data) - end - end - - private - - def encode(data) - if options[:encoder].is_a?(Array) && options[:encoder].size >= 2 - options[:encoder][0].public_send(options[:encoder][1], data) - elsif options[:encoder].respond_to?(:dump) - options[:encoder].dump(data) - else - ::JSON.generate(data) - end - end - - def match_content_type(env) - return unless process_request?(env) - - env[:request_headers][CONTENT_TYPE] ||= MIME_TYPE - yield env[:body] unless env[:body].respond_to?(:to_str) - end - - def process_request?(env) - type = request_type(env) - body?(env) && (type.empty? || type.match?(MIME_TYPE_REGEX)) - end - - def body?(env) - body = env[:body] - case body - when true, false - true - when nil - # NOTE: nil can be converted to `"null"`, but this middleware doesn't process `nil` for the compatibility. - false - else - !(body.respond_to?(:to_str) && body.empty?) - end - end - - def request_type(env) - type = env[:request_headers][CONTENT_TYPE].to_s - type = type.split(';', 2).first if type.index(';') - type - end - end - end -end - -Faraday::Request.register_middleware(json: Faraday::Request::Json) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/url_encoded.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/url_encoded.rb deleted file mode 100644 index 5ac7dcb3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/request/url_encoded.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -module Faraday - class Request - # Middleware for supporting urlencoded requests. - class UrlEncoded < Faraday::Middleware - unless defined?(::Faraday::Request::UrlEncoded::CONTENT_TYPE) - CONTENT_TYPE = 'Content-Type' - end - - class << self - attr_accessor :mime_type - end - self.mime_type = 'application/x-www-form-urlencoded' - - # Encodes as "application/x-www-form-urlencoded" if not already encoded or - # of another type. - # - # @param env [Faraday::Env] - def call(env) - match_content_type(env) do |data| - params = Faraday::Utils::ParamsHash[data] - env.body = params.to_query(env.params_encoder) - end - @app.call env - end - - # @param env [Faraday::Env] - # @yield [request_body] Body of the request - def match_content_type(env) - return unless process_request?(env) - - env.request_headers[CONTENT_TYPE] ||= self.class.mime_type - return if env.body.respond_to?(:to_str) || env.body.respond_to?(:read) - - yield(env.body) - end - - # @param env [Faraday::Env] - # - # @return [Boolean] True if the request has a body and its Content-Type is - # urlencoded. - def process_request?(env) - type = request_type(env) - env.body && (type.empty? || (type == self.class.mime_type)) - end - - # @param env [Faraday::Env] - # - # @return [String] - def request_type(env) - type = env.request_headers[CONTENT_TYPE].to_s - type = type.split(';', 2).first if type.index(';') - type - end - end - end -end - -Faraday::Request.register_middleware(url_encoded: Faraday::Request::UrlEncoded) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response.rb deleted file mode 100644 index d1fa9320..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -require 'forwardable' - -module Faraday - # Response represents an HTTP response from making an HTTP request. - class Response - extend Forwardable - extend MiddlewareRegistry - - def initialize(env = nil) - @env = Env.from(env) if env - @on_complete_callbacks = [] - end - - attr_reader :env - - def status - finished? ? env.status : nil - end - - def reason_phrase - finished? ? env.reason_phrase : nil - end - - def headers - finished? ? env.response_headers : {} - end - - def_delegator :headers, :[] - - def body - finished? ? env.body : nil - end - - def finished? - !!env - end - - def on_complete(&block) - if finished? - yield(env) - else - @on_complete_callbacks << block - end - self - end - - def finish(env) - raise 'response already finished' if finished? - - @env = env.is_a?(Env) ? env : Env.from(env) - @on_complete_callbacks.each { |callback| callback.call(@env) } - self - end - - def success? - finished? && env.success? - end - - def to_hash - { - status: env.status, body: env.body, - response_headers: env.response_headers, - url: env.url - } - end - - # because @on_complete_callbacks cannot be marshalled - def marshal_dump - finished? ? to_hash : nil - end - - def marshal_load(env) - @env = Env.from(env) - end - - # Expand the env with more properties, without overriding existing ones. - # Useful for applying request params after restoring a marshalled Response. - def apply_request(request_env) - raise "response didn't finish yet" unless finished? - - @env = Env.from(request_env).update(@env) - self - end - end -end - -require 'faraday/response/json' -require 'faraday/response/logger' -require 'faraday/response/raise_error' diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/json.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/json.rb deleted file mode 100644 index 71a57edb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/json.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -require 'json' - -module Faraday - class Response - # Parse response bodies as JSON. - class Json < Middleware - def initialize(app = nil, parser_options: nil, content_type: /\bjson$/, preserve_raw: false) - super(app) - @parser_options = parser_options - @content_types = Array(content_type) - @preserve_raw = preserve_raw - - process_parser_options - end - - def on_complete(env) - process_response(env) if parse_response?(env) - end - - private - - def process_response(env) - env[:raw_body] = env[:body] if @preserve_raw - env[:body] = parse(env[:body]) - rescue StandardError, SyntaxError => e - raise Faraday::ParsingError.new(e, env[:response]) - end - - def parse(body) - return if body.strip.empty? - - decoder, method_name = @decoder_options - - decoder.public_send(method_name, body, @parser_options || {}) - end - - def parse_response?(env) - process_response_type?(env) && - env[:body].respond_to?(:to_str) - end - - def process_response_type?(env) - type = response_type(env) - @content_types.empty? || @content_types.any? do |pattern| - pattern.is_a?(Regexp) ? type.match?(pattern) : type == pattern - end - end - - def response_type(env) - type = env[:response_headers][CONTENT_TYPE].to_s - type = type.split(';', 2).first if type.index(';') - type - end - - def process_parser_options - @decoder_options = @parser_options&.delete(:decoder) - - @decoder_options = - if @decoder_options.is_a?(Array) && @decoder_options.size >= 2 - @decoder_options.slice(0, 2) - elsif @decoder_options&.respond_to?(:load) # rubocop:disable Lint/RedundantSafeNavigation - # In some versions of Rails, `nil` responds to `load` - hence the safe navigation check above - [@decoder_options, :load] - else - [::JSON, :parse] - end - end - end - end -end - -Faraday::Response.register_middleware(json: Faraday::Response::Json) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/logger.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/logger.rb deleted file mode 100644 index 94dbc92a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/logger.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -require 'forwardable' -require 'logger' -require 'faraday/logging/formatter' - -module Faraday - class Response - # Logger is a middleware that logs internal events in the HTTP request - # lifecycle to a given Logger object. By default, this logs to STDOUT. See - # Faraday::Logging::Formatter to see specifically what is logged. - class Logger < Middleware - DEFAULT_OPTIONS = { formatter: Logging::Formatter }.merge(Logging::Formatter::DEFAULT_OPTIONS).freeze - - def initialize(app, logger = nil, options = {}) - super(app, options) - logger ||= ::Logger.new($stdout) - formatter_class = @options.delete(:formatter) - @formatter = formatter_class.new(logger: logger, options: @options) - yield @formatter if block_given? - end - - def call(env) - @formatter.request(env) - super - end - - def on_complete(env) - @formatter.response(env) - end - - def on_error(exc) - @formatter.exception(exc) if @formatter.respond_to?(:exception) - end - end - end -end - -Faraday::Response.register_middleware(logger: Faraday::Response::Logger) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/raise_error.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/raise_error.rb deleted file mode 100644 index 0b543219..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/response/raise_error.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -module Faraday - class Response - # RaiseError is a Faraday middleware that raises exceptions on common HTTP - # client or server error responses. - class RaiseError < Middleware - # rubocop:disable Naming/ConstantName - ClientErrorStatuses = (400...500) - ServerErrorStatuses = (500...600) - ClientErrorStatusesWithCustomExceptions = { - 400 => Faraday::BadRequestError, - 401 => Faraday::UnauthorizedError, - 403 => Faraday::ForbiddenError, - 404 => Faraday::ResourceNotFound, - 408 => Faraday::RequestTimeoutError, - 409 => Faraday::ConflictError, - 422 => Faraday::UnprocessableEntityError, - 429 => Faraday::TooManyRequestsError - }.freeze - # rubocop:enable Naming/ConstantName - - DEFAULT_OPTIONS = { include_request: true, allowed_statuses: [] }.freeze - - def on_complete(env) - return if Array(options[:allowed_statuses]).include?(env[:status]) - - case env[:status] - when *ClientErrorStatusesWithCustomExceptions.keys - raise ClientErrorStatusesWithCustomExceptions[env[:status]], response_values(env) - when 407 - # mimic the behavior that we get with proxy requests with HTTPS - msg = %(407 "Proxy Authentication Required") - raise Faraday::ProxyAuthError.new(msg, response_values(env)) - when ClientErrorStatuses - raise Faraday::ClientError, response_values(env) - when ServerErrorStatuses - raise Faraday::ServerError, response_values(env) - when nil - raise Faraday::NilStatusError, response_values(env) - end - end - - # Returns a hash of response data with the following keys: - # - status - # - headers - # - body - # - request - # - # The `request` key is omitted when the middleware is explicitly - # configured with the option `include_request: false`. - def response_values(env) - response = { - status: env.status, - headers: env.response_headers, - body: env.body - } - - # Include the request data by default. If the middleware was explicitly - # configured to _not_ include request data, then omit it. - return response unless options[:include_request] - - response.merge( - request: { - method: env.method, - url: env.url, - url_path: env.url.path, - params: query_params(env), - headers: env.request_headers, - body: env.request_body - } - ) - end - - def query_params(env) - env.request.params_encoder ||= Faraday::Utils.default_params_encoder - env.params_encoder.decode(env.url.query) - end - end - end -end - -Faraday::Response.register_middleware(raise_error: Faraday::Response::RaiseError) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils.rb deleted file mode 100644 index 809b3a88..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -require 'uri' -require 'faraday/utils/headers' -require 'faraday/utils/params_hash' - -module Faraday - # Utils contains various static helper methods. - module Utils - module_function - - def build_query(params) - FlatParamsEncoder.encode(params) - end - - def build_nested_query(params) - NestedParamsEncoder.encode(params) - end - - def default_space_encoding - @default_space_encoding ||= '+' - end - - class << self - attr_writer :default_space_encoding - end - - ESCAPE_RE = /[^a-zA-Z0-9 .~_-]/ - - def escape(str) - str.to_s.gsub(ESCAPE_RE) do |match| - "%#{match.unpack('H2' * match.bytesize).join('%').upcase}" - end.gsub(' ', default_space_encoding) - end - - def unescape(str) - CGI.unescape str.to_s - end - - DEFAULT_SEP = /[&;] */n - - # Adapted from Rack - def parse_query(query) - FlatParamsEncoder.decode(query) - end - - def parse_nested_query(query) - NestedParamsEncoder.decode(query) - end - - def default_params_encoder - @default_params_encoder ||= NestedParamsEncoder - end - - def basic_header_from(login, pass) - value = ["#{login}:#{pass}"].pack('m') # Base64 encoding - value.delete!("\n") - "Basic #{value}" - end - - class << self - attr_writer :default_params_encoder - end - - # Normalize URI() behavior across Ruby versions - # - # url - A String or URI. - # - # Returns a parsed URI. - def URI(url) # rubocop:disable Naming/MethodName - if url.respond_to?(:host) - url - elsif url.respond_to?(:to_str) - default_uri_parser.call(url) - else - raise ArgumentError, 'bad argument (expected URI object or URI string)' - end - end - - def default_uri_parser - @default_uri_parser ||= Kernel.method(:URI) - end - - def default_uri_parser=(parser) - @default_uri_parser = if parser.respond_to?(:call) || parser.nil? - parser - else - parser.method(:parse) - end - end - - # Receives a String or URI and returns just - # the path with the query string sorted. - def normalize_path(url) - url = URI(url) - (url.path.start_with?('/') ? url.path : "/#{url.path}") + - (url.query ? "?#{sort_query_params(url.query)}" : '') - end - - # Recursive hash update - def deep_merge!(target, hash) - hash.each do |key, value| - target[key] = if value.is_a?(Hash) && (target[key].is_a?(Hash) || target[key].is_a?(Options)) - deep_merge(target[key], value) - else - value - end - end - target - end - - # Recursive hash merge - def deep_merge(source, hash) - deep_merge!(source.dup, hash) - end - - def sort_query_params(query) - query.split('&').sort.join('&') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils/headers.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils/headers.rb deleted file mode 100644 index 27b06e96..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils/headers.rb +++ /dev/null @@ -1,150 +0,0 @@ -# frozen_string_literal: true - -module Faraday - module Utils - # A case-insensitive Hash that preserves the original case of a header - # when set. - # - # Adapted from Rack::Utils::HeaderHash - class Headers < ::Hash - def self.from(value) - new(value) - end - - def self.allocate - new_self = super - new_self.initialize_names - new_self - end - - def initialize(hash = nil) - super() - @names = {} - update(hash || {}) - end - - def initialize_names - @names = {} - end - - # on dup/clone, we need to duplicate @names hash - def initialize_copy(other) - super - @names = other.names.dup - end - - # need to synchronize concurrent writes to the shared KeyMap - keymap_mutex = Mutex.new - - # symbol -> string mapper + cache - KeyMap = Hash.new do |map, key| - value = if key.respond_to?(:to_str) - key - else - key.to_s.split('_') # user_agent: %w(user agent) - .each(&:capitalize!) # => %w(User Agent) - .join('-') # => "User-Agent" - end - keymap_mutex.synchronize { map[key] = value } - end - KeyMap[:etag] = 'ETag' - - def [](key) - key = KeyMap[key] - super(key) || super(@names[key.downcase]) - end - - def []=(key, val) - key = KeyMap[key] - key = (@names[key.downcase] ||= key) - # join multiple values with a comma - val = val.to_ary.join(', ') if val.respond_to?(:to_ary) - super(key, val) - end - - def fetch(key, ...) - key = KeyMap[key] - key = @names.fetch(key.downcase, key) - super(key, ...) - end - - def delete(key) - key = KeyMap[key] - key = @names[key.downcase] - return unless key - - @names.delete key.downcase - super(key) - end - - def dig(key, *rest) - key = KeyMap[key] - key = @names.fetch(key.downcase, key) - super(key, *rest) - end - - def include?(key) - @names.include? key.downcase - end - - alias has_key? include? - alias member? include? - alias key? include? - - def merge!(other) - other.each { |k, v| self[k] = v } - self - end - - alias update merge! - - def merge(other) - hash = dup - hash.merge! other - end - - def replace(other) - clear - @names.clear - update other - self - end - - def to_hash - {}.update(self) - end - - def parse(header_string) - return unless header_string && !header_string.empty? - - headers = header_string.split("\r\n") - - # Find the last set of response headers. - start_index = headers.rindex { |x| x.start_with?('HTTP/') } || 0 - last_response = headers.slice(start_index, headers.size) - - last_response - .tap { |a| a.shift if a.first.start_with?('HTTP/') } - .map { |h| h.split(/:\s*/, 2) } # split key and value - .reject { |p| p[0].nil? } # ignore blank lines - .each { |key, value| add_parsed(key, value) } - end - - protected - - attr_reader :names - - private - - # Join multiple values with a comma. - def add_parsed(key, value) - if key?(key) - self[key] = self[key].to_s - self[key] << ', ' << value - else - self[key] = value - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils/params_hash.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils/params_hash.rb deleted file mode 100644 index 0e16d935..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/utils/params_hash.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -module Faraday - module Utils - # A hash with stringified keys. - class ParamsHash < Hash - def [](key) - super(convert_key(key)) - end - - def []=(key, value) - super(convert_key(key), value) - end - - def delete(key) - super(convert_key(key)) - end - - def include?(key) - super(convert_key(key)) - end - - alias has_key? include? - alias member? include? - alias key? include? - - def update(params) - params.each do |key, value| - self[key] = value - end - self - end - alias merge! update - - def merge(params) - dup.update(params) - end - - def replace(other) - clear - update(other) - end - - def merge_query(query, encoder = nil) - return self unless query && !query.empty? - - update((encoder || Utils.default_params_encoder).decode(query)) - end - - def to_query(encoder = nil) - (encoder || Utils.default_params_encoder).encode(self) - end - - private - - def convert_key(key) - key.to_s - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/version.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/version.rb deleted file mode 100644 index b317cc8f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/lib/faraday/version.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -module Faraday - VERSION = '2.13.1' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/external_adapters/faraday_specs_setup.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/external_adapters/faraday_specs_setup.rb deleted file mode 100644 index ac7f7b64..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/external_adapters/faraday_specs_setup.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -require 'webmock/rspec' -WebMock.disable_net_connect!(allow_localhost: true) - -require_relative '../support/helper_methods' -require_relative '../support/disabling_stub' -require_relative '../support/streaming_response_checker' -require_relative '../support/shared_examples/adapter' -require_relative '../support/shared_examples/request_method' - -RSpec.configure do |config| - config.include Faraday::HelperMethods -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter/test_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter/test_spec.rb deleted file mode 100644 index 117bb789..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter/test_spec.rb +++ /dev/null @@ -1,442 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Adapter::Test do - let(:stubs) do - described_class::Stubs.new do |stub| - stub.get('http://domain.test/hello') do - [200, { 'Content-Type' => 'text/html' }, 'domain: hello'] - end - - stub.get('http://wrong.test/hello') do - [200, { 'Content-Type' => 'text/html' }, 'wrong: hello'] - end - - stub.get('http://wrong.test/bait') do - [404, { 'Content-Type' => 'text/html' }] - end - - stub.get('/hello') do - [200, { 'Content-Type' => 'text/html' }, 'hello'] - end - - stub.get('/method-echo') do |env| - [200, { 'Content-Type' => 'text/html' }, env[:method].to_s] - end - - stub.get(%r{\A/resources/\d+(?:\?|\z)}) do - [200, { 'Content-Type' => 'text/html' }, 'show'] - end - - stub.get(%r{\A/resources/(specified)\z}) do |_env, meta| - [200, { 'Content-Type' => 'text/html' }, "show #{meta[:match_data][1]}"] - end - end - end - - let(:connection) do - Faraday.new do |builder| - builder.adapter :test, stubs - end - end - - let(:response) { connection.get('/hello') } - - context 'with simple path sets status' do - subject { response.status } - - it { is_expected.to eq 200 } - end - - context 'with simple path sets headers' do - subject { response.headers['Content-Type'] } - - it { is_expected.to eq 'text/html' } - end - - context 'with simple path sets body' do - subject { response.body } - - it { is_expected.to eq 'hello' } - end - - context 'with host points to the right stub' do - subject { connection.get('http://domain.test/hello').body } - - it { is_expected.to eq 'domain: hello' } - end - - describe 'can be called several times' do - subject { connection.get('/hello').body } - - it { is_expected.to eq 'hello' } - end - - describe 'can handle regular expression path' do - subject { connection.get('/resources/1').body } - - it { is_expected.to eq 'show' } - end - - describe 'can handle single parameter block' do - subject { connection.get('/method-echo').body } - - it { is_expected.to eq 'get' } - end - - describe 'can handle regular expression path with captured result' do - subject { connection.get('/resources/specified').body } - - it { is_expected.to eq 'show specified' } - end - - context 'with get params' do - subject { connection.get('/param?a=1').body } - - before do - stubs.get('/param?a=1') { [200, {}, 'a'] } - end - - it { is_expected.to eq 'a' } - end - - describe 'ignoring unspecified get params' do - before do - stubs.get('/optional?a=1') { [200, {}, 'a'] } - end - - context 'with multiple params' do - subject { connection.get('/optional?a=1&b=1').body } - - it { is_expected.to eq 'a' } - end - - context 'with single param' do - subject { connection.get('/optional?a=1').body } - - it { is_expected.to eq 'a' } - end - - context 'without params' do - subject(:request) { connection.get('/optional') } - - it do - expect { request }.to raise_error( - Faraday::Adapter::Test::Stubs::NotFound - ) - end - end - end - - context 'with http headers' do - before do - stubs.get('/yo', 'X-HELLO' => 'hello') { [200, {}, 'a'] } - stubs.get('/yo') { [200, {}, 'b'] } - end - - context 'with header' do - subject do - connection.get('/yo') { |env| env.headers['X-HELLO'] = 'hello' }.body - end - - it { is_expected.to eq 'a' } - end - - context 'without header' do - subject do - connection.get('/yo').body - end - - it { is_expected.to eq 'b' } - end - end - - describe 'different outcomes for the same request' do - def make_request - connection.get('/foo') - end - - subject(:request) { make_request.body } - - before do - stubs.get('/foo') { [200, { 'Content-Type' => 'text/html' }, 'hello'] } - stubs.get('/foo') { [200, { 'Content-Type' => 'text/html' }, 'world'] } - end - - context 'the first request' do - it { is_expected.to eq 'hello' } - end - - context 'the second request' do - before do - make_request - end - - it { is_expected.to eq 'world' } - end - end - - describe 'yielding env to stubs' do - subject { connection.get('http://foo.com/foo?a=1').body } - - before do - stubs.get '/foo' do |env| - expect(env[:url].path).to eq '/foo' - expect(env[:url].host).to eq 'foo.com' - expect(env[:params]['a']).to eq '1' - expect(env[:request_headers]['Accept']).to eq 'text/plain' - [200, {}, 'a'] - end - - connection.headers['Accept'] = 'text/plain' - end - - it { is_expected.to eq 'a' } - end - - describe 'params parsing' do - subject { connection.get('http://foo.com/foo?a[b]=1').body } - - context 'with default encoder' do - before do - stubs.get '/foo' do |env| - expect(env[:params]['a']['b']).to eq '1' - [200, {}, 'a'] - end - end - - it { is_expected.to eq 'a' } - end - - context 'with nested encoder' do - before do - stubs.get '/foo' do |env| - expect(env[:params]['a']['b']).to eq '1' - [200, {}, 'a'] - end - - connection.options.params_encoder = Faraday::NestedParamsEncoder - end - - it { is_expected.to eq 'a' } - end - - context 'with flat encoder' do - before do - stubs.get '/foo' do |env| - expect(env[:params]['a[b]']).to eq '1' - [200, {}, 'a'] - end - - connection.options.params_encoder = Faraday::FlatParamsEncoder - end - - it { is_expected.to eq 'a' } - end - end - - describe 'raising an error if no stub was found' do - describe 'for request' do - subject(:request) { connection.get('/invalid') { [200, {}, []] } } - - it { expect { request }.to raise_error described_class::Stubs::NotFound } - end - - describe 'for specified host' do - subject(:request) { connection.get('http://domain.test/bait') } - - it { expect { request }.to raise_error described_class::Stubs::NotFound } - end - - describe 'for request without specified header' do - subject(:request) { connection.get('/yo') } - - before do - stubs.get('/yo', 'X-HELLO' => 'hello') { [200, {}, 'a'] } - end - - it { expect { request }.to raise_error described_class::Stubs::NotFound } - end - end - - describe 'for request with non default params encoder' do - let(:connection) do - Faraday.new(request: { params_encoder: Faraday::FlatParamsEncoder }) do |builder| - builder.adapter :test, stubs - end - end - let(:stubs) do - described_class::Stubs.new do |stubs| - stubs.get('/path?a=x&a=y&a=z') { [200, {}, 'a'] } - end - end - - context 'when all flat param values are correctly set' do - subject(:request) { connection.get('/path?a=x&a=y&a=z') } - - it { expect(request.status).to eq 200 } - end - - shared_examples 'raise NotFound when params do not satisfy the flat param values' do |params| - subject(:request) { connection.get('/path', params) } - - context "with #{params.inspect}" do - it { expect { request }.to raise_error described_class::Stubs::NotFound } - end - end - - it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { a: %w[x] } - it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { a: %w[x y] } - it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { a: %w[x z y] } # NOTE: The order of the value is also compared. - it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { b: %w[x y z] } - end - - describe 'strict_mode' do - let(:stubs) do - described_class::Stubs.new(strict_mode: true) do |stubs| - stubs.get('/strict?a=12&b=xy', 'Authorization' => 'Bearer m_ck', 'X-C' => 'hello') { [200, {}, 'a'] } - stubs.get('/with_user_agent?a=12&b=xy', authorization: 'Bearer m_ck', 'User-Agent' => 'My Agent') { [200, {}, 'a'] } - end - end - - context 'when params and headers are exactly set' do - subject(:request) { connection.get('/strict', { a: '12', b: 'xy' }, { authorization: 'Bearer m_ck', x_c: 'hello' }) } - - it { expect(request.status).to eq 200 } - end - - context 'when params and headers are exactly set with a custom user agent' do - subject(:request) { connection.get('/with_user_agent', { a: '12', b: 'xy' }, { authorization: 'Bearer m_ck', 'User-Agent' => 'My Agent' }) } - - it { expect(request.status).to eq 200 } - end - - shared_examples 'raise NotFound when params do not satisfy the strict check' do |params| - subject(:request) { connection.get('/strict', params, { 'Authorization' => 'Bearer m_ck', 'X-C' => 'hello' }) } - - context "with #{params.inspect}" do - it { expect { request }.to raise_error described_class::Stubs::NotFound } - end - end - - it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '12' } - it_behaves_like 'raise NotFound when params do not satisfy the strict check', { b: 'xy' } - it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '123', b: 'xy' } - it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '12', b: 'xyz' } - it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '12', b: 'xy', c: 'hello' } - it_behaves_like 'raise NotFound when params do not satisfy the strict check', { additional: 'special', a: '12', b: 'xy', c: 'hello' } - - shared_examples 'raise NotFound when headers do not satisfy the strict check' do |path, headers| - subject(:request) { connection.get(path, { a: 12, b: 'xy' }, headers) } - - context "with #{headers.inspect}" do - it { expect { request }.to raise_error described_class::Stubs::NotFound } - end - end - - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck' } - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { 'X-C' => 'hello' } - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'Hi' } - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Basic m_ck', 'x-c': 'hello' } - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello', x_special: 'special' } - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck' } - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'Unknown' } - it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'My Agent', x_special: 'special' } - - context 'when strict_mode is disabled' do - before do - stubs.strict_mode = false - end - - shared_examples 'does not raise NotFound even when params do not satisfy the strict check' do |params| - subject(:request) { connection.get('/strict', params, { 'Authorization' => 'Bearer m_ck', 'X-C' => 'hello' }) } - - context "with #{params.inspect}" do - it { expect(request.status).to eq 200 } - end - end - - it_behaves_like 'does not raise NotFound even when params do not satisfy the strict check', { a: '12', b: 'xy' } - it_behaves_like 'does not raise NotFound even when params do not satisfy the strict check', { a: '12', b: 'xy', c: 'hello' } - it_behaves_like 'does not raise NotFound even when params do not satisfy the strict check', { additional: 'special', a: '12', b: 'xy', c: 'hello' } - - shared_examples 'does not raise NotFound even when headers do not satisfy the strict check' do |path, headers| - subject(:request) { connection.get(path, { a: 12, b: 'xy' }, headers) } - - context "with #{headers.inspect}" do - it { expect(request.status).to eq 200 } - end - end - - it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello' } - it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello', x_special: 'special' } - it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello', user_agent: 'Special Agent' } - it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'My Agent' } - it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'My Agent', x_special: 'special' } - end - - describe 'body_match?' do - let(:stubs) do - described_class::Stubs.new do |stubs| - stubs.post('/no_check') { [200, {}, 'ok'] } - stubs.post('/with_string', 'abc') { [200, {}, 'ok'] } - stubs.post( - '/with_proc', - ->(request_body) { JSON.parse(request_body, symbolize_names: true) == { x: '!', a: [{ m: [{ a: true }], n: 123 }] } }, - { content_type: 'application/json' } - ) do - [200, {}, 'ok'] - end - end - end - - context 'when trying without any args for body' do - subject(:without_body) { connection.post('/no_check') } - - it { expect(without_body.status).to eq 200 } - end - - context 'when trying with string body stubs' do - subject(:with_string) { connection.post('/with_string', 'abc') } - - it { expect(with_string.status).to eq 200 } - end - - context 'when trying with proc body stubs' do - subject(:with_proc) do - connection.post('/with_proc', JSON.dump(a: [{ n: 123, m: [{ a: true }] }], x: '!'), { 'Content-Type' => 'application/json' }) - end - - it { expect(with_proc.status).to eq 200 } - end - end - end - - describe 'request timeout' do - subject(:request) do - connection.get('/sleep') do |req| - req.options.timeout = timeout - end - end - - before do - stubs.get('/sleep') do - sleep(0.01) - [200, {}, ''] - end - end - - context 'when request is within timeout' do - let(:timeout) { 1 } - - it { expect(request.status).to eq 200 } - end - - context 'when request is too slow' do - let(:timeout) { 0.001 } - - it 'raises an exception' do - expect { request }.to raise_error(Faraday::TimeoutError) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter_registry_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter_registry_spec.rb deleted file mode 100644 index 222e65ef..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter_registry_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::AdapterRegistry do - describe '#initialize' do - subject(:registry) { described_class.new } - - it { expect { registry.get(:FinFangFoom) }.to raise_error(NameError) } - it { expect { registry.get('FinFangFoom') }.to raise_error(NameError) } - - it 'looks up class by string name' do - expect(registry.get('Faraday::Connection')).to eq(Faraday::Connection) - end - - it 'looks up class by symbol name' do - expect(registry.get(:Faraday)).to eq(Faraday) - end - - it 'caches lookups with implicit name' do - registry.set :symbol - expect(registry.get('symbol')).to eq(:symbol) - end - - it 'caches lookups with explicit name' do - registry.set 'string', :name - expect(registry.get(:name)).to eq('string') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter_spec.rb deleted file mode 100644 index 22ef1d14..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/adapter_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Adapter do - let(:adapter) { Faraday::Adapter.new } - let(:request) { {} } - - context '#request_timeout' do - it 'gets :read timeout' do - expect(timeout(:read)).to eq(nil) - - request[:timeout] = 5 - request[:write_timeout] = 1 - - expect(timeout(:read)).to eq(5) - - request[:read_timeout] = 2 - - expect(timeout(:read)).to eq(2) - end - - it 'gets :open timeout' do - expect(timeout(:open)).to eq(nil) - - request[:timeout] = 5 - request[:write_timeout] = 1 - - expect(timeout(:open)).to eq(5) - - request[:open_timeout] = 2 - - expect(timeout(:open)).to eq(2) - end - - it 'gets :write timeout' do - expect(timeout(:write)).to eq(nil) - - request[:timeout] = 5 - request[:read_timeout] = 1 - - expect(timeout(:write)).to eq(5) - - request[:write_timeout] = 2 - - expect(timeout(:write)).to eq(2) - end - - it 'attempts unknown timeout type' do - expect { timeout(:unknown) }.to raise_error(ArgumentError) - end - - def timeout(type) - adapter.send(:request_timeout, type, request) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/connection_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/connection_spec.rb deleted file mode 100644 index 7fa726a4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/connection_spec.rb +++ /dev/null @@ -1,808 +0,0 @@ -# frozen_string_literal: true - -class CustomEncoder - def encode(params) - params.map { |k, v| "#{k.upcase}-#{v.to_s.upcase}" }.join(',') - end - - def decode(params) - params.split(',').to_h { |pair| pair.split('-') } - end -end - -shared_examples 'initializer with url' do - context 'with simple url' do - let(:address) { 'http://httpbingo.org' } - - it { expect(subject.host).to eq('httpbingo.org') } - it { expect(subject.port).to eq(80) } - it { expect(subject.scheme).to eq('http') } - it { expect(subject.path_prefix).to eq('/') } - it { expect(subject.params).to eq({}) } - end - - context 'with complex url' do - let(:address) { 'http://httpbingo.org:815/fish?a=1' } - - it { expect(subject.port).to eq(815) } - it { expect(subject.path_prefix).to eq('/fish') } - it { expect(subject.params).to eq('a' => '1') } - end - - context 'with IPv6 address' do - let(:address) { 'http://[::1]:85/' } - - it { expect(subject.host).to eq('[::1]') } - it { expect(subject.port).to eq(85) } - end -end - -shared_examples 'default connection options' do - after { Faraday.default_connection_options = nil } - - it 'works with implicit url' do - conn = Faraday.new 'http://httpbingo.org/foo' - expect(conn.options.timeout).to eq(10) - end - - it 'works with option url' do - conn = Faraday.new url: 'http://httpbingo.org/foo' - expect(conn.options.timeout).to eq(10) - end - - it 'works with instance connection options' do - conn = Faraday.new 'http://httpbingo.org/foo', request: { open_timeout: 1 } - expect(conn.options.timeout).to eq(10) - expect(conn.options.open_timeout).to eq(1) - end - - it 'default connection options persist with an instance overriding' do - conn = Faraday.new 'http://nigiri.com/bar' - conn.options.timeout = 1 - expect(Faraday.default_connection_options.request.timeout).to eq(10) - - other = Faraday.new url: 'https://httpbingo.org/foo' - other.options.timeout = 1 - - expect(Faraday.default_connection_options.request.timeout).to eq(10) - end - - it 'default connection uses default connection options' do - expect(Faraday.default_connection.options.timeout).to eq(10) - end -end - -RSpec.describe Faraday::Connection do - let(:conn) { Faraday::Connection.new(url, options) } - let(:url) { nil } - let(:options) { nil } - - describe '.new' do - subject { conn } - - context 'with implicit url param' do - # Faraday::Connection.new('http://httpbingo.org') - let(:url) { address } - - it_behaves_like 'initializer with url' - end - - context 'with explicit url param' do - # Faraday::Connection.new(url: 'http://httpbingo.org') - let(:url) { { url: address } } - - it_behaves_like 'initializer with url' - end - - context 'with custom builder' do - let(:custom_builder) { Faraday::RackBuilder.new } - let(:options) { { builder: custom_builder } } - - it { expect(subject.builder).to eq(custom_builder) } - end - - context 'with custom params' do - let(:options) { { params: { a: 1 } } } - - it { expect(subject.params).to eq('a' => 1) } - end - - context 'with custom params and params in url' do - let(:url) { 'http://httpbingo.org/fish?a=1&b=2' } - let(:options) { { params: { a: 3 } } } - it { expect(subject.params).to eq('a' => 3, 'b' => '2') } - end - - context 'with basic_auth in url' do - let(:url) { 'http://Aladdin:open%20sesame@httpbingo.org/fish' } - - it { expect(subject.headers['Authorization']).to eq('Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==') } - end - - context 'with custom headers' do - let(:options) { { headers: { user_agent: 'Faraday' } } } - - it { expect(subject.headers['User-agent']).to eq('Faraday') } - end - - context 'with ssl false' do - let(:options) { { ssl: { verify: false } } } - - it { expect(subject.ssl.verify?).to be_falsey } - end - - context 'with verify_hostname false' do - let(:options) { { ssl: { verify_hostname: false } } } - - it { expect(subject.ssl.verify_hostname?).to be_falsey } - end - - context 'with empty block' do - let(:conn) { Faraday::Connection.new {} } - - it { expect(conn.builder.handlers.size).to eq(0) } - end - - context 'with block' do - let(:conn) do - Faraday::Connection.new(params: { 'a' => '1' }) do |faraday| - faraday.adapter :test - faraday.url_prefix = 'http://httpbingo.org/omnom' - end - end - - it { expect(conn.builder.handlers.size).to eq(0) } - it { expect(conn.path_prefix).to eq('/omnom') } - end - end - - describe '#close' do - before { Faraday.default_adapter = :test } - after { Faraday.default_adapter = nil } - - it 'can close underlying app' do - expect(conn.app).to receive(:close) - conn.close - end - end - - describe '#build_exclusive_url' do - context 'with relative path' do - subject { conn.build_exclusive_url('sake.html') } - - it 'uses connection host as default host' do - conn.host = 'httpbingo.org' - expect(subject.host).to eq('httpbingo.org') - expect(subject.scheme).to eq('http') - end - - it do - conn.path_prefix = '/fish' - expect(subject.path).to eq('/fish/sake.html') - end - - it do - conn.path_prefix = '/' - expect(subject.path).to eq('/sake.html') - end - - it do - conn.path_prefix = 'fish' - expect(subject.path).to eq('/fish/sake.html') - end - - it do - conn.path_prefix = '/fish/' - expect(subject.path).to eq('/fish/sake.html') - end - end - - context 'with absolute path' do - subject { conn.build_exclusive_url('/sake.html') } - - after { expect(subject.path).to eq('/sake.html') } - - it { conn.path_prefix = '/fish' } - it { conn.path_prefix = '/' } - it { conn.path_prefix = 'fish' } - it { conn.path_prefix = '/fish/' } - end - - context 'with complete url' do - subject { conn.build_exclusive_url('http://httpbingo.org/sake.html?a=1') } - - it { expect(subject.scheme).to eq('http') } - it { expect(subject.host).to eq('httpbingo.org') } - it { expect(subject.port).to eq(80) } - it { expect(subject.path).to eq('/sake.html') } - it { expect(subject.query).to eq('a=1') } - end - - it 'overrides connection port for absolute url' do - conn.port = 23 - uri = conn.build_exclusive_url('http://httpbingo.org') - expect(uri.port).to eq(80) - end - - it 'does not add ending slash given nil url' do - conn.url_prefix = 'http://httpbingo.org/nigiri' - uri = conn.build_exclusive_url - expect(uri.path).to eq('/nigiri') - end - - it 'does not add ending slash given empty url' do - conn.url_prefix = 'http://httpbingo.org/nigiri' - uri = conn.build_exclusive_url('') - expect(uri.path).to eq('/nigiri') - end - - it 'does not use connection params' do - conn.url_prefix = 'http://httpbingo.org/nigiri' - conn.params = { a: 1 } - expect(conn.build_exclusive_url.to_s).to eq('http://httpbingo.org/nigiri') - end - - it 'allows to provide params argument' do - conn.url_prefix = 'http://httpbingo.org/nigiri' - conn.params = { a: 1 } - params = Faraday::Utils::ParamsHash.new - params[:a] = 2 - uri = conn.build_exclusive_url(nil, params) - expect(uri.to_s).to eq('http://httpbingo.org/nigiri?a=2') - end - - it 'handles uri instances' do - uri = conn.build_exclusive_url(URI('/sake.html')) - expect(uri.path).to eq('/sake.html') - end - - it 'always returns new URI instance' do - conn.url_prefix = 'http://httpbingo.org' - uri1 = conn.build_exclusive_url(nil) - uri2 = conn.build_exclusive_url(nil) - expect(uri1).not_to equal(uri2) - end - - context 'with url_prefixed connection' do - let(:url) { 'http://httpbingo.org/get/' } - - it 'parses url and changes scheme' do - conn.scheme = 'https' - uri = conn.build_exclusive_url('sake.html') - expect(uri.to_s).to eq('https://httpbingo.org/get/sake.html') - end - - it 'joins url to base with ending slash' do - uri = conn.build_exclusive_url('sake.html') - expect(uri.to_s).to eq('http://httpbingo.org/get/sake.html') - end - - it 'used default base with ending slash' do - uri = conn.build_exclusive_url - expect(uri.to_s).to eq('http://httpbingo.org/get/') - end - - it 'overrides base' do - uri = conn.build_exclusive_url('/sake/') - expect(uri.to_s).to eq('http://httpbingo.org/sake/') - end - end - - context 'with colon in path' do - let(:url) { 'http://service.com' } - - it 'joins url to base when used absolute path' do - conn = Faraday.new(url: url) - uri = conn.build_exclusive_url('/service:search?limit=400') - expect(uri.to_s).to eq('http://service.com/service:search?limit=400') - end - - it 'joins url to base when used relative path' do - conn = Faraday.new(url: url) - uri = conn.build_exclusive_url('service:search?limit=400') - expect(uri.to_s).to eq('http://service.com/service:search?limit=400') - end - - it 'joins url to base when used with path prefix' do - conn = Faraday.new(url: url) - conn.path_prefix = '/api' - uri = conn.build_exclusive_url('service:search?limit=400') - expect(uri.to_s).to eq('http://service.com/api/service:search?limit=400') - end - end - - context 'with a custom `default_uri_parser`' do - let(:url) { 'http://httpbingo.org' } - let(:parser) { Addressable::URI } - - around do |example| - with_default_uri_parser(parser) do - example.run - end - end - - it 'does not raise error' do - expect { conn.build_exclusive_url('/nigiri') }.not_to raise_error - end - end - end - - describe '#build_url' do - let(:url) { 'http://httpbingo.org/nigiri' } - - it 'uses params' do - conn.params = { a: 1, b: 1 } - expect(conn.build_url.to_s).to eq('http://httpbingo.org/nigiri?a=1&b=1') - end - - it 'merges params' do - conn.params = { a: 1, b: 1 } - url = conn.build_url(nil, b: 2, c: 3) - expect(url.to_s).to eq('http://httpbingo.org/nigiri?a=1&b=2&c=3') - end - end - - describe '#build_request' do - let(:url) { 'https://ahttpbingo.org/sake.html' } - let(:request) { conn.build_request(:get) } - - before do - conn.headers = { 'Authorization' => 'token abc123' } - request.headers.delete('Authorization') - end - - it { expect(conn.headers.keys).to eq(['Authorization']) } - it { expect(conn.headers.include?('Authorization')).to be_truthy } - it { expect(request.headers.keys).to be_empty } - it { expect(request.headers.include?('Authorization')).to be_falsey } - end - - describe '#to_env' do - subject { conn.build_request(:get).to_env(conn).url } - - let(:url) { 'http://httpbingo.org/sake.html' } - let(:options) { { params: @params } } - - it 'parses url params into query' do - @params = { 'a[b]' => '1 + 2' } - expect(subject.query).to eq('a%5Bb%5D=1+%2B+2') - end - - it 'escapes per spec' do - @params = { 'a' => '1+2 foo~bar.-baz' } - expect(subject.query).to eq('a=1%2B2+foo~bar.-baz') - end - - it 'bracketizes nested params in query' do - @params = { 'a' => { 'b' => 'c' } } - expect(subject.query).to eq('a%5Bb%5D=c') - end - - it 'bracketizes repeated params in query' do - @params = { 'a' => [1, 2] } - expect(subject.query).to eq('a%5B%5D=1&a%5B%5D=2') - end - - it 'without braketizing repeated params in query' do - @params = { 'a' => [1, 2] } - conn.options.params_encoder = Faraday::FlatParamsEncoder - expect(subject.query).to eq('a=1&a=2') - end - end - - describe 'proxy support' do - it 'accepts string' do - with_env 'http_proxy' => 'http://env-proxy.com:80' do - conn.proxy = 'http://proxy.com' - expect(conn.proxy.host).to eq('proxy.com') - end - end - - it 'accepts uri' do - with_env 'http_proxy' => 'http://env-proxy.com:80' do - conn.proxy = URI.parse('http://proxy.com') - expect(conn.proxy.host).to eq('proxy.com') - end - end - - it 'accepts hash with string uri' do - with_env 'http_proxy' => 'http://env-proxy.com:80' do - conn.proxy = { uri: 'http://proxy.com', user: 'rick' } - expect(conn.proxy.host).to eq('proxy.com') - expect(conn.proxy.user).to eq('rick') - end - end - - it 'accepts hash' do - with_env 'http_proxy' => 'http://env-proxy.com:80' do - conn.proxy = { uri: URI.parse('http://proxy.com'), user: 'rick' } - expect(conn.proxy.host).to eq('proxy.com') - expect(conn.proxy.user).to eq('rick') - end - end - - it 'accepts http env' do - with_env 'http_proxy' => 'http://env-proxy.com:80' do - expect(conn.proxy.host).to eq('env-proxy.com') - end - end - - it 'accepts http env with auth' do - with_env 'http_proxy' => 'http://a%40b:my%20pass@proxy.com:80' do - expect(conn.proxy.user).to eq('a@b') - expect(conn.proxy.password).to eq('my pass') - end - end - - it 'accepts env without scheme' do - with_env 'http_proxy' => 'localhost:8888' do - uri = conn.proxy[:uri] - expect(uri.host).to eq('localhost') - expect(uri.port).to eq(8888) - end - end - - it 'fetches no proxy from nil env' do - with_env 'http_proxy' => nil do - expect(conn.proxy).to be_nil - end - end - - it 'fetches no proxy from blank env' do - with_env 'http_proxy' => '' do - expect(conn.proxy).to be_nil - end - end - - it 'does not accept uppercase env' do - with_env 'HTTP_PROXY' => 'http://localhost:8888/' do - expect(conn.proxy).to be_nil - end - end - - it 'allows when url in no proxy list' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do - conn = Faraday::Connection.new('http://example.com') - expect(conn.proxy).to be_nil - end - end - - it 'allows when url in no proxy list with url_prefix' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do - conn = Faraday::Connection.new - conn.url_prefix = 'http://example.com' - expect(conn.proxy).to be_nil - end - end - - it 'allows when prefixed url is not in no proxy list' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do - conn = Faraday::Connection.new('http://prefixedexample.com') - expect(conn.proxy.host).to eq('proxy.com') - end - end - - it 'allows when subdomain url is in no proxy list' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do - conn = Faraday::Connection.new('http://subdomain.example.com') - expect(conn.proxy).to be_nil - end - end - - it 'allows when url not in no proxy list' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example2.com' do - conn = Faraday::Connection.new('http://example.com') - expect(conn.proxy.host).to eq('proxy.com') - end - end - - it 'allows when ip address is not in no proxy list but url is' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'localhost' do - conn = Faraday::Connection.new('http://127.0.0.1') - expect(conn.proxy).to be_nil - end - end - - it 'allows when url is not in no proxy list but ip address is' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => '127.0.0.1' do - conn = Faraday::Connection.new('http://localhost') - expect(conn.proxy).to be_nil - end - end - - it 'allows in multi element no proxy list' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example0.com,example.com,example1.com' do - expect(Faraday::Connection.new('http://example0.com').proxy).to be_nil - expect(Faraday::Connection.new('http://example.com').proxy).to be_nil - expect(Faraday::Connection.new('http://example1.com').proxy).to be_nil - expect(Faraday::Connection.new('http://example2.com').proxy.host).to eq('proxy.com') - end - end - - it 'test proxy requires uri' do - expect { conn.proxy = { uri: :bad_uri, user: 'rick' } }.to raise_error(ArgumentError) - end - - it 'uses env http_proxy' do - with_env 'http_proxy' => 'http://proxy.com' do - conn = Faraday.new - expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey - expect(conn.proxy_for_request('http://google.co.uk').host).to eq('proxy.com') - end - end - - it 'uses processes no_proxy before http_proxy' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'google.co.uk' do - conn = Faraday.new - expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey - expect(conn.proxy_for_request('http://google.co.uk')).to be_nil - end - end - - it 'uses env https_proxy' do - with_env 'https_proxy' => 'https://proxy.com' do - conn = Faraday.new - expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey - expect(conn.proxy_for_request('https://google.co.uk').host).to eq('proxy.com') - end - end - - it 'uses processes no_proxy before https_proxy' do - with_env 'https_proxy' => 'https://proxy.com', 'no_proxy' => 'google.co.uk' do - conn = Faraday.new - expect(conn.instance_variable_get(:@manual_proxy)).to be_falsey - expect(conn.proxy_for_request('https://google.co.uk')).to be_nil - end - end - - it 'gives priority to manually set proxy' do - with_env 'https_proxy' => 'https://proxy.com', 'no_proxy' => 'google.co.uk' do - conn = Faraday.new - conn.proxy = 'http://proxy2.com' - - expect(conn.instance_variable_get(:@manual_proxy)).to be_truthy - expect(conn.proxy_for_request('https://google.co.uk').host).to eq('proxy2.com') - end - end - - it 'ignores env proxy if set that way' do - with_env_proxy_disabled do - with_env 'http_proxy' => 'http://duncan.proxy.com:80' do - expect(conn.proxy).to be_nil - end - end - end - - context 'performing a request' do - let(:url) { 'http://example.com' } - let(:conn) do - Faraday.new do |f| - f.adapter :test do |stubs| - stubs.get(url) do - [200, {}, 'ok'] - end - end - end - end - - it 'dynamically checks proxy' do - with_env 'http_proxy' => 'http://proxy.com:80' do - expect(conn.proxy.uri.host).to eq('proxy.com') - - conn.get(url) do |req| - expect(req.options.proxy.uri.host).to eq('proxy.com') - end - end - - conn.get(url) - expect(conn.instance_variable_get(:@temp_proxy)).to be_nil - end - - it 'dynamically check no proxy' do - with_env 'http_proxy' => 'http://proxy.com', 'no_proxy' => 'example.com' do - expect(conn.proxy.uri.host).to eq('proxy.com') - - conn.get('http://example.com') do |req| - expect(req.options.proxy).to be_nil - end - end - end - end - end - - describe '#dup' do - subject { conn.dup } - - let(:url) { 'http://httpbingo.org/foo' } - let(:options) do - { - ssl: { verify: :none }, - headers: { 'content-type' => 'text/plain' }, - params: { 'a' => '1' }, - request: { timeout: 5 } - } - end - - it { expect(subject.build_exclusive_url).to eq(conn.build_exclusive_url) } - it { expect(subject.headers['content-type']).to eq('text/plain') } - it { expect(subject.params['a']).to eq('1') } - - context 'after manual changes' do - before do - subject.headers['content-length'] = 12 - subject.params['b'] = '2' - subject.options[:open_timeout] = 10 - end - - it { expect(subject.builder.handlers.size).to eq(1) } - it { expect(conn.builder.handlers.size).to eq(1) } - it { expect(conn.headers.key?('content-length')).to be_falsey } - it { expect(conn.params.key?('b')).to be_falsey } - it { expect(subject.options[:timeout]).to eq(5) } - it { expect(conn.options[:open_timeout]).to be_nil } - end - end - - describe '#respond_to?' do - it { expect(Faraday.respond_to?(:get)).to be_truthy } - it { expect(Faraday.respond_to?(:post)).to be_truthy } - end - - describe 'default_connection_options' do - context 'assigning a default value' do - before do - Faraday.default_connection_options = nil - Faraday.default_connection_options.request.timeout = 10 - end - - it_behaves_like 'default connection options' - end - - context 'assigning a hash' do - before { Faraday.default_connection_options = { request: { timeout: 10 } } } - - it_behaves_like 'default connection options' - end - - context 'preserving a user_agent assigned via default_conncetion_options' do - around do |example| - old = Faraday.default_connection_options - Faraday.default_connection_options = { headers: { user_agent: 'My Agent 1.2' } } - example.run - Faraday.default_connection_options = old - end - - context 'when url is a Hash' do - let(:conn) { Faraday.new(url: 'http://example.co', headers: { 'CustomHeader' => 'CustomValue' }) } - - it { expect(conn.headers).to eq('CustomHeader' => 'CustomValue', 'User-Agent' => 'My Agent 1.2') } - end - - context 'when url is a String' do - let(:conn) { Faraday.new('http://example.co', headers: { 'CustomHeader' => 'CustomValue' }) } - - it { expect(conn.headers).to eq('CustomHeader' => 'CustomValue', 'User-Agent' => 'My Agent 1.2') } - end - end - end - - describe 'request params' do - context 'with simple url' do - let(:url) { 'http://example.com' } - let(:stubs) { Faraday::Adapter::Test::Stubs.new } - - before do - conn.adapter(:test, stubs) - stubs.get('http://example.com?a=a&p=3') do - [200, {}, 'ok'] - end - end - - after { stubs.verify_stubbed_calls } - - it 'test_overrides_request_params' do - conn.get('?p=2&a=a', p: 3) - end - - it 'test_overrides_request_params_block' do - conn.get('?p=1&a=a', p: 2) do |req| - req.params[:p] = 3 - end - end - - it 'test_overrides_request_params_block_url' do - conn.get(nil, p: 2) do |req| - req.url('?p=1&a=a', 'p' => 3) - end - end - end - - context 'with url and extra params' do - let(:url) { 'http://example.com?a=1&b=2' } - let(:options) { { params: { c: 3 } } } - let(:stubs) { Faraday::Adapter::Test::Stubs.new } - - before do - conn.adapter(:test, stubs) - end - - it 'merges connection and request params' do - expected = 'http://example.com?a=1&b=2&c=3&limit=5&page=1' - stubs.get(expected) { [200, {}, 'ok'] } - conn.get('?page=1', limit: 5) - stubs.verify_stubbed_calls - end - - it 'allows to override all params' do - expected = 'http://example.com?b=b' - stubs.get(expected) { [200, {}, 'ok'] } - conn.get('?p=1&a=a', p: 2) do |req| - expect(req.params[:a]).to eq('a') - expect(req.params['c']).to eq(3) - expect(req.params['p']).to eq(2) - req.params = { b: 'b' } - expect(req.params['b']).to eq('b') - end - stubs.verify_stubbed_calls - end - - it 'allows to set params_encoder for single request' do - encoder = CustomEncoder.new - expected = 'http://example.com/?A-1,B-2,C-3,FEELING-BLUE' - stubs.get(expected) { [200, {}, 'ok'] } - - conn.get('/', a: 1, b: 2, c: 3, feeling: 'blue') do |req| - req.options.params_encoder = encoder - end - stubs.verify_stubbed_calls - end - end - - context 'with default params encoder' do - let(:stubs) { Faraday::Adapter::Test::Stubs.new } - - before do - conn.adapter(:test, stubs) - stubs.get('http://example.com?color%5B%5D=blue&color%5B%5D=red') do - [200, {}, 'ok'] - end - end - - after { stubs.verify_stubbed_calls } - - it 'supports array params in url' do - conn.get('http://example.com?color[]=blue&color[]=red') - end - - it 'supports array params in params' do - conn.get('http://example.com', color: %w[blue red]) - end - end - - context 'with flat params encoder' do - let(:options) { { request: { params_encoder: Faraday::FlatParamsEncoder } } } - let(:stubs) { Faraday::Adapter::Test::Stubs.new } - - before do - conn.adapter(:test, stubs) - stubs.get('http://example.com?color=blue&color=red') do - [200, {}, 'ok'] - end - end - - after { stubs.verify_stubbed_calls } - - it 'supports array params in params' do - conn.get('http://example.com', color: %w[blue red]) - end - - context 'with array param in url' do - let(:url) { 'http://example.com?color[]=blue&color[]=red' } - - it do - conn.get('/') - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/error_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/error_spec.rb deleted file mode 100644 index 170f3267..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/error_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Error do - describe '.initialize' do - subject { described_class.new(exception, response) } - let(:response) { nil } - - context 'with exception only' do - let(:exception) { RuntimeError.new('test') } - - it { expect(subject.wrapped_exception).to eq(exception) } - it { expect(subject.response).to be_nil } - it { expect(subject.message).to eq(exception.message) } - it { expect(subject.backtrace).to eq(exception.backtrace) } - it { expect(subject.inspect).to eq('#>') } - it { expect(subject.response_status).to be_nil } - it { expect(subject.response_headers).to be_nil } - it { expect(subject.response_body).to be_nil } - end - - context 'with response hash' do - let(:exception) { { status: 400 } } - - it { expect(subject.wrapped_exception).to be_nil } - it { expect(subject.response).to eq(exception) } - it { expect(subject.message).to eq('the server responded with status 400') } - if RUBY_VERSION >= '3.4' - it { expect(subject.inspect).to eq('#') } - else - it { expect(subject.inspect).to eq('#400}>') } - end - it { expect(subject.response_status).to eq(400) } - it { expect(subject.response_headers).to be_nil } - it { expect(subject.response_body).to be_nil } - end - - context 'with string' do - let(:exception) { 'custom message' } - - it { expect(subject.wrapped_exception).to be_nil } - it { expect(subject.response).to be_nil } - it { expect(subject.message).to eq('custom message') } - it { expect(subject.inspect).to eq('#>') } - it { expect(subject.response_status).to be_nil } - it { expect(subject.response_headers).to be_nil } - it { expect(subject.response_body).to be_nil } - end - - context 'with anything else #to_s' do - let(:exception) { %w[error1 error2] } - - it { expect(subject.wrapped_exception).to be_nil } - it { expect(subject.response).to be_nil } - it { expect(subject.message).to eq('["error1", "error2"]') } - it { expect(subject.inspect).to eq('#>') } - it { expect(subject.response_status).to be_nil } - it { expect(subject.response_headers).to be_nil } - it { expect(subject.response_body).to be_nil } - end - - context 'with exception string and response hash' do - let(:exception) { 'custom message' } - let(:response) { { status: 400 } } - - it { expect(subject.wrapped_exception).to be_nil } - it { expect(subject.response).to eq(response) } - it { expect(subject.message).to eq('custom message') } - if RUBY_VERSION >= '3.4' - it { expect(subject.inspect).to eq('#') } - else - it { expect(subject.inspect).to eq('#400}>') } - end - it { expect(subject.response_status).to eq(400) } - it { expect(subject.response_headers).to be_nil } - it { expect(subject.response_body).to be_nil } - end - - context 'with exception and response object' do - let(:exception) { RuntimeError.new('test') } - let(:body) { { test: 'test' } } - let(:headers) { { 'Content-Type' => 'application/json' } } - let(:response) { Faraday::Response.new(status: 400, response_headers: headers, response_body: body) } - - it { expect(subject.wrapped_exception).to eq(exception) } - it { expect(subject.response).to eq(response) } - it { expect(subject.message).to eq(exception.message) } - it { expect(subject.backtrace).to eq(exception.backtrace) } - it { expect(subject.response_status).to eq(400) } - it { expect(subject.response_headers).to eq(headers) } - it { expect(subject.response_body).to eq(body) } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/middleware_registry_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/middleware_registry_spec.rb deleted file mode 100644 index a8fa7cc7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/middleware_registry_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::MiddlewareRegistry do - before do - stub_const('CustomMiddleware', custom_middleware_klass) - end - let(:custom_middleware_klass) { Class.new(Faraday::Middleware) } - let(:dummy) { Class.new { extend Faraday::MiddlewareRegistry } } - - after { dummy.unregister_middleware(:custom) } - - it 'allows to register with constant' do - dummy.register_middleware(custom: custom_middleware_klass) - expect(dummy.lookup_middleware(:custom)).to eq(custom_middleware_klass) - end - - it 'allows to register with symbol' do - dummy.register_middleware(custom: :CustomMiddleware) - expect(dummy.lookup_middleware(:custom)).to eq(custom_middleware_klass) - end - - it 'allows to register with string' do - dummy.register_middleware(custom: 'CustomMiddleware') - expect(dummy.lookup_middleware(:custom)).to eq(custom_middleware_klass) - end - - it 'allows to register with Proc' do - dummy.register_middleware(custom: -> { custom_middleware_klass }) - expect(dummy.lookup_middleware(:custom)).to eq(custom_middleware_klass) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/middleware_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/middleware_spec.rb deleted file mode 100644 index da1d3685..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/middleware_spec.rb +++ /dev/null @@ -1,213 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Middleware do - subject { described_class.new(app) } - let(:app) { double } - - describe 'options' do - context 'when options are passed to the middleware' do - subject { described_class.new(app, options) } - let(:options) { { field: 'value' } } - - it 'accepts options when initialized' do - expect(subject.options[:field]).to eq('value') - end - end - end - - describe '#on_request' do - subject do - Class.new(described_class) do - def on_request(env) - # do nothing - end - end.new(app) - end - - it 'is called by #call' do - expect(app).to receive(:call).and_return(app) - expect(app).to receive(:on_complete) - is_expected.to receive(:call).and_call_original - is_expected.to receive(:on_request) - subject.call(double) - end - end - - describe '#on_error' do - subject do - Class.new(described_class) do - def on_error(error) - # do nothing - end - end.new(app) - end - - it 'is called by #call' do - expect(app).to receive(:call).and_raise(Faraday::ConnectionFailed) - is_expected.to receive(:call).and_call_original - is_expected.to receive(:on_error) - - expect { subject.call(double) }.to raise_error(Faraday::ConnectionFailed) - end - end - - describe '#close' do - context "with app that doesn't support \#close" do - it 'should issue warning' do - is_expected.to receive(:warn) - subject.close - end - end - - context "with app that supports \#close" do - it 'should issue warning' do - expect(app).to receive(:close) - is_expected.to_not receive(:warn) - subject.close - end - end - end - - describe '::default_options' do - let(:subclass_no_options) { FaradayMiddlewareSubclasses::SubclassNoOptions } - let(:subclass_one_option) { FaradayMiddlewareSubclasses::SubclassOneOption } - let(:subclass_two_options) { FaradayMiddlewareSubclasses::SubclassTwoOptions } - - def build_conn(resp_middleware) - Faraday.new do |c| - c.adapter :test do |stub| - stub.get('/success') { [200, {}, 'ok'] } - end - c.response resp_middleware - end - end - - RSpec.shared_context 'reset @default_options' do - before(:each) do - FaradayMiddlewareSubclasses::SubclassNoOptions.instance_variable_set(:@default_options, nil) - FaradayMiddlewareSubclasses::SubclassOneOption.instance_variable_set(:@default_options, nil) - FaradayMiddlewareSubclasses::SubclassTwoOptions.instance_variable_set(:@default_options, nil) - Faraday::Middleware.instance_variable_set(:@default_options, nil) - end - end - - after(:all) do - FaradayMiddlewareSubclasses::SubclassNoOptions.instance_variable_set(:@default_options, nil) - FaradayMiddlewareSubclasses::SubclassOneOption.instance_variable_set(:@default_options, nil) - FaradayMiddlewareSubclasses::SubclassTwoOptions.instance_variable_set(:@default_options, nil) - Faraday::Middleware.instance_variable_set(:@default_options, nil) - end - - context 'with subclass DEFAULT_OPTIONS defined' do - include_context 'reset @default_options' - - context 'and without application options configured' do - let(:resp1) { build_conn(:one_option).get('/success') } - - it 'has only subclass defaults' do - expect(Faraday::Middleware.default_options).to eq(Faraday::Middleware::DEFAULT_OPTIONS) - expect(subclass_no_options.default_options).to eq(subclass_no_options::DEFAULT_OPTIONS) - expect(subclass_one_option.default_options).to eq(subclass_one_option::DEFAULT_OPTIONS) - expect(subclass_two_options.default_options).to eq(subclass_two_options::DEFAULT_OPTIONS) - end - - it { expect(resp1.body).to eq('ok') } - end - - context "and with one application's options changed" do - let(:resp2) { build_conn(:two_options).get('/success') } - - before(:each) do - FaradayMiddlewareSubclasses::SubclassTwoOptions.default_options = { some_option: false } - end - - it 'only updates default options of target subclass' do - expect(Faraday::Middleware.default_options).to eq(Faraday::Middleware::DEFAULT_OPTIONS) - expect(subclass_no_options.default_options).to eq(subclass_no_options::DEFAULT_OPTIONS) - expect(subclass_one_option.default_options).to eq(subclass_one_option::DEFAULT_OPTIONS) - expect(subclass_two_options.default_options).to eq({ some_option: false, some_other_option: false }) - end - - it { expect(resp2.body).to eq('ok') } - end - - context "and with two applications' options changed" do - let(:resp1) { build_conn(:one_option).get('/success') } - let(:resp2) { build_conn(:two_options).get('/success') } - - before(:each) do - FaradayMiddlewareSubclasses::SubclassOneOption.default_options = { some_other_option: true } - FaradayMiddlewareSubclasses::SubclassTwoOptions.default_options = { some_option: false } - end - - it 'updates subclasses and parent independent of each other' do - expect(Faraday::Middleware.default_options).to eq(Faraday::Middleware::DEFAULT_OPTIONS) - expect(subclass_no_options.default_options).to eq(subclass_no_options::DEFAULT_OPTIONS) - expect(subclass_one_option.default_options).to eq({ some_other_option: true }) - expect(subclass_two_options.default_options).to eq({ some_option: false, some_other_option: false }) - end - - it { expect(resp1.body).to eq('ok') } - it { expect(resp2.body).to eq('ok') } - end - end - - context 'with FARADAY::MIDDLEWARE DEFAULT_OPTIONS and with Subclass DEFAULT_OPTIONS' do - before(:each) do - stub_const('Faraday::Middleware::DEFAULT_OPTIONS', { its_magic: false }) - end - - # Must stub Faraday::Middleware::DEFAULT_OPTIONS before resetting default options - include_context 'reset @default_options' - - context 'and without application options configured' do - let(:resp1) { build_conn(:one_option).get('/success') } - - it 'has only subclass defaults' do - expect(Faraday::Middleware.default_options).to eq(Faraday::Middleware::DEFAULT_OPTIONS) - expect(FaradayMiddlewareSubclasses::SubclassNoOptions.default_options).to eq({ its_magic: false }) - expect(FaradayMiddlewareSubclasses::SubclassOneOption.default_options).to eq({ its_magic: false, some_other_option: false }) - expect(FaradayMiddlewareSubclasses::SubclassTwoOptions.default_options).to eq({ its_magic: false, some_option: true, some_other_option: false }) - end - - it { expect(resp1.body).to eq('ok') } - end - - context "and with two applications' options changed" do - let(:resp1) { build_conn(:one_option).get('/success') } - let(:resp2) { build_conn(:two_options).get('/success') } - - before(:each) do - FaradayMiddlewareSubclasses::SubclassOneOption.default_options = { some_other_option: true } - FaradayMiddlewareSubclasses::SubclassTwoOptions.default_options = { some_option: false } - end - - it 'updates subclasses and parent independent of each other' do - expect(Faraday::Middleware.default_options).to eq(Faraday::Middleware::DEFAULT_OPTIONS) - expect(FaradayMiddlewareSubclasses::SubclassNoOptions.default_options).to eq({ its_magic: false }) - expect(FaradayMiddlewareSubclasses::SubclassOneOption.default_options).to eq({ its_magic: false, some_other_option: true }) - expect(FaradayMiddlewareSubclasses::SubclassTwoOptions.default_options).to eq({ its_magic: false, some_option: false, some_other_option: false }) - end - - it { expect(resp1.body).to eq('ok') } - it { expect(resp2.body).to eq('ok') } - end - end - - describe 'default_options input validation' do - include_context 'reset @default_options' - - it 'raises error if Faraday::Middleware option does not exist' do - expect { Faraday::Middleware.default_options = { something_special: true } }.to raise_error(Faraday::InitializationError) do |e| - expect(e.message).to eq('Invalid options provided. Keys not found in Faraday::Middleware::DEFAULT_OPTIONS: something_special') - end - end - - it 'raises error if subclass option does not exist' do - expect { subclass_one_option.default_options = { this_is_a_typo: true } }.to raise_error(Faraday::InitializationError) do |e| - expect(e.message).to eq('Invalid options provided. Keys not found in FaradayMiddlewareSubclasses::SubclassOneOption::DEFAULT_OPTIONS: this_is_a_typo') - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/env_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/env_spec.rb deleted file mode 100644 index 006bd5fb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/env_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Env do - subject(:env) { described_class.new } - - it 'allows to access members' do - expect(env.method).to be_nil - env.method = :get - expect(env.method).to eq(:get) - end - - it 'allows to access symbol non members' do - expect(env[:custom]).to be_nil - env[:custom] = :boom - expect(env[:custom]).to eq(:boom) - end - - it 'allows to access string non members' do - expect(env['custom']).to be_nil - env['custom'] = :boom - expect(env['custom']).to eq(:boom) - end - - it 'ignores false when fetching' do - ssl = Faraday::SSLOptions.new - ssl.verify = false - expect(ssl.fetch(:verify, true)).to be_falsey - end - - it 'handle verify_hostname when fetching' do - ssl = Faraday::SSLOptions.new - ssl.verify_hostname = true - expect(ssl.fetch(:verify_hostname, false)).to be_truthy - end - - it 'retains custom members' do - env[:foo] = 'custom 1' - env[:bar] = :custom2 - env2 = Faraday::Env.from(env) - env2[:baz] = 'custom 3' - - expect(env2[:foo]).to eq('custom 1') - expect(env2[:bar]).to eq(:custom2) - expect(env[:baz]).to be_nil - end - - describe '#body' do - subject(:env) { described_class.from(body: { foo: 'bar' }) } - - context 'when response is not finished yet' do - it 'returns the request body' do - expect(env.body).to eq(foo: 'bar') - end - end - - context 'when response is finished' do - before do - env.status = 200 - env.body = { bar: 'foo' } - env.response = Faraday::Response.new(env) - end - - it 'returns the response body' do - expect(env.body).to eq(bar: 'foo') - end - - it 'allows to access request_body' do - expect(env.request_body).to eq(foo: 'bar') - end - - it 'allows to access response_body' do - expect(env.response_body).to eq(bar: 'foo') - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/options_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/options_spec.rb deleted file mode 100644 index fc0b117a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/options_spec.rb +++ /dev/null @@ -1,297 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Options do - SubOptions = Class.new(Faraday::Options.new(:sub_a, :sub_b)) - ParentOptions = Faraday::Options.new(:a, :b, :c) do - options c: SubOptions - end - - describe '#merge' do - it 'merges options with hashes' do - options = ParentOptions.new(1) - expect(options.a).to eq(1) - expect(options.b).to be_nil - - dup = options.merge a: 2, b: 3 - expect(dup.a).to eq(2) - expect(dup.b).to eq(3) - expect(options.a).to eq(1) - expect(options.b).to be_nil - end - - it 'deeply merges two options' do - sub_opts1 = SubOptions.from(sub_a: 3) - sub_opts2 = SubOptions.from(sub_b: 4) - opt1 = ParentOptions.from(a: 1, c: sub_opts1) - opt2 = ParentOptions.from(b: 2, c: sub_opts2) - - merged = opt1.merge(opt2) - - expected_sub_opts = SubOptions.from(sub_a: 3, sub_b: 4) - expected = ParentOptions.from(a: 1, b: 2, c: expected_sub_opts) - expect(merged).to eq(expected) - end - - it 'deeply merges options with hashes' do - sub_opts1 = SubOptions.from(sub_a: 3) - sub_opts2 = { sub_b: 4 } - opt1 = ParentOptions.from(a: 1, c: sub_opts1) - opt2 = { b: 2, c: sub_opts2 } - - merged = opt1.merge(opt2) - - expected_sub_opts = SubOptions.from(sub_a: 3, sub_b: 4) - expected = ParentOptions.from(a: 1, b: 2, c: expected_sub_opts) - expect(merged).to eq(expected) - end - - it 'deeply merges options with nil' do - sub_opts = SubOptions.new(3, 4) - options = ParentOptions.new(1, 2, sub_opts) - expect(options.a).to eq(1) - expect(options.b).to eq(2) - expect(options.c.sub_a).to eq(3) - expect(options.c.sub_b).to eq(4) - - options2 = ParentOptions.from(b: 5, c: nil) - - merged = options.merge(options2) - - expect(merged.b).to eq(5) - expect(merged.c).to eq(sub_opts) - end - - it 'deeply merges options with options having nil sub-options' do - options = ParentOptions.from(a: 1) - - sub_opts = SubOptions.new(3, 4) - options2 = ParentOptions.from(b: 2, c: sub_opts) - - expect(options.a).to eq(1) - expect(options2.b).to eq(2) - expect(options2.c.sub_a).to eq(3) - expect(options2.c.sub_b).to eq(4) - - merged = options.merge(options2) - - expect(merged.c).to eq(sub_opts) - end - - describe '#dup' do - it 'duplicate options but not sub-options' do - sub_opts = SubOptions.from(sub_a: 3) - opts = ParentOptions.from(b: 1, c: sub_opts) - - duped = opts.dup - duped.b = 2 - duped.c.sub_a = 4 - - expect(opts.b).to eq(1) - expect(opts.c.sub_a).to eq(4) - end - end - - describe '#deep_dup' do - it 'duplicate options and also suboptions' do - sub_opts = SubOptions.from(sub_a: 3) - opts = ParentOptions.from(b: 1, c: sub_opts) - - duped = opts.deep_dup - duped.b = 2 - duped.c.sub_a = 4 - - expect(opts.b).to eq(1) - expect(opts.c.sub_a).to eq(3) - end - end - - describe '#clear' do - it 'clears the options' do - options = SubOptions.new(1) - expect(options.empty?).not_to be_truthy - options.clear - expect(options.empty?).to be_truthy - end - end - - describe '#empty?' do - it 'returns true only if all options are nil' do - options = SubOptions.new - expect(options.empty?).to be_truthy - options.sub_a = 1 - expect(options.empty?).not_to be_truthy - options.delete(:sub_a) - expect(options.empty?).to be_truthy - end - end - - describe '#each_key' do - it 'allows to iterate through keys' do - options = ParentOptions.new(1, 2, 3) - enum = options.each_key - expect(enum.next.to_sym).to eq(:a) - expect(enum.next.to_sym).to eq(:b) - expect(enum.next.to_sym).to eq(:c) - end - end - - describe '#key?' do - it 'returns true if the key exists and is not nil' do - options = SubOptions.new - expect(options.key?(:sub_a)).not_to be_truthy - options.sub_a = 1 - expect(options.key?(:sub_a)).to be_truthy - end - end - - describe '#each_value' do - it 'allows to iterate through values' do - options = ParentOptions.new(1, 2, 3) - enum = options.each_value - expect(enum.next).to eq(1) - expect(enum.next).to eq(2) - expect(enum.next).to eq(3) - end - end - - describe '#value?' do - it 'returns true if any key has that value' do - options = SubOptions.new - expect(options.value?(1)).not_to be_truthy - options.sub_a = 1 - expect(options.value?(1)).to be_truthy - end - end - - describe '#update' do - it 'updates options from hashes' do - options = ParentOptions.new(1) - expect(options.a).to eq(1) - expect(options.b).to be_nil - - updated = options.update a: 2, b: 3 - expect(options.a).to eq(2) - expect(options.b).to eq(3) - expect(updated).to eq(options) - end - end - - describe '#delete' do - it 'allows to remove value for key' do - options = ParentOptions.new(1) - expect(options.a).to eq(1) - expect(options.delete(:a)).to eq(1) - expect(options.a).to be_nil - end - end - - describe '#from' do - it { expect { ParentOptions.from invalid: 1 }.to raise_error(NoMethodError) } - - it 'works with options' do - options = ParentOptions.new(1) - - value = ParentOptions.from(options) - expect(value.a).to eq(1) - expect(value.b).to be_nil - end - - it 'works with options with sub object' do - sub = SubOptions.new(1) - options = ParentOptions.from a: 1, c: sub - expect(options).to be_a_kind_of(ParentOptions) - expect(options.a).to eq(1) - expect(options.b).to be_nil - expect(options.c).to be_a_kind_of(SubOptions) - expect(options.c.sub_a).to eq(1) - end - - it 'works with hash' do - options = ParentOptions.from a: 1 - expect(options).to be_a_kind_of(ParentOptions) - expect(options.a).to eq(1) - expect(options.b).to be_nil - end - - it 'works with hash with sub object' do - options = ParentOptions.from a: 1, c: { sub_a: 1 } - expect(options).to be_a_kind_of(ParentOptions) - expect(options.a).to eq(1) - expect(options.b).to be_nil - expect(options.c).to be_a_kind_of(SubOptions) - expect(options.c.sub_a).to eq(1) - end - - it 'works with deep hash' do - hash = { b: 1 } - options = ParentOptions.from a: hash - expect(options.a[:b]).to eq(1) - - hash[:b] = 2 - expect(options.a[:b]).to eq(1) - - options.a[:b] = 3 - expect(hash[:b]).to eq(2) - expect(options.a[:b]).to eq(3) - end - - it 'works with nil' do - options = ParentOptions.from(nil) - expect(options).to be_a_kind_of(ParentOptions) - expect(options.a).to be_nil - expect(options.b).to be_nil - end - - it 'respects inheritance' do - subclass = Class.new(ParentOptions) - options = subclass.from(c: { sub_a: 'hello' }) - expect(options.c).to be_a_kind_of(SubOptions) - expect(options.c.sub_a).to eq('hello') - end - end - - describe '#memoized' do - subject(:options_class) { Class.new(ParentOptions) } - it 'requires block' do - expect { options_class.memoized(:a) }.to raise_error(ArgumentError) - end - - it 'accepts block' do - options_class.memoized(:a) { :foo } - expect(options_class.new.a).to eql(:foo) - end - end - - describe '#fetch' do - subject { SubOptions.new } - - context 'when the fetched key has no value' do - it 'uses falsey default' do - expect(subject.fetch(:sub_a, false) { |_| :blah }).to be_falsey - end - - it 'accepts block' do - expect(subject.fetch(:sub_a) { |k| "yo #{k.inspect}" }).to eq('yo :sub_a') - end - - it 'needs a default if key is missing' do - expect { subject.fetch(:sub_a) }.to raise_error(Faraday::Options.fetch_error_class) - end - end - - context 'when the fetched key has a value' do - before do - subject.sub_a = 1 - end - - it 'grabs value' do - expect(subject.fetch(:sub_a, false) { |_| :blah }).to eq(1) - end - - it 'works with key' do - expect(subject.fetch(:sub_a)).to eq(1) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/proxy_options_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/proxy_options_spec.rb deleted file mode 100644 index 15203edb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/proxy_options_spec.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::ProxyOptions do - describe '#from' do - it 'works with string' do - options = Faraday::ProxyOptions.from 'http://user:pass@example.org' - expect(options.user).to eq('user') - expect(options.password).to eq('pass') - expect(options.uri).to be_a_kind_of(URI) - expect(options.path).to eq('') - expect(options.port).to eq(80) - expect(options.host).to eq('example.org') - expect(options.scheme).to eq('http') - expect(options.inspect).to match('#') - end - - it 'works with hash' do - hash = { user: 'user', password: 'pass', uri: 'http://@example.org' } - options = Faraday::ProxyOptions.from(hash) - expect(options.user).to eq('user') - expect(options.password).to eq('pass') - expect(options.uri).to be_a_kind_of(URI) - expect(options.path).to eq('') - expect(options.port).to eq(80) - expect(options.host).to eq('example.org') - expect(options.scheme).to eq('http') - expect(options.inspect).to match('# empty string - options = Faraday::ProxyOptions.from proxy_string - expect(options).to be_a_kind_of(Faraday::ProxyOptions) - expect(options.inspect).to eq('#') - end - end - - it 'allows hash access' do - proxy = Faraday::ProxyOptions.from 'http://a%40b:pw%20d@example.org' - expect(proxy.user).to eq('a@b') - expect(proxy[:user]).to eq('a@b') - expect(proxy.password).to eq('pw d') - expect(proxy[:password]).to eq('pw d') - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/request_options_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/request_options_spec.rb deleted file mode 100644 index 8c1bb992..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/options/request_options_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::RequestOptions do - subject(:options) { Faraday::RequestOptions.new } - - it 'allows to set the request proxy' do - expect(options.proxy).to be_nil - - expect { options[:proxy] = { booya: 1 } }.to raise_error(NoMethodError) - - options[:proxy] = { user: 'user' } - expect(options.proxy).to be_a_kind_of(Faraday::ProxyOptions) - expect(options.proxy.user).to eq('user') - - options.proxy = nil - expect(options.proxy).to be_nil - expect(options.inspect).to eq('#') - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/params_encoders/flat_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/params_encoders/flat_spec.rb deleted file mode 100644 index 115342e5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/params_encoders/flat_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -require 'rack/utils' - -RSpec.describe Faraday::FlatParamsEncoder do - it_behaves_like 'a params encoder' - - it 'decodes arrays' do - query = 'a=one&a=two&a=three' - expected = { 'a' => %w[one two three] } - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes boolean values' do - query = 'a=true&b=false' - expected = { 'a' => 'true', 'b' => 'false' } - expect(subject.decode(query)).to eq(expected) - end - - it 'encodes boolean values' do - params = { a: true, b: false } - expect(subject.encode(params)).to eq('a=true&b=false') - end - - it 'encodes boolean values in array' do - params = { a: [true, false] } - expect(subject.encode(params)).to eq('a=true&a=false') - end - - it 'encodes empty array in hash' do - params = { a: [] } - expect(subject.encode(params)).to eq('a=') - end - - it 'encodes unsorted when asked' do - params = { b: false, a: true } - expect(subject.encode(params)).to eq('a=true&b=false') - Faraday::FlatParamsEncoder.sort_params = false - expect(subject.encode(params)).to eq('b=false&a=true') - Faraday::FlatParamsEncoder.sort_params = true - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/params_encoders/nested_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/params_encoders/nested_spec.rb deleted file mode 100644 index 83da22dc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/params_encoders/nested_spec.rb +++ /dev/null @@ -1,151 +0,0 @@ -# frozen_string_literal: true - -require 'rack/utils' - -RSpec.describe Faraday::NestedParamsEncoder do - it_behaves_like 'a params encoder' - - it 'decodes arrays' do - query = 'a[1]=one&a[2]=two&a[3]=three' - expected = { 'a' => %w[one two three] } - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes hashes' do - query = 'a[b1]=one&a[b2]=two&a[b][c]=foo' - expected = { 'a' => { 'b1' => 'one', 'b2' => 'two', 'b' => { 'c' => 'foo' } } } - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes nested arrays rack compat' do - query = 'a[][one]=1&a[][two]=2&a[][one]=3&a[][two]=4' - expected = Rack::Utils.parse_nested_query(query) - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes nested array mixed types' do - query = 'a[][one]=1&a[]=2&a[]=&a[]' - expected = Rack::Utils.parse_nested_query(query) - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes nested ignores invalid array' do - query = '[][a]=1&b=2' - expected = { 'a' => '1', 'b' => '2' } - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes nested ignores repeated array notation' do - query = 'a[][][]=1' - expected = { 'a' => ['1'] } - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes nested ignores malformed keys' do - query = '=1&[]=2' - expected = {} - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes nested subkeys dont have to be in brackets' do - query = 'a[b]c[d]e=1' - expected = { 'a' => { 'b' => { 'c' => { 'd' => { 'e' => '1' } } } } } - expect(subject.decode(query)).to eq(expected) - end - - it 'decodes nested final value overrides any type' do - query = 'a[b][c]=1&a[b]=2' - expected = { 'a' => { 'b' => '2' } } - expect(subject.decode(query)).to eq(expected) - end - - it 'encodes rack compat' do - params = { a: [{ one: '1', two: '2' }, '3', ''] } - result = Faraday::Utils.unescape(Faraday::NestedParamsEncoder.encode(params)).split('&') - escaped = Rack::Utils.build_nested_query(params) - expected = Rack::Utils.unescape(escaped).split('&') - expect(result).to match_array(expected) - end - - it 'encodes empty string array value' do - expected = 'baz=&foo%5Bbar%5D=' - result = Faraday::NestedParamsEncoder.encode(foo: { bar: '' }, baz: '') - expect(result).to eq(expected) - end - - it 'encodes nil array value' do - expected = 'baz&foo%5Bbar%5D' - result = Faraday::NestedParamsEncoder.encode(foo: { bar: nil }, baz: nil) - expect(result).to eq(expected) - end - - it 'encodes empty array value' do - expected = 'baz%5B%5D&foo%5Bbar%5D%5B%5D' - result = Faraday::NestedParamsEncoder.encode(foo: { bar: [] }, baz: []) - expect(result).to eq(expected) - end - - it 'encodes boolean values' do - params = { a: true, b: false } - expect(subject.encode(params)).to eq('a=true&b=false') - end - - it 'encodes boolean values in array' do - params = { a: [true, false] } - expect(subject.encode(params)).to eq('a%5B%5D=true&a%5B%5D=false') - end - - it 'encodes unsorted when asked' do - params = { b: false, a: true } - expect(subject.encode(params)).to eq('a=true&b=false') - Faraday::NestedParamsEncoder.sort_params = false - expect(subject.encode(params)).to eq('b=false&a=true') - Faraday::NestedParamsEncoder.sort_params = true - end - - it 'encodes arrays indices when asked' do - params = { a: [0, 1, 2] } - expect(subject.encode(params)).to eq('a%5B%5D=0&a%5B%5D=1&a%5B%5D=2') - Faraday::NestedParamsEncoder.array_indices = true - expect(subject.encode(params)).to eq('a%5B0%5D=0&a%5B1%5D=1&a%5B2%5D=2') - Faraday::NestedParamsEncoder.array_indices = false - end - - shared_examples 'a wrong decoding' do - it do - expect { subject.decode(query) }.to raise_error(TypeError) do |e| - expect(e.message).to eq(error_message) - end - end - end - - context 'when expecting hash but getting string' do - let(:query) { 'a=1&a[b]=2' } - let(:error_message) { "expected Hash (got String) for param `a'" } - it_behaves_like 'a wrong decoding' - end - - context 'when expecting hash but getting array' do - let(:query) { 'a[]=1&a[b]=2' } - let(:error_message) { "expected Hash (got Array) for param `a'" } - it_behaves_like 'a wrong decoding' - end - - context 'when expecting nested hash but getting non nested' do - let(:query) { 'a[b]=1&a[b][c]=2' } - let(:error_message) { "expected Hash (got String) for param `b'" } - it_behaves_like 'a wrong decoding' - end - - context 'when expecting array but getting hash' do - let(:query) { 'a[b]=1&a[]=2' } - let(:error_message) { "expected Array (got Hash) for param `a'" } - it_behaves_like 'a wrong decoding' - end - - context 'when expecting array but getting string' do - let(:query) { 'a=1&a[]=2' } - let(:error_message) { "expected Array (got String) for param `a'" } - it_behaves_like 'a wrong decoding' - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/rack_builder_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/rack_builder_spec.rb deleted file mode 100644 index 89f17ca9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/rack_builder_spec.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::RackBuilder do - # mock handler classes - (Handler = Struct.new(:app)).class_eval do - def call(env) - env[:request_headers]['X-Middleware'] ||= '' - env[:request_headers]['X-Middleware'] += ":#{self.class.name.split('::').last}" - app.call(env) - end - end - - class Apple < Handler - end - - class Orange < Handler - end - - class Banana < Handler - end - - subject { conn.builder } - before { Faraday.default_adapter = :test } - after { Faraday.default_adapter = nil } - - context 'with default stack' do - let(:conn) { Faraday::Connection.new } - - it { expect(subject[0]).to eq(Faraday::Request.lookup_middleware(:url_encoded)) } - it { expect(subject.adapter).to eq(Faraday::Adapter.lookup_middleware(Faraday.default_adapter)) } - end - - context 'with custom empty block' do - let(:conn) { Faraday::Connection.new {} } - - it { expect(subject[0]).to be_nil } - it { expect(subject.adapter).to eq(Faraday::Adapter.lookup_middleware(Faraday.default_adapter)) } - end - - context 'with custom adapter only' do - let(:conn) do - Faraday::Connection.new do |builder| - builder.adapter :test do |stub| - stub.get('/') { |_| [200, {}, ''] } - end - end - end - - it { expect(subject[0]).to be_nil } - it { expect(subject.adapter).to eq(Faraday::Adapter.lookup_middleware(:test)) } - end - - context 'with custom handler and adapter' do - let(:conn) do - Faraday::Connection.new do |builder| - builder.use Apple - builder.adapter :test do |stub| - stub.get('/') { |_| [200, {}, ''] } - end - end - end - - it 'locks the stack after making a request' do - expect(subject.locked?).to be_falsey - conn.get('/') - expect(subject.locked?).to be_truthy - expect { subject.use(Orange) }.to raise_error(Faraday::RackBuilder::StackLocked) - end - - it 'dup stack is unlocked' do - expect(subject.locked?).to be_falsey - subject.lock! - expect(subject.locked?).to be_truthy - dup = subject.dup - expect(dup).to eq(subject) - expect(dup.locked?).to be_falsey - end - - it 'allows to compare handlers' do - expect(subject.handlers.first).to eq(Faraday::RackBuilder::Handler.new(Apple)) - end - end - - context 'when having a single handler' do - let(:conn) { Faraday::Connection.new {} } - - before { subject.use(Apple) } - - it { expect(subject.handlers).to eq([Apple]) } - - it 'allows use' do - subject.use(Orange) - expect(subject.handlers).to eq([Apple, Orange]) - end - - it 'allows insert_before' do - subject.insert_before(Apple, Orange) - expect(subject.handlers).to eq([Orange, Apple]) - end - - it 'allows insert_after' do - subject.insert_after(Apple, Orange) - expect(subject.handlers).to eq([Apple, Orange]) - end - - it 'raises an error trying to use an unregistered symbol' do - expect { subject.use(:apple) }.to raise_error(Faraday::Error) do |err| - expect(err.message).to eq(':apple is not registered on Faraday::Middleware') - end - end - end - - context 'when having two handlers' do - let(:conn) { Faraday::Connection.new {} } - - before do - subject.use(Apple) - subject.use(Orange) - end - - it 'allows insert_before' do - subject.insert_before(Orange, Banana) - expect(subject.handlers).to eq([Apple, Banana, Orange]) - end - - it 'allows insert_after' do - subject.insert_after(Apple, Banana) - expect(subject.handlers).to eq([Apple, Banana, Orange]) - end - - it 'allows to swap handlers' do - subject.swap(Apple, Banana) - expect(subject.handlers).to eq([Banana, Orange]) - end - - it 'allows to delete a handler' do - subject.delete(Apple) - expect(subject.handlers).to eq([Orange]) - end - end - - context 'when adapter is added with named options' do - after { Faraday.default_adapter_options = {} } - let(:conn) { Faraday::Connection.new {} } - - let(:cat_adapter) do - Class.new(Faraday::Adapter) do - attr_accessor :name - - def initialize(app, name:) - super(app) - @name = name - end - end - end - - let(:cat) { subject.adapter.build } - - it 'adds a handler to construct adapter with named options' do - Faraday.default_adapter = cat_adapter - Faraday.default_adapter_options = { name: 'Chloe' } - expect { cat }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(cat.name).to eq 'Chloe' - end - end - - context 'when middleware is added with named arguments' do - let(:conn) { Faraday::Connection.new {} } - - let(:dog_middleware) do - Class.new(Faraday::Middleware) do - attr_accessor :name - - def initialize(app, name:) - super(app) - @name = name - end - end - end - let(:dog) do - subject.handlers.find { |handler| handler == dog_middleware }.build - end - - it 'adds a handler to construct middleware with options passed to use' do - subject.use dog_middleware, name: 'Rex' - expect { dog }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(dog.name).to eq('Rex') - end - end - - context 'when a middleware is added with named arguments' do - let(:conn) { Faraday::Connection.new {} } - - let(:cat_request) do - Class.new(Faraday::Middleware) do - attr_accessor :name - - def initialize(app, name:) - super(app) - @name = name - end - end - end - let(:cat) do - subject.handlers.find { |handler| handler == cat_request }.build - end - - it 'adds a handler to construct request adapter with options passed to request' do - Faraday::Request.register_middleware cat_request: cat_request - subject.request :cat_request, name: 'Felix' - expect { cat }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(cat.name).to eq('Felix') - end - end - - context 'when a middleware is added with named arguments' do - let(:conn) { Faraday::Connection.new {} } - - let(:fish_response) do - Class.new(Faraday::Middleware) do - attr_accessor :name - - def initialize(app, name:) - super(app) - @name = name - end - end - end - let(:fish) do - subject.handlers.find { |handler| handler == fish_response }.build - end - - it 'adds a handler to construct response adapter with options passed to response' do - Faraday::Response.register_middleware fish_response: fish_response - subject.response :fish_response, name: 'Bubbles' - expect { fish }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(fish.name).to eq('Bubbles') - end - end - - context 'when a plain adapter is added with named arguments' do - let(:conn) { Faraday::Connection.new {} } - - let(:rabbit_adapter) do - Class.new(Faraday::Adapter) do - attr_accessor :name - - def initialize(app, name:) - super(app) - @name = name - end - end - end - let(:rabbit) do - subject.adapter.build - end - - it 'adds a handler to construct adapter with options passed to adapter' do - Faraday::Adapter.register_middleware rabbit_adapter: rabbit_adapter - subject.adapter :rabbit_adapter, name: 'Thumper' - expect { rabbit }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(rabbit.name).to eq('Thumper') - end - end - - context 'when handlers are directly added or updated' do - let(:conn) { Faraday::Connection.new {} } - - let(:rock_handler) do - Class.new do - attr_accessor :name - - def initialize(_app, name:) - @name = name - end - end - end - let(:rock) do - subject.handlers.find { |handler| handler == rock_handler }.build - end - - it 'adds a handler to construct adapter with options passed to insert' do - subject.insert 0, rock_handler, name: 'Stony' - expect { rock }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(rock.name).to eq('Stony') - end - - it 'adds a handler with options passed to insert_after' do - subject.insert_after 0, rock_handler, name: 'Rocky' - expect { rock }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(rock.name).to eq('Rocky') - end - - it 'adds a handler with options passed to swap' do - subject.insert 0, rock_handler, name: 'Flint' - subject.swap 0, rock_handler, name: 'Chert' - expect { rock }.to_not output( - /warning: Using the last argument as keyword parameters is deprecated/ - ).to_stderr - expect(rock.name).to eq('Chert') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/authorization_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/authorization_spec.rb deleted file mode 100644 index 437c88ae..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/authorization_spec.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Request::Authorization do - let(:conn) do - Faraday.new do |b| - b.request :authorization, auth_type, *auth_config - b.adapter :test do |stub| - stub.get('/auth-echo') do |env| - [200, {}, env[:request_headers]['Authorization']] - end - end - end - end - - shared_examples 'does not interfere with existing authentication' do - context 'and request already has an authentication header' do - let(:response) { conn.get('/auth-echo', nil, authorization: 'OAuth oauth_token') } - - it 'does not interfere with existing authorization' do - expect(response.body).to eq('OAuth oauth_token') - end - end - end - - let(:response) { conn.get('/auth-echo') } - - describe 'basic_auth' do - let(:auth_type) { :basic } - - context 'when passed correct params' do - let(:auth_config) { %w[aladdin opensesame] } - - it { expect(response.body).to eq('Basic YWxhZGRpbjpvcGVuc2VzYW1l') } - - include_examples 'does not interfere with existing authentication' - end - - context 'when passed very long values' do - let(:auth_config) { ['A' * 255, ''] } - - it { expect(response.body).to eq("Basic #{'QUFB' * 85}Og==") } - - include_examples 'does not interfere with existing authentication' - end - end - - describe 'authorization' do - let(:auth_type) { :Bearer } - - context 'when passed a string' do - let(:auth_config) { ['custom'] } - - it { expect(response.body).to eq('Bearer custom') } - - include_examples 'does not interfere with existing authentication' - end - - context 'when passed a proc' do - let(:auth_config) { [-> { 'custom_from_proc' }] } - - it { expect(response.body).to eq('Bearer custom_from_proc') } - - include_examples 'does not interfere with existing authentication' - end - - context 'when passed a callable' do - let(:callable) { double('Callable Authorizer', call: 'custom_from_callable') } - let(:auth_config) { [callable] } - - it { expect(response.body).to eq('Bearer custom_from_callable') } - - include_examples 'does not interfere with existing authentication' - end - - context 'with an argument' do - let(:response) { conn.get('/auth-echo', nil, 'middle' => 'crunchy surprise') } - - context 'when passed a proc' do - let(:auth_config) { [proc { |env| "proc #{env.request_headers['middle']}" }] } - - it { expect(response.body).to eq('Bearer proc crunchy surprise') } - - include_examples 'does not interfere with existing authentication' - end - - context 'when passed a lambda' do - let(:auth_config) { [->(env) { "lambda #{env.request_headers['middle']}" }] } - - it { expect(response.body).to eq('Bearer lambda crunchy surprise') } - - include_examples 'does not interfere with existing authentication' - end - - context 'when passed a callable with an argument' do - let(:callable) do - Class.new do - def call(env) - "callable #{env.request_headers['middle']}" - end - end.new - end - let(:auth_config) { [callable] } - - it { expect(response.body).to eq('Bearer callable crunchy surprise') } - - include_examples 'does not interfere with existing authentication' - end - end - - context 'when passed too many arguments' do - let(:auth_config) { %w[baz foo] } - - it { expect { response }.to raise_error(ArgumentError) } - - include_examples 'does not interfere with existing authentication' - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/instrumentation_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/instrumentation_spec.rb deleted file mode 100644 index d207c556..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/instrumentation_spec.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Request::Instrumentation do - class FakeInstrumenter - attr_reader :instrumentations - - def initialize - @instrumentations = [] - end - - def instrument(name, env) - @instrumentations << [name, env] - yield - end - end - - let(:config) { {} } - let(:options) { Faraday::Request::Instrumentation::Options.from config } - let(:instrumenter) { FakeInstrumenter.new } - let(:conn) do - Faraday.new do |f| - f.request :instrumentation, config.merge(instrumenter: instrumenter) - f.adapter :test do |stub| - stub.get '/' do - [200, {}, 'ok'] - end - end - end - end - - it { expect(options.name).to eq('request.faraday') } - it 'defaults to ActiveSupport::Notifications' do - res = options.instrumenter - rescue NameError => e - expect(e.to_s).to match('ActiveSupport') - else - expect(res).to eq(ActiveSupport::Notifications) - end - - it 'instruments with default name' do - expect(instrumenter.instrumentations.size).to eq(0) - - res = conn.get '/' - expect(res.body).to eq('ok') - expect(instrumenter.instrumentations.size).to eq(1) - - name, env = instrumenter.instrumentations.first - expect(name).to eq('request.faraday') - expect(env[:url].path).to eq('/') - end - - context 'with custom name' do - let(:config) { { name: 'custom' } } - - it { expect(options.name).to eq('custom') } - it 'instruments with custom name' do - expect(instrumenter.instrumentations.size).to eq(0) - - res = conn.get '/' - expect(res.body).to eq('ok') - expect(instrumenter.instrumentations.size).to eq(1) - - name, env = instrumenter.instrumentations.first - expect(name).to eq('custom') - expect(env[:url].path).to eq('/') - end - end - - context 'with custom instrumenter' do - let(:config) { { instrumenter: :custom } } - - it { expect(options.instrumenter).to eq(:custom) } - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/json_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/json_spec.rb deleted file mode 100644 index 44dee796..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/json_spec.rb +++ /dev/null @@ -1,199 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Request::Json do - let(:middleware) { described_class.new(->(env) { Faraday::Response.new(env) }) } - - def process(body, content_type = nil) - env = { body: body, request_headers: Faraday::Utils::Headers.new } - env[:request_headers]['content-type'] = content_type if content_type - middleware.call(Faraday::Env.from(env)).env - end - - def result_body - result[:body] - end - - def result_type - result[:request_headers]['content-type'] - end - - context 'no body' do - let(:result) { process(nil) } - - it "doesn't change body" do - expect(result_body).to be_nil - end - - it "doesn't add content type" do - expect(result_type).to be_nil - end - end - - context 'empty body' do - let(:result) { process('') } - - it "doesn't change body" do - expect(result_body).to be_empty - end - - it "doesn't add content type" do - expect(result_type).to be_nil - end - end - - context 'string body' do - let(:result) { process('{"a":1}') } - - it "doesn't change body" do - expect(result_body).to eq('{"a":1}') - end - - it 'adds content type' do - expect(result_type).to eq('application/json') - end - end - - context 'object body' do - let(:result) { process(a: 1) } - - it 'encodes body' do - expect(result_body).to eq('{"a":1}') - end - - it 'adds content type' do - expect(result_type).to eq('application/json') - end - end - - context 'empty object body' do - let(:result) { process({}) } - - it 'encodes body' do - expect(result_body).to eq('{}') - end - end - - context 'true body' do - let(:result) { process(true) } - - it 'encodes body' do - expect(result_body).to eq('true') - end - - it 'adds content type' do - expect(result_type).to eq('application/json') - end - end - - context 'false body' do - let(:result) { process(false) } - - it 'encodes body' do - expect(result_body).to eq('false') - end - - it 'adds content type' do - expect(result_type).to eq('application/json') - end - end - - context 'object body with json type' do - let(:result) { process({ a: 1 }, 'application/json; charset=utf-8') } - - it 'encodes body' do - expect(result_body).to eq('{"a":1}') - end - - it "doesn't change content type" do - expect(result_type).to eq('application/json; charset=utf-8') - end - end - - context 'object body with vendor json type' do - let(:result) { process({ a: 1 }, 'application/vnd.myapp.v1+json; charset=utf-8') } - - it 'encodes body' do - expect(result_body).to eq('{"a":1}') - end - - it "doesn't change content type" do - expect(result_type).to eq('application/vnd.myapp.v1+json; charset=utf-8') - end - end - - context 'object body with incompatible type' do - let(:result) { process({ a: 1 }, 'application/xml; charset=utf-8') } - - it "doesn't change body" do - expect(result_body).to eq(a: 1) - end - - it "doesn't change content type" do - expect(result_type).to eq('application/xml; charset=utf-8') - end - end - - context 'with encoder' do - let(:encoder) do - double('Encoder').tap do |e| - allow(e).to receive(:dump) { |s, opts| JSON.generate(s, opts) } - end - end - - let(:result) { process(a: 1) } - - context 'when encoder is passed as object' do - let(:middleware) { described_class.new(->(env) { Faraday::Response.new(env) }, { encoder: encoder }) } - - it 'calls specified JSON encoder\'s dump method' do - expect(encoder).to receive(:dump).with({ a: 1 }) - - result - end - - it 'encodes body' do - expect(result_body).to eq('{"a":1}') - end - - it 'adds content type' do - expect(result_type).to eq('application/json') - end - end - - context 'when encoder is passed as an object-method pair' do - let(:middleware) { described_class.new(->(env) { Faraday::Response.new(env) }, { encoder: [encoder, :dump] }) } - - it 'calls specified JSON encoder' do - expect(encoder).to receive(:dump).with({ a: 1 }) - - result - end - - it 'encodes body' do - expect(result_body).to eq('{"a":1}') - end - - it 'adds content type' do - expect(result_type).to eq('application/json') - end - end - - context 'when encoder is not passed' do - let(:middleware) { described_class.new(->(env) { Faraday::Response.new(env) }) } - - it 'calls JSON.generate' do - expect(JSON).to receive(:generate).with({ a: 1 }) - - result - end - - it 'encodes body' do - expect(result_body).to eq('{"a":1}') - end - - it 'adds content type' do - expect(result_type).to eq('application/json') - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/url_encoded_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/url_encoded_spec.rb deleted file mode 100644 index bdd9e0ac..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request/url_encoded_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -# frozen_string_literal: true - -require 'stringio' - -RSpec.describe Faraday::Request::UrlEncoded do - let(:conn) do - Faraday.new do |b| - b.request :url_encoded - b.adapter :test do |stub| - stub.post('/echo') do |env| - posted_as = env[:request_headers]['Content-Type'] - body = env[:body] - if body.respond_to?(:read) - body = body.read - end - [200, { 'Content-Type' => posted_as }, body] - end - end - end - end - - it 'does nothing without payload' do - response = conn.post('/echo') - expect(response.headers['Content-Type']).to be_nil - expect(response.body.empty?).to be_truthy - end - - it 'ignores custom content type' do - response = conn.post('/echo', { some: 'data' }, 'content-type' => 'application/x-foo') - expect(response.headers['Content-Type']).to eq('application/x-foo') - expect(response.body).to eq(some: 'data') - end - - it 'works with no headers' do - response = conn.post('/echo', fruit: %w[apples oranges]) - expect(response.headers['Content-Type']).to eq('application/x-www-form-urlencoded') - expect(response.body).to eq('fruit%5B%5D=apples&fruit%5B%5D=oranges') - end - - it 'works with with headers' do - response = conn.post('/echo', { 'a' => 123 }, 'content-type' => 'application/x-www-form-urlencoded') - expect(response.headers['Content-Type']).to eq('application/x-www-form-urlencoded') - expect(response.body).to eq('a=123') - end - - it 'works with nested params' do - response = conn.post('/echo', user: { name: 'Mislav', web: 'mislav.net' }) - expect(response.headers['Content-Type']).to eq('application/x-www-form-urlencoded') - expected = { 'user' => { 'name' => 'Mislav', 'web' => 'mislav.net' } } - expect(Faraday::Utils.parse_nested_query(response.body)).to eq(expected) - end - - it 'works with non nested params' do - response = conn.post('/echo', dimensions: %w[date location]) do |req| - req.options.params_encoder = Faraday::FlatParamsEncoder - end - expect(response.headers['Content-Type']).to eq('application/x-www-form-urlencoded') - expected = { 'dimensions' => %w[date location] } - expect(Faraday::Utils.parse_query(response.body)).to eq(expected) - expect(response.body).to eq('dimensions=date&dimensions=location') - end - - it 'works with unicode' do - err = capture_warnings do - response = conn.post('/echo', str: 'eé cç aã aâ') - expect(response.body).to eq('str=e%C3%A9+c%C3%A7+a%C3%A3+a%C3%A2') - end - expect(err.empty?).to be_truthy - end - - it 'works with nested keys' do - response = conn.post('/echo', 'a' => { 'b' => { 'c' => ['d'] } }) - expect(response.body).to eq('a%5Bb%5D%5Bc%5D%5B%5D=d') - end - - it 'works with files' do - response = conn.post('/echo', StringIO.new('str=apple')) - expect(response.body).to eq('str=apple') - end - - context 'customising default_space_encoding' do - around do |example| - Faraday::Utils.default_space_encoding = '%20' - example.run - Faraday::Utils.default_space_encoding = nil - end - - it 'uses the custom character to encode spaces' do - response = conn.post('/echo', str: 'apple banana') - expect(response.body).to eq('str=apple%20banana') - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request_spec.rb deleted file mode 100644 index fbf85b56..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/request_spec.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Request do - let(:conn) do - Faraday.new(url: 'http://httpbingo.org/api', - headers: { 'Mime-Version' => '1.0' }, - request: { oauth: { consumer_key: 'anonymous' } }) - end - let(:http_method) { :get } - let(:block) { nil } - - subject { conn.build_request(http_method, &block) } - - context 'when nothing particular is configured' do - it { expect(subject.http_method).to eq(:get) } - it { expect(subject.to_env(conn).ssl.verify).to be_falsey } - it { expect(subject.to_env(conn).ssl.verify_hostname).to be_falsey } - end - - context 'when HTTP method is post' do - let(:http_method) { :post } - - it { expect(subject.http_method).to eq(:post) } - end - - context 'when setting the url on setup with a URI' do - let(:block) { proc { |req| req.url URI.parse('foo.json?a=1') } } - - it { expect(subject.path).to eq(URI.parse('foo.json')) } - it { expect(subject.params).to eq('a' => '1') } - it { expect(subject.to_env(conn).url.to_s).to eq('http://httpbingo.org/api/foo.json?a=1') } - end - - context 'when setting the url on setup with a string path and params' do - let(:block) { proc { |req| req.url 'foo.json', 'a' => 1 } } - - it { expect(subject.path).to eq('foo.json') } - it { expect(subject.params).to eq('a' => 1) } - it { expect(subject.to_env(conn).url.to_s).to eq('http://httpbingo.org/api/foo.json?a=1') } - end - - context 'when setting the url on setup with a path including params' do - let(:block) { proc { |req| req.url 'foo.json?b=2&a=1#qqq' } } - - it { expect(subject.path).to eq('foo.json') } - it { expect(subject.params).to eq('a' => '1', 'b' => '2') } - it { expect(subject.to_env(conn).url.to_s).to eq('http://httpbingo.org/api/foo.json?a=1&b=2') } - end - - context 'when setting a header on setup with []= syntax' do - let(:block) { proc { |req| req['Server'] = 'Faraday' } } - let(:headers) { subject.to_env(conn).request_headers } - - it { expect(subject.headers['Server']).to eq('Faraday') } - it { expect(headers['mime-version']).to eq('1.0') } - it { expect(headers['server']).to eq('Faraday') } - end - - context 'when setting the body on setup' do - let(:block) { proc { |req| req.body = 'hi' } } - - it { expect(subject.body).to eq('hi') } - it { expect(subject.to_env(conn).body).to eq('hi') } - end - - context 'with global request options set' do - let(:env_request) { subject.to_env(conn).request } - - before do - conn.options.timeout = 3 - conn.options.open_timeout = 5 - conn.ssl.verify = false - conn.proxy = 'http://proxy.com' - end - - it { expect(subject.options.timeout).to eq(3) } - it { expect(subject.options.open_timeout).to eq(5) } - it { expect(env_request.timeout).to eq(3) } - it { expect(env_request.open_timeout).to eq(5) } - - context 'and per-request options set' do - let(:block) do - proc do |req| - req.options.timeout = 10 - req.options.boundary = 'boo' - req.options.oauth[:consumer_secret] = 'xyz' - req.options.context = { - foo: 'foo', - bar: 'bar' - } - end - end - - it { expect(subject.options.timeout).to eq(10) } - it { expect(subject.options.open_timeout).to eq(5) } - it { expect(env_request.timeout).to eq(10) } - it { expect(env_request.open_timeout).to eq(5) } - it { expect(env_request.boundary).to eq('boo') } - it { expect(env_request.context).to eq(foo: 'foo', bar: 'bar') } - it do - oauth_expected = { consumer_secret: 'xyz', consumer_key: 'anonymous' } - expect(env_request.oauth).to eq(oauth_expected) - end - end - end - - it 'supports marshal serialization' do - expect(Marshal.load(Marshal.dump(subject))).to eq(subject) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/json_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/json_spec.rb deleted file mode 100644 index e6cbda39..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/json_spec.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Response::Json, type: :response do - let(:options) { {} } - let(:headers) { {} } - let(:middleware) do - described_class.new(lambda { |env| - Faraday::Response.new(env) - }, **options) - end - - def process(body, content_type = 'application/json', options = {}) - env = { - body: body, request: options, - request_headers: Faraday::Utils::Headers.new, - response_headers: Faraday::Utils::Headers.new(headers) - } - env[:response_headers]['content-type'] = content_type if content_type - yield(env) if block_given? - middleware.call(Faraday::Env.from(env)) - end - - context 'no type matching' do - it "doesn't change nil body" do - expect(process(nil).body).to be_nil - end - - it 'nullifies empty body' do - expect(process('').body).to be_nil - end - - it 'parses json body' do - response = process('{"a":1}') - expect(response.body).to eq('a' => 1) - expect(response.env[:raw_body]).to be_nil - end - end - - context 'with preserving raw' do - let(:options) { { preserve_raw: true } } - - it 'parses json body' do - response = process('{"a":1}') - expect(response.body).to eq('a' => 1) - expect(response.env[:raw_body]).to eq('{"a":1}') - end - end - - context 'with default regexp type matching' do - it 'parses json body of correct type' do - response = process('{"a":1}', 'application/x-json') - expect(response.body).to eq('a' => 1) - end - - it 'ignores json body of incorrect type' do - response = process('{"a":1}', 'text/json-xml') - expect(response.body).to eq('{"a":1}') - end - end - - context 'with array type matching' do - let(:options) { { content_type: %w[a/b c/d] } } - - it 'parses json body of correct type' do - expect(process('{"a":1}', 'a/b').body).to be_a(Hash) - expect(process('{"a":1}', 'c/d').body).to be_a(Hash) - end - - it 'ignores json body of incorrect type' do - expect(process('{"a":1}', 'a/d').body).not_to be_a(Hash) - end - end - - it 'chokes on invalid json' do - expect { process('{!') }.to raise_error(Faraday::ParsingError) - end - - it 'includes the response on the ParsingError instance' do - process('{') { |env| env[:response] = Faraday::Response.new } - raise 'Parsing should have failed.' - rescue Faraday::ParsingError => e - expect(e.response).to be_a(Faraday::Response) - end - - context 'HEAD responses' do - it "nullifies the body if it's only one space" do - response = process(' ') - expect(response.body).to be_nil - end - - it "nullifies the body if it's two spaces" do - response = process(' ') - expect(response.body).to be_nil - end - end - - context 'JSON options' do - let(:body) { '{"a": 1}' } - let(:result) { { a: 1 } } - let(:options) do - { - parser_options: { - symbolize_names: true - } - } - end - - it 'passes relevant options to JSON parse' do - expect(::JSON).to receive(:parse) - .with(body, options[:parser_options]) - .and_return(result) - - response = process(body) - expect(response.body).to eq(result) - end - end - - context 'with decoder' do - let(:decoder) do - double('Decoder').tap do |e| - allow(e).to receive(:load) { |s, opts| JSON.parse(s, opts) } - end - end - - let(:body) { '{"a": 1}' } - let(:result) { { a: 1 } } - - context 'when decoder is passed as object' do - let(:options) do - { - parser_options: { - decoder: decoder, - option: :option_value, - symbolize_names: true - } - } - end - - it 'passes relevant options to specified decoder\'s load method' do - expect(decoder).to receive(:load) - .with(body, { option: :option_value, symbolize_names: true }) - .and_return(result) - - response = process(body) - expect(response.body).to eq(result) - end - end - - context 'when decoder is passed as an object-method pair' do - let(:options) do - { - parser_options: { - decoder: [decoder, :load], - option: :option_value, - symbolize_names: true - } - } - end - - it 'passes relevant options to specified decoder\'s method' do - expect(decoder).to receive(:load) - .with(body, { option: :option_value, symbolize_names: true }) - .and_return(result) - - response = process(body) - expect(response.body).to eq(result) - end - end - - context 'when decoder is not passed' do - let(:options) do - { - parser_options: { - symbolize_names: true - } - } - end - - it 'passes relevant options to JSON parse' do - expect(JSON).to receive(:parse) - .with(body, { symbolize_names: true }) - .and_return(result) - - response = process(body) - expect(response.body).to eq(result) - end - - it 'passes relevant options to JSON parse even when nil responds to :load' do - original_allow_message_expectations_on_nil = RSpec::Mocks.configuration.allow_message_expectations_on_nil - RSpec::Mocks.configuration.allow_message_expectations_on_nil = true - allow(nil).to receive(:respond_to?) - .with(:load) - .and_return(true) - - expect(JSON).to receive(:parse) - .with(body, { symbolize_names: true }) - .and_return(result) - - response = process(body) - expect(response.body).to eq(result) - ensure - RSpec::Mocks.configuration.allow_message_expectations_on_nil = original_allow_message_expectations_on_nil - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/logger_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/logger_spec.rb deleted file mode 100644 index e8e0bf3f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/logger_spec.rb +++ /dev/null @@ -1,293 +0,0 @@ -# frozen_string_literal: true - -require 'stringio' -require 'logger' - -RSpec.describe Faraday::Response::Logger do - let(:string_io) { StringIO.new } - let(:logger) { Logger.new(string_io) } - let(:logger_options) { {} } - let(:conn) do - rubbles = ['Barney', 'Betty', 'Bam Bam'] - - Faraday.new do |b| - b.response :logger, logger, logger_options do |logger| - logger.filter(/(soylent green is) (.+)/, '\1 tasty') - logger.filter(/(api_key:).*"(.+)."/, '\1[API_KEY]') - logger.filter(/(password)=(.+)/, '\1=[HIDDEN]') - end - b.adapter :test do |stubs| - stubs.get('/hello') { [200, { 'Content-Type' => 'text/html' }, 'hello'] } - stubs.post('/ohai') { [200, { 'Content-Type' => 'text/html' }, 'fred'] } - stubs.post('/ohyes') { [200, { 'Content-Type' => 'text/html' }, 'pebbles'] } - stubs.get('/rubbles') { [200, { 'Content-Type' => 'application/json' }, rubbles] } - stubs.get('/filtered_body') { [200, { 'Content-Type' => 'text/html' }, 'soylent green is people'] } - stubs.get('/filtered_headers') { [200, { 'Content-Type' => 'text/html' }, 'headers response'] } - stubs.get('/filtered_params') { [200, { 'Content-Type' => 'text/html' }, 'params response'] } - stubs.get('/filtered_url') { [200, { 'Content-Type' => 'text/html' }, 'url response'] } - stubs.get('/connection_failed') { raise Faraday::ConnectionFailed, 'Failed to open TCP connection' } - end - end - end - - before do - logger.level = Logger::DEBUG - end - - it 'still returns output' do - resp = conn.get '/hello', nil, accept: 'text/html' - expect(resp.body).to eq('hello') - end - - context 'without configuration' do - let(:conn) do - Faraday.new do |b| - b.response :logger - b.adapter :test do |stubs| - stubs.get('/hello') { [200, { 'Content-Type' => 'text/html' }, 'hello'] } - end - end - end - - it 'defaults to stdout' do - expect(Logger).to receive(:new).with($stdout).and_return(Logger.new(nil)) - conn.get('/hello') - end - end - - context 'when logger with program name' do - let(:logger) { Logger.new(string_io, progname: 'my_best_program') } - - it 'logs with program name' do - conn.get '/hello' - - expect(string_io.string).to match('-- my_best_program: request:') - expect(string_io.string).to match('-- my_best_program: response:') - end - end - - context 'when logger without program name' do - it 'logs without program name' do - conn.get '/hello' - - expect(string_io.string).to match('-- : request:') - expect(string_io.string).to match('-- : response:') - end - end - - context 'with default formatter' do - let(:formatter) { instance_double(Faraday::Logging::Formatter, request: true, response: true, filter: []) } - - before { allow(Faraday::Logging::Formatter).to receive(:new).and_return(formatter) } - - it 'delegates logging to the formatter' do - expect(formatter).to receive(:request).with(an_instance_of(Faraday::Env)) - expect(formatter).to receive(:response).with(an_instance_of(Faraday::Env)) - conn.get '/hello' - end - - context 'when no route' do - it 'delegates logging to the formatter' do - expect(formatter).to receive(:request).with(an_instance_of(Faraday::Env)) - expect(formatter).to receive(:exception).with(an_instance_of(Faraday::Adapter::Test::Stubs::NotFound)) - - expect { conn.get '/noroute' }.to raise_error(Faraday::Adapter::Test::Stubs::NotFound) - end - end - end - - context 'with custom formatter' do - let(:formatter_class) do - Class.new(Faraday::Logging::Formatter) do - def request(_env) - info 'Custom log formatter request' - end - - def response(_env) - info 'Custom log formatter response' - end - end - end - - let(:logger_options) { { formatter: formatter_class } } - - it 'logs with custom formatter' do - conn.get '/hello' - - expect(string_io.string).to match('Custom log formatter request') - expect(string_io.string).to match('Custom log formatter response') - end - end - - it 'logs method and url' do - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).to match('GET http:/hello') - end - - it 'logs status' do - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).to match('Status 200') - end - - it 'does not log error message by default' do - expect { conn.get '/noroute' }.to raise_error(Faraday::Adapter::Test::Stubs::NotFound) - expect(string_io.string).not_to match(%(no stubbed request for get http:/noroute)) - end - - it 'logs request headers by default' do - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).to match(%(Accept: "text/html)) - end - - it 'logs response headers by default' do - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).to match(%(Content-Type: "text/html)) - end - - it 'does not log request body by default' do - conn.post '/ohai', 'name=Unagi', accept: 'text/html' - expect(string_io.string).not_to match(%(name=Unagi)) - end - - it 'does not log response body by default' do - conn.post '/ohai', 'name=Toro', accept: 'text/html' - expect(string_io.string).not_to match(%(fred)) - end - - it 'logs filter headers' do - conn.headers = { 'api_key' => 'ABC123' } - conn.get '/filtered_headers', nil, accept: 'text/html' - expect(string_io.string).to match(%(api_key:)) - expect(string_io.string).to match(%([API_KEY])) - expect(string_io.string).not_to match(%(ABC123)) - end - - it 'logs filter url' do - conn.get '/filtered_url?password=hunter2', nil, accept: 'text/html' - expect(string_io.string).to match(%([HIDDEN])) - expect(string_io.string).not_to match(%(hunter2)) - end - - context 'when not logging request headers' do - let(:logger_options) { { headers: { request: false } } } - - it 'does not log request headers if option is false' do - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).not_to match(%(Accept: "text/html)) - end - end - - context 'when not logging response headers' do - let(:logger_options) { { headers: { response: false } } } - - it 'does not log response headers if option is false' do - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).not_to match(%(Content-Type: "text/html)) - end - end - - context 'when logging request body' do - let(:logger_options) { { bodies: { request: true } } } - - it 'logs only request body' do - conn.post '/ohyes', 'name=Tamago', accept: 'text/html' - expect(string_io.string).to match(%(name=Tamago)) - expect(string_io.string).not_to match(%(pebbles)) - end - end - - context 'when logging response body' do - let(:logger_options) { { bodies: { response: true } } } - - it 'logs only response body' do - conn.post '/ohyes', 'name=Hamachi', accept: 'text/html' - expect(string_io.string).to match(%(pebbles)) - expect(string_io.string).not_to match(%(name=Hamachi)) - end - end - - context 'when logging request and response bodies' do - let(:logger_options) { { bodies: true } } - - it 'logs request and response body' do - conn.post '/ohyes', 'name=Ebi', accept: 'text/html' - expect(string_io.string).to match(%(name=Ebi)) - expect(string_io.string).to match(%(pebbles)) - end - - it 'logs response body object' do - conn.get '/rubbles', nil, accept: 'text/html' - expect(string_io.string).to match(%([\"Barney\", \"Betty\", \"Bam Bam\"]\n)) - end - - it 'logs filter body' do - conn.get '/filtered_body', nil, accept: 'text/html' - expect(string_io.string).to match(%(soylent green is)) - expect(string_io.string).to match(%(tasty)) - expect(string_io.string).not_to match(%(people)) - end - end - - context 'when bodies are logged by default' do - before do - described_class.default_options = { bodies: true } - end - - it 'logs response body' do - conn.post '/ohai' - expect(string_io.string).to match(%(fred)) - end - - after do - described_class.default_options = { bodies: false } - end - end - - context 'when logging errors' do - let(:logger_options) { { errors: true } } - - it 'logs error message' do - expect { conn.get '/noroute' }.to raise_error(Faraday::Adapter::Test::Stubs::NotFound) - expect(string_io.string).to match(%(no stubbed request for get http:/noroute)) - end - end - - context 'when logging headers and errors' do - let(:logger_options) { { headers: true, errors: true } } - - it 'logs error message' do - expect { conn.get '/connection_failed' }.to raise_error(Faraday::ConnectionFailed) - expect(string_io.string).to match(%(Failed to open TCP connection)) - end - end - - context 'when using log_level' do - let(:logger_options) { { bodies: true, log_level: :debug } } - - it 'logs request/request body on the specified level (debug)' do - logger.level = Logger::DEBUG - conn.post '/ohyes', 'name=Ebi', accept: 'text/html' - expect(string_io.string).to match(%(name=Ebi)) - expect(string_io.string).to match(%(pebbles)) - end - - it 'logs headers on the debug level' do - logger.level = Logger::DEBUG - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).to match(%(Content-Type: "text/html)) - end - - it 'does not log request/response body on the info level' do - logger.level = Logger::INFO - conn.post '/ohyes', 'name=Ebi', accept: 'text/html' - expect(string_io.string).not_to match(%(name=Ebi)) - expect(string_io.string).not_to match(%(pebbles)) - end - - it 'does not log headers on the info level' do - logger.level = Logger::INFO - conn.get '/hello', nil, accept: 'text/html' - expect(string_io.string).not_to match(%(Content-Type: "text/html)) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/raise_error_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/raise_error_spec.rb deleted file mode 100644 index 6013080d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response/raise_error_spec.rb +++ /dev/null @@ -1,275 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Response::RaiseError do - let(:conn) do - Faraday.new do |b| - b.response :raise_error - b.adapter :test do |stub| - stub.get('ok') { [200, { 'Content-Type' => 'text/html' }, ''] } - stub.get('bad-request') { [400, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('unauthorized') { [401, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('forbidden') { [403, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('not-found') { [404, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('proxy-error') { [407, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('request-timeout') { [408, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('conflict') { [409, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('unprocessable-entity') { [422, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('too-many-requests') { [429, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('4xx') { [499, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('nil-status') { [nil, { 'X-Reason' => 'nil' }, 'fail'] } - stub.get('server-error') { [500, { 'X-Error' => 'bailout' }, 'fail'] } - end - end - end - - it 'raises no exception for 200 responses' do - expect { conn.get('ok') }.not_to raise_error - end - - it 'raises Faraday::BadRequestError for 400 responses' do - expect { conn.get('bad-request') }.to raise_error(Faraday::BadRequestError) do |ex| - expect(ex.message).to eq('the server responded with status 400') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(400) - expect(ex.response_status).to eq(400) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::UnauthorizedError for 401 responses' do - expect { conn.get('unauthorized') }.to raise_error(Faraday::UnauthorizedError) do |ex| - expect(ex.message).to eq('the server responded with status 401') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(401) - expect(ex.response_status).to eq(401) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::ForbiddenError for 403 responses' do - expect { conn.get('forbidden') }.to raise_error(Faraday::ForbiddenError) do |ex| - expect(ex.message).to eq('the server responded with status 403') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(403) - expect(ex.response_status).to eq(403) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::ResourceNotFound for 404 responses' do - expect { conn.get('not-found') }.to raise_error(Faraday::ResourceNotFound) do |ex| - expect(ex.message).to eq('the server responded with status 404') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(404) - expect(ex.response_status).to eq(404) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::ProxyAuthError for 407 responses' do - expect { conn.get('proxy-error') }.to raise_error(Faraday::ProxyAuthError) do |ex| - expect(ex.message).to eq('407 "Proxy Authentication Required"') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(407) - expect(ex.response_status).to eq(407) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::RequestTimeoutError for 408 responses' do - expect { conn.get('request-timeout') }.to raise_error(Faraday::RequestTimeoutError) do |ex| - expect(ex.message).to eq('the server responded with status 408') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(408) - expect(ex.response_status).to eq(408) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::ConflictError for 409 responses' do - expect { conn.get('conflict') }.to raise_error(Faraday::ConflictError) do |ex| - expect(ex.message).to eq('the server responded with status 409') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(409) - expect(ex.response_status).to eq(409) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::UnprocessableEntityError for 422 responses' do - expect { conn.get('unprocessable-entity') }.to raise_error(Faraday::UnprocessableEntityError) do |ex| - expect(ex.message).to eq('the server responded with status 422') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(422) - expect(ex.response_status).to eq(422) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::TooManyRequestsError for 429 responses' do - expect { conn.get('too-many-requests') }.to raise_error(Faraday::TooManyRequestsError) do |ex| - expect(ex.message).to eq('the server responded with status 429') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(429) - expect(ex.response_status).to eq(429) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::NilStatusError for nil status in response' do - expect { conn.get('nil-status') }.to raise_error(Faraday::NilStatusError) do |ex| - expect(ex.message).to eq('http status could not be derived from the server response') - expect(ex.response[:headers]['X-Reason']).to eq('nil') - expect(ex.response[:status]).to be_nil - expect(ex.response_status).to be_nil - expect(ex.response_body).to eq('fail') - expect(ex.response_headers['X-Reason']).to eq('nil') - end - end - - it 'raises Faraday::ClientError for other 4xx responses' do - expect { conn.get('4xx') }.to raise_error(Faraday::ClientError) do |ex| - expect(ex.message).to eq('the server responded with status 499') - expect(ex.response[:headers]['X-Reason']).to eq('because') - expect(ex.response[:status]).to eq(499) - expect(ex.response_status).to eq(499) - expect(ex.response_body).to eq('keep looking') - expect(ex.response_headers['X-Reason']).to eq('because') - end - end - - it 'raises Faraday::ServerError for 500 responses' do - expect { conn.get('server-error') }.to raise_error(Faraday::ServerError) do |ex| - expect(ex.message).to eq('the server responded with status 500') - expect(ex.response[:headers]['X-Error']).to eq('bailout') - expect(ex.response[:status]).to eq(500) - expect(ex.response_status).to eq(500) - expect(ex.response_body).to eq('fail') - expect(ex.response_headers['X-Error']).to eq('bailout') - end - end - - describe 'request info' do - let(:conn) do - Faraday.new do |b| - b.response :raise_error, **middleware_options - b.adapter :test do |stub| - stub.post(url, request_body, request_headers) do - [400, { 'X-Reason' => 'because' }, 'keep looking'] - end - end - end - end - let(:middleware_options) { {} } - let(:request_body) { JSON.generate({ 'item' => 'sth' }) } - let(:request_headers) { { 'Authorization' => 'Basic 123' } } - let(:url_path) { 'request' } - let(:query_params) { 'full=true' } - let(:url) { "#{url_path}?#{query_params}" } - - subject(:perform_request) do - conn.post url do |req| - req.headers['Authorization'] = 'Basic 123' - req.body = request_body - end - end - - it 'returns the request info in the exception' do - expect { perform_request }.to raise_error(Faraday::BadRequestError) do |ex| - expect(ex.response[:request][:method]).to eq(:post) - expect(ex.response[:request][:url]).to eq(URI("http:/#{url}")) - expect(ex.response[:request][:url_path]).to eq("/#{url_path}") - expect(ex.response[:request][:params]).to eq({ 'full' => 'true' }) - expect(ex.response[:request][:headers]).to match(a_hash_including(request_headers)) - expect(ex.response[:request][:body]).to eq(request_body) - end - end - - describe 'DEFAULT_OPTION: include_request' do - before(:each) do - Faraday::Response::RaiseError.instance_variable_set(:@default_options, nil) - Faraday::Middleware.instance_variable_set(:@default_options, nil) - end - - after(:all) do - Faraday::Response::RaiseError.instance_variable_set(:@default_options, nil) - Faraday::Middleware.instance_variable_set(:@default_options, nil) - end - - context 'when RaiseError DEFAULT_OPTION (include_request: true) is used' do - it 'includes request info in the exception' do - expect { perform_request }.to raise_error(Faraday::BadRequestError) do |ex| - expect(ex.response.keys).to contain_exactly( - :status, - :headers, - :body, - :request - ) - end - end - end - - context 'when application sets default_options `include_request: false`' do - before(:each) do - Faraday::Response::RaiseError.default_options = { include_request: false } - end - - context 'and when include_request option is omitted' do - it 'does not include request info in the exception' do - expect { perform_request }.to raise_error(Faraday::BadRequestError) do |ex| - expect(ex.response.keys).to contain_exactly( - :status, - :headers, - :body - ) - end - end - end - - context 'and when include_request option is explicitly set for instance' do - let(:middleware_options) { { include_request: true } } - - it 'includes request info in the exception' do - expect { perform_request }.to raise_error(Faraday::BadRequestError) do |ex| - expect(ex.response.keys).to contain_exactly( - :status, - :headers, - :body, - :request - ) - end - end - end - end - end - end - - describe 'allowing certain status codes' do - let(:conn) do - Faraday.new do |b| - b.response :raise_error, allowed_statuses: [404] - b.adapter :test do |stub| - stub.get('bad-request') { [400, { 'X-Reason' => 'because' }, 'keep looking'] } - stub.get('not-found') { [404, { 'X-Reason' => 'because' }, 'keep looking'] } - end - end - end - - it 'raises an error for status codes that are not explicitly allowed' do - expect { conn.get('bad-request') }.to raise_error(Faraday::BadRequestError) - end - - it 'does not raise an error for allowed status codes' do - expect { conn.get('not-found') }.not_to raise_error - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response_spec.rb deleted file mode 100644 index e3e2c237..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/response_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Response do - subject { Faraday::Response.new(env) } - - let(:env) do - Faraday::Env.from(status: 404, body: 'yikes', url: Faraday::Utils.URI('https://lostisland.github.io/faraday'), - response_headers: { 'Content-Type' => 'text/plain' }) - end - - it { expect(subject.finished?).to be_truthy } - it { expect { subject.finish({}) }.to raise_error(RuntimeError) } - it { expect(subject.success?).to be_falsey } - it { expect(subject.status).to eq(404) } - it { expect(subject.body).to eq('yikes') } - it { expect(subject.headers['Content-Type']).to eq('text/plain') } - it { expect(subject['content-type']).to eq('text/plain') } - - describe '#apply_request' do - before { subject.apply_request(body: 'a=b', method: :post) } - - it { expect(subject.body).to eq('yikes') } - it { expect(subject.env[:method]).to eq(:post) } - end - - describe '#to_hash' do - let(:hash) { subject.to_hash } - - it { expect(hash).to be_a(Hash) } - it { expect(hash[:status]).to eq(subject.status) } - it { expect(hash[:response_headers]).to eq(subject.headers) } - it { expect(hash[:body]).to eq(subject.body) } - it { expect(hash[:url]).to eq(subject.env.url) } - end - - describe 'marshal serialization support' do - subject { Faraday::Response.new } - let(:loaded) { Marshal.load(Marshal.dump(subject)) } - - before do - subject.on_complete {} - subject.finish(env.merge(params: 'moo')) - end - - it { expect(loaded.env[:params]).to be_nil } - it { expect(loaded.env[:body]).to eq(env[:body]) } - it { expect(loaded.env[:response_headers]).to eq(env[:response_headers]) } - it { expect(loaded.env[:status]).to eq(env[:status]) } - it { expect(loaded.env[:url]).to eq(env[:url]) } - end - - describe '#on_complete' do - subject { Faraday::Response.new } - - it 'parse body on finish' do - subject.on_complete { |env| env[:body] = env[:body].upcase } - subject.finish(env) - - expect(subject.body).to eq('YIKES') - end - - it 'can access response body in on_complete callback' do - subject.on_complete { |env| env[:body] = subject.body.upcase } - subject.finish(env) - - expect(subject.body).to eq('YIKES') - end - - it 'can access response body in on_complete callback' do - callback_env = nil - subject.on_complete { |env| callback_env = env } - subject.finish({}) - - expect(subject.env).to eq(callback_env) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/utils/headers_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/utils/headers_spec.rb deleted file mode 100644 index 238bfd99..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/utils/headers_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Utils::Headers do - subject { Faraday::Utils::Headers.new } - - context 'when Content-Type is set to application/json' do - before { subject['Content-Type'] = 'application/json' } - - it { expect(subject.keys).to eq(['Content-Type']) } - it { expect(subject['Content-Type']).to eq('application/json') } - it { expect(subject['CONTENT-TYPE']).to eq('application/json') } - it { expect(subject['content-type']).to eq('application/json') } - it { is_expected.to include('content-type') } - end - - context 'when Content-Type is set to application/xml' do - before { subject['Content-Type'] = 'application/xml' } - - it { expect(subject.keys).to eq(['Content-Type']) } - it { expect(subject['Content-Type']).to eq('application/xml') } - it { expect(subject['CONTENT-TYPE']).to eq('application/xml') } - it { expect(subject['content-type']).to eq('application/xml') } - it { is_expected.to include('content-type') } - end - - describe '#fetch' do - before { subject['Content-Type'] = 'application/json' } - - it { expect(subject.fetch('Content-Type')).to eq('application/json') } - it { expect(subject.fetch('CONTENT-TYPE')).to eq('application/json') } - it { expect(subject.fetch(:content_type)).to eq('application/json') } - it { expect(subject.fetch('invalid', 'default')).to eq('default') } - it { expect(subject.fetch('invalid', false)).to eq(false) } - it { expect(subject.fetch('invalid', nil)).to be_nil } - it { expect(subject.fetch('Invalid') { |key| "#{key} key" }).to eq('Invalid key') } - it 'calls a block when provided' do - block_called = false - expect(subject.fetch('content-type') { block_called = true }).to eq('application/json') - expect(block_called).to be_falsey - end - it 'raises an error if key not found' do - expected_error = defined?(KeyError) ? KeyError : IndexError - expect { subject.fetch('invalid') }.to raise_error(expected_error) - end - end - - describe '#delete' do - before do - subject['Content-Type'] = 'application/json' - @deleted = subject.delete('content-type') - end - - it { expect(@deleted).to eq('application/json') } - it { expect(subject.size).to eq(0) } - it { is_expected.not_to include('content-type') } - it { expect(subject.delete('content-type')).to be_nil } - end - - describe '#dig' do - before { subject['Content-Type'] = 'application/json' } - - it { expect(subject&.dig('Content-Type')).to eq('application/json') } - it { expect(subject&.dig('CONTENT-TYPE')).to eq('application/json') } - it { expect(subject&.dig(:content_type)).to eq('application/json') } - it { expect(subject&.dig('invalid')).to be_nil } - end - - describe '#parse' do - context 'when response headers leave http status line out' do - let(:headers) { "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n" } - - before { subject.parse(headers) } - - it { expect(subject.keys).to eq(%w[Content-Type]) } - it { expect(subject['Content-Type']).to eq('text/html') } - it { expect(subject['content-type']).to eq('text/html') } - end - - context 'when response headers values include a colon' do - let(:headers) { "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nLocation: http://httpbingo.org/\r\n\r\n" } - - before { subject.parse(headers) } - - it { expect(subject['location']).to eq('http://httpbingo.org/') } - end - - context 'when response headers include a blank line' do - let(:headers) { "HTTP/1.1 200 OK\r\n\r\nContent-Type: text/html\r\n\r\n" } - - before { subject.parse(headers) } - - it { expect(subject['content-type']).to eq('text/html') } - end - - context 'when response headers include already stored keys' do - let(:headers) { "HTTP/1.1 200 OK\r\nX-Numbers: 123\r\n\r\n" } - - before do - h = subject - h[:x_numbers] = 8 - h.parse(headers) - end - - it do - expect(subject[:x_numbers]).to eq('8, 123') - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/utils_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/utils_spec.rb deleted file mode 100644 index 24269db7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday/utils_spec.rb +++ /dev/null @@ -1,120 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday::Utils do - describe 'headers parsing' do - let(:multi_response_headers) do - "HTTP/1.x 500 OK\r\nContent-Type: text/html; charset=UTF-8\r\n" \ - "HTTP/1.x 200 OK\r\nContent-Type: application/json; charset=UTF-8\r\n\r\n" - end - - it 'parse headers for aggregated responses' do - headers = Faraday::Utils::Headers.new - headers.parse(multi_response_headers) - - result = headers.to_hash - - expect(result['Content-Type']).to eq('application/json; charset=UTF-8') - end - end - - describe 'URI parsing' do - let(:url) { 'http://example.com/abc' } - - it 'escapes safe buffer' do - str = FakeSafeBuffer.new('$32,000.00') - expect(Faraday::Utils.escape(str)).to eq('%2432%2C000.00') - end - - it 'parses with default parser' do - with_default_uri_parser(nil) do - uri = normalize(url) - expect(uri.host).to eq('example.com') - end - end - - it 'parses with URI' do - with_default_uri_parser(::URI) do - uri = normalize(url) - expect(uri.host).to eq('example.com') - end - end - - it 'parses with block' do - with_default_uri_parser(->(u) { "booya#{'!' * u.size}" }) do - expect(normalize(url)).to eq('booya!!!!!!!!!!!!!!!!!!!!!!') - end - end - - it 'replaces headers hash' do - headers = Faraday::Utils::Headers.new('authorization' => 't0ps3cr3t!') - expect(headers).to have_key('authorization') - - headers.replace('content-type' => 'text/plain') - expect(headers).not_to have_key('authorization') - end - end - - describe '.deep_merge!' do - let(:connection_options) { Faraday::ConnectionOptions.new } - let(:url) do - { - url: 'http://example.com/abc', - headers: { 'Mime-Version' => '1.0' }, - request: { oauth: { consumer_key: 'anonymous' } }, - ssl: { version: '2' } - } - end - - it 'recursively merges the headers' do - connection_options.headers = { user_agent: 'My Agent 1.0' } - deep_merge = Faraday::Utils.deep_merge!(connection_options, url) - - expect(deep_merge.headers).to eq('Mime-Version' => '1.0', user_agent: 'My Agent 1.0') - end - - context 'when a target hash has an Options Struct value' do - let(:request) do - { - params_encoder: nil, - proxy: nil, - bind: nil, - timeout: nil, - open_timeout: nil, - read_timeout: nil, - write_timeout: nil, - boundary: nil, - oauth: { consumer_key: 'anonymous' }, - context: nil, - on_data: nil - } - end - let(:ssl) do - { - verify: nil, - ca_file: nil, - ca_path: nil, - verify_mode: nil, - cert_store: nil, - client_cert: nil, - client_key: nil, - certificate: nil, - private_key: nil, - verify_depth: nil, - version: '2', - min_version: nil, - max_version: nil, - verify_hostname: nil, - hostname: nil, - ciphers: nil - } - end - - it 'does not overwrite an Options Struct value' do - deep_merge = Faraday::Utils.deep_merge!(connection_options, url) - - expect(deep_merge.request.to_h).to eq(request) - expect(deep_merge.ssl.to_h).to eq(ssl) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday_spec.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday_spec.rb deleted file mode 100644 index c3583f18..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/faraday_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -RSpec.describe Faraday do - it 'has a version number' do - expect(Faraday::VERSION).not_to be nil - end - - context 'proxies to default_connection' do - let(:mock_connection) { double('Connection') } - before do - Faraday.default_connection = mock_connection - end - - it 'proxies methods that exist on the default_connection' do - expect(mock_connection).to receive(:this_should_be_proxied) - - Faraday.this_should_be_proxied - end - - it 'uses method_missing on Faraday if there is no proxyable method' do - expected_message = - if RUBY_VERSION >= '3.4' - "undefined method 'this_method_does_not_exist' for module Faraday" - elsif RUBY_VERSION >= '3.3' - "undefined method `this_method_does_not_exist' for module Faraday" - else - "undefined method `this_method_does_not_exist' for Faraday:Module" - end - - expect { Faraday.this_method_does_not_exist }.to raise_error(NoMethodError, expected_message) - end - - it 'proxied methods can be accessed' do - allow(mock_connection).to receive(:this_should_be_proxied) - - expect(Faraday.method(:this_should_be_proxied)).to be_a(Method) - end - - after do - Faraday.default_connection = nil - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/spec_helper.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/spec_helper.rb deleted file mode 100644 index 1b80ea24..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/spec_helper.rb +++ /dev/null @@ -1,133 +0,0 @@ -# frozen_string_literal: true - -# This file was generated by the `rspec --init` command. Conventionally, all -# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. -# The generated `.rspec` file contains `--require spec_helper` which will cause -# this file to always be loaded, without a need to explicitly require it in any -# files. -# -# Given that it is always loaded, you are encouraged to keep this file as -# light-weight as possible. Requiring heavyweight dependencies from this file -# will add to the boot time of your test suite on EVERY test run, even for an -# individual file that may not need all of that loaded. Instead, consider making -# a separate helper file that requires the additional dependencies and performs -# the additional setup, and require it from the spec files that actually need -# it. -# -# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration - -require 'simplecov' -require 'coveralls' -require 'webmock/rspec' -WebMock.disable_net_connect!(allow_localhost: true) - -SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter] - -SimpleCov.start do - add_filter '/spec/' - minimum_coverage 84 - minimum_coverage_by_file 26 -end - -require 'faraday' -require 'pry' - -# Ensure all /lib files are loaded -# so they will be included in the test coverage report. -Dir['./lib/**/*.rb'].each { |file| require file } - -# Load all Rspec support files -Dir['./spec/support/**/*.rb'].each { |file| require file } - -RSpec.configure do |config| - # rspec-expectations config goes here. You can use an alternate - # assertion/expectation library such as wrong or the stdlib/minitest - # assertions if you prefer. - config.expect_with :rspec do |expectations| - # This option will default to `true` in RSpec 4. It makes the `description` - # and `failure_message` of custom matchers include text for helper methods - # defined using `chain`, e.g.: - # be_bigger_than(2).and_smaller_than(4).description - # # => "be bigger than 2 and smaller than 4" - # ...rather than: - # # => "be bigger than 2" - expectations.include_chain_clauses_in_custom_matcher_descriptions = true - end - - # rspec-mocks config goes here. You can use an alternate test double - # library (such as bogus or mocha) by changing the `mock_with` option here. - config.mock_with :rspec do |mocks| - # Prevents you from mocking or stubbing a method that does not exist on - # a real object. This is generally recommended, and will default to - # `true` in RSpec 4. - mocks.verify_partial_doubles = true - end - - # This option will default to `:apply_to_host_groups` in RSpec 4 (and will - # have no way to turn it off -- the option exists only for backwards - # compatibility in RSpec 3). It causes shared context metadata to be - # inherited by the metadata hash of host groups and examples, rather than - # triggering implicit auto-inclusion in groups with matching metadata. - config.shared_context_metadata_behavior = :apply_to_host_groups - - # This allows you to limit a spec run to individual examples or groups - # you care about by tagging them with `:focus` metadata. When nothing - # is tagged with `:focus`, all examples get run. RSpec also provides - # aliases for `it`, `describe`, and `context` that include `:focus` - # metadata: `fit`, `fdescribe` and `fcontext`, respectively. - # config.filter_run_when_matching :focus - - # Allows RSpec to persist some state between runs in order to support - # the `--only-failures` and `--next-failure` CLI options. We recommend - # you configure your source control system to ignore this file. - # config.example_status_persistence_file_path = "spec/examples.txt" - - # Limits the available syntax to the non-monkey patched syntax that is - # recommended. For more details, see: - # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ - # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode - # config.disable_monkey_patching! - - # This setting enables warnings. It's recommended, but in some cases may - # be too noisy due to issues in dependencies. - # config.warnings = true - - # Many RSpec users commonly either run the entire suite or an individual - # file, and it's useful to allow more verbose output when running an - # individual spec file. - # if config.files_to_run.one? - # # Use the documentation formatter for detailed output, - # # unless a formatter has already been configured - # # (e.g. via a command-line flag). - # config.default_formatter = "doc" - # end - - # Print the 10 slowest examples and example groups at the - # end of the spec run, to help surface which specs are running - # particularly slow. - # config.profile_examples = 10 - - # Run specs in random order to surface order dependencies. If you find an - # order dependency and want to debug it, you can fix the order by providing - # the seed, which is printed after each run. - # --seed 1234 - config.order = :random - - # Seed global randomization in this process using the `--seed` CLI option. - # Setting this allows you to use `--seed` to deterministically reproduce - # test failures related to randomization by passing the same `--seed` value - # as the one that triggered the failure. - Kernel.srand config.seed - - config.include Faraday::HelperMethods -end - -# Extends RSpec DocumentationFormatter to hide skipped tests. -module FormatterOverrides - def example_pending(_arg); end - - def dump_pending(_arg); end - - RSpec::Core::Formatters::DocumentationFormatter.prepend self -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/disabling_stub.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/disabling_stub.rb deleted file mode 100644 index 3df2f21b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/disabling_stub.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -# Allows to disable WebMock stubs -module DisablingStub - def disable - @disabled = true - end - - def disabled? - @disabled - end - - WebMock::RequestStub.prepend self -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/fake_safe_buffer.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/fake_safe_buffer.rb deleted file mode 100644 index 69afd6ea..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/fake_safe_buffer.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -# emulates ActiveSupport::SafeBuffer#gsub -FakeSafeBuffer = Struct.new(:string) do - def to_s - self - end - - def gsub(regex) - string.gsub(regex) do - match, = Regexp.last_match(0), '' =~ /a/ # rubocop:disable Performance/StringInclude - yield(match) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/faraday_middleware_subclasses.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/faraday_middleware_subclasses.rb deleted file mode 100644 index 4e63f61a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/faraday_middleware_subclasses.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module FaradayMiddlewareSubclasses - class SubclassNoOptions < Faraday::Middleware - end - - class SubclassOneOption < Faraday::Middleware - DEFAULT_OPTIONS = { some_other_option: false }.freeze - end - - class SubclassTwoOptions < Faraday::Middleware - DEFAULT_OPTIONS = { some_option: true, some_other_option: false }.freeze - end -end - -Faraday::Response.register_middleware(no_options: FaradayMiddlewareSubclasses::SubclassNoOptions) -Faraday::Response.register_middleware(one_option: FaradayMiddlewareSubclasses::SubclassOneOption) -Faraday::Response.register_middleware(two_options: FaradayMiddlewareSubclasses::SubclassTwoOptions) diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/helper_methods.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/helper_methods.rb deleted file mode 100644 index 0f5d4f5a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/helper_methods.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -module Faraday - module HelperMethods - def self.included(base) - base.extend ClassMethods - end - - module ClassMethods - def features(*features) - @features = features - end - - def on_feature(name) - yield if block_given? && feature?(name) - end - - def feature?(name) - if @features.nil? - superclass.feature?(name) if superclass.respond_to?(:feature?) - elsif @features.include?(name) - true - end - end - - def method_with_body?(method) - METHODS_WITH_BODY.include?(method.to_s) - end - end - - def ssl_mode? - ENV['SSL'] == 'yes' - end - - def normalize(url) - Faraday::Utils::URI(url) - end - - def with_default_uri_parser(parser) - old_parser = Faraday::Utils.default_uri_parser - begin - Faraday::Utils.default_uri_parser = parser - yield - ensure - Faraday::Utils.default_uri_parser = old_parser - end - end - - def with_env(new_env) - old_env = {} - - new_env.each do |key, value| - old_env[key] = ENV.fetch(key, false) - ENV[key] = value - end - - begin - yield - ensure - old_env.each do |key, value| - value == false ? ENV.delete(key) : ENV[key] = value - end - end - end - - def with_env_proxy_disabled - Faraday.ignore_env_proxy = true - - begin - yield - ensure - Faraday.ignore_env_proxy = false - end - end - - def capture_warnings - old = $stderr - $stderr = StringIO.new - begin - yield - $stderr.string - ensure - $stderr = old - end - end - - def method_with_body?(method) - self.class.method_with_body?(method) - end - - def big_string - kb = 1024 - (32..126).map(&:chr).cycle.take(50 * kb).join - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/adapter.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/adapter.rb deleted file mode 100644 index 62569088..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/adapter.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -shared_examples 'an adapter' do |**options| - before { skip } if options[:skip] - - context 'with SSL enabled' do - before { ENV['SSL'] = 'yes' } - include_examples 'adapter examples', options - end - - context 'with SSL disabled' do - before { ENV['SSL'] = 'no' } - include_examples 'adapter examples', options - end -end - -shared_examples 'adapter examples' do |**options| - include Faraday::StreamingResponseChecker - - let(:adapter) { described_class.name.split('::').last } - - let(:conn_options) { { headers: { 'X-Faraday-Adapter' => adapter } }.merge(options[:conn_options] || {}) } - - let(:adapter_options) do - return [] unless options[:adapter_options] - - if options[:adapter_options].is_a?(Array) - options[:adapter_options] - else - [options[:adapter_options]] - end - end - - let(:protocol) { ssl_mode? ? 'https' : 'http' } - let(:remote) { "#{protocol}://example.com" } - let(:stub_remote) { remote } - - let(:conn) do - conn_options[:ssl] ||= {} - conn_options[:ssl][:ca_file] ||= ENV.fetch('SSL_FILE', nil) - conn_options[:ssl][:verify_hostname] ||= ENV['SSL_VERIFY_HOSTNAME'] == 'yes' - - Faraday.new(remote, conn_options) do |conn| - conn.request :url_encoded - conn.response :raise_error - conn.adapter described_class, *adapter_options - end - end - - let!(:request_stub) { stub_request(http_method, stub_remote) } - - after do - expect(request_stub).to have_been_requested unless request_stub.disabled? - end - - describe '#delete' do - let(:http_method) { :delete } - - it_behaves_like 'a request method', :delete - end - - describe '#get' do - let(:http_method) { :get } - - it_behaves_like 'a request method', :get - end - - describe '#head' do - let(:http_method) { :head } - - it_behaves_like 'a request method', :head - end - - describe '#options' do - let(:http_method) { :options } - - it_behaves_like 'a request method', :options - end - - describe '#patch' do - let(:http_method) { :patch } - - it_behaves_like 'a request method', :patch - end - - describe '#post' do - let(:http_method) { :post } - - it_behaves_like 'a request method', :post - end - - describe '#put' do - let(:http_method) { :put } - - it_behaves_like 'a request method', :put - end - - on_feature :trace_method do - describe '#trace' do - let(:http_method) { :trace } - - it_behaves_like 'a request method', :trace - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/params_encoder.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/params_encoder.rb deleted file mode 100644 index 38c85679..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/params_encoder.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -shared_examples 'a params encoder' do - it 'escapes safe buffer' do - monies = FakeSafeBuffer.new('$32,000.00') - expect(subject.encode('a' => monies)).to eq('a=%2432%2C000.00') - end - - it 'raises type error for empty string' do - expect { subject.encode('') }.to raise_error(TypeError) do |error| - expect(error.message).to eq("Can't convert String into Hash.") - end - end - - it 'encodes nil' do - expect(subject.encode('a' => nil)).to eq('a') - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/request_method.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/request_method.rb deleted file mode 100644 index afa33767..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/shared_examples/request_method.rb +++ /dev/null @@ -1,263 +0,0 @@ -# frozen_string_literal: true - -shared_examples 'proxy examples' do - it 'handles requests with proxy' do - res = conn.public_send(http_method, '/') - - expect(res.status).to eq(200) - end - - it 'handles proxy failures' do - request_stub.to_return(status: 407) - - expect { conn.public_send(http_method, '/') }.to raise_error(Faraday::ProxyAuthError) - end -end - -shared_examples 'a request method' do |http_method| - let(:query_or_body) { method_with_body?(http_method) ? :body : :query } - let(:response) { conn.public_send(http_method, '/') } - - unless http_method == :head && feature?(:skip_response_body_on_head) - it 'retrieves the response body' do - res_body = 'test' - request_stub.to_return(body: res_body) - expect(conn.public_send(http_method, '/').body).to eq(res_body) - end - end - - it 'handles headers with multiple values' do - request_stub.to_return(headers: { 'Set-Cookie' => 'name=value' }) - expect(response.headers['set-cookie']).to eq('name=value') - end - - it 'retrieves the response headers' do - request_stub.to_return(headers: { 'Content-Type' => 'text/plain' }) - expect(response.headers['Content-Type']).to match(%r{text/plain}) - expect(response.headers['content-type']).to match(%r{text/plain}) - end - - it 'sends user agent' do - request_stub.with(headers: { 'User-Agent' => 'Agent Faraday' }) - conn.public_send(http_method, '/', nil, user_agent: 'Agent Faraday') - end - - it 'represents empty body response as blank string' do - expect(response.body).to eq('') - end - - it 'handles connection error' do - request_stub.disable - expect { conn.public_send(http_method, 'http://localhost:4') }.to raise_error(Faraday::ConnectionFailed) - end - - on_feature :local_socket_binding do - it 'binds local socket' do - stub_request(http_method, 'http://example.com') - - host = '1.2.3.4' - port = 1234 - conn_options[:request] = { bind: { host: host, port: port } } - - conn.public_send(http_method, '/') - - expect(conn.options[:bind][:host]).to eq(host) - expect(conn.options[:bind][:port]).to eq(port) - end - end - - # context 'when wrong ssl certificate is provided' do - # let(:ca_file_path) { 'tmp/faraday-different-ca-cert.crt' } - # before { conn_options.merge!(ssl: { ca_file: ca_file_path }) } - # - # it do - # expect { conn.public_send(http_method, '/') }.to raise_error(Faraday::SSLError) # do |ex| - # expect(ex.message).to include?('certificate') - # end - # end - # end - - on_feature :request_body_on_query_methods do - it 'sends request body' do - request_stub.with({ body: 'test' }) - res = if query_or_body == :body - conn.public_send(http_method, '/', 'test') - else - conn.public_send(http_method, '/') do |req| - req.body = 'test' - end - end - expect(res.env.request_body).to eq('test') - end - end - - it 'sends url encoded parameters' do - payload = { name: 'zack' } - request_stub.with({ query_or_body => payload }) - res = conn.public_send(http_method, '/', payload) - if query_or_body == :query - expect(res.env.request_body).to be_nil - else - expect(res.env.request_body).to eq('name=zack') - end - end - - it 'sends url encoded nested parameters' do - payload = { name: { first: 'zack' } } - request_stub.with({ query_or_body => payload }) - conn.public_send(http_method, '/', payload) - end - - # TODO: This needs reimplementation: see https://github.com/lostisland/faraday/issues/718 - # Should raise Faraday::TimeoutError - it 'supports timeout option' do - conn_options[:request] = { timeout: 1 } - request_stub.to_timeout - exc = adapter == 'NetHttp' ? Faraday::ConnectionFailed : Faraday::TimeoutError - expect { conn.public_send(http_method, '/') }.to raise_error(exc) - end - - # TODO: This needs reimplementation: see https://github.com/lostisland/faraday/issues/718 - # Should raise Faraday::ConnectionFailed - it 'supports open_timeout option' do - conn_options[:request] = { open_timeout: 1 } - request_stub.to_timeout - exc = adapter == 'NetHttp' ? Faraday::ConnectionFailed : Faraday::TimeoutError - expect { conn.public_send(http_method, '/') }.to raise_error(exc) - end - - on_feature :reason_phrase_parse do - it 'parses the reason phrase' do - request_stub.to_return(status: [200, 'OK']) - expect(response.reason_phrase).to eq('OK') - end - end - - on_feature :compression do - # Accept-Encoding header not sent for HEAD requests as body is not expected in the response. - unless http_method == :head - it 'handles gzip compression' do - request_stub.with(headers: { 'Accept-Encoding' => /\bgzip\b/ }) - conn.public_send(http_method, '/') - end - - it 'handles deflate compression' do - request_stub.with(headers: { 'Accept-Encoding' => /\bdeflate\b/ }) - conn.public_send(http_method, '/') - end - end - end - - on_feature :streaming do - describe 'streaming' do - let(:streamed) { [] } - - context 'when response is empty' do - it 'handles streaming' do - env = nil - conn.public_send(http_method, '/') do |req| - req.options.on_data = proc do |chunk, size, block_env| - streamed << [chunk, size] - env ||= block_env - end - end - - expect(streamed).to eq([['', 0]]) - # TODO: enable this after updating all existing adapters to the new streaming API - # expect(env).to be_a(Faraday::Env) - # expect(env.status).to eq(200) - end - end - - context 'when response contains big data' do - before { request_stub.to_return(body: big_string) } - - it 'handles streaming' do - env = nil - response = conn.public_send(http_method, '/') do |req| - req.options.on_data = proc do |chunk, size, block_env| - streamed << [chunk, size] - env ||= block_env - end - end - - expect(response.body).to eq('') - check_streaming_response(streamed, chunk_size: 16 * 1024) - # TODO: enable this after updating all existing adapters to the new streaming API - # expect(env).to be_a(Faraday::Env) - # expect(env.status).to eq(200) - end - end - end - end - - on_feature :parallel do - context 'with parallel setup' do - before do - @resp1 = nil - @resp2 = nil - @payload1 = { a: '1' } - @payload2 = { b: '2' } - - request_stub - .with({ query_or_body => @payload1 }) - .to_return(body: @payload1.to_json) - - stub_request(http_method, remote) - .with({ query_or_body => @payload2 }) - .to_return(body: @payload2.to_json) - - conn.in_parallel do - @resp1 = conn.public_send(http_method, '/', @payload1) - @resp2 = conn.public_send(http_method, '/', @payload2) - - expect(conn.in_parallel?).to be_truthy - expect(@resp1.body).to be_nil - expect(@resp2.body).to be_nil - end - - expect(conn.in_parallel?).to be_falsey - end - - it 'handles parallel requests status' do - expect(@resp1&.status).to eq(200) - expect(@resp2&.status).to eq(200) - end - - unless http_method == :head && feature?(:skip_response_body_on_head) - it 'handles parallel requests body' do - expect(@resp1&.body).to eq(@payload1.to_json) - expect(@resp2&.body).to eq(@payload2.to_json) - end - end - end - end - - context 'when a proxy is provided as option' do - before do - conn_options[:proxy] = 'http://env-proxy.com:80' - end - - include_examples 'proxy examples' - end - - context 'when http_proxy env variable is set' do - let(:proxy_url) { 'http://env-proxy.com:80' } - - around do |example| - with_env 'http_proxy' => proxy_url do - example.run - end - end - - include_examples 'proxy examples' - - context 'when the env proxy is ignored' do - around do |example| - with_env_proxy_disabled(&example) - end - - include_examples 'proxy examples' - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/streaming_response_checker.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/streaming_response_checker.rb deleted file mode 100644 index 8ef25999..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-2.13.1/spec/support/streaming_response_checker.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -module Faraday - module StreamingResponseChecker - def check_streaming_response(streamed, options = {}) - opts = { - prefix: '', - streaming?: true - }.merge(options) - - expected_response = opts[:prefix] + big_string - - chunks, sizes = streamed.transpose - - # Check that the total size of the chunks (via the last size returned) - # is the same size as the expected_response - expect(sizes.last).to eq(expected_response.bytesize) - - start_index = 0 - expected_chunks = [] - chunks.each do |actual_chunk| - expected_chunk = expected_response[start_index..((start_index + actual_chunk.bytesize) - 1)] - expected_chunks << expected_chunk - start_index += expected_chunk.bytesize - end - - # it's easier to read a smaller portion, so we check that first - expect(expected_chunks[0][0..255]).to eq(chunks[0][0..255]) - - [expected_chunks, chunks].transpose.each do |expected, actual| - expect(actual).to eq(expected) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/LICENSE.md b/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/LICENSE.md deleted file mode 100644 index b7aabc56..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Jan van der Pas - -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/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/README.md b/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/README.md deleted file mode 100644 index 6d510f4b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Faraday Net::HTTP adapter - -This gem is a [Faraday][faraday] adapter for the [Net::HTTP][net-http] library. Faraday is an HTTP client library that provides a common interface over many adapters. Every adapter is defined into it's own gem. This gem defines the adapter for `Net::HTTP` the HTTP library that's included into the standard library of Ruby. - -## Installation - -Add this line to your application's Gemfile: - -```ruby -gem 'faraday-net_http' -``` - -And then execute: - - $ bundle install - -Or install it yourself as: - - $ gem install faraday-net_http - -## Usage - -```ruby -conn = Faraday.new(...) do |f| - f.adapter :net_http do |http| - # yields Net::HTTP - http.verify_callback = lambda do |preverify, cert_store| - # do something here... - end - end -end -``` - -## Development - -After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. - -To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](rubygems). - -## Contributing - -Bug reports and pull requests are welcome on [GitHub][repo]. - -## License - -The gem is available as open source under the terms of the [license][license]. - -## Code of Conduct - -Everyone interacting in the Faraday Net::HTTP adapter project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct][code-of-conduct]. - -[faraday]: https://github.com/lostisland/faraday -[net-http]: https://ruby-doc.org/stdlib-2.7.0/libdoc/net/http/rdoc/Net/HTTP.html -[rubygems]: https://rubygems.org -[repo]: https://github.com/lostisland/faraday-net_http -[license]: https://github.com/lostisland/faraday-net_http/blob/main/LICENSE.md -[code-of-conduct]: https://github.com/lostisland/faraday-net_http/blob/main/CODE_OF_CONDUCT.md diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/adapter/net_http.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/adapter/net_http.rb deleted file mode 100644 index 871bd866..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/adapter/net_http.rb +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -begin - require 'net/https' -rescue LoadError - warn 'Warning: no such file to load -- net/https. ' \ - 'Make sure openssl is installed if you want ssl support' - require 'net/http' -end -require 'zlib' - -module Faraday - class Adapter - class NetHttp < Faraday::Adapter - exceptions = [ - IOError, - Errno::EADDRNOTAVAIL, - Errno::EALREADY, - Errno::ECONNABORTED, - Errno::ECONNREFUSED, - Errno::ECONNRESET, - Errno::EHOSTUNREACH, - Errno::EINVAL, - Errno::ENETUNREACH, - Errno::EPIPE, - Net::HTTPBadResponse, - Net::HTTPHeaderSyntaxError, - Net::ProtocolError, - SocketError, - Zlib::GzipFile::Error - ] - - exceptions << ::OpenSSL::SSL::SSLError if defined?(::OpenSSL::SSL::SSLError) - exceptions << ::Net::OpenTimeout if defined?(::Net::OpenTimeout) - - NET_HTTP_EXCEPTIONS = exceptions.freeze - - def initialize(app = nil, opts = {}, &block) - @ssl_cert_store = nil - super(app, opts, &block) - end - - def build_connection(env) - net_http_connection(env).tap do |http| - configure_ssl(http, env[:ssl]) if env[:url].scheme == 'https' && env[:ssl] - configure_request(http, env[:request]) - end - end - - def net_http_connection(env) - proxy = env[:request][:proxy] - port = env[:url].port || (env[:url].scheme == 'https' ? 443 : 80) - if proxy - Net::HTTP.new(env[:url].hostname, port, - proxy[:uri].hostname, proxy[:uri].port, - proxy[:user], proxy[:password], - nil, proxy[:uri].scheme == 'https') - else - Net::HTTP.new(env[:url].hostname, port, nil) - end - end - - def call(env) - super - connection(env) do |http| - perform_request(http, env) - rescue *NET_HTTP_EXCEPTIONS => e - raise Faraday::SSLError, e if defined?(OpenSSL) && e.is_a?(OpenSSL::SSL::SSLError) - - raise Faraday::ConnectionFailed, e - end - @app.call env - rescue Timeout::Error, Errno::ETIMEDOUT => e - raise Faraday::TimeoutError, e - end - - private - - def create_request(env) - request = Net::HTTPGenericRequest.new \ - env[:method].to_s.upcase, # request method - !!env[:body], # is there request body - env[:method] != :head, # is there response body - env[:url].request_uri, # request uri path - env[:request_headers] # request headers - - if env[:body].respond_to?(:read) - request.body_stream = env[:body] - else - request.body = env[:body] - end - request - end - - def perform_request(http, env) - if env.stream_response? - http_response = env.stream_response do |&on_data| - request_with_wrapped_block(http, env, &on_data) - end - http_response.body = nil - else - http_response = request_with_wrapped_block(http, env) - end - env.response_body = encoded_body(http_response) - env.response.finish(env) - http_response - end - - def request_with_wrapped_block(http, env, &block) - # Must use Net::HTTP#start and pass it a block otherwise the server's - # TCP socket does not close correctly. - http.start do |opened_http| - opened_http.request create_request(env) do |response| - save_http_response(env, response) - - response.read_body(&block) if block_given? - end - end - end - - def save_http_response(env, http_response) - save_response( - env, http_response.code.to_i, nil, nil, http_response.message, finished: false - ) do |response_headers| - http_response.each_header do |key, value| - response_headers[key] = value - end - end - end - - def configure_ssl(http, ssl) - http.use_ssl = true if http.respond_to?(:use_ssl=) - - http.verify_mode = ssl_verify_mode(ssl) - http.cert_store = ssl_cert_store(ssl) - - cert, *extra_chain_cert = ssl[:client_cert] - http.cert = cert if cert - http.extra_chain_cert = extra_chain_cert if extra_chain_cert.any? - - http.key = ssl[:client_key] if ssl[:client_key] - http.ca_file = ssl[:ca_file] if ssl[:ca_file] - http.ca_path = ssl[:ca_path] if ssl[:ca_path] - http.verify_depth = ssl[:verify_depth] if ssl[:verify_depth] - http.ssl_version = ssl[:version] if ssl[:version] - http.min_version = ssl[:min_version] if ssl[:min_version] - http.max_version = ssl[:max_version] if ssl[:max_version] - http.verify_hostname = ssl[:verify_hostname] if verify_hostname_enabled?(http, ssl) - http.ciphers = ssl[:ciphers] if ssl[:ciphers] - end - - def configure_request(http, req) - if (sec = request_timeout(:read, req)) - http.read_timeout = sec - end - - if (sec = http.respond_to?(:write_timeout=) && - request_timeout(:write, req)) - http.write_timeout = sec - end - - if (sec = request_timeout(:open, req)) - http.open_timeout = sec - end - - # Only set if Net::Http supports it, since Ruby 2.5. - http.max_retries = 0 if http.respond_to?(:max_retries=) - - @config_block&.call(http) - end - - def ssl_cert_store(ssl) - return ssl[:cert_store] if ssl[:cert_store] - - # Use the default cert store by default, i.e. system ca certs - @ssl_cert_store ||= OpenSSL::X509::Store.new.tap(&:set_default_paths) - end - - def ssl_verify_mode(ssl) - ssl[:verify_mode] || begin - if ssl.fetch(:verify, true) - OpenSSL::SSL::VERIFY_PEER - else - OpenSSL::SSL::VERIFY_NONE - end - end - end - - def encoded_body(http_response) - body = http_response.body || +'' - /\bcharset=([^;]+)/.match(http_response['Content-Type']) do |match| - content_charset = ::Encoding.find(match[1].strip) - body = body.dup if body.frozen? - body.force_encoding(content_charset) - rescue ArgumentError - nil - end - body - end - - def verify_hostname_enabled?(http, ssl) - http.respond_to?(:verify_hostname=) && ssl.key?(:verify_hostname) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http.rb deleted file mode 100644 index e4048e89..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -require 'faraday/adapter/net_http' -require 'faraday/net_http/version' - -module Faraday - module NetHttp - Faraday::Adapter.register_middleware(net_http: Faraday::Adapter::NetHttp) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http/version.rb b/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http/version.rb deleted file mode 100644 index 375e4cbd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.0/lib/faraday/net_http/version.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -module Faraday - module NetHttp - VERSION = '3.4.0' - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/CHANGELOG.md deleted file mode 100644 index 5358f8dd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/CHANGELOG.md +++ /dev/null @@ -1,473 +0,0 @@ -1.17.2 / 2025-04-15 -------------------- - -Fixed: -* #1144, #1145 Update libffi to 3.4.8 to fix installation issues on latest Macos on ARM64 -* Various adjustments to run the specs cleanly on Ruby-3.5 master branch. - - -1.17.1 / 2024-12-30 -------------------- - -Fixed: -* #1117 Restart async callback dispatcher thread after fork. -* #1133 Add ruby-3.4 native gem. -* #1134 Fix FFI::DataConverter non-generic usage in RBS files. - - -1.17.0 / 2024-06-02 -------------------- - -Fixed: -* Add FFI::AbstractMemory#read_array_of_string . It was defined but not exposed to Ruby nor tested. #1070 - - -1.17.0.rc2 / 2024-04-22 -------------------- - -Fixed: -* Add missing write barriers to StructLayout#initialize causing a segfault with GC.stress. #1079 - - -1.17.0.rc1 / 2024-04-08 -------------------- - -Fixed: -* Fix type definitions on `aarch64-linux`. #1067, #1066 -* Use RB_TEST for `Pointer.autorelease=` . #1065 - So that `false` and `nil` are treated as falsey and anything else as truthy. -* Replace Fixnum by Integer. #1064 - Fixnum is no longer present in the ruby language. -* Update `FFI::NativeType` doc. #1061 -* Store FFI::Type::Mapped of FFI::StrPtrConverter in global instead of custom type map -* Various documentation fixes. #1042 -* Update `FFI::Pointer#==` to return `false` if a pointer is compared to a non-pointer object, which is the expected behavior. #1083 -* Avoid warning about undefined wariable `@ffi_functions` #1085 -* Fix a very unlikely GC bug when using a callback block. # 1089 - -Added: -* Provide binary gems for many platforms. #990 -* Add Windows fat binary gem for Ruby-3.3 -* Add RBS type definitions for many user facing parts of the FFI API. #1042 -* Improve fallback search path logic. #1088 - Respect LD_LIBRARY_PATH and DYLD_LIBRARY_PATH on Macos. -* Update libffi to current git master branch. - -Removed: -* Remove `enum CHAR_ARRAY` which is no longer used. #1063 - - -1.16.3 / 2023-10-04 -------------------- - -Fixed: -* Fix gcc error when building on CentOS 7. #1052 -* Avoid trying to store new DataConverter type in frozen TypeDefs hash. #1057 - - -1.16.2 / 2023-09-25 -------------------- - -Fixed: -* Handle null pointer crash after fork. #1051 - - -1.16.1 / 2023-09-24 -------------------- - -Fixed: -* Fix compiling the builtin libffi. #1049 - - -1.16.0 / 2023-09-23 -------------------- - -Fixed: -* Fix an issue with signed bitmasks when using flags on the most significant bit. #949 -* Fix FFI::Pointer#initialize using NUM2LL instead of NUM2ULL. -* Fix FFI::Type#inspect to properly display the constant name. #1002 -* Use libffi closure allocations on hppa-Linux. #1017 - Previously they would segfault. -* Fix class name of Symbol#inspect. -* Fix MSVC support of libtest. #1028 -* Fix attach_function of functions ending in ? or ! #971 - -Added: -* Convert all C-based classes to TypedData and use write barriers. #994, #995, #996, #997, #998, #999, #1000, #1001, #1003, #1004, #1005, #1006, #1007, #1008, #1009, #1010, #1011, #1012 - This results in less pressure on the garbage collector, since the objects can be promoted to the old generation, which means they only get marked on major GC. -* Implement `ObjectSpace.memsize_of()` of all C-based classes. -* Make FFI Ractor compatible. #1023 - Modules extended per `extend FFI::Library` need to be frozen in order to be used by non-main Ractors. - This can be done by calling `freeze` below of all C interface definitions. - * In a Ractor it's possible to: - * load DLLs and call its functions, access its global variables - * use builtin typedefs - * use and modify ractor local typedefs - * define callbacks - * receive async callbacks from non-ruby threads - * use frozen FFI::Library based modules with all attributes (enums, structs, typedefs, functions, callbacks) - * invoke frozen functions and callbacks defined in the main Ractor - * use FFI::Struct definitions from the main Ractor - * In a Ractor it's impossible to: - * create new FFI::Library based modules - * create new FFI::Struct definitions - * use custom global typedefs - * use non-frozen FFI::Library based modules -* Allow type retrieval of attached functions+variables. #1023 -* Make FFI classes `GC.compact` friendly. #1021 -* Update libffi and disable custom trampoline when using libffi closure allocation. #1020 - This is because libffi changed the way how closures are allocated to static trampolines. -* Add types.conf for loongarch64-linux. #943 -* Add types.conf for sw_64-linux (Shen Wei 64-bit, based on Alpha). #1018 -* Add support for aarch64-windows. #1035 -* Windows: Update LoadLibrary error message to include error code. #1026 -* Allow private release method for FFI::ManagedStruct and FFI::AutoPointer. #1029 -* Add support for passing ABI version to FFI.map_library_name. #963 - This adds the new class FFI::LibraryPath . -* Add support for ruby-3.2 to windows binary gem. #1047 -* Enable debug symbols for `rake compile` builds to ease debugging. #1048 - -Removed: -* Remove allocator of AbstractMemory. #1013 - This disables AbstractMemory.new, which has no practical use. -* Remove unused FFI::SizeTypes. #1022 - - -1.15.5 / 2022-01-10 -------------------- - -Fixed: -* Fix long double argument or return values on 32bit i686. #849 -* FFI::ConstGenerator: avoid usage of the same binary file simultaneously. #929 - -Added: -* Add Windows fat binary gem for Ruby-3.1 - -Removed: -* Remove Windows fat binary gem for Ruby < 2.4 - - -1.15.4 / 2021-09-01 -------------------- - -Fixed: -* Fix build for uClibc. #913 -* Correct module lookup when including `ffi-module` gem. #912 - -Changed: -* Use ruby code of the ffi gem in JRuby-9.2.20+. #915 - - -1.15.3 / 2021-06-16 -------------------- - -Fixed: -* Fix temporary packaging issue with libffi. #904 - - -1.15.2 / 2021-06-16 -------------------- - -Added: -* Add support for Windows MINGW-UCRT build. #903 -* Add `/opt/homebrew/lib/` to fallback search paths to improve homebrew support. #880 #882 - -Changed: -* Regenerate `types.conf` for FreeBSD12 aarch64. #902 - - -1.15.1 / 2021-05-22 -------------------- - -Fixed: -* Append -pthread to linker options. #893 -* Use arm or aarch64 to identify Apple ARM CPU arch. #899 -* Allow overriding `gcc` with the `CC` env var in `const_generator.rb` and `struct_generator.rb`. #897 - - -1.15.0 / 2021-03-05 -------------------- - -Fixed: -* Fix MSVC build -* Fix async callbacks in conjunction with fork(). #884 - -Added: -* Allow to pass callbacks in varargs. #885 -* Name the threads for FFI callback dispatcher and async thread calls for easier debugging. #883 - The name can be retrieved by Thread.name and is shown by Thread.list.inspect etc. - Even gdb shows the thread name on supported operating systems. -* Add types.conf for powerpc64le-linux -* Add types.conf for riscv64-linux -* More release automation of ffi gems - -Changed: -* Switch from rubygems-tasks to bundler/gem_helper - -Removed: -* Remove unused VariadicInvoker#init - - -1.14.2 / 2020-12-21 -------------------- - -Fixed: -* Fix builtin libffi on newer Ubuntu caused by an outdated Makefile.in . #863 - - -1.14.1 / 2020-12-19 -------------------- - -Changed: -* Revert changes to FFI::Pointer#write_string made in ffi-1.14.0. - It breaks compatibilty in a way that can cause hard to find errors. #857 - - -1.14.0 / 2020-12-18 -------------------- - -Added: -* Add types.conf for x86_64-msys, x86_64-haiku, aarch64-openbsd and aarch64-darwin (alias arm64-darwin) -* Add method AbstractMemory#size_limit? . #829 -* Add new extconf option --enable-libffi-alloc which is enabled per default on Apple M1 (arm64-darwin). - -Changed: -* Do NULL pointer check only when array length > 0 . #305 -* Raise an error on an unknown order argument. #830 -* Change FFI::Pointer#write_string to terminate with a NUL byte like other string methods. #805 -* Update bundled libffi to latest master. - -Removed: -* Remove win32/stdint.h and stdbool.h because of copyright issue. #693 - -Fixed: -* Fix possible UTF-8 load error in loader script interpretation. #792 -* Fix segfault on non-array argument to #write_array_of_* -* Fix memory leak in MethodHandle . #815 -* Fix possible segfault in combination with fiddle or other libffi using gems . #835 -* Fix possibility to use ffi ruby gem with JRuby-9.3 . #763 -* Fix a GC issue, when a callback Proc is used on more than 2 callback signatures. #820 - - -1.13.1 / 2020-06-09 -------------------- - -Changed: -* Revert use of `ucrtbase.dll` as default C library on Windows-MINGW. - `ucrtbase.dll` is still used on MSWIN target. #790 -* Test for `ffi_prep_closure_loc()` to make sure we can use this function. - This fixes incorrect use of system libffi on MacOS Mojave (10.14). #787 -* Update types.conf on x86_64-dragonflybsd - - -1.13.0 / 2020-06-01 -------------------- - -Added: -* Add TruffleRuby support. Almost all specs are running on TruffleRuby and succeed. #768 -* Add ruby source files to the java gem. This allows to ship the Ruby library code per platform java gem and add it as a default gem to JRuby. #763 -* Add FFI::Platform::LONG_DOUBLE_SIZE -* Add bounds checks for writing to an inline char[] . #756 -* Add long double as callback return value. #771 -* Update type definitions and add types from stdint.h and stddef.h on i386-windows, x86_64-windows, x86_64-darwin, x86_64-linux, arm-linux, powerpc-linux. #749 -* Add new type definitions for powerpc-openbsd and sparcv9-openbsd. #775, #778 - -Changed: -* Raise required ruby version to >= 2.3. -* Lots of cleanups and improvements in library, specs and benchmarks. -* Fix a lot of compiler warnings at the C-extension -* Fix several install issues on MacOS: - * Look for libffi in SDK paths, since recent versions of macOS removed it from `/usr/include` . #757 - * Fix error `ld: library not found for -lgcc_s.10.4` - * Don't built for i386 architecture as it is deprecated -* Several fixes for MSVC build on Windows. #779 -* Use `ucrtbase.dll` as default C library on Windows instead of old `msvcrt.dll`. #779 -* Update builtin libffi to fix a Powerpc issue with parameters of type long -* Allow unmodified sourcing of (the ruby code of) this gem in JRuby and TruffleRuby as a default gem. #747 -* Improve check to detect if a module has a #find_type method suitable for FFI. This fixes compatibility with stdlib `mkmf` . #776 - -Removed: -* Reject callback with `:string` return type at definition, because it didn't work so far and is not save to use. #751, #782 - - -1.12.2 / 2020-02-01 -------------------- - -* Fix possible segfault at FFI::Struct#[] and []= after GC.compact . #742 - - -1.12.1 / 2020-01-14 -------------------- - -Added: -* Add binary gem support for ruby-2.7 on Windows - - -1.12.0 / 2020-01-14 -------------------- - -Added: -* FFI::VERSION is defined as part of `require 'ffi'` now. - It is no longer necessary to `require 'ffi/version'` . - -Changed: -* Update libffi to latest master. - -Deprecated: -* Overwriting struct layouts is now warned and will be disallowed in ffi-2.0. #734, #735 - - -1.11.3 / 2019-11-25 -------------------- - -Removed: -* Remove support for tainted objects which cause deprecation warnings in ruby-2.7. #730 - - -1.11.2 / 2019-11-11 -------------------- - -Added: -* Add DragonFlyBSD as a platform. #724 - -Changed: -* Sort all types.conf files, so that files and changes are easier to compare. -* Regenerated type conf for freebsd12 and x86_64-linux targets. #722 -* Remove MACOSX_DEPLOYMENT_TARGET that was targeting very old version 10.4. #647 -* Fix library name mangling for non glibc Linux/UNIX. #727 -* Fix compiler warnings raised by ruby-2.7 -* Update libffi to latest master. - - -1.11.1 / 2019-05-20 -------------------- - -Changed: -* Raise required ruby version to >=2.0. #699, #700 -* Fix a possible linker error on ruby < 2.3 on Linux. - - -1.11.0 / 2019-05-17 -------------------- -This version was yanked on 2019-05-20 to fix an install issue on ruby-1.9.3. #700 - -Added: -* Add ability to disable or force use of system libffi. #669 - Use like `gem inst ffi -- --enable-system-libffi` . -* Add ability to call FFI callbacks from outside of FFI call frame. #584 -* Add proper documentation to FFI::Generator and ::Task -* Add gemspec metadata. #696, #698 - -Changed: -* Fix stdcall on Win32. #649, #669 -* Fix load paths for FFI::Generator::Task -* Fix FFI::Pointer#read_string(0) to return a binary String. #692 -* Fix benchmark suite so that it runs on ruby-2.x -* Move FFI::Platform::CPU from C to Ruby. #663 -* Move FFI::StructByReference to Ruby. #681 -* Move FFI::DataConverter to Ruby (#661) -* Various cleanups and improvements of specs and benchmarks - -Removed: -* Remove ruby-1.8 and 1.9 compatibility code. #683 -* Remove unused spec files. #684 - - -1.10.0 / 2019-01-06 -------------------- - -Added: -* Add /opt/local/lib/ to ffi's fallback library search path. #638 -* Add binary gem support for ruby-2.6 on Windows -* Add FreeBSD on AArch64 and ARM support. #644 -* Add FFI::LastError.winapi_error on Windows native or Cygwin. #633 - -Changed: -* Update to rake-compiler-dock-0.7.0 -* Use 64-bit inodes on FreeBSD >= 12. #644 -* Switch time_t and suseconds_t types to long on FreeBSD. #627 -* Make register_t long_long on 64-bit FreeBSD. #644 -* Fix Pointer#write_array_of_type #637 - -Removed: -* Drop binary gem support for ruby-2.0 and 2.1 on Windows - - -1.9.25 / 2018-06-03 -------------------- - -Changed: -* Revert closures via libffi. - This re-adds ClosurePool and fixes compat with SELinux enabled systems. #621 - - -1.9.24 / 2018-06-02 -------------------- - -Security Note: - -This update addresses vulnerability CVE-2018-1000201: DLL loading issue which can be hijacked on Windows OS, when a Symbol is used as DLL name instead of a String. Found by Matthew Bush. - -Added: -* Added a CHANGELOG file -* Add mips64(eb) support, and mips r6 support. (#601) - -Changed: -* Update libffi to latest changes on master. -* Don't search in hardcoded /usr paths on Windows. -* Don't treat Symbol args different to Strings in ffi_lib. -* Make sure size_t is defined in Thread.c. Fixes #609 - - -1.9.23 / 2018-02-25 -------------------- - -Changed: -* Fix unnecessary rebuild of configure in darwin multi arch. Fixes #605 - - -1.9.22 / 2018-02-22 -------------------- - -Changed: -* Update libffi to latest changes on master. -* Update detection of system libffi to match new requirements. Fixes #617 -* Prefer bundled libffi over system libffi on Mac OS. -* Do closures via libffi. This removes ClosurePool and fixes compat with PaX. #540 -* Use a more deterministic gem packaging. -* Fix unnecessary update of autoconf files at gem install. - - -1.9.21 / 2018-02-06 -------------------- - -Added: -* Ruby-2.5 support by Windows binary gems. Fixes #598 -* Add missing win64 types. -* Added support for Bitmask. (#573) -* Add support for MSYS2 (#572) and Sparc64 Linux. (#574) - -Changed: -* Fix read_string to not throw an error on length 0. -* Don't use absolute paths for sh and env. Fixes usage on Adroid #528 -* Use Ruby implementation for `which` for better compat with Windows. Fixes #315 -* Fix compatibility with PPC64LE platform. (#577) -* Normalize sparc64 to sparcv9. (#575) - -Removed: -* Drop Ruby 1.8.7 support (#480) - - -1.9.18 / 2017-03-03 -------------------- - -Added: -* Add compatibility with Ruby-2.4. - -Changed: -* Add missing shlwapi.h include to fix Windows build. -* Avoid undefined behaviour of LoadLibrary() on Windows. #553 - - -1.9.17 / 2017-01-13 -------------------- diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/COPYING b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/COPYING deleted file mode 100644 index 76223189..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/COPYING +++ /dev/null @@ -1,49 +0,0 @@ -Copyright (c) 2008-2013, Ruby FFI project contributors -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 Ruby FFI project 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 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. - -libffi, used by this project, is licensed under the MIT license: - -libffi - Copyright (c) 1996-2011 Anthony Green, Red Hat, Inc and others. -See source files for details. - -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/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/Gemfile b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/Gemfile deleted file mode 100644 index c0b21a21..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/Gemfile +++ /dev/null @@ -1,23 +0,0 @@ -source 'https://rubygems.org' - -group :development do - gem 'benchmark' # necessary on ruby-3.5+ - gem 'bigdecimal' # necessary on ruby-3.3+ - gem 'bundler', '>= 1.16', '< 3' - gem 'fiddle', platforms: %i[mri windows] # necessary on ruby-3.5+ - gem 'rake', '~> 13.0' - gem 'rake-compiler', '~> 1.1' - gem 'rake-compiler-dock', '~> 1.9.0' - gem 'rspec', '~> 3.0' -end - -group :doc do - gem 'kramdown' - gem 'yard', '~> 0.9' -end - -group :type_check do - if RUBY_VERSION >= "2.6" && %w[ ruby truffleruby ].include?(RUBY_ENGINE) - gem 'rbs', '~> 3.0' - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE deleted file mode 100644 index 20185fd4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2008-2016, Ruby FFI project contributors -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 Ruby FFI project 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 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/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE.SPECS b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE.SPECS deleted file mode 100644 index 5c9ffcee..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE.SPECS +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2008-2012 Ruby-FFI contributors - -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/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/README.md b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/README.md deleted file mode 100644 index 0605c819..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# Ruby-FFI https://github.com/ffi/ffi/wiki - -## Description - -Ruby-FFI is a gem for programmatically loading dynamically-linked native -libraries, binding functions within them, and calling those functions -from Ruby code. Moreover, a Ruby-FFI extension works without changes -on CRuby (MRI), JRuby, Rubinius and TruffleRuby. [Discover why you should write your next extension -using Ruby-FFI](https://github.com/ffi/ffi/wiki/why-use-ffi). - -## Features - -* Intuitive DSL -* Supports all C native types -* C structs (also nested), enums and global variables -* Callbacks from C to Ruby -* Automatic garbage collection of native memory -* Usable in Ractor: [How-to-use-FFI-in-Ruby-Ractors](https://github.com/ffi/ffi/wiki/Ractors) - -## Synopsis - -```ruby -require 'ffi' - -module MyLib - extend FFI::Library - ffi_lib 'c' - attach_function :puts, [ :string ], :int -end - -MyLib.puts 'Hello, World using libc!' -``` - -For less minimalistic and more examples you may look at: - -* the `samples/` folder -* the examples on the [wiki](https://github.com/ffi/ffi/wiki) -* the projects using FFI listed on the wiki: https://github.com/ffi/ffi/wiki/projects-using-ffi - -## Requirements - -When installing the gem on CRuby (MRI), you will need: -* A C compiler (e.g., Xcode on macOS, `gcc` or `clang` on everything else) -Optionally (speeds up installation): -* The `libffi` library and development headers - this is commonly in the `libffi-dev` or `libffi-devel` packages - -The ffi gem comes with a builtin libffi version, which is used, when the system libffi library is not available or too old. -Use of the system libffi can be enforced by: -``` -gem install ffi -- --enable-system-libffi # to install the gem manually -bundle config build.ffi --enable-system-libffi # for bundle install -``` -or prevented by `--disable-system-libffi`. - -On Linux systems running with [PaX](https://en.wikipedia.org/wiki/PaX) (Gentoo, Alpine, etc.), FFI may trigger `mprotect` errors. You may need to disable [mprotect](https://en.wikibooks.org/wiki/Grsecurity/Appendix/Grsecurity_and_PaX_Configuration_Options#Restrict_mprotect.28.29) for ruby (`paxctl -m [/path/to/ruby]`) for the time being until a solution is found. - -On FreeBSD systems pkgconf must be installed for the gem to be able to compile using clang. Install either via packages `pkg install pkgconf` or from ports via `devel/pkgconf`. - -On JRuby and TruffleRuby, there are no requirements to install the FFI gem, and `require 'ffi'` works even without installing the gem (i.e., the gem is preinstalled on these implementations). - -## Installation - -From rubygems: - - [sudo] gem install ffi - -From a Gemfile using git or GitHub - - gem 'ffi', github: 'ffi/ffi', submodules: true - -or from the git repository on github: - - git clone git://github.com/ffi/ffi.git - cd ffi - git submodule update --init --recursive - bundle install - rake install - -### Install options: - -* `--enable-system-libffi` : Force usage of system libffi -* `--disable-system-libffi` : Force usage of builtin libffi -* `--enable-libffi-alloc` : Force closure allocation by libffi -* `--disable-libffi-alloc` : Force closure allocation by builtin method - -## License - -The ffi library is covered by the BSD license, also see the LICENSE file. -The specs are covered by the same license as [ruby/spec](https://github.com/ruby/spec), the MIT license. - -## Credits - -The following people have submitted code, bug reports, or otherwise contributed to the success of this project: - -* Alban Peignier -* Aman Gupta -* Andrea Fazzi -* Andreas Niederl -* Andrew Cholakian -* Antonio Terceiro -* Benoit Daloze -* Brian Candler -* Brian D. Burns -* Bryan Kearney -* Charlie Savage -* Chikanaga Tomoyuki -* Hongli Lai -* Ian MacLeod -* Jake Douglas -* Jean-Dominique Morani -* Jeremy Hinegardner -* Jesús García Sáez -* Joe Khoobyar -* Jurij Smakov -* KISHIMOTO, Makoto -* Kim Burgestrand -* Lars Kanis -* Luc Heinrich -* Luis Lavena -* Matijs van Zuijlen -* Matthew King -* Mike Dalessio -* NARUSE, Yui -* Park Heesob -* Shin Yee -* Stephen Bannasch -* Suraj N. Kurapati -* Sylvain Daubert -* Victor Costan -* beoran@gmail.com -* ctide -* emboss -* hobophobe -* meh -* postmodern -* wycats@gmail.com -* Wayne Meissner diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/Rakefile b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/Rakefile deleted file mode 100644 index 3b68a7e2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/Rakefile +++ /dev/null @@ -1,206 +0,0 @@ -require 'rbconfig' -require 'date' -require 'fileutils' -require 'yaml' -require 'rspec/core/rake_task' -require 'rubygems/package_task' -require 'rake/extensiontask' -require_relative "lib/ffi/version" -require_relative "rakelib/ffi_gem_helper" - -BUILD_DIR = "build" -BUILD_EXT_DIR = File.join(BUILD_DIR, "#{RbConfig::CONFIG['arch']}", 'ffi_c', RUBY_VERSION) - -gem_spec = Bundler.load_gemspec('ffi.gemspec') - -RSpec::Core::RakeTask.new(:spec) do |config| - config.rspec_opts = YAML.load_file 'spec/spec.opts' -end - -desc "Build all packages" -task :package => %w[ gem:java gem:native ] - -CLOBBER.include 'lib/ffi/types.conf' -CLOBBER.include 'pkg' -CLOBBER.include 'log' - -CLEAN.include 'build' -CLEAN.include 'conftest.dSYM' -CLEAN.include 'spec/ffi/fixtures/libtest.{dylib,so,dll}' -CLEAN.include 'spec/ffi/fixtures/*.o' -CLEAN.include 'spec/ffi/embed-test/ext/*.{o,def}' -CLEAN.include 'spec/ffi/embed-test/ext/Makefile' -CLEAN.include "pkg/ffi-*-*/" -CLEAN.include 'lib/{2,3}.*' - -# clean all shipped files, that are not in git -CLEAN.include( - gem_spec.files - - `git --git-dir ext/ffi_c/libffi/.git ls-files -z`.split("\x0").map { |f| File.join("ext/ffi_c/libffi", f) } - - `git ls-files -z`.split("\x0") -) - -task :distclean => :clobber - -desc "Test the extension" -task :test => [ :spec ] - - -namespace :bench do - ITER = ENV['ITER'] ? ENV['ITER'].to_i : 100000 - bench_files = Dir["bench/bench_*.rb"].sort.reject { |f| f == "bench/bench_helper.rb" } - bench_files.each do |bench| - task File.basename(bench, ".rb")[6..-1] => :compile do - sh %{#{Gem.ruby} #{bench} #{ITER}} - end - end - task :all => :compile do - bench_files.each do |bench| - sh %{#{Gem.ruby} #{bench}} - end - end -end - -task 'spec:run' => :compile -task 'spec:specdoc' => :compile - -task :default => :spec - -namespace 'java' do - - java_gem_spec = gem_spec.dup.tap do |s| - s.files.reject! { |f| File.fnmatch?("ext/*", f) } - s.extensions = [] - s.platform = 'java' - end - - Gem::PackageTask.new(java_gem_spec) do |pkg| - pkg.need_zip = true - pkg.need_tar = true - pkg.package_dir = 'pkg' - end -end - -task 'gem:java' => 'java:gem' - -FfiGemHelper.install_tasks -# Register binary gems to be pushed to rubygems.org -Bundler::GemHelper.instance.cross_platforms = %w[ - x86-mingw32 - x64-mingw-ucrt - x64-mingw32 - x86-linux-gnu - x86-linux-musl - x86_64-linux-gnu - x86_64-linux-musl - arm-linux-gnu - arm-linux-musl - aarch64-linux-gnu - aarch64-linux-musl - x86_64-darwin - arm64-darwin -] - -if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx' - require 'rake/extensiontask' - Rake::ExtensionTask.new('ffi_c', gem_spec) do |ext| - ext.name = 'ffi_c' # indicate the name of the extension. - # ext.lib_dir = BUILD_DIR # put binaries into this folder. - ext.tmp_dir = BUILD_DIR # temporary folder used during compilation. - ext.cross_compile = true # enable cross compilation (requires cross compile toolchain) - ext.cross_platform = Bundler::GemHelper.instance.cross_platforms - ext.cross_compiling do |spec| - spec.files.reject! { |path| File.fnmatch?('ext/*', path) } - end - # Enable debug info for 'rake compile' but not for 'gem install' - ext.config_options << "--enable-debug" - - end -else - task :compile do - STDERR.puts "Nothing to compile on #{RUBY_ENGINE}" - end -end - - -namespace "gem" do - task 'prepare' do - require 'rake_compiler_dock' - sh "bundle package --all" - end - - Bundler::GemHelper.instance.cross_platforms.each do |plat| - desc "Build all native binary gems in parallel" - multitask 'native' => plat - - desc "Build the native gem for #{plat}" - task plat => ['prepare', 'build'] do - RakeCompilerDock.sh <<-EOT, platform: plat - sudo apt-get update && sudo apt-get install -y libltdl-dev && - bundle --local && - rake native:#{plat} pkg/#{gem_spec.full_name}-#{plat}.gem MAKE='nice make -j`nproc`' RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>2.5", "~>3.0")} - EOT - end - end -end - -directory "ext/ffi_c/libffi" -file "ext/ffi_c/libffi/autogen.sh" => "ext/ffi_c/libffi" do - warn "Downloading libffi ..." - sh "git submodule update --init --recursive" -end -task :libffi => "ext/ffi_c/libffi/autogen.sh" - -LIBFFI_GIT_FILES = `git --git-dir ext/ffi_c/libffi/.git ls-files -z`.split("\x0") - -# Generate files which are in the gemspec but not in libffi's git repo by running autogen.sh -gem_spec.files.select do |f| - f =~ /ext\/ffi_c\/libffi\/(.*)/ && !LIBFFI_GIT_FILES.include?($1) -end.each do |f| - file f => "ext/ffi_c/libffi/autogen.sh" do - chdir "ext/ffi_c/libffi" do - sh "sh ./autogen.sh" - end - touch f - if gem_spec.files != Gem::Specification.load('./ffi.gemspec').files - warn "gemspec files have changed -> Please restart rake!" - exit 1 - end - end -end - -# Make sure we have all gemspec files before packaging -task :build => gem_spec.files -task :gem => :build - - -require_relative "lib/ffi/platform" -types_conf = File.expand_path(File.join(FFI::Platform::CONF_DIR, 'types.conf')) -logfile = File.join(File.dirname(__FILE__), 'types_log') - -task types_conf do |task| - require 'fileutils' - require_relative "lib/ffi/tools/types_generator" - options = {} - FileUtils.mkdir_p(File.dirname(task.name), mode: 0755 ) - File.open(task.name, File::CREAT|File::TRUNC|File::RDWR, 0644) do |f| - f.puts FFI::TypesGenerator.generate(options) - end - File.open(logfile, 'w') do |log| - log.puts(types_conf) - end -end - -desc "Create or update type information for platform #{FFI::Platform::NAME}" -task :types_conf => types_conf - -begin - require 'yard' - - namespace :doc do - YARD::Rake::YardocTask.new do |yard| - end - end -rescue LoadError - warn "[warn] YARD unavailable" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/ffi.gemspec b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/ffi.gemspec deleted file mode 100644 index 07d549f7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/ffi.gemspec +++ /dev/null @@ -1,42 +0,0 @@ -require File.expand_path("../lib/#{File.basename(__FILE__, '.gemspec')}/version", __FILE__) - -Gem::Specification.new do |s| - s.name = 'ffi' - s.version = FFI::VERSION - s.author = 'Wayne Meissner' - s.email = 'wmeissner@gmail.com' - s.homepage = 'https://github.com/ffi/ffi/wiki' - s.summary = 'Ruby FFI' - s.description = 'Ruby FFI library' - if s.respond_to?(:metadata) - s.metadata['bug_tracker_uri'] = 'https://github.com/ffi/ffi/issues' - s.metadata['changelog_uri'] = 'https://github.com/ffi/ffi/blob/master/CHANGELOG.md' - s.metadata['documentation_uri'] = 'https://github.com/ffi/ffi/wiki' - s.metadata['wiki_uri'] = 'https://github.com/ffi/ffi/wiki' - s.metadata['source_code_uri'] = 'https://github.com/ffi/ffi/' - s.metadata['mailing_list_uri'] = 'http://groups.google.com/group/ruby-ffi' - end - s.files = `git ls-files -z`.split("\x0").reject do |f| - f =~ /^(\.|bench|gen|libtest|nbproject|spec)/ - end - - # Add libffi git files - lfs = `git --git-dir ext/ffi_c/libffi/.git ls-files -z`.split("\x0") - # Add autoconf generated files of libffi - lfs += %w[ compile configure config.guess config.sub install-sh ltmain.sh missing fficonfig.h.in ] - # Add automake generated files of libffi - lfs += `git --git-dir ext/ffi_c/libffi/.git ls-files -z *.am */*.am`.gsub(".am\0", ".in\0").split("\x0") - s.files += lfs.map do |f| - File.join("ext/ffi_c/libffi", f) - end - - s.extensions << 'ext/ffi_c/extconf.rb' - s.rdoc_options = %w[--exclude=ext/ffi_c/.*\.o$ --exclude=ffi_c\.(bundle|so)$] - s.license = 'BSD-3-Clause' - s.require_paths << 'ext/ffi_c' - s.required_ruby_version = '>= 2.5' - s.add_development_dependency 'rake', '~> 13.0' - s.add_development_dependency 'rake-compiler', '~> 1.1' - s.add_development_dependency 'rake-compiler-dock', '~> 1.0' - s.add_development_dependency 'rspec', '~> 2.14.1' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.5/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.5/ffi_c.so deleted file mode 100644 index 5999eea7..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.5/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.6/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.6/ffi_c.so deleted file mode 100644 index c215c48c..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.6/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.7/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.7/ffi_c.so deleted file mode 100644 index f6dd5d17..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/2.7/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.0/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.0/ffi_c.so deleted file mode 100644 index ac17cd4b..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.0/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.1/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.1/ffi_c.so deleted file mode 100644 index 35babbd6..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.1/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.2/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.2/ffi_c.so deleted file mode 100644 index b58db1e3..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.2/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.3/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.3/ffi_c.so deleted file mode 100644 index 8396d73f..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.3/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.4/ffi_c.so b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.4/ffi_c.so deleted file mode 100644 index c5bdb0af..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/3.4/ffi_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi.rb deleted file mode 100644 index 3fb20a8c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi.rb +++ /dev/null @@ -1,27 +0,0 @@ -if RUBY_ENGINE == 'ruby' - begin - require RUBY_VERSION.split('.')[0, 2].join('.') + '/ffi_c' - rescue Exception - require 'ffi_c' - end - - require 'ffi/ffi' - -elsif RUBY_ENGINE == 'jruby' && (RUBY_ENGINE_VERSION.split('.').map(&:to_i) <=> [9, 2, 20]) >= 0 - JRuby::Util.load_ext("org.jruby.ext.ffi.FFIService") - require 'ffi/ffi' - -elsif RUBY_ENGINE == 'truffleruby' && (RUBY_ENGINE_VERSION.split('.').map(&:to_i) <=> [20, 1, 0]) >= 0 - require 'truffleruby/ffi_backend' - require 'ffi/ffi' - -else - # Remove the ffi gem dir from the load path, then reload the internal ffi implementation - $LOAD_PATH.delete(File.dirname(__FILE__)) - $LOAD_PATH.delete(File.join(File.dirname(__FILE__), 'ffi')) - unless $LOADED_FEATURES.nil? - $LOADED_FEATURES.delete(__FILE__) - $LOADED_FEATURES.delete('ffi.rb') - end - require 'ffi.rb' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/abstract_memory.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/abstract_memory.rb deleted file mode 100644 index e0aa2216..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/abstract_memory.rb +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (C) 2020 Lars Kanis -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - - -module FFI - class AbstractMemory - LONG_MAX = FFI::Pointer.new(1).size - private_constant :LONG_MAX - - # Return +true+ if +self+ has a size limit. - # - # @return [Boolean] - def size_limit? - size != LONG_MAX - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/autopointer.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/autopointer.rb deleted file mode 100644 index d93bc45a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/autopointer.rb +++ /dev/null @@ -1,180 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# Copyright (C) 2008 Mike Dalessio -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. - -module FFI - class AutoPointer < Pointer - extend DataConverter - - # @overload initialize(pointer, method) - # @param pointer [Pointer] - # @param method [Method] - # @return [self] - # The passed Method will be invoked at GC time. - # @overload initialize(pointer, proc) - # @param pointer [Pointer] - # @return [self] - # The passed Proc will be invoked at GC time (SEE WARNING BELOW!) - # @note WARNING: passing a proc _may_ cause your pointer to never be - # GC'd, unless you're careful to avoid trapping a reference to the - # pointer in the proc. See the test specs for examples. - # @overload initialize(pointer) - # @param pointer [Pointer] - # @return [self] - # The pointer's release() class method will be invoked at GC time. - # - # @note The safest, and therefore preferred, calling - # idiom is to pass a Method as the second parameter. Example usage: - # - # class PointerHelper - # def self.release(pointer) - # ... - # end - # end - # - # p = AutoPointer.new(other_pointer, PointerHelper.method(:release)) - # - # The above code will cause PointerHelper#release to be invoked at GC time. - # - # @note - # The last calling idiom (only one parameter) is generally only - # going to be useful if you subclass {AutoPointer}, and override - # #release, which by default does nothing. - def initialize(ptr, proc=nil) - raise TypeError, "Invalid pointer" if ptr.nil? || !ptr.kind_of?(Pointer) || - ptr.kind_of?(MemoryPointer) || ptr.kind_of?(AutoPointer) - super(ptr.type_size, ptr) - - @releaser = if proc - if not proc.respond_to?(:call) - raise RuntimeError.new("proc must be callable") - end - Releaser.new(ptr, proc) - - else - if not self.class.respond_to?(:release, true) - raise RuntimeError.new("no release method defined") - end - Releaser.new(ptr, self.class.method(:release)) - end - - ObjectSpace.define_finalizer(self, @releaser) - self - end - - # @return [nil] - # Free the pointer. - def free - @releaser.free - end - - # @param [Boolean] autorelease - # @return [Boolean] +autorelease+ - # Set +autorelease+ property. See {Pointer Autorelease section at Pointer}. - def autorelease=(autorelease) - raise FrozenError.new("can't modify frozen #{self.class}") if frozen? - @releaser.autorelease=(autorelease) - end - - # @return [Boolean] +autorelease+ - # Get +autorelease+ property. See {Pointer Autorelease section at Pointer}. - def autorelease? - @releaser.autorelease - end - - # @abstract Base class for {AutoPointer}'s releasers. - # - # All subclasses of Releaser should define a +#release(ptr)+ method. - # A releaser is an object in charge of release an {AutoPointer}. - class Releaser - attr_accessor :autorelease - - # @param [Pointer] ptr - # @param [#call] proc - # @return [nil] - # A new instance of Releaser. - def initialize(ptr, proc) - @ptr = ptr - @proc = proc - @autorelease = true - end - - # @return [nil] - # Free pointer. - def free - if @ptr - release(@ptr) - @autorelease = false - @ptr = nil - @proc = nil - end - end - - # @param args - # Release pointer if +autorelease+ is set. - def call(*args) - release(@ptr) if @autorelease && @ptr - end - - # Release +ptr+ by using Proc or Method defined at +ptr+ - # {AutoPointer#initialize initialization}. - # - # @param [Pointer] ptr - # @return [nil] - def release(ptr) - @proc.call(ptr) - end - end - - # Return native type of AutoPointer. - # - # Override {DataConverter#native_type}. - # @return [Type::POINTER] - # @raise {RuntimeError} if class does not implement a +#release+ method - def self.native_type - if not self.respond_to?(:release, true) - raise RuntimeError.new("no release method defined for #{self.inspect}") - end - Type::POINTER - end - - # Create a new AutoPointer. - # - # Override {DataConverter#from_native}. - # @overload self.from_native(ptr, ctx) - # @param [Pointer] ptr - # @param ctx not used. Please set +nil+. - # @return [AutoPointer] - def self.from_native(val, ctx) - self.new(val) - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/buffer.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/buffer.rb deleted file mode 100644 index 449e45b0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/buffer.rb +++ /dev/null @@ -1,4 +0,0 @@ -# -# All the code from this file is now implemented in C. This file remains -# to satisfy any leftover require 'ffi/buffer' in user code -# diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/callback.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/callback.rb deleted file mode 100644 index 32d52f72..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/callback.rb +++ /dev/null @@ -1,4 +0,0 @@ -# -# All the code from this file is now implemented in C. This file remains -# to satisfy any leftover require 'ffi/callback' in user code -# diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/compat.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/compat.rb deleted file mode 100644 index 75690134..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/compat.rb +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (C) 2023-2023 Lars Kanis -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -module FFI - if defined?(Ractor.make_shareable) - # This is for FFI internal use only. - def self.make_shareable(obj) - Ractor.make_shareable(obj) - end - else - def self.make_shareable(obj) - obj.freeze - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/data_converter.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/data_converter.rb deleted file mode 100644 index 7852e7ee..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/data_converter.rb +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -module FFI - # This module is used to extend somes classes and give then a common API. - # - # Most of methods defined here must be overridden. - module DataConverter - # Get native type. - # - # @overload native_type(type) - # @param [String, Symbol, Type] type - # @return [Type] - # Get native type from +type+. - # - # @overload native_type - # @raise {NotImplementedError} This method must be overridden. - def native_type(type = nil) - if type - @native_type = FFI.find_type(type) - else - native_type = @native_type - unless native_type - raise NotImplementedError, 'native_type method not overridden and no native_type set' - end - native_type - end - end - - # Convert to a native type. - def to_native(value, ctx) - value - end - - # Convert from a native type. - def from_native(value, ctx) - value - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/dynamic_library.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/dynamic_library.rb deleted file mode 100644 index 468ce044..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/dynamic_library.rb +++ /dev/null @@ -1,118 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -module FFI - class DynamicLibrary - SEARCH_PATH = [] - - # The following search paths are tried, if the library could not be loaded in the first attempt. - # They are only executed on Macos in the following order: - if FFI::Platform.mac? - - # 1. Try library paths possibly defined in LD_LIBRARY_PATH DYLD_LIBRARY_PATH first. - # This is because dlopen doesn't respect LD_LIBRARY_PATH and DYLD_LIBRARY_PATH is deleted by SIP-protected binaries. - # See here for details: https://github.com/ffi/ffi/issues/923#issuecomment-1872565313 - %w[LD_LIBRARY_PATH DYLD_LIBRARY_PATH].each do |custom_path| - SEARCH_PATH.concat ENV.fetch(custom_path,"").split(File::PATH_SEPARATOR) - end - - # 2. Then on macos/arm64 try /opt/homebrew/lib, since this is a typical standard directory. - # FFI is often used together with homebrew, so that we hardcode the path for arm64 here. - if FFI::Platform::ARCH == 'aarch64' - SEARCH_PATH << '/opt/homebrew/lib' - end - - # 3. Then try typical system directories starting with the /local/ directory first. - # - # /usr/local/lib is used by homebrow on x86_64. - # /opt/local/lib is used by MacPorts and Fink. - # /usr/lib is there, because it was always there. - SEARCH_PATH.concat %w[/opt/local/lib /usr/local/lib /usr/lib] - end - - # On Linux the library lookup paths are usually defined through /etc/ld.so.conf, which can be changed at will with root permissions. - # Also LD_LIBRARY_PATH is respected by the dynamic loader, so that there's usually no need and no advantage to do a fallback handling. - # - # Windows has it's own library lookup logic, very different to what we do here. - # See: https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#user-content-dll-loading - - FFI.make_shareable(SEARCH_PATH) - SEARCH_PATH_MESSAGE = "Searched in #{ SEARCH_PATH.map{|a| ', ' + a}.join }".freeze - - def self.load_library(name, flags) - if name == FFI::CURRENT_PROCESS - FFI::DynamicLibrary.open(nil, RTLD_LAZY | RTLD_LOCAL) - else - flags ||= RTLD_LAZY | RTLD_LOCAL - - libnames = (name.is_a?(::Array) ? name : [name]) - libnames = libnames.map(&:to_s).map { |n| [n, FFI.map_library_name(n)].uniq }.flatten.compact - errors = [] - - libnames.each do |libname| - lib = try_load(libname, flags, errors) - return lib if lib - - unless libname.start_with?("/") - SEARCH_PATH.each do |prefix| - path = "#{prefix}/#{libname}" - if File.exist?(path) - lib = try_load(path, flags, errors) - return lib if lib - end - end - end - end - - raise LoadError, [*errors, SEARCH_PATH_MESSAGE].join(".\n") - end - end - private_class_method :load_library - - def self.try_load(libname, flags, errors) - begin - lib = FFI::DynamicLibrary.open(libname, flags) - return lib if lib - - # LoadError for C ext & JRuby, RuntimeError for TruffleRuby - rescue LoadError, RuntimeError => ex - if ex.message =~ /(([^ \t()])+\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format)/ - if File.binread($1) =~ /(?:GROUP|INPUT) *\( *([^ \)]+)/ - return try_load($1, flags, errors) - end - end - - errors << ex - nil - end - end - private_class_method :try_load - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/enum.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/enum.rb deleted file mode 100644 index af783316..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/enum.rb +++ /dev/null @@ -1,302 +0,0 @@ -# -# Copyright (C) 2009, 2010 Wayne Meissner -# Copyright (C) 2009 Luc Heinrich -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -module FFI - - # An instance of this class permits to manage {Enum}s. In fact, Enums is a collection of {Enum}s. - class Enums - - def initialize - @all_enums = Array.new - @tagged_enums = Hash.new - @symbol_map = Hash.new - end - - # @param [Enum] enum - # Add an {Enum} to the collection. - def <<(enum) - @all_enums << enum - @tagged_enums[enum.tag] = enum unless enum.tag.nil? - @symbol_map.merge!(enum.symbol_map) - end - - # @param query enum tag or part of an enum name - # @return [Enum] - # Find a {Enum} in collection. - def find(query) - if @tagged_enums.has_key?(query) - @tagged_enums[query] - else - @all_enums.detect { |enum| enum.symbols.include?(query) } - end - end - - # @param symbol a symbol to find in merge symbol maps of all enums. - # @return a symbol - def __map_symbol(symbol) - @symbol_map[symbol] - end - - end - - # Represents a C enum. - # - # For a C enum: - # enum fruits { - # apple, - # banana, - # orange, - # pineapple - # }; - # are defined this vocabulary: - # * a _symbol_ is a word from the enumeration (ie. _apple_, by example); - # * a _value_ is the value of a symbol in the enumeration (by example, apple has value _0_ and banana _1_). - class Enum - include DataConverter - - attr_reader :tag - attr_reader :native_type - - # @overload initialize(info, tag=nil) - # @param [nil, Enumerable] info - # @param [nil, Symbol] tag enum tag - # @overload initialize(native_type, info, tag=nil) - # @param [FFI::Type] native_type Native type for new Enum - # @param [nil, Enumerable] info symbols and values for new Enum - # @param [nil, Symbol] tag name of new Enum - def initialize(*args) - @native_type = args.first.kind_of?(FFI::Type) ? args.shift : Type::INT - info, @tag = *args - @kv_map = Hash.new - unless info.nil? - last_cst = nil - value = 0 - info.each do |i| - case i - when Symbol - raise ArgumentError, "duplicate enum key" if @kv_map.has_key?(i) - @kv_map[i] = value - last_cst = i - value += 1 - when Integer - @kv_map[last_cst] = i - value = i+1 - end - end - end - @vk_map = @kv_map.invert - end - - # @return [Array] enum symbol names - def symbols - @kv_map.keys - end - - # Get a symbol or a value from the enum. - # @overload [](query) - # Get enum value from symbol. - # @param [Symbol] query - # @return [Integer] - # @overload [](query) - # Get enum symbol from value. - # @param [Integer] query - # @return [Symbol] - def [](query) - case query - when Symbol - @kv_map[query] - when Integer - @vk_map[query] - end - end - alias find [] - - # Get the symbol map. - # @return [Hash] - def symbol_map - @kv_map - end - - alias to_h symbol_map - alias to_hash symbol_map - - # @param [Symbol, Integer, #to_int] val - # @param ctx unused - # @return [Integer] value of a enum symbol - def to_native(val, ctx) - @kv_map[val] || if val.is_a?(Integer) - val - elsif val.respond_to?(:to_int) - val.to_int - else - raise ArgumentError, "invalid enum value, #{val.inspect}" - end - end - - # @param val - # @return symbol name if it exists for +val+. - def from_native(val, ctx) - @vk_map[val] || val - end - end - - # Represents a C enum whose values are power of 2 - # - # @example - # enum { - # red = (1<<0), - # green = (1<<1), - # blue = (1<<2) - # } - # - # Contrary to classical enums, bitmask values are usually combined - # when used. - class Bitmask < Enum - - # @overload initialize(info, tag=nil) - # @param [nil, Enumerable] info symbols and bit rank for new Bitmask - # @param [nil, Symbol] tag name of new Bitmask - # @overload initialize(native_type, info, tag=nil) - # @param [FFI::Type] native_type Native type for new Bitmask - # @param [nil, Enumerable] info symbols and bit rank for new Bitmask - # @param [nil, Symbol] tag name of new Bitmask - def initialize(*args) - @native_type = args.first.kind_of?(FFI::Type) ? args.shift : Type::INT - @signed = [Type::INT8, Type::INT16, Type::INT32, Type::INT64].include?(@native_type) - info, @tag = *args - @kv_map = Hash.new - unless info.nil? - last_cst = nil - value = 0 - info.each do |i| - case i - when Symbol - raise ArgumentError, "duplicate bitmask key" if @kv_map.has_key?(i) - @kv_map[i] = 1 << value - last_cst = i - value += 1 - when Integer - raise ArgumentError, "bitmask index should be positive" if i<0 - @kv_map[last_cst] = 1 << i - value = i+1 - end - end - end - @vk_map = @kv_map.invert - end - - # Get a symbol list or a value from the bitmask - # @overload [](*query) - # Get bitmask value from symbol list - # @param [Symbol] query - # @return [Integer] - # @overload [](query) - # Get bitmask value from symbol array - # @param [Array] query - # @return [Integer] - # @overload [](*query) - # Get a list of bitmask symbols corresponding to - # the or reduction of a list of integer - # @param [Integer] query - # @return [Array] - # @overload [](query) - # Get a list of bitmask symbols corresponding to - # the or reduction of a list of integer - # @param [Array] query - # @return [Array] - def [](*query) - flat_query = query.flatten - raise ArgumentError, "query should be homogeneous, #{query.inspect}" unless flat_query.all? { |o| o.is_a?(Symbol) } || flat_query.all? { |o| o.is_a?(Integer) || o.respond_to?(:to_int) } - case flat_query[0] - when Symbol - flat_query.inject(0) do |val, o| - v = @kv_map[o] - if v then val | v else val end - end - when Integer, ->(o) { o.respond_to?(:to_int) } - val = flat_query.inject(0) { |mask, o| mask |= o.to_int } - @kv_map.select { |_, v| v & val != 0 }.keys - end - end - - # Get the native value of a bitmask - # @overload to_native(query, ctx) - # @param [Symbol, Integer, #to_int] query - # @param ctx unused - # @return [Integer] value of a bitmask - # @overload to_native(query, ctx) - # @param [Array] query - # @param ctx unused - # @return [Integer] value of a bitmask - def to_native(query, ctx) - return 0 if query.nil? - flat_query = [query].flatten - res = flat_query.inject(0) do |val, o| - case o - when Symbol - v = @kv_map[o] - raise ArgumentError, "invalid bitmask value, #{o.inspect}" unless v - val | v - when Integer - val | o - when ->(obj) { obj.respond_to?(:to_int) } - val | o.to_int - else - raise ArgumentError, "invalid bitmask value, #{o.inspect}" - end - end - # Take two's complement of positive values bigger than the max value - # for the type when native type is signed. - if @signed && res >= (1 << (@native_type.size * 8 - 1)) - res = -(-res & ((1 << (@native_type.size * 8)) - 1)) - end - res - end - - # @param [Integer] val - # @param ctx unused - # @return [Array] list of symbol names corresponding to val, plus an optional remainder if some bits don't match any constant - def from_native(val, ctx) - flags = @kv_map.select { |_, v| v & val != 0 } - list = flags.keys - # force an unsigned value of the correct size - val &= (1 << (@native_type.size * 8)) - 1 if @signed - # If there are unmatch flags, - # return them in an integer, - # else information can be lost. - # Similar to Enum behavior. - remainder = val ^ flags.values.reduce(0, :|) - list.push remainder unless remainder == 0 - return list - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/errno.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/errno.rb deleted file mode 100644 index de82d891..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/errno.rb +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -module FFI - # @return (see FFI::LastError.error) - # @see FFI::LastError.error - def self.errno - FFI::LastError.error - end - # @param error (see FFI::LastError.error=) - # @return (see FFI::LastError.error=) - # @see FFI::LastError.error= - def self.errno=(error) - FFI::LastError.error = error - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/ffi.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/ffi.rb deleted file mode 100644 index 47822705..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/ffi.rb +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright (C) 2008-2010 JRuby project -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. - -require 'ffi/compat' -require 'ffi/platform' -require 'ffi/data_converter' -require 'ffi/types' -require 'ffi/library_path' -require 'ffi/library' -require 'ffi/errno' -require 'ffi/abstract_memory' -require 'ffi/pointer' -require 'ffi/memorypointer' -require 'ffi/struct' -require 'ffi/union' -require 'ffi/managedstruct' -require 'ffi/callback' -require 'ffi/io' -require 'ffi/autopointer' -require 'ffi/variadic' -require 'ffi/enum' -require 'ffi/version' -require 'ffi/function' - -module FFI - module ModernForkTracking - def _fork - pid = super - if pid == 0 - FFI._async_cb_dispatcher_atfork_child - end - pid - end - end - - module LegacyForkTracking - module KernelExt - def fork - if block_given? - super do - FFI._async_cb_dispatcher_atfork_child - yield - end - else - pid = super - FFI._async_cb_dispatcher_atfork_child if pid.nil? - pid - end - end - end - - module KernelExtPrivate - include KernelExt - private :fork - end - - module IOExt - def popen(*args) - return super unless args[0] == '-' - - super(*args) do |pipe| - FFI._async_cb_dispatcher_atfork_child if pipe.nil? - yield pipe - end - end - ruby2_keywords :popen if respond_to?(:ruby2_keywords) - end - end - - if Process.respond_to?(:_fork) - # The nice Ruby 3.1+ way of doing things - ::Process.singleton_class.prepend(ModernForkTracking) - elsif Process.respond_to?(:fork) - # Barf. Old CRuby. - # Most of the inspiration for how to do this was stolen from ActiveSupport. - ::Object.prepend(LegacyForkTracking::KernelExtPrivate) - ::Object.singleton_class.prepend(LegacyForkTracking::KernelExt) - ::Kernel.prepend(LegacyForkTracking::KernelExtPrivate) - ::Kernel.singleton_class.prepend(LegacyForkTracking::KernelExt) - ::IO.singleton_class.prepend(LegacyForkTracking::IOExt) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/function.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/function.rb deleted file mode 100644 index eb2ae00c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/function.rb +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (C) 2008-2010 JRuby project -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. - -module FFI - class Function - # Only MRI allows function type queries - if private_method_defined?(:type) - # Retrieve the return type of the function - # - # This method returns FFI type returned by the function. - # - # @return [FFI::Type] - def return_type - type.return_type - end - - # Retrieve Array of parameter types - # - # This method returns an Array of FFI types accepted as function parameters. - # - # @return [Array] - def param_types - type.param_types - end - end - - # Stash the Function in a module variable so it can be inspected by attached_functions. - # On CRuby it also ensures that it does not get garbage collected. - module RegisterAttach - def attach(mod, name) - funcs = mod.instance_variable_defined?("@ffi_functions") && mod.instance_variable_get("@ffi_functions") - unless funcs - funcs = {} - mod.instance_variable_set("@ffi_functions", funcs) - end - funcs[name.to_sym] = self - # Jump to the native attach method of CRuby, JRuby or Tuffleruby - super - end - end - private_constant :RegisterAttach - prepend RegisterAttach - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/io.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/io.rb deleted file mode 100644 index 7fb28574..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/io.rb +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2008, 2009 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -module FFI - - # This module implements a couple of class methods to play with IO. - module IO - # @param [Integer] fd file decriptor - # @param [String] mode mode string - # @return [::IO] - # Synonym for IO::for_fd. - def self.for_fd(fd, mode = "r") - ::IO.for_fd(fd, mode) - end - - # @param [#read] io io to read from - # @param [AbstractMemory] buf destination for data read from +io+ - # @param [nil, Integer] len maximul number of bytes to read from +io+. If +nil+, - # read until end of file. - # @return [Integer] length really read, in bytes - # - # A version of IO#read that reads data from an IO and put then into a native buffer. - # - # This will be optimized at some future time to eliminate the double copy. - # - def self.native_read(io, buf, len) - tmp = io.read(len) - return -1 unless tmp - buf.put_bytes(0, tmp) - tmp.length - end - - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/library.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/library.rb deleted file mode 100644 index e47da166..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/library.rb +++ /dev/null @@ -1,576 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -require 'ffi/dynamic_library' - -module FFI - CURRENT_PROCESS = USE_THIS_PROCESS_AS_LIBRARY = FFI.make_shareable(Object.new) - - # @param [String, FFI::LibraryPath] lib library name or LibraryPath object - # @return [String] library name formatted for current platform - # Transform a generic library name to a platform library name - # @example - # # Linux - # FFI.map_library_name 'c' # -> "libc.so.6" - # FFI.map_library_name 'jpeg' # -> "libjpeg.so" - # # Windows - # FFI.map_library_name 'c' # -> "msvcrt.dll" - # FFI.map_library_name 'jpeg' # -> "jpeg.dll" - def self.map_library_name(lib) - # Mangle the library name to reflect the native library naming conventions - LibraryPath.wrap(lib).to_s - end - - # Exception raised when a function is not found in libraries - class NotFoundError < LoadError - def initialize(function, *libraries) - super("Function '#{function}' not found in [#{libraries[0].nil? ? 'current process' : libraries.join(", ")}]") - end - end - - # This module is the base to use native functions. - # - # A basic usage may be: - # require 'ffi' - # - # module Hello - # extend FFI::Library - # ffi_lib FFI::Library::LIBC - # attach_function 'puts', [ :string ], :int - # end - # - # Hello.puts("Hello, World") - # - # - module Library - CURRENT_PROCESS = FFI::CURRENT_PROCESS - LIBC = FFI::Platform::LIBC - - # @param mod extended object - # @return [nil] - # @raise {RuntimeError} if +mod+ is not a Module - # Test if extended object is a Module. If not, raise RuntimeError. - def self.extended(mod) - raise RuntimeError.new("must only be extended by module") unless mod.kind_of?(::Module) - end - - - # @param [Array] names names of libraries to load - # @return [Array] - # @raise {LoadError} if a library cannot be opened - # Load native libraries. - def ffi_lib(*names) - raise LoadError.new("library names list must not be empty") if names.empty? - - lib_flags = defined?(@ffi_lib_flags) && @ffi_lib_flags - - @ffi_libs = names.map do |name| - FFI::DynamicLibrary.send(:load_library, name, lib_flags) - end - end - - # Set the calling convention for {#attach_function} and {#callback} - # - # @see http://en.wikipedia.org/wiki/Stdcall#stdcall - # @note +:stdcall+ is typically used for attaching Windows API functions - # - # @param [Symbol] convention one of +:default+, +:stdcall+ - # @return [Symbol] the new calling convention - def ffi_convention(convention = nil) - @ffi_convention ||= :default - @ffi_convention = convention if convention - @ffi_convention - end - - # @see #ffi_lib - # @return [Array] array of currently loaded FFI libraries - # @raise [LoadError] if no libraries have been loaded (using {#ffi_lib}) - # Get FFI libraries loaded using {#ffi_lib}. - def ffi_libraries - raise LoadError.new("no library specified") if !defined?(@ffi_libs) || @ffi_libs.empty? - @ffi_libs - end - - # Flags used in {#ffi_lib}. - # - # This map allows you to supply symbols to {#ffi_lib_flags} instead of - # the actual constants. - FlagsMap = { - :global => DynamicLibrary::RTLD_GLOBAL, - :local => DynamicLibrary::RTLD_LOCAL, - :lazy => DynamicLibrary::RTLD_LAZY, - :now => DynamicLibrary::RTLD_NOW - } - - # Sets library flags for {#ffi_lib}. - # - # @example - # ffi_lib_flags(:lazy, :local) # => 5 - # - # @param [Symbol, …] flags (see {FlagsMap}) - # @return [Integer] the new value - def ffi_lib_flags(*flags) - @ffi_lib_flags = flags.inject(0) { |result, f| result | FlagsMap[f] } - end - - - ## - # @overload attach_function(func, args, returns, options = {}) - # @example attach function without an explicit name - # module Foo - # extend FFI::Library - # ffi_lib FFI::Library::LIBC - # attach_function :malloc, [:size_t], :pointer - # end - # # now callable via Foo.malloc - # @overload attach_function(name, func, args, returns, options = {}) - # @example attach function with an explicit name - # module Bar - # extend FFI::Library - # ffi_lib FFI::Library::LIBC - # attach_function :c_malloc, :malloc, [:size_t], :pointer - # end - # # now callable via Bar.c_malloc - # - # Attach C function +func+ to this module. - # - # - # @param [#to_s] name name of ruby method to attach as - # @param [#to_s] func name of C function to attach - # @param [Array] args an array of types - # @param [Symbol] returns type of return value - # @option options [Boolean] :blocking (@blocking) set to true if the C function is a blocking call - # @option options [Symbol] :convention (:default) calling convention (see {#ffi_convention}) - # @option options [FFI::Enums] :enums - # @option options [Hash] :type_map - # - # @return [FFI::VariadicInvoker] - # - # @raise [FFI::NotFoundError] if +func+ cannot be found in the attached libraries (see {#ffi_lib}) - def attach_function(name, func, args, returns = nil, options = nil) - mname, a2, a3, a4, a5 = name, func, args, returns, options - cname, arg_types, ret_type, opts = (a4 && (a2.is_a?(String) || a2.is_a?(Symbol))) ? [ a2, a3, a4, a5 ] : [ mname.to_s, a2, a3, a4 ] - - # Convert :foo to the native type - arg_types = arg_types.map { |e| find_type(e) } - options = { - :convention => ffi_convention, - :type_map => defined?(@ffi_typedefs) ? @ffi_typedefs : nil, - :blocking => defined?(@blocking) && @blocking, - :enums => defined?(@ffi_enums) ? @ffi_enums : nil, - } - - @blocking = false - options.merge!(opts) if opts && opts.is_a?(Hash) - - # Try to locate the function in any of the libraries - invokers = [] - ffi_libraries.each do |lib| - if invokers.empty? - begin - function = nil - function_names(cname, arg_types).find do |fname| - function = lib.find_function(fname) - end - raise LoadError unless function - - invokers << if arg_types[-1] == FFI::NativeType::VARARGS - VariadicInvoker.new(function, arg_types, find_type(ret_type), options) - - else - Function.new(find_type(ret_type), arg_types, function, options) - end - - rescue LoadError - end - end - end - invoker = invokers.compact.shift - raise FFI::NotFoundError.new(cname.to_s, ffi_libraries.map { |lib| lib.name }) unless invoker - - invoker.attach(self, mname.to_s) - invoker - end - - # @param [#to_s] name function name - # @param [Array] arg_types function's argument types - # @return [Array] - # This function returns a list of possible names to lookup. - # @note Function names on windows may be decorated if they are using stdcall. See - # * http://en.wikipedia.org/wiki/Name_mangling#C_name_decoration_in_Microsoft_Windows - # * http://msdn.microsoft.com/en-us/library/zxk0tw93%28v=VS.100%29.aspx - # * http://en.wikibooks.org/wiki/X86_Disassembly/Calling_Conventions#STDCALL - # Note that decorated names can be overridden via def files. Also note that the - # windows api, although using, doesn't have decorated names. - def function_names(name, arg_types) - result = [name.to_s] - if ffi_convention == :stdcall - # Get the size of each parameter - size = arg_types.inject(0) do |mem, arg| - size = arg.size - # The size must be a multiple of 4 - size += (4 - size) % 4 - mem + size - end - - result << "_#{name.to_s}@#{size}" # win32 - result << "#{name.to_s}@#{size}" # win64 - end - result - end - - # @overload attach_variable(mname, cname, type) - # @param [#to_s] mname name of ruby method to attach as - # @param [#to_s] cname name of C variable to attach - # @param [DataConverter, Struct, Symbol, Type] type C variable's type - # @example - # module Bar - # extend FFI::Library - # ffi_lib 'my_lib' - # attach_variable :c_myvar, :myvar, :long - # end - # # now callable via Bar.c_myvar - # @overload attach_variable(cname, type) - # @param [#to_s] mname name of ruby method to attach as - # @param [DataConverter, Struct, Symbol, Type] type C variable's type - # @example - # module Bar - # extend FFI::Library - # ffi_lib 'my_lib' - # attach_variable :myvar, :long - # end - # # now callable via Bar.myvar - # @return [DynamicLibrary::Symbol] - # @raise {FFI::NotFoundError} if +cname+ cannot be found in libraries - # - # Attach C variable +cname+ to this module. - def attach_variable(mname, a1, a2 = nil) - cname, type = a2 ? [ a1, a2 ] : [ mname.to_s, a1 ] - mname = mname.to_sym - address = nil - ffi_libraries.each do |lib| - begin - address = lib.find_variable(cname.to_s) - break unless address.nil? - rescue LoadError - end - end - - raise FFI::NotFoundError.new(cname, ffi_libraries) if address.nil? || address.null? - if type.is_a?(Class) && type < FFI::Struct - # If it is a global struct, just attach directly to the pointer - s = s = type.new(address) # Assigning twice to suppress unused variable warning - self.module_eval <<-code, __FILE__, __LINE__ - @ffi_gsvars = {} unless defined?(@ffi_gsvars) - @ffi_gsvars[#{mname.inspect}] = s - def self.#{mname} - @ffi_gsvars[#{mname.inspect}] - end - code - - else - sc = Class.new(FFI::Struct) - sc.layout :gvar, find_type(type) - s = sc.new(address) - # - # Attach to this module as mname/mname= - # - self.module_eval <<-code, __FILE__, __LINE__ - @ffi_gvars = {} unless defined?(@ffi_gvars) - @ffi_gvars[#{mname.inspect}] = s - def self.#{mname} - @ffi_gvars[#{mname.inspect}][:gvar] - end - def self.#{mname}=(value) - @ffi_gvars[#{mname.inspect}][:gvar] = value - end - code - - end - - address - end - - - # @overload callback(name, params, ret) - # @param name callback name to add to type map - # @param [Array] params array of parameters' types - # @param [DataConverter, Struct, Symbol, Type] ret callback return type - # @overload callback(params, ret) - # @param [Array] params array of parameters' types - # @param [DataConverter, Struct, Symbol, Type] ret callback return type - # @return [FFI::CallbackInfo] - def callback(*args) - raise ArgumentError, "wrong number of arguments" if args.length < 2 || args.length > 3 - name, params, ret = if args.length == 3 - args - else - [ nil, args[0], args[1] ] - end - - native_params = params.map { |e| find_type(e) } - raise ArgumentError, "callbacks cannot have variadic parameters" if native_params.include?(FFI::Type::VARARGS) - options = Hash.new - options[:convention] = ffi_convention - options[:enums] = @ffi_enums if defined?(@ffi_enums) - ret_type = find_type(ret) - if ret_type == Type::STRING - raise TypeError, ":string is not allowed as return type of callbacks" - end - cb = FFI::CallbackInfo.new(ret_type, native_params, options) - - # Add to the symbol -> type map (unless there was no name) - unless name.nil? - typedef cb, name - end - - cb - end - - # Register or get an already registered type definition. - # - # To register a new type definition, +old+ should be a {FFI::Type}. +add+ - # is in this case the type definition. - # - # If +old+ is a {DataConverter}, a {Type::Mapped} is returned. - # - # If +old+ is +:enum+ - # * and +add+ is an +Array+, a call to {#enum} is made with +add+ as single parameter; - # * in others cases, +info+ is used to create a named enum. - # - # If +old+ is a key for type map, #typedef get +old+ type definition. - # - # @param [DataConverter, Symbol, Type] old - # @param [Symbol] add - # @param [Symbol] info - # @return [FFI::Enum, FFI::Type] - def typedef(old, add, info=nil) - @ffi_typedefs = Hash.new unless defined?(@ffi_typedefs) - - @ffi_typedefs[add] = if old.kind_of?(FFI::Type) - old - - elsif @ffi_typedefs.has_key?(old) - @ffi_typedefs[old] - - elsif old.is_a?(DataConverter) - FFI::Type::Mapped.new(old) - - elsif old == :enum - if add.kind_of?(Array) - self.enum(add) - else - self.enum(info, add) - end - - else - FFI.find_type(old) - end - end - - # @param [DataConverter, Type, Struct, Symbol] t type to find - # @return [Type] - # Find a type definition. - def find_type(t) - if t.kind_of?(Type) - t - - elsif defined?(@ffi_typedefs) && @ffi_typedefs.has_key?(t) - @ffi_typedefs[t] - - elsif t.is_a?(Class) && t < Struct - Type::POINTER - - elsif t.is_a?(DataConverter) - # Add a typedef so next time the converter is used, it hits the cache - typedef Type::Mapped.new(t), t - - end || FFI.find_type(t) - end - - private - # Generic enum builder - # @param [Class] klass can be one of FFI::Enum or FFI::Bitmask - # @param args (see #enum or #bitmask) - def generic_enum(klass, *args) - native_type = args.first.kind_of?(FFI::Type) ? args.shift : nil - name, values = if args[0].kind_of?(Symbol) && args[1].kind_of?(Array) - [ args[0], args[1] ] - elsif args[0].kind_of?(Array) - [ nil, args[0] ] - else - [ nil, args ] - end - @ffi_enums = FFI::Enums.new unless defined?(@ffi_enums) - @ffi_enums << (e = native_type ? klass.new(native_type, values, name) : klass.new(values, name)) - - # If called with a name, add a typedef alias - typedef(e, name) if name - e - end - - public - # @overload enum(name, values) - # Create a named enum. - # @example - # enum :foo, [:zero, :one, :two] # named enum - # @param [Symbol] name name for new enum - # @param [Array] values values for enum - # @overload enum(*args) - # Create an unnamed enum. - # @example - # enum :zero, :one, :two # unnamed enum - # @param args values for enum - # @overload enum(values) - # Create an unnamed enum. - # @example - # enum [:zero, :one, :two] # unnamed enum, equivalent to above example - # @param [Array] values values for enum - # @overload enum(native_type, name, values) - # Create a named enum and specify the native type. - # @example - # enum FFI::Type::UINT64, :foo, [:zero, :one, :two] # named enum - # @param [FFI::Type] native_type native type for new enum - # @param [Symbol] name name for new enum - # @param [Array] values values for enum - # @overload enum(native_type, *args) - # Create an unnamed enum and specify the native type. - # @example - # enum FFI::Type::UINT64, :zero, :one, :two # unnamed enum - # @param [FFI::Type] native_type native type for new enum - # @param args values for enum - # @overload enum(native_type, values) - # Create an unnamed enum and specify the native type. - # @example - # enum Type::UINT64, [:zero, :one, :two] # unnamed enum, equivalent to above example - # @param [FFI::Type] native_type native type for new enum - # @param [Array] values values for enum - # @return [FFI::Enum] - # Create a new {FFI::Enum}. - def enum(*args) - generic_enum(FFI::Enum, *args) - end - - # @overload bitmask(name, values) - # Create a named bitmask - # @example - # bitmask :foo, [:red, :green, :blue] # bits 0,1,2 are used - # bitmask :foo, [:red, :green, 5, :blue] # bits 0,5,6 are used - # @param [Symbol] name for new bitmask - # @param [Array] values for new bitmask - # @overload bitmask(*args) - # Create an unamed bitmask - # @example - # bm = bitmask :red, :green, :blue # bits 0,1,2 are used - # bm = bitmask :red, :green, 5, blue # bits 0,5,6 are used - # @param [Symbol, Integer] args values for new bitmask - # @overload bitmask(values) - # Create an unamed bitmask - # @example - # bm = bitmask [:red, :green, :blue] # bits 0,1,2 are used - # bm = bitmask [:red, :green, 5, blue] # bits 0,5,6 are used - # @param [Array] values for new bitmask - # @overload bitmask(native_type, name, values) - # Create a named enum and specify the native type. - # @example - # bitmask FFI::Type::UINT64, :foo, [:red, :green, :blue] - # @param [FFI::Type] native_type native type for new bitmask - # @param [Symbol] name for new bitmask - # @param [Array] values for new bitmask - # @overload bitmask(native_type, *args) - # @example - # bitmask FFI::Type::UINT64, :red, :green, :blue - # @param [FFI::Type] native_type native type for new bitmask - # @param [Symbol, Integer] args values for new bitmask - # @overload bitmask(native_type, values) - # Create a named enum and specify the native type. - # @example - # bitmask FFI::Type::UINT64, [:red, :green, :blue] - # @param [FFI::Type] native_type native type for new bitmask - # @param [Array] values for new bitmask - # @return [FFI::Bitmask] - # Create a new FFI::Bitmask - def bitmask(*args) - generic_enum(FFI::Bitmask, *args) - end - - # @param name - # @return [FFI::Enum] - # Find an enum by name. - def enum_type(name) - @ffi_enums.find(name) if defined?(@ffi_enums) - end - - # @param symbol - # @return [FFI::Enum] - # Find an enum by a symbol it contains. - def enum_value(symbol) - @ffi_enums.__map_symbol(symbol) - end - - # Retrieve all attached functions and their function signature - # - # This method returns a Hash of method names of attached functions connected by #attach_function and the corresponding function type. - # The function type responds to #return_type and #param_types which return the FFI types of the function signature. - # - # @return [Hash< Symbol => [FFI::Function, FFI::VariadicInvoker] >] - def attached_functions - @ffi_functions || {} - end - - # Retrieve all attached variables and their type - # - # This method returns a Hash of variable names and the corresponding type or variables connected by #attach_variable . - # - # @return [Hash< Symbol => ffi_type >] - def attached_variables - ( - (defined?(@ffi_gsvars) ? @ffi_gsvars : {}).map do |name, gvar| - [name, gvar.class] - end + - (defined?(@ffi_gvars) ? @ffi_gvars : {}).map do |name, gvar| - [name, gvar.layout[:gvar].type] - end - ).to_h - end - - # Freeze all definitions of the module - # - # This freezes the module's definitions, so that it can be used in a Ractor. - # No further methods or variables can be attached and no further enums or typedefs can be created in this module afterwards. - def freeze - instance_variables.each do |name| - var = instance_variable_get(name) - FFI.make_shareable(var) - end - nil - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/library_path.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/library_path.rb deleted file mode 100644 index 5575a5f1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/library_path.rb +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright (C) 2023 Lars Kanis -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -module FFI - # Transform a generic library name and ABI number to a platform library name - # - # Example: - # module LibVips - # extend FFI::Library - # ffi_lib LibraryPath.new("vips", abi_number: 42) - # end - # - # This translates to the following library file names: - # libvips-42.dll on Windows - # libvips.so.42 on Linux - # libvips.42.dylib on Macos - # - # See https://packaging.ubuntu.com/html/libraries.html for more information about library naming. - class LibraryPath - attr_reader :name - attr_reader :abi_number - attr_reader :root - - # Build a new library path - # - # * name : The name of the library without file prefix or suffix. - # * abi_number : The ABI number of the library. - # * root : An optional base path prepended to the library name. - def initialize(name, abi_number: nil, root: nil) - @name = name - @abi_number = abi_number - @root = root - end - - def self.wrap(value) - # We allow instances of LibraryPath to pass through transparently: - return value if value.is_a?(self) - - # We special case a library named 'c' to be the standard C library: - return Library::LIBC if value == 'c' - - # If provided a relative file name we convert it into a library path: - if value && File.basename(value) == value - return self.new(value) - end - - # Otherwise, we assume it's a full path to a library: - return value - end - - def full_name - # If the abi_number is given, we format it specifically according to platform rules: - if abi_number - if Platform.windows? - "#{Platform::LIBPREFIX}#{name}-#{abi_number}.#{Platform::LIBSUFFIX}" - elsif Platform.mac? - "#{Platform::LIBPREFIX}#{name}.#{abi_number}.#{Platform::LIBSUFFIX}" - else # Linux? BSD? etc. - "#{Platform::LIBPREFIX}#{name}.#{Platform::LIBSUFFIX}.#{abi_number}" - end - else - # Otherwise we just add prefix and suffix: - lib = name - # Add library prefix if missing - lib = Platform::LIBPREFIX + lib unless lib =~ /^#{Platform::LIBPREFIX}/ - # Add library extension if missing - r = Platform.windows? || Platform.mac? ? "\\.#{Platform::LIBSUFFIX}$" : "\\.so($|\\.[1234567890]+)" - lib += ".#{Platform::LIBSUFFIX}" unless lib =~ /#{r}/ - lib - end - end - - def to_s - if root - # If the root path is given, we generate the full path: - File.join(root, full_name) - else - full_name - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/managedstruct.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/managedstruct.rb deleted file mode 100644 index 5d243e5b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/managedstruct.rb +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) 2008 Mike Dalessio -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. - -module FFI - # - # FFI::ManagedStruct allows custom garbage-collection of your FFI::Structs. - # - # The typical use case would be when interacting with a library - # that has a nontrivial memory management design, such as a linked - # list or a binary tree. - # - # When the {Struct} instance is garbage collected, FFI::ManagedStruct will - # invoke the class's release() method during object finalization. - # - # @example Example usage: - # module MyLibrary - # ffi_lib "libmylibrary" - # attach_function :new_dlist, [], :pointer - # attach_function :destroy_dlist, [:pointer], :void - # end - # - # class DoublyLinkedList < FFI::ManagedStruct - # @@@ - # struct do |s| - # s.name 'struct dlist' - # s.include 'dlist.h' - # s.field :head, :pointer - # s.field :tail, :pointer - # end - # @@@ - # - # def self.release ptr - # MyLibrary.destroy_dlist(ptr) - # end - # end - # - # begin - # ptr = DoublyLinkedList.new(MyLibrary.new_dlist) - # # do something with the list - # end - # # struct is out of scope, and will be GC'd using DoublyLinkedList#release - # - # - class ManagedStruct < FFI::Struct - - # @overload initialize(pointer) - # @param [Pointer] pointer - # Create a new ManagedStruct which will invoke the class method #release on - # @overload initialize - # A new instance of FFI::ManagedStruct. - def initialize(pointer=nil) - raise NoMethodError, "release() not implemented for class #{self}" unless self.class.respond_to?(:release, true) - raise ArgumentError, "Must supply a pointer to memory for the Struct" unless pointer - super AutoPointer.new(pointer, self.class.method(:release)) - end - - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/memorypointer.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/memorypointer.rb deleted file mode 100644 index 9f07bc69..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/memorypointer.rb +++ /dev/null @@ -1 +0,0 @@ -# This class is now implemented in C diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform.rb deleted file mode 100644 index 5ac4dd70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform.rb +++ /dev/null @@ -1,187 +0,0 @@ -# -# Copyright (C) 2008, 2009 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -require 'rbconfig' -require_relative 'compat' - -module FFI - class PlatformError < LoadError; end - - # This module defines different constants and class methods to play with - # various platforms. - module Platform - OS = FFI.make_shareable(case RbConfig::CONFIG['host_os'].downcase - when /linux/ - "linux" - when /darwin/ - "darwin" - when /freebsd/ - "freebsd" - when /netbsd/ - "netbsd" - when /openbsd/ - "openbsd" - when /dragonfly/ - "dragonflybsd" - when /sunos|solaris/ - "solaris" - when /mingw|mswin/ - "windows" - else - RbConfig::CONFIG['host_os'].downcase - end) - - OSVERSION = RbConfig::CONFIG['host_os'].gsub(/[^\d]/, '').to_i - - CPU = FFI.make_shareable(RbConfig::CONFIG['host_cpu']) - - ARCH = FFI.make_shareable(case CPU.downcase - when /amd64|x86_64|x64/ - "x86_64" - when /i\d86|x86|i86pc/ - "i386" - when /ppc64|powerpc64/ - "powerpc64" - when /ppc|powerpc/ - "powerpc" - when /sparcv9|sparc64/ - "sparcv9" - when /arm64|aarch64/ # MacOS calls it "arm64", other operating systems "aarch64" - "aarch64" - when /^arm/ - if OS == "darwin" # Ruby before 3.0 reports "arm" instead of "arm64" as host_cpu on darwin - "aarch64" - else - "arm" - end - else - RbConfig::CONFIG['host_cpu'] - end) - - private - # @param [String) os - # @return [Boolean] - # Test if current OS is +os+. - def self.is_os(os) - OS == os - end - - IS_GNU = defined?(GNU_LIBC) - IS_LINUX = is_os("linux") - IS_MAC = is_os("darwin") - IS_FREEBSD = is_os("freebsd") - IS_NETBSD = is_os("netbsd") - IS_OPENBSD = is_os("openbsd") - IS_DRAGONFLYBSD = is_os("dragonfly") - IS_SOLARIS = is_os("solaris") - IS_WINDOWS = is_os("windows") - IS_BSD = IS_MAC || IS_FREEBSD || IS_NETBSD || IS_OPENBSD || IS_DRAGONFLYBSD - - # Add the version for known ABI breaks - name_version = "12" if IS_FREEBSD && OSVERSION >= 12 # 64-bit inodes - - NAME = FFI.make_shareable("#{ARCH}-#{OS}#{name_version}") - CONF_DIR = FFI.make_shareable(File.join(File.dirname(__FILE__), 'platform', NAME)) - - public - - LIBPREFIX = FFI.make_shareable(case OS - when /windows|msys/ - '' - when /cygwin/ - 'cyg' - else - 'lib' - end) - - LIBSUFFIX = FFI.make_shareable(case OS - when /darwin/ - 'dylib' - when /linux|bsd|solaris/ - 'so' - when /windows|cygwin|msys/ - 'dll' - else - # Punt and just assume a sane unix (i.e. anything but AIX) - 'so' - end) - - LIBC = FFI.make_shareable(if IS_WINDOWS - crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase' - "#{crtname}.dll" - elsif IS_GNU - GNU_LIBC - elsif OS == 'cygwin' - "cygwin1.dll" - elsif OS == 'msys' - # Not sure how msys 1.0 behaves, tested on MSYS2. - "msys-2.0.dll" - else - "#{LIBPREFIX}c.#{LIBSUFFIX}" - end) - - LITTLE_ENDIAN = 1234 unless defined?(LITTLE_ENDIAN) - BIG_ENDIAN = 4321 unless defined?(BIG_ENDIAN) - unless defined?(BYTE_ORDER) - BYTE_ORDER = [0x12345678].pack("I") == [0x12345678].pack("N") ? BIG_ENDIAN : LITTLE_ENDIAN - end - - # Test if current OS is a *BSD (include MAC) - # @return [Boolean] - def self.bsd? - IS_BSD - end - - # Test if current OS is Windows - # @return [Boolean] - def self.windows? - IS_WINDOWS - end - - # Test if current OS is Mac OS - # @return [Boolean] - def self.mac? - IS_MAC - end - - # Test if current OS is Solaris (Sun OS) - # @return [Boolean] - def self.solaris? - IS_SOLARIS - end - - # Test if current OS is a unix OS - # @return [Boolean] - def self.unix? - !IS_WINDOWS - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-darwin/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-darwin/types.conf deleted file mode 100644 index 68841bb1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-darwin/types.conf +++ /dev/null @@ -1,130 +0,0 @@ -rbx.platform.typedef.__darwin_blkcnt_t = long_long -rbx.platform.typedef.__darwin_blksize_t = int -rbx.platform.typedef.__darwin_clock_t = ulong -rbx.platform.typedef.__darwin_ct_rune_t = int -rbx.platform.typedef.__darwin_dev_t = int -rbx.platform.typedef.__darwin_fsblkcnt_t = uint -rbx.platform.typedef.__darwin_fsfilcnt_t = uint -rbx.platform.typedef.__darwin_gid_t = uint -rbx.platform.typedef.__darwin_id_t = uint -rbx.platform.typedef.__darwin_ino64_t = ulong_long -rbx.platform.typedef.__darwin_ino_t = ulong_long -rbx.platform.typedef.__darwin_intptr_t = long -rbx.platform.typedef.__darwin_mach_port_name_t = uint -rbx.platform.typedef.__darwin_mach_port_t = uint -rbx.platform.typedef.__darwin_mode_t = ushort -rbx.platform.typedef.__darwin_natural_t = uint -rbx.platform.typedef.__darwin_off_t = long_long -rbx.platform.typedef.__darwin_pid_t = int -rbx.platform.typedef.__darwin_pthread_key_t = ulong -rbx.platform.typedef.__darwin_ptrdiff_t = long -rbx.platform.typedef.__darwin_rune_t = int -rbx.platform.typedef.__darwin_sigset_t = uint -rbx.platform.typedef.__darwin_size_t = ulong -rbx.platform.typedef.__darwin_socklen_t = uint -rbx.platform.typedef.__darwin_ssize_t = long -rbx.platform.typedef.__darwin_suseconds_t = int -rbx.platform.typedef.__darwin_time_t = long -rbx.platform.typedef.__darwin_uid_t = uint -rbx.platform.typedef.__darwin_useconds_t = uint -rbx.platform.typedef.__darwin_uuid_string_t[37] = char -rbx.platform.typedef.__darwin_uuid_t[16] = uchar -rbx.platform.typedef.__darwin_wchar_t = int -rbx.platform.typedef.__darwin_wint_t = int -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.errno_t = int -rbx.platform.typedef.fd_mask = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = uint -rbx.platform.typedef.fsfilcnt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = short -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ushort -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long_long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.rsize_t = ulong -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.sae_associd_t = uint -rbx.platform.typedef.sae_connid_t = uint -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.syscall_arg_t = ulong_long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ushort -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.user_addr_t = ulong_long -rbx.platform.typedef.user_long_t = long_long -rbx.platform.typedef.user_off_t = long_long -rbx.platform.typedef.user_size_t = ulong_long -rbx.platform.typedef.user_ssize_t = long_long -rbx.platform.typedef.user_time_t = long_long -rbx.platform.typedef.user_ulong_t = ulong_long -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-freebsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-freebsd/types.conf deleted file mode 100644 index 8d111e0a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-freebsd/types.conf +++ /dev/null @@ -1,128 +0,0 @@ -rbx.platform.typedef.__clock_t = int -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = int -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = uint -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long_long -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr64_t = long_long -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long_long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = int -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-freebsd12/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-freebsd12/types.conf deleted file mode 100644 index 3ccb8f66..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-freebsd12/types.conf +++ /dev/null @@ -1,181 +0,0 @@ -rbx.platform.typedef.*) = pointer -rbx.platform.typedef.___wchar_t = uint -rbx.platform.typedef.__accmode_t = int -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__char16_t = ushort -rbx.platform.typedef.__char32_t = uint -rbx.platform.typedef.__clock_t = int -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpulevel_t = int -rbx.platform.typedef.__cpusetid_t = int -rbx.platform.typedef.__cpuwhich_t = int -rbx.platform.typedef.__critical_t = long -rbx.platform.typedef.__ct_rune_t = int -rbx.platform.typedef.__daddr_t = long -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = ulong -rbx.platform.typedef.__fflags_t = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intfptr_t = long -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__lwpid_t = int -rbx.platform.typedef.__mode_t = ushort -rbx.platform.typedef.__nl_item = int -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long -rbx.platform.typedef.__rlim_t = long -rbx.platform.typedef.__rman_res_t = ulong -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = long -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__u_register_t = ulong -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintfptr_t = ulong -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vm_offset_t = ulong -rbx.platform.typedef.__vm_paddr_t = ulong -rbx.platform.typedef.__vm_size_t = ulong -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.accmode_t = int -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.c_caddr_t = pointer -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.cap_ioctl_t = ulong -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpulevel_t = int -rbx.platform.typedef.cpusetid_t = int -rbx.platform.typedef.cpuwhich_t = int -rbx.platform.typedef.critical_t = long -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = ulong -rbx.platform.typedef.fflags_t = uint -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = int -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.kpaddr_t = ulong -rbx.platform.typedef.ksize_t = ulong -rbx.platform.typedef.kssize_t = long -rbx.platform.typedef.kvaddr_t = ulong -rbx.platform.typedef.lwpid_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off64_t = long -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = long -rbx.platform.typedef.rman_res_t = ulong -rbx.platform.typedef.rsize_t = ulong -rbx.platform.typedef.rune_t = int -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.sbintime_t = long -rbx.platform.typedef.segsz_t = long -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_register_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uint -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vm_offset_t = ulong -rbx.platform.typedef.vm_ooffset_t = ulong -rbx.platform.typedef.vm_paddr_t = ulong -rbx.platform.typedef.vm_pindex_t = ulong -rbx.platform.typedef.vm_size_t = ulong -rbx.platform.typedef.wchar_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-linux/types.conf deleted file mode 100644 index c56206e0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-linux/types.conf +++ /dev/null @@ -1,175 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__kernel_caddr_t = string -rbx.platform.typedef.__kernel_clock_t = long -rbx.platform.typedef.__kernel_clockid_t = int -rbx.platform.typedef.__kernel_daddr_t = int -rbx.platform.typedef.__kernel_gid16_t = ushort -rbx.platform.typedef.__kernel_gid32_t = uint -rbx.platform.typedef.__kernel_gid_t = uint -rbx.platform.typedef.__kernel_ino_t = ulong -rbx.platform.typedef.__kernel_ipc_pid_t = int -rbx.platform.typedef.__kernel_key_t = int -rbx.platform.typedef.__kernel_loff_t = long_long -rbx.platform.typedef.__kernel_long_t = long -rbx.platform.typedef.__kernel_mode_t = uint -rbx.platform.typedef.__kernel_mqd_t = int -rbx.platform.typedef.__kernel_off_t = long -rbx.platform.typedef.__kernel_old_dev_t = uint -rbx.platform.typedef.__kernel_old_gid_t = ushort -rbx.platform.typedef.__kernel_old_time_t = long -rbx.platform.typedef.__kernel_old_uid_t = ushort -rbx.platform.typedef.__kernel_pid_t = int -rbx.platform.typedef.__kernel_ptrdiff_t = long -rbx.platform.typedef.__kernel_size_t = ulong -rbx.platform.typedef.__kernel_ssize_t = long -rbx.platform.typedef.__kernel_suseconds_t = long -rbx.platform.typedef.__kernel_time64_t = long_long -rbx.platform.typedef.__kernel_time_t = long -rbx.platform.typedef.__kernel_timer_t = int -rbx.platform.typedef.__kernel_uid16_t = ushort -rbx.platform.typedef.__kernel_uid32_t = uint -rbx.platform.typedef.__kernel_uid_t = uint -rbx.platform.typedef.__kernel_ulong_t = ulong -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds64_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__thrd_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__tss_t = uint -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = long -rbx.platform.typedef.int_fast32_t = long -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ulong -rbx.platform.typedef.uint_fast32_t = ulong -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-openbsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-openbsd/types.conf deleted file mode 100644 index 6abc9c09..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-openbsd/types.conf +++ /dev/null @@ -1,134 +0,0 @@ -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long_long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = ulong_long -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = long_long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = long_long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.sigset_t = uint -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = long_long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-windows/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-windows/types.conf deleted file mode 100644 index 5bdbbde2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/aarch64-windows/types.conf +++ /dev/null @@ -1,52 +0,0 @@ -rbx.platform.typedef.__time32_t = long -rbx.platform.typedef.__time64_t = long_long -rbx.platform.typedef._dev_t = uint -rbx.platform.typedef._ino_t = ushort -rbx.platform.typedef._mode_t = ushort -rbx.platform.typedef._off64_t = long_long -rbx.platform.typedef._off_t = long -rbx.platform.typedef._pid_t = long_long -rbx.platform.typedef._sigset_t = ulong_long -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.errno_t = int -rbx.platform.typedef.ino_t = ushort -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = short -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = long_long -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.off32_t = long -rbx.platform.typedef.off64_t = long_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = long_long -rbx.platform.typedef.ptrdiff_t = long_long -rbx.platform.typedef.rsize_t = ulong_long -rbx.platform.typedef.size_t = ulong_long -rbx.platform.typedef.ssize_t = long_long -rbx.platform.typedef.time_t = long_long -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ushort -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = ulong_long -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.wchar_t = ushort -rbx.platform.typedef.wctype_t = ushort -rbx.platform.typedef.wint_t = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-freebsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-freebsd/types.conf deleted file mode 100644 index cfbb90f3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-freebsd/types.conf +++ /dev/null @@ -1,152 +0,0 @@ - -rbx.platform.typedef.*) = pointer -rbx.platform.typedef.__accmode_t = int -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = uint -rbx.platform.typedef.__clock_t = ulong -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpulevel_t = int -rbx.platform.typedef.__cpumask_t = uint -rbx.platform.typedef.__cpusetid_t = int -rbx.platform.typedef.__cpuwhich_t = int -rbx.platform.typedef.__critical_t = int -rbx.platform.typedef.__ct_rune_t = int -rbx.platform.typedef.__dev_t = uint -rbx.platform.typedef.__fd_mask = ulong -rbx.platform.typedef.__fflags_t = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = long_long -rbx.platform.typedef.__ino_t = uint -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intfptr_t = int -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__lwpid_t = int -rbx.platform.typedef.__mode_t = ushort -rbx.platform.typedef.__nl_item = int -rbx.platform.typedef.__nlink_t = ushort -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__ptrdiff_t = int -rbx.platform.typedef.__register_t = int -rbx.platform.typedef.__rlim_t = long_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = uint -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = int -rbx.platform.typedef.__u_register_t = uint -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintfptr_t = uint -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = uint -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vm_offset_t = uint -rbx.platform.typedef.__vm_ooffset_t = long_long -rbx.platform.typedef.__vm_paddr_t = uint -rbx.platform.typedef.__vm_pindex_t = ulong_long -rbx.platform.typedef.__vm_size_t = uint -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.accmode_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = uint -rbx.platform.typedef.c_caddr_t = pointer -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpulevel_t = int -rbx.platform.typedef.cpumask_t = uint -rbx.platform.typedef.cpusetid_t = int -rbx.platform.typedef.cpuwhich_t = int -rbx.platform.typedef.critical_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.fd_mask = ulong -rbx.platform.typedef.fflags_t = uint -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = long_long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = long -rbx.platform.typedef.lwpid_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ushort -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = long_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_register_t = uint -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vm_offset_t = uint -rbx.platform.typedef.vm_ooffset_t = long_long -rbx.platform.typedef.vm_paddr_t = uint -rbx.platform.typedef.vm_pindex_t = ulong_long -rbx.platform.typedef.vm_size_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-freebsd12/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-freebsd12/types.conf deleted file mode 100644 index 523370d9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-freebsd12/types.conf +++ /dev/null @@ -1,152 +0,0 @@ - -rbx.platform.typedef.*) = pointer -rbx.platform.typedef.__accmode_t = int -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = uint -rbx.platform.typedef.__clock_t = ulong -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpulevel_t = int -rbx.platform.typedef.__cpumask_t = uint -rbx.platform.typedef.__cpusetid_t = int -rbx.platform.typedef.__cpuwhich_t = int -rbx.platform.typedef.__critical_t = int -rbx.platform.typedef.__ct_rune_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = ulong -rbx.platform.typedef.__fflags_t = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = long_long -rbx.platform.typedef.__ino_t = ulong_long -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intfptr_t = int -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__lwpid_t = int -rbx.platform.typedef.__mode_t = ushort -rbx.platform.typedef.__nl_item = int -rbx.platform.typedef.__nlink_t = ulong_long -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__ptrdiff_t = int -rbx.platform.typedef.__register_t = int -rbx.platform.typedef.__rlim_t = long_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = uint -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = int -rbx.platform.typedef.__u_register_t = uint -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintfptr_t = uint -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = uint -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vm_offset_t = uint -rbx.platform.typedef.__vm_ooffset_t = long_long -rbx.platform.typedef.__vm_paddr_t = uint -rbx.platform.typedef.__vm_pindex_t = ulong_long -rbx.platform.typedef.__vm_size_t = uint -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.accmode_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = uint -rbx.platform.typedef.c_caddr_t = pointer -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpulevel_t = int -rbx.platform.typedef.cpumask_t = uint -rbx.platform.typedef.cpusetid_t = int -rbx.platform.typedef.cpuwhich_t = int -rbx.platform.typedef.critical_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = ulong -rbx.platform.typedef.fflags_t = uint -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = long_long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = long -rbx.platform.typedef.lwpid_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ulong_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = long_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_register_t = uint -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vm_offset_t = uint -rbx.platform.typedef.vm_ooffset_t = long_long -rbx.platform.typedef.vm_paddr_t = uint -rbx.platform.typedef.vm_pindex_t = ulong_long -rbx.platform.typedef.vm_size_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-linux/types.conf deleted file mode 100644 index a070d394..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/arm-linux/types.conf +++ /dev/null @@ -1,132 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = int -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/hppa1.1-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/hppa1.1-linux/types.conf deleted file mode 100644 index c8a81411..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/hppa1.1-linux/types.conf +++ /dev/null @@ -1,178 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = int -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__kernel_caddr_t = string -rbx.platform.typedef.__kernel_clock_t = long -rbx.platform.typedef.__kernel_clockid_t = int -rbx.platform.typedef.__kernel_daddr_t = int -rbx.platform.typedef.__kernel_gid16_t = ushort -rbx.platform.typedef.__kernel_gid32_t = uint -rbx.platform.typedef.__kernel_gid_t = uint -rbx.platform.typedef.__kernel_ino64_t = ulong_long -rbx.platform.typedef.__kernel_ino_t = ulong -rbx.platform.typedef.__kernel_ipc_pid_t = ushort -rbx.platform.typedef.__kernel_key_t = int -rbx.platform.typedef.__kernel_loff_t = long_long -rbx.platform.typedef.__kernel_long_t = long -rbx.platform.typedef.__kernel_mode_t = ushort -rbx.platform.typedef.__kernel_mqd_t = int -rbx.platform.typedef.__kernel_off64_t = long_long -rbx.platform.typedef.__kernel_off_t = long -rbx.platform.typedef.__kernel_old_dev_t = uint -rbx.platform.typedef.__kernel_old_gid_t = uint -rbx.platform.typedef.__kernel_old_time_t = long -rbx.platform.typedef.__kernel_old_uid_t = uint -rbx.platform.typedef.__kernel_pid_t = int -rbx.platform.typedef.__kernel_ptrdiff_t = int -rbx.platform.typedef.__kernel_size_t = uint -rbx.platform.typedef.__kernel_ssize_t = int -rbx.platform.typedef.__kernel_suseconds_t = long -rbx.platform.typedef.__kernel_time64_t = long_long -rbx.platform.typedef.__kernel_time_t = long -rbx.platform.typedef.__kernel_timer_t = int -rbx.platform.typedef.__kernel_uid16_t = ushort -rbx.platform.typedef.__kernel_uid32_t = uint -rbx.platform.typedef.__kernel_uid_t = uint -rbx.platform.typedef.__kernel_ulong_t = ulong -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds64_t = long_long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__thrd_t = ulong -rbx.platform.typedef.__time64_t = long_long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__tss_t = uint -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = long diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/hppa2.0-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/hppa2.0-linux/types.conf deleted file mode 100644 index c8a81411..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/hppa2.0-linux/types.conf +++ /dev/null @@ -1,178 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = int -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__kernel_caddr_t = string -rbx.platform.typedef.__kernel_clock_t = long -rbx.platform.typedef.__kernel_clockid_t = int -rbx.platform.typedef.__kernel_daddr_t = int -rbx.platform.typedef.__kernel_gid16_t = ushort -rbx.platform.typedef.__kernel_gid32_t = uint -rbx.platform.typedef.__kernel_gid_t = uint -rbx.platform.typedef.__kernel_ino64_t = ulong_long -rbx.platform.typedef.__kernel_ino_t = ulong -rbx.platform.typedef.__kernel_ipc_pid_t = ushort -rbx.platform.typedef.__kernel_key_t = int -rbx.platform.typedef.__kernel_loff_t = long_long -rbx.platform.typedef.__kernel_long_t = long -rbx.platform.typedef.__kernel_mode_t = ushort -rbx.platform.typedef.__kernel_mqd_t = int -rbx.platform.typedef.__kernel_off64_t = long_long -rbx.platform.typedef.__kernel_off_t = long -rbx.platform.typedef.__kernel_old_dev_t = uint -rbx.platform.typedef.__kernel_old_gid_t = uint -rbx.platform.typedef.__kernel_old_time_t = long -rbx.platform.typedef.__kernel_old_uid_t = uint -rbx.platform.typedef.__kernel_pid_t = int -rbx.platform.typedef.__kernel_ptrdiff_t = int -rbx.platform.typedef.__kernel_size_t = uint -rbx.platform.typedef.__kernel_ssize_t = int -rbx.platform.typedef.__kernel_suseconds_t = long -rbx.platform.typedef.__kernel_time64_t = long_long -rbx.platform.typedef.__kernel_time_t = long -rbx.platform.typedef.__kernel_timer_t = int -rbx.platform.typedef.__kernel_uid16_t = ushort -rbx.platform.typedef.__kernel_uid32_t = uint -rbx.platform.typedef.__kernel_uid_t = uint -rbx.platform.typedef.__kernel_ulong_t = ulong -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds64_t = long_long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__thrd_t = ulong -rbx.platform.typedef.__time64_t = long_long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__tss_t = uint -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = long diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-cygwin/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-cygwin/types.conf deleted file mode 100644 index 93f6b861..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-cygwin/types.conf +++ /dev/null @@ -1,3 +0,0 @@ -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.ssize_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-darwin/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-darwin/types.conf deleted file mode 100644 index ae100f41..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-darwin/types.conf +++ /dev/null @@ -1,100 +0,0 @@ -rbx.platform.typedef.__darwin_blkcnt_t = long_long -rbx.platform.typedef.__darwin_blksize_t = int -rbx.platform.typedef.__darwin_clock_t = ulong -rbx.platform.typedef.__darwin_ct_rune_t = int -rbx.platform.typedef.__darwin_dev_t = int -rbx.platform.typedef.__darwin_fsblkcnt_t = uint -rbx.platform.typedef.__darwin_fsfilcnt_t = uint -rbx.platform.typedef.__darwin_gid_t = uint -rbx.platform.typedef.__darwin_id_t = uint -rbx.platform.typedef.__darwin_ino64_t = ulong_long -rbx.platform.typedef.__darwin_ino_t = ulong_long -rbx.platform.typedef.__darwin_intptr_t = long -rbx.platform.typedef.__darwin_mach_port_name_t = uint -rbx.platform.typedef.__darwin_mach_port_t = uint -rbx.platform.typedef.__darwin_mode_t = ushort -rbx.platform.typedef.__darwin_natural_t = uint -rbx.platform.typedef.__darwin_off_t = long_long -rbx.platform.typedef.__darwin_pid_t = int -rbx.platform.typedef.__darwin_pthread_key_t = ulong -rbx.platform.typedef.__darwin_ptrdiff_t = int -rbx.platform.typedef.__darwin_rune_t = int -rbx.platform.typedef.__darwin_sigset_t = uint -rbx.platform.typedef.__darwin_size_t = ulong -rbx.platform.typedef.__darwin_socklen_t = uint -rbx.platform.typedef.__darwin_ssize_t = long -rbx.platform.typedef.__darwin_suseconds_t = int -rbx.platform.typedef.__darwin_time_t = long -rbx.platform.typedef.__darwin_uid_t = uint -rbx.platform.typedef.__darwin_useconds_t = uint -rbx.platform.typedef.__darwin_uuid_t[16] = uchar -rbx.platform.typedef.__darwin_wchar_t = int -rbx.platform.typedef.__darwin_wint_t = int -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fd_mask = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = uint -rbx.platform.typedef.fsfilcnt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ushort -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.syscall_arg_t = ulong_long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.user_addr_t = ulong_long -rbx.platform.typedef.user_long_t = long_long -rbx.platform.typedef.user_size_t = ulong_long -rbx.platform.typedef.user_ssize_t = long_long -rbx.platform.typedef.user_time_t = long_long -rbx.platform.typedef.user_ulong_t = ulong_long -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-freebsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-freebsd/types.conf deleted file mode 100644 index 6c882d48..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-freebsd/types.conf +++ /dev/null @@ -1,152 +0,0 @@ - -rbx.platform.typedef.*) = pointer -rbx.platform.typedef.__accmode_t = int -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = uint -rbx.platform.typedef.__clock_t = ulong -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpulevel_t = int -rbx.platform.typedef.__cpumask_t = uint -rbx.platform.typedef.__cpusetid_t = int -rbx.platform.typedef.__cpuwhich_t = int -rbx.platform.typedef.__critical_t = int -rbx.platform.typedef.__ct_rune_t = int -rbx.platform.typedef.__dev_t = uint -rbx.platform.typedef.__fd_mask = ulong -rbx.platform.typedef.__fflags_t = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = long_long -rbx.platform.typedef.__ino_t = uint -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intfptr_t = int -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__lwpid_t = int -rbx.platform.typedef.__mode_t = ushort -rbx.platform.typedef.__nl_item = int -rbx.platform.typedef.__nlink_t = ushort -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__ptrdiff_t = int -rbx.platform.typedef.__register_t = int -rbx.platform.typedef.__rlim_t = long_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = uint -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__u_register_t = uint -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintfptr_t = uint -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = uint -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vm_offset_t = uint -rbx.platform.typedef.__vm_ooffset_t = long_long -rbx.platform.typedef.__vm_paddr_t = uint -rbx.platform.typedef.__vm_pindex_t = ulong_long -rbx.platform.typedef.__vm_size_t = uint -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.accmode_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = uint -rbx.platform.typedef.c_caddr_t = pointer -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpulevel_t = int -rbx.platform.typedef.cpumask_t = uint -rbx.platform.typedef.cpusetid_t = int -rbx.platform.typedef.cpuwhich_t = int -rbx.platform.typedef.critical_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.fd_mask = ulong -rbx.platform.typedef.fflags_t = uint -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = long_long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = long -rbx.platform.typedef.lwpid_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ushort -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = long_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_register_t = uint -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vm_offset_t = uint -rbx.platform.typedef.vm_ooffset_t = long_long -rbx.platform.typedef.vm_paddr_t = uint -rbx.platform.typedef.vm_pindex_t = ulong_long -rbx.platform.typedef.vm_size_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-freebsd12/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-freebsd12/types.conf deleted file mode 100644 index 523370d9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-freebsd12/types.conf +++ /dev/null @@ -1,152 +0,0 @@ - -rbx.platform.typedef.*) = pointer -rbx.platform.typedef.__accmode_t = int -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = uint -rbx.platform.typedef.__clock_t = ulong -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpulevel_t = int -rbx.platform.typedef.__cpumask_t = uint -rbx.platform.typedef.__cpusetid_t = int -rbx.platform.typedef.__cpuwhich_t = int -rbx.platform.typedef.__critical_t = int -rbx.platform.typedef.__ct_rune_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = ulong -rbx.platform.typedef.__fflags_t = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = long_long -rbx.platform.typedef.__ino_t = ulong_long -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intfptr_t = int -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__lwpid_t = int -rbx.platform.typedef.__mode_t = ushort -rbx.platform.typedef.__nl_item = int -rbx.platform.typedef.__nlink_t = ulong_long -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__ptrdiff_t = int -rbx.platform.typedef.__register_t = int -rbx.platform.typedef.__rlim_t = long_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = uint -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = int -rbx.platform.typedef.__u_register_t = uint -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintfptr_t = uint -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = uint -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vm_offset_t = uint -rbx.platform.typedef.__vm_ooffset_t = long_long -rbx.platform.typedef.__vm_paddr_t = uint -rbx.platform.typedef.__vm_pindex_t = ulong_long -rbx.platform.typedef.__vm_size_t = uint -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.accmode_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = uint -rbx.platform.typedef.c_caddr_t = pointer -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpulevel_t = int -rbx.platform.typedef.cpumask_t = uint -rbx.platform.typedef.cpusetid_t = int -rbx.platform.typedef.cpuwhich_t = int -rbx.platform.typedef.critical_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = ulong -rbx.platform.typedef.fflags_t = uint -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = long_long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = long -rbx.platform.typedef.lwpid_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ulong_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = long_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_register_t = uint -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vm_offset_t = uint -rbx.platform.typedef.vm_ooffset_t = long_long -rbx.platform.typedef.vm_paddr_t = uint -rbx.platform.typedef.vm_pindex_t = ulong_long -rbx.platform.typedef.vm_size_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-gnu/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-gnu/types.conf deleted file mode 100644 index fa2fa8ce..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-gnu/types.conf +++ /dev/null @@ -1,107 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = uint -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsid_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__pthread_key = int -rbx.platform.typedef.__pthread_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__sigset_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.fsid_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.pthread_t = int -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.sigset_t = ulong -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-linux/types.conf deleted file mode 100644 index feb6bc47..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-linux/types.conf +++ /dev/null @@ -1,103 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-netbsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-netbsd/types.conf deleted file mode 100644 index a5aba894..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-netbsd/types.conf +++ /dev/null @@ -1,126 +0,0 @@ -rbx.platform.typedef.__clock_t = int -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = int -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = uint -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = int -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = int -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = int -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr64_t = long_long -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = int -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-openbsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-openbsd/types.conf deleted file mode 100644 index 15a0d613..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-openbsd/types.conf +++ /dev/null @@ -1,128 +0,0 @@ -rbx.platform.typedef.__clock_t = int -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = int -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = uint -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = int -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = int -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = int -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr64_t = long_long -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = int -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-solaris/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-solaris/types.conf deleted file mode 100644 index 22a2414e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-solaris/types.conf +++ /dev/null @@ -1,122 +0,0 @@ -rbx.platform.typedef.*caddr_t = char -rbx.platform.typedef.blkcnt64_t = long_long -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cnt_t = short -rbx.platform.typedef.cpu_flag_t = ushort -rbx.platform.typedef.ctid_t = long -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.datalink_id_t = uint -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.diskaddr_t = ulong_long -rbx.platform.typedef.disp_lock_t = uchar -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fds_mask = long -rbx.platform.typedef.fsblkcnt64_t = ulong_long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt64_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.hrtime_t = long_long -rbx.platform.typedef.id_t = long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.index_t = short -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.ipaddr_t = uint -rbx.platform.typedef.k_fltset_t = uint -rbx.platform.typedef.key_t = int -rbx.platform.typedef.len_t = ulong_long -rbx.platform.typedef.lgrp_id_t = long -rbx.platform.typedef.lock_t = uchar -rbx.platform.typedef.longlong_t = long_long -rbx.platform.typedef.major_t = ulong -rbx.platform.typedef.minor_t = ulong -rbx.platform.typedef.mode_t = ulong -rbx.platform.typedef.model_t = uint -rbx.platform.typedef.nfds_t = ulong -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.o_dev_t = short -rbx.platform.typedef.o_gid_t = ushort -rbx.platform.typedef.o_ino_t = ushort -rbx.platform.typedef.o_mode_t = ushort -rbx.platform.typedef.o_nlink_t = short -rbx.platform.typedef.o_pid_t = short -rbx.platform.typedef.o_uid_t = ushort -rbx.platform.typedef.off64_t = long_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.offset_t = long_long -rbx.platform.typedef.pad64_t = long_long -rbx.platform.typedef.pfn_t = ulong -rbx.platform.typedef.pgcnt_t = ulong -rbx.platform.typedef.pid_t = long -rbx.platform.typedef.poolid_t = long -rbx.platform.typedef.pri_t = short -rbx.platform.typedef.projid_t = long -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_t = uint -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.rlim64_t = ulong_long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.spgcnt_t = long -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.sysid_t = short -rbx.platform.typedef.t_scalar_t = long -rbx.platform.typedef.t_uscalar_t = ulong -rbx.platform.typedef.taskid_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_longlong_t = ulong_long -rbx.platform.typedef.u_offset_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uchar_t = uchar -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uint_t = uint -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ulong_t = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.upad64_t = ulong_long -rbx.platform.typedef.use_t = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.ushort_t = ushort -rbx.platform.typedef.zoneid_t = long diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-windows/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-windows/types.conf deleted file mode 100644 index a5d0b058..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/i386-windows/types.conf +++ /dev/null @@ -1,52 +0,0 @@ -rbx.platform.typedef.__time32_t = long -rbx.platform.typedef.__time64_t = long_long -rbx.platform.typedef._dev_t = uint -rbx.platform.typedef._ino_t = ushort -rbx.platform.typedef._mode_t = ushort -rbx.platform.typedef._off64_t = long_long -rbx.platform.typedef._off_t = long -rbx.platform.typedef._pid_t = int -rbx.platform.typedef._sigset_t = ulong -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.errno_t = int -rbx.platform.typedef.ino_t = ushort -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = short -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.off32_t = long -rbx.platform.typedef.off64_t = long_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.rsize_t = uint -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.time_t = long -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ushort -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.wchar_t = ushort -rbx.platform.typedef.wctype_t = ushort -rbx.platform.typedef.wint_t = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/ia64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/ia64-linux/types.conf deleted file mode 100644 index e0eeecc9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/ia64-linux/types.conf +++ /dev/null @@ -1,104 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/loongarch64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/loongarch64-linux/types.conf deleted file mode 100644 index aa8716d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/loongarch64-linux/types.conf +++ /dev/null @@ -1,141 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = long -rbx.platform.typedef.int_fast32_t = long -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ulong -rbx.platform.typedef.uint_fast32_t = ulong -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips-linux/types.conf deleted file mode 100644 index 24e82024..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips64-linux/types.conf deleted file mode 100644 index b61f4f70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips64-linux/types.conf +++ /dev/null @@ -1,104 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips64el-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips64el-linux/types.conf deleted file mode 100644 index b61f4f70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mips64el-linux/types.conf +++ /dev/null @@ -1,104 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsel-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsel-linux/types.conf deleted file mode 100644 index 24e82024..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsel-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa32r6-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa32r6-linux/types.conf deleted file mode 100644 index 24e82024..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa32r6-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa32r6el-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa32r6el-linux/types.conf deleted file mode 100644 index 24e82024..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa32r6el-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa64r6-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa64r6-linux/types.conf deleted file mode 100644 index b61f4f70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa64r6-linux/types.conf +++ /dev/null @@ -1,104 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa64r6el-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa64r6el-linux/types.conf deleted file mode 100644 index b61f4f70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/mipsisa64r6el-linux/types.conf +++ /dev/null @@ -1,104 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-aix/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-aix/types.conf deleted file mode 100644 index cbd20e78..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-aix/types.conf +++ /dev/null @@ -1,180 +0,0 @@ -rbx.platform.typedef.UTF32Char = uint -rbx.platform.typedef.UniChar = ushort -rbx.platform.typedef.__cptr32 = string -rbx.platform.typedef.__cptr64 = ulong_long -rbx.platform.typedef.__long32_t = long -rbx.platform.typedef.__long64_t = int -rbx.platform.typedef.__ptr32 = pointer -rbx.platform.typedef.__ptr64 = ulong_long -rbx.platform.typedef.__ulong32_t = ulong -rbx.platform.typedef.__ulong64_t = uint -rbx.platform.typedef.aptx_t = ushort -rbx.platform.typedef.blkcnt32_t = int -rbx.platform.typedef.blkcnt64_t = ulong_long -rbx.platform.typedef.blkcnt_t = int -rbx.platform.typedef.blksize32_t = int -rbx.platform.typedef.blksize64_t = ulong_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.boolean_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.chan_t = int -rbx.platform.typedef.class_id_t = uint -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = long_long -rbx.platform.typedef.cnt64_t = long_long -rbx.platform.typedef.cnt_t = short -rbx.platform.typedef.crid_t = int -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr64_t = long_long -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev32_t = uint -rbx.platform.typedef.dev64_t = ulong_long -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.esid_t = uint -rbx.platform.typedef.ext_t = int -rbx.platform.typedef.fpos64_t = long_long -rbx.platform.typedef.fpos_t = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino32_t = uint -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16 = short -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32 = int -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int32long64_t = int -rbx.platform.typedef.int64 = long_long -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8 = char -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = short -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intfast_t = int -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.krpn_t = int -rbx.platform.typedef.kvmhandle_t = ulong -rbx.platform.typedef.kvmid_t = long -rbx.platform.typedef.kvpn_t = int -rbx.platform.typedef.level_t = int -rbx.platform.typedef.liobn_t = uint -rbx.platform.typedef.long32int64_t = long -rbx.platform.typedef.longlong_t = long_long -rbx.platform.typedef.mid_t = pointer -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.mtyp_t = long -rbx.platform.typedef.nlink_t = short -rbx.platform.typedef.off64_t = long_long -rbx.platform.typedef.off_t = long -rbx.platform.typedef.offset_t = long_long -rbx.platform.typedef.paddr_t = long -rbx.platform.typedef.pdtx_t = int -rbx.platform.typedef.pid32_t = int -rbx.platform.typedef.pid64_t = ulong_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pshift_t = ushort -rbx.platform.typedef.psize_t = long_long -rbx.platform.typedef.psx_t = short -rbx.platform.typedef.ptex_t = ulong -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_t = uint -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.rlim64_t = ulong_long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.rpn64_t = long_long -rbx.platform.typedef.rpn_t = int -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.signal_t = int -rbx.platform.typedef.size64_t = ulong_long -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.slab_t[12] = char -rbx.platform.typedef.snidx_t = int -rbx.platform.typedef.socklen_t = ulong -rbx.platform.typedef.soff_t = int -rbx.platform.typedef.sshift_t = ushort -rbx.platform.typedef.ssize64_t = long_long -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.swhatx_t = ulong -rbx.platform.typedef.tid32_t = int -rbx.platform.typedef.tid64_t = ulong_long -rbx.platform.typedef.tid_t = int -rbx.platform.typedef.time32_t = int -rbx.platform.typedef.time64_t = long_long -rbx.platform.typedef.time_t = int -rbx.platform.typedef.timer32_t = int -rbx.platform.typedef.timer64_t = long_long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16 = ushort -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32 = uint -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64 = ulong_long -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8 = uchar -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_longlong_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uchar = uchar -rbx.platform.typedef.uchar_t = uchar -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint32long64_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ushort -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uint_t = uint -rbx.platform.typedef.uintfast_t = uint -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ulong32int64_t = ulong -rbx.platform.typedef.ulong_t = ulong -rbx.platform.typedef.unidx_t = int -rbx.platform.typedef.unit_addr_t = ulong_long -rbx.platform.typedef.ureg_t = ulong -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.ushort_t = ushort -rbx.platform.typedef.va_list = string -rbx.platform.typedef.vmfkey_t = uint -rbx.platform.typedef.vmhandle32_t = uint -rbx.platform.typedef.vmhandle_t = ulong -rbx.platform.typedef.vmhwkey_t = int -rbx.platform.typedef.vmid32_t = int -rbx.platform.typedef.vmid64_t = long_long -rbx.platform.typedef.vmid_t = long -rbx.platform.typedef.vmidx_t = int -rbx.platform.typedef.vmkey_t = int -rbx.platform.typedef.vmlpghandle_t = ulong -rbx.platform.typedef.vmm_lock_t = int -rbx.platform.typedef.vmnodeidx_t = int -rbx.platform.typedef.vmprkey_t = uint -rbx.platform.typedef.vmsize_t = int -rbx.platform.typedef.vpn_t = int -rbx.platform.typedef.wchar_t = ushort -rbx.platform.typedef.wctype_t = uint -rbx.platform.typedef.wint_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-darwin/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-darwin/types.conf deleted file mode 100644 index ae100f41..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-darwin/types.conf +++ /dev/null @@ -1,100 +0,0 @@ -rbx.platform.typedef.__darwin_blkcnt_t = long_long -rbx.platform.typedef.__darwin_blksize_t = int -rbx.platform.typedef.__darwin_clock_t = ulong -rbx.platform.typedef.__darwin_ct_rune_t = int -rbx.platform.typedef.__darwin_dev_t = int -rbx.platform.typedef.__darwin_fsblkcnt_t = uint -rbx.platform.typedef.__darwin_fsfilcnt_t = uint -rbx.platform.typedef.__darwin_gid_t = uint -rbx.platform.typedef.__darwin_id_t = uint -rbx.platform.typedef.__darwin_ino64_t = ulong_long -rbx.platform.typedef.__darwin_ino_t = ulong_long -rbx.platform.typedef.__darwin_intptr_t = long -rbx.platform.typedef.__darwin_mach_port_name_t = uint -rbx.platform.typedef.__darwin_mach_port_t = uint -rbx.platform.typedef.__darwin_mode_t = ushort -rbx.platform.typedef.__darwin_natural_t = uint -rbx.platform.typedef.__darwin_off_t = long_long -rbx.platform.typedef.__darwin_pid_t = int -rbx.platform.typedef.__darwin_pthread_key_t = ulong -rbx.platform.typedef.__darwin_ptrdiff_t = int -rbx.platform.typedef.__darwin_rune_t = int -rbx.platform.typedef.__darwin_sigset_t = uint -rbx.platform.typedef.__darwin_size_t = ulong -rbx.platform.typedef.__darwin_socklen_t = uint -rbx.platform.typedef.__darwin_ssize_t = long -rbx.platform.typedef.__darwin_suseconds_t = int -rbx.platform.typedef.__darwin_time_t = long -rbx.platform.typedef.__darwin_uid_t = uint -rbx.platform.typedef.__darwin_useconds_t = uint -rbx.platform.typedef.__darwin_uuid_t[16] = uchar -rbx.platform.typedef.__darwin_wchar_t = int -rbx.platform.typedef.__darwin_wint_t = int -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fd_mask = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = uint -rbx.platform.typedef.fsfilcnt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ushort -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.syscall_arg_t = ulong_long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.user_addr_t = ulong_long -rbx.platform.typedef.user_long_t = long_long -rbx.platform.typedef.user_size_t = ulong_long -rbx.platform.typedef.user_ssize_t = long_long -rbx.platform.typedef.user_time_t = long_long -rbx.platform.typedef.user_ulong_t = ulong_long -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-linux/types.conf deleted file mode 100644 index 42eec130..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-linux/types.conf +++ /dev/null @@ -1,130 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = int -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = long diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-openbsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-openbsd/types.conf deleted file mode 100644 index aea79551..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc-openbsd/types.conf +++ /dev/null @@ -1,156 +0,0 @@ -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long_long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = ulong_long -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = long_long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = long_long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = int -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.sigset_t = uint -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = long_long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uint -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong -rbx.platform.typedef.wchar_t = int -rbx.platform.typedef.wint_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc64-linux/types.conf deleted file mode 100644 index b61f4f70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc64-linux/types.conf +++ /dev/null @@ -1,104 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc64le-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc64le-linux/types.conf deleted file mode 100644 index 9ac9c2e5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/powerpc64le-linux/types.conf +++ /dev/null @@ -1,100 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/riscv64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/riscv64-linux/types.conf deleted file mode 100644 index ede0f985..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/riscv64-linux/types.conf +++ /dev/null @@ -1,104 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/s390-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/s390-linux/types.conf deleted file mode 100644 index 291b0326..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/s390-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/s390x-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/s390x-linux/types.conf deleted file mode 100644 index 32a7feba..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/s390x-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparc-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparc-linux/types.conf deleted file mode 100644 index aea09d32..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparc-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long_long -rbx.platform.typedef.__blkcnt64_t = long_long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong_long -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong_long -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong_long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = int -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long_long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long_long -rbx.platform.typedef.__rlim64_t = ulong_long -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = int -rbx.platform.typedef.__suseconds_t = int -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong_long -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong_long -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparc-solaris/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparc-solaris/types.conf deleted file mode 100644 index a1548e56..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparc-solaris/types.conf +++ /dev/null @@ -1,128 +0,0 @@ -rbx.platform.typedef.() = pointer -rbx.platform.typedef.*caddr_t = char -rbx.platform.typedef.Psocklen_t = pointer -rbx.platform.typedef.avl_index_t = uint -rbx.platform.typedef.blkcnt64_t = long_long -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cnt_t = short -rbx.platform.typedef.cpu_flag_t = ushort -rbx.platform.typedef.ctid_t = long -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.diskaddr_t = ulong_long -rbx.platform.typedef.disp_lock_t = uchar -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fds_mask = long -rbx.platform.typedef.fsblkcnt64_t = ulong_long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt64_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = long -rbx.platform.typedef.hrtime_t = long_long -rbx.platform.typedef.id_t = long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.index_t = short -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int) = pointer -rbx.platform.typedef.int) = pointer -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.ipaddr_t = uint -rbx.platform.typedef.k_fltset_t = uint -rbx.platform.typedef.key_t = int -rbx.platform.typedef.kid_t = int -rbx.platform.typedef.len_t = ulong_long -rbx.platform.typedef.lock_t = uchar -rbx.platform.typedef.longlong_t = long_long -rbx.platform.typedef.major_t = ulong -rbx.platform.typedef.minor_t = ulong -rbx.platform.typedef.mode_t = ulong -rbx.platform.typedef.model_t = uint -rbx.platform.typedef.nfds_t = ulong -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.o_dev_t = short -rbx.platform.typedef.o_gid_t = ushort -rbx.platform.typedef.o_ino_t = ushort -rbx.platform.typedef.o_mode_t = ushort -rbx.platform.typedef.o_nlink_t = short -rbx.platform.typedef.o_pid_t = short -rbx.platform.typedef.o_uid_t = ushort -rbx.platform.typedef.off64_t = long_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.offset_t = long_long -rbx.platform.typedef.pad64_t = long_long -rbx.platform.typedef.pfn_t = ulong -rbx.platform.typedef.pgcnt_t = ulong -rbx.platform.typedef.pid_t = long -rbx.platform.typedef.poolid_t = long -rbx.platform.typedef.pri_t = short -rbx.platform.typedef.projid_t = long -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_t = uint -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.rlim64_t = ulong_long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.size_t) = pointer -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.spgcnt_t = long -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.sysid_t = short -rbx.platform.typedef.t_scalar_t = long -rbx.platform.typedef.t_uscalar_t = ulong -rbx.platform.typedef.taskid_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.ts_t = long_long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_longlong_t = ulong_long -rbx.platform.typedef.u_offset_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uchar_t = uchar -rbx.platform.typedef.uid_t = long -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uint_t = uint -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ulong_t = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.upad64_t = ulong_long -rbx.platform.typedef.use_t = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.ushort_t = ushort -rbx.platform.typedef.zoneid_t = long diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-linux/types.conf deleted file mode 100644 index 7626bfce..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-linux/types.conf +++ /dev/null @@ -1,102 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.*__qaddr_t = long -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = int -rbx.platform.typedef.__swblk_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-openbsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-openbsd/types.conf deleted file mode 100644 index aea79551..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-openbsd/types.conf +++ /dev/null @@ -1,156 +0,0 @@ -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long_long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = ulong_long -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = long_long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = long_long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = int -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.sigset_t = uint -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = long_long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uint -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong -rbx.platform.typedef.wchar_t = int -rbx.platform.typedef.wint_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-solaris/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-solaris/types.conf deleted file mode 100644 index a1548e56..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sparcv9-solaris/types.conf +++ /dev/null @@ -1,128 +0,0 @@ -rbx.platform.typedef.() = pointer -rbx.platform.typedef.*caddr_t = char -rbx.platform.typedef.Psocklen_t = pointer -rbx.platform.typedef.avl_index_t = uint -rbx.platform.typedef.blkcnt64_t = long_long -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cnt_t = short -rbx.platform.typedef.cpu_flag_t = ushort -rbx.platform.typedef.ctid_t = long -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.diskaddr_t = ulong_long -rbx.platform.typedef.disp_lock_t = uchar -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fds_mask = long -rbx.platform.typedef.fsblkcnt64_t = ulong_long -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt64_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = long -rbx.platform.typedef.hrtime_t = long_long -rbx.platform.typedef.id_t = long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.index_t = short -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int) = pointer -rbx.platform.typedef.int) = pointer -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = int -rbx.platform.typedef.ipaddr_t = uint -rbx.platform.typedef.k_fltset_t = uint -rbx.platform.typedef.key_t = int -rbx.platform.typedef.kid_t = int -rbx.platform.typedef.len_t = ulong_long -rbx.platform.typedef.lock_t = uchar -rbx.platform.typedef.longlong_t = long_long -rbx.platform.typedef.major_t = ulong -rbx.platform.typedef.minor_t = ulong -rbx.platform.typedef.mode_t = ulong -rbx.platform.typedef.model_t = uint -rbx.platform.typedef.nfds_t = ulong -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.o_dev_t = short -rbx.platform.typedef.o_gid_t = ushort -rbx.platform.typedef.o_ino_t = ushort -rbx.platform.typedef.o_mode_t = ushort -rbx.platform.typedef.o_nlink_t = short -rbx.platform.typedef.o_pid_t = short -rbx.platform.typedef.o_uid_t = ushort -rbx.platform.typedef.off64_t = long_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.offset_t = long_long -rbx.platform.typedef.pad64_t = long_long -rbx.platform.typedef.pfn_t = ulong -rbx.platform.typedef.pgcnt_t = ulong -rbx.platform.typedef.pid_t = long -rbx.platform.typedef.poolid_t = long -rbx.platform.typedef.pri_t = short -rbx.platform.typedef.projid_t = long -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_t = uint -rbx.platform.typedef.ptrdiff_t = int -rbx.platform.typedef.rlim64_t = ulong_long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = uint -rbx.platform.typedef.size_t) = pointer -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.spgcnt_t = long -rbx.platform.typedef.ssize_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.sysid_t = short -rbx.platform.typedef.t_scalar_t = long -rbx.platform.typedef.t_uscalar_t = ulong -rbx.platform.typedef.taskid_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.ts_t = long_long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_longlong_t = ulong_long -rbx.platform.typedef.u_offset_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uchar_t = uchar -rbx.platform.typedef.uid_t = long -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uint_t = uint -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = uint -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ulong_t = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.upad64_t = ulong_long -rbx.platform.typedef.use_t = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.ushort_t = ushort -rbx.platform.typedef.zoneid_t = long diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sw_64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sw_64-linux/types.conf deleted file mode 100644 index aa8716d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/sw_64-linux/types.conf +++ /dev/null @@ -1,141 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = long -rbx.platform.typedef.int_fast32_t = long -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ulong -rbx.platform.typedef.uint_fast32_t = ulong -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-cygwin/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-cygwin/types.conf deleted file mode 100644 index 5bef6d70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-cygwin/types.conf +++ /dev/null @@ -1,3 +0,0 @@ -rbx.platform.typedef.ptrdiff_t = int64 -rbx.platform.typedef.size_t = uint64 -rbx.platform.typedef.ssize_t = int64 diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-darwin/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-darwin/types.conf deleted file mode 100644 index 68841bb1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-darwin/types.conf +++ /dev/null @@ -1,130 +0,0 @@ -rbx.platform.typedef.__darwin_blkcnt_t = long_long -rbx.platform.typedef.__darwin_blksize_t = int -rbx.platform.typedef.__darwin_clock_t = ulong -rbx.platform.typedef.__darwin_ct_rune_t = int -rbx.platform.typedef.__darwin_dev_t = int -rbx.platform.typedef.__darwin_fsblkcnt_t = uint -rbx.platform.typedef.__darwin_fsfilcnt_t = uint -rbx.platform.typedef.__darwin_gid_t = uint -rbx.platform.typedef.__darwin_id_t = uint -rbx.platform.typedef.__darwin_ino64_t = ulong_long -rbx.platform.typedef.__darwin_ino_t = ulong_long -rbx.platform.typedef.__darwin_intptr_t = long -rbx.platform.typedef.__darwin_mach_port_name_t = uint -rbx.platform.typedef.__darwin_mach_port_t = uint -rbx.platform.typedef.__darwin_mode_t = ushort -rbx.platform.typedef.__darwin_natural_t = uint -rbx.platform.typedef.__darwin_off_t = long_long -rbx.platform.typedef.__darwin_pid_t = int -rbx.platform.typedef.__darwin_pthread_key_t = ulong -rbx.platform.typedef.__darwin_ptrdiff_t = long -rbx.platform.typedef.__darwin_rune_t = int -rbx.platform.typedef.__darwin_sigset_t = uint -rbx.platform.typedef.__darwin_size_t = ulong -rbx.platform.typedef.__darwin_socklen_t = uint -rbx.platform.typedef.__darwin_ssize_t = long -rbx.platform.typedef.__darwin_suseconds_t = int -rbx.platform.typedef.__darwin_time_t = long -rbx.platform.typedef.__darwin_uid_t = uint -rbx.platform.typedef.__darwin_useconds_t = uint -rbx.platform.typedef.__darwin_uuid_string_t[37] = char -rbx.platform.typedef.__darwin_uuid_t[16] = uchar -rbx.platform.typedef.__darwin_wchar_t = int -rbx.platform.typedef.__darwin_wint_t = int -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.errno_t = int -rbx.platform.typedef.fd_mask = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = uint -rbx.platform.typedef.fsfilcnt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino64_t = ulong_long -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = short -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ushort -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long_long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.rsize_t = ulong -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.sae_associd_t = uint -rbx.platform.typedef.sae_connid_t = uint -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.syscall_arg_t = ulong_long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ushort -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.user_addr_t = ulong_long -rbx.platform.typedef.user_long_t = long_long -rbx.platform.typedef.user_off_t = long_long -rbx.platform.typedef.user_size_t = ulong_long -rbx.platform.typedef.user_ssize_t = long_long -rbx.platform.typedef.user_time_t = long_long -rbx.platform.typedef.user_ulong_t = ulong_long -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-dragonflybsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-dragonflybsd/types.conf deleted file mode 100644 index 889f6a32..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-dragonflybsd/types.conf +++ /dev/null @@ -1,130 +0,0 @@ -rbx.platform.typedef.*) = pointer -rbx.platform.typedef.___wchar_t = int -rbx.platform.typedef.__clock_t = ulong -rbx.platform.typedef.__clockid_t = ulong -rbx.platform.typedef.__fd_mask = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intlp_t = long -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long -rbx.platform.typedef.__rlim_t = long -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintlp_t = ulong -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.c_caddr_t = pointer -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.clockid_t = ulong -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = int -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.lwpid_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = long -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_daddr_t = uint -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uint -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.v_caddr_t = pointer -rbx.platform.typedef.wchar_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-freebsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-freebsd/types.conf deleted file mode 100644 index 8dbe3703..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-freebsd/types.conf +++ /dev/null @@ -1,128 +0,0 @@ -rbx.platform.typedef.__clock_t = int -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = int -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = uint -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long_long -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr64_t = long_long -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long_long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-freebsd12/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-freebsd12/types.conf deleted file mode 100644 index 31b1073d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-freebsd12/types.conf +++ /dev/null @@ -1,158 +0,0 @@ -rbx.platform.typedef.*) = pointer -rbx.platform.typedef.___wchar_t = int -rbx.platform.typedef.__accmode_t = int -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__char16_t = ushort -rbx.platform.typedef.__char32_t = uint -rbx.platform.typedef.__clock_t = int -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpulevel_t = int -rbx.platform.typedef.__cpusetid_t = int -rbx.platform.typedef.__cpuwhich_t = int -rbx.platform.typedef.__critical_t = long -rbx.platform.typedef.__ct_rune_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = ulong -rbx.platform.typedef.__fflags_t = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = long -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intfptr_t = long -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__lwpid_t = int -rbx.platform.typedef.__mode_t = ushort -rbx.platform.typedef.__nl_item = int -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long -rbx.platform.typedef.__rlim_t = long -rbx.platform.typedef.__rman_res_t = ulong -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = long -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__u_register_t = ulong -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintfptr_t = ulong -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vm_offset_t = ulong -rbx.platform.typedef.__vm_paddr_t = ulong -rbx.platform.typedef.__vm_size_t = ulong -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.accmode_t = int -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.c_caddr_t = pointer -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.cap_ioctl_t = ulong -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpulevel_t = int -rbx.platform.typedef.cpusetid_t = int -rbx.platform.typedef.cpuwhich_t = int -rbx.platform.typedef.critical_t = long -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = ulong -rbx.platform.typedef.fflags_t = uint -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = long -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.ksize_t = ulong -rbx.platform.typedef.kvaddr_t = ulong -rbx.platform.typedef.lwpid_t = int -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off64_t = long -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = long -rbx.platform.typedef.rman_res_t = ulong -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.sbintime_t = long -rbx.platform.typedef.segsz_t = long -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_register_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vm_offset_t = ulong -rbx.platform.typedef.vm_ooffset_t = long -rbx.platform.typedef.vm_paddr_t = ulong -rbx.platform.typedef.vm_pindex_t = ulong -rbx.platform.typedef.vm_size_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-haiku/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-haiku/types.conf deleted file mode 100644 index d5ddfa79..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-haiku/types.conf +++ /dev/null @@ -1,117 +0,0 @@ -rbx.platform.typedef.__haiku_addr_t = ulong -rbx.platform.typedef.__haiku_generic_addr_t = ulong -rbx.platform.typedef.__haiku_int16 = short -rbx.platform.typedef.__haiku_int32 = int -rbx.platform.typedef.__haiku_int64 = long -rbx.platform.typedef.__haiku_int8 = char -rbx.platform.typedef.__haiku_phys_addr_t = ulong -rbx.platform.typedef.__haiku_phys_saddr_t = long -rbx.platform.typedef.__haiku_saddr_t = long -rbx.platform.typedef.__haiku_std_int16 = short -rbx.platform.typedef.__haiku_std_int32 = int -rbx.platform.typedef.__haiku_std_int64 = long -rbx.platform.typedef.__haiku_std_int8 = char -rbx.platform.typedef.__haiku_std_uint16 = ushort -rbx.platform.typedef.__haiku_std_uint32 = uint -rbx.platform.typedef.__haiku_std_uint64 = ulong -rbx.platform.typedef.__haiku_std_uint8 = uchar -rbx.platform.typedef.__haiku_uint16 = ushort -rbx.platform.typedef.__haiku_uint32 = uint -rbx.platform.typedef.__haiku_uint64 = ulong -rbx.platform.typedef.__haiku_uint8 = uchar -rbx.platform.typedef.addr_t = ulong -rbx.platform.typedef.bigtime_t = long -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = pointer -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cnt_t = int -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fd_mask = uint -rbx.platform.typedef.fsblkcnt_t = long -rbx.platform.typedef.fsfilcnt_t = long -rbx.platform.typedef.generic_addr_t = ulong -rbx.platform.typedef.generic_size_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = int -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = long -rbx.platform.typedef.int16 = short -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32 = int -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64 = long -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8 = char -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = int -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nanotime_t = long -rbx.platform.typedef.nlink_t = int -rbx.platform.typedef.off_t = long -rbx.platform.typedef.perform_code = uint -rbx.platform.typedef.phys_addr_t = ulong -rbx.platform.typedef.phys_size_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = int -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.sig_atomic_t = int -rbx.platform.typedef.sigset_t = ulong -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.status_t = int -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.time_t = long -rbx.platform.typedef.type_code = uint -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uchar = uchar -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16 = ushort -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32 = uint -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64 = ulong -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8 = uchar -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uint -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.umode_t = uint -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.unichar = ushort -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.void*) = pointer -rbx.platform.typedef.wchar_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-linux/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-linux/types.conf deleted file mode 100644 index 060f1617..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-linux/types.conf +++ /dev/null @@ -1,132 +0,0 @@ -rbx.platform.typedef.*__caddr_t = char -rbx.platform.typedef.__blkcnt64_t = long -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = long -rbx.platform.typedef.__clock_t = long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__daddr_t = int -rbx.platform.typedef.__dev_t = ulong -rbx.platform.typedef.__fd_mask = long -rbx.platform.typedef.__fsblkcnt64_t = ulong -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt64_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__fsword_t = long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino64_t = ulong -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = int -rbx.platform.typedef.__loff_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = ulong -rbx.platform.typedef.__off64_t = long -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__priority_which_t = int -rbx.platform.typedef.__quad_t = long -rbx.platform.typedef.__rlim64_t = ulong -rbx.platform.typedef.__rlim_t = ulong -rbx.platform.typedef.__rlimit_resource_t = int -rbx.platform.typedef.__rusage_who_t = int -rbx.platform.typedef.__sig_atomic_t = int -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__syscall_slong_t = long -rbx.platform.typedef.__syscall_ulong_t = ulong -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = pointer -rbx.platform.typedef.__u_char = uchar -rbx.platform.typedef.__u_int = uint -rbx.platform.typedef.__u_long = ulong -rbx.platform.typedef.__u_quad_t = ulong -rbx.platform.typedef.__u_short = ushort -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = long -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = long -rbx.platform.typedef.int_fast32_t = long -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = int -rbx.platform.typedef.loff_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ulong -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_once_t = int -rbx.platform.typedef.pthread_t = ulong -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.quad_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = pointer -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ulong -rbx.platform.typedef.uint_fast32_t = ulong -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.wchar_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-msys/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-msys/types.conf deleted file mode 100644 index aa827c00..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-msys/types.conf +++ /dev/null @@ -1,119 +0,0 @@ -rbx.platform.typedef.*addr_t = char -rbx.platform.typedef.__ULong = uint -rbx.platform.typedef.__blkcnt_t = long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = ulong -rbx.platform.typedef.__clockid_t = ulong -rbx.platform.typedef.__cpu_mask = ulong -rbx.platform.typedef.__dev_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong -rbx.platform.typedef.__fsfilcnt_t = ulong -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__ino_t = ulong -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long_long -rbx.platform.typedef.__loff_t = long_long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nl_item = int -rbx.platform.typedef.__nlink_t = ushort -rbx.platform.typedef.__off_t = long -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__sigset_t = ulong -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = int -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__time_t = long -rbx.platform.typedef.__timer_t = ulong -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = ulong -rbx.platform.typedef._fpos64_t = long_long -rbx.platform.typedef._fpos_t = long -rbx.platform.typedef._off64_t = long_long -rbx.platform.typedef._off_t = long -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = ulong -rbx.platform.typedef.clockid_t = ulong -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.fd_mask = ulong -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = long -rbx.platform.typedef.int_fast32_t = long -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long_long -rbx.platform.typedef.loff_t = long_long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = ushort -rbx.platform.typedef.off_t = long -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sbintime_t = long -rbx.platform.typedef.sig_atomic_t = int -rbx.platform.typedef.sigset_t = ulong -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = int -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = ulong -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_register_t = ulong -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ulong -rbx.platform.typedef.uint_fast32_t = ulong -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.useconds_t = ulong -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vm_offset_t = ulong -rbx.platform.typedef.vm_size_t = ulong -rbx.platform.typedef.wint_t = uint diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-netbsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-netbsd/types.conf deleted file mode 100644 index 15a0d613..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-netbsd/types.conf +++ /dev/null @@ -1,128 +0,0 @@ -rbx.platform.typedef.__clock_t = int -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = int -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = uint -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = int -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = int -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = int -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = int -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr64_t = long_long -rbx.platform.typedef.daddr_t = int -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = uint -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = int -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = int -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = int -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-openbsd/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-openbsd/types.conf deleted file mode 100644 index 6abc9c09..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-openbsd/types.conf +++ /dev/null @@ -1,134 +0,0 @@ -rbx.platform.typedef.__blkcnt_t = long_long -rbx.platform.typedef.__blksize_t = int -rbx.platform.typedef.__clock_t = long_long -rbx.platform.typedef.__clockid_t = int -rbx.platform.typedef.__cpuid_t = ulong -rbx.platform.typedef.__dev_t = int -rbx.platform.typedef.__fd_mask = uint -rbx.platform.typedef.__fixpt_t = uint -rbx.platform.typedef.__fsblkcnt_t = ulong_long -rbx.platform.typedef.__fsfilcnt_t = ulong_long -rbx.platform.typedef.__gid_t = uint -rbx.platform.typedef.__id_t = uint -rbx.platform.typedef.__in_addr_t = uint -rbx.platform.typedef.__in_port_t = ushort -rbx.platform.typedef.__ino_t = ulong_long -rbx.platform.typedef.__int16_t = short -rbx.platform.typedef.__int32_t = int -rbx.platform.typedef.__int64_t = long_long -rbx.platform.typedef.__int8_t = char -rbx.platform.typedef.__int_fast16_t = int -rbx.platform.typedef.__int_fast32_t = int -rbx.platform.typedef.__int_fast64_t = long_long -rbx.platform.typedef.__int_fast8_t = int -rbx.platform.typedef.__int_least16_t = short -rbx.platform.typedef.__int_least32_t = int -rbx.platform.typedef.__int_least64_t = long_long -rbx.platform.typedef.__int_least8_t = char -rbx.platform.typedef.__intmax_t = long_long -rbx.platform.typedef.__intptr_t = long -rbx.platform.typedef.__key_t = long -rbx.platform.typedef.__mode_t = uint -rbx.platform.typedef.__nlink_t = uint -rbx.platform.typedef.__off_t = long_long -rbx.platform.typedef.__paddr_t = ulong -rbx.platform.typedef.__pid_t = int -rbx.platform.typedef.__psize_t = ulong -rbx.platform.typedef.__ptrdiff_t = long -rbx.platform.typedef.__register_t = long -rbx.platform.typedef.__rlim_t = ulong_long -rbx.platform.typedef.__rune_t = int -rbx.platform.typedef.__sa_family_t = uchar -rbx.platform.typedef.__segsz_t = int -rbx.platform.typedef.__size_t = ulong -rbx.platform.typedef.__socklen_t = uint -rbx.platform.typedef.__ssize_t = long -rbx.platform.typedef.__suseconds_t = long -rbx.platform.typedef.__swblk_t = int -rbx.platform.typedef.__time_t = long_long -rbx.platform.typedef.__timer_t = int -rbx.platform.typedef.__uid_t = uint -rbx.platform.typedef.__uint16_t = ushort -rbx.platform.typedef.__uint32_t = uint -rbx.platform.typedef.__uint64_t = ulong_long -rbx.platform.typedef.__uint8_t = uchar -rbx.platform.typedef.__uint_fast16_t = uint -rbx.platform.typedef.__uint_fast32_t = uint -rbx.platform.typedef.__uint_fast64_t = ulong_long -rbx.platform.typedef.__uint_fast8_t = uint -rbx.platform.typedef.__uint_least16_t = ushort -rbx.platform.typedef.__uint_least32_t = uint -rbx.platform.typedef.__uint_least64_t = ulong_long -rbx.platform.typedef.__uint_least8_t = uchar -rbx.platform.typedef.__uintmax_t = ulong_long -rbx.platform.typedef.__uintptr_t = ulong -rbx.platform.typedef.__useconds_t = uint -rbx.platform.typedef.__vaddr_t = ulong -rbx.platform.typedef.__vsize_t = ulong -rbx.platform.typedef.__wchar_t = int -rbx.platform.typedef.__wctrans_t = pointer -rbx.platform.typedef.__wctype_t = pointer -rbx.platform.typedef.__wint_t = int -rbx.platform.typedef.blkcnt_t = long_long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.caddr_t = string -rbx.platform.typedef.clock_t = long_long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cpuid_t = ulong -rbx.platform.typedef.daddr32_t = int -rbx.platform.typedef.daddr_t = long_long -rbx.platform.typedef.dev_t = int -rbx.platform.typedef.fixpt_t = uint -rbx.platform.typedef.fsblkcnt_t = ulong_long -rbx.platform.typedef.fsfilcnt_t = ulong_long -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.id_t = uint -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.ino_t = ulong_long -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.key_t = long -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.paddr_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.psize_t = ulong -rbx.platform.typedef.qaddr_t = pointer -rbx.platform.typedef.quad_t = long_long -rbx.platform.typedef.register_t = long -rbx.platform.typedef.rlim_t = ulong_long -rbx.platform.typedef.sa_family_t = uchar -rbx.platform.typedef.segsz_t = int -rbx.platform.typedef.sigset_t = uint -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.swblk_t = int -rbx.platform.typedef.time_t = long_long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_int16_t = ushort -rbx.platform.typedef.u_int32_t = uint -rbx.platform.typedef.u_int64_t = ulong_long -rbx.platform.typedef.u_int8_t = uchar -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_quad_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.vaddr_t = ulong -rbx.platform.typedef.vsize_t = ulong diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-solaris/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-solaris/types.conf deleted file mode 100644 index a7890d16..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-solaris/types.conf +++ /dev/null @@ -1,122 +0,0 @@ -rbx.platform.typedef.*caddr_t = char -rbx.platform.typedef.blkcnt64_t = long -rbx.platform.typedef.blkcnt_t = long -rbx.platform.typedef.blksize_t = int -rbx.platform.typedef.clock_t = long -rbx.platform.typedef.clockid_t = int -rbx.platform.typedef.cnt_t = short -rbx.platform.typedef.cpu_flag_t = ushort -rbx.platform.typedef.ctid_t = int -rbx.platform.typedef.daddr_t = long -rbx.platform.typedef.datalink_id_t = uint -rbx.platform.typedef.dev_t = ulong -rbx.platform.typedef.diskaddr_t = ulong_long -rbx.platform.typedef.disp_lock_t = uchar -rbx.platform.typedef.fd_mask = long -rbx.platform.typedef.fds_mask = long -rbx.platform.typedef.fsblkcnt64_t = ulong -rbx.platform.typedef.fsblkcnt_t = ulong -rbx.platform.typedef.fsfilcnt64_t = ulong -rbx.platform.typedef.fsfilcnt_t = ulong -rbx.platform.typedef.gid_t = uint -rbx.platform.typedef.hrtime_t = long_long -rbx.platform.typedef.id_t = int -rbx.platform.typedef.in_addr_t = uint -rbx.platform.typedef.in_port_t = ushort -rbx.platform.typedef.index_t = short -rbx.platform.typedef.ino64_t = ulong -rbx.platform.typedef.ino_t = ulong -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = int -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long -rbx.platform.typedef.intptr_t = long -rbx.platform.typedef.ipaddr_t = uint -rbx.platform.typedef.k_fltset_t = uint -rbx.platform.typedef.key_t = int -rbx.platform.typedef.len_t = ulong_long -rbx.platform.typedef.lgrp_id_t = int -rbx.platform.typedef.lock_t = uchar -rbx.platform.typedef.longlong_t = long_long -rbx.platform.typedef.major_t = uint -rbx.platform.typedef.minor_t = uint -rbx.platform.typedef.mode_t = uint -rbx.platform.typedef.model_t = uint -rbx.platform.typedef.nfds_t = ulong -rbx.platform.typedef.nlink_t = uint -rbx.platform.typedef.o_dev_t = short -rbx.platform.typedef.o_gid_t = ushort -rbx.platform.typedef.o_ino_t = ushort -rbx.platform.typedef.o_mode_t = ushort -rbx.platform.typedef.o_nlink_t = short -rbx.platform.typedef.o_pid_t = short -rbx.platform.typedef.o_uid_t = ushort -rbx.platform.typedef.off64_t = long -rbx.platform.typedef.off_t = long -rbx.platform.typedef.offset_t = long_long -rbx.platform.typedef.pad64_t = long -rbx.platform.typedef.pfn_t = ulong -rbx.platform.typedef.pgcnt_t = ulong -rbx.platform.typedef.pid_t = int -rbx.platform.typedef.poolid_t = int -rbx.platform.typedef.pri_t = short -rbx.platform.typedef.projid_t = int -rbx.platform.typedef.pthread_key_t = uint -rbx.platform.typedef.pthread_t = uint -rbx.platform.typedef.ptrdiff_t = long -rbx.platform.typedef.rlim64_t = ulong_long -rbx.platform.typedef.rlim_t = ulong -rbx.platform.typedef.sa_family_t = ushort -rbx.platform.typedef.size_t = ulong -rbx.platform.typedef.socklen_t = uint -rbx.platform.typedef.spgcnt_t = long -rbx.platform.typedef.ssize_t = long -rbx.platform.typedef.suseconds_t = long -rbx.platform.typedef.sysid_t = short -rbx.platform.typedef.t_scalar_t = int -rbx.platform.typedef.t_uscalar_t = uint -rbx.platform.typedef.taskid_t = int -rbx.platform.typedef.time_t = long -rbx.platform.typedef.timer_t = int -rbx.platform.typedef.u_char = uchar -rbx.platform.typedef.u_int = uint -rbx.platform.typedef.u_long = ulong -rbx.platform.typedef.u_longlong_t = ulong_long -rbx.platform.typedef.u_offset_t = ulong_long -rbx.platform.typedef.u_short = ushort -rbx.platform.typedef.uchar_t = uchar -rbx.platform.typedef.uid_t = uint -rbx.platform.typedef.uint = uint -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint32_t = uint -rbx.platform.typedef.uint64_t = ulong -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = uint -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least32_t = uint -rbx.platform.typedef.uint_least64_t = ulong -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uint_t = uint -rbx.platform.typedef.uintmax_t = ulong -rbx.platform.typedef.uintptr_t = ulong -rbx.platform.typedef.ulong = ulong -rbx.platform.typedef.ulong_t = ulong -rbx.platform.typedef.unchar = uchar -rbx.platform.typedef.upad64_t = ulong -rbx.platform.typedef.use_t = uchar -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.ushort = ushort -rbx.platform.typedef.ushort_t = ushort -rbx.platform.typedef.zoneid_t = int diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-windows/types.conf b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-windows/types.conf deleted file mode 100644 index 5bdbbde2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/platform/x86_64-windows/types.conf +++ /dev/null @@ -1,52 +0,0 @@ -rbx.platform.typedef.__time32_t = long -rbx.platform.typedef.__time64_t = long_long -rbx.platform.typedef._dev_t = uint -rbx.platform.typedef._ino_t = ushort -rbx.platform.typedef._mode_t = ushort -rbx.platform.typedef._off64_t = long_long -rbx.platform.typedef._off_t = long -rbx.platform.typedef._pid_t = long_long -rbx.platform.typedef._sigset_t = ulong_long -rbx.platform.typedef.dev_t = uint -rbx.platform.typedef.errno_t = int -rbx.platform.typedef.ino_t = ushort -rbx.platform.typedef.int16_t = short -rbx.platform.typedef.int32_t = int -rbx.platform.typedef.int64_t = long_long -rbx.platform.typedef.int8_t = char -rbx.platform.typedef.int_fast16_t = short -rbx.platform.typedef.int_fast32_t = int -rbx.platform.typedef.int_fast64_t = long_long -rbx.platform.typedef.int_fast8_t = char -rbx.platform.typedef.int_least16_t = short -rbx.platform.typedef.int_least32_t = int -rbx.platform.typedef.int_least64_t = long_long -rbx.platform.typedef.int_least8_t = char -rbx.platform.typedef.intmax_t = long_long -rbx.platform.typedef.intptr_t = long_long -rbx.platform.typedef.mode_t = ushort -rbx.platform.typedef.off32_t = long -rbx.platform.typedef.off64_t = long_long -rbx.platform.typedef.off_t = long_long -rbx.platform.typedef.pid_t = long_long -rbx.platform.typedef.ptrdiff_t = long_long -rbx.platform.typedef.rsize_t = ulong_long -rbx.platform.typedef.size_t = ulong_long -rbx.platform.typedef.ssize_t = long_long -rbx.platform.typedef.time_t = long_long -rbx.platform.typedef.uint16_t = ushort -rbx.platform.typedef.uint64_t = ulong_long -rbx.platform.typedef.uint8_t = uchar -rbx.platform.typedef.uint_fast16_t = ushort -rbx.platform.typedef.uint_fast32_t = uint -rbx.platform.typedef.uint_fast64_t = ulong_long -rbx.platform.typedef.uint_fast8_t = uchar -rbx.platform.typedef.uint_least16_t = ushort -rbx.platform.typedef.uint_least64_t = ulong_long -rbx.platform.typedef.uint_least8_t = uchar -rbx.platform.typedef.uintmax_t = ulong_long -rbx.platform.typedef.uintptr_t = ulong_long -rbx.platform.typedef.useconds_t = uint -rbx.platform.typedef.wchar_t = ushort -rbx.platform.typedef.wctype_t = ushort -rbx.platform.typedef.wint_t = ushort diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/pointer.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/pointer.rb deleted file mode 100644 index e65835f3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/pointer.rb +++ /dev/null @@ -1,167 +0,0 @@ -# -# Copyright (C) 2008, 2009 Wayne Meissner -# Copyright (c) 2007, 2008 Evan Phoenix -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -require 'ffi/platform' - -# NOTE: all method definitions in this file are conditional on -# whether they are not already defined. This is needed because -# some Ruby implementations (e.g., TruffleRuby) might already -# provide these methods due to using FFI internally, and we -# should not override them to avoid warnings. - -module FFI - class Pointer - - # Pointer size - SIZE = Platform::ADDRESS_SIZE / 8 unless const_defined?(:SIZE) - - # Return the size of a pointer on the current platform, in bytes - # @return [Integer] - def self.size - SIZE - end unless respond_to?(:size) - - # @param [nil,Integer] len length of string to return - # @return [String] - # Read pointer's contents as a string, or the first +len+ bytes of the - # equivalent string if +len+ is not +nil+. - def read_string(len=nil) - if len - return ''.b if len == 0 - get_bytes(0, len) - else - get_string(0) - end - end unless method_defined?(:read_string) - - # @param [Integer] len length of string to return - # @return [String] - # Read the first +len+ bytes of pointer's contents as a string. - # - # Same as: - # ptr.read_string(len) # with len not nil - def read_string_length(len) - get_bytes(0, len) - end unless method_defined?(:read_string_length) - - # @return [String] - # Read pointer's contents as a string. - # - # Same as: - # ptr.read_string # with no len - def read_string_to_null - get_string(0) - end unless method_defined?(:read_string_to_null) - - # @param [String] str string to write - # @param [Integer] len length of string to return - # @return [self] - # Write +len+ first bytes of +str+ in pointer's contents. - # - # Same as: - # ptr.write_string(str, len) # with len not nil - def write_string_length(str, len) - put_bytes(0, str, 0, len) - end unless method_defined?(:write_string_length) - - # @param [String] str string to write - # @param [Integer] len length of string to return - # @return [self] - # Write +str+ in pointer's contents, or first +len+ bytes if - # +len+ is not +nil+. - def write_string(str, len=nil) - len = str.bytesize unless len - # Write the string data without NUL termination - put_bytes(0, str, 0, len) - end unless method_defined?(:write_string) - - # @param [Type] type type of data to read from pointer's contents - # @param [Symbol] reader method to send to +self+ to read +type+ - # @param [Integer] length - # @return [Array] - # Read an array of +type+ of length +length+. - # @example - # ptr.read_array_of_type(TYPE_UINT8, :read_uint8, 4) # -> [1, 2, 3, 4] - def read_array_of_type(type, reader, length) - ary = [] - size = FFI.type_size(type) - tmp = self - length.times { |j| - ary << tmp.send(reader) - tmp += size unless j == length-1 # avoid OOB - } - ary - end unless method_defined?(:read_array_of_type) - - # @param [Type] type type of data to write to pointer's contents - # @param [Symbol] writer method to send to +self+ to write +type+ - # @param [Array] ary - # @return [self] - # Write +ary+ in pointer's contents as +type+. - # @example - # ptr.write_array_of_type(TYPE_UINT8, :put_uint8, [1, 2, 3 ,4]) - def write_array_of_type(type, writer, ary) - size = FFI.type_size(type) - ary.each_with_index { |val, i| - break unless i < self.size - self.send(writer, i * size, val) - } - self - end unless method_defined?(:write_array_of_type) - - # @return [self] - def to_ptr - self - end unless method_defined?(:to_ptr) - - # @param [Symbol,Type] type of data to read - # @return [Object] - # Read pointer's contents as +type+ - # - # Same as: - # ptr.get(type, 0) - def read(type) - get(type, 0) - end unless method_defined?(:read) - - # @param [Symbol,Type] type of data to read - # @param [Object] value to write - # @return [nil] - # Write +value+ of type +type+ to pointer's content - # - # Same as: - # ptr.put(type, 0) - def write(type, value) - put(type, 0, value) - end unless method_defined?(:write) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct.rb deleted file mode 100644 index bf6228ab..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct.rb +++ /dev/null @@ -1,317 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# Copyright (C) 2008, 2009 Andrea Fazzi -# Copyright (C) 2008, 2009 Luc Heinrich -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -require 'ffi/platform' -require 'ffi/struct_layout' -require 'ffi/struct_layout_builder' -require 'ffi/struct_by_reference' - -module FFI - - class Struct - - # Get struct size - # @return [Integer] - def size - self.class.size - end - - # @return [Integer] Struct alignment - def alignment - self.class.alignment - end - alias_method :align, :alignment - - # (see FFI::StructLayout#offset_of) - def offset_of(name) - self.class.offset_of(name) - end - - # (see FFI::StructLayout#members) - def members - self.class.members - end - - # @return [Array] - # Get array of values from Struct fields. - def values - members.map { |m| self[m] } - end - - # (see FFI::StructLayout#offsets) - def offsets - self.class.offsets - end - - # Clear the struct content. - # @return [self] - def clear - pointer.clear - self - end - - # Get {Pointer} to struct content. - # @return [AbstractMemory] - def to_ptr - pointer - end - - # Get struct size - # @return [Integer] - def self.size - defined?(@layout) ? @layout.size : defined?(@size) ? @size : 0 - end - - # set struct size - # @param [Integer] size - # @return [size] - def self.size=(size) - raise ArgumentError, "Size already set" if defined?(@size) || defined?(@layout) - @size = size - end - - # @return (see Struct#alignment) - def self.alignment - @layout.alignment - end - - # (see FFI::Type#members) - def self.members - @layout.members - end - - # (see FFI::StructLayout#offsets) - def self.offsets - @layout.offsets - end - - # (see FFI::StructLayout#offset_of) - def self.offset_of(name) - @layout.offset_of(name) - end - - def self.in - ptr(:in) - end - - def self.out - ptr(:out) - end - - def self.ptr(flags = :inout) - @ref_data_type ||= Type::Mapped.new(StructByReference.new(self)) - end - - def self.val - @val_data_type ||= StructByValue.new(self) - end - - def self.by_value - self.val - end - - def self.by_ref(flags = :inout) - self.ptr(flags) - end - - class ManagedStructConverter < StructByReference - - # @param [Struct] struct_class - def initialize(struct_class) - super(struct_class) - - raise NoMethodError, "release() not implemented for class #{struct_class}" unless struct_class.respond_to? :release - @method = struct_class.method(:release) - end - - # @param [Pointer] ptr - # @param [nil] ctx - # @return [Struct] - def from_native(ptr, ctx) - struct_class.new(AutoPointer.new(ptr, @method)) - end - end - - def self.auto_ptr - @managed_type ||= Type::Mapped.new(ManagedStructConverter.new(self)) - end - - - class << self - public - - # @return [StructLayout] - # @overload layout - # @return [StructLayout] - # Get struct layout. - # @overload layout(*spec) - # @param [Array,Array(Hash)] spec - # @return [StructLayout] - # Create struct layout from +spec+. - # @example Creating a layout from an array +spec+ - # class MyStruct < Struct - # layout :field1, :int, - # :field2, :pointer, - # :field3, :string - # end - # @example Creating a layout from an array +spec+ with offset - # class MyStructWithOffset < Struct - # layout :field1, :int, - # :field2, :pointer, 6, # set offset to 6 for this field - # :field3, :string - # end - # @example Creating a layout from a hash +spec+ - # class MyStructFromHash < Struct - # layout :field1 => :int, - # :field2 => :pointer, - # :field3 => :string - # end - # @example Creating a layout with pointers to functions - # class MyFunctionTable < Struct - # layout :function1, callback([:int, :int], :int), - # :function2, callback([:pointer], :void), - # :field3, :string - # end - def layout(*spec) - return @layout if spec.size == 0 - - warn "[DEPRECATION] Struct layout is already defined for class #{self.inspect}. Redefinition as in #{caller[0]} will be disallowed in ffi-2.0." if defined?(@layout) - - builder = StructLayoutBuilder.new - builder.union = self < Union - builder.packed = @packed if defined?(@packed) - builder.alignment = @min_alignment if defined?(@min_alignment) - - if spec[0].kind_of?(Hash) - hash_layout(builder, spec) - else - array_layout(builder, spec) - end - builder.size = @size if defined?(@size) && @size > builder.size - cspec = builder.build - @layout = cspec unless self == Struct - @size = cspec.size - return cspec - end - - - protected - - def callback(params, ret) - mod = enclosing_module - ret_type = find_type(ret, mod) - if ret_type == Type::STRING - raise TypeError, ":string is not allowed as return type of callbacks" - end - FFI::CallbackInfo.new(ret_type, params.map { |e| find_type(e, mod) }) - end - - def packed(packed = 1) - @packed = packed - end - alias :pack :packed - - def aligned(alignment = 1) - @min_alignment = alignment - end - alias :align :aligned - - def enclosing_module - begin - mod = self.name.split("::")[0..-2].inject(Object) { |obj, c| obj.const_get(c) } - if mod.respond_to?(:find_type) && (mod.is_a?(FFI::Library) || mod < FFI::Struct) - mod - end - rescue Exception - nil - end - end - - - def find_field_type(type, mod = enclosing_module) - if type.kind_of?(Class) && type < Struct - FFI::Type::Struct.new(type) - - elsif type.kind_of?(Class) && type < FFI::StructLayout::Field - type - - elsif type.kind_of?(::Array) - FFI::Type::Array.new(find_field_type(type[0]), type[1]) - - else - find_type(type, mod) - end - end - - def find_type(type, mod = enclosing_module) - if mod - mod.find_type(type) - end || FFI.find_type(type) - end - - private - - # @param [StructLayoutBuilder] builder - # @param [Hash] spec - # @return [builder] - # Add hash +spec+ to +builder+. - def hash_layout(builder, spec) - spec[0].each do |name, type| - builder.add name, find_field_type(type), nil - end - end - - # @param [StructLayoutBuilder] builder - # @param [Array] spec - # @return [builder] - # Add array +spec+ to +builder+. - def array_layout(builder, spec) - i = 0 - while i < spec.size - name, type = spec[i, 2] - i += 2 - - # If the next param is a Integer, it specifies the offset - if spec[i].kind_of?(Integer) - offset = spec[i] - i += 1 - else - offset = nil - end - - builder.add name, find_field_type(type), offset - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_by_reference.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_by_reference.rb deleted file mode 100644 index 27f25eca..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_by_reference.rb +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (C) 2010 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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.# - -module FFI - # This class includes the {FFI::DataConverter} module. - class StructByReference - include DataConverter - - attr_reader :struct_class - - # @param [Struct] struct_class - def initialize(struct_class) - unless Class === struct_class and struct_class < FFI::Struct - raise TypeError, 'wrong type (expected subclass of FFI::Struct)' - end - @struct_class = struct_class - end - - # Always get {FFI::Type}::POINTER. - def native_type - FFI::Type::POINTER - end - - # @param [nil, Struct] value - # @param [nil] ctx - # @return [AbstractMemory] Pointer on +value+. - def to_native(value, ctx) - return Pointer::NULL if value.nil? - - unless @struct_class === value - raise TypeError, "wrong argument type #{value.class} (expected #{@struct_class})" - end - - value.pointer - end - - # @param [AbstractMemory] value - # @param [nil] ctx - # @return [Struct] - # Create a struct from content of memory +value+. - def from_native(value, ctx) - @struct_class.new(value) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_layout.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_layout.rb deleted file mode 100644 index fb842023..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_layout.rb +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# Copyright (C) 2008, 2009 Andrea Fazzi -# Copyright (C) 2008, 2009 Luc Heinrich -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -module FFI - - class StructLayout - - # @return [Array - # Get an array of tuples (field name, offset of the field). - def offsets - members.map { |m| [ m, self[m].offset ] } - end - - # @return [Integer] - # Get the offset of a field. - def offset_of(field_name) - self[field_name].offset - end - - # An enum {Field} in a {StructLayout}. - class Enum < Field - - # @param [AbstractMemory] ptr pointer on a {Struct} - # @return [Object] - # Get an object of type {#type} from memory pointed by +ptr+. - def get(ptr) - type.find(ptr.get_int(offset)) - end - - # @param [AbstractMemory] ptr pointer on a {Struct} - # @param value - # @return [nil] - # Set +value+ into memory pointed by +ptr+. - def put(ptr, value) - ptr.put_int(offset, type.find(value)) - end - - end - - class InnerStruct < Field - def get(ptr) - type.struct_class.new(ptr.slice(self.offset, self.size)) - end - - def put(ptr, value) - raise TypeError, "wrong value type (expected #{type.struct_class})" unless value.is_a?(type.struct_class) - ptr.slice(self.offset, self.size).__copy_from__(value.pointer, self.size) - end - end - - class Mapped < Field - def initialize(name, offset, type, orig_field) - @orig_field = orig_field - super(name, offset, type) - end - - def get(ptr) - type.from_native(@orig_field.get(ptr), nil) - end - - def put(ptr, value) - @orig_field.put(ptr, type.to_native(value, nil)) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_layout_builder.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_layout_builder.rb deleted file mode 100644 index 2221a607..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/struct_layout_builder.rb +++ /dev/null @@ -1,227 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -module FFI - - # Build a {StructLayout struct layout}. - class StructLayoutBuilder - attr_reader :size - attr_reader :alignment - - def initialize - @size = 0 - @alignment = 1 - @min_alignment = 1 - @packed = false - @union = false - @fields = Array.new - end - - # Set size attribute with +size+ only if +size+ is greater than attribute value. - # @param [Integer] size - def size=(size) - @size = size if size > @size - end - - # Set alignment attribute with +align+ only if it is greater than attribute value. - # @param [Integer] align - def alignment=(align) - @alignment = align if align > @alignment - @min_alignment = align - end - - # Set union attribute. - # Set to +true+ to build a {Union} instead of a {Struct}. - # @param [Boolean] is_union - # @return [is_union] - def union=(is_union) - @union = is_union - end - - # Building a {Union} or a {Struct} ? - # - # @return [Boolean] - # - def union? - @union - end - - # Set packed attribute - # @overload packed=(packed) Set alignment and packed attributes to - # +packed+. - # - # @param [Integer] packed - # - # @return [packed] - # @overload packed=(packed) Set packed attribute. - # @param packed - # - # @return [0,1] - # - def packed=(packed) - if packed.is_a?(0.class) - @alignment = packed - @packed = packed - else - @packed = packed ? 1 : 0 - end - end - - - # List of number types - NUMBER_TYPES = [ - Type::INT8, - Type::UINT8, - Type::INT16, - Type::UINT16, - Type::INT32, - Type::UINT32, - Type::LONG, - Type::ULONG, - Type::INT64, - Type::UINT64, - Type::FLOAT32, - Type::FLOAT64, - Type::LONGDOUBLE, - Type::BOOL, - ].freeze - - # @param [String, Symbol] name name of the field - # @param [Array, DataConverter, Struct, StructLayout::Field, Symbol, Type] type type of the field - # @param [Integer, nil] offset - # @return [self] - # Add a field to the builder. - # @note Setting +offset+ to +nil+ or +-1+ is equivalent to +0+. - def add(name, type, offset = nil) - - if offset.nil? || offset == -1 - offset = @union ? 0 : align(@size, @packed ? [ @packed, type.alignment ].min : [ @min_alignment, type.alignment ].max) - end - - # - # If a FFI::Type type was passed in as the field arg, try and convert to a StructLayout::Field instance - # - field = type.is_a?(StructLayout::Field) ? type : field_for_type(name, offset, type) - @fields << field - @alignment = [ @alignment, field.alignment ].max unless @packed - @size = [ @size, field.size + (@union ? 0 : field.offset) ].max - - return self - end - - # @param (see #add) - # @return (see #add) - # Same as {#add}. - # @see #add - def add_field(name, type, offset = nil) - add(name, type, offset) - end - - # @param (see #add) - # @return (see #add) - # Add a struct as a field to the builder. - def add_struct(name, type, offset = nil) - add(name, Type::Struct.new(type), offset) - end - - # @param name (see #add) - # @param type (see #add) - # @param [Integer] count array length - # @param offset (see #add) - # @return (see #add) - # Add an array as a field to the builder. - def add_array(name, type, count, offset = nil) - add(name, Type::Array.new(type, count), offset) - end - - # @return [StructLayout] - # Build and return the struct layout. - def build - # Add tail padding if the struct is not packed - size = @packed ? @size : align(@size, @alignment) - - layout = StructLayout.new(@fields, size, @alignment) - layout.__union! if @union - layout - end - - private - - # @param [Integer] offset - # @param [Integer] align - # @return [Integer] - def align(offset, align) - align + ((offset - 1) & ~(align - 1)); - end - - # @param (see #add) - # @return [StructLayout::Field] - def field_for_type(name, offset, type) - field_class = case - when type.is_a?(Type::Function) - StructLayout::Function - - when type.is_a?(Type::Struct) - StructLayout::InnerStruct - - when type.is_a?(Type::Array) - StructLayout::Array - - when type.is_a?(FFI::Enum) - StructLayout::Enum - - when NUMBER_TYPES.include?(type) - StructLayout::Number - - when type == Type::POINTER - StructLayout::Pointer - - when type == Type::STRING - StructLayout::String - - when type.is_a?(Class) && type < StructLayout::Field - type - - when type.is_a?(DataConverter) - return StructLayout::Mapped.new(name, offset, Type::Mapped.new(type), field_for_type(name, offset, type.native_type)) - - when type.is_a?(Type::Mapped) - return StructLayout::Mapped.new(name, offset, type, field_for_type(name, offset, type.native_type)) - - else - raise TypeError, "invalid struct field type #{type.inspect}" - end - - field_class.new(name, offset, type) - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/const_generator.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/const_generator.rb deleted file mode 100644 index 70ba9c2a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/const_generator.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tempfile' -require 'open3' - -module FFI - - # ConstGenerator turns C constants into ruby values. - # - # @example a simple example for stdio - # require 'ffi/tools/const_generator' - # cg = FFI::ConstGenerator.new('stdio') do |gen| - # gen.const(:SEEK_SET) - # gen.const('SEEK_CUR') - # gen.const('seek_end') # this constant does not exist - # end # #calculate called automatically at the end of the block - # - # cg['SEEK_SET'] # => 0 - # cg['SEEK_CUR'] # => 1 - # cg['seek_end'] # => nil - # cg.to_ruby # => "SEEK_SET = 0\nSEEK_CUR = 1\n# seek_end not available" - class ConstGenerator - @options = {} - attr_reader :constants - - # Creates a new constant generator that uses +prefix+ as a name, and an - # options hash. - # - # The only option is +:required+, which if set to +true+ raises an error if a - # constant you have requested was not found. - # - # @param [#to_s] prefix - # @param [Hash] options - # @return - # @option options [Boolean] :required - # @overload initialize(prefix, options) - # @overload initialize(prefix, options) { |gen| ... } - # @yieldparam [ConstGenerator] gen new generator is passed to the block - # When passed a block, {#calculate} is automatically called at the end of - # the block, otherwise you must call it yourself. - def initialize(prefix = nil, options = {}) - @includes = ['stdio.h', 'stddef.h'] - @constants = {} - @prefix = prefix - - @required = options[:required] - @options = options - - if block_given? then - yield self - calculate self.class.options.merge(options) - end - end - # Set class options - # These options are merged with {#initialize} options when it is called with a block. - # @param [Hash] options - # @return [Hash] class options - def self.options=(options) - @options = options - end - # Get class options. - # @return [Hash] class options - def self.options - @options - end - # @param [String] name - # @return constant value (converted if a +converter+ was defined). - # Access a constant by name. - def [](name) - @constants[name].converted_value - end - - # Request the value for C constant +name+. - # - # @param [#to_s] name C constant name - # @param [String] format a printf format string to print the value out - # @param [String] cast a C cast for the value - # @param ruby_name alternate ruby name for {#to_ruby} - # - # @overload const(name, format=nil, cast='', ruby_name=nil, converter=nil) - # +converter+ is a Method or a Proc. - # @param [#call] converter convert the value from a string to the appropriate - # type for {#to_ruby}. - # @overload const(name, format=nil, cast='', ruby_name=nil) { |value| ... } - # Use a converter block. This block convert the value from a string to the - # appropriate type for {#to_ruby}. - # @yieldparam value constant value - def const(name, format = nil, cast = '', ruby_name = nil, converter = nil, - &converter_proc) - format ||= '%d' - cast ||= '' - - if converter_proc and converter then - raise ArgumentError, "Supply only converter or converter block" - end - - converter = converter_proc if converter.nil? - - const = Constant.new name, format, cast, ruby_name, converter - @constants[name.to_s] = const - return const - end - - # Calculate constants values. - # @param [Hash] options - # @option options [String] :cppflags flags for C compiler - # @return [nil] - # @raise if a constant is missing and +:required+ was set to +true+ (see {#initialize}) - def calculate(options = {}) - binary_path = nil - - Tempfile.open("#{@prefix}.const_generator") do |f| - binary_path = f.path + ".bin" - @includes.each do |inc| - f.puts "#include <#{inc}>" - end - f.puts "\nint main(int argc, char **argv)\n{" - - @constants.each_value do |const| - f.puts <<-EOF - #ifdef #{const.name} - printf("#{const.name} #{const.format}\\n", #{const.cast}#{const.name}); - #endif - EOF - end - - f.puts "\n\treturn 0;\n}" - f.flush - - cc = ENV['CC'] || 'gcc' - output = `#{cc} #{options[:cppflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -x c -Wall -Werror #{f.path} -o #{binary_path} 2>&1` - - unless $?.success? then - output = output.split("\n").map { |l| "\t#{l}" }.join "\n" - raise "Compilation error generating constants #{@prefix}:\n#{output}" - end - end - - output = `#{binary_path}` - File.unlink(binary_path + (FFI::Platform.windows? ? ".exe" : "")) - output.each_line do |line| - line =~ /^(\S+)\s(.*)$/ - const = @constants[$1] - const.value = $2 - end - - missing_constants = @constants.select do |name, constant| - constant.value.nil? - end.map { |name,| name } - - if @required and not missing_constants.empty? then - raise "Missing required constants for #{@prefix}: #{missing_constants.join ', '}" - end - end - - # Dump constants to +io+. - # @param [#puts] io - # @return [nil] - def dump_constants(io) - @constants.each do |name, constant| - name = [@prefix, name].join '.' if @prefix - io.puts "#{name} = #{constant.converted_value}" - end - end - - # Outputs values for discovered constants. If the constant's value was - # not discovered it is not omitted. - # @return [String] - def to_ruby - @constants.sort_by { |name,| name }.map do |name, constant| - if constant.value.nil? then - "# #{name} not available" - else - constant.to_ruby - end - end.join "\n" - end - - # Add additional C include file(s) to calculate constants from. - # @note +stdio.h+ and +stddef.h+ automatically included - # @param [List, Array] i include file(s) - # @return [Array] array of include files - def include(*i) - @includes |= i.flatten - end - - end - - # This class hold constants for {ConstGenerator} - class ConstGenerator::Constant - - attr_reader :name, :format, :cast - attr_accessor :value - - # @param [#to_s] name - # @param [String] format a printf format string to print the value out - # @param [String] cast a C cast for the value - # @param ruby_name alternate ruby name for {#to_ruby} - # @param [#call] converter convert the value from a string to the appropriate - # type for {#to_ruby}. - def initialize(name, format, cast, ruby_name = nil, converter=nil) - @name = name - @format = format - @cast = cast - @ruby_name = ruby_name - @converter = converter - @value = nil - end - - # Return constant value (converted if a +converter+ was defined). - # @return constant value. - def converted_value - if @converter - @converter.call(@value) - else - @value - end - end - - # get constant ruby name - # @return [String] - def ruby_name - @ruby_name || @name - end - - # Get an evaluable string from constant. - # @return [String] - def to_ruby - "#{ruby_name} = #{converted_value}" - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/generator.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/generator.rb deleted file mode 100644 index 5552ea59..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/generator.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'ffi/tools/struct_generator' -require 'ffi/tools/const_generator' - -module FFI - - ## - # Generate files with C structs for FFI::Struct and C constants. - # - # == A simple example - # - # In file +zlib.rb.ffi+: - # module Zlib - # @@@ - # constants do |c| - # c.include "zlib.h" - # c.const :ZLIB_VERNUM - # end - # @@@ - # - # class ZStream < FFI::Struct - # - # struct do |s| - # s.name "struct z_stream_s" - # s.include "zlib.h" - # - # s.field :next_in, :pointer - # s.field :avail_in, :uint - # s.field :total_in, :ulong - # end - # @@@ - # end - # end - # - # Translate the file: - # require "ffi/tools/generator" - # FFI::Generator.new "zlib.rb.ffi", "zlib.rb" - # - # Generates the file +zlib.rb+ with constant values and offsets: - # module Zlib - # ZLIB_VERNUM = 4784 - # - # class ZStream < FFI::Struct - # layout :next_in, :pointer, 0, - # :avail_in, :uint, 8, - # :total_in, :ulong, 16 - # end - # - # @see FFI::Generator::Task for easy integration in a Rakefile - class Generator - - def initialize(ffi_name, rb_name, options = {}) - @ffi_name = ffi_name - @rb_name = rb_name - @options = options - @name = File.basename rb_name, '.rb' - - file = File.read @ffi_name - - new_file = file.gsub(/^( *)@@@(.*?)@@@/m) do - @constants = [] - @structs = [] - - indent = $1 - original_lines = $2.count "\n" - - instance_eval $2, @ffi_name, $`.count("\n") - - new_lines = [] - @constants.each { |c| new_lines << c.to_ruby } - @structs.each { |s| new_lines << s.generate_layout } - - new_lines = new_lines.join("\n").split "\n" # expand multiline blocks - new_lines = new_lines.map { |line| indent + line } - - padding = original_lines - new_lines.length - new_lines += [nil] * padding if padding >= 0 - - new_lines.join "\n" - end - - open @rb_name, 'w' do |f| - f.puts "# This file is generated from `#{@ffi_name}'. Do not edit." - f.puts - f.puts new_file - end - end - - def constants(options = {}, &block) - @constants << FFI::ConstGenerator.new(@name, @options.merge(options), &block) - end - - def struct(options = {}, &block) - @structs << FFI::StructGenerator.new(@name, @options.merge(options), &block) - end - - ## - # Utility converter for constants - - def to_s - proc { |obj| obj.to_s.inspect } - end - - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb deleted file mode 100644 index da72968b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/generator_task.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'ffi/tools/generator' -require 'rake' -require 'rake/tasklib' - -## -# Add Rake tasks that generate files with C structs for FFI::Struct and C constants. -# -# @example a simple example for your Rakefile -# require "ffi/tools/generator_task" -# # Add a task to generate my_object.rb out of my_object.rb.ffi -# FFI::Generator::Task.new ["my_object.rb"], cflags: "-I/usr/local/mylibrary" -# -# The generated files are also added to the 'clear' task. -# -# @see FFI::Generator for a description of the file content -class FFI::Generator::Task < Rake::TaskLib - - def initialize(rb_names, options={}) - task :clean do rm_f rb_names end - - rb_names.each do |rb_name| - ffi_name = "#{rb_name}.ffi" - - file rb_name => ffi_name do |t| - puts "Generating #{rb_name}..." if Rake.application.options.trace - - FFI::Generator.new ffi_name, rb_name, options - end - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/struct_generator.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/struct_generator.rb deleted file mode 100644 index 3a951c38..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/struct_generator.rb +++ /dev/null @@ -1,195 +0,0 @@ -require 'tempfile' - -module FFI - - ## - # Generates an FFI Struct layout. - # - # Given the @@@ portion in: - # - # class Zlib::ZStream < FFI::Struct - # @@@ - # name "struct z_stream_s" - # include "zlib.h" - # - # field :next_in, :pointer - # field :avail_in, :uint - # field :total_in, :ulong - # - # # ... - # @@@ - # end - # - # StructGenerator will create the layout: - # - # layout :next_in, :pointer, 0, - # :avail_in, :uint, 4, - # :total_in, :ulong, 8, - # # ... - # - # StructGenerator does its best to pad the layout it produces to preserve - # line numbers. Place the struct definition as close to the top of the file - # for best results. - - class StructGenerator - @options = {} - attr_accessor :size - attr_reader :fields - - def initialize(name, options = {}) - @name = name - @struct_name = nil - @includes = [] - @fields = [] - @found = false - @size = nil - - if block_given? then - yield self - calculate self.class.options.merge(options) - end - end - def self.options=(options) - @options = options - end - def self.options - @options - end - def calculate(options = {}) - binary = File.join Dir.tmpdir, "rb_struct_gen_bin_#{Process.pid}" - - raise "struct name not set" if @struct_name.nil? - - Tempfile.open("#{@name}.struct_generator") do |f| - f.puts "#include " - - @includes.each do |inc| - f.puts "#include <#{inc}>" - end - - f.puts "#include \n\n" - f.puts "int main(int argc, char **argv)\n{" - f.puts " #{@struct_name} s;" - f.puts %[ printf("sizeof(#{@struct_name}) %u\\n", (unsigned int) sizeof(#{@struct_name}));] - - @fields.each do |field| - f.puts <<-EOF - printf("#{field.name} %u %u\\n", (unsigned int) offsetof(#{@struct_name}, #{field.name}), - (unsigned int) sizeof(s.#{field.name})); - EOF - end - - f.puts "\n return 0;\n}" - f.flush - - cc = ENV['CC'] || 'gcc' - output = `#{cc} #{options[:cppflags]} #{options[:cflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -x c -Wall -Werror #{f.path} -o #{binary} 2>&1` - - unless $?.success? then - @found = false - output = output.split("\n").map { |l| "\t#{l}" }.join "\n" - raise "Compilation error generating struct #{@name} (#{@struct_name}):\n#{output}" - end - end - - output = `#{binary}`.split "\n" - File.unlink(binary + (FFI::Platform.windows? ? ".exe" : "")) - sizeof = output.shift - unless @size - m = /\s*sizeof\([^)]+\) (\d+)/.match sizeof - @size = m[1] - end - - line_no = 0 - output.each do |line| - md = line.match(/.+ (\d+) (\d+)/) - @fields[line_no].offset = md[1].to_i - @fields[line_no].size = md[2].to_i - - line_no += 1 - end - - @found = true - end - - def field(name, type=nil) - field = Field.new(name, type) - @fields << field - return field - end - - def found? - @found - end - - def dump_config(io) - io.puts "rbx.platform.#{@name}.sizeof = #{@size}" - - @fields.each { |field| io.puts field.to_config(@name) } - end - - def generate_layout - buf = "" - - @fields.each_with_index do |field, i| - if buf.empty? - buf << "layout :#{field.name}, :#{field.type}, #{field.offset}" - else - buf << " :#{field.name}, :#{field.type}, #{field.offset}" - end - - if i < @fields.length - 1 - buf << ",\n" - end - end - - buf - end - - def get_field(name) - @fields.find { |f| name == f.name } - end - - def include(i) - @includes << i - end - - def name(n) - @struct_name = n - end - - end - - ## - # A field in a Struct. - - class StructGenerator::Field - - attr_reader :name - attr_reader :type - attr_reader :offset - attr_accessor :size - - def initialize(name, type) - @name = name - @type = type - @offset = nil - @size = nil - end - - def offset=(o) - @offset = o - end - - def to_config(name) - buf = [] - buf << "rbx.platform.#{name}.#{@name}.offset = #{@offset}" - buf << "rbx.platform.#{name}.#{@name}.size = #{@size}" - buf << "rbx.platform.#{name}.#{@name}.type = #{@type}" if @type - buf - end - - end - -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/types_generator.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/types_generator.rb deleted file mode 100644 index ba2d8c5b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/tools/types_generator.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'tempfile' - -module FFI - - # @private - class TypesGenerator - - ## - # Maps different C types to the C type representations we use - - TYPE_MAP = { - "char" => :char, - "signed char" => :char, - "__signed char" => :char, - "unsigned char" => :uchar, - - "short" => :short, - "signed short" => :short, - "signed short int" => :short, - "unsigned short" => :ushort, - "unsigned short int" => :ushort, - - "int" => :int, - "signed int" => :int, - "unsigned int" => :uint, - - "long" => :long, - "long int" => :long, - "signed long" => :long, - "signed long int" => :long, - "unsigned long" => :ulong, - "unsigned long int" => :ulong, - "long unsigned int" => :ulong, - - "long long" => :long_long, - "long long int" => :long_long, - "signed long long" => :long_long, - "signed long long int" => :long_long, - "unsigned long long" => :ulong_long, - "unsigned long long int" => :ulong_long, - - "char *" => :string, - "void *" => :pointer, - } - - def self.generate(options = {}) - typedefs = nil - Tempfile.open 'ffi_types_generator' do |io| - io.puts <<-C -#include -#include -#include -#if !(defined(WIN32)) -#include -#include -#include -#endif - C - - io.close - cc = ENV['CC'] || 'gcc' - cmd = "#{cc} -E -x c #{options[:cppflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c" - if options[:input] - typedefs = File.read(options[:input]) - elsif options[:remote] - typedefs = `ssh #{options[:remote]} #{cmd} - < #{io.path}` - else - typedefs = `#{cmd} #{io.path}` - end - end - - code = [] - - typedefs.each_line do |type| - # We only care about single line typedef - next unless type =~ /typedef/ - # Ignore unions or structs - next if type =~ /union|struct/ - - # strip off the starting typedef and ending ; - type.gsub!(/^(.*typedef\s*)/, "") - type.gsub!(/\s*;\s*$/, "") - - parts = type.split(/\s+/) - def_type = parts.join(" ") - - # GCC does mapping with __attribute__ stuf, also see - # http://hal.cs.berkeley.edu/cil/cil016.html section 16.2.7. Problem - # with this is that the __attribute__ stuff can either occur before or - # after the new type that is defined... - if type =~ /__attribute__/ - if parts.last =~ /__QI__|__HI__|__SI__|__DI__|__word__/ - - # In this case, the new type is BEFORE __attribute__ we need to - # find the final_type as the type before the part that starts with - # __attribute__ - final_type = "" - parts.each do |p| - break if p =~ /__attribute__/ - final_type = p - end - else - final_type = parts.pop - end - - def_type = case type - when /__QI__/ then "char" - when /__HI__/ then "short" - when /__SI__/ then "int" - when /__DI__/ then "long long" - when /__word__/ then "long" - else "int" - end - - def_type = "unsigned #{def_type}" if type =~ /unsigned/ - else - final_type = parts.pop - def_type = parts.join(" ") - end - - if type = TYPE_MAP[def_type] - code << "rbx.platform.typedef.#{final_type} = #{type}" - TYPE_MAP[final_type] = TYPE_MAP[def_type] - else - # Fallback to an ordinary pointer if we don't know the type - if def_type =~ /\*/ - code << "rbx.platform.typedef.#{final_type} = pointer" - TYPE_MAP[final_type] = :pointer - end - end - end - - code.sort.join("\n") - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/types.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/types.rb deleted file mode 100644 index 6f3ee4bc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/types.rb +++ /dev/null @@ -1,222 +0,0 @@ -# -# Copyright (C) 2008-2010 Wayne Meissner -# Copyright (c) 2007, 2008 Evan Phoenix -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -# see {file:README} -module FFI - - # Unless custom_typedefs already defined in the C-ext? - unless defined?(custom_typedefs) - # Truffleruby and JRuby don't support Ractor so far. - # So they don't need separation between builtin and custom types. - def self.custom_typedefs - TypeDefs - end - writable_typemap = true - end - - class << self - - private :custom_typedefs - - # @param [Type, DataConverter, Symbol] old type definition used by {FFI.find_type} - # @param [Symbol] add new type definition's name to add - # @return [Type] - # Add a definition type to type definitions. - # - # The type definition is local per Ractor. - def typedef(old, add) - tm = custom_typedefs - tm[add] = find_type(old) - end - - # (see FFI.typedef) - def add_typedef(old, add) - typedef old, add - end - - private def __typedef(old, add) - TypeDefs[add] = find_type(old, TypeDefs) - end - - # @param [Type, DataConverter, Symbol] name - # @param [Hash] type_map if nil, {FFI::TypeDefs} is used - # @return [Type] - # Find a type in +type_map+ ({FFI::TypeDefs}, by default) from - # a type objet, a type name (symbol). If +name+ is a {DataConverter}, - # a new {Type::Mapped} is created. - def find_type(name, type_map = nil) - if name.is_a?(Type) - name - - elsif type_map&.has_key?(name) - type_map[name] - - elsif (tm=custom_typedefs).has_key?(name) - tm[name] - - elsif TypeDefs.has_key?(name) - TypeDefs[name] - - elsif name.is_a?(DataConverter) - # Add a typedef so next time the converter is used, it hits the cache - tm = (type_map || custom_typedefs) - tm[name] = Type::Mapped.new(name) - else - raise TypeError, "unable to resolve type '#{name}'" - end - end - - # @param type +type+ is an instance of class accepted by {FFI.find_type} - # @return [Integer] - # Get +type+ size, in bytes. - def type_size(type) - find_type(type).size - end - end - - # List of type definitions - TypeDefs.merge!({ - # The C void type; only useful for function return types - :void => Type::VOID, - - # C boolean type - :bool => Type::BOOL, - - # C nul-terminated string - :string => Type::STRING, - - # C signed char - :char => Type::CHAR, - # C unsigned char - :uchar => Type::UCHAR, - - # C signed short - :short => Type::SHORT, - # C unsigned short - :ushort => Type::USHORT, - - # C signed int - :int => Type::INT, - # C unsigned int - :uint => Type::UINT, - - # C signed long - :long => Type::LONG, - - # C unsigned long - :ulong => Type::ULONG, - - # C signed long long integer - :long_long => Type::LONG_LONG, - - # C unsigned long long integer - :ulong_long => Type::ULONG_LONG, - - # C single precision float - :float => Type::FLOAT, - - # C double precision float - :double => Type::DOUBLE, - - # C long double - :long_double => Type::LONGDOUBLE, - - # Native memory address - :pointer => Type::POINTER, - - # 8 bit signed integer - :int8 => Type::INT8, - # 8 bit unsigned integer - :uint8 => Type::UINT8, - - # 16 bit signed integer - :int16 => Type::INT16, - # 16 bit unsigned integer - :uint16 => Type::UINT16, - - # 32 bit signed integer - :int32 => Type::INT32, - # 32 bit unsigned integer - :uint32 => Type::UINT32, - - # 64 bit signed integer - :int64 => Type::INT64, - # 64 bit unsigned integer - :uint64 => Type::UINT64, - - :buffer_in => Type::BUFFER_IN, - :buffer_out => Type::BUFFER_OUT, - :buffer_inout => Type::BUFFER_INOUT, - - # Used in function prototypes to indicate the arguments are variadic - :varargs => Type::VARARGS, - }) - - # This will convert a pointer to a Ruby string (just like `:string`), but - # also allow to work with the pointer itself. This is useful when you want - # a Ruby string already containing a copy of the data, but also the pointer - # to the data for you to do something with it, like freeing it, in case the - # library handed the memory off to the caller (Ruby-FFI). - # - # It's {typedef}'d as +:strptr+. - class StrPtrConverter - extend DataConverter - native_type Type::POINTER - - # @param [Pointer] val - # @param ctx not used - # @return [Array(String, Pointer)] - # Returns a [ String, Pointer ] tuple so the C memory for the string can be freed - def self.from_native(val, ctx) - [ val.null? ? nil : val.get_string(0), val ] - end - end - - __typedef(StrPtrConverter, :strptr) - - # Load all the platform dependent types - begin - File.open(File.join(Platform::CONF_DIR, 'types.conf'), "r") do |f| - prefix = "rbx.platform.typedef." - f.each_line { |line| - if line.index(prefix) == 0 - new_type, orig_type = line.chomp.slice(prefix.length..-1).split(/\s*=\s*/) - __typedef(orig_type.to_sym, new_type.to_sym) - end - } - end - __typedef :pointer, :caddr_t - rescue Errno::ENOENT - end - - FFI.make_shareable(TypeDefs) unless writable_typemap -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/union.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/union.rb deleted file mode 100644 index 38414ab9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/union.rb +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (C) 2009 Andrea Fazzi -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -require 'ffi/struct' - -module FFI - - class Union < FFI::Struct - def self.builder - b = StructLayoutBuilder.new - b.union = true - b - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/variadic.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/variadic.rb deleted file mode 100644 index ee334091..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/variadic.rb +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright (C) 2008, 2009 Wayne Meissner -# Copyright (C) 2009 Luc Heinrich -# -# This file is part of ruby-ffi. -# -# 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 Ruby FFI project 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. -# - -module FFI - class VariadicInvoker - def call(*args, &block) - param_types = Array.new(@fixed) - param_values = Array.new - @fixed.each_with_index do |t, i| - param_values << args[i] - end - i = @fixed.length - while i < args.length - param_types << FFI.find_type(args[i], @type_map) - param_values << args[i + 1] - i += 2 - end - invoke(param_types, param_values, &block) - end - - # - # Attach the invoker to module +mod+ as +mname+ - # - def attach(mod, mname) - invoker = self - params = "*args" - call = "call" - mname = mname.to_sym - mod.module_eval <<-code, __FILE__, __LINE__ - @ffi_functions = {} unless defined?(@ffi_functions) - @ffi_functions[#{mname.inspect}] = invoker - - def self.#{mname}(#{params}) - @ffi_functions[#{mname.inspect}].#{call}(#{params}) - end - - define_method(#{mname.inspect}, &method(#{mname.inspect})) - code - invoker - end - - # Retrieve Array of parameter types - # - # This method returns an Array of FFI types accepted as function parameters. - # - # @return [Array] - def param_types - [*@fixed, Type::Builtin::VARARGS] - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/version.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/version.rb deleted file mode 100644 index a81fb4ca..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module FFI - VERSION = '1.17.2' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/rakelib/ffi_gem_helper.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/rakelib/ffi_gem_helper.rb deleted file mode 100644 index 74be1311..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/rakelib/ffi_gem_helper.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'bundler' -require 'bundler/gem_helper' - -class FfiGemHelper < Bundler::GemHelper - attr_accessor :cross_platforms - - def install - super - - task "release:guard_clean" => ["release:update_history"] - - task "release:update_history" do - update_history - end - - task "release:rubygem_push" => ["gem:native", "gem:java"] - end - - def hfile - "CHANGELOG.md" - end - - def headline - '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)' - end - - def reldate - Time.now.strftime("%Y-%m-%d") - end - - def update_history - hin = File.read(hfile) - hout = hin.sub(/#{headline}/) do - raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s - $1 + $2 + $3 + reldate + $5 - end - if hout != hin - Bundler.ui.confirm "Updating #{hfile} for release." - File.write(hfile, hout) - Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}" - end - end - - def tag_version - Bundler.ui.confirm "Tag release with annotation:" - m = File.read(hfile).match(/(?#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}") - Bundler.ui.info(m[:annotation].gsub(/^/, " ")) - IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd| - fd.write m[:annotation] - end - yield if block_given? - rescue - Bundler.ui.error "Untagging #{version_tag} due to error." - sh_with_code "git tag -d #{version_tag}" - raise - end - - def rubygem_push(path) - cross_platforms.each do |ruby_platform| - super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem")) - end - super(path.gsub(/\.gem\z/, "-java.gem")) - super(path) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/getlogin.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/getlogin.rb deleted file mode 100644 index 6713021d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/getlogin.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'ffi' - -module Foo - extend FFI::Library - ffi_lib FFI::Library::LIBC - attach_function :getlogin, [ ], :string -end -puts "getlogin=#{Foo.getlogin}" diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/getpid.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/getpid.rb deleted file mode 100644 index 1720635b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/getpid.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'ffi' - -module Foo - extend FFI::Library - ffi_lib FFI::Library::LIBC - attach_function :getpid, [ ], :int -end -puts "My pid=#{Foo.getpid}" diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/gettimeofday.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/gettimeofday.rb deleted file mode 100644 index 864bbb62..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/gettimeofday.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'ffi' -require 'rbconfig' - -class Timeval < FFI::Struct - layout tv_sec: :ulong, tv_usec: :ulong -end -module LibC - extend FFI::Library - if FFI::Platform.windows? - ffi_lib RbConfig::CONFIG["LIBRUBY_SO"] - else - ffi_lib FFI::Library::LIBC - end - attach_function :gettimeofday, [ :pointer, :pointer ], :int -end -t = Timeval.new -LibC.gettimeofday(t.pointer, nil) -puts "t.tv_sec=#{t[:tv_sec]} t.tv_usec=#{t[:tv_usec]}" diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/hello.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/hello.rb deleted file mode 100644 index f2ccf377..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/hello.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'ffi' - -module Foo - extend FFI::Library - ffi_lib FFI::Library::LIBC - attach_function("cputs", "puts", [ :string ], :int) -end -Foo.cputs("Hello, World via libc puts using FFI on MRI ruby") diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/hello_ractor.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/hello_ractor.rb deleted file mode 100644 index 904fe854..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/hello_ractor.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'ffi' - -module Foo - extend FFI::Library - ffi_lib FFI::Library::LIBC - attach_function("cputs", "puts", [ :string ], :int) - freeze -end -Ractor.new do - Foo.cputs("Hello, World via libc puts using FFI in a Ractor") -end.take diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/inotify.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/inotify.rb deleted file mode 100644 index 018d78cf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/inotify.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'ffi' - -module Inotify - extend FFI::Library - ffi_lib FFI::Library::LIBC - class Event < FFI::Struct - layout \ - :wd, :int, - :mask, :uint, - :cookie, :uint, - :len, :uint - end - attach_function :init, :inotify_init, [ ], :int - attach_function :add_watch, :inotify_add_watch, [ :int, :string, :uint ], :int - attach_function :rm_watch, :inotify_rm_watch, [ :int, :uint ], :int - attach_function :read, [ :int, :buffer_out, :uint ], :int - IN_ACCESS=0x00000001 - IN_MODIFY=0x00000002 - IN_ATTRIB=0x00000004 - IN_CLOSE_WRITE=0x00000008 - IN_CLOSE_NOWRITE=0x00000010 - IN_CLOSE=(IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) - IN_OPEN=0x00000020 - IN_MOVED_FROM=0x00000040 - IN_MOVED_TO=0x00000080 - IN_MOVE= (IN_MOVED_FROM | IN_MOVED_TO) - IN_CREATE=0x00000100 - IN_DELETE=0x00000200 - IN_DELETE_SELF=0x00000400 - IN_MOVE_SELF=0x00000800 - # Events sent by the kernel. - IN_UNMOUNT=0x00002000 - IN_Q_OVERFLOW=0x00004000 - IN_IGNORED=0x00008000 - IN_ONLYDIR=0x01000000 - IN_DONT_FOLLOW=0x02000000 - IN_MASK_ADD=0x20000000 - IN_ISDIR=0x40000000 - IN_ONESHOT=0x80000000 - IN_ALL_EVENTS=(IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ - | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ - | IN_MOVED_TO | IN_CREATE | IN_DELETE \ - | IN_DELETE_SELF | IN_MOVE_SELF) - -end -if $0 == __FILE__ - fd = Inotify.init - puts "fd=#{fd}" - wd = Inotify.add_watch(fd, "/tmp/", Inotify::IN_ALL_EVENTS) - fp = FFI::IO.for_fd(fd) - puts "wfp=#{fp}" - while true - buf = FFI::Buffer.alloc_out(Inotify::Event.size + 4096, 1, false) - ev = Inotify::Event.new buf - ready = IO.select([ fp ], nil, nil, nil) - n = Inotify.read(fd, buf, buf.total) - puts "Read #{n} bytes from inotify fd" - puts "event.wd=#{ev[:wd]} mask=#{ev[:mask]} len=#{ev[:len]} name=#{ev[:len] > 0 ? buf.get_string(16) : 'unknown'}" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/pty.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/pty.rb deleted file mode 100644 index 8b6b885f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/pty.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'ffi' - -module PTY - private - module LibC - extend FFI::Library - ffi_lib FFI::Library::LIBC - attach_function :forkpty, [ :buffer_out, :buffer_out, :buffer_in, :buffer_in ], :int - attach_function :openpty, [ :buffer_out, :buffer_out, :buffer_out, :buffer_in, :buffer_in ], :int - attach_function :login_tty, [ :int ], :int - attach_function :close, [ :int ], :int - attach_function :strerror, [ :int ], :string - attach_function :fork, [], :int - attach_function :execv, [ :string, :buffer_in ], :int - attach_function :execvp, [ :string, :buffer_in ], :int - attach_function :dup2, [ :int, :int ], :int - attach_function :dup, [ :int ], :int - end - Buffer = FFI::Buffer - def self.build_args(args) - cmd = args.shift - cmd_args = args.map do |arg| - MemoryPointer.from_string(arg) - end - exec_args = MemoryPointer.new(:pointer, 1 + cmd_args.length + 1) - exec_cmd = MemoryPointer.from_string(cmd) - exec_args[0].put_pointer(0, exec_cmd) - cmd_args.each_with_index do |arg, i| - exec_args[i + 1].put_pointer(0, arg) - end - [ cmd, exec_args ] - end - public - def self.getpty(*args) - mfdp = Buffer.new :int - name = Buffer.new 1024 - # - # All the execv setup is done in the parent, since doing anything other than - # execv in the child after fork is really flakey - # - exec_cmd, exec_args = build_args(args) - pid = LibC.forkpty(mfdp, name, nil, nil) - raise "forkpty failed: #{LibC.strerror(FFI.errno)}" if pid < 0 - if pid == 0 - LibC.execvp(exec_cmd, exec_args) - exit 1 - end - masterfd = mfdp.get_int(0) - rfp = FFI::IO.for_fd(masterfd, "r") - wfp = FFI::IO.for_fd(LibC.dup(masterfd), "w") - if block_given? - yield rfp, wfp, pid - rfp.close unless rfp.closed? - wfp.close unless wfp.closed? - else - [ rfp, wfp, pid ] - end - end - def self.spawn(*args, &block) - self.getpty("/bin/sh", "-c", args[0], &block) - end -end -module LibC - extend FFI::Library - attach_function :close, [ :int ], :int - attach_function :write, [ :int, :buffer_in, :ulong ], :long - attach_function :read, [ :int, :buffer_out, :ulong ], :long -end -PTY.getpty("/bin/ls", "-alR", "/") { |rfd, wfd, pid| -#PTY.spawn("ls -laR /") { |rfd, wfd, pid| - puts "child pid=#{pid}" - while !rfd.eof? && (buf = rfd.gets) - puts "child: '#{buf.strip}'" - end -} diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/qsort.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/qsort.rb deleted file mode 100644 index 58622c16..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/qsort.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'ffi' - -module LibC - extend FFI::Library - ffi_lib FFI::Library::LIBC - callback :qsort_cmp, [ :pointer, :pointer ], :int - attach_function :qsort, [ :pointer, :ulong, :ulong, :qsort_cmp ], :int -end - -p = FFI::MemoryPointer.new(:int, 2) -p.put_array_of_int32(0, [ 2, 1 ]) -puts "ptr=#{p.inspect}" -puts "Before qsort #{p.get_array_of_int32(0, 2).join(', ')}" -LibC.qsort(p, 2, 4) do |p1, p2| - i1 = p1.get_int32(0) - i2 = p2.get_int32(0) - puts "In block: comparing #{i1} and #{i2}" - i1 < i2 ? -1 : i1 > i2 ? 1 : 0 -end -puts "After qsort #{p.get_array_of_int32(0, 2).join(', ')}" diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/qsort_ractor.rb b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/qsort_ractor.rb deleted file mode 100644 index db085de2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/samples/qsort_ractor.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'ffi' - -module LibC - extend FFI::Library - ffi_lib FFI::Library::LIBC - callback :qsort_cmp, [ :pointer, :pointer ], :int - attach_function :qsort, [ :pointer, :ulong, :ulong, :qsort_cmp ], :int - - freeze # Freeze the module variables, so that it can be shared across ractors. -end - -p = FFI::MemoryPointer.new(:int, 3) -p.put_array_of_int32(0, [ 2, 3, 1 ]) # Write some unsorted data into the memory -# Ractor.make_shareable(p) # freeze the pointer to be shared between ractors instead of copied -puts "main -ptr=#{p.inspect}" -res = Ractor.new(p) do |p| - puts "ractor-ptr=#{p.inspect}" - puts "Before qsort #{p.get_array_of_int32(0, 3).join(', ')}" - LibC.qsort(p, 3, 4) do |p1, p2| - i1 = p1.get_int32(0) - i2 = p2.get_int32(0) - puts "In block: comparing #{i1} and #{i2}" - i1 < i2 ? -1 : i1 > i2 ? 1 : 0 - end - puts "After qsort #{p.get_array_of_int32(0, 3).join(', ')}" -end.take - -puts "After ractor termination #{p.get_array_of_int32(0, 3).join(', ')}" diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi.rbs deleted file mode 100644 index c40ad6f2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi.rbs +++ /dev/null @@ -1,26 +0,0 @@ -module FFI - type ffi_type = Type | Symbol - type ffi_auto_type = ffi_type | DataConverter[untyped, untyped, untyped] - type type_map = Hash[Symbol | DataConverter[untyped, untyped, untyped], Type] - - class CallbackInfo = FunctionType - class FunctionInfo = FunctionType - class NativeLibrary = DynamicLibrary - - VERSION: String - TypeDefs: type_map - - type current_process = Object - CURRENT_PROCESS: current_process - USE_THIS_PROCESS_AS_LIBRARY: current_process - - private def self.custom_typedefs: () -> type_map - def self.errno: () -> Integer - def self.errno=: (Integer) -> nil - def self.find_type: (ffi_auto_type name, ?type_map? type_map) -> Type - def self.make_shareable: [T] (T obj) -> T - def self.map_library_name: (_ToS lib) -> String - def self.type_size: (ffi_auto_type type) -> Integer - def self.typedef: (ffi_auto_type old, Symbol add) -> Type - alias self.add_typedef self.typedef -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/abstract_memory.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/abstract_memory.rbs deleted file mode 100644 index 9678ad01..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/abstract_memory.rbs +++ /dev/null @@ -1,165 +0,0 @@ -module FFI - class AbstractMemory - interface _Size - def size: () -> Integer - end - include _Size - type type_size = Integer | _Size | Symbol - - type order_out = :big | :little - type order_in = order_out | :network - - def []: (Integer idx) -> instance - def clear: () -> self - def freeze: ... - def get: (ffi_type type, Integer offset) -> top - def put: (ffi_type type, Integer offset, top value) -> nil - def size_limit?: () -> bool - def type_size: () -> Integer - alias total size - - def get_int8: (Integer offset) -> Integer - def get_int16: (Integer offset) -> Integer - def get_int32: (Integer offset) -> Integer - def get_int64: (Integer offset) -> Integer - def get_uint8: (Integer offset) -> Integer - def get_uint16: (Integer offset) -> Integer - def get_uint32: (Integer offset) -> Integer - def get_uint64: (Integer offset) -> Integer - def get_char: (Integer offset) -> Integer - def get_short: (Integer offset) -> Integer - def get_int: (Integer offset) -> Integer - def get_long_long: (Integer offset) -> Integer - def get_float32: (Integer offset) -> Float - def get_float64: (Integer offset) -> Float - def get_pointer: (Integer offset) -> Pointer - def get_bytes: (Integer offset, Integer length) -> String - def get_string: (Integer offset, ?Integer? length) -> String - alias get_float get_float32 - alias get_double get_float64 - - def put_int8: (Integer offset, int value) -> self - def put_int16: (Integer offset, int value) -> self - def put_int32: (Integer offset, int value) -> self - def put_int64: (Integer offset, int value) -> self - def put_uint8: (Integer offset, int value) -> self - def put_uint16: (Integer offset, int value) -> self - def put_uint32: (Integer offset, int value) -> self - def put_uint64: (Integer offset, int value) -> self - def put_char: (Integer offset, int value) -> self - def put_short: (Integer offset, int value) -> self - def put_int: (Integer offset, int value) -> self - def put_long_long: (Integer offset, int value) -> self - def put_float32: (Integer offset, Numeric value) -> self - def put_float64: (Integer offset, Numeric value) -> self - def put_pointer: (Integer offset, pointer value) -> self - def put_bytes: (Integer offset, String str, ?Integer index, ?Integer? length) -> self - def put_string: (Integer offset, String value) -> self - alias put_float put_float32 - alias put_double put_float64 - - def read_int8: () -> Integer - def read_int16: () -> Integer - def read_int32: () -> Integer - def read_int64: () -> Integer - def read_uint8: () -> Integer - def read_uint16: () -> Integer - def read_uint32: () -> Integer - def read_uint64: () -> Integer - def read_char: () -> Integer - def read_short: () -> Integer - def read_int: () -> Integer - def read_long_long: () -> Integer - def read_float: () -> Float - def read_double: () -> Float - def read_pointer: () -> Pointer - def read_bytes: (Integer length) -> String - - def write_int8: (int value) -> self - def write_int16: (int value) -> self - def write_int32: (int value) -> self - def write_int64: (int value) -> self - def write_uint8: (int value) -> self - def write_uint16: (int value) -> self - def write_uint32: (int value) -> self - def write_uint64: (int value) -> self - def write_char: (int value) -> self - def write_short: (int value) -> self - def write_int: (int value) -> self - def write_long_long: (int value) -> self - def write_float: (Numeric value) -> self - def write_double: (Numeric value) -> self - def write_pointer: (pointer value) -> self - def write_bytes: (String str, ?Integer index, ?Integer? length) -> self - - def get_array_of_int8: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_int16: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_int32: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_int64: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_uint8: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_uint16: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_uint32: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_uint64: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_char: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_short: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_int: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_long_long: (Integer offset, Integer length) -> Array[Integer] - def get_array_of_float32: (Integer offset, Integer length) -> Array[Float] - def get_array_of_float64: (Integer offset, Integer length) -> Array[Float] - def get_array_of_pointer: (Integer offset, Integer length) -> Array[Pointer] - def get_array_of_string: (Integer offset, ?Integer? count) -> Array[String?] - alias get_array_of_float get_array_of_float32 - alias get_array_of_double get_array_of_float64 - - def put_array_of_int8: (Integer offset, Array[int] ary) -> self - def put_array_of_int16: (Integer offset, Array[int] ary) -> self - def put_array_of_int32: (Integer offset, Array[int] ary) -> self - def put_array_of_int64: (Integer offset, Array[int] ary) -> self - def put_array_of_uint8: (Integer offset, Array[int] ary) -> self - def put_array_of_uint16: (Integer offset, Array[int] ary) -> self - def put_array_of_uint32: (Integer offset, Array[int] ary) -> self - def put_array_of_uint64: (Integer offset, Array[int] ary) -> self - def put_array_of_char: (Integer offset, Array[int] ary) -> self - def put_array_of_short: (Integer offset, Array[int] ary) -> self - def put_array_of_int: (Integer offset, Array[int] ary) -> self - def put_array_of_long_long: (Integer offset, Array[int] ary) -> self - def put_array_of_float32: (Integer offset, Array[Numeric] ary) -> self - def put_array_of_float64: (Integer offset, Array[Numeric] ary) -> self - def put_array_of_pointer: (Integer offset, Array[pointer] ary) -> self - alias put_array_of_float put_array_of_float32 - alias put_array_of_double put_array_of_float64 - - def read_array_of_int8: (Integer length) -> Array[Integer] - def read_array_of_int16: (Integer length) -> Array[Integer] - def read_array_of_int32: (Integer length) -> Array[Integer] - def read_array_of_int64: (Integer length) -> Array[Integer] - def read_array_of_uint8: (Integer length) -> Array[Integer] - def read_array_of_uint16: (Integer length) -> Array[Integer] - def read_array_of_uint32: (Integer length) -> Array[Integer] - def read_array_of_uint64: (Integer length) -> Array[Integer] - def read_array_of_char: (Integer length) -> Array[Integer] - def read_array_of_short: (Integer length) -> Array[Integer] - def read_array_of_int: (Integer length) -> Array[Integer] - def read_array_of_long_long: (Integer length) -> Array[Integer] - def read_array_of_float: (Integer length) -> Array[Float] - def read_array_of_double: (Integer length) -> Array[Float] - def read_array_of_pointer: (Integer length) -> Array[Pointer] - def read_array_of_string: (?Integer? count) -> Array[String?] - - def write_array_of_int8: (Array[int] ary) -> self - def write_array_of_int16: (Array[int] ary) -> self - def write_array_of_int32: (Array[int] ary) -> self - def write_array_of_int64: (Array[int] ary) -> self - def write_array_of_uint8: (Array[int] ary) -> self - def write_array_of_uint16: (Array[int] ary) -> self - def write_array_of_uint32: (Array[int] ary) -> self - def write_array_of_uint64: (Array[int] ary) -> self - def write_array_of_char: (Array[int] ary) -> self - def write_array_of_short: (Array[int] ary) -> self - def write_array_of_int: (Array[int] ary) -> self - def write_array_of_long_long: (Array[int] ary) -> self - def write_array_of_float: (Array[Numeric] ary) -> self - def write_array_of_double: (Array[Numeric] ary) -> self - def write_array_of_pointer: (Array[pointer] ary) -> self - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/auto_pointer.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/auto_pointer.rbs deleted file mode 100644 index cd289c6f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/auto_pointer.rbs +++ /dev/null @@ -1,26 +0,0 @@ -module FFI - class AutoPointer < Pointer - class Releaser - attr_accessor autorelease: boolish - interface _Proc[P < Pointer] - def call: (P) -> void - end - def initialize: [P < Pointer] (P ptr, _Proc[P] proc) -> void - - def call: (*untyped) -> void - def free: () -> nil - def release: (Pointer ptr) -> void - end - - def initialize: (Pointer pointer, Method | ^(self) -> void | Releaser::_Proc[self] callable) -> self - | (Pointer pointer) -> self # where class < `def self.release: (instance pointer) -> void` - - extend DataConverter[Pointer, instance, nil] - def self.from_native: ... - def self.native_type: () -> Type::Builtin - - def autorelease?: ... - def autorelease=: ... - def free: () -> nil - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/buffer.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/buffer.rbs deleted file mode 100644 index 68cde6bc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/buffer.rbs +++ /dev/null @@ -1,18 +0,0 @@ -module FFI - class Buffer < AbstractMemory - def initialize: (AbstractMemory::type_size, ?Integer count, boolish clear) -> self - alias self.alloc_inout self.new - alias self.new_inout self.alloc_inout - alias self.alloc_in self.alloc_inout - alias self.new_in self.alloc_in - alias self.alloc_out self.alloc_inout - alias self.new_out self.alloc_out - - def +: (Integer) -> Buffer - def inspect: ... - def order: () -> AbstractMemory::order_out - | (AbstractMemory::order_in order) -> Buffer - | (untyped order) -> (self | Buffer) - def slice: (Integer offset, Integer length) -> Buffer - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/data_converter.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/data_converter.rbs deleted file mode 100644 index a0e2e39f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/data_converter.rbs +++ /dev/null @@ -1,10 +0,0 @@ -module FFI - interface _DataConverter[N, R, in C] - def from_native: (N value, C ctx) -> R - def native_type: (?ffi_auto_type? type) -> Type - def to_native: (R value, C ctx) -> N - end - module DataConverter[N, R, in C] - include _DataConverter[N, R, C] - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/dynamic_library.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/dynamic_library.rbs deleted file mode 100644 index 48031bfa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/dynamic_library.rbs +++ /dev/null @@ -1,9 +0,0 @@ -module FFI - class DynamicLibrary - # TODO - - class Symbol < Pointer - # TODO - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/enum.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/enum.rbs deleted file mode 100644 index 3cae0b2d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/enum.rbs +++ /dev/null @@ -1,38 +0,0 @@ -module FFI - class Enums - def initialize: () -> void - - def <<: (Enum enum) -> void - def __map_symbol: (Symbol symbol) -> Integer? - def find: (Symbol query) -> Enum - end - - class Enum - include DataConverter[Integer, Symbol | Integer, untyped] - - attr_reader native_type: Type - attr_reader tag: Symbol? - def initialize: (Enumerable[Symbol | Integer], ?Symbol? tag, *untyped) -> void - | (Type native_type, Enumerable[Symbol | Integer], ?Symbol? tag, *untyped) -> void - - def []: (Symbol query) -> Integer? - | (Integer query) -> Symbol? - def symbol_map: () -> Hash[Symbol, Integer] - alias to_h symbol_map - alias to_hash symbol_map - def symbols: () -> Array[Symbol] - def to_native: (Symbol | int value, untyped ctx) -> Integer - end - - class Bitmask < Enum - def initialize: ... - - def []: (*Symbol query) -> Integer - | (Array[Symbol] query) -> Integer - | (*Integer query) -> Array[Symbol] - | (Array[Integer] query) -> Array[Symbol] - def from_native: (Integer, untyped ctx) -> Array[Symbol | Integer] - def to_native: (Array[Symbol | int] value, untyped ctx) -> Integer - | ... - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/function.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/function.rbs deleted file mode 100644 index 94a23c2d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/function.rbs +++ /dev/null @@ -1,39 +0,0 @@ -module FFI - interface _Function - # TODO: leads to a endless recursion when used with -rrbs/test/setup - # def attach: (Module mod, String name) -> self - def call: (*untyped args) -> untyped - def param_types: () -> Array[Type] - def return_type: () -> Type - end - - class Function < Pointer - include _Function - # ?blocking: boolish?, ?convention: Library::convention?, ?enums: Enums? - def initialize: - ( - ffi_type return_type, Array[ffi_type] param_types, - ?Hash[Symbol, untyped] options - ) { (*untyped) -> untyped } -> self - | ( - ffi_type return_type, Array[ffi_type] param_types, Proc | Pointer proc, - ?Hash[Symbol, untyped] options - ) -> self - - def autorelease?: ... - alias autorelease autorelease? - def autorelease=: ... - def free: () -> self - end - - class VariadicInvoker - include _Function - def initialize: - ( - Pointer function, Array[ffi_type] parameter_types, ffi_type return_type, - Hash[Symbol, untyped] options #TODO - ) -> void - - def invoke: (Array[Type] parameter_types, Array[untyped] parameter_values) -> untyped - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/library.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/library.rbs deleted file mode 100644 index e823b6d2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/library.rbs +++ /dev/null @@ -1,42 +0,0 @@ -module FFI - module Library - type convention = :default | :stdcall - type ffi_lib_flag = :global | :local | :lazy | :now - type ffi_lib_type = ffi_auto_type | singleton(Struct) - - CURRENT_PROCESS: current_process - LIBC: String - FlagsMap: Hash[ffi_lib_flag, Integer] - - def self.extended: ... - - def attach_function: ( _ToS func, Array[ffi_lib_type] args, ffi_lib_type? returns, ?blocking: boolish, ?convention: convention, ?enums: Enums, ?type_map: type_map) -> (Function | VariadicInvoker) - | (_ToS name, _ToS func, Array[ffi_lib_type] args, ?ffi_lib_type? returns, ?blocking: boolish, ?convention: convention, ?enums: Enums, ?type_map: type_map) -> (Function | VariadicInvoker) - def attach_variable: (?_ToS mname, _ToS cname, ffi_lib_type type) -> DynamicLibrary::Symbol - def attached_functions: () -> Hash[Symbol, Function | VariadicInvoker] - def attached_variables: () -> Hash[Symbol, Type | singleton(Struct)] - - def bitmask: (?Type native_type, Symbol name, Array[Symbol | Integer] values) -> Bitmask - | (?Type native_type, *Symbol | Integer args) -> Bitmask - | (?Type native_type, Array[Symbol | Integer] values) -> Bitmask - def enum: (?Type native_type, Symbol name, Array[Symbol | Integer] values) -> Enum - | (?Type native_type, *Symbol | Integer args) -> Enum - | (?Type native_type, Array[Symbol | Integer] values) -> Enum - def enum_type: (Symbol name) -> Enum? - def enum_for: (Symbol name) -> Integer? - - def callback: (?Symbol name, Array[ffi_lib_type] params, ffi_lib_type ret) -> CallbackInfo - def ffi_convention: (?convention? convention) -> convention - def ffi_lib: (*_ToS names) -> Array[DynamicLibrary] - def ffi_lib_flags: (*ffi_lib_flag flags) -> Integer - def ffi_libraries: () -> Array[DynamicLibrary] - def find_type: (ffi_lib_type t) -> Type - def freeze: () -> void - def function_names: (_ToS name, Array[Type | singleton(Struct)] arg_types) -> Array[String] - def typedef: [T < Type, N, R, C] (T old, Symbol | DataConverter[N, R, C] add, ?untyped) -> T - | (Symbol old, Symbol add, ?untyped) -> (Type | Enum) - | [X < DataConverter[N, R, C], N, R, C] (X old, Symbol add, ?untyped) -> Type::Mapped[X, N, R, C] - | (:enum old, Array[Symbol | Integer] add, ?untyped) -> Enum - | (:enum old, Symbol | Type add, Array[Symbol | Integer] info) -> Enum - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/native_type.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/native_type.rbs deleted file mode 100644 index c9617a03..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/native_type.rbs +++ /dev/null @@ -1,86 +0,0 @@ -module FFI - class Type - INT8: Builtin - SCHAR: Builtin - CHAR: Builtin - UINT8: Builtin - UCHAR: Builtin - INT16: Builtin - SHORT: Builtin - SSHORT: Builtin - UINT16: Builtin - USHORT: Builtin - INT32: Builtin - INT: Builtin - SINT: Builtin - UINT32: Builtin - UINT: Builtin - INT64: Builtin - LONG_LONG: Builtin - SLONG_LONG: Builtin - UINT64: Builtin - ULONG_LONG: Builtin - LONG: Builtin - SLONG: Builtin - ULONG: Builtin - FLOAT32: Builtin - FLOAT: Builtin - FLOAT64: Builtin - DOUBLE: Builtin - LONGDOUBLE: Builtin - POINTER: Builtin - BOOL: Builtin - STRING: Builtin - BUFFER_IN: Builtin - BUFFER_OUT: Builtin - BUFFER_INOUT: Builtin - VARARGS: Builtin - VOID: Builtin - end - - module NativeType - INT8: Type::Builtin - UINT8: Type::Builtin - INT16: Type::Builtin - UINT16: Type::Builtin - INT32: Type::Builtin - UINT32: Type::Builtin - INT64: Type::Builtin - UINT64: Type::Builtin - LONG: Type::Builtin - ULONG: Type::Builtin - FLOAT32: Type::Builtin - FLOAT64: Type::Builtin - LONGDOUBLE: Type::Builtin - POINTER: Type::Builtin - BOOL: Type::Builtin - STRING: Type::Builtin - BUFFER_IN: Type::Builtin - BUFFER_OUT: Type::Builtin - BUFFER_INOUT: Type::Builtin - VARARGS: Type::Builtin - VOID: Type::Builtin - end - - TYPE_INT8: Type::Builtin - TYPE_UINT8: Type::Builtin - TYPE_INT16: Type::Builtin - TYPE_UINT16: Type::Builtin - TYPE_INT32: Type::Builtin - TYPE_UINT32: Type::Builtin - TYPE_INT64: Type::Builtin - TYPE_UINT64: Type::Builtin - TYPE_LONG: Type::Builtin - TYPE_ULONG: Type::Builtin - TYPE_FLOAT32: Type::Builtin - TYPE_FLOAT64: Type::Builtin - TYPE_LONGDOUBLE: Type::Builtin - TYPE_POINTER: Type::Builtin - TYPE_BOOL: Type::Builtin - TYPE_STRING: Type::Builtin - TYPE_BUFFER_IN: Type::Builtin - TYPE_BUFFER_OUT: Type::Builtin - TYPE_BUFFER_INOUT: Type::Builtin - TYPE_VARARGS: Type::Builtin - TYPE_VOID: Type::Builtin -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/pointer.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/pointer.rbs deleted file mode 100644 index fd4e9b89..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/pointer.rbs +++ /dev/null @@ -1,42 +0,0 @@ -module FFI - type pointer = Pointer::_ToPtr? | Integer - class Pointer < AbstractMemory - interface _ToPtr - def to_ptr: () -> Pointer - end - include _ToPtr - - SIZE: Integer - NULL: Pointer - def self.size: () -> Integer - - def initialize: (?AbstractMemory::type_size type, (Pointer | Integer) address) -> void - def +: (Integer offset) -> Pointer - def ==: (Pointer? other) -> bool - def address: () -> Integer - alias to_i address - def autorelease?: () -> bool - def autorelease=: (boolish autorelease) -> boolish - def free: () -> self - def inspect: ... - def null?: () -> bool - def order: () -> AbstractMemory::order_out - | (AbstractMemory::order_in) -> Pointer - def read: (ffi_type type) -> top - def read_array_of_type: (ffi_auto_type type, Symbol reader, Integer length) -> Array[top] - def read_string: (?Integer? len) -> String - def read_string_length: (Integer len) -> String - def read_string_to_null: () -> String - def slice: (Integer offset, Integer length) -> Pointer - def type_size: () -> Integer - def write: (ffi_type type, top value) -> nil - def write_array_of_type: (ffi_auto_type type, Symbol writer, Array[top]) -> self - def write_string: (String str, ?Integer? len) -> self - def write_string_length: (String str, Integer len) -> self - end - - class MemoryPointer < Pointer - def initialize: (AbstractMemory::type_size size, ?Integer count, ?boolish clear) -> self - def self.from_string: (String s) -> instance - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct.rbs deleted file mode 100644 index 5b349bfc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct.rbs +++ /dev/null @@ -1,76 +0,0 @@ -module FFI - class Struct[out P < AbstractMemory, unchecked out E] - type layout = Library::ffi_lib_type | singleton(StructLayout::Field) | [layout, Integer] - - type ptr = Type::Mapped[ - StructByReference[Struct[AbstractMemory, untyped], AbstractMemory], - AbstractMemory, instance, untyped - ] - def self.ptr: (?untyped flags) -> ptr # https://github.com/ffi/ffi/issues/1073 - alias self.by_ref self.ptr - def self.in: () -> ptr - def self.out: () -> ptr - def self.val: () -> StructByValue[singleton(Struct)] - alias self.by_value self.val - - alias self.alloc_inout self.new - alias self.alloc_in self.new - alias self.alloc_out self.new - alias self.new_inout self.new - alias self.new_in self.new - alias self.new_out self.new - - def self.auto_ptr: () -> Type::Mapped[ - ManagedStructConverter[ManagedStruct[AutoPointer, untyped], AutoPointer], - Pointer, instance, untyped - ] - def self.layout: (*layout | Integer) -> StructLayout - | (Hash[Symbol, layout]) -> StructLayout - def self.size=: (Integer size) -> Integer - - def self?.alignment: () -> Integer - def self?.members: () -> Array[Symbol] - def self?.offset_of: (Symbol name) -> Integer - def self?.offsets: () -> Array[[Symbol, Integer]] - def self?.size: -> Integer - - def initialize: (?P pointer, *layout args) -> void - def []: (Symbol field_name) -> E - def []=: (Symbol field_name, E value) -> E - alias align alignment - def clear: () -> self - def layout: () -> StructLayout - def null?: () -> bool - def order: (AbstractMemory::order_in order) -> Struct[P, E] - | () -> AbstractMemory::order_out - def pointer: () -> P - alias to_ptr pointer - def values: () -> Array[E] - - class InlineArray[out P < AbstractMemory, unchecked out E] - include Enumerable[E] - include AbstractMemory::_Size - - def initialize: (P memory, StructLayout::Field field) -> self - def []: (Integer index) -> E - def []=: (Integer index, E value) -> E - def each: () { (E) -> void } -> self - def to_a: () -> Array[E] - def to_ptr: () -> P - end - - class ManagedStructConverter[S < ManagedStruct[P, untyped], P < AutoPointer] < StructByReference[S, P] - def initialize: ... - def from_native: (Pointer ptr, untyped ctx) -> S - end - end - - class ManagedStruct[out P < AutoPointer, unchecked out E] < Struct[P, E] - def self.release: (AbstractMemory ptr) -> void - def initialize: (Pointer pointer) -> self - end - - class Union[out P < AbstractMemory, unchecked out E] < Struct[P, E] - def self.builder: () -> StructLayoutBuilder - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_by_reference.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_by_reference.rbs deleted file mode 100644 index 475b483e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_by_reference.rbs +++ /dev/null @@ -1,11 +0,0 @@ -module FFI - class StructByReference[S < Struct[P, untyped], P < AbstractMemory] - include DataConverter[P, S, untyped] - attr_reader struct_class: Struct[P, untyped] - - def initialize: (S struct_class) -> void - def from_native: (P value, untyped ctx) -> S - def native_type: () -> Type::Builtin - def to_native: (S? value, untyped ctx) -> P - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_by_value.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_by_value.rbs deleted file mode 100644 index 902bcc6b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_by_value.rbs +++ /dev/null @@ -1,7 +0,0 @@ -module FFI - class StructByValue[C < singleton(Struct)] < Type - def initialize: (C) -> self - def layout: () -> StructLayout - def struct_class: () -> C - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_layout.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_layout.rbs deleted file mode 100644 index 12b05aed..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_layout.rbs +++ /dev/null @@ -1,9 +0,0 @@ -module FFI - class StructLayout - #TODO - - class Field - #TODO - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_layout_builder.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_layout_builder.rbs deleted file mode 100644 index 291a669a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/struct_layout_builder.rbs +++ /dev/null @@ -1,5 +0,0 @@ -module FFI - class StructLayoutBuilder - #TODO - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/type.rbs b/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/type.rbs deleted file mode 100644 index 66186d1a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/ffi-1.17.2-x86_64-linux-gnu/sig/ffi/type.rbs +++ /dev/null @@ -1,39 +0,0 @@ -module FFI - class Type - class Array = ArrayType - class Function = FunctionType - class Struct = StructByValue - - include AbstractMemory::_Size - def initialize: (Integer | Type value) -> self - def alignment: () -> Integer - def inspect: ... - - class Builtin < Type - def inspect: ... - end - - class Mapped[X < _DataConverter[N, R, C], N, R, C] - include _DataConverter[N, R, C] - - def initialize: (X converter) -> self - def converter: () -> X - end - end - - class ArrayType - def initialize: (Type component_type, Integer length) -> self - def element_type: -> Type - def length: -> Integer - end - - class FunctionType < Type - def initialize: - ( - ffi_type return_type, Array[ffi_type] param_types, - ?blocking: boolish, ?convention: Library::convention, ?enums: Enums - ) -> self - def param_types: () -> Array[Type] - def return_type: () -> Type - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/lib/fiber/annotation.rb b/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/lib/fiber/annotation.rb deleted file mode 100644 index dc2cb493..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/lib/fiber/annotation.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2023, by Samuel Williams. - -require 'fiber' - -class Fiber - # A mechanism for annotating fibers. - module Annotation - # Annotate the current fiber with the given annotation. - # @parameter annotation [Object] The annotation to set. - def initialize(annotation: nil, **options, &block) - @annotation = annotation - super(**options, &block) - end - - # Get the current annotation. - # @returns [Object] The current annotation. - attr_accessor :annotation - - # Annotate the current fiber with the given annotation. - # - # If a block is given, the annotation is set for the duration of the block and then restored to the previous value. - # - # The block form of this method should only be invoked on the current fiber. - # - # @parameter annotation [Object] The annotation to set. - # @yields {} The block to execute with the given annotation. - # @returns [Object] The return value of the block. - def annotate(annotation) - if block_given? - raise "Cannot annotation a different fiber!" unless Fiber.current == self - - begin - current_annotation = @annotation - @annotation = annotation - return yield - ensure - @annotation = current_annotation - end - else - @annotation = annotation - end - end - end -end - -unless Fiber.method_defined?(:annotation) - Fiber.prepend(Fiber::Annotation) - - # @scope Fiber - # @name self.annotate - # Annotate the current fiber with the given annotation. - def Fiber.annotate(...) - Fiber.current.annotate(...) - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/lib/fiber/annotation/version.rb b/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/lib/fiber/annotation/version.rb deleted file mode 100644 index 2e109c3e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/lib/fiber/annotation/version.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2023, by Samuel Williams. - -class Fiber - module Annotation - VERSION = "0.2.0" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/license.md b/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/license.md deleted file mode 100644 index 3fe330dc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/license.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -Copyright, 2023, by Samuel Williams. - -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/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/readme.md b/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/readme.md deleted file mode 100644 index 67191ae2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-annotation-0.2.0/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# Fiber::Annotation - -A simple way to annotate what a fiber is currently doing, useful for debugging, logging and tracing. - -[![Development Status](https://github.com/ioquatix/fiber-annotation/workflows/Test/badge.svg)](https://github.com/ioquatix/fiber-annotation/actions?workflow=Test) - -## Usage - -Please see the [project documentation](https://ioquatix.github.io/fiber-annotation). - -## Contributing - -We welcome contributions to this project. - -1. Fork it. -2. Create your feature branch (`git checkout -b my-new-feature`). -3. Commit your changes (`git commit -am 'Add some feature'`). -4. Push to the branch (`git push origin my-new-feature`). -5. Create new Pull Request. diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/lib/fiber/local.rb b/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/lib/fiber/local.rb deleted file mode 100644 index 27488b4f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/lib/fiber/local.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2020-2024, by Samuel Williams. - -require_relative "local/version" -require 'fiber/storage' - -class Fiber - module Local - def self.extended(klass) - attribute_name = klass.name.gsub('::', '_').gsub(/\W/, '').downcase.to_sym - - # This is used for the general interface and fiber storage key: - klass.instance_variable_set(:@fiber_local_attribute_name, attribute_name) - klass.singleton_class.attr :fiber_local_attribute_name - - # This is used for reading and writing directly to the thread instance variables: - klass.instance_variable_set(:@fiber_local_variable_name, :"@#{attribute_name}") - - Thread.attr_accessor(attribute_name) - end - - # Instantiate a new thread-local object. - # By default, invokes {new} to generate the instance. - # @returns [Object] - def local - self.new - end - - # Get the current thread-local instance. Create it if required. - # @returns [Object] The thread-local instance. - def instance - # This is considered a local "override" in the dynamic scope of the fiber: - if instance = Fiber[@fiber_local_attribute_name] - return instance - end - - # This is generally the fast path: - thread = Thread.current - unless instance = thread.instance_variable_get(@fiber_local_variable_name) - if instance = self.local - thread.instance_variable_set(@fiber_local_variable_name, instance) - end - end - - return instance - end - - # Assigns to the fiber-local instance. - # @parameter instance [Object] The object that will become the thread-local instance. - def instance= instance - Fiber[@fiber_local_attribute_name] = instance - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/lib/fiber/local/version.rb b/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/lib/fiber/local/version.rb deleted file mode 100644 index f440a69f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/lib/fiber/local/version.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2020, by Samuel Williams. - -class Fiber - module Local - VERSION = "1.1.0" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/license.md b/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/license.md deleted file mode 100644 index 2e71de4a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/license.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -Copyright, 2020-2024, by Samuel Williams. - -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/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/readme.md b/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/readme.md deleted file mode 100644 index 5873e0a6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-local-1.1.0/readme.md +++ /dev/null @@ -1,82 +0,0 @@ -# Fiber::Local - -A module to simplify fiber-local state. - -[![Development Status](https://github.com/socketry/fiber-local/workflows/Test/badge.svg)](https://github.com/socketry/fiber-local/actions?workflow=Test) - -## Features - - - Easily access fiber-local state from a fiber. - - Default to shared thread-local state. - -## Installation - -``` bash -$ bundle add fiber-local -``` - -## Usage - -In your own class, e.g. `Logger`: - -``` ruby -class Logger - extend Fiber::Local - - def initialize - @buffer = [] - end - - def log(*arguments) - @buffer << arguments - end -end -``` - -Now, instead of instantiating your cache `LOGGER = Logger.new`, use `Logger.instance`. It will return a thread-local instance. - -``` ruby -Thread.new do - Logger.instance - # => # -end - -Thread.new do - Logger.instance - # => # -end -``` - -In cases where you have job per fiber or request per fiber, you might want to collect all log output for a specific fiber, you can do the following: - -``` ruby -Logger.instance -# => # - -Fiber.new do - Logger.instance = Logger.new - # => # -end -``` - -## Contributing - -We welcome contributions to this project. - -1. Fork it. -2. Create your feature branch (`git checkout -b my-new-feature`). -3. Commit your changes (`git commit -am 'Add some feature'`). -4. Push to the branch (`git push origin my-new-feature`). -5. Create new Pull Request. - -### Developer Certificate of Origin - -This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted. - -### Contributor Covenant - -This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms. - -## See Also - - - [thread-local](https://github.com/socketry/thread-local) — Strictly thread-local variables. diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/lib/fiber/storage.rb b/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/lib/fiber/storage.rb deleted file mode 100644 index 207f60ed..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/lib/fiber/storage.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022-2025, by Samuel Williams. - -require "fiber" - -# @namespace -class Fiber - # Provides compatibility shims for fiber storage. - module Storage - # Initialize the fiber with the given storage. - def initialize(*arguments, storage: true, **options, &block) - case storage - when true - @storage = Fiber.current.storage - else - raise TypeError, "Storage must be a hash!" unless storage.is_a?(Hash) - - @storage = storage - end - - super(*arguments, **options, &block) - end - - # Set the storage associated with this fiber, clearing any previous storage. - def storage=(hash) - @storage = hash.dup - end - - # The storage associated with this fiber. - def storage - @storage.dup - end - - # @private - def __storage__ - @storage ||= {} - end - end - - unless Fiber.current.respond_to?(:storage) - prepend Storage - - # Get a value from the current fiber's storage. - def self.[] key - raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) - - self.current.__storage__[key] - end - - # Set a value in the current fiber's storage. - def self.[]= key, value - raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) - - self.current.__storage__[key] = value - end - else - # Whether the fiber storage has buggy keys. Unfortunately the original implementation of fiber storage was broken, this method detects the bug and is used to apply a fix. - def self.__borked_keys__ - !Fiber.new do - key = :"#{self.object_id}.key" - Fiber[key] = true - Fiber[key] - end.resume - end - - if __borked_keys__ - # This is a fix for the original implementation of fiber storage which incorrectly handled non-dynamic symbol keys. - module FixBorkedKeys - # Lookup the value for the key, ensuring the symbol is dynamic. - def [](key) - raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) - - super(eval(key.inspect)) - end - - # Assign the value to the key, ensuring the symbol is dynamic. - def []=(key, value) - raise TypeError, "Key must be symbol!" unless key.is_a?(Symbol) - - super(eval(key.inspect), value) - end - end - - singleton_class.prepend FixBorkedKeys - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/lib/fiber/storage/version.rb b/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/lib/fiber/storage/version.rb deleted file mode 100644 index f9f3a9de..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/lib/fiber/storage/version.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# Released under the MIT License. -# Copyright, 2022-2025, by Samuel Williams. - -require "fiber" - -class Fiber - module Storage - VERSION = "1.0.1" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/license.md b/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/license.md deleted file mode 100644 index 01826b2e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/license.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -Copyright, 2022-2025, by Samuel Williams. - -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/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/readme.md b/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/readme.md deleted file mode 100644 index 7b069ce1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/readme.md +++ /dev/null @@ -1,43 +0,0 @@ -# Fiber::Storage - -This gem provides a shim for `Fiber.[]`, `Fiber.[]=`, `Fiber#storage`, `Fiber#storage=`, which was introduced in Ruby 3.2. - -[![Development Status](https://github.com/ioquatix/fiber-storage/workflows/Test/badge.svg)](https://github.com/ioquatix/fiber-storage/actions?workflow=Test) - -## Motivation - -Ruby 3.2 introduces inheritable fiber storage for per-request or per-operation state. This gem provides a shim for Ruby 3.1 and earlier to make adoption easier. It isn't able to provide the full range of features, but it should be sufficient for most use cases. - -Notably, it does not support inheritance across threads or lazy Enumerator. This is a limitation of the shim implementation. - -## Usage - -Please see the [project documentation](https://ioquatix.github.io/fiber-storage/) for more details. - - - [Getting Started](https://ioquatix.github.io/fiber-storage/guides/getting-started/index) - This guide explains how to use this gem and provides a brief overview of the features. - -## Releases - -Please see the [project releases](https://ioquatix.github.io/fiber-storage/releases/index) for all releases. - -### v1.0.1 - - - Fix test suite incompatibiltiies with Ruby 3.4+. - -## Contributing - -We welcome contributions to this project. - -1. Fork it. -2. Create your feature branch (`git checkout -b my-new-feature`). -3. Commit your changes (`git commit -am 'Add some feature'`). -4. Push to the branch (`git push origin my-new-feature`). -5. Create new Pull Request. - -### Developer Certificate of Origin - -In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed. - -### Community Guidelines - -This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers. diff --git a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/releases.md b/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/releases.md deleted file mode 100644 index 0f81de63..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/fiber-storage-1.0.1/releases.md +++ /dev/null @@ -1,5 +0,0 @@ -# Releases - -## v1.0.1 - - - Fix test suite incompatibiltiies with Ruby 3.4+. diff --git a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/Gemfile b/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/Gemfile deleted file mode 100644 index ea587c77..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/Gemfile +++ /dev/null @@ -1,24 +0,0 @@ -# ---------------------------------------------------------------------------- -# Frozen-string-literal: true -# Copyright: 2015-2016 Jordon Bedwell - MIT License -# Encoding: utf-8 -# ---------------------------------------------------------------------------- - -source "https://rubygems.org" -gem "rake", :require => false -gemspec - -group :test do - gem "rspec-helpers", :require => false - gem "codeclimate-test-reporter", :require => false - gem "luna-rspec-formatters", :require => false - gem "rspec", :require => false -end - -group :development do - gem "luna-rubocop-formatters", :require => false - gem "rubocop", :github => "bbatsov/rubocop", :require => false - gem "pry", { - :require => false - } -end diff --git a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/LICENSE b/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/LICENSE deleted file mode 100644 index e603a782..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2016 Jordon Bedwell - -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/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/Rakefile b/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/Rakefile deleted file mode 100644 index 1c929e5c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/Rakefile +++ /dev/null @@ -1,13 +0,0 @@ -# ---------------------------------------------------------------------------- -# Frozen-string-literal: true -# Copyright: 2015-2016 Jordon Bedwell - MIT License -# Encoding: utf-8 -# ---------------------------------------------------------------------------- - -$LOAD_PATH.unshift(File.expand_path("../lib", __FILE__)) -require "luna/rubocop/rake/task" -require "rspec/core/rake_task" - -task :default => [:spec] -RSpec::Core::RakeTask.new :spec -task :test => :spec diff --git a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/lib/forwardable/extended.rb b/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/lib/forwardable/extended.rb deleted file mode 100644 index fc694cf1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/lib/forwardable/extended.rb +++ /dev/null @@ -1,202 +0,0 @@ -# ---------------------------------------------------------------------------- -# Frozen-string-literal: true -# Copyright: 2015-2016 Jordon Bedwell - MIT License -# Encoding: utf-8 -# ---------------------------------------------------------------------------- - -require "forwardable/extended/version" -require "forwardable" - -module Forwardable - module Extended - - # ------------------------------------------------------------------------ - # Make our methods private on the class, there is no reason for public. - # ------------------------------------------------------------------------ - - def self.extended(klass) - instance_methods.each do |method| - klass.private_class_method( - method - ) - end - end - - # ------------------------------------------------------------------------ - # Delegate using a Rails-like interface. - # ------------------------------------------------------------------------ - - def rb_delegate(method, to: nil, alias_of: method, **kwd) - raise ArgumentError, "to must be provided" unless to - def_delegator( - to, alias_of, method, **kwd - ) - end - - # ------------------------------------------------------------------------ - # Delegate a method to a hash and key. - # ------------------------------------------------------------------------ - - def def_hash_delegator(hash, method, key: method, **kwd) - prefix, suffix, wrap = prepare_delegate(**kwd) - - if suffix - method = method.to_s.gsub( - /\?$/, "" - ) - end - - class_eval delegate_debug(<<-STR), __FILE__, __LINE__ - 9 - def #{method}#{suffix}(*args) - #{wrap}( - #{prefix}#{hash}[#{key.inspect}] - ) - - rescue Exception - if !Forwardable.debug && $@ && $@.respond_to?(:delete_if) - $@.delete_if do |source| - source =~ %r"#{Regexp.escape(__FILE__)}"o - end - end - - raise - end - STR - end - - # ------------------------------------------------------------------------ - # Delegate a method to an instance variable. - # ------------------------------------------------------------------------ - - def def_ivar_delegator(ivar, alias_ = ivar, **kwd) - prefix, suffix, wrap = prepare_delegate(**kwd) - - if suffix - alias_ = alias_.to_s.gsub( - /\?$/, "" - ) - end - - class_eval delegate_debug(<<-STR), __FILE__, __LINE__ - 9 - def #{alias_.to_s.gsub(/\A@/, "")}#{suffix} - #{wrap}( - #{prefix}#{ivar} - ) - - rescue Exception - if !Forwardable.debug && $@ && $@.respond_to?(:delete_if) - $@.delete_if do |source| - source =~ %r"#{Regexp.escape(__FILE__)}"o - end - end - - raise - end - STR - end - - # ------------------------------------------------------------------------ - # Like def_delegator but allows you to send args and do other stuff. - # ------------------------------------------------------------------------ - - def def_modern_delegator(accessor, method, alias_ = method, args: \ - { :before => [], :after => [] }, **kwd) - - prefix, suffix, wrap = prepare_delegate(**kwd) - args = { :before => args } unless args.is_a?(Hash) - b = [args[:before]].flatten.compact.map(&:to_s).join(", ") - a = [args[ :after]].flatten.compact.map(&:to_s).join(", ") - b = b + ", " unless args[:before].nil? || args[:before].empty? - a = ", " + a unless args[ :after].nil? || args[ :after].empty? - alias_ = alias_.to_s.gsub(/\?$/, "") if suffix - - class_eval delegate_debug(<<-STR), __FILE__, __LINE__ - 10 - def #{alias_}#{suffix}(*args, &block) - #{wrap}(#{prefix}#{accessor}.send( - #{method.inspect}, #{b}*args#{a}, &block - )) - - rescue Exception - if !Forwardable.debug && $@ && $@.respond_to?(:delete_if) - $@.delete_if do |source| - source =~ %r"#{Regexp.escape(__FILE__)}"o - end - end - - raise - end - STR - end - - # ------------------------------------------------------------------------ - # Wraps around traditional delegation and modern delegation. - # ------------------------------------------------------------------------ - - def def_delegator(accessor, method, alias_ = method, **kwd) - kwd, alias_ = alias_, method if alias_.is_a?(Hash) && !kwd.any? - - if alias_.is_a?(Hash) || !kwd.any? - Forwardable.instance_method(:def_delegator).bind(self) \ - .call(accessor, method, alias_) - - elsif !kwd[:type] - def_modern_delegator( - accessor, method, alias_, **kwd - ) - - else - raise ArgumentError, "Alias not supported." if alias_ != method - send("def_#{kwd[:type]}_delegator", accessor, method, **kwd.tap do |obj| - obj.delete(:type) - end) - end - end - - # ------------------------------------------------------------------------ - # Create multiple delegates at once. - # ------------------------------------------------------------------------ - - def def_delegators(accessor, *methods) - kwd = methods.shift if methods.first.is_a?(Hash) - kwd = methods.pop if methods. last.is_a?(Hash) - kwd = {} unless kwd - - methods.each do |method| - def_delegator accessor, method, **kwd - end - end - - # ------------------------------------------------------------------------ - # Prepares a delegate and it's few arguments. - # ------------------------------------------------------------------------ - - private - def prepare_delegate(wrap: nil, bool: false) - prefix = (bool == :reverse ? "!!!" : "!!") if bool - wrap = "self.class.new" if wrap.is_a?(TrueClass) - suffix = "?" if bool - - return [ - prefix, suffix, wrap - ] - end - - # ------------------------------------------------------------------------ - - private - def delegate_debug(str) - if Forwardable.debug && !Forwardable.debug.is_a?(TrueClass) - then Forwardable.debug.debug( - str - ) - - elsif Forwardable.debug - $stdout.puts( - "\n# ------\n\n", str - ) - end - - str - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/lib/forwardable/extended/version.rb b/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/lib/forwardable/extended/version.rb deleted file mode 100644 index 06393756..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/forwardable-extended-2.6.0/lib/forwardable/extended/version.rb +++ /dev/null @@ -1,9 +0,0 @@ -# Frozen-string-literal: true -# Copyright: 2015-2016 Jordon Bedwell - MIT License -# Encoding: utf-8 - -module Forwardable - module Extended - VERSION = "2.6.0" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/LICENSE b/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/LICENSE deleted file mode 100644 index bfc6c46e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2019 GitHub, 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. diff --git a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/README.md b/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/README.md deleted file mode 100644 index 4f438287..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/README.md +++ /dev/null @@ -1,100 +0,0 @@ -gemoji -====== - -This library contains character information about native emojis. - - -Installation ------------- - -Add `gemoji` to your Gemfile. - -``` ruby -gem 'gemoji' -``` - - -Example Rails Helper --------------------- - -This would allow emojifying content such as: `it's raining :cat:s and :dog:s!` - -See the [Emoji cheat sheet](http://www.emoji-cheat-sheet.com) for more examples. - -```ruby -module EmojiHelper - def emojify(content) - h(content).to_str.gsub(/:([\w+-]+):/) do |match| - if emoji = Emoji.find_by_alias($1) - %(#$1) - else - match - end - end.html_safe if content.present? - end -end -``` - -Unicode mapping ---------------- - -Translate emoji names to unicode and vice versa. - -```ruby ->> Emoji.find_by_alias("cat").raw -=> "🐱" # Don't see a cat? That's U+1F431. - ->> Emoji.find_by_unicode("\u{1f431}").name -=> "cat" -``` - -Adding new emoji ----------------- - -You can add new emoji characters to the `Emoji.all` list: - -```ruby -emoji = Emoji.create("music") do |char| - char.add_alias "song" - char.add_unicode_alias "\u{266b}" - char.add_tag "notes" -end - -emoji.name #=> "music" -emoji.raw #=> "♫" -emoji.image_filename #=> "unicode/266b.png" - -# Creating custom emoji (no Unicode aliases): -emoji = Emoji.create("music") do |char| - char.add_tag "notes" -end - -emoji.custom? #=> true -emoji.image_filename #=> "music.png" -``` - -As you create new emoji, you must ensure that you also create and put the images -they reference by their `image_filename` to your assets directory. - -You can customize `image_filename` with: - -```ruby -emoji = Emoji.create("music") do |char| - char.image_filename = "subdirectory/my_emoji.gif" -end -``` - -For existing emojis, you can edit the list of aliases or add new tags in an edit block: - -```ruby -emoji = Emoji.find_by_alias "musical_note" - -Emoji.edit_emoji(emoji) do |char| - char.add_alias "music" - char.add_unicode_alias "\u{266b}" - char.add_tag "notes" -end - -Emoji.find_by_alias "music" #=> emoji -Emoji.find_by_unicode "\u{266b}" #=> emoji -``` diff --git a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/db/emoji.json b/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/db/emoji.json deleted file mode 100644 index 65d4c8db..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/db/emoji.json +++ /dev/null @@ -1,23479 +0,0 @@ -[ - { - "emoji": "😀" - , "description": "grinning face" - , "category": "Smileys & Emotion" - , "aliases": [ - "grinning" - ] - , "tags": [ - "smile" - , "happy" - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😃" - , "description": "grinning face with big eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "smiley" - ] - , "tags": [ - "happy" - , "joy" - , "haha" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😄" - , "description": "grinning face with smiling eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "smile" - ] - , "tags": [ - "happy" - , "joy" - , "laugh" - , "pleased" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😁" - , "description": "beaming face with smiling eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "grin" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😆" - , "description": "grinning squinting face" - , "category": "Smileys & Emotion" - , "aliases": [ - "laughing" - , "satisfied" - ] - , "tags": [ - "happy" - , "haha" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😅" - , "description": "grinning face with sweat" - , "category": "Smileys & Emotion" - , "aliases": [ - "sweat_smile" - ] - , "tags": [ - "hot" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤣" - , "description": "rolling on the floor laughing" - , "category": "Smileys & Emotion" - , "aliases": [ - "rofl" - ] - , "tags": [ - "lol" - , "laughing" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "😂" - , "description": "face with tears of joy" - , "category": "Smileys & Emotion" - , "aliases": [ - "joy" - ] - , "tags": [ - "tears" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🙂" - , "description": "slightly smiling face" - , "category": "Smileys & Emotion" - , "aliases": [ - "slightly_smiling_face" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🙃" - , "description": "upside-down face" - , "category": "Smileys & Emotion" - , "aliases": [ - "upside_down_face" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🫠" - , "description": "melting face" - , "category": "Smileys & Emotion" - , "aliases": [ - "melting_face" - ] - , "tags": [ - "sarcasm" - , "dread" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "😉" - , "description": "winking face" - , "category": "Smileys & Emotion" - , "aliases": [ - "wink" - ] - , "tags": [ - "flirt" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😊" - , "description": "smiling face with smiling eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "blush" - ] - , "tags": [ - "proud" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😇" - , "description": "smiling face with halo" - , "category": "Smileys & Emotion" - , "aliases": [ - "innocent" - ] - , "tags": [ - "angel" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥰" - , "description": "smiling face with hearts" - , "category": "Smileys & Emotion" - , "aliases": [ - "smiling_face_with_three_hearts" - ] - , "tags": [ - "love" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "😍" - , "description": "smiling face with heart-eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "heart_eyes" - ] - , "tags": [ - "love" - , "crush" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤩" - , "description": "star-struck" - , "category": "Smileys & Emotion" - , "aliases": [ - "star_struck" - ] - , "tags": [ - "eyes" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "😘" - , "description": "face blowing a kiss" - , "category": "Smileys & Emotion" - , "aliases": [ - "kissing_heart" - ] - , "tags": [ - "flirt" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😗" - , "description": "kissing face" - , "category": "Smileys & Emotion" - , "aliases": [ - "kissing" - ] - , "tags": [ - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "☺️" - , "description": "smiling face" - , "category": "Smileys & Emotion" - , "aliases": [ - "relaxed" - ] - , "tags": [ - "blush" - , "pleased" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "😚" - , "description": "kissing face with closed eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "kissing_closed_eyes" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😙" - , "description": "kissing face with smiling eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "kissing_smiling_eyes" - ] - , "tags": [ - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "🥲" - , "description": "smiling face with tear" - , "category": "Smileys & Emotion" - , "aliases": [ - "smiling_face_with_tear" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "😋" - , "description": "face savoring food" - , "category": "Smileys & Emotion" - , "aliases": [ - "yum" - ] - , "tags": [ - "tongue" - , "lick" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😛" - , "description": "face with tongue" - , "category": "Smileys & Emotion" - , "aliases": [ - "stuck_out_tongue" - ] - , "tags": [ - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😜" - , "description": "winking face with tongue" - , "category": "Smileys & Emotion" - , "aliases": [ - "stuck_out_tongue_winking_eye" - ] - , "tags": [ - "prank" - , "silly" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤪" - , "description": "zany face" - , "category": "Smileys & Emotion" - , "aliases": [ - "zany_face" - ] - , "tags": [ - "goofy" - , "wacky" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "😝" - , "description": "squinting face with tongue" - , "category": "Smileys & Emotion" - , "aliases": [ - "stuck_out_tongue_closed_eyes" - ] - , "tags": [ - "prank" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤑" - , "description": "money-mouth face" - , "category": "Smileys & Emotion" - , "aliases": [ - "money_mouth_face" - ] - , "tags": [ - "rich" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🤗" - , "description": "smiling face with open hands" - , "category": "Smileys & Emotion" - , "aliases": [ - "hugs" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🤭" - , "description": "face with hand over mouth" - , "category": "Smileys & Emotion" - , "aliases": [ - "hand_over_mouth" - ] - , "tags": [ - "quiet" - , "whoops" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🫢" - , "description": "face with open eyes and hand over mouth" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_with_open_eyes_and_hand_over_mouth" - ] - , "tags": [ - "gasp" - , "shock" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🫣" - , "description": "face with peeking eye" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_with_peeking_eye" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🤫" - , "description": "shushing face" - , "category": "Smileys & Emotion" - , "aliases": [ - "shushing_face" - ] - , "tags": [ - "silence" - , "quiet" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🤔" - , "description": "thinking face" - , "category": "Smileys & Emotion" - , "aliases": [ - "thinking" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🫡" - , "description": "saluting face" - , "category": "Smileys & Emotion" - , "aliases": [ - "saluting_face" - ] - , "tags": [ - "respect" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🤐" - , "description": "zipper-mouth face" - , "category": "Smileys & Emotion" - , "aliases": [ - "zipper_mouth_face" - ] - , "tags": [ - "silence" - , "hush" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🤨" - , "description": "face with raised eyebrow" - , "category": "Smileys & Emotion" - , "aliases": [ - "raised_eyebrow" - ] - , "tags": [ - "suspicious" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "😐" - , "description": "neutral face" - , "category": "Smileys & Emotion" - , "aliases": [ - "neutral_face" - ] - , "tags": [ - "meh" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😑" - , "description": "expressionless face" - , "category": "Smileys & Emotion" - , "aliases": [ - "expressionless" - ] - , "tags": [ - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😶" - , "description": "face without mouth" - , "category": "Smileys & Emotion" - , "aliases": [ - "no_mouth" - ] - , "tags": [ - "mute" - , "silence" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫥" - , "description": "dotted line face" - , "category": "Smileys & Emotion" - , "aliases": [ - "dotted_line_face" - ] - , "tags": [ - "invisible" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "😶‍🌫️" - , "description": "face in clouds" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_in_clouds" - ] - , "tags": [ - ] - , "unicode_version": "13.1" - , "ios_version": "14.0" - } -, { - "emoji": "😏" - , "description": "smirking face" - , "category": "Smileys & Emotion" - , "aliases": [ - "smirk" - ] - , "tags": [ - "smug" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😒" - , "description": "unamused face" - , "category": "Smileys & Emotion" - , "aliases": [ - "unamused" - ] - , "tags": [ - "meh" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🙄" - , "description": "face with rolling eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "roll_eyes" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "😬" - , "description": "grimacing face" - , "category": "Smileys & Emotion" - , "aliases": [ - "grimacing" - ] - , "tags": [ - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😮‍💨" - , "description": "face exhaling" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_exhaling" - ] - , "tags": [ - ] - , "unicode_version": "13.1" - , "ios_version": "14.0" - } -, { - "emoji": "🤥" - , "description": "lying face" - , "category": "Smileys & Emotion" - , "aliases": [ - "lying_face" - ] - , "tags": [ - "liar" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🫨" - , "description": "shaking face" - , "category": "Smileys & Emotion" - , "aliases": [ - "shaking_face" - ] - , "tags": [ - "shock" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "😌" - , "description": "relieved face" - , "category": "Smileys & Emotion" - , "aliases": [ - "relieved" - ] - , "tags": [ - "whew" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😔" - , "description": "pensive face" - , "category": "Smileys & Emotion" - , "aliases": [ - "pensive" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😪" - , "description": "sleepy face" - , "category": "Smileys & Emotion" - , "aliases": [ - "sleepy" - ] - , "tags": [ - "tired" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤤" - , "description": "drooling face" - , "category": "Smileys & Emotion" - , "aliases": [ - "drooling_face" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "😴" - , "description": "sleeping face" - , "category": "Smileys & Emotion" - , "aliases": [ - "sleeping" - ] - , "tags": [ - "zzz" - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😷" - , "description": "face with medical mask" - , "category": "Smileys & Emotion" - , "aliases": [ - "mask" - ] - , "tags": [ - "sick" - , "ill" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤒" - , "description": "face with thermometer" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_with_thermometer" - ] - , "tags": [ - "sick" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🤕" - , "description": "face with head-bandage" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_with_head_bandage" - ] - , "tags": [ - "hurt" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🤢" - , "description": "nauseated face" - , "category": "Smileys & Emotion" - , "aliases": [ - "nauseated_face" - ] - , "tags": [ - "sick" - , "barf" - , "disgusted" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🤮" - , "description": "face vomiting" - , "category": "Smileys & Emotion" - , "aliases": [ - "vomiting_face" - ] - , "tags": [ - "barf" - , "sick" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🤧" - , "description": "sneezing face" - , "category": "Smileys & Emotion" - , "aliases": [ - "sneezing_face" - ] - , "tags": [ - "achoo" - , "sick" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥵" - , "description": "hot face" - , "category": "Smileys & Emotion" - , "aliases": [ - "hot_face" - ] - , "tags": [ - "heat" - , "sweating" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥶" - , "description": "cold face" - , "category": "Smileys & Emotion" - , "aliases": [ - "cold_face" - ] - , "tags": [ - "freezing" - , "ice" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥴" - , "description": "woozy face" - , "category": "Smileys & Emotion" - , "aliases": [ - "woozy_face" - ] - , "tags": [ - "groggy" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "😵" - , "description": "face with crossed-out eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "dizzy_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😵‍💫" - , "description": "face with spiral eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_with_spiral_eyes" - ] - , "tags": [ - ] - , "unicode_version": "13.1" - , "ios_version": "14.0" - } -, { - "emoji": "🤯" - , "description": "exploding head" - , "category": "Smileys & Emotion" - , "aliases": [ - "exploding_head" - ] - , "tags": [ - "mind" - , "blown" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🤠" - , "description": "cowboy hat face" - , "category": "Smileys & Emotion" - , "aliases": [ - "cowboy_hat_face" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥳" - , "description": "partying face" - , "category": "Smileys & Emotion" - , "aliases": [ - "partying_face" - ] - , "tags": [ - "celebration" - , "birthday" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥸" - , "description": "disguised face" - , "category": "Smileys & Emotion" - , "aliases": [ - "disguised_face" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "😎" - , "description": "smiling face with sunglasses" - , "category": "Smileys & Emotion" - , "aliases": [ - "sunglasses" - ] - , "tags": [ - "cool" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤓" - , "description": "nerd face" - , "category": "Smileys & Emotion" - , "aliases": [ - "nerd_face" - ] - , "tags": [ - "geek" - , "glasses" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🧐" - , "description": "face with monocle" - , "category": "Smileys & Emotion" - , "aliases": [ - "monocle_face" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "😕" - , "description": "confused face" - , "category": "Smileys & Emotion" - , "aliases": [ - "confused" - ] - , "tags": [ - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "🫤" - , "description": "face with diagonal mouth" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_with_diagonal_mouth" - ] - , "tags": [ - "confused" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "😟" - , "description": "worried face" - , "category": "Smileys & Emotion" - , "aliases": [ - "worried" - ] - , "tags": [ - "nervous" - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "🙁" - , "description": "slightly frowning face" - , "category": "Smileys & Emotion" - , "aliases": [ - "slightly_frowning_face" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "☹️" - , "description": "frowning face" - , "category": "Smileys & Emotion" - , "aliases": [ - "frowning_face" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "😮" - , "description": "face with open mouth" - , "category": "Smileys & Emotion" - , "aliases": [ - "open_mouth" - ] - , "tags": [ - "surprise" - , "impressed" - , "wow" - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😯" - , "description": "hushed face" - , "category": "Smileys & Emotion" - , "aliases": [ - "hushed" - ] - , "tags": [ - "silence" - , "speechless" - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😲" - , "description": "astonished face" - , "category": "Smileys & Emotion" - , "aliases": [ - "astonished" - ] - , "tags": [ - "amazed" - , "gasp" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😳" - , "description": "flushed face" - , "category": "Smileys & Emotion" - , "aliases": [ - "flushed" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥺" - , "description": "pleading face" - , "category": "Smileys & Emotion" - , "aliases": [ - "pleading_face" - ] - , "tags": [ - "puppy" - , "eyes" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥹" - , "description": "face holding back tears" - , "category": "Smileys & Emotion" - , "aliases": [ - "face_holding_back_tears" - ] - , "tags": [ - "tears" - , "gratitude" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "😦" - , "description": "frowning face with open mouth" - , "category": "Smileys & Emotion" - , "aliases": [ - "frowning" - ] - , "tags": [ - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😧" - , "description": "anguished face" - , "category": "Smileys & Emotion" - , "aliases": [ - "anguished" - ] - , "tags": [ - "stunned" - ] - , "unicode_version": "6.1" - , "ios_version": "6.0" - } -, { - "emoji": "😨" - , "description": "fearful face" - , "category": "Smileys & Emotion" - , "aliases": [ - "fearful" - ] - , "tags": [ - "scared" - , "shocked" - , "oops" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😰" - , "description": "anxious face with sweat" - , "category": "Smileys & Emotion" - , "aliases": [ - "cold_sweat" - ] - , "tags": [ - "nervous" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😥" - , "description": "sad but relieved face" - , "category": "Smileys & Emotion" - , "aliases": [ - "disappointed_relieved" - ] - , "tags": [ - "phew" - , "sweat" - , "nervous" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😢" - , "description": "crying face" - , "category": "Smileys & Emotion" - , "aliases": [ - "cry" - ] - , "tags": [ - "sad" - , "tear" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😭" - , "description": "loudly crying face" - , "category": "Smileys & Emotion" - , "aliases": [ - "sob" - ] - , "tags": [ - "sad" - , "cry" - , "bawling" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😱" - , "description": "face screaming in fear" - , "category": "Smileys & Emotion" - , "aliases": [ - "scream" - ] - , "tags": [ - "horror" - , "shocked" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😖" - , "description": "confounded face" - , "category": "Smileys & Emotion" - , "aliases": [ - "confounded" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😣" - , "description": "persevering face" - , "category": "Smileys & Emotion" - , "aliases": [ - "persevere" - ] - , "tags": [ - "struggling" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😞" - , "description": "disappointed face" - , "category": "Smileys & Emotion" - , "aliases": [ - "disappointed" - ] - , "tags": [ - "sad" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😓" - , "description": "downcast face with sweat" - , "category": "Smileys & Emotion" - , "aliases": [ - "sweat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😩" - , "description": "weary face" - , "category": "Smileys & Emotion" - , "aliases": [ - "weary" - ] - , "tags": [ - "tired" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😫" - , "description": "tired face" - , "category": "Smileys & Emotion" - , "aliases": [ - "tired_face" - ] - , "tags": [ - "upset" - , "whine" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥱" - , "description": "yawning face" - , "category": "Smileys & Emotion" - , "aliases": [ - "yawning_face" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "😤" - , "description": "face with steam from nose" - , "category": "Smileys & Emotion" - , "aliases": [ - "triumph" - ] - , "tags": [ - "smug" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😡" - , "description": "enraged face" - , "category": "Smileys & Emotion" - , "aliases": [ - "rage" - , "pout" - ] - , "tags": [ - "angry" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😠" - , "description": "angry face" - , "category": "Smileys & Emotion" - , "aliases": [ - "angry" - ] - , "tags": [ - "mad" - , "annoyed" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤬" - , "description": "face with symbols on mouth" - , "category": "Smileys & Emotion" - , "aliases": [ - "cursing_face" - ] - , "tags": [ - "foul" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "😈" - , "description": "smiling face with horns" - , "category": "Smileys & Emotion" - , "aliases": [ - "smiling_imp" - ] - , "tags": [ - "devil" - , "evil" - , "horns" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👿" - , "description": "angry face with horns" - , "category": "Smileys & Emotion" - , "aliases": [ - "imp" - ] - , "tags": [ - "angry" - , "devil" - , "evil" - , "horns" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💀" - , "description": "skull" - , "category": "Smileys & Emotion" - , "aliases": [ - "skull" - ] - , "tags": [ - "dead" - , "danger" - , "poison" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "☠️" - , "description": "skull and crossbones" - , "category": "Smileys & Emotion" - , "aliases": [ - "skull_and_crossbones" - ] - , "tags": [ - "danger" - , "pirate" - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "💩" - , "description": "pile of poo" - , "category": "Smileys & Emotion" - , "aliases": [ - "hankey" - , "poop" - , "shit" - ] - , "tags": [ - "crap" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤡" - , "description": "clown face" - , "category": "Smileys & Emotion" - , "aliases": [ - "clown_face" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "👹" - , "description": "ogre" - , "category": "Smileys & Emotion" - , "aliases": [ - "japanese_ogre" - ] - , "tags": [ - "monster" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👺" - , "description": "goblin" - , "category": "Smileys & Emotion" - , "aliases": [ - "japanese_goblin" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👻" - , "description": "ghost" - , "category": "Smileys & Emotion" - , "aliases": [ - "ghost" - ] - , "tags": [ - "halloween" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👽" - , "description": "alien" - , "category": "Smileys & Emotion" - , "aliases": [ - "alien" - ] - , "tags": [ - "ufo" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👾" - , "description": "alien monster" - , "category": "Smileys & Emotion" - , "aliases": [ - "space_invader" - ] - , "tags": [ - "game" - , "retro" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤖" - , "description": "robot" - , "category": "Smileys & Emotion" - , "aliases": [ - "robot" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "😺" - , "description": "grinning cat" - , "category": "Smileys & Emotion" - , "aliases": [ - "smiley_cat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😸" - , "description": "grinning cat with smiling eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "smile_cat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😹" - , "description": "cat with tears of joy" - , "category": "Smileys & Emotion" - , "aliases": [ - "joy_cat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😻" - , "description": "smiling cat with heart-eyes" - , "category": "Smileys & Emotion" - , "aliases": [ - "heart_eyes_cat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😼" - , "description": "cat with wry smile" - , "category": "Smileys & Emotion" - , "aliases": [ - "smirk_cat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😽" - , "description": "kissing cat" - , "category": "Smileys & Emotion" - , "aliases": [ - "kissing_cat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🙀" - , "description": "weary cat" - , "category": "Smileys & Emotion" - , "aliases": [ - "scream_cat" - ] - , "tags": [ - "horror" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😿" - , "description": "crying cat" - , "category": "Smileys & Emotion" - , "aliases": [ - "crying_cat_face" - ] - , "tags": [ - "sad" - , "tear" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "😾" - , "description": "pouting cat" - , "category": "Smileys & Emotion" - , "aliases": [ - "pouting_cat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🙈" - , "description": "see-no-evil monkey" - , "category": "Smileys & Emotion" - , "aliases": [ - "see_no_evil" - ] - , "tags": [ - "monkey" - , "blind" - , "ignore" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🙉" - , "description": "hear-no-evil monkey" - , "category": "Smileys & Emotion" - , "aliases": [ - "hear_no_evil" - ] - , "tags": [ - "monkey" - , "deaf" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🙊" - , "description": "speak-no-evil monkey" - , "category": "Smileys & Emotion" - , "aliases": [ - "speak_no_evil" - ] - , "tags": [ - "monkey" - , "mute" - , "hush" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💌" - , "description": "love letter" - , "category": "Smileys & Emotion" - , "aliases": [ - "love_letter" - ] - , "tags": [ - "email" - , "envelope" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💘" - , "description": "heart with arrow" - , "category": "Smileys & Emotion" - , "aliases": [ - "cupid" - ] - , "tags": [ - "love" - , "heart" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💝" - , "description": "heart with ribbon" - , "category": "Smileys & Emotion" - , "aliases": [ - "gift_heart" - ] - , "tags": [ - "chocolates" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💖" - , "description": "sparkling heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "sparkling_heart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💗" - , "description": "growing heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "heartpulse" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💓" - , "description": "beating heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "heartbeat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💞" - , "description": "revolving hearts" - , "category": "Smileys & Emotion" - , "aliases": [ - "revolving_hearts" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💕" - , "description": "two hearts" - , "category": "Smileys & Emotion" - , "aliases": [ - "two_hearts" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💟" - , "description": "heart decoration" - , "category": "Smileys & Emotion" - , "aliases": [ - "heart_decoration" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "❣️" - , "description": "heart exclamation" - , "category": "Smileys & Emotion" - , "aliases": [ - "heavy_heart_exclamation" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "💔" - , "description": "broken heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "broken_heart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "❤️‍🔥" - , "description": "heart on fire" - , "category": "Smileys & Emotion" - , "aliases": [ - "heart_on_fire" - ] - , "tags": [ - ] - , "unicode_version": "13.1" - , "ios_version": "14.0" - } -, { - "emoji": "❤️‍🩹" - , "description": "mending heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "mending_heart" - ] - , "tags": [ - ] - , "unicode_version": "13.1" - , "ios_version": "14.0" - } -, { - "emoji": "❤️" - , "description": "red heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "heart" - ] - , "tags": [ - "love" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🩷" - , "description": "pink heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "pink_heart" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🧡" - , "description": "orange heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "orange_heart" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "💛" - , "description": "yellow heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "yellow_heart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💚" - , "description": "green heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "green_heart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💙" - , "description": "blue heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "blue_heart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🩵" - , "description": "light blue heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "light_blue_heart" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "💜" - , "description": "purple heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "purple_heart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤎" - , "description": "brown heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "brown_heart" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🖤" - , "description": "black heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "black_heart" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🩶" - , "description": "grey heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "grey_heart" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🤍" - , "description": "white heart" - , "category": "Smileys & Emotion" - , "aliases": [ - "white_heart" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "💋" - , "description": "kiss mark" - , "category": "Smileys & Emotion" - , "aliases": [ - "kiss" - ] - , "tags": [ - "lipstick" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💯" - , "description": "hundred points" - , "category": "Smileys & Emotion" - , "aliases": [ - "100" - ] - , "tags": [ - "score" - , "perfect" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💢" - , "description": "anger symbol" - , "category": "Smileys & Emotion" - , "aliases": [ - "anger" - ] - , "tags": [ - "angry" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💥" - , "description": "collision" - , "category": "Smileys & Emotion" - , "aliases": [ - "boom" - , "collision" - ] - , "tags": [ - "explode" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💫" - , "description": "dizzy" - , "category": "Smileys & Emotion" - , "aliases": [ - "dizzy" - ] - , "tags": [ - "star" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💦" - , "description": "sweat droplets" - , "category": "Smileys & Emotion" - , "aliases": [ - "sweat_drops" - ] - , "tags": [ - "water" - , "workout" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💨" - , "description": "dashing away" - , "category": "Smileys & Emotion" - , "aliases": [ - "dash" - ] - , "tags": [ - "wind" - , "blow" - , "fast" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕳️" - , "description": "hole" - , "category": "Smileys & Emotion" - , "aliases": [ - "hole" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "💬" - , "description": "speech balloon" - , "category": "Smileys & Emotion" - , "aliases": [ - "speech_balloon" - ] - , "tags": [ - "comment" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👁️‍🗨️" - , "description": "eye in speech bubble" - , "category": "Smileys & Emotion" - , "aliases": [ - "eye_speech_bubble" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🗨️" - , "description": "left speech bubble" - , "category": "Smileys & Emotion" - , "aliases": [ - "left_speech_bubble" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🗯️" - , "description": "right anger bubble" - , "category": "Smileys & Emotion" - , "aliases": [ - "right_anger_bubble" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "💭" - , "description": "thought balloon" - , "category": "Smileys & Emotion" - , "aliases": [ - "thought_balloon" - ] - , "tags": [ - "thinking" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💤" - , "description": "ZZZ" - , "category": "Smileys & Emotion" - , "aliases": [ - "zzz" - ] - , "tags": [ - "sleeping" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👋" - , "description": "waving hand" - , "category": "People & Body" - , "aliases": [ - "wave" - ] - , "tags": [ - "goodbye" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🤚" - , "description": "raised back of hand" - , "category": "People & Body" - , "aliases": [ - "raised_back_of_hand" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🖐️" - , "description": "hand with fingers splayed" - , "category": "People & Body" - , "aliases": [ - "raised_hand_with_fingers_splayed" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "✋" - , "description": "raised hand" - , "category": "People & Body" - , "aliases": [ - "hand" - , "raised_hand" - ] - , "tags": [ - "highfive" - , "stop" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🖖" - , "description": "vulcan salute" - , "category": "People & Body" - , "aliases": [ - "vulcan_salute" - ] - , "tags": [ - "prosper" - , "spock" - ] - , "unicode_version": "7.0" - , "ios_version": "8.3" - , "skin_tones": true - } -, { - "emoji": "🫱" - , "description": "rightwards hand" - , "category": "People & Body" - , "aliases": [ - "rightwards_hand" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🫲" - , "description": "leftwards hand" - , "category": "People & Body" - , "aliases": [ - "leftwards_hand" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🫳" - , "description": "palm down hand" - , "category": "People & Body" - , "aliases": [ - "palm_down_hand" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🫴" - , "description": "palm up hand" - , "category": "People & Body" - , "aliases": [ - "palm_up_hand" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🫷" - , "description": "leftwards pushing hand" - , "category": "People & Body" - , "aliases": [ - "leftwards_pushing_hand" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - , "skin_tones": true - } -, { - "emoji": "🫸" - , "description": "rightwards pushing hand" - , "category": "People & Body" - , "aliases": [ - "rightwards_pushing_hand" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - , "skin_tones": true - } -, { - "emoji": "👌" - , "description": "OK hand" - , "category": "People & Body" - , "aliases": [ - "ok_hand" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🤌" - , "description": "pinched fingers" - , "category": "People & Body" - , "aliases": [ - "pinched_fingers" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "🤏" - , "description": "pinching hand" - , "category": "People & Body" - , "aliases": [ - "pinching_hand" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "✌️" - , "description": "victory hand" - , "category": "People & Body" - , "aliases": [ - "v" - ] - , "tags": [ - "victory" - , "peace" - ] - , "unicode_version": "" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🤞" - , "description": "crossed fingers" - , "category": "People & Body" - , "aliases": [ - "crossed_fingers" - ] - , "tags": [ - "luck" - , "hopeful" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🫰" - , "description": "hand with index finger and thumb crossed" - , "category": "People & Body" - , "aliases": [ - "hand_with_index_finger_and_thumb_crossed" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🤟" - , "description": "love-you gesture" - , "category": "People & Body" - , "aliases": [ - "love_you_gesture" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤘" - , "description": "sign of the horns" - , "category": "People & Body" - , "aliases": [ - "metal" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "🤙" - , "description": "call me hand" - , "category": "People & Body" - , "aliases": [ - "call_me_hand" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👈" - , "description": "backhand index pointing left" - , "category": "People & Body" - , "aliases": [ - "point_left" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👉" - , "description": "backhand index pointing right" - , "category": "People & Body" - , "aliases": [ - "point_right" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👆" - , "description": "backhand index pointing up" - , "category": "People & Body" - , "aliases": [ - "point_up_2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🖕" - , "description": "middle finger" - , "category": "People & Body" - , "aliases": [ - "middle_finger" - , "fu" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "👇" - , "description": "backhand index pointing down" - , "category": "People & Body" - , "aliases": [ - "point_down" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "☝️" - , "description": "index pointing up" - , "category": "People & Body" - , "aliases": [ - "point_up" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🫵" - , "description": "index pointing at the viewer" - , "category": "People & Body" - , "aliases": [ - "index_pointing_at_the_viewer" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "👍" - , "description": "thumbs up" - , "category": "People & Body" - , "aliases": [ - "+1" - , "thumbsup" - ] - , "tags": [ - "approve" - , "ok" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👎" - , "description": "thumbs down" - , "category": "People & Body" - , "aliases": [ - "-1" - , "thumbsdown" - ] - , "tags": [ - "disapprove" - , "bury" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "✊" - , "description": "raised fist" - , "category": "People & Body" - , "aliases": [ - "fist_raised" - , "fist" - ] - , "tags": [ - "power" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👊" - , "description": "oncoming fist" - , "category": "People & Body" - , "aliases": [ - "fist_oncoming" - , "facepunch" - , "punch" - ] - , "tags": [ - "attack" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🤛" - , "description": "left-facing fist" - , "category": "People & Body" - , "aliases": [ - "fist_left" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤜" - , "description": "right-facing fist" - , "category": "People & Body" - , "aliases": [ - "fist_right" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👏" - , "description": "clapping hands" - , "category": "People & Body" - , "aliases": [ - "clap" - ] - , "tags": [ - "praise" - , "applause" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙌" - , "description": "raising hands" - , "category": "People & Body" - , "aliases": [ - "raised_hands" - ] - , "tags": [ - "hooray" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🫶" - , "description": "heart hands" - , "category": "People & Body" - , "aliases": [ - "heart_hands" - ] - , "tags": [ - "love" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "👐" - , "description": "open hands" - , "category": "People & Body" - , "aliases": [ - "open_hands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🤲" - , "description": "palms up together" - , "category": "People & Body" - , "aliases": [ - "palms_up_together" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤝" - , "description": "handshake" - , "category": "People & Body" - , "aliases": [ - "handshake" - ] - , "tags": [ - "deal" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🙏" - , "description": "folded hands" - , "category": "People & Body" - , "aliases": [ - "pray" - ] - , "tags": [ - "please" - , "hope" - , "wish" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "✍️" - , "description": "writing hand" - , "category": "People & Body" - , "aliases": [ - "writing_hand" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "💅" - , "description": "nail polish" - , "category": "People & Body" - , "aliases": [ - "nail_care" - ] - , "tags": [ - "beauty" - , "manicure" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🤳" - , "description": "selfie" - , "category": "People & Body" - , "aliases": [ - "selfie" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "💪" - , "description": "flexed biceps" - , "category": "People & Body" - , "aliases": [ - "muscle" - ] - , "tags": [ - "flex" - , "bicep" - , "strong" - , "workout" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🦾" - , "description": "mechanical arm" - , "category": "People & Body" - , "aliases": [ - "mechanical_arm" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🦿" - , "description": "mechanical leg" - , "category": "People & Body" - , "aliases": [ - "mechanical_leg" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🦵" - , "description": "leg" - , "category": "People & Body" - , "aliases": [ - "leg" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🦶" - , "description": "foot" - , "category": "People & Body" - , "aliases": [ - "foot" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👂" - , "description": "ear" - , "category": "People & Body" - , "aliases": [ - "ear" - ] - , "tags": [ - "hear" - , "sound" - , "listen" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🦻" - , "description": "ear with hearing aid" - , "category": "People & Body" - , "aliases": [ - "ear_with_hearing_aid" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "👃" - , "description": "nose" - , "category": "People & Body" - , "aliases": [ - "nose" - ] - , "tags": [ - "smell" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🧠" - , "description": "brain" - , "category": "People & Body" - , "aliases": [ - "brain" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🫀" - , "description": "anatomical heart" - , "category": "People & Body" - , "aliases": [ - "anatomical_heart" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🫁" - , "description": "lungs" - , "category": "People & Body" - , "aliases": [ - "lungs" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🦷" - , "description": "tooth" - , "category": "People & Body" - , "aliases": [ - "tooth" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦴" - , "description": "bone" - , "category": "People & Body" - , "aliases": [ - "bone" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "👀" - , "description": "eyes" - , "category": "People & Body" - , "aliases": [ - "eyes" - ] - , "tags": [ - "look" - , "see" - , "watch" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👁️" - , "description": "eye" - , "category": "People & Body" - , "aliases": [ - "eye" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "👅" - , "description": "tongue" - , "category": "People & Body" - , "aliases": [ - "tongue" - ] - , "tags": [ - "taste" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👄" - , "description": "mouth" - , "category": "People & Body" - , "aliases": [ - "lips" - ] - , "tags": [ - "kiss" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫦" - , "description": "biting lip" - , "category": "People & Body" - , "aliases": [ - "biting_lip" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "👶" - , "description": "baby" - , "category": "People & Body" - , "aliases": [ - "baby" - ] - , "tags": [ - "child" - , "newborn" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🧒" - , "description": "child" - , "category": "People & Body" - , "aliases": [ - "child" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👦" - , "description": "boy" - , "category": "People & Body" - , "aliases": [ - "boy" - ] - , "tags": [ - "child" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👧" - , "description": "girl" - , "category": "People & Body" - , "aliases": [ - "girl" - ] - , "tags": [ - "child" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🧑" - , "description": "person" - , "category": "People & Body" - , "aliases": [ - "adult" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👱" - , "description": "person: blond hair" - , "category": "People & Body" - , "aliases": [ - "blond_haired_person" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👨" - , "description": "man" - , "category": "People & Body" - , "aliases": [ - "man" - ] - , "tags": [ - "mustache" - , "father" - , "dad" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🧔" - , "description": "person: beard" - , "category": "People & Body" - , "aliases": [ - "bearded_person" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧔‍♂️" - , "description": "man: beard" - , "category": "People & Body" - , "aliases": [ - "man_beard" - ] - , "tags": [ - ] - , "unicode_version": "13.1" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "🧔‍♀️" - , "description": "woman: beard" - , "category": "People & Body" - , "aliases": [ - "woman_beard" - ] - , "tags": [ - ] - , "unicode_version": "13.1" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "👨‍🦰" - , "description": "man: red hair" - , "category": "People & Body" - , "aliases": [ - "red_haired_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👨‍🦱" - , "description": "man: curly hair" - , "category": "People & Body" - , "aliases": [ - "curly_haired_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👨‍🦳" - , "description": "man: white hair" - , "category": "People & Body" - , "aliases": [ - "white_haired_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👨‍🦲" - , "description": "man: bald" - , "category": "People & Body" - , "aliases": [ - "bald_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👩" - , "description": "woman" - , "category": "People & Body" - , "aliases": [ - "woman" - ] - , "tags": [ - "girls" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👩‍🦰" - , "description": "woman: red hair" - , "category": "People & Body" - , "aliases": [ - "red_haired_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧑‍🦰" - , "description": "person: red hair" - , "category": "People & Body" - , "aliases": [ - "person_red_hair" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🦱" - , "description": "woman: curly hair" - , "category": "People & Body" - , "aliases": [ - "curly_haired_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧑‍🦱" - , "description": "person: curly hair" - , "category": "People & Body" - , "aliases": [ - "person_curly_hair" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🦳" - , "description": "woman: white hair" - , "category": "People & Body" - , "aliases": [ - "white_haired_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧑‍🦳" - , "description": "person: white hair" - , "category": "People & Body" - , "aliases": [ - "person_white_hair" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🦲" - , "description": "woman: bald" - , "category": "People & Body" - , "aliases": [ - "bald_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧑‍🦲" - , "description": "person: bald" - , "category": "People & Body" - , "aliases": [ - "person_bald" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👱‍♀️" - , "description": "woman: blond hair" - , "category": "People & Body" - , "aliases": [ - "blond_haired_woman" - , "blonde_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "👱‍♂️" - , "description": "man: blond hair" - , "category": "People & Body" - , "aliases": [ - "blond_haired_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧓" - , "description": "older person" - , "category": "People & Body" - , "aliases": [ - "older_adult" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👴" - , "description": "old man" - , "category": "People & Body" - , "aliases": [ - "older_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👵" - , "description": "old woman" - , "category": "People & Body" - , "aliases": [ - "older_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙍" - , "description": "person frowning" - , "category": "People & Body" - , "aliases": [ - "frowning_person" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙍‍♂️" - , "description": "man frowning" - , "category": "People & Body" - , "aliases": [ - "frowning_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🙍‍♀️" - , "description": "woman frowning" - , "category": "People & Body" - , "aliases": [ - "frowning_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🙎" - , "description": "person pouting" - , "category": "People & Body" - , "aliases": [ - "pouting_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙎‍♂️" - , "description": "man pouting" - , "category": "People & Body" - , "aliases": [ - "pouting_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🙎‍♀️" - , "description": "woman pouting" - , "category": "People & Body" - , "aliases": [ - "pouting_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🙅" - , "description": "person gesturing NO" - , "category": "People & Body" - , "aliases": [ - "no_good" - ] - , "tags": [ - "stop" - , "halt" - , "denied" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙅‍♂️" - , "description": "man gesturing NO" - , "category": "People & Body" - , "aliases": [ - "no_good_man" - , "ng_man" - ] - , "tags": [ - "stop" - , "halt" - , "denied" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🙅‍♀️" - , "description": "woman gesturing NO" - , "category": "People & Body" - , "aliases": [ - "no_good_woman" - , "ng_woman" - ] - , "tags": [ - "stop" - , "halt" - , "denied" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🙆" - , "description": "person gesturing OK" - , "category": "People & Body" - , "aliases": [ - "ok_person" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙆‍♂️" - , "description": "man gesturing OK" - , "category": "People & Body" - , "aliases": [ - "ok_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🙆‍♀️" - , "description": "woman gesturing OK" - , "category": "People & Body" - , "aliases": [ - "ok_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "💁" - , "description": "person tipping hand" - , "category": "People & Body" - , "aliases": [ - "tipping_hand_person" - , "information_desk_person" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "💁‍♂️" - , "description": "man tipping hand" - , "category": "People & Body" - , "aliases": [ - "tipping_hand_man" - , "sassy_man" - ] - , "tags": [ - "information" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "💁‍♀️" - , "description": "woman tipping hand" - , "category": "People & Body" - , "aliases": [ - "tipping_hand_woman" - , "sassy_woman" - ] - , "tags": [ - "information" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🙋" - , "description": "person raising hand" - , "category": "People & Body" - , "aliases": [ - "raising_hand" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙋‍♂️" - , "description": "man raising hand" - , "category": "People & Body" - , "aliases": [ - "raising_hand_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🙋‍♀️" - , "description": "woman raising hand" - , "category": "People & Body" - , "aliases": [ - "raising_hand_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧏" - , "description": "deaf person" - , "category": "People & Body" - , "aliases": [ - "deaf_person" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧏‍♂️" - , "description": "deaf man" - , "category": "People & Body" - , "aliases": [ - "deaf_man" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧏‍♀️" - , "description": "deaf woman" - , "category": "People & Body" - , "aliases": [ - "deaf_woman" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🙇" - , "description": "person bowing" - , "category": "People & Body" - , "aliases": [ - "bow" - ] - , "tags": [ - "respect" - , "thanks" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🙇‍♂️" - , "description": "man bowing" - , "category": "People & Body" - , "aliases": [ - "bowing_man" - ] - , "tags": [ - "respect" - , "thanks" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🙇‍♀️" - , "description": "woman bowing" - , "category": "People & Body" - , "aliases": [ - "bowing_woman" - ] - , "tags": [ - "respect" - , "thanks" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🤦" - , "description": "person facepalming" - , "category": "People & Body" - , "aliases": [ - "facepalm" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤦‍♂️" - , "description": "man facepalming" - , "category": "People & Body" - , "aliases": [ - "man_facepalming" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤦‍♀️" - , "description": "woman facepalming" - , "category": "People & Body" - , "aliases": [ - "woman_facepalming" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤷" - , "description": "person shrugging" - , "category": "People & Body" - , "aliases": [ - "shrug" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤷‍♂️" - , "description": "man shrugging" - , "category": "People & Body" - , "aliases": [ - "man_shrugging" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤷‍♀️" - , "description": "woman shrugging" - , "category": "People & Body" - , "aliases": [ - "woman_shrugging" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍⚕️" - , "description": "health worker" - , "category": "People & Body" - , "aliases": [ - "health_worker" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍⚕️" - , "description": "man health worker" - , "category": "People & Body" - , "aliases": [ - "man_health_worker" - ] - , "tags": [ - "doctor" - , "nurse" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍⚕️" - , "description": "woman health worker" - , "category": "People & Body" - , "aliases": [ - "woman_health_worker" - ] - , "tags": [ - "doctor" - , "nurse" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🎓" - , "description": "student" - , "category": "People & Body" - , "aliases": [ - "student" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🎓" - , "description": "man student" - , "category": "People & Body" - , "aliases": [ - "man_student" - ] - , "tags": [ - "graduation" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🎓" - , "description": "woman student" - , "category": "People & Body" - , "aliases": [ - "woman_student" - ] - , "tags": [ - "graduation" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🏫" - , "description": "teacher" - , "category": "People & Body" - , "aliases": [ - "teacher" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🏫" - , "description": "man teacher" - , "category": "People & Body" - , "aliases": [ - "man_teacher" - ] - , "tags": [ - "school" - , "professor" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🏫" - , "description": "woman teacher" - , "category": "People & Body" - , "aliases": [ - "woman_teacher" - ] - , "tags": [ - "school" - , "professor" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍⚖️" - , "description": "judge" - , "category": "People & Body" - , "aliases": [ - "judge" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍⚖️" - , "description": "man judge" - , "category": "People & Body" - , "aliases": [ - "man_judge" - ] - , "tags": [ - "justice" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍⚖️" - , "description": "woman judge" - , "category": "People & Body" - , "aliases": [ - "woman_judge" - ] - , "tags": [ - "justice" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🌾" - , "description": "farmer" - , "category": "People & Body" - , "aliases": [ - "farmer" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🌾" - , "description": "man farmer" - , "category": "People & Body" - , "aliases": [ - "man_farmer" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🌾" - , "description": "woman farmer" - , "category": "People & Body" - , "aliases": [ - "woman_farmer" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🍳" - , "description": "cook" - , "category": "People & Body" - , "aliases": [ - "cook" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🍳" - , "description": "man cook" - , "category": "People & Body" - , "aliases": [ - "man_cook" - ] - , "tags": [ - "chef" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🍳" - , "description": "woman cook" - , "category": "People & Body" - , "aliases": [ - "woman_cook" - ] - , "tags": [ - "chef" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🔧" - , "description": "mechanic" - , "category": "People & Body" - , "aliases": [ - "mechanic" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🔧" - , "description": "man mechanic" - , "category": "People & Body" - , "aliases": [ - "man_mechanic" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🔧" - , "description": "woman mechanic" - , "category": "People & Body" - , "aliases": [ - "woman_mechanic" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🏭" - , "description": "factory worker" - , "category": "People & Body" - , "aliases": [ - "factory_worker" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🏭" - , "description": "man factory worker" - , "category": "People & Body" - , "aliases": [ - "man_factory_worker" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🏭" - , "description": "woman factory worker" - , "category": "People & Body" - , "aliases": [ - "woman_factory_worker" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍💼" - , "description": "office worker" - , "category": "People & Body" - , "aliases": [ - "office_worker" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍💼" - , "description": "man office worker" - , "category": "People & Body" - , "aliases": [ - "man_office_worker" - ] - , "tags": [ - "business" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍💼" - , "description": "woman office worker" - , "category": "People & Body" - , "aliases": [ - "woman_office_worker" - ] - , "tags": [ - "business" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🔬" - , "description": "scientist" - , "category": "People & Body" - , "aliases": [ - "scientist" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🔬" - , "description": "man scientist" - , "category": "People & Body" - , "aliases": [ - "man_scientist" - ] - , "tags": [ - "research" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🔬" - , "description": "woman scientist" - , "category": "People & Body" - , "aliases": [ - "woman_scientist" - ] - , "tags": [ - "research" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍💻" - , "description": "technologist" - , "category": "People & Body" - , "aliases": [ - "technologist" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍💻" - , "description": "man technologist" - , "category": "People & Body" - , "aliases": [ - "man_technologist" - ] - , "tags": [ - "coder" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍💻" - , "description": "woman technologist" - , "category": "People & Body" - , "aliases": [ - "woman_technologist" - ] - , "tags": [ - "coder" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🎤" - , "description": "singer" - , "category": "People & Body" - , "aliases": [ - "singer" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🎤" - , "description": "man singer" - , "category": "People & Body" - , "aliases": [ - "man_singer" - ] - , "tags": [ - "rockstar" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🎤" - , "description": "woman singer" - , "category": "People & Body" - , "aliases": [ - "woman_singer" - ] - , "tags": [ - "rockstar" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🎨" - , "description": "artist" - , "category": "People & Body" - , "aliases": [ - "artist" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🎨" - , "description": "man artist" - , "category": "People & Body" - , "aliases": [ - "man_artist" - ] - , "tags": [ - "painter" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🎨" - , "description": "woman artist" - , "category": "People & Body" - , "aliases": [ - "woman_artist" - ] - , "tags": [ - "painter" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍✈️" - , "description": "pilot" - , "category": "People & Body" - , "aliases": [ - "pilot" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍✈️" - , "description": "man pilot" - , "category": "People & Body" - , "aliases": [ - "man_pilot" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍✈️" - , "description": "woman pilot" - , "category": "People & Body" - , "aliases": [ - "woman_pilot" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🚀" - , "description": "astronaut" - , "category": "People & Body" - , "aliases": [ - "astronaut" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🚀" - , "description": "man astronaut" - , "category": "People & Body" - , "aliases": [ - "man_astronaut" - ] - , "tags": [ - "space" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🚀" - , "description": "woman astronaut" - , "category": "People & Body" - , "aliases": [ - "woman_astronaut" - ] - , "tags": [ - "space" - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🚒" - , "description": "firefighter" - , "category": "People & Body" - , "aliases": [ - "firefighter" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🚒" - , "description": "man firefighter" - , "category": "People & Body" - , "aliases": [ - "man_firefighter" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👩‍🚒" - , "description": "woman firefighter" - , "category": "People & Body" - , "aliases": [ - "woman_firefighter" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👮" - , "description": "police officer" - , "category": "People & Body" - , "aliases": [ - "police_officer" - , "cop" - ] - , "tags": [ - "law" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👮‍♂️" - , "description": "man police officer" - , "category": "People & Body" - , "aliases": [ - "policeman" - ] - , "tags": [ - "law" - , "cop" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👮‍♀️" - , "description": "woman police officer" - , "category": "People & Body" - , "aliases": [ - "policewoman" - ] - , "tags": [ - "law" - , "cop" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🕵️" - , "description": "detective" - , "category": "People & Body" - , "aliases": [ - "detective" - ] - , "tags": [ - "sleuth" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "🕵️‍♂️" - , "description": "man detective" - , "category": "People & Body" - , "aliases": [ - "male_detective" - ] - , "tags": [ - "sleuth" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🕵️‍♀️" - , "description": "woman detective" - , "category": "People & Body" - , "aliases": [ - "female_detective" - ] - , "tags": [ - "sleuth" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "💂" - , "description": "guard" - , "category": "People & Body" - , "aliases": [ - "guard" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "💂‍♂️" - , "description": "man guard" - , "category": "People & Body" - , "aliases": [ - "guardsman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "💂‍♀️" - , "description": "woman guard" - , "category": "People & Body" - , "aliases": [ - "guardswoman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🥷" - , "description": "ninja" - , "category": "People & Body" - , "aliases": [ - "ninja" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "👷" - , "description": "construction worker" - , "category": "People & Body" - , "aliases": [ - "construction_worker" - ] - , "tags": [ - "helmet" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👷‍♂️" - , "description": "man construction worker" - , "category": "People & Body" - , "aliases": [ - "construction_worker_man" - ] - , "tags": [ - "helmet" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👷‍♀️" - , "description": "woman construction worker" - , "category": "People & Body" - , "aliases": [ - "construction_worker_woman" - ] - , "tags": [ - "helmet" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🫅" - , "description": "person with crown" - , "category": "People & Body" - , "aliases": [ - "person_with_crown" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🤴" - , "description": "prince" - , "category": "People & Body" - , "aliases": [ - "prince" - ] - , "tags": [ - "crown" - , "royal" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "👸" - , "description": "princess" - , "category": "People & Body" - , "aliases": [ - "princess" - ] - , "tags": [ - "crown" - , "royal" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👳" - , "description": "person wearing turban" - , "category": "People & Body" - , "aliases": [ - "person_with_turban" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👳‍♂️" - , "description": "man wearing turban" - , "category": "People & Body" - , "aliases": [ - "man_with_turban" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👳‍♀️" - , "description": "woman wearing turban" - , "category": "People & Body" - , "aliases": [ - "woman_with_turban" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "👲" - , "description": "person with skullcap" - , "category": "People & Body" - , "aliases": [ - "man_with_gua_pi_mao" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🧕" - , "description": "woman with headscarf" - , "category": "People & Body" - , "aliases": [ - "woman_with_headscarf" - ] - , "tags": [ - "hijab" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤵" - , "description": "person in tuxedo" - , "category": "People & Body" - , "aliases": [ - "person_in_tuxedo" - ] - , "tags": [ - "groom" - , "marriage" - , "wedding" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤵‍♂️" - , "description": "man in tuxedo" - , "category": "People & Body" - , "aliases": [ - "man_in_tuxedo" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "🤵‍♀️" - , "description": "woman in tuxedo" - , "category": "People & Body" - , "aliases": [ - "woman_in_tuxedo" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "👰" - , "description": "person with veil" - , "category": "People & Body" - , "aliases": [ - "person_with_veil" - ] - , "tags": [ - "marriage" - , "wedding" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👰‍♂️" - , "description": "man with veil" - , "category": "People & Body" - , "aliases": [ - "man_with_veil" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "👰‍♀️" - , "description": "woman with veil" - , "category": "People & Body" - , "aliases": [ - "woman_with_veil" - , "bride_with_veil" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "🤰" - , "description": "pregnant woman" - , "category": "People & Body" - , "aliases": [ - "pregnant_woman" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🫃" - , "description": "pregnant man" - , "category": "People & Body" - , "aliases": [ - "pregnant_man" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🫄" - , "description": "pregnant person" - , "category": "People & Body" - , "aliases": [ - "pregnant_person" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - , "skin_tones": true - } -, { - "emoji": "🤱" - , "description": "breast-feeding" - , "category": "People & Body" - , "aliases": [ - "breast_feeding" - ] - , "tags": [ - "nursing" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👩‍🍼" - , "description": "woman feeding baby" - , "category": "People & Body" - , "aliases": [ - "woman_feeding_baby" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "👨‍🍼" - , "description": "man feeding baby" - , "category": "People & Body" - , "aliases": [ - "man_feeding_baby" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "🧑‍🍼" - , "description": "person feeding baby" - , "category": "People & Body" - , "aliases": [ - "person_feeding_baby" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "👼" - , "description": "baby angel" - , "category": "People & Body" - , "aliases": [ - "angel" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🎅" - , "description": "Santa Claus" - , "category": "People & Body" - , "aliases": [ - "santa" - ] - , "tags": [ - "christmas" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🤶" - , "description": "Mrs. Claus" - , "category": "People & Body" - , "aliases": [ - "mrs_claus" - ] - , "tags": [ - "santa" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧑‍🎄" - , "description": "mx claus" - , "category": "People & Body" - , "aliases": [ - "mx_claus" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - , "skin_tones": true - } -, { - "emoji": "🦸" - , "description": "superhero" - , "category": "People & Body" - , "aliases": [ - "superhero" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🦸‍♂️" - , "description": "man superhero" - , "category": "People & Body" - , "aliases": [ - "superhero_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🦸‍♀️" - , "description": "woman superhero" - , "category": "People & Body" - , "aliases": [ - "superhero_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🦹" - , "description": "supervillain" - , "category": "People & Body" - , "aliases": [ - "supervillain" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🦹‍♂️" - , "description": "man supervillain" - , "category": "People & Body" - , "aliases": [ - "supervillain_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🦹‍♀️" - , "description": "woman supervillain" - , "category": "People & Body" - , "aliases": [ - "supervillain_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧙" - , "description": "mage" - , "category": "People & Body" - , "aliases": [ - "mage" - ] - , "tags": [ - "wizard" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧙‍♂️" - , "description": "man mage" - , "category": "People & Body" - , "aliases": [ - "mage_man" - ] - , "tags": [ - "wizard" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧙‍♀️" - , "description": "woman mage" - , "category": "People & Body" - , "aliases": [ - "mage_woman" - ] - , "tags": [ - "wizard" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧚" - , "description": "fairy" - , "category": "People & Body" - , "aliases": [ - "fairy" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧚‍♂️" - , "description": "man fairy" - , "category": "People & Body" - , "aliases": [ - "fairy_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧚‍♀️" - , "description": "woman fairy" - , "category": "People & Body" - , "aliases": [ - "fairy_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧛" - , "description": "vampire" - , "category": "People & Body" - , "aliases": [ - "vampire" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧛‍♂️" - , "description": "man vampire" - , "category": "People & Body" - , "aliases": [ - "vampire_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧛‍♀️" - , "description": "woman vampire" - , "category": "People & Body" - , "aliases": [ - "vampire_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧜" - , "description": "merperson" - , "category": "People & Body" - , "aliases": [ - "merperson" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧜‍♂️" - , "description": "merman" - , "category": "People & Body" - , "aliases": [ - "merman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧜‍♀️" - , "description": "mermaid" - , "category": "People & Body" - , "aliases": [ - "mermaid" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧝" - , "description": "elf" - , "category": "People & Body" - , "aliases": [ - "elf" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧝‍♂️" - , "description": "man elf" - , "category": "People & Body" - , "aliases": [ - "elf_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧝‍♀️" - , "description": "woman elf" - , "category": "People & Body" - , "aliases": [ - "elf_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧞" - , "description": "genie" - , "category": "People & Body" - , "aliases": [ - "genie" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧞‍♂️" - , "description": "man genie" - , "category": "People & Body" - , "aliases": [ - "genie_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧞‍♀️" - , "description": "woman genie" - , "category": "People & Body" - , "aliases": [ - "genie_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧟" - , "description": "zombie" - , "category": "People & Body" - , "aliases": [ - "zombie" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧟‍♂️" - , "description": "man zombie" - , "category": "People & Body" - , "aliases": [ - "zombie_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧟‍♀️" - , "description": "woman zombie" - , "category": "People & Body" - , "aliases": [ - "zombie_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧌" - , "description": "troll" - , "category": "People & Body" - , "aliases": [ - "troll" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "💆" - , "description": "person getting massage" - , "category": "People & Body" - , "aliases": [ - "massage" - ] - , "tags": [ - "spa" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "💆‍♂️" - , "description": "man getting massage" - , "category": "People & Body" - , "aliases": [ - "massage_man" - ] - , "tags": [ - "spa" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "💆‍♀️" - , "description": "woman getting massage" - , "category": "People & Body" - , "aliases": [ - "massage_woman" - ] - , "tags": [ - "spa" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "💇" - , "description": "person getting haircut" - , "category": "People & Body" - , "aliases": [ - "haircut" - ] - , "tags": [ - "beauty" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "💇‍♂️" - , "description": "man getting haircut" - , "category": "People & Body" - , "aliases": [ - "haircut_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "💇‍♀️" - , "description": "woman getting haircut" - , "category": "People & Body" - , "aliases": [ - "haircut_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🚶" - , "description": "person walking" - , "category": "People & Body" - , "aliases": [ - "walking" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🚶‍♂️" - , "description": "man walking" - , "category": "People & Body" - , "aliases": [ - "walking_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🚶‍♀️" - , "description": "woman walking" - , "category": "People & Body" - , "aliases": [ - "walking_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🧍" - , "description": "person standing" - , "category": "People & Body" - , "aliases": [ - "standing_person" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧍‍♂️" - , "description": "man standing" - , "category": "People & Body" - , "aliases": [ - "standing_man" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧍‍♀️" - , "description": "woman standing" - , "category": "People & Body" - , "aliases": [ - "standing_woman" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧎" - , "description": "person kneeling" - , "category": "People & Body" - , "aliases": [ - "kneeling_person" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧎‍♂️" - , "description": "man kneeling" - , "category": "People & Body" - , "aliases": [ - "kneeling_man" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧎‍♀️" - , "description": "woman kneeling" - , "category": "People & Body" - , "aliases": [ - "kneeling_woman" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧑‍🦯" - , "description": "person with white cane" - , "category": "People & Body" - , "aliases": [ - "person_with_probing_cane" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🦯" - , "description": "man with white cane" - , "category": "People & Body" - , "aliases": [ - "man_with_probing_cane" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "👩‍🦯" - , "description": "woman with white cane" - , "category": "People & Body" - , "aliases": [ - "woman_with_probing_cane" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧑‍🦼" - , "description": "person in motorized wheelchair" - , "category": "People & Body" - , "aliases": [ - "person_in_motorized_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🦼" - , "description": "man in motorized wheelchair" - , "category": "People & Body" - , "aliases": [ - "man_in_motorized_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "👩‍🦼" - , "description": "woman in motorized wheelchair" - , "category": "People & Body" - , "aliases": [ - "woman_in_motorized_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🧑‍🦽" - , "description": "person in manual wheelchair" - , "category": "People & Body" - , "aliases": [ - "person_in_manual_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.1" - , "ios_version": "13.2" - , "skin_tones": true - } -, { - "emoji": "👨‍🦽" - , "description": "man in manual wheelchair" - , "category": "People & Body" - , "aliases": [ - "man_in_manual_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "👩‍🦽" - , "description": "woman in manual wheelchair" - , "category": "People & Body" - , "aliases": [ - "woman_in_manual_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "🏃" - , "description": "person running" - , "category": "People & Body" - , "aliases": [ - "runner" - , "running" - ] - , "tags": [ - "exercise" - , "workout" - , "marathon" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🏃‍♂️" - , "description": "man running" - , "category": "People & Body" - , "aliases": [ - "running_man" - ] - , "tags": [ - "exercise" - , "workout" - , "marathon" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🏃‍♀️" - , "description": "woman running" - , "category": "People & Body" - , "aliases": [ - "running_woman" - ] - , "tags": [ - "exercise" - , "workout" - , "marathon" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "💃" - , "description": "woman dancing" - , "category": "People & Body" - , "aliases": [ - "woman_dancing" - , "dancer" - ] - , "tags": [ - "dress" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🕺" - , "description": "man dancing" - , "category": "People & Body" - , "aliases": [ - "man_dancing" - ] - , "tags": [ - "dancer" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🕴️" - , "description": "person in suit levitating" - , "category": "People & Body" - , "aliases": [ - "business_suit_levitating" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "👯" - , "description": "people with bunny ears" - , "category": "People & Body" - , "aliases": [ - "dancers" - ] - , "tags": [ - "bunny" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👯‍♂️" - , "description": "men with bunny ears" - , "category": "People & Body" - , "aliases": [ - "dancing_men" - ] - , "tags": [ - "bunny" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👯‍♀️" - , "description": "women with bunny ears" - , "category": "People & Body" - , "aliases": [ - "dancing_women" - ] - , "tags": [ - "bunny" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧖" - , "description": "person in steamy room" - , "category": "People & Body" - , "aliases": [ - "sauna_person" - ] - , "tags": [ - "steamy" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧖‍♂️" - , "description": "man in steamy room" - , "category": "People & Body" - , "aliases": [ - "sauna_man" - ] - , "tags": [ - "steamy" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧖‍♀️" - , "description": "woman in steamy room" - , "category": "People & Body" - , "aliases": [ - "sauna_woman" - ] - , "tags": [ - "steamy" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧗" - , "description": "person climbing" - , "category": "People & Body" - , "aliases": [ - "climbing" - ] - , "tags": [ - "bouldering" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧗‍♂️" - , "description": "man climbing" - , "category": "People & Body" - , "aliases": [ - "climbing_man" - ] - , "tags": [ - "bouldering" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧗‍♀️" - , "description": "woman climbing" - , "category": "People & Body" - , "aliases": [ - "climbing_woman" - ] - , "tags": [ - "bouldering" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤺" - , "description": "person fencing" - , "category": "People & Body" - , "aliases": [ - "person_fencing" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🏇" - , "description": "horse racing" - , "category": "People & Body" - , "aliases": [ - "horse_racing" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "⛷️" - , "description": "skier" - , "category": "People & Body" - , "aliases": [ - "skier" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "🏂" - , "description": "snowboarder" - , "category": "People & Body" - , "aliases": [ - "snowboarder" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🏌️" - , "description": "person golfing" - , "category": "People & Body" - , "aliases": [ - "golfing" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "🏌️‍♂️" - , "description": "man golfing" - , "category": "People & Body" - , "aliases": [ - "golfing_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🏌️‍♀️" - , "description": "woman golfing" - , "category": "People & Body" - , "aliases": [ - "golfing_woman" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🏄" - , "description": "person surfing" - , "category": "People & Body" - , "aliases": [ - "surfer" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🏄‍♂️" - , "description": "man surfing" - , "category": "People & Body" - , "aliases": [ - "surfing_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🏄‍♀️" - , "description": "woman surfing" - , "category": "People & Body" - , "aliases": [ - "surfing_woman" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🚣" - , "description": "person rowing boat" - , "category": "People & Body" - , "aliases": [ - "rowboat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🚣‍♂️" - , "description": "man rowing boat" - , "category": "People & Body" - , "aliases": [ - "rowing_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🚣‍♀️" - , "description": "woman rowing boat" - , "category": "People & Body" - , "aliases": [ - "rowing_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🏊" - , "description": "person swimming" - , "category": "People & Body" - , "aliases": [ - "swimmer" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🏊‍♂️" - , "description": "man swimming" - , "category": "People & Body" - , "aliases": [ - "swimming_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🏊‍♀️" - , "description": "woman swimming" - , "category": "People & Body" - , "aliases": [ - "swimming_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "⛹️" - , "description": "person bouncing ball" - , "category": "People & Body" - , "aliases": [ - "bouncing_ball_person" - ] - , "tags": [ - "basketball" - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "⛹️‍♂️" - , "description": "man bouncing ball" - , "category": "People & Body" - , "aliases": [ - "bouncing_ball_man" - , "basketball_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "⛹️‍♀️" - , "description": "woman bouncing ball" - , "category": "People & Body" - , "aliases": [ - "bouncing_ball_woman" - , "basketball_woman" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🏋️" - , "description": "person lifting weights" - , "category": "People & Body" - , "aliases": [ - "weight_lifting" - ] - , "tags": [ - "gym" - , "workout" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "🏋️‍♂️" - , "description": "man lifting weights" - , "category": "People & Body" - , "aliases": [ - "weight_lifting_man" - ] - , "tags": [ - "gym" - , "workout" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🏋️‍♀️" - , "description": "woman lifting weights" - , "category": "People & Body" - , "aliases": [ - "weight_lifting_woman" - ] - , "tags": [ - "gym" - , "workout" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🚴" - , "description": "person biking" - , "category": "People & Body" - , "aliases": [ - "bicyclist" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🚴‍♂️" - , "description": "man biking" - , "category": "People & Body" - , "aliases": [ - "biking_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🚴‍♀️" - , "description": "woman biking" - , "category": "People & Body" - , "aliases": [ - "biking_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🚵" - , "description": "person mountain biking" - , "category": "People & Body" - , "aliases": [ - "mountain_bicyclist" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🚵‍♂️" - , "description": "man mountain biking" - , "category": "People & Body" - , "aliases": [ - "mountain_biking_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🚵‍♀️" - , "description": "woman mountain biking" - , "category": "People & Body" - , "aliases": [ - "mountain_biking_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - , "skin_tones": true - } -, { - "emoji": "🤸" - , "description": "person cartwheeling" - , "category": "People & Body" - , "aliases": [ - "cartwheeling" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤸‍♂️" - , "description": "man cartwheeling" - , "category": "People & Body" - , "aliases": [ - "man_cartwheeling" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤸‍♀️" - , "description": "woman cartwheeling" - , "category": "People & Body" - , "aliases": [ - "woman_cartwheeling" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤼" - , "description": "people wrestling" - , "category": "People & Body" - , "aliases": [ - "wrestling" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🤼‍♂️" - , "description": "men wrestling" - , "category": "People & Body" - , "aliases": [ - "men_wrestling" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🤼‍♀️" - , "description": "women wrestling" - , "category": "People & Body" - , "aliases": [ - "women_wrestling" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🤽" - , "description": "person playing water polo" - , "category": "People & Body" - , "aliases": [ - "water_polo" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤽‍♂️" - , "description": "man playing water polo" - , "category": "People & Body" - , "aliases": [ - "man_playing_water_polo" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤽‍♀️" - , "description": "woman playing water polo" - , "category": "People & Body" - , "aliases": [ - "woman_playing_water_polo" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤾" - , "description": "person playing handball" - , "category": "People & Body" - , "aliases": [ - "handball_person" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤾‍♂️" - , "description": "man playing handball" - , "category": "People & Body" - , "aliases": [ - "man_playing_handball" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤾‍♀️" - , "description": "woman playing handball" - , "category": "People & Body" - , "aliases": [ - "woman_playing_handball" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤹" - , "description": "person juggling" - , "category": "People & Body" - , "aliases": [ - "juggling_person" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🤹‍♂️" - , "description": "man juggling" - , "category": "People & Body" - , "aliases": [ - "man_juggling" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🤹‍♀️" - , "description": "woman juggling" - , "category": "People & Body" - , "aliases": [ - "woman_juggling" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - , "skin_tones": true - } -, { - "emoji": "🧘" - , "description": "person in lotus position" - , "category": "People & Body" - , "aliases": [ - "lotus_position" - ] - , "tags": [ - "meditation" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧘‍♂️" - , "description": "man in lotus position" - , "category": "People & Body" - , "aliases": [ - "lotus_position_man" - ] - , "tags": [ - "meditation" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🧘‍♀️" - , "description": "woman in lotus position" - , "category": "People & Body" - , "aliases": [ - "lotus_position_woman" - ] - , "tags": [ - "meditation" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "🛀" - , "description": "person taking bath" - , "category": "People & Body" - , "aliases": [ - "bath" - ] - , "tags": [ - "shower" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "🛌" - , "description": "person in bed" - , "category": "People & Body" - , "aliases": [ - "sleeping_bed" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - , "skin_tones": true - } -, { - "emoji": "🧑‍🤝‍🧑" - , "description": "people holding hands" - , "category": "People & Body" - , "aliases": [ - "people_holding_hands" - ] - , "tags": [ - "couple" - , "date" - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - , "skin_tones": true - } -, { - "emoji": "👭" - , "description": "women holding hands" - , "category": "People & Body" - , "aliases": [ - "two_women_holding_hands" - ] - , "tags": [ - "couple" - , "date" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👫" - , "description": "woman and man holding hands" - , "category": "People & Body" - , "aliases": [ - "couple" - ] - , "tags": [ - "date" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👬" - , "description": "men holding hands" - , "category": "People & Body" - , "aliases": [ - "two_men_holding_hands" - ] - , "tags": [ - "couple" - , "date" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "💏" - , "description": "kiss" - , "category": "People & Body" - , "aliases": [ - "couplekiss" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👩‍❤️‍💋‍👨" - , "description": "kiss: woman, man" - , "category": "People & Body" - , "aliases": [ - "couplekiss_man_woman" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👨‍❤️‍💋‍👨" - , "description": "kiss: man, man" - , "category": "People & Body" - , "aliases": [ - "couplekiss_man_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - , "skin_tones": true - } -, { - "emoji": "👩‍❤️‍💋‍👩" - , "description": "kiss: woman, woman" - , "category": "People & Body" - , "aliases": [ - "couplekiss_woman_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - , "skin_tones": true - } -, { - "emoji": "💑" - , "description": "couple with heart" - , "category": "People & Body" - , "aliases": [ - "couple_with_heart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - , "skin_tones": true - } -, { - "emoji": "👩‍❤️‍👨" - , "description": "couple with heart: woman, man" - , "category": "People & Body" - , "aliases": [ - "couple_with_heart_woman_man" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - , "skin_tones": true - } -, { - "emoji": "👨‍❤️‍👨" - , "description": "couple with heart: man, man" - , "category": "People & Body" - , "aliases": [ - "couple_with_heart_man_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - , "skin_tones": true - } -, { - "emoji": "👩‍❤️‍👩" - , "description": "couple with heart: woman, woman" - , "category": "People & Body" - , "aliases": [ - "couple_with_heart_woman_woman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - , "skin_tones": true - } -, { - "emoji": "👪" - , "description": "family" - , "category": "People & Body" - , "aliases": [ - "family" - ] - , "tags": [ - "home" - , "parents" - , "child" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👨‍👩‍👦" - , "description": "family: man, woman, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_woman_boy" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "👨‍👩‍👧" - , "description": "family: man, woman, girl" - , "category": "People & Body" - , "aliases": [ - "family_man_woman_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👩‍👧‍👦" - , "description": "family: man, woman, girl, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_woman_girl_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👩‍👦‍👦" - , "description": "family: man, woman, boy, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_woman_boy_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👩‍👧‍👧" - , "description": "family: man, woman, girl, girl" - , "category": "People & Body" - , "aliases": [ - "family_man_woman_girl_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👨‍👦" - , "description": "family: man, man, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_man_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👨‍👧" - , "description": "family: man, man, girl" - , "category": "People & Body" - , "aliases": [ - "family_man_man_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👨‍👧‍👦" - , "description": "family: man, man, girl, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_man_girl_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👨‍👦‍👦" - , "description": "family: man, man, boy, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_man_boy_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👨‍👧‍👧" - , "description": "family: man, man, girl, girl" - , "category": "People & Body" - , "aliases": [ - "family_man_man_girl_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👩‍👩‍👦" - , "description": "family: woman, woman, boy" - , "category": "People & Body" - , "aliases": [ - "family_woman_woman_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👩‍👩‍👧" - , "description": "family: woman, woman, girl" - , "category": "People & Body" - , "aliases": [ - "family_woman_woman_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👩‍👩‍👧‍👦" - , "description": "family: woman, woman, girl, boy" - , "category": "People & Body" - , "aliases": [ - "family_woman_woman_girl_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👩‍👩‍👦‍👦" - , "description": "family: woman, woman, boy, boy" - , "category": "People & Body" - , "aliases": [ - "family_woman_woman_boy_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👩‍👩‍👧‍👧" - , "description": "family: woman, woman, girl, girl" - , "category": "People & Body" - , "aliases": [ - "family_woman_woman_girl_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "👨‍👦" - , "description": "family: man, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👨‍👦‍👦" - , "description": "family: man, boy, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_boy_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👨‍👧" - , "description": "family: man, girl" - , "category": "People & Body" - , "aliases": [ - "family_man_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👨‍👧‍👦" - , "description": "family: man, girl, boy" - , "category": "People & Body" - , "aliases": [ - "family_man_girl_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👨‍👧‍👧" - , "description": "family: man, girl, girl" - , "category": "People & Body" - , "aliases": [ - "family_man_girl_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👩‍👦" - , "description": "family: woman, boy" - , "category": "People & Body" - , "aliases": [ - "family_woman_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👩‍👦‍👦" - , "description": "family: woman, boy, boy" - , "category": "People & Body" - , "aliases": [ - "family_woman_boy_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👩‍👧" - , "description": "family: woman, girl" - , "category": "People & Body" - , "aliases": [ - "family_woman_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👩‍👧‍👦" - , "description": "family: woman, girl, boy" - , "category": "People & Body" - , "aliases": [ - "family_woman_girl_boy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "👩‍👧‍👧" - , "description": "family: woman, girl, girl" - , "category": "People & Body" - , "aliases": [ - "family_woman_girl_girl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "🗣️" - , "description": "speaking head" - , "category": "People & Body" - , "aliases": [ - "speaking_head" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "👤" - , "description": "bust in silhouette" - , "category": "People & Body" - , "aliases": [ - "bust_in_silhouette" - ] - , "tags": [ - "user" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👥" - , "description": "busts in silhouette" - , "category": "People & Body" - , "aliases": [ - "busts_in_silhouette" - ] - , "tags": [ - "users" - , "group" - , "team" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫂" - , "description": "people hugging" - , "category": "People & Body" - , "aliases": [ - "people_hugging" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "👣" - , "description": "footprints" - , "category": "People & Body" - , "aliases": [ - "footprints" - ] - , "tags": [ - "feet" - , "tracks" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐵" - , "description": "monkey face" - , "category": "Animals & Nature" - , "aliases": [ - "monkey_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐒" - , "description": "monkey" - , "category": "Animals & Nature" - , "aliases": [ - "monkey" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦍" - , "description": "gorilla" - , "category": "Animals & Nature" - , "aliases": [ - "gorilla" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦧" - , "description": "orangutan" - , "category": "Animals & Nature" - , "aliases": [ - "orangutan" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🐶" - , "description": "dog face" - , "category": "Animals & Nature" - , "aliases": [ - "dog" - ] - , "tags": [ - "pet" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐕" - , "description": "dog" - , "category": "Animals & Nature" - , "aliases": [ - "dog2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦮" - , "description": "guide dog" - , "category": "Animals & Nature" - , "aliases": [ - "guide_dog" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🐕‍🦺" - , "description": "service dog" - , "category": "Animals & Nature" - , "aliases": [ - "service_dog" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🐩" - , "description": "poodle" - , "category": "Animals & Nature" - , "aliases": [ - "poodle" - ] - , "tags": [ - "dog" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐺" - , "description": "wolf" - , "category": "Animals & Nature" - , "aliases": [ - "wolf" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦊" - , "description": "fox" - , "category": "Animals & Nature" - , "aliases": [ - "fox_face" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦝" - , "description": "raccoon" - , "category": "Animals & Nature" - , "aliases": [ - "raccoon" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🐱" - , "description": "cat face" - , "category": "Animals & Nature" - , "aliases": [ - "cat" - ] - , "tags": [ - "pet" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐈" - , "description": "cat" - , "category": "Animals & Nature" - , "aliases": [ - "cat2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐈‍⬛" - , "description": "black cat" - , "category": "Animals & Nature" - , "aliases": [ - "black_cat" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🦁" - , "description": "lion" - , "category": "Animals & Nature" - , "aliases": [ - "lion" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🐯" - , "description": "tiger face" - , "category": "Animals & Nature" - , "aliases": [ - "tiger" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐅" - , "description": "tiger" - , "category": "Animals & Nature" - , "aliases": [ - "tiger2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐆" - , "description": "leopard" - , "category": "Animals & Nature" - , "aliases": [ - "leopard" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐴" - , "description": "horse face" - , "category": "Animals & Nature" - , "aliases": [ - "horse" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫎" - , "description": "moose" - , "category": "Animals & Nature" - , "aliases": [ - "moose" - ] - , "tags": [ - "canada" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🫏" - , "description": "donkey" - , "category": "Animals & Nature" - , "aliases": [ - "donkey" - ] - , "tags": [ - "mule" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🐎" - , "description": "horse" - , "category": "Animals & Nature" - , "aliases": [ - "racehorse" - ] - , "tags": [ - "speed" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦄" - , "description": "unicorn" - , "category": "Animals & Nature" - , "aliases": [ - "unicorn" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🦓" - , "description": "zebra" - , "category": "Animals & Nature" - , "aliases": [ - "zebra" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦌" - , "description": "deer" - , "category": "Animals & Nature" - , "aliases": [ - "deer" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦬" - , "description": "bison" - , "category": "Animals & Nature" - , "aliases": [ - "bison" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🐮" - , "description": "cow face" - , "category": "Animals & Nature" - , "aliases": [ - "cow" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐂" - , "description": "ox" - , "category": "Animals & Nature" - , "aliases": [ - "ox" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐃" - , "description": "water buffalo" - , "category": "Animals & Nature" - , "aliases": [ - "water_buffalo" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐄" - , "description": "cow" - , "category": "Animals & Nature" - , "aliases": [ - "cow2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐷" - , "description": "pig face" - , "category": "Animals & Nature" - , "aliases": [ - "pig" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐖" - , "description": "pig" - , "category": "Animals & Nature" - , "aliases": [ - "pig2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐗" - , "description": "boar" - , "category": "Animals & Nature" - , "aliases": [ - "boar" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐽" - , "description": "pig nose" - , "category": "Animals & Nature" - , "aliases": [ - "pig_nose" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐏" - , "description": "ram" - , "category": "Animals & Nature" - , "aliases": [ - "ram" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐑" - , "description": "ewe" - , "category": "Animals & Nature" - , "aliases": [ - "sheep" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐐" - , "description": "goat" - , "category": "Animals & Nature" - , "aliases": [ - "goat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐪" - , "description": "camel" - , "category": "Animals & Nature" - , "aliases": [ - "dromedary_camel" - ] - , "tags": [ - "desert" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐫" - , "description": "two-hump camel" - , "category": "Animals & Nature" - , "aliases": [ - "camel" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦙" - , "description": "llama" - , "category": "Animals & Nature" - , "aliases": [ - "llama" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦒" - , "description": "giraffe" - , "category": "Animals & Nature" - , "aliases": [ - "giraffe" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🐘" - , "description": "elephant" - , "category": "Animals & Nature" - , "aliases": [ - "elephant" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦣" - , "description": "mammoth" - , "category": "Animals & Nature" - , "aliases": [ - "mammoth" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🦏" - , "description": "rhinoceros" - , "category": "Animals & Nature" - , "aliases": [ - "rhinoceros" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦛" - , "description": "hippopotamus" - , "category": "Animals & Nature" - , "aliases": [ - "hippopotamus" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🐭" - , "description": "mouse face" - , "category": "Animals & Nature" - , "aliases": [ - "mouse" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐁" - , "description": "mouse" - , "category": "Animals & Nature" - , "aliases": [ - "mouse2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐀" - , "description": "rat" - , "category": "Animals & Nature" - , "aliases": [ - "rat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐹" - , "description": "hamster" - , "category": "Animals & Nature" - , "aliases": [ - "hamster" - ] - , "tags": [ - "pet" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐰" - , "description": "rabbit face" - , "category": "Animals & Nature" - , "aliases": [ - "rabbit" - ] - , "tags": [ - "bunny" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐇" - , "description": "rabbit" - , "category": "Animals & Nature" - , "aliases": [ - "rabbit2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐿️" - , "description": "chipmunk" - , "category": "Animals & Nature" - , "aliases": [ - "chipmunk" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🦫" - , "description": "beaver" - , "category": "Animals & Nature" - , "aliases": [ - "beaver" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🦔" - , "description": "hedgehog" - , "category": "Animals & Nature" - , "aliases": [ - "hedgehog" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦇" - , "description": "bat" - , "category": "Animals & Nature" - , "aliases": [ - "bat" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🐻" - , "description": "bear" - , "category": "Animals & Nature" - , "aliases": [ - "bear" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐻‍❄️" - , "description": "polar bear" - , "category": "Animals & Nature" - , "aliases": [ - "polar_bear" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🐨" - , "description": "koala" - , "category": "Animals & Nature" - , "aliases": [ - "koala" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐼" - , "description": "panda" - , "category": "Animals & Nature" - , "aliases": [ - "panda_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦥" - , "description": "sloth" - , "category": "Animals & Nature" - , "aliases": [ - "sloth" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🦦" - , "description": "otter" - , "category": "Animals & Nature" - , "aliases": [ - "otter" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🦨" - , "description": "skunk" - , "category": "Animals & Nature" - , "aliases": [ - "skunk" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🦘" - , "description": "kangaroo" - , "category": "Animals & Nature" - , "aliases": [ - "kangaroo" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦡" - , "description": "badger" - , "category": "Animals & Nature" - , "aliases": [ - "badger" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🐾" - , "description": "paw prints" - , "category": "Animals & Nature" - , "aliases": [ - "feet" - , "paw_prints" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦃" - , "description": "turkey" - , "category": "Animals & Nature" - , "aliases": [ - "turkey" - ] - , "tags": [ - "thanksgiving" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🐔" - , "description": "chicken" - , "category": "Animals & Nature" - , "aliases": [ - "chicken" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐓" - , "description": "rooster" - , "category": "Animals & Nature" - , "aliases": [ - "rooster" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐣" - , "description": "hatching chick" - , "category": "Animals & Nature" - , "aliases": [ - "hatching_chick" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐤" - , "description": "baby chick" - , "category": "Animals & Nature" - , "aliases": [ - "baby_chick" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐥" - , "description": "front-facing baby chick" - , "category": "Animals & Nature" - , "aliases": [ - "hatched_chick" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐦" - , "description": "bird" - , "category": "Animals & Nature" - , "aliases": [ - "bird" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐧" - , "description": "penguin" - , "category": "Animals & Nature" - , "aliases": [ - "penguin" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕊️" - , "description": "dove" - , "category": "Animals & Nature" - , "aliases": [ - "dove" - ] - , "tags": [ - "peace" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🦅" - , "description": "eagle" - , "category": "Animals & Nature" - , "aliases": [ - "eagle" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦆" - , "description": "duck" - , "category": "Animals & Nature" - , "aliases": [ - "duck" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦢" - , "description": "swan" - , "category": "Animals & Nature" - , "aliases": [ - "swan" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦉" - , "description": "owl" - , "category": "Animals & Nature" - , "aliases": [ - "owl" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦤" - , "description": "dodo" - , "category": "Animals & Nature" - , "aliases": [ - "dodo" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪶" - , "description": "feather" - , "category": "Animals & Nature" - , "aliases": [ - "feather" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🦩" - , "description": "flamingo" - , "category": "Animals & Nature" - , "aliases": [ - "flamingo" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🦚" - , "description": "peacock" - , "category": "Animals & Nature" - , "aliases": [ - "peacock" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦜" - , "description": "parrot" - , "category": "Animals & Nature" - , "aliases": [ - "parrot" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪽" - , "description": "wing" - , "category": "Animals & Nature" - , "aliases": [ - "wing" - ] - , "tags": [ - "fly" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🐦‍⬛" - , "description": "black bird" - , "category": "Animals & Nature" - , "aliases": [ - "black_bird" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🪿" - , "description": "goose" - , "category": "Animals & Nature" - , "aliases": [ - "goose" - ] - , "tags": [ - "honk" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🐸" - , "description": "frog" - , "category": "Animals & Nature" - , "aliases": [ - "frog" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐊" - , "description": "crocodile" - , "category": "Animals & Nature" - , "aliases": [ - "crocodile" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐢" - , "description": "turtle" - , "category": "Animals & Nature" - , "aliases": [ - "turtle" - ] - , "tags": [ - "slow" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦎" - , "description": "lizard" - , "category": "Animals & Nature" - , "aliases": [ - "lizard" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🐍" - , "description": "snake" - , "category": "Animals & Nature" - , "aliases": [ - "snake" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐲" - , "description": "dragon face" - , "category": "Animals & Nature" - , "aliases": [ - "dragon_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐉" - , "description": "dragon" - , "category": "Animals & Nature" - , "aliases": [ - "dragon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦕" - , "description": "sauropod" - , "category": "Animals & Nature" - , "aliases": [ - "sauropod" - ] - , "tags": [ - "dinosaur" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦖" - , "description": "T-Rex" - , "category": "Animals & Nature" - , "aliases": [ - "t-rex" - ] - , "tags": [ - "dinosaur" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🐳" - , "description": "spouting whale" - , "category": "Animals & Nature" - , "aliases": [ - "whale" - ] - , "tags": [ - "sea" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐋" - , "description": "whale" - , "category": "Animals & Nature" - , "aliases": [ - "whale2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐬" - , "description": "dolphin" - , "category": "Animals & Nature" - , "aliases": [ - "dolphin" - , "flipper" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦭" - , "description": "seal" - , "category": "Animals & Nature" - , "aliases": [ - "seal" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🐟" - , "description": "fish" - , "category": "Animals & Nature" - , "aliases": [ - "fish" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐠" - , "description": "tropical fish" - , "category": "Animals & Nature" - , "aliases": [ - "tropical_fish" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐡" - , "description": "blowfish" - , "category": "Animals & Nature" - , "aliases": [ - "blowfish" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦈" - , "description": "shark" - , "category": "Animals & Nature" - , "aliases": [ - "shark" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🐙" - , "description": "octopus" - , "category": "Animals & Nature" - , "aliases": [ - "octopus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐚" - , "description": "spiral shell" - , "category": "Animals & Nature" - , "aliases": [ - "shell" - ] - , "tags": [ - "sea" - , "beach" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪸" - , "description": "coral" - , "category": "Animals & Nature" - , "aliases": [ - "coral" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🪼" - , "description": "jellyfish" - , "category": "Animals & Nature" - , "aliases": [ - "jellyfish" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🐌" - , "description": "snail" - , "category": "Animals & Nature" - , "aliases": [ - "snail" - ] - , "tags": [ - "slow" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦋" - , "description": "butterfly" - , "category": "Animals & Nature" - , "aliases": [ - "butterfly" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🐛" - , "description": "bug" - , "category": "Animals & Nature" - , "aliases": [ - "bug" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐜" - , "description": "ant" - , "category": "Animals & Nature" - , "aliases": [ - "ant" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🐝" - , "description": "honeybee" - , "category": "Animals & Nature" - , "aliases": [ - "bee" - , "honeybee" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪲" - , "description": "beetle" - , "category": "Animals & Nature" - , "aliases": [ - "beetle" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🐞" - , "description": "lady beetle" - , "category": "Animals & Nature" - , "aliases": [ - "lady_beetle" - ] - , "tags": [ - "bug" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🦗" - , "description": "cricket" - , "category": "Animals & Nature" - , "aliases": [ - "cricket" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪳" - , "description": "cockroach" - , "category": "Animals & Nature" - , "aliases": [ - "cockroach" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🕷️" - , "description": "spider" - , "category": "Animals & Nature" - , "aliases": [ - "spider" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🕸️" - , "description": "spider web" - , "category": "Animals & Nature" - , "aliases": [ - "spider_web" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🦂" - , "description": "scorpion" - , "category": "Animals & Nature" - , "aliases": [ - "scorpion" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🦟" - , "description": "mosquito" - , "category": "Animals & Nature" - , "aliases": [ - "mosquito" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪰" - , "description": "fly" - , "category": "Animals & Nature" - , "aliases": [ - "fly" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪱" - , "description": "worm" - , "category": "Animals & Nature" - , "aliases": [ - "worm" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🦠" - , "description": "microbe" - , "category": "Animals & Nature" - , "aliases": [ - "microbe" - ] - , "tags": [ - "germ" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "💐" - , "description": "bouquet" - , "category": "Animals & Nature" - , "aliases": [ - "bouquet" - ] - , "tags": [ - "flowers" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌸" - , "description": "cherry blossom" - , "category": "Animals & Nature" - , "aliases": [ - "cherry_blossom" - ] - , "tags": [ - "flower" - , "spring" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💮" - , "description": "white flower" - , "category": "Animals & Nature" - , "aliases": [ - "white_flower" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪷" - , "description": "lotus" - , "category": "Animals & Nature" - , "aliases": [ - "lotus" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🏵️" - , "description": "rosette" - , "category": "Animals & Nature" - , "aliases": [ - "rosette" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌹" - , "description": "rose" - , "category": "Animals & Nature" - , "aliases": [ - "rose" - ] - , "tags": [ - "flower" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥀" - , "description": "wilted flower" - , "category": "Animals & Nature" - , "aliases": [ - "wilted_flower" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🌺" - , "description": "hibiscus" - , "category": "Animals & Nature" - , "aliases": [ - "hibiscus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌻" - , "description": "sunflower" - , "category": "Animals & Nature" - , "aliases": [ - "sunflower" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌼" - , "description": "blossom" - , "category": "Animals & Nature" - , "aliases": [ - "blossom" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌷" - , "description": "tulip" - , "category": "Animals & Nature" - , "aliases": [ - "tulip" - ] - , "tags": [ - "flower" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪻" - , "description": "hyacinth" - , "category": "Animals & Nature" - , "aliases": [ - "hyacinth" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🌱" - , "description": "seedling" - , "category": "Animals & Nature" - , "aliases": [ - "seedling" - ] - , "tags": [ - "plant" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪴" - , "description": "potted plant" - , "category": "Animals & Nature" - , "aliases": [ - "potted_plant" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🌲" - , "description": "evergreen tree" - , "category": "Animals & Nature" - , "aliases": [ - "evergreen_tree" - ] - , "tags": [ - "wood" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌳" - , "description": "deciduous tree" - , "category": "Animals & Nature" - , "aliases": [ - "deciduous_tree" - ] - , "tags": [ - "wood" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌴" - , "description": "palm tree" - , "category": "Animals & Nature" - , "aliases": [ - "palm_tree" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌵" - , "description": "cactus" - , "category": "Animals & Nature" - , "aliases": [ - "cactus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌾" - , "description": "sheaf of rice" - , "category": "Animals & Nature" - , "aliases": [ - "ear_of_rice" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌿" - , "description": "herb" - , "category": "Animals & Nature" - , "aliases": [ - "herb" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "☘️" - , "description": "shamrock" - , "category": "Animals & Nature" - , "aliases": [ - "shamrock" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🍀" - , "description": "four leaf clover" - , "category": "Animals & Nature" - , "aliases": [ - "four_leaf_clover" - ] - , "tags": [ - "luck" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍁" - , "description": "maple leaf" - , "category": "Animals & Nature" - , "aliases": [ - "maple_leaf" - ] - , "tags": [ - "canada" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍂" - , "description": "fallen leaf" - , "category": "Animals & Nature" - , "aliases": [ - "fallen_leaf" - ] - , "tags": [ - "autumn" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍃" - , "description": "leaf fluttering in wind" - , "category": "Animals & Nature" - , "aliases": [ - "leaves" - ] - , "tags": [ - "leaf" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪹" - , "description": "empty nest" - , "category": "Animals & Nature" - , "aliases": [ - "empty_nest" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🪺" - , "description": "nest with eggs" - , "category": "Animals & Nature" - , "aliases": [ - "nest_with_eggs" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🍄" - , "description": "mushroom" - , "category": "Animals & Nature" - , "aliases": [ - "mushroom" - ] - , "tags": [ - "fungus" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍇" - , "description": "grapes" - , "category": "Food & Drink" - , "aliases": [ - "grapes" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍈" - , "description": "melon" - , "category": "Food & Drink" - , "aliases": [ - "melon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍉" - , "description": "watermelon" - , "category": "Food & Drink" - , "aliases": [ - "watermelon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍊" - , "description": "tangerine" - , "category": "Food & Drink" - , "aliases": [ - "tangerine" - , "orange" - , "mandarin" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍋" - , "description": "lemon" - , "category": "Food & Drink" - , "aliases": [ - "lemon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍌" - , "description": "banana" - , "category": "Food & Drink" - , "aliases": [ - "banana" - ] - , "tags": [ - "fruit" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍍" - , "description": "pineapple" - , "category": "Food & Drink" - , "aliases": [ - "pineapple" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥭" - , "description": "mango" - , "category": "Food & Drink" - , "aliases": [ - "mango" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🍎" - , "description": "red apple" - , "category": "Food & Drink" - , "aliases": [ - "apple" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍏" - , "description": "green apple" - , "category": "Food & Drink" - , "aliases": [ - "green_apple" - ] - , "tags": [ - "fruit" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍐" - , "description": "pear" - , "category": "Food & Drink" - , "aliases": [ - "pear" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍑" - , "description": "peach" - , "category": "Food & Drink" - , "aliases": [ - "peach" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍒" - , "description": "cherries" - , "category": "Food & Drink" - , "aliases": [ - "cherries" - ] - , "tags": [ - "fruit" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍓" - , "description": "strawberry" - , "category": "Food & Drink" - , "aliases": [ - "strawberry" - ] - , "tags": [ - "fruit" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫐" - , "description": "blueberries" - , "category": "Food & Drink" - , "aliases": [ - "blueberries" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🥝" - , "description": "kiwi fruit" - , "category": "Food & Drink" - , "aliases": [ - "kiwi_fruit" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🍅" - , "description": "tomato" - , "category": "Food & Drink" - , "aliases": [ - "tomato" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫒" - , "description": "olive" - , "category": "Food & Drink" - , "aliases": [ - "olive" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🥥" - , "description": "coconut" - , "category": "Food & Drink" - , "aliases": [ - "coconut" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥑" - , "description": "avocado" - , "category": "Food & Drink" - , "aliases": [ - "avocado" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🍆" - , "description": "eggplant" - , "category": "Food & Drink" - , "aliases": [ - "eggplant" - ] - , "tags": [ - "aubergine" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥔" - , "description": "potato" - , "category": "Food & Drink" - , "aliases": [ - "potato" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥕" - , "description": "carrot" - , "category": "Food & Drink" - , "aliases": [ - "carrot" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🌽" - , "description": "ear of corn" - , "category": "Food & Drink" - , "aliases": [ - "corn" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌶️" - , "description": "hot pepper" - , "category": "Food & Drink" - , "aliases": [ - "hot_pepper" - ] - , "tags": [ - "spicy" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🫑" - , "description": "bell pepper" - , "category": "Food & Drink" - , "aliases": [ - "bell_pepper" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🥒" - , "description": "cucumber" - , "category": "Food & Drink" - , "aliases": [ - "cucumber" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥬" - , "description": "leafy green" - , "category": "Food & Drink" - , "aliases": [ - "leafy_green" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥦" - , "description": "broccoli" - , "category": "Food & Drink" - , "aliases": [ - "broccoli" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧄" - , "description": "garlic" - , "category": "Food & Drink" - , "aliases": [ - "garlic" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🧅" - , "description": "onion" - , "category": "Food & Drink" - , "aliases": [ - "onion" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🥜" - , "description": "peanuts" - , "category": "Food & Drink" - , "aliases": [ - "peanuts" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🫘" - , "description": "beans" - , "category": "Food & Drink" - , "aliases": [ - "beans" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🌰" - , "description": "chestnut" - , "category": "Food & Drink" - , "aliases": [ - "chestnut" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫚" - , "description": "ginger root" - , "category": "Food & Drink" - , "aliases": [ - "ginger_root" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🫛" - , "description": "pea pod" - , "category": "Food & Drink" - , "aliases": [ - "pea_pod" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🍞" - , "description": "bread" - , "category": "Food & Drink" - , "aliases": [ - "bread" - ] - , "tags": [ - "toast" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥐" - , "description": "croissant" - , "category": "Food & Drink" - , "aliases": [ - "croissant" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥖" - , "description": "baguette bread" - , "category": "Food & Drink" - , "aliases": [ - "baguette_bread" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🫓" - , "description": "flatbread" - , "category": "Food & Drink" - , "aliases": [ - "flatbread" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🥨" - , "description": "pretzel" - , "category": "Food & Drink" - , "aliases": [ - "pretzel" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥯" - , "description": "bagel" - , "category": "Food & Drink" - , "aliases": [ - "bagel" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥞" - , "description": "pancakes" - , "category": "Food & Drink" - , "aliases": [ - "pancakes" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🧇" - , "description": "waffle" - , "category": "Food & Drink" - , "aliases": [ - "waffle" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🧀" - , "description": "cheese wedge" - , "category": "Food & Drink" - , "aliases": [ - "cheese" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🍖" - , "description": "meat on bone" - , "category": "Food & Drink" - , "aliases": [ - "meat_on_bone" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍗" - , "description": "poultry leg" - , "category": "Food & Drink" - , "aliases": [ - "poultry_leg" - ] - , "tags": [ - "meat" - , "chicken" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥩" - , "description": "cut of meat" - , "category": "Food & Drink" - , "aliases": [ - "cut_of_meat" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥓" - , "description": "bacon" - , "category": "Food & Drink" - , "aliases": [ - "bacon" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🍔" - , "description": "hamburger" - , "category": "Food & Drink" - , "aliases": [ - "hamburger" - ] - , "tags": [ - "burger" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍟" - , "description": "french fries" - , "category": "Food & Drink" - , "aliases": [ - "fries" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍕" - , "description": "pizza" - , "category": "Food & Drink" - , "aliases": [ - "pizza" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌭" - , "description": "hot dog" - , "category": "Food & Drink" - , "aliases": [ - "hotdog" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🥪" - , "description": "sandwich" - , "category": "Food & Drink" - , "aliases": [ - "sandwich" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🌮" - , "description": "taco" - , "category": "Food & Drink" - , "aliases": [ - "taco" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌯" - , "description": "burrito" - , "category": "Food & Drink" - , "aliases": [ - "burrito" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🫔" - , "description": "tamale" - , "category": "Food & Drink" - , "aliases": [ - "tamale" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🥙" - , "description": "stuffed flatbread" - , "category": "Food & Drink" - , "aliases": [ - "stuffed_flatbread" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🧆" - , "description": "falafel" - , "category": "Food & Drink" - , "aliases": [ - "falafel" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🥚" - , "description": "egg" - , "category": "Food & Drink" - , "aliases": [ - "egg" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🍳" - , "description": "cooking" - , "category": "Food & Drink" - , "aliases": [ - "fried_egg" - ] - , "tags": [ - "breakfast" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥘" - , "description": "shallow pan of food" - , "category": "Food & Drink" - , "aliases": [ - "shallow_pan_of_food" - ] - , "tags": [ - "paella" - , "curry" - ] - , "unicode_version": "" - , "ios_version": "10.2" - } -, { - "emoji": "🍲" - , "description": "pot of food" - , "category": "Food & Drink" - , "aliases": [ - "stew" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫕" - , "description": "fondue" - , "category": "Food & Drink" - , "aliases": [ - "fondue" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🥣" - , "description": "bowl with spoon" - , "category": "Food & Drink" - , "aliases": [ - "bowl_with_spoon" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥗" - , "description": "green salad" - , "category": "Food & Drink" - , "aliases": [ - "green_salad" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🍿" - , "description": "popcorn" - , "category": "Food & Drink" - , "aliases": [ - "popcorn" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🧈" - , "description": "butter" - , "category": "Food & Drink" - , "aliases": [ - "butter" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🧂" - , "description": "salt" - , "category": "Food & Drink" - , "aliases": [ - "salt" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥫" - , "description": "canned food" - , "category": "Food & Drink" - , "aliases": [ - "canned_food" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🍱" - , "description": "bento box" - , "category": "Food & Drink" - , "aliases": [ - "bento" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍘" - , "description": "rice cracker" - , "category": "Food & Drink" - , "aliases": [ - "rice_cracker" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍙" - , "description": "rice ball" - , "category": "Food & Drink" - , "aliases": [ - "rice_ball" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍚" - , "description": "cooked rice" - , "category": "Food & Drink" - , "aliases": [ - "rice" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍛" - , "description": "curry rice" - , "category": "Food & Drink" - , "aliases": [ - "curry" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍜" - , "description": "steaming bowl" - , "category": "Food & Drink" - , "aliases": [ - "ramen" - ] - , "tags": [ - "noodle" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍝" - , "description": "spaghetti" - , "category": "Food & Drink" - , "aliases": [ - "spaghetti" - ] - , "tags": [ - "pasta" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍠" - , "description": "roasted sweet potato" - , "category": "Food & Drink" - , "aliases": [ - "sweet_potato" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍢" - , "description": "oden" - , "category": "Food & Drink" - , "aliases": [ - "oden" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍣" - , "description": "sushi" - , "category": "Food & Drink" - , "aliases": [ - "sushi" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍤" - , "description": "fried shrimp" - , "category": "Food & Drink" - , "aliases": [ - "fried_shrimp" - ] - , "tags": [ - "tempura" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍥" - , "description": "fish cake with swirl" - , "category": "Food & Drink" - , "aliases": [ - "fish_cake" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥮" - , "description": "moon cake" - , "category": "Food & Drink" - , "aliases": [ - "moon_cake" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🍡" - , "description": "dango" - , "category": "Food & Drink" - , "aliases": [ - "dango" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥟" - , "description": "dumpling" - , "category": "Food & Drink" - , "aliases": [ - "dumpling" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥠" - , "description": "fortune cookie" - , "category": "Food & Drink" - , "aliases": [ - "fortune_cookie" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥡" - , "description": "takeout box" - , "category": "Food & Drink" - , "aliases": [ - "takeout_box" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦀" - , "description": "crab" - , "category": "Food & Drink" - , "aliases": [ - "crab" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🦞" - , "description": "lobster" - , "category": "Food & Drink" - , "aliases": [ - "lobster" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦐" - , "description": "shrimp" - , "category": "Food & Drink" - , "aliases": [ - "shrimp" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦑" - , "description": "squid" - , "category": "Food & Drink" - , "aliases": [ - "squid" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦪" - , "description": "oyster" - , "category": "Food & Drink" - , "aliases": [ - "oyster" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🍦" - , "description": "soft ice cream" - , "category": "Food & Drink" - , "aliases": [ - "icecream" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍧" - , "description": "shaved ice" - , "category": "Food & Drink" - , "aliases": [ - "shaved_ice" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍨" - , "description": "ice cream" - , "category": "Food & Drink" - , "aliases": [ - "ice_cream" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍩" - , "description": "doughnut" - , "category": "Food & Drink" - , "aliases": [ - "doughnut" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍪" - , "description": "cookie" - , "category": "Food & Drink" - , "aliases": [ - "cookie" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎂" - , "description": "birthday cake" - , "category": "Food & Drink" - , "aliases": [ - "birthday" - ] - , "tags": [ - "party" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍰" - , "description": "shortcake" - , "category": "Food & Drink" - , "aliases": [ - "cake" - ] - , "tags": [ - "dessert" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧁" - , "description": "cupcake" - , "category": "Food & Drink" - , "aliases": [ - "cupcake" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥧" - , "description": "pie" - , "category": "Food & Drink" - , "aliases": [ - "pie" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🍫" - , "description": "chocolate bar" - , "category": "Food & Drink" - , "aliases": [ - "chocolate_bar" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍬" - , "description": "candy" - , "category": "Food & Drink" - , "aliases": [ - "candy" - ] - , "tags": [ - "sweet" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍭" - , "description": "lollipop" - , "category": "Food & Drink" - , "aliases": [ - "lollipop" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍮" - , "description": "custard" - , "category": "Food & Drink" - , "aliases": [ - "custard" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍯" - , "description": "honey pot" - , "category": "Food & Drink" - , "aliases": [ - "honey_pot" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍼" - , "description": "baby bottle" - , "category": "Food & Drink" - , "aliases": [ - "baby_bottle" - ] - , "tags": [ - "milk" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥛" - , "description": "glass of milk" - , "category": "Food & Drink" - , "aliases": [ - "milk_glass" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "☕" - , "description": "hot beverage" - , "category": "Food & Drink" - , "aliases": [ - "coffee" - ] - , "tags": [ - "cafe" - , "espresso" - ] - , "unicode_version": "4.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫖" - , "description": "teapot" - , "category": "Food & Drink" - , "aliases": [ - "teapot" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🍵" - , "description": "teacup without handle" - , "category": "Food & Drink" - , "aliases": [ - "tea" - ] - , "tags": [ - "green" - , "breakfast" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍶" - , "description": "sake" - , "category": "Food & Drink" - , "aliases": [ - "sake" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍾" - , "description": "bottle with popping cork" - , "category": "Food & Drink" - , "aliases": [ - "champagne" - ] - , "tags": [ - "bottle" - , "bubbly" - , "celebration" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🍷" - , "description": "wine glass" - , "category": "Food & Drink" - , "aliases": [ - "wine_glass" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍸" - , "description": "cocktail glass" - , "category": "Food & Drink" - , "aliases": [ - "cocktail" - ] - , "tags": [ - "drink" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍹" - , "description": "tropical drink" - , "category": "Food & Drink" - , "aliases": [ - "tropical_drink" - ] - , "tags": [ - "summer" - , "vacation" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍺" - , "description": "beer mug" - , "category": "Food & Drink" - , "aliases": [ - "beer" - ] - , "tags": [ - "drink" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🍻" - , "description": "clinking beer mugs" - , "category": "Food & Drink" - , "aliases": [ - "beers" - ] - , "tags": [ - "drinks" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥂" - , "description": "clinking glasses" - , "category": "Food & Drink" - , "aliases": [ - "clinking_glasses" - ] - , "tags": [ - "cheers" - , "toast" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥃" - , "description": "tumbler glass" - , "category": "Food & Drink" - , "aliases": [ - "tumbler_glass" - ] - , "tags": [ - "whisky" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🫗" - , "description": "pouring liquid" - , "category": "Food & Drink" - , "aliases": [ - "pouring_liquid" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🥤" - , "description": "cup with straw" - , "category": "Food & Drink" - , "aliases": [ - "cup_with_straw" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧋" - , "description": "bubble tea" - , "category": "Food & Drink" - , "aliases": [ - "bubble_tea" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🧃" - , "description": "beverage box" - , "category": "Food & Drink" - , "aliases": [ - "beverage_box" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🧉" - , "description": "mate" - , "category": "Food & Drink" - , "aliases": [ - "mate" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🧊" - , "description": "ice" - , "category": "Food & Drink" - , "aliases": [ - "ice_cube" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🥢" - , "description": "chopsticks" - , "category": "Food & Drink" - , "aliases": [ - "chopsticks" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🍽️" - , "description": "fork and knife with plate" - , "category": "Food & Drink" - , "aliases": [ - "plate_with_cutlery" - ] - , "tags": [ - "dining" - , "dinner" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🍴" - , "description": "fork and knife" - , "category": "Food & Drink" - , "aliases": [ - "fork_and_knife" - ] - , "tags": [ - "cutlery" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥄" - , "description": "spoon" - , "category": "Food & Drink" - , "aliases": [ - "spoon" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🔪" - , "description": "kitchen knife" - , "category": "Food & Drink" - , "aliases": [ - "hocho" - , "knife" - ] - , "tags": [ - "cut" - , "chop" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🫙" - , "description": "jar" - , "category": "Food & Drink" - , "aliases": [ - "jar" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🏺" - , "description": "amphora" - , "category": "Food & Drink" - , "aliases": [ - "amphora" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌍" - , "description": "globe showing Europe-Africa" - , "category": "Travel & Places" - , "aliases": [ - "earth_africa" - ] - , "tags": [ - "globe" - , "world" - , "international" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌎" - , "description": "globe showing Americas" - , "category": "Travel & Places" - , "aliases": [ - "earth_americas" - ] - , "tags": [ - "globe" - , "world" - , "international" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌏" - , "description": "globe showing Asia-Australia" - , "category": "Travel & Places" - , "aliases": [ - "earth_asia" - ] - , "tags": [ - "globe" - , "world" - , "international" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌐" - , "description": "globe with meridians" - , "category": "Travel & Places" - , "aliases": [ - "globe_with_meridians" - ] - , "tags": [ - "world" - , "global" - , "international" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗺️" - , "description": "world map" - , "category": "Travel & Places" - , "aliases": [ - "world_map" - ] - , "tags": [ - "travel" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🗾" - , "description": "map of Japan" - , "category": "Travel & Places" - , "aliases": [ - "japan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧭" - , "description": "compass" - , "category": "Travel & Places" - , "aliases": [ - "compass" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🏔️" - , "description": "snow-capped mountain" - , "category": "Travel & Places" - , "aliases": [ - "mountain_snow" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⛰️" - , "description": "mountain" - , "category": "Travel & Places" - , "aliases": [ - "mountain" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "🌋" - , "description": "volcano" - , "category": "Travel & Places" - , "aliases": [ - "volcano" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗻" - , "description": "mount fuji" - , "category": "Travel & Places" - , "aliases": [ - "mount_fuji" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏕️" - , "description": "camping" - , "category": "Travel & Places" - , "aliases": [ - "camping" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏖️" - , "description": "beach with umbrella" - , "category": "Travel & Places" - , "aliases": [ - "beach_umbrella" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏜️" - , "description": "desert" - , "category": "Travel & Places" - , "aliases": [ - "desert" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏝️" - , "description": "desert island" - , "category": "Travel & Places" - , "aliases": [ - "desert_island" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏞️" - , "description": "national park" - , "category": "Travel & Places" - , "aliases": [ - "national_park" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏟️" - , "description": "stadium" - , "category": "Travel & Places" - , "aliases": [ - "stadium" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏛️" - , "description": "classical building" - , "category": "Travel & Places" - , "aliases": [ - "classical_building" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏗️" - , "description": "building construction" - , "category": "Travel & Places" - , "aliases": [ - "building_construction" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🧱" - , "description": "brick" - , "category": "Travel & Places" - , "aliases": [ - "bricks" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪨" - , "description": "rock" - , "category": "Travel & Places" - , "aliases": [ - "rock" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪵" - , "description": "wood" - , "category": "Travel & Places" - , "aliases": [ - "wood" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🛖" - , "description": "hut" - , "category": "Travel & Places" - , "aliases": [ - "hut" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🏘️" - , "description": "houses" - , "category": "Travel & Places" - , "aliases": [ - "houses" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏚️" - , "description": "derelict house" - , "category": "Travel & Places" - , "aliases": [ - "derelict_house" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏠" - , "description": "house" - , "category": "Travel & Places" - , "aliases": [ - "house" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏡" - , "description": "house with garden" - , "category": "Travel & Places" - , "aliases": [ - "house_with_garden" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏢" - , "description": "office building" - , "category": "Travel & Places" - , "aliases": [ - "office" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏣" - , "description": "Japanese post office" - , "category": "Travel & Places" - , "aliases": [ - "post_office" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏤" - , "description": "post office" - , "category": "Travel & Places" - , "aliases": [ - "european_post_office" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏥" - , "description": "hospital" - , "category": "Travel & Places" - , "aliases": [ - "hospital" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏦" - , "description": "bank" - , "category": "Travel & Places" - , "aliases": [ - "bank" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏨" - , "description": "hotel" - , "category": "Travel & Places" - , "aliases": [ - "hotel" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏩" - , "description": "love hotel" - , "category": "Travel & Places" - , "aliases": [ - "love_hotel" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏪" - , "description": "convenience store" - , "category": "Travel & Places" - , "aliases": [ - "convenience_store" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏫" - , "description": "school" - , "category": "Travel & Places" - , "aliases": [ - "school" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏬" - , "description": "department store" - , "category": "Travel & Places" - , "aliases": [ - "department_store" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏭" - , "description": "factory" - , "category": "Travel & Places" - , "aliases": [ - "factory" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏯" - , "description": "Japanese castle" - , "category": "Travel & Places" - , "aliases": [ - "japanese_castle" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏰" - , "description": "castle" - , "category": "Travel & Places" - , "aliases": [ - "european_castle" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💒" - , "description": "wedding" - , "category": "Travel & Places" - , "aliases": [ - "wedding" - ] - , "tags": [ - "marriage" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗼" - , "description": "Tokyo tower" - , "category": "Travel & Places" - , "aliases": [ - "tokyo_tower" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗽" - , "description": "Statue of Liberty" - , "category": "Travel & Places" - , "aliases": [ - "statue_of_liberty" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⛪" - , "description": "church" - , "category": "Travel & Places" - , "aliases": [ - "church" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "🕌" - , "description": "mosque" - , "category": "Travel & Places" - , "aliases": [ - "mosque" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛕" - , "description": "hindu temple" - , "category": "Travel & Places" - , "aliases": [ - "hindu_temple" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🕍" - , "description": "synagogue" - , "category": "Travel & Places" - , "aliases": [ - "synagogue" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "⛩️" - , "description": "shinto shrine" - , "category": "Travel & Places" - , "aliases": [ - "shinto_shrine" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "🕋" - , "description": "kaaba" - , "category": "Travel & Places" - , "aliases": [ - "kaaba" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "⛲" - , "description": "fountain" - , "category": "Travel & Places" - , "aliases": [ - "fountain" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "⛺" - , "description": "tent" - , "category": "Travel & Places" - , "aliases": [ - "tent" - ] - , "tags": [ - "camping" - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "🌁" - , "description": "foggy" - , "category": "Travel & Places" - , "aliases": [ - "foggy" - ] - , "tags": [ - "karl" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌃" - , "description": "night with stars" - , "category": "Travel & Places" - , "aliases": [ - "night_with_stars" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏙️" - , "description": "cityscape" - , "category": "Travel & Places" - , "aliases": [ - "cityscape" - ] - , "tags": [ - "skyline" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌄" - , "description": "sunrise over mountains" - , "category": "Travel & Places" - , "aliases": [ - "sunrise_over_mountains" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌅" - , "description": "sunrise" - , "category": "Travel & Places" - , "aliases": [ - "sunrise" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌆" - , "description": "cityscape at dusk" - , "category": "Travel & Places" - , "aliases": [ - "city_sunset" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌇" - , "description": "sunset" - , "category": "Travel & Places" - , "aliases": [ - "city_sunrise" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌉" - , "description": "bridge at night" - , "category": "Travel & Places" - , "aliases": [ - "bridge_at_night" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "♨️" - , "description": "hot springs" - , "category": "Travel & Places" - , "aliases": [ - "hotsprings" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🎠" - , "description": "carousel horse" - , "category": "Travel & Places" - , "aliases": [ - "carousel_horse" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛝" - , "description": "playground slide" - , "category": "Travel & Places" - , "aliases": [ - "playground_slide" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🎡" - , "description": "ferris wheel" - , "category": "Travel & Places" - , "aliases": [ - "ferris_wheel" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎢" - , "description": "roller coaster" - , "category": "Travel & Places" - , "aliases": [ - "roller_coaster" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💈" - , "description": "barber pole" - , "category": "Travel & Places" - , "aliases": [ - "barber" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎪" - , "description": "circus tent" - , "category": "Travel & Places" - , "aliases": [ - "circus_tent" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚂" - , "description": "locomotive" - , "category": "Travel & Places" - , "aliases": [ - "steam_locomotive" - ] - , "tags": [ - "train" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚃" - , "description": "railway car" - , "category": "Travel & Places" - , "aliases": [ - "railway_car" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚄" - , "description": "high-speed train" - , "category": "Travel & Places" - , "aliases": [ - "bullettrain_side" - ] - , "tags": [ - "train" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚅" - , "description": "bullet train" - , "category": "Travel & Places" - , "aliases": [ - "bullettrain_front" - ] - , "tags": [ - "train" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚆" - , "description": "train" - , "category": "Travel & Places" - , "aliases": [ - "train2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚇" - , "description": "metro" - , "category": "Travel & Places" - , "aliases": [ - "metro" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚈" - , "description": "light rail" - , "category": "Travel & Places" - , "aliases": [ - "light_rail" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚉" - , "description": "station" - , "category": "Travel & Places" - , "aliases": [ - "station" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚊" - , "description": "tram" - , "category": "Travel & Places" - , "aliases": [ - "tram" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚝" - , "description": "monorail" - , "category": "Travel & Places" - , "aliases": [ - "monorail" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚞" - , "description": "mountain railway" - , "category": "Travel & Places" - , "aliases": [ - "mountain_railway" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚋" - , "description": "tram car" - , "category": "Travel & Places" - , "aliases": [ - "train" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚌" - , "description": "bus" - , "category": "Travel & Places" - , "aliases": [ - "bus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚍" - , "description": "oncoming bus" - , "category": "Travel & Places" - , "aliases": [ - "oncoming_bus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚎" - , "description": "trolleybus" - , "category": "Travel & Places" - , "aliases": [ - "trolleybus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚐" - , "description": "minibus" - , "category": "Travel & Places" - , "aliases": [ - "minibus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚑" - , "description": "ambulance" - , "category": "Travel & Places" - , "aliases": [ - "ambulance" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚒" - , "description": "fire engine" - , "category": "Travel & Places" - , "aliases": [ - "fire_engine" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚓" - , "description": "police car" - , "category": "Travel & Places" - , "aliases": [ - "police_car" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚔" - , "description": "oncoming police car" - , "category": "Travel & Places" - , "aliases": [ - "oncoming_police_car" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚕" - , "description": "taxi" - , "category": "Travel & Places" - , "aliases": [ - "taxi" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚖" - , "description": "oncoming taxi" - , "category": "Travel & Places" - , "aliases": [ - "oncoming_taxi" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚗" - , "description": "automobile" - , "category": "Travel & Places" - , "aliases": [ - "car" - , "red_car" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚘" - , "description": "oncoming automobile" - , "category": "Travel & Places" - , "aliases": [ - "oncoming_automobile" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚙" - , "description": "sport utility vehicle" - , "category": "Travel & Places" - , "aliases": [ - "blue_car" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛻" - , "description": "pickup truck" - , "category": "Travel & Places" - , "aliases": [ - "pickup_truck" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🚚" - , "description": "delivery truck" - , "category": "Travel & Places" - , "aliases": [ - "truck" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚛" - , "description": "articulated lorry" - , "category": "Travel & Places" - , "aliases": [ - "articulated_lorry" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚜" - , "description": "tractor" - , "category": "Travel & Places" - , "aliases": [ - "tractor" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏎️" - , "description": "racing car" - , "category": "Travel & Places" - , "aliases": [ - "racing_car" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏍️" - , "description": "motorcycle" - , "category": "Travel & Places" - , "aliases": [ - "motorcycle" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛵" - , "description": "motor scooter" - , "category": "Travel & Places" - , "aliases": [ - "motor_scooter" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🦽" - , "description": "manual wheelchair" - , "category": "Travel & Places" - , "aliases": [ - "manual_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🦼" - , "description": "motorized wheelchair" - , "category": "Travel & Places" - , "aliases": [ - "motorized_wheelchair" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🛺" - , "description": "auto rickshaw" - , "category": "Travel & Places" - , "aliases": [ - "auto_rickshaw" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🚲" - , "description": "bicycle" - , "category": "Travel & Places" - , "aliases": [ - "bike" - ] - , "tags": [ - "bicycle" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛴" - , "description": "kick scooter" - , "category": "Travel & Places" - , "aliases": [ - "kick_scooter" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🛹" - , "description": "skateboard" - , "category": "Travel & Places" - , "aliases": [ - "skateboard" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🛼" - , "description": "roller skate" - , "category": "Travel & Places" - , "aliases": [ - "roller_skate" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🚏" - , "description": "bus stop" - , "category": "Travel & Places" - , "aliases": [ - "busstop" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛣️" - , "description": "motorway" - , "category": "Travel & Places" - , "aliases": [ - "motorway" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛤️" - , "description": "railway track" - , "category": "Travel & Places" - , "aliases": [ - "railway_track" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛢️" - , "description": "oil drum" - , "category": "Travel & Places" - , "aliases": [ - "oil_drum" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⛽" - , "description": "fuel pump" - , "category": "Travel & Places" - , "aliases": [ - "fuelpump" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "🛞" - , "description": "wheel" - , "category": "Travel & Places" - , "aliases": [ - "wheel" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🚨" - , "description": "police car light" - , "category": "Travel & Places" - , "aliases": [ - "rotating_light" - ] - , "tags": [ - "911" - , "emergency" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚥" - , "description": "horizontal traffic light" - , "category": "Travel & Places" - , "aliases": [ - "traffic_light" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚦" - , "description": "vertical traffic light" - , "category": "Travel & Places" - , "aliases": [ - "vertical_traffic_light" - ] - , "tags": [ - "semaphore" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛑" - , "description": "stop sign" - , "category": "Travel & Places" - , "aliases": [ - "stop_sign" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🚧" - , "description": "construction" - , "category": "Travel & Places" - , "aliases": [ - "construction" - ] - , "tags": [ - "wip" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⚓" - , "description": "anchor" - , "category": "Travel & Places" - , "aliases": [ - "anchor" - ] - , "tags": [ - "ship" - ] - , "unicode_version": "4.1" - , "ios_version": "6.0" - } -, { - "emoji": "🛟" - , "description": "ring buoy" - , "category": "Travel & Places" - , "aliases": [ - "ring_buoy" - ] - , "tags": [ - "life preserver" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "⛵" - , "description": "sailboat" - , "category": "Travel & Places" - , "aliases": [ - "boat" - , "sailboat" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "🛶" - , "description": "canoe" - , "category": "Travel & Places" - , "aliases": [ - "canoe" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🚤" - , "description": "speedboat" - , "category": "Travel & Places" - , "aliases": [ - "speedboat" - ] - , "tags": [ - "ship" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛳️" - , "description": "passenger ship" - , "category": "Travel & Places" - , "aliases": [ - "passenger_ship" - ] - , "tags": [ - "cruise" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⛴️" - , "description": "ferry" - , "category": "Travel & Places" - , "aliases": [ - "ferry" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "🛥️" - , "description": "motor boat" - , "category": "Travel & Places" - , "aliases": [ - "motor_boat" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🚢" - , "description": "ship" - , "category": "Travel & Places" - , "aliases": [ - "ship" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "✈️" - , "description": "airplane" - , "category": "Travel & Places" - , "aliases": [ - "airplane" - ] - , "tags": [ - "flight" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🛩️" - , "description": "small airplane" - , "category": "Travel & Places" - , "aliases": [ - "small_airplane" - ] - , "tags": [ - "flight" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛫" - , "description": "airplane departure" - , "category": "Travel & Places" - , "aliases": [ - "flight_departure" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛬" - , "description": "airplane arrival" - , "category": "Travel & Places" - , "aliases": [ - "flight_arrival" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🪂" - , "description": "parachute" - , "category": "Travel & Places" - , "aliases": [ - "parachute" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "💺" - , "description": "seat" - , "category": "Travel & Places" - , "aliases": [ - "seat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚁" - , "description": "helicopter" - , "category": "Travel & Places" - , "aliases": [ - "helicopter" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚟" - , "description": "suspension railway" - , "category": "Travel & Places" - , "aliases": [ - "suspension_railway" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚠" - , "description": "mountain cableway" - , "category": "Travel & Places" - , "aliases": [ - "mountain_cableway" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚡" - , "description": "aerial tramway" - , "category": "Travel & Places" - , "aliases": [ - "aerial_tramway" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛰️" - , "description": "satellite" - , "category": "Travel & Places" - , "aliases": [ - "artificial_satellite" - ] - , "tags": [ - "orbit" - , "space" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🚀" - , "description": "rocket" - , "category": "Travel & Places" - , "aliases": [ - "rocket" - ] - , "tags": [ - "ship" - , "launch" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛸" - , "description": "flying saucer" - , "category": "Travel & Places" - , "aliases": [ - "flying_saucer" - ] - , "tags": [ - "ufo" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🛎️" - , "description": "bellhop bell" - , "category": "Travel & Places" - , "aliases": [ - "bellhop_bell" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🧳" - , "description": "luggage" - , "category": "Travel & Places" - , "aliases": [ - "luggage" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "⌛" - , "description": "hourglass done" - , "category": "Travel & Places" - , "aliases": [ - "hourglass" - ] - , "tags": [ - "time" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⏳" - , "description": "hourglass not done" - , "category": "Travel & Places" - , "aliases": [ - "hourglass_flowing_sand" - ] - , "tags": [ - "time" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⌚" - , "description": "watch" - , "category": "Travel & Places" - , "aliases": [ - "watch" - ] - , "tags": [ - "time" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⏰" - , "description": "alarm clock" - , "category": "Travel & Places" - , "aliases": [ - "alarm_clock" - ] - , "tags": [ - "morning" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⏱️" - , "description": "stopwatch" - , "category": "Travel & Places" - , "aliases": [ - "stopwatch" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.1" - } -, { - "emoji": "⏲️" - , "description": "timer clock" - , "category": "Travel & Places" - , "aliases": [ - "timer_clock" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.1" - } -, { - "emoji": "🕰️" - , "description": "mantelpiece clock" - , "category": "Travel & Places" - , "aliases": [ - "mantelpiece_clock" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🕛" - , "description": "twelve o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock12" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕧" - , "description": "twelve-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock1230" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕐" - , "description": "one o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock1" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕜" - , "description": "one-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock130" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕑" - , "description": "two o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕝" - , "description": "two-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock230" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕒" - , "description": "three o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock3" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕞" - , "description": "three-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock330" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕓" - , "description": "four o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock4" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕟" - , "description": "four-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock430" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕔" - , "description": "five o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock5" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕠" - , "description": "five-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock530" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕕" - , "description": "six o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock6" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕡" - , "description": "six-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock630" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕖" - , "description": "seven o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock7" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕢" - , "description": "seven-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock730" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕗" - , "description": "eight o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock8" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕣" - , "description": "eight-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock830" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕘" - , "description": "nine o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock9" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕤" - , "description": "nine-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock930" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕙" - , "description": "ten o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock10" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕥" - , "description": "ten-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock1030" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕚" - , "description": "eleven o’clock" - , "category": "Travel & Places" - , "aliases": [ - "clock11" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕦" - , "description": "eleven-thirty" - , "category": "Travel & Places" - , "aliases": [ - "clock1130" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌑" - , "description": "new moon" - , "category": "Travel & Places" - , "aliases": [ - "new_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌒" - , "description": "waxing crescent moon" - , "category": "Travel & Places" - , "aliases": [ - "waxing_crescent_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌓" - , "description": "first quarter moon" - , "category": "Travel & Places" - , "aliases": [ - "first_quarter_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌔" - , "description": "waxing gibbous moon" - , "category": "Travel & Places" - , "aliases": [ - "moon" - , "waxing_gibbous_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌕" - , "description": "full moon" - , "category": "Travel & Places" - , "aliases": [ - "full_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌖" - , "description": "waning gibbous moon" - , "category": "Travel & Places" - , "aliases": [ - "waning_gibbous_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌗" - , "description": "last quarter moon" - , "category": "Travel & Places" - , "aliases": [ - "last_quarter_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌘" - , "description": "waning crescent moon" - , "category": "Travel & Places" - , "aliases": [ - "waning_crescent_moon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌙" - , "description": "crescent moon" - , "category": "Travel & Places" - , "aliases": [ - "crescent_moon" - ] - , "tags": [ - "night" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌚" - , "description": "new moon face" - , "category": "Travel & Places" - , "aliases": [ - "new_moon_with_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌛" - , "description": "first quarter moon face" - , "category": "Travel & Places" - , "aliases": [ - "first_quarter_moon_with_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌜" - , "description": "last quarter moon face" - , "category": "Travel & Places" - , "aliases": [ - "last_quarter_moon_with_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌡️" - , "description": "thermometer" - , "category": "Travel & Places" - , "aliases": [ - "thermometer" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "☀️" - , "description": "sun" - , "category": "Travel & Places" - , "aliases": [ - "sunny" - ] - , "tags": [ - "weather" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🌝" - , "description": "full moon face" - , "category": "Travel & Places" - , "aliases": [ - "full_moon_with_face" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌞" - , "description": "sun with face" - , "category": "Travel & Places" - , "aliases": [ - "sun_with_face" - ] - , "tags": [ - "summer" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪐" - , "description": "ringed planet" - , "category": "Travel & Places" - , "aliases": [ - "ringed_planet" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "⭐" - , "description": "star" - , "category": "Travel & Places" - , "aliases": [ - "star" - ] - , "tags": [ - ] - , "unicode_version": "5.1" - , "ios_version": "6.0" - } -, { - "emoji": "🌟" - , "description": "glowing star" - , "category": "Travel & Places" - , "aliases": [ - "star2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌠" - , "description": "shooting star" - , "category": "Travel & Places" - , "aliases": [ - "stars" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌌" - , "description": "milky way" - , "category": "Travel & Places" - , "aliases": [ - "milky_way" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "☁️" - , "description": "cloud" - , "category": "Travel & Places" - , "aliases": [ - "cloud" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⛅" - , "description": "sun behind cloud" - , "category": "Travel & Places" - , "aliases": [ - "partly_sunny" - ] - , "tags": [ - "weather" - , "cloud" - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "⛈️" - , "description": "cloud with lightning and rain" - , "category": "Travel & Places" - , "aliases": [ - "cloud_with_lightning_and_rain" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "🌤️" - , "description": "sun behind small cloud" - , "category": "Travel & Places" - , "aliases": [ - "sun_behind_small_cloud" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌥️" - , "description": "sun behind large cloud" - , "category": "Travel & Places" - , "aliases": [ - "sun_behind_large_cloud" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌦️" - , "description": "sun behind rain cloud" - , "category": "Travel & Places" - , "aliases": [ - "sun_behind_rain_cloud" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌧️" - , "description": "cloud with rain" - , "category": "Travel & Places" - , "aliases": [ - "cloud_with_rain" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌨️" - , "description": "cloud with snow" - , "category": "Travel & Places" - , "aliases": [ - "cloud_with_snow" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌩️" - , "description": "cloud with lightning" - , "category": "Travel & Places" - , "aliases": [ - "cloud_with_lightning" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌪️" - , "description": "tornado" - , "category": "Travel & Places" - , "aliases": [ - "tornado" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌫️" - , "description": "fog" - , "category": "Travel & Places" - , "aliases": [ - "fog" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌬️" - , "description": "wind face" - , "category": "Travel & Places" - , "aliases": [ - "wind_face" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🌀" - , "description": "cyclone" - , "category": "Travel & Places" - , "aliases": [ - "cyclone" - ] - , "tags": [ - "swirl" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌈" - , "description": "rainbow" - , "category": "Travel & Places" - , "aliases": [ - "rainbow" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌂" - , "description": "closed umbrella" - , "category": "Travel & Places" - , "aliases": [ - "closed_umbrella" - ] - , "tags": [ - "weather" - , "rain" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "☂️" - , "description": "umbrella" - , "category": "Travel & Places" - , "aliases": [ - "open_umbrella" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "☔" - , "description": "umbrella with rain drops" - , "category": "Travel & Places" - , "aliases": [ - "umbrella" - ] - , "tags": [ - "rain" - , "weather" - ] - , "unicode_version": "4.0" - , "ios_version": "6.0" - } -, { - "emoji": "⛱️" - , "description": "umbrella on ground" - , "category": "Travel & Places" - , "aliases": [ - "parasol_on_ground" - ] - , "tags": [ - "beach_umbrella" - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "⚡" - , "description": "high voltage" - , "category": "Travel & Places" - , "aliases": [ - "zap" - ] - , "tags": [ - "lightning" - , "thunder" - ] - , "unicode_version": "4.0" - , "ios_version": "6.0" - } -, { - "emoji": "❄️" - , "description": "snowflake" - , "category": "Travel & Places" - , "aliases": [ - "snowflake" - ] - , "tags": [ - "winter" - , "cold" - , "weather" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "☃️" - , "description": "snowman" - , "category": "Travel & Places" - , "aliases": [ - "snowman_with_snow" - ] - , "tags": [ - "winter" - , "christmas" - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "⛄" - , "description": "snowman without snow" - , "category": "Travel & Places" - , "aliases": [ - "snowman" - ] - , "tags": [ - "winter" - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "☄️" - , "description": "comet" - , "category": "Travel & Places" - , "aliases": [ - "comet" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "🔥" - , "description": "fire" - , "category": "Travel & Places" - , "aliases": [ - "fire" - ] - , "tags": [ - "burn" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💧" - , "description": "droplet" - , "category": "Travel & Places" - , "aliases": [ - "droplet" - ] - , "tags": [ - "water" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🌊" - , "description": "water wave" - , "category": "Travel & Places" - , "aliases": [ - "ocean" - ] - , "tags": [ - "sea" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎃" - , "description": "jack-o-lantern" - , "category": "Activities" - , "aliases": [ - "jack_o_lantern" - ] - , "tags": [ - "halloween" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎄" - , "description": "Christmas tree" - , "category": "Activities" - , "aliases": [ - "christmas_tree" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎆" - , "description": "fireworks" - , "category": "Activities" - , "aliases": [ - "fireworks" - ] - , "tags": [ - "festival" - , "celebration" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎇" - , "description": "sparkler" - , "category": "Activities" - , "aliases": [ - "sparkler" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧨" - , "description": "firecracker" - , "category": "Activities" - , "aliases": [ - "firecracker" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "✨" - , "description": "sparkles" - , "category": "Activities" - , "aliases": [ - "sparkles" - ] - , "tags": [ - "shiny" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎈" - , "description": "balloon" - , "category": "Activities" - , "aliases": [ - "balloon" - ] - , "tags": [ - "party" - , "birthday" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎉" - , "description": "party popper" - , "category": "Activities" - , "aliases": [ - "tada" - ] - , "tags": [ - "hooray" - , "party" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎊" - , "description": "confetti ball" - , "category": "Activities" - , "aliases": [ - "confetti_ball" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎋" - , "description": "tanabata tree" - , "category": "Activities" - , "aliases": [ - "tanabata_tree" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎍" - , "description": "pine decoration" - , "category": "Activities" - , "aliases": [ - "bamboo" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎎" - , "description": "Japanese dolls" - , "category": "Activities" - , "aliases": [ - "dolls" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎏" - , "description": "carp streamer" - , "category": "Activities" - , "aliases": [ - "flags" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎐" - , "description": "wind chime" - , "category": "Activities" - , "aliases": [ - "wind_chime" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎑" - , "description": "moon viewing ceremony" - , "category": "Activities" - , "aliases": [ - "rice_scene" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧧" - , "description": "red envelope" - , "category": "Activities" - , "aliases": [ - "red_envelope" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🎀" - , "description": "ribbon" - , "category": "Activities" - , "aliases": [ - "ribbon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎁" - , "description": "wrapped gift" - , "category": "Activities" - , "aliases": [ - "gift" - ] - , "tags": [ - "present" - , "birthday" - , "christmas" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎗️" - , "description": "reminder ribbon" - , "category": "Activities" - , "aliases": [ - "reminder_ribbon" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎟️" - , "description": "admission tickets" - , "category": "Activities" - , "aliases": [ - "tickets" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎫" - , "description": "ticket" - , "category": "Activities" - , "aliases": [ - "ticket" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎖️" - , "description": "military medal" - , "category": "Activities" - , "aliases": [ - "medal_military" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏆" - , "description": "trophy" - , "category": "Activities" - , "aliases": [ - "trophy" - ] - , "tags": [ - "award" - , "contest" - , "winner" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏅" - , "description": "sports medal" - , "category": "Activities" - , "aliases": [ - "medal_sports" - ] - , "tags": [ - "gold" - , "winner" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🥇" - , "description": "1st place medal" - , "category": "Activities" - , "aliases": [ - "1st_place_medal" - ] - , "tags": [ - "gold" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥈" - , "description": "2nd place medal" - , "category": "Activities" - , "aliases": [ - "2nd_place_medal" - ] - , "tags": [ - "silver" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥉" - , "description": "3rd place medal" - , "category": "Activities" - , "aliases": [ - "3rd_place_medal" - ] - , "tags": [ - "bronze" - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "⚽" - , "description": "soccer ball" - , "category": "Activities" - , "aliases": [ - "soccer" - ] - , "tags": [ - "sports" - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "⚾" - , "description": "baseball" - , "category": "Activities" - , "aliases": [ - "baseball" - ] - , "tags": [ - "sports" - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "🥎" - , "description": "softball" - , "category": "Activities" - , "aliases": [ - "softball" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🏀" - , "description": "basketball" - , "category": "Activities" - , "aliases": [ - "basketball" - ] - , "tags": [ - "sports" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏐" - , "description": "volleyball" - , "category": "Activities" - , "aliases": [ - "volleyball" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏈" - , "description": "american football" - , "category": "Activities" - , "aliases": [ - "football" - ] - , "tags": [ - "sports" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏉" - , "description": "rugby football" - , "category": "Activities" - , "aliases": [ - "rugby_football" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎾" - , "description": "tennis" - , "category": "Activities" - , "aliases": [ - "tennis" - ] - , "tags": [ - "sports" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥏" - , "description": "flying disc" - , "category": "Activities" - , "aliases": [ - "flying_disc" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🎳" - , "description": "bowling" - , "category": "Activities" - , "aliases": [ - "bowling" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏏" - , "description": "cricket game" - , "category": "Activities" - , "aliases": [ - "cricket_game" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏑" - , "description": "field hockey" - , "category": "Activities" - , "aliases": [ - "field_hockey" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏒" - , "description": "ice hockey" - , "category": "Activities" - , "aliases": [ - "ice_hockey" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🥍" - , "description": "lacrosse" - , "category": "Activities" - , "aliases": [ - "lacrosse" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🏓" - , "description": "ping pong" - , "category": "Activities" - , "aliases": [ - "ping_pong" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏸" - , "description": "badminton" - , "category": "Activities" - , "aliases": [ - "badminton" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🥊" - , "description": "boxing glove" - , "category": "Activities" - , "aliases": [ - "boxing_glove" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥋" - , "description": "martial arts uniform" - , "category": "Activities" - , "aliases": [ - "martial_arts_uniform" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🥅" - , "description": "goal net" - , "category": "Activities" - , "aliases": [ - "goal_net" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "⛳" - , "description": "flag in hole" - , "category": "Activities" - , "aliases": [ - "golf" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "⛸️" - , "description": "ice skate" - , "category": "Activities" - , "aliases": [ - "ice_skate" - ] - , "tags": [ - "skating" - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "🎣" - , "description": "fishing pole" - , "category": "Activities" - , "aliases": [ - "fishing_pole_and_fish" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🤿" - , "description": "diving mask" - , "category": "Activities" - , "aliases": [ - "diving_mask" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🎽" - , "description": "running shirt" - , "category": "Activities" - , "aliases": [ - "running_shirt_with_sash" - ] - , "tags": [ - "marathon" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎿" - , "description": "skis" - , "category": "Activities" - , "aliases": [ - "ski" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛷" - , "description": "sled" - , "category": "Activities" - , "aliases": [ - "sled" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥌" - , "description": "curling stone" - , "category": "Activities" - , "aliases": [ - "curling_stone" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🎯" - , "description": "bullseye" - , "category": "Activities" - , "aliases": [ - "dart" - ] - , "tags": [ - "target" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪀" - , "description": "yo-yo" - , "category": "Activities" - , "aliases": [ - "yo_yo" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🪁" - , "description": "kite" - , "category": "Activities" - , "aliases": [ - "kite" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🔫" - , "description": "water pistol" - , "category": "Activities" - , "aliases": [ - "gun" - ] - , "tags": [ - "shoot" - , "weapon" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎱" - , "description": "pool 8 ball" - , "category": "Activities" - , "aliases": [ - "8ball" - ] - , "tags": [ - "pool" - , "billiards" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔮" - , "description": "crystal ball" - , "category": "Activities" - , "aliases": [ - "crystal_ball" - ] - , "tags": [ - "fortune" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪄" - , "description": "magic wand" - , "category": "Activities" - , "aliases": [ - "magic_wand" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🎮" - , "description": "video game" - , "category": "Activities" - , "aliases": [ - "video_game" - ] - , "tags": [ - "play" - , "controller" - , "console" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕹️" - , "description": "joystick" - , "category": "Activities" - , "aliases": [ - "joystick" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎰" - , "description": "slot machine" - , "category": "Activities" - , "aliases": [ - "slot_machine" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎲" - , "description": "game die" - , "category": "Activities" - , "aliases": [ - "game_die" - ] - , "tags": [ - "dice" - , "gambling" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧩" - , "description": "puzzle piece" - , "category": "Activities" - , "aliases": [ - "jigsaw" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧸" - , "description": "teddy bear" - , "category": "Activities" - , "aliases": [ - "teddy_bear" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪅" - , "description": "piñata" - , "category": "Activities" - , "aliases": [ - "pinata" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪩" - , "description": "mirror ball" - , "category": "Activities" - , "aliases": [ - "mirror_ball" - ] - , "tags": [ - "disco" - , "party" - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🪆" - , "description": "nesting dolls" - , "category": "Activities" - , "aliases": [ - "nesting_dolls" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "♠️" - , "description": "spade suit" - , "category": "Activities" - , "aliases": [ - "spades" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♥️" - , "description": "heart suit" - , "category": "Activities" - , "aliases": [ - "hearts" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♦️" - , "description": "diamond suit" - , "category": "Activities" - , "aliases": [ - "diamonds" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♣️" - , "description": "club suit" - , "category": "Activities" - , "aliases": [ - "clubs" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♟️" - , "description": "chess pawn" - , "category": "Activities" - , "aliases": [ - "chess_pawn" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🃏" - , "description": "joker" - , "category": "Activities" - , "aliases": [ - "black_joker" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🀄" - , "description": "mahjong red dragon" - , "category": "Activities" - , "aliases": [ - "mahjong" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🎴" - , "description": "flower playing cards" - , "category": "Activities" - , "aliases": [ - "flower_playing_cards" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎭" - , "description": "performing arts" - , "category": "Activities" - , "aliases": [ - "performing_arts" - ] - , "tags": [ - "theater" - , "drama" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🖼️" - , "description": "framed picture" - , "category": "Activities" - , "aliases": [ - "framed_picture" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎨" - , "description": "artist palette" - , "category": "Activities" - , "aliases": [ - "art" - ] - , "tags": [ - "design" - , "paint" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧵" - , "description": "thread" - , "category": "Activities" - , "aliases": [ - "thread" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪡" - , "description": "sewing needle" - , "category": "Activities" - , "aliases": [ - "sewing_needle" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🧶" - , "description": "yarn" - , "category": "Activities" - , "aliases": [ - "yarn" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪢" - , "description": "knot" - , "category": "Activities" - , "aliases": [ - "knot" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "👓" - , "description": "glasses" - , "category": "Objects" - , "aliases": [ - "eyeglasses" - ] - , "tags": [ - "glasses" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕶️" - , "description": "sunglasses" - , "category": "Objects" - , "aliases": [ - "dark_sunglasses" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🥽" - , "description": "goggles" - , "category": "Objects" - , "aliases": [ - "goggles" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥼" - , "description": "lab coat" - , "category": "Objects" - , "aliases": [ - "lab_coat" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🦺" - , "description": "safety vest" - , "category": "Objects" - , "aliases": [ - "safety_vest" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "👔" - , "description": "necktie" - , "category": "Objects" - , "aliases": [ - "necktie" - ] - , "tags": [ - "shirt" - , "formal" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👕" - , "description": "t-shirt" - , "category": "Objects" - , "aliases": [ - "shirt" - , "tshirt" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👖" - , "description": "jeans" - , "category": "Objects" - , "aliases": [ - "jeans" - ] - , "tags": [ - "pants" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧣" - , "description": "scarf" - , "category": "Objects" - , "aliases": [ - "scarf" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧤" - , "description": "gloves" - , "category": "Objects" - , "aliases": [ - "gloves" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧥" - , "description": "coat" - , "category": "Objects" - , "aliases": [ - "coat" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧦" - , "description": "socks" - , "category": "Objects" - , "aliases": [ - "socks" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "👗" - , "description": "dress" - , "category": "Objects" - , "aliases": [ - "dress" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👘" - , "description": "kimono" - , "category": "Objects" - , "aliases": [ - "kimono" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥻" - , "description": "sari" - , "category": "Objects" - , "aliases": [ - "sari" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🩱" - , "description": "one-piece swimsuit" - , "category": "Objects" - , "aliases": [ - "one_piece_swimsuit" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🩲" - , "description": "briefs" - , "category": "Objects" - , "aliases": [ - "swim_brief" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🩳" - , "description": "shorts" - , "category": "Objects" - , "aliases": [ - "shorts" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "👙" - , "description": "bikini" - , "category": "Objects" - , "aliases": [ - "bikini" - ] - , "tags": [ - "beach" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👚" - , "description": "woman’s clothes" - , "category": "Objects" - , "aliases": [ - "womans_clothes" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪭" - , "description": "folding hand fan" - , "category": "Objects" - , "aliases": [ - "folding_hand_fan" - ] - , "tags": [ - "sensu" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "👛" - , "description": "purse" - , "category": "Objects" - , "aliases": [ - "purse" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👜" - , "description": "handbag" - , "category": "Objects" - , "aliases": [ - "handbag" - ] - , "tags": [ - "bag" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👝" - , "description": "clutch bag" - , "category": "Objects" - , "aliases": [ - "pouch" - ] - , "tags": [ - "bag" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛍️" - , "description": "shopping bags" - , "category": "Objects" - , "aliases": [ - "shopping" - ] - , "tags": [ - "bags" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎒" - , "description": "backpack" - , "category": "Objects" - , "aliases": [ - "school_satchel" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🩴" - , "description": "thong sandal" - , "category": "Objects" - , "aliases": [ - "thong_sandal" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "👞" - , "description": "man’s shoe" - , "category": "Objects" - , "aliases": [ - "mans_shoe" - , "shoe" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👟" - , "description": "running shoe" - , "category": "Objects" - , "aliases": [ - "athletic_shoe" - ] - , "tags": [ - "sneaker" - , "sport" - , "running" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🥾" - , "description": "hiking boot" - , "category": "Objects" - , "aliases": [ - "hiking_boot" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🥿" - , "description": "flat shoe" - , "category": "Objects" - , "aliases": [ - "flat_shoe" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "👠" - , "description": "high-heeled shoe" - , "category": "Objects" - , "aliases": [ - "high_heel" - ] - , "tags": [ - "shoe" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👡" - , "description": "woman’s sandal" - , "category": "Objects" - , "aliases": [ - "sandal" - ] - , "tags": [ - "shoe" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🩰" - , "description": "ballet shoes" - , "category": "Objects" - , "aliases": [ - "ballet_shoes" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "👢" - , "description": "woman’s boot" - , "category": "Objects" - , "aliases": [ - "boot" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪮" - , "description": "hair pick" - , "category": "Objects" - , "aliases": [ - "hair_pick" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "👑" - , "description": "crown" - , "category": "Objects" - , "aliases": [ - "crown" - ] - , "tags": [ - "king" - , "queen" - , "royal" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "👒" - , "description": "woman’s hat" - , "category": "Objects" - , "aliases": [ - "womans_hat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎩" - , "description": "top hat" - , "category": "Objects" - , "aliases": [ - "tophat" - ] - , "tags": [ - "hat" - , "classy" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎓" - , "description": "graduation cap" - , "category": "Objects" - , "aliases": [ - "mortar_board" - ] - , "tags": [ - "education" - , "college" - , "university" - , "graduation" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧢" - , "description": "billed cap" - , "category": "Objects" - , "aliases": [ - "billed_cap" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪖" - , "description": "military helmet" - , "category": "Objects" - , "aliases": [ - "military_helmet" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "⛑️" - , "description": "rescue worker’s helmet" - , "category": "Objects" - , "aliases": [ - "rescue_worker_helmet" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "📿" - , "description": "prayer beads" - , "category": "Objects" - , "aliases": [ - "prayer_beads" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "💄" - , "description": "lipstick" - , "category": "Objects" - , "aliases": [ - "lipstick" - ] - , "tags": [ - "makeup" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💍" - , "description": "ring" - , "category": "Objects" - , "aliases": [ - "ring" - ] - , "tags": [ - "wedding" - , "marriage" - , "engaged" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💎" - , "description": "gem stone" - , "category": "Objects" - , "aliases": [ - "gem" - ] - , "tags": [ - "diamond" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔇" - , "description": "muted speaker" - , "category": "Objects" - , "aliases": [ - "mute" - ] - , "tags": [ - "sound" - , "volume" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔈" - , "description": "speaker low volume" - , "category": "Objects" - , "aliases": [ - "speaker" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔉" - , "description": "speaker medium volume" - , "category": "Objects" - , "aliases": [ - "sound" - ] - , "tags": [ - "volume" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔊" - , "description": "speaker high volume" - , "category": "Objects" - , "aliases": [ - "loud_sound" - ] - , "tags": [ - "volume" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📢" - , "description": "loudspeaker" - , "category": "Objects" - , "aliases": [ - "loudspeaker" - ] - , "tags": [ - "announcement" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📣" - , "description": "megaphone" - , "category": "Objects" - , "aliases": [ - "mega" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📯" - , "description": "postal horn" - , "category": "Objects" - , "aliases": [ - "postal_horn" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔔" - , "description": "bell" - , "category": "Objects" - , "aliases": [ - "bell" - ] - , "tags": [ - "sound" - , "notification" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔕" - , "description": "bell with slash" - , "category": "Objects" - , "aliases": [ - "no_bell" - ] - , "tags": [ - "volume" - , "off" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎼" - , "description": "musical score" - , "category": "Objects" - , "aliases": [ - "musical_score" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎵" - , "description": "musical note" - , "category": "Objects" - , "aliases": [ - "musical_note" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎶" - , "description": "musical notes" - , "category": "Objects" - , "aliases": [ - "notes" - ] - , "tags": [ - "music" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎙️" - , "description": "studio microphone" - , "category": "Objects" - , "aliases": [ - "studio_microphone" - ] - , "tags": [ - "podcast" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎚️" - , "description": "level slider" - , "category": "Objects" - , "aliases": [ - "level_slider" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎛️" - , "description": "control knobs" - , "category": "Objects" - , "aliases": [ - "control_knobs" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎤" - , "description": "microphone" - , "category": "Objects" - , "aliases": [ - "microphone" - ] - , "tags": [ - "sing" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎧" - , "description": "headphone" - , "category": "Objects" - , "aliases": [ - "headphones" - ] - , "tags": [ - "music" - , "earphones" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📻" - , "description": "radio" - , "category": "Objects" - , "aliases": [ - "radio" - ] - , "tags": [ - "podcast" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎷" - , "description": "saxophone" - , "category": "Objects" - , "aliases": [ - "saxophone" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪗" - , "description": "accordion" - , "category": "Objects" - , "aliases": [ - "accordion" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🎸" - , "description": "guitar" - , "category": "Objects" - , "aliases": [ - "guitar" - ] - , "tags": [ - "rock" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎹" - , "description": "musical keyboard" - , "category": "Objects" - , "aliases": [ - "musical_keyboard" - ] - , "tags": [ - "piano" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎺" - , "description": "trumpet" - , "category": "Objects" - , "aliases": [ - "trumpet" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎻" - , "description": "violin" - , "category": "Objects" - , "aliases": [ - "violin" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪕" - , "description": "banjo" - , "category": "Objects" - , "aliases": [ - "banjo" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🥁" - , "description": "drum" - , "category": "Objects" - , "aliases": [ - "drum" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "10.2" - } -, { - "emoji": "🪘" - , "description": "long drum" - , "category": "Objects" - , "aliases": [ - "long_drum" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪇" - , "description": "maracas" - , "category": "Objects" - , "aliases": [ - "maracas" - ] - , "tags": [ - "shaker" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "🪈" - , "description": "flute" - , "category": "Objects" - , "aliases": [ - "flute" - ] - , "tags": [ - "recorder" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "📱" - , "description": "mobile phone" - , "category": "Objects" - , "aliases": [ - "iphone" - ] - , "tags": [ - "smartphone" - , "mobile" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📲" - , "description": "mobile phone with arrow" - , "category": "Objects" - , "aliases": [ - "calling" - ] - , "tags": [ - "call" - , "incoming" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "☎️" - , "description": "telephone" - , "category": "Objects" - , "aliases": [ - "phone" - , "telephone" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "📞" - , "description": "telephone receiver" - , "category": "Objects" - , "aliases": [ - "telephone_receiver" - ] - , "tags": [ - "phone" - , "call" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📟" - , "description": "pager" - , "category": "Objects" - , "aliases": [ - "pager" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📠" - , "description": "fax machine" - , "category": "Objects" - , "aliases": [ - "fax" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔋" - , "description": "battery" - , "category": "Objects" - , "aliases": [ - "battery" - ] - , "tags": [ - "power" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪫" - , "description": "low battery" - , "category": "Objects" - , "aliases": [ - "low_battery" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🔌" - , "description": "electric plug" - , "category": "Objects" - , "aliases": [ - "electric_plug" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💻" - , "description": "laptop" - , "category": "Objects" - , "aliases": [ - "computer" - ] - , "tags": [ - "desktop" - , "screen" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🖥️" - , "description": "desktop computer" - , "category": "Objects" - , "aliases": [ - "desktop_computer" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🖨️" - , "description": "printer" - , "category": "Objects" - , "aliases": [ - "printer" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⌨️" - , "description": "keyboard" - , "category": "Objects" - , "aliases": [ - "keyboard" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "🖱️" - , "description": "computer mouse" - , "category": "Objects" - , "aliases": [ - "computer_mouse" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🖲️" - , "description": "trackball" - , "category": "Objects" - , "aliases": [ - "trackball" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "💽" - , "description": "computer disk" - , "category": "Objects" - , "aliases": [ - "minidisc" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💾" - , "description": "floppy disk" - , "category": "Objects" - , "aliases": [ - "floppy_disk" - ] - , "tags": [ - "save" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💿" - , "description": "optical disk" - , "category": "Objects" - , "aliases": [ - "cd" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📀" - , "description": "dvd" - , "category": "Objects" - , "aliases": [ - "dvd" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧮" - , "description": "abacus" - , "category": "Objects" - , "aliases": [ - "abacus" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🎥" - , "description": "movie camera" - , "category": "Objects" - , "aliases": [ - "movie_camera" - ] - , "tags": [ - "film" - , "video" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎞️" - , "description": "film frames" - , "category": "Objects" - , "aliases": [ - "film_strip" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "📽️" - , "description": "film projector" - , "category": "Objects" - , "aliases": [ - "film_projector" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🎬" - , "description": "clapper board" - , "category": "Objects" - , "aliases": [ - "clapper" - ] - , "tags": [ - "film" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📺" - , "description": "television" - , "category": "Objects" - , "aliases": [ - "tv" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📷" - , "description": "camera" - , "category": "Objects" - , "aliases": [ - "camera" - ] - , "tags": [ - "photo" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📸" - , "description": "camera with flash" - , "category": "Objects" - , "aliases": [ - "camera_flash" - ] - , "tags": [ - "photo" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "📹" - , "description": "video camera" - , "category": "Objects" - , "aliases": [ - "video_camera" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📼" - , "description": "videocassette" - , "category": "Objects" - , "aliases": [ - "vhs" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔍" - , "description": "magnifying glass tilted left" - , "category": "Objects" - , "aliases": [ - "mag" - ] - , "tags": [ - "search" - , "zoom" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔎" - , "description": "magnifying glass tilted right" - , "category": "Objects" - , "aliases": [ - "mag_right" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🕯️" - , "description": "candle" - , "category": "Objects" - , "aliases": [ - "candle" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "💡" - , "description": "light bulb" - , "category": "Objects" - , "aliases": [ - "bulb" - ] - , "tags": [ - "idea" - , "light" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔦" - , "description": "flashlight" - , "category": "Objects" - , "aliases": [ - "flashlight" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏮" - , "description": "red paper lantern" - , "category": "Objects" - , "aliases": [ - "izakaya_lantern" - , "lantern" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪔" - , "description": "diya lamp" - , "category": "Objects" - , "aliases": [ - "diya_lamp" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "📔" - , "description": "notebook with decorative cover" - , "category": "Objects" - , "aliases": [ - "notebook_with_decorative_cover" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📕" - , "description": "closed book" - , "category": "Objects" - , "aliases": [ - "closed_book" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📖" - , "description": "open book" - , "category": "Objects" - , "aliases": [ - "book" - , "open_book" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📗" - , "description": "green book" - , "category": "Objects" - , "aliases": [ - "green_book" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📘" - , "description": "blue book" - , "category": "Objects" - , "aliases": [ - "blue_book" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📙" - , "description": "orange book" - , "category": "Objects" - , "aliases": [ - "orange_book" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📚" - , "description": "books" - , "category": "Objects" - , "aliases": [ - "books" - ] - , "tags": [ - "library" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📓" - , "description": "notebook" - , "category": "Objects" - , "aliases": [ - "notebook" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📒" - , "description": "ledger" - , "category": "Objects" - , "aliases": [ - "ledger" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📃" - , "description": "page with curl" - , "category": "Objects" - , "aliases": [ - "page_with_curl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📜" - , "description": "scroll" - , "category": "Objects" - , "aliases": [ - "scroll" - ] - , "tags": [ - "document" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📄" - , "description": "page facing up" - , "category": "Objects" - , "aliases": [ - "page_facing_up" - ] - , "tags": [ - "document" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📰" - , "description": "newspaper" - , "category": "Objects" - , "aliases": [ - "newspaper" - ] - , "tags": [ - "press" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗞️" - , "description": "rolled-up newspaper" - , "category": "Objects" - , "aliases": [ - "newspaper_roll" - ] - , "tags": [ - "press" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "📑" - , "description": "bookmark tabs" - , "category": "Objects" - , "aliases": [ - "bookmark_tabs" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔖" - , "description": "bookmark" - , "category": "Objects" - , "aliases": [ - "bookmark" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏷️" - , "description": "label" - , "category": "Objects" - , "aliases": [ - "label" - ] - , "tags": [ - "tag" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "💰" - , "description": "money bag" - , "category": "Objects" - , "aliases": [ - "moneybag" - ] - , "tags": [ - "dollar" - , "cream" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪙" - , "description": "coin" - , "category": "Objects" - , "aliases": [ - "coin" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "💴" - , "description": "yen banknote" - , "category": "Objects" - , "aliases": [ - "yen" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💵" - , "description": "dollar banknote" - , "category": "Objects" - , "aliases": [ - "dollar" - ] - , "tags": [ - "money" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💶" - , "description": "euro banknote" - , "category": "Objects" - , "aliases": [ - "euro" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💷" - , "description": "pound banknote" - , "category": "Objects" - , "aliases": [ - "pound" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💸" - , "description": "money with wings" - , "category": "Objects" - , "aliases": [ - "money_with_wings" - ] - , "tags": [ - "dollar" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💳" - , "description": "credit card" - , "category": "Objects" - , "aliases": [ - "credit_card" - ] - , "tags": [ - "subscription" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🧾" - , "description": "receipt" - , "category": "Objects" - , "aliases": [ - "receipt" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "💹" - , "description": "chart increasing with yen" - , "category": "Objects" - , "aliases": [ - "chart" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "✉️" - , "description": "envelope" - , "category": "Objects" - , "aliases": [ - "envelope" - ] - , "tags": [ - "letter" - , "email" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "📧" - , "description": "e-mail" - , "category": "Objects" - , "aliases": [ - "email" - , "e-mail" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📨" - , "description": "incoming envelope" - , "category": "Objects" - , "aliases": [ - "incoming_envelope" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📩" - , "description": "envelope with arrow" - , "category": "Objects" - , "aliases": [ - "envelope_with_arrow" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📤" - , "description": "outbox tray" - , "category": "Objects" - , "aliases": [ - "outbox_tray" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📥" - , "description": "inbox tray" - , "category": "Objects" - , "aliases": [ - "inbox_tray" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📦" - , "description": "package" - , "category": "Objects" - , "aliases": [ - "package" - ] - , "tags": [ - "shipping" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📫" - , "description": "closed mailbox with raised flag" - , "category": "Objects" - , "aliases": [ - "mailbox" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📪" - , "description": "closed mailbox with lowered flag" - , "category": "Objects" - , "aliases": [ - "mailbox_closed" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📬" - , "description": "open mailbox with raised flag" - , "category": "Objects" - , "aliases": [ - "mailbox_with_mail" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📭" - , "description": "open mailbox with lowered flag" - , "category": "Objects" - , "aliases": [ - "mailbox_with_no_mail" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📮" - , "description": "postbox" - , "category": "Objects" - , "aliases": [ - "postbox" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗳️" - , "description": "ballot box with ballot" - , "category": "Objects" - , "aliases": [ - "ballot_box" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "✏️" - , "description": "pencil" - , "category": "Objects" - , "aliases": [ - "pencil2" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "✒️" - , "description": "black nib" - , "category": "Objects" - , "aliases": [ - "black_nib" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🖋️" - , "description": "fountain pen" - , "category": "Objects" - , "aliases": [ - "fountain_pen" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🖊️" - , "description": "pen" - , "category": "Objects" - , "aliases": [ - "pen" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🖌️" - , "description": "paintbrush" - , "category": "Objects" - , "aliases": [ - "paintbrush" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🖍️" - , "description": "crayon" - , "category": "Objects" - , "aliases": [ - "crayon" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "📝" - , "description": "memo" - , "category": "Objects" - , "aliases": [ - "memo" - , "pencil" - ] - , "tags": [ - "document" - , "note" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💼" - , "description": "briefcase" - , "category": "Objects" - , "aliases": [ - "briefcase" - ] - , "tags": [ - "business" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📁" - , "description": "file folder" - , "category": "Objects" - , "aliases": [ - "file_folder" - ] - , "tags": [ - "directory" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📂" - , "description": "open file folder" - , "category": "Objects" - , "aliases": [ - "open_file_folder" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗂️" - , "description": "card index dividers" - , "category": "Objects" - , "aliases": [ - "card_index_dividers" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "📅" - , "description": "calendar" - , "category": "Objects" - , "aliases": [ - "date" - ] - , "tags": [ - "calendar" - , "schedule" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📆" - , "description": "tear-off calendar" - , "category": "Objects" - , "aliases": [ - "calendar" - ] - , "tags": [ - "schedule" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗒️" - , "description": "spiral notepad" - , "category": "Objects" - , "aliases": [ - "spiral_notepad" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🗓️" - , "description": "spiral calendar" - , "category": "Objects" - , "aliases": [ - "spiral_calendar" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "📇" - , "description": "card index" - , "category": "Objects" - , "aliases": [ - "card_index" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📈" - , "description": "chart increasing" - , "category": "Objects" - , "aliases": [ - "chart_with_upwards_trend" - ] - , "tags": [ - "graph" - , "metrics" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📉" - , "description": "chart decreasing" - , "category": "Objects" - , "aliases": [ - "chart_with_downwards_trend" - ] - , "tags": [ - "graph" - , "metrics" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📊" - , "description": "bar chart" - , "category": "Objects" - , "aliases": [ - "bar_chart" - ] - , "tags": [ - "stats" - , "metrics" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📋" - , "description": "clipboard" - , "category": "Objects" - , "aliases": [ - "clipboard" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📌" - , "description": "pushpin" - , "category": "Objects" - , "aliases": [ - "pushpin" - ] - , "tags": [ - "location" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📍" - , "description": "round pushpin" - , "category": "Objects" - , "aliases": [ - "round_pushpin" - ] - , "tags": [ - "location" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📎" - , "description": "paperclip" - , "category": "Objects" - , "aliases": [ - "paperclip" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🖇️" - , "description": "linked paperclips" - , "category": "Objects" - , "aliases": [ - "paperclips" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "📏" - , "description": "straight ruler" - , "category": "Objects" - , "aliases": [ - "straight_ruler" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📐" - , "description": "triangular ruler" - , "category": "Objects" - , "aliases": [ - "triangular_ruler" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "✂️" - , "description": "scissors" - , "category": "Objects" - , "aliases": [ - "scissors" - ] - , "tags": [ - "cut" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🗃️" - , "description": "card file box" - , "category": "Objects" - , "aliases": [ - "card_file_box" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🗄️" - , "description": "file cabinet" - , "category": "Objects" - , "aliases": [ - "file_cabinet" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🗑️" - , "description": "wastebasket" - , "category": "Objects" - , "aliases": [ - "wastebasket" - ] - , "tags": [ - "trash" - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🔒" - , "description": "locked" - , "category": "Objects" - , "aliases": [ - "lock" - ] - , "tags": [ - "security" - , "private" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔓" - , "description": "unlocked" - , "category": "Objects" - , "aliases": [ - "unlock" - ] - , "tags": [ - "security" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔏" - , "description": "locked with pen" - , "category": "Objects" - , "aliases": [ - "lock_with_ink_pen" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔐" - , "description": "locked with key" - , "category": "Objects" - , "aliases": [ - "closed_lock_with_key" - ] - , "tags": [ - "security" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔑" - , "description": "key" - , "category": "Objects" - , "aliases": [ - "key" - ] - , "tags": [ - "lock" - , "password" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🗝️" - , "description": "old key" - , "category": "Objects" - , "aliases": [ - "old_key" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🔨" - , "description": "hammer" - , "category": "Objects" - , "aliases": [ - "hammer" - ] - , "tags": [ - "tool" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪓" - , "description": "axe" - , "category": "Objects" - , "aliases": [ - "axe" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "⛏️" - , "description": "pick" - , "category": "Objects" - , "aliases": [ - "pick" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "⚒️" - , "description": "hammer and pick" - , "category": "Objects" - , "aliases": [ - "hammer_and_pick" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🛠️" - , "description": "hammer and wrench" - , "category": "Objects" - , "aliases": [ - "hammer_and_wrench" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🗡️" - , "description": "dagger" - , "category": "Objects" - , "aliases": [ - "dagger" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⚔️" - , "description": "crossed swords" - , "category": "Objects" - , "aliases": [ - "crossed_swords" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "💣" - , "description": "bomb" - , "category": "Objects" - , "aliases": [ - "bomb" - ] - , "tags": [ - "boom" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪃" - , "description": "boomerang" - , "category": "Objects" - , "aliases": [ - "boomerang" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🏹" - , "description": "bow and arrow" - , "category": "Objects" - , "aliases": [ - "bow_and_arrow" - ] - , "tags": [ - "archery" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛡️" - , "description": "shield" - , "category": "Objects" - , "aliases": [ - "shield" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🪚" - , "description": "carpentry saw" - , "category": "Objects" - , "aliases": [ - "carpentry_saw" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🔧" - , "description": "wrench" - , "category": "Objects" - , "aliases": [ - "wrench" - ] - , "tags": [ - "tool" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪛" - , "description": "screwdriver" - , "category": "Objects" - , "aliases": [ - "screwdriver" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🔩" - , "description": "nut and bolt" - , "category": "Objects" - , "aliases": [ - "nut_and_bolt" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⚙️" - , "description": "gear" - , "category": "Objects" - , "aliases": [ - "gear" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🗜️" - , "description": "clamp" - , "category": "Objects" - , "aliases": [ - "clamp" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⚖️" - , "description": "balance scale" - , "category": "Objects" - , "aliases": [ - "balance_scale" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🦯" - , "description": "white cane" - , "category": "Objects" - , "aliases": [ - "probing_cane" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🔗" - , "description": "link" - , "category": "Objects" - , "aliases": [ - "link" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⛓️" - , "description": "chains" - , "category": "Objects" - , "aliases": [ - "chains" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "9.1" - } -, { - "emoji": "🪝" - , "description": "hook" - , "category": "Objects" - , "aliases": [ - "hook" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🧰" - , "description": "toolbox" - , "category": "Objects" - , "aliases": [ - "toolbox" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧲" - , "description": "magnet" - , "category": "Objects" - , "aliases": [ - "magnet" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪜" - , "description": "ladder" - , "category": "Objects" - , "aliases": [ - "ladder" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "⚗️" - , "description": "alembic" - , "category": "Objects" - , "aliases": [ - "alembic" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🧪" - , "description": "test tube" - , "category": "Objects" - , "aliases": [ - "test_tube" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧫" - , "description": "petri dish" - , "category": "Objects" - , "aliases": [ - "petri_dish" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧬" - , "description": "dna" - , "category": "Objects" - , "aliases": [ - "dna" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🔬" - , "description": "microscope" - , "category": "Objects" - , "aliases": [ - "microscope" - ] - , "tags": [ - "science" - , "laboratory" - , "investigate" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔭" - , "description": "telescope" - , "category": "Objects" - , "aliases": [ - "telescope" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📡" - , "description": "satellite antenna" - , "category": "Objects" - , "aliases": [ - "satellite" - ] - , "tags": [ - "signal" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💉" - , "description": "syringe" - , "category": "Objects" - , "aliases": [ - "syringe" - ] - , "tags": [ - "health" - , "hospital" - , "needle" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🩸" - , "description": "drop of blood" - , "category": "Objects" - , "aliases": [ - "drop_of_blood" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "💊" - , "description": "pill" - , "category": "Objects" - , "aliases": [ - "pill" - ] - , "tags": [ - "health" - , "medicine" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🩹" - , "description": "adhesive bandage" - , "category": "Objects" - , "aliases": [ - "adhesive_bandage" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🩼" - , "description": "crutch" - , "category": "Objects" - , "aliases": [ - "crutch" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🩺" - , "description": "stethoscope" - , "category": "Objects" - , "aliases": [ - "stethoscope" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🩻" - , "description": "x-ray" - , "category": "Objects" - , "aliases": [ - "x_ray" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🚪" - , "description": "door" - , "category": "Objects" - , "aliases": [ - "door" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛗" - , "description": "elevator" - , "category": "Objects" - , "aliases": [ - "elevator" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪞" - , "description": "mirror" - , "category": "Objects" - , "aliases": [ - "mirror" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪟" - , "description": "window" - , "category": "Objects" - , "aliases": [ - "window" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🛏️" - , "description": "bed" - , "category": "Objects" - , "aliases": [ - "bed" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🛋️" - , "description": "couch and lamp" - , "category": "Objects" - , "aliases": [ - "couch_and_lamp" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🪑" - , "description": "chair" - , "category": "Objects" - , "aliases": [ - "chair" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🚽" - , "description": "toilet" - , "category": "Objects" - , "aliases": [ - "toilet" - ] - , "tags": [ - "wc" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪠" - , "description": "plunger" - , "category": "Objects" - , "aliases": [ - "plunger" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🚿" - , "description": "shower" - , "category": "Objects" - , "aliases": [ - "shower" - ] - , "tags": [ - "bath" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛁" - , "description": "bathtub" - , "category": "Objects" - , "aliases": [ - "bathtub" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪤" - , "description": "mouse trap" - , "category": "Objects" - , "aliases": [ - "mouse_trap" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪒" - , "description": "razor" - , "category": "Objects" - , "aliases": [ - "razor" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🧴" - , "description": "lotion bottle" - , "category": "Objects" - , "aliases": [ - "lotion_bottle" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧷" - , "description": "safety pin" - , "category": "Objects" - , "aliases": [ - "safety_pin" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧹" - , "description": "broom" - , "category": "Objects" - , "aliases": [ - "broom" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧺" - , "description": "basket" - , "category": "Objects" - , "aliases": [ - "basket" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧻" - , "description": "roll of paper" - , "category": "Objects" - , "aliases": [ - "roll_of_paper" - ] - , "tags": [ - "toilet" - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪣" - , "description": "bucket" - , "category": "Objects" - , "aliases": [ - "bucket" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🧼" - , "description": "soap" - , "category": "Objects" - , "aliases": [ - "soap" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🫧" - , "description": "bubbles" - , "category": "Objects" - , "aliases": [ - "bubbles" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🪥" - , "description": "toothbrush" - , "category": "Objects" - , "aliases": [ - "toothbrush" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🧽" - , "description": "sponge" - , "category": "Objects" - , "aliases": [ - "sponge" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🧯" - , "description": "fire extinguisher" - , "category": "Objects" - , "aliases": [ - "fire_extinguisher" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🛒" - , "description": "shopping cart" - , "category": "Objects" - , "aliases": [ - "shopping_cart" - ] - , "tags": [ - ] - , "unicode_version": "9.0" - , "ios_version": "10.2" - } -, { - "emoji": "🚬" - , "description": "cigarette" - , "category": "Objects" - , "aliases": [ - "smoking" - ] - , "tags": [ - "cigarette" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⚰️" - , "description": "coffin" - , "category": "Objects" - , "aliases": [ - "coffin" - ] - , "tags": [ - "funeral" - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🪦" - , "description": "headstone" - , "category": "Objects" - , "aliases": [ - "headstone" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "⚱️" - , "description": "funeral urn" - , "category": "Objects" - , "aliases": [ - "funeral_urn" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🧿" - , "description": "nazar amulet" - , "category": "Objects" - , "aliases": [ - "nazar_amulet" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🪬" - , "description": "hamsa" - , "category": "Objects" - , "aliases": [ - "hamsa" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🗿" - , "description": "moai" - , "category": "Objects" - , "aliases": [ - "moyai" - ] - , "tags": [ - "stone" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪧" - , "description": "placard" - , "category": "Objects" - , "aliases": [ - "placard" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🪪" - , "description": "identification card" - , "category": "Objects" - , "aliases": [ - "identification_card" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "🏧" - , "description": "ATM sign" - , "category": "Symbols" - , "aliases": [ - "atm" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚮" - , "description": "litter in bin sign" - , "category": "Symbols" - , "aliases": [ - "put_litter_in_its_place" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚰" - , "description": "potable water" - , "category": "Symbols" - , "aliases": [ - "potable_water" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "♿" - , "description": "wheelchair symbol" - , "category": "Symbols" - , "aliases": [ - "wheelchair" - ] - , "tags": [ - "accessibility" - ] - , "unicode_version": "4.1" - , "ios_version": "6.0" - } -, { - "emoji": "🚹" - , "description": "men’s room" - , "category": "Symbols" - , "aliases": [ - "mens" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚺" - , "description": "women’s room" - , "category": "Symbols" - , "aliases": [ - "womens" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚻" - , "description": "restroom" - , "category": "Symbols" - , "aliases": [ - "restroom" - ] - , "tags": [ - "toilet" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚼" - , "description": "baby symbol" - , "category": "Symbols" - , "aliases": [ - "baby_symbol" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚾" - , "description": "water closet" - , "category": "Symbols" - , "aliases": [ - "wc" - ] - , "tags": [ - "toilet" - , "restroom" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛂" - , "description": "passport control" - , "category": "Symbols" - , "aliases": [ - "passport_control" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛃" - , "description": "customs" - , "category": "Symbols" - , "aliases": [ - "customs" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛄" - , "description": "baggage claim" - , "category": "Symbols" - , "aliases": [ - "baggage_claim" - ] - , "tags": [ - "airport" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛅" - , "description": "left luggage" - , "category": "Symbols" - , "aliases": [ - "left_luggage" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⚠️" - , "description": "warning" - , "category": "Symbols" - , "aliases": [ - "warning" - ] - , "tags": [ - "wip" - ] - , "unicode_version": "4.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚸" - , "description": "children crossing" - , "category": "Symbols" - , "aliases": [ - "children_crossing" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⛔" - , "description": "no entry" - , "category": "Symbols" - , "aliases": [ - "no_entry" - ] - , "tags": [ - "limit" - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "🚫" - , "description": "prohibited" - , "category": "Symbols" - , "aliases": [ - "no_entry_sign" - ] - , "tags": [ - "block" - , "forbidden" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚳" - , "description": "no bicycles" - , "category": "Symbols" - , "aliases": [ - "no_bicycles" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚭" - , "description": "no smoking" - , "category": "Symbols" - , "aliases": [ - "no_smoking" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚯" - , "description": "no littering" - , "category": "Symbols" - , "aliases": [ - "do_not_litter" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚱" - , "description": "non-potable water" - , "category": "Symbols" - , "aliases": [ - "non-potable_water" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚷" - , "description": "no pedestrians" - , "category": "Symbols" - , "aliases": [ - "no_pedestrians" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📵" - , "description": "no mobile phones" - , "category": "Symbols" - , "aliases": [ - "no_mobile_phones" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔞" - , "description": "no one under eighteen" - , "category": "Symbols" - , "aliases": [ - "underage" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "☢️" - , "description": "radioactive" - , "category": "Symbols" - , "aliases": [ - "radioactive" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "☣️" - , "description": "biohazard" - , "category": "Symbols" - , "aliases": [ - "biohazard" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "⬆️" - , "description": "up arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_up" - ] - , "tags": [ - ] - , "unicode_version": "4.0" - , "ios_version": "6.0" - } -, { - "emoji": "↗️" - , "description": "up-right arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_upper_right" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "➡️" - , "description": "right arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_right" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "↘️" - , "description": "down-right arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_lower_right" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⬇️" - , "description": "down arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_down" - ] - , "tags": [ - ] - , "unicode_version": "4.0" - , "ios_version": "6.0" - } -, { - "emoji": "↙️" - , "description": "down-left arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_lower_left" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⬅️" - , "description": "left arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_left" - ] - , "tags": [ - ] - , "unicode_version": "4.0" - , "ios_version": "6.0" - } -, { - "emoji": "↖️" - , "description": "up-left arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_upper_left" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "↕️" - , "description": "up-down arrow" - , "category": "Symbols" - , "aliases": [ - "arrow_up_down" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "↔️" - , "description": "left-right arrow" - , "category": "Symbols" - , "aliases": [ - "left_right_arrow" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "↩️" - , "description": "right arrow curving left" - , "category": "Symbols" - , "aliases": [ - "leftwards_arrow_with_hook" - ] - , "tags": [ - "return" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "↪️" - , "description": "left arrow curving right" - , "category": "Symbols" - , "aliases": [ - "arrow_right_hook" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⤴️" - , "description": "right arrow curving up" - , "category": "Symbols" - , "aliases": [ - "arrow_heading_up" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⤵️" - , "description": "right arrow curving down" - , "category": "Symbols" - , "aliases": [ - "arrow_heading_down" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🔃" - , "description": "clockwise vertical arrows" - , "category": "Symbols" - , "aliases": [ - "arrows_clockwise" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔄" - , "description": "counterclockwise arrows button" - , "category": "Symbols" - , "aliases": [ - "arrows_counterclockwise" - ] - , "tags": [ - "sync" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔙" - , "description": "BACK arrow" - , "category": "Symbols" - , "aliases": [ - "back" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔚" - , "description": "END arrow" - , "category": "Symbols" - , "aliases": [ - "end" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔛" - , "description": "ON! arrow" - , "category": "Symbols" - , "aliases": [ - "on" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔜" - , "description": "SOON arrow" - , "category": "Symbols" - , "aliases": [ - "soon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔝" - , "description": "TOP arrow" - , "category": "Symbols" - , "aliases": [ - "top" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛐" - , "description": "place of worship" - , "category": "Symbols" - , "aliases": [ - "place_of_worship" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "⚛️" - , "description": "atom symbol" - , "category": "Symbols" - , "aliases": [ - "atom_symbol" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🕉️" - , "description": "om" - , "category": "Symbols" - , "aliases": [ - "om" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "✡️" - , "description": "star of David" - , "category": "Symbols" - , "aliases": [ - "star_of_david" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "☸️" - , "description": "wheel of dharma" - , "category": "Symbols" - , "aliases": [ - "wheel_of_dharma" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "☯️" - , "description": "yin yang" - , "category": "Symbols" - , "aliases": [ - "yin_yang" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "✝️" - , "description": "latin cross" - , "category": "Symbols" - , "aliases": [ - "latin_cross" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "☦️" - , "description": "orthodox cross" - , "category": "Symbols" - , "aliases": [ - "orthodox_cross" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "☪️" - , "description": "star and crescent" - , "category": "Symbols" - , "aliases": [ - "star_and_crescent" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "☮️" - , "description": "peace symbol" - , "category": "Symbols" - , "aliases": [ - "peace_symbol" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "🕎" - , "description": "menorah" - , "category": "Symbols" - , "aliases": [ - "menorah" - ] - , "tags": [ - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🔯" - , "description": "dotted six-pointed star" - , "category": "Symbols" - , "aliases": [ - "six_pointed_star" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🪯" - , "description": "khanda" - , "category": "Symbols" - , "aliases": [ - "khanda" - ] - , "tags": [ - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "♈" - , "description": "Aries" - , "category": "Symbols" - , "aliases": [ - "aries" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♉" - , "description": "Taurus" - , "category": "Symbols" - , "aliases": [ - "taurus" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♊" - , "description": "Gemini" - , "category": "Symbols" - , "aliases": [ - "gemini" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♋" - , "description": "Cancer" - , "category": "Symbols" - , "aliases": [ - "cancer" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♌" - , "description": "Leo" - , "category": "Symbols" - , "aliases": [ - "leo" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♍" - , "description": "Virgo" - , "category": "Symbols" - , "aliases": [ - "virgo" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♎" - , "description": "Libra" - , "category": "Symbols" - , "aliases": [ - "libra" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♏" - , "description": "Scorpio" - , "category": "Symbols" - , "aliases": [ - "scorpius" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♐" - , "description": "Sagittarius" - , "category": "Symbols" - , "aliases": [ - "sagittarius" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♑" - , "description": "Capricorn" - , "category": "Symbols" - , "aliases": [ - "capricorn" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♒" - , "description": "Aquarius" - , "category": "Symbols" - , "aliases": [ - "aquarius" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "♓" - , "description": "Pisces" - , "category": "Symbols" - , "aliases": [ - "pisces" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⛎" - , "description": "Ophiuchus" - , "category": "Symbols" - , "aliases": [ - "ophiuchus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔀" - , "description": "shuffle tracks button" - , "category": "Symbols" - , "aliases": [ - "twisted_rightwards_arrows" - ] - , "tags": [ - "shuffle" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔁" - , "description": "repeat button" - , "category": "Symbols" - , "aliases": [ - "repeat" - ] - , "tags": [ - "loop" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔂" - , "description": "repeat single button" - , "category": "Symbols" - , "aliases": [ - "repeat_one" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "▶️" - , "description": "play button" - , "category": "Symbols" - , "aliases": [ - "arrow_forward" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⏩" - , "description": "fast-forward button" - , "category": "Symbols" - , "aliases": [ - "fast_forward" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⏭️" - , "description": "next track button" - , "category": "Symbols" - , "aliases": [ - "next_track_button" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.1" - } -, { - "emoji": "⏯️" - , "description": "play or pause button" - , "category": "Symbols" - , "aliases": [ - "play_or_pause_button" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.1" - } -, { - "emoji": "◀️" - , "description": "reverse button" - , "category": "Symbols" - , "aliases": [ - "arrow_backward" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⏪" - , "description": "fast reverse button" - , "category": "Symbols" - , "aliases": [ - "rewind" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⏮️" - , "description": "last track button" - , "category": "Symbols" - , "aliases": [ - "previous_track_button" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.1" - } -, { - "emoji": "🔼" - , "description": "upwards button" - , "category": "Symbols" - , "aliases": [ - "arrow_up_small" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⏫" - , "description": "fast up button" - , "category": "Symbols" - , "aliases": [ - "arrow_double_up" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔽" - , "description": "downwards button" - , "category": "Symbols" - , "aliases": [ - "arrow_down_small" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⏬" - , "description": "fast down button" - , "category": "Symbols" - , "aliases": [ - "arrow_double_down" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⏸️" - , "description": "pause button" - , "category": "Symbols" - , "aliases": [ - "pause_button" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⏹️" - , "description": "stop button" - , "category": "Symbols" - , "aliases": [ - "stop_button" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⏺️" - , "description": "record button" - , "category": "Symbols" - , "aliases": [ - "record_button" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "⏏️" - , "description": "eject button" - , "category": "Symbols" - , "aliases": [ - "eject_button" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🎦" - , "description": "cinema" - , "category": "Symbols" - , "aliases": [ - "cinema" - ] - , "tags": [ - "film" - , "movie" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔅" - , "description": "dim button" - , "category": "Symbols" - , "aliases": [ - "low_brightness" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔆" - , "description": "bright button" - , "category": "Symbols" - , "aliases": [ - "high_brightness" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📶" - , "description": "antenna bars" - , "category": "Symbols" - , "aliases": [ - "signal_strength" - ] - , "tags": [ - "wifi" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🛜" - , "description": "wireless" - , "category": "Symbols" - , "aliases": [ - "wireless" - ] - , "tags": [ - "wifi" - ] - , "unicode_version": "15.0" - , "ios_version": "16.4" - } -, { - "emoji": "📳" - , "description": "vibration mode" - , "category": "Symbols" - , "aliases": [ - "vibration_mode" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📴" - , "description": "mobile phone off" - , "category": "Symbols" - , "aliases": [ - "mobile_phone_off" - ] - , "tags": [ - "mute" - , "off" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "♀️" - , "description": "female sign" - , "category": "Symbols" - , "aliases": [ - "female_sign" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "♂️" - , "description": "male sign" - , "category": "Symbols" - , "aliases": [ - "male_sign" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "⚧️" - , "description": "transgender symbol" - , "category": "Symbols" - , "aliases": [ - "transgender_symbol" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "✖️" - , "description": "multiply" - , "category": "Symbols" - , "aliases": [ - "heavy_multiplication_x" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "➕" - , "description": "plus" - , "category": "Symbols" - , "aliases": [ - "heavy_plus_sign" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "➖" - , "description": "minus" - , "category": "Symbols" - , "aliases": [ - "heavy_minus_sign" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "➗" - , "description": "divide" - , "category": "Symbols" - , "aliases": [ - "heavy_division_sign" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🟰" - , "description": "heavy equals sign" - , "category": "Symbols" - , "aliases": [ - "heavy_equals_sign" - ] - , "tags": [ - ] - , "unicode_version": "14.0" - , "ios_version": "15.4" - } -, { - "emoji": "♾️" - , "description": "infinity" - , "category": "Symbols" - , "aliases": [ - "infinity" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "‼️" - , "description": "double exclamation mark" - , "category": "Symbols" - , "aliases": [ - "bangbang" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "⁉️" - , "description": "exclamation question mark" - , "category": "Symbols" - , "aliases": [ - "interrobang" - ] - , "tags": [ - ] - , "unicode_version": "3.0" - , "ios_version": "6.0" - } -, { - "emoji": "❓" - , "description": "red question mark" - , "category": "Symbols" - , "aliases": [ - "question" - ] - , "tags": [ - "confused" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "❔" - , "description": "white question mark" - , "category": "Symbols" - , "aliases": [ - "grey_question" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "❕" - , "description": "white exclamation mark" - , "category": "Symbols" - , "aliases": [ - "grey_exclamation" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "❗" - , "description": "red exclamation mark" - , "category": "Symbols" - , "aliases": [ - "exclamation" - , "heavy_exclamation_mark" - ] - , "tags": [ - "bang" - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "〰️" - , "description": "wavy dash" - , "category": "Symbols" - , "aliases": [ - "wavy_dash" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "💱" - , "description": "currency exchange" - , "category": "Symbols" - , "aliases": [ - "currency_exchange" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💲" - , "description": "heavy dollar sign" - , "category": "Symbols" - , "aliases": [ - "heavy_dollar_sign" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⚕️" - , "description": "medical symbol" - , "category": "Symbols" - , "aliases": [ - "medical_symbol" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "♻️" - , "description": "recycling symbol" - , "category": "Symbols" - , "aliases": [ - "recycle" - ] - , "tags": [ - "environment" - , "green" - ] - , "unicode_version": "3.2" - , "ios_version": "6.0" - } -, { - "emoji": "⚜️" - , "description": "fleur-de-lis" - , "category": "Symbols" - , "aliases": [ - "fleur_de_lis" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "9.1" - } -, { - "emoji": "🔱" - , "description": "trident emblem" - , "category": "Symbols" - , "aliases": [ - "trident" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "📛" - , "description": "name badge" - , "category": "Symbols" - , "aliases": [ - "name_badge" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔰" - , "description": "Japanese symbol for beginner" - , "category": "Symbols" - , "aliases": [ - "beginner" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "⭕" - , "description": "hollow red circle" - , "category": "Symbols" - , "aliases": [ - "o" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "✅" - , "description": "check mark button" - , "category": "Symbols" - , "aliases": [ - "white_check_mark" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "☑️" - , "description": "check box with check" - , "category": "Symbols" - , "aliases": [ - "ballot_box_with_check" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "✔️" - , "description": "check mark" - , "category": "Symbols" - , "aliases": [ - "heavy_check_mark" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "❌" - , "description": "cross mark" - , "category": "Symbols" - , "aliases": [ - "x" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "❎" - , "description": "cross mark button" - , "category": "Symbols" - , "aliases": [ - "negative_squared_cross_mark" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "➰" - , "description": "curly loop" - , "category": "Symbols" - , "aliases": [ - "curly_loop" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "➿" - , "description": "double curly loop" - , "category": "Symbols" - , "aliases": [ - "loop" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "〽️" - , "description": "part alternation mark" - , "category": "Symbols" - , "aliases": [ - "part_alternation_mark" - ] - , "tags": [ - ] - , "unicode_version": "3.2" - , "ios_version": "6.0" - } -, { - "emoji": "✳️" - , "description": "eight-spoked asterisk" - , "category": "Symbols" - , "aliases": [ - "eight_spoked_asterisk" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "✴️" - , "description": "eight-pointed star" - , "category": "Symbols" - , "aliases": [ - "eight_pointed_black_star" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "❇️" - , "description": "sparkle" - , "category": "Symbols" - , "aliases": [ - "sparkle" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "©️" - , "description": "copyright" - , "category": "Symbols" - , "aliases": [ - "copyright" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "®️" - , "description": "registered" - , "category": "Symbols" - , "aliases": [ - "registered" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "™️" - , "description": "trade mark" - , "category": "Symbols" - , "aliases": [ - "tm" - ] - , "tags": [ - "trademark" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "#️⃣" - , "description": "keycap: #" - , "category": "Symbols" - , "aliases": [ - "hash" - ] - , "tags": [ - "number" - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "*️⃣" - , "description": "keycap: *" - , "category": "Symbols" - , "aliases": [ - "asterisk" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "9.1" - } -, { - "emoji": "0️⃣" - , "description": "keycap: 0" - , "category": "Symbols" - , "aliases": [ - "zero" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "1️⃣" - , "description": "keycap: 1" - , "category": "Symbols" - , "aliases": [ - "one" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "2️⃣" - , "description": "keycap: 2" - , "category": "Symbols" - , "aliases": [ - "two" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "3️⃣" - , "description": "keycap: 3" - , "category": "Symbols" - , "aliases": [ - "three" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "4️⃣" - , "description": "keycap: 4" - , "category": "Symbols" - , "aliases": [ - "four" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "5️⃣" - , "description": "keycap: 5" - , "category": "Symbols" - , "aliases": [ - "five" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "6️⃣" - , "description": "keycap: 6" - , "category": "Symbols" - , "aliases": [ - "six" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "7️⃣" - , "description": "keycap: 7" - , "category": "Symbols" - , "aliases": [ - "seven" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "8️⃣" - , "description": "keycap: 8" - , "category": "Symbols" - , "aliases": [ - "eight" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "9️⃣" - , "description": "keycap: 9" - , "category": "Symbols" - , "aliases": [ - "nine" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🔟" - , "description": "keycap: 10" - , "category": "Symbols" - , "aliases": [ - "keycap_ten" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔠" - , "description": "input latin uppercase" - , "category": "Symbols" - , "aliases": [ - "capital_abcd" - ] - , "tags": [ - "letters" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔡" - , "description": "input latin lowercase" - , "category": "Symbols" - , "aliases": [ - "abcd" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔢" - , "description": "input numbers" - , "category": "Symbols" - , "aliases": [ - "1234" - ] - , "tags": [ - "numbers" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔣" - , "description": "input symbols" - , "category": "Symbols" - , "aliases": [ - "symbols" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔤" - , "description": "input latin letters" - , "category": "Symbols" - , "aliases": [ - "abc" - ] - , "tags": [ - "alphabet" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🅰️" - , "description": "A button (blood type)" - , "category": "Symbols" - , "aliases": [ - "a" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆎" - , "description": "AB button (blood type)" - , "category": "Symbols" - , "aliases": [ - "ab" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🅱️" - , "description": "B button (blood type)" - , "category": "Symbols" - , "aliases": [ - "b" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆑" - , "description": "CL button" - , "category": "Symbols" - , "aliases": [ - "cl" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆒" - , "description": "COOL button" - , "category": "Symbols" - , "aliases": [ - "cool" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆓" - , "description": "FREE button" - , "category": "Symbols" - , "aliases": [ - "free" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "ℹ️" - , "description": "information" - , "category": "Symbols" - , "aliases": [ - "information_source" - ] - , "tags": [ - ] - , "unicode_version": "3.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆔" - , "description": "ID button" - , "category": "Symbols" - , "aliases": [ - "id" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "Ⓜ️" - , "description": "circled M" - , "category": "Symbols" - , "aliases": [ - "m" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🆕" - , "description": "NEW button" - , "category": "Symbols" - , "aliases": [ - "new" - ] - , "tags": [ - "fresh" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆖" - , "description": "NG button" - , "category": "Symbols" - , "aliases": [ - "ng" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🅾️" - , "description": "O button (blood type)" - , "category": "Symbols" - , "aliases": [ - "o2" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆗" - , "description": "OK button" - , "category": "Symbols" - , "aliases": [ - "ok" - ] - , "tags": [ - "yes" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🅿️" - , "description": "P button" - , "category": "Symbols" - , "aliases": [ - "parking" - ] - , "tags": [ - ] - , "unicode_version": "5.2" - , "ios_version": "6.0" - } -, { - "emoji": "🆘" - , "description": "SOS button" - , "category": "Symbols" - , "aliases": [ - "sos" - ] - , "tags": [ - "help" - , "emergency" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆙" - , "description": "UP! button" - , "category": "Symbols" - , "aliases": [ - "up" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🆚" - , "description": "VS button" - , "category": "Symbols" - , "aliases": [ - "vs" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈁" - , "description": "Japanese “here” button" - , "category": "Symbols" - , "aliases": [ - "koko" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈂️" - , "description": "Japanese “service charge” button" - , "category": "Symbols" - , "aliases": [ - "sa" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈷️" - , "description": "Japanese “monthly amount” button" - , "category": "Symbols" - , "aliases": [ - "u6708" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈶" - , "description": "Japanese “not free of charge” button" - , "category": "Symbols" - , "aliases": [ - "u6709" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈯" - , "description": "Japanese “reserved” button" - , "category": "Symbols" - , "aliases": [ - "u6307" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🉐" - , "description": "Japanese “bargain” button" - , "category": "Symbols" - , "aliases": [ - "ideograph_advantage" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈹" - , "description": "Japanese “discount” button" - , "category": "Symbols" - , "aliases": [ - "u5272" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈚" - , "description": "Japanese “free of charge” button" - , "category": "Symbols" - , "aliases": [ - "u7121" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🈲" - , "description": "Japanese “prohibited” button" - , "category": "Symbols" - , "aliases": [ - "u7981" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🉑" - , "description": "Japanese “acceptable” button" - , "category": "Symbols" - , "aliases": [ - "accept" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈸" - , "description": "Japanese “application” button" - , "category": "Symbols" - , "aliases": [ - "u7533" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈴" - , "description": "Japanese “passing grade” button" - , "category": "Symbols" - , "aliases": [ - "u5408" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈳" - , "description": "Japanese “vacancy” button" - , "category": "Symbols" - , "aliases": [ - "u7a7a" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "㊗️" - , "description": "Japanese “congratulations” button" - , "category": "Symbols" - , "aliases": [ - "congratulations" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "㊙️" - , "description": "Japanese “secret” button" - , "category": "Symbols" - , "aliases": [ - "secret" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🈺" - , "description": "Japanese “open for business” button" - , "category": "Symbols" - , "aliases": [ - "u55b6" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🈵" - , "description": "Japanese “no vacancy” button" - , "category": "Symbols" - , "aliases": [ - "u6e80" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔴" - , "description": "red circle" - , "category": "Symbols" - , "aliases": [ - "red_circle" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🟠" - , "description": "orange circle" - , "category": "Symbols" - , "aliases": [ - "orange_circle" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟡" - , "description": "yellow circle" - , "category": "Symbols" - , "aliases": [ - "yellow_circle" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟢" - , "description": "green circle" - , "category": "Symbols" - , "aliases": [ - "green_circle" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🔵" - , "description": "blue circle" - , "category": "Symbols" - , "aliases": [ - "large_blue_circle" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🟣" - , "description": "purple circle" - , "category": "Symbols" - , "aliases": [ - "purple_circle" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟤" - , "description": "brown circle" - , "category": "Symbols" - , "aliases": [ - "brown_circle" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "⚫" - , "description": "black circle" - , "category": "Symbols" - , "aliases": [ - "black_circle" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "6.0" - } -, { - "emoji": "⚪" - , "description": "white circle" - , "category": "Symbols" - , "aliases": [ - "white_circle" - ] - , "tags": [ - ] - , "unicode_version": "4.1" - , "ios_version": "6.0" - } -, { - "emoji": "🟥" - , "description": "red square" - , "category": "Symbols" - , "aliases": [ - "red_square" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟧" - , "description": "orange square" - , "category": "Symbols" - , "aliases": [ - "orange_square" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟨" - , "description": "yellow square" - , "category": "Symbols" - , "aliases": [ - "yellow_square" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟩" - , "description": "green square" - , "category": "Symbols" - , "aliases": [ - "green_square" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟦" - , "description": "blue square" - , "category": "Symbols" - , "aliases": [ - "blue_square" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟪" - , "description": "purple square" - , "category": "Symbols" - , "aliases": [ - "purple_square" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "🟫" - , "description": "brown square" - , "category": "Symbols" - , "aliases": [ - "brown_square" - ] - , "tags": [ - ] - , "unicode_version": "12.0" - , "ios_version": "13.0" - } -, { - "emoji": "⬛" - , "description": "black large square" - , "category": "Symbols" - , "aliases": [ - "black_large_square" - ] - , "tags": [ - ] - , "unicode_version": "5.1" - , "ios_version": "6.0" - } -, { - "emoji": "⬜" - , "description": "white large square" - , "category": "Symbols" - , "aliases": [ - "white_large_square" - ] - , "tags": [ - ] - , "unicode_version": "5.1" - , "ios_version": "6.0" - } -, { - "emoji": "◼️" - , "description": "black medium square" - , "category": "Symbols" - , "aliases": [ - "black_medium_square" - ] - , "tags": [ - ] - , "unicode_version": "3.2" - , "ios_version": "6.0" - } -, { - "emoji": "◻️" - , "description": "white medium square" - , "category": "Symbols" - , "aliases": [ - "white_medium_square" - ] - , "tags": [ - ] - , "unicode_version": "3.2" - , "ios_version": "6.0" - } -, { - "emoji": "◾" - , "description": "black medium-small square" - , "category": "Symbols" - , "aliases": [ - "black_medium_small_square" - ] - , "tags": [ - ] - , "unicode_version": "3.2" - , "ios_version": "6.0" - } -, { - "emoji": "◽" - , "description": "white medium-small square" - , "category": "Symbols" - , "aliases": [ - "white_medium_small_square" - ] - , "tags": [ - ] - , "unicode_version": "3.2" - , "ios_version": "6.0" - } -, { - "emoji": "▪️" - , "description": "black small square" - , "category": "Symbols" - , "aliases": [ - "black_small_square" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "▫️" - , "description": "white small square" - , "category": "Symbols" - , "aliases": [ - "white_small_square" - ] - , "tags": [ - ] - , "unicode_version": "" - , "ios_version": "6.0" - } -, { - "emoji": "🔶" - , "description": "large orange diamond" - , "category": "Symbols" - , "aliases": [ - "large_orange_diamond" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔷" - , "description": "large blue diamond" - , "category": "Symbols" - , "aliases": [ - "large_blue_diamond" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔸" - , "description": "small orange diamond" - , "category": "Symbols" - , "aliases": [ - "small_orange_diamond" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔹" - , "description": "small blue diamond" - , "category": "Symbols" - , "aliases": [ - "small_blue_diamond" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔺" - , "description": "red triangle pointed up" - , "category": "Symbols" - , "aliases": [ - "small_red_triangle" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔻" - , "description": "red triangle pointed down" - , "category": "Symbols" - , "aliases": [ - "small_red_triangle_down" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "💠" - , "description": "diamond with a dot" - , "category": "Symbols" - , "aliases": [ - "diamond_shape_with_a_dot_inside" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔘" - , "description": "radio button" - , "category": "Symbols" - , "aliases": [ - "radio_button" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔳" - , "description": "white square button" - , "category": "Symbols" - , "aliases": [ - "white_square_button" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🔲" - , "description": "black square button" - , "category": "Symbols" - , "aliases": [ - "black_square_button" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏁" - , "description": "chequered flag" - , "category": "Flags" - , "aliases": [ - "checkered_flag" - ] - , "tags": [ - "milestone" - , "finish" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🚩" - , "description": "triangular flag" - , "category": "Flags" - , "aliases": [ - "triangular_flag_on_post" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🎌" - , "description": "crossed flags" - , "category": "Flags" - , "aliases": [ - "crossed_flags" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🏴" - , "description": "black flag" - , "category": "Flags" - , "aliases": [ - "black_flag" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏳️" - , "description": "white flag" - , "category": "Flags" - , "aliases": [ - "white_flag" - ] - , "tags": [ - ] - , "unicode_version": "7.0" - , "ios_version": "9.1" - } -, { - "emoji": "🏳️‍🌈" - , "description": "rainbow flag" - , "category": "Flags" - , "aliases": [ - "rainbow_flag" - ] - , "tags": [ - "pride" - ] - , "unicode_version": "6.0" - , "ios_version": "10.0" - } -, { - "emoji": "🏳️‍⚧️" - , "description": "transgender flag" - , "category": "Flags" - , "aliases": [ - "transgender_flag" - ] - , "tags": [ - ] - , "unicode_version": "13.0" - , "ios_version": "14.0" - } -, { - "emoji": "🏴‍☠️" - , "description": "pirate flag" - , "category": "Flags" - , "aliases": [ - "pirate_flag" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇦🇨" - , "description": "flag: Ascension Island" - , "category": "Flags" - , "aliases": [ - "ascension_island" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇦🇩" - , "description": "flag: Andorra" - , "category": "Flags" - , "aliases": [ - "andorra" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇪" - , "description": "flag: United Arab Emirates" - , "category": "Flags" - , "aliases": [ - "united_arab_emirates" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇫" - , "description": "flag: Afghanistan" - , "category": "Flags" - , "aliases": [ - "afghanistan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇬" - , "description": "flag: Antigua & Barbuda" - , "category": "Flags" - , "aliases": [ - "antigua_barbuda" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇮" - , "description": "flag: Anguilla" - , "category": "Flags" - , "aliases": [ - "anguilla" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇱" - , "description": "flag: Albania" - , "category": "Flags" - , "aliases": [ - "albania" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇲" - , "description": "flag: Armenia" - , "category": "Flags" - , "aliases": [ - "armenia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇴" - , "description": "flag: Angola" - , "category": "Flags" - , "aliases": [ - "angola" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇶" - , "description": "flag: Antarctica" - , "category": "Flags" - , "aliases": [ - "antarctica" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇦🇷" - , "description": "flag: Argentina" - , "category": "Flags" - , "aliases": [ - "argentina" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇸" - , "description": "flag: American Samoa" - , "category": "Flags" - , "aliases": [ - "american_samoa" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇹" - , "description": "flag: Austria" - , "category": "Flags" - , "aliases": [ - "austria" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇺" - , "description": "flag: Australia" - , "category": "Flags" - , "aliases": [ - "australia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇼" - , "description": "flag: Aruba" - , "category": "Flags" - , "aliases": [ - "aruba" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇦🇽" - , "description": "flag: Åland Islands" - , "category": "Flags" - , "aliases": [ - "aland_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇦🇿" - , "description": "flag: Azerbaijan" - , "category": "Flags" - , "aliases": [ - "azerbaijan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇦" - , "description": "flag: Bosnia & Herzegovina" - , "category": "Flags" - , "aliases": [ - "bosnia_herzegovina" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇧" - , "description": "flag: Barbados" - , "category": "Flags" - , "aliases": [ - "barbados" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇩" - , "description": "flag: Bangladesh" - , "category": "Flags" - , "aliases": [ - "bangladesh" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇪" - , "description": "flag: Belgium" - , "category": "Flags" - , "aliases": [ - "belgium" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇫" - , "description": "flag: Burkina Faso" - , "category": "Flags" - , "aliases": [ - "burkina_faso" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇬" - , "description": "flag: Bulgaria" - , "category": "Flags" - , "aliases": [ - "bulgaria" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇭" - , "description": "flag: Bahrain" - , "category": "Flags" - , "aliases": [ - "bahrain" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇮" - , "description": "flag: Burundi" - , "category": "Flags" - , "aliases": [ - "burundi" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇯" - , "description": "flag: Benin" - , "category": "Flags" - , "aliases": [ - "benin" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇱" - , "description": "flag: St. Barthélemy" - , "category": "Flags" - , "aliases": [ - "st_barthelemy" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇧🇲" - , "description": "flag: Bermuda" - , "category": "Flags" - , "aliases": [ - "bermuda" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇳" - , "description": "flag: Brunei" - , "category": "Flags" - , "aliases": [ - "brunei" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇴" - , "description": "flag: Bolivia" - , "category": "Flags" - , "aliases": [ - "bolivia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇶" - , "description": "flag: Caribbean Netherlands" - , "category": "Flags" - , "aliases": [ - "caribbean_netherlands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇧🇷" - , "description": "flag: Brazil" - , "category": "Flags" - , "aliases": [ - "brazil" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇸" - , "description": "flag: Bahamas" - , "category": "Flags" - , "aliases": [ - "bahamas" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇹" - , "description": "flag: Bhutan" - , "category": "Flags" - , "aliases": [ - "bhutan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇻" - , "description": "flag: Bouvet Island" - , "category": "Flags" - , "aliases": [ - "bouvet_island" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇧🇼" - , "description": "flag: Botswana" - , "category": "Flags" - , "aliases": [ - "botswana" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇾" - , "description": "flag: Belarus" - , "category": "Flags" - , "aliases": [ - "belarus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇧🇿" - , "description": "flag: Belize" - , "category": "Flags" - , "aliases": [ - "belize" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇦" - , "description": "flag: Canada" - , "category": "Flags" - , "aliases": [ - "canada" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇨" - , "description": "flag: Cocos (Keeling) Islands" - , "category": "Flags" - , "aliases": [ - "cocos_islands" - ] - , "tags": [ - "keeling" - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇨🇩" - , "description": "flag: Congo - Kinshasa" - , "category": "Flags" - , "aliases": [ - "congo_kinshasa" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇫" - , "description": "flag: Central African Republic" - , "category": "Flags" - , "aliases": [ - "central_african_republic" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇬" - , "description": "flag: Congo - Brazzaville" - , "category": "Flags" - , "aliases": [ - "congo_brazzaville" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇭" - , "description": "flag: Switzerland" - , "category": "Flags" - , "aliases": [ - "switzerland" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇮" - , "description": "flag: Côte d’Ivoire" - , "category": "Flags" - , "aliases": [ - "cote_divoire" - ] - , "tags": [ - "ivory" - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇰" - , "description": "flag: Cook Islands" - , "category": "Flags" - , "aliases": [ - "cook_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇱" - , "description": "flag: Chile" - , "category": "Flags" - , "aliases": [ - "chile" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇲" - , "description": "flag: Cameroon" - , "category": "Flags" - , "aliases": [ - "cameroon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇳" - , "description": "flag: China" - , "category": "Flags" - , "aliases": [ - "cn" - ] - , "tags": [ - "china" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇨🇴" - , "description": "flag: Colombia" - , "category": "Flags" - , "aliases": [ - "colombia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇵" - , "description": "flag: Clipperton Island" - , "category": "Flags" - , "aliases": [ - "clipperton_island" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇨🇷" - , "description": "flag: Costa Rica" - , "category": "Flags" - , "aliases": [ - "costa_rica" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇺" - , "description": "flag: Cuba" - , "category": "Flags" - , "aliases": [ - "cuba" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇻" - , "description": "flag: Cape Verde" - , "category": "Flags" - , "aliases": [ - "cape_verde" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇼" - , "description": "flag: Curaçao" - , "category": "Flags" - , "aliases": [ - "curacao" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇽" - , "description": "flag: Christmas Island" - , "category": "Flags" - , "aliases": [ - "christmas_island" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇨🇾" - , "description": "flag: Cyprus" - , "category": "Flags" - , "aliases": [ - "cyprus" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇨🇿" - , "description": "flag: Czechia" - , "category": "Flags" - , "aliases": [ - "czech_republic" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇩🇪" - , "description": "flag: Germany" - , "category": "Flags" - , "aliases": [ - "de" - ] - , "tags": [ - "flag" - , "germany" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇩🇬" - , "description": "flag: Diego Garcia" - , "category": "Flags" - , "aliases": [ - "diego_garcia" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇩🇯" - , "description": "flag: Djibouti" - , "category": "Flags" - , "aliases": [ - "djibouti" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇩🇰" - , "description": "flag: Denmark" - , "category": "Flags" - , "aliases": [ - "denmark" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇩🇲" - , "description": "flag: Dominica" - , "category": "Flags" - , "aliases": [ - "dominica" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇩🇴" - , "description": "flag: Dominican Republic" - , "category": "Flags" - , "aliases": [ - "dominican_republic" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇩🇿" - , "description": "flag: Algeria" - , "category": "Flags" - , "aliases": [ - "algeria" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇪🇦" - , "description": "flag: Ceuta & Melilla" - , "category": "Flags" - , "aliases": [ - "ceuta_melilla" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇪🇨" - , "description": "flag: Ecuador" - , "category": "Flags" - , "aliases": [ - "ecuador" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇪🇪" - , "description": "flag: Estonia" - , "category": "Flags" - , "aliases": [ - "estonia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇪🇬" - , "description": "flag: Egypt" - , "category": "Flags" - , "aliases": [ - "egypt" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇪🇭" - , "description": "flag: Western Sahara" - , "category": "Flags" - , "aliases": [ - "western_sahara" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇪🇷" - , "description": "flag: Eritrea" - , "category": "Flags" - , "aliases": [ - "eritrea" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇪🇸" - , "description": "flag: Spain" - , "category": "Flags" - , "aliases": [ - "es" - ] - , "tags": [ - "spain" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇪🇹" - , "description": "flag: Ethiopia" - , "category": "Flags" - , "aliases": [ - "ethiopia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇪🇺" - , "description": "flag: European Union" - , "category": "Flags" - , "aliases": [ - "eu" - , "european_union" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇫🇮" - , "description": "flag: Finland" - , "category": "Flags" - , "aliases": [ - "finland" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇫🇯" - , "description": "flag: Fiji" - , "category": "Flags" - , "aliases": [ - "fiji" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇫🇰" - , "description": "flag: Falkland Islands" - , "category": "Flags" - , "aliases": [ - "falkland_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇫🇲" - , "description": "flag: Micronesia" - , "category": "Flags" - , "aliases": [ - "micronesia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇫🇴" - , "description": "flag: Faroe Islands" - , "category": "Flags" - , "aliases": [ - "faroe_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇫🇷" - , "description": "flag: France" - , "category": "Flags" - , "aliases": [ - "fr" - ] - , "tags": [ - "france" - , "french" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇬🇦" - , "description": "flag: Gabon" - , "category": "Flags" - , "aliases": [ - "gabon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇧" - , "description": "flag: United Kingdom" - , "category": "Flags" - , "aliases": [ - "gb" - , "uk" - ] - , "tags": [ - "flag" - , "british" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇬🇩" - , "description": "flag: Grenada" - , "category": "Flags" - , "aliases": [ - "grenada" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇪" - , "description": "flag: Georgia" - , "category": "Flags" - , "aliases": [ - "georgia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇫" - , "description": "flag: French Guiana" - , "category": "Flags" - , "aliases": [ - "french_guiana" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇬" - , "description": "flag: Guernsey" - , "category": "Flags" - , "aliases": [ - "guernsey" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇬🇭" - , "description": "flag: Ghana" - , "category": "Flags" - , "aliases": [ - "ghana" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇮" - , "description": "flag: Gibraltar" - , "category": "Flags" - , "aliases": [ - "gibraltar" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇱" - , "description": "flag: Greenland" - , "category": "Flags" - , "aliases": [ - "greenland" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇬🇲" - , "description": "flag: Gambia" - , "category": "Flags" - , "aliases": [ - "gambia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇳" - , "description": "flag: Guinea" - , "category": "Flags" - , "aliases": [ - "guinea" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇵" - , "description": "flag: Guadeloupe" - , "category": "Flags" - , "aliases": [ - "guadeloupe" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇬🇶" - , "description": "flag: Equatorial Guinea" - , "category": "Flags" - , "aliases": [ - "equatorial_guinea" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇷" - , "description": "flag: Greece" - , "category": "Flags" - , "aliases": [ - "greece" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇸" - , "description": "flag: South Georgia & South Sandwich Islands" - , "category": "Flags" - , "aliases": [ - "south_georgia_south_sandwich_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇬🇹" - , "description": "flag: Guatemala" - , "category": "Flags" - , "aliases": [ - "guatemala" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇺" - , "description": "flag: Guam" - , "category": "Flags" - , "aliases": [ - "guam" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇼" - , "description": "flag: Guinea-Bissau" - , "category": "Flags" - , "aliases": [ - "guinea_bissau" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇬🇾" - , "description": "flag: Guyana" - , "category": "Flags" - , "aliases": [ - "guyana" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇭🇰" - , "description": "flag: Hong Kong SAR China" - , "category": "Flags" - , "aliases": [ - "hong_kong" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇭🇲" - , "description": "flag: Heard & McDonald Islands" - , "category": "Flags" - , "aliases": [ - "heard_mcdonald_islands" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇭🇳" - , "description": "flag: Honduras" - , "category": "Flags" - , "aliases": [ - "honduras" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇭🇷" - , "description": "flag: Croatia" - , "category": "Flags" - , "aliases": [ - "croatia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇭🇹" - , "description": "flag: Haiti" - , "category": "Flags" - , "aliases": [ - "haiti" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇭🇺" - , "description": "flag: Hungary" - , "category": "Flags" - , "aliases": [ - "hungary" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇨" - , "description": "flag: Canary Islands" - , "category": "Flags" - , "aliases": [ - "canary_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇮🇩" - , "description": "flag: Indonesia" - , "category": "Flags" - , "aliases": [ - "indonesia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇪" - , "description": "flag: Ireland" - , "category": "Flags" - , "aliases": [ - "ireland" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇱" - , "description": "flag: Israel" - , "category": "Flags" - , "aliases": [ - "israel" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇲" - , "description": "flag: Isle of Man" - , "category": "Flags" - , "aliases": [ - "isle_of_man" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇮🇳" - , "description": "flag: India" - , "category": "Flags" - , "aliases": [ - "india" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇴" - , "description": "flag: British Indian Ocean Territory" - , "category": "Flags" - , "aliases": [ - "british_indian_ocean_territory" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇮🇶" - , "description": "flag: Iraq" - , "category": "Flags" - , "aliases": [ - "iraq" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇷" - , "description": "flag: Iran" - , "category": "Flags" - , "aliases": [ - "iran" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇸" - , "description": "flag: Iceland" - , "category": "Flags" - , "aliases": [ - "iceland" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇮🇹" - , "description": "flag: Italy" - , "category": "Flags" - , "aliases": [ - "it" - ] - , "tags": [ - "italy" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇯🇪" - , "description": "flag: Jersey" - , "category": "Flags" - , "aliases": [ - "jersey" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇯🇲" - , "description": "flag: Jamaica" - , "category": "Flags" - , "aliases": [ - "jamaica" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇯🇴" - , "description": "flag: Jordan" - , "category": "Flags" - , "aliases": [ - "jordan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇯🇵" - , "description": "flag: Japan" - , "category": "Flags" - , "aliases": [ - "jp" - ] - , "tags": [ - "japan" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇰🇪" - , "description": "flag: Kenya" - , "category": "Flags" - , "aliases": [ - "kenya" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇬" - , "description": "flag: Kyrgyzstan" - , "category": "Flags" - , "aliases": [ - "kyrgyzstan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇭" - , "description": "flag: Cambodia" - , "category": "Flags" - , "aliases": [ - "cambodia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇮" - , "description": "flag: Kiribati" - , "category": "Flags" - , "aliases": [ - "kiribati" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇲" - , "description": "flag: Comoros" - , "category": "Flags" - , "aliases": [ - "comoros" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇳" - , "description": "flag: St. Kitts & Nevis" - , "category": "Flags" - , "aliases": [ - "st_kitts_nevis" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇵" - , "description": "flag: North Korea" - , "category": "Flags" - , "aliases": [ - "north_korea" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇷" - , "description": "flag: South Korea" - , "category": "Flags" - , "aliases": [ - "kr" - ] - , "tags": [ - "korea" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇰🇼" - , "description": "flag: Kuwait" - , "category": "Flags" - , "aliases": [ - "kuwait" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇾" - , "description": "flag: Cayman Islands" - , "category": "Flags" - , "aliases": [ - "cayman_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇰🇿" - , "description": "flag: Kazakhstan" - , "category": "Flags" - , "aliases": [ - "kazakhstan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇦" - , "description": "flag: Laos" - , "category": "Flags" - , "aliases": [ - "laos" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇧" - , "description": "flag: Lebanon" - , "category": "Flags" - , "aliases": [ - "lebanon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇨" - , "description": "flag: St. Lucia" - , "category": "Flags" - , "aliases": [ - "st_lucia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇮" - , "description": "flag: Liechtenstein" - , "category": "Flags" - , "aliases": [ - "liechtenstein" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇰" - , "description": "flag: Sri Lanka" - , "category": "Flags" - , "aliases": [ - "sri_lanka" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇷" - , "description": "flag: Liberia" - , "category": "Flags" - , "aliases": [ - "liberia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇸" - , "description": "flag: Lesotho" - , "category": "Flags" - , "aliases": [ - "lesotho" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇹" - , "description": "flag: Lithuania" - , "category": "Flags" - , "aliases": [ - "lithuania" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇺" - , "description": "flag: Luxembourg" - , "category": "Flags" - , "aliases": [ - "luxembourg" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇻" - , "description": "flag: Latvia" - , "category": "Flags" - , "aliases": [ - "latvia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇱🇾" - , "description": "flag: Libya" - , "category": "Flags" - , "aliases": [ - "libya" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇦" - , "description": "flag: Morocco" - , "category": "Flags" - , "aliases": [ - "morocco" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇨" - , "description": "flag: Monaco" - , "category": "Flags" - , "aliases": [ - "monaco" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇲🇩" - , "description": "flag: Moldova" - , "category": "Flags" - , "aliases": [ - "moldova" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇪" - , "description": "flag: Montenegro" - , "category": "Flags" - , "aliases": [ - "montenegro" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇫" - , "description": "flag: St. Martin" - , "category": "Flags" - , "aliases": [ - "st_martin" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇲🇬" - , "description": "flag: Madagascar" - , "category": "Flags" - , "aliases": [ - "madagascar" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇭" - , "description": "flag: Marshall Islands" - , "category": "Flags" - , "aliases": [ - "marshall_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇲🇰" - , "description": "flag: North Macedonia" - , "category": "Flags" - , "aliases": [ - "macedonia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇱" - , "description": "flag: Mali" - , "category": "Flags" - , "aliases": [ - "mali" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇲" - , "description": "flag: Myanmar (Burma)" - , "category": "Flags" - , "aliases": [ - "myanmar" - ] - , "tags": [ - "burma" - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇳" - , "description": "flag: Mongolia" - , "category": "Flags" - , "aliases": [ - "mongolia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇴" - , "description": "flag: Macao SAR China" - , "category": "Flags" - , "aliases": [ - "macau" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇵" - , "description": "flag: Northern Mariana Islands" - , "category": "Flags" - , "aliases": [ - "northern_mariana_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇶" - , "description": "flag: Martinique" - , "category": "Flags" - , "aliases": [ - "martinique" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇲🇷" - , "description": "flag: Mauritania" - , "category": "Flags" - , "aliases": [ - "mauritania" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇸" - , "description": "flag: Montserrat" - , "category": "Flags" - , "aliases": [ - "montserrat" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇹" - , "description": "flag: Malta" - , "category": "Flags" - , "aliases": [ - "malta" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇺" - , "description": "flag: Mauritius" - , "category": "Flags" - , "aliases": [ - "mauritius" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇲🇻" - , "description": "flag: Maldives" - , "category": "Flags" - , "aliases": [ - "maldives" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇼" - , "description": "flag: Malawi" - , "category": "Flags" - , "aliases": [ - "malawi" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇽" - , "description": "flag: Mexico" - , "category": "Flags" - , "aliases": [ - "mexico" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇾" - , "description": "flag: Malaysia" - , "category": "Flags" - , "aliases": [ - "malaysia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇲🇿" - , "description": "flag: Mozambique" - , "category": "Flags" - , "aliases": [ - "mozambique" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇦" - , "description": "flag: Namibia" - , "category": "Flags" - , "aliases": [ - "namibia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇨" - , "description": "flag: New Caledonia" - , "category": "Flags" - , "aliases": [ - "new_caledonia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇪" - , "description": "flag: Niger" - , "category": "Flags" - , "aliases": [ - "niger" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇫" - , "description": "flag: Norfolk Island" - , "category": "Flags" - , "aliases": [ - "norfolk_island" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇳🇬" - , "description": "flag: Nigeria" - , "category": "Flags" - , "aliases": [ - "nigeria" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇮" - , "description": "flag: Nicaragua" - , "category": "Flags" - , "aliases": [ - "nicaragua" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇱" - , "description": "flag: Netherlands" - , "category": "Flags" - , "aliases": [ - "netherlands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇴" - , "description": "flag: Norway" - , "category": "Flags" - , "aliases": [ - "norway" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇵" - , "description": "flag: Nepal" - , "category": "Flags" - , "aliases": [ - "nepal" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇷" - , "description": "flag: Nauru" - , "category": "Flags" - , "aliases": [ - "nauru" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇳🇺" - , "description": "flag: Niue" - , "category": "Flags" - , "aliases": [ - "niue" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇳🇿" - , "description": "flag: New Zealand" - , "category": "Flags" - , "aliases": [ - "new_zealand" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇴🇲" - , "description": "flag: Oman" - , "category": "Flags" - , "aliases": [ - "oman" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇦" - , "description": "flag: Panama" - , "category": "Flags" - , "aliases": [ - "panama" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇪" - , "description": "flag: Peru" - , "category": "Flags" - , "aliases": [ - "peru" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇫" - , "description": "flag: French Polynesia" - , "category": "Flags" - , "aliases": [ - "french_polynesia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇵🇬" - , "description": "flag: Papua New Guinea" - , "category": "Flags" - , "aliases": [ - "papua_new_guinea" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇭" - , "description": "flag: Philippines" - , "category": "Flags" - , "aliases": [ - "philippines" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇰" - , "description": "flag: Pakistan" - , "category": "Flags" - , "aliases": [ - "pakistan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇱" - , "description": "flag: Poland" - , "category": "Flags" - , "aliases": [ - "poland" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇲" - , "description": "flag: St. Pierre & Miquelon" - , "category": "Flags" - , "aliases": [ - "st_pierre_miquelon" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇵🇳" - , "description": "flag: Pitcairn Islands" - , "category": "Flags" - , "aliases": [ - "pitcairn_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇵🇷" - , "description": "flag: Puerto Rico" - , "category": "Flags" - , "aliases": [ - "puerto_rico" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇸" - , "description": "flag: Palestinian Territories" - , "category": "Flags" - , "aliases": [ - "palestinian_territories" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇹" - , "description": "flag: Portugal" - , "category": "Flags" - , "aliases": [ - "portugal" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇼" - , "description": "flag: Palau" - , "category": "Flags" - , "aliases": [ - "palau" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇵🇾" - , "description": "flag: Paraguay" - , "category": "Flags" - , "aliases": [ - "paraguay" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇶🇦" - , "description": "flag: Qatar" - , "category": "Flags" - , "aliases": [ - "qatar" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇷🇪" - , "description": "flag: Réunion" - , "category": "Flags" - , "aliases": [ - "reunion" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇷🇴" - , "description": "flag: Romania" - , "category": "Flags" - , "aliases": [ - "romania" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇷🇸" - , "description": "flag: Serbia" - , "category": "Flags" - , "aliases": [ - "serbia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇷🇺" - , "description": "flag: Russia" - , "category": "Flags" - , "aliases": [ - "ru" - ] - , "tags": [ - "russia" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇷🇼" - , "description": "flag: Rwanda" - , "category": "Flags" - , "aliases": [ - "rwanda" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇦" - , "description": "flag: Saudi Arabia" - , "category": "Flags" - , "aliases": [ - "saudi_arabia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇧" - , "description": "flag: Solomon Islands" - , "category": "Flags" - , "aliases": [ - "solomon_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇨" - , "description": "flag: Seychelles" - , "category": "Flags" - , "aliases": [ - "seychelles" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇩" - , "description": "flag: Sudan" - , "category": "Flags" - , "aliases": [ - "sudan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇪" - , "description": "flag: Sweden" - , "category": "Flags" - , "aliases": [ - "sweden" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇬" - , "description": "flag: Singapore" - , "category": "Flags" - , "aliases": [ - "singapore" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇭" - , "description": "flag: St. Helena" - , "category": "Flags" - , "aliases": [ - "st_helena" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇸🇮" - , "description": "flag: Slovenia" - , "category": "Flags" - , "aliases": [ - "slovenia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇯" - , "description": "flag: Svalbard & Jan Mayen" - , "category": "Flags" - , "aliases": [ - "svalbard_jan_mayen" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇸🇰" - , "description": "flag: Slovakia" - , "category": "Flags" - , "aliases": [ - "slovakia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇱" - , "description": "flag: Sierra Leone" - , "category": "Flags" - , "aliases": [ - "sierra_leone" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇲" - , "description": "flag: San Marino" - , "category": "Flags" - , "aliases": [ - "san_marino" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇳" - , "description": "flag: Senegal" - , "category": "Flags" - , "aliases": [ - "senegal" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇴" - , "description": "flag: Somalia" - , "category": "Flags" - , "aliases": [ - "somalia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇷" - , "description": "flag: Suriname" - , "category": "Flags" - , "aliases": [ - "suriname" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇸" - , "description": "flag: South Sudan" - , "category": "Flags" - , "aliases": [ - "south_sudan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇹" - , "description": "flag: São Tomé & Príncipe" - , "category": "Flags" - , "aliases": [ - "sao_tome_principe" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇻" - , "description": "flag: El Salvador" - , "category": "Flags" - , "aliases": [ - "el_salvador" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇽" - , "description": "flag: Sint Maarten" - , "category": "Flags" - , "aliases": [ - "sint_maarten" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇾" - , "description": "flag: Syria" - , "category": "Flags" - , "aliases": [ - "syria" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇸🇿" - , "description": "flag: Eswatini" - , "category": "Flags" - , "aliases": [ - "swaziland" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇦" - , "description": "flag: Tristan da Cunha" - , "category": "Flags" - , "aliases": [ - "tristan_da_cunha" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇹🇨" - , "description": "flag: Turks & Caicos Islands" - , "category": "Flags" - , "aliases": [ - "turks_caicos_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇩" - , "description": "flag: Chad" - , "category": "Flags" - , "aliases": [ - "chad" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇹🇫" - , "description": "flag: French Southern Territories" - , "category": "Flags" - , "aliases": [ - "french_southern_territories" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇬" - , "description": "flag: Togo" - , "category": "Flags" - , "aliases": [ - "togo" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇭" - , "description": "flag: Thailand" - , "category": "Flags" - , "aliases": [ - "thailand" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇯" - , "description": "flag: Tajikistan" - , "category": "Flags" - , "aliases": [ - "tajikistan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇰" - , "description": "flag: Tokelau" - , "category": "Flags" - , "aliases": [ - "tokelau" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇹🇱" - , "description": "flag: Timor-Leste" - , "category": "Flags" - , "aliases": [ - "timor_leste" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇲" - , "description": "flag: Turkmenistan" - , "category": "Flags" - , "aliases": [ - "turkmenistan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇳" - , "description": "flag: Tunisia" - , "category": "Flags" - , "aliases": [ - "tunisia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇴" - , "description": "flag: Tonga" - , "category": "Flags" - , "aliases": [ - "tonga" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇷" - , "description": "flag: Turkey" - , "category": "Flags" - , "aliases": [ - "tr" - ] - , "tags": [ - "turkey" - ] - , "unicode_version": "8.0" - , "ios_version": "9.1" - } -, { - "emoji": "🇹🇹" - , "description": "flag: Trinidad & Tobago" - , "category": "Flags" - , "aliases": [ - "trinidad_tobago" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇻" - , "description": "flag: Tuvalu" - , "category": "Flags" - , "aliases": [ - "tuvalu" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇹🇼" - , "description": "flag: Taiwan" - , "category": "Flags" - , "aliases": [ - "taiwan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇹🇿" - , "description": "flag: Tanzania" - , "category": "Flags" - , "aliases": [ - "tanzania" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇺🇦" - , "description": "flag: Ukraine" - , "category": "Flags" - , "aliases": [ - "ukraine" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇺🇬" - , "description": "flag: Uganda" - , "category": "Flags" - , "aliases": [ - "uganda" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇺🇲" - , "description": "flag: U.S. Outlying Islands" - , "category": "Flags" - , "aliases": [ - "us_outlying_islands" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇺🇳" - , "description": "flag: United Nations" - , "category": "Flags" - , "aliases": [ - "united_nations" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🇺🇸" - , "description": "flag: United States" - , "category": "Flags" - , "aliases": [ - "us" - ] - , "tags": [ - "flag" - , "united" - , "america" - ] - , "unicode_version": "6.0" - , "ios_version": "6.0" - } -, { - "emoji": "🇺🇾" - , "description": "flag: Uruguay" - , "category": "Flags" - , "aliases": [ - "uruguay" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇺🇿" - , "description": "flag: Uzbekistan" - , "category": "Flags" - , "aliases": [ - "uzbekistan" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇻🇦" - , "description": "flag: Vatican City" - , "category": "Flags" - , "aliases": [ - "vatican_city" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇻🇨" - , "description": "flag: St. Vincent & Grenadines" - , "category": "Flags" - , "aliases": [ - "st_vincent_grenadines" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇻🇪" - , "description": "flag: Venezuela" - , "category": "Flags" - , "aliases": [ - "venezuela" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇻🇬" - , "description": "flag: British Virgin Islands" - , "category": "Flags" - , "aliases": [ - "british_virgin_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇻🇮" - , "description": "flag: U.S. Virgin Islands" - , "category": "Flags" - , "aliases": [ - "us_virgin_islands" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇻🇳" - , "description": "flag: Vietnam" - , "category": "Flags" - , "aliases": [ - "vietnam" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇻🇺" - , "description": "flag: Vanuatu" - , "category": "Flags" - , "aliases": [ - "vanuatu" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇼🇫" - , "description": "flag: Wallis & Futuna" - , "category": "Flags" - , "aliases": [ - "wallis_futuna" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇼🇸" - , "description": "flag: Samoa" - , "category": "Flags" - , "aliases": [ - "samoa" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇽🇰" - , "description": "flag: Kosovo" - , "category": "Flags" - , "aliases": [ - "kosovo" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇾🇪" - , "description": "flag: Yemen" - , "category": "Flags" - , "aliases": [ - "yemen" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇾🇹" - , "description": "flag: Mayotte" - , "category": "Flags" - , "aliases": [ - "mayotte" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "9.0" - } -, { - "emoji": "🇿🇦" - , "description": "flag: South Africa" - , "category": "Flags" - , "aliases": [ - "south_africa" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇿🇲" - , "description": "flag: Zambia" - , "category": "Flags" - , "aliases": [ - "zambia" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🇿🇼" - , "description": "flag: Zimbabwe" - , "category": "Flags" - , "aliases": [ - "zimbabwe" - ] - , "tags": [ - ] - , "unicode_version": "6.0" - , "ios_version": "8.3" - } -, { - "emoji": "🏴󠁧󠁢󠁥󠁮󠁧󠁿" - , "description": "flag: England" - , "category": "Flags" - , "aliases": [ - "england" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🏴󠁧󠁢󠁳󠁣󠁴󠁿" - , "description": "flag: Scotland" - , "category": "Flags" - , "aliases": [ - "scotland" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -, { - "emoji": "🏴󠁧󠁢󠁷󠁬󠁳󠁿" - , "description": "flag: Wales" - , "category": "Flags" - , "aliases": [ - "wales" - ] - , "tags": [ - ] - , "unicode_version": "11.0" - , "ios_version": "12.1" - } -] diff --git a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/emoji.rb b/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/emoji.rb deleted file mode 100644 index d810a25e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/emoji.rb +++ /dev/null @@ -1,139 +0,0 @@ -# encoding: utf-8 -# frozen_string_literal: true - -require 'emoji/character' -require 'json' - -module Emoji - extend self - - def data_file - File.expand_path('../../db/emoji.json', __FILE__) - end - - def all - return @all if defined? @all - @all = [] - parse_data_file - @all - end - - # Public: Initialize an Emoji::Character instance and yield it to the block. - # The character is added to the `Emoji.all` set. - def create(name) - emoji = Emoji::Character.new(name) - self.all << edit_emoji(emoji) { yield emoji if block_given? } - emoji - end - - # Public: Yield an emoji to the block and update the indices in case its - # aliases or unicode_aliases lists changed. - def edit_emoji(emoji) - @names_index ||= Hash.new - @unicodes_index ||= Hash.new - - yield emoji - - emoji.aliases.each do |name| - @names_index[name] = emoji - end - emoji.unicode_aliases.each do |unicode| - @unicodes_index[unicode] = emoji - end - - emoji - end - - # Public: Find an emoji by its aliased name. Return nil if missing. - def find_by_alias(name) - names_index[name] - end - - # Public: Find an emoji by its unicode character. Return nil if missing. - def find_by_unicode(unicode) - unicodes_index[unicode] || unicodes_index[unicode.sub(SKIN_TONE_RE, "")] - end - - private - VARIATION_SELECTOR_16 = "\u{fe0f}".freeze - SKIN_TONE_RE = /[\u{1F3FB}-\u{1F3FF}]/ - - # Characters which must have VARIATION_SELECTOR_16 to render as color emoji: - TEXT_GLYPHS = [ - "\u{1f237}", # Japanese “monthly amount” button - "\u{1f202}", # Japanese “service charge” button - "\u{1f170}", # A button (blood type) - "\u{1f171}", # B button (blood type) - "\u{1f17e}", # O button (blood type) - "\u{00a9}", # copyright - "\u{00ae}", # registered - "\u{2122}", # trade mark - "\u{3030}", # wavy dash - ].freeze - - private_constant :VARIATION_SELECTOR_16, :TEXT_GLYPHS, :SKIN_TONE_RE - - def parse_data_file - data = File.open(data_file, 'r:UTF-8') do |file| - JSON.parse(file.read, symbolize_names: true) - end - - if "".respond_to?(:-@) - # Ruby >= 2.3 this is equivalent to .freeze - # Ruby >= 2.5 this will freeze and dedup - dedup = lambda { |str| -str } - else - dedup = lambda { |str| str.freeze } - end - - append_unicode = lambda do |emoji, raw| - unless TEXT_GLYPHS.include?(raw) || emoji.unicode_aliases.include?(raw) - emoji.add_unicode_alias(dedup.call(raw)) - end - end - - data.each do |raw_emoji| - self.create(nil) do |emoji| - raw_emoji.fetch(:aliases).each { |name| emoji.add_alias(dedup.call(name)) } - if raw = raw_emoji[:emoji] - append_unicode.call(emoji, raw) - start_pos = 0 - while found_index = raw.index(VARIATION_SELECTOR_16, start_pos) - # register every variant where one VARIATION_SELECTOR_16 is removed - raw_alternate = raw.dup - raw_alternate[found_index] = "" - append_unicode.call(emoji, raw_alternate) - start_pos = found_index + 1 - end - if start_pos > 0 - # register a variant with all VARIATION_SELECTOR_16 removed - append_unicode.call(emoji, raw.gsub(VARIATION_SELECTOR_16, "")) - else - # register a variant where VARIATION_SELECTOR_16 is added - append_unicode.call(emoji, "#{raw}#{VARIATION_SELECTOR_16}") - end - end - raw_emoji.fetch(:tags).each { |tag| emoji.add_tag(dedup.call(tag)) } - - emoji.category = dedup.call(raw_emoji[:category]) - emoji.description = dedup.call(raw_emoji[:description]) - emoji.unicode_version = dedup.call(raw_emoji[:unicode_version]) - emoji.ios_version = dedup.call(raw_emoji[:ios_version]) - emoji.skin_tones = raw_emoji.fetch(:skin_tones, false) - end - end - end - - def names_index - all unless defined? @all - @names_index - end - - def unicodes_index - all unless defined? @all - @unicodes_index - end -end - -# Preload emoji into memory -Emoji.all diff --git a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/emoji/character.rb b/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/emoji/character.rb deleted file mode 100644 index 1f5a37a5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/emoji/character.rb +++ /dev/null @@ -1,131 +0,0 @@ -# frozen_string_literal: true - -module Emoji - class Character - # Inspect individual Unicode characters in a string by dumping its - # codepoints in hexadecimal format. - def self.hex_inspect(str) - str.codepoints.map { |c| c.to_s(16).rjust(4, '0') }.join('-') - end - - # True if the emoji is not a standard Emoji character. - def custom?() !raw end - - # True if the emoji supports Fitzpatrick scale skin tone modifiers - def skin_tones?() @skin_tones end - - attr_writer :skin_tones - - # A list of names uniquely referring to this emoji. - attr_reader :aliases - - # The category for this emoji as per Apple's character palette - attr_accessor :category - - # The Unicode description text - attr_accessor :description - - # The Unicode spec version where this emoji first debuted - attr_accessor :unicode_version - - # The iOS version where this emoji first debuted - attr_accessor :ios_version - - def name() aliases.first end - - def add_alias(name) - aliases << name - end - - # A list of Unicode strings that uniquely refer to this emoji. - attr_reader :unicode_aliases - - # Raw Unicode string for an emoji. Nil if emoji is non-standard. - def raw() unicode_aliases.first end - - # Raw Unicode strings for each skin tone variant of this emoji. The result is an empty array - # unless the emoji supports skin tones. - # - # Note: for emojis that depict multiple people (e.g. couples or families), this will not produce - # every possible permutation of skin tone per person. - def raw_skin_tone_variants - return [] if custom? || !skin_tones? - raw_normalized = raw.sub(VARIATION_SELECTOR_16, "") - idx = raw_normalized.index(ZERO_WIDTH_JOINER) - SKIN_TONES.map do |modifier| - if raw_normalized == PEOPLE_HOLDING_HANDS - # special case to apply the modifier to both persons - raw_normalized[0...idx] + modifier + raw_normalized[idx..nil] + modifier - elsif idx - # insert modifier before zero-width joiner - raw_normalized[0...idx] + modifier + raw_normalized[idx..nil] - else - raw_normalized + modifier - end - end - end - - def add_unicode_alias(str) - unicode_aliases << str - end - - # A list of tags associated with an emoji. Multiple emojis can share the - # same tags. - attr_reader :tags - - def add_tag(tag) - tags << tag - end - - def initialize(name) - @aliases = Array(name) - @unicode_aliases = [] - @tags = [] - @skin_tones = false - end - - def inspect - hex = '(%s)' % hex_inspect unless custom? - %(#<#{self.class.name}:#{name}#{hex}>) - end - - def hex_inspect - self.class.hex_inspect(raw) - end - - attr_writer :image_filename - - def image_filename - if defined? @image_filename - @image_filename - else - default_image_filename - end - end - - private - - VARIATION_SELECTOR_16 = "\u{fe0f}".freeze - ZERO_WIDTH_JOINER = "\u{200d}".freeze - PEOPLE_HOLDING_HANDS = "\u{1f9d1}\u{200d}\u{1f91d}\u{200d}\u{1f9d1}".freeze - - SKIN_TONES = [ - "\u{1F3FB}", # light skin tone - "\u{1F3FC}", # medium-light skin tone - "\u{1F3FD}", # medium skin tone - "\u{1F3FE}", # medium-dark skin tone - "\u{1F3FF}", # dark skin tone - ] - - private_constant :VARIATION_SELECTOR_16, :ZERO_WIDTH_JOINER, :PEOPLE_HOLDING_HANDS, :SKIN_TONES - - def default_image_filename - if custom? - '%s.png' % name - else - hex_name = hex_inspect.gsub(/-(fe0f|200d)\b/, '') - 'unicode/%s.png' % hex_name - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/gemoji.rb b/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/gemoji.rb deleted file mode 100644 index 59178411..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/gemoji-4.1.0/lib/gemoji.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -require 'emoji' diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/Rakefile b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/Rakefile deleted file mode 100644 index 0d4f84eb..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/Rakefile +++ /dev/null @@ -1,3 +0,0 @@ -import '../../../lib/google/tasks/ffi.rake' - -task default: ['ffi-protobuf:default'] \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/convert.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/convert.c deleted file mode 100644 index d2b70941..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/convert.c +++ /dev/null @@ -1,335 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -// ----------------------------------------------------------------------------- -// Ruby <-> upb data conversion functions. -// -// This file Also contains a few other assorted algorithms on upb_MessageValue. -// -// None of the algorithms in this file require any access to the internal -// representation of Ruby or upb objects. -// ----------------------------------------------------------------------------- - -#include "convert.h" - -#include "message.h" -#include "protobuf.h" -#include "shared_convert.h" - -static upb_StringView Convert_StringData(VALUE str, upb_Arena* arena) { - upb_StringView ret; - if (arena) { - char* ptr = upb_Arena_Malloc(arena, RSTRING_LEN(str)); - memcpy(ptr, RSTRING_PTR(str), RSTRING_LEN(str)); - ret.data = ptr; - } else { - // Data is only needed temporarily (within map lookup). - ret.data = RSTRING_PTR(str); - } - ret.size = RSTRING_LEN(str); - return ret; -} - -static bool is_ruby_num(VALUE value) { - return (TYPE(value) == T_FLOAT || TYPE(value) == T_FIXNUM || - TYPE(value) == T_BIGNUM); -} - -static void Convert_CheckInt(const char* name, upb_CType type, VALUE val) { - if (!is_ruby_num(val)) { - rb_raise(cTypeError, - "Expected number type for integral field '%s' (given %s).", name, - rb_class2name(CLASS_OF(val))); - } - - // NUM2{INT,UINT,LL,ULL} macros do the appropriate range checks on upper - // bound; we just need to do precision checks (i.e., disallow rounding) and - // check for < 0 on unsigned types. - if (TYPE(val) == T_FLOAT) { - double dbl_val = NUM2DBL(val); - if (floor(dbl_val) != dbl_val) { - rb_raise(rb_eRangeError, - "Non-integral floating point value assigned to integer field " - "'%s' (given %s).", - name, rb_class2name(CLASS_OF(val))); - } - } - if (type == kUpb_CType_UInt32 || type == kUpb_CType_UInt64) { - if (NUM2DBL(val) < 0) { - rb_raise( - rb_eRangeError, - "Assigning negative value to unsigned integer field '%s' (given %s).", - name, rb_class2name(CLASS_OF(val))); - } - } -} - -static int32_t Convert_ToEnum(VALUE value, const char* name, - const upb_EnumDef* e) { - int32_t val; - - switch (TYPE(value)) { - case T_FLOAT: - case T_FIXNUM: - case T_BIGNUM: - Convert_CheckInt(name, kUpb_CType_Int32, value); - val = NUM2INT(value); - break; - case T_STRING: { - const upb_EnumValueDef* ev = upb_EnumDef_FindValueByNameWithSize( - e, RSTRING_PTR(value), RSTRING_LEN(value)); - if (!ev) goto unknownval; - val = upb_EnumValueDef_Number(ev); - break; - } - case T_SYMBOL: { - const upb_EnumValueDef* ev = - upb_EnumDef_FindValueByName(e, rb_id2name(SYM2ID(value))); - if (!ev) goto unknownval; - val = upb_EnumValueDef_Number(ev); - break; - } - default: - rb_raise(cTypeError, - "Expected number or symbol type for enum field '%s'.", name); - } - - return val; - -unknownval: - rb_raise(rb_eRangeError, "Unknown symbol value for enum field '%s'.", name); -} - -VALUE Convert_CheckStringUtf8(VALUE str) { - VALUE utf8 = rb_enc_from_encoding(rb_utf8_encoding()); - - if (rb_obj_encoding(str) == utf8) { - // Note: Just because a string is marked as having UTF-8 encoding does - // not mean that it is *valid* UTF-8. We have to check separately - // whether it is valid. - if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { - VALUE exc = rb_const_get_at( - rb_cEncoding, rb_intern("InvalidByteSequenceError")); - rb_raise(exc, "String is invalid UTF-8"); - } - } else { - // Note: this will not duplicate underlying string data unless - // necessary. - // - // This will throw an exception if the conversion cannot be performed: - // - Encoding::UndefinedConversionError if certain characters cannot be - // converted to UTF-8. - // - Encoding::InvalidByteSequenceError if certain characters were invalid - // in the source encoding. - str = rb_str_encode(str, utf8, 0, Qnil); - PBRUBY_ASSERT(rb_enc_str_coderange(str) != ENC_CODERANGE_BROKEN); - } - - return str; -} - -upb_MessageValue Convert_RubyToUpb(VALUE value, const char* name, - TypeInfo type_info, upb_Arena* arena) { - upb_MessageValue ret; - - switch (type_info.type) { - case kUpb_CType_Float: - if (!is_ruby_num(value)) { - rb_raise(cTypeError, - "Expected number type for float field '%s' (given %s).", name, - rb_class2name(CLASS_OF(value))); - } - ret.float_val = NUM2DBL(value); - break; - case kUpb_CType_Double: - if (!is_ruby_num(value)) { - rb_raise(cTypeError, - "Expected number type for double field '%s' (given %s).", name, - rb_class2name(CLASS_OF(value))); - } - ret.double_val = NUM2DBL(value); - break; - case kUpb_CType_Bool: { - if (value == Qtrue) { - ret.bool_val = 1; - } else if (value == Qfalse) { - ret.bool_val = 0; - } else { - rb_raise(cTypeError, - "Invalid argument for boolean field '%s' (given %s).", name, - rb_class2name(CLASS_OF(value))); - } - break; - } - case kUpb_CType_String: - if (rb_obj_class(value) == rb_cSymbol) { - value = rb_funcall(value, rb_intern("to_s"), 0); - } else if (!rb_obj_is_kind_of(value, rb_cString)) { - rb_raise(cTypeError, - "Invalid argument for string field '%s' (given %s).", name, - rb_class2name(CLASS_OF(value))); - } - - value = Convert_CheckStringUtf8(value); - ret.str_val = Convert_StringData(value, arena); - break; - case kUpb_CType_Bytes: { - VALUE bytes = rb_enc_from_encoding(rb_ascii8bit_encoding()); - if (rb_obj_class(value) != rb_cString) { - rb_raise(cTypeError, - "Invalid argument for bytes field '%s' (given %s).", name, - rb_class2name(CLASS_OF(value))); - } - - if (rb_obj_encoding(value) != bytes) { - // Note: this will not duplicate underlying string data unless - // necessary. - // TODO: is this really necessary to get raw bytes? - value = rb_str_encode(value, bytes, 0, Qnil); - } - - ret.str_val = Convert_StringData(value, arena); - break; - } - case kUpb_CType_Message: - ret.msg_val = - Message_GetUpbMessage(value, type_info.def.msgdef, name, arena); - break; - case kUpb_CType_Enum: - ret.int32_val = Convert_ToEnum(value, name, type_info.def.enumdef); - break; - case kUpb_CType_Int32: - case kUpb_CType_Int64: - case kUpb_CType_UInt32: - case kUpb_CType_UInt64: - Convert_CheckInt(name, type_info.type, value); - switch (type_info.type) { - case kUpb_CType_Int32: - ret.int32_val = NUM2INT(value); - break; - case kUpb_CType_Int64: - ret.int64_val = NUM2LL(value); - break; - case kUpb_CType_UInt32: - ret.uint32_val = NUM2UINT(value); - break; - case kUpb_CType_UInt64: - ret.uint64_val = NUM2ULL(value); - break; - default: - rb_raise(cTypeError, "Convert_RubyToUpb(): Unexpected type %d", - (int)type_info.type); - } - break; - default: - rb_raise(cTypeError, - "Convert_RubyToUpb(): Unexpected type %d", (int)type_info.type); - } - - return ret; -} - -VALUE Convert_UpbToRuby(upb_MessageValue upb_val, TypeInfo type_info, - VALUE arena) { - switch (type_info.type) { - case kUpb_CType_Float: - return DBL2NUM(upb_val.float_val); - case kUpb_CType_Double: - return DBL2NUM(upb_val.double_val); - case kUpb_CType_Bool: - return upb_val.bool_val ? Qtrue : Qfalse; - case kUpb_CType_Int32: - return INT2NUM(upb_val.int32_val); - case kUpb_CType_Int64: - return LL2NUM(upb_val.int64_val); - case kUpb_CType_UInt32: - return UINT2NUM(upb_val.uint32_val); - case kUpb_CType_UInt64: - return ULL2NUM(upb_val.int64_val); - case kUpb_CType_Enum: { - const upb_EnumValueDef* ev = upb_EnumDef_FindValueByNumber( - type_info.def.enumdef, upb_val.int32_val); - if (ev) { - return ID2SYM(rb_intern(upb_EnumValueDef_Name(ev))); - } else { - return INT2NUM(upb_val.int32_val); - } - } - case kUpb_CType_String: { - VALUE str_rb = rb_str_new(upb_val.str_val.data, upb_val.str_val.size); - rb_enc_associate(str_rb, rb_utf8_encoding()); - rb_obj_freeze(str_rb); - return str_rb; - } - case kUpb_CType_Bytes: { - VALUE str_rb = rb_str_new(upb_val.str_val.data, upb_val.str_val.size); - rb_enc_associate(str_rb, rb_ascii8bit_encoding()); - rb_obj_freeze(str_rb); - return str_rb; - } - case kUpb_CType_Message: - return Message_GetRubyWrapper((upb_Message*)upb_val.msg_val, - type_info.def.msgdef, arena); - default: - rb_raise(rb_eRuntimeError, "Convert_UpbToRuby(): Unexpected type %d", - (int)type_info.type); - } -} - -upb_MessageValue Msgval_DeepCopy(upb_MessageValue msgval, TypeInfo type_info, - upb_Arena* arena) { - upb_MessageValue new_msgval; - - switch (type_info.type) { - default: - memcpy(&new_msgval, &msgval, sizeof(msgval)); - break; - case kUpb_CType_String: - case kUpb_CType_Bytes: { - size_t n = msgval.str_val.size; - char* mem = upb_Arena_Malloc(arena, n); - new_msgval.str_val.data = mem; - new_msgval.str_val.size = n; - memcpy(mem, msgval.str_val.data, n); - break; - } - case kUpb_CType_Message: - new_msgval.msg_val = - Message_deep_copy(msgval.msg_val, type_info.def.msgdef, arena); - break; - } - - return new_msgval; -} - -bool Msgval_IsEqual(upb_MessageValue val1, upb_MessageValue val2, - TypeInfo type_info) { - upb_Status status; - upb_Status_Clear(&status); - bool return_value = shared_Msgval_IsEqual(val1, val2, type_info.type, - type_info.def.msgdef, &status); - if (upb_Status_IsOk(&status)) { - return return_value; - } else { - rb_raise(rb_eRuntimeError, "Msgval_IsEqual(): %s", - upb_Status_ErrorMessage(&status)); - } -} - -uint64_t Msgval_GetHash(upb_MessageValue val, TypeInfo type_info, - uint64_t seed) { - upb_Status status; - upb_Status_Clear(&status); - uint64_t return_value = shared_Msgval_GetHash( - val, type_info.type, type_info.def.msgdef, seed, &status); - if (upb_Status_IsOk(&status)) { - return return_value; - } else { - rb_raise(rb_eRuntimeError, "Msgval_GetHash(): %s", - upb_Status_ErrorMessage(&status)); - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/convert.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/convert.h deleted file mode 100644 index ac3eaab2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/convert.h +++ /dev/null @@ -1,50 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#ifndef RUBY_PROTOBUF_CONVERT_H_ -#define RUBY_PROTOBUF_CONVERT_H_ - -#include "protobuf.h" -#include "ruby-upb.h" - -// Converts |ruby_val| to a upb_MessageValue according to |type_info|. -// -// The |arena| parameter indicates the lifetime of the container where this -// value will be assigned. It is used as follows: -// - If type is string or bytes, the string data will be copied into |arena|. -// - If type is message, and we need to auto-construct a message due to implicit -// conversions (eg. Time -> Google::Protobuf::Timestamp), the new message -// will be created in |arena|. -// - If type is message and the Ruby value is a message instance, we will fuse -// the message's arena into |arena|, to ensure that this message outlives the -// container. -upb_MessageValue Convert_RubyToUpb(VALUE ruby_val, const char *name, - TypeInfo type_info, upb_Arena *arena); - -// Converts |upb_val| to a Ruby VALUE according to |type_info|. This may involve -// creating a Ruby wrapper object. -// -// The |arena| parameter indicates the arena that owns the lifetime of -// |upb_val|. Any Ruby wrapper object that is created will reference |arena| -// and ensure it outlives the wrapper. -VALUE Convert_UpbToRuby(upb_MessageValue upb_val, TypeInfo type_info, - VALUE arena); - -// Creates a deep copy of |msgval| in |arena|. -upb_MessageValue Msgval_DeepCopy(upb_MessageValue msgval, TypeInfo type_info, - upb_Arena *arena); - -// Returns true if |val1| and |val2| are equal. Their type is given by -// |type_info|. -bool Msgval_IsEqual(upb_MessageValue val1, upb_MessageValue val2, - TypeInfo type_info); - -// Returns a hash value for the given upb_MessageValue. -uint64_t Msgval_GetHash(upb_MessageValue val, TypeInfo type_info, - uint64_t seed); - -#endif // RUBY_PROTOBUF_CONVERT_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/defs.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/defs.c deleted file mode 100644 index fd170938..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/defs.c +++ /dev/null @@ -1,1932 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2014 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#include -#include - -#include "convert.h" -#include "message.h" -#include "protobuf.h" - -// ----------------------------------------------------------------------------- -// Global map from upb {msg,enum}defs to wrapper Descriptor/EnumDescriptor -// instances. -// ----------------------------------------------------------------------------- - -static VALUE get_msgdef_obj(VALUE descriptor_pool, const upb_MessageDef* def); -static VALUE get_enumdef_obj(VALUE descriptor_pool, const upb_EnumDef* def); -static VALUE get_fielddef_obj(VALUE descriptor_pool, const upb_FieldDef* def); -static VALUE get_filedef_obj(VALUE descriptor_pool, const upb_FileDef* def); -static VALUE get_oneofdef_obj(VALUE descriptor_pool, const upb_OneofDef* def); -static VALUE get_servicedef_obj(VALUE descriptor_pool, - const upb_ServiceDef* def); -static VALUE get_methoddef_obj(VALUE descriptor_pool, const upb_MethodDef* def); - -// A distinct object that is not accessible from Ruby. We use this as a -// constructor argument to enforce that certain objects cannot be created from -// Ruby. -VALUE c_only_cookie = Qnil; - -// ----------------------------------------------------------------------------- -// Common utilities. -// ----------------------------------------------------------------------------- - -static const char* get_str(VALUE str) { - Check_Type(str, T_STRING); - return RSTRING_PTR(str); -} - -static VALUE rb_str_maybe_null(const char* s) { - if (s == NULL) { - s = ""; - } - return rb_str_new2(s); -} -static ID options_instancevar_interned; -// ----------------------------------------------------------------------------- -// DescriptorPool. -// ----------------------------------------------------------------------------- - -typedef struct { - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE def_to_descriptor; // Hash table of def* -> Ruby descriptor. - upb_DefPool* symtab; -} DescriptorPool; - -VALUE cDescriptorPool = Qnil; - -// Global singleton DescriptorPool. The user is free to create others, but this -// is used by generated code. -VALUE generated_pool = Qnil; - -static void DescriptorPool_mark(void* _self) { - DescriptorPool* self = _self; - rb_gc_mark(self->def_to_descriptor); -} - -static void DescriptorPool_free(void* _self) { - DescriptorPool* self = _self; - upb_DefPool_Free(self->symtab); - xfree(self); -} - -static const rb_data_type_t DescriptorPool_type = { - "Google::Protobuf::DescriptorPool", - {DescriptorPool_mark, DescriptorPool_free, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static DescriptorPool* ruby_to_DescriptorPool(VALUE val) { - DescriptorPool* ret; - TypedData_Get_Struct(val, DescriptorPool, &DescriptorPool_type, ret); - return ret; -} - -// Exposed to other modules in defs.h. -const upb_DefPool* DescriptorPool_GetSymtab(VALUE desc_pool_rb) { - DescriptorPool* pool = ruby_to_DescriptorPool(desc_pool_rb); - return pool->symtab; -} - -/* - * call-seq: - * DescriptorPool.new => pool - * - * Creates a new, empty, descriptor pool. - */ -static VALUE DescriptorPool_alloc(VALUE klass) { - DescriptorPool* self = ALLOC(DescriptorPool); - VALUE ret; - - self->def_to_descriptor = Qnil; - ret = TypedData_Wrap_Struct(klass, &DescriptorPool_type, self); - - RB_OBJ_WRITE(ret, &self->def_to_descriptor, rb_hash_new()); - self->symtab = upb_DefPool_New(); - return ObjectCache_TryAdd(self->symtab, ret); -} - -/* - * call-seq: - * DescriptorPool.add_serialized_file(serialized_file_proto) - * - * Adds the given serialized FileDescriptorProto to the pool. - */ -VALUE DescriptorPool_add_serialized_file(VALUE _self, - VALUE serialized_file_proto) { - DescriptorPool* self = ruby_to_DescriptorPool(_self); - Check_Type(serialized_file_proto, T_STRING); - VALUE arena_rb = Arena_new(); - upb_Arena* arena = Arena_get(arena_rb); - google_protobuf_FileDescriptorProto* file_proto = - google_protobuf_FileDescriptorProto_parse( - RSTRING_PTR(serialized_file_proto), - RSTRING_LEN(serialized_file_proto), arena); - if (!file_proto) { - rb_raise(rb_eArgError, "Unable to parse FileDescriptorProto"); - } - upb_Status status; - upb_Status_Clear(&status); - const upb_FileDef* filedef = - upb_DefPool_AddFile(self->symtab, file_proto, &status); - if (!filedef) { - rb_raise(cTypeError, "Unable to build file to DescriptorPool: %s", - upb_Status_ErrorMessage(&status)); - } - RB_GC_GUARD(arena_rb); - return get_filedef_obj(_self, filedef); -} - -/* - * call-seq: - * DescriptorPool.lookup(name) => descriptor - * - * Finds a Descriptor, EnumDescriptor, FieldDescriptor or ServiceDescriptor by - * name and returns it, or nil if none exists with the given name. - */ -static VALUE DescriptorPool_lookup(VALUE _self, VALUE name) { - DescriptorPool* self = ruby_to_DescriptorPool(_self); - const char* name_str = get_str(name); - const upb_MessageDef* msgdef; - const upb_EnumDef* enumdef; - const upb_FieldDef* fielddef; - const upb_ServiceDef* servicedef; - const upb_FileDef* filedef; - - msgdef = upb_DefPool_FindMessageByName(self->symtab, name_str); - if (msgdef) { - return get_msgdef_obj(_self, msgdef); - } - - fielddef = upb_DefPool_FindExtensionByName(self->symtab, name_str); - if (fielddef) { - return get_fielddef_obj(_self, fielddef); - } - - enumdef = upb_DefPool_FindEnumByName(self->symtab, name_str); - if (enumdef) { - return get_enumdef_obj(_self, enumdef); - } - - servicedef = upb_DefPool_FindServiceByName(self->symtab, name_str); - if (servicedef) { - return get_servicedef_obj(_self, servicedef); - } - - filedef = upb_DefPool_FindFileByName(self->symtab, name_str); - if (filedef) { - return get_filedef_obj(_self, filedef); - } - - return Qnil; -} - -/* - * call-seq: - * DescriptorPool.generated_pool => descriptor_pool - * - * Class method that returns the global DescriptorPool. This is a singleton into - * which generated-code message and enum types are registered. The user may also - * register types in this pool for convenience so that they do not have to hold - * a reference to a private pool instance. - */ -static VALUE DescriptorPool_generated_pool(VALUE _self) { - return generated_pool; -} - -static void DescriptorPool_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "DescriptorPool", rb_cObject); - rb_define_alloc_func(klass, DescriptorPool_alloc); - rb_define_method(klass, "add_serialized_file", - DescriptorPool_add_serialized_file, 1); - rb_define_method(klass, "lookup", DescriptorPool_lookup, 1); - rb_define_singleton_method(klass, "generated_pool", - DescriptorPool_generated_pool, 0); - rb_gc_register_address(&cDescriptorPool); - cDescriptorPool = klass; - - rb_gc_register_address(&generated_pool); - generated_pool = rb_class_new_instance(0, NULL, klass); - options_instancevar_interned = rb_intern("options"); -} - -// ----------------------------------------------------------------------------- -// Descriptor. -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_MessageDef* msgdef; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE klass; - VALUE descriptor_pool; -} Descriptor; - -VALUE cDescriptor = Qnil; - -static void Descriptor_mark(void* _self) { - Descriptor* self = _self; - rb_gc_mark(self->klass); - rb_gc_mark(self->descriptor_pool); -} - -static const rb_data_type_t Descriptor_type = { - "Google::Protobuf::Descriptor", - {Descriptor_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static Descriptor* ruby_to_Descriptor(VALUE val) { - Descriptor* ret; - TypedData_Get_Struct(val, Descriptor, &Descriptor_type, ret); - return ret; -} - -// Decode and return a frozen instance of a Descriptor Option for the given pool -static VALUE decode_options(VALUE self, const char* option_type, int size, - const char* bytes, VALUE descriptor_pool) { - VALUE options_rb = rb_ivar_get(self, options_instancevar_interned); - if (options_rb != Qnil) { - return options_rb; - } - - static const char* prefix = "google.protobuf."; - char fullname - [/*strlen(prefix)*/ 16 + - /*strln(longest option type supported e.g. "MessageOptions")*/ 14 + - /*null terminator*/ 1]; - - snprintf(fullname, sizeof(fullname), "%s%s", prefix, option_type); - const upb_MessageDef* msgdef = upb_DefPool_FindMessageByName( - ruby_to_DescriptorPool(descriptor_pool)->symtab, fullname); - if (!msgdef) { - rb_raise(rb_eRuntimeError, "Cannot find %s in DescriptorPool", option_type); - } - - VALUE desc_rb = get_msgdef_obj(descriptor_pool, msgdef); - const Descriptor* desc = ruby_to_Descriptor(desc_rb); - - options_rb = Message_decode_bytes(size, bytes, 0, desc->klass, false); - - // Strip features from the options proto to keep it internal. - const upb_MessageDef* decoded_desc = NULL; - upb_Message* options = Message_GetMutable(options_rb, &decoded_desc); - PBRUBY_ASSERT(options != NULL); - PBRUBY_ASSERT(decoded_desc == msgdef); - const upb_FieldDef* field = - upb_MessageDef_FindFieldByName(decoded_desc, "features"); - PBRUBY_ASSERT(field != NULL); - upb_Message_ClearFieldByDef(options, field); - - Message_freeze(options_rb); - - rb_ivar_set(self, options_instancevar_interned, options_rb); - return options_rb; -} - -/* - * call-seq: - * Descriptor.new => descriptor - * - * Creates a new, empty, message type descriptor. At a minimum, its name must be - * set before it is added to a pool. It cannot be used to create messages until - * it is added to a pool, after which it becomes immutable (as part of a - * finalization process). - */ -static VALUE Descriptor_alloc(VALUE klass) { - Descriptor* self = ALLOC(Descriptor); - VALUE ret = TypedData_Wrap_Struct(klass, &Descriptor_type, self); - self->msgdef = NULL; - self->klass = Qnil; - self->descriptor_pool = Qnil; - return ret; -} - -/* - * call-seq: - * Descriptor.new(c_only_cookie, ptr) => Descriptor - * - * Creates a descriptor wrapper object. May only be called from C. - */ -static VALUE Descriptor_initialize(VALUE _self, VALUE cookie, - VALUE descriptor_pool, VALUE ptr) { - Descriptor* self = ruby_to_Descriptor(_self); - - if (cookie != c_only_cookie) { - rb_raise(rb_eRuntimeError, - "Descriptor objects may not be created from Ruby."); - } - - RB_OBJ_WRITE(_self, &self->descriptor_pool, descriptor_pool); - self->msgdef = (const upb_MessageDef*)NUM2ULL(ptr); - - return Qnil; -} - -/* - * call-seq: - * Descriptor.file_descriptor - * - * Returns the FileDescriptor object this message belongs to. - */ -static VALUE Descriptor_file_descriptor(VALUE _self) { - Descriptor* self = ruby_to_Descriptor(_self); - return get_filedef_obj(self->descriptor_pool, - upb_MessageDef_File(self->msgdef)); -} - -/* - * call-seq: - * Descriptor.name => name - * - * Returns the name of this message type as a fully-qualified string (e.g., - * My.Package.MessageType). - */ -static VALUE Descriptor_name(VALUE _self) { - Descriptor* self = ruby_to_Descriptor(_self); - return rb_str_maybe_null(upb_MessageDef_FullName(self->msgdef)); -} - -/* - * call-seq: - * Descriptor.each(&block) - * - * Iterates over fields in this message type, yielding to the block on each one. - */ -static VALUE Descriptor_each(VALUE _self) { - Descriptor* self = ruby_to_Descriptor(_self); - - int n = upb_MessageDef_FieldCount(self->msgdef); - for (int i = 0; i < n; i++) { - const upb_FieldDef* field = upb_MessageDef_Field(self->msgdef, i); - VALUE obj = get_fielddef_obj(self->descriptor_pool, field); - rb_yield(obj); - } - return Qnil; -} - -/* - * call-seq: - * Descriptor.lookup(name) => FieldDescriptor - * - * Returns the field descriptor for the field with the given name, if present, - * or nil if none. - */ -static VALUE Descriptor_lookup(VALUE _self, VALUE name) { - Descriptor* self = ruby_to_Descriptor(_self); - const char* s = get_str(name); - const upb_FieldDef* field = upb_MessageDef_FindFieldByName(self->msgdef, s); - if (field == NULL) { - return Qnil; - } - return get_fielddef_obj(self->descriptor_pool, field); -} - -/* - * call-seq: - * Descriptor.each_oneof(&block) => nil - * - * Invokes the given block for each oneof in this message type, passing the - * corresponding OneofDescriptor. - */ -static VALUE Descriptor_each_oneof(VALUE _self) { - Descriptor* self = ruby_to_Descriptor(_self); - - int n = upb_MessageDef_OneofCount(self->msgdef); - for (int i = 0; i < n; i++) { - const upb_OneofDef* oneof = upb_MessageDef_Oneof(self->msgdef, i); - VALUE obj = get_oneofdef_obj(self->descriptor_pool, oneof); - rb_yield(obj); - } - return Qnil; -} - -/* - * call-seq: - * Descriptor.lookup_oneof(name) => OneofDescriptor - * - * Returns the oneof descriptor for the oneof with the given name, if present, - * or nil if none. - */ -static VALUE Descriptor_lookup_oneof(VALUE _self, VALUE name) { - Descriptor* self = ruby_to_Descriptor(_self); - const char* s = get_str(name); - const upb_OneofDef* oneof = upb_MessageDef_FindOneofByName(self->msgdef, s); - if (oneof == NULL) { - return Qnil; - } - return get_oneofdef_obj(self->descriptor_pool, oneof); -} - -/* - * call-seq: - * Descriptor.msgclass => message_klass - * - * Returns the Ruby class created for this message type. - */ -static VALUE Descriptor_msgclass(VALUE _self) { - Descriptor* self = ruby_to_Descriptor(_self); - if (self->klass == Qnil) { - RB_OBJ_WRITE(_self, &self->klass, build_class_from_descriptor(_self)); - } - return self->klass; -} - -/* - * call-seq: - * Descriptor.options => options - * - * Returns the `MessageOptions` for this `Descriptor`. - */ -static VALUE Descriptor_options(VALUE _self) { - Descriptor* self = ruby_to_Descriptor(_self); - const google_protobuf_MessageOptions* opts = - upb_MessageDef_Options(self->msgdef); - upb_Arena* arena = upb_Arena_New(); - size_t size; - char* serialized = - google_protobuf_MessageOptions_serialize(opts, arena, &size); - VALUE message_options = decode_options(_self, "MessageOptions", size, - serialized, self->descriptor_pool); - upb_Arena_Free(arena); - return message_options; -} - -/* - * call-seq: - * Descriptor.to_proto => DescriptorProto - * - * Returns the `DescriptorProto` of this `Descriptor`. - */ -static VALUE Descriptor_to_proto(VALUE _self) { - Descriptor* self = ruby_to_Descriptor(_self); - upb_Arena* arena = upb_Arena_New(); - google_protobuf_DescriptorProto* proto = - upb_MessageDef_ToProto(self->msgdef, arena); - size_t size; - const char* serialized = - google_protobuf_DescriptorProto_serialize(proto, arena, &size); - VALUE proto_class = rb_path2class("Google::Protobuf::DescriptorProto"); - VALUE proto_rb = - Message_decode_bytes(size, serialized, 0, proto_class, false); - upb_Arena_Free(arena); - return proto_rb; -} - -static void Descriptor_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "Descriptor", rb_cObject); - rb_define_alloc_func(klass, Descriptor_alloc); - rb_define_method(klass, "initialize", Descriptor_initialize, 3); - rb_define_method(klass, "each", Descriptor_each, 0); - rb_define_method(klass, "lookup", Descriptor_lookup, 1); - rb_define_method(klass, "each_oneof", Descriptor_each_oneof, 0); - rb_define_method(klass, "lookup_oneof", Descriptor_lookup_oneof, 1); - rb_define_method(klass, "msgclass", Descriptor_msgclass, 0); - rb_define_method(klass, "name", Descriptor_name, 0); - rb_define_method(klass, "file_descriptor", Descriptor_file_descriptor, 0); - rb_define_method(klass, "options", Descriptor_options, 0); - rb_define_method(klass, "to_proto", Descriptor_to_proto, 0); - rb_include_module(klass, rb_mEnumerable); - rb_gc_register_address(&cDescriptor); - cDescriptor = klass; -} - -// ----------------------------------------------------------------------------- -// FileDescriptor. -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_FileDef* filedef; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE descriptor_pool; // Owns the upb_FileDef. -} FileDescriptor; - -static VALUE cFileDescriptor = Qnil; - -static void FileDescriptor_mark(void* _self) { - FileDescriptor* self = _self; - rb_gc_mark(self->descriptor_pool); -} - -static const rb_data_type_t FileDescriptor_type = { - "Google::Protobuf::FileDescriptor", - {FileDescriptor_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static FileDescriptor* ruby_to_FileDescriptor(VALUE val) { - FileDescriptor* ret; - TypedData_Get_Struct(val, FileDescriptor, &FileDescriptor_type, ret); - return ret; -} - -static VALUE FileDescriptor_alloc(VALUE klass) { - FileDescriptor* self = ALLOC(FileDescriptor); - VALUE ret = TypedData_Wrap_Struct(klass, &FileDescriptor_type, self); - self->descriptor_pool = Qnil; - self->filedef = NULL; - return ret; -} - -/* - * call-seq: - * FileDescriptor.new => file - * - * Returns a new file descriptor. May - * to a builder. - */ -static VALUE FileDescriptor_initialize(VALUE _self, VALUE cookie, - VALUE descriptor_pool, VALUE ptr) { - FileDescriptor* self = ruby_to_FileDescriptor(_self); - - if (cookie != c_only_cookie) { - rb_raise(rb_eRuntimeError, - "Descriptor objects may not be created from Ruby."); - } - - RB_OBJ_WRITE(_self, &self->descriptor_pool, descriptor_pool); - self->filedef = (const upb_FileDef*)NUM2ULL(ptr); - - return Qnil; -} - -/* - * call-seq: - * FileDescriptor.name => name - * - * Returns the name of the file. - */ -static VALUE FileDescriptor_name(VALUE _self) { - FileDescriptor* self = ruby_to_FileDescriptor(_self); - const char* name = upb_FileDef_Name(self->filedef); - return name == NULL ? Qnil : rb_str_new2(name); -} - -/* - * call-seq: - * FileDescriptor.options => options - * - * Returns the `FileOptions` for this `FileDescriptor`. - */ -static VALUE FileDescriptor_options(VALUE _self) { - FileDescriptor* self = ruby_to_FileDescriptor(_self); - const google_protobuf_FileOptions* opts = upb_FileDef_Options(self->filedef); - upb_Arena* arena = upb_Arena_New(); - size_t size; - char* serialized = google_protobuf_FileOptions_serialize(opts, arena, &size); - VALUE file_options = decode_options(_self, "FileOptions", size, serialized, - self->descriptor_pool); - upb_Arena_Free(arena); - return file_options; -} - -/* - * call-seq: - * FileDescriptor.to_proto => FileDescriptorProto - * - * Returns the `FileDescriptorProto` of this `FileDescriptor`. - */ -static VALUE FileDescriptor_to_proto(VALUE _self) { - FileDescriptor* self = ruby_to_FileDescriptor(_self); - upb_Arena* arena = upb_Arena_New(); - google_protobuf_FileDescriptorProto* file_proto = - upb_FileDef_ToProto(self->filedef, arena); - - size_t size; - const char* serialized = - google_protobuf_FileDescriptorProto_serialize(file_proto, arena, &size); - - VALUE file_proto_class = - rb_path2class("Google::Protobuf::FileDescriptorProto"); - VALUE proto_rb = - Message_decode_bytes(size, serialized, 0, file_proto_class, false); - upb_Arena_Free(arena); - return proto_rb; -} - -static void FileDescriptor_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "FileDescriptor", rb_cObject); - rb_define_alloc_func(klass, FileDescriptor_alloc); - rb_define_method(klass, "initialize", FileDescriptor_initialize, 3); - rb_define_method(klass, "name", FileDescriptor_name, 0); - rb_define_method(klass, "options", FileDescriptor_options, 0); - rb_define_method(klass, "to_proto", FileDescriptor_to_proto, 0); - rb_gc_register_address(&cFileDescriptor); - cFileDescriptor = klass; -} - -// ----------------------------------------------------------------------------- -// FieldDescriptor. -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_FieldDef* fielddef; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE descriptor_pool; // Owns the upb_FieldDef. -} FieldDescriptor; - -static VALUE cFieldDescriptor = Qnil; - -static void FieldDescriptor_mark(void* _self) { - FieldDescriptor* self = _self; - rb_gc_mark(self->descriptor_pool); -} - -static const rb_data_type_t FieldDescriptor_type = { - "Google::Protobuf::FieldDescriptor", - {FieldDescriptor_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static FieldDescriptor* ruby_to_FieldDescriptor(VALUE val) { - FieldDescriptor* ret; - TypedData_Get_Struct(val, FieldDescriptor, &FieldDescriptor_type, ret); - return ret; -} - -/* - * call-seq: - * FieldDescriptor.new => field - * - * Returns a new field descriptor. Its name, type, etc. must be set before it is - * added to a message type. - */ -static VALUE FieldDescriptor_alloc(VALUE klass) { - FieldDescriptor* self = ALLOC(FieldDescriptor); - VALUE ret = TypedData_Wrap_Struct(klass, &FieldDescriptor_type, self); - self->fielddef = NULL; - return ret; -} - -/* - * call-seq: - * FieldDescriptor.new(c_only_cookie, pool, ptr) => FieldDescriptor - * - * Creates a descriptor wrapper object. May only be called from C. - */ -static VALUE FieldDescriptor_initialize(VALUE _self, VALUE cookie, - VALUE descriptor_pool, VALUE ptr) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - - if (cookie != c_only_cookie) { - rb_raise(rb_eRuntimeError, - "Descriptor objects may not be created from Ruby."); - } - - RB_OBJ_WRITE(_self, &self->descriptor_pool, descriptor_pool); - self->fielddef = (const upb_FieldDef*)NUM2ULL(ptr); - - return Qnil; -} - -/* - * call-seq: - * FieldDescriptor.name => name - * - * Returns the name of this field. - */ -static VALUE FieldDescriptor_name(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - return rb_str_maybe_null(upb_FieldDef_Name(self->fielddef)); -} - -// Non-static, exposed to other .c files. -upb_CType ruby_to_fieldtype(VALUE type) { - if (TYPE(type) != T_SYMBOL) { - rb_raise(rb_eArgError, "Expected symbol for field type."); - } - -#define CONVERT(upb, ruby) \ - if (SYM2ID(type) == rb_intern(#ruby)) { \ - return kUpb_CType_##upb; \ - } - - CONVERT(Float, float); - CONVERT(Double, double); - CONVERT(Bool, bool); - CONVERT(String, string); - CONVERT(Bytes, bytes); - CONVERT(Message, message); - CONVERT(Enum, enum); - CONVERT(Int32, int32); - CONVERT(Int64, int64); - CONVERT(UInt32, uint32); - CONVERT(UInt64, uint64); - -#undef CONVERT - - rb_raise(rb_eArgError, "Unknown field type."); - return 0; -} - -static VALUE descriptortype_to_ruby(upb_FieldType type) { - switch (type) { -#define CONVERT(upb, ruby) \ - case kUpb_FieldType_##upb: \ - return ID2SYM(rb_intern(#ruby)); - CONVERT(Float, float); - CONVERT(Double, double); - CONVERT(Bool, bool); - CONVERT(String, string); - CONVERT(Bytes, bytes); - CONVERT(Message, message); - CONVERT(Group, group); - CONVERT(Enum, enum); - CONVERT(Int32, int32); - CONVERT(Int64, int64); - CONVERT(UInt32, uint32); - CONVERT(UInt64, uint64); - CONVERT(SInt32, sint32); - CONVERT(SInt64, sint64); - CONVERT(Fixed32, fixed32); - CONVERT(Fixed64, fixed64); - CONVERT(SFixed32, sfixed32); - CONVERT(SFixed64, sfixed64); -#undef CONVERT - } - return Qnil; -} - -/* - * call-seq: - * FieldDescriptor.type => type - * - * Returns this field's type, as a Ruby symbol, or nil if not yet set. - * - * Valid field types are: - * :int32, :int64, :uint32, :uint64, :float, :double, :bool, :string, - * :bytes, :message. - */ -static VALUE FieldDescriptor__type(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - return descriptortype_to_ruby(upb_FieldDef_Type(self->fielddef)); -} - -/* - * call-seq: - * FieldDescriptor.default => default - * - * Returns this field's default, as a Ruby object, or nil if not yet set. - */ -static VALUE FieldDescriptor_default(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - const upb_FieldDef* f = self->fielddef; - upb_MessageValue default_val = upb_MessageValue_Zero(); - if (upb_FieldDef_IsSubMessage(f)) { - return Qnil; - } else if (!upb_FieldDef_IsRepeated(f)) { - default_val = upb_FieldDef_Default(f); - } - return Convert_UpbToRuby(default_val, TypeInfo_get(self->fielddef), Qnil); -} - -/* - * call-seq: - * FieldDescriptor.has_presence? => bool - * - * Returns whether this field tracks presence. - */ -static VALUE FieldDescriptor_has_presence(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - return upb_FieldDef_HasPresence(self->fielddef) ? Qtrue : Qfalse; -} - -/* - * call-seq: - * FieldDescriptor.required? => bool - * - * Returns whether this is a required field. - */ -static VALUE FieldDescriptor_is_required(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - return upb_FieldDef_IsRequired(self->fielddef) ? Qtrue : Qfalse; -} - -/* - * call-seq: - * FieldDescriptor.repeated? => bool - * - * Returns whether this is a repeated field. - */ -static VALUE FieldDescriptor_is_repeated(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - return upb_FieldDef_IsRepeated(self->fielddef) ? Qtrue : Qfalse; -} - -/* - * call-seq: - * FieldDescriptor.is_packed? => bool - * - * Returns whether this is a repeated field that uses packed encoding. - */ -static VALUE FieldDescriptor_is_packed(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - return upb_FieldDef_IsPacked(self->fielddef) ? Qtrue : Qfalse; -} - -/* - * call-seq: - * FieldDescriptor.json_name => json_name - * - * Returns this field's json_name, as a Ruby string, or nil if not yet set. - */ -static VALUE FieldDescriptor_json_name(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - const upb_FieldDef* f = self->fielddef; - const char* json_name = upb_FieldDef_JsonName(f); - return rb_str_new2(json_name); -} - -/* - * DEPRECATED: Use repeated? or required? instead. - * - * call-seq: - * FieldDescriptor.label => label - * - * Returns this field's label (i.e., plurality), as a Ruby symbol. - * - * Valid field labels are: - * :optional, :repeated - */ -static VALUE FieldDescriptor_label(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - switch (upb_FieldDef_Label(self->fielddef)) { -#define CONVERT(upb, ruby) \ - case kUpb_Label_##upb: \ - return ID2SYM(rb_intern(#ruby)); - - CONVERT(Optional, optional); - CONVERT(Required, required); - CONVERT(Repeated, repeated); - -#undef CONVERT - } - - return Qnil; -} - -/* - * call-seq: - * FieldDescriptor.number => number - * - * Returns the tag number for this field. - */ -static VALUE FieldDescriptor_number(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - return INT2NUM(upb_FieldDef_Number(self->fielddef)); -} - -/* - * call-seq: - * FieldDescriptor.submsg_name => submsg_name - * - * Returns the name of the message or enum type corresponding to this field, if - * it is a message or enum field (respectively), or nil otherwise. This type - * name will be resolved within the context of the pool to which the containing - * message type is added. - */ -static VALUE FieldDescriptor_submsg_name(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - switch (upb_FieldDef_CType(self->fielddef)) { - case kUpb_CType_Enum: - return rb_str_new2( - upb_EnumDef_FullName(upb_FieldDef_EnumSubDef(self->fielddef))); - case kUpb_CType_Message: - return rb_str_new2( - upb_MessageDef_FullName(upb_FieldDef_MessageSubDef(self->fielddef))); - default: - return Qnil; - } -} - -/* - * call-seq: - * FieldDescriptor.subtype => message_or_enum_descriptor - * - * Returns the message or enum descriptor corresponding to this field's type if - * it is a message or enum field, respectively, or nil otherwise. Cannot be - * called *until* the containing message type is added to a pool (and thus - * resolved). - */ -static VALUE FieldDescriptor_subtype(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - switch (upb_FieldDef_CType(self->fielddef)) { - case kUpb_CType_Enum: - return get_enumdef_obj(self->descriptor_pool, - upb_FieldDef_EnumSubDef(self->fielddef)); - case kUpb_CType_Message: - return get_msgdef_obj(self->descriptor_pool, - upb_FieldDef_MessageSubDef(self->fielddef)); - default: - return Qnil; - } -} - -/* - * call-seq: - * FieldDescriptor.get(message) => value - * - * Returns the value set for this field on the given message. Raises an - * exception if message is of the wrong type. - */ -static VALUE FieldDescriptor_get(VALUE _self, VALUE msg_rb) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - const upb_MessageDef* m; - - Message_Get(msg_rb, &m); - - if (m != upb_FieldDef_ContainingType(self->fielddef)) { - rb_raise(cTypeError, "get method called on wrong message type"); - } - - return Message_getfield(msg_rb, self->fielddef); -} - -/* - * call-seq: - * FieldDescriptor.has?(message) => boolean - * - * Returns whether the value is set on the given message. Raises an - * exception when calling for fields that do not have presence. - */ -static VALUE FieldDescriptor_has(VALUE _self, VALUE msg_rb) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - const upb_MessageDef* m; - const upb_Message* msg = Message_Get(msg_rb, &m); - - if (m != upb_FieldDef_ContainingType(self->fielddef)) { - rb_raise(cTypeError, "has method called on wrong message type"); - } else if (!upb_FieldDef_HasPresence(self->fielddef)) { - rb_raise(rb_eArgError, "does not track presence"); - } - - return upb_Message_HasFieldByDef(msg, self->fielddef) ? Qtrue : Qfalse; -} - -/* - * call-seq: - * FieldDescriptor.clear(message) - * - * Clears the field from the message if it's set. - */ -static VALUE FieldDescriptor_clear(VALUE _self, VALUE msg_rb) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - const upb_MessageDef* m; - upb_Message* msg = Message_GetMutable(msg_rb, &m); - - if (m != upb_FieldDef_ContainingType(self->fielddef)) { - rb_raise(cTypeError, "has method called on wrong message type"); - } - - upb_Message_ClearFieldByDef(msg, self->fielddef); - return Qnil; -} - -/* - * call-seq: - * FieldDescriptor.set(message, value) - * - * Sets the value corresponding to this field to the given value on the given - * message. Raises an exception if message is of the wrong type. Performs the - * ordinary type-checks for field setting. - */ -static VALUE FieldDescriptor_set(VALUE _self, VALUE msg_rb, VALUE value) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - const upb_MessageDef* m; - upb_Message* msg = Message_GetMutable(msg_rb, &m); - upb_Arena* arena = Arena_get(Message_GetArena(msg_rb)); - upb_MessageValue msgval; - - if (m != upb_FieldDef_ContainingType(self->fielddef)) { - rb_raise(cTypeError, "set method called on wrong message type"); - } - - msgval = Convert_RubyToUpb(value, upb_FieldDef_Name(self->fielddef), - TypeInfo_get(self->fielddef), arena); - upb_Message_SetFieldByDef(msg, self->fielddef, msgval, arena); - return Qnil; -} - -/* - * call-seq: - * FieldDescriptor.options => options - * - * Returns the `FieldOptions` for this `FieldDescriptor`. - */ -static VALUE FieldDescriptor_options(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - const google_protobuf_FieldOptions* opts = - upb_FieldDef_Options(self->fielddef); - upb_Arena* arena = upb_Arena_New(); - size_t size; - char* serialized = google_protobuf_FieldOptions_serialize(opts, arena, &size); - VALUE field_options = decode_options(_self, "FieldOptions", size, serialized, - self->descriptor_pool); - upb_Arena_Free(arena); - return field_options; -} - -/* - * call-seq: - * FieldDescriptor.to_proto => FieldDescriptorProto - * - * Returns the `FieldDescriptorProto` of this `FieldDescriptor`. - */ -static VALUE FieldDescriptor_to_proto(VALUE _self) { - FieldDescriptor* self = ruby_to_FieldDescriptor(_self); - upb_Arena* arena = upb_Arena_New(); - google_protobuf_FieldDescriptorProto* proto = - upb_FieldDef_ToProto(self->fielddef, arena); - size_t size; - const char* serialized = - google_protobuf_FieldDescriptorProto_serialize(proto, arena, &size); - VALUE proto_class = rb_path2class("Google::Protobuf::FieldDescriptorProto"); - VALUE proto_rb = - Message_decode_bytes(size, serialized, 0, proto_class, false); - upb_Arena_Free(arena); - return proto_rb; -} - -static void FieldDescriptor_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "FieldDescriptor", rb_cObject); - rb_define_alloc_func(klass, FieldDescriptor_alloc); - rb_define_method(klass, "initialize", FieldDescriptor_initialize, 3); - rb_define_method(klass, "name", FieldDescriptor_name, 0); - rb_define_method(klass, "type", FieldDescriptor__type, 0); - rb_define_method(klass, "default", FieldDescriptor_default, 0); - rb_define_method(klass, "has_presence?", FieldDescriptor_has_presence, 0); - rb_define_method(klass, "required?", FieldDescriptor_is_required, 0); - rb_define_method(klass, "repeated?", FieldDescriptor_is_repeated, 0); - rb_define_method(klass, "is_packed?", FieldDescriptor_is_packed, 0); - rb_define_method(klass, "json_name", FieldDescriptor_json_name, 0); - rb_define_method(klass, "label", FieldDescriptor_label, 0); - rb_define_method(klass, "number", FieldDescriptor_number, 0); - rb_define_method(klass, "submsg_name", FieldDescriptor_submsg_name, 0); - rb_define_method(klass, "subtype", FieldDescriptor_subtype, 0); - rb_define_method(klass, "has?", FieldDescriptor_has, 1); - rb_define_method(klass, "clear", FieldDescriptor_clear, 1); - rb_define_method(klass, "get", FieldDescriptor_get, 1); - rb_define_method(klass, "set", FieldDescriptor_set, 2); - rb_define_method(klass, "options", FieldDescriptor_options, 0); - rb_define_method(klass, "to_proto", FieldDescriptor_to_proto, 0); - rb_gc_register_address(&cFieldDescriptor); - cFieldDescriptor = klass; -} - -// ----------------------------------------------------------------------------- -// OneofDescriptor. -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_OneofDef* oneofdef; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE descriptor_pool; // Owns the upb_OneofDef. -} OneofDescriptor; - -static VALUE cOneofDescriptor = Qnil; - -static void OneofDescriptor_mark(void* _self) { - OneofDescriptor* self = _self; - rb_gc_mark(self->descriptor_pool); -} - -static const rb_data_type_t OneofDescriptor_type = { - "Google::Protobuf::OneofDescriptor", - {OneofDescriptor_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static OneofDescriptor* ruby_to_OneofDescriptor(VALUE val) { - OneofDescriptor* ret; - TypedData_Get_Struct(val, OneofDescriptor, &OneofDescriptor_type, ret); - return ret; -} - -/* - * call-seq: - * OneofDescriptor.new => oneof_descriptor - * - * Creates a new, empty, oneof descriptor. The oneof may only be modified prior - * to being added to a message descriptor which is subsequently added to a pool. - */ -static VALUE OneofDescriptor_alloc(VALUE klass) { - OneofDescriptor* self = ALLOC(OneofDescriptor); - VALUE ret = TypedData_Wrap_Struct(klass, &OneofDescriptor_type, self); - self->oneofdef = NULL; - self->descriptor_pool = Qnil; - return ret; -} - -/* - * call-seq: - * OneofDescriptor.new(c_only_cookie, pool, ptr) => OneofDescriptor - * - * Creates a descriptor wrapper object. May only be called from C. - */ -static VALUE OneofDescriptor_initialize(VALUE _self, VALUE cookie, - VALUE descriptor_pool, VALUE ptr) { - OneofDescriptor* self = ruby_to_OneofDescriptor(_self); - - if (cookie != c_only_cookie) { - rb_raise(rb_eRuntimeError, - "Descriptor objects may not be created from Ruby."); - } - - RB_OBJ_WRITE(_self, &self->descriptor_pool, descriptor_pool); - self->oneofdef = (const upb_OneofDef*)NUM2ULL(ptr); - - return Qnil; -} - -/* - * call-seq: - * OneofDescriptor.name => name - * - * Returns the name of this oneof. - */ -static VALUE OneofDescriptor_name(VALUE _self) { - OneofDescriptor* self = ruby_to_OneofDescriptor(_self); - return rb_str_maybe_null(upb_OneofDef_Name(self->oneofdef)); -} - -/* - * call-seq: - * OneofDescriptor.each(&block) => nil - * - * Iterates through fields in this oneof, yielding to the block on each one. - */ -static VALUE OneofDescriptor_each(VALUE _self) { - OneofDescriptor* self = ruby_to_OneofDescriptor(_self); - - int n = upb_OneofDef_FieldCount(self->oneofdef); - for (int i = 0; i < n; i++) { - const upb_FieldDef* f = upb_OneofDef_Field(self->oneofdef, i); - VALUE obj = get_fielddef_obj(self->descriptor_pool, f); - rb_yield(obj); - } - return Qnil; -} - -/* - * call-seq: - * OneofDescriptor.options => options - * - * Returns the `OneofOptions` for this `OneofDescriptor`. - */ -static VALUE OneOfDescriptor_options(VALUE _self) { - OneofDescriptor* self = ruby_to_OneofDescriptor(_self); - const google_protobuf_OneofOptions* opts = - upb_OneofDef_Options(self->oneofdef); - upb_Arena* arena = upb_Arena_New(); - size_t size; - char* serialized = google_protobuf_OneofOptions_serialize(opts, arena, &size); - VALUE oneof_options = decode_options(_self, "OneofOptions", size, serialized, - self->descriptor_pool); - upb_Arena_Free(arena); - return oneof_options; -} - -/* - * call-seq: - * OneofDescriptor.to_proto => OneofDescriptorProto - * - * Returns the `OneofDescriptorProto` of this `OneofDescriptor`. - */ -static VALUE OneOfDescriptor_to_proto(VALUE _self) { - OneofDescriptor* self = ruby_to_OneofDescriptor(_self); - upb_Arena* arena = upb_Arena_New(); - google_protobuf_OneofDescriptorProto* proto = - upb_OneofDef_ToProto(self->oneofdef, arena); - size_t size; - const char* serialized = - google_protobuf_OneofDescriptorProto_serialize(proto, arena, &size); - VALUE proto_class = rb_path2class("Google::Protobuf::OneofDescriptorProto"); - VALUE proto_rb = - Message_decode_bytes(size, serialized, 0, proto_class, false); - upb_Arena_Free(arena); - return proto_rb; -} - -static void OneofDescriptor_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "OneofDescriptor", rb_cObject); - rb_define_alloc_func(klass, OneofDescriptor_alloc); - rb_define_method(klass, "initialize", OneofDescriptor_initialize, 3); - rb_define_method(klass, "name", OneofDescriptor_name, 0); - rb_define_method(klass, "each", OneofDescriptor_each, 0); - rb_define_method(klass, "options", OneOfDescriptor_options, 0); - rb_define_method(klass, "to_proto", OneOfDescriptor_to_proto, 0); - rb_include_module(klass, rb_mEnumerable); - rb_gc_register_address(&cOneofDescriptor); - cOneofDescriptor = klass; -} - -// ----------------------------------------------------------------------------- -// EnumDescriptor. -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_EnumDef* enumdef; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE module; // begins as nil - VALUE descriptor_pool; // Owns the upb_EnumDef. -} EnumDescriptor; - -static VALUE cEnumDescriptor = Qnil; - -static void EnumDescriptor_mark(void* _self) { - EnumDescriptor* self = _self; - rb_gc_mark(self->module); - rb_gc_mark(self->descriptor_pool); -} - -static const rb_data_type_t EnumDescriptor_type = { - "Google::Protobuf::EnumDescriptor", - {EnumDescriptor_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static EnumDescriptor* ruby_to_EnumDescriptor(VALUE val) { - EnumDescriptor* ret; - TypedData_Get_Struct(val, EnumDescriptor, &EnumDescriptor_type, ret); - return ret; -} - -static VALUE EnumDescriptor_alloc(VALUE klass) { - EnumDescriptor* self = ALLOC(EnumDescriptor); - VALUE ret = TypedData_Wrap_Struct(klass, &EnumDescriptor_type, self); - self->enumdef = NULL; - self->module = Qnil; - self->descriptor_pool = Qnil; - return ret; -} - -// Exposed to other modules in defs.h. -const upb_EnumDef* EnumDescriptor_GetEnumDef(VALUE enum_desc_rb) { - EnumDescriptor* desc = ruby_to_EnumDescriptor(enum_desc_rb); - return desc->enumdef; -} - -/* - * call-seq: - * EnumDescriptor.new(c_only_cookie, ptr) => EnumDescriptor - * - * Creates a descriptor wrapper object. May only be called from C. - */ -static VALUE EnumDescriptor_initialize(VALUE _self, VALUE cookie, - VALUE descriptor_pool, VALUE ptr) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - - if (cookie != c_only_cookie) { - rb_raise(rb_eRuntimeError, - "Descriptor objects may not be created from Ruby."); - } - - RB_OBJ_WRITE(_self, &self->descriptor_pool, descriptor_pool); - self->enumdef = (const upb_EnumDef*)NUM2ULL(ptr); - - return Qnil; -} - -/* - * call-seq: - * EnumDescriptor.file_descriptor - * - * Returns the FileDescriptor object this enum belongs to. - */ -static VALUE EnumDescriptor_file_descriptor(VALUE _self) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - return get_filedef_obj(self->descriptor_pool, - upb_EnumDef_File(self->enumdef)); -} - -/* - * call-seq: - * EnumDescriptor.is_closed? => bool - * - * Returns whether this enum is open or closed. - */ -static VALUE EnumDescriptor_is_closed(VALUE _self) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - return upb_EnumDef_IsClosed(self->enumdef) ? Qtrue : Qfalse; -} - -/* - * call-seq: - * EnumDescriptor.name => name - * - * Returns the name of this enum type. - */ -static VALUE EnumDescriptor_name(VALUE _self) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - return rb_str_maybe_null(upb_EnumDef_FullName(self->enumdef)); -} - -/* - * call-seq: - * EnumDescriptor.lookup_name(name) => value - * - * Returns the numeric value corresponding to the given key name (as a Ruby - * symbol), or nil if none. - */ -static VALUE EnumDescriptor_lookup_name(VALUE _self, VALUE name) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - const char* name_str = rb_id2name(SYM2ID(name)); - const upb_EnumValueDef* ev = - upb_EnumDef_FindValueByName(self->enumdef, name_str); - if (ev) { - return INT2NUM(upb_EnumValueDef_Number(ev)); - } else { - return Qnil; - } -} - -/* - * call-seq: - * EnumDescriptor.lookup_value(name) => value - * - * Returns the key name (as a Ruby symbol) corresponding to the integer value, - * or nil if none. - */ -static VALUE EnumDescriptor_lookup_value(VALUE _self, VALUE number) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - int32_t val = NUM2INT(number); - const upb_EnumValueDef* ev = - upb_EnumDef_FindValueByNumber(self->enumdef, val); - if (ev) { - return ID2SYM(rb_intern(upb_EnumValueDef_Name(ev))); - } else { - return Qnil; - } -} - -/* - * call-seq: - * EnumDescriptor.each(&block) - * - * Iterates over key => value mappings in this enum's definition, yielding to - * the block with (key, value) arguments for each one. - */ -static VALUE EnumDescriptor_each(VALUE _self) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - - int n = upb_EnumDef_ValueCount(self->enumdef); - for (int i = 0; i < n; i++) { - const upb_EnumValueDef* ev = upb_EnumDef_Value(self->enumdef, i); - VALUE key = ID2SYM(rb_intern(upb_EnumValueDef_Name(ev))); - VALUE number = INT2NUM(upb_EnumValueDef_Number(ev)); - rb_yield_values(2, key, number); - } - - return Qnil; -} - -/* - * call-seq: - * EnumDescriptor.enummodule => module - * - * Returns the Ruby module corresponding to this enum type. - */ -static VALUE EnumDescriptor_enummodule(VALUE _self) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - if (self->module == Qnil) { - RB_OBJ_WRITE(_self, &self->module, build_module_from_enumdesc(_self)); - } - return self->module; -} - -/* - * call-seq: - * EnumDescriptor.options => options - * - * Returns the `EnumOptions` for this `EnumDescriptor`. - */ -static VALUE EnumDescriptor_options(VALUE _self) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - const google_protobuf_EnumOptions* opts = upb_EnumDef_Options(self->enumdef); - upb_Arena* arena = upb_Arena_New(); - size_t size; - char* serialized = google_protobuf_EnumOptions_serialize(opts, arena, &size); - VALUE enum_options = decode_options(_self, "EnumOptions", size, serialized, - self->descriptor_pool); - upb_Arena_Free(arena); - return enum_options; -} - -/* - * call-seq: - * EnumDescriptor.to_proto => EnumDescriptorProto - * - * Returns the `EnumDescriptorProto` of this `EnumDescriptor`. - */ -static VALUE EnumDescriptor_to_proto(VALUE _self) { - EnumDescriptor* self = ruby_to_EnumDescriptor(_self); - upb_Arena* arena = upb_Arena_New(); - google_protobuf_EnumDescriptorProto* proto = - upb_EnumDef_ToProto(self->enumdef, arena); - - size_t size; - const char* serialized = - google_protobuf_EnumDescriptorProto_serialize(proto, arena, &size); - - VALUE proto_class = rb_path2class("Google::Protobuf::EnumDescriptorProto"); - VALUE proto_rb = - Message_decode_bytes(size, serialized, 0, proto_class, false); - upb_Arena_Free(arena); - return proto_rb; -} - -static void EnumDescriptor_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "EnumDescriptor", rb_cObject); - rb_define_alloc_func(klass, EnumDescriptor_alloc); - rb_define_method(klass, "initialize", EnumDescriptor_initialize, 3); - rb_define_method(klass, "name", EnumDescriptor_name, 0); - rb_define_method(klass, "lookup_name", EnumDescriptor_lookup_name, 1); - rb_define_method(klass, "lookup_value", EnumDescriptor_lookup_value, 1); - rb_define_method(klass, "each", EnumDescriptor_each, 0); - rb_define_method(klass, "enummodule", EnumDescriptor_enummodule, 0); - rb_define_method(klass, "file_descriptor", EnumDescriptor_file_descriptor, 0); - rb_define_method(klass, "is_closed?", EnumDescriptor_is_closed, 0); - rb_define_method(klass, "options", EnumDescriptor_options, 0); - rb_define_method(klass, "to_proto", EnumDescriptor_to_proto, 0); - rb_include_module(klass, rb_mEnumerable); - rb_gc_register_address(&cEnumDescriptor); - cEnumDescriptor = klass; -} - -// ----------------------------------------------------------------------------- -// ServiceDescriptor -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_ServiceDef* servicedef; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE module; // begins as nil - VALUE descriptor_pool; // Owns the upb_ServiceDef. -} ServiceDescriptor; - -static VALUE cServiceDescriptor = Qnil; - -static void ServiceDescriptor_mark(void* _self) { - ServiceDescriptor* self = _self; - rb_gc_mark(self->module); - rb_gc_mark(self->descriptor_pool); -} - -static const rb_data_type_t ServiceDescriptor_type = { - "Google::Protobuf::ServicDescriptor", - {ServiceDescriptor_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static ServiceDescriptor* ruby_to_ServiceDescriptor(VALUE val) { - ServiceDescriptor* ret; - TypedData_Get_Struct(val, ServiceDescriptor, &ServiceDescriptor_type, ret); - return ret; -} - -static VALUE ServiceDescriptor_alloc(VALUE klass) { - ServiceDescriptor* self = ALLOC(ServiceDescriptor); - VALUE ret = TypedData_Wrap_Struct(klass, &ServiceDescriptor_type, self); - self->servicedef = NULL; - self->module = Qnil; - self->descriptor_pool = Qnil; - return ret; -} - -/* - * call-seq: - * ServiceDescriptor.new(c_only_cookie, ptr) => ServiceDescriptor - * - * Creates a descriptor wrapper object. May only be called from C. - */ -static VALUE ServiceDescriptor_initialize(VALUE _self, VALUE cookie, - VALUE descriptor_pool, VALUE ptr) { - ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self); - - if (cookie != c_only_cookie) { - rb_raise(rb_eRuntimeError, - "Descriptor objects may not be created from Ruby."); - } - - RB_OBJ_WRITE(_self, &self->descriptor_pool, descriptor_pool); - self->servicedef = (const upb_ServiceDef*)NUM2ULL(ptr); - - return Qnil; -} - -/* - * call-seq: - * ServiceDescriptor.name => name - * - * Returns the name of this service. - */ -static VALUE ServiceDescriptor_name(VALUE _self) { - ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self); - return rb_str_maybe_null(upb_ServiceDef_FullName(self->servicedef)); -} - -/* - * call-seq: - * ServiceDescriptor.file_descriptor - * - * Returns the FileDescriptor object this service belongs to. - */ -static VALUE ServiceDescriptor_file_descriptor(VALUE _self) { - ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self); - return get_filedef_obj(self->descriptor_pool, - upb_ServiceDef_File(self->servicedef)); -} - -/* - * call-seq: - * ServiceDescriptor.each(&block) - * - * Iterates over methods in this service, yielding to the block on each one. - */ -static VALUE ServiceDescriptor_each(VALUE _self) { - ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self); - - int n = upb_ServiceDef_MethodCount(self->servicedef); - for (int i = 0; i < n; i++) { - const upb_MethodDef* method = upb_ServiceDef_Method(self->servicedef, i); - VALUE obj = get_methoddef_obj(self->descriptor_pool, method); - rb_yield(obj); - } - return Qnil; -} - -/* - * call-seq: - * ServiceDescriptor.options => options - * - * Returns the `ServiceOptions` for this `ServiceDescriptor`. - */ -static VALUE ServiceDescriptor_options(VALUE _self) { - ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self); - const google_protobuf_ServiceOptions* opts = - upb_ServiceDef_Options(self->servicedef); - upb_Arena* arena = upb_Arena_New(); - size_t size; - char* serialized = - google_protobuf_ServiceOptions_serialize(opts, arena, &size); - VALUE service_options = decode_options(_self, "ServiceOptions", size, - serialized, self->descriptor_pool); - upb_Arena_Free(arena); - return service_options; -} - -/* - * call-seq: - * ServiceDescriptor.to_proto => ServiceDescriptorProto - * - * Returns the `ServiceDescriptorProto` of this `ServiceDescriptor`. - */ -static VALUE ServiceDescriptor_to_proto(VALUE _self) { - ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self); - upb_Arena* arena = upb_Arena_New(); - google_protobuf_ServiceDescriptorProto* proto = - upb_ServiceDef_ToProto(self->servicedef, arena); - size_t size; - const char* serialized = - google_protobuf_ServiceDescriptorProto_serialize(proto, arena, &size); - VALUE proto_class = rb_path2class("Google::Protobuf::ServiceDescriptorProto"); - VALUE proto_rb = - Message_decode_bytes(size, serialized, 0, proto_class, false); - upb_Arena_Free(arena); - return proto_rb; -} - -static void ServiceDescriptor_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "ServiceDescriptor", rb_cObject); - rb_define_alloc_func(klass, ServiceDescriptor_alloc); - rb_define_method(klass, "initialize", ServiceDescriptor_initialize, 3); - rb_define_method(klass, "name", ServiceDescriptor_name, 0); - rb_define_method(klass, "each", ServiceDescriptor_each, 0); - rb_define_method(klass, "file_descriptor", ServiceDescriptor_file_descriptor, - 0); - rb_define_method(klass, "options", ServiceDescriptor_options, 0); - rb_define_method(klass, "to_proto", ServiceDescriptor_to_proto, 0); - rb_include_module(klass, rb_mEnumerable); - rb_gc_register_address(&cServiceDescriptor); - cServiceDescriptor = klass; -} - -// ----------------------------------------------------------------------------- -// MethodDescriptor -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_MethodDef* methoddef; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE module; // begins as nil - VALUE descriptor_pool; // Owns the upb_MethodDef. -} MethodDescriptor; - -static VALUE cMethodDescriptor = Qnil; - -static void MethodDescriptor_mark(void* _self) { - MethodDescriptor* self = _self; - rb_gc_mark(self->module); - rb_gc_mark(self->descriptor_pool); -} - -static const rb_data_type_t MethodDescriptor_type = { - "Google::Protobuf::MethodDescriptor", - {MethodDescriptor_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static MethodDescriptor* ruby_to_MethodDescriptor(VALUE val) { - MethodDescriptor* ret; - TypedData_Get_Struct(val, MethodDescriptor, &MethodDescriptor_type, ret); - return ret; -} - -static VALUE MethodDescriptor_alloc(VALUE klass) { - MethodDescriptor* self = ALLOC(MethodDescriptor); - VALUE ret = TypedData_Wrap_Struct(klass, &MethodDescriptor_type, self); - self->methoddef = NULL; - self->module = Qnil; - self->descriptor_pool = Qnil; - return ret; -} - -/* - * call-seq: - * MethodDescriptor.new(c_only_cookie, ptr) => MethodDescriptor - * - * Creates a descriptor wrapper object. May only be called from C. - */ -static VALUE MethodDescriptor_initialize(VALUE _self, VALUE cookie, - VALUE descriptor_pool, VALUE ptr) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - - if (cookie != c_only_cookie) { - rb_raise(rb_eRuntimeError, - "Descriptor objects may not be created from Ruby."); - } - - RB_OBJ_WRITE(_self, &self->descriptor_pool, descriptor_pool); - self->methoddef = (const upb_MethodDef*)NUM2ULL(ptr); - - return Qnil; -} - -/* - * call-seq: - * MethodDescriptor.name => name - * - * Returns the name of this method - */ -static VALUE MethodDescriptor_name(VALUE _self) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - return rb_str_maybe_null(upb_MethodDef_Name(self->methoddef)); -} - -/* - * call-seq: - * MethodDescriptor.options => options - * - * Returns the `MethodOptions` for this `MethodDescriptor`. - */ -static VALUE MethodDescriptor_options(VALUE _self) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - const google_protobuf_MethodOptions* opts = - upb_MethodDef_Options(self->methoddef); - upb_Arena* arena = upb_Arena_New(); - size_t size; - char* serialized = - google_protobuf_MethodOptions_serialize(opts, arena, &size); - VALUE method_options = decode_options(_self, "MethodOptions", size, - serialized, self->descriptor_pool); - upb_Arena_Free(arena); - return method_options; -} - -/* - * call-seq: - * MethodDescriptor.input_type => Descriptor - * - * Returns the `Descriptor` for the request message type of this method - */ -static VALUE MethodDescriptor_input_type(VALUE _self) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - const upb_MessageDef* type = upb_MethodDef_InputType(self->methoddef); - return get_msgdef_obj(self->descriptor_pool, type); -} - -/* - * call-seq: - * MethodDescriptor.output_type => Descriptor - * - * Returns the `Descriptor` for the response message type of this method - */ -static VALUE MethodDescriptor_output_type(VALUE _self) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - const upb_MessageDef* type = upb_MethodDef_OutputType(self->methoddef); - return get_msgdef_obj(self->descriptor_pool, type); -} - -/* - * call-seq: - * MethodDescriptor.client_streaming => bool - * - * Returns whether or not this is a streaming request method - */ -static VALUE MethodDescriptor_client_streaming(VALUE _self) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - return upb_MethodDef_ClientStreaming(self->methoddef) ? Qtrue : Qfalse; -} - -/* - * call-seq: - * MethodDescriptor.to_proto => MethodDescriptorProto - * - * Returns the `MethodDescriptorProto` of this `MethodDescriptor`. - */ -static VALUE MethodDescriptor_to_proto(VALUE _self) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - upb_Arena* arena = upb_Arena_New(); - google_protobuf_MethodDescriptorProto* proto = - upb_MethodDef_ToProto(self->methoddef, arena); - size_t size; - const char* serialized = - google_protobuf_MethodDescriptorProto_serialize(proto, arena, &size); - VALUE proto_class = rb_path2class("Google::Protobuf::MethodDescriptorProto"); - VALUE proto_rb = - Message_decode_bytes(size, serialized, 0, proto_class, false); - upb_Arena_Free(arena); - return proto_rb; -} - -/* - * call-seq: - * MethodDescriptor.server_streaming => bool - * - * Returns whether or not this is a streaming response method - */ -static VALUE MethodDescriptor_server_streaming(VALUE _self) { - MethodDescriptor* self = ruby_to_MethodDescriptor(_self); - return upb_MethodDef_ServerStreaming(self->methoddef) ? Qtrue : Qfalse; -} - -static void MethodDescriptor_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "MethodDescriptor", rb_cObject); - rb_define_alloc_func(klass, MethodDescriptor_alloc); - rb_define_method(klass, "initialize", MethodDescriptor_initialize, 3); - rb_define_method(klass, "name", MethodDescriptor_name, 0); - rb_define_method(klass, "options", MethodDescriptor_options, 0); - rb_define_method(klass, "input_type", MethodDescriptor_input_type, 0); - rb_define_method(klass, "output_type", MethodDescriptor_output_type, 0); - rb_define_method(klass, "client_streaming", MethodDescriptor_client_streaming, - 0); - rb_define_method(klass, "server_streaming", MethodDescriptor_server_streaming, - 0); - rb_define_method(klass, "to_proto", MethodDescriptor_to_proto, 0); - rb_gc_register_address(&cMethodDescriptor); - cMethodDescriptor = klass; -} - -static VALUE get_def_obj(VALUE _descriptor_pool, const void* ptr, VALUE klass) { - DescriptorPool* descriptor_pool = ruby_to_DescriptorPool(_descriptor_pool); - VALUE key = ULL2NUM((intptr_t)ptr); - VALUE def; - - def = rb_hash_aref(descriptor_pool->def_to_descriptor, key); - - if (ptr == NULL) { - return Qnil; - } - - if (def == Qnil) { - // Lazily create wrapper object. - VALUE args[3] = {c_only_cookie, _descriptor_pool, key}; - def = rb_class_new_instance(3, args, klass); - rb_hash_aset(descriptor_pool->def_to_descriptor, key, def); - } - - return def; -} - -static VALUE get_msgdef_obj(VALUE descriptor_pool, const upb_MessageDef* def) { - return get_def_obj(descriptor_pool, def, cDescriptor); -} - -static VALUE get_enumdef_obj(VALUE descriptor_pool, const upb_EnumDef* def) { - return get_def_obj(descriptor_pool, def, cEnumDescriptor); -} - -static VALUE get_fielddef_obj(VALUE descriptor_pool, const upb_FieldDef* def) { - return get_def_obj(descriptor_pool, def, cFieldDescriptor); -} - -static VALUE get_filedef_obj(VALUE descriptor_pool, const upb_FileDef* def) { - return get_def_obj(descriptor_pool, def, cFileDescriptor); -} - -static VALUE get_oneofdef_obj(VALUE descriptor_pool, const upb_OneofDef* def) { - return get_def_obj(descriptor_pool, def, cOneofDescriptor); -} - -static VALUE get_servicedef_obj(VALUE descriptor_pool, - const upb_ServiceDef* def) { - return get_def_obj(descriptor_pool, def, cServiceDescriptor); -} - -static VALUE get_methoddef_obj(VALUE descriptor_pool, - const upb_MethodDef* def) { - return get_def_obj(descriptor_pool, def, cMethodDescriptor); -} - -// ----------------------------------------------------------------------------- -// Shared functions -// ----------------------------------------------------------------------------- - -// Functions exposed to other modules in defs.h. - -VALUE Descriptor_DefToClass(const upb_MessageDef* m) { - const upb_DefPool* symtab = upb_FileDef_Pool(upb_MessageDef_File(m)); - VALUE pool = ObjectCache_Get(symtab); - PBRUBY_ASSERT(pool != Qnil); - VALUE desc_rb = get_msgdef_obj(pool, m); - const Descriptor* desc = ruby_to_Descriptor(desc_rb); - return desc->klass; -} - -const upb_MessageDef* Descriptor_GetMsgDef(VALUE desc_rb) { - const Descriptor* desc = ruby_to_Descriptor(desc_rb); - return desc->msgdef; -} - -VALUE TypeInfo_InitArg(int argc, VALUE* argv, int skip_arg) { - if (argc > skip_arg) { - if (argc > 1 + skip_arg) { - rb_raise(rb_eArgError, "Expected a maximum of %d arguments.", - skip_arg + 1); - } - return argv[skip_arg]; - } else { - return Qnil; - } -} - -TypeInfo TypeInfo_FromClass(int argc, VALUE* argv, int skip_arg, - VALUE* type_class, VALUE* init_arg) { - TypeInfo ret = {ruby_to_fieldtype(argv[skip_arg])}; - - if (ret.type == kUpb_CType_Message || ret.type == kUpb_CType_Enum) { - *init_arg = TypeInfo_InitArg(argc, argv, skip_arg + 2); - - if (argc < 2 + skip_arg) { - rb_raise(rb_eArgError, "Expected at least %d arguments for message/enum.", - 2 + skip_arg); - } - - VALUE klass = argv[1 + skip_arg]; - VALUE desc = MessageOrEnum_GetDescriptor(klass); - *type_class = klass; - - if (desc == Qnil) { - rb_raise(rb_eArgError, - "Type class has no descriptor. Please pass a " - "class or enum as returned by the DescriptorPool."); - } - - if (ret.type == kUpb_CType_Message) { - ret.def.msgdef = ruby_to_Descriptor(desc)->msgdef; - Message_CheckClass(klass); - } else { - PBRUBY_ASSERT(ret.type == kUpb_CType_Enum); - ret.def.enumdef = ruby_to_EnumDescriptor(desc)->enumdef; - } - } else { - *init_arg = TypeInfo_InitArg(argc, argv, skip_arg + 1); - } - - return ret; -} - -void Defs_register(VALUE module) { - DescriptorPool_register(module); - Descriptor_register(module); - FileDescriptor_register(module); - FieldDescriptor_register(module); - OneofDescriptor_register(module); - EnumDescriptor_register(module); - ServiceDescriptor_register(module); - MethodDescriptor_register(module); - - rb_gc_register_address(&c_only_cookie); - c_only_cookie = rb_class_new_instance(0, NULL, rb_cObject); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/defs.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/defs.h deleted file mode 100644 index 931dd6ed..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/defs.h +++ /dev/null @@ -1,82 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#ifndef RUBY_PROTOBUF_DEFS_H_ -#define RUBY_PROTOBUF_DEFS_H_ - -#include "protobuf.h" -#include "ruby-upb.h" - -// ----------------------------------------------------------------------------- -// TypeInfo -// ----------------------------------------------------------------------------- - -// This bundles a upb_CType and msgdef/enumdef when appropriate. This is -// convenient for functions that need type information but cannot necessarily -// assume a upb_FieldDef will be available. -// -// For example, Google::Protobuf::Map and Google::Protobuf::RepeatedField can -// be constructed with type information alone: -// -// # RepeatedField will internally store the type information in a TypeInfo. -// Google::Protobuf::RepeatedField.new(:message, FooMessage) - -typedef struct { - upb_CType type; - union { - const upb_MessageDef* msgdef; // When type == kUpb_CType_Message - const upb_EnumDef* enumdef; // When type == kUpb_CType_Enum - } def; -} TypeInfo; - -static inline TypeInfo TypeInfo_get(const upb_FieldDef* f) { - TypeInfo ret = {upb_FieldDef_CType(f), {NULL}}; - switch (ret.type) { - case kUpb_CType_Message: - ret.def.msgdef = upb_FieldDef_MessageSubDef(f); - break; - case kUpb_CType_Enum: - ret.def.enumdef = upb_FieldDef_EnumSubDef(f); - break; - default: - break; - } - return ret; -} - -TypeInfo TypeInfo_FromClass(int argc, VALUE* argv, int skip_arg, - VALUE* type_class, VALUE* init_arg); - -static inline TypeInfo TypeInfo_from_type(upb_CType type) { - TypeInfo ret = {type}; - assert(type != kUpb_CType_Message && type != kUpb_CType_Enum); - return ret; -} - -// ----------------------------------------------------------------------------- -// Other utilities -// ----------------------------------------------------------------------------- - -VALUE Descriptor_DefToClass(const upb_MessageDef* m); - -// Returns the underlying msgdef, enumdef, or symtab (respectively) for the -// given Descriptor, EnumDescriptor, or DescriptorPool Ruby object. -const upb_EnumDef* EnumDescriptor_GetEnumDef(VALUE enum_desc_rb); -const upb_DefPool* DescriptorPool_GetSymtab(VALUE desc_pool_rb); -const upb_MessageDef* Descriptor_GetMsgDef(VALUE desc_rb); - -// Returns a upb field type for the given Ruby symbol -// (eg. :float => kUpb_CType_Float). -upb_CType ruby_to_fieldtype(VALUE type); - -// The singleton generated pool (a DescriptorPool object). -extern VALUE generated_pool; - -// Call at startup to register all types in this module. -void Defs_register(VALUE module); - -#endif // RUBY_PROTOBUF_DEFS_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/extconf.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/extconf.rb deleted file mode 100644 index 09ef580f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/extconf.rb +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/ruby - -require 'mkmf' - -ext_name = "google/protobuf_c" - -dir_config(ext_name) - -if ENV["CC"] - RbConfig::CONFIG["CC"] = RbConfig::MAKEFILE_CONFIG["CC"] = ENV["CC"] -end - -if ENV["CXX"] - RbConfig::CONFIG["CXX"] = RbConfig::MAKEFILE_CONFIG["CXX"] = ENV["CXX"] -end - -if ENV["LD"] - RbConfig::CONFIG["LD"] = RbConfig::MAKEFILE_CONFIG["LD"] = ENV["LD"] -end - -debug_enabled = ENV["PROTOBUF_CONFIG"] == "dbg" - -additional_c_flags = debug_enabled ? "-O0 -fno-omit-frame-pointer -fvisibility=default -g" : "-O3 -DNDEBUG -fvisibility=hidden" - -if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ || RUBY_PLATFORM =~ /freebsd/ - $CFLAGS += " -std=gnu99 -Wall -Wsign-compare -Wno-declaration-after-statement #{additional_c_flags}" -else - $CFLAGS += " -std=gnu99 #{additional_c_flags}" -end - -if RUBY_PLATFORM =~ /linux/ - # Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper. - $LDFLAGS += " -Wl,-wrap,memcpy" -end - -$VPATH << "$(srcdir)/third_party/utf8_range" -$INCFLAGS += " -I$(srcdir)/third_party/utf8_range" - -$srcs = ["protobuf.c", "convert.c", "defs.c", "message.c", - "repeated_field.c", "map.c", "ruby-upb.c", "wrap_memcpy.c", - "utf8_range.c", "shared_convert.c", - "shared_message.c"] - -create_makefile(ext_name) diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/glue.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/glue.c deleted file mode 100644 index 46e91463..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/glue.c +++ /dev/null @@ -1,135 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -// ----------------------------------------------------------------------------- -// Exposing inlined UPB functions. Strictly free of dependencies on -// Ruby interpreter internals. - -#include "ruby-upb.h" - -upb_Arena* Arena_create() { return upb_Arena_Init(NULL, 0, &upb_alloc_global); } - -google_protobuf_FileDescriptorProto* FileDescriptorProto_parse( - const char* serialized_file_proto, size_t length, upb_Arena* arena) { - return google_protobuf_FileDescriptorProto_parse(serialized_file_proto, - length, arena); -} - -char* EnumDescriptor_serialized_options(const upb_EnumDef* enumdef, - size_t* size, upb_Arena* arena) { - const google_protobuf_EnumOptions* opts = upb_EnumDef_Options(enumdef); - char* serialized = google_protobuf_EnumOptions_serialize(opts, arena, size); - return serialized; -} - -char* EnumDescriptor_serialized_to_proto(const upb_EnumDef* enumdef, - size_t* size, upb_Arena* arena) { - const google_protobuf_EnumDescriptorProto* file_proto = - upb_EnumDef_ToProto(enumdef, arena); - char* serialized = - google_protobuf_EnumDescriptorProto_serialize(file_proto, arena, size); - return serialized; -} - -char* FileDescriptor_serialized_options(const upb_FileDef* filedef, - size_t* size, upb_Arena* arena) { - const google_protobuf_FileOptions* opts = upb_FileDef_Options(filedef); - char* serialized = google_protobuf_FileOptions_serialize(opts, arena, size); - return serialized; -} - -char* FileDescriptor_serialized_to_proto(const upb_FileDef* filedef, - size_t* size, upb_Arena* arena) { - const google_protobuf_FileDescriptorProto* file_proto = - upb_FileDef_ToProto(filedef, arena); - char* serialized = - google_protobuf_FileDescriptorProto_serialize(file_proto, arena, size); - return serialized; -} - -char* Descriptor_serialized_options(const upb_MessageDef* msgdef, size_t* size, - upb_Arena* arena) { - const google_protobuf_MessageOptions* opts = upb_MessageDef_Options(msgdef); - char* serialized = - google_protobuf_MessageOptions_serialize(opts, arena, size); - return serialized; -} - -char* Descriptor_serialized_to_proto(const upb_MessageDef* msgdef, size_t* size, - upb_Arena* arena) { - const google_protobuf_DescriptorProto* proto = - upb_MessageDef_ToProto(msgdef, arena); - char* serialized = - google_protobuf_DescriptorProto_serialize(proto, arena, size); - return serialized; -} - -char* OneOfDescriptor_serialized_options(const upb_OneofDef* oneofdef, - size_t* size, upb_Arena* arena) { - const google_protobuf_OneofOptions* opts = upb_OneofDef_Options(oneofdef); - char* serialized = google_protobuf_OneofOptions_serialize(opts, arena, size); - return serialized; -} - -char* OneOfDescriptor_serialized_to_proto(const upb_OneofDef* oneofdef, - size_t* size, upb_Arena* arena) { - const google_protobuf_OneofDescriptorProto* proto = - upb_OneofDef_ToProto(oneofdef, arena); - char* serialized = - google_protobuf_OneofDescriptorProto_serialize(proto, arena, size); - return serialized; -} - -char* FieldDescriptor_serialized_options(const upb_FieldDef* fielddef, - size_t* size, upb_Arena* arena) { - const google_protobuf_FieldOptions* opts = upb_FieldDef_Options(fielddef); - char* serialized = google_protobuf_FieldOptions_serialize(opts, arena, size); - return serialized; -} - -char* FieldDescriptor_serialized_to_proto(const upb_FieldDef* fieldef, - size_t* size, upb_Arena* arena) { - const google_protobuf_FieldDescriptorProto* proto = - upb_FieldDef_ToProto(fieldef, arena); - char* serialized = - google_protobuf_FieldDescriptorProto_serialize(proto, arena, size); - return serialized; -} - -char* ServiceDescriptor_serialized_options(const upb_ServiceDef* servicedef, - size_t* size, upb_Arena* arena) { - const google_protobuf_ServiceOptions* opts = - upb_ServiceDef_Options(servicedef); - char* serialized = - google_protobuf_ServiceOptions_serialize(opts, arena, size); - return serialized; -} - -char* ServiceDescriptor_serialized_to_proto(const upb_ServiceDef* servicedef, - size_t* size, upb_Arena* arena) { - const google_protobuf_ServiceDescriptorProto* proto = - upb_ServiceDef_ToProto(servicedef, arena); - char* serialized = - google_protobuf_ServiceDescriptorProto_serialize(proto, arena, size); - return serialized; -} - -char* MethodDescriptor_serialized_options(const upb_MethodDef* methoddef, - size_t* size, upb_Arena* arena) { - const google_protobuf_MethodOptions* opts = upb_MethodDef_Options(methoddef); - char* serialized = google_protobuf_MethodOptions_serialize(opts, arena, size); - return serialized; -} - -char* MethodDescriptor_serialized_to_proto(const upb_MethodDef* methodef, - size_t* size, upb_Arena* arena) { - const google_protobuf_MethodDescriptorProto* proto = - upb_MethodDef_ToProto(methodef, arena); - char* serialized = - google_protobuf_MethodDescriptorProto_serialize(proto, arena, size); - return serialized; -} \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/map.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/map.c deleted file mode 100644 index af4a7426..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/map.c +++ /dev/null @@ -1,731 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2014 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#include "convert.h" -#include "defs.h" -#include "message.h" -#include "protobuf.h" - -// ----------------------------------------------------------------------------- -// Basic map operations on top of upb_Map. -// -// Note that we roll our own `Map` container here because, as for -// `RepeatedField`, we want a strongly-typed container. This is so that any user -// errors due to incorrect map key or value types are raised as close as -// possible to the error site, rather than at some deferred point (e.g., -// serialization). -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// Map container type. -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_Map* map; // Can convert to mutable when non-frozen. - upb_CType key_type; - TypeInfo value_type_info; - VALUE value_type_class; - VALUE arena; -} Map; - -static void Map_mark(void* _self) { - Map* self = _self; - rb_gc_mark(self->value_type_class); - rb_gc_mark(self->arena); -} - -static size_t Map_memsize(const void* _self) { return sizeof(Map); } - -const rb_data_type_t Map_type = { - "Google::Protobuf::Map", - {Map_mark, RUBY_DEFAULT_FREE, Map_memsize}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY, -}; - -VALUE cMap; - -static Map* ruby_to_Map(VALUE _self) { - Map* self; - TypedData_Get_Struct(_self, Map, &Map_type, self); - return self; -} - -static VALUE Map_alloc(VALUE klass) { - Map* self = ALLOC(Map); - self->map = NULL; - self->value_type_class = Qnil; - self->value_type_info.def.msgdef = NULL; - self->arena = Qnil; - return TypedData_Wrap_Struct(klass, &Map_type, self); -} - -VALUE Map_GetRubyWrapper(const upb_Map* map, upb_CType key_type, - TypeInfo value_type, VALUE arena) { - PBRUBY_ASSERT(map); - PBRUBY_ASSERT(arena != Qnil); - - VALUE val = ObjectCache_Get(map); - - if (val == Qnil) { - val = Map_alloc(cMap); - Map* self; - TypedData_Get_Struct(val, Map, &Map_type, self); - self->map = map; - self->arena = arena; - self->key_type = key_type; - self->value_type_info = value_type; - if (self->value_type_info.type == kUpb_CType_Message) { - const upb_MessageDef* val_m = self->value_type_info.def.msgdef; - self->value_type_class = Descriptor_DefToClass(val_m); - } - return ObjectCache_TryAdd(map, val); - } - return val; -} - -static VALUE Map_new_this_type(Map* from) { - VALUE arena_rb = Arena_new(); - upb_Map* map = upb_Map_New(Arena_get(arena_rb), from->key_type, - from->value_type_info.type); - VALUE ret = - Map_GetRubyWrapper(map, from->key_type, from->value_type_info, arena_rb); - PBRUBY_ASSERT(ruby_to_Map(ret)->value_type_class == from->value_type_class); - return ret; -} - -static TypeInfo Map_keyinfo(Map* self) { - TypeInfo ret; - ret.type = self->key_type; - ret.def.msgdef = NULL; - return ret; -} - -static upb_Map* Map_GetMutable(VALUE _self) { - const upb_Map* map = ruby_to_Map(_self)->map; - Protobuf_CheckNotFrozen(_self, upb_Map_IsFrozen(map)); - return (upb_Map*)map; -} - -VALUE Map_CreateHash(const upb_Map* map, upb_CType key_type, - TypeInfo val_info) { - VALUE hash = rb_hash_new(); - TypeInfo key_info = TypeInfo_from_type(key_type); - - if (!map) return hash; - - size_t iter = kUpb_Map_Begin; - upb_MessageValue key, val; - while (upb_Map_Next(map, &key, &val, &iter)) { - VALUE key_val = Convert_UpbToRuby(key, key_info, Qnil); - VALUE val_val = Scalar_CreateHash(val, val_info); - rb_hash_aset(hash, key_val, val_val); - } - - return hash; -} - -VALUE Map_deep_copy(VALUE obj) { - Map* self = ruby_to_Map(obj); - VALUE new_arena_rb = Arena_new(); - upb_Arena* arena = Arena_get(new_arena_rb); - upb_Map* new_map = - upb_Map_New(arena, self->key_type, self->value_type_info.type); - size_t iter = kUpb_Map_Begin; - upb_MessageValue key, val; - while (upb_Map_Next(self->map, &key, &val, &iter)) { - upb_MessageValue val_copy = - Msgval_DeepCopy(val, self->value_type_info, arena); - upb_Map_Set(new_map, key, val_copy, arena); - } - - return Map_GetRubyWrapper(new_map, self->key_type, self->value_type_info, - new_arena_rb); -} - -const upb_Map* Map_GetUpbMap(VALUE val, const upb_FieldDef* field, - upb_Arena* arena) { - const upb_FieldDef* key_field = map_field_key(field); - const upb_FieldDef* value_field = map_field_value(field); - TypeInfo value_type_info = TypeInfo_get(value_field); - Map* self; - - if (!RB_TYPE_P(val, T_DATA) || !RTYPEDDATA_P(val) || - RTYPEDDATA_TYPE(val) != &Map_type) { - rb_raise(cTypeError, "Expected Map instance"); - } - - self = ruby_to_Map(val); - if (self->key_type != upb_FieldDef_CType(key_field)) { - rb_raise(cTypeError, "Map key type does not match field's key type"); - } - if (self->value_type_info.type != value_type_info.type) { - rb_raise(cTypeError, "Map value type does not match field's value type"); - } - if (self->value_type_info.def.msgdef != value_type_info.def.msgdef) { - rb_raise(cTypeError, "Map value type has wrong message/enum class"); - } - - Arena_fuse(self->arena, arena); - return self->map; -} - -void Map_Inspect(StringBuilder* b, const upb_Map* map, upb_CType key_type, - TypeInfo val_type) { - bool first = true; - TypeInfo key_type_info = {key_type}; - StringBuilder_Printf(b, "{"); - if (map) { - size_t iter = kUpb_Map_Begin; - upb_MessageValue key, val; - while (upb_Map_Next(map, &key, &val, &iter)) { - if (first) { - first = false; - } else { - StringBuilder_Printf(b, ", "); - } - StringBuilder_PrintMsgval(b, key, key_type_info); - StringBuilder_Printf(b, "=>"); - StringBuilder_PrintMsgval(b, val, val_type); - } - } - StringBuilder_Printf(b, "}"); -} - -static int merge_into_self_callback(VALUE key, VALUE val, VALUE _self) { - Map* self = ruby_to_Map(_self); - upb_Arena* arena = Arena_get(self->arena); - upb_MessageValue key_val = - Convert_RubyToUpb(key, "", Map_keyinfo(self), arena); - upb_MessageValue val_val = - Convert_RubyToUpb(val, "", self->value_type_info, arena); - upb_Map_Set(Map_GetMutable(_self), key_val, val_val, arena); - return ST_CONTINUE; -} - -// Used only internally -- shared by #merge and #initialize. -static VALUE Map_merge_into_self(VALUE _self, VALUE hashmap) { - if (TYPE(hashmap) == T_HASH) { - rb_hash_foreach(hashmap, merge_into_self_callback, _self); - } else if (RB_TYPE_P(hashmap, T_DATA) && RTYPEDDATA_P(hashmap) && - RTYPEDDATA_TYPE(hashmap) == &Map_type) { - Map* self = ruby_to_Map(_self); - Map* other = ruby_to_Map(hashmap); - upb_Arena* arena = Arena_get(self->arena); - upb_Map* self_map = Map_GetMutable(_self); - - Arena_fuse(other->arena, arena); - - if (self->key_type != other->key_type || - self->value_type_info.type != other->value_type_info.type || - self->value_type_class != other->value_type_class) { - rb_raise(rb_eArgError, "Attempt to merge Map with mismatching types"); - } - - size_t iter = kUpb_Map_Begin; - upb_MessageValue key, val; - while (upb_Map_Next(other->map, &key, &val, &iter)) { - upb_Map_Set(self_map, key, val, arena); - } - } else { - rb_raise(rb_eArgError, "Unknown type merging into Map"); - } - return _self; -} - -/* - * call-seq: - * Map.new(key_type, value_type, value_typeclass = nil, init_hashmap = {}) - * => new map - * - * Allocates a new Map container. This constructor may be called with 2, 3, or 4 - * arguments. The first two arguments are always present and are symbols (taking - * on the same values as field-type symbols in message descriptors) that - * indicate the type of the map key and value fields. - * - * The supported key types are: :int32, :int64, :uint32, :uint64, :bool, - * :string, :bytes. - * - * The supported value types are: :int32, :int64, :uint32, :uint64, :bool, - * :string, :bytes, :enum, :message. - * - * The third argument, value_typeclass, must be present if value_type is :enum - * or :message. As in RepeatedField#new, this argument must be a message class - * (for :message) or enum module (for :enum). - * - * The last argument, if present, provides initial content for map. Note that - * this may be an ordinary Ruby hashmap or another Map instance with identical - * key and value types. Also note that this argument may be present whether or - * not value_typeclass is present (and it is unambiguously separate from - * value_typeclass because value_typeclass's presence is strictly determined by - * value_type). The contents of this initial hashmap or Map instance are - * shallow-copied into the new Map: the original map is unmodified, but - * references to underlying objects will be shared if the value type is a - * message type. - */ -static VALUE Map_init(int argc, VALUE* argv, VALUE _self) { - Map* self = ruby_to_Map(_self); - VALUE init_arg; - - // We take either two args (:key_type, :value_type), three args (:key_type, - // :value_type, "ValueMessageType"), or four args (the above plus an initial - // hashmap). - if (argc < 2 || argc > 4) { - rb_raise(rb_eArgError, "Map constructor expects 2, 3 or 4 arguments."); - } - - self->key_type = ruby_to_fieldtype(argv[0]); - self->value_type_info = - TypeInfo_FromClass(argc, argv, 1, &self->value_type_class, &init_arg); - self->arena = Arena_new(); - - // Check that the key type is an allowed type. - switch (self->key_type) { - case kUpb_CType_Int32: - case kUpb_CType_Int64: - case kUpb_CType_UInt32: - case kUpb_CType_UInt64: - case kUpb_CType_Bool: - case kUpb_CType_String: - case kUpb_CType_Bytes: - // These are OK. - break; - default: - rb_raise(rb_eArgError, "Invalid key type for map."); - } - - self->map = upb_Map_New(Arena_get(self->arena), self->key_type, - self->value_type_info.type); - VALUE stored = ObjectCache_TryAdd(self->map, _self); - (void)stored; - PBRUBY_ASSERT(stored == _self); - - if (init_arg != Qnil) { - Map_merge_into_self(_self, init_arg); - } - - return Qnil; -} - -/* - * call-seq: - * Map.each(&block) - * - * Invokes &block on each |key, value| pair in the map, in unspecified order. - * Note that Map also includes Enumerable; map thus acts like a normal Ruby - * sequence. - */ -static VALUE Map_each(VALUE _self) { - Map* self = ruby_to_Map(_self); - size_t iter = kUpb_Map_Begin; - upb_MessageValue key, val; - - while (upb_Map_Next(self->map, &key, &val, &iter)) { - VALUE key_val = Convert_UpbToRuby(key, Map_keyinfo(self), self->arena); - VALUE val_val = Convert_UpbToRuby(val, self->value_type_info, self->arena); - rb_yield_values(2, key_val, val_val); - } - - return Qnil; -} - -/* - * call-seq: - * Map.keys => [list_of_keys] - * - * Returns the list of keys contained in the map, in unspecified order. - */ -static VALUE Map_keys(VALUE _self) { - Map* self = ruby_to_Map(_self); - size_t iter = kUpb_Map_Begin; - VALUE ret = rb_ary_new(); - upb_MessageValue key, val; - - while (upb_Map_Next(self->map, &key, &val, &iter)) { - VALUE key_val = Convert_UpbToRuby(key, Map_keyinfo(self), self->arena); - rb_ary_push(ret, key_val); - } - - return ret; -} - -/* - * call-seq: - * Map.values => [list_of_values] - * - * Returns the list of values contained in the map, in unspecified order. - */ -static VALUE Map_values(VALUE _self) { - Map* self = ruby_to_Map(_self); - size_t iter = kUpb_Map_Begin; - VALUE ret = rb_ary_new(); - upb_MessageValue key, val; - - while (upb_Map_Next(self->map, &key, &val, &iter)) { - VALUE val_val = Convert_UpbToRuby(val, self->value_type_info, self->arena); - rb_ary_push(ret, val_val); - } - - return ret; -} - -/* - * call-seq: - * Map.[](key) => value - * - * Accesses the element at the given key. Throws an exception if the key type is - * incorrect. Returns nil when the key is not present in the map. - */ -static VALUE Map_index(VALUE _self, VALUE key) { - Map* self = ruby_to_Map(_self); - upb_MessageValue key_upb = - Convert_RubyToUpb(key, "", Map_keyinfo(self), NULL); - upb_MessageValue val; - - if (upb_Map_Get(self->map, key_upb, &val)) { - return Convert_UpbToRuby(val, self->value_type_info, self->arena); - } else { - return Qnil; - } -} - -/* - * call-seq: - * Map.[]=(key, value) => value - * - * Inserts or overwrites the value at the given key with the given new value. - * Throws an exception if the key type is incorrect. Returns the new value that - * was just inserted. - */ -static VALUE Map_index_set(VALUE _self, VALUE key, VALUE val) { - Map* self = ruby_to_Map(_self); - upb_Arena* arena = Arena_get(self->arena); - upb_MessageValue key_upb = - Convert_RubyToUpb(key, "", Map_keyinfo(self), NULL); - upb_MessageValue val_upb = - Convert_RubyToUpb(val, "", self->value_type_info, arena); - - upb_Map_Set(Map_GetMutable(_self), key_upb, val_upb, arena); - - return val; -} - -/* - * call-seq: - * Map.has_key?(key) => bool - * - * Returns true if the given key is present in the map. Throws an exception if - * the key has the wrong type. - */ -static VALUE Map_has_key(VALUE _self, VALUE key) { - Map* self = ruby_to_Map(_self); - upb_MessageValue key_upb = - Convert_RubyToUpb(key, "", Map_keyinfo(self), NULL); - - if (upb_Map_Get(self->map, key_upb, NULL)) { - return Qtrue; - } else { - return Qfalse; - } -} - -/* - * call-seq: - * Map.delete(key) => old_value - * - * Deletes the value at the given key, if any, returning either the old value or - * nil if none was present. Throws an exception if the key is of the wrong type. - */ -static VALUE Map_delete(VALUE _self, VALUE key) { - upb_Map* map = Map_GetMutable(_self); - Map* self = ruby_to_Map(_self); - - upb_MessageValue key_upb = - Convert_RubyToUpb(key, "", Map_keyinfo(self), NULL); - upb_MessageValue val_upb; - - if (upb_Map_Delete(map, key_upb, &val_upb)) { - return Convert_UpbToRuby(val_upb, self->value_type_info, self->arena); - } else { - return Qnil; - } -} - -/* - * call-seq: - * Map.clear - * - * Removes all entries from the map. - */ -static VALUE Map_clear(VALUE _self) { - upb_Map_Clear(Map_GetMutable(_self)); - return Qnil; -} - -/* - * call-seq: - * Map.length - * - * Returns the number of entries (key-value pairs) in the map. - */ -static VALUE Map_length(VALUE _self) { - Map* self = ruby_to_Map(_self); - return ULL2NUM(upb_Map_Size(self->map)); -} - -/* - * call-seq: - * Map.dup => new_map - * - * Duplicates this map with a shallow copy. References to all non-primitive - * element objects (e.g., submessages) are shared. - */ -static VALUE Map_dup(VALUE _self) { - Map* self = ruby_to_Map(_self); - VALUE new_map_rb = Map_new_this_type(self); - Map* new_self = ruby_to_Map(new_map_rb); - size_t iter = kUpb_Map_Begin; - upb_Arena* arena = Arena_get(new_self->arena); - upb_Map* new_map = Map_GetMutable(new_map_rb); - - Arena_fuse(self->arena, arena); - - upb_MessageValue key, val; - while (upb_Map_Next(self->map, &key, &val, &iter)) { - upb_Map_Set(new_map, key, val, arena); - } - - return new_map_rb; -} - -/* - * call-seq: - * Map.==(other) => boolean - * - * Compares this map to another. Maps are equal if they have identical key sets, - * and for each key, the values in both maps compare equal. Elements are - * compared as per normal Ruby semantics, by calling their :== methods (or - * performing a more efficient comparison for primitive types). - * - * Maps with dissimilar key types or value types/typeclasses are never equal, - * even if value comparison (for example, between integers and floats) would - * have otherwise indicated that every element has equal value. - */ -VALUE Map_eq(VALUE _self, VALUE _other) { - Map* self = ruby_to_Map(_self); - Map* other; - - // Allow comparisons to Ruby hashmaps by converting to a temporary Map - // instance. Slow, but workable. - if (TYPE(_other) == T_HASH) { - VALUE other_map = Map_new_this_type(self); - Map_merge_into_self(other_map, _other); - _other = other_map; - } - - other = ruby_to_Map(_other); - - if (self == other) { - return Qtrue; - } - if (self->key_type != other->key_type || - self->value_type_info.type != other->value_type_info.type || - self->value_type_class != other->value_type_class) { - return Qfalse; - } - if (upb_Map_Size(self->map) != upb_Map_Size(other->map)) { - return Qfalse; - } - - // For each member of self, check that an equal member exists at the same key - // in other. - size_t iter = kUpb_Map_Begin; - upb_MessageValue key, val; - while (upb_Map_Next(self->map, &key, &val, &iter)) { - upb_MessageValue other_val; - if (!upb_Map_Get(other->map, key, &other_val)) { - // Not present in other map. - return Qfalse; - } - if (!Msgval_IsEqual(val, other_val, self->value_type_info)) { - // Present but different value. - return Qfalse; - } - } - - return Qtrue; -} - -/* - * call-seq: - * Map.frozen? => bool - * - * Returns true if the map is frozen in either Ruby or the underlying - * representation. Freezes the Ruby map object if it is not already frozen in - * Ruby but it is frozen in the underlying representation. - */ -VALUE Map_frozen(VALUE _self) { - Map* self = ruby_to_Map(_self); - if (!upb_Map_IsFrozen(self->map)) { - PBRUBY_ASSERT(!RB_OBJ_FROZEN(_self)); - return Qfalse; - } - - // Lazily freeze the Ruby wrapper. - if (!RB_OBJ_FROZEN(_self)) RB_OBJ_FREEZE(_self); - return Qtrue; -} - -/* - * call-seq: - * Map.freeze => self - * - * Freezes the map object. We have to intercept this so we can freeze the - * underlying representation, not just the Ruby wrapper. - */ -VALUE Map_freeze(VALUE _self) { - Map* self = ruby_to_Map(_self); - if (RB_OBJ_FROZEN(_self)) { - PBRUBY_ASSERT(upb_Map_IsFrozen(self->map)); - return _self; - } - - if (!upb_Map_IsFrozen(self->map)) { - if (self->value_type_info.type == kUpb_CType_Message) { - upb_Map_Freeze( - Map_GetMutable(_self), - upb_MessageDef_MiniTable(self->value_type_info.def.msgdef)); - } else { - upb_Map_Freeze(Map_GetMutable(_self), NULL); - } - } - - RB_OBJ_FREEZE(_self); - - return _self; -} - -VALUE Map_EmptyFrozen(const upb_FieldDef* f) { - PBRUBY_ASSERT(upb_FieldDef_IsMap(f)); - VALUE val = ObjectCache_Get(f); - - if (val == Qnil) { - const upb_FieldDef* key_f = map_field_key(f); - const upb_FieldDef* val_f = map_field_value(f); - upb_CType key_type = upb_FieldDef_CType(key_f); - TypeInfo value_type_info = TypeInfo_get(val_f); - val = Map_alloc(cMap); - Map* self; - TypedData_Get_Struct(val, Map, &Map_type, self); - self->arena = Arena_new(); - self->map = - upb_Map_New(Arena_get(self->arena), key_type, value_type_info.type); - self->key_type = key_type; - self->value_type_info = value_type_info; - if (self->value_type_info.type == kUpb_CType_Message) { - const upb_MessageDef* val_m = value_type_info.def.msgdef; - self->value_type_class = Descriptor_DefToClass(val_m); - } - return ObjectCache_TryAdd(f, Map_freeze(val)); - } - PBRUBY_ASSERT(RB_OBJ_FROZEN(val)); - PBRUBY_ASSERT(upb_Map_IsFrozen(ruby_to_Map(val)->map)); - return val; -} - -/* - * call-seq: - * Map.hash => hash_value - * - * Returns a hash value based on this map's contents. - */ -VALUE Map_hash(VALUE _self) { - Map* self = ruby_to_Map(_self); - uint64_t hash = 0; - - size_t iter = kUpb_Map_Begin; - TypeInfo key_info = {self->key_type}; - upb_MessageValue key, val; - while (upb_Map_Next(self->map, &key, &val, &iter)) { - hash += Msgval_GetHash(key, key_info, 0); - hash += Msgval_GetHash(val, self->value_type_info, 0); - } - - return LL2NUM(hash); -} - -/* - * call-seq: - * Map.to_h => {} - * - * Returns a Ruby Hash object containing all the values within the map - */ -VALUE Map_to_h(VALUE _self) { - Map* self = ruby_to_Map(_self); - return Map_CreateHash(self->map, self->key_type, self->value_type_info); -} - -/* - * call-seq: - * Map.inspect => string - * - * Returns a string representing this map's elements. It will be formatted as - * "{key => value, key => value, ...}", with each key and value string - * representation computed by its own #inspect method. - */ -VALUE Map_inspect(VALUE _self) { - Map* self = ruby_to_Map(_self); - - StringBuilder* builder = StringBuilder_New(); - Map_Inspect(builder, self->map, self->key_type, self->value_type_info); - VALUE ret = StringBuilder_ToRubyString(builder); - StringBuilder_Free(builder); - return ret; -} - -/* - * call-seq: - * Map.merge(other_map) => map - * - * Copies key/value pairs from other_map into a copy of this map. If a key is - * set in other_map and this map, the value from other_map overwrites the value - * in the new copy of this map. Returns the new copy of this map with merged - * contents. - */ -static VALUE Map_merge(VALUE _self, VALUE hashmap) { - VALUE dupped = Map_dup(_self); - return Map_merge_into_self(dupped, hashmap); -} - -void Map_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "Map", rb_cObject); - rb_define_alloc_func(klass, Map_alloc); - rb_gc_register_address(&cMap); - cMap = klass; - - rb_define_method(klass, "initialize", Map_init, -1); - rb_define_method(klass, "each", Map_each, 0); - rb_define_method(klass, "keys", Map_keys, 0); - rb_define_method(klass, "values", Map_values, 0); - rb_define_method(klass, "[]", Map_index, 1); - rb_define_method(klass, "[]=", Map_index_set, 2); - rb_define_method(klass, "has_key?", Map_has_key, 1); - rb_define_method(klass, "delete", Map_delete, 1); - rb_define_method(klass, "clear", Map_clear, 0); - rb_define_method(klass, "length", Map_length, 0); - rb_define_method(klass, "size", Map_length, 0); - rb_define_method(klass, "dup", Map_dup, 0); - // Also define #clone so that we don't inherit Object#clone. - rb_define_method(klass, "clone", Map_dup, 0); - rb_define_method(klass, "==", Map_eq, 1); - rb_define_method(klass, "freeze", Map_freeze, 0); - rb_define_method(klass, "frozen?", Map_frozen, 0); - rb_define_method(klass, "hash", Map_hash, 0); - rb_define_method(klass, "to_h", Map_to_h, 0); - rb_define_method(klass, "inspect", Map_inspect, 0); - rb_define_method(klass, "merge", Map_merge, 1); - rb_include_module(klass, rb_mEnumerable); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/map.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/map.h deleted file mode 100644 index 58e8c25e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/map.h +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#ifndef RUBY_PROTOBUF_MAP_H_ -#define RUBY_PROTOBUF_MAP_H_ - -#include "protobuf.h" -#include "ruby-upb.h" - -// Returns a frozen sentinel Ruby wrapper object for an empty upb_Map with the -// key and value types specified by the field. Creates one if it doesn't exist. -VALUE Map_EmptyFrozen(const upb_FieldDef* f); - -// Returns a Ruby wrapper object for the given map, which will be created if -// one does not exist already. -VALUE Map_GetRubyWrapper(const upb_Map *map, upb_CType key_type, - TypeInfo value_type, VALUE arena); - -// Gets the underlying upb_Map for this Ruby map object, which must have -// key/value type that match |field|. If this is not a map or the type doesn't -// match, raises an exception. -const upb_Map *Map_GetUpbMap(VALUE val, const upb_FieldDef *field, - upb_Arena *arena); - -// Implements #inspect for this map by appending its contents to |b|. -void Map_Inspect(StringBuilder *b, const upb_Map *map, upb_CType key_type, - TypeInfo val_type); - -// Returns a new Hash object containing the contents of this Map. -VALUE Map_CreateHash(const upb_Map *map, upb_CType key_type, TypeInfo val_info); - -// Returns a deep copy of this Map object. -VALUE Map_deep_copy(VALUE obj); - -// Ruby class of Google::Protobuf::Map. -extern VALUE cMap; - -// Call at startup to register all types in this module. -void Map_register(VALUE module); - -// Recursively freeze map -VALUE Map_freeze(VALUE _self); - -#endif // RUBY_PROTOBUF_MAP_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/message.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/message.c deleted file mode 100644 index 4146640f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/message.c +++ /dev/null @@ -1,1426 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2014 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#include "message.h" - -#include "convert.h" -#include "defs.h" -#include "map.h" -#include "protobuf.h" -#include "repeated_field.h" -#include "shared_message.h" - -static VALUE cParseError = Qnil; -static VALUE cAbstractMessage = Qnil; -static ID descriptor_instancevar_interned; - -static VALUE initialize_rb_class_with_no_args(VALUE klass) { - return rb_funcall(klass, rb_intern("new"), 0); -} - -VALUE MessageOrEnum_GetDescriptor(VALUE klass) { - return rb_ivar_get(klass, descriptor_instancevar_interned); -} - -// ----------------------------------------------------------------------------- -// Class/module creation from msgdefs and enumdefs, respectively. -// ----------------------------------------------------------------------------- - -typedef struct { - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE arena; - const upb_Message* msg; // Can get as mutable when non-frozen. - const upb_MessageDef* - msgdef; // kept alive by self.class.descriptor reference. -} Message; - -static void Message_mark(void* _self) { - Message* self = (Message*)_self; - rb_gc_mark(self->arena); -} - -static size_t Message_memsize(const void* _self) { return sizeof(Message); } - -static rb_data_type_t Message_type = { - "Google::Protobuf::Message", - {Message_mark, RUBY_DEFAULT_FREE, Message_memsize}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static Message* ruby_to_Message(VALUE msg_rb) { - Message* msg; - TypedData_Get_Struct(msg_rb, Message, &Message_type, msg); - return msg; -} - -static VALUE Message_alloc(VALUE klass) { - VALUE descriptor = rb_ivar_get(klass, descriptor_instancevar_interned); - Message* msg = ALLOC(Message); - VALUE ret; - - msg->msgdef = Descriptor_GetMsgDef(descriptor); - msg->arena = Qnil; - msg->msg = NULL; - - ret = TypedData_Wrap_Struct(klass, &Message_type, msg); - rb_ivar_set(ret, descriptor_instancevar_interned, descriptor); - - return ret; -} - -const upb_Message* Message_Get(VALUE msg_rb, const upb_MessageDef** m) { - Message* msg = ruby_to_Message(msg_rb); - if (m) *m = msg->msgdef; - return msg->msg; -} - -upb_Message* Message_GetMutable(VALUE msg_rb, const upb_MessageDef** m) { - const upb_Message* upb_msg = Message_Get(msg_rb, m); - Protobuf_CheckNotFrozen(msg_rb, upb_Message_IsFrozen(upb_msg)); - return (upb_Message*)upb_msg; -} - -void Message_InitPtr(VALUE self_, const upb_Message* msg, VALUE arena) { - PBRUBY_ASSERT(arena != Qnil); - Message* self = ruby_to_Message(self_); - self->msg = msg; - RB_OBJ_WRITE(self_, &self->arena, arena); - VALUE stored = ObjectCache_TryAdd(msg, self_); - (void)stored; - PBRUBY_ASSERT(stored == self_); -} - -VALUE Message_GetArena(VALUE msg_rb) { - Message* msg = ruby_to_Message(msg_rb); - return msg->arena; -} - -void Message_CheckClass(VALUE klass) { - if (rb_get_alloc_func(klass) != &Message_alloc) { - rb_raise(rb_eArgError, - "Message class was not returned by the DescriptorPool."); - } -} - -VALUE Message_GetRubyWrapper(const upb_Message* msg, const upb_MessageDef* m, - VALUE arena) { - if (msg == NULL) return Qnil; - - VALUE val = ObjectCache_Get(msg); - - if (val == Qnil) { - VALUE klass = Descriptor_DefToClass(m); - val = Message_alloc(klass); - Message_InitPtr(val, msg, arena); - } - return val; -} - -void Message_PrintMessage(StringBuilder* b, const upb_Message* msg, - const upb_MessageDef* m) { - bool first = true; - int n = upb_MessageDef_FieldCount(m); - VALUE klass = Descriptor_DefToClass(m); - StringBuilder_Printf(b, "<%s: ", rb_class2name(klass)); - - for (int i = 0; i < n; i++) { - const upb_FieldDef* field = upb_MessageDef_Field(m, i); - - if (upb_FieldDef_HasPresence(field) && - !upb_Message_HasFieldByDef(msg, field)) { - continue; - } - - if (!first) { - StringBuilder_Printf(b, ", "); - } else { - first = false; - } - - upb_MessageValue msgval = upb_Message_GetFieldByDef(msg, field); - - StringBuilder_Printf(b, "%s: ", upb_FieldDef_Name(field)); - - if (upb_FieldDef_IsMap(field)) { - const upb_MessageDef* entry_m = upb_FieldDef_MessageSubDef(field); - const upb_FieldDef* key_f = upb_MessageDef_FindFieldByNumber(entry_m, 1); - const upb_FieldDef* val_f = upb_MessageDef_FindFieldByNumber(entry_m, 2); - TypeInfo val_info = TypeInfo_get(val_f); - Map_Inspect(b, msgval.map_val, upb_FieldDef_CType(key_f), val_info); - } else if (upb_FieldDef_IsRepeated(field)) { - RepeatedField_Inspect(b, msgval.array_val, TypeInfo_get(field)); - } else { - StringBuilder_PrintMsgval(b, msgval, TypeInfo_get(field)); - } - } - - StringBuilder_Printf(b, ">"); -} - -// Helper functions for #method_missing //////////////////////////////////////// - -enum { - METHOD_UNKNOWN = 0, - METHOD_GETTER = 1, - METHOD_SETTER = 2, - METHOD_CLEAR = 3, - METHOD_PRESENCE = 4, - METHOD_ENUM_GETTER = 5, - METHOD_WRAPPER_GETTER = 6, - METHOD_WRAPPER_SETTER = 7 -}; - -// Check if the field is a well known wrapper type -static bool IsWrapper(const upb_MessageDef* m) { - if (!m) return false; - switch (upb_MessageDef_WellKnownType(m)) { - case kUpb_WellKnown_DoubleValue: - case kUpb_WellKnown_FloatValue: - case kUpb_WellKnown_Int64Value: - case kUpb_WellKnown_UInt64Value: - case kUpb_WellKnown_Int32Value: - case kUpb_WellKnown_UInt32Value: - case kUpb_WellKnown_StringValue: - case kUpb_WellKnown_BytesValue: - case kUpb_WellKnown_BoolValue: - return true; - default: - return false; - } -} - -static bool IsFieldWrapper(const upb_FieldDef* f) { - return IsWrapper(upb_FieldDef_MessageSubDef(f)); -} - -static bool Match(const upb_MessageDef* m, const char* name, - const upb_FieldDef** f, const upb_OneofDef** o, - const char* prefix, const char* suffix) { - size_t sp = strlen(prefix); - size_t ss = strlen(suffix); - size_t sn = strlen(name); - - if (sn <= sp + ss) return false; - - if (memcmp(name, prefix, sp) != 0 || - memcmp(name + sn - ss, suffix, ss) != 0) { - return false; - } - - return upb_MessageDef_FindByNameWithSize(m, name + sp, sn - sp - ss, f, o); -} - -static int extract_method_call(VALUE method_name, Message* self, - const upb_FieldDef** f, const upb_OneofDef** o) { - const upb_MessageDef* m = self->msgdef; - const char* name; - - Check_Type(method_name, T_SYMBOL); - name = rb_id2name(SYM2ID(method_name)); - - if (Match(m, name, f, o, "", "")) return METHOD_GETTER; - if (Match(m, name, f, o, "", "=")) return METHOD_SETTER; - if (Match(m, name, f, o, "clear_", "")) return METHOD_CLEAR; - if (Match(m, name, f, o, "has_", "?") && - (*o || (*f && upb_FieldDef_HasPresence(*f)))) { - return METHOD_PRESENCE; - } - if (Match(m, name, f, o, "", "_as_value") && *f && - !upb_FieldDef_IsRepeated(*f) && IsFieldWrapper(*f)) { - return METHOD_WRAPPER_GETTER; - } - if (Match(m, name, f, o, "", "_as_value=") && *f && - !upb_FieldDef_IsRepeated(*f) && IsFieldWrapper(*f)) { - return METHOD_WRAPPER_SETTER; - } - if (Match(m, name, f, o, "", "_const") && *f && - upb_FieldDef_CType(*f) == kUpb_CType_Enum) { - return METHOD_ENUM_GETTER; - } - - return METHOD_UNKNOWN; -} - -static VALUE Message_oneof_accessor(VALUE _self, const upb_OneofDef* o, - int accessor_type) { - Message* self = ruby_to_Message(_self); - const upb_FieldDef* oneof_field = upb_Message_WhichOneofByDef(self->msg, o); - - switch (accessor_type) { - case METHOD_PRESENCE: - return oneof_field == NULL ? Qfalse : Qtrue; - case METHOD_CLEAR: - if (oneof_field != NULL) { - upb_Message_ClearFieldByDef(Message_GetMutable(_self, NULL), - oneof_field); - } - return Qnil; - case METHOD_GETTER: - return oneof_field == NULL - ? Qnil - : ID2SYM(rb_intern(upb_FieldDef_Name(oneof_field))); - case METHOD_SETTER: - rb_raise(rb_eRuntimeError, "Oneof accessors are read-only."); - } - rb_raise(rb_eRuntimeError, "Invalid access of oneof field."); -} - -static void Message_setfield(upb_Message* msg, const upb_FieldDef* f, VALUE val, - upb_Arena* arena) { - upb_MessageValue msgval; - if (upb_FieldDef_IsMap(f)) { - msgval.map_val = Map_GetUpbMap(val, f, arena); - } else if (upb_FieldDef_IsRepeated(f)) { - msgval.array_val = RepeatedField_GetUpbArray(val, f, arena); - } else { - if (val == Qnil && - (upb_FieldDef_IsSubMessage(f) || upb_FieldDef_RealContainingOneof(f))) { - upb_Message_ClearFieldByDef(msg, f); - return; - } - msgval = - Convert_RubyToUpb(val, upb_FieldDef_Name(f), TypeInfo_get(f), arena); - } - upb_Message_SetFieldByDef(msg, f, msgval, arena); -} - -VALUE Message_getfield_frozen(const upb_Message* msg, const upb_FieldDef* f, - VALUE arena) { - upb_MessageValue msgval = upb_Message_GetFieldByDef(msg, f); - if (upb_FieldDef_IsMap(f)) { - if (msgval.map_val == NULL) { - return Map_EmptyFrozen(f); - } - const upb_FieldDef* key_f = map_field_key(f); - const upb_FieldDef* val_f = map_field_value(f); - upb_CType key_type = upb_FieldDef_CType(key_f); - TypeInfo value_type_info = TypeInfo_get(val_f); - return Map_GetRubyWrapper(msgval.map_val, key_type, value_type_info, arena); - } - if (upb_FieldDef_IsRepeated(f)) { - if (msgval.array_val == NULL) { - return RepeatedField_EmptyFrozen(f); - } - return RepeatedField_GetRubyWrapper(msgval.array_val, TypeInfo_get(f), - arena); - } - VALUE ret; - if (upb_FieldDef_IsSubMessage(f)) { - const upb_MessageDef* m = upb_FieldDef_MessageSubDef(f); - ret = Message_GetRubyWrapper(msgval.msg_val, m, arena); - } else { - ret = Convert_UpbToRuby(msgval, TypeInfo_get(f), Qnil); - } - return ret; -} - -VALUE Message_getfield(VALUE _self, const upb_FieldDef* f) { - Message* self = ruby_to_Message(_self); - if (upb_Message_IsFrozen(self->msg)) { - return Message_getfield_frozen(self->msg, f, self->arena); - } - upb_Message* msg = Message_GetMutable(_self, NULL); - upb_Arena* arena = Arena_get(self->arena); - if (upb_FieldDef_IsMap(f)) { - upb_Map* map = upb_Message_Mutable(msg, f, arena).map; - const upb_FieldDef* key_f = map_field_key(f); - const upb_FieldDef* val_f = map_field_value(f); - upb_CType key_type = upb_FieldDef_CType(key_f); - TypeInfo value_type_info = TypeInfo_get(val_f); - return Map_GetRubyWrapper(map, key_type, value_type_info, self->arena); - } else if (upb_FieldDef_IsRepeated(f)) { - upb_Array* arr = upb_Message_Mutable(msg, f, arena).array; - return RepeatedField_GetRubyWrapper(arr, TypeInfo_get(f), self->arena); - } else if (upb_FieldDef_IsSubMessage(f)) { - if (!upb_Message_HasFieldByDef(msg, f)) return Qnil; - upb_Message* submsg = upb_Message_Mutable(msg, f, arena).msg; - const upb_MessageDef* m = upb_FieldDef_MessageSubDef(f); - return Message_GetRubyWrapper(submsg, m, self->arena); - } else { - upb_MessageValue msgval = upb_Message_GetFieldByDef(msg, f); - return Convert_UpbToRuby(msgval, TypeInfo_get(f), self->arena); - } -} - -static VALUE Message_field_accessor(VALUE _self, const upb_FieldDef* f, - int accessor_type, int argc, VALUE* argv) { - upb_Arena* arena = Arena_get(Message_GetArena(_self)); - - switch (accessor_type) { - case METHOD_SETTER: - Message_setfield(Message_GetMutable(_self, NULL), f, argv[1], arena); - return Qnil; - case METHOD_CLEAR: - upb_Message_ClearFieldByDef(Message_GetMutable(_self, NULL), f); - return Qnil; - case METHOD_PRESENCE: - if (!upb_FieldDef_HasPresence(f)) { - rb_raise(rb_eRuntimeError, "Field does not have presence."); - } - return upb_Message_HasFieldByDef(Message_Get(_self, NULL), f) ? Qtrue - : Qfalse; - case METHOD_WRAPPER_GETTER: { - Message* self = ruby_to_Message(_self); - if (upb_Message_HasFieldByDef(self->msg, f)) { - PBRUBY_ASSERT(upb_FieldDef_IsSubMessage(f) && - !upb_FieldDef_IsRepeated(f)); - upb_MessageValue wrapper = upb_Message_GetFieldByDef(self->msg, f); - const upb_MessageDef* wrapper_m = upb_FieldDef_MessageSubDef(f); - const upb_FieldDef* value_f = - upb_MessageDef_FindFieldByNumber(wrapper_m, 1); - upb_MessageValue value = - upb_Message_GetFieldByDef(wrapper.msg_val, value_f); - return Convert_UpbToRuby(value, TypeInfo_get(value_f), self->arena); - } else { - return Qnil; - } - } - case METHOD_WRAPPER_SETTER: { - upb_Message* msg = Message_GetMutable(_self, NULL); - if (argv[1] == Qnil) { - upb_Message_ClearFieldByDef(msg, f); - } else { - const upb_FieldDef* val_f = - upb_MessageDef_FindFieldByNumber(upb_FieldDef_MessageSubDef(f), 1); - upb_MessageValue msgval = Convert_RubyToUpb( - argv[1], upb_FieldDef_Name(f), TypeInfo_get(val_f), arena); - upb_Message* wrapper = upb_Message_Mutable(msg, f, arena).msg; - upb_Message_SetFieldByDef(wrapper, val_f, msgval, arena); - } - return Qnil; - } - case METHOD_ENUM_GETTER: { - upb_MessageValue msgval = - upb_Message_GetFieldByDef(Message_Get(_self, NULL), f); - - if (upb_FieldDef_IsRepeated(f)) { - // Map repeated fields to a new type with ints - VALUE arr = rb_ary_new(); - size_t i, n = upb_Array_Size(msgval.array_val); - for (i = 0; i < n; i++) { - upb_MessageValue elem = upb_Array_Get(msgval.array_val, i); - rb_ary_push(arr, INT2NUM(elem.int32_val)); - } - return arr; - } else { - return INT2NUM(msgval.int32_val); - } - } - case METHOD_GETTER: - return Message_getfield(_self, f); - default: - rb_raise(rb_eRuntimeError, "Internal error, no such accessor: %d", - accessor_type); - } -} - -/* - * call-seq: - * Message.method_missing(*args) - * - * Provides accessors and setters and methods to clear and check for presence of - * message fields according to their field names. - * - * For any field whose name does not conflict with a built-in method, an - * accessor is provided with the same name as the field, and a setter is - * provided with the name of the field plus the '=' suffix. Thus, given a - * message instance 'msg' with field 'foo', the following code is valid: - * - * msg.foo = 42 - * puts msg.foo - * - * This method also provides read-only accessors for oneofs. If a oneof exists - * with name 'my_oneof', then msg.my_oneof will return a Ruby symbol equal to - * the name of the field in that oneof that is currently set, or nil if none. - * - * It also provides methods of the form 'clear_fieldname' to clear the value - * of the field 'fieldname'. For basic data types, this will set the default - * value of the field. - * - * Additionally, it provides methods of the form 'has_fieldname?', which returns - * true if the field 'fieldname' is set in the message object, else false. For - * 'proto3' syntax, calling this for a basic type field will result in an error. - */ -static VALUE Message_method_missing(int argc, VALUE* argv, VALUE _self) { - Message* self = ruby_to_Message(_self); - const upb_OneofDef* o; - const upb_FieldDef* f; - int accessor_type; - - if (argc < 1) { - rb_raise(rb_eArgError, "Expected method name as first argument."); - } - - accessor_type = extract_method_call(argv[0], self, &f, &o); - - if (accessor_type == METHOD_UNKNOWN) return rb_call_super(argc, argv); - - // Validate argument count. - switch (accessor_type) { - case METHOD_SETTER: - case METHOD_WRAPPER_SETTER: - if (argc != 2) { - rb_raise(rb_eArgError, "Expected 2 arguments, received %d", argc); - } - break; - default: - if (argc != 1) { - rb_raise(rb_eArgError, "Expected 1 argument, received %d", argc); - } - break; - } - - // Dispatch accessor. - if (o != NULL) { - return Message_oneof_accessor(_self, o, accessor_type); - } else { - return Message_field_accessor(_self, f, accessor_type, argc, argv); - } -} - -static VALUE Message_respond_to_missing(int argc, VALUE* argv, VALUE _self) { - Message* self = ruby_to_Message(_self); - const upb_OneofDef* o; - const upb_FieldDef* f; - int accessor_type; - - if (argc < 1) { - rb_raise(rb_eArgError, "Expected method name as first argument."); - } - - accessor_type = extract_method_call(argv[0], self, &f, &o); - - if (accessor_type == METHOD_UNKNOWN) { - return rb_call_super(argc, argv); - } else if (o != NULL) { - return accessor_type == METHOD_SETTER ? Qfalse : Qtrue; - } else { - return Qtrue; - } -} - -void Message_InitFromValue(upb_Message* msg, const upb_MessageDef* m, VALUE val, - upb_Arena* arena); - -typedef struct { - upb_Map* map; - TypeInfo key_type; - TypeInfo val_type; - upb_Arena* arena; -} MapInit; - -static int Map_initialize_kwarg(VALUE key, VALUE val, VALUE _self) { - MapInit* map_init = (MapInit*)_self; - upb_MessageValue k, v; - k = Convert_RubyToUpb(key, "", map_init->key_type, NULL); - - if (map_init->val_type.type == kUpb_CType_Message && TYPE(val) == T_HASH) { - const upb_MiniTable* t = - upb_MessageDef_MiniTable(map_init->val_type.def.msgdef); - upb_Message* msg = upb_Message_New(t, map_init->arena); - Message_InitFromValue(msg, map_init->val_type.def.msgdef, val, - map_init->arena); - v.msg_val = msg; - } else { - v = Convert_RubyToUpb(val, "", map_init->val_type, map_init->arena); - } - upb_Map_Set(map_init->map, k, v, map_init->arena); - return ST_CONTINUE; -} - -static void Map_InitFromValue(upb_Map* map, const upb_FieldDef* f, VALUE val, - upb_Arena* arena) { - const upb_MessageDef* entry_m = upb_FieldDef_MessageSubDef(f); - const upb_FieldDef* key_f = upb_MessageDef_FindFieldByNumber(entry_m, 1); - const upb_FieldDef* val_f = upb_MessageDef_FindFieldByNumber(entry_m, 2); - if (TYPE(val) != T_HASH) { - rb_raise(rb_eArgError, - "Expected Hash object as initializer value for map field '%s' " - "(given %s).", - upb_FieldDef_Name(f), rb_class2name(CLASS_OF(val))); - } - MapInit map_init = {map, TypeInfo_get(key_f), TypeInfo_get(val_f), arena}; - rb_hash_foreach(val, Map_initialize_kwarg, (VALUE)&map_init); -} - -static upb_MessageValue MessageValue_FromValue(VALUE val, TypeInfo info, - upb_Arena* arena) { - if (info.type == kUpb_CType_Message) { - upb_MessageValue msgval; - const upb_MiniTable* t = upb_MessageDef_MiniTable(info.def.msgdef); - upb_Message* msg = upb_Message_New(t, arena); - Message_InitFromValue(msg, info.def.msgdef, val, arena); - msgval.msg_val = msg; - return msgval; - } else { - return Convert_RubyToUpb(val, "", info, arena); - } -} - -static void RepeatedField_InitFromValue(upb_Array* arr, const upb_FieldDef* f, - VALUE val, upb_Arena* arena) { - TypeInfo type_info = TypeInfo_get(f); - - if (TYPE(val) != T_ARRAY) { - rb_raise(rb_eArgError, - "Expected array as initializer value for repeated field '%s' " - "(given %s).", - upb_FieldDef_Name(f), rb_class2name(CLASS_OF(val))); - } - - for (int i = 0; i < RARRAY_LEN(val); i++) { - VALUE entry = rb_ary_entry(val, i); - upb_MessageValue msgval; - if (upb_FieldDef_IsSubMessage(f) && TYPE(entry) == T_HASH) { - msgval = MessageValue_FromValue(entry, type_info, arena); - } else { - msgval = Convert_RubyToUpb(entry, upb_FieldDef_Name(f), type_info, arena); - } - upb_Array_Append(arr, msgval, arena); - } -} - -static void Message_InitFieldFromValue(upb_Message* msg, const upb_FieldDef* f, - VALUE val, upb_Arena* arena) { - if (TYPE(val) == T_NIL) return; - - if (upb_FieldDef_IsMap(f)) { - upb_Map* map = upb_Message_Mutable(msg, f, arena).map; - Map_InitFromValue(map, f, val, arena); - } else if (upb_FieldDef_IsRepeated(f)) { - upb_Array* arr = upb_Message_Mutable(msg, f, arena).array; - RepeatedField_InitFromValue(arr, f, val, arena); - } else if (upb_FieldDef_IsSubMessage(f)) { - if (TYPE(val) == T_HASH) { - upb_Message* submsg = upb_Message_Mutable(msg, f, arena).msg; - Message_InitFromValue(submsg, upb_FieldDef_MessageSubDef(f), val, arena); - } else { - Message_setfield(msg, f, val, arena); - } - } else { - upb_MessageValue msgval = - Convert_RubyToUpb(val, upb_FieldDef_Name(f), TypeInfo_get(f), arena); - upb_Message_SetFieldByDef(msg, f, msgval, arena); - } -} - -typedef struct { - upb_Message* msg; - const upb_MessageDef* msgdef; - upb_Arena* arena; -} MsgInit; - -static int Message_initialize_kwarg(VALUE key, VALUE val, VALUE _self) { - MsgInit* msg_init = (MsgInit*)_self; - const char* name; - - if (TYPE(key) == T_STRING) { - name = RSTRING_PTR(key); - } else if (TYPE(key) == T_SYMBOL) { - name = RSTRING_PTR(rb_id2str(SYM2ID(key))); - } else { - rb_raise(rb_eArgError, - "Expected string or symbols as hash keys when initializing proto " - "from hash."); - } - - const upb_FieldDef* f = - upb_MessageDef_FindFieldByName(msg_init->msgdef, name); - - if (f == NULL) { - rb_raise(rb_eArgError, - "Unknown field name '%s' in initialization map entry.", name); - } - - Message_InitFieldFromValue(msg_init->msg, f, val, msg_init->arena); - return ST_CONTINUE; -} - -void Message_InitFromValue(upb_Message* msg, const upb_MessageDef* m, VALUE val, - upb_Arena* arena) { - MsgInit msg_init = {msg, m, arena}; - if (TYPE(val) == T_HASH) { - rb_hash_foreach(val, Message_initialize_kwarg, (VALUE)&msg_init); - } else { - rb_raise(rb_eArgError, "Expected hash arguments or message, not %s", - rb_class2name(CLASS_OF(val))); - } -} - -/* - * call-seq: - * Message.new(kwargs) => new_message - * - * Creates a new instance of the given message class. Keyword arguments may be - * provided with keywords corresponding to field names. - * - * Note that no literal Message class exists. Only concrete classes per message - * type exist, as provided by the #msgclass method on Descriptors after they - * have been added to a pool. The method definitions described here on the - * Message class are provided on each concrete message class. - */ -static VALUE Message_initialize(int argc, VALUE* argv, VALUE _self) { - Message* self = ruby_to_Message(_self); - VALUE arena_rb = Arena_new(); - upb_Arena* arena = Arena_get(arena_rb); - const upb_MiniTable* t = upb_MessageDef_MiniTable(self->msgdef); - upb_Message* msg = upb_Message_New(t, arena); - - Message_InitPtr(_self, msg, arena_rb); - - if (argc == 0) { - return Qnil; - } - if (argc != 1) { - rb_raise(rb_eArgError, "Expected 0 or 1 arguments."); - } - Message_InitFromValue((upb_Message*)self->msg, self->msgdef, argv[0], arena); - return Qnil; -} - -/* - * call-seq: - * Message.dup => new_message - * - * Performs a shallow copy of this message and returns the new copy. - */ -static VALUE Message_dup(VALUE _self) { - Message* self = ruby_to_Message(_self); - VALUE new_msg = rb_class_new_instance(0, NULL, CLASS_OF(_self)); - Message* new_msg_self = ruby_to_Message(new_msg); - const upb_MiniTable* m = upb_MessageDef_MiniTable(self->msgdef); - upb_Message_ShallowCopy((upb_Message*)new_msg_self->msg, self->msg, m); - Arena_fuse(self->arena, Arena_get(new_msg_self->arena)); - return new_msg; -} - -/* - * call-seq: - * Message.==(other) => boolean - * - * Performs a deep comparison of this message with another. Messages are equal - * if they have the same type and if each field is equal according to the :== - * method's semantics (a more efficient comparison may actually be done if the - * field is of a primitive type). - */ -static VALUE Message_eq(VALUE _self, VALUE _other) { - if (CLASS_OF(_self) != CLASS_OF(_other)) return Qfalse; - - Message* self = ruby_to_Message(_self); - Message* other = ruby_to_Message(_other); - assert(self->msgdef == other->msgdef); - - const upb_MiniTable* m = upb_MessageDef_MiniTable(self->msgdef); - const int options = 0; - return upb_Message_IsEqual(self->msg, other->msg, m, options) ? Qtrue - : Qfalse; -} - -uint64_t Message_Hash(const upb_Message* msg, const upb_MessageDef* m, - uint64_t seed) { - upb_Status status; - upb_Status_Clear(&status); - uint64_t return_value = shared_Message_Hash(msg, m, seed, &status); - if (upb_Status_IsOk(&status)) { - return return_value; - } else { - rb_raise(cParseError, "Message_Hash(): %s", - upb_Status_ErrorMessage(&status)); - } -} - -/* - * call-seq: - * Message.hash => hash_value - * - * Returns a hash value that represents this message's field values. - */ -static VALUE Message_hash(VALUE _self) { - Message* self = ruby_to_Message(_self); - uint64_t hash_value = Message_Hash(self->msg, self->msgdef, 0); - // RUBY_FIXNUM_MAX should be one less than a power of 2. - assert((RUBY_FIXNUM_MAX & (RUBY_FIXNUM_MAX + 1)) == 0); - return INT2FIX(hash_value & RUBY_FIXNUM_MAX); -} - -/* - * call-seq: - * Message.inspect => string - * - * Returns a human-readable string representing this message. It will be - * formatted as "". Each - * field's value is represented according to its own #inspect method. - */ -static VALUE Message_inspect(VALUE _self) { - Message* self = ruby_to_Message(_self); - - StringBuilder* builder = StringBuilder_New(); - Message_PrintMessage(builder, self->msg, self->msgdef); - VALUE ret = StringBuilder_ToRubyString(builder); - StringBuilder_Free(builder); - return ret; -} - -// Support functions for Message_to_h ////////////////////////////////////////// - -static VALUE RepeatedField_CreateArray(const upb_Array* arr, - TypeInfo type_info) { - int size = arr ? upb_Array_Size(arr) : 0; - VALUE ary = rb_ary_new2(size); - - for (int i = 0; i < size; i++) { - upb_MessageValue msgval = upb_Array_Get(arr, i); - VALUE val = Scalar_CreateHash(msgval, type_info); - rb_ary_push(ary, val); - } - - return ary; -} - -static VALUE Message_CreateHash(const upb_Message* msg, - const upb_MessageDef* m) { - if (!msg) return Qnil; - - VALUE hash = rb_hash_new(); - size_t iter = kUpb_Message_Begin; - const upb_DefPool* pool = upb_FileDef_Pool(upb_MessageDef_File(m)); - const upb_FieldDef* field; - upb_MessageValue val; - - while (upb_Message_Next(msg, m, pool, &field, &val, &iter)) { - if (upb_FieldDef_IsExtension(field)) { - // TODO: allow extensions once we have decided what naming scheme the - // symbol should use. eg. :"[pkg.ext]" - continue; - } - - TypeInfo type_info = TypeInfo_get(field); - VALUE msg_value; - - if (upb_FieldDef_IsMap(field)) { - const upb_MessageDef* entry_m = upb_FieldDef_MessageSubDef(field); - const upb_FieldDef* key_f = upb_MessageDef_FindFieldByNumber(entry_m, 1); - const upb_FieldDef* val_f = upb_MessageDef_FindFieldByNumber(entry_m, 2); - upb_CType key_type = upb_FieldDef_CType(key_f); - msg_value = Map_CreateHash(val.map_val, key_type, TypeInfo_get(val_f)); - } else if (upb_FieldDef_IsRepeated(field)) { - msg_value = RepeatedField_CreateArray(val.array_val, type_info); - } else { - msg_value = Scalar_CreateHash(val, type_info); - } - - VALUE msg_key = ID2SYM(rb_intern(upb_FieldDef_Name(field))); - rb_hash_aset(hash, msg_key, msg_value); - } - - return hash; -} - -VALUE Scalar_CreateHash(upb_MessageValue msgval, TypeInfo type_info) { - if (type_info.type == kUpb_CType_Message) { - return Message_CreateHash(msgval.msg_val, type_info.def.msgdef); - } else { - return Convert_UpbToRuby(msgval, type_info, Qnil); - } -} - -/* - * call-seq: - * Message.to_h => {} - * - * Returns the message as a Ruby Hash object, with keys as symbols. - */ -static VALUE Message_to_h(VALUE _self) { - Message* self = ruby_to_Message(_self); - return Message_CreateHash(self->msg, self->msgdef); -} - -/* - * call-seq: - * Message.frozen? => bool - * - * Returns true if the message is frozen in either Ruby or the underlying - * representation. Freezes the Ruby message object if it is not already frozen - * in Ruby but it is frozen in the underlying representation. - */ -VALUE Message_frozen(VALUE _self) { - Message* self = ruby_to_Message(_self); - if (!upb_Message_IsFrozen(self->msg)) { - PBRUBY_ASSERT(!RB_OBJ_FROZEN(_self)); - return Qfalse; - } - - // Lazily freeze the Ruby wrapper. - if (!RB_OBJ_FROZEN(_self)) RB_OBJ_FREEZE(_self); - return Qtrue; -} - -/* - * call-seq: - * Message.freeze => self - * - * Freezes the message object. We have to intercept this so we can freeze the - * underlying representation, not just the Ruby wrapper. - */ -VALUE Message_freeze(VALUE _self) { - Message* self = ruby_to_Message(_self); - if (RB_OBJ_FROZEN(_self)) { - PBRUBY_ASSERT(upb_Message_IsFrozen(self->msg)); - return _self; - } - if (!upb_Message_IsFrozen(self->msg)) { - upb_Message_Freeze(Message_GetMutable(_self, NULL), - upb_MessageDef_MiniTable(self->msgdef)); - } - RB_OBJ_FREEZE(_self); - return _self; -} - -/* - * call-seq: - * Message.[](index) => value - * - * Accesses a field's value by field name. The provided field name should be a - * string. - */ -static VALUE Message_index(VALUE _self, VALUE field_name) { - Message* self = ruby_to_Message(_self); - const upb_FieldDef* field; - - Check_Type(field_name, T_STRING); - field = upb_MessageDef_FindFieldByName(self->msgdef, RSTRING_PTR(field_name)); - - if (field == NULL) { - return Qnil; - } - - return Message_getfield(_self, field); -} - -/* - * call-seq: - * Message.[]=(index, value) - * - * Sets a field's value by field name. The provided field name should be a - * string. - */ -static VALUE Message_index_set(VALUE _self, VALUE field_name, VALUE value) { - Message* self = ruby_to_Message(_self); - const upb_FieldDef* f; - upb_MessageValue val; - upb_Arena* arena = Arena_get(self->arena); - - Check_Type(field_name, T_STRING); - f = upb_MessageDef_FindFieldByName(self->msgdef, RSTRING_PTR(field_name)); - - if (f == NULL) { - rb_raise(rb_eArgError, "Unknown field: %s", RSTRING_PTR(field_name)); - } - - val = Convert_RubyToUpb(value, upb_FieldDef_Name(f), TypeInfo_get(f), arena); - upb_Message_SetFieldByDef(Message_GetMutable(_self, NULL), f, val, arena); - - return Qnil; -} - -/* - * call-seq: - * MessageClass.decode(data, options) => message - * - * Decodes the given data (as a string containing bytes in protocol buffers wire - * format) under the interpretation given by this message class's definition - * and returns a message object with the corresponding field values. - * @param options [Hash] options for the decoder - * recursion_limit: set to maximum decoding depth for message (default is 64) - */ -static VALUE Message_decode(int argc, VALUE* argv, VALUE klass) { - VALUE data = argv[0]; - int options = 0; - - if (argc < 1 || argc > 2) { - rb_raise(rb_eArgError, "Expected 1 or 2 arguments."); - } - - if (argc == 2) { - VALUE hash_args = argv[1]; - if (TYPE(hash_args) != T_HASH) { - rb_raise(rb_eArgError, "Expected hash arguments."); - } - - VALUE depth = - rb_hash_lookup(hash_args, ID2SYM(rb_intern("recursion_limit"))); - - if (depth != Qnil && TYPE(depth) == T_FIXNUM) { - options |= upb_DecodeOptions_MaxDepth(FIX2INT(depth)); - } - } - - if (TYPE(data) != T_STRING) { - rb_raise(rb_eArgError, "Expected string for binary protobuf data."); - } - - return Message_decode_bytes(RSTRING_LEN(data), RSTRING_PTR(data), options, - klass, /*freeze*/ false); -} - -VALUE Message_decode_bytes(int size, const char* bytes, int options, - VALUE klass, bool freeze) { - VALUE msg_rb = initialize_rb_class_with_no_args(klass); - Message* msg = ruby_to_Message(msg_rb); - - const upb_FileDef* file = upb_MessageDef_File(msg->msgdef); - const upb_ExtensionRegistry* extreg = - upb_DefPool_ExtensionRegistry(upb_FileDef_Pool(file)); - upb_DecodeStatus status = upb_Decode(bytes, size, (upb_Message*)msg->msg, - upb_MessageDef_MiniTable(msg->msgdef), - extreg, options, Arena_get(msg->arena)); - if (status != kUpb_DecodeStatus_Ok) { - rb_raise(cParseError, "Error occurred during parsing"); - } - if (freeze) { - Message_freeze(msg_rb); - } - return msg_rb; -} - -/* - * call-seq: - * MessageClass.decode_json(data, options = {}) => message - * - * Decodes the given data (as a string containing bytes in protocol buffers wire - * format) under the interpretration given by this message class's definition - * and returns a message object with the corresponding field values. - * - * @param options [Hash] options for the decoder - * ignore_unknown_fields: set true to ignore unknown fields (default is to - * raise an error) - */ -static VALUE Message_decode_json(int argc, VALUE* argv, VALUE klass) { - VALUE data = argv[0]; - int options = 0; - upb_Status status; - - if (argc < 1 || argc > 2) { - rb_raise(rb_eArgError, "Expected 1 or 2 arguments."); - } - - if (argc == 2) { - VALUE hash_args = argv[1]; - if (TYPE(hash_args) != T_HASH) { - rb_raise(rb_eArgError, "Expected hash arguments."); - } - - if (RTEST(rb_hash_lookup2( - hash_args, ID2SYM(rb_intern("ignore_unknown_fields")), Qfalse))) { - options |= upb_JsonDecode_IgnoreUnknown; - } - } - - if (TYPE(data) != T_STRING) { - rb_raise(rb_eArgError, "Expected string for JSON data."); - } - - // TODO: Check and respect string encoding. If not UTF-8, we need to - // convert, because string handlers pass data directly to message string - // fields. - - VALUE msg_rb = initialize_rb_class_with_no_args(klass); - Message* msg = ruby_to_Message(msg_rb); - - // We don't allow users to decode a wrapper type directly. - if (IsWrapper(msg->msgdef)) { - rb_raise(rb_eRuntimeError, "Cannot parse a wrapper directly."); - } - - upb_Status_Clear(&status); - const upb_DefPool* pool = upb_FileDef_Pool(upb_MessageDef_File(msg->msgdef)); - - int result = upb_JsonDecodeDetectingNonconformance( - RSTRING_PTR(data), RSTRING_LEN(data), (upb_Message*)msg->msg, - msg->msgdef, pool, options, Arena_get(msg->arena), &status); - - switch (result) { - case kUpb_JsonDecodeResult_Ok: - break; - case kUpb_JsonDecodeResult_Error: - rb_raise(cParseError, "Error occurred during parsing: %s", - upb_Status_ErrorMessage(&status)); - break; - } - - return msg_rb; -} - -/* - * call-seq: - * MessageClass.encode(msg, options) => bytes - * - * Encodes the given message object to its serialized form in protocol buffers - * wire format. - * @param options [Hash] options for the encoder - * recursion_limit: set to maximum encoding depth for message (default is 64) - */ -static VALUE Message_encode(int argc, VALUE* argv, VALUE klass) { - Message* msg = ruby_to_Message(argv[0]); - int options = 0; - char* data; - size_t size; - - if (CLASS_OF(argv[0]) != klass) { - rb_raise(rb_eArgError, "Message of wrong type."); - } - - if (argc < 1 || argc > 2) { - rb_raise(rb_eArgError, "Expected 1 or 2 arguments."); - } - - if (argc == 2) { - VALUE hash_args = argv[1]; - if (TYPE(hash_args) != T_HASH) { - rb_raise(rb_eArgError, "Expected hash arguments."); - } - VALUE depth = - rb_hash_lookup(hash_args, ID2SYM(rb_intern("recursion_limit"))); - - if (depth != Qnil && TYPE(depth) == T_FIXNUM) { - options |= upb_DecodeOptions_MaxDepth(FIX2INT(depth)); - } - } - - upb_Arena* arena = upb_Arena_New(); - - upb_EncodeStatus status = - upb_Encode(msg->msg, upb_MessageDef_MiniTable(msg->msgdef), options, - arena, &data, &size); - - if (status == kUpb_EncodeStatus_Ok) { - VALUE ret = rb_str_new(data, size); - rb_enc_associate(ret, rb_ascii8bit_encoding()); - upb_Arena_Free(arena); - return ret; - } else { - upb_Arena_Free(arena); - rb_raise(rb_eRuntimeError, "Exceeded maximum depth (possibly cycle)"); - } -} - -/* - * call-seq: - * MessageClass.encode_json(msg, options = {}) => json_string - * - * Encodes the given message object into its serialized JSON representation. - * @param options [Hash] options for the decoder - * preserve_proto_fieldnames: set true to use original fieldnames (default is - * to camelCase) emit_defaults: set true to emit 0/false values (default is to - * omit them) - */ -static VALUE Message_encode_json(int argc, VALUE* argv, VALUE klass) { - Message* msg = ruby_to_Message(argv[0]); - int options = 0; - char buf[1024]; - size_t size; - upb_Status status; - - if (argc < 1 || argc > 2) { - rb_raise(rb_eArgError, "Expected 1 or 2 arguments."); - } - - if (argc == 2) { - VALUE hash_args = argv[1]; - if (TYPE(hash_args) != T_HASH) { - if (RTEST(rb_funcall(hash_args, rb_intern("respond_to?"), 1, - rb_str_new2("to_h")))) { - hash_args = rb_funcall(hash_args, rb_intern("to_h"), 0); - } else { - rb_raise(rb_eArgError, "Expected hash arguments."); - } - } - - if (RTEST(rb_hash_lookup2(hash_args, - ID2SYM(rb_intern("preserve_proto_fieldnames")), - Qfalse))) { - options |= upb_JsonEncode_UseProtoNames; - } - - if (RTEST(rb_hash_lookup2(hash_args, ID2SYM(rb_intern("emit_defaults")), - Qfalse))) { - options |= upb_JsonEncode_EmitDefaults; - } - - if (RTEST(rb_hash_lookup2(hash_args, - ID2SYM(rb_intern("format_enums_as_integers")), - Qfalse))) { - options |= upb_JsonEncode_FormatEnumsAsIntegers; - } - } - - upb_Status_Clear(&status); - const upb_DefPool* pool = upb_FileDef_Pool(upb_MessageDef_File(msg->msgdef)); - size = upb_JsonEncode(msg->msg, msg->msgdef, pool, options, buf, sizeof(buf), - &status); - - if (!upb_Status_IsOk(&status)) { - rb_raise(cParseError, "Error occurred during encoding: %s", - upb_Status_ErrorMessage(&status)); - } - - VALUE ret; - if (size >= sizeof(buf)) { - char* buf2 = malloc(size + 1); - upb_JsonEncode(msg->msg, msg->msgdef, pool, options, buf2, size + 1, - &status); - ret = rb_str_new(buf2, size); - free(buf2); - } else { - ret = rb_str_new(buf, size); - } - - rb_enc_associate(ret, rb_utf8_encoding()); - return ret; -} - -/* - * call-seq: - * Message.descriptor => descriptor - * - * Class method that returns the Descriptor instance corresponding to this - * message class's type. - */ -static VALUE Message_descriptor(VALUE klass) { - return rb_ivar_get(klass, descriptor_instancevar_interned); -} - -VALUE build_class_from_descriptor(VALUE descriptor) { - const char* name; - VALUE klass; - - name = upb_MessageDef_FullName(Descriptor_GetMsgDef(descriptor)); - if (name == NULL) { - rb_raise(rb_eRuntimeError, "Descriptor does not have assigned name."); - } - - klass = rb_define_class_id( - // Docs say this parameter is ignored. User will assign return value to - // their own toplevel constant class name. - rb_intern("Message"), cAbstractMessage); - rb_ivar_set(klass, descriptor_instancevar_interned, descriptor); - return klass; -} - -/* - * call-seq: - * Enum.lookup(number) => name - * - * This module method, provided on each generated enum module, looks up an enum - * value by number and returns its name as a Ruby symbol, or nil if not found. - */ -static VALUE enum_lookup(VALUE self, VALUE number) { - int32_t num = NUM2INT(number); - VALUE desc = rb_ivar_get(self, descriptor_instancevar_interned); - const upb_EnumDef* e = EnumDescriptor_GetEnumDef(desc); - const upb_EnumValueDef* ev = upb_EnumDef_FindValueByNumber(e, num); - if (ev) { - return ID2SYM(rb_intern(upb_EnumValueDef_Name(ev))); - } else { - return Qnil; - } -} - -/* - * call-seq: - * Enum.resolve(name) => number - * - * This module method, provided on each generated enum module, looks up an enum - * value by name (as a Ruby symbol) and returns its name, or nil if not found. - */ -static VALUE enum_resolve(VALUE self, VALUE sym) { - const char* name = rb_id2name(SYM2ID(sym)); - VALUE desc = rb_ivar_get(self, descriptor_instancevar_interned); - const upb_EnumDef* e = EnumDescriptor_GetEnumDef(desc); - const upb_EnumValueDef* ev = upb_EnumDef_FindValueByName(e, name); - if (ev) { - return INT2NUM(upb_EnumValueDef_Number(ev)); - } else { - return Qnil; - } -} - -/* - * call-seq: - * Enum.descriptor - * - * This module method, provided on each generated enum module, returns the - * EnumDescriptor corresponding to this enum type. - */ -static VALUE enum_descriptor(VALUE self) { - return rb_ivar_get(self, descriptor_instancevar_interned); -} - -VALUE build_module_from_enumdesc(VALUE _enumdesc) { - const upb_EnumDef* e = EnumDescriptor_GetEnumDef(_enumdesc); - VALUE mod = rb_define_module_id(rb_intern(upb_EnumDef_FullName(e))); - - int n = upb_EnumDef_ValueCount(e); - for (int i = 0; i < n; i++) { - const upb_EnumValueDef* ev = upb_EnumDef_Value(e, i); - upb_Arena* arena = upb_Arena_New(); - const char* src_name = upb_EnumValueDef_Name(ev); - char* name = upb_strdup2(src_name, strlen(src_name), arena); - int32_t value = upb_EnumValueDef_Number(ev); - if (name[0] < 'A' || name[0] > 'Z') { - if (name[0] >= 'a' && name[0] <= 'z') { - name[0] -= 32; // auto capitalize - } else { - rb_warn( - "Enum value '%s' does not start with an uppercase letter " - "as is required for Ruby constants.", - name); - } - } - rb_define_const(mod, name, INT2NUM(value)); - upb_Arena_Free(arena); - } - - rb_define_singleton_method(mod, "lookup", enum_lookup, 1); - rb_define_singleton_method(mod, "resolve", enum_resolve, 1); - rb_define_singleton_method(mod, "descriptor", enum_descriptor, 0); - rb_ivar_set(mod, descriptor_instancevar_interned, _enumdesc); - - return mod; -} - -// Internal to the library; used by Google::Protobuf.deep_copy. -upb_Message* Message_deep_copy(const upb_Message* msg, const upb_MessageDef* m, - upb_Arena* arena) { - // Serialize and parse. - upb_Arena* tmp_arena = upb_Arena_New(); - const upb_MiniTable* layout = upb_MessageDef_MiniTable(m); - size_t size; - - upb_Message* new_msg = upb_Message_New(layout, arena); - char* data; - - const upb_FileDef* file = upb_MessageDef_File(m); - const upb_ExtensionRegistry* extreg = - upb_DefPool_ExtensionRegistry(upb_FileDef_Pool(file)); - if (upb_Encode(msg, layout, 0, tmp_arena, &data, &size) != - kUpb_EncodeStatus_Ok || - upb_Decode(data, size, new_msg, layout, extreg, 0, arena) != - kUpb_DecodeStatus_Ok) { - upb_Arena_Free(tmp_arena); - rb_raise(cParseError, "Error occurred copying proto"); - } - - upb_Arena_Free(tmp_arena); - return new_msg; -} - -const upb_Message* Message_GetUpbMessage(VALUE value, const upb_MessageDef* m, - const char* name, upb_Arena* arena) { - if (value == Qnil) { - rb_raise(cTypeError, "nil message not allowed here."); - } - - VALUE klass = CLASS_OF(value); - VALUE desc_rb = rb_ivar_get(klass, descriptor_instancevar_interned); - const upb_MessageDef* val_m = - desc_rb == Qnil ? NULL : Descriptor_GetMsgDef(desc_rb); - - if (val_m != m) { - // Check for possible implicit conversions - // TODO: hash conversion? - - switch (upb_MessageDef_WellKnownType(m)) { - case kUpb_WellKnown_Timestamp: { - // Time -> Google::Protobuf::Timestamp - const upb_MiniTable* t = upb_MessageDef_MiniTable(m); - upb_Message* msg = upb_Message_New(t, arena); - upb_MessageValue sec, nsec; - struct timespec time; - const upb_FieldDef* sec_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_FieldDef* nsec_f = upb_MessageDef_FindFieldByNumber(m, 2); - - if (!rb_obj_is_kind_of(value, rb_cTime)) goto badtype; - - time = rb_time_timespec(value); - sec.int64_val = time.tv_sec; - nsec.int32_val = time.tv_nsec; - upb_Message_SetFieldByDef(msg, sec_f, sec, arena); - upb_Message_SetFieldByDef(msg, nsec_f, nsec, arena); - return msg; - } - case kUpb_WellKnown_Duration: { - // Numeric -> Google::Protobuf::Duration - const upb_MiniTable* t = upb_MessageDef_MiniTable(m); - upb_Message* msg = upb_Message_New(t, arena); - upb_MessageValue sec, nsec; - const upb_FieldDef* sec_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_FieldDef* nsec_f = upb_MessageDef_FindFieldByNumber(m, 2); - - if (!rb_obj_is_kind_of(value, rb_cNumeric)) goto badtype; - - sec.int64_val = NUM2LL(value); - nsec.int32_val = round((NUM2DBL(value) - NUM2LL(value)) * 1000000000); - upb_Message_SetFieldByDef(msg, sec_f, sec, arena); - upb_Message_SetFieldByDef(msg, nsec_f, nsec, arena); - return msg; - } - default: - badtype: - rb_raise(cTypeError, - "Invalid type %s to assign to submessage field '%s'.", - rb_class2name(CLASS_OF(value)), name); - } - } - - Message* self = ruby_to_Message(value); - Arena_fuse(self->arena, arena); - - return self->msg; -} - -static void Message_define_class(VALUE klass) { - rb_define_alloc_func(klass, Message_alloc); - - rb_require("google/protobuf/message_exts"); - rb_define_method(klass, "method_missing", Message_method_missing, -1); - rb_define_method(klass, "respond_to_missing?", Message_respond_to_missing, - -1); - rb_define_method(klass, "initialize", Message_initialize, -1); - rb_define_method(klass, "dup", Message_dup, 0); - // Also define #clone so that we don't inherit Object#clone. - rb_define_method(klass, "clone", Message_dup, 0); - rb_define_method(klass, "==", Message_eq, 1); - rb_define_method(klass, "eql?", Message_eq, 1); - rb_define_method(klass, "freeze", Message_freeze, 0); - rb_define_method(klass, "frozen?", Message_frozen, 0); - rb_define_method(klass, "hash", Message_hash, 0); - rb_define_method(klass, "to_h", Message_to_h, 0); - rb_define_method(klass, "inspect", Message_inspect, 0); - rb_define_method(klass, "to_s", Message_inspect, 0); - rb_define_method(klass, "[]", Message_index, 1); - rb_define_method(klass, "[]=", Message_index_set, 2); - rb_define_singleton_method(klass, "decode", Message_decode, -1); - rb_define_singleton_method(klass, "encode", Message_encode, -1); - rb_define_singleton_method(klass, "decode_json", Message_decode_json, -1); - rb_define_singleton_method(klass, "encode_json", Message_encode_json, -1); - rb_define_singleton_method(klass, "descriptor", Message_descriptor, 0); -} - -void Message_register(VALUE protobuf) { - cParseError = rb_const_get(protobuf, rb_intern("ParseError")); - cAbstractMessage = - rb_define_class_under(protobuf, "AbstractMessage", rb_cObject); - Message_define_class(cAbstractMessage); - rb_gc_register_address(&cAbstractMessage); - - // Ruby-interned string: "descriptor". We use this identifier to store an - // instance variable on message classes we create in order to link them back - // to their descriptors. - descriptor_instancevar_interned = rb_intern("@descriptor"); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/message.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/message.h deleted file mode 100644 index 6c8b9a6e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/message.h +++ /dev/null @@ -1,82 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#ifndef RUBY_PROTOBUF_MESSAGE_H_ -#define RUBY_PROTOBUF_MESSAGE_H_ - -#include "protobuf.h" -#include "ruby-upb.h" - -// Gets the underlying upb_Message* and upb_MessageDef for the given Ruby -// message wrapper. Requires that |value| is indeed a message object. -const upb_Message* Message_Get(VALUE value, const upb_MessageDef** m); - -// Like Message_Get(), but checks that the object is not frozen and returns a -// mutable pointer. -upb_Message* Message_GetMutable(VALUE value, const upb_MessageDef** m); - -// Returns the Arena object for this message. -VALUE Message_GetArena(VALUE value); - -// Converts |value| into a upb_Message value of the expected upb_MessageDef -// type, raising an error if this is not possible. Used when assigning |value| -// to a field of another message, which means the message must be of a -// particular type. -// -// This will perform automatic conversions in some cases (for example, Time -> -// Google::Protobuf::Timestamp). If any new message is created, it will be -// created on |arena|, and any existing message will have its arena fused with -// |arena|. -const upb_Message* Message_GetUpbMessage(VALUE value, const upb_MessageDef* m, - const char* name, upb_Arena* arena); - -// Gets or constructs a Ruby wrapper object for the given message. The wrapper -// object will reference |arena| and ensure that it outlives this object. -VALUE Message_GetRubyWrapper(const upb_Message* msg, const upb_MessageDef* m, - VALUE arena); - -// Gets the given field from this message. -VALUE Message_getfield(VALUE _self, const upb_FieldDef* f); - -// Implements #inspect for this message, printing the text to |b|. -void Message_PrintMessage(StringBuilder* b, const upb_Message* msg, - const upb_MessageDef* m); - -// Returns a hash value for the given message. -uint64_t Message_Hash(const upb_Message* msg, const upb_MessageDef* m, - uint64_t seed); - -// Returns a deep copy of the given message. -upb_Message* Message_deep_copy(const upb_Message* msg, const upb_MessageDef* m, - upb_Arena* arena); - -// Checks that this Ruby object is a message, and raises an exception if not. -void Message_CheckClass(VALUE klass); - -// Returns a new Hash object containing the contents of this message. -VALUE Scalar_CreateHash(upb_MessageValue val, TypeInfo type_info); - -// Creates a message class or enum module for this descriptor, respectively. -VALUE build_class_from_descriptor(VALUE descriptor); -VALUE build_module_from_enumdesc(VALUE _enumdesc); - -// Returns the Descriptor/EnumDescriptor for the given message class or enum -// module, respectively. Returns nil if this is not a message class or enum -// module. -VALUE MessageOrEnum_GetDescriptor(VALUE klass); - -// Decodes a Message from a byte sequence. -VALUE Message_decode_bytes(int size, const char* bytes, int options, - VALUE klass, bool freeze); - -// Recursively freeze message -VALUE Message_freeze(VALUE _self); - -// Call at startup to register all types in this module. -void Message_register(VALUE protobuf); - -#endif // RUBY_PROTOBUF_MESSAGE_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/protobuf.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/protobuf.c deleted file mode 100644 index 4df4886a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/protobuf.c +++ /dev/null @@ -1,357 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2014 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#include "protobuf.h" - -#include "defs.h" -#include "map.h" -#include "message.h" -#include "repeated_field.h" - -VALUE cParseError; -VALUE cTypeError; - -const upb_FieldDef *map_field_key(const upb_FieldDef *field) { - const upb_MessageDef *entry = upb_FieldDef_MessageSubDef(field); - return upb_MessageDef_FindFieldByNumber(entry, 1); -} - -const upb_FieldDef *map_field_value(const upb_FieldDef *field) { - const upb_MessageDef *entry = upb_FieldDef_MessageSubDef(field); - return upb_MessageDef_FindFieldByNumber(entry, 2); -} - -// ----------------------------------------------------------------------------- -// StringBuilder, for inspect -// ----------------------------------------------------------------------------- - -struct StringBuilder { - size_t size; - size_t cap; - char *data; -}; - -typedef struct StringBuilder StringBuilder; - -static size_t StringBuilder_SizeOf(size_t cap) { - return sizeof(StringBuilder) + cap; -} - -StringBuilder *StringBuilder_New() { - const size_t cap = 128; - StringBuilder *builder = malloc(sizeof(*builder)); - builder->size = 0; - builder->cap = cap; - builder->data = malloc(builder->cap); - return builder; -} - -void StringBuilder_Free(StringBuilder *b) { - free(b->data); - free(b); -} - -void StringBuilder_Printf(StringBuilder *b, const char *fmt, ...) { - size_t have = b->cap - b->size; - size_t n; - va_list args; - - va_start(args, fmt); - n = vsnprintf(&b->data[b->size], have, fmt, args); - va_end(args); - - if (have <= n) { - while (have <= n) { - b->cap *= 2; - have = b->cap - b->size; - } - b->data = realloc(b->data, StringBuilder_SizeOf(b->cap)); - va_start(args, fmt); - n = vsnprintf(&b->data[b->size], have, fmt, args); - va_end(args); - PBRUBY_ASSERT(n < have); - } - - b->size += n; -} - -VALUE StringBuilder_ToRubyString(StringBuilder *b) { - VALUE ret = rb_str_new(b->data, b->size); - rb_enc_associate(ret, rb_utf8_encoding()); - return ret; -} - -static void StringBuilder_PrintEnum(StringBuilder *b, int32_t val, - const upb_EnumDef *e) { - const upb_EnumValueDef *ev = upb_EnumDef_FindValueByNumber(e, val); - if (ev) { - StringBuilder_Printf(b, ":%s", upb_EnumValueDef_Name(ev)); - } else { - StringBuilder_Printf(b, "%" PRId32, val); - } -} - -void StringBuilder_PrintMsgval(StringBuilder *b, upb_MessageValue val, - TypeInfo info) { - switch (info.type) { - case kUpb_CType_Bool: - StringBuilder_Printf(b, "%s", val.bool_val ? "true" : "false"); - break; - case kUpb_CType_Float: { - VALUE str = rb_inspect(DBL2NUM(val.float_val)); - StringBuilder_Printf(b, "%s", RSTRING_PTR(str)); - break; - } - case kUpb_CType_Double: { - VALUE str = rb_inspect(DBL2NUM(val.double_val)); - StringBuilder_Printf(b, "%s", RSTRING_PTR(str)); - break; - } - case kUpb_CType_Int32: - StringBuilder_Printf(b, "%" PRId32, val.int32_val); - break; - case kUpb_CType_UInt32: - StringBuilder_Printf(b, "%" PRIu32, val.uint32_val); - break; - case kUpb_CType_Int64: - StringBuilder_Printf(b, "%" PRId64, val.int64_val); - break; - case kUpb_CType_UInt64: - StringBuilder_Printf(b, "%" PRIu64, val.uint64_val); - break; - case kUpb_CType_String: - StringBuilder_Printf(b, "\"%.*s\"", (int)val.str_val.size, - val.str_val.data); - break; - case kUpb_CType_Bytes: - StringBuilder_Printf(b, "\"%.*s\"", (int)val.str_val.size, - val.str_val.data); - break; - case kUpb_CType_Enum: - StringBuilder_PrintEnum(b, val.int32_val, info.def.enumdef); - break; - case kUpb_CType_Message: - Message_PrintMessage(b, val.msg_val, info.def.msgdef); - break; - } -} - -// ----------------------------------------------------------------------------- -// Arena -// ----------------------------------------------------------------------------- - -typedef struct { - upb_Arena *arena; - // IMPORTANT: WB_PROTECTED objects must only use the RB_OBJ_WRITE() - // macro to update VALUE references, as to trigger write barriers. - VALUE pinned_objs; -} Arena; - -static void Arena_mark(void *data) { - Arena *arena = data; - rb_gc_mark(arena->pinned_objs); -} - -static void Arena_free(void *data) { - Arena *arena = data; - upb_Arena_Free(arena->arena); - xfree(arena); -} - -static size_t Arena_memsize(const void *data) { - const Arena *arena = data; - size_t fused_count; - size_t memsize = upb_Arena_SpaceAllocated(arena->arena, &fused_count); - if (fused_count > 1) { - // If other arena were fused we attribute an equal - // share of memory usage to each one. - memsize /= fused_count; - } - return memsize + sizeof(Arena); -} - -static VALUE cArena; - -const rb_data_type_t Arena_type = { - "Google::Protobuf::Internal::Arena", - {Arena_mark, Arena_free, Arena_memsize}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED, -}; - -static void *ruby_upb_allocfunc(upb_alloc *alloc, void *ptr, size_t oldsize, - size_t size) { - if (size == 0) { - xfree(ptr); - return NULL; - } else { - return xrealloc(ptr, size); - } -} - -upb_alloc ruby_upb_alloc = {&ruby_upb_allocfunc}; - -static VALUE Arena_alloc(VALUE klass) { - Arena *arena = ALLOC(Arena); - arena->arena = upb_Arena_Init(NULL, 0, &ruby_upb_alloc); - arena->pinned_objs = Qnil; - return TypedData_Wrap_Struct(klass, &Arena_type, arena); -} - -upb_Arena *Arena_get(VALUE _arena) { - Arena *arena; - TypedData_Get_Struct(_arena, Arena, &Arena_type, arena); - return arena->arena; -} - -void Arena_fuse(VALUE _arena, upb_Arena *other) { - Arena *arena; - TypedData_Get_Struct(_arena, Arena, &Arena_type, arena); - if (!upb_Arena_Fuse(arena->arena, other)) { - rb_raise(rb_eRuntimeError, - "Unable to fuse arenas. This should never happen since Ruby does " - "not use initial blocks"); - } -} - -VALUE Arena_new() { return Arena_alloc(cArena); } - -void Arena_register(VALUE module) { - VALUE internal = rb_define_module_under(module, "Internal"); - VALUE klass = rb_define_class_under(internal, "Arena", rb_cObject); - rb_define_alloc_func(klass, Arena_alloc); - rb_gc_register_address(&cArena); - cArena = klass; -} - -// ----------------------------------------------------------------------------- -// Object Cache -// ----------------------------------------------------------------------------- - -// Public ObjectCache API. - -VALUE weak_obj_cache = Qnil; -ID item_get; -ID item_try_add; - -static void ObjectCache_Init(VALUE protobuf) { - item_get = rb_intern("get"); - item_try_add = rb_intern("try_add"); - - rb_gc_register_address(&weak_obj_cache); - VALUE internal = rb_const_get(protobuf, rb_intern("Internal")); -#if SIZEOF_LONG >= SIZEOF_VALUE - VALUE cache_class = rb_const_get(internal, rb_intern("ObjectCache")); -#else - VALUE cache_class = rb_const_get(internal, rb_intern("LegacyObjectCache")); -#endif - - weak_obj_cache = rb_class_new_instance(0, NULL, cache_class); - rb_const_set(internal, rb_intern("OBJECT_CACHE"), weak_obj_cache); - rb_const_set(internal, rb_intern("SIZEOF_LONG"), INT2NUM(SIZEOF_LONG)); - rb_const_set(internal, rb_intern("SIZEOF_VALUE"), INT2NUM(SIZEOF_VALUE)); -} - -static VALUE ObjectCache_GetKey(const void *key) { - VALUE key_val = (VALUE)key; - PBRUBY_ASSERT((key_val & 3) == 0); - // Ensure the key can be stored as a Fixnum since 1 bit is needed for - // FIXNUM_FLAG and 1 bit is needed for the sign bit. - VALUE new_key = LL2NUM(key_val >> 2); - PBRUBY_ASSERT(FIXNUM_P(new_key)); - return new_key; -} - -VALUE ObjectCache_TryAdd(const void *key, VALUE val) { - VALUE key_val = ObjectCache_GetKey(key); - return rb_funcall(weak_obj_cache, item_try_add, 2, key_val, val); -} - -// Returns the cached object for this key, if any. Otherwise returns Qnil. -VALUE ObjectCache_Get(const void *key) { - VALUE key_val = ObjectCache_GetKey(key); - return rb_funcall(weak_obj_cache, item_get, 1, key_val); -} - -/* - * call-seq: - * Google::Protobuf.discard_unknown(msg) - * - * Discard unknown fields in the given message object and recursively discard - * unknown fields in submessages. - */ -static VALUE Google_Protobuf_discard_unknown(VALUE self, VALUE msg_rb) { - const upb_MessageDef *m; - upb_Message *msg = Message_GetMutable(msg_rb, &m); - const upb_DefPool* ext_pool = upb_FileDef_Pool(upb_MessageDef_File(m)); - if (!upb_Message_DiscardUnknown(msg, m, ext_pool, 128)) { - rb_raise(rb_eRuntimeError, "Messages nested too deeply."); - } - - return Qnil; -} - -/* - * call-seq: - * Google::Protobuf.deep_copy(obj) => copy_of_obj - * - * Performs a deep copy of a RepeatedField instance, a Map instance, or a - * message object, recursively copying its members. - */ -VALUE Google_Protobuf_deep_copy(VALUE self, VALUE obj) { - VALUE klass = CLASS_OF(obj); - if (klass == cRepeatedField) { - return RepeatedField_deep_copy(obj); - } else if (klass == cMap) { - return Map_deep_copy(obj); - } else { - VALUE new_arena_rb = Arena_new(); - upb_Arena *new_arena = Arena_get(new_arena_rb); - const upb_MessageDef *m; - const upb_Message *msg = Message_Get(obj, &m); - upb_Message *new_msg = Message_deep_copy(msg, m, new_arena); - return Message_GetRubyWrapper(new_msg, m, new_arena_rb); - } -} - -// ----------------------------------------------------------------------------- -// Initialization/entry point. -// ----------------------------------------------------------------------------- - -// This must be named "Init_protobuf_c" because the Ruby module is named -// "protobuf_c" -- the VM looks for this symbol in our .so. -__attribute__((visibility("default"))) void Init_protobuf_c() { - VALUE google = rb_define_module("Google"); - VALUE protobuf = rb_define_module_under(google, "Protobuf"); - - ObjectCache_Init(protobuf); - Arena_register(protobuf); - Defs_register(protobuf); - RepeatedField_register(protobuf); - Map_register(protobuf); - Message_register(protobuf); - - cParseError = rb_const_get(protobuf, rb_intern("ParseError")); - rb_gc_register_mark_object(cParseError); - cTypeError = rb_const_get(protobuf, rb_intern("TypeError")); - rb_gc_register_mark_object(cTypeError); - - rb_define_singleton_method(protobuf, "discard_unknown", - Google_Protobuf_discard_unknown, 1); - rb_define_singleton_method(protobuf, "deep_copy", Google_Protobuf_deep_copy, - 1); -} - -// ----------------------------------------------------------------------------- -// Utilities -// ----------------------------------------------------------------------------- - -// Raises a Ruby error if val is frozen in Ruby or UPB. -void Protobuf_CheckNotFrozen(VALUE val, bool upb_frozen) { - if (RB_UNLIKELY(rb_obj_frozen_p(val)||upb_frozen)) { - rb_error_frozen_object(val); - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/protobuf.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/protobuf.h deleted file mode 100644 index 1524f71c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/protobuf.h +++ /dev/null @@ -1,102 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2014 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#ifndef __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__ -#define __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__ - -// Ruby 3+ defines NDEBUG itself, see: https://bugs.ruby-lang.org/issues/18777 -#ifdef NDEBUG -#include -#else -#include -#undef NDEBUG -#endif - -#include // Must be included after the NDEBUG logic above. -#include -#include - -#include "defs.h" -#include "ruby-upb.h" - -// These operate on a map field (i.e., a repeated field of submessages whose -// submessage type is a map-entry msgdef). -const upb_FieldDef* map_field_key(const upb_FieldDef* field); -const upb_FieldDef* map_field_value(const upb_FieldDef* field); - -// ----------------------------------------------------------------------------- -// Arena -// ----------------------------------------------------------------------------- - -// A Ruby object that wraps an underlying upb_Arena. Any objects that are -// allocated from this arena should reference the Arena in rb_gc_mark(), to -// ensure that the object's underlying memory outlives any Ruby object that can -// reach it. - -VALUE Arena_new(); -upb_Arena* Arena_get(VALUE arena); - -// Fuses this arena to another, throwing a Ruby exception if this is not -// possible. -void Arena_fuse(VALUE arena, upb_Arena* other); - -// ----------------------------------------------------------------------------- -// ObjectCache -// ----------------------------------------------------------------------------- - -// Global object cache from upb array/map/message/symtab to wrapper object. -// -// This is a conceptually "weak" cache, in that it does not prevent "val" from -// being collected (though in Ruby <2.7 is it effectively strong, due to -// implementation limitations). - -// Tries to add a new entry to the cache, returning the newly installed value or -// the pre-existing entry. -VALUE ObjectCache_TryAdd(const void* key, VALUE val); - -// Returns the cached object for this key, if any. Otherwise returns Qnil. -VALUE ObjectCache_Get(const void* key); - -// ----------------------------------------------------------------------------- -// StringBuilder, for inspect -// ----------------------------------------------------------------------------- - -struct StringBuilder; -typedef struct StringBuilder StringBuilder; - -StringBuilder* StringBuilder_New(); -void StringBuilder_Free(StringBuilder* b); -void StringBuilder_Printf(StringBuilder* b, const char* fmt, ...); -VALUE StringBuilder_ToRubyString(StringBuilder* b); - -void StringBuilder_PrintMsgval(StringBuilder* b, upb_MessageValue val, - TypeInfo info); - -// ----------------------------------------------------------------------------- -// Utilities. -// ----------------------------------------------------------------------------- - -extern VALUE cTypeError; - -#ifdef NDEBUG -#define PBRUBY_ASSERT(expr) \ - do { \ - } while (false && (expr)) -#else -#define PBRUBY_ASSERT(expr) \ - if (!(expr)) \ - rb_bug("Assertion failed at %s:%d, expr: %s", __FILE__, __LINE__, #expr) -#endif - -// Raises a Ruby error if val is frozen in Ruby or upb_frozen is true. -void Protobuf_CheckNotFrozen(VALUE val, bool upb_frozen); - -#define PBRUBY_MAX(x, y) (((x) > (y)) ? (x) : (y)) - -#define UPB_UNUSED(var) (void)var - -#endif // __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/repeated_field.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/repeated_field.c deleted file mode 100644 index 2d19c164..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/repeated_field.c +++ /dev/null @@ -1,691 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2014 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#include "repeated_field.h" - -#include "convert.h" -#include "defs.h" -#include "message.h" -#include "protobuf.h" - -// ----------------------------------------------------------------------------- -// Repeated field container type. -// ----------------------------------------------------------------------------- - -typedef struct { - const upb_Array* array; // Can get as mutable when non-frozen. - TypeInfo type_info; - VALUE type_class; // To GC-root the msgdef/enumdef in type_info. - VALUE arena; // To GC-root the upb_Array. -} RepeatedField; - -VALUE cRepeatedField; - -static void RepeatedField_mark(void* _self) { - RepeatedField* self = (RepeatedField*)_self; - rb_gc_mark(self->type_class); - rb_gc_mark(self->arena); -} - -const rb_data_type_t RepeatedField_type = { - "Google::Protobuf::RepeatedField", - {RepeatedField_mark, RUBY_DEFAULT_FREE, NULL}, - .flags = RUBY_TYPED_FREE_IMMEDIATELY, -}; - -static RepeatedField* ruby_to_RepeatedField(VALUE _self) { - RepeatedField* self; - TypedData_Get_Struct(_self, RepeatedField, &RepeatedField_type, self); - return self; -} - -static upb_Array* RepeatedField_GetMutable(VALUE _self) { - const upb_Array* array = ruby_to_RepeatedField(_self)->array; - Protobuf_CheckNotFrozen(_self, upb_Array_IsFrozen(array)); - return (upb_Array*)array; -} - -VALUE RepeatedField_alloc(VALUE klass) { - RepeatedField* self = ALLOC(RepeatedField); - self->arena = Qnil; - self->type_class = Qnil; - self->array = NULL; - return TypedData_Wrap_Struct(klass, &RepeatedField_type, self); -} - -VALUE RepeatedField_EmptyFrozen(const upb_FieldDef* f) { - PBRUBY_ASSERT(upb_FieldDef_IsRepeated(f)); - VALUE val = ObjectCache_Get(f); - - if (val == Qnil) { - val = RepeatedField_alloc(cRepeatedField); - RepeatedField* self; - TypedData_Get_Struct(val, RepeatedField, &RepeatedField_type, self); - self->arena = Arena_new(); - TypeInfo type_info = TypeInfo_get(f); - self->array = upb_Array_New(Arena_get(self->arena), type_info.type); - self->type_info = type_info; - if (self->type_info.type == kUpb_CType_Message) { - self->type_class = Descriptor_DefToClass(type_info.def.msgdef); - } - val = ObjectCache_TryAdd(f, RepeatedField_freeze(val)); - } - PBRUBY_ASSERT(RB_OBJ_FROZEN(val)); - PBRUBY_ASSERT(upb_Array_IsFrozen(ruby_to_RepeatedField(val)->array)); - return val; -} - -VALUE RepeatedField_GetRubyWrapper(const upb_Array* array, TypeInfo type_info, - VALUE arena) { - PBRUBY_ASSERT(array); - PBRUBY_ASSERT(arena != Qnil); - VALUE val = ObjectCache_Get(array); - - if (val == Qnil) { - val = RepeatedField_alloc(cRepeatedField); - RepeatedField* self; - TypedData_Get_Struct(val, RepeatedField, &RepeatedField_type, self); - self->array = array; - self->arena = arena; - self->type_info = type_info; - if (self->type_info.type == kUpb_CType_Message) { - self->type_class = Descriptor_DefToClass(type_info.def.msgdef); - } - val = ObjectCache_TryAdd(array, val); - } - - PBRUBY_ASSERT(ruby_to_RepeatedField(val)->type_info.type == type_info.type); - PBRUBY_ASSERT(ruby_to_RepeatedField(val)->type_info.def.msgdef == - type_info.def.msgdef); - PBRUBY_ASSERT(ruby_to_RepeatedField(val)->array == array); - return val; -} - -static VALUE RepeatedField_new_this_type(RepeatedField* from) { - VALUE arena_rb = Arena_new(); - upb_Array* array = upb_Array_New(Arena_get(arena_rb), from->type_info.type); - VALUE ret = RepeatedField_GetRubyWrapper(array, from->type_info, arena_rb); - PBRUBY_ASSERT(ruby_to_RepeatedField(ret)->type_class == from->type_class); - return ret; -} - -void RepeatedField_Inspect(StringBuilder* b, const upb_Array* array, - TypeInfo info) { - bool first = true; - StringBuilder_Printf(b, "["); - size_t n = array ? upb_Array_Size(array) : 0; - for (size_t i = 0; i < n; i++) { - if (first) { - first = false; - } else { - StringBuilder_Printf(b, ", "); - } - StringBuilder_PrintMsgval(b, upb_Array_Get(array, i), info); - } - StringBuilder_Printf(b, "]"); -} - -VALUE RepeatedField_deep_copy(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - VALUE new_rptfield = RepeatedField_new_this_type(self); - RepeatedField* new_self = ruby_to_RepeatedField(new_rptfield); - VALUE arena_rb = new_self->arena; - upb_Array* new_array = RepeatedField_GetMutable(new_rptfield); - upb_Arena* arena = Arena_get(arena_rb); - size_t elements = upb_Array_Size(self->array); - - upb_Array_Resize(new_array, elements, arena); - - size_t size = upb_Array_Size(self->array); - for (size_t i = 0; i < size; i++) { - upb_MessageValue msgval = upb_Array_Get(self->array, i); - upb_MessageValue copy = Msgval_DeepCopy(msgval, self->type_info, arena); - upb_Array_Set(new_array, i, copy); - } - - return new_rptfield; -} - -const upb_Array* RepeatedField_GetUpbArray(VALUE val, const upb_FieldDef* field, - upb_Arena* arena) { - RepeatedField* self; - TypeInfo type_info = TypeInfo_get(field); - - if (!RB_TYPE_P(val, T_DATA) || !RTYPEDDATA_P(val) || - RTYPEDDATA_TYPE(val) != &RepeatedField_type) { - rb_raise(cTypeError, "Expected repeated field array"); - } - - self = ruby_to_RepeatedField(val); - if (self->type_info.type != type_info.type) { - rb_raise(cTypeError, "Repeated field array has wrong element type"); - } - - if (self->type_info.def.msgdef != type_info.def.msgdef) { - rb_raise(cTypeError, "Repeated field array has wrong message/enum class"); - } - - Arena_fuse(self->arena, arena); - return self->array; -} - -static int index_position(VALUE _index, RepeatedField* repeated_field) { - int index = NUM2INT(_index); - if (index < 0) index += upb_Array_Size(repeated_field->array); - return index; -} - -static VALUE RepeatedField_subarray(RepeatedField* self, long beg, long len) { - size_t size = upb_Array_Size(self->array); - VALUE ary = rb_ary_new2(size); - long i; - - for (i = beg; i < beg + len; i++) { - upb_MessageValue msgval = upb_Array_Get(self->array, i); - VALUE elem = Convert_UpbToRuby(msgval, self->type_info, self->arena); - rb_ary_push(ary, elem); - } - return ary; -} - -/* - * call-seq: - * RepeatedField.each(&block) - * - * Invokes the block once for each element of the repeated field. RepeatedField - * also includes Enumerable; combined with this method, the repeated field thus - * acts like an ordinary Ruby sequence. - */ -static VALUE RepeatedField_each(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - int size = upb_Array_Size(self->array); - int i; - - for (i = 0; i < size; i++) { - upb_MessageValue msgval = upb_Array_Get(self->array, i); - VALUE val = Convert_UpbToRuby(msgval, self->type_info, self->arena); - rb_yield(val); - } - return _self; -} - -/* - * call-seq: - * RepeatedField.[](index) => value - * - * Accesses the element at the given index. Returns nil on out-of-bounds - */ -static VALUE RepeatedField_index(int argc, VALUE* argv, VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - long size = upb_Array_Size(self->array); - - VALUE arg = argv[0]; - long beg, len; - - if (argc == 1) { - if (FIXNUM_P(arg)) { - /* standard case */ - upb_MessageValue msgval; - int index = index_position(argv[0], self); - if (index < 0 || (size_t)index >= upb_Array_Size(self->array)) { - return Qnil; - } - msgval = upb_Array_Get(self->array, index); - return Convert_UpbToRuby(msgval, self->type_info, self->arena); - } else { - /* check if idx is Range */ - switch (rb_range_beg_len(arg, &beg, &len, size, 0)) { - case Qfalse: - break; - case Qnil: - return Qnil; - default: - return RepeatedField_subarray(self, beg, len); - } - } - } - - /* assume 2 arguments */ - beg = NUM2LONG(argv[0]); - len = NUM2LONG(argv[1]); - if (beg < 0) { - beg += size; - } - if (beg >= size) { - return Qnil; - } - return RepeatedField_subarray(self, beg, len); -} - -/* - * call-seq: - * RepeatedField.[]=(index, value) - * - * Sets the element at the given index. On out-of-bounds assignments, extends - * the array and fills the hole (if any) with default values. - */ -static VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val) { - RepeatedField* self = ruby_to_RepeatedField(_self); - int size = upb_Array_Size(self->array); - upb_Array* array = RepeatedField_GetMutable(_self); - upb_Arena* arena = Arena_get(self->arena); - upb_MessageValue msgval = Convert_RubyToUpb(val, "", self->type_info, arena); - - int index = index_position(_index, self); - if (index < 0 || index >= (INT_MAX - 1)) { - return Qnil; - } - - if (index >= size) { - upb_Array_Resize(array, index + 1, arena); - upb_MessageValue fill; - memset(&fill, 0, sizeof(fill)); - for (int i = size; i < index; i++) { - // Fill default values. - // TODO: should this happen at the upb level? - upb_Array_Set(array, i, fill); - } - } - - upb_Array_Set(array, index, msgval); - return Qnil; -} - -/* - * call-seq: - * RepeatedField.push(value, ...) - * - * Adds a new element to the repeated field. - */ -static VALUE RepeatedField_push_vararg(int argc, VALUE* argv, VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - upb_Arena* arena = Arena_get(self->arena); - upb_Array* array = RepeatedField_GetMutable(_self); - int i; - - for (i = 0; i < argc; i++) { - upb_MessageValue msgval = - Convert_RubyToUpb(argv[i], "", self->type_info, arena); - upb_Array_Append(array, msgval, arena); - } - - return _self; -} - -/* - * call-seq: - * RepeatedField.<<(value) - * - * Adds a new element to the repeated field. - */ -static VALUE RepeatedField_push(VALUE _self, VALUE val) { - RepeatedField* self = ruby_to_RepeatedField(_self); - upb_Arena* arena = Arena_get(self->arena); - upb_Array* array = RepeatedField_GetMutable(_self); - - upb_MessageValue msgval = Convert_RubyToUpb(val, "", self->type_info, arena); - upb_Array_Append(array, msgval, arena); - - return _self; -} - -/* - * Private ruby method, used by RepeatedField.pop - */ -static VALUE RepeatedField_pop_one(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - size_t size = upb_Array_Size(self->array); - upb_Array* array = RepeatedField_GetMutable(_self); - upb_MessageValue last; - VALUE ret; - - if (size == 0) { - return Qnil; - } - - last = upb_Array_Get(self->array, size - 1); - ret = Convert_UpbToRuby(last, self->type_info, self->arena); - - upb_Array_Resize(array, size - 1, Arena_get(self->arena)); - return ret; -} - -/* - * call-seq: - * RepeatedField.replace(list) - * - * Replaces the contents of the repeated field with the given list of elements. - */ -static VALUE RepeatedField_replace(VALUE _self, VALUE list) { - RepeatedField* self = ruby_to_RepeatedField(_self); - upb_Array* array = RepeatedField_GetMutable(_self); - int i; - - Check_Type(list, T_ARRAY); - upb_Array_Resize(array, 0, Arena_get(self->arena)); - - for (i = 0; i < RARRAY_LEN(list); i++) { - RepeatedField_push(_self, rb_ary_entry(list, i)); - } - - return list; -} - -/* - * call-seq: - * RepeatedField.clear - * - * Clears (removes all elements from) this repeated field. - */ -static VALUE RepeatedField_clear(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - upb_Array* array = RepeatedField_GetMutable(_self); - upb_Array_Resize(array, 0, Arena_get(self->arena)); - return _self; -} - -/* - * call-seq: - * RepeatedField.length - * - * Returns the length of this repeated field. - */ -static VALUE RepeatedField_length(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - return INT2NUM(upb_Array_Size(self->array)); -} - -/* - * call-seq: - * RepeatedField.dup => repeated_field - * - * Duplicates this repeated field with a shallow copy. References to all - * non-primitive element objects (e.g., submessages) are shared. - */ -static VALUE RepeatedField_dup(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - VALUE new_rptfield = RepeatedField_new_this_type(self); - RepeatedField* new_rptfield_self = ruby_to_RepeatedField(new_rptfield); - upb_Array* new_array = RepeatedField_GetMutable(new_rptfield); - upb_Arena* arena = Arena_get(new_rptfield_self->arena); - int size = upb_Array_Size(self->array); - int i; - - Arena_fuse(self->arena, arena); - - for (i = 0; i < size; i++) { - upb_MessageValue msgval = upb_Array_Get(self->array, i); - upb_Array_Append(new_array, msgval, arena); - } - - return new_rptfield; -} - -/* - * call-seq: - * RepeatedField.to_ary => array - * - * Used when converted implicitly into array, e.g. compared to an Array. - * Also called as a fallback of Object#to_a - */ -VALUE RepeatedField_to_ary(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - int size = upb_Array_Size(self->array); - VALUE ary = rb_ary_new2(size); - int i; - - for (i = 0; i < size; i++) { - upb_MessageValue msgval = upb_Array_Get(self->array, i); - VALUE val = Convert_UpbToRuby(msgval, self->type_info, self->arena); - rb_ary_push(ary, val); - } - - return ary; -} - -/* - * call-seq: - * RepeatedField.==(other) => boolean - * - * Compares this repeated field to another. Repeated fields are equal if their - * element types are equal, their lengths are equal, and each element is equal. - * Elements are compared as per normal Ruby semantics, by calling their :== - * methods (or performing a more efficient comparison for primitive types). - * - * Repeated fields with dissimilar element types are never equal, even if value - * comparison (for example, between integers and floats) would have otherwise - * indicated that every element has equal value. - */ -VALUE RepeatedField_eq(VALUE _self, VALUE _other) { - RepeatedField* self; - RepeatedField* other; - - if (_self == _other) { - return Qtrue; - } - - if (TYPE(_other) == T_ARRAY) { - VALUE self_ary = RepeatedField_to_ary(_self); - return rb_equal(self_ary, _other); - } - - self = ruby_to_RepeatedField(_self); - other = ruby_to_RepeatedField(_other); - size_t n = upb_Array_Size(self->array); - - if (self->type_info.type != other->type_info.type || - self->type_class != other->type_class || - upb_Array_Size(other->array) != n) { - return Qfalse; - } - - for (size_t i = 0; i < n; i++) { - upb_MessageValue val1 = upb_Array_Get(self->array, i); - upb_MessageValue val2 = upb_Array_Get(other->array, i); - if (!Msgval_IsEqual(val1, val2, self->type_info)) { - return Qfalse; - } - } - - return Qtrue; -} - -/* - * call-seq: - * RepeatedField.frozen? => bool - * - * Returns true if the repeated field is frozen in either Ruby or the underlying - * representation. Freezes the Ruby repeated field object if it is not already - * frozen in Ruby but it is frozen in the underlying representation. - */ -VALUE RepeatedField_frozen(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - if (!upb_Array_IsFrozen(self->array)) { - PBRUBY_ASSERT(!RB_OBJ_FROZEN(_self)); - return Qfalse; - } - - // Lazily freeze the Ruby wrapper. - if (!RB_OBJ_FROZEN(_self)) RB_OBJ_FREEZE(_self); - return Qtrue; -} - -/* - * call-seq: - * RepeatedField.freeze => self - * - * Freezes the repeated field object. We have to intercept this so we can freeze - * the underlying representation, not just the Ruby wrapper. - */ -VALUE RepeatedField_freeze(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - if (RB_OBJ_FROZEN(_self)) { - PBRUBY_ASSERT(upb_Array_IsFrozen(self->array)); - return _self; - } - - if (!upb_Array_IsFrozen(self->array)) { - if (self->type_info.type == kUpb_CType_Message) { - upb_Array_Freeze(RepeatedField_GetMutable(_self), - upb_MessageDef_MiniTable(self->type_info.def.msgdef)); - } else { - upb_Array_Freeze(RepeatedField_GetMutable(_self), NULL); - } - } - RB_OBJ_FREEZE(_self); - return _self; -} - -/* - * call-seq: - * RepeatedField.hash => hash_value - * - * Returns a hash value computed from this repeated field's elements. - */ -VALUE RepeatedField_hash(VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - uint64_t hash = 0; - size_t n = upb_Array_Size(self->array); - - for (size_t i = 0; i < n; i++) { - upb_MessageValue val = upb_Array_Get(self->array, i); - hash = Msgval_GetHash(val, self->type_info, hash); - } - - return LL2NUM(hash); -} - -/* - * call-seq: - * RepeatedField.+(other) => repeated field - * - * Returns a new repeated field that contains the concatenated list of this - * repeated field's elements and other's elements. The other (second) list may - * be either another repeated field or a Ruby array. - */ -VALUE RepeatedField_plus(VALUE _self, VALUE list) { - VALUE dupped_ = RepeatedField_dup(_self); - - if (TYPE(list) == T_ARRAY) { - int i; - for (i = 0; i < RARRAY_LEN(list); i++) { - VALUE elem = rb_ary_entry(list, i); - RepeatedField_push(dupped_, elem); - } - } else if (RB_TYPE_P(list, T_DATA) && RTYPEDDATA_P(list) && - RTYPEDDATA_TYPE(list) == &RepeatedField_type) { - RepeatedField* self = ruby_to_RepeatedField(_self); - RepeatedField* list_rptfield = ruby_to_RepeatedField(list); - RepeatedField* dupped = ruby_to_RepeatedField(dupped_); - upb_Array* dupped_array = RepeatedField_GetMutable(dupped_); - upb_Arena* arena = Arena_get(dupped->arena); - Arena_fuse(list_rptfield->arena, arena); - int size = upb_Array_Size(list_rptfield->array); - int i; - - if (self->type_info.type != list_rptfield->type_info.type || - self->type_class != list_rptfield->type_class) { - rb_raise(rb_eArgError, - "Attempt to append RepeatedField with different element type."); - } - - for (i = 0; i < size; i++) { - upb_MessageValue msgval = upb_Array_Get(list_rptfield->array, i); - upb_Array_Append(dupped_array, msgval, arena); - } - } else { - rb_raise(rb_eArgError, "Unknown type appending to RepeatedField"); - } - - return dupped_; -} - -/* - * call-seq: - * RepeatedField.concat(other) => self - * - * concats the passed in array to self. Returns a Ruby array. - */ -VALUE RepeatedField_concat(VALUE _self, VALUE list) { - int i; - - Check_Type(list, T_ARRAY); - for (i = 0; i < RARRAY_LEN(list); i++) { - RepeatedField_push(_self, rb_ary_entry(list, i)); - } - return _self; -} - -/* - * call-seq: - * RepeatedField.new(type, type_class = nil, initial_elems = []) - * - * Creates a new repeated field. The provided type must be a Ruby symbol, and - * can take on the same values as those accepted by FieldDescriptor#type=. If - * the type is :message or :enum, type_class must be non-nil, and must be the - * Ruby class or module returned by Descriptor#msgclass or - * EnumDescriptor#enummodule, respectively. An initial list of elements may also - * be provided. - */ -VALUE RepeatedField_init(int argc, VALUE* argv, VALUE _self) { - RepeatedField* self = ruby_to_RepeatedField(_self); - upb_Arena* arena; - VALUE ary = Qnil; - - self->arena = Arena_new(); - arena = Arena_get(self->arena); - - if (argc < 1) { - rb_raise(rb_eArgError, "Expected at least 1 argument."); - } - - self->type_info = TypeInfo_FromClass(argc, argv, 0, &self->type_class, &ary); - self->array = upb_Array_New(arena, self->type_info.type); - VALUE stored_val = ObjectCache_TryAdd(self->array, _self); - PBRUBY_ASSERT(stored_val == _self); - - if (ary != Qnil) { - if (!RB_TYPE_P(ary, T_ARRAY)) { - rb_raise(rb_eArgError, "Expected array as initialize argument"); - } - for (int i = 0; i < RARRAY_LEN(ary); i++) { - RepeatedField_push(_self, rb_ary_entry(ary, i)); - } - } - return Qnil; -} - -void RepeatedField_register(VALUE module) { - VALUE klass = rb_define_class_under(module, "RepeatedField", rb_cObject); - rb_define_alloc_func(klass, RepeatedField_alloc); - rb_gc_register_address(&cRepeatedField); - cRepeatedField = klass; - - rb_define_method(klass, "initialize", RepeatedField_init, -1); - rb_define_method(klass, "each", RepeatedField_each, 0); - rb_define_method(klass, "[]", RepeatedField_index, -1); - rb_define_method(klass, "at", RepeatedField_index, -1); - rb_define_method(klass, "[]=", RepeatedField_index_set, 2); - rb_define_method(klass, "push", RepeatedField_push_vararg, -1); - rb_define_method(klass, "<<", RepeatedField_push, 1); - rb_define_private_method(klass, "pop_one", RepeatedField_pop_one, 0); - rb_define_method(klass, "replace", RepeatedField_replace, 1); - rb_define_method(klass, "clear", RepeatedField_clear, 0); - rb_define_method(klass, "length", RepeatedField_length, 0); - rb_define_method(klass, "size", RepeatedField_length, 0); - rb_define_method(klass, "dup", RepeatedField_dup, 0); - // Also define #clone so that we don't inherit Object#clone. - rb_define_method(klass, "clone", RepeatedField_dup, 0); - rb_define_method(klass, "==", RepeatedField_eq, 1); - rb_define_method(klass, "to_ary", RepeatedField_to_ary, 0); - rb_define_method(klass, "freeze", RepeatedField_freeze, 0); - rb_define_method(klass, "frozen?", RepeatedField_frozen, 0); - rb_define_method(klass, "hash", RepeatedField_hash, 0); - rb_define_method(klass, "+", RepeatedField_plus, 1); - rb_define_method(klass, "concat", RepeatedField_concat, 1); - rb_include_module(klass, rb_mEnumerable); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/repeated_field.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/repeated_field.h deleted file mode 100644 index 1ae31cfc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/repeated_field.h +++ /dev/null @@ -1,45 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#ifndef RUBY_PROTOBUF_REPEATED_FIELD_H_ -#define RUBY_PROTOBUF_REPEATED_FIELD_H_ - -#include "protobuf.h" -#include "ruby-upb.h" - -// Returns a frozen sentinel Ruby wrapper object for an empty upb_Array of the -// type specified by the field. Creates one if it doesn't exist. -VALUE RepeatedField_EmptyFrozen(const upb_FieldDef* f); - -// Returns a Ruby wrapper object for the given upb_Array, which will be created -// if one does not exist already. -VALUE RepeatedField_GetRubyWrapper(const upb_Array* msg, TypeInfo type_info, - VALUE arena); - -// Gets the underlying upb_Array for this Ruby RepeatedField object, which must -// have a type that matches |f|. If this is not a repeated field or the type -// doesn't match, raises an exception. -const upb_Array* RepeatedField_GetUpbArray(VALUE value, const upb_FieldDef* f, - upb_Arena* arena); - -// Implements #inspect for this repeated field by appending its contents to |b|. -void RepeatedField_Inspect(StringBuilder* b, const upb_Array* array, - TypeInfo info); - -// Returns a deep copy of this RepeatedField object. -VALUE RepeatedField_deep_copy(VALUE obj); - -// Ruby class of Google::Protobuf::RepeatedField. -extern VALUE cRepeatedField; - -// Call at startup to register all types in this module. -void RepeatedField_register(VALUE module); - -// Recursively freeze RepeatedField. -VALUE RepeatedField_freeze(VALUE _self); - -#endif // RUBY_PROTOBUF_REPEATED_FIELD_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/ruby-upb.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/ruby-upb.c deleted file mode 100644 index 78f4cca3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/ruby-upb.c +++ /dev/null @@ -1,18305 +0,0 @@ -/* Amalgamated source file */ -#include "ruby-upb.h" - -/* - * This is where we define internal portability macros used across upb. - * - * All of these macros are undef'd in undef.inc to avoid leaking them to users. - * - * The correct usage is: - * - * #include "upb/foobar.h" - * #include "upb/baz.h" - * - * // MUST be last included header. - * #include "upb/port/def.inc" - * - * // Code for this file. - * // <...> - * - * // Can be omitted for .c files, required for .h. - * #include "upb/port/undef.inc" - * - * This file is private and must not be included by users! - */ - -#if !((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201703L) || \ - (defined(_MSC_VER) && _MSC_VER >= 1900)) -#error upb requires C99 or C++17 or MSVC >= 2015. -#endif - -// Portable check for GCC minimum version: -// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) -#define UPB_GNUC_MIN(x, y) \ - (__GNUC__ > (x) || __GNUC__ == (x) && __GNUC_MINOR__ >= (y)) -#else -#define UPB_GNUC_MIN(x, y) 0 -#endif - -#include -#include -#include -#include -#include -#include - -#ifndef UINTPTR_MAX -Error, UINTPTR_MAX is undefined -#endif - -#if UINTPTR_MAX == 0xffffffff -#define UPB_SIZE(size32, size64) size32 -#else -#define UPB_SIZE(size32, size64) size64 -#endif - -/* If we always read/write as a consistent type to each address, this shouldn't - * violate aliasing. - */ -#define UPB_PTR_AT(msg, ofs, type) ((type *)((char *)(msg) + (ofs))) - -// A flexible array member may have lower alignment requirements than the struct -// overall - in that case, it can overlap with the trailing padding of the rest -// of the struct, and a naive sizeof(base) + sizeof(flex) * count calculation -// will not take into account that overlap, and allocate more than is required. -#define UPB_SIZEOF_FLEX(type, member, count) \ - UPB_MAX(sizeof(type), offsetof(type, member[count])) - -#define UPB_SIZEOF_FLEX_WOULD_OVERFLOW(type, member, count) \ - (((SIZE_MAX - offsetof(type, member[0])) / \ - (offsetof(type, member[1]) - offsetof(type, member[0]))) < (size_t)count) - -#define UPB_MAPTYPE_STRING 0 - -// UPB_EXPORT: always generate a public symbol. -#if defined(__GNUC__) || defined(__clang__) -#define UPB_EXPORT __attribute__((visibility("default"))) __attribute__((used)) -#else -#define UPB_EXPORT -#endif - -// UPB_INLINE: inline if possible, emit standalone code if required. -#ifdef __cplusplus -#define UPB_INLINE inline -#elif defined(__GNUC__) || defined(__clang__) -#define UPB_INLINE static __inline__ -#else -#define UPB_INLINE static -#endif - -// UPB_INLINE_IF_NOT_GCC: because gcc can be very noisy at times. -#if defined(__GNUC__) && !defined(__clang__) -#define UPB_INLINE_IF_NOT_GCC static -#else -#define UPB_INLINE_IF_NOT_GCC UPB_INLINE -#endif - -#ifdef UPB_BUILD_API -#define UPB_API UPB_EXPORT -#define UPB_API_INLINE UPB_EXPORT -#else -#define UPB_API -#define UPB_API_INLINE UPB_INLINE -#endif - -#ifdef EXPORT_UPBC -#define UPBC_API UPB_EXPORT -#else -#define UPBC_API -#endif - -#define UPB_MALLOC_ALIGN 8 -#define UPB_ALIGN_UP(size, align) (((size) + (align) - 1) / (align) * (align)) -#define UPB_ALIGN_DOWN(size, align) ((size) / (align) * (align)) -#define UPB_ALIGN_MALLOC(size) UPB_ALIGN_UP(size, UPB_MALLOC_ALIGN) -#ifdef __clang__ -#define UPB_ALIGN_OF(type) _Alignof(type) -#else -#define UPB_ALIGN_OF(type) \ - offsetof( \ - struct { \ - char c; \ - type member; \ - }, \ - member) -#endif - -#ifdef _MSC_VER -// Some versions of our Windows compiler don't support the C11 syntax. -#define UPB_ALIGN_AS(x) __declspec(align(x)) -#elif defined(__GNUC__) -#define UPB_ALIGN_AS(x) __attribute__((aligned(x))) -#else -#define UPB_ALIGN_AS(x) _Alignas(x) -#endif - -// Hints to the compiler about likely/unlikely branches. -#if defined(__GNUC__) || defined(__clang__) -#define UPB_LIKELY(x) __builtin_expect((bool)(x), 1) -#define UPB_UNLIKELY(x) __builtin_expect((bool)(x), 0) -#else -#define UPB_LIKELY(x) (x) -#define UPB_UNLIKELY(x) (x) -#endif - -#ifdef __has_builtin -#if __has_builtin(__builtin_expect_with_probability) -#define UPB_UNPREDICTABLE(x) \ - __builtin_expect_with_probability((bool)(x), 1, 0.5) -#else -#define UPB_UNPREDICTABLE(x) (x) -#endif -#else -#define UPB_UNPREDICTABLE(x) (x) -#endif - -// Macros for function attributes on compilers that support them. -#if defined(__GNUC__) || defined(__clang__) -#define UPB_FORCEINLINE __inline__ __attribute__((always_inline)) static -#define UPB_NOINLINE __attribute__((noinline)) -#define UPB_NORETURN __attribute__((__noreturn__)) -#define UPB_PRINTF(str, first_vararg) \ - __attribute__((format(printf, str, first_vararg))) -#elif defined(_MSC_VER) -#define UPB_NOINLINE -#define UPB_FORCEINLINE static -#define UPB_NORETURN __declspec(noreturn) -#define UPB_PRINTF(str, first_vararg) -#else /* !defined(__GNUC__) */ -#define UPB_FORCEINLINE static -#define UPB_NOINLINE -#define UPB_NORETURN -#define UPB_PRINTF(str, first_vararg) -#endif - -#define UPB_MAX(x, y) ((x) > (y) ? (x) : (y)) -#define UPB_MIN(x, y) ((x) < (y) ? (x) : (y)) - -#define UPB_UNUSED(var) (void)var - -// UPB_ASSUME(): in release mode, we tell the compiler to assume this is true. -#ifdef NDEBUG -#ifdef __GNUC__ -#define UPB_ASSUME(expr) \ - if (!(expr)) __builtin_unreachable() -#elif defined _MSC_VER -#define UPB_ASSUME(expr) \ - if (!(expr)) __assume(0) -#else -#define UPB_ASSUME(expr) \ - do { \ - } while (false && (expr)) -#endif -#else -#define UPB_ASSUME(expr) assert(expr) -#endif - -/* UPB_ASSERT(): in release mode, we use the expression without letting it be - * evaluated. This prevents "unused variable" warnings. */ -#ifdef NDEBUG -#define UPB_ASSERT(expr) \ - do { \ - } while (false && (expr)) -#else -#define UPB_ASSERT(expr) assert(expr) -#endif - -#if defined(__GNUC__) || defined(__clang__) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __builtin_unreachable(); \ - } while (0) -#elif defined(_MSC_VER) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __assume(0); \ - } while (0) -#else -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - } while (0) -#endif - -#ifdef __ANDROID__ -#define UPB_DEFAULT_MAX_BLOCK_SIZE 8192 -#else -#define UPB_DEFAULT_MAX_BLOCK_SIZE 32768 -#endif - -/* UPB_SETJMP() / UPB_LONGJMP() */ -// Android uses a custom libc that does not implement all of posix, but it has -// had sigsetjmp/siglongjmp forever on arm and since API 12 on x86. Apple has -// sigsetjmp, but does not define the posix feature test macro. -#if defined(__APPLE__) || defined(_POSIX_C_SOURCE) || defined(__ANDROID__) -// avoid setting/restoring signal mask, which involves costly syscalls -#define UPB_SETJMP(buf) sigsetjmp(buf, 0) -#define UPB_LONGJMP(buf, val) siglongjmp(buf, val) -#elif defined(WASM_WAMR) -#define UPB_SETJMP(buf) 0 -#define UPB_LONGJMP(buf, val) abort() -#else -#define UPB_SETJMP(buf) setjmp(buf) -#define UPB_LONGJMP(buf, val) longjmp(buf, val) -#endif - -#if ((__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)) -#define UPB_USE_C11_ATOMICS -#elif defined(__has_extension) -#if __has_extension(c_atomic) -#define UPB_USE_C11_ATOMICS -#endif -#elif defined(__GNUC__) -// GCC supported atomics as an extension before it supported __has_extension -#define UPB_USE_C11_ATOMICS -#elif defined(_MSC_VER) -#define UPB_USE_MSC_ATOMICS -#endif - -#if defined(UPB_USE_C11_ATOMICS) -#define UPB_ATOMIC(T) _Atomic(T) -#elif defined(UPB_USE_MSC_ATOMICS) -#define UPB_ATOMIC(T) volatile T -#else -#define UPB_ATOMIC(T) T -#endif - -/* UPB_PTRADD(ptr, ofs): add pointer while avoiding "NULL + 0" UB */ -#define UPB_PTRADD(ptr, ofs) ((ofs) ? (ptr) + (ofs) : (ptr)) - -#define UPB_PRIVATE(x) x##_dont_copy_me__upb_internal_use_only - -#ifdef UPB_ALLOW_PRIVATE_ACCESS__FOR_BITS_ONLY -#define UPB_ONLYBITS(x) x -#else -#define UPB_ONLYBITS(x) UPB_PRIVATE(x) -#endif - -/* Configure whether fasttable is switched on or not. *************************/ - -#ifdef __has_attribute -#define UPB_HAS_ATTRIBUTE(x) __has_attribute(x) -#else -#define UPB_HAS_ATTRIBUTE(x) 0 -#endif - -#if UPB_HAS_ATTRIBUTE(musttail) -#define UPB_MUSTTAIL __attribute__((musttail)) -#else -#define UPB_MUSTTAIL -#endif - -#undef UPB_HAS_ATTRIBUTE - -/* This check is not fully robust: it does not require that we have "musttail" - * support available. We need tail calls to avoid consuming arbitrary amounts - * of stack space. - * - * GCC/Clang can mostly be trusted to generate tail calls as long as - * optimization is enabled, but, debug builds will not generate tail calls - * unless "musttail" is available. - * - * We should probably either: - * 1. require that the compiler supports musttail. - * 2. add some fallback code for when musttail isn't available (ie. return - * instead of tail calling). This is safe and portable, but this comes at - * a CPU cost. - */ -#if (defined(__x86_64__) || defined(__aarch64__)) && defined(__GNUC__) -#define UPB_FASTTABLE_SUPPORTED 1 -#else -#define UPB_FASTTABLE_SUPPORTED 0 -#endif - -/* define UPB_ENABLE_FASTTABLE to force fast table support. - * This is useful when we want to ensure we are really getting fasttable, - * for example for testing or benchmarking. */ -#if defined(UPB_ENABLE_FASTTABLE) -#if !UPB_FASTTABLE_SUPPORTED -#error fasttable is x86-64/ARM64 only and requires GCC or Clang. -#endif -#define UPB_FASTTABLE 1 -/* Define UPB_TRY_ENABLE_FASTTABLE to use fasttable if possible. - * This is useful for releasing code that might be used on multiple platforms, - * for example the PHP or Ruby C extensions. */ -#elif defined(UPB_TRY_ENABLE_FASTTABLE) -#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED -#else -#define UPB_FASTTABLE 0 -#endif - -/* UPB_FASTTABLE_INIT() allows protos compiled for fasttable to gracefully - * degrade to non-fasttable if the runtime or platform do not support it. */ -#if !UPB_FASTTABLE -#define UPB_FASTTABLE_INIT(...) -#define UPB_FASTTABLE_MASK(mask) -1 -#else -#define UPB_FASTTABLE_INIT(...) __VA_ARGS__ -#define UPB_FASTTABLE_MASK(mask) mask -#endif - -#undef UPB_FASTTABLE_SUPPORTED - -/* ASAN poisoning (for arena). - * If using UPB from an interpreted language like Ruby, a build of the - * interpreter compiled with ASAN enabled must be used in order to get sane and - * expected behavior. - */ - -/* Due to preprocessor limitations, the conditional logic for setting - * UPB_CLANG_ASAN below cannot be consolidated into a portable one-liner. - * See https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html. - */ -#if defined(__has_feature) -#if __has_feature(address_sanitizer) -#define UPB_CLANG_ASAN 1 -#else -#define UPB_CLANG_ASAN 0 -#endif -#if __has_feature(thread_sanitizer) -#define UPB_CLANG_TSAN 1 -#else -#define UPB_CLANG_TSAN 0 -#endif -#else -#define UPB_CLANG_ASAN 0 -#define UPB_CLANG_TSAN 0 -#endif - -#if defined(__SANITIZE_ADDRESS__) || UPB_CLANG_ASAN -#define UPB_ASAN 1 -#define UPB_ASAN_GUARD_SIZE 32 -#ifdef __cplusplus - extern "C" { -#endif - void __asan_poison_memory_region(void const volatile *addr, size_t size); - void __asan_unpoison_memory_region(void const volatile *addr, size_t size); -#ifdef __cplusplus -} /* extern "C" */ -#endif -#define UPB_POISON_MEMORY_REGION(addr, size) \ - __asan_poison_memory_region((addr), (size)) -#define UPB_UNPOISON_MEMORY_REGION(addr, size) \ - __asan_unpoison_memory_region((addr), (size)) -#else -#define UPB_ASAN 0 -#define UPB_ASAN_GUARD_SIZE 0 -#define UPB_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) -#define UPB_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) -#endif - -#if defined(__SANITIZE_THREAD__) || UPB_CLANG_TSAN -#define UPB_TSAN_PUBLISHED_MEMBER uintptr_t upb_tsan_safely_published; -#define UPB_TSAN_INIT_PUBLISHED(ptr) (ptr)->upb_tsan_safely_published = 0x5AFE -#define UPB_TSAN_CHECK_PUBLISHED(ptr) \ - UPB_ASSERT((ptr)->upb_tsan_safely_published == 0x5AFE) -#define UPB_TSAN_PUBLISH 1 -#define UPB_TSAN_CHECK_READ(member) \ - __asm__ volatile("" ::"r"(*(char *)&(member))) -#define UPB_TSAN_CHECK_WRITE(member) \ - do { \ - char *write_upb_tsan_detect_race_ptr = (char *)&(member); \ - char write_upb_tsan_detect_race = *write_upb_tsan_detect_race_ptr; \ - __asm__ volatile("" : "+r"(write_upb_tsan_detect_race)); \ - *write_upb_tsan_detect_race_ptr = write_upb_tsan_detect_race; \ - } while (false) -#else -#define UPB_TSAN_PUBLISHED_MEMBER -#define UPB_TSAN_INIT_PUBLISHED(ptr) -#define UPB_TSAN_CHECK_PUBLISHED(ptr) \ - do { \ - } while (false && (ptr)) -#define UPB_TSAN_PUBLISH 0 -#define UPB_TSAN_CHECK_READ(member) \ - do { \ - } while (false && (member)) -#define UPB_TSAN_CHECK_WRITE(member) \ - do { \ - } while (false && (member)) -#endif - -/* Disable proto2 arena behavior (TEMPORARY) **********************************/ - -#ifdef UPB_DISABLE_CLOSED_ENUM_CHECKING -#define UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN 1 -#else -#define UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN 0 -#endif - -#if defined(__cplusplus) -#if defined(__clang__) || UPB_GNUC_MIN(6, 0) -// https://gcc.gnu.org/gcc-6/changes.html -#if __cplusplus >= 201402L -#define UPB_DEPRECATED [[deprecated]] -#else -#define UPB_DEPRECATED __attribute__((deprecated)) -#endif -#else -#define UPB_DEPRECATED -#endif -#else -#define UPB_DEPRECATED -#endif - -#if defined(UPB_IS_GOOGLE3) && \ - (!defined(UPB_BOOTSTRAP_STAGE) || UPB_BOOTSTRAP_STAGE != 0) -#define UPB_DESC(sym) proto2_##sym -#define UPB_DESC_MINITABLE(sym) &proto2__##sym##_msg_init -#elif defined(UPB_IS_GOOGLE3) && defined(UPB_BOOTSTRAP_STAGE) && \ - UPB_BOOTSTRAP_STAGE == 0 -#define UPB_DESC(sym) proto2_##sym -#define UPB_DESC_MINITABLE(sym) proto2__##sym##_msg_init() -#elif defined(UPB_BOOTSTRAP_STAGE) && UPB_BOOTSTRAP_STAGE == 0 -#define UPB_DESC(sym) google_protobuf_##sym -#define UPB_DESC_MINITABLE(sym) google__protobuf__##sym##_msg_init() -#else -#define UPB_DESC(sym) google_protobuf_##sym -#define UPB_DESC_MINITABLE(sym) &google__protobuf__##sym##_msg_init -#endif - -#undef UPB_IS_GOOGLE3 - -#ifdef __clang__ -#define UPB_NO_SANITIZE_ADDRESS __attribute__((no_sanitize("address"))) -#else -#define UPB_NO_SANITIZE_ADDRESS -#endif - -// Linker arrays combine elements from multiple translation units into a single -// array that can be iterated over at runtime. -// -// It is an alternative to pre-main "registration" functions. -// -// Usage: -// -// // In N translation units. -// UPB_LINKARR_APPEND(foo_array) static int elems[3] = {1, 2, 3}; -// -// // At runtime: -// UPB_LINKARR_DECLARE(foo_array, int); -// -// void f() { -// const int* start = UPB_LINKARR_START(foo_array); -// const int* stop = UPB_LINKARR_STOP(foo_array); -// for (const int* p = start; p < stop; p++) { -// // Windows can introduce zero padding, so we have to skip zeroes. -// if (*p != 0) { -// vec.push_back(*p); -// } -// } -// } - -#if defined(__ELF__) || defined(__wasm__) - -#define UPB_LINKARR_APPEND(name) \ - __attribute__((retain, used, \ - section("linkarr_" #name))) UPB_NO_SANITIZE_ADDRESS -#define UPB_LINKARR_DECLARE(name, type) \ - extern type __start_linkarr_##name; \ - extern type __stop_linkarr_##name; \ - UPB_LINKARR_APPEND(name) type UPB_linkarr_internal_empty_##name[1] -#define UPB_LINKARR_START(name) (&__start_linkarr_##name) -#define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) - -#elif defined(__MACH__) - -/* As described in: https://stackoverflow.com/a/22366882 */ -#define UPB_LINKARR_APPEND(name) \ - __attribute__((retain, used, \ - section("__DATA,__la_" #name))) UPB_NO_SANITIZE_ADDRESS -#define UPB_LINKARR_DECLARE(name, type) \ - extern type __start_linkarr_##name __asm( \ - "section$start$__DATA$__la_" #name); \ - extern type __stop_linkarr_##name __asm( \ - "section$end$__DATA$" \ - "__la_" #name); \ - UPB_LINKARR_APPEND(name) type UPB_linkarr_internal_empty_##name[1] -#define UPB_LINKARR_START(name) (&__start_linkarr_##name) -#define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) - -#elif defined(_MSC_VER) && defined(__clang__) - -/* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ - -// Usage of __attribute__ here probably means this is Clang-specific, and would -// not work on MSVC. -#define UPB_LINKARR_APPEND(name) \ - __declspec(allocate("la_" #name "$j")) \ - __attribute__((retain, used)) UPB_NO_SANITIZE_ADDRESS -#define UPB_LINKARR_DECLARE(name, type) \ - __declspec(allocate("la_" #name "$a")) type __start_linkarr_##name; \ - __declspec(allocate("la_" #name "$z")) type __stop_linkarr_##name; \ - UPB_LINKARR_APPEND(name) type UPB_linkarr_internal_empty_##name[1] = {0} -#define UPB_LINKARR_START(name) (&__start_linkarr_##name) -#define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) - -#else - -// Linker arrays are not supported on this platform. Make appends a no-op but -// don't define the other macros. -#define UPB_LINKARR_APPEND(name) - -#endif - -// Future versions of upb will include breaking changes to some APIs. -// This macro can be set to enable these API changes ahead of time, so that -// user code can be updated before upgrading versions of protobuf. -#ifdef UPB_FUTURE_BREAKING_CHANGES - -#endif - - -#include -#include -#include -#include -#include - -// Must be last. - -void upb_Status_Clear(upb_Status* status) { - if (!status) return; - status->ok = true; - status->msg[0] = '\0'; -} - -bool upb_Status_IsOk(const upb_Status* status) { return status->ok; } - -const char* upb_Status_ErrorMessage(const upb_Status* status) { - return status->msg; -} - -void upb_Status_SetErrorMessage(upb_Status* status, const char* msg) { - if (!status) return; - status->ok = false; - strncpy(status->msg, msg, _kUpb_Status_MaxMessage - 1); - status->msg[_kUpb_Status_MaxMessage - 1] = '\0'; -} - -void upb_Status_SetErrorFormat(upb_Status* status, const char* fmt, ...) { - va_list args; - va_start(args, fmt); - upb_Status_VSetErrorFormat(status, fmt, args); - va_end(args); -} - -void upb_Status_VSetErrorFormat(upb_Status* status, const char* fmt, - va_list args) { - if (!status) return; - status->ok = false; - vsnprintf(status->msg, sizeof(status->msg), fmt, args); - status->msg[_kUpb_Status_MaxMessage - 1] = '\0'; -} - -void upb_Status_VAppendErrorFormat(upb_Status* status, const char* fmt, - va_list args) { - size_t len; - if (!status) return; - status->ok = false; - len = strlen(status->msg); - vsnprintf(status->msg + len, sizeof(status->msg) - len, fmt, args); - status->msg[_kUpb_Status_MaxMessage - 1] = '\0'; -} - - -static const char* _upb_EpsCopyInputStream_NoOpCallback( - upb_EpsCopyInputStream* e, const char* old_end, const char* new_start) { - return new_start; -} - -const char* _upb_EpsCopyInputStream_IsDoneFallbackNoCallback( - upb_EpsCopyInputStream* e, const char* ptr, int overrun) { - return _upb_EpsCopyInputStream_IsDoneFallbackInline( - e, ptr, overrun, _upb_EpsCopyInputStream_NoOpCallback); -} - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Must be last. - -typedef struct { - const char *ptr, *end; - upb_Arena* arena; /* TODO: should we have a tmp arena for tmp data? */ - const upb_DefPool* symtab; - int depth; - int result; - upb_Status* status; - jmp_buf err; - int line; - const char* line_begin; - bool is_first; - int options; - const upb_FieldDef* debug_field; -} jsondec; - -typedef struct { - upb_MessageValue value; - bool ignore; -} upb_JsonMessageValue; - -enum { JD_OBJECT, JD_ARRAY, JD_STRING, JD_NUMBER, JD_TRUE, JD_FALSE, JD_NULL }; - -/* Forward declarations of mutually-recursive functions. */ -static void jsondec_wellknown(jsondec* d, upb_Message* msg, - const upb_MessageDef* m); -static upb_JsonMessageValue jsondec_value(jsondec* d, const upb_FieldDef* f); -static void jsondec_wellknownvalue(jsondec* d, upb_Message* msg, - const upb_MessageDef* m); -static void jsondec_object(jsondec* d, upb_Message* msg, - const upb_MessageDef* m); - -static bool jsondec_streql(upb_StringView str, const char* lit) { - return str.size == strlen(lit) && memcmp(str.data, lit, str.size) == 0; -} - -static bool jsondec_isnullvalue(const upb_FieldDef* f) { - return upb_FieldDef_CType(f) == kUpb_CType_Enum && - strcmp(upb_EnumDef_FullName(upb_FieldDef_EnumSubDef(f)), - "google.protobuf.NullValue") == 0; -} - -static bool jsondec_isvalue(const upb_FieldDef* f) { - return (upb_FieldDef_CType(f) == kUpb_CType_Message && - upb_MessageDef_WellKnownType(upb_FieldDef_MessageSubDef(f)) == - kUpb_WellKnown_Value) || - jsondec_isnullvalue(f); -} - -static void jsondec_seterrmsg(jsondec* d, const char* msg) { - upb_Status_SetErrorFormat(d->status, "Error parsing JSON @%d:%d: %s", d->line, - (int)(d->ptr - d->line_begin), msg); -} - -UPB_NORETURN static void jsondec_err(jsondec* d, const char* msg) { - jsondec_seterrmsg(d, msg); - UPB_LONGJMP(d->err, 1); -} - -UPB_PRINTF(2, 3) -UPB_NORETURN static void jsondec_errf(jsondec* d, const char* fmt, ...) { - va_list argp; - upb_Status_SetErrorFormat(d->status, "Error parsing JSON @%d:%d: ", d->line, - (int)(d->ptr - d->line_begin)); - va_start(argp, fmt); - upb_Status_VAppendErrorFormat(d->status, fmt, argp); - va_end(argp); - UPB_LONGJMP(d->err, 1); -} - -// Advances d->ptr until the next non-whitespace character or to the end of -// the buffer. -static void jsondec_consumews(jsondec* d) { - while (d->ptr != d->end) { - switch (*d->ptr) { - case '\n': - d->line++; - d->line_begin = d->ptr; - /* Fallthrough. */ - case '\r': - case '\t': - case ' ': - d->ptr++; - break; - default: - return; - } - } -} - -// Advances d->ptr until the next non-whitespace character. Postcondition that -// d->ptr is pointing at a valid non-whitespace character (will err if end of -// buffer is reached). -static void jsondec_skipws(jsondec* d) { - jsondec_consumews(d); - if (d->ptr == d->end) { - jsondec_err(d, "Unexpected EOF"); - } -} - -static bool jsondec_tryparsech(jsondec* d, char ch) { - if (d->ptr == d->end || *d->ptr != ch) return false; - d->ptr++; - return true; -} - -static void jsondec_parselit(jsondec* d, const char* lit) { - size_t avail = d->end - d->ptr; - size_t len = strlen(lit); - if (avail < len || memcmp(d->ptr, lit, len) != 0) { - jsondec_errf(d, "Expected: '%s'", lit); - } - d->ptr += len; -} - -static void jsondec_wsch(jsondec* d, char ch) { - jsondec_skipws(d); - if (!jsondec_tryparsech(d, ch)) { - jsondec_errf(d, "Expected: '%c'", ch); - } -} - -static void jsondec_true(jsondec* d) { jsondec_parselit(d, "true"); } -static void jsondec_false(jsondec* d) { jsondec_parselit(d, "false"); } -static void jsondec_null(jsondec* d) { jsondec_parselit(d, "null"); } - -static void jsondec_entrysep(jsondec* d) { - jsondec_skipws(d); - jsondec_parselit(d, ":"); -} - -static int jsondec_rawpeek(jsondec* d) { - if (d->ptr == d->end) { - jsondec_err(d, "Unexpected EOF"); - } - - switch (*d->ptr) { - case '{': - return JD_OBJECT; - case '[': - return JD_ARRAY; - case '"': - return JD_STRING; - case '-': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - return JD_NUMBER; - case 't': - return JD_TRUE; - case 'f': - return JD_FALSE; - case 'n': - return JD_NULL; - default: - jsondec_errf(d, "Unexpected character: '%c'", *d->ptr); - } -} - -/* JSON object/array **********************************************************/ - -/* These are used like so: - * - * jsondec_objstart(d); - * while (jsondec_objnext(d)) { - * ... - * } - * jsondec_objend(d) */ - -static int jsondec_peek(jsondec* d) { - jsondec_skipws(d); - return jsondec_rawpeek(d); -} - -static void jsondec_push(jsondec* d) { - if (--d->depth < 0) { - jsondec_err(d, "Recursion limit exceeded"); - } - d->is_first = true; -} - -static bool jsondec_seqnext(jsondec* d, char end_ch) { - bool is_first = d->is_first; - d->is_first = false; - jsondec_skipws(d); - if (*d->ptr == end_ch) return false; - if (!is_first) jsondec_parselit(d, ","); - return true; -} - -static void jsondec_arrstart(jsondec* d) { - jsondec_push(d); - jsondec_wsch(d, '['); -} - -static void jsondec_arrend(jsondec* d) { - d->depth++; - jsondec_wsch(d, ']'); -} - -static bool jsondec_arrnext(jsondec* d) { return jsondec_seqnext(d, ']'); } - -static void jsondec_objstart(jsondec* d) { - jsondec_push(d); - jsondec_wsch(d, '{'); -} - -static void jsondec_objend(jsondec* d) { - d->depth++; - jsondec_wsch(d, '}'); -} - -static bool jsondec_objnext(jsondec* d) { - if (!jsondec_seqnext(d, '}')) return false; - if (jsondec_peek(d) != JD_STRING) { - jsondec_err(d, "Object must start with string"); - } - return true; -} - -/* JSON number ****************************************************************/ - -static bool jsondec_tryskipdigits(jsondec* d) { - const char* start = d->ptr; - - while (d->ptr < d->end) { - if (*d->ptr < '0' || *d->ptr > '9') { - break; - } - d->ptr++; - } - - return d->ptr != start; -} - -static void jsondec_skipdigits(jsondec* d) { - if (!jsondec_tryskipdigits(d)) { - jsondec_err(d, "Expected one or more digits"); - } -} - -static double jsondec_number(jsondec* d) { - const char* start = d->ptr; - - UPB_ASSERT(jsondec_rawpeek(d) == JD_NUMBER); - - /* Skip over the syntax of a number, as specified by JSON. */ - if (*d->ptr == '-') d->ptr++; - - if (jsondec_tryparsech(d, '0')) { - if (jsondec_tryskipdigits(d)) { - jsondec_err(d, "number cannot have leading zero"); - } - } else { - jsondec_skipdigits(d); - } - - if (d->ptr == d->end) goto parse; - if (jsondec_tryparsech(d, '.')) { - jsondec_skipdigits(d); - } - if (d->ptr == d->end) goto parse; - - if (*d->ptr == 'e' || *d->ptr == 'E') { - d->ptr++; - if (d->ptr == d->end) { - jsondec_err(d, "Unexpected EOF in number"); - } - if (*d->ptr == '+' || *d->ptr == '-') { - d->ptr++; - } - jsondec_skipdigits(d); - } - -parse: - /* Having verified the syntax of a JSON number, use strtod() to parse - * (strtod() accepts a superset of JSON syntax). */ - errno = 0; - { - // Copy the number into a null-terminated scratch buffer since strtod - // expects a null-terminated string. - char nullz[64]; - ptrdiff_t len = d->ptr - start; - if (len > (ptrdiff_t)(sizeof(nullz) - 1)) { - jsondec_err(d, "excessively long number"); - } - memcpy(nullz, start, len); - nullz[len] = '\0'; - - char* end; - double val = strtod(nullz, &end); - UPB_ASSERT(end - nullz == len); - - /* Currently the min/max-val conformance tests fail if we check this. Does - * this mean the conformance tests are wrong or strtod() is wrong, or - * something else? Investigate further. */ - /* - if (errno == ERANGE) { - jsondec_err(d, "Number out of range"); - } - */ - - if (val > DBL_MAX || val < -DBL_MAX) { - jsondec_err(d, "Number out of range"); - } - - return val; - } -} - -/* JSON string ****************************************************************/ - -static char jsondec_escape(jsondec* d) { - switch (*d->ptr++) { - case '"': - return '\"'; - case '\\': - return '\\'; - case '/': - return '/'; - case 'b': - return '\b'; - case 'f': - return '\f'; - case 'n': - return '\n'; - case 'r': - return '\r'; - case 't': - return '\t'; - default: - jsondec_err(d, "Invalid escape char"); - } -} - -static uint32_t jsondec_codepoint(jsondec* d) { - uint32_t cp = 0; - const char* end; - - if (d->end - d->ptr < 4) { - jsondec_err(d, "EOF inside string"); - } - - end = d->ptr + 4; - while (d->ptr < end) { - char ch = *d->ptr++; - if (ch >= '0' && ch <= '9') { - ch -= '0'; - } else if (ch >= 'a' && ch <= 'f') { - ch = ch - 'a' + 10; - } else if (ch >= 'A' && ch <= 'F') { - ch = ch - 'A' + 10; - } else { - jsondec_err(d, "Invalid hex digit"); - } - cp = (cp << 4) | ch; - } - - return cp; -} - -/* Parses a \uXXXX unicode escape (possibly a surrogate pair). */ -static size_t jsondec_unicode(jsondec* d, char* out) { - uint32_t cp = jsondec_codepoint(d); - if (upb_Unicode_IsHigh(cp)) { - /* Surrogate pair: two 16-bit codepoints become a 32-bit codepoint. */ - jsondec_parselit(d, "\\u"); - uint32_t low = jsondec_codepoint(d); - if (!upb_Unicode_IsLow(low)) jsondec_err(d, "Invalid low surrogate"); - cp = upb_Unicode_FromPair(cp, low); - } else if (upb_Unicode_IsLow(cp)) { - jsondec_err(d, "Unpaired low surrogate"); - } - - /* Write to UTF-8 */ - int bytes = upb_Unicode_ToUTF8(cp, out); - if (bytes == 0) jsondec_err(d, "Invalid codepoint"); - return bytes; -} - -static void jsondec_resize(jsondec* d, char** buf, char** end, char** buf_end) { - size_t oldsize = *buf_end - *buf; - size_t len = *end - *buf; - size_t size = UPB_MAX(8, 2 * oldsize); - - *buf = upb_Arena_Realloc(d->arena, *buf, len, size); - if (!*buf) jsondec_err(d, "Out of memory"); - - *end = *buf + len; - *buf_end = *buf + size; -} - -static upb_StringView jsondec_string(jsondec* d) { - char* buf = NULL; - char* end = NULL; - char* buf_end = NULL; - - jsondec_skipws(d); - - if (*d->ptr++ != '"') { - jsondec_err(d, "Expected string"); - } - - while (d->ptr < d->end) { - char ch = *d->ptr++; - - if (end == buf_end) { - jsondec_resize(d, &buf, &end, &buf_end); - } - - switch (ch) { - case '"': { - upb_StringView ret; - ret.data = buf; - ret.size = end - buf; - *end = '\0'; /* Needed for possible strtod(). */ - return ret; - } - case '\\': - if (d->ptr == d->end) goto eof; - if (*d->ptr == 'u') { - d->ptr++; - if (buf_end - end < 4) { - /* Allow space for maximum-sized codepoint (4 bytes). */ - jsondec_resize(d, &buf, &end, &buf_end); - } - end += jsondec_unicode(d, end); - } else { - *end++ = jsondec_escape(d); - } - break; - default: - if ((unsigned char)ch < 0x20) { - jsondec_err(d, "Invalid char in JSON string"); - } - *end++ = ch; - break; - } - } - -eof: - jsondec_err(d, "EOF inside string"); -} - -static void jsondec_skipval(jsondec* d) { - switch (jsondec_peek(d)) { - case JD_OBJECT: - jsondec_objstart(d); - while (jsondec_objnext(d)) { - jsondec_string(d); - jsondec_entrysep(d); - jsondec_skipval(d); - } - jsondec_objend(d); - break; - case JD_ARRAY: - jsondec_arrstart(d); - while (jsondec_arrnext(d)) { - jsondec_skipval(d); - } - jsondec_arrend(d); - break; - case JD_TRUE: - jsondec_true(d); - break; - case JD_FALSE: - jsondec_false(d); - break; - case JD_NULL: - jsondec_null(d); - break; - case JD_STRING: - jsondec_string(d); - break; - case JD_NUMBER: - jsondec_number(d); - break; - } -} - -/* Base64 decoding for bytes fields. ******************************************/ - -static unsigned int jsondec_base64_tablelookup(const char ch) { - /* Table includes the normal base64 chars plus the URL-safe variant. */ - const signed char table[256] = { - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, 62 /*+*/, -1, 62 /*-*/, -1, 63 /*/ */, 52 /*0*/, - 53 /*1*/, 54 /*2*/, 55 /*3*/, 56 /*4*/, 57 /*5*/, 58 /*6*/, 59 /*7*/, - 60 /*8*/, 61 /*9*/, -1, -1, -1, -1, -1, - -1, -1, 0 /*A*/, 1 /*B*/, 2 /*C*/, 3 /*D*/, 4 /*E*/, - 5 /*F*/, 6 /*G*/, 07 /*H*/, 8 /*I*/, 9 /*J*/, 10 /*K*/, 11 /*L*/, - 12 /*M*/, 13 /*N*/, 14 /*O*/, 15 /*P*/, 16 /*Q*/, 17 /*R*/, 18 /*S*/, - 19 /*T*/, 20 /*U*/, 21 /*V*/, 22 /*W*/, 23 /*X*/, 24 /*Y*/, 25 /*Z*/, - -1, -1, -1, -1, 63 /*_*/, -1, 26 /*a*/, - 27 /*b*/, 28 /*c*/, 29 /*d*/, 30 /*e*/, 31 /*f*/, 32 /*g*/, 33 /*h*/, - 34 /*i*/, 35 /*j*/, 36 /*k*/, 37 /*l*/, 38 /*m*/, 39 /*n*/, 40 /*o*/, - 41 /*p*/, 42 /*q*/, 43 /*r*/, 44 /*s*/, 45 /*t*/, 46 /*u*/, 47 /*v*/, - 48 /*w*/, 49 /*x*/, 50 /*y*/, 51 /*z*/, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1}; - - /* Sign-extend return value so high bit will be set on any unexpected char. */ - return table[(unsigned)ch]; -} - -static char* jsondec_partialbase64(jsondec* d, const char* ptr, const char* end, - char* out) { - int32_t val = -1; - - switch (end - ptr) { - case 2: - val = jsondec_base64_tablelookup(ptr[0]) << 18 | - jsondec_base64_tablelookup(ptr[1]) << 12; - out[0] = val >> 16; - out += 1; - break; - case 3: - val = jsondec_base64_tablelookup(ptr[0]) << 18 | - jsondec_base64_tablelookup(ptr[1]) << 12 | - jsondec_base64_tablelookup(ptr[2]) << 6; - out[0] = val >> 16; - out[1] = (val >> 8) & 0xff; - out += 2; - break; - } - - if (val < 0) { - jsondec_err(d, "Corrupt base64"); - } - - return out; -} - -static size_t jsondec_base64(jsondec* d, upb_StringView str) { - /* We decode in place. This is safe because this is a new buffer (not - * aliasing the input) and because base64 decoding shrinks 4 bytes into 3. */ - char* out = (char*)str.data; - const char* ptr = str.data; - const char* end = ptr + str.size; - const char* end4 = ptr + (str.size & -4); /* Round down to multiple of 4. */ - - for (; ptr < end4; ptr += 4, out += 3) { - int val = jsondec_base64_tablelookup(ptr[0]) << 18 | - jsondec_base64_tablelookup(ptr[1]) << 12 | - jsondec_base64_tablelookup(ptr[2]) << 6 | - jsondec_base64_tablelookup(ptr[3]) << 0; - - if (val < 0) { - /* Junk chars or padding. Remove trailing padding, if any. */ - if (end - ptr == 4 && ptr[3] == '=') { - if (ptr[2] == '=') { - end -= 2; - } else { - end -= 1; - } - } - break; - } - - out[0] = val >> 16; - out[1] = (val >> 8) & 0xff; - out[2] = val & 0xff; - } - - if (ptr < end) { - /* Process remaining chars. We do not require padding. */ - out = jsondec_partialbase64(d, ptr, end, out); - } - - return out - str.data; -} - -/* Low-level integer parsing **************************************************/ - -static const char* jsondec_buftouint64(jsondec* d, const char* ptr, - const char* end, uint64_t* val) { - const char* out = upb_BufToUint64(ptr, end, val); - if (!out) jsondec_err(d, "Integer overflow"); - return out; -} - -static const char* jsondec_buftoint64(jsondec* d, const char* ptr, - const char* end, int64_t* val, - bool* is_neg) { - const char* out = upb_BufToInt64(ptr, end, val, is_neg); - if (!out) jsondec_err(d, "Integer overflow"); - return out; -} - -static uint64_t jsondec_strtouint64(jsondec* d, upb_StringView str) { - const char* end = str.data + str.size; - uint64_t ret; - if (jsondec_buftouint64(d, str.data, end, &ret) != end) { - jsondec_err(d, "Non-number characters in quoted integer"); - } - return ret; -} - -static int64_t jsondec_strtoint64(jsondec* d, upb_StringView str) { - const char* end = str.data + str.size; - int64_t ret; - if (jsondec_buftoint64(d, str.data, end, &ret, NULL) != end) { - jsondec_err(d, "Non-number characters in quoted integer"); - } - return ret; -} - -static void jsondec_checkempty(jsondec* d, upb_StringView str, - const upb_FieldDef* f) { - if (str.size != 0) return; - d->result = kUpb_JsonDecodeResult_Error; - upb_Status_SetErrorFormat(d->status, - "Empty string is not a valid number (field: %s). " - "This will be an error in a future version.", - upb_FieldDef_FullName(f)); -} - -/* Primitive value types ******************************************************/ - -/* Parse INT32 or INT64 value. */ -static upb_MessageValue jsondec_int(jsondec* d, const upb_FieldDef* f) { - upb_MessageValue val; - - switch (jsondec_peek(d)) { - case JD_NUMBER: { - double dbl = jsondec_number(d); - if (dbl > 9223372036854774784.0 || dbl < -9223372036854775808.0) { - jsondec_err(d, "JSON number is out of range."); - } - val.int64_val = dbl; /* must be guarded, overflow here is UB */ - if (val.int64_val != dbl) { - jsondec_errf(d, "JSON number was not integral (%f != %" PRId64 ")", dbl, - val.int64_val); - } - break; - } - case JD_STRING: { - upb_StringView str = jsondec_string(d); - jsondec_checkempty(d, str, f); - val.int64_val = jsondec_strtoint64(d, str); - break; - } - default: - jsondec_err(d, "Expected number or string"); - } - - if (upb_FieldDef_CType(f) == kUpb_CType_Int32 || - upb_FieldDef_CType(f) == kUpb_CType_Enum) { - if (val.int64_val > INT32_MAX || val.int64_val < INT32_MIN) { - jsondec_err(d, "Integer out of range."); - } - val.int32_val = (int32_t)val.int64_val; - } - - return val; -} - -/* Parse UINT32 or UINT64 value. */ -static upb_MessageValue jsondec_uint(jsondec* d, const upb_FieldDef* f) { - upb_MessageValue val; - - switch (jsondec_peek(d)) { - case JD_NUMBER: { - double dbl = jsondec_number(d); - if (dbl > 18446744073709549568.0 || dbl < 0) { - jsondec_err(d, "JSON number is out of range."); - } - val.uint64_val = dbl; /* must be guarded, overflow here is UB */ - if (val.uint64_val != dbl) { - jsondec_errf(d, "JSON number was not integral (%f != %" PRIu64 ")", dbl, - val.uint64_val); - } - break; - } - case JD_STRING: { - upb_StringView str = jsondec_string(d); - jsondec_checkempty(d, str, f); - val.uint64_val = jsondec_strtouint64(d, str); - break; - } - default: - jsondec_err(d, "Expected number or string"); - } - - if (upb_FieldDef_CType(f) == kUpb_CType_UInt32) { - if (val.uint64_val > UINT32_MAX) { - jsondec_err(d, "Integer out of range."); - } - val.uint32_val = (uint32_t)val.uint64_val; - } - - return val; -} - -/* Parse DOUBLE or FLOAT value. */ -static upb_MessageValue jsondec_double(jsondec* d, const upb_FieldDef* f) { - upb_StringView str; - upb_MessageValue val; - - switch (jsondec_peek(d)) { - case JD_NUMBER: - val.double_val = jsondec_number(d); - break; - case JD_STRING: - str = jsondec_string(d); - if (str.size == 0) { - jsondec_checkempty(d, str, f); - val.double_val = 0.0; - } else if (jsondec_streql(str, "NaN")) { - val.double_val = NAN; - } else if (jsondec_streql(str, "Infinity")) { - val.double_val = INFINITY; - } else if (jsondec_streql(str, "-Infinity")) { - val.double_val = -INFINITY; - } else { - char* end; - val.double_val = strtod(str.data, &end); - if (end != str.data + str.size) { - d->result = kUpb_JsonDecodeResult_Error; - upb_Status_SetErrorFormat( - d->status, - "Non-number characters in quoted number (field: %s). " - "This will be an error in a future version.", - upb_FieldDef_FullName(f)); - } - } - break; - default: - jsondec_err(d, "Expected number or string"); - } - - if (upb_FieldDef_CType(f) == kUpb_CType_Float) { - float f = val.double_val; - if (val.double_val != INFINITY && val.double_val != -INFINITY) { - if (f == INFINITY || f == -INFINITY) jsondec_err(d, "Float out of range"); - } - val.float_val = f; - } - - return val; -} - -/* Parse STRING or BYTES value. */ -static upb_MessageValue jsondec_strfield(jsondec* d, const upb_FieldDef* f) { - upb_MessageValue val; - val.str_val = jsondec_string(d); - if (upb_FieldDef_CType(f) == kUpb_CType_Bytes) { - val.str_val.size = jsondec_base64(d, val.str_val); - } - return val; -} - -static upb_JsonMessageValue jsondec_enum(jsondec* d, const upb_FieldDef* f) { - switch (jsondec_peek(d)) { - case JD_STRING: { - upb_StringView str = jsondec_string(d); - const upb_EnumDef* e = upb_FieldDef_EnumSubDef(f); - const upb_EnumValueDef* ev = - upb_EnumDef_FindValueByNameWithSize(e, str.data, str.size); - upb_JsonMessageValue val = {.ignore = false}; - if (ev) { - val.value.int32_val = upb_EnumValueDef_Number(ev); - } else { - if (d->options & upb_JsonDecode_IgnoreUnknown) { - val.ignore = true; - } else { - jsondec_errf(d, "Unknown enumerator: '" UPB_STRINGVIEW_FORMAT "'", - UPB_STRINGVIEW_ARGS(str)); - } - } - return val; - } - case JD_NULL: { - if (jsondec_isnullvalue(f)) { - upb_JsonMessageValue val = {.ignore = false}; - jsondec_null(d); - val.value.int32_val = 0; - return val; - } - } - /* Fallthrough. */ - default: - return (upb_JsonMessageValue){.value = jsondec_int(d, f), - .ignore = false}; - } -} - -static upb_MessageValue jsondec_bool(jsondec* d, const upb_FieldDef* f) { - bool is_map_key = upb_FieldDef_Number(f) == 1 && - upb_MessageDef_IsMapEntry(upb_FieldDef_ContainingType(f)); - upb_MessageValue val; - - if (is_map_key) { - upb_StringView str = jsondec_string(d); - if (jsondec_streql(str, "true")) { - val.bool_val = true; - } else if (jsondec_streql(str, "false")) { - val.bool_val = false; - } else { - jsondec_err(d, "Invalid boolean map key"); - } - } else { - switch (jsondec_peek(d)) { - case JD_TRUE: - val.bool_val = true; - jsondec_true(d); - break; - case JD_FALSE: - val.bool_val = false; - jsondec_false(d); - break; - default: - jsondec_err(d, "Expected true or false"); - } - } - - return val; -} - -/* Composite types (array/message/map) ****************************************/ - -static void jsondec_array(jsondec* d, upb_Message* msg, const upb_FieldDef* f) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Array* arr = upb_Message_Mutable(msg, f, d->arena).array; - - jsondec_arrstart(d); - while (jsondec_arrnext(d)) { - upb_JsonMessageValue elem = jsondec_value(d, f); - if (!elem.ignore) { - upb_Array_Append(arr, elem.value, d->arena); - } - } - jsondec_arrend(d); -} - -static void jsondec_map(jsondec* d, upb_Message* msg, const upb_FieldDef* f) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Map* map = upb_Message_Mutable(msg, f, d->arena).map; - const upb_MessageDef* entry = upb_FieldDef_MessageSubDef(f); - const upb_FieldDef* key_f = upb_MessageDef_FindFieldByNumber(entry, 1); - const upb_FieldDef* val_f = upb_MessageDef_FindFieldByNumber(entry, 2); - - jsondec_objstart(d); - while (jsondec_objnext(d)) { - upb_JsonMessageValue key, val; - key = jsondec_value(d, key_f); - UPB_ASSUME(!key.ignore); // Map key cannot be enum. - jsondec_entrysep(d); - val = jsondec_value(d, val_f); - if (!val.ignore) { - upb_Map_Set(map, key.value, val.value, d->arena); - } - } - jsondec_objend(d); -} - -static void jsondec_tomsg(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - if (upb_MessageDef_WellKnownType(m) == kUpb_WellKnown_Unspecified) { - jsondec_object(d, msg, m); - } else { - jsondec_wellknown(d, msg, m); - } -} - -static upb_MessageValue jsondec_msg(jsondec* d, const upb_FieldDef* f) { - const upb_MessageDef* m = upb_FieldDef_MessageSubDef(f); - const upb_MiniTable* layout = upb_MessageDef_MiniTable(m); - upb_Message* msg = upb_Message_New(layout, d->arena); - upb_MessageValue val; - - jsondec_tomsg(d, msg, m); - val.msg_val = msg; - return val; -} - -static void jsondec_field(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_StringView name; - const upb_FieldDef* f; - const upb_FieldDef* preserved; - - name = jsondec_string(d); - jsondec_entrysep(d); - - if (name.size >= 2 && name.data[0] == '[' && - name.data[name.size - 1] == ']') { - f = upb_DefPool_FindExtensionByNameWithSize(d->symtab, name.data + 1, - name.size - 2); - if (f && upb_FieldDef_ContainingType(f) != m) { - jsondec_errf( - d, "Extension %s extends message %s, but was seen in message %s", - upb_FieldDef_FullName(f), - upb_MessageDef_FullName(upb_FieldDef_ContainingType(f)), - upb_MessageDef_FullName(m)); - } - } else { - f = upb_MessageDef_FindByJsonNameWithSize(m, name.data, name.size); - } - - if (!f) { - if ((d->options & upb_JsonDecode_IgnoreUnknown) == 0) { - jsondec_errf(d, "No such field: " UPB_STRINGVIEW_FORMAT, - UPB_STRINGVIEW_ARGS(name)); - } - jsondec_skipval(d); - return; - } - - if (jsondec_peek(d) == JD_NULL && !jsondec_isvalue(f)) { - /* JSON "null" indicates a default value, so no need to set anything. */ - jsondec_null(d); - return; - } - - if (upb_FieldDef_RealContainingOneof(f) && - upb_Message_WhichOneofByDef(msg, upb_FieldDef_ContainingOneof(f))) { - jsondec_err(d, "More than one field for this oneof."); - } - - preserved = d->debug_field; - d->debug_field = f; - - if (upb_FieldDef_IsMap(f)) { - jsondec_map(d, msg, f); - } else if (upb_FieldDef_IsRepeated(f)) { - jsondec_array(d, msg, f); - } else if (upb_FieldDef_IsSubMessage(f)) { - upb_Message* submsg = upb_Message_Mutable(msg, f, d->arena).msg; - const upb_MessageDef* subm = upb_FieldDef_MessageSubDef(f); - jsondec_tomsg(d, submsg, subm); - } else { - upb_JsonMessageValue val = jsondec_value(d, f); - if (!val.ignore) { - upb_Message_SetFieldByDef(msg, f, val.value, d->arena); - } - } - - d->debug_field = preserved; -} - -static void jsondec_object(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - jsondec_objstart(d); - while (jsondec_objnext(d)) { - jsondec_field(d, msg, m); - } - jsondec_objend(d); -} - -static upb_MessageValue jsondec_nonenum(jsondec* d, const upb_FieldDef* f) { - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Bool: - return jsondec_bool(d, f); - case kUpb_CType_Float: - case kUpb_CType_Double: - return jsondec_double(d, f); - case kUpb_CType_UInt32: - case kUpb_CType_UInt64: - return jsondec_uint(d, f); - case kUpb_CType_Int32: - case kUpb_CType_Int64: - return jsondec_int(d, f); - case kUpb_CType_String: - case kUpb_CType_Bytes: - return jsondec_strfield(d, f); - case kUpb_CType_Message: - return jsondec_msg(d, f); - case kUpb_CType_Enum: - default: - UPB_UNREACHABLE(); - } -} - -static upb_JsonMessageValue jsondec_value(jsondec* d, const upb_FieldDef* f) { - if (upb_FieldDef_CType(f) == kUpb_CType_Enum) { - return jsondec_enum(d, f); - } else { - return (upb_JsonMessageValue){.value = jsondec_nonenum(d, f), - .ignore = false}; - } -} - -/* Well-known types ***********************************************************/ - -static int jsondec_tsdigits(jsondec* d, const char** ptr, size_t digits, - const char* after) { - uint64_t val; - const char* p = *ptr; - const char* end = p + digits; - size_t after_len = after ? strlen(after) : 0; - - UPB_ASSERT(digits <= 9); /* int can't overflow. */ - - if (jsondec_buftouint64(d, p, end, &val) != end || - (after_len && memcmp(end, after, after_len) != 0)) { - jsondec_err(d, "Malformed timestamp"); - } - - UPB_ASSERT(val < INT_MAX); - - *ptr = end + after_len; - return (int)val; -} - -static int jsondec_nanos(jsondec* d, const char** ptr, const char* end) { - uint64_t nanos = 0; - const char* p = *ptr; - - if (p != end && *p == '.') { - const char* nano_end = jsondec_buftouint64(d, p + 1, end, &nanos); - int digits = (int)(nano_end - p - 1); - int exp_lg10 = 9 - digits; - if (digits > 9) { - jsondec_err(d, "Too many digits for partial seconds"); - } - while (exp_lg10--) nanos *= 10; - *ptr = nano_end; - } - - UPB_ASSERT(nanos < INT_MAX); - - return (int)nanos; -} - -/* jsondec_epochdays(1970, 1, 1) == 1970-01-01 == 0. */ -int jsondec_epochdays(int y, int m, int d) { - const uint32_t year_base = 4800; /* Before min year, multiple of 400. */ - const uint32_t m_adj = m - 3; /* March-based month. */ - const uint32_t carry = m_adj > (uint32_t)m ? 1 : 0; - const uint32_t adjust = carry ? 12 : 0; - const uint32_t y_adj = y + year_base - carry; - const uint32_t month_days = ((m_adj + adjust) * 62719 + 769) / 2048; - const uint32_t leap_days = y_adj / 4 - y_adj / 100 + y_adj / 400; - return y_adj * 365 + leap_days + month_days + (d - 1) - 2472632; -} - -static int64_t jsondec_unixtime(int y, int m, int d, int h, int min, int s) { - return (int64_t)jsondec_epochdays(y, m, d) * 86400 + h * 3600 + min * 60 + s; -} - -static void jsondec_timestamp(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_MessageValue seconds; - upb_MessageValue nanos; - upb_StringView str = jsondec_string(d); - const char* ptr = str.data; - const char* end = ptr + str.size; - - if (str.size < 20) goto malformed; - - { - /* 1972-01-01T01:00:00 */ - int year = jsondec_tsdigits(d, &ptr, 4, "-"); - int mon = jsondec_tsdigits(d, &ptr, 2, "-"); - int day = jsondec_tsdigits(d, &ptr, 2, "T"); - int hour = jsondec_tsdigits(d, &ptr, 2, ":"); - int min = jsondec_tsdigits(d, &ptr, 2, ":"); - int sec = jsondec_tsdigits(d, &ptr, 2, NULL); - - seconds.int64_val = jsondec_unixtime(year, mon, day, hour, min, sec); - } - - nanos.int32_val = jsondec_nanos(d, &ptr, end); - - { - /* [+-]08:00 or Z */ - int ofs_hour = 0; - int ofs_min = 0; - bool neg = false; - - if (ptr == end) goto malformed; - - switch (*ptr++) { - case '-': - neg = true; - /* fallthrough */ - case '+': - if ((end - ptr) != 5) goto malformed; - ofs_hour = jsondec_tsdigits(d, &ptr, 2, ":"); - ofs_min = jsondec_tsdigits(d, &ptr, 2, NULL); - ofs_min = ((ofs_hour * 60) + ofs_min) * 60; - seconds.int64_val += (neg ? ofs_min : -ofs_min); - break; - case 'Z': - if (ptr != end) goto malformed; - break; - default: - goto malformed; - } - } - - if (seconds.int64_val < -62135596800) { - jsondec_err(d, "Timestamp out of range"); - } - - upb_Message_SetFieldByDef(msg, upb_MessageDef_FindFieldByNumber(m, 1), - seconds, d->arena); - upb_Message_SetFieldByDef(msg, upb_MessageDef_FindFieldByNumber(m, 2), nanos, - d->arena); - return; - -malformed: - jsondec_err(d, "Malformed timestamp"); -} - -static void jsondec_duration(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_MessageValue seconds; - upb_MessageValue nanos; - upb_StringView str = jsondec_string(d); - const char* ptr = str.data; - const char* end = ptr + str.size; - const int64_t max = (uint64_t)3652500 * 86400; - bool neg = false; - - /* "3.000000001s", "3s", etc. */ - ptr = jsondec_buftoint64(d, ptr, end, &seconds.int64_val, &neg); - nanos.int32_val = jsondec_nanos(d, &ptr, end); - - if (end - ptr != 1 || *ptr != 's') { - jsondec_err(d, "Malformed duration"); - } - - if (seconds.int64_val < -max || seconds.int64_val > max) { - jsondec_err(d, "Duration out of range"); - } - - if (neg) { - nanos.int32_val = -nanos.int32_val; - } - - upb_Message_SetFieldByDef(msg, upb_MessageDef_FindFieldByNumber(m, 1), - seconds, d->arena); - upb_Message_SetFieldByDef(msg, upb_MessageDef_FindFieldByNumber(m, 2), nanos, - d->arena); -} - -static void jsondec_listvalue(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - const upb_FieldDef* values_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_MessageDef* value_m = upb_FieldDef_MessageSubDef(values_f); - const upb_MiniTable* value_layout = upb_MessageDef_MiniTable(value_m); - upb_Array* values = upb_Message_Mutable(msg, values_f, d->arena).array; - - jsondec_arrstart(d); - while (jsondec_arrnext(d)) { - upb_Message* value_msg = upb_Message_New(value_layout, d->arena); - upb_MessageValue value; - value.msg_val = value_msg; - upb_Array_Append(values, value, d->arena); - jsondec_wellknownvalue(d, value_msg, value_m); - } - jsondec_arrend(d); -} - -static void jsondec_struct(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - const upb_FieldDef* fields_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_MessageDef* entry_m = upb_FieldDef_MessageSubDef(fields_f); - const upb_FieldDef* value_f = upb_MessageDef_FindFieldByNumber(entry_m, 2); - const upb_MessageDef* value_m = upb_FieldDef_MessageSubDef(value_f); - const upb_MiniTable* value_layout = upb_MessageDef_MiniTable(value_m); - upb_Map* fields = upb_Message_Mutable(msg, fields_f, d->arena).map; - - jsondec_objstart(d); - while (jsondec_objnext(d)) { - upb_MessageValue key, value; - upb_Message* value_msg = upb_Message_New(value_layout, d->arena); - key.str_val = jsondec_string(d); - value.msg_val = value_msg; - upb_Map_Set(fields, key, value, d->arena); - jsondec_entrysep(d); - jsondec_wellknownvalue(d, value_msg, value_m); - } - jsondec_objend(d); -} - -static void jsondec_wellknownvalue(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_MessageValue val; - const upb_FieldDef* f; - upb_Message* submsg; - - switch (jsondec_peek(d)) { - case JD_NUMBER: - /* double number_value = 2; */ - f = upb_MessageDef_FindFieldByNumber(m, 2); - val.double_val = jsondec_number(d); - break; - case JD_STRING: - /* string string_value = 3; */ - f = upb_MessageDef_FindFieldByNumber(m, 3); - val.str_val = jsondec_string(d); - break; - case JD_FALSE: - /* bool bool_value = 4; */ - f = upb_MessageDef_FindFieldByNumber(m, 4); - val.bool_val = false; - jsondec_false(d); - break; - case JD_TRUE: - /* bool bool_value = 4; */ - f = upb_MessageDef_FindFieldByNumber(m, 4); - val.bool_val = true; - jsondec_true(d); - break; - case JD_NULL: - /* NullValue null_value = 1; */ - f = upb_MessageDef_FindFieldByNumber(m, 1); - val.int32_val = 0; - jsondec_null(d); - break; - /* Note: these cases return, because upb_Message_Mutable() is enough. */ - case JD_OBJECT: - /* Struct struct_value = 5; */ - f = upb_MessageDef_FindFieldByNumber(m, 5); - submsg = upb_Message_Mutable(msg, f, d->arena).msg; - jsondec_struct(d, submsg, upb_FieldDef_MessageSubDef(f)); - return; - case JD_ARRAY: - /* ListValue list_value = 6; */ - f = upb_MessageDef_FindFieldByNumber(m, 6); - submsg = upb_Message_Mutable(msg, f, d->arena).msg; - jsondec_listvalue(d, submsg, upb_FieldDef_MessageSubDef(f)); - return; - default: - UPB_UNREACHABLE(); - } - - upb_Message_SetFieldByDef(msg, f, val, d->arena); -} - -static upb_StringView jsondec_mask(jsondec* d, const char* buf, - const char* end) { - /* FieldMask fields grow due to inserted '_' characters, so we can't do the - * transform in place. */ - const char* ptr = buf; - upb_StringView ret; - char* out; - - ret.size = end - ptr; - while (ptr < end) { - ret.size += (*ptr >= 'A' && *ptr <= 'Z'); - ptr++; - } - - out = upb_Arena_Malloc(d->arena, ret.size); - ptr = buf; - ret.data = out; - - while (ptr < end) { - char ch = *ptr++; - if (ch >= 'A' && ch <= 'Z') { - *out++ = '_'; - *out++ = ch + 32; - } else if (ch == '_') { - jsondec_err(d, "field mask may not contain '_'"); - } else { - *out++ = ch; - } - } - - return ret; -} - -static void jsondec_fieldmask(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - /* repeated string paths = 1; */ - const upb_FieldDef* paths_f = upb_MessageDef_FindFieldByNumber(m, 1); - upb_Array* arr = upb_Message_Mutable(msg, paths_f, d->arena).array; - upb_StringView str = jsondec_string(d); - const char* ptr = str.data; - const char* end = ptr + str.size; - upb_MessageValue val; - - while (ptr < end) { - const char* elem_end = memchr(ptr, ',', end - ptr); - if (elem_end) { - val.str_val = jsondec_mask(d, ptr, elem_end); - ptr = elem_end + 1; - } else { - val.str_val = jsondec_mask(d, ptr, end); - ptr = end; - } - upb_Array_Append(arr, val, d->arena); - } -} - -static void jsondec_anyfield(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - if (upb_MessageDef_WellKnownType(m) == kUpb_WellKnown_Unspecified) { - /* For regular types: {"@type": "[user type]", "f1": , "f2": } - * where f1, f2, etc. are the normal fields of this type. */ - jsondec_field(d, msg, m); - } else { - /* For well-known types: {"@type": "[well-known type]", "value": } - * where is whatever encoding the WKT normally uses. */ - upb_StringView str = jsondec_string(d); - jsondec_entrysep(d); - if (!jsondec_streql(str, "value")) { - jsondec_err(d, "Key for well-known type must be 'value'"); - } - jsondec_wellknown(d, msg, m); - } -} - -static const upb_MessageDef* jsondec_typeurl(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - const upb_FieldDef* type_url_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_MessageDef* type_m; - upb_StringView type_url = jsondec_string(d); - const char* end = type_url.data + type_url.size; - const char* ptr = end; - upb_MessageValue val; - - val.str_val = type_url; - upb_Message_SetFieldByDef(msg, type_url_f, val, d->arena); - - /* Find message name after the last '/' */ - while (ptr > type_url.data && *--ptr != '/') { - } - - if (ptr == type_url.data || ptr == end) { - jsondec_err(d, "Type url must have at least one '/' and non-empty host"); - } - - ptr++; - type_m = upb_DefPool_FindMessageByNameWithSize(d->symtab, ptr, end - ptr); - - if (!type_m) { - jsondec_err(d, "Type was not found"); - } - - return type_m; -} - -static void jsondec_any(jsondec* d, upb_Message* msg, const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - /* string type_url = 1; - * bytes value = 2; */ - const upb_FieldDef* value_f = upb_MessageDef_FindFieldByNumber(m, 2); - upb_Message* any_msg; - const upb_MessageDef* any_m = NULL; - const char* pre_type_data = NULL; - const char* pre_type_end = NULL; - upb_MessageValue encoded; - - jsondec_objstart(d); - - /* Scan looking for "@type", which is not necessarily first. */ - while (!any_m && jsondec_objnext(d)) { - const char* start = d->ptr; - upb_StringView name = jsondec_string(d); - jsondec_entrysep(d); - if (jsondec_streql(name, "@type")) { - any_m = jsondec_typeurl(d, msg, m); - if (pre_type_data) { - pre_type_end = start; - while (*pre_type_end != ',') pre_type_end--; - } - } else { - if (!pre_type_data) pre_type_data = start; - jsondec_skipval(d); - } - } - - if (!any_m) { - jsondec_err(d, "Any object didn't contain a '@type' field"); - } - - const upb_MiniTable* any_layout = upb_MessageDef_MiniTable(any_m); - any_msg = upb_Message_New(any_layout, d->arena); - - if (pre_type_data) { - size_t len = pre_type_end - pre_type_data + 1; - char* tmp = upb_Arena_Malloc(d->arena, len); - const char* saved_ptr = d->ptr; - const char* saved_end = d->end; - memcpy(tmp, pre_type_data, len - 1); - tmp[len - 1] = '}'; - d->ptr = tmp; - d->end = tmp + len; - d->is_first = true; - while (jsondec_objnext(d)) { - jsondec_anyfield(d, any_msg, any_m); - } - d->ptr = saved_ptr; - d->end = saved_end; - } - - while (jsondec_objnext(d)) { - jsondec_anyfield(d, any_msg, any_m); - } - - jsondec_objend(d); - - upb_EncodeStatus status = - upb_Encode(any_msg, upb_MessageDef_MiniTable(any_m), 0, d->arena, - (char**)&encoded.str_val.data, &encoded.str_val.size); - // TODO: We should fail gracefully here on a bad return status. - UPB_ASSERT(status == kUpb_EncodeStatus_Ok); - upb_Message_SetFieldByDef(msg, value_f, encoded, d->arena); -} - -static void jsondec_wrapper(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - const upb_FieldDef* value_f = upb_MessageDef_FindFieldByNumber(m, 1); - upb_JsonMessageValue val = jsondec_value(d, value_f); - UPB_ASSUME(val.ignore == false); // Wrapper cannot be an enum. - upb_Message_SetFieldByDef(msg, value_f, val.value, d->arena); -} - -static void jsondec_wellknown(jsondec* d, upb_Message* msg, - const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - switch (upb_MessageDef_WellKnownType(m)) { - case kUpb_WellKnown_Any: - jsondec_any(d, msg, m); - break; - case kUpb_WellKnown_FieldMask: - jsondec_fieldmask(d, msg, m); - break; - case kUpb_WellKnown_Duration: - jsondec_duration(d, msg, m); - break; - case kUpb_WellKnown_Timestamp: - jsondec_timestamp(d, msg, m); - break; - case kUpb_WellKnown_Value: - jsondec_wellknownvalue(d, msg, m); - break; - case kUpb_WellKnown_ListValue: - jsondec_listvalue(d, msg, m); - break; - case kUpb_WellKnown_Struct: - jsondec_struct(d, msg, m); - break; - case kUpb_WellKnown_DoubleValue: - case kUpb_WellKnown_FloatValue: - case kUpb_WellKnown_Int64Value: - case kUpb_WellKnown_UInt64Value: - case kUpb_WellKnown_Int32Value: - case kUpb_WellKnown_UInt32Value: - case kUpb_WellKnown_StringValue: - case kUpb_WellKnown_BytesValue: - case kUpb_WellKnown_BoolValue: - jsondec_wrapper(d, msg, m); - break; - default: - UPB_UNREACHABLE(); - } -} - -static int upb_JsonDecoder_Decode(jsondec* const d, upb_Message* const msg, - const upb_MessageDef* const m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - if (UPB_SETJMP(d->err)) return kUpb_JsonDecodeResult_Error; - - jsondec_tomsg(d, msg, m); - - // Consume any trailing whitespace before checking if we read the entire - // input. - jsondec_consumews(d); - - if (d->ptr == d->end) { - return d->result; - } else { - jsondec_seterrmsg(d, "unexpected trailing characters"); - return kUpb_JsonDecodeResult_Error; - } -} - -int upb_JsonDecodeDetectingNonconformance(const char* buf, size_t size, - upb_Message* msg, - const upb_MessageDef* m, - const upb_DefPool* symtab, - int options, upb_Arena* arena, - upb_Status* status) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - jsondec d; - - if (size == 0) return true; - - d.ptr = buf; - d.end = buf + size; - d.arena = arena; - d.symtab = symtab; - d.status = status; - d.options = options; - d.depth = 64; - d.result = kUpb_JsonDecodeResult_Ok; - d.line = 1; - d.line_begin = d.ptr; - d.debug_field = NULL; - d.is_first = false; - - return upb_JsonDecoder_Decode(&d, msg, m); -} - - -#include -#include -#include -#include -#include -#include - - -// Must be last. - -typedef struct { - char *buf, *ptr, *end; - size_t overflow; - int indent_depth; - int options; - const upb_DefPool* ext_pool; - jmp_buf err; - upb_Status* status; - upb_Arena* arena; -} jsonenc; - -static void jsonenc_msg(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m); -static void jsonenc_scalar(jsonenc* e, upb_MessageValue val, - const upb_FieldDef* f); -static void jsonenc_msgfield(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m); -static void jsonenc_msgfields(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m, bool first); -static void jsonenc_value(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m); - -UPB_NORETURN static void jsonenc_err(jsonenc* e, const char* msg) { - upb_Status_SetErrorMessage(e->status, msg); - UPB_LONGJMP(e->err, 1); -} - -UPB_PRINTF(2, 3) -UPB_NORETURN static void jsonenc_errf(jsonenc* e, const char* fmt, ...) { - va_list argp; - va_start(argp, fmt); - upb_Status_VSetErrorFormat(e->status, fmt, argp); - va_end(argp); - UPB_LONGJMP(e->err, 1); -} - -static upb_Arena* jsonenc_arena(jsonenc* e) { - /* Create lazily, since it's only needed for Any */ - if (!e->arena) { - e->arena = upb_Arena_New(); - } - return e->arena; -} - -static void jsonenc_putbytes(jsonenc* e, const void* data, size_t len) { - size_t have = e->end - e->ptr; - if (UPB_LIKELY(have >= len)) { - memcpy(e->ptr, data, len); - e->ptr += len; - } else { - if (have) { - memcpy(e->ptr, data, have); - e->ptr += have; - } - e->overflow += (len - have); - } -} - -static void jsonenc_putstr(jsonenc* e, const char* str) { - jsonenc_putbytes(e, str, strlen(str)); -} - -UPB_PRINTF(2, 3) -static void jsonenc_printf(jsonenc* e, const char* fmt, ...) { - size_t n; - size_t have = e->end - e->ptr; - va_list args; - - va_start(args, fmt); - n = _upb_vsnprintf(e->ptr, have, fmt, args); - va_end(args); - - if (UPB_LIKELY(have > n)) { - e->ptr += n; - } else { - e->ptr = UPB_PTRADD(e->ptr, have); - e->overflow += (n - have); - } -} - -static void jsonenc_nanos(jsonenc* e, int32_t nanos) { - int digits = 9; - - if (nanos == 0) return; - if (nanos < 0 || nanos >= 1000000000) { - jsonenc_err(e, "error formatting timestamp as JSON: invalid nanos"); - } - - while (nanos % 1000 == 0) { - nanos /= 1000; - digits -= 3; - } - - jsonenc_printf(e, ".%.*" PRId32, digits, nanos); -} - -static void jsonenc_timestamp(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - const upb_FieldDef* seconds_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_FieldDef* nanos_f = upb_MessageDef_FindFieldByNumber(m, 2); - int64_t seconds = upb_Message_GetFieldByDef(msg, seconds_f).int64_val; - int32_t nanos = upb_Message_GetFieldByDef(msg, nanos_f).int32_val; - int L, N, I, J, K, hour, min, sec; - - if (seconds < -62135596800) { - jsonenc_err(e, - "error formatting timestamp as JSON: minimum acceptable value " - "is 0001-01-01T00:00:00Z"); - } else if (seconds > 253402300799) { - jsonenc_err(e, - "error formatting timestamp as JSON: maximum acceptable value " - "is 9999-12-31T23:59:59Z"); - } - - /* Julian Day -> Y/M/D, Algorithm from: - * Fliegel, H. F., and Van Flandern, T. C., "A Machine Algorithm for - * Processing Calendar Dates," Communications of the Association of - * Computing Machines, vol. 11 (1968), p. 657. */ - seconds += 62135596800; // Ensure seconds is positive. - L = (int)(seconds / 86400) - 719162 + 68569 + 2440588; - N = 4 * L / 146097; - L = L - (146097 * N + 3) / 4; - I = 4000 * (L + 1) / 1461001; - L = L - 1461 * I / 4 + 31; - J = 80 * L / 2447; - K = L - 2447 * J / 80; - L = J / 11; - J = J + 2 - 12 * L; - I = 100 * (N - 49) + I + L; - - sec = seconds % 60; - min = (seconds / 60) % 60; - hour = (seconds / 3600) % 24; - - jsonenc_printf(e, "\"%04d-%02d-%02dT%02d:%02d:%02d", I, J, K, hour, min, sec); - jsonenc_nanos(e, nanos); - jsonenc_putstr(e, "Z\""); -} - -static void jsonenc_duration(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - const upb_FieldDef* seconds_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_FieldDef* nanos_f = upb_MessageDef_FindFieldByNumber(m, 2); - int64_t seconds = upb_Message_GetFieldByDef(msg, seconds_f).int64_val; - int32_t nanos = upb_Message_GetFieldByDef(msg, nanos_f).int32_val; - bool negative = false; - - if (seconds > 315576000000 || seconds < -315576000000 || - (seconds != 0 && nanos != 0 && (seconds < 0) != (nanos < 0))) { - jsonenc_err(e, "bad duration"); - } - - if (seconds < 0) { - negative = true; - seconds = -seconds; - } - if (nanos < 0) { - negative = true; - nanos = -nanos; - } - - jsonenc_putstr(e, "\""); - if (negative) { - jsonenc_putstr(e, "-"); - } - jsonenc_printf(e, "%" PRId64, seconds); - jsonenc_nanos(e, nanos); - jsonenc_putstr(e, "s\""); -} - -static void jsonenc_enum(int32_t val, const upb_FieldDef* f, jsonenc* e) { - const upb_EnumDef* e_def = upb_FieldDef_EnumSubDef(f); - - if (strcmp(upb_EnumDef_FullName(e_def), "google.protobuf.NullValue") == 0) { - jsonenc_putstr(e, "null"); - } else { - const upb_EnumValueDef* ev = - (e->options & upb_JsonEncode_FormatEnumsAsIntegers) - ? NULL - : upb_EnumDef_FindValueByNumber(e_def, val); - - if (ev) { - jsonenc_printf(e, "\"%s\"", upb_EnumValueDef_Name(ev)); - } else { - jsonenc_printf(e, "%" PRId32, val); - } - } -} - -static void jsonenc_bytes(jsonenc* e, upb_StringView str) { - /* This is the regular base64, not the "web-safe" version. */ - static const char base64[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - const unsigned char* ptr = (unsigned char*)str.data; - const unsigned char* end = UPB_PTRADD(ptr, str.size); - char buf[4]; - - jsonenc_putstr(e, "\""); - - while (end - ptr >= 3) { - buf[0] = base64[ptr[0] >> 2]; - buf[1] = base64[((ptr[0] & 0x3) << 4) | (ptr[1] >> 4)]; - buf[2] = base64[((ptr[1] & 0xf) << 2) | (ptr[2] >> 6)]; - buf[3] = base64[ptr[2] & 0x3f]; - jsonenc_putbytes(e, buf, 4); - ptr += 3; - } - - switch (end - ptr) { - case 2: - buf[0] = base64[ptr[0] >> 2]; - buf[1] = base64[((ptr[0] & 0x3) << 4) | (ptr[1] >> 4)]; - buf[2] = base64[(ptr[1] & 0xf) << 2]; - buf[3] = '='; - jsonenc_putbytes(e, buf, 4); - break; - case 1: - buf[0] = base64[ptr[0] >> 2]; - buf[1] = base64[((ptr[0] & 0x3) << 4)]; - buf[2] = '='; - buf[3] = '='; - jsonenc_putbytes(e, buf, 4); - break; - } - - jsonenc_putstr(e, "\""); -} - -static void jsonenc_stringbody(jsonenc* e, upb_StringView str) { - const char* ptr = str.data; - const char* end = UPB_PTRADD(ptr, str.size); - - while (ptr < end) { - switch (*ptr) { - case '\n': - jsonenc_putstr(e, "\\n"); - break; - case '\r': - jsonenc_putstr(e, "\\r"); - break; - case '\t': - jsonenc_putstr(e, "\\t"); - break; - case '\"': - jsonenc_putstr(e, "\\\""); - break; - case '\f': - jsonenc_putstr(e, "\\f"); - break; - case '\b': - jsonenc_putstr(e, "\\b"); - break; - case '\\': - jsonenc_putstr(e, "\\\\"); - break; - default: - if ((uint8_t)*ptr < 0x20) { - jsonenc_printf(e, "\\u%04x", (int)(uint8_t)*ptr); - } else { - /* This could be a non-ASCII byte. We rely on the string being valid - * UTF-8. */ - jsonenc_putbytes(e, ptr, 1); - } - break; - } - ptr++; - } -} - -static void jsonenc_string(jsonenc* e, upb_StringView str) { - jsonenc_putstr(e, "\""); - jsonenc_stringbody(e, str); - jsonenc_putstr(e, "\""); -} - -static bool upb_JsonEncode_HandleSpecialDoubles(jsonenc* e, double val) { - if (val == INFINITY) { - jsonenc_putstr(e, "\"Infinity\""); - } else if (val == -INFINITY) { - jsonenc_putstr(e, "\"-Infinity\""); - } else if (val != val) { - jsonenc_putstr(e, "\"NaN\""); - } else { - return false; - } - return true; -} - -static void upb_JsonEncode_Double(jsonenc* e, double val) { - if (upb_JsonEncode_HandleSpecialDoubles(e, val)) return; - char buf[32]; - _upb_EncodeRoundTripDouble(val, buf, sizeof(buf)); - jsonenc_putstr(e, buf); -} - -static void upb_JsonEncode_Float(jsonenc* e, float val) { - if (upb_JsonEncode_HandleSpecialDoubles(e, val)) return; - char buf[32]; - _upb_EncodeRoundTripFloat(val, buf, sizeof(buf)); - jsonenc_putstr(e, buf); -} - -static void jsonenc_wrapper(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - const upb_FieldDef* val_f = upb_MessageDef_FindFieldByNumber(m, 1); - upb_MessageValue val = upb_Message_GetFieldByDef(msg, val_f); - jsonenc_scalar(e, val, val_f); -} - -static const upb_MessageDef* jsonenc_getanymsg(jsonenc* e, - upb_StringView type_url) { - /* Find last '/', if any. */ - const char* end = type_url.data + type_url.size; - const char* ptr = end; - const upb_MessageDef* ret; - - if (!e->ext_pool) { - jsonenc_err(e, "Tried to encode Any, but no symtab was provided"); - } - - if (type_url.size == 0) goto badurl; - - while (true) { - if (--ptr == type_url.data) { - /* Type URL must contain at least one '/', with host before. */ - goto badurl; - } - if (*ptr == '/') { - ptr++; - break; - } - } - - ret = upb_DefPool_FindMessageByNameWithSize(e->ext_pool, ptr, end - ptr); - - if (!ret) { - jsonenc_errf(e, "Couldn't find Any type: %.*s", (int)(end - ptr), ptr); - } - - return ret; - -badurl: - jsonenc_errf(e, "Bad type URL: " UPB_STRINGVIEW_FORMAT, - UPB_STRINGVIEW_ARGS(type_url)); -} - -static void jsonenc_any(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - const upb_FieldDef* type_url_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_FieldDef* value_f = upb_MessageDef_FindFieldByNumber(m, 2); - upb_StringView type_url = upb_Message_GetFieldByDef(msg, type_url_f).str_val; - upb_StringView value = upb_Message_GetFieldByDef(msg, value_f).str_val; - const upb_MessageDef* any_m = jsonenc_getanymsg(e, type_url); - const upb_MiniTable* any_layout = upb_MessageDef_MiniTable(any_m); - upb_Arena* arena = jsonenc_arena(e); - upb_Message* any = upb_Message_New(any_layout, arena); - - if (upb_Decode(value.data, value.size, any, any_layout, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - jsonenc_err(e, "Error decoding message in Any"); - } - - jsonenc_putstr(e, "{\"@type\":"); - jsonenc_string(e, type_url); - - if (upb_MessageDef_WellKnownType(any_m) == kUpb_WellKnown_Unspecified) { - /* Regular messages: {"@type": "...","foo": 1, "bar": 2} */ - jsonenc_msgfields(e, any, any_m, false); - } else { - /* Well-known type: {"@type": "...","value": } */ - jsonenc_putstr(e, ",\"value\":"); - jsonenc_msgfield(e, any, any_m); - } - - jsonenc_putstr(e, "}"); -} - -static void jsonenc_putsep(jsonenc* e, const char* str, bool* first) { - if (*first) { - *first = false; - } else { - jsonenc_putstr(e, str); - } -} - -static void jsonenc_fieldpath(jsonenc* e, upb_StringView path) { - const char* ptr = path.data; - const char* end = ptr + path.size; - - while (ptr < end) { - char ch = *ptr; - - if (ch >= 'A' && ch <= 'Z') { - jsonenc_err(e, "Field mask element may not have upper-case letter."); - } else if (ch == '_') { - if (ptr == end - 1 || *(ptr + 1) < 'a' || *(ptr + 1) > 'z') { - jsonenc_err(e, "Underscore must be followed by a lowercase letter."); - } - ch = *++ptr - 32; - } - - jsonenc_putbytes(e, &ch, 1); - ptr++; - } -} - -static void jsonenc_fieldmask(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - const upb_FieldDef* paths_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_Array* paths = upb_Message_GetFieldByDef(msg, paths_f).array_val; - bool first = true; - size_t i, n = 0; - - if (paths) n = upb_Array_Size(paths); - - jsonenc_putstr(e, "\""); - - for (i = 0; i < n; i++) { - jsonenc_putsep(e, ",", &first); - jsonenc_fieldpath(e, upb_Array_Get(paths, i).str_val); - } - - jsonenc_putstr(e, "\""); -} - -static void jsonenc_struct(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - jsonenc_putstr(e, "{"); - - const upb_FieldDef* fields_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_Map* fields = upb_Message_GetFieldByDef(msg, fields_f).map_val; - - if (fields) { - const upb_MessageDef* entry_m = upb_FieldDef_MessageSubDef(fields_f); - const upb_FieldDef* value_f = upb_MessageDef_FindFieldByNumber(entry_m, 2); - - size_t iter = kUpb_Map_Begin; - bool first = true; - - upb_MessageValue key, val; - while (upb_Map_Next(fields, &key, &val, &iter)) { - jsonenc_putsep(e, ",", &first); - jsonenc_string(e, key.str_val); - jsonenc_putstr(e, ":"); - jsonenc_value(e, val.msg_val, upb_FieldDef_MessageSubDef(value_f)); - } - } - - jsonenc_putstr(e, "}"); -} - -static void jsonenc_listvalue(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - const upb_FieldDef* values_f = upb_MessageDef_FindFieldByNumber(m, 1); - const upb_MessageDef* values_m = upb_FieldDef_MessageSubDef(values_f); - const upb_Array* values = upb_Message_GetFieldByDef(msg, values_f).array_val; - size_t i; - bool first = true; - - jsonenc_putstr(e, "["); - - if (values) { - const size_t size = upb_Array_Size(values); - for (i = 0; i < size; i++) { - upb_MessageValue elem = upb_Array_Get(values, i); - - jsonenc_putsep(e, ",", &first); - jsonenc_value(e, elem.msg_val, values_m); - } - } - - jsonenc_putstr(e, "]"); -} - -static void jsonenc_value(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - /* TODO: do we want a reflection method to get oneof case? */ - size_t iter = kUpb_Message_Begin; - const upb_FieldDef* f; - upb_MessageValue val; - - if (!upb_Message_Next(msg, m, NULL, &f, &val, &iter)) { - jsonenc_err(e, "No value set in Value proto"); - } - - switch (upb_FieldDef_Number(f)) { - case 1: - jsonenc_putstr(e, "null"); - break; - case 2: - if (upb_JsonEncode_HandleSpecialDoubles(e, val.double_val)) { - jsonenc_err( - e, - "google.protobuf.Value cannot encode double values for " - "infinity or nan, because they would be parsed as a string"); - } - upb_JsonEncode_Double(e, val.double_val); - break; - case 3: - jsonenc_string(e, val.str_val); - break; - case 4: - jsonenc_putstr(e, val.bool_val ? "true" : "false"); - break; - case 5: - jsonenc_struct(e, val.msg_val, upb_FieldDef_MessageSubDef(f)); - break; - case 6: - jsonenc_listvalue(e, val.msg_val, upb_FieldDef_MessageSubDef(f)); - break; - } -} - -static void jsonenc_msgfield(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - switch (upb_MessageDef_WellKnownType(m)) { - case kUpb_WellKnown_Unspecified: - jsonenc_msg(e, msg, m); - break; - case kUpb_WellKnown_Any: - jsonenc_any(e, msg, m); - break; - case kUpb_WellKnown_FieldMask: - jsonenc_fieldmask(e, msg, m); - break; - case kUpb_WellKnown_Duration: - jsonenc_duration(e, msg, m); - break; - case kUpb_WellKnown_Timestamp: - jsonenc_timestamp(e, msg, m); - break; - case kUpb_WellKnown_DoubleValue: - case kUpb_WellKnown_FloatValue: - case kUpb_WellKnown_Int64Value: - case kUpb_WellKnown_UInt64Value: - case kUpb_WellKnown_Int32Value: - case kUpb_WellKnown_UInt32Value: - case kUpb_WellKnown_StringValue: - case kUpb_WellKnown_BytesValue: - case kUpb_WellKnown_BoolValue: - jsonenc_wrapper(e, msg, m); - break; - case kUpb_WellKnown_Value: - jsonenc_value(e, msg, m); - break; - case kUpb_WellKnown_ListValue: - jsonenc_listvalue(e, msg, m); - break; - case kUpb_WellKnown_Struct: - jsonenc_struct(e, msg, m); - break; - } -} - -static void jsonenc_scalar(jsonenc* e, upb_MessageValue val, - const upb_FieldDef* f) { - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Bool: - jsonenc_putstr(e, val.bool_val ? "true" : "false"); - break; - case kUpb_CType_Float: - upb_JsonEncode_Float(e, val.float_val); - break; - case kUpb_CType_Double: - upb_JsonEncode_Double(e, val.double_val); - break; - case kUpb_CType_Int32: - jsonenc_printf(e, "%" PRId32, val.int32_val); - break; - case kUpb_CType_UInt32: - jsonenc_printf(e, "%" PRIu32, val.uint32_val); - break; - case kUpb_CType_Int64: - jsonenc_printf(e, "\"%" PRId64 "\"", val.int64_val); - break; - case kUpb_CType_UInt64: - jsonenc_printf(e, "\"%" PRIu64 "\"", val.uint64_val); - break; - case kUpb_CType_String: - jsonenc_string(e, val.str_val); - break; - case kUpb_CType_Bytes: - jsonenc_bytes(e, val.str_val); - break; - case kUpb_CType_Enum: - jsonenc_enum(val.int32_val, f, e); - break; - case kUpb_CType_Message: - jsonenc_msgfield(e, val.msg_val, upb_FieldDef_MessageSubDef(f)); - break; - } -} - -static void jsonenc_mapkey(jsonenc* e, upb_MessageValue val, - const upb_FieldDef* f) { - jsonenc_putstr(e, "\""); - - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Bool: - jsonenc_putstr(e, val.bool_val ? "true" : "false"); - break; - case kUpb_CType_Int32: - jsonenc_printf(e, "%" PRId32, val.int32_val); - break; - case kUpb_CType_UInt32: - jsonenc_printf(e, "%" PRIu32, val.uint32_val); - break; - case kUpb_CType_Int64: - jsonenc_printf(e, "%" PRId64, val.int64_val); - break; - case kUpb_CType_UInt64: - jsonenc_printf(e, "%" PRIu64, val.uint64_val); - break; - case kUpb_CType_String: - jsonenc_stringbody(e, val.str_val); - break; - default: - UPB_UNREACHABLE(); - } - - jsonenc_putstr(e, "\":"); -} - -static void jsonenc_array(jsonenc* e, const upb_Array* arr, - const upb_FieldDef* f) { - size_t i; - size_t size = arr ? upb_Array_Size(arr) : 0; - bool first = true; - - jsonenc_putstr(e, "["); - - for (i = 0; i < size; i++) { - jsonenc_putsep(e, ",", &first); - jsonenc_scalar(e, upb_Array_Get(arr, i), f); - } - - jsonenc_putstr(e, "]"); -} - -static void jsonenc_map(jsonenc* e, const upb_Map* map, const upb_FieldDef* f) { - jsonenc_putstr(e, "{"); - - const upb_MessageDef* entry = upb_FieldDef_MessageSubDef(f); - const upb_FieldDef* key_f = upb_MessageDef_FindFieldByNumber(entry, 1); - const upb_FieldDef* val_f = upb_MessageDef_FindFieldByNumber(entry, 2); - - if (map) { - size_t iter = kUpb_Map_Begin; - bool first = true; - - upb_MessageValue key, val; - while (upb_Map_Next(map, &key, &val, &iter)) { - jsonenc_putsep(e, ",", &first); - jsonenc_mapkey(e, key, key_f); - jsonenc_scalar(e, val, val_f); - } - } - - jsonenc_putstr(e, "}"); -} - -static void jsonenc_fieldval(jsonenc* e, const upb_FieldDef* f, - upb_MessageValue val, bool* first) { - const char* name; - - jsonenc_putsep(e, ",", first); - - if (upb_FieldDef_IsExtension(f)) { - // TODO: For MessageSet, I would have expected this to print the message - // name here, but Python doesn't appear to do this. We should do more - // research here about what various implementations do. - jsonenc_printf(e, "\"[%s]\":", upb_FieldDef_FullName(f)); - } else { - if (e->options & upb_JsonEncode_UseProtoNames) { - name = upb_FieldDef_Name(f); - } else { - name = upb_FieldDef_JsonName(f); - } - jsonenc_printf(e, "\"%s\":", name); - } - - if (upb_FieldDef_IsMap(f)) { - jsonenc_map(e, val.map_val, f); - } else if (upb_FieldDef_IsRepeated(f)) { - jsonenc_array(e, val.array_val, f); - } else { - jsonenc_scalar(e, val, f); - } -} - -static void jsonenc_msgfields(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m, bool first) { - upb_MessageValue val; - const upb_FieldDef* f; - - if (e->options & upb_JsonEncode_EmitDefaults) { - /* Iterate over all fields. */ - int i = 0; - int n = upb_MessageDef_FieldCount(m); - for (i = 0; i < n; i++) { - f = upb_MessageDef_Field(m, i); - if (!upb_FieldDef_HasPresence(f) || upb_Message_HasFieldByDef(msg, f)) { - jsonenc_fieldval(e, f, upb_Message_GetFieldByDef(msg, f), &first); - } - } - } else { - /* Iterate over non-empty fields. */ - size_t iter = kUpb_Message_Begin; - while (upb_Message_Next(msg, m, e->ext_pool, &f, &val, &iter)) { - jsonenc_fieldval(e, f, val, &first); - } - } -} - -static void jsonenc_msg(jsonenc* e, const upb_Message* msg, - const upb_MessageDef* m) { - jsonenc_putstr(e, "{"); - jsonenc_msgfields(e, msg, m, true); - jsonenc_putstr(e, "}"); -} - -static size_t jsonenc_nullz(jsonenc* e, size_t size) { - size_t ret = e->ptr - e->buf + e->overflow; - - if (size > 0) { - if (e->ptr == e->end) e->ptr--; - *e->ptr = '\0'; - } - - return ret; -} - -static size_t upb_JsonEncoder_Encode(jsonenc* const e, - const upb_Message* const msg, - const upb_MessageDef* const m, - const size_t size) { - if (UPB_SETJMP(e->err) != 0) return -1; - - jsonenc_msgfield(e, msg, m); - if (e->arena) upb_Arena_Free(e->arena); - return jsonenc_nullz(e, size); -} - -size_t upb_JsonEncode(const upb_Message* msg, const upb_MessageDef* m, - const upb_DefPool* ext_pool, int options, char* buf, - size_t size, upb_Status* status) { - jsonenc e; - - e.buf = buf; - e.ptr = buf; - e.end = UPB_PTRADD(buf, size); - e.overflow = 0; - e.options = options; - e.ext_pool = ext_pool; - e.status = status; - e.arena = NULL; - - return upb_JsonEncoder_Encode(&e, msg, m, size); -} - - -#include - -// Must be last. - -static void* upb_global_allocfunc(upb_alloc* alloc, void* ptr, size_t oldsize, - size_t size) { - UPB_UNUSED(alloc); - UPB_UNUSED(oldsize); - if (size == 0) { - free(ptr); - return NULL; - } else { - return realloc(ptr, size); - } -} - -upb_alloc upb_alloc_global = {&upb_global_allocfunc}; - - -#ifdef UPB_TRACING_ENABLED -#include -#endif - -#include -#include - - -// Must be last. - -static UPB_ATOMIC(size_t) g_max_block_size = UPB_DEFAULT_MAX_BLOCK_SIZE; - -void upb_Arena_SetMaxBlockSize(size_t max) { - upb_Atomic_Store(&g_max_block_size, max, memory_order_relaxed); -} - -typedef struct upb_MemBlock { - struct upb_MemBlock* next; - // If this block is the head of the list, tracks a growing hint of what the - // *next* block should be; otherwise tracks the size of the actual allocation. - size_t size_or_hint; - // Data follows. -} upb_MemBlock; - -typedef struct upb_ArenaInternal { - // upb_alloc* together with a low bit which signals if there is an initial - // block. - uintptr_t block_alloc; - - // The cleanup for the allocator. This is called after all the blocks are - // freed in an arena. - upb_AllocCleanupFunc* upb_alloc_cleanup; - - // When multiple arenas are fused together, each arena points to a parent - // arena (root points to itself). The root tracks how many live arenas - // reference it. - - // The low bit is tagged: - // 0: pointer to parent - // 1: count, left shifted by one - UPB_ATOMIC(uintptr_t) parent_or_count; - - // All nodes that are fused together are in a singly-linked list. - // == NULL at end of list. - UPB_ATOMIC(struct upb_ArenaInternal*) next; - - // - If the low bit is set, is a pointer to the tail of the list (populated - // for roots, set to self for roots with no fused arenas). This is best - // effort, and it may not always reflect the true tail, but it will always - // be a valid node in the list. This is useful for finding the list tail - // without having to walk the entire list. - // - If the low bit is not set, is a pointer to the previous node in the list, - // such that a->previous_or_tail->next == a. - UPB_ATOMIC(uintptr_t) previous_or_tail; - - // Linked list of blocks to free/cleanup. - upb_MemBlock* blocks; - - // Total space allocated in blocks, atomic only for SpaceAllocated - UPB_ATOMIC(uintptr_t) space_allocated; - - UPB_TSAN_PUBLISHED_MEMBER -} upb_ArenaInternal; - -// All public + private state for an arena. -typedef struct { - upb_Arena head; - upb_ArenaInternal body; -} upb_ArenaState; - -typedef struct { - upb_ArenaInternal* root; - uintptr_t tagged_count; -} upb_ArenaRoot; - -static const size_t kUpb_MemblockReserve = - UPB_ALIGN_MALLOC(sizeof(upb_MemBlock)); - -// Extracts the (upb_ArenaInternal*) from a (upb_Arena*) -static upb_ArenaInternal* upb_Arena_Internal(const upb_Arena* a) { - return &((upb_ArenaState*)a)->body; -} - -// Extracts the (upb_Arena*) from a (upb_ArenaInternal*) -static upb_Arena* upb_Arena_FromInternal(const upb_ArenaInternal* ai) { - ptrdiff_t offset = -offsetof(upb_ArenaState, body); - return UPB_PTR_AT(ai, offset, upb_Arena); -} - -static bool _upb_Arena_IsTaggedRefcount(uintptr_t parent_or_count) { - return (parent_or_count & 1) == 1; -} - -static bool _upb_Arena_IsTaggedPointer(uintptr_t parent_or_count) { - return (parent_or_count & 1) == 0; -} - -static uintptr_t _upb_Arena_RefCountFromTagged(uintptr_t parent_or_count) { - UPB_ASSERT(_upb_Arena_IsTaggedRefcount(parent_or_count)); - return parent_or_count >> 1; -} - -static uintptr_t _upb_Arena_TaggedFromRefcount(uintptr_t refcount) { - uintptr_t parent_or_count = (refcount << 1) | 1; - UPB_ASSERT(_upb_Arena_IsTaggedRefcount(parent_or_count)); - return parent_or_count; -} - -static upb_ArenaInternal* _upb_Arena_PointerFromTagged( - uintptr_t parent_or_count) { - UPB_ASSERT(_upb_Arena_IsTaggedPointer(parent_or_count)); - return (upb_ArenaInternal*)parent_or_count; -} - -static uintptr_t _upb_Arena_TaggedFromPointer(upb_ArenaInternal* ai) { - uintptr_t parent_or_count = (uintptr_t)ai; - UPB_ASSERT(_upb_Arena_IsTaggedPointer(parent_or_count)); - return parent_or_count; -} - -static bool _upb_Arena_IsTaggedTail(uintptr_t previous_or_tail) { - return (previous_or_tail & 1) == 1; -} - -static bool _upb_Arena_IsTaggedPrevious(uintptr_t previous_or_tail) { - return (previous_or_tail & 1) == 0; -} - -static upb_ArenaInternal* _upb_Arena_TailFromTagged( - uintptr_t previous_or_tail) { - UPB_ASSERT(_upb_Arena_IsTaggedTail(previous_or_tail)); - return (upb_ArenaInternal*)(previous_or_tail ^ 1); -} - -static uintptr_t _upb_Arena_TaggedFromTail(upb_ArenaInternal* tail) { - uintptr_t previous_or_tail = (uintptr_t)tail | 1; - UPB_ASSERT(_upb_Arena_IsTaggedTail(previous_or_tail)); - return previous_or_tail; -} - -static upb_ArenaInternal* _upb_Arena_PreviousFromTagged( - uintptr_t previous_or_tail) { - UPB_ASSERT(_upb_Arena_IsTaggedPrevious(previous_or_tail)); - return (upb_ArenaInternal*)previous_or_tail; -} - -static uintptr_t _upb_Arena_TaggedFromPrevious(upb_ArenaInternal* ai) { - uintptr_t previous = (uintptr_t)ai; - UPB_ASSERT(_upb_Arena_IsTaggedPrevious(previous)); - return previous; -} - -static upb_alloc* _upb_ArenaInternal_BlockAlloc(upb_ArenaInternal* ai) { - return (upb_alloc*)(ai->block_alloc & ~0x1); -} - -static uintptr_t _upb_Arena_MakeBlockAlloc(upb_alloc* alloc, bool has_initial) { - uintptr_t alloc_uint = (uintptr_t)alloc; - UPB_ASSERT((alloc_uint & 1) == 0); - return alloc_uint | (has_initial ? 1 : 0); -} - -static bool _upb_ArenaInternal_HasInitialBlock(upb_ArenaInternal* ai) { - return ai->block_alloc & 0x1; -} - -#ifdef UPB_TRACING_ENABLED -static void (*_init_arena_trace_handler)(const upb_Arena*, size_t size) = NULL; -static void (*_fuse_arena_trace_handler)(const upb_Arena*, - const upb_Arena*) = NULL; -static void (*_free_arena_trace_handler)(const upb_Arena*) = NULL; - -void upb_Arena_SetTraceHandler( - void (*initArenaTraceHandler)(const upb_Arena*, size_t size), - void (*fuseArenaTraceHandler)(const upb_Arena*, const upb_Arena*), - void (*freeArenaTraceHandler)(const upb_Arena*)) { - _init_arena_trace_handler = initArenaTraceHandler; - _fuse_arena_trace_handler = fuseArenaTraceHandler; - _free_arena_trace_handler = freeArenaTraceHandler; -} - -void upb_Arena_LogInit(const upb_Arena* arena, size_t size) { - if (_init_arena_trace_handler) { - _init_arena_trace_handler(arena, size); - } -} -void upb_Arena_LogFuse(const upb_Arena* arena1, const upb_Arena* arena2) { - if (_fuse_arena_trace_handler) { - _fuse_arena_trace_handler(arena1, arena2); - } -} -void upb_Arena_LogFree(const upb_Arena* arena) { - if (_free_arena_trace_handler) { - _free_arena_trace_handler(arena); - } -} -#endif // UPB_TRACING_ENABLED - -// If the param a is already the root, provides no memory order of refcount. -// If it has a parent, then acquire memory order is provided for both the root -// and the refcount. Thread safe. -static upb_ArenaRoot _upb_Arena_FindRoot(upb_ArenaInternal* ai) { - uintptr_t poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_relaxed); - if (_upb_Arena_IsTaggedRefcount(poc)) { - // Fast, relaxed path - arenas that have never been fused to a parent only - // need relaxed memory order, since they're returning themselves and the - // refcount. - return (upb_ArenaRoot){.root = ai, .tagged_count = poc}; - } - // Slow path needs acquire order; reloading is cheaper than a fence on ARM - // (LDA vs DMB ISH). Even though this is a reread, we know it must be a tagged - // pointer because if this Arena isn't a root, it can't ever become one. - poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_acquire); - do { - upb_ArenaInternal* next = _upb_Arena_PointerFromTagged(poc); - UPB_TSAN_CHECK_PUBLISHED(next); - UPB_ASSERT(ai != next); - poc = upb_Atomic_Load(&next->parent_or_count, memory_order_acquire); - - if (_upb_Arena_IsTaggedPointer(poc)) { - // To keep complexity down, we lazily collapse levels of the tree. This - // keeps it flat in the final case, but doesn't cost much incrementally. - // - // Path splitting keeps time complexity down, see: - // https://en.wikipedia.org/wiki/Disjoint-set_data_structure - UPB_ASSERT(ai != _upb_Arena_PointerFromTagged(poc)); - upb_Atomic_Store(&ai->parent_or_count, poc, memory_order_release); - } - ai = next; - } while (_upb_Arena_IsTaggedPointer(poc)); - return (upb_ArenaRoot){.root = ai, .tagged_count = poc}; -} - -uintptr_t upb_Arena_SpaceAllocated(const upb_Arena* arena, - size_t* fused_count) { - upb_ArenaInternal* ai = upb_Arena_Internal(arena); - uintptr_t memsize = 0; - size_t local_fused_count = 0; - // Our root would get updated by any racing fuses before our target arena - // became reachable from the root via the linked list; in order to preserve - // monotonic output (any arena counted by a previous invocation is counted by - // this one), we instead iterate forwards and backwards so that we only see - // the results of completed fuses. - uintptr_t previous_or_tail = - upb_Atomic_Load(&ai->previous_or_tail, memory_order_acquire); - while (_upb_Arena_IsTaggedPrevious(previous_or_tail)) { - upb_ArenaInternal* previous = - _upb_Arena_PreviousFromTagged(previous_or_tail); - UPB_ASSERT(previous != ai); - UPB_TSAN_CHECK_PUBLISHED(previous); - // Unfortunate macro behavior; prior to C11 when using nonstandard atomics - // this returns a void* and can't be used with += without an intermediate - // conversion to an integer. - // Relaxed is safe - no subsequent reads depend this one - uintptr_t allocated = - upb_Atomic_Load(&previous->space_allocated, memory_order_relaxed); - memsize += allocated; - previous_or_tail = - upb_Atomic_Load(&previous->previous_or_tail, memory_order_acquire); - local_fused_count++; - } - while (ai != NULL) { - UPB_TSAN_CHECK_PUBLISHED(ai); - // Unfortunate macro behavior; prior to C11 when using nonstandard atomics - // this returns a void* and can't be used with += without an intermediate - // conversion to an integer. - // Relaxed is safe - no subsequent reads depend this one - uintptr_t allocated = - upb_Atomic_Load(&ai->space_allocated, memory_order_relaxed); - memsize += allocated; - ai = upb_Atomic_Load(&ai->next, memory_order_acquire); - local_fused_count++; - } - - if (fused_count) *fused_count = local_fused_count; - return memsize; -} - -uint32_t upb_Arena_DebugRefCount(const upb_Arena* a) { - uintptr_t tagged = _upb_Arena_FindRoot(upb_Arena_Internal(a)).tagged_count; - return (uint32_t)_upb_Arena_RefCountFromTagged(tagged); -} - -// Adds an allocated block to the head of the list. -static void _upb_Arena_AddBlock(upb_Arena* a, void* ptr, size_t offset, - size_t block_size) { - upb_ArenaInternal* ai = upb_Arena_Internal(a); - upb_MemBlock* block = ptr; - - block->size_or_hint = block_size; - UPB_ASSERT(offset >= kUpb_MemblockReserve); - char* start = UPB_PTR_AT(block, offset, char); - upb_MemBlock* head = ai->blocks; - if (head && head->next) { - // Fix up size to match actual allocation size - head->size_or_hint = a->UPB_PRIVATE(end) - (char*)head; - } - block->next = head; - ai->blocks = block; - a->UPB_PRIVATE(ptr) = start; - a->UPB_PRIVATE(end) = UPB_PTR_AT(block, block_size, char); - UPB_POISON_MEMORY_REGION(start, a->UPB_PRIVATE(end) - start); - UPB_ASSERT(UPB_PRIVATE(_upb_ArenaHas)(a) >= block_size - offset); -} - -// Fulfills the allocation request by allocating a new block. Returns NULL on -// allocation failure. -void* UPB_PRIVATE(_upb_Arena_SlowMalloc)(upb_Arena* a, size_t size) { - upb_ArenaInternal* ai = upb_Arena_Internal(a); - if (!ai->block_alloc) return NULL; - size_t last_size = 128; - size_t current_free = 0; - upb_MemBlock* last_block = ai->blocks; - if (last_block) { - last_size = a->UPB_PRIVATE(end) - (char*)last_block; - current_free = a->UPB_PRIVATE(end) - a->UPB_PRIVATE(ptr); - } - - // Relaxed order is safe here as we don't need any ordering with the setter. - size_t max_block_size = - upb_Atomic_Load(&g_max_block_size, memory_order_relaxed); - - // Don't naturally grow beyond the max block size. - size_t target_size = UPB_MIN(last_size * 2, max_block_size); - size_t future_free = UPB_MAX(size, target_size - kUpb_MemblockReserve) - size; - // We want to preserve exponential growth in block size without wasting too - // much unused space at the end of blocks. Once the head of our blocks list is - // large enough to always trigger a max-sized block for all subsequent - // allocations, allocate blocks that would net reduce free space behind it. - if (last_block && current_free > future_free && - target_size < max_block_size) { - last_size = last_block->size_or_hint; - // Recalculate sizes with possibly larger last_size - target_size = UPB_MIN(last_size * 2, max_block_size); - future_free = UPB_MAX(size, target_size - kUpb_MemblockReserve) - size; - } - bool insert_after_head = false; - // Only insert after head if an allocated block is present; we don't want to - // continue allocating out of the initial block because we'll have no way of - // restoring the size of our allocated block if we add another. - if (last_block && current_free >= future_free) { - // If we're still going to net reduce free space with this new block, then - // only allocate the precise size requested and keep the current last block - // as the active block for future allocations. - insert_after_head = true; - target_size = size + kUpb_MemblockReserve; - // Add something to our previous size each time, so that eventually we - // will reach the max block size. Allocations larger than the max block size - // will always get their own backing allocation, so don't include them. - if (target_size <= max_block_size) { - last_block->size_or_hint = - UPB_MIN(last_block->size_or_hint + (size >> 1), max_block_size >> 1); - } - } - // We may need to exceed the max block size if the user requested a large - // allocation. - size_t block_size = UPB_MAX(kUpb_MemblockReserve + size, target_size); - - upb_MemBlock* block = - upb_malloc(_upb_ArenaInternal_BlockAlloc(ai), block_size); - - if (!block) return NULL; - // Atomic add not required here, as threads won't race allocating blocks, plus - // atomic fetch-add is slower than load/add/store on arm devices compiled - // targetting pre-v8.1. Relaxed order is safe as nothing depends on order of - // size allocated. - - uintptr_t old_space_allocated = - upb_Atomic_Load(&ai->space_allocated, memory_order_relaxed); - upb_Atomic_Store(&ai->space_allocated, old_space_allocated + block_size, - memory_order_relaxed); - if (UPB_UNLIKELY(insert_after_head)) { - upb_ArenaInternal* ai = upb_Arena_Internal(a); - block->size_or_hint = block_size; - upb_MemBlock* head = ai->blocks; - block->next = head->next; - head->next = block; - - char* allocated = UPB_PTR_AT(block, kUpb_MemblockReserve, char); - UPB_POISON_MEMORY_REGION(allocated + size, UPB_ASAN_GUARD_SIZE); - return allocated; - } else { - _upb_Arena_AddBlock(a, block, kUpb_MemblockReserve, block_size); - UPB_ASSERT(UPB_PRIVATE(_upb_ArenaHas)(a) >= size); - return upb_Arena_Malloc(a, size - UPB_ASAN_GUARD_SIZE); - } -} - -static upb_Arena* _upb_Arena_InitSlow(upb_alloc* alloc, size_t first_size) { - const size_t first_block_overhead = - UPB_ALIGN_MALLOC(kUpb_MemblockReserve + sizeof(upb_ArenaState)); - upb_ArenaState* a; - - // We need to malloc the initial block. - char* mem; - size_t block_size = - first_block_overhead + - UPB_MAX(256, UPB_ALIGN_MALLOC(first_size) + UPB_ASAN_GUARD_SIZE); - if (!alloc || !(mem = upb_malloc(alloc, block_size))) { - return NULL; - } - - a = UPB_PTR_AT(mem, kUpb_MemblockReserve, upb_ArenaState); - - a->body.block_alloc = _upb_Arena_MakeBlockAlloc(alloc, 0); - upb_Atomic_Init(&a->body.parent_or_count, _upb_Arena_TaggedFromRefcount(1)); - upb_Atomic_Init(&a->body.next, NULL); - upb_Atomic_Init(&a->body.previous_or_tail, - _upb_Arena_TaggedFromTail(&a->body)); - upb_Atomic_Init(&a->body.space_allocated, block_size); - a->body.blocks = NULL; - a->body.upb_alloc_cleanup = NULL; - UPB_TSAN_INIT_PUBLISHED(&a->body); - - _upb_Arena_AddBlock(&a->head, mem, first_block_overhead, block_size); - - return &a->head; -} - -upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc) { - UPB_ASSERT(sizeof(void*) * UPB_ARENA_SIZE_HACK >= sizeof(upb_ArenaState)); - upb_ArenaState* a; - - if (mem) { - /* Align initial pointer up so that we return properly-aligned pointers. */ - void* aligned = (void*)UPB_ALIGN_MALLOC((uintptr_t)mem); - size_t delta = (uintptr_t)aligned - (uintptr_t)mem; - n = delta <= n ? n - delta : 0; - mem = aligned; - } - if (UPB_UNLIKELY(n < sizeof(upb_ArenaState) || !mem)) { - upb_Arena* ret = _upb_Arena_InitSlow(alloc, mem ? 0 : n); -#ifdef UPB_TRACING_ENABLED - upb_Arena_LogInit(ret, n); -#endif - return ret; - } - - a = mem; - - upb_Atomic_Init(&a->body.parent_or_count, _upb_Arena_TaggedFromRefcount(1)); - upb_Atomic_Init(&a->body.next, NULL); - upb_Atomic_Init(&a->body.previous_or_tail, - _upb_Arena_TaggedFromTail(&a->body)); - upb_Atomic_Init(&a->body.space_allocated, 0); - a->body.blocks = NULL; - a->body.upb_alloc_cleanup = NULL; - a->body.block_alloc = _upb_Arena_MakeBlockAlloc(alloc, 1); - a->head.UPB_PRIVATE(ptr) = (void*)UPB_ALIGN_MALLOC((uintptr_t)(a + 1)); - a->head.UPB_PRIVATE(end) = UPB_PTR_AT(mem, n, char); - UPB_TSAN_INIT_PUBLISHED(&a->body); -#ifdef UPB_TRACING_ENABLED - upb_Arena_LogInit(&a->head, n); -#endif - return &a->head; -} - -static void _upb_Arena_DoFree(upb_ArenaInternal* ai) { - UPB_ASSERT(_upb_Arena_RefCountFromTagged(ai->parent_or_count) == 1); - while (ai != NULL) { - UPB_TSAN_CHECK_PUBLISHED(ai); - // Load first since arena itself is likely from one of its blocks. - upb_ArenaInternal* next_arena = - (upb_ArenaInternal*)upb_Atomic_Load(&ai->next, memory_order_acquire); - // Freeing may have memory barriers that confuse tsan, so assert immediately - // after load here - if (next_arena) { - UPB_TSAN_CHECK_PUBLISHED(next_arena); - } - upb_alloc* block_alloc = _upb_ArenaInternal_BlockAlloc(ai); - upb_MemBlock* block = ai->blocks; - if (block && block->next) { - block->size_or_hint = - upb_Arena_FromInternal(ai)->UPB_PRIVATE(end) - (char*)block; - } - upb_AllocCleanupFunc* alloc_cleanup = *ai->upb_alloc_cleanup; - while (block != NULL) { - // Load first since we are deleting block. - upb_MemBlock* next_block = block->next; - upb_free_sized(block_alloc, block, block->size_or_hint); - block = next_block; - } - if (alloc_cleanup != NULL) { - alloc_cleanup(block_alloc); - } - ai = next_arena; - } -} - -void upb_Arena_Free(upb_Arena* a) { - upb_ArenaInternal* ai = upb_Arena_Internal(a); - // Cannot be replaced with _upb_Arena_FindRoot, as that provides only a - // relaxed read of the refcount if ai is already the root. - uintptr_t poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_acquire); -retry: - while (_upb_Arena_IsTaggedPointer(poc)) { - ai = _upb_Arena_PointerFromTagged(poc); - UPB_TSAN_CHECK_PUBLISHED(ai); - poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_acquire); - } - - // compare_exchange or fetch_sub are RMW operations, which are more - // expensive then direct loads. As an optimization, we only do RMW ops - // when we need to update things for other threads to see. - if (poc == _upb_Arena_TaggedFromRefcount(1)) { -#ifdef UPB_TRACING_ENABLED - upb_Arena_LogFree(a); -#endif - _upb_Arena_DoFree(ai); - return; - } - - if (upb_Atomic_CompareExchangeWeak( - &ai->parent_or_count, &poc, - _upb_Arena_TaggedFromRefcount(_upb_Arena_RefCountFromTagged(poc) - 1), - memory_order_release, memory_order_acquire)) { - // We were >1 and we decremented it successfully, so we are done. - return; - } - - // We failed our update, so someone has done something, retry the whole - // process, but the failed exchange reloaded `poc` for us. - goto retry; -} - -// Logically performs the following operation, in a way that is safe against -// racing fuses: -// ret = TAIL(parent) -// ret->next = child -// return ret -// -// The caller is therefore guaranteed that ret->next == child. -static upb_ArenaInternal* _upb_Arena_LinkForward( - upb_ArenaInternal* const parent, upb_ArenaInternal* child) { - UPB_TSAN_CHECK_PUBLISHED(parent); - uintptr_t parent_previous_or_tail = - upb_Atomic_Load(&parent->previous_or_tail, memory_order_acquire); - - // Optimization: use parent->previous_or_tail to skip to TAIL(parent) in O(1) - // time when possible. This is the common case because we just fused into - // parent, suggesting that it should be a root with a cached tail. - // - // However, if there was a racing fuse, parent may no longer be a root, in - // which case we need to walk the entire list to find the tail. The tail - // pointer is also not guaranteed to be the true tail, so even when the - // optimization is taken, we still need to walk list nodes to find the true - // tail. - upb_ArenaInternal* parent_tail = - _upb_Arena_IsTaggedTail(parent_previous_or_tail) - ? _upb_Arena_TailFromTagged(parent_previous_or_tail) - : parent; - - UPB_TSAN_CHECK_PUBLISHED(parent_tail); - upb_ArenaInternal* parent_tail_next = - upb_Atomic_Load(&parent_tail->next, memory_order_acquire); - - do { - // Walk the list to find the true tail (a node with next == NULL). - while (parent_tail_next != NULL) { - parent_tail = parent_tail_next; - UPB_TSAN_CHECK_PUBLISHED(parent_tail); - parent_tail_next = - upb_Atomic_Load(&parent_tail->next, memory_order_acquire); - } - } while (!upb_Atomic_CompareExchangeWeak( // Replace a NULL next with child. - &parent_tail->next, &parent_tail_next, child, memory_order_release, - memory_order_acquire)); - - return parent_tail; -} - -// Updates parent->previous_or_tail = child->previous_or_tail in hopes that the -// latter represents the true tail of the newly-combined list. -// -// This is a best-effort operation that may set the tail to a stale value, and -// may fail to update the tail at all. -void _upb_Arena_UpdateParentTail(upb_ArenaInternal* parent, - upb_ArenaInternal* child) { - // We are guaranteed that child->previous_or_tail is tagged, because we have - // just transitioned child from root -> non-root, which is an exclusive - // operation that can only happen once. So we are the exclusive updater of - // child->previous_or_tail that can transition it from tagged to untagged. - // - // However, we are not guaranteed that child->previous_or_tail is the true - // tail. A racing fuse may have appended to child's list but not yet updated - // child->previous_or_tail. - uintptr_t child_previous_or_tail = - upb_Atomic_Load(&child->previous_or_tail, memory_order_acquire); - upb_ArenaInternal* new_parent_tail = - _upb_Arena_TailFromTagged(child_previous_or_tail); - UPB_TSAN_CHECK_PUBLISHED(new_parent_tail); - - // If another thread fused with parent, such that it is no longer a root, - // don't overwrite their previous pointer with our tail. Relaxed order is fine - // here as we only inspect the tag bit. - uintptr_t parent_previous_or_tail = - upb_Atomic_Load(&parent->previous_or_tail, memory_order_relaxed); - if (_upb_Arena_IsTaggedTail(parent_previous_or_tail)) { - upb_Atomic_CompareExchangeStrong( - &parent->previous_or_tail, &parent_previous_or_tail, - _upb_Arena_TaggedFromTail(new_parent_tail), memory_order_release, - memory_order_relaxed); - } -} - -static void _upb_Arena_LinkBackward(upb_ArenaInternal* child, - upb_ArenaInternal* old_parent_tail) { - // Link child to parent going backwards, for SpaceAllocated. This transitions - // child->previous_or_tail from tail (tagged) to previous (untagged), after - // which its value is immutable. - // - // - We are guaranteed that no other threads are also attempting to perform - // this transition (tail -> previous), because we just updated - // old_parent_tail->next from NULL to non-NULL, an exclusive operation that - // can only happen once. - // - // - _upb_Arena_UpdateParentTail() uses CAS to ensure that it - // does not perform the reverse transition (previous -> tail). - // - // - We are guaranteed that old_parent_tail is the correct "previous" pointer, - // even in the presence of racing fuses that are adding more nodes to the - // list, because _upb_Arena_LinkForward() guarantees that: - // old_parent_tail->next == child. - upb_Atomic_Store(&child->previous_or_tail, - _upb_Arena_TaggedFromPrevious(old_parent_tail), - memory_order_release); -} - -static void _upb_Arena_DoFuseArenaLists(upb_ArenaInternal* const parent, - upb_ArenaInternal* child) { - upb_ArenaInternal* old_parent_tail = _upb_Arena_LinkForward(parent, child); - _upb_Arena_UpdateParentTail(parent, child); - _upb_Arena_LinkBackward(child, old_parent_tail); -} - -void upb_Arena_SetAllocCleanup(upb_Arena* a, upb_AllocCleanupFunc* func) { - UPB_TSAN_CHECK_READ(a->UPB_ONLYBITS(ptr)); - upb_ArenaInternal* ai = upb_Arena_Internal(a); - UPB_ASSERT(ai->upb_alloc_cleanup == NULL); - ai->upb_alloc_cleanup = func; -} - -// Thread safe. -static upb_ArenaInternal* _upb_Arena_DoFuse(upb_ArenaInternal** ai1, - upb_ArenaInternal** ai2, - uintptr_t* ref_delta) { - // `parent_or_count` has two distinct modes - // - parent pointer mode - // - refcount mode - // - // In parent pointer mode, it may change what pointer it refers to in the - // tree, but it will always approach a root. Any operation that walks the - // tree to the root may collapse levels of the tree concurrently. - upb_ArenaRoot r1 = _upb_Arena_FindRoot(*ai1); - upb_ArenaRoot r2 = _upb_Arena_FindRoot(*ai2); - - if (r1.root == r2.root) return r1.root; // Already fused. - - *ai1 = r1.root; - *ai2 = r2.root; - - // Avoid cycles by always fusing into the root with the lower address. - if ((uintptr_t)r1.root > (uintptr_t)r2.root) { - upb_ArenaRoot tmp = r1; - r1 = r2; - r2 = tmp; - } - - // The moment we install `r1` as the parent for `r2` all racing frees may - // immediately begin decrementing `r1`'s refcount (including pending - // increments to that refcount and their frees!). We need to add `r2`'s refs - // now, so that `r1` can withstand any unrefs that come from r2. - // - // Note that while it is possible for `r2`'s refcount to increase - // asynchronously, we will not actually do the reparenting operation below - // unless `r2`'s refcount is unchanged from when we read it. - // - // Note that we may have done this previously, either to this node or a - // different node, during a previous and failed DoFuse() attempt. But we will - // not lose track of these refs because we always add them to our overall - // delta. - uintptr_t r2_untagged_count = r2.tagged_count & ~1; - uintptr_t with_r2_refs = r1.tagged_count + r2_untagged_count; - if (!upb_Atomic_CompareExchangeStrong( - &r1.root->parent_or_count, &r1.tagged_count, with_r2_refs, - memory_order_release, memory_order_acquire)) { - return NULL; - } - - // Perform the actual fuse by removing the refs from `r2` and swapping in the - // parent pointer. - if (!upb_Atomic_CompareExchangeStrong( - &r2.root->parent_or_count, &r2.tagged_count, - _upb_Arena_TaggedFromPointer(r1.root), memory_order_release, - memory_order_acquire)) { - // We'll need to remove the excess refs we added to r1 previously. - *ref_delta += r2_untagged_count; - return NULL; - } - - // Now that the fuse has been performed (and can no longer fail) we need to - // append `r2` to `r1`'s linked list. - _upb_Arena_DoFuseArenaLists(r1.root, r2.root); - return r1.root; -} - -// Thread safe. -static bool _upb_Arena_FixupRefs(upb_ArenaInternal* new_root, - uintptr_t ref_delta) { - if (ref_delta == 0) return true; // No fixup required. - // Relaxed order is safe here as if the value is a pointer, we don't deref it - // or publish it anywhere else. The refcount does provide memory order - // between allocations on arenas and the eventual free and thus normally - // requires acquire/release; but in this case any edges provided by the refs - // we are cleaning up were already provided by the fuse operation itself. It's - // not valid for a decrement that could cause the overall fused arena to reach - // a zero refcount to race with this function, as that could result in a - // use-after-free anyway. - uintptr_t poc = - upb_Atomic_Load(&new_root->parent_or_count, memory_order_relaxed); - if (_upb_Arena_IsTaggedPointer(poc)) return false; - uintptr_t with_refs = poc - ref_delta; - UPB_ASSERT(!_upb_Arena_IsTaggedPointer(with_refs)); - // Relaxed order on success is safe here, for the same reasons as the relaxed - // read above. Relaxed order is safe on failure because the updated value is - // stored in a local variable which goes immediately out of scope; the retry - // loop will reread what it needs with proper memory order. - return upb_Atomic_CompareExchangeStrong(&new_root->parent_or_count, &poc, - with_refs, memory_order_relaxed, - memory_order_relaxed); -} - -bool upb_Arena_Fuse(const upb_Arena* a1, const upb_Arena* a2) { - if (a1 == a2) return true; // trivial fuse - -#ifdef UPB_TRACING_ENABLED - upb_Arena_LogFuse(a1, a2); -#endif - - upb_ArenaInternal* ai1 = upb_Arena_Internal(a1); - upb_ArenaInternal* ai2 = upb_Arena_Internal(a2); - - // Do not fuse initial blocks since we cannot lifetime extend them. - // Any other fuse scenario is allowed. - if (_upb_ArenaInternal_HasInitialBlock(ai1) || - _upb_ArenaInternal_HasInitialBlock(ai2)) { - return false; - } - - // The number of refs we ultimately need to transfer to the new root. - uintptr_t ref_delta = 0; - while (true) { - upb_ArenaInternal* new_root = _upb_Arena_DoFuse(&ai1, &ai2, &ref_delta); - if (new_root != NULL && _upb_Arena_FixupRefs(new_root, ref_delta)) { - return true; - } - } -} - -bool upb_Arena_IsFused(const upb_Arena* a, const upb_Arena* b) { - if (a == b) return true; // trivial fuse - upb_ArenaInternal* ra = _upb_Arena_FindRoot(upb_Arena_Internal(a)).root; - upb_ArenaInternal* rb = upb_Arena_Internal(b); - while (true) { - rb = _upb_Arena_FindRoot(rb).root; - if (ra == rb) return true; - upb_ArenaInternal* tmp = _upb_Arena_FindRoot(ra).root; - if (ra == tmp) return false; - // a's root changed since we last checked. Retry. - ra = tmp; - } -} - -bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner) { - upb_ArenaInternal* ai = upb_Arena_Internal(a); - if (_upb_ArenaInternal_HasInitialBlock(ai)) return false; - upb_ArenaRoot r; - r.root = ai; - -retry: - r = _upb_Arena_FindRoot(r.root); - if (upb_Atomic_CompareExchangeWeak( - &r.root->parent_or_count, &r.tagged_count, - _upb_Arena_TaggedFromRefcount( - _upb_Arena_RefCountFromTagged(r.tagged_count) + 1), - // Relaxed order is safe on success, incrementing the refcount - // need not perform any synchronization with the eventual free of the - // arena - that's provided by decrements. - memory_order_relaxed, - // Relaxed order is safe on failure as r.tagged_count is immediately - // overwritten by retrying the find root operation. - memory_order_relaxed)) { - // We incremented it successfully, so we are done. - return true; - } - // We failed update due to parent switching on the arena. - goto retry; -} - -void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner) { - upb_Arena_Free((upb_Arena*)a); -} - -upb_alloc* upb_Arena_GetUpbAlloc(upb_Arena* a) { - UPB_TSAN_CHECK_READ(a->UPB_ONLYBITS(ptr)); - upb_ArenaInternal* ai = upb_Arena_Internal(a); - return _upb_ArenaInternal_BlockAlloc(ai); -} - -void UPB_PRIVATE(_upb_Arena_SwapIn)(upb_Arena* des, const upb_Arena* src) { - upb_ArenaInternal* desi = upb_Arena_Internal(des); - upb_ArenaInternal* srci = upb_Arena_Internal(src); - - *des = *src; - desi->block_alloc = srci->block_alloc; - desi->blocks = srci->blocks; -} - -void UPB_PRIVATE(_upb_Arena_SwapOut)(upb_Arena* des, const upb_Arena* src) { - upb_ArenaInternal* desi = upb_Arena_Internal(des); - upb_ArenaInternal* srci = upb_Arena_Internal(src); - - *des = *src; - desi->blocks = srci->blocks; -} - -bool _upb_Arena_WasLastAlloc(struct upb_Arena* a, void* ptr, size_t oldsize) { - upb_ArenaInternal* ai = upb_Arena_Internal(a); - upb_MemBlock* block = ai->blocks; - if (block == NULL) return false; - block = block->next; - if (block == NULL) return false; - char* start = UPB_PTR_AT(block, kUpb_MemblockReserve, char); - return ptr == start && oldsize == block->size_or_hint - kUpb_MemblockReserve; -} - - - -// Must be last. - -bool upb_Message_SetMapEntry(upb_Map* map, const upb_MiniTable* m, - const upb_MiniTableField* f, - upb_Message* map_entry_message, upb_Arena* arena) { - UPB_ASSERT(!upb_Message_IsFrozen(map_entry_message)); - const upb_MiniTable* map_entry_mini_table = - upb_MiniTable_MapEntrySubMessage(m, f); - UPB_ASSERT(map_entry_mini_table); - const upb_MiniTableField* map_entry_key_field = - upb_MiniTable_MapKey(map_entry_mini_table); - const upb_MiniTableField* map_entry_value_field = - upb_MiniTable_MapValue(map_entry_mini_table); - // Map key/value cannot have explicit defaults, - // hence assuming a zero default is valid. - upb_MessageValue default_val = upb_MessageValue_Zero(); - upb_MessageValue map_entry_key = - upb_Message_GetField(map_entry_message, map_entry_key_field, default_val); - upb_MessageValue map_entry_value = upb_Message_GetField( - map_entry_message, map_entry_value_field, default_val); - return upb_Map_Set(map, map_entry_key, map_entry_value, arena); -} - - -#include -#include - - -// Must be last. - -upb_Array* upb_Array_New(upb_Arena* a, upb_CType type) { - const int lg2 = UPB_PRIVATE(_upb_CType_SizeLg2)(type); - return UPB_PRIVATE(_upb_Array_New)(a, 4, lg2); -} - -upb_MessageValue upb_Array_Get(const upb_Array* arr, size_t i) { - UPB_ASSERT(i < upb_Array_Size(arr)); - upb_MessageValue ret; - const char* data = upb_Array_DataPtr(arr); - const int lg2 = UPB_PRIVATE(_upb_Array_ElemSizeLg2)(arr); - memcpy(&ret, data + (i << lg2), 1 << lg2); - return ret; -} - -upb_Message* upb_Array_GetMutable(upb_Array* arr, size_t i) { - UPB_ASSERT(i < upb_Array_Size(arr)); - size_t elem_size = sizeof(upb_Message*); - UPB_ASSERT(elem_size == (1 << UPB_PRIVATE(_upb_Array_ElemSizeLg2)(arr))); - char* data = upb_Array_MutableDataPtr(arr); - upb_Message* ret; - memcpy(&ret, data + (i * elem_size), elem_size); - UPB_ASSERT(!upb_Message_IsFrozen(ret)); - return ret; -} - -void upb_Array_Set(upb_Array* arr, size_t i, upb_MessageValue val) { - UPB_ASSERT(!upb_Array_IsFrozen(arr)); - UPB_ASSERT(i < upb_Array_Size(arr)); - char* data = upb_Array_MutableDataPtr(arr); - const int lg2 = UPB_PRIVATE(_upb_Array_ElemSizeLg2)(arr); - memcpy(data + (i << lg2), &val, 1 << lg2); -} - -bool upb_Array_Append(upb_Array* arr, upb_MessageValue val, upb_Arena* arena) { - UPB_ASSERT(!upb_Array_IsFrozen(arr)); - UPB_ASSERT(arena); - if (!UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - upb_Array_Set(arr, arr->UPB_PRIVATE(size) - 1, val); - return true; -} - -void upb_Array_Move(upb_Array* arr, size_t dst_idx, size_t src_idx, - size_t count) { - UPB_ASSERT(!upb_Array_IsFrozen(arr)); - const int lg2 = UPB_PRIVATE(_upb_Array_ElemSizeLg2)(arr); - char* data = upb_Array_MutableDataPtr(arr); - memmove(&data[dst_idx << lg2], &data[src_idx << lg2], count << lg2); -} - -bool upb_Array_Insert(upb_Array* arr, size_t i, size_t count, - upb_Arena* arena) { - UPB_ASSERT(!upb_Array_IsFrozen(arr)); - UPB_ASSERT(arena); - UPB_ASSERT(i <= arr->UPB_PRIVATE(size)); - UPB_ASSERT(count + arr->UPB_PRIVATE(size) >= count); - const size_t oldsize = arr->UPB_PRIVATE(size); - if (!UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + count, arena)) { - return false; - } - upb_Array_Move(arr, i + count, i, oldsize - i); - return true; -} - -/* - * i end arr->size - * |------------|XXXXXXXX|--------| - */ -void upb_Array_Delete(upb_Array* arr, size_t i, size_t count) { - UPB_ASSERT(!upb_Array_IsFrozen(arr)); - const size_t end = i + count; - UPB_ASSERT(i <= end); - UPB_ASSERT(end <= arr->UPB_PRIVATE(size)); - upb_Array_Move(arr, i, end, arr->UPB_PRIVATE(size) - end); - arr->UPB_PRIVATE(size) -= count; -} - -bool upb_Array_Resize(upb_Array* arr, size_t size, upb_Arena* arena) { - UPB_ASSERT(!upb_Array_IsFrozen(arr)); - const size_t oldsize = arr->UPB_PRIVATE(size); - if (UPB_UNLIKELY( - !UPB_PRIVATE(_upb_Array_ResizeUninitialized)(arr, size, arena))) { - return false; - } - const size_t newsize = arr->UPB_PRIVATE(size); - if (newsize > oldsize) { - const int lg2 = UPB_PRIVATE(_upb_Array_ElemSizeLg2)(arr); - char* data = upb_Array_MutableDataPtr(arr); - memset(data + (oldsize << lg2), 0, (newsize - oldsize) << lg2); - } - return true; -} - -bool UPB_PRIVATE(_upb_Array_Realloc)(upb_Array* array, size_t min_capacity, - upb_Arena* arena) { - size_t new_capacity = UPB_MAX(array->UPB_PRIVATE(capacity), 4); - const int lg2 = UPB_PRIVATE(_upb_Array_ElemSizeLg2)(array); - size_t old_bytes = array->UPB_PRIVATE(capacity) << lg2; - void* ptr = upb_Array_MutableDataPtr(array); - - // Log2 ceiling of size. - while (new_capacity < min_capacity) new_capacity *= 2; - - const size_t new_bytes = new_capacity << lg2; - ptr = upb_Arena_Realloc(arena, ptr, old_bytes, new_bytes); - if (!ptr) return false; - - UPB_PRIVATE(_upb_Array_SetTaggedPtr)(array, ptr, lg2); - array->UPB_PRIVATE(capacity) = new_capacity; - return true; -} - -void upb_Array_Freeze(upb_Array* arr, const upb_MiniTable* m) { - if (upb_Array_IsFrozen(arr)) return; - UPB_PRIVATE(_upb_Array_ShallowFreeze)(arr); - - if (m) { - const size_t size = upb_Array_Size(arr); - - for (size_t i = 0; i < size; i++) { - upb_MessageValue val = upb_Array_Get(arr, i); - upb_Message_Freeze((upb_Message*)val.msg_val, m); - } - } -} - - -#include -#include - - -// Must be last. - -bool upb_Message_NextExtensionReverse(const upb_Message* msg, - const upb_MiniTableExtension** result, - uintptr_t* iter) { - upb_MessageValue val; - return UPB_PRIVATE(_upb_Message_NextExtensionReverse)(msg, result, &val, - iter); -} - -const upb_MiniTableExtension* upb_Message_FindExtensionByNumber( - const upb_Message* msg, uint32_t field_number) { - uintptr_t iter = kUpb_Message_ExtensionBegin; - const upb_MiniTableExtension* result; - while (upb_Message_NextExtensionReverse(msg, &result, &iter)) { - if (upb_MiniTableExtension_Number(result) == field_number) return result; - } - return NULL; -} - - -#include -#include - - -// Must be last. - -// Strings/bytes are special-cased in maps. -char _upb_Map_CTypeSizeTable[12] = { - [kUpb_CType_Bool] = 1, - [kUpb_CType_Float] = 4, - [kUpb_CType_Int32] = 4, - [kUpb_CType_UInt32] = 4, - [kUpb_CType_Enum] = 4, - [kUpb_CType_Message] = sizeof(void*), - [kUpb_CType_Double] = 8, - [kUpb_CType_Int64] = 8, - [kUpb_CType_UInt64] = 8, - [kUpb_CType_String] = UPB_MAPTYPE_STRING, - [kUpb_CType_Bytes] = UPB_MAPTYPE_STRING, -}; - -upb_Map* upb_Map_New(upb_Arena* a, upb_CType key_type, upb_CType value_type) { - return _upb_Map_New(a, _upb_Map_CTypeSize(key_type), - _upb_Map_CTypeSize(value_type)); -} - -size_t upb_Map_Size(const upb_Map* map) { return _upb_Map_Size(map); } - -bool upb_Map_Get(const upb_Map* map, upb_MessageValue key, - upb_MessageValue* val) { - return _upb_Map_Get(map, &key, map->key_size, val, map->val_size); -} - -struct upb_Message* upb_Map_GetMutable(upb_Map* map, upb_MessageValue key) { - UPB_ASSERT(map->val_size == sizeof(upb_Message*)); - upb_Message* val = NULL; - if (_upb_Map_Get(map, &key, map->key_size, &val, sizeof(upb_Message*))) { - return val; - } else { - return NULL; - } -} - -void upb_Map_Clear(upb_Map* map) { _upb_Map_Clear(map); } - -upb_MapInsertStatus upb_Map_Insert(upb_Map* map, upb_MessageValue key, - upb_MessageValue val, upb_Arena* arena) { - UPB_ASSERT(arena); - return (upb_MapInsertStatus)_upb_Map_Insert(map, &key, map->key_size, &val, - map->val_size, arena); -} - -bool upb_Map_Delete(upb_Map* map, upb_MessageValue key, upb_MessageValue* val) { - upb_value v; - const bool removed = _upb_Map_Delete(map, &key, map->key_size, &v); - if (val) _upb_map_fromvalue(v, val, map->val_size); - return removed; -} - -bool upb_Map_Next(const upb_Map* map, upb_MessageValue* key, - upb_MessageValue* val, size_t* iter) { - upb_value v; - bool ret; - if (map->UPB_PRIVATE(is_strtable)) { - upb_StringView strkey; - ret = upb_strtable_next2(&map->t.strtable, &strkey, &v, (intptr_t*)iter); - if (ret) { - _upb_map_fromkey(strkey, key, map->key_size); - } - } else { - uintptr_t intkey; - ret = upb_inttable_next(&map->t.inttable, &intkey, &v, (intptr_t*)iter); - if (ret) { - memcpy(key, &intkey, map->key_size); - } - } - if (ret) { - _upb_map_fromvalue(v, val, map->val_size); - } - return ret; -} - -UPB_API void upb_Map_SetEntryValue(upb_Map* map, size_t iter, - upb_MessageValue val) { - upb_value v; - _upb_map_tovalue(&val, map->val_size, &v, NULL); - if (map->UPB_PRIVATE(is_strtable)) { - upb_strtable_setentryvalue(&map->t.strtable, iter, v); - } else { - upb_inttable_setentryvalue(&map->t.inttable, iter, v); - } -} - -bool upb_MapIterator_Next(const upb_Map* map, size_t* iter) { - return _upb_map_next(map, iter); -} - -bool upb_MapIterator_Done(const upb_Map* map, size_t iter) { - UPB_ASSERT(iter != kUpb_Map_Begin); - if (map->UPB_PRIVATE(is_strtable)) { - upb_strtable_iter i; - i.t = &map->t.strtable; - i.index = iter; - return upb_strtable_done(&i); - } else { - return upb_inttable_done(&map->t.inttable, iter); - } -} - -// Returns the key and value for this entry of the map. -upb_MessageValue upb_MapIterator_Key(const upb_Map* map, size_t iter) { - upb_MessageValue ret; - if (map->UPB_PRIVATE(is_strtable)) { - upb_strtable_iter i; - i.t = &map->t.strtable; - i.index = iter; - _upb_map_fromkey(upb_strtable_iter_key(&i), &ret, map->key_size); - } else { - uintptr_t intkey = upb_inttable_iter_key(&map->t.inttable, iter); - memcpy(&ret, &intkey, map->key_size); - } - return ret; -} - -upb_MessageValue upb_MapIterator_Value(const upb_Map* map, size_t iter) { - upb_value v; - if (map->UPB_PRIVATE(is_strtable)) { - upb_strtable_iter i; - i.t = &map->t.strtable; - i.index = iter; - v = upb_strtable_iter_value(&i); - } else { - v = upb_inttable_iter_value(&map->t.inttable, iter); - } - - upb_MessageValue ret; - _upb_map_fromvalue(v, &ret, map->val_size); - return ret; -} - -void upb_Map_Freeze(upb_Map* map, const upb_MiniTable* m) { - if (upb_Map_IsFrozen(map)) return; - UPB_PRIVATE(_upb_Map_ShallowFreeze)(map); - - if (m) { - size_t iter = kUpb_Map_Begin; - upb_MessageValue key, val; - - while (upb_Map_Next(map, &key, &val, &iter)) { - upb_Message_Freeze((upb_Message*)val.msg_val, m); - } - } -} - -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -upb_Map* _upb_Map_New(upb_Arena* a, size_t key_size, size_t value_size) { - upb_Map* map = upb_Arena_Malloc(a, sizeof(upb_Map)); - if (!map) return NULL; - - if (key_size <= sizeof(uintptr_t) && key_size != UPB_MAPTYPE_STRING) { - if (!upb_inttable_init(&map->t.inttable, a)) return NULL; - map->UPB_PRIVATE(is_strtable) = false; - } else { - if (!upb_strtable_init(&map->t.strtable, 4, a)) return NULL; - map->UPB_PRIVATE(is_strtable) = true; - } - map->key_size = key_size; - map->val_size = value_size; - map->UPB_PRIVATE(is_frozen) = false; - - return map; -} - - -#include -#include -#include - - -// Must be last. - -static int _upb_mapsorter_intkeys(const void* _a, const void* _b) { - const upb_tabent* const* a = _a; - const upb_tabent* const* b = _b; - uintptr_t a_key = (*a)->key.num; - uintptr_t b_key = (*b)->key.num; - return a_key < b_key ? -1 : a_key > b_key; -} - -static void _upb_mapsorter_getkeys(const void* _a, const void* _b, void* a_key, - void* b_key, size_t size) { - const upb_tabent* const* a = _a; - const upb_tabent* const* b = _b; - upb_StringView a_tabkey = upb_key_strview((*a)->key); - upb_StringView b_tabkey = upb_key_strview((*b)->key); - _upb_map_fromkey(a_tabkey, a_key, size); - _upb_map_fromkey(b_tabkey, b_key, size); -} - -static int _upb_mapsorter_cmpi64(const void* _a, const void* _b) { - int64_t a, b; - _upb_mapsorter_getkeys(_a, _b, &a, &b, 8); - return a < b ? -1 : a > b; -} - -static int _upb_mapsorter_cmpu64(const void* _a, const void* _b) { - uint64_t a, b; - _upb_mapsorter_getkeys(_a, _b, &a, &b, 8); - return a < b ? -1 : a > b; -} - -static int _upb_mapsorter_cmpi32(const void* _a, const void* _b) { - int32_t a, b; - _upb_mapsorter_getkeys(_a, _b, &a, &b, 4); - return a < b ? -1 : a > b; -} - -static int _upb_mapsorter_cmpu32(const void* _a, const void* _b) { - uint32_t a, b; - _upb_mapsorter_getkeys(_a, _b, &a, &b, 4); - return a < b ? -1 : a > b; -} - -static int _upb_mapsorter_cmpbool(const void* _a, const void* _b) { - bool a, b; - _upb_mapsorter_getkeys(_a, _b, &a, &b, 1); - return a < b ? -1 : a > b; -} - -static int _upb_mapsorter_cmpstr(const void* _a, const void* _b) { - upb_StringView a, b; - _upb_mapsorter_getkeys(_a, _b, &a, &b, UPB_MAPTYPE_STRING); - size_t common_size = UPB_MIN(a.size, b.size); - int cmp = memcmp(a.data, b.data, common_size); - if (cmp) return -cmp; - return a.size < b.size ? -1 : a.size > b.size; -} - -static int (*const compar[kUpb_FieldType_SizeOf])(const void*, const void*) = { - [kUpb_FieldType_Int64] = _upb_mapsorter_cmpi64, - [kUpb_FieldType_SFixed64] = _upb_mapsorter_cmpi64, - [kUpb_FieldType_SInt64] = _upb_mapsorter_cmpi64, - - [kUpb_FieldType_UInt64] = _upb_mapsorter_cmpu64, - [kUpb_FieldType_Fixed64] = _upb_mapsorter_cmpu64, - - [kUpb_FieldType_Int32] = _upb_mapsorter_cmpi32, - [kUpb_FieldType_SInt32] = _upb_mapsorter_cmpi32, - [kUpb_FieldType_SFixed32] = _upb_mapsorter_cmpi32, - [kUpb_FieldType_Enum] = _upb_mapsorter_cmpi32, - - [kUpb_FieldType_UInt32] = _upb_mapsorter_cmpu32, - [kUpb_FieldType_Fixed32] = _upb_mapsorter_cmpu32, - - [kUpb_FieldType_Bool] = _upb_mapsorter_cmpbool, - - [kUpb_FieldType_String] = _upb_mapsorter_cmpstr, - [kUpb_FieldType_Bytes] = _upb_mapsorter_cmpstr, -}; - -static bool _upb_mapsorter_resize(_upb_mapsorter* s, _upb_sortedmap* sorted, - int size) { - sorted->start = s->size; - sorted->pos = sorted->start; - sorted->end = sorted->start + size; - - if (sorted->end > s->cap) { - const int oldsize = s->cap * sizeof(*s->entries); - s->cap = upb_RoundUpToPowerOfTwo(sorted->end); - const int newsize = s->cap * sizeof(*s->entries); - s->entries = upb_grealloc(s->entries, oldsize, newsize); - if (!s->entries) return false; - } - - s->size = sorted->end; - return true; -} - -bool _upb_mapsorter_pushmap(_upb_mapsorter* s, upb_FieldType key_type, - const upb_Map* map, _upb_sortedmap* sorted) { - int map_size; - if (map->UPB_PRIVATE(is_strtable)) { - map_size = _upb_Map_Size(map); - } else { - // For inttable, only sort the table entries, since the array part is - // already in a sorted order. - map_size = map->t.inttable.t.count; - } - - if (!_upb_mapsorter_resize(s, sorted, map_size)) return false; - - // Copy non-empty entries from the table to s->entries. - const void** dst = &s->entries[sorted->start]; - const upb_tabent* src; - const upb_tabent* end; - if (map->UPB_PRIVATE(is_strtable)) { - src = map->t.strtable.t.entries; - end = src + upb_table_size(&map->t.strtable.t); - } else { - // For inttable, only sort the table entries, since the array part is - // already in a sorted order. - src = map->t.inttable.t.entries; - end = src + upb_table_size(&map->t.inttable.t); - } - for (; src < end; src++) { - if (!upb_tabent_isempty(src)) { - *dst = src; - dst++; - } - } - UPB_ASSERT(dst == &s->entries[sorted->end]); - - // Sort entries according to the key type. - qsort(&s->entries[sorted->start], map_size, sizeof(*s->entries), - map->UPB_PRIVATE(is_strtable) ? compar[key_type] - : _upb_mapsorter_intkeys); - return true; -} - -static int _upb_mapsorter_cmpext(const void* _a, const void* _b) { - const upb_Extension* const* a = _a; - const upb_Extension* const* b = _b; - uint32_t a_num = upb_MiniTableExtension_Number((*a)->ext); - uint32_t b_num = upb_MiniTableExtension_Number((*b)->ext); - UPB_ASSERT(a_num != b_num); - return a_num < b_num ? -1 : 1; -} - -bool _upb_mapsorter_pushexts(_upb_mapsorter* s, const upb_Message_Internal* in, - _upb_sortedmap* sorted) { - size_t count = 0; - for (size_t i = 0; i < in->size; i++) { - count += upb_TaggedAuxPtr_IsExtension(in->aux_data[i]); - } - if (!_upb_mapsorter_resize(s, sorted, count)) return false; - if (count == 0) return true; - const upb_Extension** entry = - (const upb_Extension**)&s->entries[sorted->start]; - for (size_t i = 0; i < in->size; i++) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i]; - if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - *entry++ = upb_TaggedAuxPtr_Extension(tagged_ptr); - } - } - qsort(&s->entries[sorted->start], count, sizeof(*s->entries), - _upb_mapsorter_cmpext); - return true; -} - - -#include -#include -#include -#include - - -// Must be last. - -upb_Message* upb_Message_New(const upb_MiniTable* m, upb_Arena* a) { - return _upb_Message_New(m, a); -} - -UPB_NOINLINE bool UPB_PRIVATE(_upb_Message_AddUnknownSlowPath)(upb_Message* msg, - const char* data, - size_t len, - upb_Arena* arena, - bool alias) { - { - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - // Alias fast path was already checked in the inline function that calls - // this one - if (!alias && in && in->size) { - upb_TaggedAuxPtr ptr = in->aux_data[in->size - 1]; - if (upb_TaggedAuxPtr_IsUnknown(ptr)) { - upb_StringView* existing = upb_TaggedAuxPtr_UnknownData(ptr); - if (!upb_TaggedAuxPtr_IsUnknownAliased(ptr)) { - // If part of the existing field was deleted at the beginning, we can - // reconstruct it by comparing the address of the end with the address - // of the entry itself; having the non-aliased tag means that the - // string_view and the data it points to are part of the same original - // upb_Arena_Malloc allocation, and the end of the string view - // represents the end of that allocation. - size_t prev_alloc_size = - (existing->data + existing->size) - (char*)existing; - if (SIZE_MAX - prev_alloc_size >= len) { - size_t new_alloc_size = prev_alloc_size + len; - if (upb_Arena_TryExtend(arena, existing, prev_alloc_size, - new_alloc_size)) { - memcpy(UPB_PTR_AT(existing, prev_alloc_size, void), data, len); - existing->size += len; - return true; - } - } - } - } - } - } - // TODO: b/376969853 - Add debug check that the unknown field is an overall - // valid proto field - if (!UPB_PRIVATE(_upb_Message_ReserveSlot)(msg, arena)) { - return false; - } - upb_StringView* view; - if (alias) { - view = upb_Arena_Malloc(arena, sizeof(upb_StringView)); - if (!view) return false; - view->data = data; - } else { - view = upb_Arena_Malloc(arena, sizeof(upb_StringView) + len); - if (!view) return false; - char* copy = UPB_PTR_AT(view, sizeof(upb_StringView), char); - memcpy(copy, data, len); - view->data = copy; - } - view->size = len; - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - in->aux_data[in->size++] = alias - ? upb_TaggedAuxPtr_MakeUnknownDataAliased(view) - : upb_TaggedAuxPtr_MakeUnknownData(view); - return true; -} - -bool UPB_PRIVATE(_upb_Message_AddUnknownV)(struct upb_Message* msg, - upb_Arena* arena, - upb_StringView data[], - size_t count) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - UPB_ASSERT(count > 0); - size_t total_len = 0; - for (size_t i = 0; i < count; i++) { - if (SIZE_MAX - total_len < data[i].size) { - return false; - } - total_len += data[i].size; - } - - { - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (in && in->size) { - upb_TaggedAuxPtr ptr = in->aux_data[in->size - 1]; - if (upb_TaggedAuxPtr_IsUnknown(ptr)) { - upb_StringView* existing = upb_TaggedAuxPtr_UnknownData(ptr); - if (!upb_TaggedAuxPtr_IsUnknownAliased(ptr)) { - size_t prev_alloc_size = - (existing->data + existing->size) - (char*)existing; - if (SIZE_MAX - prev_alloc_size >= total_len) { - size_t new_alloc_size = prev_alloc_size + total_len; - if (upb_Arena_TryExtend(arena, existing, prev_alloc_size, - new_alloc_size)) { - char* copy = UPB_PTR_AT(existing, prev_alloc_size, char); - for (size_t i = 0; i < count; i++) { - memcpy(copy, data[i].data, data[i].size); - copy += data[i].size; - } - existing->size += total_len; - return true; - } - } - } - } - } - } - - if (SIZE_MAX - sizeof(upb_StringView) < total_len) return false; - if (!UPB_PRIVATE(_upb_Message_ReserveSlot)(msg, arena)) return false; - - upb_StringView* view = - upb_Arena_Malloc(arena, sizeof(upb_StringView) + total_len); - if (!view) return false; - char* copy = UPB_PTR_AT(view, sizeof(upb_StringView), char); - view->data = copy; - view->size = total_len; - for (size_t i = 0; i < count; i++) { - memcpy(copy, data[i].data, data[i].size); - copy += data[i].size; - } - // TODO: b/376969853 - Add debug check that the unknown field is an overall - // valid proto field - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - in->aux_data[in->size++] = upb_TaggedAuxPtr_MakeUnknownData(view); - return true; -} - -void _upb_Message_DiscardUnknown_shallow(upb_Message* msg) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) return; - uint32_t size = 0; - for (uint32_t i = 0; i < in->size; i++) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i]; - if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - in->aux_data[size++] = tagged_ptr; - } - } - in->size = size; -} - -upb_Message_DeleteUnknownStatus upb_Message_DeleteUnknown(upb_Message* msg, - upb_StringView* data, - uintptr_t* iter, - upb_Arena* arena) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - UPB_ASSERT(*iter != kUpb_Message_UnknownBegin); - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - UPB_ASSERT(in); - UPB_ASSERT(*iter <= in->size); - upb_TaggedAuxPtr unknown_ptr = in->aux_data[*iter - 1]; - UPB_ASSERT(upb_TaggedAuxPtr_IsUnknown(unknown_ptr)); - upb_StringView* unknown = upb_TaggedAuxPtr_UnknownData(unknown_ptr); - if (unknown->data == data->data && unknown->size == data->size) { - // Remove whole field - in->aux_data[*iter - 1] = upb_TaggedAuxPtr_Null(); - } else if (unknown->data == data->data) { - // Strip prefix - unknown->data += data->size; - unknown->size -= data->size; - *data = *unknown; - return kUpb_DeleteUnknown_IterUpdated; - } else if (unknown->data + unknown->size == data->data + data->size) { - // Truncate existing field - unknown->size -= data->size; - if (!upb_TaggedAuxPtr_IsUnknownAliased(unknown_ptr)) { - in->aux_data[*iter - 1] = - upb_TaggedAuxPtr_MakeUnknownDataAliased(unknown); - } - } else { - UPB_ASSERT(unknown->data < data->data && - unknown->data + unknown->size > data->data + data->size); - // Split in the middle - upb_StringView* prefix = unknown; - upb_StringView* suffix = upb_Arena_Malloc(arena, sizeof(upb_StringView)); - if (!suffix) { - return kUpb_DeleteUnknown_AllocFail; - } - if (!UPB_PRIVATE(_upb_Message_ReserveSlot)(msg, arena)) { - return kUpb_DeleteUnknown_AllocFail; - } - in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (*iter != in->size) { - // Shift later entries down so that unknown field ordering is preserved - memmove(&in->aux_data[*iter + 1], &in->aux_data[*iter], - sizeof(upb_TaggedAuxPtr) * (in->size - *iter)); - } - in->aux_data[*iter] = upb_TaggedAuxPtr_MakeUnknownDataAliased(suffix); - if (!upb_TaggedAuxPtr_IsUnknownAliased(unknown_ptr)) { - in->aux_data[*iter - 1] = upb_TaggedAuxPtr_MakeUnknownDataAliased(prefix); - } - in->size++; - suffix->data = data->data + data->size; - suffix->size = (prefix->data + prefix->size) - suffix->data; - prefix->size = data->data - prefix->data; - } - return upb_Message_NextUnknown(msg, data, iter) - ? kUpb_DeleteUnknown_IterUpdated - : kUpb_DeleteUnknown_DeletedLast; -} - -size_t upb_Message_ExtensionCount(const upb_Message* msg) { - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) return 0; - const upb_MiniTableExtension* ext; - upb_MessageValue val; - uintptr_t iter = kUpb_Message_ExtensionBegin; - size_t count = 0; - while (upb_Message_NextExtension(msg, &ext, &val, &iter)) { - count++; - } - return count; -} - -void upb_Message_Freeze(upb_Message* msg, const upb_MiniTable* m) { - if (upb_Message_IsFrozen(msg)) return; - UPB_PRIVATE(_upb_Message_ShallowFreeze)(msg); - - // Base Fields. - const size_t field_count = upb_MiniTable_FieldCount(m); - - for (size_t i = 0; i < field_count; i++) { - const upb_MiniTableField* f = upb_MiniTable_GetFieldByIndex(m, i); - const upb_MiniTable* m2 = upb_MiniTable_SubMessage(m, f); - - switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f)) { - case kUpb_FieldMode_Array: { - upb_Array* arr = upb_Message_GetMutableArray(msg, f); - if (arr) upb_Array_Freeze(arr, m2); - break; - } - case kUpb_FieldMode_Map: { - upb_Map* map = upb_Message_GetMutableMap(msg, f); - if (map) { - const upb_MiniTableField* f2 = upb_MiniTable_MapValue(m2); - const upb_MiniTable* m3 = upb_MiniTable_SubMessage(m2, f2); - upb_Map_Freeze(map, m3); - } - break; - } - case kUpb_FieldMode_Scalar: { - if (m2) { - upb_Message* msg2 = upb_Message_GetMutableMessage(msg, f); - if (msg2) upb_Message_Freeze(msg2, m2); - } - break; - } - } - } - - // Extensions. - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - // TODO: b/376969853 - use iterator API - uint32_t size = in ? in->size : 0; - for (size_t i = 0; i < size; i++) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i]; - if (!upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - continue; - } - const upb_Extension* ext = upb_TaggedAuxPtr_Extension(tagged_ptr); - const upb_MiniTableExtension* e = ext->ext; - const upb_MiniTableField* f = &e->UPB_PRIVATE(field); - const upb_MiniTable* m2 = upb_MiniTableExtension_GetSubMessage(e); - - upb_MessageValue val; - memcpy(&val, &(ext->data), sizeof(upb_MessageValue)); - - switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f)) { - case kUpb_FieldMode_Array: { - upb_Array* arr = (upb_Array*)val.array_val; - if (arr) upb_Array_Freeze(arr, m2); - break; - } - case kUpb_FieldMode_Map: - UPB_UNREACHABLE(); // Maps cannot be extensions. - break; - case kUpb_FieldMode_Scalar: - if (upb_MiniTableField_IsSubMessage(f)) { - upb_Message* msg2 = (upb_Message*)val.msg_val; - if (msg2) upb_Message_Freeze(msg2, m2); - } - break; - } - } -} - - -#include -#include - - -// Must be last. - - -#ifdef __cplusplus -extern "C" { -#endif - -bool upb_Message_IsEmpty(const upb_Message* msg, const upb_MiniTable* m) { - if (upb_Message_ExtensionCount(msg)) return false; - - const upb_MiniTableField* f; - upb_MessageValue v; - size_t iter = kUpb_BaseField_Begin; - return !UPB_PRIVATE(_upb_Message_NextBaseField)(msg, m, &f, &v, &iter); -} - -static bool _upb_Array_IsEqual(const upb_Array* arr1, const upb_Array* arr2, - upb_CType ctype, const upb_MiniTable* m, - int options) { - // Check for trivial equality. - if (arr1 == arr2) return true; - - // Must have identical element counts. - const size_t size1 = arr1 ? upb_Array_Size(arr1) : 0; - const size_t size2 = arr2 ? upb_Array_Size(arr2) : 0; - if (size1 != size2) return false; - - for (size_t i = 0; i < size1; i++) { - const upb_MessageValue val1 = upb_Array_Get(arr1, i); - const upb_MessageValue val2 = upb_Array_Get(arr2, i); - - if (!upb_MessageValue_IsEqual(val1, val2, ctype, m, options)) return false; - } - - return true; -} - -static bool _upb_Map_IsEqual(const upb_Map* map1, const upb_Map* map2, - const upb_MiniTable* m, int options) { - // Check for trivial equality. - if (map1 == map2) return true; - - // Must have identical element counts. - size_t size1 = map1 ? upb_Map_Size(map1) : 0; - size_t size2 = map2 ? upb_Map_Size(map2) : 0; - if (size1 != size2) return false; - - const upb_MiniTableField* f = upb_MiniTable_MapValue(m); - const upb_MiniTable* m2_value = upb_MiniTable_SubMessage(m, f); - const upb_CType ctype = upb_MiniTableField_CType(f); - - upb_MessageValue key, val1, val2; - size_t iter = kUpb_Map_Begin; - while (upb_Map_Next(map1, &key, &val1, &iter)) { - if (!upb_Map_Get(map2, key, &val2)) return false; - if (!upb_MessageValue_IsEqual(val1, val2, ctype, m2_value, options)) - return false; - } - - return true; -} - -static bool _upb_Message_BaseFieldsAreEqual(const upb_Message* msg1, - const upb_Message* msg2, - const upb_MiniTable* m, - int options) { - // Iterate over all base fields for each message. - // The order will always match if the messages are equal. - size_t iter1 = kUpb_BaseField_Begin; - size_t iter2 = kUpb_BaseField_Begin; - - for (;;) { - const upb_MiniTableField *f1, *f2; - upb_MessageValue val1, val2; - - const bool got1 = - UPB_PRIVATE(_upb_Message_NextBaseField)(msg1, m, &f1, &val1, &iter1); - const bool got2 = - UPB_PRIVATE(_upb_Message_NextBaseField)(msg2, m, &f2, &val2, &iter2); - - if (got1 != got2) return false; // Must have identical field counts. - if (!got1) return true; // Loop termination condition. - if (f1 != f2) return false; // Must have identical fields set. - - const upb_MiniTable* subm = upb_MiniTable_SubMessage(m, f1); - const upb_CType ctype = upb_MiniTableField_CType(f1); - - bool eq; - switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f1)) { - case kUpb_FieldMode_Array: - eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm, - options); - break; - case kUpb_FieldMode_Map: - eq = _upb_Map_IsEqual(val1.map_val, val2.map_val, subm, options); - break; - case kUpb_FieldMode_Scalar: - eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm, options); - break; - } - if (!eq) return false; - } -} - -static bool _upb_Message_ExtensionsAreEqual(const upb_Message* msg1, - const upb_Message* msg2, - const upb_MiniTable* m, - int options) { - const upb_MiniTableExtension* e; - upb_MessageValue val1; - - // Iterate over all extensions for msg1, and search msg2 for each extension. - size_t count1 = 0; - size_t iter1 = kUpb_Message_ExtensionBegin; - while (upb_Message_NextExtension(msg1, &e, &val1, &iter1)) { - const upb_Extension* ext2 = UPB_PRIVATE(_upb_Message_Getext)(msg2, e); - if (!ext2) return false; - - count1++; - - const upb_MessageValue val2 = ext2->data; - const upb_MiniTableField* f = &e->UPB_PRIVATE(field); - const upb_MiniTable* subm = upb_MiniTableField_IsSubMessage(f) - ? upb_MiniTableExtension_GetSubMessage(e) - : NULL; - const upb_CType ctype = upb_MiniTableField_CType(f); - - bool eq; - switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(f)) { - case kUpb_FieldMode_Array: - eq = _upb_Array_IsEqual(val1.array_val, val2.array_val, ctype, subm, - options); - break; - case kUpb_FieldMode_Map: - UPB_UNREACHABLE(); // Maps cannot be extensions. - break; - case kUpb_FieldMode_Scalar: { - eq = upb_MessageValue_IsEqual(val1, val2, ctype, subm, options); - break; - } - } - if (!eq) return false; - } - - // Must have identical extension counts (this catches the case where msg2 - // has extensions that msg1 doesn't). - if (count1 != upb_Message_ExtensionCount(msg2)) return false; - - return true; -} - -bool upb_Message_IsEqual(const upb_Message* msg1, const upb_Message* msg2, - const upb_MiniTable* m, int options) { - if (UPB_UNLIKELY(msg1 == msg2)) return true; - - if (!_upb_Message_BaseFieldsAreEqual(msg1, msg2, m, options)) return false; - if (!_upb_Message_ExtensionsAreEqual(msg1, msg2, m, options)) return false; - - if (!(options & kUpb_CompareOption_IncludeUnknownFields)) return true; - - // The wire encoder enforces a maximum depth of 100 so we match that here. - return UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)(msg1, msg2, 100) == - kUpb_UnknownCompareResult_Equal; -} - - -#include -#include - - -// Must be last. - -typedef struct upb_UnknownFields upb_UnknownFields; - -typedef struct { - uint32_t tag; - union { - uint64_t varint; - uint64_t uint64; - uint32_t uint32; - upb_StringView delimited; - upb_UnknownFields* group; - } data; -} upb_UnknownField; - -struct upb_UnknownFields { - size_t size; - size_t capacity; - upb_UnknownField* fields; -}; - -typedef struct { - upb_EpsCopyInputStream stream; - upb_Arena* arena; - upb_UnknownField* tmp; - size_t tmp_size; - int depth; - upb_UnknownCompareResult status; - jmp_buf err; -} upb_UnknownField_Context; - -typedef struct { - upb_UnknownField* arr_base; - upb_UnknownField* arr_ptr; - upb_UnknownField* arr_end; - uint32_t last_tag; - bool sorted; -} upb_UnknownFields_Builder; - -UPB_NORETURN static void upb_UnknownFields_OutOfMemory( - upb_UnknownField_Context* ctx) { - ctx->status = kUpb_UnknownCompareResult_OutOfMemory; - UPB_LONGJMP(ctx->err, 1); -} - -static void upb_UnknownFields_Grow(upb_UnknownField_Context* ctx, - upb_UnknownField** base, - upb_UnknownField** ptr, - upb_UnknownField** end) { - size_t old = (*ptr - *base); - size_t new = UPB_MAX(4, old * 2); - - *base = upb_Arena_Realloc(ctx->arena, *base, old * sizeof(**base), - new * sizeof(**base)); - if (!*base) upb_UnknownFields_OutOfMemory(ctx); - - *ptr = *base + old; - *end = *base + new; -} - -// We have to implement our own sort here, since qsort() is not an in-order -// sort. Here we use merge sort, the simplest in-order sort. -static void upb_UnknownFields_Merge(upb_UnknownField* arr, size_t start, - size_t mid, size_t end, - upb_UnknownField* tmp) { - memcpy(tmp, &arr[start], (end - start) * sizeof(*tmp)); - - upb_UnknownField* ptr1 = tmp; - upb_UnknownField* end1 = &tmp[mid - start]; - upb_UnknownField* ptr2 = &tmp[mid - start]; - upb_UnknownField* end2 = &tmp[end - start]; - upb_UnknownField* out = &arr[start]; - - while (ptr1 < end1 && ptr2 < end2) { - if (ptr1->tag <= ptr2->tag) { - *out++ = *ptr1++; - } else { - *out++ = *ptr2++; - } - } - - if (ptr1 < end1) { - memcpy(out, ptr1, (end1 - ptr1) * sizeof(*out)); - } else if (ptr2 < end2) { - memcpy(out, ptr1, (end2 - ptr2) * sizeof(*out)); - } -} - -static void upb_UnknownFields_SortRecursive(upb_UnknownField* arr, size_t start, - size_t end, upb_UnknownField* tmp) { - if (end - start > 1) { - size_t mid = start + ((end - start) / 2); - upb_UnknownFields_SortRecursive(arr, start, mid, tmp); - upb_UnknownFields_SortRecursive(arr, mid, end, tmp); - upb_UnknownFields_Merge(arr, start, mid, end, tmp); - } -} - -static void upb_UnknownFields_Sort(upb_UnknownField_Context* ctx, - upb_UnknownFields* fields) { - if (ctx->tmp_size < fields->size) { - const int oldsize = ctx->tmp_size * sizeof(*ctx->tmp); - ctx->tmp_size = UPB_MAX(8, ctx->tmp_size); - while (ctx->tmp_size < fields->size) ctx->tmp_size *= 2; - const int newsize = ctx->tmp_size * sizeof(*ctx->tmp); - ctx->tmp = upb_grealloc(ctx->tmp, oldsize, newsize); - } - upb_UnknownFields_SortRecursive(fields->fields, 0, fields->size, ctx->tmp); -} - -static upb_UnknownFields* upb_UnknownFields_BuildFromBuffer( - upb_UnknownField_Context* ctx, const char** buf); - -// Combines two unknown fields into one. -static void upb_CombineUnknownFields(upb_UnknownField_Context* ctx, - upb_UnknownFields_Builder* builder, - const char** buf) { - upb_UnknownField* arr_base = builder->arr_base; - upb_UnknownField* arr_ptr = builder->arr_ptr; - upb_UnknownField* arr_end = builder->arr_end; - const char* ptr = *buf; - uint32_t last_tag = builder->last_tag; - bool sorted = builder->sorted; - while (!upb_EpsCopyInputStream_IsDone(&ctx->stream, &ptr)) { - uint32_t tag; - ptr = upb_WireReader_ReadTag(ptr, &tag); - UPB_ASSERT(tag <= UINT32_MAX); - int wire_type = upb_WireReader_GetWireType(tag); - if (wire_type == kUpb_WireType_EndGroup) break; - if (tag < last_tag) sorted = false; - last_tag = tag; - - if (arr_ptr == arr_end) { - upb_UnknownFields_Grow(ctx, &arr_base, &arr_ptr, &arr_end); - } - upb_UnknownField* field = arr_ptr; - field->tag = tag; - arr_ptr++; - - switch (wire_type) { - case kUpb_WireType_Varint: - ptr = upb_WireReader_ReadVarint(ptr, &field->data.varint); - break; - case kUpb_WireType_64Bit: - ptr = upb_WireReader_ReadFixed64(ptr, &field->data.uint64); - break; - case kUpb_WireType_32Bit: - ptr = upb_WireReader_ReadFixed32(ptr, &field->data.uint32); - break; - case kUpb_WireType_Delimited: { - int size; - ptr = upb_WireReader_ReadSize(ptr, &size); - const char* s_ptr = ptr; - ptr = upb_EpsCopyInputStream_ReadStringAliased(&ctx->stream, &s_ptr, - size); - field->data.delimited.data = s_ptr; - field->data.delimited.size = size; - break; - } - case kUpb_WireType_StartGroup: - if (--ctx->depth == 0) { - ctx->status = kUpb_UnknownCompareResult_MaxDepthExceeded; - UPB_LONGJMP(ctx->err, 1); - } - field->data.group = upb_UnknownFields_BuildFromBuffer(ctx, &ptr); - ctx->depth++; - break; - default: - UPB_UNREACHABLE(); - } - } - *buf = ptr; - builder->arr_base = arr_base; - builder->arr_ptr = arr_ptr; - builder->arr_end = arr_end; - builder->sorted = sorted; - builder->last_tag = last_tag; -} - -static upb_UnknownFields* upb_UnknownFields_DoBuild( - upb_UnknownField_Context* ctx, upb_UnknownFields_Builder* builder) { - upb_UnknownFields* ret = upb_Arena_Malloc(ctx->arena, sizeof(*ret)); - if (!ret) upb_UnknownFields_OutOfMemory(ctx); - ret->fields = builder->arr_base; - ret->size = builder->arr_ptr - builder->arr_base; - ret->capacity = builder->arr_end - builder->arr_base; - if (!builder->sorted) { - upb_UnknownFields_Sort(ctx, ret); - } - return ret; -} - -// Builds a upb_UnknownFields data structure from the binary data in buf. -static upb_UnknownFields* upb_UnknownFields_BuildFromBuffer( - upb_UnknownField_Context* ctx, const char** buf) { - upb_UnknownFields_Builder builder = { - .arr_base = NULL, - .arr_ptr = NULL, - .arr_end = NULL, - .sorted = true, - .last_tag = 0, - }; - const char* ptr = *buf; - upb_CombineUnknownFields(ctx, &builder, &ptr); - upb_UnknownFields* fields = upb_UnknownFields_DoBuild(ctx, &builder); - *buf = ptr; - return fields; -} - -// Builds a upb_UnknownFields data structure from the unknown fields of a -// upb_Message. -static upb_UnknownFields* upb_UnknownFields_Build(upb_UnknownField_Context* ctx, - const upb_Message* msg) { - upb_UnknownFields_Builder builder = { - .arr_base = NULL, - .arr_ptr = NULL, - .arr_end = NULL, - .sorted = true, - .last_tag = 0, - }; - uintptr_t iter = kUpb_Message_UnknownBegin; - upb_StringView view; - while (upb_Message_NextUnknown(msg, &view, &iter)) { - upb_EpsCopyInputStream_Init(&ctx->stream, &view.data, view.size, true); - upb_CombineUnknownFields(ctx, &builder, &view.data); - UPB_ASSERT(upb_EpsCopyInputStream_IsDone(&ctx->stream, &view.data) && - !upb_EpsCopyInputStream_IsError(&ctx->stream)); - } - upb_UnknownFields* fields = upb_UnknownFields_DoBuild(ctx, &builder); - return fields; -} - -// Compares two sorted upb_UnknownFields structures for equality. -static bool upb_UnknownFields_IsEqual(const upb_UnknownFields* uf1, - const upb_UnknownFields* uf2) { - if (uf1->size != uf2->size) return false; - for (size_t i = 0, n = uf1->size; i < n; i++) { - upb_UnknownField* f1 = &uf1->fields[i]; - upb_UnknownField* f2 = &uf2->fields[i]; - if (f1->tag != f2->tag) return false; - int wire_type = f1->tag & 7; - switch (wire_type) { - case kUpb_WireType_Varint: - if (f1->data.varint != f2->data.varint) return false; - break; - case kUpb_WireType_64Bit: - if (f1->data.uint64 != f2->data.uint64) return false; - break; - case kUpb_WireType_32Bit: - if (f1->data.uint32 != f2->data.uint32) return false; - break; - case kUpb_WireType_Delimited: - if (!upb_StringView_IsEqual(f1->data.delimited, f2->data.delimited)) { - return false; - } - break; - case kUpb_WireType_StartGroup: - if (!upb_UnknownFields_IsEqual(f1->data.group, f2->data.group)) { - return false; - } - break; - default: - UPB_UNREACHABLE(); - } - } - return true; -} - -static upb_UnknownCompareResult upb_UnknownField_DoCompare( - upb_UnknownField_Context* ctx, const upb_Message* msg1, - const upb_Message* msg2) { - upb_UnknownCompareResult ret; - // First build both unknown fields into a sorted data structure (similar - // to the UnknownFieldSet in C++). - upb_UnknownFields* uf1 = upb_UnknownFields_Build(ctx, msg1); - upb_UnknownFields* uf2 = upb_UnknownFields_Build(ctx, msg2); - - // Now perform the equality check on the sorted structures. - if (upb_UnknownFields_IsEqual(uf1, uf2)) { - ret = kUpb_UnknownCompareResult_Equal; - } else { - ret = kUpb_UnknownCompareResult_NotEqual; - } - return ret; -} - -static upb_UnknownCompareResult upb_UnknownField_Compare( - upb_UnknownField_Context* const ctx, const upb_Message* msg1, - const upb_Message* msg2) { - upb_UnknownCompareResult ret; - if (UPB_SETJMP(ctx->err) == 0) { - ret = upb_UnknownField_DoCompare(ctx, msg1, msg2); - } else { - ret = ctx->status; - UPB_ASSERT(ret != kUpb_UnknownCompareResult_Equal); - } - - upb_Arena_Free(ctx->arena); - upb_gfree(ctx->tmp); - return ret; -} - -upb_UnknownCompareResult UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)( - const upb_Message* msg1, const upb_Message* msg2, int max_depth) { - bool msg1_empty = !upb_Message_HasUnknown(msg1); - bool msg2_empty = !upb_Message_HasUnknown(msg2); - if (msg1_empty && msg2_empty) return kUpb_UnknownCompareResult_Equal; - if (msg1_empty || msg2_empty) return kUpb_UnknownCompareResult_NotEqual; - - upb_UnknownField_Context ctx = { - .arena = upb_Arena_New(), - .depth = max_depth, - .tmp = NULL, - .tmp_size = 0, - .status = kUpb_UnknownCompareResult_Equal, - }; - - if (!ctx.arena) return kUpb_UnknownCompareResult_OutOfMemory; - - return upb_UnknownField_Compare(&ctx, msg1, msg2); -} - - -#include -#include -#include - - -// Must be last. - -static upb_StringView upb_Clone_StringView(upb_StringView str, - upb_Arena* arena) { - if (str.size == 0) { - return upb_StringView_FromDataAndSize(NULL, 0); - } - void* cloned_data = upb_Arena_Malloc(arena, str.size); - upb_StringView cloned_str = - upb_StringView_FromDataAndSize(cloned_data, str.size); - memcpy(cloned_data, str.data, str.size); - return cloned_str; -} - -static bool upb_Clone_MessageValue(void* value, upb_CType value_type, - const upb_MiniTable* sub, upb_Arena* arena) { - switch (value_type) { - case kUpb_CType_Bool: - case kUpb_CType_Float: - case kUpb_CType_Int32: - case kUpb_CType_UInt32: - case kUpb_CType_Enum: - case kUpb_CType_Double: - case kUpb_CType_Int64: - case kUpb_CType_UInt64: - return true; - case kUpb_CType_String: - case kUpb_CType_Bytes: { - upb_StringView source = *(upb_StringView*)value; - int size = source.size; - void* cloned_data = upb_Arena_Malloc(arena, size); - if (cloned_data == NULL) { - return false; - } - *(upb_StringView*)value = - upb_StringView_FromDataAndSize(cloned_data, size); - memcpy(cloned_data, source.data, size); - return true; - } break; - case kUpb_CType_Message: { - const upb_TaggedMessagePtr source = *(upb_TaggedMessagePtr*)value; - bool is_empty = upb_TaggedMessagePtr_IsEmpty(source); - if (is_empty) sub = UPB_PRIVATE(_upb_MiniTable_Empty)(); - UPB_ASSERT(source); - upb_Message* clone = upb_Message_DeepClone( - UPB_PRIVATE(_upb_TaggedMessagePtr_GetMessage)(source), sub, arena); - *(upb_TaggedMessagePtr*)value = - UPB_PRIVATE(_upb_TaggedMessagePtr_Pack)(clone, is_empty); - return clone != NULL; - } break; - } - UPB_UNREACHABLE(); -} - -upb_Map* upb_Map_DeepClone(const upb_Map* map, upb_CType key_type, - upb_CType value_type, - const upb_MiniTable* map_entry_table, - upb_Arena* arena) { - upb_Map* cloned_map = _upb_Map_New(arena, map->key_size, map->val_size); - if (cloned_map == NULL) { - return NULL; - } - upb_MessageValue key, val; - size_t iter = kUpb_Map_Begin; - while (upb_Map_Next(map, &key, &val, &iter)) { - const upb_MiniTableField* value_field = - upb_MiniTable_MapValue(map_entry_table); - const upb_MiniTable* value_sub = - upb_MiniTableField_CType(value_field) == kUpb_CType_Message - ? upb_MiniTable_GetSubMessageTable(map_entry_table, value_field) - : NULL; - upb_CType value_field_type = upb_MiniTableField_CType(value_field); - if (!upb_Clone_MessageValue(&val, value_field_type, value_sub, arena)) { - return NULL; - } - if (!upb_Map_Set(cloned_map, key, val, arena)) { - return NULL; - } - } - return cloned_map; -} - -static upb_Map* upb_Message_Map_DeepClone(const upb_Map* map, - const upb_MiniTable* mini_table, - const upb_MiniTableField* f, - upb_Message* clone, - upb_Arena* arena) { - UPB_ASSERT(!upb_Message_IsFrozen(clone)); - const upb_MiniTable* map_entry_table = - upb_MiniTable_MapEntrySubMessage(mini_table, f); - UPB_ASSERT(map_entry_table); - - const upb_MiniTableField* key_field = upb_MiniTable_MapKey(map_entry_table); - const upb_MiniTableField* value_field = - upb_MiniTable_MapValue(map_entry_table); - - upb_Map* cloned_map = upb_Map_DeepClone( - map, upb_MiniTableField_CType(key_field), - upb_MiniTableField_CType(value_field), map_entry_table, arena); - if (!cloned_map) { - return NULL; - } - upb_Message_SetBaseField(clone, f, &cloned_map); - return cloned_map; -} - -upb_Array* upb_Array_DeepClone(const upb_Array* array, upb_CType value_type, - const upb_MiniTable* sub, upb_Arena* arena) { - const size_t size = upb_Array_Size(array); - const int lg2 = UPB_PRIVATE(_upb_CType_SizeLg2)(value_type); - upb_Array* cloned_array = UPB_PRIVATE(_upb_Array_New)(arena, size, lg2); - if (!cloned_array) { - return NULL; - } - if (!UPB_PRIVATE(_upb_Array_ResizeUninitialized)(cloned_array, size, arena)) { - return NULL; - } - for (size_t i = 0; i < size; ++i) { - upb_MessageValue val = upb_Array_Get(array, i); - if (!upb_Clone_MessageValue(&val, value_type, sub, arena)) { - return NULL; - } - upb_Array_Set(cloned_array, i, val); - } - return cloned_array; -} - -static bool upb_Message_Array_DeepClone(const upb_Array* array, - const upb_MiniTable* mini_table, - const upb_MiniTableField* field, - upb_Message* clone, upb_Arena* arena) { - UPB_ASSERT(!upb_Message_IsFrozen(clone)); - UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(field); - upb_Array* cloned_array = upb_Array_DeepClone( - array, upb_MiniTableField_CType(field), - upb_MiniTableField_CType(field) == kUpb_CType_Message - ? upb_MiniTable_GetSubMessageTable(mini_table, field) - : NULL, - arena); - - // Clear out upb_Array* due to parent memcpy. - upb_Message_SetBaseField(clone, field, &cloned_array); - return true; -} - -static bool upb_Clone_ExtensionValue( - const upb_MiniTableExtension* mini_table_ext, const upb_Extension* source, - upb_Extension* dest, upb_Arena* arena) { - dest->data = source->data; - return upb_Clone_MessageValue( - &dest->data, upb_MiniTableExtension_CType(mini_table_ext), - upb_MiniTableExtension_GetSubMessage(mini_table_ext), arena); -} - -upb_Message* _upb_Message_Copy(upb_Message* dst, const upb_Message* src, - const upb_MiniTable* mini_table, - upb_Arena* arena) { - UPB_ASSERT(!upb_Message_IsFrozen(dst)); - upb_StringView empty_string = upb_StringView_FromDataAndSize(NULL, 0); - // Only copy message area skipping upb_Message_Internal. - memcpy(dst + 1, src + 1, mini_table->UPB_PRIVATE(size) - sizeof(upb_Message)); - for (int i = 0; i < upb_MiniTable_FieldCount(mini_table); ++i) { - const upb_MiniTableField* field = - upb_MiniTable_GetFieldByIndex(mini_table, i); - if (upb_MiniTableField_IsScalar(field)) { - switch (upb_MiniTableField_CType(field)) { - case kUpb_CType_Message: { - upb_TaggedMessagePtr tagged = - upb_Message_GetTaggedMessagePtr(src, field, NULL); - const upb_Message* sub_message = - UPB_PRIVATE(_upb_TaggedMessagePtr_GetMessage)(tagged); - if (sub_message != NULL) { - // If the message is currently in an unlinked, "empty" state we keep - // it that way, because we don't want to deal with decode options, - // decode status, or possible parse failure here. - bool is_empty = upb_TaggedMessagePtr_IsEmpty(tagged); - const upb_MiniTable* sub_message_table = - is_empty ? UPB_PRIVATE(_upb_MiniTable_Empty)() - : upb_MiniTable_GetSubMessageTable(mini_table, field); - upb_Message* dst_sub_message = - upb_Message_DeepClone(sub_message, sub_message_table, arena); - if (dst_sub_message == NULL) { - return NULL; - } - UPB_PRIVATE(_upb_Message_SetTaggedMessagePtr) - (dst, field, - UPB_PRIVATE(_upb_TaggedMessagePtr_Pack)(dst_sub_message, - is_empty)); - } - } break; - case kUpb_CType_String: - case kUpb_CType_Bytes: { - upb_StringView str = upb_Message_GetString(src, field, empty_string); - if (str.size != 0) { - if (!upb_Message_SetString( - dst, field, upb_Clone_StringView(str, arena), arena)) { - return NULL; - } - } - } break; - default: - // Scalar, already copied. - break; - } - } else { - if (upb_MiniTableField_IsMap(field)) { - const upb_Map* map = upb_Message_GetMap(src, field); - if (map != NULL) { - if (!upb_Message_Map_DeepClone(map, mini_table, field, dst, arena)) { - return NULL; - } - } - } else { - const upb_Array* array = upb_Message_GetArray(src, field); - if (array != NULL) { - if (!upb_Message_Array_DeepClone(array, mini_table, field, dst, - arena)) { - return NULL; - } - } - } - } - } - // Clone extensions. - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(src); - if (!in) return dst; - - for (size_t i = 0; i < in->size; i++) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i]; - if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - // Clone extension - const upb_Extension* msg_ext = upb_TaggedAuxPtr_Extension(tagged_ptr); - const upb_MiniTableField* field = &msg_ext->ext->UPB_PRIVATE(field); - upb_Extension* dst_ext = UPB_PRIVATE(_upb_Message_GetOrCreateExtension)( - dst, msg_ext->ext, arena); - if (!dst_ext) return NULL; - if (upb_MiniTableField_IsScalar(field)) { - if (!upb_Clone_ExtensionValue(msg_ext->ext, msg_ext, dst_ext, arena)) { - return NULL; - } - } else { - upb_Array* msg_array = (upb_Array*)msg_ext->data.array_val; - UPB_ASSERT(msg_array); - upb_Array* cloned_array = upb_Array_DeepClone( - msg_array, upb_MiniTableField_CType(field), - upb_MiniTableExtension_GetSubMessage(msg_ext->ext), arena); - if (!cloned_array) { - return NULL; - } - dst_ext->data.array_val = cloned_array; - } - } else if (upb_TaggedAuxPtr_IsUnknown(tagged_ptr)) { - // Clone unknown - upb_StringView* unknown = upb_TaggedAuxPtr_UnknownData(tagged_ptr); - // Make a copy into destination arena. - if (!UPB_PRIVATE(_upb_Message_AddUnknown)(dst, unknown->data, - unknown->size, arena, false)) { - return NULL; - } - } - } - - return dst; -} - -bool upb_Message_DeepCopy(upb_Message* dst, const upb_Message* src, - const upb_MiniTable* mini_table, upb_Arena* arena) { - UPB_ASSERT(!upb_Message_IsFrozen(dst)); - upb_Message_Clear(dst, mini_table); - return _upb_Message_Copy(dst, src, mini_table, arena) != NULL; -} - -// Deep clones a message using the provided target arena. -// -// Returns NULL on failure. -upb_Message* upb_Message_DeepClone(const upb_Message* msg, - const upb_MiniTable* m, upb_Arena* arena) { - upb_Message* clone = upb_Message_New(m, arena); - return _upb_Message_Copy(clone, msg, m, arena); -} - -// Performs a shallow copy. TODO: Extend to handle unknown fields. -void upb_Message_ShallowCopy(upb_Message* dst, const upb_Message* src, - const upb_MiniTable* m) { - UPB_ASSERT(!upb_Message_IsFrozen(dst)); - memcpy(dst, src, m->UPB_PRIVATE(size)); -} - -// Performs a shallow clone. Ignores unknown fields. -upb_Message* upb_Message_ShallowClone(const upb_Message* msg, - const upb_MiniTable* m, - upb_Arena* arena) { - upb_Message* clone = upb_Message_New(m, arena); - upb_Message_ShallowCopy(clone, msg, m); - return clone; -} - -#include "stddef.h" - -// Must be last. - -bool upb_Message_MergeFrom(upb_Message* dst, const upb_Message* src, - const upb_MiniTable* mt, - const upb_ExtensionRegistry* extreg, - upb_Arena* arena) { - char* buf = NULL; - size_t size = 0; - // This tmp arena is used to hold the bytes for `src` serialized. This bends - // the typical "no hidden allocations" design of upb, but under a properly - // optimized implementation this extra allocation would not be necessary and - // so we don't want to unnecessarily have the bad API or bloat the passed-in - // arena with this very-short-term allocation. - upb_Arena* encode_arena = upb_Arena_New(); - upb_EncodeStatus e_status = upb_Encode(src, mt, 0, encode_arena, &buf, &size); - if (e_status != kUpb_EncodeStatus_Ok) { - upb_Arena_Free(encode_arena); - return false; - } - upb_DecodeStatus d_status = upb_Decode(buf, size, dst, mt, extreg, 0, arena); - if (d_status != kUpb_DecodeStatus_Ok) { - upb_Arena_Free(encode_arena); - return false; - } - upb_Arena_Free(encode_arena); - return true; -} - - -#include -#include - - -// Must be last. - -typedef struct { - upb_MdDecoder base; - upb_Arena* arena; - upb_MiniTableEnum* enum_table; - uint32_t enum_value_count; - uint32_t enum_data_count; - uint32_t enum_data_capacity; -} upb_MdEnumDecoder; - -static size_t upb_MiniTableEnum_Size(uint32_t count) { - return UPB_SIZEOF_FLEX(upb_MiniTableEnum, UPB_PRIVATE(data), count); -} - -static upb_MiniTableEnum* _upb_MiniTable_AddEnumDataMember(upb_MdEnumDecoder* d, - uint32_t val) { - if (d->enum_data_count == d->enum_data_capacity) { - size_t old_sz = upb_MiniTableEnum_Size(d->enum_data_capacity); - if (d->enum_data_capacity > UINT32_MAX / 2) { - upb_MdDecoder_ErrorJmp(&d->base, "Out of memory"); - } - uint32_t new_capacity = UPB_MAX(2, d->enum_data_capacity * 2); - if (UPB_SIZEOF_FLEX_WOULD_OVERFLOW(upb_MiniTableEnum, UPB_PRIVATE(data), - new_capacity)) { - upb_MdDecoder_ErrorJmp(&d->base, "Out of memory"); - } - size_t new_sz = upb_MiniTableEnum_Size(new_capacity); - d->enum_table = upb_Arena_Realloc(d->arena, d->enum_table, old_sz, new_sz); - upb_MdDecoder_CheckOutOfMemory(&d->base, d->enum_table); - d->enum_data_capacity = new_capacity; - } - d->enum_table->UPB_PRIVATE(data)[d->enum_data_count++] = val; - return d->enum_table; -} - -static void upb_MiniTableEnum_BuildValue(upb_MdEnumDecoder* d, uint32_t val) { - upb_MiniTableEnum* table = d->enum_table; - d->enum_value_count++; - if (table->UPB_PRIVATE(value_count) || - (val > 512 && d->enum_value_count < val / 32)) { - if (table->UPB_PRIVATE(value_count) == 0) { - UPB_ASSERT(d->enum_data_count == table->UPB_PRIVATE(mask_limit) / 32); - } - table = _upb_MiniTable_AddEnumDataMember(d, val); - table->UPB_PRIVATE(value_count)++; - } else { - uint32_t new_mask_limit = ((val / 32) + 1) * 32; - while (table->UPB_PRIVATE(mask_limit) < new_mask_limit) { - table = _upb_MiniTable_AddEnumDataMember(d, 0); - table->UPB_PRIVATE(mask_limit) += 32; - } - table->UPB_PRIVATE(data)[val / 32] |= 1ULL << (val % 32); - } -} - -static upb_MiniTableEnum* upb_MtDecoder_DoBuildMiniTableEnum( - upb_MdEnumDecoder* d, const char* data, size_t len) { - // If the string is non-empty then it must begin with a version tag. - if (len) { - if (*data != kUpb_EncodedVersion_EnumV1) { - upb_MdDecoder_ErrorJmp(&d->base, "Invalid enum version: %c", *data); - } - data++; - len--; - } - - upb_MdDecoder_CheckOutOfMemory(&d->base, d->enum_table); - - // Guarantee at least 64 bits of mask without checking mask size. - d->enum_table->UPB_PRIVATE(mask_limit) = 64; - d->enum_table = _upb_MiniTable_AddEnumDataMember(d, 0); - d->enum_table = _upb_MiniTable_AddEnumDataMember(d, 0); - - d->enum_table->UPB_PRIVATE(value_count) = 0; - - const char* ptr = data; - uint32_t base = 0; - - while (ptr < d->base.end) { - char ch = *ptr++; - if (ch <= kUpb_EncodedValue_MaxEnumMask) { - uint32_t mask = _upb_FromBase92(ch); - for (int i = 0; i < 5; i++, base++, mask >>= 1) { - if (mask & 1) upb_MiniTableEnum_BuildValue(d, base); - } - } else if (kUpb_EncodedValue_MinSkip <= ch && - ch <= kUpb_EncodedValue_MaxSkip) { - uint32_t skip; - ptr = upb_MdDecoder_DecodeBase92Varint(&d->base, ptr, ch, - kUpb_EncodedValue_MinSkip, - kUpb_EncodedValue_MaxSkip, &skip); - base += skip; - } else { - upb_MdDecoder_ErrorJmp(&d->base, "Unexpected character: %c", ch); - } - } - - return d->enum_table; -} - -static upb_MiniTableEnum* upb_MtDecoder_BuildMiniTableEnum( - upb_MdEnumDecoder* const decoder, const char* const data, - size_t const len) { - if (UPB_SETJMP(decoder->base.err) != 0) return NULL; - return upb_MtDecoder_DoBuildMiniTableEnum(decoder, data, len); -} - -upb_MiniTableEnum* upb_MiniTableEnum_Build(const char* data, size_t len, - upb_Arena* arena, - upb_Status* status) { - uint32_t initial_capacity = 2; - upb_MdEnumDecoder decoder = { - .base = - { - .end = UPB_PTRADD(data, len), - .status = status, - }, - .arena = arena, - .enum_table = - upb_Arena_Malloc(arena, upb_MiniTableEnum_Size(initial_capacity)), - .enum_value_count = 0, - .enum_data_count = 0, - .enum_data_capacity = initial_capacity, - }; - - return upb_MtDecoder_BuildMiniTableEnum(&decoder, data, len); -} - - -#include -#include -#include -#include - - -// Must be last. - -// We reserve unused hasbits to make room for upb_Message fields. -#define kUpb_Reserved_Hasbytes sizeof(struct upb_Message) - -// 64 is the first hasbit that we currently use. -#define kUpb_Reserved_Hasbits (kUpb_Reserved_Hasbytes * 8) - -#define kUpb_OneOfLayoutItem_IndexSentinel ((uint16_t)-1) - -// Stores the field number of the present value of the oneof -#define kUpb_OneOf_CaseFieldRep (kUpb_FieldRep_4Byte) - -typedef struct { - // Index of the corresponding field. The field's offset will be the index of - // the next field in a linked list. - uint16_t field_index; - // This enum is stored in bytes to avoid trailing padding while preserving - // two-byte alignment. - uint8_t /* upb_FieldRep*/ rep; -} upb_OneOfLayoutItem; - -typedef struct { - upb_OneOfLayoutItem* data; - size_t size; - size_t buf_capacity_bytes; -} upb_OneOfLayoutItemVector; - -typedef struct { - upb_MdDecoder base; - upb_MiniTable* table; - upb_MiniTableField* fields; - upb_MiniTablePlatform platform; - upb_OneOfLayoutItemVector oneofs; - upb_Arena* arena; - // Initially tracks the count of each field rep type; then, during assignment, - // tracks the base offset for the next processed field of the given rep. - uint16_t rep_counts_offsets[kUpb_FieldRep_Max + 1]; -} upb_MtDecoder; - -// In each field's offset, we temporarily store a presence classifier: -enum PresenceClass { - kNoPresence = 0, - kHasbitPresence = 1, - kRequiredPresence = 2, - kOneofBase = 3, - // Negative values refer to a specific oneof with that number. Positive - // values >= kOneofBase indicate that this field is in a oneof, and specify - // the next field in this oneof's linked list. -}; - -static bool upb_MtDecoder_FieldIsPackable(upb_MiniTableField* field) { - return (field->UPB_PRIVATE(mode) & kUpb_FieldMode_Array) && - upb_FieldType_IsPackable(field->UPB_PRIVATE(descriptortype)); -} - -typedef struct { - uint16_t submsg_count; - uint16_t subenum_count; -} upb_SubCounts; - -static void upb_MiniTable_SetTypeAndSub(upb_MiniTableField* field, - upb_FieldType type, - upb_SubCounts* sub_counts, - uint64_t msg_modifiers, - bool is_proto3_enum) { - if (is_proto3_enum) { - UPB_ASSERT(type == kUpb_FieldType_Enum); - type = kUpb_FieldType_Int32; - field->UPB_PRIVATE(mode) |= kUpb_LabelFlags_IsAlternate; - } else if (type == kUpb_FieldType_String && - !(msg_modifiers & kUpb_MessageModifier_ValidateUtf8)) { - type = kUpb_FieldType_Bytes; - field->UPB_PRIVATE(mode) |= kUpb_LabelFlags_IsAlternate; - } - - field->UPB_PRIVATE(descriptortype) = type; - - if (upb_MtDecoder_FieldIsPackable(field) && - (msg_modifiers & kUpb_MessageModifier_DefaultIsPacked)) { - field->UPB_PRIVATE(mode) |= kUpb_LabelFlags_IsPacked; - } - - if (type == kUpb_FieldType_Message || type == kUpb_FieldType_Group) { - field->UPB_PRIVATE(submsg_index) = sub_counts->submsg_count++; - } else if (type == kUpb_FieldType_Enum) { - // We will need to update this later once we know the total number of - // submsg fields. - field->UPB_PRIVATE(submsg_index) = sub_counts->subenum_count++; - } else { - field->UPB_PRIVATE(submsg_index) = kUpb_NoSub; - } -} - -static const char kUpb_EncodedToType[] = { - [kUpb_EncodedType_Double] = kUpb_FieldType_Double, - [kUpb_EncodedType_Float] = kUpb_FieldType_Float, - [kUpb_EncodedType_Int64] = kUpb_FieldType_Int64, - [kUpb_EncodedType_UInt64] = kUpb_FieldType_UInt64, - [kUpb_EncodedType_Int32] = kUpb_FieldType_Int32, - [kUpb_EncodedType_Fixed64] = kUpb_FieldType_Fixed64, - [kUpb_EncodedType_Fixed32] = kUpb_FieldType_Fixed32, - [kUpb_EncodedType_Bool] = kUpb_FieldType_Bool, - [kUpb_EncodedType_String] = kUpb_FieldType_String, - [kUpb_EncodedType_Group] = kUpb_FieldType_Group, - [kUpb_EncodedType_Message] = kUpb_FieldType_Message, - [kUpb_EncodedType_Bytes] = kUpb_FieldType_Bytes, - [kUpb_EncodedType_UInt32] = kUpb_FieldType_UInt32, - [kUpb_EncodedType_OpenEnum] = kUpb_FieldType_Enum, - [kUpb_EncodedType_SFixed32] = kUpb_FieldType_SFixed32, - [kUpb_EncodedType_SFixed64] = kUpb_FieldType_SFixed64, - [kUpb_EncodedType_SInt32] = kUpb_FieldType_SInt32, - [kUpb_EncodedType_SInt64] = kUpb_FieldType_SInt64, - [kUpb_EncodedType_ClosedEnum] = kUpb_FieldType_Enum, -}; - -static void upb_MiniTable_SetField(upb_MtDecoder* d, uint8_t ch, - upb_MiniTableField* field, - uint64_t msg_modifiers, - upb_SubCounts* sub_counts) { - static const char kUpb_EncodedToFieldRep[] = { - [kUpb_EncodedType_Double] = kUpb_FieldRep_8Byte, - [kUpb_EncodedType_Float] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_Int64] = kUpb_FieldRep_8Byte, - [kUpb_EncodedType_UInt64] = kUpb_FieldRep_8Byte, - [kUpb_EncodedType_Int32] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_Fixed64] = kUpb_FieldRep_8Byte, - [kUpb_EncodedType_Fixed32] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_Bool] = kUpb_FieldRep_1Byte, - [kUpb_EncodedType_String] = kUpb_FieldRep_StringView, - [kUpb_EncodedType_Bytes] = kUpb_FieldRep_StringView, - [kUpb_EncodedType_UInt32] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_OpenEnum] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_SFixed32] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_SFixed64] = kUpb_FieldRep_8Byte, - [kUpb_EncodedType_SInt32] = kUpb_FieldRep_4Byte, - [kUpb_EncodedType_SInt64] = kUpb_FieldRep_8Byte, - [kUpb_EncodedType_ClosedEnum] = kUpb_FieldRep_4Byte, - }; - - char pointer_rep = d->platform == kUpb_MiniTablePlatform_32Bit - ? kUpb_FieldRep_4Byte - : kUpb_FieldRep_8Byte; - - int8_t type = _upb_FromBase92(ch); - if (ch >= _upb_ToBase92(kUpb_EncodedType_RepeatedBase)) { - type -= kUpb_EncodedType_RepeatedBase; - field->UPB_PRIVATE(mode) = kUpb_FieldMode_Array; - field->UPB_PRIVATE(mode) |= pointer_rep << kUpb_FieldRep_Shift; - field->UPB_PRIVATE(offset) = kNoPresence; - } else { - field->UPB_PRIVATE(mode) = kUpb_FieldMode_Scalar; - field->UPB_PRIVATE(offset) = kHasbitPresence; - if (type == kUpb_EncodedType_Group || type == kUpb_EncodedType_Message) { - field->UPB_PRIVATE(mode) |= pointer_rep << kUpb_FieldRep_Shift; - } else if ((unsigned long)type >= sizeof(kUpb_EncodedToFieldRep)) { - upb_MdDecoder_ErrorJmp(&d->base, "Invalid field type: %d", (int)type); - } else { - field->UPB_PRIVATE(mode) |= kUpb_EncodedToFieldRep[type] - << kUpb_FieldRep_Shift; - } - } - if ((unsigned long)type >= sizeof(kUpb_EncodedToType)) { - upb_MdDecoder_ErrorJmp(&d->base, "Invalid field type: %d", (int)type); - } - upb_MiniTable_SetTypeAndSub(field, kUpb_EncodedToType[type], sub_counts, - msg_modifiers, type == kUpb_EncodedType_OpenEnum); -} - -static void upb_MtDecoder_ModifyField(upb_MtDecoder* d, - uint32_t message_modifiers, - uint32_t field_modifiers, - upb_MiniTableField* field) { - if (field_modifiers & kUpb_EncodedFieldModifier_FlipPacked) { - if (!upb_MtDecoder_FieldIsPackable(field)) { - upb_MdDecoder_ErrorJmp(&d->base, - "Cannot flip packed on unpackable field %" PRIu32, - upb_MiniTableField_Number(field)); - } - field->UPB_PRIVATE(mode) ^= kUpb_LabelFlags_IsPacked; - } - - if (field_modifiers & kUpb_EncodedFieldModifier_FlipValidateUtf8) { - if (field->UPB_PRIVATE(descriptortype) != kUpb_FieldType_Bytes || - !(field->UPB_PRIVATE(mode) & kUpb_LabelFlags_IsAlternate)) { - upb_MdDecoder_ErrorJmp(&d->base, - "Cannot flip ValidateUtf8 on field %" PRIu32 - ", type=%d, mode=%d", - upb_MiniTableField_Number(field), - (int)field->UPB_PRIVATE(descriptortype), - (int)field->UPB_PRIVATE(mode)); - } - field->UPB_PRIVATE(descriptortype) = kUpb_FieldType_String; - field->UPB_PRIVATE(mode) &= ~kUpb_LabelFlags_IsAlternate; - } - - bool singular = field_modifiers & kUpb_EncodedFieldModifier_IsProto3Singular; - bool required = field_modifiers & kUpb_EncodedFieldModifier_IsRequired; - - // Validate. - if ((singular || required) && field->UPB_PRIVATE(offset) != kHasbitPresence) { - upb_MdDecoder_ErrorJmp(&d->base, - "Invalid modifier(s) for repeated field %" PRIu32, - upb_MiniTableField_Number(field)); - } - if (singular && required) { - upb_MdDecoder_ErrorJmp( - &d->base, "Field %" PRIu32 " cannot be both singular and required", - upb_MiniTableField_Number(field)); - } - - if (singular && upb_MiniTableField_IsSubMessage(field)) { - upb_MdDecoder_ErrorJmp(&d->base, - "Field %" PRIu32 " cannot be a singular submessage", - upb_MiniTableField_Number(field)); - } - - if (singular) field->UPB_PRIVATE(offset) = kNoPresence; - if (required) { - field->UPB_PRIVATE(offset) = kRequiredPresence; - } -} - -static void upb_MtDecoder_PushOneof(upb_MtDecoder* d, - upb_OneOfLayoutItem item) { - if (item.field_index == kUpb_OneOfLayoutItem_IndexSentinel) { - upb_MdDecoder_ErrorJmp(&d->base, "Empty oneof"); - } - if ((d->oneofs.size + 1) * sizeof(*d->oneofs.data) > - d->oneofs.buf_capacity_bytes) { - size_t new_cap = UPB_MAX(8, d->oneofs.size * 2) * sizeof(*d->oneofs.data); - d->oneofs.data = - upb_grealloc(d->oneofs.data, d->oneofs.buf_capacity_bytes, new_cap); - upb_MdDecoder_CheckOutOfMemory(&d->base, d->oneofs.data); - d->oneofs.buf_capacity_bytes = new_cap; - } - item.field_index -= kOneofBase; - - d->rep_counts_offsets[kUpb_OneOf_CaseFieldRep]++; - d->rep_counts_offsets[item.rep]++; - d->oneofs.data[d->oneofs.size++] = item; -} - -static size_t upb_MtDecoder_SizeOfRep(upb_FieldRep rep, - upb_MiniTablePlatform platform) { - static const uint8_t kRepToSize32[] = { - [kUpb_FieldRep_1Byte] = 1, - [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_StringView] = 8, - [kUpb_FieldRep_8Byte] = 8, - }; - static const uint8_t kRepToSize64[] = { - [kUpb_FieldRep_1Byte] = 1, - [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_StringView] = 16, - [kUpb_FieldRep_8Byte] = 8, - }; - UPB_ASSERT(sizeof(upb_StringView) == - UPB_SIZE(kRepToSize32, kRepToSize64)[kUpb_FieldRep_StringView]); - return platform == kUpb_MiniTablePlatform_32Bit ? kRepToSize32[rep] - : kRepToSize64[rep]; -} - -static size_t upb_MtDecoder_AlignOfRep(upb_FieldRep rep, - upb_MiniTablePlatform platform) { - static const uint8_t kRepToAlign32[] = { - [kUpb_FieldRep_1Byte] = 1, - [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_StringView] = 4, - [kUpb_FieldRep_8Byte] = 8, - }; - static const uint8_t kRepToAlign64[] = { - [kUpb_FieldRep_1Byte] = 1, - [kUpb_FieldRep_4Byte] = 4, - [kUpb_FieldRep_StringView] = 8, - [kUpb_FieldRep_8Byte] = 8, - }; - UPB_ASSERT(UPB_ALIGN_OF(upb_StringView) == - UPB_SIZE(kRepToAlign32, kRepToAlign64)[kUpb_FieldRep_StringView]); - return platform == kUpb_MiniTablePlatform_32Bit ? kRepToAlign32[rep] - : kRepToAlign64[rep]; -} - -static const char* upb_MtDecoder_DecodeOneofField(upb_MtDecoder* d, - const char* ptr, - char first_ch, - upb_OneOfLayoutItem* item) { - uint32_t field_num; - ptr = upb_MdDecoder_DecodeBase92Varint( - &d->base, ptr, first_ch, kUpb_EncodedValue_MinOneofField, - kUpb_EncodedValue_MaxOneofField, &field_num); - upb_MiniTableField* f = - (void*)upb_MiniTable_FindFieldByNumber(d->table, field_num); - - if (!f) { - upb_MdDecoder_ErrorJmp(&d->base, - "Couldn't add field number %" PRIu32 - " to oneof, no such field number.", - field_num); - } - if (f->UPB_PRIVATE(offset) != kHasbitPresence) { - upb_MdDecoder_ErrorJmp( - &d->base, - "Cannot add repeated, required, or singular field %" PRIu32 - " to oneof.", - field_num); - } - - // Oneof storage must be large enough to accommodate the largest member. - int rep = f->UPB_PRIVATE(mode) >> kUpb_FieldRep_Shift; - size_t new_size = upb_MtDecoder_SizeOfRep(rep, d->platform); - size_t new_align = upb_MtDecoder_AlignOfRep(rep, d->platform); - size_t current_size = upb_MtDecoder_SizeOfRep(item->rep, d->platform); - size_t current_align = upb_MtDecoder_AlignOfRep(item->rep, d->platform); - - if (new_size > current_size || - (new_size == current_size && new_align > current_align)) { - UPB_ASSERT(new_align >= current_align); - item->rep = rep; - } else { - UPB_ASSERT(current_align >= new_align); - } - // Prepend this field to the linked list. - f->UPB_PRIVATE(offset) = item->field_index; - item->field_index = (f - d->fields) + kOneofBase; - return ptr; -} - -static const char* upb_MtDecoder_DecodeOneofs(upb_MtDecoder* d, - const char* ptr) { - upb_OneOfLayoutItem item = { - .rep = 0, .field_index = kUpb_OneOfLayoutItem_IndexSentinel}; - while (ptr < d->base.end) { - char ch = *ptr++; - if (ch == kUpb_EncodedValue_FieldSeparator) { - // Field separator, no action needed. - } else if (ch == kUpb_EncodedValue_OneofSeparator) { - // End of oneof. - upb_MtDecoder_PushOneof(d, item); - item.field_index = - kUpb_OneOfLayoutItem_IndexSentinel; // Move to next oneof. - } else { - ptr = upb_MtDecoder_DecodeOneofField(d, ptr, ch, &item); - } - } - - // Push final oneof. - upb_MtDecoder_PushOneof(d, item); - return ptr; -} - -static const char* upb_MtDecoder_ParseModifier(upb_MtDecoder* d, - const char* ptr, char first_ch, - upb_MiniTableField* last_field, - uint64_t* msg_modifiers) { - uint32_t mod; - ptr = upb_MdDecoder_DecodeBase92Varint(&d->base, ptr, first_ch, - kUpb_EncodedValue_MinModifier, - kUpb_EncodedValue_MaxModifier, &mod); - if (last_field) { - upb_MtDecoder_ModifyField(d, *msg_modifiers, mod, last_field); - } else { - if (!d->table) { - upb_MdDecoder_ErrorJmp(&d->base, - "Extensions cannot have message modifiers"); - } - *msg_modifiers = mod; - } - - return ptr; -} - -static void upb_MtDecoder_AllocateSubs(upb_MtDecoder* d, - upb_SubCounts sub_counts) { - uint32_t total_count = sub_counts.submsg_count + sub_counts.subenum_count; - size_t subs_bytes = sizeof(*d->table->UPB_PRIVATE(subs)) * total_count; - size_t ptrs_bytes = sizeof(upb_MiniTable*) * sub_counts.submsg_count; - upb_MiniTableSubInternal* subs = upb_Arena_Malloc(d->arena, subs_bytes); - const upb_MiniTable** subs_ptrs = upb_Arena_Malloc(d->arena, ptrs_bytes); - upb_MdDecoder_CheckOutOfMemory(&d->base, subs); - upb_MdDecoder_CheckOutOfMemory(&d->base, subs_ptrs); - uint32_t i = 0; - for (; i < sub_counts.submsg_count; i++) { - subs_ptrs[i] = UPB_PRIVATE(_upb_MiniTable_Empty)(); - subs[i].UPB_PRIVATE(submsg) = &subs_ptrs[i]; - } - if (sub_counts.subenum_count) { - upb_MiniTableField* f = d->fields; - upb_MiniTableField* end_f = f + d->table->UPB_PRIVATE(field_count); - for (; f < end_f; f++) { - if (f->UPB_PRIVATE(descriptortype) == kUpb_FieldType_Enum) { - f->UPB_PRIVATE(submsg_index) += sub_counts.submsg_count; - } - } - for (; i < sub_counts.submsg_count + sub_counts.subenum_count; i++) { - subs[i].UPB_PRIVATE(subenum) = NULL; - } - } - d->table->UPB_PRIVATE(subs) = subs; -} - -static const char* upb_MtDecoder_Parse(upb_MtDecoder* d, const char* ptr, - size_t len, void* fields, - size_t field_size, uint16_t* field_count, - upb_SubCounts* sub_counts) { - uint64_t msg_modifiers = 0; - uint32_t last_field_number = 0; - upb_MiniTableField* last_field = NULL; - bool need_dense_below = d->table != NULL; - - d->base.end = UPB_PTRADD(ptr, len); - - while (ptr < d->base.end) { - char ch = *ptr++; - if (ch <= kUpb_EncodedValue_MaxField) { - if (!d->table && last_field) { - // For extensions, consume only a single field and then return. - return --ptr; - } - upb_MiniTableField* field = fields; - *field_count += 1; - fields = (char*)fields + field_size; - field->UPB_PRIVATE(number) = ++last_field_number; - last_field = field; - upb_MiniTable_SetField(d, ch, field, msg_modifiers, sub_counts); - } else if (kUpb_EncodedValue_MinModifier <= ch && - ch <= kUpb_EncodedValue_MaxModifier) { - ptr = upb_MtDecoder_ParseModifier(d, ptr, ch, last_field, &msg_modifiers); - if (msg_modifiers & kUpb_MessageModifier_IsExtendable) { - d->table->UPB_PRIVATE(ext) |= kUpb_ExtMode_Extendable; - } - } else if (ch == kUpb_EncodedValue_End) { - if (!d->table) { - upb_MdDecoder_ErrorJmp(&d->base, "Extensions cannot have oneofs."); - } - ptr = upb_MtDecoder_DecodeOneofs(d, ptr); - } else if (kUpb_EncodedValue_MinSkip <= ch && - ch <= kUpb_EncodedValue_MaxSkip) { - if (need_dense_below) { - d->table->UPB_PRIVATE(dense_below) = d->table->UPB_PRIVATE(field_count); - need_dense_below = false; - } - uint32_t skip; - ptr = upb_MdDecoder_DecodeBase92Varint(&d->base, ptr, ch, - kUpb_EncodedValue_MinSkip, - kUpb_EncodedValue_MaxSkip, &skip); - last_field_number += skip; - last_field_number--; // Next field seen will increment. - } else { - upb_MdDecoder_ErrorJmp(&d->base, "Invalid char: %c", ch); - } - } - - if (need_dense_below) { - d->table->UPB_PRIVATE(dense_below) = d->table->UPB_PRIVATE(field_count); - } - - return ptr; -} - -static void upb_MtDecoder_ParseMessage(upb_MtDecoder* d, const char* data, - size_t len) { - // Buffer length is an upper bound on the number of fields. We will return - // what we don't use. - if (SIZE_MAX / sizeof(*d->fields) < len) { - upb_MdDecoder_ErrorJmp(&d->base, "Out of memory"); - } - d->fields = upb_Arena_Malloc(d->arena, sizeof(*d->fields) * len); - upb_MdDecoder_CheckOutOfMemory(&d->base, d->fields); - - upb_SubCounts sub_counts = {0, 0}; - d->table->UPB_PRIVATE(field_count) = 0; - d->table->UPB_PRIVATE(fields) = d->fields; - upb_MtDecoder_Parse(d, data, len, d->fields, sizeof(*d->fields), - &d->table->UPB_PRIVATE(field_count), &sub_counts); - - upb_Arena_ShrinkLast(d->arena, d->fields, sizeof(*d->fields) * len, - sizeof(*d->fields) * d->table->UPB_PRIVATE(field_count)); - d->table->UPB_PRIVATE(fields) = d->fields; - upb_MtDecoder_AllocateSubs(d, sub_counts); -} - -static void upb_MtDecoder_CalculateAlignments(upb_MtDecoder* d) { - // Add alignment counts for non-oneof fields (oneofs were added already) - int n = d->table->UPB_PRIVATE(field_count); - for (int i = 0; i < n; i++) { - upb_MiniTableField* f = &d->fields[i]; - if (f->UPB_PRIVATE(offset) >= kOneofBase) continue; - d->rep_counts_offsets[f->UPB_PRIVATE(mode) >> kUpb_FieldRep_Shift]++; - } - - // Reserve properly aligned space for each type of field representation - // present in this message. When we iterate over the fields, they will obtain - // their offset from within the region matching their alignment requirements. - size_t base = d->table->UPB_PRIVATE(size); - // Start with the lowest alignment requirement, going up, because: - // 1. If there are presence bits, we won't be aligned to start, but adding - // some lower-alignment fields may get us closer without wasting space to - // padding. - // 2. The allocator enforces 8 byte alignment, so moving intermediate padding - // to trailing padding doesn't save us anything. - for (upb_FieldRep rep = kUpb_FieldRep_1Byte; rep <= kUpb_FieldRep_Max; - rep++) { - uint16_t count = d->rep_counts_offsets[rep]; - if (count) { - base = UPB_ALIGN_UP(base, upb_MtDecoder_AlignOfRep(rep, d->platform)); - // This entry now tracks the base offset for this field representation - // type, instead of the count - d->rep_counts_offsets[rep] = base; - base += upb_MtDecoder_SizeOfRep(rep, d->platform) * count; - } - } - static const size_t max = UINT16_MAX; - if (base > max) { - upb_MdDecoder_ErrorJmp( - &d->base, "Message size exceeded maximum size of %zu bytes", max); - } - d->table->UPB_PRIVATE(size) = (uint16_t)base; -} - -static size_t upb_MiniTable_DivideRoundUp(size_t n, size_t d) { - return (n + d - 1) / d; -} - -static void upb_MtDecoder_AssignHasbits(upb_MtDecoder* d) { - upb_MiniTable* ret = d->table; - int n = ret->UPB_PRIVATE(field_count); - size_t last_hasbit = kUpb_Reserved_Hasbits - 1; - - // First assign required fields, which must have the lowest hasbits. - for (int i = 0; i < n; i++) { - upb_MiniTableField* field = - (upb_MiniTableField*)&ret->UPB_PRIVATE(fields)[i]; - if (field->UPB_PRIVATE(offset) == kRequiredPresence) { - field->presence = ++last_hasbit; - } else if (field->UPB_PRIVATE(offset) == kNoPresence) { - field->presence = 0; - } - } - if (last_hasbit > kUpb_Reserved_Hasbits + 63) { - upb_MdDecoder_ErrorJmp(&d->base, "Too many required fields"); - } - - ret->UPB_PRIVATE(required_count) = last_hasbit - (kUpb_Reserved_Hasbits - 1); - - // Next assign non-required hasbit fields. - for (int i = 0; i < n; i++) { - upb_MiniTableField* field = - (upb_MiniTableField*)&ret->UPB_PRIVATE(fields)[i]; - if (field->UPB_PRIVATE(offset) == kHasbitPresence) { - field->presence = ++last_hasbit; - } - } - - ret->UPB_PRIVATE(size) = - last_hasbit ? upb_MiniTable_DivideRoundUp(last_hasbit + 1, 8) : 0; -} - -static size_t upb_MtDecoder_Place(upb_MtDecoder* d, upb_FieldRep rep) { - size_t size = upb_MtDecoder_SizeOfRep(rep, d->platform); - size_t offset = d->rep_counts_offsets[rep]; - d->rep_counts_offsets[rep] += size; - return offset; -} - -static void upb_MtDecoder_AssignOffsets(upb_MtDecoder* d) { - upb_MiniTableField* field_end = - UPB_PTRADD(d->fields, d->table->UPB_PRIVATE(field_count)); - for (upb_MiniTableField* field = d->fields; field < field_end; field++) { - if (field->UPB_PRIVATE(offset) >= kOneofBase) continue; - field->UPB_PRIVATE(offset) = - upb_MtDecoder_Place(d, field->UPB_PRIVATE(mode) >> kUpb_FieldRep_Shift); - } - - upb_OneOfLayoutItem* oneof_end = UPB_PTRADD(d->oneofs.data, d->oneofs.size); - - for (upb_OneOfLayoutItem* item = d->oneofs.data; item < oneof_end; item++) { - upb_MiniTableField* f = &d->fields[item->field_index]; - uint16_t case_offset = upb_MtDecoder_Place(d, kUpb_OneOf_CaseFieldRep); - uint16_t data_offset = upb_MtDecoder_Place(d, item->rep); - while (true) { - f->presence = ~case_offset; - uint16_t next_offset = f->UPB_PRIVATE(offset); - f->UPB_PRIVATE(offset) = data_offset; - if (next_offset == kUpb_OneOfLayoutItem_IndexSentinel) break; - UPB_ASSERT(next_offset - kOneofBase < d->table->UPB_PRIVATE(field_count)); - f = &d->fields[next_offset - kOneofBase]; - } - } - - // The fasttable parser (supported on 64-bit only) depends on this being a - // multiple of 8 in order to satisfy UPB_MALLOC_ALIGN, which is also 8. - // - // On 32-bit we could potentially make this smaller, but there is no - // compelling reason to optimize this right now. - d->table->UPB_PRIVATE(size) = UPB_ALIGN_UP(d->table->UPB_PRIVATE(size), 8); -} - -static void upb_MtDecoder_ValidateEntryField(upb_MtDecoder* d, - const upb_MiniTableField* f, - uint32_t expected_num) { - const char* name = expected_num == 1 ? "key" : "val"; - const uint32_t f_number = upb_MiniTableField_Number(f); - if (f_number != expected_num) { - upb_MdDecoder_ErrorJmp(&d->base, - "map %s did not have expected number (%d vs %d)", - name, expected_num, f_number); - } - - if (!upb_MiniTableField_IsScalar(f)) { - upb_MdDecoder_ErrorJmp( - &d->base, "map %s cannot be repeated or map, or be in oneof", name); - } - - uint32_t not_ok_types; - if (expected_num == 1) { - not_ok_types = (1 << kUpb_FieldType_Float) | (1 << kUpb_FieldType_Double) | - (1 << kUpb_FieldType_Message) | (1 << kUpb_FieldType_Group) | - (1 << kUpb_FieldType_Bytes) | (1 << kUpb_FieldType_Enum); - } else { - not_ok_types = 1 << kUpb_FieldType_Group; - } - - if ((1 << upb_MiniTableField_Type(f)) & not_ok_types) { - upb_MdDecoder_ErrorJmp(&d->base, "map %s cannot have type %d", name, - (int)f->UPB_PRIVATE(descriptortype)); - } -} - -static void upb_MtDecoder_ParseMap(upb_MtDecoder* d, const char* data, - size_t len) { - upb_MtDecoder_ParseMessage(d, data, len); - upb_MtDecoder_AssignHasbits(d); - - if (UPB_UNLIKELY(d->table->UPB_PRIVATE(field_count) != 2)) { - upb_MdDecoder_ErrorJmp(&d->base, "%hu fields in map", - d->table->UPB_PRIVATE(field_count)); - UPB_UNREACHABLE(); - } - - if (d->oneofs.size != 0) { - upb_MdDecoder_ErrorJmp(&d->base, "Map entry cannot have oneof"); - } - - upb_MtDecoder_ValidateEntryField(d, &d->table->UPB_PRIVATE(fields)[0], 1); - upb_MtDecoder_ValidateEntryField(d, &d->table->UPB_PRIVATE(fields)[1], 2); - - d->fields[0].UPB_PRIVATE(offset) = offsetof(upb_MapEntry, k); - d->fields[1].UPB_PRIVATE(offset) = offsetof(upb_MapEntry, v); - d->table->UPB_PRIVATE(size) = sizeof(upb_MapEntry); - - // Map entries have a special bit set to signal it's a map entry, used in - // upb_MiniTable_SetSubMessage() below. - d->table->UPB_PRIVATE(ext) |= kUpb_ExtMode_IsMapEntry; -} - -static void upb_MtDecoder_ParseMessageSet(upb_MtDecoder* d, const char* data, - size_t len) { - if (len > 0) { - upb_MdDecoder_ErrorJmp(&d->base, "Invalid message set encode length: %zu", - len); - } - - upb_MiniTable* ret = d->table; - ret->UPB_PRIVATE(size) = kUpb_Reserved_Hasbytes; - ret->UPB_PRIVATE(field_count) = 0; - ret->UPB_PRIVATE(ext) = kUpb_ExtMode_IsMessageSet; - ret->UPB_PRIVATE(dense_below) = 0; - ret->UPB_PRIVATE(table_mask) = -1; - ret->UPB_PRIVATE(required_count) = 0; -} - -static upb_MiniTable* upb_MtDecoder_DoBuildMiniTableWithBuf( - upb_MtDecoder* decoder, const char* data, size_t len, void** buf, - size_t* buf_size) { - upb_MdDecoder_CheckOutOfMemory(&decoder->base, decoder->table); - - decoder->table->UPB_PRIVATE(size) = kUpb_Reserved_Hasbytes; - decoder->table->UPB_PRIVATE(field_count) = 0; - decoder->table->UPB_PRIVATE(ext) = kUpb_ExtMode_NonExtendable; - decoder->table->UPB_PRIVATE(dense_below) = 0; - decoder->table->UPB_PRIVATE(table_mask) = -1; - decoder->table->UPB_PRIVATE(required_count) = 0; -#ifdef UPB_TRACING_ENABLED - // MiniTables built from MiniDescriptors will not be able to vend the message - // name unless it is explicitly set with upb_MiniTable_SetFullName(). - decoder->table->UPB_PRIVATE(full_name) = 0; -#endif - - // Strip off and verify the version tag. - if (!len--) goto done; - const char vers = *data++; - - switch (vers) { - case kUpb_EncodedVersion_MapV1: - upb_MtDecoder_ParseMap(decoder, data, len); - break; - - case kUpb_EncodedVersion_MessageV1: - upb_MtDecoder_ParseMessage(decoder, data, len); - upb_MtDecoder_AssignHasbits(decoder); - upb_MtDecoder_CalculateAlignments(decoder); - upb_MtDecoder_AssignOffsets(decoder); - break; - - case kUpb_EncodedVersion_MessageSetV1: - upb_MtDecoder_ParseMessageSet(decoder, data, len); - break; - - default: - upb_MdDecoder_ErrorJmp(&decoder->base, "Invalid message version: %c", - vers); - } - -done: - *buf = decoder->oneofs.data; - *buf_size = decoder->oneofs.buf_capacity_bytes; - return decoder->table; -} - -static upb_MiniTable* upb_MtDecoder_BuildMiniTableWithBuf( - upb_MtDecoder* const decoder, const char* const data, const size_t len, - void** const buf, size_t* const buf_size) { - if (UPB_SETJMP(decoder->base.err) != 0) { - *buf = decoder->oneofs.data; - *buf_size = decoder->oneofs.buf_capacity_bytes; - return NULL; - } - - return upb_MtDecoder_DoBuildMiniTableWithBuf(decoder, data, len, buf, - buf_size); -} - -upb_MiniTable* upb_MiniTable_BuildWithBuf(const char* data, size_t len, - upb_MiniTablePlatform platform, - upb_Arena* arena, void** buf, - size_t* buf_size, - upb_Status* status) { - upb_MtDecoder decoder = { - .base = {.status = status}, - .platform = platform, - .oneofs = - { - .data = *buf, - .buf_capacity_bytes = *buf_size, - .size = 0, - }, - .arena = arena, - .table = upb_Arena_Malloc(arena, sizeof(*decoder.table)), - }; - - return upb_MtDecoder_BuildMiniTableWithBuf(&decoder, data, len, buf, - buf_size); -} - -static const char* upb_MtDecoder_DoBuildMiniTableExtension( - upb_MtDecoder* decoder, const char* data, size_t len, - upb_MiniTableExtension* ext, const upb_MiniTable* extendee, - upb_MiniTableSub sub) { - if (!(extendee->UPB_PRIVATE(ext) & - (kUpb_ExtMode_Extendable | kUpb_ExtMode_IsMessageSet))) { - upb_MdDecoder_ErrorJmp(&decoder->base, "Extendee is not extendable"); - } - - // If the string is non-empty then it must begin with a version tag. - if (len) { - if (*data != kUpb_EncodedVersion_ExtensionV1) { - upb_MdDecoder_ErrorJmp(&decoder->base, "Invalid ext version: %c", *data); - } - data++; - len--; - } - - uint16_t count = 0; - upb_SubCounts sub_counts = {0, 0}; - const char* ret = upb_MtDecoder_Parse(decoder, data, len, ext, sizeof(*ext), - &count, &sub_counts); - if (!ret || count != 1) return NULL; - - upb_MiniTableField* f = &ext->UPB_PRIVATE(field); - - f->UPB_PRIVATE(mode) |= kUpb_LabelFlags_IsExtension; - f->UPB_PRIVATE(offset) = 0; - f->presence = 0; - - if (extendee->UPB_PRIVATE(ext) & kUpb_ExtMode_IsMessageSet) { - // Extensions of MessageSet must be messages. - if (!upb_MiniTableField_IsSubMessage(f)) return NULL; - - // Extensions of MessageSet must be non-repeating. - if (upb_MiniTableField_IsArray(f)) return NULL; - } - - ext->UPB_PRIVATE(extendee) = extendee; - ext->UPB_PRIVATE(sub) = sub; - - return ret; -} - -static const char* upb_MtDecoder_BuildMiniTableExtension( - upb_MtDecoder* const decoder, const char* const data, const size_t len, - upb_MiniTableExtension* const ext, const upb_MiniTable* const extendee, - const upb_MiniTableSub sub) { - if (UPB_SETJMP(decoder->base.err) != 0) return NULL; - return upb_MtDecoder_DoBuildMiniTableExtension(decoder, data, len, ext, - extendee, sub); -} - -const char* _upb_MiniTableExtension_Init(const char* data, size_t len, - upb_MiniTableExtension* ext, - const upb_MiniTable* extendee, - upb_MiniTableSub sub, - upb_MiniTablePlatform platform, - upb_Status* status) { - upb_MtDecoder decoder = { - .base = {.status = status}, - .arena = NULL, - .table = NULL, - .platform = platform, - }; - - return upb_MtDecoder_BuildMiniTableExtension(&decoder, data, len, ext, - extendee, sub); -} - -upb_MiniTableExtension* _upb_MiniTableExtension_Build( - const char* data, size_t len, const upb_MiniTable* extendee, - upb_MiniTableSub sub, upb_MiniTablePlatform platform, upb_Arena* arena, - upb_Status* status) { - upb_MiniTableExtension* ext = - upb_Arena_Malloc(arena, sizeof(upb_MiniTableExtension)); - if (UPB_UNLIKELY(!ext)) return NULL; - - const char* ptr = _upb_MiniTableExtension_Init(data, len, ext, extendee, sub, - platform, status); - if (UPB_UNLIKELY(!ptr)) return NULL; - - return ext; -} - -upb_MiniTable* _upb_MiniTable_Build(const char* data, size_t len, - upb_MiniTablePlatform platform, - upb_Arena* arena, upb_Status* status) { - void* buf = NULL; - size_t size = 0; - upb_MiniTable* ret = upb_MiniTable_BuildWithBuf(data, len, platform, arena, - &buf, &size, status); - upb_gfree(buf); - return ret; -} - - -#include -#include -#include - - -// Must be last. - -bool upb_MiniTable_SetSubMessage(upb_MiniTable* table, - upb_MiniTableField* field, - const upb_MiniTable* sub) { - UPB_ASSERT((uintptr_t)table->UPB_PRIVATE(fields) <= (uintptr_t)field && - (uintptr_t)field < (uintptr_t)(table->UPB_PRIVATE(fields) + - table->UPB_PRIVATE(field_count))); - UPB_ASSERT(sub); - - const bool sub_is_map = sub->UPB_PRIVATE(ext) & kUpb_ExtMode_IsMapEntry; - - switch (field->UPB_PRIVATE(descriptortype)) { - case kUpb_FieldType_Message: - if (sub_is_map) { - const bool table_is_map = - table->UPB_PRIVATE(ext) & kUpb_ExtMode_IsMapEntry; - if (UPB_UNLIKELY(table_is_map)) return false; - - field->UPB_PRIVATE(mode) = - (field->UPB_PRIVATE(mode) & ~kUpb_FieldMode_Mask) | - kUpb_FieldMode_Map; - } - break; - - case kUpb_FieldType_Group: - if (UPB_UNLIKELY(sub_is_map)) return false; - break; - - default: - return false; - } - - int idx = field->UPB_PRIVATE(submsg_index); - upb_MiniTableSubInternal* table_subs = (void*)table->UPB_PRIVATE(subs); - // TODO: Add this assert back once YouTube is updated to not call - // this function repeatedly. - // UPB_ASSERT(UPB_PRIVATE(_upb_MiniTable_IsEmpty)(table_sub->submsg)); - memcpy((void*)table_subs[idx].UPB_PRIVATE(submsg), &sub, sizeof(void*)); - return true; -} - -bool upb_MiniTable_SetSubEnum(upb_MiniTable* table, upb_MiniTableField* field, - const upb_MiniTableEnum* sub) { - UPB_ASSERT((uintptr_t)table->UPB_PRIVATE(fields) <= (uintptr_t)field && - (uintptr_t)field < (uintptr_t)(table->UPB_PRIVATE(fields) + - table->UPB_PRIVATE(field_count))); - UPB_ASSERT(sub); - - if (field->UPB_PRIVATE(descriptortype) != kUpb_FieldType_Enum) { - return false; - } - - upb_MiniTableSub* table_sub = - (void*)&table->UPB_PRIVATE(subs)[field->UPB_PRIVATE(submsg_index)]; - *table_sub = upb_MiniTableSub_FromEnum(sub); - return true; -} - -uint32_t upb_MiniTable_GetSubList(const upb_MiniTable* m, - const upb_MiniTableField** subs) { - uint32_t msg_count = 0; - uint32_t enum_count = 0; - - for (int i = 0; i < upb_MiniTable_FieldCount(m); i++) { - const upb_MiniTableField* f = upb_MiniTable_GetFieldByIndex(m, i); - if (upb_MiniTableField_CType(f) == kUpb_CType_Message) { - *subs = f; - ++subs; - msg_count++; - } - } - - for (int i = 0; i < upb_MiniTable_FieldCount(m); i++) { - const upb_MiniTableField* f = upb_MiniTable_GetFieldByIndex(m, i); - if (upb_MiniTableField_IsClosedEnum(f)) { - *subs = f; - ++subs; - enum_count++; - } - } - - return (msg_count << 16) | enum_count; -} - -// The list of sub_tables and sub_enums must exactly match the number and order -// of sub-message fields and sub-enum fields given by upb_MiniTable_GetSubList() -// above. -bool upb_MiniTable_Link(upb_MiniTable* m, const upb_MiniTable** sub_tables, - size_t sub_table_count, - const upb_MiniTableEnum** sub_enums, - size_t sub_enum_count) { - uint32_t msg_count = 0; - uint32_t enum_count = 0; - - for (int i = 0; i < upb_MiniTable_FieldCount(m); i++) { - upb_MiniTableField* f = - (upb_MiniTableField*)upb_MiniTable_GetFieldByIndex(m, i); - if (upb_MiniTableField_CType(f) == kUpb_CType_Message) { - const upb_MiniTable* sub = sub_tables[msg_count++]; - if (msg_count > sub_table_count) return false; - if (sub && !upb_MiniTable_SetSubMessage(m, f, sub)) return false; - } - } - - for (int i = 0; i < upb_MiniTable_FieldCount(m); i++) { - upb_MiniTableField* f = - (upb_MiniTableField*)upb_MiniTable_GetFieldByIndex(m, i); - if (upb_MiniTableField_IsClosedEnum(f)) { - const upb_MiniTableEnum* sub = sub_enums[enum_count++]; - if (enum_count > sub_enum_count) return false; - if (sub && !upb_MiniTable_SetSubEnum(m, f, sub)) return false; - } - } - - return (msg_count == sub_table_count) && (enum_count == sub_enum_count); -} - - -#include -#include -#include - - -// Must be last. - -#define EXTREG_KEY_SIZE (sizeof(upb_MiniTable*) + sizeof(uint32_t)) - -struct upb_ExtensionRegistry { - upb_Arena* arena; - upb_strtable exts; // Key is upb_MiniTable* concatenated with fieldnum. -}; - -static void extreg_key(char* buf, const upb_MiniTable* l, uint32_t fieldnum) { - memcpy(buf, &l, sizeof(l)); - memcpy(buf + sizeof(l), &fieldnum, sizeof(fieldnum)); -} - -upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena) { - upb_ExtensionRegistry* r = upb_Arena_Malloc(arena, sizeof(*r)); - if (!r) return NULL; - r->arena = arena; - if (!upb_strtable_init(&r->exts, 8, arena)) return NULL; - return r; -} - -UPB_API upb_ExtensionRegistryStatus upb_ExtensionRegistry_Add( - upb_ExtensionRegistry* r, const upb_MiniTableExtension* e) { - char buf[EXTREG_KEY_SIZE]; - extreg_key(buf, e->UPB_PRIVATE(extendee), upb_MiniTableExtension_Number(e)); - - if (upb_strtable_lookup2(&r->exts, buf, EXTREG_KEY_SIZE, NULL)) { - return kUpb_ExtensionRegistryStatus_DuplicateEntry; - } - - if (!upb_strtable_insert(&r->exts, buf, EXTREG_KEY_SIZE, - upb_value_constptr(e), r->arena)) { - return kUpb_ExtensionRegistryStatus_OutOfMemory; - } - return kUpb_ExtensionRegistryStatus_Ok; -} - -upb_ExtensionRegistryStatus upb_ExtensionRegistry_AddArray( - upb_ExtensionRegistry* r, const upb_MiniTableExtension** e, size_t count) { - const upb_MiniTableExtension** start = e; - const upb_MiniTableExtension** end = UPB_PTRADD(e, count); - upb_ExtensionRegistryStatus status = kUpb_ExtensionRegistryStatus_Ok; - for (; e < end; e++) { - status = upb_ExtensionRegistry_Add(r, *e); - if (status != kUpb_ExtensionRegistryStatus_Ok) goto failure; - } - return kUpb_ExtensionRegistryStatus_Ok; - -failure: - // Back out the entries previously added. - for (end = e, e = start; e < end; e++) { - const upb_MiniTableExtension* ext = *e; - char buf[EXTREG_KEY_SIZE]; - extreg_key(buf, ext->UPB_PRIVATE(extendee), - upb_MiniTableExtension_Number(ext)); - upb_strtable_remove2(&r->exts, buf, EXTREG_KEY_SIZE, NULL); - } - UPB_ASSERT(status != kUpb_ExtensionRegistryStatus_Ok); - return status; -} - -#ifdef UPB_LINKARR_DECLARE - -UPB_LINKARR_DECLARE(upb_AllExts, const upb_MiniTableExtension); - -bool upb_ExtensionRegistry_AddAllLinkedExtensions(upb_ExtensionRegistry* r) { - const upb_MiniTableExtension* start = UPB_LINKARR_START(upb_AllExts); - const upb_MiniTableExtension* stop = UPB_LINKARR_STOP(upb_AllExts); - for (const upb_MiniTableExtension* p = start; p < stop; p++) { - // Windows can introduce zero padding, so we have to skip zeroes. - if (upb_MiniTableExtension_Number(p) != 0) { - if (upb_ExtensionRegistry_Add(r, p) != kUpb_ExtensionRegistryStatus_Ok) { - return false; - } - } - } - return true; -} - -#endif // UPB_LINKARR_DECLARE - -const upb_MiniTableExtension* upb_ExtensionRegistry_Lookup( - const upb_ExtensionRegistry* r, const upb_MiniTable* t, uint32_t num) { - char buf[EXTREG_KEY_SIZE]; - upb_value v; - extreg_key(buf, t, num); - if (upb_strtable_lookup2(&r->exts, buf, EXTREG_KEY_SIZE, &v)) { - return upb_value_getconstptr(v); - } else { - return NULL; - } -} - - -#include -#include - - -// Must be last. - -const upb_MiniTableField* upb_MiniTable_FindFieldByNumber( - const upb_MiniTable* m, uint32_t number) { - const size_t i = ((size_t)number) - 1; // 0 wraps to SIZE_MAX - - // Ideal case: index into dense fields - if (i < m->UPB_PRIVATE(dense_below)) { - UPB_ASSERT(m->UPB_PRIVATE(fields)[i].UPB_PRIVATE(number) == number); - return &m->UPB_PRIVATE(fields)[i]; - } - - // Slow case: binary search - uint32_t lo = m->UPB_PRIVATE(dense_below); - int32_t hi = m->UPB_PRIVATE(field_count) - 1; - const upb_MiniTableField* base = m->UPB_PRIVATE(fields); - while (hi >= (int32_t)lo) { - uint32_t mid = (hi + lo) / 2; - uint32_t num = base[mid].UPB_ONLYBITS(number); - // These comparison operations allow, on ARM machines, to fuse all these - // branches into one comparison followed by two CSELs to set the lo/hi - // values, followed by a BNE to continue or terminate the loop. Since binary - // search branches are generally unpredictable (50/50 in each direction), - // this is a good deal. We use signed for the high, as this decrement may - // underflow if mid is 0. - int32_t hi_mid = mid - 1; - uint32_t lo_mid = mid + 1; - if (num == number) { - return &base[mid]; - } - if (UPB_UNPREDICTABLE(num < number)) { - lo = lo_mid; - } else { - hi = hi_mid; - } - } - - return NULL; -} - -const upb_MiniTableField* upb_MiniTable_GetOneof(const upb_MiniTable* m, - const upb_MiniTableField* f) { - if (UPB_UNLIKELY(!upb_MiniTableField_IsInOneof(f))) { - return NULL; - } - const upb_MiniTableField* ptr = &m->UPB_PRIVATE(fields)[0]; - const upb_MiniTableField* end = - &m->UPB_PRIVATE(fields)[m->UPB_PRIVATE(field_count)]; - for (; ptr < end; ptr++) { - if (ptr->presence == (*f).presence) { - return ptr; - } - } - return NULL; -} - -bool upb_MiniTable_NextOneofField(const upb_MiniTable* m, - const upb_MiniTableField** f) { - const upb_MiniTableField* ptr = *f; - const upb_MiniTableField* end = - &m->UPB_PRIVATE(fields)[m->UPB_PRIVATE(field_count)]; - while (++ptr < end) { - if (ptr->presence == (*f)->presence) { - *f = ptr; - return true; - } - } - return false; -} - - -#include -#include - - -// Must be last. - -// Checks if source and target mini table fields are identical. -// -// If the field is a sub message and sub messages are identical we record -// the association in table. -// -// Hashing the source sub message mini table and it's equivalent in the table -// stops recursing when a cycle is detected and instead just checks if the -// destination table is equal. -static upb_MiniTableEquals_Status upb_deep_check(const upb_MiniTable* src, - const upb_MiniTable* dst, - upb_inttable* table, - upb_Arena** arena) { - if (src->UPB_PRIVATE(field_count) != dst->UPB_PRIVATE(field_count)) - return kUpb_MiniTableEquals_NotEqual; - bool marked_src = false; - for (int i = 0; i < upb_MiniTable_FieldCount(src); i++) { - const upb_MiniTableField* src_field = upb_MiniTable_GetFieldByIndex(src, i); - const upb_MiniTableField* dst_field = upb_MiniTable_FindFieldByNumber( - dst, upb_MiniTableField_Number(src_field)); - - if (upb_MiniTableField_CType(src_field) != - upb_MiniTableField_CType(dst_field)) - return false; - if (src_field->UPB_PRIVATE(mode) != dst_field->UPB_PRIVATE(mode)) - return false; - if (src_field->UPB_PRIVATE(offset) != dst_field->UPB_PRIVATE(offset)) - return false; - if (src_field->presence != dst_field->presence) return false; - if (src_field->UPB_PRIVATE(submsg_index) != - dst_field->UPB_PRIVATE(submsg_index)) - return kUpb_MiniTableEquals_NotEqual; - - // Go no further if we are only checking for compatibility. - if (!table) continue; - - if (upb_MiniTableField_CType(src_field) == kUpb_CType_Message) { - if (!*arena) { - *arena = upb_Arena_New(); - if (!upb_inttable_init(table, *arena)) { - return kUpb_MiniTableEquals_OutOfMemory; - } - } - if (!marked_src) { - marked_src = true; - upb_value val; - val.val = (uint64_t)dst; - if (!upb_inttable_insert(table, (uintptr_t)src, val, *arena)) { - return kUpb_MiniTableEquals_OutOfMemory; - } - } - const upb_MiniTable* sub_src = - upb_MiniTable_GetSubMessageTable(src, src_field); - const upb_MiniTable* sub_dst = - upb_MiniTable_GetSubMessageTable(dst, dst_field); - if (sub_src != NULL) { - upb_value cmp; - if (upb_inttable_lookup(table, (uintptr_t)sub_src, &cmp)) { - // We already compared this src before. Check if same dst. - if (cmp.val != (uint64_t)sub_dst) { - return kUpb_MiniTableEquals_NotEqual; - } - } else { - // Recurse if not already visited. - upb_MiniTableEquals_Status s = - upb_deep_check(sub_src, sub_dst, table, arena); - if (s != kUpb_MiniTableEquals_Equal) { - return s; - } - } - } - } - } - return kUpb_MiniTableEquals_Equal; -} - -bool upb_MiniTable_Compatible(const upb_MiniTable* src, - const upb_MiniTable* dst) { - return upb_deep_check(src, dst, NULL, NULL); -} - -upb_MiniTableEquals_Status upb_MiniTable_Equals(const upb_MiniTable* src, - const upb_MiniTable* dst) { - // Arena allocated on demand for hash table. - upb_Arena* arena = NULL; - // Table to keep track of visited mini tables to guard against cycles. - upb_inttable table; - upb_MiniTableEquals_Status status = upb_deep_check(src, dst, &table, &arena); - if (arena) { - upb_Arena_Free(arena); - } - return status; -} - - -#include -#include -#include -#include -#include - - -// Must be last. - -// A few fake field types for our tables. -enum { - kUpb_FakeFieldType_FieldNotFound = 0, - kUpb_FakeFieldType_MessageSetItem = 19, -}; - -// DecodeOp: an action to be performed for a wire-type/field-type combination. -enum { - // Special ops: we don't write data to regular fields for these. - kUpb_DecodeOp_UnknownField = -1, - kUpb_DecodeOp_MessageSetItem = -2, - - // Scalar-only ops. - kUpb_DecodeOp_Scalar1Byte = 0, - kUpb_DecodeOp_Scalar4Byte = 2, - kUpb_DecodeOp_Scalar8Byte = 3, - kUpb_DecodeOp_Enum = 1, - - // Scalar/repeated ops. - kUpb_DecodeOp_String = 4, - kUpb_DecodeOp_Bytes = 5, - kUpb_DecodeOp_SubMessage = 6, - - // Repeated-only ops (also see macros below). - kUpb_DecodeOp_PackedEnum = 13, -}; - -// For packed fields it is helpful to be able to recover the lg2 of the data -// size from the op. -#define OP_FIXPCK_LG2(n) (n + 5) /* n in [2, 3] => op in [7, 8] */ -#define OP_VARPCK_LG2(n) (n + 9) /* n in [0, 2, 3] => op in [9, 11, 12] */ - -typedef union { - bool bool_val; - uint32_t uint32_val; - uint64_t uint64_val; - uint32_t size; -} wireval; - -// Ideally these two functions should take the owning MiniTable pointer as a -// first argument, then we could just put them in mini_table/message.h as nice -// clean getters. But we don't have that so instead we gotta write these -// Frankenfunctions that take an array of subtables. -// TODO: Move these to mini_table/ anyway since there are other places -// that could use them. - -// Returns the MiniTable corresponding to a given MiniTableField -// from an array of MiniTableSubs. -static const upb_MiniTable* _upb_MiniTableSubs_MessageByField( - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field) { - return *subs[field->UPB_PRIVATE(submsg_index)].UPB_PRIVATE(submsg); -} - -// Returns the MiniTableEnum corresponding to a given MiniTableField -// from an array of MiniTableSub. -static const upb_MiniTableEnum* _upb_MiniTableSubs_EnumByField( - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field) { - return subs[field->UPB_PRIVATE(submsg_index)].UPB_PRIVATE(subenum); -} - -static const char* _upb_Decoder_DecodeMessage(upb_Decoder* d, const char* ptr, - upb_Message* msg, - const upb_MiniTable* layout); - -UPB_NORETURN static void* _upb_Decoder_ErrorJmp(upb_Decoder* d, - upb_DecodeStatus status) { - UPB_ASSERT(status != kUpb_DecodeStatus_Ok); - d->status = status; - UPB_LONGJMP(d->err, 1); -} - -const char* _upb_FastDecoder_ErrorJmp(upb_Decoder* d, int status) { - UPB_ASSERT(status != kUpb_DecodeStatus_Ok); - d->status = status; - UPB_LONGJMP(d->err, 1); - return NULL; -} - -static void _upb_Decoder_VerifyUtf8(upb_Decoder* d, const char* buf, int len) { - if (!_upb_Decoder_VerifyUtf8Inline(buf, len)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); - } -} - -static bool _upb_Decoder_Reserve(upb_Decoder* d, upb_Array* arr, size_t elem) { - bool need_realloc = - arr->UPB_PRIVATE(capacity) - arr->UPB_PRIVATE(size) < elem; - if (need_realloc && !UPB_PRIVATE(_upb_Array_Realloc)( - arr, arr->UPB_PRIVATE(size) + elem, &d->arena)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - return need_realloc; -} - -typedef struct { - const char* ptr; - uint64_t val; -} _upb_DecodeLongVarintReturn; - -UPB_NOINLINE -static _upb_DecodeLongVarintReturn _upb_Decoder_DecodeLongVarint( - const char* ptr, uint64_t val) { - _upb_DecodeLongVarintReturn ret = {NULL, 0}; - uint64_t byte; - for (int i = 1; i < 10; i++) { - byte = (uint8_t)ptr[i]; - val += (byte - 1) << (i * 7); - if (!(byte & 0x80)) { - ret.ptr = ptr + i + 1; - ret.val = val; - return ret; - } - } - return ret; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeVarint(upb_Decoder* d, const char* ptr, - uint64_t* val) { - uint64_t byte = (uint8_t)*ptr; - if (UPB_LIKELY((byte & 0x80) == 0)) { - *val = byte; - return ptr + 1; - } else { - _upb_DecodeLongVarintReturn res = _upb_Decoder_DecodeLongVarint(ptr, byte); - if (!res.ptr) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - *val = res.val; - return res.ptr; - } -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeTag(upb_Decoder* d, const char* ptr, - uint32_t* val) { - uint64_t byte = (uint8_t)*ptr; - if (UPB_LIKELY((byte & 0x80) == 0)) { - *val = byte; - return ptr + 1; - } else { - const char* start = ptr; - _upb_DecodeLongVarintReturn res = _upb_Decoder_DecodeLongVarint(ptr, byte); - if (!res.ptr || res.ptr - start > 5 || res.val > UINT32_MAX) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - } - *val = res.val; - return res.ptr; - } -} - -UPB_FORCEINLINE -const char* upb_Decoder_DecodeSize(upb_Decoder* d, const char* ptr, - uint32_t* size) { - uint64_t size64; - ptr = _upb_Decoder_DecodeVarint(d, ptr, &size64); - if (size64 >= INT32_MAX || - !upb_EpsCopyInputStream_CheckSize(&d->input, ptr, (int)size64)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - } - *size = size64; - return ptr; -} - -static void _upb_Decoder_MungeInt32(wireval* val) { - if (!upb_IsLittleEndian()) { - /* The next stage will memcpy(dst, &val, 4) */ - val->uint32_val = val->uint64_val; - } -} - -static void _upb_Decoder_Munge(int type, wireval* val) { - switch (type) { - case kUpb_FieldType_Bool: - val->bool_val = val->uint64_val != 0; - break; - case kUpb_FieldType_SInt32: { - uint32_t n = val->uint64_val; - val->uint32_val = (n >> 1) ^ -(int32_t)(n & 1); - break; - } - case kUpb_FieldType_SInt64: { - uint64_t n = val->uint64_val; - val->uint64_val = (n >> 1) ^ -(int64_t)(n & 1); - break; - } - case kUpb_FieldType_Int32: - case kUpb_FieldType_UInt32: - case kUpb_FieldType_Enum: - _upb_Decoder_MungeInt32(val); - break; - } -} - -static upb_Message* _upb_Decoder_NewSubMessage2(upb_Decoder* d, - const upb_MiniTable* subl, - const upb_MiniTableField* field, - upb_TaggedMessagePtr* target) { - UPB_ASSERT(subl); - upb_Message* msg = _upb_Message_New(subl, &d->arena); - if (!msg) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - - // Extensions should not be unlinked. A message extension should not be - // registered until its sub-message type is available to be linked. - bool is_empty = UPB_PRIVATE(_upb_MiniTable_IsEmpty)(subl); - bool is_extension = field->UPB_PRIVATE(mode) & kUpb_LabelFlags_IsExtension; - UPB_ASSERT(!(is_empty && is_extension)); - - if (is_empty && !(d->options & kUpb_DecodeOption_ExperimentalAllowUnlinked)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_UnlinkedSubMessage); - } - - upb_TaggedMessagePtr tagged = - UPB_PRIVATE(_upb_TaggedMessagePtr_Pack)(msg, is_empty); - memcpy(target, &tagged, sizeof(tagged)); - return msg; -} - -static upb_Message* _upb_Decoder_NewSubMessage( - upb_Decoder* d, const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* field, upb_TaggedMessagePtr* target) { - const upb_MiniTable* subl = _upb_MiniTableSubs_MessageByField(subs, field); - return _upb_Decoder_NewSubMessage2(d, subl, field, target); -} - -static upb_Message* _upb_Decoder_ReuseSubMessage( - upb_Decoder* d, const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* field, upb_TaggedMessagePtr* target) { - upb_TaggedMessagePtr tagged = *target; - const upb_MiniTable* subl = _upb_MiniTableSubs_MessageByField(subs, field); - UPB_ASSERT(subl); - if (!upb_TaggedMessagePtr_IsEmpty(tagged) || - UPB_PRIVATE(_upb_MiniTable_IsEmpty)(subl)) { - return UPB_PRIVATE(_upb_TaggedMessagePtr_GetMessage)(tagged); - } - - // We found an empty message from a previous parse that was performed before - // this field was linked. But it is linked now, so we want to allocate a new - // message of the correct type and promote data into it before continuing. - upb_Message* existing = - UPB_PRIVATE(_upb_TaggedMessagePtr_GetEmptyMessage)(tagged); - upb_Message* promoted = _upb_Decoder_NewSubMessage(d, subs, field, target); - uintptr_t iter = kUpb_Message_UnknownBegin; - upb_StringView unknown; - while (upb_Message_NextUnknown(existing, &unknown, &iter)) { - upb_DecodeStatus status = - upb_Decode(unknown.data, unknown.size, promoted, subl, d->extreg, - d->options, &d->arena); - if (status != kUpb_DecodeStatus_Ok) _upb_Decoder_ErrorJmp(d, status); - } - return promoted; -} - -static const char* _upb_Decoder_ReadString(upb_Decoder* d, const char* ptr, - int size, upb_StringView* str) { - const char* str_ptr = ptr; - ptr = upb_EpsCopyInputStream_ReadString(&d->input, &str_ptr, size, &d->arena); - if (!ptr) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - str->data = str_ptr; - str->size = size; - return ptr; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_RecurseSubMessage(upb_Decoder* d, const char* ptr, - upb_Message* submsg, - const upb_MiniTable* subl, - uint32_t expected_end_group) { - if (--d->depth < 0) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_MaxDepthExceeded); - } - ptr = _upb_Decoder_DecodeMessage(d, ptr, submsg, subl); - d->depth++; - if (d->end_group != expected_end_group) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - } - return ptr; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeSubMessage(upb_Decoder* d, const char* ptr, - upb_Message* submsg, - const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* field, - int size) { - int saved_delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, size); - const upb_MiniTable* subl = _upb_MiniTableSubs_MessageByField(subs, field); - UPB_ASSERT(subl); - ptr = _upb_Decoder_RecurseSubMessage(d, ptr, submsg, subl, DECODE_NOGROUP); - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_delta); - return ptr; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeGroup(upb_Decoder* d, const char* ptr, - upb_Message* submsg, - const upb_MiniTable* subl, - uint32_t number) { - if (_upb_Decoder_IsDone(d, &ptr)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - } - ptr = _upb_Decoder_RecurseSubMessage(d, ptr, submsg, subl, number); - d->end_group = DECODE_NOGROUP; - return ptr; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeUnknownGroup(upb_Decoder* d, const char* ptr, - uint32_t number) { - return _upb_Decoder_DecodeGroup(d, ptr, NULL, NULL, number); -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeKnownGroup(upb_Decoder* d, const char* ptr, - upb_Message* submsg, - const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* field) { - const upb_MiniTable* subl = _upb_MiniTableSubs_MessageByField(subs, field); - UPB_ASSERT(subl); - return _upb_Decoder_DecodeGroup(d, ptr, submsg, subl, - field->UPB_PRIVATE(number)); -} - -#define kUpb_Decoder_EncodeVarint32MaxSize 5 -static char* upb_Decoder_EncodeVarint32(uint32_t val, char* ptr) { - do { - uint8_t byte = val & 0x7fU; - val >>= 7; - if (val) byte |= 0x80U; - *(ptr++) = byte; - } while (val); - return ptr; -} - -UPB_FORCEINLINE -bool _upb_Decoder_CheckEnum(upb_Decoder* d, const char* ptr, upb_Message* msg, - const upb_MiniTableEnum* e, - const upb_MiniTableField* field, wireval* val) { - const uint32_t v = val->uint32_val; - - if (UPB_LIKELY(upb_MiniTableEnum_CheckValue(e, v))) return true; - - // Unrecognized enum goes into unknown fields. - // For packed fields the tag could be arbitrarily far in the past, - // so we just re-encode the tag and value here. - const uint32_t tag = - ((uint32_t)field->UPB_PRIVATE(number) << 3) | kUpb_WireType_Varint; - upb_Message* unknown_msg = - field->UPB_PRIVATE(mode) & kUpb_LabelFlags_IsExtension ? d->original_msg - : msg; - char buf[2 * kUpb_Decoder_EncodeVarint32MaxSize]; - char* end = buf; - end = upb_Decoder_EncodeVarint32(tag, end); - end = upb_Decoder_EncodeVarint32(v, end); - - if (!UPB_PRIVATE(_upb_Message_AddUnknown)(unknown_msg, buf, end - buf, - &d->arena, false)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - return false; -} - -UPB_NOINLINE -static const char* _upb_Decoder_DecodeEnumArray( - upb_Decoder* d, const char* ptr, upb_Message* msg, upb_Array* arr, - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field, - wireval* val) { - const upb_MiniTableEnum* e = _upb_MiniTableSubs_EnumByField(subs, field); - if (!_upb_Decoder_CheckEnum(d, ptr, msg, e, field, val)) return ptr; - void* mem = UPB_PTR_AT(upb_Array_MutableDataPtr(arr), - arr->UPB_PRIVATE(size) * 4, void); - arr->UPB_PRIVATE(size)++; - memcpy(mem, val, 4); - return ptr; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeFixedPacked(upb_Decoder* d, const char* ptr, - upb_Array* arr, wireval* val, - const upb_MiniTableField* field, - int lg2) { - int mask = (1 << lg2) - 1; - size_t count = val->size >> lg2; - if ((val->size & mask) != 0) { - // Length isn't a round multiple of elem size. - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - } - _upb_Decoder_Reserve(d, arr, count); - void* mem = UPB_PTR_AT(upb_Array_MutableDataPtr(arr), - arr->UPB_PRIVATE(size) << lg2, void); - arr->UPB_PRIVATE(size) += count; - // Note: if/when the decoder supports multi-buffer input, we will need to - // handle buffer seams here. - if (upb_IsLittleEndian()) { - ptr = upb_EpsCopyInputStream_Copy(&d->input, ptr, mem, val->size); - } else { - int delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size); - char* dst = mem; - while (!_upb_Decoder_IsDone(d, &ptr)) { - if (lg2 == 2) { - ptr = upb_WireReader_ReadFixed32(ptr, dst); - dst += 4; - } else { - UPB_ASSERT(lg2 == 3); - ptr = upb_WireReader_ReadFixed64(ptr, dst); - dst += 8; - } - } - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, delta); - } - - return ptr; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeVarintPacked(upb_Decoder* d, const char* ptr, - upb_Array* arr, wireval* val, - const upb_MiniTableField* field, - int lg2) { - int scale = 1 << lg2; - int saved_limit = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size); - char* out = UPB_PTR_AT(upb_Array_MutableDataPtr(arr), - arr->UPB_PRIVATE(size) << lg2, void); - while (!_upb_Decoder_IsDone(d, &ptr)) { - wireval elem; - ptr = _upb_Decoder_DecodeVarint(d, ptr, &elem.uint64_val); - _upb_Decoder_Munge(field->UPB_PRIVATE(descriptortype), &elem); - if (_upb_Decoder_Reserve(d, arr, 1)) { - out = UPB_PTR_AT(upb_Array_MutableDataPtr(arr), - arr->UPB_PRIVATE(size) << lg2, void); - } - arr->UPB_PRIVATE(size)++; - memcpy(out, &elem, scale); - out += scale; - } - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_limit); - return ptr; -} - -UPB_NOINLINE -static const char* _upb_Decoder_DecodeEnumPacked( - upb_Decoder* d, const char* ptr, upb_Message* msg, upb_Array* arr, - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field, - wireval* val) { - const upb_MiniTableEnum* e = _upb_MiniTableSubs_EnumByField(subs, field); - int saved_limit = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size); - char* out = UPB_PTR_AT(upb_Array_MutableDataPtr(arr), - arr->UPB_PRIVATE(size) * 4, void); - while (!_upb_Decoder_IsDone(d, &ptr)) { - wireval elem; - ptr = _upb_Decoder_DecodeVarint(d, ptr, &elem.uint64_val); - _upb_Decoder_MungeInt32(&elem); - if (!_upb_Decoder_CheckEnum(d, ptr, msg, e, field, &elem)) { - continue; - } - if (_upb_Decoder_Reserve(d, arr, 1)) { - out = UPB_PTR_AT(upb_Array_MutableDataPtr(arr), - arr->UPB_PRIVATE(size) * 4, void); - } - arr->UPB_PRIVATE(size)++; - memcpy(out, &elem, 4); - out += 4; - } - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, saved_limit); - return ptr; -} - -static upb_Array* _upb_Decoder_CreateArray(upb_Decoder* d, - const upb_MiniTableField* field) { - const upb_FieldType field_type = field->UPB_PRIVATE(descriptortype); - const size_t lg2 = UPB_PRIVATE(_upb_FieldType_SizeLg2)(field_type); - upb_Array* ret = UPB_PRIVATE(_upb_Array_New)(&d->arena, 4, lg2); - if (!ret) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - return ret; -} - -static const char* _upb_Decoder_DecodeToArray( - upb_Decoder* d, const char* ptr, upb_Message* msg, - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field, - wireval* val, int op) { - upb_Array** arrp = UPB_PTR_AT(msg, field->UPB_PRIVATE(offset), void); - upb_Array* arr = *arrp; - void* mem; - - if (arr) { - _upb_Decoder_Reserve(d, arr, 1); - } else { - arr = _upb_Decoder_CreateArray(d, field); - *arrp = arr; - } - - switch (op) { - case kUpb_DecodeOp_Scalar1Byte: - case kUpb_DecodeOp_Scalar4Byte: - case kUpb_DecodeOp_Scalar8Byte: - /* Append scalar value. */ - mem = UPB_PTR_AT(upb_Array_MutableDataPtr(arr), - arr->UPB_PRIVATE(size) << op, void); - arr->UPB_PRIVATE(size)++; - memcpy(mem, val, 1 << op); - return ptr; - case kUpb_DecodeOp_String: - _upb_Decoder_VerifyUtf8(d, ptr, val->size); - /* Fallthrough. */ - case kUpb_DecodeOp_Bytes: { - /* Append bytes. */ - upb_StringView* str = (upb_StringView*)upb_Array_MutableDataPtr(arr) + - arr->UPB_PRIVATE(size); - arr->UPB_PRIVATE(size)++; - return _upb_Decoder_ReadString(d, ptr, val->size, str); - } - case kUpb_DecodeOp_SubMessage: { - /* Append submessage / group. */ - upb_TaggedMessagePtr* target = UPB_PTR_AT( - upb_Array_MutableDataPtr(arr), arr->UPB_PRIVATE(size) * sizeof(void*), - upb_TaggedMessagePtr); - upb_Message* submsg = _upb_Decoder_NewSubMessage(d, subs, field, target); - arr->UPB_PRIVATE(size)++; - if (UPB_UNLIKELY(field->UPB_PRIVATE(descriptortype) == - kUpb_FieldType_Group)) { - return _upb_Decoder_DecodeKnownGroup(d, ptr, submsg, subs, field); - } else { - return _upb_Decoder_DecodeSubMessage(d, ptr, submsg, subs, field, - val->size); - } - } - case OP_FIXPCK_LG2(2): - case OP_FIXPCK_LG2(3): - return _upb_Decoder_DecodeFixedPacked(d, ptr, arr, val, field, - op - OP_FIXPCK_LG2(0)); - case OP_VARPCK_LG2(0): - case OP_VARPCK_LG2(2): - case OP_VARPCK_LG2(3): - return _upb_Decoder_DecodeVarintPacked(d, ptr, arr, val, field, - op - OP_VARPCK_LG2(0)); - case kUpb_DecodeOp_Enum: - return _upb_Decoder_DecodeEnumArray(d, ptr, msg, arr, subs, field, val); - case kUpb_DecodeOp_PackedEnum: - return _upb_Decoder_DecodeEnumPacked(d, ptr, msg, arr, subs, field, val); - default: - UPB_UNREACHABLE(); - } -} - -static upb_Map* _upb_Decoder_CreateMap(upb_Decoder* d, - const upb_MiniTable* entry) { - // Maps descriptor type -> upb map size - static const uint8_t kSizeInMap[] = { - [0] = -1, // invalid descriptor type - [kUpb_FieldType_Double] = 8, - [kUpb_FieldType_Float] = 4, - [kUpb_FieldType_Int64] = 8, - [kUpb_FieldType_UInt64] = 8, - [kUpb_FieldType_Int32] = 4, - [kUpb_FieldType_Fixed64] = 8, - [kUpb_FieldType_Fixed32] = 4, - [kUpb_FieldType_Bool] = 1, - [kUpb_FieldType_String] = UPB_MAPTYPE_STRING, - [kUpb_FieldType_Group] = sizeof(void*), - [kUpb_FieldType_Message] = sizeof(void*), - [kUpb_FieldType_Bytes] = UPB_MAPTYPE_STRING, - [kUpb_FieldType_UInt32] = 4, - [kUpb_FieldType_Enum] = 4, - [kUpb_FieldType_SFixed32] = 4, - [kUpb_FieldType_SFixed64] = 8, - [kUpb_FieldType_SInt32] = 4, - [kUpb_FieldType_SInt64] = 8, - }; - - const upb_MiniTableField* key_field = &entry->UPB_PRIVATE(fields)[0]; - const upb_MiniTableField* val_field = &entry->UPB_PRIVATE(fields)[1]; - char key_size = kSizeInMap[key_field->UPB_PRIVATE(descriptortype)]; - char val_size = kSizeInMap[val_field->UPB_PRIVATE(descriptortype)]; - UPB_ASSERT(key_field->UPB_PRIVATE(offset) == offsetof(upb_MapEntry, k)); - UPB_ASSERT(val_field->UPB_PRIVATE(offset) == offsetof(upb_MapEntry, v)); - upb_Map* ret = _upb_Map_New(&d->arena, key_size, val_size); - if (!ret) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - return ret; -} - -UPB_NOINLINE static void _upb_Decoder_AddMapEntryUnknown( - upb_Decoder* d, upb_Message* msg, const upb_MiniTableField* field, - upb_Message* ent_msg, const upb_MiniTable* entry) { - char* buf; - size_t size; - upb_EncodeStatus status = - upb_Encode(ent_msg, entry, 0, &d->arena, &buf, &size); - if (status != kUpb_EncodeStatus_Ok) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - char delim_buf[2 * kUpb_Decoder_EncodeVarint32MaxSize]; - char* delim_end = delim_buf; - uint32_t tag = - ((uint32_t)field->UPB_PRIVATE(number) << 3) | kUpb_WireType_Delimited; - delim_end = upb_Decoder_EncodeVarint32(tag, delim_end); - delim_end = upb_Decoder_EncodeVarint32(size, delim_end); - upb_StringView unknown[] = { - {delim_buf, delim_end - delim_buf}, - {buf, size}, - }; - - if (!UPB_PRIVATE(_upb_Message_AddUnknownV)(msg, &d->arena, unknown, 2)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } -} - -static const char* _upb_Decoder_DecodeToMap( - upb_Decoder* d, const char* ptr, upb_Message* msg, - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field, - wireval* val) { - upb_Map** map_p = UPB_PTR_AT(msg, field->UPB_PRIVATE(offset), upb_Map*); - upb_Map* map = *map_p; - upb_MapEntry ent; - UPB_ASSERT(upb_MiniTableField_Type(field) == kUpb_FieldType_Message); - const upb_MiniTable* entry = _upb_MiniTableSubs_MessageByField(subs, field); - - UPB_ASSERT(entry); - UPB_ASSERT(entry->UPB_PRIVATE(field_count) == 2); - UPB_ASSERT(upb_MiniTableField_IsScalar(&entry->UPB_PRIVATE(fields)[0])); - UPB_ASSERT(upb_MiniTableField_IsScalar(&entry->UPB_PRIVATE(fields)[1])); - - if (!map) { - map = _upb_Decoder_CreateMap(d, entry); - *map_p = map; - } - - // Parse map entry. - memset(&ent, 0, sizeof(ent)); - - if (entry->UPB_PRIVATE(fields)[1].UPB_PRIVATE(descriptortype) == - kUpb_FieldType_Message || - entry->UPB_PRIVATE(fields)[1].UPB_PRIVATE(descriptortype) == - kUpb_FieldType_Group) { - // Create proactively to handle the case where it doesn't appear. - upb_TaggedMessagePtr msg; - _upb_Decoder_NewSubMessage(d, entry->UPB_PRIVATE(subs), - &entry->UPB_PRIVATE(fields)[1], &msg); - ent.v.val = upb_value_uintptr(msg); - } - - ptr = _upb_Decoder_DecodeSubMessage(d, ptr, &ent.message, subs, field, - val->size); - if (upb_Message_HasUnknown(&ent.message)) { - _upb_Decoder_AddMapEntryUnknown(d, msg, field, &ent.message, entry); - } else { - if (_upb_Map_Insert(map, &ent.k, map->key_size, &ent.v, map->val_size, - &d->arena) == kUpb_MapInsertStatus_OutOfMemory) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - } - return ptr; -} - -static const char* _upb_Decoder_DecodeToSubMessage( - upb_Decoder* d, const char* ptr, upb_Message* msg, - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field, - wireval* val, int op) { - void* mem = UPB_PTR_AT(msg, field->UPB_PRIVATE(offset), void); - int type = field->UPB_PRIVATE(descriptortype); - - if (UPB_UNLIKELY(op == kUpb_DecodeOp_Enum) && - !_upb_Decoder_CheckEnum(d, ptr, msg, - _upb_MiniTableSubs_EnumByField(subs, field), - field, val)) { - return ptr; - } - - // Set presence if necessary. - if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(field)) { - UPB_PRIVATE(_upb_Message_SetHasbit)(msg, field); - } else if (upb_MiniTableField_IsInOneof(field)) { - // Oneof case - uint32_t* oneof_case = UPB_PRIVATE(_upb_Message_OneofCasePtr)(msg, field); - if (op == kUpb_DecodeOp_SubMessage && - *oneof_case != field->UPB_PRIVATE(number)) { - memset(mem, 0, sizeof(void*)); - } - *oneof_case = field->UPB_PRIVATE(number); - } - - // Store into message. - switch (op) { - case kUpb_DecodeOp_SubMessage: { - upb_TaggedMessagePtr* submsgp = mem; - upb_Message* submsg; - if (*submsgp) { - submsg = _upb_Decoder_ReuseSubMessage(d, subs, field, submsgp); - } else { - submsg = _upb_Decoder_NewSubMessage(d, subs, field, submsgp); - } - if (UPB_UNLIKELY(type == kUpb_FieldType_Group)) { - ptr = _upb_Decoder_DecodeKnownGroup(d, ptr, submsg, subs, field); - } else { - ptr = _upb_Decoder_DecodeSubMessage(d, ptr, submsg, subs, field, - val->size); - } - break; - } - case kUpb_DecodeOp_String: - _upb_Decoder_VerifyUtf8(d, ptr, val->size); - /* Fallthrough. */ - case kUpb_DecodeOp_Bytes: - return _upb_Decoder_ReadString(d, ptr, val->size, mem); - case kUpb_DecodeOp_Scalar8Byte: - memcpy(mem, val, 8); - break; - case kUpb_DecodeOp_Enum: - case kUpb_DecodeOp_Scalar4Byte: - memcpy(mem, val, 4); - break; - case kUpb_DecodeOp_Scalar1Byte: - memcpy(mem, val, 1); - break; - default: - UPB_UNREACHABLE(); - } - - return ptr; -} - -UPB_NOINLINE -const char* _upb_Decoder_CheckRequired(upb_Decoder* d, const char* ptr, - const upb_Message* msg, - const upb_MiniTable* m) { - UPB_ASSERT(m->UPB_PRIVATE(required_count)); - if (UPB_UNLIKELY(d->options & kUpb_DecodeOption_CheckRequired)) { - d->missing_required = - !UPB_PRIVATE(_upb_Message_IsInitializedShallow)(msg, m); - } - return ptr; -} - -UPB_FORCEINLINE -bool _upb_Decoder_TryFastDispatch(upb_Decoder* d, const char** ptr, - upb_Message* msg, const upb_MiniTable* m) { -#if UPB_FASTTABLE - if (m && m->UPB_PRIVATE(table_mask) != (unsigned char)-1) { - uint16_t tag = _upb_FastDecoder_LoadTag(*ptr); - intptr_t table = decode_totable(m); - *ptr = _upb_FastDecoder_TagDispatch(d, *ptr, msg, table, 0, tag); - return true; - } -#endif - return false; -} - -static const char* upb_Decoder_SkipField(upb_Decoder* d, const char* ptr, - uint32_t tag) { - int field_number = tag >> 3; - int wire_type = tag & 7; - switch (wire_type) { - case kUpb_WireType_Varint: { - uint64_t val; - return _upb_Decoder_DecodeVarint(d, ptr, &val); - } - case kUpb_WireType_64Bit: - return ptr + 8; - case kUpb_WireType_32Bit: - return ptr + 4; - case kUpb_WireType_Delimited: { - uint32_t size; - ptr = upb_Decoder_DecodeSize(d, ptr, &size); - return ptr + size; - } - case kUpb_WireType_StartGroup: - return _upb_Decoder_DecodeUnknownGroup(d, ptr, field_number); - default: - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - } -} - -enum { - kStartItemTag = ((kUpb_MsgSet_Item << 3) | kUpb_WireType_StartGroup), - kEndItemTag = ((kUpb_MsgSet_Item << 3) | kUpb_WireType_EndGroup), - kTypeIdTag = ((kUpb_MsgSet_TypeId << 3) | kUpb_WireType_Varint), - kMessageTag = ((kUpb_MsgSet_Message << 3) | kUpb_WireType_Delimited), -}; - -static void upb_Decoder_AddKnownMessageSetItem( - upb_Decoder* d, upb_Message* msg, const upb_MiniTableExtension* item_mt, - const char* data, uint32_t size) { - upb_Extension* ext = - UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(msg, item_mt, &d->arena); - if (UPB_UNLIKELY(!ext)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - upb_Message* submsg = _upb_Decoder_NewSubMessage2( - d, ext->ext->UPB_PRIVATE(sub).UPB_PRIVATE(submsg), - &ext->ext->UPB_PRIVATE(field), &ext->data.tagged_msg_val); - upb_DecodeStatus status = upb_Decode( - data, size, submsg, upb_MiniTableExtension_GetSubMessage(item_mt), - d->extreg, d->options, &d->arena); - if (status != kUpb_DecodeStatus_Ok) _upb_Decoder_ErrorJmp(d, status); -} - -static void upb_Decoder_AddUnknownMessageSetItem(upb_Decoder* d, - upb_Message* msg, - uint32_t type_id, - const char* message_data, - uint32_t message_size) { - char buf[6 * kUpb_Decoder_EncodeVarint32MaxSize]; - char* ptr = buf; - ptr = upb_Decoder_EncodeVarint32(kStartItemTag, ptr); - ptr = upb_Decoder_EncodeVarint32(kTypeIdTag, ptr); - ptr = upb_Decoder_EncodeVarint32(type_id, ptr); - ptr = upb_Decoder_EncodeVarint32(kMessageTag, ptr); - ptr = upb_Decoder_EncodeVarint32(message_size, ptr); - char* split = ptr; - - ptr = upb_Decoder_EncodeVarint32(kEndItemTag, ptr); - char* end = ptr; - upb_StringView unknown[] = { - {buf, split - buf}, - {message_data, message_size}, - {split, end - split}, - }; - if (!UPB_PRIVATE(_upb_Message_AddUnknownV)(msg, &d->arena, unknown, 3)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } -} - -static void upb_Decoder_AddMessageSetItem(upb_Decoder* d, upb_Message* msg, - const upb_MiniTable* t, - uint32_t type_id, const char* data, - uint32_t size) { - const upb_MiniTableExtension* item_mt = - upb_ExtensionRegistry_Lookup(d->extreg, t, type_id); - if (item_mt) { - upb_Decoder_AddKnownMessageSetItem(d, msg, item_mt, data, size); - } else { - upb_Decoder_AddUnknownMessageSetItem(d, msg, type_id, data, size); - } -} - -static const char* upb_Decoder_DecodeMessageSetItem( - upb_Decoder* d, const char* ptr, upb_Message* msg, - const upb_MiniTable* layout) { - uint32_t type_id = 0; - upb_StringView preserved = {NULL, 0}; - typedef enum { - kUpb_HaveId = 1 << 0, - kUpb_HavePayload = 1 << 1, - } StateMask; - StateMask state_mask = 0; - while (!_upb_Decoder_IsDone(d, &ptr)) { - uint32_t tag; - ptr = _upb_Decoder_DecodeTag(d, ptr, &tag); - switch (tag) { - case kEndItemTag: - return ptr; - case kTypeIdTag: { - uint64_t tmp; - ptr = _upb_Decoder_DecodeVarint(d, ptr, &tmp); - if (state_mask & kUpb_HaveId) break; // Ignore dup. - state_mask |= kUpb_HaveId; - type_id = tmp; - if (state_mask & kUpb_HavePayload) { - upb_Decoder_AddMessageSetItem(d, msg, layout, type_id, preserved.data, - preserved.size); - } - break; - } - case kMessageTag: { - uint32_t size; - ptr = upb_Decoder_DecodeSize(d, ptr, &size); - const char* data = ptr; - ptr += size; - if (state_mask & kUpb_HavePayload) break; // Ignore dup. - state_mask |= kUpb_HavePayload; - if (state_mask & kUpb_HaveId) { - upb_Decoder_AddMessageSetItem(d, msg, layout, type_id, data, size); - } else { - // Out of order, we must preserve the payload. - preserved.data = data; - preserved.size = size; - } - break; - } - default: - // We do not preserve unexpected fields inside a message set item. - ptr = upb_Decoder_SkipField(d, ptr, tag); - break; - } - } - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); -} - -static upb_MiniTableField upb_Decoder_FieldNotFoundField = { - 0, 0, 0, 0, kUpb_FakeFieldType_FieldNotFound, 0}; - -UPB_NOINLINE const upb_MiniTableField* _upb_Decoder_FindExtensionField( - upb_Decoder* d, const upb_MiniTable* t, uint32_t field_number, int ext_mode, - int wire_type) { - // Treat a message set as an extendable message if it is a delimited field. - // This provides compatibility with encoders that are unaware of message - // sets and serialize them as normal extensions. - if (ext_mode == kUpb_ExtMode_Extendable || - (ext_mode == kUpb_ExtMode_IsMessageSet && - wire_type == kUpb_WireType_Delimited)) { - const upb_MiniTableExtension* ext = - upb_ExtensionRegistry_Lookup(d->extreg, t, field_number); - if (ext) return &ext->UPB_PRIVATE(field); - } else if (ext_mode == kUpb_ExtMode_IsMessageSet) { - if (field_number == kUpb_MsgSet_Item) { - static upb_MiniTableField item = { - 0, 0, 0, 0, kUpb_FakeFieldType_MessageSetItem, 0}; - return &item; - } - } - return &upb_Decoder_FieldNotFoundField; -} - -static const upb_MiniTableField* _upb_Decoder_FindField( - upb_Decoder* d, const upb_MiniTable* t, uint32_t field_number, - uint32_t* last_field_index, int wire_type) { - if (t == NULL) return &upb_Decoder_FieldNotFoundField; - - uint32_t idx = ((uint32_t)field_number) - 1; // 0 wraps to UINT32_MAX - if (idx < t->UPB_PRIVATE(dense_below)) { - // Fastest case: index into dense fields, and don't update last_field_index. - return &t->UPB_PRIVATE(fields)[idx]; - } - - uint32_t field_count = t->UPB_PRIVATE(field_count); - if (t->UPB_PRIVATE(dense_below) < field_count) { - // Linear search non-dense fields. Resume scanning from last_field_index - // since fields are usually in order. - idx = *last_field_index; - uint32_t candidate; - do { - candidate = t->UPB_PRIVATE(fields)[idx].UPB_PRIVATE(number); - if (candidate == field_number) { - goto found; - } - } while (++idx < field_count); - - if (UPB_LIKELY(field_number > candidate)) { - // The field number we encountered is larger than any of our known fields, - // so it's likely that subsequent ones will be too. - *last_field_index = idx - 1; - } else { - // Fields not in tag order - scan from beginning - for (idx = t->UPB_PRIVATE(dense_below); idx < *last_field_index; idx++) { - if (t->UPB_PRIVATE(fields)[idx].UPB_PRIVATE(number) == field_number) { - goto found; - } - } - } - } - - if (d->extreg && t->UPB_PRIVATE(ext)) { - return _upb_Decoder_FindExtensionField(d, t, field_number, - t->UPB_PRIVATE(ext), wire_type); - } - - return &upb_Decoder_FieldNotFoundField; // Unknown field. - -found: - UPB_ASSERT(t->UPB_PRIVATE(fields)[idx].UPB_PRIVATE(number) == field_number); - *last_field_index = idx; - return &t->UPB_PRIVATE(fields)[idx]; -} - -static int _upb_Decoder_GetVarintOp(const upb_MiniTableField* field) { - static const int8_t kVarintOps[] = { - [kUpb_FakeFieldType_FieldNotFound] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Double] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Float] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Int64] = kUpb_DecodeOp_Scalar8Byte, - [kUpb_FieldType_UInt64] = kUpb_DecodeOp_Scalar8Byte, - [kUpb_FieldType_Int32] = kUpb_DecodeOp_Scalar4Byte, - [kUpb_FieldType_Fixed64] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Fixed32] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Bool] = kUpb_DecodeOp_Scalar1Byte, - [kUpb_FieldType_String] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Group] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Message] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Bytes] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_UInt32] = kUpb_DecodeOp_Scalar4Byte, - [kUpb_FieldType_Enum] = kUpb_DecodeOp_Enum, - [kUpb_FieldType_SFixed32] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_SFixed64] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_SInt32] = kUpb_DecodeOp_Scalar4Byte, - [kUpb_FieldType_SInt64] = kUpb_DecodeOp_Scalar8Byte, - [kUpb_FakeFieldType_MessageSetItem] = kUpb_DecodeOp_UnknownField, - }; - - return kVarintOps[field->UPB_PRIVATE(descriptortype)]; -} - -UPB_FORCEINLINE -void _upb_Decoder_CheckUnlinked(upb_Decoder* d, const upb_MiniTable* mt, - const upb_MiniTableField* field, int* op) { - // If sub-message is not linked, treat as unknown. - if (field->UPB_PRIVATE(mode) & kUpb_LabelFlags_IsExtension) return; - const upb_MiniTable* mt_sub = - _upb_MiniTableSubs_MessageByField(mt->UPB_PRIVATE(subs), field); - if ((d->options & kUpb_DecodeOption_ExperimentalAllowUnlinked) || - !UPB_PRIVATE(_upb_MiniTable_IsEmpty)(mt_sub)) { - return; - } -#ifndef NDEBUG - const upb_MiniTableField* oneof = upb_MiniTable_GetOneof(mt, field); - if (oneof) { - // All other members of the oneof must be message fields that are also - // unlinked. - do { - UPB_ASSERT(upb_MiniTableField_CType(oneof) == kUpb_CType_Message); - const upb_MiniTable* oneof_sub = - *mt->UPB_PRIVATE(subs)[oneof->UPB_PRIVATE(submsg_index)].UPB_PRIVATE( - submsg); - UPB_ASSERT(!oneof_sub); - } while (upb_MiniTable_NextOneofField(mt, &oneof)); - } -#endif // NDEBUG - *op = kUpb_DecodeOp_UnknownField; -} - -UPB_FORCEINLINE -void _upb_Decoder_MaybeVerifyUtf8(upb_Decoder* d, - const upb_MiniTableField* field, int* op) { - if ((field->UPB_ONLYBITS(mode) & kUpb_LabelFlags_IsAlternate) && - UPB_UNLIKELY(d->options & kUpb_DecodeOption_AlwaysValidateUtf8)) - *op = kUpb_DecodeOp_String; -} - -static int _upb_Decoder_GetDelimitedOp(upb_Decoder* d, const upb_MiniTable* mt, - const upb_MiniTableField* field) { - enum { kRepeatedBase = 19 }; - - static const int8_t kDelimitedOps[] = { - // For non-repeated field type. - [kUpb_FakeFieldType_FieldNotFound] = - kUpb_DecodeOp_UnknownField, // Field not found. - [kUpb_FieldType_Double] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Float] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Int64] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_UInt64] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Int32] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Fixed64] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Fixed32] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Bool] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_String] = kUpb_DecodeOp_String, - [kUpb_FieldType_Group] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Message] = kUpb_DecodeOp_SubMessage, - [kUpb_FieldType_Bytes] = kUpb_DecodeOp_Bytes, - [kUpb_FieldType_UInt32] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_Enum] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_SFixed32] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_SFixed64] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_SInt32] = kUpb_DecodeOp_UnknownField, - [kUpb_FieldType_SInt64] = kUpb_DecodeOp_UnknownField, - [kUpb_FakeFieldType_MessageSetItem] = kUpb_DecodeOp_SubMessage, - // For repeated field type. - [kRepeatedBase + kUpb_FieldType_Double] = OP_FIXPCK_LG2(3), - [kRepeatedBase + kUpb_FieldType_Float] = OP_FIXPCK_LG2(2), - [kRepeatedBase + kUpb_FieldType_Int64] = OP_VARPCK_LG2(3), - [kRepeatedBase + kUpb_FieldType_UInt64] = OP_VARPCK_LG2(3), - [kRepeatedBase + kUpb_FieldType_Int32] = OP_VARPCK_LG2(2), - [kRepeatedBase + kUpb_FieldType_Fixed64] = OP_FIXPCK_LG2(3), - [kRepeatedBase + kUpb_FieldType_Fixed32] = OP_FIXPCK_LG2(2), - [kRepeatedBase + kUpb_FieldType_Bool] = OP_VARPCK_LG2(0), - [kRepeatedBase + kUpb_FieldType_String] = kUpb_DecodeOp_String, - [kRepeatedBase + kUpb_FieldType_Group] = kUpb_DecodeOp_SubMessage, - [kRepeatedBase + kUpb_FieldType_Message] = kUpb_DecodeOp_SubMessage, - [kRepeatedBase + kUpb_FieldType_Bytes] = kUpb_DecodeOp_Bytes, - [kRepeatedBase + kUpb_FieldType_UInt32] = OP_VARPCK_LG2(2), - [kRepeatedBase + kUpb_FieldType_Enum] = kUpb_DecodeOp_PackedEnum, - [kRepeatedBase + kUpb_FieldType_SFixed32] = OP_FIXPCK_LG2(2), - [kRepeatedBase + kUpb_FieldType_SFixed64] = OP_FIXPCK_LG2(3), - [kRepeatedBase + kUpb_FieldType_SInt32] = OP_VARPCK_LG2(2), - [kRepeatedBase + kUpb_FieldType_SInt64] = OP_VARPCK_LG2(3), - // Omitting kUpb_FakeFieldType_MessageSetItem, because we never emit a - // repeated msgset type - }; - - int ndx = field->UPB_PRIVATE(descriptortype); - if (upb_MiniTableField_IsArray(field)) ndx += kRepeatedBase; - int op = kDelimitedOps[ndx]; - - if (op == kUpb_DecodeOp_SubMessage) { - _upb_Decoder_CheckUnlinked(d, mt, field, &op); - } else if (op == kUpb_DecodeOp_Bytes) { - _upb_Decoder_MaybeVerifyUtf8(d, field, &op); - } - - return op; -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeWireValue(upb_Decoder* d, const char* ptr, - const upb_MiniTable* mt, - const upb_MiniTableField* field, - int wire_type, wireval* val, int* op) { - static const unsigned kFixed32OkMask = (1 << kUpb_FieldType_Float) | - (1 << kUpb_FieldType_Fixed32) | - (1 << kUpb_FieldType_SFixed32); - - static const unsigned kFixed64OkMask = (1 << kUpb_FieldType_Double) | - (1 << kUpb_FieldType_Fixed64) | - (1 << kUpb_FieldType_SFixed64); - - switch (wire_type) { - case kUpb_WireType_Varint: - ptr = _upb_Decoder_DecodeVarint(d, ptr, &val->uint64_val); - *op = _upb_Decoder_GetVarintOp(field); - _upb_Decoder_Munge(field->UPB_PRIVATE(descriptortype), val); - return ptr; - case kUpb_WireType_32Bit: - *op = kUpb_DecodeOp_Scalar4Byte; - if (((1 << field->UPB_PRIVATE(descriptortype)) & kFixed32OkMask) == 0) { - *op = kUpb_DecodeOp_UnknownField; - } - return upb_WireReader_ReadFixed32(ptr, &val->uint32_val); - case kUpb_WireType_64Bit: - *op = kUpb_DecodeOp_Scalar8Byte; - if (((1 << field->UPB_PRIVATE(descriptortype)) & kFixed64OkMask) == 0) { - *op = kUpb_DecodeOp_UnknownField; - } - return upb_WireReader_ReadFixed64(ptr, &val->uint64_val); - case kUpb_WireType_Delimited: - ptr = upb_Decoder_DecodeSize(d, ptr, &val->size); - *op = _upb_Decoder_GetDelimitedOp(d, mt, field); - return ptr; - case kUpb_WireType_StartGroup: - val->uint32_val = field->UPB_PRIVATE(number); - if (field->UPB_PRIVATE(descriptortype) == kUpb_FieldType_Group) { - *op = kUpb_DecodeOp_SubMessage; - _upb_Decoder_CheckUnlinked(d, mt, field, op); - } else if (field->UPB_PRIVATE(descriptortype) == - kUpb_FakeFieldType_MessageSetItem) { - *op = kUpb_DecodeOp_MessageSetItem; - } else { - *op = kUpb_DecodeOp_UnknownField; - } - return ptr; - default: - break; - } - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); -} - -UPB_FORCEINLINE -const char* _upb_Decoder_DecodeKnownField(upb_Decoder* d, const char* ptr, - upb_Message* msg, - const upb_MiniTable* layout, - const upb_MiniTableField* field, - int op, wireval* val) { - const upb_MiniTableSubInternal* subs = layout->UPB_PRIVATE(subs); - uint8_t mode = field->UPB_PRIVATE(mode); - upb_MiniTableSubInternal ext_sub; - - if (UPB_UNLIKELY(mode & kUpb_LabelFlags_IsExtension)) { - const upb_MiniTableExtension* ext_layout = - (const upb_MiniTableExtension*)field; - upb_Extension* ext = UPB_PRIVATE(_upb_Message_GetOrCreateExtension)( - msg, ext_layout, &d->arena); - if (UPB_UNLIKELY(!ext)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - d->original_msg = msg; - msg = &ext->data.UPB_PRIVATE(ext_msg_val); - if (upb_MiniTableField_IsSubMessage(&ext->ext->UPB_PRIVATE(field))) { - ext_sub.UPB_PRIVATE(submsg) = - &ext->ext->UPB_PRIVATE(sub).UPB_PRIVATE(submsg); - } else { - ext_sub.UPB_PRIVATE(subenum) = - ext->ext->UPB_PRIVATE(sub).UPB_PRIVATE(subenum); - } - subs = &ext_sub; - } - - switch (mode & kUpb_FieldMode_Mask) { - case kUpb_FieldMode_Array: - return _upb_Decoder_DecodeToArray(d, ptr, msg, subs, field, val, op); - case kUpb_FieldMode_Map: - return _upb_Decoder_DecodeToMap(d, ptr, msg, subs, field, val); - case kUpb_FieldMode_Scalar: - return _upb_Decoder_DecodeToSubMessage(d, ptr, msg, subs, field, val, op); - default: - UPB_UNREACHABLE(); - } -} - -static const char* _upb_Decoder_DecodeUnknownField(upb_Decoder* d, - const char* ptr, - upb_Message* msg, - int field_number, - int wire_type, wireval val) { - if (field_number == 0) _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - - // Since unknown fields are the uncommon case, we do a little extra work here - // to walk backwards through the buffer to find the field start. This frees - // up a register in the fast paths (when the field is known), which leads to - // significant speedups in benchmarks. Note that ptr may point into the slop - // space, beyond the normal end of the input buffer. - const char* start = ptr; - - if (wire_type == kUpb_WireType_Delimited) ptr += val.size; - if (msg) { - switch (wire_type) { - case kUpb_WireType_Varint: - case kUpb_WireType_Delimited: - // Skip the last byte - start--; - // Skip bytes until we encounter the final byte of the tag varint. - while (start[-1] & 0x80) start--; - break; - case kUpb_WireType_32Bit: - start -= 4; - break; - case kUpb_WireType_64Bit: - start -= 8; - break; - default: - break; - } - - assert(start == d->debug_valstart); - { - // The varint parser does not enforce that integers are encoded with their - // minimum size; for example the value 1 could be encoded with three - // bytes: 0x81, 0x80, 0x00. These unnecessary trailing zeroes mean that we - // cannot skip backwards by the minimum encoded size of the tag; and - // unlike the loop for delimited or varint fields, we can't stop at a - // sentinel value because anything can precede a tag. Instead, parse back - // one byte at a time until we read the same tag value that was parsed - // earlier. - uint32_t tag = ((uint32_t)field_number << 3) | wire_type; - uint32_t seen = 0; - do { - start--; - seen <<= 7; - seen |= *start & 0x7f; - } while (seen != tag); - } - assert(start == d->debug_tagstart); - - const char* input_start = - upb_EpsCopyInputStream_GetInputPtr(&d->input, start); - if (wire_type == kUpb_WireType_StartGroup) { - ptr = _upb_Decoder_DecodeUnknownGroup(d, ptr, field_number); - } - // Normally, bounds checks for fixed or varint fields are performed after - // the field is parsed; it's OK for the field to overrun the end of the - // buffer, because it'll just read into slop space. However, because this - // path reads bytes from the input buffer rather than the patch buffer, - // bounds checks are needed before adding the unknown field. - _upb_Decoder_IsDone(d, &ptr); - const char* input_ptr = upb_EpsCopyInputStream_GetInputPtr(&d->input, ptr); - if (!UPB_PRIVATE(_upb_Message_AddUnknown)(msg, input_start, - input_ptr - input_start, - &d->arena, d->input.aliasing)) { - _upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); - } - } else if (wire_type == kUpb_WireType_StartGroup) { - ptr = _upb_Decoder_DecodeUnknownGroup(d, ptr, field_number); - } - return ptr; -} - -UPB_NOINLINE -static const char* _upb_Decoder_DecodeMessage(upb_Decoder* d, const char* ptr, - upb_Message* msg, - const upb_MiniTable* layout) { - uint32_t last_field_index = 0; - -#if UPB_FASTTABLE - // The first time we want to skip fast dispatch, because we may have just been - // invoked by the fast parser to handle a case that it bailed on. - if (!_upb_Decoder_IsDone(d, &ptr)) goto nofast; -#endif - - while (!_upb_Decoder_IsDone(d, &ptr)) { - uint32_t tag; - const upb_MiniTableField* field; - int field_number; - int wire_type; - wireval val; - int op; - - if (_upb_Decoder_TryFastDispatch(d, &ptr, msg, layout)) break; - -#if UPB_FASTTABLE - nofast: -#endif - -#ifndef NDEBUG - d->debug_tagstart = ptr; -#endif - - UPB_ASSERT(ptr < d->input.limit_ptr); - ptr = _upb_Decoder_DecodeTag(d, ptr, &tag); - field_number = tag >> 3; - wire_type = tag & 7; - -#ifndef NDEBUG - d->debug_valstart = ptr; -#endif - - if (wire_type == kUpb_WireType_EndGroup) { - d->end_group = field_number; - return ptr; - } - - field = _upb_Decoder_FindField(d, layout, field_number, &last_field_index, - wire_type); - ptr = _upb_Decoder_DecodeWireValue(d, ptr, layout, field, wire_type, &val, - &op); - - if (op >= 0) { - ptr = _upb_Decoder_DecodeKnownField(d, ptr, msg, layout, field, op, &val); - } else { - switch (op) { - case kUpb_DecodeOp_UnknownField: - ptr = _upb_Decoder_DecodeUnknownField(d, ptr, msg, field_number, - wire_type, val); - break; - case kUpb_DecodeOp_MessageSetItem: - ptr = upb_Decoder_DecodeMessageSetItem(d, ptr, msg, layout); - break; - } - } - } - - return UPB_UNLIKELY(layout && layout->UPB_PRIVATE(required_count)) - ? _upb_Decoder_CheckRequired(d, ptr, msg, layout) - : ptr; -} - -const char* _upb_FastDecoder_DecodeGeneric(struct upb_Decoder* d, - const char* ptr, upb_Message* msg, - intptr_t table, uint64_t hasbits, - uint64_t data) { - (void)data; - *(uint32_t*)msg |= hasbits; - return _upb_Decoder_DecodeMessage(d, ptr, msg, decode_totablep(table)); -} - -static upb_DecodeStatus _upb_Decoder_DecodeTop(struct upb_Decoder* d, - const char* buf, - upb_Message* msg, - const upb_MiniTable* m) { - if (!_upb_Decoder_TryFastDispatch(d, &buf, msg, m)) { - _upb_Decoder_DecodeMessage(d, buf, msg, m); - } - if (d->end_group != DECODE_NOGROUP) return kUpb_DecodeStatus_Malformed; - if (d->missing_required) return kUpb_DecodeStatus_MissingRequired; - return kUpb_DecodeStatus_Ok; -} - -UPB_NOINLINE -const char* _upb_Decoder_IsDoneFallback(upb_EpsCopyInputStream* e, - const char* ptr, int overrun) { - return _upb_EpsCopyInputStream_IsDoneFallbackInline( - e, ptr, overrun, _upb_Decoder_BufferFlipCallback); -} - -static upb_DecodeStatus upb_Decoder_Decode(upb_Decoder* const decoder, - const char* const buf, - upb_Message* const msg, - const upb_MiniTable* const m, - upb_Arena* const arena) { - if (UPB_SETJMP(decoder->err) == 0) { - decoder->status = _upb_Decoder_DecodeTop(decoder, buf, msg, m); - } else { - UPB_ASSERT(decoder->status != kUpb_DecodeStatus_Ok); - } - - UPB_PRIVATE(_upb_Arena_SwapOut)(arena, &decoder->arena); - - return decoder->status; -} - -uint16_t upb_DecodeOptions_GetEffectiveMaxDepth(uint32_t options) { - uint16_t max_depth = upb_DecodeOptions_GetMaxDepth(options); - return max_depth ? max_depth : kUpb_WireFormat_DefaultDepthLimit; -} - -upb_DecodeStatus upb_Decode(const char* buf, size_t size, upb_Message* msg, - const upb_MiniTable* mt, - const upb_ExtensionRegistry* extreg, int options, - upb_Arena* arena) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Decoder decoder; - - upb_EpsCopyInputStream_Init(&decoder.input, &buf, size, - options & kUpb_DecodeOption_AliasString); - - decoder.extreg = extreg; - decoder.depth = upb_DecodeOptions_GetEffectiveMaxDepth(options); - decoder.end_group = DECODE_NOGROUP; - decoder.options = (uint16_t)options; - decoder.missing_required = false; - decoder.status = kUpb_DecodeStatus_Ok; - - // Violating the encapsulation of the arena for performance reasons. - // This is a temporary arena that we swap into and swap out of when we are - // done. The temporary arena only needs to be able to handle allocation, - // not fuse or free, so it does not need many of the members to be initialized - // (particularly parent_or_count). - UPB_PRIVATE(_upb_Arena_SwapIn)(&decoder.arena, arena); - - return upb_Decoder_Decode(&decoder, buf, msg, mt, arena); -} - -upb_DecodeStatus upb_DecodeLengthPrefixed(const char* buf, size_t size, - upb_Message* msg, - size_t* num_bytes_read, - const upb_MiniTable* mt, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - // To avoid needing to make a Decoder just to decode the initial length, - // hand-decode the leading varint for the message length here. - uint64_t msg_len = 0; - for (size_t i = 0;; ++i) { - if (i >= size || i > 9) { - return kUpb_DecodeStatus_Malformed; - } - uint64_t b = *buf; - buf++; - msg_len += (b & 0x7f) << (i * 7); - if ((b & 0x80) == 0) { - *num_bytes_read = i + 1 + msg_len; - break; - } - } - - // If the total number of bytes we would read (= the bytes from the varint - // plus however many bytes that varint says we should read) is larger then the - // input buffer then error as malformed. - if (*num_bytes_read > size) { - return kUpb_DecodeStatus_Malformed; - } - if (msg_len > INT32_MAX) { - return kUpb_DecodeStatus_Malformed; - } - - return upb_Decode(buf, msg_len, msg, mt, extreg, options, arena); -} - -const char* upb_DecodeStatus_String(upb_DecodeStatus status) { - switch (status) { - case kUpb_DecodeStatus_Ok: - return "Ok"; - case kUpb_DecodeStatus_Malformed: - return "Wire format was corrupt"; - case kUpb_DecodeStatus_OutOfMemory: - return "Arena alloc failed"; - case kUpb_DecodeStatus_BadUtf8: - return "String field had bad UTF-8"; - case kUpb_DecodeStatus_MaxDepthExceeded: - return "Exceeded upb_DecodeOptions_MaxDepth"; - case kUpb_DecodeStatus_MissingRequired: - return "Missing required field"; - case kUpb_DecodeStatus_UnlinkedSubMessage: - return "Unlinked sub-message field was present"; - default: - return "Unknown decode status"; - } -} - -#undef OP_FIXPCK_LG2 -#undef OP_VARPCK_LG2 - -// We encode backwards, to avoid pre-computing lengths (one-pass encode). - - -#include -#include -#include -#include -#include - - -// Must be last. - -// Returns the MiniTable corresponding to a given MiniTableField -// from an array of MiniTableSubs. -static const upb_MiniTable* _upb_Encoder_GetSubMiniTable( - const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field) { - return *subs[field->UPB_PRIVATE(submsg_index)].UPB_PRIVATE(submsg); -} - -#define UPB_PB_VARINT_MAX_LEN 10 - -UPB_NOINLINE -static size_t encode_varint64(uint64_t val, char* buf) { - size_t i = 0; - do { - uint8_t byte = val & 0x7fU; - val >>= 7; - if (val) byte |= 0x80U; - buf[i++] = byte; - } while (val); - return i; -} - -static uint32_t encode_zz32(int32_t n) { - return ((uint32_t)n << 1) ^ (n >> 31); -} -static uint64_t encode_zz64(int64_t n) { - return ((uint64_t)n << 1) ^ (n >> 63); -} - -typedef struct { - upb_EncodeStatus status; - jmp_buf err; - upb_Arena* arena; - char *buf, *ptr, *limit; - int options; - int depth; - _upb_mapsorter sorter; -} upb_encstate; - -static size_t upb_roundup_pow2(size_t bytes) { - size_t ret = 128; - while (ret < bytes) { - ret *= 2; - } - return ret; -} - -UPB_NORETURN static void encode_err(upb_encstate* e, upb_EncodeStatus s) { - UPB_ASSERT(s != kUpb_EncodeStatus_Ok); - e->status = s; - UPB_LONGJMP(e->err, 1); -} - -UPB_NOINLINE -static void encode_growbuffer(upb_encstate* e, size_t bytes) { - size_t old_size = e->limit - e->buf; - size_t needed_size = bytes + (e->limit - e->ptr); - size_t new_size = upb_roundup_pow2(needed_size); - char* new_buf = upb_Arena_Realloc(e->arena, e->buf, old_size, new_size); - - if (!new_buf) encode_err(e, kUpb_EncodeStatus_OutOfMemory); - - // We want previous data at the end, realloc() put it at the beginning. - // TODO: This is somewhat inefficient since we are copying twice. - // Maybe create a realloc() that copies to the end of the new buffer? - if (old_size > 0) { - memmove(new_buf + new_size - old_size, new_buf, old_size); - } - - e->buf = new_buf; - e->limit = new_buf + new_size; - e->ptr = new_buf + new_size - needed_size; -} - -/* Call to ensure that at least "bytes" bytes are available for writing at - * e->ptr. Returns false if the bytes could not be allocated. */ -UPB_FORCEINLINE -void encode_reserve(upb_encstate* e, size_t bytes) { - if ((size_t)(e->ptr - e->buf) < bytes) { - encode_growbuffer(e, bytes); - return; - } - - e->ptr -= bytes; -} - -/* Writes the given bytes to the buffer, handling reserve/advance. */ -static void encode_bytes(upb_encstate* e, const void* data, size_t len) { - if (len == 0) return; /* memcpy() with zero size is UB */ - encode_reserve(e, len); - memcpy(e->ptr, data, len); -} - -static void encode_fixed64(upb_encstate* e, uint64_t val) { - val = upb_BigEndian64(val); - encode_bytes(e, &val, sizeof(uint64_t)); -} - -static void encode_fixed32(upb_encstate* e, uint32_t val) { - val = upb_BigEndian32(val); - encode_bytes(e, &val, sizeof(uint32_t)); -} - -UPB_NOINLINE -static void encode_longvarint(upb_encstate* e, uint64_t val) { - size_t len; - char* start; - - encode_reserve(e, UPB_PB_VARINT_MAX_LEN); - len = encode_varint64(val, e->ptr); - start = e->ptr + UPB_PB_VARINT_MAX_LEN - len; - memmove(start, e->ptr, len); - e->ptr = start; -} - -UPB_FORCEINLINE -void encode_varint(upb_encstate* e, uint64_t val) { - if (val < 128 && e->ptr != e->buf) { - --e->ptr; - *e->ptr = val; - } else { - encode_longvarint(e, val); - } -} - -static void encode_double(upb_encstate* e, double d) { - uint64_t u64; - UPB_ASSERT(sizeof(double) == sizeof(uint64_t)); - memcpy(&u64, &d, sizeof(uint64_t)); - encode_fixed64(e, u64); -} - -static void encode_float(upb_encstate* e, float d) { - uint32_t u32; - UPB_ASSERT(sizeof(float) == sizeof(uint32_t)); - memcpy(&u32, &d, sizeof(uint32_t)); - encode_fixed32(e, u32); -} - -static void encode_tag(upb_encstate* e, uint32_t field_number, - uint8_t wire_type) { - encode_varint(e, (field_number << 3) | wire_type); -} - -static void encode_fixedarray(upb_encstate* e, const upb_Array* arr, - size_t elem_size, uint32_t tag) { - size_t bytes = upb_Array_Size(arr) * elem_size; - const char* data = upb_Array_DataPtr(arr); - const char* ptr = data + bytes - elem_size; - - if (tag || !upb_IsLittleEndian()) { - while (true) { - if (elem_size == 4) { - uint32_t val; - memcpy(&val, ptr, sizeof(val)); - val = upb_BigEndian32(val); - encode_bytes(e, &val, elem_size); - } else { - UPB_ASSERT(elem_size == 8); - uint64_t val; - memcpy(&val, ptr, sizeof(val)); - val = upb_BigEndian64(val); - encode_bytes(e, &val, elem_size); - } - - if (tag) encode_varint(e, tag); - if (ptr == data) break; - ptr -= elem_size; - } - } else { - encode_bytes(e, data, bytes); - } -} - -static void encode_message(upb_encstate* e, const upb_Message* msg, - const upb_MiniTable* m, size_t* size); - -static void encode_TaggedMessagePtr(upb_encstate* e, - upb_TaggedMessagePtr tagged, - const upb_MiniTable* m, size_t* size) { - if (upb_TaggedMessagePtr_IsEmpty(tagged)) { - m = UPB_PRIVATE(_upb_MiniTable_Empty)(); - } - encode_message(e, UPB_PRIVATE(_upb_TaggedMessagePtr_GetMessage)(tagged), m, - size); -} - -static void encode_scalar(upb_encstate* e, const void* _field_mem, - const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* f) { - const char* field_mem = _field_mem; - int wire_type; - -#define CASE(ctype, type, wtype, encodeval) \ - { \ - ctype val = *(ctype*)field_mem; \ - encode_##type(e, encodeval); \ - wire_type = wtype; \ - break; \ - } - - switch (f->UPB_PRIVATE(descriptortype)) { - case kUpb_FieldType_Double: - CASE(double, double, kUpb_WireType_64Bit, val); - case kUpb_FieldType_Float: - CASE(float, float, kUpb_WireType_32Bit, val); - case kUpb_FieldType_Int64: - case kUpb_FieldType_UInt64: - CASE(uint64_t, varint, kUpb_WireType_Varint, val); - case kUpb_FieldType_UInt32: - CASE(uint32_t, varint, kUpb_WireType_Varint, val); - case kUpb_FieldType_Int32: - case kUpb_FieldType_Enum: - CASE(int32_t, varint, kUpb_WireType_Varint, (int64_t)val); - case kUpb_FieldType_SFixed64: - case kUpb_FieldType_Fixed64: - CASE(uint64_t, fixed64, kUpb_WireType_64Bit, val); - case kUpb_FieldType_Fixed32: - case kUpb_FieldType_SFixed32: - CASE(uint32_t, fixed32, kUpb_WireType_32Bit, val); - case kUpb_FieldType_Bool: - CASE(bool, varint, kUpb_WireType_Varint, val); - case kUpb_FieldType_SInt32: - CASE(int32_t, varint, kUpb_WireType_Varint, encode_zz32(val)); - case kUpb_FieldType_SInt64: - CASE(int64_t, varint, kUpb_WireType_Varint, encode_zz64(val)); - case kUpb_FieldType_String: - case kUpb_FieldType_Bytes: { - upb_StringView view = *(upb_StringView*)field_mem; - encode_bytes(e, view.data, view.size); - encode_varint(e, view.size); - wire_type = kUpb_WireType_Delimited; - break; - } - case kUpb_FieldType_Group: { - size_t size; - upb_TaggedMessagePtr submsg = *(upb_TaggedMessagePtr*)field_mem; - const upb_MiniTable* subm = _upb_Encoder_GetSubMiniTable(subs, f); - if (submsg == 0) { - return; - } - if (--e->depth == 0) encode_err(e, kUpb_EncodeStatus_MaxDepthExceeded); - encode_tag(e, upb_MiniTableField_Number(f), kUpb_WireType_EndGroup); - encode_TaggedMessagePtr(e, submsg, subm, &size); - wire_type = kUpb_WireType_StartGroup; - e->depth++; - break; - } - case kUpb_FieldType_Message: { - size_t size; - upb_TaggedMessagePtr submsg = *(upb_TaggedMessagePtr*)field_mem; - const upb_MiniTable* subm = _upb_Encoder_GetSubMiniTable(subs, f); - if (submsg == 0) { - return; - } - if (--e->depth == 0) encode_err(e, kUpb_EncodeStatus_MaxDepthExceeded); - encode_TaggedMessagePtr(e, submsg, subm, &size); - encode_varint(e, size); - wire_type = kUpb_WireType_Delimited; - e->depth++; - break; - } - default: - UPB_UNREACHABLE(); - } -#undef CASE - - encode_tag(e, upb_MiniTableField_Number(f), wire_type); -} - -static void encode_array(upb_encstate* e, const upb_Message* msg, - const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* f) { - const upb_Array* arr = *UPB_PTR_AT(msg, f->UPB_PRIVATE(offset), upb_Array*); - bool packed = upb_MiniTableField_IsPacked(f); - size_t pre_len = e->limit - e->ptr; - - if (arr == NULL || upb_Array_Size(arr) == 0) { - return; - } - -#define VARINT_CASE(ctype, encode) \ - { \ - const ctype* start = upb_Array_DataPtr(arr); \ - const ctype* ptr = start + upb_Array_Size(arr); \ - uint32_t tag = \ - packed ? 0 : (f->UPB_PRIVATE(number) << 3) | kUpb_WireType_Varint; \ - do { \ - ptr--; \ - encode_varint(e, encode); \ - if (tag) encode_varint(e, tag); \ - } while (ptr != start); \ - } \ - break; - -#define TAG(wire_type) (packed ? 0 : (f->UPB_PRIVATE(number) << 3 | wire_type)) - - switch (f->UPB_PRIVATE(descriptortype)) { - case kUpb_FieldType_Double: - encode_fixedarray(e, arr, sizeof(double), TAG(kUpb_WireType_64Bit)); - break; - case kUpb_FieldType_Float: - encode_fixedarray(e, arr, sizeof(float), TAG(kUpb_WireType_32Bit)); - break; - case kUpb_FieldType_SFixed64: - case kUpb_FieldType_Fixed64: - encode_fixedarray(e, arr, sizeof(uint64_t), TAG(kUpb_WireType_64Bit)); - break; - case kUpb_FieldType_Fixed32: - case kUpb_FieldType_SFixed32: - encode_fixedarray(e, arr, sizeof(uint32_t), TAG(kUpb_WireType_32Bit)); - break; - case kUpb_FieldType_Int64: - case kUpb_FieldType_UInt64: - VARINT_CASE(uint64_t, *ptr); - case kUpb_FieldType_UInt32: - VARINT_CASE(uint32_t, *ptr); - case kUpb_FieldType_Int32: - case kUpb_FieldType_Enum: - VARINT_CASE(int32_t, (int64_t)*ptr); - case kUpb_FieldType_Bool: - VARINT_CASE(bool, *ptr); - case kUpb_FieldType_SInt32: - VARINT_CASE(int32_t, encode_zz32(*ptr)); - case kUpb_FieldType_SInt64: - VARINT_CASE(int64_t, encode_zz64(*ptr)); - case kUpb_FieldType_String: - case kUpb_FieldType_Bytes: { - const upb_StringView* start = upb_Array_DataPtr(arr); - const upb_StringView* ptr = start + upb_Array_Size(arr); - do { - ptr--; - encode_bytes(e, ptr->data, ptr->size); - encode_varint(e, ptr->size); - encode_tag(e, upb_MiniTableField_Number(f), kUpb_WireType_Delimited); - } while (ptr != start); - return; - } - case kUpb_FieldType_Group: { - const upb_TaggedMessagePtr* start = upb_Array_DataPtr(arr); - const upb_TaggedMessagePtr* ptr = start + upb_Array_Size(arr); - const upb_MiniTable* subm = _upb_Encoder_GetSubMiniTable(subs, f); - if (--e->depth == 0) encode_err(e, kUpb_EncodeStatus_MaxDepthExceeded); - do { - size_t size; - ptr--; - encode_tag(e, upb_MiniTableField_Number(f), kUpb_WireType_EndGroup); - encode_TaggedMessagePtr(e, *ptr, subm, &size); - encode_tag(e, upb_MiniTableField_Number(f), kUpb_WireType_StartGroup); - } while (ptr != start); - e->depth++; - return; - } - case kUpb_FieldType_Message: { - const upb_TaggedMessagePtr* start = upb_Array_DataPtr(arr); - const upb_TaggedMessagePtr* ptr = start + upb_Array_Size(arr); - const upb_MiniTable* subm = _upb_Encoder_GetSubMiniTable(subs, f); - if (--e->depth == 0) encode_err(e, kUpb_EncodeStatus_MaxDepthExceeded); - do { - size_t size; - ptr--; - encode_TaggedMessagePtr(e, *ptr, subm, &size); - encode_varint(e, size); - encode_tag(e, upb_MiniTableField_Number(f), kUpb_WireType_Delimited); - } while (ptr != start); - e->depth++; - return; - } - } -#undef VARINT_CASE - - if (packed) { - encode_varint(e, e->limit - e->ptr - pre_len); - encode_tag(e, upb_MiniTableField_Number(f), kUpb_WireType_Delimited); - } -} - -static void encode_mapentry(upb_encstate* e, uint32_t number, - const upb_MiniTable* layout, - const upb_MapEntry* ent) { - const upb_MiniTableField* key_field = upb_MiniTable_MapKey(layout); - const upb_MiniTableField* val_field = upb_MiniTable_MapValue(layout); - size_t pre_len = e->limit - e->ptr; - size_t size; - encode_scalar(e, &ent->v, layout->UPB_PRIVATE(subs), val_field); - encode_scalar(e, &ent->k, layout->UPB_PRIVATE(subs), key_field); - size = (e->limit - e->ptr) - pre_len; - encode_varint(e, size); - encode_tag(e, number, kUpb_WireType_Delimited); -} - -static void encode_map(upb_encstate* e, const upb_Message* msg, - const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* f) { - const upb_Map* map = *UPB_PTR_AT(msg, f->UPB_PRIVATE(offset), const upb_Map*); - const upb_MiniTable* layout = _upb_Encoder_GetSubMiniTable(subs, f); - UPB_ASSERT(upb_MiniTable_FieldCount(layout) == 2); - - if (!map || !upb_Map_Size(map)) return; - - if (e->options & kUpb_EncodeOption_Deterministic) { - if (!map->UPB_PRIVATE(is_strtable)) { - // For inttable, first encode the array part, then sort the table entries. - intptr_t iter = UPB_INTTABLE_BEGIN; - while ((size_t)++iter < map->t.inttable.array_size) { - upb_value value = map->t.inttable.array[iter]; - if (upb_inttable_arrhas(&map->t.inttable, iter)) { - upb_MapEntry ent; - memcpy(&ent.k, &iter, sizeof(iter)); - _upb_map_fromvalue(value, &ent.v, map->val_size); - encode_mapentry(e, upb_MiniTableField_Number(f), layout, &ent); - } - } - } - _upb_sortedmap sorted; - _upb_mapsorter_pushmap( - &e->sorter, layout->UPB_PRIVATE(fields)[0].UPB_PRIVATE(descriptortype), - map, &sorted); - upb_MapEntry ent; - while (_upb_sortedmap_next(&e->sorter, map, &sorted, &ent)) { - encode_mapentry(e, upb_MiniTableField_Number(f), layout, &ent); - } - _upb_mapsorter_popmap(&e->sorter, &sorted); - } else { - upb_value val; - if (map->UPB_PRIVATE(is_strtable)) { - intptr_t iter = UPB_STRTABLE_BEGIN; - upb_StringView strkey; - while (upb_strtable_next2(&map->t.strtable, &strkey, &val, &iter)) { - upb_MapEntry ent; - _upb_map_fromkey(strkey, &ent.k, map->key_size); - _upb_map_fromvalue(val, &ent.v, map->val_size); - encode_mapentry(e, upb_MiniTableField_Number(f), layout, &ent); - } - } else { - intptr_t iter = UPB_INTTABLE_BEGIN; - uintptr_t intkey = 0; - while (upb_inttable_next(&map->t.inttable, &intkey, &val, &iter)) { - upb_MapEntry ent; - memcpy(&ent.k, &intkey, map->key_size); - _upb_map_fromvalue(val, &ent.v, map->val_size); - encode_mapentry(e, upb_MiniTableField_Number(f), layout, &ent); - } - } - } -} - -static bool encode_shouldencode(upb_encstate* e, const upb_Message* msg, - const upb_MiniTableField* f) { - if (f->presence == 0) { - // Proto3 presence or map/array. - const void* mem = UPB_PTR_AT(msg, f->UPB_PRIVATE(offset), void); - switch (UPB_PRIVATE(_upb_MiniTableField_GetRep)(f)) { - case kUpb_FieldRep_1Byte: { - char ch; - memcpy(&ch, mem, 1); - return ch != 0; - } - case kUpb_FieldRep_4Byte: { - uint32_t u32; - memcpy(&u32, mem, 4); - return u32 != 0; - } - case kUpb_FieldRep_8Byte: { - uint64_t u64; - memcpy(&u64, mem, 8); - return u64 != 0; - } - case kUpb_FieldRep_StringView: { - const upb_StringView* str = (const upb_StringView*)mem; - return str->size != 0; - } - default: - UPB_UNREACHABLE(); - } - } else if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)) { - // Proto2 presence: hasbit. - return UPB_PRIVATE(_upb_Message_GetHasbit)(msg, f); - } else { - // Field is in a oneof. - return UPB_PRIVATE(_upb_Message_GetOneofCase)(msg, f) == - upb_MiniTableField_Number(f); - } -} - -static void encode_field(upb_encstate* e, const upb_Message* msg, - const upb_MiniTableSubInternal* subs, - const upb_MiniTableField* field) { - switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(field)) { - case kUpb_FieldMode_Array: - encode_array(e, msg, subs, field); - break; - case kUpb_FieldMode_Map: - encode_map(e, msg, subs, field); - break; - case kUpb_FieldMode_Scalar: - encode_scalar(e, UPB_PTR_AT(msg, field->UPB_PRIVATE(offset), void), subs, - field); - break; - default: - UPB_UNREACHABLE(); - } -} - -static void encode_msgset_item(upb_encstate* e, - const upb_MiniTableExtension* ext, - const upb_MessageValue ext_val) { - size_t size; - encode_tag(e, kUpb_MsgSet_Item, kUpb_WireType_EndGroup); - encode_message(e, ext_val.msg_val, upb_MiniTableExtension_GetSubMessage(ext), - &size); - encode_varint(e, size); - encode_tag(e, kUpb_MsgSet_Message, kUpb_WireType_Delimited); - encode_varint(e, upb_MiniTableExtension_Number(ext)); - encode_tag(e, kUpb_MsgSet_TypeId, kUpb_WireType_Varint); - encode_tag(e, kUpb_MsgSet_Item, kUpb_WireType_StartGroup); -} - -static void encode_ext(upb_encstate* e, const upb_MiniTableExtension* ext, - upb_MessageValue ext_val, bool is_message_set) { - if (UPB_UNLIKELY(is_message_set)) { - encode_msgset_item(e, ext, ext_val); - } else { - upb_MiniTableSubInternal sub; - if (upb_MiniTableField_IsSubMessage(&ext->UPB_PRIVATE(field))) { - sub.UPB_PRIVATE(submsg) = &ext->UPB_PRIVATE(sub).UPB_PRIVATE(submsg); - } else { - sub.UPB_PRIVATE(subenum) = ext->UPB_PRIVATE(sub).UPB_PRIVATE(subenum); - } - encode_field(e, &ext_val.UPB_PRIVATE(ext_msg_val), &sub, - &ext->UPB_PRIVATE(field)); - } -} - -static void encode_exts(upb_encstate* e, const upb_MiniTable* m, - const upb_Message* msg) { - if (m->UPB_PRIVATE(ext) == kUpb_ExtMode_NonExtendable) return; - - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) return; - - /* Encode all extensions together. Unlike C++, we do not attempt to keep - * these in field number order relative to normal fields or even to each - * other. */ - uintptr_t iter = kUpb_Message_ExtensionBegin; - const upb_MiniTableExtension* ext; - upb_MessageValue ext_val; - if (!UPB_PRIVATE(_upb_Message_NextExtensionReverse)(msg, &ext, &ext_val, - &iter)) { - // Message has no extensions. - return; - } - - if (e->options & kUpb_EncodeOption_Deterministic) { - _upb_sortedmap sorted; - if (!_upb_mapsorter_pushexts(&e->sorter, in, &sorted)) { - // TODO: b/378744096 - handle alloc failure - } - const upb_Extension* ext; - while (_upb_sortedmap_nextext(&e->sorter, &sorted, &ext)) { - encode_ext(e, ext->ext, ext->data, - m->UPB_PRIVATE(ext) == kUpb_ExtMode_IsMessageSet); - } - _upb_mapsorter_popmap(&e->sorter, &sorted); - } else { - do { - encode_ext(e, ext, ext_val, - m->UPB_PRIVATE(ext) == kUpb_ExtMode_IsMessageSet); - } while (UPB_PRIVATE(_upb_Message_NextExtensionReverse)(msg, &ext, &ext_val, - &iter)); - } -} - -static void encode_message(upb_encstate* e, const upb_Message* msg, - const upb_MiniTable* m, size_t* size) { - size_t pre_len = e->limit - e->ptr; - - if (e->options & kUpb_EncodeOption_CheckRequired) { - if (m->UPB_PRIVATE(required_count)) { - if (!UPB_PRIVATE(_upb_Message_IsInitializedShallow)(msg, m)) { - encode_err(e, kUpb_EncodeStatus_MissingRequired); - } - } - } - - if ((e->options & kUpb_EncodeOption_SkipUnknown) == 0) { - size_t unknown_size = 0; - uintptr_t iter = kUpb_Message_UnknownBegin; - upb_StringView unknown; - // Need to write in reverse order, but iteration is in-order; scan to - // reserve capacity up front, then write in-order - while (upb_Message_NextUnknown(msg, &unknown, &iter)) { - unknown_size += unknown.size; - } - if (unknown_size != 0) { - encode_reserve(e, unknown_size); - char* ptr = e->ptr; - iter = kUpb_Message_UnknownBegin; - while (upb_Message_NextUnknown(msg, &unknown, &iter)) { - memcpy(ptr, unknown.data, unknown.size); - ptr += unknown.size; - } - } - } - - encode_exts(e, m, msg); - - if (upb_MiniTable_FieldCount(m)) { - const upb_MiniTableField* f = - &m->UPB_PRIVATE(fields)[m->UPB_PRIVATE(field_count)]; - const upb_MiniTableField* first = &m->UPB_PRIVATE(fields)[0]; - while (f != first) { - f--; - if (encode_shouldencode(e, msg, f)) { - encode_field(e, msg, m->UPB_PRIVATE(subs), f); - } - } - } - - *size = (e->limit - e->ptr) - pre_len; -} - -static upb_EncodeStatus upb_Encoder_Encode(upb_encstate* const encoder, - const upb_Message* const msg, - const upb_MiniTable* const l, - char** const buf, size_t* const size, - bool prepend_len) { - // Unfortunately we must continue to perform hackery here because there are - // code paths which blindly copy the returned pointer without bothering to - // check for errors until much later (b/235839510). So we still set *buf to - // NULL on error and we still set it to non-NULL on a successful empty result. - if (UPB_SETJMP(encoder->err) == 0) { - size_t encoded_msg_size; - encode_message(encoder, msg, l, &encoded_msg_size); - if (prepend_len) { - encode_varint(encoder, encoded_msg_size); - } - *size = encoder->limit - encoder->ptr; - if (*size == 0) { - static char ch; - *buf = &ch; - } else { - UPB_ASSERT(encoder->ptr); - *buf = encoder->ptr; - } - } else { - UPB_ASSERT(encoder->status != kUpb_EncodeStatus_Ok); - *buf = NULL; - *size = 0; - } - - _upb_mapsorter_destroy(&encoder->sorter); - return encoder->status; -} - -uint16_t upb_EncodeOptions_GetEffectiveMaxDepth(uint32_t options) { - uint16_t max_depth = upb_EncodeOptions_GetMaxDepth(options); - return max_depth ? max_depth : kUpb_WireFormat_DefaultDepthLimit; -} - -static upb_EncodeStatus _upb_Encode(const upb_Message* msg, - const upb_MiniTable* l, int options, - upb_Arena* arena, char** buf, size_t* size, - bool prepend_len) { - upb_encstate e; - - e.status = kUpb_EncodeStatus_Ok; - e.arena = arena; - e.buf = NULL; - e.limit = NULL; - e.ptr = NULL; - e.depth = upb_EncodeOptions_GetEffectiveMaxDepth(options); - e.options = options; - _upb_mapsorter_init(&e.sorter); - - return upb_Encoder_Encode(&e, msg, l, buf, size, prepend_len); -} - -upb_EncodeStatus upb_Encode(const upb_Message* msg, const upb_MiniTable* l, - int options, upb_Arena* arena, char** buf, - size_t* size) { - return _upb_Encode(msg, l, options, arena, buf, size, false); -} - -upb_EncodeStatus upb_EncodeLengthPrefixed(const upb_Message* msg, - const upb_MiniTable* l, int options, - upb_Arena* arena, char** buf, - size_t* size) { - return _upb_Encode(msg, l, options, arena, buf, size, true); -} - -const char* upb_EncodeStatus_String(upb_EncodeStatus status) { - switch (status) { - case kUpb_EncodeStatus_Ok: - return "Ok"; - case kUpb_EncodeStatus_MissingRequired: - return "Missing required field"; - case kUpb_EncodeStatus_MaxDepthExceeded: - return "Max depth exceeded"; - case kUpb_EncodeStatus_OutOfMemory: - return "Arena alloc failed"; - default: - return "Unknown encode status"; - } -} - -// Fast decoder: ~3x the speed of decode.c, but requires x86-64/ARM64. -// Also the table size grows by 2x. -// -// Could potentially be ported to other 64-bit archs that pass at least six -// arguments in registers and have 8 unused high bits in pointers. -// -// The overall design is to create specialized functions for every possible -// field type (eg. oneof boolean field with a 1 byte tag) and then dispatch -// to the specialized function as quickly as possible. - - - -// Must be last. - -#if UPB_FASTTABLE - -// The standard set of arguments passed to each parsing function. -// Thanks to x86-64 calling conventions, these will stay in registers. -#define UPB_PARSE_PARAMS \ - upb_Decoder *d, const char *ptr, upb_Message *msg, intptr_t table, \ - uint64_t hasbits, uint64_t data - -#define UPB_PARSE_ARGS d, ptr, msg, table, hasbits, data - -#define RETURN_GENERIC(m) \ - /* Uncomment either of these for debugging purposes. */ \ - /* fprintf(stderr, m); */ \ - /*__builtin_trap(); */ \ - return _upb_FastDecoder_DecodeGeneric(d, ptr, msg, table, hasbits, 0); - -typedef enum { - CARD_s = 0, /* Singular (optional, non-repeated) */ - CARD_o = 1, /* Oneof */ - CARD_r = 2, /* Repeated */ - CARD_p = 3 /* Packed Repeated */ -} upb_card; - -UPB_NOINLINE -static const char* fastdecode_isdonefallback(UPB_PARSE_PARAMS) { - int overrun = data; - ptr = _upb_EpsCopyInputStream_IsDoneFallbackInline( - &d->input, ptr, overrun, _upb_Decoder_BufferFlipCallback); - data = _upb_FastDecoder_LoadTag(ptr); - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); -} - -UPB_FORCEINLINE -const char* fastdecode_dispatch(UPB_PARSE_PARAMS) { - int overrun; - switch (upb_EpsCopyInputStream_IsDoneStatus(&d->input, ptr, &overrun)) { - case kUpb_IsDoneStatus_Done: - ((uint32_t*)msg)[2] |= hasbits; // Sync hasbits. - const upb_MiniTable* m = decode_totablep(table); - return UPB_UNLIKELY(m->UPB_PRIVATE(required_count)) - ? _upb_Decoder_CheckRequired(d, ptr, msg, m) - : ptr; - case kUpb_IsDoneStatus_NotDone: - break; - case kUpb_IsDoneStatus_NeedFallback: - data = overrun; - UPB_MUSTTAIL return fastdecode_isdonefallback(UPB_PARSE_ARGS); - } - - // Read two bytes of tag data (for a one-byte tag, the high byte is junk). - data = _upb_FastDecoder_LoadTag(ptr); - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); -} - -UPB_FORCEINLINE -bool fastdecode_checktag(uint16_t data, int tagbytes) { - if (tagbytes == 1) { - return (data & 0xff) == 0; - } else { - return data == 0; - } -} - -UPB_FORCEINLINE -const char* fastdecode_longsize(const char* ptr, int* size) { - int i; - UPB_ASSERT(*size & 0x80); - *size &= 0xff; - for (i = 0; i < 3; i++) { - ptr++; - size_t byte = (uint8_t)ptr[-1]; - *size += (byte - 1) << (7 + 7 * i); - if (UPB_LIKELY((byte & 0x80) == 0)) return ptr; - } - ptr++; - size_t byte = (uint8_t)ptr[-1]; - // len is limited by 2gb not 4gb, hence 8 and not 16 as normally expected - // for a 32 bit varint. - if (UPB_UNLIKELY(byte >= 8)) return NULL; - *size += (byte - 1) << 28; - return ptr; -} - -UPB_FORCEINLINE -const char* fastdecode_delimited( - upb_Decoder* d, const char* ptr, - upb_EpsCopyInputStream_ParseDelimitedFunc* func, void* ctx) { - ptr++; - - // Sign-extend so varint greater than one byte becomes negative, causing - // fast delimited parse to fail. - int len = (int8_t)ptr[-1]; - - if (!upb_EpsCopyInputStream_TryParseDelimitedFast(&d->input, &ptr, len, func, - ctx)) { - // Slow case: Sub-message is >=128 bytes and/or exceeds the current buffer. - // If it exceeds the buffer limit, limit/limit_ptr will change during - // sub-message parsing, so we need to preserve delta, not limit. - if (UPB_UNLIKELY(len & 0x80)) { - // Size varint >1 byte (length >= 128). - ptr = fastdecode_longsize(ptr, &len); - if (!ptr) { - // Corrupt wire format: size exceeded INT_MAX. - return NULL; - } - } - if (!upb_EpsCopyInputStream_CheckSize(&d->input, ptr, len)) { - // Corrupt wire format: invalid limit. - return NULL; - } - int delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, len); - ptr = func(&d->input, ptr, ctx); - upb_EpsCopyInputStream_PopLimit(&d->input, ptr, delta); - } - return ptr; -} - -/* singular, oneof, repeated field handling ***********************************/ - -typedef struct { - upb_Array* arr; - void* end; -} fastdecode_arr; - -typedef enum { - FD_NEXT_ATLIMIT, - FD_NEXT_SAMEFIELD, - FD_NEXT_OTHERFIELD -} fastdecode_next; - -typedef struct { - void* dst; - fastdecode_next next; - uint32_t tag; -} fastdecode_nextret; - -UPB_FORCEINLINE -void* fastdecode_resizearr(upb_Decoder* d, void* dst, fastdecode_arr* farr, - int valbytes) { - if (UPB_UNLIKELY(dst == farr->end)) { - size_t old_capacity = farr->arr->UPB_PRIVATE(capacity); - size_t old_bytes = old_capacity * valbytes; - size_t new_capacity = old_capacity * 2; - size_t new_bytes = new_capacity * valbytes; - char* old_ptr = upb_Array_MutableDataPtr(farr->arr); - char* new_ptr = upb_Arena_Realloc(&d->arena, old_ptr, old_bytes, new_bytes); - uint8_t elem_size_lg2 = __builtin_ctz(valbytes); - UPB_PRIVATE(_upb_Array_SetTaggedPtr)(farr->arr, new_ptr, elem_size_lg2); - farr->arr->UPB_PRIVATE(capacity) = new_capacity; - dst = (void*)(new_ptr + (old_capacity * valbytes)); - farr->end = (void*)(new_ptr + (new_capacity * valbytes)); - } - return dst; -} - -UPB_FORCEINLINE -bool fastdecode_tagmatch(uint32_t tag, uint64_t data, int tagbytes) { - if (tagbytes == 1) { - return (uint8_t)tag == (uint8_t)data; - } else { - return (uint16_t)tag == (uint16_t)data; - } -} - -UPB_FORCEINLINE -void fastdecode_commitarr(void* dst, fastdecode_arr* farr, int valbytes) { - farr->arr->UPB_PRIVATE(size) = - (size_t)((char*)dst - (char*)upb_Array_MutableDataPtr(farr->arr)) / - valbytes; -} - -UPB_FORCEINLINE -fastdecode_nextret fastdecode_nextrepeated(upb_Decoder* d, void* dst, - const char** ptr, - fastdecode_arr* farr, uint64_t data, - int tagbytes, int valbytes) { - fastdecode_nextret ret; - dst = (char*)dst + valbytes; - - if (UPB_LIKELY(!_upb_Decoder_IsDone(d, ptr))) { - ret.tag = _upb_FastDecoder_LoadTag(*ptr); - if (fastdecode_tagmatch(ret.tag, data, tagbytes)) { - ret.next = FD_NEXT_SAMEFIELD; - } else { - fastdecode_commitarr(dst, farr, valbytes); - ret.next = FD_NEXT_OTHERFIELD; - } - } else { - fastdecode_commitarr(dst, farr, valbytes); - ret.next = FD_NEXT_ATLIMIT; - } - - ret.dst = dst; - return ret; -} - -UPB_FORCEINLINE -void* fastdecode_fieldmem(upb_Message* msg, uint64_t data) { - size_t ofs = data >> 48; - return (char*)msg + ofs; -} - -UPB_FORCEINLINE -void* fastdecode_getfield(upb_Decoder* d, const char* ptr, upb_Message* msg, - uint64_t* data, uint64_t* hasbits, - fastdecode_arr* farr, int valbytes, upb_card card) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - switch (card) { - case CARD_s: { - uint8_t hasbit_index = *data >> 24; - // Set hasbit and return pointer to scalar field. - *hasbits |= 1ull << hasbit_index; - return fastdecode_fieldmem(msg, *data); - } - case CARD_o: { - uint16_t case_ofs = *data >> 32; - uint32_t* oneof_case = UPB_PTR_AT(msg, case_ofs, uint32_t); - uint8_t field_number = *data >> 24; - *oneof_case = field_number; - return fastdecode_fieldmem(msg, *data); - } - case CARD_r: { - // Get pointer to upb_Array and allocate/expand if necessary. - uint8_t elem_size_lg2 = __builtin_ctz(valbytes); - upb_Array** arr_p = fastdecode_fieldmem(msg, *data); - char* begin; - ((uint32_t*)msg)[2] |= *hasbits; - *hasbits = 0; - if (UPB_LIKELY(!*arr_p)) { - farr->arr = UPB_PRIVATE(_upb_Array_New)(&d->arena, 8, elem_size_lg2); - *arr_p = farr->arr; - } else { - farr->arr = *arr_p; - } - begin = upb_Array_MutableDataPtr(farr->arr); - farr->end = begin + (farr->arr->UPB_PRIVATE(capacity) * valbytes); - *data = _upb_FastDecoder_LoadTag(ptr); - return begin + (farr->arr->UPB_PRIVATE(size) * valbytes); - } - default: - UPB_UNREACHABLE(); - } -} - -UPB_FORCEINLINE -bool fastdecode_flippacked(uint64_t* data, int tagbytes) { - *data ^= (0x2 ^ 0x0); // Patch data to match packed wiretype. - return fastdecode_checktag(*data, tagbytes); -} - -#define FASTDECODE_CHECKPACKED(tagbytes, card, func) \ - if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) { \ - if (card == CARD_r && fastdecode_flippacked(&data, tagbytes)) { \ - UPB_MUSTTAIL return func(UPB_PARSE_ARGS); \ - } \ - RETURN_GENERIC("packed check tag mismatch\n"); \ - } - -/* varint fields **************************************************************/ - -UPB_FORCEINLINE -uint64_t fastdecode_munge(uint64_t val, int valbytes, bool zigzag) { - if (valbytes == 1) { - return val != 0; - } else if (zigzag) { - if (valbytes == 4) { - uint32_t n = val; - return (n >> 1) ^ -(int32_t)(n & 1); - } else if (valbytes == 8) { - return (val >> 1) ^ -(int64_t)(val & 1); - } - UPB_UNREACHABLE(); - } - return val; -} - -UPB_FORCEINLINE -const char* fastdecode_varint64(const char* ptr, uint64_t* val) { - ptr++; - *val = (uint8_t)ptr[-1]; - if (UPB_UNLIKELY(*val & 0x80)) { - int i; - for (i = 0; i < 8; i++) { - ptr++; - uint64_t byte = (uint8_t)ptr[-1]; - *val += (byte - 1) << (7 + 7 * i); - if (UPB_LIKELY((byte & 0x80) == 0)) goto done; - } - ptr++; - uint64_t byte = (uint8_t)ptr[-1]; - if (byte > 1) { - return NULL; - } - *val += (byte - 1) << 63; - } -done: - UPB_ASSUME(ptr != NULL); - return ptr; -} - -#define FASTDECODE_UNPACKEDVARINT(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, card, zigzag, packed) \ - uint64_t val; \ - void* dst; \ - fastdecode_arr farr; \ - \ - FASTDECODE_CHECKPACKED(tagbytes, card, packed); \ - \ - dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, valbytes, \ - card); \ - if (card == CARD_r) { \ - if (UPB_UNLIKELY(!dst)) { \ - RETURN_GENERIC("need array resize\n"); \ - } \ - } \ - \ - again: \ - if (card == CARD_r) { \ - dst = fastdecode_resizearr(d, dst, &farr, valbytes); \ - } \ - \ - ptr += tagbytes; \ - ptr = fastdecode_varint64(ptr, &val); \ - if (ptr == NULL) _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ - val = fastdecode_munge(val, valbytes, zigzag); \ - memcpy(dst, &val, valbytes); \ - \ - if (card == CARD_r) { \ - fastdecode_nextret ret = fastdecode_nextrepeated( \ - d, dst, &ptr, &farr, data, tagbytes, valbytes); \ - switch (ret.next) { \ - case FD_NEXT_SAMEFIELD: \ - dst = ret.dst; \ - goto again; \ - case FD_NEXT_OTHERFIELD: \ - data = ret.tag; \ - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ - case FD_NEXT_ATLIMIT: \ - return ptr; \ - } \ - } \ - \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); - -typedef struct { - uint8_t valbytes; - bool zigzag; - void* dst; - fastdecode_arr farr; -} fastdecode_varintdata; - -UPB_FORCEINLINE -const char* fastdecode_topackedvarint(upb_EpsCopyInputStream* e, - const char* ptr, void* ctx) { - upb_Decoder* d = (upb_Decoder*)e; - fastdecode_varintdata* data = ctx; - void* dst = data->dst; - uint64_t val; - - while (!_upb_Decoder_IsDone(d, &ptr)) { - dst = fastdecode_resizearr(d, dst, &data->farr, data->valbytes); - ptr = fastdecode_varint64(ptr, &val); - if (ptr == NULL) return NULL; - val = fastdecode_munge(val, data->valbytes, data->zigzag); - memcpy(dst, &val, data->valbytes); - dst = (char*)dst + data->valbytes; - } - - fastdecode_commitarr(dst, &data->farr, data->valbytes); - return ptr; -} - -#define FASTDECODE_PACKEDVARINT(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, zigzag, unpacked) \ - fastdecode_varintdata ctx = {valbytes, zigzag}; \ - \ - FASTDECODE_CHECKPACKED(tagbytes, CARD_r, unpacked); \ - \ - ctx.dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &ctx.farr, \ - valbytes, CARD_r); \ - if (UPB_UNLIKELY(!ctx.dst)) { \ - RETURN_GENERIC("need array resize\n"); \ - } \ - \ - ptr += tagbytes; \ - ptr = fastdecode_delimited(d, ptr, &fastdecode_topackedvarint, &ctx); \ - \ - if (UPB_UNLIKELY(ptr == NULL)) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ - } \ - \ - UPB_MUSTTAIL return fastdecode_dispatch(d, ptr, msg, table, hasbits, 0); - -#define FASTDECODE_VARINT(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, card, zigzag, unpacked, packed) \ - if (card == CARD_p) { \ - FASTDECODE_PACKEDVARINT(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, zigzag, unpacked); \ - } else { \ - FASTDECODE_UNPACKEDVARINT(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, card, zigzag, packed); \ - } - -#define z_ZZ true -#define b_ZZ false -#define v_ZZ false - -/* Generate all combinations: - * {s,o,r,p} x {b1,v4,z4,v8,z8} x {1bt,2bt} */ - -#define F(card, type, valbytes, tagbytes) \ - UPB_NOINLINE \ - const char* upb_p##card##type##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS) { \ - FASTDECODE_VARINT(d, ptr, msg, table, hasbits, data, tagbytes, valbytes, \ - CARD_##card, type##_ZZ, \ - upb_pr##type##valbytes##_##tagbytes##bt, \ - upb_pp##type##valbytes##_##tagbytes##bt); \ - } - -#define TYPES(card, tagbytes) \ - F(card, b, 1, tagbytes) \ - F(card, v, 4, tagbytes) \ - F(card, v, 8, tagbytes) \ - F(card, z, 4, tagbytes) \ - F(card, z, 8, tagbytes) - -#define TAGBYTES(card) \ - TYPES(card, 1) \ - TYPES(card, 2) - -TAGBYTES(s) -TAGBYTES(o) -TAGBYTES(r) -TAGBYTES(p) - -#undef z_ZZ -#undef b_ZZ -#undef v_ZZ -#undef o_ONEOF -#undef s_ONEOF -#undef r_ONEOF -#undef F -#undef TYPES -#undef TAGBYTES -#undef FASTDECODE_UNPACKEDVARINT -#undef FASTDECODE_PACKEDVARINT -#undef FASTDECODE_VARINT - -/* fixed fields ***************************************************************/ - -#define FASTDECODE_UNPACKEDFIXED(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, card, packed) \ - void* dst; \ - fastdecode_arr farr; \ - \ - FASTDECODE_CHECKPACKED(tagbytes, card, packed) \ - \ - dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, valbytes, \ - card); \ - if (card == CARD_r) { \ - if (UPB_UNLIKELY(!dst)) { \ - RETURN_GENERIC("couldn't allocate array in arena\n"); \ - } \ - } \ - \ - again: \ - if (card == CARD_r) { \ - dst = fastdecode_resizearr(d, dst, &farr, valbytes); \ - } \ - \ - ptr += tagbytes; \ - memcpy(dst, ptr, valbytes); \ - ptr += valbytes; \ - \ - if (card == CARD_r) { \ - fastdecode_nextret ret = fastdecode_nextrepeated( \ - d, dst, &ptr, &farr, data, tagbytes, valbytes); \ - switch (ret.next) { \ - case FD_NEXT_SAMEFIELD: \ - dst = ret.dst; \ - goto again; \ - case FD_NEXT_OTHERFIELD: \ - data = ret.tag; \ - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ - case FD_NEXT_ATLIMIT: \ - return ptr; \ - } \ - } \ - \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); - -#define FASTDECODE_PACKEDFIXED(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, unpacked) \ - FASTDECODE_CHECKPACKED(tagbytes, CARD_r, unpacked) \ - \ - ptr += tagbytes; \ - int size = (uint8_t)ptr[0]; \ - ptr++; \ - if (size & 0x80) { \ - ptr = fastdecode_longsize(ptr, &size); \ - } \ - \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckDataSizeAvailable( \ - &d->input, ptr, size) || \ - (size % valbytes) != 0)) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ - } \ - \ - upb_Array** arr_p = fastdecode_fieldmem(msg, data); \ - upb_Array* arr = *arr_p; \ - uint8_t elem_size_lg2 = __builtin_ctz(valbytes); \ - int elems = size / valbytes; \ - \ - if (UPB_LIKELY(!arr)) { \ - *arr_p = arr = \ - UPB_PRIVATE(_upb_Array_New)(&d->arena, elems, elem_size_lg2); \ - if (!arr) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ - } \ - } else { \ - UPB_PRIVATE(_upb_Array_ResizeUninitialized)(arr, elems, &d->arena); \ - } \ - \ - char* dst = upb_Array_MutableDataPtr(arr); \ - memcpy(dst, ptr, size); \ - arr->UPB_PRIVATE(size) = elems; \ - \ - ptr += size; \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); - -#define FASTDECODE_FIXED(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, card, unpacked, packed) \ - if (card == CARD_p) { \ - FASTDECODE_PACKEDFIXED(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, unpacked); \ - } else { \ - FASTDECODE_UNPACKEDFIXED(d, ptr, msg, table, hasbits, data, tagbytes, \ - valbytes, card, packed); \ - } - -/* Generate all combinations: - * {s,o,r,p} x {f4,f8} x {1bt,2bt} */ - -#define F(card, valbytes, tagbytes) \ - UPB_NOINLINE \ - const char* upb_p##card##f##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS) { \ - FASTDECODE_FIXED(d, ptr, msg, table, hasbits, data, tagbytes, valbytes, \ - CARD_##card, upb_ppf##valbytes##_##tagbytes##bt, \ - upb_prf##valbytes##_##tagbytes##bt); \ - } - -#define TYPES(card, tagbytes) \ - F(card, 4, tagbytes) \ - F(card, 8, tagbytes) - -#define TAGBYTES(card) \ - TYPES(card, 1) \ - TYPES(card, 2) - -TAGBYTES(s) -TAGBYTES(o) -TAGBYTES(r) -TAGBYTES(p) - -#undef F -#undef TYPES -#undef TAGBYTES -#undef FASTDECODE_UNPACKEDFIXED -#undef FASTDECODE_PACKEDFIXED - -/* string fields **************************************************************/ - -typedef const char* fastdecode_copystr_func(struct upb_Decoder* d, - const char* ptr, upb_Message* msg, - const upb_MiniTable* table, - uint64_t hasbits, - upb_StringView* dst); - -UPB_NOINLINE -static const char* fastdecode_verifyutf8(upb_Decoder* d, const char* ptr, - upb_Message* msg, intptr_t table, - uint64_t hasbits, uint64_t data) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_StringView* dst = (upb_StringView*)data; - if (!_upb_Decoder_VerifyUtf8Inline(dst->data, dst->size)) { - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); - } - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); -} - -#define FASTDECODE_LONGSTRING(d, ptr, msg, table, hasbits, dst, validate_utf8) \ - int size = (uint8_t)ptr[0]; /* Could plumb through hasbits. */ \ - ptr++; \ - if (size & 0x80) { \ - ptr = fastdecode_longsize(ptr, &size); \ - } \ - \ - if (UPB_UNLIKELY(!upb_EpsCopyInputStream_CheckSize(&d->input, ptr, size))) { \ - dst->size = 0; \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ - } \ - \ - const char* s_ptr = ptr; \ - ptr = upb_EpsCopyInputStream_ReadString(&d->input, &s_ptr, size, &d->arena); \ - if (!ptr) _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory); \ - dst->data = s_ptr; \ - dst->size = size; \ - \ - if (validate_utf8) { \ - data = (uint64_t)dst; \ - UPB_MUSTTAIL return fastdecode_verifyutf8(UPB_PARSE_ARGS); \ - } else { \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); \ - } - -UPB_NOINLINE -static const char* fastdecode_longstring_utf8(struct upb_Decoder* d, - const char* ptr, upb_Message* msg, - intptr_t table, uint64_t hasbits, - uint64_t data) { - upb_StringView* dst = (upb_StringView*)data; - FASTDECODE_LONGSTRING(d, ptr, msg, table, hasbits, dst, true); -} - -UPB_NOINLINE -static const char* fastdecode_longstring_noutf8( - struct upb_Decoder* d, const char* ptr, upb_Message* msg, intptr_t table, - uint64_t hasbits, uint64_t data) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_StringView* dst = (upb_StringView*)data; - FASTDECODE_LONGSTRING(d, ptr, msg, table, hasbits, dst, false); -} - -UPB_FORCEINLINE -void fastdecode_docopy(upb_Decoder* d, const char* ptr, uint32_t size, int copy, - char* data, size_t data_offset, upb_StringView* dst) { - d->arena.UPB_PRIVATE(ptr) += copy; - dst->data = data + data_offset; - UPB_UNPOISON_MEMORY_REGION(data, copy); - memcpy(data, ptr, copy); - UPB_POISON_MEMORY_REGION(data + data_offset + size, - copy - data_offset - size); -} - -#define FASTDECODE_COPYSTRING(d, ptr, msg, table, hasbits, data, tagbytes, \ - card, validate_utf8) \ - upb_StringView* dst; \ - fastdecode_arr farr; \ - int64_t size; \ - size_t arena_has; \ - size_t common_has; \ - char* buf; \ - \ - UPB_ASSERT(!upb_EpsCopyInputStream_AliasingAvailable(&d->input, ptr, 0)); \ - UPB_ASSERT(fastdecode_checktag(data, tagbytes)); \ - \ - dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, \ - sizeof(upb_StringView), card); \ - \ - again: \ - if (card == CARD_r) { \ - dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_StringView)); \ - } \ - \ - size = (uint8_t)ptr[tagbytes]; \ - ptr += tagbytes + 1; \ - dst->size = size; \ - \ - buf = d->arena.UPB_PRIVATE(ptr); \ - arena_has = UPB_PRIVATE(_upb_ArenaHas)(&d->arena); \ - common_has = UPB_MIN(arena_has, \ - upb_EpsCopyInputStream_BytesAvailable(&d->input, ptr)); \ - \ - if (UPB_LIKELY(size <= 15 - tagbytes)) { \ - if (arena_has < 16) goto longstr; \ - fastdecode_docopy(d, ptr - tagbytes - 1, size, 16, buf, tagbytes + 1, \ - dst); \ - } else if (UPB_LIKELY(size <= 32)) { \ - if (UPB_UNLIKELY(common_has < 32)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 32, buf, 0, dst); \ - } else if (UPB_LIKELY(size <= 64)) { \ - if (UPB_UNLIKELY(common_has < 64)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 64, buf, 0, dst); \ - } else if (UPB_LIKELY(size < 128)) { \ - if (UPB_UNLIKELY(common_has < 128)) goto longstr; \ - fastdecode_docopy(d, ptr, size, 128, buf, 0, dst); \ - } else { \ - goto longstr; \ - } \ - \ - ptr += size; \ - \ - if (card == CARD_r) { \ - if (validate_utf8 && \ - !_upb_Decoder_VerifyUtf8Inline(dst->data, dst->size)) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); \ - } \ - fastdecode_nextret ret = fastdecode_nextrepeated( \ - d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_StringView)); \ - switch (ret.next) { \ - case FD_NEXT_SAMEFIELD: \ - dst = ret.dst; \ - goto again; \ - case FD_NEXT_OTHERFIELD: \ - data = ret.tag; \ - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ - case FD_NEXT_ATLIMIT: \ - return ptr; \ - } \ - } \ - \ - if (card != CARD_r && validate_utf8) { \ - data = (uint64_t)dst; \ - UPB_MUSTTAIL return fastdecode_verifyutf8(UPB_PARSE_ARGS); \ - } \ - \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); \ - \ - longstr: \ - if (card == CARD_r) { \ - fastdecode_commitarr(dst + 1, &farr, sizeof(upb_StringView)); \ - } \ - ptr--; \ - if (validate_utf8) { \ - UPB_MUSTTAIL return fastdecode_longstring_utf8(d, ptr, msg, table, \ - hasbits, (uint64_t)dst); \ - } else { \ - UPB_MUSTTAIL return fastdecode_longstring_noutf8(d, ptr, msg, table, \ - hasbits, (uint64_t)dst); \ - } - -#define FASTDECODE_STRING(d, ptr, msg, table, hasbits, data, tagbytes, card, \ - copyfunc, validate_utf8) \ - upb_StringView* dst; \ - fastdecode_arr farr; \ - int64_t size; \ - \ - if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) { \ - RETURN_GENERIC("string field tag mismatch\n"); \ - } \ - \ - if (UPB_UNLIKELY( \ - !upb_EpsCopyInputStream_AliasingAvailable(&d->input, ptr, 0))) { \ - UPB_MUSTTAIL return copyfunc(UPB_PARSE_ARGS); \ - } \ - \ - dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, \ - sizeof(upb_StringView), card); \ - \ - again: \ - if (card == CARD_r) { \ - dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_StringView)); \ - } \ - \ - size = (int8_t)ptr[tagbytes]; \ - ptr += tagbytes + 1; \ - \ - if (UPB_UNLIKELY( \ - !upb_EpsCopyInputStream_AliasingAvailable(&d->input, ptr, size))) { \ - ptr--; \ - if (validate_utf8) { \ - return fastdecode_longstring_utf8(d, ptr, msg, table, hasbits, \ - (uint64_t)dst); \ - } else { \ - return fastdecode_longstring_noutf8(d, ptr, msg, table, hasbits, \ - (uint64_t)dst); \ - } \ - } \ - \ - dst->data = ptr; \ - dst->size = size; \ - ptr = upb_EpsCopyInputStream_ReadStringAliased(&d->input, &dst->data, \ - dst->size); \ - \ - if (card == CARD_r) { \ - if (validate_utf8 && \ - !_upb_Decoder_VerifyUtf8Inline(dst->data, dst->size)) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_BadUtf8); \ - } \ - fastdecode_nextret ret = fastdecode_nextrepeated( \ - d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_StringView)); \ - switch (ret.next) { \ - case FD_NEXT_SAMEFIELD: \ - dst = ret.dst; \ - goto again; \ - case FD_NEXT_OTHERFIELD: \ - data = ret.tag; \ - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ - case FD_NEXT_ATLIMIT: \ - return ptr; \ - } \ - } \ - \ - if (card != CARD_r && validate_utf8) { \ - data = (uint64_t)dst; \ - UPB_MUSTTAIL return fastdecode_verifyutf8(UPB_PARSE_ARGS); \ - } \ - \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); - -/* Generate all combinations: - * {p,c} x {s,o,r} x {s, b} x {1bt,2bt} */ - -#define s_VALIDATE true -#define b_VALIDATE false - -#define F(card, tagbytes, type) \ - UPB_NOINLINE \ - const char* upb_c##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS) { \ - FASTDECODE_COPYSTRING(d, ptr, msg, table, hasbits, data, tagbytes, \ - CARD_##card, type##_VALIDATE); \ - } \ - const char* upb_p##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS) { \ - FASTDECODE_STRING(d, ptr, msg, table, hasbits, data, tagbytes, \ - CARD_##card, upb_c##card##type##_##tagbytes##bt, \ - type##_VALIDATE); \ - } - -#define UTF8(card, tagbytes) \ - F(card, tagbytes, s) \ - F(card, tagbytes, b) - -#define TAGBYTES(card) \ - UTF8(card, 1) \ - UTF8(card, 2) - -TAGBYTES(s) -TAGBYTES(o) -TAGBYTES(r) - -#undef s_VALIDATE -#undef b_VALIDATE -#undef F -#undef TAGBYTES -#undef FASTDECODE_LONGSTRING -#undef FASTDECODE_COPYSTRING -#undef FASTDECODE_STRING - -/* message fields *************************************************************/ - -UPB_INLINE -upb_Message* decode_newmsg_ceil(upb_Decoder* d, const upb_MiniTable* m, - int msg_ceil_bytes) { - size_t size = m->UPB_PRIVATE(size); - char* msg_data; - if (UPB_LIKELY(msg_ceil_bytes > 0 && - UPB_PRIVATE(_upb_ArenaHas)(&d->arena) >= msg_ceil_bytes)) { - UPB_ASSERT(size <= (size_t)msg_ceil_bytes); - msg_data = d->arena.UPB_PRIVATE(ptr); - d->arena.UPB_PRIVATE(ptr) += size; - UPB_UNPOISON_MEMORY_REGION(msg_data, msg_ceil_bytes); - memset(msg_data, 0, msg_ceil_bytes); - UPB_POISON_MEMORY_REGION(msg_data + size, msg_ceil_bytes - size); - } else { - msg_data = (char*)upb_Arena_Malloc(&d->arena, size); - memset(msg_data, 0, size); - } - return (upb_Message*)msg_data; -} - -typedef struct { - intptr_t table; - upb_Message* msg; -} fastdecode_submsgdata; - -UPB_FORCEINLINE -const char* fastdecode_tosubmsg(upb_EpsCopyInputStream* e, const char* ptr, - void* ctx) { - upb_Decoder* d = (upb_Decoder*)e; - fastdecode_submsgdata* submsg = ctx; - ptr = fastdecode_dispatch(d, ptr, submsg->msg, submsg->table, 0, 0); - UPB_ASSUME(ptr != NULL); - return ptr; -} - -#define FASTDECODE_SUBMSG(d, ptr, msg, table, hasbits, data, tagbytes, \ - msg_ceil_bytes, card) \ - \ - if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) { \ - RETURN_GENERIC("submessage field tag mismatch\n"); \ - } \ - \ - if (--d->depth == 0) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_MaxDepthExceeded); \ - } \ - \ - upb_Message** dst; \ - uint32_t submsg_idx = (data >> 16) & 0xff; \ - const upb_MiniTable* tablep = decode_totablep(table); \ - const upb_MiniTable* subtablep = \ - UPB_PRIVATE(_upb_MiniTable_GetSubTableByIndex)(tablep, submsg_idx); \ - fastdecode_submsgdata submsg = {decode_totable(subtablep)}; \ - fastdecode_arr farr; \ - \ - if (subtablep->UPB_PRIVATE(table_mask) == (uint8_t)-1) { \ - d->depth++; \ - RETURN_GENERIC("submessage doesn't have fast tables."); \ - } \ - \ - dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, \ - sizeof(upb_Message*), card); \ - \ - if (card == CARD_s) { \ - ((uint32_t*)msg)[2] |= hasbits; \ - hasbits = 0; \ - } \ - \ - again: \ - if (card == CARD_r) { \ - dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_Message*)); \ - } \ - \ - submsg.msg = *dst; \ - \ - if (card == CARD_r || UPB_LIKELY(!submsg.msg)) { \ - *dst = submsg.msg = decode_newmsg_ceil(d, subtablep, msg_ceil_bytes); \ - } \ - \ - ptr += tagbytes; \ - ptr = fastdecode_delimited(d, ptr, fastdecode_tosubmsg, &submsg); \ - \ - if (UPB_UNLIKELY(ptr == NULL || d->end_group != DECODE_NOGROUP)) { \ - _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); \ - } \ - \ - if (card == CARD_r) { \ - fastdecode_nextret ret = fastdecode_nextrepeated( \ - d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_Message*)); \ - switch (ret.next) { \ - case FD_NEXT_SAMEFIELD: \ - dst = ret.dst; \ - goto again; \ - case FD_NEXT_OTHERFIELD: \ - d->depth++; \ - data = ret.tag; \ - UPB_MUSTTAIL return _upb_FastDecoder_TagDispatch(UPB_PARSE_ARGS); \ - case FD_NEXT_ATLIMIT: \ - d->depth++; \ - return ptr; \ - } \ - } \ - \ - d->depth++; \ - UPB_MUSTTAIL return fastdecode_dispatch(UPB_PARSE_ARGS); - -#define F(card, tagbytes, size_ceil, ceil_arg) \ - const char* upb_p##card##m_##tagbytes##bt_max##size_ceil##b( \ - UPB_PARSE_PARAMS) { \ - FASTDECODE_SUBMSG(d, ptr, msg, table, hasbits, data, tagbytes, ceil_arg, \ - CARD_##card); \ - } - -#define SIZES(card, tagbytes) \ - F(card, tagbytes, 64, 64) \ - F(card, tagbytes, 128, 128) \ - F(card, tagbytes, 192, 192) \ - F(card, tagbytes, 256, 256) \ - F(card, tagbytes, max, -1) - -#define TAGBYTES(card) \ - SIZES(card, 1) \ - SIZES(card, 2) - -TAGBYTES(s) -TAGBYTES(o) -TAGBYTES(r) - -#undef TAGBYTES -#undef SIZES -#undef F -#undef FASTDECODE_SUBMSG - -#endif /* UPB_FASTTABLE */ - - -#include -#include - - -// Must be last. - -UPB_NOINLINE UPB_PRIVATE(_upb_WireReader_LongVarint) - UPB_PRIVATE(_upb_WireReader_ReadLongVarint)(const char* ptr, uint64_t val) { - UPB_PRIVATE(_upb_WireReader_LongVarint) ret = {NULL, 0}; - uint64_t byte; - for (int i = 1; i < 10; i++) { - byte = (uint8_t)ptr[i]; - val += (byte - 1) << (i * 7); - if (!(byte & 0x80)) { - ret.ptr = ptr + i + 1; - ret.val = val; - return ret; - } - } - return ret; -} - -const char* UPB_PRIVATE(_upb_WireReader_SkipGroup)( - const char* ptr, uint32_t tag, int depth_limit, - upb_EpsCopyInputStream* stream) { - if (--depth_limit == 0) return NULL; - uint32_t end_group_tag = (tag & ~7ULL) | kUpb_WireType_EndGroup; - while (!upb_EpsCopyInputStream_IsDone(stream, &ptr)) { - uint32_t tag; - ptr = upb_WireReader_ReadTag(ptr, &tag); - if (!ptr) return NULL; - if (tag == end_group_tag) return ptr; - ptr = _upb_WireReader_SkipValue(ptr, tag, depth_limit, stream); - if (!ptr) return NULL; - } - return ptr; -} - -/* This file was generated by upb_generator from the input file: - * - * google/protobuf/descriptor.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. - * NO CHECKED-IN PROTOBUF GENCODE */ - -#include - -// Must be last. - -extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_StaticallyTreeShaken); -static const upb_MiniTableSubInternal google_protobuf_FileDescriptorSet__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FileDescriptorProto_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_FileDescriptorSet__fields[1] = { - {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FileDescriptorSet_msg_init = { - &google_protobuf_FileDescriptorSet__submsgs[0], - &google_protobuf_FileDescriptorSet__fields[0], - 16, 1, kUpb_ExtMode_Extendable, 1, UPB_FASTTABLE_MASK(8), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FileDescriptorSet", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x000800003f00000a, &upb_prm_1bt_max192b}, - }) -}; - -const upb_MiniTable* google__protobuf__FileDescriptorSet_msg_init_ptr = &google__protobuf__FileDescriptorSet_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FileDescriptorProto__submsgs[7] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__DescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__EnumDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__ServiceDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FieldDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FileOptions_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__SourceCodeInfo_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FileDescriptorProto__fields[14] = { - {1, UPB_SIZE(56, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(64, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(32, 104), 66, 4, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {9, UPB_SIZE(36, 112), 67, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {12, UPB_SIZE(72, 48), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {14, UPB_SIZE(48, 12), 69, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FileDescriptorProto_msg_init = { - &google_protobuf_FileDescriptorProto__submsgs[0], - &google_protobuf_FileDescriptorProto__fields[0], - UPB_SIZE(80, 144), 14, kUpb_ExtMode_NonExtendable, 12, UPB_FASTTABLE_MASK(120), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FileDescriptorProto", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x004000003f00001a, &upb_prs_1bt}, - {0x004800003f000022, &upb_prm_1bt_max128b}, - {0x005000003f01002a, &upb_prm_1bt_max128b}, - {0x005800003f020032, &upb_prm_1bt_max64b}, - {0x006000003f03003a, &upb_prm_1bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x007800003f000050, &upb_prv4_1bt}, - {0x008000003f000058, &upb_prv4_1bt}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x008800003f00007a, &upb_prs_1bt}, - }) -}; - -const upb_MiniTable* google__protobuf__FileDescriptorProto_msg_init_ptr = &google__protobuf__FileDescriptorProto_msg_init; -static const upb_MiniTableSubInternal google_protobuf_DescriptorProto__submsgs[9] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FieldDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__DescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__EnumDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__DescriptorProto__ExtensionRange_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FieldDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__MessageOptions_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__OneofDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__DescriptorProto__ReservedRange_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__SymbolVisibility_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_DescriptorProto__fields[11] = { - {1, UPB_SIZE(52, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(32, 72), 65, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {11, UPB_SIZE(48, 12), 66, 8, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__DescriptorProto_msg_init = { - &google_protobuf_DescriptorProto__submsgs[0], - &google_protobuf_DescriptorProto__fields[0], - UPB_SIZE(64, 104), 11, kUpb_ExtMode_NonExtendable, 11, UPB_FASTTABLE_MASK(120), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.DescriptorProto", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x002000003f000012, &upb_prm_1bt_max128b}, - {0x002800003f01001a, &upb_prm_1bt_max128b}, - {0x003000003f020022, &upb_prm_1bt_max128b}, - {0x003800003f03002a, &upb_prm_1bt_max64b}, - {0x004000003f040032, &upb_prm_1bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x005000003f060042, &upb_prm_1bt_max64b}, - {0x005800003f07004a, &upb_prm_1bt_max64b}, - {0x006000003f000052, &upb_prs_1bt}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__DescriptorProto_msg_init_ptr = &google__protobuf__DescriptorProto_msg_init; -static const upb_MiniTableSubInternal google_protobuf_DescriptorProto_ExtensionRange__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__ExtensionRangeOptions_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_DescriptorProto_ExtensionRange__fields[3] = { - {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(20, 24), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__DescriptorProto__ExtensionRange_msg_init = { - &google_protobuf_DescriptorProto_ExtensionRange__submsgs[0], - &google_protobuf_DescriptorProto_ExtensionRange__fields[0], - UPB_SIZE(24, 32), 3, kUpb_ExtMode_NonExtendable, 3, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.DescriptorProto.ExtensionRange", -#endif -}; - -const upb_MiniTable* google__protobuf__DescriptorProto__ExtensionRange_msg_init_ptr = &google__protobuf__DescriptorProto__ExtensionRange_msg_init; -static const upb_MiniTableField google_protobuf_DescriptorProto_ReservedRange__fields[2] = { - {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__DescriptorProto__ReservedRange_msg_init = { - NULL, - &google_protobuf_DescriptorProto_ReservedRange__fields[0], - 24, 2, kUpb_ExtMode_NonExtendable, 2, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.DescriptorProto.ReservedRange", -#endif -}; - -const upb_MiniTable* google__protobuf__DescriptorProto__ReservedRange_msg_init_ptr = &google__protobuf__DescriptorProto__ReservedRange_msg_init; -static const upb_MiniTableSubInternal google_protobuf_ExtensionRangeOptions__submsgs[4] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__ExtensionRangeOptions__Declaration_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__ExtensionRangeOptions__VerificationState_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_ExtensionRangeOptions__fields[4] = { - {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 12), 64, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {50, UPB_SIZE(20, 24), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__ExtensionRangeOptions_msg_init = { - &google_protobuf_ExtensionRangeOptions__submsgs[0], - &google_protobuf_ExtensionRangeOptions__fields[0], - UPB_SIZE(32, 40), 4, kUpb_ExtMode_Extendable, 0, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.ExtensionRangeOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x001000003f000012, &upb_prm_1bt_max64b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x002000003f023eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__ExtensionRangeOptions_msg_init_ptr = &google__protobuf__ExtensionRangeOptions_msg_init; -static const upb_MiniTableField google_protobuf_ExtensionRangeOptions_Declaration__fields[5] = { - {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {2, 16, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(24, 32), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {5, 9, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {6, 10, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__ExtensionRangeOptions__Declaration_msg_init = { - NULL, - &google_protobuf_ExtensionRangeOptions_Declaration__fields[0], - UPB_SIZE(32, 48), 5, kUpb_ExtMode_NonExtendable, 3, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.ExtensionRangeOptions.Declaration", -#endif -}; - -const upb_MiniTable* google__protobuf__ExtensionRangeOptions__Declaration_msg_init_ptr = &google__protobuf__ExtensionRangeOptions__Declaration_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FieldDescriptorProto__submsgs[3] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FieldOptions_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FieldDescriptorProto__Label_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FieldDescriptorProto__Type_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FieldDescriptorProto__fields[11] = { - {1, 32, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(40, 48), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, 12, 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {4, 16, 67, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {5, 20, 68, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(48, 64), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(56, 80), 70, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(24, 112), 71, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {9, UPB_SIZE(28, 24), 72, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {10, UPB_SIZE(64, 96), 73, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {17, 10, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FieldDescriptorProto_msg_init = { - &google_protobuf_FieldDescriptorProto__submsgs[0], - &google_protobuf_FieldDescriptorProto__fields[0], - UPB_SIZE(72, 120), 11, kUpb_ExtMode_NonExtendable, 10, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FieldDescriptorProto", -#endif -}; - -const upb_MiniTable* google__protobuf__FieldDescriptorProto_msg_init_ptr = &google__protobuf__FieldDescriptorProto_msg_init; -static const upb_MiniTableSubInternal google_protobuf_OneofDescriptorProto__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__OneofOptions_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_OneofDescriptorProto__fields[2] = { - {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 32), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__OneofDescriptorProto_msg_init = { - &google_protobuf_OneofDescriptorProto__submsgs[0], - &google_protobuf_OneofDescriptorProto__fields[0], - UPB_SIZE(24, 40), 2, kUpb_ExtMode_NonExtendable, 2, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.OneofDescriptorProto", -#endif -}; - -const upb_MiniTable* google__protobuf__OneofDescriptorProto_msg_init_ptr = &google__protobuf__OneofDescriptorProto_msg_init; -static const upb_MiniTableSubInternal google_protobuf_EnumDescriptorProto__submsgs[4] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__EnumValueDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__EnumOptions_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__SymbolVisibility_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_EnumDescriptorProto__fields[6] = { - {1, UPB_SIZE(32, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(28, 12), 66, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__EnumDescriptorProto_msg_init = { - &google_protobuf_EnumDescriptorProto__submsgs[0], - &google_protobuf_EnumDescriptorProto__fields[0], - UPB_SIZE(40, 64), 6, kUpb_ExtMode_NonExtendable, 6, UPB_FASTTABLE_MASK(56), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.EnumDescriptorProto", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x002000003f000012, &upb_prm_1bt_max64b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x003000003f020022, &upb_prm_1bt_max64b}, - {0x003800003f00002a, &upb_prs_1bt}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__EnumDescriptorProto_msg_init_ptr = &google__protobuf__EnumDescriptorProto_msg_init; -static const upb_MiniTableField google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[2] = { - {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init = { - NULL, - &google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[0], - 24, 2, kUpb_ExtMode_NonExtendable, 2, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.EnumDescriptorProto.EnumReservedRange", -#endif -}; - -const upb_MiniTable* google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init_ptr = &google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init; -static const upb_MiniTableSubInternal google_protobuf_EnumValueDescriptorProto__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__EnumValueOptions_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_EnumValueDescriptorProto__fields[3] = { - {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, 12, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 32), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__EnumValueDescriptorProto_msg_init = { - &google_protobuf_EnumValueDescriptorProto__submsgs[0], - &google_protobuf_EnumValueDescriptorProto__fields[0], - UPB_SIZE(32, 40), 3, kUpb_ExtMode_NonExtendable, 3, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.EnumValueDescriptorProto", -#endif -}; - -const upb_MiniTable* google__protobuf__EnumValueDescriptorProto_msg_init_ptr = &google__protobuf__EnumValueDescriptorProto_msg_init; -static const upb_MiniTableSubInternal google_protobuf_ServiceDescriptorProto__submsgs[2] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__MethodDescriptorProto_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__ServiceOptions_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_ServiceDescriptorProto__fields[3] = { - {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__ServiceDescriptorProto_msg_init = { - &google_protobuf_ServiceDescriptorProto__submsgs[0], - &google_protobuf_ServiceDescriptorProto__fields[0], - UPB_SIZE(32, 48), 3, kUpb_ExtMode_NonExtendable, 3, UPB_FASTTABLE_MASK(24), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.ServiceDescriptorProto", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x002000003f000012, &upb_prm_1bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__ServiceDescriptorProto_msg_init_ptr = &google__protobuf__ServiceDescriptorProto_msg_init; -static const upb_MiniTableSubInternal google_protobuf_MethodDescriptorProto__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__MethodOptions_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_MethodDescriptorProto__fields[6] = { - {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(24, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(32, 48), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(12, 64), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {5, 9, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {6, 10, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__MethodDescriptorProto_msg_init = { - &google_protobuf_MethodDescriptorProto__submsgs[0], - &google_protobuf_MethodDescriptorProto__fields[0], - UPB_SIZE(40, 72), 6, kUpb_ExtMode_NonExtendable, 6, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.MethodDescriptorProto", -#endif -}; - -const upb_MiniTable* google__protobuf__MethodDescriptorProto_msg_init_ptr = &google__protobuf__MethodDescriptorProto_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FileOptions__submsgs[3] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FileOptions__OptimizeMode_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FileOptions__fields[21] = { - {1, UPB_SIZE(32, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {8, 40, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {9, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {10, 11, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {11, UPB_SIZE(48, 56), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {16, 12, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {17, 13, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {18, 14, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {20, 15, 72, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {23, 16, 73, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {27, 17, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {31, 18, 75, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {36, UPB_SIZE(56, 72), 76, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {37, UPB_SIZE(64, 88), 77, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {39, UPB_SIZE(72, 104), 78, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {40, UPB_SIZE(80, 120), 79, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {41, UPB_SIZE(88, 136), 80, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {44, UPB_SIZE(96, 152), 81, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {45, UPB_SIZE(104, 168), 82, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {50, UPB_SIZE(24, 184), 83, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FileOptions_msg_init = { - &google_protobuf_FileOptions__submsgs[0], - &google_protobuf_FileOptions__fields[0], - UPB_SIZE(112, 200), 21, kUpb_ExtMode_Extendable, 1, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FileOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x00c000003f013eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__FileOptions_msg_init_ptr = &google__protobuf__FileOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_MessageOptions__submsgs[2] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_MessageOptions__fields[7] = { - {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {7, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {11, 13, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {12, 16, 69, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__MessageOptions_msg_init = { - &google_protobuf_MessageOptions__submsgs[0], - &google_protobuf_MessageOptions__fields[0], - UPB_SIZE(24, 32), 7, kUpb_ExtMode_Extendable, 3, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.MessageOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x001800003f013eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__MessageOptions_msg_init_ptr = &google__protobuf__MessageOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FieldOptions__submsgs[8] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FieldOptions__EditionDefault_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FieldOptions__FeatureSupport_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FieldOptions__CType_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FieldOptions__JSType_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FieldOptions__OptionRetention_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FieldOptions__OptionTargetType_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FieldOptions__fields[14] = { - {1, 16, 64, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {5, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {6, 20, 68, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {10, 13, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {15, 14, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {16, 15, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {17, 24, 72, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {21, UPB_SIZE(36, 48), 73, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {22, UPB_SIZE(40, 56), 74, 2, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FieldOptions_msg_init = { - &google_protobuf_FieldOptions__submsgs[0], - &google_protobuf_FieldOptions__fields[0], - UPB_SIZE(48, 72), 14, kUpb_ExtMode_Extendable, 3, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FieldOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x002800003f0001a2, &upb_prm_2bt_max64b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x004000003f033eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__FieldOptions_msg_init_ptr = &google__protobuf__FieldOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FieldOptions_EditionDefault__submsgs[1] = { - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FieldOptions_EditionDefault__fields[2] = { - {2, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, 12, 65, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FieldOptions__EditionDefault_msg_init = { - &google_protobuf_FieldOptions_EditionDefault__submsgs[0], - &google_protobuf_FieldOptions_EditionDefault__fields[0], - UPB_SIZE(24, 32), 2, kUpb_ExtMode_NonExtendable, 0, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FieldOptions.EditionDefault", -#endif -}; - -const upb_MiniTable* google__protobuf__FieldOptions__EditionDefault_msg_init_ptr = &google__protobuf__FieldOptions__EditionDefault_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FieldOptions_FeatureSupport__submsgs[3] = { - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FieldOptions_FeatureSupport__fields[4] = { - {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {3, 24, 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {4, 20, 67, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FieldOptions__FeatureSupport_msg_init = { - &google_protobuf_FieldOptions_FeatureSupport__submsgs[0], - &google_protobuf_FieldOptions_FeatureSupport__fields[0], - UPB_SIZE(32, 40), 4, kUpb_ExtMode_NonExtendable, 4, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FieldOptions.FeatureSupport", -#endif -}; - -const upb_MiniTable* google__protobuf__FieldOptions__FeatureSupport_msg_init_ptr = &google__protobuf__FieldOptions__FeatureSupport_msg_init; -static const upb_MiniTableSubInternal google_protobuf_OneofOptions__submsgs[2] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_OneofOptions__fields[2] = { - {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__OneofOptions_msg_init = { - &google_protobuf_OneofOptions__submsgs[0], - &google_protobuf_OneofOptions__fields[0], - UPB_SIZE(24, 32), 2, kUpb_ExtMode_Extendable, 1, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.OneofOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x001800003f013eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__OneofOptions_msg_init_ptr = &google__protobuf__OneofOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_EnumOptions__submsgs[2] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_EnumOptions__fields[5] = { - {2, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {3, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {6, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(12, 16), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__EnumOptions_msg_init = { - &google_protobuf_EnumOptions__submsgs[0], - &google_protobuf_EnumOptions__fields[0], - UPB_SIZE(24, 32), 5, kUpb_ExtMode_Extendable, 0, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.EnumOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x001800003f013eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__EnumOptions_msg_init_ptr = &google__protobuf__EnumOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_EnumValueOptions__submsgs[3] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FieldOptions__FeatureSupport_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_EnumValueOptions__fields[5] = { - {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {3, 10, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(16, 24), 67, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__EnumValueOptions_msg_init = { - &google_protobuf_EnumValueOptions__submsgs[0], - &google_protobuf_EnumValueOptions__fields[0], - UPB_SIZE(24, 40), 5, kUpb_ExtMode_Extendable, 4, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.EnumValueOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x002000003f023eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__EnumValueOptions_msg_init_ptr = &google__protobuf__EnumValueOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_ServiceOptions__submsgs[2] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_ServiceOptions__fields[3] = { - {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {34, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__ServiceOptions_msg_init = { - &google_protobuf_ServiceOptions__submsgs[0], - &google_protobuf_ServiceOptions__fields[0], - UPB_SIZE(24, 32), 3, kUpb_ExtMode_Extendable, 0, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.ServiceOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x001800003f013eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__ServiceOptions_msg_init_ptr = &google__protobuf__ServiceOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_MethodOptions__submsgs[3] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__MethodOptions__IdempotencyLevel_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_MethodOptions__fields[4] = { - {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, - {34, 12, 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {35, 16, 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__MethodOptions_msg_init = { - &google_protobuf_MethodOptions__submsgs[0], - &google_protobuf_MethodOptions__fields[0], - UPB_SIZE(24, 32), 4, kUpb_ExtMode_Extendable, 0, UPB_FASTTABLE_MASK(248), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.MethodOptions", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x001800003f013eba, &upb_prm_2bt_max128b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__MethodOptions_msg_init_ptr = &google__protobuf__MethodOptions_msg_init; -static const upb_MiniTableSubInternal google_protobuf_UninterpretedOption__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__UninterpretedOption__NamePart_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_UninterpretedOption__fields[7] = { - {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {3, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(40, 72), 65, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(48, 80), 66, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(56, 88), 67, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}, - {7, UPB_SIZE(24, 32), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {8, UPB_SIZE(32, 48), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__UninterpretedOption_msg_init = { - &google_protobuf_UninterpretedOption__submsgs[0], - &google_protobuf_UninterpretedOption__fields[0], - UPB_SIZE(64, 96), 7, kUpb_ExtMode_NonExtendable, 0, UPB_FASTTABLE_MASK(24), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.UninterpretedOption", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x004000003f000012, &upb_prm_1bt_max64b}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__UninterpretedOption_msg_init_ptr = &google__protobuf__UninterpretedOption_msg_init; -static const upb_MiniTableField google_protobuf_UninterpretedOption_NamePart__fields[2] = { - {1, UPB_SIZE(12, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {2, 9, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__UninterpretedOption__NamePart_msg_init = { - NULL, - &google_protobuf_UninterpretedOption_NamePart__fields[0], - UPB_SIZE(24, 32), 2, kUpb_ExtMode_NonExtendable, 2, UPB_FASTTABLE_MASK(255), 2, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.UninterpretedOption.NamePart", -#endif -}; - -const upb_MiniTable* google__protobuf__UninterpretedOption__NamePart_msg_init_ptr = &google__protobuf__UninterpretedOption__NamePart_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FeatureSet__submsgs[8] = { - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__FieldPresence_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__EnumType_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__RepeatedFieldEncoding_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__Utf8Validation_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__MessageEncoding_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__JsonFormat_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__EnforceNamingStyle_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__FeatureSet__VisibilityFeature__DefaultSymbolVisibility_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FeatureSet__fields[8] = { - {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {3, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {4, 24, 67, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {5, 28, 68, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {6, 32, 69, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {7, 36, 70, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {8, 40, 71, 7, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FeatureSet_msg_init = { - &google_protobuf_FeatureSet__submsgs[0], - &google_protobuf_FeatureSet__fields[0], - 48, 8, kUpb_ExtMode_Extendable, 8, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FeatureSet", -#endif -}; - -const upb_MiniTable* google__protobuf__FeatureSet_msg_init_ptr = &google__protobuf__FeatureSet_msg_init; -const upb_MiniTable google__protobuf__FeatureSet__VisibilityFeature_msg_init = { - NULL, - NULL, - 8, 0, kUpb_ExtMode_NonExtendable, 0, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FeatureSet.VisibilityFeature", -#endif -}; - -const upb_MiniTable* google__protobuf__FeatureSet__VisibilityFeature_msg_init_ptr = &google__protobuf__FeatureSet__VisibilityFeature_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FeatureSetDefaults__submsgs[3] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FeatureSetDefaults__fields[3] = { - {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(16, 12), 64, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(20, 16), 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FeatureSetDefaults_msg_init = { - &google_protobuf_FeatureSetDefaults__submsgs[0], - &google_protobuf_FeatureSetDefaults__fields[0], - UPB_SIZE(24, 32), 3, kUpb_ExtMode_NonExtendable, 1, UPB_FASTTABLE_MASK(8), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FeatureSetDefaults", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x001800003f00000a, &upb_prm_1bt_max64b}, - }) -}; - -const upb_MiniTable* google__protobuf__FeatureSetDefaults_msg_init_ptr = &google__protobuf__FeatureSetDefaults_msg_init; -static const upb_MiniTableSubInternal google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__submsgs[3] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(submsg) = &google__protobuf__FeatureSet_msg_init_ptr}, - {.UPB_PRIVATE(subenum) = &google__protobuf__Edition_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__fields[3] = { - {3, 12, 64, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {4, 16, 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(20, 24), 66, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init = { - &google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__submsgs[0], - &google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__fields[0], - UPB_SIZE(24, 32), 3, kUpb_ExtMode_NonExtendable, 0, UPB_FASTTABLE_MASK(255), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault", -#endif -}; - -const upb_MiniTable* google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init_ptr = &google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init; -static const upb_MiniTableSubInternal google_protobuf_SourceCodeInfo__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__SourceCodeInfo__Location_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_SourceCodeInfo__fields[1] = { - {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__SourceCodeInfo_msg_init = { - &google_protobuf_SourceCodeInfo__submsgs[0], - &google_protobuf_SourceCodeInfo__fields[0], - 16, 1, kUpb_ExtMode_Extendable, 1, UPB_FASTTABLE_MASK(8), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.SourceCodeInfo", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x000800003f00000a, &upb_prm_1bt_max128b}, - }) -}; - -const upb_MiniTable* google__protobuf__SourceCodeInfo_msg_init_ptr = &google__protobuf__SourceCodeInfo_msg_init; -static const upb_MiniTableField google_protobuf_SourceCodeInfo_Location__fields[5] = { - {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(24, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {4, 32, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__SourceCodeInfo__Location_msg_init = { - NULL, - &google_protobuf_SourceCodeInfo_Location__fields[0], - UPB_SIZE(40, 72), 5, kUpb_ExtMode_NonExtendable, 4, UPB_FASTTABLE_MASK(56), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.SourceCodeInfo.Location", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x003000003f00000a, &upb_ppv4_1bt}, - {0x003800003f000012, &upb_ppv4_1bt}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x004000003f000032, &upb_prs_1bt}, - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - }) -}; - -const upb_MiniTable* google__protobuf__SourceCodeInfo__Location_msg_init_ptr = &google__protobuf__SourceCodeInfo__Location_msg_init; -static const upb_MiniTableSubInternal google_protobuf_GeneratedCodeInfo__submsgs[1] = { - {.UPB_PRIVATE(submsg) = &google__protobuf__GeneratedCodeInfo__Annotation_msg_init_ptr}, -}; - -static const upb_MiniTableField google_protobuf_GeneratedCodeInfo__fields[1] = { - {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__GeneratedCodeInfo_msg_init = { - &google_protobuf_GeneratedCodeInfo__submsgs[0], - &google_protobuf_GeneratedCodeInfo__fields[0], - 16, 1, kUpb_ExtMode_NonExtendable, 1, UPB_FASTTABLE_MASK(8), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.GeneratedCodeInfo", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x000800003f00000a, &upb_prm_1bt_max64b}, - }) -}; - -const upb_MiniTable* google__protobuf__GeneratedCodeInfo_msg_init_ptr = &google__protobuf__GeneratedCodeInfo_msg_init; -static const upb_MiniTableSubInternal google_protobuf_GeneratedCodeInfo_Annotation__submsgs[1] = { - {.UPB_PRIVATE(subenum) = &google__protobuf__GeneratedCodeInfo__Annotation__Semantic_enum_init}, -}; - -static const upb_MiniTableField google_protobuf_GeneratedCodeInfo_Annotation__fields[5] = { - {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}, - {2, UPB_SIZE(28, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 12), 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {4, UPB_SIZE(20, 16), 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, - {5, UPB_SIZE(24, 20), 67, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}, -}; - -const upb_MiniTable google__protobuf__GeneratedCodeInfo__Annotation_msg_init = { - &google_protobuf_GeneratedCodeInfo_Annotation__submsgs[0], - &google_protobuf_GeneratedCodeInfo_Annotation__fields[0], - UPB_SIZE(40, 48), 5, kUpb_ExtMode_NonExtendable, 5, UPB_FASTTABLE_MASK(8), 0, -#ifdef UPB_TRACING_ENABLED - "google.protobuf.GeneratedCodeInfo.Annotation", -#endif - UPB_FASTTABLE_INIT({ - {0x0000000000000000, &_upb_FastDecoder_DecodeGeneric}, - {0x002800003f00000a, &upb_ppv4_1bt}, - }) -}; - -const upb_MiniTable* google__protobuf__GeneratedCodeInfo__Annotation_msg_init_ptr = &google__protobuf__GeneratedCodeInfo__Annotation_msg_init; -const upb_MiniTableEnum google__protobuf__Edition_enum_init = { - 64, - 9, - { - 0x7, - 0x0, - 0x384, - 0x3e6, - 0x3e7, - 0x3e8, - 0x3e9, - 0x1869d, - 0x1869e, - 0x1869f, - 0x7fffffff, - }, -}; - -const upb_MiniTableEnum google__protobuf__ExtensionRangeOptions__VerificationState_enum_init = { - 64, - 0, - { - 0x3, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__EnforceNamingStyle_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__EnumType_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__FieldPresence_enum_init = { - 64, - 0, - { - 0xf, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__JsonFormat_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__MessageEncoding_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__RepeatedFieldEncoding_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__Utf8Validation_enum_init = { - 64, - 0, - { - 0xd, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FeatureSet__VisibilityFeature__DefaultSymbolVisibility_enum_init = { - 64, - 0, - { - 0x1f, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FieldDescriptorProto__Label_enum_init = { - 64, - 0, - { - 0xe, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FieldDescriptorProto__Type_enum_init = { - 64, - 0, - { - 0x7fffe, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FieldOptions__CType_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FieldOptions__JSType_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FieldOptions__OptionRetention_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FieldOptions__OptionTargetType_enum_init = { - 64, - 0, - { - 0x3ff, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__FileOptions__OptimizeMode_enum_init = { - 64, - 0, - { - 0xe, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__GeneratedCodeInfo__Annotation__Semantic_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__MethodOptions__IdempotencyLevel_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -const upb_MiniTableEnum google__protobuf__SymbolVisibility_enum_init = { - 64, - 0, - { - 0x7, - 0x0, - }, -}; - -static const upb_MiniTable *messages_layout[34] = { - &google__protobuf__FileDescriptorSet_msg_init, - &google__protobuf__FileDescriptorProto_msg_init, - &google__protobuf__DescriptorProto_msg_init, - &google__protobuf__DescriptorProto__ExtensionRange_msg_init, - &google__protobuf__DescriptorProto__ReservedRange_msg_init, - &google__protobuf__ExtensionRangeOptions_msg_init, - &google__protobuf__ExtensionRangeOptions__Declaration_msg_init, - &google__protobuf__FieldDescriptorProto_msg_init, - &google__protobuf__OneofDescriptorProto_msg_init, - &google__protobuf__EnumDescriptorProto_msg_init, - &google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, - &google__protobuf__EnumValueDescriptorProto_msg_init, - &google__protobuf__ServiceDescriptorProto_msg_init, - &google__protobuf__MethodDescriptorProto_msg_init, - &google__protobuf__FileOptions_msg_init, - &google__protobuf__MessageOptions_msg_init, - &google__protobuf__FieldOptions_msg_init, - &google__protobuf__FieldOptions__EditionDefault_msg_init, - &google__protobuf__FieldOptions__FeatureSupport_msg_init, - &google__protobuf__OneofOptions_msg_init, - &google__protobuf__EnumOptions_msg_init, - &google__protobuf__EnumValueOptions_msg_init, - &google__protobuf__ServiceOptions_msg_init, - &google__protobuf__MethodOptions_msg_init, - &google__protobuf__UninterpretedOption_msg_init, - &google__protobuf__UninterpretedOption__NamePart_msg_init, - &google__protobuf__FeatureSet_msg_init, - &google__protobuf__FeatureSet__VisibilityFeature_msg_init, - &google__protobuf__FeatureSetDefaults_msg_init, - &google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, - &google__protobuf__SourceCodeInfo_msg_init, - &google__protobuf__SourceCodeInfo__Location_msg_init, - &google__protobuf__GeneratedCodeInfo_msg_init, - &google__protobuf__GeneratedCodeInfo__Annotation_msg_init, -}; - -static const upb_MiniTableEnum *enums_layout[20] = { - &google__protobuf__Edition_enum_init, - &google__protobuf__ExtensionRangeOptions__VerificationState_enum_init, - &google__protobuf__FeatureSet__EnforceNamingStyle_enum_init, - &google__protobuf__FeatureSet__EnumType_enum_init, - &google__protobuf__FeatureSet__FieldPresence_enum_init, - &google__protobuf__FeatureSet__JsonFormat_enum_init, - &google__protobuf__FeatureSet__MessageEncoding_enum_init, - &google__protobuf__FeatureSet__RepeatedFieldEncoding_enum_init, - &google__protobuf__FeatureSet__Utf8Validation_enum_init, - &google__protobuf__FeatureSet__VisibilityFeature__DefaultSymbolVisibility_enum_init, - &google__protobuf__FieldDescriptorProto__Label_enum_init, - &google__protobuf__FieldDescriptorProto__Type_enum_init, - &google__protobuf__FieldOptions__CType_enum_init, - &google__protobuf__FieldOptions__JSType_enum_init, - &google__protobuf__FieldOptions__OptionRetention_enum_init, - &google__protobuf__FieldOptions__OptionTargetType_enum_init, - &google__protobuf__FileOptions__OptimizeMode_enum_init, - &google__protobuf__GeneratedCodeInfo__Annotation__Semantic_enum_init, - &google__protobuf__MethodOptions__IdempotencyLevel_enum_init, - &google__protobuf__SymbolVisibility_enum_init, -}; - -const upb_MiniTableFile google_protobuf_descriptor_proto_upb_file_layout = { - messages_layout, - enums_layout, - NULL, - 34, - 20, - 0, -}; - - - -/* - * upb_table Implementation - * - * Implementation is heavily inspired by Lua's ltable.c. - */ - - -#include -#include - - -// Must be last. - -#define UPB_MAXARRSIZE 16 // 2**16 = 64k. - -// From Chromium. -#define ARRAY_SIZE(x) \ - ((sizeof(x) / sizeof(0 [x])) / ((size_t)(!(sizeof(x) % sizeof(0 [x]))))) - -/* The minimum utilization of the array part of a mixed hash/array table. This - * is a speed/memory-usage tradeoff (though it's not straightforward because of - * cache effects). The lower this is, the more memory we'll use. */ -static const double MIN_DENSITY = 0.1; - -#if defined(__has_builtin) -#if __has_builtin(__builtin_popcount) -#define UPB_FAST_POPCOUNT32(i) __builtin_popcount(i) -#endif -#elif defined(__GNUC__) -#define UPB_FAST_POPCOUNT32(i) __builtin_popcount(i) -#elif defined(_MSC_VER) -#define UPB_FAST_POPCOUNT32(i) __popcnt(i) -#endif - -UPB_INLINE int _upb_popcnt32(uint32_t i) { -#ifdef UPB_FAST_POPCOUNT32 - return UPB_FAST_POPCOUNT32(i); -#else - int count = 0; - while (i != 0) { - count += i & 1; - i >>= 1; - } - return count; -#endif -} - -#undef UPB_FAST_POPCOUNT32 - -UPB_INLINE uint8_t _upb_log2_table_size(upb_table* t) { - return _upb_popcnt32(t->mask); -} - -static bool is_pow2(uint64_t v) { return v == 0 || (v & (v - 1)) == 0; } - -static int log2ceil(uint64_t v) { - int ret = 0; - bool pow2 = is_pow2(v); - while (v >>= 1) ret++; - ret = pow2 ? ret : ret + 1; // Ceiling. - return UPB_MIN(UPB_MAXARRSIZE, ret); -} - -/* A type to represent the lookup key of either a strtable or an inttable. */ -typedef union { - uintptr_t num; - upb_StringView str; -} lookupkey_t; - -static lookupkey_t strkey2(const char* str, size_t len) { - return (lookupkey_t){.str = upb_StringView_FromDataAndSize(str, len)}; -} - -static lookupkey_t intkey(uintptr_t key) { return (lookupkey_t){.num = key}; } - -typedef uint32_t hashfunc_t(upb_key key); -typedef bool eqlfunc_t(upb_key k1, lookupkey_t k2); - -/* Base table (shared code) ***************************************************/ - -static uint32_t upb_inthash(uintptr_t key) { - if (sizeof(uintptr_t) == 8) { - return (uint32_t)key ^ (uint32_t)(key >> 32); - } else { - UPB_ASSERT(sizeof(uintptr_t) == 4); - return (uint32_t)key; - } -} - -static const upb_tabent* upb_getentry(const upb_table* t, uint32_t hash) { - return t->entries + (hash & t->mask); -} - -static bool isfull(upb_table* t) { - uint32_t size = upb_table_size(t); - // 0.875 load factor - return t->count == (size - (size >> 3)); -} - -static bool init(upb_table* t, uint8_t size_lg2, upb_Arena* a) { - if (size_lg2 >= 32) { - return false; - } - t->count = 0; - uint32_t size = 1 << size_lg2; - t->mask = size - 1; // 0 mask if size_lg2 is 0 - if (upb_table_size(t) > (SIZE_MAX / sizeof(upb_tabent))) { - return false; - } - size_t bytes = upb_table_size(t) * sizeof(upb_tabent); - if (bytes > 0) { - t->entries = upb_Arena_Malloc(a, bytes); - if (!t->entries) return false; - memset(t->entries, 0, bytes); - } else { - t->entries = NULL; - } - return true; -} - -static upb_tabent* emptyent(upb_table* t, upb_tabent* e) { - upb_tabent* begin = t->entries; - upb_tabent* end = begin + upb_table_size(t); - for (e = e + 1; e < end; e++) { - if (upb_tabent_isempty(e)) return e; - } - for (e = begin; e < end; e++) { - if (upb_tabent_isempty(e)) return e; - } - UPB_ASSERT(false); - return NULL; -} - -static upb_tabent* getentry_mutable(upb_table* t, uint32_t hash) { - return (upb_tabent*)upb_getentry(t, hash); -} - -static const upb_tabent* findentry(const upb_table* t, lookupkey_t key, - uint32_t hash, eqlfunc_t* eql) { - const upb_tabent* e; - - if (t->count == 0) return NULL; - e = upb_getentry(t, hash); - if (upb_tabent_isempty(e)) return NULL; - while (1) { - if (eql(e->key, key)) return e; - if ((e = e->next) == NULL) return NULL; - } -} - -static upb_tabent* findentry_mutable(upb_table* t, lookupkey_t key, - uint32_t hash, eqlfunc_t* eql) { - return (upb_tabent*)findentry(t, key, hash, eql); -} - -static bool lookup(const upb_table* t, lookupkey_t key, upb_value* v, - uint32_t hash, eqlfunc_t* eql) { - const upb_tabent* e = findentry(t, key, hash, eql); - if (e) { - if (v) *v = e->val; - return true; - } else { - return false; - } -} - -/* The given key must not already exist in the table. */ -static void insert(upb_table* t, lookupkey_t key, upb_key tabkey, upb_value val, - uint32_t hash, hashfunc_t* hashfunc, eqlfunc_t* eql) { - upb_tabent* mainpos_e; - upb_tabent* our_e; - - UPB_ASSERT(findentry(t, key, hash, eql) == NULL); - - t->count++; - mainpos_e = getentry_mutable(t, hash); - our_e = mainpos_e; - - if (upb_tabent_isempty(mainpos_e)) { - /* Our main position is empty; use it. */ - our_e->next = NULL; - } else { - /* Collision. */ - upb_tabent* new_e = emptyent(t, mainpos_e); - /* Head of collider's chain. */ - upb_tabent* chain = getentry_mutable(t, hashfunc(mainpos_e->key)); - if (chain == mainpos_e) { - /* Existing ent is in its main position (it has the same hash as us, and - * is the head of our chain). Insert to new ent and append to this chain. - */ - new_e->next = mainpos_e->next; - mainpos_e->next = new_e; - our_e = new_e; - } else { - /* Existing ent is not in its main position (it is a node in some other - * chain). This implies that no existing ent in the table has our hash. - * Evict it (updating its chain) and use its ent for head of our chain. */ - *new_e = *mainpos_e; /* copies next. */ - while (chain->next != mainpos_e) { - chain = (upb_tabent*)chain->next; - UPB_ASSERT(chain); - } - chain->next = new_e; - our_e = mainpos_e; - our_e->next = NULL; - } - } - our_e->key = tabkey; - our_e->val = val; - UPB_ASSERT(findentry(t, key, hash, eql) == our_e); -} - -static bool rm(upb_table* t, lookupkey_t key, upb_value* val, uint32_t hash, - eqlfunc_t* eql) { - upb_tabent* chain = getentry_mutable(t, hash); - if (upb_tabent_isempty(chain)) return false; - if (eql(chain->key, key)) { - /* Element to remove is at the head of its chain. */ - t->count--; - if (val) *val = chain->val; - if (chain->next) { - upb_tabent* move = (upb_tabent*)chain->next; - *chain = *move; - move->key = upb_key_empty(); - } else { - chain->key = upb_key_empty(); - } - return true; - } else { - /* Element to remove is either in a non-head position or not in the - * table. */ - while (chain->next && !eql(chain->next->key, key)) { - chain = (upb_tabent*)chain->next; - } - if (chain->next) { - /* Found element to remove. */ - upb_tabent* rm = (upb_tabent*)chain->next; - t->count--; - if (val) *val = chain->next->val; - rm->key = upb_key_empty(); - chain->next = rm->next; - return true; - } else { - /* Element to remove is not in the table. */ - return false; - } - } -} - -static size_t next(const upb_table* t, size_t i) { - do { - if (++i >= upb_table_size(t)) return SIZE_MAX - 1; /* Distinct from -1. */ - } while (upb_tabent_isempty(&t->entries[i])); - - return i; -} - -static size_t begin(const upb_table* t) { return next(t, -1); } - -/* upb_strtable ***************************************************************/ - -// A simple "subclass" of upb_table that only adds a hash function for strings. - -static upb_SizePrefixString* upb_SizePrefixString_Copy(upb_StringView s, - upb_Arena* a) { - // A 2GB string will fail at serialization time, but we accept up to 4GB in - // memory here. - if (s.size > UINT32_MAX) return NULL; - upb_SizePrefixString* str = - upb_Arena_Malloc(a, sizeof(uint32_t) + s.size + 1); - if (str == NULL) return NULL; - str->size = s.size; - char* data = (char*)str->data; - if (s.size) memcpy(data, s.data, s.size); - data[s.size] = '\0'; - return str; -} - -/* Adapted from ABSL's wyhash. */ - -static uint64_t UnalignedLoad64(const void* p) { - uint64_t val; - memcpy(&val, p, 8); - return val; -} - -static uint32_t UnalignedLoad32(const void* p) { - uint32_t val; - memcpy(&val, p, 4); - return val; -} - -#if defined(_MSC_VER) && defined(_M_X64) -#include -#endif - -/* Computes a * b, returning the low 64 bits of the result and storing the high - * 64 bits in |*high|. */ -static uint64_t upb_umul128(uint64_t v0, uint64_t v1, uint64_t* out_high) { -#ifdef __SIZEOF_INT128__ - __uint128_t p = v0; - p *= v1; - *out_high = (uint64_t)(p >> 64); - return (uint64_t)p; -#elif defined(_MSC_VER) && defined(_M_X64) - return _umul128(v0, v1, out_high); -#else - uint64_t a32 = v0 >> 32; - uint64_t a00 = v0 & 0xffffffff; - uint64_t b32 = v1 >> 32; - uint64_t b00 = v1 & 0xffffffff; - uint64_t high = a32 * b32; - uint64_t low = a00 * b00; - uint64_t mid1 = a32 * b00; - uint64_t mid2 = a00 * b32; - low += (mid1 << 32) + (mid2 << 32); - // Omit carry bit, for mixing we do not care about exact numerical precision. - high += (mid1 >> 32) + (mid2 >> 32); - *out_high = high; - return low; -#endif -} - -static uint64_t WyhashMix(uint64_t v0, uint64_t v1) { - uint64_t high; - uint64_t low = upb_umul128(v0, v1, &high); - return low ^ high; -} - -static uint64_t Wyhash(const void* data, size_t len, uint64_t seed, - const uint64_t salt[]) { - const uint8_t* ptr = (const uint8_t*)data; - uint64_t starting_length = (uint64_t)len; - uint64_t current_state = seed ^ salt[0]; - - if (len > 64) { - // If we have more than 64 bytes, we're going to handle chunks of 64 - // bytes at a time. We're going to build up two separate hash states - // which we will then hash together. - uint64_t duplicated_state = current_state; - - do { - uint64_t a = UnalignedLoad64(ptr); - uint64_t b = UnalignedLoad64(ptr + 8); - uint64_t c = UnalignedLoad64(ptr + 16); - uint64_t d = UnalignedLoad64(ptr + 24); - uint64_t e = UnalignedLoad64(ptr + 32); - uint64_t f = UnalignedLoad64(ptr + 40); - uint64_t g = UnalignedLoad64(ptr + 48); - uint64_t h = UnalignedLoad64(ptr + 56); - - uint64_t cs0 = WyhashMix(a ^ salt[1], b ^ current_state); - uint64_t cs1 = WyhashMix(c ^ salt[2], d ^ current_state); - current_state = (cs0 ^ cs1); - - uint64_t ds0 = WyhashMix(e ^ salt[3], f ^ duplicated_state); - uint64_t ds1 = WyhashMix(g ^ salt[4], h ^ duplicated_state); - duplicated_state = (ds0 ^ ds1); - - ptr += 64; - len -= 64; - } while (len > 64); - - current_state = current_state ^ duplicated_state; - } - - // We now have a data `ptr` with at most 64 bytes and the current state - // of the hashing state machine stored in current_state. - while (len > 16) { - uint64_t a = UnalignedLoad64(ptr); - uint64_t b = UnalignedLoad64(ptr + 8); - - current_state = WyhashMix(a ^ salt[1], b ^ current_state); - - ptr += 16; - len -= 16; - } - - // We now have a data `ptr` with at most 16 bytes. - uint64_t a = 0; - uint64_t b = 0; - if (len > 8) { - // When we have at least 9 and at most 16 bytes, set A to the first 64 - // bits of the input and B to the last 64 bits of the input. Yes, they will - // overlap in the middle if we are working with less than the full 16 - // bytes. - a = UnalignedLoad64(ptr); - b = UnalignedLoad64(ptr + len - 8); - } else if (len > 3) { - // If we have at least 4 and at most 8 bytes, set A to the first 32 - // bits and B to the last 32 bits. - a = UnalignedLoad32(ptr); - b = UnalignedLoad32(ptr + len - 4); - } else if (len > 0) { - // If we have at least 1 and at most 3 bytes, read all of the provided - // bits into A, with some adjustments. - a = ((ptr[0] << 16) | (ptr[len >> 1] << 8) | ptr[len - 1]); - b = 0; - } else { - a = 0; - b = 0; - } - - uint64_t w = WyhashMix(a ^ salt[1], b ^ current_state); - uint64_t z = salt[1] ^ starting_length; - return WyhashMix(w, z); -} - -const uint64_t kWyhashSalt[5] = { - 0x243F6A8885A308D3ULL, 0x13198A2E03707344ULL, 0xA4093822299F31D0ULL, - 0x082EFA98EC4E6C89ULL, 0x452821E638D01377ULL, -}; - -uint32_t _upb_Hash(const void* p, size_t n, uint64_t seed) { - return Wyhash(p, n, seed, kWyhashSalt); -} - -static const void* const _upb_seed; - -// Returns a random seed for upb's hash function. This does not provide -// high-quality randomness, but it should be enough to prevent unit tests from -// relying on a deterministic map ordering. By returning the address of a -// variable, we are able to get some randomness for free provided that ASLR is -// enabled. -static uint64_t _upb_Seed(void) { return (uint64_t)&_upb_seed; } - -static uint32_t _upb_Hash_NoSeed(const char* p, size_t n) { - return _upb_Hash(p, n, _upb_Seed()); -} - -static uint32_t strhash(upb_key key) { - return _upb_Hash_NoSeed(key.str->data, key.str->size); -} - -static bool streql(upb_key k1, lookupkey_t k2) { - const upb_SizePrefixString* k1s = k1.str; - const upb_StringView k2s = k2.str; - return k1s->size == k2s.size && - (k1s->size == 0 || memcmp(k1s->data, k2s.data, k1s->size) == 0); -} - -/** Calculates the number of entries required to hold an expected number of - * values, within the table's load factor. */ -static size_t _upb_entries_needed_for(size_t expected_size) { - size_t need_entries = expected_size + 1 + expected_size / 7; - UPB_ASSERT(need_entries - (need_entries >> 3) >= expected_size); - return need_entries; -} - -bool upb_strtable_init(upb_strtable* t, size_t expected_size, upb_Arena* a) { - int size_lg2 = upb_Log2Ceiling(_upb_entries_needed_for(expected_size)); - return init(&t->t, size_lg2, a); -} - -void upb_strtable_clear(upb_strtable* t) { - size_t bytes = upb_table_size(&t->t) * sizeof(upb_tabent); - t->t.count = 0; - memset((char*)t->t.entries, 0, bytes); -} - -bool upb_strtable_resize(upb_strtable* t, size_t size_lg2, upb_Arena* a) { - upb_strtable new_table; - if (!init(&new_table.t, size_lg2, a)) return false; - - intptr_t iter = UPB_STRTABLE_BEGIN; - upb_StringView sv; - upb_value val; - while (upb_strtable_next2(t, &sv, &val, &iter)) { - // Unlike normal insert, does not copy string data or possibly reallocate - // the table - // The data pointer used in the table is guaranteed to point at a - // upb_SizePrefixString, we just need to back up by the size of the uint32_t - // length prefix. - const upb_SizePrefixString* keystr = - (const upb_SizePrefixString*)(sv.data - sizeof(uint32_t)); - UPB_ASSERT(keystr->data == sv.data); - UPB_ASSERT(keystr->size == sv.size); - - lookupkey_t lookupkey = {.str = sv}; - upb_key tabkey = {.str = keystr}; - uint32_t hash = _upb_Hash_NoSeed(sv.data, sv.size); - insert(&new_table.t, lookupkey, tabkey, val, hash, &strhash, &streql); - } - *t = new_table; - return true; -} - -bool upb_strtable_insert(upb_strtable* t, const char* k, size_t len, - upb_value v, upb_Arena* a) { - if (isfull(&t->t)) { - /* Need to resize. New table of double the size, add old elements to it. */ - if (!upb_strtable_resize(t, _upb_log2_table_size(&t->t) + 1, a)) { - return false; - } - } - - upb_StringView sv = upb_StringView_FromDataAndSize(k, len); - upb_SizePrefixString* size_prefix_string = upb_SizePrefixString_Copy(sv, a); - if (!size_prefix_string) return false; - - lookupkey_t lookupkey = {.str = sv}; - upb_key key = {.str = size_prefix_string}; - uint32_t hash = _upb_Hash_NoSeed(k, len); - insert(&t->t, lookupkey, key, v, hash, &strhash, &streql); - return true; -} - -bool upb_strtable_lookup2(const upb_strtable* t, const char* key, size_t len, - upb_value* v) { - uint32_t hash = _upb_Hash_NoSeed(key, len); - return lookup(&t->t, strkey2(key, len), v, hash, &streql); -} - -bool upb_strtable_remove2(upb_strtable* t, const char* key, size_t len, - upb_value* val) { - uint32_t hash = _upb_Hash_NoSeed(key, len); - return rm(&t->t, strkey2(key, len), val, hash, &streql); -} - -/* Iteration */ - -void upb_strtable_begin(upb_strtable_iter* i, const upb_strtable* t) { - i->t = t; - i->index = begin(&t->t); -} - -void upb_strtable_next(upb_strtable_iter* i) { - i->index = next(&i->t->t, i->index); -} - -bool upb_strtable_done(const upb_strtable_iter* i) { - if (!i->t) return true; - return i->index >= upb_table_size(&i->t->t) || - upb_tabent_isempty(str_tabent(i)); -} - -upb_StringView upb_strtable_iter_key(const upb_strtable_iter* i) { - UPB_ASSERT(!upb_strtable_done(i)); - return upb_key_strview(str_tabent(i)->key); -} - -upb_value upb_strtable_iter_value(const upb_strtable_iter* i) { - UPB_ASSERT(!upb_strtable_done(i)); - return str_tabent(i)->val; -} - -void upb_strtable_iter_setdone(upb_strtable_iter* i) { - i->t = NULL; - i->index = SIZE_MAX; -} - -bool upb_strtable_iter_isequal(const upb_strtable_iter* i1, - const upb_strtable_iter* i2) { - if (upb_strtable_done(i1) && upb_strtable_done(i2)) return true; - return i1->t == i2->t && i1->index == i2->index; -} - -bool upb_strtable_next2(const upb_strtable* t, upb_StringView* key, - upb_value* val, intptr_t* iter) { - size_t tab_idx = next(&t->t, *iter); - if (tab_idx < upb_table_size(&t->t)) { - upb_tabent* ent = &t->t.entries[tab_idx]; - *key = upb_key_strview(ent->key); - *val = ent->val; - *iter = tab_idx; - return true; - } - - return false; -} - -void upb_strtable_removeiter(upb_strtable* t, intptr_t* iter) { - intptr_t i = *iter; - upb_tabent* ent = &t->t.entries[i]; - upb_tabent* prev = NULL; - - // Linear search, not great. - upb_tabent* end = &t->t.entries[upb_table_size(&t->t)]; - for (upb_tabent* e = t->t.entries; e != end; e++) { - if (e->next == ent) { - prev = e; - break; - } - } - - if (prev) { - prev->next = ent->next; - } - - t->t.count--; - ent->key = upb_key_empty(); - ent->next = NULL; -} - -void upb_strtable_setentryvalue(upb_strtable* t, intptr_t iter, upb_value v) { - t->t.entries[iter].val = v; -} - -/* upb_inttable ***************************************************************/ - -/* For inttables we use a hybrid structure where small keys are kept in an - * array and large keys are put in the hash table. */ - -// The sentinel value used in the dense array part. Note that callers must -// ensure that inttable is never used with a value of this sentinel type -// (pointers and u32 values will never be; i32 needs to be handled carefully -// to avoid sign-extending into this value). -static const upb_value kInttableSentinel = {.val = UINT64_MAX}; -static uint32_t presence_mask_arr_size(uint32_t array_size) { - return (array_size + 7) / 8; // sizeof(uint8_t) is always 1. -} - -static uint32_t inthash(upb_key key) { return upb_inthash(key.num); } - -static bool inteql(upb_key k1, lookupkey_t k2) { return k1.num == k2.num; } - -static upb_value* mutable_array(upb_inttable* t) { - return (upb_value*)t->array; -} - -static const upb_value* inttable_array_get(const upb_inttable* t, - uintptr_t key) { - UPB_ASSERT(key < t->array_size); - const upb_value* val = &t->array[key]; - return upb_inttable_arrhas(t, key) ? val : NULL; -} - -static upb_value* inttable_val(upb_inttable* t, uintptr_t key) { - if (key < t->array_size) { - return (upb_value*)inttable_array_get(t, key); - } else { - upb_tabent* e = - findentry_mutable(&t->t, intkey(key), upb_inthash(key), &inteql); - return e ? &e->val : NULL; - } -} - -static const upb_value* inttable_val_const(const upb_inttable* t, - uintptr_t key) { - return inttable_val((upb_inttable*)t, key); -} - -size_t upb_inttable_count(const upb_inttable* t) { - return t->t.count + t->array_count; -} - -static void check(upb_inttable* t) { - UPB_UNUSED(t); -#if defined(UPB_DEBUG_TABLE) && !defined(NDEBUG) - { - // This check is very expensive (makes inserts/deletes O(N)). - size_t count = 0; - intptr_t iter = UPB_INTTABLE_BEGIN; - uintptr_t key; - upb_value val; - while (upb_inttable_next(t, &key, &val, &iter)) { - UPB_ASSERT(upb_inttable_lookup(t, key, NULL)); - } - UPB_ASSERT(count == upb_inttable_count(t)); - } -#endif -} - -bool upb_inttable_sizedinit(upb_inttable* t, uint32_t asize, int hsize_lg2, - upb_Arena* a) { - if (!init(&t->t, hsize_lg2, a)) return false; - /* Always make the array part at least 1 long, so that we know key 0 - * won't be in the hash part, which simplifies things. */ - t->array_size = UPB_MAX(1, asize); - t->array_count = 0; -#if UINT32_MAX >= SIZE_MAX - if (UPB_UNLIKELY(SIZE_MAX / sizeof(upb_value) < t->array_size)) { - return false; - } -#endif - - // Allocate the array part and the presence mask array in one allocation. - size_t array_bytes = t->array_size * sizeof(upb_value); - uint32_t presence_bytes = presence_mask_arr_size(t->array_size); - uintptr_t total_bytes = array_bytes + presence_bytes; - if (UPB_UNLIKELY(total_bytes > SIZE_MAX)) { - return false; - } - void* alloc = upb_Arena_Malloc(a, total_bytes); - if (!alloc) { - return false; - } - t->array = alloc; - memset(mutable_array(t), 0xff, array_bytes); - t->presence_mask = (uint8_t*)alloc + array_bytes; - memset((uint8_t*)t->presence_mask, 0, presence_bytes); - - check(t); - return true; -} - -bool upb_inttable_init(upb_inttable* t, upb_Arena* a) { - // The init size of the table part to match that of strtable. - return upb_inttable_sizedinit(t, 0, 3, a); -} - -bool upb_inttable_insert(upb_inttable* t, uintptr_t key, upb_value val, - upb_Arena* a) { - if (key < t->array_size) { - UPB_ASSERT(!upb_inttable_arrhas(t, key)); - t->array_count++; - mutable_array(t)[key] = val; - ((uint8_t*)t->presence_mask)[key / 8] |= (1 << (key % 8)); - } else { - if (isfull(&t->t)) { - /* Need to resize the hash part, but we re-use the array part. */ - size_t i; - upb_table new_table; - - if (!init(&new_table, _upb_log2_table_size(&t->t) + 1, a)) { - return false; - } - - for (i = begin(&t->t); i < upb_table_size(&t->t); i = next(&t->t, i)) { - const upb_tabent* e = &t->t.entries[i]; - insert(&new_table, intkey(e->key.num), e->key, e->val, inthash(e->key), - &inthash, &inteql); - } - - UPB_ASSERT(t->t.count == new_table.count); - - t->t = new_table; - } - upb_key tabkey = {.num = key}; - insert(&t->t, intkey(key), tabkey, val, upb_inthash(key), &inthash, - &inteql); - } - check(t); - return true; -} - -bool upb_inttable_lookup(const upb_inttable* t, uintptr_t key, upb_value* v) { - const upb_value* table_v = inttable_val_const(t, key); - if (!table_v) return false; - if (v) *v = *table_v; - return true; -} - -bool upb_inttable_replace(upb_inttable* t, uintptr_t key, upb_value val) { - upb_value* table_v = inttable_val(t, key); - if (!table_v) return false; - *table_v = val; - return true; -} - -bool upb_inttable_remove(upb_inttable* t, uintptr_t key, upb_value* val) { - bool success; - if (key < t->array_size) { - if (upb_inttable_arrhas(t, key)) { - t->array_count--; - if (val) { - *val = t->array[key]; - } - mutable_array(t)[key] = kInttableSentinel; - ((uint8_t*)t->presence_mask)[key / 8] &= ~(1 << (key % 8)); - success = true; - } else { - success = false; - } - } else { - success = rm(&t->t, intkey(key), val, upb_inthash(key), &inteql); - } - check(t); - return success; -} - -bool upb_inttable_compact(upb_inttable* t, upb_Arena* a) { - /* A power-of-two histogram of the table keys. */ - uint32_t counts[UPB_MAXARRSIZE + 1] = {0}; - - /* The max key in each bucket. */ - uintptr_t max[UPB_MAXARRSIZE + 1] = {0}; - - { - intptr_t iter = UPB_INTTABLE_BEGIN; - uintptr_t key; - upb_value val; - while (upb_inttable_next(t, &key, &val, &iter)) { - int bucket = log2ceil(key); - max[bucket] = UPB_MAX(max[bucket], key); - counts[bucket]++; - } - } - - /* Find the largest power of two that satisfies the MIN_DENSITY - * definition (while actually having some keys). */ - uint32_t arr_count = upb_inttable_count(t); - - // Scan all buckets except capped bucket - int size_lg2 = ARRAY_SIZE(counts) - 1; - for (; size_lg2 > 0; size_lg2--) { - if (counts[size_lg2] == 0) { - /* We can halve again without losing any entries. */ - continue; - } else if (arr_count >= (1 << size_lg2) * MIN_DENSITY) { - break; - } - - arr_count -= counts[size_lg2]; - } - - UPB_ASSERT(arr_count <= upb_inttable_count(t)); - - upb_inttable new_t; - { - /* Insert all elements into new, perfectly-sized table. */ - uintptr_t arr_size = max[size_lg2] + 1; /* +1 so arr[max] will fit. */ - uint32_t hash_count = upb_inttable_count(t) - arr_count; - size_t hash_size = hash_count ? _upb_entries_needed_for(hash_count) : 0; - int hashsize_lg2 = log2ceil(hash_size); - - if (!upb_inttable_sizedinit(&new_t, arr_size, hashsize_lg2, a)) { - return false; - } - - { - intptr_t iter = UPB_INTTABLE_BEGIN; - uintptr_t key; - upb_value val; - while (upb_inttable_next(t, &key, &val, &iter)) { - upb_inttable_insert(&new_t, key, val, a); - } - } - - UPB_ASSERT(new_t.array_size == arr_size); - } - *t = new_t; - return true; -} - -void upb_inttable_clear(upb_inttable* t) { - // Clear the array part. - size_t array_bytes = t->array_size * sizeof(upb_value); - t->array_count = 0; - // Clear the array by setting all bits to 1, as UINT64_MAX is the sentinel - // value for an empty array. - memset(mutable_array(t), 0xff, array_bytes); - // Clear the presence mask array. - memset((uint8_t*)t->presence_mask, 0, presence_mask_arr_size(t->array_size)); - // Clear the table part. - size_t bytes = upb_table_size(&t->t) * sizeof(upb_tabent); - t->t.count = 0; - memset((char*)t->t.entries, 0, bytes); -} - -// Iteration. - -bool upb_inttable_next(const upb_inttable* t, uintptr_t* key, upb_value* val, - intptr_t* iter) { - intptr_t i = *iter; - if ((size_t)(i + 1) <= t->array_size) { - while ((size_t)++i < t->array_size) { - const upb_value* ent = inttable_array_get(t, i); - if (ent) { - *key = i; - *val = *ent; - *iter = i; - return true; - } - } - i--; // Back up to exactly one position before the start of the table. - } - - size_t tab_idx = next(&t->t, i - t->array_size); - if (tab_idx < upb_table_size(&t->t)) { - upb_tabent* ent = &t->t.entries[tab_idx]; - *key = ent->key.num; - *val = ent->val; - *iter = tab_idx + t->array_size; - return true; - } else { - // We should set the iterator any way. When we are done, the iterator value - // is invalidated. `upb_inttable_done` will check on the iterator value to - // determine if the iteration is done. - *iter = INTPTR_MAX - 1; // To disambiguate from UPB_INTTABLE_BEGIN, to - // match the behavior of `upb_strtable_iter`. - return false; - } -} - -void upb_inttable_removeiter(upb_inttable* t, intptr_t* iter) { - intptr_t i = *iter; - if ((size_t)i < t->array_size) { - t->array_count--; - mutable_array(t)[i].val = -1; - } else { - upb_tabent* ent = &t->t.entries[i - t->array_size]; - upb_tabent* prev = NULL; - - // Linear search, not great. - upb_tabent* end = &t->t.entries[upb_table_size(&t->t)]; - for (upb_tabent* e = t->t.entries; e != end; e++) { - if (e->next == ent) { - prev = e; - break; - } - } - - if (prev) { - prev->next = ent->next; - } - - t->t.count--; - ent->key = upb_key_empty(); - ent->next = NULL; - } -} - -void upb_inttable_setentryvalue(upb_inttable* t, intptr_t iter, upb_value v) { - if ((size_t)iter < t->array_size) { - mutable_array(t)[iter] = v; - } else { - upb_tabent* ent = &t->t.entries[iter - t->array_size]; - ent->val = v; - } -} - -bool upb_inttable_done(const upb_inttable* t, intptr_t iter) { - if ((uintptr_t)iter >= t->array_size + upb_table_size(&t->t)) { - return true; - } else if ((size_t)iter < t->array_size) { - return !upb_inttable_arrhas(t, iter); - } else { - return upb_tabent_isempty(&t->t.entries[iter - t->array_size]); - } -} - -uintptr_t upb_inttable_iter_key(const upb_inttable* t, intptr_t iter) { - UPB_ASSERT(!upb_inttable_done(t, iter)); - return (size_t)iter < t->array_size - ? iter - : t->t.entries[iter - t->array_size].key.num; -} - -upb_value upb_inttable_iter_value(const upb_inttable* t, intptr_t iter) { - UPB_ASSERT(!upb_inttable_done(t, iter)); - if ((size_t)iter < t->array_size) { - return t->array[iter]; - } else { - return t->t.entries[iter - t->array_size].val; - } -} - - -// Must be last. - -const char* upb_BufToUint64(const char* ptr, const char* end, uint64_t* val) { - uint64_t u64 = 0; - while (ptr < end) { - unsigned ch = *ptr - '0'; - if (ch >= 10) break; - if (u64 > UINT64_MAX / 10 || u64 * 10 > UINT64_MAX - ch) { - return NULL; // integer overflow - } - u64 *= 10; - u64 += ch; - ptr++; - } - - *val = u64; - return ptr; -} - -const char* upb_BufToInt64(const char* ptr, const char* end, int64_t* val, - bool* is_neg) { - bool neg = false; - uint64_t u64; - - if (ptr != end && *ptr == '-') { - ptr++; - neg = true; - } - - ptr = upb_BufToUint64(ptr, end, &u64); - if (!ptr || u64 > (uint64_t)INT64_MAX + neg) { - return NULL; // integer overflow - } - - *val = neg ? -u64 : u64; - if (is_neg) *is_neg = neg; - return ptr; -} - - -#include -#include -#include -#include - -// Must be last. - -/* Miscellaneous utilities ****************************************************/ - -static void upb_FixLocale(char* p) { - /* printf() is dependent on locales; sadly there is no easy and portable way - * to avoid this. This little post-processing step will translate 1,2 -> 1.2 - * since JSON needs the latter. Arguably a hack, but it is simple and the - * alternatives are far more complicated, platform-dependent, and/or larger - * in code size. */ - for (; *p; p++) { - if (*p == ',') *p = '.'; - } -} - -void _upb_EncodeRoundTripDouble(double val, char* buf, size_t size) { - assert(size >= kUpb_RoundTripBufferSize); - if (isnan(val)) { - snprintf(buf, size, "%s", "nan"); - return; - } - snprintf(buf, size, "%.*g", DBL_DIG, val); - if (strtod(buf, NULL) != val) { - snprintf(buf, size, "%.*g", DBL_DIG + 2, val); - assert(strtod(buf, NULL) == val); - } - upb_FixLocale(buf); -} - -void _upb_EncodeRoundTripFloat(float val, char* buf, size_t size) { - assert(size >= kUpb_RoundTripBufferSize); - if (isnan(val)) { - snprintf(buf, size, "%s", "nan"); - return; - } - snprintf(buf, size, "%.*g", FLT_DIG, val); - if (strtof(buf, NULL) != val) { - snprintf(buf, size, "%.*g", FLT_DIG + 3, val); - assert(strtof(buf, NULL) == val); - } - upb_FixLocale(buf); -} - - -#include -#include - -// Must be last. - -// Determine the locale-specific radix character by calling sprintf() to print -// the number 1.5, then stripping off the digits. As far as I can tell, this -// is the only portable, thread-safe way to get the C library to divulge the -// locale's radix character. No, localeconv() is NOT thread-safe. - -static int GetLocaleRadix(char *data, size_t capacity) { - char temp[16]; - const int size = snprintf(temp, sizeof(temp), "%.1f", 1.5); - UPB_ASSERT(temp[0] == '1'); - UPB_ASSERT(temp[size - 1] == '5'); - UPB_ASSERT(size < capacity); - temp[size - 1] = '\0'; - strcpy(data, temp + 1); - return size - 2; -} - -// Populates a string identical to *input except that the character pointed to -// by pos (which should be '.') is replaced with the locale-specific radix. - -static void LocalizeRadix(const char *input, const char *pos, char *output) { - const int len1 = pos - input; - - char radix[8]; - const int len2 = GetLocaleRadix(radix, sizeof(radix)); - - memcpy(output, input, len1); - memcpy(output + len1, radix, len2); - strcpy(output + len1 + len2, input + len1 + 1); -} - -double _upb_NoLocaleStrtod(const char *str, char **endptr) { - // We cannot simply set the locale to "C" temporarily with setlocale() - // as this is not thread-safe. Instead, we try to parse in the current - // locale first. If parsing stops at a '.' character, then this is a - // pretty good hint that we're actually in some other locale in which - // '.' is not the radix character. - - char *temp_endptr; - double result = strtod(str, &temp_endptr); - if (endptr != NULL) *endptr = temp_endptr; - if (*temp_endptr != '.') return result; - - // Parsing halted on a '.'. Perhaps we're in a different locale? Let's - // try to replace the '.' with a locale-specific radix character and - // try again. - - char localized[80]; - LocalizeRadix(str, temp_endptr, localized); - char *localized_endptr; - result = strtod(localized, &localized_endptr); - if ((localized_endptr - &localized[0]) > (temp_endptr - str)) { - // This attempt got further, so replacing the decimal must have helped. - // Update endptr to point at the right location. - if (endptr != NULL) { - // size_diff is non-zero if the localized radix has multiple bytes. - int size_diff = strlen(localized) - strlen(str); - *endptr = (char *)str + (localized_endptr - &localized[0] - size_diff); - } - } - - return result; -} - - -// Must be last. - -int upb_Unicode_ToUTF8(uint32_t cp, char* out) { - if (cp <= 0x7f) { - out[0] = cp; - return 1; - } - if (cp <= 0x07ff) { - out[0] = (cp >> 6) | 0xc0; - out[1] = (cp & 0x3f) | 0x80; - return 2; - } - if (cp <= 0xffff) { - out[0] = (cp >> 12) | 0xe0; - out[1] = ((cp >> 6) & 0x3f) | 0x80; - out[2] = (cp & 0x3f) | 0x80; - return 3; - } - if (cp <= 0x10ffff) { - out[0] = (cp >> 18) | 0xf0; - out[1] = ((cp >> 12) & 0x3f) | 0x80; - out[2] = ((cp >> 6) & 0x3f) | 0x80; - out[3] = (cp & 0x3f) | 0x80; - return 4; - } - return 0; -} - - -#include -#include - - -// Must be last. - -const upb_Extension* UPB_PRIVATE(_upb_Message_Getext)( - const struct upb_Message* msg, const upb_MiniTableExtension* e) { - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) return NULL; - - for (size_t i = 0; i < in->size; i++) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i]; - if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - const upb_Extension* ext = upb_TaggedAuxPtr_Extension(tagged_ptr); - if (ext->ext == e) { - return ext; - } - } - } - - return NULL; -} - -upb_Extension* UPB_PRIVATE(_upb_Message_GetOrCreateExtension)( - struct upb_Message* msg, const upb_MiniTableExtension* e, upb_Arena* a) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Extension* ext = (upb_Extension*)UPB_PRIVATE(_upb_Message_Getext)(msg, e); - if (ext) return ext; - - if (!UPB_PRIVATE(_upb_Message_ReserveSlot)(msg, a)) return NULL; - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - ext = upb_Arena_Malloc(a, sizeof(upb_Extension)); - if (!ext) return NULL; - memset(ext, 0, sizeof(upb_Extension)); - ext->ext = e; - in->aux_data[in->size++] = upb_TaggedAuxPtr_MakeExtension(ext); - return ext; -} - - -#include -#include -#include -#include - - -// Must be last. - -// The latest win32 SDKs have an invalid definition of NAN. -// https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907 -// -// Unfortunately, the `0.0 / 0.0` workaround doesn't work in Clang under C23, so -// try __builtin_nan first, if that exists. -#ifdef _WIN32 -#ifdef __has_builtin -#if __has_builtin(__builtin_nan) -#define UPB_NAN __builtin_nan("0") -#endif -#if __has_builtin(__builtin_inf) -#define UPB_INFINITY __builtin_inf() -#endif -#endif -#ifndef UPB_NAN -#define UPB_NAN 0.0 / 0.0 -#endif -#ifndef UPB_INFINITY -#define UPB_INFINITY 1.0 / 0.0 -#endif -#else -// For !_WIN32, assume math.h works. -#define UPB_NAN NAN -#define UPB_INFINITY INFINITY -#endif - -const float kUpb_FltInfinity = UPB_INFINITY; -const double kUpb_Infinity = UPB_INFINITY; -const double kUpb_NaN = UPB_NAN; - -static size_t _upb_Message_SizeOfInternal(uint32_t count) { - return UPB_SIZEOF_FLEX(upb_Message_Internal, aux_data, count); -} - -bool UPB_PRIVATE(_upb_Message_ReserveSlot)(struct upb_Message* msg, - upb_Arena* a) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) { - // No internal data, allocate from scratch. - uint32_t capacity = 4; - in = upb_Arena_Malloc(a, _upb_Message_SizeOfInternal(capacity)); - if (!in) return false; - in->size = 0; - in->capacity = capacity; - UPB_PRIVATE(_upb_Message_SetInternal)(msg, in); - } else if (in->capacity == in->size) { - // Internal data is too small, reallocate. - uint32_t new_capacity = upb_RoundUpToPowerOfTwo(in->size + 1); - in = upb_Arena_Realloc(a, in, _upb_Message_SizeOfInternal(in->capacity), - _upb_Message_SizeOfInternal(new_capacity)); - if (!in) return false; - in->capacity = new_capacity; - UPB_PRIVATE(_upb_Message_SetInternal)(msg, in); - } - UPB_ASSERT(in->capacity - in->size >= 1); - return true; -} - -#ifdef UPB_TRACING_ENABLED -static void (*_message_trace_handler)(const upb_MiniTable*, const upb_Arena*); - -void upb_Message_LogNewMessage(const upb_MiniTable* m, const upb_Arena* arena) { - if (_message_trace_handler) { - _message_trace_handler(m, arena); - } -} - -void upb_Message_SetNewMessageTraceHandler(void (*handler)(const upb_MiniTable*, - const upb_Arena*)) { - _message_trace_handler = handler; -} -#endif // UPB_TRACING_ENABLED - - -#include - - -// Must be last. - -bool UPB_PRIVATE(_upb_Message_NextBaseField)(const upb_Message* msg, - const upb_MiniTable* m, - const upb_MiniTableField** out_f, - upb_MessageValue* out_v, - size_t* iter) { - const size_t count = upb_MiniTable_FieldCount(m); - size_t i = *iter; - - while (++i < count) { - const upb_MiniTableField* f = upb_MiniTable_GetFieldByIndex(m, i); - const void* src = UPB_PRIVATE(_upb_Message_DataPtr)(msg, f); - - upb_MessageValue val; - UPB_PRIVATE(_upb_MiniTableField_DataCopy)(f, &val, src); - - // Skip field if unset or empty. - if (upb_MiniTableField_HasPresence(f)) { - if (!upb_Message_HasBaseField(msg, f)) continue; - } else { - if (UPB_PRIVATE(_upb_MiniTableField_DataIsZero)(f, src)) continue; - - if (upb_MiniTableField_IsArray(f)) { - if (upb_Array_Size(val.array_val) == 0) continue; - } else if (upb_MiniTableField_IsMap(f)) { - if (upb_Map_Size(val.map_val) == 0) continue; - } - } - - *out_f = f; - *out_v = val; - *iter = i; - return true; - } - - return false; -} - - -const char _kUpb_ToBase92[] = { - ' ', '!', '#', '$', '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', - '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', - 'Z', '[', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', - 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', - 'w', 'x', 'y', 'z', '{', '|', '}', '~', -}; - -const int8_t _kUpb_FromBase92[] = { - 0, 1, -1, 2, 3, 4, 5, -1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -}; - - -#include -#include -#include - - -// Must be last. - -typedef struct { - uint64_t present_values_mask; - uint32_t last_written_value; -} upb_MtDataEncoderInternal_EnumState; - -typedef struct { - uint64_t msg_modifiers; - uint32_t last_field_num; - enum { - kUpb_OneofState_NotStarted, - kUpb_OneofState_StartedOneof, - kUpb_OneofState_EmittedOneofField, - } oneof_state; -} upb_MtDataEncoderInternal_MsgState; - -typedef struct { - char* buf_start; // Only for checking kUpb_MtDataEncoder_MinSize. - union { - upb_MtDataEncoderInternal_EnumState enum_state; - upb_MtDataEncoderInternal_MsgState msg_state; - } state; -} upb_MtDataEncoderInternal; - -static upb_MtDataEncoderInternal* upb_MtDataEncoder_GetInternal( - upb_MtDataEncoder* e, char* buf_start) { - UPB_ASSERT(sizeof(upb_MtDataEncoderInternal) <= sizeof(e->internal)); - upb_MtDataEncoderInternal* ret = (upb_MtDataEncoderInternal*)e->internal; - ret->buf_start = buf_start; - return ret; -} - -static char* upb_MtDataEncoder_PutRaw(upb_MtDataEncoder* e, char* ptr, - char ch) { - upb_MtDataEncoderInternal* in = (upb_MtDataEncoderInternal*)e->internal; - UPB_ASSERT(ptr - in->buf_start < kUpb_MtDataEncoder_MinSize); - if (ptr == e->end) return NULL; - *ptr++ = ch; - return ptr; -} - -static char* upb_MtDataEncoder_Put(upb_MtDataEncoder* e, char* ptr, char ch) { - return upb_MtDataEncoder_PutRaw(e, ptr, _upb_ToBase92(ch)); -} - -static char* upb_MtDataEncoder_PutBase92Varint(upb_MtDataEncoder* e, char* ptr, - uint32_t val, int min, int max) { - int shift = upb_Log2Ceiling(_upb_FromBase92(max) - _upb_FromBase92(min) + 1); - UPB_ASSERT(shift <= 6); - uint32_t mask = (1 << shift) - 1; - do { - uint32_t bits = val & mask; - ptr = upb_MtDataEncoder_Put(e, ptr, bits + _upb_FromBase92(min)); - if (!ptr) return NULL; - val >>= shift; - } while (val); - return ptr; -} - -char* upb_MtDataEncoder_PutModifier(upb_MtDataEncoder* e, char* ptr, - uint64_t mod) { - if (mod) { - ptr = upb_MtDataEncoder_PutBase92Varint(e, ptr, mod, - kUpb_EncodedValue_MinModifier, - kUpb_EncodedValue_MaxModifier); - } - return ptr; -} - -char* upb_MtDataEncoder_EncodeExtension(upb_MtDataEncoder* e, char* ptr, - upb_FieldType type, uint32_t field_num, - uint64_t field_mod) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - in->state.msg_state.msg_modifiers = 0; - in->state.msg_state.last_field_num = 0; - in->state.msg_state.oneof_state = kUpb_OneofState_NotStarted; - - ptr = upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_ExtensionV1); - if (!ptr) return NULL; - - return upb_MtDataEncoder_PutField(e, ptr, type, field_num, field_mod); -} - -char* upb_MtDataEncoder_EncodeMap(upb_MtDataEncoder* e, char* ptr, - upb_FieldType key_type, - upb_FieldType value_type, uint64_t key_mod, - uint64_t value_mod) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - in->state.msg_state.msg_modifiers = 0; - in->state.msg_state.last_field_num = 0; - in->state.msg_state.oneof_state = kUpb_OneofState_NotStarted; - - ptr = upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_MapV1); - if (!ptr) return NULL; - - ptr = upb_MtDataEncoder_PutField(e, ptr, key_type, 1, key_mod); - if (!ptr) return NULL; - - return upb_MtDataEncoder_PutField(e, ptr, value_type, 2, value_mod); -} - -char* upb_MtDataEncoder_EncodeMessageSet(upb_MtDataEncoder* e, char* ptr) { - (void)upb_MtDataEncoder_GetInternal(e, ptr); - return upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_MessageSetV1); -} - -char* upb_MtDataEncoder_StartMessage(upb_MtDataEncoder* e, char* ptr, - uint64_t msg_mod) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - in->state.msg_state.msg_modifiers = msg_mod; - in->state.msg_state.last_field_num = 0; - in->state.msg_state.oneof_state = kUpb_OneofState_NotStarted; - - ptr = upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_MessageV1); - if (!ptr) return NULL; - - return upb_MtDataEncoder_PutModifier(e, ptr, msg_mod); -} - -static char* _upb_MtDataEncoder_MaybePutFieldSkip(upb_MtDataEncoder* e, - char* ptr, - uint32_t field_num) { - upb_MtDataEncoderInternal* in = (upb_MtDataEncoderInternal*)e->internal; - if (field_num <= in->state.msg_state.last_field_num) return NULL; - if (in->state.msg_state.last_field_num + 1 != field_num) { - // Put skip. - UPB_ASSERT(field_num > in->state.msg_state.last_field_num); - uint32_t skip = field_num - in->state.msg_state.last_field_num; - ptr = upb_MtDataEncoder_PutBase92Varint( - e, ptr, skip, kUpb_EncodedValue_MinSkip, kUpb_EncodedValue_MaxSkip); - if (!ptr) return NULL; - } - in->state.msg_state.last_field_num = field_num; - return ptr; -} - -static char* _upb_MtDataEncoder_PutFieldType(upb_MtDataEncoder* e, char* ptr, - upb_FieldType type, - uint64_t field_mod) { - static const char kUpb_TypeToEncoded[] = { - [kUpb_FieldType_Double] = kUpb_EncodedType_Double, - [kUpb_FieldType_Float] = kUpb_EncodedType_Float, - [kUpb_FieldType_Int64] = kUpb_EncodedType_Int64, - [kUpb_FieldType_UInt64] = kUpb_EncodedType_UInt64, - [kUpb_FieldType_Int32] = kUpb_EncodedType_Int32, - [kUpb_FieldType_Fixed64] = kUpb_EncodedType_Fixed64, - [kUpb_FieldType_Fixed32] = kUpb_EncodedType_Fixed32, - [kUpb_FieldType_Bool] = kUpb_EncodedType_Bool, - [kUpb_FieldType_String] = kUpb_EncodedType_String, - [kUpb_FieldType_Group] = kUpb_EncodedType_Group, - [kUpb_FieldType_Message] = kUpb_EncodedType_Message, - [kUpb_FieldType_Bytes] = kUpb_EncodedType_Bytes, - [kUpb_FieldType_UInt32] = kUpb_EncodedType_UInt32, - [kUpb_FieldType_Enum] = kUpb_EncodedType_OpenEnum, - [kUpb_FieldType_SFixed32] = kUpb_EncodedType_SFixed32, - [kUpb_FieldType_SFixed64] = kUpb_EncodedType_SFixed64, - [kUpb_FieldType_SInt32] = kUpb_EncodedType_SInt32, - [kUpb_FieldType_SInt64] = kUpb_EncodedType_SInt64, - }; - - int encoded_type = kUpb_TypeToEncoded[type]; - - if (field_mod & kUpb_FieldModifier_IsClosedEnum) { - UPB_ASSERT(type == kUpb_FieldType_Enum); - encoded_type = kUpb_EncodedType_ClosedEnum; - } - - if (field_mod & kUpb_FieldModifier_IsRepeated) { - // Repeated fields shift the type number up (unlike other modifiers which - // are bit flags). - encoded_type += kUpb_EncodedType_RepeatedBase; - } - - return upb_MtDataEncoder_Put(e, ptr, encoded_type); -} - -static char* _upb_MtDataEncoder_MaybePutModifiers(upb_MtDataEncoder* e, - char* ptr, upb_FieldType type, - uint64_t field_mod) { - upb_MtDataEncoderInternal* in = (upb_MtDataEncoderInternal*)e->internal; - uint32_t encoded_modifiers = 0; - if ((field_mod & kUpb_FieldModifier_IsRepeated) && - upb_FieldType_IsPackable(type)) { - bool field_is_packed = field_mod & kUpb_FieldModifier_IsPacked; - bool default_is_packed = in->state.msg_state.msg_modifiers & - kUpb_MessageModifier_DefaultIsPacked; - if (field_is_packed != default_is_packed) { - encoded_modifiers |= kUpb_EncodedFieldModifier_FlipPacked; - } - } - - if (type == kUpb_FieldType_String) { - bool field_validates_utf8 = field_mod & kUpb_FieldModifier_ValidateUtf8; - bool message_validates_utf8 = - in->state.msg_state.msg_modifiers & kUpb_MessageModifier_ValidateUtf8; - if (field_validates_utf8 != message_validates_utf8) { - // Old binaries do not recognize the field modifier. We need the failure - // mode to be too lax rather than too strict. Our caller should have - // handled this (see _upb_MessageDef_ValidateUtf8()). - assert(!message_validates_utf8); - encoded_modifiers |= kUpb_EncodedFieldModifier_FlipValidateUtf8; - } - } - - if (field_mod & kUpb_FieldModifier_IsProto3Singular) { - encoded_modifiers |= kUpb_EncodedFieldModifier_IsProto3Singular; - } - - if (field_mod & kUpb_FieldModifier_IsRequired) { - encoded_modifiers |= kUpb_EncodedFieldModifier_IsRequired; - } - - return upb_MtDataEncoder_PutModifier(e, ptr, encoded_modifiers); -} - -char* upb_MtDataEncoder_PutField(upb_MtDataEncoder* e, char* ptr, - upb_FieldType type, uint32_t field_num, - uint64_t field_mod) { - upb_MtDataEncoder_GetInternal(e, ptr); - - ptr = _upb_MtDataEncoder_MaybePutFieldSkip(e, ptr, field_num); - if (!ptr) return NULL; - - ptr = _upb_MtDataEncoder_PutFieldType(e, ptr, type, field_mod); - if (!ptr) return NULL; - - return _upb_MtDataEncoder_MaybePutModifiers(e, ptr, type, field_mod); -} - -char* upb_MtDataEncoder_StartOneof(upb_MtDataEncoder* e, char* ptr) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - if (in->state.msg_state.oneof_state == kUpb_OneofState_NotStarted) { - ptr = upb_MtDataEncoder_Put(e, ptr, _upb_FromBase92(kUpb_EncodedValue_End)); - } else { - ptr = upb_MtDataEncoder_Put( - e, ptr, _upb_FromBase92(kUpb_EncodedValue_OneofSeparator)); - } - in->state.msg_state.oneof_state = kUpb_OneofState_StartedOneof; - return ptr; -} - -char* upb_MtDataEncoder_PutOneofField(upb_MtDataEncoder* e, char* ptr, - uint32_t field_num) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - if (in->state.msg_state.oneof_state == kUpb_OneofState_EmittedOneofField) { - ptr = upb_MtDataEncoder_Put( - e, ptr, _upb_FromBase92(kUpb_EncodedValue_FieldSeparator)); - if (!ptr) return NULL; - } - ptr = upb_MtDataEncoder_PutBase92Varint(e, ptr, field_num, _upb_ToBase92(0), - _upb_ToBase92(63)); - in->state.msg_state.oneof_state = kUpb_OneofState_EmittedOneofField; - return ptr; -} - -char* upb_MtDataEncoder_StartEnum(upb_MtDataEncoder* e, char* ptr) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - in->state.enum_state.present_values_mask = 0; - in->state.enum_state.last_written_value = 0; - - return upb_MtDataEncoder_PutRaw(e, ptr, kUpb_EncodedVersion_EnumV1); -} - -static char* upb_MtDataEncoder_FlushDenseEnumMask(upb_MtDataEncoder* e, - char* ptr) { - upb_MtDataEncoderInternal* in = (upb_MtDataEncoderInternal*)e->internal; - ptr = upb_MtDataEncoder_Put(e, ptr, in->state.enum_state.present_values_mask); - in->state.enum_state.present_values_mask = 0; - in->state.enum_state.last_written_value += 5; - return ptr; -} - -char* upb_MtDataEncoder_PutEnumValue(upb_MtDataEncoder* e, char* ptr, - uint32_t val) { - // TODO: optimize this encoding. - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - UPB_ASSERT(val >= in->state.enum_state.last_written_value); - uint32_t delta = val - in->state.enum_state.last_written_value; - if (delta >= 5 && in->state.enum_state.present_values_mask) { - ptr = upb_MtDataEncoder_FlushDenseEnumMask(e, ptr); - if (!ptr) { - return NULL; - } - delta -= 5; - } - - if (delta >= 5) { - ptr = upb_MtDataEncoder_PutBase92Varint( - e, ptr, delta, kUpb_EncodedValue_MinSkip, kUpb_EncodedValue_MaxSkip); - in->state.enum_state.last_written_value += delta; - delta = 0; - } - - UPB_ASSERT((in->state.enum_state.present_values_mask >> delta) == 0); - in->state.enum_state.present_values_mask |= 1ULL << delta; - return ptr; -} - -char* upb_MtDataEncoder_EndEnum(upb_MtDataEncoder* e, char* ptr) { - upb_MtDataEncoderInternal* in = upb_MtDataEncoder_GetInternal(e, ptr); - if (!in->state.enum_state.present_values_mask) return ptr; - return upb_MtDataEncoder_FlushDenseEnumMask(e, ptr); -} - - -#include - - -// Must be last. - -// A MiniTable for an empty message, used for unlinked sub-messages that are -// built via MiniDescriptors. Messages that use this MiniTable may possibly -// be linked later, in which case this MiniTable will be replaced with a real -// one. This pattern is known as "dynamic tree shaking", and it introduces -// complication because sub-messages may either be the "empty" type or the -// "real" type. A tagged bit indicates the difference. -const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty) = { - .UPB_PRIVATE(subs) = NULL, - .UPB_PRIVATE(fields) = NULL, - .UPB_PRIVATE(size) = sizeof(struct upb_Message), - .UPB_PRIVATE(field_count) = 0, - .UPB_PRIVATE(ext) = kUpb_ExtMode_NonExtendable, - .UPB_PRIVATE(dense_below) = 0, - .UPB_PRIVATE(table_mask) = -1, - .UPB_PRIVATE(required_count) = 0, -}; - -// A MiniTable for a statically tree shaken message. Messages that use this -// MiniTable are guaranteed to remain unlinked; unlike the empty message, this -// MiniTable is never replaced, which greatly simplifies everything, because the -// type of a sub-message is always known, without consulting a tagged bit. -const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_StaticallyTreeShaken) = { - .UPB_PRIVATE(subs) = NULL, - .UPB_PRIVATE(fields) = NULL, - .UPB_PRIVATE(size) = sizeof(struct upb_Message), - .UPB_PRIVATE(field_count) = 0, - .UPB_PRIVATE(ext) = kUpb_ExtMode_NonExtendable, - .UPB_PRIVATE(dense_below) = 0, - .UPB_PRIVATE(table_mask) = -1, - .UPB_PRIVATE(required_count) = 0, -}; - - - -// Must be last. - -struct upb_DefPool { - upb_Arena* arena; - upb_strtable syms; // full_name -> packed def ptr - upb_strtable files; // file_name -> (upb_FileDef*) - upb_inttable exts; // (upb_MiniTableExtension*) -> (upb_FieldDef*) - upb_ExtensionRegistry* extreg; - const UPB_DESC(FeatureSetDefaults) * feature_set_defaults; - upb_MiniTablePlatform platform; - void* scratch_data; - size_t scratch_size; - size_t bytes_loaded; -}; - -void upb_DefPool_Free(upb_DefPool* s) { - upb_Arena_Free(s->arena); - upb_gfree(s->scratch_data); - upb_gfree(s); -} - -static const char serialized_defaults[] = UPB_INTERNAL_UPB_EDITION_DEFAULTS; - -upb_DefPool* upb_DefPool_New(void) { - upb_DefPool* s = upb_gmalloc(sizeof(*s)); - if (!s) return NULL; - - s->arena = upb_Arena_New(); - s->bytes_loaded = 0; - - s->scratch_size = 240; - s->scratch_data = upb_gmalloc(s->scratch_size); - if (!s->scratch_data) goto err; - - if (!upb_strtable_init(&s->syms, 32, s->arena)) goto err; - if (!upb_strtable_init(&s->files, 4, s->arena)) goto err; - if (!upb_inttable_init(&s->exts, s->arena)) goto err; - - s->extreg = upb_ExtensionRegistry_New(s->arena); - if (!s->extreg) goto err; - - s->platform = kUpb_MiniTablePlatform_Native; - - upb_Status status; - if (!upb_DefPool_SetFeatureSetDefaults( - s, serialized_defaults, sizeof(serialized_defaults) - 1, &status)) { - goto err; - } - - if (!s->feature_set_defaults) goto err; - - return s; - -err: - upb_DefPool_Free(s); - return NULL; -} - -const UPB_DESC(FeatureSetDefaults) * - upb_DefPool_FeatureSetDefaults(const upb_DefPool* s) { - return s->feature_set_defaults; -} - -bool upb_DefPool_SetFeatureSetDefaults(upb_DefPool* s, - const char* serialized_defaults, - size_t serialized_len, - upb_Status* status) { - const UPB_DESC(FeatureSetDefaults)* defaults = UPB_DESC( - FeatureSetDefaults_parse)(serialized_defaults, serialized_len, s->arena); - if (!defaults) { - upb_Status_SetErrorFormat(status, "Failed to parse defaults"); - return false; - } - if (upb_strtable_count(&s->files) > 0) { - upb_Status_SetErrorFormat(status, - "Feature set defaults can't be changed once the " - "pool has started building"); - return false; - } - int min_edition = UPB_DESC(FeatureSetDefaults_minimum_edition(defaults)); - int max_edition = UPB_DESC(FeatureSetDefaults_maximum_edition(defaults)); - if (min_edition > max_edition) { - upb_Status_SetErrorFormat(status, "Invalid edition range %s to %s", - upb_FileDef_EditionName(min_edition), - upb_FileDef_EditionName(max_edition)); - return false; - } - size_t size; - const UPB_DESC( - FeatureSetDefaults_FeatureSetEditionDefault)* const* default_list = - UPB_DESC(FeatureSetDefaults_defaults(defaults, &size)); - int prev_edition = UPB_DESC(EDITION_UNKNOWN); - for (size_t i = 0; i < size; ++i) { - int edition = UPB_DESC( - FeatureSetDefaults_FeatureSetEditionDefault_edition(default_list[i])); - if (edition == UPB_DESC(EDITION_UNKNOWN)) { - upb_Status_SetErrorFormat(status, "Invalid edition UNKNOWN specified"); - return false; - } - if (edition <= prev_edition) { - upb_Status_SetErrorFormat(status, - "Feature set defaults are not strictly " - "increasing, %s is greater than or equal to %s", - upb_FileDef_EditionName(prev_edition), - upb_FileDef_EditionName(edition)); - return false; - } - prev_edition = edition; - } - - // Copy the defaults into the pool. - s->feature_set_defaults = defaults; - return true; -} - -bool _upb_DefPool_InsertExt(upb_DefPool* s, const upb_MiniTableExtension* ext, - const upb_FieldDef* f) { - return upb_inttable_insert(&s->exts, (uintptr_t)ext, upb_value_constptr(f), - s->arena); -} - -bool _upb_DefPool_InsertSym(upb_DefPool* s, upb_StringView sym, upb_value v, - upb_Status* status) { - // TODO: table should support an operation "tryinsert" to avoid the double - // lookup. - if (upb_strtable_lookup2(&s->syms, sym.data, sym.size, NULL)) { - upb_Status_SetErrorFormat(status, "duplicate symbol '%s'", sym.data); - return false; - } - if (!upb_strtable_insert(&s->syms, sym.data, sym.size, v, s->arena)) { - upb_Status_SetErrorMessage(status, "out of memory"); - return false; - } - return true; -} - -static const void* _upb_DefPool_Unpack(const upb_DefPool* s, const char* sym, - size_t size, upb_deftype_t type) { - upb_value v; - return upb_strtable_lookup2(&s->syms, sym, size, &v) - ? _upb_DefType_Unpack(v, type) - : NULL; -} - -bool _upb_DefPool_LookupSym(const upb_DefPool* s, const char* sym, size_t size, - upb_value* v) { - return upb_strtable_lookup2(&s->syms, sym, size, v); -} - -upb_ExtensionRegistry* _upb_DefPool_ExtReg(const upb_DefPool* s) { - return s->extreg; -} - -void** _upb_DefPool_ScratchData(const upb_DefPool* s) { - return (void**)&s->scratch_data; -} - -size_t* _upb_DefPool_ScratchSize(const upb_DefPool* s) { - return (size_t*)&s->scratch_size; -} - -void _upb_DefPool_SetPlatform(upb_DefPool* s, upb_MiniTablePlatform platform) { - assert(upb_strtable_count(&s->files) == 0); - s->platform = platform; -} - -const upb_MessageDef* upb_DefPool_FindMessageByName(const upb_DefPool* s, - const char* sym) { - return _upb_DefPool_Unpack(s, sym, strlen(sym), UPB_DEFTYPE_MSG); -} - -const upb_MessageDef* upb_DefPool_FindMessageByNameWithSize( - const upb_DefPool* s, const char* sym, size_t len) { - return _upb_DefPool_Unpack(s, sym, len, UPB_DEFTYPE_MSG); -} - -const upb_EnumDef* upb_DefPool_FindEnumByName(const upb_DefPool* s, - const char* sym) { - return _upb_DefPool_Unpack(s, sym, strlen(sym), UPB_DEFTYPE_ENUM); -} - -const upb_EnumValueDef* upb_DefPool_FindEnumByNameval(const upb_DefPool* s, - const char* sym) { - return _upb_DefPool_Unpack(s, sym, strlen(sym), UPB_DEFTYPE_ENUMVAL); -} - -const upb_FileDef* upb_DefPool_FindFileByName(const upb_DefPool* s, - const char* name) { - upb_value v; - return upb_strtable_lookup(&s->files, name, &v) ? upb_value_getconstptr(v) - : NULL; -} - -const upb_FileDef* upb_DefPool_FindFileByNameWithSize(const upb_DefPool* s, - const char* name, - size_t len) { - upb_value v; - return upb_strtable_lookup2(&s->files, name, len, &v) - ? upb_value_getconstptr(v) - : NULL; -} - -const upb_FieldDef* upb_DefPool_FindExtensionByNameWithSize( - const upb_DefPool* s, const char* name, size_t size) { - upb_value v; - if (!upb_strtable_lookup2(&s->syms, name, size, &v)) return NULL; - - switch (_upb_DefType_Type(v)) { - case UPB_DEFTYPE_FIELD: - return _upb_DefType_Unpack(v, UPB_DEFTYPE_FIELD); - case UPB_DEFTYPE_MSG: { - const upb_MessageDef* m = _upb_DefType_Unpack(v, UPB_DEFTYPE_MSG); - if (_upb_MessageDef_InMessageSet(m)) { - for (int i = 0; i < upb_MessageDef_NestedExtensionCount(m); i++) { - const upb_FieldDef* ext = upb_MessageDef_NestedExtension(m, i); - if (upb_FieldDef_MessageSubDef(ext) == m) { - return ext; - } - } - } - return NULL; - } - default: - break; - } - - return NULL; -} - -const upb_FieldDef* upb_DefPool_FindExtensionByName(const upb_DefPool* s, - const char* sym) { - return upb_DefPool_FindExtensionByNameWithSize(s, sym, strlen(sym)); -} - -const upb_ServiceDef* upb_DefPool_FindServiceByName(const upb_DefPool* s, - const char* name) { - return _upb_DefPool_Unpack(s, name, strlen(name), UPB_DEFTYPE_SERVICE); -} - -const upb_ServiceDef* upb_DefPool_FindServiceByNameWithSize( - const upb_DefPool* s, const char* name, size_t size) { - return _upb_DefPool_Unpack(s, name, size, UPB_DEFTYPE_SERVICE); -} - -const upb_FileDef* upb_DefPool_FindFileContainingSymbol(const upb_DefPool* s, - const char* name) { - upb_value v; - // TODO: non-extension fields and oneofs. - if (upb_strtable_lookup(&s->syms, name, &v)) { - switch (_upb_DefType_Type(v)) { - case UPB_DEFTYPE_EXT: { - const upb_FieldDef* f = _upb_DefType_Unpack(v, UPB_DEFTYPE_EXT); - return upb_FieldDef_File(f); - } - case UPB_DEFTYPE_MSG: { - const upb_MessageDef* m = _upb_DefType_Unpack(v, UPB_DEFTYPE_MSG); - return upb_MessageDef_File(m); - } - case UPB_DEFTYPE_ENUM: { - const upb_EnumDef* e = _upb_DefType_Unpack(v, UPB_DEFTYPE_ENUM); - return upb_EnumDef_File(e); - } - case UPB_DEFTYPE_ENUMVAL: { - const upb_EnumValueDef* ev = - _upb_DefType_Unpack(v, UPB_DEFTYPE_ENUMVAL); - return upb_EnumDef_File(upb_EnumValueDef_Enum(ev)); - } - case UPB_DEFTYPE_SERVICE: { - const upb_ServiceDef* service = - _upb_DefType_Unpack(v, UPB_DEFTYPE_SERVICE); - return upb_ServiceDef_File(service); - } - default: - UPB_UNREACHABLE(); - } - } - - const char* last_dot = strrchr(name, '.'); - if (last_dot) { - const upb_MessageDef* parent = - upb_DefPool_FindMessageByNameWithSize(s, name, last_dot - name); - if (parent) { - const char* shortname = last_dot + 1; - if (upb_MessageDef_FindByNameWithSize(parent, shortname, - strlen(shortname), NULL, NULL)) { - return upb_MessageDef_File(parent); - } - } - } - - return NULL; -} - -static void remove_filedef(upb_DefPool* s, upb_FileDef* file) { - intptr_t iter = UPB_INTTABLE_BEGIN; - upb_StringView key; - upb_value val; - while (upb_strtable_next2(&s->syms, &key, &val, &iter)) { - const upb_FileDef* f; - switch (_upb_DefType_Type(val)) { - case UPB_DEFTYPE_EXT: - f = upb_FieldDef_File(_upb_DefType_Unpack(val, UPB_DEFTYPE_EXT)); - break; - case UPB_DEFTYPE_MSG: - f = upb_MessageDef_File(_upb_DefType_Unpack(val, UPB_DEFTYPE_MSG)); - break; - case UPB_DEFTYPE_ENUM: - f = upb_EnumDef_File(_upb_DefType_Unpack(val, UPB_DEFTYPE_ENUM)); - break; - case UPB_DEFTYPE_ENUMVAL: - f = upb_EnumDef_File(upb_EnumValueDef_Enum( - _upb_DefType_Unpack(val, UPB_DEFTYPE_ENUMVAL))); - break; - case UPB_DEFTYPE_SERVICE: - f = upb_ServiceDef_File(_upb_DefType_Unpack(val, UPB_DEFTYPE_SERVICE)); - break; - default: - UPB_UNREACHABLE(); - } - - if (f == file) upb_strtable_removeiter(&s->syms, &iter); - } -} - -static const upb_FileDef* upb_DefBuilder_AddFileToPool( - upb_DefBuilder* const builder, upb_DefPool* const s, - const UPB_DESC(FileDescriptorProto) * const file_proto, - const upb_StringView name, upb_Status* const status) { - if (UPB_SETJMP(builder->err) != 0) { - UPB_ASSERT(!upb_Status_IsOk(status)); - if (builder->file) { - remove_filedef(s, builder->file); - builder->file = NULL; - } - } else if (!builder->arena || !builder->tmp_arena || - !upb_strtable_init(&builder->feature_cache, 16, - builder->tmp_arena) || - !(builder->legacy_features = - UPB_DESC(FeatureSet_new)(builder->tmp_arena))) { - _upb_DefBuilder_OomErr(builder); - } else { - _upb_FileDef_Create(builder, file_proto); - upb_strtable_insert(&s->files, name.data, name.size, - upb_value_constptr(builder->file), builder->arena); - UPB_ASSERT(upb_Status_IsOk(status)); - upb_Arena_Fuse(s->arena, builder->arena); - } - - if (builder->arena) upb_Arena_Free(builder->arena); - if (builder->tmp_arena) upb_Arena_Free(builder->tmp_arena); - return builder->file; -} - -static const upb_FileDef* _upb_DefPool_AddFile( - upb_DefPool* s, const UPB_DESC(FileDescriptorProto) * file_proto, - const upb_MiniTableFile* layout, upb_Status* status) { - const upb_StringView name = UPB_DESC(FileDescriptorProto_name)(file_proto); - - // Determine whether we already know about this file. - { - upb_value v; - if (upb_strtable_lookup2(&s->files, name.data, name.size, &v)) { - upb_Status_SetErrorFormat(status, - "duplicate file name " UPB_STRINGVIEW_FORMAT, - UPB_STRINGVIEW_ARGS(name)); - return NULL; - } - } - - upb_DefBuilder ctx = { - .symtab = s, - .tmp_buf = NULL, - .tmp_buf_size = 0, - .layout = layout, - .platform = s->platform, - .msg_count = 0, - .enum_count = 0, - .ext_count = 0, - .status = status, - .file = NULL, - .arena = upb_Arena_New(), - .tmp_arena = upb_Arena_New(), - }; - - return upb_DefBuilder_AddFileToPool(&ctx, s, file_proto, name, status); -} - -const upb_FileDef* upb_DefPool_AddFile(upb_DefPool* s, - const UPB_DESC(FileDescriptorProto) * - file_proto, - upb_Status* status) { - return _upb_DefPool_AddFile(s, file_proto, NULL, status); -} - -bool _upb_DefPool_LoadDefInitEx(upb_DefPool* s, const _upb_DefPool_Init* init, - bool rebuild_minitable) { - /* Since this function should never fail (it would indicate a bug in upb) we - * print errors to stderr instead of returning error status to the user. */ - _upb_DefPool_Init** deps = init->deps; - UPB_DESC(FileDescriptorProto) * file; - upb_Arena* arena; - upb_Status status; - - upb_Status_Clear(&status); - - if (upb_DefPool_FindFileByName(s, init->filename)) { - return true; - } - - arena = upb_Arena_New(); - - for (; *deps; deps++) { - if (!_upb_DefPool_LoadDefInitEx(s, *deps, rebuild_minitable)) goto err; - } - - file = UPB_DESC(FileDescriptorProto_parse_ex)( - init->descriptor.data, init->descriptor.size, NULL, - kUpb_DecodeOption_AliasString, arena); - s->bytes_loaded += init->descriptor.size; - - if (!file) { - upb_Status_SetErrorFormat( - &status, - "Failed to parse compiled-in descriptor for file '%s'. This should " - "never happen.", - init->filename); - goto err; - } - - const upb_MiniTableFile* mt = rebuild_minitable ? NULL : init->layout; - if (!_upb_DefPool_AddFile(s, file, mt, &status)) { - goto err; - } - - upb_Arena_Free(arena); - return true; - -err: - fprintf(stderr, - "Error loading compiled-in descriptor for file '%s' (this should " - "never happen): %s\n", - init->filename, upb_Status_ErrorMessage(&status)); - upb_Arena_Free(arena); - return false; -} - -size_t _upb_DefPool_BytesLoaded(const upb_DefPool* s) { - return s->bytes_loaded; -} - -upb_Arena* _upb_DefPool_Arena(const upb_DefPool* s) { return s->arena; } - -const upb_FieldDef* upb_DefPool_FindExtensionByMiniTable( - const upb_DefPool* s, const upb_MiniTableExtension* ext) { - upb_value v; - bool ok = upb_inttable_lookup(&s->exts, (uintptr_t)ext, &v); - UPB_ASSERT(ok); - return upb_value_getconstptr(v); -} - -const upb_FieldDef* upb_DefPool_FindExtensionByNumber(const upb_DefPool* s, - const upb_MessageDef* m, - int32_t fieldnum) { - const upb_MiniTable* t = upb_MessageDef_MiniTable(m); - const upb_MiniTableExtension* ext = - upb_ExtensionRegistry_Lookup(s->extreg, t, fieldnum); - return ext ? upb_DefPool_FindExtensionByMiniTable(s, ext) : NULL; -} - -const upb_ExtensionRegistry* upb_DefPool_ExtensionRegistry( - const upb_DefPool* s) { - return s->extreg; -} - -const upb_FieldDef** upb_DefPool_GetAllExtensions(const upb_DefPool* s, - const upb_MessageDef* m, - size_t* count) { - size_t n = 0; - intptr_t iter = UPB_INTTABLE_BEGIN; - uintptr_t key; - upb_value val; - // This is O(all exts) instead of O(exts for m). If we need this to be - // efficient we may need to make extreg into a two-level table, or have a - // second per-message index. - while (upb_inttable_next(&s->exts, &key, &val, &iter)) { - const upb_FieldDef* f = upb_value_getconstptr(val); - if (upb_FieldDef_ContainingType(f) == m) n++; - } - const upb_FieldDef** exts = upb_gmalloc(n * sizeof(*exts)); - iter = UPB_INTTABLE_BEGIN; - size_t i = 0; - while (upb_inttable_next(&s->exts, &key, &val, &iter)) { - const upb_FieldDef* f = upb_value_getconstptr(val); - if (upb_FieldDef_ContainingType(f) == m) exts[i++] = f; - } - *count = n; - return exts; -} - -bool _upb_DefPool_LoadDefInit(upb_DefPool* s, const _upb_DefPool_Init* init) { - return _upb_DefPool_LoadDefInitEx(s, init, false); -} - - -// Must be last. - -upb_deftype_t _upb_DefType_Type(upb_value v) { - const uintptr_t num = (uintptr_t)upb_value_getconstptr(v); - return num & UPB_DEFTYPE_MASK; -} - -upb_value _upb_DefType_Pack(const void* ptr, upb_deftype_t type) { - uintptr_t num = (uintptr_t)ptr; - UPB_ASSERT((num & UPB_DEFTYPE_MASK) == 0); - num |= type; - return upb_value_constptr((const void*)num); -} - -const void* _upb_DefType_Unpack(upb_value v, upb_deftype_t type) { - uintptr_t num = (uintptr_t)upb_value_getconstptr(v); - return (num & UPB_DEFTYPE_MASK) == type - ? (const void*)(num & ~UPB_DEFTYPE_MASK) - : NULL; -} - - -// Must be last. - -bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a) { - const size_t oldbufsize = d->bufsize; - const int used = d->ptr - d->buf; - - if (!d->buf) { - d->buf = upb_Arena_Malloc(a, d->bufsize); - if (!d->buf) return false; - d->ptr = d->buf; - d->e.end = d->buf + d->bufsize; - } - - if (oldbufsize - used < kUpb_MtDataEncoder_MinSize) { - d->bufsize *= 2; - d->buf = upb_Arena_Realloc(a, d->buf, oldbufsize, d->bufsize); - if (!d->buf) return false; - d->ptr = d->buf + used; - d->e.end = d->buf + d->bufsize; - } - - return true; -} - - -#include -#include -#include - - -// Must be last. - -struct upb_EnumDef { - UPB_ALIGN_AS(8) const UPB_DESC(EnumOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - const upb_MiniTableEnum* layout; // Only for proto2. - const upb_FileDef* file; - const upb_MessageDef* containing_type; // Could be merged with "file". - const char* full_name; - upb_strtable ntoi; - upb_inttable iton; - const upb_EnumValueDef* values; - const upb_EnumReservedRange* res_ranges; - const upb_StringView* res_names; - int value_count; - int res_range_count; - int res_name_count; - int32_t defaultval; - bool is_sorted; // Whether all of the values are defined in ascending order. -#if UINTPTR_MAX == 0xffffffff - uint32_t padding; // Increase size to a multiple of 8. -#endif -}; - -upb_EnumDef* _upb_EnumDef_At(const upb_EnumDef* e, int i) { - return (upb_EnumDef*)&e[i]; -} - -const upb_MiniTableEnum* _upb_EnumDef_MiniTable(const upb_EnumDef* e) { - return e->layout; -} - -bool _upb_EnumDef_Insert(upb_EnumDef* e, upb_EnumValueDef* v, upb_Arena* a) { - const char* name = upb_EnumValueDef_Name(v); - const upb_value val = upb_value_constptr(v); - bool ok = upb_strtable_insert(&e->ntoi, name, strlen(name), val, a); - if (!ok) return false; - - // Multiple enumerators can have the same number, first one wins. - const int number = upb_EnumValueDef_Number(v); - if (!upb_inttable_lookup(&e->iton, number, NULL)) { - return upb_inttable_insert(&e->iton, number, val, a); - } - return true; -} - -const UPB_DESC(EnumOptions) * upb_EnumDef_Options(const upb_EnumDef* e) { - return e->opts; -} - -bool upb_EnumDef_HasOptions(const upb_EnumDef* e) { - return e->opts != (void*)kUpbDefOptDefault; -} - -const UPB_DESC(FeatureSet) * - upb_EnumDef_ResolvedFeatures(const upb_EnumDef* e) { - return e->resolved_features; -} - -const char* upb_EnumDef_FullName(const upb_EnumDef* e) { return e->full_name; } - -const char* upb_EnumDef_Name(const upb_EnumDef* e) { - return _upb_DefBuilder_FullToShort(e->full_name); -} - -const upb_FileDef* upb_EnumDef_File(const upb_EnumDef* e) { return e->file; } - -const upb_MessageDef* upb_EnumDef_ContainingType(const upb_EnumDef* e) { - return e->containing_type; -} - -int32_t upb_EnumDef_Default(const upb_EnumDef* e) { - UPB_ASSERT(upb_EnumDef_FindValueByNumber(e, e->defaultval)); - return e->defaultval; -} - -int upb_EnumDef_ReservedRangeCount(const upb_EnumDef* e) { - return e->res_range_count; -} - -const upb_EnumReservedRange* upb_EnumDef_ReservedRange(const upb_EnumDef* e, - int i) { - UPB_ASSERT(0 <= i && i < e->res_range_count); - return _upb_EnumReservedRange_At(e->res_ranges, i); -} - -int upb_EnumDef_ReservedNameCount(const upb_EnumDef* e) { - return e->res_name_count; -} - -upb_StringView upb_EnumDef_ReservedName(const upb_EnumDef* e, int i) { - UPB_ASSERT(0 <= i && i < e->res_name_count); - return e->res_names[i]; -} - -int upb_EnumDef_ValueCount(const upb_EnumDef* e) { return e->value_count; } - -const upb_EnumValueDef* upb_EnumDef_FindValueByName(const upb_EnumDef* e, - const char* name) { - return upb_EnumDef_FindValueByNameWithSize(e, name, strlen(name)); -} - -const upb_EnumValueDef* upb_EnumDef_FindValueByNameWithSize( - const upb_EnumDef* e, const char* name, size_t size) { - upb_value v; - return upb_strtable_lookup2(&e->ntoi, name, size, &v) - ? upb_value_getconstptr(v) - : NULL; -} - -const upb_EnumValueDef* upb_EnumDef_FindValueByNumber(const upb_EnumDef* e, - int32_t num) { - upb_value v; - return upb_inttable_lookup(&e->iton, num, &v) ? upb_value_getconstptr(v) - : NULL; -} - -bool upb_EnumDef_CheckNumber(const upb_EnumDef* e, int32_t num) { - // We could use upb_EnumDef_FindValueByNumber(e, num) != NULL, but we expect - // this to be faster (especially for small numbers). - return upb_MiniTableEnum_CheckValue(e->layout, num); -} - -const upb_EnumValueDef* upb_EnumDef_Value(const upb_EnumDef* e, int i) { - UPB_ASSERT(0 <= i && i < e->value_count); - return _upb_EnumValueDef_At(e->values, i); -} - -bool upb_EnumDef_IsClosed(const upb_EnumDef* e) { - if (UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN) return false; - return upb_EnumDef_IsSpecifiedAsClosed(e); -} - -bool upb_EnumDef_IsSpecifiedAsClosed(const upb_EnumDef* e) { - return UPB_DESC(FeatureSet_enum_type)(e->resolved_features) == - UPB_DESC(FeatureSet_CLOSED); -} - -bool upb_EnumDef_MiniDescriptorEncode(const upb_EnumDef* e, upb_Arena* a, - upb_StringView* out) { - upb_DescState s; - _upb_DescState_Init(&s); - - const upb_EnumValueDef** sorted = NULL; - if (!e->is_sorted) { - sorted = _upb_EnumValueDefs_Sorted(e->values, e->value_count, a); - if (!sorted) return false; - } - - if (!_upb_DescState_Grow(&s, a)) return false; - s.ptr = upb_MtDataEncoder_StartEnum(&s.e, s.ptr); - - // Duplicate values are allowed but we only encode each value once. - uint32_t previous = 0; - - for (int i = 0; i < e->value_count; i++) { - const uint32_t current = - upb_EnumValueDef_Number(sorted ? sorted[i] : upb_EnumDef_Value(e, i)); - if (i != 0 && previous == current) continue; - - if (!_upb_DescState_Grow(&s, a)) return false; - s.ptr = upb_MtDataEncoder_PutEnumValue(&s.e, s.ptr, current); - previous = current; - } - - if (!_upb_DescState_Grow(&s, a)) return false; - s.ptr = upb_MtDataEncoder_EndEnum(&s.e, s.ptr); - - // There will always be room for this '\0' in the encoder buffer because - // kUpb_MtDataEncoder_MinSize is overkill for upb_MtDataEncoder_EndEnum(). - UPB_ASSERT(s.ptr < s.buf + s.bufsize); - *s.ptr = '\0'; - - out->data = s.buf; - out->size = s.ptr - s.buf; - return true; -} - -static upb_MiniTableEnum* create_enumlayout(upb_DefBuilder* ctx, - const upb_EnumDef* e) { - upb_StringView sv; - bool ok = upb_EnumDef_MiniDescriptorEncode(e, ctx->tmp_arena, &sv); - if (!ok) _upb_DefBuilder_Errf(ctx, "OOM while building enum MiniDescriptor"); - - upb_Status status; - upb_MiniTableEnum* layout = - upb_MiniTableEnum_Build(sv.data, sv.size, ctx->arena, &status); - if (!layout) - _upb_DefBuilder_Errf(ctx, "Error building enum MiniTable: %s", status.msg); - return layout; -} - -static upb_StringView* _upb_EnumReservedNames_New( - upb_DefBuilder* ctx, int n, const upb_StringView* protos) { - upb_StringView* sv = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_StringView, n); - for (int i = 0; i < n; i++) { - sv[i].data = - upb_strdup2(protos[i].data, protos[i].size, _upb_DefBuilder_Arena(ctx)); - sv[i].size = protos[i].size; - } - return sv; -} - -static void create_enumdef(upb_DefBuilder* ctx, const char* prefix, - const UPB_DESC(EnumDescriptorProto) * enum_proto, - const UPB_DESC(FeatureSet*) parent_features, - upb_EnumDef* e) { - const UPB_DESC(EnumValueDescriptorProto)* const* values; - const UPB_DESC(EnumDescriptorProto_EnumReservedRange)* const* res_ranges; - const upb_StringView* res_names; - upb_StringView name; - size_t n_value, n_res_range, n_res_name; - - UPB_DEF_SET_OPTIONS(e->opts, EnumDescriptorProto, EnumOptions, enum_proto); - e->resolved_features = _upb_DefBuilder_ResolveFeatures( - ctx, parent_features, UPB_DESC(EnumOptions_features)(e->opts)); - - // Must happen before _upb_DefBuilder_Add() - e->file = _upb_DefBuilder_File(ctx); - - name = UPB_DESC(EnumDescriptorProto_name)(enum_proto); - - e->full_name = _upb_DefBuilder_MakeFullName(ctx, prefix, name); - _upb_DefBuilder_Add(ctx, e->full_name, - _upb_DefType_Pack(e, UPB_DEFTYPE_ENUM)); - - values = UPB_DESC(EnumDescriptorProto_value)(enum_proto, &n_value); - - bool ok = upb_strtable_init(&e->ntoi, n_value, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - ok = upb_inttable_init(&e->iton, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - e->defaultval = 0; - e->value_count = n_value; - e->values = _upb_EnumValueDefs_New(ctx, prefix, n_value, values, - e->resolved_features, e, &e->is_sorted); - - if (n_value == 0) { - _upb_DefBuilder_Errf(ctx, "enums must contain at least one value (%s)", - e->full_name); - } - - res_ranges = - UPB_DESC(EnumDescriptorProto_reserved_range)(enum_proto, &n_res_range); - e->res_range_count = n_res_range; - e->res_ranges = _upb_EnumReservedRanges_New(ctx, n_res_range, res_ranges, e); - - res_names = - UPB_DESC(EnumDescriptorProto_reserved_name)(enum_proto, &n_res_name); - e->res_name_count = n_res_name; - e->res_names = _upb_EnumReservedNames_New(ctx, n_res_name, res_names); - - if (!upb_inttable_compact(&e->iton, ctx->arena)) _upb_DefBuilder_OomErr(ctx); - - if (upb_EnumDef_IsClosed(e)) { - if (ctx->layout) { - e->layout = upb_MiniTableFile_Enum(ctx->layout, ctx->enum_count++); - } else { - e->layout = create_enumlayout(ctx, e); - } - } else { - e->layout = NULL; - } -} - -upb_EnumDef* _upb_EnumDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(EnumDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - const upb_MessageDef* containing_type) { - _upb_DefType_CheckPadding(sizeof(upb_EnumDef)); - - // If a containing type is defined then get the full name from that. - // Otherwise use the package name from the file def. - const char* name = containing_type ? upb_MessageDef_FullName(containing_type) - : _upb_FileDef_RawPackage(ctx->file); - - upb_EnumDef* e = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_EnumDef, n); - for (int i = 0; i < n; i++) { - create_enumdef(ctx, name, protos[i], parent_features, &e[i]); - e[i].containing_type = containing_type; - } - return e; -} - - - -// Must be last. - -struct upb_EnumReservedRange { - int32_t start; - int32_t end; -}; - -upb_EnumReservedRange* _upb_EnumReservedRange_At(const upb_EnumReservedRange* r, - int i) { - return (upb_EnumReservedRange*)&r[i]; -} - -int32_t upb_EnumReservedRange_Start(const upb_EnumReservedRange* r) { - return r->start; -} -int32_t upb_EnumReservedRange_End(const upb_EnumReservedRange* r) { - return r->end; -} - -upb_EnumReservedRange* _upb_EnumReservedRanges_New( - upb_DefBuilder* ctx, int n, - const UPB_DESC(EnumDescriptorProto_EnumReservedRange) * const* protos, - const upb_EnumDef* e) { - upb_EnumReservedRange* r = - UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_EnumReservedRange, n); - - for (int i = 0; i < n; i++) { - const int32_t start = - UPB_DESC(EnumDescriptorProto_EnumReservedRange_start)(protos[i]); - const int32_t end = - UPB_DESC(EnumDescriptorProto_EnumReservedRange_end)(protos[i]); - - // A full validation would also check that each range is disjoint, and that - // none of the fields overlap with the extension ranges, but we are just - // sanity checking here. - - // Note: Not a typo! Unlike extension ranges and message reserved ranges, - // the end value of an enum reserved range is *inclusive*! - if (end < start) { - _upb_DefBuilder_Errf(ctx, "Reserved range (%d, %d) is invalid, enum=%s\n", - (int)start, (int)end, upb_EnumDef_FullName(e)); - } - - r[i].start = start; - r[i].end = end; - } - - return r; -} - - -#include -#include -#include - - -// Must be last. - -struct upb_EnumValueDef { - UPB_ALIGN_AS(8) const UPB_DESC(EnumValueOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - const upb_EnumDef* parent; - const char* full_name; - int32_t number; -}; - -upb_EnumValueDef* _upb_EnumValueDef_At(const upb_EnumValueDef* v, int i) { - return (upb_EnumValueDef*)&v[i]; -} - -static int _upb_EnumValueDef_Compare(const void* p1, const void* p2) { - const uint32_t v1 = (*(const upb_EnumValueDef**)p1)->number; - const uint32_t v2 = (*(const upb_EnumValueDef**)p2)->number; - return (v1 < v2) ? -1 : (v1 > v2); -} - -const upb_EnumValueDef** _upb_EnumValueDefs_Sorted(const upb_EnumValueDef* v, - size_t n, upb_Arena* a) { - if (SIZE_MAX / sizeof(void*) < n) return NULL; - // TODO: Try to replace this arena alloc with a persistent scratch buffer. - upb_EnumValueDef** out = - (upb_EnumValueDef**)upb_Arena_Malloc(a, n * sizeof(void*)); - if (!out) return NULL; - - for (int i = 0; i < n; i++) { - out[i] = (upb_EnumValueDef*)&v[i]; - } - qsort(out, n, sizeof(void*), _upb_EnumValueDef_Compare); - - return (const upb_EnumValueDef**)out; -} - -const UPB_DESC(EnumValueOptions) * - upb_EnumValueDef_Options(const upb_EnumValueDef* v) { - return v->opts; -} - -bool upb_EnumValueDef_HasOptions(const upb_EnumValueDef* v) { - return v->opts != (void*)kUpbDefOptDefault; -} - -const UPB_DESC(FeatureSet) * - upb_EnumValueDef_ResolvedFeatures(const upb_EnumValueDef* e) { - return e->resolved_features; -} - -const upb_EnumDef* upb_EnumValueDef_Enum(const upb_EnumValueDef* v) { - return v->parent; -} - -const char* upb_EnumValueDef_FullName(const upb_EnumValueDef* v) { - return v->full_name; -} - -const char* upb_EnumValueDef_Name(const upb_EnumValueDef* v) { - return _upb_DefBuilder_FullToShort(v->full_name); -} - -int32_t upb_EnumValueDef_Number(const upb_EnumValueDef* v) { return v->number; } - -uint32_t upb_EnumValueDef_Index(const upb_EnumValueDef* v) { - // Compute index in our parent's array. - return v - upb_EnumDef_Value(v->parent, 0); -} - -static void create_enumvaldef(upb_DefBuilder* ctx, const char* prefix, - const UPB_DESC(EnumValueDescriptorProto*) - val_proto, - const UPB_DESC(FeatureSet*) parent_features, - upb_EnumDef* e, upb_EnumValueDef* v) { - UPB_DEF_SET_OPTIONS(v->opts, EnumValueDescriptorProto, EnumValueOptions, - val_proto); - v->resolved_features = _upb_DefBuilder_ResolveFeatures( - ctx, parent_features, UPB_DESC(EnumValueOptions_features)(v->opts)); - - upb_StringView name = UPB_DESC(EnumValueDescriptorProto_name)(val_proto); - - v->parent = e; // Must happen prior to _upb_DefBuilder_Add() - v->full_name = _upb_DefBuilder_MakeFullName(ctx, prefix, name); - v->number = UPB_DESC(EnumValueDescriptorProto_number)(val_proto); - _upb_DefBuilder_Add(ctx, v->full_name, - _upb_DefType_Pack(v, UPB_DEFTYPE_ENUMVAL)); - - bool ok = _upb_EnumDef_Insert(e, v, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); -} - -static void _upb_EnumValueDef_CheckZeroValue(upb_DefBuilder* ctx, - const upb_EnumDef* e, - const upb_EnumValueDef* v, int n) { - // When the special UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN is enabled, we have to - // exempt closed enums from this check, even when we are treating them as - // open. - if (upb_EnumDef_IsSpecifiedAsClosed(e) || n == 0 || v[0].number == 0) return; - - _upb_DefBuilder_Errf(ctx, "for open enums, the first value must be zero (%s)", - upb_EnumDef_FullName(e)); -} - -// Allocate and initialize an array of |n| enum value defs owned by |e|. -upb_EnumValueDef* _upb_EnumValueDefs_New( - upb_DefBuilder* ctx, const char* prefix, int n, - const UPB_DESC(EnumValueDescriptorProto*) const* protos, - const UPB_DESC(FeatureSet*) parent_features, upb_EnumDef* e, - bool* is_sorted) { - _upb_DefType_CheckPadding(sizeof(upb_EnumValueDef)); - - upb_EnumValueDef* v = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_EnumValueDef, n); - - *is_sorted = true; - uint32_t previous = 0; - for (int i = 0; i < n; i++) { - create_enumvaldef(ctx, prefix, protos[i], parent_features, e, &v[i]); - - const uint32_t current = v[i].number; - if (previous > current) *is_sorted = false; - previous = current; - } - - _upb_EnumValueDef_CheckZeroValue(ctx, e, v, n); - - return v; -} - - -#include - - -// Must be last. - -struct upb_ExtensionRange { - const UPB_DESC(ExtensionRangeOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - int32_t start; - int32_t end; -}; - -upb_ExtensionRange* _upb_ExtensionRange_At(const upb_ExtensionRange* r, int i) { - return (upb_ExtensionRange*)&r[i]; -} - -const UPB_DESC(ExtensionRangeOptions) * - upb_ExtensionRange_Options(const upb_ExtensionRange* r) { - return r->opts; -} - -bool upb_ExtensionRange_HasOptions(const upb_ExtensionRange* r) { - return r->opts != (void*)kUpbDefOptDefault; -} - -int32_t upb_ExtensionRange_Start(const upb_ExtensionRange* r) { - return r->start; -} - -int32_t upb_ExtensionRange_End(const upb_ExtensionRange* r) { return r->end; } - -upb_ExtensionRange* _upb_ExtensionRanges_New( - upb_DefBuilder* ctx, int n, - const UPB_DESC(DescriptorProto_ExtensionRange*) const* protos, - const UPB_DESC(FeatureSet*) parent_features, const upb_MessageDef* m) { - upb_ExtensionRange* r = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_ExtensionRange, n); - - for (int i = 0; i < n; i++) { - UPB_DEF_SET_OPTIONS(r[i].opts, DescriptorProto_ExtensionRange, - ExtensionRangeOptions, protos[i]); - r[i].resolved_features = _upb_DefBuilder_ResolveFeatures( - ctx, parent_features, - UPB_DESC(ExtensionRangeOptions_features)(r[i].opts)); - - const int32_t start = - UPB_DESC(DescriptorProto_ExtensionRange_start)(protos[i]); - const int32_t end = UPB_DESC(DescriptorProto_ExtensionRange_end)(protos[i]); - const int32_t max = UPB_DESC(MessageOptions_message_set_wire_format)( - upb_MessageDef_Options(m)) - ? INT32_MAX - : kUpb_MaxFieldNumber + 1; - - // A full validation would also check that each range is disjoint, and that - // none of the fields overlap with the extension ranges, but we are just - // sanity checking here. - if (start < 1 || end <= start || end > max) { - _upb_DefBuilder_Errf(ctx, - "Extension range (%d, %d) is invalid, message=%s\n", - (int)start, (int)end, upb_MessageDef_FullName(m)); - } - - r[i].start = start; - r[i].end = end; - } - - return r; -} - - -#include -#include -#include -#include -#include -#include - - -// Must be last. - -#define UPB_FIELD_TYPE_UNSPECIFIED 0 - -typedef struct { - size_t len; - char str[1]; // Null-terminated string data follows. -} str_t; - -struct upb_FieldDef { - UPB_ALIGN_AS(8) const UPB_DESC(FieldOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - const upb_FileDef* file; - const upb_MessageDef* msgdef; - const char* full_name; - const char* json_name; - union { - int64_t sint; - uint64_t uint; - double dbl; - float flt; - bool boolean; - str_t* str; - void* msg; // Always NULL. - } defaultval; - union { - const upb_OneofDef* oneof; - const upb_MessageDef* extension_scope; - } scope; - union { - const upb_MessageDef* msgdef; - const upb_EnumDef* enumdef; - const UPB_DESC(FieldDescriptorProto) * unresolved; - } sub; - uint32_t number_; - uint16_t index_; - uint16_t layout_index; // Index into msgdef->layout->fields or file->exts - bool has_default; - bool has_json_name; - bool has_presence; - bool is_extension; - bool is_proto3_optional; - upb_FieldType type_; - upb_Label label_; -}; - -upb_FieldDef* _upb_FieldDef_At(const upb_FieldDef* f, int i) { - return (upb_FieldDef*)&f[i]; -} - -const UPB_DESC(FieldOptions) * upb_FieldDef_Options(const upb_FieldDef* f) { - return f->opts; -} - -bool upb_FieldDef_HasOptions(const upb_FieldDef* f) { - return f->opts != (void*)kUpbDefOptDefault; -} - -const UPB_DESC(FeatureSet) * - upb_FieldDef_ResolvedFeatures(const upb_FieldDef* f) { - return f->resolved_features; -} - -const char* upb_FieldDef_FullName(const upb_FieldDef* f) { - return f->full_name; -} - -upb_CType upb_FieldDef_CType(const upb_FieldDef* f) { - return upb_FieldType_CType(f->type_); -} - -upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f) { return f->type_; } - -uint32_t upb_FieldDef_Index(const upb_FieldDef* f) { return f->index_; } - -uint32_t upb_FieldDef_LayoutIndex(const upb_FieldDef* f) { - return f->layout_index; -} - -upb_Label upb_FieldDef_Label(const upb_FieldDef* f) { return f->label_; } - -uint32_t upb_FieldDef_Number(const upb_FieldDef* f) { return f->number_; } - -bool upb_FieldDef_IsExtension(const upb_FieldDef* f) { return f->is_extension; } - -bool _upb_FieldDef_IsPackable(const upb_FieldDef* f) { - return upb_FieldDef_IsRepeated(f) && upb_FieldDef_IsPrimitive(f); -} - -bool upb_FieldDef_IsPacked(const upb_FieldDef* f) { - return _upb_FieldDef_IsPackable(f) && - UPB_DESC(FeatureSet_repeated_field_encoding(f->resolved_features)) == - UPB_DESC(FeatureSet_PACKED); -} - -const char* upb_FieldDef_Name(const upb_FieldDef* f) { - return _upb_DefBuilder_FullToShort(f->full_name); -} - -const char* upb_FieldDef_JsonName(const upb_FieldDef* f) { - return f->json_name; -} - -bool upb_FieldDef_HasJsonName(const upb_FieldDef* f) { - return f->has_json_name; -} - -const upb_FileDef* upb_FieldDef_File(const upb_FieldDef* f) { return f->file; } - -const upb_MessageDef* upb_FieldDef_ContainingType(const upb_FieldDef* f) { - return f->msgdef; -} - -const upb_MessageDef* upb_FieldDef_ExtensionScope(const upb_FieldDef* f) { - return f->is_extension ? f->scope.extension_scope : NULL; -} - -const upb_OneofDef* upb_FieldDef_ContainingOneof(const upb_FieldDef* f) { - return f->is_extension ? NULL : f->scope.oneof; -} - -const upb_OneofDef* upb_FieldDef_RealContainingOneof(const upb_FieldDef* f) { - const upb_OneofDef* oneof = upb_FieldDef_ContainingOneof(f); - if (!oneof || upb_OneofDef_IsSynthetic(oneof)) return NULL; - return oneof; -} - -upb_MessageValue upb_FieldDef_Default(const upb_FieldDef* f) { - upb_MessageValue ret; - - if (upb_FieldDef_IsRepeated(f) || upb_FieldDef_IsSubMessage(f)) { - return (upb_MessageValue){.msg_val = NULL}; - } - - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Bool: - return (upb_MessageValue){.bool_val = f->defaultval.boolean}; - case kUpb_CType_Int64: - return (upb_MessageValue){.int64_val = f->defaultval.sint}; - case kUpb_CType_UInt64: - return (upb_MessageValue){.uint64_val = f->defaultval.uint}; - case kUpb_CType_Enum: - case kUpb_CType_Int32: - return (upb_MessageValue){.int32_val = (int32_t)f->defaultval.sint}; - case kUpb_CType_UInt32: - return (upb_MessageValue){.uint32_val = (uint32_t)f->defaultval.uint}; - case kUpb_CType_Float: - return (upb_MessageValue){.float_val = f->defaultval.flt}; - case kUpb_CType_Double: - return (upb_MessageValue){.double_val = f->defaultval.dbl}; - case kUpb_CType_String: - case kUpb_CType_Bytes: { - str_t* str = f->defaultval.str; - if (str) { - return (upb_MessageValue){ - .str_val = (upb_StringView){.data = str->str, .size = str->len}}; - } else { - return (upb_MessageValue){ - .str_val = (upb_StringView){.data = NULL, .size = 0}}; - } - } - default: - UPB_UNREACHABLE(); - } - - return ret; -} - -const upb_MessageDef* upb_FieldDef_MessageSubDef(const upb_FieldDef* f) { - return upb_FieldDef_IsSubMessage(f) ? f->sub.msgdef : NULL; -} - -const upb_EnumDef* upb_FieldDef_EnumSubDef(const upb_FieldDef* f) { - return upb_FieldDef_IsEnum(f) ? f->sub.enumdef : NULL; -} - -const upb_MiniTableField* upb_FieldDef_MiniTable(const upb_FieldDef* f) { - if (upb_FieldDef_IsExtension(f)) { - const upb_FileDef* file = upb_FieldDef_File(f); - return (upb_MiniTableField*)_upb_FileDef_ExtensionMiniTable( - file, f->layout_index); - } else { - const upb_MiniTable* layout = upb_MessageDef_MiniTable(f->msgdef); - return &layout->UPB_PRIVATE(fields)[f->layout_index]; - } -} - -const upb_MiniTableExtension* upb_FieldDef_MiniTableExtension( - const upb_FieldDef* f) { - UPB_ASSERT(upb_FieldDef_IsExtension(f)); - const upb_FileDef* file = upb_FieldDef_File(f); - return _upb_FileDef_ExtensionMiniTable(file, f->layout_index); -} - -bool _upb_FieldDef_IsClosedEnum(const upb_FieldDef* f) { - if (f->type_ != kUpb_FieldType_Enum) return false; - return upb_EnumDef_IsClosed(f->sub.enumdef); -} - -bool _upb_FieldDef_IsProto3Optional(const upb_FieldDef* f) { - return f->is_proto3_optional; -} - -int _upb_FieldDef_LayoutIndex(const upb_FieldDef* f) { return f->layout_index; } - -bool _upb_FieldDef_ValidateUtf8(const upb_FieldDef* f) { - if (upb_FieldDef_Type(f) != kUpb_FieldType_String) return false; - return UPB_DESC(FeatureSet_utf8_validation(f->resolved_features)) == - UPB_DESC(FeatureSet_VERIFY); -} - -bool _upb_FieldDef_IsGroupLike(const upb_FieldDef* f) { - // Groups are always tag-delimited. - if (f->type_ != kUpb_FieldType_Group) { - return false; - } - - const upb_MessageDef* msg = upb_FieldDef_MessageSubDef(f); - - // Group fields always are always the lowercase type name. - const char* mname = upb_MessageDef_Name(msg); - const char* fname = upb_FieldDef_Name(f); - size_t name_size = strlen(fname); - if (name_size != strlen(mname)) return false; - for (size_t i = 0; i < name_size; ++i) { - if ((mname[i] | 0x20) != fname[i]) { - // Case-insensitive ascii comparison. - return false; - } - } - - if (upb_MessageDef_File(msg) != upb_FieldDef_File(f)) { - return false; - } - - // Group messages are always defined in the same scope as the field. File - // level extensions will compare NULL == NULL here, which is why the file - // comparison above is necessary to ensure both come from the same file. - return upb_FieldDef_IsExtension(f) ? upb_FieldDef_ExtensionScope(f) == - upb_MessageDef_ContainingType(msg) - : upb_FieldDef_ContainingType(f) == - upb_MessageDef_ContainingType(msg); -} - -uint64_t _upb_FieldDef_Modifiers(const upb_FieldDef* f) { - uint64_t out = upb_FieldDef_IsPacked(f) ? kUpb_FieldModifier_IsPacked : 0; - - if (upb_FieldDef_IsRepeated(f)) { - out |= kUpb_FieldModifier_IsRepeated; - } else if (upb_FieldDef_IsRequired(f)) { - out |= kUpb_FieldModifier_IsRequired; - } else if (!upb_FieldDef_HasPresence(f)) { - out |= kUpb_FieldModifier_IsProto3Singular; - } - - if (_upb_FieldDef_IsClosedEnum(f)) { - out |= kUpb_FieldModifier_IsClosedEnum; - } - - if (_upb_FieldDef_ValidateUtf8(f)) { - out |= kUpb_FieldModifier_ValidateUtf8; - } - - return out; -} - -bool upb_FieldDef_HasDefault(const upb_FieldDef* f) { return f->has_default; } -bool upb_FieldDef_HasPresence(const upb_FieldDef* f) { return f->has_presence; } - -bool upb_FieldDef_HasSubDef(const upb_FieldDef* f) { - return upb_FieldDef_IsSubMessage(f) || upb_FieldDef_IsEnum(f); -} - -bool upb_FieldDef_IsEnum(const upb_FieldDef* f) { - return upb_FieldDef_CType(f) == kUpb_CType_Enum; -} - -bool upb_FieldDef_IsMap(const upb_FieldDef* f) { - return upb_FieldDef_IsRepeated(f) && upb_FieldDef_IsSubMessage(f) && - upb_MessageDef_IsMapEntry(upb_FieldDef_MessageSubDef(f)); -} - -bool upb_FieldDef_IsOptional(const upb_FieldDef* f) { - return upb_FieldDef_Label(f) == kUpb_Label_Optional; -} - -bool upb_FieldDef_IsPrimitive(const upb_FieldDef* f) { - return !upb_FieldDef_IsString(f) && !upb_FieldDef_IsSubMessage(f); -} - -bool upb_FieldDef_IsRepeated(const upb_FieldDef* f) { - return upb_FieldDef_Label(f) == kUpb_Label_Repeated; -} - -bool upb_FieldDef_IsRequired(const upb_FieldDef* f) { - return UPB_DESC(FeatureSet_field_presence)(f->resolved_features) == - UPB_DESC(FeatureSet_LEGACY_REQUIRED); -} - -bool upb_FieldDef_IsString(const upb_FieldDef* f) { - return upb_FieldDef_CType(f) == kUpb_CType_String || - upb_FieldDef_CType(f) == kUpb_CType_Bytes; -} - -bool upb_FieldDef_IsSubMessage(const upb_FieldDef* f) { - return upb_FieldDef_CType(f) == kUpb_CType_Message; -} - -static bool between(int32_t x, int32_t low, int32_t high) { - return x >= low && x <= high; -} - -bool upb_FieldDef_checklabel(int32_t label) { return between(label, 1, 3); } -bool upb_FieldDef_checktype(int32_t type) { return between(type, 1, 11); } -bool upb_FieldDef_checkintfmt(int32_t fmt) { return between(fmt, 1, 3); } - -bool upb_FieldDef_checkdescriptortype(int32_t type) { - return between(type, 1, 18); -} - -static bool streql2(const char* a, size_t n, const char* b) { - return n == strlen(b) && memcmp(a, b, n) == 0; -} - -// Implement the transformation as described in the spec: -// 1. upper case all letters after an underscore. -// 2. remove all underscores. -static char* make_json_name(const char* name, size_t size, upb_Arena* a) { - char* out = upb_Arena_Malloc(a, size + 1); // +1 is to add a trailing '\0' - if (out == NULL) return NULL; - - bool ucase_next = false; - char* des = out; - for (size_t i = 0; i < size; i++) { - if (name[i] == '_') { - ucase_next = true; - } else { - *des++ = ucase_next ? toupper(name[i]) : name[i]; - ucase_next = false; - } - } - *des++ = '\0'; - return out; -} - -static str_t* newstr(upb_DefBuilder* ctx, const char* data, size_t len) { - str_t* ret = _upb_DefBuilder_Alloc(ctx, sizeof(*ret) + len); - if (!ret) _upb_DefBuilder_OomErr(ctx); - ret->len = len; - if (len) memcpy(ret->str, data, len); - ret->str[len] = '\0'; - return ret; -} - -static str_t* unescape(upb_DefBuilder* ctx, const upb_FieldDef* f, - const char* data, size_t len) { - // Size here is an upper bound; escape sequences could ultimately shrink it. - str_t* ret = _upb_DefBuilder_Alloc(ctx, sizeof(*ret) + len); - char* dst = &ret->str[0]; - const char* src = data; - const char* end = data + len; - - while (src < end) { - if (*src == '\\') { - src++; - *dst++ = _upb_DefBuilder_ParseEscape(ctx, f, &src, end); - } else { - *dst++ = *src++; - } - } - - ret->len = dst - &ret->str[0]; - return ret; -} - -static void parse_default(upb_DefBuilder* ctx, const char* str, size_t len, - upb_FieldDef* f) { - char* end; - char nullz[64]; - errno = 0; - - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Int32: - case kUpb_CType_Int64: - case kUpb_CType_UInt32: - case kUpb_CType_UInt64: - case kUpb_CType_Double: - case kUpb_CType_Float: - // Standard C number parsing functions expect null-terminated strings. - if (len >= sizeof(nullz) - 1) { - _upb_DefBuilder_Errf(ctx, "Default too long: %.*s", (int)len, str); - } - memcpy(nullz, str, len); - nullz[len] = '\0'; - str = nullz; - break; - default: - break; - } - - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Int32: { - long val = strtol(str, &end, 0); - if (val > INT32_MAX || val < INT32_MIN || errno == ERANGE || *end) { - goto invalid; - } - f->defaultval.sint = val; - break; - } - case kUpb_CType_Enum: { - const upb_EnumDef* e = f->sub.enumdef; - const upb_EnumValueDef* ev = - upb_EnumDef_FindValueByNameWithSize(e, str, len); - if (!ev) { - goto invalid; - } - f->defaultval.sint = upb_EnumValueDef_Number(ev); - break; - } - case kUpb_CType_Int64: { - long long val = strtoll(str, &end, 0); - if (val > INT64_MAX || val < INT64_MIN || errno == ERANGE || *end) { - goto invalid; - } - f->defaultval.sint = val; - break; - } - case kUpb_CType_UInt32: { - unsigned long val = strtoul(str, &end, 0); - if (val > UINT32_MAX || errno == ERANGE || *end) { - goto invalid; - } - f->defaultval.uint = val; - break; - } - case kUpb_CType_UInt64: { - unsigned long long val = strtoull(str, &end, 0); - if (val > UINT64_MAX || errno == ERANGE || *end) { - goto invalid; - } - f->defaultval.uint = val; - break; - } - case kUpb_CType_Double: { - double val = strtod(str, &end); - if (errno == ERANGE || *end) { - goto invalid; - } - f->defaultval.dbl = val; - break; - } - case kUpb_CType_Float: { - float val = strtof(str, &end); - if (errno == ERANGE || *end) { - goto invalid; - } - f->defaultval.flt = val; - break; - } - case kUpb_CType_Bool: { - if (streql2(str, len, "false")) { - f->defaultval.boolean = false; - } else if (streql2(str, len, "true")) { - f->defaultval.boolean = true; - } else { - goto invalid; - } - break; - } - case kUpb_CType_String: - f->defaultval.str = newstr(ctx, str, len); - break; - case kUpb_CType_Bytes: - f->defaultval.str = unescape(ctx, f, str, len); - break; - case kUpb_CType_Message: - /* Should not have a default value. */ - _upb_DefBuilder_Errf(ctx, "Message should not have a default (%s)", - upb_FieldDef_FullName(f)); - } - - return; - -invalid: - _upb_DefBuilder_Errf(ctx, "Invalid default '%.*s' for field %s of type %d", - (int)len, str, upb_FieldDef_FullName(f), - (int)upb_FieldDef_Type(f)); -} - -static void set_default_default(upb_DefBuilder* ctx, upb_FieldDef* f) { - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Int32: - case kUpb_CType_Int64: - f->defaultval.sint = 0; - break; - case kUpb_CType_UInt64: - case kUpb_CType_UInt32: - f->defaultval.uint = 0; - break; - case kUpb_CType_Double: - case kUpb_CType_Float: - f->defaultval.dbl = 0; - break; - case kUpb_CType_String: - case kUpb_CType_Bytes: - f->defaultval.str = newstr(ctx, NULL, 0); - break; - case kUpb_CType_Bool: - f->defaultval.boolean = false; - break; - case kUpb_CType_Enum: { - const upb_EnumValueDef* v = upb_EnumDef_Value(f->sub.enumdef, 0); - f->defaultval.sint = upb_EnumValueDef_Number(v); - break; - } - case kUpb_CType_Message: - break; - } -} - -static bool _upb_FieldDef_InferLegacyFeatures( - upb_DefBuilder* ctx, upb_FieldDef* f, - const UPB_DESC(FieldDescriptorProto*) proto, - const UPB_DESC(FieldOptions*) options, upb_Syntax syntax, - UPB_DESC(FeatureSet*) features) { - bool ret = false; - - if (UPB_DESC(FieldDescriptorProto_label)(proto) == kUpb_Label_Required) { - if (syntax == kUpb_Syntax_Proto3) { - _upb_DefBuilder_Errf(ctx, "proto3 fields cannot be required (%s)", - f->full_name); - } - int val = UPB_DESC(FeatureSet_LEGACY_REQUIRED); - UPB_DESC(FeatureSet_set_field_presence(features, val)); - ret = true; - } - - if (UPB_DESC(FieldDescriptorProto_type)(proto) == kUpb_FieldType_Group) { - int val = UPB_DESC(FeatureSet_DELIMITED); - UPB_DESC(FeatureSet_set_message_encoding(features, val)); - ret = true; - } - - if (UPB_DESC(FieldOptions_has_packed)(options)) { - int val = UPB_DESC(FieldOptions_packed)(options) - ? UPB_DESC(FeatureSet_PACKED) - : UPB_DESC(FeatureSet_EXPANDED); - UPB_DESC(FeatureSet_set_repeated_field_encoding(features, val)); - ret = true; - } - - return ret; -} - -static void _upb_FieldDef_Create(upb_DefBuilder* ctx, const char* prefix, - const UPB_DESC(FeatureSet*) parent_features, - const UPB_DESC(FieldDescriptorProto*) - field_proto, - upb_MessageDef* m, upb_FieldDef* f) { - // Must happen before _upb_DefBuilder_Add() - f->file = _upb_DefBuilder_File(ctx); - - const upb_StringView name = UPB_DESC(FieldDescriptorProto_name)(field_proto); - f->full_name = _upb_DefBuilder_MakeFullName(ctx, prefix, name); - f->number_ = UPB_DESC(FieldDescriptorProto_number)(field_proto); - f->is_proto3_optional = - UPB_DESC(FieldDescriptorProto_proto3_optional)(field_proto); - f->msgdef = m; - f->scope.oneof = NULL; - - UPB_DEF_SET_OPTIONS(f->opts, FieldDescriptorProto, FieldOptions, field_proto); - - upb_Syntax syntax = upb_FileDef_Syntax(f->file); - const UPB_DESC(FeatureSet*) unresolved_features = - UPB_DESC(FieldOptions_features)(f->opts); - bool implicit = false; - - if (syntax != kUpb_Syntax_Editions) { - upb_Message_Clear(UPB_UPCAST(ctx->legacy_features), - UPB_DESC_MINITABLE(FeatureSet)); - if (_upb_FieldDef_InferLegacyFeatures(ctx, f, field_proto, f->opts, syntax, - ctx->legacy_features)) { - implicit = true; - unresolved_features = ctx->legacy_features; - } - } - - if (UPB_DESC(FieldDescriptorProto_has_oneof_index)(field_proto)) { - int oneof_index = UPB_DESC(FieldDescriptorProto_oneof_index)(field_proto); - - if (!m) { - _upb_DefBuilder_Errf(ctx, "oneof field (%s) has no containing msg", - f->full_name); - } - - if (oneof_index < 0 || oneof_index >= upb_MessageDef_OneofCount(m)) { - _upb_DefBuilder_Errf(ctx, "oneof_index out of range (%s)", f->full_name); - } - - upb_OneofDef* oneof = (upb_OneofDef*)upb_MessageDef_Oneof(m, oneof_index); - f->scope.oneof = oneof; - parent_features = upb_OneofDef_ResolvedFeatures(oneof); - - _upb_OneofDef_Insert(ctx, oneof, f, name.data, name.size); - } - - f->resolved_features = _upb_DefBuilder_DoResolveFeatures( - ctx, parent_features, unresolved_features, implicit); - - f->label_ = (int)UPB_DESC(FieldDescriptorProto_label)(field_proto); - if (f->label_ == kUpb_Label_Optional && - // TODO: remove once we can deprecate kUpb_Label_Required. - UPB_DESC(FeatureSet_field_presence)(f->resolved_features) == - UPB_DESC(FeatureSet_LEGACY_REQUIRED)) { - f->label_ = kUpb_Label_Required; - } - - if (!UPB_DESC(FieldDescriptorProto_has_name)(field_proto)) { - _upb_DefBuilder_Errf(ctx, "field has no name"); - } - - f->has_json_name = UPB_DESC(FieldDescriptorProto_has_json_name)(field_proto); - if (f->has_json_name) { - const upb_StringView sv = - UPB_DESC(FieldDescriptorProto_json_name)(field_proto); - f->json_name = upb_strdup2(sv.data, sv.size, ctx->arena); - } else { - f->json_name = make_json_name(name.data, name.size, ctx->arena); - } - if (!f->json_name) _upb_DefBuilder_OomErr(ctx); - - const bool has_type = UPB_DESC(FieldDescriptorProto_has_type)(field_proto); - const bool has_type_name = - UPB_DESC(FieldDescriptorProto_has_type_name)(field_proto); - - f->type_ = (int)UPB_DESC(FieldDescriptorProto_type)(field_proto); - - if (has_type) { - switch (f->type_) { - case kUpb_FieldType_Message: - case kUpb_FieldType_Group: - case kUpb_FieldType_Enum: - if (!has_type_name) { - _upb_DefBuilder_Errf(ctx, "field of type %d requires type name (%s)", - (int)f->type_, f->full_name); - } - break; - default: - if (has_type_name) { - _upb_DefBuilder_Errf( - ctx, "invalid type for field with type_name set (%s, %d)", - f->full_name, (int)f->type_); - } - } - } - - if ((!has_type && has_type_name) || f->type_ == kUpb_FieldType_Message) { - f->type_ = - UPB_FIELD_TYPE_UNSPECIFIED; // We'll assign this in resolve_subdef() - } else { - if (f->type_ < kUpb_FieldType_Double || f->type_ > kUpb_FieldType_SInt64) { - _upb_DefBuilder_Errf(ctx, "invalid type for field %s (%d)", f->full_name, - f->type_); - } - } - - if (f->label_ < kUpb_Label_Optional || f->label_ > kUpb_Label_Repeated) { - _upb_DefBuilder_Errf(ctx, "invalid label for field %s (%d)", f->full_name, - f->label_); - } - - /* We can't resolve the subdef or (in the case of extensions) the containing - * message yet, because it may not have been defined yet. We stash a pointer - * to the field_proto until later when we can properly resolve it. */ - f->sub.unresolved = field_proto; - - if (UPB_DESC(FieldDescriptorProto_has_oneof_index)(field_proto)) { - if (upb_FieldDef_Label(f) != kUpb_Label_Optional) { - _upb_DefBuilder_Errf(ctx, "fields in oneof must have OPTIONAL label (%s)", - f->full_name); - } - } - - f->has_presence = - (!upb_FieldDef_IsRepeated(f)) && - (f->is_extension || - (f->type_ == kUpb_FieldType_Message || - f->type_ == kUpb_FieldType_Group || upb_FieldDef_ContainingOneof(f) || - UPB_DESC(FeatureSet_field_presence)(f->resolved_features) != - UPB_DESC(FeatureSet_IMPLICIT))); -} - -static void _upb_FieldDef_CreateExt(upb_DefBuilder* ctx, const char* prefix, - const UPB_DESC(FeatureSet*) parent_features, - const UPB_DESC(FieldDescriptorProto*) - field_proto, - upb_MessageDef* m, upb_FieldDef* f) { - f->is_extension = true; - _upb_FieldDef_Create(ctx, prefix, parent_features, field_proto, m, f); - - if (UPB_DESC(FieldDescriptorProto_has_oneof_index)(field_proto)) { - _upb_DefBuilder_Errf(ctx, "oneof_index provided for extension field (%s)", - f->full_name); - } - - f->scope.extension_scope = m; - _upb_DefBuilder_Add(ctx, f->full_name, _upb_DefType_Pack(f, UPB_DEFTYPE_EXT)); - f->layout_index = ctx->ext_count++; - - if (ctx->layout) { - UPB_ASSERT(upb_MiniTableExtension_Number( - upb_FieldDef_MiniTableExtension(f)) == f->number_); - } -} - -static void _upb_FieldDef_CreateNotExt(upb_DefBuilder* ctx, const char* prefix, - const UPB_DESC(FeatureSet*) - parent_features, - const UPB_DESC(FieldDescriptorProto*) - field_proto, - upb_MessageDef* m, upb_FieldDef* f) { - f->is_extension = false; - _upb_FieldDef_Create(ctx, prefix, parent_features, field_proto, m, f); - - if (!UPB_DESC(FieldDescriptorProto_has_oneof_index)(field_proto)) { - if (f->is_proto3_optional) { - _upb_DefBuilder_Errf( - ctx, - "non-extension field (%s) with proto3_optional was not in a oneof", - f->full_name); - } - } - - _upb_MessageDef_InsertField(ctx, m, f); -} - -upb_FieldDef* _upb_Extensions_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(FieldDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - const char* prefix, upb_MessageDef* m) { - _upb_DefType_CheckPadding(sizeof(upb_FieldDef)); - upb_FieldDef* defs = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_FieldDef, n); - - for (int i = 0; i < n; i++) { - upb_FieldDef* f = &defs[i]; - - _upb_FieldDef_CreateExt(ctx, prefix, parent_features, protos[i], m, f); - f->index_ = i; - } - - return defs; -} - -upb_FieldDef* _upb_FieldDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(FieldDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - const char* prefix, upb_MessageDef* m, - bool* is_sorted) { - _upb_DefType_CheckPadding(sizeof(upb_FieldDef)); - upb_FieldDef* defs = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_FieldDef, n); - - uint32_t previous = 0; - for (int i = 0; i < n; i++) { - upb_FieldDef* f = &defs[i]; - - _upb_FieldDef_CreateNotExt(ctx, prefix, parent_features, protos[i], m, f); - f->index_ = i; - if (!ctx->layout) { - // Speculate that the def fields are sorted. We will always sort the - // MiniTable fields, so if defs are sorted then indices will match. - // - // If this is incorrect, we will overwrite later. - f->layout_index = i; - } - - const uint32_t current = f->number_; - if (previous > current) *is_sorted = false; - previous = current; - } - - return defs; -} - -static void resolve_subdef(upb_DefBuilder* ctx, const char* prefix, - upb_FieldDef* f) { - const UPB_DESC(FieldDescriptorProto)* field_proto = f->sub.unresolved; - upb_StringView name = UPB_DESC(FieldDescriptorProto_type_name)(field_proto); - bool has_name = UPB_DESC(FieldDescriptorProto_has_type_name)(field_proto); - switch ((int)f->type_) { - case UPB_FIELD_TYPE_UNSPECIFIED: { - // Type was not specified and must be inferred. - UPB_ASSERT(has_name); - upb_deftype_t type; - const void* def = - _upb_DefBuilder_ResolveAny(ctx, f->full_name, prefix, name, &type); - switch (type) { - case UPB_DEFTYPE_ENUM: - f->sub.enumdef = def; - f->type_ = kUpb_FieldType_Enum; - break; - case UPB_DEFTYPE_MSG: - f->sub.msgdef = def; - f->type_ = kUpb_FieldType_Message; - // TODO: remove once we can deprecate - // kUpb_FieldType_Group. - if (UPB_DESC(FeatureSet_message_encoding)(f->resolved_features) == - UPB_DESC(FeatureSet_DELIMITED) && - !upb_MessageDef_IsMapEntry(def) && - !(f->msgdef && upb_MessageDef_IsMapEntry(f->msgdef))) { - f->type_ = kUpb_FieldType_Group; - } - f->has_presence = !upb_FieldDef_IsRepeated(f); - break; - default: - _upb_DefBuilder_Errf(ctx, "Couldn't resolve type name for field %s", - f->full_name); - } - break; - } - case kUpb_FieldType_Message: - case kUpb_FieldType_Group: - UPB_ASSERT(has_name); - f->sub.msgdef = _upb_DefBuilder_Resolve(ctx, f->full_name, prefix, name, - UPB_DEFTYPE_MSG); - break; - case kUpb_FieldType_Enum: - UPB_ASSERT(has_name); - f->sub.enumdef = _upb_DefBuilder_Resolve(ctx, f->full_name, prefix, name, - UPB_DEFTYPE_ENUM); - break; - default: - // No resolution necessary. - break; - } -} - -static int _upb_FieldDef_Compare(const void* p1, const void* p2) { - const uint32_t v1 = (*(upb_FieldDef**)p1)->number_; - const uint32_t v2 = (*(upb_FieldDef**)p2)->number_; - return (v1 < v2) ? -1 : (v1 > v2); -} - -// _upb_FieldDefs_Sorted() is mostly a pure function of its inputs, but has one -// critical side effect that we depend on: it sets layout_index appropriately -// for non-sorted lists of fields. -const upb_FieldDef** _upb_FieldDefs_Sorted(const upb_FieldDef* f, int n, - upb_Arena* a) { - // TODO: Replace this arena alloc with a persistent scratch buffer. - upb_FieldDef** out = (upb_FieldDef**)upb_Arena_Malloc(a, n * sizeof(void*)); - if (!out) return NULL; - - for (int i = 0; i < n; i++) { - out[i] = (upb_FieldDef*)&f[i]; - } - qsort(out, n, sizeof(void*), _upb_FieldDef_Compare); - - for (int i = 0; i < n; i++) { - out[i]->layout_index = i; - } - return (const upb_FieldDef**)out; -} - -bool upb_FieldDef_MiniDescriptorEncode(const upb_FieldDef* f, upb_Arena* a, - upb_StringView* out) { - UPB_ASSERT(f->is_extension); - - upb_DescState s; - _upb_DescState_Init(&s); - - const int number = upb_FieldDef_Number(f); - const uint64_t modifiers = _upb_FieldDef_Modifiers(f); - - if (!_upb_DescState_Grow(&s, a)) return false; - s.ptr = upb_MtDataEncoder_EncodeExtension(&s.e, s.ptr, f->type_, number, - modifiers); - *s.ptr = '\0'; - - out->data = s.buf; - out->size = s.ptr - s.buf; - return true; -} - -static void resolve_extension(upb_DefBuilder* ctx, const char* prefix, - upb_FieldDef* f, - const UPB_DESC(FieldDescriptorProto) * - field_proto) { - if (!UPB_DESC(FieldDescriptorProto_has_extendee)(field_proto)) { - _upb_DefBuilder_Errf(ctx, "extension for field '%s' had no extendee", - f->full_name); - } - - upb_StringView name = UPB_DESC(FieldDescriptorProto_extendee)(field_proto); - const upb_MessageDef* m = - _upb_DefBuilder_Resolve(ctx, f->full_name, prefix, name, UPB_DEFTYPE_MSG); - f->msgdef = m; - - if (!_upb_MessageDef_IsValidExtensionNumber(m, f->number_)) { - _upb_DefBuilder_Errf( - ctx, - "field number %u in extension %s has no extension range in message %s", - (unsigned)f->number_, f->full_name, upb_MessageDef_FullName(m)); - } -} - -void _upb_FieldDef_BuildMiniTableExtension(upb_DefBuilder* ctx, - const upb_FieldDef* f) { - const upb_MiniTableExtension* ext = upb_FieldDef_MiniTableExtension(f); - - if (ctx->layout) { - UPB_ASSERT(upb_FieldDef_Number(f) == upb_MiniTableExtension_Number(ext)); - } else { - upb_StringView desc; - if (!upb_FieldDef_MiniDescriptorEncode(f, ctx->tmp_arena, &desc)) { - _upb_DefBuilder_OomErr(ctx); - } - - upb_MiniTableExtension* mut_ext = (upb_MiniTableExtension*)ext; - upb_MiniTableSub sub = {NULL}; - if (upb_FieldDef_IsSubMessage(f)) { - const upb_MiniTable* submsg = upb_MessageDef_MiniTable(f->sub.msgdef); - sub = upb_MiniTableSub_FromMessage(submsg); - } else if (_upb_FieldDef_IsClosedEnum(f)) { - const upb_MiniTableEnum* subenum = _upb_EnumDef_MiniTable(f->sub.enumdef); - sub = upb_MiniTableSub_FromEnum(subenum); - } - bool ok2 = _upb_MiniTableExtension_Init(desc.data, desc.size, mut_ext, - upb_MessageDef_MiniTable(f->msgdef), - sub, ctx->platform, ctx->status); - if (!ok2) _upb_DefBuilder_Errf(ctx, "Could not build extension mini table"); - } - - bool ok = _upb_DefPool_InsertExt(ctx->symtab, ext, f); - if (!ok) _upb_DefBuilder_OomErr(ctx); -} - -static void resolve_default(upb_DefBuilder* ctx, upb_FieldDef* f, - const UPB_DESC(FieldDescriptorProto) * - field_proto) { - // Have to delay resolving of the default value until now because of the enum - // case, since enum defaults are specified with a label. - if (UPB_DESC(FieldDescriptorProto_has_default_value)(field_proto)) { - upb_StringView defaultval = - UPB_DESC(FieldDescriptorProto_default_value)(field_proto); - - if (upb_FileDef_Syntax(f->file) == kUpb_Syntax_Proto3) { - _upb_DefBuilder_Errf(ctx, - "proto3 fields cannot have explicit defaults (%s)", - f->full_name); - } - - if (upb_FieldDef_IsSubMessage(f)) { - _upb_DefBuilder_Errf(ctx, - "message fields cannot have explicit defaults (%s)", - f->full_name); - } - - parse_default(ctx, defaultval.data, defaultval.size, f); - f->has_default = true; - } else { - set_default_default(ctx, f); - f->has_default = false; - } -} - -void _upb_FieldDef_Resolve(upb_DefBuilder* ctx, const char* prefix, - upb_FieldDef* f) { - // We have to stash this away since resolve_subdef() may overwrite it. - const UPB_DESC(FieldDescriptorProto)* field_proto = f->sub.unresolved; - - resolve_subdef(ctx, prefix, f); - resolve_default(ctx, f, field_proto); - - if (f->is_extension) { - resolve_extension(ctx, prefix, f, field_proto); - } -} - - -#include -#include -#include - - -// Must be last. - -struct upb_FileDef { - const UPB_DESC(FileOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - const char* name; - const char* package; - UPB_DESC(Edition) edition; - - const upb_FileDef** deps; - const int32_t* public_deps; - const int32_t* weak_deps; - const upb_MessageDef* top_lvl_msgs; - const upb_EnumDef* top_lvl_enums; - const upb_FieldDef* top_lvl_exts; - const upb_ServiceDef* services; - const upb_MiniTableExtension** ext_layouts; - const upb_DefPool* symtab; - - int dep_count; - int public_dep_count; - int weak_dep_count; - int top_lvl_msg_count; - int top_lvl_enum_count; - int top_lvl_ext_count; - int service_count; - int ext_count; // All exts in the file. - upb_Syntax syntax; -}; - -UPB_API const char* upb_FileDef_EditionName(int edition) { - // TODO Synchronize this with descriptor.proto better. - switch (edition) { - case UPB_DESC(EDITION_PROTO2): - return "PROTO2"; - case UPB_DESC(EDITION_PROTO3): - return "PROTO3"; - case UPB_DESC(EDITION_2023): - return "2023"; - default: - return "UNKNOWN"; - } -} - -const UPB_DESC(FileOptions) * upb_FileDef_Options(const upb_FileDef* f) { - return f->opts; -} - -const UPB_DESC(FeatureSet) * - upb_FileDef_ResolvedFeatures(const upb_FileDef* f) { - return f->resolved_features; -} - -bool upb_FileDef_HasOptions(const upb_FileDef* f) { - return f->opts != (void*)kUpbDefOptDefault; -} - -const char* upb_FileDef_Name(const upb_FileDef* f) { return f->name; } - -const char* upb_FileDef_Package(const upb_FileDef* f) { - return f->package ? f->package : ""; -} - -UPB_DESC(Edition) upb_FileDef_Edition(const upb_FileDef* f) { - return f->edition; -} - -const char* _upb_FileDef_RawPackage(const upb_FileDef* f) { return f->package; } - -upb_Syntax upb_FileDef_Syntax(const upb_FileDef* f) { return f->syntax; } - -int upb_FileDef_TopLevelMessageCount(const upb_FileDef* f) { - return f->top_lvl_msg_count; -} - -int upb_FileDef_DependencyCount(const upb_FileDef* f) { return f->dep_count; } - -int upb_FileDef_PublicDependencyCount(const upb_FileDef* f) { - return f->public_dep_count; -} - -int upb_FileDef_WeakDependencyCount(const upb_FileDef* f) { - return f->weak_dep_count; -} - -const int32_t* _upb_FileDef_PublicDependencyIndexes(const upb_FileDef* f) { - return f->public_deps; -} - -const int32_t* _upb_FileDef_WeakDependencyIndexes(const upb_FileDef* f) { - return f->weak_deps; -} - -int upb_FileDef_TopLevelEnumCount(const upb_FileDef* f) { - return f->top_lvl_enum_count; -} - -int upb_FileDef_TopLevelExtensionCount(const upb_FileDef* f) { - return f->top_lvl_ext_count; -} - -int upb_FileDef_ServiceCount(const upb_FileDef* f) { return f->service_count; } - -const upb_FileDef* upb_FileDef_Dependency(const upb_FileDef* f, int i) { - UPB_ASSERT(0 <= i && i < f->dep_count); - return f->deps[i]; -} - -const upb_FileDef* upb_FileDef_PublicDependency(const upb_FileDef* f, int i) { - UPB_ASSERT(0 <= i && i < f->public_dep_count); - return f->deps[f->public_deps[i]]; -} - -const upb_FileDef* upb_FileDef_WeakDependency(const upb_FileDef* f, int i) { - UPB_ASSERT(0 <= i && i < f->public_dep_count); - return f->deps[f->weak_deps[i]]; -} - -const upb_MessageDef* upb_FileDef_TopLevelMessage(const upb_FileDef* f, int i) { - UPB_ASSERT(0 <= i && i < f->top_lvl_msg_count); - return _upb_MessageDef_At(f->top_lvl_msgs, i); -} - -const upb_EnumDef* upb_FileDef_TopLevelEnum(const upb_FileDef* f, int i) { - UPB_ASSERT(0 <= i && i < f->top_lvl_enum_count); - return _upb_EnumDef_At(f->top_lvl_enums, i); -} - -const upb_FieldDef* upb_FileDef_TopLevelExtension(const upb_FileDef* f, int i) { - UPB_ASSERT(0 <= i && i < f->top_lvl_ext_count); - return _upb_FieldDef_At(f->top_lvl_exts, i); -} - -const upb_ServiceDef* upb_FileDef_Service(const upb_FileDef* f, int i) { - UPB_ASSERT(0 <= i && i < f->service_count); - return _upb_ServiceDef_At(f->services, i); -} - -const upb_DefPool* upb_FileDef_Pool(const upb_FileDef* f) { return f->symtab; } - -const upb_MiniTableExtension* _upb_FileDef_ExtensionMiniTable( - const upb_FileDef* f, int i) { - return f->ext_layouts[i]; -} - -// Note: Import cycles are not allowed so this will terminate. -bool upb_FileDef_Resolves(const upb_FileDef* f, const char* path) { - if (!strcmp(f->name, path)) return true; - - for (int i = 0; i < upb_FileDef_PublicDependencyCount(f); i++) { - const upb_FileDef* dep = upb_FileDef_PublicDependency(f, i); - if (upb_FileDef_Resolves(dep, path)) return true; - } - return false; -} - -static char* _strviewdup(upb_DefBuilder* ctx, upb_StringView view) { - char* ret = upb_strdup2(view.data, view.size, _upb_DefBuilder_Arena(ctx)); - if (!ret) _upb_DefBuilder_OomErr(ctx); - return ret; -} - -static bool streql_view(upb_StringView view, const char* b) { - return view.size == strlen(b) && memcmp(view.data, b, view.size) == 0; -} - -static int count_exts_in_msg(const UPB_DESC(DescriptorProto) * msg_proto) { - size_t n; - UPB_DESC(DescriptorProto_extension)(msg_proto, &n); - int ext_count = n; - - const UPB_DESC(DescriptorProto)* const* nested_msgs = - UPB_DESC(DescriptorProto_nested_type)(msg_proto, &n); - for (size_t i = 0; i < n; i++) { - ext_count += count_exts_in_msg(nested_msgs[i]); - } - - return ext_count; -} - -const UPB_DESC(FeatureSet*) - _upb_FileDef_FindEdition(upb_DefBuilder* ctx, int edition) { - const UPB_DESC(FeatureSetDefaults)* defaults = - upb_DefPool_FeatureSetDefaults(ctx->symtab); - - int min = UPB_DESC(FeatureSetDefaults_minimum_edition)(defaults); - int max = UPB_DESC(FeatureSetDefaults_maximum_edition)(defaults); - if (edition < min) { - _upb_DefBuilder_Errf(ctx, - "Edition %s is earlier than the minimum edition %s " - "given in the defaults", - upb_FileDef_EditionName(edition), - upb_FileDef_EditionName(min)); - return NULL; - } - if (edition > max) { - _upb_DefBuilder_Errf(ctx, - "Edition %s is later than the maximum edition %s " - "given in the defaults", - upb_FileDef_EditionName(edition), - upb_FileDef_EditionName(max)); - return NULL; - } - - size_t n; - const UPB_DESC(FeatureSetDefaults_FeatureSetEditionDefault)* const* d = - UPB_DESC(FeatureSetDefaults_defaults)(defaults, &n); - const UPB_DESC(FeatureSetDefaults_FeatureSetEditionDefault)* result = NULL; - for (size_t i = 0; i < n; i++) { - if (UPB_DESC(FeatureSetDefaults_FeatureSetEditionDefault_edition)(d[i]) > - edition) { - break; - } - result = d[i]; - } - if (result == NULL) { - _upb_DefBuilder_Errf(ctx, "No valid default found for edition %s", - upb_FileDef_EditionName(edition)); - return NULL; - } - - // Merge the fixed and overridable features to get the edition's default - // feature set. - const UPB_DESC(FeatureSet)* fixed = UPB_DESC( - FeatureSetDefaults_FeatureSetEditionDefault_fixed_features)(result); - const UPB_DESC(FeatureSet)* overridable = UPB_DESC( - FeatureSetDefaults_FeatureSetEditionDefault_overridable_features)(result); - if (!fixed && !overridable) { - _upb_DefBuilder_Errf(ctx, "No valid default found for edition %s", - upb_FileDef_EditionName(edition)); - return NULL; - } else if (!fixed) { - return overridable; - } - return _upb_DefBuilder_DoResolveFeatures(ctx, fixed, overridable, - /*is_implicit=*/true); -} - -// Allocate and initialize one file def, and add it to the context object. -void _upb_FileDef_Create(upb_DefBuilder* ctx, - const UPB_DESC(FileDescriptorProto) * file_proto) { - upb_FileDef* file = _upb_DefBuilder_Alloc(ctx, sizeof(upb_FileDef)); - ctx->file = file; - - const UPB_DESC(DescriptorProto)* const* msgs; - const UPB_DESC(EnumDescriptorProto)* const* enums; - const UPB_DESC(FieldDescriptorProto)* const* exts; - const UPB_DESC(ServiceDescriptorProto)* const* services; - const upb_StringView* strs; - const int32_t* public_deps; - const int32_t* weak_deps; - size_t n; - - file->symtab = ctx->symtab; - - // Count all extensions in the file, to build a flat array of layouts. - UPB_DESC(FileDescriptorProto_extension)(file_proto, &n); - int ext_count = n; - msgs = UPB_DESC(FileDescriptorProto_message_type)(file_proto, &n); - for (size_t i = 0; i < n; i++) { - ext_count += count_exts_in_msg(msgs[i]); - } - file->ext_count = ext_count; - - if (ctx->layout) { - // We are using the ext layouts that were passed in. - file->ext_layouts = ctx->layout->UPB_PRIVATE(exts); - const int mt_ext_count = upb_MiniTableFile_ExtensionCount(ctx->layout); - if (mt_ext_count != file->ext_count) { - _upb_DefBuilder_Errf(ctx, - "Extension count did not match layout (%d vs %d)", - mt_ext_count, file->ext_count); - } - } else { - // We are building ext layouts from scratch. - file->ext_layouts = _upb_DefBuilder_Alloc( - ctx, sizeof(*file->ext_layouts) * file->ext_count); - upb_MiniTableExtension* ext = - UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_MiniTableExtension, file->ext_count); - for (int i = 0; i < file->ext_count; i++) { - file->ext_layouts[i] = &ext[i]; - } - } - - upb_StringView name = UPB_DESC(FileDescriptorProto_name)(file_proto); - file->name = _strviewdup(ctx, name); - if (strlen(file->name) != name.size) { - _upb_DefBuilder_Errf(ctx, "File name contained embedded NULL"); - } - - upb_StringView package = UPB_DESC(FileDescriptorProto_package)(file_proto); - - if (package.size) { - _upb_DefBuilder_CheckIdentFull(ctx, package); - file->package = _strviewdup(ctx, package); - } else { - file->package = NULL; - } - - // TODO: How should we validate this? - file->edition = UPB_DESC(FileDescriptorProto_edition)(file_proto); - - if (UPB_DESC(FileDescriptorProto_has_syntax)(file_proto)) { - upb_StringView syntax = UPB_DESC(FileDescriptorProto_syntax)(file_proto); - - if (streql_view(syntax, "proto2")) { - file->syntax = kUpb_Syntax_Proto2; - file->edition = UPB_DESC(EDITION_PROTO2); - } else if (streql_view(syntax, "proto3")) { - file->syntax = kUpb_Syntax_Proto3; - file->edition = UPB_DESC(EDITION_PROTO3); - } else if (streql_view(syntax, "editions")) { - file->syntax = kUpb_Syntax_Editions; - file->edition = UPB_DESC(FileDescriptorProto_edition)(file_proto); - } else { - _upb_DefBuilder_Errf(ctx, "Invalid syntax '" UPB_STRINGVIEW_FORMAT "'", - UPB_STRINGVIEW_ARGS(syntax)); - } - } else { - file->syntax = kUpb_Syntax_Proto2; - file->edition = UPB_DESC(EDITION_PROTO2); - } - - // Read options. - UPB_DEF_SET_OPTIONS(file->opts, FileDescriptorProto, FileOptions, file_proto); - - // Resolve features. - const UPB_DESC(FeatureSet*) edition_defaults = - _upb_FileDef_FindEdition(ctx, file->edition); - const UPB_DESC(FeatureSet*) unresolved = - UPB_DESC(FileOptions_features)(file->opts); - file->resolved_features = - _upb_DefBuilder_ResolveFeatures(ctx, edition_defaults, unresolved); - - // Verify dependencies. - strs = UPB_DESC(FileDescriptorProto_dependency)(file_proto, &n); - file->dep_count = n; - file->deps = UPB_DEFBUILDER_ALLOCARRAY(ctx, const upb_FileDef*, n); - - for (size_t i = 0; i < n; i++) { - upb_StringView str = strs[i]; - file->deps[i] = - upb_DefPool_FindFileByNameWithSize(ctx->symtab, str.data, str.size); - if (!file->deps[i]) { - _upb_DefBuilder_Errf(ctx, - "Depends on file '" UPB_STRINGVIEW_FORMAT - "', but it has not been loaded", - UPB_STRINGVIEW_ARGS(str)); - } - } - - public_deps = UPB_DESC(FileDescriptorProto_public_dependency)(file_proto, &n); - file->public_dep_count = n; - file->public_deps = UPB_DEFBUILDER_ALLOCARRAY(ctx, int32_t, n); - int32_t* mutable_public_deps = (int32_t*)file->public_deps; - for (size_t i = 0; i < n; i++) { - if (public_deps[i] >= file->dep_count) { - _upb_DefBuilder_Errf(ctx, "public_dep %d is out of range", - (int)public_deps[i]); - } - mutable_public_deps[i] = public_deps[i]; - } - - weak_deps = UPB_DESC(FileDescriptorProto_weak_dependency)(file_proto, &n); - file->weak_dep_count = n; - file->weak_deps = UPB_DEFBUILDER_ALLOCARRAY(ctx, const int32_t, n); - int32_t* mutable_weak_deps = (int32_t*)file->weak_deps; - for (size_t i = 0; i < n; i++) { - if (weak_deps[i] >= file->dep_count) { - _upb_DefBuilder_Errf(ctx, "weak_dep %d is out of range", - (int)weak_deps[i]); - } - mutable_weak_deps[i] = weak_deps[i]; - } - - // Create enums. - enums = UPB_DESC(FileDescriptorProto_enum_type)(file_proto, &n); - file->top_lvl_enum_count = n; - file->top_lvl_enums = - _upb_EnumDefs_New(ctx, n, enums, file->resolved_features, NULL); - - // Create extensions. - exts = UPB_DESC(FileDescriptorProto_extension)(file_proto, &n); - file->top_lvl_ext_count = n; - file->top_lvl_exts = _upb_Extensions_New( - ctx, n, exts, file->resolved_features, file->package, NULL); - - // Create messages. - msgs = UPB_DESC(FileDescriptorProto_message_type)(file_proto, &n); - file->top_lvl_msg_count = n; - file->top_lvl_msgs = - _upb_MessageDefs_New(ctx, n, msgs, file->resolved_features, NULL); - - // Create services. - services = UPB_DESC(FileDescriptorProto_service)(file_proto, &n); - file->service_count = n; - file->services = - _upb_ServiceDefs_New(ctx, n, services, file->resolved_features); - - // Now that all names are in the table, build layouts and resolve refs. - - for (int i = 0; i < file->top_lvl_msg_count; i++) { - upb_MessageDef* m = (upb_MessageDef*)upb_FileDef_TopLevelMessage(file, i); - _upb_MessageDef_Resolve(ctx, m); - } - - for (int i = 0; i < file->top_lvl_ext_count; i++) { - upb_FieldDef* f = (upb_FieldDef*)upb_FileDef_TopLevelExtension(file, i); - _upb_FieldDef_Resolve(ctx, file->package, f); - } - - for (int i = 0; i < file->top_lvl_msg_count; i++) { - upb_MessageDef* m = (upb_MessageDef*)upb_FileDef_TopLevelMessage(file, i); - _upb_MessageDef_CreateMiniTable(ctx, (upb_MessageDef*)m); - } - - for (int i = 0; i < file->top_lvl_ext_count; i++) { - upb_FieldDef* f = (upb_FieldDef*)upb_FileDef_TopLevelExtension(file, i); - _upb_FieldDef_BuildMiniTableExtension(ctx, f); - } - - for (int i = 0; i < file->top_lvl_msg_count; i++) { - upb_MessageDef* m = (upb_MessageDef*)upb_FileDef_TopLevelMessage(file, i); - _upb_MessageDef_LinkMiniTable(ctx, m); - } - - if (file->ext_count) { - upb_ExtensionRegistryStatus status = upb_ExtensionRegistry_AddArray( - _upb_DefPool_ExtReg(ctx->symtab), file->ext_layouts, file->ext_count); - if (status != kUpb_ExtensionRegistryStatus_Ok) { - if (status == kUpb_ExtensionRegistryStatus_OutOfMemory) { - _upb_DefBuilder_OomErr(ctx); - } - - UPB_ASSERT(status == kUpb_ExtensionRegistryStatus_DuplicateEntry); - _upb_DefBuilder_Errf(ctx, "duplicate extension entry"); - } - } -} - - -#include - - -// Must be last. - -/* The upb core does not generally have a concept of default instances. However - * for descriptor options we make an exception since the max size is known and - * modest (<200 bytes). All types can share a default instance since it is - * initialized to zeroes. - * - * We have to allocate an extra pointer for upb's internal metadata. */ -static UPB_ALIGN_AS(8) const - char opt_default_buf[_UPB_MAXOPT_SIZE + sizeof(void*)] = {0}; -const char* kUpbDefOptDefault = &opt_default_buf[sizeof(void*)]; - -const char* _upb_DefBuilder_FullToShort(const char* fullname) { - const char* p; - - if (fullname == NULL) { - return NULL; - } else if ((p = strrchr(fullname, '.')) == NULL) { - /* No '.' in the name, return the full string. */ - return fullname; - } else { - /* Return one past the last '.'. */ - return p + 1; - } -} - -void _upb_DefBuilder_FailJmp(upb_DefBuilder* ctx) { UPB_LONGJMP(ctx->err, 1); } - -void _upb_DefBuilder_Errf(upb_DefBuilder* ctx, const char* fmt, ...) { - va_list argp; - va_start(argp, fmt); - upb_Status_VSetErrorFormat(ctx->status, fmt, argp); - va_end(argp); - _upb_DefBuilder_FailJmp(ctx); -} - -void _upb_DefBuilder_OomErr(upb_DefBuilder* ctx) { - upb_Status_SetErrorMessage(ctx->status, "out of memory"); - _upb_DefBuilder_FailJmp(ctx); -} - -// Verify a relative identifier string. The loop is branchless for speed. -static void _upb_DefBuilder_CheckIdentNotFull(upb_DefBuilder* ctx, - upb_StringView name) { - bool good = name.size > 0; - - for (size_t i = 0; i < name.size; i++) { - const char c = name.data[i]; - const char d = c | 0x20; // force lowercase - const bool is_alpha = (('a' <= d) & (d <= 'z')) | (c == '_'); - const bool is_numer = ('0' <= c) & (c <= '9') & (i != 0); - - good &= is_alpha | is_numer; - } - - if (!good) _upb_DefBuilder_CheckIdentSlow(ctx, name, false); -} - -const char* _upb_DefBuilder_MakeFullName(upb_DefBuilder* ctx, - const char* prefix, - upb_StringView name) { - _upb_DefBuilder_CheckIdentNotFull(ctx, name); - if (prefix) { - // ret = prefix + '.' + name; - size_t n = strlen(prefix); - char* ret = _upb_DefBuilder_Alloc(ctx, n + name.size + 2); - strcpy(ret, prefix); - ret[n] = '.'; - memcpy(&ret[n + 1], name.data, name.size); - ret[n + 1 + name.size] = '\0'; - return ret; - } else { - char* ret = upb_strdup2(name.data, name.size, ctx->arena); - if (!ret) _upb_DefBuilder_OomErr(ctx); - return ret; - } -} - -static bool remove_component(char* base, size_t* len) { - if (*len == 0) return false; - - for (size_t i = *len - 1; i > 0; i--) { - if (base[i] == '.') { - *len = i; - return true; - } - } - - *len = 0; - return true; -} - -const void* _upb_DefBuilder_ResolveAny(upb_DefBuilder* ctx, - const char* from_name_dbg, - const char* base, upb_StringView sym, - upb_deftype_t* type) { - if (sym.size == 0) goto notfound; - upb_value v; - if (sym.data[0] == '.') { - // Symbols starting with '.' are absolute, so we do a single lookup. - // Slice to omit the leading '.' - if (!_upb_DefPool_LookupSym(ctx->symtab, sym.data + 1, sym.size - 1, &v)) { - goto notfound; - } - } else { - // Remove components from base until we find an entry or run out. - size_t baselen = base ? strlen(base) : 0; - char* tmp = upb_gmalloc(sym.size + baselen + 1); - while (1) { - char* p = tmp; - if (baselen) { - memcpy(p, base, baselen); - p[baselen] = '.'; - p += baselen + 1; - } - memcpy(p, sym.data, sym.size); - p += sym.size; - if (_upb_DefPool_LookupSym(ctx->symtab, tmp, p - tmp, &v)) { - break; - } - if (!remove_component(tmp, &baselen)) { - upb_gfree(tmp); - goto notfound; - } - } - upb_gfree(tmp); - } - - *type = _upb_DefType_Type(v); - return _upb_DefType_Unpack(v, *type); - -notfound: - _upb_DefBuilder_Errf(ctx, "couldn't resolve name '" UPB_STRINGVIEW_FORMAT "'", - UPB_STRINGVIEW_ARGS(sym)); -} - -const void* _upb_DefBuilder_Resolve(upb_DefBuilder* ctx, - const char* from_name_dbg, const char* base, - upb_StringView sym, upb_deftype_t type) { - upb_deftype_t found_type; - const void* ret = - _upb_DefBuilder_ResolveAny(ctx, from_name_dbg, base, sym, &found_type); - if (ret && found_type != type) { - _upb_DefBuilder_Errf(ctx, - "type mismatch when resolving %s: couldn't find " - "name " UPB_STRINGVIEW_FORMAT " with type=%d", - from_name_dbg, UPB_STRINGVIEW_ARGS(sym), (int)type); - } - return ret; -} - -// Per ASCII this will lower-case a letter. If the result is a letter, the -// input was definitely a letter. If the output is not a letter, this may -// have transformed the character unpredictably. -static char upb_ascii_lower(char ch) { return ch | 0x20; } - -// isalpha() etc. from are locale-dependent, which we don't want. -static bool upb_isbetween(uint8_t c, uint8_t low, uint8_t high) { - return low <= c && c <= high; -} - -static bool upb_isletter(char c) { - char lower = upb_ascii_lower(c); - return upb_isbetween(lower, 'a', 'z') || c == '_'; -} - -static bool upb_isalphanum(char c) { - return upb_isletter(c) || upb_isbetween(c, '0', '9'); -} - -static bool TryGetChar(const char** src, const char* end, char* ch) { - if (*src == end) return false; - *ch = **src; - *src += 1; - return true; -} - -static int TryGetHexDigit(const char** src, const char* end) { - char ch; - if (!TryGetChar(src, end, &ch)) return -1; - if ('0' <= ch && ch <= '9') { - return ch - '0'; - } - ch = upb_ascii_lower(ch); - if ('a' <= ch && ch <= 'f') { - return ch - 'a' + 0xa; - } - *src -= 1; // Char wasn't actually a hex digit. - return -1; -} - -static char upb_DefBuilder_ParseHexEscape(upb_DefBuilder* ctx, - const upb_FieldDef* f, - const char** src, const char* end) { - int hex_digit = TryGetHexDigit(src, end); - if (hex_digit < 0) { - _upb_DefBuilder_Errf( - ctx, "\\x must be followed by at least one hex digit (field='%s')", - upb_FieldDef_FullName(f)); - return 0; - } - unsigned int ret = hex_digit; - while ((hex_digit = TryGetHexDigit(src, end)) >= 0) { - ret = (ret << 4) | hex_digit; - } - if (ret > 0xff) { - _upb_DefBuilder_Errf(ctx, "Value of hex escape in field %s exceeds 8 bits", - upb_FieldDef_FullName(f)); - return 0; - } - return ret; -} - -static char TryGetOctalDigit(const char** src, const char* end) { - char ch; - if (!TryGetChar(src, end, &ch)) return -1; - if ('0' <= ch && ch <= '7') { - return ch - '0'; - } - *src -= 1; // Char wasn't actually an octal digit. - return -1; -} - -static char upb_DefBuilder_ParseOctalEscape(upb_DefBuilder* ctx, - const upb_FieldDef* f, - const char** src, const char* end) { - char ch = 0; - for (int i = 0; i < 3; i++) { - char digit; - if ((digit = TryGetOctalDigit(src, end)) >= 0) { - ch = (ch << 3) | digit; - } - } - return ch; -} - -char _upb_DefBuilder_ParseEscape(upb_DefBuilder* ctx, const upb_FieldDef* f, - const char** src, const char* end) { - char ch; - if (!TryGetChar(src, end, &ch)) { - _upb_DefBuilder_Errf(ctx, "unterminated escape sequence in field %s", - upb_FieldDef_FullName(f)); - return 0; - } - switch (ch) { - case 'a': - return '\a'; - case 'b': - return '\b'; - case 'f': - return '\f'; - case 'n': - return '\n'; - case 'r': - return '\r'; - case 't': - return '\t'; - case 'v': - return '\v'; - case '\\': - return '\\'; - case '\'': - return '\''; - case '\"': - return '\"'; - case '?': - return '\?'; - case 'x': - case 'X': - return upb_DefBuilder_ParseHexEscape(ctx, f, src, end); - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - *src -= 1; - return upb_DefBuilder_ParseOctalEscape(ctx, f, src, end); - } - _upb_DefBuilder_Errf(ctx, "Unknown escape sequence: \\%c", ch); -} - -void _upb_DefBuilder_CheckIdentSlow(upb_DefBuilder* ctx, upb_StringView name, - bool full) { - const char* str = name.data; - const size_t len = name.size; - bool start = true; - for (size_t i = 0; i < len; i++) { - const char c = str[i]; - if (c == '.') { - if (start || !full) { - _upb_DefBuilder_Errf( - ctx, "invalid name: unexpected '.' (" UPB_STRINGVIEW_FORMAT ")", - UPB_STRINGVIEW_ARGS(name)); - } - start = true; - } else if (start) { - if (!upb_isletter(c)) { - _upb_DefBuilder_Errf(ctx, - "invalid name: path components must start with a " - "letter (" UPB_STRINGVIEW_FORMAT ")", - UPB_STRINGVIEW_ARGS(name)); - } - start = false; - } else if (!upb_isalphanum(c)) { - _upb_DefBuilder_Errf( - ctx, - "invalid name: non-alphanumeric character (" UPB_STRINGVIEW_FORMAT - ")", - UPB_STRINGVIEW_ARGS(name)); - } - } - if (start) { - _upb_DefBuilder_Errf(ctx, - "invalid name: empty part (" UPB_STRINGVIEW_FORMAT ")", - UPB_STRINGVIEW_ARGS(name)); - } - - // We should never reach this point. - UPB_ASSERT(false); -} - -upb_StringView _upb_DefBuilder_MakeKey(upb_DefBuilder* ctx, - const UPB_DESC(FeatureSet*) parent, - upb_StringView key) { - size_t need = key.size + sizeof(void*); - if (ctx->tmp_buf_size < need) { - ctx->tmp_buf_size = UPB_MAX(64, upb_RoundUpToPowerOfTwo(need)); - ctx->tmp_buf = upb_Arena_Malloc(ctx->tmp_arena, ctx->tmp_buf_size); - if (!ctx->tmp_buf) _upb_DefBuilder_OomErr(ctx); - } - - memcpy(ctx->tmp_buf, &parent, sizeof(void*)); - memcpy(ctx->tmp_buf + sizeof(void*), key.data, key.size); - return upb_StringView_FromDataAndSize(ctx->tmp_buf, need); -} - -bool _upb_DefBuilder_GetOrCreateFeatureSet(upb_DefBuilder* ctx, - const UPB_DESC(FeatureSet*) parent, - upb_StringView key, - UPB_DESC(FeatureSet**) set) { - upb_StringView k = _upb_DefBuilder_MakeKey(ctx, parent, key); - upb_value v; - if (upb_strtable_lookup2(&ctx->feature_cache, k.data, k.size, &v)) { - *set = upb_value_getptr(v); - return false; - } - - *set = (UPB_DESC(FeatureSet*))upb_Message_DeepClone( - UPB_UPCAST(parent), UPB_DESC_MINITABLE(FeatureSet), ctx->arena); - if (!*set) _upb_DefBuilder_OomErr(ctx); - - v = upb_value_ptr(*set); - if (!upb_strtable_insert(&ctx->feature_cache, k.data, k.size, v, - ctx->tmp_arena)) { - _upb_DefBuilder_OomErr(ctx); - } - - return true; -} - -const UPB_DESC(FeatureSet*) - _upb_DefBuilder_DoResolveFeatures(upb_DefBuilder* ctx, - const UPB_DESC(FeatureSet*) parent, - const UPB_DESC(FeatureSet*) child, - bool is_implicit) { - assert(parent); - if (!child) return parent; - - if (child && !is_implicit && - upb_FileDef_Syntax(ctx->file) != kUpb_Syntax_Editions) { - _upb_DefBuilder_Errf(ctx, "Features can only be specified for editions"); - } - - UPB_DESC(FeatureSet*) resolved; - size_t child_size; - const char* child_bytes = - UPB_DESC(FeatureSet_serialize)(child, ctx->tmp_arena, &child_size); - if (!child_bytes) _upb_DefBuilder_OomErr(ctx); - - upb_StringView key = upb_StringView_FromDataAndSize(child_bytes, child_size); - if (!_upb_DefBuilder_GetOrCreateFeatureSet(ctx, parent, key, &resolved)) { - return resolved; - } - - upb_DecodeStatus dec_status = - upb_Decode(child_bytes, child_size, UPB_UPCAST(resolved), - UPB_DESC_MINITABLE(FeatureSet), NULL, 0, ctx->arena); - if (dec_status != kUpb_DecodeStatus_Ok) _upb_DefBuilder_OomErr(ctx); - - return resolved; -} - - -#include - - -// Must be last. - -char* upb_strdup2(const char* s, size_t len, upb_Arena* a) { - size_t n; - char* p; - - // Prevent overflow errors. - if (len == SIZE_MAX) return NULL; - - // Always null-terminate, even if binary data; but don't rely on the input to - // have a null-terminating byte since it may be a raw binary buffer. - n = len + 1; - p = upb_Arena_Malloc(a, n); - if (p) { - if (len != 0) memcpy(p, s, len); - p[len] = 0; - } - return p; -} - - -#include -#include - - -// Must be last. - -bool upb_Message_HasFieldByDef(const upb_Message* msg, const upb_FieldDef* f) { - const upb_MiniTableField* m_f = upb_FieldDef_MiniTable(f); - UPB_ASSERT(upb_FieldDef_HasPresence(f)); - - if (upb_MiniTableField_IsExtension(m_f)) { - return upb_Message_HasExtension(msg, (const upb_MiniTableExtension*)m_f); - } else { - return upb_Message_HasBaseField(msg, m_f); - } -} - -const upb_FieldDef* upb_Message_WhichOneofByDef(const upb_Message* msg, - const upb_OneofDef* o) { - const upb_FieldDef* f = upb_OneofDef_Field(o, 0); - if (upb_OneofDef_IsSynthetic(o)) { - UPB_ASSERT(upb_OneofDef_FieldCount(o) == 1); - return upb_Message_HasFieldByDef(msg, f) ? f : NULL; - } else { - const upb_MiniTableField* field = upb_FieldDef_MiniTable(f); - uint32_t oneof_case = upb_Message_WhichOneofFieldNumber(msg, field); - f = oneof_case ? upb_OneofDef_LookupNumber(o, oneof_case) : NULL; - UPB_ASSERT((f != NULL) == (oneof_case != 0)); - return f; - } -} - -upb_MessageValue upb_Message_GetFieldByDef(const upb_Message* msg, - const upb_FieldDef* f) { - upb_MessageValue default_val = upb_FieldDef_Default(f); - return upb_Message_GetField(msg, upb_FieldDef_MiniTable(f), default_val); -} - -upb_MutableMessageValue upb_Message_Mutable(upb_Message* msg, - const upb_FieldDef* f, - upb_Arena* a) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - UPB_ASSERT(upb_FieldDef_IsSubMessage(f) || upb_FieldDef_IsRepeated(f)); - if (upb_FieldDef_HasPresence(f) && !upb_Message_HasFieldByDef(msg, f)) { - // We need to skip the upb_Message_GetFieldByDef() call in this case. - goto make; - } - - upb_MessageValue val = upb_Message_GetFieldByDef(msg, f); - if (val.array_val) { - return (upb_MutableMessageValue){.array = (upb_Array*)val.array_val}; - } - - upb_MutableMessageValue ret; -make: - if (!a) return (upb_MutableMessageValue){.array = NULL}; - if (upb_FieldDef_IsMap(f)) { - const upb_MessageDef* entry = upb_FieldDef_MessageSubDef(f); - const upb_FieldDef* key = - upb_MessageDef_FindFieldByNumber(entry, kUpb_MapEntry_KeyFieldNumber); - const upb_FieldDef* value = - upb_MessageDef_FindFieldByNumber(entry, kUpb_MapEntry_ValueFieldNumber); - ret.map = - upb_Map_New(a, upb_FieldDef_CType(key), upb_FieldDef_CType(value)); - } else if (upb_FieldDef_IsRepeated(f)) { - ret.array = upb_Array_New(a, upb_FieldDef_CType(f)); - } else { - UPB_ASSERT(upb_FieldDef_IsSubMessage(f)); - const upb_MessageDef* m = upb_FieldDef_MessageSubDef(f); - ret.msg = upb_Message_New(upb_MessageDef_MiniTable(m), a); - } - - val.array_val = ret.array; - upb_Message_SetFieldByDef(msg, f, val, a); - - return ret; -} - -bool upb_Message_SetFieldByDef(upb_Message* msg, const upb_FieldDef* f, - upb_MessageValue val, upb_Arena* a) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - const upb_MiniTableField* m_f = upb_FieldDef_MiniTable(f); - - if (upb_MiniTableField_IsExtension(m_f)) { - return upb_Message_SetExtension(msg, (const upb_MiniTableExtension*)m_f, - &val, a); - } else { - upb_Message_SetBaseField(msg, m_f, &val); - return true; - } -} - -void upb_Message_ClearFieldByDef(upb_Message* msg, const upb_FieldDef* f) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - const upb_MiniTableField* m_f = upb_FieldDef_MiniTable(f); - - if (upb_MiniTableField_IsExtension(m_f)) { - upb_Message_ClearExtension(msg, (const upb_MiniTableExtension*)m_f); - } else { - upb_Message_ClearBaseField(msg, m_f); - } -} - -void upb_Message_ClearByDef(upb_Message* msg, const upb_MessageDef* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Message_Clear(msg, upb_MessageDef_MiniTable(m)); -} - -bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m, - const upb_DefPool* ext_pool, const upb_FieldDef** out_f, - upb_MessageValue* out_val, size_t* iter) { - const upb_MiniTable* mt = upb_MessageDef_MiniTable(m); - size_t i = *iter; - size_t n = upb_MiniTable_FieldCount(mt); - upb_MessageValue zero = upb_MessageValue_Zero(); - UPB_UNUSED(ext_pool); - - // Iterate over normal fields, returning the first one that is set. - while (++i < n) { - const upb_MiniTableField* field = upb_MiniTable_GetFieldByIndex(mt, i); - upb_MessageValue val = upb_Message_GetField(msg, field, zero); - - // Skip field if unset or empty. - if (upb_MiniTableField_HasPresence(field)) { - if (!upb_Message_HasBaseField(msg, field)) continue; - } else { - switch (UPB_PRIVATE(_upb_MiniTableField_Mode)(field)) { - case kUpb_FieldMode_Map: - if (!val.map_val || upb_Map_Size(val.map_val) == 0) continue; - break; - case kUpb_FieldMode_Array: - if (!val.array_val || upb_Array_Size(val.array_val) == 0) continue; - break; - case kUpb_FieldMode_Scalar: - if (UPB_PRIVATE(_upb_MiniTableField_DataIsZero)(field, &val)) - continue; - break; - } - } - - *out_val = val; - *out_f = - upb_MessageDef_FindFieldByNumber(m, upb_MiniTableField_Number(field)); - *iter = i; - return true; - } - - if (ext_pool) { - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) return false; - - for (; (i - n) < in->size; i++) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i - n]; - if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - const upb_Extension* ext = upb_TaggedAuxPtr_Extension(tagged_ptr); - memcpy(out_val, &ext->data, sizeof(*out_val)); - *out_f = upb_DefPool_FindExtensionByMiniTable(ext_pool, ext->ext); - *iter = i; - return true; - } - } - } - - *iter = i; - return false; -} - -bool _upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m, - const upb_DefPool* ext_pool, int depth) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - size_t iter = kUpb_Message_Begin; - const upb_FieldDef* f; - upb_MessageValue val; - bool ret = true; - - if (--depth == 0) return false; - - _upb_Message_DiscardUnknown_shallow(msg); - - while (upb_Message_Next(msg, m, ext_pool, &f, &val, &iter)) { - const upb_MessageDef* subm = upb_FieldDef_MessageSubDef(f); - if (!subm) continue; - if (upb_FieldDef_IsMap(f)) { - const upb_FieldDef* val_f = upb_MessageDef_FindFieldByNumber(subm, 2); - const upb_MessageDef* val_m = upb_FieldDef_MessageSubDef(val_f); - upb_Map* map = (upb_Map*)val.map_val; - size_t iter = kUpb_Map_Begin; - - if (!val_m) continue; - - upb_MessageValue map_key, map_val; - while (upb_Map_Next(map, &map_key, &map_val, &iter)) { - if (!_upb_Message_DiscardUnknown((upb_Message*)map_val.msg_val, val_m, - ext_pool, depth)) { - ret = false; - } - } - } else if (upb_FieldDef_IsRepeated(f)) { - const upb_Array* arr = val.array_val; - size_t i, n = upb_Array_Size(arr); - for (i = 0; i < n; i++) { - upb_MessageValue elem = upb_Array_Get(arr, i); - if (!_upb_Message_DiscardUnknown((upb_Message*)elem.msg_val, subm, - ext_pool, depth)) { - ret = false; - } - } - } else { - if (!_upb_Message_DiscardUnknown((upb_Message*)val.msg_val, subm, - ext_pool, depth)) { - ret = false; - } - } - } - - return ret; -} - -bool upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m, - const upb_DefPool* ext_pool, int maxdepth) { - return _upb_Message_DiscardUnknown(msg, m, ext_pool, maxdepth); -} - - -#include -#include -#include - - -// Must be last. - -struct upb_MessageDef { - UPB_ALIGN_AS(8) const UPB_DESC(MessageOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - const upb_MiniTable* layout; - const upb_FileDef* file; - const upb_MessageDef* containing_type; - const char* full_name; - - // Tables for looking up fields by number and name. - upb_inttable itof; - upb_strtable ntof; - - // Looking up fields by json name. - upb_strtable jtof; - - /* All nested defs. - * MEM: We could save some space here by putting nested defs in a contiguous - * region and calculating counts from offsets or vice-versa. */ - const upb_FieldDef* fields; - const upb_OneofDef* oneofs; - const upb_ExtensionRange* ext_ranges; - const upb_StringView* res_names; - const upb_MessageDef* nested_msgs; - const upb_MessageReservedRange* res_ranges; - const upb_EnumDef* nested_enums; - const upb_FieldDef* nested_exts; - - // TODO: These counters don't need anywhere near 32 bits. - int field_count; - int real_oneof_count; - int oneof_count; - int ext_range_count; - int res_range_count; - int res_name_count; - int nested_msg_count; - int nested_enum_count; - int nested_ext_count; - bool in_message_set; - bool is_sorted; - upb_WellKnown well_known_type; -}; - -static void assign_msg_wellknowntype(upb_MessageDef* m) { - const char* name = m->full_name; - if (name == NULL) { - m->well_known_type = kUpb_WellKnown_Unspecified; - return; - } - if (!strcmp(name, "google.protobuf.Any")) { - m->well_known_type = kUpb_WellKnown_Any; - } else if (!strcmp(name, "google.protobuf.FieldMask")) { - m->well_known_type = kUpb_WellKnown_FieldMask; - } else if (!strcmp(name, "google.protobuf.Duration")) { - m->well_known_type = kUpb_WellKnown_Duration; - } else if (!strcmp(name, "google.protobuf.Timestamp")) { - m->well_known_type = kUpb_WellKnown_Timestamp; - } else if (!strcmp(name, "google.protobuf.DoubleValue")) { - m->well_known_type = kUpb_WellKnown_DoubleValue; - } else if (!strcmp(name, "google.protobuf.FloatValue")) { - m->well_known_type = kUpb_WellKnown_FloatValue; - } else if (!strcmp(name, "google.protobuf.Int64Value")) { - m->well_known_type = kUpb_WellKnown_Int64Value; - } else if (!strcmp(name, "google.protobuf.UInt64Value")) { - m->well_known_type = kUpb_WellKnown_UInt64Value; - } else if (!strcmp(name, "google.protobuf.Int32Value")) { - m->well_known_type = kUpb_WellKnown_Int32Value; - } else if (!strcmp(name, "google.protobuf.UInt32Value")) { - m->well_known_type = kUpb_WellKnown_UInt32Value; - } else if (!strcmp(name, "google.protobuf.BoolValue")) { - m->well_known_type = kUpb_WellKnown_BoolValue; - } else if (!strcmp(name, "google.protobuf.StringValue")) { - m->well_known_type = kUpb_WellKnown_StringValue; - } else if (!strcmp(name, "google.protobuf.BytesValue")) { - m->well_known_type = kUpb_WellKnown_BytesValue; - } else if (!strcmp(name, "google.protobuf.Value")) { - m->well_known_type = kUpb_WellKnown_Value; - } else if (!strcmp(name, "google.protobuf.ListValue")) { - m->well_known_type = kUpb_WellKnown_ListValue; - } else if (!strcmp(name, "google.protobuf.Struct")) { - m->well_known_type = kUpb_WellKnown_Struct; - } else { - m->well_known_type = kUpb_WellKnown_Unspecified; - } -} - -upb_MessageDef* _upb_MessageDef_At(const upb_MessageDef* m, int i) { - return (upb_MessageDef*)&m[i]; -} - -bool _upb_MessageDef_IsValidExtensionNumber(const upb_MessageDef* m, int n) { - for (int i = 0; i < m->ext_range_count; i++) { - const upb_ExtensionRange* r = upb_MessageDef_ExtensionRange(m, i); - if (upb_ExtensionRange_Start(r) <= n && n < upb_ExtensionRange_End(r)) { - return true; - } - } - return false; -} - -const UPB_DESC(MessageOptions) * - upb_MessageDef_Options(const upb_MessageDef* m) { - return m->opts; -} - -bool upb_MessageDef_HasOptions(const upb_MessageDef* m) { - return m->opts != (void*)kUpbDefOptDefault; -} - -const UPB_DESC(FeatureSet) * - upb_MessageDef_ResolvedFeatures(const upb_MessageDef* m) { - return m->resolved_features; -} - -const char* upb_MessageDef_FullName(const upb_MessageDef* m) { - return m->full_name; -} - -const upb_FileDef* upb_MessageDef_File(const upb_MessageDef* m) { - return m->file; -} - -const upb_MessageDef* upb_MessageDef_ContainingType(const upb_MessageDef* m) { - return m->containing_type; -} - -const char* upb_MessageDef_Name(const upb_MessageDef* m) { - return _upb_DefBuilder_FullToShort(m->full_name); -} - -upb_Syntax upb_MessageDef_Syntax(const upb_MessageDef* m) { - return upb_FileDef_Syntax(m->file); -} - -const upb_FieldDef* upb_MessageDef_FindFieldByNumber(const upb_MessageDef* m, - uint32_t i) { - upb_value val; - return upb_inttable_lookup(&m->itof, i, &val) ? upb_value_getconstptr(val) - : NULL; -} - -const upb_FieldDef* upb_MessageDef_FindFieldByNameWithSize( - const upb_MessageDef* m, const char* name, size_t size) { - upb_value val; - - if (!upb_strtable_lookup2(&m->ntof, name, size, &val)) { - return NULL; - } - - return _upb_DefType_Unpack(val, UPB_DEFTYPE_FIELD); -} - -const upb_OneofDef* upb_MessageDef_FindOneofByNameWithSize( - const upb_MessageDef* m, const char* name, size_t size) { - upb_value val; - - if (!upb_strtable_lookup2(&m->ntof, name, size, &val)) { - return NULL; - } - - return _upb_DefType_Unpack(val, UPB_DEFTYPE_ONEOF); -} - -bool _upb_MessageDef_Insert(upb_MessageDef* m, const char* name, size_t len, - upb_value v, upb_Arena* a) { - return upb_strtable_insert(&m->ntof, name, len, v, a); -} - -bool upb_MessageDef_FindByNameWithSize(const upb_MessageDef* m, - const char* name, size_t len, - const upb_FieldDef** out_f, - const upb_OneofDef** out_o) { - upb_value val; - - if (!upb_strtable_lookup2(&m->ntof, name, len, &val)) { - return false; - } - - const upb_FieldDef* f = _upb_DefType_Unpack(val, UPB_DEFTYPE_FIELD); - const upb_OneofDef* o = _upb_DefType_Unpack(val, UPB_DEFTYPE_ONEOF); - if (out_f) *out_f = f; - if (out_o) *out_o = o; - return f || o; /* False if this was a JSON name. */ -} - -const upb_FieldDef* upb_MessageDef_FindByJsonNameWithSize( - const upb_MessageDef* m, const char* name, size_t size) { - upb_value val; - - if (upb_strtable_lookup2(&m->jtof, name, size, &val)) { - return upb_value_getconstptr(val); - } - - if (!upb_strtable_lookup2(&m->ntof, name, size, &val)) { - return NULL; - } - - return _upb_DefType_Unpack(val, UPB_DEFTYPE_FIELD); -} - -int upb_MessageDef_ExtensionRangeCount(const upb_MessageDef* m) { - return m->ext_range_count; -} - -int upb_MessageDef_ReservedRangeCount(const upb_MessageDef* m) { - return m->res_range_count; -} - -int upb_MessageDef_ReservedNameCount(const upb_MessageDef* m) { - return m->res_name_count; -} - -int upb_MessageDef_FieldCount(const upb_MessageDef* m) { - return m->field_count; -} - -int upb_MessageDef_OneofCount(const upb_MessageDef* m) { - return m->oneof_count; -} - -int upb_MessageDef_RealOneofCount(const upb_MessageDef* m) { - return m->real_oneof_count; -} - -int upb_MessageDef_NestedMessageCount(const upb_MessageDef* m) { - return m->nested_msg_count; -} - -int upb_MessageDef_NestedEnumCount(const upb_MessageDef* m) { - return m->nested_enum_count; -} - -int upb_MessageDef_NestedExtensionCount(const upb_MessageDef* m) { - return m->nested_ext_count; -} - -const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m) { - return m->layout; -} - -const upb_ExtensionRange* upb_MessageDef_ExtensionRange(const upb_MessageDef* m, - int i) { - UPB_ASSERT(0 <= i && i < m->ext_range_count); - return _upb_ExtensionRange_At(m->ext_ranges, i); -} - -const upb_MessageReservedRange* upb_MessageDef_ReservedRange( - const upb_MessageDef* m, int i) { - UPB_ASSERT(0 <= i && i < m->res_range_count); - return _upb_MessageReservedRange_At(m->res_ranges, i); -} - -upb_StringView upb_MessageDef_ReservedName(const upb_MessageDef* m, int i) { - UPB_ASSERT(0 <= i && i < m->res_name_count); - return m->res_names[i]; -} - -const upb_FieldDef* upb_MessageDef_Field(const upb_MessageDef* m, int i) { - UPB_ASSERT(0 <= i && i < m->field_count); - return _upb_FieldDef_At(m->fields, i); -} - -const upb_OneofDef* upb_MessageDef_Oneof(const upb_MessageDef* m, int i) { - UPB_ASSERT(0 <= i && i < m->oneof_count); - return _upb_OneofDef_At(m->oneofs, i); -} - -const upb_MessageDef* upb_MessageDef_NestedMessage(const upb_MessageDef* m, - int i) { - UPB_ASSERT(0 <= i && i < m->nested_msg_count); - return &m->nested_msgs[i]; -} - -const upb_EnumDef* upb_MessageDef_NestedEnum(const upb_MessageDef* m, int i) { - UPB_ASSERT(0 <= i && i < m->nested_enum_count); - return _upb_EnumDef_At(m->nested_enums, i); -} - -const upb_FieldDef* upb_MessageDef_NestedExtension(const upb_MessageDef* m, - int i) { - UPB_ASSERT(0 <= i && i < m->nested_ext_count); - return _upb_FieldDef_At(m->nested_exts, i); -} - -upb_WellKnown upb_MessageDef_WellKnownType(const upb_MessageDef* m) { - return m->well_known_type; -} - -bool _upb_MessageDef_InMessageSet(const upb_MessageDef* m) { - return m->in_message_set; -} - -const upb_FieldDef* upb_MessageDef_FindFieldByName(const upb_MessageDef* m, - const char* name) { - return upb_MessageDef_FindFieldByNameWithSize(m, name, strlen(name)); -} - -const upb_OneofDef* upb_MessageDef_FindOneofByName(const upb_MessageDef* m, - const char* name) { - return upb_MessageDef_FindOneofByNameWithSize(m, name, strlen(name)); -} - -bool upb_MessageDef_IsMapEntry(const upb_MessageDef* m) { - return UPB_DESC(MessageOptions_map_entry)(m->opts); -} - -bool upb_MessageDef_IsMessageSet(const upb_MessageDef* m) { - return UPB_DESC(MessageOptions_message_set_wire_format)(m->opts); -} - -static upb_MiniTable* _upb_MessageDef_MakeMiniTable(upb_DefBuilder* ctx, - const upb_MessageDef* m) { - upb_StringView desc; - // Note: this will assign layout_index for fields, so upb_FieldDef_MiniTable() - // is safe to call only after this call. - bool ok = upb_MessageDef_MiniDescriptorEncode(m, ctx->tmp_arena, &desc); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - void** scratch_data = _upb_DefPool_ScratchData(ctx->symtab); - size_t* scratch_size = _upb_DefPool_ScratchSize(ctx->symtab); - upb_MiniTable* ret = upb_MiniTable_BuildWithBuf( - desc.data, desc.size, ctx->platform, ctx->arena, scratch_data, - scratch_size, ctx->status); - if (!ret) _upb_DefBuilder_FailJmp(ctx); - - return ret; -} - -void _upb_MessageDef_Resolve(upb_DefBuilder* ctx, upb_MessageDef* m) { - for (int i = 0; i < m->field_count; i++) { - upb_FieldDef* f = (upb_FieldDef*)upb_MessageDef_Field(m, i); - _upb_FieldDef_Resolve(ctx, m->full_name, f); - } - - m->in_message_set = false; - for (int i = 0; i < upb_MessageDef_NestedExtensionCount(m); i++) { - upb_FieldDef* ext = (upb_FieldDef*)upb_MessageDef_NestedExtension(m, i); - _upb_FieldDef_Resolve(ctx, m->full_name, ext); - if (upb_FieldDef_Type(ext) == kUpb_FieldType_Message && - upb_FieldDef_Label(ext) == kUpb_Label_Optional && - upb_FieldDef_MessageSubDef(ext) == m && - UPB_DESC(MessageOptions_message_set_wire_format)( - upb_MessageDef_Options(upb_FieldDef_ContainingType(ext)))) { - m->in_message_set = true; - } - } - - for (int i = 0; i < upb_MessageDef_NestedMessageCount(m); i++) { - upb_MessageDef* n = (upb_MessageDef*)upb_MessageDef_NestedMessage(m, i); - _upb_MessageDef_Resolve(ctx, n); - } -} - -void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m, - const upb_FieldDef* f) { - const int32_t field_number = upb_FieldDef_Number(f); - - if (field_number <= 0 || field_number > kUpb_MaxFieldNumber) { - _upb_DefBuilder_Errf(ctx, "invalid field number (%u)", field_number); - } - - const char* json_name = upb_FieldDef_JsonName(f); - const char* shortname = upb_FieldDef_Name(f); - const size_t shortnamelen = strlen(shortname); - - upb_value v = upb_value_constptr(f); - - upb_value existing_v; - if (upb_strtable_lookup(&m->ntof, shortname, &existing_v)) { - _upb_DefBuilder_Errf(ctx, "duplicate field name (%s)", shortname); - } - - const upb_value field_v = _upb_DefType_Pack(f, UPB_DEFTYPE_FIELD); - bool ok = - _upb_MessageDef_Insert(m, shortname, shortnamelen, field_v, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - bool skip_json_conflicts = - UPB_DESC(MessageOptions_deprecated_legacy_json_field_conflicts)( - upb_MessageDef_Options(m)); - if (!skip_json_conflicts && strcmp(shortname, json_name) != 0 && - UPB_DESC(FeatureSet_json_format)(m->resolved_features) == - UPB_DESC(FeatureSet_ALLOW) && - upb_strtable_lookup(&m->ntof, json_name, &v)) { - _upb_DefBuilder_Errf( - ctx, "duplicate json_name for (%s) with original field name (%s)", - shortname, json_name); - } - - if (upb_strtable_lookup(&m->jtof, json_name, &v)) { - if (!skip_json_conflicts) { - _upb_DefBuilder_Errf(ctx, "duplicate json_name (%s)", json_name); - } - } else { - const size_t json_size = strlen(json_name); - ok = upb_strtable_insert(&m->jtof, json_name, json_size, - upb_value_constptr(f), ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - } - - if (upb_inttable_lookup(&m->itof, field_number, NULL)) { - _upb_DefBuilder_Errf(ctx, "duplicate field number (%u)", field_number); - } - - ok = upb_inttable_insert(&m->itof, field_number, v, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); -} - -void _upb_MessageDef_CreateMiniTable(upb_DefBuilder* ctx, upb_MessageDef* m) { - if (ctx->layout == NULL) { - m->layout = _upb_MessageDef_MakeMiniTable(ctx, m); - } else { - m->layout = upb_MiniTableFile_Message(ctx->layout, ctx->msg_count++); - UPB_ASSERT(m->field_count == upb_MiniTable_FieldCount(m->layout)); - - // We don't need the result of this call, but it will assign layout_index - // for all the fields in O(n lg n) time. - _upb_FieldDefs_Sorted(m->fields, m->field_count, ctx->tmp_arena); - } - - for (int i = 0; i < m->nested_msg_count; i++) { - upb_MessageDef* nested = - (upb_MessageDef*)upb_MessageDef_NestedMessage(m, i); - _upb_MessageDef_CreateMiniTable(ctx, nested); - } -} - -void _upb_MessageDef_LinkMiniTable(upb_DefBuilder* ctx, - const upb_MessageDef* m) { - for (int i = 0; i < upb_MessageDef_NestedExtensionCount(m); i++) { - const upb_FieldDef* ext = upb_MessageDef_NestedExtension(m, i); - _upb_FieldDef_BuildMiniTableExtension(ctx, ext); - } - - for (int i = 0; i < m->nested_msg_count; i++) { - _upb_MessageDef_LinkMiniTable(ctx, upb_MessageDef_NestedMessage(m, i)); - } - - if (ctx->layout) return; - - for (int i = 0; i < m->field_count; i++) { - const upb_FieldDef* f = upb_MessageDef_Field(m, i); - const upb_MessageDef* sub_m = upb_FieldDef_MessageSubDef(f); - const upb_EnumDef* sub_e = upb_FieldDef_EnumSubDef(f); - const int layout_index = _upb_FieldDef_LayoutIndex(f); - upb_MiniTable* mt = (upb_MiniTable*)upb_MessageDef_MiniTable(m); - - UPB_ASSERT(layout_index < m->field_count); - upb_MiniTableField* mt_f = - (upb_MiniTableField*)&m->layout->UPB_PRIVATE(fields)[layout_index]; - if (sub_m) { - if (!mt->UPB_PRIVATE(subs)) { - _upb_DefBuilder_Errf(ctx, "unexpected submsg for (%s)", m->full_name); - } - UPB_ASSERT(mt_f); - UPB_ASSERT(sub_m->layout); - if (UPB_UNLIKELY(!upb_MiniTable_SetSubMessage(mt, mt_f, sub_m->layout))) { - _upb_DefBuilder_Errf(ctx, "invalid submsg for (%s)", m->full_name); - } - } else if (_upb_FieldDef_IsClosedEnum(f)) { - const upb_MiniTableEnum* mt_e = _upb_EnumDef_MiniTable(sub_e); - if (UPB_UNLIKELY(!upb_MiniTable_SetSubEnum(mt, mt_f, mt_e))) { - _upb_DefBuilder_Errf(ctx, "invalid subenum for (%s)", m->full_name); - } - } - } - -#ifndef NDEBUG - for (int i = 0; i < m->field_count; i++) { - const upb_FieldDef* f = upb_MessageDef_Field(m, i); - const int layout_index = _upb_FieldDef_LayoutIndex(f); - UPB_ASSERT(layout_index < upb_MiniTable_FieldCount(m->layout)); - const upb_MiniTableField* mt_f = - &m->layout->UPB_PRIVATE(fields)[layout_index]; - UPB_ASSERT(upb_FieldDef_Type(f) == upb_MiniTableField_Type(mt_f)); - UPB_ASSERT(upb_FieldDef_CType(f) == upb_MiniTableField_CType(mt_f)); - UPB_ASSERT(upb_FieldDef_HasPresence(f) == - upb_MiniTableField_HasPresence(mt_f)); - } -#endif -} - -static bool _upb_MessageDef_ValidateUtf8(const upb_MessageDef* m) { - bool has_string = false; - for (int i = 0; i < m->field_count; i++) { - const upb_FieldDef* f = upb_MessageDef_Field(m, i); - // Old binaries do not recognize the field-level "FlipValidateUtf8" wire - // modifier, so we do not actually have field-level control for old - // binaries. Given this, we judge that the better failure mode is to be - // more lax than intended, rather than more strict. To achieve this, we - // only mark the message with the ValidateUtf8 modifier if *all* fields - // validate UTF-8. - if (!_upb_FieldDef_ValidateUtf8(f)) return false; - if (upb_FieldDef_Type(f) == kUpb_FieldType_String) has_string = true; - } - return has_string; -} - -static uint64_t _upb_MessageDef_Modifiers(const upb_MessageDef* m) { - uint64_t out = 0; - - if (UPB_DESC(FeatureSet_repeated_field_encoding(m->resolved_features)) == - UPB_DESC(FeatureSet_PACKED)) { - out |= kUpb_MessageModifier_DefaultIsPacked; - } - - if (_upb_MessageDef_ValidateUtf8(m)) { - out |= kUpb_MessageModifier_ValidateUtf8; - } - - if (m->ext_range_count) { - out |= kUpb_MessageModifier_IsExtendable; - } - - return out; -} - -static bool _upb_MessageDef_EncodeMap(upb_DescState* s, const upb_MessageDef* m, - upb_Arena* a) { - if (m->field_count != 2) return false; - - const upb_FieldDef* key_field = upb_MessageDef_Field(m, 0); - const upb_FieldDef* val_field = upb_MessageDef_Field(m, 1); - if (key_field == NULL || val_field == NULL) return false; - - UPB_ASSERT(_upb_FieldDef_LayoutIndex(key_field) == 0); - UPB_ASSERT(_upb_FieldDef_LayoutIndex(val_field) == 1); - - s->ptr = upb_MtDataEncoder_EncodeMap( - &s->e, s->ptr, upb_FieldDef_Type(key_field), upb_FieldDef_Type(val_field), - _upb_FieldDef_Modifiers(key_field), _upb_FieldDef_Modifiers(val_field)); - return true; -} - -static bool _upb_MessageDef_EncodeMessage(upb_DescState* s, - const upb_MessageDef* m, - upb_Arena* a) { - const upb_FieldDef** sorted = NULL; - if (!m->is_sorted) { - sorted = _upb_FieldDefs_Sorted(m->fields, m->field_count, a); - if (!sorted) return false; - } - - s->ptr = upb_MtDataEncoder_StartMessage(&s->e, s->ptr, - _upb_MessageDef_Modifiers(m)); - - for (int i = 0; i < m->field_count; i++) { - const upb_FieldDef* f = sorted ? sorted[i] : upb_MessageDef_Field(m, i); - const upb_FieldType type = upb_FieldDef_Type(f); - const int number = upb_FieldDef_Number(f); - const uint64_t modifiers = _upb_FieldDef_Modifiers(f); - - if (!_upb_DescState_Grow(s, a)) return false; - s->ptr = upb_MtDataEncoder_PutField(&s->e, s->ptr, type, number, modifiers); - } - - for (int i = 0; i < m->real_oneof_count; i++) { - if (!_upb_DescState_Grow(s, a)) return false; - s->ptr = upb_MtDataEncoder_StartOneof(&s->e, s->ptr); - - const upb_OneofDef* o = upb_MessageDef_Oneof(m, i); - const int field_count = upb_OneofDef_FieldCount(o); - for (int j = 0; j < field_count; j++) { - const int number = upb_FieldDef_Number(upb_OneofDef_Field(o, j)); - - if (!_upb_DescState_Grow(s, a)) return false; - s->ptr = upb_MtDataEncoder_PutOneofField(&s->e, s->ptr, number); - } - } - - return true; -} - -static bool _upb_MessageDef_EncodeMessageSet(upb_DescState* s, - const upb_MessageDef* m, - upb_Arena* a) { - s->ptr = upb_MtDataEncoder_EncodeMessageSet(&s->e, s->ptr); - - return true; -} - -bool upb_MessageDef_MiniDescriptorEncode(const upb_MessageDef* m, upb_Arena* a, - upb_StringView* out) { - upb_DescState s; - _upb_DescState_Init(&s); - - if (!_upb_DescState_Grow(&s, a)) return false; - - if (upb_MessageDef_IsMapEntry(m)) { - if (!_upb_MessageDef_EncodeMap(&s, m, a)) return false; - } else if (UPB_DESC(MessageOptions_message_set_wire_format)(m->opts)) { - if (!_upb_MessageDef_EncodeMessageSet(&s, m, a)) return false; - } else { - if (!_upb_MessageDef_EncodeMessage(&s, m, a)) return false; - } - - if (!_upb_DescState_Grow(&s, a)) return false; - *s.ptr = '\0'; - - out->data = s.buf; - out->size = s.ptr - s.buf; - return true; -} - -static upb_StringView* _upb_ReservedNames_New(upb_DefBuilder* ctx, int n, - const upb_StringView* protos) { - upb_StringView* sv = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_StringView, n); - for (int i = 0; i < n; i++) { - sv[i].data = - upb_strdup2(protos[i].data, protos[i].size, _upb_DefBuilder_Arena(ctx)); - sv[i].size = protos[i].size; - } - return sv; -} - -static void create_msgdef(upb_DefBuilder* ctx, const char* prefix, - const UPB_DESC(DescriptorProto*) msg_proto, - const UPB_DESC(FeatureSet*) parent_features, - const upb_MessageDef* containing_type, - upb_MessageDef* m) { - const UPB_DESC(OneofDescriptorProto)* const* oneofs; - const UPB_DESC(FieldDescriptorProto)* const* fields; - const UPB_DESC(DescriptorProto_ExtensionRange)* const* ext_ranges; - const UPB_DESC(DescriptorProto_ReservedRange)* const* res_ranges; - const upb_StringView* res_names; - size_t n_oneof, n_field, n_enum, n_ext, n_msg; - size_t n_ext_range, n_res_range, n_res_name; - upb_StringView name; - - UPB_DEF_SET_OPTIONS(m->opts, DescriptorProto, MessageOptions, msg_proto); - m->resolved_features = _upb_DefBuilder_ResolveFeatures( - ctx, parent_features, UPB_DESC(MessageOptions_features)(m->opts)); - - // Must happen before _upb_DefBuilder_Add() - m->file = _upb_DefBuilder_File(ctx); - - m->containing_type = containing_type; - m->is_sorted = true; - - name = UPB_DESC(DescriptorProto_name)(msg_proto); - - m->full_name = _upb_DefBuilder_MakeFullName(ctx, prefix, name); - _upb_DefBuilder_Add(ctx, m->full_name, _upb_DefType_Pack(m, UPB_DEFTYPE_MSG)); - - oneofs = UPB_DESC(DescriptorProto_oneof_decl)(msg_proto, &n_oneof); - fields = UPB_DESC(DescriptorProto_field)(msg_proto, &n_field); - ext_ranges = - UPB_DESC(DescriptorProto_extension_range)(msg_proto, &n_ext_range); - res_ranges = - UPB_DESC(DescriptorProto_reserved_range)(msg_proto, &n_res_range); - res_names = UPB_DESC(DescriptorProto_reserved_name)(msg_proto, &n_res_name); - - bool ok = upb_inttable_init(&m->itof, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - ok = upb_strtable_init(&m->ntof, n_oneof + n_field, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - ok = upb_strtable_init(&m->jtof, n_field, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - m->oneof_count = n_oneof; - m->oneofs = _upb_OneofDefs_New(ctx, n_oneof, oneofs, m->resolved_features, m); - - m->field_count = n_field; - m->fields = _upb_FieldDefs_New(ctx, n_field, fields, m->resolved_features, - m->full_name, m, &m->is_sorted); - - // Message Sets may not contain fields. - if (UPB_UNLIKELY(UPB_DESC(MessageOptions_message_set_wire_format)(m->opts))) { - if (UPB_UNLIKELY(n_field > 0)) { - _upb_DefBuilder_Errf(ctx, "invalid message set (%s)", m->full_name); - } - } - - m->ext_range_count = n_ext_range; - m->ext_ranges = _upb_ExtensionRanges_New(ctx, n_ext_range, ext_ranges, - m->resolved_features, m); - - m->res_range_count = n_res_range; - m->res_ranges = - _upb_MessageReservedRanges_New(ctx, n_res_range, res_ranges, m); - - m->res_name_count = n_res_name; - m->res_names = _upb_ReservedNames_New(ctx, n_res_name, res_names); - - const size_t synthetic_count = _upb_OneofDefs_Finalize(ctx, m); - m->real_oneof_count = m->oneof_count - synthetic_count; - - assign_msg_wellknowntype(m); - if (!upb_inttable_compact(&m->itof, ctx->arena)) _upb_DefBuilder_OomErr(ctx); - - const UPB_DESC(EnumDescriptorProto)* const* enums = - UPB_DESC(DescriptorProto_enum_type)(msg_proto, &n_enum); - m->nested_enum_count = n_enum; - m->nested_enums = - _upb_EnumDefs_New(ctx, n_enum, enums, m->resolved_features, m); - - const UPB_DESC(FieldDescriptorProto)* const* exts = - UPB_DESC(DescriptorProto_extension)(msg_proto, &n_ext); - m->nested_ext_count = n_ext; - m->nested_exts = _upb_Extensions_New(ctx, n_ext, exts, m->resolved_features, - m->full_name, m); - - const UPB_DESC(DescriptorProto)* const* msgs = - UPB_DESC(DescriptorProto_nested_type)(msg_proto, &n_msg); - m->nested_msg_count = n_msg; - m->nested_msgs = - _upb_MessageDefs_New(ctx, n_msg, msgs, m->resolved_features, m); -} - -// Allocate and initialize an array of |n| message defs. -upb_MessageDef* _upb_MessageDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(DescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) - parent_features, - const upb_MessageDef* containing_type) { - _upb_DefType_CheckPadding(sizeof(upb_MessageDef)); - - const char* name = containing_type ? containing_type->full_name - : _upb_FileDef_RawPackage(ctx->file); - - upb_MessageDef* m = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_MessageDef, n); - for (int i = 0; i < n; i++) { - create_msgdef(ctx, name, protos[i], parent_features, containing_type, - &m[i]); - } - return m; -} - - -// Must be last. - -struct upb_MessageReservedRange { - int32_t start; - int32_t end; -}; - -upb_MessageReservedRange* _upb_MessageReservedRange_At( - const upb_MessageReservedRange* r, int i) { - return (upb_MessageReservedRange*)&r[i]; -} - -int32_t upb_MessageReservedRange_Start(const upb_MessageReservedRange* r) { - return r->start; -} -int32_t upb_MessageReservedRange_End(const upb_MessageReservedRange* r) { - return r->end; -} - -upb_MessageReservedRange* _upb_MessageReservedRanges_New( - upb_DefBuilder* ctx, int n, - const UPB_DESC(DescriptorProto_ReservedRange) * const* protos, - const upb_MessageDef* m) { - upb_MessageReservedRange* r = - UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_MessageReservedRange, n); - - for (int i = 0; i < n; i++) { - const int32_t start = - UPB_DESC(DescriptorProto_ReservedRange_start)(protos[i]); - const int32_t end = UPB_DESC(DescriptorProto_ReservedRange_end)(protos[i]); - const int32_t max = kUpb_MaxFieldNumber + 1; - - // A full validation would also check that each range is disjoint, and that - // none of the fields overlap with the extension ranges, but we are just - // sanity checking here. - if (start < 1 || end <= start || end > max) { - _upb_DefBuilder_Errf(ctx, - "Reserved range (%d, %d) is invalid, message=%s\n", - (int)start, (int)end, upb_MessageDef_FullName(m)); - } - - r[i].start = start; - r[i].end = end; - } - - return r; -} - - - -// Must be last. - -struct upb_MethodDef { - const UPB_DESC(MethodOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - upb_ServiceDef* service; - const char* full_name; - const upb_MessageDef* input_type; - const upb_MessageDef* output_type; - int index; - bool client_streaming; - bool server_streaming; -}; - -upb_MethodDef* _upb_MethodDef_At(const upb_MethodDef* m, int i) { - return (upb_MethodDef*)&m[i]; -} - -const upb_ServiceDef* upb_MethodDef_Service(const upb_MethodDef* m) { - return m->service; -} - -const UPB_DESC(MethodOptions) * upb_MethodDef_Options(const upb_MethodDef* m) { - return m->opts; -} - -bool upb_MethodDef_HasOptions(const upb_MethodDef* m) { - return m->opts != (void*)kUpbDefOptDefault; -} - -const UPB_DESC(FeatureSet) * - upb_MethodDef_ResolvedFeatures(const upb_MethodDef* m) { - return m->resolved_features; -} - -const char* upb_MethodDef_FullName(const upb_MethodDef* m) { - return m->full_name; -} - -const char* upb_MethodDef_Name(const upb_MethodDef* m) { - return _upb_DefBuilder_FullToShort(m->full_name); -} - -int upb_MethodDef_Index(const upb_MethodDef* m) { return m->index; } - -const upb_MessageDef* upb_MethodDef_InputType(const upb_MethodDef* m) { - return m->input_type; -} - -const upb_MessageDef* upb_MethodDef_OutputType(const upb_MethodDef* m) { - return m->output_type; -} - -bool upb_MethodDef_ClientStreaming(const upb_MethodDef* m) { - return m->client_streaming; -} - -bool upb_MethodDef_ServerStreaming(const upb_MethodDef* m) { - return m->server_streaming; -} - -static void create_method(upb_DefBuilder* ctx, - const UPB_DESC(MethodDescriptorProto*) method_proto, - const UPB_DESC(FeatureSet*) parent_features, - upb_ServiceDef* s, upb_MethodDef* m) { - UPB_DEF_SET_OPTIONS(m->opts, MethodDescriptorProto, MethodOptions, - method_proto); - m->resolved_features = _upb_DefBuilder_ResolveFeatures( - ctx, parent_features, UPB_DESC(MethodOptions_features)(m->opts)); - - upb_StringView name = UPB_DESC(MethodDescriptorProto_name)(method_proto); - - m->service = s; - m->full_name = - _upb_DefBuilder_MakeFullName(ctx, upb_ServiceDef_FullName(s), name); - m->client_streaming = - UPB_DESC(MethodDescriptorProto_client_streaming)(method_proto); - m->server_streaming = - UPB_DESC(MethodDescriptorProto_server_streaming)(method_proto); - m->input_type = _upb_DefBuilder_Resolve( - ctx, m->full_name, m->full_name, - UPB_DESC(MethodDescriptorProto_input_type)(method_proto), - UPB_DEFTYPE_MSG); - m->output_type = _upb_DefBuilder_Resolve( - ctx, m->full_name, m->full_name, - UPB_DESC(MethodDescriptorProto_output_type)(method_proto), - UPB_DEFTYPE_MSG); -} - -// Allocate and initialize an array of |n| method defs belonging to |s|. -upb_MethodDef* _upb_MethodDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(MethodDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - upb_ServiceDef* s) { - upb_MethodDef* m = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_MethodDef, n); - for (int i = 0; i < n; i++) { - create_method(ctx, protos[i], parent_features, s, &m[i]); - m[i].index = i; - } - return m; -} - - -#include -#include -#include - - -// Must be last. - -struct upb_OneofDef { - UPB_ALIGN_AS(8) const UPB_DESC(OneofOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - const upb_MessageDef* parent; - const char* full_name; - int field_count; - bool synthetic; - const upb_FieldDef** fields; - upb_strtable ntof; // lookup a field by name - upb_inttable itof; // lookup a field by number (index) -}; - -upb_OneofDef* _upb_OneofDef_At(const upb_OneofDef* o, int i) { - return (upb_OneofDef*)&o[i]; -} - -const UPB_DESC(OneofOptions) * upb_OneofDef_Options(const upb_OneofDef* o) { - return o->opts; -} - -bool upb_OneofDef_HasOptions(const upb_OneofDef* o) { - return o->opts != (void*)kUpbDefOptDefault; -} - -const UPB_DESC(FeatureSet) * - upb_OneofDef_ResolvedFeatures(const upb_OneofDef* o) { - return o->resolved_features; -} - -const char* upb_OneofDef_FullName(const upb_OneofDef* o) { - return o->full_name; -} - -const char* upb_OneofDef_Name(const upb_OneofDef* o) { - return _upb_DefBuilder_FullToShort(o->full_name); -} - -const upb_MessageDef* upb_OneofDef_ContainingType(const upb_OneofDef* o) { - return o->parent; -} - -int upb_OneofDef_FieldCount(const upb_OneofDef* o) { return o->field_count; } - -const upb_FieldDef* upb_OneofDef_Field(const upb_OneofDef* o, int i) { - UPB_ASSERT(i < o->field_count); - return o->fields[i]; -} - -int upb_OneofDef_numfields(const upb_OneofDef* o) { return o->field_count; } - -uint32_t upb_OneofDef_Index(const upb_OneofDef* o) { - // Compute index in our parent's array. - return o - upb_MessageDef_Oneof(o->parent, 0); -} - -bool upb_OneofDef_IsSynthetic(const upb_OneofDef* o) { return o->synthetic; } - -const upb_FieldDef* upb_OneofDef_LookupNameWithSize(const upb_OneofDef* o, - const char* name, - size_t size) { - upb_value val; - return upb_strtable_lookup2(&o->ntof, name, size, &val) - ? upb_value_getptr(val) - : NULL; -} - -const upb_FieldDef* upb_OneofDef_LookupName(const upb_OneofDef* o, - const char* name) { - return upb_OneofDef_LookupNameWithSize(o, name, strlen(name)); -} - -const upb_FieldDef* upb_OneofDef_LookupNumber(const upb_OneofDef* o, - uint32_t num) { - upb_value val; - return upb_inttable_lookup(&o->itof, num, &val) ? upb_value_getptr(val) - : NULL; -} - -void _upb_OneofDef_Insert(upb_DefBuilder* ctx, upb_OneofDef* o, - const upb_FieldDef* f, const char* name, - size_t size) { - o->field_count++; - if (_upb_FieldDef_IsProto3Optional(f)) o->synthetic = true; - - const int number = upb_FieldDef_Number(f); - const upb_value v = upb_value_constptr(f); - - // TODO: This lookup is unfortunate because we also perform it when - // inserting into the message's table. Unfortunately that step occurs after - // this one and moving things around could be tricky so let's leave it for - // a future refactoring. - const bool number_exists = upb_inttable_lookup(&o->itof, number, NULL); - if (UPB_UNLIKELY(number_exists)) { - _upb_DefBuilder_Errf(ctx, "oneof fields have the same number (%d)", number); - } - - // TODO: More redundant work happening here. - const bool name_exists = upb_strtable_lookup2(&o->ntof, name, size, NULL); - if (UPB_UNLIKELY(name_exists)) { - _upb_DefBuilder_Errf(ctx, "oneof fields have the same name (%.*s)", - (int)size, name); - } - - const bool ok = upb_inttable_insert(&o->itof, number, v, ctx->arena) && - upb_strtable_insert(&o->ntof, name, size, v, ctx->arena); - if (UPB_UNLIKELY(!ok)) { - _upb_DefBuilder_OomErr(ctx); - } -} - -// Returns the synthetic count. -size_t _upb_OneofDefs_Finalize(upb_DefBuilder* ctx, upb_MessageDef* m) { - int synthetic_count = 0; - - for (int i = 0; i < upb_MessageDef_OneofCount(m); i++) { - upb_OneofDef* o = (upb_OneofDef*)upb_MessageDef_Oneof(m, i); - - if (o->synthetic && o->field_count != 1) { - _upb_DefBuilder_Errf(ctx, - "Synthetic oneofs must have one field, not %d: %s", - o->field_count, upb_OneofDef_Name(o)); - } - - if (o->synthetic) { - synthetic_count++; - } else if (synthetic_count != 0) { - _upb_DefBuilder_Errf( - ctx, "Synthetic oneofs must be after all other oneofs: %s", - upb_OneofDef_Name(o)); - } - - o->fields = - UPB_DEFBUILDER_ALLOCARRAY(ctx, const upb_FieldDef*, o->field_count); - o->field_count = 0; - } - - for (int i = 0; i < upb_MessageDef_FieldCount(m); i++) { - const upb_FieldDef* f = upb_MessageDef_Field(m, i); - upb_OneofDef* o = (upb_OneofDef*)upb_FieldDef_ContainingOneof(f); - if (o) { - o->fields[o->field_count++] = f; - } - } - - return synthetic_count; -} - -static void create_oneofdef(upb_DefBuilder* ctx, upb_MessageDef* m, - const UPB_DESC(OneofDescriptorProto*) oneof_proto, - const UPB_DESC(FeatureSet*) parent_features, - const upb_OneofDef* _o) { - upb_OneofDef* o = (upb_OneofDef*)_o; - - UPB_DEF_SET_OPTIONS(o->opts, OneofDescriptorProto, OneofOptions, oneof_proto); - o->resolved_features = _upb_DefBuilder_ResolveFeatures( - ctx, parent_features, UPB_DESC(OneofOptions_features)(o->opts)); - - upb_StringView name = UPB_DESC(OneofDescriptorProto_name)(oneof_proto); - - o->parent = m; - o->full_name = - _upb_DefBuilder_MakeFullName(ctx, upb_MessageDef_FullName(m), name); - o->field_count = 0; - o->synthetic = false; - - if (upb_MessageDef_FindByNameWithSize(m, name.data, name.size, NULL, NULL)) { - _upb_DefBuilder_Errf(ctx, "duplicate oneof name (%s)", o->full_name); - } - - upb_value v = _upb_DefType_Pack(o, UPB_DEFTYPE_ONEOF); - bool ok = _upb_MessageDef_Insert(m, name.data, name.size, v, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - ok = upb_inttable_init(&o->itof, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); - - ok = upb_strtable_init(&o->ntof, 4, ctx->arena); - if (!ok) _upb_DefBuilder_OomErr(ctx); -} - -// Allocate and initialize an array of |n| oneof defs. -upb_OneofDef* _upb_OneofDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(OneofDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - upb_MessageDef* m) { - _upb_DefType_CheckPadding(sizeof(upb_OneofDef)); - - upb_OneofDef* o = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_OneofDef, n); - for (int i = 0; i < n; i++) { - create_oneofdef(ctx, m, protos[i], parent_features, &o[i]); - } - return o; -} - - - -// Must be last. - -struct upb_ServiceDef { - UPB_ALIGN_AS(8) const UPB_DESC(ServiceOptions*) opts; - const UPB_DESC(FeatureSet*) resolved_features; - const upb_FileDef* file; - const char* full_name; - upb_MethodDef* methods; - int method_count; - int index; -}; - -upb_ServiceDef* _upb_ServiceDef_At(const upb_ServiceDef* s, int index) { - return (upb_ServiceDef*)&s[index]; -} - -const UPB_DESC(ServiceOptions) * - upb_ServiceDef_Options(const upb_ServiceDef* s) { - return s->opts; -} - -bool upb_ServiceDef_HasOptions(const upb_ServiceDef* s) { - return s->opts != (void*)kUpbDefOptDefault; -} - -const UPB_DESC(FeatureSet) * - upb_ServiceDef_ResolvedFeatures(const upb_ServiceDef* s) { - return s->resolved_features; -} - -const char* upb_ServiceDef_FullName(const upb_ServiceDef* s) { - return s->full_name; -} - -const char* upb_ServiceDef_Name(const upb_ServiceDef* s) { - return _upb_DefBuilder_FullToShort(s->full_name); -} - -int upb_ServiceDef_Index(const upb_ServiceDef* s) { return s->index; } - -const upb_FileDef* upb_ServiceDef_File(const upb_ServiceDef* s) { - return s->file; -} - -int upb_ServiceDef_MethodCount(const upb_ServiceDef* s) { - return s->method_count; -} - -const upb_MethodDef* upb_ServiceDef_Method(const upb_ServiceDef* s, int i) { - return (i < 0 || i >= s->method_count) ? NULL - : _upb_MethodDef_At(s->methods, i); -} - -const upb_MethodDef* upb_ServiceDef_FindMethodByName(const upb_ServiceDef* s, - const char* name) { - for (int i = 0; i < s->method_count; i++) { - const upb_MethodDef* m = _upb_MethodDef_At(s->methods, i); - if (strcmp(name, upb_MethodDef_Name(m)) == 0) { - return m; - } - } - return NULL; -} - -static void create_service(upb_DefBuilder* ctx, - const UPB_DESC(ServiceDescriptorProto*) svc_proto, - const UPB_DESC(FeatureSet*) parent_features, - upb_ServiceDef* s) { - UPB_DEF_SET_OPTIONS(s->opts, ServiceDescriptorProto, ServiceOptions, - svc_proto); - s->resolved_features = _upb_DefBuilder_ResolveFeatures( - ctx, parent_features, UPB_DESC(ServiceOptions_features)(s->opts)); - - // Must happen before _upb_DefBuilder_Add() - s->file = _upb_DefBuilder_File(ctx); - - upb_StringView name = UPB_DESC(ServiceDescriptorProto_name)(svc_proto); - const char* package = _upb_FileDef_RawPackage(s->file); - s->full_name = _upb_DefBuilder_MakeFullName(ctx, package, name); - _upb_DefBuilder_Add(ctx, s->full_name, - _upb_DefType_Pack(s, UPB_DEFTYPE_SERVICE)); - - size_t n; - const UPB_DESC(MethodDescriptorProto)* const* methods = - UPB_DESC(ServiceDescriptorProto_method)(svc_proto, &n); - s->method_count = n; - s->methods = _upb_MethodDefs_New(ctx, n, methods, s->resolved_features, s); -} - -upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(ServiceDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) - parent_features) { - _upb_DefType_CheckPadding(sizeof(upb_ServiceDef)); - - upb_ServiceDef* s = UPB_DEFBUILDER_ALLOCARRAY(ctx, upb_ServiceDef, n); - for (int i = 0; i < n; i++) { - create_service(ctx, protos[i], parent_features, &s[i]); - s[i].index = i; - } - return s; -} - - -#include -#include - - -// Must be last. - -typedef struct { - upb_Arena* arena; - jmp_buf err; -} upb_ToProto_Context; - -#define CHK_OOM(val) \ - if (!(val)) UPB_LONGJMP(ctx->err, 1); - -// We want to copy the options verbatim into the destination options proto. -// We use serialize+parse as our deep copy. -#define SET_OPTIONS(proto, desc_type, options_type, src) \ - { \ - size_t size; \ - /* MEM: could use a temporary arena here instead. */ \ - char* pb = google_protobuf_##options_type##_serialize(src, ctx->arena, &size); \ - CHK_OOM(pb); \ - google_protobuf_##options_type* dst = \ - google_protobuf_##options_type##_parse(pb, size, ctx->arena); \ - CHK_OOM(dst); \ - google_protobuf_##desc_type##_set_options(proto, dst); \ - } - -static upb_StringView strviewdup2(upb_ToProto_Context* ctx, - upb_StringView str) { - char* p = upb_Arena_Malloc(ctx->arena, str.size); - CHK_OOM(p); - memcpy(p, str.data, str.size); - return (upb_StringView){.data = p, .size = str.size}; -} - -static upb_StringView strviewdup(upb_ToProto_Context* ctx, const char* s) { - return strviewdup2(ctx, (upb_StringView){.data = s, .size = strlen(s)}); -} - -static upb_StringView qual_dup(upb_ToProto_Context* ctx, const char* s) { - size_t n = strlen(s); - char* p = upb_Arena_Malloc(ctx->arena, n + 1); - CHK_OOM(p); - p[0] = '.'; - memcpy(p + 1, s, n); - return (upb_StringView){.data = p, .size = n + 1}; -} - -UPB_PRINTF(2, 3) -static upb_StringView printf_dup(upb_ToProto_Context* ctx, const char* fmt, - ...) { - const size_t max = 32; - char* p = upb_Arena_Malloc(ctx->arena, max); - CHK_OOM(p); - va_list args; - va_start(args, fmt); - size_t n = _upb_vsnprintf(p, max, fmt, args); - va_end(args); - UPB_ASSERT(n < max); - return (upb_StringView){.data = p, .size = n}; -} - -static bool upb_isprint(char ch) { return ch >= 0x20 && ch <= 0x7f; } - -static int special_escape(char ch) { - switch (ch) { - // This is the same set of special escapes recognized by - // absl::CEscape(). - case '\n': - return 'n'; - case '\r': - return 'r'; - case '\t': - return 't'; - case '\\': - return '\\'; - case '\'': - return '\''; - case '"': - return '"'; - default: - return -1; - } -} - -static upb_StringView default_bytes(upb_ToProto_Context* ctx, - upb_StringView val) { - size_t n = 0; - for (size_t i = 0; i < val.size; i++) { - char ch = val.data[i]; - if (special_escape(ch) >= 0) - n += 2; // '\C' - else if (upb_isprint(ch)) - n += 1; - else - n += 4; // '\123' - } - char* p = upb_Arena_Malloc(ctx->arena, n); - CHK_OOM(p); - char* dst = p; - const char* src = val.data; - const char* end = src + val.size; - while (src < end) { - unsigned char ch = *src++; - if (special_escape(ch) >= 0) { - *dst++ = '\\'; - *dst++ = (char)special_escape(ch); - } else if (upb_isprint(ch)) { - *dst++ = ch; - } else { - *dst++ = '\\'; - *dst++ = '0' + (ch >> 6); - *dst++ = '0' + ((ch >> 3) & 0x7); - *dst++ = '0' + (ch & 0x7); - } - } - return (upb_StringView){.data = p, .size = n}; -} - -static upb_StringView default_string(upb_ToProto_Context* ctx, - const upb_FieldDef* f) { - upb_MessageValue d = upb_FieldDef_Default(f); - upb_CType type = upb_FieldDef_CType(f); - - if (type == kUpb_CType_Float || type == kUpb_CType_Double) { - double val = type == kUpb_CType_Float ? d.float_val : d.double_val; - if (val == INFINITY) { - return strviewdup(ctx, "inf"); - } else if (val == -INFINITY) { - return strviewdup(ctx, "-inf"); - } else if (val != val) { - return strviewdup(ctx, "nan"); - } - } - - switch (upb_FieldDef_CType(f)) { - case kUpb_CType_Bool: - return strviewdup(ctx, d.bool_val ? "true" : "false"); - case kUpb_CType_Enum: { - const upb_EnumDef* e = upb_FieldDef_EnumSubDef(f); - const upb_EnumValueDef* ev = - upb_EnumDef_FindValueByNumber(e, d.int32_val); - return strviewdup(ctx, upb_EnumValueDef_Name(ev)); - } - case kUpb_CType_Int64: - return printf_dup(ctx, "%" PRId64, d.int64_val); - case kUpb_CType_UInt64: - return printf_dup(ctx, "%" PRIu64, d.uint64_val); - case kUpb_CType_Int32: - return printf_dup(ctx, "%" PRId32, d.int32_val); - case kUpb_CType_UInt32: - return printf_dup(ctx, "%" PRIu32, d.uint32_val); - case kUpb_CType_Float: - return printf_dup(ctx, "%.9g", d.float_val); - case kUpb_CType_Double: - return printf_dup(ctx, "%.17g", d.double_val); - case kUpb_CType_String: - return strviewdup2(ctx, d.str_val); - case kUpb_CType_Bytes: - return default_bytes(ctx, d.str_val); - default: - UPB_UNREACHABLE(); - } -} - -static google_protobuf_DescriptorProto_ReservedRange* resrange_toproto( - upb_ToProto_Context* ctx, const upb_MessageReservedRange* r) { - google_protobuf_DescriptorProto_ReservedRange* proto = - google_protobuf_DescriptorProto_ReservedRange_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_DescriptorProto_ReservedRange_set_start( - proto, upb_MessageReservedRange_Start(r)); - google_protobuf_DescriptorProto_ReservedRange_set_end(proto, - upb_MessageReservedRange_End(r)); - - return proto; -} - -static google_protobuf_EnumDescriptorProto_EnumReservedRange* enumresrange_toproto( - upb_ToProto_Context* ctx, const upb_EnumReservedRange* r) { - google_protobuf_EnumDescriptorProto_EnumReservedRange* proto = - google_protobuf_EnumDescriptorProto_EnumReservedRange_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start( - proto, upb_EnumReservedRange_Start(r)); - google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end( - proto, upb_EnumReservedRange_End(r)); - - return proto; -} - -static google_protobuf_FieldDescriptorProto* fielddef_toproto(upb_ToProto_Context* ctx, - const upb_FieldDef* f) { - google_protobuf_FieldDescriptorProto* proto = - google_protobuf_FieldDescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_FieldDescriptorProto_set_name(proto, - strviewdup(ctx, upb_FieldDef_Name(f))); - google_protobuf_FieldDescriptorProto_set_number(proto, upb_FieldDef_Number(f)); - - if (upb_FieldDef_IsRequired(f) && - upb_FileDef_Edition(upb_FieldDef_File(f)) >= UPB_DESC(EDITION_2023)) { - google_protobuf_FieldDescriptorProto_set_label( - proto, UPB_DESC(FieldDescriptorProto_LABEL_OPTIONAL)); - } else { - google_protobuf_FieldDescriptorProto_set_label(proto, upb_FieldDef_Label(f)); - } - if (upb_FieldDef_Type(f) == kUpb_FieldType_Group && - upb_FileDef_Edition(upb_FieldDef_File(f)) >= UPB_DESC(EDITION_2023)) { - google_protobuf_FieldDescriptorProto_set_type(proto, kUpb_FieldType_Message); - } else { - google_protobuf_FieldDescriptorProto_set_type(proto, upb_FieldDef_Type(f)); - } - - if (upb_FieldDef_HasJsonName(f)) { - google_protobuf_FieldDescriptorProto_set_json_name( - proto, strviewdup(ctx, upb_FieldDef_JsonName(f))); - } - - if (upb_FieldDef_IsSubMessage(f)) { - google_protobuf_FieldDescriptorProto_set_type_name( - proto, - qual_dup(ctx, upb_MessageDef_FullName(upb_FieldDef_MessageSubDef(f)))); - } else if (upb_FieldDef_CType(f) == kUpb_CType_Enum) { - google_protobuf_FieldDescriptorProto_set_type_name( - proto, qual_dup(ctx, upb_EnumDef_FullName(upb_FieldDef_EnumSubDef(f)))); - } - - if (upb_FieldDef_IsExtension(f)) { - google_protobuf_FieldDescriptorProto_set_extendee( - proto, - qual_dup(ctx, upb_MessageDef_FullName(upb_FieldDef_ContainingType(f)))); - } - - if (upb_FieldDef_HasDefault(f)) { - google_protobuf_FieldDescriptorProto_set_default_value(proto, - default_string(ctx, f)); - } - - const upb_OneofDef* o = upb_FieldDef_ContainingOneof(f); - if (o) { - google_protobuf_FieldDescriptorProto_set_oneof_index(proto, upb_OneofDef_Index(o)); - } - - if (_upb_FieldDef_IsProto3Optional(f)) { - google_protobuf_FieldDescriptorProto_set_proto3_optional(proto, true); - } - - if (upb_FieldDef_HasOptions(f)) { - SET_OPTIONS(proto, FieldDescriptorProto, FieldOptions, - upb_FieldDef_Options(f)); - } - - return proto; -} - -static google_protobuf_OneofDescriptorProto* oneofdef_toproto(upb_ToProto_Context* ctx, - const upb_OneofDef* o) { - google_protobuf_OneofDescriptorProto* proto = - google_protobuf_OneofDescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_OneofDescriptorProto_set_name(proto, - strviewdup(ctx, upb_OneofDef_Name(o))); - - if (upb_OneofDef_HasOptions(o)) { - SET_OPTIONS(proto, OneofDescriptorProto, OneofOptions, - upb_OneofDef_Options(o)); - } - - return proto; -} - -static google_protobuf_EnumValueDescriptorProto* enumvaldef_toproto( - upb_ToProto_Context* ctx, const upb_EnumValueDef* e) { - google_protobuf_EnumValueDescriptorProto* proto = - google_protobuf_EnumValueDescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_EnumValueDescriptorProto_set_name( - proto, strviewdup(ctx, upb_EnumValueDef_Name(e))); - google_protobuf_EnumValueDescriptorProto_set_number(proto, upb_EnumValueDef_Number(e)); - - if (upb_EnumValueDef_HasOptions(e)) { - SET_OPTIONS(proto, EnumValueDescriptorProto, EnumValueOptions, - upb_EnumValueDef_Options(e)); - } - - return proto; -} - -static google_protobuf_EnumDescriptorProto* enumdef_toproto(upb_ToProto_Context* ctx, - const upb_EnumDef* e) { - google_protobuf_EnumDescriptorProto* proto = - google_protobuf_EnumDescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_EnumDescriptorProto_set_name(proto, - strviewdup(ctx, upb_EnumDef_Name(e))); - - int n = upb_EnumDef_ValueCount(e); - google_protobuf_EnumValueDescriptorProto** vals = - google_protobuf_EnumDescriptorProto_resize_value(proto, n, ctx->arena); - CHK_OOM(vals); - for (int i = 0; i < n; i++) { - vals[i] = enumvaldef_toproto(ctx, upb_EnumDef_Value(e, i)); - } - - n = upb_EnumDef_ReservedRangeCount(e); - google_protobuf_EnumDescriptorProto_EnumReservedRange** res_ranges = - google_protobuf_EnumDescriptorProto_resize_reserved_range(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - res_ranges[i] = enumresrange_toproto(ctx, upb_EnumDef_ReservedRange(e, i)); - } - - n = upb_EnumDef_ReservedNameCount(e); - upb_StringView* res_names = - google_protobuf_EnumDescriptorProto_resize_reserved_name(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - res_names[i] = upb_EnumDef_ReservedName(e, i); - } - - if (upb_EnumDef_HasOptions(e)) { - SET_OPTIONS(proto, EnumDescriptorProto, EnumOptions, - upb_EnumDef_Options(e)); - } - - return proto; -} - -static google_protobuf_DescriptorProto_ExtensionRange* extrange_toproto( - upb_ToProto_Context* ctx, const upb_ExtensionRange* e) { - google_protobuf_DescriptorProto_ExtensionRange* proto = - google_protobuf_DescriptorProto_ExtensionRange_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_DescriptorProto_ExtensionRange_set_start(proto, - upb_ExtensionRange_Start(e)); - google_protobuf_DescriptorProto_ExtensionRange_set_end(proto, - upb_ExtensionRange_End(e)); - - if (upb_ExtensionRange_HasOptions(e)) { - SET_OPTIONS(proto, DescriptorProto_ExtensionRange, ExtensionRangeOptions, - upb_ExtensionRange_Options(e)); - } - - return proto; -} - -static google_protobuf_DescriptorProto* msgdef_toproto(upb_ToProto_Context* ctx, - const upb_MessageDef* m) { - google_protobuf_DescriptorProto* proto = google_protobuf_DescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_DescriptorProto_set_name(proto, - strviewdup(ctx, upb_MessageDef_Name(m))); - - int n; - - n = upb_MessageDef_FieldCount(m); - google_protobuf_FieldDescriptorProto** fields = - google_protobuf_DescriptorProto_resize_field(proto, n, ctx->arena); - CHK_OOM(fields); - for (int i = 0; i < n; i++) { - fields[i] = fielddef_toproto(ctx, upb_MessageDef_Field(m, i)); - } - - n = upb_MessageDef_OneofCount(m); - google_protobuf_OneofDescriptorProto** oneofs = - google_protobuf_DescriptorProto_resize_oneof_decl(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - oneofs[i] = oneofdef_toproto(ctx, upb_MessageDef_Oneof(m, i)); - } - - n = upb_MessageDef_NestedMessageCount(m); - google_protobuf_DescriptorProto** nested_msgs = - google_protobuf_DescriptorProto_resize_nested_type(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - nested_msgs[i] = msgdef_toproto(ctx, upb_MessageDef_NestedMessage(m, i)); - } - - n = upb_MessageDef_NestedEnumCount(m); - google_protobuf_EnumDescriptorProto** nested_enums = - google_protobuf_DescriptorProto_resize_enum_type(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - nested_enums[i] = enumdef_toproto(ctx, upb_MessageDef_NestedEnum(m, i)); - } - - n = upb_MessageDef_NestedExtensionCount(m); - google_protobuf_FieldDescriptorProto** nested_exts = - google_protobuf_DescriptorProto_resize_extension(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - nested_exts[i] = - fielddef_toproto(ctx, upb_MessageDef_NestedExtension(m, i)); - } - - n = upb_MessageDef_ExtensionRangeCount(m); - google_protobuf_DescriptorProto_ExtensionRange** ext_ranges = - google_protobuf_DescriptorProto_resize_extension_range(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - ext_ranges[i] = extrange_toproto(ctx, upb_MessageDef_ExtensionRange(m, i)); - } - - n = upb_MessageDef_ReservedRangeCount(m); - google_protobuf_DescriptorProto_ReservedRange** res_ranges = - google_protobuf_DescriptorProto_resize_reserved_range(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - res_ranges[i] = resrange_toproto(ctx, upb_MessageDef_ReservedRange(m, i)); - } - - n = upb_MessageDef_ReservedNameCount(m); - upb_StringView* res_names = - google_protobuf_DescriptorProto_resize_reserved_name(proto, n, ctx->arena); - for (int i = 0; i < n; i++) { - res_names[i] = upb_MessageDef_ReservedName(m, i); - } - - if (upb_MessageDef_HasOptions(m)) { - SET_OPTIONS(proto, DescriptorProto, MessageOptions, - upb_MessageDef_Options(m)); - } - - return proto; -} - -static google_protobuf_MethodDescriptorProto* methoddef_toproto(upb_ToProto_Context* ctx, - const upb_MethodDef* m) { - google_protobuf_MethodDescriptorProto* proto = - google_protobuf_MethodDescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_MethodDescriptorProto_set_name(proto, - strviewdup(ctx, upb_MethodDef_Name(m))); - - google_protobuf_MethodDescriptorProto_set_input_type( - proto, - qual_dup(ctx, upb_MessageDef_FullName(upb_MethodDef_InputType(m)))); - google_protobuf_MethodDescriptorProto_set_output_type( - proto, - qual_dup(ctx, upb_MessageDef_FullName(upb_MethodDef_OutputType(m)))); - - if (upb_MethodDef_ClientStreaming(m)) { - google_protobuf_MethodDescriptorProto_set_client_streaming(proto, true); - } - - if (upb_MethodDef_ServerStreaming(m)) { - google_protobuf_MethodDescriptorProto_set_server_streaming(proto, true); - } - - if (upb_MethodDef_HasOptions(m)) { - SET_OPTIONS(proto, MethodDescriptorProto, MethodOptions, - upb_MethodDef_Options(m)); - } - - return proto; -} - -static google_protobuf_ServiceDescriptorProto* servicedef_toproto( - upb_ToProto_Context* ctx, const upb_ServiceDef* s) { - google_protobuf_ServiceDescriptorProto* proto = - google_protobuf_ServiceDescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_ServiceDescriptorProto_set_name( - proto, strviewdup(ctx, upb_ServiceDef_Name(s))); - - size_t n = upb_ServiceDef_MethodCount(s); - google_protobuf_MethodDescriptorProto** methods = - google_protobuf_ServiceDescriptorProto_resize_method(proto, n, ctx->arena); - for (size_t i = 0; i < n; i++) { - methods[i] = methoddef_toproto(ctx, upb_ServiceDef_Method(s, i)); - } - - if (upb_ServiceDef_HasOptions(s)) { - SET_OPTIONS(proto, ServiceDescriptorProto, ServiceOptions, - upb_ServiceDef_Options(s)); - } - - return proto; -} - -static google_protobuf_FileDescriptorProto* filedef_toproto(upb_ToProto_Context* ctx, - const upb_FileDef* f) { - google_protobuf_FileDescriptorProto* proto = - google_protobuf_FileDescriptorProto_new(ctx->arena); - CHK_OOM(proto); - - google_protobuf_FileDescriptorProto_set_name(proto, - strviewdup(ctx, upb_FileDef_Name(f))); - - const char* package = upb_FileDef_Package(f); - if (package) { - size_t n = strlen(package); - if (n) { - google_protobuf_FileDescriptorProto_set_package(proto, strviewdup(ctx, package)); - } - } - - if (upb_FileDef_Syntax(f) == kUpb_Syntax_Editions) { - google_protobuf_FileDescriptorProto_set_edition(proto, upb_FileDef_Edition(f)); - } - - if (upb_FileDef_Syntax(f) == kUpb_Syntax_Proto3) { - google_protobuf_FileDescriptorProto_set_syntax(proto, strviewdup(ctx, "proto3")); - } else if (upb_FileDef_Syntax(f) == kUpb_Syntax_Editions) { - google_protobuf_FileDescriptorProto_set_syntax(proto, strviewdup(ctx, "editions")); - } - - size_t n; - n = upb_FileDef_DependencyCount(f); - upb_StringView* deps = - google_protobuf_FileDescriptorProto_resize_dependency(proto, n, ctx->arena); - for (size_t i = 0; i < n; i++) { - deps[i] = strviewdup(ctx, upb_FileDef_Name(upb_FileDef_Dependency(f, i))); - } - - n = upb_FileDef_PublicDependencyCount(f); - int32_t* public_deps = - google_protobuf_FileDescriptorProto_resize_public_dependency(proto, n, ctx->arena); - const int32_t* public_dep_nums = _upb_FileDef_PublicDependencyIndexes(f); - if (n) memcpy(public_deps, public_dep_nums, n * sizeof(int32_t)); - - n = upb_FileDef_WeakDependencyCount(f); - int32_t* weak_deps = - google_protobuf_FileDescriptorProto_resize_weak_dependency(proto, n, ctx->arena); - const int32_t* weak_dep_nums = _upb_FileDef_WeakDependencyIndexes(f); - if (n) memcpy(weak_deps, weak_dep_nums, n * sizeof(int32_t)); - - n = upb_FileDef_TopLevelMessageCount(f); - google_protobuf_DescriptorProto** msgs = - google_protobuf_FileDescriptorProto_resize_message_type(proto, n, ctx->arena); - for (size_t i = 0; i < n; i++) { - msgs[i] = msgdef_toproto(ctx, upb_FileDef_TopLevelMessage(f, i)); - } - - n = upb_FileDef_TopLevelEnumCount(f); - google_protobuf_EnumDescriptorProto** enums = - google_protobuf_FileDescriptorProto_resize_enum_type(proto, n, ctx->arena); - for (size_t i = 0; i < n; i++) { - enums[i] = enumdef_toproto(ctx, upb_FileDef_TopLevelEnum(f, i)); - } - - n = upb_FileDef_ServiceCount(f); - google_protobuf_ServiceDescriptorProto** services = - google_protobuf_FileDescriptorProto_resize_service(proto, n, ctx->arena); - for (size_t i = 0; i < n; i++) { - services[i] = servicedef_toproto(ctx, upb_FileDef_Service(f, i)); - } - - n = upb_FileDef_TopLevelExtensionCount(f); - google_protobuf_FieldDescriptorProto** exts = - google_protobuf_FileDescriptorProto_resize_extension(proto, n, ctx->arena); - for (size_t i = 0; i < n; i++) { - exts[i] = fielddef_toproto(ctx, upb_FileDef_TopLevelExtension(f, i)); - } - - if (upb_FileDef_HasOptions(f)) { - SET_OPTIONS(proto, FileDescriptorProto, FileOptions, - upb_FileDef_Options(f)); - } - - return proto; -} - -static google_protobuf_DescriptorProto* upb_ToProto_ConvertMessageDef( - upb_ToProto_Context* const ctx, const upb_MessageDef* const m) { - if (UPB_SETJMP(ctx->err)) return NULL; - return msgdef_toproto(ctx, m); -} - -google_protobuf_DescriptorProto* upb_MessageDef_ToProto(const upb_MessageDef* m, - upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertMessageDef(&ctx, m); -} - -google_protobuf_EnumDescriptorProto* upb_ToProto_ConvertEnumDef( - upb_ToProto_Context* const ctx, const upb_EnumDef* const e) { - if (UPB_SETJMP(ctx->err)) return NULL; - return enumdef_toproto(ctx, e); -} - -google_protobuf_EnumDescriptorProto* upb_EnumDef_ToProto(const upb_EnumDef* e, - upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertEnumDef(&ctx, e); -} - -google_protobuf_EnumValueDescriptorProto* upb_ToProto_ConvertEnumValueDef( - upb_ToProto_Context* const ctx, const upb_EnumValueDef* e) { - if (UPB_SETJMP(ctx->err)) return NULL; - return enumvaldef_toproto(ctx, e); -} - -google_protobuf_EnumValueDescriptorProto* upb_EnumValueDef_ToProto( - const upb_EnumValueDef* e, upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertEnumValueDef(&ctx, e); -} - -google_protobuf_FieldDescriptorProto* upb_ToProto_ConvertFieldDef( - upb_ToProto_Context* const ctx, const upb_FieldDef* f) { - if (UPB_SETJMP(ctx->err)) return NULL; - return fielddef_toproto(ctx, f); -} - -google_protobuf_FieldDescriptorProto* upb_FieldDef_ToProto(const upb_FieldDef* f, - upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertFieldDef(&ctx, f); -} - -google_protobuf_OneofDescriptorProto* upb_ToProto_ConvertOneofDef( - upb_ToProto_Context* const ctx, const upb_OneofDef* o) { - if (UPB_SETJMP(ctx->err)) return NULL; - return oneofdef_toproto(ctx, o); -} - -google_protobuf_OneofDescriptorProto* upb_OneofDef_ToProto(const upb_OneofDef* o, - upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertOneofDef(&ctx, o); -} - -google_protobuf_FileDescriptorProto* upb_ToProto_ConvertFileDef( - upb_ToProto_Context* const ctx, const upb_FileDef* const f) { - if (UPB_SETJMP(ctx->err)) return NULL; - return filedef_toproto(ctx, f); -} - -google_protobuf_FileDescriptorProto* upb_FileDef_ToProto(const upb_FileDef* f, - upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertFileDef(&ctx, f); -} - -google_protobuf_MethodDescriptorProto* upb_ToProto_ConvertMethodDef( - upb_ToProto_Context* const ctx, const upb_MethodDef* m) { - if (UPB_SETJMP(ctx->err)) return NULL; - return methoddef_toproto(ctx, m); -} - -google_protobuf_MethodDescriptorProto* upb_MethodDef_ToProto( - const upb_MethodDef* const m, upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertMethodDef(&ctx, m); -} - -google_protobuf_ServiceDescriptorProto* upb_ToProto_ConvertServiceDef( - upb_ToProto_Context* const ctx, const upb_ServiceDef* const s) { - if (UPB_SETJMP(ctx->err)) return NULL; - return servicedef_toproto(ctx, s); -} - -google_protobuf_ServiceDescriptorProto* upb_ServiceDef_ToProto(const upb_ServiceDef* s, - upb_Arena* a) { - upb_ToProto_Context ctx = {a}; - return upb_ToProto_ConvertServiceDef(&ctx, s); -} - -// This should #undef all macros #defined in def.inc - -#undef UPB_SIZE -#undef UPB_PTR_AT -#undef UPB_SIZEOF_FLEX -#undef UPB_SIZEOF_FLEX_WOULD_OVERFLOW -#undef UPB_MAPTYPE_STRING -#undef UPB_EXPORT -#undef UPB_INLINE -#undef UPB_API -#undef UPBC_API -#undef UPB_API_INLINE -#undef UPB_API_INLINE_IF_NOT_GCC -#undef UPB_ALIGN_UP -#undef UPB_ALIGN_DOWN -#undef UPB_ALIGN_MALLOC -#undef UPB_ALIGN_OF -#undef UPB_ALIGN_AS -#undef UPB_MALLOC_ALIGN -#undef UPB_LIKELY -#undef UPB_UNLIKELY -#undef UPB_UNPREDICTABLE -#undef UPB_FORCEINLINE -#undef UPB_NOINLINE -#undef UPB_NORETURN -#undef UPB_PRINTF -#undef UPB_MAX -#undef UPB_MIN -#undef UPB_UNUSED -#undef UPB_ASSUME -#undef UPB_ASSERT -#undef UPB_UNREACHABLE -#undef UPB_DEFAULT_MAX_BLOCK_SIZE -#undef UPB_SETJMP -#undef UPB_LONGJMP -#undef UPB_PTRADD -#undef UPB_MUSTTAIL -#undef UPB_FASTTABLE_SUPPORTED -#undef UPB_FASTTABLE_MASK -#undef UPB_FASTTABLE -#undef UPB_FASTTABLE_INIT -#undef UPB_POISON_MEMORY_REGION -#undef UPB_UNPOISON_MEMORY_REGION -#undef UPB_ASAN -#undef UPB_ASAN_GUARD_SIZE -#undef UPB_CLANG_ASAN -#undef UPB_TSAN_PUBLISHED_MEMBER -#undef UPB_TSAN_INIT_PUBLISHED -#undef UPB_TSAN_CHECK_PUBLISHED -#undef UPB_TSAN_PUBLISH -#undef UPB_TSAN_CHECK_READ -#undef UPB_TSAN_CHECK_WRITE -#undef UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN -#undef UPB_DEPRECATED -#undef UPB_GNUC_MIN -#undef UPB_DESCRIPTOR_UPB_H_FILENAME -#undef UPB_DESC -#undef UPB_DESC_MINITABLE -#undef UPB_IS_GOOGLE3 -#undef UPB_ATOMIC -#undef UPB_USE_C11_ATOMICS -#undef UPB_USE_MSC_ATOMICS -#undef UPB_PRIVATE -#undef UPB_ONLYBITS -#undef UPB_LINKARR_DECLARE -#undef UPB_LINKARR_APPEND -#undef UPB_LINKARR_START -#undef UPB_LINKARR_STOP -#undef UPB_FUTURE_BREAKING_CHANGES diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/ruby-upb.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/ruby-upb.h deleted file mode 100644 index 55f54a15..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/ruby-upb.h +++ /dev/null @@ -1,16315 +0,0 @@ -// Ruby is still using proto3 enum semantics for proto2 -#define UPB_DISABLE_CLOSED_ENUM_CHECKING -/* Amalgamated source file */ - -/* - * This is where we define internal portability macros used across upb. - * - * All of these macros are undef'd in undef.inc to avoid leaking them to users. - * - * The correct usage is: - * - * #include "upb/foobar.h" - * #include "upb/baz.h" - * - * // MUST be last included header. - * #include "upb/port/def.inc" - * - * // Code for this file. - * // <...> - * - * // Can be omitted for .c files, required for .h. - * #include "upb/port/undef.inc" - * - * This file is private and must not be included by users! - */ - -#if !((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201703L) || \ - (defined(_MSC_VER) && _MSC_VER >= 1900)) -#error upb requires C99 or C++17 or MSVC >= 2015. -#endif - -// Portable check for GCC minimum version: -// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) -#define UPB_GNUC_MIN(x, y) \ - (__GNUC__ > (x) || __GNUC__ == (x) && __GNUC_MINOR__ >= (y)) -#else -#define UPB_GNUC_MIN(x, y) 0 -#endif - -#include -#include -#include -#include -#include -#include - -#ifndef UINTPTR_MAX -Error, UINTPTR_MAX is undefined -#endif - -#if UINTPTR_MAX == 0xffffffff -#define UPB_SIZE(size32, size64) size32 -#else -#define UPB_SIZE(size32, size64) size64 -#endif - -/* If we always read/write as a consistent type to each address, this shouldn't - * violate aliasing. - */ -#define UPB_PTR_AT(msg, ofs, type) ((type *)((char *)(msg) + (ofs))) - -// A flexible array member may have lower alignment requirements than the struct -// overall - in that case, it can overlap with the trailing padding of the rest -// of the struct, and a naive sizeof(base) + sizeof(flex) * count calculation -// will not take into account that overlap, and allocate more than is required. -#define UPB_SIZEOF_FLEX(type, member, count) \ - UPB_MAX(sizeof(type), offsetof(type, member[count])) - -#define UPB_SIZEOF_FLEX_WOULD_OVERFLOW(type, member, count) \ - (((SIZE_MAX - offsetof(type, member[0])) / \ - (offsetof(type, member[1]) - offsetof(type, member[0]))) < (size_t)count) - -#define UPB_MAPTYPE_STRING 0 - -// UPB_EXPORT: always generate a public symbol. -#if defined(__GNUC__) || defined(__clang__) -#define UPB_EXPORT __attribute__((visibility("default"))) __attribute__((used)) -#else -#define UPB_EXPORT -#endif - -// UPB_INLINE: inline if possible, emit standalone code if required. -#ifdef __cplusplus -#define UPB_INLINE inline -#elif defined(__GNUC__) || defined(__clang__) -#define UPB_INLINE static __inline__ -#else -#define UPB_INLINE static -#endif - -// UPB_INLINE_IF_NOT_GCC: because gcc can be very noisy at times. -#if defined(__GNUC__) && !defined(__clang__) -#define UPB_INLINE_IF_NOT_GCC static -#else -#define UPB_INLINE_IF_NOT_GCC UPB_INLINE -#endif - -#ifdef UPB_BUILD_API -#define UPB_API UPB_EXPORT -#define UPB_API_INLINE UPB_EXPORT -#else -#define UPB_API -#define UPB_API_INLINE UPB_INLINE -#endif - -#ifdef EXPORT_UPBC -#define UPBC_API UPB_EXPORT -#else -#define UPBC_API -#endif - -#define UPB_MALLOC_ALIGN 8 -#define UPB_ALIGN_UP(size, align) (((size) + (align) - 1) / (align) * (align)) -#define UPB_ALIGN_DOWN(size, align) ((size) / (align) * (align)) -#define UPB_ALIGN_MALLOC(size) UPB_ALIGN_UP(size, UPB_MALLOC_ALIGN) -#ifdef __clang__ -#define UPB_ALIGN_OF(type) _Alignof(type) -#else -#define UPB_ALIGN_OF(type) \ - offsetof( \ - struct { \ - char c; \ - type member; \ - }, \ - member) -#endif - -#ifdef _MSC_VER -// Some versions of our Windows compiler don't support the C11 syntax. -#define UPB_ALIGN_AS(x) __declspec(align(x)) -#elif defined(__GNUC__) -#define UPB_ALIGN_AS(x) __attribute__((aligned(x))) -#else -#define UPB_ALIGN_AS(x) _Alignas(x) -#endif - -// Hints to the compiler about likely/unlikely branches. -#if defined(__GNUC__) || defined(__clang__) -#define UPB_LIKELY(x) __builtin_expect((bool)(x), 1) -#define UPB_UNLIKELY(x) __builtin_expect((bool)(x), 0) -#else -#define UPB_LIKELY(x) (x) -#define UPB_UNLIKELY(x) (x) -#endif - -#ifdef __has_builtin -#if __has_builtin(__builtin_expect_with_probability) -#define UPB_UNPREDICTABLE(x) \ - __builtin_expect_with_probability((bool)(x), 1, 0.5) -#else -#define UPB_UNPREDICTABLE(x) (x) -#endif -#else -#define UPB_UNPREDICTABLE(x) (x) -#endif - -// Macros for function attributes on compilers that support them. -#if defined(__GNUC__) || defined(__clang__) -#define UPB_FORCEINLINE __inline__ __attribute__((always_inline)) static -#define UPB_NOINLINE __attribute__((noinline)) -#define UPB_NORETURN __attribute__((__noreturn__)) -#define UPB_PRINTF(str, first_vararg) \ - __attribute__((format(printf, str, first_vararg))) -#elif defined(_MSC_VER) -#define UPB_NOINLINE -#define UPB_FORCEINLINE static -#define UPB_NORETURN __declspec(noreturn) -#define UPB_PRINTF(str, first_vararg) -#else /* !defined(__GNUC__) */ -#define UPB_FORCEINLINE static -#define UPB_NOINLINE -#define UPB_NORETURN -#define UPB_PRINTF(str, first_vararg) -#endif - -#define UPB_MAX(x, y) ((x) > (y) ? (x) : (y)) -#define UPB_MIN(x, y) ((x) < (y) ? (x) : (y)) - -#define UPB_UNUSED(var) (void)var - -// UPB_ASSUME(): in release mode, we tell the compiler to assume this is true. -#ifdef NDEBUG -#ifdef __GNUC__ -#define UPB_ASSUME(expr) \ - if (!(expr)) __builtin_unreachable() -#elif defined _MSC_VER -#define UPB_ASSUME(expr) \ - if (!(expr)) __assume(0) -#else -#define UPB_ASSUME(expr) \ - do { \ - } while (false && (expr)) -#endif -#else -#define UPB_ASSUME(expr) assert(expr) -#endif - -/* UPB_ASSERT(): in release mode, we use the expression without letting it be - * evaluated. This prevents "unused variable" warnings. */ -#ifdef NDEBUG -#define UPB_ASSERT(expr) \ - do { \ - } while (false && (expr)) -#else -#define UPB_ASSERT(expr) assert(expr) -#endif - -#if defined(__GNUC__) || defined(__clang__) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __builtin_unreachable(); \ - } while (0) -#elif defined(_MSC_VER) -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - __assume(0); \ - } while (0) -#else -#define UPB_UNREACHABLE() \ - do { \ - assert(0); \ - } while (0) -#endif - -#ifdef __ANDROID__ -#define UPB_DEFAULT_MAX_BLOCK_SIZE 8192 -#else -#define UPB_DEFAULT_MAX_BLOCK_SIZE 32768 -#endif - -/* UPB_SETJMP() / UPB_LONGJMP() */ -// Android uses a custom libc that does not implement all of posix, but it has -// had sigsetjmp/siglongjmp forever on arm and since API 12 on x86. Apple has -// sigsetjmp, but does not define the posix feature test macro. -#if defined(__APPLE__) || defined(_POSIX_C_SOURCE) || defined(__ANDROID__) -// avoid setting/restoring signal mask, which involves costly syscalls -#define UPB_SETJMP(buf) sigsetjmp(buf, 0) -#define UPB_LONGJMP(buf, val) siglongjmp(buf, val) -#elif defined(WASM_WAMR) -#define UPB_SETJMP(buf) 0 -#define UPB_LONGJMP(buf, val) abort() -#else -#define UPB_SETJMP(buf) setjmp(buf) -#define UPB_LONGJMP(buf, val) longjmp(buf, val) -#endif - -#if ((__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)) -#define UPB_USE_C11_ATOMICS -#elif defined(__has_extension) -#if __has_extension(c_atomic) -#define UPB_USE_C11_ATOMICS -#endif -#elif defined(__GNUC__) -// GCC supported atomics as an extension before it supported __has_extension -#define UPB_USE_C11_ATOMICS -#elif defined(_MSC_VER) -#define UPB_USE_MSC_ATOMICS -#endif - -#if defined(UPB_USE_C11_ATOMICS) -#define UPB_ATOMIC(T) _Atomic(T) -#elif defined(UPB_USE_MSC_ATOMICS) -#define UPB_ATOMIC(T) volatile T -#else -#define UPB_ATOMIC(T) T -#endif - -/* UPB_PTRADD(ptr, ofs): add pointer while avoiding "NULL + 0" UB */ -#define UPB_PTRADD(ptr, ofs) ((ofs) ? (ptr) + (ofs) : (ptr)) - -#define UPB_PRIVATE(x) x##_dont_copy_me__upb_internal_use_only - -#ifdef UPB_ALLOW_PRIVATE_ACCESS__FOR_BITS_ONLY -#define UPB_ONLYBITS(x) x -#else -#define UPB_ONLYBITS(x) UPB_PRIVATE(x) -#endif - -/* Configure whether fasttable is switched on or not. *************************/ - -#ifdef __has_attribute -#define UPB_HAS_ATTRIBUTE(x) __has_attribute(x) -#else -#define UPB_HAS_ATTRIBUTE(x) 0 -#endif - -#if UPB_HAS_ATTRIBUTE(musttail) -#define UPB_MUSTTAIL __attribute__((musttail)) -#else -#define UPB_MUSTTAIL -#endif - -#undef UPB_HAS_ATTRIBUTE - -/* This check is not fully robust: it does not require that we have "musttail" - * support available. We need tail calls to avoid consuming arbitrary amounts - * of stack space. - * - * GCC/Clang can mostly be trusted to generate tail calls as long as - * optimization is enabled, but, debug builds will not generate tail calls - * unless "musttail" is available. - * - * We should probably either: - * 1. require that the compiler supports musttail. - * 2. add some fallback code for when musttail isn't available (ie. return - * instead of tail calling). This is safe and portable, but this comes at - * a CPU cost. - */ -#if (defined(__x86_64__) || defined(__aarch64__)) && defined(__GNUC__) -#define UPB_FASTTABLE_SUPPORTED 1 -#else -#define UPB_FASTTABLE_SUPPORTED 0 -#endif - -/* define UPB_ENABLE_FASTTABLE to force fast table support. - * This is useful when we want to ensure we are really getting fasttable, - * for example for testing or benchmarking. */ -#if defined(UPB_ENABLE_FASTTABLE) -#if !UPB_FASTTABLE_SUPPORTED -#error fasttable is x86-64/ARM64 only and requires GCC or Clang. -#endif -#define UPB_FASTTABLE 1 -/* Define UPB_TRY_ENABLE_FASTTABLE to use fasttable if possible. - * This is useful for releasing code that might be used on multiple platforms, - * for example the PHP or Ruby C extensions. */ -#elif defined(UPB_TRY_ENABLE_FASTTABLE) -#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED -#else -#define UPB_FASTTABLE 0 -#endif - -/* UPB_FASTTABLE_INIT() allows protos compiled for fasttable to gracefully - * degrade to non-fasttable if the runtime or platform do not support it. */ -#if !UPB_FASTTABLE -#define UPB_FASTTABLE_INIT(...) -#define UPB_FASTTABLE_MASK(mask) -1 -#else -#define UPB_FASTTABLE_INIT(...) __VA_ARGS__ -#define UPB_FASTTABLE_MASK(mask) mask -#endif - -#undef UPB_FASTTABLE_SUPPORTED - -/* ASAN poisoning (for arena). - * If using UPB from an interpreted language like Ruby, a build of the - * interpreter compiled with ASAN enabled must be used in order to get sane and - * expected behavior. - */ - -/* Due to preprocessor limitations, the conditional logic for setting - * UPB_CLANG_ASAN below cannot be consolidated into a portable one-liner. - * See https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html. - */ -#if defined(__has_feature) -#if __has_feature(address_sanitizer) -#define UPB_CLANG_ASAN 1 -#else -#define UPB_CLANG_ASAN 0 -#endif -#if __has_feature(thread_sanitizer) -#define UPB_CLANG_TSAN 1 -#else -#define UPB_CLANG_TSAN 0 -#endif -#else -#define UPB_CLANG_ASAN 0 -#define UPB_CLANG_TSAN 0 -#endif - -#if defined(__SANITIZE_ADDRESS__) || UPB_CLANG_ASAN -#define UPB_ASAN 1 -#define UPB_ASAN_GUARD_SIZE 32 -#ifdef __cplusplus - extern "C" { -#endif - void __asan_poison_memory_region(void const volatile *addr, size_t size); - void __asan_unpoison_memory_region(void const volatile *addr, size_t size); -#ifdef __cplusplus -} /* extern "C" */ -#endif -#define UPB_POISON_MEMORY_REGION(addr, size) \ - __asan_poison_memory_region((addr), (size)) -#define UPB_UNPOISON_MEMORY_REGION(addr, size) \ - __asan_unpoison_memory_region((addr), (size)) -#else -#define UPB_ASAN 0 -#define UPB_ASAN_GUARD_SIZE 0 -#define UPB_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) -#define UPB_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size)) -#endif - -#if defined(__SANITIZE_THREAD__) || UPB_CLANG_TSAN -#define UPB_TSAN_PUBLISHED_MEMBER uintptr_t upb_tsan_safely_published; -#define UPB_TSAN_INIT_PUBLISHED(ptr) (ptr)->upb_tsan_safely_published = 0x5AFE -#define UPB_TSAN_CHECK_PUBLISHED(ptr) \ - UPB_ASSERT((ptr)->upb_tsan_safely_published == 0x5AFE) -#define UPB_TSAN_PUBLISH 1 -#define UPB_TSAN_CHECK_READ(member) \ - __asm__ volatile("" ::"r"(*(char *)&(member))) -#define UPB_TSAN_CHECK_WRITE(member) \ - do { \ - char *write_upb_tsan_detect_race_ptr = (char *)&(member); \ - char write_upb_tsan_detect_race = *write_upb_tsan_detect_race_ptr; \ - __asm__ volatile("" : "+r"(write_upb_tsan_detect_race)); \ - *write_upb_tsan_detect_race_ptr = write_upb_tsan_detect_race; \ - } while (false) -#else -#define UPB_TSAN_PUBLISHED_MEMBER -#define UPB_TSAN_INIT_PUBLISHED(ptr) -#define UPB_TSAN_CHECK_PUBLISHED(ptr) \ - do { \ - } while (false && (ptr)) -#define UPB_TSAN_PUBLISH 0 -#define UPB_TSAN_CHECK_READ(member) \ - do { \ - } while (false && (member)) -#define UPB_TSAN_CHECK_WRITE(member) \ - do { \ - } while (false && (member)) -#endif - -/* Disable proto2 arena behavior (TEMPORARY) **********************************/ - -#ifdef UPB_DISABLE_CLOSED_ENUM_CHECKING -#define UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN 1 -#else -#define UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN 0 -#endif - -#if defined(__cplusplus) -#if defined(__clang__) || UPB_GNUC_MIN(6, 0) -// https://gcc.gnu.org/gcc-6/changes.html -#if __cplusplus >= 201402L -#define UPB_DEPRECATED [[deprecated]] -#else -#define UPB_DEPRECATED __attribute__((deprecated)) -#endif -#else -#define UPB_DEPRECATED -#endif -#else -#define UPB_DEPRECATED -#endif - -#if defined(UPB_IS_GOOGLE3) && \ - (!defined(UPB_BOOTSTRAP_STAGE) || UPB_BOOTSTRAP_STAGE != 0) -#define UPB_DESC(sym) proto2_##sym -#define UPB_DESC_MINITABLE(sym) &proto2__##sym##_msg_init -#elif defined(UPB_IS_GOOGLE3) && defined(UPB_BOOTSTRAP_STAGE) && \ - UPB_BOOTSTRAP_STAGE == 0 -#define UPB_DESC(sym) proto2_##sym -#define UPB_DESC_MINITABLE(sym) proto2__##sym##_msg_init() -#elif defined(UPB_BOOTSTRAP_STAGE) && UPB_BOOTSTRAP_STAGE == 0 -#define UPB_DESC(sym) google_protobuf_##sym -#define UPB_DESC_MINITABLE(sym) google__protobuf__##sym##_msg_init() -#else -#define UPB_DESC(sym) google_protobuf_##sym -#define UPB_DESC_MINITABLE(sym) &google__protobuf__##sym##_msg_init -#endif - -#undef UPB_IS_GOOGLE3 - -#ifdef __clang__ -#define UPB_NO_SANITIZE_ADDRESS __attribute__((no_sanitize("address"))) -#else -#define UPB_NO_SANITIZE_ADDRESS -#endif - -// Linker arrays combine elements from multiple translation units into a single -// array that can be iterated over at runtime. -// -// It is an alternative to pre-main "registration" functions. -// -// Usage: -// -// // In N translation units. -// UPB_LINKARR_APPEND(foo_array) static int elems[3] = {1, 2, 3}; -// -// // At runtime: -// UPB_LINKARR_DECLARE(foo_array, int); -// -// void f() { -// const int* start = UPB_LINKARR_START(foo_array); -// const int* stop = UPB_LINKARR_STOP(foo_array); -// for (const int* p = start; p < stop; p++) { -// // Windows can introduce zero padding, so we have to skip zeroes. -// if (*p != 0) { -// vec.push_back(*p); -// } -// } -// } - -#if defined(__ELF__) || defined(__wasm__) - -#define UPB_LINKARR_APPEND(name) \ - __attribute__((retain, used, \ - section("linkarr_" #name))) UPB_NO_SANITIZE_ADDRESS -#define UPB_LINKARR_DECLARE(name, type) \ - extern type __start_linkarr_##name; \ - extern type __stop_linkarr_##name; \ - UPB_LINKARR_APPEND(name) type UPB_linkarr_internal_empty_##name[1] -#define UPB_LINKARR_START(name) (&__start_linkarr_##name) -#define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) - -#elif defined(__MACH__) - -/* As described in: https://stackoverflow.com/a/22366882 */ -#define UPB_LINKARR_APPEND(name) \ - __attribute__((retain, used, \ - section("__DATA,__la_" #name))) UPB_NO_SANITIZE_ADDRESS -#define UPB_LINKARR_DECLARE(name, type) \ - extern type __start_linkarr_##name __asm( \ - "section$start$__DATA$__la_" #name); \ - extern type __stop_linkarr_##name __asm( \ - "section$end$__DATA$" \ - "__la_" #name); \ - UPB_LINKARR_APPEND(name) type UPB_linkarr_internal_empty_##name[1] -#define UPB_LINKARR_START(name) (&__start_linkarr_##name) -#define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) - -#elif defined(_MSC_VER) && defined(__clang__) - -/* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ - -// Usage of __attribute__ here probably means this is Clang-specific, and would -// not work on MSVC. -#define UPB_LINKARR_APPEND(name) \ - __declspec(allocate("la_" #name "$j")) \ - __attribute__((retain, used)) UPB_NO_SANITIZE_ADDRESS -#define UPB_LINKARR_DECLARE(name, type) \ - __declspec(allocate("la_" #name "$a")) type __start_linkarr_##name; \ - __declspec(allocate("la_" #name "$z")) type __stop_linkarr_##name; \ - UPB_LINKARR_APPEND(name) type UPB_linkarr_internal_empty_##name[1] = {0} -#define UPB_LINKARR_START(name) (&__start_linkarr_##name) -#define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) - -#else - -// Linker arrays are not supported on this platform. Make appends a no-op but -// don't define the other macros. -#define UPB_LINKARR_APPEND(name) - -#endif - -// Future versions of upb will include breaking changes to some APIs. -// This macro can be set to enable these API changes ahead of time, so that -// user code can be updated before upgrading versions of protobuf. -#ifdef UPB_FUTURE_BREAKING_CHANGES - -#endif - -#ifndef UPB_BASE_STATUS_H_ -#define UPB_BASE_STATUS_H_ - -#include - -// Must be last. - -#define _kUpb_Status_MaxMessage 511 - -typedef struct { - bool ok; - char msg[_kUpb_Status_MaxMessage]; // Error message; NULL-terminated. -} upb_Status; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API const char* upb_Status_ErrorMessage(const upb_Status* status); -UPB_API bool upb_Status_IsOk(const upb_Status* status); - -// These are no-op if |status| is NULL. -UPB_API void upb_Status_Clear(upb_Status* status); -void upb_Status_SetErrorMessage(upb_Status* status, const char* msg); -void upb_Status_SetErrorFormat(upb_Status* status, const char* fmt, ...) - UPB_PRINTF(2, 3); -void upb_Status_VSetErrorFormat(upb_Status* status, const char* fmt, - va_list args) UPB_PRINTF(2, 0); -void upb_Status_VAppendErrorFormat(upb_Status* status, const char* fmt, - va_list args) UPB_PRINTF(2, 0); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_BASE_STATUS_H_ */ - -#ifndef UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ -#define UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ - -#include - - -/* upb_Arena is a specific allocator implementation that uses arena allocation. - * The user provides an allocator that will be used to allocate the underlying - * arena blocks. Arenas by nature do not require the individual allocations - * to be freed. However the Arena does allow users to register cleanup - * functions that will run when the arena is destroyed. - * - * A upb_Arena is *not* thread-safe, although some functions related to its - * managing its lifetime are, and are documented as such. - * - * You could write a thread-safe arena allocator that satisfies the - * upb_alloc interface, but it would not be as efficient for the - * single-threaded case. */ - -#ifndef UPB_MEM_ARENA_H_ -#define UPB_MEM_ARENA_H_ - -#include -#include - - -#ifndef UPB_MEM_ALLOC_H_ -#define UPB_MEM_ALLOC_H_ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct upb_alloc upb_alloc; - -/* A combined `malloc()`/`free()` function. - * If `size` is 0 then the function acts like `free()`, otherwise it acts like - * `realloc()`. Only `oldsize` bytes from a previous allocation are - * preserved. */ -typedef void* upb_alloc_func(upb_alloc* alloc, void* ptr, size_t oldsize, - size_t size); - -/* A upb_alloc is a possibly-stateful allocator object. - * - * It could either be an arena allocator (which doesn't require individual - * `free()` calls) or a regular `malloc()` (which does). The client must - * therefore free memory unless it knows that the allocator is an arena - * allocator. */ -struct upb_alloc { - upb_alloc_func* func; -}; - -UPB_INLINE void* upb_malloc(upb_alloc* alloc, size_t size) { - UPB_ASSERT(alloc); - return alloc->func(alloc, NULL, 0, size); -} - -UPB_INLINE void* upb_realloc(upb_alloc* alloc, void* ptr, size_t oldsize, - size_t size) { - UPB_ASSERT(alloc); - return alloc->func(alloc, ptr, oldsize, size); -} - -UPB_INLINE void upb_free(upb_alloc* alloc, void* ptr) { - UPB_ASSERT(alloc); - alloc->func(alloc, ptr, 0, 0); -} - -UPB_INLINE void upb_free_sized(upb_alloc* alloc, void* ptr, size_t size) { - UPB_ASSERT(alloc); - alloc->func(alloc, ptr, size, 0); -} - -// The global allocator used by upb. Uses the standard malloc()/free(). - -extern upb_alloc upb_alloc_global; - -/* Functions that hard-code the global malloc. - * - * We still get benefit because we can put custom logic into our global - * allocator, like injecting out-of-memory faults in debug/testing builds. */ - -UPB_INLINE void* upb_gmalloc(size_t size) { - return upb_malloc(&upb_alloc_global, size); -} - -UPB_INLINE void* upb_grealloc(void* ptr, size_t oldsize, size_t size) { - return upb_realloc(&upb_alloc_global, ptr, oldsize, size); -} - -UPB_INLINE void upb_gfree(void* ptr) { upb_free(&upb_alloc_global, ptr); } - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MEM_ALLOC_H_ */ - -#ifndef UPB_MEM_INTERNAL_ARENA_H_ -#define UPB_MEM_INTERNAL_ARENA_H_ - -#include -#include -#include - -// Must be last. - -// This is QUITE an ugly hack, which specifies the number of pointers needed -// to equal (or exceed) the storage required for one upb_Arena. -// -// We need this because the decoder inlines a upb_Arena for performance but -// the full struct is not visible outside of arena.c. Yes, I know, it's awful. -#define UPB_ARENA_SIZE_HACK (9 + UPB_TSAN_PUBLISH) - -// LINT.IfChange(upb_Arena) - -struct upb_Arena { - char* UPB_ONLYBITS(ptr); - char* UPB_ONLYBITS(end); -}; - -// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/arena.ts:upb_Arena) - -#ifdef __cplusplus -extern "C" { -#endif - -void UPB_PRIVATE(_upb_Arena_SwapIn)(struct upb_Arena* des, - const struct upb_Arena* src); -void UPB_PRIVATE(_upb_Arena_SwapOut)(struct upb_Arena* des, - const struct upb_Arena* src); - -UPB_INLINE size_t UPB_PRIVATE(_upb_ArenaHas)(const struct upb_Arena* a) { - return (size_t)(a->UPB_ONLYBITS(end) - a->UPB_ONLYBITS(ptr)); -} - -UPB_API_INLINE void* upb_Arena_Malloc(struct upb_Arena* a, size_t size) { - UPB_TSAN_CHECK_WRITE(a->UPB_ONLYBITS(ptr)); - void* UPB_PRIVATE(_upb_Arena_SlowMalloc)(struct upb_Arena * a, size_t size); - - size = UPB_ALIGN_MALLOC(size); - const size_t span = size + UPB_ASAN_GUARD_SIZE; - if (UPB_UNLIKELY(UPB_PRIVATE(_upb_ArenaHas)(a) < span)) { - return UPB_PRIVATE(_upb_Arena_SlowMalloc)(a, span); - } - - // We have enough space to do a fast malloc. - void* ret = a->UPB_ONLYBITS(ptr); - UPB_ASSERT(UPB_ALIGN_MALLOC((uintptr_t)ret) == (uintptr_t)ret); - UPB_ASSERT(UPB_ALIGN_MALLOC(size) == size); - UPB_UNPOISON_MEMORY_REGION(ret, size); - - a->UPB_ONLYBITS(ptr) += span; - - return ret; -} - -UPB_API_INLINE void upb_Arena_ShrinkLast(struct upb_Arena* a, void* ptr, - size_t oldsize, size_t size) { - UPB_TSAN_CHECK_WRITE(a->UPB_ONLYBITS(ptr)); - UPB_ASSERT(ptr); - UPB_ASSERT(size <= oldsize); - size = UPB_ALIGN_MALLOC(size) + UPB_ASAN_GUARD_SIZE; - oldsize = UPB_ALIGN_MALLOC(oldsize) + UPB_ASAN_GUARD_SIZE; - if (size == oldsize) { - return; - } - char* arena_ptr = a->UPB_ONLYBITS(ptr); - // If it's the last alloc in the last block, we can resize. - if ((char*)ptr + oldsize == arena_ptr) { - a->UPB_ONLYBITS(ptr) = (char*)ptr + size; - } else { - // If not, verify that it could have been a full-block alloc that did not - // replace the last block. -#ifndef NDEBUG - bool _upb_Arena_WasLastAlloc(struct upb_Arena * a, void* ptr, - size_t oldsize); - UPB_ASSERT(_upb_Arena_WasLastAlloc(a, ptr, oldsize)); -#endif - } - UPB_POISON_MEMORY_REGION((char*)ptr + (size - UPB_ASAN_GUARD_SIZE), - oldsize - size); -} - -UPB_API_INLINE bool upb_Arena_TryExtend(struct upb_Arena* a, void* ptr, - size_t oldsize, size_t size) { - UPB_TSAN_CHECK_WRITE(a->UPB_ONLYBITS(ptr)); - UPB_ASSERT(ptr); - UPB_ASSERT(size > oldsize); - size = UPB_ALIGN_MALLOC(size) + UPB_ASAN_GUARD_SIZE; - oldsize = UPB_ALIGN_MALLOC(oldsize) + UPB_ASAN_GUARD_SIZE; - if (size == oldsize) { - return true; - } - size_t extend = size - oldsize; - if ((char*)ptr + oldsize == a->UPB_ONLYBITS(ptr) && - UPB_PRIVATE(_upb_ArenaHas)(a) >= extend) { - a->UPB_ONLYBITS(ptr) += extend; - UPB_UNPOISON_MEMORY_REGION((char*)ptr + (oldsize - UPB_ASAN_GUARD_SIZE), - extend); - return true; - } - return false; -} - -UPB_API_INLINE void* upb_Arena_Realloc(struct upb_Arena* a, void* ptr, - size_t oldsize, size_t size) { - UPB_TSAN_CHECK_WRITE(a->UPB_ONLYBITS(ptr)); - if (ptr) { - if (size == oldsize) { - return ptr; - } - if (size > oldsize) { - if (upb_Arena_TryExtend(a, ptr, oldsize, size)) return ptr; - } else { - if ((char*)ptr + (UPB_ALIGN_MALLOC(oldsize) + UPB_ASAN_GUARD_SIZE) == - a->UPB_ONLYBITS(ptr)) { - upb_Arena_ShrinkLast(a, ptr, oldsize, size); - } else { - UPB_POISON_MEMORY_REGION((char*)ptr + size, oldsize - size); - } - return ptr; - } - } - void* ret = upb_Arena_Malloc(a, size); - - if (ret && oldsize > 0) { - memcpy(ret, ptr, UPB_MIN(oldsize, size)); - UPB_POISON_MEMORY_REGION(ptr, oldsize); - } - - return ret; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MEM_INTERNAL_ARENA_H_ */ - -// Must be last. - -typedef struct upb_Arena upb_Arena; - -typedef void upb_AllocCleanupFunc(upb_alloc* alloc); - -#ifdef __cplusplus -extern "C" { -#endif - -// Creates an arena from the given initial block (if any -- mem may be NULL). If -// an initial block is specified, the arena's lifetime cannot be extended by -// |upb_Arena_IncRefFor| or |upb_Arena_Fuse|. Additional blocks will be -// allocated from |alloc|. If |alloc| is NULL, this is a fixed-size arena and -// cannot grow. If an initial block is specified, |n| is its length; if there is -// no initial block, |n| is a hint of the size that should be allocated for the -// first block of the arena, such that `upb_Arena_Malloc(hint)` will not require -// another call to |alloc|. -UPB_API upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc); - -UPB_API void upb_Arena_Free(upb_Arena* a); -// Sets the cleanup function for the upb_alloc used by the arena. Only one -// cleanup function can be set, which will be called after all blocks are -// freed. -UPB_API void upb_Arena_SetAllocCleanup(upb_Arena* a, - upb_AllocCleanupFunc* func); - -// Fuses the lifetime of two arenas, such that no arenas that have been -// transitively fused together will be freed until all of them have reached a -// zero refcount. This operation is safe to use concurrently from multiple -// threads. -UPB_API bool upb_Arena_Fuse(const upb_Arena* a, const upb_Arena* b); - -// This operation is safe to use concurrently from multiple threads. -UPB_API bool upb_Arena_IsFused(const upb_Arena* a, const upb_Arena* b); - -// Returns the upb_alloc used by the arena. -UPB_API upb_alloc* upb_Arena_GetUpbAlloc(upb_Arena* a); - -// This operation is safe to use concurrently from multiple threads. -bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner); -// This operation is safe to use concurrently from multiple threads. -void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner); - -// This operation is safe to use concurrently from multiple threads. -uintptr_t upb_Arena_SpaceAllocated(const upb_Arena* a, size_t* fused_count); -// This operation is safe to use concurrently from multiple threads. -uint32_t upb_Arena_DebugRefCount(const upb_Arena* a); - -UPB_API_INLINE upb_Arena* upb_Arena_New(void) { - return upb_Arena_Init(NULL, 0, &upb_alloc_global); -} - -UPB_API_INLINE upb_Arena* upb_Arena_NewSized(size_t size_hint) { - return upb_Arena_Init(NULL, size_hint, &upb_alloc_global); -} - -UPB_API_INLINE void* upb_Arena_Malloc(struct upb_Arena* a, size_t size); - -UPB_API_INLINE void* upb_Arena_Realloc(upb_Arena* a, void* ptr, size_t oldsize, - size_t size); - -static const size_t UPB_PRIVATE(kUpbDefaultMaxBlockSize) = - UPB_DEFAULT_MAX_BLOCK_SIZE; - -// Sets the maximum block size for all arenas. This is a global configuration -// setting that will affect all existing and future arenas. If -// upb_Arena_Malloc() is called with a size larger than this, we will exceed -// this size and allocate a larger block. -// -// This API is meant for experimentation only. It will likely be removed in -// the future. -// This operation is safe to use concurrently from multiple threads. -void upb_Arena_SetMaxBlockSize(size_t max); - -// Shrinks the last alloc from arena. -// REQUIRES: (ptr, oldsize) was the last malloc/realloc from this arena. -// We could also add a upb_Arena_TryShrinkLast() which is simply a no-op if -// this was not the last alloc. -UPB_API_INLINE void upb_Arena_ShrinkLast(upb_Arena* a, void* ptr, - size_t oldsize, size_t size); - -// Attempts to extend the given alloc from arena, in place. Is generally -// only likely to succeed for the most recent allocation from this arena. If it -// succeeds, returns true and `ptr`'s allocation is now `size` rather than -// `oldsize`. Returns false if the allocation cannot be extended; `ptr`'s -// allocation is unmodified. See also upb_Arena_Realloc. -// REQUIRES: `size > oldsize`; to shrink, use `upb_Arena_Realloc` or -// `upb_Arena_ShrinkLast`. -UPB_API_INLINE bool upb_Arena_TryExtend(upb_Arena* a, void* ptr, size_t oldsize, - size_t size); - -#ifdef UPB_TRACING_ENABLED -void upb_Arena_SetTraceHandler(void (*initArenaTraceHandler)(const upb_Arena*, - size_t size), - void (*fuseArenaTraceHandler)(const upb_Arena*, - const upb_Arena*), - void (*freeArenaTraceHandler)(const upb_Arena*)); -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MEM_ARENA_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// The maximum number of bytes a single protobuf field can take up in the -// wire format. We only want to do one bounds check per field, so the input -// stream guarantees that after upb_EpsCopyInputStream_IsDone() is called, -// the decoder can read this many bytes without performing another bounds -// check. The stream will copy into a patch buffer as necessary to guarantee -// this invariant. -#define kUpb_EpsCopyInputStream_SlopBytes 16 - -typedef struct { - const char* end; // Can read up to SlopBytes bytes beyond this. - const char* limit_ptr; // For bounds checks, = end + UPB_MIN(limit, 0) - uintptr_t input_delta; // Diff between the original input pointer and patch - int limit; // Submessage limit relative to end - bool error; // To distinguish between EOF and error. - bool aliasing; - char patch[kUpb_EpsCopyInputStream_SlopBytes * 2]; -} upb_EpsCopyInputStream; - -// Returns true if the stream is in the error state. A stream enters the error -// state when the user reads past a limit (caught in IsDone()) or the -// ZeroCopyInputStream returns an error. -UPB_INLINE bool upb_EpsCopyInputStream_IsError(upb_EpsCopyInputStream* e) { - return e->error; -} - -typedef const char* upb_EpsCopyInputStream_BufferFlipCallback( - upb_EpsCopyInputStream* e, const char* old_end, const char* new_start); - -typedef const char* upb_EpsCopyInputStream_IsDoneFallbackFunc( - upb_EpsCopyInputStream* e, const char* ptr, int overrun); - -// Initializes a upb_EpsCopyInputStream using the contents of the buffer -// [*ptr, size]. Updates `*ptr` as necessary to guarantee that at least -// kUpb_EpsCopyInputStream_SlopBytes are available to read. -UPB_INLINE void upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e, - const char** ptr, size_t size, - bool enable_aliasing) { - if (size <= kUpb_EpsCopyInputStream_SlopBytes) { - memset(&e->patch, 0, 32); - if (size) memcpy(&e->patch, *ptr, size); - e->input_delta = (uintptr_t)*ptr - (uintptr_t)e->patch; - *ptr = e->patch; - e->end = *ptr + size; - e->limit = 0; - } else { - e->end = *ptr + size - kUpb_EpsCopyInputStream_SlopBytes; - e->limit = kUpb_EpsCopyInputStream_SlopBytes; - e->input_delta = 0; - } - e->aliasing = enable_aliasing; - e->limit_ptr = e->end; - e->error = false; -} - -typedef enum { - // The current stream position is at a limit. - kUpb_IsDoneStatus_Done, - - // The current stream position is not at a limit. - kUpb_IsDoneStatus_NotDone, - - // The current stream position is not at a limit, and the stream needs to - // be flipped to a new buffer before more data can be read. - kUpb_IsDoneStatus_NeedFallback, -} upb_IsDoneStatus; - -// Returns the status of the current stream position. This is a low-level -// function, it is simpler to call upb_EpsCopyInputStream_IsDone() if possible. -UPB_INLINE upb_IsDoneStatus upb_EpsCopyInputStream_IsDoneStatus( - upb_EpsCopyInputStream* e, const char* ptr, int* overrun) { - *overrun = ptr - e->end; - if (UPB_LIKELY(ptr < e->limit_ptr)) { - return kUpb_IsDoneStatus_NotDone; - } else if (UPB_LIKELY(*overrun == e->limit)) { - return kUpb_IsDoneStatus_Done; - } else { - return kUpb_IsDoneStatus_NeedFallback; - } -} - -// Returns true if the stream has hit a limit, either the current delimited -// limit or the overall end-of-stream. As a side effect, this function may flip -// the pointer to a new buffer if there are less than -// kUpb_EpsCopyInputStream_SlopBytes of data to be read in the current buffer. -// -// Postcondition: if the function returns false, there are at least -// kUpb_EpsCopyInputStream_SlopBytes of data available to read at *ptr. -UPB_INLINE bool upb_EpsCopyInputStream_IsDoneWithCallback( - upb_EpsCopyInputStream* e, const char** ptr, - upb_EpsCopyInputStream_IsDoneFallbackFunc* func) { - int overrun; - switch (upb_EpsCopyInputStream_IsDoneStatus(e, *ptr, &overrun)) { - case kUpb_IsDoneStatus_Done: - return true; - case kUpb_IsDoneStatus_NotDone: - return false; - case kUpb_IsDoneStatus_NeedFallback: - *ptr = func(e, *ptr, overrun); - return *ptr == NULL; - } - UPB_UNREACHABLE(); -} - -const char* _upb_EpsCopyInputStream_IsDoneFallbackNoCallback( - upb_EpsCopyInputStream* e, const char* ptr, int overrun); - -// A simpler version of IsDoneWithCallback() that does not support a buffer flip -// callback. Useful in cases where we do not need to insert custom logic at -// every buffer flip. -// -// If this returns true, the user must call upb_EpsCopyInputStream_IsError() -// to distinguish between EOF and error. -UPB_INLINE bool upb_EpsCopyInputStream_IsDone(upb_EpsCopyInputStream* e, - const char** ptr) { - return upb_EpsCopyInputStream_IsDoneWithCallback( - e, ptr, _upb_EpsCopyInputStream_IsDoneFallbackNoCallback); -} - -// Returns the total number of bytes that are safe to read from the current -// buffer without reading uninitialized or unallocated memory. -// -// Note that this check does not respect any semantic limits on the stream, -// either limits from PushLimit() or the overall stream end, so some of these -// bytes may have unpredictable, nonsense values in them. The guarantee is only -// that the bytes are valid to read from the perspective of the C language -// (ie. you can read without triggering UBSAN or ASAN). -UPB_INLINE size_t upb_EpsCopyInputStream_BytesAvailable( - upb_EpsCopyInputStream* e, const char* ptr) { - return (e->end - ptr) + kUpb_EpsCopyInputStream_SlopBytes; -} - -// Returns true if the given delimited field size is valid (it does not extend -// beyond any previously-pushed limits). `ptr` should point to the beginning -// of the field data, after the delimited size. -// -// Note that this does *not* guarantee that all of the data for this field is in -// the current buffer. -UPB_INLINE bool upb_EpsCopyInputStream_CheckSize( - const upb_EpsCopyInputStream* e, const char* ptr, int size) { - UPB_ASSERT(size >= 0); - return ptr - e->end + size <= e->limit; -} - -UPB_INLINE bool _upb_EpsCopyInputStream_CheckSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size, bool submessage) { - // This is one extra branch compared to the more normal: - // return (size_t)(end - ptr) < size; - // However it is one less computation if we are just about to use "ptr + len": - // https://godbolt.org/z/35YGPz - // In microbenchmarks this shows a small improvement. - uintptr_t uptr = (uintptr_t)ptr; - uintptr_t uend = (uintptr_t)e->limit_ptr; - uintptr_t res = uptr + (size_t)size; - if (!submessage) uend += kUpb_EpsCopyInputStream_SlopBytes; - // NOTE: this check depends on having a linear address space. This is not - // technically guaranteed by uintptr_t. - bool ret = res >= uptr && res <= uend; - if (size < 0) UPB_ASSERT(!ret); - return ret; -} - -// Returns true if the given delimited field size is valid (it does not extend -// beyond any previously-pushed limited) *and* all of the data for this field is -// available to be read in the current buffer. -// -// If the size is negative, this function will always return false. This -// property can be useful in some cases. -UPB_INLINE bool upb_EpsCopyInputStream_CheckDataSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size) { - return _upb_EpsCopyInputStream_CheckSizeAvailable(e, ptr, size, false); -} - -// Returns true if the given sub-message size is valid (it does not extend -// beyond any previously-pushed limited) *and* all of the data for this -// sub-message is available to be parsed in the current buffer. -// -// This implies that all fields from the sub-message can be parsed from the -// current buffer while maintaining the invariant that we always have at least -// kUpb_EpsCopyInputStream_SlopBytes of data available past the beginning of -// any individual field start. -// -// If the size is negative, this function will always return false. This -// property can be useful in some cases. -UPB_INLINE bool upb_EpsCopyInputStream_CheckSubMessageSizeAvailable( - upb_EpsCopyInputStream* e, const char* ptr, int size) { - return _upb_EpsCopyInputStream_CheckSizeAvailable(e, ptr, size, true); -} - -// Returns true if aliasing_enabled=true was passed to -// upb_EpsCopyInputStream_Init() when this stream was initialized. -UPB_INLINE bool upb_EpsCopyInputStream_AliasingEnabled( - upb_EpsCopyInputStream* e) { - return e->aliasing; -} - -// Returns true if aliasing_enabled=true was passed to -// upb_EpsCopyInputStream_Init() when this stream was initialized *and* we can -// alias into the region [ptr, size] in an input buffer. -UPB_INLINE bool upb_EpsCopyInputStream_AliasingAvailable( - upb_EpsCopyInputStream* e, const char* ptr, size_t size) { - // When EpsCopyInputStream supports streaming, this will need to become a - // runtime check. - return e->aliasing && - upb_EpsCopyInputStream_CheckDataSizeAvailable(e, ptr, size); -} - -// Returns a pointer into an input buffer that corresponds to the parsing -// pointer `ptr`. The returned pointer may be the same as `ptr`, but also may -// be different if we are currently parsing out of the patch buffer. -UPB_INLINE const char* upb_EpsCopyInputStream_GetInputPtr( - upb_EpsCopyInputStream* e, const char* ptr) { - return (const char*)(((uintptr_t)ptr) + e->input_delta); -} - -// Returns a pointer into an input buffer that corresponds to the parsing -// pointer `ptr`. The returned pointer may be the same as `ptr`, but also may -// be different if we are currently parsing out of the patch buffer. -// -// REQUIRES: Aliasing must be available for the given pointer. If the input is a -// flat buffer and aliasing is enabled, then aliasing will always be available. -UPB_INLINE const char* upb_EpsCopyInputStream_GetAliasedPtr( - upb_EpsCopyInputStream* e, const char* ptr) { - UPB_ASSUME(upb_EpsCopyInputStream_AliasingAvailable(e, ptr, 0)); - return upb_EpsCopyInputStream_GetInputPtr(e, ptr); -} - -// Reads string data from the input, aliasing into the input buffer instead of -// copying. The parsing pointer is passed in `*ptr`, and will be updated if -// necessary to point to the actual input buffer. Returns the new parsing -// pointer, which will be advanced past the string data. -// -// REQUIRES: Aliasing must be available for this data region (test with -// upb_EpsCopyInputStream_AliasingAvailable(). -UPB_INLINE const char* upb_EpsCopyInputStream_ReadStringAliased( - upb_EpsCopyInputStream* e, const char** ptr, size_t size) { - UPB_ASSUME(upb_EpsCopyInputStream_AliasingAvailable(e, *ptr, size)); - const char* ret = *ptr + size; - *ptr = upb_EpsCopyInputStream_GetAliasedPtr(e, *ptr); - UPB_ASSUME(ret != NULL); - return ret; -} - -// Skips `size` bytes of data from the input and returns a pointer past the end. -// Returns NULL on end of stream or error. -UPB_INLINE const char* upb_EpsCopyInputStream_Skip(upb_EpsCopyInputStream* e, - const char* ptr, int size) { - if (!upb_EpsCopyInputStream_CheckDataSizeAvailable(e, ptr, size)) return NULL; - return ptr + size; -} - -// Copies `size` bytes of data from the input `ptr` into the buffer `to`, and -// returns a pointer past the end. Returns NULL on end of stream or error. -UPB_INLINE const char* upb_EpsCopyInputStream_Copy(upb_EpsCopyInputStream* e, - const char* ptr, void* to, - int size) { - if (!upb_EpsCopyInputStream_CheckDataSizeAvailable(e, ptr, size)) return NULL; - memcpy(to, ptr, size); - return ptr + size; -} - -// Reads string data from the stream and advances the pointer accordingly. -// If aliasing was enabled when the stream was initialized, then the returned -// pointer will point into the input buffer if possible, otherwise new data -// will be allocated from arena and copied into. We may be forced to copy even -// if aliasing was enabled if the input data spans input buffers. -// -// Returns NULL if memory allocation failed, or we reached a premature EOF. -UPB_INLINE const char* upb_EpsCopyInputStream_ReadString( - upb_EpsCopyInputStream* e, const char** ptr, size_t size, - upb_Arena* arena) { - if (upb_EpsCopyInputStream_AliasingAvailable(e, *ptr, size)) { - return upb_EpsCopyInputStream_ReadStringAliased(e, ptr, size); - } else { - // We need to allocate and copy. - if (!upb_EpsCopyInputStream_CheckDataSizeAvailable(e, *ptr, size)) { - return NULL; - } - UPB_ASSERT(arena); - char* data = (char*)upb_Arena_Malloc(arena, size); - if (!data) return NULL; - const char* ret = upb_EpsCopyInputStream_Copy(e, *ptr, data, size); - *ptr = data; - return ret; - } -} - -UPB_INLINE void _upb_EpsCopyInputStream_CheckLimit(upb_EpsCopyInputStream* e) { - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); -} - -// Pushes a limit onto the stack of limits for the current stream. The limit -// will extend for `size` bytes beyond the position in `ptr`. Future calls to -// upb_EpsCopyInputStream_IsDone() will return `true` when the stream position -// reaches this limit. -// -// Returns a delta that the caller must store and supply to PopLimit() below. -UPB_INLINE int upb_EpsCopyInputStream_PushLimit(upb_EpsCopyInputStream* e, - const char* ptr, int size) { - int limit = size + (int)(ptr - e->end); - int delta = e->limit - limit; - _upb_EpsCopyInputStream_CheckLimit(e); - UPB_ASSERT(limit <= e->limit); - e->limit = limit; - e->limit_ptr = e->end + UPB_MIN(0, limit); - _upb_EpsCopyInputStream_CheckLimit(e); - return delta; -} - -// Pops the last limit that was pushed on this stream. This may only be called -// once IsDone() returns true. The user must pass the delta that was returned -// from PushLimit(). -UPB_INLINE void upb_EpsCopyInputStream_PopLimit(upb_EpsCopyInputStream* e, - const char* ptr, - int saved_delta) { - UPB_ASSERT(ptr - e->end == e->limit); - _upb_EpsCopyInputStream_CheckLimit(e); - e->limit += saved_delta; - e->limit_ptr = e->end + UPB_MIN(0, e->limit); - _upb_EpsCopyInputStream_CheckLimit(e); -} - -UPB_INLINE const char* _upb_EpsCopyInputStream_IsDoneFallbackInline( - upb_EpsCopyInputStream* e, const char* ptr, int overrun, - upb_EpsCopyInputStream_BufferFlipCallback* callback) { - if (overrun < e->limit) { - // Need to copy remaining data into patch buffer. - UPB_ASSERT(overrun < kUpb_EpsCopyInputStream_SlopBytes); - const char* old_end = ptr; - const char* new_start = &e->patch[0] + overrun; - memset(e->patch + kUpb_EpsCopyInputStream_SlopBytes, 0, - kUpb_EpsCopyInputStream_SlopBytes); - memcpy(e->patch, e->end, kUpb_EpsCopyInputStream_SlopBytes); - ptr = new_start; - e->end = &e->patch[kUpb_EpsCopyInputStream_SlopBytes]; - e->limit -= kUpb_EpsCopyInputStream_SlopBytes; - e->limit_ptr = e->end + e->limit; - UPB_ASSERT(ptr < e->limit_ptr); - e->input_delta = (uintptr_t)old_end - (uintptr_t)new_start; - return callback(e, old_end, new_start); - } else { - UPB_ASSERT(overrun > e->limit); - e->error = true; - return callback(e, NULL, NULL); - } -} - -typedef const char* upb_EpsCopyInputStream_ParseDelimitedFunc( - upb_EpsCopyInputStream* e, const char* ptr, void* ctx); - -// Tries to perform a fast-path handling of the given delimited message data. -// If the sub-message beginning at `*ptr` and extending for `len` is short and -// fits within this buffer, calls `func` with `ctx` as a parameter, where the -// pushing and popping of limits is handled automatically and with lower cost -// than the normal PushLimit()/PopLimit() sequence. -UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast( - upb_EpsCopyInputStream* e, const char** ptr, int len, - upb_EpsCopyInputStream_ParseDelimitedFunc* func, void* ctx) { - if (!upb_EpsCopyInputStream_CheckSubMessageSizeAvailable(e, *ptr, len)) { - return false; - } - - // Fast case: Sub-message is <128 bytes and fits in the current buffer. - // This means we can preserve limit/limit_ptr verbatim. - const char* saved_limit_ptr = e->limit_ptr; - int saved_limit = e->limit; - e->limit_ptr = *ptr + len; - e->limit = e->limit_ptr - e->end; - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); - *ptr = func(e, *ptr, ctx); - e->limit_ptr = saved_limit_ptr; - e->limit = saved_limit; - UPB_ASSERT(e->limit_ptr == e->end + UPB_MIN(0, e->limit)); - return true; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_WIRE_EPS_COPY_INPUT_STREAM_H_ - -#ifndef UPB_JSON_DECODE_H_ -#define UPB_JSON_DECODE_H_ - -#include - - -// Public APIs for message operations that do not depend on the schema. -// -// MiniTable-based accessors live in accessors.h. - -#ifndef UPB_MESSAGE_MESSAGE_H_ -#define UPB_MESSAGE_MESSAGE_H_ - -#include -#include - -#ifndef UPB_BASE_STRING_VIEW_H_ -#define UPB_BASE_STRING_VIEW_H_ - -#include - -// Must be last. - -#define UPB_STRINGVIEW_INIT(ptr, len) \ - { ptr, len } - -#define UPB_STRINGVIEW_FORMAT "%.*s" -#define UPB_STRINGVIEW_ARGS(view) (int)(view).size, (view).data - -// LINT.IfChange(struct_definition) -typedef struct { - const char* data; - size_t size; -} upb_StringView; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE upb_StringView upb_StringView_FromDataAndSize(const char* data, - size_t size) { - upb_StringView ret; - ret.data = data; - ret.size = size; - return ret; -} - -UPB_INLINE upb_StringView upb_StringView_FromString(const char* data) { - return upb_StringView_FromDataAndSize(data, strlen(data)); -} - -UPB_INLINE bool upb_StringView_IsEqual(upb_StringView a, upb_StringView b) { - return (a.size == b.size) && (!a.size || !memcmp(a.data, b.data, a.size)); -} - -// Compares StringViews following strcmp rules. -// Please note this comparison is neither unicode nor locale aware. -UPB_INLINE int upb_StringView_Compare(upb_StringView a, upb_StringView b) { - int result = memcmp(a.data, b.data, UPB_MIN(a.size, b.size)); - if (result == 0) { - return a.size - b.size; - } - return result; -} - -// LINT.ThenChange( -// GoogleInternalName1, -// //depot/google3/third_party/upb/bits/golang/accessor.go:map_go_string, -// //depot/google3/third_party/upb/bits/typescript/string_view.ts -// ) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_BASE_STRING_VIEW_H_ */ - -#ifndef UPB_MESSAGE_ARRAY_H_ -#define UPB_MESSAGE_ARRAY_H_ - -#include - - -#ifndef UPB_BASE_DESCRIPTOR_CONSTANTS_H_ -#define UPB_BASE_DESCRIPTOR_CONSTANTS_H_ - -// Must be last. - -// The types a field can have. Note that this list is not identical to the -// types defined in descriptor.proto, which gives INT32 and SINT32 separate -// types (we distinguish the two with the "integer encoding" enum below). -// This enum is an internal convenience only and has no meaning outside of upb. -typedef enum { - kUpb_CType_Bool = 1, - kUpb_CType_Float = 2, - kUpb_CType_Int32 = 3, - kUpb_CType_UInt32 = 4, - kUpb_CType_Enum = 5, // Enum values are int32. TODO: rename - kUpb_CType_Message = 6, - kUpb_CType_Double = 7, - kUpb_CType_Int64 = 8, - kUpb_CType_UInt64 = 9, - kUpb_CType_String = 10, - kUpb_CType_Bytes = 11 -} upb_CType; - -// The repeated-ness of each field; this matches descriptor.proto. -typedef enum { - kUpb_Label_Optional = 1, - kUpb_Label_Required = 2, - kUpb_Label_Repeated = 3 -} upb_Label; - -// Descriptor types, as defined in descriptor.proto. -typedef enum { - kUpb_FieldType_Double = 1, - kUpb_FieldType_Float = 2, - kUpb_FieldType_Int64 = 3, - kUpb_FieldType_UInt64 = 4, - kUpb_FieldType_Int32 = 5, - kUpb_FieldType_Fixed64 = 6, - kUpb_FieldType_Fixed32 = 7, - kUpb_FieldType_Bool = 8, - kUpb_FieldType_String = 9, - kUpb_FieldType_Group = 10, - kUpb_FieldType_Message = 11, - kUpb_FieldType_Bytes = 12, - kUpb_FieldType_UInt32 = 13, - kUpb_FieldType_Enum = 14, - kUpb_FieldType_SFixed32 = 15, - kUpb_FieldType_SFixed64 = 16, - kUpb_FieldType_SInt32 = 17, - kUpb_FieldType_SInt64 = 18, -} upb_FieldType; - -#define kUpb_FieldType_SizeOf 19 - -#ifdef __cplusplus -extern "C" { -#endif - -// Convert from upb_FieldType to upb_CType -UPB_INLINE upb_CType upb_FieldType_CType(upb_FieldType field_type) { - static const upb_CType c_type[] = { - kUpb_CType_Double, // kUpb_FieldType_Double - kUpb_CType_Float, // kUpb_FieldType_Float - kUpb_CType_Int64, // kUpb_FieldType_Int64 - kUpb_CType_UInt64, // kUpb_FieldType_UInt64 - kUpb_CType_Int32, // kUpb_FieldType_Int32 - kUpb_CType_UInt64, // kUpb_FieldType_Fixed64 - kUpb_CType_UInt32, // kUpb_FieldType_Fixed32 - kUpb_CType_Bool, // kUpb_FieldType_Bool - kUpb_CType_String, // kUpb_FieldType_String - kUpb_CType_Message, // kUpb_FieldType_Group - kUpb_CType_Message, // kUpb_FieldType_Message - kUpb_CType_Bytes, // kUpb_FieldType_Bytes - kUpb_CType_UInt32, // kUpb_FieldType_UInt32 - kUpb_CType_Enum, // kUpb_FieldType_Enum - kUpb_CType_Int32, // kUpb_FieldType_SFixed32 - kUpb_CType_Int64, // kUpb_FieldType_SFixed64 - kUpb_CType_Int32, // kUpb_FieldType_SInt32 - kUpb_CType_Int64, // kUpb_FieldType_SInt64 - }; - - // -1 here because the enum is one-based but the table is zero-based. - return c_type[field_type - 1]; -} - -UPB_INLINE bool upb_FieldType_IsPackable(upb_FieldType field_type) { - // clang-format off - const unsigned kUnpackableTypes = - (1 << kUpb_FieldType_String) | - (1 << kUpb_FieldType_Bytes) | - (1 << kUpb_FieldType_Message) | - (1 << kUpb_FieldType_Group); - // clang-format on - return (1 << field_type) & ~kUnpackableTypes; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_BASE_DESCRIPTOR_CONSTANTS_H_ */ - -#ifndef UPB_MESSAGE_INTERNAL_ARRAY_H_ -#define UPB_MESSAGE_INTERNAL_ARRAY_H_ - -#include -#include - - -// Must be last. - -#define _UPB_ARRAY_MASK_IMM 0x4 // Frozen/immutable bit. -#define _UPB_ARRAY_MASK_LG2 0x3 // Encoded elem size. -#define _UPB_ARRAY_MASK_ALL (_UPB_ARRAY_MASK_IMM | _UPB_ARRAY_MASK_LG2) - -#ifdef __cplusplus -extern "C" { -#endif - -// LINT.IfChange(upb_Array) - -// Our internal representation for repeated fields. -struct upb_Array { - // This is a tagged pointer. Bits #0 and #1 encode the elem size as follows: - // 0 maps to elem size 1 - // 1 maps to elem size 4 - // 2 maps to elem size 8 - // 3 maps to elem size 16 - // - // Bit #2 contains the frozen/immutable flag. - uintptr_t UPB_ONLYBITS(data); - - size_t UPB_ONLYBITS(size); // The number of elements in the array. - size_t UPB_PRIVATE(capacity); // Allocated storage. Measured in elements. -}; - -UPB_INLINE void UPB_PRIVATE(_upb_Array_ShallowFreeze)(struct upb_Array* arr) { - arr->UPB_ONLYBITS(data) |= _UPB_ARRAY_MASK_IMM; -} - -UPB_API_INLINE bool upb_Array_IsFrozen(const struct upb_Array* arr) { - return (arr->UPB_ONLYBITS(data) & _UPB_ARRAY_MASK_IMM) != 0; -} - -UPB_INLINE void UPB_PRIVATE(_upb_Array_SetTaggedPtr)(struct upb_Array* array, - void* data, size_t lg2) { - UPB_ASSERT(lg2 != 1); - UPB_ASSERT(lg2 <= 4); - const size_t bits = lg2 - (lg2 != 0); - array->UPB_ONLYBITS(data) = (uintptr_t)data | bits; -} - -UPB_INLINE size_t -UPB_PRIVATE(_upb_Array_ElemSizeLg2)(const struct upb_Array* array) { - const size_t bits = array->UPB_ONLYBITS(data) & _UPB_ARRAY_MASK_LG2; - const size_t lg2 = bits + (bits != 0); - return lg2; -} - -UPB_API_INLINE const void* upb_Array_DataPtr(const struct upb_Array* array) { - UPB_PRIVATE(_upb_Array_ElemSizeLg2)(array); // Check assertions. - return (void*)(array->UPB_ONLYBITS(data) & ~(uintptr_t)_UPB_ARRAY_MASK_ALL); -} - -UPB_API_INLINE void* upb_Array_MutableDataPtr(struct upb_Array* array) { - return (void*)upb_Array_DataPtr(array); -} - -UPB_INLINE struct upb_Array* UPB_PRIVATE(_upb_Array_New)(upb_Arena* arena, - size_t init_capacity, - int elem_size_lg2) { - UPB_ASSERT(elem_size_lg2 != 1); - UPB_ASSERT(elem_size_lg2 <= 4); - const size_t array_size = - UPB_ALIGN_UP(sizeof(struct upb_Array), UPB_MALLOC_ALIGN); - const size_t bytes = array_size + (init_capacity << elem_size_lg2); - struct upb_Array* array = (struct upb_Array*)upb_Arena_Malloc(arena, bytes); - if (!array) return NULL; - UPB_PRIVATE(_upb_Array_SetTaggedPtr) - (array, UPB_PTR_AT(array, array_size, void), elem_size_lg2); - array->UPB_ONLYBITS(size) = 0; - array->UPB_PRIVATE(capacity) = init_capacity; - return array; -} - -// Resizes the capacity of the array to be at least min_size. -bool UPB_PRIVATE(_upb_Array_Realloc)(struct upb_Array* array, size_t min_size, - upb_Arena* arena); - -UPB_API_INLINE bool upb_Array_Reserve(struct upb_Array* array, size_t size, - upb_Arena* arena) { - UPB_ASSERT(!upb_Array_IsFrozen(array)); - if (array->UPB_PRIVATE(capacity) < size) - return UPB_PRIVATE(_upb_Array_Realloc)(array, size, arena); - return true; -} - -// Resize without initializing new elements. -UPB_INLINE bool UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - struct upb_Array* array, size_t size, upb_Arena* arena) { - UPB_ASSERT(!upb_Array_IsFrozen(array)); - UPB_ASSERT(size <= array->UPB_ONLYBITS(size) || - arena); // Allow NULL arena when shrinking. - if (!upb_Array_Reserve(array, size, arena)) return false; - array->UPB_ONLYBITS(size) = size; - return true; -} - -// This function is intended for situations where elem_size is compile-time -// constant or a known expression of the form (1 << lg2), so that the expression -// i*elem_size does not result in an actual multiplication. -UPB_INLINE void UPB_PRIVATE(_upb_Array_Set)(struct upb_Array* array, size_t i, - const void* data, - size_t elem_size) { - UPB_ASSERT(!upb_Array_IsFrozen(array)); - UPB_ASSERT(i < array->UPB_ONLYBITS(size)); - UPB_ASSERT(elem_size == 1U << UPB_PRIVATE(_upb_Array_ElemSizeLg2)(array)); - char* arr_data = (char*)upb_Array_MutableDataPtr(array); - memcpy(arr_data + (i * elem_size), data, elem_size); -} - -UPB_API_INLINE size_t upb_Array_Size(const struct upb_Array* arr) { - return arr->UPB_ONLYBITS(size); -} - -// LINT.ThenChange(GoogleInternalName0) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#undef _UPB_ARRAY_MASK_IMM -#undef _UPB_ARRAY_MASK_LG2 -#undef _UPB_ARRAY_MASK_ALL - - -#endif /* UPB_MESSAGE_INTERNAL_ARRAY_H_ */ - -#ifndef UPB_MESSAGE_INTERNAL_TYPES_H_ -#define UPB_MESSAGE_INTERNAL_TYPES_H_ - -#include - -// Must be last. - -#define UPB_OPAQUE(x) x##_opaque - -struct upb_Message { - union { - uintptr_t UPB_OPAQUE(internal); // tagged pointer, low bit == frozen - double d; // Forces same size for 32-bit/64-bit builds - }; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE void UPB_PRIVATE(_upb_Message_ShallowFreeze)( - struct upb_Message* msg) { - msg->UPB_OPAQUE(internal) |= 1ULL; -} - -UPB_API_INLINE bool upb_Message_IsFrozen(const struct upb_Message* msg) { - return (msg->UPB_OPAQUE(internal) & 1ULL) != 0; -} - -UPB_INLINE struct upb_Message_Internal* UPB_PRIVATE(_upb_Message_GetInternal)( - const struct upb_Message* msg) { - const uintptr_t tmp = msg->UPB_OPAQUE(internal) & ~1ULL; - return (struct upb_Message_Internal*)tmp; -} - -UPB_INLINE void UPB_PRIVATE(_upb_Message_SetInternal)( - struct upb_Message* msg, struct upb_Message_Internal* internal) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - msg->UPB_OPAQUE(internal) = (uintptr_t)internal; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#undef UPB_OPAQUE - - -#endif /* UPB_MESSAGE_INTERNAL_TYPES_H_ */ - -// Users should include array.h or map.h instead. -// IWYU pragma: private, include "upb/message/array.h" - -#ifndef UPB_MESSAGE_VALUE_H_ -#define UPB_MESSAGE_VALUE_H_ - -#include -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -typedef union { - bool bool_val; - float float_val; - double double_val; - int32_t int32_val; - int64_t int64_val; - uint32_t uint32_val; - uint64_t uint64_val; - const struct upb_Array* array_val; - const struct upb_Map* map_val; - const struct upb_Message* msg_val; - upb_StringView str_val; - - // EXPERIMENTAL: A tagged upb_Message*. Users must use this instead of - // msg_val if unlinked sub-messages may possibly be in use. See the - // documentation in kUpb_DecodeOption_ExperimentalAllowUnlinked for more - // information. - uintptr_t tagged_msg_val; // upb_TaggedMessagePtr - - // For an extension field, we are essentially treating ext->data (a - // upb_MessageValue) as if it were a message with one field that lives at - // offset 0. This works because upb_MessageValue is precisely one value that - // can hold any type of data. Recall that an extension can be of any type - // (scalar, repeated, or message). For a message extension, that will be a - // single upb_Message* at offset 0 of the upb_MessageValue. - struct upb_Message UPB_PRIVATE(ext_msg_val); -} upb_MessageValue; - -UPB_API_INLINE upb_MessageValue upb_MessageValue_Zero(void) { - upb_MessageValue zero; - memset(&zero, 0, sizeof(zero)); - return zero; -} - -typedef union { - struct upb_Array* array; - struct upb_Map* map; - struct upb_Message* msg; -} upb_MutableMessageValue; - -UPB_API_INLINE upb_MutableMessageValue upb_MutableMessageValue_Zero(void) { - upb_MutableMessageValue zero; - memset(&zero, 0, sizeof(zero)); - return zero; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_VALUE_H_ */ - -#ifndef UPB_MINI_TABLE_MESSAGE_H_ -#define UPB_MINI_TABLE_MESSAGE_H_ - - -#ifndef UPB_MINI_TABLE_ENUM_H_ -#define UPB_MINI_TABLE_ENUM_H_ - -#include - - -#ifndef UPB_MINI_TABLE_INTERNAL_ENUM_H_ -#define UPB_MINI_TABLE_INTERNAL_ENUM_H_ - -#include - -// Must be last. - -struct upb_MiniTableEnum { - uint32_t UPB_PRIVATE(mask_limit); // Highest that can be tested with mask. - uint32_t UPB_PRIVATE(value_count); // Number of values after the bitfield. - uint32_t UPB_PRIVATE(data)[]; // Bitmask + enumerated values follow. -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE bool upb_MiniTableEnum_CheckValue( - const struct upb_MiniTableEnum* e, uint32_t val) { - if (UPB_LIKELY(val < 64)) { - const uint64_t mask = - e->UPB_PRIVATE(data)[0] | ((uint64_t)e->UPB_PRIVATE(data)[1] << 32); - const uint64_t bit = 1ULL << val; - return (mask & bit) != 0; - } - if (UPB_LIKELY(val < e->UPB_PRIVATE(mask_limit))) { - const uint32_t mask = e->UPB_PRIVATE(data)[val / 32]; - const uint32_t bit = 1U << (val % 32); - return (mask & bit) != 0; - } - - // OPT: binary search long lists? - const uint32_t* start = - &e->UPB_PRIVATE(data)[e->UPB_PRIVATE(mask_limit) / 32]; - const uint32_t* limit = &e->UPB_PRIVATE( - data)[e->UPB_PRIVATE(mask_limit) / 32 + e->UPB_PRIVATE(value_count)]; - for (const uint32_t* p = start; p < limit; p++) { - if (*p == val) return true; - } - return false; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_ENUM_H_ */ - -// Must be last - -typedef struct upb_MiniTableEnum upb_MiniTableEnum; - -#ifdef __cplusplus -extern "C" { -#endif - -// Validates enum value against range defined by enum mini table. -UPB_API_INLINE bool upb_MiniTableEnum_CheckValue(const upb_MiniTableEnum* e, - uint32_t val); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_ENUM_H_ */ - -#ifndef UPB_MINI_TABLE_FIELD_H_ -#define UPB_MINI_TABLE_FIELD_H_ - -#include - - -#ifndef UPB_MINI_TABLE_INTERNAL_FIELD_H_ -#define UPB_MINI_TABLE_INTERNAL_FIELD_H_ - -#include -#include - - -#ifndef UPB_MINI_TABLE_INTERNAL_SIZE_LOG2_H_ -#define UPB_MINI_TABLE_INTERNAL_SIZE_LOG2_H_ - -#include -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Return the log2 of the storage size in bytes for a upb_CType -UPB_INLINE int UPB_PRIVATE(_upb_CType_SizeLg2)(upb_CType c_type) { - static const int8_t size[] = { - 0, // kUpb_CType_Bool - 2, // kUpb_CType_Float - 2, // kUpb_CType_Int32 - 2, // kUpb_CType_UInt32 - 2, // kUpb_CType_Enum - UPB_SIZE(2, 3), // kUpb_CType_Message - 3, // kUpb_CType_Double - 3, // kUpb_CType_Int64 - 3, // kUpb_CType_UInt64 - UPB_SIZE(3, 4), // kUpb_CType_String - UPB_SIZE(3, 4), // kUpb_CType_Bytes - }; - - // -1 here because the enum is one-based but the table is zero-based. - return size[c_type - 1]; -} - -// Return the log2 of the storage size in bytes for a upb_FieldType -UPB_INLINE int UPB_PRIVATE(_upb_FieldType_SizeLg2)(upb_FieldType field_type) { - static const int8_t size[] = { - 3, // kUpb_FieldType_Double - 2, // kUpb_FieldType_Float - 3, // kUpb_FieldType_Int64 - 3, // kUpb_FieldType_UInt64 - 2, // kUpb_FieldType_Int32 - 3, // kUpb_FieldType_Fixed64 - 2, // kUpb_FieldType_Fixed32 - 0, // kUpb_FieldType_Bool - UPB_SIZE(3, 4), // kUpb_FieldType_String - UPB_SIZE(2, 3), // kUpb_FieldType_Group - UPB_SIZE(2, 3), // kUpb_FieldType_Message - UPB_SIZE(3, 4), // kUpb_FieldType_Bytes - 2, // kUpb_FieldType_UInt32 - 2, // kUpb_FieldType_Enum - 2, // kUpb_FieldType_SFixed32 - 3, // kUpb_FieldType_SFixed64 - 2, // kUpb_FieldType_SInt32 - 3, // kUpb_FieldType_SInt64 - }; - - // -1 here because the enum is one-based but the table is zero-based. - return size[field_type - 1]; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_SIZE_LOG2_H_ */ - -// Must be last. - -// LINT.IfChange(struct_definition) -struct upb_MiniTableField { - uint32_t UPB_ONLYBITS(number); - uint16_t UPB_ONLYBITS(offset); - int16_t presence; // If >0, hasbit_index. If <0, ~oneof_index - - // Indexes into `upb_MiniTable.subs` - // Will be set to `kUpb_NoSub` if `descriptortype` != MESSAGE/GROUP/ENUM - uint16_t UPB_PRIVATE(submsg_index); - - uint8_t UPB_PRIVATE(descriptortype); - - // upb_FieldMode | upb_LabelFlags | (upb_FieldRep << kUpb_FieldRep_Shift) - uint8_t UPB_ONLYBITS(mode); -}; - -#define kUpb_NoSub ((uint16_t)-1) - -typedef enum { - kUpb_FieldMode_Map = 0, - kUpb_FieldMode_Array = 1, - kUpb_FieldMode_Scalar = 2, -} upb_FieldMode; - -// Mask to isolate the upb_FieldMode from field.mode. -#define kUpb_FieldMode_Mask 3 - -// Extra flags on the mode field. -typedef enum { - kUpb_LabelFlags_IsPacked = 4, - kUpb_LabelFlags_IsExtension = 8, - // Indicates that this descriptor type is an "alternate type": - // - for Int32, this indicates that the actual type is Enum (but was - // rewritten to Int32 because it is an open enum that requires no check). - // - for Bytes, this indicates that the actual type is String (but does - // not require any UTF-8 check). - kUpb_LabelFlags_IsAlternate = 16, -} upb_LabelFlags; - -// Note: we sort by this number when calculating layout order. -typedef enum { - kUpb_FieldRep_1Byte = 0, - kUpb_FieldRep_4Byte = 1, - kUpb_FieldRep_StringView = 2, - kUpb_FieldRep_8Byte = 3, - - kUpb_FieldRep_NativePointer = - UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte), - kUpb_FieldRep_Max = kUpb_FieldRep_8Byte, -} upb_FieldRep; - -#define kUpb_FieldRep_Shift 6 - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE upb_FieldMode -UPB_PRIVATE(_upb_MiniTableField_Mode)(const struct upb_MiniTableField* f) { - return (upb_FieldMode)(f->UPB_ONLYBITS(mode) & kUpb_FieldMode_Mask); -} - -UPB_INLINE upb_FieldRep -UPB_PRIVATE(_upb_MiniTableField_GetRep)(const struct upb_MiniTableField* f) { - return (upb_FieldRep)(f->UPB_ONLYBITS(mode) >> kUpb_FieldRep_Shift); -} - -UPB_API_INLINE bool upb_MiniTableField_IsArray( - const struct upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_Mode)(f) == kUpb_FieldMode_Array; -} - -UPB_API_INLINE bool upb_MiniTableField_IsMap( - const struct upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_Mode)(f) == kUpb_FieldMode_Map; -} - -UPB_API_INLINE bool upb_MiniTableField_IsScalar( - const struct upb_MiniTableField* f) { - return UPB_PRIVATE(_upb_MiniTableField_Mode)(f) == kUpb_FieldMode_Scalar; -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTableField_IsAlternate)( - const struct upb_MiniTableField* f) { - return (f->UPB_ONLYBITS(mode) & kUpb_LabelFlags_IsAlternate) != 0; -} - -UPB_API_INLINE bool upb_MiniTableField_IsExtension( - const struct upb_MiniTableField* f) { - return (f->UPB_ONLYBITS(mode) & kUpb_LabelFlags_IsExtension) != 0; -} - -UPB_API_INLINE bool upb_MiniTableField_IsPacked( - const struct upb_MiniTableField* f) { - return (f->UPB_ONLYBITS(mode) & kUpb_LabelFlags_IsPacked) != 0; -} - -UPB_API_INLINE upb_FieldType -upb_MiniTableField_Type(const struct upb_MiniTableField* f) { - const upb_FieldType type = (upb_FieldType)f->UPB_PRIVATE(descriptortype); - if (UPB_PRIVATE(_upb_MiniTableField_IsAlternate)(f)) { - if (type == kUpb_FieldType_Int32) return kUpb_FieldType_Enum; - if (type == kUpb_FieldType_Bytes) return kUpb_FieldType_String; - UPB_ASSERT(false); - } - return type; -} - -UPB_API_INLINE -upb_CType upb_MiniTableField_CType(const struct upb_MiniTableField* f) { - return upb_FieldType_CType(upb_MiniTableField_Type(f)); -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTableField_HasHasbit)( - const struct upb_MiniTableField* f) { - return f->presence > 0; -} - -UPB_INLINE char UPB_PRIVATE(_upb_MiniTableField_HasbitMask)( - const struct upb_MiniTableField* f) { - UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)); - const uint16_t index = f->presence; - return 1 << (index % 8); -} - -UPB_INLINE uint16_t UPB_PRIVATE(_upb_MiniTableField_HasbitOffset)( - const struct upb_MiniTableField* f) { - UPB_ASSERT(UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)); - const uint16_t index = f->presence; - return index / 8; -} - -UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( - const struct upb_MiniTableField* f) { - return f->UPB_PRIVATE(descriptortype) == kUpb_FieldType_Enum; -} - -UPB_API_INLINE bool upb_MiniTableField_IsInOneof( - const struct upb_MiniTableField* f) { - return f->presence < 0; -} - -UPB_API_INLINE bool upb_MiniTableField_IsSubMessage( - const struct upb_MiniTableField* f) { - return f->UPB_PRIVATE(descriptortype) == kUpb_FieldType_Message || - f->UPB_PRIVATE(descriptortype) == kUpb_FieldType_Group; -} - -UPB_API_INLINE bool upb_MiniTableField_HasPresence( - const struct upb_MiniTableField* f) { - if (upb_MiniTableField_IsExtension(f)) { - return upb_MiniTableField_IsScalar(f); - } else { - return f->presence != 0; - } -} - -UPB_API_INLINE uint32_t -upb_MiniTableField_Number(const struct upb_MiniTableField* f) { - return f->UPB_ONLYBITS(number); -} - -UPB_INLINE uint16_t -UPB_PRIVATE(_upb_MiniTableField_Offset)(const struct upb_MiniTableField* f) { - return f->UPB_ONLYBITS(offset); -} - -UPB_INLINE size_t UPB_PRIVATE(_upb_MiniTableField_OneofOffset)( - const struct upb_MiniTableField* f) { - UPB_ASSERT(upb_MiniTableField_IsInOneof(f)); - return ~(ptrdiff_t)f->presence; -} - -UPB_INLINE void UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)( - const struct upb_MiniTableField* f) { - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == - kUpb_FieldRep_NativePointer); - UPB_ASSUME(upb_MiniTableField_IsArray(f)); - UPB_ASSUME(f->presence == 0); -} - -UPB_INLINE void UPB_PRIVATE(_upb_MiniTableField_CheckIsMap)( - const struct upb_MiniTableField* f) { - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == - kUpb_FieldRep_NativePointer); - UPB_ASSUME(upb_MiniTableField_IsMap(f)); - UPB_ASSUME(f->presence == 0); -} - -UPB_INLINE size_t UPB_PRIVATE(_upb_MiniTableField_ElemSizeLg2)( - const struct upb_MiniTableField* f) { - const upb_FieldType field_type = upb_MiniTableField_Type(f); - return UPB_PRIVATE(_upb_FieldType_SizeLg2)(field_type); -} - -// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table_field.ts) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_FIELD_H_ */ - -// Must be last. - -typedef struct upb_MiniTableField upb_MiniTableField; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE upb_CType upb_MiniTableField_CType(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_HasPresence(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsArray(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsClosedEnum( - const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsExtension(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsInOneof(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsMap(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsPacked(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsScalar(const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_MiniTableField_IsSubMessage( - const upb_MiniTableField* f); - -UPB_API_INLINE uint32_t upb_MiniTableField_Number(const upb_MiniTableField* f); - -UPB_API_INLINE upb_FieldType -upb_MiniTableField_Type(const upb_MiniTableField* f); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_FIELD_H_ */ - -#ifndef UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ -#define UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ - -#include -#include - - -#ifndef UPB_MINI_TABLE_INTERNAL_SUB_H_ -#define UPB_MINI_TABLE_INTERNAL_SUB_H_ - -// Must be last. - -typedef union { - const struct upb_MiniTable* const* UPB_PRIVATE(submsg); - const struct upb_MiniTableEnum* UPB_PRIVATE(subenum); -} upb_MiniTableSubInternal; - -union upb_MiniTableSub { - const struct upb_MiniTable* UPB_PRIVATE(submsg); - const struct upb_MiniTableEnum* UPB_PRIVATE(subenum); -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE union upb_MiniTableSub upb_MiniTableSub_FromEnum( - const struct upb_MiniTableEnum* subenum) { - union upb_MiniTableSub out; - out.UPB_PRIVATE(subenum) = subenum; - return out; -} - -UPB_API_INLINE union upb_MiniTableSub upb_MiniTableSub_FromMessage( - const struct upb_MiniTable* submsg) { - union upb_MiniTableSub out; - out.UPB_PRIVATE(submsg) = submsg; - return out; -} - -UPB_API_INLINE const struct upb_MiniTableEnum* upb_MiniTableSub_Enum( - const union upb_MiniTableSub sub) { - return sub.UPB_PRIVATE(subenum); -} - -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableSub_Message( - const union upb_MiniTableSub sub) { - return sub.UPB_PRIVATE(submsg); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_SUB_H_ */ - -// Must be last. - -struct upb_Decoder; -struct upb_Message; -typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr, - struct upb_Message* msg, intptr_t table, - uint64_t hasbits, uint64_t data); -typedef struct { - uint64_t field_data; - _upb_FieldParser* field_parser; -} _upb_FastTable_Entry; - -typedef enum { - kUpb_ExtMode_NonExtendable = 0, // Non-extendable message. - kUpb_ExtMode_Extendable = 1, // Normal extendable message. - kUpb_ExtMode_IsMessageSet = 2, // MessageSet message. - kUpb_ExtMode_IsMessageSet_ITEM = - 3, // MessageSet item (temporary only, see decode.c) - - // During table building we steal a bit to indicate that the message is a map - // entry. *Only* used during table building! - kUpb_ExtMode_IsMapEntry = 4, -} upb_ExtMode; - -// upb_MiniTable represents the memory layout of a given upb_MessageDef. -// The members are public so generated code can initialize them, -// but users MUST NOT directly read or write any of its members. - -// LINT.IfChange(minitable_struct_definition) -struct upb_MiniTable { - const upb_MiniTableSubInternal* UPB_PRIVATE(subs); - const struct upb_MiniTableField* UPB_ONLYBITS(fields); - - // Must be aligned to sizeof(void*). Doesn't include internal members like - // unknown fields, extension dict, pointer to msglayout, etc. - uint16_t UPB_PRIVATE(size); - - uint16_t UPB_ONLYBITS(field_count); - - uint8_t UPB_PRIVATE(ext); // upb_ExtMode, uint8_t here so sizeof(ext) == 1 - uint8_t UPB_PRIVATE(dense_below); - uint8_t UPB_PRIVATE(table_mask); - uint8_t UPB_PRIVATE(required_count); // Required fields have the low hasbits. - -#ifdef UPB_TRACING_ENABLED - const char* UPB_PRIVATE(full_name); -#endif - -#ifdef UPB_FASTTABLE - // To statically initialize the tables of variable length, we need a flexible - // array member, and we need to compile in gnu99 mode (constant initialization - // of flexible array members is a GNU extension, not in C99 unfortunately. - _upb_FastTable_Entry UPB_PRIVATE(fasttable)[]; -#endif -}; -// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table.ts) - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( - _upb_MiniTable_StrongReference)(const struct upb_MiniTable* mt) { -#if defined(__GNUC__) - __asm__("" : : "r"(mt)); -#else - const struct upb_MiniTable* volatile unused = mt; - (void)&unused; // Use address to avoid an extra load of "unused". -#endif - return mt; -} - -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTable_Empty)(void) { - extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); - - return &UPB_PRIVATE(_kUpb_MiniTable_Empty); -} - -UPB_API_INLINE int upb_MiniTable_FieldCount(const struct upb_MiniTable* m) { - return m->UPB_ONLYBITS(field_count); -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTable_IsEmpty)( - const struct upb_MiniTable* m) { - extern const struct upb_MiniTable UPB_PRIVATE(_kUpb_MiniTable_Empty); - - return m == &UPB_PRIVATE(_kUpb_MiniTable_Empty); -} - -UPB_API_INLINE const struct upb_MiniTableField* upb_MiniTable_GetFieldByIndex( - const struct upb_MiniTable* m, uint32_t i) { - return &m->UPB_ONLYBITS(fields)[i]; -} - -UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE( - _upb_MiniTable_GetSubTableByIndex)(const struct upb_MiniTable* m, - uint32_t i) { - return *m->UPB_PRIVATE(subs)[i].UPB_PRIVATE(submsg); -} - -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTable_SubMessage( - const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { - if (upb_MiniTableField_CType(f) != kUpb_CType_Message) { - return NULL; - } - return UPB_PRIVATE(_upb_MiniTable_GetSubTableByIndex)( - m, f->UPB_PRIVATE(submsg_index)); -} - -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTable_GetSubMessageTable( - const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Message); - const struct upb_MiniTable* ret = upb_MiniTable_SubMessage(m, f); - UPB_ASSUME(ret); - return UPB_PRIVATE(_upb_MiniTable_IsEmpty)(ret) ? NULL : ret; -} - -UPB_API_INLINE bool upb_MiniTable_FieldIsLinked( - const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { - return upb_MiniTable_GetSubMessageTable(m, f) != NULL; -} - -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTable_MapEntrySubMessage( - const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { - UPB_ASSERT(upb_MiniTable_FieldIsLinked(m, f)); // Map entries must be linked. - UPB_ASSERT(upb_MiniTableField_IsMap(f)); // Function precondition. - return upb_MiniTable_SubMessage(m, f); -} - -UPB_API_INLINE const struct upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable( - const struct upb_MiniTable* m, const struct upb_MiniTableField* f) { - UPB_ASSERT(upb_MiniTableField_CType(f) == kUpb_CType_Enum); - return m->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)].UPB_PRIVATE( - subenum); -} - -UPB_API_INLINE const struct upb_MiniTableField* upb_MiniTable_MapKey( - const struct upb_MiniTable* m) { - UPB_ASSERT(upb_MiniTable_FieldCount(m) == 2); - const struct upb_MiniTableField* f = upb_MiniTable_GetFieldByIndex(m, 0); - UPB_ASSERT(upb_MiniTableField_Number(f) == 1); - return f; -} - -UPB_API_INLINE const struct upb_MiniTableField* upb_MiniTable_MapValue( - const struct upb_MiniTable* m) { - UPB_ASSERT(upb_MiniTable_FieldCount(m) == 2); - const struct upb_MiniTableField* f = upb_MiniTable_GetFieldByIndex(m, 1); - UPB_ASSERT(upb_MiniTableField_Number(f) == 2); - return f; -} - -// Computes a bitmask in which the |m->required_count| lowest bits are set. -// -// Sample output: -// RequiredMask(1) => 0b1 (0x1) -// RequiredMask(5) => 0b11111 (0x1f) -UPB_INLINE uint64_t -UPB_PRIVATE(_upb_MiniTable_RequiredMask)(const struct upb_MiniTable* m) { - int n = m->UPB_PRIVATE(required_count); - UPB_ASSERT(0 < n && n <= 64); - return (1ULL << n) - 1; -} - -#ifdef UPB_TRACING_ENABLED -UPB_INLINE const char* upb_MiniTable_FullName( - const struct upb_MiniTable* mini_table) { - return mini_table->UPB_PRIVATE(full_name); -} -// Initializes tracing proto name from language runtimes that construct -// mini tables dynamically at runtime. The runtime is responsible for passing -// controlling lifetime of name such as storing in same arena as mini_table. -UPB_INLINE void upb_MiniTable_SetFullName(struct upb_MiniTable* mini_table, - const char* full_name) { - mini_table->UPB_PRIVATE(full_name) = full_name; -} -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ */ - -// Must be last. - -typedef struct upb_MiniTable upb_MiniTable; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API const upb_MiniTableField* upb_MiniTable_FindFieldByNumber( - const upb_MiniTable* m, uint32_t number); - -UPB_API_INLINE const upb_MiniTableField* upb_MiniTable_GetFieldByIndex( - const upb_MiniTable* m, uint32_t index); - -UPB_API_INLINE int upb_MiniTable_FieldCount(const upb_MiniTable* m); - -// DEPRECATED: use upb_MiniTable_SubMessage() instead -// Returns the MiniTable for a message field, NULL if the field is unlinked. -UPB_API_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable( - const upb_MiniTable* m, const upb_MiniTableField* f); - -// Returns the MiniTable for a message field if it is a submessage, otherwise -// returns NULL. -// -// WARNING: if dynamic tree shaking is in use, the return value may be the -// "empty", zero-field placeholder message instead of the real message type. -// If the message is later linked, this function will begin returning the real -// message type. -UPB_API_INLINE const upb_MiniTable* upb_MiniTable_SubMessage( - const upb_MiniTable* m, const upb_MiniTableField* f); - -// Returns the MiniTable for a map field. The given field must refer to a map. -UPB_API_INLINE const upb_MiniTable* upb_MiniTable_MapEntrySubMessage( - const upb_MiniTable* m, const upb_MiniTableField* f); - -// Returns the MiniTableEnum for a message field, NULL if the field is unlinked. -UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable( - const upb_MiniTable* m, const upb_MiniTableField* f); - -// Returns the MiniTableField for the key of a map. -UPB_API_INLINE const upb_MiniTableField* upb_MiniTable_MapKey( - const upb_MiniTable* m); - -// Returns the MiniTableField for the value of a map. -UPB_API_INLINE const upb_MiniTableField* upb_MiniTable_MapValue( - const upb_MiniTable* m); - -// Returns true if this MiniTable field is linked to a MiniTable for the -// sub-message. -UPB_API_INLINE bool upb_MiniTable_FieldIsLinked(const upb_MiniTable* m, - const upb_MiniTableField* f); - -// If this field is in a oneof, returns the first field in the oneof. -// -// Otherwise returns NULL. -// -// Usage: -// const upb_MiniTableField* field = upb_MiniTable_GetOneof(m, f); -// do { -// .. -// } while (upb_MiniTable_NextOneofField(m, &field); -// -const upb_MiniTableField* upb_MiniTable_GetOneof(const upb_MiniTable* m, - const upb_MiniTableField* f); - -// Iterates to the next field in the oneof. If this is the last field in the -// oneof, returns false. The ordering of fields in the oneof is not -// guaranteed. -// REQUIRES: |f| is the field initialized by upb_MiniTable_GetOneof and updated -// by prior upb_MiniTable_NextOneofField calls. -bool upb_MiniTable_NextOneofField(const upb_MiniTable* m, - const upb_MiniTableField** f); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_MESSAGE_H_ */ - -// Must be last. - -typedef struct upb_Array upb_Array; - -#ifdef __cplusplus -extern "C" { -#endif - -// Creates a new array on the given arena that holds elements of this type. -UPB_API upb_Array* upb_Array_New(upb_Arena* a, upb_CType type); - -// Returns the number of elements in the array. -UPB_API_INLINE size_t upb_Array_Size(const upb_Array* arr); - -// Returns the given element, which must be within the array's current size. -UPB_API upb_MessageValue upb_Array_Get(const upb_Array* arr, size_t i); - -// Returns a non-null mutating pointer to the given element. `arr` must be an -// array of a message type, and `i` must be within the array's current size. -UPB_API struct upb_Message* upb_Array_GetMutable(upb_Array* arr, size_t i); - -// Sets the given element, which must be within the array's current size. -UPB_API void upb_Array_Set(upb_Array* arr, size_t i, upb_MessageValue val); - -// Appends an element to the array. Returns false on allocation failure. -UPB_API bool upb_Array_Append(upb_Array* array, upb_MessageValue val, - upb_Arena* arena); - -// Moves elements within the array using memmove(). -// Like memmove(), the source and destination elements may be overlapping. -UPB_API void upb_Array_Move(upb_Array* array, size_t dst_idx, size_t src_idx, - size_t count); - -// Inserts one or more empty elements into the array. -// Existing elements are shifted right. -// The new elements have undefined state and must be set with `upb_Array_Set()`. -// REQUIRES: `i <= upb_Array_Size(arr)` -UPB_API bool upb_Array_Insert(upb_Array* array, size_t i, size_t count, - upb_Arena* arena); - -// Deletes one or more elements from the array. -// Existing elements are shifted left. -// REQUIRES: `i + count <= upb_Array_Size(arr)` -UPB_API void upb_Array_Delete(upb_Array* array, size_t i, size_t count); - -// Reserves |size| elements of storage for the array. -UPB_API_INLINE bool upb_Array_Reserve(struct upb_Array* array, size_t size, - upb_Arena* arena); - -// Changes the size of a vector. New elements are initialized to NULL/0. -// Returns false on allocation failure. -UPB_API bool upb_Array_Resize(upb_Array* array, size_t size, upb_Arena* arena); - -// Returns pointer to array data. -UPB_API_INLINE const void* upb_Array_DataPtr(const upb_Array* arr); - -// Returns mutable pointer to array data. -UPB_API_INLINE void* upb_Array_MutableDataPtr(upb_Array* arr); - -// Mark an array and all of its descendents as frozen/immutable. -// If the array elements are messages then |m| must point to the minitable for -// those messages. Otherwise |m| must be NULL. -UPB_API void upb_Array_Freeze(upb_Array* arr, const upb_MiniTable* m); - -// Returns whether an array has been frozen. -UPB_API_INLINE bool upb_Array_IsFrozen(const upb_Array* arr); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_ARRAY_H_ */ - -#ifndef UPB_MESSAGE_INTERNAL_EXTENSION_H_ -#define UPB_MESSAGE_INTERNAL_EXTENSION_H_ - -#include - - -#ifndef UPB_MESSAGE_INTERNAL_MAP_H_ -#define UPB_MESSAGE_INTERNAL_MAP_H_ - -#include -#include -#include - - -/* - * upb_table - * - * This header is INTERNAL-ONLY! Its interfaces are not public or stable! - * This file defines very fast int->upb_value (inttable) and string->upb_value - * (strtable) hash tables. - * - * The table uses chained scatter with Brent's variation (inspired by the Lua - * implementation of hash tables). The hash function for strings is Austin - * Appleby's "MurmurHash." - * - * The inttable uses uintptr_t as its key, which guarantees it can be used to - * store pointers or integers of at least 32 bits (upb isn't really useful on - * systems where sizeof(void*) < 4). - * - * The table must be homogeneous (all values of the same type). In debug - * mode, we check this on insert and lookup. - */ - -#ifndef UPB_HASH_COMMON_H_ -#define UPB_HASH_COMMON_H_ - -#include -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -/* upb_value ******************************************************************/ - -typedef struct { - uint64_t val; -} upb_value; - -/* For each value ctype, define the following set of functions: - * - * // Get/set an int32 from a upb_value. - * int32_t upb_value_getint32(upb_value val); - * void upb_value_setint32(upb_value *val, int32_t cval); - * - * // Construct a new upb_value from an int32. - * upb_value upb_value_int32(int32_t val); */ -#define FUNCS(name, membername, type_t, converter) \ - UPB_INLINE void upb_value_set##name(upb_value* val, type_t cval) { \ - val->val = (uint64_t)cval; \ - } \ - UPB_INLINE upb_value upb_value_##name(type_t val) { \ - upb_value ret; \ - upb_value_set##name(&ret, val); \ - return ret; \ - } \ - UPB_INLINE type_t upb_value_get##name(upb_value val) { \ - return (type_t)(converter)val.val; \ - } - -FUNCS(int32, int32, int32_t, int32_t) -FUNCS(int64, int64, int64_t, int64_t) -FUNCS(uint32, uint32, uint32_t, uint32_t) -FUNCS(uint64, uint64, uint64_t, uint64_t) -FUNCS(bool, _bool, bool, bool) -FUNCS(cstr, cstr, char*, uintptr_t) -FUNCS(uintptr, uptr, uintptr_t, uintptr_t) -FUNCS(ptr, ptr, void*, uintptr_t) -FUNCS(constptr, constptr, const void*, uintptr_t) - -#undef FUNCS - -UPB_INLINE void upb_value_setfloat(upb_value* val, float cval) { - memcpy(&val->val, &cval, sizeof(cval)); -} - -UPB_INLINE void upb_value_setdouble(upb_value* val, double cval) { - memcpy(&val->val, &cval, sizeof(cval)); -} - -UPB_INLINE upb_value upb_value_float(float cval) { - upb_value ret; - upb_value_setfloat(&ret, cval); - return ret; -} - -UPB_INLINE upb_value upb_value_double(double cval) { - upb_value ret; - upb_value_setdouble(&ret, cval); - return ret; -} - -/* upb_key *****************************************************************/ - -// A uint32 size followed by that number of bytes stored contiguously. -typedef struct { - uint32_t size; - const char data[]; -} upb_SizePrefixString; - -/* Either: - * 1. an actual integer key - * 2. a SizePrefixString*, owned by us. - * - * ...depending on whether this is a string table or an int table. */ -typedef union { - uintptr_t num; - const upb_SizePrefixString* str; -} upb_key; - -UPB_INLINE upb_StringView upb_key_strview(upb_key key) { - return upb_StringView_FromDataAndSize(key.str->data, key.str->size); -} - -/* upb_table ******************************************************************/ - -typedef struct _upb_tabent { - upb_value val; - upb_key key; - - /* Internal chaining. This is const so we can create static initializers for - * tables. We cast away const sometimes, but *only* when the containing - * upb_table is known to be non-const. This requires a bit of care, but - * the subtlety is confined to table.c. */ - const struct _upb_tabent* next; -} upb_tabent; - -typedef struct { - upb_tabent* entries; - /* Number of entries in the hash part. */ - uint32_t count; - - /* Mask to turn hash value -> bucket. The map's allocated size is mask + 1.*/ - uint32_t mask; -} upb_table; - -UPB_INLINE size_t upb_table_size(const upb_table* t) { return t->mask + 1; } - -// Internal-only functions, in .h file only out of necessity. - -UPB_INLINE upb_key upb_key_empty(void) { - upb_key ret; - memset(&ret, 0, sizeof(upb_key)); - return ret; -} - -UPB_INLINE bool upb_tabent_isempty(const upb_tabent* e) { - upb_key key = e->key; - UPB_ASSERT(sizeof(key.num) == sizeof(key.str)); - uintptr_t val; - memcpy(&val, &key, sizeof(val)); - // Note: for upb_inttables a tab_key is a true integer key value, but the - // inttable maintains the invariant that 0 value is always stored in the - // compact table and never as a upb_tabent* so we can always use the 0 - // key value to identify an empty tabent. - return val == 0; -} - -uint32_t _upb_Hash(const void* p, size_t n, uint64_t seed); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_HASH_COMMON_H_ */ - -#ifndef UPB_HASH_INT_TABLE_H_ -#define UPB_HASH_INT_TABLE_H_ - -#include -#include - - -// Must be last. - -typedef struct { - upb_table t; // For entries that don't fit in the array part. - // Array part of the table. - // Pointers on this table are const so we can create static initializers for - // tables. We cast away const sometimes, but *only* when the containing - // upb_table is known to be non-const. This requires a bit of care, but - // the subtlety is confined to table.c. - const upb_value* array; - // Track presence in the array part. Each bit at index (key % 8) at the - // presence_mask[key/8] indicates if the element is present in the array part. - const uint8_t* presence_mask; - uint32_t array_size; // Array part size. - uint32_t array_count; // Array part number of elements. -} upb_inttable; - -#ifdef __cplusplus -extern "C" { -#endif - -// Initialize a table. If memory allocation failed, false is returned and -// the table is uninitialized. -bool upb_inttable_init(upb_inttable* table, upb_Arena* a); - -// Returns the number of values in the table. -size_t upb_inttable_count(const upb_inttable* t); - -// Inserts the given key into the hashtable with the given value. -// The key must not already exist in the hash table. -// The value must not be UINTPTR_MAX. -// -// If a table resize was required but memory allocation failed, false is -// returned and the table is unchanged. -bool upb_inttable_insert(upb_inttable* t, uintptr_t key, upb_value val, - upb_Arena* a); - -// Looks up key in this table, returning "true" if the key was found. -// If v is non-NULL, copies the value for this key into *v. -bool upb_inttable_lookup(const upb_inttable* t, uintptr_t key, upb_value* v); - -// Removes an item from the table. Returns true if the remove was successful, -// and stores the removed item in *val if non-NULL. -bool upb_inttable_remove(upb_inttable* t, uintptr_t key, upb_value* val); - -// Updates an existing entry in an inttable. -// If the entry does not exist, returns false and does nothing. -// Unlike insert/remove, this does not invalidate iterators. -bool upb_inttable_replace(upb_inttable* t, uintptr_t key, upb_value val); - -// Optimizes the table for the current set of entries, for both memory use and -// lookup time. Client should call this after all entries have been inserted; -// inserting more entries is legal, but will likely require a table resize. -// Returns false if reallocation fails. -bool upb_inttable_compact(upb_inttable* t, upb_Arena* a); - -// Clears the table. -void upb_inttable_clear(upb_inttable* t); - -// Iteration over inttable: -// -// intptr_t iter = UPB_INTTABLE_BEGIN; -// uintptr_t key; -// upb_value val; -// while (upb_inttable_next(t, &key, &val, &iter)) { -// // ... -// } - -#define UPB_INTTABLE_BEGIN -1 - -bool upb_inttable_next(const upb_inttable* t, uintptr_t* key, upb_value* val, - intptr_t* iter); -void upb_inttable_removeiter(upb_inttable* t, intptr_t* iter); -void upb_inttable_setentryvalue(upb_inttable* t, intptr_t iter, upb_value v); -bool upb_inttable_done(const upb_inttable* t, intptr_t i); -uintptr_t upb_inttable_iter_key(const upb_inttable* t, intptr_t iter); -upb_value upb_inttable_iter_value(const upb_inttable* t, intptr_t iter); - -UPB_INLINE bool upb_inttable_arrhas(const upb_inttable* t, uintptr_t key) { - return (t->presence_mask[key / 8] & (1 << (key % 8))) != 0; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_HASH_INT_TABLE_H_ */ - -#ifndef UPB_HASH_STR_TABLE_H_ -#define UPB_HASH_STR_TABLE_H_ - -#include -#include -#include - - -// Must be last. - -typedef struct { - upb_table t; -} upb_strtable; - -#ifdef __cplusplus -extern "C" { -#endif - -// Initialize a table. If memory allocation failed, false is returned and -// the table is uninitialized. -bool upb_strtable_init(upb_strtable* table, size_t expected_size, upb_Arena* a); - -// Returns the number of values in the table. -UPB_INLINE size_t upb_strtable_count(const upb_strtable* t) { - return t->t.count; -} - -void upb_strtable_clear(upb_strtable* t); - -// Inserts the given key into the hashtable with the given value. -// The key must not already exist in the hash table. The key is not required -// to be NULL-terminated, and the table will make an internal copy of the key. -// -// If a table resize was required but memory allocation failed, false is -// returned and the table is unchanged. */ -bool upb_strtable_insert(upb_strtable* t, const char* key, size_t len, - upb_value val, upb_Arena* a); - -// Looks up key in this table, returning "true" if the key was found. -// If v is non-NULL, copies the value for this key into *v. -bool upb_strtable_lookup2(const upb_strtable* t, const char* key, size_t len, - upb_value* v); - -// For NULL-terminated strings. -UPB_INLINE bool upb_strtable_lookup(const upb_strtable* t, const char* key, - upb_value* v) { - return upb_strtable_lookup2(t, key, strlen(key), v); -} - -// Removes an item from the table. Returns true if the remove was successful, -// and stores the removed item in *val if non-NULL. -bool upb_strtable_remove2(upb_strtable* t, const char* key, size_t len, - upb_value* val); - -UPB_INLINE bool upb_strtable_remove(upb_strtable* t, const char* key, - upb_value* v) { - return upb_strtable_remove2(t, key, strlen(key), v); -} - -// Exposed for testing only. -bool upb_strtable_resize(upb_strtable* t, size_t size_lg2, upb_Arena* a); - -/* Iteration over strtable: - * - * intptr_t iter = UPB_STRTABLE_BEGIN; - * upb_StringView key; - * upb_value val; - * while (upb_strtable_next2(t, &key, &val, &iter)) { - * // ... - * } - */ - -#define UPB_STRTABLE_BEGIN -1 - -bool upb_strtable_next2(const upb_strtable* t, upb_StringView* key, - upb_value* val, intptr_t* iter); -void upb_strtable_removeiter(upb_strtable* t, intptr_t* iter); -void upb_strtable_setentryvalue(upb_strtable* t, intptr_t iter, upb_value v); - -/* DEPRECATED iterators, slated for removal. - * - * Iterators for string tables. We are subject to some kind of unusual - * design constraints: - * - * For high-level languages: - * - we must be able to guarantee that we don't crash or corrupt memory even if - * the program accesses an invalidated iterator. - * - * For C++11 range-based for: - * - iterators must be copyable - * - iterators must be comparable - * - it must be possible to construct an "end" value. - * - * Iteration order is undefined. - * - * Modifying the table invalidates iterators. upb_{str,int}table_done() is - * guaranteed to work even on an invalidated iterator, as long as the table it - * is iterating over has not been freed. Calling next() or accessing data from - * an invalidated iterator yields unspecified elements from the table, but it is - * guaranteed not to crash and to return real table elements (except when done() - * is true). */ -/* upb_strtable_iter **********************************************************/ - -/* upb_strtable_iter i; - * upb_strtable_begin(&i, t); - * for(; !upb_strtable_done(&i); upb_strtable_next(&i)) { - * const char *key = upb_strtable_iter_key(&i); - * const upb_value val = upb_strtable_iter_value(&i); - * // ... - * } - */ - -typedef struct { - const upb_strtable* t; - size_t index; -} upb_strtable_iter; - -UPB_INLINE const upb_tabent* str_tabent(const upb_strtable_iter* i) { - return &i->t->t.entries[i->index]; -} - -void upb_strtable_begin(upb_strtable_iter* i, const upb_strtable* t); -void upb_strtable_next(upb_strtable_iter* i); -bool upb_strtable_done(const upb_strtable_iter* i); -upb_StringView upb_strtable_iter_key(const upb_strtable_iter* i); -upb_value upb_strtable_iter_value(const upb_strtable_iter* i); -void upb_strtable_iter_setdone(upb_strtable_iter* i); -bool upb_strtable_iter_isequal(const upb_strtable_iter* i1, - const upb_strtable_iter* i2); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_HASH_STR_TABLE_H_ */ - -// Must be last. - -typedef enum { - kUpb_MapInsertStatus_Inserted = 0, - kUpb_MapInsertStatus_Replaced = 1, - kUpb_MapInsertStatus_OutOfMemory = 2, -} upb_MapInsertStatus; - -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -union upb_Map_Table { - upb_strtable strtable; - upb_inttable inttable; -}; - -struct upb_Map { - // Size of key and val, based on the map type. - // Strings are represented as '0' because they must be handled specially. - char key_size; - char val_size; - bool UPB_PRIVATE(is_frozen); - bool UPB_PRIVATE(is_strtable); - - union upb_Map_Table t; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE void UPB_PRIVATE(_upb_Map_ShallowFreeze)(struct upb_Map* map) { - map->UPB_PRIVATE(is_frozen) = true; -} - -UPB_API_INLINE bool upb_Map_IsFrozen(const struct upb_Map* map) { - return map->UPB_PRIVATE(is_frozen); -} - -// Converting between internal table representation and user values. -// -// _upb_map_tokey() and _upb_map_fromkey() are inverses. -// _upb_map_tovalue() and _upb_map_fromvalue() are inverses. -// -// These functions account for the fact that strings are treated differently -// from other types when stored in a map. - -UPB_INLINE upb_StringView _upb_map_tokey(const void* key, size_t size) { - if (size == UPB_MAPTYPE_STRING) { - return *(upb_StringView*)key; - } else { - return upb_StringView_FromDataAndSize((const char*)key, size); - } -} - -UPB_INLINE uintptr_t _upb_map_tointkey(const void* key, size_t key_size) { - uintptr_t intkey = 0; - memcpy(&intkey, key, key_size); - return intkey; -} - -UPB_INLINE void _upb_map_fromkey(upb_StringView key, void* out, size_t size) { - if (size == UPB_MAPTYPE_STRING) { - memcpy(out, &key, sizeof(key)); - } else { - memcpy(out, key.data, size); - } -} - -UPB_INLINE bool _upb_map_tovalue(const void* val, size_t size, - upb_value* msgval, upb_Arena* a) { - if (size == UPB_MAPTYPE_STRING) { - upb_StringView* strp = (upb_StringView*)upb_Arena_Malloc(a, sizeof(*strp)); - if (!strp) return false; - *strp = *(upb_StringView*)val; - *msgval = upb_value_ptr(strp); - } else { - memcpy(msgval, val, size); - } - return true; -} - -UPB_INLINE void _upb_map_fromvalue(upb_value val, void* out, size_t size) { - if (size == UPB_MAPTYPE_STRING) { - const upb_StringView* strp = (const upb_StringView*)upb_value_getptr(val); - memcpy(out, strp, sizeof(upb_StringView)); - } else { - memcpy(out, &val, size); - } -} - -UPB_INLINE bool _upb_map_next(const struct upb_Map* map, size_t* iter) { - if (map->UPB_PRIVATE(is_strtable)) { - upb_strtable_iter it; - it.t = &map->t.strtable; - it.index = *iter; - upb_strtable_next(&it); - *iter = it.index; - return !upb_strtable_done(&it); - } else { - uintptr_t key; - upb_value val; - intptr_t int_iter = 0; - memcpy(&int_iter, iter, sizeof(intptr_t)); - upb_inttable_next(&map->t.inttable, &key, &val, &int_iter); - memcpy(iter, &int_iter, sizeof(size_t)); - return !upb_inttable_done(&map->t.inttable, int_iter); - } -} - -UPB_INLINE void _upb_Map_Clear(struct upb_Map* map) { - UPB_ASSERT(!upb_Map_IsFrozen(map)); - - if (map->UPB_PRIVATE(is_strtable)) { - upb_strtable_clear(&map->t.strtable); - } else { - upb_inttable_clear(&map->t.inttable); - } -} - -UPB_INLINE bool _upb_Map_Delete(struct upb_Map* map, const void* key, - size_t key_size, upb_value* val) { - UPB_ASSERT(!upb_Map_IsFrozen(map)); - - if (map->UPB_PRIVATE(is_strtable)) { - upb_StringView k = _upb_map_tokey(key, key_size); - return upb_strtable_remove2(&map->t.strtable, k.data, k.size, val); - } else { - uintptr_t intkey = _upb_map_tointkey(key, key_size); - return upb_inttable_remove(&map->t.inttable, intkey, val); - } -} - -UPB_INLINE bool _upb_Map_Get(const struct upb_Map* map, const void* key, - size_t key_size, void* val, size_t val_size) { - upb_value tabval = {0}; - bool ret; - if (map->UPB_PRIVATE(is_strtable)) { - upb_StringView k = _upb_map_tokey(key, key_size); - ret = upb_strtable_lookup2(&map->t.strtable, k.data, k.size, &tabval); - } else { - uintptr_t intkey = _upb_map_tointkey(key, key_size); - ret = upb_inttable_lookup(&map->t.inttable, intkey, &tabval); - } - if (ret && val) { - _upb_map_fromvalue(tabval, val, val_size); - } - return ret; -} - -UPB_INLINE upb_MapInsertStatus _upb_Map_Insert(struct upb_Map* map, - const void* key, size_t key_size, - void* val, size_t val_size, - upb_Arena* a) { - UPB_ASSERT(!upb_Map_IsFrozen(map)); - - // Prep the value. - upb_value tabval = {0}; - if (!_upb_map_tovalue(val, val_size, &tabval, a)) { - return kUpb_MapInsertStatus_OutOfMemory; - } - - bool removed; - if (map->UPB_PRIVATE(is_strtable)) { - upb_StringView strkey = _upb_map_tokey(key, key_size); - // TODO: add overwrite operation to minimize number of lookups. - removed = - upb_strtable_remove2(&map->t.strtable, strkey.data, strkey.size, NULL); - if (!upb_strtable_insert(&map->t.strtable, strkey.data, strkey.size, tabval, - a)) { - return kUpb_MapInsertStatus_OutOfMemory; - } - } else { - uintptr_t intkey = _upb_map_tointkey(key, key_size); - removed = upb_inttable_remove(&map->t.inttable, intkey, NULL); - if (!upb_inttable_insert(&map->t.inttable, intkey, tabval, a)) { - return kUpb_MapInsertStatus_OutOfMemory; - } - } - return removed ? kUpb_MapInsertStatus_Replaced - : kUpb_MapInsertStatus_Inserted; -} - -UPB_INLINE size_t _upb_Map_Size(const struct upb_Map* map) { - if (map->UPB_PRIVATE(is_strtable)) { - return map->t.strtable.t.count; - } else { - return upb_inttable_count(&map->t.inttable); - } -} - -// Strings/bytes are special-cased in maps. -extern char _upb_Map_CTypeSizeTable[12]; - -UPB_INLINE size_t _upb_Map_CTypeSize(upb_CType ctype) { - return _upb_Map_CTypeSizeTable[ctype]; -} - -// Creates a new map on the given arena with this key/value type. -struct upb_Map* _upb_Map_New(upb_Arena* a, size_t key_size, size_t value_size); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_INTERNAL_MAP_H_ */ - -#ifndef UPB_MINI_TABLE_EXTENSION_H_ -#define UPB_MINI_TABLE_EXTENSION_H_ - -#include - - -#ifndef UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ -#define UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ - -#include -#include - - -// Must be last. - -struct upb_MiniTableExtension { - // Do not move this field. We need to be able to alias pointers. - struct upb_MiniTableField UPB_PRIVATE(field); - - const struct upb_MiniTable* UPB_PRIVATE(extendee); - union upb_MiniTableSub UPB_PRIVATE(sub); // NULL unless submsg or proto2 enum -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE upb_CType -upb_MiniTableExtension_CType(const struct upb_MiniTableExtension* e) { - return upb_MiniTableField_CType(&e->UPB_PRIVATE(field)); -} - -UPB_API_INLINE uint32_t -upb_MiniTableExtension_Number(const struct upb_MiniTableExtension* e) { - return e->UPB_PRIVATE(field).UPB_ONLYBITS(number); -} - -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableExtension_GetSubMessage( - const struct upb_MiniTableExtension* e) { - if (upb_MiniTableExtension_CType(e) != kUpb_CType_Message) { - return NULL; - } - return upb_MiniTableSub_Message(e->UPB_PRIVATE(sub)); -} - -UPB_API_INLINE const struct upb_MiniTableEnum* -upb_MiniTableExtension_GetSubEnum(const struct upb_MiniTableExtension* e) { - if (upb_MiniTableExtension_CType(e) != kUpb_CType_Enum) { - return NULL; - } - return upb_MiniTableSub_Enum(e->UPB_PRIVATE(sub)); -} - -UPB_API_INLINE bool upb_MiniTableExtension_SetSubMessage( - struct upb_MiniTableExtension* e, const struct upb_MiniTable* m) { - if (e->UPB_PRIVATE(field).UPB_PRIVATE(descriptortype) != - kUpb_FieldType_Message) { - return false; - } - e->UPB_PRIVATE(sub).UPB_PRIVATE(submsg) = m; - return true; -} - -UPB_API_INLINE bool upb_MiniTableExtension_SetSubEnum( - struct upb_MiniTableExtension* e, const struct upb_MiniTableEnum* en) { - if (e->UPB_PRIVATE(field).UPB_PRIVATE(descriptortype) != - kUpb_FieldType_Enum) { - return false; - } - e->UPB_PRIVATE(sub).UPB_PRIVATE(subenum) = en; - return true; -} - -UPB_INLINE upb_FieldRep UPB_PRIVATE(_upb_MiniTableExtension_GetRep)( - const struct upb_MiniTableExtension* e) { - return UPB_PRIVATE(_upb_MiniTableField_GetRep)(&e->UPB_PRIVATE(field)); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ */ - -// Must be last. - -typedef struct upb_MiniTableExtension upb_MiniTableExtension; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE upb_CType -upb_MiniTableExtension_CType(const upb_MiniTableExtension* e); - -UPB_API_INLINE uint32_t -upb_MiniTableExtension_Number(const upb_MiniTableExtension* e); - -UPB_API_INLINE const upb_MiniTable* upb_MiniTableExtension_GetSubMessage( - const upb_MiniTableExtension* e); - -UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTableExtension_GetSubEnum( - const upb_MiniTableExtension* e); - -UPB_API_INLINE bool upb_MiniTableExtension_SetSubMessage( - upb_MiniTableExtension* e, const upb_MiniTable* m); - -UPB_API_INLINE bool upb_MiniTableExtension_SetSubEnum( - upb_MiniTableExtension* e, const upb_MiniTableEnum* m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_EXTENSION_H_ */ - -// Must be last. - -// The internal representation of an extension is self-describing: it contains -// enough information that we can serialize it to binary format without needing -// to look it up in a upb_ExtensionRegistry. -// -// This representation allocates 16 bytes to data on 64-bit platforms. -// This is rather wasteful for scalars (in the extreme case of bool, -// it wastes 15 bytes). We accept this because we expect messages to be -// the most common extension type. -typedef struct { - const upb_MiniTableExtension* ext; - upb_MessageValue data; -} upb_Extension; - -#ifdef __cplusplus -extern "C" { -#endif - -// Adds the given extension data to the given message. -// |ext| is copied into the message instance. -// This logically replaces any previously-added extension with this number. -upb_Extension* UPB_PRIVATE(_upb_Message_GetOrCreateExtension)( - struct upb_Message* msg, const upb_MiniTableExtension* ext, - upb_Arena* arena); - -// Returns an extension for a message with a given mini table, -// or NULL if no extension exists with this mini table. -const upb_Extension* UPB_PRIVATE(_upb_Message_Getext)( - const struct upb_Message* msg, const upb_MiniTableExtension* ext); - -UPB_INLINE bool UPB_PRIVATE(_upb_Extension_IsEmpty)(const upb_Extension* ext) { - switch ( - UPB_PRIVATE(_upb_MiniTableField_Mode)(&ext->ext->UPB_PRIVATE(field))) { - case kUpb_FieldMode_Scalar: - return false; - case kUpb_FieldMode_Array: - return upb_Array_Size(ext->data.array_val) == 0; - case kUpb_FieldMode_Map: - return _upb_Map_Size(ext->data.map_val) == 0; - } - UPB_UNREACHABLE(); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_INTERNAL_EXTENSION_H_ */ - -/* -** Our memory representation for parsing tables and messages themselves. -** Functions in this file are used by generated code and possibly reflection. -** -** The definitions in this file are internal to upb. -**/ - -#ifndef UPB_MESSAGE_INTERNAL_MESSAGE_H_ -#define UPB_MESSAGE_INTERNAL_MESSAGE_H_ - -#include -#include -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -extern const float kUpb_FltInfinity; -extern const double kUpb_Infinity; -extern const double kUpb_NaN; - -// Internal members of a upb_Message that track unknown fields and/or -// extensions. We can change this without breaking binary compatibility. - -typedef struct upb_TaggedAuxPtr { - // Two lowest bits form a tag: - // 00 - non-aliased unknown data - // 10 - aliased unknown data - // 01 - extension - uintptr_t ptr; -} upb_TaggedAuxPtr; - -UPB_INLINE bool upb_TaggedAuxPtr_IsNull(upb_TaggedAuxPtr ptr) { - return ptr.ptr == 0; -} - -UPB_INLINE bool upb_TaggedAuxPtr_IsExtension(upb_TaggedAuxPtr ptr) { - return ptr.ptr & 1; -} - -UPB_INLINE bool upb_TaggedAuxPtr_IsUnknown(upb_TaggedAuxPtr ptr) { - return (ptr.ptr != 0) && ((ptr.ptr & 1) == 0); -} - -UPB_INLINE bool upb_TaggedAuxPtr_IsUnknownAliased(upb_TaggedAuxPtr ptr) { - return (ptr.ptr != 0) && ((ptr.ptr & 2) == 2); -} - -UPB_INLINE upb_Extension* upb_TaggedAuxPtr_Extension(upb_TaggedAuxPtr ptr) { - UPB_ASSERT(upb_TaggedAuxPtr_IsExtension(ptr)); - return (upb_Extension*)(ptr.ptr & ~3ULL); -} - -UPB_INLINE upb_StringView* upb_TaggedAuxPtr_UnknownData(upb_TaggedAuxPtr ptr) { - UPB_ASSERT(!upb_TaggedAuxPtr_IsExtension(ptr)); - return (upb_StringView*)(ptr.ptr & ~3ULL); -} - -UPB_INLINE upb_TaggedAuxPtr upb_TaggedAuxPtr_Null(void) { - upb_TaggedAuxPtr ptr; - ptr.ptr = 0; - return ptr; -} - -UPB_INLINE upb_TaggedAuxPtr -upb_TaggedAuxPtr_MakeExtension(const upb_Extension* e) { - upb_TaggedAuxPtr ptr; - ptr.ptr = (uintptr_t)e | 1; - return ptr; -} - -// This tag means that the original allocation for this field starts with the -// string view and ends with the end of the content referenced by the string -// view. -UPB_INLINE upb_TaggedAuxPtr -upb_TaggedAuxPtr_MakeUnknownData(const upb_StringView* sv) { - upb_TaggedAuxPtr ptr; - ptr.ptr = (uintptr_t)sv; - return ptr; -} - -// This tag implies no guarantee between the relationship of the string view and -// the data it points to. -UPB_INLINE upb_TaggedAuxPtr -upb_TaggedAuxPtr_MakeUnknownDataAliased(const upb_StringView* sv) { - upb_TaggedAuxPtr ptr; - ptr.ptr = (uintptr_t)sv | 2; - return ptr; -} - -typedef struct upb_Message_Internal { - // Total number of entries set in aux_data - uint32_t size; - uint32_t capacity; - // Tagged pointers to upb_StringView or upb_Extension - upb_TaggedAuxPtr aux_data[]; -} upb_Message_Internal; - -#ifdef UPB_TRACING_ENABLED -UPB_API void upb_Message_LogNewMessage(const upb_MiniTable* m, - const upb_Arena* arena); -UPB_API void upb_Message_SetNewMessageTraceHandler( - void (*handler)(const upb_MiniTable*, const upb_Arena*)); -#endif // UPB_TRACING_ENABLED - -// Inline version upb_Message_New(), for internal use. -UPB_INLINE struct upb_Message* _upb_Message_New(const upb_MiniTable* m, - upb_Arena* a) { -#ifdef UPB_TRACING_ENABLED - upb_Message_LogNewMessage(m, a); -#endif // UPB_TRACING_ENABLED - - const int size = m->UPB_PRIVATE(size); - struct upb_Message* msg = (struct upb_Message*)upb_Arena_Malloc(a, size); - if (UPB_UNLIKELY(!msg)) return NULL; - memset(msg, 0, size); - return msg; -} - -// Discards the unknown fields for this message only. -void _upb_Message_DiscardUnknown_shallow(struct upb_Message* msg); - -UPB_NOINLINE bool UPB_PRIVATE(_upb_Message_AddUnknownSlowPath)( - struct upb_Message* msg, const char* data, size_t len, upb_Arena* arena, - bool alias); - -// Adds unknown data (serialized protobuf data) to the given message. The data -// must represent one or more complete and well formed proto fields. -// If alias is set, will keep a view to the provided data; otherwise a copy is -// made. -UPB_INLINE bool UPB_PRIVATE(_upb_Message_AddUnknown)(struct upb_Message* msg, - const char* data, - size_t len, - upb_Arena* arena, - bool alias) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - if (alias) { - // Aliasing parse of a message with sequential unknown fields is a simple - // pointer bump, so inline it. - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (in && in->size) { - upb_TaggedAuxPtr ptr = in->aux_data[in->size - 1]; - if (upb_TaggedAuxPtr_IsUnknown(ptr)) { - upb_StringView* existing = upb_TaggedAuxPtr_UnknownData(ptr); - bool was_aliased = upb_TaggedAuxPtr_IsUnknownAliased(ptr); - // Fast path if the field we're adding is immediately after the last - // added unknown field. - if (was_aliased && existing->data + existing->size == data) { - existing->size += len; - return true; - } - } - } - } - return UPB_PRIVATE(_upb_Message_AddUnknownSlowPath)(msg, data, len, arena, - alias); -} - -// Adds unknown data (serialized protobuf data) to the given message. -// The data is copied into the message instance. Data when concatenated together -// must represent one or more complete and well formed proto fields, but the -// individual spans may point only to partial fields. -bool UPB_PRIVATE(_upb_Message_AddUnknownV)(struct upb_Message* msg, - upb_Arena* arena, - upb_StringView data[], size_t count); - -// Ensures at least one slot is available in the aux_data of this message. -// Returns false if a reallocation is needed to satisfy the request, and fails. -bool UPB_PRIVATE(_upb_Message_ReserveSlot)(struct upb_Message* msg, - upb_Arena* arena); - -#define kUpb_Message_UnknownBegin 0 -#define kUpb_Message_ExtensionBegin 0 - -UPB_INLINE bool upb_Message_NextUnknown(const struct upb_Message* msg, - upb_StringView* data, uintptr_t* iter) { - const upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - size_t i = *iter; - if (in) { - while (i < in->size) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i++]; - if (upb_TaggedAuxPtr_IsUnknown(tagged_ptr)) { - *data = *upb_TaggedAuxPtr_UnknownData(tagged_ptr); - *iter = i; - return true; - } - } - } - data->size = 0; - data->data = NULL; - *iter = i; - return false; -} - -UPB_INLINE bool upb_Message_HasUnknown(const struct upb_Message* msg) { - upb_StringView data; - uintptr_t iter = kUpb_Message_UnknownBegin; - return upb_Message_NextUnknown(msg, &data, &iter); -} - -UPB_INLINE bool upb_Message_NextExtension(const struct upb_Message* msg, - const upb_MiniTableExtension** out_e, - upb_MessageValue* out_v, - uintptr_t* iter) { - const upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - uintptr_t i = *iter; - if (in) { - while (i < in->size) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i++]; - if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - const upb_Extension* ext = upb_TaggedAuxPtr_Extension(tagged_ptr); - - // Empty repeated fields or maps semantically don't exist. - if (UPB_PRIVATE(_upb_Extension_IsEmpty)(ext)) continue; - - *out_e = ext->ext; - *out_v = ext->data; - *iter = i; - return true; - } - } - } - *iter = i; - - return false; -} - -UPB_INLINE bool UPB_PRIVATE(_upb_Message_NextExtensionReverse)( - const struct upb_Message* msg, const upb_MiniTableExtension** out_e, - upb_MessageValue* out_v, uintptr_t* iter) { - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) return false; - uintptr_t i = *iter; - uint32_t size = in->size; - while (i < size) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[size - 1 - i]; - i++; - if (!upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - continue; - } - const upb_Extension* ext = upb_TaggedAuxPtr_Extension(tagged_ptr); - - // Empty repeated fields or maps semantically don't exist. - if (UPB_PRIVATE(_upb_Extension_IsEmpty)(ext)) continue; - - *out_e = ext->ext; - *out_v = ext->data; - *iter = i; - return true; - } - *iter = i; - return false; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_INTERNAL_MESSAGE_H_ */ - -// Must be last. - -typedef struct upb_Message upb_Message; - -#ifdef __cplusplus -extern "C" { -#endif - -// Creates a new message with the given mini_table on the given arena. -UPB_API upb_Message* upb_Message_New(const upb_MiniTable* m, upb_Arena* arena); - -// -// Unknown data may be stored non-contiguously. Each segment stores a block of -// unknown fields. To iterate over segments: -// -// uintptr_t iter = kUpb_Message_UnknownBegin; -// upb_StringView data; -// while (upb_Message_NextUnknown(msg, &data, &iter)) { -// // Use data -// } -// Iterates in the order unknown fields were parsed. - -#define kUpb_Message_UnknownBegin 0 -#define kUpb_Message_ExtensionBegin 0 - -UPB_INLINE bool upb_Message_NextUnknown(const upb_Message* msg, - upb_StringView* data, uintptr_t* iter); - -UPB_INLINE bool upb_Message_HasUnknown(const upb_Message* msg); - -// Removes a segment of unknown data from the message, advancing to the next -// segment. Returns false if the removed segment was at the end of the last -// chunk. -// -// This must be done while iterating: -// -// uintptr_t iter = kUpb_Message_UnknownBegin; -// upb_StringView data; -// // Iterate chunks -// while (upb_Message_NextUnknown(msg, &data, &iter)) { -// // Iterate within a chunk, deleting ranges -// while (ShouldDeleteSubSegment(&data)) { -// // Data now points to the region to be deleted -// switch (upb_Message_DeleteUnknown(msg, &data, &iter)) { -// case kUpb_Message_DeleteUnknown_DeletedLast: return ok; -// case kUpb_Message_DeleteUnknown_IterUpdated: break; -// // If DeleteUnknown returned kUpb_Message_DeleteUnknown_IterUpdated, -// // then data now points to the remaining unknown fields after the -// // region that was just deleted. -// case kUpb_Message_DeleteUnknown_AllocFail: return err; -// } -// } -// } -// -// The range given in `data` must be contained inside the most recently -// returned region. -typedef enum upb_Message_DeleteUnknownStatus { - kUpb_DeleteUnknown_DeletedLast, - kUpb_DeleteUnknown_IterUpdated, - kUpb_DeleteUnknown_AllocFail, -} upb_Message_DeleteUnknownStatus; -upb_Message_DeleteUnknownStatus upb_Message_DeleteUnknown(upb_Message* msg, - upb_StringView* data, - uintptr_t* iter, - upb_Arena* arena); - -// Returns the number of extensions present in this message. -size_t upb_Message_ExtensionCount(const upb_Message* msg); - -// Iterates extensions in wire order -UPB_INLINE bool upb_Message_NextExtension(const upb_Message* msg, - const upb_MiniTableExtension** out_e, - upb_MessageValue* out_v, - uintptr_t* iter); - -// Iterates extensions in reverse wire order -UPB_INLINE bool UPB_PRIVATE(_upb_Message_NextExtensionReverse)( - const struct upb_Message* msg, const upb_MiniTableExtension** out_e, - upb_MessageValue* out_v, uintptr_t* iter); - -// Mark a message and all of its descendents as frozen/immutable. -UPB_API void upb_Message_Freeze(upb_Message* msg, const upb_MiniTable* m); - -// Returns whether a message has been frozen. -UPB_API_INLINE bool upb_Message_IsFrozen(const upb_Message* msg); - -#ifdef UPB_TRACING_ENABLED -UPB_API void upb_Message_LogNewMessage(const upb_MiniTable* m, - const upb_Arena* arena); - -UPB_API void upb_Message_SetNewMessageTraceHandler( - void (*handler)(const upb_MiniTable* m, const upb_Arena* arena)); -#endif // UPB_TRACING_ENABLED - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_MESSAGE_H_ */ - -#ifndef UPB_REFLECTION_DEF_H_ -#define UPB_REFLECTION_DEF_H_ - -// IWYU pragma: begin_exports - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_DEF_POOL_H_ -#define UPB_REFLECTION_DEF_POOL_H_ - - -// IWYU pragma: private, include "upb/reflection/def.h" - -// Declarations common to all public def types. - -#ifndef UPB_REFLECTION_COMMON_H_ -#define UPB_REFLECTION_COMMON_H_ - -#ifndef GOOGLE_UPB_UPB_REFLECTION_DESCRIPTOR_BOOTSTRAP_H__ -#define GOOGLE_UPB_UPB_REFLECTION_DESCRIPTOR_BOOTSTRAP_H__ - -// IWYU pragma: begin_exports - -#if defined(UPB_BOOTSTRAP_STAGE) && UPB_BOOTSTRAP_STAGE == 0 -// This header is checked in. -#elif defined(UPB_BOOTSTRAP_STAGE) && UPB_BOOTSTRAP_STAGE == 1 -// This header is generated at build time by the bootstrapping process. -#else -// This is the normal header, generated by upb_c_proto_library(). -/* This file was generated by upb_generator from the input file: - * - * google/protobuf/descriptor.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. - * NO CHECKED-IN PROTOBUF GENCODE */ - -#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H__UPB_H_ -#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H__UPB_H_ - - -#ifndef UPB_GENERATED_CODE_SUPPORT_H_ -#define UPB_GENERATED_CODE_SUPPORT_H_ - -// IWYU pragma: begin_exports - -#ifndef UPB_BASE_UPCAST_H_ -#define UPB_BASE_UPCAST_H_ - -// Must be last. - -// This macro provides a way to upcast message pointers in a way that is -// somewhat more bulletproof than blindly casting a pointer. Example: -// -// typedef struct { -// upb_Message UPB_PRIVATE(base); -// } pkg_FooMessage; -// -// void f(pkg_FooMessage* msg) { -// upb_Decode(UPB_UPCAST(msg), ...); -// } - -#define UPB_UPCAST(x) (&(x)->base##_dont_copy_me__upb_internal_use_only) - - -#endif /* UPB_BASE_UPCAST_H_ */ - -#ifndef UPB_MESSAGE_ACCESSORS_H_ -#define UPB_MESSAGE_ACCESSORS_H_ - -#include - - -#ifndef UPB_MESSAGE_INTERNAL_ACCESSORS_H_ -#define UPB_MESSAGE_INTERNAL_ACCESSORS_H_ - -#include -#include -#include - - -#ifndef UPB_BASE_INTERNAL_ENDIAN_H_ -#define UPB_BASE_INTERNAL_ENDIAN_H_ - -#include - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE bool upb_IsLittleEndian(void) { - const int x = 1; - return *(char*)&x == 1; -} - -UPB_INLINE uint32_t upb_BigEndian32(uint32_t val) { - if (upb_IsLittleEndian()) return val; - - return ((val & 0xff) << 24) | ((val & 0xff00) << 8) | - ((val & 0xff0000) >> 8) | ((val & 0xff000000) >> 24); -} - -UPB_INLINE uint64_t upb_BigEndian64(uint64_t val) { - if (upb_IsLittleEndian()) return val; - - const uint64_t hi = ((uint64_t)upb_BigEndian32((uint32_t)val)) << 32; - const uint64_t lo = upb_BigEndian32((uint32_t)(val >> 32)); - return hi | lo; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_BASE_INTERNAL_ENDIAN_H_ */ - -#ifndef UPB_MINI_TABLE_INTERNAL_TAGGED_PTR_H_ -#define UPB_MINI_TABLE_INTERNAL_TAGGED_PTR_H_ - -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Internal-only because empty messages cannot be created by the user. -UPB_INLINE uintptr_t -UPB_PRIVATE(_upb_TaggedMessagePtr_Pack)(struct upb_Message* ptr, bool empty) { - UPB_ASSERT(((uintptr_t)ptr & 1) == 0); - return (uintptr_t)ptr | (empty ? 1 : 0); -} - -UPB_API_INLINE bool upb_TaggedMessagePtr_IsEmpty(uintptr_t ptr) { - return ptr & 1; -} - -UPB_INLINE struct upb_Message* UPB_PRIVATE(_upb_TaggedMessagePtr_GetMessage)( - uintptr_t ptr) { - return (struct upb_Message*)(ptr & ~(uintptr_t)1); -} - -UPB_API_INLINE struct upb_Message* upb_TaggedMessagePtr_GetNonEmptyMessage( - uintptr_t ptr) { - UPB_ASSERT(!upb_TaggedMessagePtr_IsEmpty(ptr)); - return UPB_PRIVATE(_upb_TaggedMessagePtr_GetMessage)(ptr); -} - -UPB_INLINE struct upb_Message* UPB_PRIVATE( - _upb_TaggedMessagePtr_GetEmptyMessage)(uintptr_t ptr) { - UPB_ASSERT(upb_TaggedMessagePtr_IsEmpty(ptr)); - return UPB_PRIVATE(_upb_TaggedMessagePtr_GetMessage)(ptr); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_TAGGED_PTR_H_ */ - -// Must be last. - -#if defined(__GNUC__) && !defined(__clang__) -// GCC raises incorrect warnings in these functions. It thinks that we are -// overrunning buffers, but we carefully write the functions in this file to -// guarantee that this is impossible. GCC gets this wrong due it its failure -// to perform constant propagation as we expect: -// - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108217 -// - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108226 -// -// Unfortunately this also indicates that GCC is not optimizing away the -// switch() in cases where it should be, compromising the performance. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Warray-bounds" -#pragma GCC diagnostic ignored "-Wstringop-overflow" -#if __GNUC__ >= 11 -#pragma GCC diagnostic ignored "-Wstringop-overread" -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -// LINT.IfChange(presence_logic) - -// Hasbit access /////////////////////////////////////////////////////////////// - -UPB_INLINE bool UPB_PRIVATE(_upb_Message_GetHasbit)( - const struct upb_Message* msg, const upb_MiniTableField* f) { - const uint16_t offset = UPB_PRIVATE(_upb_MiniTableField_HasbitOffset)(f); - const char mask = UPB_PRIVATE(_upb_MiniTableField_HasbitMask)(f); - - return (*UPB_PTR_AT(msg, offset, const char) & mask) != 0; -} - -UPB_INLINE void UPB_PRIVATE(_upb_Message_SetHasbit)( - const struct upb_Message* msg, const upb_MiniTableField* f) { - const uint16_t offset = UPB_PRIVATE(_upb_MiniTableField_HasbitOffset)(f); - const char mask = UPB_PRIVATE(_upb_MiniTableField_HasbitMask)(f); - - (*UPB_PTR_AT(msg, offset, char)) |= mask; -} - -UPB_INLINE void UPB_PRIVATE(_upb_Message_ClearHasbit)( - const struct upb_Message* msg, const upb_MiniTableField* f) { - const uint16_t offset = UPB_PRIVATE(_upb_MiniTableField_HasbitOffset)(f); - const char mask = UPB_PRIVATE(_upb_MiniTableField_HasbitMask)(f); - - (*UPB_PTR_AT(msg, offset, char)) &= ~mask; -} - -// Oneof case access /////////////////////////////////////////////////////////// - -UPB_INLINE uint32_t* UPB_PRIVATE(_upb_Message_OneofCasePtr)( - struct upb_Message* msg, const upb_MiniTableField* f) { - return UPB_PTR_AT(msg, UPB_PRIVATE(_upb_MiniTableField_OneofOffset)(f), - uint32_t); -} - -UPB_INLINE uint32_t UPB_PRIVATE(_upb_Message_GetOneofCase)( - const struct upb_Message* msg, const upb_MiniTableField* f) { - const uint32_t* ptr = - UPB_PRIVATE(_upb_Message_OneofCasePtr)((struct upb_Message*)msg, f); - - return *ptr; -} - -UPB_INLINE void UPB_PRIVATE(_upb_Message_SetOneofCase)( - struct upb_Message* msg, const upb_MiniTableField* f) { - uint32_t* ptr = UPB_PRIVATE(_upb_Message_OneofCasePtr)(msg, f); - - *ptr = upb_MiniTableField_Number(f); -} - -// Returns true if the given field is the current oneof case. -// Does nothing if it is not the current oneof case. -UPB_INLINE bool UPB_PRIVATE(_upb_Message_ClearOneofCase)( - struct upb_Message* msg, const upb_MiniTableField* f) { - uint32_t* ptr = UPB_PRIVATE(_upb_Message_OneofCasePtr)(msg, f); - - if (*ptr != upb_MiniTableField_Number(f)) return false; - *ptr = 0; - return true; -} - -UPB_API_INLINE uint32_t upb_Message_WhichOneofFieldNumber( - const struct upb_Message* message, const upb_MiniTableField* oneof_field) { - UPB_ASSUME(upb_MiniTableField_IsInOneof(oneof_field)); - return UPB_PRIVATE(_upb_Message_GetOneofCase)(message, oneof_field); -} - -UPB_API_INLINE const upb_MiniTableField* upb_Message_WhichOneof( - const struct upb_Message* msg, const upb_MiniTable* m, - const upb_MiniTableField* f) { - uint32_t field_number = upb_Message_WhichOneofFieldNumber(msg, f); - if (field_number == 0) { - // No field in the oneof is set. - return NULL; - } - return upb_MiniTable_FindFieldByNumber(m, field_number); -} - -// LINT.ThenChange(GoogleInternalName2) - -// Returns false if the message is missing any of its required fields. -UPB_INLINE bool UPB_PRIVATE(_upb_Message_IsInitializedShallow)( - const struct upb_Message* msg, const upb_MiniTable* m) { - uint64_t bits; - memcpy(&bits, msg + 1, sizeof(bits)); - bits = upb_BigEndian64(bits); - return (UPB_PRIVATE(_upb_MiniTable_RequiredMask)(m) & ~bits) == 0; -} - -UPB_INLINE void* UPB_PRIVATE(_upb_Message_MutableDataPtr)( - struct upb_Message* msg, const upb_MiniTableField* f) { - return (char*)msg + f->UPB_ONLYBITS(offset); -} - -UPB_INLINE const void* UPB_PRIVATE(_upb_Message_DataPtr)( - const struct upb_Message* msg, const upb_MiniTableField* f) { - return (const char*)msg + f->UPB_ONLYBITS(offset); -} - -UPB_INLINE void UPB_PRIVATE(_upb_Message_SetPresence)( - struct upb_Message* msg, const upb_MiniTableField* f) { - if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)) { - UPB_PRIVATE(_upb_Message_SetHasbit)(msg, f); - } else if (upb_MiniTableField_IsInOneof(f)) { - UPB_PRIVATE(_upb_Message_SetOneofCase)(msg, f); - } -} - -UPB_INLINE_IF_NOT_GCC void UPB_PRIVATE(_upb_MiniTableField_DataCopy)( - const upb_MiniTableField* f, void* to, const void* from) { - switch (UPB_PRIVATE(_upb_MiniTableField_GetRep)(f)) { - case kUpb_FieldRep_1Byte: - memcpy(to, from, 1); - return; - case kUpb_FieldRep_4Byte: - memcpy(to, from, 4); - return; - case kUpb_FieldRep_8Byte: - memcpy(to, from, 8); - return; - case kUpb_FieldRep_StringView: { - memcpy(to, from, sizeof(upb_StringView)); - return; - } - } - UPB_UNREACHABLE(); -} - -UPB_INLINE_IF_NOT_GCC bool UPB_PRIVATE(_upb_MiniTableField_DataEquals)( - const upb_MiniTableField* f, const void* a, const void* b) { - switch (UPB_PRIVATE(_upb_MiniTableField_GetRep)(f)) { - case kUpb_FieldRep_1Byte: - return memcmp(a, b, 1) == 0; - case kUpb_FieldRep_4Byte: - return memcmp(a, b, 4) == 0; - case kUpb_FieldRep_8Byte: - return memcmp(a, b, 8) == 0; - case kUpb_FieldRep_StringView: { - const upb_StringView sa = *(const upb_StringView*)a; - const upb_StringView sb = *(const upb_StringView*)b; - return upb_StringView_IsEqual(sa, sb); - } - } - UPB_UNREACHABLE(); -} - -UPB_INLINE void UPB_PRIVATE(_upb_MiniTableField_DataClear)( - const upb_MiniTableField* f, void* val) { - const char zero[16] = {0}; - UPB_PRIVATE(_upb_MiniTableField_DataCopy)(f, val, zero); -} - -UPB_INLINE bool UPB_PRIVATE(_upb_MiniTableField_DataIsZero)( - const upb_MiniTableField* f, const void* val) { - const char zero[16] = {0}; - return UPB_PRIVATE(_upb_MiniTableField_DataEquals)(f, val, zero); -} - -// Here we define universal getter/setter functions for message fields. -// These look very branchy and inefficient, but as long as the MiniTableField -// values are known at compile time, all the branches are optimized away and -// we are left with ideal code. This can happen either through through -// literals or UPB_ASSUME(): -// -// // Via struct literals. -// bool FooMessage_set_bool_field(const upb_Message* msg, bool val) { -// const upb_MiniTableField field = {1, 0, 0, /* etc... */}; -// // All value in "field" are compile-time known. -// upb_Message_SetBaseField(msg, &field, &value); -// } -// -// // Via UPB_ASSUME(). -// UPB_INLINE bool upb_Message_SetBool(upb_Message* msg, -// const upb_MiniTableField* field, -// bool value, upb_Arena* a) { -// UPB_ASSUME(field->UPB_PRIVATE(descriptortype) == kUpb_FieldType_Bool); -// UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(field) == -// kUpb_FieldRep_1Byte); -// upb_Message_SetField(msg, field, &value, a); -// } -// -// As a result, we can use these universal getters/setters for *all* message -// accessors: generated code, MiniTable accessors, and reflection. The only -// exception is the binary encoder/decoder, which need to be a bit more clever -// about how they read/write the message data, for efficiency. -// -// These functions work on both extensions and non-extensions. If the field -// of a setter is known to be a non-extension, the arena may be NULL and the -// returned bool value may be ignored since it will always succeed. - -UPB_API_INLINE bool upb_Message_HasBaseField(const struct upb_Message* msg, - const upb_MiniTableField* field) { - UPB_ASSERT(upb_MiniTableField_HasPresence(field)); - UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); - if (upb_MiniTableField_IsInOneof(field)) { - return UPB_PRIVATE(_upb_Message_GetOneofCase)(msg, field) == - upb_MiniTableField_Number(field); - } else { - return UPB_PRIVATE(_upb_Message_GetHasbit)(msg, field); - } -} - -UPB_API_INLINE bool upb_Message_HasExtension(const struct upb_Message* msg, - const upb_MiniTableExtension* e) { - UPB_ASSERT(upb_MiniTableField_HasPresence(&e->UPB_PRIVATE(field))); - return UPB_PRIVATE(_upb_Message_Getext)(msg, e) != NULL; -} - -UPB_FORCEINLINE void _upb_Message_GetNonExtensionField( - const struct upb_Message* msg, const upb_MiniTableField* field, - const void* default_val, void* val) { - UPB_ASSUME(!upb_MiniTableField_IsExtension(field)); - if ((upb_MiniTableField_IsInOneof(field) || - !UPB_PRIVATE(_upb_MiniTableField_DataIsZero)(field, default_val)) && - !upb_Message_HasBaseField(msg, field)) { - UPB_PRIVATE(_upb_MiniTableField_DataCopy)(field, val, default_val); - return; - } - UPB_PRIVATE(_upb_MiniTableField_DataCopy) - (field, val, UPB_PRIVATE(_upb_Message_DataPtr)(msg, field)); -} - -UPB_INLINE void _upb_Message_GetExtensionField( - const struct upb_Message* msg, const upb_MiniTableExtension* mt_ext, - const void* default_val, void* val) { - const upb_Extension* ext = UPB_PRIVATE(_upb_Message_Getext)(msg, mt_ext); - const upb_MiniTableField* f = &mt_ext->UPB_PRIVATE(field); - UPB_ASSUME(upb_MiniTableField_IsExtension(f)); - - if (ext) { - UPB_PRIVATE(_upb_MiniTableField_DataCopy)(f, val, &ext->data); - } else { - UPB_PRIVATE(_upb_MiniTableField_DataCopy)(f, val, default_val); - } -} - -// NOTE: The default_val is only used for fields that support presence. -// For repeated/map fields, the resulting upb_Array*/upb_Map* can be NULL if a -// upb_Array/upb_Map has not been allocated yet. Array/map fields do not have -// presence, so this is semantically identical to a pointer to an empty -// array/map, and must be treated the same for all semantic purposes. -UPB_API_INLINE upb_MessageValue upb_Message_GetField( - const struct upb_Message* msg, const upb_MiniTableField* field, - upb_MessageValue default_val) { - upb_MessageValue ret; - if (upb_MiniTableField_IsExtension(field)) { - _upb_Message_GetExtensionField(msg, (upb_MiniTableExtension*)field, - &default_val, &ret); - } else { - _upb_Message_GetNonExtensionField(msg, field, &default_val, &ret); - } - return ret; -} - -UPB_API_INLINE void upb_Message_SetBaseField(struct upb_Message* msg, - const upb_MiniTableField* f, - const void* val) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - UPB_ASSUME(!upb_MiniTableField_IsExtension(f)); - UPB_PRIVATE(_upb_Message_SetPresence)(msg, f); - UPB_PRIVATE(_upb_MiniTableField_DataCopy) - (f, UPB_PRIVATE(_upb_Message_MutableDataPtr)(msg, f), val); -} - -UPB_API_INLINE bool upb_Message_SetExtension(struct upb_Message* msg, - const upb_MiniTableExtension* e, - const void* val, upb_Arena* a) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - UPB_ASSERT(a); - upb_Extension* ext = - UPB_PRIVATE(_upb_Message_GetOrCreateExtension)(msg, e, a); - if (!ext) return false; - UPB_PRIVATE(_upb_MiniTableField_DataCopy) - (&e->UPB_PRIVATE(field), &ext->data, val); - return true; -} - -// Sets the value of the given field in the given msg. The return value is true -// if the operation completed successfully, or false if memory allocation -// failed. -UPB_INLINE bool UPB_PRIVATE(_upb_Message_SetField)(struct upb_Message* msg, - const upb_MiniTableField* f, - upb_MessageValue val, - upb_Arena* a) { - if (upb_MiniTableField_IsExtension(f)) { - const upb_MiniTableExtension* ext = (const upb_MiniTableExtension*)f; - return upb_Message_SetExtension(msg, ext, &val, a); - } else { - upb_Message_SetBaseField(msg, f, &val); - return true; - } -} - -UPB_API_INLINE const upb_Array* upb_Message_GetArray( - const struct upb_Message* msg, const upb_MiniTableField* f) { - UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(f); - upb_Array* ret; - const upb_Array* default_val = NULL; - _upb_Message_GetNonExtensionField(msg, f, &default_val, &ret); - return ret; -} - -UPB_API_INLINE bool upb_Message_GetBool(const struct upb_Message* msg, - const upb_MiniTableField* f, - bool default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Bool); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_1Byte); - upb_MessageValue def; - def.bool_val = default_val; - return upb_Message_GetField(msg, f, def).bool_val; -} - -UPB_API_INLINE double upb_Message_GetDouble(const struct upb_Message* msg, - const upb_MiniTableField* f, - double default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Double); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_8Byte); - - upb_MessageValue def; - def.double_val = default_val; - return upb_Message_GetField(msg, f, def).double_val; -} - -UPB_API_INLINE float upb_Message_GetFloat(const struct upb_Message* msg, - const upb_MiniTableField* f, - float default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Float); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_4Byte); - - upb_MessageValue def; - def.float_val = default_val; - return upb_Message_GetField(msg, f, def).float_val; -} - -UPB_API_INLINE int32_t upb_Message_GetInt32(const struct upb_Message* msg, - const upb_MiniTableField* f, - int32_t default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Int32 || - upb_MiniTableField_CType(f) == kUpb_CType_Enum); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_4Byte); - - upb_MessageValue def; - def.int32_val = default_val; - return upb_Message_GetField(msg, f, def).int32_val; -} - -UPB_API_INLINE int64_t upb_Message_GetInt64(const struct upb_Message* msg, - const upb_MiniTableField* f, - int64_t default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Int64); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_8Byte); - - upb_MessageValue def; - def.int64_val = default_val; - return upb_Message_GetField(msg, f, def).int64_val; -} - -UPB_INLINE void UPB_PRIVATE(_upb_Message_AssertMapIsUntagged)( - const struct upb_Message* msg, const upb_MiniTableField* field) { - UPB_UNUSED(msg); - UPB_PRIVATE(_upb_MiniTableField_CheckIsMap)(field); -#ifndef NDEBUG - uintptr_t default_val = 0; - uintptr_t tagged; - _upb_Message_GetNonExtensionField(msg, field, &default_val, &tagged); - UPB_ASSERT(!upb_TaggedMessagePtr_IsEmpty(tagged)); -#endif -} - -UPB_API_INLINE const struct upb_Map* upb_Message_GetMap( - const struct upb_Message* msg, const upb_MiniTableField* f) { - UPB_PRIVATE(_upb_MiniTableField_CheckIsMap)(f); - UPB_PRIVATE(_upb_Message_AssertMapIsUntagged)(msg, f); - struct upb_Map* ret; - const struct upb_Map* default_val = NULL; - _upb_Message_GetNonExtensionField(msg, f, &default_val, &ret); - return ret; -} - -UPB_API_INLINE uintptr_t upb_Message_GetTaggedMessagePtr( - const struct upb_Message* msg, const upb_MiniTableField* f, - struct upb_Message* default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Message); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == - UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte)); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - uintptr_t tagged; - _upb_Message_GetNonExtensionField(msg, f, &default_val, &tagged); - return tagged; -} - -// For internal use only; users cannot set tagged messages because only the -// parser and the message copier are allowed to directly create an empty -// message. -UPB_INLINE void UPB_PRIVATE(_upb_Message_SetTaggedMessagePtr)( - struct upb_Message* msg, const upb_MiniTableField* f, - uintptr_t sub_message) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Message); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == - UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte)); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - upb_Message_SetBaseField(msg, f, &sub_message); -} - -UPB_API_INLINE const struct upb_Message* upb_Message_GetMessage( - const struct upb_Message* msg, const upb_MiniTableField* f) { - uintptr_t tagged = upb_Message_GetTaggedMessagePtr(msg, f, NULL); - return upb_TaggedMessagePtr_GetNonEmptyMessage(tagged); -} - -UPB_API_INLINE upb_Array* upb_Message_GetMutableArray( - struct upb_Message* msg, const upb_MiniTableField* f) { - UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(f); - return (upb_Array*)upb_Message_GetArray(msg, f); -} - -UPB_API_INLINE struct upb_Map* upb_Message_GetMutableMap( - struct upb_Message* msg, const upb_MiniTableField* f) { - return (struct upb_Map*)upb_Message_GetMap(msg, f); -} - -UPB_API_INLINE struct upb_Message* upb_Message_GetMutableMessage( - struct upb_Message* msg, const upb_MiniTableField* f) { - return (struct upb_Message*)upb_Message_GetMessage(msg, f); -} - -UPB_API_INLINE upb_Array* upb_Message_GetOrCreateMutableArray( - struct upb_Message* msg, const upb_MiniTableField* f, upb_Arena* arena) { - UPB_ASSERT(arena); - UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(f); - upb_Array* array = upb_Message_GetMutableArray(msg, f); - if (!array) { - array = UPB_PRIVATE(_upb_Array_New)( - arena, 4, UPB_PRIVATE(_upb_MiniTableField_ElemSizeLg2)(f)); - // Check again due to: https://godbolt.org/z/7WfaoKG1r - UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(f); - upb_MessageValue val; - val.array_val = array; - UPB_PRIVATE(_upb_Message_SetField)(msg, f, val, arena); - } - return array; -} - -UPB_INLINE struct upb_Map* _upb_Message_GetOrCreateMutableMap( - struct upb_Message* msg, const upb_MiniTableField* field, size_t key_size, - size_t val_size, upb_Arena* arena) { - UPB_PRIVATE(_upb_MiniTableField_CheckIsMap)(field); - UPB_PRIVATE(_upb_Message_AssertMapIsUntagged)(msg, field); - struct upb_Map* map = NULL; - struct upb_Map* default_map_value = NULL; - _upb_Message_GetNonExtensionField(msg, field, &default_map_value, &map); - if (!map) { - map = _upb_Map_New(arena, key_size, val_size); - // Check again due to: https://godbolt.org/z/7WfaoKG1r - UPB_PRIVATE(_upb_MiniTableField_CheckIsMap)(field); - upb_Message_SetBaseField(msg, field, &map); - } - return map; -} - -UPB_API_INLINE struct upb_Map* upb_Message_GetOrCreateMutableMap( - struct upb_Message* msg, const upb_MiniTable* map_entry_mini_table, - const upb_MiniTableField* f, upb_Arena* arena) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Message); - const upb_MiniTableField* map_entry_key_field = - &map_entry_mini_table->UPB_ONLYBITS(fields)[0]; - const upb_MiniTableField* map_entry_value_field = - &map_entry_mini_table->UPB_ONLYBITS(fields)[1]; - return _upb_Message_GetOrCreateMutableMap( - msg, f, _upb_Map_CTypeSize(upb_MiniTableField_CType(map_entry_key_field)), - _upb_Map_CTypeSize(upb_MiniTableField_CType(map_entry_value_field)), - arena); -} - -UPB_API_INLINE struct upb_Message* upb_Message_GetOrCreateMutableMessage( - struct upb_Message* msg, const upb_MiniTable* mini_table, - const upb_MiniTableField* f, upb_Arena* arena) { - UPB_ASSERT(arena); - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Message); - UPB_ASSUME(!upb_MiniTableField_IsExtension(f)); - struct upb_Message* sub_message = - *UPB_PTR_AT(msg, f->UPB_ONLYBITS(offset), struct upb_Message*); - if (!sub_message) { - const upb_MiniTable* sub_mini_table = - upb_MiniTable_SubMessage(mini_table, f); - UPB_ASSERT(sub_mini_table); - sub_message = _upb_Message_New(sub_mini_table, arena); - *UPB_PTR_AT(msg, f->UPB_ONLYBITS(offset), struct upb_Message*) = - sub_message; - UPB_PRIVATE(_upb_Message_SetPresence)(msg, f); - } - return sub_message; -} - -UPB_API_INLINE upb_StringView -upb_Message_GetString(const struct upb_Message* msg, - const upb_MiniTableField* f, upb_StringView default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_String || - upb_MiniTableField_CType(f) == kUpb_CType_Bytes); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == - kUpb_FieldRep_StringView); - - upb_MessageValue def; - def.str_val = default_val; - return upb_Message_GetField(msg, f, def).str_val; -} - -UPB_API_INLINE uint32_t upb_Message_GetUInt32(const struct upb_Message* msg, - const upb_MiniTableField* f, - uint32_t default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_UInt32); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_4Byte); - - upb_MessageValue def; - def.uint32_val = default_val; - return upb_Message_GetField(msg, f, def).uint32_val; -} - -UPB_API_INLINE uint64_t upb_Message_GetUInt64(const struct upb_Message* msg, - const upb_MiniTableField* f, - uint64_t default_val) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_UInt64); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_8Byte); - - upb_MessageValue def; - def.uint64_val = default_val; - return upb_Message_GetField(msg, f, def).uint64_val; -} - -// BaseField Setters /////////////////////////////////////////////////////////// - -UPB_API_INLINE void upb_Message_SetBaseFieldBool(struct upb_Message* msg, - const upb_MiniTableField* f, - bool value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Bool); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_1Byte); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldDouble(struct upb_Message* msg, - const upb_MiniTableField* f, - double value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Double); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_8Byte); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldFloat(struct upb_Message* msg, - const upb_MiniTableField* f, - float value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Float); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_4Byte); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldInt32(struct upb_Message* msg, - const upb_MiniTableField* f, - int32_t value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Int32 || - upb_MiniTableField_CType(f) == kUpb_CType_Enum); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_4Byte); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldInt64(struct upb_Message* msg, - const upb_MiniTableField* f, - int64_t value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_Int64); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_8Byte); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldMessage(struct upb_Message* msg, - const upb_MiniTableField* f, - struct upb_Message* value) { - UPB_PRIVATE(_upb_Message_SetTaggedMessagePtr) - (msg, f, UPB_PRIVATE(_upb_TaggedMessagePtr_Pack)(value, false)); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldString(struct upb_Message* msg, - const upb_MiniTableField* f, - upb_StringView value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_String || - upb_MiniTableField_CType(f) == kUpb_CType_Bytes); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == - kUpb_FieldRep_StringView); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldUInt32(struct upb_Message* msg, - const upb_MiniTableField* f, - uint32_t value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_UInt32); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_4Byte); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetBaseFieldUInt64(struct upb_Message* msg, - const upb_MiniTableField* f, - uint64_t value) { - UPB_ASSUME(upb_MiniTableField_CType(f) == kUpb_CType_UInt64); - UPB_ASSUME(upb_MiniTableField_IsScalar(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_8Byte); - upb_Message_SetBaseField(msg, f, &value); -} - -UPB_API_INLINE void upb_Message_SetClosedEnum(struct upb_Message* msg, - const upb_MiniTable* m, - const upb_MiniTableField* f, - int32_t value) { - UPB_ASSERT(upb_MiniTableField_IsClosedEnum(f)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(f) == kUpb_FieldRep_4Byte); - UPB_ASSERT( - upb_MiniTableEnum_CheckValue(upb_MiniTable_GetSubEnumTable(m, f), value)); - upb_Message_SetBaseField(msg, f, &value); -} - -// Extension Setters /////////////////////////////////////////////////////////// - -UPB_API_INLINE bool upb_Message_SetExtensionBool( - struct upb_Message* msg, const upb_MiniTableExtension* e, bool value, - upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Bool); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_1Byte); - return upb_Message_SetExtension(msg, e, &value, a); -} - -UPB_API_INLINE bool upb_Message_SetExtensionDouble( - struct upb_Message* msg, const upb_MiniTableExtension* e, double value, - upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Double); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_8Byte); - return upb_Message_SetExtension(msg, e, &value, a); -} - -UPB_API_INLINE bool upb_Message_SetExtensionFloat( - struct upb_Message* msg, const upb_MiniTableExtension* e, float value, - upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Float); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_4Byte); - return upb_Message_SetExtension(msg, e, &value, a); -} - -UPB_API_INLINE bool upb_Message_SetExtensionInt32( - struct upb_Message* msg, const upb_MiniTableExtension* e, int32_t value, - upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Int32 || - upb_MiniTableExtension_CType(e) == kUpb_CType_Enum); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_4Byte); - return upb_Message_SetExtension(msg, e, &value, a); -} - -UPB_API_INLINE bool upb_Message_SetExtensionInt64( - struct upb_Message* msg, const upb_MiniTableExtension* e, int64_t value, - upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Int64); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_8Byte); - return upb_Message_SetExtension(msg, e, &value, a); -} - -UPB_API_INLINE bool upb_Message_SetExtensionString( - struct upb_Message* msg, const upb_MiniTableExtension* e, - upb_StringView value, upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_String || - upb_MiniTableExtension_CType(e) == kUpb_CType_Bytes); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_StringView); - return upb_Message_SetExtension(msg, e, &value, a); -} - -UPB_API_INLINE bool upb_Message_SetExtensionUInt32( - struct upb_Message* msg, const upb_MiniTableExtension* e, uint32_t value, - upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_UInt32); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_4Byte); - return upb_Message_SetExtension(msg, e, &value, a); -} - -UPB_API_INLINE bool upb_Message_SetExtensionUInt64( - struct upb_Message* msg, const upb_MiniTableExtension* e, uint64_t value, - upb_Arena* a) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_UInt64); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_8Byte); - return upb_Message_SetExtension(msg, e, &value, a); -} - -// Universal Setters /////////////////////////////////////////////////////////// - -UPB_API_INLINE bool upb_Message_SetBool(struct upb_Message* msg, - const upb_MiniTableField* f, bool value, - upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionBool( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldBool(msg, f, value), true); -} - -UPB_API_INLINE bool upb_Message_SetDouble(struct upb_Message* msg, - const upb_MiniTableField* f, - double value, upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionDouble( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldDouble(msg, f, value), true); -} - -UPB_API_INLINE bool upb_Message_SetFloat(struct upb_Message* msg, - const upb_MiniTableField* f, - float value, upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionFloat( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldFloat(msg, f, value), true); -} - -UPB_API_INLINE bool upb_Message_SetInt32(struct upb_Message* msg, - const upb_MiniTableField* f, - int32_t value, upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionInt32( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldInt32(msg, f, value), true); -} - -UPB_API_INLINE bool upb_Message_SetInt64(struct upb_Message* msg, - const upb_MiniTableField* f, - int64_t value, upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionInt64( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldInt64(msg, f, value), true); -} - -// Sets the value of a message-typed field. The mini_tables of `msg` and -// `value` must have been linked for this to work correctly. -UPB_API_INLINE void upb_Message_SetMessage(struct upb_Message* msg, - const upb_MiniTableField* f, - struct upb_Message* value) { - UPB_ASSERT(!upb_MiniTableField_IsExtension(f)); - upb_Message_SetBaseFieldMessage(msg, f, value); -} - -// Sets the value of a `string` or `bytes` field. The bytes of the value are not -// copied, so it is the caller's responsibility to ensure that they remain valid -// for the lifetime of `msg`. That might be done by copying them into the given -// arena, or by fusing that arena with the arena the bytes live in, for example. -UPB_API_INLINE bool upb_Message_SetString(struct upb_Message* msg, - const upb_MiniTableField* f, - upb_StringView value, upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionString( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldString(msg, f, value), true); -} - -UPB_API_INLINE bool upb_Message_SetUInt32(struct upb_Message* msg, - const upb_MiniTableField* f, - uint32_t value, upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionUInt32( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldUInt32(msg, f, value), true); -} - -UPB_API_INLINE bool upb_Message_SetUInt64(struct upb_Message* msg, - const upb_MiniTableField* f, - uint64_t value, upb_Arena* a) { - return upb_MiniTableField_IsExtension(f) - ? upb_Message_SetExtensionUInt64( - msg, (const upb_MiniTableExtension*)f, value, a) - : (upb_Message_SetBaseFieldUInt64(msg, f, value), true); -} - -UPB_API_INLINE void upb_Message_Clear(struct upb_Message* msg, - const upb_MiniTable* m) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - memset(msg, 0, m->UPB_PRIVATE(size)); - if (in) { - // Reset the internal buffer to empty. - in->size = 0; - } -} - -UPB_API_INLINE void upb_Message_ClearBaseField(struct upb_Message* msg, - const upb_MiniTableField* f) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(f)) { - UPB_PRIVATE(_upb_Message_ClearHasbit)(msg, f); - } else if (upb_MiniTableField_IsInOneof(f)) { - uint32_t* ptr = UPB_PRIVATE(_upb_Message_OneofCasePtr)(msg, f); - if (*ptr != upb_MiniTableField_Number(f)) return; - *ptr = 0; - } - const char zeros[16] = {0}; - UPB_PRIVATE(_upb_MiniTableField_DataCopy) - (f, UPB_PRIVATE(_upb_Message_MutableDataPtr)(msg, f), zeros); -} - -UPB_API_INLINE void upb_Message_ClearExtension( - struct upb_Message* msg, const upb_MiniTableExtension* e) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg); - if (!in) return; - for (size_t i = 0; i < in->size; i++) { - upb_TaggedAuxPtr tagged_ptr = in->aux_data[i]; - if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) { - const upb_Extension* ext = upb_TaggedAuxPtr_Extension(tagged_ptr); - if (ext->ext == e) { - in->aux_data[i] = upb_TaggedAuxPtr_Null(); - return; - } - } - } -} - -UPB_API_INLINE void upb_Message_ClearOneof(struct upb_Message* msg, - const upb_MiniTable* m, - const upb_MiniTableField* f) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - uint32_t field_number = upb_Message_WhichOneofFieldNumber(msg, f); - if (field_number == 0) { - // No field in the oneof is set. - return; - } - - const upb_MiniTableField* field = - upb_MiniTable_FindFieldByNumber(m, field_number); - upb_Message_ClearBaseField(msg, field); -} - -UPB_API_INLINE void* upb_Message_ResizeArrayUninitialized( - struct upb_Message* msg, const upb_MiniTableField* f, size_t size, - upb_Arena* arena) { - UPB_PRIVATE(_upb_MiniTableField_CheckIsArray)(f); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, f, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)(arr, size, arena)) { - return NULL; - } - return upb_Array_MutableDataPtr(arr); -} - -UPB_API_INLINE bool upb_Message_GetExtensionBool( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - bool default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Bool); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_1Byte); - bool ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE double upb_Message_GetExtensionDouble( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - double default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Double); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_8Byte); - double ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE float upb_Message_GetExtensionFloat( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - float default_val) { - float ret; - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Float); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_4Byte); - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE int32_t upb_Message_GetExtensionInt32( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - int32_t default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Int32 || - upb_MiniTableExtension_CType(e) == kUpb_CType_Enum); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_4Byte); - int32_t ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE int64_t upb_Message_GetExtensionInt64( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - int64_t default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Int64); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_8Byte); - int64_t ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE uint32_t upb_Message_GetExtensionUInt32( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - uint32_t default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_UInt32); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_4Byte); - uint32_t ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE uint64_t upb_Message_GetExtensionUInt64( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - uint64_t default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_UInt64); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_8Byte); - uint64_t ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE upb_StringView upb_Message_GetExtensionString( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - upb_StringView default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_String || - upb_MiniTableExtension_CType(e) == kUpb_CType_Bytes); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - kUpb_FieldRep_StringView); - upb_StringView ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE struct upb_Message* upb_Message_GetExtensionMessage( - const struct upb_Message* msg, const upb_MiniTableExtension* e, - struct upb_Message* default_val) { - UPB_ASSUME(upb_MiniTableExtension_CType(e) == kUpb_CType_Message); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(e) == - UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte)); - struct upb_Message* ret; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -// Repeated -UPB_API_INLINE const upb_Array* upb_Message_GetExtensionArray( - const struct upb_Message* msg, const upb_MiniTableExtension* e) { - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(&e->UPB_PRIVATE(field)) == - kUpb_FieldRep_NativePointer); - UPB_ASSUME(upb_MiniTableField_IsArray(&e->UPB_PRIVATE(field))); - UPB_ASSUME(e->UPB_PRIVATE(field).presence == 0); - upb_Array* ret; - const upb_Array* default_val = NULL; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -UPB_API_INLINE upb_Array* upb_Message_GetExtensionMutableArray( - struct upb_Message* msg, const upb_MiniTableExtension* e) { - UPB_ASSERT(!upb_Message_IsFrozen(msg)); - UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(&e->UPB_PRIVATE(field)) == - kUpb_FieldRep_NativePointer); - UPB_ASSUME(upb_MiniTableField_IsArray(&e->UPB_PRIVATE(field))); - UPB_ASSUME(e->UPB_PRIVATE(field).presence == 0); - upb_Array* ret; - upb_Array* default_val = NULL; - _upb_Message_GetExtensionField(msg, e, &default_val, &ret); - return ret; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif - - -#endif // UPB_MESSAGE_INTERNAL_ACCESSORS_H_ - -#ifndef UPB_MESSAGE_MAP_H_ -#define UPB_MESSAGE_MAP_H_ - -#include - - -// Must be last. - -typedef struct upb_Map upb_Map; - -#ifdef __cplusplus -extern "C" { -#endif - -// Creates a new map on the given arena with the given key/value size. -UPB_API upb_Map* upb_Map_New(upb_Arena* a, upb_CType key_type, - upb_CType value_type); - -// Returns the number of entries in the map. -UPB_API size_t upb_Map_Size(const upb_Map* map); - -// Stores a value for the given key into |*val| (or the zero value if the key is -// not present). Returns whether the key was present. The |val| pointer may be -// NULL, in which case the function tests whether the given key is present. -UPB_API bool upb_Map_Get(const upb_Map* map, upb_MessageValue key, - upb_MessageValue* val); - -// Returns a mutable pointer to the value for the given key. Returns NULL if the -// key is not present. -// This function is only legal to call for maps that contain messages. -UPB_API struct upb_Message* upb_Map_GetMutable(upb_Map* map, - upb_MessageValue key); - -// Removes all entries in the map. -UPB_API void upb_Map_Clear(upb_Map* map); - -// Sets the given key to the given value, returning whether the key was inserted -// or replaced. If the key was inserted, then any existing iterators will be -// invalidated. -UPB_API upb_MapInsertStatus upb_Map_Insert(upb_Map* map, upb_MessageValue key, - upb_MessageValue val, - upb_Arena* arena); - -// Sets the given key to the given value. Returns false if memory allocation -// failed. If the key is newly inserted, then any existing iterators will be -// invalidated. -UPB_API_INLINE bool upb_Map_Set(upb_Map* map, upb_MessageValue key, - upb_MessageValue val, upb_Arena* arena) { - return upb_Map_Insert(map, key, val, arena) != - kUpb_MapInsertStatus_OutOfMemory; -} - -// Deletes this key from the table. Returns true if the key was present. -// If present and |val| is non-NULL, stores the deleted value. -UPB_API bool upb_Map_Delete(upb_Map* map, upb_MessageValue key, - upb_MessageValue* val); - -// Map iteration: -// -// size_t iter = kUpb_Map_Begin; -// upb_MessageValue key, val; -// while (upb_Map_Next(map, &key, &val, &iter)) { -// ... -// } - -#define kUpb_Map_Begin ((size_t)-1) - -// Advances to the next entry. Returns false if no more entries are present. -// Otherwise returns true and populates both *key and *value. -UPB_API bool upb_Map_Next(const upb_Map* map, upb_MessageValue* key, - upb_MessageValue* val, size_t* iter); - -// Sets the value for the entry pointed to by iter. -// WARNING: this does not currently work for string values! -UPB_API void upb_Map_SetEntryValue(upb_Map* map, size_t iter, - upb_MessageValue val); - -// DEPRECATED iterator, slated for removal. - -/* Map iteration: - * - * size_t iter = kUpb_Map_Begin; - * while (upb_MapIterator_Next(map, &iter)) { - * upb_MessageValue key = upb_MapIterator_Key(map, iter); - * upb_MessageValue val = upb_MapIterator_Value(map, iter); - * } - */ - -// Advances to the next entry. Returns false if no more entries are present. -UPB_API bool upb_MapIterator_Next(const upb_Map* map, size_t* iter); - -// Returns true if the iterator still points to a valid entry, or false if the -// iterator is past the last element. It is an error to call this function with -// kUpb_Map_Begin (you must call next() at least once first). -UPB_API bool upb_MapIterator_Done(const upb_Map* map, size_t iter); - -// Returns the key and value for this entry of the map. -UPB_API upb_MessageValue upb_MapIterator_Key(const upb_Map* map, size_t iter); -UPB_API upb_MessageValue upb_MapIterator_Value(const upb_Map* map, size_t iter); - -// Mark a map and all of its descendents as frozen/immutable. -// If the map values are messages then |m| must point to the minitable for -// those messages. Otherwise |m| must be NULL. -UPB_API void upb_Map_Freeze(upb_Map* map, const upb_MiniTable* m); - -// Returns whether a map has been frozen. -UPB_API_INLINE bool upb_Map_IsFrozen(const upb_Map* map); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_MAP_H_ */ - -#ifndef UPB_MINI_TABLE_TAGGED_PTR_H_ -#define UPB_MINI_TABLE_TAGGED_PTR_H_ - -#include - - -// Must be last. - -// When a upb_Message* is stored in a message, array, or map, it is stored in a -// tagged form. If the tag bit is set, the referenced upb_Message is of type -// _kUpb_MiniTable_Empty (a sentinel message type with no fields) instead of -// that field's true message type. This forms the basis of what we call -// "dynamic tree shaking." -// -// See the documentation for kUpb_DecodeOption_ExperimentalAllowUnlinked for -// more information. - -typedef uintptr_t upb_TaggedMessagePtr; - -#ifdef __cplusplus -extern "C" { -#endif - -// Users who enable unlinked sub-messages must use this to test whether a -// message is empty before accessing it. If a message is empty, it must be -// first promoted using the interfaces in message/promote.h. -UPB_API_INLINE bool upb_TaggedMessagePtr_IsEmpty(upb_TaggedMessagePtr ptr); - -UPB_API_INLINE upb_Message* upb_TaggedMessagePtr_GetNonEmptyMessage( - upb_TaggedMessagePtr ptr); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_TAGGED_PTR_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Functions ending in BaseField() take a (upb_MiniTableField*) argument -// and work only on non-extension fields. -// -// Functions ending in Extension() take a (upb_MiniTableExtension*) argument -// and work only on extensions. - -UPB_API_INLINE void upb_Message_Clear(upb_Message* msg, const upb_MiniTable* m); - -UPB_API_INLINE void upb_Message_ClearBaseField(upb_Message* msg, - const upb_MiniTableField* f); - -UPB_API_INLINE void upb_Message_ClearExtension(upb_Message* msg, - const upb_MiniTableExtension* e); - -UPB_API_INLINE void upb_Message_ClearOneof(upb_Message* msg, - const upb_MiniTable* m, - const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_Message_HasBaseField(const upb_Message* msg, - const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_Message_HasExtension(const upb_Message* msg, - const upb_MiniTableExtension* e); - -UPB_API_INLINE upb_MessageValue -upb_Message_GetField(const upb_Message* msg, const upb_MiniTableField* f, - upb_MessageValue default_val); - -UPB_API_INLINE upb_TaggedMessagePtr upb_Message_GetTaggedMessagePtr( - const upb_Message* msg, const upb_MiniTableField* field, - upb_Message* default_val); - -UPB_API_INLINE const upb_Array* upb_Message_GetArray( - const upb_Message* msg, const upb_MiniTableField* f); - -UPB_API_INLINE bool upb_Message_GetBool(const upb_Message* msg, - const upb_MiniTableField* f, - bool default_val); - -UPB_API_INLINE double upb_Message_GetDouble(const upb_Message* msg, - const upb_MiniTableField* field, - double default_val); - -UPB_API_INLINE float upb_Message_GetFloat(const upb_Message* msg, - const upb_MiniTableField* f, - float default_val); - -UPB_API_INLINE int32_t upb_Message_GetInt32(const upb_Message* msg, - const upb_MiniTableField* f, - int32_t default_val); - -UPB_API_INLINE int64_t upb_Message_GetInt64(const upb_Message* msg, - const upb_MiniTableField* f, - int64_t default_val); - -UPB_API_INLINE const upb_Map* upb_Message_GetMap(const upb_Message* msg, - const upb_MiniTableField* f); - -UPB_API_INLINE const upb_Message* upb_Message_GetMessage( - const upb_Message* msg, const upb_MiniTableField* f); - -UPB_API_INLINE upb_Array* upb_Message_GetMutableArray( - upb_Message* msg, const upb_MiniTableField* f); - -UPB_API_INLINE upb_Map* upb_Message_GetMutableMap(upb_Message* msg, - const upb_MiniTableField* f); - -UPB_API_INLINE upb_Message* upb_Message_GetMutableMessage( - upb_Message* msg, const upb_MiniTableField* f); - -UPB_API_INLINE upb_Array* upb_Message_GetOrCreateMutableArray( - upb_Message* msg, const upb_MiniTableField* f, upb_Arena* arena); - -UPB_API_INLINE upb_Map* upb_Message_GetOrCreateMutableMap( - upb_Message* msg, const upb_MiniTable* map_entry_mini_table, - const upb_MiniTableField* f, upb_Arena* arena); - -UPB_API_INLINE upb_Message* upb_Message_GetOrCreateMutableMessage( - upb_Message* msg, const upb_MiniTable* mini_table, - const upb_MiniTableField* f, upb_Arena* arena); - -UPB_API_INLINE upb_StringView -upb_Message_GetString(const upb_Message* msg, const upb_MiniTableField* field, - upb_StringView default_val); - -UPB_API_INLINE uint32_t upb_Message_GetUInt32(const upb_Message* msg, - const upb_MiniTableField* f, - uint32_t default_val); - -UPB_API_INLINE uint64_t upb_Message_GetUInt64(const upb_Message* msg, - const upb_MiniTableField* f, - uint64_t default_val); - -UPB_API_INLINE void upb_Message_SetClosedEnum( - upb_Message* msg, const upb_MiniTable* msg_mini_table, - const upb_MiniTableField* f, int32_t value); - -// BaseField Setters /////////////////////////////////////////////////////////// - -UPB_API_INLINE void upb_Message_SetBaseField(upb_Message* msg, - const upb_MiniTableField* f, - const void* val); - -UPB_API_INLINE void upb_Message_SetBaseFieldBool(struct upb_Message* msg, - const upb_MiniTableField* f, - bool value); - -UPB_API_INLINE void upb_Message_SetBaseFieldDouble(struct upb_Message* msg, - const upb_MiniTableField* f, - double value); - -UPB_API_INLINE void upb_Message_SetBaseFieldFloat(struct upb_Message* msg, - const upb_MiniTableField* f, - float value); - -UPB_API_INLINE void upb_Message_SetBaseFieldInt32(struct upb_Message* msg, - const upb_MiniTableField* f, - int32_t value); - -UPB_API_INLINE void upb_Message_SetBaseFieldInt64(struct upb_Message* msg, - const upb_MiniTableField* f, - int64_t value); - -UPB_API_INLINE void upb_Message_SetBaseFieldMessage(struct upb_Message* msg, - const upb_MiniTableField* f, - upb_Message* value); - -UPB_API_INLINE void upb_Message_SetBaseFieldString(struct upb_Message* msg, - const upb_MiniTableField* f, - upb_StringView value); - -UPB_API_INLINE void upb_Message_SetBaseFieldUInt32(struct upb_Message* msg, - const upb_MiniTableField* f, - uint32_t value); - -UPB_API_INLINE void upb_Message_SetBaseFieldUInt64(struct upb_Message* msg, - const upb_MiniTableField* f, - uint64_t value); - -// Extension Getters /////////////////////////////////////////////////////////// -UPB_API_INLINE bool upb_Message_GetExtensionBool( - const upb_Message* msg, const upb_MiniTableExtension* f, bool default_val); - -UPB_API_INLINE double upb_Message_GetExtensionDouble( - const upb_Message* msg, const upb_MiniTableExtension* f, - double default_val); - -UPB_API_INLINE float upb_Message_GetExtensionFloat( - const upb_Message* msg, const upb_MiniTableExtension* f, float default_val); - -UPB_API_INLINE int32_t upb_Message_GetExtensionInt32( - const upb_Message* msg, const upb_MiniTableExtension* f, - int32_t default_val); - -UPB_API_INLINE int64_t upb_Message_GetExtensionInt64( - const upb_Message* msg, const upb_MiniTableExtension* f, - int64_t default_val); - -UPB_API_INLINE uint32_t upb_Message_GetExtensionUInt32( - const upb_Message* msg, const upb_MiniTableExtension* f, - uint32_t default_val); - -UPB_API_INLINE uint64_t upb_Message_GetExtensionUInt64( - const upb_Message* msg, const upb_MiniTableExtension* f, - uint64_t default_val); - -UPB_API_INLINE upb_StringView upb_Message_GetExtensionString( - const upb_Message* msg, const upb_MiniTableExtension* f, - upb_StringView default_val); - -UPB_API_INLINE upb_Message* upb_Message_GetExtensionMessage( - const upb_Message* msg, const upb_MiniTableExtension* f, - struct upb_Message* default_val); - -UPB_API_INLINE const upb_Array* upb_Message_GetExtensionArray( - const upb_Message* msg, const upb_MiniTableExtension* f); - -UPB_API_INLINE upb_Array* upb_Message_GetExtensionMutableArray( - upb_Message* msg, const upb_MiniTableExtension* f); - -// Extension Setters /////////////////////////////////////////////////////////// - -UPB_API_INLINE bool upb_Message_SetExtension(upb_Message* msg, - const upb_MiniTableExtension* e, - const void* value, upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionBool( - struct upb_Message* msg, const upb_MiniTableExtension* e, bool value, - upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionDouble( - struct upb_Message* msg, const upb_MiniTableExtension* e, double value, - upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionFloat( - struct upb_Message* msg, const upb_MiniTableExtension* e, float value, - upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionInt32( - struct upb_Message* msg, const upb_MiniTableExtension* e, int32_t value, - upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionInt64( - struct upb_Message* msg, const upb_MiniTableExtension* e, int64_t value, - upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionString( - struct upb_Message* msg, const upb_MiniTableExtension* e, - upb_StringView value, upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionUInt32( - struct upb_Message* msg, const upb_MiniTableExtension* e, uint32_t value, - upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetExtensionUInt64( - struct upb_Message* msg, const upb_MiniTableExtension* e, uint64_t value, - upb_Arena* a); - -// Universal Setters /////////////////////////////////////////////////////////// - -UPB_API_INLINE bool upb_Message_SetBool(upb_Message* msg, - const upb_MiniTableField* f, bool value, - upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetDouble(upb_Message* msg, - const upb_MiniTableField* f, - double value, upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetFloat(upb_Message* msg, - const upb_MiniTableField* f, - float value, upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetInt32(upb_Message* msg, - const upb_MiniTableField* f, - int32_t value, upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetInt64(upb_Message* msg, - const upb_MiniTableField* f, - int64_t value, upb_Arena* a); - -// Unlike the other similarly-named setters, this function can only be -// called on base fields. Prefer upb_Message_SetBaseFieldMessage(). -UPB_API_INLINE void upb_Message_SetMessage(upb_Message* msg, - const upb_MiniTableField* f, - upb_Message* value); - -UPB_API_INLINE bool upb_Message_SetString(upb_Message* msg, - const upb_MiniTableField* f, - upb_StringView value, upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetUInt32(upb_Message* msg, - const upb_MiniTableField* f, - uint32_t value, upb_Arena* a); - -UPB_API_INLINE bool upb_Message_SetUInt64(upb_Message* msg, - const upb_MiniTableField* f, - uint64_t value, upb_Arena* a); - -//////////////////////////////////////////////////////////////////////////////// - -UPB_API_INLINE void* upb_Message_ResizeArrayUninitialized( - upb_Message* msg, const upb_MiniTableField* f, size_t size, - upb_Arena* arena); - -UPB_API_INLINE uint32_t upb_Message_WhichOneofFieldNumber( - const upb_Message* message, const upb_MiniTableField* oneof_field); - -// For a field `f` which is in a oneof, return the field of that -// oneof that is actually set (or NULL if none). -UPB_API_INLINE const upb_MiniTableField* upb_Message_WhichOneof( - const upb_Message* msg, const upb_MiniTable* m, - const upb_MiniTableField* f); - -// Updates a map entry given an entry message. -bool upb_Message_SetMapEntry(upb_Map* map, const upb_MiniTable* mini_table, - const upb_MiniTableField* field, - upb_Message* map_entry_message, upb_Arena* arena); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_MESSAGE_ACCESSORS_H_ - -// These functions are only used by generated code. - -#ifndef UPB_MESSAGE_MAP_GENCODE_UTIL_H_ -#define UPB_MESSAGE_MAP_GENCODE_UTIL_H_ - -// This header file is referenced by multiple files. Leave it empty. -// TODO: b/399481227 - Remove this header file, after all the references are -// cleaned up. -#endif /* UPB_MESSAGE_MAP_GENCODE_UTIL_H_ */ - -#ifndef UPB_MINI_TABLE_DECODE_H_ -#define UPB_MINI_TABLE_DECODE_H_ - - -#ifndef UPB_MINI_TABLE_SUB_H_ -#define UPB_MINI_TABLE_SUB_H_ - - -// Must be last. - -typedef union upb_MiniTableSub upb_MiniTableSub; - -#ifdef __cplusplus -extern "C" { -#endif - -// Constructors - -UPB_API_INLINE upb_MiniTableSub -upb_MiniTableSub_FromEnum(const upb_MiniTableEnum* subenum); - -UPB_API_INLINE upb_MiniTableSub -upb_MiniTableSub_FromMessage(const upb_MiniTable* submsg); - -// Getters - -UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTableSub_Enum( - upb_MiniTableSub sub); - -UPB_API_INLINE const upb_MiniTable* upb_MiniTableSub_Message( - upb_MiniTableSub sub); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_SUB_H_ */ - -// Export the newer headers, for legacy users. New users should include the -// more specific headers directly. -// IWYU pragma: begin_exports - -#ifndef UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_ -#define UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Builds a upb_MiniTableEnum from an enum mini descriptor. -// The mini descriptor must be for an enum, not a message. -UPB_API upb_MiniTableEnum* upb_MiniTableEnum_Build(const char* data, size_t len, - upb_Arena* arena, - upb_Status* status); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_ - -// Functions for linking MiniTables together once they are built from a -// MiniDescriptor. -// -// These functions have names like upb_MiniTable_Link() because they operate on -// MiniTables. We put them here, rather than in the mini_table/ directory, -// because they are only needed when building MiniTables from MiniDescriptors. -// The interfaces in mini_table/ assume that MiniTables are immutable. - -#ifndef UPB_MINI_DESCRIPTOR_LINK_H_ -#define UPB_MINI_DESCRIPTOR_LINK_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Links a sub-message field to a MiniTable for that sub-message. If a -// sub-message field is not linked, it will be treated as an unknown field -// during parsing, and setting the field will not be allowed. It is possible -// to link the message field later, at which point it will no longer be treated -// as unknown. However there is no synchronization for this operation, which -// means parallel mutation requires external synchronization. -// Returns success/failure. -UPB_API bool upb_MiniTable_SetSubMessage(upb_MiniTable* table, - upb_MiniTableField* field, - const upb_MiniTable* sub); - -// Links an enum field to a MiniTable for that enum. -// All enum fields must be linked prior to parsing. -// Returns success/failure. -UPB_API bool upb_MiniTable_SetSubEnum(upb_MiniTable* table, - upb_MiniTableField* field, - const upb_MiniTableEnum* sub); - -// Returns a list of fields that require linking at runtime, to connect the -// MiniTable to its sub-messages and sub-enums. The list of fields will be -// written to the `subs` array, which must have been allocated by the caller -// and must be large enough to hold a list of all fields in the message. -// -// The order of the fields returned by this function is significant: it matches -// the order expected by upb_MiniTable_Link() below. -// -// The return value packs the sub-message count and sub-enum count into a single -// integer like so: -// return (msg_count << 16) | enum_count; -UPB_API uint32_t upb_MiniTable_GetSubList(const upb_MiniTable* mt, - const upb_MiniTableField** subs); - -// Links a message to its sub-messages and sub-enums. The caller must pass -// arrays of sub-tables and sub-enums, in the same length and order as is -// returned by upb_MiniTable_GetSubList() above. However, individual elements -// of the sub_tables may be NULL if those sub-messages were tree shaken. -// -// Returns false if either array is too short, or if any of the tables fails -// to link. -UPB_API bool upb_MiniTable_Link(upb_MiniTable* mt, - const upb_MiniTable** sub_tables, - size_t sub_table_count, - const upb_MiniTableEnum** sub_enums, - size_t sub_enum_count); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_MINI_DESCRIPTOR_LINK_H_ -// IWYU pragma: end_exports - -// Must be last. - -typedef enum { - kUpb_MiniTablePlatform_32Bit, - kUpb_MiniTablePlatform_64Bit, - kUpb_MiniTablePlatform_Native = - UPB_SIZE(kUpb_MiniTablePlatform_32Bit, kUpb_MiniTablePlatform_64Bit), -} upb_MiniTablePlatform; - -#ifdef __cplusplus -extern "C" { -#endif - -// Builds a mini table from the data encoded in the buffer [data, len]. If any -// errors occur, returns NULL and sets a status message. In the success case, -// the caller must call upb_MiniTable_SetSub*() for all message or proto2 enum -// fields to link the table to the appropriate sub-tables. -upb_MiniTable* _upb_MiniTable_Build(const char* data, size_t len, - upb_MiniTablePlatform platform, - upb_Arena* arena, upb_Status* status); - -UPB_API_INLINE upb_MiniTable* upb_MiniTable_Build(const char* data, size_t len, - upb_Arena* arena, - upb_Status* status) { - return _upb_MiniTable_Build(data, len, kUpb_MiniTablePlatform_Native, arena, - status); -} - -// Initializes a MiniTableExtension buffer that has already been allocated. -// This is needed by upb_FileDef and upb_MessageDef, which allocate all of the -// extensions together in a single contiguous array. -const char* _upb_MiniTableExtension_Init(const char* data, size_t len, - upb_MiniTableExtension* ext, - const upb_MiniTable* extendee, - upb_MiniTableSub sub, - upb_MiniTablePlatform platform, - upb_Status* status); - -UPB_API_INLINE const char* upb_MiniTableExtension_Init( - const char* data, size_t len, upb_MiniTableExtension* ext, - const upb_MiniTable* extendee, upb_MiniTableSub sub, upb_Status* status) { - return _upb_MiniTableExtension_Init(data, len, ext, extendee, sub, - kUpb_MiniTablePlatform_Native, status); -} - -UPB_API upb_MiniTableExtension* _upb_MiniTableExtension_Build( - const char* data, size_t len, const upb_MiniTable* extendee, - upb_MiniTableSub sub, upb_MiniTablePlatform platform, upb_Arena* arena, - upb_Status* status); - -UPB_API_INLINE upb_MiniTableExtension* upb_MiniTableExtension_Build( - const char* data, size_t len, const upb_MiniTable* extendee, - upb_Arena* arena, upb_Status* status) { - upb_MiniTableSub sub = upb_MiniTableSub_FromMessage(NULL); - return _upb_MiniTableExtension_Build( - data, len, extendee, sub, kUpb_MiniTablePlatform_Native, arena, status); -} - -UPB_API_INLINE upb_MiniTableExtension* upb_MiniTableExtension_BuildMessage( - const char* data, size_t len, const upb_MiniTable* extendee, - upb_MiniTable* submsg, upb_Arena* arena, upb_Status* status) { - upb_MiniTableSub sub = upb_MiniTableSub_FromMessage(submsg); - return _upb_MiniTableExtension_Build( - data, len, extendee, sub, kUpb_MiniTablePlatform_Native, arena, status); -} - -UPB_API_INLINE upb_MiniTableExtension* upb_MiniTableExtension_BuildEnum( - const char* data, size_t len, const upb_MiniTable* extendee, - upb_MiniTableEnum* subenum, upb_Arena* arena, upb_Status* status) { - upb_MiniTableSub sub = upb_MiniTableSub_FromEnum(subenum); - return _upb_MiniTableExtension_Build( - data, len, extendee, sub, kUpb_MiniTablePlatform_Native, arena, status); -} - -// Like upb_MiniTable_Build(), but the user provides a buffer of layout data so -// it can be reused from call to call, avoiding repeated -// upb_grealloc()/upb_gfree(). -// -// The caller owns `*buf` both before and after the call, and must upb_gfree() -// it when it is no longer in use. The function will upb_grealloc() `*buf` as -// necessary, updating `*size` accordingly. -upb_MiniTable* upb_MiniTable_BuildWithBuf(const char* data, size_t len, - upb_MiniTablePlatform platform, - upb_Arena* arena, void** buf, - size_t* buf_size, upb_Status* status); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_DECODE_H_ */ - -#ifndef UPB_MINI_TABLE_EXTENSION_REGISTRY_H_ -#define UPB_MINI_TABLE_EXTENSION_REGISTRY_H_ - -#include -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -/* Extension registry: a dynamic data structure that stores a map of: - * (upb_MiniTable, number) -> extension info - * - * upb_decode() uses upb_ExtensionRegistry to look up extensions while parsing - * binary format. - * - * upb_ExtensionRegistry is part of the mini-table (msglayout) family of - * objects. Like all mini-table objects, it is suitable for reflection-less - * builds that do not want to expose names into the binary. - * - * Unlike most mini-table types, upb_ExtensionRegistry requires dynamic memory - * allocation and dynamic initialization: - * * If reflection is being used, then upb_DefPool will construct an appropriate - * upb_ExtensionRegistry automatically. - * * For a mini-table only build, the user must manually construct the - * upb_ExtensionRegistry and populate it with all of the extensions the user - * cares about. - * * A third alternative is to manually unpack relevant extensions after the - * main parse is complete, similar to how Any works. This is perhaps the - * nicest solution from the perspective of reducing dependencies, avoiding - * dynamic memory allocation, and avoiding the need to parse uninteresting - * extensions. The downsides are: - * (1) parse errors are not caught during the main parse - * (2) the CPU hit of parsing comes during access, which could cause an - * undesirable stutter in application performance. - * - * Users cannot directly get or put into this map. Users can only add the - * extensions from a generated module and pass the extension registry to the - * binary decoder. - * - * A upb_DefPool provides a upb_ExtensionRegistry, so any users who use - * reflection do not need to populate a upb_ExtensionRegistry directly. - */ - -typedef struct upb_ExtensionRegistry upb_ExtensionRegistry; - -typedef enum { - kUpb_ExtensionRegistryStatus_Ok = 0, - kUpb_ExtensionRegistryStatus_DuplicateEntry = 1, - kUpb_ExtensionRegistryStatus_OutOfMemory = 2, -} upb_ExtensionRegistryStatus; - -// Creates a upb_ExtensionRegistry in the given arena. -// The arena must outlive any use of the extreg. -UPB_API upb_ExtensionRegistry* upb_ExtensionRegistry_New(upb_Arena* arena); - -UPB_API upb_ExtensionRegistryStatus upb_ExtensionRegistry_Add( - upb_ExtensionRegistry* r, const upb_MiniTableExtension* e); - -// Adds the given extension info for the array |e| of size |count| into the -// registry. If there are any errors, the entire array is backed out. -// The extensions must outlive the registry. -// Possible errors include OOM or an extension number that already exists. -upb_ExtensionRegistryStatus upb_ExtensionRegistry_AddArray( - upb_ExtensionRegistry* r, const upb_MiniTableExtension** e, size_t count); - -#ifdef UPB_LINKARR_DECLARE - -// Adds all extensions linked into the binary into the registry. The set of -// linked extensions is assembled by the linker using linker arrays. This -// will likely not work properly if the extensions are split across multiple -// shared libraries. -// -// Returns true if all extensions were added successfully, false on out of -// memory or if any extensions were already present. -// -// This API is currently not available on MSVC (though it *is* available on -// Windows using clang-cl). -UPB_API bool upb_ExtensionRegistry_AddAllLinkedExtensions( - upb_ExtensionRegistry* r); - -#endif // UPB_LINKARR_DECLARE - -// Looks up the extension (if any) defined for message type |t| and field -// number |num|. Returns the extension if found, otherwise NULL. -UPB_API const upb_MiniTableExtension* upb_ExtensionRegistry_Lookup( - const upb_ExtensionRegistry* r, const upb_MiniTable* t, uint32_t num); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_EXTENSION_REGISTRY_H_ */ - -#ifndef UPB_MINI_TABLE_FILE_H_ -#define UPB_MINI_TABLE_FILE_H_ - - -#ifndef UPB_MINI_TABLE_INTERNAL_FILE_H_ -#define UPB_MINI_TABLE_INTERNAL_FILE_H_ - -// Must be last. - -struct upb_MiniTableFile { - const struct upb_MiniTable** UPB_PRIVATE(msgs); - const struct upb_MiniTableEnum** UPB_PRIVATE(enums); - const struct upb_MiniTableExtension** UPB_PRIVATE(exts); - int UPB_PRIVATE(msg_count); - int UPB_PRIVATE(enum_count); - int UPB_PRIVATE(ext_count); -}; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE int upb_MiniTableFile_EnumCount( - const struct upb_MiniTableFile* f) { - return f->UPB_PRIVATE(enum_count); -} - -UPB_API_INLINE int upb_MiniTableFile_ExtensionCount( - const struct upb_MiniTableFile* f) { - return f->UPB_PRIVATE(ext_count); -} - -UPB_API_INLINE int upb_MiniTableFile_MessageCount( - const struct upb_MiniTableFile* f) { - return f->UPB_PRIVATE(msg_count); -} - -UPB_API_INLINE const struct upb_MiniTableEnum* upb_MiniTableFile_Enum( - const struct upb_MiniTableFile* f, int i) { - UPB_ASSERT(i < f->UPB_PRIVATE(enum_count)); - return f->UPB_PRIVATE(enums)[i]; -} - -UPB_API_INLINE const struct upb_MiniTableExtension* upb_MiniTableFile_Extension( - const struct upb_MiniTableFile* f, int i) { - UPB_ASSERT(i < f->UPB_PRIVATE(ext_count)); - return f->UPB_PRIVATE(exts)[i]; -} - -UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableFile_Message( - const struct upb_MiniTableFile* f, int i) { - UPB_ASSERT(i < f->UPB_PRIVATE(msg_count)); - return f->UPB_PRIVATE(msgs)[i]; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_INTERNAL_FILE_H_ */ - -// Must be last. - -typedef struct upb_MiniTableFile upb_MiniTableFile; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTableFile_Enum( - const upb_MiniTableFile* f, int i); - -UPB_API_INLINE int upb_MiniTableFile_EnumCount(const upb_MiniTableFile* f); - -UPB_API_INLINE const upb_MiniTableExtension* upb_MiniTableFile_Extension( - const upb_MiniTableFile* f, int i); - -UPB_API_INLINE int upb_MiniTableFile_ExtensionCount(const upb_MiniTableFile* f); - -UPB_API_INLINE const upb_MiniTable* upb_MiniTableFile_Message( - const upb_MiniTableFile* f, int i); - -UPB_API_INLINE int upb_MiniTableFile_MessageCount(const upb_MiniTableFile* f); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_FILE_H_ */ - -// upb_decode: parsing into a upb_Message using a upb_MiniTable. - -#ifndef UPB_WIRE_DECODE_H_ -#define UPB_WIRE_DECODE_H_ - -#include -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - /* If set, strings and unknown fields will alias the input buffer instead of - * copying into the arena. */ - kUpb_DecodeOption_AliasString = 1, - - /* If set, the parse will return failure if any message is missing any - * required fields when the message data ends. The parse will still continue, - * and the failure will only be reported at the end. - * - * IMPORTANT CAVEATS: - * - * 1. This can throw a false positive failure if an incomplete message is seen - * on the wire but is later completed when the sub-message occurs again. - * For this reason, a second pass is required to verify a failure, to be - * truly robust. - * - * 2. This can return a false success if you are decoding into a message that - * already has some sub-message fields present. If the sub-message does - * not occur in the binary payload, we will never visit it and discover the - * incomplete sub-message. For this reason, this check is only useful for - * implementing ParseFromString() semantics. For MergeFromString(), a - * post-parse validation step will always be necessary. */ - kUpb_DecodeOption_CheckRequired = 2, - - /* EXPERIMENTAL: - * - * If set, the parser will allow parsing of sub-message fields that were not - * previously linked using upb_MiniTable_SetSubMessage(). The data will be - * parsed into an internal "empty" message type that cannot be accessed - * directly, but can be later promoted into the true message type if the - * sub-message fields are linked at a later time. - * - * Users should set this option if they intend to perform dynamic tree shaking - * and promoting using the interfaces in message/promote.h. If this option is - * enabled, it is important that the resulting messages are only accessed by - * code that is aware of promotion rules: - * - * 1. Message pointers in upb_Message, upb_Array, and upb_Map are represented - * by a tagged pointer upb_TaggedMessagePointer. The tag indicates whether - * the message uses the internal "empty" type. - * - * 2. Any code *reading* these message pointers must test whether the "empty" - * tag bit is set, using the interfaces in mini_table/types.h. However - * writing of message pointers should always use plain upb_Message*, since - * users are not allowed to create "empty" messages. - * - * 3. It is always safe to test whether a field is present or test the array - * length; these interfaces will reflect that empty messages are present, - * even though their data cannot be accessed without promoting first. - * - * 4. If a message pointer is indeed tagged as empty, the message may not be - * accessed directly, only promoted through the interfaces in - * message/promote.h. - * - * 5. Tagged/empty messages may never be created by the user. They may only - * be created by the parser or the message-copying logic in message/copy.h. - */ - kUpb_DecodeOption_ExperimentalAllowUnlinked = 4, - - /* EXPERIMENTAL: - * - * If set, decoding will enforce UTF-8 validation for string fields, even for - * proto2 or fields with `features.utf8_validation = NONE`. Normally, only - * proto3 string fields will be validated for UTF-8. Decoding will return - * kUpb_DecodeStatus_BadUtf8 for non-UTF-8 strings, which is the same behavior - * as non-UTF-8 proto3 string fields. - */ - kUpb_DecodeOption_AlwaysValidateUtf8 = 8, -}; - -UPB_INLINE uint32_t upb_DecodeOptions_MaxDepth(uint16_t depth) { - return (uint32_t)depth << 16; -} - -UPB_INLINE uint16_t upb_DecodeOptions_GetMaxDepth(uint32_t options) { - return options >> 16; -} - -uint16_t upb_DecodeOptions_GetEffectiveMaxDepth(uint32_t options); - -// Enforce an upper bound on recursion depth. -UPB_INLINE int upb_Decode_LimitDepth(uint32_t decode_options, uint32_t limit) { - uint32_t max_depth = upb_DecodeOptions_GetMaxDepth(decode_options); - if (max_depth > limit) max_depth = limit; - return upb_DecodeOptions_MaxDepth(max_depth) | (decode_options & 0xffff); -} - -// LINT.IfChange -typedef enum { - kUpb_DecodeStatus_Ok = 0, - kUpb_DecodeStatus_Malformed = 1, // Wire format was corrupt - kUpb_DecodeStatus_OutOfMemory = 2, // Arena alloc failed - kUpb_DecodeStatus_BadUtf8 = 3, // String field had bad UTF-8 - kUpb_DecodeStatus_MaxDepthExceeded = - 4, // Exceeded upb_DecodeOptions_MaxDepth - - // kUpb_DecodeOption_CheckRequired failed (see above), but the parse otherwise - // succeeded. - kUpb_DecodeStatus_MissingRequired = 5, - - // Unlinked sub-message field was present, but - // kUpb_DecodeOptions_ExperimentalAllowUnlinked was not specified in the list - // of options. - kUpb_DecodeStatus_UnlinkedSubMessage = 6, -} upb_DecodeStatus; -// LINT.ThenChange(//depot/google3/third_party/protobuf/rust/upb.rs:decode_status) - -UPB_API upb_DecodeStatus upb_Decode(const char* buf, size_t size, - upb_Message* msg, const upb_MiniTable* mt, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena); - -// Same as upb_Decode but with a varint-encoded length prepended. -// On success 'num_bytes_read' will be set to the how many bytes were read, -// on failure the contents of num_bytes_read is undefined. -UPB_API upb_DecodeStatus upb_DecodeLengthPrefixed( - const char* buf, size_t size, upb_Message* msg, size_t* num_bytes_read, - const upb_MiniTable* mt, const upb_ExtensionRegistry* extreg, int options, - upb_Arena* arena); - -// Utility function for wrapper languages to get an error string from a -// upb_DecodeStatus. -UPB_API const char* upb_DecodeStatus_String(upb_DecodeStatus status); -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_WIRE_DECODE_H_ */ - -// upb_Encode: parsing from a upb_Message using a upb_MiniTable. - -#ifndef UPB_WIRE_ENCODE_H_ -#define UPB_WIRE_ENCODE_H_ - -#include -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - /* If set, the results of serializing will be deterministic across all - * instances of this binary. There are no guarantees across different - * binary builds. - * - * If your proto contains maps, the encoder will need to malloc()/free() - * memory during encode. */ - kUpb_EncodeOption_Deterministic = 1, - - // When set, unknown fields are not encoded. - kUpb_EncodeOption_SkipUnknown = 2, - - // When set, the encode will fail if any required fields are missing. - kUpb_EncodeOption_CheckRequired = 4, -}; - -// LINT.IfChange -typedef enum { - kUpb_EncodeStatus_Ok = 0, - kUpb_EncodeStatus_OutOfMemory = 1, // Arena alloc failed - kUpb_EncodeStatus_MaxDepthExceeded = 2, - - // kUpb_EncodeOption_CheckRequired failed but the parse otherwise succeeded. - kUpb_EncodeStatus_MissingRequired = 3, -} upb_EncodeStatus; -// LINT.ThenChange(//depot/google3/third_party/protobuf/rust/upb.rs:encode_status) - -UPB_INLINE uint32_t upb_EncodeOptions_MaxDepth(uint16_t depth) { - return (uint32_t)depth << 16; -} - -UPB_INLINE uint16_t upb_EncodeOptions_GetMaxDepth(uint32_t options) { - return options >> 16; -} - -uint16_t upb_EncodeOptions_GetEffectiveMaxDepth(uint32_t options); - -// Enforce an upper bound on recursion depth. -UPB_INLINE int upb_Encode_LimitDepth(uint32_t encode_options, uint32_t limit) { - uint32_t max_depth = upb_EncodeOptions_GetMaxDepth(encode_options); - if (max_depth > limit) max_depth = limit; - return upb_EncodeOptions_MaxDepth(max_depth) | (encode_options & 0xffff); -} - -UPB_API upb_EncodeStatus upb_Encode(const upb_Message* msg, - const upb_MiniTable* l, int options, - upb_Arena* arena, char** buf, size_t* size); - -// Encodes the message prepended by a varint of the serialized length. -UPB_API upb_EncodeStatus upb_EncodeLengthPrefixed(const upb_Message* msg, - const upb_MiniTable* l, - int options, upb_Arena* arena, - char** buf, size_t* size); -// Utility function for wrapper languages to get an error string from a -// upb_EncodeStatus. -UPB_API const char* upb_EncodeStatus_String(upb_EncodeStatus status); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_WIRE_ENCODE_H_ */ - -// These are the specialized field parser functions for the fast parser. -// Generated tables will refer to these by name. -// -// The function names are encoded with names like: -// -// // 123 4 -// upb_pss_1bt(); // Parse singular string, 1 byte tag. -// -// In position 1: -// - 'p' for parse, most function use this -// - 'c' for copy, for when we are copying strings instead of aliasing -// -// In position 2 (cardinality): -// - 's' for singular, with or without hasbit -// - 'o' for oneof -// - 'r' for non-packed repeated -// - 'p' for packed repeated -// -// In position 3 (type): -// - 'b1' for bool -// - 'v4' for 4-byte varint -// - 'v8' for 8-byte varint -// - 'z4' for zig-zag-encoded 4-byte varint -// - 'z8' for zig-zag-encoded 8-byte varint -// - 'f4' for 4-byte fixed -// - 'f8' for 8-byte fixed -// - 'm' for sub-message -// - 's' for string (validate UTF-8) -// - 'b' for bytes -// -// In position 4 (tag length): -// - '1' for one-byte tags (field numbers 1-15) -// - '2' for two-byte tags (field numbers 16-2048) - -#ifndef UPB_WIRE_INTERNAL_DECODE_FAST_H_ -#define UPB_WIRE_INTERNAL_DECODE_FAST_H_ - - -// Must be last. - -#if UPB_FASTTABLE - -#ifdef __cplusplus -extern "C" { -#endif - -struct upb_Decoder; - -// The fallback, generic parsing function that can handle any field type. -// This just uses the regular (non-fast) parser to parse a single field. -const char* _upb_FastDecoder_DecodeGeneric(struct upb_Decoder* d, - const char* ptr, upb_Message* msg, - intptr_t table, uint64_t hasbits, - uint64_t data); - -#define UPB_PARSE_PARAMS \ - struct upb_Decoder *d, const char *ptr, upb_Message *msg, intptr_t table, \ - uint64_t hasbits, uint64_t data - -/* primitive fields ***********************************************************/ - -#define F(card, type, valbytes, tagbytes) \ - const char* upb_p##card##type##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS); - -#define TYPES(card, tagbytes) \ - F(card, b, 1, tagbytes) \ - F(card, v, 4, tagbytes) \ - F(card, v, 8, tagbytes) \ - F(card, z, 4, tagbytes) \ - F(card, z, 8, tagbytes) \ - F(card, f, 4, tagbytes) \ - F(card, f, 8, tagbytes) - -#define TAGBYTES(card) \ - TYPES(card, 1) \ - TYPES(card, 2) - -TAGBYTES(s) -TAGBYTES(o) -TAGBYTES(r) -TAGBYTES(p) - -#undef F -#undef TYPES -#undef TAGBYTES - -/* string fields **************************************************************/ - -#define F(card, tagbytes, type) \ - const char* upb_p##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS); \ - const char* upb_c##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS); - -#define UTF8(card, tagbytes) \ - F(card, tagbytes, s) \ - F(card, tagbytes, b) - -#define TAGBYTES(card) \ - UTF8(card, 1) \ - UTF8(card, 2) - -TAGBYTES(s) -TAGBYTES(o) -TAGBYTES(r) - -#undef F -#undef UTF8 -#undef TAGBYTES - -/* sub-message fields *********************************************************/ - -#define F(card, tagbytes, size_ceil, ceil_arg) \ - const char* upb_p##card##m_##tagbytes##bt_max##size_ceil##b(UPB_PARSE_PARAMS); - -#define SIZES(card, tagbytes) \ - F(card, tagbytes, 64, 64) \ - F(card, tagbytes, 128, 128) \ - F(card, tagbytes, 192, 192) \ - F(card, tagbytes, 256, 256) \ - F(card, tagbytes, max, -1) - -#define TAGBYTES(card) \ - SIZES(card, 1) \ - SIZES(card, 2) - -TAGBYTES(s) -TAGBYTES(o) -TAGBYTES(r) - -#undef F -#undef SIZES -#undef TAGBYTES - -#undef UPB_PARSE_PARAMS - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* UPB_FASTTABLE */ - - -#endif /* UPB_WIRE_INTERNAL_DECODE_FAST_H_ */ -// IWYU pragma: end_exports - -#endif // UPB_GENERATED_CODE_SUPPORT_H_ - -/* This file was generated by upb_generator from the input file: - * - * google/protobuf/descriptor.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. - * NO CHECKED-IN PROTOBUF GENCODE */ - -#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H__UPB_MINITABLE_H_ -#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H__UPB_MINITABLE_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -extern const upb_MiniTable google__protobuf__FileDescriptorSet_msg_init; -extern const upb_MiniTable* google__protobuf__FileDescriptorSet_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FileDescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__FileDescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__DescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__DescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__DescriptorProto__ExtensionRange_msg_init; -extern const upb_MiniTable* google__protobuf__DescriptorProto__ExtensionRange_msg_init_ptr; -extern const upb_MiniTable google__protobuf__DescriptorProto__ReservedRange_msg_init; -extern const upb_MiniTable* google__protobuf__DescriptorProto__ReservedRange_msg_init_ptr; -extern const upb_MiniTable google__protobuf__ExtensionRangeOptions_msg_init; -extern const upb_MiniTable* google__protobuf__ExtensionRangeOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__ExtensionRangeOptions__Declaration_msg_init; -extern const upb_MiniTable* google__protobuf__ExtensionRangeOptions__Declaration_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FieldDescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__FieldDescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__OneofDescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__OneofDescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__EnumDescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__EnumDescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init; -extern const upb_MiniTable* google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init_ptr; -extern const upb_MiniTable google__protobuf__EnumValueDescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__EnumValueDescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__ServiceDescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__ServiceDescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__MethodDescriptorProto_msg_init; -extern const upb_MiniTable* google__protobuf__MethodDescriptorProto_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FileOptions_msg_init; -extern const upb_MiniTable* google__protobuf__FileOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__MessageOptions_msg_init; -extern const upb_MiniTable* google__protobuf__MessageOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FieldOptions_msg_init; -extern const upb_MiniTable* google__protobuf__FieldOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FieldOptions__EditionDefault_msg_init; -extern const upb_MiniTable* google__protobuf__FieldOptions__EditionDefault_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FieldOptions__FeatureSupport_msg_init; -extern const upb_MiniTable* google__protobuf__FieldOptions__FeatureSupport_msg_init_ptr; -extern const upb_MiniTable google__protobuf__OneofOptions_msg_init; -extern const upb_MiniTable* google__protobuf__OneofOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__EnumOptions_msg_init; -extern const upb_MiniTable* google__protobuf__EnumOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__EnumValueOptions_msg_init; -extern const upb_MiniTable* google__protobuf__EnumValueOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__ServiceOptions_msg_init; -extern const upb_MiniTable* google__protobuf__ServiceOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__MethodOptions_msg_init; -extern const upb_MiniTable* google__protobuf__MethodOptions_msg_init_ptr; -extern const upb_MiniTable google__protobuf__UninterpretedOption_msg_init; -extern const upb_MiniTable* google__protobuf__UninterpretedOption_msg_init_ptr; -extern const upb_MiniTable google__protobuf__UninterpretedOption__NamePart_msg_init; -extern const upb_MiniTable* google__protobuf__UninterpretedOption__NamePart_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FeatureSet_msg_init; -extern const upb_MiniTable* google__protobuf__FeatureSet_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FeatureSet__VisibilityFeature_msg_init; -extern const upb_MiniTable* google__protobuf__FeatureSet__VisibilityFeature_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FeatureSetDefaults_msg_init; -extern const upb_MiniTable* google__protobuf__FeatureSetDefaults_msg_init_ptr; -extern const upb_MiniTable google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init; -extern const upb_MiniTable* google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init_ptr; -extern const upb_MiniTable google__protobuf__SourceCodeInfo_msg_init; -extern const upb_MiniTable* google__protobuf__SourceCodeInfo_msg_init_ptr; -extern const upb_MiniTable google__protobuf__SourceCodeInfo__Location_msg_init; -extern const upb_MiniTable* google__protobuf__SourceCodeInfo__Location_msg_init_ptr; -extern const upb_MiniTable google__protobuf__GeneratedCodeInfo_msg_init; -extern const upb_MiniTable* google__protobuf__GeneratedCodeInfo_msg_init_ptr; -extern const upb_MiniTable google__protobuf__GeneratedCodeInfo__Annotation_msg_init; -extern const upb_MiniTable* google__protobuf__GeneratedCodeInfo__Annotation_msg_init_ptr; - -extern const upb_MiniTableEnum google__protobuf__Edition_enum_init; -extern const upb_MiniTableEnum google__protobuf__ExtensionRangeOptions__VerificationState_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__EnforceNamingStyle_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__EnumType_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__FieldPresence_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__JsonFormat_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__MessageEncoding_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__RepeatedFieldEncoding_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__Utf8Validation_enum_init; -extern const upb_MiniTableEnum google__protobuf__FeatureSet__VisibilityFeature__DefaultSymbolVisibility_enum_init; -extern const upb_MiniTableEnum google__protobuf__FieldDescriptorProto__Label_enum_init; -extern const upb_MiniTableEnum google__protobuf__FieldDescriptorProto__Type_enum_init; -extern const upb_MiniTableEnum google__protobuf__FieldOptions__CType_enum_init; -extern const upb_MiniTableEnum google__protobuf__FieldOptions__JSType_enum_init; -extern const upb_MiniTableEnum google__protobuf__FieldOptions__OptionRetention_enum_init; -extern const upb_MiniTableEnum google__protobuf__FieldOptions__OptionTargetType_enum_init; -extern const upb_MiniTableEnum google__protobuf__FileOptions__OptimizeMode_enum_init; -extern const upb_MiniTableEnum google__protobuf__GeneratedCodeInfo__Annotation__Semantic_enum_init; -extern const upb_MiniTableEnum google__protobuf__MethodOptions__IdempotencyLevel_enum_init; -extern const upb_MiniTableEnum google__protobuf__SymbolVisibility_enum_init; -extern const upb_MiniTableFile google_protobuf_descriptor_proto_upb_file_layout; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H__UPB_MINITABLE_H_ */ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct google_protobuf_FileDescriptorSet { upb_Message UPB_PRIVATE(base); } google_protobuf_FileDescriptorSet; -typedef struct google_protobuf_FileDescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_FileDescriptorProto; -typedef struct google_protobuf_DescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_DescriptorProto; -typedef struct google_protobuf_DescriptorProto_ExtensionRange { upb_Message UPB_PRIVATE(base); } google_protobuf_DescriptorProto_ExtensionRange; -typedef struct google_protobuf_DescriptorProto_ReservedRange { upb_Message UPB_PRIVATE(base); } google_protobuf_DescriptorProto_ReservedRange; -typedef struct google_protobuf_ExtensionRangeOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_ExtensionRangeOptions; -typedef struct google_protobuf_ExtensionRangeOptions_Declaration { upb_Message UPB_PRIVATE(base); } google_protobuf_ExtensionRangeOptions_Declaration; -typedef struct google_protobuf_FieldDescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_FieldDescriptorProto; -typedef struct google_protobuf_OneofDescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_OneofDescriptorProto; -typedef struct google_protobuf_EnumDescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_EnumDescriptorProto; -typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange { upb_Message UPB_PRIVATE(base); } google_protobuf_EnumDescriptorProto_EnumReservedRange; -typedef struct google_protobuf_EnumValueDescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_EnumValueDescriptorProto; -typedef struct google_protobuf_ServiceDescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_ServiceDescriptorProto; -typedef struct google_protobuf_MethodDescriptorProto { upb_Message UPB_PRIVATE(base); } google_protobuf_MethodDescriptorProto; -typedef struct google_protobuf_FileOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_FileOptions; -typedef struct google_protobuf_MessageOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_MessageOptions; -typedef struct google_protobuf_FieldOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_FieldOptions; -typedef struct google_protobuf_FieldOptions_EditionDefault { upb_Message UPB_PRIVATE(base); } google_protobuf_FieldOptions_EditionDefault; -typedef struct google_protobuf_FieldOptions_FeatureSupport { upb_Message UPB_PRIVATE(base); } google_protobuf_FieldOptions_FeatureSupport; -typedef struct google_protobuf_OneofOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_OneofOptions; -typedef struct google_protobuf_EnumOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_EnumOptions; -typedef struct google_protobuf_EnumValueOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_EnumValueOptions; -typedef struct google_protobuf_ServiceOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_ServiceOptions; -typedef struct google_protobuf_MethodOptions { upb_Message UPB_PRIVATE(base); } google_protobuf_MethodOptions; -typedef struct google_protobuf_UninterpretedOption { upb_Message UPB_PRIVATE(base); } google_protobuf_UninterpretedOption; -typedef struct google_protobuf_UninterpretedOption_NamePart { upb_Message UPB_PRIVATE(base); } google_protobuf_UninterpretedOption_NamePart; -typedef struct google_protobuf_FeatureSet { upb_Message UPB_PRIVATE(base); } google_protobuf_FeatureSet; -typedef struct google_protobuf_FeatureSet_VisibilityFeature { upb_Message UPB_PRIVATE(base); } google_protobuf_FeatureSet_VisibilityFeature; -typedef struct google_protobuf_FeatureSetDefaults { upb_Message UPB_PRIVATE(base); } google_protobuf_FeatureSetDefaults; -typedef struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault { upb_Message UPB_PRIVATE(base); } google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault; -typedef struct google_protobuf_SourceCodeInfo { upb_Message UPB_PRIVATE(base); } google_protobuf_SourceCodeInfo; -typedef struct google_protobuf_SourceCodeInfo_Location { upb_Message UPB_PRIVATE(base); } google_protobuf_SourceCodeInfo_Location; -typedef struct google_protobuf_GeneratedCodeInfo { upb_Message UPB_PRIVATE(base); } google_protobuf_GeneratedCodeInfo; -typedef struct google_protobuf_GeneratedCodeInfo_Annotation { upb_Message UPB_PRIVATE(base); } google_protobuf_GeneratedCodeInfo_Annotation; - -typedef enum { - google_protobuf_EDITION_UNKNOWN = 0, - google_protobuf_EDITION_1_TEST_ONLY = 1, - google_protobuf_EDITION_2_TEST_ONLY = 2, - google_protobuf_EDITION_LEGACY = 900, - google_protobuf_EDITION_PROTO2 = 998, - google_protobuf_EDITION_PROTO3 = 999, - google_protobuf_EDITION_2023 = 1000, - google_protobuf_EDITION_2024 = 1001, - google_protobuf_EDITION_99997_TEST_ONLY = 99997, - google_protobuf_EDITION_99998_TEST_ONLY = 99998, - google_protobuf_EDITION_99999_TEST_ONLY = 99999, - google_protobuf_EDITION_MAX = 2147483647 -} google_protobuf_Edition; - -typedef enum { - google_protobuf_ExtensionRangeOptions_DECLARATION = 0, - google_protobuf_ExtensionRangeOptions_UNVERIFIED = 1 -} google_protobuf_ExtensionRangeOptions_VerificationState; - -typedef enum { - google_protobuf_FeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN = 0, - google_protobuf_FeatureSet_STYLE2024 = 1, - google_protobuf_FeatureSet_STYLE_LEGACY = 2 -} google_protobuf_FeatureSet_EnforceNamingStyle; - -typedef enum { - google_protobuf_FeatureSet_ENUM_TYPE_UNKNOWN = 0, - google_protobuf_FeatureSet_OPEN = 1, - google_protobuf_FeatureSet_CLOSED = 2 -} google_protobuf_FeatureSet_EnumType; - -typedef enum { - google_protobuf_FeatureSet_FIELD_PRESENCE_UNKNOWN = 0, - google_protobuf_FeatureSet_EXPLICIT = 1, - google_protobuf_FeatureSet_IMPLICIT = 2, - google_protobuf_FeatureSet_LEGACY_REQUIRED = 3 -} google_protobuf_FeatureSet_FieldPresence; - -typedef enum { - google_protobuf_FeatureSet_JSON_FORMAT_UNKNOWN = 0, - google_protobuf_FeatureSet_ALLOW = 1, - google_protobuf_FeatureSet_LEGACY_BEST_EFFORT = 2 -} google_protobuf_FeatureSet_JsonFormat; - -typedef enum { - google_protobuf_FeatureSet_MESSAGE_ENCODING_UNKNOWN = 0, - google_protobuf_FeatureSet_LENGTH_PREFIXED = 1, - google_protobuf_FeatureSet_DELIMITED = 2 -} google_protobuf_FeatureSet_MessageEncoding; - -typedef enum { - google_protobuf_FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN = 0, - google_protobuf_FeatureSet_PACKED = 1, - google_protobuf_FeatureSet_EXPANDED = 2 -} google_protobuf_FeatureSet_RepeatedFieldEncoding; - -typedef enum { - google_protobuf_FeatureSet_UTF8_VALIDATION_UNKNOWN = 0, - google_protobuf_FeatureSet_VERIFY = 2, - google_protobuf_FeatureSet_NONE = 3 -} google_protobuf_FeatureSet_Utf8Validation; - -typedef enum { - google_protobuf_FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, - google_protobuf_FeatureSet_VisibilityFeature_EXPORT_ALL = 1, - google_protobuf_FeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL = 2, - google_protobuf_FeatureSet_VisibilityFeature_LOCAL_ALL = 3, - google_protobuf_FeatureSet_VisibilityFeature_STRICT = 4 -} google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility; - -typedef enum { - google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1, - google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2, - google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3 -} google_protobuf_FieldDescriptorProto_Label; - -typedef enum { - google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1, - google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2, - google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3, - google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4, - google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5, - google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6, - google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7, - google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8, - google_protobuf_FieldDescriptorProto_TYPE_STRING = 9, - google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10, - google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11, - google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12, - google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13, - google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14, - google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15, - google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16, - google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17, - google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18 -} google_protobuf_FieldDescriptorProto_Type; - -typedef enum { - google_protobuf_FieldOptions_STRING = 0, - google_protobuf_FieldOptions_CORD = 1, - google_protobuf_FieldOptions_STRING_PIECE = 2 -} google_protobuf_FieldOptions_CType; - -typedef enum { - google_protobuf_FieldOptions_JS_NORMAL = 0, - google_protobuf_FieldOptions_JS_STRING = 1, - google_protobuf_FieldOptions_JS_NUMBER = 2 -} google_protobuf_FieldOptions_JSType; - -typedef enum { - google_protobuf_FieldOptions_RETENTION_UNKNOWN = 0, - google_protobuf_FieldOptions_RETENTION_RUNTIME = 1, - google_protobuf_FieldOptions_RETENTION_SOURCE = 2 -} google_protobuf_FieldOptions_OptionRetention; - -typedef enum { - google_protobuf_FieldOptions_TARGET_TYPE_UNKNOWN = 0, - google_protobuf_FieldOptions_TARGET_TYPE_FILE = 1, - google_protobuf_FieldOptions_TARGET_TYPE_EXTENSION_RANGE = 2, - google_protobuf_FieldOptions_TARGET_TYPE_MESSAGE = 3, - google_protobuf_FieldOptions_TARGET_TYPE_FIELD = 4, - google_protobuf_FieldOptions_TARGET_TYPE_ONEOF = 5, - google_protobuf_FieldOptions_TARGET_TYPE_ENUM = 6, - google_protobuf_FieldOptions_TARGET_TYPE_ENUM_ENTRY = 7, - google_protobuf_FieldOptions_TARGET_TYPE_SERVICE = 8, - google_protobuf_FieldOptions_TARGET_TYPE_METHOD = 9 -} google_protobuf_FieldOptions_OptionTargetType; - -typedef enum { - google_protobuf_FileOptions_SPEED = 1, - google_protobuf_FileOptions_CODE_SIZE = 2, - google_protobuf_FileOptions_LITE_RUNTIME = 3 -} google_protobuf_FileOptions_OptimizeMode; - -typedef enum { - google_protobuf_GeneratedCodeInfo_Annotation_NONE = 0, - google_protobuf_GeneratedCodeInfo_Annotation_SET = 1, - google_protobuf_GeneratedCodeInfo_Annotation_ALIAS = 2 -} google_protobuf_GeneratedCodeInfo_Annotation_Semantic; - -typedef enum { - google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0, - google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1, - google_protobuf_MethodOptions_IDEMPOTENT = 2 -} google_protobuf_MethodOptions_IdempotencyLevel; - -typedef enum { - google_protobuf_VISIBILITY_UNSET = 0, - google_protobuf_VISIBILITY_LOCAL = 1, - google_protobuf_VISIBILITY_EXPORT = 2 -} google_protobuf_SymbolVisibility; - - - -/* google.protobuf.FileDescriptorSet */ - -UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorSet*)_upb_Message_New(&google__protobuf__FileDescriptorSet_msg_init, arena); -} -UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FileDescriptorSet_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FileDescriptorSet_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FileDescriptorSet_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize_ex(const google_protobuf_FileDescriptorSet* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FileDescriptorSet_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FileDescriptorSet_clear_file(google_protobuf_FileDescriptorSet* msg) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet* msg, size_t* size) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FileDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_FileDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorSet_file_upb_array(const google_protobuf_FileDescriptorSet* msg, size_t* size) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FileDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorSet_file_mutable_upb_array(google_protobuf_FileDescriptorSet* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FileDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet* msg, size_t* size) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FileDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_FileDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_FileDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet* msg, upb_Arena* arena) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FileDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.FileDescriptorProto */ - -UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FileDescriptorProto*)_upb_Message_New(&google__protobuf__FileDescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FileDescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FileDescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FileDescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize_ex(const google_protobuf_FileDescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FileDescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_name(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(56, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, UPB_SIZE(56, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(56, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_package(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(64, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {2, UPB_SIZE(64, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(64, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_dependency(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_dependency_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_dependency_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_message_type(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_DescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_message_type_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_message_type_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_enum_type(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_EnumDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_enum_type_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_enum_type_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_service(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ServiceDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_ServiceDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_service_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ServiceDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_service_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ServiceDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_extension(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_FieldDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_extension_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_extension_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_options(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {8, UPB_SIZE(32, 104), 66, 4, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto* msg) { - const google_protobuf_FileOptions* default_val = NULL; - const google_protobuf_FileOptions* ret; - const upb_MiniTableField field = {8, UPB_SIZE(32, 104), 66, 4, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FileOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {8, UPB_SIZE(32, 104), 66, 4, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_source_code_info(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {9, UPB_SIZE(36, 112), 67, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto* msg) { - const google_protobuf_SourceCodeInfo* default_val = NULL; - const google_protobuf_SourceCodeInfo* ret; - const upb_MiniTableField field = {9, UPB_SIZE(36, 112), 67, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__SourceCodeInfo_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {9, UPB_SIZE(36, 112), 67, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_public_dependency(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_public_dependency_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_public_dependency_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_weak_dependency(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_weak_dependency_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_weak_dependency_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_syntax(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {12, UPB_SIZE(72, 48), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {12, UPB_SIZE(72, 48), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {12, UPB_SIZE(72, 48), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_edition(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {14, UPB_SIZE(48, 12), 69, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FileDescriptorProto_edition(const google_protobuf_FileDescriptorProto* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {14, UPB_SIZE(48, 12), 69, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_edition(const google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {14, UPB_SIZE(48, 12), 69, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_clear_option_dependency(google_protobuf_FileDescriptorProto* msg) { - const upb_MiniTableField field = {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_option_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileDescriptorProto_option_dependency_upb_array(const google_protobuf_FileDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileDescriptorProto_option_dependency_mutable_upb_array(google_protobuf_FileDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, UPB_SIZE(56, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {2, UPB_SIZE(64, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto* msg, upb_StringView val, upb_Arena* arena) { - upb_MiniTableField field = {3, UPB_SIZE(12, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_DescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_DescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {4, UPB_SIZE(16, 72), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_EnumDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_EnumDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {5, UPB_SIZE(20, 80), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ServiceDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_ServiceDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_ServiceDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {6, UPB_SIZE(24, 88), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ServiceDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_FieldDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_FieldDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {7, UPB_SIZE(28, 96), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { - const upb_MiniTableField field = {8, UPB_SIZE(32, 104), 66, 4, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FileOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); - if (sub) google_protobuf_FileDescriptorProto_set_options(msg, sub); - } - return sub; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { - const upb_MiniTableField field = {9, UPB_SIZE(36, 112), 67, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__SourceCodeInfo_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); - if (sub == NULL) { - sub = (struct google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); - if (sub) google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub); - } - return sub; -} -UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (int32_t*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) { - upb_MiniTableField field = {10, UPB_SIZE(40, 120), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (int32_t*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) { - upb_MiniTableField field = {11, UPB_SIZE(44, 128), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {12, UPB_SIZE(72, 48), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_edition(google_protobuf_FileDescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {14, UPB_SIZE(48, 12), 69, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_option_dependency(google_protobuf_FileDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_resize_option_dependency(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_FileDescriptorProto_add_option_dependency(google_protobuf_FileDescriptorProto* msg, upb_StringView val, upb_Arena* arena) { - upb_MiniTableField field = {15, UPB_SIZE(52, 136), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} - -/* google.protobuf.DescriptorProto */ - -UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_DescriptorProto_serialize_ex(const google_protobuf_DescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_name(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(52, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, UPB_SIZE(52, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(52, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_field(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_FieldDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_field_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_field_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_nested_type(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_DescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_nested_type_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_nested_type_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_enum_type(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_EnumDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_enum_type_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_enum_type_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_extension_range(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ExtensionRange_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_DescriptorProto_ExtensionRange* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_extension_range_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ExtensionRange_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_extension_range_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ExtensionRange_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_extension(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_FieldDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_extension_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_extension_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_options(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(32, 72), 65, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto* msg) { - const google_protobuf_MessageOptions* default_val = NULL; - const google_protobuf_MessageOptions* ret; - const upb_MiniTableField field = {7, UPB_SIZE(32, 72), 65, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MessageOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(32, 72), 65, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_oneof_decl(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__OneofDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_OneofDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_oneof_decl_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__OneofDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_oneof_decl_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__OneofDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_range(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ReservedRange_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_DescriptorProto_ReservedRange* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_reserved_range_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ReservedRange_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_reserved_range_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ReservedRange_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_name(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_DescriptorProto_reserved_name_upb_array(const google_protobuf_DescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_DescriptorProto_reserved_name_mutable_upb_array(google_protobuf_DescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_DescriptorProto_clear_visibility(google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {11, UPB_SIZE(48, 12), 66, 8, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_DescriptorProto_visibility(const google_protobuf_DescriptorProto* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {11, UPB_SIZE(48, 12), 66, 8, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_has_visibility(const google_protobuf_DescriptorProto* msg) { - const upb_MiniTableField field = {11, UPB_SIZE(48, 12), 66, 8, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, UPB_SIZE(52, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_FieldDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_FieldDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_DescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_DescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {3, UPB_SIZE(16, 40), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google__protobuf__DescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_EnumDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_EnumDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ExtensionRange_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_DescriptorProto_ExtensionRange**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_DescriptorProto_ExtensionRange**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ExtensionRange_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_FieldDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_FieldDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {6, UPB_SIZE(28, 64), 0, 4, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { - const upb_MiniTableField field = {7, UPB_SIZE(32, 72), 65, 5, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MessageOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); - if (sub) google_protobuf_DescriptorProto_set_options(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__OneofDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_OneofDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_OneofDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {8, UPB_SIZE(36, 80), 0, 6, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__OneofDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ReservedRange_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_DescriptorProto_ReservedRange**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_DescriptorProto_ReservedRange**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {9, UPB_SIZE(40, 88), 0, 7, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__DescriptorProto__ReservedRange_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto* msg, upb_StringView val, upb_Arena* arena) { - upb_MiniTableField field = {10, UPB_SIZE(44, 96), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_visibility(google_protobuf_DescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {11, UPB_SIZE(48, 12), 66, 8, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.DescriptorProto.ExtensionRange */ - -UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ExtensionRange_msg_init, arena); -} -UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DescriptorProto__ExtensionRange_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DescriptorProto__ExtensionRange_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DescriptorProto__ExtensionRange_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize_ex(const google_protobuf_DescriptorProto_ExtensionRange* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DescriptorProto__ExtensionRange_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_start(google_protobuf_DescriptorProto_ExtensionRange* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_end(google_protobuf_DescriptorProto_ExtensionRange* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_options(google_protobuf_DescriptorProto_ExtensionRange* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(20, 24), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { - const google_protobuf_ExtensionRangeOptions* default_val = NULL; - const google_protobuf_ExtensionRangeOptions* ret; - const upb_MiniTableField field = {3, UPB_SIZE(20, 24), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ExtensionRangeOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(20, 24), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) { - const upb_MiniTableField field = {3, UPB_SIZE(20, 24), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ExtensionRangeOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) { - struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); - if (sub) google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub); - } - return sub; -} - -/* google.protobuf.DescriptorProto.ReservedRange */ - -UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_new(upb_Arena* arena) { - return (google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google__protobuf__DescriptorProto__ReservedRange_msg_init, arena); -} -UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DescriptorProto__ReservedRange_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DescriptorProto__ReservedRange_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DescriptorProto__ReservedRange_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize_ex(const google_protobuf_DescriptorProto_ReservedRange* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DescriptorProto__ReservedRange_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_start(google_protobuf_DescriptorProto_ReservedRange* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_end(google_protobuf_DescriptorProto_ReservedRange* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.ExtensionRangeOptions */ - -UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ExtensionRangeOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ExtensionRangeOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ExtensionRangeOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize_ex(const google_protobuf_ExtensionRangeOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ExtensionRangeOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_declaration(google_protobuf_ExtensionRangeOptions* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_ExtensionRangeOptions_Declaration* const* google_protobuf_ExtensionRangeOptions_declaration(const google_protobuf_ExtensionRangeOptions* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_ExtensionRangeOptions_Declaration* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_ExtensionRangeOptions_declaration_upb_array(const google_protobuf_ExtensionRangeOptions* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_ExtensionRangeOptions_declaration_mutable_upb_array(google_protobuf_ExtensionRangeOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_verification(google_protobuf_ExtensionRangeOptions* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 64, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_ExtensionRangeOptions_verification(const google_protobuf_ExtensionRangeOptions* msg) { - int32_t default_val = 1; - int32_t ret; - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 64, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_verification(const google_protobuf_ExtensionRangeOptions* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 64, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_features(google_protobuf_ExtensionRangeOptions* msg) { - const upb_MiniTableField field = {50, UPB_SIZE(20, 24), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_ExtensionRangeOptions_features(const google_protobuf_ExtensionRangeOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {50, UPB_SIZE(20, 24), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_features(const google_protobuf_ExtensionRangeOptions* msg) { - const upb_MiniTableField field = {50, UPB_SIZE(20, 24), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_ExtensionRangeOptions_uninterpreted_option_upb_array(const google_protobuf_ExtensionRangeOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_ExtensionRangeOptions_uninterpreted_option_mutable_upb_array(google_protobuf_ExtensionRangeOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration** google_protobuf_ExtensionRangeOptions_mutable_declaration(google_protobuf_ExtensionRangeOptions* msg, size_t* size) { - upb_MiniTableField field = {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_ExtensionRangeOptions_Declaration**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration** google_protobuf_ExtensionRangeOptions_resize_declaration(google_protobuf_ExtensionRangeOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_ExtensionRangeOptions_Declaration**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_add_declaration(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 16), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_ExtensionRangeOptions_Declaration* sub = (struct google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_set_verification(google_protobuf_ExtensionRangeOptions *msg, int32_t value) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 64, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_set_features(google_protobuf_ExtensionRangeOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {50, UPB_SIZE(20, 24), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ExtensionRangeOptions_mutable_features(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ExtensionRangeOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_ExtensionRangeOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(24, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.ExtensionRangeOptions.Declaration */ - -UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_new(upb_Arena* arena) { - return (google_protobuf_ExtensionRangeOptions_Declaration*)_upb_Message_New(&google__protobuf__ExtensionRangeOptions__Declaration_msg_init, arena); -} -UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_ExtensionRangeOptions_Declaration* ret = google_protobuf_ExtensionRangeOptions_Declaration_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ExtensionRangeOptions__Declaration_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_ExtensionRangeOptions_Declaration* google_protobuf_ExtensionRangeOptions_Declaration_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_ExtensionRangeOptions_Declaration* ret = google_protobuf_ExtensionRangeOptions_Declaration_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ExtensionRangeOptions__Declaration_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_ExtensionRangeOptions_Declaration_serialize(const google_protobuf_ExtensionRangeOptions_Declaration* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ExtensionRangeOptions__Declaration_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_ExtensionRangeOptions_Declaration_serialize_ex(const google_protobuf_ExtensionRangeOptions_Declaration* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ExtensionRangeOptions__Declaration_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_clear_number(google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_ExtensionRangeOptions_Declaration_number(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_Declaration_has_number(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_clear_full_name(google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_ExtensionRangeOptions_Declaration_full_name(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_Declaration_has_full_name(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_clear_type(google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(24, 32), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_ExtensionRangeOptions_Declaration_type(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {3, UPB_SIZE(24, 32), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_Declaration_has_type(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(24, 32), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_clear_reserved(google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {5, 9, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_Declaration_reserved(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {5, 9, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_Declaration_has_reserved(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {5, 9, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_clear_repeated(google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {6, 10, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_Declaration_repeated(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {6, 10, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ExtensionRangeOptions_Declaration_has_repeated(const google_protobuf_ExtensionRangeOptions_Declaration* msg) { - const upb_MiniTableField field = {6, 10, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_number(google_protobuf_ExtensionRangeOptions_Declaration *msg, int32_t value) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_full_name(google_protobuf_ExtensionRangeOptions_Declaration *msg, upb_StringView value) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_type(google_protobuf_ExtensionRangeOptions_Declaration *msg, upb_StringView value) { - const upb_MiniTableField field = {3, UPB_SIZE(24, 32), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_reserved(google_protobuf_ExtensionRangeOptions_Declaration *msg, bool value) { - const upb_MiniTableField field = {5, 9, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_ExtensionRangeOptions_Declaration_set_repeated(google_protobuf_ExtensionRangeOptions_Declaration *msg, bool value) { - const upb_MiniTableField field = {6, 10, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.FieldDescriptorProto */ - -UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google__protobuf__FieldDescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldDescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldDescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldDescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize_ex(const google_protobuf_FieldDescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldDescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_name(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {1, 32, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, 32, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {1, 32, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_extendee(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(40, 48), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {2, UPB_SIZE(40, 48), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(40, 48), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_number(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {3, 12, 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {3, 12, 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {3, 12, 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_label(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {4, 16, 67, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto* msg) { - int32_t default_val = 1; - int32_t ret; - const upb_MiniTableField field = {4, 16, 67, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {4, 16, 67, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {5, 20, 68, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto* msg) { - int32_t default_val = 1; - int32_t ret; - const upb_MiniTableField field = {5, 20, 68, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {5, 20, 68, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type_name(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(48, 64), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {6, UPB_SIZE(48, 64), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(48, 64), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_default_value(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(56, 80), 70, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {7, UPB_SIZE(56, 80), 70, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(56, 80), 70, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_options(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {8, UPB_SIZE(24, 112), 71, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto* msg) { - const google_protobuf_FieldOptions* default_val = NULL; - const google_protobuf_FieldOptions* ret; - const upb_MiniTableField field = {8, UPB_SIZE(24, 112), 71, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {8, UPB_SIZE(24, 112), 71, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_oneof_index(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {9, UPB_SIZE(28, 24), 72, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {9, UPB_SIZE(28, 24), 72, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {9, UPB_SIZE(28, 24), 72, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_json_name(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {10, UPB_SIZE(64, 96), 73, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {10, UPB_SIZE(64, 96), 73, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {10, UPB_SIZE(64, 96), 73, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_proto3_optional(google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {17, 10, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {17, 10, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { - const upb_MiniTableField field = {17, 10, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, 32, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {2, UPB_SIZE(40, 48), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {3, 12, 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {4, 16, 67, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {5, 20, 68, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {6, UPB_SIZE(48, 64), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {7, UPB_SIZE(56, 80), 70, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { - const upb_MiniTableField field = {8, UPB_SIZE(24, 112), 71, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); - if (sub) google_protobuf_FieldDescriptorProto_set_options(msg, sub); - } - return sub; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {9, UPB_SIZE(28, 24), 72, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {10, UPB_SIZE(64, 96), 73, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { - const upb_MiniTableField field = {17, 10, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.OneofDescriptorProto */ - -UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google__protobuf__OneofDescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__OneofDescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__OneofDescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__OneofDescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize_ex(const google_protobuf_OneofDescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__OneofDescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_name(google_protobuf_OneofDescriptorProto* msg) { - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto* msg) { - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_options(google_protobuf_OneofDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto* msg) { - const google_protobuf_OneofOptions* default_val = NULL; - const google_protobuf_OneofOptions* ret; - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__OneofOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__OneofOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); - if (sub) google_protobuf_OneofDescriptorProto_set_options(msg, sub); - } - return sub; -} - -/* google.protobuf.EnumDescriptorProto */ - -UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google__protobuf__EnumDescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumDescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumDescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumDescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize_ex(const google_protobuf_EnumDescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumDescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_name(google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(32, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, UPB_SIZE(32, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(32, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_value(google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumValueDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_EnumValueDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_EnumDescriptorProto_value_upb_array(const google_protobuf_EnumDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumValueDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_EnumDescriptorProto_value_mutable_upb_array(google_protobuf_EnumDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumValueDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_options(google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto* msg) { - const google_protobuf_EnumOptions* default_val = NULL; - const google_protobuf_EnumOptions* ret; - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_range(google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_EnumDescriptorProto_reserved_range_upb_array(const google_protobuf_EnumDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_EnumDescriptorProto_reserved_range_mutable_upb_array(google_protobuf_EnumDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_name(google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_EnumDescriptorProto_reserved_name_upb_array(const google_protobuf_EnumDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_EnumDescriptorProto_reserved_name_mutable_upb_array(google_protobuf_EnumDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_visibility(google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(28, 12), 66, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_visibility(const google_protobuf_EnumDescriptorProto* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {6, UPB_SIZE(28, 12), 66, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_visibility(const google_protobuf_EnumDescriptorProto* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(28, 12), 66, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, UPB_SIZE(32, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumValueDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_EnumValueDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_EnumValueDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumValueDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); - if (sub) google_protobuf_EnumDescriptorProto_set_options(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {4, UPB_SIZE(20, 48), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto* msg, upb_StringView val, upb_Arena* arena) { - upb_MiniTableField field = {5, UPB_SIZE(24, 56), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_visibility(google_protobuf_EnumDescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {6, UPB_SIZE(28, 12), 66, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.EnumDescriptorProto.EnumReservedRange */ - -UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_Arena* arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, arena); -} -UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize_ex(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumDescriptorProto__EnumReservedRange_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_start(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_end(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { - const upb_MiniTableField field = {1, 12, 64, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { - const upb_MiniTableField field = {2, 16, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.EnumValueDescriptorProto */ - -UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google__protobuf__EnumValueDescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumValueDescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumValueDescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumValueDescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize_ex(const google_protobuf_EnumValueDescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumValueDescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_name(google_protobuf_EnumValueDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_number(google_protobuf_EnumValueDescriptorProto* msg) { - const upb_MiniTableField field = {2, 12, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {2, 12, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto* msg) { - const upb_MiniTableField field = {2, 12, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_options(google_protobuf_EnumValueDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 32), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto* msg) { - const google_protobuf_EnumValueOptions* default_val = NULL; - const google_protobuf_EnumValueOptions* ret; - const upb_MiniTableField field = {3, UPB_SIZE(16, 32), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumValueOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 32), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { - const upb_MiniTableField field = {2, 12, 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 32), 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__EnumValueOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); - if (sub) google_protobuf_EnumValueDescriptorProto_set_options(msg, sub); - } - return sub; -} - -/* google.protobuf.ServiceDescriptorProto */ - -UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google__protobuf__ServiceDescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ServiceDescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ServiceDescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ServiceDescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize_ex(const google_protobuf_ServiceDescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ServiceDescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_name(google_protobuf_ServiceDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_method(google_protobuf_ServiceDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MethodDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_MethodDescriptorProto* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_ServiceDescriptorProto_method_upb_array(const google_protobuf_ServiceDescriptorProto* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MethodDescriptorProto_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_ServiceDescriptorProto_method_mutable_upb_array(google_protobuf_ServiceDescriptorProto* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MethodDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_options(google_protobuf_ServiceDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto* msg) { - const google_protobuf_ServiceOptions* default_val = NULL; - const google_protobuf_ServiceOptions* ret; - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ServiceOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, UPB_SIZE(20, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto* msg, size_t* size) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MethodDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_MethodDescriptorProto**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_MethodDescriptorProto**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 32), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MethodDescriptorProto_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 40), 65, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__ServiceOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); - if (sub) google_protobuf_ServiceDescriptorProto_set_options(msg, sub); - } - return sub; -} - -/* google.protobuf.MethodDescriptorProto */ - -UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_new(upb_Arena* arena) { - return (google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google__protobuf__MethodDescriptorProto_msg_init, arena); -} -UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__MethodDescriptorProto_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__MethodDescriptorProto_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__MethodDescriptorProto_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize_ex(const google_protobuf_MethodDescriptorProto* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__MethodDescriptorProto_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_name(google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_input_type(google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(24, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {2, UPB_SIZE(24, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(24, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_output_type(google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(32, 48), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {3, UPB_SIZE(32, 48), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(32, 48), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_options(google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(12, 64), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto* msg) { - const google_protobuf_MethodOptions* default_val = NULL; - const google_protobuf_MethodOptions* ret; - const upb_MiniTableField field = {4, UPB_SIZE(12, 64), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MethodOptions_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(12, 64), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_client_streaming(google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {5, 9, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {5, 9, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {5, 9, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_server_streaming(google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {6, 10, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {6, 10, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { - const upb_MiniTableField field = {6, 10, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {1, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {2, UPB_SIZE(24, 32), 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { - const upb_MiniTableField field = {3, UPB_SIZE(32, 48), 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { - const upb_MiniTableField field = {4, UPB_SIZE(12, 64), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__MethodOptions_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { - struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); - if (sub == NULL) { - sub = (struct google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); - if (sub) google_protobuf_MethodDescriptorProto_set_options(msg, sub); - } - return sub; -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { - const upb_MiniTableField field = {5, 9, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { - const upb_MiniTableField field = {6, 10, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.FileOptions */ - -UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new(upb_Arena* arena) { - return (google_protobuf_FileOptions*)_upb_Message_New(&google__protobuf__FileOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FileOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FileOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FileOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FileOptions_serialize_ex(const google_protobuf_FileOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FileOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FileOptions_clear_java_package(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(32, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, UPB_SIZE(32, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(32, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_java_outer_classname(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {8, 40, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {8, 40, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {8, 40, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_optimize_for(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {9, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions* msg) { - int32_t default_val = 1; - int32_t ret; - const upb_MiniTableField field = {9, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {9, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_java_multiple_files(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {10, 11, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {10, 11, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {10, 11, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_go_package(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {11, UPB_SIZE(48, 56), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {11, UPB_SIZE(48, 56), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {11, UPB_SIZE(48, 56), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_cc_generic_services(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {16, 12, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {16, 12, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {16, 12, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_java_generic_services(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {17, 13, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {17, 13, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {17, 13, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_py_generic_services(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {18, 14, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {18, 14, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {18, 14, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_java_generate_equals_and_hash(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {20, 15, 72, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {20, 15, 72, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {20, 15, 72, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_deprecated(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {23, 16, 73, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {23, 16, 73, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {23, 16, 73, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_java_string_check_utf8(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {27, 17, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {27, 17, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {27, 17, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_cc_enable_arenas(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {31, 18, 75, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions* msg) { - bool default_val = true; - bool ret; - const upb_MiniTableField field = {31, 18, 75, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {31, 18, 75, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_objc_class_prefix(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {36, UPB_SIZE(56, 72), 76, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {36, UPB_SIZE(56, 72), 76, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {36, UPB_SIZE(56, 72), 76, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_csharp_namespace(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {37, UPB_SIZE(64, 88), 77, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {37, UPB_SIZE(64, 88), 77, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {37, UPB_SIZE(64, 88), 77, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_swift_prefix(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {39, UPB_SIZE(72, 104), 78, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {39, UPB_SIZE(72, 104), 78, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {39, UPB_SIZE(72, 104), 78, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_php_class_prefix(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {40, UPB_SIZE(80, 120), 79, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {40, UPB_SIZE(80, 120), 79, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {40, UPB_SIZE(80, 120), 79, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_php_namespace(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {41, UPB_SIZE(88, 136), 80, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {41, UPB_SIZE(88, 136), 80, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {41, UPB_SIZE(88, 136), 80, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_php_metadata_namespace(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {44, UPB_SIZE(96, 152), 81, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {44, UPB_SIZE(96, 152), 81, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {44, UPB_SIZE(96, 152), 81, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_ruby_package(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {45, UPB_SIZE(104, 168), 82, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {45, UPB_SIZE(104, 168), 82, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {45, UPB_SIZE(104, 168), 82, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_features(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {50, UPB_SIZE(24, 184), 83, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_FileOptions_features(const google_protobuf_FileOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {50, UPB_SIZE(24, 184), 83, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FileOptions_has_features(const google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {50, UPB_SIZE(24, 184), 83, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FileOptions_clear_uninterpreted_option(google_protobuf_FileOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FileOptions_uninterpreted_option_upb_array(const google_protobuf_FileOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FileOptions_uninterpreted_option_mutable_upb_array(google_protobuf_FileOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {1, UPB_SIZE(32, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {8, 40, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) { - const upb_MiniTableField field = {9, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {10, 11, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {11, UPB_SIZE(48, 56), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {16, 12, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {17, 13, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {18, 14, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {20, 15, 72, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {23, 16, 73, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {27, 17, 74, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) { - const upb_MiniTableField field = {31, 18, 75, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {36, UPB_SIZE(56, 72), 76, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {37, UPB_SIZE(64, 88), 77, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {39, UPB_SIZE(72, 104), 78, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {40, UPB_SIZE(80, 120), 79, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {41, UPB_SIZE(88, 136), 80, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {44, UPB_SIZE(96, 152), 81, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_StringView value) { - const upb_MiniTableField field = {45, UPB_SIZE(104, 168), 82, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FileOptions_set_features(google_protobuf_FileOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {50, UPB_SIZE(24, 184), 83, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FileOptions_mutable_features(google_protobuf_FileOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FileOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_FileOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(28, 192), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.MessageOptions */ - -UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new(upb_Arena* arena) { - return (google_protobuf_MessageOptions*)_upb_Message_New(&google__protobuf__MessageOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__MessageOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__MessageOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__MessageOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_MessageOptions_serialize_ex(const google_protobuf_MessageOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__MessageOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_MessageOptions_clear_message_set_wire_format(google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MessageOptions_clear_no_standard_descriptor_accessor(google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated(google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MessageOptions_clear_map_entry(google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {7, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {7, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {7, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {11, 13, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MessageOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {11, 13, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {11, 13, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MessageOptions_clear_features(google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {12, 16, 69, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_MessageOptions_features(const google_protobuf_MessageOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {12, 16, 69, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MessageOptions_has_features(const google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {12, 16, 69, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MessageOptions_clear_uninterpreted_option(google_protobuf_MessageOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_MessageOptions_uninterpreted_option_upb_array(const google_protobuf_MessageOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_MessageOptions_uninterpreted_option_mutable_upb_array(google_protobuf_MessageOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) { - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) { - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) { - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) { - const upb_MiniTableField field = {7, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MessageOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions *msg, bool value) { - const upb_MiniTableField field = {11, 13, 68, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MessageOptions_set_features(google_protobuf_MessageOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {12, 16, 69, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MessageOptions_mutable_features(google_protobuf_MessageOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MessageOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_MessageOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.FieldOptions */ - -UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions*)_upb_Message_New(&google__protobuf__FieldOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FieldOptions_serialize_ex(const google_protobuf_FieldOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FieldOptions_clear_ctype(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {1, 16, 64, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {1, 16, 64, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {1, 16, 64, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_packed(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_deprecated(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_lazy(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {5, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {5, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {5, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_jstype(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {6, 20, 68, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {6, 20, 68, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {6, 20, 68, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_weak(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {10, 13, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {10, 13, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {10, 13, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_unverified_lazy(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {15, 14, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FieldOptions_unverified_lazy(const google_protobuf_FieldOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {15, 14, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_unverified_lazy(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {15, 14, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_debug_redact(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {16, 15, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_FieldOptions_debug_redact(const google_protobuf_FieldOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {16, 15, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_debug_redact(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {16, 15, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_retention(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {17, 24, 72, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldOptions_retention(const google_protobuf_FieldOptions* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {17, 24, 72, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_retention(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {17, 24, 72, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_targets(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t const* google_protobuf_FieldOptions_targets(const google_protobuf_FieldOptions* msg, size_t* size) { - const upb_MiniTableField field = {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FieldOptions_targets_upb_array(const google_protobuf_FieldOptions* msg, size_t* size) { - const upb_MiniTableField field = {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FieldOptions_targets_mutable_upb_array(google_protobuf_FieldOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FieldOptions_clear_edition_defaults(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FieldOptions_EditionDefault* const* google_protobuf_FieldOptions_edition_defaults(const google_protobuf_FieldOptions* msg, size_t* size) { - const upb_MiniTableField field = {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__EditionDefault_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_FieldOptions_EditionDefault* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FieldOptions_edition_defaults_upb_array(const google_protobuf_FieldOptions* msg, size_t* size) { - const upb_MiniTableField field = {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__EditionDefault_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FieldOptions_edition_defaults_mutable_upb_array(google_protobuf_FieldOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__EditionDefault_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FieldOptions_clear_features(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {21, UPB_SIZE(36, 48), 73, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_FieldOptions_features(const google_protobuf_FieldOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {21, UPB_SIZE(36, 48), 73, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_features(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {21, UPB_SIZE(36, 48), 73, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_feature_support(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {22, UPB_SIZE(40, 56), 74, 2, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FieldOptions_FeatureSupport* google_protobuf_FieldOptions_feature_support(const google_protobuf_FieldOptions* msg) { - const google_protobuf_FieldOptions_FeatureSupport* default_val = NULL; - const google_protobuf_FieldOptions_FeatureSupport* ret; - const upb_MiniTableField field = {22, UPB_SIZE(40, 56), 74, 2, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__FeatureSupport_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_has_feature_support(const google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {22, UPB_SIZE(40, 56), 74, 2, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_clear_uninterpreted_option(google_protobuf_FieldOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FieldOptions_uninterpreted_option_upb_array(const google_protobuf_FieldOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FieldOptions_uninterpreted_option_mutable_upb_array(google_protobuf_FieldOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) { - const upb_MiniTableField field = {1, 16, 64, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { - const upb_MiniTableField field = {2, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) { - const upb_MiniTableField field = {3, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) { - const upb_MiniTableField field = {5, 12, 67, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) { - const upb_MiniTableField field = {6, 20, 68, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { - const upb_MiniTableField field = {10, 13, 69, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_unverified_lazy(google_protobuf_FieldOptions *msg, bool value) { - const upb_MiniTableField field = {15, 14, 70, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_debug_redact(google_protobuf_FieldOptions *msg, bool value) { - const upb_MiniTableField field = {16, 15, 71, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_set_retention(google_protobuf_FieldOptions *msg, int32_t value) { - const upb_MiniTableField field = {17, 24, 72, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE int32_t* google_protobuf_FieldOptions_mutable_targets(google_protobuf_FieldOptions* msg, size_t* size) { - upb_MiniTableField field = {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE int32_t* google_protobuf_FieldOptions_resize_targets(google_protobuf_FieldOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (int32_t*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_FieldOptions_add_targets(google_protobuf_FieldOptions* msg, int32_t val, upb_Arena* arena) { - upb_MiniTableField field = {19, UPB_SIZE(28, 32), 0, 7, 14, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE google_protobuf_FieldOptions_EditionDefault** google_protobuf_FieldOptions_mutable_edition_defaults(google_protobuf_FieldOptions* msg, size_t* size) { - upb_MiniTableField field = {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__EditionDefault_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_FieldOptions_EditionDefault**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_FieldOptions_EditionDefault** google_protobuf_FieldOptions_resize_edition_defaults(google_protobuf_FieldOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_FieldOptions_EditionDefault**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_add_edition_defaults(google_protobuf_FieldOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {20, UPB_SIZE(32, 40), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__EditionDefault_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_FieldOptions_EditionDefault* sub = (struct google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_FieldOptions_set_features(google_protobuf_FieldOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {21, UPB_SIZE(36, 48), 73, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FieldOptions_mutable_features(google_protobuf_FieldOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FieldOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_FieldOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE void google_protobuf_FieldOptions_set_feature_support(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_FeatureSupport* value) { - const upb_MiniTableField field = {22, UPB_SIZE(40, 56), 74, 2, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__FeatureSupport_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FieldOptions_FeatureSupport* google_protobuf_FieldOptions_mutable_feature_support(google_protobuf_FieldOptions* msg, upb_Arena* arena) { - struct google_protobuf_FieldOptions_FeatureSupport* sub = (struct google_protobuf_FieldOptions_FeatureSupport*)google_protobuf_FieldOptions_feature_support(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions_FeatureSupport*)_upb_Message_New(&google__protobuf__FieldOptions__FeatureSupport_msg_init, arena); - if (sub) google_protobuf_FieldOptions_set_feature_support(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(44, 64), 0, 3, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.FieldOptions.EditionDefault */ - -UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions_EditionDefault*)_upb_Message_New(&google__protobuf__FieldOptions__EditionDefault_msg_init, arena); -} -UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FieldOptions_EditionDefault* ret = google_protobuf_FieldOptions_EditionDefault_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldOptions__EditionDefault_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FieldOptions_EditionDefault* google_protobuf_FieldOptions_EditionDefault_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FieldOptions_EditionDefault* ret = google_protobuf_FieldOptions_EditionDefault_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldOptions__EditionDefault_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FieldOptions_EditionDefault_serialize(const google_protobuf_FieldOptions_EditionDefault* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldOptions__EditionDefault_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FieldOptions_EditionDefault_serialize_ex(const google_protobuf_FieldOptions_EditionDefault* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldOptions__EditionDefault_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FieldOptions_EditionDefault_clear_value(google_protobuf_FieldOptions_EditionDefault* msg) { - const upb_MiniTableField field = {2, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FieldOptions_EditionDefault_value(const google_protobuf_FieldOptions_EditionDefault* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {2, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_EditionDefault_has_value(const google_protobuf_FieldOptions_EditionDefault* msg) { - const upb_MiniTableField field = {2, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_EditionDefault_clear_edition(google_protobuf_FieldOptions_EditionDefault* msg) { - const upb_MiniTableField field = {3, 12, 65, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldOptions_EditionDefault_edition(const google_protobuf_FieldOptions_EditionDefault* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {3, 12, 65, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_EditionDefault_has_edition(const google_protobuf_FieldOptions_EditionDefault* msg) { - const upb_MiniTableField field = {3, 12, 65, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_FieldOptions_EditionDefault_set_value(google_protobuf_FieldOptions_EditionDefault *msg, upb_StringView value) { - const upb_MiniTableField field = {2, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_EditionDefault_set_edition(google_protobuf_FieldOptions_EditionDefault *msg, int32_t value) { - const upb_MiniTableField field = {3, 12, 65, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.FieldOptions.FeatureSupport */ - -UPB_INLINE google_protobuf_FieldOptions_FeatureSupport* google_protobuf_FieldOptions_FeatureSupport_new(upb_Arena* arena) { - return (google_protobuf_FieldOptions_FeatureSupport*)_upb_Message_New(&google__protobuf__FieldOptions__FeatureSupport_msg_init, arena); -} -UPB_INLINE google_protobuf_FieldOptions_FeatureSupport* google_protobuf_FieldOptions_FeatureSupport_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FieldOptions_FeatureSupport* ret = google_protobuf_FieldOptions_FeatureSupport_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldOptions__FeatureSupport_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FieldOptions_FeatureSupport* google_protobuf_FieldOptions_FeatureSupport_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FieldOptions_FeatureSupport* ret = google_protobuf_FieldOptions_FeatureSupport_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FieldOptions__FeatureSupport_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FieldOptions_FeatureSupport_serialize(const google_protobuf_FieldOptions_FeatureSupport* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldOptions__FeatureSupport_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FieldOptions_FeatureSupport_serialize_ex(const google_protobuf_FieldOptions_FeatureSupport* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FieldOptions__FeatureSupport_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_clear_edition_introduced(google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldOptions_FeatureSupport_edition_introduced(const google_protobuf_FieldOptions_FeatureSupport* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_FeatureSupport_has_edition_introduced(const google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_clear_edition_deprecated(google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldOptions_FeatureSupport_edition_deprecated(const google_protobuf_FieldOptions_FeatureSupport* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_FeatureSupport_has_edition_deprecated(const google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_clear_deprecation_warning(google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {3, 24, 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_FieldOptions_FeatureSupport_deprecation_warning(const google_protobuf_FieldOptions_FeatureSupport* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {3, 24, 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_FeatureSupport_has_deprecation_warning(const google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {3, 24, 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_clear_edition_removed(google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {4, 20, 67, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FieldOptions_FeatureSupport_edition_removed(const google_protobuf_FieldOptions_FeatureSupport* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {4, 20, 67, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FieldOptions_FeatureSupport_has_edition_removed(const google_protobuf_FieldOptions_FeatureSupport* msg) { - const upb_MiniTableField field = {4, 20, 67, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_set_edition_introduced(google_protobuf_FieldOptions_FeatureSupport *msg, int32_t value) { - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_set_edition_deprecated(google_protobuf_FieldOptions_FeatureSupport *msg, int32_t value) { - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_set_deprecation_warning(google_protobuf_FieldOptions_FeatureSupport *msg, upb_StringView value) { - const upb_MiniTableField field = {3, 24, 66, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FieldOptions_FeatureSupport_set_edition_removed(google_protobuf_FieldOptions_FeatureSupport *msg, int32_t value) { - const upb_MiniTableField field = {4, 20, 67, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.OneofOptions */ - -UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new(upb_Arena* arena) { - return (google_protobuf_OneofOptions*)_upb_Message_New(&google__protobuf__OneofOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__OneofOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__OneofOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__OneofOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_OneofOptions_serialize_ex(const google_protobuf_OneofOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__OneofOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_OneofOptions_clear_features(google_protobuf_OneofOptions* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_OneofOptions_features(const google_protobuf_OneofOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_OneofOptions_has_features(const google_protobuf_OneofOptions* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_OneofOptions_clear_uninterpreted_option(google_protobuf_OneofOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_OneofOptions_uninterpreted_option_upb_array(const google_protobuf_OneofOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_OneofOptions_uninterpreted_option_mutable_upb_array(google_protobuf_OneofOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_OneofOptions_set_features(google_protobuf_OneofOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_OneofOptions_mutable_features(google_protobuf_OneofOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_OneofOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_OneofOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.EnumOptions */ - -UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumOptions*)_upb_Message_New(&google__protobuf__EnumOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_EnumOptions_serialize_ex(const google_protobuf_EnumOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_EnumOptions_clear_allow_alias(google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {2, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {2, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {2, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated(google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {3, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {3, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {3, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {6, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_EnumOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {6, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {6, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumOptions_clear_features(google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(12, 16), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_EnumOptions_features(const google_protobuf_EnumOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {7, UPB_SIZE(12, 16), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumOptions_has_features(const google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(12, 16), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumOptions_clear_uninterpreted_option(google_protobuf_EnumOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_EnumOptions_uninterpreted_option_upb_array(const google_protobuf_EnumOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_EnumOptions_uninterpreted_option_mutable_upb_array(google_protobuf_EnumOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) { - const upb_MiniTableField field = {2, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) { - const upb_MiniTableField field = {3, 10, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions *msg, bool value) { - const upb_MiniTableField field = {6, 11, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumOptions_set_features(google_protobuf_EnumOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {7, UPB_SIZE(12, 16), 67, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumOptions_mutable_features(google_protobuf_EnumOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_EnumOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.EnumValueOptions */ - -UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_new(upb_Arena* arena) { - return (google_protobuf_EnumValueOptions*)_upb_Message_New(&google__protobuf__EnumValueOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumValueOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__EnumValueOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumValueOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_EnumValueOptions_serialize_ex(const google_protobuf_EnumValueOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__EnumValueOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_EnumValueOptions_clear_deprecated(google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumValueOptions_clear_features(google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_EnumValueOptions_features(const google_protobuf_EnumValueOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumValueOptions_has_features(const google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumValueOptions_clear_debug_redact(google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {3, 10, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_EnumValueOptions_debug_redact(const google_protobuf_EnumValueOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {3, 10, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumValueOptions_has_debug_redact(const google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {3, 10, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumValueOptions_clear_feature_support(google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 24), 67, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FieldOptions_FeatureSupport* google_protobuf_EnumValueOptions_feature_support(const google_protobuf_EnumValueOptions* msg) { - const google_protobuf_FieldOptions_FeatureSupport* default_val = NULL; - const google_protobuf_FieldOptions_FeatureSupport* ret; - const upb_MiniTableField field = {4, UPB_SIZE(16, 24), 67, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__FeatureSupport_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_EnumValueOptions_has_feature_support(const google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 24), 67, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_EnumValueOptions_clear_uninterpreted_option(google_protobuf_EnumValueOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_EnumValueOptions_uninterpreted_option_upb_array(const google_protobuf_EnumValueOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_EnumValueOptions_uninterpreted_option_mutable_upb_array(google_protobuf_EnumValueOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) { - const upb_MiniTableField field = {1, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumValueOptions_set_features(google_protobuf_EnumValueOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_EnumValueOptions_mutable_features(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_EnumValueOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_EnumValueOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE void google_protobuf_EnumValueOptions_set_debug_redact(google_protobuf_EnumValueOptions *msg, bool value) { - const upb_MiniTableField field = {3, 10, 66, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_EnumValueOptions_set_feature_support(google_protobuf_EnumValueOptions *msg, google_protobuf_FieldOptions_FeatureSupport* value) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 24), 67, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FieldOptions__FeatureSupport_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FieldOptions_FeatureSupport* google_protobuf_EnumValueOptions_mutable_feature_support(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) { - struct google_protobuf_FieldOptions_FeatureSupport* sub = (struct google_protobuf_FieldOptions_FeatureSupport*)google_protobuf_EnumValueOptions_feature_support(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions_FeatureSupport*)_upb_Message_New(&google__protobuf__FieldOptions__FeatureSupport_msg_init, arena); - if (sub) google_protobuf_EnumValueOptions_set_feature_support(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(20, 32), 0, 2, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.ServiceOptions */ - -UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new(upb_Arena* arena) { - return (google_protobuf_ServiceOptions*)_upb_Message_New(&google__protobuf__ServiceOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ServiceOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__ServiceOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ServiceOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_ServiceOptions_serialize_ex(const google_protobuf_ServiceOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__ServiceOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_ServiceOptions_clear_deprecated(google_protobuf_ServiceOptions* msg) { - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions* msg) { - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ServiceOptions_clear_features(google_protobuf_ServiceOptions* msg) { - const upb_MiniTableField field = {34, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_ServiceOptions_features(const google_protobuf_ServiceOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {34, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_ServiceOptions_has_features(const google_protobuf_ServiceOptions* msg) { - const upb_MiniTableField field = {34, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_ServiceOptions_clear_uninterpreted_option(google_protobuf_ServiceOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_ServiceOptions_uninterpreted_option_upb_array(const google_protobuf_ServiceOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_ServiceOptions_uninterpreted_option_mutable_upb_array(google_protobuf_ServiceOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) { - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_ServiceOptions_set_features(google_protobuf_ServiceOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {34, UPB_SIZE(12, 16), 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_ServiceOptions_mutable_features(google_protobuf_ServiceOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_ServiceOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_ServiceOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.MethodOptions */ - -UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new(upb_Arena* arena) { - return (google_protobuf_MethodOptions*)_upb_Message_New(&google__protobuf__MethodOptions_msg_init, arena); -} -UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__MethodOptions_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__MethodOptions_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__MethodOptions_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_MethodOptions_serialize_ex(const google_protobuf_MethodOptions* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__MethodOptions_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_MethodOptions_clear_deprecated(google_protobuf_MethodOptions* msg) { - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions* msg) { - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodOptions_clear_idempotency_level(google_protobuf_MethodOptions* msg) { - const upb_MiniTableField field = {34, 12, 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {34, 12, 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions* msg) { - const upb_MiniTableField field = {34, 12, 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodOptions_clear_features(google_protobuf_MethodOptions* msg) { - const upb_MiniTableField field = {35, 16, 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_MethodOptions_features(const google_protobuf_MethodOptions* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {35, 16, 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_MethodOptions_has_features(const google_protobuf_MethodOptions* msg) { - const upb_MiniTableField field = {35, 16, 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_MethodOptions_clear_uninterpreted_option(google_protobuf_MethodOptions* msg) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_MethodOptions_uninterpreted_option_upb_array(const google_protobuf_MethodOptions* msg, size_t* size) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_MethodOptions_uninterpreted_option_mutable_upb_array(google_protobuf_MethodOptions* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { - const upb_MiniTableField field = {33, 9, 64, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) { - const upb_MiniTableField field = {34, 12, 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_MethodOptions_set_features(google_protobuf_MethodOptions *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {35, 16, 66, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_MethodOptions_mutable_features(google_protobuf_MethodOptions* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_MethodOptions_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_MethodOptions_set_features(msg, sub); - } - return sub; -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t* size) { - upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions* msg, upb_Arena* arena) { - upb_MiniTableField field = {999, UPB_SIZE(20, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.UninterpretedOption */ - -UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption*)_upb_Message_New(&google__protobuf__UninterpretedOption_msg_init, arena); -} -UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UninterpretedOption_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UninterpretedOption_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UninterpretedOption_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_UninterpretedOption_serialize_ex(const google_protobuf_UninterpretedOption* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UninterpretedOption_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_UninterpretedOption_clear_name(google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption__NamePart_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_UninterpretedOption_NamePart* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_UninterpretedOption_name_upb_array(const google_protobuf_UninterpretedOption* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption__NamePart_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_UninterpretedOption_name_mutable_upb_array(google_protobuf_UninterpretedOption* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption__NamePart_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_UninterpretedOption_clear_identifier_value(google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {3, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {3, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {3, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_UninterpretedOption_clear_positive_int_value(google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(40, 72), 65, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption* msg) { - uint64_t default_val = (uint64_t)0ull; - uint64_t ret; - const upb_MiniTableField field = {4, UPB_SIZE(40, 72), 65, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(40, 72), 65, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_UninterpretedOption_clear_negative_int_value(google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(48, 80), 66, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption* msg) { - int64_t default_val = (int64_t)0ll; - int64_t ret; - const upb_MiniTableField field = {5, UPB_SIZE(48, 80), 66, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(48, 80), 66, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_UninterpretedOption_clear_double_value(google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(56, 88), 67, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption* msg) { - double default_val = 0; - double ret; - const upb_MiniTableField field = {6, UPB_SIZE(56, 88), 67, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(56, 88), 67, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_UninterpretedOption_clear_string_value(google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(24, 32), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {7, UPB_SIZE(24, 32), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {7, UPB_SIZE(24, 32), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_UninterpretedOption_clear_aggregate_value(google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {8, UPB_SIZE(32, 48), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {8, UPB_SIZE(32, 48), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption* msg) { - const upb_MiniTableField field = {8, UPB_SIZE(32, 48), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption* msg, size_t* size) { - upb_MiniTableField field = {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption__NamePart_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_UninterpretedOption_NamePart**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_UninterpretedOption_NamePart**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption* msg, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(12, 64), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__UninterpretedOption__NamePart_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { - const upb_MiniTableField field = {3, 16, 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { - const upb_MiniTableField field = {4, UPB_SIZE(40, 72), 65, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { - const upb_MiniTableField field = {5, UPB_SIZE(48, 80), 66, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { - const upb_MiniTableField field = {6, UPB_SIZE(56, 88), 67, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { - const upb_MiniTableField field = {7, UPB_SIZE(24, 32), 68, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { - const upb_MiniTableField field = {8, UPB_SIZE(32, 48), 69, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.UninterpretedOption.NamePart */ - -UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_new(upb_Arena* arena) { - return (google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google__protobuf__UninterpretedOption__NamePart_msg_init, arena); -} -UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UninterpretedOption__NamePart_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UninterpretedOption__NamePart_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UninterpretedOption__NamePart_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize_ex(const google_protobuf_UninterpretedOption_NamePart* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UninterpretedOption__NamePart_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_name_part(google_protobuf_UninterpretedOption_NamePart* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_is_extension(google_protobuf_UninterpretedOption_NamePart* msg) { - const upb_MiniTableField field = {2, 9, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { - bool default_val = false; - bool ret; - const upb_MiniTableField field = {2, 9, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { - const upb_MiniTableField field = {2, 9, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_StringView value) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) { - const upb_MiniTableField field = {2, 9, 65, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.FeatureSet */ - -UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_new(upb_Arena* arena) { - return (google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); -} -UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FeatureSet* ret = google_protobuf_FeatureSet_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSet_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FeatureSet* google_protobuf_FeatureSet_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FeatureSet* ret = google_protobuf_FeatureSet_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSet_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FeatureSet_serialize(const google_protobuf_FeatureSet* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSet_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FeatureSet_serialize_ex(const google_protobuf_FeatureSet* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSet_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FeatureSet_clear_field_presence(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_field_presence(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_field_presence(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSet_clear_enum_type(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_enum_type(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_enum_type(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSet_clear_repeated_field_encoding(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {3, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_repeated_field_encoding(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {3, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_repeated_field_encoding(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {3, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSet_clear_utf8_validation(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {4, 24, 67, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_utf8_validation(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {4, 24, 67, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_utf8_validation(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {4, 24, 67, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSet_clear_message_encoding(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {5, 28, 68, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_message_encoding(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {5, 28, 68, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_message_encoding(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {5, 28, 68, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSet_clear_json_format(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {6, 32, 69, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_json_format(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {6, 32, 69, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_json_format(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {6, 32, 69, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSet_clear_enforce_naming_style(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {7, 36, 70, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_enforce_naming_style(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {7, 36, 70, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_enforce_naming_style(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {7, 36, 70, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSet_clear_default_symbol_visibility(google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {8, 40, 71, 7, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSet_default_symbol_visibility(const google_protobuf_FeatureSet* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {8, 40, 71, 7, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSet_has_default_symbol_visibility(const google_protobuf_FeatureSet* msg) { - const upb_MiniTableField field = {8, 40, 71, 7, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_FeatureSet_set_field_presence(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {1, 12, 64, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSet_set_enum_type(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {2, 16, 65, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSet_set_repeated_field_encoding(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {3, 20, 66, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSet_set_utf8_validation(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {4, 24, 67, 3, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSet_set_message_encoding(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {5, 28, 68, 4, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSet_set_json_format(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {6, 32, 69, 5, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSet_set_enforce_naming_style(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {7, 36, 70, 6, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSet_set_default_symbol_visibility(google_protobuf_FeatureSet *msg, int32_t value) { - const upb_MiniTableField field = {8, 40, 71, 7, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.FeatureSet.VisibilityFeature */ - -UPB_INLINE google_protobuf_FeatureSet_VisibilityFeature* google_protobuf_FeatureSet_VisibilityFeature_new(upb_Arena* arena) { - return (google_protobuf_FeatureSet_VisibilityFeature*)_upb_Message_New(&google__protobuf__FeatureSet__VisibilityFeature_msg_init, arena); -} -UPB_INLINE google_protobuf_FeatureSet_VisibilityFeature* google_protobuf_FeatureSet_VisibilityFeature_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FeatureSet_VisibilityFeature* ret = google_protobuf_FeatureSet_VisibilityFeature_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSet__VisibilityFeature_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FeatureSet_VisibilityFeature* google_protobuf_FeatureSet_VisibilityFeature_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FeatureSet_VisibilityFeature* ret = google_protobuf_FeatureSet_VisibilityFeature_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSet__VisibilityFeature_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FeatureSet_VisibilityFeature_serialize(const google_protobuf_FeatureSet_VisibilityFeature* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSet__VisibilityFeature_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FeatureSet_VisibilityFeature_serialize_ex(const google_protobuf_FeatureSet_VisibilityFeature* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSet__VisibilityFeature_msg_init, options, arena, &ptr, len); - return ptr; -} - - -/* google.protobuf.FeatureSetDefaults */ - -UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults*)_upb_Message_New(&google__protobuf__FeatureSetDefaults_msg_init, arena); -} -UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FeatureSetDefaults* ret = google_protobuf_FeatureSetDefaults_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSetDefaults_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FeatureSetDefaults* google_protobuf_FeatureSetDefaults_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FeatureSetDefaults* ret = google_protobuf_FeatureSetDefaults_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSetDefaults_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FeatureSetDefaults_serialize(const google_protobuf_FeatureSetDefaults* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSetDefaults_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FeatureSetDefaults_serialize_ex(const google_protobuf_FeatureSetDefaults* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSetDefaults_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_clear_defaults(google_protobuf_FeatureSetDefaults* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* const* google_protobuf_FeatureSetDefaults_defaults(const google_protobuf_FeatureSetDefaults* msg, size_t* size) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_FeatureSetDefaults_defaults_upb_array(const google_protobuf_FeatureSetDefaults* msg, size_t* size) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_FeatureSetDefaults_defaults_mutable_upb_array(google_protobuf_FeatureSetDefaults* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_clear_minimum_edition(google_protobuf_FeatureSetDefaults* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 12), 64, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSetDefaults_minimum_edition(const google_protobuf_FeatureSetDefaults* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {4, UPB_SIZE(16, 12), 64, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSetDefaults_has_minimum_edition(const google_protobuf_FeatureSetDefaults* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 12), 64, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_clear_maximum_edition(google_protobuf_FeatureSetDefaults* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 16), 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSetDefaults_maximum_edition(const google_protobuf_FeatureSetDefaults* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {5, UPB_SIZE(20, 16), 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSetDefaults_has_maximum_edition(const google_protobuf_FeatureSetDefaults* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 16), 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault** google_protobuf_FeatureSetDefaults_mutable_defaults(google_protobuf_FeatureSetDefaults* msg, size_t* size) { - upb_MiniTableField field = {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault** google_protobuf_FeatureSetDefaults_resize_defaults(google_protobuf_FeatureSetDefaults* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_add_defaults(google_protobuf_FeatureSetDefaults* msg, upb_Arena* arena) { - upb_MiniTableField field = {1, UPB_SIZE(12, 24), 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* sub = (struct google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_set_minimum_edition(google_protobuf_FeatureSetDefaults *msg, int32_t value) { - const upb_MiniTableField field = {4, UPB_SIZE(16, 12), 64, 1, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_set_maximum_edition(google_protobuf_FeatureSetDefaults *msg, int32_t value) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 16), 65, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault */ - -UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(upb_Arena* arena) { - return (google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault*)_upb_Message_New(&google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, arena); -} -UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* ret = google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* ret = google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_serialize(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_serialize_ex(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FeatureSetDefaults__FeatureSetEditionDefault_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_clear_edition(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const upb_MiniTableField field = {3, 12, 64, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_edition(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {3, 12, 64, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_has_edition(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const upb_MiniTableField field = {3, 12, 64, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_clear_overridable_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const upb_MiniTableField field = {4, 16, 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_overridable_features(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {4, 16, 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_has_overridable_features(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const upb_MiniTableField field = {4, 16, 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_clear_fixed_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 24), 66, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_FeatureSet* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_fixed_features(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const google_protobuf_FeatureSet* default_val = NULL; - const google_protobuf_FeatureSet* ret; - const upb_MiniTableField field = {5, UPB_SIZE(20, 24), 66, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_has_fixed_features(const google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 24), 66, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_edition(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault *msg, int32_t value) { - const upb_MiniTableField field = {3, 12, 64, 2, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_overridable_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {4, 16, 65, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_mutable_overridable_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_overridable_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_overridable_features(msg, sub); - } - return sub; -} -UPB_INLINE void google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_fixed_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault *msg, google_protobuf_FeatureSet* value) { - const upb_MiniTableField field = {5, UPB_SIZE(20, 24), 66, 1, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__FeatureSet_msg_init); - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE struct google_protobuf_FeatureSet* google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_mutable_fixed_features(google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault* msg, upb_Arena* arena) { - struct google_protobuf_FeatureSet* sub = (struct google_protobuf_FeatureSet*)google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_fixed_features(msg); - if (sub == NULL) { - sub = (struct google_protobuf_FeatureSet*)_upb_Message_New(&google__protobuf__FeatureSet_msg_init, arena); - if (sub) google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_set_fixed_features(msg, sub); - } - return sub; -} - -/* google.protobuf.SourceCodeInfo */ - -UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo*)_upb_Message_New(&google__protobuf__SourceCodeInfo_msg_init, arena); -} -UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__SourceCodeInfo_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__SourceCodeInfo_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__SourceCodeInfo_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize_ex(const google_protobuf_SourceCodeInfo* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__SourceCodeInfo_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_clear_location(google_protobuf_SourceCodeInfo* msg) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo* msg, size_t* size) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__SourceCodeInfo__Location_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_SourceCodeInfo_Location* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_SourceCodeInfo_location_upb_array(const google_protobuf_SourceCodeInfo* msg, size_t* size) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__SourceCodeInfo__Location_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_SourceCodeInfo_location_mutable_upb_array(google_protobuf_SourceCodeInfo* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__SourceCodeInfo__Location_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo* msg, size_t* size) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__SourceCodeInfo__Location_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_SourceCodeInfo_Location**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_SourceCodeInfo_Location**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo* msg, upb_Arena* arena) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__SourceCodeInfo__Location_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.SourceCodeInfo.Location */ - -UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_new(upb_Arena* arena) { - return (google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google__protobuf__SourceCodeInfo__Location_msg_init, arena); -} -UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__SourceCodeInfo__Location_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__SourceCodeInfo__Location_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__SourceCodeInfo__Location_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize_ex(const google_protobuf_SourceCodeInfo_Location* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__SourceCodeInfo__Location_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_path(google_protobuf_SourceCodeInfo_Location* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_SourceCodeInfo_Location_path_upb_array(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_SourceCodeInfo_Location_path_mutable_upb_array(google_protobuf_SourceCodeInfo_Location* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_span(google_protobuf_SourceCodeInfo_Location* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_SourceCodeInfo_Location_span_upb_array(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - const upb_MiniTableField field = {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_SourceCodeInfo_Location_span_mutable_upb_array(google_protobuf_SourceCodeInfo_Location* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_comments(google_protobuf_SourceCodeInfo_Location* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(24, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {3, UPB_SIZE(24, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(24, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_trailing_comments(google_protobuf_SourceCodeInfo_Location* msg) { - const upb_MiniTableField field = {4, 32, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {4, 32, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { - const upb_MiniTableField field = {4, 32, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg) { - const upb_MiniTableField field = {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - const upb_MiniTableField field = {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_SourceCodeInfo_Location_leading_detached_comments_upb_array(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - const upb_MiniTableField field = {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_SourceCodeInfo_Location_leading_detached_comments_mutable_upb_array(google_protobuf_SourceCodeInfo_Location* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - upb_MiniTableField field = {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (int32_t*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location* msg, int32_t val, upb_Arena* arena) { - upb_MiniTableField field = {1, UPB_SIZE(12, 48), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - upb_MiniTableField field = {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (int32_t*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location* msg, int32_t val, upb_Arena* arena) { - upb_MiniTableField field = {2, UPB_SIZE(16, 56), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { - const upb_MiniTableField field = {3, UPB_SIZE(24, 16), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { - const upb_MiniTableField field = {4, 32, 65, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t* size) { - upb_MiniTableField field = {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (upb_StringView*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (upb_StringView*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, upb_StringView val, upb_Arena* arena) { - upb_MiniTableField field = {6, UPB_SIZE(20, 64), 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsAlternate | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} - -/* google.protobuf.GeneratedCodeInfo */ - -UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo_msg_init, arena); -} -UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__GeneratedCodeInfo_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__GeneratedCodeInfo_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__GeneratedCodeInfo_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize_ex(const google_protobuf_GeneratedCodeInfo* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__GeneratedCodeInfo_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_clear_annotation(google_protobuf_GeneratedCodeInfo* msg) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo* msg, size_t* size) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_GeneratedCodeInfo_annotation_upb_array(const google_protobuf_GeneratedCodeInfo* msg, size_t* size) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init); - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_GeneratedCodeInfo_annotation_mutable_upb_array(google_protobuf_GeneratedCodeInfo* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} - -UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo* msg, size_t* size) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init); - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (google_protobuf_GeneratedCodeInfo_Annotation**)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (google_protobuf_GeneratedCodeInfo_Annotation**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo* msg, upb_Arena* arena) { - upb_MiniTableField field = {1, 8, 0, 0, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - UPB_PRIVATE(_upb_MiniTable_StrongReference)(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init); - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return NULL; - } - struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); - if (!arr || !sub) return NULL; - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); - return sub; -} - -/* google.protobuf.GeneratedCodeInfo.Annotation */ - -UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_new(upb_Arena* arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google__protobuf__GeneratedCodeInfo__Annotation_msg_init, arena); -} -UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse(const char* buf, size_t size, upb_Arena* arena) { - google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__GeneratedCodeInfo__Annotation_msg_init, NULL, 0, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__GeneratedCodeInfo__Annotation_msg_init, extreg, options, - arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation* msg, upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__GeneratedCodeInfo__Annotation_msg_init, 0, arena, &ptr, len); - return ptr; -} -UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize_ex(const google_protobuf_GeneratedCodeInfo_Annotation* msg, int options, - upb_Arena* arena, size_t* len) { - char* ptr; - (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__GeneratedCodeInfo__Annotation_msg_init, options, arena, &ptr, len); - return ptr; -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_path(google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* size) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t const*)upb_Array_DataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE const upb_Array* _google_protobuf_GeneratedCodeInfo_Annotation_path_upb_array(const google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* size) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE upb_Array* _google_protobuf_GeneratedCodeInfo_Annotation_path_mutable_upb_array(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* size, upb_Arena* arena) { - const upb_MiniTableField field = {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), - &field, arena); - if (size) { - *size = arr ? arr->UPB_PRIVATE(size) : 0; - } - return arr; -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_source_file(google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(28, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE upb_StringView google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - upb_StringView default_val = upb_StringView_FromString(""); - upb_StringView ret; - const upb_MiniTableField field = {2, UPB_SIZE(28, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {2, UPB_SIZE(28, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_begin(google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_end(google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 16), 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - int32_t default_val = (int32_t)0; - int32_t ret; - const upb_MiniTableField field = {4, UPB_SIZE(20, 16), 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 16), 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_semantic(google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 20), 67, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); -} -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - int32_t default_val = 0; - int32_t ret; - const upb_MiniTableField field = {5, UPB_SIZE(24, 20), 67, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, - &default_val, &ret); - return ret; -} -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 20), 67, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); -} - -UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* size) { - upb_MiniTableField field = {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); - if (arr) { - if (size) *size = arr->UPB_PRIVATE(size); - return (int32_t*)upb_Array_MutableDataPtr(arr); - } else { - if (size) *size = 0; - return NULL; - } -} -UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t size, upb_Arena* arena) { - upb_MiniTableField field = {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - return (int32_t*)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), - &field, size, arena); -} -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, int32_t val, upb_Arena* arena) { - upb_MiniTableField field = {1, UPB_SIZE(12, 40), 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Array | (int)kUpb_LabelFlags_IsPacked | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; - upb_Array* arr = upb_Message_GetOrCreateMutableArray( - UPB_UPCAST(msg), &field, arena); - if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( - arr, arr->UPB_PRIVATE(size) + 1, arena)) { - return false; - } - UPB_PRIVATE(_upb_Array_Set) - (arr, arr->UPB_PRIVATE(size) - 1, &val, sizeof(val)); - return true; -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_StringView value) { - const upb_MiniTableField field = {2, UPB_SIZE(28, 24), 64, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { - const upb_MiniTableField field = {3, UPB_SIZE(16, 12), 65, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { - const upb_MiniTableField field = {4, UPB_SIZE(20, 16), 66, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_semantic(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { - const upb_MiniTableField field = {5, UPB_SIZE(24, 20), 67, 0, 14, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)}; - upb_Message_SetBaseField((upb_Message *)msg, &field, &value); -} - -/* Max size 32 is google.protobuf.FileOptions */ -/* Max size 64 is google.protobuf.FileOptions */ -#define _UPB_MAXOPT_SIZE UPB_SIZE(112, 200) - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H__UPB_H_ */ -#endif - -// IWYU pragma: end_exports - -#endif // GOOGLE_UPB_UPB_REFLECTION_DESCRIPTOR_BOOTSTRAP_H__ - -typedef enum { - kUpb_Syntax_Proto2 = 2, - kUpb_Syntax_Proto3 = 3, - kUpb_Syntax_Editions = 99 -} upb_Syntax; - -// Forward declarations for circular references. -typedef struct upb_DefPool upb_DefPool; -typedef struct upb_EnumDef upb_EnumDef; -typedef struct upb_EnumReservedRange upb_EnumReservedRange; -typedef struct upb_EnumValueDef upb_EnumValueDef; -typedef struct upb_ExtensionRange upb_ExtensionRange; -typedef struct upb_FieldDef upb_FieldDef; -typedef struct upb_FileDef upb_FileDef; -typedef struct upb_MessageDef upb_MessageDef; -typedef struct upb_MessageReservedRange upb_MessageReservedRange; -typedef struct upb_MethodDef upb_MethodDef; -typedef struct upb_OneofDef upb_OneofDef; -typedef struct upb_ServiceDef upb_ServiceDef; - -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -typedef struct upb_DefBuilder upb_DefBuilder; - -#endif /* UPB_REFLECTION_COMMON_H_ */ - -#ifndef UPB_REFLECTION_DEF_TYPE_H_ -#define UPB_REFLECTION_DEF_TYPE_H_ - - -// Must be last. - -// Inside a symtab we store tagged pointers to specific def types. -typedef enum { - UPB_DEFTYPE_MASK = 7, - - // Only inside symtab table. - UPB_DEFTYPE_EXT = 0, - UPB_DEFTYPE_MSG = 1, - UPB_DEFTYPE_ENUM = 2, - UPB_DEFTYPE_ENUMVAL = 3, - UPB_DEFTYPE_SERVICE = 4, - - // Only inside message table. - UPB_DEFTYPE_FIELD = 0, - UPB_DEFTYPE_ONEOF = 1, -} upb_deftype_t; - -#ifdef __cplusplus -extern "C" { -#endif - -// Our 3-bit pointer tagging requires all pointers to be multiples of 8. -// The arena will always yield 8-byte-aligned addresses, however we put -// the defs into arrays. For each element in the array to be 8-byte-aligned, -// the sizes of each def type must also be a multiple of 8. -// -// If any of these asserts fail, we need to add or remove padding on 32-bit -// machines (64-bit machines will have 8-byte alignment already due to -// pointers, which all of these structs have). -UPB_INLINE void _upb_DefType_CheckPadding(size_t size) { - UPB_ASSERT((size & UPB_DEFTYPE_MASK) == 0); -} - -upb_deftype_t _upb_DefType_Type(upb_value v); - -upb_value _upb_DefType_Pack(const void* ptr, upb_deftype_t type); - -const void* _upb_DefType_Unpack(upb_value v, upb_deftype_t type); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_DEF_TYPE_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API void upb_DefPool_Free(upb_DefPool* s); - -UPB_API upb_DefPool* upb_DefPool_New(void); - -UPB_API const UPB_DESC(FeatureSetDefaults) * - upb_DefPool_FeatureSetDefaults(const upb_DefPool* s); - -UPB_API bool upb_DefPool_SetFeatureSetDefaults(upb_DefPool* s, - const char* serialized_defaults, - size_t serialized_len, - upb_Status* status); - -UPB_API const upb_MessageDef* upb_DefPool_FindMessageByName( - const upb_DefPool* s, const char* sym); - -const upb_MessageDef* upb_DefPool_FindMessageByNameWithSize( - const upb_DefPool* s, const char* sym, size_t len); - -UPB_API const upb_EnumDef* upb_DefPool_FindEnumByName(const upb_DefPool* s, - const char* sym); - -const upb_EnumValueDef* upb_DefPool_FindEnumByNameval(const upb_DefPool* s, - const char* sym); - -UPB_API const upb_FileDef* upb_DefPool_FindFileByName(const upb_DefPool* s, - const char* name); - -const upb_FileDef* upb_DefPool_FindFileByNameWithSize(const upb_DefPool* s, - const char* name, - size_t len); - -const upb_FieldDef* upb_DefPool_FindExtensionByMiniTable( - const upb_DefPool* s, const upb_MiniTableExtension* ext); - -UPB_API const upb_FieldDef* upb_DefPool_FindExtensionByName(const upb_DefPool* s, - const char* sym); - -const upb_FieldDef* upb_DefPool_FindExtensionByNameWithSize( - const upb_DefPool* s, const char* name, size_t size); - -const upb_FieldDef* upb_DefPool_FindExtensionByNumber(const upb_DefPool* s, - const upb_MessageDef* m, - int32_t fieldnum); - -UPB_API const upb_ServiceDef* upb_DefPool_FindServiceByName( - const upb_DefPool* s, const char* name); - -const upb_ServiceDef* upb_DefPool_FindServiceByNameWithSize( - const upb_DefPool* s, const char* name, size_t size); - -const upb_FileDef* upb_DefPool_FindFileContainingSymbol(const upb_DefPool* s, - const char* name); - -UPB_API const upb_FileDef* upb_DefPool_AddFile( - upb_DefPool* s, const UPB_DESC(FileDescriptorProto) * file_proto, - upb_Status* status); - -UPB_API const upb_ExtensionRegistry* upb_DefPool_ExtensionRegistry( - const upb_DefPool* s); - -const upb_FieldDef** upb_DefPool_GetAllExtensions(const upb_DefPool* s, - const upb_MessageDef* m, - size_t* count); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_DEF_POOL_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_ENUM_DEF_H_ -#define UPB_REFLECTION_ENUM_DEF_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -bool upb_EnumDef_CheckNumber(const upb_EnumDef* e, int32_t num); -const upb_MessageDef* upb_EnumDef_ContainingType(const upb_EnumDef* e); -int32_t upb_EnumDef_Default(const upb_EnumDef* e); -UPB_API const upb_FileDef* upb_EnumDef_File(const upb_EnumDef* e); -const upb_EnumValueDef* upb_EnumDef_FindValueByName(const upb_EnumDef* e, - const char* name); -UPB_API const upb_EnumValueDef* upb_EnumDef_FindValueByNameWithSize( - const upb_EnumDef* e, const char* name, size_t size); -UPB_API const upb_EnumValueDef* upb_EnumDef_FindValueByNumber( - const upb_EnumDef* e, int32_t num); -UPB_API const char* upb_EnumDef_FullName(const upb_EnumDef* e); -bool upb_EnumDef_HasOptions(const upb_EnumDef* e); -bool upb_EnumDef_IsClosed(const upb_EnumDef* e); -bool upb_EnumDef_IsSpecifiedAsClosed(const upb_EnumDef* e); - -// Creates a mini descriptor string for an enum, returns true on success. -bool upb_EnumDef_MiniDescriptorEncode(const upb_EnumDef* e, upb_Arena* a, - upb_StringView* out); - -const char* upb_EnumDef_Name(const upb_EnumDef* e); -const UPB_DESC(EnumOptions) * upb_EnumDef_Options(const upb_EnumDef* e); -const UPB_DESC(FeatureSet) * upb_EnumDef_ResolvedFeatures(const upb_EnumDef* e); - -upb_StringView upb_EnumDef_ReservedName(const upb_EnumDef* e, int i); -int upb_EnumDef_ReservedNameCount(const upb_EnumDef* e); - -const upb_EnumReservedRange* upb_EnumDef_ReservedRange(const upb_EnumDef* e, - int i); -int upb_EnumDef_ReservedRangeCount(const upb_EnumDef* e); - -UPB_API const upb_EnumValueDef* upb_EnumDef_Value(const upb_EnumDef* e, int i); -UPB_API int upb_EnumDef_ValueCount(const upb_EnumDef* e); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ENUM_DEF_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_ENUM_VALUE_DEF_H_ -#define UPB_REFLECTION_ENUM_VALUE_DEF_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -const upb_EnumDef* upb_EnumValueDef_Enum(const upb_EnumValueDef* v); -const char* upb_EnumValueDef_FullName(const upb_EnumValueDef* v); -bool upb_EnumValueDef_HasOptions(const upb_EnumValueDef* v); -uint32_t upb_EnumValueDef_Index(const upb_EnumValueDef* v); -UPB_API const char* upb_EnumValueDef_Name(const upb_EnumValueDef* v); -UPB_API int32_t upb_EnumValueDef_Number(const upb_EnumValueDef* v); -const UPB_DESC(EnumValueOptions) * - upb_EnumValueDef_Options(const upb_EnumValueDef* v); -const UPB_DESC(FeatureSet) * - upb_EnumValueDef_ResolvedFeatures(const upb_EnumValueDef* e); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ENUM_VALUE_DEF_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_EXTENSION_RANGE_H_ -#define UPB_REFLECTION_EXTENSION_RANGE_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -int32_t upb_ExtensionRange_Start(const upb_ExtensionRange* r); -int32_t upb_ExtensionRange_End(const upb_ExtensionRange* r); - -bool upb_ExtensionRange_HasOptions(const upb_ExtensionRange* r); -const UPB_DESC(ExtensionRangeOptions) * - upb_ExtensionRange_Options(const upb_ExtensionRange* r); -const UPB_DESC(FeatureSet) * - upb_ExtensionRange_ResolvedFeatures(const upb_ExtensionRange* e); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_EXTENSION_RANGE_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_FIELD_DEF_H_ -#define UPB_REFLECTION_FIELD_DEF_H_ - -#include - - -// Must be last. - -// Maximum field number allowed for FieldDefs. -// This is an inherent limit of the protobuf wire format. -#define kUpb_MaxFieldNumber ((1 << 29) - 1) - -#ifdef __cplusplus -extern "C" { -#endif - -const upb_OneofDef* upb_FieldDef_ContainingOneof(const upb_FieldDef* f); -UPB_API const upb_MessageDef* upb_FieldDef_ContainingType( - const upb_FieldDef* f); -UPB_API upb_CType upb_FieldDef_CType(const upb_FieldDef* f); -UPB_API upb_MessageValue upb_FieldDef_Default(const upb_FieldDef* f); -UPB_API const upb_EnumDef* upb_FieldDef_EnumSubDef(const upb_FieldDef* f); -const upb_MessageDef* upb_FieldDef_ExtensionScope(const upb_FieldDef* f); -UPB_API const upb_FileDef* upb_FieldDef_File(const upb_FieldDef* f); -const char* upb_FieldDef_FullName(const upb_FieldDef* f); -bool upb_FieldDef_HasDefault(const upb_FieldDef* f); -bool upb_FieldDef_HasJsonName(const upb_FieldDef* f); -bool upb_FieldDef_HasOptions(const upb_FieldDef* f); -UPB_API bool upb_FieldDef_HasPresence(const upb_FieldDef* f); -bool upb_FieldDef_HasSubDef(const upb_FieldDef* f); -uint32_t upb_FieldDef_Index(const upb_FieldDef* f); -UPB_API bool upb_FieldDef_IsEnum(const upb_FieldDef* f); -bool upb_FieldDef_IsExtension(const upb_FieldDef* f); -UPB_API bool upb_FieldDef_IsMap(const upb_FieldDef* f); -bool upb_FieldDef_IsOptional(const upb_FieldDef* f); -UPB_API bool upb_FieldDef_IsPacked(const upb_FieldDef* f); -bool upb_FieldDef_IsPrimitive(const upb_FieldDef* f); -UPB_API bool upb_FieldDef_IsRepeated(const upb_FieldDef* f); -UPB_API bool upb_FieldDef_IsRequired(const upb_FieldDef* f); -bool upb_FieldDef_IsString(const upb_FieldDef* f); -UPB_API bool upb_FieldDef_IsSubMessage(const upb_FieldDef* f); -UPB_API const char* upb_FieldDef_JsonName(const upb_FieldDef* f); -UPB_API upb_Label upb_FieldDef_Label(const upb_FieldDef* f); -uint32_t upb_FieldDef_LayoutIndex(const upb_FieldDef* f); -UPB_API const upb_MessageDef* upb_FieldDef_MessageSubDef(const upb_FieldDef* f); -bool _upb_FieldDef_ValidateUtf8(const upb_FieldDef* f); -bool _upb_FieldDef_IsGroupLike(const upb_FieldDef* f); - -// Creates a mini descriptor string for a field, returns true on success. -bool upb_FieldDef_MiniDescriptorEncode(const upb_FieldDef* f, upb_Arena* a, - upb_StringView* out); - -const upb_MiniTableField* upb_FieldDef_MiniTable(const upb_FieldDef* f); -const upb_MiniTableExtension* upb_FieldDef_MiniTableExtension( - const upb_FieldDef* f); -UPB_API const char* upb_FieldDef_Name(const upb_FieldDef* f); -UPB_API uint32_t upb_FieldDef_Number(const upb_FieldDef* f); -const UPB_DESC(FieldOptions) * upb_FieldDef_Options(const upb_FieldDef* f); -const UPB_DESC(FeatureSet) * - upb_FieldDef_ResolvedFeatures(const upb_FieldDef* f); -UPB_API const upb_OneofDef* upb_FieldDef_RealContainingOneof( - const upb_FieldDef* f); -UPB_API upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_FIELD_DEF_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_FILE_DEF_H_ -#define UPB_REFLECTION_FILE_DEF_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API const char* upb_FileDef_EditionName(int edition); - -const upb_FileDef* upb_FileDef_Dependency(const upb_FileDef* f, int i); -int upb_FileDef_DependencyCount(const upb_FileDef* f); -bool upb_FileDef_HasOptions(const upb_FileDef* f); -UPB_API const char* upb_FileDef_Name(const upb_FileDef* f); -const UPB_DESC(FileOptions) * upb_FileDef_Options(const upb_FileDef* f); -const UPB_DESC(FeatureSet) * upb_FileDef_ResolvedFeatures(const upb_FileDef* f); -const char* upb_FileDef_Package(const upb_FileDef* f); -UPB_DESC(Edition) upb_FileDef_Edition(const upb_FileDef* f); -UPB_API const upb_DefPool* upb_FileDef_Pool(const upb_FileDef* f); - -const upb_FileDef* upb_FileDef_PublicDependency(const upb_FileDef* f, int i); -int upb_FileDef_PublicDependencyCount(const upb_FileDef* f); - -const upb_ServiceDef* upb_FileDef_Service(const upb_FileDef* f, int i); -int upb_FileDef_ServiceCount(const upb_FileDef* f); - -UPB_API upb_Syntax upb_FileDef_Syntax(const upb_FileDef* f); - -const upb_EnumDef* upb_FileDef_TopLevelEnum(const upb_FileDef* f, int i); -int upb_FileDef_TopLevelEnumCount(const upb_FileDef* f); - -const upb_FieldDef* upb_FileDef_TopLevelExtension(const upb_FileDef* f, int i); -int upb_FileDef_TopLevelExtensionCount(const upb_FileDef* f); - -const upb_MessageDef* upb_FileDef_TopLevelMessage(const upb_FileDef* f, int i); -int upb_FileDef_TopLevelMessageCount(const upb_FileDef* f); - -const upb_FileDef* upb_FileDef_WeakDependency(const upb_FileDef* f, int i); -int upb_FileDef_WeakDependencyCount(const upb_FileDef* f); - -// Returns whether |symbol| is transitively included by |f| -bool upb_FileDef_Resolves(const upb_FileDef* f, const char* symbol); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_FILE_DEF_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_MESSAGE_DEF_H_ -#define UPB_REFLECTION_MESSAGE_DEF_H_ - - -// Must be last. - -// Well-known field tag numbers for map-entry messages. -#define kUpb_MapEntry_KeyFieldNumber 1 -#define kUpb_MapEntry_ValueFieldNumber 2 - -// Well-known field tag numbers for Any messages. -#define kUpb_Any_TypeFieldNumber 1 -#define kUpb_Any_ValueFieldNumber 2 - -// Well-known field tag numbers for duration messages. -#define kUpb_Duration_SecondsFieldNumber 1 -#define kUpb_Duration_NanosFieldNumber 2 - -// Well-known field tag numbers for timestamp messages. -#define kUpb_Timestamp_SecondsFieldNumber 1 -#define kUpb_Timestamp_NanosFieldNumber 2 - -// All the different kind of well known type messages. For simplicity of check, -// number wrappers and string wrappers are grouped together. Make sure the -// order and number of these groups are not changed. -typedef enum { - kUpb_WellKnown_Unspecified, - kUpb_WellKnown_Any, - kUpb_WellKnown_FieldMask, - kUpb_WellKnown_Duration, - kUpb_WellKnown_Timestamp, - - // number wrappers - kUpb_WellKnown_DoubleValue, - kUpb_WellKnown_FloatValue, - kUpb_WellKnown_Int64Value, - kUpb_WellKnown_UInt64Value, - kUpb_WellKnown_Int32Value, - kUpb_WellKnown_UInt32Value, - - // string wrappers - kUpb_WellKnown_StringValue, - kUpb_WellKnown_BytesValue, - kUpb_WellKnown_BoolValue, - kUpb_WellKnown_Value, - kUpb_WellKnown_ListValue, - kUpb_WellKnown_Struct, -} upb_WellKnown; - -#ifdef __cplusplus -extern "C" { -#endif - -const upb_MessageDef* upb_MessageDef_ContainingType(const upb_MessageDef* m); - -const upb_ExtensionRange* upb_MessageDef_ExtensionRange(const upb_MessageDef* m, - int i); -int upb_MessageDef_ExtensionRangeCount(const upb_MessageDef* m); - -UPB_API const upb_FieldDef* upb_MessageDef_Field(const upb_MessageDef* m, - int i); -UPB_API int upb_MessageDef_FieldCount(const upb_MessageDef* m); - -UPB_API const upb_FileDef* upb_MessageDef_File(const upb_MessageDef* m); - -// Returns a field by either JSON name or regular proto name. -const upb_FieldDef* upb_MessageDef_FindByJsonNameWithSize( - const upb_MessageDef* m, const char* name, size_t size); -UPB_INLINE const upb_FieldDef* upb_MessageDef_FindByJsonName( - const upb_MessageDef* m, const char* name) { - return upb_MessageDef_FindByJsonNameWithSize(m, name, strlen(name)); -} - -// Lookup of either field or oneof by name. Returns whether either was found. -// If the return is true, then the found def will be set, and the non-found -// one set to NULL. -UPB_API bool upb_MessageDef_FindByNameWithSize(const upb_MessageDef* m, - const char* name, size_t size, - const upb_FieldDef** f, - const upb_OneofDef** o); -UPB_INLINE bool upb_MessageDef_FindByName(const upb_MessageDef* m, - const char* name, - const upb_FieldDef** f, - const upb_OneofDef** o) { - return upb_MessageDef_FindByNameWithSize(m, name, strlen(name), f, o); -} - -const upb_FieldDef* upb_MessageDef_FindFieldByName(const upb_MessageDef* m, - const char* name); -UPB_API const upb_FieldDef* upb_MessageDef_FindFieldByNameWithSize( - const upb_MessageDef* m, const char* name, size_t size); -UPB_API const upb_FieldDef* upb_MessageDef_FindFieldByNumber( - const upb_MessageDef* m, uint32_t i); -const upb_OneofDef* upb_MessageDef_FindOneofByName(const upb_MessageDef* m, - const char* name); -UPB_API const upb_OneofDef* upb_MessageDef_FindOneofByNameWithSize( - const upb_MessageDef* m, const char* name, size_t size); -UPB_API const char* upb_MessageDef_FullName(const upb_MessageDef* m); -bool upb_MessageDef_HasOptions(const upb_MessageDef* m); -bool upb_MessageDef_IsMapEntry(const upb_MessageDef* m); -bool upb_MessageDef_IsMessageSet(const upb_MessageDef* m); - -// Creates a mini descriptor string for a message, returns true on success. -bool upb_MessageDef_MiniDescriptorEncode(const upb_MessageDef* m, upb_Arena* a, - upb_StringView* out); - -UPB_API const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m); -const char* upb_MessageDef_Name(const upb_MessageDef* m); - -const upb_EnumDef* upb_MessageDef_NestedEnum(const upb_MessageDef* m, int i); -const upb_FieldDef* upb_MessageDef_NestedExtension(const upb_MessageDef* m, - int i); -const upb_MessageDef* upb_MessageDef_NestedMessage(const upb_MessageDef* m, - int i); - -int upb_MessageDef_NestedEnumCount(const upb_MessageDef* m); -int upb_MessageDef_NestedExtensionCount(const upb_MessageDef* m); -int upb_MessageDef_NestedMessageCount(const upb_MessageDef* m); - -UPB_API const upb_OneofDef* upb_MessageDef_Oneof(const upb_MessageDef* m, - int i); -UPB_API int upb_MessageDef_OneofCount(const upb_MessageDef* m); -int upb_MessageDef_RealOneofCount(const upb_MessageDef* m); - -const UPB_DESC(MessageOptions) * - upb_MessageDef_Options(const upb_MessageDef* m); -const UPB_DESC(FeatureSet) * - upb_MessageDef_ResolvedFeatures(const upb_MessageDef* m); - -upb_StringView upb_MessageDef_ReservedName(const upb_MessageDef* m, int i); -int upb_MessageDef_ReservedNameCount(const upb_MessageDef* m); - -const upb_MessageReservedRange* upb_MessageDef_ReservedRange( - const upb_MessageDef* m, int i); -int upb_MessageDef_ReservedRangeCount(const upb_MessageDef* m); - -UPB_API upb_Syntax upb_MessageDef_Syntax(const upb_MessageDef* m); -UPB_API upb_WellKnown upb_MessageDef_WellKnownType(const upb_MessageDef* m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_MESSAGE_DEF_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_METHOD_DEF_H_ -#define UPB_REFLECTION_METHOD_DEF_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API bool upb_MethodDef_ClientStreaming(const upb_MethodDef* m); -const char* upb_MethodDef_FullName(const upb_MethodDef* m); -bool upb_MethodDef_HasOptions(const upb_MethodDef* m); -int upb_MethodDef_Index(const upb_MethodDef* m); -UPB_API const upb_MessageDef* upb_MethodDef_InputType(const upb_MethodDef* m); -UPB_API const char* upb_MethodDef_Name(const upb_MethodDef* m); -UPB_API const UPB_DESC(MethodOptions) * - upb_MethodDef_Options(const upb_MethodDef* m); -const UPB_DESC(FeatureSet) * - upb_MethodDef_ResolvedFeatures(const upb_MethodDef* m); -UPB_API const upb_MessageDef* upb_MethodDef_OutputType(const upb_MethodDef* m); -UPB_API bool upb_MethodDef_ServerStreaming(const upb_MethodDef* m); -UPB_API const upb_ServiceDef* upb_MethodDef_Service(const upb_MethodDef* m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_METHOD_DEF_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_ONEOF_DEF_H_ -#define UPB_REFLECTION_ONEOF_DEF_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API const upb_MessageDef* upb_OneofDef_ContainingType( - const upb_OneofDef* o); -UPB_API const upb_FieldDef* upb_OneofDef_Field(const upb_OneofDef* o, int i); -UPB_API int upb_OneofDef_FieldCount(const upb_OneofDef* o); -const char* upb_OneofDef_FullName(const upb_OneofDef* o); -bool upb_OneofDef_HasOptions(const upb_OneofDef* o); -uint32_t upb_OneofDef_Index(const upb_OneofDef* o); -bool upb_OneofDef_IsSynthetic(const upb_OneofDef* o); -const upb_FieldDef* upb_OneofDef_LookupName(const upb_OneofDef* o, - const char* name); -const upb_FieldDef* upb_OneofDef_LookupNameWithSize(const upb_OneofDef* o, - const char* name, - size_t size); -const upb_FieldDef* upb_OneofDef_LookupNumber(const upb_OneofDef* o, - uint32_t num); -UPB_API const char* upb_OneofDef_Name(const upb_OneofDef* o); -int upb_OneofDef_numfields(const upb_OneofDef* o); -const UPB_DESC(OneofOptions*) upb_OneofDef_Options(const upb_OneofDef* o); -const UPB_DESC(FeatureSet*) - upb_OneofDef_ResolvedFeatures(const upb_OneofDef* o); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ONEOF_DEF_H_ */ - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_SERVICE_DEF_H_ -#define UPB_REFLECTION_SERVICE_DEF_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API const upb_FileDef* upb_ServiceDef_File(const upb_ServiceDef* s); -const upb_MethodDef* upb_ServiceDef_FindMethodByName(const upb_ServiceDef* s, - const char* name); -UPB_API const char* upb_ServiceDef_FullName(const upb_ServiceDef* s); -bool upb_ServiceDef_HasOptions(const upb_ServiceDef* s); -int upb_ServiceDef_Index(const upb_ServiceDef* s); -UPB_API const upb_MethodDef* upb_ServiceDef_Method(const upb_ServiceDef* s, - int i); -UPB_API int upb_ServiceDef_MethodCount(const upb_ServiceDef* s); -const char* upb_ServiceDef_Name(const upb_ServiceDef* s); -UPB_API const UPB_DESC(ServiceOptions) * - upb_ServiceDef_Options(const upb_ServiceDef* s); -const UPB_DESC(FeatureSet) * - upb_ServiceDef_ResolvedFeatures(const upb_ServiceDef* s); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_SERVICE_DEF_H_ */ -// IWYU pragma: end_exports - -#endif /* UPB_REFLECTION_DEF_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -enum { upb_JsonDecode_IgnoreUnknown = 1 }; - -enum { - kUpb_JsonDecodeResult_Ok = 0, - kUpb_JsonDecodeResult_Error = 2, -}; - -UPB_API int upb_JsonDecodeDetectingNonconformance(const char* buf, size_t size, - upb_Message* msg, - const upb_MessageDef* m, - const upb_DefPool* symtab, - int options, upb_Arena* arena, - upb_Status* status); - -UPB_API_INLINE bool upb_JsonDecode(const char* buf, size_t size, - upb_Message* msg, const upb_MessageDef* m, - const upb_DefPool* symtab, int options, - upb_Arena* arena, upb_Status* status) { - return upb_JsonDecodeDetectingNonconformance(buf, size, msg, m, symtab, - options, arena, status) == - kUpb_JsonDecodeResult_Ok; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_JSONDECODE_H_ */ - -#ifndef UPB_LEX_ATOI_H_ -#define UPB_LEX_ATOI_H_ - -#include - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// We use these hand-written routines instead of strto[u]l() because the "long -// long" variants aren't in c89. Also our version allows setting a ptr limit. -// Return the new position of the pointer after parsing the int, or NULL on -// integer overflow. - -const char* upb_BufToUint64(const char* ptr, const char* end, uint64_t* val); -const char* upb_BufToInt64(const char* ptr, const char* end, int64_t* val, - bool* is_neg); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_LEX_ATOI_H_ */ - -#ifndef UPB_LEX_UNICODE_H_ -#define UPB_LEX_UNICODE_H_ - -#include - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Returns true iff a codepoint is the value for a high surrogate. -UPB_INLINE bool upb_Unicode_IsHigh(uint32_t cp) { - return (cp >= 0xd800 && cp <= 0xdbff); -} - -// Returns true iff a codepoint is the value for a low surrogate. -UPB_INLINE bool upb_Unicode_IsLow(uint32_t cp) { - return (cp >= 0xdc00 && cp <= 0xdfff); -} - -// Returns the high 16-bit surrogate value for a supplementary codepoint. -// Does not sanity-check the input. -UPB_INLINE uint16_t upb_Unicode_ToHigh(uint32_t cp) { - return (cp >> 10) + 0xd7c0; -} - -// Returns the low 16-bit surrogate value for a supplementary codepoint. -// Does not sanity-check the input. -UPB_INLINE uint16_t upb_Unicode_ToLow(uint32_t cp) { - return (cp & 0x3ff) | 0xdc00; -} - -// Returns the 32-bit value corresponding to a pair of 16-bit surrogates. -// Does not sanity-check the input. -UPB_INLINE uint32_t upb_Unicode_FromPair(uint32_t high, uint32_t low) { - return ((high & 0x3ff) << 10) + (low & 0x3ff) + 0x10000; -} - -// Outputs a codepoint as UTF8. -// Returns the number of bytes written (1-4 on success, 0 on error). -// Does not sanity-check the input. Specifically does not check for surrogates. -int upb_Unicode_ToUTF8(uint32_t cp, char* out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_LEX_UNICODE_H_ */ - -#ifndef UPB_REFLECTION_MESSAGE_H_ -#define UPB_REFLECTION_MESSAGE_H_ - -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Returns a mutable pointer to a map, array, or submessage value. If the given -// arena is non-NULL this will construct a new object if it was not previously -// present. May not be called for primitive fields. -UPB_API upb_MutableMessageValue upb_Message_Mutable(upb_Message* msg, - const upb_FieldDef* f, - upb_Arena* a); - -// Returns the field that is set in the oneof, or NULL if none are set. -UPB_API const upb_FieldDef* upb_Message_WhichOneofByDef(const upb_Message* msg, - const upb_OneofDef* o); - -// Clear all data and unknown fields. -void upb_Message_ClearByDef(upb_Message* msg, const upb_MessageDef* m); - -// Clears any field presence and sets the value back to its default. -UPB_API void upb_Message_ClearFieldByDef(upb_Message* msg, - const upb_FieldDef* f); - -// May only be called for fields where upb_FieldDef_HasPresence(f) == true. -UPB_API bool upb_Message_HasFieldByDef(const upb_Message* msg, - const upb_FieldDef* f); - -// Returns the value in the message associated with this field def. -UPB_API upb_MessageValue upb_Message_GetFieldByDef(const upb_Message* msg, - const upb_FieldDef* f); - -// Sets the given field to the given value. For a msg/array/map/string, the -// caller must ensure that the target data outlives |msg| (by living either in -// the same arena or a different arena that outlives it). -// -// Returns false if allocation fails. -UPB_API bool upb_Message_SetFieldByDef(upb_Message* msg, const upb_FieldDef* f, - upb_MessageValue val, upb_Arena* a); - -// Iterate over present fields. -// -// size_t iter = kUpb_Message_Begin; -// const upb_FieldDef *f; -// upb_MessageValue val; -// while (upb_Message_Next(msg, m, ext_pool, &f, &val, &iter)) { -// process_field(f, val); -// } -// -// If ext_pool is NULL, no extensions will be returned. If the given symtab -// returns extensions that don't match what is in this message, those extensions -// will be skipped. - -#define kUpb_Message_Begin -1 - -UPB_API bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m, - const upb_DefPool* ext_pool, - const upb_FieldDef** f, upb_MessageValue* val, - size_t* iter); - -// Clears all unknown field data from this message and all submessages. -UPB_API bool upb_Message_DiscardUnknown(upb_Message* msg, - const upb_MessageDef* m, - const upb_DefPool* ext_pool, - int maxdepth); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_MESSAGE_H_ */ - -#ifndef UPB_JSON_ENCODE_H_ -#define UPB_JSON_ENCODE_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - /* When set, emits 0/default values. TODO: proto3 only? */ - upb_JsonEncode_EmitDefaults = 1 << 0, - - /* When set, use normal (snake_case) field names instead of JSON (camelCase) - names. */ - upb_JsonEncode_UseProtoNames = 1 << 1, - - /* When set, emits enums as their integer values instead of as their names. */ - upb_JsonEncode_FormatEnumsAsIntegers = 1 << 2 -}; - -/* Encodes the given |msg| to JSON format. The message's reflection is given in - * |m|. The DefPool in |ext_pool| is used to find extensions (if NULL, - * extensions will not be printed). - * - * Output is placed in the given buffer, and always NULL-terminated. The output - * size (excluding NULL) is returned. This means that a return value >= |size| - * implies that the output was truncated. (These are the same semantics as - * snprintf()). */ -UPB_API size_t upb_JsonEncode(const upb_Message* msg, const upb_MessageDef* m, - const upb_DefPool* ext_pool, int options, - char* buf, size_t size, upb_Status* status); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_JSONENCODE_H_ */ - -#ifndef UPB_LEX_ROUND_TRIP_H_ -#define UPB_LEX_ROUND_TRIP_H_ - -// Must be last. - -// Encodes a float or double that is round-trippable, but as short as possible. -// These routines are not fully optimal (not guaranteed to be shortest), but are -// short-ish and match the implementation that has been used in protobuf since -// the beginning. - -// The given buffer size must be at least kUpb_RoundTripBufferSize. -enum { kUpb_RoundTripBufferSize = 32 }; - -#ifdef __cplusplus -extern "C" { -#endif - -void _upb_EncodeRoundTripDouble(double val, char* buf, size_t size); -void _upb_EncodeRoundTripFloat(float val, char* buf, size_t size); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_LEX_ROUND_TRIP_H_ */ - -#ifndef UPB_PORT_VSNPRINTF_COMPAT_H_ -#define UPB_PORT_VSNPRINTF_COMPAT_H_ - -// Must be last. - -UPB_INLINE int _upb_vsnprintf(char* buf, size_t size, const char* fmt, - va_list ap) { -#if defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSC_VER) - // The msvc runtime has a non-conforming vsnprintf() that requires the - // following compatibility code to become conformant. - int n = -1; - if (size != 0) n = _vsnprintf_s(buf, size, _TRUNCATE, fmt, ap); - if (n == -1) n = _vscprintf(fmt, ap); - return n; -#else - return vsnprintf(buf, size, fmt, ap); -#endif -} - - -#endif // UPB_PORT_VSNPRINTF_COMPAT_H_ - -#ifndef UPB_PORT_ATOMIC_H_ -#define UPB_PORT_ATOMIC_H_ - - -#ifdef UPB_USE_C11_ATOMICS - -// IWYU pragma: begin_exports -#include -#include -// IWYU pragma: end_exports - -#define upb_Atomic_Init(addr, val) atomic_init(addr, val) -#define upb_Atomic_Load(addr, order) atomic_load_explicit(addr, order) -#define upb_Atomic_Store(addr, val, order) \ - atomic_store_explicit(addr, val, order) -#define upb_Atomic_Exchange(addr, val, order) \ - atomic_exchange_explicit(addr, val, order) -#define upb_Atomic_CompareExchangeStrong(addr, expected, desired, \ - success_order, failure_order) \ - atomic_compare_exchange_strong_explicit(addr, expected, desired, \ - success_order, failure_order) -#define upb_Atomic_CompareExchangeWeak(addr, expected, desired, success_order, \ - failure_order) \ - atomic_compare_exchange_weak_explicit(addr, expected, desired, \ - success_order, failure_order) - -#elif defined(UPB_USE_MSC_ATOMICS) -#include -#include -#include - -#define upb_Atomic_Init(addr, val) (*(addr) = val) - -#if defined(_WIN64) -// MSVC, without C11 atomics, does not have any way in pure C to force -// load-acquire store-release behavior, so we hack it with exchanges. -#pragma intrinsic(_InterlockedExchange64) -#define upb_Atomic_Store(addr, val, order) \ - (void)_InterlockedExchange64((uint64_t volatile *)addr, (uint64_t)val) - -#pragma intrinsic(_InterlockedCompareExchange64) -static uintptr_t upb_Atomic_LoadMsc(uint64_t volatile *addr) { - // Compare exchange with an unlikely value reduces the risk of a spurious - // (but harmless) store - return _InterlockedCompareExchange64(addr, 0xDEADC0DEBAADF00D, - 0xDEADC0DEBAADF00D); -} -// If _Generic is available, use it to avoid emitting a "'uintptr_t' differs in -// levels of indirection from 'void *'" or -Wint-conversion compiler warning. -#if __STDC_VERSION__ >= 201112L -#define upb_Atomic_Load(addr, order) \ - _Generic(addr, \ - UPB_ATOMIC(uintptr_t) *: upb_Atomic_LoadMsc( \ - (uint64_t volatile *)(addr)), \ - default: (void *)upb_Atomic_LoadMsc((uint64_t volatile *)(addr))) - -#define upb_Atomic_Exchange(addr, val, order) \ - _Generic(addr, \ - UPB_ATOMIC(uintptr_t) *: _InterlockedExchange64( \ - (uint64_t volatile *)(addr), (uint64_t)val), \ - default: (void *)_InterlockedExchange64((uint64_t volatile *)addr, \ - (uint64_t)val)) -#else -// Compare exchange with an unlikely value reduces the risk of a spurious -// (but harmless) store -#define upb_Atomic_Load(addr, order) \ - (void *)upb_Atomic_LoadMsc((uint64_t volatile *)(addr)) - -#define upb_Atomic_Exchange(addr, val, order) \ - (void *)_InterlockedExchange64((uint64_t volatile *)addr, (uint64_t)val) -#endif - -#pragma intrinsic(_InterlockedCompareExchange64) -static bool upb_Atomic_CompareExchangeMscP(uint64_t volatile *addr, - uint64_t *expected, - uint64_t desired) { - uint64_t expect_val = *expected; - uint64_t actual_val = - _InterlockedCompareExchange64(addr, desired, expect_val); - if (expect_val != actual_val) { - *expected = actual_val; - return false; - } - return true; -} - -#define upb_Atomic_CompareExchangeStrong(addr, expected, desired, \ - success_order, failure_order) \ - upb_Atomic_CompareExchangeMscP((uint64_t volatile *)addr, \ - (uint64_t *)expected, (uint64_t)desired) - -#define upb_Atomic_CompareExchangeWeak(addr, expected, desired, success_order, \ - failure_order) \ - upb_Atomic_CompareExchangeMscP((uint64_t volatile *)addr, \ - (uint64_t *)expected, (uint64_t)desired) - -#else // 32 bit pointers -#pragma intrinsic(_InterlockedExchange) -#define upb_Atomic_Store(addr, val, order) \ - (void)_InterlockedExchange((uint32_t volatile *)addr, (uint32_t)val) - -#pragma intrinsic(_InterlockedCompareExchange) -static uintptr_t upb_Atomic_LoadMsc(uint32_t volatile *addr) { - // Compare exchange with an unlikely value reduces the risk of a spurious - // (but harmless) store - return _InterlockedCompareExchange(addr, 0xDEADC0DE, 0xDEADC0DE); -} -// If _Generic is available, use it to avoid emitting 'uintptr_t' differs in -// levels of indirection from 'void *' -#if __STDC_VERSION__ >= 201112L -#define upb_Atomic_Load(addr, order) \ - _Generic(addr, \ - UPB_ATOMIC(uintptr_t) *: upb_Atomic_LoadMsc( \ - (uint32_t volatile *)(addr)), \ - default: (void *)upb_Atomic_LoadMsc((uint32_t volatile *)(addr))) - -#define upb_Atomic_Exchange(addr, val, order) \ - _Generic(addr, \ - UPB_ATOMIC(uintptr_t) *: _InterlockedExchange( \ - (uint32_t volatile *)(addr), (uint32_t)val), \ - default: (void *)_InterlockedExchange64((uint32_t volatile *)addr, \ - (uint32_t)val)) -#else -#define upb_Atomic_Load(addr, order) \ - (void *)upb_Atomic_LoadMsc((uint32_t volatile *)(addr)) - -#define upb_Atomic_Exchange(addr, val, order) \ - (void *)_InterlockedExchange((uint32_t volatile *)addr, (uint32_t)val) -#endif - -#pragma intrinsic(_InterlockedCompareExchange) -static bool upb_Atomic_CompareExchangeMscP(uint32_t volatile *addr, - uint32_t *expected, - uint32_t desired) { - uint32_t expect_val = *expected; - uint32_t actual_val = _InterlockedCompareExchange(addr, desired, expect_val); - if (expect_val != actual_val) { - *expected = actual_val; - return false; - } - return true; -} - -#define upb_Atomic_CompareExchangeStrong(addr, expected, desired, \ - success_order, failure_order) \ - upb_Atomic_CompareExchangeMscP((uint32_t volatile *)addr, \ - (uint32_t *)expected, (uint32_t)desired) - -#define upb_Atomic_CompareExchangeWeak(addr, expected, desired, success_order, \ - failure_order) \ - upb_Atomic_CompareExchangeMscP((uint32_t volatile *)addr, \ - (uint32_t *)expected, (uint32_t)desired) -#endif - -#else // No atomics - -#if !defined(UPB_SUPPRESS_MISSING_ATOMICS) -// NOLINTNEXTLINE -#error Your compiler does not support atomic instructions, which UPB uses. If you do not use UPB on multiple threads, you can suppress this error by defining UPB_SUPPRESS_MISSING_ATOMICS. -#endif - -#include - -#define upb_Atomic_Init(addr, val) (*addr = val) -#define upb_Atomic_Load(addr, order) (*addr) -#define upb_Atomic_Store(addr, val, order) (*(addr) = val) - -UPB_INLINE void* _upb_NonAtomic_Exchange(void* addr, void* value) { - void* old; - memcpy(&old, addr, sizeof(value)); - memcpy(addr, &value, sizeof(value)); - return old; -} - -#define upb_Atomic_Exchange(addr, val, order) _upb_NonAtomic_Exchange(addr, val) - -// `addr` and `expected` are logically double pointers. -UPB_INLINE bool _upb_NonAtomic_CompareExchangeStrongP(void* addr, - void* expected, - void* desired) { - if (memcmp(addr, expected, sizeof(desired)) == 0) { - memcpy(addr, &desired, sizeof(desired)); - return true; - } else { - memcpy(expected, addr, sizeof(desired)); - return false; - } -} - -#define upb_Atomic_CompareExchangeStrong(addr, expected, desired, \ - success_order, failure_order) \ - _upb_NonAtomic_CompareExchangeStrongP((void*)addr, (void*)expected, \ - (void*)desired) -#define upb_Atomic_CompareExchangeWeak(addr, expected, desired, success_order, \ - failure_order) \ - upb_Atomic_CompareExchangeStrong(addr, expected, desired, 0, 0) - -#endif - - -#endif // UPB_PORT_ATOMIC_H_ - -#ifndef UPB_MESSAGE_COMPAT_H_ -#define UPB_MESSAGE_COMPAT_H_ - -#include - - -// Must be last. - -// upb does not support mixing minitables from different sources but these -// functions are still used by some existing users so for now we make them -// available here. This may or may not change in the future so do not add -// them to new code. - -#ifdef __cplusplus -extern "C" { -#endif - -// Same as upb_Message_NextExtension but iterates in reverse wire order -bool upb_Message_NextExtensionReverse(const upb_Message* msg, - const upb_MiniTableExtension** result, - uintptr_t* iter); -// Returns the minitable with the given field number, or NULL on failure. -const upb_MiniTableExtension* upb_Message_FindExtensionByNumber( - const upb_Message* msg, uint32_t field_number); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_COMPAT_H_ */ - -// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// - -#ifndef UPB_MESSAGE_INTERNAL_MAP_SORTER_H_ -#define UPB_MESSAGE_INTERNAL_MAP_SORTER_H_ - -#include -#include -#include - - -#ifndef UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ -#define UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ - -#include - - -// Map entries aren't actually stored for map fields, they are only used during -// parsing. (It helps a lot if all map entry messages have the same layout.) -// The mini_table layout code will ensure that all map entries have this layout. -// -// Note that users can and do create map entries directly, which will also use -// this layout. - -typedef struct { - struct upb_Message message; - // We only need 2 hasbits max, but due to alignment we'll use 8 bytes here, - // and the uint64_t helps make this clear. - uint64_t hasbits; - union { - upb_StringView str; // For str/bytes. - upb_value val; // For all other types. - double d[2]; // Padding for 32-bit builds. - } k; - union { - upb_StringView str; // For str/bytes. - upb_value val; // For all other types. - double d[2]; // Padding for 32-bit builds. - } v; -} upb_MapEntry; - -#endif // UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// _upb_mapsorter sorts maps and provides ordered iteration over the entries. -// Since maps can be recursive (map values can be messages which contain other -// maps), _upb_mapsorter can contain a stack of maps. - -typedef struct { - void const** entries; - int size; - int cap; -} _upb_mapsorter; - -typedef struct { - int start; - int pos; - int end; -} _upb_sortedmap; - -UPB_INLINE void _upb_mapsorter_init(_upb_mapsorter* s) { - s->entries = NULL; - s->size = 0; - s->cap = 0; -} - -UPB_INLINE void _upb_mapsorter_destroy(_upb_mapsorter* s) { - if (s->entries) upb_gfree(s->entries); -} - -UPB_INLINE bool _upb_sortedmap_next(_upb_mapsorter* s, - const struct upb_Map* map, - _upb_sortedmap* sorted, upb_MapEntry* ent) { - if (sorted->pos == sorted->end) return false; - const upb_tabent* tabent = (const upb_tabent*)s->entries[sorted->pos++]; - if (map->UPB_PRIVATE(is_strtable)) { - upb_StringView key = upb_key_strview(tabent->key); - _upb_map_fromkey(key, &ent->k, map->key_size); - } else { - uintptr_t key = tabent->key.num; - memcpy(&ent->k, &key, map->key_size); - } - upb_value val = {tabent->val.val}; - _upb_map_fromvalue(val, &ent->v, map->val_size); - return true; -} - -UPB_INLINE bool _upb_sortedmap_nextext(_upb_mapsorter* s, - _upb_sortedmap* sorted, - const upb_Extension** ext) { - if (sorted->pos == sorted->end) return false; - *ext = (const upb_Extension*)s->entries[sorted->pos++]; - return true; -} - -UPB_INLINE void _upb_mapsorter_popmap(_upb_mapsorter* s, - _upb_sortedmap* sorted) { - s->size = sorted->start; -} - -bool _upb_mapsorter_pushmap(_upb_mapsorter* s, upb_FieldType key_type, - const struct upb_Map* map, _upb_sortedmap* sorted); - -bool _upb_mapsorter_pushexts(_upb_mapsorter* s, const upb_Message_Internal* in, - _upb_sortedmap* sorted); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_INTERNAL_MAP_SORTER_H_ */ - -#ifndef UPB_BASE_INTERNAL_LOG2_H_ -#define UPB_BASE_INTERNAL_LOG2_H_ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE int upb_Log2Ceiling(int x) { - if (x <= 1) return 0; -#ifdef __GNUC__ - return 32 - __builtin_clz(x - 1); -#else - int lg2 = 0; - while ((1 << lg2) < x) lg2++; - return lg2; -#endif -} - -UPB_INLINE int upb_RoundUpToPowerOfTwo(int x) { - return 1 << upb_Log2Ceiling(x); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_BASE_INTERNAL_LOG2_H_ */ - -#ifndef UPB_MESSAGE_COMPARE_H_ -#define UPB_MESSAGE_COMPARE_H_ - -#include - - -// Must be last. - -enum { - // If set, upb_Message_IsEqual() will attempt to compare unknown fields. - // By its very nature this comparison is inexact. - kUpb_CompareOption_IncludeUnknownFields = (1 << 0) -}; - -#ifdef __cplusplus -extern "C" { -#endif - -// Returns true if no known fields or extensions are set in the message. -UPB_API bool upb_Message_IsEmpty(const upb_Message* msg, - const upb_MiniTable* m); - -UPB_API bool upb_Message_IsEqual(const upb_Message* msg1, - const upb_Message* msg2, - const upb_MiniTable* m, int options); - -// If |ctype| is a message then |m| must point to its minitable. -UPB_API_INLINE bool upb_MessageValue_IsEqual(upb_MessageValue val1, - upb_MessageValue val2, - upb_CType ctype, - const upb_MiniTable* m, - int options) { - switch (ctype) { - case kUpb_CType_Bool: - return val1.bool_val == val2.bool_val; - - case kUpb_CType_Float: - case kUpb_CType_Int32: - case kUpb_CType_UInt32: - case kUpb_CType_Enum: - return val1.int32_val == val2.int32_val; - - case kUpb_CType_Double: - case kUpb_CType_Int64: - case kUpb_CType_UInt64: - return val1.int64_val == val2.int64_val; - - case kUpb_CType_String: - case kUpb_CType_Bytes: - return upb_StringView_IsEqual(val1.str_val, val2.str_val); - - case kUpb_CType_Message: - return upb_Message_IsEqual(val1.msg_val, val2.msg_val, m, options); - - default: - UPB_UNREACHABLE(); - return false; - } -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_MESSAGE_COMPARE_H_ - -#ifndef UPB_MESSAGE_INTERNAL_COMPARE_UNKNOWN_H_ -#define UPB_MESSAGE_INTERNAL_COMPARE_UNKNOWN_H_ - -#include - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Returns true if unknown fields from the two messages are equal when sorted -// and varints are made canonical. -// -// This function is discouraged, as the comparison is inherently lossy without -// schema data: -// -// 1. We don't know whether delimited fields are sub-messages. Unknown -// sub-messages will therefore not have their fields sorted and varints -// canonicalized. -// 2. We don't know about oneof/non-repeated fields, which should semantically -// discard every value except the last. - -typedef enum { - kUpb_UnknownCompareResult_Equal = 0, - kUpb_UnknownCompareResult_NotEqual = 1, - kUpb_UnknownCompareResult_OutOfMemory = 2, - kUpb_UnknownCompareResult_MaxDepthExceeded = 3, -} upb_UnknownCompareResult; - -upb_UnknownCompareResult UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)( - const upb_Message* msg1, const upb_Message* msg2, int max_depth); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MESSAGE_INTERNAL_COMPARE_UNKNOWN_H_ */ - -#ifndef GOOGLE_UPB_UPB_MESSAGE_INTERNAL_ITERATOR_H__ -#define GOOGLE_UPB_UPB_MESSAGE_INTERNAL_ITERATOR_H__ - -#include -#include - - -// Must be last. - -#define kUpb_BaseField_Begin ((size_t)-1) -bool UPB_PRIVATE(_upb_Message_NextBaseField)(const upb_Message* msg, - const upb_MiniTable* m, - const upb_MiniTableField** out_f, - upb_MessageValue* out_v, - uintptr_t* iter); - -#endif // GOOGLE_UPB_UPB_MESSAGE_INTERNAL_ITERATOR_H__ - -#ifndef UPB_WIRE_READER_H_ -#define UPB_WIRE_READER_H_ - - -#ifndef UPB_WIRE_INTERNAL_READER_H_ -#define UPB_WIRE_INTERNAL_READER_H_ - -// Must be last. - -#define kUpb_WireReader_WireTypeBits 3 -#define kUpb_WireReader_WireTypeMask 7 - -typedef struct { - const char* ptr; - uint64_t val; -} UPB_PRIVATE(_upb_WireReader_LongVarint); - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_PRIVATE(_upb_WireReader_LongVarint) -UPB_PRIVATE(_upb_WireReader_ReadLongVarint)(const char* ptr, uint64_t val); - -UPB_FORCEINLINE const char* UPB_PRIVATE(_upb_WireReader_ReadVarint)( - const char* ptr, uint64_t* val, int maxlen, uint64_t maxval) { - uint64_t byte = (uint8_t)*ptr; - if (UPB_LIKELY((byte & 0x80) == 0)) { - *val = (uint32_t)byte; - return ptr + 1; - } - const char* start = ptr; - UPB_PRIVATE(_upb_WireReader_LongVarint) - res = UPB_PRIVATE(_upb_WireReader_ReadLongVarint)(ptr, byte); - if (!res.ptr || (maxlen < 10 && res.ptr - start > maxlen) || - res.val > maxval) { - return NULL; // Malformed. - } - *val = res.val; - return res.ptr; -} - -UPB_API_INLINE uint32_t upb_WireReader_GetFieldNumber(uint32_t tag) { - return tag >> kUpb_WireReader_WireTypeBits; -} - -UPB_API_INLINE uint8_t upb_WireReader_GetWireType(uint32_t tag) { - return tag & kUpb_WireReader_WireTypeMask; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_WIRE_INTERNAL_READER_H_ - -#ifndef UPB_WIRE_TYPES_H_ -#define UPB_WIRE_TYPES_H_ - -// A list of types as they are encoded on the wire. -typedef enum { - kUpb_WireType_Varint = 0, - kUpb_WireType_64Bit = 1, - kUpb_WireType_Delimited = 2, - kUpb_WireType_StartGroup = 3, - kUpb_WireType_EndGroup = 4, - kUpb_WireType_32Bit = 5 -} upb_WireType; - -#endif /* UPB_WIRE_TYPES_H_ */ - -// Must be last. - -// The upb_WireReader interface is suitable for general-purpose parsing of -// protobuf binary wire format. It is designed to be used along with -// upb_EpsCopyInputStream for buffering, and all parsing routines in this file -// assume that at least kUpb_EpsCopyInputStream_SlopBytes worth of data is -// available to read without any bounds checks. - -#ifdef __cplusplus -extern "C" { -#endif - -// Parses a tag into `tag`, and returns a pointer past the end of the tag, or -// NULL if there was an error in the tag data. -// -// REQUIRES: there must be at least 10 bytes of data available at `ptr`. -// Bounds checks must be performed before calling this function, preferably -// by calling upb_EpsCopyInputStream_IsDone(). -UPB_FORCEINLINE const char* upb_WireReader_ReadTag(const char* ptr, - uint32_t* tag) { - uint64_t val; - ptr = UPB_PRIVATE(_upb_WireReader_ReadVarint)(ptr, &val, 5, UINT32_MAX); - if (!ptr) return NULL; - *tag = val; - return ptr; -} - -// Given a tag, returns the field number. -UPB_API_INLINE uint32_t upb_WireReader_GetFieldNumber(uint32_t tag); - -// Given a tag, returns the wire type. -UPB_API_INLINE uint8_t upb_WireReader_GetWireType(uint32_t tag); - -UPB_INLINE const char* upb_WireReader_ReadVarint(const char* ptr, - uint64_t* val) { - return UPB_PRIVATE(_upb_WireReader_ReadVarint)(ptr, val, 10, UINT64_MAX); -} - -// Skips data for a varint, returning a pointer past the end of the varint, or -// NULL if there was an error in the varint data. -// -// REQUIRES: there must be at least 10 bytes of data available at `ptr`. -// Bounds checks must be performed before calling this function, preferably -// by calling upb_EpsCopyInputStream_IsDone(). -UPB_INLINE const char* upb_WireReader_SkipVarint(const char* ptr) { - uint64_t val; - return upb_WireReader_ReadVarint(ptr, &val); -} - -// Reads a varint indicating the size of a delimited field into `size`, or -// NULL if there was an error in the varint data. -// -// REQUIRES: there must be at least 10 bytes of data available at `ptr`. -// Bounds checks must be performed before calling this function, preferably -// by calling upb_EpsCopyInputStream_IsDone(). -UPB_INLINE const char* upb_WireReader_ReadSize(const char* ptr, int* size) { - uint64_t size64; - ptr = upb_WireReader_ReadVarint(ptr, &size64); - if (!ptr || size64 >= INT32_MAX) return NULL; - *size = size64; - return ptr; -} - -// Reads a fixed32 field, performing byte swapping if necessary. -// -// REQUIRES: there must be at least 4 bytes of data available at `ptr`. -// Bounds checks must be performed before calling this function, preferably -// by calling upb_EpsCopyInputStream_IsDone(). -UPB_INLINE const char* upb_WireReader_ReadFixed32(const char* ptr, void* val) { - uint32_t uval; - memcpy(&uval, ptr, 4); - uval = upb_BigEndian32(uval); - memcpy(val, &uval, 4); - return ptr + 4; -} - -// Reads a fixed64 field, performing byte swapping if necessary. -// -// REQUIRES: there must be at least 4 bytes of data available at `ptr`. -// Bounds checks must be performed before calling this function, preferably -// by calling upb_EpsCopyInputStream_IsDone(). -UPB_INLINE const char* upb_WireReader_ReadFixed64(const char* ptr, void* val) { - uint64_t uval; - memcpy(&uval, ptr, 8); - uval = upb_BigEndian64(uval); - memcpy(val, &uval, 8); - return ptr + 8; -} - -const char* UPB_PRIVATE(_upb_WireReader_SkipGroup)( - const char* ptr, uint32_t tag, int depth_limit, - upb_EpsCopyInputStream* stream); - -// Skips data for a group, returning a pointer past the end of the group, or -// NULL if there was an error parsing the group. The `tag` argument should be -// the start group tag that begins the group. The `depth_limit` argument -// indicates how many levels of recursion the group is allowed to have before -// reporting a parse error (this limit exists to protect against stack -// overflow). -// -// TODO: evaluate how the depth_limit should be specified. Do users need -// control over this? -UPB_INLINE const char* upb_WireReader_SkipGroup( - const char* ptr, uint32_t tag, upb_EpsCopyInputStream* stream) { - return UPB_PRIVATE(_upb_WireReader_SkipGroup)(ptr, tag, 100, stream); -} - -UPB_INLINE const char* _upb_WireReader_SkipValue( - const char* ptr, uint32_t tag, int depth_limit, - upb_EpsCopyInputStream* stream) { - switch (upb_WireReader_GetWireType(tag)) { - case kUpb_WireType_Varint: - return upb_WireReader_SkipVarint(ptr); - case kUpb_WireType_32Bit: - return ptr + 4; - case kUpb_WireType_64Bit: - return ptr + 8; - case kUpb_WireType_Delimited: { - int size; - ptr = upb_WireReader_ReadSize(ptr, &size); - if (!ptr) return NULL; - ptr += size; - return ptr; - } - case kUpb_WireType_StartGroup: - return UPB_PRIVATE(_upb_WireReader_SkipGroup)(ptr, tag, depth_limit, - stream); - case kUpb_WireType_EndGroup: - return NULL; // Should be handled before now. - default: - return NULL; // Unknown wire type. - } -} - -// Skips data for a wire value of any type, returning a pointer past the end of -// the data, or NULL if there was an error parsing the group. The `tag` argument -// should be the tag that was just parsed. The `depth_limit` argument indicates -// how many levels of recursion a group is allowed to have before reporting a -// parse error (this limit exists to protect against stack overflow). -// -// REQUIRES: there must be at least 10 bytes of data available at `ptr`. -// Bounds checks must be performed before calling this function, preferably -// by calling upb_EpsCopyInputStream_IsDone(). -// -// TODO: evaluate how the depth_limit should be specified. Do users need -// control over this? -UPB_INLINE const char* upb_WireReader_SkipValue( - const char* ptr, uint32_t tag, upb_EpsCopyInputStream* stream) { - return _upb_WireReader_SkipValue(ptr, tag, 100, stream); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_WIRE_READER_H_ - -#ifndef UPB_MESSAGE_COPY_H_ -#define UPB_MESSAGE_COPY_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Deep clones a message using the provided target arena. -upb_Message* upb_Message_DeepClone(const upb_Message* msg, - const upb_MiniTable* m, upb_Arena* arena); - -// Shallow clones a message using the provided target arena. -upb_Message* upb_Message_ShallowClone(const upb_Message* msg, - const upb_MiniTable* m, upb_Arena* arena); - -// Deep clones array contents. -upb_Array* upb_Array_DeepClone(const upb_Array* array, upb_CType value_type, - const upb_MiniTable* sub, upb_Arena* arena); - -// Deep clones map contents. -upb_Map* upb_Map_DeepClone(const upb_Map* map, upb_CType key_type, - upb_CType value_type, - const upb_MiniTable* map_entry_table, - upb_Arena* arena); - -// Deep copies the message from src to dst. -bool upb_Message_DeepCopy(upb_Message* dst, const upb_Message* src, - const upb_MiniTable* m, upb_Arena* arena); - -// Shallow copies the message from src to dst. -void upb_Message_ShallowCopy(upb_Message* dst, const upb_Message* src, - const upb_MiniTable* m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_MESSAGE_COPY_H_ -#ifndef GOOGLE_UPB_UPB_MESSAGE_MERGE_H__ -#define GOOGLE_UPB_UPB_MESSAGE_MERGE_H__ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_API bool upb_Message_MergeFrom(upb_Message* dst, const upb_Message* src, - const upb_MiniTable* mt, - const upb_ExtensionRegistry* extreg, - upb_Arena* arena); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // GOOGLE_UPB_UPB_MESSAGE_MERGE_H__ - -#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_ -#define UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_ - -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE char _upb_ToBase92(int8_t ch) { - extern const char _kUpb_ToBase92[]; - UPB_ASSERT(0 <= ch && ch < 92); - return _kUpb_ToBase92[ch]; -} - -UPB_INLINE char _upb_FromBase92(uint8_t ch) { - extern const int8_t _kUpb_FromBase92[]; - if (' ' > ch || ch > '~') return -1; - return _kUpb_FromBase92[ch - ' ']; -} - -UPB_INLINE const char* _upb_Base92_DecodeVarint(const char* ptr, - const char* end, char first_ch, - uint8_t min, uint8_t max, - uint32_t* out_val) { - uint32_t val = 0; - uint32_t shift = 0; - const int bits_per_char = - upb_Log2Ceiling(_upb_FromBase92(max) - _upb_FromBase92(min)); - char ch = first_ch; - while (1) { - uint32_t bits = _upb_FromBase92(ch) - _upb_FromBase92(min); - val |= bits << shift; - if (ptr == end || *ptr < min || max < *ptr) { - *out_val = val; - UPB_ASSUME(ptr != NULL); - return ptr; - } - ch = *ptr++; - shift += bits_per_char; - if (shift >= 32) return NULL; - } -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_ - -#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_DECODER_H_ -#define UPB_MINI_DESCRIPTOR_INTERNAL_DECODER_H_ - - -// Must be last. - -// upb_MdDecoder: used internally for decoding MiniDescriptors for messages, -// extensions, and enums. -typedef struct { - const char* end; - upb_Status* status; - jmp_buf err; -} upb_MdDecoder; - -UPB_PRINTF(2, 3) -UPB_NORETURN UPB_INLINE void upb_MdDecoder_ErrorJmp(upb_MdDecoder* d, - const char* fmt, ...) { - if (d->status) { - va_list argp; - upb_Status_SetErrorMessage(d->status, "Error building mini table: "); - va_start(argp, fmt); - upb_Status_VAppendErrorFormat(d->status, fmt, argp); - va_end(argp); - } - UPB_LONGJMP(d->err, 1); -} - -UPB_INLINE void upb_MdDecoder_CheckOutOfMemory(upb_MdDecoder* d, - const void* ptr) { - if (!ptr) upb_MdDecoder_ErrorJmp(d, "Out of memory"); -} - -UPB_INLINE const char* upb_MdDecoder_DecodeBase92Varint( - upb_MdDecoder* d, const char* ptr, char first_ch, uint8_t min, uint8_t max, - uint32_t* out_val) { - ptr = _upb_Base92_DecodeVarint(ptr, d->end, first_ch, min, max, out_val); - if (!ptr) upb_MdDecoder_ErrorJmp(d, "Overlong varint"); - return ptr; -} - - -#endif // UPB_MINI_DESCRIPTOR_INTERNAL_DECODER_H_ - -#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_ -#define UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_ - - -// Must be last. - -typedef enum { - kUpb_EncodedType_Double = 0, - kUpb_EncodedType_Float = 1, - kUpb_EncodedType_Fixed32 = 2, - kUpb_EncodedType_Fixed64 = 3, - kUpb_EncodedType_SFixed32 = 4, - kUpb_EncodedType_SFixed64 = 5, - kUpb_EncodedType_Int32 = 6, - kUpb_EncodedType_UInt32 = 7, - kUpb_EncodedType_SInt32 = 8, - kUpb_EncodedType_Int64 = 9, - kUpb_EncodedType_UInt64 = 10, - kUpb_EncodedType_SInt64 = 11, - kUpb_EncodedType_OpenEnum = 12, - kUpb_EncodedType_Bool = 13, - kUpb_EncodedType_Bytes = 14, - kUpb_EncodedType_String = 15, - kUpb_EncodedType_Group = 16, - kUpb_EncodedType_Message = 17, - kUpb_EncodedType_ClosedEnum = 18, - - kUpb_EncodedType_RepeatedBase = 20, -} upb_EncodedType; - -typedef enum { - kUpb_EncodedFieldModifier_FlipPacked = 1 << 0, - kUpb_EncodedFieldModifier_IsRequired = 1 << 1, - kUpb_EncodedFieldModifier_IsProto3Singular = 1 << 2, - kUpb_EncodedFieldModifier_FlipValidateUtf8 = 1 << 3, -} upb_EncodedFieldModifier; - -enum { - kUpb_EncodedValue_MinField = ' ', - kUpb_EncodedValue_MaxField = 'I', - kUpb_EncodedValue_MinModifier = 'L', - kUpb_EncodedValue_MaxModifier = '[', - kUpb_EncodedValue_End = '^', - kUpb_EncodedValue_MinSkip = '_', - kUpb_EncodedValue_MaxSkip = '~', - kUpb_EncodedValue_OneofSeparator = '~', - kUpb_EncodedValue_FieldSeparator = '|', - kUpb_EncodedValue_MinOneofField = ' ', - kUpb_EncodedValue_MaxOneofField = 'b', - kUpb_EncodedValue_MaxEnumMask = 'A', -}; - -enum { - kUpb_EncodedVersion_EnumV1 = '!', - kUpb_EncodedVersion_ExtensionV1 = '#', - kUpb_EncodedVersion_MapV1 = '%', - kUpb_EncodedVersion_MessageV1 = '$', - kUpb_EncodedVersion_MessageSetV1 = '&', -}; - - -#endif // UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_ - -#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_ -#define UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_ - -// Must be last. - -typedef enum { - kUpb_FieldModifier_IsRepeated = 1 << 0, - kUpb_FieldModifier_IsPacked = 1 << 1, - kUpb_FieldModifier_IsClosedEnum = 1 << 2, - kUpb_FieldModifier_IsProto3Singular = 1 << 3, - kUpb_FieldModifier_IsRequired = 1 << 4, - kUpb_FieldModifier_ValidateUtf8 = 1 << 5, -} kUpb_FieldModifier; - -// These modifiers are also used on the wire. -typedef enum { - kUpb_MessageModifier_ValidateUtf8 = 1 << 0, - kUpb_MessageModifier_DefaultIsPacked = 1 << 1, - kUpb_MessageModifier_IsExtendable = 1 << 2, -} kUpb_MessageModifier; - - -#endif // UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_ - -#ifndef UPB_MINI_TABLE_COMPAT_H_ -#define UPB_MINI_TABLE_COMPAT_H_ - - -// Must be last. - -// upb does not support mixing minitables from different sources but these -// functions are still used by some existing users so for now we make them -// available here. This may or may not change in the future so do not add -// them to new code. - -#ifdef __cplusplus -extern "C" { -#endif - -// Checks if memory layout of src is compatible with dst. -bool upb_MiniTable_Compatible(const upb_MiniTable* src, - const upb_MiniTable* dst); - -typedef enum { - kUpb_MiniTableEquals_NotEqual, - kUpb_MiniTableEquals_Equal, - kUpb_MiniTableEquals_OutOfMemory, -} upb_MiniTableEquals_Status; - -// Checks equality of mini tables originating from different language runtimes. -upb_MiniTableEquals_Status upb_MiniTable_Equals(const upb_MiniTable* src, - const upb_MiniTable* dst); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_TABLE_COMPAT_H_ */ - -#ifndef UPB_WIRE_INTERNAL_CONSTANTS_H_ -#define UPB_WIRE_INTERNAL_CONSTANTS_H_ - -#define kUpb_WireFormat_DefaultDepthLimit 100 - -// MessageSet wire format is: -// message MessageSet { -// repeated group Item = 1 { -// required int32 type_id = 2; -// required bytes message = 3; -// } -// } - -enum { - kUpb_MsgSet_Item = 1, - kUpb_MsgSet_TypeId = 2, - kUpb_MsgSet_Message = 3, -}; - -#endif /* UPB_WIRE_INTERNAL_CONSTANTS_H_ */ - -/* - * Internal implementation details of the decoder that are shared between - * decode.c and decode_fast.c. - */ - -#ifndef UPB_WIRE_INTERNAL_DECODER_H_ -#define UPB_WIRE_INTERNAL_DECODER_H_ - -#include - -#include "utf8_range.h" - -// Must be last. - -#define DECODE_NOGROUP (uint32_t)-1 - -typedef struct upb_Decoder { - upb_EpsCopyInputStream input; - const upb_ExtensionRegistry* extreg; - upb_Message* original_msg; // Pointer to preserve data to - int depth; // Tracks recursion depth to bound stack usage. - uint32_t end_group; // field number of END_GROUP tag, else DECODE_NOGROUP. - uint16_t options; - bool missing_required; - union { - upb_Arena arena; - void* foo[UPB_ARENA_SIZE_HACK]; - }; - upb_DecodeStatus status; - jmp_buf err; - -#ifndef NDEBUG - const char* debug_tagstart; - const char* debug_valstart; -#endif -} upb_Decoder; - -/* Error function that will abort decoding with longjmp(). We can't declare this - * UPB_NORETURN, even though it is appropriate, because if we do then compilers - * will "helpfully" refuse to tailcall to it - * (see: https://stackoverflow.com/a/55657013), which will defeat a major goal - * of our optimizations. That is also why we must declare it in a separate file, - * otherwise the compiler will see that it calls longjmp() and deduce that it is - * noreturn. */ -const char* _upb_FastDecoder_ErrorJmp(upb_Decoder* d, int status); - -extern const uint8_t upb_utf8_offsets[]; - -UPB_INLINE -bool _upb_Decoder_VerifyUtf8Inline(const char* ptr, int len) { - return utf8_range_IsValid(ptr, len); -} - -const char* _upb_Decoder_CheckRequired(upb_Decoder* d, const char* ptr, - const upb_Message* msg, - const upb_MiniTable* m); - -/* x86-64 pointers always have the high 16 bits matching. So we can shift - * left 8 and right 8 without loss of information. */ -UPB_INLINE intptr_t decode_totable(const upb_MiniTable* tablep) { - return ((intptr_t)tablep << 8) | tablep->UPB_PRIVATE(table_mask); -} - -UPB_INLINE const upb_MiniTable* decode_totablep(intptr_t table) { - return (const upb_MiniTable*)(table >> 8); -} - -const char* _upb_Decoder_IsDoneFallback(upb_EpsCopyInputStream* e, - const char* ptr, int overrun); - -UPB_INLINE bool _upb_Decoder_IsDone(upb_Decoder* d, const char** ptr) { - return upb_EpsCopyInputStream_IsDoneWithCallback( - &d->input, ptr, &_upb_Decoder_IsDoneFallback); -} - -UPB_INLINE const char* _upb_Decoder_BufferFlipCallback( - upb_EpsCopyInputStream* e, const char* old_end, const char* new_start) { - upb_Decoder* d = (upb_Decoder*)e; - if (!old_end) _upb_FastDecoder_ErrorJmp(d, kUpb_DecodeStatus_Malformed); - return new_start; -} - -#if UPB_FASTTABLE -UPB_INLINE -const char* _upb_FastDecoder_TagDispatch(upb_Decoder* d, const char* ptr, - upb_Message* msg, intptr_t table, - uint64_t hasbits, uint64_t tag) { - const upb_MiniTable* table_p = decode_totablep(table); - uint8_t mask = table; - uint64_t data; - size_t idx = tag & mask; - UPB_ASSUME((idx & 7) == 0); - idx >>= 3; - data = table_p->UPB_PRIVATE(fasttable)[idx].field_data ^ tag; - UPB_MUSTTAIL return table_p->UPB_PRIVATE(fasttable)[idx].field_parser( - d, ptr, msg, table, hasbits, data); -} -#endif - -UPB_INLINE uint32_t _upb_FastDecoder_LoadTag(const char* ptr) { - uint16_t tag; - memcpy(&tag, ptr, 2); - return tag; -} - - -#endif /* UPB_WIRE_INTERNAL_DECODER_H_ */ - -#ifndef UPB_LEX_STRTOD_H_ -#define UPB_LEX_STRTOD_H_ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -double _upb_NoLocaleStrtod(const char *str, char **endptr); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_LEX_STRTOD_H_ */ - -#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_ENCODE_H_ -#define UPB_MINI_DESCRIPTOR_INTERNAL_ENCODE_H_ - -#include - - -// Must be last. - -// If the input buffer has at least this many bytes available, the encoder call -// is guaranteed to succeed (as long as field number order is maintained). -#define kUpb_MtDataEncoder_MinSize 16 - -typedef struct { - char* end; // Limit of the buffer passed as a parameter. - // Aliased to internal-only members in .cc. - char internal[32]; -} upb_MtDataEncoder; - -#ifdef __cplusplus -extern "C" { -#endif - -// Encodes field/oneof information for a given message. The sequence of calls -// should look like: -// -// upb_MtDataEncoder e; -// char buf[256]; -// char* ptr = buf; -// e.end = ptr + sizeof(buf); -// unit64_t msg_mod = ...; // bitwise & of kUpb_MessageModifiers or zero -// ptr = upb_MtDataEncoder_StartMessage(&e, ptr, msg_mod); -// // Fields *must* be in field number order. -// ptr = upb_MtDataEncoder_PutField(&e, ptr, ...); -// ptr = upb_MtDataEncoder_PutField(&e, ptr, ...); -// ptr = upb_MtDataEncoder_PutField(&e, ptr, ...); -// -// // If oneofs are present. Oneofs must be encoded after regular fields. -// ptr = upb_MiniTable_StartOneof(&e, ptr) -// ptr = upb_MiniTable_PutOneofField(&e, ptr, ...); -// ptr = upb_MiniTable_PutOneofField(&e, ptr, ...); -// -// ptr = upb_MiniTable_StartOneof(&e, ptr); -// ptr = upb_MiniTable_PutOneofField(&e, ptr, ...); -// ptr = upb_MiniTable_PutOneofField(&e, ptr, ...); -// -// Oneofs must be encoded after all regular fields. -char* upb_MtDataEncoder_StartMessage(upb_MtDataEncoder* e, char* ptr, - uint64_t msg_mod); -char* upb_MtDataEncoder_PutField(upb_MtDataEncoder* e, char* ptr, - upb_FieldType type, uint32_t field_num, - uint64_t field_mod); -char* upb_MtDataEncoder_StartOneof(upb_MtDataEncoder* e, char* ptr); -char* upb_MtDataEncoder_PutOneofField(upb_MtDataEncoder* e, char* ptr, - uint32_t field_num); - -// Encodes the set of values for a given enum. The values must be given in -// order (after casting to uint32_t), and repeats are not allowed. -char* upb_MtDataEncoder_StartEnum(upb_MtDataEncoder* e, char* ptr); -char* upb_MtDataEncoder_PutEnumValue(upb_MtDataEncoder* e, char* ptr, - uint32_t val); -char* upb_MtDataEncoder_EndEnum(upb_MtDataEncoder* e, char* ptr); - -// Encodes an entire mini descriptor for an extension. -char* upb_MtDataEncoder_EncodeExtension(upb_MtDataEncoder* e, char* ptr, - upb_FieldType type, uint32_t field_num, - uint64_t field_mod); - -// Encodes an entire mini descriptor for a map. -char* upb_MtDataEncoder_EncodeMap(upb_MtDataEncoder* e, char* ptr, - upb_FieldType key_type, - upb_FieldType value_type, uint64_t key_mod, - uint64_t value_mod); - -// Encodes an entire mini descriptor for a message set. -char* upb_MtDataEncoder_EncodeMessageSet(upb_MtDataEncoder* e, char* ptr); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_MINI_DESCRIPTOR_INTERNAL_ENCODE_H_ */ - -#ifndef UPB_REFLECTION_DEF_POOL_INTERNAL_H_ -#define UPB_REFLECTION_DEF_POOL_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_Arena* _upb_DefPool_Arena(const upb_DefPool* s); -size_t _upb_DefPool_BytesLoaded(const upb_DefPool* s); -upb_ExtensionRegistry* _upb_DefPool_ExtReg(const upb_DefPool* s); - -bool _upb_DefPool_InsertExt(upb_DefPool* s, const upb_MiniTableExtension* ext, - const upb_FieldDef* f); -bool _upb_DefPool_InsertSym(upb_DefPool* s, upb_StringView sym, upb_value v, - upb_Status* status); -bool _upb_DefPool_LookupSym(const upb_DefPool* s, const char* sym, size_t size, - upb_value* v); - -void** _upb_DefPool_ScratchData(const upb_DefPool* s); -size_t* _upb_DefPool_ScratchSize(const upb_DefPool* s); -void _upb_DefPool_SetPlatform(upb_DefPool* s, upb_MiniTablePlatform platform); - -// For generated code only: loads a generated descriptor. -typedef struct _upb_DefPool_Init { - struct _upb_DefPool_Init** deps; // Dependencies of this file. - const upb_MiniTableFile* layout; - const char* filename; - upb_StringView descriptor; // Serialized descriptor. -} _upb_DefPool_Init; - -bool _upb_DefPool_LoadDefInit(upb_DefPool* s, const _upb_DefPool_Init* init); - -// Should only be directly called by tests. This variant lets us suppress -// the use of compiled-in tables, forcing a rebuild of the tables at runtime. -bool _upb_DefPool_LoadDefInitEx(upb_DefPool* s, const _upb_DefPool_Init* init, - bool rebuild_minitable); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_DEF_POOL_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ -#define UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ - -#include -#include -#include -#include - - -// Must be last. - -// We want to copy the options verbatim into the destination options proto. -// We use serialize+parse as our deep copy. -#define UPB_DEF_SET_OPTIONS(target, desc_type, options_type, proto) \ - if (UPB_DESC(desc_type##_has_options)(proto)) { \ - size_t size; \ - char* pb = UPB_DESC(options_type##_serialize)( \ - UPB_DESC(desc_type##_options)(proto), ctx->tmp_arena, &size); \ - if (!pb) _upb_DefBuilder_OomErr(ctx); \ - target = \ - UPB_DESC(options_type##_parse)(pb, size, _upb_DefBuilder_Arena(ctx)); \ - if (!target) _upb_DefBuilder_OomErr(ctx); \ - } else { \ - target = (const UPB_DESC(options_type)*)kUpbDefOptDefault; \ - } - -#ifdef __cplusplus -extern "C" { -#endif - -struct upb_DefBuilder { - upb_DefPool* symtab; - upb_strtable feature_cache; // Caches features by identity. - UPB_DESC(FeatureSet*) legacy_features; // For computing legacy features. - char* tmp_buf; // Temporary buffer in tmp_arena. - size_t tmp_buf_size; // Size of temporary buffer. - upb_FileDef* file; // File we are building. - upb_Arena* arena; // Allocate defs here. - upb_Arena* tmp_arena; // For temporary allocations. - upb_Status* status; // Record errors here. - const upb_MiniTableFile* layout; // NULL if we should build layouts. - upb_MiniTablePlatform platform; // Platform we are targeting. - int enum_count; // Count of enums built so far. - int msg_count; // Count of messages built so far. - int ext_count; // Count of extensions built so far. - jmp_buf err; // longjmp() on error. -}; - -extern const char* kUpbDefOptDefault; - -// ctx->status has already been set elsewhere so just fail/longjmp() -UPB_NORETURN void _upb_DefBuilder_FailJmp(upb_DefBuilder* ctx); - -UPB_NORETURN void _upb_DefBuilder_Errf(upb_DefBuilder* ctx, const char* fmt, - ...) UPB_PRINTF(2, 3); -UPB_NORETURN void _upb_DefBuilder_OomErr(upb_DefBuilder* ctx); - -const char* _upb_DefBuilder_MakeFullName(upb_DefBuilder* ctx, - const char* prefix, - upb_StringView name); - -// Given a symbol and the base symbol inside which it is defined, -// find the symbol's definition. -const void* _upb_DefBuilder_ResolveAny(upb_DefBuilder* ctx, - const char* from_name_dbg, - const char* base, upb_StringView sym, - upb_deftype_t* type); - -const void* _upb_DefBuilder_Resolve(upb_DefBuilder* ctx, - const char* from_name_dbg, const char* base, - upb_StringView sym, upb_deftype_t type); - -char _upb_DefBuilder_ParseEscape(upb_DefBuilder* ctx, const upb_FieldDef* f, - const char** src, const char* end); - -const char* _upb_DefBuilder_FullToShort(const char* fullname); - -UPB_INLINE void* _upb_DefBuilder_Alloc(upb_DefBuilder* ctx, size_t bytes) { - if (bytes == 0) return NULL; - void* ret = upb_Arena_Malloc(ctx->arena, bytes); - if (!ret) _upb_DefBuilder_OomErr(ctx); - return ret; -} - -/* Allocates an array of `count` elements, checking for size_t overflow */ -UPB_INLINE void* _upb_DefBuilder_AllocCounted(upb_DefBuilder* ctx, size_t size, - size_t count) { - if (count == 0) return NULL; - if (SIZE_MAX / size < count) { - _upb_DefBuilder_OomErr(ctx); - } - return _upb_DefBuilder_Alloc(ctx, size * count); -} - -#define UPB_DEFBUILDER_ALLOCARRAY(ctx, type, count) \ - ((type*)_upb_DefBuilder_AllocCounted(ctx, sizeof(type), (count))) - -// Adds a symbol |v| to the symtab, which must be a def pointer previously -// packed with pack_def(). The def's pointer to upb_FileDef* must be set before -// adding, so we know which entries to remove if building this file fails. -UPB_INLINE void _upb_DefBuilder_Add(upb_DefBuilder* ctx, const char* name, - upb_value v) { - upb_StringView sym = {.data = name, .size = strlen(name)}; - bool ok = _upb_DefPool_InsertSym(ctx->symtab, sym, v, ctx->status); - if (!ok) _upb_DefBuilder_FailJmp(ctx); -} - -UPB_INLINE upb_Arena* _upb_DefBuilder_Arena(const upb_DefBuilder* ctx) { - return ctx->arena; -} - -UPB_INLINE upb_FileDef* _upb_DefBuilder_File(const upb_DefBuilder* ctx) { - return ctx->file; -} - -// This version of CheckIdent() is only called by other, faster versions after -// they detect a parsing error. -void _upb_DefBuilder_CheckIdentSlow(upb_DefBuilder* ctx, upb_StringView name, - bool full); - -// Verify a full identifier string. This is slightly more complicated than -// verifying a relative identifier string because we must track '.' chars. -UPB_INLINE void _upb_DefBuilder_CheckIdentFull(upb_DefBuilder* ctx, - upb_StringView name) { - bool good = name.size > 0; - bool start = true; - - for (size_t i = 0; i < name.size; i++) { - const char c = name.data[i]; - const char d = c | 0x20; // force lowercase - const bool is_alpha = (('a' <= d) & (d <= 'z')) | (c == '_'); - const bool is_numer = ('0' <= c) & (c <= '9') & !start; - const bool is_dot = (c == '.') & !start; - - good &= is_alpha | is_numer | is_dot; - start = is_dot; - } - - if (!good) _upb_DefBuilder_CheckIdentSlow(ctx, name, true); -} - -// Returns true if the returned feature set is new and must be populated. -bool _upb_DefBuilder_GetOrCreateFeatureSet(upb_DefBuilder* ctx, - const UPB_DESC(FeatureSet*) parent, - upb_StringView key, - UPB_DESC(FeatureSet**) set); - -const UPB_DESC(FeatureSet*) - _upb_DefBuilder_DoResolveFeatures(upb_DefBuilder* ctx, - const UPB_DESC(FeatureSet*) parent, - const UPB_DESC(FeatureSet*) child, - bool is_implicit); - -UPB_INLINE const UPB_DESC(FeatureSet*) - _upb_DefBuilder_ResolveFeatures(upb_DefBuilder* ctx, - const UPB_DESC(FeatureSet*) parent, - const UPB_DESC(FeatureSet*) child) { - return _upb_DefBuilder_DoResolveFeatures(ctx, parent, child, false); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ -#define UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_EnumDef* _upb_EnumDef_At(const upb_EnumDef* e, int i); -bool _upb_EnumDef_Insert(upb_EnumDef* e, upb_EnumValueDef* v, upb_Arena* a); -const upb_MiniTableEnum* _upb_EnumDef_MiniTable(const upb_EnumDef* e); - -// Allocate and initialize an array of |n| enum defs. -upb_EnumDef* _upb_EnumDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(EnumDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - const upb_MessageDef* containing_type); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ -#define UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_EnumValueDef* _upb_EnumValueDef_At(const upb_EnumValueDef* v, int i); - -// Allocate and initialize an array of |n| enum value defs owned by |e|. -upb_EnumValueDef* _upb_EnumValueDefs_New( - upb_DefBuilder* ctx, const char* prefix, int n, - const UPB_DESC(EnumValueDescriptorProto*) const* protos, - const UPB_DESC(FeatureSet*) parent_features, upb_EnumDef* e, - bool* is_sorted); - -const upb_EnumValueDef** _upb_EnumValueDefs_Sorted(const upb_EnumValueDef* v, - size_t n, upb_Arena* a); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ -#define UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_FieldDef* _upb_FieldDef_At(const upb_FieldDef* f, int i); - -bool _upb_FieldDef_IsClosedEnum(const upb_FieldDef* f); -bool _upb_FieldDef_IsProto3Optional(const upb_FieldDef* f); -int _upb_FieldDef_LayoutIndex(const upb_FieldDef* f); -uint64_t _upb_FieldDef_Modifiers(const upb_FieldDef* f); -void _upb_FieldDef_Resolve(upb_DefBuilder* ctx, const char* prefix, - upb_FieldDef* f); -void _upb_FieldDef_BuildMiniTableExtension(upb_DefBuilder* ctx, - const upb_FieldDef* f); - -// Allocate and initialize an array of |n| extensions (field defs). -upb_FieldDef* _upb_Extensions_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(FieldDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - const char* prefix, upb_MessageDef* m); - -// Allocate and initialize an array of |n| field defs. -upb_FieldDef* _upb_FieldDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(FieldDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - const char* prefix, upb_MessageDef* m, - bool* is_sorted); - -// Allocate and return a list of pointers to the |n| field defs in |ff|, -// sorted by field number. -const upb_FieldDef** _upb_FieldDefs_Sorted(const upb_FieldDef* f, int n, - upb_Arena* a); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_FILE_DEF_INTERNAL_H_ -#define UPB_REFLECTION_FILE_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -const upb_MiniTableExtension* _upb_FileDef_ExtensionMiniTable( - const upb_FileDef* f, int i); -const int32_t* _upb_FileDef_PublicDependencyIndexes(const upb_FileDef* f); -const int32_t* _upb_FileDef_WeakDependencyIndexes(const upb_FileDef* f); - -// upb_FileDef_Package() returns "" if f->package is NULL, this does not. -const char* _upb_FileDef_RawPackage(const upb_FileDef* f); - -void _upb_FileDef_Create(upb_DefBuilder* ctx, - const UPB_DESC(FileDescriptorProto) * file_proto); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_FILE_DEF_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ -#define UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_MessageDef* _upb_MessageDef_At(const upb_MessageDef* m, int i); -bool _upb_MessageDef_InMessageSet(const upb_MessageDef* m); -bool _upb_MessageDef_Insert(upb_MessageDef* m, const char* name, size_t size, - upb_value v, upb_Arena* a); -void _upb_MessageDef_InsertField(upb_DefBuilder* ctx, upb_MessageDef* m, - const upb_FieldDef* f); -bool _upb_MessageDef_IsValidExtensionNumber(const upb_MessageDef* m, int n); -void _upb_MessageDef_CreateMiniTable(upb_DefBuilder* ctx, upb_MessageDef* m); -void _upb_MessageDef_LinkMiniTable(upb_DefBuilder* ctx, - const upb_MessageDef* m); -void _upb_MessageDef_Resolve(upb_DefBuilder* ctx, upb_MessageDef* m); - -// Allocate and initialize an array of |n| message defs. -upb_MessageDef* _upb_MessageDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(DescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) - parent_features, - const upb_MessageDef* containing_type); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ -#define UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_ServiceDef* _upb_ServiceDef_At(const upb_ServiceDef* s, int i); - -// Allocate and initialize an array of |n| service defs. -upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(ServiceDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) - parent_features); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_UPB_EDITION_DEFAULTS_H_ -#define UPB_REFLECTION_UPB_EDITION_DEFAULTS_H_ - -// This file contains the serialized FeatureSetDefaults object for -// language-independent features and (possibly at some point) for upb-specific -// features. This is used for feature resolution under Editions. -// NOLINTBEGIN -// clang-format off -#define UPB_INTERNAL_UPB_EDITION_DEFAULTS "\n\027\030\204\007\"\000*\020\010\001\020\002\030\002 \003(\0010\0028\002@\001\n\027\030\347\007\"\000*\020\010\002\020\001\030\001 \002(\0010\0018\002@\001\n\027\030\350\007\"\014\010\001\020\001\030\001 \002(\0010\001*\0048\002@\001 \346\007(\350\007" -// clang-format on -// NOLINTEND - -#endif // UPB_REFLECTION_UPB_EDITION_DEFAULTS_H_ - -#ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_ -#define UPB_REFLECTION_DESC_STATE_INTERNAL_H_ - - -// Must be last. - -// Manages the storage for mini descriptor strings as they are being encoded. -// TODO: Move some of this state directly into the encoder, maybe. -typedef struct { - upb_MtDataEncoder e; - size_t bufsize; - char* buf; - char* ptr; -} upb_DescState; - -#ifdef __cplusplus -extern "C" { -#endif - -UPB_INLINE void _upb_DescState_Init(upb_DescState* d) { - d->bufsize = kUpb_MtDataEncoder_MinSize * 2; - d->buf = NULL; - d->ptr = NULL; -} - -bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_DESC_STATE_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_ -#define UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_ - - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_ENUM_RESERVED_RANGE_H_ -#define UPB_REFLECTION_ENUM_RESERVED_RANGE_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -int32_t upb_EnumReservedRange_Start(const upb_EnumReservedRange* r); -int32_t upb_EnumReservedRange_End(const upb_EnumReservedRange* r); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ENUM_RESERVED_RANGE_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_EnumReservedRange* _upb_EnumReservedRange_At(const upb_EnumReservedRange* r, - int i); - -// Allocate and initialize an array of |n| reserved ranges owned by |e|. -upb_EnumReservedRange* _upb_EnumReservedRanges_New( - upb_DefBuilder* ctx, int n, - const UPB_DESC(EnumDescriptorProto_EnumReservedRange*) const* protos, - const upb_EnumDef* e); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_INTERNAL_STRDUP2_H_ -#define UPB_REFLECTION_INTERNAL_STRDUP2_H_ - -#include - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -// Variant that works with a length-delimited rather than NULL-delimited string, -// as supported by strtable. -char* upb_strdup2(const char* s, size_t len, upb_Arena* a); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_INTERNAL_STRDUP2_H_ */ - -#ifndef UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ -#define UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_ExtensionRange* _upb_ExtensionRange_At(const upb_ExtensionRange* r, int i); - -// Allocate and initialize an array of |n| extension ranges owned by |m|. -upb_ExtensionRange* _upb_ExtensionRanges_New( - upb_DefBuilder* ctx, int n, - const UPB_DESC(DescriptorProto_ExtensionRange*) const* protos, - const UPB_DESC(FeatureSet*) parent_features, const upb_MessageDef* m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ -#define UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_OneofDef* _upb_OneofDef_At(const upb_OneofDef* o, int i); -void _upb_OneofDef_Insert(upb_DefBuilder* ctx, upb_OneofDef* o, - const upb_FieldDef* f, const char* name, size_t size); - -// Allocate and initialize an array of |n| oneof defs owned by |m|. -upb_OneofDef* _upb_OneofDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(OneofDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - upb_MessageDef* m); - -size_t _upb_OneofDefs_Finalize(upb_DefBuilder* ctx, upb_MessageDef* m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_ -#define UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_ - - -// IWYU pragma: private, include "upb/reflection/def.h" - -#ifndef UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_ -#define UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -int32_t upb_MessageReservedRange_Start(const upb_MessageReservedRange* r); -int32_t upb_MessageReservedRange_End(const upb_MessageReservedRange* r); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_ */ - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_MessageReservedRange* _upb_MessageReservedRange_At( - const upb_MessageReservedRange* r, int i); - -// Allocate and initialize an array of |n| reserved ranges owned by |m|. -upb_MessageReservedRange* _upb_MessageReservedRanges_New( - upb_DefBuilder* ctx, int n, - const UPB_DESC(DescriptorProto_ReservedRange) * const* protos, - const upb_MessageDef* m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_ */ - -#ifndef UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ -#define UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ - - -// Must be last. - -#ifdef __cplusplus -extern "C" { -#endif - -upb_MethodDef* _upb_MethodDef_At(const upb_MethodDef* m, int i); - -// Allocate and initialize an array of |n| method defs owned by |s|. -upb_MethodDef* _upb_MethodDefs_New(upb_DefBuilder* ctx, int n, - const UPB_DESC(MethodDescriptorProto*) - const* protos, - const UPB_DESC(FeatureSet*) parent_features, - upb_ServiceDef* s); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif /* UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ */ - -#ifndef UPB_UTIL_DEF_TO_PROTO_H_ -#define UPB_UTIL_DEF_TO_PROTO_H_ - - -#ifdef __cplusplus -extern "C" { -#endif - -// Functions for converting defs back to the equivalent descriptor proto. -// Ultimately the goal is that a round-trip proto->def->proto is lossless. Each -// function returns a new proto created in arena `a`, or NULL if memory -// allocation failed. -google_protobuf_DescriptorProto* upb_MessageDef_ToProto(const upb_MessageDef* m, - upb_Arena* a); -google_protobuf_EnumDescriptorProto* upb_EnumDef_ToProto(const upb_EnumDef* e, - upb_Arena* a); -google_protobuf_EnumValueDescriptorProto* upb_EnumValueDef_ToProto( - const upb_EnumValueDef* e, upb_Arena* a); -google_protobuf_FieldDescriptorProto* upb_FieldDef_ToProto( - const upb_FieldDef* f, upb_Arena* a); -google_protobuf_OneofDescriptorProto* upb_OneofDef_ToProto( - const upb_OneofDef* o, upb_Arena* a); -google_protobuf_FileDescriptorProto* upb_FileDef_ToProto(const upb_FileDef* f, - upb_Arena* a); -google_protobuf_MethodDescriptorProto* upb_MethodDef_ToProto( - const upb_MethodDef* m, upb_Arena* a); -google_protobuf_ServiceDescriptorProto* upb_ServiceDef_ToProto( - const upb_ServiceDef* s, upb_Arena* a); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* UPB_UTIL_DEF_TO_PROTO_H_ */ - -// This should #undef all macros #defined in def.inc - -#undef UPB_SIZE -#undef UPB_PTR_AT -#undef UPB_SIZEOF_FLEX -#undef UPB_SIZEOF_FLEX_WOULD_OVERFLOW -#undef UPB_MAPTYPE_STRING -#undef UPB_EXPORT -#undef UPB_INLINE -#undef UPB_API -#undef UPBC_API -#undef UPB_API_INLINE -#undef UPB_API_INLINE_IF_NOT_GCC -#undef UPB_ALIGN_UP -#undef UPB_ALIGN_DOWN -#undef UPB_ALIGN_MALLOC -#undef UPB_ALIGN_OF -#undef UPB_ALIGN_AS -#undef UPB_MALLOC_ALIGN -#undef UPB_LIKELY -#undef UPB_UNLIKELY -#undef UPB_UNPREDICTABLE -#undef UPB_FORCEINLINE -#undef UPB_NOINLINE -#undef UPB_NORETURN -#undef UPB_PRINTF -#undef UPB_MAX -#undef UPB_MIN -#undef UPB_UNUSED -#undef UPB_ASSUME -#undef UPB_ASSERT -#undef UPB_UNREACHABLE -#undef UPB_DEFAULT_MAX_BLOCK_SIZE -#undef UPB_SETJMP -#undef UPB_LONGJMP -#undef UPB_PTRADD -#undef UPB_MUSTTAIL -#undef UPB_FASTTABLE_SUPPORTED -#undef UPB_FASTTABLE_MASK -#undef UPB_FASTTABLE -#undef UPB_FASTTABLE_INIT -#undef UPB_POISON_MEMORY_REGION -#undef UPB_UNPOISON_MEMORY_REGION -#undef UPB_ASAN -#undef UPB_ASAN_GUARD_SIZE -#undef UPB_CLANG_ASAN -#undef UPB_TSAN_PUBLISHED_MEMBER -#undef UPB_TSAN_INIT_PUBLISHED -#undef UPB_TSAN_CHECK_PUBLISHED -#undef UPB_TSAN_PUBLISH -#undef UPB_TSAN_CHECK_READ -#undef UPB_TSAN_CHECK_WRITE -#undef UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN -#undef UPB_DEPRECATED -#undef UPB_GNUC_MIN -#undef UPB_DESCRIPTOR_UPB_H_FILENAME -#undef UPB_DESC -#undef UPB_DESC_MINITABLE -#undef UPB_IS_GOOGLE3 -#undef UPB_ATOMIC -#undef UPB_USE_C11_ATOMICS -#undef UPB_USE_MSC_ATOMICS -#undef UPB_PRIVATE -#undef UPB_ONLYBITS -#undef UPB_LINKARR_DECLARE -#undef UPB_LINKARR_APPEND -#undef UPB_LINKARR_START -#undef UPB_LINKARR_STOP -#undef UPB_FUTURE_BREAKING_CHANGES diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_convert.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_convert.c deleted file mode 100644 index dd182bc2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_convert.c +++ /dev/null @@ -1,69 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -// ----------------------------------------------------------------------------- -// Ruby <-> upb data conversion functions. Strictly free of dependencies on -// Ruby interpreter internals. - -#include "shared_convert.h" - -bool shared_Msgval_IsEqual(upb_MessageValue val1, upb_MessageValue val2, - upb_CType type, const upb_MessageDef* msgdef, - upb_Status* status) { - switch (type) { - case kUpb_CType_Bool: - return memcmp(&val1, &val2, 1) == 0; - case kUpb_CType_Float: - case kUpb_CType_Int32: - case kUpb_CType_UInt32: - case kUpb_CType_Enum: - return memcmp(&val1, &val2, 4) == 0; - case kUpb_CType_Double: - case kUpb_CType_Int64: - case kUpb_CType_UInt64: - return memcmp(&val1, &val2, 8) == 0; - case kUpb_CType_String: - case kUpb_CType_Bytes: - return val1.str_val.size == val2.str_val.size && - memcmp(val1.str_val.data, val2.str_val.data, val1.str_val.size) == - 0; - case kUpb_CType_Message: { - const upb_MiniTable* m = upb_MessageDef_MiniTable(msgdef); - const int options = 0; - return upb_Message_IsEqual(val1.msg_val, val2.msg_val, m, options); - } - default: - upb_Status_SetErrorMessage(status, "Internal error, unexpected type"); - return false; - } -} - -uint64_t shared_Msgval_GetHash(upb_MessageValue val, upb_CType type, - const upb_MessageDef* msgdef, uint64_t seed, - upb_Status* status) { - switch (type) { - case kUpb_CType_Bool: - return _upb_Hash(&val, 1, seed); - case kUpb_CType_Float: - case kUpb_CType_Int32: - case kUpb_CType_UInt32: - case kUpb_CType_Enum: - return _upb_Hash(&val, 4, seed); - case kUpb_CType_Double: - case kUpb_CType_Int64: - case kUpb_CType_UInt64: - return _upb_Hash(&val, 8, seed); - case kUpb_CType_String: - case kUpb_CType_Bytes: - return _upb_Hash(val.str_val.data, val.str_val.size, seed); - case kUpb_CType_Message: - return shared_Message_Hash(val.msg_val, msgdef, seed, status); - default: - upb_Status_SetErrorMessage(status, "Internal error, unexpected type"); - return 0; - } -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_convert.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_convert.h deleted file mode 100644 index ca1e91d5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_convert.h +++ /dev/null @@ -1,26 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -// ----------------------------------------------------------------------------- -// Ruby <-> upb data conversion functions. Strictly free of dependencies on -// Ruby interpreter internals. - -#ifndef RUBY_PROTOBUF_SHARED_CONVERT_H_ -#define RUBY_PROTOBUF_SHARED_CONVERT_H_ - -#include "ruby-upb.h" -#include "shared_message.h" - -bool shared_Msgval_IsEqual(upb_MessageValue val1, upb_MessageValue val2, - upb_CType type, const upb_MessageDef* msgdef, - upb_Status* status); - -uint64_t shared_Msgval_GetHash(upb_MessageValue val, upb_CType type, - const upb_MessageDef* msgdef, uint64_t seed, - upb_Status* status); - -#endif // RUBY_PROTOBUF_SHARED_CONVERT_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_message.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_message.c deleted file mode 100644 index 122682ec..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_message.c +++ /dev/null @@ -1,37 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -// ----------------------------------------------------------------------------- -// Ruby Message functions. Strictly free of dependencies on -// Ruby interpreter internals. - -#include "shared_message.h" - -// Support function for Message_Hash. Returns a hash value for the given -// message. -uint64_t shared_Message_Hash(const upb_Message* msg, const upb_MessageDef* m, - uint64_t seed, upb_Status* status) { - upb_Arena* arena = upb_Arena_New(); - char* data; - size_t size; - - // Hash a deterministically serialized payloads with no unknown fields. - upb_EncodeStatus encode_status = upb_Encode( - msg, upb_MessageDef_MiniTable(m), - kUpb_EncodeOption_SkipUnknown | kUpb_EncodeOption_Deterministic, arena, - &data, &size); - - if (encode_status == kUpb_EncodeStatus_Ok) { - uint64_t ret = _upb_Hash(data, size, seed); - upb_Arena_Free(arena); - return ret; - } - - upb_Arena_Free(arena); - upb_Status_SetErrorMessage(status, "Error calculating hash"); - return 0; -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_message.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_message.h deleted file mode 100644 index 50722087..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/shared_message.h +++ /dev/null @@ -1,21 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -// ----------------------------------------------------------------------------- -// Ruby Message functions. Strictly free of dependencies on -// Ruby interpreter internals. - -#ifndef RUBY_PROTOBUF_SHARED_MESSAGE_H_ -#define RUBY_PROTOBUF_SHARED_MESSAGE_H_ - -#include "ruby-upb.h" - -// Returns a hash value for the given message. -uint64_t shared_Message_Hash(const upb_Message* msg, const upb_MessageDef* m, - uint64_t seed, upb_Status* status); - -#endif // RUBY_PROTOBUF_SHARED_MESSAGE_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/LICENSE b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/LICENSE deleted file mode 100644 index e59f14fa..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2019 Yibo Cai -Copyright 2022 Google LLC - -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/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range.c deleted file mode 100644 index 6b8c6b65..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range.c +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright 2023 Google LLC -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file or at -// https://opensource.org/licenses/MIT. - -/* This is a wrapper for the Google range-sse.cc algorithm which checks whether - * a sequence of bytes is a valid UTF-8 sequence and finds the longest valid - * prefix of the UTF-8 sequence. - * - * The key difference is that it checks for as much ASCII symbols as possible - * and then falls back to the range-sse.cc algorithm. The changes to the - * algorithm are cosmetic, mostly to trick the clang compiler to produce optimal - * code. - * - * For API see the utf8_validity.h header. - */ -#include "utf8_range.h" - -#include -#include -#include - -#if defined(__GNUC__) -#define FORCE_INLINE_ATTR __attribute__((always_inline)) -#elif defined(_MSC_VER) -#define FORCE_INLINE_ATTR __forceinline -#else -#define FORCE_INLINE_ATTR -#endif - -static FORCE_INLINE_ATTR inline uint64_t utf8_range_UnalignedLoad64( - const void* p) { - uint64_t t; - memcpy(&t, p, sizeof t); - return t; -} - -static FORCE_INLINE_ATTR inline int utf8_range_AsciiIsAscii(unsigned char c) { - return c < 128; -} - -static FORCE_INLINE_ATTR inline int utf8_range_IsTrailByteOk(const char c) { - return (int8_t)(c) <= (int8_t)(0xBF); -} - -/* If return_position is false then it returns 1 if |data| is a valid utf8 - * sequence, otherwise returns 0. - * If return_position is set to true, returns the length in bytes of the prefix - of |data| that is all structurally valid UTF-8. - */ -static size_t utf8_range_ValidateUTF8Naive(const char* data, const char* end, - int return_position) { - /* We return err_pos in the loop which is always 0 if !return_position */ - size_t err_pos = 0; - size_t codepoint_bytes = 0; - /* The early check is done because of early continue's on codepoints of all - * sizes, i.e. we first check for ascii and if it is, we call continue, then - * for 2 byte codepoints, etc. This is done in order to reduce indentation and - * improve readability of the codepoint validity check. - */ - while (data + codepoint_bytes < end) { - if (return_position) { - err_pos += codepoint_bytes; - } - data += codepoint_bytes; - const size_t len = end - data; - const unsigned char byte1 = data[0]; - - /* We do not skip many ascii bytes at the same time as this function is - used for tail checking (< 16 bytes) and for non x86 platforms. We also - don't think that cases where non-ASCII codepoints are followed by ascii - happen often. For small strings it also introduces some penalty. For - purely ascii UTF8 strings (which is the overwhelming case) we call - SkipAscii function which is multiplatform and extremely fast. - */ - /* [00..7F] ASCII -> 1 byte */ - if (utf8_range_AsciiIsAscii(byte1)) { - codepoint_bytes = 1; - continue; - } - /* [C2..DF], [80..BF] -> 2 bytes */ - if (len >= 2 && byte1 >= 0xC2 && byte1 <= 0xDF && - utf8_range_IsTrailByteOk(data[1])) { - codepoint_bytes = 2; - continue; - } - if (len >= 3) { - const unsigned char byte2 = data[1]; - const unsigned char byte3 = data[2]; - - /* Is byte2, byte3 between [0x80, 0xBF] - * Check for 0x80 was done above. - */ - if (!utf8_range_IsTrailByteOk(byte2) || - !utf8_range_IsTrailByteOk(byte3)) { - return err_pos; - } - - if (/* E0, A0..BF, 80..BF */ - ((byte1 == 0xE0 && byte2 >= 0xA0) || - /* E1..EC, 80..BF, 80..BF */ - (byte1 >= 0xE1 && byte1 <= 0xEC) || - /* ED, 80..9F, 80..BF */ - (byte1 == 0xED && byte2 <= 0x9F) || - /* EE..EF, 80..BF, 80..BF */ - (byte1 >= 0xEE && byte1 <= 0xEF))) { - codepoint_bytes = 3; - continue; - } - if (len >= 4) { - const unsigned char byte4 = data[3]; - /* Is byte4 between 0x80 ~ 0xBF */ - if (!utf8_range_IsTrailByteOk(byte4)) { - return err_pos; - } - - if (/* F0, 90..BF, 80..BF, 80..BF */ - ((byte1 == 0xF0 && byte2 >= 0x90) || - /* F1..F3, 80..BF, 80..BF, 80..BF */ - (byte1 >= 0xF1 && byte1 <= 0xF3) || - /* F4, 80..8F, 80..BF, 80..BF */ - (byte1 == 0xF4 && byte2 <= 0x8F))) { - codepoint_bytes = 4; - continue; - } - } - } - return err_pos; - } - if (return_position) { - err_pos += codepoint_bytes; - } - /* if return_position is false, this returns 1. - * if return_position is true, this returns err_pos. - */ - return err_pos + (1 - return_position); -} - -#if defined(__SSE4_1__) || (defined(__ARM_NEON) && defined(__ARM_64BIT_STATE)) -/* Returns the number of bytes needed to skip backwards to get to the first - byte of codepoint. - */ -static inline int utf8_range_CodepointSkipBackwards(int32_t codepoint_word) { - const int8_t* const codepoint = (const int8_t*)(&codepoint_word); - if (!utf8_range_IsTrailByteOk(codepoint[3])) { - return 1; - } else if (!utf8_range_IsTrailByteOk(codepoint[2])) { - return 2; - } else if (!utf8_range_IsTrailByteOk(codepoint[1])) { - return 3; - } - return 0; -} -#endif // __SSE4_1__ - -/* Skipping over ASCII as much as possible, per 8 bytes. It is intentional - as most strings to check for validity consist only of 1 byte codepoints. - */ -static inline const char* utf8_range_SkipAscii(const char* data, - const char* end) { - while (8 <= end - data && - (utf8_range_UnalignedLoad64(data) & 0x8080808080808080) == 0) { - data += 8; - } - while (data < end && utf8_range_AsciiIsAscii(*data)) { - ++data; - } - return data; -} - -#if defined(__SSE4_1__) -#include "utf8_range_sse.inc" -#elif defined(__ARM_NEON) && defined(__ARM_64BIT_STATE) -#include "utf8_range_neon.inc" -#endif - -static FORCE_INLINE_ATTR inline size_t utf8_range_Validate( - const char* data, size_t len, int return_position) { - if (len == 0) return 1 - return_position; - // Save buffer start address for later use - const char* const data_original = data; - const char* const end = data + len; - data = utf8_range_SkipAscii(data, end); - /* SIMD algorithm always outperforms the naive version for any data of - length >=16. - */ - if (end - data < 16) { - return (return_position ? (data - data_original) : 0) + - utf8_range_ValidateUTF8Naive(data, end, return_position); - } -#if defined(__SSE4_1__) || (defined(__ARM_NEON) && defined(__ARM_64BIT_STATE)) - return utf8_range_ValidateUTF8Simd( - data_original, data, end, return_position); -#else - return (return_position ? (data - data_original) : 0) + - utf8_range_ValidateUTF8Naive(data, end, return_position); -#endif -} - -int utf8_range_IsValid(const char* data, size_t len) { - return utf8_range_Validate(data, len, /*return_position=*/0) != 0; -} - -size_t utf8_range_ValidPrefix(const char* data, size_t len) { - return utf8_range_Validate(data, len, /*return_position=*/1); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range.h b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range.h deleted file mode 100644 index d7c23261..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_ -#define THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// Returns 1 if the sequence of characters is a valid UTF-8 sequence, otherwise -// 0. -int utf8_range_IsValid(const char* data, size_t len); - -// Returns the length in bytes of the prefix of str that is all -// structurally valid UTF-8. -size_t utf8_range_ValidPrefix(const char* data, size_t len); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range_neon.inc b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range_neon.inc deleted file mode 100644 index 37e820b8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range_neon.inc +++ /dev/null @@ -1,117 +0,0 @@ -#include - -/* This code is almost the same as SSE implementation, please reference - * utf8-range-sse.inc for detailed explanation. - * The only difference is the range adjustment step. NEON code is more - * straightforward. - */ - -static FORCE_INLINE_ATTR inline size_t utf8_range_ValidateUTF8Simd( - const char* data_original, const char* data, const char* end, - int return_position) { - const uint8x16_t first_len_tbl = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, - }; - const uint8x16_t first_range_tbl = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, - }; - const uint8x16_t range_min_tbl = { - 0x00, 0x80, 0x80, 0x80, 0xA0, 0x80, 0x90, 0x80, - 0xC2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - }; - const uint8x16_t range_max_tbl = { - 0x7F, 0xBF, 0xBF, 0xBF, 0xBF, 0x9F, 0xBF, 0x8F, - 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }; - /* Range adjustment in NEON uint8x16x2 table. Note that lanes are interleaved - * in register. The table below is plotted vertically to ease understanding. - * The 1st column is for E0~EF, 2nd column for F0~FF. - */ - // clang-format off - const uint8_t range_adjust_tbl_data[] = { - /* index -> 0~15 16~31 <- index */ - /* E0 -> */ 2, 3, /* <- F0 */ - 0, 0, - 0, 0, - 0, 0, - 0, 4, /* <- F4 */ - 0, 0, - 0, 0, - 0, 0, - 0, 0, - 0, 0, - 0, 0, - 0, 0, - 0, 0, - /* ED -> */ 3, 0, - 0, 0, - 0, 0, - }; - // clang-format on - const uint8x16x2_t range_adjust_tbl = vld2q_u8(range_adjust_tbl_data); - - const uint8x16_t const_1 = vdupq_n_u8(1); - const uint8x16_t const_2 = vdupq_n_u8(2); - const uint8x16_t const_e0 = vdupq_n_u8(0xE0); - - uint8x16_t prev_input = vdupq_n_u8(0); - uint8x16_t prev_first_len = vdupq_n_u8(0); - uint8x16_t error = vdupq_n_u8(0); - - while (end - data >= 16) { - const uint8x16_t input = vld1q_u8((const uint8_t*)data); - - const uint8x16_t high_nibbles = vshrq_n_u8(input, 4); - - const uint8x16_t first_len = vqtbl1q_u8(first_len_tbl, high_nibbles); - - uint8x16_t range = vqtbl1q_u8(first_range_tbl, high_nibbles); - - range = vorrq_u8(range, vextq_u8(prev_first_len, first_len, 15)); - - uint8x16_t shift2 = vextq_u8(prev_first_len, first_len, 14); - shift2 = vqsubq_u8(shift2, const_1); - range = vorrq_u8(range, shift2); - - uint8x16_t shift3 = vextq_u8(prev_first_len, first_len, 13); - shift3 = vqsubq_u8(shift3, const_2); - range = vorrq_u8(range, shift3); - - uint8x16_t shift1 = vextq_u8(prev_input, input, 15); - shift1 = vsubq_u8(shift1, const_e0); - range = vaddq_u8(range, vqtbl2q_u8(range_adjust_tbl, shift1)); - - const uint8x16_t min_range = vqtbl1q_u8(range_min_tbl, range); - const uint8x16_t max_range = vqtbl1q_u8(range_max_tbl, range); - - if (return_position) { - error = vcltq_u8(input, min_range); - error = vorrq_u8(error, vcgtq_u8(input, max_range)); - if (vmaxvq_u32(vreinterpretq_u32_u8(error))) { - break; - } - } else { - error = vorrq_u8(error, vcltq_u8(input, min_range)); - error = vorrq_u8(error, vcgtq_u8(input, max_range)); - } - - prev_input = input; - prev_first_len = first_len; - - data += 16; - } - - if (return_position && data == data_original) { - return utf8_range_ValidateUTF8Naive(data, end, return_position); - } - const int32_t prev = vgetq_lane_s32(vreinterpretq_s32_u8(prev_input), 3); - data -= utf8_range_CodepointSkipBackwards(prev); - if (return_position) { - return (data - data_original) + - utf8_range_ValidateUTF8Naive(data, end, return_position); - } - if (vmaxvq_u32(vreinterpretq_u32_u8(error))) { - return 0; - } - return utf8_range_ValidateUTF8Naive(data, end, return_position); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range_sse.inc b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range_sse.inc deleted file mode 100644 index be6984c9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/third_party/utf8_range/utf8_range_sse.inc +++ /dev/null @@ -1,272 +0,0 @@ -#include -#include -#include - -static FORCE_INLINE_ATTR inline size_t utf8_range_ValidateUTF8Simd( - const char* data_original, const char* data, const char* end, - int return_position) { - /* This code checks that utf-8 ranges are structurally valid 16 bytes at once - * using superscalar instructions. - * The mapping between ranges of codepoint and their corresponding utf-8 - * sequences is below. - */ - - /* - * U+0000...U+007F 00...7F - * U+0080...U+07FF C2...DF 80...BF - * U+0800...U+0FFF E0 A0...BF 80...BF - * U+1000...U+CFFF E1...EC 80...BF 80...BF - * U+D000...U+D7FF ED 80...9F 80...BF - * U+E000...U+FFFF EE...EF 80...BF 80...BF - * U+10000...U+3FFFF F0 90...BF 80...BF 80...BF - * U+40000...U+FFFFF F1...F3 80...BF 80...BF 80...BF - * U+100000...U+10FFFF F4 80...8F 80...BF 80...BF - */ - - /* First we compute the type for each byte, as given by the table below. - * This type will be used as an index later on. - */ - - /* - * Index Min Max Byte Type - * 0 00 7F Single byte sequence - * 1,2,3 80 BF Second, third and fourth byte for many of the sequences. - * 4 A0 BF Second byte after E0 - * 5 80 9F Second byte after ED - * 6 90 BF Second byte after F0 - * 7 80 8F Second byte after F4 - * 8 C2 F4 First non ASCII byte - * 9..15 7F 80 Invalid byte - */ - - /* After the first step we compute the index for all bytes, then we permute - the bytes according to their indices to check the ranges from the range - table. - * The range for a given type can be found in the range_min_table and - range_max_table, the range for type/index X is in range_min_table[X] ... - range_max_table[X]. - */ - - /* Algorithm: - * Put index zero to all bytes. - * Find all non ASCII characters, give them index 8. - * For each tail byte in a codepoint sequence, give it an index corresponding - to the 1 based index from the end. - * If the first byte of the codepoint is in the [C0...DF] range, we write - index 1 in the following byte. - * If the first byte of the codepoint is in the range [E0...EF], we write - indices 2 and 1 in the next two bytes. - * If the first byte of the codepoint is in the range [F0...FF] we write - indices 3,2,1 into the next three bytes. - * For finding the number of bytes we need to look at high nibbles (4 bits) - and do the lookup from the table, it can be done with shift by 4 + shuffle - instructions. We call it `first_len`. - * Then we shift first_len by 8 bits to get the indices of the 2nd bytes. - * Saturating sub 1 and shift by 8 bits to get the indices of the 3rd bytes. - * Again to get the indices of the 4th bytes. - * Take OR of all that 4 values and check within range. - */ - /* For example: - * input C3 80 68 E2 80 20 A6 F0 A0 80 AC 20 F0 93 80 80 - * first_len 1 0 0 2 0 0 0 3 0 0 0 0 3 0 0 0 - * 1st byte 8 0 0 8 0 0 0 8 0 0 0 0 8 0 0 0 - * 2nd byte 0 1 0 0 2 0 0 0 3 0 0 0 0 3 0 0 // Shift + sub - * 3rd byte 0 0 0 0 0 1 0 0 0 2 0 0 0 0 2 0 // Shift + sub - * 4th byte 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 // Shift + sub - * Index 8 1 0 8 2 1 0 8 3 2 1 0 8 3 2 1 // OR of results - */ - - /* Checking for errors: - * Error checking is done by looking up the high nibble (4 bits) of each byte - against an error checking table. - * Because the lookup value for the second byte depends of the value of the - first byte in codepoint, we use saturated operations to adjust the index. - * Specifically we need to add 2 for E0, 3 for ED, 3 for F0 and 4 for F4 to - match the correct index. - * If we subtract from all bytes EF then EO -> 241, ED -> 254, F0 -> 1, - F4 -> 5 - * Do saturating sub 240, then E0 -> 1, ED -> 14 and we can do lookup to - match the adjustment - * Add saturating 112, then F0 -> 113, F4 -> 117, all that were > 16 will - be more 128 and lookup in ef_fe_table will return 0 but for F0 - and F4 it will be 4 and 5 accordingly - */ - /* - * Then just check the appropriate ranges with greater/smaller equal - instructions. Check tail with a naive algorithm. - * To save from previous 16 byte checks we just align previous_first_len to - get correct continuations of the codepoints. - */ - - /* - * Map high nibble of "First Byte" to legal character length minus 1 - * 0x00 ~ 0xBF --> 0 - * 0xC0 ~ 0xDF --> 1 - * 0xE0 ~ 0xEF --> 2 - * 0xF0 ~ 0xFF --> 3 - */ - const __m128i first_len_table = - _mm_setr_epi8(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3); - - /* Map "First Byte" to 8-th item of range table (0xC2 ~ 0xF4) */ - const __m128i first_range_table = - _mm_setr_epi8(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8); - - /* - * Range table, map range index to min and max values - */ - const __m128i range_min_table = - _mm_setr_epi8(0x00, 0x80, 0x80, 0x80, 0xA0, 0x80, 0x90, 0x80, 0xC2, 0x7F, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F); - - const __m128i range_max_table = - _mm_setr_epi8(0x7F, 0xBF, 0xBF, 0xBF, 0xBF, 0x9F, 0xBF, 0x8F, 0xF4, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80); - - /* - * Tables for fast handling of four special First Bytes(E0,ED,F0,F4), after - * which the Second Byte are not 80~BF. It contains "range index adjustment". - * +------------+---------------+------------------+----------------+ - * | First Byte | original range| range adjustment | adjusted range | - * +------------+---------------+------------------+----------------+ - * | E0 | 2 | 2 | 4 | - * +------------+---------------+------------------+----------------+ - * | ED | 2 | 3 | 5 | - * +------------+---------------+------------------+----------------+ - * | F0 | 3 | 3 | 6 | - * +------------+---------------+------------------+----------------+ - * | F4 | 4 | 4 | 8 | - * +------------+---------------+------------------+----------------+ - */ - - /* df_ee_table[1] -> E0, df_ee_table[14] -> ED as ED - E0 = 13 */ - // The values represent the adjustment in the Range Index table for a correct - // index. - const __m128i df_ee_table = - _mm_setr_epi8(0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0); - - /* ef_fe_table[1] -> F0, ef_fe_table[5] -> F4, F4 - F0 = 4 */ - // The values represent the adjustment in the Range Index table for a correct - // index. - const __m128i ef_fe_table = - _mm_setr_epi8(0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - - __m128i prev_input = _mm_set1_epi8(0); - __m128i prev_first_len = _mm_set1_epi8(0); - __m128i error = _mm_set1_epi8(0); - - while (end - data >= 16) { - const __m128i input = _mm_loadu_si128((const __m128i*)(data)); - - /* high_nibbles = input >> 4 */ - const __m128i high_nibbles = - _mm_and_si128(_mm_srli_epi16(input, 4), _mm_set1_epi8(0x0F)); - - /* first_len = legal character length minus 1 */ - /* 0 for 00~7F, 1 for C0~DF, 2 for E0~EF, 3 for F0~FF */ - /* first_len = first_len_table[high_nibbles] */ - __m128i first_len = _mm_shuffle_epi8(first_len_table, high_nibbles); - - /* First Byte: set range index to 8 for bytes within 0xC0 ~ 0xFF */ - /* range = first_range_table[high_nibbles] */ - __m128i range = _mm_shuffle_epi8(first_range_table, high_nibbles); - - /* Second Byte: set range index to first_len */ - /* 0 for 00~7F, 1 for C0~DF, 2 for E0~EF, 3 for F0~FF */ - /* range |= (first_len, prev_first_len) << 1 byte */ - range = _mm_or_si128(range, _mm_alignr_epi8(first_len, prev_first_len, 15)); - - /* Third Byte: set range index to saturate_sub(first_len, 1) */ - /* 0 for 00~7F, 0 for C0~DF, 1 for E0~EF, 2 for F0~FF */ - __m128i tmp1; - __m128i tmp2; - /* tmp1 = saturate_sub(first_len, 1) */ - tmp1 = _mm_subs_epu8(first_len, _mm_set1_epi8(1)); - /* tmp2 = saturate_sub(prev_first_len, 1) */ - tmp2 = _mm_subs_epu8(prev_first_len, _mm_set1_epi8(1)); - /* range |= (tmp1, tmp2) << 2 bytes */ - range = _mm_or_si128(range, _mm_alignr_epi8(tmp1, tmp2, 14)); - - /* Fourth Byte: set range index to saturate_sub(first_len, 2) */ - /* 0 for 00~7F, 0 for C0~DF, 0 for E0~EF, 1 for F0~FF */ - /* tmp1 = saturate_sub(first_len, 2) */ - tmp1 = _mm_subs_epu8(first_len, _mm_set1_epi8(2)); - /* tmp2 = saturate_sub(prev_first_len, 2) */ - tmp2 = _mm_subs_epu8(prev_first_len, _mm_set1_epi8(2)); - /* range |= (tmp1, tmp2) << 3 bytes */ - range = _mm_or_si128(range, _mm_alignr_epi8(tmp1, tmp2, 13)); - - /* - * Now we have below range indices calculated - * Correct cases: - * - 8 for C0~FF - * - 3 for 1st byte after F0~FF - * - 2 for 1st byte after E0~EF or 2nd byte after F0~FF - * - 1 for 1st byte after C0~DF or 2nd byte after E0~EF or - * 3rd byte after F0~FF - * - 0 for others - * Error cases: - * >9 for non ascii First Byte overlapping - * E.g., F1 80 C2 90 --> 8 3 10 2, where 10 indicates error - */ - - /* Adjust Second Byte range for special First Bytes(E0,ED,F0,F4) */ - /* Overlaps lead to index 9~15, which are illegal in range table */ - __m128i shift1; - __m128i pos; - __m128i range2; - /* shift1 = (input, prev_input) << 1 byte */ - shift1 = _mm_alignr_epi8(input, prev_input, 15); - pos = _mm_sub_epi8(shift1, _mm_set1_epi8(0xEF)); - /* - * shift1: | EF F0 ... FE | FF 00 ... ... DE | DF E0 ... EE | - * pos: | 0 1 15 | 16 17 239| 240 241 255| - * pos-240: | 0 0 0 | 0 0 0 | 0 1 15 | - * pos+112: | 112 113 127| >= 128 | >= 128 | - */ - tmp1 = _mm_subs_epu8(pos, _mm_set1_epi8(-16)); - range2 = _mm_shuffle_epi8(df_ee_table, tmp1); - tmp2 = _mm_adds_epu8(pos, _mm_set1_epi8(112)); - range2 = _mm_add_epi8(range2, _mm_shuffle_epi8(ef_fe_table, tmp2)); - - range = _mm_add_epi8(range, range2); - - /* Load min and max values per calculated range index */ - __m128i min_range = _mm_shuffle_epi8(range_min_table, range); - __m128i max_range = _mm_shuffle_epi8(range_max_table, range); - - /* Check value range */ - if (return_position) { - error = _mm_cmplt_epi8(input, min_range); - error = _mm_or_si128(error, _mm_cmpgt_epi8(input, max_range)); - /* 5% performance drop from this conditional branch */ - if (!_mm_testz_si128(error, error)) { - break; - } - } else { - error = _mm_or_si128(error, _mm_cmplt_epi8(input, min_range)); - error = _mm_or_si128(error, _mm_cmpgt_epi8(input, max_range)); - } - - prev_input = input; - prev_first_len = first_len; - - data += 16; - } - /* If we got to the end, we don't need to skip any bytes backwards */ - if (return_position && data == data_original) { - return utf8_range_ValidateUTF8Naive(data, end, return_position); - } - /* Find previous codepoint (not 80~BF) */ - data -= utf8_range_CodepointSkipBackwards(_mm_extract_epi32(prev_input, 3)); - if (return_position) { - return (data - data_original) + - utf8_range_ValidateUTF8Naive(data, end, return_position); - } - /* Test if there was any error */ - if (!_mm_testz_si128(error, error)) { - return 0; - } - /* Check the tail */ - return utf8_range_ValidateUTF8Naive(data, end, return_position); -} diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/wrap_memcpy.c b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/wrap_memcpy.c deleted file mode 100644 index 2073d14d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/ext/google/protobuf_c/wrap_memcpy.c +++ /dev/null @@ -1,29 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2017 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -#include - -// On x86-64 Linux with glibc, we link against the 2.2.5 version of memcpy so -// that we avoid depending on the 2.14 version of the symbol. This way, -// distributions that are using pre-2.14 versions of glibc can successfully use -// the gem we distribute -// (https://github.com/protocolbuffers/protobuf/issues/2783). -// -// This wrapper is enabled by passing the linker flags -Wl,-wrap,memcpy in -// extconf.rb. -#ifdef __linux__ -#if defined(__x86_64__) && defined(__GNU_LIBRARY__) -__asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); -void *__wrap_memcpy(void *dest, const void *src, size_t n) { - return memcpy(dest, src, n); -} -#else -void *__wrap_memcpy(void *dest, const void *src, size_t n) { - return memmove(dest, src, n); -} -#endif -#endif diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.1/protobuf_c.so b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.1/protobuf_c.so deleted file mode 100644 index 2035a374..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.1/protobuf_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.2/protobuf_c.so b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.2/protobuf_c.so deleted file mode 100644 index 634abb11..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.2/protobuf_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.3/protobuf_c.so b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.3/protobuf_c.so deleted file mode 100644 index c1d24145..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.3/protobuf_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.4/protobuf_c.so b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.4/protobuf_c.so deleted file mode 100644 index f9c9295f..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/3.4/protobuf_c.so and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf.rb deleted file mode 100644 index fdfa9b68..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -# require mixins before we hook them into the java & c code -require 'google/protobuf/message_exts' -require 'google/protobuf/internal/object_cache' - -# We define these before requiring the platform-specific modules. -# That way the module init can grab references to these. -module Google - module Protobuf - class Error < StandardError; end - class ParseError < Error; end - class TypeError < ::TypeError; end - - PREFER_FFI = case ENV['PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION'] - when nil, "", /^native$/i - false - when /^ffi$/i - true - else - warn "Unexpected value `#{ENV['PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION']}` for environment variable `PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION`. Should be either \"FFI\", \"NATIVE\"." - false - end - - def self.encode(msg, options = {}) - msg.to_proto(options) - end - - def self.encode_json(msg, options = {}) - msg.to_json(options) - end - - def self.decode(klass, proto, options = {}) - klass.decode(proto, options) - end - - def self.decode_json(klass, json, options = {}) - klass.decode_json(json, options) - end - - IMPLEMENTATION = if PREFER_FFI - begin - require 'google/protobuf_ffi' - :FFI - rescue LoadError - warn "Caught exception `#{$!.message}` while loading FFI implementation of google/protobuf." - warn "Falling back to native implementation." - require 'google/protobuf_native' - :NATIVE - end - else - require 'google/protobuf_native' - :NATIVE - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/any_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/any_pb.rb deleted file mode 100644 index c53e405e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/any_pb.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/any.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x19google/protobuf/any.proto\x12\x0fgoogle.protobuf\"&\n\x03\x41ny\x12\x10\n\x08type_url\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x42v\n\x13\x63om.google.protobufB\x08\x41nyProtoP\x01Z,google.golang.org/protobuf/types/known/anypb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - Any = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Any").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/api_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/api_pb.rb deleted file mode 100644 index c8c54c45..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/api_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/api.proto - -require 'google/protobuf' - -require 'google/protobuf/source_context_pb' -require 'google/protobuf/type_pb' - - -descriptor_data = "\n\x19google/protobuf/api.proto\x12\x0fgoogle.protobuf\x1a$google/protobuf/source_context.proto\x1a\x1agoogle/protobuf/type.proto\"\x81\x02\n\x03\x41pi\x12\x0c\n\x04name\x18\x01 \x01(\t\x12(\n\x07methods\x18\x02 \x03(\x0b\x32\x17.google.protobuf.Method\x12(\n\x07options\x18\x03 \x03(\x0b\x32\x17.google.protobuf.Option\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x36\n\x0esource_context\x18\x05 \x01(\x0b\x32\x1e.google.protobuf.SourceContext\x12&\n\x06mixins\x18\x06 \x03(\x0b\x32\x16.google.protobuf.Mixin\x12\'\n\x06syntax\x18\x07 \x01(\x0e\x32\x17.google.protobuf.Syntax\"\xd5\x01\n\x06Method\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x10request_type_url\x18\x02 \x01(\t\x12\x19\n\x11request_streaming\x18\x03 \x01(\x08\x12\x19\n\x11response_type_url\x18\x04 \x01(\t\x12\x1a\n\x12response_streaming\x18\x05 \x01(\x08\x12(\n\x07options\x18\x06 \x03(\x0b\x32\x17.google.protobuf.Option\x12\'\n\x06syntax\x18\x07 \x01(\x0e\x32\x17.google.protobuf.Syntax\"#\n\x05Mixin\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04root\x18\x02 \x01(\tBv\n\x13\x63om.google.protobufB\x08\x41piProtoP\x01Z,google.golang.org/protobuf/types/known/apipb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - Api = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Api").msgclass - Method = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Method").msgclass - Mixin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Mixin").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/descriptor_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/descriptor_pb.rb deleted file mode 100644 index beda6d72..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/descriptor_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/descriptor.proto - -require 'google/protobuf' - - -descriptor_data = "\n google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"U\n\x11\x46ileDescriptorSet\x12\x32\n\x04\x66ile\x18\x01 \x03(\x0b\x32$.google.protobuf.FileDescriptorProto*\x0c\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\xa1\x04\n\x13\x46ileDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07package\x18\x02 \x01(\t\x12\x12\n\ndependency\x18\x03 \x03(\t\x12\x19\n\x11public_dependency\x18\n \x03(\x05\x12\x17\n\x0fweak_dependency\x18\x0b \x03(\x05\x12\x19\n\x11option_dependency\x18\x0f \x03(\t\x12\x36\n\x0cmessage_type\x18\x04 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x05 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12\x38\n\x07service\x18\x06 \x03(\x0b\x32\'.google.protobuf.ServiceDescriptorProto\x12\x38\n\textension\x18\x07 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12-\n\x07options\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.FileOptions\x12\x39\n\x10source_code_info\x18\t \x01(\x0b\x32\x1f.google.protobuf.SourceCodeInfo\x12\x0e\n\x06syntax\x18\x0c \x01(\t\x12)\n\x07\x65\x64ition\x18\x0e \x01(\x0e\x32\x18.google.protobuf.Edition\"\xe0\x05\n\x0f\x44\x65scriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x05\x66ield\x18\x02 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x38\n\textension\x18\x06 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x35\n\x0bnested_type\x18\x03 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x04 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12H\n\x0f\x65xtension_range\x18\x05 \x03(\x0b\x32/.google.protobuf.DescriptorProto.ExtensionRange\x12\x39\n\noneof_decl\x18\x08 \x03(\x0b\x32%.google.protobuf.OneofDescriptorProto\x12\x30\n\x07options\x18\x07 \x01(\x0b\x32\x1f.google.protobuf.MessageOptions\x12\x46\n\x0ereserved_range\x18\t \x03(\x0b\x32..google.protobuf.DescriptorProto.ReservedRange\x12\x15\n\rreserved_name\x18\n \x03(\t\x12\x35\n\nvisibility\x18\x0b \x01(\x0e\x32!.google.protobuf.SymbolVisibility\x1a\x65\n\x0e\x45xtensionRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12\x37\n\x07options\x18\x03 \x01(\x0b\x32&.google.protobuf.ExtensionRangeOptions\x1a+\n\rReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"\xe5\x03\n\x15\x45xtensionRangeOptions\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\x12L\n\x0b\x64\x65\x63laration\x18\x02 \x03(\x0b\x32\x32.google.protobuf.ExtensionRangeOptions.DeclarationB\x03\x88\x01\x02\x12-\n\x08\x66\x65\x61tures\x18\x32 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12_\n\x0cverification\x18\x03 \x01(\x0e\x32\x38.google.protobuf.ExtensionRangeOptions.VerificationState:\nUNVERIFIEDB\x03\x88\x01\x02\x1ah\n\x0b\x44\x65\x63laration\x12\x0e\n\x06number\x18\x01 \x01(\x05\x12\x11\n\tfull_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x10\n\x08reserved\x18\x05 \x01(\x08\x12\x10\n\x08repeated\x18\x06 \x01(\x08J\x04\x08\x04\x10\x05\"4\n\x11VerificationState\x12\x0f\n\x0b\x44\x45\x43LARATION\x10\x00\x12\x0e\n\nUNVERIFIED\x10\x01*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xd5\x05\n\x14\x46ieldDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x03 \x01(\x05\x12:\n\x05label\x18\x04 \x01(\x0e\x32+.google.protobuf.FieldDescriptorProto.Label\x12\x38\n\x04type\x18\x05 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x11\n\ttype_name\x18\x06 \x01(\t\x12\x10\n\x08\x65xtendee\x18\x02 \x01(\t\x12\x15\n\rdefault_value\x18\x07 \x01(\t\x12\x13\n\x0boneof_index\x18\t \x01(\x05\x12\x11\n\tjson_name\x18\n \x01(\t\x12.\n\x07options\x18\x08 \x01(\x0b\x32\x1d.google.protobuf.FieldOptions\x12\x17\n\x0fproto3_optional\x18\x11 \x01(\x08\"\xb6\x02\n\x04Type\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12\"C\n\x05Label\x12\x12\n\x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REPEATED\x10\x03\x12\x12\n\x0eLABEL_REQUIRED\x10\x02\"T\n\x14OneofDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\x07options\x18\x02 \x01(\x0b\x32\x1d.google.protobuf.OneofOptions\"\xdb\x02\n\x13\x45numDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x03(\x0b\x32).google.protobuf.EnumValueDescriptorProto\x12-\n\x07options\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.EnumOptions\x12N\n\x0ereserved_range\x18\x04 \x03(\x0b\x32\x36.google.protobuf.EnumDescriptorProto.EnumReservedRange\x12\x15\n\rreserved_name\x18\x05 \x03(\t\x12\x35\n\nvisibility\x18\x06 \x01(\x0e\x32!.google.protobuf.SymbolVisibility\x1a/\n\x11\x45numReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"l\n\x18\x45numValueDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x02 \x01(\x05\x12\x32\n\x07options\x18\x03 \x01(\x0b\x32!.google.protobuf.EnumValueOptions\"\x90\x01\n\x16ServiceDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x06method\x18\x02 \x03(\x0b\x32&.google.protobuf.MethodDescriptorProto\x12\x30\n\x07options\x18\x03 \x01(\x0b\x32\x1f.google.protobuf.ServiceOptions\"\xc1\x01\n\x15MethodDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ninput_type\x18\x02 \x01(\t\x12\x13\n\x0boutput_type\x18\x03 \x01(\t\x12/\n\x07options\x18\x04 \x01(\x0b\x32\x1e.google.protobuf.MethodOptions\x12\x1f\n\x10\x63lient_streaming\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1f\n\x10server_streaming\x18\x06 \x01(\x08:\x05\x66\x61lse\"\xcb\x06\n\x0b\x46ileOptions\x12\x14\n\x0cjava_package\x18\x01 \x01(\t\x12\x1c\n\x14java_outer_classname\x18\x08 \x01(\t\x12\"\n\x13java_multiple_files\x18\n \x01(\x08:\x05\x66\x61lse\x12)\n\x1djava_generate_equals_and_hash\x18\x14 \x01(\x08\x42\x02\x18\x01\x12%\n\x16java_string_check_utf8\x18\x1b \x01(\x08:\x05\x66\x61lse\x12\x46\n\x0coptimize_for\x18\t \x01(\x0e\x32).google.protobuf.FileOptions.OptimizeMode:\x05SPEED\x12\x12\n\ngo_package\x18\x0b \x01(\t\x12\"\n\x13\x63\x63_generic_services\x18\x10 \x01(\x08:\x05\x66\x61lse\x12$\n\x15java_generic_services\x18\x11 \x01(\x08:\x05\x66\x61lse\x12\"\n\x13py_generic_services\x18\x12 \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x10\x63\x63_enable_arenas\x18\x1f \x01(\x08:\x04true\x12\x19\n\x11objc_class_prefix\x18$ \x01(\t\x12\x18\n\x10\x63sharp_namespace\x18% \x01(\t\x12\x14\n\x0cswift_prefix\x18\' \x01(\t\x12\x18\n\x10php_class_prefix\x18( \x01(\t\x12\x15\n\rphp_namespace\x18) \x01(\t\x12\x1e\n\x16php_metadata_namespace\x18, \x01(\t\x12\x14\n\x0cruby_package\x18- \x01(\t\x12-\n\x08\x66\x65\x61tures\x18\x32 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\":\n\x0cOptimizeMode\x12\t\n\x05SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\x0cLITE_RUNTIME\x10\x03*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08*\x10+J\x04\x08&\x10\'R\x14php_generic_services\"\xe7\x02\n\x0eMessageOptions\x12&\n\x17message_set_wire_format\x18\x01 \x01(\x08:\x05\x66\x61lse\x12.\n\x1fno_standard_descriptor_accessor\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x11\n\tmap_entry\x18\x07 \x01(\x08\x12\x32\n&deprecated_legacy_json_field_conflicts\x18\x0b \x01(\x08\x42\x02\x18\x01\x12-\n\x08\x66\x65\x61tures\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"\xa3\x0b\n\x0c\x46ieldOptions\x12:\n\x05\x63type\x18\x01 \x01(\x0e\x32#.google.protobuf.FieldOptions.CType:\x06STRING\x12\x0e\n\x06packed\x18\x02 \x01(\x08\x12?\n\x06jstype\x18\x06 \x01(\x0e\x32$.google.protobuf.FieldOptions.JSType:\tJS_NORMAL\x12\x13\n\x04lazy\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0funverified_lazy\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x13\n\x04weak\x18\n \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0c\x64\x65\x62ug_redact\x18\x10 \x01(\x08:\x05\x66\x61lse\x12@\n\tretention\x18\x11 \x01(\x0e\x32-.google.protobuf.FieldOptions.OptionRetention\x12?\n\x07targets\x18\x13 \x03(\x0e\x32..google.protobuf.FieldOptions.OptionTargetType\x12\x46\n\x10\x65\x64ition_defaults\x18\x14 \x03(\x0b\x32,.google.protobuf.FieldOptions.EditionDefault\x12-\n\x08\x66\x65\x61tures\x18\x15 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x45\n\x0f\x66\x65\x61ture_support\x18\x16 \x01(\x0b\x32,.google.protobuf.FieldOptions.FeatureSupport\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\x1aJ\n\x0e\x45\x64itionDefault\x12)\n\x07\x65\x64ition\x18\x03 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\r\n\x05value\x18\x02 \x01(\t\x1a\xcc\x01\n\x0e\x46\x65\x61tureSupport\x12\x34\n\x12\x65\x64ition_introduced\x18\x01 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x34\n\x12\x65\x64ition_deprecated\x18\x02 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x1b\n\x13\x64\x65precation_warning\x18\x03 \x01(\t\x12\x31\n\x0f\x65\x64ition_removed\x18\x04 \x01(\x0e\x32\x18.google.protobuf.Edition\"/\n\x05\x43Type\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x43ORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02\"5\n\x06JSType\x12\r\n\tJS_NORMAL\x10\x00\x12\r\n\tJS_STRING\x10\x01\x12\r\n\tJS_NUMBER\x10\x02\"U\n\x0fOptionRetention\x12\x15\n\x11RETENTION_UNKNOWN\x10\x00\x12\x15\n\x11RETENTION_RUNTIME\x10\x01\x12\x14\n\x10RETENTION_SOURCE\x10\x02\"\x8c\x02\n\x10OptionTargetType\x12\x17\n\x13TARGET_TYPE_UNKNOWN\x10\x00\x12\x14\n\x10TARGET_TYPE_FILE\x10\x01\x12\x1f\n\x1bTARGET_TYPE_EXTENSION_RANGE\x10\x02\x12\x17\n\x13TARGET_TYPE_MESSAGE\x10\x03\x12\x15\n\x11TARGET_TYPE_FIELD\x10\x04\x12\x15\n\x11TARGET_TYPE_ONEOF\x10\x05\x12\x14\n\x10TARGET_TYPE_ENUM\x10\x06\x12\x1a\n\x16TARGET_TYPE_ENUM_ENTRY\x10\x07\x12\x17\n\x13TARGET_TYPE_SERVICE\x10\x08\x12\x16\n\x12TARGET_TYPE_METHOD\x10\t*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x12\x10\x13\"\x8d\x01\n\x0cOneofOptions\x12-\n\x08\x66\x65\x61tures\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xf6\x01\n\x0b\x45numOptions\x12\x13\n\x0b\x61llow_alias\x18\x02 \x01(\x08\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x32\n&deprecated_legacy_json_field_conflicts\x18\x06 \x01(\x08\x42\x02\x18\x01\x12-\n\x08\x66\x65\x61tures\x18\x07 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x05\x10\x06\"\x90\x02\n\x10\x45numValueOptions\x12\x19\n\ndeprecated\x18\x01 \x01(\x08:\x05\x66\x61lse\x12-\n\x08\x66\x65\x61tures\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x1b\n\x0c\x64\x65\x62ug_redact\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x45\n\x0f\x66\x65\x61ture_support\x18\x04 \x01(\x0b\x32,.google.protobuf.FieldOptions.FeatureSupport\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xaa\x01\n\x0eServiceOptions\x12-\n\x08\x66\x65\x61tures\x18\" \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xdc\x02\n\rMethodOptions\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12_\n\x11idempotency_level\x18\" \x01(\x0e\x32/.google.protobuf.MethodOptions.IdempotencyLevel:\x13IDEMPOTENCY_UNKNOWN\x12-\n\x08\x66\x65\x61tures\x18# \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\"P\n\x10IdempotencyLevel\x12\x17\n\x13IDEMPOTENCY_UNKNOWN\x10\x00\x12\x13\n\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n\nIDEMPOTENT\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9e\x02\n\x13UninterpretedOption\x12;\n\x04name\x18\x02 \x03(\x0b\x32-.google.protobuf.UninterpretedOption.NamePart\x12\x18\n\x10identifier_value\x18\x03 \x01(\t\x12\x1a\n\x12positive_int_value\x18\x04 \x01(\x04\x12\x1a\n\x12negative_int_value\x18\x05 \x01(\x03\x12\x14\n\x0c\x64ouble_value\x18\x06 \x01(\x01\x12\x14\n\x0cstring_value\x18\x07 \x01(\x0c\x12\x17\n\x0f\x61ggregate_value\x18\x08 \x01(\t\x1a\x33\n\x08NamePart\x12\x11\n\tname_part\x18\x01 \x02(\t\x12\x14\n\x0cis_extension\x18\x02 \x02(\x08\"\x83\x0e\n\nFeatureSet\x12\x82\x01\n\x0e\x66ield_presence\x18\x01 \x01(\x0e\x32).google.protobuf.FeatureSet.FieldPresenceB?\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08\x45XPLICIT\x18\x84\x07\xa2\x01\r\x12\x08IMPLICIT\x18\xe7\x07\xa2\x01\r\x12\x08\x45XPLICIT\x18\xe8\x07\xb2\x01\x03\x08\xe8\x07\x12\x62\n\tenum_type\x18\x02 \x01(\x0e\x32$.google.protobuf.FeatureSet.EnumTypeB)\x88\x01\x01\x98\x01\x06\x98\x01\x01\xa2\x01\x0b\x12\x06\x43LOSED\x18\x84\x07\xa2\x01\t\x12\x04OPEN\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12\x81\x01\n\x17repeated_field_encoding\x18\x03 \x01(\x0e\x32\x31.google.protobuf.FeatureSet.RepeatedFieldEncodingB-\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08\x45XPANDED\x18\x84\x07\xa2\x01\x0b\x12\x06PACKED\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12n\n\x0futf8_validation\x18\x04 \x01(\x0e\x32*.google.protobuf.FeatureSet.Utf8ValidationB)\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\t\x12\x04NONE\x18\x84\x07\xa2\x01\x0b\x12\x06VERIFY\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12m\n\x10message_encoding\x18\x05 \x01(\x0e\x32+.google.protobuf.FeatureSet.MessageEncodingB&\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\x14\x12\x0fLENGTH_PREFIXED\x18\x84\x07\xb2\x01\x03\x08\xe8\x07\x12v\n\x0bjson_format\x18\x06 \x01(\x0e\x32&.google.protobuf.FeatureSet.JsonFormatB9\x88\x01\x01\x98\x01\x03\x98\x01\x06\x98\x01\x01\xa2\x01\x17\x12\x12LEGACY_BEST_EFFORT\x18\x84\x07\xa2\x01\n\x12\x05\x41LLOW\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12\x97\x01\n\x14\x65nforce_naming_style\x18\x07 \x01(\x0e\x32..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\x07\x98\x01\x08\x98\x01\t\xa2\x01\x11\x12\x0cSTYLE_LEGACY\x18\x84\x07\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\x07\xb2\x01\x03\x08\xe9\x07\x12\xa0\x01\n\x19\x64\x65\x66\x61ult_symbol_visibility\x18\x08 \x01(\x0e\x32\x45.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibilityB6\x88\x01\x02\x98\x01\x01\xa2\x01\x0f\x12\nEXPORT_ALL\x18\x84\x07\xa2\x01\x15\x12\x10\x45XPORT_TOP_LEVEL\x18\xe9\x07\xb2\x01\x03\x08\xe9\x07\x1a\xa1\x01\n\x11VisibilityFeature\"\x81\x01\n\x17\x44\x65\x66\x61ultSymbolVisibility\x12%\n!DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\x10\x00\x12\x0e\n\nEXPORT_ALL\x10\x01\x12\x14\n\x10\x45XPORT_TOP_LEVEL\x10\x02\x12\r\n\tLOCAL_ALL\x10\x03\x12\n\n\x06STRICT\x10\x04J\x08\x08\x01\x10\x80\x80\x80\x80\x02\"\\\n\rFieldPresence\x12\x1a\n\x16\x46IELD_PRESENCE_UNKNOWN\x10\x00\x12\x0c\n\x08\x45XPLICIT\x10\x01\x12\x0c\n\x08IMPLICIT\x10\x02\x12\x13\n\x0fLEGACY_REQUIRED\x10\x03\"7\n\x08\x45numType\x12\x15\n\x11\x45NUM_TYPE_UNKNOWN\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\"V\n\x15RepeatedFieldEncoding\x12#\n\x1fREPEATED_FIELD_ENCODING_UNKNOWN\x10\x00\x12\n\n\x06PACKED\x10\x01\x12\x0c\n\x08\x45XPANDED\x10\x02\"I\n\x0eUtf8Validation\x12\x1b\n\x17UTF8_VALIDATION_UNKNOWN\x10\x00\x12\n\n\x06VERIFY\x10\x02\x12\x08\n\x04NONE\x10\x03\"\x04\x08\x01\x10\x01\"S\n\x0fMessageEncoding\x12\x1c\n\x18MESSAGE_ENCODING_UNKNOWN\x10\x00\x12\x13\n\x0fLENGTH_PREFIXED\x10\x01\x12\r\n\tDELIMITED\x10\x02\"H\n\nJsonFormat\x12\x17\n\x13JSON_FORMAT_UNKNOWN\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x16\n\x12LEGACY_BEST_EFFORT\x10\x02\"W\n\x12\x45nforceNamingStyle\x12 \n\x1c\x45NFORCE_NAMING_STYLE_UNKNOWN\x10\x00\x12\r\n\tSTYLE2024\x10\x01\x12\x10\n\x0cSTYLE_LEGACY\x10\x02*\x06\x08\xe8\x07\x10\x8bN*\x06\x08\x8bN\x10\x90N*\x06\x08\x90N\x10\x91NJ\x06\x08\xe7\x07\x10\xe8\x07\"\x98\x03\n\x12\x46\x65\x61tureSetDefaults\x12N\n\x08\x64\x65\x66\x61ults\x18\x01 \x03(\x0b\x32<.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault\x12\x31\n\x0fminimum_edition\x18\x04 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x31\n\x0fmaximum_edition\x18\x05 \x01(\x0e\x32\x18.google.protobuf.Edition\x1a\xcb\x01\n\x18\x46\x65\x61tureSetEditionDefault\x12)\n\x07\x65\x64ition\x18\x03 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x39\n\x14overridable_features\x18\x04 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x33\n\x0e\x66ixed_features\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.FeatureSetJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x08\x66\x65\x61tures\"\xe3\x01\n\x0eSourceCodeInfo\x12:\n\x08location\x18\x01 \x03(\x0b\x32(.google.protobuf.SourceCodeInfo.Location\x1a\x86\x01\n\x08Location\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x10\n\x04span\x18\x02 \x03(\x05\x42\x02\x10\x01\x12\x18\n\x10leading_comments\x18\x03 \x01(\t\x12\x19\n\x11trailing_comments\x18\x04 \x01(\t\x12!\n\x19leading_detached_comments\x18\x06 \x03(\t*\x0c\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\x9c\x02\n\x11GeneratedCodeInfo\x12\x41\n\nannotation\x18\x01 \x03(\x0b\x32-.google.protobuf.GeneratedCodeInfo.Annotation\x1a\xc3\x01\n\nAnnotation\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x13\n\x0bsource_file\x18\x02 \x01(\t\x12\r\n\x05\x62\x65gin\x18\x03 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x05\x12H\n\x08semantic\x18\x05 \x01(\x0e\x32\x36.google.protobuf.GeneratedCodeInfo.Annotation.Semantic\"(\n\x08Semantic\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03SET\x10\x01\x12\t\n\x05\x41LIAS\x10\x02*\xa7\x02\n\x07\x45\x64ition\x12\x13\n\x0f\x45\x44ITION_UNKNOWN\x10\x00\x12\x13\n\x0e\x45\x44ITION_LEGACY\x10\x84\x07\x12\x13\n\x0e\x45\x44ITION_PROTO2\x10\xe6\x07\x12\x13\n\x0e\x45\x44ITION_PROTO3\x10\xe7\x07\x12\x11\n\x0c\x45\x44ITION_2023\x10\xe8\x07\x12\x11\n\x0c\x45\x44ITION_2024\x10\xe9\x07\x12\x17\n\x13\x45\x44ITION_1_TEST_ONLY\x10\x01\x12\x17\n\x13\x45\x44ITION_2_TEST_ONLY\x10\x02\x12\x1d\n\x17\x45\x44ITION_99997_TEST_ONLY\x10\x9d\x8d\x06\x12\x1d\n\x17\x45\x44ITION_99998_TEST_ONLY\x10\x9e\x8d\x06\x12\x1d\n\x17\x45\x44ITION_99999_TEST_ONLY\x10\x9f\x8d\x06\x12\x13\n\x0b\x45\x44ITION_MAX\x10\xff\xff\xff\xff\x07*U\n\x10SymbolVisibility\x12\x14\n\x10VISIBILITY_UNSET\x10\x00\x12\x14\n\x10VISIBILITY_LOCAL\x10\x01\x12\x15\n\x11VISIBILITY_EXPORT\x10\x02\x42~\n\x13\x63om.google.protobufB\x10\x44\x65scriptorProtosH\x01Z-google.golang.org/protobuf/types/descriptorpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.Reflection" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - FileDescriptorSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileDescriptorSet").msgclass - FileDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileDescriptorProto").msgclass - DescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto").msgclass - DescriptorProto::ExtensionRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto.ExtensionRange").msgclass - DescriptorProto::ReservedRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto.ReservedRange").msgclass - ExtensionRangeOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ExtensionRangeOptions").msgclass - ExtensionRangeOptions::Declaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ExtensionRangeOptions.Declaration").msgclass - ExtensionRangeOptions::VerificationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ExtensionRangeOptions.VerificationState").enummodule - FieldDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto").msgclass - FieldDescriptorProto::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto.Type").enummodule - FieldDescriptorProto::Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto.Label").enummodule - OneofDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.OneofDescriptorProto").msgclass - EnumDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumDescriptorProto").msgclass - EnumDescriptorProto::EnumReservedRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumDescriptorProto.EnumReservedRange").msgclass - EnumValueDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValueDescriptorProto").msgclass - ServiceDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ServiceDescriptorProto").msgclass - MethodDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodDescriptorProto").msgclass - FileOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileOptions").msgclass - FileOptions::OptimizeMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileOptions.OptimizeMode").enummodule - MessageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MessageOptions").msgclass - FieldOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions").msgclass - FieldOptions::EditionDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.EditionDefault").msgclass - FieldOptions::FeatureSupport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.FeatureSupport").msgclass - FieldOptions::CType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.CType").enummodule - FieldOptions::JSType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.JSType").enummodule - FieldOptions::OptionRetention = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.OptionRetention").enummodule - FieldOptions::OptionTargetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.OptionTargetType").enummodule - OneofOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.OneofOptions").msgclass - EnumOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumOptions").msgclass - EnumValueOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValueOptions").msgclass - ServiceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ServiceOptions").msgclass - MethodOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodOptions").msgclass - MethodOptions::IdempotencyLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodOptions.IdempotencyLevel").enummodule - UninterpretedOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UninterpretedOption").msgclass - UninterpretedOption::NamePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UninterpretedOption.NamePart").msgclass - FeatureSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet").msgclass - FeatureSet::VisibilityFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.VisibilityFeature").msgclass - FeatureSet::VisibilityFeature::DefaultSymbolVisibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility").enummodule - FeatureSet::FieldPresence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.FieldPresence").enummodule - FeatureSet::EnumType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.EnumType").enummodule - FeatureSet::RepeatedFieldEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.RepeatedFieldEncoding").enummodule - FeatureSet::Utf8Validation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.Utf8Validation").enummodule - FeatureSet::MessageEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.MessageEncoding").enummodule - FeatureSet::JsonFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.JsonFormat").enummodule - FeatureSet::EnforceNamingStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSet.EnforceNamingStyle").enummodule - FeatureSetDefaults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSetDefaults").msgclass - FeatureSetDefaults::FeatureSetEditionDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault").msgclass - SourceCodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceCodeInfo").msgclass - SourceCodeInfo::Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceCodeInfo.Location").msgclass - GeneratedCodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.GeneratedCodeInfo").msgclass - GeneratedCodeInfo::Annotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.GeneratedCodeInfo.Annotation").msgclass - GeneratedCodeInfo::Annotation::Semantic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.GeneratedCodeInfo.Annotation.Semantic").enummodule - Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Edition").enummodule - SymbolVisibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SymbolVisibility").enummodule - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/duration_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/duration_pb.rb deleted file mode 100644 index f9697768..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/duration_pb.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/duration.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x1egoogle/protobuf/duration.proto\x12\x0fgoogle.protobuf\"*\n\x08\x44uration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\x42\x83\x01\n\x13\x63om.google.protobufB\rDurationProtoP\x01Z1google.golang.org/protobuf/types/known/durationpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - Duration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Duration").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/empty_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/empty_pb.rb deleted file mode 100644 index da9c7237..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/empty_pb.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/empty.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\x07\n\x05\x45mptyB}\n\x13\x63om.google.protobufB\nEmptyProtoP\x01Z.google.golang.org/protobuf/types/known/emptypb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - Empty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Empty").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/descriptor.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/descriptor.rb deleted file mode 100644 index c30da20b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/descriptor.rb +++ /dev/null @@ -1,175 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - ## - # Message Descriptor - Descriptor for short. - class Descriptor - attr :descriptor_pool, :msg_class - include Enumerable - - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - include Google::Protobuf::Internal::PointerHelper - - # @param value [Descriptor] Descriptor to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _ = nil) - msg_def_ptr = value.nil? ? nil : value.instance_variable_get(:@msg_def) - return ::FFI::Pointer::NULL if msg_def_ptr.nil? - raise "Underlying msg_def was null!" if msg_def_ptr.null? - msg_def_ptr - end - - ## - # @param msg_def [::FFI::Pointer] MsgDef pointer to be wrapped - # @param _ [Object] Unused - def from_native(msg_def, _ = nil) - return nil if msg_def.nil? or msg_def.null? - file_def = Google::Protobuf::FFI.get_message_file_def msg_def - descriptor_from_file_def(file_def, msg_def) - end - end - - def to_native - self.class.to_native(self) - end - - ## - # Great write up of this strategy: - # See https://blog.appsignal.com/2018/08/07/ruby-magic-changing-the-way-ruby-creates-objects.html - def self.new(*arguments, &block) - raise "Descriptor objects may not be created from Ruby." - end - - def to_s - inspect - end - - def inspect - "Descriptor - (not the message class) #{name}" - end - - def file_descriptor - @descriptor_pool.send(:get_file_descriptor, Google::Protobuf::FFI.get_message_file_def(@msg_def)) - end - - def name - @name ||= Google::Protobuf::FFI.get_message_fullname(self) - end - - def each_oneof &block - n = Google::Protobuf::FFI.oneof_count(self) - 0.upto(n-1) do |i| - yield(Google::Protobuf::FFI.get_oneof_by_index(self, i)) - end - nil - end - - def each &block - n = Google::Protobuf::FFI.field_count(self) - 0.upto(n-1) do |i| - yield(Google::Protobuf::FFI.get_field_by_index(self, i)) - end - nil - end - - def lookup(name) - Google::Protobuf::FFI.get_field_by_name(self, name, name.size) - end - - def lookup_oneof(name) - Google::Protobuf::FFI.get_oneof_by_name(self, name, name.size) - end - - def msgclass - @msg_class ||= build_message_class - end - - def options - @options ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.message_options(self, size_ptr, temporary_arena) - opts = Google::Protobuf::MessageOptions.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - opts.clear_features() - opts.freeze - end - end - - def to_proto - @to_proto ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.message_to_proto(self, size_ptr, temporary_arena) - Google::Protobuf::DescriptorProto.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - end - end - - private - - extend Google::Protobuf::Internal::Convert - - def initialize(msg_def, descriptor_pool) - @msg_def = msg_def - @msg_class = nil - @descriptor_pool = descriptor_pool - end - - def self.private_constructor(msg_def, descriptor_pool) - instance = allocate - instance.send(:initialize, msg_def, descriptor_pool) - instance - end - - def wrapper? - if defined? @wrapper - @wrapper - else - @wrapper = case Google::Protobuf::FFI.get_well_known_type self - when :DoubleValue, :FloatValue, :Int64Value, :UInt64Value, :Int32Value, :UInt32Value, :StringValue, :BytesValue, :BoolValue - true - else - false - end - end - end - - def self.get_message(msg, descriptor, arena) - return nil if msg.nil? or msg.null? - message = OBJECT_CACHE.get(msg.address) - if message.nil? - message = descriptor.msgclass.send(:private_constructor, arena, msg: msg) - end - message - end - - def pool - @descriptor_pool - end - end - - class FFI - # MessageDef - attach_function :new_message_from_def, :upb_Message_New, [MiniTable.by_ref, Internal::Arena], :Message - attach_function :field_count, :upb_MessageDef_FieldCount, [Descriptor], :int - attach_function :get_message_file_def, :upb_MessageDef_File, [:pointer], :FileDef - attach_function :get_message_fullname, :upb_MessageDef_FullName, [Descriptor], :string - attach_function :get_mini_table, :upb_MessageDef_MiniTable, [Descriptor], MiniTable.ptr - attach_function :oneof_count, :upb_MessageDef_OneofCount, [Descriptor], :int - attach_function :message_options, :Descriptor_serialized_options, [Descriptor, :pointer, Internal::Arena], :pointer - attach_function :get_well_known_type, :upb_MessageDef_WellKnownType, [Descriptor], WellKnown - attach_function :find_msg_def_by_name, :upb_MessageDef_FindByNameWithSize, [Descriptor, :string, :size_t, :FieldDefPointer, :OneofDefPointer], :bool - attach_function :message_to_proto, :Descriptor_serialized_to_proto, [Descriptor, :pointer, Internal::Arena], :pointer - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/descriptor_pool.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/descriptor_pool.rb deleted file mode 100644 index 8797dc8e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/descriptor_pool.rb +++ /dev/null @@ -1,79 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class FFI - # DefPool - attach_function :add_serialized_file, :upb_DefPool_AddFile, [:DefPool, :FileDescriptorProto, Status.by_ref], :FileDef - attach_function :free_descriptor_pool, :upb_DefPool_Free, [:DefPool], :void - attach_function :create_descriptor_pool,:upb_DefPool_New, [], :DefPool - attach_function :get_extension_registry,:upb_DefPool_ExtensionRegistry, [:DefPool], :ExtensionRegistry - attach_function :lookup_enum, :upb_DefPool_FindEnumByName, [:DefPool, :string], EnumDescriptor - attach_function :lookup_extension, :upb_DefPool_FindExtensionByName,[:DefPool, :string], FieldDescriptor - attach_function :lookup_msg, :upb_DefPool_FindMessageByName, [:DefPool, :string], Descriptor - attach_function :lookup_service, :upb_DefPool_FindServiceByName, [:DefPool, :string], ServiceDescriptor - attach_function :lookup_file, :upb_DefPool_FindFileByName, [:DefPool, :string], FileDescriptor - - # FileDescriptorProto - attach_function :parse, :FileDescriptorProto_parse, [:binary_string, :size_t, Internal::Arena], :FileDescriptorProto - end - class DescriptorPool - attr :descriptor_pool - attr_accessor :descriptor_class_by_def - - def initialize - @descriptor_pool = ::FFI::AutoPointer.new(Google::Protobuf::FFI.create_descriptor_pool, Google::Protobuf::FFI.method(:free_descriptor_pool)) - @descriptor_class_by_def = {} - - # Should always be the last expression of the initializer to avoid - # leaking references to this object before construction is complete. - Google::Protobuf::OBJECT_CACHE.try_add @descriptor_pool.address, self - end - - def add_serialized_file(file_contents) - # Allocate memory sized to file_contents - memBuf = ::FFI::MemoryPointer.new(:char, file_contents.bytesize) - # Insert the data - memBuf.put_bytes(0, file_contents) - temporary_arena = Google::Protobuf::FFI.create_arena - file_descriptor_proto = Google::Protobuf::FFI.parse memBuf, file_contents.bytesize, temporary_arena - raise ArgumentError.new("Unable to parse FileDescriptorProto") if file_descriptor_proto.null? - - status = Google::Protobuf::FFI::Status.new - file_descriptor = Google::Protobuf::FFI.add_serialized_file @descriptor_pool, file_descriptor_proto, status - if file_descriptor.null? - raise TypeError.new("Unable to build file to DescriptorPool: #{Google::Protobuf::FFI.error_message(status)}") - else - @descriptor_class_by_def[file_descriptor.address] = FileDescriptor.new file_descriptor, self - end - end - - def lookup name - Google::Protobuf::FFI.lookup_msg(@descriptor_pool, name) || - Google::Protobuf::FFI.lookup_enum(@descriptor_pool, name) || - Google::Protobuf::FFI.lookup_extension(@descriptor_pool, name) || - Google::Protobuf::FFI.lookup_service(@descriptor_pool, name) || - Google::Protobuf::FFI.lookup_file(@descriptor_pool, name) - end - - def self.generated_pool - @@generated_pool ||= DescriptorPool.new - end - - private - - # Implementation details below are subject to breaking changes without - # warning and are intended for use only within the gem. - - def get_file_descriptor file_def - return nil if file_def.null? - @descriptor_class_by_def[file_def.address] ||= FileDescriptor.new(file_def, self) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/enum_descriptor.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/enum_descriptor.rb deleted file mode 100644 index f95e0915..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/enum_descriptor.rb +++ /dev/null @@ -1,183 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class EnumDescriptor - attr :descriptor_pool, :enum_def - include Enumerable - - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - include Google::Protobuf::Internal::PointerHelper - - # @param value [EnumDescriptor] EnumDescriptor to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _) - value.instance_variable_get(:@enum_def) || ::FFI::Pointer::NULL - end - - ## - # @param enum_def [::FFI::Pointer] EnumDef pointer to be wrapped - # @param _ [Object] Unused - def from_native(enum_def, _) - return nil if enum_def.nil? or enum_def.null? - file_def = Google::Protobuf::FFI.get_message_file_def enum_def - descriptor_from_file_def(file_def, enum_def) - end - end - - def self.new(*arguments, &block) - raise "Descriptor objects may not be created from Ruby." - end - - def file_descriptor - @descriptor_pool.send(:get_file_descriptor, Google::Protobuf::FFI.get_enum_file_descriptor(self)) - end - - def name - Google::Protobuf::FFI.get_enum_fullname(self) - end - - def to_s - inspect - end - - def inspect - "#{self.class.name}: #{name}" - end - - def lookup_name(name) - self.class.send(:lookup_name, self, name) - end - - def lookup_value(number) - self.class.send(:lookup_value, self, number) - end - - def each &block - n = Google::Protobuf::FFI.enum_value_count(self) - 0.upto(n - 1) do |i| - enum_value = Google::Protobuf::FFI.enum_value_by_index(self, i) - yield(Google::Protobuf::FFI.enum_name(enum_value).to_sym, Google::Protobuf::FFI.enum_number(enum_value)) - end - nil - end - - def enummodule - if @module.nil? - @module = build_enum_module - end - @module - end - - def options - @options ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.enum_options(self, size_ptr, temporary_arena) - opts = Google::Protobuf::EnumOptions.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - opts.clear_features() - opts.freeze - end - end - - def to_proto - @to_proto ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.enum_to_proto(self, size_ptr, temporary_arena) - Google::Protobuf::EnumDescriptorProto.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - end - end - - private - - def initialize(enum_def, descriptor_pool) - @descriptor_pool = descriptor_pool - @enum_def = enum_def - @module = nil - end - - def self.private_constructor(enum_def, descriptor_pool) - instance = allocate - instance.send(:initialize, enum_def, descriptor_pool) - instance - end - - def self.lookup_value(enum_def, number) - enum_value = Google::Protobuf::FFI.enum_value_by_number(enum_def, number) - if enum_value.null? - nil - else - Google::Protobuf::FFI.enum_name(enum_value).to_sym - end - end - - def self.lookup_name(enum_def, name) - enum_value = Google::Protobuf::FFI.enum_value_by_name(enum_def, name.to_s, name.size) - if enum_value.null? - nil - else - Google::Protobuf::FFI.enum_number(enum_value) - end - end - - def build_enum_module - descriptor = self - dynamic_module = Module.new do - @descriptor = descriptor - - class << self - attr_accessor :descriptor - end - - def self.lookup(number) - descriptor.lookup_value number - end - - def self.resolve(name) - descriptor.lookup_name name - end - end - - self.each do |name, value| - if name[0] < 'A' || name[0] > 'Z' - if name[0] >= 'a' and name[0] <= 'z' - name = name[0].upcase + name[1..-1] # auto capitalize - else - warn( - "Enum value '#{name}' does not start with an uppercase letter " + - "as is required for Ruby constants.") - next - end - end - dynamic_module.const_set(name.to_sym, value) - end - dynamic_module - end - end - - class FFI - # EnumDescriptor - attach_function :get_enum_file_descriptor, :upb_EnumDef_File, [EnumDescriptor], :FileDef - attach_function :enum_value_by_name, :upb_EnumDef_FindValueByNameWithSize,[EnumDescriptor, :string, :size_t], :EnumValueDef - attach_function :enum_value_by_number, :upb_EnumDef_FindValueByNumber, [EnumDescriptor, :int], :EnumValueDef - attach_function :get_enum_fullname, :upb_EnumDef_FullName, [EnumDescriptor], :string - attach_function :enum_options, :EnumDescriptor_serialized_options, [EnumDescriptor, :pointer, Internal::Arena], :pointer - attach_function :enum_to_proto, :EnumDescriptor_serialized_to_proto, [EnumDescriptor, :pointer, Internal::Arena], :pointer - attach_function :enum_value_by_index, :upb_EnumDef_Value, [EnumDescriptor, :int], :EnumValueDef - attach_function :enum_value_count, :upb_EnumDef_ValueCount, [EnumDescriptor], :int - attach_function :enum_name, :upb_EnumValueDef_Name, [:EnumValueDef], :string - attach_function :enum_number, :upb_EnumValueDef_Number, [:EnumValueDef], :int - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/ffi.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/ffi.rb deleted file mode 100644 index eac476d0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/ffi.rb +++ /dev/null @@ -1,214 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class FFI - extend ::FFI::Library - # Workaround for Bazel's use of symlinks + JRuby's __FILE__ and `caller` - # that resolves them. - if ENV['BAZEL'] == 'true' - ffi_lib ::FFI::Compiler::Loader.find 'protobuf_c_ffi', ENV['PWD'] - else - ffi_lib ::FFI::Compiler::Loader.find 'protobuf_c_ffi' - end - - ## Map - Upb_Map_Begin = -1 - - ## Encoding Status - Upb_Status_MaxMessage = 511 - Upb_Encode_Deterministic = 1 - Upb_Encode_SkipUnknown = 2 - - ## JSON Encoding options - # When set, emits 0/default values. TODO: proto3 only? - Upb_JsonEncode_EmitDefaults = 1 - # When set, use normal (snake_case) field names instead of JSON (camelCase) names. - Upb_JsonEncode_UseProtoNames = 2 - # When set, emits enums as their integer values instead of as their names. - Upb_JsonEncode_FormatEnumsAsIntegers = 4 - - ## JSON Decoding options - Upb_JsonDecode_IgnoreUnknown = 1 - - ## JSON Decoding results - Upb_JsonDecodeResult_Ok = 0 - Upb_JsonDecodeResult_Error = 2 - - typedef :pointer, :Array - typedef :pointer, :DefPool - typedef :pointer, :EnumValueDef - typedef :pointer, :ExtensionRegistry - typedef :pointer, :FieldDefPointer - typedef :pointer, :FileDef - typedef :pointer, :FileDescriptorProto - typedef :pointer, :Map - typedef :pointer, :Message # Instances of a message - typedef :pointer, :OneofDefPointer - typedef :pointer, :binary_string - if ::FFI::Platform::ARCH == "aarch64" - typedef :u_int8_t, :uint8_t - typedef :u_int16_t, :uint16_t - typedef :u_int32_t, :uint32_t - typedef :u_int64_t, :uint64_t - end - - FieldType = enum( - :double, 1, - :float, - :int64, - :uint64, - :int32, - :fixed64, - :fixed32, - :bool, - :string, - :group, - :message, - :bytes, - :uint32, - :enum, - :sfixed32, - :sfixed64, - :sint32, - :sint64 - ) - - CType = enum( - :bool, 1, - :float, - :int32, - :uint32, - :enum, - :message, - :double, - :int64, - :uint64, - :string, - :bytes - ) - - Label = enum( - :optional, 1, - :required, - :repeated - ) - - # All the different kind of well known type messages. For simplicity of check, - # number wrappers and string wrappers are grouped together. Make sure the - # order and merber of these groups are not changed. - - WellKnown = enum( - :Unspecified, - :Any, - :FieldMask, - :Duration, - :Timestamp, - # number wrappers - :DoubleValue, - :FloatValue, - :Int64Value, - :UInt64Value, - :Int32Value, - :UInt32Value, - # string wrappers - :StringValue, - :BytesValue, - :BoolValue, - :Value, - :ListValue, - :Struct - ) - - DecodeStatus = enum( - :Ok, - :Malformed, # Wire format was corrupt - :OutOfMemory, # Arena alloc failed - :BadUtf8, # String field had bad UTF-8 - :MaxDepthExceeded, # Exceeded UPB_DECODE_MAXDEPTH - - # CheckRequired failed, but the parse otherwise succeeded. - :MissingRequired, - ) - - EncodeStatus = enum( - :Ok, - :OutOfMemory, # Arena alloc failed - :MaxDepthExceeded, # Exceeded UPB_DECODE_MAXDEPTH - - # CheckRequired failed, but the parse otherwise succeeded. - :MissingRequired, - ) - - class StringView < ::FFI::Struct - layout :data, :pointer, - :size, :size_t - end - - class MiniTable < ::FFI::Struct - layout :subs, :pointer, - :fields, :pointer, - :size, :uint16_t, - :field_count, :uint16_t, - :ext, :uint8_t, # upb_ExtMode, declared as uint8_t so sizeof(ext) == 1 - :dense_below, :uint8_t, - :table_mask, :uint8_t, - :required_count, :uint8_t # Required fields have the lowest hasbits. - # To statically initialize the tables of variable length, we need a flexible - # array member, and we need to compile in gnu99 mode (constant initialization - # of flexible array members is a GNU extension, not in C99 unfortunately. */ - # _upb_FastTable_Entry fasttable[]; - end - - class Status < ::FFI::Struct - layout :ok, :bool, - :msg, [:char, Upb_Status_MaxMessage] - - def initialize - super - FFI.clear self - end - end - - class MessageValue < ::FFI::Union - layout :bool_val, :bool, - :float_val, :float, - :double_val, :double, - :int32_val, :int32_t, - :int64_val, :int64_t, - :uint32_val, :uint32_t, - :uint64_val,:uint64_t, - :map_val, :pointer, - :msg_val, :pointer, - :array_val,:pointer, - :str_val, StringView - end - - Upb_Message_Begin = -1 - - class MutableMessageValue < ::FFI::Union - layout :map, :Map, - :msg, :Message, - :array, :Array - end - - # Status - attach_function :clear, :upb_Status_Clear, [Status.by_ref], :void - attach_function :error_message, :upb_Status_ErrorMessage, [Status.by_ref], :string - - # Generic - attach_function :memcmp, [:pointer, :pointer, :size_t], :int - attach_function :memcpy, [:pointer, :pointer, :size_t], :int - - # Alternatives to pre-processor macros - def self.decode_max_depth(i) - i << 16 - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/field_descriptor.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/field_descriptor.rb deleted file mode 100644 index 2ec6d8e2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/field_descriptor.rb +++ /dev/null @@ -1,346 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class FieldDescriptor - attr :field_def, :descriptor_pool - - include Google::Protobuf::Internal::Convert - - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - include Google::Protobuf::Internal::PointerHelper - - # @param value [FieldDescriptor] FieldDescriptor to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _) - field_def_ptr = value.instance_variable_get(:@field_def) - warn "Underlying field_def was nil!" if field_def_ptr.nil? - raise "Underlying field_def was null!" if !field_def_ptr.nil? and field_def_ptr.null? - field_def_ptr - end - - ## - # @param field_def [::FFI::Pointer] FieldDef pointer to be wrapped - # @param _ [Object] Unused - def from_native(field_def, _ = nil) - return nil if field_def.nil? or field_def.null? - file_def = Google::Protobuf::FFI.file_def_by_raw_field_def(field_def) - descriptor_from_file_def(file_def, field_def) - end - end - - def self.new(*arguments, &block) - raise "Descriptor objects may not be created from Ruby." - end - - def to_s - inspect - end - - def inspect - "#{self.class.name}: #{name}" - end - - def name - @name ||= Google::Protobuf::FFI.get_full_name(self) - end - - def json_name - @json_name ||= Google::Protobuf::FFI.get_json_name(self) - end - - def number - @number ||= Google::Protobuf::FFI.get_number(self) - end - - def type - @type ||= Google::Protobuf::FFI.get_type(self) - end - - # DEPRECATED: Use required? or repeated? instead. - def label - @label ||= Google::Protobuf::FFI.get_label(self) - end - - def default - return nil if Google::Protobuf::FFI.is_sub_message(self) - if Google::Protobuf::FFI.is_repeated(self) - message_value = Google::Protobuf::FFI::MessageValue.new - else - message_value = Google::Protobuf::FFI.get_default(self) - end - enum_def = Google::Protobuf::FFI.get_subtype_as_enum(self) - if enum_def.null? - convert_upb_to_ruby message_value, c_type - else - convert_upb_to_ruby message_value, c_type, enum_def - end - end - - def submsg_name - if defined? @submsg_name - @submsg_name - else - @submsg_name = case c_type - when :enum - Google::Protobuf::FFI.get_enum_fullname Google::Protobuf::FFI.get_subtype_as_enum self - when :message - Google::Protobuf::FFI.get_message_fullname Google::Protobuf::FFI.get_subtype_as_message self - else - nil - end - end - end - - ## - # Tests if this field has been set on the argument message. - # - # @param msg [Google::Protobuf::Message] - # @return [Object] Value of the field on this message. - # @raise [TypeError] If the field is not defined on this message. - def get(msg) - if msg.class.descriptor == Google::Protobuf::FFI.get_containing_message_def(self) - msg.send :get_field, self - else - raise TypeError.new "get method called on wrong message type" - end - end - - def subtype - if defined? @subtype - @subtype - else - @subtype = case c_type - when :enum - Google::Protobuf::FFI.get_subtype_as_enum(self) - when :message - Google::Protobuf::FFI.get_subtype_as_message(self) - else - nil - end - end - end - - ## - # Tests if this field has been set on the argument message. - # - # @param msg [Google::Protobuf::Message] - # @return [Boolean] True iff message has this field set - # @raise [TypeError] If this field does not exist on the message - # @raise [ArgumentError] If this field does not track presence - def has?(msg) - if msg.class.descriptor != Google::Protobuf::FFI.get_containing_message_def(self) - raise TypeError.new "has method called on wrong message type" - end - unless has_presence? - raise ArgumentError.new "does not track presence" - end - - Google::Protobuf::FFI.get_message_has msg.instance_variable_get(:@msg), self - end - - ## - # Tests if this field tracks presence. - # - # @return [Boolean] True iff this field tracks presence - def has_presence? - @has_presence ||= Google::Protobuf::FFI.get_has_presence(self) - end - - ## - # Tests if this is a repeated field that uses packed encoding. - # - # @return [Boolean] True iff this field is packed - def is_packed? - @is_packed ||= Google::Protobuf::FFI.get_is_packed(self) - end - - # @param msg [Google::Protobuf::Message] - def clear(msg) - if msg.class.descriptor != Google::Protobuf::FFI.get_containing_message_def(self) - raise TypeError.new "clear method called on wrong message type" - end - Google::Protobuf::FFI.clear_message_field msg.instance_variable_get(:@msg), self - nil - end - - ## - # call-seq: - # FieldDescriptor.set(message, value) - # - # Sets the value corresponding to this field to the given value on the given - # message. Raises an exception if message is of the wrong type. Performs the - # ordinary type-checks for field setting. - # - # @param msg [Google::Protobuf::Message] - # @param value [Object] - def set(msg, value) - if msg.class.descriptor != Google::Protobuf::FFI.get_containing_message_def(self) - raise TypeError.new "set method called on wrong message type" - end - unless set_value_on_message value, msg.instance_variable_get(:@msg), msg.instance_variable_get(:@arena) - raise RuntimeError.new "allocation failed" - end - nil - end - - def map? - @map ||= Google::Protobuf::FFI.is_map self - end - - def required? - @required ||= Google::Protobuf::FFI.is_required self - end - - def repeated? - @repeated ||= Google::Protobuf::FFI.is_repeated self - end - - def sub_message? - @sub_message ||= Google::Protobuf::FFI.is_sub_message self - end - - def wrapper? - if defined? @wrapper - @wrapper - else - message_descriptor = Google::Protobuf::FFI.get_subtype_as_message(self) - @wrapper = message_descriptor.nil? ? false : message_descriptor.send(:wrapper?) - end - end - - def options - @options ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.field_options(self, size_ptr, temporary_arena) - opts = Google::Protobuf::FieldOptions.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - opts.clear_features() - opts.freeze - end - end - - def to_proto - @to_proto ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.field_to_proto(self, size_ptr, temporary_arena) - Google::Protobuf::FieldDescriptorProto.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - end - end - - private - - def initialize(field_def, descriptor_pool) - @field_def = field_def - @descriptor_pool = descriptor_pool - end - - def self.private_constructor(field_def, descriptor_pool) - instance = allocate - instance.send(:initialize, field_def, descriptor_pool) - instance - end - - # TODO Can this be added to the public API? - def real_containing_oneof - @real_containing_oneof ||= Google::Protobuf::FFI.real_containing_oneof self - end - - # Implementation details below are subject to breaking changes without - # warning and are intended for use only within the gem. - - ## - # Sets the field this FieldDescriptor represents to the given value on the given message. - # @param value [Object] Value to be set - # @param msg [::FFI::Pointer] Pointer the the upb_Message - # @param arena [Arena] Arena of the message that owns msg - def set_value_on_message(value, msg, arena, wrap: false) - message_to_alter = msg - field_def_to_set = self - if map? - raise TypeError.new "Expected map" unless value.is_a? Google::Protobuf::Map - message_descriptor = subtype - - key_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 1) - key_field_type = Google::Protobuf::FFI.get_type(key_field_def) - raise TypeError.new "Map key type does not match field's key type" unless key_field_type == value.send(:key_type) - - value_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 2) - value_field_type = Google::Protobuf::FFI.get_type(value_field_def) - raise TypeError.new "Map value type does not match field's value type" unless value_field_type == value.send(:value_type) - - raise TypeError.new "Map value type has wrong message/enum class" unless value_field_def.subtype == value.send(:descriptor) - - arena.fuse(value.send(:arena)) - message_value = Google::Protobuf::FFI::MessageValue.new - message_value[:map_val] = value.send(:map_ptr) - elsif repeated? - raise TypeError.new "Expected repeated field array" unless value.is_a? RepeatedField - raise TypeError.new "Repeated field array has wrong message/enum class" unless value.send(:type) == type - arena.fuse(value.send(:arena)) - message_value = Google::Protobuf::FFI::MessageValue.new - message_value[:array_val] = value.send(:array) - else - if value.nil? and (sub_message? or !real_containing_oneof.nil?) - Google::Protobuf::FFI.clear_message_field message_to_alter, field_def_to_set - return true - end - if wrap - value_field_def = Google::Protobuf::FFI.get_field_by_number subtype, 1 - type_for_conversion = Google::Protobuf::FFI.get_c_type(value_field_def) - raise RuntimeError.new "Not expecting to get a msg or enum when unwrapping" if [:enum, :message].include? type_for_conversion - message_value = convert_ruby_to_upb(value, arena, type_for_conversion, nil) - message_to_alter = Google::Protobuf::FFI.get_mutable_message(msg, self, arena)[:msg] - field_def_to_set = value_field_def - else - message_value = convert_ruby_to_upb(value, arena, c_type, subtype) - end - end - Google::Protobuf::FFI.set_message_field message_to_alter, field_def_to_set, message_value, arena - end - - def c_type - @c_type ||= Google::Protobuf::FFI.get_c_type(self) - end - end - - class FFI - # MessageDef - attach_function :get_field_by_index, :upb_MessageDef_Field, [Descriptor, :int], FieldDescriptor - attach_function :get_field_by_name, :upb_MessageDef_FindFieldByNameWithSize,[Descriptor, :string, :size_t], FieldDescriptor - attach_function :get_field_by_number, :upb_MessageDef_FindFieldByNumber, [Descriptor, :uint32_t], FieldDescriptor - - # FieldDescriptor - attach_function :field_options, :FieldDescriptor_serialized_options, [FieldDescriptor, :pointer, Internal::Arena], :pointer - attach_function :get_containing_message_def, :upb_FieldDef_ContainingType, [FieldDescriptor], Descriptor - attach_function :get_c_type, :upb_FieldDef_CType, [FieldDescriptor], CType - attach_function :get_default, :upb_FieldDef_Default, [FieldDescriptor], MessageValue.by_value - attach_function :get_subtype_as_enum, :upb_FieldDef_EnumSubDef, [FieldDescriptor], EnumDescriptor - attach_function :get_has_presence, :upb_FieldDef_HasPresence, [FieldDescriptor], :bool - attach_function :get_is_packed, :upb_FieldDef_IsPacked, [FieldDescriptor], :bool - attach_function :is_map, :upb_FieldDef_IsMap, [FieldDescriptor], :bool - attach_function :is_required, :upb_FieldDef_IsRequired, [FieldDescriptor], :bool - attach_function :is_repeated, :upb_FieldDef_IsRepeated, [FieldDescriptor], :bool - attach_function :is_sub_message, :upb_FieldDef_IsSubMessage, [FieldDescriptor], :bool - attach_function :get_json_name, :upb_FieldDef_JsonName, [FieldDescriptor], :string - attach_function :get_label, :upb_FieldDef_Label, [FieldDescriptor], Label - attach_function :get_subtype_as_message, :upb_FieldDef_MessageSubDef, [FieldDescriptor], Descriptor - attach_function :get_full_name, :upb_FieldDef_Name, [FieldDescriptor], :string - attach_function :get_number, :upb_FieldDef_Number, [FieldDescriptor], :uint32_t - attach_function :get_type, :upb_FieldDef_Type, [FieldDescriptor], FieldType - attach_function :file_def_by_raw_field_def, :upb_FieldDef_File, [:pointer], :FileDef - attach_function :field_to_proto, :FieldDescriptor_serialized_to_proto,[FieldDescriptor, :pointer, Internal::Arena], :pointer - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/file_descriptor.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/file_descriptor.rb deleted file mode 100644 index 72e6a0c7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/file_descriptor.rb +++ /dev/null @@ -1,85 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class FFI - # FileDescriptor - attach_function :file_def_name, :upb_FileDef_Name, [:FileDef], :string - attach_function :file_def_pool, :upb_FileDef_Pool, [:FileDef], :DefPool - attach_function :file_options, :FileDescriptor_serialized_options, [:FileDef, :pointer, Internal::Arena], :pointer - attach_function :file_to_proto, :FileDescriptor_serialized_to_proto, [:FileDef, :pointer, Internal::Arena], :pointer - end - - class FileDescriptor - attr :descriptor_pool, :file_def - - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - include Google::Protobuf::Internal::PointerHelper - - # @param value [FileDescriptor] FileDescriptor to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _) - file_def_ptr = value.nil? ? nil : value.instance_variable_get(:@file_def) - return ::FFI::Pointer::NULL if file_def_ptr.nil? - raise "Underlying file_def was null!" if file_def_ptr.null? - file_def_ptr - end - - ## - # @param file_def [::FFI::Pointer] FileDef pointer to be wrapped - # @param _ [Object] Unused - def from_native(file_def, _ = nil) - return nil if file_def.nil? or file_def.null? - descriptor_from_file_def(file_def) - end - end - - def initialize(file_def, descriptor_pool) - @descriptor_pool = descriptor_pool - @file_def = file_def - end - - def to_s - inspect - end - - def inspect - "#{self.class.name}: #{name}" - end - - def name - Google::Protobuf::FFI.file_def_name(@file_def) - end - - def options - @options ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.file_options(@file_def, size_ptr, temporary_arena) - opts = Google::Protobuf::FileOptions.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - opts.clear_features() - opts.freeze - end - end - - def to_proto - @to_proto ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.file_to_proto(@file_def, size_ptr, temporary_arena) - Google::Protobuf::FileDescriptorProto.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/arena.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/arena.rb deleted file mode 100644 index da3b2c42..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/arena.rb +++ /dev/null @@ -1,60 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -## -# Implementation details below are subject to breaking changes without -# warning and are intended for use only within the gem. -module Google - module Protobuf - module Internal - class Arena - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - - # @param value [Arena] Arena to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _) - value.instance_variable_get(:@arena) || ::FFI::Pointer::NULL - end - - ## - # @param value [::FFI::Pointer] Arena pointer to be wrapped - # @param _ [Object] Unused - def from_native(value, _) - new(value) - end - end - - def initialize(pointer) - @arena = ::FFI::AutoPointer.new(pointer, Google::Protobuf::FFI.method(:free_arena)) - @pinned_messages = [] - end - - def fuse(other_arena) - return if other_arena == self - unless Google::Protobuf::FFI.fuse_arena(self, other_arena) - raise RuntimeError.new "Unable to fuse arenas. This should never happen since Ruby does not use initial blocks" - end - end - end - end - - class FFI - # Arena - attach_function :create_arena, :Arena_create, [], Internal::Arena - attach_function :fuse_arena, :upb_Arena_Fuse, [Internal::Arena, Internal::Arena], :bool - # Argument takes a :pointer rather than a typed Arena here due to - # implementation details of FFI::AutoPointer. - attach_function :free_arena, :upb_Arena_Free, [:pointer], :void - attach_function :arena_malloc, :upb_Arena_Malloc, [Internal::Arena, :size_t], :pointer - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/convert.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/convert.rb deleted file mode 100644 index 649b90ad..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/convert.rb +++ /dev/null @@ -1,292 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -## -# Implementation details below are subject to breaking changes without -# warning and are intended for use only within the gem. -module Google - module Protobuf - module Internal - module Convert - - # Arena should be the - # @param value [Object] Value to convert - # @param arena [Arena] Arena that owns the Message where the MessageValue - # will be set - # @return [Google::Protobuf::FFI::MessageValue] - def convert_ruby_to_upb(value, arena, c_type, msg_or_enum_def) - raise ArgumentError.new "Expected Descriptor or EnumDescriptor, instead got #{msg_or_enum_def.class}" unless [NilClass, Descriptor, EnumDescriptor].include? msg_or_enum_def.class - return_value = Google::Protobuf::FFI::MessageValue.new - case c_type - when :float - raise TypeError.new "Expected number type for float field '#{name}' (given #{value.class})." unless value.respond_to? :to_f - return_value[:float_val] = value.to_f - when :double - raise TypeError.new "Expected number type for double field '#{name}' (given #{value.class})." unless value.respond_to? :to_f - return_value[:double_val] = value.to_f - when :bool - raise TypeError.new "Invalid argument for boolean field '#{name}' (given #{value.class})." unless [TrueClass, FalseClass].include? value.class - return_value[:bool_val] = value - when :string - raise TypeError.new "Invalid argument for string field '#{name}' (given #{value.class})." unless value.is_a?(String) or value.is_a?(Symbol) - value = value.to_s if value.is_a?(Symbol) - if value.encoding == Encoding::UTF_8 - unless value.valid_encoding? - raise Encoding::InvalidByteSequenceError.new "String is invalid UTF-8" - end - string_value = value - else - string_value = value.to_s.encode("UTF-8") - end - return_value[:str_val][:size] = string_value.bytesize - return_value[:str_val][:data] = Google::Protobuf::FFI.arena_malloc(arena, string_value.bytesize) - # TODO - how important is it to still use arena malloc, versus the following? - # buffer = ::FFI::MemoryPointer.new(:char, string_value.bytesize) - # buffer.put_bytes(0, string_value) - # return_value[:str_val][:data] = buffer - raise NoMemoryError.new "Cannot allocate #{string_value.bytesize} bytes for string on Arena" if return_value[:str_val][:data].nil? || return_value[:str_val][:data].null? - return_value[:str_val][:data].write_string(string_value) - when :bytes - raise TypeError.new "Invalid argument for bytes field '#{name}' (given #{value.class})." unless value.is_a? String - string_value = value.encode("ASCII-8BIT") - return_value[:str_val][:size] = string_value.bytesize - return_value[:str_val][:data] = Google::Protobuf::FFI.arena_malloc(arena, string_value.bytesize) - raise NoMemoryError.new "Cannot allocate #{string_value.bytesize} bytes for bytes on Arena" if return_value[:str_val][:data].nil? || return_value[:str_val][:data].null? - return_value[:str_val][:data].write_string_length(string_value, string_value.bytesize) - when :message - raise TypeError.new "nil message not allowed here." if value.nil? - if value.is_a? Hash - raise RuntimeError.new "Attempted to initialize message from Hash for field #{name} but have no definition" if msg_or_enum_def.nil? - new_message = msg_or_enum_def.msgclass. - send(:private_constructor, arena, initial_value: value) - return_value[:msg_val] = new_message.instance_variable_get(:@msg) - return return_value - end - - descriptor = value.class.respond_to?(:descriptor) ? value.class.descriptor : nil - if descriptor != msg_or_enum_def - wkt = Google::Protobuf::FFI.get_well_known_type(msg_or_enum_def) - case wkt - when :Timestamp - raise TypeError.new "Invalid type #{value.class} to assign to submessage field '#{name}'." unless value.kind_of? Time - new_message = Google::Protobuf::FFI.new_message_from_def Google::Protobuf::FFI.get_mini_table(msg_or_enum_def), arena - sec = Google::Protobuf::FFI::MessageValue.new - sec[:int64_val] = value.tv_sec - sec_field_def = Google::Protobuf::FFI.get_field_by_number msg_or_enum_def, 1 - raise "Should be impossible" unless Google::Protobuf::FFI.set_message_field new_message, sec_field_def, sec, arena - nsec_field_def = Google::Protobuf::FFI.get_field_by_number msg_or_enum_def, 2 - nsec = Google::Protobuf::FFI::MessageValue.new - nsec[:int32_val] = value.tv_nsec - raise "Should be impossible" unless Google::Protobuf::FFI.set_message_field new_message, nsec_field_def, nsec, arena - return_value[:msg_val] = new_message - when :Duration - raise TypeError.new "Invalid type #{value.class} to assign to submessage field '#{name}'." unless value.kind_of? Numeric - new_message = Google::Protobuf::FFI.new_message_from_def Google::Protobuf::FFI.get_mini_table(msg_or_enum_def), arena - sec = Google::Protobuf::FFI::MessageValue.new - sec[:int64_val] = value - sec_field_def = Google::Protobuf::FFI.get_field_by_number msg_or_enum_def, 1 - raise "Should be impossible" unless Google::Protobuf::FFI.set_message_field new_message, sec_field_def, sec, arena - nsec_field_def = Google::Protobuf::FFI.get_field_by_number msg_or_enum_def, 2 - nsec = Google::Protobuf::FFI::MessageValue.new - nsec[:int32_val] = ((value.to_f - value.to_i) * 1000000000).round - raise "Should be impossible" unless Google::Protobuf::FFI.set_message_field new_message, nsec_field_def, nsec, arena - return_value[:msg_val] = new_message - else - raise TypeError.new "Invalid type #{value.class} to assign to submessage field '#{name}'." - end - else - arena.fuse(value.instance_variable_get(:@arena)) - return_value[:msg_val] = value.instance_variable_get :@msg - end - when :enum - return_value[:int32_val] = case value - when Numeric - value.to_i - when String, Symbol - enum_number = EnumDescriptor.send(:lookup_name, msg_or_enum_def, value.to_s) - #TODO add the bad value to the error message after tests pass - raise RangeError.new "Unknown symbol value for enum field '#{name}'." if enum_number.nil? - enum_number - else - raise TypeError.new "Expected number or symbol type for enum field '#{name}'." - end - #TODO After all tests pass, improve error message across integer type by including actual offending value - when :int32 - raise TypeError.new "Expected number type for integral field '#{name}' (given #{value.class})." unless value.is_a? Numeric - raise RangeError.new "Non-integral floating point value assigned to integer field '#{name}' (given #{value.class})." if value.floor != value - raise RangeError.new "Value assigned to int32 field '#{name}' (given #{value.class}) with more than 32-bits." unless value.to_i.bit_length < 32 - return_value[:int32_val] = value.to_i - when :uint32 - raise TypeError.new "Expected number type for integral field '#{name}' (given #{value.class})." unless value.is_a? Numeric - raise RangeError.new "Non-integral floating point value assigned to integer field '#{name}' (given #{value.class})." if value.floor != value - raise RangeError.new "Assigning negative value to unsigned integer field '#{name}' (given #{value.class})." if value < 0 - raise RangeError.new "Value assigned to uint32 field '#{name}' (given #{value.class}) with more than 32-bits." unless value.to_i.bit_length < 33 - return_value[:uint32_val] = value.to_i - when :int64 - raise TypeError.new "Expected number type for integral field '#{name}' (given #{value.class})." unless value.is_a? Numeric - raise RangeError.new "Non-integral floating point value assigned to integer field '#{name}' (given #{value.class})." if value.floor != value - raise RangeError.new "Value assigned to int64 field '#{name}' (given #{value.class}) with more than 64-bits." unless value.to_i.bit_length < 64 - return_value[:int64_val] = value.to_i - when :uint64 - raise TypeError.new "Expected number type for integral field '#{name}' (given #{value.class})." unless value.is_a? Numeric - raise RangeError.new "Non-integral floating point value assigned to integer field '#{name}' (given #{value.class})." if value.floor != value - raise RangeError.new "Assigning negative value to unsigned integer field '#{name}' (given #{value.class})." if value < 0 - raise RangeError.new "Value assigned to uint64 field '#{name}' (given #{value.class}) with more than 64-bits." unless value.to_i.bit_length < 65 - return_value[:uint64_val] = value.to_i - else - raise RuntimeError.new "Unsupported type #{c_type}" - end - return_value - end - - ## - # Safe to call without an arena if the caller has checked that c_type - # is not :message. - # @param message_value [Google::Protobuf::FFI::MessageValue] Value to be converted. - # @param c_type [Google::Protobuf::FFI::CType] Enum representing the type of message_value - # @param msg_or_enum_def [::FFI::Pointer] Pointer to the MsgDef or EnumDef definition - # @param arena [Google::Protobuf::Internal::Arena] Arena to create Message instances, if needed - def convert_upb_to_ruby(message_value, c_type, msg_or_enum_def = nil, arena = nil) - throw TypeError.new "Expected MessageValue but got #{message_value.class}" unless message_value.is_a? Google::Protobuf::FFI::MessageValue - - case c_type - when :bool - message_value[:bool_val] - when :int32 - message_value[:int32_val] - when :uint32 - message_value[:uint32_val] - when :double - message_value[:double_val] - when :int64 - message_value[:int64_val] - when :uint64 - message_value[:uint64_val] - when :string - if message_value[:str_val][:size].zero? - "" - else - message_value[:str_val][:data].read_string_length(message_value[:str_val][:size]).force_encoding("UTF-8").freeze - end - when :bytes - if message_value[:str_val][:size].zero? - "" - else - message_value[:str_val][:data].read_string_length(message_value[:str_val][:size]).force_encoding("ASCII-8BIT").freeze - end - when :float - message_value[:float_val] - when :enum - EnumDescriptor.send(:lookup_value, msg_or_enum_def, message_value[:int32_val]) || message_value[:int32_val] - when :message - raise "Null Arena for message" if arena.nil? - Descriptor.send(:get_message, message_value[:msg_val], msg_or_enum_def, arena) - else - raise RuntimeError.new "Unexpected type #{c_type}" - end - end - - def to_h_internal(msg, message_descriptor) - return nil if msg.nil? or msg.null? - hash = {} - iter = ::FFI::MemoryPointer.new(:size_t, 1) - iter.write(:size_t, Google::Protobuf::FFI::Upb_Message_Begin) - message_value = Google::Protobuf::FFI::MessageValue.new - field_def_ptr = ::FFI::MemoryPointer.new :pointer - - while Google::Protobuf::FFI::message_next(msg, message_descriptor, nil, field_def_ptr, message_value, iter) do - field_descriptor = FieldDescriptor.from_native field_def_ptr.get_pointer(0) - - if field_descriptor.map? - hash_entry = map_create_hash(message_value[:map_val], field_descriptor) - elsif field_descriptor.repeated? - hash_entry = repeated_field_create_array(message_value[:array_val], field_descriptor, field_descriptor.type) - else - hash_entry = scalar_create_hash(message_value, field_descriptor.type, field_descriptor: field_descriptor) - end - - hash[field_descriptor.name.to_sym] = hash_entry - end - - hash - end - - def map_create_hash(map_ptr, field_descriptor) - return {} if map_ptr.nil? or map_ptr.null? - return_value = {} - - message_descriptor = field_descriptor.send(:subtype) - key_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 1) - key_field_type = Google::Protobuf::FFI.get_type(key_field_def) - - value_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 2) - value_field_type = Google::Protobuf::FFI.get_type(value_field_def) - - iter = ::FFI::MemoryPointer.new(:size_t, 1) - iter.write(:size_t, Google::Protobuf::FFI::Upb_Map_Begin) - while Google::Protobuf::FFI.map_next(map_ptr, iter) do - iter_size_t = iter.read(:size_t) - key_message_value = Google::Protobuf::FFI.map_key(map_ptr, iter_size_t) - value_message_value = Google::Protobuf::FFI.map_value(map_ptr, iter_size_t) - hash_key = convert_upb_to_ruby(key_message_value, key_field_type) - hash_value = scalar_create_hash(value_message_value, value_field_type, msg_or_enum_descriptor: value_field_def.subtype) - return_value[hash_key] = hash_value - end - return_value - end - - def repeated_field_create_array(array, field_descriptor, type) - return_value = [] - n = (array.nil? || array.null?) ? 0 : Google::Protobuf::FFI.array_size(array) - 0.upto(n - 1) do |i| - message_value = Google::Protobuf::FFI.get_msgval_at(array, i) - return_value << scalar_create_hash(message_value, type, field_descriptor: field_descriptor) - end - return_value - end - - # @param field_descriptor [FieldDescriptor] Descriptor of the field to convert to a hash. - def scalar_create_hash(message_value, type, field_descriptor: nil, msg_or_enum_descriptor: nil) - if [:message, :enum].include? type - if field_descriptor.nil? - if msg_or_enum_descriptor.nil? - raise "scalar_create_hash requires either a FieldDescriptor, MessageDescriptor, or EnumDescriptor as an argument, but received only nil" - end - else - msg_or_enum_descriptor = field_descriptor.subtype - end - if type == :message - to_h_internal(message_value[:msg_val], msg_or_enum_descriptor) - elsif type == :enum - convert_upb_to_ruby message_value, type, msg_or_enum_descriptor - end - else - convert_upb_to_ruby message_value, type - end - end - - def message_value_deep_copy(message_value, type, descriptor, arena) - raise unless message_value.is_a? Google::Protobuf::FFI::MessageValue - new_message_value = Google::Protobuf::FFI::MessageValue.new - case type - when :string, :bytes - # TODO - how important is it to still use arena malloc, versus using FFI MemoryPointers? - new_message_value[:str_val][:size] = message_value[:str_val][:size] - new_message_value[:str_val][:data] = Google::Protobuf::FFI.arena_malloc(arena, message_value[:str_val][:size]) - raise NoMemoryError.new "Allocation failed" if new_message_value[:str_val][:data].nil? or new_message_value[:str_val][:data].null? - Google::Protobuf::FFI.memcpy(new_message_value[:str_val][:data], message_value[:str_val][:data], message_value[:str_val][:size]) - when :message - new_message_value[:msg_val] = descriptor.msgclass.send(:deep_copy, message_value[:msg_val], arena).instance_variable_get(:@msg) - else - Google::Protobuf::FFI.memcpy(new_message_value.to_ptr, message_value.to_ptr, Google::Protobuf::FFI::MessageValue.size) - end - new_message_value - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/pointer_helper.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/pointer_helper.rb deleted file mode 100644 index fdf4df37..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/pointer_helper.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2023 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - module Internal - module PointerHelper - # Utility code to defensively walk the object graph from a file_def to - # the pool, and either retrieve the wrapper object for the given pointer - # or create one. Assumes that the caller is the wrapper class for the - # given pointer and that it implements `private_constructor`. - def descriptor_from_file_def(file_def, pointer = nil) - pointer = file_def if pointer.nil? - raise RuntimeError.new "FileDef is nil" if file_def.nil? - raise RuntimeError.new "FileDef is null" if file_def.null? - pool_def = Google::Protobuf::FFI.file_def_pool file_def - raise RuntimeError.new "PoolDef is nil" if pool_def.nil? - raise RuntimeError.new "PoolDef is null" if pool_def.null? - pool = Google::Protobuf::OBJECT_CACHE.get(pool_def.address) - raise "Cannot find pool in ObjectCache!" if pool.nil? - descriptor = pool.descriptor_class_by_def[pointer.address] - if descriptor.nil? - pool.descriptor_class_by_def[pointer.address] = private_constructor(pointer, pool) - else - descriptor - end - end - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/type_safety.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/type_safety.rb deleted file mode 100644 index 6cdb3e99..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/internal/type_safety.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -# A to_native DataConverter method that raises an error if the value is not of the same type. -# Adapted from to https://www.varvet.com/blog/advanced-topics-in-ruby-ffi/ -module Google - module Protobuf - module Internal - module TypeSafety - def to_native(value, ctx = nil) - if value.kind_of?(self) or value.nil? - super - else - raise TypeError.new "Expected a kind of #{name}, was #{value.class}" - end - end - end - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/map.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/map.rb deleted file mode 100644 index fc806094..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/map.rb +++ /dev/null @@ -1,433 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class FFI - # Map - attach_function :map_clear, :upb_Map_Clear, [:Map], :void - attach_function :map_delete, :upb_Map_Delete, [:Map, MessageValue.by_value, MessageValue.by_ref], :bool - attach_function :map_get, :upb_Map_Get, [:Map, MessageValue.by_value, MessageValue.by_ref], :bool - attach_function :create_map, :upb_Map_New, [Internal::Arena, CType, CType], :Map - attach_function :map_size, :upb_Map_Size, [:Map], :size_t - attach_function :map_set, :upb_Map_Set, [:Map, MessageValue.by_value, MessageValue.by_value, Internal::Arena], :bool - attach_function :map_freeze, :upb_Map_Freeze, [:Map, MiniTable.by_ref], :void - attach_function :map_frozen?, :upb_Map_IsFrozen, [:Map], :bool - - # MapIterator - attach_function :map_next, :upb_MapIterator_Next, [:Map, :pointer], :bool - attach_function :map_done, :upb_MapIterator_Done, [:Map, :size_t], :bool - attach_function :map_key, :upb_MapIterator_Key, [:Map, :size_t], MessageValue.by_value - attach_function :map_value, :upb_MapIterator_Value, [:Map, :size_t], MessageValue.by_value - end - class Map - include Enumerable - ## - # call-seq: - # Map.new(key_type, value_type, value_typeclass = nil, init_hashmap = {}) - # => new map - # - # Allocates a new Map container. This constructor may be called with 2, 3, or 4 - # arguments. The first two arguments are always present and are symbols (taking - # on the same values as field-type symbols in message descriptors) that - # indicate the type of the map key and value fields. - # - # The supported key types are: :int32, :int64, :uint32, :uint64, :bool, - # :string, :bytes. - # - # The supported value types are: :int32, :int64, :uint32, :uint64, :bool, - # :string, :bytes, :enum, :message. - # - # The third argument, value_typeclass, must be present if value_type is :enum - # or :message. As in RepeatedField#new, this argument must be a message class - # (for :message) or enum module (for :enum). - # - # The last argument, if present, provides initial content for map. Note that - # this may be an ordinary Ruby hashmap or another Map instance with identical - # key and value types. Also note that this argument may be present whether or - # not value_typeclass is present (and it is unambiguously separate from - # value_typeclass because value_typeclass's presence is strictly determined by - # value_type). The contents of this initial hashmap or Map instance are - # shallow-copied into the new Map: the original map is unmodified, but - # references to underlying objects will be shared if the value type is a - # message type. - def self.new(key_type, value_type, value_typeclass = nil, init_hashmap = {}) - instance = allocate - # TODO This argument mangling doesn't agree with the type signature, - # but does align with the text of the comments and is required to make unit tests pass. - if init_hashmap.empty? and ![:enum, :message].include?(value_type) - init_hashmap = value_typeclass - value_typeclass = nil - end - instance.send(:initialize, key_type, value_type, value_type_class: value_typeclass, initial_values: init_hashmap) - instance - end - - ## - # call-seq: - # Map.keys => [list_of_keys] - # - # Returns the list of keys contained in the map, in unspecified order. - def keys - return_value = [] - internal_iterator do |iterator| - key_message_value = Google::Protobuf::FFI.map_key(@map_ptr, iterator) - return_value << convert_upb_to_ruby(key_message_value, key_type) - end - return_value - end - - ## - # call-seq: - # Map.values => [list_of_values] - # - # Returns the list of values contained in the map, in unspecified order. - def values - return_value = [] - internal_iterator do |iterator| - value_message_value = Google::Protobuf::FFI.map_value(@map_ptr, iterator) - return_value << convert_upb_to_ruby(value_message_value, value_type, descriptor, arena) - end - return_value - end - - ## - # call-seq: - # Map.[](key) => value - # - # Accesses the element at the given key. Throws an exception if the key type is - # incorrect. Returns nil when the key is not present in the map. - def [](key) - value = Google::Protobuf::FFI::MessageValue.new - key_message_value = convert_ruby_to_upb(key, arena, key_type, nil) - if Google::Protobuf::FFI.map_get(@map_ptr, key_message_value, value) - convert_upb_to_ruby(value, value_type, descriptor, arena) - end - end - - ## - # call-seq: - # Map.[]=(key, value) => value - # - # Inserts or overwrites the value at the given key with the given new value. - # Throws an exception if the key type is incorrect. Returns the new value that - # was just inserted. - def []=(key, value) - raise FrozenError.new "can't modify frozen #{self.class}" if frozen? - key_message_value = convert_ruby_to_upb(key, arena, key_type, nil) - value_message_value = convert_ruby_to_upb(value, arena, value_type, descriptor) - Google::Protobuf::FFI.map_set(@map_ptr, key_message_value, value_message_value, arena) - value - end - - def has_key?(key) - key_message_value = convert_ruby_to_upb(key, arena, key_type, nil) - Google::Protobuf::FFI.map_get(@map_ptr, key_message_value, nil) - end - - ## - # call-seq: - # Map.delete(key) => old_value - # - # Deletes the value at the given key, if any, returning either the old value or - # nil if none was present. Throws an exception if the key is of the wrong type. - def delete(key) - raise FrozenError.new "can't modify frozen #{self.class}" if frozen? - value = Google::Protobuf::FFI::MessageValue.new - key_message_value = convert_ruby_to_upb(key, arena, key_type, nil) - if Google::Protobuf::FFI.map_delete(@map_ptr, key_message_value, value) - convert_upb_to_ruby(value, value_type, descriptor, arena) - else - nil - end - end - - def clear - raise FrozenError.new "can't modify frozen #{self.class}" if frozen? - Google::Protobuf::FFI.map_clear(@map_ptr) - nil - end - - def length - Google::Protobuf::FFI.map_size(@map_ptr) - end - alias size length - - ## - # Is this object frozen? - # Returns true if either this Ruby wrapper or the underlying - # representation are frozen. Freezes the wrapper if the underlying - # representation is already frozen but this wrapper isn't. - def frozen? - unless Google::Protobuf::FFI.map_frozen? @map_ptr - raise RuntimeError.new "Ruby frozen Map with mutable representation" if super - return false - end - method(:freeze).super_method.call unless super - true - end - - ## - # Freezes the map object. We have to intercept this so we can freeze the - # underlying representation, not just the Ruby wrapper. Returns self. - def freeze - if method(:frozen?).super_method.call - unless Google::Protobuf::FFI.map_frozen? @map_ptr - raise RuntimeError.new "Underlying representation of map still mutable despite frozen wrapper" - end - return self - end - unless Google::Protobuf::FFI.map_frozen? @map_ptr - mini_table = (value_type == :message) ? Google::Protobuf::FFI.get_mini_table(@descriptor) : nil - Google::Protobuf::FFI.map_freeze(@map_ptr, mini_table) - end - super - end - - ## - # call-seq: - # Map.dup => new_map - # - # Duplicates this map with a shallow copy. References to all non-primitive - # element objects (e.g., submessages) are shared. - def dup - internal_dup - end - alias clone dup - - ## - # call-seq: - # Map.==(other) => boolean - # - # Compares this map to another. Maps are equal if they have identical key sets, - # and for each key, the values in both maps compare equal. Elements are - # compared as per normal Ruby semantics, by calling their :== methods (or - # performing a more efficient comparison for primitive types). - # - # Maps with dissimilar key types or value types/typeclasses are never equal, - # even if value comparison (for example, between integers and floats) would - # have otherwise indicated that every element has equal value. - def ==(other) - if other.is_a? Hash - other = self.class.send(:private_constructor, key_type, value_type, descriptor, initial_values: other) - elsif !other.is_a? Google::Protobuf::Map - return false - end - - return true if object_id == other.object_id - return false if key_type != other.send(:key_type) or value_type != other.send(:value_type) or descriptor != other.send(:descriptor) or length != other.length - other_map_ptr = other.send(:map_ptr) - each_msg_val do |key_message_value, value_message_value| - other_value = Google::Protobuf::FFI::MessageValue.new - return false unless Google::Protobuf::FFI.map_get(other_map_ptr, key_message_value, other_value) - return false unless Google::Protobuf::FFI.message_value_equal(value_message_value, other_value, value_type, descriptor) - end - true - end - - def hash - return_value = 0 - each_msg_val do |key_message_value, value_message_value| - return_value += Google::Protobuf::FFI.message_value_hash(key_message_value, key_type, nil, 0) - return_value += Google::Protobuf::FFI.message_value_hash(value_message_value, value_type, descriptor, 0) - end - return_value - end - - ## - # call-seq: - # Map.to_h => {} - # - # Returns a Ruby Hash object containing all the values within the map - def to_h - return {} if map_ptr.nil? or map_ptr.null? - return_value = {} - each_msg_val do |key_message_value, value_message_value| - hash_key = convert_upb_to_ruby(key_message_value, key_type) - hash_value = scalar_create_hash(value_message_value, value_type, msg_or_enum_descriptor: descriptor) - return_value[hash_key] = hash_value - end - return_value - end - - def inspect - key_value_pairs = [] - each_msg_val do |key_message_value, value_message_value| - key_string = convert_upb_to_ruby(key_message_value, key_type).inspect - if value_type == :message - sub_msg_descriptor = Google::Protobuf::FFI.get_subtype_as_message(descriptor) - value_string = sub_msg_descriptor.msgclass.send(:inspect_internal, value_message_value[:msg_val]) - else - value_string = convert_upb_to_ruby(value_message_value, value_type, descriptor).inspect - end - key_value_pairs << "#{key_string}=>#{value_string}" - end - "{#{key_value_pairs.join(", ")}}" - end - - ## - # call-seq: - # Map.merge(other_map) => map - # - # Copies key/value pairs from other_map into a copy of this map. If a key is - # set in other_map and this map, the value from other_map overwrites the value - # in the new copy of this map. Returns the new copy of this map with merged - # contents. - def merge(other) - internal_merge(other) - end - - ## - # call-seq: - # Map.each(&block) - # - # Invokes &block on each |key, value| pair in the map, in unspecified order. - # Note that Map also includes Enumerable; map thus acts like a normal Ruby - # sequence. - def each &block - each_msg_val do |key_message_value, value_message_value| - key_value = convert_upb_to_ruby(key_message_value, key_type) - value_value = convert_upb_to_ruby(value_message_value, value_type, descriptor, arena) - yield key_value, value_value - end - nil - end - - private - attr :arena, :map_ptr, :key_type, :value_type, :descriptor, :name - - include Google::Protobuf::Internal::Convert - - def internal_iterator - iter = ::FFI::MemoryPointer.new(:size_t, 1) - iter.write(:size_t, Google::Protobuf::FFI::Upb_Map_Begin) - while Google::Protobuf::FFI.map_next(@map_ptr, iter) do - iter_size_t = iter.read(:size_t) - yield iter_size_t - end - end - - def each_msg_val &block - internal_iterator do |iterator| - key_message_value = Google::Protobuf::FFI.map_key(@map_ptr, iterator) - value_message_value = Google::Protobuf::FFI.map_value(@map_ptr, iterator) - yield key_message_value, value_message_value - end - end - - def internal_dup - instance = self.class.send(:private_constructor, key_type, value_type, descriptor, arena: arena) - new_map_ptr = instance.send(:map_ptr) - each_msg_val do |key_message_value, value_message_value| - Google::Protobuf::FFI.map_set(new_map_ptr, key_message_value, value_message_value, arena) - end - instance - end - - def internal_merge_into_self(other) - case other - when Hash - other.each do |key, value| - key_message_value = convert_ruby_to_upb(key, arena, key_type, nil) - value_message_value = convert_ruby_to_upb(value, arena, value_type, descriptor) - Google::Protobuf::FFI.map_set(@map_ptr, key_message_value, value_message_value, arena) - end - when Google::Protobuf::Map - unless key_type == other.send(:key_type) and value_type == other.send(:value_type) and descriptor == other.descriptor - raise ArgumentError.new "Attempt to merge Map with mismatching types" #TODO Improve error message by adding type information - end - arena.fuse(other.send(:arena)) - iter = ::FFI::MemoryPointer.new(:size_t, 1) - iter.write(:size_t, Google::Protobuf::FFI::Upb_Map_Begin) - other.send(:each_msg_val) do |key_message_value, value_message_value| - Google::Protobuf::FFI.map_set(@map_ptr, key_message_value, value_message_value, arena) - end - else - raise ArgumentError.new "Unknown type merging into Map" #TODO improve this error message by including type information - end - self - end - - def internal_merge(other) - internal_dup.internal_merge_into_self(other) - end - - def initialize(key_type, value_type, value_type_class: nil, initial_values: nil, arena: nil, map: nil, descriptor: nil, name: nil) - @name = name || 'Map' - - unless [:int32, :int64, :uint32, :uint64, :bool, :string, :bytes].include? key_type - raise ArgumentError.new "Invalid key type for map." #TODO improve error message to include what type was passed - end - @key_type = key_type - - unless [:int32, :int64, :uint32, :uint64, :bool, :string, :bytes, :enum, :message].include? value_type - raise ArgumentError.new "Invalid value type for map." #TODO improve error message to include what type was passed - end - @value_type = value_type - - if !descriptor.nil? - raise ArgumentError "Expected descriptor to be a Descriptor or EnumDescriptor" unless [EnumDescriptor, Descriptor].include? descriptor.class - @descriptor = descriptor - elsif [:message, :enum].include? value_type - raise ArgumentError.new "Expected at least 3 arguments for message/enum." if value_type_class.nil? - descriptor = value_type_class.respond_to?(:descriptor) ? value_type_class.descriptor : nil - raise ArgumentError.new "Type class #{value_type_class} has no descriptor. Please pass a class or enum as returned by the DescriptorPool." if descriptor.nil? - @descriptor = descriptor - else - @descriptor = nil - end - - @arena = arena || Google::Protobuf::FFI.create_arena - @map_ptr = map || Google::Protobuf::FFI.create_map(@arena, @key_type, @value_type) - - internal_merge_into_self(initial_values) unless initial_values.nil? - - # Should always be the last expression of the initializer to avoid - # leaking references to this object before construction is complete. - OBJECT_CACHE.try_add(@map_ptr.address, self) - end - - ## - # Constructor that uses the type information from the given - # FieldDescriptor to configure the new Map instance. - # @param field [FieldDescriptor] Type information for the new Map - # @param arena [Arena] Owning message's arena - # @param value [Hash|Map] Initial value - # @param map [::FFI::Pointer] Existing upb_Map - def self.construct_for_field(field, arena: nil, value: nil, map: nil) - raise ArgumentError.new "Expected Hash object as initializer value for map field '#{field.name}' (given #{value.class})." unless value.nil? or value.is_a? Hash - instance = allocate - raise ArgumentError.new "Expected field with type :message, instead got #{field.class}" unless field.type == :message - message_descriptor = field.send(:subtype) - key_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 1) - key_field_type = Google::Protobuf::FFI.get_type(key_field_def) - - value_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 2) - value_field_type = Google::Protobuf::FFI.get_type(value_field_def) - instance.send(:initialize, key_field_type, value_field_type, initial_values: value, name: field.name, arena: arena, map: map, descriptor: value_field_def.subtype) - instance - end - - def self.private_constructor(key_type, value_type, descriptor, initial_values: nil, arena: nil) - instance = allocate - instance.send(:initialize, key_type, value_type, descriptor: descriptor, initial_values: initial_values, arena: arena) - instance - end - - extend Google::Protobuf::Internal::Convert - - def self.deep_copy(map) - instance = allocate - instance.send(:initialize, map.send(:key_type), map.send(:value_type), descriptor: map.send(:descriptor)) - map.send(:each_msg_val) do |key_message_value, value_message_value| - Google::Protobuf::FFI.map_set(instance.send(:map_ptr), key_message_value, message_value_deep_copy(value_message_value, map.send(:value_type), map.send(:descriptor), instance.send(:arena)), instance.send(:arena)) - end - instance - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/message.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/message.rb deleted file mode 100644 index 4a488130..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/message.rb +++ /dev/null @@ -1,783 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2023 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - - -# Decorates Descriptor with the `build_message_class` method that defines -# Message classes. -module Google - module Protobuf - class FFI - # Message - attach_function :clear_message_field, :upb_Message_ClearFieldByDef, [:Message, FieldDescriptor], :void - attach_function :get_message_value, :upb_Message_GetFieldByDef, [:Message, FieldDescriptor], MessageValue.by_value - attach_function :get_message_has, :upb_Message_HasFieldByDef, [:Message, FieldDescriptor], :bool - attach_function :set_message_field, :upb_Message_SetFieldByDef, [:Message, FieldDescriptor, MessageValue.by_value, Internal::Arena], :bool - attach_function :encode_message, :upb_Encode, [:Message, MiniTable.by_ref, :size_t, Internal::Arena, :pointer, :pointer], EncodeStatus - attach_function :json_decode_message_detecting_nonconformance, :upb_JsonDecodeDetectingNonconformance, [:binary_string, :size_t, :Message, Descriptor, :DefPool, :int, Internal::Arena, Status.by_ref], :int - attach_function :json_encode_message, :upb_JsonEncode, [:Message, Descriptor, :DefPool, :int, :binary_string, :size_t, Status.by_ref], :size_t - attach_function :decode_message, :upb_Decode, [:binary_string, :size_t, :Message, MiniTable.by_ref, :ExtensionRegistry, :int, Internal::Arena], DecodeStatus - attach_function :get_mutable_message, :upb_Message_Mutable, [:Message, FieldDescriptor, Internal::Arena], MutableMessageValue.by_value - attach_function :get_message_which_oneof, :upb_Message_WhichOneofByDef, [:Message, OneofDescriptor], FieldDescriptor - attach_function :message_discard_unknown, :upb_Message_DiscardUnknown, [:Message, Descriptor, :DefPool, :int], :bool - attach_function :message_next, :upb_Message_Next, [:Message, Descriptor, :DefPool, :FieldDefPointer, MessageValue.by_ref, :pointer], :bool - attach_function :message_freeze, :upb_Message_Freeze, [:Message, MiniTable.by_ref], :void - attach_function :message_frozen?, :upb_Message_IsFrozen, [:Message], :bool - - # MessageValue - attach_function :message_value_equal, :shared_Msgval_IsEqual, [MessageValue.by_value, MessageValue.by_value, CType, Descriptor], :bool - attach_function :message_value_hash, :shared_Msgval_GetHash, [MessageValue.by_value, CType, Descriptor, :uint64_t], :uint64_t - end - - class Descriptor - def build_message_class - descriptor = self - Class.new(Google::Protobuf::const_get(:AbstractMessage)) do - @descriptor = descriptor - class << self - attr_accessor :descriptor - private - attr_accessor :oneof_field_names - include ::Google::Protobuf::Internal::Convert - end - - alias original_method_missing method_missing - def method_missing(method_name, *args) - method_missing_internal method_name, *args, mode: :method_missing - end - - def respond_to_missing?(method_name, include_private = false) - method_missing_internal(method_name, mode: :respond_to_missing?) || super - end - - ## - # Public constructor. Automatically allocates from a new Arena. - def self.new(initial_value = nil) - instance = allocate - instance.send(:initialize, initial_value) - instance - end - - ## - # Is this object frozen? - # Returns true if either this Ruby wrapper or the underlying - # representation are frozen. Freezes the wrapper if the underlying - # representation is already frozen but this wrapper isn't. - def frozen? - unless Google::Protobuf::FFI.message_frozen? @msg - raise RuntimeError.new "Ruby frozen Message with mutable representation" if super - return false - end - method(:freeze).super_method.call unless super - true - end - - ## - # Freezes the map object. We have to intercept this so we can freeze the - # underlying representation, not just the Ruby wrapper. Returns self. - def freeze - if method(:frozen?).super_method.call - unless Google::Protobuf::FFI.message_frozen? @msg - raise RuntimeError.new "Underlying representation of message still mutable despite frozen wrapper" - end - return self - end - unless Google::Protobuf::FFI.message_frozen? @msg - Google::Protobuf::FFI.message_freeze(@msg, Google::Protobuf::FFI.get_mini_table(self.class.descriptor)) - end - super - end - - def dup - duplicate = self.class.private_constructor(@arena) - mini_table = Google::Protobuf::FFI.get_mini_table(self.class.descriptor) - size = mini_table[:size] - duplicate.instance_variable_get(:@msg).write_string_length(@msg.read_string_length(size), size) - duplicate - end - alias clone dup - - def eql?(other) - return false unless self.class === other - encoding_options = Google::Protobuf::FFI::Upb_Encode_Deterministic | Google::Protobuf::FFI::Upb_Encode_SkipUnknown - temporary_arena = Google::Protobuf::FFI.create_arena - mini_table = Google::Protobuf::FFI.get_mini_table(self.class.descriptor) - size_one = ::FFI::MemoryPointer.new(:size_t, 1) - encoding_one = ::FFI::MemoryPointer.new(:pointer, 1) - encoding_status = Google::Protobuf::FFI.encode_message(@msg, mini_table, encoding_options, temporary_arena, encoding_one.to_ptr, size_one) - raise ParseError.new "Error comparing messages due to #{encoding_status} while encoding LHS of `eql?()`" unless encoding_status == :Ok - - size_two = ::FFI::MemoryPointer.new(:size_t, 1) - encoding_two = ::FFI::MemoryPointer.new(:pointer, 1) - encoding_status = Google::Protobuf::FFI.encode_message(other.instance_variable_get(:@msg), mini_table, encoding_options, temporary_arena, encoding_two.to_ptr, size_two) - raise ParseError.new "Error comparing messages due to #{encoding_status} while encoding RHS of `eql?()`" unless encoding_status == :Ok - - if encoding_one.null? or encoding_two.null? - raise ParseError.new "Error comparing messages" - end - size_one.read(:size_t) == size_two.read(:size_t) and Google::Protobuf::FFI.memcmp(encoding_one.read(:pointer), encoding_two.read(:pointer), size_one.read(:size_t)).zero? - end - alias == eql? - - def hash - encoding_options = Google::Protobuf::FFI::Upb_Encode_Deterministic | Google::Protobuf::FFI::Upb_Encode_SkipUnknown - temporary_arena = Google::Protobuf::FFI.create_arena - mini_table_ptr = Google::Protobuf::FFI.get_mini_table(self.class.descriptor) - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - encoding = ::FFI::MemoryPointer.new(:pointer, 1) - encoding_status = Google::Protobuf::FFI.encode_message(@msg, mini_table_ptr, encoding_options, temporary_arena, encoding.to_ptr, size_ptr) - if encoding_status != :Ok or encoding.null? - raise ParseError.new "Error calculating hash" - end - encoding.read(:pointer).read_string(size_ptr.read(:size_t)).hash - end - - def to_h - to_h_internal @msg, self.class.descriptor - end - - ## - # call-seq: - # Message.inspect => string - # - # Returns a human-readable string representing this message. It will be - # formatted as "". Each - # field's value is represented according to its own #inspect method. - def inspect - self.class.inspect_internal @msg - end - - def to_s - self.inspect - end - - ## - # call-seq: - # Message.[](index) => value - # Accesses a field's value by field name. The provided field name - # should be a string. - def [](name) - raise TypeError.new "Expected String for name but got #{name.class}" unless name.is_a? String - index_internal name - end - - ## - # call-seq: - # Message.[]=(index, value) - # Sets a field's value by field name. The provided field name should - # be a string. - # @param name [String] Name of the field to be set - # @param value [Object] Value to set the field to - def []=(name, value) - raise TypeError.new "Expected String for name but got #{name.class}" unless name.is_a? String - index_assign_internal(value, name: name) - end - - ## - # call-seq: - # MessageClass.decode(data, options) => message - # - # Decodes the given data (as a string containing bytes in protocol buffers wire - # format) under the interpretation given by this message class's definition - # and returns a message object with the corresponding field values. - # @param data [String] Binary string in Protobuf wire format to decode - # @param options [Hash] options for the decoder - # @option options [Integer] :recursion_limit Set to maximum decoding depth for message (default is 64) - def self.decode(data, options = {}) - raise ArgumentError.new "Expected hash arguments." unless options.is_a? Hash - raise ArgumentError.new "Expected string for binary protobuf data." unless data.is_a? String - decoding_options = 0 - depth = options[:recursion_limit] - - if depth.is_a? Numeric - decoding_options |= Google::Protobuf::FFI.decode_max_depth(depth.to_i) - end - - message = new - mini_table_ptr = Google::Protobuf::FFI.get_mini_table(message.class.descriptor) - status = Google::Protobuf::FFI.decode_message( - data, - data.bytesize, - message.instance_variable_get(:@msg), - mini_table_ptr, - Google::Protobuf::FFI.get_extension_registry(message.class.descriptor.send(:pool).descriptor_pool), - decoding_options, - message.instance_variable_get(:@arena) - ) - raise ParseError.new "Error occurred during parsing" unless status == :Ok - message - end - - ## - # call-seq: - # MessageClass.encode(msg, options) => bytes - # - # Encodes the given message object to its serialized form in protocol buffers - # wire format. - # @param options [Hash] options for the encoder - # @option options [Integer] :recursion_limit Set to maximum encoding depth for message (default is 64) - def self.encode(message, options = {}) - raise ArgumentError.new "Message of wrong type." unless message.is_a? self - raise ArgumentError.new "Expected hash arguments." unless options.is_a? Hash - - encoding_options = 0 - depth = options[:recursion_limit] - - if depth.is_a? Numeric - encoding_options |= Google::Protobuf::FFI.decode_max_depth(depth.to_i) - end - - encode_internal(message.instance_variable_get(:@msg), encoding_options) do |encoding, size, _| - if encoding.nil? or encoding.null? - raise RuntimeError.new "Exceeded maximum depth (possibly cycle)" - else - encoding.read_string_length(size).force_encoding("ASCII-8BIT").freeze - end - end - end - - ## - # all-seq: - # MessageClass.decode_json(data, options = {}) => message - # - # Decodes the given data (as a string containing bytes in protocol buffers wire - # format) under the interpretation given by this message class's definition - # and returns a message object with the corresponding field values. - # - # @param options [Hash] options for the decoder - # @option options [Boolean] :ignore_unknown_fields Set true to ignore unknown fields (default is to raise an error) - # @return [Message] - def self.decode_json(data, options = {}) - decoding_options = 0 - unless options.is_a? Hash - if options.respond_to? :to_h - options options.to_h - else - #TODO can this error message be improve to include what was received? - raise ArgumentError.new "Expected hash arguments" - end - end - raise ArgumentError.new "Expected string for JSON data." unless data.is_a? String - raise RuntimeError.new "Cannot parse a wrapper directly" if descriptor.send(:wrapper?) - - if options[:ignore_unknown_fields] - decoding_options |= Google::Protobuf::FFI::Upb_JsonDecode_IgnoreUnknown - end - - message = new - pool_def = message.class.descriptor.instance_variable_get(:@descriptor_pool).descriptor_pool - status = Google::Protobuf::FFI::Status.new - result = Google::Protobuf::FFI.json_decode_message_detecting_nonconformance(data, data.bytesize, message.instance_variable_get(:@msg), message.class.descriptor, pool_def, decoding_options, message.instance_variable_get(:@arena), status) - case result - when Google::Protobuf::FFI::Upb_JsonDecodeResult_Error - raise ParseError.new "Error occurred during parsing: #{Google::Protobuf::FFI.error_message(status)}" - end - message - end - - def self.encode_json(message, options = {}) - encoding_options = 0 - unless options.is_a? Hash - if options.respond_to? :to_h - options = options.to_h - else - #TODO can this error message be improve to include what was received? - raise ArgumentError.new "Expected hash arguments" - end - end - - if options[:preserve_proto_fieldnames] - encoding_options |= Google::Protobuf::FFI::Upb_JsonEncode_UseProtoNames - end - if options[:emit_defaults] - encoding_options |= Google::Protobuf::FFI::Upb_JsonEncode_EmitDefaults - end - if options[:format_enums_as_integers] - encoding_options |= Google::Protobuf::FFI::Upb_JsonEncode_FormatEnumsAsIntegers - end - - buffer_size = 1024 - buffer = ::FFI::MemoryPointer.new(:char, buffer_size) - status = Google::Protobuf::FFI::Status.new - msg = message.instance_variable_get(:@msg) - pool_def = message.class.descriptor.instance_variable_get(:@descriptor_pool).descriptor_pool - size = Google::Protobuf::FFI::json_encode_message(msg, message.class.descriptor, pool_def, encoding_options, buffer, buffer_size, status) - unless status[:ok] - raise ParseError.new "Error occurred during encoding: #{Google::Protobuf::FFI.error_message(status)}" - end - - if size >= buffer_size - buffer_size = size + 1 - buffer = ::FFI::MemoryPointer.new(:char, buffer_size) - status.clear - size = Google::Protobuf::FFI::json_encode_message(msg, message.class.descriptor, pool_def, encoding_options, buffer, buffer_size, status) - unless status[:ok] - raise ParseError.new "Error occurred during encoding: #{Google::Protobuf::FFI.error_message(status)}" - end - if size >= buffer_size - raise ParseError.new "Inconsistent JSON encoding sizes - was #{buffer_size - 1}, now #{size}" - end - end - - buffer.read_string_length(size).force_encoding("UTF-8").freeze - end - - private - # Implementation details below are subject to breaking changes without - # warning and are intended for use only within the gem. - - include Google::Protobuf::Internal::Convert - - ## - # Checks ObjectCache for a sentinel empty frozen Map of the key and - # value types matching the field descriptor's MessageDef and returns - # the cache entry. If an entry is not found, one is created and added - # to the cache keyed by the MessageDef pointer first. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def empty_frozen_map(field_descriptor) - sub_message_def = Google::Protobuf::FFI.get_subtype_as_message field_descriptor - frozen_map = OBJECT_CACHE.get sub_message_def - if frozen_map.nil? - frozen_map = Google::Protobuf::Map.send(:construct_for_field, field_descriptor) - OBJECT_CACHE.try_add(sub_message_def, frozen_map.freeze) - end - raise "Empty Frozen Map is not frozen" unless frozen_map.frozen? - frozen_map - end - - ## - # Returns a frozen Map instance for the given field. If the message - # already has a value for that field, it is used. If not, a sentinel - # (per FieldDescriptor) empty frozen Map is returned instead. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def frozen_map_from_field_descriptor(field_descriptor) - message_value = Google::Protobuf::FFI.get_message_value @msg, field_descriptor - return empty_frozen_map field_descriptor if message_value[:map_val].null? - get_map_field(message_value[:map_val], field_descriptor).freeze - end - - ## - # Returns a Map instance for the given field. If the message is frozen - # the return value is also frozen. If not, a mutable instance is - # returned instead. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def map_from_field_descriptor(field_descriptor) - return frozen_map_from_field_descriptor field_descriptor if frozen? - mutable_message_value = Google::Protobuf::FFI.get_mutable_message @msg, field_descriptor, @arena - get_map_field(mutable_message_value[:map], field_descriptor) - end - - ## - # Checks ObjectCache for a sentinel empty frozen RepeatedField of the - # value type matching the field descriptor's MessageDef and returns - # the cache entry. If an entry is not found, one is created and added - # to the cache keyed by the MessageDef pointer first. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def empty_frozen_repeated_field(field_descriptor) - sub_message_def = Google::Protobuf::FFI.get_subtype_as_message field_descriptor - frozen_repeated_field = OBJECT_CACHE.get sub_message_def - if frozen_repeated_field.nil? - frozen_repeated_field = Google::Protobuf::RepeatedField.send(:construct_for_field, field_descriptor) - OBJECT_CACHE.try_add(sub_message_def, frozen_repeated_field.freeze) - end - raise "Empty frozen RepeatedField is not frozen" unless frozen_repeated_field.frozen? - frozen_repeated_field - end - - ## - # Returns a frozen RepeatedField instance for the given field. If the - # message already has a value for that field, it is used. If not, a - # sentinel (per FieldDescriptor) empty frozen RepeatedField is - # returned instead. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def frozen_repeated_field_from_field_descriptor(field_descriptor) - message_value = Google::Protobuf::FFI.get_message_value @msg, field_descriptor - return empty_frozen_repeated_field field_descriptor if message_value[:array_val].null? - get_repeated_field(message_value[:array_val], field_descriptor).freeze - end - - ## - # Returns a RepeatedField instance for the given field. If the message - # is frozen the return value is also frozen. If not, a mutable - # instance is returned instead. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def repeated_field_from_field_descriptor(field_descriptor) - return frozen_repeated_field_from_field_descriptor field_descriptor if frozen? - mutable_message_value = Google::Protobuf::FFI.get_mutable_message @msg, field_descriptor, @arena - get_repeated_field(mutable_message_value[:array], field_descriptor) - end - - ## - # Returns a Message instance for the given field. If the message - # is frozen nil is always returned. Otherwise, a mutable instance is - # returned instead. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def message_from_field_descriptor(field_descriptor) - return nil if frozen? - return nil unless Google::Protobuf::FFI.get_message_has @msg, field_descriptor - mutable_message = Google::Protobuf::FFI.get_mutable_message @msg, field_descriptor, @arena - sub_message = mutable_message[:msg] - sub_message_def = Google::Protobuf::FFI.get_subtype_as_message field_descriptor - Descriptor.send(:get_message, sub_message, sub_message_def, @arena) - end - - ## - # Returns a scalar value for the given field. If the message - # is frozen the return value is also frozen. - # @param field_descriptor [FieldDescriptor] Field to retrieve. - def scalar_from_field_descriptor(field_descriptor) - c_type = field_descriptor.send(:c_type) - message_value = Google::Protobuf::FFI.get_message_value @msg, field_descriptor - msg_or_enum_def = c_type == :enum ? Google::Protobuf::FFI.get_subtype_as_enum(field_descriptor) : nil - return_value = convert_upb_to_ruby message_value, c_type, msg_or_enum_def - frozen? ? return_value.freeze : return_value - end - - ## - # Dynamically define accessors methods for every field of @descriptor. - # Methods with names that conflict with existing methods are skipped. - def self.setup_accessors! - @descriptor.each do |field_descriptor| - field_name = field_descriptor.name - unless instance_methods(true).include?(field_name.to_sym) - # Dispatching to either index_internal or get_field is logically - # correct, but slightly slower due to having to perform extra - # lookups on each invocation rather than doing it once here. - if field_descriptor.map? - define_method(field_name) do - map_from_field_descriptor field_descriptor - end - elsif field_descriptor.repeated? - define_method(field_name) do - repeated_field_from_field_descriptor field_descriptor - end - elsif field_descriptor.sub_message? - define_method(field_name) do - message_from_field_descriptor field_descriptor - end - else - define_method(field_name) do - scalar_from_field_descriptor field_descriptor - end - end - define_method("#{field_name}=") do |value| - index_assign_internal(value, field_descriptor: field_descriptor) - end - define_method("clear_#{field_name}") do - clear_internal(field_descriptor) - end - if field_descriptor.type == :enum - if field_descriptor.repeated? - define_method("#{field_name}_const") do - return_value = [] - repeated_field_from_field_descriptor(field_descriptor).send(:each_msg_val) do |msg_val| - return_value << msg_val[:int32_val] - end - return_value - end - else - define_method("#{field_name}_const") do - message_value = Google::Protobuf::FFI.get_message_value @msg, field_descriptor - message_value[:int32_val] - end - end - end - if !field_descriptor.repeated? and field_descriptor.wrapper? - define_method("#{field_name}_as_value") do - get_field(field_descriptor, unwrap: true) - end - define_method("#{field_name}_as_value=") do |value| - if value.nil? - clear_internal(field_descriptor) - else - index_assign_internal(value, field_descriptor: field_descriptor, wrap: true) - end - end - end - if field_descriptor.has_presence? - define_method("has_#{field_name}?") do - Google::Protobuf::FFI.get_message_has(@msg, field_descriptor) - end - end - end - end - end - - ## - # Dynamically define accessors methods for every OneOf field of - # @descriptor. - def self.setup_oneof_accessors! - @oneof_field_names = [] - @descriptor.each_oneof do |oneof_descriptor| - self.add_oneof_accessors_for! oneof_descriptor - end - end - - ## - # Dynamically define accessors methods for the given OneOf field. - # Methods with names that conflict with existing methods are skipped. - # @param oneof_descriptor [OneofDescriptor] Field to create accessors - # for. - def self.add_oneof_accessors_for!(oneof_descriptor) - field_name = oneof_descriptor.name.to_sym - @oneof_field_names << field_name - unless instance_methods(true).include?(field_name) - define_method(field_name) do - field_descriptor = Google::Protobuf::FFI.get_message_which_oneof(@msg, oneof_descriptor) - if field_descriptor.nil? - return - else - return field_descriptor.name.to_sym - end - end - define_method("clear_#{field_name}") do - field_descriptor = Google::Protobuf::FFI.get_message_which_oneof(@msg, oneof_descriptor) - unless field_descriptor.nil? - clear_internal(field_descriptor) - end - end - define_method("has_#{field_name}?") do - !Google::Protobuf::FFI.get_message_which_oneof(@msg, oneof_descriptor).nil? - end - end - end - - setup_accessors! - setup_oneof_accessors! - - def self.private_constructor(arena, msg: nil, initial_value: nil) - instance = allocate - instance.send(:initialize, initial_value, arena, msg) - instance - end - - def self.inspect_field(field_descriptor, c_type, message_value) - if field_descriptor.sub_message? - sub_msg_descriptor = Google::Protobuf::FFI.get_subtype_as_message(field_descriptor) - sub_msg_descriptor.msgclass.send(:inspect_internal, message_value[:msg_val]) - else - convert_upb_to_ruby(message_value, c_type, field_descriptor.subtype).inspect - end - end - - # @param msg [::FFI::Pointer] Pointer to the Message - def self.inspect_internal(msg) - field_output = [] - descriptor.each do |field_descriptor| - next if field_descriptor.has_presence? && !Google::Protobuf::FFI.get_message_has(msg, field_descriptor) - if field_descriptor.map? - # TODO Adapted - from map#each_msg_val and map#inspect- can this be refactored to reduce echo without introducing a arena allocation? - message_descriptor = field_descriptor.subtype - key_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 1) - key_field_type = Google::Protobuf::FFI.get_type(key_field_def) - - value_field_def = Google::Protobuf::FFI.get_field_by_number(message_descriptor, 2) - value_field_type = Google::Protobuf::FFI.get_type(value_field_def) - - message_value = Google::Protobuf::FFI.get_message_value(msg, field_descriptor) - iter = ::FFI::MemoryPointer.new(:size_t, 1) - iter.write(:size_t, Google::Protobuf::FFI::Upb_Map_Begin) - key_value_pairs = [] - while Google::Protobuf::FFI.map_next(message_value[:map_val], iter) do - iter_size_t = iter.read(:size_t) - key_message_value = Google::Protobuf::FFI.map_key(message_value[:map_val], iter_size_t) - value_message_value = Google::Protobuf::FFI.map_value(message_value[:map_val], iter_size_t) - key_string = convert_upb_to_ruby(key_message_value, key_field_type).inspect - value_string = inspect_field(value_field_def, value_field_type, value_message_value) - key_value_pairs << "#{key_string}=>#{value_string}" - end - field_output << "#{field_descriptor.name}: {#{key_value_pairs.join(", ")}}" - elsif field_descriptor.repeated? - # TODO Adapted - from repeated_field#each - can this be refactored to reduce echo? - repeated_field_output = [] - message_value = Google::Protobuf::FFI.get_message_value(msg, field_descriptor) - array = message_value[:array_val] - n = array.null? ? 0 : Google::Protobuf::FFI.array_size(array) - 0.upto(n - 1) do |i| - element = Google::Protobuf::FFI.get_msgval_at(array, i) - repeated_field_output << inspect_field(field_descriptor, field_descriptor.send(:c_type), element) - end - field_output << "#{field_descriptor.name}: [#{repeated_field_output.join(", ")}]" - else - message_value = Google::Protobuf::FFI.get_message_value msg, field_descriptor - rendered_value = inspect_field(field_descriptor, field_descriptor.send(:c_type), message_value) - field_output << "#{field_descriptor.name}: #{rendered_value}" - end - end - "<#{name}: #{field_output.join(', ')}>" - end - - def self.deep_copy(msg, arena = nil) - arena ||= Google::Protobuf::FFI.create_arena - encode_internal(msg) do |encoding, size, mini_table_ptr| - message = private_constructor(arena) - if encoding.nil? or encoding.null? or Google::Protobuf::FFI.decode_message(encoding, size, message.instance_variable_get(:@msg), mini_table_ptr, nil, 0, arena) != :Ok - raise ParseError.new "Error occurred copying proto" - end - message - end - end - - def self.encode_internal(msg, encoding_options = 0) - temporary_arena = Google::Protobuf::FFI.create_arena - - mini_table_ptr = Google::Protobuf::FFI.get_mini_table(descriptor) - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - pointer_ptr = ::FFI::MemoryPointer.new(:pointer, 1) - encoding_status = Google::Protobuf::FFI.encode_message(msg, mini_table_ptr, encoding_options, temporary_arena, pointer_ptr.to_ptr, size_ptr) - raise "Encoding failed due to #{encoding_status}" unless encoding_status == :Ok - yield pointer_ptr.read(:pointer), size_ptr.read(:size_t), mini_table_ptr - end - - def method_missing_internal(method_name, *args, mode: nil) - raise ArgumentError.new "method_missing_internal called with invalid mode #{mode.inspect}" unless [:respond_to_missing?, :method_missing].include? mode - - #TODO not being allowed is not the same thing as not responding, but this is needed to pass tests - if method_name.to_s.end_with? '=' - if self.class.send(:oneof_field_names).include? method_name.to_s[0..-2].to_sym - return false if mode == :respond_to_missing? - raise RuntimeError.new "Oneof accessors are read-only." - end - end - - original_method_missing(method_name, *args) if mode == :method_missing - end - - def clear_internal(field_def) - raise FrozenError.new "can't modify frozen #{self.class}" if frozen? - Google::Protobuf::FFI.clear_message_field(@msg, field_def) - end - - # Accessor for field by name. Does not delegate to methods setup by - # self.setup_accessors! in order to avoid conflicts with bad field - # names e.g. `dup` or `class` which are perfectly valid for proto - # fields. - def index_internal(name) - field_descriptor = self.class.descriptor.lookup(name) - get_field field_descriptor unless field_descriptor.nil? - end - - #TODO - well known types keeps us on our toes by overloading methods. - # How much of the public API needs to be defended? - def index_assign_internal(value, name: nil, field_descriptor: nil, wrap: false) - raise FrozenError.new "can't modify frozen #{self.class}" if frozen? - if field_descriptor.nil? - field_descriptor = self.class.descriptor.lookup(name) - if field_descriptor.nil? - raise ArgumentError.new "Unknown field: #{name}" - end - end - unless field_descriptor.send :set_value_on_message, value, @msg, @arena, wrap: wrap - raise RuntimeError.new "allocation failed" - end - end - - ## - # @param initial_value [Object] initial value of this Message - # @param arena [Arena] Optional; Arena where this message will be allocated - # @param msg [::FFI::Pointer] Optional; Message to initialize; creates - # one if omitted or nil. - def initialize(initial_value = nil, arena = nil, msg = nil) - @arena = arena || Google::Protobuf::FFI.create_arena - @msg = msg || Google::Protobuf::FFI.new_message_from_def(Google::Protobuf::FFI.get_mini_table(self.class.descriptor), @arena) - - unless initial_value.nil? - raise ArgumentError.new "Expected hash arguments or message, not #{initial_value.class}" unless initial_value.respond_to? :each - - field_def_ptr = ::FFI::MemoryPointer.new :pointer - oneof_def_ptr = ::FFI::MemoryPointer.new :pointer - - initial_value.each do |key, value| - raise ArgumentError.new "Expected string or symbols as hash keys when initializing proto from hash." unless [String, Symbol].include? key.class - - unless Google::Protobuf::FFI.find_msg_def_by_name self.class.descriptor, key.to_s, key.to_s.bytesize, field_def_ptr, oneof_def_ptr - raise ArgumentError.new "Unknown field name '#{key}' in initialization map entry." - end - raise NotImplementedError.new "Haven't added oneofsupport yet" unless oneof_def_ptr.get_pointer(0).null? - raise NotImplementedError.new "Expected a field def" if field_def_ptr.get_pointer(0).null? - - field_descriptor = FieldDescriptor.from_native field_def_ptr.get_pointer(0) - - next if value.nil? - if field_descriptor.map? - index_assign_internal(Google::Protobuf::Map.send(:construct_for_field, field_descriptor, arena: @arena, value: value), name: key.to_s) - elsif field_descriptor.repeated? - index_assign_internal(RepeatedField.send(:construct_for_field, field_descriptor, arena: @arena, values: value), name: key.to_s) - else - index_assign_internal(value, name: key.to_s) - end - end - end - - # Should always be the last expression of the initializer to avoid - # leaking references to this object before construction is complete. - Google::Protobuf::OBJECT_CACHE.try_add @msg.address, self - end - - ## - # Gets a field of this message identified by FieldDescriptor. - # - # @param field [FieldDescriptor] Field to retrieve. - # @param unwrap [Boolean](false) If true, unwraps wrappers. - def get_field(field, unwrap: false) - if field.map? - map_from_field_descriptor field - elsif field.repeated? - repeated_field_from_field_descriptor field - elsif field.sub_message? - return nil unless Google::Protobuf::FFI.get_message_has @msg, field - if unwrap - if field.has?(self) - sub_message_def = Google::Protobuf::FFI.get_subtype_as_message field - wrapper_message_value = Google::Protobuf::FFI.get_message_value @msg, field - fields = Google::Protobuf::FFI.field_count(sub_message_def) - raise "Sub message has #{fields} fields! Expected exactly 1." unless fields == 1 - value_field_def = Google::Protobuf::FFI.get_field_by_number sub_message_def, 1 - message_value = Google::Protobuf::FFI.get_message_value wrapper_message_value[:msg_val], value_field_def - convert_upb_to_ruby message_value, Google::Protobuf::FFI.get_c_type(value_field_def) - else - nil - end - else - message_from_field_descriptor field - end - else - scalar_from_field_descriptor field - end - end - - ## - # Gets a RepeatedField from the ObjectCache or creates a new one. - # @param array [::FFI::Pointer] Pointer to the upb_Array - # @param field [Google::Protobuf::FieldDescriptor] Type of the repeated field - def get_repeated_field(array, field) - return nil if array.nil? or array.null? - repeated_field = OBJECT_CACHE.get(array.address) - if repeated_field.nil? - repeated_field = RepeatedField.send(:construct_for_field, field, arena: @arena, array: array) - repeated_field.freeze if frozen? - end - repeated_field - end - - ## - # Gets a Map from the ObjectCache or creates a new one. - # @param map [::FFI::Pointer] Pointer to the upb_Map - # @param field [Google::Protobuf::FieldDescriptor] Type of the map field - def get_map_field(map, field) - return nil if map.nil? or map.null? - map_field = OBJECT_CACHE.get(map.address) - if map_field.nil? - map_field = Google::Protobuf::Map.send(:construct_for_field, field, arena: @arena, map: map) - map_field.freeze if frozen? - end - map_field - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/method_descriptor.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/method_descriptor.rb deleted file mode 100644 index f879d49c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/method_descriptor.rb +++ /dev/null @@ -1,124 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2024 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class MethodDescriptor - attr :method_def, :descriptor_pool - - include Google::Protobuf::Internal::Convert - - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - include Google::Protobuf::Internal::PointerHelper - - # @param value [MethodDescriptor] MethodDescriptor to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _) - method_def_ptr = value.nil? ? nil : value.instance_variable_get(:@method_def) - return ::FFI::Pointer::NULL if method_def_ptr.nil? - raise "Underlying method_def was null!" if method_def_ptr.null? - method_def_ptr - end - - ## - # @param service_def [::FFI::Pointer] MethodDef pointer to be wrapped - # @param _ [Object] Unused - def from_native(method_def, _ = nil) - return nil if method_def.nil? or method_def.null? - service_def = Google::Protobuf::FFI.raw_service_def_by_raw_method_def(method_def) - file_def = Google::Protobuf::FFI.file_def_by_raw_service_def(service_def) - descriptor_from_file_def(file_def, method_def) - end - end - - def self.new(*arguments, &block) - raise "Descriptor objects may not be created from Ruby." - end - - def to_s - inspect - end - - def inspect - "#{self.class.name}: #{name}" - end - - def name - @name ||= Google::Protobuf::FFI.get_method_name(self) - end - - def options - @options ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.method_options(self, size_ptr, temporary_arena) - Google::Protobuf::MethodOptions.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze).freeze - end - end - - def input_type - @input_type ||= Google::Protobuf::FFI.method_input_type(self) - end - - def output_type - @output_type ||= Google::Protobuf::FFI.method_output_type(self) - end - - def client_streaming - @client_streaming ||= Google::Protobuf::FFI.method_client_streaming(self) - end - - def server_streaming - @server_streaming ||= Google::Protobuf::FFI.method_server_streaming(self) - end - - def to_proto - @to_proto ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.method_to_proto(self, size_ptr, temporary_arena) - Google::Protobuf::MethodDescriptorProto.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - end - end - - private - - def initialize(method_def, descriptor_pool) - @method_def = method_def - @descriptor_pool = descriptor_pool - end - - def self.private_constructor(method_def, descriptor_pool) - instance = allocate - instance.send(:initialize, method_def, descriptor_pool) - instance - end - - def c_type - @c_type ||= Google::Protobuf::FFI.get_c_type(self) - end - end - - class FFI - # MethodDef - attach_function :raw_service_def_by_raw_method_def, :upb_MethodDef_Service, [:pointer], :pointer - attach_function :get_method_name, :upb_MethodDef_Name, [MethodDescriptor], :string - attach_function :method_options, :MethodDescriptor_serialized_options, [MethodDescriptor, :pointer, Internal::Arena], :pointer - attach_function :method_input_type, :upb_MethodDef_InputType, [MethodDescriptor], Descriptor - attach_function :method_output_type, :upb_MethodDef_OutputType, [MethodDescriptor], Descriptor - attach_function :method_client_streaming, :upb_MethodDef_ClientStreaming, [MethodDescriptor], :bool - attach_function :method_server_streaming, :upb_MethodDef_ServerStreaming, [MethodDescriptor], :bool - attach_function :method_to_proto, :MethodDescriptor_serialized_to_proto, [MethodDescriptor, :pointer, Internal::Arena], :pointer - end - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/object_cache.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/object_cache.rb deleted file mode 100644 index 61f5c8e7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/object_cache.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - private - - SIZEOF_LONG = ::FFI::MemoryPointer.new(:long).size - SIZEOF_VALUE = ::FFI::Pointer::SIZE - - def self.interpreter_supports_non_finalized_keys_in_weak_map? - ! defined? JRUBY_VERSION - end - - def self.cache_implementation - if interpreter_supports_non_finalized_keys_in_weak_map? and SIZEOF_LONG >= SIZEOF_VALUE - Google::Protobuf::Internal::ObjectCache - else - Google::Protobuf::Internal::LegacyObjectCache - end - end - - public - OBJECT_CACHE = cache_implementation.new - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/oneof_descriptor.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/oneof_descriptor.rb deleted file mode 100644 index 3733900c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/oneof_descriptor.rb +++ /dev/null @@ -1,107 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2022 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class OneofDescriptor - attr :descriptor_pool, :oneof_def - include Enumerable - - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - include Google::Protobuf::Internal::PointerHelper - - # @param value [OneofDescriptor] FieldDescriptor to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _ = nil) - value.instance_variable_get(:@oneof_def) || ::FFI::Pointer::NULL - end - - ## - # @param oneof_def [::FFI::Pointer] OneofDef pointer to be wrapped - # @param _ [Object] Unused - def from_native(oneof_def, _ = nil) - return nil if oneof_def.nil? or oneof_def.null? - message_descriptor = Google::Protobuf::FFI.get_oneof_containing_type oneof_def - raise RuntimeError.new "Message Descriptor is nil" if message_descriptor.nil? - file_def = Google::Protobuf::FFI.get_message_file_def message_descriptor.to_native - descriptor_from_file_def(file_def, oneof_def) - end - end - - def self.new(*arguments, &block) - raise "OneofDescriptor objects may not be created from Ruby." - end - - def name - Google::Protobuf::FFI.get_oneof_name(self) - end - - def each &block - n = Google::Protobuf::FFI.get_oneof_field_count(self) - 0.upto(n-1) do |i| - yield(Google::Protobuf::FFI.get_oneof_field_by_index(self, i)) - end - nil - end - - def options - @options ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.oneof_options(self, size_ptr, temporary_arena) - opts = Google::Protobuf::OneofOptions.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - opts.clear_features() - opts.freeze - end - end - - def to_proto - @to_proto ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.oneof_to_proto(self, size_ptr, temporary_arena) - Google::Protobuf::OneofDescriptorProto.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - end - end - - private - - def initialize(oneof_def, descriptor_pool) - @descriptor_pool = descriptor_pool - @oneof_def = oneof_def - end - - def self.private_constructor(oneof_def, descriptor_pool) - instance = allocate - instance.send(:initialize, oneof_def, descriptor_pool) - instance - end - end - - class FFI - # MessageDef - attach_function :get_oneof_by_name, :upb_MessageDef_FindOneofByNameWithSize, [Descriptor, :string, :size_t], OneofDescriptor - attach_function :get_oneof_by_index, :upb_MessageDef_Oneof, [Descriptor, :int], OneofDescriptor - - # OneofDescriptor - attach_function :get_oneof_name, :upb_OneofDef_Name, [OneofDescriptor], :string - attach_function :get_oneof_field_count, :upb_OneofDef_FieldCount, [OneofDescriptor], :int - attach_function :get_oneof_field_by_index, :upb_OneofDef_Field, [OneofDescriptor, :int], FieldDescriptor - attach_function :get_oneof_containing_type,:upb_OneofDef_ContainingType, [:pointer], Descriptor - attach_function :oneof_options, :OneOfDescriptor_serialized_options, [OneofDescriptor, :pointer, Internal::Arena], :pointer - attach_function :oneof_to_proto, :OneOfDescriptor_serialized_to_proto, [OneofDescriptor, :pointer, Internal::Arena], :pointer - - # FieldDescriptor - attach_function :real_containing_oneof, :upb_FieldDef_RealContainingOneof, [FieldDescriptor], OneofDescriptor - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/repeated_field.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/repeated_field.rb deleted file mode 100644 index 5c3306e8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/repeated_field.rb +++ /dev/null @@ -1,411 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -# -# This class makes RepeatedField act (almost-) like a Ruby Array. -# It has convenience methods that extend the core C or Java based -# methods. -# -# This is a best-effort to mirror Array behavior. Two comments: -# 1) patches always welcome :) -# 2) if performance is an issue, feel free to rewrite the method -# in C. The source code has plenty of examples -# -# KNOWN ISSUES -# - #[]= doesn't allow less used approaches such as `arr[1, 2] = 'fizz'` -# - #concat should return the orig array -# - #push should accept multiple arguments and push them all at the same time -# -module Google - module Protobuf - class FFI - # Array - attach_function :append_array, :upb_Array_Append, [:Array, MessageValue.by_value, Internal::Arena], :bool - attach_function :get_msgval_at, :upb_Array_Get, [:Array, :size_t], MessageValue.by_value - attach_function :create_array, :upb_Array_New, [Internal::Arena, CType], :Array - attach_function :array_resize, :upb_Array_Resize, [:Array, :size_t, Internal::Arena], :bool - attach_function :array_set, :upb_Array_Set, [:Array, :size_t, MessageValue.by_value], :void - attach_function :array_size, :upb_Array_Size, [:Array], :size_t - attach_function :array_freeze, :upb_Array_Freeze, [:Array, MiniTable.by_ref], :void - attach_function :array_frozen?, :upb_Array_IsFrozen, [:Array], :bool - end - - class RepeatedField - include Enumerable - - ## - # call-seq: - # RepeatedField.new(type, type_class = nil, initial_values = []) - # - # Creates a new repeated field. The provided type must be a Ruby symbol, and - # an take on the same values as those accepted by FieldDescriptor#type=. If - # the type is :message or :enum, type_class must be non-nil, and must be the - # Ruby class or module returned by Descriptor#msgclass or - # EnumDescriptor#enummodule, respectively. An initial list of elements may also - # be provided. - def self.new(type, type_class = nil, initial_values = []) - instance = allocate - # TODO This argument mangling doesn't agree with the type signature in the comments - # but is required to make unit tests pass; - if type_class.is_a?(Enumerable) and initial_values.empty? and ![:enum, :message].include?(type) - initial_values = type_class - type_class = nil - end - instance.send(:initialize, type, type_class: type_class, initial_values: initial_values) - instance - end - - ## - # call-seq: - # RepeatedField.each(&block) - # - # Invokes the block once for each element of the repeated field. RepeatedField - # also includes Enumerable; combined with this method, the repeated field thus - # acts like an ordinary Ruby sequence. - def each &block - each_msg_val do |element| - yield(convert_upb_to_ruby(element, type, descriptor, arena)) - end - self - end - - def [](*args) - count = length - if args.size < 1 - raise ArgumentError.new "Index or range is a required argument." - end - if args[0].is_a? Range - if args.size > 1 - raise ArgumentError.new "Expected 1 when passing Range argument, but got #{args.size}" - end - range = args[0] - # Handle begin-less and/or endless ranges, when supported. - index_of_first = range.respond_to?(:begin) ? range.begin : range.last - index_of_first = 0 if index_of_first.nil? - end_of_range = range.respond_to?(:end) ? range.end : range.last - index_of_last = end_of_range.nil? ? -1 : end_of_range - - if index_of_last < 0 - index_of_last += count - end - unless range.exclude_end? and !end_of_range.nil? - index_of_last += 1 - end - index_of_first += count if index_of_first < 0 - length = index_of_last - index_of_first - return [] if length.zero? - elsif args[0].is_a? Integer - index_of_first = args[0] - index_of_first += count if index_of_first < 0 - if args.size > 2 - raise ArgumentError.new "Expected 1 or 2 arguments, but got #{args.size}" - end - if args.size == 1 # No length specified, return one element - if array.null? or index_of_first < 0 or index_of_first >= count - return nil - else - return convert_upb_to_ruby(Google::Protobuf::FFI.get_msgval_at(array, index_of_first), type, descriptor, arena) - end - else - length = [args[1],count].min - end - else - raise NotImplementedError - end - - if array.null? or index_of_first < 0 or index_of_first >= count - nil - else - if index_of_first + length > count - length = count - index_of_first - end - if length < 0 - nil - else - subarray(index_of_first, length) - end - end - end - alias at [] - - - def []=(index, value) - raise FrozenError if frozen? - count = length - index += count if index < 0 - return nil if index < 0 - if index >= count - resize(index+1) - empty_message_value = Google::Protobuf::FFI::MessageValue.new # Implicitly clear - count.upto(index-1) do |i| - Google::Protobuf::FFI.array_set(array, i, empty_message_value) - end - end - Google::Protobuf::FFI.array_set(array, index, convert_ruby_to_upb(value, arena, type, descriptor)) - nil - end - - def push(*elements) - raise FrozenError if frozen? - internal_push(*elements) - end - - def <<(element) - raise FrozenError if frozen? - push element - end - - def replace(replacements) - raise FrozenError if frozen? - clear - push(*replacements) - end - - def clear - raise FrozenError if frozen? - resize 0 - self - end - - def length - array.null? ? 0 : Google::Protobuf::FFI.array_size(array) - end - alias size :length - - ## - # Is this object frozen? - # Returns true if either this Ruby wrapper or the underlying - # representation are frozen. Freezes the wrapper if the underlying - # representation is already frozen but this wrapper isn't. - def frozen? - unless Google::Protobuf::FFI.array_frozen? array - raise RuntimeError.new "Ruby frozen RepeatedField with mutable representation" if super - return false - end - method(:freeze).super_method.call unless super - true - end - - ## - # Freezes the RepeatedField object. We have to intercept this so we can - # freeze the underlying representation, not just the Ruby wrapper. Returns - # self. - def freeze - if method(:frozen?).super_method.call - unless Google::Protobuf::FFI.array_frozen? array - raise RuntimeError.new "Underlying representation of repeated field still mutable despite frozen wrapper" - end - return self - end - unless Google::Protobuf::FFI.array_frozen? array - mini_table = (type == :message) ? Google::Protobuf::FFI.get_mini_table(@descriptor) : nil - Google::Protobuf::FFI.array_freeze(array, mini_table) - end - super - end - - def dup - instance = self.class.allocate - instance.send(:initialize, type, descriptor: descriptor, arena: arena) - each_msg_val do |element| - instance.send(:append_msg_val, element) - end - instance - end - alias clone dup - - def ==(other) - return true if other.object_id == object_id - if other.is_a? RepeatedField - return false unless other.length == length - each_msg_val_with_index do |msg_val, i| - other_msg_val = Google::Protobuf::FFI.get_msgval_at(other.send(:array), i) - unless Google::Protobuf::FFI.message_value_equal(msg_val, other_msg_val, type, descriptor) - return false - end - end - return true - elsif other.is_a? Enumerable - return to_ary == other.to_a - end - false - end - - ## - # call-seq: - # RepeatedField.to_ary => array - # - # Used when converted implicitly into array, e.g. compared to an Array. - # Also called as a fallback of Object#to_a - def to_ary - return_value = [] - each do |element| - return_value << element - end - return_value - end - - def hash - return_value = 0 - each_msg_val do |msg_val| - return_value = Google::Protobuf::FFI.message_value_hash(msg_val, type, descriptor, return_value) - end - return_value - end - - def +(other) - if other.is_a? RepeatedField - if type != other.instance_variable_get(:@type) or descriptor != other.instance_variable_get(:@descriptor) - raise ArgumentError.new "Attempt to append RepeatedField with different element type." - end - fuse_arena(other.send(:arena)) - super_set = dup - other.send(:each_msg_val) do |msg_val| - super_set.send(:append_msg_val, msg_val) - end - super_set - elsif other.is_a? Enumerable - super_set = dup - super_set.push(*other.to_a) - else - raise ArgumentError.new "Unknown type appending to RepeatedField" - end - end - - def concat(other) - raise ArgumentError.new "Expected Enumerable, but got #{other.class}" unless other.is_a? Enumerable - push(*other.to_a) - end - - private - include Google::Protobuf::Internal::Convert - - attr :name, :arena, :array, :type, :descriptor - - def internal_push(*elements) - elements.each do |element| - append_msg_val convert_ruby_to_upb(element, arena, type, descriptor) - end - self - end - - def pop_one - raise FrozenError if frozen? - count = length - return nil if length.zero? - last_element = Google::Protobuf::FFI.get_msgval_at(array, count-1) - return_value = convert_upb_to_ruby(last_element, type, descriptor, arena) - resize(count-1) - return_value - end - - def subarray(start, length) - return_result = [] - (start..(start + length - 1)).each do |i| - element = Google::Protobuf::FFI.get_msgval_at(array, i) - return_result << convert_upb_to_ruby(element, type, descriptor, arena) - end - return_result - end - - def each_msg_val_with_index &block - n = array.null? ? 0 : Google::Protobuf::FFI.array_size(array) - 0.upto(n-1) do |i| - yield Google::Protobuf::FFI.get_msgval_at(array, i), i - end - end - - def each_msg_val &block - each_msg_val_with_index do |msg_val, _| - yield msg_val - end - end - - # @param msg_val [Google::Protobuf::FFI::MessageValue] Value to append - def append_msg_val(msg_val) - unless Google::Protobuf::FFI.append_array(array, msg_val, arena) - raise NoMemoryError.new "Could not allocate room for #{msg_val} in Arena" - end - end - - # @param new_size [Integer] New size of the array - def resize(new_size) - unless Google::Protobuf::FFI.array_resize(array, new_size, arena) - raise NoMemoryError.new "Array resize to #{new_size} failed!" - end - end - - def initialize(type, type_class: nil, initial_values: nil, name: nil, arena: nil, array: nil, descriptor: nil) - @name = name || 'RepeatedField' - raise ArgumentError.new "Expected argument type to be a Symbol" unless type.is_a? Symbol - field_number = Google::Protobuf::FFI::FieldType[type] - raise ArgumentError.new "Unsupported type '#{type}'" if field_number.nil? - if !descriptor.nil? - @descriptor = descriptor - elsif [:message, :enum].include? type - raise ArgumentError.new "Expected at least 2 arguments for message/enum." if type_class.nil? - descriptor = type_class.respond_to?(:descriptor) ? type_class.descriptor : nil - raise ArgumentError.new "Type class #{type_class} has no descriptor. Please pass a class or enum as returned by the DescriptorPool." if descriptor.nil? - @descriptor = descriptor - else - @descriptor = nil - end - @type = type - - @arena = arena || Google::Protobuf::FFI.create_arena - @array = array || Google::Protobuf::FFI.create_array(@arena, @type) - unless initial_values.nil? - unless initial_values.is_a? Enumerable - raise ArgumentError.new "Expected array as initializer value for repeated field '#{name}' (given #{initial_values.class})." - end - internal_push(*initial_values) - end - - # Should always be the last expression of the initializer to avoid - # leaking references to this object before construction is complete. - OBJECT_CACHE.try_add(@array.address, self) - end - - ## - # Constructor that uses the type information from the given - # FieldDescriptor to configure the new RepeatedField instance. - # @param field [FieldDescriptor] Type information for the new RepeatedField - # @param arena [Arena] Owning message's arena - # @param values [Enumerable] Initial values - # @param array [::FFI::Pointer] Existing upb_Array - def self.construct_for_field(field, arena: nil, values: nil, array: nil) - instance = allocate - options = {initial_values: values, name: field.name, arena: arena, array: array} - if [:enum, :message].include? field.type - options[:descriptor] = field.subtype - end - instance.send(:initialize, field.type, **options) - instance - end - - def fuse_arena(arena) - arena.fuse(arena) - end - - extend Google::Protobuf::Internal::Convert - - def self.deep_copy(repeated_field) - instance = allocate - instance.send(:initialize, repeated_field.send(:type), descriptor: repeated_field.send(:descriptor)) - instance.send(:resize, repeated_field.length) - new_array = instance.send(:array) - repeated_field.send(:each_msg_val_with_index) do |element, i| - Google::Protobuf::FFI.array_set(new_array, i, message_value_deep_copy(element, repeated_field.send(:type), repeated_field.send(:descriptor), instance.send(:arena))) - end - instance - end - - end - end -end - -require 'google/protobuf/repeated_field' diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/service_descriptor.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/service_descriptor.rb deleted file mode 100644 index 72fd679c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/ffi/service_descriptor.rb +++ /dev/null @@ -1,117 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2024 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - class ServiceDescriptor - attr :service_def, :descriptor_pool - include Enumerable - - include Google::Protobuf::Internal::Convert - - # FFI Interface methods and setup - extend ::FFI::DataConverter - native_type ::FFI::Type::POINTER - - class << self - prepend Google::Protobuf::Internal::TypeSafety - include Google::Protobuf::Internal::PointerHelper - - # @param value [ServiceDescriptor] ServiceDescriptor to convert to an FFI native type - # @param _ [Object] Unused - def to_native(value, _) - service_def_ptr = value.nil? ? nil : value.instance_variable_get(:@service_def) - return ::FFI::Pointer::NULL if service_def_ptr.nil? - raise "Underlying service_def was null!" if service_def_ptr.null? - service_def_ptr - end - - ## - # @param service_def [::FFI::Pointer] ServiceDef pointer to be wrapped - # @param _ [Object] Unused - def from_native(service_def, _ = nil) - return nil if service_def.nil? or service_def.null? - file_def = Google::Protobuf::FFI.file_def_by_raw_service_def(service_def) - descriptor_from_file_def(file_def, service_def) - end - end - - def self.new(*arguments, &block) - raise "Descriptor objects may not be created from Ruby." - end - - def to_s - inspect - end - - def inspect - "#{self.class.name}: #{name}" - end - - def name - @name ||= Google::Protobuf::FFI.get_service_full_name(self) - end - - def file_descriptor - @descriptor_pool.send(:get_file_descriptor, Google::Protobuf::FFI.file_def_by_raw_service_def(@service_def)) - end - - def each &block - n = Google::Protobuf::FFI.method_count(self) - 0.upto(n-1) do |i| - yield(Google::Protobuf::FFI.get_method_by_index(self, i)) - end - nil - end - - def options - @options ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.service_options(self, size_ptr, temporary_arena) - Google::Protobuf::ServiceOptions.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze).freeze - end - end - - def to_proto - @to_proto ||= begin - size_ptr = ::FFI::MemoryPointer.new(:size_t, 1) - temporary_arena = Google::Protobuf::FFI.create_arena - buffer = Google::Protobuf::FFI.service_to_proto(self, size_ptr, temporary_arena) - Google::Protobuf::ServiceDescriptorProto.decode(buffer.read_string_length(size_ptr.read(:size_t)).force_encoding("ASCII-8BIT").freeze) - end - end - - private - - def initialize(service_def, descriptor_pool) - @service_def = service_def - @descriptor_pool = descriptor_pool - end - - def self.private_constructor(service_def, descriptor_pool) - instance = allocate - instance.send(:initialize, service_def, descriptor_pool) - instance - end - - def c_type - @c_type ||= Google::Protobuf::FFI.get_c_type(self) - end - end - - class FFI - # ServiceDef - attach_function :file_def_by_raw_service_def, :upb_ServiceDef_File, [:pointer], :FileDef - attach_function :get_service_full_name, :upb_ServiceDef_FullName, [ServiceDescriptor], :string - attach_function :method_count, :upb_ServiceDef_MethodCount, [ServiceDescriptor], :int - attach_function :get_method_by_index, :upb_ServiceDef_Method, [ServiceDescriptor, :int], MethodDescriptor - attach_function :service_options, :ServiceDescriptor_serialized_options, [ServiceDescriptor, :pointer, Internal::Arena], :pointer - attach_function :service_to_proto, :ServiceDescriptor_serialized_to_proto, [ServiceDescriptor, :pointer, Internal::Arena], :pointer - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/field_mask_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/field_mask_pb.rb deleted file mode 100644 index 5240768e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/field_mask_pb.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/field_mask.proto - -require 'google/protobuf' - - -descriptor_data = "\n google/protobuf/field_mask.proto\x12\x0fgoogle.protobuf\"\x1a\n\tFieldMask\x12\r\n\x05paths\x18\x01 \x03(\tB\x85\x01\n\x13\x63om.google.protobufB\x0e\x46ieldMaskProtoP\x01Z2google.golang.org/protobuf/types/known/fieldmaskpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - FieldMask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldMask").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/internal/object_cache.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/internal/object_cache.rb deleted file mode 100644 index 38e9bb5f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/internal/object_cache.rb +++ /dev/null @@ -1,99 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2023 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - module Internal - # A pointer -> Ruby Object cache that keeps references to Ruby wrapper - # objects. This allows us to look up any Ruby wrapper object by the address - # of the object it is wrapping. That way we can avoid ever creating two - # different wrapper objects for the same C object, which saves memory and - # preserves object identity. - # - # We use WeakMap for the cache. If sizeof(long) > sizeof(VALUE), we also - # need a secondary Hash to store WeakMap keys, because our pointer keys may - # need to be stored as Bignum instead of Fixnum. Since WeakMap is weak for - # both keys and values, a Bignum key will cause the WeakMap entry to be - # collected immediately unless there is another reference to the Bignum. - # This happens on 64-bit Windows, on which pointers are 64 bits but longs - # are 32 bits. In this case, we enable the secondary Hash to hold the keys - # and prevent them from being collected. - class ObjectCache - def initialize - @map = ObjectSpace::WeakMap.new - @mutex = Mutex.new - end - - def get(key) - @map[key] - end - - def try_add(key, value) - @map[key] || @mutex.synchronize do - @map[key] ||= value - end - end - end - - class LegacyObjectCache - def initialize - @secondary_map = {} - @map = ObjectSpace::WeakMap.new - @mutex = Mutex.new - end - - def get(key) - value = if secondary_key = @secondary_map[key] - @map[secondary_key] - else - @mutex.synchronize do - @map[(@secondary_map[key] ||= Object.new)] - end - end - - # GC if we could remove at least 2000 entries or 20% of the table size - # (whichever is greater). Since the cost of the GC pass is O(N), we - # want to make sure that we condition this on overall table size, to - # avoid O(N^2) CPU costs. - cutoff = (@secondary_map.size * 0.2).ceil - cutoff = 2_000 if cutoff < 2_000 - if (@secondary_map.size - @map.size) > cutoff - purge - end - - value - end - - def try_add(key, value) - if secondary_key = @secondary_map[key] - if old_value = @map[secondary_key] - return old_value - end - end - - @mutex.synchronize do - secondary_key ||= (@secondary_map[key] ||= Object.new) - @map[secondary_key] ||= value - end - end - - private - - def purge - @mutex.synchronize do - @secondary_map.each do |key, secondary_key| - unless @map.key?(secondary_key) - @secondary_map.delete(key) - end - end - end - nil - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/message_exts.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/message_exts.rb deleted file mode 100644 index a014304e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/message_exts.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -module Google - module Protobuf - module MessageExts - - #this is only called in jruby; mri loades the ClassMethods differently - def self.included(klass) - klass.extend(ClassMethods) - end - - module ClassMethods - end - - def to_json(options = {}) - self.class.encode_json(self, options) - end - - def to_proto(options = {}) - self.class.encode(self, options) - end - - def to_hash - self.to_h - end - - end - class AbstractMessage - include MessageExts - extend MessageExts::ClassMethods - end - private_constant :AbstractMessage - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/plugin_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/plugin_pb.rb deleted file mode 100644 index a8aebec4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/plugin_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/compiler/plugin.proto - -require 'google/protobuf' - -require 'google/protobuf/descriptor_pb' - - -descriptor_data = "\n%google/protobuf/compiler/plugin.proto\x12\x18google.protobuf.compiler\x1a google/protobuf/descriptor.proto\"F\n\x07Version\x12\r\n\x05major\x18\x01 \x01(\x05\x12\r\n\x05minor\x18\x02 \x01(\x05\x12\r\n\x05patch\x18\x03 \x01(\x05\x12\x0e\n\x06suffix\x18\x04 \x01(\t\"\x81\x02\n\x14\x43odeGeneratorRequest\x12\x18\n\x10\x66ile_to_generate\x18\x01 \x03(\t\x12\x11\n\tparameter\x18\x02 \x01(\t\x12\x38\n\nproto_file\x18\x0f \x03(\x0b\x32$.google.protobuf.FileDescriptorProto\x12\x45\n\x17source_file_descriptors\x18\x11 \x03(\x0b\x32$.google.protobuf.FileDescriptorProto\x12;\n\x10\x63ompiler_version\x18\x03 \x01(\x0b\x32!.google.protobuf.compiler.Version\"\x92\x03\n\x15\x43odeGeneratorResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12\x1a\n\x12supported_features\x18\x02 \x01(\x04\x12\x17\n\x0fminimum_edition\x18\x03 \x01(\x05\x12\x17\n\x0fmaximum_edition\x18\x04 \x01(\x05\x12\x42\n\x04\x66ile\x18\x0f \x03(\x0b\x32\x34.google.protobuf.compiler.CodeGeneratorResponse.File\x1a\x7f\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0finsertion_point\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x0f \x01(\t\x12?\n\x13generated_code_info\x18\x10 \x01(\x0b\x32\".google.protobuf.GeneratedCodeInfo\"W\n\x07\x46\x65\x61ture\x12\x10\n\x0c\x46\x45\x41TURE_NONE\x10\x00\x12\x1b\n\x17\x46\x45\x41TURE_PROTO3_OPTIONAL\x10\x01\x12\x1d\n\x19\x46\x45\x41TURE_SUPPORTS_EDITIONS\x10\x02\x42r\n\x1c\x63om.google.protobuf.compilerB\x0cPluginProtosZ)google.golang.org/protobuf/types/pluginpb\xaa\x02\x18Google.Protobuf.Compiler" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - module Compiler - Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.compiler.Version").msgclass - CodeGeneratorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.compiler.CodeGeneratorRequest").msgclass - CodeGeneratorResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.compiler.CodeGeneratorResponse").msgclass - CodeGeneratorResponse::File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.compiler.CodeGeneratorResponse.File").msgclass - CodeGeneratorResponse::Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.compiler.CodeGeneratorResponse.Feature").enummodule - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/repeated_field.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/repeated_field.rb deleted file mode 100644 index 53de122f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/repeated_field.rb +++ /dev/null @@ -1,177 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -require 'forwardable' - -# -# This class makes RepeatedField act (almost-) like a Ruby Array. -# It has convenience methods that extend the core C or Java based -# methods. -# -# This is a best-effort to mirror Array behavior. Two comments: -# 1) patches always welcome :) -# 2) if performance is an issue, feel free to rewrite the method -# in jruby and C. The source code has plenty of examples -# -# KNOWN ISSUES -# - #[]= doesn't allow less used approaches such as `arr[1, 2] = 'fizz'` -# - #concat should return the orig array -# - #push should accept multiple arguments and push them all at the same time -# -module Google - module Protobuf - class RepeatedField - extend Forwardable - - # methods defined in C or Java: - # + - # [], at - # []= - # concat - # clear - # dup, clone - # each - # push, << - # replace - # length, size - # == - # to_ary, to_a - # also all enumerable - # - # NOTE: using delegators rather than method_missing to make the - # relationship explicit instead of implicit - def_delegators :to_ary, - :&, :*, :-, :'<=>', - :assoc, :bsearch, :bsearch_index, :combination, :compact, :count, - :cycle, :difference, :dig, :drop, :drop_while, :eql?, :fetch, :find_index, :flatten, - :include?, :index, :inspect, :intersection, :join, - :pack, :permutation, :product, :pretty_print, :pretty_print_cycle, - :rassoc, :repeated_combination, :repeated_permutation, :reverse, - :rindex, :rotate, :sample, :shuffle, :shelljoin, - :to_s, :transpose, :union, :uniq, :| - - - def first(n=nil) - if n.nil? - return self[0] - elsif n < 0 - raise ArgumentError, "negative array size" - else - return self[0...n] - end - end - - - def last(n=nil) - if n.nil? - return self[-1] - elsif n < 0 - raise ArgumentError, "negative array size" - else - start = [self.size-n, 0].max - return self[start...self.size] - end - end - - - def pop(n=nil) - if n - results = [] - n.times{ results << pop_one } - return results - else - return pop_one - end - end - - - def empty? - self.size == 0 - end - - # array aliases into enumerable - alias_method :slice, :[] - alias_method :values_at, :select - alias_method :map, :collect - - - class << self - def define_array_wrapper_method(method_name) - define_method(method_name) do |*args, &block| - arr = self.to_a - result = arr.send(method_name, *args) - self.replace(arr) - return result if result - return block ? block.call : result - end - end - private :define_array_wrapper_method - - - def define_array_wrapper_with_result_method(method_name) - define_method(method_name) do |*args, &block| - # result can be an Enumerator, Array, or nil - # Enumerator can sometimes be returned if a block is an optional argument and it is not passed in - # nil usually specifies that no change was made - result = self.to_a.send(method_name, *args, &block) - if result - new_arr = result.to_a - self.replace(new_arr) - if result.is_a?(Enumerator) - # generate a fresh enum; rewinding the exiting one, in Ruby 2.2, will - # reset the enum with the same length, but all the #next calls will - # return nil - result = new_arr.to_enum - # generate a wrapper enum so any changes which occur by a chained - # enum can be captured - ie = ProxyingEnumerator.new(self, result) - result = ie.to_enum - end - end - result - end - end - private :define_array_wrapper_with_result_method - end - - - %w(delete delete_at shift slice! unshift).each do |method_name| - define_array_wrapper_method(method_name) - end - - - %w(collect! compact! delete_if each_index fill flatten! insert reverse! - rotate! select! shuffle! sort! sort_by! uniq!).each do |method_name| - define_array_wrapper_with_result_method(method_name) - end - alias_method :keep_if, :select! - alias_method :map!, :collect! - alias_method :reject!, :delete_if - - - # propagates changes made by user of enumerator back to the original repeated field. - # This only applies in cases where the calling function which created the enumerator, - # such as #sort!, modifies itself rather than a new array, such as #sort - class ProxyingEnumerator < Struct.new(:repeated_field, :external_enumerator) - def each(*args, &block) - results = [] - external_enumerator.each_with_index do |val, i| - result = yield(val) - results << result - #nil means no change occurred from yield; usually occurs when #to_a is called - if result - repeated_field[i] = result if result != val - end - end - results - end - end - - - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/source_context_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/source_context_pb.rb deleted file mode 100644 index 74aec1e1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/source_context_pb.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/source_context.proto - -require 'google/protobuf' - - -descriptor_data = "\n$google/protobuf/source_context.proto\x12\x0fgoogle.protobuf\"\"\n\rSourceContext\x12\x11\n\tfile_name\x18\x01 \x01(\tB\x8a\x01\n\x13\x63om.google.protobufB\x12SourceContextProtoP\x01Z6google.golang.org/protobuf/types/known/sourcecontextpb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - SourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceContext").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/struct_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/struct_pb.rb deleted file mode 100644 index 6c1cde71..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/struct_pb.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/struct.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x1cgoogle/protobuf/struct.proto\x12\x0fgoogle.protobuf\"\x84\x01\n\x06Struct\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32#.google.protobuf.Struct.FieldsEntry\x1a\x45\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\xea\x01\n\x05Value\x12\x30\n\nnull_value\x18\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x16\n\x0cnumber_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12/\n\x0cstruct_value\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x30\n\nlist_value\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x00\x42\x06\n\x04kind\"3\n\tListValue\x12&\n\x06values\x18\x01 \x03(\x0b\x32\x16.google.protobuf.Value*\x1b\n\tNullValue\x12\x0e\n\nNULL_VALUE\x10\x00\x42\x7f\n\x13\x63om.google.protobufB\x0bStructProtoP\x01Z/google.golang.org/protobuf/types/known/structpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - Struct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Struct").msgclass - Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Value").msgclass - ListValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ListValue").msgclass - NullValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.NullValue").enummodule - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/timestamp_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/timestamp_pb.rb deleted file mode 100644 index 87930df0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/timestamp_pb.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/timestamp.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x1fgoogle/protobuf/timestamp.proto\x12\x0fgoogle.protobuf\"+\n\tTimestamp\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\x42\x85\x01\n\x13\x63om.google.protobufB\x0eTimestampProtoP\x01Z2google.golang.org/protobuf/types/known/timestamppb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - Timestamp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Timestamp").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/type_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/type_pb.rb deleted file mode 100644 index c3fc0873..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/type_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/type.proto - -require 'google/protobuf' - -require 'google/protobuf/any_pb' -require 'google/protobuf/source_context_pb' - - -descriptor_data = "\n\x1agoogle/protobuf/type.proto\x12\x0fgoogle.protobuf\x1a\x19google/protobuf/any.proto\x1a$google/protobuf/source_context.proto\"\xe8\x01\n\x04Type\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x16.google.protobuf.Field\x12\x0e\n\x06oneofs\x18\x03 \x03(\t\x12(\n\x07options\x18\x04 \x03(\x0b\x32\x17.google.protobuf.Option\x12\x36\n\x0esource_context\x18\x05 \x01(\x0b\x32\x1e.google.protobuf.SourceContext\x12\'\n\x06syntax\x18\x06 \x01(\x0e\x32\x17.google.protobuf.Syntax\x12\x0f\n\x07\x65\x64ition\x18\x07 \x01(\t\"\xd5\x05\n\x05\x46ield\x12)\n\x04kind\x18\x01 \x01(\x0e\x32\x1b.google.protobuf.Field.Kind\x12\x37\n\x0b\x63\x61rdinality\x18\x02 \x01(\x0e\x32\".google.protobuf.Field.Cardinality\x12\x0e\n\x06number\x18\x03 \x01(\x05\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08type_url\x18\x06 \x01(\t\x12\x13\n\x0boneof_index\x18\x07 \x01(\x05\x12\x0e\n\x06packed\x18\x08 \x01(\x08\x12(\n\x07options\x18\t \x03(\x0b\x32\x17.google.protobuf.Option\x12\x11\n\tjson_name\x18\n \x01(\t\x12\x15\n\rdefault_value\x18\x0b \x01(\t\"\xc8\x02\n\x04Kind\x12\x10\n\x0cTYPE_UNKNOWN\x10\x00\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12\"t\n\x0b\x43\x61rdinality\x12\x17\n\x13\x43\x41RDINALITY_UNKNOWN\x10\x00\x12\x18\n\x14\x43\x41RDINALITY_OPTIONAL\x10\x01\x12\x18\n\x14\x43\x41RDINALITY_REQUIRED\x10\x02\x12\x18\n\x14\x43\x41RDINALITY_REPEATED\x10\x03\"\xdf\x01\n\x04\x45num\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\tenumvalue\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.EnumValue\x12(\n\x07options\x18\x03 \x03(\x0b\x32\x17.google.protobuf.Option\x12\x36\n\x0esource_context\x18\x04 \x01(\x0b\x32\x1e.google.protobuf.SourceContext\x12\'\n\x06syntax\x18\x05 \x01(\x0e\x32\x17.google.protobuf.Syntax\x12\x0f\n\x07\x65\x64ition\x18\x06 \x01(\t\"S\n\tEnumValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x02 \x01(\x05\x12(\n\x07options\x18\x03 \x03(\x0b\x32\x17.google.protobuf.Option\";\n\x06Option\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any*C\n\x06Syntax\x12\x11\n\rSYNTAX_PROTO2\x10\x00\x12\x11\n\rSYNTAX_PROTO3\x10\x01\x12\x13\n\x0fSYNTAX_EDITIONS\x10\x02\x42{\n\x13\x63om.google.protobufB\tTypeProtoP\x01Z-google.golang.org/protobuf/types/known/typepb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Type").msgclass - Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field").msgclass - Field::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Kind").enummodule - Field::Cardinality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Cardinality").enummodule - Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Enum").msgclass - EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValue").msgclass - Option = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Option").msgclass - Syntax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Syntax").enummodule - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/well_known_types.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/well_known_types.rb deleted file mode 100644 index c2df7236..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/well_known_types.rb +++ /dev/null @@ -1,211 +0,0 @@ -#!/usr/bin/ruby -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -require 'google/protobuf/any_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - -module Google - module Protobuf - - Any.class_eval do - def self.pack(msg, type_url_prefix='type.googleapis.com/') - any = self.new - any.pack(msg, type_url_prefix) - any - end - - def pack(msg, type_url_prefix='type.googleapis.com/') - if type_url_prefix.empty? or type_url_prefix[-1] != '/' then - self.type_url = "#{type_url_prefix}/#{msg.class.descriptor.name}" - else - self.type_url = "#{type_url_prefix}#{msg.class.descriptor.name}" - end - self.value = msg.to_proto - end - - def unpack(klass) - if self.is(klass) then - klass.decode(self.value) - else - nil - end - end - - def type_name - return self.type_url.split("/")[-1] - end - - def is(klass) - return self.type_name == klass.descriptor.name - end - end - - Timestamp.class_eval do - def to_time - Time.at(seconds, nanos, :nanosecond) - end - - def self.from_time(time) - new.from_time(time) - end - - def from_time(time) - self.seconds = time.to_i - self.nanos = time.nsec - self - end - - def to_i - self.seconds - end - - def to_f - self.seconds + (self.nanos.quo(1_000_000_000)) - end - end - - Duration.class_eval do - def to_f - self.seconds + (self.nanos.to_f / 1_000_000_000) - end - end - - class UnexpectedStructType < Google::Protobuf::Error; end - - Value.class_eval do - def to_ruby(recursive = false) - case self.kind - when :struct_value - if recursive - self.struct_value.to_h - else - self.struct_value - end - when :list_value - if recursive - self.list_value.to_a - else - self.list_value - end - when :null_value - nil - when :number_value - self.number_value - when :string_value - self.string_value - when :bool_value - self.bool_value - else - raise UnexpectedStructType - end - end - - def self.from_ruby(value) - self.new.from_ruby(value) - end - - def from_ruby(value) - case value - when NilClass - self.null_value = :NULL_VALUE - when Numeric - self.number_value = value - when String - self.string_value = value - when TrueClass - self.bool_value = true - when FalseClass - self.bool_value = false - when Struct - self.struct_value = value - when Hash - self.struct_value = Struct.from_hash(value) - when ListValue - self.list_value = value - when Array - self.list_value = ListValue.from_a(value) - else - raise UnexpectedStructType - end - - self - end - end - - Struct.class_eval do - def [](key) - self.fields[key].to_ruby - rescue NoMethodError - nil - end - - def []=(key, value) - unless key.is_a?(String) - raise UnexpectedStructType, "Struct keys must be strings." - end - self.fields[key] ||= Google::Protobuf::Value.new - self.fields[key].from_ruby(value) - end - - def to_h - ret = {} - self.fields.each { |key, val| ret[key] = val.to_ruby(true) } - ret - end - - def self.from_hash(hash) - ret = Struct.new - hash.each { |key, val| ret[key] = val } - ret - end - - def has_key?(key) - self.fields.has_key?(key) - end - end - - ListValue.class_eval do - include Enumerable - - def length - self.values.length - end - - def [](index) - self.values[index].to_ruby - end - - def []=(index, value) - self.values[index].from_ruby(value) - end - - def <<(value) - wrapper = Google::Protobuf::Value.new - wrapper.from_ruby(value) - self.values << wrapper - end - - def each - self.values.each { |x| yield(x.to_ruby) } - end - - def to_a - self.values.map { |x| x.to_ruby(true) } - end - - def self.from_a(arr) - ret = ListValue.new - arr.each { |val| ret << val } - ret - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/wrappers_pb.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/wrappers_pb.rb deleted file mode 100644 index ec43b6ca..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf/wrappers_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/protobuf/wrappers.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x1egoogle/protobuf/wrappers.proto\x12\x0fgoogle.protobuf\"\x1c\n\x0b\x44oubleValue\x12\r\n\x05value\x18\x01 \x01(\x01\"\x1b\n\nFloatValue\x12\r\n\x05value\x18\x01 \x01(\x02\"\x1b\n\nInt64Value\x12\r\n\x05value\x18\x01 \x01(\x03\"\x1c\n\x0bUInt64Value\x12\r\n\x05value\x18\x01 \x01(\x04\"\x1b\n\nInt32Value\x12\r\n\x05value\x18\x01 \x01(\x05\"\x1c\n\x0bUInt32Value\x12\r\n\x05value\x18\x01 \x01(\r\"\x1a\n\tBoolValue\x12\r\n\x05value\x18\x01 \x01(\x08\"\x1c\n\x0bStringValue\x12\r\n\x05value\x18\x01 \x01(\t\"\x1b\n\nBytesValue\x12\r\n\x05value\x18\x01 \x01(\x0c\x42\x83\x01\n\x13\x63om.google.protobufB\rWrappersProtoP\x01Z1google.golang.org/protobuf/types/known/wrapperspb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Protobuf - DoubleValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DoubleValue").msgclass - FloatValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FloatValue").msgclass - Int64Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int64Value").msgclass - UInt64Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt64Value").msgclass - Int32Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int32Value").msgclass - UInt32Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt32Value").msgclass - BoolValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BoolValue").msgclass - StringValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.StringValue").msgclass - BytesValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BytesValue").msgclass - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf_ffi.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf_ffi.rb deleted file mode 100644 index 731848f1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf_ffi.rb +++ /dev/null @@ -1,52 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2023 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -require 'ffi-compiler/loader' -require 'google/protobuf/ffi/ffi' -require 'google/protobuf/ffi/internal/type_safety' -require 'google/protobuf/ffi/internal/pointer_helper' -require 'google/protobuf/ffi/internal/arena' -require 'google/protobuf/ffi/internal/convert' -require 'google/protobuf/ffi/descriptor' -require 'google/protobuf/ffi/enum_descriptor' -require 'google/protobuf/ffi/field_descriptor' -require 'google/protobuf/ffi/oneof_descriptor' -require 'google/protobuf/ffi/method_descriptor' -require 'google/protobuf/ffi/service_descriptor' -require 'google/protobuf/ffi/file_descriptor' -require 'google/protobuf/ffi/descriptor_pool' -require 'google/protobuf/ffi/map' -require 'google/protobuf/ffi/object_cache' -require 'google/protobuf/ffi/repeated_field' -require 'google/protobuf/ffi/message' - -module Google - module Protobuf - def self.deep_copy(object) - case object - when RepeatedField - RepeatedField.send(:deep_copy, object) - when Google::Protobuf::Map - Google::Protobuf::Map.deep_copy(object) - when Google::Protobuf::MessageExts - object.class.send(:deep_copy, object.instance_variable_get(:@msg)) - else - raise NotImplementedError - end - end - - def self.discard_unknown(message) - raise FrozenError if message.frozen? - raise ArgumentError.new "Expected message, got #{message.class} instead." if message.instance_variable_get(:@msg).nil? - pool_def = message.class.descriptor.instance_variable_get(:@descriptor_pool).descriptor_pool - unless Google::Protobuf::FFI.message_discard_unknown(message.instance_variable_get(:@msg), message.class.descriptor, pool_def, 128) - raise RuntimeError.new "Messages nested too deeply." - end - nil - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf_native.rb b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf_native.rb deleted file mode 100644 index 9605b6b5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/protobuf_native.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2023 Google Inc. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -if RUBY_PLATFORM == "java" - require 'json' - require 'google/protobuf_java' -else - begin - require "google/#{RUBY_VERSION.sub(/\.\d+$/, '')}/protobuf_c" - rescue LoadError - require 'google/protobuf_c' - end -end - -require 'google/protobuf/repeated_field' diff --git a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/tasks/ffi.rake b/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/tasks/ffi.rake deleted file mode 100644 index 5de10a75..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/google-protobuf-4.31.1-x86_64-linux-gnu/lib/google/tasks/ffi.rake +++ /dev/null @@ -1,100 +0,0 @@ -# # @param task [FFI::Compiler::CompileTask] task to configure -def configure_common_compile_task(task) - if FileUtils.pwd.include? 'ext' - src_dir = '.' - third_party_path = 'third_party/utf8_range' - else - src_dir = 'ext/google/protobuf_c' - third_party_path = 'ext/google/protobuf_c/third_party/utf8_range' - end - - task.add_include_path third_party_path - task.add_define 'NDEBUG' - task.cflags << "-std=gnu99 -O3" - [ - :convert, :defs, :map, :message, :protobuf, :repeated_field, :wrap_memcpy - ].each { |file| task.exclude << "/#{file}.c" } - task.ext_dir = src_dir - task.source_dirs = [src_dir] - if RbConfig::CONFIG['target_os'] =~ /darwin|linux/ - task.cflags << "-Wall -Wsign-compare -Wno-declaration-after-statement" - end -end - -# FFI::CompilerTask's constructor walks the filesystem at task definition time -# to create subtasks for each source file, so files from third_party must be -# copied into place before the task is defined for it to work correctly. -# TODO Is there a sane way to check for generated protos under lib too? -def with_generated_files - expected_path = FileUtils.pwd.include?('ext') ? 'third_party/utf8_range' : 'ext/google/protobuf_c/third_party/utf8_range' - if File.directory?(expected_path) - yield - else - task :default do - # It is possible, especially in cases like the first invocation of - # `rake test` following `rake clean` or a fresh checkout that the - # `copy_third_party` task has been executed since initial task definition. - # If so, run the task definition block now and invoke it explicitly. - if File.directory?(expected_path) - yield - Rake::Task[:default].invoke - else - raise "Missing directory #{File.absolute_path(expected_path)}." + - " Did you forget to run `rake copy_third_party` before building" + - " native extensions?" - end - end - end -end - -begin - require "ffi-compiler/compile_task" - - desc "Compile Protobuf library for FFI" - namespace "ffi-protobuf" do - with_generated_files do - # Compile Ruby UPB separately in order to limit use of -DUPB_BUILD_API to one - # compilation unit. - desc "Compile UPB library for FFI" - namespace "ffi-upb" do - with_generated_files do - FFI::Compiler::CompileTask.new('ruby-upb') do |c| - configure_common_compile_task c - c.add_define "UPB_BUILD_API" - c.exclude << "/glue.c" - c.exclude << "/shared_message.c" - c.exclude << "/shared_convert.c" - if RbConfig::CONFIG['target_os'] =~ /darwin|linux/ - c.cflags << "-fvisibility=hidden" - end - end - end - end - - FFI::Compiler::CompileTask.new 'protobuf_c_ffi' do |c| - configure_common_compile_task c - # Ruby UPB was already compiled with different flags. - c.exclude << "/utf8_range.c" - c.exclude << "/ruby-upb.c" - end - - # Setup dependencies so that the .o files generated by building ffi-upb are - # available to link here. - # TODO Can this be simplified? Can the single shared library be used - # instead of the object files? - protobuf_c_task = Rake::Task[:default] - protobuf_c_shared_lib_task = Rake::Task[protobuf_c_task.prereqs.last] - ruby_upb_shared_lib_task = Rake::Task[:"ffi-upb:default"].prereqs.first - Rake::Task[ruby_upb_shared_lib_task].prereqs.each do |dependency| - protobuf_c_shared_lib_task.prereqs.prepend dependency - end - end - end -rescue LoadError - desc "Compile Protobuf library for FFI" - namespace "ffi-protobuf" do - task :default do - warn "Skipping build of FFI; `gem install ffi-compiler` to enable." - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/.index b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/.index deleted file mode 100644 index ead4e7a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/.index +++ /dev/null @@ -1,78 +0,0 @@ ---- -revision: 2013 -type: ruby -sources: -- Index.yml -- Gemfile -authors: -- name: Trans - email: transfire@gmail.com -- name: Kirk Haines -- name: Robert Klemme -- name: Jan Molic -- name: George Moschovitis -- name: Jeena Paradies -- name: Erik Veenstra -organizations: -- name: RubyWorks (http://rubyworks.github.com/) -requirements: -- groups: - - development - - test - version: ">= 0" - name: qed -- groups: - - development - - test - version: ">= 0" - name: lemon -- groups: - - development - - test - version: ">= 0" - name: rubytest-cli -conflicts: [] -alternatives: [] -resources: -- type: home - uri: http://rubyworks.github.com/hashery - label: Homepage -- type: code - uri: http://github.com/rubyworks/hashery - label: Source Code -- type: mail - uri: http://groups.google.com/group/rubyworks-mailinglist - label: Mailing List -- type: docs - uri: http://rubydoc.info/github/rubyworks/hashery/master/frames - label: Documentation -- type: wiki - uri: http://wiki.github.com/rubyworks/hashery - label: User Guide -- type: gems - uri: http://rubygems.org/gems/hashery -repositories: -- name: upstream - scm: git - uri: git://github.com/rubyworks/hashery.git -categories: [] -copyrights: -- holder: Rubyworks - year: '2010' - license: BSD-2-Clause -customs: [] -paths: - lib: - - lib - - alt -name: hashery -title: Hashery -version: 2.1.2 -summary: Facets-bread collection of Hash-like classes. -description: The Hashery is a tight collection of Hash-like classes. Included among - its many offerings are the auto-sorting Dictionary class, the efficient LRUHash, - the flexible OpenHash and the convenient KeyHash. Nearly every class is a subclass - of the CRUDHash which defines a CRUD model on top of Ruby's standard Hash making - it a snap to subclass and augment to fit any specific use case. -created: '2010-04-21' -date: '2016-05-01' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/.yardopts b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/.yardopts deleted file mode 100644 index c56eafea..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/.yardopts +++ /dev/null @@ -1,9 +0,0 @@ ---plugin tomdoc ---output-dir doc ---title Hashery ---protected ---private -lib/ -- -[A-Z]*.* - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/HISTORY.md b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/HISTORY.md deleted file mode 100644 index a239b613..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/HISTORY.md +++ /dev/null @@ -1,188 +0,0 @@ -# RELEASE HISTORY - -## 2.1.1 / 2013-08-21 - -This minor release clarifies the licensing. The entire library is now -distributed under the BSD-2-Clause license, also known as the FreeBSD -license. In addition this release provides a bug fix for flattening -arrays that contain an OpenCascade object. - -Changes: - -* Clarify licensing. -* Fix #flatten on Arrays that contain an OpenCascade. - - -## 2.1.0 / 2012-11-24 (Golden Retriever) - -The major change of the 2.1 release is to switch over to `Hash#fetch` -as the fundamental CRUD read method in-place of the previous `#read` core -extension (an alias of `#[]`). This is a pretty fundamental change which -required modification of a number of classes. So please do extra-diligence -and file an issue if you experience any problems. - -In addition, the Hash#read core extension has been renamed to Hash#retrieve -to avoid any possible confusion with IO objects. This release also fixes -a couple of issues with 1.8 compatibility and makes a few other small -enhancements. - -Changes: - -* Rename Hash#read to Hash#retrieve. -* Deprecate `Dictionary.alpha` in favor of `Dictionary.alphabetic`. -* Add support for block argument in Dictionary#order_by_key and #order_by_value. -* Fix OpenHash issues with Ruby 1.8.x compatibility. -* OpenHash methods are opened up via `protected` instead of `private`. -* Change OpenCascade to auto-create the subclass when inherited. - - -## 2.0.1 / 2012-07-06 - -This minor release fixes an issue with OpenCascade (#13). -The key_proc procedure wasn't being passed along to sub-cascades. - -Changes: - -* OpenCascade passes along key_proc to children. - - -## 2.0.0 / 2012-05-11 (Crud Space) - -This is a big release for Hashery which both culls some of it's -less fitting classes and modules while greatly improving the rest. -The first and most immediate change is use of a proper namespace. -All classes and modules are now appropriately kept in the `Hashery` -namespace. To get the old behavior you can `include Hashery` as the -toplevel. For the other changes and improvements dive into the -API documentation. - -Changes: - -* Use proper Hashery namespace. -* Add CRUDHash, which also serves a good base class. -* Improved OpenHash to be nearly 100% open. -* Deprecate BasicStruct, as it would be better to improve OpenStruct. -* Deprecate BasicCascade, though it never really came to be. -* Deprecate BasicObject emulator, as it is no longer needed. -* Deprecate Memoizer, not sure how that got in here anyway. -* Deprecate Ostructable, which can be paired up with better OpenStruct. -* Removed open_object.rb, which has long been deprecated. - - -## 1.5.1 / 2012-05-09 - -This release adds transformative #each method to OpenCascade, to -ensure #each returns an OpenCascade. Also, BasicCascade has been -added that is like OpenCascade by fully open by use of BasicObject -as a base class. - -Changes: - -* Fix OpenCascade#each (porecreat). -* Introduce BasicCascade class. -* Renamed `Ini` class to `IniHash` class. - - -## 1.5.0 / 2011-11-10 (Devil's Core) - -In this release, CoreExt module has been added to encapsulate -methods that extend Ruby's core Hash class (there are only a few). -Presently these are only loaded when using `require 'hashery'`. -If you are cherry-picking from Hashery but still want the core -extensions, you need to use `require 'hasery/core_ext'` first. -In addition, BasicStruct class now has a #key method. And finally -this release switches licensing to BSD 2-Clause. - -Changes: - -* Use CoreExt mixin for core Hash extensions. -* Add BasicStruct#key method (b/c #index is deprecated in Ruby 1.9). -* Deprecate SparseArray class. -* Switch license to BSD-2-Clause license. - - -## 1.4.0 / 2011-01-19 (Back To Basics) - -This release includes a copy of Ruby Facets' BasicObject class, which -fixes the loading bug of the previous version. This release also renames -OpenObject to BasicStruct, which is a much better description of what the -class actually provides. - -Changes: - -* Rename OpenObject to BasicStruct. -* Fix basicobject.rb loading issue. - - -## 1.3.0 / 2010-10-01 (Private Property) - -This release fixes a minor bug in CastingHash and adds a new -PropertyHash class. - -Changes: - -* 1 New Library - - * Added PropertyHash - -* 1 Bug Fix - - * Fixed CastingHash#new where #to_proc is called against NilClass - - -## 1.2.0 / 2010-06-04 (Fuzzy Wuzzy) - -This release makes two significant changes to the Hashery. -First, we have a new shiny library called FuzzyHash by -Joshua Hull. It's a cool idea that allows hash keys to be -regular expressions. Secondly, OpenCascade is now a subclass -of OpenHash rather than OpenObject (to go along with the -changes of the last release), and it now support cascading -within Arrays. - -Changes: - -* 1 New Library - - * FuzzyHash by Joshua Hull - -* 1 Major Enhancement - - * OpenCascade subclasses OpenHash and handles Array cascading. - - -## 1.1.0 / 2010-04-28 (Ugly Ducklings) - -A follow-up release of Hashery that adds two new libraries: -Association and SparseArray. Both of these may seem like odd -entries, but they each belong in a unique way. An Association -is akin to a single entry Hash --it represents a pairing. -While a SpareArray, though compatible with the Array class, -is completely under-pinned by a Hash in order to make it -efficient when no entries are given for a set of indexes, -hence "sparse". - -Changes: - -* 2 New Libraries - - * Added association.rb - * Added sparsearray.rb - - -## 1.0.0 / 2010-04-21 (Hatching Hashery) - -This is the first release of the Facets Hashery. -Most of included classes come directly from Ruby -Facets, so they have been around a while and are -in good working condition. - -Some improvements are planned for the next release. -In particular the OrderHash and Dictionary, which -presently have essentially the same coding, will -diverge to target slightly different use cases. - -Changes: - -* Happy Birthday! - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/Index.yml b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/Index.yml deleted file mode 100644 index 5d882853..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/Index.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -name: - hashery - -version: - 2.1.2 - -title: - Hashery - -summary: - Facets-bread collection of Hash-like classes. - -description: - The Hashery is a tight collection of Hash-like classes. Included among its many - offerings are the auto-sorting Dictionary class, the efficient LRUHash, the - flexible OpenHash and the convenient KeyHash. Nearly every class is a subclass - of the CRUDHash which defines a CRUD model on top of Ruby's standard Hash - making it a snap to subclass and augment to fit any specific use case. - -authors: - - Trans - - Kirk Haines - - Robert Klemme - - Jan Molic - - George Moschovitis - - Jeena Paradies - - Erik Veenstra - -resources: - home: http://rubyworks.github.com/hashery - code: http://github.com/rubyworks/hashery - mail: http://groups.google.com/group/rubyworks-mailinglist - docs: http://rubydoc.info/github/rubyworks/hashery/master/frames - wiki: http://wiki.github.com/rubyworks/hashery - gems: http://rubygems.org/gems/hashery - -repositories: - upstream: "git://github.com/rubyworks/hashery.git" - -organizations: - - RubyWorks (http://rubyworks.github.com/) - -copyrights: - - 2010 Rubyworks (BSD-2-Clause) - -load_path: - - lib - - alt - -created: '2010-04-21' - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/LICENSE.txt b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/LICENSE.txt deleted file mode 100644 index ef220789..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/LICENSE.txt +++ /dev/null @@ -1,23 +0,0 @@ -BSD-2-Clause License - -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 ``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 HOLDERS 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/bundle/ruby/3.2.0/gems/hashery-2.1.2/NOTICE.txt b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/NOTICE.txt deleted file mode 100644 index 5b16948d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/NOTICE.txt +++ /dev/null @@ -1,46 +0,0 @@ -All copyright holders have released their wares with a compatible -license or have given permission for their work to be distributed -under the same license as Hashery. - -Dictionary is based on OrderedHash by Jan Molic. - - OrderHash 2.0 Copyright (c) 2005 Jan Molic. - - -LRUHash is based on same by Robert Klemme - - Copyright (c) 2010 Robert Klemme - - -Memoizer is based on same by Erik Veenstra - - Copyright (c) 2006 Erik Veenstra - - -IniHash is based on Ini library by Jeena Paradies - - Copyright (c) 2007 Jeena Paradies - - -LinkedList is based on same by Kirk Haines - - Copyright (C) 2006 Kirk Haines - - -FuzzyHash is based on the same by Joshua Hull. - - Copyright (c) 2009 Joshua Hull - - -PathHash is based on SlashedHash by Daniel Parker - - HashMagic by Daniel Parker - Copyright (c) 2006 BehindLogic - http://hash_magic.rubyforge.org - -BasicObject is based on Jim Weirich's BlankSlate class. - - BlankSlate - Copyright 2004 by Jim Weirich (jim@weirichhouse.org). - All rights reserved. - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/README.md b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/README.md deleted file mode 100644 index ba11c164..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# Hashery - -[![Gem Version](http://img.shields.io/gem/v/hashery.svg?style=flat)](http://rubygems.org/gem/hashery) -[![Build Status](http://img.shields.io/travis/rubyworks/hashery.svg?style=flat)](http://travis-ci.org/rubyworks/hashery) -[![Fork Me](http://img.shields.io/badge/scm-github-blue.svg?style=flat)](http://github.com/rubyworks/hashery) -[![Report Issue](http://img.shields.io/github/issues/rubyworks/hashery.svg?style=flat)](http://github.com/rubyworks/hashery/issues) -[![Gittip](http://img.shields.io/badge/gittip-$1/wk-green.svg?style=flat)](https://www.gittip.com/rubyworksorg/) - -[Homepage](http://rubyworks.github.com/hashery) · -[Development](http://github.com/rubyworks/hashery) · -[Report Issue](http://github.com/rubyworks/hashery/issues) · -[Chat](https://kiwiirc.com/client/irc.freenode.net/?nick=user1|?#rubyworks) - - -## Description - -Among Ruby Facets most common additions were an assortment -of Hash-like classes. To better support this collection -of libraries it was deemed prudent to create a new project -specifically for them. Hence the *Facets Hashery*. - -Included in this collection are the widely used OrderedHash, -the related but more featured Dictionary class, a number -of _open_ classes similar to the standard OpenStruct, -some variations of the standard Hash class and a few -other yummy morsels. - - -## Usage - -For instruction on usage, please see the individual library files -included in this collection and read the demo documents which give -examples of almost all features. - - -### Core Extensions - -Hashery adds four core extensions of Ruby's Hash class: `#retrieve`, -`#rekey`, `#rekey!` and `Hash.create`. The first is simply an alias -for `#[]`. The later two have proven too useful over the years to -omit. And the last is a convenience class method for populating -a new hash with another hash upon initialization. All of these are -sorely missing for Ruby itself, which is why they are provided here. - - -## Installation - -To install with RubyGems simply open a console and type: - - $ sudo gem install hashery - -Or add it as a dependency to your project's Gemfile: - - gem "hashery" - -Tarball packages are available for manual site installations -via [Ruby Setup](http://rubyworks.github.com/setup). - - -## Authors - -Developers who have contributed code to the project include: - -* Kirk Haines -* Joshua Hull -* Robert Klemme -* Jan Molic -* George Moschovitis -* Jeena Paradies -* Erik Veenstra - - -## Contributing - -Don't be a lump on a log. See an issue? Have a suggestion? Want to help? -Well *git* in there! - -### Communicating - -The project is hosted on Github so the easiest means of communication -is via the [Issues](http://github.com/rubyworks/hashery/issues) page. -For more direct communication you can try the **#rubyworks** IRC channel -on **irc.freenode.net**. - -    [![IRC](https://kiwiirc.com/buttons/irc.freenode.net/rubyworks.png)](https://kiwiirc.com/client/irc.freenode.net/?nick=user1|?#rubyworks) - -### Testing - -Hashery uses [QED](http://rubyworks.github.com/qed) and -[Lemon](http://rubyworks.github.com/lemon) test frameworks. -The QED framework to create well tested high-level documentation. -Run the QED specs via: - - $ qed -Ilib demo/ - -Lemon is used to create low-level unit tests. Run these via the Rubytest: - - $ rubytest -Ilib -Itest test/ - -### Patches - -Hashery's repository is hosted on [GitHub](http://github.com/rubyworks/hashery). -If you'd like to offer up a fix or feature, fork the repo and submit a pull -request (preferably in a topic branch). I assume you have heard -all the talk about proper [practices](https://github.com/rubyworks/rubyworks.github.com/wiki/GitHub-Best-Pactices), -so I won't bug you with it yet again. - -### Donations - -Yes, we FOSS programmers need to eat too! ;-) No seriously, any help you can -offer goes a long way toward continued development of Rubyworks projects, -including Hashery. Hop over to our [Gittips](https://www.gittip.com/rubyworksorg/) -page, or see the upper right-hand corner on the [Rubyworks](http://rubyworks.github.com) homepage. -Thanks! - - -## Copyrights - -Copyright (c) 2010 Rubyworks - -Licensed under the *BSD-2-Clause* license. - -See LICENSE.txt file for further details. - -Some libraries included in the Hashery have special copyrights -attributing specific authors. Please see each library script for -specifics and the NOTICE.txt file for an overview. - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/castinghash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/castinghash.rb deleted file mode 100644 index 70076061..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/castinghash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/casting_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/fuzzyhash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/fuzzyhash.rb deleted file mode 100644 index 35258976..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/fuzzyhash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/fuzzy_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/keyhash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/keyhash.rb deleted file mode 100644 index e41c9054..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/keyhash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/key_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/linkedlist.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/linkedlist.rb deleted file mode 100644 index 51609ef6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/linkedlist.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/linked_list' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/lruhash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/lruhash.rb deleted file mode 100644 index a246fec7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/lruhash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/lru_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/opencascade.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/opencascade.rb deleted file mode 100644 index 406314a6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/opencascade.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/open_cascade' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/openhash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/openhash.rb deleted file mode 100644 index f48271c4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/openhash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/open_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/orderedhash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/orderedhash.rb deleted file mode 100644 index dbb8a11c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/orderedhash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/ordered_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/propertyhash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/propertyhash.rb deleted file mode 100644 index 71964e21..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/propertyhash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/property_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/queryhash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/queryhash.rb deleted file mode 100644 index 795ba912..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/queryhash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/query_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/statichash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/statichash.rb deleted file mode 100644 index 15da70fe..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/alt/hashery/statichash.rb +++ /dev/null @@ -1 +0,0 @@ -require 'hashery/static_hash' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/00_introduction.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/00_introduction.rdoc deleted file mode 100644 index 1cc22205..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/00_introduction.rdoc +++ /dev/null @@ -1,6 +0,0 @@ -= Hashery - -For the following demos the `hashery` script has -been preloaded and the Hashery namespace has been -included into the demo context for convenience. - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/01_open_hash.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/01_open_hash.rdoc deleted file mode 100644 index 2f43f79f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/01_open_hash.rdoc +++ /dev/null @@ -1,63 +0,0 @@ -= OpenHash - -An OpenHash is a Hash that provides +open+ access to its entries via method -calls. Writers (methods ending in =-marks) assign entries. Methods without -special puncuation will retrieve entries. - - o = OpenHash.new - o.a = 1 - o.b = 2 - o.a.assert == 1 - o.b.assert == 2 - -Writers always use a Symbol for keys in the underlying Hash. - - o.to_h.assert == { :a=>1, :b=>2 } - -All the usual Hash methods are still available in an OpenHash. - - c = o.map{ |k,v| [k,v] } - c.assert.include?([:a,1]) - c.assert.include?([:b,2]) - -And they are protected from being overridden by writers. - - o.map = 3 - o.map.refute == 3 - -Even so, the underlying Hash object does contain the entry even -when it cannot be accessed via a reader method. - - o.to_h.assert == { :a=>1, :b=>2, :map=>3 } - -We can see if a method is open or not via the `#open?` method. - - o.open?(:a).assert == true - o.open?(:map).assert == false - -For some usecases it may be necessary to give up access to one or -more Hash methods in favor of access to the hash entries. This can -be done using the `#open!` method. - - o.open!(:map, :merge) - o.map.assert == 3 - o.merge = 4 - o.merge.assert == 4 - -Becuase of nature of a writer, a certain set of Hash methods are always -protected, in particluar all methods buffered by underscore (e.g. `__id__`). -So these cannot be opened. - - expect ArgumentError do - o.open!(:__id__) - end - -Even though writers alwasy use Symbols as keys, because an OpenHash -is a true Hash object, any object can be used as a key internally. - - o = OpenHash.new - o[nil] = "Nothing" - o.to_h.assert == { nil=>"Nothing" } - -It simply cannot be accessible via a reader method. - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/02_query_hash.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/02_query_hash.rdoc deleted file mode 100644 index d249bce8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/02_query_hash.rdoc +++ /dev/null @@ -1,17 +0,0 @@ -= QueryHash - -A QueryHash is a Hash that provides open access much like an OpenHash, but it limits readers -to bang and query methods (i.e. method ending in `!` or `?`). - - q = QueryHash.new - q.a = 1 - q.b = 2 - q.a?.assert == 1 - q.b?.assert == 2 - -By default keys are converted to strings. - - q.assert == { "a"=>1, "b"=>2 } - -A QueryHash is compatible with Ruby's standard Hash in every other respect. - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/03_casting_hash.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/03_casting_hash.rdoc deleted file mode 100644 index 249ab6b2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/03_casting_hash.rdoc +++ /dev/null @@ -1,12 +0,0 @@ -= CastingHash - -A CastingHash is a Hash that allows _casting_ procedures to -defined that the keys and values pass through upon assignment. - - c = CastingHash.new - c.cast_proc = lambda { |k,v| [k.to_s, v.to_s.upcase] } - - c[:a] = 'a' - - c.assert == {'a'=>'A'} - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/04_static_hash.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/04_static_hash.rdoc deleted file mode 100644 index 4ddb79ad..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/04_static_hash.rdoc +++ /dev/null @@ -1,20 +0,0 @@ -= StaticHash - -A StaticHash is simply a Hash that can only be assigned -once per key. Once assigned a subsequent attempt to assign -a value to the same key will raise an ArgumentError. - - h = StaticHash.new - - h["x"] = 1 - - expect ArgumentError do - h["x"] = 2 - end - -The same error will be raised when using #update or #merge!. - - expect ArgumentError do - h.update( "x"=>3 ) - end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/05_key_hash.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/05_key_hash.rdoc deleted file mode 100644 index b9db1485..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/05_key_hash.rdoc +++ /dev/null @@ -1,17 +0,0 @@ -= KeyHash - -The KeyHash is essentially the same as regular Hash but instead -of a `default_proc` the initializer takes the `key_proc` for -normalizing keys. - - kh = KeyHash.new{ |k| k.to_s.upcase } - kh[:a] = 1 - kh.to_h #=> ({'A'=>1}) - -By default, when no `key_proc` is given, it converts all keys to strings. - - kh = KeyHash.new - kh[:a] = 1 - kh.to_h #=> ({'a'=>1}) - - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/06_open_cascade.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/06_open_cascade.rdoc deleted file mode 100644 index fe3e3fee..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/06_open_cascade.rdoc +++ /dev/null @@ -1,64 +0,0 @@ -= OpenCascade - -The reason this class is labeled "cascade", is that every internal -Hash is transformed into an OpenCascade dynamically upon access. -This makes it easy to create _cascading_ references. - - h = { :x => { :y => { :z => 1 } } } - c = OpenCascade[h] - assert c.x.y.z == 1 - -As soon as you access a node it automatically becomes an OpenCascade. - - c = OpenCascade.new - assert(OpenCascade === c.r) - assert(OpenCascade === c.a.b) - -But if you set a node, then that will be it's value. - - c.a.b = 4 - assert c.a.b == 4 - -To query a node without causing the auto-creation of an OpenCasade -object, use the ?-mark. - - assert c.a.z? == nil - -OpenCascade also transforms Hashes within Arrays. - - h = { :x=>[ {:a=>1}, {:a=>2} ], :y=>1 } - c = OpenCascade[h] - assert c.x.first.a == 1 - assert c.x.last.a == 2 - -Like OpenObject, OpenCascade allows you to insert entries as array -pairs. - - c = OpenCascade.new - c << [:x,8] - c << [:y,9] - - assert c.x == 8 - assert c.y == 9 - -Finally, you can call methods ending in a !-mark to access the -underlying hash (Note that these differ in behavior from the -built-in !-methods). - - bk = c.map!{ |k,v| k.to_s.upcase } - bk.sort.assert == ['X', 'Y'] - -So you can see that for the most an OpenCascade is just like -OpenHash, but it allows us to conveniently build open sub-layers -easily. - -Enumerable still works with OpenCascades too. - - h = {} - c = OpenCascade[:a=>1,:b=>{:c=>3}] - c.each do |k,v| - h[k] = v - end - OpenCascade.assert === h[:b] - - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/07_fuzzy_hash.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/07_fuzzy_hash.rdoc deleted file mode 100644 index c4f5aa70..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/07_fuzzy_hash.rdoc +++ /dev/null @@ -1,137 +0,0 @@ -= FuzzyHash - -Should accept strings and retrieve based on them. - - l = FuzzyHash.new - l['asd'] = 'qwe' - l['asd'].should == 'qwe' - -Should accept strings, but the second time you set the same string, it should overwrite. - - l = FuzzyHash.new - l['asd'] = 'asd' - l['asd'] = 'qwe' - l['asd'].should == 'qwe' - -Should accept regexs too. - - l = FuzzyHash.new - l[/asd.*/] = 'qwe' - l['asdqweasd'].should == 'qwe' - -Should accept regexs too, but the second time you set the same regex, it should overwrite. - - l = FuzzyHash.new - l[/asd/] = 'asd' - l[/asd/] = 'qwe' - l['asdqweasd'].should == 'qwe' - -Should accept regexs too with the match. - - l = FuzzyHash.new - l[/asd.*/] = 'qwe' - l.match_with_result('asdqweasd').should == ['qwe', 'asdqweasd'] - -Should accept regexs that match the whole strong too with the match. - - l = FuzzyHash.new - l[/asd/] = 'qwe' - l.match_with_result('asd').should == ['qwe', 'asd'] - -Should prefer string to regex matches. - - l = FuzzyHash.new - l['asd'] = 'qwe2' - l[/asd.*/] = 'qwe' - l['asd'].should == 'qwe2' - -Should allow nil keys. - - l = FuzzyHash.new - l[nil] = 'qwe2' - l['asd'] = 'qwe' - l['asd'].should == 'qwe' - l[nil].should == 'qwe2' - -Should allow boolean keys. - - l = FuzzyHash.new - l[false] = 'false' - l[true] = 'true' - l[/.*/] = 'everything else' - l[true].should == 'true' - l[false].should == 'false' - l['false'].should == 'everything else' - -Should pick between the correct regex. - - hash = FuzzyHash.new - hash[/^\d+$/] = 'number' - hash[/.*/] = 'something' - hash['123asd'].should == 'something' - -Should be able to delete by value for hash. - - l = FuzzyHash.new - l[nil] = 'qwe2' - l['asd'] = 'qwe' - l['asd'].should == 'qwe' - l[nil].should == 'qwe2' - l.delete_value('qwe2') - l[nil].should == nil - -Should be able to delete by value for regex. - - l = FuzzyHash.new - l[/qwe.*/] = 'qwe2' - l['asd'] = 'qwe' - l['asd'].should == 'qwe' - l['qweasd'].should == 'qwe2' - l.delete_value('qwe2') - l['qweasd'].should == nil - -Should iterate through the keys. - - l = FuzzyHash.new - l[/qwe.*/] = 'qwe2' - l['asd'] = 'qwe' - l['zxc'] = 'qwe' - l.keys.size.should == 3 - -Should iterate through the values. - - l = FuzzyHash.new - l[/qwe.*/] = 'qwe2' - l['asd'] = 'qwe' - l['zxc'] = 'qwelkj' - (['qwe2','qwe','qwelkj'] & l.values).size.should == 3 - -Should clear. - - l = FuzzyHash.new - l[/qwe.*/] = 'qwe2' - l['asd'] = 'qwe' - l['zxc'] = 'qwelkj' - l.clear - l.empty?.should == true - -Should handle equality. - - l_1 = FuzzyHash.new - l_1[/qwe.*/] = 'qwe2' - l_1['asd'] = 'qwelkj' - l_1['zxc'] = 'qwe' - l_2 = FuzzyHash.new - l_2['zxc'] = 'qwe' - l_2['asd'] = 'qwelkj' - l_2[/qwe.*/] = 'qwe2' - l_1.should == l_2 - -Should return the value when adding the value. - - h = FuzzyHash.new - (h[/asd/] = '123').should == '123' - (h['qwe'] = '123').should == '123' - -That's It. - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/08_propery_hash.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/08_propery_hash.rdoc deleted file mode 100644 index 89aafaea..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/08_propery_hash.rdoc +++ /dev/null @@ -1,34 +0,0 @@ -= PropertyHash - -The Property hash can be used an object in itself. - - h = PropertyHash.new(:a=>1, :b=>2) - h[:a] #=> 1 - h[:a] = 3 - h[:a] #=> 3 - -Becuase the properties are fixed, if we try to set a key that is not present, -then we will get an error. - - expect ArgumentError do - h[:x] = 5 - end - -The PropertyHash can also be used as a superclass. - - class MyPropertyHash < PropertyHash - property :a, :default => 1 - property :b, :default => 2 - end - - h = MyPropertyHash.new - h[:a] #=> 1 - h[:a] = 3 - h[:a] #=> 3 - -Again, if we try to set key that was not fixed, then we will get an error. - - expect ArgumentError do - h[:x] = 5 - end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/10_association.rdoc b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/10_association.rdoc deleted file mode 100644 index d8c29d43..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/10_association.rdoc +++ /dev/null @@ -1,59 +0,0 @@ -= Association - -An Association is a class for creating simple pairings. - - require 'hashery/association' - -An Association can bew created through the usual means -of instantiation. - - Association.new(:a, :b) - -Or the shortcut method #>> can be used in most cases. - - :x >> :z - -An association provides two methods to access its content, #index and #value. - - a = 'foo' >> 'bar' - - a.index.assert == 'foo' - a.value.assert == 'bar' - -Associations can be used to create ordered-hashes via normal -arrays. - - keys = [] - vals = [] - - ohash = [ 'A' >> '3', 'B' >> '2', 'C' >> '1' ] - - ohash.each{ |k,v| keys << k ; vals << v } - - keys.assert == ['A','B','C'] - vals.assert == ['3','2','1'] - - -Becuase Associations are objects in themselves more complex -collections can also be created. - - complex = [ - 'parent' >> 'child', - 'childless', - 'another_parent' >> [ - 'subchildless', - 'subparent' >> 'subchild' - ] - ] - -An experimental feature of Association keeps a cache of all defined associations. - - o = Object.new - o >> :a - o >> :b - o >> :c - - o.associations.assert == [:a, :b, :c] - -However this feature will probably be deprecated. - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/applique/ae.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/applique/ae.rb deleted file mode 100644 index ebab99a8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/applique/ae.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'ae' -require 'ae/should' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/applique/hashery.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/applique/hashery.rb deleted file mode 100644 index b0015268..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/demo/applique/hashery.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'hashery' - -include Hashery diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery.rb deleted file mode 100644 index 1255296c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Hashery - VERSION = "2.1.0" -end - -require 'hashery/core_ext' - -#require 'hashery/basic_struct' -require 'hashery/casting_hash' -require 'hashery/crud_hash' -require 'hashery/dictionary' -require 'hashery/fuzzy_hash' -require 'hashery/ini_hash' -require 'hashery/linked_list' -require 'hashery/lru_hash' -require 'hashery/key_hash' -require 'hashery/open_cascade' -require 'hashery/open_hash' -#require 'hashery/ordered_hash' -#require 'hashery/ostructable' -require 'hashery/property_hash' -require 'hashery/query_hash' -require 'hashery/static_hash' - - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery.yml b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery.yml deleted file mode 100644 index ead4e7a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery.yml +++ /dev/null @@ -1,78 +0,0 @@ ---- -revision: 2013 -type: ruby -sources: -- Index.yml -- Gemfile -authors: -- name: Trans - email: transfire@gmail.com -- name: Kirk Haines -- name: Robert Klemme -- name: Jan Molic -- name: George Moschovitis -- name: Jeena Paradies -- name: Erik Veenstra -organizations: -- name: RubyWorks (http://rubyworks.github.com/) -requirements: -- groups: - - development - - test - version: ">= 0" - name: qed -- groups: - - development - - test - version: ">= 0" - name: lemon -- groups: - - development - - test - version: ">= 0" - name: rubytest-cli -conflicts: [] -alternatives: [] -resources: -- type: home - uri: http://rubyworks.github.com/hashery - label: Homepage -- type: code - uri: http://github.com/rubyworks/hashery - label: Source Code -- type: mail - uri: http://groups.google.com/group/rubyworks-mailinglist - label: Mailing List -- type: docs - uri: http://rubydoc.info/github/rubyworks/hashery/master/frames - label: Documentation -- type: wiki - uri: http://wiki.github.com/rubyworks/hashery - label: User Guide -- type: gems - uri: http://rubygems.org/gems/hashery -repositories: -- name: upstream - scm: git - uri: git://github.com/rubyworks/hashery.git -categories: [] -copyrights: -- holder: Rubyworks - year: '2010' - license: BSD-2-Clause -customs: [] -paths: - lib: - - lib - - alt -name: hashery -title: Hashery -version: 2.1.2 -summary: Facets-bread collection of Hash-like classes. -description: The Hashery is a tight collection of Hash-like classes. Included among - its many offerings are the auto-sorting Dictionary class, the efficient LRUHash, - the flexible OpenHash and the convenient KeyHash. Nearly every class is a subclass - of the CRUDHash which defines a CRUD model on top of Ruby's standard Hash making - it a snap to subclass and augment to fit any specific use case. -created: '2010-04-21' -date: '2016-05-01' diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/association.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/association.rb deleted file mode 100644 index 5b937a24..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/association.rb +++ /dev/null @@ -1,222 +0,0 @@ -module Hashery - - # TODO: Should associations be singleton? - # - # TODO: Is it really wise to keep a table of all associations? - - # Association is a general binary association that allows one - # object to be associated with another. It has a variety of uses, - # such as linked-lists, simple ordered maps and mixed collections, - # among them. - # - # NOTE: This class is still fairly experimental. And it is not - # loaded along with the other Hashery libraries when using - # `require 'hashery'`. It must be required independently. - # - # Associations can be used to draw simple relationships. - # - # :Apple >> :Fruit - # :Apple >> :Red - # - # :Apple.associations #=> [ :Fruit, :Red ] - # - # It can also be used for simple lists of ordered pairs. - # - # c = [ :a >> 1, :b >> 2 ] - # c.each { |k,v| puts "#{k} associated with #{v} } - # - # produces - # - # a associated with 1 - # b associated with 2 - # - # The method :>> is used to construct the association. - # It is a rarely used method so it is generally available. - # But you can't use it for any of the following classes - # becuase they use #>> for other things. - # - # Bignum - # Fixnum - # Date - # IPAddr - # Process::Status - # - class Association - include Comparable - - class << self - # - # Store association references. - # - # Returns `Hash` of all associaitons. - # - def reference - @reference ||= Hash.new{ |h,k,v| h[k]=[] } - end - - # - # Shortcut for #new. - # - # index - The "index key" of the association. - # value - The "value" of the association. - # - # Returns `Association`. - # - def [](index, value) - new(index, value) - end - - #def new(index, value) - # lookup[[index, value]] ||= new(index, value) - #end - - #def lookup - # @lookup ||= {} - #end - end - - # - # The "index key" of the association. - # - attr_accessor :index - - # - # The "value" of the association. - # - attr_accessor :value - - # - # Initialize new Association. - # - # index - The "index key" of the association. - # value - The "value" of the association. - # - def initialize(index, value=nil) - @index = index - @value = value - - unless index.associations.include?(value) - index.associations << value - end - end - - # - # Compare the values of two associations. - # - # TODO: Comparions with non-associations? - # - # assoc - The other `Association`. - # - # Returns [Integer] `1`, `0`, or `-1`. - # - def <=>(assoc) - return -1 if self.value < assoc.value - return 1 if self.value > assoc.value - return 0 if self.value == assoc.value - end - - # - # Invert association, making the index the value and vice-versa. - # - # Returns [Array] with two-elements reversed. - # - def invert! - temp = @index - @index = @value - @value = temp - end - - # - # Produce a string representation. - # - # Returns [String]. - # - def to_s - return "#{index} >> #{value}" - end - - # - # Produce a literal code string for creating an association. - # - # Returns [String]. - # - def inspect - "#{index.inspect} >> #{value.inspect}" - end - - # - # Convert to two-element associative array. - # - # Returns [Array] Two-element Array of index and value pair. - # - def to_ary - [index, value] - end - - # - # Object extensions. - # - module Kernel - - # - # Define an association for +self+. - # - # to - The value of the association. - # - # Returns [Association]. - # - def >>(to) - Association.new(self, to) - end - - # - # List of associations for this object. - # - # Returns an `Array` of `Associations`. - # - def associations - Association.reference[self] - end - - end - - end - -end - -class Object #:nodoc: - include Hashery::Association::Kernel -end - -#-- -# Setup the >> method in classes that use it already. -# -# This is a bad idea b/c it can cause backward compability issues. -# -# class Bignum -# alias_method( :rshift, :>>) if method_defined?(:>>) -# remove_method :>> -# end -# -# class Fixnum -# alias_method( :rshift, :>>) if method_defined?(:>>) -# remove_method :>> -# end -# -# class Date -# alias_method( :months_later, :>>) if method_defined?(:>>) -# remove_method :>> -# end -# -# class IPAddr -# alias_method( :rshift, :>>) if method_defined?(:>>) -# remove_method :>> -# end -# -# class Process::Status -# alias_method( :rshift, :>>) if method_defined?(:>>) -# remove_method :>> -# end -#++ - -# Copyright (c) 2005 Rubyworks, Thomas Sawyer diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/casting_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/casting_hash.rb deleted file mode 100644 index 67c2aa82..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/casting_hash.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'hashery/crud_hash' - -module Hashery - - # CastingHash is just like CRUDHash, except that both keys and values - # can be passed through casting procedures. - # - class CastingHash < CRUDHash - - # - # Like `#new` but can take a priming Hash or Array-pairs. - # - # hash - Hash-like object. - # - # Examples - # - # CastingHash[:a,1,:b,2] - # - # Returns `CastingHash`. - # - def self.[](hash) - s = new - hash.each{ |k,v| s[k] = v } - s - end - - # - # Unlike traditional Hash a CastingHash's block argument - # coerces key/value pairs when #store is called. - # - # default - Default value. - # cast_proc - Casting procedure. - # - def initialize(default=nil, &cast_proc) - @cast_proc = cast_proc - super(default, &nil) - end - - # - # The cast procedure. - # - # proc - Casting procedure. - # - # Returns `Proc` used for casting. - # - def cast_proc(&proc) - @cast_proc = proc if proc - @cast_proc - end - - # - # Set `cast_proc`. This procedure must take two arguments (`key, value`) - # and return the same. - # - # proc - Casting procedure. - # - # Returns +proc+. - # - def cast_proc=(proc) - raise ArgumentError unless Proc === proc or NilClass === proc - @cast_proc = proc - end - - # - # CRUD method for create and update. Unlike the parent class - # the key, value pair are passed threw the cast_proc before - # being set in the underlying hash table. - # - # key - Key of entry. - # value - Value of entry. - # - # Returns the +value+. - # - def store(key, value) - super(*cast_pair(key, value)) - end - - # - # Replace current entries with those from another Hash, - # or Hash-like object. Each entry is run through the - # casting procedure as it is added. - # - # other - Hash-like object. - # - # Returns +self+. - # - def replace(other) - super cast(other) - end - - # - # Convert the CastingHash to a regular Hash. - # - # Returns an ordinary `Hash`. - # - def to_hash - h = {}; each{ |k,v| h[k] = v }; h - end - - # - # Returns an ordinary `Hash`. - # - alias_method :to_h, :to_hash - - # - # Recast all entries via the cast procedure. - # - # TODO: Isn't this the same as `#rehash`? - # - # Returns +self+. - # - def recast! - replace self - end - - private - - # - # If `cast_proc` is defined then use it to process key-value pair, - # otherwise return them as is. - # - # key - Key of entry. - # value - Value of entry. - # - # Returns `Array` of key-value pair. - # - def cast_pair(key, value) - if cast_proc - return cast_proc.call(key, value) - else - return key, value - end - end - - # - # Cast a given +hash+ according to the `#key_proc` and `#value_proc`. - # - # hash - A `Hash` or anything the responds to `#each` like a hash. - # - # Returns a recasted `Hash`. - # - def cast(hash) - h = {} - hash.each do |k,v| - k, v = cast_pair(k, v) - h[k] = v - end - h - end - - end - -end - -# TODO: Should we add #to_casting_hash to Hash classs? - -#class Hash -# -# # Convert a Hash to a CastingHash. -# def to_casting_hash(value_cast=nil, &key_cast) -# CastingHash.new(self, value_cast, &key_cast) -# end -# -#end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/core_ext.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/core_ext.rb deleted file mode 100644 index bdd4f5cd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/core_ext.rb +++ /dev/null @@ -1,119 +0,0 @@ -class Hash - - # - # Create a hash given an `initial_hash`. - # - # initial_hash - Hash or hash-like object to use as priming data. - # block - Procedure used by initialize (e.g. default_proc). - # - # Returns a `Hash`. - # - def self.create(initial_hash={}, &block) - o = new &block - o.update(initial_hash) - o - end - - # - # Like #fetch but returns the results of calling `default_proc`, if defined, - # otherwise `default`. - # - # key - Hash key to lookup. - # - # Returns value of Hash entry or `nil`. - # - def retrieve(key) - fetch(key, default_proc ? default_proc[self, key] : default) - end - - # - # Convert to Hash. - # - def to_hash - dup # -or- `h = {}; each{ |k,v| h[k] = v }; h` ? - end \ - unless method_defined?(:to_hash) - - # - # For a Hash, `#to_h` is the same as `#to_hash`. - # - alias :to_h :to_hash \ - unless method_defined?(:to_h) - - # - # Synonym for Hash#rekey, but modifies the receiver in place (and returns it). - # - # key_map - Hash of old key to new key. - # block - Procedure to convert keys, which can take just the key - # or both key and value as arguments. - # - # Examples - # - # foo = { :name=>'Gavin', :wife=>:Lisa } - # foo.rekey!{ |k| k.to_s } #=> { "name"=>"Gavin", "wife"=>:Lisa } - # foo.inspect #=> { "name"=>"Gavin", "wife"=>:Lisa } - # - # Returns `Hash`. - # - def rekey(key_map=nil, &block) - if !(key_map or block) - block = lambda{|k| k.to_sym} - end - - key_map ||= {} - - hash = {} - - (keys - key_map.keys).each do |key| - hash[key] = self[key] - end - - key_map.each do |from, to| - hash[to] = self[from] if key?(from) - end - - hash2 = {} - - if block - case block.arity - when 0 - raise ArgumentError, "arity of 0 for #{block.inspect}" - when 2 - hash.each do |k,v| - nk = block.call(k,v) - hash2[nk] = v - end - else - hash.each do |k,v| - nk = block[k] - hash2[nk] = v - end - end - else - hash2 = hash - end - - hash2 - end - - # - # Synonym for Hash#rekey, but modifies the receiver in place (and returns it). - # - # key_map - Hash of old key to new key. - # block - Procedure to convert keys, which can take just the key - # or both key and value as arguments. - # - # Examples - # - # foo = { :name=>'Gavin', :wife=>:Lisa } - # foo.rekey!{ |k| k.to_s } #=> { "name"=>"Gavin", "wife"=>:Lisa } - # foo #=> { "name"=>"Gavin", "wife"=>:Lisa } - # - # Returns `Hash`. - # - def rekey!(key_map=nil, &block) - replace(rekey(key_map, &block)) - end - -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/crud_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/crud_hash.rb deleted file mode 100644 index 906fb24b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/crud_hash.rb +++ /dev/null @@ -1,405 +0,0 @@ -require 'hashery/core_ext' - -module Hashery - - # The CRUDHash is essentailly the same as the Hash class, but it reduces the - # the set of necessary methods to the fundametal CRUD requirements. All other - # methods route through these CRUD methods. This is a better general design, - # although it is, of course, a little bit slower. The utility of this class - # becomes appearent when subclassing or delegating, as only a handful of methods - # need to be changed for all other methods to work accordingly. - # - # In addition to the CRUD features, CRUDHash supports a `#key_proc`, akin to - # `#default_proc`, that can be used to normalize keys. - # - # The CRUD methods are: - # - # * key? - # * fetch - # * store - # * delete - # - # In addition to these main methods, there are these supporting "CRUD" methods: - # - # * default - # * default_proc - # * default_proc= - # * key_proc - # * key_proc= - # - class CRUDHash < ::Hash - - # - # Dummy object for null arguments. - # - NA = Object.new - - # - # This method is overridden to ensure that new entries pass through - # the `#store` method. - # - # hash - [#each] Single Hash, associative array or just a list of pairs. - # - def self.[](*hash) - h = new - if hash.size == 1 - hash.first.each do |k,v| - h.store(k, v) - end - else - hash.each do |(k,v)| - h.store(k, v) - end - end - h - end - - # - # Alternate to #new which auto-creates sub-dictionaries as needed. - # By default the `default_proc` procuced a empty Hash and is - # self-referential so every such Hash also has the same `default_proc`. - # - # args - Pass-thru arguments to `#new`. - # block - Alternate internal procedure for default proc. - # - # Examples - # - # d = CRUDHash.auto - # d["a"]["b"]["c"] = "abc" #=> { "a"=>{"b"=>{"c"=>"abc"}}} - # - # Returns `Hash`. - # - def self.auto(*args, &block) - if block - leet = lambda { |hsh, key| hsh[key] = block.call(hsh, key) } - else - leet = lambda { |hsh, key| hsh[key] = new(&leet) } - end - new(*args, &leet) - end - - # - # Set `key_proc`. - # - # Examples - # - # ch = CRUDHash.new - # ch.key_proc = Proc.new{ |key| key.to_sym } - # - # Returns `Proc`. - # - def key_proc=(proc) - raise ArgumentError unless Proc === proc or NilClass === proc - @key_proc = proc - end - - # - # Get/set `key_proc`. - # - # Examples - # - # ch = CRUDHash.new - # ch.key_proc - # - # Returns `Proc`. - # - def key_proc(&block) - @key_proc = block if block - @key_proc - end - - # - # Allow `#default_proc` to take a block. - # - # block - The `Proc` object to set the `default_proc`. - # - # Returns `Proc`, the `default_proc`. - # - def default_proc(&block) - self.default_proc = block if block - super() - end - - # - # CRUD method for checking if key exists. - # - # key - Hash key to lookup. - # - # Returns `true/false`. - # - def key?(key) - super cast_key(key) - end - - # - # CRUD method for read. This method gets the value for a given key. - # An error is raised if the key is not present, but an optional argument - # can be provided to be returned instead. - # - # key - Hash key to lookup. - # default - Value to return if key is not present. - # - # Raises KeyError when key is not found and default has not been given. - # - # Returns the `Object` that is the Hash entry's value. - # - def fetch(key, *default) - super(cast_key(key), *default) - end - - # - # CRUD method for create and update. - # - # key - The `Object` to act as indexing key. - # value - The `Object` to associate with key. - # - # Returns +value+. - # - def store(key, value) - super(cast_key(key), value) - end - - # - # CRUD method for delete. - # - # key - Hash key to remove. - # - # Returns value of deleted Hash entry. - # - def delete(key) - super cast_key(key) - end - - # END OF CRUD METHODS - - # - # Like #fetch but returns the results of calling `default_proc`, if defined, - # otherwise `default`. - # - # key - Hash key to lookup. - # - # Returns value of Hash entry or `nil`. - # - def retrieve(key) - if key?(key) - fetch(key) - else - default_proc ? default_proc.call(self, key) : default - end - end - - # - # Method for reading value. Returns `nil` if key is not present. - # - # Note that this method used to be the CRUD method instead of #retrieve. Complaints about - # #read being indicative of an IO object (though in my opinion that is a bad asumption) have - # led to this method's deprecation. - # - # key - Hash key to lookup. - # - # Returns value of Hash entry. - # - def read(key) - warn "The #read method as been deprecated. Use #retrieve instead." - retrieve(key) - end - - # - # Update Hash with +assoc+. - # - # assoc - Two-element `Array` or a `Hash`. - # - # Returns +assoc+. - # - def <<(assoc) - case assoc - when Hash - update(assoc) - when Array - assoc.each_slice(2) do |(k,v)| - store(k,v) - end - else - raise ArgumentError # or TypeError ? - end - end - - # - # Operator for `#retrieve`. - # - # key - Index key to lookup. - # - # Returns `Object` value of key. - # - def [](key) - retrieve(key) - end - - # - # Operator for `#store`. - # - # key - The `Object` to act as indexing key. - # value - The `Object` to associate with key. - # - # Returns +value+. - # - def []=(key,value) - store(key,value) - end - - # - # Update the Hash with another hash. - # - # other - Other hash or hash-like object to add to the hash. - # - # Returns +self+. - # - def update(other) - other.each do |k,v| - store(k, v) - end - self - end - - # - # Alias for `#update`. - # - alias merge! update - - # - # Merge the Hash with another hash, returning a new Hash. - # - # other - Other hash or hash-like object to add to the hash. - # - # Returns `Hash`. - # - def merge(other) - #super(other.rekey{ |key| cast_key(key) }) - copy = dup - other.each{ |k,v| copy.store(k, v) } - copy - end - - # - # Iterate over each hash pair. - # - def each #:yield: - if block_given? - keys.each do |k| - yield(k, retrieve(k)) - end - else - to_enum(:each) - end - end - - # - # Alias for #each. - # - alias each_pair each - - # - # Alias for `#key?`. - # - alias has_key? key? - - # - # Alias for `#key?`. - # - alias member? key? - - # - # Alias for `#key?`. - # - alias include? key? # why isn't it an alias for `#has_value?` ? - - # - # Replace current entries with those from another Hash, - # or Hash-like object. Each entry is run through the - # casting procedure as it is added. - # - # other - Hash-like object. - # - # Returns +self+. - # - def replace(other) - super cast(other) - end - - # - # Get the values at. - # - # keys - List of keys to lookup. - # - # Returns `Array` of values. - # - def values_at(*keys) - super *keys.map{ |key| cast_key(key) } - end - - # Convert CRUDHash to regular Hash. - # - # TODO: Since a CRUDHash is a subclass of Hash should #to_hash just `#dup` - # insted of converting to traditional Hash? - # - def to_hash - h = {}; each{ |k,v| h[k] = v }; h - end #unless method_defined?(:to_hash) - - # - # Convert CRUDHash to regular Hash. - # - # TODO: Since a CRUDHash is a subclass of Hash should #to_h just `#dup` - # insted of converting to traditional Hash? - # - # Returns `Hash`. - # - alias :to_h :to_hash - - private - - # - # Cast a given `hash` in accordance to the `#key_proc`. - # - # hash - Any object the responds to `#each` like a Hash. - # - # Returns `Hash`. - # - def cast(hash) - h = {} - hash.each do |k,v| - h[cast_key(k)] = v - end - h - end - - # - # Callback for normalizing hash keys. - # - # key - Index key. - # - # Returns key after passing through the `key_proc`. - # - def cast_key(key) - @key_proc ? @key_proc.call(key) : key - end - - # TODO: Consider value callback procs for future version of CRUDHash. - # - # # - # # Callback for writing value. - # # - # def cast_write(value) - # @write_proc ? @write_proc.call(value) : value - # end - # - # # - # # Callback for reading value. - # # - # def cast_read(value) - # @read_proc ? @read_proc.call(value) : value - # end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/dictionary.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/dictionary.rb deleted file mode 100644 index 15834a9c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/dictionary.rb +++ /dev/null @@ -1,641 +0,0 @@ -module Hashery - - # The Dictionary class is a Hash that preserves order. - # So it has some array-like extensions also. By defualt - # a Dictionary object preserves insertion order, but any - # order can be specified including alphabetical key order. - # - # Using a Dictionary is almost the same as using a Hash. - # - # # You can do simply - # hsh = Dictionary.new - # hsh['z'] = 1 - # hsh['a'] = 2 - # hsh['c'] = 3 - # p hsh.keys #=> ['z','a','c'] - # - # # or using Dictionary[] method - # hsh = Dictionary['z', 1, 'a', 2, 'c', 3] - # p hsh.keys #=> ['z','a','c'] - # - # # but this don't preserve order - # hsh = Dictionary['z'=>1, 'a'=>2, 'c'=>3] - # p hsh.keys #=> ['a','c','z'] - # - # # Dictionary has useful extensions: push, pop and unshift - # p hsh.push('to_end', 15) #=> true, key added - # p hsh.push('to_end', 30) #=> false, already - nothing happen - # p hsh.unshift('to_begin', 50) #=> true, key added - # p hsh.unshift('to_begin', 60) #=> false, already - nothing happen - # p hsh.keys #=> ["to_begin", "a", "c", "z", "to_end"] - # p hsh.pop #=> ["to_end", 15], if nothing remains, return nil - # p hsh.keys #=> ["to_begin", "a", "c", "z"] - # p hsh.shift #=> ["to_begin", 30], if nothing remains, return nil - # - # == Notes - # - # * You can use #order_by to set internal sort order. - # * #<< takes a two element [k,v] array and inserts. - # * Use ::auto which creates Dictionay sub-entries as needed. - # * And ::alpha which creates a new Dictionary sorted by key. - # - # == Acknowledgments - # - # Dictionary is a port of OrderHash 2.0 Copyright (c) 2005 Jan Molic. - # - # People who have contributed to this class since then include: - # - # * Andrew Johnson (merge, to_a, inspect, shift and Hash[]) - # * Jeff Sharpe (reverse and reverse!) - # * Thomas Leitner (has_key? and key?) - # - # OrderedHash is public domain. - # - class Dictionary - - include Enumerable - - class << self - - # - # Create a new Dictionary storing argument pairs as an initial mapping. - # - # TODO: Is this needed? Doesn't the super class do this? - # - # Returns Dictionary instance. - # - def [](*args) - hsh = new - if Hash === args[0] - hsh.replace(args[0]) - elsif (args.size % 2) != 0 - raise ArgumentError, "odd number of elements for Hash" - else - while !args.empty? - hsh[args.shift] = args.shift - end - end - hsh - end - - # - # Like #new but the block sets the order instead of the default. - # - # Dictionary.new_by{ |k,v| k } - # - def new_by(*args, &blk) - new(*args).order_by(&blk) - end - - # - # Alternate to #new which creates a dictionary sorted by the key as a string. - # - # d = Dictionary.alphabetic - # d["z"] = 1 - # d["y"] = 2 - # d["x"] = 3 - # d #=> {"x"=>3,"y"=>2,"z"=>2} - # - # This is equivalent to: - # - # Dictionary.new.order_by { |key,value| key.to_s } - # - def alphabetic(*args, &block) - new(*args, &block).order_by { |key,value| key.to_s } - end - - # DEPRECATED: Use #alphabetic instead. - alias :alpha :alphabetic - - # - # Alternate to #new which auto-creates sub-dictionaries as needed. - # - # Examples - # - # d = Dictionary.auto - # d["a"]["b"]["c"] = "abc" #=> { "a"=>{"b"=>{"c"=>"abc"}}} - # - def auto(*args) - #AutoDictionary.new(*args) - leet = lambda { |hsh, key| hsh[key] = new(&leet) } - new(*args, &leet) - end - end - - # - # New Dictiionary. - # - def initialize(*args, &blk) - @order = [] - @order_by = nil - if blk - dict = self # This ensures automatic key entry effect the - oblk = lambda{ |hsh, key| blk[dict,key] } # dictionary rather then just the interal hash. - @hash = Hash.new(*args, &oblk) - else - @hash = Hash.new(*args) - end - end - - # - # Order of keys. - # - # Returns [Array]. - # - def order - reorder if @order_by - @order - end - - # - # Keep dictionary sorted by a specific sort order. - # - # block - Ordering procedure. - # - # Returns +self+. - # - def order_by( &block ) - @order_by = block - order - self - end - - # - # Keep dictionary sorted by key. - # - # d = Dictionary.new.order_by_key - # d["z"] = 1 - # d["y"] = 2 - # d["x"] = 3 - # d #=> {"x"=>3,"y"=>2,"z"=>2} - # - # This is equivalent to: - # - # Dictionary.new.order_by { |key,value| key } - # - # The initializer Dictionary#alpha also provides this. - # - # Returns +self+. - # - def order_by_key - if block_given? - @order_by = Proc.new{ |k,v| yield(k) } - else - @order_by = Proc.new{ |k,v| k } - end - order - self - end - - # - # Keep dictionary sorted by value. - # - # d = Dictionary.new.order_by_value - # d["z"] = 1 - # d["y"] = 2 - # d["x"] = 3 - # d #=> {"x"=>3,"y"=>2,"z"=>2} - # - # This is equivalent to: - # - # Dictionary.new.order_by { |key,value| value } - # - def order_by_value - if block_given? - @order_by = Proc.new{ |k,v| yield(v) } - else - @order_by = Proc.new{ |k,v| v } - end - order - self - end - - # - # Re-apply the sorting procedure. - # - def reorder - if @order_by - assoc = @order.collect{ |k| [k,@hash[k]] }.sort_by(&@order_by) - @order = assoc.collect{ |k,v| k } - end - @order - end - - #def ==( hsh2 ) - # return false if @order != hsh2.order - # super hsh2 - #end - - # - # Is the dictionary instance equivalent to another? - # - def ==(hsh2) - if hsh2.is_a?( Dictionary ) - @order == hsh2.order && - @hash == hsh2.instance_variable_get("@hash") - else - false - end - end - - # - # Lookup entry with key. - # - def [] key - @hash[ key ] - end - - # - # Featch entry given +key+. - # - def fetch(key, *a, &b) - @hash.fetch(key, *a, &b) - end - - # - # Store operator. - # - # h[key] = value - # - # Or with additional index. - # - # h[key,index] = value - # - def []=(k, i=nil, v=nil) - if v - insert(i,k,v) - else - store(k,i) - end - end - - # - # Insert entry into dictionary at specific index position. - # - # index - [Integer] Position of order placement. - # key - [Object] Key to associate with value. - # value - [Object] Value to associate with key. - # - # Returns `value` stored. - # - def insert(index, key, value) - @order.insert(index, key) - @hash.store(key, value) - end - - # - # Add entry into dictionary. - # - # Returns `value`. - # - def store(key, value) - @order.push(key) unless @hash.has_key?(key) - @hash.store(key, value) - end - - # - # Clear dictionary of all entries. - # - def clear - @order = [] - @hash.clear - end - - # - # Delete the entry with given +key+. - # - def delete(key) - @order.delete(key) - @hash.delete(key) - end - - # - # Iterate over each key. - # - def each_key - order.each { |k| yield( k ) } - self - end - - # - # Iterate over each value. - # - def each_value - order.each { |k| yield( @hash[k] ) } - self - end - - # - # Iterate over each key-value pair. - # - def each - order.each { |k| yield( k,@hash[k] ) } - self - end - - alias each_pair each - - # - # Delete entry if it fits conditional block. - # - def delete_if - order.clone.each { |k| delete k if yield(k,@hash[k]) } - self - end - - # - # List of all dictionary values. - # - # Returns [Array]. - # - def values - ary = [] - order.each { |k| ary.push @hash[k] } - ary - end - - # - # List of all dictionary keys. - # - # Returns [Array]. - # - def keys - order - end - - # - # Invert the dictionary. - # - # Returns [Dictionary] New dictionary that is inverse of the original. - # - def invert - hsh2 = self.class.new - order.each { |k| hsh2[@hash[k]] = k } - hsh2 - end - - # - # Reject entries based on give condition block and return - # new dictionary. - # - # Returns [Dictionary]. - # - def reject(&block) - self.dup.delete_if(&block) - end - - # - # Reject entries based on give condition block. - # - # Returns [Hash] of rejected entries. - # - # FIXME: This looks like it is implemented wrong!!! - # - def reject!( &block ) - hsh2 = reject(&block) - self == hsh2 ? nil : hsh2 - end - - # - # Replace dictionary entries with new table. - # - def replace(hsh2) - case hsh2 - when Dictionary - @order = hsh2.order - @hash = hsh2.to_h - when Hash - @hash = hsh2 - @order = @hash.keys - else - @hash = hsh2.to_h - @order = @hash.keys - end - reorder - end - - # - # Remove entry from the to top of dictionary. - # - def shift - key = order.first - key ? [key,delete(key)] : super - end - - # - # Push entry on to the top of dictionary. - # - def unshift( k,v ) - unless @hash.include?( k ) - @order.unshift( k ) - @hash.store( k,v ) - true - else - false - end - end - - # - # Same as #push. - # - def <<(kv) - push(*kv) - end - - # - # Push entry on to bottom of the dictionary. - # - def push(k,v) - unless @hash.include?( k ) - @order.push( k ) - @hash.store( k,v ) - true - else - false - end - end - - # - # Pop entry off the bottom of dictionary. - # - def pop - key = order.last - key ? [key,delete(key)] : nil - end - - # - # Inspection string for Dictionary. - # - # Returns [String]. - # - def inspect - ary = [] - each {|k,v| ary << k.inspect + "=>" + v.inspect} - '{' + ary.join(", ") + '}' - end - - # - # Duplicate dictionary. - # - # Returns [Dictionary]. - # - def dup - a = [] - each{ |k,v| a << k; a << v } - self.class[*a] - end - - # - # Update dictionary with other hash. - # - # Returns self. - # - def update( hsh2 ) - hsh2.each { |k,v| self[k] = v } - reorder - self - end - - alias :merge! update - - # - # Merge other hash creating new dictionary. - # - # Returns [Dictionary]. - # - def merge(hsh2) - self.dup.update(hsh2) - end - - # - # Select items from dictiornary. - # - # Returns [Array] of two-element arrays. - # - def select - ary = [] - each { |k,v| ary << [k,v] if yield k,v } - ary - end - - # - # Reverse the order of the dictionary. - # - # Returns self. - # - def reverse! - @order.reverse! - self - end - - # - # Reverse the order of duplicte dictionary. - # - # Returns [Dictionary]. - # - def reverse - dup.reverse! - end - - # - # Get/set initial entry value. - # - def first(x=nil) - return @hash[order.first] unless x - order.first(x).collect { |k| @hash[k] } - end - - # - # Get/set last entry value. - # - def last(x=nil) - return @hash[order.last] unless x - order.last(x).collect { |k| @hash[k] } - end - - # - # Number of items in the dictionary. - # - def length - @order.length - end - - alias :size :length - - # - # Is the dictionary empty? - # - # Returns `true` or `false`. - # - def empty? - @hash.empty? - end - - # - # Does the dictionary have a given +key+. - # - # Returns `true` or `false`. - # - def has_key?(key) - @hash.has_key?(key) - end - - # - # Does the dictionary have a given +key+. - # - # Returns `true` or `false`. - # - def key?(key) - @hash.key?(key) - end - - # - # Convert to array. - # - # Returns [Array] of two-element arrays. - # - def to_a - ary = [] - each { |k,v| ary << [k,v] } - ary - end - - # - # Convert to array then to string. - # - # Returns [String]. - # - def to_s - self.to_a.to_s - end - - # - # Get a duplicate of the underlying hash table. - # - # Returns [Hash]. - # - def to_hash - @hash.dup - end - - # - # Get a duplicate of the underlying hash table. - # - # Returns [Hash]. - # - def to_h - @hash.dup - end - - protected - - # - # Underlying hash table. - # - def hash_table - @hash - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/fuzzy_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/fuzzy_hash.rb deleted file mode 100644 index 63a6544d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/fuzzy_hash.rb +++ /dev/null @@ -1,206 +0,0 @@ -require 'set' - -module Hashery - - # FuzzyHash is a weird hash with special semantics for regex keys. - # - # This is useful when you want to have a lookup table that can either contain strings or regexes. - # For instance, you might want a catch all for certain regexes that perform a certain logic. - # - # >> hash = FuzzyHash.new - # >> hash[/^\d+$/] = 'number' - # >> hash[/.*/] = 'something' - # >> hash['chunky'] = 'bacon' - # >> hash['foo'] = 'vader' - # - # >> hash['foo'] - # << 'vader' - # >> hash['food'] - # << 'something' - # >> hash['123'] - # << 'number' - # - # This class is based on Joshua Hull's original FuzzyHash class. - # - class FuzzyHash - - # - # - # - def initialize(init_hash = nil) - @fuzzies = [] - @hash_reverse = {} - @fuzzies_reverse = {} - @fuzzy_hash = {} - @hash = {} - init_hash.each{ |key,value| self[key] = value } if init_hash - end - - # - # - # - def clear - hash.clear - fuzzies.clear - hash_reverse.clear - fuzzies_reverse.clear - end - - # - # - # - def size - hash.size + fuzzies.size - end - - alias_method :count, :size - - # - # - # - def ==(o) - o.is_a?(FuzzyHash) - o.send(:hash) == hash && - o.send(:fuzzies) == fuzzies - end - - # - # - # - def empty? - hash.empty? && fuzzies.empty? - end - - # - # - # - def keys - hash.keys + fuzzy_hash.keys - end - - # - # - # - def values - hash.values + fuzzies.collect{|r| r.last} - end - - # - # - # - def each - hash.each{|k,v| yield k,v } - fuzzies.each{|v| yield v.first, v.last } - end - - # - # - # - def delete_value(value) - hash.delete(hash_reverse[value]) || ((rr = fuzzies_reverse[value]) && fuzzies.delete_at(rr[0])) - end - - # - # - # - def []=(key, value) - if Regexp === key - fuzzies.delete_if{|f| f.first.inspect.hash == key.inspect.hash} - fuzzies_reverse.delete_if{|k, v| v[1].inspect.hash == key.inspect.hash} - hash_reverse.delete_if{|k,v| v.inspect.hash == key.inspect.hash} - - fuzzy_hash[key] = value - fuzzies << [key, value] - reset_fuzz_test! - fuzzies_reverse[value] = [fuzzies.size - 1, key, value] - else - hash[key] = value - hash_reverse.delete_if{|k,v| v.hash == key.hash} - hash_reverse[value] = key - end - value - end - - # - # - # - def replace(src, dest) - if hash_reverse.key?(src) - key = hash_reverse[src] - hash[key] = dest - hash_reverse.delete(src) - hash_reverse[dest] = key - elsif fuzzies_reverse.key?(src) - key = fuzzies_reverse[src] - fuzzies[rkey[0]] = [rkey[1], dest] - fuzzies_reverse.delete(src) - fuzzies_reverse[dest] = [rkey[0], rkey[1], dest] - end - end - - # - # - # - def [](key) - (hash.key?(key) && hash[key]) || - ((lookup = fuzzy_lookup(key)) && lookup && lookup.first) || - fuzzy_hash[key] - end - - # - # - # - def match_with_result(key) - if hash.key?(key) - [hash[key], key] - else - fuzzy_lookup(key) - end - end - - private - - attr_reader :fuzzies, :hash_reverse, :fuzzies_reverse, :hash, :fuzzy_hash - attr_writer :fuzz_test - - # - # - # - def reset_fuzz_test! - self.fuzz_test = nil - end - - # - # - # - def fuzz_test - unless @fuzz_test - @fuzz_test = Object.new - @fuzz_test.instance_variable_set(:'@fuzzies', fuzzies) - method = " - def match(str) - case str\n - " - fuzzies.each_with_index do |reg, index| - method << "when #{reg.first.inspect}; [@fuzzies[#{index}][1], Regexp.last_match(0)];" - end - method << "end\nend\n" - @fuzz_test.instance_eval method - end - @fuzz_test - end - - # - # - # - def fuzzy_lookup(key) - if !fuzzies.empty? && (value = fuzz_test.match(key)) - value - end - end - - end - -end - -# Copyright (c) 2009 Joshua Hull diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/ini_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/ini_hash.rb deleted file mode 100644 index ee84f5a2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/ini_hash.rb +++ /dev/null @@ -1,321 +0,0 @@ -module Hashery - - # Hash class with methods to read from and write into ini files. - # - # A ini file is a text file in a specific format, - # it may include several fields which are sparated by - # field headlines which are enclosured by "[]". - # Each field may include several key-value pairs. - # - # Each key-value pair is represented by one line and - # the value is sparated from the key by a "=". - # - # == Examples - # - # === Example ini file - # - # # this is the first comment which will be saved in the comment attribute - # mail=info@example.com - # domain=example.com # this is a comment which will not be saved - # [database] - # db=example - # user=john - # passwd=very-secure - # host=localhost - # # this is another comment - # [filepaths] - # tmp=/tmp/example - # lib=/home/john/projects/example/lib - # htdocs=/home/john/projects/example/htdocs - # [ texts ] - # wellcome=Wellcome on my new website! - # Website description = This is only a example. # and another comment - # - # === Example object - # - # Ini#comment stores: - # - # "this is the first comment which will be saved in the comment attribute" - # - # Ini's internal hash stores: - # - # { - # "mail" => "info@example.com", - # "domain" => "example.com", - # "database" => { - # "db" => "example", - # "user" => "john", - # "passwd" => "very-secure", - # "host" => "localhost" - # }, - # "filepaths" => { - # "tmp" => "/tmp/example", - # "lib" => "/home/john/projects/example/lib", - # "htdocs" => "/home/john/projects/example/htdocs" - # } - # "texts" => { - # "wellcome" => "Wellcome on my new website!", - # "Website description" => "This is only a example." - # } - # } - # - # As you can see this module gets rid of all comments, linebreaks - # and unnecessary spaces at the beginning and the end of each - # field headline, key or value. - # - # === Using the object - # - # Using the object is stright forward: - # - # ini = IniHash.new("path/settings.ini") - # ini["mail"] = "info@example.com" - # ini["filepaths"] = { "tmp" => "/tmp/example" } - # ini.comment = "This is\na comment" - # puts ini["filepaths"]["tmp"] - # # => /tmp/example - # ini.write() - # - # == Acknowlegements - # - # IniHash is based on ini.rb. - # - # Copyright (C) 2007 Jeena Paradies - - class IniHash - - # TODO: Use class method for loading from file, not initializer. - - # - # NOTE: In future versions, `#new` will not take a path, and `#load` - # will have to be used. - # - def self.load(path, load=true) - new(path, load) - end - - # - # The hash which holds all INI data. - # - attr_accessor :inihash - - # - # The string which holds the comments on the top of the file - # - attr_accessor :comment - - # - # Creating a new IniHash object. - # - # path - is a path to the ini file - # load - if nil restores the data if possible - # if true restores the data, if not possible raises an error - # if false does not resotre the data - # - def initialize(path, load=nil) - @path = path if String === path - @inihash = (Hash === path ? path.dup : {}) - - if load or ( load.nil? and FileTest.readable_real? @path ) - restore() - end - end - - # - # Retrive the ini data for the key +key+ - # - def [](key) - @inihash[key] - end - - # - # Set the ini data for the key +key+ - # - # key - Index key. - # value - The value to index. - # - # Returns +value+. - # - def []=(key, value) - #raise TypeError, "String expected" unless key.is_a? String - key = key.to_str - - #raise TypeError, "String or Hash expected" unless value.is_a? String or value.is_a? Hash - value = value.to_str unless Hash === value - - @inihash[key] = value - end - - # - # Restores the data from file into the object - # - def restore - @inihash = IniHash.read_from_file(@path) - @comment = IniHash.read_comment_from_file(@path) - end - - # - # Store data from the object in the file. - # - def save - IniHash.write_to_file(@path, @inihash, @comment) - end - - # - # Deprecated: Save INI data to file path. Use #save instead. - # - def update - warn 'IniHash#update is deprecated for this use, use IniHash#save instead.' - save - end - - # - # Convert to hash by duplicating the underlying hash table. - # - def to_h - @inihash.dup - end - - alias :inspect :to_s - - # - # Turn a hash (up to 2 levels deepness) into a ini string - # - # inihash - Hash representing the ini File. Default is a empty hash. - # - # Returns a string in the ini file format. - # - def to_s - str = "" - inihash.each do |key, value| - if value.is_a? Hash - str << "[#{key.to_s}]\n" - value.each do |under_key, under_value| - str << "#{under_key.to_s}=#{under_value.to_s unless under_value.nil?}\n" - end - else - str << "#{key.to_s}=#{value.to_s unless value.nil?}\n" - end - end - str - end - - # - # Delegate missing mthods to underlying Hash. - # - # TODO: Sublcass Hash instead of delegating. - # - def method_missing(s,*a,&b) - @inihash.send(s, *a, &b) if @inihash.respond_to?(s) - end - - # - # Reading data from file - # - # path - a path to the ini file - # - # Returns a `Hash` which represents the data from the file. - # - def self.read_from_file(path) - raise "file not found - #{path}" unless File.file?(path) - - inihash = {} - headline = nil - - IO.foreach(path) do |line| - line = line.strip.split(/#/)[0].to_s - - # read it only if the line doesn't begin with a "=" and is long enough - unless line.length < 2 and line[0,1] == "=" - - # it's a headline if the line begins with a "[" and ends with a "]" - if line[0,1] == "[" and line[line.length - 1, line.length] == "]" - - # get rid of the [] and unnecessary spaces - headline = line[1, line.length - 2 ].strip - inihash[headline] = {} - else - key, value = line.split(/=/, 2) - - key = key.strip unless key.nil? - value = value.strip unless value.nil? - - unless headline.nil? - inihash[headline][key] = value - else - inihash[key] = value unless key.nil? - end - end - end - end - - inihash - end - - # - # Reading comments from file - # - # path - a path to the INI file - # - # Returns a `String` with the comments from the beginning of the INI file. - # - def self.read_comment_from_file(path) - comment = "" - - IO.foreach(path) do |line| - line.strip! - - break unless line[0,1] == "#" or line == "" - - comment_line = line[1, line.length].to_s - comment << "#{comment_line.strip}\n" - end - - comment - end - - # - # Writing a ini hash into a file - # - # path - Path to the INI file. - # inihash - Hash representing the ini File. Default is a empty hash. - # comment - String with comments which appear on the - # top of the file. Each line will get a "#" before. - # Default is no comment. - # - def self.write_to_file(path, inihash={}, comment=nil) - raise TypeError, "String expected" unless comment.is_a? String or comment.nil? - - raise TypeError, "Hash expected" unless inihash.is_a? Hash - File.open(path, "w") { |file| - - unless comment.nil? - comment.each do |line| - file << "# #{line}" - end - end - - file << IniHash.text(inihash) - } - end - - # - # Turn a hash (up to 2 levels deepness) into a ini string - # - # inihash - Hash representing the ini File. Default is a empty hash. - # - # Returns a String in the ini file format. - # - # TODO: Rename `IniHash.text` method to something else ? - # - def self.text(inihash={}) - new(inihash).to_s - end - - class << self - # @deprecated - alias_method :to_s, :text - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/key_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/key_hash.rb deleted file mode 100644 index ef37753d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/key_hash.rb +++ /dev/null @@ -1,61 +0,0 @@ -require 'hashery/crud_hash' - -module Hashery - - # The KeyHash class is a Hash class which accepts a block for - # normalizing keys. - # - # The KeyHash class is essentially the same as a normal Hash. - # But notice the significant distinction of indifferent key - # access. - # - # s = KeyHash.new - # s[:x] = 1 - # s[:x] #=> 1 - # s['x'] #=> 1 - # - # We can see that internally the key has indeed been converted - # to a String. - # - # s.to_h #=> {'x'=>1 } - # - # By default all keys are converted to strings. This has two advantages - # over a regular Hash is many usecases. First it means hash entries have - # indifferent access. 1, "1" and :1 are all - # equivalent --any object that defines #to_s can be used as a key. - # Secondly, since strings are garbage collected so will default KeyHash - # objects. - # - # But keys can be normalized by any function. Theses functions can be quite - # unique. - # - # h = KeyHash.new(0){ |k| k.to_i } - # h[1.34] += 1 - # h[1.20] += 1 - # h[1.00] += 1 - # h #=> { 1 => 3 } - # - class KeyHash < CRUDHash - - # - # Unlike a regular Hash, a KeyHash's block sets the `key_proc` rather - # than the `default_proc`. - # - def initialize(*default, &block) - super(*default) - @key_proc = block || Proc.new{ |k| k.to_s } - end - - end - -end - -#class Hash -# # -# # Convert a Hash to a KeyHash object. -# # -# def to_keyhash -# Hashery::KeyHash[self] -# end -#end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/linked_list.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/linked_list.rb deleted file mode 100644 index a134da71..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/linked_list.rb +++ /dev/null @@ -1,249 +0,0 @@ -require 'enumerator' - -module Hashery - - # LinkedList implements a simple doubly linked list with efficient - # hash-like element access. - # - # This is a simple linked-list implementation with efficient random - # access of data elements. It was inspired by George Moscovitis' - # LRUCache implementation found in Facets 1.7.30, but unlike the - # linked-list in that cache, this one does not require the use of a - # mixin on any class to be stored. The linked-list provides the - # push, pop, shift, unshift, first, last, delete and length methods - # which work just like their namesakes in the Array class, but it - # also supports setting and retrieving values by key, just like a - # hash. - # - # LinkedList was ported from the original in Kirk Hanes IOWA web framework. - # - # == Acknowledgements - # - # LinkedList is based on the LinkedList library by Kirk Haines. - # - # Copyright (C) 2006 Kirk Haines . - # - class LinkedList - - include Enumerable - - # Represents a single node of the linked list. - # - class Node - attr_accessor :key, :value, :prev_node, :next_node - - def initialize(key=nil,value=nil,prev_node=nil,next_node=nil) - @key = key - @value = value - @prev_node = prev_node - @next_node = next_node - end - end - - # - # Initialize new LinkedList instance. - # - def initialize - @head = Node.new - @tail = Node.new - @lookup = Hash.new - - node_join(@head,@tail) - end - - # - # Lookup entry by key. - # - def [](key) - @lookup[key].value - end - - # - # Add node to linked list. - # - def []=(k,v) - if @lookup.has_key?(k) - @lookup[k].value = v - else - n = Node.new(k,v,@head,@head.next_node) - node_join(n,@head.next_node) - node_join(@head,n) - @lookup[k] = n - end - v - end - - # - # Is linked list empty? - # - def empty? - @lookup.empty? - end - - # - # Remove node idenified by key. - # - def delete(key) - n = @lookup.delete(key) - v = n ? node_purge(n) : nil - v - end - - # - # Get value of first node. - # - def first - @head.next_node.value - end - - # - # Get value of last node. - # - def last - @tail.prev_node.value - end - - # - # - # - def shift - k = @head.next_node.key - n = @lookup.delete(k) - node_delete(n) if n - end - - # - # - # - def unshift(v) - if @lookup.has_key?(v) - n = @lookup[v] - node_delete(n) - node_join(n,@head.next_node) - node_join(@head,n) - else - n = Node.new(v,v,@head,@head.next_node) - node_join(n,@head.next_node) - node_join(@head,n) - @lookup[v] = n - end - v - end - - # - # - # - def pop - k = @tail.prev_node.key - n = @lookup.delete(k) - node_delete(n) if n - end - - # - # - # - def push(v) - if @lookup.has_key?(v) - n = @lookup[v] - node_delete(n) - node_join(@tail.prev_node,n) - node_join(n,@tail) - else - n = Node.new(v,v,@tail.prev_node,@tail) - node_join(@tail.prev_node,n) - node_join(n,@tail) - @lookup[v] = n - end - v - end - - alias :<< :push - - # - # Produces an Array of key values. - # - # Returns [Array]. - # - def queue - r = [] - n = @head - while (n = n.next_node) and n != @tail - r << n.key - end - r - end - - # - # Converts to an Array of node values. - # - # Returns [Array]. - # - def to_a - r = [] - n = @head - while (n = n.next_node) and n != @tail - r << n.value - end - r - end - - # - # Number of nodes. - # - def length - @lookup.length - end - - alias size length - - # - # Iterate over nodes, starting with the head node - # and ending with the tail node. - # - def each - n = @head - while (n = n.next_node) and n != @tail - yield(n.key,n.value) - end - end - - private - - # - # Delete a node. - # - # n - A node. - # - def node_delete(n) - node_join(n.prev_node,n.next_node) - v = n.value - end - - # - # Purge a node. - # - # n - A node. - # - def node_purge(n) - node_join(n.prev_node,n.next_node) - v = n.value - n.value = nil - n.key = nil - n.next_node = nil - n.prev_node = nil - v - end - - # Join two nodes. - # - # a - A node. - # b - A node. - # - def node_join(a,b) - a.next_node = b - b.prev_node = a - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/lru_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/lru_hash.rb deleted file mode 100644 index f21387be..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/lru_hash.rb +++ /dev/null @@ -1,363 +0,0 @@ -require 'enumerator' - -module Hashery - - # Hash with LRU expiry policy. There are at most max_size elements in a - # LRUHash. When adding more elements old elements are removed according - # to LRU policy. - # - # Based on Robert Klemme's LRUHash class. - # - # LRUHash, Copyright (c) 2010 Robert Klemme. - # - class LRUHash - - include Enumerable - - attr_reader :max_size - - attr_accessor :default - attr_accessor :default_proc - attr_accessor :release_proc - - # - # Initialize new LRUHash instance. - # - # max_size - - # default_value - - # block - - # - def initialize(max_size, default_value=nil, &block) - @max_size = normalize_max(max_size) - @default = default_value - @default_proc = block - - @h = {} - @head = Node.new - @tail = front(Node.new) - end - - # - # Iterate over each pair. - # - def each_pair - if block_given? - each_node do |n| - yield [n.key, n.value] - end - else - enum_for :each_pair - end - end - - # - # Same as each pair. - # - alias each each_pair - - # - # Iterate over each key. - # - def each_key - if block_given? - each_node do |n| - yield n.key - end - else - enum_for :each_key - end - end - - # - # Iterate over each value. - # - def each_value - if block_given? - each_node do |n| - yield n.value - end - else - enum_for :each_value - end - end - - # - # Size of the hash. - # - def size - @h.size - end - - # - # - # - def empty? - @head.succ.equal? @tail - end - - # - # - # - def fetch(key, &b) - n = @h[key] - - if n - front(n).value - else - (b || FETCH)[key] - end - end - - # - # - # - def [](key) - fetch(key) do |k| - @default_proc ? @default_proc[self, k] : default - end - end - - # - # - # - def keys - @h.keys - end - - # - # - # - def values - @h.map {|k,n| n.value} - end - - # - # - # - def has_key?(key) - @h.has_key? key - end - - alias key? has_key? - alias member? has_key? - alias include? has_key? - - # - # - # - def has_value?(value) - each_pair do |k, v| - return true if value.eql? v - end - - false - end - - alias value? has_value? - - def values_at(*key_list) - key_list.map {|k| self[k]} - end - - # - # - # - def assoc(key) - n = @h[key] - - if n - front(n) - [n.key, n.value] - end - end - - # - # - # - def rassoc(value) - each_node do |n| - if value.eql? n.value - front(n) - return [n.key, n.value] - end - end - nil - end - - # - # - # - def key(value) - pair = rassoc(value) and pair.first - end - - # - # - # - def store(key, value) - # same optimization as in Hash - key = key.dup.freeze if String === key && !key.frozen? - - n = @h[key] - - unless n - if size == max_size - # reuse node to optimize memory usage - n = delete_oldest - n.key = key - n.value = value - else - n = Node.new key, value - end - - @h[key] = n - end - - front(n).value = value - end - - alias []= store - - # - # - # - def delete(key) - n = @h[key] and remove_node(n).value - end - - # - # - # - def delete_if - each_node do |n| - remove_node n if yield n.key, n.value - end - end - - # - # - # - def max_size=(limit) - limit = normalize_max(limit) - - while size > limit - delete_oldest - end - - @max_size = limit - end - - # - # - # - def clear - until empty? - delete_oldest - end - - self - end - - # - # - # - def to_s - s = nil - each_pair {|k, v| (s ? (s << ', ') : s = '{') << k.to_s << '=>' << v.to_s} - s ? (s << '}') : '{}' - end - - alias inspect to_s - - private - - # - # Iterate nodes. - # - def each_node - n = @head.succ - - until n.equal? @tail - succ = n.succ - yield n - n = succ - end - - self - end - - # - # Move node to front. - # - # node - [Node] - # - def front(node) - node.insert_after(@head) - end - - # - # Remove the node and invoke release_proc - # if set - # - # node - [Node] - # - def remove_node(node) - n = @h.delete(node.key) - n.unlink - release_proc and release_proc[n.key, n.value] - n - end - - # - # Remove the oldest node returning the node - # - def delete_oldest - n = @tail.pred - raise "Cannot delete from empty hash" if @head.equal? n - remove_node n - end - - # - # Normalize the argument in order to be usable as max_size - # criterion is that n.to_i must be an Integer and it must - # be larger than zero. - # - # n - [#to_i] max size - # - def normalize_max(n) - n = n.to_i - raise ArgumentError, 'Invalid max_size: %p' % n unless Integer === n && n > 0 - n - end - - # - FETCH = Proc.new {|k| raise KeyError, 'key not found'} - - # A single node in the doubly linked LRU list of nodes. - Node = Struct.new :key, :value, :pred, :succ do - def unlink - pred.succ = succ if pred - succ.pred = pred if succ - self.succ = self.pred = nil - self - end - - def insert_after(node) - raise 'Cannot insert after self' if equal? node - return self if node.succ.equal? self - - unlink - - self.succ = node.succ - self.pred = node - - node.succ.pred = self if node.succ - node.succ = self - - self - end - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/open_cascade.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/open_cascade.rb deleted file mode 100644 index 1305974c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/open_cascade.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'hashery/open_hash' - -module Hashery - - # OpenCascade is subclass of OpenHash. It differs in a few - # significant ways. The reason this class is called "cascade" is that - # every internal Hash is transformed into an OpenCascade dynamically - # upon access. This makes it easy to create "cascading" references. - # - # h = { :x => { :y => { :z => 1 } } } - # c = OpenCascade[h] - # c.x.y.z #=> 1 - # - # As soon as you access a node it automatically becomes an OpenCascade. - # - # c = OpenCascade.new #=> # - # c.r #=> # - # c.a.b #=> # - # - # But if you set a node, then that will be that value. - # - # c.a.b = 4 #=> 4 - # - # To query a node without causing the auto-creation of an OpenCasade - # instance, use the `?`-mark. - # - # c.a.z? #=> nil - # - # OpenCascade also transforms Hashes within Arrays. - # - # h = { :x=>[ {:a=>1}, {:a=>2} ], :y=>1 } - # c = OpenCascade[h] - # c.x.first.a.assert == 1 - # c.x.last.a.assert == 2 - # - # Finally, you can set call a private method via bang methods using the `!`-mark. - # - # c = OpenCascade.new #=> # - # c.each = 4 - # c.each! do |k,v| - # ... - # end - # - # c.x!(4).y!(3) #=> #4, :y=>3}> - # - # Subclassing OpenCascade with cause the new subclass to become the class that - # is auto-created. If this is not the behavior desired, consider using delegation - # instead of subclassing. - # - class OpenCascade < OpenHash - - # - #def self.[](hash) - # oc = new - # hash.each{ |(k,v)| oc.store(k,v) } - # oc - #end - - # - # Initialize new OpenCascade instance. - # - # default - The usual default object. - # - def initialize(*default) - @read = {} - - leet = lambda { |h,k| h[k] = self.class.new(&leet) } - super(*default, &leet) - end - - # - # Alias for original read method. - # - alias :retrieve! :retrieve - - # - # Read value given a +key+. - # - # key - Index key to lookup. - # - # Returns value. - # - def retrieve(key) - ckey = cast_key(key) - if @read[ckey] - super(key) - else - @read[ckey] = store(key, cast_value(super(key))) - end - end - - # - # - # - def method_missing(sym, *args, &blk) - type = sym.to_s[-1,1] - name = sym.to_s.gsub(/[=!?]$/, '').to_sym - - case type - when '=' - store(name, args.first) - when '?' - key?(name) ? retrieve!(name) : nil # key?(name) - when '!' - __send__(name, *args, &blk) - else - #if key?(name) - retrieve(name) - #else - # #default = OpenCascade.new #self.class.new - # #default = default_proc ? default_proc.call(self, name) : default - # store(name, read(name)) - #end - end - end - - def respond_to?(sym, include_private = false) - sym != :to_ary && super - end - - #def each - # super do |key, entry| - # yield([key, transform_entry(entry)]) - # end - #end - - private - - # - # Cast value, such that Hashes are converted to OpenCascades. - # And Hashes in Arrays are converted to OpenCascades as well. - # - def cast_value(entry) - case entry - when Hash - e = OpenCascade.new - e.key_proc = key_proc if key_proc - e.merge!(entry) - e - when Array - entry.map{ |e| cast_value(e) } - else - entry - end - end - - end - -end - - -#-- -# Last, when an entry is not found, 'null' is returned rather then 'nil'. -# This allows for run-on entries withuot error. Eg. -# -# o = OpenCascade.new -# o.a.b.c #=> null -# -# Unfortuately this requires an explict test for null? in 'if' conditions. -# -# if o.a.b.c.null? # true if null -# if o.a.b.c.nil? # true if nil or null -# if o.a.b.c.not? # true if nil or null or false -# -# So be sure to take that into account. -#++ - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/open_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/open_hash.rb deleted file mode 100644 index 3a26cacc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/open_hash.rb +++ /dev/null @@ -1,145 +0,0 @@ -require 'hashery/crud_hash' - -module Hashery - - # OpenHash is a Hash, but also supports open properties much like - # OpenStruct. - # - # Only names that are name methods of Hash can be used as open slots. - # To open a slot for a name that would otherwise be a method, the - # method needs to be made private. The `#open!` method can be used - # to handle this. - # - # Examples - # - # o = OpenHash.new - # o.open!(:send) - # o.send = 4 - # - class OpenHash < CRUDHash - - alias :object_class :class - - #FILTER = /(^__|^\W|^instance_|^object_|^to_)/ - #methods = Hash.instance_methods(true).select{ |m| m !~ FILTER } - #methods = methods - [:each, :inspect, :send] # :class, :as] - #private *methods - - # - # Initialize new OpenHash instance. - # - # TODO: Maybe `safe` should be the first argument? - # - def initialize(default=nil, safe=false, &block) - @safe = safe - super(*[default].compact, &block) - end - - # - # If safe is set to true, then public methods cannot be overriden - # by hash keys. - # - attr_accessor :safe - - # - # Alias to original store method. - # - #alias :store! :store - - # - # Index `value` to `key`. Unless safe mode, will also open up the - # key if it is not already open. - # - # key - Index key to associate with value. - # value - Value to be associate with key. - # - # Returns +value+. - # - def store(key, value) - #open!(key) - super(key, value) - end - - # - # Open up a slot that that would normally be a Hash method. - # - # The only methods that can't be opened are ones starting with `__`. - # - # methods - [Array] method names - # - # Returns Array of slot names that were opened. - # - def open!(*methods) - # Only select string and symbols, any other type of key is allowed, - # it just won't be accessible via dynamic methods. - methods = methods.select{ |x| String === x || Symbol === x } - if methods.any?{ |m| m.to_s.start_with?('__') } - raise ArgumentError, "cannot open shadow methods" - end - # only public methods need be made protected - methods = methods.map{ |x| x.to_sym } - methods = methods & public_methods(true).map{ |x| x.to_sym } - if @safe - raise ArgumentError, "cannot set public method" unless methods.empty? - else - (class << self; self; end).class_eval{ protected *methods } - end - methods - end - - # @deprecated - alias :omit! :open! - - # - # Is a slot open? - # - # method - [String,Symbol] method name - # - # Returns `true` or `false`. - # - def open?(method) - methods = public_methods(true).map{ |m| m.to_sym } - ! methods.include?(method.to_sym) - end - - # - # Make specific Hash methods available for use that have previously opened. - # - # methods - [Array] method names - # - # Returns +methods+. - # - def close!(*methods) - (class << self; self; end).class_eval{ public *methods } - methods - end - - # - # - # - def method_missing(s,*a, &b) - type = s.to_s[-1,1] - name = s.to_s.sub(/[!?=]$/, '') - key = name.to_sym - - case type - when '=' - store(key, a.first) - when '?' - key?(key) - when '!' - # call an underlying private method - # TODO: limit this to omitted methods (from included) ? - __send__(name, *a, &b) - else - #if key?(key) - retrieve(key) - #else - # super(s,*a,&b) - #end - end - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/ordered_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/ordered_hash.rb deleted file mode 100644 index 6089c203..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/ordered_hash.rb +++ /dev/null @@ -1,174 +0,0 @@ -module Hashery - - # OrderedHash is a simple ordered hash implmentation, for users of - # Ruby 1.8.7 or less. - # - # NOTE: As of Ruby 1.9+ this class is not needed, since - # Ruby 1.9's standard Hash tracks inseration order. - # - # This implementation derives from the same class in - # ActiveSupport library. - # - class OrderedHash < ::Hash - - def to_yaml_type - "!tag:yaml.org,2002:omap" - end - - def to_yaml(opts = {}) - YAML.quick_emit(self, opts) do |out| - out.seq(taguri, to_yaml_style) do |seq| - each do |k, v| - seq.add(k => v) - end - end - end - end - - # Hash is ordered in Ruby 1.9! - if RUBY_VERSION < '1.9' - - def initialize(*args, &block) - super - @keys = [] - end - - def self.[](*args) - ordered_hash = new - - if (args.length == 1 && args.first.is_a?(Array)) - args.first.each do |key_value_pair| - next unless (key_value_pair.is_a?(Array)) - ordered_hash[key_value_pair[0]] = key_value_pair[1] - end - - return ordered_hash - end - - unless (args.size % 2 == 0) - raise ArgumentError.new("odd number of arguments for Hash") - end - - args.each_with_index do |val, ind| - next if (ind % 2 != 0) - ordered_hash[val] = args[ind + 1] - end - - ordered_hash - end - - def initialize_copy(other) - super(other) - @keys = other.keys - end - - def []=(key, value) - @keys << key unless key?(key) - super(key, value) - end - - def delete(key) - if has_key? key - index = @keys.index(key) - @keys.delete_at(index) - end - super(key) - end - - def delete_if - super - sync_keys! - self - end - - def reject! - super - sync_keys! - self - end - - def reject(&block) - dup.reject!(&block) - end - - def keys - @keys.dup - end - - def values - @keys.collect{ |key| self[key] } - end - - def to_hash - self - end - - def to_a - @keys.map{ |key| [ key, self[key] ] } - end - - def each_key - @keys.each{ |key| yield(key) } - end - - def each_value - @keys.each{ |key| yield(self[key]) } - end - - def each - @keys.each{ |key| yield(key, self[key]) } - end - - alias_method :each_pair, :each - - def clear - super - @keys.clear - self - end - - def shift - k = @keys.first - v = delete(k) - [k, v] - end - - def merge!(other_hash) - other_hash.each{ |k,v| self[k] = v } - self - end - - def merge(other_hash) - dup.merge!(other_hash) - end - - # When replacing with another hash, the initial order of our - # keys must come from the other hash, ordered or not. - def replace(other) - super - @keys = other.keys - self - end - - def inspect - "#" - end - - private - - def sync_keys! - @keys.delete_if{ |k| !key?(k) } - end - - end - - end - -end - -require 'yaml' - -YAML.add_builtin_type("omap") do |type, val| - OrderedHash[val.map(&:to_a).map(&:first)] -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/path_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/path_hash.rb deleted file mode 100644 index 9a587f87..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/path_hash.rb +++ /dev/null @@ -1,238 +0,0 @@ -module Hashery - - # A PathHash is a hash whose values can be accessed in the normal manner, - # or with keys that are slash (`/`) separated strings. To get the whole hash - # as a single flattened level, call `#flat`. All keys are converted to strings. - # All end-of-the-chain values are kept in whatever value they are. - # - # s = PathHash['a' => 'b', 'c' => {'d' => :e}] - # s['a'] #=> 'b' - # s['c'] #=> {slashed: 'd'=>:e} - # s['c']['d'] #=> :e - # s['c/d'] #=> :e - # - # PathHash is derived from the SlashedHash class in the HashMagic project - # by Daniel Parker . - # - # Copyright (c) 2006 BehindLogic (http://hash_magic.rubyforge.org) - # - # Authors: Daniel Parker - # - # TODO: This class is very much a work in progess and will be substantially rewritten - # for future versions. - # - class PathHash < Hash - - # - # Initialize PathHash. - # - # hsh - Priming Hash. - # - def initialize(hsh={}) - raise ArgumentError, "must be a hash or array of slashed values" unless hsh.is_a?(Hash) || hsh.is_a?(Array) - @constructor = hsh.is_a?(Hash) ? hsh.class : Hash - @flat = flatten_to_hash(hsh) - end - - # Standard Hash methods, plus the overwritten ones - #include StandardHashMethodsInRuby - - # Behaves like the usual Hash#[] method, but you can access nested hash - # values by composing a single key of the traversing keys joined by '/': - # - # hash['c']['d'] # is the same as: - # hash['c/d'] - # - def [](key) - rg = Regexp.new("^#{key}/?") - start_obj = if @constructor == OrderedHash - @constructor.new((@flat.instance_variable_get(:@keys_in_order) || []).collect {|e| e.gsub(rg,'')}) - else - @constructor.new - end - v = @flat.has_key?(key) ? @flat[key] : self.class.new(@flat.reject {|k,v| !(k == key || k =~ rg)}.inject(start_obj) {|h,(k,v)| h[k.gsub(rg,'')] = v; h}) - v.is_a?(self.class) && v.empty? ? nil : v - end - - # - # Same as above, except sets value rather than retrieving it. - # - def []=(key,value) - @flat.reject! {|k,v| k == key || k =~ Regexp.new("^#{key}/")} - if value.is_a?(Hash) - flatten_to_hash(value).each do |hk,hv| - @flat[key.to_s+'/'+hk.to_s] = hv - end - else - @flat[key.to_s] = value - end - end - - def clear # :nodoc: - @flat.clear - end - - # - # - # - def fetch(key,default=:ehisehoah0928309q98y30,&block) # :nodoc: - value = @flat.has_key?(key) ? @flat[key] : self.class.new(@flat.reject {|k,v| !(k == key || k =~ Regexp.new("^#{key}/"))}.inject({}) {|h,(k,v)| h[k.split('/',2)[1]] = v; h}) - if value.is_a?(self.class) && value.empty? - if default == :ehisehoah0928309q98y30 - if block_given? - block.call(key) - else - raise IndexError - end - value - else - default - end - else - value - end - end - - # - # Delete entry from Hash. Slashed keys can be used here, too. - # - # key - The key to delete. - # block - Produces the return value if key not found. - # - # Returns delete value. - # - def delete(key,&block) - value = @flat.has_key?(key) ? @flat[key] : self.class.new(@flat.reject {|k,v| !(k == key || k =~ Regexp.new("^#{key}/"))}.inject({}) {|h,(k,v)| h[k.split('/',2)[1]] = v; h}) - return block.call(key) if value.is_a?(self.class) && value.empty? && block_given? - @flat.keys.reject {|k| !(k == key || k =~ Regexp.new("^#{key}/"))}.each {|k| @flat.delete(k)} - return value - end - - # - def empty? - @flat.empty? - end - - # This gives you the slashed key of the value, no matter where the value is in the tree. - def index(value) - @flat.index(value) - end - - # - def inspect - @flat.inspect.insert(1,'slashed: ') - end - - # This gives you only the top-level keys, no slashes. To get the list of slashed keys, do hash.flat.keys - def keys - @flat.inject([]) {|a,(k,v)| a << [k.split('/',2)].flatten[0]; a}.uniq - end - - # This is rewritten to mean something slightly different than usual: Use this to restructure the hash, for cases when you - # end up with an array holding several hashes. - def rehash # :nodoc: - @flat.rehash - end - - # Gives a list of all keys in all levels in the multi-level hash, joined by slashes. - # - # {'a'=>{'b'=>'c', 'c'=>'d'}, 'b'=>'c'}.slashed.flat.keys - # #=> ['a/b', 'a/c', 'b'] - # - def flat - @flat - end - - # Expands the whole hash to Hash objects ... not useful very often, it seems. - def expand - inject({}) {|h,(k,v)| h[k] = v.is_a?(SlashedHash) ? v.expand : v; h} - end - - def to_string_array - flatten_to_array(flat,[]) - end - - def slashed # :nodoc: - self - end - - # Same as ordered! but returns a new SlashedHash object instead of modifying the same. - def ordered(*keys_in_order) - dup.ordered!(*keys_in_order) - end - - # Sets the SlashedArray as ordered. The *keys_in_order must be a flat array - # of slashed keys that specify the order for each level: - # - # s = {'a'=>{'b'=>'c', 'c'=>'d'}, 'b'=>'c'}.slashed - # s.ordered!('b', 'a/c', 'a/b') - # s.expand # => {'b'=>'c', 'a'=>{'c'=>'d', 'b'=>'c'}} - # # Note that the expanded hashes will *still* be ordered! - # - def ordered!(*keys_in_order) - return self if @constructor == OrderedHash - @constructor = OrderedHash - @flat = @flat.ordered(*keys_in_order) - self - end - - # - def ==(other) - case other - when SlashedHash - @slashed == other.instance_variable_get(:@slashed) - when Hash - self == SlashedHash.new(other) - else - raise TypeError, "Cannot compare #{other.class.name} with SlashedHash" - end - end - - private - - def flatten_to_hash(hsh) - flat = @constructor.new - if hsh.is_a?(Array) - hsh.each do |e| - flat.merge!(flatten_to_hash(e)) - end - elsif hsh.is_a?(Hash) - hsh.each do |k,v| - if v.is_a?(Hash) - flatten_to_hash(v).each do |hk,hv| - flat[k.to_s+'/'+hk.to_s] = hv - end - else - flat[k.to_s] = v - end - end - else - ks = hsh.split('/',-1) - v = ks.pop - ks = ks.join('/') - if !flat[ks].nil? - if flat[ks].is_a?(Array) - flat[ks] << v - else - flat[ks] = [flat[ks], v] - end - else - flat[ks] = v - end - end - flat - end - - def flatten_to_array(value,a) - if value.is_a?(Array) - value.each {|e| flatten_to_array(e,a)} - elsif value.is_a?(Hash) - value.inject([]) {|aa,(k,v)| flatten_to_array(v,[]).each {|vv| aa << k+'/'+vv.to_s}; aa}.each {|e| a << e} - else - a << value.to_s - end - a - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/property_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/property_hash.rb deleted file mode 100644 index dbe65607..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/property_hash.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'hashery/crud_hash' - -module Hashery - - # A PropertyHash is the same as a regular Hash except it strictly limits the - # allowed keys. - # - # There are two ways to use it. - # - # 1) As an object in itself. - # - # h = PropertyHash.new(:a=>1, :b=>2) - # h[:a] #=> 1 - # h[:a] = 3 - # h[:a] #=> 3 - # - # But if we try to set key that was not fixed, then we will get an error. - # - # h[:x] = 5 #=> ArgumentError - # - # 2) As a superclass. - # - # class MyPropertyHash < PropertyHash - # property :a, :default => 1 - # property :b, :default => 2 - # end - # - # h = MyPropertyHash.new - # h[:a] #=> 1 - # h[:a] = 3 - # h[:a] #=> 3 - # - # Again, if we try to set key that was not fixed, then we will get an error. - # - # h[:x] = 5 #=> ArgumentError - # - class PropertyHash < CRUDHash - - # - # Get a list of properties with default values. - # - # Returns [Hash] of properties and their default values. - # - def self.properties - @properties ||= ( - parent = ancestors[1] - if parent.respond_to?(:properties) - parent.properties - else - {} - end - ) - end - - # - # Define a property. - # - # key - Name of property. - # opts - Property options. - # :default - Default value of property. - # - # Returns default value. - # - def self.property(key, opts={}) - properties[key] = opts[:default] - end - - # - # Initialize new instance of PropertyHash. - # - # properties - [Hash] Priming properties with default values, or - # if it doesn't respond to #each_pair, a default object. - # default_proc - [Proc] Procedure for default value of properties - # for properties without specific defaults. - # - def initialize(properties={}, &default_proc) - if properties.respond_to?(:each_pair) - super(&default_proc) - fixed = self.class.properties.merge(properties) - fixed.each_pair do |key, value| - store!(key, value) - end - else - super(*[properties].compact, &default_proc) - end - end - - # Alias original #store method and make private. - alias :store! :store - private :store! - - # - # Create a new property, on-the-fly. - # - # key - Name of property. - # opts - Property options. - # :default - Default value of property. - # - # Returns default value. - # - def property(key, opts={}) - if opts[:default] - store!(key, opts[:default]) - else - store!(key, retrieve(key)) - end - end - - # - # Store key value pair, ensuring the key is a valid property first. - # - # key - The `Object` to act as indexing key. - # value - The `Object` to associate with key. - # - # Raises ArgumentError if key is not a valid property. - # - # Returns +value+. - # - def store(key, value) - assert_key!(key) - super(key, value) - end - - # - #def update(h) - # h.keys.each{ |k| assert_key!(k) } - # super(h) - #end - - # - #def merge!(h) - # h.keys.each{ |k| assert_key!(k) } - # super(h) - #end - - # - # Like #store but takes a two-element Array of `[key, value]`. - # - # Returns value. - # - #def <<(a) - # k,v = *a - # store(k,v) - #end - - private - - # - # Asserta that a key is a defined property. - # - # Raises ArgumentError if key is not a property. - # - def assert_key!(key) - unless key?(key) - raise ArgumentError, "property is not defined -- #{key.inspect}" - end - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/query_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/query_hash.rb deleted file mode 100644 index a8f77157..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/query_hash.rb +++ /dev/null @@ -1,91 +0,0 @@ -module Hashery - - require 'hashery/key_hash' - - # QueryHash is essentially a Hash class, but with some OpenStruct-like features. - # - # q = QueryHash.new - # - # Entries can be added to the Hash via a setter method. - # - # q.a = 1 - # - # Then looked up via a query method. - # - # q.a? #=> 1 - # - # The can also be looked up via a bang method. - # - # q.a! #=> 1 - # - # The difference between query methods and bang methods is that the bang method - # will auto-instantiate the entry if not present, where as a query method will not. - # - # A QueryHash might not be quite as elegant as an OpenHash in that reader - # methods must end in `?` or `!`, but it remains fully compatible with Hash - # regardless of it's settings. - # - class QueryHash < CRUDHash - - # - # By default the `key_proc` is set to convert all keys to strings via `#to_s`. - # - # default - Default object, or - # default_proc - Default procedure. - # - def initialize(*default, &default_proc) - @key_proc = Proc.new{ |k| k.to_s } - super(*default, &default_proc) - end - - # - # Route get and set calls. - # - # s - [Symbol] Name of method. - # a - [Array] Method arguments. - # b - [Proc] Block argument. - # - # Examples - # - # o = QueryHash.new - # o.a = 1 - # o.a? #=> 1 - # o.b? #=> nil - # - def method_missing(s,*a, &b) - type = s.to_s[-1,1] - name = s.to_s.sub(/[!?=]$/, '') - key = name #key = cast_key(name) - - case type - when '=' - store(key, a.first) - when '!' - default = (default_proc ? default_proc.call(self, key) : default) - key?(key) ? fetch(key) : store(key, default) - when '?' - key?(key) ? fetch(key) : nil - else - # return self[key] if key?(key) - super(s,*a,&b) - end - end - - # - # Custom #respond_to to account for #method_missing. - # - # name - The method name to check. - # - # Returns `true` or `false`. - # - def respond_to?(name) - return true if name.to_s.end_with?('=') - return true if name.to_s.end_with?('?') - return true if name.to_s.end_with?('!') - #key?(name.to_sym) || super(name) - super(name) - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/stash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/stash.rb deleted file mode 100644 index a5581983..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/stash.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'hashery/key_hash' - -module Hashery - # Stash is the original name for the KeyHash. - Stash = KeyHash -end - -class Hash - # Convert Hash to Stash. - def to_stash - Hashery::Stash[self] - end -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/static_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/static_hash.rb deleted file mode 100644 index 55b84670..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/lib/hashery/static_hash.rb +++ /dev/null @@ -1,53 +0,0 @@ -module Hashery - - # StaticHash ia a Hash object which raises an error if any - # previously-defined key attempts to be set again. - # - # foo = StaticHash.new - # foo['name'] = 'Tom' #=> 'Tom' - # foo['age'] = 30 #=> 30 - # foo['name'] = 'Bob' - # - # produces - # - # ArgumentError: Duplicate key for StaticHash -- 'name' - # - # StaticHash has it's orgins in Gavin Kistner's WriteOnceHash - # class found in his +basiclibrary.rb+ script. - # - # TODO: Maybe StaticHash isn't bets name for this class? - # - class StaticHash < CRUDHash - - # - # Set a value for a key. Raises an error if that key already - # exists with a different value. - # - # key - Index key to associate with value. - # value - Value to associate with key. - # - # Retruns value. - # - def store(key, value) - if key?(key) && fetch(key) != value - raise ArgumentError, "Duplicate key for StaticHash -- #{key.inspect}" - end - super(key, value) - end - - # - #def update(hash) - # dups = (keys | hash.keys) - # if dups.empty? - # super(hash) - # else - # raise ArgumentError, "Duplicate key for StaticHash -- #{dups.inspect}" - # end - #end - - # - #alias_method :merge!, :update - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_association.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_association.rb deleted file mode 100644 index a42e6d69..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_association.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'helper' - -# must be required independently -require 'hashery/association' - -testcase Association do - - class_method :new do - test do - Association.new(:A, :B) - end - end - - class_method :[] do - test do - a = Association[:a, 1] - a.assert.index == :a - a.assert.value == 1 - end - end - - method :index do - test do - a = Association.new(:a,1) - a.index.assert == :a - end - end - - method :value do - test do - a = Association.new(:a,1) - a.value.assert == 1 - end - end - - method :to_ary do - test do - k,v = [],[] - ohash = [ 'A' >> '3', 'B' >> '2', 'C' >> '1' ] - ohash.each { |e1,e2| k << e1 ; v << e2 } - k.assert == ['A','B','C'] - v.assert == ['3','2','1'] - end - end - - method :index do - test do - complex = [ 'Drop Menu' >> [ 'Button 1', 'Button 2', 'Button 3' ], 'Help' ] - complex[0].index.assert == 'Drop Menu' - end - end - - method :<=> do - test 'when differnt in value' do - a = Association.new(:a,1) - b = Association.new(:b,2) - (a <=> b).assert == -1 - (b <=> a).assert == 1 - end - - test 'when equal value' do - a = Association.new(:a,1) - b = Association.new(:b,1) - (a <=> b).assert == 0 - end - end - - method :invert! do - test do - a = Association.new(:a,1) - a.invert! - a.index.assert == 1 - a.value.assert == :a - end - end - - method :inspect do - test do - a = Association.new(:a,1) - a.inspect.assert == ":a >> 1" - end - end - - method :to_s do - test do - a = Association.new(:a,1) - a.to_s.assert == "a >> 1" - end - end - -end - -testcase Object do - method :associations do - test do - s = 'a' - complex = [ s >> :b, s >> :c ] - s.associations.assert == [:b, :c] - end - end - -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_casting_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_casting_hash.rb deleted file mode 100644 index a7f04ce4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_casting_hash.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'helper' - -test_case CastingHash do - - class_method :[] do - test do - h = CastingHash[:a=>1, :b=>2] - end - end - - class_method :new do - test do - h = CastingHash.new - end - - test 'with default' do - h = CastingHash.new(0) - h['a'].assert == 0 - end - - test 'with casting procedure' do - h = CastingHash.new{ |k,v| [k.to_sym, v] } - h['a'] = 1 - h.assert == {:a=>1} - end - - test 'with default and casting procedure' do - h = CastingHash.new(0){ |k,v| [k.to_sym, v] } - h['a'].assert == 0 - h['b'] = 2 - h.assert == {:b=>2} - end - end - - method :recast! do - test do - h = CastingHash[:a=>1, :b=>2] - h.cast_proc{ |k,v| [k.to_s, v] } - h.recast! - h.assert == {'a'=>1, 'b'=>2} - end - end - - method :cast_proc= do - test do - h = CastingHash[:a=>1, :b=>2] - h.cast_proc = Proc.new{ |k,v| [k.to_s, v] } - h.recast! - h.assert == {'a'=>1, 'b'=>2} - end - end - - method :to_hash do - test do - h = CastingHash[:a=>1, :b=>2] - h.to_hash - ::Hash.assert === h - h.assert == {:a=>1, :b=>2} - end - end - - method :to_h do - test do - h = CastingHash[:a=>1, :b=>2] - h.to_h - ::Hash.assert === h - h.assert == {:a=>1, :b=>2} - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_core_ext.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_core_ext.rb deleted file mode 100644 index 9e419dee..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_core_ext.rb +++ /dev/null @@ -1,79 +0,0 @@ -require 'helper' - -test_case Hash do - - method :rekey do - - test "default" do - foo = { "a"=>1, "b"=>2 } - foo.rekey.assert == { :a=>1, :b=>2 } - foo.assert == { "a"=>1, "b"=>2 } - end - - test "specific key" do - bar = { :a=>1, :b=>2 } - foo = bar.rekey(:a=>:c) - foo[:c].assert == 1 - foo[:b].assert == 2 - foo[:a].assert == nil - end - - test "with block" do - bar = { :a=>1, :b=>2 } - foo = bar.rekey{ |k| k.to_s } - foo['a'].assert == 1 - foo['b'].assert == 2 - foo[:a].assert == nil - foo[:b].assert == nil - foo.assert == { 'a'=>1, 'b'=>2 } - end - - test "symbol proc" do - foo = { :a=>1, :b=>2 } - foo.rekey(&:to_s).assert == { "a"=>1, "b"=>2 } - foo.assert == { :a =>1, :b=>2 } - end - - end - - method :rekey! do - - test "default" do - foo = { "a"=>1, "b"=>2 } - foo.rekey!.assert == { :a=>1, :b=>2 } - foo.assert == { :a=>1, :b=>2 } - end - - test "specific key" do - foo = { :a=>1, :b=>2 } - foo.rekey!(:a=>:c) - foo[:c].assert == 1 - foo[:b].assert == 2 - foo[:a].assert == nil - end - - test "with block" do - foo = { :a=>1, :b=>2 } - foo.rekey!{ |k| k.to_s } - foo['a'].assert == 1 - foo['b'].assert == 2 - foo[:a].assert == nil - foo[:b].assert == nil - foo.assert == { 'a'=>1, 'b'=>2 } - end - - test "symbol proc" do - foo = { :a=>1, :b=>2 } - foo.rekey!(&:to_s).assert == { "a"=>1, "b"=>2 } - foo.assert == { "a"=>1, "b"=>2 } - end - - test "no conflict between keys" do - r = {1 => :a, 2 => :b}.rekey!{ |k| k + 1 } - r.refute = {3 => :a} - r.assert = {2 => :a, 3 => :b} - end - - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_crud_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_crud_hash.rb deleted file mode 100644 index 6ede4ea0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_crud_hash.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'helper' - -test_case CRUDHash do - - class_method :create do - test do - h = CRUDHash.create(:a=>1,:b=>2) - h.assert == {:a=>1,:b=>2} - end - end - - class_method :auto do - test 'without a block' do - h = CRUDHash.auto - h[:a].assert == {} - end - - test 'with a block' do - h = CRUDHash.auto{ [] } - h[:a].assert == [] - end - end - -end - - -# -# OT: Why not make `:a=>1` a Pair object? -# diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_dictionary.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_dictionary.rb deleted file mode 100644 index e8ba9a18..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_dictionary.rb +++ /dev/null @@ -1,328 +0,0 @@ -require 'helper' - -testcase Dictionary do - include AE::Legacy::Assertions - - class_method :[] do - test do - d = Dictionary['z', 1, 'a', 2, 'c', 3] - assert_equal( ['z','a','c'], d.keys ) - end - end - - class_method :new do - test "with default" do - d = Dictionary.new{ |hash,key| hash[key] = 0 } - d[:a] = 0 - d[:b] += 1 - assert_equal [0, 1], d.values - assert_equal [:a,:b], d.keys - end - end - - method :[] do - test do - d = Dictionary['a', 1] - d['a'].assert == 1 - end - end - - method :[]= do - test do - d = Dictionary.new - d['z'] = 1 - d['a'] = 2 - d['c'] = 3 - assert_equal( ['z','a','c'], d.keys ) - end - end - - method :[]= do - test do - d = Dictionary[] - d[:a] = 1 - d[:c] = 3 - assert_equal( [1,3], d.values ) - d[:b,1] = 2 - assert_equal( [1,2,3], d.values ) - assert_equal( [:a,:b,:c], d.keys ) - end - end - - method :push do - test do - d = Dictionary['a', 1, 'c', 2, 'z', 3] - assert( d.push('end', 15) ) - assert_equal( 15, d['end'] ) - assert( ! d.push('end', 30) ) - assert( d.unshift('begin', 50) ) - assert_equal( 50, d['begin'] ) - assert( ! d.unshift('begin', 60) ) - assert_equal( ["begin", "a", "c", "z", "end"], d.keys ) - assert_equal( ["end", 15], d.pop ) - assert_equal( ["begin", "a", "c", "z"], d.keys ) - assert_equal( ["begin", 50], d.shift ) - end - end - - method :insert do - test "front" do - d = Dictionary['a', 1, 'b', 2, 'c', 3] - r = Dictionary['d', 4, 'a', 1, 'b', 2, 'c', 3] - assert_equal( 4, d.insert(0,'d',4) ) - assert_equal( r, d ) - end - test "back" do - d = Dictionary['a', 1, 'b', 2, 'c', 3] - r = Dictionary['a', 1, 'b', 2, 'c', 3, 'd', 4] - assert_equal( 4, d.insert(-1,'d',4) ) - assert_equal( r, d ) - end - end - - method :update do - test "with other orderred hash" do - d = Dictionary['a', 1, 'b', 2, 'c', 3] - c = Dictionary['d', 4] - r = Dictionary['a', 1, 'b', 2, 'c', 3, 'd', 4] - assert_equal( r, d.update(c) ) - assert_equal( r, d ) - end - test "with other hash" do - d = Dictionary['a', 1, 'b', 2, 'c', 3] - c = { 'd' => 4 } - r = Dictionary['a', 1, 'b', 2, 'c', 3, 'd', 4] - assert_equal( r, d.update(c) ) - assert_equal( r, d ) - end - end - - method :merge do - test "with other orderred hash" do - d = Dictionary['a', 1, 'b', 2, 'c', 3] - c = Dictionary['d', 4] - r = Dictionary['a', 1, 'b', 2, 'c', 3, 'd', 4] - assert_equal( r, d.merge(c) ) - end - test "with other hash" do - d = Dictionary['a', 1, 'b', 2, 'c', 3] - c = { 'd' => 4 } - r = Dictionary['a', 1, 'b', 2, 'c', 3, 'd', 4] - assert_equal( r, d.merge(c) ) - end - end - - method :order_by do - test do - d = Dictionary['a', 3, 'b', 2, 'c', 1] - d.order_by{ |k,v| v } - assert_equal( [1,2,3], d.values ) - assert_equal( ['c','b','a'], d.keys ) - end - end - - method :reverse! do - test do - d = Dictionary['z', 1, 'a', 2, 'c', 3] - d.reverse! - assert_equal( ['c','a','z'], d.keys ) - end - end - - method :collect do - test "enumerable method" do - d = Dictionary[] - d[:a] = "a" - d[:c] = "b" - r = d.collect{|k,v| v.capitalize} - r.assert == ["A","B"] - end - end - - method :dup do - test "with array values" do - d = Dictionary.new - d.dup - d[:a]=['t',5] - assert_equal(d, d.dup) - end - end - - method :first do - test do - d = Dictionary[] - d[:a] = "a" - d[:b] = "b" - d[:c] = "c" - d.first.assert == "a" - d.first(0).assert == [] - assert_equal ["a"] , d.first(1) - assert_equal ["a", "b"] , d.first(2) - end - end - - method :last do - test do - d = Dictionary[] - d[:a] = "a" - d[:b] = "b" - d[:c] = "c" - d.last.assert == "c" - d.last(0).assert == [] - d.last(1).assert == ["c"] - d.last(2).assert == ["b", "c"] - end - end - - method :select do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - r = d.select{ |k,v| v % 2 == 1 } - r.assert == [[:a, 1], [:c, 3]] - end - end - - method :to_h do - test do - d = Dictionary[:a=>1, :b=>2] - h = d.to_h - h.assert == {:a=>1, :b=>2} - end - end - - method :replace do - test do - d1 = Dictionary[:a=>1, :b=>2] - d2 = Dictionary[:c=>3, :d=>4] - d1.replace(d2) - d1.to_h.assert == {:c=>3, :d=>4} - end - end - - method :reverse do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - r = d.reverse - r.first.assert == 3 - end - end - - method :invert do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - r = d.invert - Dictionary.assert === r - r.to_h.assert == {1=>:a, 2=>:b, 3=>:c} - end - end - - method :each_key do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.order_by_key - a = [] - d.each_key{ |k| a << k } - a.assert == [:a, :b, :c] - end - - method :each_value do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.order_by_value - a = [] - d.each_value{ |v| a << v } - a.assert == [1, 2, 3] - end - - method :clear do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.clear - d.to_a.assert == [] - end - - method :fetch do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.fetch(:a).assert == 1 - end - - method :key? do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.assert.key?(:a) - d.refute.key?(:d) - end - end - - method :has_key? do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.assert.has_key?(:a) - d.refute.has_key?(:d) - end - end - - method :length do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.length.assert == 3 - end - end - - method :to_a do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.to_a.assert == [[:a,1], [:b,2], [:c,3]] - end - end - - method :to_hash do - test do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.to_hash.assert == {:a=>1, :b=>2, :c=>3} - end - end - - method :empty? do - test "is emtpy" do - d = Dictionary[] - d.assert.empty? - end - - test 'is not emtpy' do - d = Dictionary[:a=>1, :b=>2, :c=>3] - d.refute.empty? - end - end - - method :order_by_key do - test do - d = Dictionary[:b=>1, :c=>2, :a=>4] - d.order_by_key - d.order.assert == [:a, :b, :c] - end - end - - method :order_by_value do - test do - d = Dictionary[:b=>1, :c=>2, :a=>4] - d.order_by_value - d.order.assert == [:b, :c, :a] - end - end - - class_method :alpha do - test do - d = Dictionary.alpha - d.update(:b=>1, :c=>2, :a=>4) - d.order.assert == [:a, :b, :c] - end - end - - class_method :auto do - test do - d = Dictionary.auto - s = d[:foo] - s.class.assert == Dictionary - end - end - -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_ini_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_ini_hash.rb deleted file mode 100644 index f0d25937..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_ini_hash.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'helper' - -test_case IniHash do - - class_method :new do - test do - h = IniHash.new('foo.ini', false) - end - end - - method :[]= do - test do - h = IniHash.new('foo.ini', false) - h['a'] = '1' - h['a'].assert = '1' - end - end - - method :[] do - test do - h = IniHash.new('foo.ini', false) - h['a'] = '1' - h['a'].assert = '1' - end - end - - method :to_h do - test do - h = IniHash.new('foo.ini', false) - h['a'] = '1' - h.to_h.assert = {'a'=>'1'} - end - end - - method :to_s do - test do - h = IniHash.new('foo.ini', false) - h['a'] = '1' - h.to_s.assert == "a=1\n" - end - - test do - h = IniHash.new('foo.ini', false) - h['a'] = '1' - h['b'] = {'c'=>3} - h.to_s.assert == "a=1\n[b]\nc=3\n" - end - end - - class_method :load do - h = IniHash.load('test/fixture/example.ini') - h['a'].assert == '1' - end - -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_key_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_key_hash.rb deleted file mode 100644 index e65489d8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_key_hash.rb +++ /dev/null @@ -1,182 +0,0 @@ -require 'helper' - -testcase KeyHash do - - class_method :[] do - test 'creates new KeyHash' do - s = KeyHash[] - KeyHash.assert === s - end - - test 'pre-assigns values' do - s = KeyHash[:a=>1, :b=>2] - s[:a].assert == 1 - s[:b].assert == 2 - end - end - - method :[] do - test 'instance level fetch' do - s = KeyHash[:a=>1, :b=>2] - s[:a].assert == 1 - s[:b].assert == 2 - end - - test 'by default keys are converted to strings' do - s = KeyHash[:a=>1, :b=>2] - s['a'].assert == 1 - s['b'].assert == 2 - end - end - - method :[]= do - test do - s = KeyHash.new - s[:a] = 1 - s[:b] = 2 - s[:a].assert == 1 - s[:b].assert == 2 - s['a'].assert == 1 - s['b'].assert == 2 - end - end - - method :initialize do - test do - StandardError.refute.raised? do - s = KeyHash.new - end - end - end - - method :to_hash do - test do - s = KeyHash[:a=>1, :b=>2] - s.to_hash.assert == {'a'=>1, 'b'=>2} - end - end - - method :to_h do - test do - s = KeyHash[:a=>1, :b=>2] - s.to_h.assert == {'a'=>1, 'b'=>2} - end - end - - method :replace do - test do - s = KeyHash.new - s.replace(:a=>1, :b=>2) - s.to_h.assert == {'a'=>1, 'b'=>2} - end - end - - method :delete do - test do - s = KeyHash[:a=>1, :b=>2] - s.delete(:a) - s.to_h.assert == {'b'=>2} - end - end - - method :each do - test do - s = KeyHash[:a=>1, :b=>2] - s.each do |k,v| - String.assert === k - end - end - end - - method :store do - test do - s = KeyHash.new - s.store(:a, 1) - s.to_h.assert == {'a'=>1} - end - end - - method :update do - test do - s1 = KeyHash[:a=>1,:b=>2] - s2 = KeyHash[:c=>3,:d=>4] - s1.update(s2) - s1.to_h.assert == {'a'=>1,'b'=>2,'c'=>3,'d'=>4} - end - end - - method :rekey do - test do - s = KeyHash[:a=>1,:b=>2,:c=>3] - x = s.rekey{ |k| k.upcase } - x.to_h.assert == {'A'=>1,'B'=>2,'C'=>3} - end - end - - method :rekey! do - test do - s = KeyHash[:a=>1,:b=>2,:c=>3] - s.rekey!{ |k| k.upcase } - s.to_h.assert == {'A'=>1,'B'=>2,'C'=>3} - end - end - - method :key? do - test do - s = KeyHash[:a=>1] - s.assert.key?(:a) - s.assert.key?('a') - end - end - - method :has_key? do - test do - s = KeyHash[:a=>1] - s.assert.has_key?(:a) - s.assert.has_key?('a') - end - end - - method :<< do - test do - s = KeyHash.new - s << [:a, 1] - s << [:b, 2] - s.to_h.assert == {'a'=>1, 'b'=>2} - end - end - - method :merge! do - test do - s1 = KeyHash[:a=>1,:b=>2] - s2 = KeyHash[:c=>3,:d=>4] - s1.merge!(s2) - s1.to_h.assert == {'a'=>1,'b'=>2,'c'=>3,'d'=>4} - end - end - - method :values_at do - test do - s = KeyHash[:a=>1,:b=>2,:c=>3] - s.values_at(:a, :b).assert == [1,2] - s.values_at('a','b').assert == [1,2] - end - end - - method :fetch do - test do - s = KeyHash[:a=>1,:b=>2,:c=>3] - s.fetch(:a).assert == 1 - s.fetch('a').assert == 1 - end - end - - #method :cast_key do - # test do - # s = KeyHash.new - # s.send(:cast_key, :a).assert == 'a' - # end - #end - -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_linked_list.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_linked_list.rb deleted file mode 100644 index 60761ea0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_linked_list.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'helper' - -test_case LinkedList do - - class_method :new do - ll = LinkedList.new - LinkedList.assert === ll - end - - method :to_a do - test 'empty' do - ll = LinkedList.new - ll.to_a.assert == [] - end - test 'not empty' do - ll = LinkedList.new - ll.push :a - ll.to_a.assert == [:a] - end - end - - method :empty? do - test do - ll = LinkedList.new - ll.assert.empty? - end - end - - method :delete do - test do - ll = LinkedList.new - ll.push :a - ll.to_a.assert == [:a] - ll.delete(:a) - ll.to_a.assert == [] - end - - test do - ll = LinkedList.new - ll.push :a - ll.push :b - ll.push :c - ll.to_a.assert == [:a, :b, :c] - ll.delete(:b) - ll.to_a.assert == [:a, :c] - end - end - - method :each do - test do - a = [] - ll = LinkedList.new - ll.push :a - ll.each do |e| - a << e - end - a.assert == [:a] - end - end - - method :length do - test do - ll = LinkedList.new - ll.push :a - ll.length.assert == 1 - end - end - - method :push do - test do - ll = LinkedList.new - ll.push :a - ll.to_a.assert == [:a] - end - end - - method :unshift do - test do - ll = LinkedList.new - ll.unshift :a - ll.to_a.assert == [:a] - end - test do - ll = LinkedList.new - ll.push :a - ll.unshift :b - ll.to_a.assert == [:b, :a] - end - end - - method :pop do - test do - ll = LinkedList.new - ll.push :a - ll.push :b - ll.to_a.assert == [:a, :b] - ll.pop - ll.to_a.assert == [:a] - end - end - - method :shift do - test do - ll = LinkedList.new - ll.push :a - ll.push :b - ll.to_a.assert == [:a, :b] - ll.shift - ll.to_a.assert == [:b] - end - end - - method :first do - test do - ll = LinkedList.new - ll.push :a - ll.push :b - ll.to_a.assert == [:a, :b] - ll.first.assert == :a - end - end - - method :last do - test do - ll = LinkedList.new - ll.push :a - ll.push :b - ll.to_a.assert == [:a, :b] - ll.last.assert == :b - end - end - - method :queue do - test do - ll = LinkedList.new - ll.push :a - ll.push :b - ll.queue.assert == [:a, :b] - end - end - - method :[]= do - test do - ll = LinkedList.new - ll[:a] = :b - ll.to_a.assert == [:b] - ll[:a].assert == :b - end - end - - method :[] do - test do - ll = LinkedList.new - ll.push :a - ll[:a].assert == :a - end - - test do - ll = LinkedList.new - ll.push :a - ll.push :b - ll[:a].assert == :a - ll[:b].assert == :b - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_lru_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_lru_hash.rb deleted file mode 100644 index 8912a835..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_lru_hash.rb +++ /dev/null @@ -1,162 +0,0 @@ -require 'helper' - -test_case LRUHash do - - class_method :new do - h = LRUHash.new(10) - LRUHash.assert === h - end - - method :max_size= do - test do - h = LRUHash.new(10) - h.max_size = 100 - end - end - - method :store do - test do - h = LRUHash.new(10) - h.store(:a, 1) - h[:a].assert == 1 - end - end - - method :[] do - test do - h = LRUHash.new(10) - h.store(:a, 1) - h[:a].assert == 1 - end - - test do - h = LRUHash.new(10){ |h,k| h[k] = 0 } - h[:a].assert == 0 - end - end - - method :empty? do - test do - h = LRUHash.new(10) - h.assert.empty? - end - end - - method :key do - test do - h = LRUHash.new(10) - h[:a] = 1 - h.key(1).assert == :a - end - end - - method :keys do - test do - h = LRUHash.new(10) - h[:a] = 1 - h.keys.assert == [:a] - end - end - - method :values do - test do - h = LRUHash.new(10) - h[:a] = 1 - h.values.assert == [1] - end - end - - method :values_at do - test do - h = LRUHash.new(10) - h[:a] = 1 - h[:b] = 2 - h.values_at(:a).assert == [1] - end - end - - method :has_key? do - test do - h = LRUHash.new(10) - h[:a] = 1 - h.assert.has_key?(:a) - end - end - - method :has_value? do - test do - h = LRUHash.new(10) - h[:a] = 1 - h.assert.has_value?(1) - end - end - - method :assoc do - test do - h = LRUHash.new(10) - h[:a] = 1 - h[:b] = 2 - h.assoc(:a).assert == [:a,1] - end - end - - method :rassoc do - test do - h = LRUHash.new(10) - h[:a] = 1 - h[:b] = 2 - h.rassoc(1).assert == [:a,1] - end - end - - method :each_key do - test do - h = LRUHash.new(10) - h[:a] = 1 - h[:b] = 2 - h.each_key do |k| - [:a,:b].assert.include?(k) - end - end - end - - method :each_value do - test do - h = LRUHash.new(10) - h[:a] = 1 - h[:b] = 2 - h.each_value do |v| - [1,2].assert.include?(v) - end - end - end - - method :clear do - test do - h = LRUHash.new(10) - h[:a] = 1 - h[:b] = 2 - h.clear - h.assert.empty? - end - end - - method :delete do - test do - h = LRUHash.new(10) - h[:a] = 1 - h.delete(:a) - h.assert.empty? - end - end - - method :delete_if do - test do - h = LRUHash.new(10) - h[:a] = 1 - h.delete_if{ |k,v| k == :a } - h.assert.empty? - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_open_cascade.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_open_cascade.rb deleted file mode 100644 index b06ad535..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_open_cascade.rb +++ /dev/null @@ -1,122 +0,0 @@ -require 'helper' - -testcase OpenCascade do - include AE::Legacy::Assertions - - class_method :new do - OpenCascade[:a=>1] - end - - class_method :[] do - test "hash" do - o = OpenCascade[:a=>1,:b=>2] - assert_equal(1, o.a) - assert_equal(2, o.b) - end - test "hash in hash" do - o = OpenCascade[:a=>1,:b=>2,:c=>{:x=>9}] - assert_equal(9, o.c.x) - end - test "hash in hash in hash" do - h = {:a=>1,:x=>{:y=>{:z=>1}}} - c = OpenCascade[h] - assert_equal(1, c.x.y.z) - end - end - - method :[] do - test "basic assignment" do - o = OpenCascade.new - o[:a] = 1 - assert_equal(1, o[:a]) - end - end - - method :[]= do - test "basic assignment with primed OpenCascade" do - o = OpenCascade[:a=>1] - o[:b] = 2 - o.to_h.assert == {:a=>1,:b=>2} - end - end - - method :to_a do - test do - o = OpenCascade[:a=>1,:b=>2] - a = o.to_a - a.assert.include?([:a,1]) - a.assert.include?([:b,2]) - a.size.assert == 2 - end - end - - method :to_h do - test do - o = OpenCascade[:a=>1] - assert_equal({:a=>1}, o.to_h) - end - end - - method :merge! do - test do - o = OpenCascade[:f0=>"f0"] - r = OpenCascade[:f0=>"f0", :h0=>"h0"] - h = { :h0=>"h0" } - assert_equal(r, o.merge!(h)) - assert_equal({:f0=>"f0", :h0=>"h0"}, h.merge(o)) - end - end - - method :update do - test do - o = OpenCascade[:f1=>"f1"] - o.update(:h1=>"h1") - o.assert == OpenCascade[:f1=>"f1", :h1=>"h1"] - end - end - - method :method_missing do - test "writer and reader" do - o = OpenCascade.new - 10.times{ |i| o.__send__("n#{i}=", 1 ) } - 10.times{ |i| assert_equal(1, o.__send__("n#{i}")) } - end - end - - method :<< do - test do - c = OpenCascade.new - c << [:x,8] - c << [:y,9] - - assert_equal(8, c.x) - assert_equal(9, c.y) - end - end - -end - -testcase Hash do - - method :update do - test "hash can be updated by OpenCascade" do - o = OpenCascade[:f1=>"f1"] - h = {:h1=>"h1"} - h.update(o) - h.assert == {:f1=>"f1", :h1=>"h1"} - end - end - -end - -testcase Array do - - method :flatten do - test "array can be flattened if contains OpenCascade" do - cascade = OpenCascade[:foo=>"bar"] - array = [cascade] - array.flatten # should not raise error - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_open_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_open_hash.rb deleted file mode 100644 index 1a036c30..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_open_hash.rb +++ /dev/null @@ -1,87 +0,0 @@ -require 'helper' - -testcase OpenHash do - - class_method :[] do - test do - o = OpenHash[:a=>1, :b=>2] - o.a.assert == 1 - o.b.assert == 2 - end - - test do - o = OpenHash[:a=>1, :b=>2] - o.a.assert == 1 - o.b.assert == 2 - end - end - - method :open? do - test do - o = OpenHash[:a=>1, :b=>2] - o.assert.open?(:foo) - o.refute.open?(:each) - end - end - - method :open! do - test do - o = OpenHash[:a=>1, :b=>2] - o.open!(:each) - o.assert.open?(:each) - o.each = 10 - o.each.assert == 10 - end - end - - method :close! do - test do - o = OpenHash[:a=>1, :b=>2] - o.open!(:each) - o.assert.open?(:each) - o.each = 10 - o.each.assert == 10 - o.close!(:each) - o.each.refute == 10 - end - end - - method :method_missing do - test 'bang method' do - o = OpenHash[] - o.open!(:each) - o.each = 10 - o.each.assert == 10 - - a = [] - o.each! do |k,v| - a << [k,v] - end - a.assert == [[:each,10]] - end - - test 'query method' do - o = OpenHash[] - o.a = 1 - o.assert.a? - o.refute.b? - end - end - - method :send do - test do - o = OpenHash[] - o.open!(:each) - o.each = 10 - o.each.assert == 10 - - a = [] - o.send(:each) do |k,v| - a << [k,v] - end - a.assert == [[:each,10]] - end - end - -end - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_property_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_property_hash.rb deleted file mode 100644 index 4766b69e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_property_hash.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'helper' - -test_case PropertyHash do - - class_method :new do - test do - PropertyHash.new - end - end - - method :update do - test do - h = PropertyHash.new - h.property :a - h.property :b - h.update(:a=>1, :b=>2) - h.assert == {:a=>1, :b=>2} - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_query_hash.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_query_hash.rb deleted file mode 100644 index b6e878bf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/case_query_hash.rb +++ /dev/null @@ -1,226 +0,0 @@ -require 'helper' - -testcase QueryHash do - - class_method :new do - test 'new QueryHash with default proc' do - q = QueryHash.new{ |h,k| h[k] = 1 } - q[:a].assert == 1 - end - end - - class_method :[] do - test 'creates new QueryHash' do - s = QueryHash[] - QueryHash.assert === s - end - - test 'pre-assigns values' do - s = QueryHash[:a=>1, :b=>2] - s[:a].assert == 1 - s[:b].assert == 2 - end - end - - method :[] do - test 'instance level fetch' do - s = QueryHash[:a=>1, :b=>2] - s[:a].assert == 1 - s[:b].assert == 2 - #s['a'].assert == 1 - #s['b'].assert == 2 - end - end - - method :[]= do - test do - s = QueryHash.new - s[:a] = 1 - s[:b] = 2 - s[:a].assert == 1 - s[:b].assert == 2 - #s['a'].assert == 1 - #s['b'].assert == 2 - end - end - - method :respond_to? do - test 'responds to all query methods' do - q = QueryHash.new - q.assert.respond_to?(:anything?) - end - - test 'responds to all bang methods' do - q = QueryHash.new - q.assert.respond_to?(:anything!) - end - - test 'responds to all setter methods' do - q = QueryHash.new - q.assert.respond_to?(:anything=) - end - - test 'responds to usual methods' do - q = QueryHash.new - q.assert.respond_to?(:each) - end - end - - method :to_hash do - test do - s = QueryHash[:a=>1, :b=>2] - s.to_hash.assert == {'a'=>1, 'b'=>2} - end - end - - method :to_h do - test do - s = QueryHash[:a=>1, :b=>2] - s.to_h.assert == {'a'=>1, 'b'=>2} - end - end - - method :replace do - test do - s = QueryHash.new - s.replace(:a=>1, :b=>2) - s.to_h.assert == {'a'=>1, 'b'=>2} - end - end - - method :delete do - test do - s = QueryHash[:a=>1, :b=>2] - s.delete(:a) - s.to_h.assert == {'b'=>2} - end - end - - method :each do - test do - s = QueryHash[:a=>1, :b=>2] - s.each do |k,v| - String.assert === k - end - end - end - - method :store do - test do - s = QueryHash.new - s.store(:a, 1) - s.to_h.assert == {'a'=>1} - end - end - - method :update do - test do - s1 = QueryHash[:a=>1,:b=>2] - s2 = QueryHash[:c=>3,:d=>4] - s1.update(s2) - s1.to_h.assert == {'a'=>1,'b'=>2,'c'=>3,'d'=>4} - end - end - - method :rekey do - test do - s = QueryHash[:a=>1,:b=>2,:c=>3] - x = s.rekey{ |k| k.upcase } - x.to_h.assert == {'A'=>1,'B'=>2,'C'=>3} - end - end - - method :rekey! do - test do - s = QueryHash[:a=>1,:b=>2,:c=>3] - s.rekey!{ |k| k.upcase } - s.to_h.assert == {'A'=>1,'B'=>2,'C'=>3} - end - end - - method :key? do - test do - s = QueryHash[:a=>1] - s.assert.key?(:a) - s.assert.key?('a') - end - end - - method :has_key? do - test do - s = QueryHash[:a=>1] - s.assert.has_key?(:a) - s.assert.has_key?('a') - end - end - - method :<< do - test do - s = QueryHash.new - s << [:a, 1] - s << [:b, 2] - s.to_h.assert == {'a'=>1, 'b'=>2} - end - end - - method :merge! do - test do - s1 = QueryHash[:a=>1,:b=>2] - s2 = QueryHash[:c=>3,:d=>4] - s1.merge!(s2) - s1.to_h.assert == {'a'=>1,'b'=>2,'c'=>3,'d'=>4} - end - end - - method :values_at do - test do - s = QueryHash[:a=>1,:b=>2,:c=>3] - s.values_at(:a, :b).assert == [1,2] - s.values_at('a','b').assert == [1,2] - end - end - - method :fetch do - test do - s = QueryHash[:a=>1,:b=>2,:c=>3] - s.fetch(:a).assert == 1 - s.fetch('a').assert == 1 - end - end - - method :cast_key do - test do - s = QueryHash.new - s.pry.cast_key(:a).assert == 'a' - end - end - - method :method_missing do - test 'dynamic query methods can look-up values' do - q = QueryHash[:a=>1,:b=>2,:c=>3] - q.a?.assert == 1 - q.b?.assert == 2 - q.c?.assert == 3 - end - - test 'dynamic bang methods can looks up values too' do - q = QueryHash[:a=>1,:b=>2,:c=>3] - q.a!.assert == 1 - q.b!.assert == 2 - q.c!.assert == 3 - end - - test 'dynamic bang methods will auto-instantiate' do - q = QueryHash.new - q.default_proc{ |h,k| h[k] = 'default' } - q.foo!.assert == 'default' - end - - test 'dynamic query methods will NOT auto-instantiate' do - q = QueryHash.new - q.default_proc{ |h,k| h[k] = 'default' } - q.foo?.assert == nil - end - end - -end diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/fixture/example.ini b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/fixture/example.ini deleted file mode 100644 index 91450cb9..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/fixture/example.ini +++ /dev/null @@ -1,8 +0,0 @@ -# top comment - -a = 1 - -[section] -x = 2 -y = 3 - diff --git a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/helper.rb b/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/helper.rb deleted file mode 100644 index 22bd1b77..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/hashery-2.1.2/test/helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'lemon' -require 'ae' -require 'ae/legacy' # bacause imitation BasicObject sucks -require 'ae/pry' - -require 'hashery' - -include Hashery diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.github/FUNDING.yml b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.github/FUNDING.yml deleted file mode 100644 index b9b6a927..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.github/FUNDING.yml +++ /dev/null @@ -1,4 +0,0 @@ -github: gjtorikian -patreon: gjtorikian -open_collective: garen-torikian -issuehunt: gjtorikian diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.gitignore b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.gitignore deleted file mode 100644 index 111f216b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -*.gem -*.rbc -.bundle -.config -.yardoc -Gemfile.lock -gemfiles/*.lock -InstalledFiles -_yardoc -coverage -doc/ -lib/bundler/man -pkg -rdoc -spec/reports -test/tmp -test/version_tmp -tmp -exec/* -vendor/gems \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.travis.yml b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.travis.yml deleted file mode 100644 index ff321ccd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: ruby -cache: bundler -bundler_args: --path ../../vendor/bundle - -addons: - apt: - sources: - - libicu-dev - - kalakris-cmake - packages: - - cmake - -script: bundle exec rake - -gemfile: - - gemfiles/rails_6.gemfile - - gemfiles/rails_5.gemfile - - gemfiles/rails_4.gemfile - - gemfiles/rails_3.gemfile - -rvm: - - 2.4.6 - - 2.3.8 - - 2.5.7 - - ruby-head - -matrix: - fast_finish: true - allow_failures: - - rvm: ruby-head - exclude: - - gemfile: gemfiles/rails_6.gemfile - rvm: 2.4.6 - - gemfile: gemfiles/rails_6.gemfile - rvm: 2.3.8 - - gemfile: gemfiles/rails_4.gemfile - rvm: 2.5.7 - - gemfile: gemfiles/rails_4.gemfile - rvm: 2.4.6 - - gemfile: gemfiles/rails_3.gemfile - rvm: 2.5.7 - - gemfile: gemfiles/rails_3.gemfile - rvm: 2.4.6 diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Appraisals b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Appraisals deleted file mode 100644 index 6037fd68..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Appraisals +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -appraise 'rails-3' do - gem 'rack', '< 2' - gem 'rails', '3.2.22.2' -end - -appraise 'rails-4' do - gem 'rack', '< 2' - gem 'rails', '~> 4.2.6' -end - -appraise 'rails-5' do - gem 'rails', '~> 5.0.0' -end - -appraise 'rails-6' do - gem 'rails', '~> 6.0.0' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/CHANGELOG.md b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/CHANGELOG.md deleted file mode 100644 index 4c4ba82f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/CHANGELOG.md +++ /dev/null @@ -1,858 +0,0 @@ -# Changelog - -## [Unreleased](https://github.com/gjtorikian/html-pipeline/tree/HEAD) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.14.2...HEAD) - -**Closed issues:** - -- Allow vertical-align [\#366](https://github.com/gjtorikian/html-pipeline/issues/366) -- Since bump 2.14.2 builds are failing [\#363](https://github.com/gjtorikian/html-pipeline/issues/363) - -**Merged pull requests:** - -- Replace EscapeUtils.escape\_html with CGI.escape\_html [\#365](https://github.com/gjtorikian/html-pipeline/pull/365) ([ramhoj](https://github.com/ramhoj)) - -## [v2.14.2](https://github.com/gjtorikian/html-pipeline/tree/v2.14.2) (2022-06-12) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.14.1...v2.14.2) - -**Merged pull requests:** - -- handle invalid data urls in absolute source filter [\#361](https://github.com/gjtorikian/html-pipeline/pull/361) ([glaszig](https://github.com/glaszig)) - -## [v2.14.1](https://github.com/gjtorikian/html-pipeline/tree/v2.14.1) (2022-03-31) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.13.2...v2.14.1) - -**Closed issues:** - -- 2.14.0 is disconnected [\#358](https://github.com/gjtorikian/html-pipeline/issues/358) -- I would love to use the vscode codicon.ttf in my readme.md [\#356](https://github.com/gjtorikian/html-pipeline/issues/356) -- Html-pipeline [\#355](https://github.com/gjtorikian/html-pipeline/issues/355) -- Canalizacion de HTML [\#354](https://github.com/gjtorikian/html-pipeline/issues/354) -- Change branch name off of `master` [\#340](https://github.com/gjtorikian/html-pipeline/issues/340) -- New feature request: team mention filter [\#311](https://github.com/gjtorikian/html-pipeline/issues/311) -- code in header produce invalid anchor [\#308](https://github.com/gjtorikian/html-pipeline/issues/308) -- Stop "camo"ing "github.io" [\#305](https://github.com/gjtorikian/html-pipeline/issues/305) -- A filter to produce diffs with syntax highlighting in html, maybe. [\#270](https://github.com/gjtorikian/html-pipeline/issues/270) -- Require pygments.rb or remove Pygments references [\#235](https://github.com/gjtorikian/html-pipeline/issues/235) -- Allow ᴀʀɪᴀ attributes for blind people. [\#219](https://github.com/gjtorikian/html-pipeline/issues/219) -- 'lexer' is removed from github-linguist [\#217](https://github.com/gjtorikian/html-pipeline/issues/217) -- Please document how to use the html-pipeline binary without command‐line arguments! [\#213](https://github.com/gjtorikian/html-pipeline/issues/213) -- PHP syntax highlight [\#212](https://github.com/gjtorikian/html-pipeline/issues/212) - -## [v2.13.2](https://github.com/gjtorikian/html-pipeline/tree/v2.13.2) (2020-12-04) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.13.1...v2.13.2) - -**Merged pull requests:** - -- Fix custom renderer with unsafe option missing pre lang [\#341](https://github.com/gjtorikian/html-pipeline/pull/341) ([kazk](https://github.com/kazk)) - -## [v2.13.1](https://github.com/gjtorikian/html-pipeline/tree/v2.13.1) (2020-12-02) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.14.0...v2.13.1) - -**Merged pull requests:** - -- Replace whitelist with more neutral language [\#339](https://github.com/gjtorikian/html-pipeline/pull/339) ([tancnle](https://github.com/tancnle)) -- allows progress tags to be used [\#338](https://github.com/gjtorikian/html-pipeline/pull/338) ([pedrozath](https://github.com/pedrozath)) -- Updated English [\#337](https://github.com/gjtorikian/html-pipeline/pull/337) ([BhuvnendraPratapSingh](https://github.com/BhuvnendraPratapSingh)) -- Make AutolinkFilter configurable [\#335](https://github.com/gjtorikian/html-pipeline/pull/335) ([mnishiguchi](https://github.com/mnishiguchi)) - -## [v2.14.0](https://github.com/gjtorikian/html-pipeline/tree/v2.14.0) (2020-08-11) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.13.0...v2.14.0) - -## [v2.13.0](https://github.com/gjtorikian/html-pipeline/tree/v2.13.0) (2020-05-28) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.12.3...v2.13.0) - -**Closed issues:** - -- Jch html-pipeline [\#330](https://github.com/gjtorikian/html-pipeline/issues/330) -- console rendering of slash continued multi-line commands [\#328](https://github.com/gjtorikian/html-pipeline/issues/328) -- Allow backslash-escape for @mention and emoji [\#232](https://github.com/gjtorikian/html-pipeline/issues/232) - -**Merged pull requests:** - -- Allow `role` attributes in html tags [\#332](https://github.com/gjtorikian/html-pipeline/pull/332) ([eric-wieser](https://github.com/eric-wieser)) -- Update README.md [\#329](https://github.com/gjtorikian/html-pipeline/pull/329) ([Mihail354](https://github.com/Mihail354)) -- Update CHANGELOG from 2.12.1 to 2.12.3 [\#326](https://github.com/gjtorikian/html-pipeline/pull/326) ([JuanitoFatas](https://github.com/JuanitoFatas)) - -## [v2.12.3](https://github.com/gjtorikian/html-pipeline/tree/v2.12.3) (2019-12-19) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.12.2...v2.12.3) - -**Merged pull requests:** - -- Improves syntax highlight filter [\#325](https://github.com/gjtorikian/html-pipeline/pull/325) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Reuse found lexer in SyntaxHighlightFilter [\#324](https://github.com/gjtorikian/html-pipeline/pull/324) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Fix link of Rouge CSS Theme [\#323](https://github.com/gjtorikian/html-pipeline/pull/323) ([JuanitoFatas](https://github.com/JuanitoFatas)) - -## [v2.12.2](https://github.com/gjtorikian/html-pipeline/tree/v2.12.2) (2019-11-14) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.12.1...v2.12.2) - -**Closed issues:** - -- Changing the list of commonmarker extensions with custom renderer is broken [\#321](https://github.com/gjtorikian/html-pipeline/issues/321) - -**Merged pull requests:** - -- Allow bad tags [\#322](https://github.com/gjtorikian/html-pipeline/pull/322) ([gjtorikian](https://github.com/gjtorikian)) - -## [v2.12.1](https://github.com/gjtorikian/html-pipeline/tree/v2.12.1) (2019-11-13) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.12.0...v2.12.1) - -**Closed issues:** - -- Where is this inserting the p tag? [\#317](https://github.com/gjtorikian/html-pipeline/issues/317) -- Update CHANGELOG [\#315](https://github.com/gjtorikian/html-pipeline/issues/315) - -**Merged pull requests:** - -- Make this list a const [\#320](https://github.com/gjtorikian/html-pipeline/pull/320) ([gjtorikian](https://github.com/gjtorikian)) -- Add Rails 6.0 to appraisals [\#319](https://github.com/gjtorikian/html-pipeline/pull/319) ([smudge](https://github.com/smudge)) -- Add ability to pass custom renderer to MarkdownFilter [\#318](https://github.com/gjtorikian/html-pipeline/pull/318) ([gjtorikian](https://github.com/gjtorikian)) -- Update changelog [\#316](https://github.com/gjtorikian/html-pipeline/pull/316) ([sj26](https://github.com/sj26)) - -## [v2.12.0](https://github.com/gjtorikian/html-pipeline/tree/v2.12.0) (2019-08-12) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.11.1...v2.12.0) - -**Merged pull requests:** - -- Team mention filter [\#314](https://github.com/gjtorikian/html-pipeline/pull/314) ([indigok](https://github.com/indigok)) - -## [v2.11.1](https://github.com/gjtorikian/html-pipeline/tree/v2.11.1) (2019-07-18) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.11.0...v2.11.1) - -**Merged pull requests:** - -- Freeze string literals in Ruby 2.3 and beyond [\#313](https://github.com/gjtorikian/html-pipeline/pull/313) ([ashmaroli](https://github.com/ashmaroli)) -- Avoid YARD warning: Unknown tag @mention [\#309](https://github.com/gjtorikian/html-pipeline/pull/309) ([olleolleolle](https://github.com/olleolleolle)) - -## [v2.11.0](https://github.com/gjtorikian/html-pipeline/tree/v2.11.0) (2019-04-06) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.10.0...v2.11.0) - -**Merged pull requests:** - -- CI: Use latest 2.4 [\#310](https://github.com/gjtorikian/html-pipeline/pull/310) ([olleolleolle](https://github.com/olleolleolle)) -- CamoFilter: use String\#unpack to hexencode URLs [\#256](https://github.com/gjtorikian/html-pipeline/pull/256) ([glaszig](https://github.com/glaszig)) - -## [v2.10.0](https://github.com/gjtorikian/html-pipeline/tree/v2.10.0) (2019-01-06) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.9.2...v2.10.0) - -**Closed issues:** - -- RFC5122: XMPP URI [\#289](https://github.com/gjtorikian/html-pipeline/issues/289) - -**Merged pull requests:** - -- Add XMPP URI \#289 [\#307](https://github.com/gjtorikian/html-pipeline/pull/307) ([Neustradamus](https://github.com/Neustradamus)) - -## [v2.9.2](https://github.com/gjtorikian/html-pipeline/tree/v2.9.2) (2019-01-04) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.9.1...v2.9.2) - -**Closed issues:** - -- Why isn't \ whitelisted by default? [\#183](https://github.com/gjtorikian/html-pipeline/issues/183) - -**Merged pull requests:** - -- Whitelist various inline semantic/formatting tags [\#306](https://github.com/gjtorikian/html-pipeline/pull/306) ([chris-morgan](https://github.com/chris-morgan)) - -## [v2.9.1](https://github.com/gjtorikian/html-pipeline/tree/v2.9.1) (2018-11-13) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.9.0...v2.9.1) - -**Merged pull requests:** - -- Render irc and ircs URLs [\#191](https://github.com/gjtorikian/html-pipeline/pull/191) ([frozencemetery](https://github.com/frozencemetery)) - -## [v2.9.0](https://github.com/gjtorikian/html-pipeline/tree/v2.9.0) (2018-11-08) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.8.4...v2.9.0) - -**Closed issues:** - -- New feature request for hashtags \# filter [\#301](https://github.com/gjtorikian/html-pipeline/issues/301) -- Whitelist srcset for responsive images [\#233](https://github.com/gjtorikian/html-pipeline/issues/233) - -**Merged pull requests:** - -- Adds `UNSAFE` option to CommonMarker usage where needed [\#304](https://github.com/gjtorikian/html-pipeline/pull/304) ([diachini](https://github.com/diachini)) -- Fix one more missing freeze [\#300](https://github.com/gjtorikian/html-pipeline/pull/300) ([stanhu](https://github.com/stanhu)) - -## [v2.8.4](https://github.com/gjtorikian/html-pipeline/tree/v2.8.4) (2018-07-24) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.8.3...v2.8.4) - -**Merged pull requests:** - -- Freeze all elements in HTML::Pipeline::SanitizationFilter [\#299](https://github.com/gjtorikian/html-pipeline/pull/299) ([stanhu](https://github.com/stanhu)) - -## [v2.8.3](https://github.com/gjtorikian/html-pipeline/tree/v2.8.3) (2018-06-29) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.8.2...v2.8.3) - -**Closed issues:** - -- Accessibility-related HTML isn't whitelisted [\#215](https://github.com/gjtorikian/html-pipeline/issues/215) - -**Merged pull requests:** - -- Whitelist some accessibility properties [\#298](https://github.com/gjtorikian/html-pipeline/pull/298) ([gjtorikian](https://github.com/gjtorikian)) - -## [v2.8.2](https://github.com/gjtorikian/html-pipeline/tree/v2.8.2) (2018-06-27) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.8.1...v2.8.2) - -## [v2.8.1](https://github.com/gjtorikian/html-pipeline/tree/v2.8.1) (2018-06-26) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.8.0...v2.8.1) - -**Merged pull requests:** - -- \[PATCH\] Fix XSS vulnerability on table of content generation [\#296](https://github.com/gjtorikian/html-pipeline/pull/296) ([gjtorikian](https://github.com/gjtorikian)) - -## [v2.8.0](https://github.com/gjtorikian/html-pipeline/tree/v2.8.0) (2018-05-04) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.7.2...v2.8.0) - -**Merged pull requests:** - -- Ensure \ nodes are not removed after syntax highlighting [\#295](https://github.com/gjtorikian/html-pipeline/pull/295) ([ianks](https://github.com/ianks)) - -## [v2.7.2](https://github.com/gjtorikian/html-pipeline/tree/v2.7.2) (2018-04-25) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.7.1...v2.7.2) - -**Closed issues:** - -- emoji autocomplet/suggestion [\#294](https://github.com/gjtorikian/html-pipeline/issues/294) -- Bug in allowed attributes [\#287](https://github.com/gjtorikian/html-pipeline/issues/287) -- Github Flavoured Markdown table support [\#269](https://github.com/gjtorikian/html-pipeline/issues/269) -- Allow embedding of JSON-LD [\#250](https://github.com/gjtorikian/html-pipeline/issues/250) - -**Merged pull requests:** - -- Update README.md \[ci skip\] [\#293](https://github.com/gjtorikian/html-pipeline/pull/293) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Disable processing @mentions in \ tag [\#292](https://github.com/gjtorikian/html-pipeline/pull/292) ([ashmaroli](https://github.com/ashmaroli)) -- Update dependencies [\#291](https://github.com/gjtorikian/html-pipeline/pull/291) ([gjtorikian](https://github.com/gjtorikian)) -- Apply mention filter & emoji filter on node text [\#290](https://github.com/gjtorikian/html-pipeline/pull/290) ([ashmaroli](https://github.com/ashmaroli)) - -## [v2.7.1](https://github.com/gjtorikian/html-pipeline/tree/v2.7.1) (2017-09-21) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.7.0...v2.7.1) - -**Closed issues:** - -- Eating LoadErrors can mask different problems [\#282](https://github.com/gjtorikian/html-pipeline/issues/282) - -**Merged pull requests:** - -- Reduce travis errors and move to trusty [\#285](https://github.com/gjtorikian/html-pipeline/pull/285) ([timdiggins](https://github.com/timdiggins)) -- Output underlying load error when wrapping [\#284](https://github.com/gjtorikian/html-pipeline/pull/284) ([timdiggins](https://github.com/timdiggins)) -- correct spelling mistake [\#281](https://github.com/gjtorikian/html-pipeline/pull/281) ([EdwardBetts](https://github.com/EdwardBetts)) - -## [v2.7.0](https://github.com/gjtorikian/html-pipeline/tree/v2.7.0) (2017-08-16) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.6.0...v2.7.0) - -**Closed issues:** - -- github-markdown is abandonware. Lose it or resurrect+support it? [\#246](https://github.com/gjtorikian/html-pipeline/issues/246) - -**Merged pull requests:** - -- Fix CI~ [\#280](https://github.com/gjtorikian/html-pipeline/pull/280) ([kivikakk](https://github.com/kivikakk)) -- Let users set the common marker extensions [\#279](https://github.com/gjtorikian/html-pipeline/pull/279) ([gwincr11](https://github.com/gwincr11)) -- Update CHANGELOG for 2.6.0 [\#277](https://github.com/gjtorikian/html-pipeline/pull/277) ([carpodaster](https://github.com/carpodaster)) -- Fix hyperlink in README [\#276](https://github.com/gjtorikian/html-pipeline/pull/276) ([jwilk](https://github.com/jwilk)) - -## [v2.6.0](https://github.com/gjtorikian/html-pipeline/tree/v2.6.0) (2017-05-23) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.5.0...v2.6.0) - -**Merged pull requests:** - -- Set instrumentation name [\#275](https://github.com/gjtorikian/html-pipeline/pull/275) ([gjtorikian](https://github.com/gjtorikian)) -- Switch to CommonMark [\#274](https://github.com/gjtorikian/html-pipeline/pull/274) ([kivikakk](https://github.com/kivikakk)) -- add korgi to 3rd party extensions \[ci skip\] [\#271](https://github.com/gjtorikian/html-pipeline/pull/271) ([jodeci](https://github.com/jodeci)) - -## [v2.5.0](https://github.com/gjtorikian/html-pipeline/tree/v2.5.0) (2017-01-13) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.4.2...v2.5.0) - -**Closed issues:** - -- Add `` to whitelist [\#265](https://github.com/gjtorikian/html-pipeline/issues/265) -- Missing context keys for HTML::Pipeline::EmojiFilter: :asset\_root [\#262](https://github.com/gjtorikian/html-pipeline/issues/262) -- Emoji \ tags does not pass W3C validationg [\#234](https://github.com/gjtorikian/html-pipeline/issues/234) -- Incompatible character encodings: ASCII-8BIT and UTF-8 in EmailReplyFilter [\#229](https://github.com/gjtorikian/html-pipeline/issues/229) - -**Merged pull requests:** - -- Ruby 2.4 [\#268](https://github.com/gjtorikian/html-pipeline/pull/268) ([haileys](https://github.com/haileys)) - -## [v2.4.2](https://github.com/gjtorikian/html-pipeline/tree/v2.4.2) (2016-07-11) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.4.1...v2.4.2) - -**Closed issues:** - -- Rails 5 support [\#252](https://github.com/gjtorikian/html-pipeline/issues/252) - -**Merged pull requests:** - -- Release v2.4.2 [\#260](https://github.com/gjtorikian/html-pipeline/pull/260) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Bump Active Support dependency to version \>= 2 [\#257](https://github.com/gjtorikian/html-pipeline/pull/257) ([JuanitoFatas](https://github.com/JuanitoFatas)) - -## [v2.4.1](https://github.com/gjtorikian/html-pipeline/tree/v2.4.1) (2016-05-11) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.4.0...v2.4.1) - -**Merged pull requests:** - -- Bump gem to 2.4.1 [\#255](https://github.com/gjtorikian/html-pipeline/pull/255) ([jch](https://github.com/jch)) -- Regression in EmailReplyPipeline: unfiltered content is being ommitted [\#253](https://github.com/gjtorikian/html-pipeline/pull/253) ([oreoshake](https://github.com/oreoshake)) - -## [v2.4.0](https://github.com/gjtorikian/html-pipeline/tree/v2.4.0) (2016-04-11) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.3.0...v2.4.0) - -**Merged pull requests:** - -- Release 2.4.0 [\#248](https://github.com/gjtorikian/html-pipeline/pull/248) ([jch](https://github.com/jch)) -- Optionally filter email addresses [\#247](https://github.com/gjtorikian/html-pipeline/pull/247) ([oreoshake](https://github.com/oreoshake)) - -## [v2.3.0](https://github.com/gjtorikian/html-pipeline/tree/v2.3.0) (2016-01-20) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.2.4...v2.3.0) - -**Merged pull requests:** - -- Release 2.3.0 [\#245](https://github.com/gjtorikian/html-pipeline/pull/245) ([jch](https://github.com/jch)) -- Creating the option to pass in an anchor icon, instead of using octicons [\#244](https://github.com/gjtorikian/html-pipeline/pull/244) ([jonrohan](https://github.com/jonrohan)) - -## [v2.2.4](https://github.com/gjtorikian/html-pipeline/tree/v2.2.4) (2016-01-17) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.2.3...v2.2.4) - -**Merged pull requests:** - -- Use entire namespace so exception constant is resolved [\#243](https://github.com/gjtorikian/html-pipeline/pull/243) ([simeonwillbanks](https://github.com/simeonwillbanks)) - -## [v2.2.3](https://github.com/gjtorikian/html-pipeline/tree/v2.2.3) (2016-01-14) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.2.2...v2.2.3) - -**Closed issues:** - -- `rescue LoadError; abort` flow for missing dependencies breaks client applications [\#240](https://github.com/gjtorikian/html-pipeline/issues/240) - -**Merged pull requests:** - -- Release 2.2.3 [\#242](https://github.com/gjtorikian/html-pipeline/pull/242) ([jch](https://github.com/jch)) -- raise MissingDependencyError instead of aborting on missing dependency [\#241](https://github.com/gjtorikian/html-pipeline/pull/241) ([parkr](https://github.com/parkr)) -- Fix typo [\#239](https://github.com/gjtorikian/html-pipeline/pull/239) ([rimenes](https://github.com/rimenes)) -- Test against Ruby 2.3.0 on Travis CI [\#238](https://github.com/gjtorikian/html-pipeline/pull/238) ([tricknotes](https://github.com/tricknotes)) -- use travis containers [\#237](https://github.com/gjtorikian/html-pipeline/pull/237) ([kbrock](https://github.com/kbrock)) - -## [v2.2.2](https://github.com/gjtorikian/html-pipeline/tree/v2.2.2) (2015-10-27) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.2.1...v2.2.2) - -**Closed issues:** - -- 2.2.1 release [\#225](https://github.com/gjtorikian/html-pipeline/issues/225) - -**Merged pull requests:** - -- Release 2.2.2 [\#231](https://github.com/gjtorikian/html-pipeline/pull/231) ([jch](https://github.com/jch)) -- Fix for calling mention\_link\_filter with only one argument [\#230](https://github.com/gjtorikian/html-pipeline/pull/230) ([benbalter](https://github.com/benbalter)) -- Add html-pipeline-linkify\_github to 3rd Party Extensions \[ci skip\] [\#228](https://github.com/gjtorikian/html-pipeline/pull/228) ([JuanitoFatas](https://github.com/JuanitoFatas)) - -## [v2.2.1](https://github.com/gjtorikian/html-pipeline/tree/v2.2.1) (2015-10-01) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.2.0...v2.2.1) - -**Merged pull requests:** - -- Soften Nokogiri dependency to versions "\>= 1.4" [\#208](https://github.com/gjtorikian/html-pipeline/pull/208) ([JuanitoFatas](https://github.com/JuanitoFatas)) - -## [v2.2.0](https://github.com/gjtorikian/html-pipeline/tree/v2.2.0) (2015-09-28) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.1.0...v2.2.0) - -**Merged pull requests:** - -- Release 2.2.0 [\#224](https://github.com/gjtorikian/html-pipeline/pull/224) ([jch](https://github.com/jch)) -- Only allow cite attribute on blockquote and restrict schemes [\#223](https://github.com/gjtorikian/html-pipeline/pull/223) ([btoews](https://github.com/btoews)) - -## [v2.1.0](https://github.com/gjtorikian/html-pipeline/tree/v2.1.0) (2015-09-22) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v2.0...v2.1.0) - -**Closed issues:** - -- Add SmartQuotes filter [\#220](https://github.com/gjtorikian/html-pipeline/issues/220) -- Need help fixing a non-security issue… [\#214](https://github.com/gjtorikian/html-pipeline/issues/214) -- List GitHub-deployed versions somewhere? [\#201](https://github.com/gjtorikian/html-pipeline/issues/201) -- Support limited use of the HTML 'style' attribute [\#192](https://github.com/gjtorikian/html-pipeline/issues/192) -- Separate gems for versioning external dependencies [\#182](https://github.com/gjtorikian/html-pipeline/issues/182) - -**Merged pull requests:** - -- Release 2.1.0 [\#222](https://github.com/gjtorikian/html-pipeline/pull/222) ([jch](https://github.com/jch)) -- Whitelist schemes for longdesc [\#221](https://github.com/gjtorikian/html-pipeline/pull/221) ([btoews](https://github.com/btoews)) -- Update README.md [\#211](https://github.com/gjtorikian/html-pipeline/pull/211) ([st0012](https://github.com/st0012)) -- Add ImageFilter for image url to img tag conversion [\#207](https://github.com/gjtorikian/html-pipeline/pull/207) ([st0012](https://github.com/st0012)) -- Extract emoji image tag generation to own method [\#195](https://github.com/gjtorikian/html-pipeline/pull/195) ([kbrock](https://github.com/kbrock)) - -## [v2.0](https://github.com/gjtorikian/html-pipeline/tree/v2.0) (2015-07-20) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.11.0...v2.0) - -**Closed issues:** - -- Feature request: Strikethrough if issue is closed [\#202](https://github.com/gjtorikian/html-pipeline/issues/202) -- how can i read this code? [\#198](https://github.com/gjtorikian/html-pipeline/issues/198) -- how can i read this code? [\#197](https://github.com/gjtorikian/html-pipeline/issues/197) -- Change github-markdown dependency to a free licensed parser [\#196](https://github.com/gjtorikian/html-pipeline/issues/196) -- possible bug? [\#193](https://github.com/gjtorikian/html-pipeline/issues/193) -- Support ftp scheme for markdown URLs [\#187](https://github.com/gjtorikian/html-pipeline/issues/187) -- Syntax highlighting example in Readme not working [\#186](https://github.com/gjtorikian/html-pipeline/issues/186) -- OSX HTML::Pipeline::MarkdownFilter Fails on Right Double Quotation Mark around email address [\#173](https://github.com/gjtorikian/html-pipeline/issues/173) -- Question - Can this work with Rouge? [\#166](https://github.com/gjtorikian/html-pipeline/issues/166) -- Question about github markdown filter \(low priority!\) [\#165](https://github.com/gjtorikian/html-pipeline/issues/165) -- Do not mention or emojify in a codeblock [\#163](https://github.com/gjtorikian/html-pipeline/issues/163) -- MentionFilter base\_url config question [\#161](https://github.com/gjtorikian/html-pipeline/issues/161) -- Feature Request: Add "details" tag to whitelist [\#138](https://github.com/gjtorikian/html-pipeline/issues/138) - -**Merged pull requests:** - -- Add three 3rd party filters. \[ci skip\] [\#185](https://github.com/gjtorikian/html-pipeline/pull/185) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- \[MentionFilter\] Dup string before modifying [\#181](https://github.com/gjtorikian/html-pipeline/pull/181) ([jch](https://github.com/jch)) -- Constrain active support \>= 2, \< 5 [\#180](https://github.com/gjtorikian/html-pipeline/pull/180) ([jch](https://github.com/jch)) -- Release 2.0 [\#179](https://github.com/gjtorikian/html-pipeline/pull/179) ([jch](https://github.com/jch)) -- \[ci skip\] Fix CHANGELOG.md rendering. [\#177](https://github.com/gjtorikian/html-pipeline/pull/177) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Restrict nokogiri to specific versions [\#176](https://github.com/gjtorikian/html-pipeline/pull/176) ([simeonwillbanks](https://github.com/simeonwillbanks)) -- Use svg build badge. \[ci skip\] [\#175](https://github.com/gjtorikian/html-pipeline/pull/175) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Add 3rd party gem: html-pipeline-rouge\_filter. [\#174](https://github.com/gjtorikian/html-pipeline/pull/174) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- MentionFilter\#link\_to\_mentioned\_user: Replace String introspection with Regexp match [\#172](https://github.com/gjtorikian/html-pipeline/pull/172) ([simeonwillbanks](https://github.com/simeonwillbanks)) -- Whitelist summary and details element. [\#171](https://github.com/gjtorikian/html-pipeline/pull/171) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Implement new context option: ignored\_ancestor\_tags to accept more ignored tags. [\#170](https://github.com/gjtorikian/html-pipeline/pull/170) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Support ~login for MentionFilter. [\#167](https://github.com/gjtorikian/html-pipeline/pull/167) ([JuanitoFatas](https://github.com/JuanitoFatas)) -- Add GitHub flavor Markdown Task List extension [\#162](https://github.com/gjtorikian/html-pipeline/pull/162) ([simeonwillbanks](https://github.com/simeonwillbanks)) -- Drop support for gemoji ~\> 1.0 [\#159](https://github.com/gjtorikian/html-pipeline/pull/159) ([jch](https://github.com/jch)) -- Revert "Search for text nodes on DocumentFragments without root tags" [\#158](https://github.com/gjtorikian/html-pipeline/pull/158) ([jch](https://github.com/jch)) -- @mention allow for custom regex to identify usernames. [\#157](https://github.com/gjtorikian/html-pipeline/pull/157) ([brittballard](https://github.com/brittballard)) -- Drop support for ruby ree, 1.9.2 [\#156](https://github.com/gjtorikian/html-pipeline/pull/156) ([jch](https://github.com/jch)) -- Use Linguist lexers [\#153](https://github.com/gjtorikian/html-pipeline/pull/153) ([pchaigno](https://github.com/pchaigno)) -- Readme tweaks: add FAQ section, refresh 3rd party extensions [\#150](https://github.com/gjtorikian/html-pipeline/pull/150) ([jch](https://github.com/jch)) -- \ tags are not skipped by EmojiFilter [\#147](https://github.com/gjtorikian/html-pipeline/pull/147) ([moskvax](https://github.com/moskvax)) - -## [v1.11.0](https://github.com/gjtorikian/html-pipeline/tree/v1.11.0) (2014-09-15) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.10.0...v1.11.0) - -**Closed issues:** - -- @mention\_filter should not replace mentions in style blocks. [\#143](https://github.com/gjtorikian/html-pipeline/issues/143) -- EmojiFilter doesn't work on strings that don't contain HTML [\#133](https://github.com/gjtorikian/html-pipeline/issues/133) - -**Merged pull requests:** - -- Search for text nodes on DocumentFragments without root tags [\#146](https://github.com/gjtorikian/html-pipeline/pull/146) ([Razer6](https://github.com/Razer6)) -- Don't filter @mentions in \ tags [\#145](https://github.com/gjtorikian/html-pipeline/pull/145) ([jch](https://github.com/jch)) -- Prefer http\_url in HttpsFilter [\#142](https://github.com/gjtorikian/html-pipeline/pull/142) ([bkeepers](https://github.com/bkeepers)) -- Don't check twice if there is a ':' in content \(EmojiFilter\) [\#141](https://github.com/gjtorikian/html-pipeline/pull/141) ([Razer6](https://github.com/Razer6)) - -## [v1.10.0](https://github.com/gjtorikian/html-pipeline/tree/v1.10.0) (2014-09-05) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.9.0...v1.10.0) - -**Closed issues:** - -- header tags are html-rendered with name="" instead of id="" [\#135](https://github.com/gjtorikian/html-pipeline/issues/135) -- Enable syntax highlighting for inline code [\#134](https://github.com/gjtorikian/html-pipeline/issues/134) - -**Merged pull requests:** - -- Use id instead of name for TableOfContentsFilter [\#140](https://github.com/gjtorikian/html-pipeline/pull/140) ([bkeepers](https://github.com/bkeepers)) -- adding "details" to tag whitelist [\#139](https://github.com/gjtorikian/html-pipeline/pull/139) ([tansaku](https://github.com/tansaku)) -- Fix spelling in readme [\#137](https://github.com/gjtorikian/html-pipeline/pull/137) ([Razer6](https://github.com/Razer6)) -- Remove ActiveSupport try\(\) dependency [\#132](https://github.com/gjtorikian/html-pipeline/pull/132) ([simeonwillbanks](https://github.com/simeonwillbanks)) - -## [v1.9.0](https://github.com/gjtorikian/html-pipeline/tree/v1.9.0) (2014-07-07) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.8.0...v1.9.0) - -**Closed issues:** - -- Medico [\#128](https://github.com/gjtorikian/html-pipeline/issues/128) -- Support ActiveSupport 4.1 [\#125](https://github.com/gjtorikian/html-pipeline/issues/125) -- De-github https filter [\#123](https://github.com/gjtorikian/html-pipeline/issues/123) - -**Merged pull requests:** - -- Generalize https filter take 2 [\#131](https://github.com/gjtorikian/html-pipeline/pull/131) ([simeonwillbanks](https://github.com/simeonwillbanks)) -- Remove RUBY\_VERSION conditionals from gemspec [\#130](https://github.com/gjtorikian/html-pipeline/pull/130) ([mislav](https://github.com/mislav)) -- Add compatibility with gemoji v2 [\#129](https://github.com/gjtorikian/html-pipeline/pull/129) ([mislav](https://github.com/mislav)) - -## [v1.8.0](https://github.com/gjtorikian/html-pipeline/tree/v1.8.0) (2014-04-04) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.7.0...v1.8.0) - -**Implemented enhancements:** - -- Getting Started Guide [\#112](https://github.com/gjtorikian/html-pipeline/issues/112) - -**Merged pull requests:** - -- Adding support to supply the path to the emoji sprite in the emoji pipeline [\#122](https://github.com/gjtorikian/html-pipeline/pull/122) ([bradly](https://github.com/bradly)) -- Initial Better README [\#118](https://github.com/gjtorikian/html-pipeline/pull/118) ([simeonwillbanks](https://github.com/simeonwillbanks)) - -## [v1.7.0](https://github.com/gjtorikian/html-pipeline/tree/v1.7.0) (2014-03-11) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.6.0...v1.7.0) - -**Implemented enhancements:** - -- Contributing Guidelines [\#113](https://github.com/gjtorikian/html-pipeline/issues/113) - -**Closed issues:** - -- cut a 1.6.0 release [\#116](https://github.com/gjtorikian/html-pipeline/issues/116) -- AutolinkFilter link\_attr doesn't seem to work [\#114](https://github.com/gjtorikian/html-pipeline/issues/114) -- Spaces inserted into code [\#109](https://github.com/gjtorikian/html-pipeline/issues/109) - -**Merged pull requests:** - -- Allow \ and \ [\#120](https://github.com/gjtorikian/html-pipeline/pull/120) ([haileys](https://github.com/haileys)) -- Ruby 2.1.1 [\#119](https://github.com/gjtorikian/html-pipeline/pull/119) ([simeonwillbanks](https://github.com/simeonwillbanks)) -- Notes on how to release a new gem version [\#117](https://github.com/gjtorikian/html-pipeline/pull/117) ([jch](https://github.com/jch)) -- Initial Contributing Guidelines [\#115](https://github.com/gjtorikian/html-pipeline/pull/115) ([simeonwillbanks](https://github.com/simeonwillbanks)) - -## [v1.6.0](https://github.com/gjtorikian/html-pipeline/tree/v1.6.0) (2014-02-14) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.5.0...v1.6.0) - -**Closed issues:** - -- EmailReplyParser is undefined [\#107](https://github.com/gjtorikian/html-pipeline/issues/107) -- No stylesheets for SyntaxHighlightFilter [\#106](https://github.com/gjtorikian/html-pipeline/issues/106) -- Camo Filter doesn't return doc when disabled [\#102](https://github.com/gjtorikian/html-pipeline/issues/102) -- Passed content must be valid XML to be filtered [\#100](https://github.com/gjtorikian/html-pipeline/issues/100) -- Emoji syntax gravatars [\#56](https://github.com/gjtorikian/html-pipeline/issues/56) - -**Merged pull requests:** - -- EmailReplyFilter depends on EmailReplyParser [\#110](https://github.com/gjtorikian/html-pipeline/pull/110) ([foca](https://github.com/foca)) -- Document generating CSS for HTML formatted code [\#108](https://github.com/gjtorikian/html-pipeline/pull/108) ([simeonwillbanks](https://github.com/simeonwillbanks)) -- Stop using deprecated OpenSSL::Digest::Digest [\#103](https://github.com/gjtorikian/html-pipeline/pull/103) ([chrishunt](https://github.com/chrishunt)) - -## [v1.5.0](https://github.com/gjtorikian/html-pipeline/tree/v1.5.0) (2014-01-22) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.4.0...v1.5.0) - -**Merged pull requests:** - -- Allow customization of allowed \ URL schemes [\#98](https://github.com/gjtorikian/html-pipeline/pull/98) ([aroben](https://github.com/aroben)) - -## [v1.4.0](https://github.com/gjtorikian/html-pipeline/tree/v1.4.0) (2014-01-21) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.3.0...v1.4.0) - -**Merged pull requests:** - -- Don't URI parse src before passing to camo [\#101](https://github.com/gjtorikian/html-pipeline/pull/101) ([josh](https://github.com/josh)) - -## [v1.3.0](https://github.com/gjtorikian/html-pipeline/tree/v1.3.0) (2014-01-14) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.2.0...v1.3.0) - -**Merged pull requests:** - -- Remove 1.8 from Travis build [\#99](https://github.com/gjtorikian/html-pipeline/pull/99) ([josh](https://github.com/josh)) - -## [v1.2.0](https://github.com/gjtorikian/html-pipeline/tree/v1.2.0) (2014-01-09) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.1.0...v1.2.0) - -**Closed issues:** - -- Allow SSH protocol links [\#95](https://github.com/gjtorikian/html-pipeline/issues/95) -- Straight quote → unicode curly quotes filter [\#94](https://github.com/gjtorikian/html-pipeline/issues/94) - -**Merged pull requests:** - -- Bump version 1.2.0 [\#97](https://github.com/gjtorikian/html-pipeline/pull/97) ([jch](https://github.com/jch)) -- Camo Everything [\#96](https://github.com/gjtorikian/html-pipeline/pull/96) ([josh](https://github.com/josh)) - -## [v1.1.0](https://github.com/gjtorikian/html-pipeline/tree/v1.1.0) (2013-11-20) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v1.0.0...v1.1.0) - -**Merged pull requests:** - -- Bump version 1.1.0 [\#93](https://github.com/gjtorikian/html-pipeline/pull/93) ([jch](https://github.com/jch)) -- CGI.escape emoji name [\#92](https://github.com/gjtorikian/html-pipeline/pull/92) ([jayroh](https://github.com/jayroh)) - -## [v1.0.0](https://github.com/gjtorikian/html-pipeline/tree/v1.0.0) (2013-10-29) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.3.1...v1.0.0) - -**Closed issues:** - -- Tagged releases for 0.3.0 and 0.3.1 [\#91](https://github.com/gjtorikian/html-pipeline/issues/91) -- Potential class loading conflict with add-on filters [\#88](https://github.com/gjtorikian/html-pipeline/issues/88) -- Place Dependency Management On Filters [\#77](https://github.com/gjtorikian/html-pipeline/issues/77) -- Decrease number of dependencies [\#48](https://github.com/gjtorikian/html-pipeline/issues/48) - -**Merged pull requests:** - -- Add link\_attr option to Autolink filter [\#89](https://github.com/gjtorikian/html-pipeline/pull/89) ([excid3](https://github.com/excid3)) -- Update readme with link to asciidoc filter [\#87](https://github.com/gjtorikian/html-pipeline/pull/87) ([jch](https://github.com/jch)) -- use xml\_mini extracted from activesupport [\#85](https://github.com/gjtorikian/html-pipeline/pull/85) ([mojavelinux](https://github.com/mojavelinux)) -- Filters Manage Dependencies [\#80](https://github.com/gjtorikian/html-pipeline/pull/80) ([simeonwillbanks](https://github.com/simeonwillbanks)) - -## [v0.3.1](https://github.com/gjtorikian/html-pipeline/tree/v0.3.1) (2013-09-16) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.3.0...v0.3.1) - -**Closed issues:** - -- Tweaks to the email reply filter [\#82](https://github.com/gjtorikian/html-pipeline/issues/82) - -**Merged pull requests:** - -- Guard against nil node replacement results [\#84](https://github.com/gjtorikian/html-pipeline/pull/84) ([jbarnette](https://github.com/jbarnette)) - -## [v0.3.0](https://github.com/gjtorikian/html-pipeline/tree/v0.3.0) (2013-08-30) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.2.1...v0.3.0) - -**Closed issues:** - -- Support for ActiveSupport 4 [\#76](https://github.com/gjtorikian/html-pipeline/issues/76) - -**Merged pull requests:** - -- Teach SyntaxHighlightFilter about default highlights [\#81](https://github.com/gjtorikian/html-pipeline/pull/81) ([jbarnette](https://github.com/jbarnette)) - -## [v0.2.1](https://github.com/gjtorikian/html-pipeline/tree/v0.2.1) (2013-08-20) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.2.0...v0.2.1) - -**Closed issues:** - -- Implement an AsciiDoc filter based on Asciidoctor [\#59](https://github.com/gjtorikian/html-pipeline/issues/59) - -**Merged pull requests:** - -- Move activesupport to a development dependency [\#79](https://github.com/gjtorikian/html-pipeline/pull/79) ([jch](https://github.com/jch)) - -## [v0.2.0](https://github.com/gjtorikian/html-pipeline/tree/v0.2.0) (2013-07-31) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.1.0...v0.2.0) - -**Merged pull requests:** - -- Generate Table of Contents [\#75](https://github.com/gjtorikian/html-pipeline/pull/75) ([simeonwillbanks](https://github.com/simeonwillbanks)) -- Fix wrong class name at README.md [\#74](https://github.com/gjtorikian/html-pipeline/pull/74) ([tricknotes](https://github.com/tricknotes)) - -## [v0.1.0](https://github.com/gjtorikian/html-pipeline/tree/v0.1.0) (2013-07-16) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.14...v0.1.0) - -**Closed issues:** - -- Fix travis-ci build [\#63](https://github.com/gjtorikian/html-pipeline/issues/63) -- Loosen Markdown Dependency. [\#62](https://github.com/gjtorikian/html-pipeline/issues/62) -- TocFilter: non-English characters in headers don't get proper anchor names [\#58](https://github.com/gjtorikian/html-pipeline/issues/58) -- Whitelist table sections \(thead, tbody, tfoot\) [\#54](https://github.com/gjtorikian/html-pipeline/issues/54) -- Warn if "pipelines" are out of order. [\#47](https://github.com/gjtorikian/html-pipeline/issues/47) - -**Merged pull requests:** - -- TocFilter: keep using the old punctuation stripping on 1.8.7 [\#73](https://github.com/gjtorikian/html-pipeline/pull/73) ([jakedouglas](https://github.com/jakedouglas)) -- Add ruby 2.0.0 to .travis.yml [\#72](https://github.com/gjtorikian/html-pipeline/pull/72) ([tricknotes](https://github.com/tricknotes)) -- Fix ignored test [\#71](https://github.com/gjtorikian/html-pipeline/pull/71) ([tricknotes](https://github.com/tricknotes)) -- Improve to describe gem 'github-linguist' [\#69](https://github.com/gjtorikian/html-pipeline/pull/69) ([tricknotes](https://github.com/tricknotes)) -- Bump version to 0.1.0. Follow semver. [\#68](https://github.com/gjtorikian/html-pipeline/pull/68) ([jch](https://github.com/jch)) -- Scope gem versions for Travis CI [\#67](https://github.com/gjtorikian/html-pipeline/pull/67) ([jch](https://github.com/jch)) -- Allow passing skip\_tags in autolink filter context [\#65](https://github.com/gjtorikian/html-pipeline/pull/65) ([pengwynn](https://github.com/pengwynn)) -- Support non-English characters in anchor names [\#64](https://github.com/gjtorikian/html-pipeline/pull/64) ([jakedouglas](https://github.com/jakedouglas)) -- Fix the `AutolinkFilter` constant name. [\#57](https://github.com/gjtorikian/html-pipeline/pull/57) ([envygeeks](https://github.com/envygeeks)) -- resolves \#54 allow table section elements \(thead, tfoot, tbody\) [\#55](https://github.com/gjtorikian/html-pipeline/pull/55) ([mojavelinux](https://github.com/mojavelinux)) - -## [v0.0.14](https://github.com/gjtorikian/html-pipeline/tree/v0.0.14) (2013-05-22) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.13...v0.0.14) - -**Closed issues:** - -- Give rsanheim rights to pushing gems [\#53](https://github.com/gjtorikian/html-pipeline/issues/53) - -## [v0.0.13](https://github.com/gjtorikian/html-pipeline/tree/v0.0.13) (2013-05-13) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.12...v0.0.13) - -**Closed issues:** - -- Can I use MentionFilter without MarkdownFilter [\#51](https://github.com/gjtorikian/html-pipeline/issues/51) - -**Merged pull requests:** - -- New octicon class names [\#52](https://github.com/gjtorikian/html-pipeline/pull/52) ([cameronmcefee](https://github.com/cameronmcefee)) -- Strip contents of \ tags. [\#50](https://github.com/gjtorikian/html-pipeline/pull/50) ([benubois](https://github.com/benubois)) - -## [v0.0.12](https://github.com/gjtorikian/html-pipeline/tree/v0.0.12) (2013-04-01) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.11...v0.0.12) - -**Merged pull requests:** - -- Include output and results to filter, pipeline event payload [\#46](https://github.com/gjtorikian/html-pipeline/pull/46) ([mtodd](https://github.com/mtodd)) - -## [v0.0.11](https://github.com/gjtorikian/html-pipeline/tree/v0.0.11) (2013-03-29) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.10...v0.0.11) - -**Merged pull requests:** - -- Instrument filters in the pipeline [\#45](https://github.com/gjtorikian/html-pipeline/pull/45) ([mtodd](https://github.com/mtodd)) - -## [v0.0.10](https://github.com/gjtorikian/html-pipeline/tree/v0.0.10) (2013-03-21) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.8.1...v0.0.10) - -**Closed issues:** - -- Executable for previewing [\#43](https://github.com/gjtorikian/html-pipeline/issues/43) - -**Merged pull requests:** - -- Add an html-pipeline executable to the gem [\#44](https://github.com/gjtorikian/html-pipeline/pull/44) ([indirect](https://github.com/indirect)) -- add result\[:mentioned\_usernames\] for MentionFilter [\#42](https://github.com/gjtorikian/html-pipeline/pull/42) ([fahchen](https://github.com/fahchen)) - -## [v0.0.8.1](https://github.com/gjtorikian/html-pipeline/tree/v0.0.8.1) (2013-03-03) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.9...v0.0.8.1) - -## [v0.0.9](https://github.com/gjtorikian/html-pipeline/tree/v0.0.9) (2013-02-27) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.8...v0.0.9) - -**Closed issues:** - -- Better error notification on missing linguist dependency? [\#36](https://github.com/gjtorikian/html-pipeline/issues/36) - -**Merged pull requests:** - -- Bump escape\_utils [\#41](https://github.com/gjtorikian/html-pipeline/pull/41) ([brianmario](https://github.com/brianmario)) -- Don't monkeypatch Nokogiri in 1.9 [\#40](https://github.com/gjtorikian/html-pipeline/pull/40) ([defunkt](https://github.com/defunkt)) - -## [v0.0.8](https://github.com/gjtorikian/html-pipeline/tree/v0.0.8) (2013-02-07) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.7...v0.0.8) - -**Closed issues:** - -- Optionally require github-linguist [\#33](https://github.com/gjtorikian/html-pipeline/issues/33) - -**Merged pull requests:** - -- Raise the roof---I mean, error [\#37](https://github.com/gjtorikian/html-pipeline/pull/37) ([gjtorikian](https://github.com/gjtorikian)) - -## [v0.0.7](https://github.com/gjtorikian/html-pipeline/tree/v0.0.7) (2013-01-30) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.6...v0.0.7) - -**Closed issues:** - -- Where to report custom filters? [\#30](https://github.com/gjtorikian/html-pipeline/issues/30) - -**Merged pull requests:** - -- Remove github-linguist dependency [\#35](https://github.com/gjtorikian/html-pipeline/pull/35) ([jch](https://github.com/jch)) -- Delete erroneous trailing {}s from README [\#34](https://github.com/gjtorikian/html-pipeline/pull/34) ([mrb](https://github.com/mrb)) - -## [v0.0.6](https://github.com/gjtorikian/html-pipeline/tree/v0.0.6) (2012-12-11) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.5...v0.0.6) - -**Merged pull requests:** - -- use \#gsub instead of \#gsub! in MarkdownFilter\#initialize [\#32](https://github.com/gjtorikian/html-pipeline/pull/32) ([jakedouglas](https://github.com/jakedouglas)) - -## [v0.0.5](https://github.com/gjtorikian/html-pipeline/tree/v0.0.5) (2012-12-10) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.4...v0.0.5) - -**Merged pull requests:** - -- Fix XSS vulnerability in sanitization filter [\#31](https://github.com/gjtorikian/html-pipeline/pull/31) ([jch](https://github.com/jch)) -- Fix typo on readme in "AutolinkFilter" doc [\#29](https://github.com/gjtorikian/html-pipeline/pull/29) ([dmarcotte](https://github.com/dmarcotte)) -- fix syntax highlighting example in Readme [\#27](https://github.com/gjtorikian/html-pipeline/pull/27) ([mislav](https://github.com/mislav)) -- remove github-linguist dependency [\#26](https://github.com/gjtorikian/html-pipeline/pull/26) ([mislav](https://github.com/mislav)) -- Retrigger Travis build for debugging [\#25](https://github.com/gjtorikian/html-pipeline/pull/25) ([jch](https://github.com/jch)) -- Use consistent quotes in gemspec [\#24](https://github.com/gjtorikian/html-pipeline/pull/24) ([jbarnette](https://github.com/jbarnette)) -- Add MIT license indicator to the gemspec. [\#23](https://github.com/gjtorikian/html-pipeline/pull/23) ([nbibler](https://github.com/nbibler)) -- Context validation [\#22](https://github.com/gjtorikian/html-pipeline/pull/22) ([benubois](https://github.com/benubois)) -- Corrected a little typo [\#21](https://github.com/gjtorikian/html-pipeline/pull/21) ([blackerby](https://github.com/blackerby)) -- Added an example of a custom filter. [\#19](https://github.com/gjtorikian/html-pipeline/pull/19) ([benubois](https://github.com/benubois)) -- Use correct OSS Manifesto link. [\#18](https://github.com/gjtorikian/html-pipeline/pull/18) ([wickedshimmy](https://github.com/wickedshimmy)) -- Fixed typos [\#17](https://github.com/gjtorikian/html-pipeline/pull/17) ([pborreli](https://github.com/pborreli)) -- What is the github filter chain? [\#16](https://github.com/gjtorikian/html-pipeline/pull/16) ([geemus](https://github.com/geemus)) -- Loosen Gemoji restriction [\#15](https://github.com/gjtorikian/html-pipeline/pull/15) ([josh](https://github.com/josh)) - -## [v0.0.4](https://github.com/gjtorikian/html-pipeline/tree/v0.0.4) (2012-11-06) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/v0.0.3...v0.0.4) - -**Implemented enhancements:** - -- Detect asset pipeline availability [\#1](https://github.com/gjtorikian/html-pipeline/issues/1) - -**Fixed bugs:** - -- @mention at end of parenthetical sentence doesn't get linked [\#11](https://github.com/gjtorikian/html-pipeline/issues/11) - -**Closed issues:** - -- Open source, transferring repo ownership [\#12](https://github.com/gjtorikian/html-pipeline/issues/12) -- Ensure we get the latest from github/github [\#10](https://github.com/gjtorikian/html-pipeline/issues/10) -- Rename repository to html-pipeline [\#7](https://github.com/gjtorikian/html-pipeline/issues/7) - -**Merged pull requests:** - -- HTML::Pipeline::Pipeline [\#13](https://github.com/gjtorikian/html-pipeline/pull/13) ([jbarnette](https://github.com/jbarnette)) - -## [v0.0.3](https://github.com/gjtorikian/html-pipeline/tree/v0.0.3) (2012-10-03) - -[Full Changelog](https://github.com/gjtorikian/html-pipeline/compare/a08f65df81dba0004c2de429848cd9a202917d04...v0.0.3) - -**Closed issues:** - -- History [\#3](https://github.com/gjtorikian/html-pipeline/issues/3) - -**Merged pull requests:** - -- Ensure required context values are present [\#9](https://github.com/gjtorikian/html-pipeline/pull/9) ([juliamae](https://github.com/juliamae)) -- emoji filter requires the emoji gem [\#8](https://github.com/gjtorikian/html-pipeline/pull/8) ([atmos](https://github.com/atmos)) -- De-Github and opensource [\#6](https://github.com/gjtorikian/html-pipeline/pull/6) ([jch](https://github.com/jch)) - - - -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/CONTRIBUTING.md b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/CONTRIBUTING.md deleted file mode 100644 index 5f66206d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/CONTRIBUTING.md +++ /dev/null @@ -1,60 +0,0 @@ -# Contributing - -Thanks for using and improving `HTML::Pipeline`! - -- [Submitting a New Issue](#submitting-a-new-issue) -- [Sending a Pull Request](#sending-a-pull-request) - -## Submitting a New Issue - -If there's an idea you'd like to propose, or a design change, feel free to file a new issue. - -If you have an implementation question or believe you've found a bug, please provide as many details as possible: - -- Input document -- Output HTML document -- the exact `HTML::Pipeline` code you are using -- output of the following from your project - -``` -ruby -v -bundle exec nokogiri -v -``` - -## Sending a Pull Request - -[Pull requests][pr] are always welcome! - -Check out [the project's issues list][issues] for ideas on what could be improved. - -Before sending, please add tests and ensure the test suite passes. - -### Running the Tests - -To run the full suite: - - `bundle exec rake` - -To run a specific test file: - - `bundle exec ruby -Itest test/html/pipeline_test.rb` - -To run a specific test: - - `bundle exec ruby -Itest test/html/pipeline/markdown_filter_test.rb -n test_disabling_gfm` - -To run the full suite with all [supported rubies][travisyaml] in bash: - -```bash -rubies=(ree-1.8.7-2011.03 1.9.2-p290 1.9.3-p429 2.0.0-p247) -for r in ${rubies[*]} -do - rbenv local $r # switch to your version manager of choice - bundle install - bundle exec rake -done -``` - -[issues]: https://github.com/jch/html-pipeline/issues -[pr]: https://help.github.com/articles/using-pull-requests -[travisyaml]: https://github.com/jch/html-pipeline/blob/master/.travis.yml diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Gemfile b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Gemfile deleted file mode 100644 index adc923bd..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Gemfile +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -# Specify your gem's dependencies in html-pipeline.gemspec -gemspec - -group :development do - gem 'appraisal' - gem 'bundler' - gem 'rake' -end - -group :test do - gem 'commonmarker', '~> 0.16', require: false - gem 'email_reply_parser', '~> 0.5', require: false - gem 'gemoji', '~> 2.0', require: false - gem 'minitest' - gem 'RedCloth', '~> 4.2.9', require: false - gem 'rinku', '~> 1.7', require: false - gem 'sanitize', '~> 4.6', require: false - - gem 'escape_utils', '~> 1.0', require: false - gem 'rouge', '~> 3.1', require: false - gem 'minitest-focus', '~> 1.1' -end diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/LICENSE b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/LICENSE deleted file mode 100644 index c972fc6b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 GitHub Inc. and Jerry Cheung - -MIT License - -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/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/README.md b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/README.md deleted file mode 100644 index e852842b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/README.md +++ /dev/null @@ -1,369 +0,0 @@ -# HTML::Pipeline [![Build Status](https://travis-ci.org/jch/html-pipeline.svg?branch=master)](https://travis-ci.org/jch/html-pipeline) - -HTML processing filters and utilities. This module includes a small -framework for defining DOM based content filters and applying them to user -provided content. - -[This project was started at GitHub](https://github.com/blog/1311-html-pipeline-chainable-content-filters). While GitHub still uses a similar design and pattern for rendering content, this gem should be considered standalone and independent from GitHub. - -- [Installation](#installation) -- [Usage](#usage) - - [Examples](#examples) -- [Filters](#filters) -- [Dependencies](#dependencies) -- [Documentation](#documentation) -- [Extending](#extending) - - [3rd Party Extensions](#3rd-party-extensions) -- [Instrumenting](#instrumenting) -- [Contributing](#contributing) - - [Contributors](#contributors) - - [Releasing A New Version](#releasing-a-new-version) - -## Installation - -Add this line to your application's Gemfile: - -```ruby -gem 'html-pipeline' -``` - -And then execute: - -```sh -$ bundle -``` - -Or install it by yourself as: - -```sh -$ gem install html-pipeline -``` - -## Usage - -This library provides a handful of chainable HTML filters to transform user -content into markup. A filter takes an HTML string or -`Nokogiri::HTML::DocumentFragment`, optionally manipulates it, and then -outputs the result. - -For example, to transform Markdown source into Markdown HTML: - -```ruby -require 'html/pipeline' - -filter = HTML::Pipeline::MarkdownFilter.new("Hi **world**!") -filter.call -``` - -Filters can be combined into a pipeline which causes each filter to hand its -output to the next filter's input. So if you wanted to have content be -filtered through Markdown and be syntax highlighted, you can create the -following pipeline: - -```ruby -pipeline = HTML::Pipeline.new [ - HTML::Pipeline::MarkdownFilter, - HTML::Pipeline::SyntaxHighlightFilter -] -result = pipeline.call <<-CODE -This is *great*: - - some_code(:first) - -CODE -result[:output].to_s -``` - -Prints: - -```html -

This is great:

- -
some_code(:first)
-
-``` - -To generate CSS for HTML formatted code, use the [Rouge CSS Theme](https://github.com/rouge-ruby/rouge#css-options) `#css` method. `rouge` is a dependency of the `SyntaxHighlightFilter`. - -Some filters take an optional **context** and/or **result** hash. These are -used to pass around arguments and metadata between filters in a pipeline. For -example, if you don't want to use GitHub formatted Markdown, you can pass an -option in the context hash: - -```ruby -filter = HTML::Pipeline::MarkdownFilter.new("Hi **world**!", :gfm => false) -filter.call -``` - -### Examples - -We define different pipelines for different parts of our app. Here are a few -paraphrased snippets to get you started: - -```ruby -# The context hash is how you pass options between different filters. -# See individual filter source for explanation of options. -context = { - :asset_root => "http://your-domain.com/where/your/images/live/icons", - :base_url => "http://your-domain.com" -} - -# Pipeline providing sanitization and image hijacking but no mention -# related features. -SimplePipeline = Pipeline.new [ - SanitizationFilter, - TableOfContentsFilter, # add 'name' anchors to all headers and generate toc list - CamoFilter, - ImageMaxWidthFilter, - SyntaxHighlightFilter, - EmojiFilter, - AutolinkFilter -], context - -# Pipeline used for user provided content on the web -MarkdownPipeline = Pipeline.new [ - MarkdownFilter, - SanitizationFilter, - CamoFilter, - ImageMaxWidthFilter, - HttpsFilter, - MentionFilter, - EmojiFilter, - SyntaxHighlightFilter -], context.merge(:gfm => true) # enable github formatted markdown - - -# Define a pipeline based on another pipeline's filters -NonGFMMarkdownPipeline = Pipeline.new(MarkdownPipeline.filters, - context.merge(:gfm => false)) - -# Pipelines aren't limited to the web. You can use them for email -# processing also. -HtmlEmailPipeline = Pipeline.new [ - PlainTextInputFilter, - ImageMaxWidthFilter -], {} - -# Just emoji. -EmojiPipeline = Pipeline.new [ - PlainTextInputFilter, - EmojiFilter -], context -``` - -## Filters - -* `MentionFilter` - replace `@user` mentions with links -* `TeamMentionFilter` - replace `@org/team` mentions with links -* `AbsoluteSourceFilter` - replace relative image urls with fully qualified versions -* `AutolinkFilter` - auto_linking urls in HTML -* `CamoFilter` - replace http image urls with [camo-fied](https://github.com/atmos/camo) https versions -* `EmailReplyFilter` - util filter for working with emails -* `EmojiFilter` - everyone loves [emoji](http://www.emoji-cheat-sheet.com/)! -* `HttpsFilter` - HTML Filter for replacing http github urls with https versions. -* `ImageMaxWidthFilter` - link to full size image for large images -* `MarkdownFilter` - convert markdown to html -* `PlainTextInputFilter` - html escape text and wrap the result in a div -* `SanitizationFilter` - allow sanitize user markup -* `SyntaxHighlightFilter` - code syntax highlighter -* `TextileFilter` - convert textile to html -* `TableOfContentsFilter` - anchor headings with name attributes and generate Table of Contents html unordered list linking headings - -## Dependencies - -Filter gem dependencies are not bundled; you must bundle the filter's gem -dependencies. The below list details filters with dependencies. For example, -`SyntaxHighlightFilter` uses [rouge](https://github.com/jneen/rouge) -to detect and highlight languages. For example, to use the `SyntaxHighlightFilter`, -add the following to your Gemfile: - -```ruby -gem 'rouge' -``` - -* `AutolinkFilter` - `rinku` -* `EmailReplyFilter` - `escape_utils`, `email_reply_parser` -* `EmojiFilter` - `gemoji` -* `MarkdownFilter` - `commonmarker` -* `PlainTextInputFilter` - `escape_utils` -* `SanitizationFilter` - `sanitize` -* `SyntaxHighlightFilter` - `rouge` -* `TableOfContentsFilter` - `escape_utils` -* `TextileFilter` - `RedCloth` - -_Note:_ See [Gemfile](/Gemfile) `:test` block for version requirements. - -## Documentation - -Full reference documentation can be [found here](http://rubydoc.info/gems/html-pipeline/frames). - -## Extending -To write a custom filter, you need a class with a `call` method that inherits -from `HTML::Pipeline::Filter`. - -For example this filter adds a base url to images that are root relative: - -```ruby -require 'uri' - -class RootRelativeFilter < HTML::Pipeline::Filter - - def call - doc.search("img").each do |img| - next if img['src'].nil? - src = img['src'].strip - if src.start_with? '/' - img["src"] = URI.join(context[:base_url], src).to_s - end - end - doc - end - -end -``` - -Now this filter can be used in a pipeline: - -```ruby -Pipeline.new [ RootRelativeFilter ], { :base_url => 'http://somehost.com' } -``` - -### 3rd Party Extensions - -If you have an idea for a filter, propose it as -[an issue](https://github.com/jch/html-pipeline/issues) first. This allows us discuss -whether the filter is a common enough use case to belong in this gem, or should be -built as an external gem. - -Here are some extensions people have built: - -* [html-pipeline-asciidoc_filter](https://github.com/asciidoctor/html-pipeline-asciidoc_filter) -* [jekyll-html-pipeline](https://github.com/gjtorikian/jekyll-html-pipeline) -* [nanoc-html-pipeline](https://github.com/burnto/nanoc-html-pipeline) -* [html-pipeline-bitly](https://github.com/dewski/html-pipeline-bitly) -* [html-pipeline-cite](https://github.com/lifted-studios/html-pipeline-cite) -* [tilt-html-pipeline](https://github.com/bradgessler/tilt-html-pipeline) -* [html-pipeline-wiki-link'](https://github.com/lifted-studios/html-pipeline-wiki-link) - WikiMedia-style wiki links -* [task_list](https://github.com/github/task_list) - GitHub flavor Markdown Task List -* [html-pipeline-nico_link](https://github.com/rutan/html-pipeline-nico_link) - An HTML::Pipeline filter for [niconico](http://www.nicovideo.jp) description links -* [html-pipeline-gitlab](https://gitlab.com/gitlab-org/html-pipeline-gitlab) - This gem implements various filters for html-pipeline used by GitLab -* [html-pipeline-youtube](https://github.com/st0012/html-pipeline-youtube) - An HTML::Pipeline filter for YouTube links -* [html-pipeline-flickr](https://github.com/st0012/html-pipeline-flickr) - An HTML::Pipeline filter for Flickr links -* [html-pipeline-vimeo](https://github.com/dlackty/html-pipeline-vimeo) - An HTML::Pipeline filter for Vimeo links -* [html-pipeline-hashtag](https://github.com/mr-dxdy/html-pipeline-hashtag) - An HTML::Pipeline filter for hashtags -* [html-pipeline-linkify_github](https://github.com/jollygoodcode/html-pipeline-linkify_github) - An HTML::Pipeline filter to autolink GitHub urls -* [html-pipeline-redcarpet_filter](https://github.com/bmikol/html-pipeline-redcarpet_filter) - Render Markdown source text into Markdown HTML using Redcarpet -* [html-pipeline-typogruby_filter](https://github.com/bmikol/html-pipeline-typogruby_filter) - Add Typogruby text filters to your HTML::Pipeline -* [korgi](https://github.com/jodeci/korgi) - HTML::Pipeline filters for links to Rails resources - - -## Instrumenting - -Filters and Pipelines can be set up to be instrumented when called. The pipeline -must be setup with an -[ActiveSupport::Notifications](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html) -compatible service object and a name. New pipeline objects will default to the -`HTML::Pipeline.default_instrumentation_service` object. - -``` ruby -# the AS::Notifications-compatible service object -service = ActiveSupport::Notifications - -# instrument a specific pipeline -pipeline = HTML::Pipeline.new [MarkdownFilter], context -pipeline.setup_instrumentation "MarkdownPipeline", service - -# or set default instrumentation service for all new pipelines -HTML::Pipeline.default_instrumentation_service = service -pipeline = HTML::Pipeline.new [MarkdownFilter], context -pipeline.setup_instrumentation "MarkdownPipeline" -``` - -Filters are instrumented when they are run through the pipeline. A -`call_filter.html_pipeline` event is published once the filter finishes. The -`payload` should include the `filter` name. Each filter will trigger its own -instrumentation call. - -``` ruby -service.subscribe "call_filter.html_pipeline" do |event, start, ending, transaction_id, payload| - payload[:pipeline] #=> "MarkdownPipeline", set with `setup_instrumentation` - payload[:filter] #=> "MarkdownFilter" - payload[:context] #=> context Hash - payload[:result] #=> instance of result class - payload[:result][:output] #=> output HTML String or Nokogiri::DocumentFragment -end -``` - -The full pipeline is also instrumented: - -``` ruby -service.subscribe "call_pipeline.html_pipeline" do |event, start, ending, transaction_id, payload| - payload[:pipeline] #=> "MarkdownPipeline", set with `setup_instrumentation` - payload[:filters] #=> ["MarkdownFilter"] - payload[:doc] #=> HTML String or Nokogiri::DocumentFragment - payload[:context] #=> context Hash - payload[:result] #=> instance of result class - payload[:result][:output] #=> output HTML String or Nokogiri::DocumentFragment -end -``` - -## FAQ - -### 1. Why doesn't my pipeline work when there's no root element in the document? - -To make a pipeline work on a plain text document, put the `PlainTextInputFilter` -at the beginning of your pipeline. This will wrap the content in a `div` so the -filters have a root element to work with. If you're passing in an HTML fragment, -but it doesn't have a root element, you can wrap the content in a `div` -yourself. For example: - -```ruby -EmojiPipeline = Pipeline.new [ - PlainTextInputFilter, # <- Wraps input in a div and escapes html tags - EmojiFilter -], context - -plain_text = "Gutentag! :wave:" -EmojiPipeline.call(plain_text) - -html_fragment = "This is outside of an html element, but this isn't. :+1:" -EmojiPipeline.call("
#{html_fragment}
") # <- Wrap your own html fragments to avoid escaping -``` - -### 2. How do I customize an allowlist for `SanitizationFilter`s? - -`SanitizationFilter::ALLOWLIST` is the default allowlist used if no `:allowlist` -argument is given in the context. The default is a good starting template for -you to add additional elements. You can either modify the constant's value, or -re-define your own constant and pass that in via the context. - -## Contributing - -Please review the [Contributing Guide](https://github.com/jch/html-pipeline/blob/master/CONTRIBUTING.md). - -1. [Fork it](https://help.github.com/articles/fork-a-repo) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Added some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new [Pull Request](https://help.github.com/articles/using-pull-requests) - -To see what has changed in recent versions, see the [CHANGELOG](https://github.com/jch/html-pipeline/blob/master/CHANGELOG.md). - -### Contributors - -Thanks to all of [these contributors](https://github.com/jch/html-pipeline/graphs/contributors). - -Project is a member of the [OSS Manifesto](http://ossmanifesto.org/). - -The current maintainer is @gjtorikian - -### Releasing A New Version - -This section is for gem maintainers to cut a new version of the gem. - -* create a new branch named `release-x.y.z` where `x.y.z` follows [semver](http://semver.org) -* update lib/html/pipeline/version.rb to next version number X.X.X -* update CHANGELOG.md. Prepare a draft with `script/changelog` -* push branch and create a new pull request -* after tests are green, merge to master -* on the master branch, run `script/release` diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Rakefile b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Rakefile deleted file mode 100644 index f26f9adc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/Rakefile +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env rake -# frozen_string_literal: true - -require 'rubygems' -require 'bundler/setup' - -require 'bundler/gem_tasks' -require 'rake/testtask' - -Rake::TestTask.new do |t| - t.libs << 'test' - t.test_files = FileList['test/**/*_test.rb'] - t.verbose = true - t.warning = false -end - -task default: :test diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/bin/html-pipeline b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/bin/html-pipeline deleted file mode 100644 index f262ac6b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/bin/html-pipeline +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env ruby -require 'html/pipeline' - -require 'optparse' - -# Accept "help", too -.map! { |a| a == 'help' ? '--help' : a } - -onParser.new do |opts| - opts.banner = <<-HELP.gsub(/^ /, '') - Usage: html-pipeline [-h] [-f] - html-pipeline [FILTER [FILTER [...]]] < file.md - cat file.md | html-pipeline [FILTER [FILTER [...]]] - HELP - - opts.separator 'Options:' - - opts.on('-f', '--filters', 'List the available filters') do - filters = HTML::Pipeline.constants.grep(/\w+Filter$/) - .map { |f| f.to_s.gsub(/Filter$/, '') } - - # Text filter doesn't work, no call method - filters -= ['Text'] - - abort <<-HELP.gsub(/^ /, '') - Available filters: - #{filters.join("\n ")} - HELP - end -end.parse! - -# Default to a GitHub-ish pipeline -if ARGV.empty? - - filters = [ - HTML::Pipeline::MarkdownFilter, - HTML::Pipeline::SanitizationFilter, - HTML::Pipeline::ImageMaxWidthFilter, - HTML::Pipeline::EmojiFilter, - HTML::Pipeline::AutolinkFilter, - HTML::Pipeline::TableOfContentsFilter - ] - - # Add syntax highlighting if rouge is present - begin - require 'rouge' - filters << HTML::Pipeline::SyntaxHighlightFilter - rescue LoadError - end - -else - - def filter_named(name) - case name - when 'Text' - raise NameError # Text filter doesn't work, no call method - end - - HTML::Pipeline.const_get("#{name}Filter") - rescue NameError => e - abort "Unknown filter '#{name}'. List filters with the -f option." - end - - filters = [] - until ARGV.empty? - name = ARGV.shift - filters << filter_named(name) - end - -end - -context = { - asset_root: '/assets', - base_url: '/', - gfm: true -} - -puts HTML::Pipeline.new(filters, context).call(ARGF.read)[:output] diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/html-pipeline.gemspec b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/html-pipeline.gemspec deleted file mode 100644 index ec88cfe2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/html-pipeline.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -require File.expand_path('../lib/html/pipeline/version', __FILE__) - -Gem::Specification.new do |gem| - gem.name = 'html-pipeline' - gem.version = HTML::Pipeline::VERSION - gem.license = 'MIT' - gem.authors = ['Ryan Tomayko', 'Jerry Cheung', 'Garen J. Torikian'] - gem.email = ['ryan@github.com', 'jerry@github.com', 'gjtorikian@gmail.com'] - gem.description = 'GitHub HTML processing filters and utilities' - gem.summary = 'Helpers for processing content through a chain of filters' - gem.homepage = 'https://github.com/jch/html-pipeline' - - gem.files = `git ls-files -z`.split("\x0").reject { |f| f =~ %r{^(test|gemfiles|script)/} } - gem.require_paths = ['lib'] - - gem.add_dependency 'activesupport', '>= 2' - gem.add_dependency 'nokogiri', '>= 1.4' - - gem.post_install_message = < e - raise MissingDependencyError, - "Missing dependency '#{name}' for #{requirer}. See README.md for details.\n#{e.class.name}: #{e}" - end - - # Our DOM implementation. - DocumentFragment = Nokogiri::HTML::DocumentFragment - - # Parse a String into a DocumentFragment object. When a DocumentFragment is - # provided, return it verbatim. - def self.parse(document_or_html) - document_or_html ||= '' - if document_or_html.is_a?(String) - DocumentFragment.parse(document_or_html) - else - document_or_html - end - end - - # Public: Returns an Array of Filter objects for this Pipeline. - attr_reader :filters - - # Public: Instrumentation service for the pipeline. - # Set an ActiveSupport::Notifications compatible object to enable. - attr_accessor :instrumentation_service - - # Public: String name for this Pipeline. Defaults to Class name. - attr_writer :instrumentation_name - def instrumentation_name - return @instrumentation_name if defined?(@instrumentation_name) - @instrumentation_name = self.class.name - end - - class << self - # Public: Default instrumentation service for new pipeline objects. - attr_accessor :default_instrumentation_service - end - - def initialize(filters, default_context = {}, result_class = nil) - raise ArgumentError, 'default_context cannot be nil' if default_context.nil? - @filters = filters.flatten.freeze - @default_context = default_context.freeze - @result_class = result_class || Hash - @instrumentation_service = self.class.default_instrumentation_service - end - - # Apply all filters in the pipeline to the given HTML. - # - # html - A String containing HTML or a DocumentFragment object. - # context - The context hash passed to each filter. See the Filter docs - # for more info on possible values. This object MUST NOT be modified - # in place by filters. Use the Result for passing state back. - # result - The result Hash passed to each filter for modification. This - # is where Filters store extracted information from the content. - # - # Returns the result Hash after being filtered by this Pipeline. Contains an - # :output key with the DocumentFragment or String HTML markup based on the - # output of the last filter in the pipeline. - def call(html, context = {}, result = nil) - context = @default_context.merge(context) - context = context.freeze - result ||= @result_class.new - payload = default_payload filters: @filters.map(&:name), - context: context, result: result - instrument 'call_pipeline.html_pipeline', payload do - result[:output] = - @filters.inject(html) do |doc, filter| - perform_filter(filter, doc, context, result) - end - end - result - end - - # Internal: Applies a specific filter to the supplied doc. - # - # The filter is instrumented. - # - # Returns the result of the filter. - def perform_filter(filter, doc, context, result) - payload = default_payload filter: filter.name, - context: context, result: result - instrument 'call_filter.html_pipeline', payload do - filter.call(doc, context, result) - end - end - - # Like call but guarantee the value returned is a DocumentFragment. - # Pipelines may return a DocumentFragment or a String. Callers that need a - # DocumentFragment should use this method. - def to_document(input, context = {}, result = nil) - result = call(input, context, result) - HTML::Pipeline.parse(result[:output]) - end - - # Like call but guarantee the value returned is a string of HTML markup. - def to_html(input, context = {}, result = nil) - result = call(input, context, result = nil) - output = result[:output] - if output.respond_to?(:to_html) - output.to_html - else - output.to_s - end - end - - # Public: setup instrumentation for this pipeline. - # - # Returns nothing. - def setup_instrumentation(name = nil, service = nil) - self.instrumentation_name = name - self.instrumentation_service = - service || self.class.default_instrumentation_service - end - - # Internal: if the `instrumentation_service` object is set, instruments the - # block, otherwise the block is ran without instrumentation. - # - # Returns the result of the provided block. - def instrument(event, payload = nil) - payload ||= default_payload - return yield(payload) unless instrumentation_service - instrumentation_service.instrument event, payload do |payload| - yield payload - end - end - - # Internal: Default payload for instrumentation. - # - # Accepts a Hash of additional payload data to be merged. - # - # Returns a Hash. - def default_payload(payload = {}) - { pipeline: instrumentation_name }.merge(payload) - end - end -end - -# XXX nokogiri monkey patches for 1.8 -unless ''.respond_to?(:force_encoding) - class Nokogiri::XML::Node - # Work around an issue with utf-8 encoded data being erroneously converted to - # ... some other shit when replacing text nodes. See 'utf-8 output 2' in - # user_content_test.rb for details. - def replace_with_encoding_fix(replacement) - if replacement.respond_to?(:to_str) - replacement = document.fragment("
#{replacement}
").children.first.children - end - replace_without_encoding_fix(replacement) - end - - alias replace_without_encoding_fix replace - alias replace replace_with_encoding_fix - - def swap(replacement) - replace(replacement) - self - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@mention_filter.rb b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@mention_filter.rb deleted file mode 100644 index 415a78c7..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@mention_filter.rb +++ /dev/null @@ -1,140 +0,0 @@ -# frozen_string_literal: true - -require 'set' - -module HTML - class Pipeline - # HTML filter that replaces @user mentions with links. Mentions within
,
-    # , and  elements are ignored. Mentions that reference users that do
-    # not exist are ignored.
-    #
-    # Context options:
-    #   :base_url - Used to construct links to user profile pages for each
-    #               mention.
-    #   :info_url - Used to link to "more info" when someone mentions @mention
-    #               or @mentioned.
-    #   :username_pattern - Used to provide a custom regular expression to
-    #                       identify usernames
-    #
-    class MentionFilter < Filter
-      # Public: Find user @mentions in text.  See
-      # MentionFilter#mention_link_filter.
-      #
-      #   MentionFilter.mentioned_logins_in(text) do |match, login, is_mentioned|
-      #     "#{login}"
-      #   end
-      #
-      # text - String text to search.
-      #
-      # Yields the String match, the String login name, and a Boolean determining
-      # if the match = "@mention[ed]".  The yield's return replaces the match in
-      # the original text.
-      #
-      # Returns a String replaced with the return of the block.
-      def self.mentioned_logins_in(text, username_pattern = UsernamePattern)
-        text.gsub MentionPatterns[username_pattern] do |match|
-          login = Regexp.last_match(1)
-          yield match, login, MentionLogins.include?(login.downcase)
-        end
-      end
-
-      # Hash that contains all of the mention patterns used by the pipeline
-      MentionPatterns = Hash.new do |hash, key|
-        hash[key] = /
-          (?:^|\W)                    # beginning of string or non-word char
-          @((?>#{key}))  # @username
-          (?!\/)                      # without a trailing slash
-          (?=
-            \.+[ \t\W]|               # dots followed by space or non-word character
-            \.+$|                     # dots at end of line
-            [^0-9a-zA-Z_.]|           # non-word character except dot
-            $                         # end of line
-          )
-        /ix
-      end
-
-      # Default pattern used to extract usernames from text. The value can be
-      # overriden by providing the username_pattern variable in the context.
-      UsernamePattern = /[a-z0-9][a-z0-9-]*/
-
-      # List of username logins that, when mentioned, link to the blog post
-      # about @mentions instead of triggering a real mention.
-      MentionLogins = %w[
-        mention
-        mentions
-        mentioned
-        mentioning
-      ].freeze
-
-      # Don't look for mentions in text nodes that are children of these elements
-      IGNORE_PARENTS = %w(pre code a style script).to_set
-
-      def call
-        result[:mentioned_usernames] ||= []
-
-        doc.search('.//text()').each do |node|
-          content = node.to_html
-          next unless content.include?('@')
-          next if has_ancestor?(node, IGNORE_PARENTS)
-          html = mention_link_filter(content, base_url, info_url, username_pattern)
-          next if html == content
-          node.replace(html)
-        end
-        doc
-      end
-
-      # The URL to provide when someone @mentions a "mention" name, such
-      # as @mention or @mentioned, that will give them more info on mentions.
-      def info_url
-        context[:info_url] || nil
-      end
-
-      def username_pattern
-        context[:username_pattern] || UsernamePattern
-      end
-
-      # Replace user @mentions in text with links to the mentioned user's
-      # profile page.
-      #
-      # text      - String text to replace @mention usernames in.
-      # base_url  - The base URL used to construct user profile URLs.
-      # info_url  - The "more info" URL used to link to more info on @mentions.
-      #             If nil we don't link @mention or @mentioned.
-      # username_pattern  - Regular expression used to identify usernames in
-      #                     text
-      #
-      # Returns a string with @mentions replaced with links. All links have a
-      # 'user-mention' class name attached for styling.
-      def mention_link_filter(text, _base_url = '/', info_url = nil, username_pattern = UsernamePattern)
-        self.class.mentioned_logins_in(text, username_pattern) do |match, login, is_mentioned|
-          link =
-            if is_mentioned
-              link_to_mention_info(login, info_url)
-            else
-              link_to_mentioned_user(login)
-            end
-
-          link ? match.sub("@#{login}", link) : match
-        end
-      end
-
-      def link_to_mention_info(text, info_url = nil)
-        return "@#{text}" if info_url.nil?
-        "" \
-          "@#{text}" \
-          ''
-      end
-
-      def link_to_mentioned_user(login)
-        result[:mentioned_usernames] |= [login]
-
-        url = base_url.dup
-        url << '/' unless url =~ /[\/~]\z/
-
-        "" \
-          "@#{login}" \
-          ''
-      end
-    end
-  end
-end
diff --git a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@team_mention_filter.rb b/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@team_mention_filter.rb
deleted file mode 100644
index 562ef344..00000000
--- a/vendor/bundle/ruby/3.2.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@team_mention_filter.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-# frozen_string_literal: true
-
-require 'set'
-
-module HTML
-  class Pipeline
-    # HTML filter that replaces @org/team mentions with links. Mentions within
-    # 
, , , 
-
-
-

404

- -

Page not found :(

-

The requested page could not be found.

-
diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/_config.yml b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/_config.yml deleted file mode 100644 index ef7ba7c1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/_config.yml +++ /dev/null @@ -1,55 +0,0 @@ -# Welcome to Jekyll! -# -# This config file is meant for settings that affect your whole blog, values -# which you are expected to set up once and rarely edit after that. If you find -# yourself editing this file very often, consider using Jekyll's data files -# feature for the data you need to update frequently. -# -# For technical reasons, this file is *NOT* reloaded automatically when you use -# 'bundle exec jekyll serve'. If you change this file, please restart the server process. -# -# If you need help with YAML syntax, here are some quick references for you: -# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml -# https://learnxinyminutes.com/docs/yaml/ -# -# Site settings -# These are used to personalize your new site. If you look in the HTML files, -# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. -# You can create any custom variable you would like, and they will be accessible -# in the templates via {{ site.myvariable }}. - -title: Your awesome title -email: your-email@example.com -description: >- # this means to ignore newlines until "baseurl:" - Write an awesome description for your new site here. You can edit this - line in _config.yml. It will appear in your document head meta (for - Google search results) and in your feed.xml site description. -baseurl: "" # the subpath of your site, e.g. /blog -url: "" # the base hostname & protocol for your site, e.g. http://example.com -twitter_username: jekyllrb -github_username: jekyll - -# Build settings -theme: minima -plugins: - - jekyll-feed - -# Exclude from processing. -# The following items will not be processed, by default. -# Any item listed under the `exclude:` key here will be automatically added to -# the internal "default list". -# -# Excluded items can be processed by explicitly listing the directories or -# their entries' file path in the `include:` list. -# -# exclude: -# - .sass-cache/ -# - .jekyll-cache/ -# - gemfiles/ -# - Gemfile -# - Gemfile.lock -# - node_modules/ -# - vendor/bundle/ -# - vendor/cache/ -# - vendor/gems/ -# - vendor/ruby/ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb deleted file mode 100644 index 187a4d9b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: post -title: "Welcome to Jekyll!" -date: <%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %> -categories: jekyll update ---- -You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. - -Jekyll requires blog post files to be named according to the following format: - -`YEAR-MONTH-DAY-title.MARKUP` - -Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works. - -Jekyll also offers powerful support for code snippets: - -{% highlight ruby %} -def print_hi(name) - puts "Hi, #{name}" -end -print_hi('Tom') -#=> prints 'Hi, Tom' to STDOUT. -{% endhighlight %} - -Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. - -[jekyll-docs]: https://jekyllrb.com/docs/home -[jekyll-gh]: https://github.com/jekyll/jekyll -[jekyll-talk]: https://talk.jekyllrb.com/ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/about.markdown b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/about.markdown deleted file mode 100644 index 8b4e0b28..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/about.markdown +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: page -title: About -permalink: /about/ ---- - -This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) - -You can find the source code for Minima at GitHub: -[jekyll][jekyll-organization] / -[minima](https://github.com/jekyll/minima) - -You can find the source code for Jekyll at GitHub: -[jekyll][jekyll-organization] / -[jekyll](https://github.com/jekyll/jekyll) - - -[jekyll-organization]: https://github.com/jekyll diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/index.markdown b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/index.markdown deleted file mode 100644 index 06715078..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/site_template/index.markdown +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Feel free to add content and custom Front Matter to this file. -# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults - -layout: home ---- diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/CODE_OF_CONDUCT.md.erb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/CODE_OF_CONDUCT.md.erb deleted file mode 100644 index 2b2c7734..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/CODE_OF_CONDUCT.md.erb +++ /dev/null @@ -1,74 +0,0 @@ -# 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 <%= user_email %>. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and 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/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/Gemfile b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/Gemfile deleted file mode 100644 index bb94df82..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" -gemspec diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/LICENSE.txt.erb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/LICENSE.txt.erb deleted file mode 100644 index 38a0eb4e..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/LICENSE.txt.erb +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) <%= Time.now.year %> <%= user_name %> - -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/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/README.md.erb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/README.md.erb deleted file mode 100644 index 9e180340..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/README.md.erb +++ /dev/null @@ -1,50 +0,0 @@ -# <%= theme_name %> - -Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`. - -To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site! - -TODO: Delete this and the text above, and describe your gem - -## Installation - -Add this line to your Jekyll site's `Gemfile`: - -```ruby -gem <%= theme_name.inspect %> -``` - -And add this line to your Jekyll site's `_config.yml`: - -```yaml -theme: <%= theme_name %> -``` - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install <%= theme_name %> - -## Usage - -TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets. - -## Contributing - -Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/<%= theme_name %>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct. - -## Development - -To set up your environment to develop this theme, run `bundle install`. - -Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal. - -When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled. -To add a custom directory to your theme-gem, please edit the regexp in `<%= theme_name %>.gemspec` accordingly. - -## License - -The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/default.html b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/default.html deleted file mode 100644 index cddd0709..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/default.html +++ /dev/null @@ -1 +0,0 @@ -{{ content }} diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/page.html b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/page.html deleted file mode 100644 index 5e711268..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/page.html +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: default ---- - -{{ content }} diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/post.html b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/post.html deleted file mode 100644 index 5e711268..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/_layouts/post.html +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: default ---- - -{{ content }} diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/_config.yml.erb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/_config.yml.erb deleted file mode 100644 index 82e8d42d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/_config.yml.erb +++ /dev/null @@ -1 +0,0 @@ -theme: <%= theme_name %> diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/_post.md b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/_post.md deleted file mode 100644 index 145b21de..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/_post.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: post ---- - -Eos eu docendi tractatos sapientem, brute option menandri in vix, quando vivendo accommodare te ius. Nec melius fastidii constituam id, viderer theophrastus ad sit, hinc semper periculis cum id. Noluisse postulant assentior est in, no choro sadipscing repudiandae vix. Vis in euismod delenit dignissim. Ex quod nostrum sit, suas decore animal id ius, nobis solet detracto quo te. - -{% comment %} -Might you have an include in your theme? Why not try it here! -{% include my-themes-great-include.html %} -{% endcomment %} - -No laudem altera adolescens has, volumus lucilius eum no. Eam ei nulla audiam efficiantur. Suas affert per no, ei tale nibh sea. Sea ne magna harum, in denique scriptorem sea, cetero alienum tibique ei eos. Labores persequeris referrentur eos ei. diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/index.html b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/index.html deleted file mode 100644 index b688538c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: page ---- - -Lorem ipsum dolor sit amet, quo id prima corrumpit pertinacia, id ius dolor dolores, an veri pertinax explicari mea. Agam solum et qui, his id ludus graeco adipiscing. Duis theophrastus nam in, at his vidisse atomorum. Tantas gloriatur scripserit ne eos. Est wisi tempor habemus at, ei graeco dissentiet eos. Ne usu aliquip sanctus conceptam, te vis ignota animal, modus latine contentiones ius te. - -{% for post in site.posts %} -

{{ post.title }}

-
{{ post.excerpt }}
-{% endfor %} - -Te falli veritus sea, at molestiae scribentur deterruisset vix, et mea zril phaedrum vulputate. No cum dicit consulatu. Ut has nostro noluisse expetendis, te pro quaeque disputando, eu sed summo omnes. Eos at tale aperiam, usu cu propriae quaestio constituto, sed aperiam erroribus temporibus an. - -Quo eu liber mediocritatem, vix an delectus eleifend, iuvaret suscipit ei vel. Partem invenire per an, mea postulant dissentias eu, ius tantas audire nominavi eu. Dicunt tritani veritus ex vis, mei in case sententiae. At exerci democritum nam, cu lobortis iracundia mei. Alia eligendi consectetuer eu sed, paulo docendi noluisse sit ex. diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/style.scss b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/style.scss deleted file mode 100644 index 7388f52b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/example/style.scss +++ /dev/null @@ -1,7 +0,0 @@ ---- ---- - -// Here, you can test out the Sass/SCSS that you include in your theme. -// Simply `@import` the necessary file(s) to get the proper styles on the site. -// E.g.: -// @import "a-file-from-my-theme"; diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/gitignore.erb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/gitignore.erb deleted file mode 100644 index 736d7400..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/gitignore.erb +++ /dev/null @@ -1,6 +0,0 @@ -*.gem -.bundle -.jekyll-cache -.sass-cache -_site -Gemfile.lock diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/theme.gemspec.erb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/theme.gemspec.erb deleted file mode 100644 index 7c13cd30..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/lib/theme_template/theme.gemspec.erb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -Gem::Specification.new do |spec| - spec.name = <%= theme_name.inspect %> - spec.version = "0.1.0" - spec.authors = [<%= user_name.inspect %>] - spec.email = [<%= user_email.inspect %>] - - spec.summary = "TODO: Write a short summary, because Rubygems requires one." - spec.homepage = "TODO: Put your gem's website or public repo URL here." - spec.license = "MIT" - - spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(<%= theme_directories.join("|") %>|LICENSE|README|_config\.yml)!i) } - - spec.add_runtime_dependency "jekyll", "~> <%= jekyll_version_with_minor %>" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll.rb deleted file mode 100644 index 31236b8a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -Dir[File.join(File.expand_path("jekyll", __dir__), "*.rb")].each do |ruby_file| - require ruby_file -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/assert_equal_literal_actual.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/assert_equal_literal_actual.rb deleted file mode 100644 index 7c7b9f5a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/assert_equal_literal_actual.rb +++ /dev/null @@ -1,150 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module Jekyll - # Checks for `assert_equal(exp, act, msg = nil)` calls containing literal values as - # second argument. The second argument should ideally be a method called on the tested - # instance. - # - # @example - # # bad - # assert_equal @foo.bar, "foobar" - # assert_equal @alpha.beta, { "foo" => "bar", "lorem" => "ipsum" } - # assert_equal @alpha.omega, ["foobar", "lipsum"] - # - # # good - # assert_equal "foobar", @foo.bar - # - # assert_equal( - # { "foo" => "bar", "lorem" => "ipsum" }, - # @alpha.beta - # ) - # - # assert_equal( - # ["foobar", "lipsum"], - # @alpha.omega - # ) - # - class AssertEqualLiteralActual < Base - extend AutoCorrector - - MSG = "Provide the 'expected value' as the first argument to `assert_equal`." - RESTRICT_ON_SEND = %i[assert_equal].freeze - - SIMPLE_LITERALS = %i( - true - false - nil - int - float - str - sym - complex - rational - regopt - ).freeze - - COMPLEX_LITERALS = %i( - array - hash - pair - irange - erange - regexp - ).freeze - - def_node_matcher :literal_actual?, <<-PATTERN - (send nil? :assert_equal $(send ...) $#literal?) - PATTERN - - def_node_matcher :literal_actual_with_msg?, <<-PATTERN - (send nil? :assert_equal $(send ...) $#literal? $#opt_msg?) - PATTERN - - def on_send(node) - return unless literal_actual?(node) || literal_actual_with_msg?(node) - - range = node.loc.expression - add_offense(range) do |corrector| - corrector.replace(range, replacement(node)) - end - end - - private - - def opt_msg?(node) - node&.source - end - - # This is not implement using a NodePattern because it seems - # to not be able to match against an explicit (nil) sexp - def literal?(node) - node && (simple_literal?(node) || complex_literal?(node)) - end - - def simple_literal?(node) - SIMPLE_LITERALS.include?(node.type) - end - - def complex_literal?(node) - COMPLEX_LITERALS.include?(node.type) && - node.each_child_node.all?(&method(:literal?)) - end - - def replacement(node) - _, _, first_param, second_param, optional_param = *node - - replaced_text = \ - if second_param.type == :hash - replace_hash_with_variable(first_param.source, second_param.source) - elsif second_param.type == :array && second_param.source != "[]" - replace_array_with_variable(first_param.source, second_param.source) - else - replace_based_on_line_length(first_param.source, second_param.source) - end - - return "#{replaced_text}, #{optional_param.source}" if optional_param - replaced_text - end - - def replace_based_on_line_length(first_expression, second_expression) - result = "assert_equal #{second_expression}, #{first_expression}" - return result if result.length < 80 - - # fold long lines independent of Rubocop configuration for better readability - <<~TEXT - assert_equal( - #{second_expression}, - #{first_expression} - ) - TEXT - end - - def replace_hash_with_variable(first_expression, second_expression) - expect_expression = if second_expression.start_with?("{") - second_expression - else - "{#{second_expression}}" - end - <<~TEXT - expected = #{expect_expression} - assert_equal expected, #{first_expression} - TEXT - end - - def replace_array_with_variable(first_expression, second_expression) - expect_expression = if second_expression.start_with?("%") - second_expression - else - Array(second_expression) - end - <<~TEXT - expected = #{expect_expression} - assert_equal expected, #{first_expression} - TEXT - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/no_p_allowed.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/no_p_allowed.rb deleted file mode 100644 index b77f8f83..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/no_p_allowed.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module Jekyll - class NoPAllowed < Base - MSG = "Avoid using `p` to print things. Use `Jekyll.logger` instead." - RESTRICT_ON_SEND = %i[p].freeze - - def_node_search :p_called?, <<-PATTERN - (send _ :p _) - PATTERN - - def on_send(node) - if p_called?(node) - add_offense(node.loc.selector) - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/no_puts_allowed.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/no_puts_allowed.rb deleted file mode 100644 index 81717cc3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-4.4.1/rubocop/jekyll/no_puts_allowed.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module Jekyll - class NoPutsAllowed < Base - MSG = "Avoid using `puts` to print things. Use `Jekyll.logger` instead." - RESTRICT_ON_SEND = %i[puts].freeze - - def_node_search :puts_called?, <<-PATTERN - (send nil? :puts _) - PATTERN - - def on_send(node) - if puts_called?(node) - add_offense(node.loc.selector) - end - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/LICENSE b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/LICENSE deleted file mode 100644 index c670fe8c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright 2016-present Mert Kahyaoğlu and the Jekyll Admin contributors - -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/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/README.md b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/README.md deleted file mode 100644 index 62c70a8d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/README.md +++ /dev/null @@ -1,93 +0,0 @@ -[![Gem Version](https://img.shields.io/gem/v/jekyll-admin.svg)](https://rubygems.org/gems/jekyll-admin) -[![Continuous Integration](https://github.com/jekyll/jekyll-admin/actions/workflows/ci.yml/badge.svg)](https://github.com/jekyll/jekyll-admin/actions/workflows/ci.yml) -[![Build status](https://ci.appveyor.com/api/projects/status/u6u9tn7rk5tln33s/branch/master?svg=true)](https://ci.appveyor.com/project/jekyll/jekyll-admin) -[![Coverage Status](https://coveralls.io/repos/github/jekyll/jekyll-admin/badge.svg?branch=master)](https://coveralls.io/github/jekyll/jekyll-admin?branch=master) -[![NPM Dependencies](https://david-dm.org/jekyll/jekyll-admin.svg)](https://david-dm.org/jekyll/jekyll-admin) -[![Financial Contributors on Open Collective](https://opencollective.com/jekyll-admin/all/badge.svg?label=financial+contributors)](https://opencollective.com/jekyll-admin) - -A Jekyll plugin that provides users with a traditional CMS-style graphical interface to author content and administer Jekyll sites. The project is divided into two parts. A Ruby-based HTTP API that handles Jekyll and filesystem operations, and a JavaScript-based front end, built on that API. - -![screenshot of Jekyll Admin](/screenshot.png) - -## Installation - -Refer to the [installing plugins](https://jekyllrb.com/docs/plugins/installation/) section of Jekyll's documentation and install the `jekyll-admin` plugin as you would any other plugin. Here's the short version: - -1. Add the following to your site's Gemfile: - - ```ruby - gem 'jekyll-admin', group: :jekyll_plugins - ``` - -2. Run `bundle install` - -## Usage - -1. Start Jekyll as you would normally (`bundle exec jekyll serve`) -2. Navigate to `http://localhost:4000/admin` to access the administrative interface - -## Options - -Jekyll Admin related options can be specified in `_config.yml` under a key called `jekyll_admin`. - -```yaml -jekyll_admin: - hidden_links: - - posts - - pages - - staticfiles - - datafiles - - configuration - homepage: "pages" -``` - -### Customizing collection label in Sidebar - -The plugin allows you to customize the name of a collection that is displayed in the sidebar by defining it in the collection's -metadata in the config file. For example, if your source's *posts* are actually *news-items* on the deployed site, then it can -be distracting to see the label `Posts` in the admin's sidebar. This situation can be resolved with the following configuration: - -```yaml -collections: - posts: - output: true - sidebar_label: News -``` - -## Contributing - -Interested in contributing to Jekyll Admin? We’d love your help. Jekyll Admin is an open source project, built one contribution at a time by users like you. See [the contributing instructions](.github/CONTRIBUTING.md), and [the development docs](https://jekyll.github.io/jekyll-admin/development/) for more information. - -## Contributors - -### Code Contributors - -This project exists thanks to all the people who contribute. [[Contribute](.github/CONTRIBUTING.md)]. - - -### Financial Contributors - -Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/jekyll-admin/contribute)] - -#### Individuals - - - -#### Organizations - -Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/jekyll-admin/contribute)] - - - - - - - - - - - - -## License - -The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin.rb deleted file mode 100644 index 7bd6a792..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Default Sinatra to "production" mode (surpress errors) unless -# otherwise specified by the `RACK_ENV` environmental variable. -# Must be done prior to requiring Sinatra, or we'll get a LoadError -# as it looks for sinatra/cross-origin, which is development only -ENV["RACK_ENV"] = "production" if ENV["RACK_ENV"].to_s.empty? - -require "json" -require "jekyll" -require "base64" -require "webrick" -require "sinatra" -require "fileutils" -require "sinatra/base" -require "sinatra/json" -require "addressable/uri" -require "sinatra/reloader" -require "sinatra/namespace" - -module JekyllAdmin - autoload :APIable, "jekyll-admin/apiable" - autoload :DataFile, "jekyll-admin/data_file" - autoload :Directory, "jekyll-admin/directory" - autoload :FileHelper, "jekyll-admin/file_helper" - autoload :PathHelper, "jekyll-admin/path_helper" - autoload :Server, "jekyll-admin/server" - autoload :StaticServer, "jekyll-admin/static_server" - autoload :URLable, "jekyll-admin/urlable" - autoload :Version, "jekyll-admin/version" - - def self.site - @site ||= begin - site = Jekyll.sites.first - site.future = true - site - end - end -end - -[Jekyll::Page, Jekyll::Document, Jekyll::StaticFile, Jekyll::Collection].each do |klass| - klass.include JekyllAdmin::APIable - klass.include JekyllAdmin::URLable -end - -# Monkey Patches -require_relative "jekyll/commands/serve" diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/apiable.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/apiable.rb deleted file mode 100644 index ce1159a0..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/apiable.rb +++ /dev/null @@ -1,224 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - # Abstract module to be included in Convertible and Document to provide - # additional, API-specific functionality without duplicating logic - module APIable - CONTENT_FIELDS = %w(next previous content excerpt).freeze - API_SCAFFOLD = %w(name path relative_path).map { |i| [i, nil] }.to_h.freeze - - # Returns a hash suitable for use as an API response. - # - # For Documents and Pages: - # - # 1. Adds the file's raw content to the `raw_content` field - # 2. Adds the file's raw YAML front matter to the `front_matter` field - # - # For Static Files it addes the Base64 `encoded_content` field - # - # Options: - # - # include_content - if true, includes the content in the respond, false by default - # to support mapping on indexes where we only want metadata - # - # Returns a hash (which can then be to_json'd) - def to_api(include_content: false) - output = API_SCAFFOLD.merge hash_for_api - - # Include content, if requested, otherwise remove it - if include_content - output.merge!(content_fields) - else - CONTENT_FIELDS.each { |field| output.delete(field) } - end - - # Documents have duplicate output and content fields, Pages do not - # Since it's an API, use `content` in both for consistency - output.delete("output") - - output["name"] = basename if is_a?(Jekyll::Document) - output["from_theme"] = from_theme_gem? if is_a?(Jekyll::StaticFile) - output["relative_path"] = relative_path_for_api - - # By default, calling to_liquid on a collection will return a docs - # array with each rendered document, which we don't want. - if is_a?(Jekyll::Collection) - output.delete("docs") - output["name"] = label - output["path"] = relative_directory - output["entries_url"] = entries_url - end - - output.merge!(url_fields) - output - end - - private - - # Relative path of files and directories with their *special directories* - # and any leading slashes stripped away. - # - # Examples: - # `_drafts/foo/draft-post.md` => `foo/draft-post.md` - # `_posts/foo/2019-10-18-hello.md` => `foo/2019-10-18-hello.md` - # `/assets/img/logo.png` => `assets/img/logo.png` - def relative_path_for_api - return unless respond_to?(:relative_path) && relative_path - - @relative_path_for_api ||= begin - rel_path = relative_path.dup - strip_leading_slash!(rel_path) - strip_leading_special_directory!(rel_path) - strip_leading_slash!(rel_path) - - rel_path - end - end - - # Prefer substituting substrings instead of using a regex in order to avoid multiple - # regex allocations. String literals are frozen and reused. - - def strip_leading_slash!(path) - return unless path.start_with?("/") - - path.sub!("/", "") - end - - def strip_leading_special_directory!(path) - return unless special_directory && path.start_with?(special_directory) - - path.sub!(special_directory, "") - end - - def special_directory - return @special_directory if defined?(@special_directory) - - @special_directory = begin - if is_a?(Jekyll::Document) && draft? - "_drafts" - elsif is_a?(Jekyll::Document) - collection.relative_directory - elsif is_a?(Jekyll::Collection) - relative_directory - end - end - end - - # Pages don't have a hash method, but Documents do - def file_path - if is_a?(Jekyll::Document) - path - else - File.join(@base, @dir, name) - end - end - - def from_theme_gem? - @base == site.in_theme_dir - end - - # StaticFiles don't have `attr_accesor` set for @site or @name - def site - @site - end - - def name - @name - end - - def file_contents - @file_contents ||= File.read(file_path, **file_read_options) if file_exists? - end - - def file_read_options - Jekyll::Utils.merged_file_read_opts(site, {}) - end - - def front_matter_defaults - return unless file_exists? - - @front_matter_defaults ||= begin - return {} unless respond_to?(:relative_path) && respond_to?(:type) - - site.frontmatter_defaults.all(relative_path, type) - end - end - - def front_matter - return unless file_exists? - - @front_matter ||= if file_contents =~ Jekyll::Document::YAML_FRONT_MATTER_REGEXP - SafeYAML.load(Regexp.last_match(1)) - else - {} - end - end - - def raw_content - return unless file_exists? - - @raw_content ||= if file_contents =~ Jekyll::Document::YAML_FRONT_MATTER_REGEXP - $POSTMATCH - else - file_contents - end - end - - def encoded_content - @encoded_content ||= Base64.encode64(file_contents) if file_exists? - end - - def file_exists? - return @file_exists if defined? @file_exists - - @file_exists = File.exist?(file_path) - end - - # Base hash from which to generate the API output - def hash_for_api - output = to_liquid - if output.respond_to?(:hash_for_json) - output.hash_for_json - else - output.to_h - end - end - - # Returns a hash of content fields for inclusion in the API output - def content_fields - output = {} - - # Include file content-related fields - if is_a?(Jekyll::StaticFile) - output["encoded_content"] = encoded_content - elsif is_a?(JekyllAdmin::DataFile) - output["content"] = content - output["raw_content"] = raw_content - else - output["raw_content"] = raw_content - output["front_matter"] = front_matter - output["front_matter_defaults"] = front_matter_defaults - end - - # Include next and previous documents non-recursively - if is_a?(Jekyll::Document) - %w(next previous).each do |direction| - method = "#{direction}_doc".to_sym - doc = public_send(method) - output[direction] = doc.to_api if doc - end - end - - output - end - - def url_fields - return {} unless respond_to?(:http_url) && respond_to?(:api_url) - - { - "http_url" => http_url, - "api_url" => api_url, - } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/data_file.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/data_file.rb deleted file mode 100644 index a8ad24ec..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/data_file.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class DataFile - METHODS_FOR_LIQUID = %w(name path relative_path slug ext title).freeze - EXTENSIONS = %w(yaml yml json csv).freeze - - include APIable - include URLable - include PathHelper - extend PathHelper - - attr_reader :id, :ext - - # Initialize a new DataFile object - # - # id - the file ID as passed from the API. This may or may not have an extension - def initialize(id) - extname = File.extname(id) - if extname.empty? - @id = "#{id}.yml" - @ext = ".yml" - else - @id = id - @ext = extname - end - end - alias_method :relative_path, :id - - # Returns the file's extension with preceeding `.` - alias_method :extension, :ext - - def exists? - @exists ||= File.exist?(absolute_path) - end - - # Returns unparsed content as it exists on disk - def raw_content - @raw_content ||= File.open(absolute_path, "r:UTF-8", &:read) - end - - # Returnes (re)parsed content using Jekyll's native parsing mechanism - def content - @content ||= data_reader.read_data_file(absolute_path) - end - - # Returns the file's sanitized slug (as used in `site.data[slug]`) - def slug - @slug ||= data_reader.sanitize_filename(basename) - end - - # Returns the human-readable title of the data file - def title - @title ||= Jekyll::Utils.titleize_slug(slug.tr("_", "-")) - end - - # Returns path relative to site source - def path - @path ||= File.join(DataFile.data_dir, relative_path) - end - - def absolute_path - sanitized_path(path) - end - alias_method :file_path, :absolute_path - - # Mimics Jekyll's native to_liquid functionality by returning a hash - # of data file metadata - def to_liquid - @to_liquid ||= METHODS_FOR_LIQUID.map { |key| [key, public_send(key)] }.to_h - end - - def self.all - data_dir = Jekyll.sanitized_path(JekyllAdmin.site.source, DataFile.data_dir) - data_dir = Pathname.new(data_dir) - Dir["#{data_dir}/**/*.{#{EXTENSIONS.join(",")}}"].map do |path| - new(Pathname.new(path).relative_path_from(data_dir).to_s) - end - end - - # Relative path to data directory within site source - def self.data_dir - JekyllAdmin.site.config["data_dir"] - end - - private - - def data_reader - @data_reader = Jekyll::DataReader.new(JekyllAdmin.site) - end - - def basename - @basename ||= File.basename(id, ".*") - end - - def basename_with_extension - "#{basename}#{extension}" - end - alias_method :name, :basename_with_extension - public :name - - def namespace - "data" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/directory.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/directory.rb deleted file mode 100644 index 0a355ab1..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/directory.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Directory - extend Forwardable - def_delegator :@path, :basename, :name - def_delegator :@path, :mtime, :modified_time - attr_reader :path, :splat, :content_type, :base - - include Enumerable - include JekyllAdmin::URLable - include JekyllAdmin::APIable - - RESOURCE_TYPES = %w(pages data drafts static_files).freeze - DOT_DIRECTORIES = [".", ".."].freeze - - private_constant :RESOURCE_TYPES, :DOT_DIRECTORIES - - # Parameters: - # path - The full path of the directory at which its entries will be listed. - # - # Named parameters: - # base: - The full path to the directory from source. - # splat: - The requested directory path relative to content namespace. - # content_type: - The type of the requested directory entries. Corresponds to - # the resources' API namespace. - def initialize(path, base:, splat:, content_type:) - @path = Pathname.new path - @base = Pathname.new base - @splat = Pathname.new splat - @content_type = content_type - end - - def to_liquid - { - "name" => name, - "modified_time" => modified_time, - "path" => relative_path, - "type" => "directory", - } - end - - def relative_path - @relative_path ||= path.relative_path_from(base).to_s - end - - def resource_path - if RESOURCE_TYPES.include?(content_type) - "/#{content_type}/#{splat}/#{name}" - else - "/collections/#{content_type}/entries/#{splat}/#{name}" - end - end - alias_method :url, :resource_path - - def http_url - nil - end - - def directories - path.entries.map do |entry| - next if DOT_DIRECTORIES.include? entry.to_s - next unless path.join(entry).directory? - - self.class.new( - path.join(entry), - :base => base, :content_type => content_type, :splat => splat - ) - end.compact! - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/file_helper.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/file_helper.rb deleted file mode 100644 index 83b04c1c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/file_helper.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - module FileHelper - # The file the user requested in the URL - def requested_file - find_by_path(path) - end - - # The file ultimately written to disk - # This may be the requested file, or in the case of a rename will be read - # from the new path that was actually written to disk - def written_file - find_by_path(write_path) - end - - # Write a file to disk with the given content - def write_file(path, content) - Jekyll.logger.debug "WRITING:", path - path = sanitized_path(path) - FileUtils.mkdir_p File.dirname(path) - File.open(path, "wb") do |file| - file.write(content) - end - conditionally_process_site - end - - # Delete the file at the given path - def delete_file(path) - Jekyll.logger.debug "DELETING:", path - FileUtils.rm_f sanitized_path(path) - conditionally_process_site - end - - def delete_file_without_process(path) - Jekyll.logger.debug "DELETING:", path - FileUtils.rm_f sanitized_path(path) - end - - private - - def conditionally_process_site - site.process unless site.config['watch'] # to avoid race condition between jekyll watch and this - end - - def ensure_requested_file - ensure_file(requested_file) - end - - def ensure_written_file - ensure_file(written_file) - end - - def ensure_not_overwriting_existing_file - ensure_not_file(written_file) - end - - def find_by_path(path) - files = case namespace - when "collections" - collection.docs - when "data" - DataFile.all - when "drafts" - drafts - when "pages", "static_files" - site.public_send(namespace.to_sym) - else - [] - end - files.find { |f| sanitized_path(f.path) == path } - end - - def ensure_file(file) - render_404 if file.nil? - end - - def ensure_not_file(file) - return if file.nil? - - Jekyll.logger.warn "Jekyll Admin:", "Could not create file." - Jekyll.logger.warn "", "Path #{file.relative_path.inspect} already exists!" - render_404 - end - - def ensure_directory - render_404 unless Dir.exist?(directory_path) - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/path_helper.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/path_helper.rb deleted file mode 100644 index a4743406..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/path_helper.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - module PathHelper - def sanitized_path(path) - path = path_without_site_source(path) - Jekyll.sanitized_path JekyllAdmin.site.source, path - end - - # Returns the basename + extension for the requested file - def filename - params["ext"] ||= "yml" if namespace == "data" - "#{params["path"]}.#{params["ext"]}" - end - - # Returns the sanitized path relative to the site source - def sanitized_relative_path(path) - path_without_site_source sanitized_path(path) - end - - # Returns the sanitized absolute path to the requested object - def absolute_path - sanitized_path File.join(directory_path, filename) - end - alias_method :path, :absolute_path - - # Returns the sanitized relative path to the requested object - def relative_path - sanitized_relative_path absolute_path - end - - # Returns the sanitized absolute path to write the requested object - def write_path - if renamed? - sanitized_path request_payload["path"] - else - path - end - end - alias_method :request_path, :write_path - - # Returns the sanitized relative path to write the requested object - def relative_write_path - sanitized_relative_path write_path - end - - # Is this request renaming a file? - def renamed? - return false unless request_payload["path"] - - ensure_leading_slash(request_payload["path"]) != relative_path - end - - # Is this request creating a new file? - def new? - !request_payload["path"] - end - - private - - # Returns the path to the requested file's containing directory - def directory_path - sanitized_path( - case namespace - when "collections" - File.join(collection.directory, params["splat"].first) - when "data" - File.join(DataFile.data_dir, params["splat"].first) - when "drafts" - File.join("_drafts", params["splat"].first) - else - params["splat"].first - end - ) - end - - def ensure_leading_slash(input) - return input if input.nil? || input.empty? || input.start_with?("/") - - "/#{input}" - end - - def path_without_site_source(path) - path.to_s.gsub(%r!\A#{Regexp.escape(JekyllAdmin.site.source)}!, "") - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/asset-manifest.json b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/asset-manifest.json deleted file mode 100644 index 0667c038..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/asset-manifest.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "files": { - "main.css": "/admin/static/css/main.913a54c0.chunk.css", - "main.js": "/admin/static/js/main.a0831f44.chunk.js", - "main.js.map": "/admin/static/js/main.a0831f44.chunk.js.map", - "runtime-main.js": "/admin/static/js/runtime-main.95f94e60.js", - "runtime-main.js.map": "/admin/static/js/runtime-main.95f94e60.js.map", - "static/css/2.b74256fb.chunk.css": "/admin/static/css/2.b74256fb.chunk.css", - "static/js/2.08ea13e0.chunk.js": "/admin/static/js/2.08ea13e0.chunk.js", - "static/js/2.08ea13e0.chunk.js.map": "/admin/static/js/2.08ea13e0.chunk.js.map", - "index.html": "/admin/index.html", - "precache-manifest.b8687326f4466a85e0973e99340bfc98.js": "/admin/precache-manifest.b8687326f4466a85e0973e99340bfc98.js", - "service-worker.js": "/admin/service-worker.js", - "static/css/2.b74256fb.chunk.css.map": "/admin/static/css/2.b74256fb.chunk.css.map", - "static/css/main.913a54c0.chunk.css.map": "/admin/static/css/main.913a54c0.chunk.css.map", - "static/js/2.08ea13e0.chunk.js.LICENSE.txt": "/admin/static/js/2.08ea13e0.chunk.js.LICENSE.txt", - "static/media/main.scss": "/admin/static/media/lato-regular.059514c9.ttf", - "static/media/react-widgets.css": "/admin/static/media/rw-widgets.eceddf47.ttf" - }, - "entrypoints": [ - "static/js/runtime-main.95f94e60.js", - "static/css/2.b74256fb.chunk.css", - "static/js/2.08ea13e0.chunk.js", - "static/css/main.913a54c0.chunk.css", - "static/js/main.a0831f44.chunk.js" - ] -} \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/favicon.ico b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/favicon.ico deleted file mode 100644 index e8b4e381..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/favicon.ico and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/index.html b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/index.html deleted file mode 100644 index d450ff4b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/index.html +++ /dev/null @@ -1 +0,0 @@ -Jekyll Admin
\ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/precache-manifest.b8687326f4466a85e0973e99340bfc98.js b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/precache-manifest.b8687326f4466a85e0973e99340bfc98.js deleted file mode 100644 index 2c3e9f28..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/precache-manifest.b8687326f4466a85e0973e99340bfc98.js +++ /dev/null @@ -1,78 +0,0 @@ -self.__precacheManifest = (self.__precacheManifest || []).concat([ - { - "revision": "c6da1865ea52ea8fc1e040e72f2084a9", - "url": "/admin/index.html" - }, - { - "revision": "28ed86b06338cbba1879", - "url": "/admin/static/css/2.b74256fb.chunk.css" - }, - { - "revision": "1e378c0573756750a5e3", - "url": "/admin/static/css/main.913a54c0.chunk.css" - }, - { - "revision": "28ed86b06338cbba1879", - "url": "/admin/static/js/2.08ea13e0.chunk.js" - }, - { - "revision": "e5c515157d8abcbad63615290f8f2b56", - "url": "/admin/static/js/2.08ea13e0.chunk.js.LICENSE.txt" - }, - { - "revision": "1e378c0573756750a5e3", - "url": "/admin/static/js/main.a0831f44.chunk.js" - }, - { - "revision": "b3c41f0bc963799e047a", - "url": "/admin/static/js/runtime-main.95f94e60.js" - }, - { - "revision": "1dc35d25e61d819a9c357074014867ab", - "url": "/admin/static/media/fontawesome-webfont.1dc35d25.ttf" - }, - { - "revision": "25a32416abee198dd821b0b17a198a8f", - "url": "/admin/static/media/fontawesome-webfont.25a32416.eot" - }, - { - "revision": "c8ddf1e5e5bf3682bc7bebf30f394148", - "url": "/admin/static/media/fontawesome-webfont.c8ddf1e5.woff" - }, - { - "revision": "d7c639084f684d66a1bc66855d193ed8", - "url": "/admin/static/media/fontawesome-webfont.d7c63908.svg" - }, - { - "revision": "e6cf7c6ec7c2d6f670ae9d762604cb0b", - "url": "/admin/static/media/fontawesome-webfont.e6cf7c6e.woff2" - }, - { - "revision": "55131026930a0cd4539d1e2fdb92722d", - "url": "/admin/static/media/lato-bold.55131026.ttf" - }, - { - "revision": "059514c92565e4045da1a69525dd9ec0", - "url": "/admin/static/media/lato-regular.059514c9.ttf" - }, - { - "revision": "a770b6797b68e3f8920e473eb824bac0", - "url": "/admin/static/media/loader-big.a770b679.gif" - }, - { - "revision": "12f0820c451bdc75f4d1ef97732bf6e8", - "url": "/admin/static/media/rw-widgets.12f0820c.woff" - }, - { - "revision": "792dcd18baf5f544aabcad1883d673c2", - "url": "/admin/static/media/rw-widgets.792dcd18.svg" - }, - { - "revision": "bc7c4a59f924cf037aad6e1f9edba366", - "url": "/admin/static/media/rw-widgets.bc7c4a59.eot" - }, - { - "revision": "eceddf474df95d8d4a7e316668c3be85", - "url": "/admin/static/media/rw-widgets.eceddf47.ttf" - } -]); \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/service-worker.js b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/service-worker.js deleted file mode 100644 index 1fa2f800..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/service-worker.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Welcome to your Workbox-powered service worker! - * - * You'll need to register this file in your web app and you should - * disable HTTP caching for this file too. - * See https://goo.gl/nhQhGp - * - * The rest of the code is auto-generated. Please don't update this file - * directly; instead, make changes to your Workbox build configuration - * and re-run your build process. - * See https://goo.gl/2aRDsh - */ - -importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); - -importScripts( - "/admin/precache-manifest.b8687326f4466a85e0973e99340bfc98.js" -); - -self.addEventListener('message', (event) => { - if (event.data && event.data.type === 'SKIP_WAITING') { - self.skipWaiting(); - } -}); - -workbox.core.clientsClaim(); - -/** - * The workboxSW.precacheAndRoute() method efficiently caches and responds to - * requests for URLs in the manifest. - * See https://goo.gl/S9QRab - */ -self.__precacheManifest = [].concat(self.__precacheManifest || []); -workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); - -workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/admin/index.html"), { - - blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/], -}); diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/2.b74256fb.chunk.css b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/2.b74256fb.chunk.css deleted file mode 100644 index 15e17740..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/2.b74256fb.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -.rw-btn,.rw-dropdown-list-autofill,.rw-filter-input,.rw-input,.rw-input-reset{color:inherit;padding:0;margin:0;border:none;box-shadow:none;background:none;background-image:none;font-family:inherit;font-size:inherit;line-height:inherit;touch-action:manipulation}.rw-btn::-moz-focus-inner{padding:0;border:0}select.rw-input{text-transform:none}html input[type=button].rw-input{-webkit-appearance:button;cursor:pointer}textarea.rw-input{overflow:auto;resize:vertical}button[disabled].rw-input,fieldset[disabled] .rw-input,html input[disabled].rw-input{cursor:not-allowed}button.rw-input::-moz-focus-inner,input.rw-input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}@font-face{font-family:"RwWidgets";font-weight:400;font-style:normal;src:url(/admin/static/media/rw-widgets.bc7c4a59.eot);src:url(/admin/static/media/rw-widgets.bc7c4a59.eot?#iefix&v=4.1.0) format("embedded-opentype"),url(/admin/static/media/rw-widgets.12f0820c.woff) format("woff"),url(/admin/static/media/rw-widgets.eceddf47.ttf) format("truetype"),url(/admin/static/media/rw-widgets.792dcd18.svg#fontawesomeregular) format("svg")}.rw-i{display:inline-block;color:inherit;font-family:RwWidgets;font-style:normal;font-weight:400;font-feature-settings:normal;font-variant:normal;text-transform:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.rw-i-caret-down:before{content:"\e803"}.rw-i-caret-up:before{content:"\e800"}.rw-i-chevron-left:before{content:"\f104"}.rw-i-chevron-right:before{content:"\f105"}.rw-i-clock-o:before{content:"\e805"}.rw-i-calendar:before{content:"\e804"}.rw-i-search:before{content:"\e801"}.rw-btn{position:relative;color:#333;display:inline-block;text-align:center;vertical-align:middle;border:1px solid transparent;cursor:pointer;outline:none}.rw-state-disabled .rw-btn,.rw-state-readonly .rw-btn{cursor:not-allowed}.rw-btn-select{opacity:.75;-webkit-transition:opacity .15s ease-in;transition:opacity .15s ease-in}.rw-btn-select:hover,.rw-state-focus .rw-btn-select,:hover>.rw-btn-select{opacity:1}.rw-btn-primary{width:100%;white-space:normal;line-height:2em}.rw-btn-primary:hover{background-color:#e6e6e6}.rw-btn-primary[disabled],.rw-btn-select[disabled],fieldset[disabled] .rw-btn-primary,fieldset[disabled] .rw-btn-select{box-shadow:none;cursor:not-allowed;opacity:.65;pointer-events:none}.rw-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.rw-widget{background-clip:border-box;border:none;color:#333;font-size:1em;font-family:inherit;outline:none;position:relative}.rw-widget,.rw-widget *,.rw-widget:after,.rw-widget :after,.rw-widget:before,.rw-widget :before{box-sizing:border-box}.rw-widget>.rw-widget-container{width:100%;margin:0}.rw-widget-container{background-color:#fff;border:1px solid #ccc;border-radius:4px}.rw-state-focus>.rw-widget-container,.rw-state-focus>.rw-widget-container:hover,.rw-widget-container.rw-state-focus,.rw-widget-container.rw-state-focus:hover{background-color:#fff;border-color:#66afe9;box-shadow:0 0 8px rgba(102,175,233,.6)}.rw-state-readonly>.rw-widget-container,.rw-widget-container.rw-state-readonly{cursor:not-allowed}.rw-state-disabled>.rw-widget-container,.rw-state-disabled>.rw-widget-container:active,.rw-state-disabled>.rw-widget-container:hover,.rw-widget-container.rw-state-disabled,.rw-widget-container.rw-state-disabled:active,.rw-widget-container.rw-state-disabled:hover,fieldset[disabled] .rw-widget-container,fieldset[disabled] .rw-widget-container:active,fieldset[disabled] .rw-widget-container:hover{box-shadow:none;cursor:not-allowed}.rw-widget-picker{position:relative;overflow:hidden;border-collapse:separate;display:inline-table;height:2.429em}.rw-widget-picker>*{position:relative;border:none;outline:none;width:100%;height:100%;display:table-cell}.rw-widget-picker>.rw-select{width:1%;white-space:nowrap}.rw-open>.rw-widget-picker{border-bottom-right-radius:0;border-bottom-left-radius:0}.rw-open-up>.rw-widget-picker{border-top-right-radius:0;border-top-left-radius:0}.rw-state-disabled>.rw-widget-picker,fieldset[disabled] .rw-widget-picker{background-color:#eee}.rw-multiselect>.rw-widget-picker{height:auto}.rw-select{cursor:pointer}.rw-select>*{width:1.9em;height:100%}.rw-state-disabled .rw-select,.rw-state-readonly .rw-select{cursor:not-allowed}.rw-select-bordered{cursor:pointer;border:none;border-left:1px solid #ccc}.rw-select-bordered:active,.rw-select-bordered:hover{background-color:#e6e6e6}.rw-select-bordered:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.rw-state-disabled .rw-select-bordered,.rw-state-disabled .rw-select-bordered:active,.rw-state-disabled .rw-select-bordered:hover,.rw-state-readonly .rw-select-bordered,.rw-state-readonly .rw-select-bordered:active,.rw-state-readonly .rw-select-bordered:hover,fieldset[disabled] .rw-select-bordered,fieldset[disabled] .rw-select-bordered:active,fieldset[disabled] .rw-select-bordered:hover{cursor:not-allowed;background-color:inherit;background-image:none;box-shadow:none}.rw-rtl .rw-select-bordered{border-right:1px solid #ccc;border-left:none}.rw-rtl{direction:rtl}.rw-dropdown-list-autofill,.rw-filter-input,.rw-input,.rw-input-reset{outline:0}.rw-input-reset::-moz-placeholder{color:#999;opacity:1}.rw-input-reset:-ms-input-placeholder{color:#999}.rw-input-reset::-webkit-input-placeholder{color:#999}.rw-dropdown-list-autofill,.rw-filter-input,.rw-input{color:#555;padding:0 .857em;background-color:#fff}.rw-input[type=text]::-ms-clear{display:none}.rw-input[disabled],fieldset[disabled] .rw-input{box-shadow:none;cursor:not-allowed;opacity:1;background-color:#eee;border-color:#ccc}.rw-input[readonly]{cursor:not-allowed}.rw-i.rw-loading{display:block;background:url(data:image/gif;base64,R0lGODlhEAAQAPIAAP///zMzM87OzmdnZzMzM4GBgZqamqenpyH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==) no-repeat 50%;min-width:16px;width:1.9em;height:16px}.rw-i.rw-loading:before{content:""}.rw-placeholder{color:#999}.rw-detect-autofill:-webkit-autofill{-webkit-animation-name:react-widgets-autofill-start;animation-name:react-widgets-autofill-start;-webkit-transition:background-color 50000s ease-in-out 0s;transition:background-color 50000s ease-in-out 0s}.rw-detect-autofill:not(:-webkit-autofill){-webkit-animation-name:react-widgets-autofill-cancel;animation-name:react-widgets-autofill-cancel}.rw-input:-webkit-autofill,.rw-webkit-autofill .rw-widget-container{background-color:#faffbd!important;background-image:none!important;color:#000!important}.rw-filter-input,.rw-widget-input{box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.rw-widget-input.rw-state-focus{box-shadow:0 0 8px rgba(102,175,233,.6),inset 0 1px 1px rgba(0,0,0,.075)}.rw-list{margin:0;padding:0;list-style:none;font-size:1em;outline:0;overflow:auto;max-height:200px}.rw-list-option{-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:#333;cursor:pointer;border:1px solid transparent}.rw-list-option.rw-state-focus,.rw-list-option.rw-state-focus:hover{background-color:transparent;border-color:#66afe9;color:#333}.rw-list-option:hover,.rw-list-option:hover.rw-state-focus{background-color:#e6e6e6;border-color:#e6e6e6;color:#333}.rw-list-option.rw-state-selected,.rw-list-option.rw-state-selected:hover{background-color:#337ab7;border-color:#337ab7;color:#fff}.rw-list-option.rw-state-disabled,.rw-list-option.rw-state-readonly,fieldset[disabled] .rw-list-option{box-shadow:none;cursor:not-allowed;color:#999;opacity:.7}.rw-list-option.rw-state-disabled:hover,.rw-list-option.rw-state-readonly:hover,fieldset[disabled] .rw-list-option:hover{background:none;border-color:transparent}.rw-list-empty,.rw-list-optgroup,.rw-list-option{padding:.143em .75em;outline:0}.rw-list-optgroup{font-weight:700;padding-top:7px}.rw-list-option-create{border-top:1px solid #ccc}.rw-dropdown-list-autofill{padding:0}.rw-dropdown-list-input{background-color:transparent;vertical-align:middle;padding-right:0;max-width:1px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.rw-rtl .rw-dropdown-list-input{padding-right:.857em;padding-left:0}.rw-filter-input{position:relative;margin:4px;padding-right:0}.rw-filter-input .rw-rtl{padding-right:.857em;padding-left:0}.rw-filter-input .rw-btn,.rw-filter-input .rw-select{opacity:.75;cursor:text}.rw-filter-input>.rw-select,.rw-filter-input>.rw-select:active,.rw-filter-input>.rw-select:hover{background:none;cursor:auto;box-shadow:none}.rw-number-picker .rw-btn{cursor:pointer;height:calc(1.2145em - 1px);margin-top:-1px\9;height:1.2145em\9;line-height:1.2145em;line-height:calc(1.2145em - 1px);display:block;border:none}.rw-number-picker .rw-btn:active,.rw-number-picker .rw-btn:hover{background-color:#e6e6e6}.rw-number-picker .rw-btn:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.rw-state-disabled .rw-number-picker .rw-btn,.rw-state-disabled .rw-number-picker .rw-btn:active,.rw-state-disabled .rw-number-picker .rw-btn:hover,.rw-state-readonly .rw-number-picker .rw-btn,.rw-state-readonly .rw-number-picker .rw-btn:active,.rw-state-readonly .rw-number-picker .rw-btn:hover,fieldset[disabled] .rw-number-picker .rw-btn,fieldset[disabled] .rw-number-picker .rw-btn:active,fieldset[disabled] .rw-number-picker .rw-btn:hover{cursor:not-allowed;background-color:inherit;background-image:none;box-shadow:none}.rw-number-picker .rw-select{vertical-align:middle}.rw-number-picker .rw-select,.rw-number-picker .rw-select:active,.rw-number-picker .rw-select:hover{box-shadow:none}.rw-calendar-popup{right:auto;min-width:0;width:18em}.rw-calendar{border-radius:4px;background-color:#fff;border:1px solid #ccc;overflow:hidden}.rw-calendar.rw-popup{border-color:#ccc}.rw-calendar-now{font-weight:700}.rw-calendar-btn-left,.rw-calendar-btn-right{width:12.5%}.rw-calendar-btn-view{width:75%}.rw-calendar-footer{border-top:1px solid #ccc}.rw-calendar-grid{outline:none;height:14.28571429em;table-layout:fixed;border-collapse:separate;border-spacing:0;width:100%;background-color:#fff}.rw-head-cell{border-bottom:1px solid #ccc}.rw-cell,.rw-head-cell{text-align:center;padding:.25em}.rw-cell{color:#333;border-radius:4px;cursor:pointer;line-height:normal;border:1px solid transparent}.rw-cell:hover{background-color:#e6e6e6;border-color:#e6e6e6;color:#333}.rw-cell.rw-state-focus,.rw-cell.rw-state-focus:hover{background-color:transparent;border-color:#66afe9;color:#333}.rw-cell.rw-state-selected,.rw-cell.rw-state-selected:hover{background-color:#337ab7;border-color:#337ab7;color:#fff}.rw-cell.rw-state-disabled{color:#999;opacity:.7}.rw-cell.rw-state-disabled:hover{background:none;border-color:transparent}.rw-calendar-month .rw-cell{text-align:center}.rw-cell-off-range{color:#999}.rw-calendar-transition-group{position:relative}.rw-calendar-transition{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;overflow:hidden}.rw-calendar-transition-top{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.rw-calendar-transition-bottom{-webkit-transform:translateY(100%);transform:translateY(100%)}.rw-calendar-transition-right{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.rw-calendar-transition-left{-webkit-transform:translateX(100%);transform:translateX(100%)}.rw-calendar-transition-entered.rw-calendar-transition-bottom,.rw-calendar-transition-entered.rw-calendar-transition-top,.rw-calendar-transition-entering.rw-calendar-transition-bottom,.rw-calendar-transition-entering.rw-calendar-transition-top{-webkit-transform:translateY(0);transform:translateY(0)}.rw-calendar-transition-entered.rw-calendar-transition-left,.rw-calendar-transition-entered.rw-calendar-transition-right,.rw-calendar-transition-entering.rw-calendar-transition-left,.rw-calendar-transition-entering.rw-calendar-transition-right{-webkit-transform:translateX(0);transform:translateX(0)}.rw-calendar-transition-exiting.rw-calendar-transition-top{-webkit-transform:translateY(100%);transform:translateY(100%)}.rw-calendar-transition-exiting.rw-calendar-transition-bottom{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.rw-calendar-transition-exiting.rw-calendar-transition-right{-webkit-transform:translateX(100%);transform:translateX(100%)}.rw-calendar-transition-exiting.rw-calendar-transition-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.rw-select-list{overflow:auto;position:relative}.rw-select-list .rw-list{max-height:none;font-size:1em}.rw-select-list-label{display:block;position:relative;font-weight:400;cursor:inherit;padding-left:20px;margin:0}.rw-rtl .rw-select-list-label{padding-left:0;padding-right:20px}input.rw-select-list-input{position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);top:.1em/9;margin:0;line-height:normal;cursor:inherit}.rw-rtl input.rw-select-list-input{left:auto;right:0}.rw-loading-mask{content:"";background:url(/admin/static/media/loader-big.a770b679.gif) no-repeat 50%;position:absolute;background-color:#fff;border-radius:4px;opacity:.7;top:0;left:0;height:100%;width:100%}.rw-multiselect{cursor:text}.rw-multiselect .rw-input-reset{height:calc(2.429em - 2px);margin-top:-2px\9;height:2.429em\9;border-width:0;width:auto;max-width:100%;padding:0 .857em}.rw-multiselect .rw-select{vertical-align:middle}.rw-multiselect .rw-select,.rw-multiselect .rw-select:active,.rw-multiselect .rw-select:hover{box-shadow:none;background:none}.rw-multiselect-taglist{margin:0;padding:0;list-style:none;display:inline-block;vertical-align:0;outline:none}.rw-multiselect-tag{display:inline-table;color:inherit;padding:0 .35em;margin-left:calc(.27934em - 1px);margin-top:calc(.27934em - 1px);height:1.87033em;border-radius:3px;background-color:#eee;border:1px solid #ccc;cursor:default;vertical-align:top;text-align:center;overflow:hidden;max-width:100%}.rw-multiselect-tag>*{display:table-cell;vertical-align:middle;height:100%}.rw-rtl .rw-multiselect-tag{margin-left:0;margin-right:calc(.27934em - 1px);padding:0 .35em}.rw-multiselect-tag.rw-state-focus,.rw-multiselect-tag.rw-state-focus:hover{background-color:transparent;border-color:#66afe9;color:#333}.rw-multiselect-tag.rw-state-disabled,.rw-multiselect-tag.rw-state-readonly,.rw-state-disabled .rw-multiselect-tag,.rw-state-readonly .rw-multiselect-tag,fieldset[disabled] .rw-multiselect-tag{cursor:not-allowed}.rw-multiselect-tag.rw-state-disabled,.rw-state-disabled .rw-multiselect-tag,fieldset[disabled] .rw-multiselect-tag{opacity:.65}fieldset[disabled] .rw-multiselect-tag{box-shadow:none;cursor:not-allowed}.rw-multiselect-tag-btn{color:inherit;margin-left:.25em}.rw-rtl .rw-multiselect-tag-btn{margin-left:0;margin-right:.25em}.rw-autocomplete .rw-select{position:absolute;display:block;width:auto;top:0;bottom:0;right:0}.rw-popup-container{position:absolute;z-index:1005;top:100%;left:-6px;right:-6px}.rw-popup-container.rw-dropup{top:auto;bottom:100%}.rw-state-focus .rw-popup-container{z-index:1006}.rw-popup-transition{width:100%;margin-bottom:6px;padding:0 6px}.rw-dropup>.rw-popup-transition{margin-bottom:0;margin-top:6px}.rw-popup{border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;box-shadow:0 5px 6px rgba(0,0,0,.2);border:1px solid #ccc;background:#fff}.rw-dropup .rw-popup{border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px;border-top-left-radius:3px;box-shadow:0 -2px 6px rgba(0,0,0,.2)}.rw-popup-transition{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.rw-popup-transition-entering{overflow:hidden}.rw-popup-transition-entering .rw-popup-transition{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.rw-popup-transition-exiting .rw-popup-transition{-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.rw-popup-transition-exited,.rw-popup-transition-exiting{overflow:hidden}.rw-popup-transition-exited .rw-popup-transition,.rw-popup-transition-exiting .rw-popup-transition{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.rw-popup-transition-exited.rw-dropup .rw-popup-transition,.rw-popup-transition-exiting.rw-dropup .rw-popup-transition{-webkit-transform:translateY(100%);transform:translateY(100%)}.rw-popup-transition-exited{display:none}.rw-state-disabled{box-shadow:none;cursor:not-allowed}.hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-built_in,.hljs-class .hljs-title{color:#c18401}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} -/*# sourceMappingURL=2.b74256fb.chunk.css.map */ \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/2.b74256fb.chunk.css.map b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/2.b74256fb.chunk.css.map deleted file mode 100644 index a4e1026b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/2.b74256fb.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["react-widgets.css","atom-one-light.css"],"names":[],"mappings":"AAAA,8EAA8E,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,mBAAmB,CAA+B,yBAAyB,CAAC,0BAA0B,SAAS,CAAC,QAAQ,CAAC,gBAAgB,mBAAmB,CAAC,iCAAmC,yBAAyB,CAAC,cAAc,CAAC,kBAAkB,aAAa,CAAC,eAAe,CAAC,qFAAqF,kBAAkB,CAAC,mEAAmE,QAAQ,CAAC,SAAS,CAAC,uCAA2C,qBAAqB,CAAC,SAAS,CAAC,WAAW,uBAAuB,CAAC,eAAkB,CAAC,iBAAiB,CAAC,oDAA2C,CAAA,sTAAsU,CAAiB,MAAC,oBAAmB,CAAA,aAAA,CAAA,qBAAA,CAAA,iBAAoB,CAAA,eAAoB,CAAA,4BAAkC,CAAA,mBAAA,CAAA,mBAAmC,CAAA,iCAAwC,CAAA,kCAAsC,CAAA,wBAA0B,eAAe,CAAC,sBAAA,eAA2B,CAAA,0BAAqC,eAAe,CAAC,2BAAsB,eAAgB,CAAA,qBAAoB,eAAgB,CAAA,sBAA0B,eAAW,CAAA,oBAAqB,eAAkB,CAAA,QAAA,iBAAsB,CAAA,UAAA,CAAA,oBAA6B,CAAA,iBAA4B,CAAA,qBAAA,CAAA,4BAAA,CAAA,cAAsD,CAAA,YAAmB,CAAA,sDAA2B,kBAAA,CAAA,eAAA,WAAiC,CAAA,uCAAA,CAAA,+BAA0E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,aAAc,CACf,2EAOC,aAAc,CACf,uCAIC,aAAc,CACf,yIAUC,aAAc,CACf,8EAQC,aAAc,CACf,eAGC,iBAAkB,CACnB,aAGC,eAAiB,CAClB,WAGC,yBAA0B","file":"2.b74256fb.chunk.css","sourcesContent":[".rw-btn,.rw-input-reset,.rw-input,.rw-dropdown-list-autofill,.rw-filter-input{color:inherit;padding:0;margin:0;border:none;box-shadow:none;background:none;background-image:none;font-family:inherit;font-size:inherit;line-height:inherit;-ms-touch-action:manipulation;touch-action:manipulation}.rw-btn::-moz-focus-inner{padding:0;border:0}select.rw-input{text-transform:none}html input[type=\"button\"].rw-input{-webkit-appearance:button;cursor:pointer}textarea.rw-input{overflow:auto;resize:vertical}button[disabled].rw-input,fieldset[disabled] .rw-input,html input[disabled].rw-input{cursor:not-allowed}button.rw-input::-moz-focus-inner,input.rw-input::-moz-focus-inner{border:0;padding:0}input[type=\"checkbox\"],input[type=\"radio\"]{box-sizing:border-box;padding:0}@font-face{font-family:'RwWidgets';font-weight:normal;font-style:normal;src:url('../fonts/rw-widgets.eot?v=4.1.0');src:url('../fonts/rw-widgets.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../fonts/rw-widgets.woff?v=4.1.0') format('woff'),url('../fonts/rw-widgets.ttf?v=4.1.0') format('truetype'),url('../fonts/rw-widgets.svg?v=4.1.0#fontawesomeregular') format('svg')}.rw-i{display:inline-block;color:inherit;font-family:RwWidgets;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.rw-i-caret-down:before{content:'\\e803'}.rw-i-caret-up:before{content:'\\e800'}.rw-i-chevron-left:before{content:'\\f104'}.rw-i-chevron-right:before{content:'\\f105'}.rw-i-clock-o:before{content:'\\e805'}.rw-i-calendar:before{content:'\\e804'}.rw-i-search:before{content:'\\e801'}.rw-btn{position:relative;color:#333;display:inline-block;text-align:center;vertical-align:middle;border:1px solid transparent;cursor:pointer;outline:none}.rw-state-readonly .rw-btn,.rw-state-disabled .rw-btn{cursor:not-allowed}.rw-btn-select{opacity:.75;transition:opacity 150ms ease-in}.rw-btn-select:hover,.rw-state-focus .rw-btn-select,:hover>.rw-btn-select{opacity:1}.rw-btn-primary{width:100%;white-space:normal;line-height:2em}.rw-btn-primary:hover{background-color:#e6e6e6}.rw-btn-select[disabled],.rw-btn-primary[disabled],fieldset[disabled] .rw-btn-select,fieldset[disabled] .rw-btn-primary{box-shadow:none;cursor:not-allowed;opacity:.65;pointer-events:none}.rw-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.rw-widget{background-clip:border-box;border:none;color:#333;font-size:1em;font-family:inherit;outline:none;position:relative}.rw-widget,.rw-widget *{box-sizing:border-box}.rw-widget:before,.rw-widget *:before,.rw-widget:after,.rw-widget *:after{box-sizing:border-box}.rw-widget>.rw-widget-container{width:100%;margin:0}.rw-widget-container{background-color:#fff;border:#ccc 1px solid;border-radius:4px}.rw-widget-container.rw-state-focus,.rw-state-focus>.rw-widget-container,.rw-widget-container.rw-state-focus:hover,.rw-state-focus>.rw-widget-container:hover{background-color:#fff;border-color:#66afe9;box-shadow:0 0 8px rgba(102,175,233,0.6)}.rw-widget-container.rw-state-readonly,.rw-state-readonly>.rw-widget-container{cursor:not-allowed}.rw-widget-container.rw-state-disabled,.rw-state-disabled>.rw-widget-container,fieldset[disabled] .rw-widget-container,.rw-widget-container.rw-state-disabled:hover,.rw-state-disabled>.rw-widget-container:hover,fieldset[disabled] .rw-widget-container:hover,.rw-widget-container.rw-state-disabled:active,.rw-state-disabled>.rw-widget-container:active,fieldset[disabled] .rw-widget-container:active{box-shadow:none;cursor:not-allowed}.rw-widget-picker{position:relative;overflow:hidden;border-collapse:separate;display:inline-table;height:2.429em}.rw-widget-picker>*{position:relative;border:none;outline:none;width:100%;height:100%;display:table-cell}.rw-widget-picker>.rw-select{width:1%;white-space:nowrap}.rw-open>.rw-widget-picker{border-bottom-right-radius:0;border-bottom-left-radius:0}.rw-open-up>.rw-widget-picker{border-top-right-radius:0;border-top-left-radius:0}fieldset[disabled] .rw-widget-picker,.rw-state-disabled>.rw-widget-picker{background-color:#eee}.rw-multiselect>.rw-widget-picker{height:auto}.rw-select{cursor:pointer}.rw-select>*{width:1.9em;height:100%}.rw-state-readonly .rw-select,.rw-state-disabled .rw-select{cursor:not-allowed}.rw-select-bordered{cursor:pointer;border:none;border-left:#ccc 1px solid}.rw-select-bordered:hover,.rw-select-bordered:active{background-color:#e6e6e6}.rw-select-bordered:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.rw-state-disabled .rw-select-bordered,.rw-state-readonly .rw-select-bordered,fieldset[disabled] .rw-select-bordered,.rw-state-disabled .rw-select-bordered:hover,.rw-state-readonly .rw-select-bordered:hover,fieldset[disabled] .rw-select-bordered:hover,.rw-state-disabled .rw-select-bordered:active,.rw-state-readonly .rw-select-bordered:active,fieldset[disabled] .rw-select-bordered:active{cursor:not-allowed;background-color:inherit;background-image:none;box-shadow:none}.rw-rtl .rw-select-bordered{border-right:#ccc 1px solid;border-left:none}.rw-rtl{direction:rtl}.rw-input-reset,.rw-input,.rw-dropdown-list-autofill,.rw-filter-input{outline:0}.rw-input-reset::-moz-placeholder{color:#999;opacity:1}.rw-input-reset:-ms-input-placeholder{color:#999}.rw-input-reset::-webkit-input-placeholder{color:#999}.rw-input,.rw-dropdown-list-autofill,.rw-filter-input{color:#555;padding:0 .857em;background-color:#fff}.rw-input[type=\"text\"]::-ms-clear{display:none}.rw-input[disabled],fieldset[disabled] .rw-input{box-shadow:none;cursor:not-allowed;opacity:1;background-color:#eee;border-color:#ccc}.rw-input[readonly]{cursor:not-allowed}.rw-i.rw-loading{display:block;background:url('../img/loading.gif') no-repeat center;min-width:16px;width:1.9em;height:16px}.rw-i.rw-loading:before{content:\"\"}.rw-placeholder{color:#999}.rw-detect-autofill:-webkit-autofill{animation-name:react-widgets-autofill-start;transition:background-color 50000s ease-in-out 0s}.rw-detect-autofill:not(:-webkit-autofill){animation-name:react-widgets-autofill-cancel}.rw-webkit-autofill .rw-widget-container,.rw-input:-webkit-autofill{background-color:#faffbd !important;background-image:none !important;color:#000 !important}.rw-widget-input,.rw-filter-input{box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.rw-widget-input.rw-state-focus{box-shadow:0 0 8px rgba(102, 175, 233, 0.6), inset 0 1px 1px rgba(0, 0, 0, 0.075)}.rw-list{margin:0;padding:0;list-style:none;font-size:1em;outline:0;overflow:auto;max-height:200px}.rw-list-option{-ms-user-select:none;user-select:none;color:#333;cursor:pointer;border:1px solid transparent}.rw-list-option.rw-state-focus,.rw-list-option.rw-state-focus:hover{background-color:transparent;border-color:#66afe9;color:#333}.rw-list-option:hover,.rw-list-option:hover.rw-state-focus{background-color:#e6e6e6;border-color:#e6e6e6;color:#333}.rw-list-option.rw-state-selected,.rw-list-option.rw-state-selected:hover{background-color:#337ab7;border-color:#337ab7;color:white}fieldset[disabled] .rw-list-option,.rw-list-option.rw-state-disabled,.rw-list-option.rw-state-readonly{box-shadow:none;cursor:not-allowed;color:#999;opacity:.7}fieldset[disabled] .rw-list-option:hover,.rw-list-option.rw-state-disabled:hover,.rw-list-option.rw-state-readonly:hover{background:none;border-color:transparent}.rw-list-empty,.rw-list-option,.rw-list-optgroup{padding:.143em .75em;outline:0}.rw-list-optgroup{font-weight:bold;padding-top:7px}.rw-list-option-create{border-top:1px #ccc solid}.rw-dropdown-list-autofill{padding:0}.rw-dropdown-list-input{background-color:transparent;vertical-align:middle;padding-right:0;max-width:1px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.rw-rtl .rw-dropdown-list-input{padding-right:.857em;padding-left:0}.rw-filter-input{position:relative;margin:4px;padding-right:0}.rw-filter-input .rw-rtl{padding-right:.857em;padding-left:0}.rw-filter-input .rw-select,.rw-filter-input .rw-btn{opacity:.75;cursor:text}.rw-filter-input>.rw-select,.rw-filter-input>.rw-select:active,.rw-filter-input>.rw-select:hover{background:none;cursor:initial;box-shadow:none}.rw-number-picker .rw-btn{cursor:pointer;height:calc(1.2145em - 1px);margin-top:-1px\\9;height:1.2145em\\9;line-height:1.2145em;line-height:calc(1.2145em - 1px);display:block;border:none}.rw-number-picker .rw-btn:hover,.rw-number-picker .rw-btn:active{background-color:#e6e6e6}.rw-number-picker .rw-btn:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.rw-state-disabled .rw-number-picker .rw-btn,.rw-state-readonly .rw-number-picker .rw-btn,fieldset[disabled] .rw-number-picker .rw-btn,.rw-state-disabled .rw-number-picker .rw-btn:hover,.rw-state-readonly .rw-number-picker .rw-btn:hover,fieldset[disabled] .rw-number-picker .rw-btn:hover,.rw-state-disabled .rw-number-picker .rw-btn:active,.rw-state-readonly .rw-number-picker .rw-btn:active,fieldset[disabled] .rw-number-picker .rw-btn:active{cursor:not-allowed;background-color:inherit;background-image:none;box-shadow:none}.rw-number-picker .rw-select{vertical-align:middle}.rw-number-picker .rw-select,.rw-number-picker .rw-select:hover,.rw-number-picker .rw-select:active{box-shadow:none}.rw-calendar-popup{right:auto;min-width:0;width:18em}.rw-calendar{border-radius:4px;background-color:#fff;border:#ccc 1px solid;overflow:hidden}.rw-calendar.rw-popup{border-color:#ccc}.rw-calendar-now{font-weight:bold}.rw-calendar-btn-left,.rw-calendar-btn-right{width:12.5%}.rw-calendar-btn-view{width:75%}.rw-calendar-footer{border-top:1px solid #ccc}.rw-calendar-grid{outline:none;height:14.28571429em;table-layout:fixed;border-collapse:separate;border-spacing:0;width:100%;background-color:#fff}.rw-head-cell{text-align:center;border-bottom:1px solid #ccc;padding:.25em}.rw-cell{color:#333;border-radius:4px;cursor:pointer;line-height:normal;text-align:center;border:1px solid transparent;padding:.25em}.rw-cell:hover{background-color:#e6e6e6;border-color:#e6e6e6;color:#333}.rw-cell.rw-state-focus,.rw-cell.rw-state-focus:hover{background-color:transparent;border-color:#66afe9;color:#333}.rw-cell.rw-state-selected,.rw-cell.rw-state-selected:hover{background-color:#337ab7;border-color:#337ab7;color:white}.rw-cell.rw-state-disabled{color:#999;opacity:.7}.rw-cell.rw-state-disabled:hover{background:none;border-color:transparent}.rw-calendar-month .rw-cell{text-align:center}.rw-cell-off-range{color:#999}.rw-calendar-transition-group{position:relative}.rw-calendar-transition{transition:transform 300ms;overflow:hidden}.rw-calendar-transition-top{-ms-transform:translateY(-100%);transform:translateY(-100%)}.rw-calendar-transition-bottom{-ms-transform:translateY(100%);transform:translateY(100%)}.rw-calendar-transition-right{-ms-transform:translateX(-100%);transform:translateX(-100%)}.rw-calendar-transition-left{-ms-transform:translateX(100%);transform:translateX(100%)}.rw-calendar-transition-entering.rw-calendar-transition-top,.rw-calendar-transition-entered.rw-calendar-transition-top,.rw-calendar-transition-entering.rw-calendar-transition-bottom,.rw-calendar-transition-entered.rw-calendar-transition-bottom{-ms-transform:translateY(0);transform:translateY(0)}.rw-calendar-transition-entering.rw-calendar-transition-right,.rw-calendar-transition-entered.rw-calendar-transition-right,.rw-calendar-transition-entering.rw-calendar-transition-left,.rw-calendar-transition-entered.rw-calendar-transition-left{-ms-transform:translateX(0);transform:translateX(0)}.rw-calendar-transition-exiting.rw-calendar-transition-top{-ms-transform:translateY(100%);transform:translateY(100%)}.rw-calendar-transition-exiting.rw-calendar-transition-bottom{-ms-transform:translateY(-100%);transform:translateY(-100%)}.rw-calendar-transition-exiting.rw-calendar-transition-right{-ms-transform:translateX(100%);transform:translateX(100%)}.rw-calendar-transition-exiting.rw-calendar-transition-left{-ms-transform:translateX(-100%);transform:translateX(-100%)}.rw-select-list{overflow:auto;position:relative}.rw-select-list .rw-list{max-height:none;font-size:1em}.rw-select-list-label{display:block;position:relative;font-weight:normal;cursor:inherit;padding-left:20px;margin:0}.rw-rtl .rw-select-list-label{padding-left:0;padding-right:20px}input.rw-select-list-input{position:absolute;left:0;top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%);top:0.1em /9;margin:0;line-height:normal;cursor:inherit}.rw-rtl input.rw-select-list-input{left:auto;right:0}.rw-loading-mask{content:'';background:url(\"../img/loader-big.gif\") no-repeat center;position:absolute;background-color:#fff;border-radius:4px;opacity:.7;top:0;left:0;height:100%;width:100%}.rw-multiselect{cursor:text}.rw-multiselect .rw-input-reset{height:calc(2.429em - 2px);margin-top:-2px\\9;height:2.429em\\9;border-width:0;width:auto;max-width:100%;padding:0 .857em}.rw-multiselect .rw-select{vertical-align:middle}.rw-multiselect .rw-select,.rw-multiselect .rw-select:hover,.rw-multiselect .rw-select:active{box-shadow:none;background:none}.rw-multiselect-taglist{margin:0;padding:0;list-style:none;display:inline-block;vertical-align:0;outline:none}.rw-multiselect-tag{display:inline-table;color:inherit;padding:0 .35em 0 .35em;margin-left:calc(0.279335em - 1px);margin-top:.279335em;margin-top:calc(0.279335em - 1px);height:1.87033em;border-radius:3px;background-color:#eee;border:1px solid #ccc;cursor:default;vertical-align:top;text-align:center;overflow:hidden;max-width:100%}.rw-multiselect-tag>*{display:table-cell;vertical-align:middle;height:100%}.rw-rtl .rw-multiselect-tag{margin-left:0;margin-right:calc(0.279335em - 1px);padding:0 .35em 0 .35em}.rw-multiselect-tag.rw-state-focus,.rw-multiselect-tag.rw-state-focus:hover{background-color:transparent;border-color:#66afe9;color:#333}.rw-multiselect-tag.rw-state-readonly,.rw-multiselect-tag.rw-state-disabled,.rw-state-readonly .rw-multiselect-tag,.rw-state-disabled .rw-multiselect-tag,fieldset[disabled] .rw-multiselect-tag{cursor:not-allowed}.rw-multiselect-tag.rw-state-disabled,.rw-state-disabled .rw-multiselect-tag,fieldset[disabled] .rw-multiselect-tag{opacity:.65}fieldset[disabled] .rw-multiselect-tag{box-shadow:none;cursor:not-allowed}.rw-multiselect-tag-btn{color:inherit;margin-left:.25em}.rw-rtl .rw-multiselect-tag-btn{margin-left:0;margin-right:.25em}.rw-autocomplete .rw-select{position:absolute;display:block;width:auto;top:0;bottom:0;right:0}.rw-popup-container{position:absolute;z-index:1005;top:100%;left:-6px;right:-6px}.rw-popup-container.rw-dropup{top:auto;bottom:100%}.rw-state-focus .rw-popup-container{z-index:1006}.rw-popup-transition{width:100%;margin-bottom:6px;padding:0 6px}.rw-dropup>.rw-popup-transition{margin-bottom:0;margin-top:6px}.rw-popup{border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;box-shadow:0 5px 6px rgba(0,0,0,0.2);border:#ccc 1px solid;background:#fff}.rw-dropup .rw-popup{border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px;border-top-left-radius:3px;box-shadow:0 -2px 6px rgba(0,0,0,0.2)}.rw-popup-transition{transition:transform 200ms}.rw-popup-transition-entering{overflow:hidden}.rw-popup-transition-entering .rw-popup-transition{-ms-transform:translateY(0);transform:translateY(0);transition-timing-function:ease-out}.rw-popup-transition-exiting .rw-popup-transition{transition-timing-function:ease-in}.rw-popup-transition-exiting,.rw-popup-transition-exited{overflow:hidden}.rw-popup-transition-exiting .rw-popup-transition,.rw-popup-transition-exited .rw-popup-transition{-ms-transform:translateY(-100%);transform:translateY(-100%)}.rw-popup-transition-exiting.rw-dropup .rw-popup-transition,.rw-popup-transition-exited.rw-dropup .rw-popup-transition{-ms-transform:translateY(100%);transform:translateY(100%)}.rw-popup-transition-exited{display:none}.rw-state-disabled{box-shadow:none;cursor:not-allowed}","/*\n\nAtom One Light by Daniel Gamage\nOriginal One Light Syntax theme from https://github.com/atom/one-light-syntax\n\nbase: #fafafa\nmono-1: #383a42\nmono-2: #686b77\nmono-3: #a0a1a7\nhue-1: #0184bb\nhue-2: #4078f2\nhue-3: #a626a4\nhue-4: #50a14f\nhue-5: #e45649\nhue-5-2: #c91243\nhue-6: #986801\nhue-6-2: #c18401\n\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #383a42;\n background: #fafafa;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #a0a1a7;\n font-style: italic;\n}\n\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n color: #a626a4;\n}\n\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n color: #e45649;\n}\n\n.hljs-literal {\n color: #0184bb;\n}\n\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta-string {\n color: #50a14f;\n}\n\n.hljs-built_in,\n.hljs-class .hljs-title {\n color: #c18401;\n}\n\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n color: #986801;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n color: #4078f2;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n\n.hljs-link {\n text-decoration: underline;\n}\n"]} \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/main.913a54c0.chunk.css b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/main.913a54c0.chunk.css deleted file mode 100644 index 0a9af904..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/main.913a54c0.chunk.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:"FontAwesome";src:url(/admin/static/media/fontawesome-webfont.25a32416.eot);src:url(/admin/static/media/fontawesome-webfont.25a32416.eot) format("embedded-opentype"),url(/admin/static/media/fontawesome-webfont.e6cf7c6e.woff2) format("woff2"),url(/admin/static/media/fontawesome-webfont.c8ddf1e5.woff) format("woff"),url(/admin/static/media/fontawesome-webfont.1dc35d25.ttf) format("truetype"),url(/admin/static/media/fontawesome-webfont.d7c63908.svg) format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.accordion{position:relative;overflow-y:hidden;-webkit-transition:max-height .5s;transition:max-height .5s}.accordion .accordion-label{display:block;padding:15px 20px}.accordion .indicator{position:absolute;top:15px;right:20px}.accordion .counter{min-width:20px;padding:3px;font-size:12px;font-weight:700;text-align:center;border-radius:10px}.accordion .chevrons{font-size:14px}.accordion .chevrons i{margin:0}.sidebar{position:fixed;top:0;bottom:0;left:0;width:220px;overflow-y:auto;min-height:100%;background-color:#333}.sidebar .logo{display:block;height:60px;background:#222 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHsAAAAzCAYAAAC3zHd+AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUII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0hsoonZurVSlwUKBJ9qPfyl9FShXIU9XmC+h3fodtPw5BLxq7759T3F78e9Hw0X+H9m3yUVI+FE9AAAAAElFTkSuQmCC) no-repeat 50%;background-size:90px 40px}.sidebar .logo:hover{-webkit-filter:brightness(1.2);filter:brightness(1.2)}.sidebar .routes{padding:10px 0}.sidebar ul{padding:0;list-style:none}.sidebar ul li a{display:block;padding:15px 20px;font-size:17px;color:#beb9b1}.sidebar ul li a.active,.sidebar ul li a:hover{color:#f90}.sidebar ul li:hover{background-color:#3d3d3d}.sidebar .accordion li{background:#282828;border-top:1px solid #333;border-bottom:1px solid #181818}.sidebar .accordion li a{padding-left:40px}.sidebar .accordion .accordion-label{padding:15px 20px;font-size:17px;color:#beb9b1;cursor:pointer}.sidebar .accordion .accordion-label.active,.sidebar .accordion .accordion-label:hover{color:#f90;background-color:#3d3d3d}.sidebar .accordion .counter{color:#333;background:#beb9b1}.header{display:flex;align-items:center;justify-content:space-between;height:60px;background-color:#fff;padding:0 40px;border-bottom:1px solid #e9e9e9}.header .title{font-weight:400}.header .title a{color:#444}.header .title a:hover{color:#000}.header .version{color:#9ea1a3}.content-table table{width:100%;background-color:#f2f2f2;margin:.5em 0;border:1px solid #d2d2d2;border-radius:2px}.content-table thead{color:#fff;background-color:#333;border:1px solid #333}.content-table thead th{text-align:left;position:relative}.content-table thead th:first-child{border-top-left-radius:2px}.content-table thead th:last-child{border-top-right-radius:2px}.content-table tbody tr:hover{background-color:#f9f9f9}.content-table th{text-transform:uppercase;font-size:16px;padding:12px;text-shadow:0 -1px 0 rgba(0,0,0,.9);color:#ddd}.content-table th.th-actions{text-align:right;padding-right:20px}.content-table tbody td{height:63px;padding:15px .75em;vertical-align:middle;border-top:1px solid #d2d2d2}.content-table td.row-title strong a{font-size:18px;color:#444}.content-table td.row-title strong a:hover{color:#f90}.content-table td .row-actions{float:right}.content{padding:40px}.content .content-header{display:flex;align-items:center;margin:0 0 40px}.content .content-header h1{margin:0 40px 0 0;float:left;text-shadow:1px 1px 1px rgba(68,68,68,.21)}.content .content-header .page-buttons{display:flex}.content .content-header .page-buttons a{margin:0 5px}.content .single:focus{outline:none}.content .single .breadcrumbs,.content .single .breadcrumbs input{width:100%}.content .content-wrapper{display:flex}.content .content-wrapper .content-body{width:calc(100% - 240px)}.content .content-wrapper .content-body h1{margin:0 0 30px;font-size:40px}.content .content-wrapper .content-side{position:fixed;right:40px;width:200px;font-size:16px}.content .content-wrapper .content-side .delete-link{color:#cf3f3f;font-size:16px;display:inline-block;float:right;padding:10px 0}.content .content-wrapper .content-side .delete-link:hover{text-decoration:underline}.content .content-wrapper .content-side .side-link{text-align:center;border-radius:2px;width:100%;display:inline-block;padding:11px 2px;margin:10px 0;font-weight:300}.content .content-wrapper .content-side .side-link.options{color:#f90}.content .error-messages{margin-bottom:40px;padding:10px 15px;font-size:18px;color:#f44336;background-color:#feeae9}.content .error-messages div{padding:10px 0}.content .error-messages div:before{content:"\f071";font-family:"FontAwesome";margin-right:5px}.content .splitter{margin:15px 0;background:#d2d2d2;border:0}.content .tooltip{position:relative}.content .tooltip .tooltip-text{display:none;position:absolute;top:36px;right:-250px;width:300px;padding:10px;font-size:1rem;color:#fcfcfc;text-align:center;background:#727272;border-radius:2px;box-shadow:0 2px 8px 2px rgba(0,0,0,.08)}.content .tooltip .tooltip-text:after{content:"";position:absolute;bottom:100%;left:5%;border:9px solid transparent;border-bottom-color:#727272}.content .tooltip:hover .tooltip-text{display:block}.field{background-color:#fff;color:#555;outline:0;width:100%;height:2.286em;padding:.429em .857em;border:1px solid #e4e4e4;font-size:14px;border-radius:2px}.field:focus{border-color:#fc0}.field-label{width:100%;margin:0 0 10px;text-transform:uppercase;display:block}.input-path textarea,.input-title textarea{display:inline-block;margin:5px 0 30px;padding:0;width:100%;color:#757575;word-wrap:break-word;-webkit-font-smoothing:antialiased;overflow:hidden;resize:vertical;background:none;outline:none;border:0;border-bottom:1px solid #d2d2d2;box-shadow:none}.input-path textarea:focus,.input-title textarea:focus{color:#000!important;border-bottom:2px solid #fc0}.input-path textarea:hover,.input-title textarea:hover{color:#444}.input-title textarea{min-height:51px;font-size:42px}.input-path textarea{margin-top:10px;min-height:30px;font-size:20px}.input-path .tooltip i{margin:0 0 0 10px}.input-path .tooltip .tooltip-text:after{left:11%}.checkbox-container{display:flex;align-items:center;justify-content:space-between;text-transform:uppercase}.checkbox-container .switch{position:relative;display:inline-block;width:50px;height:30px;margin-left:20px}.checkbox-container .switch input{display:none}.checkbox-container .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:30px}.checkbox-container .slider:before{position:absolute;content:"";height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s;border-radius:50%}.checkbox-container input:checked+.slider{background-color:#f90}.checkbox-container input:focus+.slider{box-shadow:0 0 1px #f90}.checkbox-container input:checked+.slider:before{-webkit-transform:translateX(20px);transform:translateX(20px)}.datafile-path{margin-bottom:8px}.datafile-path fieldset{display:inline-block;margin:0 4px;padding:0;border-color:transparent}.datafile-path fieldset.filename{width:84%}.datafile-path fieldset.file-type{width:15%}.datafile-path fieldset:first-of-type{margin-left:0}.datafile-path fieldset:last-of-type{margin-right:0}.datafile-path legend{margin-bottom:8px;font-weight:700}.datafile-path input,.datafile-path select{min-height:46px;padding:11px 10px;width:100%;color:#fff;background-color:#2b2b2b;border:1px solid transparent;border-radius:2px}.datafile-path input:disabled{background-color:#4d4d4d}.datafile-path input:focus{outline:none;border-color:#f90}.datafile-path input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #2b2b2b inset;-webkit-text-fill-color:#fff}.datafile-path select{font-size:15px;color:#ddd;cursor:pointer;-webkit-appearance:none;-moz-appearance:none}.datafile-path select:focus{outline:none;border-color:#f90}.datafile-path select option{min-height:21px}.datafile-path select option:hover{background-color:#f90}.datafile-path .file-type legend{position:relative}.datafile-path .file-type legend:after{content:"\25BC";position:absolute;top:28px;right:-54px;padding:12px 9px;color:#bbb;vertical-align:middle;pointer-events:none;border-left:1px solid #454545}.metafields{margin-bottom:40px}.metafield{position:relative;zoom:1}.metafield .field{font-size:16px;line-height:1.5;min-height:42px;border:1px solid #d2d2d2;border-radius:2px;-webkit-transition:color .25s ease;transition:color .25s ease}.metafield .field:focus{border-color:#f90}.metafield .meta-key .key-field{margin:0 0 15px;padding:8px 10px;max-width:190px;font-weight:700}.metafield .meta-key .key-field:focus,.metafield .meta-key .key-field:hover{color:#000!important}.metafield .meta-key.simple{float:left}.metafield .meta-key.simple+.meta-value>.value-field{margin-left:15px;width:calc(100% - 240px)}.metafield .meta-value .value-field{margin-bottom:10px;padding:8px 10px;width:100%;height:auto;max-height:500px;overflow:hidden;vertical-align:bottom;word-wrap:break-word;resize:vertical}.metafield .meta-value:after{display:table;clear:both;content:""}.metafield .meta-value>.imagepicker{float:right;position:relative;right:36px;width:calc(100% - 227px)}.metafield .meta-value>.imagepicker .images-wrapper{position:absolute;top:0;right:0;height:42px;pointer-events:auto}.metafield .meta-value>.imagepicker .images-wrapper button{display:inline-block;min-width:46px;height:100%;margin:0;padding:0 3px 0 0;color:#818181;line-height:2.286em;text-align:center;vertical-align:middle;white-space:nowrap;background:#fff;background-image:none;border:1px solid #d2d2d2;border-radius:2px;outline:none}.metafield .meta-value>.imagepicker .images-wrapper button:hover{color:#2b2b2b;background:#f90}.metafield .meta-value>.imagepicker .images-wrapper button i{margin:0}.metafield .meta-value-array{position:relative;margin-right:auto;margin-bottom:15px;margin-left:36px;padding:8px 20px 12px 15px;pointer-events:auto;border:1px solid #d2d2d2;border-radius:2px}.metafield .meta-value-array .array-item-wrap,.metafield .meta-value-array .array-item-wrap .array-header{margin-bottom:5px}.metafield .meta-value-array .array-item-wrap .array-header .array-field-num{display:inline-block;color:#fc0;line-height:27px;margin-right:5px}.metafield .meta-value-array .array-item-wrap .array-header .meta-buttons{display:inline-block;position:static}.metafield .meta-value-array .array-item-wrap .meta-value-object>.object-item-wrap{margin-left:0;padding:0}.metafield .meta-value-array .add-field-array{position:absolute;bottom:-13px;left:50%;margin-left:-13px;width:26px;height:26px;font-size:16px;line-height:26px;text-align:center;color:#fff;background:#f90;border-radius:50%}.metafield .meta-value-array .add-field-array i{margin:0}.metafield .meta-value-object{margin-left:36px}.metafield .meta-value-object .object-item-wrap{position:relative;min-height:50px}.metafield .meta-value-object .object-item-wrap .object-key{position:relative;width:190px;max-width:200px;margin-bottom:15px;pointer-events:auto}.metafield .meta-value-object .object-item-wrap .object-key input{width:100%;padding:8px 55px 8px 10px}.metafield .meta-value-object .object-item-wrap .object-key .meta-buttons{position:absolute;top:50%;right:5px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.metafield .meta-value-object .object-item-wrap .object-key.simple{float:left;pointer-events:auto}.metafield .meta-value-object .object-item-wrap .object-key.simple+.object-value .meta-value>.value-field{width:calc(100% - 205px);margin-left:15px;pointer-events:auto}.metafield .meta-value-object .object-item-wrap .object-value{position:relative;pointer-events:none;-webkit-transition:padding .25s ease;transition:padding .25s ease}.metafield .meta-value-object .object-item-wrap .object-value>.object-item-wrap{margin-left:50px;padding:0}.metafield .meta-value-object .object-item-wrap .object-value>.object-item-wrap .object-key{position:relative}.metafield .meta-value-object .object-item-wrap .object-value>.object-item-wrap .object-value .object-item-wrap{margin-left:50px}.metafield .meta-value-object .add-field-object{display:inline-block;margin-bottom:15px;padding:5px 0;pointer-events:auto}.metafield .meta-value-object .add-field-object:hover{text-decoration:underline}.metafield .meta-buttons{position:absolute;top:8px;right:0}.metafield .meta-buttons span.move{color:#9ea1a3;cursor:move}.metafield .meta-buttons span.move:focus,.metafield .meta-buttons span.move:hover{color:#f90}.metafield .meta-buttons .dropdown{position:relative;cursor:pointer}.metafield .meta-buttons .dropdown.showing-dropdown .dropdown-wrap{display:block}.metafield .meta-buttons .dropdown .meta-button{display:inline-block;width:23px;height:23px;padding:2px 0;font-size:13px;color:#9ea1a3;text-align:center;outline:none;border:1px solid #b8b8b8;border-radius:50%}.metafield .meta-buttons .dropdown .meta-button:focus,.metafield .meta-buttons .dropdown .meta-button:hover{color:#fff;background:#f90;border-color:#f90}.metafield .meta-buttons .dropdown .meta-button i{margin:2px 0 0}.metafield .meta-buttons .dropdown .dropdown-wrap{display:none;position:absolute;top:35px;left:50%;width:185px;background:#fff;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:30;border:1px solid #d4d7d9;border-radius:2px}.metafield .meta-buttons .dropdown .dropdown-wrap:before{position:absolute;top:-10px;left:50%;width:0;height:0;margin-left:-10px;content:"";border-color:transparent transparent #d4d7d9;border-style:solid;border-width:0 10px 10px}.metafield .meta-buttons .dropdown .dropdown-wrap span{display:block;padding:15px 0 15px 15px;border-bottom:1px solid #d4d7d9;outline:0}.metafield .meta-buttons .dropdown .dropdown-wrap span i{padding-right:8px}.metafield .meta-buttons .dropdown .dropdown-wrap span:hover{color:#fff;background:#f90;border-color:#f90}.metafield .meta-buttons .dropdown .dropdown-wrap .remove-field{color:#f44336}.metafield .meta-buttons .dropdown .dropdown-wrap .remove-field:hover{background:#f44336}.metafield .meta-buttons .dropdown .dropdown-wrap .remove-field:hover i{color:#fff}.metafield .object-key .key-field{font-weight:700}.metafield .object-key .key-field:focus,.metafield .object-key .key-field:hover{color:#000!important}.metafield>.meta-value-object>.object-item-wrap>.object-value>.meta-value>.imagepicker{width:calc(100% - 206px);right:0;pointer-events:auto}.metafield>.meta-value-object>.object-item-wrap>.object-value>.meta-value>.imagepicker .value-field{width:calc(100% - 48px)}.metafield>.meta-value-object>.object-item-wrap>.object-value>.meta-value>.date-field{width:calc(100% - 206px);right:0}.metafield>.meta-value>.imagepicker{float:right;position:relative;right:36px;width:calc(100% - 227px)}.metafield>.meta-value>.imagepicker .value-field{width:calc(100% - 63px);margin-left:15px}.metafield .array>.meta-value{margin-left:15px}.metafield .array>.meta-value .imagepicker{right:0;width:100%}.metafield .array>.meta-value .imagepicker .value-field{width:calc(100% - 48px)}.metafield .array>.meta-value .date-field{right:0;width:100%}.metafield .array>.meta-value-object{margin-left:15px}.metafield .array .object-value .imagepicker{right:0;width:calc(100% - 190px);pointer-events:auto}.metafield .array .object-value .imagepicker .value-field{width:calc(100% - 63px);margin-left:15px}.metafield .array .object-value .date-field{right:0;width:calc(100% - 204px)}.meta-new{font-size:20px}.meta-new i{padding-right:8px}.sortable-chosen,.sortable-chosen.sortable-ghost{border:2px dashed #f90!important}.sortable-chosen.sortable-ghost div,.sortable-chosen div{opacity:0}.date-field,.layout-field,.widget-field{float:right;right:34px;width:calc(100% - 240px);pointer-events:auto;background:#d2d2d2;border-radius:2px}.date-field .rw-input,.layout-field .rw-input,.widget-field .rw-input{padding:2px 10px;min-height:40px;box-shadow:none}.date-field.rw-widget{border-color:transparent}.date-field input{width:calc(100% + 1px)!important}.date-field .rw-input{border-radius:0}.layout-field{min-height:42px;background-color:#fff!important;border:1px solid #d2d2d2;box-shadow:none}.layout-field.rw-state-focus{background-color:#fff;box-shadow:none!important;border-color:#d2d2d2!important}.layout-field.rw-state-focus:active,.layout-field.rw-state-focus:hover{box-shadow:none}.layout-field .rw-widget-container{border:none}.layout-field .rw-btn-select{margin-top:1px}.rw-popup{padding:10px;color:#818181;background:#fff;border-color:#d2d2d2}.rw-datetime-picker{box-shadow:none!important;font-size:16px!important}.rw-datetime-picker .rw-select-bordered{border-left:1px solid #d2d2d2}.rw-datetime-picker .rw-select-bordered:hover{background:none}.rw-datetime-picker .rw-select-bordered:active{background:#f90;box-shadow:none}.rw-datetime-picker .rw-select-bordered:active .rw-btn{color:#222}.rw-datetime-picker .rw-btn{min-height:42px;margin-top:-3px;color:#818181;background:#fff}.rw-datetime-picker .rw-btn:hover{color:#222;background:#f90}.rw-datetime-picker .rw-btn i{margin:0}.rw-datetime-picker .rw-select .rw-btn{min-width:42px;border-left:1px solid #d2d2d2}.rw-datetime-picker:hover{border-color:#d2d2d2}.rw-calendar-popup{left:auto!important;width:330px!important}.rw-calendar{color:#999;background:#fff}.rw-calendar .rw-header{padding-bottom:15px}.rw-calendar .rw-header .rw-btn-view{width:188px;background:transparent;border-radius:0}.rw-calendar .rw-header .rw-btn-view:hover{color:#222;background:#f90}.rw-calendar .rw-header .rw-btn-view:focus{outline:none}.rw-calendar thead>tr{border-bottom:1px solid #454545}.rw-calendar .rw-calendar-footer .rw-btn-primary{margin-top:0}.rw-calendar-grid.rw-nav-view .rw-btn{padding:0}.rw-cell{line-height:1.75}.rw-calendar-grid th{padding-top:10px;padding-bottom:10px;text-align:center}.rw-calendar-grid td .rw-btn{border-radius:0}.rw-calendar-grid td .rw-btn.rw-off-range{color:#727272}.rw-state-focus{color:#2b2b2b!important;background:#f90;border:1px solid #f90}.rw-state-focus:hover{border-color:#f90!important}.rw-list{max-height:329px!important}.rw-list .rw-list-option{padding:8px 5px;border-radius:0}.rw-list .rw-list-option:hover{color:#333!important;background:#e6e6e6!important;border-color:transparent!important}.rw-list .rw-list-option:focus{outline:none}.rw-list .rw-list-option.rw-state-focus{color:#222!important;background-color:#f90!important;border-color:transparent!important}.rw-select-bordered{background:none}.rw-widget-picker{background:none;border-collapse:collapse;border:1px solid #d2d2d2}.rw-widget-container{border-radius:2px}.rw-state-focus>.rw-widget-container,.rw-state-focus>.rw-widget-container:hover,.rw-widget-container.rw-state-focus,.rw-widget-container.rw-state-focus:hover{border:none;box-shadow:none}.rw-btn-select{opacity:1}.rw-calendar-popup,.rw-popup-container{top:104%}.rw-cell.rw-state-selected,.rw-cell.rw-state-selected:hover{background:#f90;border:none}.tags-wrap{display:inline-block}.tags-list{padding-bottom:11px;border-bottom:1px solid #dfdfdf}.tags-list+.tags-input{padding-top:11px;border-top:1px solid #fff}.tag{display:inline-block;margin-right:5px;padding:1px 5px;font-size:15px;font-weight:900;color:#212121;background:#ffd699;border-radius:4px}.tag .delete-tag:after{margin-left:4px;content:"\f057";font-family:FontAwesome;color:#cc8f33;cursor:pointer}.tags-input{display:flex}.tags-input input{width:100%;height:24px;background-color:#f8f8f8;border:none}.tags-input input:focus{outline:none}.tag-suggestions{display:none;margin:8px 0 4px;padding:0;border-radius:0;z-index:3;-webkit-transition:.5s;transition:.5s}.tag-suggestions ul{display:table;padding:0}.tag-suggestions ul li{float:left;margin:5px 2px;padding:5px 8px;list-style:none;font-weight:700;cursor:pointer;border-radius:4px;border:1px solid #dfdfdf}.tag-suggestions ul li:hover{color:#fff;background-color:#f90;border-color:#f90}.tag-suggestions.visible{display:block}.close-suggestions{float:right;padding:3px 6px;font-size:.875em;border-radius:4px;border:1px solid #dfdfdf;cursor:pointer}.close-suggestions:hover{background-color:#f8f8f8}.meta-error{display:inline-block;margin-left:15px;padding:3px 0;width:calc(100% - 240px);height:42px;font-size:14px;color:#f44336}.meta-error strong{margin:0 5px}.meta-error span{margin:0 5px 0 0;padding-bottom:1px;font-weight:700;cursor:pointer;border-bottom:1px solid}.default-field input:disabled,.default-field textarea:disabled{color:grey;border-color:#dfdfdf!important;background-color:#f3f3f3}.default-field input:disabled:hover,.default-field textarea:disabled:hover{color:grey!important}.default-field .array-header{margin:8px 15px}.default-field .array-field-num{color:grey}.default-field .meta-value-array{margin:0;padding:0;border:none}.default-field .array{display:flex}.default-field .array .meta-value,.default-field .array .meta-value-array,.default-field .array .meta-value-object{flex-grow:1;margin:0}.default-field .meta-key.simple+.meta-value>.value-field{width:calc(100% - 240px)}.datafields{margin-bottom:40px;padding:30px;background:#222;border-radius:2px}.datafields .metafield .field{background:#2b2b2b;border:1px solid transparent}.datafields .metafield .field:focus{border-color:#f90}.datafields .metafield .meta-key,.datafields .metafield .meta-key .key-field{color:#eb2659}.datafields .metafield .meta-key .key-field:focus{color:#eaeaea!important}.datafields .metafield .meta-value .value-field{color:#eaeaea}.datafields .metafield .meta-value>.imagepicker .images-wrapper button{background:#2b2b2b;border:none}.datafields .metafield .meta-value>.imagepicker .images-wrapper button:focus,.datafields .metafield .meta-value>.imagepicker .images-wrapper button:hover{color:#2b2b2b;background:#f90}.datafields .metafield .meta-value-array{border:1px solid #383838}.datafields .metafield .meta-value-object{margin-bottom:15px}.datafields .metafield .meta-value-object .object-item-wrap .object-value>.object-item-wrap{margin-left:50px;padding:0}.datafields .metafield .meta-value-object .object-item-wrap .object-value>.object-item-wrap .object-key{position:relative}.datafields .metafield .meta-value-object .object-item-wrap .object-value>.object-item-wrap .object-value .object-item-wrap{margin-left:50px}.datafields .metafield .meta-buttons .dropdown .meta-button{color:#575757;border-color:#575757}.datafields .metafield .meta-buttons .dropdown .meta-button:focus,.datafields .metafield .meta-buttons .dropdown .meta-button:hover{color:#333;border-color:#f90}.datafields .metafield .meta-buttons .dropdown .dropdown-wrap{color:#ddd;background:#353535;border:1px solid #323232}.datafields .metafield .meta-buttons .dropdown .dropdown-wrap:before{border-color:transparent transparent #353535}.datafields .metafield .meta-buttons .dropdown .dropdown-wrap span{border-bottom:1px solid #272727}.datafields .metafield .meta-buttons .dropdown .dropdown-wrap span:hover{color:#fff;background:#f90;border-color:#f90}.datafields .metafield .meta-buttons .dropdown .dropdown-wrap .remove-field:hover{background:#f44336}.datafields .metafield .meta-buttons .dropdown .dropdown-wrap .remove-field:hover i{color:#fff}.datafields .metafield .object-key .key-field{color:#eb2659}.datafields .metafield .object-key .key-field:focus{color:#eaeaea!important}.datafields .date-field{background:#222;outline:none}.datafields .date-field.rw-widget{border-color:transparent;background:inherit}.datafields .date-field.rw-widget .rw-input{border-radius:0}.datafields .date-field input{color:#fff;background:#2b2b2b}.datafields .rw-popup{background:#2b2b2b;border-color:#222}.datafields .rw-datetime-picker .rw-btn{background:#2b2b2b}.datafields .rw-datetime-picker .rw-btn:hover{color:#222;background:#f90}.datafields .rw-datetime-picker .rw-select .rw-btn{min-width:48px;border-left:2px solid #222;border-radius:2px}.datafields .rw-datetime-picker .rw-select-bordered{border-left-color:#222}.datafields .rw-calendar{color:#999;background:#2b2b2b}.datafields .rw-calendar .rw-calendar-row,.datafields .rw-calendar .rw-head-cell{background:#2b2b2b}.datafields .rw-calendar .rw-head-cell{border-bottom-color:#4d4d4d}.datafields .rw-calendar .rw-cell{line-height:2;color:#999;border-radius:0}.datafields .rw-calendar .rw-cell:hover{color:#cdcdcd;background:#454545;border-color:transparent}.datafields .rw-calendar .rw-cell-off-range{color:#575757}.datafields .rw-calendar .rw-calendar-footer{border-top-color:#4d4d4d}.datafields .rw-list .rw-list-option{color:#727272}.datafields .rw-list .rw-list-option:hover{color:#cdcdcd!important;background:#454545!important}.datafields .rw-state-focus{color:#2b2b2b!important;background:#f90!important;border:1px solid #f90}.datafields .data-new{margin-top:25px}.breadcrumbs{margin:0 30px 0 0;padding:0;list-style:none}.breadcrumbs li{float:left}.breadcrumbs li:not(:last-child):after{content:"/";padding:0 8px;font-size:30px}.breadcrumbs li a{color:#444;font-size:30px}.breadcrumbs li a:hover{color:#f90}.config-editor{border:1px solid #d2d2d2;border-radius:2px;outline:none;font-size:14px}.config-editor+.statusbar{padding:12px 0;font-size:12px;color:#959694;text-align:right;border-bottom:1px solid #d2d2d2}.ace_focus{border-color:#fc0}.CodeMirror{position:relative;color:#454545;height:auto;padding:10px;font:inherit;z-index:1;background:#fff;border:1px solid #d2d2d2;border-bottom-left-radius:2px;border-bottom-right-radius:2px;overflow:hidden}.CodeMirror pre{margin:0;padding:0 4px;position:relative;font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;border-radius:0;border:none;z-index:2;overflow:visible;-webkit-tap-highlight-color:transparent}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code{outline:0}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-comment{font-family:Consolas,monospace;font-size:14px}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-code .cm-header-1,.CodeMirror .CodeMirror-code .cm-header-2,.CodeMirror .CodeMirror-code .cm-header-3,.CodeMirror .CodeMirror-code .cm-header-4,.CodeMirror .CodeMirror-code .cm-header-5,.CodeMirror .CodeMirror-code .cm-header-6{display:inline-block;margin:20px 0 10px}.CodeMirror .CodeMirror-code .cm-header-1{font-size:180%;line-height:150%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:150%;line-height:150%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}.CodeMirror-lines{padding:4px 0}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #d2d2d2;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{position:absolute;width:0;border-left:1px solid #000;border-right:none}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-attribute,.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror,.CodeMirror-scroll{min-height:300px}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection{background:#d7d4f0}.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection{background:#d7d4f0}.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:9}.CodeMirror-sided{width:50%!important}.editor-wrapper input.title:focus,.editor-wrapper input.title:hover{opacity:.8}.editor-toolbar{position:relative;padding:0 10px;border-top:1px solid #d2d2d2;border-left:1px solid #d2d2d2;border-right:1px solid #d2d2d2;border-top-left-radius:2px;border-top-right-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editor-toolbar:after,.editor-toolbar:before{display:block;content:" ";height:1px}.editor-toolbar:before{margin-bottom:8px}.editor-toolbar:after{margin-top:8px}.editor-toolbar.fullscreen{position:fixed;top:0;left:0;padding-top:10px;padding-bottom:10px;width:100%;height:50px;white-space:nowrap;box-sizing:border-box;background:#fff;border:0;opacity:1;overflow-x:auto;overflow-y:hidden;z-index:9}.editor-toolbar.fullscreen:after,.editor-toolbar.fullscreen:before{position:fixed;top:0;margin:0;padding:0;width:20px;height:50px;background:#fff}.editor-toolbar.fullscreen:before{left:0}.editor-toolbar.fullscreen:after{right:0}.editor-toolbar a{display:inline-block;margin:0;width:30px;height:30px;text-align:center;text-decoration:none!important;color:#2c3e50;cursor:pointer;text-shadow:inherit;border:1px solid transparent;border-radius:3px;opacity:.6}.editor-toolbar a.active,.editor-toolbar a:hover{background:#fff;border-color:#95a5a6;opacity:1}.editor-toolbar a:focus{outline:none}.editor-toolbar a:before{line-height:30px}.editor-toolbar i.separator{display:inline-block;margin:0 6px;width:0;color:transparent;text-indent:-10px;border-left:1px solid #d9d9d9;border-right:1px solid #fff}.editor-toolbar a.fa-header-x:after{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar a.fa-header-1:after{content:"1"}.editor-toolbar a.fa-header-2:after{content:"2"}.editor-toolbar a.fa-header-3:after{content:"3"}.editor-toolbar a.fa-header-bigger:after{content:"▲"}.editor-toolbar a.fa-header-smaller:after{content:"▼"}.editor-toolbar.disabled-for-preview{opacity:1}.editor-toolbar.disabled-for-preview a:not(.no-disable){color:#bbb;text-shadow:inherit;pointer-events:none;border-color:transparent}@media only screen and (max-width:700px){.editor-toolbar a.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-statusbar .lines:before{content:"lines: "}.editor-statusbar .words:before{content:"words: "}.editor-statusbar .characters:before{content:"characters: "}.editor-preview,.editor-preview-side{display:none;padding:10px 14px;overflow:auto;background:#fcfcfc;box-sizing:border-box}.editor-preview-side>p,.editor-preview>p{margin:1.5em 0 1em}.editor-preview-side h1,.editor-preview-side h2,.editor-preview-side h3,.editor-preview-side h4,.editor-preview-side h5,.editor-preview-side h6,.editor-preview h1,.editor-preview h2,.editor-preview h3,.editor-preview h4,.editor-preview h5,.editor-preview h6{margin:20px 0 10px!important;font-weight:700!important}.editor-preview-side h1,.editor-preview h1{font-size:180%!important;line-height:150%}.editor-preview-side h2,.editor-preview h2{font-size:150%;line-height:150%}.editor-preview-side h3,.editor-preview h3{font-size:125%;line-height:125%}.editor-preview-side h4,.editor-preview h4{font-size:110%;line-height:110%}.editor-preview-side h5,.editor-preview-side h6,.editor-preview h5,.editor-preview h6{font-size:inherit}.editor-preview-side code,.editor-preview-side pre,.editor-preview code,.editor-preview pre{background:#f7f7f7;border:1px solid #eee}.editor-preview-side pre,.editor-preview pre{margin-bottom:10px;padding:10px}.editor-preview-side pre code,.editor-preview pre code{padding:0;color:inherit;background:transparent;border:none}.editor-preview-side code,.editor-preview code{padding:2px 4px;color:#e91e63;border-radius:4px}.editor-preview-side table td,.editor-preview-side table th,.editor-preview table td,.editor-preview table th{padding:5px;border:1px solid #d2d2d2}.editor-preview-side hr,.editor-preview hr{margin:20px 0;border:1px solid #eee}.editor-preview-side blockquote,.editor-preview blockquote{padding:0 1em;margin:0 0 20px;font-size:17.5px;border-left:5px solid #d2d2d2}.editor-preview-side blockquote p,.editor-preview blockquote p{margin:0 0 10px}.editor-preview{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7}.editor-preview-side{position:fixed;top:50px;right:0;bottom:0;width:50%;z-index:9;border:1px solid #d2d2d2}.editor-preview-active,.editor-preview-active-side{display:block}.CodeMirror-focused{border-color:#f90}.cm-formatting-code+.cm-comment{color:#e91e63}.cm-formatting-code+.cm-formatting-code.cm-comment{color:inherit}.btn{color:#fafafa;font-weight:700;text-decoration:none;display:inline-block;font-size:14px;margin:0;padding:12px 20px;white-space:nowrap;text-shadow:1px 1px 1px rgba(68,68,68,.2);outline:none;border:none;border-radius:4px;-webkit-appearance:none;cursor:pointer;opacity:1;background-color:#9ea1a3;box-shadow:0 1px 0 #828282}.btn:hover{background-color:#abaeaf}.btn i{margin-right:4px}.btn-fat{margin:10px 0;width:100%;text-align:center}.btn-thin{padding:8px;margin:0 5px}.btn-active{cursor:pointer;opacity:1;background-color:#ff6e00;box-shadow:0 1px 0 #dd5c00}.btn-active:hover{background-color:#ff7d1a}.btn-inactive{cursor:default!important;opacity:.5!important;box-shadow:0 1px 0 #828282!important}.btn-inactive,.btn-inactive:hover{background-color:#9ea1a3!important}.btn-success{cursor:pointer;opacity:1;background-color:#8dcf3f;box-shadow:0 1px 0 #6ba329}.btn-success:hover{background-color:#99d453;background-color:#99d453!important;box-shadow:0 1px 0 #6ba329}.btn-delete{cursor:pointer;opacity:1;background-color:#9ea1a3;box-shadow:0 1px 0 #828282;-webkit-transition:background .3s;transition:background .3s}.btn-delete:hover{background-color:#abaeaf;cursor:pointer;opacity:1;background-color:#f44336;box-shadow:0 1px 0 #bc0000}.btn-delete:hover:hover{background-color:#f55a4e}.btn-view{cursor:pointer;opacity:1;background-color:#9ea1a3;box-shadow:0 1px 0 #828282;-webkit-transition:background .3s;transition:background .3s}.btn-view:hover{background-color:#abaeaf;cursor:pointer;opacity:1;background-color:#ff6e00;box-shadow:0 1px 0 #dd5c00}.btn-view:hover:hover{background-color:#ff7d1a}.multiple .btn{margin:0 5px}.dropzone{text-align:center;padding:20px;color:#9098a3;background-color:#fafafa;border:2px dashed #e9e9e9;border-radius:2px;position:relative}.dropzone .preview-info{padding:40px}.dropzone .preview-info i{display:inline;font-size:96px}.dropzone .preview-info p{font-size:20px}.dropzone-active{background-color:#f90;color:#fff}.static-list{padding:25px;background-color:#fcfcfc;border:1px solid #e9e9e9}.preview-container{display:flex;flex-wrap:wrap}.preview-container .file-preview{display:flex;flex-direction:column;border:1px solid #f0f0f0;background-color:#fff;margin:10px 7px;position:relative;border-radius:2px}.preview-container .file-preview:hover .delete{opacity:1}.preview-container .file-preview a{height:150px}.preview-container .file-preview div{display:table;width:150px;height:150px;text-align:center}.preview-container .file-preview div i{display:table-cell;color:#ccc;font-size:64px;vertical-align:middle}.preview-container .file-preview span.theme-indicator{position:absolute;bottom:40px;left:0;width:32px;height:32px;text-align:left;background:#f44336}.preview-container .file-preview span.theme-indicator i{margin:0;padding:8px 7px 7px;color:#fff;font-size:16px}.preview-container .file-preview span.filename{padding:5px;font-size:14px;line-height:2;text-align:center;width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}.preview-container .file-preview img{user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;-ms-user-select:none;object-fit:contain;width:150px;height:150px}.preview-container .file-preview .delete{padding-bottom:4px;position:absolute;top:10px;right:10px;width:26px;height:26px;border-radius:50%;text-align:center;font-size:18px;color:#fff;opacity:0;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;background:#cf3f3f;border:none}.preview-container .splitter{margin-top:25px;opacity:.5}.preview-container .preview-tip{margin-bottom:-5px;width:100%}.preview-info{padding:20px;text-align:center;color:#454545}.preview-info i{display:inline;font-size:96px;margin:0}.preview-info h2,.preview-info h4{margin:0;line-height:1.5}.btn-upload{font-size:24px}.btn-upload i{margin-right:10px}*,:after,:before{box-sizing:border-box}body{color:#444;font-family:lato,Helvetica,Helvetica Neue;background-color:#f8f8f8}h1,h2,h3,h4,h5{font-weight:400}ul{margin:0}a{color:#f90}a,a:hover{text-decoration:none}a:hover{cursor:pointer}i{display:inline-block;width:15px;margin-right:10px}b{color:#fc0}div:focus{outline:none}.wrapper{height:100%}.wrapper:focus{outline:none}.container{margin-left:220px}.splitter{height:1px;width:100%;margin:3px 0;border-bottom:1px solid #424242;border-top:1px solid #212121}.hidden{display:none!important}.warning{margin-bottom:10px;padding:10px;color:#8a6e00;text-align:center;background-color:#fff5cc;border:1px solid rgba(138,110,0,.18)}.pull-right{margin-left:auto}.notfound{text-align:center}.notfound img{margin:40px 0}@font-face{font-family:"lato";src:url(/admin/static/media/lato-regular.059514c9.ttf)}@font-face{font-family:"lato";src:url(/admin/static/media/lato-bold.55131026.ttf);font-weight:700} -/*# sourceMappingURL=main.913a54c0.chunk.css.map */ \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/main.913a54c0.chunk.css.map b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/main.913a54c0.chunk.css.map deleted file mode 100644 index a579dbb8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/css/main.913a54c0.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vendors/font-awesome/font-awesome.scss","main.scss","vendors/font-awesome/_path.scss","vendors/font-awesome/_core.scss","vendors/font-awesome/_larger.scss","vendors/font-awesome/_fixed-width.scss","vendors/font-awesome/_list.scss","vendors/font-awesome/_variables.scss","vendors/font-awesome/_bordered-pulled.scss","vendors/font-awesome/_animated.scss","vendors/font-awesome/_mixins.scss","vendors/font-awesome/_rotated-flipped.scss","vendors/font-awesome/_stacked.scss","vendors/font-awesome/_icons.scss","normalize.scss","mixins.scss","metafields.scss","variables.scss","datagui.scss","breadcrumbs.scss","editor.scss","mdeditor.scss","button.scss","staticfiles.scss"],"names":[],"mappings":"AAAA;;;ECGE,CCAF,WACE,yBAA0B,CAC1B,6DACA,CAAA,oYCAA,CAAA,eACA,CAAA,iBACA,CAAA,IAAA,oBAAA,CAAA,4CAGD,CAAA,iBCNC,CAAA,mBACA,CAAA,kCAGsB,CAAA,iCACkB,CAAA,OAClB,mBACA,CAAA,iBAAkB,CCTxC,mBACA,CAAA,OAAA,aACD,CCDC,OAAA,aACA,CAAA,OAAA,aACA,CAAA,OAAA,aAHF,CAAA,OAIS,eAAkB,CAAI,iBAG7B,CAAA,OACA,cAAA,CCD+B,qBDG/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CAAA,kCAAA,QAAA,CAAA,eAAA,CAAA,YAAA,cAAA,CAAA,cAAA,iBAAA,CAAA,iBAAA,qBAAA,CAAA,KAAA,UAAA,CAAA,yCAAA,CAAA,wBAAA,CAAA,eAAA,eAAA,CAAA,GAAA,QAAA,CAAA,EAAA,UAAA,CAAA,UAAA,oBAAA,CAAA,QAAA,cAAA,CAAA,EAAA,oBAAA,CAAA,UAAA,CAAA,iBAAA,CAAA,EAAA,UAAA,CAAA,UAAA,YAAA,CAAA,SAAA,WAAA,CAAA,eAAA,YAAA,CAAA,WAAA,iBAAA,CAAA,UAAA,UAAA,CAAA,UAAA,CAAA,YAAA,CAAA,+BAAA,CAAA,4BAAA,CAAA,QAAA,sBAAA,CAAA,SAAA,kBAAA,CAAA,YAAA,CAAA,aAAA,CAAA,iBAAA,CAAA,wBAAA,CAAA,oCAAA,CAAA,YAAA,gBAAA,CAAA,UAAA,iBAAA,CAAA,cAAA,aAAA,CAAA,WAAA,kBAAA,CAAA,sDAAA,CAAA,WAAA,kBAAA,CAAA,mDAAA,CAAA,eAAA","file":"main.913a54c0.chunk.css","sourcesContent":["/*!\n * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome\n * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */\n\n@import \"variables\";\n@import \"mixins\";\n@import \"path\";\n@import \"core\";\n@import \"larger\";\n@import \"fixed-width\";\n@import \"list\";\n@import \"bordered-pulled\";\n@import \"animated\";\n@import \"rotated-flipped\";\n@import \"stacked\";\n@import \"icons\";\n@import \"screen-reader\";\n","@import \"vendors/font-awesome/font-awesome\";\n@import \"normalize\";\n@import \"variables\";\n@import \"mixins\";\n@import \"accordion\";\n@import \"sidebar\";\n@import \"header\";\n@import \"content\";\n@import \"form\";\n@import \"metafields\";\n@import \"datagui\";\n@import \"breadcrumbs\";\n@import \"editor\";\n@import \"mdeditor\";\n@import \"button\";\n@import \"staticfiles\";\n\n*, *:before, *:after {\n box-sizing: border-box;\n}\n\nbody {\n color: #444;\n font-family: lato, Helvetica, Helvetica Neue;\n background-color: $background-color;\n}\n\nh1,h2,h3,h4,h5 {\n font-weight: normal;\n}\n\nul {\n margin: 0;\n}\n\na {\n color: $dark-orange;\n text-decoration: none;\n}\n\na:hover {\n text-decoration: none;\n cursor: pointer;\n}\n\ni {\n display: inline-block;\n width: 15px;\n margin-right: 10px;\n}\n\nb {\n color: $orange;\n}\n\ndiv:focus {\n outline: none;\n}\n\n.wrapper {\n height: 100%;\n\n &:focus {\n outline: none;\n }\n}\n\n.container {\n margin-left: $sidebar-width;\n}\n\n.splitter {\n height: 1px;\n width: 100%;\n margin: 3px 0;\n border-bottom: 1px solid #424242;\n border-top: 1px solid #212121;\n}\n\n.hidden {\n display: none !important;\n}\n\n.warning {\n margin-bottom: 10px;\n padding: 10px;\n color: #8a6e00;\n text-align: center;\n background-color: #fff5cc;\n border: 1px solid rgba(138, 110, 0, 0.18);\n}\n\n.pull-right {\n margin-left: auto;\n}\n\n.notfound {\n text-align: center;\n img {\n margin: 40px 0;\n }\n}\n\n@font-face {\n font-family: \"lato\";\n src: url(../assets/fonts/lato-regular.ttf);\n}\n\n@font-face {\n font-family: \"lato\";\n src: url(../assets/fonts/lato-bold.ttf);\n font-weight: bold;\n}\n","/* FONT PATH\n * -------------------------- */\n\n@font-face {\n font-family: 'FontAwesome';\n src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');\n src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),\n url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),\n url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),\n url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),\n url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');\n// src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts\n font-weight: normal;\n font-style: normal;\n}\n","// Base Class Definition\n// -------------------------\n\n.#{$fa-css-prefix} {\n display: inline-block;\n font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration\n font-size: inherit; // can't have font-size inherit on line above, so need to override\n text-rendering: auto; // optimizelegibility throws things off #1094\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n}\n","// Icon Sizes\n// -------------------------\n\n/* makes the font 33% larger relative to the icon container */\n.#{$fa-css-prefix}-lg {\n font-size: (4em / 3);\n line-height: (3em / 4);\n vertical-align: -15%;\n}\n.#{$fa-css-prefix}-2x { font-size: 2em; }\n.#{$fa-css-prefix}-3x { font-size: 3em; }\n.#{$fa-css-prefix}-4x { font-size: 4em; }\n.#{$fa-css-prefix}-5x { font-size: 5em; }\n","// Fixed Width Icons\n// -------------------------\n.#{$fa-css-prefix}-fw {\n width: (18em / 14);\n text-align: center;\n}\n","// List Icons\n// -------------------------\n\n.#{$fa-css-prefix}-ul {\n padding-left: 0;\n margin-left: $fa-li-width;\n list-style-type: none;\n > li { position: relative; }\n}\n.#{$fa-css-prefix}-li {\n position: absolute;\n left: -$fa-li-width;\n width: $fa-li-width;\n top: (2em / 14);\n text-align: center;\n &.#{$fa-css-prefix}-lg {\n left: -$fa-li-width + (4em / 14);\n }\n}\n","// Variables\n// --------------------------\n$fa-font-path: \"../../../assets/fonts\" !default;\n$fa-font-size-base: 14px !default;\n$fa-line-height-base: 1 !default;\n//$fa-font-path: \"//netdna.bootstrapcdn.com/font-awesome/4.6.3/fonts\" !default; // for referencing Bootstrap CDN font files directly\n$fa-css-prefix: fa !default;\n$fa-version: \"4.6.3\" !default;\n$fa-border-color: #eee !default;\n$fa-inverse: #fff !default;\n$fa-li-width: (30em / 14) !default;\n\n$fa-var-500px: \"\\f26e\";\n$fa-var-adjust: \"\\f042\";\n$fa-var-adn: \"\\f170\";\n$fa-var-align-center: \"\\f037\";\n$fa-var-align-justify: \"\\f039\";\n$fa-var-align-left: \"\\f036\";\n$fa-var-align-right: \"\\f038\";\n$fa-var-amazon: \"\\f270\";\n$fa-var-ambulance: \"\\f0f9\";\n$fa-var-american-sign-language-interpreting: \"\\f2a3\";\n$fa-var-anchor: \"\\f13d\";\n$fa-var-android: \"\\f17b\";\n$fa-var-angellist: \"\\f209\";\n$fa-var-angle-double-down: \"\\f103\";\n$fa-var-angle-double-left: \"\\f100\";\n$fa-var-angle-double-right: \"\\f101\";\n$fa-var-angle-double-up: \"\\f102\";\n$fa-var-angle-down: \"\\f107\";\n$fa-var-angle-left: \"\\f104\";\n$fa-var-angle-right: \"\\f105\";\n$fa-var-angle-up: \"\\f106\";\n$fa-var-apple: \"\\f179\";\n$fa-var-archive: \"\\f187\";\n$fa-var-area-chart: \"\\f1fe\";\n$fa-var-arrow-circle-down: \"\\f0ab\";\n$fa-var-arrow-circle-left: \"\\f0a8\";\n$fa-var-arrow-circle-o-down: \"\\f01a\";\n$fa-var-arrow-circle-o-left: \"\\f190\";\n$fa-var-arrow-circle-o-right: \"\\f18e\";\n$fa-var-arrow-circle-o-up: \"\\f01b\";\n$fa-var-arrow-circle-right: \"\\f0a9\";\n$fa-var-arrow-circle-up: \"\\f0aa\";\n$fa-var-arrow-down: \"\\f063\";\n$fa-var-arrow-left: \"\\f060\";\n$fa-var-arrow-right: \"\\f061\";\n$fa-var-arrow-up: \"\\f062\";\n$fa-var-arrows: \"\\f047\";\n$fa-var-arrows-alt: \"\\f0b2\";\n$fa-var-arrows-h: \"\\f07e\";\n$fa-var-arrows-v: \"\\f07d\";\n$fa-var-asl-interpreting: \"\\f2a3\";\n$fa-var-assistive-listening-systems: \"\\f2a2\";\n$fa-var-asterisk: \"\\f069\";\n$fa-var-at: \"\\f1fa\";\n$fa-var-audio-description: \"\\f29e\";\n$fa-var-automobile: \"\\f1b9\";\n$fa-var-backward: \"\\f04a\";\n$fa-var-balance-scale: \"\\f24e\";\n$fa-var-ban: \"\\f05e\";\n$fa-var-bank: \"\\f19c\";\n$fa-var-bar-chart: \"\\f080\";\n$fa-var-bar-chart-o: \"\\f080\";\n$fa-var-barcode: \"\\f02a\";\n$fa-var-bars: \"\\f0c9\";\n$fa-var-battery-0: \"\\f244\";\n$fa-var-battery-1: \"\\f243\";\n$fa-var-battery-2: \"\\f242\";\n$fa-var-battery-3: \"\\f241\";\n$fa-var-battery-4: \"\\f240\";\n$fa-var-battery-empty: \"\\f244\";\n$fa-var-battery-full: \"\\f240\";\n$fa-var-battery-half: \"\\f242\";\n$fa-var-battery-quarter: \"\\f243\";\n$fa-var-battery-three-quarters: \"\\f241\";\n$fa-var-bed: \"\\f236\";\n$fa-var-beer: \"\\f0fc\";\n$fa-var-behance: \"\\f1b4\";\n$fa-var-behance-square: \"\\f1b5\";\n$fa-var-bell: \"\\f0f3\";\n$fa-var-bell-o: \"\\f0a2\";\n$fa-var-bell-slash: \"\\f1f6\";\n$fa-var-bell-slash-o: \"\\f1f7\";\n$fa-var-bicycle: \"\\f206\";\n$fa-var-binoculars: \"\\f1e5\";\n$fa-var-birthday-cake: \"\\f1fd\";\n$fa-var-bitbucket: \"\\f171\";\n$fa-var-bitbucket-square: \"\\f172\";\n$fa-var-bitcoin: \"\\f15a\";\n$fa-var-black-tie: \"\\f27e\";\n$fa-var-blind: \"\\f29d\";\n$fa-var-bluetooth: \"\\f293\";\n$fa-var-bluetooth-b: \"\\f294\";\n$fa-var-bold: \"\\f032\";\n$fa-var-bolt: \"\\f0e7\";\n$fa-var-bomb: \"\\f1e2\";\n$fa-var-book: \"\\f02d\";\n$fa-var-bookmark: \"\\f02e\";\n$fa-var-bookmark-o: \"\\f097\";\n$fa-var-braille: \"\\f2a1\";\n$fa-var-briefcase: \"\\f0b1\";\n$fa-var-btc: \"\\f15a\";\n$fa-var-bug: \"\\f188\";\n$fa-var-building: \"\\f1ad\";\n$fa-var-building-o: \"\\f0f7\";\n$fa-var-bullhorn: \"\\f0a1\";\n$fa-var-bullseye: \"\\f140\";\n$fa-var-bus: \"\\f207\";\n$fa-var-buysellads: \"\\f20d\";\n$fa-var-cab: \"\\f1ba\";\n$fa-var-calculator: \"\\f1ec\";\n$fa-var-calendar: \"\\f073\";\n$fa-var-calendar-check-o: \"\\f274\";\n$fa-var-calendar-minus-o: \"\\f272\";\n$fa-var-calendar-o: \"\\f133\";\n$fa-var-calendar-plus-o: \"\\f271\";\n$fa-var-calendar-times-o: \"\\f273\";\n$fa-var-camera: \"\\f030\";\n$fa-var-camera-retro: \"\\f083\";\n$fa-var-car: \"\\f1b9\";\n$fa-var-caret-down: \"\\f0d7\";\n$fa-var-caret-left: \"\\f0d9\";\n$fa-var-caret-right: \"\\f0da\";\n$fa-var-caret-square-o-down: \"\\f150\";\n$fa-var-caret-square-o-left: \"\\f191\";\n$fa-var-caret-square-o-right: \"\\f152\";\n$fa-var-caret-square-o-up: \"\\f151\";\n$fa-var-caret-up: \"\\f0d8\";\n$fa-var-cart-arrow-down: \"\\f218\";\n$fa-var-cart-plus: \"\\f217\";\n$fa-var-cc: \"\\f20a\";\n$fa-var-cc-amex: \"\\f1f3\";\n$fa-var-cc-diners-club: \"\\f24c\";\n$fa-var-cc-discover: \"\\f1f2\";\n$fa-var-cc-jcb: \"\\f24b\";\n$fa-var-cc-mastercard: \"\\f1f1\";\n$fa-var-cc-paypal: \"\\f1f4\";\n$fa-var-cc-stripe: \"\\f1f5\";\n$fa-var-cc-visa: \"\\f1f0\";\n$fa-var-certificate: \"\\f0a3\";\n$fa-var-chain: \"\\f0c1\";\n$fa-var-chain-broken: \"\\f127\";\n$fa-var-check: \"\\f00c\";\n$fa-var-check-circle: \"\\f058\";\n$fa-var-check-circle-o: \"\\f05d\";\n$fa-var-check-square: \"\\f14a\";\n$fa-var-check-square-o: \"\\f046\";\n$fa-var-chevron-circle-down: \"\\f13a\";\n$fa-var-chevron-circle-left: \"\\f137\";\n$fa-var-chevron-circle-right: \"\\f138\";\n$fa-var-chevron-circle-up: \"\\f139\";\n$fa-var-chevron-down: \"\\f078\";\n$fa-var-chevron-left: \"\\f053\";\n$fa-var-chevron-right: \"\\f054\";\n$fa-var-chevron-up: \"\\f077\";\n$fa-var-child: \"\\f1ae\";\n$fa-var-chrome: \"\\f268\";\n$fa-var-circle: \"\\f111\";\n$fa-var-circle-o: \"\\f10c\";\n$fa-var-circle-o-notch: \"\\f1ce\";\n$fa-var-circle-thin: \"\\f1db\";\n$fa-var-clipboard: \"\\f0ea\";\n$fa-var-clock-o: \"\\f017\";\n$fa-var-clone: \"\\f24d\";\n$fa-var-close: \"\\f00d\";\n$fa-var-cloud: \"\\f0c2\";\n$fa-var-cloud-download: \"\\f0ed\";\n$fa-var-cloud-upload: \"\\f0ee\";\n$fa-var-cny: \"\\f157\";\n$fa-var-code: \"\\f121\";\n$fa-var-code-fork: \"\\f126\";\n$fa-var-codepen: \"\\f1cb\";\n$fa-var-codiepie: \"\\f284\";\n$fa-var-coffee: \"\\f0f4\";\n$fa-var-cog: \"\\f013\";\n$fa-var-cogs: \"\\f085\";\n$fa-var-columns: \"\\f0db\";\n$fa-var-comment: \"\\f075\";\n$fa-var-comment-o: \"\\f0e5\";\n$fa-var-commenting: \"\\f27a\";\n$fa-var-commenting-o: \"\\f27b\";\n$fa-var-comments: \"\\f086\";\n$fa-var-comments-o: \"\\f0e6\";\n$fa-var-compass: \"\\f14e\";\n$fa-var-compress: \"\\f066\";\n$fa-var-connectdevelop: \"\\f20e\";\n$fa-var-contao: \"\\f26d\";\n$fa-var-copy: \"\\f0c5\";\n$fa-var-copyright: \"\\f1f9\";\n$fa-var-creative-commons: \"\\f25e\";\n$fa-var-credit-card: \"\\f09d\";\n$fa-var-credit-card-alt: \"\\f283\";\n$fa-var-crop: \"\\f125\";\n$fa-var-crosshairs: \"\\f05b\";\n$fa-var-css3: \"\\f13c\";\n$fa-var-cube: \"\\f1b2\";\n$fa-var-cubes: \"\\f1b3\";\n$fa-var-cut: \"\\f0c4\";\n$fa-var-cutlery: \"\\f0f5\";\n$fa-var-dashboard: \"\\f0e4\";\n$fa-var-dashcube: \"\\f210\";\n$fa-var-database: \"\\f1c0\";\n$fa-var-deaf: \"\\f2a4\";\n$fa-var-deafness: \"\\f2a4\";\n$fa-var-dedent: \"\\f03b\";\n$fa-var-delicious: \"\\f1a5\";\n$fa-var-desktop: \"\\f108\";\n$fa-var-deviantart: \"\\f1bd\";\n$fa-var-diamond: \"\\f219\";\n$fa-var-digg: \"\\f1a6\";\n$fa-var-dollar: \"\\f155\";\n$fa-var-dot-circle-o: \"\\f192\";\n$fa-var-download: \"\\f019\";\n$fa-var-dribbble: \"\\f17d\";\n$fa-var-dropbox: \"\\f16b\";\n$fa-var-drupal: \"\\f1a9\";\n$fa-var-edge: \"\\f282\";\n$fa-var-edit: \"\\f044\";\n$fa-var-eject: \"\\f052\";\n$fa-var-ellipsis-h: \"\\f141\";\n$fa-var-ellipsis-v: \"\\f142\";\n$fa-var-empire: \"\\f1d1\";\n$fa-var-envelope: \"\\f0e0\";\n$fa-var-envelope-o: \"\\f003\";\n$fa-var-envelope-square: \"\\f199\";\n$fa-var-envira: \"\\f299\";\n$fa-var-eraser: \"\\f12d\";\n$fa-var-eur: \"\\f153\";\n$fa-var-euro: \"\\f153\";\n$fa-var-exchange: \"\\f0ec\";\n$fa-var-exclamation: \"\\f12a\";\n$fa-var-exclamation-circle: \"\\f06a\";\n$fa-var-exclamation-triangle: \"\\f071\";\n$fa-var-expand: \"\\f065\";\n$fa-var-expeditedssl: \"\\f23e\";\n$fa-var-external-link: \"\\f08e\";\n$fa-var-external-link-square: \"\\f14c\";\n$fa-var-eye: \"\\f06e\";\n$fa-var-eye-slash: \"\\f070\";\n$fa-var-eyedropper: \"\\f1fb\";\n$fa-var-fa: \"\\f2b4\";\n$fa-var-facebook: \"\\f09a\";\n$fa-var-facebook-f: \"\\f09a\";\n$fa-var-facebook-official: \"\\f230\";\n$fa-var-facebook-square: \"\\f082\";\n$fa-var-fast-backward: \"\\f049\";\n$fa-var-fast-forward: \"\\f050\";\n$fa-var-fax: \"\\f1ac\";\n$fa-var-feed: \"\\f09e\";\n$fa-var-female: \"\\f182\";\n$fa-var-fighter-jet: \"\\f0fb\";\n$fa-var-file: \"\\f15b\";\n$fa-var-file-archive-o: \"\\f1c6\";\n$fa-var-file-audio-o: \"\\f1c7\";\n$fa-var-file-code-o: \"\\f1c9\";\n$fa-var-file-excel-o: \"\\f1c3\";\n$fa-var-file-image-o: \"\\f1c5\";\n$fa-var-file-movie-o: \"\\f1c8\";\n$fa-var-file-o: \"\\f016\";\n$fa-var-file-pdf-o: \"\\f1c1\";\n$fa-var-file-photo-o: \"\\f1c5\";\n$fa-var-file-picture-o: \"\\f1c5\";\n$fa-var-file-powerpoint-o: \"\\f1c4\";\n$fa-var-file-sound-o: \"\\f1c7\";\n$fa-var-file-text: \"\\f15c\";\n$fa-var-file-text-o: \"\\f0f6\";\n$fa-var-file-video-o: \"\\f1c8\";\n$fa-var-file-word-o: \"\\f1c2\";\n$fa-var-file-zip-o: \"\\f1c6\";\n$fa-var-files-o: \"\\f0c5\";\n$fa-var-film: \"\\f008\";\n$fa-var-filter: \"\\f0b0\";\n$fa-var-fire: \"\\f06d\";\n$fa-var-fire-extinguisher: \"\\f134\";\n$fa-var-firefox: \"\\f269\";\n$fa-var-first-order: \"\\f2b0\";\n$fa-var-flag: \"\\f024\";\n$fa-var-flag-checkered: \"\\f11e\";\n$fa-var-flag-o: \"\\f11d\";\n$fa-var-flash: \"\\f0e7\";\n$fa-var-flask: \"\\f0c3\";\n$fa-var-flickr: \"\\f16e\";\n$fa-var-floppy-o: \"\\f0c7\";\n$fa-var-folder: \"\\f07b\";\n$fa-var-folder-o: \"\\f114\";\n$fa-var-folder-open: \"\\f07c\";\n$fa-var-folder-open-o: \"\\f115\";\n$fa-var-font: \"\\f031\";\n$fa-var-font-awesome: \"\\f2b4\";\n$fa-var-fonticons: \"\\f280\";\n$fa-var-fort-awesome: \"\\f286\";\n$fa-var-forumbee: \"\\f211\";\n$fa-var-forward: \"\\f04e\";\n$fa-var-foursquare: \"\\f180\";\n$fa-var-frown-o: \"\\f119\";\n$fa-var-futbol-o: \"\\f1e3\";\n$fa-var-gamepad: \"\\f11b\";\n$fa-var-gavel: \"\\f0e3\";\n$fa-var-gbp: \"\\f154\";\n$fa-var-ge: \"\\f1d1\";\n$fa-var-gear: \"\\f013\";\n$fa-var-gears: \"\\f085\";\n$fa-var-genderless: \"\\f22d\";\n$fa-var-get-pocket: \"\\f265\";\n$fa-var-gg: \"\\f260\";\n$fa-var-gg-circle: \"\\f261\";\n$fa-var-gift: \"\\f06b\";\n$fa-var-git: \"\\f1d3\";\n$fa-var-git-square: \"\\f1d2\";\n$fa-var-github: \"\\f09b\";\n$fa-var-github-alt: \"\\f113\";\n$fa-var-github-square: \"\\f092\";\n$fa-var-gitlab: \"\\f296\";\n$fa-var-gittip: \"\\f184\";\n$fa-var-glass: \"\\f000\";\n$fa-var-glide: \"\\f2a5\";\n$fa-var-glide-g: \"\\f2a6\";\n$fa-var-globe: \"\\f0ac\";\n$fa-var-google: \"\\f1a0\";\n$fa-var-google-plus: \"\\f0d5\";\n$fa-var-google-plus-circle: \"\\f2b3\";\n$fa-var-google-plus-official: \"\\f2b3\";\n$fa-var-google-plus-square: \"\\f0d4\";\n$fa-var-google-wallet: \"\\f1ee\";\n$fa-var-graduation-cap: \"\\f19d\";\n$fa-var-gratipay: \"\\f184\";\n$fa-var-group: \"\\f0c0\";\n$fa-var-h-square: \"\\f0fd\";\n$fa-var-hacker-news: \"\\f1d4\";\n$fa-var-hand-grab-o: \"\\f255\";\n$fa-var-hand-lizard-o: \"\\f258\";\n$fa-var-hand-o-down: \"\\f0a7\";\n$fa-var-hand-o-left: \"\\f0a5\";\n$fa-var-hand-o-right: \"\\f0a4\";\n$fa-var-hand-o-up: \"\\f0a6\";\n$fa-var-hand-paper-o: \"\\f256\";\n$fa-var-hand-peace-o: \"\\f25b\";\n$fa-var-hand-pointer-o: \"\\f25a\";\n$fa-var-hand-rock-o: \"\\f255\";\n$fa-var-hand-scissors-o: \"\\f257\";\n$fa-var-hand-spock-o: \"\\f259\";\n$fa-var-hand-stop-o: \"\\f256\";\n$fa-var-hard-of-hearing: \"\\f2a4\";\n$fa-var-hashtag: \"\\f292\";\n$fa-var-hdd-o: \"\\f0a0\";\n$fa-var-header: \"\\f1dc\";\n$fa-var-headphones: \"\\f025\";\n$fa-var-heart: \"\\f004\";\n$fa-var-heart-o: \"\\f08a\";\n$fa-var-heartbeat: \"\\f21e\";\n$fa-var-history: \"\\f1da\";\n$fa-var-home: \"\\f015\";\n$fa-var-hospital-o: \"\\f0f8\";\n$fa-var-hotel: \"\\f236\";\n$fa-var-hourglass: \"\\f254\";\n$fa-var-hourglass-1: \"\\f251\";\n$fa-var-hourglass-2: \"\\f252\";\n$fa-var-hourglass-3: \"\\f253\";\n$fa-var-hourglass-end: \"\\f253\";\n$fa-var-hourglass-half: \"\\f252\";\n$fa-var-hourglass-o: \"\\f250\";\n$fa-var-hourglass-start: \"\\f251\";\n$fa-var-houzz: \"\\f27c\";\n$fa-var-html5: \"\\f13b\";\n$fa-var-i-cursor: \"\\f246\";\n$fa-var-ils: \"\\f20b\";\n$fa-var-image: \"\\f03e\";\n$fa-var-inbox: \"\\f01c\";\n$fa-var-indent: \"\\f03c\";\n$fa-var-industry: \"\\f275\";\n$fa-var-info: \"\\f129\";\n$fa-var-info-circle: \"\\f05a\";\n$fa-var-inr: \"\\f156\";\n$fa-var-instagram: \"\\f16d\";\n$fa-var-institution: \"\\f19c\";\n$fa-var-internet-explorer: \"\\f26b\";\n$fa-var-intersex: \"\\f224\";\n$fa-var-ioxhost: \"\\f208\";\n$fa-var-italic: \"\\f033\";\n$fa-var-joomla: \"\\f1aa\";\n$fa-var-jpy: \"\\f157\";\n$fa-var-jsfiddle: \"\\f1cc\";\n$fa-var-key: \"\\f084\";\n$fa-var-keyboard-o: \"\\f11c\";\n$fa-var-krw: \"\\f159\";\n$fa-var-language: \"\\f1ab\";\n$fa-var-laptop: \"\\f109\";\n$fa-var-lastfm: \"\\f202\";\n$fa-var-lastfm-square: \"\\f203\";\n$fa-var-leaf: \"\\f06c\";\n$fa-var-leanpub: \"\\f212\";\n$fa-var-legal: \"\\f0e3\";\n$fa-var-lemon-o: \"\\f094\";\n$fa-var-level-down: \"\\f149\";\n$fa-var-level-up: \"\\f148\";\n$fa-var-life-bouy: \"\\f1cd\";\n$fa-var-life-buoy: \"\\f1cd\";\n$fa-var-life-ring: \"\\f1cd\";\n$fa-var-life-saver: \"\\f1cd\";\n$fa-var-lightbulb-o: \"\\f0eb\";\n$fa-var-line-chart: \"\\f201\";\n$fa-var-link: \"\\f0c1\";\n$fa-var-linkedin: \"\\f0e1\";\n$fa-var-linkedin-square: \"\\f08c\";\n$fa-var-linux: \"\\f17c\";\n$fa-var-list: \"\\f03a\";\n$fa-var-list-alt: \"\\f022\";\n$fa-var-list-ol: \"\\f0cb\";\n$fa-var-list-ul: \"\\f0ca\";\n$fa-var-location-arrow: \"\\f124\";\n$fa-var-lock: \"\\f023\";\n$fa-var-long-arrow-down: \"\\f175\";\n$fa-var-long-arrow-left: \"\\f177\";\n$fa-var-long-arrow-right: \"\\f178\";\n$fa-var-long-arrow-up: \"\\f176\";\n$fa-var-low-vision: \"\\f2a8\";\n$fa-var-magic: \"\\f0d0\";\n$fa-var-magnet: \"\\f076\";\n$fa-var-mail-forward: \"\\f064\";\n$fa-var-mail-reply: \"\\f112\";\n$fa-var-mail-reply-all: \"\\f122\";\n$fa-var-male: \"\\f183\";\n$fa-var-map: \"\\f279\";\n$fa-var-map-marker: \"\\f041\";\n$fa-var-map-o: \"\\f278\";\n$fa-var-map-pin: \"\\f276\";\n$fa-var-map-signs: \"\\f277\";\n$fa-var-mars: \"\\f222\";\n$fa-var-mars-double: \"\\f227\";\n$fa-var-mars-stroke: \"\\f229\";\n$fa-var-mars-stroke-h: \"\\f22b\";\n$fa-var-mars-stroke-v: \"\\f22a\";\n$fa-var-maxcdn: \"\\f136\";\n$fa-var-meanpath: \"\\f20c\";\n$fa-var-medium: \"\\f23a\";\n$fa-var-medkit: \"\\f0fa\";\n$fa-var-meh-o: \"\\f11a\";\n$fa-var-mercury: \"\\f223\";\n$fa-var-microphone: \"\\f130\";\n$fa-var-microphone-slash: \"\\f131\";\n$fa-var-minus: \"\\f068\";\n$fa-var-minus-circle: \"\\f056\";\n$fa-var-minus-square: \"\\f146\";\n$fa-var-minus-square-o: \"\\f147\";\n$fa-var-mixcloud: \"\\f289\";\n$fa-var-mobile: \"\\f10b\";\n$fa-var-mobile-phone: \"\\f10b\";\n$fa-var-modx: \"\\f285\";\n$fa-var-money: \"\\f0d6\";\n$fa-var-moon-o: \"\\f186\";\n$fa-var-mortar-board: \"\\f19d\";\n$fa-var-motorcycle: \"\\f21c\";\n$fa-var-mouse-pointer: \"\\f245\";\n$fa-var-music: \"\\f001\";\n$fa-var-navicon: \"\\f0c9\";\n$fa-var-neuter: \"\\f22c\";\n$fa-var-newspaper-o: \"\\f1ea\";\n$fa-var-object-group: \"\\f247\";\n$fa-var-object-ungroup: \"\\f248\";\n$fa-var-odnoklassniki: \"\\f263\";\n$fa-var-odnoklassniki-square: \"\\f264\";\n$fa-var-opencart: \"\\f23d\";\n$fa-var-openid: \"\\f19b\";\n$fa-var-opera: \"\\f26a\";\n$fa-var-optin-monster: \"\\f23c\";\n$fa-var-outdent: \"\\f03b\";\n$fa-var-pagelines: \"\\f18c\";\n$fa-var-paint-brush: \"\\f1fc\";\n$fa-var-paper-plane: \"\\f1d8\";\n$fa-var-paper-plane-o: \"\\f1d9\";\n$fa-var-paperclip: \"\\f0c6\";\n$fa-var-paragraph: \"\\f1dd\";\n$fa-var-paste: \"\\f0ea\";\n$fa-var-pause: \"\\f04c\";\n$fa-var-pause-circle: \"\\f28b\";\n$fa-var-pause-circle-o: \"\\f28c\";\n$fa-var-paw: \"\\f1b0\";\n$fa-var-paypal: \"\\f1ed\";\n$fa-var-pencil: \"\\f040\";\n$fa-var-pencil-square: \"\\f14b\";\n$fa-var-pencil-square-o: \"\\f044\";\n$fa-var-percent: \"\\f295\";\n$fa-var-phone: \"\\f095\";\n$fa-var-phone-square: \"\\f098\";\n$fa-var-photo: \"\\f03e\";\n$fa-var-picture-o: \"\\f03e\";\n$fa-var-pie-chart: \"\\f200\";\n$fa-var-pied-piper: \"\\f2ae\";\n$fa-var-pied-piper-alt: \"\\f1a8\";\n$fa-var-pied-piper-pp: \"\\f1a7\";\n$fa-var-pinterest: \"\\f0d2\";\n$fa-var-pinterest-p: \"\\f231\";\n$fa-var-pinterest-square: \"\\f0d3\";\n$fa-var-plane: \"\\f072\";\n$fa-var-play: \"\\f04b\";\n$fa-var-play-circle: \"\\f144\";\n$fa-var-play-circle-o: \"\\f01d\";\n$fa-var-plug: \"\\f1e6\";\n$fa-var-plus: \"\\f067\";\n$fa-var-plus-circle: \"\\f055\";\n$fa-var-plus-square: \"\\f0fe\";\n$fa-var-plus-square-o: \"\\f196\";\n$fa-var-power-off: \"\\f011\";\n$fa-var-print: \"\\f02f\";\n$fa-var-product-hunt: \"\\f288\";\n$fa-var-puzzle-piece: \"\\f12e\";\n$fa-var-qq: \"\\f1d6\";\n$fa-var-qrcode: \"\\f029\";\n$fa-var-question: \"\\f128\";\n$fa-var-question-circle: \"\\f059\";\n$fa-var-question-circle-o: \"\\f29c\";\n$fa-var-quote-left: \"\\f10d\";\n$fa-var-quote-right: \"\\f10e\";\n$fa-var-ra: \"\\f1d0\";\n$fa-var-random: \"\\f074\";\n$fa-var-rebel: \"\\f1d0\";\n$fa-var-recycle: \"\\f1b8\";\n$fa-var-reddit: \"\\f1a1\";\n$fa-var-reddit-alien: \"\\f281\";\n$fa-var-reddit-square: \"\\f1a2\";\n$fa-var-refresh: \"\\f021\";\n$fa-var-registered: \"\\f25d\";\n$fa-var-remove: \"\\f00d\";\n$fa-var-renren: \"\\f18b\";\n$fa-var-reorder: \"\\f0c9\";\n$fa-var-repeat: \"\\f01e\";\n$fa-var-reply: \"\\f112\";\n$fa-var-reply-all: \"\\f122\";\n$fa-var-resistance: \"\\f1d0\";\n$fa-var-retweet: \"\\f079\";\n$fa-var-rmb: \"\\f157\";\n$fa-var-road: \"\\f018\";\n$fa-var-rocket: \"\\f135\";\n$fa-var-rotate-left: \"\\f0e2\";\n$fa-var-rotate-right: \"\\f01e\";\n$fa-var-rouble: \"\\f158\";\n$fa-var-rss: \"\\f09e\";\n$fa-var-rss-square: \"\\f143\";\n$fa-var-rub: \"\\f158\";\n$fa-var-ruble: \"\\f158\";\n$fa-var-rupee: \"\\f156\";\n$fa-var-safari: \"\\f267\";\n$fa-var-save: \"\\f0c7\";\n$fa-var-scissors: \"\\f0c4\";\n$fa-var-scribd: \"\\f28a\";\n$fa-var-search: \"\\f002\";\n$fa-var-search-minus: \"\\f010\";\n$fa-var-search-plus: \"\\f00e\";\n$fa-var-sellsy: \"\\f213\";\n$fa-var-send: \"\\f1d8\";\n$fa-var-send-o: \"\\f1d9\";\n$fa-var-server: \"\\f233\";\n$fa-var-share: \"\\f064\";\n$fa-var-share-alt: \"\\f1e0\";\n$fa-var-share-alt-square: \"\\f1e1\";\n$fa-var-share-square: \"\\f14d\";\n$fa-var-share-square-o: \"\\f045\";\n$fa-var-shekel: \"\\f20b\";\n$fa-var-sheqel: \"\\f20b\";\n$fa-var-shield: \"\\f132\";\n$fa-var-ship: \"\\f21a\";\n$fa-var-shirtsinbulk: \"\\f214\";\n$fa-var-shopping-bag: \"\\f290\";\n$fa-var-shopping-basket: \"\\f291\";\n$fa-var-shopping-cart: \"\\f07a\";\n$fa-var-sign-in: \"\\f090\";\n$fa-var-sign-language: \"\\f2a7\";\n$fa-var-sign-out: \"\\f08b\";\n$fa-var-signal: \"\\f012\";\n$fa-var-signing: \"\\f2a7\";\n$fa-var-simplybuilt: \"\\f215\";\n$fa-var-sitemap: \"\\f0e8\";\n$fa-var-skyatlas: \"\\f216\";\n$fa-var-skype: \"\\f17e\";\n$fa-var-slack: \"\\f198\";\n$fa-var-sliders: \"\\f1de\";\n$fa-var-slideshare: \"\\f1e7\";\n$fa-var-smile-o: \"\\f118\";\n$fa-var-snapchat: \"\\f2ab\";\n$fa-var-snapchat-ghost: \"\\f2ac\";\n$fa-var-snapchat-square: \"\\f2ad\";\n$fa-var-soccer-ball-o: \"\\f1e3\";\n$fa-var-sort: \"\\f0dc\";\n$fa-var-sort-alpha-asc: \"\\f15d\";\n$fa-var-sort-alpha-desc: \"\\f15e\";\n$fa-var-sort-amount-asc: \"\\f160\";\n$fa-var-sort-amount-desc: \"\\f161\";\n$fa-var-sort-asc: \"\\f0de\";\n$fa-var-sort-desc: \"\\f0dd\";\n$fa-var-sort-down: \"\\f0dd\";\n$fa-var-sort-numeric-asc: \"\\f162\";\n$fa-var-sort-numeric-desc: \"\\f163\";\n$fa-var-sort-up: \"\\f0de\";\n$fa-var-soundcloud: \"\\f1be\";\n$fa-var-space-shuttle: \"\\f197\";\n$fa-var-spinner: \"\\f110\";\n$fa-var-spoon: \"\\f1b1\";\n$fa-var-spotify: \"\\f1bc\";\n$fa-var-square: \"\\f0c8\";\n$fa-var-square-o: \"\\f096\";\n$fa-var-stack-exchange: \"\\f18d\";\n$fa-var-stack-overflow: \"\\f16c\";\n$fa-var-star: \"\\f005\";\n$fa-var-star-half: \"\\f089\";\n$fa-var-star-half-empty: \"\\f123\";\n$fa-var-star-half-full: \"\\f123\";\n$fa-var-star-half-o: \"\\f123\";\n$fa-var-star-o: \"\\f006\";\n$fa-var-steam: \"\\f1b6\";\n$fa-var-steam-square: \"\\f1b7\";\n$fa-var-step-backward: \"\\f048\";\n$fa-var-step-forward: \"\\f051\";\n$fa-var-stethoscope: \"\\f0f1\";\n$fa-var-sticky-note: \"\\f249\";\n$fa-var-sticky-note-o: \"\\f24a\";\n$fa-var-stop: \"\\f04d\";\n$fa-var-stop-circle: \"\\f28d\";\n$fa-var-stop-circle-o: \"\\f28e\";\n$fa-var-street-view: \"\\f21d\";\n$fa-var-strikethrough: \"\\f0cc\";\n$fa-var-stumbleupon: \"\\f1a4\";\n$fa-var-stumbleupon-circle: \"\\f1a3\";\n$fa-var-subscript: \"\\f12c\";\n$fa-var-subway: \"\\f239\";\n$fa-var-suitcase: \"\\f0f2\";\n$fa-var-sun-o: \"\\f185\";\n$fa-var-superscript: \"\\f12b\";\n$fa-var-support: \"\\f1cd\";\n$fa-var-table: \"\\f0ce\";\n$fa-var-tablet: \"\\f10a\";\n$fa-var-tachometer: \"\\f0e4\";\n$fa-var-tag: \"\\f02b\";\n$fa-var-tags: \"\\f02c\";\n$fa-var-tasks: \"\\f0ae\";\n$fa-var-taxi: \"\\f1ba\";\n$fa-var-television: \"\\f26c\";\n$fa-var-tencent-weibo: \"\\f1d5\";\n$fa-var-terminal: \"\\f120\";\n$fa-var-text-height: \"\\f034\";\n$fa-var-text-width: \"\\f035\";\n$fa-var-th: \"\\f00a\";\n$fa-var-th-large: \"\\f009\";\n$fa-var-th-list: \"\\f00b\";\n$fa-var-themeisle: \"\\f2b2\";\n$fa-var-thumb-tack: \"\\f08d\";\n$fa-var-thumbs-down: \"\\f165\";\n$fa-var-thumbs-o-down: \"\\f088\";\n$fa-var-thumbs-o-up: \"\\f087\";\n$fa-var-thumbs-up: \"\\f164\";\n$fa-var-ticket: \"\\f145\";\n$fa-var-times: \"\\f00d\";\n$fa-var-times-circle: \"\\f057\";\n$fa-var-times-circle-o: \"\\f05c\";\n$fa-var-tint: \"\\f043\";\n$fa-var-toggle-down: \"\\f150\";\n$fa-var-toggle-left: \"\\f191\";\n$fa-var-toggle-off: \"\\f204\";\n$fa-var-toggle-on: \"\\f205\";\n$fa-var-toggle-right: \"\\f152\";\n$fa-var-toggle-up: \"\\f151\";\n$fa-var-trademark: \"\\f25c\";\n$fa-var-train: \"\\f238\";\n$fa-var-transgender: \"\\f224\";\n$fa-var-transgender-alt: \"\\f225\";\n$fa-var-trash: \"\\f1f8\";\n$fa-var-trash-o: \"\\f014\";\n$fa-var-tree: \"\\f1bb\";\n$fa-var-trello: \"\\f181\";\n$fa-var-tripadvisor: \"\\f262\";\n$fa-var-trophy: \"\\f091\";\n$fa-var-truck: \"\\f0d1\";\n$fa-var-try: \"\\f195\";\n$fa-var-tty: \"\\f1e4\";\n$fa-var-tumblr: \"\\f173\";\n$fa-var-tumblr-square: \"\\f174\";\n$fa-var-turkish-lira: \"\\f195\";\n$fa-var-tv: \"\\f26c\";\n$fa-var-twitch: \"\\f1e8\";\n$fa-var-twitter: \"\\f099\";\n$fa-var-twitter-square: \"\\f081\";\n$fa-var-umbrella: \"\\f0e9\";\n$fa-var-underline: \"\\f0cd\";\n$fa-var-undo: \"\\f0e2\";\n$fa-var-universal-access: \"\\f29a\";\n$fa-var-university: \"\\f19c\";\n$fa-var-unlink: \"\\f127\";\n$fa-var-unlock: \"\\f09c\";\n$fa-var-unlock-alt: \"\\f13e\";\n$fa-var-unsorted: \"\\f0dc\";\n$fa-var-upload: \"\\f093\";\n$fa-var-usb: \"\\f287\";\n$fa-var-usd: \"\\f155\";\n$fa-var-user: \"\\f007\";\n$fa-var-user-md: \"\\f0f0\";\n$fa-var-user-plus: \"\\f234\";\n$fa-var-user-secret: \"\\f21b\";\n$fa-var-user-times: \"\\f235\";\n$fa-var-users: \"\\f0c0\";\n$fa-var-venus: \"\\f221\";\n$fa-var-venus-double: \"\\f226\";\n$fa-var-venus-mars: \"\\f228\";\n$fa-var-viacoin: \"\\f237\";\n$fa-var-viadeo: \"\\f2a9\";\n$fa-var-viadeo-square: \"\\f2aa\";\n$fa-var-video-camera: \"\\f03d\";\n$fa-var-vimeo: \"\\f27d\";\n$fa-var-vimeo-square: \"\\f194\";\n$fa-var-vine: \"\\f1ca\";\n$fa-var-vk: \"\\f189\";\n$fa-var-volume-control-phone: \"\\f2a0\";\n$fa-var-volume-down: \"\\f027\";\n$fa-var-volume-off: \"\\f026\";\n$fa-var-volume-up: \"\\f028\";\n$fa-var-warning: \"\\f071\";\n$fa-var-wechat: \"\\f1d7\";\n$fa-var-weibo: \"\\f18a\";\n$fa-var-weixin: \"\\f1d7\";\n$fa-var-whatsapp: \"\\f232\";\n$fa-var-wheelchair: \"\\f193\";\n$fa-var-wheelchair-alt: \"\\f29b\";\n$fa-var-wifi: \"\\f1eb\";\n$fa-var-wikipedia-w: \"\\f266\";\n$fa-var-windows: \"\\f17a\";\n$fa-var-won: \"\\f159\";\n$fa-var-wordpress: \"\\f19a\";\n$fa-var-wpbeginner: \"\\f297\";\n$fa-var-wpforms: \"\\f298\";\n$fa-var-wrench: \"\\f0ad\";\n$fa-var-xing: \"\\f168\";\n$fa-var-xing-square: \"\\f169\";\n$fa-var-y-combinator: \"\\f23b\";\n$fa-var-y-combinator-square: \"\\f1d4\";\n$fa-var-yahoo: \"\\f19e\";\n$fa-var-yc: \"\\f23b\";\n$fa-var-yc-square: \"\\f1d4\";\n$fa-var-yelp: \"\\f1e9\";\n$fa-var-yen: \"\\f157\";\n$fa-var-yoast: \"\\f2b1\";\n$fa-var-youtube: \"\\f167\";\n$fa-var-youtube-play: \"\\f16a\";\n$fa-var-youtube-square: \"\\f166\";\n","// Bordered & Pulled\n// -------------------------\n\n.#{$fa-css-prefix}-border {\n padding: .2em .25em .15em;\n border: solid .08em $fa-border-color;\n border-radius: .1em;\n}\n\n.#{$fa-css-prefix}-pull-left { float: left; }\n.#{$fa-css-prefix}-pull-right { float: right; }\n\n.#{$fa-css-prefix} {\n &.#{$fa-css-prefix}-pull-left { margin-right: .3em; }\n &.#{$fa-css-prefix}-pull-right { margin-left: .3em; }\n}\n\n/* Deprecated as of 4.4.0 */\n.pull-right { float: right; }\n.pull-left { float: left; }\n\n.#{$fa-css-prefix} {\n &.pull-left { margin-right: .3em; }\n &.pull-right { margin-left: .3em; }\n}\n","// Spinning Icons\n// --------------------------\n\n.#{$fa-css-prefix}-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.#{$fa-css-prefix}-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n","// Mixins\n// --------------------------\n\n@mixin fa-icon() {\n display: inline-block;\n font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration\n font-size: inherit; // can't have font-size inherit on line above, so need to override\n text-rendering: auto; // optimizelegibility throws things off #1094\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n}\n\n@mixin fa-icon-rotate($degrees, $rotation) {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})\";\n -webkit-transform: rotate($degrees);\n -ms-transform: rotate($degrees);\n transform: rotate($degrees);\n}\n\n@mixin fa-icon-flip($horiz, $vert, $rotation) {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)\";\n -webkit-transform: scale($horiz, $vert);\n -ms-transform: scale($horiz, $vert);\n transform: scale($horiz, $vert);\n}\n\n\n// Only display content to screen readers. A la Bootstrap 4.\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n@mixin sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n//\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n//\n// Credit: HTML5 Boilerplate\n\n@mixin sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n","// Rotated & Flipped Icons\n// -------------------------\n\n.#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }\n.#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }\n.#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }\n\n.#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }\n.#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }\n\n// Hook for IE8-9\n// -------------------------\n\n:root .#{$fa-css-prefix}-rotate-90,\n:root .#{$fa-css-prefix}-rotate-180,\n:root .#{$fa-css-prefix}-rotate-270,\n:root .#{$fa-css-prefix}-flip-horizontal,\n:root .#{$fa-css-prefix}-flip-vertical {\n filter: none;\n}\n","// Stacked Icons\n// -------------------------\n\n.#{$fa-css-prefix}-stack {\n position: relative;\n display: inline-block;\n width: 2em;\n height: 2em;\n line-height: 2em;\n vertical-align: middle;\n}\n.#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {\n position: absolute;\n left: 0;\n width: 100%;\n text-align: center;\n}\n.#{$fa-css-prefix}-stack-1x { line-height: inherit; }\n.#{$fa-css-prefix}-stack-2x { font-size: 2em; }\n.#{$fa-css-prefix}-inverse { color: $fa-inverse; }\n","/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen\n readers do not read off random characters that represent icons */\n\n.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; }\n.#{$fa-css-prefix}-music:before { content: $fa-var-music; }\n.#{$fa-css-prefix}-search:before { content: $fa-var-search; }\n.#{$fa-css-prefix}-envelope-o:before { content: $fa-var-envelope-o; }\n.#{$fa-css-prefix}-heart:before { content: $fa-var-heart; }\n.#{$fa-css-prefix}-star:before { content: $fa-var-star; }\n.#{$fa-css-prefix}-star-o:before { content: $fa-var-star-o; }\n.#{$fa-css-prefix}-user:before { content: $fa-var-user; }\n.#{$fa-css-prefix}-film:before { content: $fa-var-film; }\n.#{$fa-css-prefix}-th-large:before { content: $fa-var-th-large; }\n.#{$fa-css-prefix}-th:before { content: $fa-var-th; }\n.#{$fa-css-prefix}-th-list:before { content: $fa-var-th-list; }\n.#{$fa-css-prefix}-check:before { content: $fa-var-check; }\n.#{$fa-css-prefix}-remove:before,\n.#{$fa-css-prefix}-close:before,\n.#{$fa-css-prefix}-times:before { content: $fa-var-times; }\n.#{$fa-css-prefix}-search-plus:before { content: $fa-var-search-plus; }\n.#{$fa-css-prefix}-search-minus:before { content: $fa-var-search-minus; }\n.#{$fa-css-prefix}-power-off:before { content: $fa-var-power-off; }\n.#{$fa-css-prefix}-signal:before { content: $fa-var-signal; }\n.#{$fa-css-prefix}-gear:before,\n.#{$fa-css-prefix}-cog:before { content: $fa-var-cog; }\n.#{$fa-css-prefix}-trash-o:before { content: $fa-var-trash-o; }\n.#{$fa-css-prefix}-home:before { content: $fa-var-home; }\n.#{$fa-css-prefix}-file-o:before { content: $fa-var-file-o; }\n.#{$fa-css-prefix}-clock-o:before { content: $fa-var-clock-o; }\n.#{$fa-css-prefix}-road:before { content: $fa-var-road; }\n.#{$fa-css-prefix}-download:before { content: $fa-var-download; }\n.#{$fa-css-prefix}-arrow-circle-o-down:before { content: $fa-var-arrow-circle-o-down; }\n.#{$fa-css-prefix}-arrow-circle-o-up:before { content: $fa-var-arrow-circle-o-up; }\n.#{$fa-css-prefix}-inbox:before { content: $fa-var-inbox; }\n.#{$fa-css-prefix}-play-circle-o:before { content: $fa-var-play-circle-o; }\n.#{$fa-css-prefix}-rotate-right:before,\n.#{$fa-css-prefix}-repeat:before { content: $fa-var-repeat; }\n.#{$fa-css-prefix}-refresh:before { content: $fa-var-refresh; }\n.#{$fa-css-prefix}-list-alt:before { content: $fa-var-list-alt; }\n.#{$fa-css-prefix}-lock:before { content: $fa-var-lock; }\n.#{$fa-css-prefix}-flag:before { content: $fa-var-flag; }\n.#{$fa-css-prefix}-headphones:before { content: $fa-var-headphones; }\n.#{$fa-css-prefix}-volume-off:before { content: $fa-var-volume-off; }\n.#{$fa-css-prefix}-volume-down:before { content: $fa-var-volume-down; }\n.#{$fa-css-prefix}-volume-up:before { content: $fa-var-volume-up; }\n.#{$fa-css-prefix}-qrcode:before { content: $fa-var-qrcode; }\n.#{$fa-css-prefix}-barcode:before { content: $fa-var-barcode; }\n.#{$fa-css-prefix}-tag:before { content: $fa-var-tag; }\n.#{$fa-css-prefix}-tags:before { content: $fa-var-tags; }\n.#{$fa-css-prefix}-book:before { content: $fa-var-book; }\n.#{$fa-css-prefix}-bookmark:before { content: $fa-var-bookmark; }\n.#{$fa-css-prefix}-print:before { content: $fa-var-print; }\n.#{$fa-css-prefix}-camera:before { content: $fa-var-camera; }\n.#{$fa-css-prefix}-font:before { content: $fa-var-font; }\n.#{$fa-css-prefix}-bold:before { content: $fa-var-bold; }\n.#{$fa-css-prefix}-italic:before { content: $fa-var-italic; }\n.#{$fa-css-prefix}-text-height:before { content: $fa-var-text-height; }\n.#{$fa-css-prefix}-text-width:before { content: $fa-var-text-width; }\n.#{$fa-css-prefix}-align-left:before { content: $fa-var-align-left; }\n.#{$fa-css-prefix}-align-center:before { content: $fa-var-align-center; }\n.#{$fa-css-prefix}-align-right:before { content: $fa-var-align-right; }\n.#{$fa-css-prefix}-align-justify:before { content: $fa-var-align-justify; }\n.#{$fa-css-prefix}-list:before { content: $fa-var-list; }\n.#{$fa-css-prefix}-dedent:before,\n.#{$fa-css-prefix}-outdent:before { content: $fa-var-outdent; }\n.#{$fa-css-prefix}-indent:before { content: $fa-var-indent; }\n.#{$fa-css-prefix}-video-camera:before { content: $fa-var-video-camera; }\n.#{$fa-css-prefix}-photo:before,\n.#{$fa-css-prefix}-image:before,\n.#{$fa-css-prefix}-picture-o:before { content: $fa-var-picture-o; }\n.#{$fa-css-prefix}-pencil:before { content: $fa-var-pencil; }\n.#{$fa-css-prefix}-map-marker:before { content: $fa-var-map-marker; }\n.#{$fa-css-prefix}-adjust:before { content: $fa-var-adjust; }\n.#{$fa-css-prefix}-tint:before { content: $fa-var-tint; }\n.#{$fa-css-prefix}-edit:before,\n.#{$fa-css-prefix}-pencil-square-o:before { content: $fa-var-pencil-square-o; }\n.#{$fa-css-prefix}-share-square-o:before { content: $fa-var-share-square-o; }\n.#{$fa-css-prefix}-check-square-o:before { content: $fa-var-check-square-o; }\n.#{$fa-css-prefix}-arrows:before { content: $fa-var-arrows; }\n.#{$fa-css-prefix}-step-backward:before { content: $fa-var-step-backward; }\n.#{$fa-css-prefix}-fast-backward:before { content: $fa-var-fast-backward; }\n.#{$fa-css-prefix}-backward:before { content: $fa-var-backward; }\n.#{$fa-css-prefix}-play:before { content: $fa-var-play; }\n.#{$fa-css-prefix}-pause:before { content: $fa-var-pause; }\n.#{$fa-css-prefix}-stop:before { content: $fa-var-stop; }\n.#{$fa-css-prefix}-forward:before { content: $fa-var-forward; }\n.#{$fa-css-prefix}-fast-forward:before { content: $fa-var-fast-forward; }\n.#{$fa-css-prefix}-step-forward:before { content: $fa-var-step-forward; }\n.#{$fa-css-prefix}-eject:before { content: $fa-var-eject; }\n.#{$fa-css-prefix}-chevron-left:before { content: $fa-var-chevron-left; }\n.#{$fa-css-prefix}-chevron-right:before { content: $fa-var-chevron-right; }\n.#{$fa-css-prefix}-plus-circle:before { content: $fa-var-plus-circle; }\n.#{$fa-css-prefix}-minus-circle:before { content: $fa-var-minus-circle; }\n.#{$fa-css-prefix}-times-circle:before { content: $fa-var-times-circle; }\n.#{$fa-css-prefix}-check-circle:before { content: $fa-var-check-circle; }\n.#{$fa-css-prefix}-question-circle:before { content: $fa-var-question-circle; }\n.#{$fa-css-prefix}-info-circle:before { content: $fa-var-info-circle; }\n.#{$fa-css-prefix}-crosshairs:before { content: $fa-var-crosshairs; }\n.#{$fa-css-prefix}-times-circle-o:before { content: $fa-var-times-circle-o; }\n.#{$fa-css-prefix}-check-circle-o:before { content: $fa-var-check-circle-o; }\n.#{$fa-css-prefix}-ban:before { content: $fa-var-ban; }\n.#{$fa-css-prefix}-arrow-left:before { content: $fa-var-arrow-left; }\n.#{$fa-css-prefix}-arrow-right:before { content: $fa-var-arrow-right; }\n.#{$fa-css-prefix}-arrow-up:before { content: $fa-var-arrow-up; }\n.#{$fa-css-prefix}-arrow-down:before { content: $fa-var-arrow-down; }\n.#{$fa-css-prefix}-mail-forward:before,\n.#{$fa-css-prefix}-share:before { content: $fa-var-share; }\n.#{$fa-css-prefix}-expand:before { content: $fa-var-expand; }\n.#{$fa-css-prefix}-compress:before { content: $fa-var-compress; }\n.#{$fa-css-prefix}-plus:before { content: $fa-var-plus; }\n.#{$fa-css-prefix}-minus:before { content: $fa-var-minus; }\n.#{$fa-css-prefix}-asterisk:before { content: $fa-var-asterisk; }\n.#{$fa-css-prefix}-exclamation-circle:before { content: $fa-var-exclamation-circle; }\n.#{$fa-css-prefix}-gift:before { content: $fa-var-gift; }\n.#{$fa-css-prefix}-leaf:before { content: $fa-var-leaf; }\n.#{$fa-css-prefix}-fire:before { content: $fa-var-fire; }\n.#{$fa-css-prefix}-eye:before { content: $fa-var-eye; }\n.#{$fa-css-prefix}-eye-slash:before { content: $fa-var-eye-slash; }\n.#{$fa-css-prefix}-warning:before,\n.#{$fa-css-prefix}-exclamation-triangle:before { content: $fa-var-exclamation-triangle; }\n.#{$fa-css-prefix}-plane:before { content: $fa-var-plane; }\n.#{$fa-css-prefix}-calendar:before { content: $fa-var-calendar; }\n.#{$fa-css-prefix}-random:before { content: $fa-var-random; }\n.#{$fa-css-prefix}-comment:before { content: $fa-var-comment; }\n.#{$fa-css-prefix}-magnet:before { content: $fa-var-magnet; }\n.#{$fa-css-prefix}-chevron-up:before { content: $fa-var-chevron-up; }\n.#{$fa-css-prefix}-chevron-down:before { content: $fa-var-chevron-down; }\n.#{$fa-css-prefix}-retweet:before { content: $fa-var-retweet; }\n.#{$fa-css-prefix}-shopping-cart:before { content: $fa-var-shopping-cart; }\n.#{$fa-css-prefix}-folder:before { content: $fa-var-folder; }\n.#{$fa-css-prefix}-folder-open:before { content: $fa-var-folder-open; }\n.#{$fa-css-prefix}-arrows-v:before { content: $fa-var-arrows-v; }\n.#{$fa-css-prefix}-arrows-h:before { content: $fa-var-arrows-h; }\n.#{$fa-css-prefix}-bar-chart-o:before,\n.#{$fa-css-prefix}-bar-chart:before { content: $fa-var-bar-chart; }\n.#{$fa-css-prefix}-twitter-square:before { content: $fa-var-twitter-square; }\n.#{$fa-css-prefix}-facebook-square:before { content: $fa-var-facebook-square; }\n.#{$fa-css-prefix}-camera-retro:before { content: $fa-var-camera-retro; }\n.#{$fa-css-prefix}-key:before { content: $fa-var-key; }\n.#{$fa-css-prefix}-gears:before,\n.#{$fa-css-prefix}-cogs:before { content: $fa-var-cogs; }\n.#{$fa-css-prefix}-comments:before { content: $fa-var-comments; }\n.#{$fa-css-prefix}-thumbs-o-up:before { content: $fa-var-thumbs-o-up; }\n.#{$fa-css-prefix}-thumbs-o-down:before { content: $fa-var-thumbs-o-down; }\n.#{$fa-css-prefix}-star-half:before { content: $fa-var-star-half; }\n.#{$fa-css-prefix}-heart-o:before { content: $fa-var-heart-o; }\n.#{$fa-css-prefix}-sign-out:before { content: $fa-var-sign-out; }\n.#{$fa-css-prefix}-linkedin-square:before { content: $fa-var-linkedin-square; }\n.#{$fa-css-prefix}-thumb-tack:before { content: $fa-var-thumb-tack; }\n.#{$fa-css-prefix}-external-link:before { content: $fa-var-external-link; }\n.#{$fa-css-prefix}-sign-in:before { content: $fa-var-sign-in; }\n.#{$fa-css-prefix}-trophy:before { content: $fa-var-trophy; }\n.#{$fa-css-prefix}-github-square:before { content: $fa-var-github-square; }\n.#{$fa-css-prefix}-upload:before { content: $fa-var-upload; }\n.#{$fa-css-prefix}-lemon-o:before { content: $fa-var-lemon-o; }\n.#{$fa-css-prefix}-phone:before { content: $fa-var-phone; }\n.#{$fa-css-prefix}-square-o:before { content: $fa-var-square-o; }\n.#{$fa-css-prefix}-bookmark-o:before { content: $fa-var-bookmark-o; }\n.#{$fa-css-prefix}-phone-square:before { content: $fa-var-phone-square; }\n.#{$fa-css-prefix}-twitter:before { content: $fa-var-twitter; }\n.#{$fa-css-prefix}-facebook-f:before,\n.#{$fa-css-prefix}-facebook:before { content: $fa-var-facebook; }\n.#{$fa-css-prefix}-github:before { content: $fa-var-github; }\n.#{$fa-css-prefix}-unlock:before { content: $fa-var-unlock; }\n.#{$fa-css-prefix}-credit-card:before { content: $fa-var-credit-card; }\n.#{$fa-css-prefix}-feed:before,\n.#{$fa-css-prefix}-rss:before { content: $fa-var-rss; }\n.#{$fa-css-prefix}-hdd-o:before { content: $fa-var-hdd-o; }\n.#{$fa-css-prefix}-bullhorn:before { content: $fa-var-bullhorn; }\n.#{$fa-css-prefix}-bell:before { content: $fa-var-bell; }\n.#{$fa-css-prefix}-certificate:before { content: $fa-var-certificate; }\n.#{$fa-css-prefix}-hand-o-right:before { content: $fa-var-hand-o-right; }\n.#{$fa-css-prefix}-hand-o-left:before { content: $fa-var-hand-o-left; }\n.#{$fa-css-prefix}-hand-o-up:before { content: $fa-var-hand-o-up; }\n.#{$fa-css-prefix}-hand-o-down:before { content: $fa-var-hand-o-down; }\n.#{$fa-css-prefix}-arrow-circle-left:before { content: $fa-var-arrow-circle-left; }\n.#{$fa-css-prefix}-arrow-circle-right:before { content: $fa-var-arrow-circle-right; }\n.#{$fa-css-prefix}-arrow-circle-up:before { content: $fa-var-arrow-circle-up; }\n.#{$fa-css-prefix}-arrow-circle-down:before { content: $fa-var-arrow-circle-down; }\n.#{$fa-css-prefix}-globe:before { content: $fa-var-globe; }\n.#{$fa-css-prefix}-wrench:before { content: $fa-var-wrench; }\n.#{$fa-css-prefix}-tasks:before { content: $fa-var-tasks; }\n.#{$fa-css-prefix}-filter:before { content: $fa-var-filter; }\n.#{$fa-css-prefix}-briefcase:before { content: $fa-var-briefcase; }\n.#{$fa-css-prefix}-arrows-alt:before { content: $fa-var-arrows-alt; }\n.#{$fa-css-prefix}-group:before,\n.#{$fa-css-prefix}-users:before { content: $fa-var-users; }\n.#{$fa-css-prefix}-chain:before,\n.#{$fa-css-prefix}-link:before { content: $fa-var-link; }\n.#{$fa-css-prefix}-cloud:before { content: $fa-var-cloud; }\n.#{$fa-css-prefix}-flask:before { content: $fa-var-flask; }\n.#{$fa-css-prefix}-cut:before,\n.#{$fa-css-prefix}-scissors:before { content: $fa-var-scissors; }\n.#{$fa-css-prefix}-copy:before,\n.#{$fa-css-prefix}-files-o:before { content: $fa-var-files-o; }\n.#{$fa-css-prefix}-paperclip:before { content: $fa-var-paperclip; }\n.#{$fa-css-prefix}-save:before,\n.#{$fa-css-prefix}-floppy-o:before { content: $fa-var-floppy-o; }\n.#{$fa-css-prefix}-square:before { content: $fa-var-square; }\n.#{$fa-css-prefix}-navicon:before,\n.#{$fa-css-prefix}-reorder:before,\n.#{$fa-css-prefix}-bars:before { content: $fa-var-bars; }\n.#{$fa-css-prefix}-list-ul:before { content: $fa-var-list-ul; }\n.#{$fa-css-prefix}-list-ol:before { content: $fa-var-list-ol; }\n.#{$fa-css-prefix}-strikethrough:before { content: $fa-var-strikethrough; }\n.#{$fa-css-prefix}-underline:before { content: $fa-var-underline; }\n.#{$fa-css-prefix}-table:before { content: $fa-var-table; }\n.#{$fa-css-prefix}-magic:before { content: $fa-var-magic; }\n.#{$fa-css-prefix}-truck:before { content: $fa-var-truck; }\n.#{$fa-css-prefix}-pinterest:before { content: $fa-var-pinterest; }\n.#{$fa-css-prefix}-pinterest-square:before { content: $fa-var-pinterest-square; }\n.#{$fa-css-prefix}-google-plus-square:before { content: $fa-var-google-plus-square; }\n.#{$fa-css-prefix}-google-plus:before { content: $fa-var-google-plus; }\n.#{$fa-css-prefix}-money:before { content: $fa-var-money; }\n.#{$fa-css-prefix}-caret-down:before { content: $fa-var-caret-down; }\n.#{$fa-css-prefix}-caret-up:before { content: $fa-var-caret-up; }\n.#{$fa-css-prefix}-caret-left:before { content: $fa-var-caret-left; }\n.#{$fa-css-prefix}-caret-right:before { content: $fa-var-caret-right; }\n.#{$fa-css-prefix}-columns:before { content: $fa-var-columns; }\n.#{$fa-css-prefix}-unsorted:before,\n.#{$fa-css-prefix}-sort:before { content: $fa-var-sort; }\n.#{$fa-css-prefix}-sort-down:before,\n.#{$fa-css-prefix}-sort-desc:before { content: $fa-var-sort-desc; }\n.#{$fa-css-prefix}-sort-up:before,\n.#{$fa-css-prefix}-sort-asc:before { content: $fa-var-sort-asc; }\n.#{$fa-css-prefix}-envelope:before { content: $fa-var-envelope; }\n.#{$fa-css-prefix}-linkedin:before { content: $fa-var-linkedin; }\n.#{$fa-css-prefix}-rotate-left:before,\n.#{$fa-css-prefix}-undo:before { content: $fa-var-undo; }\n.#{$fa-css-prefix}-legal:before,\n.#{$fa-css-prefix}-gavel:before { content: $fa-var-gavel; }\n.#{$fa-css-prefix}-dashboard:before,\n.#{$fa-css-prefix}-tachometer:before { content: $fa-var-tachometer; }\n.#{$fa-css-prefix}-comment-o:before { content: $fa-var-comment-o; }\n.#{$fa-css-prefix}-comments-o:before { content: $fa-var-comments-o; }\n.#{$fa-css-prefix}-flash:before,\n.#{$fa-css-prefix}-bolt:before { content: $fa-var-bolt; }\n.#{$fa-css-prefix}-sitemap:before { content: $fa-var-sitemap; }\n.#{$fa-css-prefix}-umbrella:before { content: $fa-var-umbrella; }\n.#{$fa-css-prefix}-paste:before,\n.#{$fa-css-prefix}-clipboard:before { content: $fa-var-clipboard; }\n.#{$fa-css-prefix}-lightbulb-o:before { content: $fa-var-lightbulb-o; }\n.#{$fa-css-prefix}-exchange:before { content: $fa-var-exchange; }\n.#{$fa-css-prefix}-cloud-download:before { content: $fa-var-cloud-download; }\n.#{$fa-css-prefix}-cloud-upload:before { content: $fa-var-cloud-upload; }\n.#{$fa-css-prefix}-user-md:before { content: $fa-var-user-md; }\n.#{$fa-css-prefix}-stethoscope:before { content: $fa-var-stethoscope; }\n.#{$fa-css-prefix}-suitcase:before { content: $fa-var-suitcase; }\n.#{$fa-css-prefix}-bell-o:before { content: $fa-var-bell-o; }\n.#{$fa-css-prefix}-coffee:before { content: $fa-var-coffee; }\n.#{$fa-css-prefix}-cutlery:before { content: $fa-var-cutlery; }\n.#{$fa-css-prefix}-file-text-o:before { content: $fa-var-file-text-o; }\n.#{$fa-css-prefix}-building-o:before { content: $fa-var-building-o; }\n.#{$fa-css-prefix}-hospital-o:before { content: $fa-var-hospital-o; }\n.#{$fa-css-prefix}-ambulance:before { content: $fa-var-ambulance; }\n.#{$fa-css-prefix}-medkit:before { content: $fa-var-medkit; }\n.#{$fa-css-prefix}-fighter-jet:before { content: $fa-var-fighter-jet; }\n.#{$fa-css-prefix}-beer:before { content: $fa-var-beer; }\n.#{$fa-css-prefix}-h-square:before { content: $fa-var-h-square; }\n.#{$fa-css-prefix}-plus-square:before { content: $fa-var-plus-square; }\n.#{$fa-css-prefix}-angle-double-left:before { content: $fa-var-angle-double-left; }\n.#{$fa-css-prefix}-angle-double-right:before { content: $fa-var-angle-double-right; }\n.#{$fa-css-prefix}-angle-double-up:before { content: $fa-var-angle-double-up; }\n.#{$fa-css-prefix}-angle-double-down:before { content: $fa-var-angle-double-down; }\n.#{$fa-css-prefix}-angle-left:before { content: $fa-var-angle-left; }\n.#{$fa-css-prefix}-angle-right:before { content: $fa-var-angle-right; }\n.#{$fa-css-prefix}-angle-up:before { content: $fa-var-angle-up; }\n.#{$fa-css-prefix}-angle-down:before { content: $fa-var-angle-down; }\n.#{$fa-css-prefix}-desktop:before { content: $fa-var-desktop; }\n.#{$fa-css-prefix}-laptop:before { content: $fa-var-laptop; }\n.#{$fa-css-prefix}-tablet:before { content: $fa-var-tablet; }\n.#{$fa-css-prefix}-mobile-phone:before,\n.#{$fa-css-prefix}-mobile:before { content: $fa-var-mobile; }\n.#{$fa-css-prefix}-circle-o:before { content: $fa-var-circle-o; }\n.#{$fa-css-prefix}-quote-left:before { content: $fa-var-quote-left; }\n.#{$fa-css-prefix}-quote-right:before { content: $fa-var-quote-right; }\n.#{$fa-css-prefix}-spinner:before { content: $fa-var-spinner; }\n.#{$fa-css-prefix}-circle:before { content: $fa-var-circle; }\n.#{$fa-css-prefix}-mail-reply:before,\n.#{$fa-css-prefix}-reply:before { content: $fa-var-reply; }\n.#{$fa-css-prefix}-github-alt:before { content: $fa-var-github-alt; }\n.#{$fa-css-prefix}-folder-o:before { content: $fa-var-folder-o; }\n.#{$fa-css-prefix}-folder-open-o:before { content: $fa-var-folder-open-o; }\n.#{$fa-css-prefix}-smile-o:before { content: $fa-var-smile-o; }\n.#{$fa-css-prefix}-frown-o:before { content: $fa-var-frown-o; }\n.#{$fa-css-prefix}-meh-o:before { content: $fa-var-meh-o; }\n.#{$fa-css-prefix}-gamepad:before { content: $fa-var-gamepad; }\n.#{$fa-css-prefix}-keyboard-o:before { content: $fa-var-keyboard-o; }\n.#{$fa-css-prefix}-flag-o:before { content: $fa-var-flag-o; }\n.#{$fa-css-prefix}-flag-checkered:before { content: $fa-var-flag-checkered; }\n.#{$fa-css-prefix}-terminal:before { content: $fa-var-terminal; }\n.#{$fa-css-prefix}-code:before { content: $fa-var-code; }\n.#{$fa-css-prefix}-mail-reply-all:before,\n.#{$fa-css-prefix}-reply-all:before { content: $fa-var-reply-all; }\n.#{$fa-css-prefix}-star-half-empty:before,\n.#{$fa-css-prefix}-star-half-full:before,\n.#{$fa-css-prefix}-star-half-o:before { content: $fa-var-star-half-o; }\n.#{$fa-css-prefix}-location-arrow:before { content: $fa-var-location-arrow; }\n.#{$fa-css-prefix}-crop:before { content: $fa-var-crop; }\n.#{$fa-css-prefix}-code-fork:before { content: $fa-var-code-fork; }\n.#{$fa-css-prefix}-unlink:before,\n.#{$fa-css-prefix}-chain-broken:before { content: $fa-var-chain-broken; }\n.#{$fa-css-prefix}-question:before { content: $fa-var-question; }\n.#{$fa-css-prefix}-info:before { content: $fa-var-info; }\n.#{$fa-css-prefix}-exclamation:before { content: $fa-var-exclamation; }\n.#{$fa-css-prefix}-superscript:before { content: $fa-var-superscript; }\n.#{$fa-css-prefix}-subscript:before { content: $fa-var-subscript; }\n.#{$fa-css-prefix}-eraser:before { content: $fa-var-eraser; }\n.#{$fa-css-prefix}-puzzle-piece:before { content: $fa-var-puzzle-piece; }\n.#{$fa-css-prefix}-microphone:before { content: $fa-var-microphone; }\n.#{$fa-css-prefix}-microphone-slash:before { content: $fa-var-microphone-slash; }\n.#{$fa-css-prefix}-shield:before { content: $fa-var-shield; }\n.#{$fa-css-prefix}-calendar-o:before { content: $fa-var-calendar-o; }\n.#{$fa-css-prefix}-fire-extinguisher:before { content: $fa-var-fire-extinguisher; }\n.#{$fa-css-prefix}-rocket:before { content: $fa-var-rocket; }\n.#{$fa-css-prefix}-maxcdn:before { content: $fa-var-maxcdn; }\n.#{$fa-css-prefix}-chevron-circle-left:before { content: $fa-var-chevron-circle-left; }\n.#{$fa-css-prefix}-chevron-circle-right:before { content: $fa-var-chevron-circle-right; }\n.#{$fa-css-prefix}-chevron-circle-up:before { content: $fa-var-chevron-circle-up; }\n.#{$fa-css-prefix}-chevron-circle-down:before { content: $fa-var-chevron-circle-down; }\n.#{$fa-css-prefix}-html5:before { content: $fa-var-html5; }\n.#{$fa-css-prefix}-css3:before { content: $fa-var-css3; }\n.#{$fa-css-prefix}-anchor:before { content: $fa-var-anchor; }\n.#{$fa-css-prefix}-unlock-alt:before { content: $fa-var-unlock-alt; }\n.#{$fa-css-prefix}-bullseye:before { content: $fa-var-bullseye; }\n.#{$fa-css-prefix}-ellipsis-h:before { content: $fa-var-ellipsis-h; }\n.#{$fa-css-prefix}-ellipsis-v:before { content: $fa-var-ellipsis-v; }\n.#{$fa-css-prefix}-rss-square:before { content: $fa-var-rss-square; }\n.#{$fa-css-prefix}-play-circle:before { content: $fa-var-play-circle; }\n.#{$fa-css-prefix}-ticket:before { content: $fa-var-ticket; }\n.#{$fa-css-prefix}-minus-square:before { content: $fa-var-minus-square; }\n.#{$fa-css-prefix}-minus-square-o:before { content: $fa-var-minus-square-o; }\n.#{$fa-css-prefix}-level-up:before { content: $fa-var-level-up; }\n.#{$fa-css-prefix}-level-down:before { content: $fa-var-level-down; }\n.#{$fa-css-prefix}-check-square:before { content: $fa-var-check-square; }\n.#{$fa-css-prefix}-pencil-square:before { content: $fa-var-pencil-square; }\n.#{$fa-css-prefix}-external-link-square:before { content: $fa-var-external-link-square; }\n.#{$fa-css-prefix}-share-square:before { content: $fa-var-share-square; }\n.#{$fa-css-prefix}-compass:before { content: $fa-var-compass; }\n.#{$fa-css-prefix}-toggle-down:before,\n.#{$fa-css-prefix}-caret-square-o-down:before { content: $fa-var-caret-square-o-down; }\n.#{$fa-css-prefix}-toggle-up:before,\n.#{$fa-css-prefix}-caret-square-o-up:before { content: $fa-var-caret-square-o-up; }\n.#{$fa-css-prefix}-toggle-right:before,\n.#{$fa-css-prefix}-caret-square-o-right:before { content: $fa-var-caret-square-o-right; }\n.#{$fa-css-prefix}-euro:before,\n.#{$fa-css-prefix}-eur:before { content: $fa-var-eur; }\n.#{$fa-css-prefix}-gbp:before { content: $fa-var-gbp; }\n.#{$fa-css-prefix}-dollar:before,\n.#{$fa-css-prefix}-usd:before { content: $fa-var-usd; }\n.#{$fa-css-prefix}-rupee:before,\n.#{$fa-css-prefix}-inr:before { content: $fa-var-inr; }\n.#{$fa-css-prefix}-cny:before,\n.#{$fa-css-prefix}-rmb:before,\n.#{$fa-css-prefix}-yen:before,\n.#{$fa-css-prefix}-jpy:before { content: $fa-var-jpy; }\n.#{$fa-css-prefix}-ruble:before,\n.#{$fa-css-prefix}-rouble:before,\n.#{$fa-css-prefix}-rub:before { content: $fa-var-rub; }\n.#{$fa-css-prefix}-won:before,\n.#{$fa-css-prefix}-krw:before { content: $fa-var-krw; }\n.#{$fa-css-prefix}-bitcoin:before,\n.#{$fa-css-prefix}-btc:before { content: $fa-var-btc; }\n.#{$fa-css-prefix}-file:before { content: $fa-var-file; }\n.#{$fa-css-prefix}-file-text:before { content: $fa-var-file-text; }\n.#{$fa-css-prefix}-sort-alpha-asc:before { content: $fa-var-sort-alpha-asc; }\n.#{$fa-css-prefix}-sort-alpha-desc:before { content: $fa-var-sort-alpha-desc; }\n.#{$fa-css-prefix}-sort-amount-asc:before { content: $fa-var-sort-amount-asc; }\n.#{$fa-css-prefix}-sort-amount-desc:before { content: $fa-var-sort-amount-desc; }\n.#{$fa-css-prefix}-sort-numeric-asc:before { content: $fa-var-sort-numeric-asc; }\n.#{$fa-css-prefix}-sort-numeric-desc:before { content: $fa-var-sort-numeric-desc; }\n.#{$fa-css-prefix}-thumbs-up:before { content: $fa-var-thumbs-up; }\n.#{$fa-css-prefix}-thumbs-down:before { content: $fa-var-thumbs-down; }\n.#{$fa-css-prefix}-youtube-square:before { content: $fa-var-youtube-square; }\n.#{$fa-css-prefix}-youtube:before { content: $fa-var-youtube; }\n.#{$fa-css-prefix}-xing:before { content: $fa-var-xing; }\n.#{$fa-css-prefix}-xing-square:before { content: $fa-var-xing-square; }\n.#{$fa-css-prefix}-youtube-play:before { content: $fa-var-youtube-play; }\n.#{$fa-css-prefix}-dropbox:before { content: $fa-var-dropbox; }\n.#{$fa-css-prefix}-stack-overflow:before { content: $fa-var-stack-overflow; }\n.#{$fa-css-prefix}-instagram:before { content: $fa-var-instagram; }\n.#{$fa-css-prefix}-flickr:before { content: $fa-var-flickr; }\n.#{$fa-css-prefix}-adn:before { content: $fa-var-adn; }\n.#{$fa-css-prefix}-bitbucket:before { content: $fa-var-bitbucket; }\n.#{$fa-css-prefix}-bitbucket-square:before { content: $fa-var-bitbucket-square; }\n.#{$fa-css-prefix}-tumblr:before { content: $fa-var-tumblr; }\n.#{$fa-css-prefix}-tumblr-square:before { content: $fa-var-tumblr-square; }\n.#{$fa-css-prefix}-long-arrow-down:before { content: $fa-var-long-arrow-down; }\n.#{$fa-css-prefix}-long-arrow-up:before { content: $fa-var-long-arrow-up; }\n.#{$fa-css-prefix}-long-arrow-left:before { content: $fa-var-long-arrow-left; }\n.#{$fa-css-prefix}-long-arrow-right:before { content: $fa-var-long-arrow-right; }\n.#{$fa-css-prefix}-apple:before { content: $fa-var-apple; }\n.#{$fa-css-prefix}-windows:before { content: $fa-var-windows; }\n.#{$fa-css-prefix}-android:before { content: $fa-var-android; }\n.#{$fa-css-prefix}-linux:before { content: $fa-var-linux; }\n.#{$fa-css-prefix}-dribbble:before { content: $fa-var-dribbble; }\n.#{$fa-css-prefix}-skype:before { content: $fa-var-skype; }\n.#{$fa-css-prefix}-foursquare:before { content: $fa-var-foursquare; }\n.#{$fa-css-prefix}-trello:before { content: $fa-var-trello; }\n.#{$fa-css-prefix}-female:before { content: $fa-var-female; }\n.#{$fa-css-prefix}-male:before { content: $fa-var-male; }\n.#{$fa-css-prefix}-gittip:before,\n.#{$fa-css-prefix}-gratipay:before { content: $fa-var-gratipay; }\n.#{$fa-css-prefix}-sun-o:before { content: $fa-var-sun-o; }\n.#{$fa-css-prefix}-moon-o:before { content: $fa-var-moon-o; }\n.#{$fa-css-prefix}-archive:before { content: $fa-var-archive; }\n.#{$fa-css-prefix}-bug:before { content: $fa-var-bug; }\n.#{$fa-css-prefix}-vk:before { content: $fa-var-vk; }\n.#{$fa-css-prefix}-weibo:before { content: $fa-var-weibo; }\n.#{$fa-css-prefix}-renren:before { content: $fa-var-renren; }\n.#{$fa-css-prefix}-pagelines:before { content: $fa-var-pagelines; }\n.#{$fa-css-prefix}-stack-exchange:before { content: $fa-var-stack-exchange; }\n.#{$fa-css-prefix}-arrow-circle-o-right:before { content: $fa-var-arrow-circle-o-right; }\n.#{$fa-css-prefix}-arrow-circle-o-left:before { content: $fa-var-arrow-circle-o-left; }\n.#{$fa-css-prefix}-toggle-left:before,\n.#{$fa-css-prefix}-caret-square-o-left:before { content: $fa-var-caret-square-o-left; }\n.#{$fa-css-prefix}-dot-circle-o:before { content: $fa-var-dot-circle-o; }\n.#{$fa-css-prefix}-wheelchair:before { content: $fa-var-wheelchair; }\n.#{$fa-css-prefix}-vimeo-square:before { content: $fa-var-vimeo-square; }\n.#{$fa-css-prefix}-turkish-lira:before,\n.#{$fa-css-prefix}-try:before { content: $fa-var-try; }\n.#{$fa-css-prefix}-plus-square-o:before { content: $fa-var-plus-square-o; }\n.#{$fa-css-prefix}-space-shuttle:before { content: $fa-var-space-shuttle; }\n.#{$fa-css-prefix}-slack:before { content: $fa-var-slack; }\n.#{$fa-css-prefix}-envelope-square:before { content: $fa-var-envelope-square; }\n.#{$fa-css-prefix}-wordpress:before { content: $fa-var-wordpress; }\n.#{$fa-css-prefix}-openid:before { content: $fa-var-openid; }\n.#{$fa-css-prefix}-institution:before,\n.#{$fa-css-prefix}-bank:before,\n.#{$fa-css-prefix}-university:before { content: $fa-var-university; }\n.#{$fa-css-prefix}-mortar-board:before,\n.#{$fa-css-prefix}-graduation-cap:before { content: $fa-var-graduation-cap; }\n.#{$fa-css-prefix}-yahoo:before { content: $fa-var-yahoo; }\n.#{$fa-css-prefix}-google:before { content: $fa-var-google; }\n.#{$fa-css-prefix}-reddit:before { content: $fa-var-reddit; }\n.#{$fa-css-prefix}-reddit-square:before { content: $fa-var-reddit-square; }\n.#{$fa-css-prefix}-stumbleupon-circle:before { content: $fa-var-stumbleupon-circle; }\n.#{$fa-css-prefix}-stumbleupon:before { content: $fa-var-stumbleupon; }\n.#{$fa-css-prefix}-delicious:before { content: $fa-var-delicious; }\n.#{$fa-css-prefix}-digg:before { content: $fa-var-digg; }\n.#{$fa-css-prefix}-pied-piper-pp:before { content: $fa-var-pied-piper-pp; }\n.#{$fa-css-prefix}-pied-piper-alt:before { content: $fa-var-pied-piper-alt; }\n.#{$fa-css-prefix}-drupal:before { content: $fa-var-drupal; }\n.#{$fa-css-prefix}-joomla:before { content: $fa-var-joomla; }\n.#{$fa-css-prefix}-language:before { content: $fa-var-language; }\n.#{$fa-css-prefix}-fax:before { content: $fa-var-fax; }\n.#{$fa-css-prefix}-building:before { content: $fa-var-building; }\n.#{$fa-css-prefix}-child:before { content: $fa-var-child; }\n.#{$fa-css-prefix}-paw:before { content: $fa-var-paw; }\n.#{$fa-css-prefix}-spoon:before { content: $fa-var-spoon; }\n.#{$fa-css-prefix}-cube:before { content: $fa-var-cube; }\n.#{$fa-css-prefix}-cubes:before { content: $fa-var-cubes; }\n.#{$fa-css-prefix}-behance:before { content: $fa-var-behance; }\n.#{$fa-css-prefix}-behance-square:before { content: $fa-var-behance-square; }\n.#{$fa-css-prefix}-steam:before { content: $fa-var-steam; }\n.#{$fa-css-prefix}-steam-square:before { content: $fa-var-steam-square; }\n.#{$fa-css-prefix}-recycle:before { content: $fa-var-recycle; }\n.#{$fa-css-prefix}-automobile:before,\n.#{$fa-css-prefix}-car:before { content: $fa-var-car; }\n.#{$fa-css-prefix}-cab:before,\n.#{$fa-css-prefix}-taxi:before { content: $fa-var-taxi; }\n.#{$fa-css-prefix}-tree:before { content: $fa-var-tree; }\n.#{$fa-css-prefix}-spotify:before { content: $fa-var-spotify; }\n.#{$fa-css-prefix}-deviantart:before { content: $fa-var-deviantart; }\n.#{$fa-css-prefix}-soundcloud:before { content: $fa-var-soundcloud; }\n.#{$fa-css-prefix}-database:before { content: $fa-var-database; }\n.#{$fa-css-prefix}-file-pdf-o:before { content: $fa-var-file-pdf-o; }\n.#{$fa-css-prefix}-file-word-o:before { content: $fa-var-file-word-o; }\n.#{$fa-css-prefix}-file-excel-o:before { content: $fa-var-file-excel-o; }\n.#{$fa-css-prefix}-file-powerpoint-o:before { content: $fa-var-file-powerpoint-o; }\n.#{$fa-css-prefix}-file-photo-o:before,\n.#{$fa-css-prefix}-file-picture-o:before,\n.#{$fa-css-prefix}-file-image-o:before { content: $fa-var-file-image-o; }\n.#{$fa-css-prefix}-file-zip-o:before,\n.#{$fa-css-prefix}-file-archive-o:before { content: $fa-var-file-archive-o; }\n.#{$fa-css-prefix}-file-sound-o:before,\n.#{$fa-css-prefix}-file-audio-o:before { content: $fa-var-file-audio-o; }\n.#{$fa-css-prefix}-file-movie-o:before,\n.#{$fa-css-prefix}-file-video-o:before { content: $fa-var-file-video-o; }\n.#{$fa-css-prefix}-file-code-o:before { content: $fa-var-file-code-o; }\n.#{$fa-css-prefix}-vine:before { content: $fa-var-vine; }\n.#{$fa-css-prefix}-codepen:before { content: $fa-var-codepen; }\n.#{$fa-css-prefix}-jsfiddle:before { content: $fa-var-jsfiddle; }\n.#{$fa-css-prefix}-life-bouy:before,\n.#{$fa-css-prefix}-life-buoy:before,\n.#{$fa-css-prefix}-life-saver:before,\n.#{$fa-css-prefix}-support:before,\n.#{$fa-css-prefix}-life-ring:before { content: $fa-var-life-ring; }\n.#{$fa-css-prefix}-circle-o-notch:before { content: $fa-var-circle-o-notch; }\n.#{$fa-css-prefix}-ra:before,\n.#{$fa-css-prefix}-resistance:before,\n.#{$fa-css-prefix}-rebel:before { content: $fa-var-rebel; }\n.#{$fa-css-prefix}-ge:before,\n.#{$fa-css-prefix}-empire:before { content: $fa-var-empire; }\n.#{$fa-css-prefix}-git-square:before { content: $fa-var-git-square; }\n.#{$fa-css-prefix}-git:before { content: $fa-var-git; }\n.#{$fa-css-prefix}-y-combinator-square:before,\n.#{$fa-css-prefix}-yc-square:before,\n.#{$fa-css-prefix}-hacker-news:before { content: $fa-var-hacker-news; }\n.#{$fa-css-prefix}-tencent-weibo:before { content: $fa-var-tencent-weibo; }\n.#{$fa-css-prefix}-qq:before { content: $fa-var-qq; }\n.#{$fa-css-prefix}-wechat:before,\n.#{$fa-css-prefix}-weixin:before { content: $fa-var-weixin; }\n.#{$fa-css-prefix}-send:before,\n.#{$fa-css-prefix}-paper-plane:before { content: $fa-var-paper-plane; }\n.#{$fa-css-prefix}-send-o:before,\n.#{$fa-css-prefix}-paper-plane-o:before { content: $fa-var-paper-plane-o; }\n.#{$fa-css-prefix}-history:before { content: $fa-var-history; }\n.#{$fa-css-prefix}-circle-thin:before { content: $fa-var-circle-thin; }\n.#{$fa-css-prefix}-header:before { content: $fa-var-header; }\n.#{$fa-css-prefix}-paragraph:before { content: $fa-var-paragraph; }\n.#{$fa-css-prefix}-sliders:before { content: $fa-var-sliders; }\n.#{$fa-css-prefix}-share-alt:before { content: $fa-var-share-alt; }\n.#{$fa-css-prefix}-share-alt-square:before { content: $fa-var-share-alt-square; }\n.#{$fa-css-prefix}-bomb:before { content: $fa-var-bomb; }\n.#{$fa-css-prefix}-soccer-ball-o:before,\n.#{$fa-css-prefix}-futbol-o:before { content: $fa-var-futbol-o; }\n.#{$fa-css-prefix}-tty:before { content: $fa-var-tty; }\n.#{$fa-css-prefix}-binoculars:before { content: $fa-var-binoculars; }\n.#{$fa-css-prefix}-plug:before { content: $fa-var-plug; }\n.#{$fa-css-prefix}-slideshare:before { content: $fa-var-slideshare; }\n.#{$fa-css-prefix}-twitch:before { content: $fa-var-twitch; }\n.#{$fa-css-prefix}-yelp:before { content: $fa-var-yelp; }\n.#{$fa-css-prefix}-newspaper-o:before { content: $fa-var-newspaper-o; }\n.#{$fa-css-prefix}-wifi:before { content: $fa-var-wifi; }\n.#{$fa-css-prefix}-calculator:before { content: $fa-var-calculator; }\n.#{$fa-css-prefix}-paypal:before { content: $fa-var-paypal; }\n.#{$fa-css-prefix}-google-wallet:before { content: $fa-var-google-wallet; }\n.#{$fa-css-prefix}-cc-visa:before { content: $fa-var-cc-visa; }\n.#{$fa-css-prefix}-cc-mastercard:before { content: $fa-var-cc-mastercard; }\n.#{$fa-css-prefix}-cc-discover:before { content: $fa-var-cc-discover; }\n.#{$fa-css-prefix}-cc-amex:before { content: $fa-var-cc-amex; }\n.#{$fa-css-prefix}-cc-paypal:before { content: $fa-var-cc-paypal; }\n.#{$fa-css-prefix}-cc-stripe:before { content: $fa-var-cc-stripe; }\n.#{$fa-css-prefix}-bell-slash:before { content: $fa-var-bell-slash; }\n.#{$fa-css-prefix}-bell-slash-o:before { content: $fa-var-bell-slash-o; }\n.#{$fa-css-prefix}-trash:before { content: $fa-var-trash; }\n.#{$fa-css-prefix}-copyright:before { content: $fa-var-copyright; }\n.#{$fa-css-prefix}-at:before { content: $fa-var-at; }\n.#{$fa-css-prefix}-eyedropper:before { content: $fa-var-eyedropper; }\n.#{$fa-css-prefix}-paint-brush:before { content: $fa-var-paint-brush; }\n.#{$fa-css-prefix}-birthday-cake:before { content: $fa-var-birthday-cake; }\n.#{$fa-css-prefix}-area-chart:before { content: $fa-var-area-chart; }\n.#{$fa-css-prefix}-pie-chart:before { content: $fa-var-pie-chart; }\n.#{$fa-css-prefix}-line-chart:before { content: $fa-var-line-chart; }\n.#{$fa-css-prefix}-lastfm:before { content: $fa-var-lastfm; }\n.#{$fa-css-prefix}-lastfm-square:before { content: $fa-var-lastfm-square; }\n.#{$fa-css-prefix}-toggle-off:before { content: $fa-var-toggle-off; }\n.#{$fa-css-prefix}-toggle-on:before { content: $fa-var-toggle-on; }\n.#{$fa-css-prefix}-bicycle:before { content: $fa-var-bicycle; }\n.#{$fa-css-prefix}-bus:before { content: $fa-var-bus; }\n.#{$fa-css-prefix}-ioxhost:before { content: $fa-var-ioxhost; }\n.#{$fa-css-prefix}-angellist:before { content: $fa-var-angellist; }\n.#{$fa-css-prefix}-cc:before { content: $fa-var-cc; }\n.#{$fa-css-prefix}-shekel:before,\n.#{$fa-css-prefix}-sheqel:before,\n.#{$fa-css-prefix}-ils:before { content: $fa-var-ils; }\n.#{$fa-css-prefix}-meanpath:before { content: $fa-var-meanpath; }\n.#{$fa-css-prefix}-buysellads:before { content: $fa-var-buysellads; }\n.#{$fa-css-prefix}-connectdevelop:before { content: $fa-var-connectdevelop; }\n.#{$fa-css-prefix}-dashcube:before { content: $fa-var-dashcube; }\n.#{$fa-css-prefix}-forumbee:before { content: $fa-var-forumbee; }\n.#{$fa-css-prefix}-leanpub:before { content: $fa-var-leanpub; }\n.#{$fa-css-prefix}-sellsy:before { content: $fa-var-sellsy; }\n.#{$fa-css-prefix}-shirtsinbulk:before { content: $fa-var-shirtsinbulk; }\n.#{$fa-css-prefix}-simplybuilt:before { content: $fa-var-simplybuilt; }\n.#{$fa-css-prefix}-skyatlas:before { content: $fa-var-skyatlas; }\n.#{$fa-css-prefix}-cart-plus:before { content: $fa-var-cart-plus; }\n.#{$fa-css-prefix}-cart-arrow-down:before { content: $fa-var-cart-arrow-down; }\n.#{$fa-css-prefix}-diamond:before { content: $fa-var-diamond; }\n.#{$fa-css-prefix}-ship:before { content: $fa-var-ship; }\n.#{$fa-css-prefix}-user-secret:before { content: $fa-var-user-secret; }\n.#{$fa-css-prefix}-motorcycle:before { content: $fa-var-motorcycle; }\n.#{$fa-css-prefix}-street-view:before { content: $fa-var-street-view; }\n.#{$fa-css-prefix}-heartbeat:before { content: $fa-var-heartbeat; }\n.#{$fa-css-prefix}-venus:before { content: $fa-var-venus; }\n.#{$fa-css-prefix}-mars:before { content: $fa-var-mars; }\n.#{$fa-css-prefix}-mercury:before { content: $fa-var-mercury; }\n.#{$fa-css-prefix}-intersex:before,\n.#{$fa-css-prefix}-transgender:before { content: $fa-var-transgender; }\n.#{$fa-css-prefix}-transgender-alt:before { content: $fa-var-transgender-alt; }\n.#{$fa-css-prefix}-venus-double:before { content: $fa-var-venus-double; }\n.#{$fa-css-prefix}-mars-double:before { content: $fa-var-mars-double; }\n.#{$fa-css-prefix}-venus-mars:before { content: $fa-var-venus-mars; }\n.#{$fa-css-prefix}-mars-stroke:before { content: $fa-var-mars-stroke; }\n.#{$fa-css-prefix}-mars-stroke-v:before { content: $fa-var-mars-stroke-v; }\n.#{$fa-css-prefix}-mars-stroke-h:before { content: $fa-var-mars-stroke-h; }\n.#{$fa-css-prefix}-neuter:before { content: $fa-var-neuter; }\n.#{$fa-css-prefix}-genderless:before { content: $fa-var-genderless; }\n.#{$fa-css-prefix}-facebook-official:before { content: $fa-var-facebook-official; }\n.#{$fa-css-prefix}-pinterest-p:before { content: $fa-var-pinterest-p; }\n.#{$fa-css-prefix}-whatsapp:before { content: $fa-var-whatsapp; }\n.#{$fa-css-prefix}-server:before { content: $fa-var-server; }\n.#{$fa-css-prefix}-user-plus:before { content: $fa-var-user-plus; }\n.#{$fa-css-prefix}-user-times:before { content: $fa-var-user-times; }\n.#{$fa-css-prefix}-hotel:before,\n.#{$fa-css-prefix}-bed:before { content: $fa-var-bed; }\n.#{$fa-css-prefix}-viacoin:before { content: $fa-var-viacoin; }\n.#{$fa-css-prefix}-train:before { content: $fa-var-train; }\n.#{$fa-css-prefix}-subway:before { content: $fa-var-subway; }\n.#{$fa-css-prefix}-medium:before { content: $fa-var-medium; }\n.#{$fa-css-prefix}-yc:before,\n.#{$fa-css-prefix}-y-combinator:before { content: $fa-var-y-combinator; }\n.#{$fa-css-prefix}-optin-monster:before { content: $fa-var-optin-monster; }\n.#{$fa-css-prefix}-opencart:before { content: $fa-var-opencart; }\n.#{$fa-css-prefix}-expeditedssl:before { content: $fa-var-expeditedssl; }\n.#{$fa-css-prefix}-battery-4:before,\n.#{$fa-css-prefix}-battery-full:before { content: $fa-var-battery-full; }\n.#{$fa-css-prefix}-battery-3:before,\n.#{$fa-css-prefix}-battery-three-quarters:before { content: $fa-var-battery-three-quarters; }\n.#{$fa-css-prefix}-battery-2:before,\n.#{$fa-css-prefix}-battery-half:before { content: $fa-var-battery-half; }\n.#{$fa-css-prefix}-battery-1:before,\n.#{$fa-css-prefix}-battery-quarter:before { content: $fa-var-battery-quarter; }\n.#{$fa-css-prefix}-battery-0:before,\n.#{$fa-css-prefix}-battery-empty:before { content: $fa-var-battery-empty; }\n.#{$fa-css-prefix}-mouse-pointer:before { content: $fa-var-mouse-pointer; }\n.#{$fa-css-prefix}-i-cursor:before { content: $fa-var-i-cursor; }\n.#{$fa-css-prefix}-object-group:before { content: $fa-var-object-group; }\n.#{$fa-css-prefix}-object-ungroup:before { content: $fa-var-object-ungroup; }\n.#{$fa-css-prefix}-sticky-note:before { content: $fa-var-sticky-note; }\n.#{$fa-css-prefix}-sticky-note-o:before { content: $fa-var-sticky-note-o; }\n.#{$fa-css-prefix}-cc-jcb:before { content: $fa-var-cc-jcb; }\n.#{$fa-css-prefix}-cc-diners-club:before { content: $fa-var-cc-diners-club; }\n.#{$fa-css-prefix}-clone:before { content: $fa-var-clone; }\n.#{$fa-css-prefix}-balance-scale:before { content: $fa-var-balance-scale; }\n.#{$fa-css-prefix}-hourglass-o:before { content: $fa-var-hourglass-o; }\n.#{$fa-css-prefix}-hourglass-1:before,\n.#{$fa-css-prefix}-hourglass-start:before { content: $fa-var-hourglass-start; }\n.#{$fa-css-prefix}-hourglass-2:before,\n.#{$fa-css-prefix}-hourglass-half:before { content: $fa-var-hourglass-half; }\n.#{$fa-css-prefix}-hourglass-3:before,\n.#{$fa-css-prefix}-hourglass-end:before { content: $fa-var-hourglass-end; }\n.#{$fa-css-prefix}-hourglass:before { content: $fa-var-hourglass; }\n.#{$fa-css-prefix}-hand-grab-o:before,\n.#{$fa-css-prefix}-hand-rock-o:before { content: $fa-var-hand-rock-o; }\n.#{$fa-css-prefix}-hand-stop-o:before,\n.#{$fa-css-prefix}-hand-paper-o:before { content: $fa-var-hand-paper-o; }\n.#{$fa-css-prefix}-hand-scissors-o:before { content: $fa-var-hand-scissors-o; }\n.#{$fa-css-prefix}-hand-lizard-o:before { content: $fa-var-hand-lizard-o; }\n.#{$fa-css-prefix}-hand-spock-o:before { content: $fa-var-hand-spock-o; }\n.#{$fa-css-prefix}-hand-pointer-o:before { content: $fa-var-hand-pointer-o; }\n.#{$fa-css-prefix}-hand-peace-o:before { content: $fa-var-hand-peace-o; }\n.#{$fa-css-prefix}-trademark:before { content: $fa-var-trademark; }\n.#{$fa-css-prefix}-registered:before { content: $fa-var-registered; }\n.#{$fa-css-prefix}-creative-commons:before { content: $fa-var-creative-commons; }\n.#{$fa-css-prefix}-gg:before { content: $fa-var-gg; }\n.#{$fa-css-prefix}-gg-circle:before { content: $fa-var-gg-circle; }\n.#{$fa-css-prefix}-tripadvisor:before { content: $fa-var-tripadvisor; }\n.#{$fa-css-prefix}-odnoklassniki:before { content: $fa-var-odnoklassniki; }\n.#{$fa-css-prefix}-odnoklassniki-square:before { content: $fa-var-odnoklassniki-square; }\n.#{$fa-css-prefix}-get-pocket:before { content: $fa-var-get-pocket; }\n.#{$fa-css-prefix}-wikipedia-w:before { content: $fa-var-wikipedia-w; }\n.#{$fa-css-prefix}-safari:before { content: $fa-var-safari; }\n.#{$fa-css-prefix}-chrome:before { content: $fa-var-chrome; }\n.#{$fa-css-prefix}-firefox:before { content: $fa-var-firefox; }\n.#{$fa-css-prefix}-opera:before { content: $fa-var-opera; }\n.#{$fa-css-prefix}-internet-explorer:before { content: $fa-var-internet-explorer; }\n.#{$fa-css-prefix}-tv:before,\n.#{$fa-css-prefix}-television:before { content: $fa-var-television; }\n.#{$fa-css-prefix}-contao:before { content: $fa-var-contao; }\n.#{$fa-css-prefix}-500px:before { content: $fa-var-500px; }\n.#{$fa-css-prefix}-amazon:before { content: $fa-var-amazon; }\n.#{$fa-css-prefix}-calendar-plus-o:before { content: $fa-var-calendar-plus-o; }\n.#{$fa-css-prefix}-calendar-minus-o:before { content: $fa-var-calendar-minus-o; }\n.#{$fa-css-prefix}-calendar-times-o:before { content: $fa-var-calendar-times-o; }\n.#{$fa-css-prefix}-calendar-check-o:before { content: $fa-var-calendar-check-o; }\n.#{$fa-css-prefix}-industry:before { content: $fa-var-industry; }\n.#{$fa-css-prefix}-map-pin:before { content: $fa-var-map-pin; }\n.#{$fa-css-prefix}-map-signs:before { content: $fa-var-map-signs; }\n.#{$fa-css-prefix}-map-o:before { content: $fa-var-map-o; }\n.#{$fa-css-prefix}-map:before { content: $fa-var-map; }\n.#{$fa-css-prefix}-commenting:before { content: $fa-var-commenting; }\n.#{$fa-css-prefix}-commenting-o:before { content: $fa-var-commenting-o; }\n.#{$fa-css-prefix}-houzz:before { content: $fa-var-houzz; }\n.#{$fa-css-prefix}-vimeo:before { content: $fa-var-vimeo; }\n.#{$fa-css-prefix}-black-tie:before { content: $fa-var-black-tie; }\n.#{$fa-css-prefix}-fonticons:before { content: $fa-var-fonticons; }\n.#{$fa-css-prefix}-reddit-alien:before { content: $fa-var-reddit-alien; }\n.#{$fa-css-prefix}-edge:before { content: $fa-var-edge; }\n.#{$fa-css-prefix}-credit-card-alt:before { content: $fa-var-credit-card-alt; }\n.#{$fa-css-prefix}-codiepie:before { content: $fa-var-codiepie; }\n.#{$fa-css-prefix}-modx:before { content: $fa-var-modx; }\n.#{$fa-css-prefix}-fort-awesome:before { content: $fa-var-fort-awesome; }\n.#{$fa-css-prefix}-usb:before { content: $fa-var-usb; }\n.#{$fa-css-prefix}-product-hunt:before { content: $fa-var-product-hunt; }\n.#{$fa-css-prefix}-mixcloud:before { content: $fa-var-mixcloud; }\n.#{$fa-css-prefix}-scribd:before { content: $fa-var-scribd; }\n.#{$fa-css-prefix}-pause-circle:before { content: $fa-var-pause-circle; }\n.#{$fa-css-prefix}-pause-circle-o:before { content: $fa-var-pause-circle-o; }\n.#{$fa-css-prefix}-stop-circle:before { content: $fa-var-stop-circle; }\n.#{$fa-css-prefix}-stop-circle-o:before { content: $fa-var-stop-circle-o; }\n.#{$fa-css-prefix}-shopping-bag:before { content: $fa-var-shopping-bag; }\n.#{$fa-css-prefix}-shopping-basket:before { content: $fa-var-shopping-basket; }\n.#{$fa-css-prefix}-hashtag:before { content: $fa-var-hashtag; }\n.#{$fa-css-prefix}-bluetooth:before { content: $fa-var-bluetooth; }\n.#{$fa-css-prefix}-bluetooth-b:before { content: $fa-var-bluetooth-b; }\n.#{$fa-css-prefix}-percent:before { content: $fa-var-percent; }\n.#{$fa-css-prefix}-gitlab:before { content: $fa-var-gitlab; }\n.#{$fa-css-prefix}-wpbeginner:before { content: $fa-var-wpbeginner; }\n.#{$fa-css-prefix}-wpforms:before { content: $fa-var-wpforms; }\n.#{$fa-css-prefix}-envira:before { content: $fa-var-envira; }\n.#{$fa-css-prefix}-universal-access:before { content: $fa-var-universal-access; }\n.#{$fa-css-prefix}-wheelchair-alt:before { content: $fa-var-wheelchair-alt; }\n.#{$fa-css-prefix}-question-circle-o:before { content: $fa-var-question-circle-o; }\n.#{$fa-css-prefix}-blind:before { content: $fa-var-blind; }\n.#{$fa-css-prefix}-audio-description:before { content: $fa-var-audio-description; }\n.#{$fa-css-prefix}-volume-control-phone:before { content: $fa-var-volume-control-phone; }\n.#{$fa-css-prefix}-braille:before { content: $fa-var-braille; }\n.#{$fa-css-prefix}-assistive-listening-systems:before { content: $fa-var-assistive-listening-systems; }\n.#{$fa-css-prefix}-asl-interpreting:before,\n.#{$fa-css-prefix}-american-sign-language-interpreting:before { content: $fa-var-american-sign-language-interpreting; }\n.#{$fa-css-prefix}-deafness:before,\n.#{$fa-css-prefix}-hard-of-hearing:before,\n.#{$fa-css-prefix}-deaf:before { content: $fa-var-deaf; }\n.#{$fa-css-prefix}-glide:before { content: $fa-var-glide; }\n.#{$fa-css-prefix}-glide-g:before { content: $fa-var-glide-g; }\n.#{$fa-css-prefix}-signing:before,\n.#{$fa-css-prefix}-sign-language:before { content: $fa-var-sign-language; }\n.#{$fa-css-prefix}-low-vision:before { content: $fa-var-low-vision; }\n.#{$fa-css-prefix}-viadeo:before { content: $fa-var-viadeo; }\n.#{$fa-css-prefix}-viadeo-square:before { content: $fa-var-viadeo-square; }\n.#{$fa-css-prefix}-snapchat:before { content: $fa-var-snapchat; }\n.#{$fa-css-prefix}-snapchat-ghost:before { content: $fa-var-snapchat-ghost; }\n.#{$fa-css-prefix}-snapchat-square:before { content: $fa-var-snapchat-square; }\n.#{$fa-css-prefix}-pied-piper:before { content: $fa-var-pied-piper; }\n.#{$fa-css-prefix}-first-order:before { content: $fa-var-first-order; }\n.#{$fa-css-prefix}-yoast:before { content: $fa-var-yoast; }\n.#{$fa-css-prefix}-themeisle:before { content: $fa-var-themeisle; }\n.#{$fa-css-prefix}-google-plus-circle:before,\n.#{$fa-css-prefix}-google-plus-official:before { content: $fa-var-google-plus-official; }\n.#{$fa-css-prefix}-fa:before,\n.#{$fa-css-prefix}-font-awesome:before { content: $fa-var-font-awesome; }\n","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}\n","@mixin transition($transition...) {\n -webkit-transition: $transition;\n -moz-transition: $transition;\n -o-transition: $transition;\n transition: $transition;\n}\n\n@mixin user-select($select...) {\n -webkit-user-select: $select; /* Chrome all / Safari all */\n -moz-user-select: $select; /* Firefox all */\n -ms-user-select: $select; /* IE 10+ */\n -o-user-select: $select;\n user-select: $select;\n}\n@mixin translateX($px) {\n -webkit-transform: translateX($px);\n -ms-transform: translateX($px);\n transform: translateX($px);\n}\n\n@mixin btn($color, $border-color, $cursor: pointer, $opacity: 1, $hover-fx: true) {\n cursor: $cursor;\n opacity: $opacity;\n background-color: $color;\n box-shadow: 0 1px 0 $border-color;\n &:hover {\n @if ($hover-fx) {\n background-color: lighten($color, 5%);\n } @else {\n background-color: $color;\n }\n }\n}\n\n@mixin nodrag() {\n user-drag: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-drag: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n",".metafields {\n margin-bottom: 40px;\n}\n.metafield {\n position: relative;\n zoom: 1;\n .field {\n font-size: 16px;\n line-height: 1.5;\n min-height: 42px;\n border: 1px solid $border-color;\n border-radius: 2px;\n @include transition(color 250ms ease);\n &:focus {\n border-color: $dark-orange;\n }\n }\n .meta-key {\n .key-field {\n margin: 0 0 15px;\n padding: 8px 10px;\n max-width: 190px;\n font-weight: 700;\n &:focus, &:hover {\n color: #000 !important;\n }\n }\n }\n .meta-key.simple {\n float: left;\n + {\n .meta-value {\n >.value-field {\n margin-left: 15px;\n width: calc(100% - 240px);\n }\n }\n }\n }\n .meta-value {\n .value-field {\n margin-bottom: 10px;\n padding: 8px 10px;\n width: 100%;\n height: auto;\n max-height: 500px;\n overflow: hidden;\n vertical-align: bottom;\n word-wrap: break-word;\n resize: vertical;\n }\n &:after {\n display: table;\n clear: both;\n content: \"\";\n }\n >.imagepicker {\n float: right;\n position: relative;\n right: 36px;\n width: calc(100% - 227px);\n .images-wrapper {\n position: absolute;\n top: 0;\n right: 0;\n height: 42px;\n pointer-events: auto;\n button {\n display: inline-block;\n min-width: 46px;\n height: 100%;\n margin: 0;\n padding: 0 3px 0 0;\n color: #818181;\n line-height: 2.286em;\n text-align: center;\n vertical-align: middle;\n white-space: nowrap;\n background: #fff;\n background-image: none;\n border: 1px solid $border-color;\n border-radius: 2px;\n outline: none;\n &:hover {\n color: #2b2b2b;\n background: $dark-orange;\n }\n i {\n margin: 0;\n }\n }\n }\n }\n }\n .meta-value-array {\n position: relative;\n margin-right: auto;\n margin-bottom: 15px;\n margin-left: 36px;\n padding: 8px 20px 12px 15px;\n pointer-events: auto;\n border: 1px solid $border-color;\n border-radius: $border-radius;\n .array-item-wrap {\n margin-bottom: 5px;\n .array-header {\n margin-bottom: 5px;\n .array-field-num {\n display: inline-block;\n color: $orange;\n line-height: 27px;\n margin-right: 5px;\n }\n .meta-buttons {\n display: inline-block;\n position: static;\n }\n }\n .meta-value-object {\n >.object-item-wrap {\n margin-left: 0;\n padding: 0;\n }\n }\n }\n .add-field-array {\n position: absolute;\n bottom: -13px;\n left: 50%;\n margin-left: -13px;\n width: 26px;\n height: 26px;\n font-size: 16px;\n line-height: 26px;\n text-align: center;\n color: #fff;\n background: $dark-orange;\n border-radius: 50%;\n i {\n margin: 0;\n }\n }\n }\n .meta-value-object {\n margin-left: 36px;\n .object-item-wrap {\n position: relative;\n min-height: 50px;\n .object-key {\n position: relative;\n width: 190px;\n max-width: 200px;\n margin-bottom: 15px;\n pointer-events: auto;\n input {\n width: 100%;\n padding: 8px 55px 8px 10px;\n }\n .meta-buttons {\n position: absolute;\n top: 50%;\n right: 5px;\n transform: translateY(-50%);\n }\n }\n .object-key.simple {\n float: left;\n pointer-events: auto;\n + {\n .object-value {\n .meta-value {\n >.value-field {\n width: calc(100% - 205px);\n margin-left: 15px;\n pointer-events: auto;\n }\n }\n }\n }\n }\n .object-value {\n position: relative;\n pointer-events: none;\n @include transition(padding 250ms ease);\n > .object-item-wrap {\n margin-left: 50px;\n padding: 0;\n .object-key {\n position: relative;\n }\n .object-value {\n .object-item-wrap {\n margin-left: 50px;\n }\n }\n }\n }\n }\n .add-field-object {\n display: inline-block;\n margin-bottom: 15px;\n padding: 5px 0;\n pointer-events: auto;\n &:hover {\n text-decoration: underline;\n }\n }\n }\n .meta-buttons {\n position: absolute;\n top: 8px;\n right: 0;\n span.move {\n color: $inactive-gray;\n cursor: move;\n &:hover, &:focus {\n color: $dark-orange;\n }\n }\n .dropdown {\n position: relative;\n cursor: pointer;\n &.showing-dropdown {\n .dropdown-wrap {\n display: block;\n }\n }\n .meta-button {\n display: inline-block;\n width: 23px;\n height: 23px;\n padding: 2px 0;\n font-size: 13px;\n color: $inactive-gray;\n text-align: center;\n outline: none;\n border: 1px solid #b8b8b8;\n border-radius: 50%;\n &:hover, &:focus {\n color: #fff;\n background: $dark-orange;\n border-color: $dark-orange;\n }\n i {\n margin: 2px 0 0;\n }\n }\n .dropdown-wrap {\n display: none;\n position: absolute;\n top: 35px;\n left: 50%;\n width: 185px;\n background: #fff;\n transform: translateX(-50%);\n z-index: 30;\n border: 1px solid #d4d7d9;\n border-radius: $border-radius;\n &:before {\n position: absolute;\n top: -10px;\n left: 50%;\n width: 0;\n height: 0;\n margin-left: -10px;\n content: \"\";\n border-style: solid;\n border-width: 0 10px 10px;\n border-color: transparent transparent #d4d7d9;\n }\n span {\n display: block;\n padding: 15px 0 15px 15px;\n border-bottom: 1px solid #d4d7d9;\n outline: 0;\n i {\n padding-right: 8px;\n }\n &:hover {\n color: #fff;\n background: $dark-orange;\n border-color: $dark-orange;\n }\n }\n .remove-field {\n color: $dark-red;\n &:hover {\n background: $dark-red;\n i {\n color: #fff;\n }\n }\n }\n }\n }\n }\n .object-key {\n .key-field {\n font-weight: 700;\n &:focus, &:hover {\n color: #000 !important;\n }\n }\n }\n >.meta-value-object {\n >.object-item-wrap {\n >.object-value {\n >.meta-value {\n >.imagepicker {\n width: calc(100% - 206px);\n right: 0;\n pointer-events: auto;\n .value-field {\n width: calc(100% - 48px);\n }\n }\n >.date-field {\n width: calc(100% - 206px);\n right: 0;\n }\n }\n }\n }\n }\n >.meta-value {\n >.imagepicker {\n float: right;\n position: relative;\n right: 36px;\n width: calc(100% - 227px);\n .value-field {\n width: calc(100% - 63px);\n margin-left: 15px;\n }\n }\n }\n .array {\n >.meta-value {\n margin-left: 15px;\n .imagepicker {\n right: 0;\n width: 100%;\n .value-field {\n width: calc(100% - 48px);\n }\n }\n .date-field {\n right: 0;\n width: 100%;\n }\n }\n >.meta-value-object {\n margin-left: 15px;\n }\n .object-value {\n .imagepicker {\n right: 0;\n width: calc(100% - 190px);\n pointer-events: auto;\n .value-field {\n width: calc(100% - 63px);\n margin-left: 15px;\n }\n }\n .date-field {\n right: 0;\n width: calc(100% - 204px);\n }\n }\n }\n}\n.meta-new {\n font-size: 20px;\n i {\n padding-right: 8px;\n }\n}\n.sortable-chosen, .sortable-chosen.sortable-ghost {\n border: 2px dashed $dark-orange !important;\n div {\n opacity: 0;\n }\n}\n.widget-field {\n float: right;\n right: 34px;\n width: calc(100% - 240px);\n pointer-events: auto;\n background: $border-color;\n border-radius: $border-radius;\n .rw-input {\n padding: 2px 10px;\n min-height: 40px;\n box-shadow: none;\n }\n}\n.date-field {\n @extend .widget-field;\n &.rw-widget {\n border-color: transparent;\n }\n input {\n width: calc(100% + 1px) !important;\n }\n .rw-input { border-radius: 0 }\n}\n.layout-field {\n @extend .widget-field;\n min-height: 42px;\n background-color: #fff !important;\n border: 1px solid $border-color;\n box-shadow: none;\n &.rw-state-focus {\n background-color: #fff;\n box-shadow: none !important;\n border-color: $border-color !important;\n &:hover, &:active { box-shadow: none }\n }\n .rw-widget-container {\n border: none;\n }\n .rw-btn-select { margin-top: 1px }\n}\n.rw-popup {\n padding: 10px;\n color: #818181;\n background: #fff;\n border-color: $border-color;\n}\n.rw-datetime-picker {\n box-shadow: none !important;\n font-size: 16px !important;\n .rw-select-bordered {\n border-left: 1px solid $border-color;\n &:hover {\n background: none;\n }\n &:active {\n .rw-btn { color: #222 }\n background: $dark-orange;\n box-shadow: none\n }\n }\n .rw-btn {\n min-height: 42px;\n margin-top: -3px;\n color: #818181;\n background: white;\n &:hover {\n color: #222;\n background: $dark-orange;\n }\n i {\n margin: 0;\n }\n }\n .rw-select .rw-btn {\n min-width: 42px;\n border-left: 1px solid $border-color;\n }\n &:hover { border-color: $border-color }\n}\n.rw-calendar-popup {\n left: auto !important;\n width: 330px !important;\n}\n.rw-calendar {\n color: #999;\n background: #fff;\n .rw-header {\n padding-bottom: 15px;\n .rw-btn-view {\n width: 188px;\n background: transparent;\n border-radius: 0;\n &:hover {\n color: #222;\n background: $dark-orange;\n }\n &:focus {\n outline: none;\n }\n }\n }\n thead {\n >tr {\n border-bottom: 1px solid #454545;\n }\n }\n .rw-calendar-footer {\n .rw-btn-primary {\n margin-top: 0;\n }\n }\n}\n.rw-calendar-grid.rw-nav-view {\n .rw-btn {\n padding: 0;\n }\n}\n.rw-cell { line-height: 1.75 }\n.rw-calendar-grid {\n th {\n padding-top: 10px;\n padding-bottom: 10px;\n text-align: center;\n }\n td {\n .rw-btn {\n border-radius: 0;\n }\n .rw-btn.rw-off-range {\n color: #727272;\n }\n }\n}\n.rw-state-focus {\n color: #2b2b2b !important;\n background: $dark-orange;\n border: 1px solid $dark-orange;\n &:hover { border-color: $dark-orange !important }\n}\n.rw-list {\n max-height: 329px !important;\n .rw-list-option {\n padding: 8px 5px;\n border-radius: 0;\n &:hover {\n color: #333 !important;\n background: #e6e6e6 !important;\n border-color: transparent !important;\n }\n &:focus {\n outline: none;\n }\n }\n .rw-list-option.rw-state-focus {\n color: #222 !important;\n background-color: $dark-orange !important;\n border-color: transparent !important;\n }\n}\n.rw-select-bordered { background: none }\n.rw-widget-picker {\n background: none;\n border-collapse: collapse;\n border: 1px solid $border-color\n}\n.rw-widget-container { border-radius: $border-radius }\n.rw-widget-container.rw-state-focus,\n.rw-state-focus > .rw-widget-container,\n.rw-widget-container.rw-state-focus:hover,\n.rw-state-focus > .rw-widget-container:hover {\n border: none;\n box-shadow: none;\n}\n.rw-btn-select { opacity: 1 }\n.rw-calendar-popup, .rw-popup-container { top: 104% }\n.rw-cell.rw-state-selected,\n.rw-cell.rw-state-selected:hover {\n background: $dark-orange;\n border: none\n}\n\n.tags-wrap { display: inline-block }\n.tags-list {\n padding-bottom: 11px;\n border-bottom: 1px solid lighten($border-color, 5%);\n + .tags-input {\n padding-top: 11px;\n border-top: 1px solid white;\n }\n}\n.tag {\n display: inline-block;\n margin-right: 5px;\n padding: 1px 5px;\n font-size: 15px;\n font-weight: 900;\n color: #212121;\n background: #ffd699;\n border-radius: 4px;\n .delete-tag:after {\n margin-left: 4px;\n content: \"\\f057\";\n font-family: FontAwesome;\n color: #cc8f33;\n cursor: pointer;\n }\n}\n.tags-input {\n display: flex;\n input {\n width: 100%;\n height: 24px;\n background-color: #f8f8f8;\n border: none;\n &:focus {\n outline: none;\n }\n }\n}\n.tag-suggestions {\n display: none;\n margin: 8px 0 4px;\n padding: 0;\n border-radius: 0;\n z-index: 3;\n @include transition(0.5s);\n ul {\n display: table;\n padding: 0;\n li {\n float: left;\n margin: 5px 2px;\n padding: 5px 8px;\n list-style: none;\n font-weight: 700;\n cursor: pointer;\n border-radius: 4px;\n border: 1px solid lighten($border-color, 5%);\n &:hover {\n color: white;\n background-color: $dark-orange;\n border-color: $dark-orange;\n }\n }\n }\n &.visible {\n display: block\n }\n}\n.close-suggestions {\n float: right;\n padding: 3px 6px;\n font-size: 0.875em;\n border-radius: 4px;\n border: 1px solid lighten($border-color, 5%);\n cursor: pointer;\n &:hover { background-color: $background-color }\n}\n.meta-error {\n display: inline-block;\n margin-left: 15px;\n padding: 3px 0;\n width: calc(100% - 240px);\n height: 42px;\n font-size: 14px;\n color: $dark-red;\n strong {\n margin: 0 5px;\n }\n span {\n margin: 0 5px 0 0;\n padding-bottom: 1px;\n font-weight: bold;\n cursor: pointer;\n border-bottom: 1px solid;\n }\n}\n\n// $sky-blue: #ecf3f4;\n\n$disabled-input-bgcolor: darken($background-color, 2%);\n\n.default-field {\n\n input:disabled,\n textarea:disabled {\n color: darken($disabled-input-bgcolor, 45%);\n border-color: darken($disabled-input-bgcolor, 8%) !important;\n background-color: $disabled-input-bgcolor;\n &:hover {\n color: darken($disabled-input-bgcolor, 45%) !important;\n }\n }\n\n .array-header { margin: 8px 15px }\n .array-field-num { color: darken($disabled-input-bgcolor, 45%) }\n .meta-value-array {\n margin: 0;\n padding: 0;\n border: none;\n }\n .array {\n display: flex;\n .meta-value,\n .meta-value-object,\n .meta-value-array {\n flex-grow: 1;\n margin: 0\n }\n }\n .meta-key.simple + .meta-value > .value-field {\n width: calc(100% - 240px);\n }\n}\n","$sidebar-width: 220px;\n$content-side-width: 200px;\n\n$orange: #ffcc00;\n$dark-orange: #ff9900;\n$dark-red: #f44336;\n$green: #8bc34a;\n$off-white: #fafafa;\n$white: #fcfcfc;\n$dark-gray: #727272;\n$inactive-gray: #9ea1a3;\n$new: #68BD6A;\n$new-hover: #80ce81;\n\n$background-color: #f8f8f8;\n\n$border-color: darken($background-color, 15%);\n$border-color-focus: $orange;\n$border-radius: 2px;\n\n$btn-initial: #9ea1a3;\n$btn-initial-border: #828282;\n$btn-fat-hover: $dark-orange;\n$btn-fat-hover-border: $dark-orange;\n$btn-active: #ff6e00;\n$btn-active-border: #dd5c00;\n$btn-inactive: $btn-initial !important;\n$btn-inactive-border: $btn-initial-border !important;\n$btn-success: #8dcf3f;\n$btn-success-border: #6ba329;\n$btn-danger: #ff6868;\n$btn-danger-border: #bc0000;\n",".datafields {\n margin-bottom: 40px;\n padding: 30px;\n background: #222;\n border-radius: $border-radius;\n .metafield {\n .field {\n background: #2b2b2b;\n border: 1px solid transparent;\n &:focus {\n border-color: $dark-orange;\n }\n }\n .meta-key {\n color: #eb2659;\n .key-field {\n color: #eb2659;\n &:focus {\n color: #eaeaea !important;\n }\n }\n }\n .meta-value {\n .value-field {\n color: #eaeaea;\n }\n >.imagepicker {\n .images-wrapper {\n button {\n background: #2b2b2b;\n border: none;\n &:focus, &:hover {\n color: #2b2b2b;\n background: $dark-orange\n }\n }\n }\n }\n }\n .meta-value-array {\n border: 1px solid #383838;\n }\n .meta-value-object {\n margin-bottom: 15px;\n .object-item-wrap {\n .object-value {\n >.object-item-wrap {\n margin-left: 50px;\n padding: 0;\n .object-key {\n position: relative;\n }\n .object-value {\n .object-item-wrap {\n margin-left: 50px;\n }\n }\n }\n }\n }\n }\n .meta-buttons {\n .dropdown {\n .meta-button {\n color: #575757;\n border-color: #575757;\n &:hover, &:focus {\n color: #333;\n border-color: $dark-orange;\n }\n }\n .dropdown-wrap {\n color: #ddd;\n background: #353535;\n border: 1px solid #323232;\n &:before {\n border-color: transparent transparent #353535;\n }\n span {\n border-bottom: 1px solid #272727;\n &:hover {\n color: #fff;\n background: $dark-orange;\n border-color: $dark-orange;\n }\n }\n .remove-field:hover {\n background: $dark-red;\n i {\n color: #fff;\n }\n }\n }\n }\n }\n .object-key {\n .key-field {\n color: #eb2659;\n &:focus {\n color: #eaeaea !important;\n }\n }\n }\n }\n .date-field {\n background: #222;\n outline: none;\n &.rw-widget {\n border-color: transparent;\n background: inherit;\n .rw-input { border-radius: 0 }\n }\n input {\n color: #fff;\n background: #2b2b2b;\n }\n }\n .rw-popup {\n background: #2b2b2b;\n border-color: #222;\n }\n .rw-datetime-picker {\n .rw-btn {\n background: #2b2b2b;\n &:hover {\n color: #222;\n background: $dark-orange;\n }\n }\n .rw-select {\n .rw-btn {\n min-width: 48px;\n border-left: 2px solid #222;\n border-radius: $border-radius;\n }\n }\n .rw-select-bordered { border-left-color: #222 }\n }\n .rw-calendar {\n color: #999;\n background: #2b2b2b;\n .rw-head-cell, .rw-calendar-row { background: #2b2b2b }\n .rw-head-cell { border-bottom-color: #4d4d4d }\n .rw-cell {\n line-height: 2;\n color: #999;\n border-radius: 0;\n &:hover {\n color: #cdcdcd;\n background: #454545;\n border-color: transparent;\n }\n }\n .rw-cell-off-range { color: #575757 }\n .rw-calendar-footer { border-top-color: #4d4d4d }\n }\n .rw-list .rw-list-option {\n color: #727272;\n &:hover {\n color: #cdcdcd !important;\n background: #454545 !important;\n }\n }\n .rw-state-focus {\n color: #2b2b2b !important;\n background: $dark-orange !important;\n border: 1px solid $dark-orange;\n }\n .data-new {\n margin-top: 25px;\n }\n}\n",".breadcrumbs {\n margin: 0 30px 0 0;\n padding: 0;\n list-style: none;\n li {\n float: left;\n &:not(:last-child):after {\n content: \"/\";\n padding: 0 8px;\n font-size: 30px;\n }\n a {\n color: #444;\n font-size: 30px;\n &:hover {\n color: $dark-orange;\n }\n }\n }\n}\n","@import url('../../node_modules/highlight.js/styles/atom-one-light.css');\n\n.config-editor {\n border: 1px solid $border-color;\n border-radius: $border-radius;\n outline: none;\n font-size: 14px;\n\n & + .statusbar {\n padding: 12px 0;\n font-size: 12px;\n color: #959694;\n text-align: right;\n border-bottom: 1px solid $border-color;\n }\n}\n\n.ace_focus {\n border-color: $orange;\n}\n",".CodeMirror {\n position: relative;\n color: #454545;\n height: auto;\n padding: 10px;\n font: inherit;\n z-index: 1;\n background: #fff;\n border: 1px solid $border-color;\n border-bottom-left-radius: $border-radius;\n border-bottom-right-radius: $border-radius;\n overflow: hidden;\n\n pre {\n margin: 0;\n padding: 0 4px;\n position: relative;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n border-radius: 0;\n border: none;\n z-index: 2;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n }\n\n .CodeMirror-selected {\n background: #d9d9d9\n }\n\n .CodeMirror-code {\n outline: 0;\n\n .cm-tag { color: #63a35c }\n .cm-url { color: #aab2b3 }\n .cm-link { color: #7f8c8d }\n .cm-string { color: #183691 }\n .cm-attribute { color: #795da3 }\n\n .cm-comment {\n font-family: Consolas, monospace;\n font-size: 14px;\n }\n .cm-strikethrough {\n text-decoration: line-through;\n }\n\n .cm-header-1,\n .cm-header-2,\n .cm-header-3,\n .cm-header-4,\n .cm-header-5,\n .cm-header-6 {\n display: inline-block;\n margin: 20px 0 10px\n }\n .cm-header-1 {\n font-size: 180%;\n line-height: 150%;\n }\n .cm-header-2 {\n font-size: 150%;\n line-height: 150%;\n }\n .cm-header-3 {\n font-size: 125%;\n line-height: 125%;\n }\n .cm-header-4 {\n font-size: 110%;\n line-height: 110%;\n }\n }\n\n .CodeMirror-placeholder {\n opacity: .5;\n }\n\n .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) {\n background: rgba(255, 0, 0, 0.15);\n }\n}\n\n.CodeMirror-lines { padding: 4px 0 }\n\n.CodeMirror-gutter-filler,\n.CodeMirror-scrollbar-filler { background-color: #fff }\n\n.CodeMirror-gutters {\n border-right: 1px solid $border-color;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: #000 }\n.CodeMirror-guttermarker-subtle { color: #999 }\n\n.CodeMirror-cursor {\n position: absolute;\n width: 0;\n border-left: 1px solid #000;\n border-right: none;\n}\n\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver\n}\n\n.cm-fat-cursor {\n .CodeMirror-cursor {\n width: auto;\n border: 0;\n background: #7e7;\n }\n div.CodeMirror-cursors {\n z-index: 1;\n }\n}\n\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7;\n}\n\n@-moz-keyframes blink {\n 50% { background-color: transparent }\n}\n\n@-webkit-keyframes blink {\n 50% { background-color: transparent }\n}\n\n@keyframes blink {\n 50% { background-color: transparent }\n}\n\n.cm-tab {\n display: inline-block;\n text-decoration: inherit;\n}\n\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n position: absolute;\n}\n\n.cm-s-default {\n .cm-header { color: #00f }\n .cm-quote { color: #090 }\n .cm-keyword { color: #708 }\n .cm-atom { color: #219 }\n .cm-number { color: #164 }\n .cm-def { color: #00f }\n .cm-builtin { color: #30a }\n .cm-bracket { color: #997 }\n .cm-tag { color: #170 }\n .cm-hr { color: #999 }\n .cm-link { color: #00c }\n .cm-attribute { color: #00c }\n .cm-variable-2 { color: #05a }\n .cm-variable-3 { color: #085 }\n .cm-comment { color: #a50 }\n .cm-string { color: #a11 }\n .cm-string-2 { color: #f50 }\n .cm-meta,\n .cm-qualifier { color: #555 }\n}\n\n.cm-negative { color: #d44 }\n.cm-positive { color: #292 }\n\n.cm-header,\n.cm-strong { font-weight: 700 }\n\n.cm-em { font-style: italic }\n.cm-link { text-decoration: underline }\n\n.cm-strikethrough { text-decoration: line-through }\n\n.cm-invalidchar,\n.cm-s-default .cm-error { color: red }\n\n.CodeMirror-composing {\n border-bottom: 2px solid }\n\ndiv.CodeMirror span {\n &.CodeMirror-matchingbracket { color: #0f0 }\n &.CodeMirror-nonmatchingbracket { color: #f22 }\n}\n\n.CodeMirror-matchingtag {\n background: rgba(255, 150, 0, 0.3)\n}\n\n.CodeMirror-activeline-background {\n background: #e8f2ff\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important;\n margin-bottom: -30px;\n margin-right: -30px;\n padding-bottom: 30px;\n height: 100%;\n outline: 0;\n position: relative;\n}\n\n.CodeMirror-sizer {\n position: relative;\n border-right: 30px solid transparent;\n}\n\n.CodeMirror-gutter-filler,\n.CodeMirror-vscrollbar,\n.CodeMirror-hscrollbar,\n.CodeMirror-scrollbar-filler {\n position: absolute;\n z-index: 6;\n display: none;\n}\n\n.CodeMirror-vscrollbar {\n right: 0;\n top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.CodeMirror-hscrollbar {\n bottom: 0;\n left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n\n.CodeMirror-scrollbar-filler {\n right: 0;\n bottom: 0;\n}\n\n.CodeMirror-gutter-filler {\n left: 0;\n bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 3;\n}\n\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -30px;\n}\n\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: 0 0 !important;\n border: none !important;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 4;\n}\n\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px;\n}\n\n.CodeMirror, .CodeMirror-scroll {\n min-height: 300px;\n}\n\n.CodeMirror-wrap pre {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n overflow: auto;\n}\n\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber,\n.CodeMirror-scroll,\n.CodeMirror-sizer { box-sizing: content-box }\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n pre {\n position: static;\n }\n}\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors,\ndiv.CodeMirror-dragcursors {\n visibility: visible\n}\n\n.CodeMirror-selected { background: #d9d9d9 }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0 }\n\n.CodeMirror-crosshair { cursor: crosshair }\n\n.CodeMirror-line {\n &::selection {\n background: #d7d4f0\n }\n > span {\n &::selection, > span::selection {\n background: #d7d4f0\n }\n }\n}\n\n.CodeMirror-line {\n &::-moz-selection {\n background: #d7d4f0\n }\n\n > span {\n &::-moz-selection, > span::-moz-selection {\n background: #d7d4f0;\n }\n }\n}\n\n.cm-searching {\n background: #ffa;\n background: rgba(255, 255, 0, 0.4);\n}\n\n.cm-force-border { padding-right: .1px }\n\n@media print {\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n.cm-tab-wrap-hack:after { content: '' }\n\nspan.CodeMirror-selectedtext { background: 0 0 }\n\n.CodeMirror-fullscreen {\n background: #fff;\n position: fixed !important;\n top: 50px;\n left: 0;\n right: 0;\n bottom: 0;\n height: auto;\n z-index: 9;\n}\n\n.CodeMirror-sided { width: 50% !important }\n\n.editor-wrapper input.title {\n &:focus, &:hover {\n opacity: .8;\n }\n}\n\n.editor-toolbar {\n position: relative;\n padding: 0 10px;\n border-top: 1px solid $border-color;\n border-left: 1px solid $border-color;\n border-right: 1px solid $border-color;\n border-top-left-radius: $border-radius;\n border-top-right-radius: $border-radius;\n @include user-select(none);\n\n &:before, &:after {\n display: block;\n content: ' ';\n height: 1px;\n }\n\n &:before { margin-bottom: 8px }\n &:after { margin-top: 8px }\n\n &.fullscreen {\n position: fixed;\n top: 0;\n left: 0;\n padding-top: 10px;\n padding-bottom: 10px;\n width: 100%;\n height: 50px;\n white-space: nowrap;\n box-sizing: border-box;\n background: #fff;\n border: 0;\n opacity: 1;\n overflow-x: auto;\n overflow-y: hidden;\n z-index: 9;\n\n &::before, &::after {\n position: fixed;\n top: 0;\n margin: 0;\n padding: 0;\n width: 20px;\n height: 50px;\n background: #fff;\n }\n\n &::before { left: 0 }\n &::after { right: 0 }\n }\n\n a {\n display: inline-block;\n margin: 0;\n width: 30px;\n height: 30px;\n text-align: center;\n text-decoration: none !important;\n color: #2c3e50;\n cursor: pointer;\n text-shadow: inherit;\n border: 1px solid transparent;\n border-radius: 3px;\n opacity: .6;\n\n &.active, &:hover {\n background: #fff;\n border-color: #95a5a6;\n opacity: 1;\n }\n\n &:focus {\n outline: none;\n }\n\n &:before {\n line-height: 30px;\n }\n }\n\n i.separator {\n display: inline-block;\n margin: 0 6px;\n width: 0;\n color: transparent;\n text-indent: -10px;\n border-left: 1px solid #d9d9d9;\n border-right: 1px solid #fff;\n }\n\n a {\n &.fa-header-x:after {\n font-family: Arial, \"Helvetica Neue\", Helvetica, sans-serif;\n font-size: 65%;\n vertical-align: text-bottom;\n position: relative;\n top: 2px;\n }\n\n &.fa-header-1:after { content: \"1\" }\n &.fa-header-2:after { content: \"2\" }\n &.fa-header-3:after { content: \"3\" }\n &.fa-header-bigger:after { content: \"▲\" }\n &.fa-header-smaller:after { content: \"▼\" }\n }\n\n &.disabled-for-preview {\n opacity: 1;\n a:not(.no-disable) {\n color: #bbb;\n text-shadow: inherit;\n pointer-events: none;\n border-color: transparent;\n }\n }\n}\n\n@media only screen and (max-width: 700px) {\n .editor-toolbar a.no-mobile {\n display: none;\n }\n}\n\n.editor-statusbar {\n padding: 8px 10px;\n font-size: 12px;\n color: #959694;\n text-align: right;\n\n span {\n display: inline-block;\n min-width: 4em;\n margin-left: 1em;\n }\n\n .lines:before { content: 'lines: ' }\n .words:before { content: 'words: ' }\n .characters:before { content: 'characters: ' }\n}\n\n.editor-preview,\n.editor-preview-side {\n display: none;\n padding: 10px 14px;\n overflow: auto;\n background: #fcfcfc;\n box-sizing: border-box;\n\n > p {\n margin: 1.5em 0 1em;\n }\n\n h1, h2, h3, h4, h5, h6 {\n margin: 20px 0 10px !important;\n font-weight: bold !important;\n }\n\n h1 {\n font-size: 180% !important;\n line-height: 150%;\n }\n h2 {\n font-size: 150%;\n line-height: 150%;\n }\n h3 {\n font-size: 125%;\n line-height: 125%;\n }\n h4 {\n font-size: 110%;\n line-height: 110%;\n }\n h5, h6 {\n font-size: inherit;\n }\n pre, code {\n background: #f7f7f7;\n border: 1px solid lighten($border-color, 11%);\n }\n pre {\n margin-bottom: 10px;\n padding: 10px;\n code {\n padding: 0;\n color: inherit;\n background: transparent;\n border: none;\n }\n }\n code {\n padding: 2px 4px;\n color: #e91e63;\n border-radius: 4px;\n }\n table {\n td, th {\n padding: 5px;\n border: 1px solid $border-color;\n }\n }\n hr {\n margin: 20px 0;\n border: 1px solid #eee;\n }\n blockquote {\n padding: 0 1em;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid $border-color;\n p {\n margin: 0 0 10px 0;\n }\n }\n}\n\n.editor-preview {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 7;\n}\n\n.editor-preview-side {\n position: fixed;\n top: 50px;\n right: 0;\n bottom: 0;\n width: 50%;\n z-index: 9;\n border: 1px solid $border-color;\n}\n\n.editor-preview-active,\n.editor-preview-active-side {\n display: block;\n}\n\n.CodeMirror-focused {\n border-color: $dark-orange;\n}\n\n.cm-formatting-code {\n &+.cm-comment {\n color: #e91e63\n }\n &+.cm-formatting-code.cm-comment {\n color: inherit\n }\n}\n",".btn {\n color: $off-white;\n font-weight: bold;\n text-decoration: none;\n display: inline-block;\n font-size: 14px;\n margin: 0;\n padding: 12px 20px;\n white-space: nowrap;\n text-shadow: 1px 1px 1px rgba(68, 68, 68, 0.2);\n outline: none;\n border: none;\n border-radius: 4px;\n -webkit-appearance: none;\n @include btn($btn-initial, $btn-initial-border);\n i {\n margin-right: 4px;\n }\n}\n\n.btn-fat {\n margin: 10px 0;\n width: 100%;\n text-align: center;\n}\n\n.btn-thin {\n padding: 8px;\n margin: 0 5px;\n}\n\n.btn-active {\n @include btn($btn-active, $btn-active-border);\n}\n\n.btn-inactive {\n @include btn($btn-inactive, $btn-inactive-border, default !important, .5 !important, false);\n}\n\n.btn-success {\n @include btn($btn-success, $btn-success-border, pointer);\n &:hover {\n background-color: lighten($btn-success, 5%) !important;\n box-shadow: 0 1px 0 $btn-success-border;\n }\n}\n\n.btn-delete {\n @include btn($btn-initial, $btn-initial-border);\n @include transition(background 0.3s);\n &:hover {\n @include btn($dark-red, $btn-danger-border);\n }\n}\n\n.btn-view {\n @include btn($btn-initial, $btn-initial-border);\n @include transition(background 0.3s);\n &:hover {\n @include btn($btn-active, $btn-active-border);\n }\n}\n\n.multiple .btn {\n margin: 0 5px;\n}\n",".dropzone {\n text-align: center;\n padding: 20px;\n color: #9098A3;\n background-color: #fafafa;\n border: 2px dashed lighten($border-color, 9%);\n border-radius: $border-radius;\n position: relative;\n .preview-info {\n padding: 40px;\n i {\n display: inline;\n font-size: 96px;\n }\n p {\n font-size: 20px;\n }\n }\n}\n\n.dropzone-active {\n background-color: $dark-orange;\n color: white;\n}\n\n.static-list {\n padding: 25px;\n background-color: #fcfcfc;\n border: 1px solid lighten($border-color, 9%);\n}\n\n.preview-container {\n display: flex;\n flex-wrap: wrap;\n .file-preview {\n display: flex;\n flex-direction: column;\n border: 1px solid lighten($border-color, 12%);\n background-color: #fff;\n margin: 10px 7px;\n position: relative;\n border-radius: $border-radius;\n &:hover .delete{\n opacity: 1;\n }\n a { height: 150px; }\n div {\n display: table;\n width: 150px;\n height: 150px;\n text-align: center;\n i {\n display: table-cell;\n color: #ccc;\n font-size: 64px;\n vertical-align: middle;\n }\n }\n span.theme-indicator {\n position: absolute;\n bottom: 40px;\n left: 0;\n width: 32px;\n height: 32px;\n text-align: left;\n background: $dark-red;\n i {\n margin: 0;\n padding: 8px 7px 7px;\n color: white;\n font-size: 16px;\n }\n }\n span.filename {\n padding: 5px;\n font-size: 14px;\n line-height: 2;\n text-align: center;\n width: 150px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n border-top: 1px solid lighten($border-color, 9%);\n border-bottom: 1px solid lighten($border-color, 9%);\n }\n img {\n @include nodrag();\n object-fit: contain;\n width: 150px;\n height: 150px;\n }\n .delete {\n padding-bottom: 4px;\n position: absolute;\n top: 10px;\n right: 10px;\n width: 26px;\n height: 26px;\n border-radius: 50%;\n text-align: center;\n font-size: 18px;\n color: #fff;\n opacity: 0;\n transition: opacity 250ms ease;\n background: #cf3f3f;\n border: none;\n }\n }\n .splitter {\n margin-top: 25px;\n opacity: 0.5\n }\n .preview-tip {\n margin-bottom: -5px;\n width: calc(100% - 0px); // override flex-wrap css\n }\n}\n\n.preview-info {\n padding: 20px;\n text-align: center;\n color: #454545;\n i {\n display: inline;\n font-size: 96px;\n margin: 0;\n }\n h2, h4 {\n margin: 0;\n line-height: 1.5;\n }\n}\n\n.btn-upload {\n font-size: 24px;\n i {\n margin-right: 10px;\n }\n}\n"]} \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/2.08ea13e0.chunk.js b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/2.08ea13e0.chunk.js deleted file mode 100644 index 5467b7e3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/2.08ea13e0.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2.08ea13e0.chunk.js.LICENSE.txt */ -(this["webpackJsonpjekyll-admin"]=this["webpackJsonpjekyll-admin"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(55)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(38);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t]+>|\t|)+|(?:\n)))/gm,c="Could not find the language '{}', did you forget to load/include a language module?",u={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},d="of and for in not or if then".split(" ");function h(e){return e.replace(/&/g,"&").replace(//g,">")}function p(e){return e.nodeName.toLowerCase()}function f(e){return a.test(e)}function m(e){var t,n={},r=Array.prototype.slice.call(arguments,1);for(t in e)n[t]=e[t];return r.forEach((function(e){for(t in e)n[t]=e[t]})),n}function g(e){var t=[];return function e(n,r){for(var i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),p(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}function v(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(t){return m(e,{variants:null},t)}))),e.cached_variants?e.cached_variants:function e(t){return!!t&&(t.endsWithParent||e(t.starts))}(e)?[m(e,{starts:e.starts?m(e.starts):null})]:Object.isFrozen(e)?[m(e)]:[e]}function y(e,t){return t?Number(t):(n=e,-1!=d.indexOf(n.toLowerCase())?0:1);var n}function b(e){function t(e){return e&&e.source||e}function r(n,r){return new RegExp(t(n),"m"+(e.case_insensitive?"i":"")+(r?"g":""))}function i(e){var n,i,o={},a=[],s={},l=1;function c(e,t){o[l]=e,a.push([e,t]),l+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(t)+1}for(var u=0;u0&&(o+=n),o+="(";l.length>0;){var c=r.exec(l);if(null==c){o+=l;break}o+=l.substring(0,c.index),l=l.substring(c.index+c[0].length),"\\"==c[0][0]&&c[1]?o+="\\"+String(Number(c[1])+s):(o+=c[0],"("==c[0]&&i++)}o+=")"}return o}(d,"|"),!0),s.lastIndex=0,s.exec=function(t){var r;if(0===a.length)return null;n.lastIndex=s.lastIndex;var i=n.exec(t);if(!i)return null;for(var l=0;l')+t+(n?"":"")}function l(){x+=null!=w.subLanguage?function(){var e="string"===typeof w.subLanguage;if(e&&!r[w.subLanguage])return h(S);var t=e?E(w.subLanguage,S,!0,A[w.subLanguage]):C(S,w.subLanguage.length?w.subLanguage:void 0);return w.relevance>0&&(D+=t.relevance),e&&(A[w.subLanguage]=t.top),s(t.language,t.value,!1,!0)}():function(){var e,t,n,r;if(!w.keywords)return h(S);for(r="",t=0,w.lexemesRe.lastIndex=0,n=w.lexemesRe.exec(S);n;)r+=h(S.substring(t,n.index)),(e=a(w,n))?(D+=e[1],r+=s(e[0],h(n[0]))):r+=h(n[0]),t=w.lexemesRe.lastIndex,n=w.lexemesRe.exec(S);return r+h(S.substr(t))}(),S=""}function d(e){x+=e.className?s(e.className,"",!0):"",w=Object.create(e,{parent:{value:w}})}function p(e){var t=e[0],n=e.rule;return n&&n.endSameAsBegin&&(n.endRe=function(e){return new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}(t)),n.skip?S+=t:(n.excludeBegin&&(S+=t),l(),n.returnBegin||n.excludeBegin||(S=t)),d(n),n.returnBegin?0:t.length}function f(e){var n=e[0],r=t.substr(e.index),i=function e(t,n){if(function(e,t){var n=e&&e.exec(t);return n&&0===n.index}(t.endRe,n)){for(;t.endsParent&&t.parent;)t=t.parent;return t}if(t.endsWithParent)return e(t.parent,n)}(w,r);if(i){var o=w;o.skip?S+=n:(o.returnEnd||o.excludeEnd||(S+=n),l(),o.excludeEnd&&(S=n));do{w.className&&(x+=""),w.skip||w.subLanguage||(D+=w.relevance),w=w.parent}while(w!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),d(i.starts)),o.returnEnd?0:n.length}}var m={};function g(e,r){var i=r&&r[0];if(S+=e,null==i)return l(),0;if("begin"==m.type&&"end"==r.type&&m.index==r.index&&""===i)return S+=t.slice(r.index,r.index+1),1;if(m=r,"begin"===r.type)return p(r);if("illegal"===r.type&&!n)throw new Error('Illegal lexeme "'+i+'" for mode "'+(w.className||"")+'"');if("end"===r.type){var o=f(r);if(void 0!=o)return o}return S+=i,i.length}var v=_(e);if(!v)throw console.error(c.replace("{}",e)),new Error('Unknown language: "'+e+'"');b(v);var y,w=i||v,A={},x="";for(y=w;y!==v;y=y.parent)y.className&&(x=s(y.className,"",!0)+x);var S="",D=0;try{for(var T,F,k=0;w.terminators.lastIndex=k,T=w.terminators.exec(t);)F=g(t.substring(k,T.index),T),k=T.index+F;for(g(t.substr(k)),y=w;y.parent;y=y.parent)y.className&&(x+="");return{relevance:D,value:x,illegal:!1,language:e,top:w}}catch(O){if(O.message&&-1!==O.message.indexOf("Illegal"))return{illegal:!0,relevance:0,value:h(t)};if(o)return{relevance:0,value:h(t),language:e,top:w,errorRaised:O};throw O}}function C(e,t){t=t||u.languages||n(r);var i={relevance:0,value:h(e)},o=i;return t.filter(_).filter(D).forEach((function(t){var n=E(t,e,!1);n.language=t,n.relevance>o.relevance&&(o=n),n.relevance>i.relevance&&(o=i,i=n)})),o.language&&(i.second_best=o),i}function w(e){return u.tabReplace||u.useBR?e.replace(l,(function(e,t){return u.useBR&&"\n"===e?"
":u.tabReplace?t.replace(/\t/g,u.tabReplace):""})):e}function A(e){var n,r,o,a,l,d=function(e){var t,n,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",n=s.exec(o)){var a=_(n[1]);return a||(console.warn(c.replace("{}",n[1])),console.warn("Falling back to no-highlight mode for this block.",e)),a?n[1]:"no-highlight"}for(t=0,r=(o=o.split(/\s+/)).length;t/g,"\n"):n=e,l=n.textContent,o=d?E(d,l,!0):C(l),(r=g(n)).length&&((a=document.createElement("div")).innerHTML=o.value,o.value=function(e,n,r){var i=0,o="",a=[];function s(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function c(e){o+=""}function u(e){("start"===e.event?l:c)(e.node)}for(;e.length||n.length;){var d=s();if(o+=h(r.substring(i,d[0].offset)),i=d[0].offset,d===e){a.reverse().forEach(c);do{u(d.splice(0,1)[0]),d=s()}while(d===e&&d.length&&d[0].offset===i);a.reverse().forEach(l)}else"start"===d[0].event?a.push(d[0].node):a.pop(),u(d.splice(0,1)[0])}return o+h(r.substr(i))}(r,g(a),l)),o.value=w(o.value),e.innerHTML=o.value,e.className=function(e,t,n){var r=t?i[t]:n,o=[e.trim()];return e.match(/\bhljs\b/)||o.push("hljs"),-1===e.indexOf(r)&&o.push(r),o.join(" ").trim()}(e.className,d,o.language),e.result={language:o.language,re:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance}))}function x(){if(!x.called){x.called=!0;var e=document.querySelectorAll("pre code");t.forEach.call(e,A)}}var S={disableAutodetect:!0};function _(e){return e=(e||"").toLowerCase(),r[e]||r[i[e]]}function D(e){var t=_(e);return t&&!t.disableAutodetect}return e.highlight=E,e.highlightAuto=C,e.fixMarkup=w,e.highlightBlock=A,e.configure=function(e){u=m(u,e)},e.initHighlighting=x,e.initHighlightingOnLoad=function(){window.addEventListener("DOMContentLoaded",x,!1),window.addEventListener("load",x,!1)},e.registerLanguage=function(t,n){var a;try{a=n(e)}catch(s){if(console.error("Language definition for '{}' could not be registered.".replace("{}",t)),!o)throw s;console.error(s),a=S}r[t]=a,a.rawDefinition=n.bind(null,e),a.aliases&&a.aliases.forEach((function(e){i[e]=t}))},e.listLanguages=function(){return n(r)},e.getLanguage=_,e.requireLanguage=function(e){var t=_(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},e.autoDetection=D,e.inherit=m,e.debugMode=function(){o=!1},e.IDENT_RE="[a-zA-Z]\\w*",e.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",e.NUMBER_RE="\\b\\d+(\\.\\d+)?",e.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BINARY_NUMBER_RE="\\b(0b[01]+)",e.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},e.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.COMMENT=function(t,n,r){var i=e.inherit({className:"comment",begin:t,end:n,contains:[]},r||{});return i.contains.push(e.PHRASAL_WORDS_MODE),i.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),i},e.C_LINE_COMMENT_MODE=e.COMMENT("//","$"),e.C_BLOCK_COMMENT_MODE=e.COMMENT("/\\*","\\*/"),e.HASH_COMMENT_MODE=e.COMMENT("#","$"),e.NUMBER_MODE={className:"number",begin:e.NUMBER_RE,relevance:0},e.C_NUMBER_MODE={className:"number",begin:e.C_NUMBER_RE,relevance:0},e.BINARY_NUMBER_MODE={className:"number",begin:e.BINARY_NUMBER_RE,relevance:0},e.CSS_NUMBER_MODE={className:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},e.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}]},e.TITLE_MODE={className:"title",begin:e.IDENT_RE,relevance:0},e.UNDERSCORE_TITLE_MODE={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},e.METHOD_GUARD={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,relevance:0},[e.BACKSLASH_ESCAPE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.PHRASAL_WORDS_MODE,e.COMMENT,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,e.CSS_NUMBER_MODE,e.REGEXP_MODE,e.TITLE_MODE,e.UNDERSCORE_TITLE_MODE,e.METHOD_GUARD].forEach((function(e){!function e(t){Object.freeze(t);var n="function"===typeof t;return Object.getOwnPropertyNames(t).forEach((function(r){!t.hasOwnProperty(r)||null===t[r]||"object"!==typeof t[r]&&"function"!==typeof t[r]||n&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(t[r])||e(t[r])})),t}(e)})),e}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=0&&t<=_};v.each=v.forEach=function(e,t,n){var r,i;if(t=b(t,n),T(e))for(r=0,i=e.length;r0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s=3;return t(e,b(n,i,4),r,o)}};v.reduce=v.foldl=v.inject=F(1),v.reduceRight=v.foldr=F(-1),v.find=v.detect=function(e,t,n){var r=(T(e)?v.findIndex:v.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},v.filter=v.select=function(e,t,n){var r=[];return t=E(t,n),v.each(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r},v.reject=function(e,t,n){return v.filter(e,v.negate(E(t)),n)},v.every=v.all=function(e,t,n){t=E(t,n);for(var r=!T(e)&&v.keys(e),i=(r||e).length,o=0;o=0},v.invoke=C((function(e,t,n){var r,i;return v.isFunction(t)?i=t:v.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),v.map(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=S(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))})),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=T(e)?e:v.values(e)).length;so&&(o=r);else t=E(t,n),v.each(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o},v.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=T(e)?e:v.values(e)).length;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!==i)return(o=t(u.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&ot?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c},v.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=C((function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=v.delay(o,t,this,a);return i}));return a.cancel=function(){clearTimeout(r),r=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=C;var I=!{toString:null}.propertyIsEnumerable("toString"),P=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=P.length,r=e.constructor,i=v.isFunction(r)&&r.prototype||s,o="constructor";for(x(e,o)&&!v.contains(t,o)&&t.push(o);n--;)(o=P[n])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)};v.keys=function(e){if(!v.isObject(e))return[];if(f)return f(e);var t=[];for(var n in e)x(e,n)&&t.push(n);return I&&B(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return I&&B(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=b(r,t[1])),t=v.allKeys(e)):(r=H,t=M(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i1&&(n=t[1])):(t=v.map(M(t,!1,!1),String),r=function(e,n){return!v.contains(t,n)}),v.pick(e,r,n)})),v.defaults=$(v.allKeys,!0),v.create=function(e,t){var n=w(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o":">",'"':""","'":"'","`":"`"},z=v.invert(G),V=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};v.escape=V(G),v.unescape=V(z),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var r=t.length;if(!r)return v.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,Y={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+Y[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var r,i=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,(function(t,n,r,i,s){return a+=e.slice(o,s).replace(X,Q),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t})),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(c){throw c.source=a,c}var s=function(e){return r.call(this,e,v)},l=t.variable||"obj";return s.source="function("+l+"){\n"+a+"}",s},v.chain=function(e){var t=v(e);return t._chain=!0,t};var J=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),(function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return c.apply(e,arguments),J(this,n.apply(v,e))}})),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=a[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],J(this,n)}})),v.each(["concat","join","slice"],(function(e){var t=a[e];v.prototype[e]=function(){return J(this,t.apply(this._wrapped,arguments))}})),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return v}.apply(t,[]))||(n.exports=r)}()}).call(this,n(41),n(46)(e))},function(e,t,n){e.exports=n(494)()},function(e,t,n){"use strict";var r=n(68),i=n(172),o="@@redux/INIT";function a(e,t,n){var s;if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(a)(e,t)}if("function"!==typeof e)throw new Error("Expected the reducer to be a function.");var l=e,c=t,u=[],d=u,h=!1;function p(){d===u&&(d=u.slice())}function f(){return c}function m(e){if("function"!==typeof e)throw new Error("Expected listener to be a function.");var t=!0;return p(),d.push(e),function(){if(t){t=!1,p();var n=d.indexOf(e);d.splice(n,1)}}}function g(e){if(!Object(r.a)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw new Error("Reducers may not dispatch actions.");try{h=!0,c=l(c,e)}finally{h=!1}for(var t=u=d,n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var v=0;function y(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=o.getDisplayName,l=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,u=o.methodName,y=void 0===u?"connectAdvanced":u,b=o.renderCountProp,E=void 0===b?void 0:b,C=o.shouldHandleStateChanges,w=void 0===C||C,A=o.storeKey,x=void 0===A?"store":A,S=o.withRef,_=void 0!==S&&S,D=g(o,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),T=x+"Subscription",F=v++,k=((t={})[x]=i,t[T]=r.PropTypes.instanceOf(d),t),O=((n={})[T]=r.PropTypes.instanceOf(d),n);return function(t){c()("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+t);var n=t.displayName||t.name||"Component",i=l(n),o=h({},D,{getDisplayName:l,methodName:y,renderCountProp:E,shouldHandleStateChanges:w,storeKey:x,withRef:_,displayName:i,wrappedComponentName:n,WrappedComponent:t}),a=function(n){function a(e,t){p(this,a);var r=f(this,n.call(this,e,t));return r.version=F,r.state={},r.renderCount=0,r.store=r.props[x]||r.context[x],r.parentSub=e[T]||t[T],r.setWrappedInstance=r.setWrappedInstance.bind(r),c()(r.store,'Could not find "'+x+'" in either the context or props of "'+i+'". Either wrap the root component in a , or explicitly pass "'+x+'" as a prop to "'+i+'".'),r.getState=r.store.getState.bind(r.store),r.initSelector(),r.initSubscription(),r}return m(a,n),a.prototype.getChildContext=function(){var e;return(e={})[T]=this.subscription,e},a.prototype.componentDidMount=function(){w&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},a.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.store=null,this.parentSub=null,this.selector.run=function(){}},a.prototype.getWrappedInstance=function(){return c()(_,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+y+"() call."),this.wrappedInstance},a.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},a.prototype.initSelector=function(){var t=this.store.dispatch,n=this.getState,r=e(t,o),i=this.selector={shouldComponentUpdate:!0,props:r(n(),this.props),run:function(e){try{var t=r(n(),e);(i.error||t!==i.props)&&(i.shouldComponentUpdate=!0,i.props=t,i.error=null)}catch(o){i.shouldComponentUpdate=!0,i.error=o}}}},a.prototype.initSubscription=function(){var e=this;w&&function(){var t=e.subscription=new d(e.store,e.parentSub),n={};t.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=function(){this.componentDidUpdate=void 0,t.notifyNestedSubs()},this.setState(n)):t.notifyNestedSubs()}.bind(e)}()},a.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},a.prototype.addExtraProps=function(e){if(!_&&!E)return e;var t=h({},e);return _&&(t.ref=this.setWrappedInstance),E&&(t[E]=this.renderCount++),t},a.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(r.createElement)(t,this.addExtraProps(e.props))},a}(r.Component);return a.WrappedComponent=t,a.displayName=i,a.childContextTypes=O,a.contextTypes=k,a.propTypes=k,s()(a,t)}}var b=Object.prototype.hasOwnProperty;function E(e,t){if(e===t)return!0;var n=0,r=0;for(var i in e){if(b.call(e,i)&&e[i]!==t[i])return!1;n++}for(var o in t)b.call(t,o)&&r++;return n===r}var C=n(11);n(68);function w(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function A(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function x(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=A(e),r.mapToProps=function(t,n){r.mapToProps=e;var i=r(t,n);return"function"===typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=A(i),i=r(t,n)),i},r}}var S=[function(e){return"function"===typeof e?x(e):void 0},function(e){return e?void 0:w((function(e){return{dispatch:e}}))},function(e){return e&&"object"===typeof e?w((function(t){return Object(C.b)(e,t)})):void 0}];var _=[function(e){return"function"===typeof e?x(e):void 0},function(e){return e?void 0:w((function(){return{}}))}],D=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,o),s=r(e,o),l=i(e,o);return(o.pure?O:k)(a,s,l,e,o)}var N=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function L(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function I(e,t){return e===t}var P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?y:t,r=e.mapStateToPropsFactories,i=void 0===r?_:r,o=e.mapDispatchToPropsFactories,a=void 0===o?S:o,s=e.mergePropsFactories,l=void 0===s?F:s,c=e.selectorFactory,u=void 0===c?M:c;return function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=o.pure,c=void 0===s||s,d=o.areStatesEqual,h=void 0===d?I:d,p=o.areOwnPropsEqual,f=void 0===p?E:p,m=o.areStatePropsEqual,g=void 0===m?E:m,v=o.areMergedPropsEqual,y=void 0===v?E:v,b=R(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),C=L(e,i,"mapStateToProps"),w=L(t,a,"mapDispatchToProps"),A=L(r,l,"mergeProps");return n(u,N({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:C,initMapDispatchToProps:w,initMergeProps:A,pure:c,areStatesEqual:h,areOwnPropsEqual:f,areStatePropsEqual:g,areMergedPropsEqual:y},b))}}();n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return P}))},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";var r=n(31);e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(496);function a(){}a.prototype=Object.create(r.Component.prototype),a.displayName="DocumentTitle",a.propTypes={title:i.string.isRequired},a.prototype.render=function(){return this.props.children?r.Children.only(this.props.children):null},e.exports=o((function(e){var t=e[e.length-1];if(t)return t.title}),(function(e){var t=e||"";t!==document.title&&(document.title=t)}))(a)},function(e,t,n){"use strict";e.exports=function(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r>>0,r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var $=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},H={};function W(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(H[e]=i),t&&(H[t[0]]=function(){return B(i.apply(this,arguments),t[1],t[2])}),n&&(H[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),j[t]=j[t]||function(e){var t,n,r,i=e.match($);for(t=0,n=i.length;t=0&&U.test(e);)e=e.replace(U,r),U.lastIndex=0,n-=1;return e}var V=/\d/,q=/\d\d/,K=/\d{3}/,Y=/\d{4}/,X=/[+-]?\d{6}/,Q=/\d\d?/,J=/\d\d\d\d?/,Z=/\d\d\d\d\d\d?/,ee=/\d{1,3}/,te=/\d{1,4}/,ne=/[+-]?\d{1,6}/,re=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,ae=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function ce(e,t,n){le[e]=F(t)?t:function(e,r){return e&&n?n:t}}function ue(e,t){return u(le,e)?le[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function pe(e,t){var n,r=t;for("string"===typeof e&&(e=[e]),s(t)&&(r=function(e,n){n[t]=w(e)}),n=0;n68?1900:2e3)};var ye,be=Ee("FullYear",!0);function Ee(e,t){return function(n){return null!=n?(we(this,e,n),r.updateOffset(this,t),this):Ce(this,e)}}function Ce(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function we(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ve(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ae(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ae(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ve(e)?29:28:31-r%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function Re(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Le(e,t,n){var r=7+t-n;return-(7+Re(e,0,r).getUTCDay()-t)%7+r-1}function Ie(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Le(e,r,i);return s<=0?a=ge(o=e-1)+s:s>ge(e)?(o=e+1,a=s-ge(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Pe(e,t,n){var r,i,o=Le(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Be(i=e.year()-1,t,n):a>Be(e.year(),t,n)?(r=a-Be(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Be(e,t,n){var r=Le(e,t,n),i=Le(e+1,t,n);return(ge(e)-r+i)/7}function $e(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),P("week",5),P("isoWeek",5),ce("w",Q),ce("ww",Q,q),ce("W",Q),ce("WW",Q,q),fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=w(e)})),W("d",0,"do","day"),W("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),W("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),W("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),ce("d",Q),ce("e",Q),ce("E",Q),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),fe(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e})),fe(["d","e","E"],(function(e,t,n,r){t[r]=w(e)}));var Ue="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),He="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function We(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null}var Ge=se,ze=se,Ve=se;function qe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),c.push(r),c.push(i),c.push(o);for(a.sort(e),s.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)s[t]=de(s[t]),l[t]=de(l[t]),c[t]=de(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Ye(e,t){W(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Ke),W("k",["kk",2],0,(function(){return this.hours()||24})),W("hmm",0,0,(function(){return""+Ke.apply(this)+B(this.minutes(),2)})),W("hmmss",0,0,(function(){return""+Ke.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)})),W("Hmm",0,0,(function(){return""+this.hours()+B(this.minutes(),2)})),W("Hmmss",0,0,(function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)})),Ye("a",!0),Ye("A",!1),N("hour","h"),P("hour",13),ce("a",Xe),ce("A",Xe),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,q),ce("hh",Q,q),ce("kk",Q,q),ce("hmm",J),ce("hmmss",Z),ce("Hmm",J),ce("Hmmss",Z),pe(["H","HH"],3),pe(["k","kk"],(function(e,t,n){var r=w(e);t[3]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[3]=w(e),p(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r)),p(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(i)),p(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=w(e.substr(0,r)),t[4]=w(e.substr(r,2)),t[5]=w(e.substr(i))}));var Qe,Je=Ee("Hours",!0),Ze={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:_e,week:{dow:0,doy:6},weekdays:Ue,weekdaysMin:He,weekdaysShort:je,meridiemParse:/[ap]\.?m?\.?/i},et={},tt={};function nt(e){return e?e.toLowerCase().replace("_","-"):e}function rt(t){var n=null;if(!et[t]&&"undefined"!==typeof e&&e&&e.exports)try{n=Qe._abbr,!function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),it(n)}catch(r){}return et[t]}function it(e,t){var n;return e&&((n=a(t)?at(e):ot(e,t))?Qe=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qe._abbr}function ot(e,t){if(null!==t){var n,r=Ze;if(t.abbr=e,null!=et[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=et[e]._config;else if(null!=t.parentLocale)if(null!=et[t.parentLocale])r=et[t.parentLocale]._config;else{if(null==(n=rt(t.parentLocale)))return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return et[e]=new O(k(r,t)),tt[e]&&tt[e].forEach((function(e){ot(e.name,e.config)})),it(e),et[e]}return delete et[e],null}function at(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qe;if(!i(e)){if(t=rt(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o0;){if(r=rt(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&A(i,n,!0)>=t-1)break;t--}o++}return Qe}(e)}function st(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Ae(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,i,o,a,s=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=lt(t.GG,e._a[0],Pe(xt(),1,4).year),r=lt(t.W,1),((i=lt(t.E,1))<1||i>7)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var c=Pe(xt(),o,a);n=lt(t.gg,e._a[0],c.year),r=lt(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o}r<1||r>Be(n,o,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=Ie(n,r,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=lt(e._a[0],i[0]),(e._dayOfYear>ge(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Re(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Re:Ne).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ft=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((\-?\d+)/i;function gt(e){var t,n,r,i,o,a,s=e._i,l=ut.exec(s)||dt.exec(s);if(l){for(p(e).iso=!0,t=0,n=pt.length;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),c+=n.length),H[o]?(n?p(e).empty=!1:p(e).unusedTokens.push(o),me(o,n,e)):e._strict&&!n&&p(e).unusedTokens.push(o);p(e).charsLeftOver=l-c,s.length>0&&p(e).unusedInput.push(s),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ct(e),st(e)}else Et(e);else gt(e)}function wt(e){var t=e._i,n=e._f;return e._locale=e._locale||at(e._l),null===t||void 0===n&&""===t?m({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),E(t)?new b(st(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:m()}));function Dt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return xt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function Zt(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function en(e,t){W(0,[e,e.length],0,t)}function tn(e,t,n,r,i){var o;return null==e?Pe(this,r,i).year:(t>(o=Be(e,r,i))&&(t=o),nn.call(this,e,t,n,r,i))}function nn(e,t,n,r,i){var o=Ie(e,t,n,r,i),a=Re(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}W(0,["gg",2],0,(function(){return this.weekYear()%100})),W(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,q),ce("gg",Q,q),ce("GGGG",te,Y),ce("gggg",te,Y),ce("GGGGG",ne,X),ce("ggggg",ne,X),fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=w(e)})),fe(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),W("Q",0,"Qo","quarter"),N("quarter","Q"),P("quarter",7),ce("Q",V),pe("Q",(function(e,t){t[1]=3*(w(e)-1)})),W("D",["DD",2],"Do","date"),N("date","D"),P("date",9),ce("D",Q),ce("DD",Q,q),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],2),pe("Do",(function(e,t){t[2]=w(e.match(Q)[0])}));var rn=Ee("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),P("dayOfYear",4),ce("DDD",ee),ce("DDDD",K),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=w(e)})),W("m",["mm",2],0,"minute"),N("minute","m"),P("minute",14),ce("m",Q),ce("mm",Q,q),pe(["m","mm"],4);var on=Ee("Minutes",!1);W("s",["ss",2],0,"second"),N("second","s"),P("second",15),ce("s",Q),ce("ss",Q,q),pe(["s","ss"],5);var an,sn=Ee("Seconds",!1);for(W("S",0,0,(function(){return~~(this.millisecond()/100)})),W(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),W(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),W(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),W(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),W(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),W(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),N("millisecond","ms"),P("millisecond",16),ce("S",ee,V),ce("SS",ee,q),ce("SSS",ee,K),an="SSSS";an.length<=9;an+="S")ce(an,re);function ln(e,t){t[6]=w(1e3*("0."+e))}for(an="S";an.length<=9;an+="S")pe(an,ln);var cn=Ee("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var un=b.prototype;function dn(e){return e}un.add=zt,un.calendar=function(e,t){var n=e||xt(),i=Lt(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(F(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,xt(n)))},un.clone=function(){return new b(this)},un.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Lt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=R(t)){case"year":o=qt(this,r)/12;break;case"month":o=qt(this,r);break;case"quarter":o=qt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:C(o)},un.endOf=function(e){var t;if(void 0===(e=R(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?Zt:Jt;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Qt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Qt(t,1e3)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},un.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},un.from=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||xt(e).isValid())?Ut({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},un.fromNow=function(e){return this.from(xt(),e)},un.to=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||xt(e).isValid())?Ut({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},un.toNow=function(e){return this.to(xt(),e)},un.get=function(e){return F(this[e=R(e)])?this[e]():this},un.invalidAt=function(){return p(this).overflow},un.isAfter=function(e,t){var n=E(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):F(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},un.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},un.toJSON=function(){return this.isValid()?this.toISOString():null},un.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},un.unix=function(){return Math.floor(this.valueOf()/1e3)},un.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},un.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},un.year=be,un.isLeapYear=function(){return ve(this.year())},un.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},un.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},un.quarter=un.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},un.month=Fe,un.daysInMonth=function(){return Ae(this.year(),this.month())},un.week=un.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},un.isoWeek=un.isoWeeks=function(e){var t=Pe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},un.weeksInYear=function(){var e=this.localeData()._week;return Be(this.year(),e.dow,e.doy)},un.isoWeeksInYear=function(){return Be(this.year(),1,4)},un.date=rn,un.day=un.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},un.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},un.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},un.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},un.hour=un.hours=Je,un.minute=un.minutes=on,un.second=un.seconds=sn,un.millisecond=un.milliseconds=cn,un.utcOffset=function(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(null===(e=Rt(ae,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=It(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Gt(this,Ut(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:It(this)},un.utc=function(e){return this.utcOffset(0,e)},un.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(It(this),"m")),this},un.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=Rt(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},un.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?xt(e).utcOffset():0,(this.utcOffset()-e)%60===0)},un.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},un.isLocal=function(){return!!this.isValid()&&!this._isUTC},un.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},un.isUtc=Pt,un.isUTC=Pt,un.zoneAbbr=function(){return this._isUTC?"UTC":""},un.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},un.dates=S("dates accessor is deprecated. Use date instead.",rn),un.months=S("months accessor is deprecated. Use month instead",Fe),un.years=S("years accessor is deprecated. Use year instead",be),un.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),un.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=wt(e))._a){var t=e._isUTC?h(e._a):xt(e._a);this._isDSTShifted=this.isValid()&&A(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hn=O.prototype;function pn(e,t,n,r){var i=at(),o=h().set(r,t);return i[n](o,e)}function fn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=pn(e,r,n,"month");return i}function mn(e,t,n,r){"boolean"===typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var i,o=at(),a=e?o._week.dow:0;if(null!=n)return pn(t,(n+a)%7,r,"day");var l=[];for(i=0;i<7;i++)l[i]=pn(t,(i+a)%7,r,"day");return l}hn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return F(r)?r.call(t,n):r},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return F(i)?i(e,t,n,r):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return F(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)F(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},hn.monthsRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||Me.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=Oe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||Me.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=ke),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Pe(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?$e(n,this._week.dow):e?n[e.day()]:n},hn.weekdaysMin=function(e){return!0===e?$e(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return!0===e?$e(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return We.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ve),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=S("moment.lang is deprecated. Use moment.locale instead.",it),r.langData=S("moment.langData is deprecated. Use moment.localeData instead.",at);var gn=Math.abs;function vn(e,t,n,r){var i=Ut(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function yn(e){return e<0?Math.floor(e):Math.ceil(e)}function bn(e){return 4800*e/146097}function En(e){return 146097*e/4800}function Cn(e){return function(){return this.as(e)}}var wn=Cn("ms"),An=Cn("s"),xn=Cn("m"),Sn=Cn("h"),_n=Cn("d"),Dn=Cn("w"),Tn=Cn("M"),Fn=Cn("Q"),kn=Cn("y");function On(e){return function(){return this.isValid()?this._data[e]:NaN}}var Mn=On("milliseconds"),Nn=On("seconds"),Rn=On("minutes"),Ln=On("hours"),In=On("days"),Pn=On("months"),Bn=On("years"),$n=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};function jn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var Hn=Math.abs;function Wn(e){return(e>0)-(e<0)||+e}function Gn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Hn(this._milliseconds)/1e3,r=Hn(this._days),i=Hn(this._months);e=C(n/60),t=C(e/60),n%=60,e%=60;var o=C(i/12),a=i%=12,s=r,l=t,c=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",p=Wn(this._months)!==Wn(d)?"-":"",f=Wn(this._days)!==Wn(d)?"-":"",m=Wn(this._milliseconds)!==Wn(d)?"-":"";return h+"P"+(o?p+o+"Y":"")+(a?p+a+"M":"")+(s?f+s+"D":"")+(l||c||u?"T":"")+(l?m+l+"H":"")+(c?m+c+"M":"")+(u?m+u+"S":"")}var zn=Ft.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},zn.add=function(e,t){return vn(this,e,t,1)},zn.subtract=function(e,t){return vn(this,e,t,-1)},zn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=R(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+bn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(En(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},zn.asMilliseconds=wn,zn.asSeconds=An,zn.asMinutes=xn,zn.asHours=Sn,zn.asDays=_n,zn.asWeeks=Dn,zn.asMonths=Tn,zn.asQuarters=Fn,zn.asYears=kn,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},zn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*yn(En(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=C(o/1e3),l.seconds=e%60,t=C(e/60),l.minutes=t%60,n=C(t/60),l.hours=n%24,a+=C(n/24),i=C(bn(a)),s+=i,a-=yn(En(i)),r=C(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},zn.clone=function(){return Ut(this)},zn.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},zn.milliseconds=Mn,zn.seconds=Nn,zn.minutes=Rn,zn.hours=Ln,zn.days=In,zn.weeks=function(){return C(this.days()/7)},zn.months=Pn,zn.years=Bn,zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Ut(e).abs(),i=$n(r.as("s")),o=$n(r.as("m")),a=$n(r.as("h")),s=$n(r.as("d")),l=$n(r.as("M")),c=$n(r.as("y")),u=i<=Un.ss&&["s",i]||i0,u[4]=n,jn.apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},zn.toISOString=Gn,zn.toString=Gn,zn.toJSON=Gn,zn.locale=Kt,zn.localeData=Xt,zn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gn),zn.lang=Yt,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),pe("x",(function(e,t,n){n._d=new Date(w(e))})),r.version="2.24.0",t=xt,r.fn=un,r.min=function(){var e=[].slice.call(arguments,0);return Dt("isBefore",e)},r.max=function(){var e=[].slice.call(arguments,0);return Dt("isAfter",e)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=h,r.unix=function(e){return xt(1e3*e)},r.months=function(e,t){return fn(e,t,"months")},r.isDate=l,r.locale=it,r.invalid=m,r.duration=Ut,r.isMoment=E,r.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},r.parseZone=function(){return xt.apply(null,arguments).parseZone()},r.localeData=at,r.isDuration=kt,r.monthsShort=function(e,t){return fn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},r.defineLocale=ot,r.updateLocale=function(e,t){if(null!=t){var n,r,i=Ze;null!=(r=rt(e))&&(i=r._config),t=k(i,t),(n=new O(t)).parentLocale=et[e],et[e]=n,it(e)}else null!=et[e]&&(null!=et[e].parentLocale?et[e]=et[e].parentLocale:null!=et[e]&&delete et[e]);return et[e]},r.locales=function(){return _(et)},r.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},r.normalizeUnits=R,r.relativeTimeRounding=function(e){return void 0===e?$n:"function"===typeof e&&($n=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=un,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(46)(e))},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";t.__esModule=!0,t.message=t.accessor=t.disabled=t.dateFormat=t.numberFormat=void 0;var r=s(n(10)),i=s(n(611));t.elementType=i.default;var o=s(n(264)),a=n(30);function s(e){return e&&e.__esModule?e:{default:e}}var l=(0,o.default)((function(){return a.number.propType.apply(a.number,arguments)}));t.numberFormat=l;var c=(0,o.default)((function(){return a.date.propType.apply(a.date,arguments)}));t.dateFormat=c;var u=(0,o.default)((function(){return r.default.bool.apply(r.default,arguments)}));t.disabled=u,u.acceptsArray=r.default.oneOfType([u,r.default.array]);var d=r.default.oneOfType([r.default.string,r.default.func]);t.accessor=d;var h=r.default.oneOfType([r.default.node,r.default.string,r.default.func]);t.message=h},function(e,t,n){"use strict";t.__esModule=!0,t.setNumber=function(e){var t=e.format,n=e.parse,r=e.formats,i=e.propType,s=void 0===i?o:i,c=e.decimalChar,u=void 0===c?function(){return"."}:c,d=e.precision,f=void 0===d?function(){return null}:d;p(a,r),l={formats:r,precision:f,decimalChar:u,propType:s,format:h(t),parse:function(e,t,r){var i=n.call(this,e,t,r);return null!=i&&"number"!==typeof i&&invariant(!1),i}}},t.setDate=function(e){var t=e.formats,n=e.format,r=e.parse,i=e.firstOfWeek,a=e.propType,l=void 0===a?o:a;p(s,t),u={formats:t,propType:l,firstOfWeek:i,format:h(n),parse:function(e,t,n){var i=r.call(this,e,t,n);return null==i||i instanceof Date&&!isNaN(i.getTime())||invariant(!1),i}}},t.date=t.number=void 0;i(n(19)),n(53);var r=i(n(10));function i(e){return e&&e.__esModule?e:{default:e}}var o=r.default.oneOfType([r.default.string,r.default.func]),a=["default"],s=["default","date","time","header","footer","weekday","dayOfMonth","month","year","decade","century"],l=f(),c={propType:function(){var e;return(e=l).propType.apply(e,arguments)},getFormat:function(e,t){return t||l.formats[e]},parse:function(){var e;return(e=l).parse.apply(e,arguments)},format:function(){var e;return(e=l).format.apply(e,arguments)},decimalChar:function(){var e;return(e=l).decimalChar.apply(e,arguments)},precision:function(){var e;return(e=l).precision.apply(e,arguments)}};t.number=c;var u=f(),d={propType:function(){var e;return(e=u).propType.apply(e,arguments)},getFormat:function(e,t){return t||u.formats[e]},parse:function(){var e;return(e=u).parse.apply(e,arguments)},format:function(){var e;return(e=u).format.apply(e,arguments)},firstOfWeek:function(){var e;return(e=u).firstOfWeek.apply(e,arguments)}};t.date=d;var h=function(e){return function(t,n,r){var i="function"===typeof n?n(t,r,this):e.call(this,t,n,r);return null!=i&&"string"!==typeof i&&invariant(!1),i}};function p(e,t){0}function f(){return{}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";e.exports={debugTool:null}},function(e,t,n){"use strict";t.__esModule=!0,t.pick=function(e,t){var n=Object.keys(t.propTypes),r={};return Object.keys(e).forEach((function(t){-1!==n.indexOf(t)&&(r[t]=e[t])})),r},t.pickElementProps=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1?n-1:0),i=1;i=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==C||C<12.11)),A=n||a&&s>=9;function x(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,_=function(e,t){var n=e.className,r=x(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return D(e).appendChild(t)}function F(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?L=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(L=function(e){try{e.select()}catch(t){}});var $=function(){this.id=null};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var V=[""];function q(e){for(;V.length<=e;)V.push(K(V)+" ");return V[e]}function K(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,u=a.length,d=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function fe(e,t){var n=he(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function we(e){be(e),Ee(e)}function Ae(e){return e.target||e.srcElement}function xe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,_e,De=function(){if(a&&s<9)return!1;var e=F("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==Se){var t=F("span","\u200b");T(e,F("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Se?F("span","\u200b"):F("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Fe(e){if(null!=_e)return _e;var t=T(e,document.createTextNode("A\u062eA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return D(e),!(!n||n.left==n.right)&&(_e=r.right-n.right<3)}var ke=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Oe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Me=function(){var e=F("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ne=null,Re={},Le={};function Ie(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function Pe(e){if("string"==typeof e&&Le.hasOwnProperty(e))e=Le[e];else if(e&&"string"==typeof e.name&&Le.hasOwnProperty(e.name)){var t=Le[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Pe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Pe(t);var n=Re[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var $e={};function Ue(e,t){P(t,$e.hasOwnProperty(e)?$e[e]:$e[e]={})}function je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function He(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function We(e,t,n){return!e.startState||e.startState(t,n)}var Ge=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?Ze(n,ze(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?Ze(e.line,t):n<0?Ze(e.line,0):e}(t,ze(e,t.line).text.length)}function st(e,t){for(var n=[],r=0;r=this.string.length},Ge.prototype.sol=function(){return this.pos==this.lineStart},Ge.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ge.prototype.next=function(){if(this.post},Ge.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ge.prototype.skipToEnd=function(){this.pos=this.string.length},Ge.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ge.prototype.backUp=function(e){this.pos-=e},Ge.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ge.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ge.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ge.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ge.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var lt=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ut(e,t,n,r){var i=[e.state.modeGen],o={};bt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,bt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&je(e.doc.mode,r.state),o=ut(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ht(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=ze(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof lt?c.lookAhead:0)<=o.modeFrontier))return s;var u=B(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&ze(r,o-1).stateAfter,s=a?ct.fromSaved(r,a,o):new ct(r,We(r.mode),o);return r.iter(o,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof lt?new ct(e,je(e.mode,t.state),n,t.lookAhead):new ct(e,je(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new lt(t,this.maxLookAhead):t};var gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function vt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=ze(a,(t=at(a,t)).line),c=ht(e,t.line,n),u=new Ge(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&pt(e,t,r,d.pos),d.pos=t.length,l=null):l=yt(mt(n,d,r.state,h),o),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c=t:o.to>t);(r||(r=[])).push(new wt(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||Ot(n,o.marker)<0)&&(n=o.marker)}return n}function It(e,t,n,r,i){var o=ze(e,t),a=Ct&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?et(c.to,n)>=0:et(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?et(c.from,r)<=0:et(c.from,r)<0)))return!0}}}function Pt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=ze(e,t),r=Pt(n);return n==r?t:Ye(r)}function $t(e,t){if(t>e.lastLine())return t;var n,r=ze(e,t);if(!Ut(e,r))return t;for(;n=Rt(r);)r=n.find(1,!0).line;return Ye(r)+1}function Ut(e,t){var n=Ct&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var zt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function Vt(e){e.parent=null,Dt(e)}zt.prototype.lineNo=function(){return Ye(this)},ye(zt);var qt={},Kt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Kt:qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=k("span",null,null,l?"padding-right: .1px":null),r={pre:k("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Jt,Fe(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=Zt(r.addToken,a)),r.map=[],tn(o,r,dt(e,o,t!=e.display.externalMeasured&&Ye(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=R(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=R(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return fe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function Qt(e){var t=F("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&d.from<=c);h++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function en(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function tn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,h,p=i.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=s="",h=null,d=null,v=1/0;for(var y=[],b=void 0,E=0;Ef||w.collapsed&&C.to==f&&C.from==f)){if(null!=C.to&&C.to!=f&&v>C.to&&(v=C.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&C.from==f&&(u+=" "+w.startStyle),w.endStyle&&C.to==v&&(b||(b=[])).push(w.endStyle,C.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var A in w.attributes)(h||(h={}))[A]=w.attributes[A];w.collapsed&&(!d||Ot(d.marker,w)<0)&&(d=C)}else C.from>f&&v>C.from&&(v=C.from)}if(b)for(var x=0;x=p)break;for(var _=Math.min(p,v);;){if(g){var D=f+g.length;if(!d){var T=D>_?g.slice(0,_-f):g;t.addToken(t,T,a?a+l:l,u,f+T.length==v?c:"",s,h)}if(D>=_){g=g.slice(_-f),f=_;break}f=D,u=""}g=i.slice(o,o=n[m++]),a=Yt(n[m++],t.cm.options)}}else for(var F=1;Fn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fn(e,t,n,r){return Mn(e,On(e,t),n,r)}function kn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Ln(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&re(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var p;c>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var f=l.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+rr(e.display),top:f.top,bottom:f.bottom}:Rn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Pn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=se(s,l,c),h=ae,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function qn(e,t){var n=0;t=at(e.doc,t),e.options.lineWrapping||(n=rr(e.display)*t.ch);var r=ze(e.doc,t.line),i=Ht(r)+wn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Kn(e,t,n,r,i){var o=Ze(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Kn(r.first,0,null,-1,-1);var i=Xe(r,n),o=r.first+r.size-1;if(i>o)return Kn(r.first+r.size-1,ze(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=ze(r,i);;){var s=Zn(e,a,i,t,n),l=Lt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=ze(r,i=c.line)}}function Xn(e,t,n,r){r-=Hn(t);var i=t.text.length,o=oe((function(t){return Mn(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return Mn(e,n,t).top>r}),o,i)}}function Qn(e,t,n,r){return n||(n=On(e,t)),Xn(e,t,n,Wn(e,t,Mn(e,n,r),"line").top)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Zn(e,t,n,r,i){i-=Ht(t);var o=On(e,t),a=Hn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?tr:er)(e,t,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,m=null,g=oe((function(t){var n=Mn(e,o,t);return n.top+=a,n.bottom+=a,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(f=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=E.bottom?1:0}return Kn(n,g=ie(t.text,g,1),p,v,r-h)}function er(e,t,n,r,i,o,a){var s=oe((function(s){var l=i[s],c=1!=l.level;return Jn(Vn(e,Ze(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Vn(e,Ze(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Jn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function tr(e,t,n,r,i,o,a){var s=Xn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||p.to<=l)){var f=Mn(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=fm)&&(u=p,d=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function nr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nn){Nn=F("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(F("br"));Nn.appendChild(document.createTextNode("x"))}T(e.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function rr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=F("span","xxxxxxxxxx"),n=F("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ir(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ar(e){var t=nr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/rr(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&Bt(e.doc,t)i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var a=pr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):hr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(rn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):hr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[cr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=cr(e,t),a=e.display.view;if(!Ct||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Bt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function fr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?h:r,(function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,E=null==r&&t==h,C=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var A=(c?E:b)&&w,x=(c?b:E)&&C?s:(g?v:y).left,S=A?l:(g?y:v).right;u(x,v.top,S-x,v.bottom)}else{var _,D,T,F;g?(_=c&&b&&C?s:v.left,D=c?l:f(e,i,"before"),T=c?s:f(t,i,"after"),F=c&&E&&w?l:y.right):(_=c?f(e,i,"before"):s,D=!c&&b&&C?l:v.right,T=!c&&E&&w?s:y.left,F=c?f(t,i,"after"):l),u(_,v.top,D-_,v.bottom),v.bottom0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Cr(e){e.state.focused||(e.display.input.focus(),Ar(e))}function wr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,xr(e))}),100)}function Ar(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(fe(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Er(e))}function xr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(fe(e,"blur",e,t),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Ke(i.line,l),_r(i.line),i.rest))for(var p=0;pe.display.sizerWidth){var f=Math.ceil(c/rr(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function _r(e){if(e.widgets)for(var t=0;t=a&&(o=Xe(t,Ht(ze(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Tr(e,t){var n=e.display,r=nr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Dn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+An(n),l=t.tops-r;if(t.topi+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,h=_n(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.lefth+d-3&&(a.scrollLeft=t.right+(p?0:10)-h),a}function Fr(e,t){null!=t&&(Mr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function kr(e){Mr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Or(e,t,n){null==t&&null==n||Mr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Mr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Nr(e,qn(e,t.from),qn(e,t.to),t.margin))}function Nr(e,t,n,r){var i=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Or(e,i.scrollLeft,i.scrollTop)}function Rr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||si(e,{top:t}),Lr(e,t,!0),n&&si(e),ni(e,100))}function Lr(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Ir(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,ui(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Pr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+An(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=F("div",[F("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=F("div",[F("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var $r=function(){};function Ur(e,t){t||(t=Pr(e));var n=e.display.barWidth,r=e.display.barHeight;jr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),jr(e,Pr(e)),n=e.display.barWidth,r=e.display.barHeight}function jr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}$r.prototype.update=function(){return{bottom:0,right:0}},$r.prototype.setScrollLeft=function(){},$r.prototype.setScrollTop=function(){},$r.prototype.clear=function(){};var Hr={native:Br,null:$r};function Wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Hr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Ir(e,t):Rr(e,t)}),e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var Gr=0;function zr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function Vr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Kr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Sr(t),e.barMeasure=Pr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Fn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-_n(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=F("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-wn(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?Ze(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?Ze(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Vn(e,t),l=n&&n!=t?Vn(e,n):s,c=Tr(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Rr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Ir(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,at(r,e.scrollToPos.from),at(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ht(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?je(t.mode,r.state):null,l=ut(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn)return ni(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Jr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==fr(e))return!1;di(e)&&(hr(e),t.dims=ir(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ct&&(o=Bt(e.doc,o),a=$t(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=rn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=rn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,cr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Ht(ze(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=fr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=M();if(!t||!O(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&O(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(p=!1),cn(e,h,u,n)),p&&(D(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(Je(e.options,u)))),a=h.node.nextSibling}else{var f=gn(e,h,u,n);o.insertBefore(f,a)}u+=h.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=M()&&(e.activeElt.focus(),e.anchorNode&&O(document.body,e.anchorNode)&&O(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ni(e,400)),n.updateLineNumbers=null,!0}function ai(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=_n(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+An(e.display)-Dn(e),n.top)}),t.visible=Dr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&oi(e,t);r=!1){Sr(e);var i=Pr(e);mr(e),Ur(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var n=new ii(e,t);if(oi(e,n)){Sr(e),ai(e,n);var r=Pr(e);mr(e),Ur(e,r),ci(e,r),n.finish()}}function li(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ci(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sn(e)+"px"}function ui(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var h=t.target,p=a.view;h!=s;h=h.parentNode)for(var f=0;f=0&&et(e,r.to())<=0)return n}return-1};var wi=function(e,t){this.anchor=e,this.head=t};function Ai(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return et(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:l>=0){var c=it(s.from(),a.from()),u=rt(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new wi(d?u:c,d?c:u))}}return new Ci(t,n)}function xi(e,t){return new Ci([new wi(e,t||e)],0)}function Si(e){return e.text?Ze(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function _i(e,t){if(et(e,t.from)<0)return e;if(et(e,t.to)<=0)return Si(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Si(t).ch-t.to.ch),Ze(n,r)}function Di(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,f-1),e.insert(s.line+1,v)}sn(e,"change",e,t)}function Ni(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),K(e.done)):e.done.length&&!K(e.done).ranges?K(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}(i,i.lastOp==r)))a=K(o.changes),0==et(t.from,t.to)&&0==et(t.from,a.to)?a.to=Si(t):o.changes.push(Pi(e,t));else{var l=K(i.done);for(l&&l.ranges||ji(e.sel,i.done),o={changes:[Pi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||fe(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,K(i.done),t))?i.done[i.done.length-1]=t:ji(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function ji(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Hi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Wi(e){if(!e)return null;for(var t,n=0;n-1&&(K(s)[d]=c[d],delete c[d])}}}return r}function Vi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=et(t,i)<0;o!=et(n,i)<0?(i=t,t=n):o!=et(t,n)<0&&(t=n)}return new wi(i,t)}return new wi(n||t,t)}function qi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ji(e,new Ci([Vi(e.sel.primary(),t,n,i)],0),r)}function Ki(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(fe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=oo(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=et(d,n))&&(r<0?h<0:h>0))return ro(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=oo(e,p,r,p.line==t.line?o:null)),p?ro(e,p,t,r,i):null}}return t}function io(e,t,n,r,i){var o=r||1,a=ro(e,t,n,o,i)||!i&&ro(e,t,n,o,!0)||ro(e,t,n,-o,i)||!i&&ro(e,t,n,-o,!0);return a||(e.cantEdit=!0,Ze(e.first,0))}function oo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?at(e,Ze(t.line-1)):null:n>0&&t.ch==(r||ze(e,t.line)).text.length?t.line0)){var u=[l,1],d=et(c.from,s.from),h=et(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)co(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else co(e,t)}}function co(e,t){if(1!=t.text.length||""!=t.text[0]||0!=et(t.from,t.to)){var n=Di(e,t);$i(e,t,n,e.cm?e.cm.curOp.id:NaN),po(e,t,n,St(e,t));var r=[];Ni(e,(function(e,n){n||-1!=U(r,e.history)||(vo(e.history,t),r.push(e.history)),po(e,t,null,St(e,t))}))}}function uo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c=0;--p){var f=h(p);if(f)return f.v}}}}function ho(e,t){if(0!=t&&(e.first+=t,e.sel=new Ci(Y(e.sel.ranges,(function(e){return new wi(Ze(e.anchor.line+t,e.anchor.ch),Ze(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){ur(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Ze(o,ze(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ve(e,t.from,t.to),n||(n=Di(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Ye(Pt(ze(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Mi(r,t,n,ar(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=Wt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=ze(e,r).stateAfter;if(i&&(!(i instanceof lt)||r+i.lookAhead1||!(this.children[0]instanceof bo))){var s=[];this.collapse(s),this.children=[new bo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=k("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(It(e,t.line,t,n,o)||t.line!=n.line&&It(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}o.addToHistory&&$i(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Pt(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ke(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new wt(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Ke(t,0)})),o.clearOnEnter&&de(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Et=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Ao,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)ur(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");o.atomic&&to(c.doc),sn(c,"markerAdded",c,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&zr(e),ve(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&ur(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&to(e.doc)),e&&sn(e,"markerCleared",e,this,r,i),t&&Vr(e),this.parent&&this.parent.clear()}},xo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)lo(this,r[l]);s?Qi(this,s):this.cm&&kr(this.cm)})),undo:ti((function(){uo(this,"undo")})),redo:ti((function(){uo(this,"redo")})),undoSelection:ti((function(){uo(this,"undo",!0)})),redoSelection:ti((function(){uo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=at(this,e),t=at(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),at(this,Ze(n,t))},indexFromPos:function(e){var t=(e=at(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Zi(t.doc,xi(n,n)),d)for(var h=0;h=0;t--)fo(e.doc,"",r[t].from,r[t].to,"+delete");kr(e)}))}function Qo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jo(e,t,n){var r=Qo(e,t.ch,n);return null==r?null:new Ze(t.line,r,n<0?"after":"before")}function Zo(e,t,n,r,i){if(e){var o=ce(n,t.doc.direction);if(o){var a,s=i<0?K(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=On(t,n);a=i<0?n.text.length-1:0;var u=Mn(t,c,a).top;a=oe((function(e){return Mn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Qo(n,a,1))}else a=i<0?s.to:s.from;return new Ze(r,a,l)}}return new Ze(r,i<0?n.text.length:0,i<0?"before":"after")}Ho.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ho.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ho.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ho.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ho.default=y?Ho.macDefault:Ho.pcDefault;var ea={selectAll:ao,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Xo(e,(function(t){if(t.empty()){var n=ze(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Ze(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ze(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=ze(e.doc,i.line-1).text;a&&(i=new Ze(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Ze(i.line-1,a.length-1),i,"+transpose"))}n.push(new wi(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Jr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(et((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(et(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=Zr(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",c),o||(be(t),r.addNew||qi(e.doc,n,null,null,r.extend),l||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",u),de(i.scroller,"dragstart",d),de(i.scroller,"drop",c),wr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;be(t);var a,s,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new wi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new wi(n,n)),n=lr(e,t,!0,!0),s=-1;else{var u=ga(e,n,r.unit);a=r.extend?Vi(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Ji(o,Ai(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Ji(o,Ai(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Yi(o,s,a,W):(s=0,Ji(o,new Ci([a],0),W),l=o.sel);var d=n;function h(t){if(0!=et(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=B(ze(o,n.line).text,n.ch,c),h=B(ze(o,t.line).text,t.ch,c),p=Math.min(u,h),f=Math.max(u,h),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=ze(o,m).text,y=z(v,p,c);p==f?i.push(new wi(Ze(m,y),Ze(m,y))):v.length>y&&i.push(new wi(Ze(m,y),Ze(m,z(v,f,c))))}i.length||i.push(new wi(n,n)),Ji(o,Ai(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=a,C=ga(e,t,r.unit),w=E.anchor;et(C.anchor,w)>0?(b=C.head,w=it(E.from(),C.anchor)):(b=C.anchor,w=rt(E.to(),C.head));var A=l.ranges.slice(0);A[s]=function(e,t){var n=t.anchor,r=t.head,i=ze(e.doc,n.line);if(0==et(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,m=p?"after":"before";return n.ch==f&&n.sticky==m?t:new wi(new Ze(n.line,f,m),r)}(e,new wi(at(o,w),b)),Ji(o,Ai(e,A,s),W)}}var p=i.wrapper.getBoundingClientRect(),f=0;function m(t){e.state.selectingText=!1,f=1/0,t&&(be(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=Zr(e,(function(t){0!==t.buttons&&xe(t)?function t(n){var a=++f,s=lr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=et(s,d)){e.curOp.focus=M(),h(s);var l=Dr(i,o);(s.line>=l.to||s.linep.bottom?20:0;c&&setTimeout(Zr(e,(function(){f==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=Zr(e,m);e.state.selectingText=v,de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):Ae(e)==n.scroller&&be(e):2==i?(r&&qi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(A?t.display.input.onContextMenu(e):wr(t)))}}function ga(e,t,n){if("char"==n)return new wi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new wi(Ze(t.line,0),at(e.doc,Ze(t.line+1,0)));var r=n(e,t);return new wi(r.from,r.to)}function va(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return Ce(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return fe(e,n,e,Xe(e.doc,o),e.display.gutterSpecs[l].className,t),Ce(t)}}function ya(e,t){return va(e,t,"gutterClick",!0)}function ba(e,t){Cn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&va(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||A||e.display.input.onContextMenu(t)}function Ea(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),$n(e)}fa.prototype.compare=function(e,t,n){return this.time+400>e&&0==et(t,this.pos)&&n==this.button};var Ca={toString:function(){return"CodeMirror.Init"}},wa={},Aa={};function xa(e,t,n){if(!t!=!(n&&n!=Ca)){var r=e.display.dragFunctions,i=t?de:pe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Sa(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),Gt(e)),sr(e),ur(e),$n(e),setTimeout((function(){return Ur(e)}),100)}function _a(e,t){var n=this;if(!(this instanceof _a))return new _a(e,t);this.options=t=t?P(t):{},P(wa,t,!1);var r=t.value;"string"==typeof r?r=new ko(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new _a.inputStyles[t.inputStyle](this),o=this.display=new mi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Ea(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new $,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",Zr(e,ma)),de(t.scroller,"dblclick",a&&s<11?Zr(e,(function(t){if(!me(e,t)){var n=lr(e,t);if(n&&!ya(e,t)&&!Cn(e.display,t)){be(t);var r=e.findWordAt(n);qi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),de(t.scroller,"contextmenu",(function(t){return ba(e,t)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ya(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Cn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new wi(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new wi(Ze(s.line,0),at(e.doc,Ze(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Rr(e,t.scroller.scrollTop),Ir(e,t.scroller.scrollLeft,!0),fe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return Ei(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return Ei(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||we(t)},over:function(t){me(e,t)||(function(e,t){var n=lr(e,t);if(n){var r=document.createDocumentFragment();vr(e,n,r),e.display.dragCursor||(e.display.dragCursor=F("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),we(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Oo<100))we(t);else if(!me(e,t)&&!Cn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=F("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:Zr(e,Mo),leave:function(t){me(e,t)||No(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return ua.call(e,t)})),de(l,"keydown",Zr(e,ca)),de(l,"keypress",Zr(e,da)),de(l,"focus",(function(t){return Ar(e,t)})),de(l,"blur",(function(t){return xr(e,t)}))}(this),Io(),zr(this),this.curOp.forceUpdate=!0,Ri(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(I(Ar,this),20):xr(this),Aa)Aa.hasOwnProperty(c)&&Aa[c](n,t[c],Ca);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?B(ze(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)h+=a,d+="\t";if(ha,l=ke(t),c=null;if(s&&r.ranges.length>1)if(Fa&&Fa.text.join("\n")==t){if(r.ranges.length%Fa.text.length==0){c=[];for(var u=0;u=0;h--){var p=r.ranges[h],f=p.from(),m=p.to();p.empty()&&(n&&n>0?f=Ze(f.line,f.ch-n):e.state.overwrite&&!s?m=Ze(m.line,Math.min(ze(o,m.line).text.length,m.ch+K(l).length)):s&&Fa&&Fa.lineWise&&Fa.text.join("\n")==t&&(f=m=Ze(f.line,0)));var g={from:f,to:m,text:c?c[h%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};lo(e.doc,g),sn(e,"inputRead",e,g)}t&&!s&&Na(e,t),kr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ma(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Jr(t,(function(){return Oa(t,n,0,null,"paste")})),!0}function Na(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Ta(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ta(e,i.head.line,"smart"));a&&sn(e,"electricInput",e,i.head.line)}}}function Ra(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&h>=u.begin)){var p=d?"before":"after";return new Ze(n.line,h,p)}}var f=function(e,t,r){for(var o=function(e,t){return t?new Ze(n.line,l(e,1),"before"):new Ze(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=f(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Jo(s,t,n))){if(r||!function(){var r=t.line+n;return!(r=e.first+e.size)&&(t=new Ze(r,t.ch,t.sticky),s=ze(e,r))}())return!1;t=Zo(i,e.cm,s,t.line,n)}else t=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||l(!h);h=!1){var p=s.text.charAt(t.ch)||"\n",f=ee(p,d)?"w":u&&"\n"==p?"n":!u||/\s/.test(p)?null:"p";if(!u||h||f||(f="s"),c&&c!=f){n<0&&(n=1,l(),t.sticky="after");break}if(f&&(c=f),n>0&&!l(!h))break}var m=io(e,t,o,a,!0);return tt(o,m)&&(m.hitSide=!0),m}function Ba(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*nr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Yn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var $a=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,t){var n=kn(e,t.line);if(!n||n.hidden)return null;var r=ze(e.doc,t.line),i=Tn(n,r,t.line),o=ce(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Ln(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ja(e,t){return t&&(e.bad=!0),e}function Ha(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return ja(e.clipPos(Ze(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Ua(t,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=Ze(a.line-1,ze(r.doc,a.line-1).length)),s.ch==ze(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=cr(r,a.line))?(t=Ye(i.view[0].line),n=i.view[0].node):(t=Ye(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=cr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Ye(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(Ze(r,0),Ze(i+1,0),(g=+h,function(e){return e.id==g}));return void(p.length&&(o=p[0].find(0))&&u(Ve(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&c();for(var m=0;m1&&h.length>1;)if(K(d)==K(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var p=0,f=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var C=Ze(t,p),w=Ze(l,h.length?K(h).length-f:0);return d.length>1||d[0]||et(C,w)?(fo(r.doc,d,C,w,"+input"),!0):void 0},$a.prototype.ensurePolled=function(){this.forceCompositionEnd()},$a.prototype.reset=function(){this.forceCompositionEnd()},$a.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$a.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},$a.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,(function(){return ur(e.cm)}))},$a.prototype.setUneditable=function(e){e.contentEditable="false"},$a.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Zr(this.cm,Oa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},$a.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},$a.prototype.onContextMenu=function(){},$a.prototype.resetPosition=function(){},$a.prototype.needsContentAttribute=!0;var Ga=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())ka({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ra(r);ka({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),L(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){me(r,e)||Ma(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",o),de(i,"copy",o),de(e.scroller,"paste",(function(t){if(!Cn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),de(e.lineSpace,"selectstart",(function(t){Cn(e,t)||be(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ga.prototype.createField=function(e){this.wrapper=Ia(),this.textarea=this.wrapper.firstChild},Ga.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=gr(e);if(e.options.moveInputWithCursor){var i=Vn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ga.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ga.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&L(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||M()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ga.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ga.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Oe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=lr(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Zr(n,Ji)(n.doc,xi(o),H);var u,h=i.style.cssText,p=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&m(),A?(we(e),de(window,"mouseup",(function e(){pe(window,"mouseup",e),setTimeout(g,20)}))):setTimeout(g,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="\u200b"+(e?i.value:"");i.value="\u21da",i.value=o,t.prevInput=e?"":"\u200b",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=h,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&m();var e=0;r.detectingSelectAll=setTimeout((function o(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"\u200b"==t.prevInput?Zr(n,ao)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())}),200)}}},Ga.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ca&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ca,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Fi(e)}),!0),n("indentUnit",2,Fi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){ki(e),$n(e),ur(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Ze(r,o))}r++}));for(var i=n.length-1;i>=0;i--)fo(e.doc,t,n[i],Ze(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ca&&e.refresh()})),n("specialCharPlaceholder",Qt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!E),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ea(e),fi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yo(t),i=n!=Ca&&Yo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Sa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=hi(t,e.options.lineNumbers),fi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),n("scrollbarStyle","native",(function(e){Wr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=hi(e.options.gutters,t),fi(e)}),!0),n("firstLineNumber",1,fi,!0),n("lineNumberFormatter",(function(e){return e}),fi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(xr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,xa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,ki,!0),n("addModeClass",!1,ki,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,ki,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(_a),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Zr(this,t[e])(this,n,i),fe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Yo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Ta(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&kr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Yi(this.doc,r,new wi(o,c[r].to()),H)}}})),getTokenAt:function(e,t){return vt(this,e,t)},getLineTokens:function(e,t){return vt(this,Ze(e),t,!0)},getTokenTypeAt:function(e){e=at(this.doc,e);var t,n=dt(this,ze(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=ze(this.doc,e)}else r=e;return Wn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Ht(r):0)},defaultTextHeight:function(){return nr(this.display)},defaultCharWidth:function(){return rr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=Vn(this,at(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&function(e,t){var n=Tr(e,t);null!=n.scrollTop&&Rr(e,n.scrollTop),null!=n.scrollLeft&&Ir(e,n.scrollLeft)}(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:ei(ca),triggerOnKeyPress:ei(da),triggerOnKeyUp:ua,triggerOnMouseDown:ei(ma),execCommand:function(e){if(ea.hasOwnProperty(e))return ea[e].call(null,this)},triggerElectric:ei((function(e){Na(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=at(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&sr(this),fe(this,"refresh",this)})),swapDoc:ei((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ri(this,e),$n(this),this.display.input.reset(),Or(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(_a);var za="iter insert remove copy getEditor constructor".split(" ");for(var Va in ko.prototype)ko.prototype.hasOwnProperty(Va)&&U(za,Va)<0&&(_a.prototype[Va]=function(e){return function(){return e.apply(this.doc,arguments)}}(ko.prototype[Va]));return ye(ko),_a.inputStyles={textarea:Ga,contenteditable:$a},_a.defineMode=function(e){_a.defaults.mode||"null"==e||(_a.defaults.mode=e),Ie.apply(this,arguments)},_a.defineMIME=function(e,t){Le[e]=t},_a.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),_a.defineMIME("text/plain","null"),_a.defineExtension=function(e,t){_a.prototype[e]=t},_a.defineDocExtension=function(e,t){ko.prototype[e]=t},_a.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=M();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(l){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=_a((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=pe,e.on=de,e.wheelEventPixels=bi,e.Doc=ko,e.splitLines=ke,e.countColumn=B,e.findColumn=z,e.isWordChar=Z,e.Pass=j,e.signal=fe,e.Line=zt,e.changeEnd=Si,e.scrollbarModel=Hr,e.Pos=Ze,e.cmpPos=et,e.modes=Re,e.mimeModes=Le,e.resolveMode=Pe,e.getMode=Be,e.modeExtensions=$e,e.extendMode=Ue,e.copyState=je,e.startState=We,e.innerMode=He,e.commands=ea,e.keyMap=Ho,e.keyName=Ko,e.isModifierKey=Vo,e.lookupKey=zo,e.normalizeKeyMap=Go,e.StringStream=Ge,e.SharedTextMarker=_o,e.TextMarker=xo,e.LineWidget=Co,e.e_preventDefault=be,e.e_stopPropagation=Ee,e.e_stop=we,e.addClass=N,e.contains=O,e.rmClass=_,e.keyNames=Bo}(_a),_a.version="5.49.0",_a}()},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=n.n(o);function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["minRows","maxRows","onHeightChange","useCacheForDOMMeasurements","inputRef"]));return t.style=s({},t.style,{height:this.state.height}),Math.max(t.style.maxHeight||1/0,this.state.maxHeight)1){for(var f=Array(p),m=0;m1){for(var v=Array(g),y=0;y0||(0,o.default)(!1),null!=d&&(i+=encodeURI(d));else if("("===c)s[r]="",r+=1;else if(")"===c){var f=s.pop();(r-=1)?s[r-1]+=f:i+=f}else if(":"===c.charAt(0))if(u=c.substring(1),null!=(d=t[u])||r>0||(0,o.default)(!1),null==d){if(r){s[r-1]="";for(var m=n.indexOf(c),g=n.slice(m,n.length),v=-1,y=0;y0||(0,o.default)(!1),h=m+v-1}}else r?s[r-1]+=encodeURIComponent(d):i+=encodeURIComponent(d);else r?s[r-1]+=c:i+=c;return r<=0||(0,o.default)(!1),i.replace(/\/+/g,"/")};var r,i=n(19),o=(r=i)&&r.__esModule?r:{default:r};function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var s=Object.create(null);function l(e){return s[e]||(s[e]=function(e){for(var t="",n=[],r=[],i=void 0,o=0,s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;i=s.exec(e);)i.index!==o&&(r.push(e.slice(o,i.index)),t+=a(e.slice(o,i.index))),i[1]?(t+="([^/]+)",n.push(i[1])):"**"===i[0]?(t+="(.*)",n.push("splat")):"*"===i[0]?(t+="(.*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]&&(t+=")?"),r.push(i[0]),o=s.lastIndex;return o!==e.length&&(r.push(e.slice(o,e.length)),t+=a(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}(e)),s[e]}function c(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=l(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;"/"!==e.charAt(e.length-1)&&(r+="/?"),"*"===o[o.length-1]&&(r+="$");var a=t.match(new RegExp("^"+r,"i"));if(null==a)return null;var s=a[0],c=t.substr(s.length);if(c){if("/"!==s.charAt(s.length-1))return null;c="/"+c}return{remainingPathname:c,paramNames:i,paramValues:a.slice(1).map((function(e){return e&&decodeURIComponent(e)}))}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(-1!==t.indexOf("deprecated")){if(a[t])return;a[t]=!0}t="[react-router] "+t;for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.POP,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="string"===typeof e?(0,a.parsePath)(e):e,i=r.pathname||"/",o=r.search||"",l=r.hash||"",c=r.state;return{pathname:i,search:o,hash:l,state:c,action:t,key:n}};var c=function(e){return"[object Date]"===Object.prototype.toString.call(e)},u=t.statesAreEqual=function e(t,n){if(t===n)return!0;var i="undefined"===typeof t?"undefined":r(t);if(i!==("undefined"===typeof n?"undefined":r(n)))return!1;if("function"===i&&(0,o.default)(!1),"object"===i){if(c(t)&&c(n)&&(0,o.default)(!1),!Array.isArray(t)){var a=Object.keys(t),s=Object.keys(n);return a.length===s.length&&a.every((function(r){return e(t[r],n[r])}))}return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}))}return!1};t.locationsAreEqual=function(e,t){return e.key===t.key&&e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&u(e.state,t.state)}},function(e,t,n){"use strict";function r(e){return"undefined"===typeof e||null===e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"===typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n should not have a "'+t+'" prop')};var r=n(0),i=r.PropTypes.func,o=r.PropTypes.object,a=r.PropTypes.arrayOf,s=r.PropTypes.oneOfType,l=r.PropTypes.element,c=r.PropTypes.shape,u=r.PropTypes.string;t.history=c({listen:i.isRequired,push:i.isRequired,replace:i.isRequired,go:i.isRequired,goBack:i.isRequired,goForward:i.isRequired});var d=t.component=s([i,u]),h=(t.components=s([d,o]),t.route=s([o,l]));t.routes=s([h,a(h)])},function(e,t,n){var r=n(146),i=n(412),o=n(413),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=r},function(e,t,n){"use strict";var r=n(66);e.exports=new r({include:[n(233)],implicit:[n(509),n(510)],explicit:[n(511),n(515),n(516),n(517)]})},function(e,t,n){"use strict";var r=n(0),i=n(523);if("undefined"===typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,o)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";t.__esModule=!0,t.notify=function(e,t){e&&e.apply(null,[].concat(t))},t.instanceId=function(e,t){void 0===t&&(t="");return e.__id||(e.__id=function(e){return""+((null==e?"":e)+ ++r)}("rw_")),(e.props.id||e.__id)+t},t.isFirstFocusedRender=function(e){return e._firstFocus||(e.state.focused||!!e.props.open)&&(e._firstFocus=!0)};var r=0},function(e,t,n){"use strict";t.__esModule=!0,t.dataIndexOf=o,t.valueMatcher=a,t.dataItem=function(e,t,n){var r=o(e,t,n);return-1!==r?e[r]:t},t.dataText=t.dataValue=void 0;var r=n(53),i=function(e,t){var n=e;return"function"===typeof t?n=t(e):null==e?n=e:"string"===typeof t&&"object"===typeof e&&t in e&&(n=e[t]),n};t.dataValue=i;function o(e,t,n){for(var r=-1,i=function(e){return a(t,e,n)};++r]/,l=n(129)((function(e,t){if(e.namespaceURI!==o.svg||"innerHTML"in e)e.innerHTML=t;else{(r=r||document.createElement("div")).innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}}));if(i.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=l},function(e,t,n){"use strict";var r=/["'&<>]/;e.exports=function(e){return"boolean"===typeof e||"number"===typeof e?""+e:function(e){var t,n=""+e,i=r.exec(n);if(!i)return n;var o="",a=0,s=0;for(a=i.index;a=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["className","disabled","label","icon","busy","active","children","variant","spinner","component"]),b=y.type;return"button"===v&&(b=b||"button"),r.default.createElement(v,s({},y,{tabIndex:"-1",title:i,type:b,disabled:n,"aria-disabled":n,"aria-label":i,className:(0,o.default)(t,"rw-btn",u&&!n&&"rw-state-active",p&&"rw-btn-"+p)}),c?m:a,d)},i}(r.default.Component);c.propTypes={disabled:i.default.bool,label:i.default.string,icon:i.default.node,busy:i.default.bool,active:i.default.bool,variant:i.default.oneOf(["primary","select"]),component:i.default.any,spinner:i.default.node};var u=c;t.default=u,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=c(n(110));t.spyOnComponent=r.default;var i=c(n(615));t.autoFocus=i.default;var o=c(n(616));t.focusManager=o.default;var a=c(n(167));t.mountManager=a.default;var s=c(n(265));t.timeoutManager=s.default;var l=c(n(617));function c(e){return e&&e.__esModule?e:{default:e}}t.mixin=l.default},function(e,t){var n={componentWillMount:!0,componentDidMount:!0,componentWillReceiveProps:!0,getSnapshotBeforeUpdate:!0,shouldComponentUpdate:!0,componentWillUpdate:!0,componentDidUpdate:!0,componentWillUnmount:!0},r={getDerivedStateFromProps:!0};function i(e,t,n){var r=!0;return Array.isArray(t)&&(r="after"!==t[0],t=t[1]),e?function(){var i=n?null:this;r&&t.apply(i,arguments),e.apply(i,arguments),!r&&t.apply(i,arguments)}:t}e.exports=function(e,t){var o=Object.create(null);for(var a in t)r[a]&&(e.constructor[a]=i(o[a]=e.constructor[a],t[a],!0));for(var a in t)n[a]&&(e[a]=i(o[a]=e[a],t[a]));return function(t){var n=r[t]?e.constructor:e;if(t&&t in o)n[t]=o[t];else for(var t in o)n[t]=o[t]}},e.exports.mixin=function(e,t){return spyOnComponent(e.prototype,t),e}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),i=s(n(10)),o=s(n(17)),a=s(n(47));function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["className","activeId"]);return r.default.createElement("table",l({},i,{role:"grid",tabIndex:"-1","aria-activedescendant":n||null,className:(0,o.default)(t,"rw-nav-view","rw-calendar-grid")}))},t}(r.default.Component);h.propTypes={activeId:i.default.string};var p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i-1||r("96",e),!c.plugins[n]){t.extractEvents||r("97",e),c.plugins[n]=t;var a=t.eventTypes;for(var l in a)s(a[l],t,l)||r("98",l,e)}}}function s(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&r("99",n),c.eventNameDispatchConfigs[n]=e;var i=e.phasedRegistrationNames;if(i){for(var o in i){if(i.hasOwnProperty(o))l(i[o],t,n)}return!0}return!!e.registrationName&&(l(e.registrationName,t,n),!0)}function l(e,t,n){c.registrationNameModules[e]&&r("100",e),c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){i&&r("101"),i=Array.prototype.slice.call(e),a()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];o.hasOwnProperty(n)&&o[n]===i||(o[n]&&r("102",n),o[n]=i,t=!0)}t&&a()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){for(var e in i=null,o)o.hasOwnProperty(e)&&delete o[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var a in r)r.hasOwnProperty(a)&&delete r[a]}};e.exports=c},function(e,t,n){"use strict";var r,i,o=n(16),a=n(123);n(13),n(14);function s(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=l.getNodeFromInstance(r),t?a.invokeGuardedCallbackWithCatch(i,n,e):a.invokeGuardedCallback(i,n,e),e.currentTarget=null}var l={isEndish:function(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e},isMoveish:function(e){return"topMouseMove"===e||"topTouchMove"===e},isStartish:function(e){return"topMouseDown"===e||"topTouchStart"===e},executeDirectDispatch:function(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)&&o("103"),e.currentTarget=t?l.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r},executeDispatchesInOrder:function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}(e))}};e.exports=l},function(e,t,n){"use strict";n(18);var r=n(31),i=(n(14),r);e.exports=i},function(e,t,n){"use strict";e.exports=function(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}},function(e,t,n){"use strict";t.__esModule=!0,t.locationShape=t.routerShape=void 0;var r=n(0),i=r.PropTypes.func,o=r.PropTypes.object,a=r.PropTypes.shape,s=r.PropTypes.string;t.routerShape=a({push:i.isRequired,replace:i.isRequired,go:i.isRequired,goBack:i.isRequired,goForward:i.isRequired,setRouteLeaveHook:i.isRequired,isActive:i.isRequired}),t.locationShape=a({pathname:s.isRequired,search:s.isRequired,state:o,action:s.isRequired,key:s})},function(e,t,n){"use strict";t.__esModule=!0,t.loopAsync=function(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0;function l(){i=!0,o?s=[].concat(Array.prototype.slice.call(arguments)):n.apply(this,arguments)}!function c(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r=e&&a&&(i=!0,n())}}()},t.mapAsync=function(e,t,n){var r=e.length,i=[];if(0===r)return n(null,i);var o=!1,a=0;e.forEach((function(e,s){t(e,s,(function(e,t){!function(e,t,s){o||(t?(o=!0,n(t)):(i[e]=s,(o=++a===r)&&n(null,i)))}(s,e,t)}))}))}},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.getCurrentLocation,n=e.getUserConfirmation,r=e.pushLocation,a=e.replaceLocation,u=e.go,d=e.keyLength,h=void 0,p=void 0,f=[],m=[],g=[],v=function(){return p&&p.action===l.POP?g.indexOf(p.key):h?g.indexOf(h.key):-1},y=function(e){var t=v();(h=e).action===l.PUSH?g=[].concat(g.slice(0,t+1),[h.key]):h.action===l.REPLACE&&(g[t]=h.key),m.forEach((function(e){return e(h)}))},b=function(e){return f.push(e),function(){return f=f.filter((function(t){return t!==e}))}},E=function(e){return m.push(e),function(){return m=m.filter((function(t){return t!==e}))}},C=function(e,t){(0,i.loopAsync)(f.length,(function(t,n,r){(0,s.default)(f[t],e,(function(e){return null!=e?r(e):n()}))}),(function(e){n&&"string"===typeof e?n(e,(function(e){return t(!1!==e)})):t(!1!==e)}))},w=function(e){h&&(0,c.locationsAreEqual)(h,e)||p&&(0,c.locationsAreEqual)(p,e)||(p=e,C(e,(function(t){if(p===e)if(p=null,t){if(e.action===l.PUSH){var n=(0,o.createPath)(h);(0,o.createPath)(e)===n&&(0,c.statesAreEqual)(h.state,e.state)&&(e.action=l.REPLACE)}e.action===l.POP?y(e):e.action===l.PUSH?!1!==r(e)&&y(e):e.action===l.REPLACE&&!1!==a(e)&&y(e)}else if(h&&e.action===l.POP){var i=g.indexOf(h.key),s=g.indexOf(e.key);-1!==i&&-1!==s&&u(i-s)}})))},A=function(e){return w(F(e,l.PUSH))},x=function(e){return w(F(e,l.REPLACE))},S=function(){return u(-1)},_=function(){return u(1)},D=function(){return Math.random().toString(36).substr(2,d||6)},T=function(e){return(0,o.createPath)(e)},F=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D();return(0,c.createLocation)(e,t,n)};return{getCurrentLocation:t,listenBefore:b,listen:E,transitionTo:w,push:A,replace:x,go:u,goBack:S,goForward:_,createKey:D,createPath:o.createPath,createHref:T,createLocation:F}}},function(e,t,n){"use strict";t.__esModule=!0;t.canUseDOM=!("undefined"===typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";t.__esModule=!0,t.go=t.replaceLocation=t.pushLocation=t.startListener=t.getUserConfirmation=t.getCurrentLocation=void 0;var r=n(64),i=n(91),o=n(215),a=n(45),s=n(144),l=s.canUseDOM&&!(0,i.supportsPopstateOnHashchange)(),c=function(e){var t=e&&e.key;return(0,r.createLocation)({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:t?(0,o.readState)(t):void 0},void 0,t)},u=t.getCurrentLocation=function(){var e=void 0;try{e=window.history.state||{}}catch(t){e={}}return c(e)},d=(t.getUserConfirmation=function(e,t){return t(window.confirm(e))},t.startListener=function(e){var t=function(t){(0,i.isExtraneousPopstateEvent)(t)||e(c(t.state))};(0,i.addEventListener)(window,"popstate",t);var n=function(){return e(u())};return l&&(0,i.addEventListener)(window,"hashchange",n),function(){(0,i.removeEventListener)(window,"popstate",t),l&&(0,i.removeEventListener)(window,"hashchange",n)}},function(e,t){var n=e.state,r=e.key;void 0!==n&&(0,o.saveState)(r,n),t({key:r},(0,a.createPath)(e))});t.pushLocation=function(e){return d(e,(function(e,t){return window.history.pushState(e,null,t)}))},t.replaceLocation=function(e){return d(e,(function(e,t){return window.history.replaceState(e,null,t)}))},t.go=function(e){e&&window.history.go(e)}},function(e,t,n){var r=n(43).Symbol;e.exports=r},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(427),i=n(435),o=n(94);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){var r=n(49)(n(43),"Map");e.exports=r},function(e,t,n){"use strict";var r=n(66);e.exports=new r({explicit:[n(502),n(503),n(504)]})},function(e,t){e.exports={positions:{tl:"tl",tr:"tr",tc:"tc",bl:"bl",br:"br",bc:"bc"},levels:{success:"success",error:"error",warning:"warning",info:"info"},notification:{title:null,message:null,level:null,position:"tr",autoDismiss:5,dismissible:"both",action:null}}},function(e,t,n){var r=n(50)(n(37),"Map");e.exports=r},function(e,t,n){var r=n(37).Symbol;e.exports=r},function(e,t,n){var r=n(242),i=n(569),o=n(246);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(238),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s}).call(this,n(46)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(242),i=n(572),o=n(246);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(577),i=n(247),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},function(e,t,n){var r=n(581),i=n(152),o=n(582),a=n(583),s=n(584),l=n(102),c=n(239),u=c(r),d=c(i),h=c(o),p=c(a),f=c(s),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||a&&"[object Set]"!=m(new a)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(587);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function e(t,n,o){void 0===o&&(o=[]);var s=t.displayName||t.name||"Component",l=i.isReactComponent(t),c=Object.keys(n),u=c.map(i.defaultKey);!l&&o.length&&invariant(!1);var d=function(e){var o,s;function d(){for(var t,r=arguments.length,i=new Array(r),o=0;o1?o-1:0),s=1;s=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["className","tabIndex","focused","open","dropUp","disabled","readOnly","autofilling","isRtl"]);return n=null!=n?n:"-1",r.default.createElement("div",s({},f,{tabIndex:n,className:(0,o.default)(t,"rw-widget",p&&"rw-rtl",c&&"rw-state-disabled",u&&"rw-state-readonly",i&&"rw-state-focus",d&&"rw-webkit-autofill",a&&"rw-open"+(l?"-up":""))}))},i}(r.default.Component);l.contextTypes={isRtl:i.default.bool},l.propTypes={tabIndex:i.default.node,focused:i.default.bool,disabled:i.default.bool,readOnly:i.default.bool,autofilling:i.default.bool,open:i.default.bool,dropUp:i.default.bool,isRtl:i.default.bool};var c=l;t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=function(e,t,n){var r="",u="",d=t;if("string"===typeof t){if(void 0===n)return e.style[(0,i.default)(t)]||(0,a.default)(e).getPropertyValue((0,o.default)(t));(d={})[t]=n}Object.keys(d).forEach((function(t){var n=d[t];n||0===n?(0,c.default)(t)?u+=t+"("+n+") ":r+=(0,o.default)(t)+": "+n+";":(0,s.default)(e,(0,o.default)(t))})),u&&(r+=l.transform+": "+u+";");e.style.cssText+=";"+r};var i=r(n(261)),o=r(n(605)),a=r(n(607)),s=r(n(608)),l=n(166),c=r(n(609));e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var i,o,a,s,l,c,u,d,h,p,f,m=r(n(52)),g="transform";if(t.transform=g,t.animationEnd=a,t.transitionEnd=o,t.transitionDelay=u,t.transitionTiming=c,t.transitionDuration=l,t.transitionProperty=s,t.animationDelay=f,t.animationTiming=p,t.animationDuration=h,t.animationName=d,m.default){var v=function(){for(var e,t,n=document.createElement("div").style,r={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},i=Object.keys(r),o="",a=0;a-1&&v(m[n],t);)n--;return n>=0?m[n]:g(e)?null:e},next:function(e,t){for(var n=m.indexOf(e)+1;n0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,a=t.payload;if(n===i)return r({},e,{locationBeforeTransitions:a});return e};var i=t.LOCATION_CHANGE="@@router/LOCATION_CHANGE",o={locationBeforeTransitions:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.CALL_HISTORY_METHOD="@@router/CALL_HISTORY_METHOD";function i(e){return function(){for(var t=arguments.length,n=Array(t),i=0;i1)for(var n=1;n.":"function"===typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var o,s=a.createElement(M,{child:t});if(e){var l=h.get(e);o=l._processChildContext(l._context)}else o=v;var c=k(n);if(c){var u=c._currentElement.props.child;if(E(u,t)){var d=c._renderedComponent.getPublicInstance(),p=i&&function(){i.call(d)};return N._updateRootComponent(c,s,o,n,p),d}N.unmountComponentAtNode(n)}var f,g=x(n),y=g&&!(!(f=g).getAttribute||!f.getAttribute(C)),b=T(n),w=y&&!c&&!b,A=N._renderNewRootComponent(s,n,w,o)._renderedComponent.getPublicInstance();return i&&i.call(A),A},render:function(e,t,n){return N._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){F(e)||r("40");var t=k(e);if(!t){T(e),1===e.nodeType&&e.hasAttribute(w);return!1}return delete A[t._instance.rootID],g.batchedUpdates(D,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,o,a){if(F(t)||r("41"),o){var s=x(t);if(p.canReuseMarkup(e,s))return void l.precacheNode(n,s);var c=s.getAttribute(p.CHECKSUM_ATTR_NAME);s.removeAttribute(p.CHECKSUM_ATTR_NAME);var u=s.outerHTML;s.setAttribute(p.CHECKSUM_ATTR_NAME,c);var d=e,h=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r1&&void 0!==arguments[1]&&arguments[1];return e.__id__||t&&(e.__id__=p++)}var m=Object.create(null);function g(e){return e.map((function(e){return m[f(e)]})).filter((function(e){return e}))}function v(e,o){(0,l.default)(t,e,(function(t,a){if(null!=a){c=r({},a,{location:e});for(var s=g((0,i.default)(n,c).leaveRoutes),l=void 0,u=0,d=s.length;null==l&&u=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","activeClassName","activeStyle","onlyActiveOnIndex"]),l=this.context.router;if(l){if(null==t)return i.default.createElement("a",s);var c=m(t,l);s.href=l.createHref(c),(n||null!=o&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(o))&&l.isActive(c,a)&&(n&&(s.className?s.className+=" "+n:s.className=n),o&&(s.style=r({},s.style,o)))}return i.default.createElement("a",r({},s,{onClick:this.handleClick}))}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=l(n(0)),i=l(n(19)),o=n(44),a=n(62),s=n(73);function l(e){return e&&e.__esModule?e:{default:e}}var c=r.default.PropTypes,u=c.string,d=c.object,h=r.default.createClass({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=(0,o.createRouteFromReactElement)(e);return t.from&&(t.path=t.from),t.onEnter=function(e,n){var r=e.location,i=e.params,o=void 0;if("/"===t.to.charAt(0))o=(0,a.formatPattern)(t.to,i);else if(t.to){var s=e.routes.indexOf(t),l=h.getRoutePattern(e.routes,s-1).replace(/\/*$/,"/")+t.to;o=(0,a.formatPattern)(l,i)}else o=r.pathname;n({pathname:o,query:t.query||r.query,state:t.state||r.state})},t},getRoutePattern:function(e,t){for(var n="",r=t;r>=0;r--){var i=e[r].path||"";if(n=i.replace(/\/*$/,"/")+n,0===i.indexOf("/"))break}return"/"+n}},propTypes:{path:u,from:u,to:u.isRequired,query:d,state:d,onEnter:s.falsy,children:s.falsy},render:function(){(0,i.default)(!1)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=(0,o.default)(e);return(0,r.default)((0,i.default)((function(){return t})))(e)};var r=a(n(212)),i=a(n(213)),o=a(n(400));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r,i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.stringifyQuery,o=t.parseQueryString;"function"!==typeof r&&(r=u),"function"!==typeof o&&(o=d);var a=function(e){return e?(null==e.query&&(e.query=o(e.search.substring(1))),e):e},h=function(e,t){if(null==t)return e;var n="string"===typeof e?(0,c.parsePath)(e):e,o=r(t);return i({},n,{search:o?"?"+o:""})},p=function(){return a(n.getCurrentLocation())},f=function(e){return n.listenBefore((function(t,n){return(0,s.default)(e,a(t),n)}))},m=function(e){return n.listen((function(t){return e(a(t))}))},g=function(e){return n.push(h(e,e.query))},v=function(e){return n.replace(h(e,e.query))},y=function(e){return n.createPath(h(e,e.query))},b=function(e){return n.createHref(h(e,e.query))},E=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.basename,o=function(e){return e?(r&&null==e.basename&&(0===e.pathname.toLowerCase().indexOf(r.toLowerCase())?(e.pathname=e.pathname.substring(r.length),e.basename=r,""===e.pathname&&(e.pathname="/")):e.basename=""),e):e},l=function(e){if(!r)return e;var t="string"===typeof e?(0,s.parsePath)(e):e,n=t.pathname,o="/"===r.slice(-1)?r:r+"/",a="/"===n.charAt(0)?n.slice(1):n;return i({},t,{pathname:o+a})},c=function(){return o(n.getCurrentLocation())},u=function(e){return n.listenBefore((function(t,n){return(0,a.default)(e,o(t),n)}))},d=function(e){return n.listen((function(t){return e(o(t))}))},h=function(e){return n.push(l(e))},p=function(e){return n.replace(l(e))},f=function(e){return n.createPath(l(e))},m=function(e){return n.createHref(l(e))},g=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["component","children"]);return a.default.createElement(t,i({tabIndex:"-1"},r),n)}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{contextTypes:{hotKeyMap:r.default.PropTypes.object},childContextTypes:{hotKeyMap:r.default.PropTypes.object},getChildContext:function(){return{hotKeyMap:this.__hotKeyMap__}},componentWillMount:function(){this.updateMap()},updateMap:function(){var e=this.buildMap();return!(0,o.default)(e,this.__hotKeyMap__)&&(this.__hotKeyMap__=e,!0)},buildMap:function(){var t=this.context.hotKeyMap||{},n=this.props.keyMap||{};return(0,i.default)({},t,e,n)},getMap:function(){return this.__hotKeyMap__}}};var r=a(n(0)),i=a(n(410)),o=a(n(230));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(220),i=n(93),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(221);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(49),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},function(e,t,n){var r=n(74),i=n(92);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(41))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&eu))return!1;var h=l.get(e);if(h&&l.get(t))return h==t;var p=-1,f=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"===typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var d=!0,h=0;hi&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128===(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),u=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return C(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function D(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(e,t,n,r,o){return o||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return o||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function j(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(41))},function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,n){var r=n(102),i=n(80);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(41))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t,n){var r=n(241),i=n(236),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(560);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(562),i=n(563),o=n(155),a=n(243),s=n(566),l=n(567),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&a(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||f.push(g);return f}},function(e,t,n){(function(e){var r=n(37),i=n(565),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l}).call(this,n(46)(e))},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(237),i=n(244);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(249),i=n(250),o=n(160),a=n(247),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["open","dropUp","className","disabled","readOnly","focused"]),d="rw-open"+(n?"-up":"");return r.default.createElement("div",s({},u,{className:(0,o.default)(i,"rw-widget-picker","rw-widget-container",t&&d,a&&"rw-state-disabled",l&&"rw-state-readonly",c&&"rw-state-focus")}))},i}(r.default.Component);l.propTypes={tabIndex:i.default.node,focused:i.default.bool,disabled:i.default.bool,readOnly:i.default.bool,open:i.default.bool,dropUp:i.default.bool,picker:i.default.bool};var c=l;t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(17)),i=l(n(10)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(0)),a=l(n(601)),s=n(29);function l(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var h=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!!e.shouldUpdate},n.render=function(){var e=this.props,t=e.className,n=e.children,i=u(e,["className","children"]);return delete i.shouldUpdate,(0,o.cloneElement)(n,c({},i,{className:(0,r.default)(t,n.props.className,"rw-popup")}))},t}(o.default.Component);h.propTypes={shouldUpdate:function(){}};var p=function(e){function t(){return e.apply(this,arguments)||this}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.dropUp,i=e.open,a=e.transition,s=u(e,["className","dropUp","open","transition"]);return o.default.createElement(a,c({},s,{in:i,dropUp:n,className:(0,r.default)(t,"rw-popup-container")}),o.default.createElement(h,{shouldUpdate:i},o.default.Children.only(this.props.children)))},t}(o.default.Component);p.defaultProps={open:!1,transition:a.default},p.propTypes={open:i.default.bool,dropUp:i.default.bool,onEntering:i.default.func,onEntered:i.default.func,transition:s.elementType};var f=p;t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=void 0;var i=r(n(257));t.on=i.default;var o=r(n(258));t.off=o.default;var a=r(n(602));t.filter=a.default;var s=r(n(603));t.listen=s.default;var l={on:i.default,off:o.default,filter:a.default,listen:s.default};t.default=l},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=void 0;var i=function(){};r(n(52)).default&&(i=document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,(function(t){(t=t||window.event).target=t.target||t.srcElement,t.currentTarget=e,n.call(e,t)}))}:void 0);var o=i;t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=void 0;var i=function(){};r(n(52)).default&&(i=document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0);var o=i;t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=void 0;var i=r(n(52)).default?function(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):o(e,t)}:o;function o(e,t){if(t)do{if(t===e)return!0}while(t=t.parentNode);return!1}t.default=i,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n,o="#"===t[0],a="."===t[0],s=o||a?t.slice(1):t;if(r.test(s))return o?(e=e.getElementById?e:document,(n=e.getElementById(s))?[n]:[]):e.getElementsByClassName&&a?i(e.getElementsByClassName(s)):i(e.getElementsByTagName(t));return i(e.querySelectorAll(t))};var r=/^[\w-]*$/,i=Function.prototype.bind.call(Function.prototype.call,[].slice);e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=function(e){return(0,i.default)(e.replace(o,"ms-"))};var i=r(n(604)),o=/^-ms-/;e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=function(e){var t=(0,a.default)(e),n=(0,o.default)(t),r=t&&t.documentElement,s={top:0,left:0,height:0,width:0};if(!t)return;if(!(0,i.default)(r,e))return s;void 0!==e.getBoundingClientRect&&(s=e.getBoundingClientRect());return s={top:s.top+(n.pageYOffset||r.scrollTop)-(r.clientTop||0),left:s.left+(n.pageXOffset||r.scrollLeft)-(r.clientLeft||0),width:(null==s.width?e.offsetWidth:s.width)||0,height:(null==s.height?e.offsetHeight:s.height)||0}};var i=r(n(259)),o=r(n(107)),a=r(n(253));e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(10)),i=s(n(0)),o=s(n(21)),a=n(51);n(610);function s(e){return e&&e.__esModule?e:{default:e}}t.UNMOUNTED="unmounted";t.EXITED="exited";t.ENTERING="entering";t.ENTERED="entered";t.EXITING="exiting";var l=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var i,o=n.transitionGroup,a=o&&!o.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null},a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},a.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=o.default.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},a.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;t||r?(this.props.onEnter(e,i),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,i)}))}))}))):this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)}))},a.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},a.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},a.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var o=i.default.Children.only(n);return i.default.cloneElement(o,r)},r}(i.default.Component);function c(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:c,onEntering:c,onEntered:c,onExit:c,onExiting:c,onExited:c},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,a.polyfill)(l);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,i,o,a){var s=i||"<>",l=a||r;if(null==n[r])return t?new Error("Required "+o+" `"+l+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),d=6;d=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["className","bordered","children"]);return r.default.createElement("span",{className:(0,o.default)(t,"rw-select",n&&"rw-select-bordered")},i?r.default.Children.map(i,(function(e){return e&&r.default.cloneElement(e,{variant:"select"})})):r.default.createElement(a.default,l({},s,{variant:"select"})))},i}(r.default.Component);c.propTypes={bordered:i.default.bool};var u=c;t.default=u,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=m(n(10)),i=m(n(0)),o=n(21),a=f(n(29)),s=f(n(33)),l=n(82),c=n(170),u=m(n(269)),d=m(n(270)),h=m(n(632)),p=n(112);function f(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function m(e){return e&&e.__esModule?e:{default:e}}function g(){return(g=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var y={data:r.default.array,dataState:r.default.shape({sortedKeys:r.default.array,groups:r.default.object,data:r.default.array,sequentialData:r.default.array}),valueAccessor:a.accessor,textAccessor:a.accessor,onSelect:r.default.func,onMove:r.default.func,activeId:r.default.string,itemComponent:a.elementType,groupComponent:a.elementType,optionComponent:a.elementType,renderItem:r.default.func,renderGroup:r.default.func,focusedItem:r.default.any,selectedItem:r.default.any,searchTerm:r.default.string,isDisabled:r.default.func.isRequired,messages:r.default.shape({emptyList:r.default.func.isRequired})},b={onSelect:function(){},data:[],dataState:{},optionComponent:d.default},E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l(){return(l=Object.assign||function(e){for(var t=1;tt},gte:function(e,t){return e>=t},lt:function(e,t){return e=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["className","role","children","emptyListMessage","nodeRef"]),d=(0,a.instanceId)(this);return r.default.createElement("ul",l({id:d,tabIndex:"-1",ref:c,className:(0,o.default)(t,"rw-list"),role:void 0===n?"listbox":n},u),r.default.Children.count(i)?i:r.default.createElement("li",{className:"rw-list-empty"},s))},i}(r.default.Component);u.propTypes=c;var d=u;t.default=d,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),i=s(n(10)),o=s(n(17)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(33));function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0)&&n(e,!r)}(e)}))}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var i,o,a=Object.prototype,s=a.hasOwnProperty,l=a.toString,c=a.propertyIsEnumerable,u=(i=Object.keys,o=Object,function(e){return i(o(e))}),d=Math.max,h=!c.call({valueOf:1},"valueOf");function p(e,t){var n=y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&b(e)}(e)&&s.call(e,"callee")&&(!c.call(e,"callee")||"[object Arguments]"==l.call(e))}(e)?function(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=E(e)?l.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function E(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var C,w=(C=function(e,t){if(h||g(t)||b(t))!function(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=C.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!E(n))return!1;var r=typeof t;return!!("number"==r?b(n)&&m(t,n.length):"string"==r&&t in n)&&v(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==E){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=x,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var a,h=r.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,E=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var A=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,i.list=null;A=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,o.code;if(r.eatSpace())return null;if(h&&i.indentation<=E&&(_=r.match(u))&&_[1].length<=6)return i.quote=0,i.header=_[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,w(i);if(i.indentation<=E&&r.eat(">"))return i.quote=h?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),w(i);if(!S&&!i.setext&&h&&i.indentation<=E&&(_=r.match(l))){var D=_[1]?"ol":"ul";return i.indentation=A+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+D]),w(i)}return h&&i.indentation<=E&&(_=r.match(p,!0))?(i.quote=0,i.fencedEndRE=new RegExp(_[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(_[2]),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=C,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,w(i)):i.setext||!(x&&b||i.quote||!1!==i.list||i.code||S||f.test(r.string))&&(_=r.lookAhead(1))&&(_=_.match(d))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==_[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,w(i)):S?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===r.peek()?g(r,i,T):g(r,i,i.inline)}function E(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=x,n.block=b,n.htmlState=null)}return o}function C(e,t){var r,i=t.listStack[t.listStack.length-1]||0,a=t.indentation=e.quote?t.push(o.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(o.linkHref,"url"):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,"link"),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+"-"+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+"-"+e.quote):t.push(o.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function A(e,t){if(e.match(h,!0))return w(t)}function x(t,i){var a=i.text(t,i);if("undefined"!==typeof a)return a;if(i.list)return i.list=null,w(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,w(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),w(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return o.linkHref}if("`"===s){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var p=w(i);return i.code=0,p}return i.formatting=d,w(i)}return i.code=h,w(i)}if(i.code)return w(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var f=w(i),g=o.formatting+"-escape";return f?f+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),w(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),w(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var f=w(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=_,f}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),w(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var f=w(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?_:x,f}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(f=w(i))?f+=" ":f="",f+o.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(f=w(i))?f+=" ":f="",f+o.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,E)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var C=1,A=1==t.pos?" ":t.string.charAt(t.pos-2);C<3&&t.eat(s);)C++;var D=t.peek()||" ",T=!/\s/.test(D)&&(!m.test(D)||/\s/.test(A)||m.test(A)),F=!/\s/.test(A)&&(!m.test(A)||/\s/.test(D)||m.test(D)),k=null,O=null;if(C%2&&(i.em||!T||"*"!==s&&F&&!m.test(A)?i.em!=s||!F||"*"!==s&&T&&!m.test(D)||(k=!1):k=!0),C>1&&(i.strong||!T||"*"!==s&&F&&!m.test(A)?i.strong!=s||!F||"*"!==s&&T&&!m.test(D)||(O=!1):O=!0),null!=O||null!=k)return n.highlightFormatting&&(i.formatting=null==k?"strong":null==O?"em":"strong em"),!0===k&&(i.em=s),!0===O&&(i.strong=s),p=w(i),!1===k&&(i.em=!1),!1===O&&(i.strong=!1),p}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return w(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),p=w(i),i.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),w(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return w(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var M=w(i);return i.emoji=!1,M}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),w(i)}function S(e,t){if(">"===e.next()){t.f=t.inline=x,n.highlightFormatting&&(t.formatting="link");var r=w(t);return r?r+=" ":r="",r+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function _(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=x,n.highlightFormatting&&(t.formatting="link-string");var i=w(t);return t.linkHref=!1,i}return e.match(D[r]),t.linkHref=!0,w(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,w(t)):"error"}var D={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function T(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=F,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,w(t)):g(e,t,x)}function F(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link");var r=w(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function k(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=x,o.linkHref+" url")}var O={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:x,text:A,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=E)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==E?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:O}},indent:function(t,n,i){return t.block==E&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:w,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(34),n(277),n(660))},function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=function(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=h;break}return"string"};return t.isInAttribute=!0,t}(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function f(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",w):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",w(e,0,n)):(a="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",E):(a="tag error",C)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",E(e,0,n)):(a="error",C)}function E(e,t,n){return"endTag"!=e?(a="error",E):(m(n),v)}function C(e,t,n){return a="error",E(e,0,n)}function w(e,t,n){if("word"==e)return a="attribute",A;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new f(n,r,i==n.indented)),v}return a="error",w}function A(e,t,n){return"equals"==e?x:(l.allowMissing||(a="error"),w(e,0,n))}function x(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(a="string",w):(a="error",w(e,0,n))}function S(e,t,n){return"string"==e?S:w(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=w)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(34))},function(e,t,n){!function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)-1&&Object.keys(t.refs[r].refs).forEach((function(i){i==="notification-"+(e.uid?e.uid:e)&&(n=t.refs[r].refs[i])}))})),n},removeNotification:function(e){var t=this.getNotificationRef(e);return t&&t._hideNotification()},editNotification:function(e,t){var n=null,r=e.uid?e.uid:e,i=this.state.notifications.filter((function(e){return r!==e.uid||(n=e,!1)}));n&&(i.push(a({},n,t)),this.setState({notifications:i}))},clearNotifications:function(){var e=this;Object.keys(this.refs).forEach((function(t){t.indexOf("container")>-1&&Object.keys(e.refs[t].refs).forEach((function(n){e.refs[t].refs[n]._hideNotification()}))}))},componentDidMount:function(){this._getStyles.setOverrideStyle(this.props.style),this._isMounted=!0},componentWillUnmount:function(){this._isMounted=!1},render:function(){var e=this,t=null,n=this.state.notifications;return n.length&&(t=Object.keys(l.positions).map((function(t){var i=n.filter((function(e){return t===e.position}));return i.length?r.createElement(s,{ref:"container-"+t,key:t,position:t,notifications:i,getStyles:e._getStyles,onRemove:e._didNotificationRemoved,noAnimation:e.props.noAnimation,allowHTML:e.props.allowHTML}):null}))),r.createElement("div",{className:"notifications-wrapper",style:this._getStyles.wrapper()},t)}});e.exports=u},function(e,t,n){var r,i;!function(o){"use strict";void 0===(i="function"===typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)}((function(){"use strict";if("undefined"===typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var e,t,n,r,i,o,a,s,l,c,u,d,h,p,f,m,g,v,y,b,E,C,w,A,x,S,_=[],D=!1,T=!1,F=!1,k=[],O=!1,M=!1,N=[],R=/\s+/g,L="Sortable"+(new Date).getTime(),I=window,P=I.document,B=I.parseInt,$=I.setTimeout,U=I.jQuery||I.Zepto,j=I.Polymer,H={capture:!1,passive:!1},W=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),G=!!navigator.userAgent.match(/Edge/i),z=!!navigator.userAgent.match(/firefox/i),V=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),q=!!navigator.userAgent.match(/iP(ad|od|hone)/i),K=G||W?"cssFloat":"float",Y="draggable"in P.createElement("div"),X=function(){if(W)return!1;var e=P.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),Q=!1,J=!1,Z=Math.abs,ee=Math.min,te=Math.max,ne=[],re=function(e,t){var n=xe(e),r=B(n.width)-B(n.paddingLeft)-B(n.paddingRight)-B(n.borderLeftWidth)-B(n.borderRightWidth),i=Oe(e,0,t),o=Oe(e,1,t),a=i&&xe(i),s=o&&xe(o),l=a&&B(a.marginLeft)+B(a.marginRight)+He(i).width,c=s&&B(s.marginLeft)+B(s.marginRight)+He(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&"none"!==a.float){var u="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[K]||o&&"none"===n[K]&&l+c>r)?"vertical":"horizontal"},ie=function(e,t,n,r,i){var o=He(n),a="vertical"===r?o.left:o.top,s="vertical"===r?o.right:o.bottom,l="vertical"===r?e:t;return a-1}}var n={},r=e.group;r&&"object"==typeof r||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},de=function(t){e&&e.parentNode&&e.parentNode[L]&&e.parentNode[L]._computeIsAligned(t)},he=function(e,t){for(var n=t;!n[L];)n=n.parentNode;return e===n},pe=function(e,t,n){for(var r=e.parentNode;r&&!r[L];)r=r.parentNode;r&&r[L][n](Be(t,{artificialBubble:!0}))},fe=function(){!X&&n&&xe(n,"display","none")},me=function(){!X&&n&&xe(n,"display","")};P.addEventListener("click",(function(e){if(F)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),F=!1,!1}),!0);var ge,ve=function(t){if(t=t.touches?t.touches[0]:t,e){var n=function(e,t){for(var n=0;n=r.left-i&&e<=r.right+i,a=t>=r.top-i&&t<=r.bottom+i;if(o&&a)return k[n]}}(t.clientX,t.clientY);n&&n[L]._onDragOver({clientX:t.clientX,clientY:t.clientY,target:n,rootEl:n})}};function ye(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Be({},t),e[L]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return re(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,touchStartThreshold:B(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==ye.supportPointer&&("PointerEvent"in window||window.navigator&&"msPointerEnabled"in window.navigator),emptyInsertThreshold:5};for(var r in n)!(r in t)&&(t[r]=n[r]);for(var i in ue(t),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&Y,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Ce(e,"pointerdown",this._onTapStart):(Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),k.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[])}function be(e,t,n,r){if(e){n=n||P;do{if(null!=t&&(">"===t[0]&&e.parentNode===n&&Ie(e,t.substring(1))||Ie(e,t))||r&&e===n)return e;if(e===n)break}while(e=Ee(e))}return null}function Ee(e){return e.host&&e!==P&&e.host.nodeType?e.host:e.parentNode}function Ce(e,t,n){e.addEventListener(t,n,H)}function we(e,t,n){e.removeEventListener(t,n,H)}function Ae(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(R," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(R," ")}}function xe(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return P.defaultView&&P.defaultView.getComputedStyle?n=P.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"===typeof n?"":"px")}}function Se(e){var t="";do{var n=xe(e,"transform");n&&"none"!==n&&(t=n+" "+t)}while(e=e.parentNode);return window.DOMMatrix?new DOMMatrix(t):window.WebKitCSSMatrix?new WebKitCSSMatrix(t):window.CSSMatrix?new CSSMatrix(t):void 0}function _e(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=i:r<=i))return n;if(n===ae())break;n=oe(n,!1)}return!1}function Ge(e){var t=0,n=0,r=ae();if(e)do{var i=Se(e),o=i.a,a=i.d;t+=e.scrollLeft*o,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}return Ce(P,"dragover",ve),Ce(P,"mousemove",ve),Ce(P,"touchmove",ve),ye.prototype={constructor:ye,_computeIsAligned:function(t){var r;if(n&&!X?(fe(),r=P.elementFromPoint(t.clientX,t.clientY),me()):r=t.target,r=be(r,this.options.draggable,this.el,!1),!J&&e&&e.parentNode===this.el){for(var i=this.el.children,o=0;o=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){e&&Fe(e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;we(e,"mouseup",this._disableDelayedDrag),we(e,"touchend",this._disableDelayedDrag),we(e,"touchcancel",this._disableDelayedDrag),we(e,"mousemove",this._delayedDragTouchMoveHandler),we(e,"touchmove",this._delayedDragTouchMoveHandler),we(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||("touch"==t.pointerType?t:null),!this.nativeDraggable||n?this.options.supportPointer?Ce(P,"pointermove",this._onTouchMove):Ce(P,n?"touchmove":"mousemove",this._onTouchMove):(Ce(e,"dragend",this),Ce(i,"dragstart",this._onDragStart));try{P.selection?Ue((function(){P.selection.empty()})):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(t,n){if(T=!1,i&&e){this.nativeDraggable&&(Ce(P,"dragover",this._handleAutoScroll),Ce(P,"dragover",de));var r=this.options;!t&&Ae(e,r.dragClass,!1),Ae(e,r.ghostClass,!0),xe(e,"transform",""),ye.active=this,t&&this._appendGhost(),De(this,i,"start",e,i,i,u,void 0,n)}else this._nulling()},_emulateDragOver:function(t){if(y){if(this._lastX===y.clientX&&this._lastY===y.clientY&&!t)return;this._lastX=y.clientX,this._lastY=y.clientY,fe();for(var n=P.elementFromPoint(y.clientX,y.clientY),r=n;n&&n.shadowRoot;)r=n=n.shadowRoot.elementFromPoint(y.clientX,y.clientY);if(r)do{if(r[L])if(r[L]._onDragOver({clientX:y.clientX,clientY:y.clientY,target:n,rootEl:r})&&!this.options.dragoverBubble)break;n=r}while(r=r.parentNode);e.parentNode[L]._computeIsAligned(y),me()}},_onTouchMove:function(e,t){if(v){var r=this.options,i=r.fallbackTolerance,o=r.fallbackOffset,a=e.touches?e.touches[0]:e,s=n&&Se(n),l=n&&s&&s.a,c=n&&s&&s.d,u=q&&x&&Ge(x),d=(a.clientX-v.clientX+o.x)/(l||1)+(u?u[0]-N[0]:0)/(l||1),h=(a.clientY-v.clientY+o.y)/(c||1)+(u?u[1]-N[1]:0)/(c||1),p=e.touches?"translate3d("+d+"px,"+h+"px,0)":"translate("+d+"px,"+h+"px)";if(!ye.active&&!T){if(i&&ee(Z(a.clientX-this._lastX),Z(a.clientY-this._lastY))l+10||o<=l&&i>a&&o>=s:i>a&&o>s||i<=a&&o>l+10}(n,x,l)&&!_.animated){if(_&&l===n.target&&(c=_),c&&(a=He(c)),g?m._hideClone():m._showClone(this),!1!==Te(i,l,e,r,c,a,n,!!c))return l.appendChild(e),t=l,S=null,z(),G(!0)}else if(c&&c!==e&&c.parentNode===l){var D,T=0,k=c.sortableMouseAligned,N=e.parentNode!==l,R="vertical"===x?"top":"left",I=We(c,"top")||We(e,"top"),B=I?I.scrollTop:void 0;if(E!==c&&(w=null,D=He(c)[R],O=!1),function(t,n,r){var i=t===e&&S||He(t),o=n===e&&S||He(n),a="vertical"===r?i.left:i.top,s="vertical"===r?i.right:i.bottom,l="vertical"===r?i.width:i.height,c="vertical"===r?o.left:o.top,u="vertical"===r?o.right:o.bottom,d="vertical"===r?o.width:o.height;return a===c||s===u||a+l/2===c+d/2}(e,c,x)&&k||N||I||d.invertSwap||"insert"===w||"swap"===w?("swap"!==w&&(M=d.invertSwap||N),T=function(t,n,r,i,o,a,s){var l=He(n),c="vertical"===r?t.clientY:t.clientX,u="vertical"===r?l.height:l.width,d="vertical"===r?l.top:l.left,h="vertical"===r?l.bottom:l.right,p=He(e),f=!1;if(!a)if(s&&Ad+u*o/2:ch-A)return-1*C}else if(c>d+u*(1-i)/2&&ch-u*o/2))return c>d+u/2?1:-1;return 0}(n,c,x,d.swapThreshold,null==d.invertedSwapThreshold?d.swapThreshold:d.invertedSwapThreshold,M,E===c),w="swap"):(T=Ne(c),w="insert"),0===T)return G(!1);S=null,E=c,C=T,a=He(c);var U=c.nextElementSibling,j=!1,H=Te(i,l,e,r,c,a,n,j=1===T);if(!1!==H)return 1!==H&&-1!==H||(j=1===H),Q=!0,$(ke,30),g?m._hideClone():m._showClone(this),j&&!U?l.appendChild(e):c.parentNode.insertBefore(e,j?U:c),I&&se(I,0,B-I.scrollTop),t=e.parentNode,void 0===D||M||(A=Z(D-He(c)[R])),z(),G(!0)}if(l.contains(e))return G(!1)}return W&&!n.rootEl&&pe(l,n,"_onDragOver"),!1}function G(t){return t&&(g?m._hideClone():m._showClone(y),m&&(Ae(e,p?p.options.ghostClass:m.options.ghostClass,!1),Ae(e,d.ghostClass,!0)),p!==y&&y!==ye.active?p=y:y===ye.active&&(p=null),r&&y._animate(r,e),c&&a&&y._animate(a,c)),(c===e&&!e.animated||c===l&&!c.animated)&&(E=null),d.dragoverBubble||n.rootEl||c===P||(y._handleAutoScroll(n),e.parentNode[L]._computeIsAligned(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),!0}function z(){De(y,i,"change",c,l,i,u,Le(e,d.draggable),n)}},_animate:function(t,n){var r=this.options.animation;if(r){var i=He(n);if(n===e&&(S=i),1===t.nodeType&&(t=He(t)),t.left+t.width/2!==i.left+i.width/2||t.top+t.height/2!==i.top+i.height/2){var o=Se(this.el),a=o&&o.a,s=o&&o.d;xe(n,"transition","none"),xe(n,"transform","translate3d("+(t.left-i.left)/(a||1)+"px,"+(t.top-i.top)/(s||1)+"px,0)"),n.offsetWidth,xe(n,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),xe(n,"transform","translate3d(0,0,0)")}"number"===typeof n.animated&&clearTimeout(n.animated),n.animated=$((function(){xe(n,"transition",""),xe(n,"transform",""),n.animated=!1}),r)}},_offUpEvents:function(){var e=this.el.ownerDocument;we(P,"touchmove",this._onTouchMove),we(P,"pointermove",this._onTouchMove),we(e,"mouseup",this._onDrop),we(e,"touchend",this._onDrop),we(e,"pointerup",this._onDrop),we(e,"touchcancel",this._onDrop),we(P,"selectstart",this)},_onDrop:function(a){var s=this.el,l=this.options;T=!1,D=!1,M=!1,O=!1,clearInterval(this._loopId),clearInterval(f),ce(),clearTimeout(ge),ge=void 0,clearTimeout(this._dragStartTimer),je(this._cloneId),je(this._dragStartId),we(P,"mousemove",this._onTouchMove),this.nativeDraggable&&(we(P,"drop",this),we(s,"dragstart",this._onDragStart),we(P,"dragover",this._handleAutoScroll),we(P,"dragover",de)),V&&xe(P.body,"user-select",""),this._offUpEvents(),a&&(b&&(a.cancelable&&a.preventDefault(),!l.dropBubble&&a.stopPropagation()),n&&n.parentNode&&n.parentNode.removeChild(n),(i===t||p&&"clone"!==p.lastPutMode)&&r&&r.parentNode&&r.parentNode.removeChild(r),e&&(this.nativeDraggable&&we(e,"dragend",this),Fe(e),e.style["will-change"]="",Ae(e,p?p.options.ghostClass:this.options.ghostClass,!1),Ae(e,this.options.chosenClass,!1),De(this,i,"unchoose",e,t,i,u,null,a),i!==t?((d=Le(e,l.draggable))>=0&&(De(null,t,"add",e,t,i,u,d,a),De(this,i,"remove",e,t,i,u,d,a),De(null,t,"sort",e,t,i,u,d,a),De(this,i,"sort",e,t,i,u,d,a)),p&&p.save()):e.nextSibling!==o&&(d=Le(e,l.draggable))>=0&&(De(this,i,"update",e,t,i,u,d,a),De(this,i,"sort",e,t,i,u,d,a)),ye.active&&(null!=d&&-1!==d||(d=u),De(this,i,"end",e,t,i,u,d,a),this.save()))),this._nulling()},_nulling:function(){i=e=t=n=o=r=a=s=l=_.length=f=m=g=v=y=b=d=u=E=C=S=p=h=ye.active=null,ne.forEach((function(e){e.checked=!0})),ne.length=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":e&&(this._onDragOver(t),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r=i.length)break;s=i[a++]}else{if((a=i.next()).done)break;s=a.value}var l=s,c=(0,P.dataValue)(l);if(String(c).toLowerCase()===r||(0,P.dataText)(l).toLowerCase()===r){t.change(l,e);break}}}else t.change(null)},t.handleAutofill=function(e){t.setState({autofilling:e})},t.attachInputRef=function(e){return t.inputRef=e},t.attachFilterRef=function(e){return t.filterRef=e},t.attachListRef=function(e){return t.listRef=e},t.focus=function(e){var n=t.props,r=n.filter,i=n.open,o=e||(r&&i?t.filterRef:t.inputRef);(o=(0,p.findDOMNode)(o))&&(0,m.default)()!==o&&o.focus()},(0,v.autoFocus)(W(W(t))),t.inputId=(0,I.instanceId)(W(W(t)),"_input"),t.listId=(0,I.instanceId)(W(W(t)),"_listbox"),t.activeId=(0,I.instanceId)(W(W(t)),"_listbox_active_option"),t.mounted=(0,v.mountManager)(W(W(t))),t.timeouts=(0,v.timeoutManager)(W(W(t))),t.handleScroll=(0,R.default)(W(W(t))),t.focusManager=(0,k.default)(W(W(t)),{didHandle:t.handleFocusChanged}),t.state={},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getDerivedStateFromProps=function(e,t){var n=e.open,r=e.value,i=e.data,o=e.messages,a=e.searchTerm,s=e.filter,l=e.minLength,c=e.caseSensitive,u=t.focusedItem,d=(0,N.default)(e),h=r!==t.lastValue,p=h&&d.indexOf(i,r);n&&(i=F.filter(i,{filter:s,searchTerm:a,minLength:l,caseSensitive:c,textField:d.text}));var f=(0,M.default)(i,t.list,{nextProps:e}),m=i[p],g=~i.indexOf(u)?u:i[0];return{data:i,list:f,accessors:d,lastValue:r,messages:(0,D.getMessages)(o),selectedItem:h?f.nextEnabled(m):t.selectedItem,focusedItem:h||void 0===u?f.nextEnabled(void 0!==m?m:g):g}};var i=r.prototype;return i.change=function(e,t){var n=this.props,r=n.onChange,i=n.searchTerm,o=n.value;this.state.accessors.matches(e,o)||((0,I.notify)(r,[e,{originalEvent:t,lastValue:o,searchTerm:i}]),this.clearSearch(t),this.close())},i.renderList=function(){var e=this.props,t=e.open,n=e.filter,r=e.data,i=e.searchTerm,o=e.searchIcon,a=e.optionComponent,s=e.itemComponent,l=e.groupComponent,c=e.listProps,u=this.state,d=u.list,p=u.accessors,f=u.focusedItem,m=u.selectedItem,g=u.messages,v=u.data,y=this.props.listComponent;return h.default.createElement("div",null,n&&h.default.createElement(C.default,{className:"rw-filter-input rw-input"},h.default.createElement("input",{value:i,className:"rw-input-reset",onChange:this.handleInputChange,placeholder:g.filterPlaceholder(this.props),ref:this.attachFilterRef}),h.default.createElement(w.default,{icon:o,role:"presentation","aria-hidden":"true"})),h.default.createElement(y,j({},c,{id:this.listId,activeId:this.activeId,data:v,dataState:d.dataState,isDisabled:d.isDisabled,searchTerm:i,textAccessor:p.text,valueAccessor:p.value,itemComponent:s,groupComponent:l,optionComponent:a,selectedItem:m,focusedItem:t?f:null,onSelect:this.handleSelect,onMove:this.handleScroll,"aria-live":t&&"polite","aria-labelledby":this.inputId,"aria-hidden":!this.props.open,ref:this.attachListRef,messages:{emptyList:r.length?g.emptyFilter:g.emptyList}})),this.allowCreate()&&h.default.createElement(S.default,{id:this.createId,searchTerm:i,onSelect:this.handleCreate,focused:!f||f===z},g.createOption(this.props)))},i.render=function(){var e=this,t=this.props,n=t.className,r=t.tabIndex,i=t.popupTransition,o=t.textField,a=t.data,s=t.busy,l=t.dropUp,c=t.placeholder,u=t.value,d=t.open,p=t.isRtl,f=t.filter,m=t.inputProps,v=t.selectIcon,y=t.busySpinner,b=t.containerClassName,x=t.valueComponent,S=this.state,D=S.focused,F=S.accessors,k=S.messages,O=S.autofilling,M=!0===this.props.disabled,N=!0===this.props.readOnly,R=F.findOrSelf(a,u),L=(0,I.isFirstFocusedRender)(this),P=j(T.pickElementProps(this),{name:void 0,role:"combobox",id:this.inputId,tabIndex:d&&f?-1:r||0,"aria-owns":this.listId,"aria-activedescendant":d?this.activeId:null,"aria-expanded":!!d,"aria-haspopup":!0,"aria-busy":!!s,"aria-live":!d&&"polite","aria-autocomplete":"list","aria-disabled":M,"aria-readonly":N});return h.default.createElement(E.default,j({},P,{open:d,isRtl:p,dropUp:l,focused:D,disabled:M,readOnly:N,autofilling:O,onBlur:this.focusManager.handleBlur,onFocus:this.focusManager.handleFocus,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,className:(0,g.default)(n,"rw-dropdown-list"),ref:this.attachInputRef}),h.default.createElement(C.default,{onClick:this.handleClick,className:(0,g.default)(b,"rw-widget-input")},h.default.createElement(_.default,j({},m,{value:R,textField:o,name:this.props.name,autoComplete:this.props.autoComplete,onAutofill:this.handleAutofill,onAutofillChange:this.handleAutofillChange,placeholder:c,valueComponent:x})),h.default.createElement(w.default,{busy:s,icon:v,spinner:y,role:"presentational","aria-hidden":"true",disabled:M||N,label:k.openDropdown(this.props)})),L&&h.default.createElement(A.default,{open:d,dropUp:l,transition:i,onEntered:function(){return e.focus()},onEntering:function(){return e.listRef.forceUpdate()}},this.renderList(k)))},i.findOption=function(e,t){var n=this,r=((this._currentWord||"")+e).toLowerCase();e&&(this._currentWord=r,this.timeouts.set("search",(function(){var e=n.state.list,i=n.props.open?"focusedItem":"selectedItem",o=e.next(n.state[i],r);o===n.state[i]&&(o=e.next(null,r)),n._currentWord="",o&&t(o)}),this.props.delay))},i.clearSearch=function(e){this.search("",e,"clear")},i.search=function(e,t,n){void 0===n&&(n="input");var r=this.props,i=r.onSearch,o=r.searchTerm;e!==o&&(0,I.notify)(i,[e,{action:n,lastSearchTerm:o,originalEvent:t}])},i.open=function(){this.props.open||(0,I.notify)(this.props.onToggle,!0)},i.close=function(){this.props.open&&(0,I.notify)(this.props.onToggle,!1)},i.toggle=function(){this.props.open?this.close():this.open()},i.allowCreate=function(){var e=this.props,t=e.searchTerm,n=e.onCreate,r=e.allowCreate;return!(!n||!(!0===r||"onFilter"===r&&t)||this.hasExtactMatch())},i.hasExtactMatch=function(){var e=this.props,t=e.searchTerm,n=e.caseSensitive,r=e.filter,i=this.state,o=i.data,a=i.accessors,s=function(e){return n?e:e.toLowerCase()};return r&&o.some((function(e){return s(a.text(e))===s(t)}))},r}(h.default.Component),u.propTypes=j({},F.propTypes,{value:f.default.any,onChange:f.default.func,open:f.default.bool,onToggle:f.default.func,data:f.default.array,valueField:O.accessor,textField:O.accessor,allowCreate:f.default.oneOf([!0,!1,"onFilter"]),valueComponent:O.elementType,itemComponent:O.elementType,listComponent:O.elementType,optionComponent:O.elementType,groupComponent:O.elementType,groupBy:O.accessor,onSelect:f.default.func,onCreate:f.default.func,onSearch:f.default.func,searchTerm:f.default.string,busy:f.default.bool,selectIcon:f.default.node,searchIcon:f.default.node,busySpinner:f.default.node,placeholder:f.default.string,dropUp:f.default.bool,popupTransition:O.elementType,disabled:O.disabled.acceptsArray,readOnly:O.disabled,containerClassName:f.default.string,inputProps:f.default.object,listProps:f.default.object,isRtl:f.default.bool,messages:f.default.shape({open:f.default.string,emptyList:O.message,emptyFilter:O.message,filterPlaceholder:f.default.string,createOption:O.message})}),u.defaultProps={data:[],delay:500,searchTerm:"",allowCreate:!1,searchIcon:B.search,selectIcon:B.caretDown,listComponent:x.default},o=G((i=d).prototype,"handleSelect",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t,n){void 0!==t&&t!==z?((0,I.notify)(e.props.onSelect,[t,{originalEvent:n}]),e.change(t,n),e.close(),e.focus(e)):e.handleCreate(e.props.searchTerm)}}}),a=G(i.prototype,"handleCreate",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t,n){void 0===t&&(t=""),(0,I.notify)(e.props.onCreate,t),e.clearSearch(n),e.close(),e.focus(e)}}}),s=G(i.prototype,"handleClick",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t){e.focus(),e.toggle(),(0,I.notify)(e.props.onClick,t)}}}),l=G(i.prototype,"handleKeyDown",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t){var n=t.key,r=t.altKey,i=t.ctrlKey,o=e.props,a=o.open,s=o.onKeyDown,l=o.filter,c=o.searchTerm,u=e.state,d=u.focusedItem,h=u.selectedItem,f=u.list,m=d===z,g=e.allowCreate();(0,I.notify)(s,[t]);var v=function(){e.close(),(0,p.findDOMNode)(e).focus()},y=function(n){return null!=n&&e.change(n,t)},b=function(t){return e.setState({focusedItem:t})};if(!t.defaultPrevented)if("End"===n)t.preventDefault(),a?b(f.last()):y(f.last());else if("Home"===n)t.preventDefault(),a?b(f.first()):y(f.first());else if("Escape"===n&&a)t.preventDefault(),v();else if("Enter"===n&&a&&i&&g)t.preventDefault(),e.handleCreate(c,t);else if(("Enter"===n||" "===n&&!l)&&a)t.preventDefault(),e.handleSelect(d,t);else if(" "!==n||a){if("ArrowDown"===n){if(t.preventDefault(),r)return e.open();a||y(f.next(h));var E=f.next(d);b(m||g&&d===E?z:E)}else if("ArrowUp"===n){if(t.preventDefault(),r)return v();if(!a)return y(f.prev(h));b(m?f.last():f.prev(d))}}else t.preventDefault(),e.open()}}}),c=G(i.prototype,"handleKeyPress",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t){(0,I.notify)(e.props.onKeyPress,[t]),t.defaultPrevented||e.props.filter&&e.props.open||e.findOption(String.fromCharCode(t.which),(function(n){e.mounted()&&e.props.open?e.setState({focusedItem:n}):n&&e.change(n,t)}))}}}),r=i))||r,q=(0,b.default)(V,{open:"onToggle",value:"onChange",searchTerm:"onSearch"},["focus"]);t.default=q,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){var e={formats:{date:"L",time:"LT",default:"lll",header:"MMMM YYYY",footer:"LL",weekday:"dd",dayOfMonth:"DD",month:"MMM",year:"YYYY",decade:function(e,t,n){return n.format(e,"YYYY",t)+" - "+n.format(function(e){return(0,r.default)(e).add(10,"year").add(-1,"millisecond").toDate()}(e),"YYYY",t)},century:function(e,t,n){return n.format(e,"YYYY",t)+" - "+n.format(function(e){return(0,r.default)(e).add(100,"year").add(-1,"millisecond").toDate()}(e),"YYYY",t)}},firstOfWeek:function(e){return r.default.localeData(e).firstDayOfWeek()},parse:function(e,t,n){if(!e)return null;var r=s(n,e,t);return r.isValid()?r.toDate():null},format:function(e,t,n){return s(n,e).format(t)}};i.default.setDateLocalizer(e)};var r=o(n(27)),i=o(n(640));function o(e){return e&&e.__esModule?e:{default:e}}if("function"!==typeof r.default)throw new TypeError("You must provide a valid moment object");var a="function"===typeof(0,r.default)().locale?"locale":"lang";if(!!!r.default.localeData)throw new TypeError("The Moment localizer depends on the `localeData` api, please provide a moment object v2.2.0 or higher");function s(e,t,n){return e?(0,r.default)(t,n,!0)[a](e):(0,r.default)(t,n,!0)}e.exports=t.default},function(e,t,n){e.exports=n(641)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[0,0,0,0];this.editor.renderer.setScrollMargins(e[0],e[1],e[2],e[3])}},{key:"componentWillUnmount",value:function(){this.editor.destroy(),this.editor=null}},{key:"onChange",value:function(){if(this.props.onChange&&!this.silent){var e=this.editor.getValue();this.props.onChange(e)}}},{key:"onFocus",value:function(){this.props.onFocus&&this.props.onFocus()}},{key:"onBlur",value:function(){this.props.onBlur&&this.props.onBlur()}},{key:"onCopy",value:function(e){this.props.onCopy&&this.props.onCopy(e)}},{key:"onPaste",value:function(e){this.props.onPaste&&this.props.onPaste(e)}},{key:"onScroll",value:function(){this.props.onScroll&&this.props.onScroll(this.editor)}},{key:"handleOptions",value:function(e){for(var t=Object.keys(e.setOptions),n=0;n=0&&!n(h=l.getLineHandle(o));o--);var g,v,y,b,E=r(l.getTokenAt({line:o,ch:1})).fencedChars;n(l.getLineHandle(c.line))?(g="",v=c.line):n(l.getLineHandle(c.line-1))?(g="",v=c.line-1):(g=E+"\n",v=c.line),n(l.getLineHandle(u.line))?(y="",b=u.line,0===u.ch&&(b+=1)):0!==u.ch&&n(l.getLineHandle(u.line+1))?(y="",b=u.line+1):(y=E+"\n",b=u.line+1),0===u.ch&&(b-=1),l.operation((function(){l.replaceRange(y,{line:b,ch:0},{line:b+(y?0:1),ch:0}),l.replaceRange(g,{line:v,ch:0},{line:v+(g?0:1),ch:0})})),l.setSelection({line:v+(g?1:0),ch:0},{line:b+(g?1:-1),ch:0}),l.focus()}else{var C=c.line;if(n(l.getLineHandle(c.line))&&("fenced"===i(l,c.line+1)?(o=c.line,C=c.line+1):(a=c.line,C=c.line-1)),void 0===o)for(o=C;o>=0&&!n(h=l.getLineHandle(o));o--);if(void 0===a)for(s=l.lineCount(),a=C;a=0;o--)if(!(h=l.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==i(l,o,h)){o+=1;break}for(s=l.lineCount(),a=c.line;a ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function F(e){var t=e.codemirror,n=p(t),r=e.options,i="http://";if(r.promptURLs&&!(i=prompt(r.promptTexts.link)))return!1;P(t,n.link,r.insertTexts.link,i)}function k(e){var t=e.codemirror,n=p(t),r=e.options,i="http://";if(r.promptURLs&&!(i=prompt(r.promptTexts.image)))return!1;P(t,n.image,r.insertTexts.image,i)}function O(e){var t=e.codemirror,n=p(t),r=e.options;P(t,n.table,r.insertTexts.table)}function M(e){var t=e.codemirror,n=p(t),r=e.options;P(t,n.image,r.insertTexts.horizontalRule)}function N(e){var t=e.codemirror;t.undo(),t.focus()}function R(e){var t=e.codemirror;t.redo(),t.focus()}function L(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(r.className)?(r.className=r.className.replace(/\s*editor-preview-active-side\s*/g,""),i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){t.getOption("fullScreen")||m(e),r.className+=" editor-preview-active-side"}),1),i.className+=" active",n.className+=" CodeMirror-sided",o=!0);var a=n.lastChild;if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"");var s=e.toolbarElements.preview,l=n.previousSibling;s.className=s.className.replace(/\s*active\s*/g,""),l.className=l.className.replace(/\s*disabled-for-preview*/g,"")}t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){r.innerHTML=e.options.previewRender(e.value(),r)}),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function I(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.previousSibling,i=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||((o=document.createElement("div")).className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),r.className=r.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),i&&(i.className+=" active",r.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var a=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&L(e)}function P(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],s=e.getCursor("start"),l=e.getCursor("end");r&&(a=a.replace("#url#",r)),t?(o=(i=e.getLine(s.line)).slice(0,s.ch),a=i.slice(s.ch),e.replaceRange(o+a,{line:s.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),s.ch+=o.length,s!==l&&(l.ch+=o.length)),e.setSelection(s,l),e.focus()}}function B(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)!function(r){var i=e.getLine(r),o=i.search(/[^#]/);i=void 0!==t?o<=0?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==n?o<=0?"# "+i:o==n?i.substr(o+1):"# "+i.substr(o+1):2==n?o<=0?"## "+i:o==n?i.substr(o+1):"## "+i.substr(o+1):o<=0?"### "+i:o==n?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(o);e.focus()}}function $(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=p(e),r=e.getCursor("start"),i=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},s=r.line;s<=i.line;s++)!function(r){var i=e.getLine(r);i=n[t]?i.replace(o[t],"$1"):a[t]+i,e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(s);e.focus()}}function U(e,t,n,r){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){r="undefined"===typeof r?n:r;var i,o=e.codemirror,a=p(o),s=n,l=r,c=o.getCursor("start"),u=o.getCursor("end");a[t]?(s=(i=o.getLine(c.line)).slice(0,c.ch),l=i.slice(c.ch),"bold"==t?(s=s.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),l=l.replace(/(\*\*|__)/,"")):"italic"==t?(s=s.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),l=l.replace(/(\*|_)/,"")):"strikethrough"==t&&(s=s.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),l=l.replace(/(\*\*|~~)/,"")),o.replaceRange(s+l,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(c.ch-=2,c!==u&&(u.ch-=2)):"italic"==t&&(c.ch-=1,c!==u&&(u.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(s+i+l),c.ch+=n.length,u.ch=c.ch+i.length),o.setSelection(c,u),o.focus()}}function j(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"===typeof t[n]&&t[n].constructor===Object?e[n]=j(e[n]||{},t[n]):e[n]=t[n]);return e}function H(e){for(var t=1;t=19968?n+=t[r].length:n+=1;return n}var G={bold:{name:"bold",action:g,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:v,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:y,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:C,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:C,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:w,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:A,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:x,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:S,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:b,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:E,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:_,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:D,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:T,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:F,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:k,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:O,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:M,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:I,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:L,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:m,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:N,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:R,className:"fa fa-repeat no-disable",title:"Redo"}},z={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},V={link:"URL for the link:",image:"URL of the image:"},q={bold:"**",code:"```",italic:"*"};function K(e){(e=e||{}).parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var n=document.styleSheets,r=0;r-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("SimpleMDE: Error. No element was found.");if(void 0===e.toolbar)for(var o in e.toolbar=[],G)G.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===G[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o));e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=H({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=H({},z,e.insertTexts||{}),e.promptTexts=V,e.blockStyles=H({},q,e.blockStyles||{}),e.shortcuts=H({},l,e.shortcuts||{}),void 0!=e.autosave&&void 0!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue)}function Y(){if("object"!==typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}K.prototype.markdown=function(e){if(o){var t={};return this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting&&window.hljs&&(t.highlight=function(e){return window.hljs.highlightAuto(e).value}),o.setOptions(t),o(e)}},K.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,n,o=this.options,a=this,l={};for(var c in o.shortcuts)null!==o.shortcuts[c]&&null!==s[c]&&function(e){l[u(o.shortcuts[e])]=function(){s[e](a)}}(c);if(l.Enter="newlineAndIndentContinueMarkdownList",l.Tab="tabAndIndentMarkdownList",l["Shift-Tab"]="shiftTabAndUnindentMarkdownList",l.Esc=function(e){e.getOption("fullScreen")&&m(a)},document.addEventListener("keydown",(function(e){27==(e=e||window.event).keyCode&&a.codemirror.getOption("fullScreen")&&m(a)}),!1),!1!==o.spellChecker?(t="spell-checker",(n=o.parsingConfig).name="gfm",n.gitHubSpice=!1,i({codeMirrorInstance:r})):((t=o.parsingConfig).name="gfm",t.gitHubSpice=!1),this.codemirror=r.fromTextArea(e,{mode:t,backdrop:n,theme:"paper",tabSize:void 0!=o.tabSize?o.tabSize:2,indentUnit:void 0!=o.tabSize?o.tabSize:2,indentWithTabs:!1!==o.indentWithTabs,lineNumbers:!1,autofocus:!0===o.autofocus,extraKeys:l,lineWrapping:!1!==o.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:o.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:void 0==o.styleSelectedText||o.styleSelectedText}),!0===o.forceSync){var d=this.codemirror;d.on("change",(function(){d.save()}))}this.gui={},!1!==o.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==o.status&&(this.gui.statusbar=this.createStatusbar()),void 0!=o.autosave&&!0===o.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var h=this.codemirror;setTimeout(function(){h.refresh()}.bind(h),0)}},K.prototype.autosave=function(){if(Y()){var e=this;if(void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void 0!=e.element.form&&e.element.form.addEventListener("submit",(function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());var t=document.getElementById("autosaved");if(null!=t&&void 0!=t&&""!=t){var n=new Date,r=n.getHours(),i=n.getMinutes(),o="am",a=r;a>=12&&(a=r-12,o="pm"),0==a&&(a=12),i=i<10?"0"+i:i,t.innerHTML="Autosaved: "+a+":"+i+" "+o}this.autosaveTimeoutId=setTimeout((function(){e.autosave()}),this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},K.prototype.clearAutosavedValue=function(){if(Y()){if(void 0==this.options.autosave||void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},K.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;n&&/editor-preview-side/.test(n.className)||((n=document.createElement("div")).className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling));var r=!1,i=!1;return e.on("scroll",(function(e){if(r)r=!1;else{i=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.getScrollInfo().top)/t,a=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=a}})),n.onscroll=function(){if(i)i=!1;else{r=!0;var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o;e.scrollTo(0,a)}},n},K.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var u="undefined"===typeof document||!document||!document.createElement||"multiple"in document.createElement("input"),d=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.onClick=r.onClick.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDragEnter=r.onDragEnter.bind(r),r.onDragLeave=r.onDragLeave.bind(r),r.onDragOver=r.onDragOver.bind(r),r.onDrop=r.onDrop.bind(r),r.onFileDialogCancel=r.onFileDialogCancel.bind(r),r.fileAccepted=r.fileAccepted.bind(r),r.isFileDialogActive=!1,r.state={isDragActive:!1},r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"renderChildren",value:function(e,t,n){return"function"===typeof e?e({isDragActive:t,isDragReject:n}):e}}]),i(t,[{key:"componentDidMount",value:function(){this.enterCounter=0,document.body.onfocus=this.onFileDialogCancel}},{key:"componentWillUnmount",value:function(){document.body.onfocus=null}},{key:"onDragStart",value:function(e){this.props.onDragStart&&this.props.onDragStart.call(this,e)}},{key:"onDragEnter",value:function(e){e.preventDefault(),++this.enterCounter;var t=this.allFilesAccepted((0,s.default)(e,this.props.multiple));this.setState({isDragActive:t,isDragReject:!t}),this.props.onDragEnter&&this.props.onDragEnter.call(this,e)}},{key:"onDragOver",value:function(e){e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch(t){}return this.props.onDragOver&&this.props.onDragOver.call(this,e),!1}},{key:"onDragLeave",value:function(e){e.preventDefault(),--this.enterCounter>0||(this.setState({isDragActive:!1,isDragReject:!1}),this.props.onDragLeave&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){var t=this,n=this.props,r=n.onDrop,i=n.onDropAccepted,o=n.onDropRejected,a=n.multiple,l=n.disablePreview,c=(0,s.default)(e,a),u=[],d=[];e.preventDefault(),this.enterCounter=0,this.isFileDialogActive=!1,c.forEach((function(e){l||(e.preview=window.URL.createObjectURL(e)),t.fileAccepted(e)&&t.fileMatchSize(e)?u.push(e):d.push(e)})),r&&r.call(this,u,d,e),d.length>0&&o&&o.call(this,d,e),u.length>0&&i&&i.call(this,u,e),this.setState({isDragActive:!1,isDragReject:!1})}},{key:"onClick",value:function(e){var t=this.props,n=t.onClick;t.disableClick||(e.stopPropagation(),this.open(),n&&n.call(this,e))}},{key:"onFileDialogCancel",value:function(){var e=this.props.onFileDialogCancel,t=this.fileInputEl,n=this.isFileDialogActive;e&&n&&setTimeout((function(){t.files.length||(n=!1,e())}),300)}},{key:"fileAccepted",value:function(e){return(0,a.default)(e,this.props.accept)}},{key:"fileMatchSize",value:function(e){return e.size<=this.props.maxSize&&e.size>=this.props.minSize}},{key:"allFilesAccepted",value:function(e){return e.every(this.fileAccepted)}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var e=this,n=this.props,i=n.accept,a=n.activeClassName,s=n.inputProps,l=n.multiple,d=n.name,h=n.rejectClassName,p=n.children,f=c(n,["accept","activeClassName","inputProps","multiple","name","rejectClassName","children"]),m=f.activeStyle,g=f.className,v=f.rejectStyle,y=f.style,b=c(f,["activeStyle","className","rejectStyle","style"]),E=this.state,C=E.isDragActive,w=E.isDragReject;g=g||"",C&&a&&(g+=" "+a),w&&h&&(g+=" "+h),g||y||m||v||(y={width:200,height:200,borderWidth:2,borderColor:"#666",borderStyle:"dashed",borderRadius:5},m={borderStyle:"solid",backgroundColor:"#eee"},v={borderStyle:"solid",backgroundColor:"#ffdddd"});var A=void 0;A=m&&C?r({},y,m):v&&w?r({},y,v):r({},y);var x={accept:i,type:"file",style:{display:"none"},multiple:u&&l,ref:function(t){return e.fileInputEl=t},onChange:this.onDrop};d&&d.length&&(x.name=d);var S=r({},b);return["acceptedFiles","disablePreview","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize"].forEach((function(e){return delete S[e]})),o.default.createElement("div",r({className:g,style:A},S,{onClick:this.onClick,onDragStart:this.onDragStart,onDragEnter:this.onDragEnter,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop}),t.renderChildren(p,C,w),o.default.createElement("input",r({},s,x)))}}]),t}(o.default.Component);d.defaultProps={disablePreview:!1,disableClick:!1,multiple:!0,maxSize:1/0,minSize:0},d.propTypes={onClick:o.default.PropTypes.func,onDrop:o.default.PropTypes.func,onDropAccepted:o.default.PropTypes.func,onDropRejected:o.default.PropTypes.func,onDragStart:o.default.PropTypes.func,onDragEnter:o.default.PropTypes.func,onDragOver:o.default.PropTypes.func,onDragLeave:o.default.PropTypes.func,children:o.default.PropTypes.oneOfType([o.default.PropTypes.node,o.default.PropTypes.func]),style:o.default.PropTypes.object,activeStyle:o.default.PropTypes.object,rejectStyle:o.default.PropTypes.object,className:o.default.PropTypes.string,activeClassName:o.default.PropTypes.string,rejectClassName:o.default.PropTypes.string,disablePreview:o.default.PropTypes.bool,disableClick:o.default.PropTypes.bool,onFileDialogCancel:o.default.PropTypes.func,inputProps:o.default.PropTypes.object,multiple:o.default.PropTypes.bool,accept:o.default.PropTypes.string,name:o.default.PropTypes.string,maxSize:o.default.PropTypes.number,minSize:o.default.PropTypes.number},t.default=d,e.exports=t.default},function(t,n){t.exports=e},function(e,t){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";t.__esModule=!0,n(8),n(9),t.default=function(e,t){if(e&&t){var n=function(){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return{v:n.some((function(e){var t=e.trim();return"."===t.charAt(0)?r.toLowerCase().endsWith(t.toLowerCase()):/\/\*$/.test(t)?o===t.replace(/\/.*$/,""):i===t}))}}();if("object"==typeof n)return n.v}return!0},e.exports=t.default},function(e,t){var n=e.exports={version:"1.2.2"};"number"==typeof __e&&(__e=n)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(2),i=n(1),o=n(4),a=n(19),s="prototype",l=function(e,t){return function(){return e.apply(t,arguments)}},c=function e(t,n,c){var u,d,h,p,f=t&e.G,m=t&e.P,g=f?r:t&e.S?r[n]||(r[n]={}):(r[n]||{})[s],v=f?i:i[n]||(i[n]={});for(u in f&&(c=n),c)h=((d=!(t&e.F)&&g&&u in g)?g:c)[u],p=t&e.B&&d?l(h,r):m&&"function"==typeof h?l(Function.call,h):h,g&&!d&&a(g,u,h),v[u]!=h&&o(v,u,p),m&&((v[s]||(v[s]={}))[u]=h)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t,n){var r=n(5),i=n(18);e.exports=n(22)?function(e,t,n){return r.setDesc(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(20)("wks"),i=n(2).Symbol;e.exports=function(e){return r[e]||(r[e]=i&&i[e]||(i||n(6))("Symbol."+e))}},function(e,t,n){n(26),e.exports=n(1).Array.some},function(e,t,n){n(25),e.exports=n(1).String.endsWith},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(10);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n(7)("match")]=!1,!"/./"[e](t)}catch(i){}}return!0}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(16),i=n(11),o=n(7)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(2),i=n(4),o=n(6)("src"),a="toString",s=Function[a],l=(""+s).split(a);n(1).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,a){"function"==typeof n&&(i(n,o,e[t]?""+e[t]:l.join(String(t))),"name"in n||(n.name=t)),e===r?e[t]=n:(a||delete e[t],i(e,t,n))})(Function.prototype,a,(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(2),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,n){var r=n(17),i=n(13);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){e.exports=!n(15)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(23),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(3),i=n(24),o=n(21),a="endsWith",s=""[a];r(r.P+r.F*n(14)(a),"String",{endsWith:function(e){var t=o(this,e,a),n=arguments,r=n.length>1?n[1]:void 0,l=i(t.length),c=void 0===r?l:Math.min(i(r),l),u=String(e);return s?s.call(t,u,c):t.slice(c-u.length,c)===u}})},function(e,t,n){var r=n(5),i=n(3),o=n(1).Array||Array,a={},s=function(e,t){r.each.call(e.split(","),(function(e){void 0==t&&e in o?a[e]=o[e]:e in[]&&(a[e]=n(12)(Function.call,[][e],t))}))};s("pop,reverse,shift,keys,values,entries",1),s("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),s("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),i(i.S,"Array",a)}])},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];if(e.dataTransfer){var r=e.dataTransfer;r.files&&r.files.length?n=r.files:r.items&&r.items.length&&(n=r.items)}else e.target&&e.target.files&&(n=e.target.files);return n.length>0&&(n=t?n:[n[0]]),Array.prototype.slice.call(n)},e.exports=t.default}])},e.exports=r(n(0))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length<=0||void 0===arguments[0]?a.default:arguments[0],t=s.default.bind(null,e);return function(e){var n=e.getState,r=n(),a=t(r),s=void 0;return function(e){return function(u){r=n(),s=a.detectMutations(),a=t(r),(0,i.default)(!s.wasMutated,l,(s.path||[]).join("."));var d=e(u);return r=n(),s=a.detectMutations(),a=t(r),(0,i.default)(!s.wasMutated,c,(s.path||[]).join("."),(0,o.default)(u)),d}}}};var i=r(n(19)),o=r(n(749)),a=r(n(750)),s=r(n(751)),l=["A state mutation was detected between dispatches, in the path `%s`.","This may cause incorrect behavior.","(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)"].join(" "),c=["A state mutation was detected inside a dispatch, in the path: `%s`.","Take a look at the reducer(s) handling the action %s.","(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)"].join(" ");e.exports=t.default},function(e,t,n){"use strict";var r=function(e,t){return n="0",r=t-e.toString().length,new Array(r+1).join(n)+e;var n,r},i=function(e){return"@ "+r(e.getHours(),2)+":"+r(e.getMinutes(),2)+":"+r(e.getSeconds(),2)+"."+r(e.getMilliseconds(),3)},o="undefined"!==typeof performance&&"function"===typeof performance.now?performance:Date;function a(e,t,n,r){switch("undefined"===typeof e?"undefined":(i=e)&&"undefined"!==typeof Symbol&&i.constructor===Symbol?"symbol":typeof i){case"object":return"function"===typeof e[r]?e[r].apply(e,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t>";return new u("Invalid "+s+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<>";return e.constructor.name}(t[n])+"` supplied to `"+r+"`, expected instance of `"+l+"`.")}return null}))},node:d((function(e,t,n,r,o){return p(e[t])?null:new u("Invalid "+i[r]+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return d((function(t,n,r,a,s){if("function"!==typeof e)return new u("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],c=f(l);if("object"!==c)return new u("Invalid "+i[a]+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var d in l)if(l.hasOwnProperty(d)){var h=e(l,d,r,a,s+"."+d,o);if(h instanceof Error)return h}return null}))},oneOf:function(e){if(!Array.isArray(e))return a.thatReturnsNull;return d((function(t,n,r,o,a){for(var s=t[n],l=0;l>",s=s||r,null==n[r]){var c=i[a];return t?null===n[r]?new u("The "+c+" `"+s+"` is marked as required in `"+o+"`, but its value is `null`."):new u("The "+c+" `"+s+"` is marked as required in `"+o+"`, but its value is `undefined`."):null}return e(n,r,o,a,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function h(e){return d((function(t,n,r,o,a,s){var l=t[n];return f(l)!==e?new u("Invalid "+i[o]+" `"+a+"` of type `"+function(e){var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}(l)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function p(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(p);if(null===e||r.isValidElement(e))return!0;var t=s(e);if(!t)return!1;var n,i=t.call(e);if(t!==e.entries){for(;!(n=i.next()).done;)if(!p(n.value))return!1}else for(;!(n=i.next()).done;){var o=n.value;if(o&&!p(o[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}u.prototype=Error.prototype,e.exports=l},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports="15.4.1"},function(e,t,n){"use strict";var r=n(56),i=n(57);n(13);e.exports=function(e){return i.isValidElement(e)||r("143"),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},a=n.selectLocationState,s=void 0===a?o:a,l=n.adjustUrlOnReplay,c=void 0===l||l;if("undefined"===typeof s(t.getState()))throw new Error("Expected the routing state to be available either as `state.routing` or as the custom expression you can specify as `selectLocationState` in the `syncHistoryWithStore()` options. Ensure you have added the `routerReducer` to your store's reducers via `combineReducers` or whatever method you use to isolate your reducers.");var u=void 0,d=void 0,h=void 0,p=void 0,f=void 0,m=function(e){return s(t.getState()).locationBeforeTransitions||(e?u:void 0)};if(u=m(),c){var g=function(){var t=m(!0);f!==t&&u!==t&&(d=!0,f=t,e.transitionTo(r({},t,{action:"PUSH"})),d=!1)};h=t.subscribe(g),g()}var v=function(e){d||(f=e,!u&&(u=e,m())||t.dispatch({type:i.LOCATION_CHANGE,payload:e}))};p=e.listen(v),e.getCurrentLocation&&v(e.getCurrentLocation());return r({},e,{listen:function(n){var r=m(!0),i=!1,o=t.subscribe((function(){var e=m(!0);e!==r&&(r=e,i||n(r))}));return e.getCurrentLocation||n(r),function(){i=!0,o()}},unsubscribe:function(){c&&h(),p()}})};var i=n(179),o=function(e){return e.routing}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){return function(t){return function(n){if(n.type!==r.CALL_HISTORY_METHOD)return t(n);var i=n.payload,o=i.method,a=i.args;e[o].apply(e,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t8&&u<=11);var p=String.fromCharCode(32),f={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},m=!1;function g(e,t){switch(e){case"topKeyUp":return-1!==l.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function v(e){var t=e.detail;return"object"===typeof t&&"data"in t?t.data:null}var y=null;function b(e,t,n,i){var s,l;if(c?s=function(e){switch(e){case"topCompositionStart":return f.compositionStart;case"topCompositionEnd":return f.compositionEnd;case"topCompositionUpdate":return f.compositionUpdate}}(e):y?g(e,n)&&(s=f.compositionEnd):function(e,t){return"topKeyDown"===e&&229===t.keyCode}(e,n)&&(s=f.compositionStart),!s)return null;h&&(y||s!==f.compositionStart?s===f.compositionEnd&&y&&(l=y.getData()):y=o.getPooled(i));var u=a.getPooled(s,t,n,i);if(l)u.data=l;else{var d=v(n);null!==d&&(u.data=d)}return r.accumulateTwoPhaseDispatches(u),u}function E(e,t,n,i){var a;if(!(a=d?function(e,t){switch(e){case"topCompositionEnd":return v(t);case"topKeyPress":return 32!==t.which?null:(m=!0,p);case"topTextInput":var n=t.data;return n===p&&m?null:n;default:return null}}(e,n):function(e,t){if(y){if("topCompositionEnd"===e||!c&&g(e,t)){var n=y.getData();return o.release(y),y=null,n}return null}switch(e){case"topPaste":return null;case"topKeyPress":return t.which&&!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)?String.fromCharCode(t.which):null;case"topCompositionEnd":return h?null:t.data;default:return null}}(e,n)))return null;var l=s.getPooled(f.beforeInput,t,n,i);return l.data=a,r.accumulateTwoPhaseDispatches(l),l}var C={eventTypes:f,extractEvents:function(e,t,n,r){return[b(e,t,n,r),E(e,t,n,r)]}};e.exports=C},function(e,t,n){"use strict";var r=n(18),i=n(48),o=n(184);function a(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}r(a.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[o()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,i=this.getText(),o=i.length;for(e=0;e1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),i.addPoolingTo(a),e.exports=a},function(e,t,n){"use strict";var r=n(40);function i(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(i,{data:null}),e.exports=i},function(e,t,n){"use strict";var r=n(40);function i(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(i,{data:null}),e.exports=i},function(e,t,n){"use strict";var r=n(70),i=n(69),o=n(28),a=n(20),s=n(36),l=n(40),c=n(124),u=n(125),d=n(187),h={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},p=null,f=null,m=null,g=null;var v=!1;function y(e){var t=l.getPooled(h.change,f,e,c(e));i.accumulateTwoPhaseDispatches(t),s.batchedUpdates(b,t)}function b(e){r.enqueueEvents(e),r.processEventQueue(!1)}function E(){p&&(p.detachEvent("onchange",y),p=null,f=null)}function C(e,t){if("topChange"===e)return t}function w(e,t,n){"topFocus"===e?(E(),function(e,t){f=t,(p=e).attachEvent("onchange",y)}(t,n)):"topBlur"===e&&E()}o.canUseDOM&&(v=u("change")&&(!document.documentMode||document.documentMode>8));var A=!1;o.canUseDOM&&(A=u("input")&&(!document.documentMode||document.documentMode>11));var x={get:function(){return g.get.call(this)},set:function(e){m=""+e,g.set.call(this,e)}};function S(){p&&(delete p.value,p.detachEvent?p.detachEvent("onpropertychange",_):p.removeEventListener("propertychange",_,!1),p=null,f=null,m=null,g=null)}function _(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==m&&(m=t,y(e))}}function D(e,t){if("topInput"===e)return t}function T(e,t,n){"topFocus"===e?(S(),function(e,t){p=e,f=t,m=e.value,g=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(p,"value",x),p.attachEvent?p.attachEvent("onpropertychange",_):p.addEventListener("propertychange",_,!1)}(t,n)):"topBlur"===e&&S()}function F(e,t){if(("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)&&p&&p.value!==m)return m=p.value,f}function k(e,t){if("topClick"===e)return t}var O={eventTypes:h,extractEvents:function(e,t,n,r){var o,s,c,u=t?a.getNodeFromInstance(t):window;if(!function(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}(u)?d(u)?A?o=D:(o=F,s=T):!(c=u).nodeName||"input"!==c.nodeName.toLowerCase()||"checkbox"!==c.type&&"radio"!==c.type||(o=k):v?o=C:s=w,o){var p=o(e,t);if(p){var f=l.getPooled(h.change,p,n,r);return f.type="change",i.accumulateTwoPhaseDispatches(f),f}}s&&s(e,u,t)}};e.exports=O},function(e,t,n){"use strict";var r=n(317),i={};i.attachRefs=function(e,t){if(null!==t&&"object"===typeof t){var n=t.ref;null!=n&&function(e,t,n){"function"===typeof e?e(t.getPublicInstance()):r.addComponentAsRefTo(t,e,n)}(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null,r=null;null!==e&&"object"===typeof e&&(n=e.ref,r=e._owner);var i=null,o=null;return null!==t&&"object"===typeof t&&(i=t.ref,o=t._owner),n!==i||"string"===typeof i&&o!==r},i.detachRefs=function(e,t){if(null!==t&&"object"===typeof t){var n=t.ref;null!=n&&function(e,t,n){"function"===typeof e?e(null):r.removeComponentAsRefFrom(t,e,n)}(n,e,t._owner)}},e.exports=i},function(e,t,n){"use strict";var r=n(16);n(13);function i(e){return!(!e||"function"!==typeof e.attachRef||"function"!==typeof e.detachRef)}var o={addComponentAsRefTo:function(e,t,n){i(n)||r("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){i(n)||r("120");var o=n.getPublicInstance();o&&o.refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=o},function(e,t,n){"use strict";e.exports=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"]},function(e,t,n){"use strict";var r=n(69),i=n(20),o=n(86),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},s={eventTypes:a,extractEvents:function(e,t,n,s){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var l,c,u;if(s.window===s)l=s;else{var d=s.ownerDocument;l=d?d.defaultView||d.parentWindow:window}if("topMouseOut"===e){c=t;var h=n.relatedTarget||n.toElement;u=h?i.getClosestInstanceFromNode(h):null}else c=null,u=t;if(c===u)return null;var p=null==c?l:i.getNodeFromInstance(c),f=null==u?l:i.getNodeFromInstance(u),m=o.getPooled(a.mouseLeave,c,n,s);m.type="mouseleave",m.target=p,m.relatedTarget=f;var g=o.getPooled(a.mouseEnter,u,n,s);return g.type="mouseenter",g.target=f,g.relatedTarget=p,r.accumulateEnterLeaveDispatches(m,g,c,u),[m,g]}};e.exports=s},function(e,t,n){"use strict";var r=n(59),i=r.injection.MUST_USE_PROPERTY,o=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,l=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:o,allowTransparency:0,alt:0,as:0,async:o,autoComplete:0,autoPlay:o,capture:o,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:i|o,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:o,coords:0,crossOrigin:0,data:0,dateTime:0,default:o,defer:o,dir:0,disabled:o,download:l,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:o,formTarget:0,frameBorder:0,headers:0,height:0,hidden:o,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:o,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:i|o,muted:i|o,name:0,nonce:0,noValidate:o,open:o,optimum:0,pattern:0,placeholder:0,playsInline:o,poster:0,preload:0,profile:0,radioGroup:0,readOnly:o,referrerPolicy:0,rel:0,required:o,reversed:o,role:0,rows:s,rowSpan:a,sandbox:0,scope:0,scoped:o,scrolling:0,seamless:o,selected:i|o,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:o,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=c},function(e,t,n){"use strict";var r=n(127),i={processChildrenUpdates:n(326).dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=i},function(e,t,n){"use strict";var r=n(16),i=n(61),o=n(28),a=n(323),s=n(31),l=(n(13),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(o.canUseDOM||r("56"),t||r("57"),"HTML"===e.nodeName&&r("58"),"string"===typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else i.replaceChildWithTree(e,t)}});e.exports=l},function(e,t,n){"use strict";var r=n(28),i=n(324),o=n(325),a=n(13),s=r.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=function(e,t){var n=s;s||a(!1);var r=function(e){var t=e.match(l);return t&&t[1].toLowerCase()}(e),c=r&&o(r);if(c){n.innerHTML=c[1]+e+c[2];for(var u=c[0];u--;)n=n.lastChild}else n.innerHTML=e;var d=n.getElementsByTagName("script");d.length&&(t||a(!1),i(d).forEach(t));for(var h=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return h}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if((Array.isArray(e)||"object"!==typeof e&&"function"!==typeof e)&&r(!1),"number"!==typeof t&&r(!1),0===t||t-1 in e||r(!1),"function"===typeof e.callee&&r(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(o){}for(var n=Array(t),i=0;i',""],l=[1,"","
"],c=[3,"","
"],u=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach((function(e){d[e]=u,a[e]=!0})),e.exports=function(e){return o||i(!1),d.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(o.innerHTML="*"===e?"":"<"+e+">",a[e]=!o.firstChild),a[e]?d[e]:null}},function(e,t,n){"use strict";var r=n(127),i=n(20),o={dangerouslyProcessChildrenUpdates:function(e,t){var n=i.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=o},function(e,t,n){"use strict";var r=n(16),i=n(18),o=n(328),a=n(329),s=n(61),l=n(128),c=n(59),u=n(192),d=n(70),h=n(121),p=n(89),f=n(181),m=n(20),g=n(339),v=n(341),y=n(193),b=n(342),E=(n(32),n(343)),C=n(350),w=(n(31),n(88)),A=(n(13),n(125),n(132),n(136),n(14),f),x=d.deleteListener,S=m.getNodeFromInstance,_=p.listenTo,D=h.registrationNameModules,T={string:!0,number:!0},F={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null};function k(e,t){t&&(j[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",function(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}(e)))}function O(e,t,n,r){if(!(r instanceof C)){0;var i=e._hostContainerInfo,o=i._node&&11===i._node.nodeType?i._node:i._ownerDocument;_(t,o),r.getReactMountReady().enqueue(M,{inst:e,registrationName:t,listener:n})}}function M(){d.putListener(this.inst,this.registrationName,this.listener)}function N(){g.postMountWrapper(this)}function R(){b.postMountWrapper(this)}function L(){v.postMountWrapper(this)}var I={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"};function P(){this._rootNodeID||r("63");var e=S(this);switch(e||r("64"),this._tag){case"iframe":case"object":this._wrapperState.listeners=[p.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":for(var t in this._wrapperState.listeners=[],I)I.hasOwnProperty(t)&&this._wrapperState.listeners.push(p.trapBubbledEvent(t,I[t],e));break;case"source":this._wrapperState.listeners=[p.trapBubbledEvent("topError","error",e)];break;case"img":this._wrapperState.listeners=[p.trapBubbledEvent("topError","error",e),p.trapBubbledEvent("topLoad","load",e)];break;case"form":this._wrapperState.listeners=[p.trapBubbledEvent("topReset","reset",e),p.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":this._wrapperState.listeners=[p.trapBubbledEvent("topInvalid","invalid",e)]}}function B(){y.postUpdateWrapper(this)}var $={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},U={listing:!0,pre:!0,textarea:!0},j=i({menuitem:!0},$),H=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,W={},G={}.hasOwnProperty;function z(e,t){return e.indexOf("-")>=0||null!=t.is}var V=1;function q(e){var t=e.type;!function(e){G.call(W,e)||(H.test(e)||r("65",e),W[e]=!0)}(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}q.displayName="ReactDOMComponent",q.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=V++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i,a,c,d=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(P,this);break;case"input":g.mountWrapper(this,d,t),d=g.getHostProps(this,d),e.getReactMountReady().enqueue(P,this);break;case"option":v.mountWrapper(this,d,t),d=v.getHostProps(this,d);break;case"select":y.mountWrapper(this,d,t),d=y.getHostProps(this,d),e.getReactMountReady().enqueue(P,this);break;case"textarea":b.mountWrapper(this,d,t),d=b.getHostProps(this,d),e.getReactMountReady().enqueue(P,this)}if(k(this,d),null!=t?(i=t._namespaceURI,a=t._tag):n._tag&&(i=n._namespaceURI,a=n._tag),(null==i||i===l.svg&&"foreignobject"===a)&&(i=l.html),i===l.html&&("svg"===this._tag?i=l.svg:"math"===this._tag&&(i=l.mathml)),this._namespaceURI=i,e.useCreateElement){var h,p=n._ownerDocument;if(i===l.html)if("script"===this._tag){var f=p.createElement("div"),E=this._currentElement.type;f.innerHTML="<"+E+">",h=f.removeChild(f.firstChild)}else h=d.is?p.createElement(this._currentElement.type,d.is):p.createElement(this._currentElement.type);else h=p.createElementNS(i,this._currentElement.type);m.precacheNode(this,h),this._flags|=A.hasCachedChildNodes,this._hostParent||u.setAttributeForRoot(h),this._updateDOMProperties(null,d,e);var C=s(h);this._createInitialChildren(e,d,r,C),c=C}else{var w=this._createOpenTagMarkupAndPutListeners(e,d),x=this._createContentMarkup(e,d,r);c=!x&&$[this._tag]?w+"/>":w+">"+x+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(N,this),d.autoFocus&&e.getReactMountReady().enqueue(o.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(R,this),d.autoFocus&&e.getReactMountReady().enqueue(o.focusDOMComponent,this);break;case"select":case"button":d.autoFocus&&e.getReactMountReady().enqueue(o.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(L,this)}return c},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(D.hasOwnProperty(r))o&&O(this,r,o,e);else{"style"===r&&(o&&(o=this._previousStyleCopy=i({},t.style)),o=a.createMarkupForStyles(o,this));var s=null;null!=this._tag&&z(this._tag,t)?F.hasOwnProperty(r)||(s=u.createMarkupForCustomAttribute(r,o)):s=u.createMarkupForProperty(r,o),s&&(n+=" "+s)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+u.createMarkupForRoot()),n+=" "+u.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=T[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=w(o);else if(null!=a){r=this.mountChildren(a,e,n).join("")}}return U[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&s.queueHTML(r,i.__html);else{var o=T[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)s.queueText(r,o);else if(null!=a)for(var l=this.mountChildren(a,e,n),c=0;c0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var s=n;s--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}e.exports={isAncestor:function(e,t){"_hostNode"in e||r("35"),"_hostNode"in t||r("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1},getLowestCommonAncestor:i,getParentInstance:function(e){return"_hostNode"in e||r("36"),e._hostParent},traverseTwoPhase:function(e,t,n){for(var r,i=[];e;)i.push(e),e=e._hostParent;for(r=i.length;r-- >0;)t(i[r],"captured",n);for(r=0;r0;)n(c[l],"captured",o)}}},function(e,t,n){"use strict";var r=n(16),i=n(18),o=n(127),a=n(61),s=n(20),l=n(88),c=(n(13),n(136),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(c.prototype,{mountComponent:function(e,t,n,r){var i=n._idCounter++,o=" react-text: "+i+" ";if(this._domID=i,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,u=c.createComment(o),d=c.createComment(" /react-text "),h=a(c.createDocumentFragment());return a.queueChild(h,a(u)),this._stringText&&a.queueChild(h,a(c.createTextNode(this._stringText))),a.queueChild(h,a(d)),s.precacheNode(this,u),this._closingComment=d,h}var p=l(this._stringText);return e.renderToStaticMarkup?p:"\x3c!--"+o+"--\x3e"+p+"\x3c!-- /react-text --\x3e"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();o.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this).nextSibling;;){if(null==t&&r("67",this._domID),8===t.nodeType&&" /react-text "===t.nodeValue){this._closingComment=t;break}t=t.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=c},function(e,t,n){"use strict";var r=n(18),i=n(36),o=n(85),a=n(31),s={initialize:a,close:function(){d.isBatchingUpdates=!1}},l=[{initialize:a,close:i.flushBatchedUpdates.bind(i)},s];function c(){this.reinitializeTransaction()}r(c.prototype,o,{getTransactionWrappers:function(){return l}});var u=new c,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?e(t,n,r,i,o):u.perform(e,null,t,n,r,i,o)}};e.exports=d},function(e,t,n){"use strict";var r=n(18),i=n(201),o=n(28),a=n(48),s=n(20),l=n(36),c=n(124),u=n(357);function d(e){for(;e._hostParent;)e=e._hostParent;var t=s.getNodeFromInstance(e).parentNode;return s.getClosestInstanceFromNode(t)}function h(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function p(e){var t=c(e.nativeEvent),n=s.getClosestInstanceFromNode(t),r=n;do{e.ancestors.push(r),r=r&&d(r)}while(r);for(var i=0;it.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}:function(e,t){if(window.getSelection){var n=window.getSelection(),r=e[o()].length,a=Math.min(t.start,r),s=void 0===t.end?a:Math.min(t.end,r);if(!n.extend&&a>s){var l=s;s=a,a=l}var c=i(e,a),u=i(e,s);if(c&&u){var d=document.createRange();d.setStart(c.node,c.offset),n.removeAllRanges(),a>s?(n.addRange(d),n.extend(u.node,u.offset)):(d.setEnd(u.node,u.offset),n.addRange(d))}}}};e.exports=l},function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function i(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}e.exports=function(e,t){for(var n=r(e),o=0,a=0;n;){if(3===n.nodeType){if(a=o+n.textContent.length,o<=t&&a>=t)return{node:n,offset:t-o};o=a}n=r(i(n))}}},function(e,t,n){"use strict";var r=n(363);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";var r=n(364);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"===typeof t.Node?e instanceof t.Node:"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName))}},function(e,t,n){"use strict";var r="http://www.w3.org/1999/xlink",i="http://www.w3.org/XML/1998/namespace",o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},a={Properties:{},DOMAttributeNamespaces:{xlinkActuate:r,xlinkArcrole:r,xlinkHref:r,xlinkRole:r,xlinkShow:r,xlinkTitle:r,xlinkType:r,xmlBase:i,xmlLang:i,xmlSpace:i},DOMAttributeNames:{}};Object.keys(o).forEach((function(e){a.Properties[e]=0,o[e]&&(a.DOMAttributeNames[e]=o[e])})),e.exports=a},function(e,t,n){"use strict";var r=n(69),i=n(28),o=n(20),a=n(202),s=n(40),l=n(203),c=n(187),u=n(132),d=i.canUseDOM&&"documentMode"in document&&document.documentMode<=11,h={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,f=null,m=null,g=!1,v=!1;function y(e,t){if(g||null==p||p!==l())return null;var n=function(e){if("selectionStart"in e&&a.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}(p);if(!m||!u(m,n)){m=n;var i=s.getPooled(h.select,f,e,t);return i.type="select",i.target=p,r.accumulateTwoPhaseDispatches(i),i}return null}var b={eventTypes:h,extractEvents:function(e,t,n,r){if(!v)return null;var i=t?o.getNodeFromInstance(t):window;switch(e){case"topFocus":(c(i)||"true"===i.contentEditable)&&(p=i,f=t,m=null);break;case"topBlur":p=null,f=null,m=null;break;case"topMouseDown":g=!0;break;case"topContextMenu":case"topMouseUp":return g=!1,y(n,r);case"topSelectionChange":if(d)break;case"topKeyDown":case"topKeyUp":return y(n,r)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(v=!0)}};e.exports=b},function(e,t,n){"use strict";var r=n(16),i=n(201),o=n(69),a=n(20),s=n(368),l=n(369),c=n(40),u=n(370),d=n(371),h=n(86),p=n(373),f=n(374),m=n(375),g=n(71),v=n(376),y=n(31),b=n(137),E=(n(13),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach((function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,r="top"+t,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};E[e]=i,C[r]=i}));var w={};function A(e){return"."+e._rootNodeID}function x(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var S={eventTypes:E,extractEvents:function(e,t,n,i){var a,y=C[e];if(!y)return null;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=c;break;case"topKeyPress":if(0===b(n))return null;case"topKeyDown":case"topKeyUp":a=d;break;case"topBlur":case"topFocus":a=u;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=h;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=f;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=s;break;case"topTransitionEnd":a=m;break;case"topScroll":a=g;break;case"topWheel":a=v;break;case"topCopy":case"topCut":case"topPaste":a=l}a||r("86",e);var E=a.getPooled(y,t,n,i);return o.accumulateTwoPhaseDispatches(E),E},didPutListener:function(e,t,n){if("onClick"===t&&!x(e._tag)){var r=A(e),o=a.getNodeFromInstance(e);w[r]||(w[r]=i.listen(o,"click",y))}},willDeleteListener:function(e,t){if("onClick"===t&&!x(e._tag)){var n=A(e);w[n].remove(),delete w[n]}}};e.exports=S},function(e,t,n){"use strict";var r=n(40);function i(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(i,{animationName:null,elapsedTime:null,pseudoElement:null}),e.exports=i},function(e,t,n){"use strict";var r=n(40),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};function o(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";var r=n(71);function i(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(i,{relatedTarget:null}),e.exports=i},function(e,t,n){"use strict";var r=n(71),i=n(137),o={key:n(372),location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:n(126),charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};function a(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(a,o),e.exports=a},function(e,t,n){"use strict";var r=n(137),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=function(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?o[e.keyCode]||"Unidentified":""}},function(e,t,n){"use strict";var r=n(86);function i(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(i,{dataTransfer:null}),e.exports=i},function(e,t,n){"use strict";var r=n(71),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:n(126)};function o(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";var r=n(40);function i(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(i,{propertyName:null,elapsedTime:null,pseudoElement:null}),e.exports=i},function(e,t,n){"use strict";var r=n(86);function i(e,t,n,i){return r.call(this,e,t,n,i)}r.augmentClass(i,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),e.exports=i},function(e,t,n){"use strict";n(136);e.exports=function(e,t){return{_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?9===t.nodeType?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null}}},function(e,t,n){"use strict";e.exports={useCreateElement:!0,useFiber:!1}},function(e,t,n){"use strict";var r=n(380),i=/\/?>/,o=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return o.test(e)?e:e.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(e)===n}};e.exports=a},function(e,t,n){"use strict";e.exports=function(e){for(var t=1,n=0,r=0,i=e.length,o=-4&i;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(a,["createElement","render"]);return null==t?null:(Object.keys(m.propTypes).forEach((function(e){return delete c[e]})),l(r({},c,{router:this.router,location:t,routes:n,params:i,components:o,createElement:s})))}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=n(62);t.default=function(e,t){var n=e&&e.routes,i=t.routes,o=void 0,a=void 0,s=void 0;return n?function(){var l=!1;(o=n.filter((function(n){if(l)return!0;var o=-1===i.indexOf(n)||function(e,t,n){return!!e.path&&(0,r.getParamNames)(e.path).some((function(e){return t.params[e]!==n.params[e]}))}(n,e,t);return o&&(l=!0),o}))).reverse(),s=[],a=[],i.forEach((function(e){var t=-1===n.indexOf(e),r=-1!==o.indexOf(e);t||r?s.push(e):a.push(e)}))}():(o=[],a=[],s=i),{leaveRoutes:o,changeRoutes:a,enterRoutes:s}},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.runEnterHooks=function(e,t,n){o.clear();var r=function(e){return e.reduce((function(e,t){return t.onEnter&&e.push(s(t.onEnter,t,3,o)),e}),[])}(e);return l(r.length,(function(e,n,i){r[e](t,n,(function(){o.has(r[e])&&(i(),o.remove(r[e]))}))}),n)},t.runChangeHooks=function(e,t,n,r){a.clear();var i=function(e){return e.reduce((function(e,t){return t.onChange&&e.push(s(t.onChange,t,4,a)),e}),[])}(e);return l(i.length,(function(e,r,o){i[e](t,n,r,(function(){a.has(i[e])&&(o(),a.remove(i[e]))}))}),r)},t.runLeaveHooks=function(e,t){for(var n=0,r=e.length;n4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];void 0===i&&("/"!==t.pathname.charAt(0)&&(t=r({},t,{pathname:"/"+t.pathname})),i=t.pathname),(0,a.loopAsync)(e.length,(function(n,r,a){h(e[n],t,i,o,s,(function(e,t){e||t?a(e,t):r()}))}),n)}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=n(62);t.default=function(e,t){var n={};return e.path?((0,r.getParamNames)(e.path).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})),n):n},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["history","routes","location"]);n||d||(0,o.default)(!1),n=n||(0,a.default)(h);var p=(0,s.default)(n,(0,l.createRoutes)(u));d=d?n.createLocation(d):n.getCurrentLocation(),p.match(d,(function(e,o,a){var s=void 0;if(a){var l=(0,c.createRouterObject)(n,p,a);s=r({},a,{router:l,matchContext:{transitionManager:p,router:l}})}t(e,o&&n.createLocation(o,i.REPLACE),s)}))},e.exports=t.default},function(e,t,n){"use strict";var r=n(399),i=n(18);function o(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=i({arrayFormat:"none"},t)),r=Object.create(null);return"string"!==typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))):r},t.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[o(t,e),"[",r,"]"].join(""):[o(t,e),"[",o(r,e),"]=",o(n,e)].join("")};case"bracket":return function(t,n){return null===n?o(t,e):[o(t,e),"[]=",o(n,e)].join("")};default:return function(t,n){return null===n?o(t,e):[o(t,e),"=",o(n,e)].join("")}}}(t=i({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return o(r,t);if(Array.isArray(i)){var a=[];return i.slice().forEach((function(e){void 0!==e&&a.push(n(r,e,a.length))})),a.join("&")}return o(r,t)+"="+o(i,t)})).filter((function(e){return e.length>0})).join("&"):""}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e)?e={entries:e}:"string"===typeof e&&(e={entries:[e]});var t=function(){var e=m[g],t=(0,a.createPath)(e),n=void 0,i=void 0;e.key&&(n=e.key,i=b(n));var s=(0,a.parsePath)(t);return(0,o.createLocation)(r({},s,{state:i}),void 0,n)},n=function(e){var t=g+e;return t>=0&&t=0&&g=e&&a&&(i=!0,n())}}()}},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:i.createElement;return function(t,n){return l.reduceRight((function(e,t){return t(e,n)}),e(t,n))}};return function(e){return s.reduceRight((function(t,n){return n(t,e)}),o.default.createElement(a.default,r({},e,{createElement:c(e.createElement)})))}},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(404)),i=o(n(216));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};o.canUseDOM||(0,i.default)(!1);var t=e.forceRefresh||!(0,l.supportsHistory)(),n=t?s:a,u=n.getUserConfirmation,d=n.getCurrentLocation,h=n.pushLocation,p=n.replaceLocation,f=n.go,m=(0,c.default)(r({getUserConfirmation:u},e,{getCurrentLocation:d,pushLocation:h,replaceLocation:p,go:f})),g=0,v=void 0,y=function(e,t){1===++g&&(v=a.startListener(m.transitionTo));var n=t?m.listenBefore(e):m.listen(e);return function(){n(),0===--g&&v()}},b=function(e){return y(e,!0)},E=function(e){return y(e,!1)};return r({},m,{listenBefore:b,listen:E})}},function(e,t,n){"use strict";t.__esModule=!0,t.replaceLocation=t.pushLocation=t.getCurrentLocation=t.go=t.getUserConfirmation=void 0;var r=n(145);Object.defineProperty(t,"getUserConfirmation",{enumerable:!0,get:function(){return r.getUserConfirmation}}),Object.defineProperty(t,"go",{enumerable:!0,get:function(){return r.go}});var i=n(64),o=n(45);t.getCurrentLocation=function(){return(0,i.createLocation)(window.location)},t.pushLocation=function(e){return window.location.href=(0,o.createPath)(e),!1},t.replaceLocation=function(e){return window.location.replace((0,o.createPath)(e)),!1}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(407)),i=o(n(216));function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(r.default),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};o.canUseDOM||(0,i.default)(!1);var t=e.queryKey,n=e.hashType;"string"!==typeof t&&(t="_k"),null==n&&(n="slash"),n in d||(n="slash");var c=d[n],u=s.getUserConfirmation,h=function(){return s.getCurrentLocation(c,t)},p=function(e){return s.pushLocation(e,c,t)},f=function(e){return s.replaceLocation(e,c,t)},m=(0,l.default)(r({getUserConfirmation:u},e,{getCurrentLocation:h,pushLocation:p,replaceLocation:f,go:s.go})),g=0,v=void 0,y=function(e,n){1===++g&&(v=s.startListener(m.transitionTo,c,t));var r=n?m.listenBefore(e):m.listen(e);return function(){r(),0===--g&&v()}},b=function(e){return y(e,!0)},E=function(e){return y(e,!1)},C=((0,a.supportsGoWithoutReloadUsingHash)(),function(e){m.go(e)}),w=function(e){return"#"+c.encodePath(m.createHref(e))};return r({},m,{listenBefore:b,listen:E,go:C,createHref:w})}},function(e,t,n){"use strict";t.__esModule=!0,t.replaceLocation=t.pushLocation=t.startListener=t.getCurrentLocation=t.go=t.getUserConfirmation=void 0;var r=n(145);Object.defineProperty(t,"getUserConfirmation",{enumerable:!0,get:function(){return r.getUserConfirmation}}),Object.defineProperty(t,"go",{enumerable:!0,get:function(){return r.go}});var i,o=n(42),a=((i=o)&&i.__esModule,n(64)),s=n(91),l=n(215),c=n(45);var u=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},d=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},h=t.getCurrentLocation=function(e,t){var n=e.decodePath(u()),r=(0,c.getQueryStringValueFromPath)(n,t),i=void 0;r&&(n=(0,c.stripQueryStringValueFromPath)(n,t),i=(0,l.readState)(r));var o=(0,c.parsePath)(n);return o.state=i,(0,a.createLocation)(o,void 0,r)},p=void 0,f=(t.startListener=function(e,t,n){var r=function(){var r=u(),i=t.encodePath(r);if(r!==i)d(i);else{var o=h(t,n);if(p&&o.key&&p.key===o.key)return;p=o,e(o)}},i=u(),o=t.encodePath(i);return i!==o&&d(o),(0,s.addEventListener)(window,"hashchange",r),function(){return(0,s.removeEventListener)(window,"hashchange",r)}},function(e,t,n,r){var i=e.state,o=e.key,a=t.encodePath((0,c.createPath)(e));void 0!==i&&(a=(0,c.addQueryStringValueToPath)(a,n,o),(0,l.saveState)(o,i)),p=e,r(a)});t.pushLocation=function(e,t,n){return f(e,t,n,(function(e){u()!==e&&function(e){window.location.hash=e}(e)}))},t.replaceLocation=function(e,t,n){return f(e,t,n,(function(e){u()!==e&&d(e)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","keyMap","handlers","focused","attach"]));return i.default.createElement(a.default,r({},n,{onFocus:this.onFocus,onBlur:this.onBlur}),t)}});t.default=m},function(e,t,n){var r=n(219),i=n(417),o=n(418),a=n(94),s=n(227),l=n(148),c=Object.prototype.hasOwnProperty,u=o((function(e,t){if(s(t)||a(t))i(t,l(t),e);else for(var n in t)c.call(t,n)&&r(e,n,t[n])}));e.exports=u},function(e,t,n){var r=n(222),i=n(414),o=n(92),a=n(224),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:s).test(a(e))}},function(e,t,n){var r=n(146),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(415),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(43)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(219),i=n(220);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(93),i=n(94),o=n(226),a=n(92);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},function(e,t,n){var r=n(428),i=n(429),o=n(76),a=n(228),s=n(226),l=n(229),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&a(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||f.push(g);return f}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(96);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(95);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(95),i=n(149),o=n(231);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(452),i=n(95),o=n(149);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(453),i=n(454),o=n(455),a=n(456),s=n(457);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t":".","?":"/","|":"\\"},d={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},h=1;h<20;++h)l[111+h]="f"+h;for(h=0;h<=9;++h)l[h+96]=h.toString();y.prototype.bind=function(e,t,n){return e=e instanceof Array?e:[e],this._bindMultiple.call(this,e,t,n),this},y.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},y.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function e(t,n){return null!==t&&t!==o&&(t===n||e(t.parentNode,n))}(t,this.target))return!1;if("composedPath"in e&&"function"===typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},y.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},y.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(l[t]=e[t]);s=null},y.init=function(){var e=y(o);for(var t in e)"_"!==t.charAt(0)&&(y[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},y.init(),i.Mousetrap=y,e.exports&&(e.exports=y),void 0===(r=function(){return y}.call(t,n,t,e))||(e.exports=r)}function p(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function f(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return l[e.which]?l[e.which]:c[e.which]?c[e.which]:String.fromCharCode(e.which).toLowerCase()}function m(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function g(e,t,n){return n||(n=function(){if(!s)for(var e in s={},l)e>95&&e<112||l.hasOwnProperty(e)&&(s[l[e]]=e);return s}()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function v(e,t){var n,r,i,o=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),i=0;i1?h(e,s,n,r):(a=v(e,r),t._callbacks[a.key]=t._callbacks[a.key]||[],c(a.key,a.modifiers,{type:a.action},i,e,o),t._callbacks[a.key][i?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:i,level:o,combo:e}))}t._handleKey=function(e,t,n){var r,i=c(e,t,n),o={},d=0,h=!1;for(r=0;r-1};function u(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!==typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=m(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function C(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new p;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function A(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},y.call(E.prototype),y.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},A.error=function(){var e=new A(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];A.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new A(null,{status:t,headers:{location:e}})};var S=self.DOMException;try{new S}catch(D){(S=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),S.prototype.constructor=S}function _(e,t){return new Promise((function(n,r){var i=new E(e,t);if(i.signal&&i.signal.aborted)return r(new S("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;n(new A(t,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new S("Aborted","AbortError"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}_.polyfill=!0,self.fetch||(self.fetch=_,self.Headers=p,self.Request=E,self.Response=A)},function(e,t,n){"use strict";var r=n(500),i=n(522);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(24),e.exports.Schema=n(66),e.exports.FAILSAFE_SCHEMA=n(150),e.exports.JSON_SCHEMA=n(234),e.exports.CORE_SCHEMA=n(233),e.exports.DEFAULT_SAFE_SCHEMA=n(78),e.exports.DEFAULT_FULL_SCHEMA=n(99),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.safeDump,e.exports.YAMLException=n(77),e.exports.MINIMAL_SCHEMA=n(150),e.exports.SAFE_SCHEMA=n(78),e.exports.DEFAULT_SCHEMA=n(99),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},function(e,t,n){"use strict";var r=n(65),i=n(77),o=n(501),a=n(78),s=n(99),l=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=/[\x85\u2028\u2029]/,d=/[,\[\]\{\}]/,h=/^(?:!|!!|![a-z\-]+!)$/i,p=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function f(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function g(e){return 9===e||32===e}function v(e){return 9===e||32===e||10===e||13===e}function y(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function E(e){return 48===e?"\0":97===e?"\x07":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"\x1b":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"\x85":95===e?"\xa0":76===e?"\u2028":80===e?"\u2029":""}function C(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var w=new Array(256),A=new Array(256),x=0;x<256;x++)w[x]=E(x)?1:0,A[x]=E(x);function S(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function _(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function D(e,t){throw _(e,t)}function T(e,t){e.onWarning&&e.onWarning.call(null,_(e,t))}var F={YAML:function(e,t,n){var r,i,o;null!==e.version&&D(e,"duplication of %YAML directive"),1!==n.length&&D(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&D(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&D(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&T(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&D(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],h.test(r)||D(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,r)&&D(e,'there is a previously declared suffix for "'+r+'" tag handle'),p.test(i)||D(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function k(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function P(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&v(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,R(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,U(e,t,3,!1,!0),a.push(e.result),R(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)D(e,"bad indentation of a sequence entry");else if(e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndentt)&&(U(e,t,4,!0,i)&&(m?p=e.result:f=e.result),m||(M(e,u,d,h,p,f,o,a),h=p=f=null),R(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)D(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?D(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?D(e,"repeat of an indentation width identifier"):(d=t+o-1,u=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(N(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentd&&(d=e.lineIndent),m(a))h++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:D(e,"expected hexadecimal character");e.result+=C(o),e.position++}else D(e,"unknown escape sequence");n=r=e.position}else m(s)?(k(e,n,r,!0),I(e,R(e,!1,t)),n=r=e.position):e.position===e.lineStart&&L(e)?D(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}D(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?S=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!v(r)&&!y(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&D(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||D(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],R(e,!0,-1),!0}(e)?function(e,t,n){var r,i,o,a,s,l,c,u,d=e.kind,h=e.result;if(v(u=e.input.charCodeAt(e.position))||y(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(v(r=e.input.charCodeAt(e.position+1))||n&&y(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(v(r=e.input.charCodeAt(e.position+1))||n&&y(r))break}else if(35===u){if(v(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&L(e)||n&&y(u))break;if(m(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,R(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(k(e,i,o,!1),I(e,e.line-s),i=o=e.position,a=!1),g(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return k(e,i,o,!1),!!e.result||(e.kind=d,e.result=h,!1)}(e,p,1===n)&&(S=!0,null===e.tag&&(e.tag="?")):(S=!0,null===e.tag&&null===e.anchor||D(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===E&&(S=c&&P(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(u=0,d=e.implicitTypes.length;u tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result)?(e.result=h.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):D(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):D(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||S}function j(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(R(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&D(e,"directive name must not be less than one character in length");0!==i;){for(;g(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&N(e),l.call(F,n)?F[n](e,n,r):T(e,'unknown document directive "'+n+'"')}R(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,R(e,!0,-1)):a&&D(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),R(e,!0,-1),e.checkLineBreaks&&u.test(e.input.slice(o,e.position))&&T(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&L(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,R(e,!0,-1)):e.position0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=i},function(e,t,n){"use strict";var r=n(24);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(24);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(24);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(24);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(24);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(65),i=n(24);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(65),i=n(24),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,i;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,r=1,i.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(24),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,l,c,u,d=0,h=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],c=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(h=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(h=-h)),u=new Date(Date.UTC(n,r,a,s,l,c,d)),h&&u.setTime(u.getTime()-h),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(24);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(235).Buffer}catch(a){}var i=n(24),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=o;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),a=i.length,s=o,l=0,c=[];for(t=0;t>16&255),c.push(l>>8&255),c.push(255&l)),l=l<<6|s.indexOf(i.charAt(t));return 0===(n=a%4*6)?(c.push(l>>16&255),c.push(l>>8&255),c.push(255&l)):18===n?(c.push(l>>10&255),c.push(l>>2&255)):12===n&&c.push(l>>4&255),r?r.from?r.from(c):new r(c):c},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",i=0,a=e.length,s=o;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return 0===(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,d=s>0?a-4:a;for(n=0;n>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=f,s/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,c-=8);e[n+p-f]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(24),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],c=e;for(t=0,n=c.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(521)}catch(o){"undefined"!==typeof window&&(r=window.esprima)}var i=n(24);e.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(i){return!1}},construct:function(e){var t,n="("+e+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"===typeof n?s:null,c=!1;if(t){c="boolean"===typeof t.comment&&t.comment;var u="boolean"===typeof t.attachComment&&t.attachComment;(c||u)&&((a=new r.CommentHandler).attach=u,t.comment=!0,l=s)}var d,h=!1;t&&"string"===typeof t.sourceType&&(h="module"===t.sourceType),d=t&&"boolean"===typeof t.jsx&&t.jsx?new i.JSXParser(e,t,l):new o.Parser(e,t,l);var p=h?d.parseModule():d.parseScript();return c&&a&&(p.comments=a.comments),d.config.tokens&&(p.tokens=d.tokens),d.config.tolerant&&(p.errors=d.errorHandler.errors),p}t.parse=s,t.parseModule=function(e,t,n){var r=t||{};return r.sourceType="module",s(e,r,n)},t.parseScript=function(e,t,n){var r=t||{};return r.sourceType="script",s(e,r,n)},t.tokenize=function(e,t,n){var r,i=new a.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(s){i.errorHandler.tolerate(s)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&((o=this.stack[this.stack.length-1])&&o.start>=e.start.offset);)t=o.node,this.stack.pop();if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(5),a=n(6),s=n(7),l=n(8),c=n(13),u=n(14);function d(e){var t;switch(e.type){case a.JSXSyntax.JSXIdentifier:t=e.name;break;case a.JSXSyntax.JSXNamespacedName:var n=e;t=d(n.namespace)+":"+d(n.name);break;case a.JSXSyntax.JSXMemberExpression:var r=e;t=d(r.object)+"."+d(r.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var h=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,o=!1,a=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:o="#"===s;break;case 3:o&&(n=(a="x"===s)||i.Character.isDecimalDigit(s.charCodeAt(0)),o=o&&!a);break;default:n=(n=n&&!(o&&!i.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!i.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var l=t.substr(1,t.length-2);o&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):o||a||!u.XHTMLEntities[l]||(t=u.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],r="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)r+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var o=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===o&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(i.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(i.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,i.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new o.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var a=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXMemberExpression(i,a))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new s.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new o.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new o.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new o.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new o.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;s=this.finalize(e.node,new o.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(s),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new o.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(l.Parser);t.JSXParser=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\u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00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\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F57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=i;var o=function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=o;var a=function(){this.type=r.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var l=function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=l;var c=function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=c;var u=function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=u;var d=function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=d;var h=function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=h;var p=function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=p;var f=function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(e){this.type=r.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=i;var o=function(e){this.type=r.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var l=function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=l;var c=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=c;var u=function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=u;var d=function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=d;var h=function(e){this.type=r.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=h;var p=function(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=p;var f=function(e){this.type=r.Syntax.BlockStatement,this.body=e};t.BlockStatement=f;var m=function(e){this.type=r.Syntax.BreakStatement,this.label=e};t.BreakStatement=m;var g=function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var v=function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=v;var y=function(e){this.type=r.Syntax.ClassBody,this.body=e};t.ClassBody=y;var b=function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var E=function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=E;var C=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=C;var w=function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=w;var A=function(e){this.type=r.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=A;var x=function(){this.type=r.Syntax.DebuggerStatement};t.DebuggerStatement=x;var S=function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=S;var _=function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=_;var D=function(){this.type=r.Syntax.EmptyStatement};t.EmptyStatement=D;var T=function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var F=function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=F;var k=function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=k;var O=function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=O;var M=function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=M;var N=function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=N;var R=function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=R;var L=function(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i};t.ForStatement=L;var I=function(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionDeclaration=I;var P=function(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionExpression=P;var B=function(e){this.type=r.Syntax.Identifier,this.name=e};t.Identifier=B;var $=function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=$;var U=function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=U;var j=function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=j;var H=function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=H;var W=function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=W;var G=function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=G;var z=function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t};t.Literal=z;var V=function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=V;var q=function(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o};t.MethodDefinition=q;var K=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=K;var Y=function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=Y;var X=function(e){this.type=r.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=X;var Q=function(e){this.type=r.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=Q;var J=function(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a};t.Property=J;var Z=function(e,t,n,i){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:i}};t.RegexLiteral=Z;var ee=function(e){this.type=r.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=r.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var re=function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=re;var ie=function(e){this.type=r.Syntax.SpreadElement,this.argument=e};t.SpreadElement=ie;var oe=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=r.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var le=function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=le;var ce=function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=ce;var ue=function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ue;var de=function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=de;var he=function(){this.type=r.Syntax.ThisExpression};t.ThisExpression=he;var pe=function(e){this.type=r.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=pe;var fe=function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=fe;var me=function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=me;var ge=function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ve=function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ve;var ye=function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ye;var be=function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var Ee=function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=Ee;var Ce=function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=Ce},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=n(11),a=n(7),s=n(12),l=n(2),c=n(13),u=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"===typeof t.range&&t.range,loc:"boolean"===typeof t.loc&&t.loc,source:null,tokens:"boolean"===typeof t.tokens&&t.tokens,comment:"boolean"===typeof t.comment&&t.comment,tolerant:"boolean"===typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,s=null,l=!1,c=!1,u=!1,d=!1;if(3===r.type){var h=r.value;this.nextToken(),l=this.match("["),i=(d=!this.hasLineTerminator&&"async"===h&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(h))}else this.match("*")?this.nextToken():(l=this.match("["),i=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!d&&"get"===r.value&&p)t="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===r.type&&!d&&"set"===r.value&&p)t="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&p)t="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),c=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!d)!l&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0;else if(3===r.type)if(h=this.finalize(n,new a.Identifier(r.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var f=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(h,f))}else u=!0,s=h;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,i,l,s,c,u))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(o=0;o")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[o,n.value,s],c=[r];!((r=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&r<=c[c.length-1];){s=l.pop();var u=l.pop();c.pop(),o=l.pop(),i.pop();var d=this.startNode(i[i.length-1]);l.push(this.finalize(d,new a.BinaryExpression(u,o,s)))}l.push(this.nextToken().value),c.push(r),i.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=l.length-1;t=l[h];for(var p=i.pop();h>1;){var f=i.pop(),m=p&&p.lineStart;d=this.startNode(f,m),u=l[h-1],t=this.finalize(d,new a.BinaryExpression(u,l[h-2],t)),h-=2,p=f}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,u=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,h=this.context.await;this.context.allowYield=!0,this.context.await=i;var p=this.startNode(t);this.expect("=>");var f=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=m}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var g=f.type!==l.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=i?this.finalize(p,new a.AsyncArrowFunctionExpression(s.params,f,g)):this.finalize(p,new a.ArrowFunctionExpression(s.params,f,g)),this.context.strict=c,this.context.allowStrictDirective=u,this.context.allowYield=d,this.context.await=h}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var v=e;this.scanner.isRestrictedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var y=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(y,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(i,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var c=this.finalize(i,new a.Identifier(l.value));if(this.match("=")){e.push(l),s=!0,this.nextToken();var u=this.parseAssignmentExpression();r=this.finalize(this.startNode(l),new a.AssignmentPattern(c,u))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(l),s=!0,r=c)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new a.Property("init",n,o,r,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new a.AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,s=null,c=!0,u=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var d=this.context.allowIn;this.context.allowIn=!1;var h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=d,1===h.length&&this.matchKeyword("in")){var p=h[0];p.init&&(p.id.type===l.Syntax.ArrayPattern||p.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new a.VariableDeclaration(h,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(h,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,c=!1):(r=this.finalize(r,new a.VariableDeclaration(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var f=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(d=this.context.allowIn,this.context.allowIn=!1,h=this.parseBindingList(f,{inFor:!0}),this.context.allowIn=d,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new a.VariableDeclaration(h,f)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(h,f)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,c=!1):(this.consumeSemicolon(),r=this.finalize(r,new a.VariableDeclaration(h,f)))):(r=this.finalize(r,new a.Identifier(f)),this.nextToken(),e=r,t=this.parseExpression(),r=null)}else{var m=this.lookahead;if(d=this.context.allowIn,this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=d,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,c=!1;else{if(this.match(",")){for(var g=[r];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(m),new a.SequenceExpression(g))}this.expect(";")}}if("undefined"===typeof e&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return"undefined"===typeof e?this.finalize(u,new a.ForStatement(r,i,s,n)):c?this.finalize(u,new a.ForInStatement(e,t,n)):this.finalize(u,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),r.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,u=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,o.Messages.StrictFunction):u.generator&&this.tolerateUnexpectedToken(c,o.Messages.GeneratorInLegacyContext),s=u}else s=this.parseStatement();delete this.context.labelSet[i],e=new a.LabeledStatement(r,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(o.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,s=null,l=!1,c=!1,u=!1,d=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,u=!0,l=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var h=this.lookahead.value;":"!==h&&"("!==h&&"*"!==h&&(d=!0,t=this.lookahead,i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(r="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&p&&(r="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(r="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),c=!0),!r&&i&&this.match("(")&&(r="init",s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),l||(u&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!u&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!c||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new a.MethodDefinition(i,l,s,r,u))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],l=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):c?(r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(r,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,l))}return e},e}();t.Parser=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(r){Object.create&&Object.defineProperty&&(n=Object.create(r),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},r.push(a)),r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(n))++this.index;else if(i.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2,r=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,r=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,r=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r1114111||"}"!==e)&&this.throwUnexpectedToken(),i.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!i.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=i.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),i.Character.isIdentifierPart(t));)n+=e=i.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!==(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(t)||i.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(i.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&r.throwUnexpectedToken(o.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"\uffff"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(n)}catch(i){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(a){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];r.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],i.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(i.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!i.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r;n=55296&&e<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),i=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"===typeof t.tolerant&&t.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"===typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"===typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"===typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;tr&&" "!==e[d+1],d=o);else if(!g(a))return 5;h=h&&v(a)}c=c||u&&o-d-1>r&&" "!==e[d+1]}return l||c?n>9&&y(e)?5:c?4:3:h&&!i(e)?1:2}function E(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==u.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+C(t,e.indent)+w(p(function(e,t){var n,r,i=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=-1!==n?n:e.length,i.lastIndex=n,A(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];for(;r=i.exec(e);){var s=r[1],l=r[2];n=" "===l[0],o+=s+(a||n||""===l?"":"\n")+A(l,t),a=n}return o}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;o=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(i+=d(1024*(t-55296)+n-56320+65536),o++):(r=c[t],i+=!r&&g(t)?e[o]:r||d(t));return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function C(e,t){var n=y(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function w(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function A(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function x(e,t,n){var r,o,a,c,u,d;for(a=0,c=(o=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+d+'" style');r=u.represent[d](t,d)}e.dump=r}return!0}return!1}function S(e,t,n,r,o,a){e.tag=null,e.dump=n,x(e,n,!1)||x(e,n,!0);var l=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var c,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(c=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(o=!1),u&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(d&&u&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,a,s,l,c,u,d="",h=e.tag,p=Object.keys(n);if(!0===e.sortKeys)p.sort();else if("function"===typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=p.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=f(e,t)),S(e,t+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",d+=u+=e.dump));e.tag=h,e.dump=d||"{}"}(e,t,e.dump,o),u&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,n){var r,i,o,a,s,l="",c=e.tag,u=Object.keys(n);for(r=0,i=u.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),S(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),u&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===l){var h=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(!function(e,t,n,r){var i,o,a="",s=e.tag;for(i=0,o=n.length;i "+e.dump)}return!0}function _(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"===typeof t)if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o-1&&this.props.notifications.reverse(),e=this.props.notifications.map((function(e){return r.createElement(a,{ref:"notification-"+e.uid,key:e.uid,notification:e,getStyles:t.props.getStyles,onRemove:t.props.onRemove,noAnimation:t.props.noAnimation,allowHTML:t.props.allowHTML,children:t.props.children})})),r.createElement("div",{className:"notifications-"+this.props.position,style:this._style},e)}});e.exports=l},function(e,t,n){var r=n(0),i=n(79),o=n(10),a=n(21),s=n(151),l=n(526),c=n(18),u=function(){var e,t=document.createElement("fakeelement"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};return Object.keys(n).forEach((function(r){void 0!==t.style[r]&&(e=n[r])})),e},d=i({propTypes:{notification:o.object,getStyles:o.object,onRemove:o.func,allowHTML:o.bool,noAnimation:o.bool,children:o.oneOfType([o.string,o.element])},getDefaultProps:function(){return{noAnimation:!1,onRemove:function(){},allowHTML:!1}},getInitialState:function(){return{visible:void 0,removed:!1}},componentWillMount:function(){var e=this.props.getStyles,t=this.props.notification.level,n=this.props.notification.dismissible;this._noAnimation=this.props.noAnimation,this._styles={notification:e.byElement("notification")(t),title:e.byElement("title")(t),dismiss:e.byElement("dismiss")(t),messageWrapper:e.byElement("messageWrapper")(t),actionWrapper:e.byElement("actionWrapper")(t),action:e.byElement("action")(t)},n&&"none"!==n&&"button"!==n||(this._styles.notification.cursor="default")},_styles:{},_notificationTimer:null,_height:0,_noAnimation:null,_isMounted:!1,_removeCount:0,_getCssPropertyByPosition:function(){var e={};switch(this.props.notification.position){case s.positions.tl:case s.positions.bl:e={property:"left",value:-200};break;case s.positions.tr:case s.positions.br:e={property:"right",value:-200};break;case s.positions.tc:e={property:"top",value:-100};break;case s.positions.bc:e={property:"bottom",value:-100}}return e},_defaultAction:function(e){var t=this.props.notification;e.preventDefault(),this._hideNotification(),"function"===typeof t.action.callback&&t.action.callback()},_hideNotification:function(){this._notificationTimer&&this._notificationTimer.clear(),this._isMounted&&this.setState({visible:!1,removed:!0}),this._noAnimation&&this._removeNotification()},_removeNotification:function(){this.props.onRemove(this.props.notification.uid)},_dismiss:function(){this.props.notification.dismissible&&this._hideNotification()},_showNotification:function(){var e=this;setTimeout((function(){e._isMounted&&e.setState({visible:!0})}),50)},_onTransitionEnd:function(){this._removeCount>0||this.state.removed&&(this._removeCount+=1,this._removeNotification())},componentDidMount:function(){var e=this,t=u(),n=this.props.notification,r=a.findDOMNode(this);this._height=r.offsetHeight,this._isMounted=!0,this._noAnimation||(t?r.addEventListener(t,this._onTransitionEnd):this._noAnimation=!0),n.autoDismiss&&(this._notificationTimer=new l.Timer((function(){e._hideNotification()}),1e3*n.autoDismiss)),this._showNotification()},_handleMouseEnter:function(){this.props.notification.autoDismiss&&this._notificationTimer.pause()},_handleMouseLeave:function(){this.props.notification.autoDismiss&&this._notificationTimer.resume()},_handleNotificationClick:function(){var e=this.props.notification.dismissible;"both"!==e&&"click"!==e&&!0!==e||this._dismiss()},componentWillUnmount:function(){var e=a.findDOMNode(this),t=u();e.removeEventListener(t,this._onTransitionEnd),this._isMounted=!1},_allowHTML:function(e){return{__html:e}},render:function(){var e=this.props.notification,t="notification notification-"+e.level,n=c({},this._styles.notification),i=this._getCssPropertyByPosition(),o=null,a=null,s=null,l=null;return this.state.visible?t+=" notification-visible":!1===this.state.visible&&(t+=" notification-hidden"),"none"===e.dismissible&&(t+=" notification-not-dismissible"),this.props.getStyles.overrideStyle&&(this.state.visible||this.state.removed||(n[i.property]=i.value),this.state.visible&&!this.state.removed&&(n.height=this._height,n[i.property]=0),this.state.removed&&(n.overlay="hidden",n.height=0,n.marginTop=0,n.paddingTop=0,n.paddingBottom=0),n.opacity=this.state.visible?this._styles.notification.isVisible.opacity:this._styles.notification.isHidden.opacity),e.title&&(s=r.createElement("h4",{className:"notification-title",style:this._styles.title},e.title)),e.message&&(l=this.props.allowHTML?r.createElement("div",{className:"notification-message",style:this._styles.messageWrapper,dangerouslySetInnerHTML:this._allowHTML(e.message)}):r.createElement("div",{className:"notification-message",style:this._styles.messageWrapper},e.message)),"both"!==e.dismissible&&"button"!==e.dismissible&&!0!==e.dismissible||(o=r.createElement("span",{className:"notification-dismiss",onClick:this._dismiss,style:this._styles.dismiss},"\xd7")),e.action&&(a=r.createElement("div",{className:"notification-action-wrapper",style:this._styles.actionWrapper},r.createElement("button",{className:"notification-action-button",onClick:this._defaultAction,style:this._styles.action},e.action.label))),e.children&&(a=e.children),r.createElement("div",{className:t,onClick:this._handleNotificationClick,onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave,style:n},s,l,o,a)}});e.exports=d},function(e,t){var n={Timer:function(e,t){var n,r,i=t;this.pause=function(){clearTimeout(n),i-=new Date-r},this.resume=function(){r=new Date,clearTimeout(n),n=setTimeout(e,i)},this.clear=function(){clearTimeout(n)},this.resume()}};e.exports=n},function(e,t){var n={rgb:"94, 164, 0",hex:"#5ea400"},r={rgb:"236, 61, 61",hex:"#ec3d3d"},i={rgb:"235, 173, 23",hex:"#ebad1a"},o={rgb:"54, 156, 199",hex:"#369cc7"},a={Wrapper:{},Containers:{DefaultStyle:{fontFamily:"inherit",position:"fixed",width:320,padding:"0 10px 10px 10px",zIndex:9998,WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",height:"auto"},tl:{top:"0px",bottom:"auto",left:"0px",right:"auto"},tr:{top:"0px",bottom:"auto",left:"auto",right:"0px"},tc:{top:"0px",bottom:"auto",margin:"0 auto",left:"50%",marginLeft:-160},bl:{top:"auto",bottom:"0px",left:"0px",right:"auto"},br:{top:"auto",bottom:"0px",left:"auto",right:"0px"},bc:{top:"auto",bottom:"0px",margin:"0 auto",left:"50%",marginLeft:-160}},NotificationItem:{DefaultStyle:{position:"relative",width:"100%",cursor:"pointer",borderRadius:"2px",fontSize:"13px",margin:"10px 0 0",padding:"10px",display:"block",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",opacity:0,transition:"0.3s ease-in-out",WebkitTransform:"translate3d(0, 0, 0)",transform:"translate3d(0, 0, 0)",willChange:"transform, opacity",isHidden:{opacity:0},isVisible:{opacity:1}},success:{borderTop:"2px solid "+n.hex,backgroundColor:"#f0f5ea",color:"#4b583a",WebkitBoxShadow:"0 0 1px rgba("+n.rgb+",0.9)",MozBoxShadow:"0 0 1px rgba("+n.rgb+",0.9)",boxShadow:"0 0 1px rgba("+n.rgb+",0.9)"},error:{borderTop:"2px solid "+r.hex,backgroundColor:"#f4e9e9",color:"#412f2f",WebkitBoxShadow:"0 0 1px rgba("+r.rgb+",0.9)",MozBoxShadow:"0 0 1px rgba("+r.rgb+",0.9)",boxShadow:"0 0 1px rgba("+r.rgb+",0.9)"},warning:{borderTop:"2px solid "+i.hex,backgroundColor:"#f9f6f0",color:"#5a5343",WebkitBoxShadow:"0 0 1px rgba("+i.rgb+",0.9)",MozBoxShadow:"0 0 1px rgba("+i.rgb+",0.9)",boxShadow:"0 0 1px rgba("+i.rgb+",0.9)"},info:{borderTop:"2px solid "+o.hex,backgroundColor:"#e8f0f4",color:"#41555d",WebkitBoxShadow:"0 0 1px rgba("+o.rgb+",0.9)",MozBoxShadow:"0 0 1px rgba("+o.rgb+",0.9)",boxShadow:"0 0 1px rgba("+o.rgb+",0.9)"}},Title:{DefaultStyle:{fontSize:"14px",margin:"0 0 5px 0",padding:0,fontWeight:"bold"},success:{color:n.hex},error:{color:r.hex},warning:{color:i.hex},info:{color:o.hex}},MessageWrapper:{DefaultStyle:{margin:0,padding:0}},Dismiss:{DefaultStyle:{cursor:"pointer",fontFamily:"Arial",fontSize:"17px",position:"absolute",top:"4px",right:"5px",lineHeight:"15px",backgroundColor:"#dededf",color:"#ffffff",borderRadius:"50%",width:"14px",height:"14px",fontWeight:"bold",textAlign:"center"},success:{color:"#f0f5ea",backgroundColor:"#b0ca92"},error:{color:"#f4e9e9",backgroundColor:"#e4bebe"},warning:{color:"#f9f6f0",backgroundColor:"#e1cfac"},info:{color:"#e8f0f4",backgroundColor:"#a4becb"}},Action:{DefaultStyle:{background:"#ffffff",borderRadius:"2px",padding:"6px 20px",fontWeight:"bold",margin:"10px 0 0 0",border:0},success:{backgroundColor:n.hex,color:"#ffffff"},error:{backgroundColor:r.hex,color:"#ffffff"},warning:{backgroundColor:i.hex,color:"#ffffff"},info:{backgroundColor:o.hex,color:"#ffffff"}},ActionWrapper:{DefaultStyle:{margin:0,padding:0}}};e.exports=a},function(e,t,n){var r=n(529),i=n(559),o=n(240),a=n(561),s=n(571),l=n(574),c=n(575),u=n(576),d=n(578),h=n(579),p=n(580),f=n(161),m=n(585),g=n(586),v=n(592),y=n(155),b=n(243),E=n(594),C=n(80),w=n(596),A=n(154),x=n(159),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,_,D,T,F){var k,O=1&n,M=2&n,N=4&n;if(_&&(k=T?_(t,D,T,F):_(t)),void 0!==k)return k;if(!C(t))return t;var R=y(t);if(R){if(k=m(t),!O)return c(t,k)}else{var L=f(t),I="[object Function]"==L||"[object GeneratorFunction]"==L;if(b(t))return l(t,O);if("[object Object]"==L||"[object Arguments]"==L||I&&!T){if(k=M||I?{}:v(t),!O)return M?d(t,s(k,t)):u(t,a(k,t))}else{if(!S[L])return T?t:{};k=g(t,L,O)}}F||(F=new r);var P=F.get(t);if(P)return P;F.set(t,k),w(t)?t.forEach((function(r){k.add(e(r,n,_,r,t,F))})):E(t)&&t.forEach((function(r,i){k.set(i,e(r,n,_,i,t,F))}));var B=R?void 0:(N?M?p:h:M?x:A)(t);return i(B||t,(function(r,i){B&&(r=t[i=r]),o(k,i,e(r,n,_,i,t,F))})),k}},function(e,t,n){var r=n(100),i=n(535),o=n(536),a=n(537),s=n(538),l=n(539);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(101),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(101);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(101);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(101);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(100);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(100),i=n(152),o=n(546);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(237),i=n(543),o=n(80),a=n(239),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:s).test(a(e))}},function(e,t,n){var r=n(153),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(544),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(37)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(547),i=n(554),o=n(556),a=n(557),s=n(558);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e>",u=l||r;if(null!=n[r]){var d=i+"."+r;(0,o.default)(a[d],"The "+s+" `"+u+"` of `"+c+"` is deprecated. "+t+"."),a[d]=!0}for(var h=arguments.length,p=Array(h>5?h-5:0),f=5;f1?t-1:0),r=1;ri.indexOf(r)?"top":"bottom":c!==a&&(s=N.default.gt(a,c)?"left":"right"),{view:r,slideDirection:s,messages:(0,D.getMessages)(n),currentDate:a||o||new Date}};var i=r.prototype;return i.componentDidUpdate=function(e){var t=this.props,n=t.value,r=t.min,i=t.max,o=this.state.view;n=K(n,r,i),N.default.eq(n,Q(e.value),H[o])||this.maybeSetCurrentDate(n)},i.render=function(){var e,t=this.props,n=t.className,i=t.value,o=t.footerFormat,a=t.disabled,s=t.readOnly,l=t.footer,c=t.views,u=t.min,d=t.max,h=t.culture,f=t.tabIndex,m=this.state,v=m.currentDate,y=m.view,b=m.slideDirection,A=m.focused,x=m.messages,S=G[y],_=new Date,D=!N.default.inRange(_,u,d,y),T=y+"_"+N.default[y](v),F=M.pickElementProps(this),k=M.pick(this.props,S),O=a||s;return p.default.createElement(E.default,B({},F,{role:"group",focused:A,disabled:a,readOnly:s,tabIndex:f||0,onKeyDown:this.handleKeyDown,onBlur:this.focusManager.handleBlur,onFocus:this.focusManager.handleFocus,className:(0,g.default)(n,"rw-calendar rw-widget-container"),"aria-activedescendant":this.activeId}),p.default.createElement(C.default,{isRtl:this.isRtl(),label:this.getHeaderLabel(),labelId:this.labelId,messages:x,upDisabled:O||y===(e=c,e[e.length-1]),prevDisabled:O||!N.default.inRange(this.nextDate("LEFT"),u,d,y),nextDisabled:O||!N.default.inRange(this.nextDate("RIGHT"),u,d,y),onViewChange:this.handleViewChange,onMoveLeft:this.handleMoveBack,onMoveRight:this.handleMoveForward}),p.default.createElement(r.Transition,{direction:b},p.default.createElement(S,B({},k,{key:T,id:this.viewId,activeId:this.activeId,value:i,today:_,disabled:a,focused:v,onChange:this.handleChange,onKeyDown:this.handleKeyDown,"aria-labelledby":this.labelId}))),l&&p.default.createElement(w.default,{value:_,format:o,culture:h,disabled:a||D,readOnly:s,onClick:this.handleFooterClick}))},i.navigate=function(e,t){var n=this.props,r=n.views,i=n.min,o=n.max,a=n.onNavigate,s=n.onViewChange,l=this.state,c=l.view,u=l.currentDate,d="LEFT"===e||"UP"===e?"right":"left";"UP"===e&&(c=r[r.indexOf(c)+1]||c),"DOWN"===e&&(c=r[r.indexOf(c)-1]||c),t||(t=-1!==["LEFT","RIGHT"].indexOf(e)?this.nextDate(e):u),N.default.inRange(t,i,o,c)&&((0,R.notify)(a,[t,d,c]),this.focus(!0),this.maybeSetCurrentDate(t),(0,R.notify)(s,[c]))},i.focus=function(){+this.props.tabIndex>-1&&(0,f.findDOMNode)(this).focus()},i.maybeSetCurrentDate=function(e){var t=this.props,n=t.min,r=t.max,i=this.state,o=i.view,a=i.currentDate,s=K(e?new Date(e):a,n,r);e===a||N.default.eq(s,Q(a),H[o])||(0,R.notify)(this.props.onCurrentDateChange,s)},i.nextDate=function(e){var t="LEFT"===e?"subtract":"add",n=this.state,r=n.currentDate,i=n.view,o="month"===i?i:"year",a=q[i]||1;return N.default[t](r,1*a,o)},i.getHeaderLabel=function(){var e=this.props,t=e.culture,n=e.decadeFormat,r=e.yearFormat,i=e.headerFormat,o=e.centuryFormat,a=this.state,s=a.currentDate;switch(a.view){case"month":return i=k.date.getFormat("header",i),k.date.format(s,i,t);case"year":return r=k.date.getFormat("year",r),k.date.format(s,r,t);case"decade":return n=k.date.getFormat("decade",n),k.date.format(N.default.startOf(s,"decade"),n,t);case"century":return o=k.date.getFormat("century",o),k.date.format(N.default.startOf(s,"century"),o,t)}},i.isRtl=function(){return!!(this.props.isRtl||this.context&&this.context.isRtl)},i.isValidView=function(e,t){return void 0===t&&(t=this.props.views),-1!==t.indexOf(e)},r}(p.default.Component),d.displayName="Calendar",d.propTypes=Y,d.defaultProps={value:null,min:new Date(1900,0,1),max:new Date(2099,11,31),views:W,tabIndex:"0",footer:!0},d.contextTypes={isRtl:m.default.bool},d.Transition=T.default,o=j((i=h).prototype,"handleViewChange",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(){e.navigate("UP")}}}),a=j(i.prototype,"handleMoveBack",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(){e.navigate("LEFT")}}}),s=j(i.prototype,"handleMoveForward",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(){e.navigate("RIGHT")}}}),l=j(i.prototype,"handleChange",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t){var n=e.props,r=n.views,i=n.onChange,o=e.state.view;if(r[0]===o)return e.maybeSetCurrentDate(t),(0,R.notify)(i,t),void e.focus();e.navigate("DOWN",t)}}}),c=j(i.prototype,"handleFooterClick",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t){var n=e.props,r=n.views,i=n.min,o=n.max,a=n.onViewChange,s=r[0];(0,R.notify)(e.props.onChange,t),N.default.inRange(t,i,o,s)&&(e.focus(),e.maybeSetCurrentDate(t),(0,R.notify)(a,[s]))}}}),u=j(i.prototype,"handleKeyDown",[L.widgetEditable],{enumerable:!0,initializer:function(){var e=this;return function(t){var n=e.state,r=n.currentDate,i=n.view,o=t.ctrlKey||t.metaKey,a=t.key,s=z[a],l=H[i];if("Enter"===a)return t.preventDefault(),e.handleChange(r);if(s)if(o)t.preventDefault(),e.navigate(s);else{e.isRtl()&&V[s]&&(s=V[s]);var c=X.move(r,e.props.min,e.props.max,i,s);N.default.eq(r,c,l)||(t.preventDefault(),N.default.gt(c,r,i)?e.navigate("RIGHT",c):N.default.lt(c,r,i)?e.navigate("LEFT",c):e.maybeSetCurrentDate(c))}(0,R.notify)(e.props.onKeyDown,[t])}}}),r=i))||r;function Q(e){return e&&!isNaN(e.getTime())?e:null}var J=(0,v.default)(X,{value:"onChange",currentDate:"onCurrentDateChange",view:"onViewChange"},["focus"]);t.default=J,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){(0,a.default)(e,{componentDidMount:function(){this.props.autoFocus&&(this.focus?this.focus():(0,o.findDOMNode)(this).focus())}})},t.PropTypes=void 0;var r,i=n(10),o=n(21),a=(r=n(110))&&r.__esModule?r:{default:r};var s={autoFocus:i.bool};t.PropTypes=s},function(e,t,n){"use strict";t.__esModule=!0,t.callFocusEventHandler=function(e,t,n){var r=e.props[t?"onFocus":"onBlur"];r&&r(n)},t.default=function(e,t){var n,a=void 0===t?{}:t,s=a.willHandle,l=a.didHandle,c=a.onChange,u=a.isDisabled,d=void 0===u?function(){return!!e.props.disabled}:u,h=(0,i.default)(e),p=(0,o.default)(e);function f(t,i){i&&i.persist&&i.persist(),s&&!1===s(t,i)||h.set("focus",(function(){(0,r.unstable_batchedUpdates)((function(){t!==n&&(l&&l.call(e,t,i),!p()&&t||(n=t,c&&c(t,i)))}))}))}return{handleBlur:function(e){d()||f(!1,e)},handleFocus:function(e){d()||f(!0,e)}}};var r=n(21),i=a(n(265)),o=a(n(167));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,["propTypes","contextTypes","childContextTypes","getChildContext"]);if(n&&(e.propTypes=r({},e.propTypes,n)),i&&(e.contextTypes=r({},e.contextTypes,i)),o&&(e.childContextTypes=r({},e.childContextTypes,o)),a){var l=e.prototype.getChildContext;e.prototype.getChildContext=function(){return r({},l&&l.call(this),a.call(this))}}return r(e.prototype,s),e}t.__esModule=!0,t.mixin=i,t.default=function(e){return function(t){return i(t,e)}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),i=s(n(10)),o=s(n(108)),a=n(168);function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=this.props,t=e.messages,n=e.label,i=e.labelId,s=e.onMoveRight,l=e.onMoveLeft,c=e.onViewChange,u=e.prevDisabled,d=e.upDisabled,h=e.nextDisabled,p=e.navigatePrevIcon,f=void 0===p?a.chevronLeft:p,m=e.navigateNextIcon,g=void 0===m?a.chevronRight:m,v=e.isRtl;return r.default.createElement("div",{className:"rw-calendar-header"},r.default.createElement(o.default,{className:"rw-calendar-btn-left",onClick:l,disabled:u,label:t.moveBack(),icon:v?g:f}),r.default.createElement(o.default,{id:i,onClick:c,className:"rw-calendar-btn-view",disabled:d,"aria-live":"polite","aria-atomic":"true"},n),r.default.createElement(o.default,{className:"rw-calendar-btn-right",onClick:s,disabled:h,label:t.moveForward(),icon:v?f:g}))},i}(r.default.Component);l.propTypes={label:i.default.string.isRequired,labelId:i.default.string,upDisabled:i.default.bool.isRequired,prevDisabled:i.default.bool.isRequired,nextDisabled:i.default.bool.isRequired,onViewChange:i.default.func.isRequired,onMoveLeft:i.default.func.isRequired,onMoveRight:i.default.func.isRequired,navigatePrevIcon:i.default.node,navigateNextIcon:i.default.node,messages:i.default.shape({moveBack:i.default.func.isRequired,moveForward:i.default.func.isRequired}),isRtl:i.default.bool};var c=l;t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=u;var r=l(n(0)),i=l(n(10)),o=l(n(108)),a=n(30),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(29));function l(e){return e&&e.__esModule?e:{default:e}}var c={disabled:i.default.bool,readOnly:i.default.bool,value:i.default.instanceOf(Date),onClick:i.default.func.isRequired,culture:i.default.string,format:s.dateFormat};function u(e){var t=e.disabled,n=e.readOnly,i=e.value,s=e.onClick,l=e.culture,c=e.format;return r.default.createElement("div",{className:"rw-calendar-footer"},r.default.createElement(o.default,{disabled:!(!t&&!n),onClick:s.bind(null,i)},a.date.format(i,a.date.getFormat("footer",c),l)))}u.propTypes=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=p(n(17)),i=p(n(10)),o=p(n(0)),a=p(n(111)),s=p(n(47)),l=n(30),c=h(n(29)),u=n(53),d=h(n(33));function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function p(e){return e&&e.__esModule?e:{default:e}}function f(){return(f=Object.assign||function(e){for(var t=1;tt})),gte:o((function(e,t){return e>=t})),lt:o((function(e,t){return e=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["children"]),r=this.context.direction,i=p.default.Children.only(t);return p.default.createElement(h.default,b({},n,{timeout:5e3,addEndListener:this.handleTransitionEnd}),(function(e,t){return p.default.cloneElement(i,b({},t,{style:w[e],className:(0,o.default)(i.props.className,"rw-calendar-transition","rw-calendar-transition-"+r,A[e])}))}))},t}(p.default.Component);S.contextTypes={direction:C};var _=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i=0||(i[n]=e[n]);return i}(e,["component","childFactory"]),o=u(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:i.default.createElement(t,r,o)},r}(i.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var h=(0,o.polyfill)(d);t.default=h,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=i,t.mergeChildMappings=o,t.getInitialChildMapping=function(e,t){return i(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var s=i(e.children),l=o(t,s);return Object.keys(l).forEach((function(i){var o=l[i];if((0,r.isValidElement)(o)){var c=i in t,u=i in s,d=t[i],h=(0,r.isValidElement)(d)&&!d.props.in;!u||c&&!h?u||!c||h?u&&c&&(0,r.isValidElement)(d)&&(l[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:d.props.in,exit:a(o,"exit",e),enter:a(o,"enter",e)})):l[i]=(0,r.cloneElement)(o,{in:!1}):l[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:a(o,"exit",e),enter:a(o,"enter",e)})}})),l};var r=n(0);function i(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function o(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["className","disabled","readOnly","value","tabIndex","nodeRef","type","component"]);return r.default.createElement(p,s({},f,{type:d,ref:c,tabIndex:l||0,autoComplete:"off",disabled:n,readOnly:i,"aria-disabled":n,"aria-readonly":i,value:null==a?"":a,className:(0,o.default)(t,"rw-input")}))}l.propTypes={disabled:i.default.bool,readOnly:i.default.bool,value:i.default.string,type:i.default.string,tabIndex:i.default.string,component:i.default.any,nodeRef:i.default.func};var c=l;t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i,o,a=f(n(0)),s=n(51),l=f(n(10)),c=f(n(267)),u=f(n(47)),d=f(n(170)),h=n(30),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(29));function f(e){return e&&e.__esModule?e:{default:e}}function m(){return(m=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var v=function(e){return h.date.getFormat("time",e.format)},y={text:function(e){return e.label},value:function(e){return e.date}},b=function(e,t){for(var n=0;nu?u:f>r+p?f-p:r;var v=(0,l.default)((function(){return(0,s.default)(n,r)}));return function(){return l.default.cancel(v)}};var i=r(n(262)),o=r(n(106)),a=r(n(634)),s=r(n(635)),l=r(n(636)),c=r(n(107));e.exports=t.default},function(e,t,n){"use strict";var r=n(23);t.__esModule=!0,t.default=function(e){var t=(0,i.default)(e,"position"),n="absolute"===t,r=e.ownerDocument;if("fixed"===t)return r||document;for(;(e=e.parentNode)&&9!==e.nodeType;){var a=n&&"static"===(0,i.default)(e,"position"),s=(0,i.default)(e,"overflow")+(0,i.default)(e,"overflow-y")+(0,i.default)(e,"overflow-x");if(!a&&(/(auto|scroll)/.test(s)&&(0,o.default)(e)=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["searchTerm","onSelect","focused","children","activeId"]);return i.default.createElement(o.default,l({},u,{className:"rw-list-option-create"}),i.default.createElement(a.default,{onSelect:n,focused:r,activeId:c,dataItem:t},s))}u.propTypes=c;var d=u;t.default=d,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(0)),i=l(n(17)),o=l(n(10)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(29)),s=n(83);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),i=0;i0?d(document.body).add(this.props.bodyOpenClassName):d(document.body).remove(this.props.bodyOpenClassName),e.ariaHideApp&&c.toggle(e.isOpen,e.appElement),this.portal=h(this,l(p({},e,{defaultStyles:v.defaultStyles})),this.node)},render:function(){return o.noscript()}});v.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},e.exports=v},function(e,t,n){var r;!function(){"use strict";var i=!("undefined"===typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){n(0);var r=n(272),i=n(644),o=n(645),a=n(274),s=n(79),l=r.div,c={overlay:"ReactModal__Overlay",content:"ReactModal__Content"};e.exports=s({displayName:"ModalPortal",shouldClose:null,getDefaultProps:function(){return{style:{overlay:{},content:{}}}},getInitialState:function(){return{afterOpen:!1,beforeClose:!1}},componentDidMount:function(){this.props.isOpen&&(this.setFocusAfterRender(!0),this.open())},componentWillUnmount:function(){clearTimeout(this.closeTimer)},componentWillReceiveProps:function(e){!this.props.isOpen&&e.isOpen?(this.setFocusAfterRender(!0),this.open()):this.props.isOpen&&!e.isOpen&&this.close()},componentDidUpdate:function(){this.focusAfterRender&&(this.focusContent(),this.setFocusAfterRender(!1))},setFocusAfterRender:function(e){this.focusAfterRender=e},afterClose:function(){i.returnFocus(),i.teardownScopedFocus()},open:function(){this.state.afterOpen&&this.state.beforeClose?(clearTimeout(this.closeTimer),this.setState({beforeClose:!1})):(i.setupScopedFocus(this.node),i.markForFocusLater(),this.setState({isOpen:!0},function(){this.setState({afterOpen:!0}),this.props.isOpen&&this.props.onAfterOpen&&this.props.onAfterOpen()}.bind(this)))},close:function(){this.props.closeTimeoutMS>0?this.closeWithTimeout():this.closeWithoutTimeout()},focusContent:function(){this.contentHasFocus()||this.refs.content.focus()},closeWithTimeout:function(){var e=Date.now()+this.props.closeTimeoutMS;this.setState({beforeClose:!0,closesAt:e},function(){this.closeTimer=setTimeout(this.closeWithoutTimeout,this.state.closesAt-Date.now())}.bind(this))},closeWithoutTimeout:function(){this.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},this.afterClose)},handleKeyDown:function(e){9==e.keyCode&&o(this.refs.content,e),27==e.keyCode&&(e.preventDefault(),this.requestClose(e))},handleOverlayOnClick:function(e){null===this.shouldClose&&(this.shouldClose=!0),this.shouldClose&&this.props.shouldCloseOnOverlayClick&&(this.ownerHandlesClose()?this.requestClose(e):this.focusContent()),this.shouldClose=null},handleContentOnClick:function(){this.shouldClose=!1},requestClose:function(e){this.ownerHandlesClose()&&this.props.onRequestClose(e)},ownerHandlesClose:function(){return this.props.onRequestClose},shouldBeClosed:function(){return!this.state.isOpen&&!this.state.beforeClose},contentHasFocus:function(){return document.activeElement===this.refs.content||this.refs.content.contains(document.activeElement)},buildClassName:function(e,t){var n="object"===typeof t?t:{base:c[e],afterOpen:c[e]+"--after-open",beforeClose:c[e]+"--before-close"},r=n.base;return this.state.afterOpen&&(r+=" "+n.afterOpen),this.state.beforeClose&&(r+=" "+n.beforeClose),"string"===typeof t&&t?[r,t].join(" "):r},render:function(){var e=this.props.className?{}:this.props.defaultStyles.content,t=this.props.overlayClassName?{}:this.props.defaultStyles.overlay;return this.shouldBeClosed()?l():l({ref:"overlay",className:this.buildClassName("overlay",this.props.overlayClassName),style:a({},t,this.props.style.overlay||{}),onClick:this.handleOverlayOnClick},l({ref:"content",style:a({},e,this.props.style.content||{}),className:this.buildClassName("content",this.props.className),tabIndex:"-1",onKeyDown:this.handleKeyDown,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.props.children))}})},function(e,t,n){var r=n(273),i=[],o=null,a=!1;function s(e){a=!0}function l(e){if(a){if(a=!1,!o)return;setTimeout((function(){o.contains(document.activeElement)||(r(o)[0]||o).focus()}),0)}}t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(e=i.pop()).focus()}catch(t){console.warn("You tried to return focus to "+e+" but it is not in the DOM anymore")}},t.setupScopedFocus=function(e){o=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",l,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",l))},t.teardownScopedFocus=function(){o=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",l)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",l))}},function(e,t,n){var r=n(273);e.exports=function(e,t){var n=r(e);n.length?n[t.shiftKey?0:n.length-1]!==document.activeElement&&e!==document.activeElement||(t.preventDefault(),n[t.shiftKey?n.length-1:0].focus()):t.preventDefault()}},function(e,t){var n="undefined"!==typeof document?document.body:null;function r(e){o(e),(e||n).setAttribute("aria-hidden","true")}function i(e){o(e),(e||n).removeAttribute("aria-hidden")}function o(e){if(!e&&!n)throw new Error("react-modal: You must set an element with `Modal.setAppElement(el)` to make this accessible")}t.toggle=function(e,t){e?r(t):i(t)},t.setElement=function(e){if("string"===typeof e){var t=document.querySelectorAll(e);e="length"in t?t[0]:t}return n=e||n},t.show=i,t.hide=r,t.resetForTesting=function(){n=document.body}},function(e,t){var n=[];e.exports={add:function(e){-1===n.indexOf(e)&&n.push(e)},remove:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1)},count:function(){return n.length}}},function(e,t){function n(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n-1||(r.push(e),t.className=r.join(" ")),r}},r.prototype.remove=function(e){var t=this.el;if(t&&""!==t.className){var r=t.className.split(" "),i=n(r,e);return i>-1&&r.splice(i,1),t.className=r.join(" "),r}},r.prototype.has=function(e){var t=this.el;if(t)return n(t.className.split(" "),e)>-1},r.prototype.toggle=function(e){this.el&&(this.has(e)?this.remove(e):this.add(e))}},function(e,t,n){},function(e,t,n){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"===typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var o=i(e,t);if(void 0!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,l=t.length;s1&&s(l,"")>-1&&(n=RegExp(this.source,r.replace.call(a(this),"g","")),r.replace.call(e.slice(l.index),n,(function(){for(var e=1;el.index&&this.lastIndex--}return l},o||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,n){function r(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=h.call(arguments,1),i=function r(){if(this instanceof r){var i=t.apply(this,n.concat(h.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(h.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var i,o,a,s,l,c=Function.prototype.call,u=Array.prototype,d=Object.prototype,h=u.slice,p=c.bind(d.toString),f=c.bind(d.hasOwnProperty);if((l=f(d,"__defineGetter__"))&&(i=c.bind(d.__defineGetter__),o=c.bind(d.__defineSetter__),a=c.bind(d.__lookupGetter__),s=c.bind(d.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var m=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?m.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(h.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+ts)for(d=c;d--;)this[l+d]=this[s+d];if(o&&e===u)this.length=u,this.push.apply(this,i);else for(this.length=u+o,d=0;d>>0;if("[object Function]"!=p(e))throw new TypeError;for(;++i>>0,i=Array(r),o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,o=[],a=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0,i=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,i=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,o=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o++];break}if(++o>=r)throw new TypeError("reduce of empty array with no initial value")}for(;o>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,o=r-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(i=e.call(void 0,i,n[o],o,t))}while(o--);return i}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==p(this)?this.split(""):M(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=O(arguments[1])),r=r>=0?r:Math.max(0,n+r);r>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,O(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:d)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(f(e,t)){var n;if(n={enumerable:!0,configurable:!0},l){var r=e.__proto__;e.__proto__=d;var i=a(e,t),o=s(e,t);if(e.__proto__=r,i||o)return i&&(n.get=i),o&&(n.set=o),n}return n.value=e[t],n}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(g=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=g();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,(n=new r).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n});function E(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}if(Object.defineProperty){var C=E({}),w="undefined"==typeof document||E(document.createElement("div"));if(!C||!w)var A=Object.defineProperty}if(!Object.defineProperty||A){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(A)try{return A.call(Object,e,t,n)}catch(c){}if(f(n,"value"))if(l&&(a(e,t)||s(e,t))){var r=e.__proto__;e.__proto__=d,delete e[t],e[t]=n.value,e.__proto__=r}else e[t]=n.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");f(n,"get")&&i(e,t,n.get),f(n,"set")&&o(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)f(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(N){Object.freeze=(v=Object.freeze,function(e){return"function"==typeof e?e:v(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";f(e,t);)t+="?";e[t]=!0;var n=f(e,t);return delete e[t],n}),!Object.keys){var x=!0,S=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],_=S.length;for(var D in{toString:null})x=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)f(e,n)&&t.push(n);if(x)for(var r=0,i=_;r0||-1)*Math.floor(Math.abs(e))),e}var M=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")})),ace.define("ace/lib/dom",["require","exports","module"],(function(e,t,n){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(-1==r)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(-1==i)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if((t=t||document).createStyleSheet&&(n=t.styleSheets)){for(;r=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((i.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isTouchPad=i.indexOf("TouchPad")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./keys"),i=e("./useragent"),o=null,a=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,r){function i(e){n&&n(e),r&&r(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",i,!0),t.removeListener(document,"dragstart",i,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",i,!0),t.addListener(document,"dragstart",i,!0),i},t.addTouchMoveListener=function(e,n){var r,i;"ontouchmove"in e&&(t.addListener(e,"touchstart",(function(e){var t=e.changedTouches[0];r=t.clientX,i=t.clientY})),t.addListener(e,"touchmove",(function(e){var t=e.changedTouches[0];e.wheelX=-(t.clientX-r)/1,e.wheelY=-(t.clientY-i)/1,r=t.clientX,i=t.clientY,n(e)})))},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),n(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)}))},t.addMultiMouseDownListener=function(e,n,r,o){var a,s,l,c=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function d(e){if(0!==t.getButton(e)?c=0:e.detail>1?++c>4&&(c=1):c=1,i.isIE){var d=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-s)>5;l&&!d||(c=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[c-1]||600),1==c&&(a=e.clientX,s=e.clientY)}if(e._clicks=c,r[o]("mousedown",e),c>4)c=0;else if(c>1)return r[o](u[c],e)}function h(e){c=2,l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[c-1]||600),r[o]("mousedown",e),r[o](u[c],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",d),i.isOldIE&&t.addListener(e,"dblclick",h)}))};var s=i.isMac&&i.isOpera&&!("KeyboardEvent"in window)?function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)}:function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function l(e,t,n){var l=s(t);if(!i.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(l|=8),o.altGr){if(3==(3&l))return;o.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==o[n]&&(a=t.timeStamp);else if(18===n&&3===l&&2===c){t.timeStamp-a<50&&(o.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),8&l&&n>=91&&n<=93&&(n=-1),!l&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,l,-n),t.defaultPrevented)))return;if(i.isChromeOS&&8&l){if(e(t,l,n),t.defaultPrevented)return;l&=-9}return!!(l||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,l,n)}function c(){o=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[s(e)]},t.addCommandKeyListener=function(e,n){var r=t.addListener;if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var a=null;r(e,"keydown",(function(e){a=e.keyCode})),r(e,"keypress",(function(e){return l(n,e,a)}))}else{var s=null;r(e,"keydown",(function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=l(n,e,e.keyCode);return s=e.defaultPrevented,t})),r(e,"keypress",(function(e){s&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),s=null)})),r(e,"keyup",(function(e){o[e.keyCode]=null})),o||(c(),r(window,"focus",c))}},"object"==typeof window&&window.postMessage&&!i.isOldIE){t.nextTick=function(e,n){n=n||window;t.addListener(n,"message",(function r(i){"zero-timeout-message-1"==i.data&&(t.stopPropagation(i),t.removeListener(n,"message",r),e())})),n.postMessage("zero-timeout-message-1","*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n=53&&D()}},P=a.delayedCall(L,50);function B(){clearTimeout(N),N=setTimeout((function(){h&&(n.style.cssText=h,h=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),i.isOldIE?200:0)}r.addListener(n,"compositionstart",R),i.isGecko?r.addListener(n,"text",(function(){P.schedule()})):(r.addListener(n,"keyup",(function(){P.schedule()})),r.addListener(n,"keydown",(function(){P.schedule()}))),r.addListener(n,"compositionend",I),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){S=!0,v(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,a){if(a||!i.isOldIE){h||(h=n.style.cssText),n.style.cssText=(a?"z-index:100000;":"")+"height:"+n.style.height+";"+(i.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=s.top+(parseInt(l.borderTopWidth)||0),u=s.left+(parseInt(s.borderLeftWidth)||0),d=s.bottom-c-n.clientHeight-2,p=function(e){n.style.left=e.clientX-u-2+"px",n.style.top=Math.min(e.clientY-c-2,d)+"px"};p(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(N),i.isWin&&!i.isOldIE&&r.capture(t.container,p,B))}},this.onContextMenuClose=B;var $=function(e){t.textInput.onContextMenu(e),B()};r.addListener(n,"mouseup",$),r.addListener(n,"mousedown",(function(e){e.preventDefault(),B()})),r.addListener(t.renderer.scroller,"contextmenu",$),r.addListener(n,"contextmenu",$)}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";e("../lib/dom"),e("../lib/event"),e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(0!==i){var o=r.getSelectionRange().isEmpty();return r.$blockScrolling++,(o||1==i)&&r.selection.moveToPosition(n),r.$blockScrolling--,void(2==i&&r.textInput.onContextMenu(e.domEvent))}return this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(n.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==a&&1==s)r=o.end,t=o.start;else{var l=i(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),o=Date.now();(i>0||o-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor;return r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200?(this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor;if(r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200)return this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){r.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(i.prototype),t.Tooltip=i})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/event"),a=e("../tooltip").Tooltip;function s(e){a.call(this,e)}i.inherits(s,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+o>r&&(t-=20+o),a.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=function(e){var t,n,i,a=e.editor,l=a.renderer.$gutterLayer,c=new s(a.container);function u(){t&&(t=clearTimeout(t)),i&&(c.hide(),i=null,a._signal("hideGutterTooltip",c),a.removeEventListener("mousewheel",u))}function d(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var s=o.domEvent.target||o.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return u();i&&e.$tooltipFollowsMouse&&d(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=l.$annotations[t];if(!r)return u();if(t==a.session.getLength()){var o=a.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(o>a.session.documentToScreenRow(s.row,s.column))return u()}if(i!=r)if(i=r.text.join("
"),c.setHtml(i),c.show(),a._signal("showGutterTooltip",c),a.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var h=n.domEvent.target.getBoundingClientRect(),p=c.getElement().style;p.left=h.right+"px",p.top=h.bottom+"px"}}():u()}),50))})),o.addListener(a.renderer.$gutter,"mouseout",(function(e){n=null,i&&!t&&(t=setTimeout((function(){t=null,u()}),50))})),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/event"),o=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var a,l,c,u,d,h,p,f,m,g,v,y=t.container,b=0;function E(){var e=h;(function(e,n){var r=Date.now(),i=!n||e.row!=n.row,o=!n||e.column!=n.column;!g||i||o?(t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,g=r,v={x:l,y:c}):s(v.x,v.y,l,c)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(h=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:l-a.left,right:a.right-l},y:{top:c-a.top,bottom:a.bottom-c}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),h={row:e.row,column:e.column};u/o<=2&&(h.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(h):m=r:m=null}(h,e)}function C(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),E(),u=setInterval(E,20),b=0,i.addListener(document,"mousemove",x)}function w(){clearInterval(u),t.session.removeMarker(a),a=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(d),t.$blockScrolling-=1,t.isFocused()&&!f&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),d=null,h=null,b=0,m=null,g=null,i.removeListener(document,"mousemove",x)}this.onDragStart=function(e){if(this.cancelDrag||!y.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(n),n.scrollTop=0),i.setDragImage&&i.setDragImage(n,0,0),o.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(e){if(y.draggable=!1,f=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"move"!=n||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,a||C(),b++,e.dataTransfer.dropEffect=p=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(C(),b++),null!==A&&(A=null),e.dataTransfer.dropEffect=p=_(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&a)return w(),p=null,i.preventDefault(e)},this.onDrop=function(e){if(h){var n=e.dataTransfer;if(f)switch(p){case"move":d=d.contains(h.row,h.column)?{start:h,end:h}:t.moveText(d,h);break;case"copy":d=t.moveText(d,h,!0)}else{var r=n.getData("Text");d={start:h,end:t.session.insert(h,r)},t.focus(),p=null}return w(),i.preventDefault(e)}},i.addListener(y,"dragstart",this.onDragStart.bind(e)),i.addListener(y,"dragend",this.onDragEnd.bind(e)),i.addListener(y,"dragenter",this.onDragEnter.bind(e)),i.addListener(y,"dragover",this.onDragOver.bind(e)),i.addListener(y,"dragleave",this.onDragLeave.bind(e)),i.addListener(y,"drop",this.onDrop.bind(e));var A=null;function x(){null==A&&(A=setTimeout((function(){null!=A&&a&&w()}),20))}function S(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function _(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(r)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var a=0;a1&&(i=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,a;Array.isArray(n)&&(a=n[0],n=n[1]);try{i=e(n)}catch(l){}if(i&&!t.$loading[n])return r&&r(i);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var s=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return s();o.loadScript(t.moduleUrl(n,a),s)}},c(!0),t.init=c})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],(function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),u=function(e){var t=this;this.editor=e,new o(this),new a(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},s=e.renderer.getMouseEventTarget();r.addListener(s,"click",this.onMouseEvent.bind(this,"click")),r.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener([s,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),r.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;r.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),r.addListener(s,"mousedown",n),r.addListener(c,"mousedown",n),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n),r.addListener(e.renderer.scrollBarH.element,"mousedown",n)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}))};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new s(t,this.editor))},this.onMouseWheel=function(e,t){var n=new s(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new s(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,a=function(e){if(e){if(i.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new s(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(u),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){l(e)}));o.$onCaptureMouseMove=a,o.releaseMouse=r.capture(this.editor.container,a,l);var u=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),c.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u})),ace.define("ace/mouse/fold_handler",["require","exports","module"],(function(e,t,n){"use strict";t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var a=r.getFoldAt(n,r.getLine(n).length,1);a?r.removeFold(a):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){for(var o,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r))&&o.command&&((a="null"==o.command||s.exec(o.command,this.$editor,o.args,r))&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),a)););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),a},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var i={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-n,t.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var r=e("./config"),i=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+i+1)})):(d=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||s.push(c)),o[i]=l,i+=d,r.push(u),c.onMatch||(c.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){i=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;iu){var v=e.substring(u,g-m.length);h.type==p?h.value+=v:(h.type&&c.push(h),h={type:p,value:v})}for(var y=0;yi){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},this.reportError=r.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},p=function e(){this.add("braces","insertion",(function(t,n,i,o,a){var l=i.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==a){d(i);var u=i.getSelectionRange(),p=o.doc.getTextRange(u);if(""!==p&&"{"!==p&&i.getWrapBehavioursEnabled())return h(u,p,"{","}");if(e.isSaneInsertion(i,o))return/[\]\}\)]/.test(c[l.column])||i.inMultiSelectMode?(e.recordAutoInsert(i,o,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(i,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){if(d(i),"}"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,a))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==a||"\r\n"==a){d(i);var f="";if(e.isMaybeInsertedClosing(l,c)&&(f=s.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var g=this.$getIndent(o.getLine(m.row))}else{if(!f)return void e.clearMaybeInsertedClosing();g=this.$getIndent(c)}var v=g+o.getTabString();return{text:"\n"+v+"\n"+g+f,selection:[1,v.length,1,v.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,i,o){var a=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(d(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,i,o){if("("==o){d(r);var a=r.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"(",")");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(d(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("brackets","insertion",(function(t,n,r,i,o){if("["==o){d(r);var a=r.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"[","]");if(e.isSaneInsertion(r,i))return e.recordAutoInsert(r,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(r);var l=r.getCursorPosition(),c=i.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(d(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i})),this.add("string_dquotes","insertion",(function(e,t,n,r,i){if('"'==i||"'"==i){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;d(n);var o=i,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return h(a,s,o,o);if(!s){var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),p=c.substring(l.column,l.column+1),f=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==u&&f&&/escape/.test(f.type))return null;var g,v=f&&/string|escape/.test(f.type),y=!m||/string|escape/.test(m.type);if(p==o)(g=v!==y)&&/string\.end/.test(m.type)&&(g=!1);else{if(v&&!y)return null;if(v&&y)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var E=b.test(u);b.lastIndex=0;var C=b.test(u);if(E||C)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;g=!0}return{text:g?o+o:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)&&(d(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==o))return i.end.column++,i}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var i=new a(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(p,o),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";t.packages={},function(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})})),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,a=e("../unicode"),s=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,u=function(){this.HighlightRules=i};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){var i=t.doc,o=!0,a=!0,l=1/0,c=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))m=this.lineCommentStart.map(s.escapeRegExp).join("|"),p=this.lineCommentStart[0];else m=s.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),u=t.getUseSoftTabs();y=function(e,t){var n=e.match(m);if(n){var r=n[1].length,o=n[0].length;h(e,r,o)||" "!=n[0][o-1]||o--,i.removeInLine(t,r,o)}};var d=p+" ",h=(v=function(e,t){o&&!/\S/.test(e)||(h(e,l,l)?i.insertInLine({row:t,column:l},d):i.insertInLine({row:t,column:l},p))},b=function(e,t){return m.test(e)},function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%c!=0)return!1;for(r=0;" "==e.charAt(n++);)r++;return c>2?r%c!=c-1:r%c==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+s.escapeRegExp(p)+")"),g=new RegExp("(?:"+s.escapeRegExp(f)+")\\s*$"),v=function(e,t){b(e,t)||o&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},f),i.insertInLine({row:t,column:l},p))},y=function(e,t){var n;(n=e.match(g))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&i.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),i=0;ie.length&&(C=e.length)})),l==1/0&&(l=C,o=!1,a=!1),u&&l%c!=0&&(l=Math.floor(l/c)*c),E(a?y:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,s=(m=new l(t,r.row,r.column)).getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var d,h;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(i.start))){var p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g;d=new c(p,f,p,f+i.start.length);break}s=m.stepBackward()}var m;for(s=(m=new l(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(i.end))){p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g;h=new c(p,f,p,f+i.end.length);break}s=m.stepForward()}h&&t.remove(h),d&&(t.remove(d),o=d.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);u.start.row==o&&(u.start.column+=a),u.end.row==o&&(u.end.column+=a),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,r){var i="insert"==t.action,o=(i?1:-1)*(t.end.row-t.start.row),a=(i?1:-1)*(t.end.column-t.start.column),s=t.start,l=i?s:t.end;if(e(n,s,r))return{row:n.row,column:n.column};if(e(l,n,!r))return{row:n.row+o,column:n.column+(n.row==l.row?a:0)};return{row:s.row,column:s.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length,i=e.start.row,o=e.start.column,a=0,s=0;;){a=s,s+=t-1;var l=n.slice(a,s);if(s>r){e.lines=l,e.start.row=i+a,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(i+a,o),end:this.pos(i+s,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,o<=r&&n.fireUpdateEvent(o,r)}}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,l=a;l<=s;l++){var c=this.cache[l];null==c&&((c=r.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new i(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=r(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,i=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.rowr)break;if(c.start.row==r&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=o,c.start.row+=i)),c.end.row==r&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&o>0&&sc.start.column&&c.end.column==a[s+1].start.column&&(c.end.column-=o),c.end.column+=o,c.end.row+=i}}}if(0!=i&&s=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column;if(!(s0&&(this.removeFolds(p),p.forEach((function(e){n.addSubFold(e)})));for(var f=0;f0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,i;if(null==e?(n=new r(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,i=this.getFoldsInRangeList(n),t)this.removeFolds(i);else for(var o=i;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk((function(e,t,n,s){if(!(t=e){i=o.end.row;try{var a=this.addFold("...",o);a&&(a.collapseChildren=n)}catch(s){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,c=s.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=i.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=i.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,c=s.value;;){for(;l>=0;){var u=c.charAt(l);if(u==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;l=(c=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var c=s.value,u=c.length;ln&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))i=/\s/;else i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,l=0;la){if((l=o.end.row+1)>=s)break;a=(o=this.$foldData[i++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=e.length-1;-1!=r;r--){var i=e[r];"doc"==i.group?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach((function(e){this.addFolds(e.folds)}),this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=0;re.end.column&&(o.start.column+=u),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=u)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var s=e.start,l=o.start,u=(a=l.row-s.row,l.column-s.column);this.addFolds(i.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=u),e.end.row==s.row&&(e.end.column+=u),e.start.row+=a,e.end.row+=a,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new c(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=i-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var o=new c(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(m=this.getFoldLine(i.row)){m.addRemoveChars(i.row,i.column,r.column-i.column),m.shiftRow(-s);var d=this.getFoldLine(o);d&&d!==m&&(d.merge(m),m=d),u=c.indexOf(m)+1}for(;u=i.row&&m.shiftRow(-s)}a=o}else{var h=Array(s);h.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,h);c=this.$foldData,u=0;if(m=this.getFoldLine(o)){var f=m.range.compareInside(r.row,r.column);0==f?(m=m.split(r.row,r.column))&&(m.shiftRow(s),m.addRemoveChars(a,0,i.column-r.column)):-1==f&&(m.addRemoveChars(o,0,i.column-r.column),m.shiftRow(s)),u=c.indexOf(m)+1}for(;u=o&&m.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s),(m=this.getFoldLine(o))&&m.addRemoveChars(o,r.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var i,o,a=this.doc.getAllLines(),s=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(r=Math.min(r,a.length-1);u<=r;)(o=this.getFoldLine(u,o))?(i=[],o.walk(function(n,r,o,s){var l;if(null!=n){(l=this.$getDisplayTokens(n,i.length))[0]=e;for(var c=1;c=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,i){if(0==n.length)return[];var o=[],a=n.length,s=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,d=r<=Math.max(2*i,8)||!1===u?0:Math.floor(r/2);function h(e){var t=n.slice(s,e),r=t.length;t.join("").replace(/12/g,(function(){r-=1})).replace(/2/g,(function(){r-=1})),o.length||(p=function(){var e=0;if(0===d)return e;if(u)for(var t=0;tr-p;){var f=s+r-p;if(n[f-1]>=10&&n[f]>=10)h(f);else if(n[f]!=e&&n[f]!=t){for(var m=Math.max(f-(r-(r>>2)),s-1);f>m&&n[f]m&&n[f]m&&9==n[f];)f--}else for(;f>m&&n[f]<10;)f--;f>m?h(++f):(2==n[f=s+r]&&f--,h(f-p))}else{for(;f!=s-1&&n[f]!=e;f--);if(f>s){h(f);continue}for(f=s+r;f39&&a<48||a>57&&a<64?i.push(9):a>=4352&&n(a)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var i,o;for(null==t&&(t=1/0),r=r||0,o=0;o=4352&&n(i)?r+=2:r+=1,!(r>t));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=l[c],i=this.$docRowCache[c];var d=e>l[u-1]}else d=!u;for(var h=this.getLength()-1,p=this.getNextFoldLine(i),f=p?p.start.row:1/0;a<=e&&!(a+(s=this.getRowLength(i))>e||i>=h);)a+=s,++i>f&&(i=p.end.row+1,f=(p=this.getNextFoldLine(i,p))?p.start.row:1/0),d&&(this.$docRowCache.push(i),this.$screenRowCache.push(a));if(p&&p.start.row<=i)n=this.getFoldDisplayLine(p),i=p.start.row;else{if(a+s<=e||i>h)return{row:h,column:this.getLine(h).length};n=this.getLine(i),p=null}var m=0;if(this.$useWrapMode){var g=this.$wrapData[i];if(g){var v=Math.floor(e-a);r=g[v],v>0&&g.length&&(m=g.indent,o=g[v-1]||g[g.length-1],n=n.substring(o))}}return o+=this.$getStringScreenWidth(n,t-m)[1],this.$useWrapMode&&o>=r&&(o=r-1),p?p.idxToPosition(o):{row:i,column:o}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,i=0,o=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){s=l[c],i=this.$screenRowCache[c];var d=e>l[u-1]}else d=!u;for(var h=this.getNextFoldLine(s),p=h?h.start.row:1/0;s=p){if((a=h.end.row+1)>e)break;p=(h=this.getNextFoldLine(a,h))?h.start.row:1/0}else a=s+1;i+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(i))}var f="";h&&s>=p?(f=this.getFoldDisplayLine(h,e,t),o=h.start.row):(f=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;f.length>=g[v];)i++,v++;f=f.substring(g[v-1]||0,f.length),m=v>0?g.indent:0}}return{row:i,column:m+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);ri&&(r=t.end.row+1,i=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),o.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),o=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,i){if(e.start)r=e;else{var a=e.offset+(i||0);if(r=new o(n,a,n,a+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))return r=null,!1}return!0})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,c=s.length,u=i.length-c;e:for(var d=s.offset||0;d<=u;d++){for(var h=0;hm||(a.push(l=new o(d,m,d+c-1,g)),c>2&&(d=d+c-2))}}else for(var v=0;vC&&a[h].end.row==n.end.row;)h--;for(a=a.slice(v,h+1),v=0,h=a.length;v=0;s--)if(n(a[s],t,o))return!0};else s=function(e,t,o){for(var a=r.getMatchOffsets(e,i),s=0;s=a;r--)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=s,a=o.row;r>=a;r--)if(n(e.getLine(r),r))return}}:function(n){var r=o.row;if(!n(e.getLine(r).substr(o.column),r,o.column)){for(r+=1;r<=s;r++)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=a,s=o.row;r<=s;r++)if(n(e.getLine(r),r))return}}}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/useragent"),o=r.KEY_MODS;function a(e,t){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){a.call(this,e,t),this.$singleCommand=!1}s.prototype=a.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||0}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var a=this.parseKeys(e),s=o[a.hashId]+a.key;this._addCommandToBinding(r+s,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=r||n.isDefault?-100:e(n));var a=o[t];for(i=0;ir)break}a.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,a=t.length;a--;){var s=r.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;o|=s}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=o[t]+n,a=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,a=this.commandKeyBinding[e.$keyChain]||a),!a||"chainKeys"!=a&&"chainKeys"!=a[a.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:a}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,a=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(a,i),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(a.prototype),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=e("../lib/lang"),i=e("../config"),o=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:a("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:a("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:a("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:a("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:a("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:a("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}i.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var r=new p(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)r=t.$mode.getMatching(e.session);r&&(t.$bracketHighlight=t.addMarker(r,"ace_bracket","text"))}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new y(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==i.type.indexOf("tag-open")||(i=r.stepForward())){var o=i.value,a=0,s=r.stepBackward();if("<"==s.value)do{s=i,(i=r.stepForward())&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"=0);else{do{i=s,s=r.stepBackward(),i&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new p(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),o=i.length,a=i.substring(Math.max(n,0),Math.min(r,o));if(!(n>=0&&/^[\w\d]/.test(a)||r<=o&&/[\w\d]$/.test(a)))if(a=i.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var i=r.length;i--;){var o=r[i];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[i])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){(a=new p.fromPoints(i,i)).end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var l=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,u=n.getState(i.row),d=(s=n.getLine(i.row),r.checkOutdent(u,s,e));n.insert(i,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new p(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var h=r.getNextLineIndent(u,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},h)}d&&r.autoOutdent(u,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);tt.toLowerCase()?1:0}));for(var r=new p(0,0,0,0),i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),a!==o.end&&np+1)break;p=f.last}for(u--,s=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(i,0)})):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var a,s,l=!1,c={},u=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",(function(){r=!0})),a=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;null!=(r=o.top>=0&&s+t.top<0||!(o.topwindow.innerHeight)&&null)&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(b.prototype),v.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=b})),ace.define("ace/undomanager",["require","exports","module"],(function(e,t,n){"use strict";var r=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),r=0;r0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(r.prototype),t.UndoManager=r})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,a),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;ta&&(m=o.end.row+1,a=(o=t.getNextFoldLine(m,o))?o.start.row:1/0),m>i){for(;this.$cells.length>f+1;)p=this.$cells.pop(),this.element.removeChild(p.element);break}(p=this.$cells[++f])||((p={element:null,textNode:null,foldWidget:null}).element=r.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[f]=p);var g="ace_gutter-cell ";if(l[m]&&(g+=l[m]),c[m]&&(g+=c[m]),this.$annotations[m]&&(g+=this.$annotations[m].className),p.element.className!=g&&(p.element.className=g),(y=t.getRowLength(m)*e.lineHeight+"px")!=p.element.style.height&&(p.element.style.height=y),s){var v=s[m];null==v&&(v=s[m]=t.getFoldWidget(m))}if(v){p.foldWidget||(p.foldWidget=r.createElement("span"),p.element.appendChild(p.foldWidget));g="ace_fold-widget ace_"+v;"start"==v&&m==a&&mn.right-t.right?"foldWidgets":void 0}}).call(s.prototype),t.Gutter=s})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e=e||this.config){this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i,o){for(var a=this.session,s=t.start.row,l=t.end.row,c=s,u=0,d=0,h=a.getScreenLastRowColumn(c),p=new r(c,t.start.column,c,d);c<=l;c++)p.start.row=p.end.row=c,p.start.column=c==s?t.start.column:a.getRowWrapIndent(c),p.end.column=h,u=d,d=h,h=c+1h?4:0)|(c==l?8:0)),i,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;i=i||"",e.push("
"),s=this.$getTop(t.end.row,r);var c=t.end.column*r.characterWidth;if(e.push("
"),!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var u=(t.start.column?1:0)|(t.end.column?0:8);e.push("
")}},this.drawSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;e.push("
")},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),e.push("
")},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;e.push("
")}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){r.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n"+o.stringRepeat(this.TAB_CHAR,n)+""):t.push(o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",i="",a="";if(this.showInvisibles){r+=" ace_invisible",i=" ace_invisible_space",a=" ace_invisible_tab";var s=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else l=s=o.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]=""+s+"",this.$tabStrings["\t"]=""+l+""}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;sc&&(s=l.end.row+1,c=(l=this.session.getNextFoldLine(s,l))?l.start.row:1/0),!(s>i);){var u=o[a++];if(u){var d=[];this.$renderLine(d,s,!this.$useLineGroups(),s==c&&l),u.style.height=e.lineHeight*this.session.getRowLength(s)+"px",u.innerHTML=d.join("")}s++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRowt.lastRow){i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){for(var r=this.element.ownerDocument.createDocumentFragment(),o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;o>s&&(o=a.end.row+1,s=(a=this.session.getNextFoldLine(o,a))?a.start.row:1/0),!(o>n);){var l=i.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==s&&a),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",r.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)r.appendChild(l.firstChild);o++}return r},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,r=e.lastRow,i=n,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;i>a&&(i=o.end.row+1,a=(o=this.session.getNextFoldLine(i,o))?o.start.row:1/0),!(i>r);)this.$useLineGroups()&&t.push("
"),this.$renderLine(t,i,!1,i==a&&o),this.$useLineGroups()&&t.push("
"),i++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,a=r.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,(function(e,n,r,a,s){if(n)return i.showInvisibles?""+o.stringRepeat(i.SPACE_CHAR,e.length)+"":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var l=i.session.getScreenTabSize(t+a);return t+=l-1,i.$tabStrings[l]}if("\u3000"==e){var c=i.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,""+u+""}return r?""+i.SPACE_CHAR+"":(t+=1,""+e+"")}));if(this.$textToken[n.type])e.push(a);else{var s="ace_"+n.type.replace(/\./g," ace_"),l="";"fold"==n.type&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("",a,"")}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:" "==t[0]?(r-=r%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){for(var i=0,a=0,s=n[0],l=0,c=0;c=s;)l=this.$renderToken(e,l,u,d.substring(0,s-i)),d=d.substring(s-i),i=s,r||e.push("","
"),e.push(o.stringRepeat("\xa0",n.indent)),l=0,s=n[++a]||Number.MAX_VALUE;0!=d.length&&(i+=d.length,l=this.$renderToken(e,l,u,d))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;o"),i.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,i,o,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),n||e.push("
")},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var i=n.getTokens(e);return t.walk((function(e,t,o,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,o=0;o+e[i].value.lengthn-t&&(a=a.substring(0,n-t)),r.push({type:e[i].type,value:a}),o=t+a.length,i+=1);on?r.push({type:e[i].type,value:a.substring(0,n-o)}):r.push(e[i]),o+=a.length,i+=1}}(i,a,o))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(s.prototype),t.Text=s})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===r&&(r=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(r?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||r||(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+n.column*this.config.characterWidth,top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var i=t.length;ne.height+e.offset||o.top<0)&&n>1)){var a=(this.cursors[r++]||this.addCursor()).style;this.drawCursor?this.drawCursor(a,o,e,t[n],this.session):(a.left=o.left+"px",a.top=o.top+"px",a.width=e.characterWidth+"px",a.height=e.lineHeight+"px")}}for(;this.cursors.length>r;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(s.prototype);var l=function(e,t){s.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};r.inherits(l,s),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var c=function(e,t){s.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(c,s),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;r.nextFrame((function(){var e;for(t.pending=!1;e=t.changes;)t.changes=0,t.onRender(e)}),this.window)}}}).call(i.prototype),t.RenderLoop=i})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){r.implement(this,s),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=i.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval((function(){e.checkForSizeChanges()}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(n){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./config"),a=e("./lib/useragent"),s=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,u=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter;i.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}',"ace_editor.css");var g=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!a.isOldIE,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return r&&(e||o.height!=r)&&(o.height=r,i|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(i|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)),o.$dirty=!n||!r,i&&this._signal("resize",a),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.textarea.style,i=this.lineHeight;if(t<0||t>e.height-i)r.top=r.left="0";else{var o=this.characterWidth;if(this.$composition){var a=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(a)[0]+2,i+=2}(n-=this.scrollLeft)>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,r.height=i+"px",r.width=o+"px",r.left=Math.min(n,this.$size.scrollerWidth-o)+"px",r.top=Math.min(t,this.$size.height-i)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),a=this.$horizScroll!==o;a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=u;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,r-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+d.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+u<0||this.scrollTop>d.top),p=s!==h;p&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var f,m,g=Math.ceil(c/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-l)/this.lineHeight)),y=v+g,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var E=e.getFoldLine(v);E&&(v=E.start.row),f=e.documentToScreenRow(v,0),m=e.getRowLength(v)*b,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(y)*b+m,l=this.scrollTop-f*b;var C=0;return this.layerConfig.width!=i&&(C=this.CHANGE_H_SCROLL),(a||p)&&(C=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:y,lineHeight:b,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:l,gutterOffset:b?Math.max(0,Math.ceil((l+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},C},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(to?(t&&l+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-si?(i=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),o=Math.round(r);return{row:i,column:o,side:r-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)a(e);else{var r=e||this.$options.theme.initialValue;o.loadModule(["theme",r],a)}function a(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");i.importCssString(r.cssText,r.cssClass,n.container.ownerDocument),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var o="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),o.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=g})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("../lib/net"),a=e("../lib/event_emitter").EventEmitter,s=e("../config"),l=function(t,r,i,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)o=o||s.moduleUrl(r.id,"worker");else{var a=this.$normalizePath;o=o||a(e.toUrl("ace/worker/worker.js",null,"_"));var l={};t.forEach((function(t){l[t]=a(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}try{var c=r.src,u=new(n(651))([c],{type:"application/javascript"}),d=(window.URL||window.webkitURL).createObjectURL(u);this.$worker=new Worker(d)}catch(f){if(!(f instanceof window.DOMException))throw f;u=this.$workerBlob(o);var h=window.URL||window.webkitURL,p=h.createObjectURL(u);this.$worker=new Worker(p),h.revokeObjectURL(p)}this.$worker.postMessage({init:!0,tlns:l,module:r.id,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,a),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(r){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}}).call(l.prototype);var c=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,o=Object.create(a),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),r&&(i?setTimeout(c):c())},this.setEmitSync=function(e){i=e};var c=function(){var e=l.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&o._signal(e.event,e.data)};o.postMessage=function(e){l.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(r=new e[n](o);l.messageBuffer.length;)c()}))};c.prototype=l.prototype,t.UIWorkerClient=c,t.WorkerClient=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(l=this.others[a]).row,column:l.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var l;s={row:(l=this.others[a]).row,column:l.column+o};this.doc.remove(new r(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{n=this.getRange();var r=this.isBackwards(),o=n.start.row,a=n.end.row;if(o==a){if(r)var s=n.end,l=n.start;else s=n.start,l=n.end;return this.addRange(i.fromPoints(l,l)),void this.addRange(i.fromPoints(s,s))}var c=[],u=this.getLineRange(o,!0);u.start.column=n.start.column,c.push(u);for(var d=o+1;d1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(r,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column0;)g--;if(g>0)for(var v=0;r[v].isEmpty();)v++;for(var y=g;y>=v;y--)r[y].isEmpty()&&r.splice(y,1)}return r}}.call(o.prototype);var h=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(c.defaultCommands),function(e){var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",(function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()})),s.addListener(t,"keyup",r),s.addListener(t,"blur",r)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,l=this.selection,c=l.rangeList,u=(i?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=l._eventRegistry;l._eventRegistry={};var h=new o(s);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(a)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;h.fromOrientedRange(u[p]),h.index=p,this.selection=s.selection=h;var f=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===f||(r=f),h.toOrientedRange(u[p])}h.detach(),this.selection=s.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=d,l.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ra&&(a=n.column),ru?e.insert(r,l.stringRepeat(" ",o-u)):e.remove(new i(r.row,r.column,r.row,r.column-o+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,h=u.end.row,p=d==h;if(p){var f,m=this.session.getLength();do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&++h0);d<0&&(d=0),h>=m&&(h=m-1)}var g=this.session.removeFullLines(d,h);g=this.$reAlignText(g,p),this.session.insert({row:d,column:0},g.join("\n")+"\n"),p||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,i,o=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,i=t[3].length,t):(n+r+i!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),rt[3].length&&(i=t[3].length),t):[e]})).map(t?c:o?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?s(n)+e[2]+s(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?s(n)+e[2]+s(r-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(h.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),a=o.search(i);if(-1!=a){for(var s=n||o.length,l=e.getLength(),c=t,u=t;++tc){var h=e.getLine(u).length;return new r(c,s,u,h)}}},this.openingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(i.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");e("./range").Range;function i(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;s0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var c=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(c-=t.scrollLeft),s.el.style.left=c+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(i.prototype),t.LineWidgets=i})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,l=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():s-=t;var c,u=function(e,t,n){var r=e.getAnnotations().sort(o.comparePoints);if(r.length){var i=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}(r,{row:t,column:-1},o.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:0===i&&n<0&&(i=r.length-1);var a=r[i];if(a&&n){if(a.row===t){do{a=r[i+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[i+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var h={row:a.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=h.el.appendChild(i.createElement("div")),f=h.el.appendChild(i.createElement("div"));f.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;f.style.left=m+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+c.className,p.innerHTML=c.text.join("
"),p.appendChild(i.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),o=e("./lib/event"),a=e("./editor").Editor,s=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.define=n(275),t.edit=function(e){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var r="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;r=s.value,e=i.createElement("pre"),s.parentNode.replaceChild(e,s)}else e&&(r=i.getInnerText(e),e.innerHTML="");var l=t.createEditSession(r),u=new a(new c(e));u.setSession(l);var d={document:l,editor:u,onResize:u.resize.bind(u,null)};return s&&(d.textarea=s),o.addListener(window,"resize",d.onResize),u.on("destroy",(function(){o.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new l),n},t.EditSession=s,t.UndoManager=l,t.version="1.2.6"})),ace.acequire(["ace/ace"],(function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})),e.exports=window.ace.acequire("ace/ace")},function(e,t,n){(function(t){e.exports=function(){if(t.Blob)try{return new Blob(["asdf"],{type:"text/plain"}),Blob}catch(n){}var e=t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;return function(t,n){var r=new e,i=n.endings,o=n.type;if(i)for(var a=0,s=t.length;as))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,d=!0,h=2&n?new ie:void 0;for(o.set(e,t),o.set(t,e);++u-1},ne.prototype.set=function(e,t){var n=this.__data__,r=se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},re.prototype.clear=function(){this.size=0,this.__data__={hash:new te,map:new(W||ne),string:new te}},re.prototype.delete=function(e){var t=me(this,e).delete(e);return this.size-=t?1:0,t},re.prototype.get=function(e){return me(this,e).get(e)},re.prototype.has=function(e){return me(this,e).has(e)},re.prototype.set=function(e,t){var n=me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.clear=function(){this.__data__=new ne,this.size=0},oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},oe.prototype.get=function(e){return this.__data__.get(e)},oe.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this};var ve=$?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function De(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Fe=y?function(e){return function(t){return e(t)}}(y):function(e){return Te(e)&&_e(e.length)&&!!c[le(e)]};function ke(e){return null!=(t=e)&&_e(t.length)&&!Se(t)?ae(e):he(e);var t}n.exports=function(e,t){return ue(e,t)}}).call(this,n(41),n(46)(e))},function(e,t,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};r.inherits(o,i),t.JsonHighlightRules=o})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(i=o.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=o.match(this.foldingStopMarker))){a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length,s=t+=1,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++na)return new i(a,r,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,a=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=e("../worker/worker_client").WorkerClient,d=function(){this.HighlightRules=a,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new c};i.inherits(d,o),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(r+=n));return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],n(654),"JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(d.prototype),t.Mode=d}))},function(e,t){e.exports.id="ace/mode/json_worker",e.exports.src='"no use strict";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.columnthis.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'").replace(/i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={\'"\':\'"\',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"\t"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected \'"+c+"\' instead of \'"+ch+"\'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\v\\f\\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'},function(e,t){ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(:(?:\s+|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*:(?:\s+|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[|>][-+\\d\\s]*$",next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"}],qqstring:[{token:"string",regex:"(?=(?:(?:\\\\.)|(?:[^:]))*?:)",next:"start"},{token:"string",regex:".+"}]}};r.inherits(o,i),t.YamlHighlightRules=o})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],(function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=e("../../range").Range,a=t.FoldMode=function(){};r.inherits(a,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,a=e.getLine(n),s=a.search(i);if(-1!=s&&"#"==a[s]){for(var l=a.length,c=e.getLength(),u=n,d=n;++nu){var p=e.getLine(d).length;return new o(u,l,d,p)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),o=e.getLine(n+1),a=e.getLine(n-1),s=a.search(/\S/),l=o.search(/\S/);if(-1==i)return e.foldWidgets[n-1]=-1!=s&&s[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;function i(e,n){var r=n.line,i=0,o=0,a=t.exec(e.getLine(r)),s=a[1];do{var l=r+(i+=1),c=e.getLine(l),u=t.exec(c);if(u){var d=u[1],h=parseInt(a[3],10)+i-o,p=parseInt(u[3],10),f=p;if(s!==d||isNaN(p)){if(s.length>d.length)return;if(s.lengthp&&(f=h+1),e.replaceRange(c.replace(t,d+f+u[4]+u[5]),{line:l,ch:0},{line:l,ch:c.length})}}while(u)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),s=[],l=0;l\s*$/.test(f)||o.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),s[l]="\n";else{var v=m[1],y=m[5],b=!(r.test(m[2])||m[2].indexOf(">")>=0),E=b?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");s[l]="\n"+v+E+y,b&&i(o,c)}}o.replaceSelections(s)}}(n(34))},function(e,t,n){var r=n(34);r.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentMore");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var n=Array(e.options.tabSize+1).join(" ");e.replaceSelection(n)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentLess");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var n=Array(e.options.tabSize+1).join(" ");e.replaceSelection(n)}}},function(e,t,n){!function(e){"use strict";e.defineOption("fullScreen",!1,(function(t,n,r){r==e.Init&&(r=!1),!r!=!n&&(n?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}(t))}))}(n(34))},function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n1)return s(e);var t=e.getCursor("start"),n=e.getCursor("end"),r=e.state.markedSelection;if(!r.length)return o(e,t,n);var l=r[0].find(),c=r[r.length-1].find();if(!l||!c||n.line-t.line<=8||i(t,c.to)>=0||i(n,l.from)<=0)return s(e);for(;i(t,l.from)>0;)r.shift().clear(),l=r[0].find();for(i(t,l.from)<0&&(l.to.line-t.line<8?(r.shift().clear(),o(e,t,l.to,0)):o(e,t,l.from,0));i(n,c.to)<0;)r.pop().clear(),c=r[r.length-1].find();i(n,c.to)>0&&(n.line-c.from.line<8?(r.pop().clear(),o(e,c.from,n)):o(e,c.to,n))}(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){a(e)}))}e.defineOption("styleSelectedText",!1,(function(r,i,o){var l=o&&o!=e.Init;i&&!l?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",s(r),r.on("cursorActivity",t),r.on("change",n)):!i&&l&&(r.off("cursorActivity",t),r.off("change",n),a(r),r.state.markedSelection=r.state.markedSelectionStyle=null)}));var r=e.Pos,i=e.cmpPos;function o(e,t,n,o){if(0!=i(t,n))for(var a=e.state.markedSelection,s=e.state.markedSelectionStyle,l=t.line;;){var c=l==t.line?t:r(l,0),u=l+8,d=u>=n.line,h=d?n:r(u,0),p=e.markText(c,h,{className:s});if(null==o?a.push(p):a.splice(o++,0,p),d)break;l=u}}function a(e){for(var t=e.state.markedSelection,n=0;n]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/i;e.defineMode("gfm",(function(n,r){var i=0,o={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return n.code?a===i&&(n.code=!1):(i=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==r.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},a={taskLists:!0,strikethrough:!0,emoji:!0};for(var s in r)a[s]=r[s];return a.name="markdown",e.overlayMode(e.getMode(n,a),o)}),"markdown"),e.defineMIME("text/x-gfm","gfm")}(n(34),n(276),n(278))},function(e,t,n){"use strict";var r=n(665);function i(e){"function"===typeof(e=e||{}).codeMirrorInstance&&"function"===typeof e.codeMirrorInstance.defineMode?(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),e.codeMirrorInstance.defineMode("spell-checker",(function(t){if(!i.aff_loading){i.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(i.aff_data=n.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},n.send(null)}if(!i.dic_loading){i.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(i.dic_data=o.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',s={token:function(e){var t=e.peek(),n="";if(a.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!a.includes(t);)n+=t,e.next();return i.typo&&!i.typo.check(n)?"spell-error":null}},l=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(l,s,!0)}))):console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`")}i.num_loaded=0,i.aff_loading=!1,i.dic_loading=!1,i.aff_data="",i.dic_data="",i.typo,e.exports=i},function(e,t,n){(function(t,r){var i;!function(){"use strict";(i=function(e,n,r,i){i=i||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=i.flags||{},this.memoized={},this.loaded=!1;var o,a,s,l,c,u=this;function d(e,t){var n=u._readFile(e,null,i.asyncLoad);i.asyncLoad?n.then((function(e){t(e)})):t(n)}function h(e){n=e,r&&f()}function p(e){r=e,n&&f()}function f(){for(u.rules=u._parseAFF(n),u.compoundRuleCodes={},a=0,l=u.compoundRules.length;a0&&(E.continuationClasses=y),"."!==b&&(E.match="SFX"===d?new RegExp(b+"$"):new RegExp("^"+b)),"0"!=m&&(E.remove="SFX"===d?new RegExp(m+"$"):m),f.push(E)}l[h]={type:d,combineable:"Y"==p,entries:f},i+=n}else if("COMPOUNDRULE"===d){for(o=i+1,s=i+1+(n=parseInt(u[1],10));o0&&(null===n[e]&&(n[e]=[]),n[e].push(t))}for(var i=1,o=t.length;i1){var l=this.parseRuleCodes(a[1]);"NEEDAFFIX"in this.flags&&-1!=l.indexOf(this.flags.NEEDAFFIX)||r(s,l);for(var c=0,u=l.length;c=this.flags.COMPOUNDMIN)for(t=0,n=this.compoundRules.length;t1&&u[1][1]!==u[1][0]&&l.push(u[0]+u[1][1]+u[1][0]+u[1].substring(2)),u[1])for(r=0,a=s.alphabet.length;r ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:g,table:g,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||w.defaults,this.rules=n.normal,this.options.pedantic?this.rules=n.pedantic:this.options.gfm&&(this.rules=n.gfm)}n._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,n.def=h(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d{1,9}\.)/,n.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,n.item=h(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=h(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",n._comment=//,n.html=h(n.html,"i").replace("comment",n._comment).replace("tag",n._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),n.paragraph=h(n._paragraph).replace("hr",n.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",n._tag).getRegex(),n.blockquote=h(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=v({},n),n.gfm=v({},n.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),n.pedantic=v({},n.normal,{html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",n._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:g,paragraph:h(n.normal._paragraph).replace("hr",n.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",n.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},r.prototype.token=function(e,t){var r,i,o,a,s,l,c,d,h,p,f,m,g,v,E,C;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e)){var w=this.tokens[this.tokens.length-1];e=e.substring(o[0].length),w&&"paragraph"===w.type?w.text+="\n"+o[0].trimRight():(o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?o:b(o,"\n")}))}else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2]?o[2].trim():o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if((o=this.rules.nptable.exec(e))&&(l={type:"table",header:y(o[1].replace(/^ *| *\| *$/g,"")),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3]?o[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(o[0].length),f=0;f ?/gm,""),this.token(o,t),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),c={type:"list_start",ordered:v=(a=o[2]).length>1,start:v?+a:"",loose:!1},this.tokens.push(c),d=[],r=!1,g=(o=o[0].match(this.rules.item)).length,f=0;f1?1===s.length:s.length>1||this.options.smartLists&&s!==a)&&(e=o.slice(f+1).join("\n")+e,f=g-1)),i=r||/\n\n(?!\s*$)/.test(l),f!==g-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),i&&(c.loose=!0),C=void 0,(E=/^\[[ xX]\] /.test(l))&&(C=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),h={type:"list_item_start",task:E,checked:C,loose:i},d.push(h),this.tokens.push(h),this.token(l,!1),this.tokens.push({type:"list_item_end"});if(c.loose)for(g=d.length,f=0;f?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:g,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",i.em=h(i.em).replace(/punctuation/g,i._punctuation).getRegex(),i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[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-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=h(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=h(i.tag).replace("comment",n._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,i._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=h(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=h(i.reflink).replace("label",i._label).getRegex(),i.normal=v({},i),i.pedantic=v({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=v({},i.normal,{escape:h(i.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(a[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(this.inRawBlock=!1),e=e.substring(a[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):u(a[0]):a[0];else if(a=this.rules.link.exec(e)){var c=E(a[2],"()");if(c>-1){var d=4+a[1].length+c;a[2]=a[2].substring(0,c),a[0]=a[0].substring(0,d).trim(),a[3]=""}e=e.substring(a[0].length),this.inLink=!0,r=a[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],i=t[3]):i="":i=a[3]?a[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(a,{href:o.escapes(r),title:o.escapes(i)}),this.inLink=!1}else if((a=this.rules.reflink.exec(e))||(a=this.rules.nolink.exec(e))){if(e=e.substring(a[0].length),t=(a[2]||a[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=a[0].charAt(0),e=a[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(a,t),this.inLink=!1}else if(a=this.rules.strong.exec(e))e=e.substring(a[0].length),l+=this.renderer.strong(this.output(a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.em.exec(e))e=e.substring(a[0].length),l+=this.renderer.em(this.output(a[6]||a[5]||a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.code.exec(e))e=e.substring(a[0].length),l+=this.renderer.codespan(u(a[2].trim(),!0));else if(a=this.rules.br.exec(e))e=e.substring(a[0].length),l+=this.renderer.br();else if(a=this.rules.del.exec(e))e=e.substring(a[0].length),l+=this.renderer.del(this.output(a[1]));else if(a=this.rules.autolink.exec(e))e=e.substring(a[0].length),r="@"===a[2]?"mailto:"+(n=u(this.mangle(a[1]))):n=u(a[1]),l+=this.renderer.link(r,null,n);else if(this.inLink||!(a=this.rules.url.exec(e))){if(a=this.rules.text.exec(e))e=e.substring(a[0].length),this.inRawBlock?l+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):u(a[0]):a[0]):l+=this.renderer.text(u(this.smartypants(a[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===a[2])r="mailto:"+(n=u(a[0]));else{do{s=a[0],a[0]=this.rules._backpedal.exec(a[0])[0]}while(s!==a[0]);n=u(a[0]),r="www."===a[1]?"http://"+n:n}e=e.substring(a[0].length),l+=this.renderer.link(r,null,n)}return l},o.escapes=function(e){return e?e.replace(o.rules._escapes,"$1"):e},o.prototype.outputLink=function(e,t){var n=t.href,r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},o.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026"):e},o.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},a.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
'+(n?e:u(e,!0))+"
\n":"
"+(n?e:u(e,!0))+"
"},a.prototype.blockquote=function(e){return"
\n"+e+"
\n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},a.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},a.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},a.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},a.prototype.checkbox=function(e){return" "},a.prototype.paragraph=function(e){return"

    "+e+"

    \n"},a.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},a.prototype.tablerow=function(e){return"\n"+e+"\n"},a.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+""},a.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},a.prototype.image=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},a.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,v({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop(),this.token},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,d(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},u.escapeTest=/[&<>"']/,u.escapeReplace=/[&<>"']/g,u.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},u.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,u.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var f={},m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(){}function v(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+u(d.message+"",!0)+"
    ";throw d}}g.exec=g,w.options=w.setOptions=function(e){return v(w.defaults,e),w},w.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new a,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}},w.defaults=w.getDefaults(),w.Parser=l,w.parser=l.parse,w.Renderer=a,w.TextRenderer=s,w.Lexer=r,w.lexer=r.lex,w.InlineLexer=o,w.inlineLexer=o.output,w.Slugger=c,w.parse=w,e.exports=w}(this||"undefined"!==typeof window&&window)}).call(this,n(41))},function(e,t){e.exports=function(e){var t={className:"rest_arg",begin:"[.]{3}",end:"[a-zA-Z_$][a-zA-Z0-9_$]*",relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"package",end:"{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"meta",beginKeywords:"import include",end:";",keywords:{"meta-keyword":"import include"}},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t]},{begin:":\\s*([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)"}]},e.METHOD_GUARD],illegal:/#/}}},function(e,t){e.exports=function(e){var t={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:""},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",t]},t,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}},function(e,t){e.exports=function(e){var t=e.inherit(e.QUOTE_STRING_MODE,{illegal:""}),n={className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_NUMBER_MODE,t]},r=e.COMMENT("--","$"),i=[r,e.COMMENT("\\(\\*","\\*\\)",{contains:["self",r]}),e.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"built_in",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"literal",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference)|POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{beginKeywords:"on",illegal:"[${=;\\n]",contains:[e.UNDERSCORE_TITLE_MODE,n]}].concat(i),illegal:"//|->|=>|\\[\\["}}},function(e,t){e.exports=function(e){return{aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,5}) .+?( \\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}},function(e,t){e.exports=function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]};return{aliases:["sh","zsh"],lexemes:/\b-?[a-z\._]+\b/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"meta",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,n,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},t]}}},function(e,t){e.exports=function(e){return{case_insensitive:!0,illegal:"^.",lexemes:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keywords:{keyword:"ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO HEX$ IF THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE WEND WIDTH WINDOW WRITE XOR"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("REM","$",{relevance:10}),e.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b([0-9]+[0-9edED.]*[#!]?)",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_\\-!.?+*=<>&#'][a-zA-Z_\\-!.?+*=<>&#'0-9/;:]*",n={begin:t,relevance:0},r={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),o=e.COMMENT(";","$",{relevance:0}),a={className:"literal",begin:/\b(true|false|nil)\b/},s={begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+t},c=e.COMMENT("\\^\\{","\\}"),u={className:"symbol",begin:"[:]{1,2}"+t},d={begin:"\\(",end:"\\)"},h={endsWithParent:!0,relevance:0},p={keywords:{"builtin-name":"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},lexemes:t,className:"name",begin:t,starts:h},f=[d,i,l,c,o,u,s,r,a,n];return d.contains=[e.COMMENT("comment",""),p,h],h.contains=f,s.contains=f,c.contains=[s],{aliases:["clj"],illegal:/\S/,contains:[d,i,l,c,o,u,s,r,a]}}},function(e,t){e.exports=function(e){return{contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}},function(e,t){e.exports=function(e){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[{className:"variable",begin:"\\${",end:"}"},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={className:"subst",begin:/#\{/,end:/}/,keywords:t},i=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[r,e.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W)/}]},{begin:"@"+n},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];r.contains=i;var o=e.inherit(e.TITLE_MODE,{begin:n}),a={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(i)}]};return{aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:i.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+n+"\\s*=\\s*(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[o,a]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[a]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[o]},o]},{begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){e.exports=function(e){var t={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},n={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},{begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\((?:.|\n)*?\)\1"/}]},r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},i={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(n,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o=e.IDENT_RE+"\\s*\\(",a={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_tshort reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},s=[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,n];return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:a,illegal:"",keywords:a,contains:["self",t]},{begin:e.IDENT_RE+"::",keywords:a},{variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:a,contains:s.concat([{begin:/\(/,end:/\)/,keywords:a,contains:s.concat(["self"]),relevance:0}]),relevance:0},{className:"function",begin:"("+e.IDENT_RE+"[\\*&\\s]+)+"+o,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:a,illegal:/[^\w\s\*&]/,contains:[{begin:o,returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,r,t,{begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,r,t]}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i]},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin://,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:i,strings:n,keywords:a}}}},function(e,t){e.exports=function(e){var t="(_*[ui](8|16|32|64|128))?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",r={keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},i={className:"subst",begin:"#{",end:"}",keywords:r},o={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:r};function a(e,t){var n=[{begin:e,end:t}];return n[0].contains=n,n}var s={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:a("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:a("\\[","\\]")},{begin:"%[Qwi]?{",end:"}",contains:a("{","}")},{begin:"%[Qwi]?<",end:">",contains:a("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},l={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:a("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:a("\\[","\\]")},{begin:"%q{",end:"}",contains:a("{","}")},{begin:"%q<",end:">",contains:a("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},c={begin:"(?!%})("+e.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},u=[o,s,l,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:"%r\\(",end:"\\)",contains:a("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:a("\\[","\\]")},{begin:"%r{",end:"}",contains:a("{","}")},{begin:"%r<",end:">",contains:a("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},c,{className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"})]},e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})],relevance:5},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[s,{begin:n}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_*[-+]?[0-9_]*)?(_*f(32|64))?(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+t}],relevance:0}];return i.contains=u,o.contains=u.slice(1),{aliases:["cr"],lexemes:"[a-zA-Z_]\\w*[!?=]?",keywords:r,contains:u}}},function(e,t){e.exports=function(e){var t={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,t]}]}}},function(e,t){e.exports=function(e){var t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},n={className:"subst",variants:[{begin:"\\${",end:"}"}],keywords:"true false null this is new super"},r={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]}]};n.contains=[e.C_NUMBER_MODE,r];return{keywords:{keyword:"abstract as assert async await break case catch class const continue covariant default deferred do dynamic else enum export extends extension external factory false final finally for Function get hide if implements import in inferface is library mixin new null on operator part rethrow return set show static super switch sync this throw true try typedef var void while with yield",built_in:"Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double dynamic int num print Element ElementList document querySelector querySelectorAll window"},contains:[r,e.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),e.COMMENT("///+\\s*","$",{contains:[{subLanguage:"markdown",begin:".",end:"$"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}},function(e,t){e.exports=function(e){return{aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}},function(e,t){e.exports=function(e){var t={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[t],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:[t]}]}}},function(e,t){e.exports=function(e){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^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]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((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])\\b"},e.inherit(e.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}},function(e,t){e.exports=function(e){return{aliases:["docker"],case_insensitive:!0,keywords:"from maintainer expose env arg user onbuild stopsignal",contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"/}]}]}]},o={className:"string",begin:"~[A-Z](?=[/|([{<\"'])",contains:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/\/}]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},s={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},l=e.inherit(s,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),c=[a,o,i,e.HASH_COMMENT_MODE,l,s,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[a,{begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?"}],relevance:0},{className:"symbol",begin:t+":(?!:)",relevance:0},{className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return r.contains=c,{lexemes:t,keywords:n,contains:c}}},function(e,t){e.exports=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},r={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},t]};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[n,r,{begin:"{",end:"}",contains:r.contains},t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"port",end:"$",keywords:"port",contains:[t]},{className:"string",begin:"'\\\\?.",end:"'",illegal:"."},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}],illegal:/;/}}},function(e,t){e.exports=function(e){return{subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}},function(e,t){e.exports=function(e){return{keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}},function(e,t){e.exports=function(e){var t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",r={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.COMMENT("%","$"),o={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},a={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},l={begin:"{",end:"}",relevance:0},c={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},u={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},d={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},h={beginKeywords:"fun receive if try case",end:"end",keywords:r};h.contains=[i,a,e.inherit(e.APOS_STRING_MODE,{className:""}),h,s,e.QUOTE_STRING_MODE,o,l,c,u,d];var p=[i,a,h,s,e.QUOTE_STRING_MODE,o,l,c,u,d];s.contains[1].contains=p,l.contains=p,d.contains[1].contains=p;var f={className:"params",begin:"\\(",end:"\\)",contains:p};return{aliases:["erl"],keywords:r,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[f,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:r,contains:p}},i,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+e.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[f]},o,e.QUOTE_STRING_MODE,d,c,u,l,{begin:/\.$/}]}}},function(e,t){e.exports=function(e){return{aliases:["xlsx","xls"],case_insensitive:!0,lexemes:/[a-zA-Z][\w\.]*/,keywords:{built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},e.BACKSLASH_ESCAPE,e.QUOTE_STRING_MODE,{className:"number",begin:e.NUMBER_RE+"(%)?",relevance:0},e.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}},function(e,t){e.exports=function(e){return{case_insensitive:!0,aliases:["f90","f95"],keywords:{literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"},illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},e.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}},function(e,t){e.exports=function(e){var t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"meta",begin:"\\[<",end:">\\]",relevance:10},{className:"symbol",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}},function(e,t){e.exports=function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:t,illegal:"",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}},function(e,t){e.exports=function(e){var t={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield lookup"},n={begin:/".*?"|'.*?'|\[.*?\]|\w+/},r=e.inherit(n,{keywords:t,starts:{endsWithParent:!0,relevance:0,contains:[e.inherit(n,{relevance:0})]}}),i=e.inherit(r,{className:"name"}),o=e.inherit(r,{relevance:0});return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},e.COMMENT(/\{\{!--/,/--\}\}/),e.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[i],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[i]},{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[i]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,keywords:t,contains:[o]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,keywords:t,contains:[o]}]}}},function(e,t){e.exports=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},n={className:"meta",begin:"{-#",end:"#-}"},r={className:"meta",begin:"^#",end:"$"},i={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},o={begin:"\\(",end:"\\)",illegal:'"',contains:[n,r,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),t]};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[o,t],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[o,t],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[i,o,t]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[n,i,o,{begin:"{",end:"}",contains:o.contains},t]},{beginKeywords:"default",end:"$",contains:[i,o,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[i,e.QUOTE_STRING_MODE,t]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},n,r,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,i,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}},function(e,t){e.exports=function(e){var t="action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view",n=(e.QUOTE_STRING_MODE,{endsWithParent:!0,relevance:0,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE,{illegal:/\}\}/,begin:/[a-zA-Z0-9_]+=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[a-zA-Z0-9_]+/}]},e.NUMBER_MODE]});return{case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT("{{!(--)?","(--)?}}"),{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[{className:"name",begin:/[a-zA-Z\.\-]+/,keywords:{"builtin-name":t},starts:n}]},{className:"template-variable",begin:/\{\{[a-zA-Z][a-zA-Z\-]+/,end:/\}\}/,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE]}]}}},function(e,t){e.exports=function(e){return{aliases:["https"],illegal:"\\S",contains:[{begin:"^HTTP/[0-9\\.]+",end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{begin:"HTTP/[0-9\\.]+"},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$",relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}},function(e,t){e.exports=function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT(";","$"),e.HASH_COMMENT_MODE,{className:"section",begin:/^\s*\[+/,end:/\]+/},{begin:/^[a-z0-9\[\]_\.-]+\s*=\s*/,end:"$",returnBegin:!0,contains:[{className:"attr",begin:/[a-z0-9\[\]_\.-]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[e.COMMENT(";","$"),e.HASH_COMMENT_MODE,{className:"literal",begin:/\bon|off|true|false|yes|no\b/},{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},e.NUMBER_MODE]}]}]}}},function(e,t){e.exports=function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",n={className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0};return{aliases:["jsp"],keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},n,{className:"meta",begin:"@[A-Za-z]+"}]}}},function(e,t){e.exports=function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",n={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},r={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:e.C_NUMBER_RE+"n?"}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},o={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,i],subLanguage:"xml"}},a={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,i],subLanguage:"css"}},s={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,a,s,r,e.REGEXP_MODE];var l=i.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{aliases:["js","jsx","mjs","cjs"],keywords:n,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,a,s,e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,r,{begin:/[{,\n]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:l}]}]},{className:"",begin:/\s/,end:/\s*/,skip:!0},{begin://,subLanguage:"xml",contains:[{begin:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},{begin:/<[A-Za-z0-9\\._:-]+/,end:/(\/[A-Za-z0-9\\._:-]+|[A-Za-z0-9\\._:-]+\/)>/,skip:!0,contains:[{begin:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},"self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:l}],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor get set",end:/\{/,excludeEnd:!0}],illegal:/#(?!!)/}}},function(e,t){e.exports=function(e){var t={literal:"true false null"},n=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],r=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:r,keywords:t},o={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(i,{begin:/:/})].concat(n),illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(i)],illegal:"\\S"};return r.push(o,a),n.forEach((function(e){r.push(e)})),{contains:r,keywords:t,illegal:"\\S"}}},function(e,t){e.exports=function(e){var t={keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi \u03b3 \u03c0 \u03c6 ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},n="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",r={lexemes:n,keywords:t,illegal:/<\//},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},o={className:"variable",begin:"\\$"+n},a={className:"string",contains:[e.BACKSLASH_ESCAPE,i,o],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,i,o],begin:"`",end:"`"},l={className:"meta",begin:"@"+n};return r.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},a,s,l,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],i.contains=r.contains,r}},function(e,t){e.exports=function(e){return{contains:[{className:"meta",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"},aliases:["jldoctest"]}]}}},function(e,t){e.exports=function(e){var t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:"\\${",end:"}",contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(o);var a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},s={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"meta-string"})]}]},l={className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0},c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=u;return d.variants[1].contains=[u],u.variants[1].contains=[d],{aliases:["kt"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,a,s,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,a,s,o,e.C_NUMBER_MODE]},c]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},a,s]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}}},function(e,t){e.exports=function(e){return{contains:[{className:"attribute",begin:"^dn",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0},relevance:10},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0}},{className:"literal",begin:"^-",end:"$"},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){var t=[],n=[],r=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},i=function(e,t,n){return{className:e,begin:t,relevance:n}},o={begin:"\\(",end:"\\)",contains:n,relevance:0};n.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r("'"),r('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},i("number","#[0-9A-Fa-f]+\\b"),o,i("variable","@@?[\\w-]+",10),i("variable","@{[\\w-]+}"),i("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var a=n.concat({begin:"{",end:"}",contains:t}),s={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(n)},l={begin:"([\\w-]+|@{[\\w-]+})\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:"([\\w-]+|@{[\\w-]+})",end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:n}}]},c={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:n,relevance:0}},u={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:a}},d={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:"([\\w-]+|@{[\\w-]+})",end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,i("keyword","all\\b"),i("variable","@{[\\w-]+}"),i("selector-tag","([\\w-]+|@{[\\w-]+})%?",0),i("selector-id","#([\\w-]+|@{[\\w-]+})"),i("selector-class","\\.([\\w-]+|@{[\\w-]+})",0),i("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:a},{begin:"!important"}]};return t.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,u,l,d),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:t}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",n="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",r={className:"literal",begin:"\\b(t{1}|nil)\\b"},i={className:"number",variants:[{begin:n,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+n+" +"+n,end:"\\)"}]},o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),a=e.COMMENT(";","$",{relevance:0}),s={begin:"\\*",end:"\\*"},l={className:"symbol",begin:"[:&]"+t},c={begin:t,relevance:0},u={begin:"\\|[^]*?\\|"},d={contains:[i,o,s,l,{begin:"\\(",end:"\\)",contains:["self",r,o,i,c]},c],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'\\|[^]*?\\|"}]},h={variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},p={begin:"\\(\\s*",end:"\\)"},f={endsWithParent:!0,relevance:0};return p.contains=[{className:"name",variants:[{begin:t},{begin:"\\|[^]*?\\|"}]},f],f.contains=[d,h,p,r,i,o,a,s,l,u,c],{illegal:/\S/,contains:[i,{className:"meta",begin:"^#!",end:"$"},r,o,a,d,h,p,c]}}},function(e,t){e.exports=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native list map __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},n="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",r=e.inherit(e.TITLE_MODE,{begin:n}),i={className:"subst",begin:/#\{/,end:/}/,keywords:t},o={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},a=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,o]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,o]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[i,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W)/}]},{begin:"@"+n},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];i.contains=a;var s={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(a)}]};return{aliases:["ls"],keywords:t,illegal:/\/\*/,contains:a.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{begin:"(#=>|=>|\\|>>|-?->|\\!->)"},{className:"function",contains:[r,s],returnBegin:!0,variants:[{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[r]},r]},{begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){e.exports=function(e){var t={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},n=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[t],relevance:10})];return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstringmodule next pairs pcall print rawequal rawget rawset require select setfenvsetmetatable tonumber tostring type unpack xpcall arg selfcoroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:n.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:n}].concat(n)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[t],relevance:5}])}}},function(e,t){e.exports=function(e){var t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^\\s*([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"quote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"^```\\w*\\s*$",end:"^```[ ]*$"},{begin:"`.+?`"},{begin:"^( {4}|\\t)",end:"$",relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}},function(e,t){e.exports=function(e){return{aliases:["mma","wl"],lexemes:"(\\$|\\b)"+e.IDENT_RE+"\\b",keywords:"AASTriangle AbelianGroup Abort AbortKernels AbortProtect AbortScheduledTask Above Abs AbsArg AbsArgPlot Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AcceptanceThreshold AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Activate Active ActiveClassification ActiveClassificationObject ActiveItem ActivePrediction ActivePredictionObject ActiveStyle AcyclicGraphQ AddOnHelpPath AddSides AddTo AddToSearchIndex AddUsers AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AdministrativeDivisionData AffineHalfSpace AffineSpace AffineStateSpaceModel AffineTransform After AggregatedEntityClass AggregationLayer AircraftData AirportData AirPressureData AirTemperatureData AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowAdultContent AllowedCloudExtraParameters AllowedCloudParameterExtensions AllowedDimensions AllowedFrequencyRange AllowedHeads AllowGroupClose AllowIncomplete AllowInlineCells AllowKernelInitialization AllowLooseGrammar AllowReverseGroupClose AllowScriptLevelChange AllTrue Alphabet AlphabeticOrder AlphabeticSort AlphaChannel AlternateImage AlternatingFactorial AlternatingGroup AlternativeHypothesis Alternatives AltitudeMethod AmbientLight AmbiguityFunction AmbiguityList Analytic AnatomyData AnatomyForm AnatomyPlot3D AnatomySkinStyle AnatomyStyling AnchoredSearch And AndersonDarlingTest AngerJ AngleBisector AngleBracket AnglePath AnglePath3D AngleVector AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning AnimationRunTime AnimationTimeIndex Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotate Annotation AnnotationDelete AnnotationNames AnnotationRules AnnotationValue Annuity AnnuityDue Annulus AnomalyDetection AnomalyDetectorFunction Anonymous Antialiasing AntihermitianMatrixQ Antisymmetric AntisymmetricMatrixQ Antonyms AnyOrder AnySubset AnyTrue Apart ApartSquareFree APIFunction Appearance AppearanceElements AppearanceRules AppellF1 Append AppendCheck AppendLayer AppendTo ApplicationIdentificationKey Apply ApplySides ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcCurvature ARCHProcess ArcLength ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Area Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess Around AroundReplace ARProcess Array ArrayComponents ArrayDepth ArrayFilter ArrayFlatten ArrayMesh ArrayPad ArrayPlot ArrayQ ArrayResample ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads ASATriangle Ask AskAppend AskConfirm AskDisplay AskedQ AskedValue AskFunction AskState AskTemplateDisplay AspectRatio AspectRatioFixed Assert AssociateTo Association AssociationFormat AssociationMap AssociationQ AssociationThread AssumeDeterministic Assuming Assumptions AstronomicalData AsymptoticDSolveValue AsymptoticEqual AsymptoticEquivalent AsymptoticGreater AsymptoticGreaterEqual AsymptoticIntegrate AsymptoticLess AsymptoticLessEqual AsymptoticOutputTracker AsymptoticRSolveValue AsymptoticSolve AsymptoticSum Asynchronous AsynchronousTaskObject AsynchronousTasks Atom AtomCoordinates AtomCount AtomDiagramCoordinates AtomList AtomQ AttentionLayer Attributes Audio AudioAmplify AudioAnnotate AudioAnnotationLookup AudioBlockMap AudioCapture AudioChannelAssignment AudioChannelCombine AudioChannelMix AudioChannels AudioChannelSeparate AudioData AudioDelay AudioDelete AudioDevice AudioDistance AudioFade AudioFrequencyShift AudioGenerator AudioIdentify AudioInputDevice AudioInsert AudioIntervals AudioJoin AudioLabel AudioLength AudioLocalMeasurements AudioLooping AudioLoudness AudioMeasurements AudioNormalize AudioOutputDevice AudioOverlay AudioPad AudioPan AudioPartition AudioPause AudioPitchShift AudioPlay AudioPlot AudioQ AudioRecord AudioReplace AudioResample AudioReverb AudioSampleRate AudioSpectralMap AudioSpectralTransformation AudioSplit AudioStop AudioStream AudioStreams AudioTimeStretch AudioTrim AudioType AugmentedPolyhedron AugmentedSymmetricPolynomial Authenticate Authentication AuthenticationDialog AutoAction Autocomplete AutocompletionFunction AutoCopy AutocorrelationTest AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutoQuoteCharacters AutoRefreshed AutoRemove AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords AutoSubmitting Axes AxesEdge AxesLabel AxesOrigin AxesStyle AxiomaticTheory AxisBabyMonsterGroupB Back Background BackgroundAppearance BackgroundTasksSettings Backslash Backsubstitution Backward Ball Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarcodeImage BarcodeRecognize BaringhausHenzeTest BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseDecode BaseEncode BaseForm Baseline BaselinePosition BaseStyle BasicRecurrentLayer BatchNormalizationLayer BatchSize BatesDistribution BattleLemarieWavelet BayesianMaximization BayesianMaximizationObject BayesianMinimization BayesianMinimizationObject Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized Between BetweennessCentrality BeveledPolyhedron BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryDeserialize BinaryDistance BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinarySerialize BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BiquadraticFilterModel BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor BiweightLocation BiweightMidvariance Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockchainAddressData BlockchainBase BlockchainBlockData BlockchainContractValue BlockchainData BlockchainGet BlockchainKeyEncode BlockchainPut BlockchainTokenData BlockchainTransaction BlockchainTransactionData BlockchainTransactionSign BlockchainTransactionSubmit BlockMap BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bond BondCount BondList BondQ Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms BooleanQ BooleanRegion Booleans BooleanStrings BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryDiscretizeGraphics BoundaryDiscretizeRegion BoundaryMesh BoundaryMeshRegion BoundaryMeshRegionQ BoundaryStyle BoundedRegionQ BoundingRegion Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxObject BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break BridgeData BrightnessEqualize BroadcastStationData Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurve3DBoxOptions BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BSplineSurface3DBoxOptions BubbleChart BubbleChart3D BubbleScale BubbleSizes BuildingData BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteArray ByteArrayFormat ByteArrayQ ByteArrayToString ByteCount ByteOrderingC CachedValue CacheGraphics CachePersistence CalendarConvert CalendarData CalendarType Callout CalloutMarker CalloutStyle CallPacket CanberraDistance Cancel CancelButton CandlestickChart CanonicalGraph CanonicalizePolygon CanonicalizePolyhedron CanonicalName CanonicalWarpingCorrespondence CanonicalWarpingDistance CantorMesh CantorStaircase Cap CapForm CapitalDifferentialD Capitalize CapsuleShape CaptureRunning CardinalBSplineBasis CarlemanLinearize CarmichaelLambda CaseOrdering Cases CaseSensitive Cashflow Casoratian Catalan CatalanNumber Catch Catenate CatenateLayer CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling CelestialSystem Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEvaluationLanguage CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellLabelStyle CellLabelTemplate CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterArray CenterDot CentralFeature CentralMoment CentralMomentGeneratingFunction Cepstrogram CepstrogramArray CepstrumArray CForm ChampernowneNumber ChangeOptions ChannelBase ChannelBrokerAction ChannelDatabin ChannelHistoryLength ChannelListen ChannelListener ChannelListeners ChannelListenerWait ChannelObject ChannelPreSendFunction ChannelReceiverFunction ChannelSend ChannelSubscribers ChanVeseBinarize Character CharacterCounts CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterName CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop ChromaticityPlot ChromaticityPlot3D ChromaticPolynomial Circle CircleBox CircleDot CircleMinus CirclePlus CirclePoints CircleThrough CircleTimes CirculantGraph CircularOrthogonalMatrixDistribution CircularQuaternionMatrixDistribution CircularRealMatrixDistribution CircularSymplecticMatrixDistribution CircularUnitaryMatrixDistribution Circumsphere CityData ClassifierFunction ClassifierInformation ClassifierMeasurements ClassifierMeasurementsObject Classify ClassPriors Clear ClearAll ClearAttributes ClearCookies ClearPermissions ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipPlanesStyle ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent CloudAccountData CloudBase CloudConnect CloudDeploy CloudDirectory CloudDisconnect CloudEvaluate CloudExport CloudExpression CloudExpressions CloudFunction CloudGet CloudImport CloudLoggingData CloudObject CloudObjectInformation CloudObjectInformationData CloudObjectNameFormat CloudObjects CloudObjectURLType CloudPublish CloudPut CloudRenderingMethod CloudSave CloudShare CloudSubmit CloudSymbol CloudUnshare ClusterClassify ClusterDissimilarityFunction ClusteringComponents ClusteringTree CMYKColor Coarse CodeAssistOptions Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorBalance ColorCombine ColorConvert ColorCoverage ColorData ColorDataFunction ColorDetect ColorDistance ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQ ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorsNear ColorSpace ColorToneMapping Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CombinedEntityClass CombinerFunction CometData CommonDefaultFormatTypes Commonest CommonestFilter CommonName CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompanyData CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledCodeFunction CompiledFunction CompilerOptions Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComplexListPlot ComplexPlot ComplexPlot3D ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries CompositeQ Composition CompoundElement CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData ComputeUncertainty Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath ConformAudio ConformImages Congruent ConicHullRegion ConicHullRegion3DBox ConicHullRegionBox ConicOptimization Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphComponents ConnectedGraphQ ConnectedMeshComponents ConnectedMoleculeComponents ConnectedMoleculeQ ConnectionSettings ConnectLibraryCallbackFunction ConnectSystemModelComponents ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray ConstantArrayLayer ConstantImage ConstantPlusLayer ConstantRegionQ Constants ConstantTimesLayer ConstellationData ConstrainedMax ConstrainedMin Construct Containing ContainsAll ContainsAny ContainsExactly ContainsNone ContainsOnly ContentFieldOptions ContentLocationFunction ContentObject ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTask ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean ContrastiveLossLayer Control ControlActive ControlAlignment ControlGroupContentsBox ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket ConvexHullMesh ConvexPolygonQ ConvexPolyhedronQ ConvolutionLayer Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CookieFunction Cookies CoordinateBoundingBox CoordinateBoundingBoxArray CoordinateBounds CoordinateBoundsArray CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDatabin CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CountDistinct CountDistinctBy CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Counts CountsBy Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateCellID CreateChannel CreateCloudExpression CreateDatabin CreateDataSystemModel CreateDialog CreateDirectory CreateDocument CreateFile CreateIntermediateDirectories CreateManagedLibraryExpression CreateNotebook CreatePalette CreatePalettePacket CreatePermissionsGroup CreateScheduledTask CreateSearchIndex CreateSystemModel CreateTemporary CreateUUID CreateWindow CriterionFunction CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossEntropyLossLayer CrossingCount CrossingDetect CrossingPolygon CrossMatrix Csc Csch CTCLossLayer Cube CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrencyConvert CurrentDate CurrentImage CurrentlySpeakingPacket CurrentNotebookImage CurrentScreenImage CurrentValue Curry CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecompositionD DagumDistribution DamData DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DatabaseConnect DatabaseDisconnect DatabaseReference Databin DatabinAdd DatabinRemove Databins DatabinUpload DataCompression DataDistribution DataRange DataReversed Dataset Date DateBounds Dated DateDelimiters DateDifference DatedUnit DateFormat DateFunction DateHistogram DateList DateListLogPlot DateListPlot DateListStepPlot DateObject DateObjectQ DateOverlapsQ DatePattern DatePlus DateRange DateReduction DateString DateTicksFormat DateValue DateWithinQ DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayHemisphere DaylightQ DayMatchQ DayName DayNightTerminator DayPlus DayRange DayRound DeBruijnGraph DeBruijnSequence Debug DebugTag Decapitalize Decimal DecimalForm DeclareKnownSymbols DeclarePackage Decompose DeconvolutionLayer Decrement Decrypt DecryptFile DedekindEta DeepSpaceProbeData Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultPrintPrecision DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValue DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod DefineResourceFunction Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic DEigensystem DEigenvalues Deinitialization Del DelaunayMesh Delayed Deletable Delete DeleteAnomalies DeleteBorderComponents DeleteCases DeleteChannel DeleteCloudExpression DeleteContents DeleteDirectory DeleteDuplicates DeleteDuplicatesBy DeleteFile DeleteMissing DeleteObject DeletePermissionsKey DeleteSearchIndex DeleteSmallComponents DeleteStopwords DeleteWithContents DeletionWarning DelimitedArray DelimitedSequence Delimiter DelimiterFlashTime DelimiterMatching Delimiters DeliveryFunction Dendrogram Denominator DensityGraphics DensityHistogram DensityPlot DensityPlot3D DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DerivedKey DescriptorStateSpace DesignMatrix DestroyAfterEvaluation Det DeviceClose DeviceConfigure DeviceExecute DeviceExecuteAsynchronous DeviceObject DeviceOpen DeviceOpenQ DeviceRead DeviceReadBuffer DeviceReadLatest DeviceReadList DeviceReadTimeSeries Devices DeviceStreams DeviceWrite DeviceWriteBuffer DGaussianWavelet DiacriticalPositioning Diagonal DiagonalizableMatrixQ DiagonalMatrix DiagonalMatrixQ Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DictionaryWordQ DifferenceDelta DifferenceOrder DifferenceQuotient DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitalSignature DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralAngle DihedralGroup Dilation DimensionalCombinations DimensionalMeshComponents DimensionReduce DimensionReducerFunction DimensionReduction Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletBeta DirichletCharacter DirichletCondition DirichletConvolve DirichletDistribution DirichletEta DirichletL DirichletLambda DirichletTransform DirichletWindow DisableConsolePrintPacket DisableFormatting DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLimit DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscreteMaxLimit DiscreteMinLimit DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform DiscretizeGraphics DiscretizeRegion Discriminant DisjointQ Disjunction Disk DiskBox DiskMatrix DiskSegment Dispatch DispatchQ DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceMatrix DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers DivideSides Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentGenerator DocumentGeneratorInformation DocumentGeneratorInformationData DocumentGenerators DocumentNotebook DocumentWeightingRules Dodecahedron DomainRegistrationInformation DominantColors DOSTextFormat Dot DotDashed DotEqual DotLayer DotPlusLayer Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DropoutLayer DSolve DSolveValue Dt DualLinearProgramming DualPolyhedron DualSystemsModel DumpGet DumpSave DuplicateFreeQ Duration Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicGeoGraphics DynamicImage DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptionsE EarthImpactData EarthquakeData EccentricityCentrality Echo EchoFunction EclipseType EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeContract EdgeCost EdgeCount EdgeCoverQ EdgeCycleMatrix EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight EdgeWeightedGraphQ Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData ElementwiseLayer ElidedForms Eliminate EliminationOrder Ellipsoid EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmbedCode EmbeddedHTML EmbeddedService EmbeddingLayer EmbeddingObject EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EmptyRegion EnableConsolePrintPacket Enabled Encode Encrypt EncryptedObject EncryptFile End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfBuffer EndOfFile EndOfLine EndOfString EndPackage EngineEnvironment EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entity EntityClass EntityClassList EntityCopies EntityFunction EntityGroup EntityInstance EntityList EntityPrefetch EntityProperties EntityProperty EntityPropertyClass EntityRegister EntityStore EntityStores EntityTypeName EntityUnregister EntityValue Entropy EntropyFilter Environment Epilog EpilogFunction Equal EqualColumns EqualRows EqualTilde EqualTo EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EscapeRadius EstimatedBackground EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerAngles EulerCharacteristic EulerE EulerGamma EulerianGraphQ EulerMatrix EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluateScheduledTask EvaluationBox EvaluationCell EvaluationCompletionAction EvaluationData EvaluationElements EvaluationEnvironment EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels EventSeries ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludedLines ExcludedPhysicalQuantities ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog ExoplanetData Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi ExpirationDate Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportByteArray ExportForm ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpressionUUID ExpToTrig ExtendedEntityClass ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalBundle ExternalCall ExternalDataCharacterEncoding ExternalEvaluate ExternalFunction ExternalFunctionName ExternalObject ExternalOptions ExternalSessionObject ExternalSessions ExternalTypeSignature ExternalValue Extract ExtractArchive ExtractLayer ExtremeValueDistributionFaceForm FaceGrids FaceGridsStyle FacialFeatures Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail Failure FailureAction FailureDistribution FailureQ False FareySequence FARIMAProcess FeatureDistance FeatureExtract FeatureExtraction FeatureExtractor FeatureExtractorFunction FeatureNames FeatureNearest FeatureSpacePlot FeatureSpacePlot3D FeatureTypes FEDisableConsolePrintPacket FeedbackLinearize FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket FetalGrowthData Fibonacci Fibonorial FieldCompletionFunction FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileConvert FileDate FileExistsQ FileExtension FileFormat FileHandler FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameForms FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileSize FileSystemMap FileSystemScan FileTemplate FileTemplateApply FileType FilledCurve FilledCurveBox FilledCurveBoxOptions Filling FillingStyle FillingTransform FilteredEntityClass FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindAnomalies FindArgMax FindArgMin FindChannels FindClique FindClusters FindCookies FindCurvePath FindCycle FindDevices FindDistribution FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEdgeIndependentPaths FindEquationalProof FindEulerianCycle FindExternalEvaluators FindFaces FindFile FindFit FindFormula FindFundamentalCycles FindGeneratingFunction FindGeoLocation FindGeometricConjectures FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindHamiltonianPath FindHiddenMarkovStates FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMatchingColor FindMaximum FindMaximumFlow FindMaxValue FindMeshDefects FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindMoleculeSubstructure FindPath FindPeaks FindPermutation FindPostmanTour FindProcessParameters FindRepeat FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindSpanningTree FindSystemModelEquilibrium FindTextualAnswer FindThreshold FindTransientRepeat FindVertexCover FindVertexCut FindVertexIndependentPaths Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstCase FirstPassageTimeDistribution FirstPosition FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FitRegularization FittedModel FixedOrder FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlattenLayer FlatTopWindow FlipView Floor FlowPolynomial FlushPrintOutputPacket Fold FoldList FoldPair FoldPairList FollowRedirects Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FormControl FormFunction FormLayoutFunction FormObject FormPage FormTheme FormulaData FormulaLookup FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalGaussianNoiseProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameRate FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrenetSerretSystem FrequencySamplingFilterKernel FresnelC FresnelF FresnelG FresnelS Friday FrobeniusNumber FrobeniusSolve FromAbsoluteTime FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS FromEntity FromJulianDate FromLetterNumber FromPolarCoordinates FromRomanNumeral FromSphericalCoordinates FromUnixTime Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullInformationOutputRegulator FullOptions FullRegion FullSimplify Function FunctionCompile FunctionCompileExport FunctionCompileExportByteArray FunctionCompileExportLibrary FunctionCompileExportString FunctionDomain FunctionExpand FunctionInterpolation FunctionPeriod FunctionRange FunctionSpace FussellVeselyImportanceGaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins GalaxyData GalleryView Gamma GammaDistribution GammaRegularized GapPenalty GARCHProcess GatedRecurrentLayer Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianOrthogonalMatrixDistribution GaussianSymplecticMatrixDistribution GaussianUnitaryMatrixDistribution GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateAsymmetricKeyPair GenerateConditions GeneratedCell GeneratedDocumentBinding GenerateDerivedKey GenerateDigitalSignature GenerateDocument GeneratedParameters GeneratedQuantityMagnitudes GenerateHTTPResponse GenerateSecuredAuthenticationKey GenerateSymmetricKey GeneratingFunction GeneratorDescription GeneratorHistoryLength GeneratorOutputType Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeoAntipode GeoArea GeoArraySize GeoBackground GeoBoundingBox GeoBounds GeoBoundsRegion GeoBubbleChart GeoCenter GeoCircle GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDisk GeoDisplacement GeoDistance GeoDistanceList GeoElevationData GeoEntities GeoGraphics GeogravityModelData GeoGridDirectionDifference GeoGridLines GeoGridLinesStyle GeoGridPosition GeoGridRange GeoGridRangePadding GeoGridUnitArea GeoGridUnitDistance GeoGridVector GeoGroup GeoHemisphere GeoHemisphereBoundary GeoHistogram GeoIdentify GeoImage GeoLabels GeoLength GeoListPlot GeoLocation GeologicalPeriodData GeomagneticModelData GeoMarker GeometricAssertion GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricScene GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoModel GeoNearest GeoPath GeoPosition GeoPositionENU GeoPositionXYZ GeoProjection GeoProjectionData GeoRange GeoRangePadding GeoRegionValuePlot GeoResolution GeoScaleBar GeoServer GeoSmoothHistogram GeoStreamPlot GeoStyling GeoStylingImageFunction GeoVariant GeoVector GeoVectorENU GeoVectorPlot GeoVectorXYZ GeoVisibleRegion GeoVisibleRegionBoundary GeoWithinQ GeoZoomLevel GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenAngle GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter GrammarApply GrammarRules GrammarToken Graph Graph3D GraphAssortativity GraphAutomorphismGroup GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel Greater GreaterEqual GreaterEqualLess GreaterEqualThan GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterThan GreaterTilde Green GreenFunction Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupBy GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators Groupings GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain GroupTogetherGrouping GroupTogetherNestedGrouping GrowCutComponents Gudermannian GuidedFilter GumbelDistributionHaarWavelet HadamardMatrix HalfLine HalfNormalDistribution HalfPlane HalfSpace HamiltonianGraphQ HammingDistance HammingWindow HandlerFunctions HandlerFunctionsKeys HankelH1 HankelH2 HankelMatrix HankelTransform HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash Haversine HazardFunction Head HeadCompose HeaderLines Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings Here HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenMarkovProcess HiddenSurface Highlighted HighlightGraph HighlightImage HighlightMesh HighpassFilter HigmanSimsGroupHS HilbertCurve HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HistoricalPeriodData HitMissTransform HITSCentrality HjorthDistribution HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HostLookup HotellingTSquareDistribution HoytDistribution HTMLSave HTTPErrorResponse HTTPRedirect HTTPRequest HTTPRequestData HTTPResponse Hue HumanGrowthData HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyperplane Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestDataI IconData Iconize IconizedObject IconRules Icosahedron Identity IdentityMatrix If IgnoreCase IgnoreDiacritics IgnorePunctuation IgnoreSpellCheck IgnoringInactive Im Image Image3D Image3DProjection Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageApplyIndexed ImageAspectRatio ImageAssemble ImageAugmentationLayer ImageBoundingBoxes ImageCache ImageCacheValid ImageCapture ImageCaptureFunction ImageCases ImageChannels ImageClip ImageCollage ImageColorSpace ImageCompose ImageContainsQ ImageContents ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDisplacements ImageDistance ImageEffect ImageExposureCombine ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageFocusCombine ImageForestingComponents ImageFormattingWidth ImageForwardTransformation ImageGraphics ImageHistogram ImageIdentify ImageInstanceQ ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarker ImageMarkers ImageMeasurements ImageMesh ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImagePosition ImagePreviewFunction ImagePyramid ImagePyramidApply ImageQ ImageRangeCache ImageRecolor ImageReflect ImageRegion ImageResize ImageResolution ImageRestyle ImageRotate ImageRotated ImageSaliencyFilter ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions ImagingDevice ImplicitRegion Implies Import ImportAutoReplacements ImportByteArray ImportOptions ImportString ImprovementImportance In Inactivate Inactive IncidenceGraph IncidenceList IncidenceMatrix IncludeAromaticBonds IncludeConstantBasis IncludeDefinitions IncludeDirectories IncludeFileExtension IncludeGeneratorTasks IncludeHydrogens IncludeInflections IncludeMetaInformation IncludePods IncludeQuantities IncludeRelatedTables IncludeSingularTerm IncludeWindowTimes Increment IndefiniteMatrixQ Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentPhysicalQuantity IndependentUnit IndependentUnitDimension IndependentVertexSetQ Indeterminate IndeterminateThreshold IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers InfiniteLine InfinitePlane Infinity Infix InflationAdjust InflationMethod Information InformationData InformationDataGrid Inherited InheritScope InhomogeneousPoissonProcess InitialEvaluationHistory Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InitializationObjects InitializationValue Initialize InitialSeeding InlineCounterAssignments InlineCounterIncrements InlineRules Inner InnerPolygon InnerPolyhedron Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionFunction InsertionPointObject InsertLinebreaks InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Insphere Install InstallService InstanceNormalizationLayer InString Integer IntegerDigits IntegerExponent IntegerLength IntegerName IntegerPart IntegerPartitions IntegerQ IntegerReverse Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction Interpreter InterpretTemplate InterquartileRange Interrupt InterruptSettings IntersectingQ Intersection Interval IntervalIntersection IntervalMarkers IntervalMarkersStyle IntervalMemberQ IntervalSlider IntervalUnion Into Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHankelTransform InverseHaversine InverseImagePyramid InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InverseMellinTransform InversePermutation InverseRadon InverseRadonTransform InverseSeries InverseShortTimeFourier InverseSpectrogram InverseSurvivalFunction InverseTransformedRegion InverseWaveletTransform InverseWeierstrassP InverseWishartMatrixDistribution InverseZTransform Invisible InvisibleApplication InvisibleTimes IPAddress IrreduciblePolynomialQ IslandData IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemAspectRatio ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcessJaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join JoinAcross Joined JoinedCurve JoinedCurveBox JoinedCurveBoxOptions JoinForm JordanDecomposition JordanModelDecomposition JulianDate JuliaSetBoettcher JuliaSetIterationCount JuliaSetPlot JuliaSetPointsK KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KEdgeConnectedComponents KEdgeConnectedGraphQ KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelFunction KernelMixtureDistribution Kernels Ket Key KeyCollisionFunction KeyComplement KeyDrop KeyDropFrom KeyExistsQ KeyFreeQ KeyIntersection KeyMap KeyMemberQ KeypointStrength Keys KeySelect KeySort KeySortBy KeyTake KeyUnion KeyValueMap KeyValuePattern Khinchin KillProcess KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnapsackSolve KnightTourGraph KnotData KnownUnitQ KochCurve KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter KVertexConnectedComponents KVertexConnectedGraphQLABColor Label Labeled LabeledSlider LabelingFunction LabelingSize LabelStyle LabelVisibility LaguerreL LakeData LambdaComponents LambertW LaminaData LanczosWindow LandauDistribution Language LanguageCategory LanguageData LanguageIdentify LanguageOptions LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCHColor LCM LeaderSize LeafCount LeapYearQ LearnDistribution LearnedDistribution LearningRate LearningRateMultipliers LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessEqualThan LessFullEqual LessGreater LessLess LessSlantEqual LessThan LessTilde LetterCharacter LetterCounts LetterNumber LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryDataType LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox Line3DBoxOptions LinearFilter LinearFractionalOptimization LinearFractionalTransform LinearGradientImage LinearizingTransformationData LinearLayer LinearModelFit LinearOffsetFunction LinearOptimization LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBoxOptions LineBreak LinebreakAdjustments LineBreakChart LinebreakSemicolonWeighting LineBreakWithin LineColor LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRankCentrality LinkRead LinkReadHeld LinkReadyQ Links LinkService LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot ListDensityPlot3D Listen ListFormat ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListSliceContourPlot3D ListSliceDensityPlot3D ListSliceVectorPlot3D ListStepPlot ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalAdaptiveBinarize LocalCache LocalClusteringCoefficient LocalizeDefinitions LocalizeVariables LocalObject LocalObjects LocalResponseNormalizationLayer LocalSubmit LocalSymbol LocalTime LocalTimeZone LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogisticSigmoid LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongestOrderedSequence LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow LongShortTermMemoryLayer Lookup Loopback LoopFreeGraphQ LossFunction LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowerTriangularMatrixQ LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LunarEclipse LUVColor LyapunovSolve LyonsGroupLyMachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MailAddressValidation MailExecute MailFolder MailItem MailReceiverFunction MailResponseFunction MailSearch MailServerConnect MailServerConnection MailSettings MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules ManagedLibraryExpressionID ManagedLibraryExpressionQ MandelbrotSetBoettcher MandelbrotSetDistance MandelbrotSetIterationCount MandelbrotSetMemberQ MandelbrotSetPlot MangoldtLambda ManhattanDistance Manipulate Manipulator MannedSpaceMissionData MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarchenkoPasturDistribution MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicalFunctionData MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixNormalDistribution MatrixPlot MatrixPower MatrixPropertyDistribution MatrixQ MatrixRank MatrixTDistribution Max MaxBend MaxCellMeasure MaxColorDistance MaxDetect MaxDuration MaxExtraBandwidths MaxExtraConditions MaxFeatureDisplacement MaxFeatures MaxFilter MaximalBy Maximize MaxItems MaxIterations MaxLimit MaxMemoryUsed MaxMixtureKernels MaxOverlapFraction MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxTrainingRounds MaxValue MaxwellDistribution MaxWordGap McLaughlinGroupMcL Mean MeanAbsoluteLossLayer MeanAround MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter MeanSquaredLossLayer Median MedianDeviation MedianFilter MedicalTestData Medium MeijerG MeijerGReduce MeixnerDistribution MellinConvolve MellinTransform MemberQ MemoryAvailable MemoryConstrained MemoryConstraint MemoryInUse MengerMesh Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuList MenuPacket MenuSortingValue MenuStyle MenuView Merge MergeDifferences MergingFunction MersennePrimeExponent MersennePrimeExponentQ Mesh MeshCellCentroid MeshCellCount MeshCellHighlight MeshCellIndex MeshCellLabel MeshCellMarker MeshCellMeasure MeshCellQuality MeshCells MeshCellShapeFunction MeshCellStyle MeshCoordinates MeshFunctions MeshPrimitives MeshQualityGoal MeshRange MeshRefinementFunction MeshRegion MeshRegionQ MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageObject MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation MeteorShowerData Method MethodOptions MexicanHatWavelet MeyerWavelet Midpoint Min MinColorDistance MinDetect MineralData MinFilter MinimalBy MinimalPolynomial MinimalStateSpaceModel Minimize MinimumTimeIncrement MinIntervalSize MinkowskiQuestionMark MinLimit MinMax MinorPlanetData Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingBehavior MissingDataMethod MissingDataRules MissingQ MissingString MissingStyle MissingValuePattern MittagLefflerE MixedFractionParts MixedGraphQ MixedMagnitude MixedRadix MixedRadixQuantity MixedUnit MixtureDistribution Mod Modal Mode Modular ModularInverse ModularLambda Module Modulus MoebiusMu Molecule MoleculeContainsQ MoleculeEquivalentQ MoleculeGraph MoleculeModify MoleculePattern MoleculePlot MoleculePlot3D MoleculeProperty MoleculeQ MoleculeValue Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction MomentOfInertia Monday Monitor MonomialList MonomialOrder MonsterGroupM MoonPhase MoonPosition MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform MortalityData Most MountainData MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovieData MovingAverage MovingMap MovingMedian MoyalDistribution Multicolumn MultiedgeStyle MultigraphQ MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity MultiplySides Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistributionN NakagamiDistribution NameQ Names NamespaceBox NamespaceBoxOptions Nand NArgMax NArgMin NBernoulliB NBodySimulation NBodySimulationData NCache NDEigensystem NDEigenvalues NDSolve NDSolveValue Nearest NearestFunction NearestNeighborGraph NearestTo NebulaData NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeDefiniteMatrixQ NegativeIntegers NegativeMultinomialDistribution NegativeRationals NegativeReals NegativeSemidefiniteMatrixQ NeighborhoodData NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestGraph NestList NestWhile NestWhileList NetAppend NetBidirectionalOperator NetChain NetDecoder NetDelete NetDrop NetEncoder NetEvaluationMode NetExtract NetFlatten NetFoldOperator NetGraph NetInformation NetInitialize NetInsert NetInsertSharedArrays NetJoin NetMapOperator NetMapThreadOperator NetMeasurements NetModel NetNestOperator NetPairEmbeddingOperator NetPort NetPortGradient NetPrepend NetRename NetReplace NetReplacePart NetSharedArray NetStateObject NetTake NetTrain NetTrainResultsObject NetworkPacketCapture NetworkPacketRecording NetworkPacketRecordingDuring NetworkPacketTrace NeumannValue NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextCell NextDate NextPrime NextScheduledTaskTime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NightHemisphere NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants NondimensionalizationTransform None NoneTrue NonlinearModelFit NonlinearStateSpaceModel NonlocalMeansFilter NonNegative NonNegativeIntegers NonNegativeRationals NonNegativeReals NonPositive NonPositiveIntegers NonPositiveRationals NonPositiveReals Nor NorlundB Norm Normal NormalDistribution NormalGrouping NormalizationLayer Normalize Normalized NormalizedSquaredEuclideanDistance NormalMatrixQ NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookImport NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookTemplate NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde Nothing NotHumpDownHump NotHumpEqual NotificationFunction NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar Now NoWhitespace NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms NuclearExplosionData NuclearReactorData Null NullRecords NullSpace NullWords Number NumberCompose NumberDecompose NumberExpand NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberLinePlot NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumeratorDenominator NumericalOrder NumericalSort NumericArray NumericArrayQ NumericArrayType NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlotO ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OceanData Octahedron OddQ Off Offset OLEData On ONanGroupON Once OneIdentity Opacity OpacityFunction OpacityFunctionScaling Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionalElement OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering OrderingBy OrderingLayer Orderless OrderlessPatternSequence OrnsteinUhlenbeckProcess Orthogonalize OrthogonalMatrixQ Out Outer OuterPolygon OuterPolyhedron OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OverwriteTarget OwenT OwnValuesPackage PackingMethod PaddedForm Padding PaddingLayer PaddingSize PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageTheme PageWidth Pagination PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath PalindromeQ Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo Parallelepiped ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds Parallelogram ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParametricRegion ParentBox ParentCell ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParentNotebook ParetoDistribution ParetoPickandsDistribution ParkData Part PartBehavior PartialCorrelationFunction PartialD ParticleAcceleratorData ParticleData Partition PartitionGranularity PartitionsP PartitionsQ PartLayer PartOfSpeech PartProtection ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteAutoQuoteCharacters PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PeakDetect PeanoCurve PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PercentForm PerfectNumber PerfectNumberQ PerformanceGoal Perimeter PeriodicBoundaryCondition PeriodicInterpolation Periodogram PeriodogramArray Permanent Permissions PermissionsGroup PermissionsGroupMemberQ PermissionsGroups PermissionsKey PermissionsKeys PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PerpendicularBisector PersistenceLocation PersistenceTime PersistentObject PersistentObjects PersistentValue PersonData PERTDistribution PetersenGraph PhaseMargins PhaseRange PhysicalSystemData Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest PingTime Pink PitchRecognize Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarAngle PlanarGraph PlanarGraphQ PlanckRadiationLaw PlaneCurveData PlanetaryMoonData PlanetData PlantData Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLabels PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangeClipPlanesStyle PlotRangePadding PlotRegion PlotStyle PlotTheme Pluralize Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox Point3DBoxOptions PointBox PointBoxOptions PointFigureChart PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonalNumber PolygonAngle PolygonBox PolygonBoxOptions PolygonCoordinates PolygonDecomposition PolygonHoleScale PolygonIntersections PolygonScale Polyhedron PolyhedronAngle PolyhedronCoordinates PolyhedronData PolyhedronDecomposition PolyhedronGenus PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PoolingLayer PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position PositionIndex Positive PositiveDefiniteMatrixQ PositiveIntegers PositiveRationals PositiveReals PositiveSemidefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerRange PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement Predict PredictionRoot PredictorFunction PredictorInformation PredictorMeasurements PredictorMeasurementsObject PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependLayer PrependTo PreprocessingRules PreserveColor PreserveImageOptions Previous PreviousCell PreviousDate PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitivePolynomialQ PrimitiveRoot PrimitiveRootList PrincipalComponents PrincipalValue Print PrintableASCIIQ PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment Printout3D Printout3DPreviewer PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateKey PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessConnection ProcessDirectory ProcessEnvironment Processes ProcessEstimator ProcessInformation ProcessObject ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessStatus ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm ProofObject Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse PsychrometricPropertyData PublicKey PublisherID PulsarData PunctuationCharacter Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptionsQBinomial QFactorial QGamma QHypergeometricPFQ QnDispersion QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ QuadraticOptimization Quantile QuantilePlot Quantity QuantityArray QuantityDistribution QuantityForm QuantityMagnitude QuantityQ QuantityUnit QuantityVariable QuantityVariableCanonicalUnit QuantityVariableDimensions QuantityVariableIdentifier QuantityVariablePhysicalQuantity Quartics QuartileDeviation Quartiles QuartileSkewness Query QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainderRadialGradientImage RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RadonTransform RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Ramp Random RandomChoice RandomColor RandomComplex RandomEntity RandomFunction RandomGeoPosition RandomGraph RandomImage RandomInstance RandomInteger RandomPermutation RandomPoint RandomPolygon RandomPolyhedron RandomPrime RandomReal RandomSample RandomSeed RandomSeeding RandomVariate RandomWalkProcess RandomWord Range RangeFilter RangeSpecification RankedMax RankedMin RarerProbability Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadByteArray ReadLine ReadList ReadProtected ReadString Real RealAbs RealBlockDiagonalForm RealDigits RealExponent Reals RealSign Reap RecognitionPrior RecognitionThreshold Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RectangularRepeatingElement RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate Region RegionBinarize RegionBoundary RegionBounds RegionCentroid RegionDifference RegionDimension RegionDisjoint RegionDistance RegionDistanceFunction RegionEmbeddingDimension RegionEqual RegionFunction RegionImage RegionIntersection RegionMeasure RegionMember RegionMemberFunction RegionMoment RegionNearest RegionNearestFunction RegionPlot RegionPlot3D RegionProduct RegionQ RegionResize RegionSize RegionSymmetricDifference RegionUnion RegionWithin RegisterExternalEvaluator RegularExpression Regularization RegularlySampledQ RegularPolygon ReIm ReImLabels ReImPlot ReImStyle Reinstall RelationalDatabase RelationGraph Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot RemoteAuthorizationCaching RemoteConnect RemoteConnectionObject RemoteFile RemoteRun RemoteRunProcess Remove RemoveAlphaChannel RemoveAsynchronousTask RemoveAudioStream RemoveBackground RemoveChannelListener RemoveChannelSubscribers Removed RemoveDiacritics RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RemoveUsers RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart RepairMesh Repeated RepeatedNull RepeatedString RepeatedTiming RepeatingElement Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated ReplicateLayer RequiredPhysicalQuantities Resampling ResamplingAlgorithmData ResamplingMethod Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask ReshapeLayer Residue ResizeLayer Resolve ResourceAcquire ResourceData ResourceFunction ResourceObject ResourceRegister ResourceRemove ResourceSearch ResourceSubmissionObject ResourceSubmit ResourceSystemBase ResourceUpdate ResponseForm Rest RestartInterval Restricted Resultant ResumePacket Return ReturnEntersInput ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnReceiptFunction ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseSort ReverseSortBy ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ RiemannXi Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightComposition RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity RollPitchYawAngles RollPitchYawMatrix RomanNumeral Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RSolveValue RudinShapiro RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulePlot RulerUnits Run RunProcess RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilaritySameQ SameTest SampledEntityClass SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SASTriangle SatelliteData SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveConnection SaveDefinitions SavitzkyGolayMatrix SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTask ScheduledTaskActiveQ ScheduledTaskInformation ScheduledTaskInformationData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScientificNotationThreshold ScorerGi ScorerGiPrime ScorerHi ScorerHiPrime ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptForm ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition SearchAdjustment SearchIndexObject SearchIndices SearchQueryString SearchResultObject Sec Sech SechDistribution SecondOrderConeOptimization SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SecuredAuthenticationKey SecuredAuthenticationKeys SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook SelectFirst Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemanticImport SemanticImportString SemanticInterpretation SemialgebraicComponentInstances SemidefiniteOptimization SendMail SendMessage Sequence SequenceAlignment SequenceAttentionLayer SequenceCases SequenceCount SequenceFold SequenceFoldList SequenceForm SequenceHold SequenceLastLayer SequenceMostLayer SequencePosition SequencePredict SequencePredictorFunction SequenceReplace SequenceRestLayer SequenceReverseLayer SequenceSplit Series SeriesCoefficient SeriesData ServiceConnect ServiceDisconnect ServiceExecute ServiceObject ServiceRequest ServiceResponse ServiceSubmit SessionSubmit SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetCloudDirectory SetCookies SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPermissions SetPrecision SetProperty SetSecuredAuthenticationKey SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemModel SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetUsers SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share SharingList Sharpen ShearingMatrix ShearingTransform ShellRegion ShenCastanMatrix ShiftedGompertzDistribution ShiftRegisterSequence Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortTimeFourier ShortTimeFourierData ShortUpArrow Show ShowAutoConvert ShowAutoSpellCheck ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowCodeAssist ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiderealTime SiegelTheta SiegelTukeyTest SierpinskiCurve SierpinskiMesh Sign Signature SignedRankTest SignedRegionDistance SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ SimplePolygonQ SimplePolyhedronQ Simplex Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution SkinStyle Skip SliceContourPlot3D SliceDensityPlot3D SliceDistribution SliceVectorPlot3D Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDecomposition SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SnDispersion Snippet SnubPolyhedron SocialMediaData Socket SocketConnect SocketListen SocketListener SocketObject SocketOpen SocketReadMessage SocketReadyQ Sockets SocketWaitAll SocketWaitNext SoftmaxLayer SokalSneathDissimilarity SolarEclipse SolarSystemFeatureData SolidAngle SolidData SolidRegionQ Solve SolveAlways SolveDelayed Sort SortBy SortedBy SortedEntityClass Sound SoundAndGraphics SoundNote SoundVolume SourceLink Sow Space SpaceCurveData SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution SpatialMedian SpatialTransformationLayer Speak SpeakTextPacket SpearmanRankTest SpearmanRho SpeciesData SpecificityGoal SpectralLineData Spectrogram SpectrogramArray Specularity SpeechRecognize SpeechSynthesize SpellingCorrection SpellingCorrectionList SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SpherePoints SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SphericalShell SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquareMatrixQ SquareRepeatingElement SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave SSSTriangle StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackedDateListPlot StackedListPlot StackInhibit StadiumShape StandardAtmosphereData StandardDeviation StandardDeviationFilter StandardForm Standardize Standardized StandardOceanData StandbyDistribution Star StarClusterData StarData StarGraph StartAsynchronousTask StartExternalSession StartingStepSize StartOfLine StartOfString StartProcess StartScheduledTask StartupSound StartWebSession StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StateTransformationLinearize StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StereochemistryElements StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StoppingPowerData StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamMarkers StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringContainsQ StringCount StringDelete StringDrop StringEndsQ StringExpression StringExtract StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPadLeft StringPadRight StringPart StringPartition StringPosition StringQ StringRepeat StringReplace StringReplaceList StringReplacePart StringReverse StringRiffle StringRotateLeft StringRotateRight StringSkeleton StringSplit StringStartsQ StringTake StringTemplate StringToByteArray StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleData StyleDefinitions StyleForm StyleHints StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subdivide Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subsequences Subset SubsetEqual SubsetMap SubsetQ Subsets SubStar SubstitutionSystem Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubtractSides SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde Success SuchThat Sum SumConvergence SummationLayer Sunday SunPosition Sunrise Sunset SuperDagger SuperMinus SupernovaData SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceArea SurfaceColor SurfaceData SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricKey SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Synonyms Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SynthesizeMissingValues SystemDialogInput SystemException SystemGet SystemHelpPath SystemInformation SystemInformationData SystemInstall SystemModel SystemModeler SystemModelExamples SystemModelLinearize SystemModelParametricSimulate SystemModelPlot SystemModelProgressReporting SystemModelReliability SystemModels SystemModelSimulate SystemModelSimulateSensitivity SystemModelSimulationData SystemOpen SystemOptions SystemProcessData SystemProcesses SystemsConnectionsModel SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelLinearity SystemsModelMerge SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemsModelVectorRelativeOrders SystemStub SystemTestTab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TableViewBoxBackground TableViewBoxOptions TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeDrop TakeLargest TakeLargestBy TakeList TakeSmallest TakeSmallestBy TakeWhile Tally Tan Tanh TargetDevice TargetFunctions TargetSystem TargetUnits TaskAbort TaskExecute TaskObject TaskRemove TaskResume Tasks TaskSuspend TaskWait TautologyQ TelegraphProcess TemplateApply TemplateArgBox TemplateBox TemplateBoxOptions TemplateEvaluate TemplateExpression TemplateIf TemplateObject TemplateSequence TemplateSlot TemplateSlotSequence TemplateUnevaluated TemplateVerbatim TemplateWith TemporalData TemporalRegularity Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge TestID TestReport TestReportObject TestResultObject Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCases TextCell TextClipboardType TextContents TextData TextElement TextForm TextGrid TextJustification TextLine TextPacket TextParagraph TextPosition TextRecognize TextSearch TextSearchReport TextSentences TextString TextStructure TextStyle TextTranslation Texture TextureCoordinateFunction TextureCoordinateScaling TextWords Therefore ThermodynamicData ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreadingLayer ThreeJSymbol Threshold Through Throw ThueMorse Thumbnail Thursday Ticks TicksStyle TideData Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint TimeDirection TimeFormat TimeGoal TimelinePlot TimeObject TimeObjectQ Times TimesBy TimeSeries TimeSeriesAggregate TimeSeriesForecast TimeSeriesInsert TimeSeriesInvertibility TimeSeriesMap TimeSeriesMapThread TimeSeriesModel TimeSeriesModelFit TimeSeriesResample TimeSeriesRescale TimeSeriesShift TimeSeriesThread TimeSeriesWindow TimeUsed TimeValue TimeWarpingCorrespondence TimeWarpingDistance TimeZone TimeZoneConvert TimeZoneOffset Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate Today ToDiscreteTimeModel ToEntity ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase Tomorrow ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform ToPolarCoordinates TopologicalSort ToRadicals ToRules ToSphericalCoordinates ToString Total TotalHeight TotalLayer TotalVariationFilter TotalWidth TouchPosition TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TrackingFunction TracyWidomDistribution TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TrainingProgressCheckpointing TrainingProgressFunction TrainingProgressMeasurements TrainingProgressReporting TrainingStoppingCriterion TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationClass TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField TransformedProcess TransformedRegion TransitionDirection TransitionDuration TransitionEffect TransitiveClosureGraph TransitiveReductionGraph Translate TranslationOptions TranslationTransform Transliterate Transparent TransparentColor Transpose TransposeLayer TrapSelection TravelDirections TravelDirectionsData TravelDistance TravelDistanceList TravelMethod TravelTime TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle Triangle TriangleCenter TriangleConstruct TriangleMeasurement TriangleWave TriangularDistribution TriangulateMesh Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean TrimmedVariance TropicalStormData True TrueQ TruncatedDistribution TruncatedPolyhedron TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBoxOptions TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow TunnelData Tuples TuranGraph TuringMachine TuttePolynomial TwoWayRule Typed TypeSpecifierUnateQ Uncompress UnconstrainedParameters Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UnderseaFeatureData UndirectedEdge UndirectedGraph UndirectedGraphQ UndoOptions UndoTrackedVariables Unequal UnequalTo Unevaluated UniformDistribution UniformGraphDistribution UniformPolyhedron UniformSumDistribution Uninstall Union UnionPlus Unique UnitaryMatrixQ UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitSystem UnitTriangle UnitVector UnitVectorLayer UnityDimensions UniverseModelData UniversityData UnixTime Unprotect UnregisterExternalEvaluator UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpdateSearchIndex UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize UpperTriangularMatrixQ Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpTo UpValues URL URLBuild URLDecode URLDispatcher URLDownload URLDownloadSubmit URLEncode URLExecute URLExpand URLFetch URLFetchAsynchronous URLParse URLQueryDecode URLQueryEncode URLRead URLResponseTime URLSave URLSaveAsynchronous URLShorten URLSubmit UseGraphicsRange UserDefinedWavelet Using UsingFrontEnd UtilityFunctionV2Get ValenceErrorHandling ValidationLength ValidationSet Value ValueBox ValueBoxOptions ValueDimensions ValueForm ValuePreprocessingFunction ValueQ Values ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorAround VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorGreater VectorGreaterEqual VectorLess VectorLessEqual VectorMarkers VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerificationTest VerifyConvergence VerifyDerivedKey VerifyDigitalSignature VerifyInterpretation VerifySecurityCertificates VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexContract VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight VertexWeightedGraphQ Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewProjection ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoiceStyleData VoigtDistribution VolcanoData Volume VonMisesDistribution VoronoiMeshWaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WarpingCorrespondence WarpingDistance WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeatherForecastData WebAudioSearch WebElementObject WeberE WebExecute WebImage WebImageSearch WebSearch WebSessionObject WebSessions WebWindowObject Wedge Wednesday WeibullDistribution WeierstrassE1 WeierstrassE2 WeierstrassE3 WeierstrassEta1 WeierstrassEta2 WeierstrassEta3 WeierstrassHalfPeriods WeierstrassHalfPeriodW1 WeierstrassHalfPeriodW2 WeierstrassHalfPeriodW3 WeierstrassInvariantG2 WeierstrassInvariantG3 WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White WhiteNoiseProcess WhitePoint Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WikipediaData WikipediaSearch WilksW WilksWTest WindDirectionData WindingCount WindingPolygon WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowPersistentStyles WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth WindSpeedData WindVectorData WinsorizedMean WinsorizedVariance WishartMatrixDistribution With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult WolframLanguageData Word WordBoundary WordCharacter WordCloud WordCount WordCounts WordData WordDefinition WordFrequency WordFrequencyData WordList WordOrientation WordSearch WordSelectionFunction WordSeparators WordSpacings WordStem WordTranslation WorkingPrecision WrapAround Write WriteLine WriteString WronskianXMLElement XMLObject XMLTemplate Xnor Xor XYZColorYellow Yesterday YuleDissimilarityZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZIPCodeData ZipfDistribution ZoomCenter ZoomFactor ZTest ZTransform$Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AllowExternalChannelFunctions $AssertFunction $Assumptions $AsynchronousTask $AudioInputDevices $AudioOutputDevices $BaseDirectory $BatchInput $BatchOutput $BlockchainBase $BoxForms $ByteOrdering $CacheBaseDirectory $Canceled $ChannelBase $CharacterEncoding $CharacterEncodings $CloudBase $CloudConnected $CloudCreditsAvailable $CloudEvaluation $CloudExpressionBase $CloudObjectNameFormat $CloudObjectURLType $CloudRootDirectory $CloudSymbolBase $CloudUserID $CloudUserUUID $CloudVersion $CloudVersionNumber $CloudWolframEngineVersionNumber $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $Cookies $CookieStore $CreationDate $CurrentLink $CurrentTask $CurrentWebSession $DateStringFormat $DefaultAudioInputDevice $DefaultAudioOutputDevice $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultLocalBase $DefaultMailbox $DefaultNetworkInterface $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $EmbedCodeEnvironments $EmbeddableServices $EntityStores $Epilog $EvaluationCloudBase $EvaluationCloudObject $EvaluationEnvironment $ExportFormats $Failed $FinancialDataSource $FontFamilies $FormatType $FrontEnd $FrontEndSession $GeoEntityTypes $GeoLocation $GeoLocationCity $GeoLocationCountry $GeoLocationPrecision $GeoLocationSource $HistoryLength $HomeDirectory $HTMLExportRules $HTTPCookies $HTTPRequest $IgnoreEOF $ImageFormattingWidth $ImagingDevice $ImagingDevices $ImportFormats $IncomingMailSettings $InitialDirectory $Initialization $InitializationContexts $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $InterpreterTypes $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $LocalBase $LocalSymbolBase $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $MobilePhone $ModuleNumber $NetworkConnected $NetworkInterfaces $NetworkLicense $NewMessage $NewSymbol $Notebooks $NoValue $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $Permissions $PermissionsGroupBase $PersistenceBase $PersistencePath $PipeSupported $PlotTheme $Post $Pre $PreferencesDirectory $PreInitialization $PrePrint $PreRead $PrintForms $PrintLiteral $Printout3DPreviewer $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $PublisherID $RandomState $RecursionLimit $RegisteredDeviceClasses $RegisteredUserName $ReleaseNumber $RequesterAddress $RequesterWolframID $RequesterWolframUUID $ResourceSystemBase $RootDirectory $ScheduledTask $ScriptCommandLine $ScriptInputString $SecuredAuthenticationKeyTokens $ServiceCreditsAvailable $Services $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SourceLink $SSHAuthentication $SummaryBoxDataSizeLimit $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemMemory $SystemShell $SystemTimeZone $SystemWordLength $TemplatePath $TemporaryDirectory $TemporaryPrefix $TestFileName $TextStyle $TimedOut $TimeUnit $TimeZone $TimeZoneEntity $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $UnitSystem $Urgent $UserAddOnsDirectory $UserAgentLanguages $UserAgentMachine $UserAgentName $UserAgentOperatingSystem $UserAgentString $UserAgentVersion $UserBaseDirectory $UserDocumentsDirectory $Username $UserName $UserURLBase $Version $VersionNumber $VoiceStyles $WolframID $WolframUUID",contains:[e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){var t={relevance:0,contains:[{begin:"('|\\.')+"}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun legend intersect ismember procrustes hold num2cell "},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{className:"built_in",begin:/true|false/,relevance:0,starts:t},{begin:"[a-zA-Z][a-zA-Z_0-9]*('|\\.')+",relevance:0},{className:"number",begin:e.C_NUMBER_RE,relevance:0,starts:t},{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{begin:/\]|}|\)/,relevance:0,starts:t},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}],starts:t},e.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.COMMENT("\\%","$")]}}},function(e,t){e.exports=function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:t},r={begin:"->{",end:"}"},i={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},o=[e.BACKSLASH_ESCAPE,n,i],a=[i,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),r,{className:"string",contains:o,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return n.contains=a,r.contains=a,{aliases:["pl","pm"],lexemes:/[\w\.]+/,keywords:t,contains:a}}},function(e,t){e.exports=function(e){var t={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},n={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[t]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},t]};return{aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:n}],relevance:0}],illegal:"[^\\s\\}]"}}},function(e,t){e.exports=function(e){var t={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},n={className:"subst",begin:/\$\{/,end:/}/,keywords:t},r={className:"string",contains:[n],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},i=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/}]}];return n.contains=i,{aliases:["nixos"],keywords:t,contains:i}}},function(e,t){e.exports=function(e){var t=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:{keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},lexemes:t,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:n,lexemes:t,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}},function(e,t){e.exports=function(e){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}},function(e,t){e.exports=function(e){var t=e.COMMENT("--","$"),n="BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ",r=n.trim().split(" ").map((function(e){return e.split("|")[0]})).join("|"),i="ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP PERCENTILE_CONT PERCENTILE_DISC ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE NUM_NONNULLS NUM_NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH_BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAPLEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR TO_ASCII TO_HEX TRANSLATE OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 TIMEOFDAY TRANSACTION_TIMESTAMP|10 ENUM_FIRST ENUM_LAST ENUM_RANGE AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILYINET_MERGE MACADDR8_SET7BIT ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA CURSOR_TO_XML CURSOR_TO_XMLSCHEMA SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA XMLATTRIBUTES TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY CURRVAL LASTVAL NEXTVAL SETVAL COALESCE NULLIF GREATEST LEAST ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY STRING_TO_ARRAY UNNEST ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE GENERATE_SERIES GENERATE_SUBSCRIPTS CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE GIN_CLEAN_PENDING_LIST SUPPRESS_REDUNDANT_UPDATES_TRIGGER LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE GROUPING CAST ".trim().split(" ").map((function(e){return e.split("|")[0]})).join("|");return{aliases:["postgres","postgresql"],case_insensitive:!0,keywords:{keyword:"ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ",built_in:"CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 SQLSTATE SQLERRM|10 SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED INDEX_CORRUPTED "},illegal:/:==|\W\s*\(\*|(^|\s)\$[a-z]|{{|[a-z]:\s*$|\.\.\.|TO:|DO:/,contains:[{className:"keyword",variants:[{begin:/\bTEXT\s*SEARCH\b/},{begin:/\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/},{begin:/\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/},{begin:/\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/},{begin:/\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/},{begin:/\bNULLS\s+(FIRST|LAST)\b/},{begin:/\bEVENT\s+TRIGGER\b/},{begin:/\b(MAPPING|OR)\s+REPLACE\b/},{begin:/\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/},{begin:/\b(SHARE|EXCLUSIVE)\s+MODE\b/},{begin:/\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/},{begin:/\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/},{begin:/\bPRESERVE\s+ROWS\b/},{begin:/\bDISCARD\s+PLANS\b/},{begin:/\bREFERENCING\s+(OLD|NEW)\b/},{begin:/\bSKIP\s+LOCKED\b/},{begin:/\bGROUPING\s+SETS\b/},{begin:/\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/},{begin:/\b(WITH|WITHOUT)\s+HOLD\b/},{begin:/\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/},{begin:/\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/},{begin:/\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/},{begin:/\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/},{begin:/\bIS\s+(NOT\s+)?UNKNOWN\b/},{begin:/\bSECURITY\s+LABEL\b/},{begin:/\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/},{begin:/\bWITH\s+(NO\s+)?DATA\b/},{begin:/\b(FOREIGN|SET)\s+DATA\b/},{begin:/\bSET\s+(CATALOG|CONSTRAINTS)\b/},{begin:/\b(WITH|FOR)\s+ORDINALITY\b/},{begin:/\bIS\s+(NOT\s+)?DOCUMENT\b/},{begin:/\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/},{begin:/\b(STRIP|PRESERVE)\s+WHITESPACE\b/},{begin:/\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/},{begin:/\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/},{begin:/\bAT\s+TIME\s+ZONE\b/},{begin:/\bGRANTED\s+BY\b/},{begin:/\bRETURN\s+(QUERY|NEXT)\b/},{begin:/\b(ATTACH|DETACH)\s+PARTITION\b/},{begin:/\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/},{begin:/\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/},{begin:/\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/}]},{begin:/\b(FORMAT|FAMILY|VERSION)\s*\(/},{begin:/\bINCLUDE\s*\(/,keywords:"INCLUDE"},{begin:/\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/},{begin:/\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/},{begin:/\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,relevance:10},{begin:/\bEXTRACT\s*\(/,end:/\bFROM\b/,returnEnd:!0,keywords:{type:"CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"}},{begin:/\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,keywords:{keyword:"NAME"}},{begin:/\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,keywords:{keyword:"DOCUMENT CONTENT"}},{beginKeywords:"CACHE INCREMENT MAXVALUE MINVALUE",end:e.C_NUMBER_RE,returnEnd:!0,keywords:"BY CACHE INCREMENT MAXVALUE MINVALUE"},{className:"type",begin:/\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/},{className:"type",begin:/\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/},{begin:/\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,keywords:{keyword:"RETURNS",type:"LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"}},{begin:"\\b("+i+")\\s*\\("},{begin:"\\.("+r+")\\b"},{begin:"\\b("+r+")\\s+PATH\\b",keywords:{keyword:"PATH",type:n.replace("PATH ","")}},{className:"type",begin:"\\b("+r+")\\b"},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:"(e|E|u&|U&)'",end:"'",contains:[{begin:"\\\\."}],relevance:10},{begin:"\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",endSameAsBegin:!0,contains:[{subLanguage:["pgsql","perl","python","tcl","r","lua","java","php","ruby","bash","scheme","xml","json"],endsWithParent:!0}]},{begin:'"',end:'"',contains:[{begin:'""'}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"meta",variants:[{begin:"%(ROW)?TYPE",relevance:10},{begin:"\\$\\d+"},{begin:"^#\\w",end:"$"}]},{className:"symbol",begin:"<<\\s*[a-zA-Z_][a-zA-Z_0-9$]*\\s*>>",relevance:10}]}}},function(e,t){e.exports=function(e){var t={begin:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"},n={className:"meta",begin:/<\?(php)?|\?>/},r={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[n]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},n,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",t,e.C_BLOCK_COMMENT_MODE,r,i]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},r,i]}}},function(e,t){e.exports=function(e){return{disableAutodetect:!0}}},function(e,t){e.exports=function(e){var t={keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter"},n={begin:"`[\\s\\S]",relevance:0},r={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},i={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[n,r,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},o={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},a=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]}]}),s={className:"built_in",variants:[{begin:"(".concat("Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|New|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Complete|Confirm|Deny|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",")+(-)[\\w\\d]+")}]},l={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[e.TITLE_MODE]},c={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:/\w[\w\d]*((-)[\w\d]+)*/,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[r]}]},u={begin:/using\s/,end:/$/,returnBegin:!0,contains:[i,o,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},d={variants:[{className:"operator",begin:"(".concat("-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",")\\b")},{className:"literal",begin:/(-)[\w\d]+/,relevance:0}]},h={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(t.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},e.inherit(e.TITLE_MODE,{endsParent:!0})]},p=[h,a,n,e.NUMBER_MODE,i,o,s,r,{className:"literal",begin:/\$(null|true|false)\b/},{className:"selector-tag",begin:/\@\B/,relevance:0}],f={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",p,{begin:"("+["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"].join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return h.contains.unshift(f),{aliases:["ps","ps1"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:t,contains:p.concat(l,c,u,d,f)}}},function(e,t){e.exports=function(e){var t={begin:/\(/,end:/\)/,relevance:0},n={begin:/\[/,end:/\]/},r={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},i={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},o=[{begin:/[a-z][A-Za-z0-9_]*/,relevance:0},{className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},t,{begin:/:-/},n,r,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,{className:"string",begin:/0\'(\\\'|.)/},{className:"string",begin:/0\'\\s/},e.C_NUMBER_MODE];return t.contains=o,n.contains=o,{contains:o.concat([{begin:/\.$/}])}}},function(e,t){e.exports=function(e){var t={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},n={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},i={begin:/\{\{/,relevance:0},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,i,r]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},s={className:"params",begin:/\(/,end:/\)/,contains:["self",n,a,o,e.HASH_COMMENT_MODE]};return r.contains=[o,a,n],{aliases:["py","gyp","ipython"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[n,a,{beginKeywords:"if",relevance:0},o,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,s,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}},function(e,t){e.exports=function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[e.HASH_COMMENT_MODE,{begin:t,lexemes:t,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}},function(e,t){e.exports=function(e){var t="~?[a-z$_][0-9a-zA-Z$_]*",n="`?[A-Z$_][0-9a-zA-Z$_]*",r="("+["||","&&","++","**","+.","*","/","*.","/.","...","|>"].map((function(e){return e.split("").map((function(e){return"\\"+e})).join("")})).join("|")+"|==|===)",i="\\s+"+r+"\\s+",o={keyword:"and as asr assert begin class constraint do done downto else end exception externalfor fun function functor if in include inherit initializerland lazy let lor lsl lsr lxor match method mod module mutable new nonrecobject of open or private rec sig struct then to try type val virtual when while with",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ",literal:"true false"},a="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",s={className:"number",relevance:0,variants:[{begin:a},{begin:"\\(\\-"+a+"\\)"}]},l={className:"operator",relevance:0,begin:r},c=[{className:"identifier",relevance:0,begin:t},l,s],u=[e.QUOTE_STRING_MODE,l,{className:"module",begin:"\\b"+n,returnBegin:!0,end:".",contains:[{className:"identifier",begin:n,relevance:0}]}],d=[{className:"module",begin:"\\b"+n,returnBegin:!0,end:".",relevance:0,contains:[{className:"identifier",begin:n,relevance:0}]}],h={className:"function",relevance:0,keywords:o,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+t+")\\s*=>",end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params",variants:[{begin:t},{begin:"~?[a-z$_][0-9a-zA-Z$_]*(s*:s*[a-z$_][0-9a-z$_]*((s*('?[a-z$_][0-9a-z$_]*s*(,'?[a-z$_][0-9a-z$_]*)*)?s*))?)?(s*:s*[a-z$_][0-9a-z$_]*((s*('?[a-z$_][0-9a-z$_]*s*(,'?[a-z$_][0-9a-z$_]*)*)?s*))?)?"},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>",returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{begin:t,end:"(,|\\n|\\))",relevance:0,contains:[l,{className:"typing",begin:":",end:"(,|\\n)",returnBegin:!0,relevance:0,contains:d}]}]}]},{begin:"\\(\\.\\s"+t+"\\)\\s*=>"}]};u.push(h);var p={className:"constructor",begin:n+"\\(",end:"\\)",illegal:"\\n",keywords:o,contains:[e.QUOTE_STRING_MODE,l,{className:"params",begin:"\\b"+t}]},f={className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:o,end:"=>",relevance:0,contains:[p,l,{relevance:0,className:"constructor",begin:n}]},m={className:"module-access",keywords:o,returnBegin:!0,variants:[{begin:"\\b("+n+"\\.)+"+t},{begin:"\\b("+n+"\\.)+\\(",end:"\\)",returnBegin:!0,contains:[h,{begin:"\\(",end:"\\)",skip:!0}].concat(u)},{begin:"\\b("+n+"\\.)+{",end:"}"}],contains:u};return d.push(m),{aliases:["re"],keywords:o,illegal:"(:\\-|:=|\\${|\\+=)",contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(\\#,\\/\\/)"}),{className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:c},{className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:c},p,{className:"operator",begin:i,illegal:"\\-\\->",relevance:0},s,e.C_LINE_COMMENT_MODE,f,h,{className:"module-def",begin:"\\bmodule\\s+"+t+"\\s+"+n+"\\s+=\\s+{",end:"}",returnBegin:!0,keywords:o,relevance:0,contains:[{className:"module",relevance:0,begin:n},{begin:"{",end:"}",skip:!0}].concat(u)},m]}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},r={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},o=[e.COMMENT("#","$",{contains:[r]}),e.COMMENT("^\\=begin","^\\=end",{contains:[r],relevance:10}),e.COMMENT("^__END__","\\n$")],a={className:"subst",begin:"#\\{",end:"}",keywords:n},s={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},{begin:/\w+/,endSameAsBegin:!0,contains:[e.BACKSLASH_ESCAPE,a]}]}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:n},c=[s,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(o)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:t}),l].concat(o)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[s,{begin:t}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:n},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(o),relevance:0}].concat(o);a.contains=c,l.contains=c;var u=[{begin:/^\s*=>/,starts:{end:"$",contains:c}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:c}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:n,illegal:/\/\*/,contains:o.concat(u).concat(c)}}},function(e,t){e.exports=function(e){var t="([ui](8|16|32|64|128|size)|f(32|64))?",n="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{aliases:["rs"],keywords:{keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:n},lexemes:e.IDENT_RE+"!?",illegal:""}]}}},function(e,t){e.exports=function(e){var t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:"\\${",end:"}"}]},n={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[t],relevance:10}]},r={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},i={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},o={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[r]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[r]},i]},a={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[i]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},r,a,o,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}},function(e,t){e.exports=function(e){var t={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},n={className:"number",begin:"#[0-9A-Fa-f]+"};e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE;return{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},t,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[t,n,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:"and or not only",contains:[{begin:"@[a-z-]+",className:"keyword"},t,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n,e.CSS_NUMBER_MODE]}]}}},function(e,t){e.exports=function(e){return{aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}},function(e,t){e.exports=function(e){var t={className:"string",begin:"\\$.{1}"},n={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:"[a-z][a-zA-Z0-9_]*:",relevance:0},e.C_NUMBER_MODE,n,t,{begin:"\\|[ ]*[a-z][a-zA-Z0-9_]*([ ]+[a-z][a-zA-Z0-9_]*)*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?[a-z][a-zA-Z0-9_]*"}]},{begin:"\\#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,t,e.C_NUMBER_MODE,n]}]}}},function(e,t){e.exports=function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,lexemes:/[\w\.]+/,keywords:{keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){var t={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r={className:"subst",begin:/\\\(/,end:"\\)",keywords:t,contains:[]},i={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},o={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return r.contains=[o],{keywords:t,contains:[i,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\w\xc0-\u02b8']*[!?]"},{className:"type",begin:"\\b[A-Z][\\w\xc0-\u02b8']*",relevance:0},o,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,contains:["self",o,i,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:t,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}},function(e,t){e.exports=function(e){var t={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void Promise"},n={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},r={begin:"\\(",end:/\)/,keywords:t,contains:["self",e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.NUMBER_MODE]},i={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,r]},o={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:e.C_NUMBER_RE+"n?"}],relevance:0},a={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},s={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,a],subLanguage:"xml"}},l={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,a],subLanguage:"css"}},c={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,a]};return a.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,l,c,o,e.REGEXP_MODE],{aliases:["ts"],keywords:t,contains:[{className:"meta",begin:/^\s*['"]use strict['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,l,c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+e.IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.IDENT_RE},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),i],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",i]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0},n,r]}}},function(e,t){e.exports=function(e){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as async assembly auto await binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue iterator join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor yield",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend|^\\$ ",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT("'","$",{returnBegin:!0,contains:[{className:"doctag",begin:"'''|\x3c!--|--\x3e",contains:[e.PHRASAL_WORDS_MODE]},{className:"doctag",begin:"",contains:[e.PHRASAL_WORDS_MODE]}]}),e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end region externalsource"}}]}}},function(e,t){e.exports=function(e){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[e.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}},function(e,t){e.exports=function(e){var t={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]};return{case_insensitive:!0,aliases:["yml","YAML","yaml"],contains:[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!"+e.UNDERSCORE_IDENT_RE},{className:"type",begin:"!!"+e.UNDERSCORE_IDENT_RE},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"\\-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},{className:"number",begin:e.C_NUMBER_RE+"\\b"},t]}}},function(e,t){e.exports=function(e){var t={className:"symbol",begin:"&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;"},n={begin:"\\s",contains:[{className:"meta-keyword",begin:"#?[a-z_][a-z1-9_-]+",illegal:"\\n"}]},r=e.inherit(n,{begin:"\\(",end:"\\)"}),i=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),o=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),a={endsWithParent:!0,illegal:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[n,o,i,r,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"",contains:[n,r,o,i]}]}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},t,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]},{className:"tag",begin:")",end:">",keywords:{name:"style"},contains:[a],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">",keywords:{name:"script"},contains:[a],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},a]}]}}},,function(e,t){function n(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,o){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=t.call(this,i,o))}else n.push(o);return null==e?o:e.call(this,i,o)}}(e.exports=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)}).getSerialize=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"!==typeof e||null===e||"undefined"===typeof e},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=function e(t,n){var r={value:n};if(!t(n))for(var i in r.children={},n)r.children[i]=e(t,n[i]);return r}(e,t);return{detectMutations:function(){return function e(t,n,r){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],o=arguments.length<=4||void 0===arguments[4]?[]:arguments[4],a=n?n.value:void 0,s=a===r;if(i&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:o};if(t(a)||t(r))return{wasMutated:!1};var l={};Object.keys(n.children).forEach((function(e){l[e]=!0})),Object.keys(r).forEach((function(e){l[e]=!0}));for(var c=Object.keys(l),u=0;u - * @license MIT - */ - -/** - * Checks if an event is supported in the current execution environment. - * - * NOTE: This will not work correctly for non-generic events such as `change`, - * `reset`, `load`, `error`, and `select`. - * - * Borrows from Modernizr. - * - * @param {string} eventNameSuffix Event name, e.g. "click". - * @param {?boolean} capture Check if the capture phase is supported. - * @return {boolean} True if the event is supported. - * @internal - * @license Modernizr 3.0.0pre (Custom Build) | MIT - */ - -/** @license React v16.13.0 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/**! - * Sortable - * @author RubaXa - * @author owenm - * @license MIT - */ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/2.08ea13e0.chunk.js.map b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/2.08ea13e0.chunk.js.map deleted file mode 100644 index 8ba6abfc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/2.08ea13e0.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../node_modules/react/react.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/react-router/lib/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/highlight.js/lib/highlight.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/underscore/underscore.js","../node_modules/prop-types/index.js","../node_modules/redux/es/createStore.js","../node_modules/redux/es/combineReducers.js","../node_modules/redux/es/bindActionCreators.js","../node_modules/redux/es/compose.js","../node_modules/redux/es/applyMiddleware.js","../node_modules/redux/es/index.js","../node_modules/react-redux/es/utils/storeShape.js","../node_modules/react-redux/es/components/Provider.js","../node_modules/react-redux/es/utils/Subscription.js","../node_modules/react-redux/es/components/connectAdvanced.js","../node_modules/react-redux/es/utils/shallowEqual.js","../node_modules/react-redux/es/connect/wrapMapToProps.js","../node_modules/react-redux/es/connect/mapDispatchToProps.js","../node_modules/react-redux/es/connect/mapStateToProps.js","../node_modules/react-redux/es/connect/mergeProps.js","../node_modules/react-redux/es/connect/selectorFactory.js","../node_modules/react-redux/es/connect/connect.js","../node_modules/react-redux/es/index.js","../node_modules/fbjs/lib/invariant.js","../node_modules/fbjs/lib/warning.js","../node_modules/react-document-title/index.js","../node_modules/react-dom/lib/reactProdInvariant.js","../node_modules/classnames/index.js","../node_modules/object-assign/index.js","../node_modules/invariant/browser.js","../node_modules/react-dom/lib/ReactDOMComponentTree.js","../node_modules/react-dom/index.js","../node_modules/dom-helpers/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../node_modules/js-yaml/lib/js-yaml/type.js","../node_modules/react-hotkeys/lib/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toArray.js","../node_modules/moment/moment.js","../node_modules/fbjs/lib/ExecutionEnvironment.js","../node_modules/react-widgets/lib/util/PropTypes.js","../node_modules/react-widgets/lib/util/localizers.js","../node_modules/fbjs/lib/emptyFunction.js","../node_modules/react-dom/lib/ReactInstrumentation.js","../node_modules/react-widgets/lib/util/Props.js","../node_modules/codemirror/lib/codemirror.js","../node_modules/react-textarea-autosize/es/index.js","../node_modules/react-dom/lib/ReactUpdates.js","../node_modules/lodash/_root.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/react/lib/ReactCurrentOwner.js","../node_modules/react-dom/lib/SyntheticEvent.js","../node_modules/webpack/buildin/global.js","../node_modules/warning/browser.js","../node_modules/react-hotkeys/node_modules/lodash/_root.js","../node_modules/react-router/lib/RouteUtils.js","../node_modules/history/lib/PathUtils.js","../node_modules/webpack/buildin/module.js","../node_modules/react-widgets/lib/util/dates.js","../node_modules/react-dom/lib/PooledClass.js","../node_modules/react-hotkeys/node_modules/lodash/_getNative.js","../node_modules/lodash/_getNative.js","../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","../node_modules/dom-helpers/util/inDOM.js","../node_modules/react-widgets/lib/util/_.js","../node_modules/lodash/cloneDeep.js","../node_modules/react/lib/React.js","../node_modules/react/lib/reactProdInvariant.js","../node_modules/react/lib/ReactElement.js","../node_modules/fbjs/lib/emptyObject.js","../node_modules/react-dom/lib/DOMProperty.js","../node_modules/react-dom/lib/ReactReconciler.js","../node_modules/react-dom/lib/DOMLazyTree.js","../node_modules/react-router/lib/PatternUtils.js","../node_modules/react-router/lib/routerWarning.js","../node_modules/history/lib/LocationUtils.js","../node_modules/js-yaml/lib/js-yaml/common.js","../node_modules/js-yaml/lib/js-yaml/schema.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/lodash-es/_root.js","../node_modules/lodash-es/_Symbol.js","../node_modules/lodash-es/_getRawTag.js","../node_modules/lodash-es/_objectToString.js","../node_modules/lodash-es/_baseGetTag.js","../node_modules/lodash-es/_overArg.js","../node_modules/lodash-es/_getPrototype.js","../node_modules/lodash-es/isObjectLike.js","../node_modules/lodash-es/isPlainObject.js","../node_modules/react-dom/lib/EventPropagators.js","../node_modules/react-dom/lib/EventPluginHub.js","../node_modules/react-dom/lib/SyntheticUIEvent.js","../node_modules/react-dom/lib/ReactInstanceMap.js","../node_modules/react-router/lib/InternalPropTypes.js","../node_modules/react-hotkeys/node_modules/lodash/_baseGetTag.js","../node_modules/react-hotkeys/node_modules/lodash/isObjectLike.js","../node_modules/react-hotkeys/node_modules/lodash/isArray.js","../node_modules/js-yaml/lib/js-yaml/exception.js","../node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../node_modules/create-react-class/index.js","../node_modules/lodash/isObject.js","../node_modules/lodash/isObjectLike.js","../node_modules/react-widgets/lib/util/widgetHelpers.js","../node_modules/react-widgets/lib/util/dataHelpers.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/react-dom/lib/Transaction.js","../node_modules/react-dom/lib/SyntheticMouseEvent.js","../node_modules/react-dom/lib/setInnerHTML.js","../node_modules/react-dom/lib/escapeTextContentForBrowser.js","../node_modules/react-dom/lib/ReactBrowserEventEmitter.js","../node_modules/history/lib/Actions.js","../node_modules/history/lib/DOMUtils.js","../node_modules/react-hotkeys/node_modules/lodash/isObject.js","../node_modules/react-hotkeys/node_modules/lodash/eq.js","../node_modules/react-hotkeys/node_modules/lodash/isArrayLike.js","../node_modules/react-hotkeys/node_modules/lodash/_ListCache.js","../node_modules/react-hotkeys/node_modules/lodash/_assocIndexOf.js","../node_modules/react-hotkeys/node_modules/lodash/_nativeCreate.js","../node_modules/react-hotkeys/node_modules/lodash/_getMapData.js","../node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../node_modules/lodash/_ListCache.js","../node_modules/lodash/_assocIndexOf.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/_nativeCreate.js","../node_modules/lodash/_getMapData.js","../node_modules/lodash/_copyObject.js","../node_modules/dom-helpers/query/height.js","../node_modules/dom-helpers/query/isWindow.js","../node_modules/react-widgets/lib/Button.js","../node_modules/react-component-managers/lib/index.js","../node_modules/spy-on-component/index.js","../node_modules/react-widgets/lib/CalendarView.js","../node_modules/react-widgets/lib/messages.js","../node_modules/react-widgets/lib/util/interaction.js","../node_modules/react-router-redux/lib/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/isomorphic-fetch/fetch-npm-browserify.js","../node_modules/react/lib/ReactComponent.js","../node_modules/react/lib/ReactNoopUpdateQueue.js","../node_modules/react-dom/lib/EventPluginRegistry.js","../node_modules/react-dom/lib/EventPluginUtils.js","../node_modules/react-dom/lib/ReactErrorUtils.js","../node_modules/react-dom/lib/getEventTarget.js","../node_modules/react-dom/lib/isEventSupported.js","../node_modules/react-dom/lib/getEventModifierState.js","../node_modules/react-dom/lib/DOMChildrenOperations.js","../node_modules/react-dom/lib/DOMNamespaces.js","../node_modules/react-dom/lib/createMicrosoftUnsafeLocalFunction.js","../node_modules/react-dom/lib/LinkedValueUtils.js","../node_modules/react-dom/lib/ReactComponentEnvironment.js","../node_modules/fbjs/lib/shallowEqual.js","../node_modules/react-dom/lib/shouldUpdateReactComponent.js","../node_modules/react-dom/lib/KeyEscapeUtils.js","../node_modules/react-dom/lib/ReactUpdateQueue.js","../node_modules/react-dom/lib/validateDOMNesting.js","../node_modules/react-dom/lib/getEventCharCode.js","../node_modules/react-router/lib/PropTypes.js","../node_modules/react-router/lib/AsyncUtils.js","../node_modules/react-router/lib/RouterContext.js","../node_modules/react-router/lib/ContextUtils.js","../node_modules/history/lib/runTransitionHook.js","../node_modules/history/lib/createHistory.js","../node_modules/history/lib/ExecutionEnvironment.js","../node_modules/history/lib/BrowserProtocol.js","../node_modules/react-hotkeys/node_modules/lodash/_Symbol.js","../node_modules/react-hotkeys/node_modules/lodash/identity.js","../node_modules/react-hotkeys/node_modules/lodash/keys.js","../node_modules/react-hotkeys/node_modules/lodash/_Map.js","../node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../node_modules/react-notification-system/dist/constants.js","../node_modules/lodash/_Map.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/keys.js","../node_modules/lodash/isArray.js","../node_modules/lodash/_baseUnary.js","../node_modules/lodash/_nodeUtil.js","../node_modules/lodash/_isPrototype.js","../node_modules/lodash/keysIn.js","../node_modules/lodash/_getSymbols.js","../node_modules/lodash/_getTag.js","../node_modules/lodash/_cloneArrayBuffer.js","../node_modules/uncontrollable/index.js","../node_modules/react-widgets/lib/Widget.js","../node_modules/dom-helpers/style/index.js","../node_modules/dom-helpers/transition/properties.js","../node_modules/react-component-managers/lib/mountManager.js","../node_modules/react-widgets/lib/Icon.js","../node_modules/react-widgets/lib/util/focusManager.js","../node_modules/react-widgets/lib/util/reduceToListState.js","../node_modules/hoist-non-react-statics/index.js","../node_modules/symbol-observable/es/index.js","../node_modules/js-yaml/index.js","../node_modules/redux-thunk/lib/index.js","../node_modules/react/lib/canDefineProperty.js","../node_modules/react/lib/ReactElementSymbol.js","../node_modules/react/lib/getIteratorFn.js","../node_modules/react/lib/ReactPropTypeLocationNames.js","../node_modules/react-router-redux/lib/reducer.js","../node_modules/react-router-redux/lib/actions.js","../node_modules/react-dom/lib/ReactDOMComponentFlags.js","../node_modules/react-dom/lib/accumulateInto.js","../node_modules/react-dom/lib/forEachAccumulated.js","../node_modules/react-dom/lib/getTextContentAccessor.js","../node_modules/react-dom/lib/CallbackQueue.js","../node_modules/react-dom/lib/ReactFeatureFlags.js","../node_modules/react-dom/lib/isTextInputElement.js","../node_modules/react-dom/lib/ViewportMetrics.js","../node_modules/react-dom/lib/setTextContent.js","../node_modules/fbjs/lib/focusNode.js","../node_modules/react-dom/lib/CSSProperty.js","../node_modules/react-dom/lib/DOMPropertyOperations.js","../node_modules/react-dom/lib/ReactDOMSelect.js","../node_modules/process/browser.js","../node_modules/react-dom/lib/instantiateReactComponent.js","../node_modules/react-dom/lib/ReactNodeTypes.js","../node_modules/react-dom/lib/ReactEmptyComponent.js","../node_modules/react-dom/lib/ReactHostComponent.js","../node_modules/react-dom/lib/traverseAllChildren.js","../node_modules/react/lib/ReactComponentTreeHook.js","../node_modules/fbjs/lib/EventListener.js","../node_modules/react-dom/lib/ReactInputSelection.js","../node_modules/fbjs/lib/getActiveElement.js","../node_modules/react-dom/lib/ReactMount.js","../node_modules/react-dom/lib/getHostComponentFromComposite.js","../node_modules/react-router/lib/createTransitionManager.js","../node_modules/react-router/lib/PromiseUtils.js","../node_modules/react-router/lib/RouterUtils.js","../node_modules/react-router/lib/Link.js","../node_modules/react-router/lib/Redirect.js","../node_modules/react-router/lib/createMemoryHistory.js","../node_modules/history/lib/useQueries.js","../node_modules/history/lib/useBasename.js","../node_modules/react-router/lib/useRouterHistory.js","../node_modules/history/lib/DOMStateStorage.js","../node_modules/react-router/lib/createRouterHistory.js","../node_modules/react-hotkeys/lib/FocusTrap.js","../node_modules/react-hotkeys/lib/HotKeyMapMixin.js","../node_modules/react-hotkeys/node_modules/lodash/_assignValue.js","../node_modules/react-hotkeys/node_modules/lodash/_baseAssignValue.js","../node_modules/react-hotkeys/node_modules/lodash/_defineProperty.js","../node_modules/react-hotkeys/node_modules/lodash/isFunction.js","../node_modules/react-hotkeys/node_modules/lodash/_freeGlobal.js","../node_modules/react-hotkeys/node_modules/lodash/_toSource.js","../node_modules/react-hotkeys/node_modules/lodash/isLength.js","../node_modules/react-hotkeys/node_modules/lodash/_isIndex.js","../node_modules/react-hotkeys/node_modules/lodash/_isPrototype.js","../node_modules/react-hotkeys/node_modules/lodash/isBuffer.js","../node_modules/react-hotkeys/node_modules/lodash/isTypedArray.js","../node_modules/react-hotkeys/node_modules/lodash/isEqual.js","../node_modules/react-hotkeys/node_modules/lodash/_MapCache.js","../node_modules/react-hotkeys/node_modules/lodash/_equalArrays.js","../node_modules/js-yaml/lib/js-yaml/schema/core.js","../node_modules/js-yaml/lib/js-yaml/schema/json.js","../node_modules/buffer/index.js","../node_modules/lodash/eq.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_toSource.js","../node_modules/lodash/_assignValue.js","../node_modules/lodash/_baseAssignValue.js","../node_modules/lodash/_arrayLikeKeys.js","../node_modules/lodash/isBuffer.js","../node_modules/lodash/isLength.js","../node_modules/lodash/_overArg.js","../node_modules/lodash/isArrayLike.js","../node_modules/lodash/stubArray.js","../node_modules/lodash/_getSymbolsIn.js","../node_modules/lodash/_arrayPush.js","../node_modules/lodash/_getPrototype.js","../node_modules/lodash/_baseGetAllKeys.js","../node_modules/dom-helpers/activeElement.js","../node_modules/dom-helpers/ownerDocument.js","../node_modules/react-widgets/lib/WidgetPicker.js","../node_modules/react-widgets/lib/Popup.js","../node_modules/dom-helpers/events/index.js","../node_modules/dom-helpers/events/on.js","../node_modules/dom-helpers/events/off.js","../node_modules/dom-helpers/query/contains.js","../node_modules/dom-helpers/query/querySelectorAll.js","../node_modules/dom-helpers/util/camelizeStyle.js","../node_modules/dom-helpers/query/offset.js","../node_modules/react-transition-group/Transition.js","../node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js","../node_modules/react-component-managers/lib/timeoutManager.js","../node_modules/react-widgets/lib/Select.js","../node_modules/react-widgets/lib/List.js","../node_modules/react-widgets/lib/util/Filter.js","../node_modules/react-widgets/lib/Listbox.js","../node_modules/react-widgets/lib/ListOption.js","../node_modules/react-widgets/lib/util/scrollManager.js","../node_modules/react-dom-factories/index.js","../node_modules/react-modal/lib/helpers/tabbable.js","../node_modules/lodash.assign/index.js","../node_modules/webpack/buildin/amd-define.js","../node_modules/codemirror/mode/markdown/markdown.js","../node_modules/codemirror/mode/xml/xml.js","../node_modules/codemirror/addon/mode/overlay.js","../node_modules/symbol-observable/es/ponyfill.js","../node_modules/lodash-es/_freeGlobal.js","../node_modules/react-notification-system/dist/NotificationSystem.js","../node_modules/sortablejs/Sortable.js","../node_modules/react-widgets/lib/DateTimePicker.js","../node_modules/react-widgets/lib/DropdownList.js","../node_modules/react-widgets-moment/index.js","../node_modules/react-modal/lib/index.js","../node_modules/react-ace/lib/ace.js","../node_modules/simplemde/src/js/simplemde.js","../../../../../../webpack/universalModuleDefinition","../webpack:/webpack/bootstrap 65eb4442d565fc2a5c80","../../../../../../src/index.js","../webpack:/external \"react\"","../../../../../../~/attr-accept/dist/index.js","../../../../../../src/getDataTransferItems.js","../node_modules/redux-immutable-state-invariant/dist/index.js","../node_modules/redux-logger/lib/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/react/lib/ReactChildren.js","../node_modules/react/lib/PooledClass.js","../node_modules/react/lib/traverseAllChildren.js","../node_modules/react/lib/KeyEscapeUtils.js","../node_modules/react/lib/ReactPureComponent.js","../node_modules/react/lib/ReactClass.js","../node_modules/react/lib/ReactDOMFactories.js","../node_modules/react/lib/ReactPropTypes.js","../node_modules/react/lib/ReactPropTypesSecret.js","../node_modules/react/lib/ReactVersion.js","../node_modules/react/lib/onlyChild.js","../node_modules/react-router-redux/lib/sync.js","../node_modules/react-router-redux/lib/middleware.js","../node_modules/react-dom/lib/ReactDOM.js","../node_modules/react-dom/lib/ReactDefaultInjection.js","../node_modules/react-dom/lib/ARIADOMPropertyConfig.js","../node_modules/react-dom/lib/BeforeInputEventPlugin.js","../node_modules/react-dom/lib/FallbackCompositionState.js","../node_modules/react-dom/lib/SyntheticCompositionEvent.js","../node_modules/react-dom/lib/SyntheticInputEvent.js","../node_modules/react-dom/lib/ChangeEventPlugin.js","../node_modules/react-dom/lib/ReactRef.js","../node_modules/react-dom/lib/ReactOwner.js","../node_modules/react-dom/lib/DefaultEventPluginOrder.js","../node_modules/react-dom/lib/EnterLeaveEventPlugin.js","../node_modules/react-dom/lib/HTMLDOMPropertyConfig.js","../node_modules/react-dom/lib/ReactComponentBrowserEnvironment.js","../node_modules/react-dom/lib/Danger.js","../node_modules/fbjs/lib/createNodesFromMarkup.js","../node_modules/fbjs/lib/createArrayFromMixed.js","../node_modules/fbjs/lib/getMarkupWrap.js","../node_modules/react-dom/lib/ReactDOMIDOperations.js","../node_modules/react-dom/lib/ReactDOMComponent.js","../node_modules/react-dom/lib/AutoFocusUtils.js","../node_modules/react-dom/lib/CSSPropertyOperations.js","../node_modules/fbjs/lib/camelizeStyleName.js","../node_modules/fbjs/lib/camelize.js","../node_modules/react-dom/lib/dangerousStyleValue.js","../node_modules/fbjs/lib/hyphenateStyleName.js","../node_modules/fbjs/lib/hyphenate.js","../node_modules/fbjs/lib/memoizeStringOnly.js","../node_modules/react-dom/lib/quoteAttributeValueForBrowser.js","../node_modules/react-dom/lib/ReactEventEmitterMixin.js","../node_modules/react-dom/lib/getVendorPrefixedEventName.js","../node_modules/react-dom/lib/ReactDOMInput.js","../node_modules/react-dom/lib/ReactPropTypesSecret.js","../node_modules/react-dom/lib/ReactDOMOption.js","../node_modules/react-dom/lib/ReactDOMTextarea.js","../node_modules/react-dom/lib/ReactMultiChild.js","../node_modules/react-dom/lib/ReactChildReconciler.js","../node_modules/react-dom/lib/ReactCompositeComponent.js","../node_modules/react-dom/lib/getNextDebugID.js","../node_modules/react-dom/lib/ReactElementSymbol.js","../node_modules/react-dom/lib/getIteratorFn.js","../node_modules/react-dom/lib/flattenChildren.js","../node_modules/react-dom/lib/ReactServerRenderingTransaction.js","../node_modules/react-dom/lib/ReactServerUpdateQueue.js","../node_modules/react-dom/lib/ReactDOMEmptyComponent.js","../node_modules/react-dom/lib/ReactDOMTreeTraversal.js","../node_modules/react-dom/lib/ReactDOMTextComponent.js","../node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js","../node_modules/react-dom/lib/ReactEventListener.js","../node_modules/fbjs/lib/getUnboundedScrollPosition.js","../node_modules/react-dom/lib/ReactInjection.js","../node_modules/react-dom/lib/ReactReconcileTransaction.js","../node_modules/react-dom/lib/ReactDOMSelection.js","../node_modules/react-dom/lib/getNodeForCharacterOffset.js","../node_modules/fbjs/lib/containsNode.js","../node_modules/fbjs/lib/isTextNode.js","../node_modules/fbjs/lib/isNode.js","../node_modules/react-dom/lib/SVGDOMPropertyConfig.js","../node_modules/react-dom/lib/SelectEventPlugin.js","../node_modules/react-dom/lib/SimpleEventPlugin.js","../node_modules/react-dom/lib/SyntheticAnimationEvent.js","../node_modules/react-dom/lib/SyntheticClipboardEvent.js","../node_modules/react-dom/lib/SyntheticFocusEvent.js","../node_modules/react-dom/lib/SyntheticKeyboardEvent.js","../node_modules/react-dom/lib/getEventKey.js","../node_modules/react-dom/lib/SyntheticDragEvent.js","../node_modules/react-dom/lib/SyntheticTouchEvent.js","../node_modules/react-dom/lib/SyntheticTransitionEvent.js","../node_modules/react-dom/lib/SyntheticWheelEvent.js","../node_modules/react-dom/lib/ReactDOMContainerInfo.js","../node_modules/react-dom/lib/ReactDOMFeatureFlags.js","../node_modules/react-dom/lib/ReactMarkupChecksum.js","../node_modules/react-dom/lib/adler32.js","../node_modules/react-dom/lib/ReactVersion.js","../node_modules/react-dom/lib/findDOMNode.js","../node_modules/react-dom/lib/renderSubtreeIntoContainer.js","../node_modules/webpack/buildin/harmony-module.js","../node_modules/react-router/lib/Router.js","../node_modules/react-router/lib/computeChangedRoutes.js","../node_modules/react-router/lib/TransitionUtils.js","../node_modules/react-router/lib/isActive.js","../node_modules/react-router/lib/getComponents.js","../node_modules/react-router/lib/matchRoutes.js","../node_modules/react-router/lib/getRouteParams.js","../node_modules/react-router/lib/IndexLink.js","../node_modules/react-router/lib/withRouter.js","../node_modules/react-router/lib/IndexRedirect.js","../node_modules/react-router/lib/IndexRoute.js","../node_modules/react-router/lib/Route.js","../node_modules/react-router/lib/match.js","../node_modules/query-string/index.js","../node_modules/strict-uri-encode/index.js","../node_modules/history/lib/createMemoryHistory.js","../node_modules/history/lib/AsyncUtils.js","../node_modules/react-router/lib/applyRouterMiddleware.js","../node_modules/react-router/lib/browserHistory.js","../node_modules/history/lib/createBrowserHistory.js","../node_modules/history/lib/RefreshProtocol.js","../node_modules/react-router/lib/hashHistory.js","../node_modules/history/lib/createHashHistory.js","../node_modules/history/lib/HashProtocol.js","../node_modules/react-hotkeys/lib/HotKeys.js","../node_modules/react-hotkeys/node_modules/lodash/assign.js","../node_modules/react-hotkeys/node_modules/lodash/_baseIsNative.js","../node_modules/react-hotkeys/node_modules/lodash/_getRawTag.js","../node_modules/react-hotkeys/node_modules/lodash/_objectToString.js","../node_modules/react-hotkeys/node_modules/lodash/_isMasked.js","../node_modules/react-hotkeys/node_modules/lodash/_coreJsData.js","../node_modules/react-hotkeys/node_modules/lodash/_getValue.js","../node_modules/react-hotkeys/node_modules/lodash/_copyObject.js","../node_modules/react-hotkeys/node_modules/lodash/_createAssigner.js","../node_modules/react-hotkeys/node_modules/lodash/_baseRest.js","../node_modules/react-hotkeys/node_modules/lodash/_overRest.js","../node_modules/react-hotkeys/node_modules/lodash/_apply.js","../node_modules/react-hotkeys/node_modules/lodash/_setToString.js","../node_modules/react-hotkeys/node_modules/lodash/_baseSetToString.js","../node_modules/react-hotkeys/node_modules/lodash/constant.js","../node_modules/react-hotkeys/node_modules/lodash/_shortOut.js","../node_modules/react-hotkeys/node_modules/lodash/_isIterateeCall.js","../node_modules/react-hotkeys/node_modules/lodash/_arrayLikeKeys.js","../node_modules/react-hotkeys/node_modules/lodash/_baseTimes.js","../node_modules/react-hotkeys/node_modules/lodash/isArguments.js","../node_modules/react-hotkeys/node_modules/lodash/_baseIsArguments.js","../node_modules/react-hotkeys/node_modules/lodash/stubFalse.js","../node_modules/react-hotkeys/node_modules/lodash/_baseIsTypedArray.js","../node_modules/react-hotkeys/node_modules/lodash/_baseUnary.js","../node_modules/react-hotkeys/node_modules/lodash/_nodeUtil.js","../node_modules/react-hotkeys/node_modules/lodash/_baseKeys.js","../node_modules/react-hotkeys/node_modules/lodash/_nativeKeys.js","../node_modules/react-hotkeys/node_modules/lodash/_overArg.js","../node_modules/react-hotkeys/node_modules/lodash/_baseIsEqual.js","../node_modules/react-hotkeys/node_modules/lodash/_baseIsEqualDeep.js","../node_modules/react-hotkeys/node_modules/lodash/_Stack.js","../node_modules/react-hotkeys/node_modules/lodash/_listCacheClear.js","../node_modules/react-hotkeys/node_modules/lodash/_listCacheDelete.js","../node_modules/react-hotkeys/node_modules/lodash/_listCacheGet.js","../node_modules/react-hotkeys/node_modules/lodash/_listCacheHas.js","../node_modules/react-hotkeys/node_modules/lodash/_listCacheSet.js","../node_modules/react-hotkeys/node_modules/lodash/_stackClear.js","../node_modules/react-hotkeys/node_modules/lodash/_stackDelete.js","../node_modules/react-hotkeys/node_modules/lodash/_stackGet.js","../node_modules/react-hotkeys/node_modules/lodash/_stackHas.js","../node_modules/react-hotkeys/node_modules/lodash/_stackSet.js","../node_modules/react-hotkeys/node_modules/lodash/_mapCacheClear.js","../node_modules/react-hotkeys/node_modules/lodash/_Hash.js","../node_modules/react-hotkeys/node_modules/lodash/_hashClear.js","../node_modules/react-hotkeys/node_modules/lodash/_hashDelete.js","../node_modules/react-hotkeys/node_modules/lodash/_hashGet.js","../node_modules/react-hotkeys/node_modules/lodash/_hashHas.js","../node_modules/react-hotkeys/node_modules/lodash/_hashSet.js","../node_modules/react-hotkeys/node_modules/lodash/_mapCacheDelete.js","../node_modules/react-hotkeys/node_modules/lodash/_isKeyable.js","../node_modules/react-hotkeys/node_modules/lodash/_mapCacheGet.js","../node_modules/react-hotkeys/node_modules/lodash/_mapCacheHas.js","../node_modules/react-hotkeys/node_modules/lodash/_mapCacheSet.js","../node_modules/react-hotkeys/node_modules/lodash/_SetCache.js","../node_modules/react-hotkeys/node_modules/lodash/_setCacheAdd.js","../node_modules/react-hotkeys/node_modules/lodash/_setCacheHas.js","../node_modules/react-hotkeys/node_modules/lodash/_arraySome.js","../node_modules/react-hotkeys/node_modules/lodash/_cacheHas.js","../node_modules/react-hotkeys/node_modules/lodash/_equalByTag.js","../node_modules/react-hotkeys/node_modules/lodash/_Uint8Array.js","../node_modules/react-hotkeys/node_modules/lodash/_mapToArray.js","../node_modules/react-hotkeys/node_modules/lodash/_setToArray.js","../node_modules/react-hotkeys/node_modules/lodash/_equalObjects.js","../node_modules/react-hotkeys/node_modules/lodash/_getAllKeys.js","../node_modules/react-hotkeys/node_modules/lodash/_baseGetAllKeys.js","../node_modules/react-hotkeys/node_modules/lodash/_arrayPush.js","../node_modules/react-hotkeys/node_modules/lodash/_getSymbols.js","../node_modules/react-hotkeys/node_modules/lodash/_arrayFilter.js","../node_modules/react-hotkeys/node_modules/lodash/stubArray.js","../node_modules/react-hotkeys/node_modules/lodash/_getTag.js","../node_modules/react-hotkeys/node_modules/lodash/_DataView.js","../node_modules/react-hotkeys/node_modules/lodash/_Promise.js","../node_modules/react-hotkeys/node_modules/lodash/_Set.js","../node_modules/react-hotkeys/node_modules/lodash/_WeakMap.js","../node_modules/react-hotkeys/node_modules/lodash/isBoolean.js","../node_modules/react-hotkeys/node_modules/lodash/forEach.js","../node_modules/react-hotkeys/node_modules/lodash/_arrayEach.js","../node_modules/react-hotkeys/node_modules/lodash/_baseEach.js","../node_modules/react-hotkeys/node_modules/lodash/_baseForOwn.js","../node_modules/react-hotkeys/node_modules/lodash/_baseFor.js","../node_modules/react-hotkeys/node_modules/lodash/_createBaseFor.js","../node_modules/react-hotkeys/node_modules/lodash/_createBaseEach.js","../node_modules/react-hotkeys/node_modules/lodash/_castFunction.js","../node_modules/mousetrap/mousetrap.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/react-side-effect/lib/index.js","../node_modules/shallowequal/index.js","../node_modules/whatwg-fetch/fetch.js","../node_modules/js-yaml/lib/js-yaml.js","../node_modules/js-yaml/lib/js-yaml/loader.js","../node_modules/js-yaml/lib/js-yaml/mark.js","../node_modules/js-yaml/lib/js-yaml/type/str.js","../node_modules/js-yaml/lib/js-yaml/type/seq.js","../node_modules/js-yaml/lib/js-yaml/type/map.js","../node_modules/js-yaml/lib/js-yaml/type/null.js","../node_modules/js-yaml/lib/js-yaml/type/bool.js","../node_modules/js-yaml/lib/js-yaml/type/int.js","../node_modules/js-yaml/lib/js-yaml/type/float.js","../node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../node_modules/js-yaml/lib/js-yaml/type/merge.js","../node_modules/js-yaml/lib/js-yaml/type/binary.js","../node_modules/base64-js/index.js","../node_modules/ieee754/index.js","../node_modules/isarray/index.js","../node_modules/js-yaml/lib/js-yaml/type/omap.js","../node_modules/js-yaml/lib/js-yaml/type/pairs.js","../node_modules/js-yaml/lib/js-yaml/type/set.js","../node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../node_modules/js-yaml/lib/js-yaml/type/js/function.js","../node_modules/esprima/dist/esprima.js","../node_modules/js-yaml/lib/js-yaml/dumper.js","../node_modules/create-react-class/factory.js","../node_modules/react-notification-system/dist/NotificationContainer.js","../node_modules/react-notification-system/dist/NotificationItem.js","../node_modules/react-notification-system/dist/helpers.js","../node_modules/react-notification-system/dist/styles.js","../node_modules/lodash/_baseClone.js","../node_modules/lodash/_Stack.js","../node_modules/lodash/_listCacheClear.js","../node_modules/lodash/_listCacheDelete.js","../node_modules/lodash/_listCacheGet.js","../node_modules/lodash/_listCacheHas.js","../node_modules/lodash/_listCacheSet.js","../node_modules/lodash/_stackClear.js","../node_modules/lodash/_stackDelete.js","../node_modules/lodash/_stackGet.js","../node_modules/lodash/_stackHas.js","../node_modules/lodash/_stackSet.js","../node_modules/lodash/_baseIsNative.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_isMasked.js","../node_modules/lodash/_coreJsData.js","../node_modules/lodash/_getValue.js","../node_modules/lodash/_MapCache.js","../node_modules/lodash/_mapCacheClear.js","../node_modules/lodash/_Hash.js","../node_modules/lodash/_hashClear.js","../node_modules/lodash/_hashDelete.js","../node_modules/lodash/_hashGet.js","../node_modules/lodash/_hashHas.js","../node_modules/lodash/_hashSet.js","../node_modules/lodash/_mapCacheDelete.js","../node_modules/lodash/_isKeyable.js","../node_modules/lodash/_mapCacheGet.js","../node_modules/lodash/_mapCacheHas.js","../node_modules/lodash/_mapCacheSet.js","../node_modules/lodash/_arrayEach.js","../node_modules/lodash/_defineProperty.js","../node_modules/lodash/_baseAssign.js","../node_modules/lodash/_baseTimes.js","../node_modules/lodash/isArguments.js","../node_modules/lodash/_baseIsArguments.js","../node_modules/lodash/stubFalse.js","../node_modules/lodash/_isIndex.js","../node_modules/lodash/isTypedArray.js","../node_modules/lodash/_baseIsTypedArray.js","../node_modules/lodash/_baseKeys.js","../node_modules/lodash/_nativeKeys.js","../node_modules/lodash/_baseAssignIn.js","../node_modules/lodash/_baseKeysIn.js","../node_modules/lodash/_nativeKeysIn.js","../node_modules/lodash/_cloneBuffer.js","../node_modules/lodash/_copyArray.js","../node_modules/lodash/_copySymbols.js","../node_modules/lodash/_arrayFilter.js","../node_modules/lodash/_copySymbolsIn.js","../node_modules/lodash/_getAllKeys.js","../node_modules/lodash/_getAllKeysIn.js","../node_modules/lodash/_DataView.js","../node_modules/lodash/_Promise.js","../node_modules/lodash/_Set.js","../node_modules/lodash/_WeakMap.js","../node_modules/lodash/_initCloneArray.js","../node_modules/lodash/_initCloneByTag.js","../node_modules/lodash/_Uint8Array.js","../node_modules/lodash/_cloneDataView.js","../node_modules/lodash/_cloneRegExp.js","../node_modules/lodash/_cloneSymbol.js","../node_modules/lodash/_cloneTypedArray.js","../node_modules/lodash/_initCloneObject.js","../node_modules/lodash/_baseCreate.js","../node_modules/lodash/isMap.js","../node_modules/lodash/_baseIsMap.js","../node_modules/lodash/isSet.js","../node_modules/lodash/_baseIsSet.js","../node_modules/prop-types-extra/lib/deprecated.js","../node_modules/prop-types-extra/node_modules/warning/warning.js","../node_modules/uncontrollable/utils.js","../node_modules/react-widgets/lib/SlideDownTransition.js","../node_modules/dom-helpers/events/filter.js","../node_modules/dom-helpers/events/listen.js","../node_modules/dom-helpers/util/camelize.js","../node_modules/dom-helpers/util/hyphenateStyle.js","../node_modules/dom-helpers/util/hyphenate.js","../node_modules/dom-helpers/style/getComputedStyle.js","../node_modules/dom-helpers/style/removeStyle.js","../node_modules/dom-helpers/transition/isTransform.js","../node_modules/react-transition-group/utils/PropTypes.js","../node_modules/prop-types-extra/lib/elementType.js","../node_modules/prop-types-extra/node_modules/react-is/index.js","../node_modules/prop-types-extra/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-widgets/lib/Calendar.js","../node_modules/react-component-managers/lib/autoFocus.js","../node_modules/react-component-managers/lib/focusManager.js","../node_modules/react-component-managers/lib/mixin.js","../node_modules/react-widgets/lib/Header.js","../node_modules/react-widgets/lib/Footer.js","../node_modules/react-widgets/lib/Month.js","../node_modules/date-arithmetic/index.js","../node_modules/react-widgets/lib/Year.js","../node_modules/react-widgets/lib/Decade.js","../node_modules/react-widgets/lib/Century.js","../node_modules/react-widgets/lib/SlideTransitionGroup.js","../node_modules/react-transition-group/TransitionGroup.js","../node_modules/react-transition-group/utils/ChildMapping.js","../node_modules/dom-helpers/query/matches.js","../node_modules/react-widgets/lib/DateTimePickerInput.js","../node_modules/react-widgets/lib/Input.js","../node_modules/react-widgets/lib/TimeList.js","../node_modules/react-widgets/lib/ListOptionGroup.js","../node_modules/dom-helpers/util/scrollTo.js","../node_modules/dom-helpers/query/scrollParent.js","../node_modules/dom-helpers/query/scrollTop.js","../node_modules/dom-helpers/util/requestAnimationFrame.js","../node_modules/react-widgets/lib/AddToListOption.js","../node_modules/react-widgets/lib/DropdownListInput.js","../node_modules/react-widgets/lib/util/getAccessors.js","../node_modules/react-widgets/lib/configure.js","../node_modules/react-modal/lib/components/Modal.js","../node_modules/exenv/index.js","../node_modules/react-modal/lib/components/ModalPortal.js","../node_modules/react-modal/lib/helpers/focusManager.js","../node_modules/react-modal/lib/helpers/scopeTab.js","../node_modules/react-modal/lib/helpers/ariaAppHider.js","../node_modules/react-modal/lib/helpers/refCount.js","../node_modules/element-class/index.js","../node_modules/brace/index.js","../node_modules/w3c-blob/browser.js","../node_modules/lodash.isequal/index.js","../node_modules/brace/mode/json.js","../node_modules/brace/worker/json.js","../node_modules/brace/mode/yaml.js","../node_modules/brace/theme/monokai.js","../node_modules/codemirror/addon/edit/continuelist.js","../node_modules/simplemde/src/js/codemirror/tablist.js","../node_modules/codemirror/addon/display/fullscreen.js","../node_modules/codemirror/mode/meta.js","../node_modules/codemirror/addon/display/placeholder.js","../node_modules/codemirror/addon/selection/mark-selection.js","../node_modules/codemirror/mode/gfm/gfm.js","../node_modules/codemirror-spell-checker/src/js/spell-checker.js","../node_modules/typo-js/typo.js","../node_modules/marked/lib/marked.js","../node_modules/highlight.js/lib/languages/actionscript.js","../node_modules/highlight.js/lib/languages/apache.js","../node_modules/highlight.js/lib/languages/applescript.js","../node_modules/highlight.js/lib/languages/asciidoc.js","../node_modules/highlight.js/lib/languages/bash.js","../node_modules/highlight.js/lib/languages/basic.js","../node_modules/highlight.js/lib/languages/clojure.js","../node_modules/highlight.js/lib/languages/clojure-repl.js","../node_modules/highlight.js/lib/languages/cmake.js","../node_modules/highlight.js/lib/languages/coffeescript.js","../node_modules/highlight.js/lib/languages/cpp.js","../node_modules/highlight.js/lib/languages/crystal.js","../node_modules/highlight.js/lib/languages/css.js","../node_modules/highlight.js/lib/languages/dart.js","../node_modules/highlight.js/lib/languages/diff.js","../node_modules/highlight.js/lib/languages/django.js","../node_modules/highlight.js/lib/languages/dns.js","../node_modules/highlight.js/lib/languages/dockerfile.js","../node_modules/highlight.js/lib/languages/dos.js","../node_modules/highlight.js/lib/languages/dsconfig.js","../node_modules/highlight.js/lib/languages/elixir.js","../node_modules/highlight.js/lib/languages/elm.js","../node_modules/highlight.js/lib/languages/erb.js","../node_modules/highlight.js/lib/languages/erlang-repl.js","../node_modules/highlight.js/lib/languages/erlang.js","../node_modules/highlight.js/lib/languages/excel.js","../node_modules/highlight.js/lib/languages/fortran.js","../node_modules/highlight.js/lib/languages/fsharp.js","../node_modules/highlight.js/lib/languages/gherkin.js","../node_modules/highlight.js/lib/languages/go.js","../node_modules/highlight.js/lib/languages/gradle.js","../node_modules/highlight.js/lib/languages/groovy.js","../node_modules/highlight.js/lib/languages/haml.js","../node_modules/highlight.js/lib/languages/handlebars.js","../node_modules/highlight.js/lib/languages/haskell.js","../node_modules/highlight.js/lib/languages/htmlbars.js","../node_modules/highlight.js/lib/languages/http.js","../node_modules/highlight.js/lib/languages/ini.js","../node_modules/highlight.js/lib/languages/java.js","../node_modules/highlight.js/lib/languages/javascript.js","../node_modules/highlight.js/lib/languages/json.js","../node_modules/highlight.js/lib/languages/julia.js","../node_modules/highlight.js/lib/languages/julia-repl.js","../node_modules/highlight.js/lib/languages/kotlin.js","../node_modules/highlight.js/lib/languages/ldif.js","../node_modules/highlight.js/lib/languages/less.js","../node_modules/highlight.js/lib/languages/lisp.js","../node_modules/highlight.js/lib/languages/livescript.js","../node_modules/highlight.js/lib/languages/lua.js","../node_modules/highlight.js/lib/languages/makefile.js","../node_modules/highlight.js/lib/languages/markdown.js","../node_modules/highlight.js/lib/languages/mathematica.js","../node_modules/highlight.js/lib/languages/matlab.js","../node_modules/highlight.js/lib/languages/perl.js","../node_modules/highlight.js/lib/languages/nginx.js","../node_modules/highlight.js/lib/languages/nix.js","../node_modules/highlight.js/lib/languages/objectivec.js","../node_modules/highlight.js/lib/languages/ocaml.js","../node_modules/highlight.js/lib/languages/pgsql.js","../node_modules/highlight.js/lib/languages/php.js","../node_modules/highlight.js/lib/languages/plaintext.js","../node_modules/highlight.js/lib/languages/powershell.js","../node_modules/highlight.js/lib/languages/prolog.js","../node_modules/highlight.js/lib/languages/python.js","../node_modules/highlight.js/lib/languages/r.js","../node_modules/highlight.js/lib/languages/reasonml.js","../node_modules/highlight.js/lib/languages/ruby.js","../node_modules/highlight.js/lib/languages/rust.js","../node_modules/highlight.js/lib/languages/scala.js","../node_modules/highlight.js/lib/languages/scss.js","../node_modules/highlight.js/lib/languages/shell.js","../node_modules/highlight.js/lib/languages/smalltalk.js","../node_modules/highlight.js/lib/languages/sql.js","../node_modules/highlight.js/lib/languages/swift.js","../node_modules/highlight.js/lib/languages/typescript.js","../node_modules/highlight.js/lib/languages/vbnet.js","../node_modules/highlight.js/lib/languages/vbscript.js","../node_modules/highlight.js/lib/languages/vim.js","../node_modules/highlight.js/lib/languages/yaml.js","../node_modules/highlight.js/lib/languages/xml.js","../node_modules/json-stringify-safe/stringify.js","../node_modules/redux-immutable-state-invariant/dist/isImmutable.js","../node_modules/redux-immutable-state-invariant/dist/trackForMutations.js"],"names":["module","exports","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread2","target","i","arguments","length","source","forEach","key","getOwnPropertyDescriptors","defineProperties","defineProperty","__esModule","createMemoryHistory","hashHistory","browserHistory","applyRouterMiddleware","formatPattern","useRouterHistory","match","routerShape","locationShape","RouterContext","createRoutes","Route","Redirect","IndexRoute","IndexRedirect","withRouter","IndexLink","Link","Router","undefined","_RouteUtils","get","_PropTypes","_PatternUtils","_Router3","_interopRequireDefault","_Link3","_IndexLink3","_withRouter3","_IndexRedirect3","_IndexRoute3","_Redirect3","_Route3","_RouterContext3","_match3","_useRouterHistory3","_applyRouterMiddleware3","_browserHistory3","_hashHistory3","_createMemoryHistory3","obj","default","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","_classCallCheck","instance","Constructor","TypeError","_inherits","subClass","superClass","prototype","create","constructor","value","writable","configurable","_typeof","Symbol","iterator","_possibleConstructorReturn","self","call","ReferenceError","factory","globalObject","window","nodeType","hljs","ArrayProto","objectKeys","languages","aliases","SAFE_MODE","noHighlightRe","languagePrefixRe","fixMarkupRe","LANGUAGE_NOT_FOUND","options","classPrefix","tabReplace","useBR","COMMON_KEYWORDS","split","escape","replace","tag","node","nodeName","toLowerCase","isNotHighlighted","language","test","inherit","parent","result","objects","Array","slice","nodeStream","_nodeStream","offset","child","firstChild","nextSibling","nodeValue","event","expand_or_clone_mode","mode","variants","cached_variants","map","variant","dependencyOnParent","endsWithParent","starts","isFrozen","scoreForKeyword","keyword","providedScore","Number","word","indexOf","compileLanguage","reStr","re","langRe","global","RegExp","case_insensitive","buildModeRegex","matcherRe","term","matchIndexes","regexes","matcher","matchAt","addRule","rule","regex","toString","exec","reCountMatchGroups","contains","beginKeywords","begin","terminator_end","illegal","terminators","el","regexps","separator","backreferenceRe","numCaptures","ret","substring","index","String","joinRe","lastIndex","s","type","extra","Error","compileMode","compiled","keywords","rawKeywords","compiled_keywords","splitAndCompile","className","str","pair","compileKeywords","lexemesRe","lexemes","join","beginRe","endSameAsBegin","end","endRe","illegalRe","relevance","concat","c","highlight","name","ignore_illegals","continuation","keywordMatch","match_str","hasOwnProperty","buildSpan","insideSpan","leaveOpen","noPrefix","openSpan","processBuffer","top","subLanguage","explicit","mode_buffer","continuations","highlightAuto","processSubLanguage","keyword_match","last_index","substr","processKeywords","startNewMode","doBeginMatch","lexeme","new_mode","escapeRe","skip","excludeBegin","returnBegin","doEndMatch","matchPlusRemainder","end_mode","endOfMode","testRe","endsParent","origin","returnEnd","excludeEnd","lastMatch","processLexeme","text_before_match","processed","getLanguage","console","error","current","count","err","message","errorRaised","text","languageSubset","second_best","autoDetection","fixMarkup","p1","highlightBlock","block","originalStream","resultNode","_class","classes","parentNode","warn","blockLanguage","document","createElement","innerHTML","textContent","original","highlighted","nodeStack","selectStream","open","attributes","a","close","render","stream","reverse","splice","pop","mergeStreams","prevClassName","currentLang","resultLang","trim","buildClassName","initHighlighting","called","blocks","querySelectorAll","PLAINTEXT_LANGUAGE","disableAutodetect","lang","configure","user_options","initHighlightingOnLoad","addEventListener","registerLanguage","rawDefinition","bind","alias","listLanguages","requireLanguage","debugMode","IDENT_RE","UNDERSCORE_IDENT_RE","NUMBER_RE","C_NUMBER_RE","BINARY_NUMBER_RE","RE_STARTERS_RE","BACKSLASH_ESCAPE","APOS_STRING_MODE","QUOTE_STRING_MODE","PHRASAL_WORDS_MODE","COMMENT","inherits","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","HASH_COMMENT_MODE","NUMBER_MODE","C_NUMBER_MODE","BINARY_NUMBER_MODE","CSS_NUMBER_MODE","REGEXP_MODE","TITLE_MODE","UNDERSCORE_TITLE_MODE","METHOD_GUARD","deepFreeze","freeze","objIsFunction","getOwnPropertyNames","prop","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","root","this","previousUnderscore","_","ObjProto","SymbolProto","nativeIsArray","isArray","nativeKeys","nativeCreate","Ctor","_wrapped","VERSION","builtinIteratee","optimizeCb","func","context","argCount","collection","accumulator","cb","iteratee","identity","isFunction","isObject","property","Infinity","restArguments","startIndex","Math","max","rest","args","baseCreate","shallowProperty","has","path","deepGet","MAX_ARRAY_INDEX","pow","getLength","isArrayLike","each","collect","results","currentKey","createReduce","dir","reducer","memo","initial","reduce","foldl","inject","reduceRight","foldr","find","detect","predicate","findIndex","findKey","select","list","reject","negate","every","all","some","any","includes","include","item","fromIndex","guard","values","invoke","contextPath","method","pluck","where","attrs","findWhere","computed","lastComputed","v","min","shuffle","sample","n","random","clone","last","rand","temp","sortBy","criteria","sort","left","right","b","group","behavior","partition","groupBy","indexBy","countBy","reStrSymbol","toArray","isString","size","pass","first","head","take","array","tail","drop","compact","Boolean","flatten","input","shallow","strict","output","idx","isArguments","j","len","without","otherArrays","difference","uniq","unique","isSorted","isBoolean","seen","union","arrays","intersection","argsLength","unzip","zip","createPredicateIndexFinder","findLastIndex","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","lastIndexOf","range","start","stop","step","ceil","chunk","executeBound","sourceFunc","boundFunc","callingContext","bound","callArgs","partial","boundArgs","placeholder","position","bindAll","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","timeout","previous","later","leading","now","throttled","remaining","clearTimeout","trailing","cancel","debounce","immediate","debounced","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","proto","allKeys","mapObject","pairs","invert","functions","methods","names","createAssigner","keysFunc","defaults","l","extend","extendOwn","assign","eq","deepEq","keyInObj","pick","omit","tap","interceptor","isMatch","aStack","bStack","valueOf","areArrays","aCtor","bCtor","isEqual","isEmpty","isElement","nodelist","childNodes","Int8Array","isFinite","isSymbol","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","unescapeMap","createEscaper","escaper","testRegexp","replaceRegexp","string","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","escapeRegExp","escapeChar","template","settings","oldSettings","variable","Function","e","data","argument","chain","_chain","chainResult","mixin","toJSON","ActionTypes","createStore","preloadedState","enhancer","_ref2","currentReducer","currentState","currentListeners","nextListeners","isDispatching","ensureCanMutateNextListeners","getState","subscribe","listener","isSubscribed","dispatch","action","isPlainObject","listeners","replaceReducer","nextReducer","$$observable","_ref","outerSubscribe","observer","observeState","next","unsubscribe","getUndefinedStateErrorMessage","actionType","combineReducers","reducers","reducerKeys","finalReducers","process","sanityError","finalReducerKeys","assertReducerSanity","state","hasChanged","nextState","previousStateForKey","nextStateForKey","errorMessage","bindActionCreator","actionCreator","bindActionCreators","actionCreators","boundActionCreators","_len","funcs","_key","arg","composed","f","_extends","applyMiddleware","middlewares","store","_dispatch","middlewareAPI","middleware","PropTypes","shape","isRequired","Provider","_Component","_this","getChildContext","Children","only","children","Component","propTypes","storeShape","element","childContextTypes","displayName","nullListeners","notify","Subscription","parentSub","addNestedSub","trySubscribe","notifyNestedSubs","onStateChange","clear","createListenerCollection","tryUnsubscribe","_objectWithoutProperties","hotReloadingVersion","connectAdvanced","selectorFactory","_contextTypes","_childContextTypes","_ref$getDisplayName","getDisplayName","_ref$methodName","methodName","_ref$renderCountProp","renderCountProp","_ref$shouldHandleStat","shouldHandleStateChanges","_ref$storeKey","storeKey","_ref$withRef","withRef","connectOptions","subscriptionKey","version","contextTypes","instanceOf","WrappedComponent","invariant","wrappedComponentName","selectorFactoryOptions","Connect","renderCount","setWrappedInstance","initSelector","initSubscription","subscription","componentDidMount","selector","run","shouldComponentUpdate","forceUpdate","componentWillReceiveProps","nextProps","componentWillUnmount","getWrappedInstance","wrappedInstance","ref","sourceSelector","_this2","dummyState","componentDidUpdate","setState","addExtraProps","withExtras","hoistStatics","hasOwn","shallowEqual","countA","countB","wrapMapToPropsConstant","getConstant","constantSelector","dependsOnOwnProps","getDependsOnOwnProps","mapToProps","wrapMapToPropsFunc","proxy","stateOrDispatch","ownProps","mapDispatchToProps","mapStateToProps","defaultMergeProps","stateProps","dispatchProps","mergeProps","pure","areMergedPropsEqual","hasRunOnce","mergedProps","nextMergedProps","wrapMergePropsFunc","impureFinalPropsSelectorFactory","pureFinalPropsSelectorFactory","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","hasRunAtLeastOnce","handleSubsequentCalls","nextOwnProps","propsChanged","stateChanged","nextStateProps","statePropsChanged","handleNewState","finalPropsSelectorFactory","initMapStateToProps","initMapDispatchToProps","initMergeProps","factories","strictEqual","createConnect","_ref$connectHOC","connectHOC","_ref$mapStateToPropsF","mapStateToPropsFactories","defaultMapStateToPropsFactories","_ref$mapDispatchToPro","mapDispatchToPropsFactories","defaultMapDispatchToPropsFactories","_ref$mergePropsFactor","mergePropsFactories","defaultMergePropsFactories","_ref$selectorFactory","defaultSelectorFactory","_ref2$pure","_ref2$areStatesEqual","_ref2$areOwnPropsEqua","_ref2$areStatePropsEq","_ref2$areMergedPropsE","extraOptions","condition","format","d","argIndex","framesToPop","warning","React","withSideEffect","DocumentTitle","title","propsList","innermostProps","nextTitle","code","argIdx","encodeURIComponent","classNames","argType","inner","propIsEnumerable","toObject","val","test1","test2","fromCharCode","test3","letter","shouldUseNative","from","to","_prodInvariant","DOMProperty","ReactDOMComponentFlags","ATTR_NAME","ID_ATTRIBUTE_NAME","Flags","internalInstanceKey","getRenderedHostOrTextFromComponent","component","rendered","_renderedComponent","precacheNode","inst","hostInst","_hostNode","precacheChildNodes","_flags","hasCachedChildNodes","_renderedChildren","childNode","outer","childInst","childID","_domID","getAttribute","getClosestInstanceFromNode","closest","parents","ReactDOMComponentTree","getInstanceFromNode","getNodeFromInstance","_hostParent","uncacheNode","YAMLException","TYPE_CONSTRUCTOR_OPTIONS","YAML_NODE_KINDS","kind","resolve","construct","represent","defaultStyle","styleAliases","style","compileStyleAliases","_HotKeys","_FocusTrap","_HotKeyMapMixin","_toArray","arr","hookCallback","hooks","isDate","fn","res","hasOwnProp","createUTC","locale","createLocalOrUTC","utc","getParsingFlags","m","_pf","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","rfc2822","weekdayMismatch","isValid","_isValid","flags","parsedParts","isNowValid","_d","invalidWeekday","_strict","bigHour","createInvalid","NaN","fun","t","momentProperties","copyConfig","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","updateInProgress","Moment","config","updateOffset","isMoment","absFloor","number","toInt","argumentForCoercion","coercedNumber","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","msg","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","stack","deprecations","deprecateSimple","mergeConfigs","parentConfig","childConfig","Locale","set","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","zeroFill","targetLength","forceSign","absNumber","zerosToFill","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","callback","localeData","formatMoment","expandFormat","mom","makeFormatFunction","invalidDate","replaceLongDateFormatTokens","longDateFormat","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","addRegexToken","strictRegex","isStrict","getParseRegexForToken","regexEscape","matched","p2","p3","p4","tokens","addParseToken","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInYear","year","isLeapYear","y","parseTwoDigitYear","parseInt","getSetYear","makeGetSet","keepTime","set$1","month","date","daysInMonth","x","modMonth","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","MONTHS_IN_FORMAT","defaultLocaleMonths","defaultLocaleMonthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","dayOfMonth","getSetMonth","defaultMonthsShortRegex","defaultMonthsRegex","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","createDate","h","M","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","day","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","hours","lowercase","minutes","matchMeridiem","_meridiemParse","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","globalLocale","getSetHour","baseConfig","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","LTS","LT","L","LL","LLL","LLLL","dayOfMonthOrdinalParse","relativeTime","future","past","ss","mm","hh","dd","MM","yy","meridiemParse","locales","localeFamilies","normalizeLocale","loadLocale","oldLocale","_abbr","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","abbr","_config","parentLocale","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","configFromArray","currentDate","expectedWeekday","yearToUse","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","currentDateArray","w","weekYear","weekdayOverflow","GG","W","E","createLocal","_week","curWeek","gg","_dayOfYear","dayOfYearFromWeekInfo","_nextDay","getDay","setUTCMinutes","getUTCMinutes","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","configFromStringAndFormat","untruncateYear","yearStr","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromRFC2822","parsedArray","monthStr","dayStr","hourStr","minuteStr","secondStr","extractFromRFC2822Strings","weekdayStr","parsedInput","checkWeekday","obsOffset","militaryOffset","numOffset","hm","calculateOffset","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","hour","isPm","meridiemHour","meridiemFixWrap","prepareConfig","preparse","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromStringAndArray","createFromInputFallback","configFromString","minute","second","millisecond","configFromObject","configFromInput","isUTC","k","isObjectEmpty","add","createFromConfig","prototypeMin","other","prototypeMax","pickBy","moments","ordering","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","unitHasDecimal","isDurationValid","_milliseconds","_days","_months","_data","_bubble","isDuration","absRound","round","utcOffset","sign","offsetFromString","chunkOffset","parts","cloneWithOffset","model","diff","setTime","local","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","diffRes","parseIso","base","isBefore","positiveMomentsDifference","momentsDifference","inp","isAfter","createAdder","direction","period","tmp","addSubtract","isAdding","invalid","subtract","monthDiff","wholeMonthDiff","anchor","newLocaleData","defaultFormat","defaultFormatUtc","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","isoWeekYear","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetSecond","parseMs","getSetMillisecond","preParsePostFormat","time","formats","sod","startOf","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","isoWeekday","inputString","postformat","withoutSuffix","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","u","getPrioritizedUnits","toDate","toISOString","keepOffset","inspect","zone","isLocal","suffix","unix","creationData","isoWeeks","weekInfo","isoWeeksInYear","parseWeekday","parseIsoWeekday","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","isDSTShifted","_isDSTShifted","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","_calendar","_longDateFormat","formatUpper","toUpperCase","_invalidDate","_ordinal","isFuture","_relativeTime","pastFuture","isFormat","_monthsShort","_monthsParseExact","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","charAt","isLower","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","as","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","Y","D","toFixed","total","totalSign","ymSign","daysSign","hmsSign","proto$2","monthsFromDays","withSuffix","posNegDuration","relativeTime$1","toIsoString","updateLocale","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","limit","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","DATE","TIME","TIME_SECONDS","TIME_MS","WEEK","MONTH","canUseDOM","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","attachEvent","canUseViewport","screen","isInWorker","accessor","disabled","numberFormat","_propTypes","_elementType","elementType","_createChainableTypeChecker","_localizers","propType","bool","acceptsArray","oneOfType","setNumber","_parse","parse","_ref$propType","localePropType","_ref$decimalChar","decimalChar","_ref$precision","precision","checkFormats","REQUIRED_NUMBER_FORMATS","_numberLocalizer","wrapFormat","culture","setDate","_parse2","firstOfWeek","_ref2$propType","REQUIRED_DATE_FORMATS","_dateLocalizer","createWrapper","_numberLocalizer2","getFormat","_numberLocalizer3","_numberLocalizer4","_numberLocalizer5","_numberLocalizer6","_dateLocalizer2","_dateLocalizer3","_dateLocalizer4","_dateLocalizer5","formatter","required","makeEmptyFunction","emptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","debugTool","componentClass","pickElementProps","others","omitOwn","whitelist","whitelistRegex","r","_len2","_key2","compClass","userAgent","navigator","platform","gecko","ie_upto10","ie_11up","edge","ie","ie_version","documentMode","webkit","qtwebkit","chrome","presto","safari","vendor","mac_geMountainLion","phantom","ios","android","mobile","mac","chromeOS","windows","presto_version","flipCtrlCmd","captureRightClick","classTest","cls","rmClass","removeChildren","removeChild","removeChildrenAndAdd","appendChild","elt","content","cssText","createTextNode","eltP","setAttribute","host","activeElt","activeElement","body","shadowRoot","addClass","joinClasses","createRange","endNode","setEnd","setStart","createTextRange","moveToElementText","collapse","moveEnd","moveStart","selectInput","copyObj","overwrite","countColumn","tabSize","startValue","search","nextTab","selectionStart","selectionEnd","_e","Delayed","Pass","sel_dontScroll","scroll","sel_mouse","sel_move","findColumn","goal","col","spaceStrs","spaceStr","lst","nothing","createObj","nonASCIISingleCaseWordChar","isWordCharBasic","ch","isWordChar","helper","extendingChars","isExtendingChar","charCodeAt","skipExtendingChars","findFirst","pred","midF","bidiOther","getBidiPartAt","order","sticky","found","cur","bidiOrdering","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","BidiSpan","level","outerType","types","i$1","prev","i$2","type$1","i$3","prev$1","type$2","i$4","type$3","i$5","cur$1","type$4","i$6","end$1","replace$1","j$1","i$7","at","j$2","nstart","unshift","getOrder","line","noHandlers","on","emitter","map$$1","_handlers","getHandlers","off","removeEventListener","detachEvent","signal","handlers","signalDOMEvent","cm","override","preventDefault","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","ctrlKey","zwspSupported","badBidiRects","dragAndDrop","div","zeroWidthElement","measure","offsetHeight","offsetWidth","hasBadBidiRects","txt","r0","getBoundingClientRect","r1","splitLinesAuto","nl","rt","hasSelection","getSelection","te","range$$1","ownerDocument","selection","parentElement","compareEndPoints","hasCopyEvent","oncopy","badZoomedRects","modes","mimeModes","defineMode","dependencies","resolveMode","spec","getMode","mfactory","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","innerMode","info","startState","a1","a2","StringStream","lineOracle","lastColumnPos","lastColumnValue","lineStart","getLine","doc","lines","sz","chunkSize","getBetween","iter","getLines","updateLineHeight","height","lineNo","no","lineAtHeight","lh","isLine","lineNumberFor","lineNumberFormatter","firstLineNumber","Pos","cmp","equalCursorPos","copyPos","maxPos","minPos","clipLine","clipPos","linelen","clipToLen","clipPosArray","eol","sol","peek","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","indentation","pattern","consume","caseInsensitive","cased","hideFirstChars","lookAhead","oracle","baseToken","SavedContext","Context","maxLookAhead","baseTokens","baseTokenPos","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","overlay","overlays","i_end","opaque","styles","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","stateAfter","save","styleClasses","highlightFrontier","modeFrontier","precise","display","minindent","minline","lim","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","nextLine","startAt","callBlankLine","readToken","blankLine","copy","Token","takeToken","asArray","extractLineClasses","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","sawReadOnlySpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","change","full","oldFirst","markedSpans","oldLast","startCh","endCh","isInsert","old","nw","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","startsBefore","markedSpansAfter","sameLine","span$1","clearEmptySpans","newMarkers","gapMarkers","gap","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","collapsedSpanAround","conflictingCollapsedRange","lineNo$$1","visualLine","merged","visualLineNo","lineN","vis","visualLineEndNo","lastLine","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","p","lineLength","found$1","findMaxLine","maxLine","maxLineLength","maxLineChanged","Line","estimateHeight","cleanUpLine","styleToClassCache","styleToClassCacheWithMode","interpretTokenStyle","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","getOption","addToken","buildToken","buildTokenBadBidi","insertLineContent","externalMeasured","maps","caches","lastChild","querySelector","defaultSpecialCharPlaceholder","startStyle","endStyle","css","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","txt$1","tabWidth","specialCharPlaceholder","fullStyle","attr","part","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","foundBookmarks","endStyles","upto","tokenText","LineView","visualLineContinued","hidden","buildViewArray","nextPos","view","operationGroup","orphanDelayedCallbacks","signalLater","delayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","changes","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","zIndex","getLineContent","ext","built","background","insertBefore","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","lineNumInnerWidth","gutterSpecs","gutterWidth","alignable","insertLineWidgets","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","handleMouseEvents","positionLineWidget","above","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","marginLeft","widgetHeight","parentStyle","gutters","clientWidth","eventInWidget","sizer","mover","paddingTop","lineSpace","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","paddingRight","scrollGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","clientHeight","barHeight","mapFromLineView","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","bottom","ensureLineHeights","place","nodeAndOffsetInLineMap","coverStart","coverEnd","getUsefulRect","logicalXDPI","deviceXDPI","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","measureText","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","pageXOffset","documentElement","scrollLeft","pageScrollY","marginTop","pageYOffset","scrollTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","estimateCoords","PosWithInfo","outside","xRel","coordsChar","coordsCharInner","rangeEnd","wrappedLineExtent","wrappedLineExtentChar","boxIsAfter","box","widgetHeight$$1","ltr","coordsBidiPartWrapped","coordsBidiPart","baseX","chAround","boxAround","atLeft","atStart","_lineNo","closestDist","endX","dist","textHeight","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","colDiff","regChange","lendiff","updateLineNumbers","viewChanged","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","sel","ranges","primIndex","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursor","cursorHeight","otherCursor","cmpCoords","fragment","padding","leftSide","rightSide","sizerWidth","docLTR","drawForLine","fromArg","toArg","lineLen","wrapX","side","extent","iterateBidiSections","fromPos","toPos","openStart","openEnd","openRight","topLeft","topRight","botLeft","botRight","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","focused","clearInterval","blinker","cursorDiv","visibility","cursorBlinkRate","setInterval","ensureFocus","focus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","readOnly","selForContextMenu","reset","receivedFocus","updateHeightsInViewport","prevBottom","lineDiv","updateWidgetHeight","chWidth","visibleLines","viewport","ensure","ensureFrom","ensureTo","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","getCursor","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","alignHorizontally","measureForScrollbars","gutterW","docH","viewHeight","viewWidth","barLeft","docHeight","NativeScrollbars","vert","horiz","tabIndex","checkedZeroWidth","minHeight","minWidth","update","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","pointerEvents","bar","maybeDisable","elementFromPoint","NullScrollbars","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","scrollbarModel","initScrollbars","scrollbarStyle","axis","nextOpId","startOperation","op","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","ops","ownsGroup","endOperation","endCb","callbacks","fireCallbacksForOps","finishOperation","endOperation_R1","endOperation_W1","endOperation_R2","endOperation_W2","endOperation_finish","endOperations","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","mustUpdate","DisplayUpdate","updatedDisplay","updateDisplayIfNeeded","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","takeFocus","setDocumentHeight","postUpdateDisplay","wheelStartX","wheelStartY","doScroll","innerHeight","scrollNode","scrollIntoView","maybeScrollWindow","changed","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","operation","methodOp","docMethodOp","highlightWorker","workTime","changedLines","oldStyles","oldCls","newCls","ischange","workDelay","force","visible","editorIsHidden","wrapperHeight","oldDisplayWidth","events","renderedView","maybeUpdateLineNumberWidth","viewportMargin","different","lastWrapHeight","lastWrapWidth","adjustView","toUpdate","selSnapshot","hasFocus","active","anchorNode","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","container","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","removeAllRanges","addRange","restoreSelection","selectionDiv","reportedViewFrom","reportedViewTo","updateGutterSpace","alignWidgets","comp","align","innerW","lineGutter","lineNumWidth","getGutters","sawLineNumbers","renderGutters","specs","gElt","updateGutters","Display","draggable","wheelDX","wheelDY","activeTouch","init","wheelSamples","wheelPixelsPerUnit","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","onScrollWheel","canScrollX","canScrollY","pixels","movedX","movedY","Selection","equals","here","there","deepCopy","Range","somethingSelected","normalizeSelection","mayTouch","selectionsMayTouch","prim","inv","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","estimateHeight$$1","spansFor","updateLine","linesFor","firstLine","lastText","lastSpans","nlines","insert","remove","added","added$1","added$2","linkedDocs","sharedHistOnly","propagate","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","History","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","history","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","existing","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","newChanges","extendRange","posBefore","extendSelection","setSelection","extendSelections","heads","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","preventCursorLeft","selectLeft","preventCursorRight","selectRight","atomic","near","movePos","far","cantEdit","selectAll","filterChange","canceled","makeChange","ignoreReadOnly","suppressEdits","mark","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","suppress","antiChanges","returned","shiftDoc","distance","removed","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","replaceRange","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","removeInner","insertInner","iterN","oldHeight","leaf","maybeSpill","me","sibling","myIndex","used","LineWidget","opt","adjustScrollWhenAboveVisible","this$1","oldH","nextMarkerId","TextMarker","markText","cloneNode","isParent","SharedTextMarker","markTextShared","replacedWith","addToHistory","curLine","addMarkedSpan","clearOnEnter","clearHistory","withOp","visual","dHeight","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","nextDocId","Doc","lineSep","cleanGeneration","getValue","lineSeparator","setValue","getRange","getLineHandle","getLineNumber","getLineHandleVisualStart","lineCount","listSelections","setCursor","extendSelectionsBy","setSelections","addSelection","getSelections","replaceSelection","dup","replaceSelections","newSel","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineClass","removeLineClass","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","CodeMirror","splitIds","iterLinkedDocs","getEditor","setDirection","eachLine","lastDrop","onDrop","clearDragCursor","files","dataTransfer","isReadOnly","FileReader","File","read","loadFile","file","allowDropFileTypes","reader","onload","readAsText","draggingText","text$1","getData","selected","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","editors","globalsRegistered","ensureGlobalHandlers","resizeTimer","onResize","registerGlobalHandlers","setSize","keyNames","3","8","9","13","16","17","18","19","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","145","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","keyMap","normalizeKeyName","alt","ctrl","cmd","mod","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","keyCode","addModifierNames","noShift","altKey","metaKey","shiftKey","keyName","altGraphKey","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","prep","targetTop","basic","pcDefault","emacsy","macDefault","commands","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","lineStartSmart","goLineEnd","visualLineEnd","lineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","execCommand","transposeChars","newlineAndIndent","sels","indentLine","openLine","toggleOverwrite","firstNonWS","inWS","doHandleBinding","dropShift","ensurePolled","prevShift","stopSeq","dispatchKey","seq","keySeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","lastStoppedKey","onKeyDown","handled","up","showCrossHair","onKeyUp","onKeyPress","charCode","handleCharBinding","lastClick","lastDoubleClick","PastClick","onMouseDown","supportsTouch","clickInGutter","repeat","compare","clickRepeat","selectingText","handleMappedButton","contained","option","addNew","moveOnDrag","configureMouse","dragDrop","moved","dragEnd","mouseMove","dragStart","e2","leftButtonStartDrag","ourRange","ourIndex","startSel","rangeForUnit","lastPos","extendTo","startCol","posCol","leftPos","oldRange","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","editorSize","counter","move","buttons","curCount","leftButtonSelect","leftButtonDown","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","touches","lineBox","g","contextMenuInGutter","themeChanged","theme","Init","optionHandlers","dragDropChanged","dragFunctions","toggle","enter","over","leave","wrappingChanged","inputStyles","inputStyle","pasteIncoming","cutIncoming","autofocus","touchFinished","prevTouch","finishTouch","farAway","touch","radiusX","radiusY","isMouseLikeTouchEvent","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","img","src","_top","onDragStart","getField","registerEventHandlers","finishInit","initHooks","textRendering","how","aggressive","indent","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","defineInitHook","lastCopied","setLastCopied","newLastCopied","applyTextInput","inserted","deleted","recent","paste","textLines","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","disableBrowserMagic","spellcheck","autocorrect","autocapitalize","hiddenTextarea","border","findPosH","origDir","moveOnce","boundToLine","bidi","mv","getWrappedLineExtent","moveInStorageOrder","searchInVisualLine","getRes","nextCh","moveVisually","findNextLine","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","posToDOM","badPos","bad","domToPos","lineNode","locateNodeInLineView","textNode","topNode","curNode","previousSibling","dist$1","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","updateFromDOM","readFromDOMSoon","forceCompositionEnd","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","pollSelection","pollInterval","poll","scan","isInGutter","triggerOnKeyDown","pollContent","fromNode","toNode","toIndex","newText","closing","extraLinebreak","addText","walk","cmText","markerID","isBlock","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","createField","textarea","prepareCopyCut","fastPoll","dispatchEvent","Event","_display","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","resetSelectionOnContextMenu","oldScrollY","oldCSS","oldWrapperCSS","wrapperBox","offsetParent","scrollY","scrollTo","rehide","detectingSelectAll","prepareSelectAllHack","mouseup","extval","deflt","notOnInit","defineOption","newBreaks","refresh","getInputField","detach","attach","integer","defineOptions","helpers","setOption","getDoc","addKeyMap","removeKeyMap","addOverlay","insertSorted","modeSpec","removeOverlay","newRanges","getTokenAt","getLineTokens","getTokenTypeAt","getHelpers","help","_global","getStateAfter","defaultTextHeight","defaultCharWidth","getViewport","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","check","getScrollInfo","scrollToRange","interpret","swapDoc","phrase","phraseText","phrases","getWrapperElement","getScrollerElement","getGutterElement","registerHelper","registerGlobalHelper","addEditorMethods","dontDelegate","defineMIME","mime","defineExtension","defineDocExtension","fromTextArea","tabindex","realSubmit","form","leaveSubmitMethodAlone","submit","wrappedSubmit","getTextArea","toTextArea","cmpPos","addLegacyProps","isBrowser","isIE","HIDDEN_TEXTAREA_STYLE","SIZING_STYLE","computedStyleCache","calculateNodeHeight","uiTextNode","uid","useCache","minRows","maxRows","nodeStyling","sizingStyle","getPropertyValue","boxSizing","paddingSize","borderSize","nodeInfo","calculateNodeStyling","setProperty","maxHeight","singleRowHeight","rowCount","seed","requestAnimationFrame","cancelAnimationFrame","onNextFrame","clearNextFrameAction","TextareaAutosize","_React$Component","_resizeLock","_onRootDOMNode","_rootDOMNode","inputRef","_onChange","_controlled","_resizeComponent","onChange","nodeHeight","_uid","useCacheForDOMMeasurements","_proto","_props","onHeightChange","excluded","sourceKeys","sourceSymbolKeys","_resizeListener","_this3","_clearNextFrame","_onNextFrameActionId","prevProps","prevState","purgeCache","defaultProps","_assign","CallbackQueue","PooledClass","ReactFeatureFlags","ReactReconciler","Transaction","dirtyComponents","updateBatchNumber","asapCallbackQueue","getPooled","asapEnqueued","batchingStrategy","ensureInjected","ReactUpdates","ReactReconcileTransaction","TRANSACTION_WRAPPERS","initialize","dirtyComponentsLength","flushBatchedUpdates","callbackQueue","notifyAll","ReactUpdatesFlushTransaction","reinitializeTransaction","reconcileTransaction","mountOrderComparator","c1","c2","_mountOrder","runBatchedUpdates","transaction","markerName","_pendingCallbacks","logTopLevelRenders","namedComponent","_currentElement","isReactTopLevelWrapper","getName","performUpdateIfNecessary","timeEnd","enqueue","getPublicInstance","getTransactionWrappers","destructor","release","perform","scope","addPoolingTo","queue","batchedUpdates","enqueueUpdate","isBatchingUpdates","_updateBatchNumber","injection","injectReconcileTransaction","ReconcileTransaction","injectBatchingStrategy","_batchingStrategy","asap","freeGlobal","freeSelf","_defineProperty","shouldBeReleasedProperties","EventInterface","currentTarget","eventPhase","bubbles","cancelable","timeStamp","isTrusted","SyntheticEvent","dispatchConfig","targetInst","nativeEvent","nativeEventTarget","_targetInst","Interface","propName","normalize","isDefaultPrevented","isPropagationStopped","persist","isPersistent","augmentClass","Class","fourArgumentPooler","isReactChildren","createRouteFromReactElement","createRoutesFromReactChildren","routes","_react","_react2","isValidChild","isValidElement","route","childRoutes","parentRoute","createPath","parsePath","getQueryStringValueFromPath","stripQueryStringValueFromPath","addQueryStringValueToPath","_warning","_parsePath","pathname","hash","_parsePath2","extractPath","hashIndex","searchIndex","location","basename","webpackPolyfill","paths","_dateArithmetic","monthsInYear","firstVisibleDay","firstOfMonth","lastVisibleDay","endOfMonth","visibleDays","lte","merge","defaultDate","today","tomorrow","_default","oneArgumentPooler","copyFieldsFrom","instancePool","standardReleaser","poolSize","DEFAULT_POOLER","CopyConstructor","pooler","NewKlass","twoArgumentPooler","threeArgumentPooler","a3","a4","fiveArgumentPooler","a5","baseIsNative","componentWillMount","getDerivedStateFromProps","componentWillUpdate","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","polyfill","isReactComponent","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","componentName","newApiName","maybeSnapshot","__suppressDeprecationWarning","isShallowEqual","keysA","keysB","groupBySortedKeys","grps","makeArray","baseClone","CLONE_DEEP_FLAG","ReactChildren","ReactComponent","ReactPureComponent","ReactClass","ReactDOMFactories","ReactElement","ReactPropTypes","ReactVersion","onlyChild","createFactory","cloneElement","__spread","PureComponent","createClass","createMixin","DOM","ReactCurrentOwner","REACT_ELEMENT_TYPE","RESERVED_PROPS","__self","__source","hasValidRef","hasValidKey","owner","$$typeof","_owner","childrenLength","childArray","cloneAndReplaceKey","oldElement","newKey","_self","_source","checkMask","bitmask","DOMPropertyInjection","MUST_USE_PROPERTY","HAS_BOOLEAN_VALUE","HAS_NUMERIC_VALUE","HAS_POSITIVE_NUMERIC_VALUE","HAS_OVERLOADED_BOOLEAN_VALUE","injectDOMPropertyConfig","domPropertyConfig","Injection","Properties","DOMAttributeNamespaces","DOMAttributeNames","DOMPropertyNames","DOMMutationMethods","isCustomAttribute","_isCustomAttributeFunctions","lowerCased","propConfig","propertyInfo","attributeName","attributeNamespace","propertyName","mutationMethod","mustUseProperty","hasBooleanValue","hasNumericValue","hasPositiveNumericValue","hasOverloadedBooleanValue","ATTRIBUTE_NAME_START_CHAR","ROOT_ATTRIBUTE_NAME","ATTRIBUTE_NAME_CHAR","getPossibleStandardName","isCustomAttributeFn","ReactRef","attachRefs","mountComponent","internalInstance","hostParent","hostContainerInfo","parentDebugID","markup","getReactMountReady","getHostNode","unmountComponent","safely","detachRefs","receiveComponent","nextElement","prevElement","_context","refsChanged","shouldUpdateRefs","DOMNamespaces","setInnerHTML","createMicrosoftUnsafeLocalFunction","setTextContent","enableLazy","insertTreeChildren","tree","insertTreeBefore","html","referenceNode","namespaceURI","DOMLazyTree","replaceChildWithTree","oldNode","newTree","queueChild","parentTree","childTree","queueHTML","queueText","compilePattern","matchPattern","getParamNames","paramNames","getParams","paramValues","params","paramName","parenCount","splatIndex","parenHistory","paramValue","splat","_invariant2","encodeURI","parenText","curTokenIdx","tokensSubset","nextParenIdx","_invariant","CompiledPatternsCache","regexpSource","_compilePattern","_compilePattern2","matchedPath","remainingPathname","decodeURIComponent","falseToWarn","warned","_warning2","_resetWarned","locationsAreEqual","statesAreEqual","createLocation","createQuery","_PathUtils","_Actions","POP","typeofA","keysofA","keysofB","isNothing","subject","sequence","cycle","isNegativeZero","NEGATIVE_INFINITY","common","Type","compileList","schema","exclude","includedSchema","currentType","previousType","previousIndex","Schema","definition","implicit","loadKind","compiledImplicit","compiledExplicit","compiledTypeMap","scalar","mapping","collectType","compileMap","DEFAULT","schemas","_setPrototypeOf","objectProto","nativeObjectToString","symToStringTag","toStringTag","getRawTag","isOwn","unmasked","objectToString","baseGetTag","overArg","getPrototype","transform","isObjectLike","funcProto","funcToString","objectCtorString","EventPluginHub","EventPluginUtils","accumulateInto","forEachAccumulated","getListener","accumulateDirectionalDispatches","phase","propagationPhase","registrationName","phasedRegistrationNames","listenerAtPhase","_dispatchListeners","_dispatchInstances","accumulateTwoPhaseDispatchesSingle","traverseTwoPhase","accumulateTwoPhaseDispatchesSingleSkipTarget","parentInst","getParentInstance","accumulateDispatches","ignoredDirection","accumulateDirectDispatchesSingle","EventPropagators","accumulateTwoPhaseDispatches","accumulateTwoPhaseDispatchesSkipTarget","accumulateDirectDispatches","accumulateEnterLeaveDispatches","traverseEnterLeave","EventPluginRegistry","ReactErrorUtils","listenerBank","eventQueue","executeDispatchesAndRelease","simulated","executeDispatchesInOrder","executeDispatchesAndReleaseSimulated","executeDispatchesAndReleaseTopLevel","getDictionaryKey","_rootNodeID","injectEventPluginOrder","injectEventPluginsByName","putListener","PluginModule","registrationNameModules","didPutListener","bankForRegistrationName","shouldPreventMouseEvent","deleteListener","willDeleteListener","deleteAllListeners","extractEvents","topLevelType","plugins","possiblePlugin","extractedEvents","enqueueEvents","processEventQueue","processingEventQueue","rethrowCaughtError","__purge","__getListenerBank","getEventTarget","UIEventInterface","defaultView","parentWindow","SyntheticUIEvent","dispatchMarker","ReactInstanceMap","_reactInternalInstance","components","falsy","arrayOf","listen","go","goBack","goForward","reason","captureStackTrace","ReactNoopUpdateQueue","updater","handler","instanceId","__id","idCount","isFirstFocusedRender","_firstFocus","dataIndexOf","valueMatcher","dataItem","valueField","dataText","dataValue","isValueEqual","datum","textField","_toConsumableArray","arr2","iterableToArray","OBSERVED_ERROR","TransactionImpl","transactionWrappers","wrapperInitData","_isInTransaction","isInTransaction","errorThrown","initializeAll","closeAll","initData","ViewportMetrics","MouseEventInterface","screenX","screenY","getModifierState","relatedTarget","fromElement","toElement","currentScrollLeft","currentScrollTop","SyntheticMouseEvent","reusableSVGContainer","WHITESPACE_TEST","NONVISIBLE_TEST","svg","svgNode","testElement","deleteData","matchHtmlRegExp","escapeHtml","hasEventPageXY","ReactEventEmitterMixin","getVendorPrefixedEventName","isEventSupported","alreadyListeningTo","isMonitoringScrollValue","reactTopListenersCounter","topEventMapping","topAbort","topAnimationEnd","topAnimationIteration","topAnimationStart","topBlur","topCanPlay","topCanPlayThrough","topChange","topClick","topCompositionEnd","topCompositionStart","topCompositionUpdate","topContextMenu","topCopy","topCut","topDoubleClick","topDrag","topDragEnd","topDragEnter","topDragExit","topDragLeave","topDragOver","topDragStart","topDrop","topDurationChange","topEmptied","topEncrypted","topEnded","topError","topFocus","topInput","topKeyDown","topKeyPress","topKeyUp","topLoadedData","topLoadedMetadata","topLoadStart","topMouseDown","topMouseMove","topMouseOut","topMouseOver","topMouseUp","topPaste","topPause","topPlay","topPlaying","topProgress","topRateChange","topScroll","topSeeked","topSeeking","topSelectionChange","topStalled","topSuspend","topTextInput","topTimeUpdate","topTouchCancel","topTouchEnd","topTouchMove","topTouchStart","topTransitionEnd","topVolumeChange","topWaiting","topWheel","topListenersIDKey","ReactBrowserEventEmitter","ReactEventListener","injectReactEventListener","setHandleTopLevel","handleTopLevel","setEnabled","enabled","isEnabled","listenTo","contentDocumentHandle","mountAt","isListening","getListeningForDocument","registrationNameDependencies","dependency","trapBubbledEvent","trapCapturedEvent","WINDOW_HANDLE","handlerBaseName","supportsEventPageXY","createEvent","ev","ensureScrollValueMonitoring","refreshScrollValues","monitorScrollValue","PUSH","REPLACE","supportsHistory","ua","supportsGoWithoutReloadUsingHash","supportsPopstateOnHashchange","isExtraneousPopstateEvent","isLength","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","entries","entry","getNative","isKeyable","__data__","assignValue","baseAssignValue","customizer","isNew","newValue","client","win","_isWindow","_classnames","Loading","Button","_this$props","label","icon","busy","_this$props$variant","_this$props$spinner","spinner","_this$props$component","Tag","oneOf","_spyOnComponent","spyOnComponent","_autoFocus","autoFocus","_focusManager","focusManager","_mountManager","mountManager","_timeoutManager","timeoutManager","_mixin","LIFECYCLE_HOOKS","STATIC_HOOKS","isStatic","ctx","originals","_dates","_inheritsLoose","VIEW_UNITS","clamp","CalendarView","activeId","role","CalendarViewCell","_React$Component2","handleChange","_this$props2","_proto2","_this$props3","inRange","isFocused","isNow","isOffView","_this$props4","viewUnit","isSelected","_this$props5","isDisabled","onClick","Body","Row","Cell","getMessages","messages","moveBack","moveForward","dateButton","timeButton","openCombobox","openDropdown","filterPlaceholder","emptyList","emptyFilter","createOption","searchTerm","tagsLabel","removeLabel","noneSelected","selectedItems","labels","increment","decrement","widgetEditable","widgetEnabled","isInDisabledFieldset","_reactDom","_matches","findDOMNode","interactionDecorator","disabledOnly","desc","initializer","routerMiddleware","routerActions","CALL_HISTORY_METHOD","routerReducer","LOCATION_CHANGE","syncHistoryWithStore","_reducer","_actions","_sync2","_middleware2","_iterableToArray","_arrayWithHoles","_nonIterableRest","fetch","emptyObject","refs","partialState","enqueueSetState","enqueueCallback","enqueueForceUpdate","isMounted","publicInstance","enqueueReplaceState","completeState","eventPluginOrder","namesToPlugins","recomputePluginOrdering","pluginName","pluginModule","pluginIndex","publishedEvents","eventTypes","eventName","publishEventForPlugin","eventNameDispatchConfigs","phaseName","publishRegistrationName","possibleRegistrationNames","injectedEventPluginOrder","injectedNamesToPlugins","isOrderingDirty","getPluginModuleForEvent","_resetEventPlugins","ComponentTree","TreeTraversal","executeDispatch","invokeGuardedCallbackWithCatch","invokeGuardedCallback","isEndish","isMoveish","isStartish","executeDirectDispatch","dispatchListener","dispatchInstance","dispatchListeners","dispatchInstances","executeDispatchesInOrderStopAtTrue","executeDispatchesInOrderStopAtTrueImpl","hasDispatches","isAncestor","getLowestCommonAncestor","argFrom","argTo","injectComponentTree","Injected","injectTreeTraversal","caughtError","correspondingUseElement","useHasFeature","implementation","hasFeature","eventNameSuffix","capture","isSupported","modifierKeyToProp","modifierStateGetter","keyArg","keyProp","Danger","getNodeAfter","insertChildAt","insertLazyTreeChildAt","moveChild","openingComment","closingComment","nextNode","moveDelimitedText","removeDelimitedText","startNode","DOMChildrenOperations","dangerouslyReplaceNodeWithMarkup","replaceDelimitedText","stringText","nodeAfterComment","processUpdates","updates","afterNode","mathml","MSApp","execUnsafeLocalFunction","arg0","arg1","arg2","arg3","ReactPropTypesSecret","hasReadOnlyValue","_assertSingleLink","inputProps","checkedLink","valueLink","_assertValueLink","_assertCheckedLink","checked","loggedTypeFailures","getDeclarationErrorAddendum","LinkedValueUtils","checkPropTypes","tagName","getChecked","executeOnChange","requestChange","injected","ReactComponentEnvironment","replaceNodeWithMarkup","processChildrenUpdates","injectEnvironment","environment","is","objA","objB","prevEmpty","nextEmpty","prevType","nextType","KeyEscapeUtils","escaperLookup","unescaperLookup","getInternalInstanceReadyForUpdate","callerName","ReactUpdateQueue","validateCallback","enqueueCallbackInternal","_pendingForceUpdate","_pendingStateQueue","_pendingReplaceState","enqueueElementInternal","nextContext","_pendingElement","formatUnexpectedArgument","validateDOMNesting","setRouteLeaveHook","isActive","loopAsync","turns","work","currentTurn","isDone","sync","hasNext","doneArgs","mapAsync","doneCount","_getRouteParams2","_ContextUtils","_React$PropTypes","mixins","ContextProvider","router","getDefaultProps","routeParams","elements","contextName","makeContextName","listenersKey","eventIndexKey","subscribeKey","contextProviderShape","eventIndex","ContextSubscriber","_ref4","lastRenderedEventIndexKey","handleContextUpdateKey","unsubscribeKey","getInitialState","_ref3","_setState","_setState2","hook","_AsyncUtils","_runTransitionHook","_runTransitionHook2","_LocationUtils","getCurrentLocation","getUserConfirmation","pushLocation","replaceLocation","keyLength","currentLocation","pendingLocation","beforeListeners","getCurrentIndex","updateLocation","nextLocation","currentIndex","listenBefore","confirmTransitionTo","transitionTo","prevPath","prevIndex","nextIndex","createKey","createHref","startListener","_DOMUtils","_DOMStateStorage","_ExecutionEnvironment","needsHashchangeListener","_createLocation","historyState","readState","confirm","handlePopState","handleUnpoppedHashChange","updateState","saveState","pushState","replaceState","arrayLikeKeys","baseKeys","Map","positions","tl","tr","tc","bl","br","bc","levels","success","notification","autoDismiss","dismissible","freeExports","freeModule","freeProcess","nodeUtil","binding","baseKeysIn","arrayFilter","stubArray","nativeGetSymbols","getSymbols","symbol","DataView","Promise","Set","WeakMap","toSource","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","getTag","ArrayBuffer","ctorString","Uint8Array","arrayBuffer","byteLength","uncontrollable","controlledValues","isCompositeComponent","Utils","controlledProps","PROPS_TO_OMIT","defaultKey","UncontrolledComponent","handlerName","_notifying","_values","unmounted","attachRef","isProp","getControlledInstance","_this4","newProps","propValue","uncontrolledPropTypes","_inner","ControlledComponent","deferControlTo","newComponent","additions","nextMethods","newObj","_interopRequireWildcard","Widget","dropUp","autofilling","_this$props$isRtl","isRtl","transforms","_camelizeStyle","_getComputedStyle2","_hyphenateStyle","_isTransform","_removeStyle","_properties","animationEnd","animationDelay","animationTiming","animationDuration","animationName","transitionEnd","transitionDuration","transitionDelay","transitionTiming","transitionProperty","_inDOM","_getTransitionPropert","vendorMap","O","Moz","Webkit","vendors","getTransitionProperties","timing","componentInstance","mounted","clock","chevronLeft","chevronRight","caretDown","caretUp","Icon","_didHandle","didHandle","_reactComponentManagers","_interaction","isWidgetDefaultPrevented","defaultGetDataState","getCommonListProps","accessors","optionComponent","itemComponent","groupComponent","listProps","dataState","textAccessor","valueAccessor","nextListData","prevList","_temp","getDataState","listComponent","getStateGetterFromList","sequentialData","disabledProp","_dataHelpers","returnFalse","getIsDisabled","moveNext","_Filter","presets","startsWith","EMPTY_VALUE","prevEnabled","nextIdx","nextEnabled","lastState","groups","sortedKeys","flat","grp","REACT_STATICS","KNOWN_STATICS","caller","arity","isGetOwnPropertySymbolsAvailable","targetComponent","sourceComponent","customStatics","ponyfill","yaml","createThunkMiddleware","extraArgument","thunk","withExtraArgument","ITERATOR_SYMBOL","maybeIterable","iteratorFn","initialState","payload","locationBeforeTransitions","contentKey","_callbacks","_contexts","_arg","contexts","checkpoint","rollback","supportedInputTypes","elem","scrollPosition","escapeTextContentForBrowser","isUnitlessNumber","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridColumn","fontWeight","lineClamp","lineHeight","opacity","orphans","widows","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","prefixKey","CSSProperty","shorthandPropertyExpansions","backgroundAttachment","backgroundColor","backgroundImage","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundPosition","borderWidth","borderStyle","borderColor","borderBottomWidth","borderBottomStyle","borderBottomColor","borderLeft","borderLeftWidth","borderLeftStyle","borderLeftColor","borderRight","borderRightStyle","borderRightColor","borderTop","borderTopWidth","borderTopStyle","borderTopColor","font","fontStyle","fontVariant","fontSize","fontFamily","outline","outlineWidth","outlineStyle","outlineColor","quoteAttributeValueForBrowser","VALID_ATTRIBUTE_NAME_REGEX","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","shouldIgnoreValue","DOMPropertyOperations","createMarkupForID","setAttributeForID","createMarkupForRoot","setAttributeForRoot","createMarkupForProperty","createMarkupForCustomAttribute","setValueForProperty","deleteValueForProperty","namespace","setAttributeNS","setValueForAttribute","removeAttribute","deleteValueForAttribute","didWarnValueDefaultValue","updateOptionsIfPendingUpdateAndMounted","_wrapperState","pendingUpdate","updateOptions","multiple","selectedValue","ReactDOMSelect","getHostProps","mountWrapper","initialValue","defaultValue","_handleChange","wasMultiple","getSelectValueContext","postUpdateWrapper","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","nextTick","browser","env","argv","versions","addListener","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","cwd","chdir","umask","ReactCompositeComponent","ReactEmptyComponent","ReactHostComponent","ReactCompositeComponentWrapper","instantiateReactComponent","shouldHaveDebugID","createInternalComponent","getNativeNode","createInstanceForText","_mountIndex","_mountImage","_instantiateReactComponent","ReactNodeTypes","HOST","COMPOSITE","EMPTY","getType","emptyComponentFactory","ReactEmptyComponentInjection","injectEmptyComponentFactory","instantiate","genericComponentClass","tagToComponentClass","textComponentClass","isTextComponent","injectGenericComponentClass","injectTextComponentClass","injectComponentClasses","componentClasses","getIteratorFn","getComponentKey","traverseContext","traverseAllChildrenImpl","nameSoFar","subtreeCount","nextNamePrefix","childrenString","setItem","getItem","removeItem","getItemIDs","addRoot","removeRoot","getRootIDs","isNative","reIsNative","itemMap","rootIDSet","itemByKey","rootByKey","getKeyFromID","getIDFromKey","unmountedIDs","purgeDeep","childIDs","describeComponentFrame","ownerName","fileName","describeID","ReactComponentTreeHook","getElement","ownerID","getOwnerID","onSetChildren","nextChildIDs","nextChildID","nextChild","parentID","onBeforeMountComponent","updateCount","onBeforeUpdateComponent","onMountComponent","onUpdateComponent","onUnmountComponent","purgeUnmountedComponents","_preventPurging","getCurrentStackAddendum","topElement","currentOwner","_debugID","getStackAddendumByID","getParentID","getChildIDs","getSource","getText","getUpdateCount","getRegisteredIDs","EventListener","eventType","registerDefault","ReactDOMSelection","containsNode","getActiveElement","ReactInputSelection","hasSelectionCapabilities","getSelectionInformation","focusedElem","selectionRange","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","getOffsets","offsets","setOffsets","ReactDOMContainerInfo","ReactDOMFeatureFlags","ReactMarkupChecksum","shouldUpdateReactComponent","ROOT_ATTR_NAME","instancesByReactRootID","getReactRootElementInContainer","mountComponentIntoNode","wrapperInstance","shouldReuseMarkup","_topLevelWrapper","ReactMount","_mountImageIntoNode","batchedMountComponentIntoNode","useCreateElement","unmountComponentFromNode","hasNonRootReactChild","rootEl","isValidContainer","getTopLevelWrapperInContainer","prevHostInstance","getHostRootInstanceInContainer","_hostContainerInfo","topLevelRootCounter","TopLevelWrapper","rootID","_instancesByReactRootID","scrollMonitor","renderCallback","_updateRootComponent","prevComponent","_renderNewRootComponent","wrapperID","_instance","renderSubtreeIntoContainer","parentComponent","_renderSubtreeIntoContainer","nextWrappedElement","_processChildContext","publicInst","updatedCallback","unmountComponentAtNode","reactRootElement","containerHasReactMarkup","containerHasNonRootReactChild","hasAttribute","rootElement","canReuseMarkup","checksum","CHECKSUM_ATTR_NAME","rootMarkup","outerHTML","normalizedMarkup","diffIndex","string1","string2","minLen","firstDifferenceIndex","_renderedNodeType","partialNextState","finishMatch","_matchRoutes2","_computeChangedRoutes","_computeChangedRoutes3","leaveRoutes","changeRoutes","enterRoutes","finishEnterHooks","redirectInfo","handleErrorOrRedirect","_getComponents2","_TransitionUtils","runLeaveHooks","removeListenBeforeHooksForRoute","runChangeHooks","runEnterHooks","RouteGuid","getRouteID","__id__","RouteHooks","getRouteHooksForRoutes","transitionHook","beforeUnloadHook","unlistenBefore","unlistenBeforeUnload","routeID","hasAnyProperties","indexOnly","_isActive3","listenBeforeLeavingRoute","thereWereNoRouteHooks","listenBeforeUnload","historyListener","redirectLocation","isPromise","then","assignRouterState","createRouterObject","transitionManager","resolveToLocation","query","activeStyle","activeClassName","onlyActiveOnIndex","handleClick","isModifiedEvent","isLeftClickEvent","toLocation","href","isEmptyObject","_InternalPropTypes","statics","onEnter","routeIndex","getRoutePattern","parentPattern","memoryHistory","_createMemoryHistory2","_useQueries2","_useBasename2","_queryString","defaultStringifyQuery","stringify","defaultParseQueryString","createHistory","stringifyQuery","parseQueryString","decodeQuery","encodeQuery","queryString","newLocation","addBasename","prependBasename","pname","normalizedBasename","normalizedPathname","QuotaExceededErrors","QuotaExceededError","QUOTA_EXCEEDED_ERR","SecurityErrors","SecurityError","sessionStorage","JSON","json","_useRouterHistory2","_useRouterHistory","FocusTrap","hotKeyMap","__hotKeyMap__","updateMap","newMap","buildMap","_isEqual2","parentMap","thisMap","_assign2","getMap","objValue","reIsUint","stubFalse","Buffer","isBuffer","baseIsTypedArray","baseUnary","nodeIsTypedArray","isTypedArray","baseIsEqual","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","SetCache","arraySome","cacheHas","equalFunc","isPartial","arrLength","othLength","stacked","arrValue","othValue","compared","othIndex","base64","ieee754","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","RangeError","encodingOrOffset","allocUnsafe","byteOffset","fromArrayLike","fromArrayBuffer","encoding","isEncoding","actual","write","fromString","buffer","fromObject","assertSize","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","arrayIndexOf","indexSize","valLength","buf","readUInt16BE","foundIndex","hexWrite","strLen","parsed","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","hi","lo","utf16leToBytes","fromByteArray","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","subarray","typedArraySupport","_augment","species","fill","allocUnsafeSlow","_isBuffer","swap16","swap32","swap64","thisStart","thisEnd","thisCopy","targetCopy","_arr","toHex","bytes","checkOffset","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","toByteArray","stringtrim","base64clean","dst","baseTimes","isIndex","inherited","isArr","isArg","isBuff","isType","skipIndexes","arrayPush","getSymbolsIn","symbolsFunc","_ownerDocument","WidgetPicker","openClass","picker","_SlideDownTransition","StaticContainer","shouldUpdate","Popup","Transition","transition","in","onEntering","onEntered","_on","_off","_filter","_listen","compareDocumentPosition","maybeID","maybeClass","nameOnly","simpleSelectorRE","getElementById","getElementsByTagName","_camelize","msPattern","docElem","_contains","clientTop","EXITING","ENTERED","ENTERING","EXITED","UNMOUNTED","_reactLifecyclesCompat","initialStatus","parentGroup","transitionGroup","appear","isMounting","appearStatus","unmountOnExit","mountOnEnter","status","nextCallback","updateStatus","nextStatus","cancelNextCallback","getTimeouts","exit","mounting","performEnter","performExit","appearing","timeouts","enterTimeout","safeSetState","onTransitionEnd","onExit","onExiting","onExited","setNextCallback","doesNotHaveTimeoutOrListener","addEndListener","childProps","_objectWithoutPropertiesLoose","validate","checkType","propFullName","componentNameSafe","propFullNameSafe","chainedCheckType","manager","timers","_Button","Select","bordered","CustomPropTypes","Props","_widgetHelpers","_reduceToListState","_Listbox","_ListOption","_ListOptionGroup","_messages","onSelect","onMove","renderItem","renderGroup","focusedItem","selectedItem","List","mapItems","items","runningIdx","itemIdx","renderedIndexOf","renderOption","Option","_this$props6","elementProps","emptyListMessage","isHeader","_ref2$searchTerm","_normalizeOptions","normalizeOptions","minLength","_ref3$searchTerm","_normalizeOptions2","suggest","_ref4$searchTerm","_normalizeOptions3","neq","gt","gte","lt","endsWith","nextOptions","minLengh","_ref$caseSensitive","caseSensitive","textValue","normalizeFilter","nodeRef","Listbox","ListOption","handleSelect","getScrollParent","currentFocused","currentVisible","cancelScroll","nextFocused","lastVisible","lastItem","_scrollTo","createDOMFactory","area","article","aside","audio","bdi","bdo","big","blockquote","canvas","caption","cite","colgroup","datalist","del","details","dfn","dialog","dl","dt","em","embed","fieldset","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","ins","kbd","keygen","legend","li","link","main","menu","menuitem","meta","meter","nav","noscript","ol","optgroup","param","picture","progress","q","rp","ruby","samp","script","section","small","strong","summary","sup","table","tbody","td","tfoot","thead","track","ul","var","video","wbr","circle","clipPath","defs","ellipse","image","linearGradient","mask","polygon","polyline","radialGradient","tspan","focusable","isTabIndexNotNaN","isTabIndexNaN","tabbable","thisArg","nativeMax","nonEnumShadows","isArrayLikeObject","isPrototype","assigner","copyObject","otherArgs","baseRest","sources","isIterateeCall","cmCfg","modeCfg","htmlMode","htmlModeMissing","highlightFormatting","maxBlockquoteDepth","taskLists","strikethrough","emoji","fencedCodeBlockHighlighting","xml","tokenTypeOverrides","tokenTypes","quote","list1","list2","list3","imageAltText","imageMarker","formatting","linkInline","linkEmail","linkText","linkHref","tokenType","hrRE","listRE","taskListRE","atxHeaderRE","allowAtxHeaderWithoutSpace","setextHeaderRE","textRE","fencedCodeRE","linkDefRE","punctuation","switchInline","inline","switchBlock","linkTitle","indentedCode","htmlBlock","htmlState","tagStart","tokenize","isInText","inlineNormal","blockNormal","trailingSpaceNewLine","prevLine","thisLine","firstTokenOnLine","prevLineLineIsEmpty","prevLineIsIndentedCode","prevLineIsHr","prevLineIsList","maxNonCodeIndentation","listStack","lineIndentation","indentationDiff","allowsInlineContinuation","fencedCodeEnd","isHr","setext","listType","taskList","fencedEndRE","localMode","findModeByName","mimes","localState","footnoteLink","md_inside","returnType","currListInd","hasExitedList","maxFencedEndInd","taskOpen","taskClosed","listMod","handleText","matchCh","previousFormatting","formattingEscape","atts","leftFlanking","rightFlanking","setEm","setStrong","retType","endChar","returnState","linkRE","footnoteLinkInside","footnoteUrl","textAfter","blockCommentStart","blockCommentEnd","closeBrackets","fold","htmlConfig","autoSelfClosers","implicitlyClosed","contextGrabbers","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","allowMissingTagName","editorConf","config_","setStyle","inText","parser","inBlock","doctype","depth","inTag","baseState","closure","isInAttribute","inAttribute","stringStartCol","terminator","startOfLine","noIndent","popContext","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","attrState","matchClosing","closeState","closeStateErr","_stream","attrEqState","attrValueState","attrContinuedState","baseIndent","fullLine","multilineTagIndentPastTag","multilineTagIndentFactor","alignCDATA","tagAfter","grabbers","configuration","skipAttribute","xmlCurrentTag","xmlCurrentContext","cx","overlayMode","combine","basePos","baseCur","overlayPos","overlayCur","streamSeen","combineTokens","overlayToken","symbolObservablePonyfill","observable","createReactClass","NotificationContainer","Constants","Styles","NotificationSystem","_isMounted","_getStyles","overrideStyle","overrideWidth","setOverrideStyle","Wrapper","Containers","DefaultStyle","messageWrapper","dismiss","actionWrapper","byElement","_element","_didNotificationRemoved","notifications","toCheck","onRemove","noAnimation","allowHTML","addNotification","_notification","onAdd","getNotificationRef","foundNotification","removeNotification","_hideNotification","editNotification","newNotification","newNotifications","stateNotification","clearNotifications","containers","_notifications","getStyles","define","dragEl","parentEl","ghostEl","cloneEl","nextEl","lastDownEl","scrollEl","scrollParentEl","scrollCustomFn","oldIndex","newIndex","activeGroup","putSortable","pointerElemChangedInterval","lastPointerElemX","lastPointerElemY","tapEvt","touchEvt","lastTarget","lastDirection","lastMode","targetMoveDistance","ghostRelativeParent","realDragElRect","autoScrolls","scrolling","awaitingDragStarted","ignoreNextClick","sortables","pastFirstInvertThresh","isCircumstantialInvert","ghostRelativeParentInitialScroll","R_SPACE","expando","$","jQuery","Zepto","Polymer","captureMode","passive","IE11OrLess","Edge","FireFox","Safari","PositionGhostAbsolutely","CSSFloatProperty","supportDraggable","supportCssPointerEvents","_silent","_alignedSilent","savedInputChecked","_detectDirection","elCSS","_css","elWidth","child1","_getChild","child2","firstChildCSS","secondChildCSS","firstChildWidth","marginRight","_getRect","secondChildWidth","flexDirection","gridTemplateColumns","float","touchingSideChild2","_isClientInRowColumn","targetRect","targetS1Opp","targetS2Opp","mouseOnOppAxis","_getParentAutoScrollElement","includeSelf","_getWindowScrollingElement","gotSelf","elemCSS","overflowX","overflowY","scrollingElement","_scrollBy","_autoScroll","_throttle","evt","isFallback","sens","scrollSensitivity","speed","scrollSpeed","winScroller","scrollThisInstance","_clearAutoScrolls","scrollFn","layersOut","currentParent","vx","vy","scrollPosX","scrollPosY","pid","layer","Sortable","_emulateDragOver","_onTouchMove","scrollOffsetY","scrollOffsetX","bubbleScroll","autoScroll","_prepareGroup","toFn","pull","sameGroup","otherGroup","originalGroup","checkPull","checkPut","put","revertClone","_checkAlignment","_computeIsAligned","_isTrueParentSortable","trueParent","_artificalBubble","sortable","originalEvt","nextParent","_extend","artificialBubble","_hideGhostForTarget","_unhideGhostForTarget","stopImmediatePropagation","_throttleTimeout","nearestEmptyInsertDetectEvent","nearest","_lastChild","emptyInsertThreshold","insideHorizontally","insideVertically","_detectNearestEmptySortable","_onDragOver","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","ghostClass","chosenClass","dragClass","ignore","preventOnFilter","animation","easing","dropBubble","dragoverBubble","dataIdAttr","touchStartThreshold","devicePixelRatio","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","nativeDraggable","_onTapStart","_closest","includeCTX","_getParentOrHost","_toggleClass","classList","_matrix","appliedTransforms","DOMMatrix","WebKitCSSMatrix","CSSMatrix","_find","_dispatchEvent","targetEl","toEl","fromEl","onName","CustomEvent","initEvent","originalEvent","pullMode","lastPutMode","_onMove","dragRect","willInsertAfter","retVal","onMoveFn","dragged","draggedRect","related","relatedRect","_disableDraggable","_unsilent","childNum","currentChild","lastElementChild","previousElementSibling","_getInsertDirection","_index","_generateId","sum","msMatchesSelector","webkitMatchesSelector","_clone","dom","_nextTick","_cancelNextTick","adjustForTransform","adjustForFixed","elRect","innerWidth","containerRect","matrix","_isScrolledPast","elSide","parentSide","_getRelativeScrollOffset","sortableMouseAligned","_getDirection","originalTarget","composedPath","inputs","_saveInputCheckedState","isContentEditable","_prepareDragStart","_handleAutoScroll","ogElemScroller","newElem","dragStartFn","_lastX","_lastY","_disableDelayedDragEvents","_triggerDragStart","_onDrop","_disableDelayedDrag","_delayedDragTouchMoveHandler","_dragStartTimer","pointerType","_onDragStart","_dragStarted","_appendGhost","_nulling","forAutoScroll","relativeScrollOffset","translate3d","ghostRelativeParentRect","_hideClone","_cloneId","_loopId","_dragStartId","revert","activeSortable","isOwner","canSort","animated","completed","elLastChild","mouseOnAxis","targetS2","_ghostIsLast","_showClone","targetBeforeFirstSwap","aligned","differentLevel","side1","scrolledPastTop","scrollBefore","el1","el2","el1Rect","el2Rect","el1S1Opp","el1S2Opp","el1OppLength","el2S1Opp","el2S2Opp","el2OppLength","_isElInRowColumn","isLastTarget","targetS1","_getSwapDirection","nextElementSibling","moveVector","insertion","_animate","prevRect","currentRect","_offUpEvents","handleEvent","dropEffect","_globalDragOver","destroy","cloneHidden","utils","toggleClass","cancelNextTick","detectDirection","getChild","_class2","_descriptor","_descriptor2","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_class3","_activeElement","_deprecated","_uncontrollable","_Widget","_WidgetPicker","_Popup","_Calendar","_DateTimePickerInput","_Select","_TimeList","_scrollManager","_Icon","_initializerDefineProperty","_assertThisInitialized","_applyDecoratedDescriptor","decorators","decorator","NEXT_VIEW","onToggle","onCurrentDateChange","editFormat","timeComponent","dateIcon","timeIcon","popupTransition","containerClassName","DateTimePicker","attachCalRef","calRef","attachTimeRef","timeRef","attachInputRef","inputId","dateId","listId","activeCalendarId","activeOptionId","handleScroll","renderInput","owns","ariaLabelledby","ariaDescribedby","inputReadOnly","editing","renderButtons","handleCalendarClick","handleTimeClick","renderCalendar","calendarProps","handleDateSelect","onNavigate","renderTimeList","timeListProps","dateOrNull","handleTimeSelect","preserveDate","shouldRenderList","shouldRenderTimeList","shouldRenderCalendar","handleKeyDown","handleKeyPress","handleBlur","handleFocus","_this$props7","inRangeValue","constrain","_this4$props","_this5","_this5$props","_this6","_this7","dateTime","dateStr","formatDate","_this8","_this9","_this10","isTime","_List","_AddToListOption","_DropdownListInput","Filter","_getAccessors","CREATE_OPTION","DropdownList","handleFocusChanged","handleInputChange","handleAutofillChange","filledValue","_iterator","_isArray","handleAutofill","attachFilterRef","filterRef","attachListRef","listRef","valueChanged","lastValue","initialIdx","nextFocusedItem","nextValue","clearSearch","renderList","searchIcon","_this$state","filteredData","allowCreate","createId","handleCreate","selectIcon","busySpinner","valueComponent","_this$state2","valueItem","findOrSelf","shouldRenderPopup","autoComplete","onAutofill","onAutofillChange","findOption","character","_currentWord","onSearch","lastSearchTerm","onCreate","hasExtactMatch","_this$state3","lower","_this7$props","_this7$state","createIsFocused","canCreate","closeWithFocus","focusItem","localizer","decade","_moment","endOfDecade","century","endOfCentury","getMoment","_format","_configure","setDateLocalizer","localField","_brace2","_lodash2","acequire","editorOptions","ReactAce","_PureComponent","onBeforeLoad","cursorStart","showGutter","wrapEnabled","showPrintMargin","_props$scrollMargin","scrollMargin","keyboardHandler","onLoad","annotations","editor","edit","editorProps","renderer","setScrollMargin","getSession","setMode","setTheme","setFontSize","setShowGutter","setUseWrapMode","setShowPrintMargin","onCopy","onPaste","session","onScroll","handleOptions","setAnnotations","handleMarkers","availableOptions","$options","command","addCommand","setKeyboardHandler","oldProps","appliedClassesArray","oldClass","setOptions","scrollMargins","handleScrollMargins","silent","fromJSON","resize","margins","setScrollMargins","currentMarkers","getMarkers","removeMarker","_i2","startRow","endRow","endCol","_ref$inFront","inFront","addMarker","_props2","divStyle","minLines","maxLines","highlightActiveLine","enableBasicAutocompletion","enableLiveAutocompletion","CodeMirrorSpellChecker","marked","isMac","bindings","toggleBold","toggleItalic","drawLink","toggleHeadingSmaller","toggleHeadingBigger","drawImage","toggleBlockquote","toggleOrderedList","toggleUnorderedList","toggleCodeBlock","togglePreview","toggleStrikethrough","toggleHeading1","toggleHeading2","toggleHeading3","cleanBlock","drawTable","drawHorizontalRule","toggleSideBySide","toggleFullScreen","shortcuts","isMobile","opera","fixShortcut","createIcon","enableTooltips","actionName","tooltip","getBindingName","createTootlip","createSep","stat","bold","italic","saved_overflow","codemirror","toolbarButton","toolbarElements","fullscreen","sidebyside","_toggleBlock","blockStyles","fenceCharsToInsert","fencing_line","token_state","code_type","line_num","firstTok","lastTok","fencedChars","block_start","block_end","cur_start","cur_end","tok","is_code","start_text","start_line","end_text","end_line","fence_chars","search_from","next_line","next_line_last_tok","no_sel_and_starting_of_line","sel_multi","start_line_sel","end_line_sel","repl_start","repl_end","_replaceSelection","insertFencingAtSelection","_toggleLine","_toggleHeading","startPoint","endPoint","_cleanBlock","url","promptURLs","prompt","promptTexts","insertTexts","horizontalRule","preview","useSideBySideListener","previewNormal","toolbar","toolbar_div","sideBySideRenderingFunction","previewRender","startEnd","currHeadingLevel","repl","start_chars","end_chars","_mergeProperties","wordCount","toolbarBuiltInButtons","SimpleMDE","autoDownloadFA","autoDownloadFontAwesome","styleSheets","log","showIcons","plainText","markdown","parsingConfig","autosave","unique_id","foundSavedValue","isLocalStorageAvailable","localStorage","markedOptions","renderingConfig","singleLineBreaks","breaks","codeSyntaxHighlighting","_rendered","backdrop","spellChecker","gitHubSpice","codeMirrorInstance","styleSelectedText","forceSync","gui","createToolbar","statusbar","createStatusbar","sideBySide","createSideBySide","temp_cm","simplemde","loaded","getHours","getMinutes","autosaveTimeoutId","clearAutosavedValue","cScroll","pScroll","ratio","onscroll","toolbarData","toolbarGuideIcon","hideIcons","nonSeparatorIconsFollow","toolbarTips","onclick","cmWrapper","onUpdate","isPreviewActive","isSideBySideActive","isFullscreenActive","supportMultiple","Dropzone","isDragActive","isDragReject","allFilesAccepted","onDropAccepted","onDropRejected","disablePreview","fileList","acceptedFiles","rejectedFiles","onFileDialogCancel","fileInputEl","isFileDialogActive","accept","rejectClassName","rejectStyle","borderRadius","appliedStyle","inputAttributes","divProps","customProps","onDragEnter","onDragLeave","disableClick","maxSize","minSize","isMultipleAllowed","dataTransferItemsList","isImmutable","_isImmutable2","_trackForMutations2","tracker","detectMutations","wasMutated","BETWEEN_DISPATCHES_MESSAGE","dispatchedAction","INSIDE_DISPATCH_MESSAGE","_jsonStringifySafe2","pad","num","maxLength","formatTime","getSeconds","getMilliseconds","timer","performance","getLogLevel","_options$level","_options$logger","logger","_options$logErrors","logErrors","_options$duration","_options$timestamp","timestamp","transformer","_options$stateTransfo","stateTransformer","_options$actionTransf","actionTransformer","actn","_options$errorTransfo","errorTransformer","_options$colors","colors","logBuffer","printBuffer","logEntry","started","startedTime","took","nextEntry","formattedAction","isCollapsed","formattedTime","titleCSS","groupCollapsed","prevStateLevel","actionLevel","errorLevel","nextStateLevel","groupEnd","returnedValue","isNativeReflectConstruct","Reflect","sham","Proxy","Parent","_cache","_slicedToArray","arrayWithHoles","_n","_s","nonIterableRest","traverseAllChildren","userProvidedKeyEscapeRegex","escapeUserProvidedKey","ForEachBookKeeping","forEachFunction","forEachContext","forEachSingleChild","bookKeeping","MapBookKeeping","mapResult","keyPrefix","mapFunction","mapContext","mapSingleChildIntoContext","childKey","mappedChild","mapIntoWithKeyPrefixInternal","escapedPrefix","forEachSingleChildDummy","forEachFunc","ComponentDummy","isPureReactComponent","injectedMixins","ReactClassInterface","updateComponent","RESERVED_SPEC_KEYS","mixSpecIntoComponent","createMergedResultFunction","mixStaticSpecIntoComponent","autobind","validateMethodOverride","isAlreadyDefined","specPolicy","ReactClassMixin","autoBindPairs","__reactAutoBindPairs","isReactClassMethod","createChainedFunction","mergeIntoWithNoDuplicateKeys","one","two","bindAutoBindMethod","newState","ReactClassComponent","autoBindKey","bindAutoBindMethods","injectMixin","ReactPropTypeLocationNames","createPrimitiveTypeChecker","createChainableTypeChecker","typeChecker","PropTypeError","getPropType","expectedClass","locationName","expectedClassName","getClassName","isNode","objectOf","expectedValues","arrayOfTypeCheckers","checker","shapeTypes","secret","expectedType","getPreciseType","_ref$selectLocationSt","selectLocationState","defaultSelectLocationState","_ref$adjustUrlOnRepla","adjustUrlOnReplay","initialLocation","isTimeTraveling","unsubscribeFromStore","unsubscribeFromHistory","getLocationInStore","useInitialIfEmpty","handleStoreChange","locationInStore","handleLocationChange","lastPublishedLocation","unsubscribed","routing","_action$payload","ReactDefaultInjection","getHostComponentFromComposite","ReactDOM","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","__REACT_DEVTOOLS_GLOBAL_HOOK__","Mount","Reconciler","ARIADOMPropertyConfig","BeforeInputEventPlugin","ChangeEventPlugin","DefaultEventPluginOrder","EnterLeaveEventPlugin","HTMLDOMPropertyConfig","ReactComponentBrowserEnvironment","ReactDOMComponent","ReactDOMEmptyComponent","ReactDOMTreeTraversal","ReactDOMTextComponent","ReactDefaultBatchingStrategy","ReactInjection","SVGDOMPropertyConfig","SelectEventPlugin","SimpleEventPlugin","alreadyInjected","EventEmitter","HostComponent","EmptyComponent","Updates","FallbackCompositionState","SyntheticCompositionEvent","SyntheticInputEvent","END_KEYCODES","canUseCompositionEvent","canUseTextInputEvent","isPresto","useFallbackCompositionData","SPACEBAR_CHAR","beforeInput","bubbled","captured","compositionEnd","compositionStart","compositionUpdate","hasSpaceKeypress","isFallbackCompositionEnd","getDataFromCustomEvent","currentComposition","extractCompositionEvent","fallbackData","getCompositionEventType","isFallbackCompositionStart","customData","extractBeforeInputEvent","chars","getNativeBeforeInputChars","isKeypressCommand","getFallbackBeforeInputChars","getTextContentAccessor","_root","_startText","_fallbackText","startLength","endValue","endLength","minEnd","sliceTail","isTextInputElement","activeElementInst","activeElementValue","activeElementValueProp","doesChangeEventBubble","manualDispatchChangeEvent","runEventInBatch","stopWatchingForChangeEventIE8","getTargetInstForChangeEvent","handleEventsForChangeEventIE8","startWatchingForChangeEventIE8","isInputEventSupported","newValueProp","stopWatchingForValueChange","handlePropertyChange","getTargetInstForInputEvent","handleEventsForInputEventIE","startWatchingForValueChange","getTargetInstForInputEventIE","getTargetInstForClickEvent","getTargetInstFunc","handleEventFunc","targetNode","shouldUseChangeEvent","ReactOwner","addComponentAsRefTo","prevRef","prevOwner","nextRef","nextOwner","removeComponentAsRefFrom","detachRef","isValidOwner","ownerPublicInstance","mouseEnter","mouseLeave","acceptCharset","accessKey","allowFullScreen","allowTransparency","async","autoPlay","cellPadding","cellSpacing","charSet","challenge","classID","cols","colSpan","contextMenu","controls","crossOrigin","download","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hrefLang","htmlFor","httpEquiv","inputMode","integrity","keyParams","keyType","manifest","marginHeight","marginWidth","media","mediaGroup","muted","nonce","noValidate","optimum","playsInline","poster","preload","profile","radioGroup","referrerPolicy","reversed","rows","rowSpan","sandbox","scoped","seamless","spellCheck","srcDoc","srcLang","srcSet","useMap","wmode","about","datatype","inlist","resource","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","security","unselectable","dangerouslyProcessChildrenUpdates","createNodesFromMarkup","oldChild","newChild","createArrayFromMixed","getMarkupWrap","dummyNode","nodeNamePattern","handleScript","nodeNameMatch","getNodeName","wrapDepth","scripts","nodes","hasArrayNature","callee","shouldWrap","selectWrap","tableWrap","trWrap","svgWrap","markupWrap","ReactDOMIDOperations","AutoFocusUtils","CSSPropertyOperations","ReactDOMInput","ReactDOMOption","ReactDOMTextarea","ReactMultiChild","ReactServerRenderingTransaction","getNode","CONTENT_TYPES","dangerouslySetInnerHTML","suppressContentEditableWarning","assertValidProps","voidElementTags","_tag","enqueuePutListener","containerInfo","_node","inputPostMount","postMountWrapper","textareaPostMount","optionPostMount","mediaEvents","trapBubbledEventsLocal","postUpdateSelectWrapper","omittedCloseTags","newlineEatingTags","VALID_TAG_REGEX","validatedTagCache","isCustomComponent","globalIdCounter","validateDangerousTag","_namespaceURI","_previousStyle","_previousStyleCopy","Mixin","_idCounter","parentTag","mountImage","createElementNS","_updateDOMProperties","lazyTree","_createInitialChildren","tagOpen","_createOpenTagMarkupAndPutListeners","tagContent","_createContentMarkup","focusDOMComponent","propKey","createMarkupForStyles","renderToStaticMarkup","__html","contentToUse","childrenToUse","mountChildren","mountImages","lastProps","_updateDOMChildren","updateWrapper","styleName","styleUpdates","lastStyle","nextProp","lastProp","setValueForStyles","lastContent","nextContent","lastHtml","nextHtml","lastChildren","nextChildren","lastHasContentOrHtml","nextHasContentOrHtml","updateChildren","updateTextContent","updateMarkup","unmountChildren","dangerousStyleValue","hyphenateStyleName","memoizeStringOnly","processStyleName","hasShorthandPropertyBug","styleFloatAccessor","tempStyle","cssFloat","serialized","styleValue","expansion","individualStyleName","camelize","_hyphenPattern","hyphenate","_uppercasePattern","runEventQueueInBatch","makePrefixMap","styleProp","vendorPrefixes","animationend","animationiteration","animationstart","transitionend","prefixedEventNames","prefixMap","forceUpdateIfMounted","defaultChecked","initialChecked","rootNode","queryRoot","otherNode","otherInstance","didWarnInvalidOptionChildren","flattenChildren","selectValue","selectParent","hostProps","ReactChildReconciler","processQueue","updateQueue","_reconcilerInstantiateChildren","nestedChildren","instantiateChildren","_reconcilerUpdateChildren","prevChildren","nextNestedChildrenElements","removedNodes","nextMarkup","_updateChildren","nextMountIndex","lastPlacedNode","prevChild","_mountChildAtIndex","_unmountChild","renderedChildren","makeMove","createChild","makeInsertMarkup","makeRemove","instantiateChild","childInstances","selfDebugID","keyUnique","nestedChildNodes","nextChildInstance","nextChildMountImage","renderedChild","CompositeTypes","StatelessComponent","warnIfInvalidElement","nextMountID","_compositeType","_calledComponentWillUnmount","renderedElement","publicProps","publicContext","_processContext","getUpdateQueue","doConstruct","shouldConstruct","_constructComponent","isPureComponent","unstable_handleError","performInitialMountWithErrorHandling","performInitialMount","_constructComponentWithoutOwner","_processPendingState","_renderValidatedComponent","_maskContext","maskedContext","currentContext","childContext","_checkContextTypes","typeSpecs","prevContext","prevParentElement","nextParentElement","prevUnmaskedContext","nextUnmaskedContext","willReceive","_performComponentUpdate","unmaskedContext","hasComponentDidUpdate","_updateRenderedComponent","prevComponentInstance","prevRenderedElement","nextRenderedElement","oldHostNode","_replaceNodeWithMarkup","prevInstance","_renderValidatedComponentWithoutOwnerOrContext","publicComponentInstance","nextDebugID","flattenSingleChildIntoContext","ReactServerUpdateQueue","noopCallbackQueue","domID","createComment","instA","instB","depthA","tempA","depthB","tempB","pathFrom","pathTo","_stringText","_closingComment","_commentNodes","openingValue","escapedText","nextText","nextStringText","commentNodes","hostNode","RESET_BATCHED_UPDATES","ReactDefaultBatchingStrategyTransaction","alreadyBatchingUpdates","getUnboundedScrollPosition","findParent","TopLevelCallbackBookKeeping","ancestors","handleTopLevelImpl","ancestor","_handleTopLevel","scrollValueMonitor","_enabled","scrollable","Window","currentlyEnabled","previouslyEnabled","reactMountReady","getNodeForCharacterOffset","useIEOffsets","selectedRange","selectedLength","fromStart","duplicate","setEndPoint","startOffset","currentRange","startContainer","endContainer","rangeLength","tempRange","cloneRange","selectNodeContents","endOffset","detectionRange","isBackward","startMarker","endMarker","getLeafNode","getSiblingNode","nodeStart","nodeEnd","isTextNode","outerNode","innerNode","Node","NS","ATTRS","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","by","calcMode","capHeight","clip","clipRule","clipPathUnits","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cy","decelerate","descent","diffuseConstant","dominantBaseline","dur","edgeMode","elevation","enableBackground","exponent","externalResourcesRequired","fillRule","filterRes","filterUnits","floodColor","fontSizeAdjust","fontStretch","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","ideographic","imageRendering","in2","intercept","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","markerEnd","markerMid","markerStart","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","mathematical","numOctaves","operator","orient","orientation","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","rotate","rx","ry","scale","shapeRendering","slope","spacing","specularConstant","specularExponent","spreadMethod","stdDeviation","stemh","stemv","stitchTiles","stopColor","strikethroughPosition","strikethroughThickness","stroke","strokeLinecap","strokeLinejoin","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","widths","wordSpacing","writingMode","xHeight","x1","x2","xChannelSelector","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlns","xmlnsXlink","xmlLang","xmlSpace","y1","y2","yChannelSelector","z","zoomAndPan","skipSelectionChangeEvent","lastSelection","mouseDown","hasListener","constructSelectEvent","currentSelection","boundingTop","boundingLeft","syntheticEvent","SyntheticAnimationEvent","SyntheticClipboardEvent","SyntheticFocusEvent","SyntheticKeyboardEvent","SyntheticDragEvent","SyntheticTouchEvent","SyntheticTransitionEvent","SyntheticWheelEvent","getEventCharCode","topLevelEventsToDispatchConfig","capitalizedEvent","onEvent","topEvent","onClickListeners","isInteractive","EventConstructor","elapsedTime","pseudoElement","ClipboardEventInterface","KeyboardEventInterface","normalizeKey","translateToKey","12","112","113","114","115","116","117","118","119","120","121","122","123","144","224","TouchEventInterface","targetTouches","changedTouches","deltaX","deltaY","deltaZ","deltaMode","topLevelWrapper","useFiber","adler32","TAG_END","COMMENT_START","addChecksumToMarkup","existingChecksum","componentOrElement","originalModule","_createTransitionManager3","_RouterContext2","_RouterUtils","onError","matchContext","handleError","createTransitionManager","_unlisten","_state","prevRoutes","nextRoutes","parentIsLeaving","isLeaving","routeParamsChanged","paramsChanged","enterHooks","createTransitionHook","getEnterHooks","runTransitionHooks","changeHooks","getChangeHooks","onLeave","PendingHooks","asyncArity","pendingHooks","isSync","currentPathname","pathIsActive","routeIsActive","activeQuery","deepEqual","queryIsActive","_PromiseUtils","getComponent","getComponents","componentReturn","getComponentsForRoute","matchRoutes","_routerWarning","createParams","assignParams","matchRouteDeep","_ret2","getIndexRoute","indexRoute","indexRoutesReturn","pathless","childRoute","_match$routes","onChildRoutes","getChildRoutes","childRoutesReturn","_Link2","WithRouter","_hoistNonReactStatics2","_Redirect2","_createTransitionManager2","renderProps","strictUriEncode","objectAssign","encode","opts","extract","arrayFormat","parserForArrayFormat","keysSorter","encoderForArrayFormat","val2","_createHistory2","createStateStorage","canGo","_options","storage","withContext","renderRouterContext","withComponent","renderRouteComponent","makeCreateElement","baseCreateElement","_createBrowserHistory2","_createRouterHistory2","BrowserProtocol","RefreshProtocol","useRefresh","forceRefresh","Protocol","listenerCount","stopListener","unlisten","_BrowserProtocol","_createHashHistory2","HashProtocol","addLeadingSlash","HashPathCoders","hashbang","encodePath","decodePath","noslash","slash","queryKey","hashType","pathCoder","getHashPath","replaceHashPath","prevLocation","handleHashChange","encodedPath","updateHash","pushHashPath","_reactDom2","_FocusTrap2","_HotKeyMapMixin2","_isBoolean2","_isArray2","_isObject2","_forEach2","getSequencesFromMap","hotKeyName","sequences","HotKeys","hotKeyParent","Mousetrap","__mousetrap__","updateHotKeys","childHandledSequence","_props$handlers","_prevProps$handlers","prevHandlers","sequenceHandlers","mousetrap","hotKey","handlerSequences","__isFocused__","__lastChildSequence__","_props3","isMasked","reIsHostCtor","coreJsData","maskSrcKey","IE_PROTO","overRest","setToString","baseSetToString","shortOut","nativeNow","lastCalled","stamp","baseIsArguments","typedArrayTags","baseIsEqualDeep","Stack","equalArrays","equalByTag","equalObjects","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","stackClear","stackDelete","stackGet","stackHas","stackSet","assocIndexOf","LARGE_ARRAY_SIZE","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","getMapData","setCacheAdd","setCacheHas","mapToArray","setToArray","symbolProto","symbolValueOf","convert","getAllKeys","objProps","objLength","skipCtor","objCtor","othCtor","baseGetAllKeys","resIndex","arrayEach","baseEach","castFunction","baseForOwn","createBaseEach","baseFor","createBaseFor","fromRight","iterable","eachFunc","_REVERSE_MAP","_MAP","_KEYCODE_MAP","_SHIFT_MAP","_SPECIAL_ALIASES","_bindMultiple","unbind","trigger","_directMap","stopCallback","_belongsTo","initialEventTarget","handleKey","_handleKey","addKeycodes","documentMousetrap","_addEvent","_characterFromEvent","_isModifier","_pickBestAction","modifiers","_getReverseMap","_getKeyInfo","combination","_keysFromString","targetElement","_resetTimer","_sequenceLevels","_ignoreNextKeyup","_ignoreNextKeypress","_nextExpectedAction","_resetSequences","doNotReset","activeSequences","_getMatches","sequenceName","modifiers1","modifiers2","deleteCombo","combo","deleteSequence","_fireCallback","_preventDefault","_stopPropagation","_handleKeyEvent","_eventModifiers","_bindSequence","_increaseSequence","nextAction","_callbackAndReset","wrappedCallback","_bindSingle","maxLevel","processedSequenceCallback","ignoreThisKeypress","combinations","emptyFunctionWithReset","resetWarningCache","shim","getShim","exact","_interopDefault","ex","React__default","reducePropsToState","handleStateChangeOnClient","mapStateOnServer","mountedInstances","emitChange","SideEffect","rewind","recordedState","compareContext","bHasOwnProperty","valueA","valueB","support","Blob","viewClasses","isArrayBufferView","normalizeName","normalizeValue","iteratorFor","Headers","append","consumed","bodyUsed","fileReaderReady","onerror","readBlobAsArrayBuffer","blob","promise","readAsArrayBuffer","bufferClone","_initBody","_bodyInit","_bodyText","isPrototypeOf","_bodyBlob","FormData","_bodyFormData","URLSearchParams","_bodyArrayBuffer","rejected","readBlobAsText","readArrayBufferAsText","formData","decode","oldValue","Request","credentials","upcased","normalizeMethod","referrer","parseHeaders","rawHeaders","Response","bodyInit","statusText","response","redirectStatuses","redirect","DOMException","request","aborted","xhr","XMLHttpRequest","abortXhr","abort","getAllResponseHeaders","responseURL","responseText","ontimeout","onabort","withCredentials","responseType","setRequestHeader","onreadystatechange","readyState","send","loader","dumper","deprecated","FAILSAFE_SCHEMA","JSON_SCHEMA","CORE_SCHEMA","DEFAULT_SAFE_SCHEMA","DEFAULT_FULL_SCHEMA","load","loadAll","safeLoad","safeLoadAll","dump","safeDump","MINIMAL_SCHEMA","SAFE_SCHEMA","DEFAULT_SCHEMA","addConstructor","Mark","_hasOwnProperty","PATTERN_NON_PRINTABLE","PATTERN_NON_ASCII_LINE_BREAKS","PATTERN_FLOW_INDICATORS","PATTERN_TAG_HANDLE","PATTERN_TAG_URI","is_EOL","is_WHITE_SPACE","is_WS_OR_EOL","is_FLOW_INDICATOR","fromHexCode","lc","simpleEscapeSequence","charFromCodepoint","simpleEscapeCheck","simpleEscapeMap","State","filename","onWarning","legacy","implicitTypes","typeMap","lineIndent","documents","generateError","throwError","throwWarning","directiveHandlers","YAML","major","minor","checkLineBreaks","TAG","tagMap","captureSegment","checkJson","_position","_length","_character","_result","mergeMappings","destination","overridableKeys","quantity","storeMappingPair","keyTag","keyNode","valueNode","startLine","startPos","readLineBreak","skipSeparationSpace","allowComments","checkIndent","lineBreaks","testDocumentSeparator","writeFoldedLines","readBlockSequence","nodeIndent","_line","_anchor","detected","anchorMap","composeNode","readTagProperty","tagHandle","isVerbatim","isNamed","readAnchorProperty","parentIndent","nodeContext","allowToSeek","allowCompact","allowBlockStyles","allowBlockScalars","allowBlockCollections","typeIndex","typeQuantity","flowIndent","blockIndent","indentStatus","atNewLine","hasContent","following","_pos","atExplicitKey","readBlockMapping","isPair","isExplicitPair","isMapping","readNext","readFlowCollection","captureStart","folding","chomping","didReadContent","detectedIndent","textIndent","emptyLines","atMoreIndented","readBlockScalar","captureEnd","readSingleQuotedScalar","hexLength","hexResult","readDoubleQuotedScalar","readAlias","withinFlowCollection","hasPendingContent","_lineStart","_lineIndent","_kind","readPlainScalar","readDocument","directiveName","directiveArgs","documentStart","hasDirectives","loadDocuments","getSnippet","snippet","canonical","uppercase","camelcase","isOctCode","isDecCode","hasDigits","digits","binary","octal","decimal","hexadecimal","YAML_FLOAT_PATTERN","SCIENTIFIC_WITHOUT_DOT","POSITIVE_INFINITY","YAML_DATE_REGEXP","YAML_TIMESTAMP_REGEXP","fraction","NodeBuffer","_require","__","BASE64_MAP","bitlen","tailbits","bits","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","len2","encodeChunk","lookup","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","LN2","_toString","pairKey","pairHasKey","regexp","multiline","ignoreCase","esprima","ast","expression","modules","installedModules","__webpack_require__","moduleId","comment_handler_1","jsx_parser_1","parser_1","tokenizer_1","delegate","commentHandler","proxyDelegate","metadata","visit","parserDelegate","collectComment","comment","attachComment","CommentHandler","isModule","sourceType","jsx","JSXParser","Parser","parseModule","parseScript","comments","tolerant","errors","errorHandler","parsingOptions","tokenizer","Tokenizer","getNextToken","tolerate","syntax_1","Syntax","insertInnerComments","BlockStatement","innerComments","findTrailingComments","trailingComments","entry_1","firstComment","findLeadingComments","leadingComments","visitNode","Program","visitComment","loc","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BinaryExpression","BreakStatement","CallExpression","CatchClause","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForOfStatement","ForInStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","Property","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","__extends","extendStatics","character_1","JSXNode","jsx_syntax_1","token_1","xhtml_entities_1","getQualifiedElementName","elementName","qualifiedName","JSXSyntax","JSXIdentifier","JSXNamespacedName","ns","JSXMemberExpression","expr","TokenName","_super","parsePrimaryExpression","parseJSXRoot","startJSX","scanner","finishJSX","nextToken","reenterJSX","expectJSX","createJSXNode","collectComments","createJSXChildNode","scanXHTMLEntity","valid","terminated","numeric","hex","eof","Character","isDecimalDigit","isHexDigit","XHTMLEntities","lexJSX","cp","n1","n2","isIdentifierStart","isIdentifierPart","lex","nextJSXToken","lastMarker","convertToken","nextJSXText","isLineTerminator","peekJSXToken","scanComments","restoreState","throwUnexpectedToken","matchJSX","parseJSXIdentifier","finalize","parseJSXElementName","name_1","parseJSXAttributeName","identifier","name_2","parseJSXStringLiteralAttribute","raw","getTokenRaw","parseJSXExpressionAttribute","tolerateError","parseAssignmentExpression","JSXExpressionContainer","parseJSXAttributeValue","parseJSXElement","parseJSXNameValueAttribute","JSXAttribute","parseJSXSpreadAttribute","JSXSpreadAttribute","parseJSXAttributes","attribute","parseJSXOpeningElement","selfClosing","JSXOpeningElement","parseJSXBoundaryElement","name_3","JSXClosingElement","parseJSXEmptyExpression","JSXEmptyExpression","parseJSXExpressionContainer","parseJSXChildren","JSXText","parseComplexJSXElement","opening","JSXElement","open_1","isStartOfExpression","Regex","NonAsciiIdentifierStart","NonAsciiIdentifierPart","fromCodePoint","isWhiteSpace","isOctalDigit","openingElement","closingElement","generator","AsyncArrowFunctionExpression","AsyncFunctionDeclaration","AsyncFunctionExpression","logical","ComputedMemberExpression","consequent","alternate","Directive","directive","declaration","specifiers","exported","imported","static","Module","RegexLiteral","Script","expressions","StaticMemberExpression","discriminant","cases","quasi","quasis","finalizer","declarations","assert_1","error_handler_1","messages_1","scanner_1","ErrorHandler","Scanner","trackComment","operatorPrecedence","lookahead","hasLineTerminator","await","allowIn","allowStrictDirective","allowYield","firstCoverInitializedNameError","isAssignmentTarget","isBindingElement","inFunctionBody","inIteration","inSwitch","labelSet","messageFormat","whole","assert","createError","unexpectedTokenError","Messages","UnexpectedToken","UnexpectedEOS","UnexpectedIdentifier","UnexpectedNumber","UnexpectedString","UnexpectedTemplate","isFutureReservedWord","UnexpectedReserved","isStrictModeReservedWord","StrictReservedWord","lastMarkerLineStart","tolerateUnexpectedToken","multiLine","nextRegexToken","scanRegExp","createNode","lastLineStart","expect","expectCommaSeparator","expectKeyword","matchKeyword","matchContextualKeyword","matchAssign","isolateCoverGrammar","parseFunction","previousIsBindingElement","previousIsAssignmentTarget","previousFirstCoverInitializedNameError","inheritCoverGrammar","consumeSemicolon","matchAsyncFunction","parseFunctionExpression","StrictOctalLiteral","parseTemplateLiteral","parseGroupExpression","parseArrayInitializer","parseObjectInitializer","parseIdentifierName","parseClassExpression","parseSpreadElement","parsePropertyMethod","previousStrict","previousAllowStrictDirective","simple","parseFunctionSourceElements","firstRestricted","stricted","parsePropertyMethodFunction","previousAllowYield","parseFormalParameters","parsePropertyMethodAsyncFunction","previousAwait","parseObjectPropertyKey","isPropertyKey","parseObjectProperty","hasProto","isAsync","lookaheadPropertyKey","qualifiedPropertyName","parseGetterMethod","parseSetterMethod","parseGeneratorMethod","DuplicateProtoProperty","parseTemplateHead","cooked","parseTemplateElement","parseExpression","reinterpretExpressionAsPattern","startToken","parseRestElement","arrow","parseArguments","isIdentifierName","parseNewExpression","parseLeftHandSideExpression","parseAsyncArgument","parseAsyncArguments","parseLeftHandSideExpressionAllowCall","maybeAsync","previousAllowIn","asyncArrow","parseSuper","parseUpdateExpression","parseUnaryExpression","isRestrictedWord","StrictLHSPrefix","InvalidLHSInAssignment","StrictLHSPostfix","parseAwaitExpression","StrictDelete","parseExponentiationExpression","binaryPrecedence","parseBinaryExpression","prec","precedences","parseConditionalExpression","checkPatternParam","validateParam","reinterpretAsCoverFormalsList","paramSet","StrictParamDupe","parseYieldExpression","StrictLHSAssignment","parseStatementListItem","statement","IllegalExportDeclaration","parseExportDeclaration","IllegalImportDeclaration","parseImportDeclaration","parseLexicalDeclaration","inFor","parseFunctionDeclaration","parseClassDeclaration","isLexicalDeclaration","parseStatement","parseBlock","parseLexicalBinding","parsePattern","StrictVarName","DeclarationMissingInitializer","parseBindingList","parseBindingRestElement","parseArrayPattern","parsePatternWithDefault","parsePropertyPattern","keyToken","parseVariableIdentifier","parseObjectPattern","LetInLexicalBinding","parseVariableDeclaration","parseVariableDeclarationList","parseVariableStatement","parseEmptyStatement","parseExpressionStatement","parseIfClause","StrictFunction","parseIfStatement","parseDoWhileStatement","previousInIteration","parseWhileStatement","parseForStatement","forIn","decl","ForInOfLoopInitializer","initStartToken","InvalidLHSInForIn","InvalidLHSInForLoop","initSeq","parseContinueStatement","UnknownLabel","IllegalContinue","parseBreakStatement","IllegalBreak","parseReturnStatement","IllegalReturn","parseWithStatement","StrictModeWith","parseSwitchCase","parseSwitchStatement","previousInSwitch","defaultFound","clause","MultipleDefaultsInSwitch","parseLabelledStatement","Redeclaration","GeneratorInLegacyContext","parseThrowStatement","NewlineAfterThrow","parseCatchClause","paramMap","DuplicateBinding","StrictCatchVariable","parseFinallyClause","parseTryStatement","NoCatchOrFinally","parseDebuggerStatement","parseDirectivePrologues","previousLabelSet","previousInFunctionBody","StrictParamName","DefaultRestParameter","ParameterAfterRestParameter","parseFormalParameter","identifierIsOptional","isGenerator","StrictFunctionName","previousAllowAwait","formalParameters","parseDirective","IllegalLanguageModeDirective","BadGetterArity","BadSetterArity","BadSetterRestParameter","parseClassElement","hasConstructor","punctuator","ConstructorIsAsync","StaticPrototype","ConstructorSpecialMethod","DuplicateConstructor","parseClassElementList","parseClassBody","elementList","classBody","parseModuleSpecifier","InvalidModuleSpecifier","parseImportSpecifier","parseNamedImports","parseImportDefaultSpecifier","parseImportNamespaceSpecifier","NoAsAfterImportNamespace","MissingFromClause","parseExportSpecifier","exportDeclaration","isExportFromIdentifier","recordError","constructError","description","InvalidEscapedReservedWord","InvalidHexEscapeSequence","InvalidRegExp","TemplateOctalLiteral","UnexpectedTokenIllegal","UnterminatedRegExp","hexValue","octalValue","curlyStack","skipSingleLineComment","skipMultiLineComment","isKeyword","codePointAt","scanHexEscape","scanUnicodeCodePointEscape","getIdentifier","getComplexIdentifier","octalToDecimal","scanIdentifier","restore","scanPunctuator","scanHexLiteral","scanBinaryLiteral","scanOctalLiteral","isImplicitOctalLiteral","scanNumericLiteral","scanStringLiteral","unescaped_1","unescaped","octToDec","scanTemplate","rawOffset","unescaped_2","testRegExp","$0","$1","$2","exception","scanRegExpBody","classMarker","scanRegExpFlags","char","quot","amp","apos","nbsp","iexcl","cent","pound","curren","yen","brvbar","sect","uml","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34","iquest","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","szlig","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","divide","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","OElig","oelig","Scaron","scaron","Yuml","fnof","circ","tilde","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","alpha","beta","gamma","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigmaf","sigma","tau","upsilon","phi","chi","psi","omega","thetasym","upsih","piv","ensp","emsp","thinsp","zwnj","zwj","lrm","rlm","ndash","mdash","lsquo","rsquo","sbquo","ldquo","rdquo","bdquo","dagger","Dagger","bull","hellip","permil","prime","Prime","lsaquo","rsaquo","oline","frasl","euro","weierp","real","trade","alefsym","larr","uarr","rarr","darr","harr","crarr","lArr","uArr","rArr","dArr","hArr","forall","exist","nabla","isin","notin","ni","prod","minus","lowast","radic","infin","ang","and","or","cap","cup","int","there4","sim","cong","asymp","ne","equiv","le","ge","nsub","sube","supe","oplus","otimes","perp","sdot","lceil","rceil","lfloor","rfloor","loz","spades","clubs","hearts","diams","rang","Reader","curly","paren","beforeFunctionExpression","isRegexStart","trackRange","trackLoc","ESCAPE_SEQUENCES","DEPRECATED_BOOLEANS_SYNTAX","encodeHex","noArrayIndent","skipInvalid","flowLevel","styleMap","compileStyleMap","sortKeys","lineWidth","noRefs","noCompatMode","condenseFlow","explicitTypes","duplicates","usedDuplicates","ind","generateNextLine","isWhitespace","isPrintable","isPlainSafe","needIndentIndicator","chooseScalarStyle","singleLineOnly","indentPerLevel","testAmbiguousType","hasLineBreak","hasFoldableLine","shouldTrackWidth","previousLineBreak","plain","writeScalar","iskey","testImplicitResolving","blockHeader","dropEndingNewline","moreIndented","lineRe","nextLF","foldLine","prevMoreIndented","foldString","nextChar","escapeSeq","escapeString","indentIndicator","breakRe","curr","detectType","typeList","writeNode","duplicateIndex","objectOrArray","objectKey","objectValue","explicitPair","pairBuffer","objectKeyList","writeBlockMapping","writeFlowMapping","arrayLevel","writeBlockSequence","writeFlowSequence","getDuplicateReferences","duplicatesIndexes","inspectNode","ReactClassStaticInterface","IsMountedPreMixin","__isMounted","IsMountedPostMixin","NotificationItem","_style","Helpers","whichTransitionEvent","transitions","OTransition","MozTransition","WebkitTransition","transitionKey","_noAnimation","_styles","_notificationTimer","_height","_removeCount","_getCssPropertyByPosition","_defaultAction","_removeNotification","_dismiss","_showNotification","_onTransitionEnd","transitionEvent","Timer","_handleMouseEnter","pause","_handleMouseLeave","resume","_handleNotificationClick","_allowHTML","notificationStyle","cssByPos","actionButton","isVisible","isHidden","onMouseEnter","onMouseLeave","timerId","defaultColors","rgb","STYLES","WebkitBoxSizing","MozBoxSizing","WebkitTransform","willChange","WebkitBoxShadow","MozBoxShadow","boxShadow","Title","MessageWrapper","Dismiss","textAlign","Action","ActionWrapper","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeysIn","initCloneArray","initCloneByTag","initCloneObject","isMap","isSet","keysIn","cloneableTags","isDeep","isFlat","isFull","isFunc","subValue","nativeKeysIn","isProto","cloneArrayBuffer","cloneDataView","cloneRegExp","cloneSymbol","cloneTypedArray","dataView","reFlags","typedArray","objectCreate","baseIsMap","nodeIsMap","baseIsSet","nodeIsSet","validator","messageKey","_transitionClasses","_events","_Transition","transitionClasses","parseDuration","mult","SlideDownTransition","setContainerHeight","getHeight","clearContainerHeight","handleEntered","handleEntering","handleTransitionEnd","innerProps","_querySelectorAll","rHyphen","chr","_hyphenate","rUpper","opener","rnumnonpx","rposition","runStyle","runtimeStyle","rsLeft","pixelLeft","removeProperty","supportedTransforms","classNamesShape","timeoutsShape","_reactIs","_createChainableTypeChecker2","isValidElementType","for","A","AsyncMode","ConcurrentMode","ContextConsumer","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","typeOf","_Header","_Footer","_Month","_Year","_Decade","_Century","_SlideTransitionGroup","VIEW_UNIT","VIEW_OPTIONS","VIEW","ARROWS_TO_DIRECTION","ArrowDown","ArrowUp","ArrowRight","ArrowLeft","OPPOSITE_DIRECTION","LEFT","RIGHT","MULTIPLIER","_value","navigatePrevIcon","navigateNextIcon","views","onViewChange","dayComponent","headerFormat","footerFormat","dayFormat","monthFormat","yearFormat","decadeFormat","centuryFormat","Calendar","handleFocusWillChange","viewId","labelId","willHandle","selectedIndex","newDate","isMonth","isUpOrDown","rangeUnit","addUnit","slideDirection","lastView","lastDate","maybeSetCurrentDate","View","todaysDate","todayNotInRange","viewProps","getHeaderLabel","upDisabled","prevDisabled","nextDate","nextDisabled","handleViewChange","onMoveLeft","handleMoveBack","onMoveRight","handleMoveForward","handleFooterClick","navigate","slideDir","inRangeDate","_this$state4","multi","_this$state5","isValidView","_this6$props","firstView","callFocusEventHandler","lastFocused","_ref$isDisabled","_handleFocus","protoSpec","baseGCContext","Header","_this$props$navigateP","_this$props$navigateN","Footer","_CalendarView","MonthView","renderRow","row","rowIdx","Day","colIdx","formattedDate","renderHeaders","dateA","dateB","MILI","newMonth","monthMath","createComparer","createAccessor","firstDay","date1","date2","YearView","DecadeView","_date","getDecadeYears","CenturyView","getCenturyDecades","_transitionStyle","_TransitionGroup","DirectionPropType","transitionStyle","SlideTransition","SlideTransitionGroup","handleEnter","handleExited","_ChildMapping","TransitionGroup","firstRender","appeared","prevChildMapping","getInitialChildMapping","getNextChildMapping","currentChildMapping","getChildMapping","childFactory","mergeChildMappings","getProp","nextChildMapping","hasPrev","mapFn","mapper","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","matchesCache","nativeMatch","matchesSelector","mozMatchesSelector","ie8MatchesSelector","_Input","DateTimePickerInput","_needsFlush","lastValueFromProps","Input","_ref$type","_ref$component","getDates","_getBounds","_start","_end","getBounds","startDay","TimeList","currentValue","closestDate","ListOptionGroup","scrollParent","listScrollTop","selectedTop","isWin","selectedHeight","listHeight","poff","_scrollParent","_scrollTop","_requestAnimationFrame","excludeStatic","ownerDoc","compatRaf","raf","req","getKey","rafKey","AddToListOption","DropdownListInput","handleAutofillDetect","onAnimationStart","localizers","setLocalizers","setNumberLocalizer","DOMFactories","ModalPortal","ariaAppHider","refCount","elementClass","Assign","SafeHTMLElement","HTMLElement","getParentElement","parentSelector","Modal","setAppElement","setElement","injectCSS","isOpen","portalClassName","bodyOpenClassName","appElement","onAfterOpen","onRequestClose","closeTimeoutMS","ariaHideApp","shouldCloseOnOverlayClick","contentLabel","renderPortal","newParent","show","portal","closesAt","beforeClose","closeWithTimeout","removePortal","defaultStyles","WebkitOverflowScrolling","scopeTab","CLASS_NAMES","shouldClose","afterOpen","setFocusAfterRender","closeTimer","focusAfterRender","focusContent","afterClose","returnFocus","teardownScopedFocus","setupScopedFocus","markForFocusLater","closeWithoutTimeout","contentHasFocus","requestClose","handleOverlayOnClick","ownerHandlesClose","handleContentOnClick","shouldBeClosed","additional","contentStyles","overlayStyles","overlayClassName","findTabbable","focusLaterElements","modalElement","needToFocus","toFocus","hide","validateElement","shouldHide","resetForTesting","modals","ElementClass","deps","payloads","trace","_acequire","parentId","dep","packagedModule","moduleName","normalizeModule","chunks","uri","packaged","exportAce","ace","compliantExecNpcg","compliantLastIndexIncrement","getNativeFlags","extended","r2","_xregexp","captureNames","Empty","defineGetter","defineSetter","lookupGetter","lookupSetter","supportsAccessors","prototypeOfArray","prototypeOfObject","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","lengthBefore","array_splice","deleteCount","removeCount","tailOldPos","tailNewPos","tailCount","lengthAfterRemove","createEmpty","freezeObject","boxedString","splitString","thisp","sought","toInteger","toLocaleString","doesDefinePropertyWork","definePropertyWorksOnObject","definePropertyWorksOnDom","definePropertyFallback","seal","preventExtensions","isSealed","isExtensible","hasDontEnumBug","dontEnums","dontEnumsLength","dontEnum","trimBeginRegexp","trimEndRegexp","getDocumentHead","hasCssClass","addCssClass","removeCssClass","toggleCssClass","setCssClass","hasCssString","sheets","createStyleSheet","owningElement","importCssString","importCssStylsheet","getInnerWidth","computedStyle","getInnerHeight","scrollbarWidth","noScrollbar","withScrollbar","getPageScrollTop","getPageScrollLeft","setInnerHtml","innerHtml","setInnerText","innerText","getInnerText","getParentWindow","superCtor","super_","implement","oop","Keys","MODIFIER_KEYS","KEY_MODS","FUNCTION_KEYS","96","97","98","99","100","101","102","103","104","105","PRINTABLE_KEYS","48","49","50","51","52","53","54","55","56","57","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","esc","mods","keyCodeToString","keyString","OS","LINUX","MAC","WINDOWS","getOS","isLinux","os","appName","isOldIE","isGecko","isMozilla","Controllers","controllers","product","isOldGecko","isOpera","isWebKit","isChrome","isAIR","isIPad","isTouchPad","isChromeOS","useragent","pressedKeys","ts","_wrapper","stopEvent","getButton","1","2","4","eventHandler","releaseCaptureHandler","onMouseUp","addTouchMoveListener","startx","starty","touchObj","wheelX","wheelY","addMouseWheelListener","DOM_DELTA_PIXEL","DOM_DELTA_LINE","DOM_DELTA_PAGE","addMultiMouseDownListener","callbackName","startX","startY","clicks","eventNames","onMousedown","isNewClick","_clicks","onDblclick","getModifierHash","normalizeCommandKeys","hashId","altGr","keyLocation","resetPressedKeys","getModifierString","addCommandKeyListener","lastKeyDownKeyCode","lastDefaultPrevented","postMessage","nextFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","stringReverse","stringRepeat","stringTrimLeft","stringTrimRight","arrayToMap","createMap","arrayRemove","escapeHTML","getMatchOffsets","regExp","deferredCall","fcn","deferred","schedule","isPending","delayedCall","defaultTimeout","BROKEN_SETDATA","USE_IE_MIME_TYPE","TextInput","inComposition","isSelectionEmpty","resetSelection","syncSelection","syncValue","inputHandler","setSelectionRange","resetValue","isAllSelected","inPropertyChange","onPropertyChange","syncProperty","sendText","keytable","onCompositionEnd","onCompositionUpdate","onCompositionStart","setInputHandler","getInputHandler","afterContextMenu","onTextInput","onInput","handleClipboardData","forceIEMime","doCopy","isCut","getCopyText","onCut","onCommandKey","closeTimeout","$readOnly","canUndo","$undoManager","markUndoGroup","clearSelection","setRange","syncComposition","onContextMenuClose","$keepTextAreaAtCursor","$moveTextAreaToCursor","setReadOnly","_emit","domEvent","moveToMouse","bringToFront","maxTop","textInput","DefaultHandlers","mouseHandler","$clickSelection","setDefaultHandler","onDoubleClick","onTripleClick","onQuadClick","onMouseWheel","onTouchMove","selectByLines","extendSelectionBy","selectByWords","calcRangeOrientation","inSelection","getDocumentPosition","mousedownEvent","selectionEmpty","getSelectionRange","$blockScrolling","moveToPosition","$focusTimout","inMultiSelectMode","captureMouse","startSelect","waitForClickSelection","screenToTextCoordinates","getShiftKey","selectToPosition","setCapture","comparePoint","orientedRange","setSelectionAnchor","scrollCursorIntoView","unitName","cmpStart","cmpEnd","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","unsetStyle","releaseCapture","focusWait","ax","ay","bx","sqrt","getBracketRange","getWordRange","isMultiLine","getLineRange","getAccelKey","$lastScrollTime","isScrollableBy","scrollBy","Tooltip","$element","$parentNode","$init","setText","setHtml","setPosition","setClassName","getWidth","GutterTooltip","windowWidth","windowHeight","GutterHandler","tooltipTimeout","mouseEvent","tooltipAnnotation","$gutterLayer","hideTooltip","_signal","moveTooltip","getRegion","selectTo","$tooltipFollowsMouse","isMousePressed","annotation","$annotations","screenRow","pixelToScreenCoordinates","$pos","documentToScreenRow","showTooltip","$gutter","MouseEvent","$inSelection","propagationStopped","DragdropHandler","blankImage","dragSelectionMarker","dragOperation","isInternal","autoScrollStartTime","cursorMovedTime","cursorPointOnCaretMoved","mouseTarget","onDragInterval","prevCursor","vMovement","hMovement","moveCursorToPosition","calcDistance","layerConfig","characterWidth","editorRect","nearestXOffset","nearestYOffset","scrollCursor","vScroll","hScroll","addDragMarker","toOrientedRange","getSelectionStyle","$cursorLayer","setBlinking","onMouseMove","clearDragMarker","fromOrientedRange","getReadOnly","cancelDrag","getTextRange","onDragEnd","setCursorStyle","canAccept","getDropEffect","onMouseMoveTimer","moveText","dropData","copyAllowed","copyModifierState","dragWait","getDragDelay","startDrag","dragWaitEnd","dragReadyEnd","cursorStyle","onMouseDrag","$dragEnabled","eventTarget","loadScript","isAbort","qualifyURL","_eventRegistry","_defaultHandlers","defaultHandler","newCallback","_disabled_","removeDefaultHandler","capturing","optionsProvider","optList","getOptions","optionNames","forwardTo","handlesSet","reportError","AppConfig","$defaultOptions","resetOptions","setDefaultValue","setDefaultValues","optionHash","net","workerPath","modePath","themePath","basePath","$moduleUrls","scriptOptions","scriptUrl","currentScript","_currentScript","m1","moduleUrl","sep","setModuleUrl","subst","$loading","loadModule","moduleType","afterLoad","DefaultGutterHandler","MouseHandler","focusEditor","getMouseEventTarget","onMouseEvent","scrollBarV","scrollBarH","gutterEl","$dragDelay","insideStart","mousemove","$scrollSpeed","mouseMoveHandler","releaseMouse","$mouseMoved","onCaptureEnd","onCaptureInterval","$onCaptureMouseMove","cancelContextMenu","dragDelay","dragEnabled","focusTimout","tooltipFollowsMouse","FoldHandler","getFoldAt","removeFold","expandFold","foldWidgets","onFoldWidgetClick","getParentFoldRangeData","firstRange","addFold","keyUtil","KeyBinding","$editor","$data","$handlers","kb","removeKeyboardHandler","$defaultHandler","addKeyboardHandler","handleKeyboard","getKeyboardHandler","getStatusText","$callKeyboardHandlers","toExecute","passEvent","startColumn","endColumn","compareRange","containsRange","intersects","isEnd","isStart","inside","insideEnd","compareStart","compareEnd","compareInside","clipRows","firstRow","lastRow","fromPoints","collapseRows","toScreenRange","screenPosStart","documentToScreenPosition","screenPosEnd","moveBy","comparePoints","getDocument","lead","selectionLead","createAnchor","selectionAnchor","$isEmpty","$keepDesiredColumnOnChange","$desiredColumn","getPosition","getSelectionAnchor","getSelectionLead","shiftSelection","columns","moveCursorTo","isBackwards","$moveSelection","moveTo","selectUp","moveCursorUp","selectDown","moveCursorDown","moveCursorRight","moveCursorLeft","selectLineStart","moveCursorLineStart","selectLineEnd","moveCursorLineEnd","selectFileEnd","moveCursorFileEnd","selectFileStart","moveCursorFileStart","selectWordRight","moveCursorWordRight","selectWordLeft","moveCursorWordLeft","selectWord","selectAWord","getAWordRange","excludeLastChar","rowEnd","rowStart","getFoldLine","selectLine","moveCursorBy","getTabSize","isTabStop","firstColumnPosition","screenToDocumentPosition","leadingSpace","getDisplayLine","$useEmacsStyleLineStart","getDocumentLastRowColumnPosition","textEnd","moveCursorLongWordRight","rightOfCursor","nonTokenRe","tokenRe","moveCursorLongWordLeft","getFoldStringAt","leftOfCursor","$shortWordEndIndex","whitespaceRe","moveCursorShortWordRight","moveCursorShortWordLeft","$selectLongWords","screenPos","docPos","lineWidgets","keepDesiredColumn","moveCursorToScreen","desiredColumn","getRangeOfMovements","rangeList","toSingleRange","MAX_TOKEN_COUNT","rules","states","regExps","matchMappings","ruleRegExps","matchTotal","defaultToken","flag","splitterRurles","adjustedregex","matchcount","groupCount","tokenArray","onMatch","$arrayTokens","$applyToken","digit","removeCapturingGroups","splitRegex","createSplitterRegexp","$setMaxTokenCount","inChClass","lastCapture","parenOpen","parenClose","square","matchAttempts","TextHighlightRules","$rules","addRules","getRules","embedRules","HighlightRules","escapeRules","$embeds","getEmbeds","popState","normalizeRules","processState","toInsert","stateName","includeName","noEscape","keywordMap","createKeywordMapper","splitChar","$keywordList","getKeywords","$keywords","Behaviour","$behaviours","addBehaviours","behaviours","getBehaviours","TokenIterator","initialRow","initialColumn","$session","$row","$rowTokens","getTokens","$tokenIndex","stepBackward","stepForward","getCurrentToken","getCurrentTokenRow","getCurrentTokenColumn","rowTokens","tokenIndex","getCurrentTokenPosition","SAFE_INSERT_IN_TOKENS","SAFE_INSERT_BEFORE_TOKENS","contextCache","initContext","multiSelect","autoInsertedBrackets","autoInsertedRow","autoInsertedLineEnd","maybeInsertedBrackets","maybeInsertedRow","maybeInsertedLineStart","maybeInsertedLineEnd","getWrapped","rowDiff","CstyleBehaviour","getCursorPosition","getWrapBehavioursEnabled","isSaneInsertion","recordAutoInsert","recordMaybeInsert","$findOpeningBracket","isAutoInsertedClosing","popAutoInsertedClosing","isMaybeInsertedClosing","clearMaybeInsertedClosing","openBracePos","findMatchingBracket","next_indent","$getIndent","getTabString","lineCommentStart","leftChar","rightChar","rightToken","stringBefore","stringAfter","wordRe","$mode","isWordBefore","isWordAfter","$matchTokenType","iterator2","bracket","packages","pack","addUnicodePackage","Ll","Lu","Lt","Lm","Lo","Mn","Mc","Me","N","Nd","Nl","No","P","Pd","Ps","Pe","Pf","Pc","Po","S","Sm","Sc","Sk","So","Z","Zs","Zl","Zp","C","Cc","Cf","Co","Cs","Cn","Mode","$defaultBehaviour","getTokenizer","$tokenizer","$highlightRules","$highlightRuleConfig","blockComment","toggleCommentLines","ignoreBlankLines","shouldRemove","minIndent","insertAtTabStop","regexpStart","getUseSoftTabs","uncomment","shouldInsertSpace","removeInLine","commentWithSpace","insertInLine","testRemove","lineCommentEnd","regexpEnd","minEmptyLength","toggleBlockComment","initialRange","startRange","endRange","getNextLineIndent","tab","checkOutdent","autoOutdent","createWorker","createModeDelegates","$modes","delegations","functionName","$delegator","transformAction","$behaviour","completionKeywords","ruleItr","aLength","$createKeywordList","getCompletions","$id","applyDelta","docLines","doNotValidate","Anchor","$onChange","$pointsInOrder","point1","point2","equalPointsInOrder","bColIsAfter","$clipPositionToDocument","$insertRight","point","moveIfEqual","deltaIsInsert","deltaRowShift","deltaColShift","deltaStart","deltaEnd","$getTransformedPoint","noClip","Document","textOrLines","$lines","insertMergedLines","getAllLines","getNewLineCharacter","$split","$detectNewLine","$autoNewLine","$newLineMode","setNewLineMode","newLineMode","getNewLineMode","isNewLine","getLinesForRange","insertLines","insertFullLines","removeLines","removeFullLines","insertNewLine","clippedPos","clonePos","$clipPosition","deleteFirstNewLine","deleteLastNewLine","deletedLines","removeNewLine","applyDeltas","deltas","revertDeltas","revertDelta","$splitAndapplyLargeDelta","MAX","indexToPosition","newlineLength","positionToIndex","BackgroundTokenizer","running","currentLine","$worker","workerStart","endLine","processedLines","$tokenizeRow","fireUpdateEvent","setTokenizer","setDocument","scheduleStart","$updateOnChange","SearchHighlight","clazz","setRegexp","MAX_RANGES","markerLayer","drawSingleLineMarker","FoldLine","foldData","folds","setFoldLine","shiftRow","sameRow","containsRow","lastEnd","isNewRow","getNextFoldTo","addRemoveChars","foldBefore","newFoldLine","foldLineNext","idxToPosition","lastFoldEndColumn","RangeList","pointIndex","excludeEdges","endIndex","addList","substractPoint","containsPoint","rangeAtPoint","clipped","removeAll","lineDif","Fold","subFolds","consumePoint","restorePoint","subFold","collapseChildren","addSubFold","afterStart","restoreRange","Folding","getFoldsInRange","foldLines","$foldData","foundFolds","getFoldsInRangeList","getAllFolds","lastFold","docRow","startFoldLine","getNextFoldLine","getFoldedRowCount","$addFoldLine","$clipRangeToDocument","startFold","endFold","removeFolds","$useWrapMode","$updateWrapData","$updateRowLengthCache","$modified","addFolds","$updating","cloneFolds","foldAll","expandFolds","unfold","expandInner","isRowFolded","startFoldRow","getRowFoldEnd","getRowFoldStart","getFoldDisplayLine","textLine","lastColumn","$cloneFoldData","fd","toggleFold","tryToUnfold","bracketPos","getCommentFoldRange","getFoldWidget","getFoldWidgetRange","$foldStyles","$foldStyle","setFoldStyle","$foldMode","$setFolding","foldMode","$updateFoldWidgets","$tokenizerUpdateFoldWidgets","updateFoldWidgets","tokenizerUpdateFoldWidgets","ignoreCurrent","fw","siblings","$toggleFoldWidget","toggleFoldWidget","toggleParent","BracketMatch","charBeforeCursor","$findClosingBracket","$brackets","typeRe","openBracket","valueIndex","closingBracket","valueLength","TextMode","EditSession","$breakpoints","$decorations","$frontMarkers","$backMarkers","$markerId","$undoSelect","$uid","onChangeFold","bgTokenizer","resetCaches","$resetRowCache","$docRowCache","$screenRowCache","$getRowCacheIndex","cacheArray","$wrapData","$rowLengthCache","removedFolds","$updateInternalDataOnChange","$fromUndo","$deltasDoc","$deltasFold","$informUndoManager","$deltas","setUndoManager","getUndoManager","undoManager","$syncInformUndoManager","execute","mergeUndoDeltas","$defaultUndoManager","setUseSoftTabs","$useSoftTabs","$indentWithTabs","setTabSize","$tabSize","$overwrite","setOverwrite","getOverwrite","addGutterDecoration","removeGutterDecoration","getBreakpoints","setBreakpoints","clearBreakpoints","setBreakpoint","clearBreakpoint","addDynamicMarker","markerId","$searchHighlight","highlightLines","getAnnotations","clearAnnotations","inToken","wordRange","setUseWorker","useWorker","getUseWorker","$useWorker","onReloadTokenizer","$modeId","$onChangeMode","$isPlaceholder","$stopWorker","$startWorker","attachToSession","wrapMethod","$wrapMethod","foldingRules","terminate","$scrollTop","getScrollTop","$scrollLeft","getScrollLeft","getScreenWidth","$computeWidth","getLineWidgetMaxWidth","screenWidth","lineWidgetsWidth","lineWidgetWidth","$wrapLimit","longestScreenLine","foldIndex","foldStart","$getStringScreenWidth","undoChanges","dontSelect","lastUndoRange","$getUndoSelection","foldDelta","redoChanges","setUndoSelect","enable","isUndo","toPosition","toRange","collDiff","oldStart","newStart","indentRows","outdentRows","rowRange","deleteRange","$moveLines","$clipRowToDocument","MAX_VALUE","moveLinesUp","moveLinesDown","duplicateLines","$clipColumnToRow","$wrapLimitRange","useWrapMode","getUseWrapMode","setWrapLimitRange","adjustWrapLimit","desiredLimit","$printMargin","limits","wrapLimit","$constrainWrapLimit","getWrapLimit","setWrapLimit","getWrapLimitRange","foldLineBefore","wrapData","walkTokens","$getDisplayTokens","PLACEHOLDER_START","PLACEHOLDER_BODY","$computeWrapSplits","isFullWidth","splits","displayLength","lastSplit","lastDocSplit","isCode","$wrapAsCode","indentedSoftWrap","$indentedSoftWrap","maxIndent","addSplit","displayed","getWrapIndent","minSplit","getScreenTabSize","maxScreenColumn","screenColumn","getRowLength","getRowLineCount","getRowWrapIndent","getScreenLastRowColumn","documentToScreenColumn","getDocumentLastRowColumn","docColumn","getRowSplitData","screenToDocumentRow","screenToDocumentColumn","rowLength","rowCache","doCache","maxRow","wrapIndent","splitIndex","foldStartRow","wrapRow","screenRowOffset","getScreenLength","screenRows","$getWidgetScreenLength","$setFontMetrics","fm","$enableVarChar","getCharacterWidth","$wrap","useSoftTabs","Search","$matchIterator","skipCurrent","findAll","needle","$assembleRegExp","$isMultiLine","prevRange","replacement","preserveCase","matchIterator","backwards","lineIterator","$lineIterator","_callback","$disableFakeMultiline","wholeWord","wordBoundary","addWordBoundary","modifier","$assembleMultilineRegExp","HashHandler","commandKeyBinding","addCommands","$singleCommand","MultiHashHandler","bindKey","removeCommand","_buildKeyHash","keepCommand","ckb","keyId","cmdGroup","keyPart","parseKeys","_addCommandToBinding","isDefault","removeCommands","bindKeys","keyList","findKeyCommand","$keyChain","CommandManager","byName","toggleRecording","$inReplay","recording","macro","$addCommandToMacro","oldMacro","replay","trimMacro","showSettingsMenu","showErrorMarker","centerSelection","gotoLine","multiSelectAction","getAllRanges","findNext","findPrevious","aceCommandGroup","navigateFileStart","navigateUp","navigateFileEnd","navigateDown","navigateWordLeft","navigateLineStart","navigateLeft","navigateWordRight","navigateLineEnd","navigateRight","selectPageDown","scrollPageDown","gotoPageDown","selectPageUp","scrollPageUp","gotoPageUp","jumpToMatching","$handlePaste","duplicateSelection","sortLines","modifyNumber","copyLinesUp","copyLinesDown","removeToLineStart","removeToLineEnd","removeWordLeft","removeWordRight","blockOutdent","splitLine","transposeLetters","transposeSelections","firstLineEndCol","selectedCount","insertLine","exitMultiSelectMode","defaultCommands","Editor","getContainerElement","getTextAreaContainer","keyBinding","$mouseHandler","$search","$historyTracker","$initOperationListeners","_$emitInputEvent","setSession","selections","$opResetTimer","docChanged","prevOp","commadEvent","previousCommand","scrollSelectionIntoView","animateScrolling","$mergeableCommands","$mergeUndoDeltas","mergeableCommands","shouldMerge","mergeNextCommand","sequenceStartTime","$keybindingId","oldSession","$onDocumentChange","$onTokenizerUpdate","$onChangeTabSize","$onChangeWrapLimit","$onChangeWrapMode","$onChangeFold","$onChangeFrontMarker","$onChangeBackMarker","$onChangeBreakpoint","$onChangeAnnotation","$onCursorChange","$onScrollTopChange","$onScrollLeftChange","$onSelectionChange","onDocumentChange","onChangeMode","onTokenizerUpdate","onChangeTabSize","onChangeWrapLimit","onChangeWrapMode","onChangeFrontMarker","onChangeBackMarker","onChangeBreakpoint","onChangeAnnotation","onCursorChange","onScrollTopChange","onScrollLeftChange","onSelectionChange","updateFull","oldEditor","cursorPos","getTheme","getFontSize","$highlightBrackets","$bracketHighlight","$highlightPending","getMatching","$highlightTags","$highlightTagPending","$tagHighlight","prevToken","sbm","$isFocused","showCursor","visualizeFocus","hideCursor","visualizeBlur","$cursorChange","updateCursor","updateLines","$updateHighlightActiveLine","scrollToY","scrollToX","$highlightActiveLine","$selectionStyle","$maxLines","$minLines","$highlightLineMarker","$selectionMarker","$highlightSelectedWord","$getSelectionHighLightRegexp","startOuter","endOuter","lineCols","updateFrontMarkers","updateBackMarkers","updateBreakpoints","updateText","getSelectedText","inVirtualSelectionMode","getBehavioursEnabled","$mergeNextCommand","lineState","shouldOutdent","setScrollSpeed","getScrollSpeed","setDragDelay","setSelectionStyle","setHighlightActiveLine","shouldHighlight","getHighlightActiveLine","setHighlightGutterLine","getHighlightGutterLine","setHighlightSelectedWord","getHighlightSelectedWord","setAnimatedScroll","shouldAnimate","getAnimatedScroll","setShowInvisibles","showInvisibles","getShowInvisibles","setDisplayIndentGuides","getDisplayIndentGuides","getShowPrintMargin","setPrintMarginColumn","getPrintMarginColumn","setBehavioursEnabled","setWrapBehavioursEnabled","setShowFoldWidgets","getShowFoldWidgets","setFadeFoldWidgets","fade","getFadeFoldWidgets","new_range","originalRange","$getSelectedRows","getNumberAt","_numberRx","charRange","nr","fp","decimals","nnr","totalDiff","rangeIndex","subRows","showComposition","setCompositionText","hideComposition","getFirstVisibleRow","getLastVisibleRow","isRowVisible","isRowFullyVisible","getFirstFullyVisibleRow","getLastFullyVisibleRow","$getVisibleRowCount","getScrollBottomRow","getScrollTopRow","$moveByPage","scrollToRow","scrollToLine","center","animate","alignCursor","getCursorPositionScreen","expand","matchType","bracketType","brackets","navigateTo","$tryReplace","replaceAll","getLastSearchOptions","newRange","preventScroll","revealRange","setAutoScrollEditorIntoView","shouldScroll","$scrollAnchor","scrollAnchor","onChangeSelection","onBeforeRender","onAfterRender","searchBox","$pixelPos","$resetCursorStyle","$cursorStyle","cursorLayer","setSmoothBlinking","isBlinking","selectionStyle","highlightSelectedWord","behavioursEnabled","wrapBehavioursEnabled","autoScrollEditorIntoView","keybindingId","hScrollBarAlwaysVisible","vScrollBarAlwaysVisible","highlightGutterLine","animatedScroll","printMarginColumn","printMargin","fadeFoldWidgets","showFoldWidgets","showLineNumbers","displayIndentGuides","scrollPastEnd","fixedWidthGutter","foldStyle","UndoManager","$serializeDelta","$deserializeDelta","cloneDeltaSetsObj","deltaSets_old","fnGetModifiedDelta","deltaSets_new","deltaSet_old","deltaSet_new","delta_old","deltaSets","$doc","hasUndo","dirtyCounter","$undoStack","$redoStack","undoSelectionRange","redoSelectionRange","$deserializeDeltas","hasRedo","$serializeDeltas","Gutter","$showFoldWidgets","$updateAnnotations","$cells","rowInfo","annoText","gutterOffset","breakpoints","decorations","$firstLineNumber","lastLineNumber","gutterRenderer","$renderer","cell","foldWidget","$fixedWidth","$padding","$computePadding","$showLineNumbers","setShowLineNumbers","getShowLineNumbers","Marker","setPadding","setMarkers","$getTop","drawFullLineMarker","drawScreenLineMarker","drawTextMarker","drawMultiLineMarker","firstRowScreen","stringBuilder","extraStyle","radiusClass","extraLength","Text","$updateEolChar","EOF_CHAR","EOL_CHAR_LF","EOL_CHAR_CRLF","EOL_CHAR","TAB_CHAR","SPACE_CHAR","getLineHeight","$fontMetrics","$characterSize","$pollSizeChanges","checkForSizeChanges","$pollSizeChangesTimer","$computeTabString","$tabStrings","tabStr","$indentGuideRe","spaceClass","tabClass","spaceContent","tabContent","scrollLines","lineElements","lineElementsIdx","lineElement","$renderLine","$useLineGroups","oldConfig","$renderLinesFragment","$textToken","$renderToken","tabIdx","idx4","classToUse","renderIndentGuide","$renderWrappedLine","onlyContents","splitChars","$renderSimpleLine","$getFoldLineTokens","renderTokens","addTokens","$measureNode","isIE8","Cursor","blinkInterval","smoothBlinking","addCursor","$updateCursors","$updateVisibility","$updateOpacity","blinking","restartTimer","setBlinkInterval","removeCursor","intervalId","timeoutId","blink","getPixelPosition","onScreen","$selectionMarkers","cursorIndex","pixelPos","drawCursor","$setOverwrite","ScrollBar","classSuffix","setVisible","skipEvent","coeff","VScrollBar","$scrollbarWidth","setHeight","setInnerHeight","setScrollHeight","HScrollBar","setWidth","setInnerWidth","setScrollWidth","ScrollBarV","ScrollBarH","RenderLoop","onRender","pending","CHAR_COUNT","FontMetrics","$setMeasureNodeStyles","$main","$testFractionalRect","isRoot","whiteSpace","$measureSizes","boldSize","charSizes","allowBoldFonts","setPolling","$measureCharWidth","GutterLayer","MarkerLayer","TextLayer","CursorLayer","VirtualRenderer","onGutterResize","$markerBack","textLayer","$textLayer","$markerFront","$horizScroll","$vScroll","scrollBar","$scrollAnimation","updateCharacterSize","$size","scrollerHeight","scrollerWidth","$dirty","$loop","$renderChanges","CHANGE_FULL","CHANGE_CURSOR","CHANGE_MARKER","CHANGE_GUTTER","CHANGE_SCROLL","CHANGE_LINES","CHANGE_TEXT","CHANGE_SIZE","CHANGE_MARKER_BACK","CHANGE_MARKER_FRONT","CHANGE_H_SCROLL","$allowBoldFonts","$updatePrintMargin","onChangeNewLineMode","$changedLines","updateFontSize","$changes","$updateSizeAsync","resizing","$updateCachedSize","$extraHeight","oldSize","$showGutter","$computeLayerConfig","availableWidth","$showPrintMargin","$printMarginColumn","$animatedScroll","getShowGutter","$updateGutterLineHighlight","$gutterLineHighlight","$printMarginEl","containerEl","posTop","posLeft","$composition","sm","getHScrollBarAlwaysVisible","$hScrollBarAlwaysVisible","setHScrollBarAlwaysVisible","alwaysVisible","getVScrollBarAlwaysVisible","$vScrollBarAlwaysVisible","setVScrollBarAlwaysVisible","$updateScrollBarV","$scrollPastEnd","$updateScrollBarH","$frozen","unfreeze","$highlightGutterLine","$updateLines","$autosize","desiredHeight","$maxPixelHeight","$gutterWidth","hideScrollbars","longestLine","$getLongestLine","horizScroll","hScrollChanged","vScrollBefore","vScrollChanged","firstRowHeight","charCount","$viewMargin","topMargin","bottomMargin","alignment","STEPS","$calcSteps","fromValue","toValue","x_min","steps","initialScroll","oldSteps","$timer","canvasPos","textToScreenCoordinates","keepTextAreaAtCursor","$themeId","cssClass","$theme","isDark","setMouseCursor","maxPixelHeight","WorkerClient","topLevelNamespaces","classname","workerUrl","$sendDeltaQueue","changeListener","onMessage","nameToUrl","toUrl","normalizePath","$normalizePath","tlns","workerSrc","blobUrl","URL","webkitURL","createObjectURL","$workerBlob","blobURL","revokeObjectURL","callbackId","onmessage","deltaQueue","attachToDocument","blobBuilder","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","getBlob","UIWorkerClient","messageBuffer","emitSync","sender","processNext","setEmitSync","Main","PlaceHolder","mainClass","othersClass","$onUpdate","$others","undoStack","$undostack","$undoStackDepth","setup","selectionBefore","showOtherMarkers","othersActive","hideOtherMarkers","updateAnchors","inMainRange","distanceFromStart","newPos","otherPos","updateMarkers","updateMarker","undosRequired","isSamePoint","accel","selectionMode","isMultiSelect","mouseX","mouseY","screenAnchor","screenCursor","$enableJumpToDef","$blockSelectEnabled","addSelectionMarker","removeSelectionMarker","tmpSel","rectSel","onSelectionInterval","newCursor","removeSelectionMarkers","rectangularRangeBlock","updateSelectionMarkers","selectMoreLines","selectMore","splitIntoLines","alignCursors","multiSelectCommands","isAvailable","getSelectionMarkers","$blockChangeEvents","$onAddRange","$onRemoveRange","mergeOverlappingRanges","lastRange","$initRangeList","toggleBlockSelection","includeEmptyLines","xBackwards","yBackwards","docEnd","MultiSelect","$multiselectOnSessionChange","$onMultiSelect","$onSingleSelect","onSessionChange","$checkMultiselectChange","altCursor","altDown","addAltCursorListeners","selectionMarkerCount","markerList","$onMultiSelectExec","inVirtualMode","forEachSelection","keepOrder","$byLines","cmdResult","anim","screenLead","toRemove","words","stopAtFirst","sameRowRanges","maxCol","minSpace","spaceOffsets","spaceOffset","fr","lr","guessRange","$reAlignText","forceLeft","startW","textW","endW","isLeftAligned","isRightAligned","alignLeft","enableMultiselect","enableBlockSelect","FoldMode","foldingStartMarker","foldingStopMarker","indentationBlock","startLevel","openingBracketBlock","closingBracketBlock","LineWidgets","widgetManager","updateOnChange","renderWidgets","measureWidgets","_changedWidgets","$onChangeEditor","updateOnFold","_inDocument","$updateRows","noWidgets","$oldWidget","pixelHeight","$fold","onWidgetChanged","w1","getWidgetsAtRow","changedWidgets","fixedWidth","coverLine","fullWidth","oldWidget","gutterAnno","comparator","binarySearch","findAnnotations","sc","onmousedown","Renderer","_id","createEditSession","Builder","MSBlobBuilder","bag","endings","get_blob","argsTag","mapTag","setTag","moduleExports","arrayProto","nativeIsBuffer","JsonHighlightRules","MatchingBraceOutdent","BaseFoldMode","commentRegex","singleLineBlockCommentRe","tripleStarBlockCommentRe","startRegionRe","_getFoldWidgetBase","forceMultiline","getCommentRegionBlock","getSectionRange","startIndent","subRange","CStyleFoldMode","$outdent","worker","YamlHighlightRules","prevIndent","nextIndent","emptyListRE","unorderedListRE","incrementRemainingMarkdownListNumbers","skipCount","startItem","nextLineNumber","nextItem","newNumber","nextNumber","itemNumber","newlineAndIndentContinueMarkdownList","replacements","eolState","inList","inQuote","cursorBeforeBullet","numbered","bullet","tabAndIndentMarkdownList","shiftTabAndUnindentMarkdownList","fullScreenRestore","setFullscreen","setNormal","modeInfo","findModeByMIME","findModeByExtension","findModeByFileName","dot","clearPlaceholder","setPlaceholder","placeHolder","onCursorActivity","markedSelection","coverRange","markedSelectionStyle","addAt","atEnd","urlRE","modeConfig","codeDepth","gfmOverlay","codeBlock","ateSpace","markdownConfig","Typo","aff_loading","xhr_aff","aff_data","num_loaded","typo","dic_data","dic_loading","xhr_dic","rx_word","dictionary","affData","wordsData","dictionaryTable","compoundRules","compoundRuleCodes","replacementTable","memoized","_jlen","readDataFile","setFunc","_readFile","asyncLoad","setAffData","setWordsData","_parseAFF","ONLYINCOMPOUND","_parseDIC","ruleText","expressionText","loadedCallback","extension","dictionaryPath","getURL","__dirname","charset","overrideMimeType","fs","existsSync","stats","statSync","fileDescriptor","openSync","readSync","numEntries","lineParts","_removeAffixComments","definitionParts","ruleType","ruleCode","combineable","charactersToRemove","additionParts","charactersToAdd","continuationClasses","parseRuleCodes","regexToMatch","_removeDicComments","addWord","ruleCodesArray","NEEDAFFIX","newWords","_applyRule","_iilen","newWord","combineCode","combineRule","otherNewWords","iii","_iiilen","textCodes","FLAG","continuationRule","aWord","trimmedWord","checkExact","capitalizedWord","hasFlag","lowercaseWord","ruleCodes","COMPOUNDMIN","wordFlags","alphabet","memoizedLimit","replacementEntry","correctedWord","edits1","rv","ed1","ed2","corrections","known","weighted_corrections","sorted_corrections","capitalization_scheme","correct","newline","fences","heading","def","nptable","lheading","_paragraph","Lexer","links","pedantic","gfm","_label","_title","getRegex","_comment","paragraph","loose","listStart","listItems","isordered","istask","ischecked","lastToken","trimRight","codeBlockStyle","rtrim","splitCells","cells","ordered","smartLists","task","sanitize","sanitizer","autolink","reflink","nolink","InlineLexer","TextRenderer","slugger","Slugger","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","cleanUrl","prot","originIndependentUrl","baseUrls","resolveUrl","_punctuation","_escapes","_scheme","_email","_attribute","_href","_extended_email","_backpedal","prevCapZero","inLink","inRawBlock","lastParenIndex","findClosingBracket","linkLen","outputLink","codespan","mangle","smartypants","infostring","escaped","langPrefix","headerIds","headerPrefix","slug","xhtml","listitem","checkbox","tablerow","tablecell","baseUrl","inlineText","parseText","errMsg","originalSlug","tableRow","suffLen","currChar","checkSanitizeDeprecation","getDefaults","lexer","inlineLexer","AS3_REST_ARG_MODE","literal","NUMBER","nomarkup","STRING","PARAMS","COMMENT_MODE_1","COMMENTS","built_in","VAR","QUOTE_STRING","SYMBOL_RE","SYMBOL","LITERAL","COLLECTION","HINT","HINT_COL","KEY","LIST","BODY","NAME","DEFAULT_CONTAINS","KEYWORDS","JS_IDENT_RE","SUBST","EXPRESSIONS","TITLE","CPP_PRIMITIVE_TYPES","STRINGS","NUMBERS","PREPROCESSOR","FUNCTION_TITLE","CPP_KEYWORDS","EXPRESSION_CONTAINS","preprocessor","strings","INT_SUFFIX","CRYSTAL_METHOD_RE","CRYSTAL_KEYWORDS","EXPANSION","recursiveParen","Q_STRING","REGEXP","CRYSTAL_DEFAULT_CONTAINS","RULE","BRACED_SUBST","FILTER","ELIXIR_IDENT_RE","ELIXIR_KEYWORDS","LOWERCASE_SIGIL","UPCASE_SIGIL","FUNCTION","CLASS","ELIXIR_DEFAULT_CONTAINS","CONSTRUCTOR","BASIC_ATOM_RE","FUNCTION_NAME_RE","ERLANG_RESERVED","NAMED_FUN","FUNCTION_CALL","TUPLE","VAR1","VAR2","RECORD_ACCESS","BLOCK_STATEMENTS","BASIC_MODES","TYPEPARAM","GO_KEYWORDS","BUILT_INS","IDENTIFIER_PLAIN_OR_QUOTED","EXPRESSION_OR_HELPER_CALL","BLOCK_MUSTACHE_CONTENTS","BASIC_MUSTACHE_CONTENTS","PRAGMA","TAG_INNARDS","JAVA_NUMBER_MODE","HTML_TEMPLATE","CSS_TEMPLATE","TEMPLATE_STRING","PARAMS_CONTAINS","LITERALS","ALLOWED_COMMENTS","TYPES","VALUE_CONTAINER","OBJECT","ARRAY","VARIABLE_NAME_RE","INTERPOLATION","INTERPOLATED_VARIABLE","COMMAND","MACROCALL","LABEL","VARIABLE","ANNOTATION_USE_SITE","ANNOTATION","KOTLIN_NUMBER_MODE","KOTLIN_NESTED_COMMENT","KOTLIN_PAREN_TYPE","KOTLIN_PAREN_TYPE2","RULES","VALUE","STRING_MODE","IDENT_MODE","PARENS_MODE","VALUE_WITH_RULESETS","MIXIN_GUARD_MODE","RULE_MODE","INTERP_IDENT_RE","AT_RULE_MODE","VAR_RULE_MODE","SELECTOR_MODE","LISP_IDENT_RE","LISP_SIMPLE_NUMBER_RE","KEYWORD","IDENT","MEC","QUOTED","QUOTED_ATOM","SUBST_SIMPLE","LONG_BRACKETS","FUNC","ASSIGNMENT","TARGET","TRANSPOSE","PERL_KEYWORDS","METHOD","STRING_CONTAINS","PERL_DEFAULT_CONTAINS","NIX_KEYWORDS","ANTIQUOTE","LEXEMES","CLASS_KEYWORDS","COMMENT_MODE","TYPES_RE","FUNCTIONS_RE","SQL_KW","SQL_BI","BACKTICK_ESCAPE","APOS_STRING","PS_COMMENT","CMDLETS","PS_CLASS","PS_FUNCTION","PS_USING","PS_ARGUMENTS","PS_METHODS","GENTLEMANS_SET","PS_TYPE","PARENTED","LINE_COMMENT","BACKTICK_STRING","PROMPT","LITERAL_BRACKET","RE_IDENT","RE_MODULE_IDENT","RE_OPERATOR","RE_OPERATOR_SPACED","RE_NUMBER","OPERATOR_MODE","LIST_CONTENTS_MODES","MODULE_ACCESS_CONTENTS","PARAMS_CONTENTS","FUNCTION_BLOCK_MODE","CONSTRUCTOR_MODE","PATTERN_MATCH_BLOCK_MODE","MODULE_ACCESS_MODE","RUBY_METHOD_RE","RUBY_KEYWORDS","YARDOCTAG","IRB_OBJECT","COMMENT_MODES","RUBY_DEFAULT_CONTAINS","IRB_DEFAULT","NUM_SUFFIX","BUILTINS","TYPE","HEXCOLOR","CHAR","VAR_IDENT_RE","SWIFT_KEYWORDS","BLOCK_COMMENT","DECORATOR","ARGS","XML_ENTITIES","XML_META_KEYWORDS","XML_META_PAR_KEYWORDS","APOS_META_STRING_MODE","QUOTE_META_STRING_MODE","TAG_INTERNALS","serializer","replacer","cycleReplacer","thisPos","getSerialize","trackedProperties","trackProperties","tracked","_detectMutations","trackedProperty","sameParentRef","prevObj","sameRef","keysTo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AAS9nV,EAAKrL,OAAO/L,IAEzG,GAAIuG,EAAOwgM,WACT,OAAOxgM,EAGX,MAAO,CAAEwgM,YAAY,GApDV+3J,CAAiBp4J,EAAai4J,EAAmB97V,MAsD9DpE,EAAOC,QAAUA,EAAO","file":"static/js/2.08ea13e0.chunk.js","sourcesContent":["'use strict';\n\nmodule.exports = require('./lib/React');\n","import defineProperty from \"./defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","'use strict';\n\nexports.__esModule = true;\nexports.createMemoryHistory = exports.hashHistory = exports.browserHistory = exports.applyRouterMiddleware = exports.formatPattern = exports.useRouterHistory = exports.match = exports.routerShape = exports.locationShape = exports.RouterContext = exports.createRoutes = exports.Route = exports.Redirect = exports.IndexRoute = exports.IndexRedirect = exports.withRouter = exports.IndexLink = exports.Link = exports.Router = undefined;\n\nvar _RouteUtils = require('./RouteUtils');\n\nObject.defineProperty(exports, 'createRoutes', {\n enumerable: true,\n get: function get() {\n return _RouteUtils.createRoutes;\n }\n});\n\nvar _PropTypes = require('./PropTypes');\n\nObject.defineProperty(exports, 'locationShape', {\n enumerable: true,\n get: function get() {\n return _PropTypes.locationShape;\n }\n});\nObject.defineProperty(exports, 'routerShape', {\n enumerable: true,\n get: function get() {\n return _PropTypes.routerShape;\n }\n});\n\nvar _PatternUtils = require('./PatternUtils');\n\nObject.defineProperty(exports, 'formatPattern', {\n enumerable: true,\n get: function get() {\n return _PatternUtils.formatPattern;\n }\n});\n\nvar _Router2 = require('./Router');\n\nvar _Router3 = _interopRequireDefault(_Router2);\n\nvar _Link2 = require('./Link');\n\nvar _Link3 = _interopRequireDefault(_Link2);\n\nvar _IndexLink2 = require('./IndexLink');\n\nvar _IndexLink3 = _interopRequireDefault(_IndexLink2);\n\nvar _withRouter2 = require('./withRouter');\n\nvar _withRouter3 = _interopRequireDefault(_withRouter2);\n\nvar _IndexRedirect2 = require('./IndexRedirect');\n\nvar _IndexRedirect3 = _interopRequireDefault(_IndexRedirect2);\n\nvar _IndexRoute2 = require('./IndexRoute');\n\nvar _IndexRoute3 = _interopRequireDefault(_IndexRoute2);\n\nvar _Redirect2 = require('./Redirect');\n\nvar _Redirect3 = _interopRequireDefault(_Redirect2);\n\nvar _Route2 = require('./Route');\n\nvar _Route3 = _interopRequireDefault(_Route2);\n\nvar _RouterContext2 = require('./RouterContext');\n\nvar _RouterContext3 = _interopRequireDefault(_RouterContext2);\n\nvar _match2 = require('./match');\n\nvar _match3 = _interopRequireDefault(_match2);\n\nvar _useRouterHistory2 = require('./useRouterHistory');\n\nvar _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2);\n\nvar _applyRouterMiddleware2 = require('./applyRouterMiddleware');\n\nvar _applyRouterMiddleware3 = _interopRequireDefault(_applyRouterMiddleware2);\n\nvar _browserHistory2 = require('./browserHistory');\n\nvar _browserHistory3 = _interopRequireDefault(_browserHistory2);\n\nvar _hashHistory2 = require('./hashHistory');\n\nvar _hashHistory3 = _interopRequireDefault(_hashHistory2);\n\nvar _createMemoryHistory2 = require('./createMemoryHistory');\n\nvar _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Router = _Router3.default; /* components */\n\nexports.Link = _Link3.default;\nexports.IndexLink = _IndexLink3.default;\nexports.withRouter = _withRouter3.default;\n\n/* components (configuration) */\n\nexports.IndexRedirect = _IndexRedirect3.default;\nexports.IndexRoute = _IndexRoute3.default;\nexports.Redirect = _Redirect3.default;\nexports.Route = _Route3.default;\n\n/* utils */\n\nexports.RouterContext = _RouterContext3.default;\nexports.match = _match3.default;\nexports.useRouterHistory = _useRouterHistory3.default;\nexports.applyRouterMiddleware = _applyRouterMiddleware3.default;\n\n/* histories */\n\nexports.browserHistory = _browserHistory3.default;\nexports.hashHistory = _hashHistory3.default;\nexports.createMemoryHistory = _createMemoryHistory3.default;","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import setPrototypeOf from \"./setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import _typeof from \"../../helpers/esm/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","/*\nSyntax highlighting with language autodetection.\nhttps://highlightjs.org/\n*/\n\n(function(factory) {\n\n // Find the global object for export to both the browser and web workers.\n var globalObject = typeof window === 'object' && window ||\n typeof self === 'object' && self;\n\n // Setup highlight.js for different environments. First is Node.js or\n // CommonJS.\n // `nodeType` is checked to ensure that `exports` is not a HTML element.\n if(typeof exports !== 'undefined' && !exports.nodeType) {\n factory(exports);\n } else if(globalObject) {\n // Export hljs globally even when using AMD for cases when this script\n // is loaded with others that may still expect a global hljs.\n globalObject.hljs = factory({});\n\n // Finally register the global hljs with AMD.\n if(typeof define === 'function' && define.amd) {\n define([], function() {\n return globalObject.hljs;\n });\n }\n }\n\n}(function(hljs) {\n // Convenience variables for build-in objects\n var ArrayProto = [],\n objectKeys = Object.keys;\n\n // Global internal variables used within the highlight.js library.\n var languages = {},\n aliases = {};\n\n // safe/production mode - swallows more errors, tries to keep running\n // even if a single syntax or parse hits a fatal error\n var SAFE_MODE = true;\n\n // Regular expressions used throughout the highlight.js library.\n var noHighlightRe = /^(no-?highlight|plain|text)$/i,\n languagePrefixRe = /\\blang(?:uage)?-([\\w-]+)\\b/i,\n fixMarkupRe = /((^(<[^>]+>|\\t|)+|(?:\\n)))/gm;\n\n // The object will be assigned by the build tool. It used to synchronize API\n // of external language files with minified version of the highlight.js library.\n var API_REPLACES;\n\n var spanEndTag = '';\n var LANGUAGE_NOT_FOUND = \"Could not find the language '{}', did you forget to load/include a language module?\";\n\n // Global options used when within external APIs. This is modified when\n // calling the `hljs.configure` function.\n var options = {\n classPrefix: 'hljs-',\n tabReplace: null,\n useBR: false,\n languages: undefined\n };\n\n // keywords that should have no default relevance value\n var COMMON_KEYWORDS = 'of and for in not or if then'.split(' ');\n\n\n /* Utility functions */\n\n function escape(value) {\n return value.replace(/&/g, '&').replace(//g, '>');\n }\n\n function tag(node) {\n return node.nodeName.toLowerCase();\n }\n\n function testRe(re, lexeme) {\n var match = re && re.exec(lexeme);\n return match && match.index === 0;\n }\n\n function isNotHighlighted(language) {\n return noHighlightRe.test(language);\n }\n\n function blockLanguage(block) {\n var i, match, length, _class;\n var classes = block.className + ' ';\n\n classes += block.parentNode ? block.parentNode.className : '';\n\n // language-* takes precedence over non-prefixed class names.\n match = languagePrefixRe.exec(classes);\n if (match) {\n var language = getLanguage(match[1]);\n if (!language) {\n console.warn(LANGUAGE_NOT_FOUND.replace(\"{}\", match[1]));\n console.warn(\"Falling back to no-highlight mode for this block.\", block);\n }\n return language ? match[1] : 'no-highlight';\n }\n\n classes = classes.split(/\\s+/);\n\n for (i = 0, length = classes.length; i < length; i++) {\n _class = classes[i];\n\n if (isNotHighlighted(_class) || getLanguage(_class)) {\n return _class;\n }\n }\n }\n\n /**\n * performs a shallow merge of multiple objects into one\n *\n * @arguments list of objects with properties to merge\n * @returns a single new object\n */\n function inherit(parent) { // inherit(parent, override_obj, override_obj, ...)\n var key;\n var result = {};\n var objects = Array.prototype.slice.call(arguments, 1);\n\n for (key in parent)\n result[key] = parent[key];\n objects.forEach(function(obj) {\n for (key in obj)\n result[key] = obj[key];\n });\n return result;\n }\n\n /* Stream merging */\n\n function nodeStream(node) {\n var result = [];\n (function _nodeStream(node, offset) {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3)\n offset += child.nodeValue.length;\n else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n }\n\n function mergeStreams(original, highlighted, value) {\n var processed = 0;\n var result = '';\n var nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n function open(node) {\n function attr_str(a) {\n return ' ' + a.nodeName + '=\"' + escape(a.value).replace(/\"/g, '"') + '\"';\n }\n result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>';\n }\n\n function close(node) {\n result += '';\n }\n\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n var stream = selectStream();\n result += escape(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escape(value.substr(processed));\n }\n\n /* Initialization */\n\n function dependencyOnParent(mode) {\n if (!mode) return false;\n\n return mode.endsWithParent || dependencyOnParent(mode.starts);\n }\n\n function expand_or_clone_mode(mode) {\n if (mode.variants && !mode.cached_variants) {\n mode.cached_variants = mode.variants.map(function(variant) {\n return inherit(mode, {variants: null}, variant);\n });\n }\n\n // EXPAND\n // if we have variants then essentially \"replace\" the mode with the variants\n // this happens in compileMode, where this function is called from\n if (mode.cached_variants)\n return mode.cached_variants;\n\n // CLONE\n // if we have dependencies on parents then we need a unique\n // instance of ourselves, so we can be reused with many\n // different parents without issue\n if (dependencyOnParent(mode))\n return [inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null })];\n\n if (Object.isFrozen(mode))\n return [inherit(mode)];\n\n // no special dependency issues, just return ourselves\n return [mode];\n }\n\n function restoreLanguageApi(obj) {\n if(API_REPLACES && !obj.langApiRestored) {\n obj.langApiRestored = true;\n for(var key in API_REPLACES) {\n if (obj[key]) {\n obj[API_REPLACES[key]] = obj[key];\n }\n }\n (obj.contains || []).concat(obj.variants || []).forEach(restoreLanguageApi);\n }\n }\n\n function compileKeywords(rawKeywords, case_insensitive) {\n var compiled_keywords = {};\n\n if (typeof rawKeywords === 'string') { // string\n splitAndCompile('keyword', rawKeywords);\n } else {\n objectKeys(rawKeywords).forEach(function (className) {\n splitAndCompile(className, rawKeywords[className]);\n });\n }\n return compiled_keywords;\n\n // ---\n\n function splitAndCompile(className, str) {\n if (case_insensitive) {\n str = str.toLowerCase();\n }\n str.split(' ').forEach(function(keyword) {\n var pair = keyword.split('|');\n compiled_keywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];\n });\n }\n }\n\n function scoreForKeyword(keyword, providedScore) {\n // manual scores always win over common keywords\n // so you can force a score of 1 if you really insist\n if (providedScore)\n return Number(providedScore);\n\n return commonKeyword(keyword) ? 0 : 1;\n }\n\n function commonKeyword(word) {\n return COMMON_KEYWORDS.indexOf(word.toLowerCase()) != -1;\n }\n\n function compileLanguage(language) {\n\n function reStr(re) {\n return (re && re.source) || re;\n }\n\n function langRe(value, global) {\n return new RegExp(\n reStr(value),\n 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')\n );\n }\n\n function reCountMatchGroups(re) {\n return (new RegExp(re.toString() + '|')).exec('').length - 1;\n }\n\n // joinRe logically computes regexps.join(separator), but fixes the\n // backreferences so they continue to match.\n // it also places each individual regular expression into it's own\n // match group, keeping track of the sequencing of those match groups\n // is currently an exercise for the caller. :-)\n function joinRe(regexps, separator) {\n // backreferenceRe matches an open parenthesis or backreference. To avoid\n // an incorrect parse, it additionally matches the following:\n // - [...] elements, where the meaning of parentheses and escapes change\n // - other escape sequences, so we do not misparse escape sequences as\n // interesting elements\n // - non-matching or lookahead parentheses, which do not capture. These\n // follow the '(' with a '?'.\n var backreferenceRe = /\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;\n var numCaptures = 0;\n var ret = '';\n for (var i = 0; i < regexps.length; i++) {\n numCaptures += 1;\n var offset = numCaptures;\n var re = reStr(regexps[i]);\n if (i > 0) {\n ret += separator;\n }\n ret += \"(\";\n while (re.length > 0) {\n var match = backreferenceRe.exec(re);\n if (match == null) {\n ret += re;\n break;\n }\n ret += re.substring(0, match.index);\n re = re.substring(match.index + match[0].length);\n if (match[0][0] == '\\\\' && match[1]) {\n // Adjust the backreference.\n ret += '\\\\' + String(Number(match[1]) + offset);\n } else {\n ret += match[0];\n if (match[0] == '(') {\n numCaptures++;\n }\n }\n }\n ret += \")\";\n }\n return ret;\n }\n\n function buildModeRegex(mode) {\n\n var matchIndexes = {};\n var matcherRe;\n var regexes = [];\n var matcher = {};\n var matchAt = 1;\n\n function addRule(rule, regex) {\n matchIndexes[matchAt] = rule;\n regexes.push([rule, regex]);\n matchAt += reCountMatchGroups(regex) + 1;\n }\n\n var term;\n for (var i=0; i < mode.contains.length; i++) {\n var re;\n term = mode.contains[i];\n if (term.beginKeywords) {\n re = '\\\\.?(?:' + term.begin + ')\\\\.?';\n } else {\n re = term.begin;\n }\n addRule(term, re);\n }\n if (mode.terminator_end)\n addRule(\"end\", mode.terminator_end);\n if (mode.illegal)\n addRule(\"illegal\", mode.illegal);\n\n var terminators = regexes.map(function(el) { return el[1]; });\n matcherRe = langRe(joinRe(terminators, '|'), true);\n\n matcher.lastIndex = 0;\n matcher.exec = function(s) {\n var rule;\n\n if( regexes.length === 0) return null;\n\n matcherRe.lastIndex = matcher.lastIndex;\n var match = matcherRe.exec(s);\n if (!match) { return null; }\n\n for(var i = 0; i';\n\n return openSpan + insideSpan + closeSpan;\n }\n\n function processKeywords() {\n var keyword_match, last_index, match, result;\n\n if (!top.keywords)\n return escape(mode_buffer);\n\n result = '';\n last_index = 0;\n top.lexemesRe.lastIndex = 0;\n match = top.lexemesRe.exec(mode_buffer);\n\n while (match) {\n result += escape(mode_buffer.substring(last_index, match.index));\n keyword_match = keywordMatch(top, match);\n if (keyword_match) {\n relevance += keyword_match[1];\n result += buildSpan(keyword_match[0], escape(match[0]));\n } else {\n result += escape(match[0]);\n }\n last_index = top.lexemesRe.lastIndex;\n match = top.lexemesRe.exec(mode_buffer);\n }\n return result + escape(mode_buffer.substr(last_index));\n }\n\n function processSubLanguage() {\n var explicit = typeof top.subLanguage === 'string';\n if (explicit && !languages[top.subLanguage]) {\n return escape(mode_buffer);\n }\n\n var result = explicit ?\n highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) :\n highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : undefined);\n\n // Counting embedded language score towards the host language may be disabled\n // with zeroing the containing mode relevance. Use case in point is Markdown that\n // allows XML everywhere and makes every XML snippet to have a much larger Markdown\n // score.\n if (top.relevance > 0) {\n relevance += result.relevance;\n }\n if (explicit) {\n continuations[top.subLanguage] = result.top;\n }\n return buildSpan(result.language, result.value, false, true);\n }\n\n function processBuffer() {\n result += (top.subLanguage != null ? processSubLanguage() : processKeywords());\n mode_buffer = '';\n }\n\n function startNewMode(mode) {\n result += mode.className? buildSpan(mode.className, '', true): '';\n top = Object.create(mode, {parent: {value: top}});\n }\n\n\n function doBeginMatch(match) {\n var lexeme = match[0];\n var new_mode = match.rule;\n\n if (new_mode && new_mode.endSameAsBegin) {\n new_mode.endRe = escapeRe( lexeme );\n }\n\n if (new_mode.skip) {\n mode_buffer += lexeme;\n } else {\n if (new_mode.excludeBegin) {\n mode_buffer += lexeme;\n }\n processBuffer();\n if (!new_mode.returnBegin && !new_mode.excludeBegin) {\n mode_buffer = lexeme;\n }\n }\n startNewMode(new_mode);\n return new_mode.returnBegin ? 0 : lexeme.length;\n }\n\n function doEndMatch(match) {\n var lexeme = match[0];\n var matchPlusRemainder = value.substr(match.index);\n var end_mode = endOfMode(top, matchPlusRemainder);\n if (!end_mode) { return; }\n\n var origin = top;\n if (origin.skip) {\n mode_buffer += lexeme;\n } else {\n if (!(origin.returnEnd || origin.excludeEnd)) {\n mode_buffer += lexeme;\n }\n processBuffer();\n if (origin.excludeEnd) {\n mode_buffer = lexeme;\n }\n }\n do {\n if (top.className) {\n result += spanEndTag;\n }\n if (!top.skip && !top.subLanguage) {\n relevance += top.relevance;\n }\n top = top.parent;\n } while (top !== end_mode.parent);\n if (end_mode.starts) {\n if (end_mode.endSameAsBegin) {\n end_mode.starts.endRe = end_mode.endRe;\n }\n startNewMode(end_mode.starts);\n }\n return origin.returnEnd ? 0 : lexeme.length;\n }\n\n var lastMatch = {};\n function processLexeme(text_before_match, match) {\n\n var lexeme = match && match[0];\n\n // add non-matched text to the current mode buffer\n mode_buffer += text_before_match;\n\n if (lexeme == null) {\n processBuffer();\n return 0;\n }\n\n // we've found a 0 width match and we're stuck, so we need to advance\n // this happens when we have badly behaved rules that have optional matchers to the degree that\n // sometimes they can end up matching nothing at all\n // Ref: https://github.com/highlightjs/highlight.js/issues/2140\n if (lastMatch.type==\"begin\" && match.type==\"end\" && lastMatch.index == match.index && lexeme === \"\") {\n // spit the \"skipped\" character that our regex choked on back into the output sequence\n mode_buffer += value.slice(match.index, match.index + 1);\n return 1;\n }\n lastMatch = match;\n\n if (match.type===\"begin\") {\n return doBeginMatch(match);\n } else if (match.type===\"illegal\" && !ignore_illegals) {\n // illegal match, we do not continue processing\n throw new Error('Illegal lexeme \"' + lexeme + '\" for mode \"' + (top.className || '') + '\"');\n } else if (match.type===\"end\") {\n var processed = doEndMatch(match);\n if (processed != undefined)\n return processed;\n }\n\n /*\n Why might be find ourselves here? Only one occasion now. An end match that was\n triggered but could not be completed. When might this happen? When an `endSameasBegin`\n rule sets the end rule to a specific match. Since the overall mode termination rule that's\n being used to scan the text isn't recompiled that means that any match that LOOKS like\n the end (but is not, because it is not an exact match to the beginning) will\n end up here. A definite end match, but when `doEndMatch` tries to \"reapply\"\n the end rule and fails to match, we wind up here, and just silently ignore the end.\n\n This causes no real harm other than stopping a few times too many.\n */\n\n mode_buffer += lexeme;\n return lexeme.length;\n }\n\n var language = getLanguage(name);\n if (!language) {\n console.error(LANGUAGE_NOT_FOUND.replace(\"{}\", name));\n throw new Error('Unknown language: \"' + name + '\"');\n }\n\n compileLanguage(language);\n var top = continuation || language;\n var continuations = {}; // keep continuations for sub-languages\n var result = '', current;\n for(current = top; current !== language; current = current.parent) {\n if (current.className) {\n result = buildSpan(current.className, '', true) + result;\n }\n }\n var mode_buffer = '';\n var relevance = 0;\n try {\n var match, count, index = 0;\n while (true) {\n top.terminators.lastIndex = index;\n match = top.terminators.exec(value);\n if (!match)\n break;\n count = processLexeme(value.substring(index, match.index), match);\n index = match.index + count;\n }\n processLexeme(value.substr(index));\n for(current = top; current.parent; current = current.parent) { // close dangling modes\n if (current.className) {\n result += spanEndTag;\n }\n }\n return {\n relevance: relevance,\n value: result,\n illegal:false,\n language: name,\n top: top\n };\n } catch (err) {\n if (err.message && err.message.indexOf('Illegal') !== -1) {\n return {\n illegal: true,\n relevance: 0,\n value: escape(value)\n };\n } else if (SAFE_MODE) {\n return {\n relevance: 0,\n value: escape(value),\n language: name,\n top: top,\n errorRaised: err\n };\n } else {\n throw err;\n }\n }\n }\n\n /*\n Highlighting with language detection. Accepts a string with the code to\n highlight. Returns an object with the following properties:\n\n - language (detected language)\n - relevance (int)\n - value (an HTML string with highlighting markup)\n - second_best (object with the same structure for second-best heuristically\n detected language, may be absent)\n\n */\n function highlightAuto(text, languageSubset) {\n languageSubset = languageSubset || options.languages || objectKeys(languages);\n var result = {\n relevance: 0,\n value: escape(text)\n };\n var second_best = result;\n languageSubset.filter(getLanguage).filter(autoDetection).forEach(function(name) {\n var current = highlight(name, text, false);\n current.language = name;\n if (current.relevance > second_best.relevance) {\n second_best = current;\n }\n if (current.relevance > result.relevance) {\n second_best = result;\n result = current;\n }\n });\n if (second_best.language) {\n result.second_best = second_best;\n }\n return result;\n }\n\n /*\n Post-processing of the highlighted markup:\n\n - replace TABs with something more useful\n - replace real line-breaks with '
    ' for non-pre containers\n\n */\n function fixMarkup(value) {\n if (!(options.tabReplace || options.useBR)) {\n return value;\n }\n\n return value.replace(fixMarkupRe, function(match, p1) {\n if (options.useBR && match === '\\n') {\n return '
    ';\n } else if (options.tabReplace) {\n return p1.replace(/\\t/g, options.tabReplace);\n }\n return '';\n });\n }\n\n function buildClassName(prevClassName, currentLang, resultLang) {\n var language = currentLang ? aliases[currentLang] : resultLang,\n result = [prevClassName.trim()];\n\n if (!prevClassName.match(/\\bhljs\\b/)) {\n result.push('hljs');\n }\n\n if (prevClassName.indexOf(language) === -1) {\n result.push(language);\n }\n\n return result.join(' ').trim();\n }\n\n /*\n Applies highlighting to a DOM node containing code. Accepts a DOM node and\n two optional parameters for fixMarkup.\n */\n function highlightBlock(block) {\n var node, originalStream, result, resultNode, text;\n var language = blockLanguage(block);\n\n if (isNotHighlighted(language))\n return;\n\n if (options.useBR) {\n node = document.createElement('div');\n node.innerHTML = block.innerHTML.replace(/\\n/g, '').replace(//g, '\\n');\n } else {\n node = block;\n }\n text = node.textContent;\n result = language ? highlight(language, text, true) : highlightAuto(text);\n\n originalStream = nodeStream(node);\n if (originalStream.length) {\n resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n result.value = fixMarkup(result.value);\n\n block.innerHTML = result.value;\n block.className = buildClassName(block.className, language, result.language);\n block.result = {\n language: result.language,\n re: result.relevance\n };\n if (result.second_best) {\n block.second_best = {\n language: result.second_best.language,\n re: result.second_best.relevance\n };\n }\n }\n\n /*\n Updates highlight.js global options with values passed in the form of an object.\n */\n function configure(user_options) {\n options = inherit(options, user_options);\n }\n\n /*\n Applies highlighting to all
    ..
    blocks on a page.\n */\n function initHighlighting() {\n if (initHighlighting.called)\n return;\n initHighlighting.called = true;\n\n var blocks = document.querySelectorAll('pre code');\n ArrayProto.forEach.call(blocks, highlightBlock);\n }\n\n /*\n Attaches highlighting to the page load event.\n */\n function initHighlightingOnLoad() {\n window.addEventListener('DOMContentLoaded', initHighlighting, false);\n window.addEventListener('load', initHighlighting, false);\n }\n\n var PLAINTEXT_LANGUAGE = { disableAutodetect: true };\n\n function registerLanguage(name, language) {\n var lang;\n try { lang = language(hljs); }\n catch (error) {\n console.error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", name));\n // hard or soft error\n if (!SAFE_MODE) { throw error; } else { console.error(error); }\n // languages that have serious errors are replaced with essentially a\n // \"plaintext\" stand-in so that the code blocks will still get normal\n // css classes applied to them - and one bad language won't break the\n // entire highlighter\n lang = PLAINTEXT_LANGUAGE;\n }\n languages[name] = lang;\n restoreLanguageApi(lang);\n lang.rawDefinition = language.bind(null,hljs);\n\n if (lang.aliases) {\n lang.aliases.forEach(function(alias) {aliases[alias] = name;});\n }\n }\n\n function listLanguages() {\n return objectKeys(languages);\n }\n\n /*\n intended usage: When one language truly requires another\n\n Unlike `getLanguage`, this will throw when the requested language\n is not available.\n */\n function requireLanguage(name) {\n var lang = getLanguage(name);\n if (lang) { return lang; }\n\n var err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}',name));\n throw err;\n }\n\n function getLanguage(name) {\n name = (name || '').toLowerCase();\n return languages[name] || languages[aliases[name]];\n }\n\n function autoDetection(name) {\n var lang = getLanguage(name);\n return lang && !lang.disableAutodetect;\n }\n\n /* Interface definition */\n\n hljs.highlight = highlight;\n hljs.highlightAuto = highlightAuto;\n hljs.fixMarkup = fixMarkup;\n hljs.highlightBlock = highlightBlock;\n hljs.configure = configure;\n hljs.initHighlighting = initHighlighting;\n hljs.initHighlightingOnLoad = initHighlightingOnLoad;\n hljs.registerLanguage = registerLanguage;\n hljs.listLanguages = listLanguages;\n hljs.getLanguage = getLanguage;\n hljs.requireLanguage = requireLanguage;\n hljs.autoDetection = autoDetection;\n hljs.inherit = inherit;\n hljs.debugMode = function() { SAFE_MODE = false; }\n\n // Common regexps\n hljs.IDENT_RE = '[a-zA-Z]\\\\w*';\n hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\\\w*';\n hljs.NUMBER_RE = '\\\\b\\\\d+(\\\\.\\\\d+)?';\n hljs.C_NUMBER_RE = '(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)'; // 0x..., 0..., decimal, float\n hljs.BINARY_NUMBER_RE = '\\\\b(0b[01]+)'; // 0b...\n hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n\n // Common modes\n hljs.BACKSLASH_ESCAPE = {\n begin: '\\\\\\\\[\\\\s\\\\S]', relevance: 0\n };\n hljs.APOS_STRING_MODE = {\n className: 'string',\n begin: '\\'', end: '\\'',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE]\n };\n hljs.QUOTE_STRING_MODE = {\n className: 'string',\n begin: '\"', end: '\"',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE]\n };\n hljs.PHRASAL_WORDS_MODE = {\n begin: /\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/\n };\n hljs.COMMENT = function (begin, end, inherits) {\n var mode = hljs.inherit(\n {\n className: 'comment',\n begin: begin, end: end,\n contains: []\n },\n inherits || {}\n );\n mode.contains.push(hljs.PHRASAL_WORDS_MODE);\n mode.contains.push({\n className: 'doctag',\n begin: '(?:TODO|FIXME|NOTE|BUG|XXX):',\n relevance: 0\n });\n return mode;\n };\n hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$');\n hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\\\*', '\\\\*/');\n hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$');\n hljs.NUMBER_MODE = {\n className: 'number',\n begin: hljs.NUMBER_RE,\n relevance: 0\n };\n hljs.C_NUMBER_MODE = {\n className: 'number',\n begin: hljs.C_NUMBER_RE,\n relevance: 0\n };\n hljs.BINARY_NUMBER_MODE = {\n className: 'number',\n begin: hljs.BINARY_NUMBER_RE,\n relevance: 0\n };\n hljs.CSS_NUMBER_MODE = {\n className: 'number',\n begin: hljs.NUMBER_RE + '(' +\n '%|em|ex|ch|rem' +\n '|vw|vh|vmin|vmax' +\n '|cm|mm|in|pt|pc|px' +\n '|deg|grad|rad|turn' +\n '|s|ms' +\n '|Hz|kHz' +\n '|dpi|dpcm|dppx' +\n ')?',\n relevance: 0\n };\n hljs.REGEXP_MODE = {\n className: 'regexp',\n begin: /\\//, end: /\\/[gimuy]*/,\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n {\n begin: /\\[/, end: /\\]/,\n relevance: 0,\n contains: [hljs.BACKSLASH_ESCAPE]\n }\n ]\n };\n hljs.TITLE_MODE = {\n className: 'title',\n begin: hljs.IDENT_RE,\n relevance: 0\n };\n hljs.UNDERSCORE_TITLE_MODE = {\n className: 'title',\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n };\n hljs.METHOD_GUARD = {\n // excludes method names from keyword processing\n begin: '\\\\.\\\\s*' + hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n };\n\n var constants = [\n hljs.BACKSLASH_ESCAPE,\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.PHRASAL_WORDS_MODE,\n hljs.COMMENT,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.HASH_COMMENT_MODE,\n hljs.NUMBER_MODE,\n hljs.C_NUMBER_MODE,\n hljs.BINARY_NUMBER_MODE,\n hljs.CSS_NUMBER_MODE,\n hljs.REGEXP_MODE,\n hljs.TITLE_MODE,\n hljs.UNDERSCORE_TITLE_MODE,\n hljs.METHOD_GUARD\n ]\n constants.forEach(function(obj) { deepFreeze(obj); });\n\n // https://github.com/substack/deep-freeze/blob/master/index.js\n function deepFreeze (o) {\n Object.freeze(o);\n\n var objIsFunction = typeof o === 'function';\n\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (o.hasOwnProperty(prop)\n && o[prop] !== null\n && (typeof o[prop] === \"object\" || typeof o[prop] === \"function\")\n // IE11 fix: https://github.com/highlightjs/highlight.js/issues/2318\n // TODO: remove in the future\n && (objIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true)\n && !Object.isFrozen(o[prop])) {\n deepFreeze(o[prop]);\n }\n });\n\n return o;\n };\n\n\n return hljs;\n}));\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","// Underscore.js 1.9.1\n// http://underscorejs.org\n// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` (`self`) in the browser, `global`\n // on the server, or `this` in some virtual machines. We use `self`\n // instead of `window` for `WebWorker` support.\n var root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n this ||\n {};\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype;\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n // Create quick reference variables for speed access to core prototypes.\n var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for their old module API. If we're in\n // the browser, add `_` as a global object.\n // (`nodeType` is checked to ensure that `module`\n // and `exports` are not HTML elements.)\n if (typeof exports != 'undefined' && !exports.nodeType) {\n if (typeof module != 'undefined' && !module.nodeType && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.9.1';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n var builtinIteratee;\n\n // An internal function to generate callbacks that can be applied to each\n // element in a collection, returning the desired result — either `identity`,\n // an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (_.iteratee !== builtinIteratee) return _.iteratee(value, context);\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value) && !_.isArray(value)) return _.matcher(value);\n return _.property(value);\n };\n\n // External wrapper for our callback generator. Users may customize\n // `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n // This abstraction hides the internal-only argCount argument.\n _.iteratee = builtinIteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // Some functions take a variable number of arguments, or a few expected\n // arguments at the beginning and then a variable number of values to operate\n // on. This helper accumulates all remaining arguments past the function’s\n // argument length (or an explicit `startIndex`), into an array that becomes\n // the last argument. Similar to ES6’s \"rest parameter\".\n var restArguments = function(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var shallowProperty = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n var has = function(obj, path) {\n return obj != null && hasOwnProperty.call(obj, path);\n }\n\n var deepGet = function(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object.\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = shallowProperty('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n var createReduce = function(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n };\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = restArguments(function(obj, path, args) {\n var contextPath, func;\n if (_.isFunction(path)) {\n func = path;\n } else if (_.isArray(path)) {\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return _.map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n });\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection.\n _.shuffle = function(obj) {\n return _.sample(obj, Infinity);\n };\n\n // Sample **n** random values from a collection using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = _.random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n });\n\n var reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (_.isString(obj)) {\n // Keep surrogate pair characters together\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n }, true);\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, Boolean);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, output) {\n output = output || [];\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (shallow) {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n } else {\n flatten(value, shallow, strict, output);\n idx = output.length;\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = restArguments(function(array, otherArrays) {\n return _.difference(array, otherArrays);\n });\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // The faster algorithm will not work with an iteratee if the iteratee\n // is not a one-to-one function, so providing an iteratee will disable\n // the faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = restArguments(function(arrays) {\n return _.uniq(flatten(arrays, true, true));\n });\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n });\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices.\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = restArguments(_.unzip);\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values. Passing by pairs is the reverse of _.pairs.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions.\n var createPredicateIndexFinder = function(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n };\n\n // Returns the first index on an array-like that passes a predicate test.\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions.\n var createIndexFinder = function(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n };\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Chunk a single array into multiple arrays, each containing `count` or fewer\n // items.\n _.chunk = function(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments.\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = restArguments(function(func, context, args) {\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n });\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder by default, allowing any combination of arguments to be\n // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\n _.partial = restArguments(function(func, boundArgs) {\n var placeholder = _.partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n });\n\n _.partial.placeholder = _;\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = _.bind(obj[key], obj);\n }\n });\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n });\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, result;\n\n var later = function(context, args) {\n timeout = null;\n if (args) result = func.apply(context, args);\n };\n\n var debounced = restArguments(function(args) {\n if (timeout) clearTimeout(timeout);\n if (immediate) {\n var callNow = !timeout;\n timeout = setTimeout(later, wait);\n if (callNow) result = func.apply(this, args);\n } else {\n timeout = _.delay(later, wait, this, args);\n }\n\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = null;\n };\n\n return debounced;\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n _.restArguments = restArguments;\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n var collectNonEnumProps = function(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n };\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`.\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object.\n // In contrast to _.map it returns an object.\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n // The opposite of _.object.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`.\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s).\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test.\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Internal pick helper function to determine if `obj` has key `key`.\n var keyInObj = function(value, key, obj) {\n return key in obj;\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (_.isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = _.allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n });\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = _.map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n });\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq, deepEq;\n eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n };\n\n // Internal recursive comparison function for `isEqual`.\n deepEq = function(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\n var nodelist = root.document && root.document.childNodes;\n if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`?\n _.isNaN = function(obj) {\n return _.isNumber(obj) && isNaN(obj);\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, path) {\n if (!_.isArray(path)) {\n return has(obj, path);\n }\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (obj == null || !hasOwnProperty.call(obj, key)) {\n return false;\n }\n obj = obj[key];\n }\n return !!length;\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n // Creates a function that, when passed an object, will traverse that object’s\n // properties down the given `path`, specified as an array of keys or indexes.\n _.property = function(path) {\n if (!_.isArray(path)) {\n return shallowProperty(path);\n }\n return function(obj) {\n return deepGet(obj, path);\n };\n };\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n if (obj == null) {\n return function(){};\n }\n return function(path) {\n return !_.isArray(path) ? obj[path] : deepGet(obj, path);\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // Traverses the children of `obj` along `path`. If a child is a function, it\n // is invoked with its parent as context. Returns the value of the final\n // child, or `fallback` if any child is undefined.\n _.result = function(obj, path, fallback) {\n if (!_.isArray(path)) path = [path];\n var length = path.length;\n if (!length) {\n return _.isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = _.isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var chainResult = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return chainResult(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return chainResult(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return String(this._wrapped);\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define == 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}());\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import isPlainObject from 'lodash-es/isPlainObject';\nimport $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nexport var ActionTypes = {\n INIT: '@@redux/INIT'\n};\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} enhancer The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nexport default function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/zenparsing/es-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}","import { ActionTypes } from './createStore';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './utils/warning';\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerSanity(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nexport default function combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n if (process.env.NODE_ENV !== 'production') {\n var unexpectedKeyCache = {};\n }\n\n var sanityError;\n try {\n assertReducerSanity(finalReducers);\n } catch (e) {\n sanityError = e;\n }\n\n return function combination() {\n var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n var action = arguments[1];\n\n if (sanityError) {\n throw sanityError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var i = 0; i < finalReducerKeys.length; i++) {\n var key = finalReducerKeys[i];\n var reducer = finalReducers[key];\n var previousStateForKey = state[key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(key, action);\n throw new Error(errorMessage);\n }\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}","function bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}","/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport default function compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n var last = funcs[funcs.length - 1];\n var rest = funcs.slice(0, -1);\n return function () {\n return rest.reduceRight(function (composed, f) {\n return f(composed);\n }, last.apply(undefined, arguments));\n };\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport compose from './compose';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nexport default function applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}","import createStore from './createStore';\nimport combineReducers from './combineReducers';\nimport bindActionCreators from './bindActionCreators';\nimport applyMiddleware from './applyMiddleware';\nimport compose from './compose';\nimport warning from './utils/warning';\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== 'production', warn the user.\n*/\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \\'production\\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose };","import { PropTypes } from 'react';\n\nexport default PropTypes.shape({\n subscribe: PropTypes.func.isRequired,\n dispatch: PropTypes.func.isRequired,\n getState: PropTypes.func.isRequired\n});","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport { Component, PropTypes, Children } from 'react';\nimport storeShape from '../utils/storeShape';\nimport warning from '../utils/warning';\n\nvar didWarnAboutReceivingStore = false;\nfunction warnAboutReceivingStore() {\n if (didWarnAboutReceivingStore) {\n return;\n }\n didWarnAboutReceivingStore = true;\n\n warning(' does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');\n}\n\nvar Provider = function (_Component) {\n _inherits(Provider, _Component);\n\n Provider.prototype.getChildContext = function getChildContext() {\n return { store: this.store };\n };\n\n function Provider(props, context) {\n _classCallCheck(this, Provider);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n _this.store = props.store;\n return _this;\n }\n\n Provider.prototype.render = function render() {\n return Children.only(this.props.children);\n };\n\n return Provider;\n}(Component);\n\nexport { Provider as default };\n\n\nif (process.env.NODE_ENV !== 'production') {\n Provider.prototype.componentWillReceiveProps = function (nextProps) {\n var store = this.store;\n var nextStore = nextProps.store;\n\n\n if (store !== nextStore) {\n warnAboutReceivingStore();\n }\n };\n}\n\nProvider.propTypes = {\n store: storeShape.isRequired,\n children: PropTypes.element.isRequired\n};\nProvider.childContextTypes = {\n store: storeShape.isRequired\n};\nProvider.displayName = 'Provider';","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar CLEARED = null;\nvar nullListeners = {\n notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n // the current/next pattern is copied from redux's createStore code.\n // TODO: refactor+expose that code to be reusable here?\n var current = [];\n var next = [];\n\n return {\n clear: function clear() {\n next = CLEARED;\n current = CLEARED;\n },\n notify: function notify() {\n var listeners = current = next;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n },\n subscribe: function subscribe(listener) {\n var isSubscribed = true;\n if (next === current) next = current.slice();\n next.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed || current === CLEARED) return;\n isSubscribed = false;\n\n if (next === current) next = current.slice();\n next.splice(next.indexOf(listener), 1);\n };\n }\n };\n}\n\nvar Subscription = function () {\n function Subscription(store, parentSub) {\n _classCallCheck(this, Subscription);\n\n this.store = store;\n this.parentSub = parentSub;\n this.unsubscribe = null;\n this.listeners = nullListeners;\n }\n\n Subscription.prototype.addNestedSub = function addNestedSub(listener) {\n this.trySubscribe();\n return this.listeners.subscribe(listener);\n };\n\n Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {\n this.listeners.notify();\n };\n\n Subscription.prototype.isSubscribed = function isSubscribed() {\n return Boolean(this.unsubscribe);\n };\n\n Subscription.prototype.trySubscribe = function trySubscribe() {\n if (!this.unsubscribe) {\n // this.onStateChange is set by connectAdvanced.initSubscription()\n this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n\n this.listeners = createListenerCollection();\n }\n };\n\n Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n this.listeners.clear();\n this.listeners = nullListeners;\n }\n };\n\n return Subscription;\n}();\n\nexport { Subscription as default };","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport hoistStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport { Component, PropTypes, createElement } from 'react';\n\nimport Subscription from '../utils/Subscription';\nimport storeShape from '../utils/storeShape';\n\nvar hotReloadingVersion = 0;\nexport default function connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory) {\n var _contextTypes, _childContextTypes;\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$getDisplayName = _ref.getDisplayName,\n getDisplayName = _ref$getDisplayName === undefined ? function (name) {\n return 'ConnectAdvanced(' + name + ')';\n } : _ref$getDisplayName,\n _ref$methodName = _ref.methodName,\n methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName,\n _ref$renderCountProp = _ref.renderCountProp,\n renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp,\n _ref$shouldHandleStat = _ref.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat,\n _ref$storeKey = _ref.storeKey,\n storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey,\n _ref$withRef = _ref.withRef,\n withRef = _ref$withRef === undefined ? false : _ref$withRef,\n connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']);\n\n var subscriptionKey = storeKey + 'Subscription';\n var version = hotReloadingVersion++;\n\n var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = storeShape, _contextTypes[subscriptionKey] = PropTypes.instanceOf(Subscription), _contextTypes);\n var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = PropTypes.instanceOf(Subscription), _childContextTypes);\n\n return function wrapWithConnect(WrappedComponent) {\n invariant(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + ('connect. Instead received ' + WrappedComponent));\n\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = _extends({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n withRef: withRef,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent\n });\n\n var Connect = function (_Component) {\n _inherits(Connect, _Component);\n\n function Connect(props, context) {\n _classCallCheck(this, Connect);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n _this.version = version;\n _this.state = {};\n _this.renderCount = 0;\n _this.store = _this.props[storeKey] || _this.context[storeKey];\n _this.parentSub = props[subscriptionKey] || context[subscriptionKey];\n\n _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n\n invariant(_this.store, 'Could not find \"' + storeKey + '\" in either the context or ' + ('props of \"' + displayName + '\". ') + 'Either wrap the root component in a , ' + ('or explicitly pass \"' + storeKey + '\" as a prop to \"' + displayName + '\".'));\n\n // make sure `getState` is properly bound in order to avoid breaking\n // custom store implementations that rely on the store's context\n _this.getState = _this.store.getState.bind(_this.store);\n\n _this.initSelector();\n _this.initSubscription();\n return _this;\n }\n\n Connect.prototype.getChildContext = function getChildContext() {\n var _ref2;\n\n return _ref2 = {}, _ref2[subscriptionKey] = this.subscription, _ref2;\n };\n\n Connect.prototype.componentDidMount = function componentDidMount() {\n if (!shouldHandleStateChanges) return;\n\n // componentWillMount fires during server side rendering, but componentDidMount and\n // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n // To handle the case where a child component may have triggered a state change by\n // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n // re-render.\n this.subscription.trySubscribe();\n this.selector.run(this.props);\n if (this.selector.shouldComponentUpdate) this.forceUpdate();\n };\n\n Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n this.selector.run(nextProps);\n };\n\n Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {\n return this.selector.shouldComponentUpdate;\n };\n\n Connect.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.subscription) this.subscription.tryUnsubscribe();\n // these are just to guard against extra memory leakage if a parent element doesn't\n // dereference this instance properly, such as an async callback that never finishes\n this.subscription = null;\n this.store = null;\n this.parentSub = null;\n this.selector.run = function () {};\n };\n\n Connect.prototype.getWrappedInstance = function getWrappedInstance() {\n invariant(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'));\n return this.wrappedInstance;\n };\n\n Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) {\n this.wrappedInstance = ref;\n };\n\n Connect.prototype.initSelector = function initSelector() {\n var dispatch = this.store.dispatch;\n var getState = this.getState;\n\n var sourceSelector = selectorFactory(dispatch, selectorFactoryOptions);\n\n // wrap the selector in an object that tracks its results between runs\n var selector = this.selector = {\n shouldComponentUpdate: true,\n props: sourceSelector(getState(), this.props),\n run: function runComponentSelector(props) {\n try {\n var nextProps = sourceSelector(getState(), props);\n if (selector.error || nextProps !== selector.props) {\n selector.shouldComponentUpdate = true;\n selector.props = nextProps;\n selector.error = null;\n }\n } catch (error) {\n selector.shouldComponentUpdate = true;\n selector.error = error;\n }\n }\n };\n };\n\n Connect.prototype.initSubscription = function initSubscription() {\n var _this2 = this;\n\n if (shouldHandleStateChanges) {\n (function () {\n var subscription = _this2.subscription = new Subscription(_this2.store, _this2.parentSub);\n var dummyState = {};\n\n subscription.onStateChange = function onStateChange() {\n this.selector.run(this.props);\n\n if (!this.selector.shouldComponentUpdate) {\n subscription.notifyNestedSubs();\n } else {\n this.componentDidUpdate = function componentDidUpdate() {\n this.componentDidUpdate = undefined;\n subscription.notifyNestedSubs();\n };\n\n this.setState(dummyState);\n }\n }.bind(_this2);\n })();\n }\n };\n\n Connect.prototype.isSubscribed = function isSubscribed() {\n return Boolean(this.subscription) && this.subscription.isSubscribed();\n };\n\n Connect.prototype.addExtraProps = function addExtraProps(props) {\n if (!withRef && !renderCountProp) return props;\n // make a shallow copy so that fields added don't leak to the original selector.\n // this is especially important for 'ref' since that's a reference back to the component\n // instance. a singleton memoized selector would then be holding a reference to the\n // instance, preventing the instance from being garbage collected, and that would be bad\n var withExtras = _extends({}, props);\n if (withRef) withExtras.ref = this.setWrappedInstance;\n if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n return withExtras;\n };\n\n Connect.prototype.render = function render() {\n var selector = this.selector;\n selector.shouldComponentUpdate = false;\n\n if (selector.error) {\n throw selector.error;\n } else {\n return createElement(WrappedComponent, this.addExtraProps(selector.props));\n }\n };\n\n return Connect;\n }(Component);\n\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n Connect.childContextTypes = childContextTypes;\n Connect.contextTypes = contextTypes;\n Connect.propTypes = contextTypes;\n\n if (process.env.NODE_ENV !== 'production') {\n Connect.prototype.componentWillUpdate = function componentWillUpdate() {\n // We are hot reloading!\n if (this.version !== version) {\n this.version = version;\n this.initSelector();\n\n if (this.subscription) this.subscription.tryUnsubscribe();\n this.initSubscription();\n if (shouldHandleStateChanges) this.subscription.trySubscribe();\n }\n };\n }\n\n return hoistStatics(Connect, WrappedComponent);\n };\n}","var hasOwn = Object.prototype.hasOwnProperty;\n\nexport default function shallowEqual(a, b) {\n if (a === b) return true;\n\n var countA = 0;\n var countB = 0;\n\n for (var key in a) {\n if (hasOwn.call(a, key) && a[key] !== b[key]) return false;\n countA++;\n }\n\n for (var _key in b) {\n if (hasOwn.call(b, _key)) countB++;\n }\n\n return countA === countB;\n}","import verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n}\n\n// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\nexport function getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\n\n// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n// \n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n// \n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n// \nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}","import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\n\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n return { dispatch: dispatch };\n }) : undefined;\n}\n\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n return bindActionCreators(mapDispatchToProps, dispatch);\n }) : undefined;\n}\n\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\n\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(function () {\n return {};\n }) : undefined;\n}\n\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return _extends({}, ownProps, stateProps, dispatchProps);\n}\n\nexport function wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n\n var hasRunOnce = false;\n var mergedProps = void 0;\n\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n }\n\n return mergedProps;\n };\n };\n}\n\nexport function whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\n\nexport function whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\n\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport verifySubselectors from './verifySubselectors';\n\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\n\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n\n var hasRunAtLeastOnce = false;\n var state = void 0;\n var ownProps = void 0;\n var stateProps = void 0;\n var dispatchProps = void 0;\n var mergedProps = void 0;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n}\n\n// TODO: Add more comments\n\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n\n/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n}\n\n// createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\nexport function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? defaultSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}\n\nexport default createConnect();","import Provider from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport connect from './connect/connect';\n\nexport { Provider, connectAdvanced, connect };","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;","'use strict';\n\nvar React = require('react'),\n PropTypes = require('prop-types'),\n withSideEffect = require('react-side-effect');\n\nfunction reducePropsToState(propsList) {\n var innermostProps = propsList[propsList.length - 1];\n if (innermostProps) {\n return innermostProps.title;\n }\n}\n\nfunction handleStateChangeOnClient(title) {\n var nextTitle = title || '';\n if (nextTitle !== document.title) {\n document.title = nextTitle;\n }\n}\n\nfunction DocumentTitle() {}\nDocumentTitle.prototype = Object.create(React.Component.prototype);\n\nDocumentTitle.displayName = 'DocumentTitle';\nDocumentTitle.propTypes = {\n title: PropTypes.string.isRequired\n};\n\nDocumentTitle.prototype.render = function() {\n if (this.props.children) {\n return React.Children.only(this.props.children);\n } else {\n return null;\n }\n};\n\nmodule.exports = withSideEffect(\n reducePropsToState,\n handleStateChangeOnClient\n)(DocumentTitle);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n'use strict';\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\n\nfunction reactProdInvariant(code) {\n var argCount = arguments.length - 1;\n\n var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;\n\n for (var argIdx = 0; argIdx < argCount; argIdx++) {\n message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);\n }\n\n message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';\n\n var error = new Error(message);\n error.name = 'Invariant Violation';\n error.framesToPop = 1; // we don't care about reactProdInvariant's own frame\n\n throw error;\n}\n\nmodule.exports = reactProdInvariant;","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar DOMProperty = require('./DOMProperty');\nvar ReactDOMComponentFlags = require('./ReactDOMComponentFlags');\n\nvar invariant = require('fbjs/lib/invariant');\n\nvar ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;\nvar Flags = ReactDOMComponentFlags;\n\nvar internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);\n\n/**\n * Drill down (through composites and empty components) until we get a host or\n * host text component.\n *\n * This is pretty polymorphic but unavoidable with the current structure we have\n * for `_renderedChildren`.\n */\nfunction getRenderedHostOrTextFromComponent(component) {\n var rendered;\n while (rendered = component._renderedComponent) {\n component = rendered;\n }\n return component;\n}\n\n/**\n * Populate `_hostNode` on the rendered host/text component with the given\n * DOM node. The passed `inst` can be a composite.\n */\nfunction precacheNode(inst, node) {\n var hostInst = getRenderedHostOrTextFromComponent(inst);\n hostInst._hostNode = node;\n node[internalInstanceKey] = hostInst;\n}\n\nfunction uncacheNode(inst) {\n var node = inst._hostNode;\n if (node) {\n delete node[internalInstanceKey];\n inst._hostNode = null;\n }\n}\n\n/**\n * Populate `_hostNode` on each child of `inst`, assuming that the children\n * match up with the DOM (element) children of `node`.\n *\n * We cache entire levels at once to avoid an n^2 problem where we access the\n * children of a node sequentially and have to walk from the start to our target\n * node every time.\n *\n * Since we update `_renderedChildren` and the actual DOM at (slightly)\n * different times, we could race here and see a newer `_renderedChildren` than\n * the DOM nodes we see. To avoid this, ReactMultiChild calls\n * `prepareToManageChildren` before we change `_renderedChildren`, at which\n * time the container's child nodes are always cached (until it unmounts).\n */\nfunction precacheChildNodes(inst, node) {\n if (inst._flags & Flags.hasCachedChildNodes) {\n return;\n }\n var children = inst._renderedChildren;\n var childNode = node.firstChild;\n outer: for (var name in children) {\n if (!children.hasOwnProperty(name)) {\n continue;\n }\n var childInst = children[name];\n var childID = getRenderedHostOrTextFromComponent(childInst)._domID;\n if (childID === 0) {\n // We're currently unmounting this child in ReactMultiChild; skip it.\n continue;\n }\n // We assume the child nodes are in the same order as the child instances.\n for (; childNode !== null; childNode = childNode.nextSibling) {\n if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') {\n precacheNode(childInst, childNode);\n continue outer;\n }\n }\n // We reached the end of the DOM children without finding an ID match.\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;\n }\n inst._flags |= Flags.hasCachedChildNodes;\n}\n\n/**\n * Given a DOM node, return the closest ReactDOMComponent or\n * ReactDOMTextComponent instance ancestor.\n */\nfunction getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n // Walk up the tree until we find an ancestor whose instance we have cached.\n var parents = [];\n while (!node[internalInstanceKey]) {\n parents.push(node);\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var closest;\n var inst;\n for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {\n closest = inst;\n if (parents.length) {\n precacheChildNodes(inst, node);\n }\n }\n\n return closest;\n}\n\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\nfunction getInstanceFromNode(node) {\n var inst = getClosestInstanceFromNode(node);\n if (inst != null && inst._hostNode === node) {\n return inst;\n } else {\n return null;\n }\n}\n\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\nfunction getNodeFromInstance(inst) {\n // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n\n if (inst._hostNode) {\n return inst._hostNode;\n }\n\n // Walk up the tree until we find an ancestor whose DOM node we have cached.\n var parents = [];\n while (!inst._hostNode) {\n parents.push(inst);\n !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;\n inst = inst._hostParent;\n }\n\n // Now parents contains each ancestor that does *not* have a cached native\n // node, and `inst` is the deepest ancestor that does.\n for (; parents.length; inst = parents.pop()) {\n precacheChildNodes(inst, inst._hostNode);\n }\n\n return inst._hostNode;\n}\n\nvar ReactDOMComponentTree = {\n getClosestInstanceFromNode: getClosestInstanceFromNode,\n getInstanceFromNode: getInstanceFromNode,\n getNodeFromInstance: getNodeFromInstance,\n precacheChildNodes: precacheChildNodes,\n precacheNode: precacheNode,\n uncacheNode: uncacheNode\n};\n\nmodule.exports = ReactDOMComponentTree;","'use strict';\n\nmodule.exports = require('./lib/ReactDOM');\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","'use strict';\n\nvar YAMLException = require('./exception');\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nmodule.exports = Type;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _HotKeys = require('./HotKeys');\n\nObject.defineProperty(exports, 'HotKeys', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_HotKeys).default;\n }\n});\n\nvar _FocusTrap = require('./FocusTrap');\n\nObject.defineProperty(exports, 'FocusTrap', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_FocusTrap).default;\n }\n});\n\nvar _HotKeyMapMixin = require('./HotKeyMapMixin');\n\nObject.defineProperty(exports, 'HotKeyMapMixin', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_HotKeyMapMixin).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest();\n}","//! moment.js\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return (Object.getOwnPropertyNames(obj).length === 0);\n } else {\n var k;\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n\n var regexes = {};\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1 (mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n }\n else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n\n function stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n function monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n function monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate (y) {\n var date;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays (ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays :\n this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone'];\n return (m === true) ? shiftWeekdays(weekdays, this._week.dow)\n : (m) ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n function weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n function weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n function weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n\n function computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n };\n\n // internal storage for locale config files\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, config) {\n if (config !== null) {\n var locale, parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale, tmpLocale, parentConfig = baseConfig;\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, expectedWeekday, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10)\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100, h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +(new Date());\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // FORMATTING\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal () {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween (from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff (input, units, asFloat) {\n var that,\n zoneDelta,\n output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year': output = monthDiff(this, that) / 12; break;\n case 'month': output = monthDiff(this, that); break;\n case 'quarter': output = monthDiff(this, that) / 3; break;\n case 'second': output = (this - that) / 1e3; break; // 1000\n case 'minute': output = (this - that) / 6e4; break; // 1000 * 60\n case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60\n case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst\n case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default: output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate () {\n return new Date(this.valueOf());\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2 () {\n return isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix (input) {\n return createLocal(input * 1000);\n }\n\n function createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\n var mathAbs = Math.abs;\n\n function abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month': return months;\n case 'quarter': return months / 3;\n case 'year': return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1 () {\n return createDuration(this);\n }\n\n function get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return ((x > 0) - (x < 0)) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return totalSign + 'P' +\n (Y ? ymSign + Y + 'Y' : '') +\n (M ? ymSign + M + 'M' : '') +\n (D ? daysSign + D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? hmsSign + h + 'H' : '') +\n (m ? hmsSign + m + 'M' : '') +\n (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang;\n\n // Side effect imports\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n hooks.version = '2.24.0';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM' // \n };\n\n return hooks;\n\n})));\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;","\"use strict\";\n\nexports.__esModule = true;\nexports.message = exports.accessor = exports.disabled = exports.dateFormat = exports.numberFormat = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _elementType = _interopRequireDefault(require(\"prop-types-extra/lib/elementType\"));\n\nexports.elementType = _elementType.default;\n\nvar _createChainableTypeChecker = _interopRequireDefault(require(\"prop-types-extra/lib/utils/createChainableTypeChecker\"));\n\nvar _localizers = require(\"./localizers\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar numberFormat = (0, _createChainableTypeChecker.default)(function () {\n return _localizers.number.propType.apply(_localizers.number, arguments);\n});\nexports.numberFormat = numberFormat;\nvar dateFormat = (0, _createChainableTypeChecker.default)(function () {\n return _localizers.date.propType.apply(_localizers.date, arguments);\n});\nexports.dateFormat = dateFormat;\nvar disabled = (0, _createChainableTypeChecker.default)(function () {\n return _propTypes.default.bool.apply(_propTypes.default, arguments);\n});\nexports.disabled = disabled;\ndisabled.acceptsArray = _propTypes.default.oneOfType([disabled, _propTypes.default.array]);\n\nvar accessor = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]);\n\nexports.accessor = accessor;\n\nvar message = _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string, _propTypes.default.func]);\n\nexports.message = message;","\"use strict\";\n\nexports.__esModule = true;\nexports.setNumber = setNumber;\nexports.setDate = setDate;\nexports.date = exports.number = void 0;\n\nvar _invariant = _interopRequireDefault(require(\"invariant\"));\n\nvar _ = require(\"./_\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar localePropType = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]);\n\nvar REQUIRED_NUMBER_FORMATS = ['default'];\nvar REQUIRED_DATE_FORMATS = ['default', 'date', 'time', 'header', 'footer', 'weekday', 'dayOfMonth', 'month', 'year', 'decade', 'century'];\n\nvar _numberLocalizer = createWrapper('NumberPicker');\n\nvar number = {\n propType: function propType() {\n var _numberLocalizer2;\n\n return (_numberLocalizer2 = _numberLocalizer).propType.apply(_numberLocalizer2, arguments);\n },\n getFormat: function getFormat(key, format) {\n return format || _numberLocalizer.formats[key];\n },\n parse: function parse() {\n var _numberLocalizer3;\n\n return (_numberLocalizer3 = _numberLocalizer).parse.apply(_numberLocalizer3, arguments);\n },\n format: function format() {\n var _numberLocalizer4;\n\n return (_numberLocalizer4 = _numberLocalizer).format.apply(_numberLocalizer4, arguments);\n },\n decimalChar: function decimalChar() {\n var _numberLocalizer5;\n\n return (_numberLocalizer5 = _numberLocalizer).decimalChar.apply(_numberLocalizer5, arguments);\n },\n precision: function precision() {\n var _numberLocalizer6;\n\n return (_numberLocalizer6 = _numberLocalizer).precision.apply(_numberLocalizer6, arguments);\n }\n};\nexports.number = number;\n\nfunction setNumber(_ref) {\n var format = _ref.format,\n _parse = _ref.parse,\n formats = _ref.formats,\n _ref$propType = _ref.propType,\n propType = _ref$propType === void 0 ? localePropType : _ref$propType,\n _ref$decimalChar = _ref.decimalChar,\n decimalChar = _ref$decimalChar === void 0 ? function () {\n return '.';\n } : _ref$decimalChar,\n _ref$precision = _ref.precision,\n precision = _ref$precision === void 0 ? function () {\n return null;\n } : _ref$precision;\n checkFormats(REQUIRED_NUMBER_FORMATS, formats);\n _numberLocalizer = {\n formats: formats,\n precision: precision,\n decimalChar: decimalChar,\n propType: propType,\n format: wrapFormat(format),\n parse: function parse(value, culture, format) {\n var result = _parse.call(this, value, culture, format);\n\n !(result == null || typeof result === 'number') ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'number localizer `parse(..)` must return a number, null, or undefined') : invariant(false) : void 0;\n return result;\n }\n };\n}\n\nvar _dateLocalizer = createWrapper('DateTimePicker');\n\nvar date = {\n propType: function propType() {\n var _dateLocalizer2;\n\n return (_dateLocalizer2 = _dateLocalizer).propType.apply(_dateLocalizer2, arguments);\n },\n getFormat: function getFormat(key, format) {\n return format || _dateLocalizer.formats[key];\n },\n parse: function parse() {\n var _dateLocalizer3;\n\n return (_dateLocalizer3 = _dateLocalizer).parse.apply(_dateLocalizer3, arguments);\n },\n format: function format() {\n var _dateLocalizer4;\n\n return (_dateLocalizer4 = _dateLocalizer).format.apply(_dateLocalizer4, arguments);\n },\n firstOfWeek: function firstOfWeek() {\n var _dateLocalizer5;\n\n return (_dateLocalizer5 = _dateLocalizer).firstOfWeek.apply(_dateLocalizer5, arguments);\n }\n};\nexports.date = date;\n\nfunction setDate(_ref2) {\n var formats = _ref2.formats,\n format = _ref2.format,\n _parse2 = _ref2.parse,\n firstOfWeek = _ref2.firstOfWeek,\n _ref2$propType = _ref2.propType,\n propType = _ref2$propType === void 0 ? localePropType : _ref2$propType;\n checkFormats(REQUIRED_DATE_FORMATS, formats);\n _dateLocalizer = {\n formats: formats,\n propType: propType,\n firstOfWeek: firstOfWeek,\n format: wrapFormat(format),\n parse: function parse(value, format, culture) {\n var result = _parse2.call(this, value, format, culture);\n\n !(result == null || result instanceof Date && !isNaN(result.getTime())) ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'date localizer `parse(..)` must return a valid Date, null, or undefined') : invariant(false) : void 0;\n return result;\n }\n };\n}\n\nvar wrapFormat = function wrapFormat(formatter) {\n return function (value, format, culture) {\n var result = typeof format === 'function' ? format(value, culture, this) : formatter.call(this, value, format, culture);\n !(result == null || typeof result === 'string') ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, '`localizer format(..)` must return a string, null, or undefined') : invariant(false) : void 0;\n return result;\n };\n};\n\nfunction checkFormats(required, formats) {\n if (process.env.NODE_ENV !== 'production') required.forEach(function (f) {\n return !(0, _.has)(formats, f) ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'localizer missing required format: `%s`', f) : invariant(false) : void 0;\n });\n}\n\nfunction createWrapper() {\n var dummy = {};\n\n if (process.env.NODE_ENV !== 'production') {\n ['formats', 'parse', 'format', 'firstOfWeek', 'precision', 'propType'].forEach(function (name) {\n return Object.defineProperty(dummy, name, {\n enumerable: true,\n get: function get() {\n throw new Error('[React Widgets] You are attempting to use a widget that requires localization ' + '(Calendar, DateTimePicker, NumberPicker). ' + 'However there is no localizer set. Please configure a localizer. \\n\\n' + 'see http://jquense.github.io/react-widgets/docs/#/i18n for more info.');\n }\n });\n });\n }\n\n return dummy;\n}","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n// Trust the developer to only use ReactInstrumentation with a __DEV__ check\n\nvar debugTool = null;\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactDebugTool = require('./ReactDebugTool');\n debugTool = ReactDebugTool;\n}\n\nmodule.exports = { debugTool: debugTool };","\"use strict\";\n\nexports.__esModule = true;\nexports.pick = pick;\nexports.pickElementProps = pickElementProps;\nexports.omitOwn = omitOwn;\nvar whitelist = ['style', 'className', 'role', 'id', 'autocomplete', 'size', 'tabIndex', 'maxLength', 'name'];\nvar whitelistRegex = [/^aria-/, /^data-/, /^on[A-Z]\\w+/];\n\nfunction pick(props, componentClass) {\n var keys = Object.keys(componentClass.propTypes);\n var result = {};\n Object.keys(props).forEach(function (key) {\n if (keys.indexOf(key) === -1) return;\n result[key] = props[key];\n });\n return result;\n}\n\nfunction pickElementProps(component) {\n for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n others[_key - 1] = arguments[_key];\n }\n\n var props = omitOwn.apply(void 0, [component].concat(others));\n var result = {};\n Object.keys(props).forEach(function (key) {\n if (whitelist.indexOf(key) !== -1 || whitelistRegex.some(function (r) {\n return !!key.match(r);\n })) result[key] = props[key];\n });\n return result;\n}\n\nfunction omitOwn(component) {\n var initial = Object.keys(component.constructor.propTypes);\n\n for (var _len2 = arguments.length, others = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n others[_key2 - 1] = arguments[_key2];\n }\n\n var keys = others.reduce(function (arr, compClass) {\n return arr.concat(Object.keys(compClass.propTypes));\n }, initial);\n var result = {};\n Object.keys(component.props).forEach(function (key) {\n if (keys.indexOf(key) !== -1) return;\n result[key] = component.props[key];\n });\n return result;\n}","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// This is CodeMirror (https://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n // Kludges for bugs and behavior differences that can't be feature\n // detected are enabled based on userAgent etc sniffing.\n var userAgent = navigator.userAgent;\n var platform = navigator.platform;\n\n var gecko = /gecko\\/\\d/i.test(userAgent);\n var ie_upto10 = /MSIE \\d/.test(userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n var edge = /Edge\\/(\\d+)/.exec(userAgent);\n var ie = ie_upto10 || ie_11up || edge;\n var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n var webkit = !edge && /WebKit\\//.test(userAgent);\n var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n var chrome = !edge && /Chrome\\//.test(userAgent);\n var presto = /Opera\\//.test(userAgent);\n var safari = /Apple Computer/.test(navigator.vendor);\n var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n var phantom = /PhantomJS/.test(userAgent);\n\n var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\n var android = /Android/.test(userAgent);\n // This is woefully incomplete. Suggestions for alternative methods welcome.\n var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n var mac = ios || /Mac/.test(platform);\n var chromeOS = /\\bCrOS\\b/.test(userAgent);\n var windows = /win/i.test(platform);\n\n var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n if (presto_version) { presto_version = Number(presto_version[1]); }\n if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n var captureRightClick = gecko || (ie && ie_version >= 9);\n\n function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n var rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n };\n\n function removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n }\n\n function removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n }\n\n function elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n }\n // wrapper for elt, which removes the elt from the accessibility tree\n function eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n }\n\n var range;\n if (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n }; }\n else { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r\n }; }\n\n function contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n }\n\n function activeElt() {\n // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var activeElement;\n try {\n activeElement = document.activeElement;\n } catch(e) {\n activeElement = document.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n }\n\n function addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n }\n function joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n return b\n }\n\n var selectInput = function(node) { node.select(); };\n if (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\n else if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\n function bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n }\n\n function copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n }\n\n // Counts the column offset in a string, taking tabs into account.\n // Used mostly to find indentation.\n function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n }\n\n var Delayed = function() {this.id = null;};\n Delayed.prototype.set = function (ms, f) {\n clearTimeout(this.id);\n this.id = setTimeout(f, ms);\n };\n\n function indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n }\n\n // Number of pixels added to scroller and sizer to hide scrollbar\n var scrollerGap = 30;\n\n // Returned or thrown by various protocols to signal 'I'm not\n // handling this'.\n var Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n // Reused option objects for setSelection & friends\n var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n // The inverse of countColumn -- find the offset that corresponds to\n // a particular column.\n function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }\n\n var spaceStrs = [\"\"];\n function spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + \" \"); }\n return spaceStrs[n]\n }\n\n function lst(arr) { return arr[arr.length-1] }\n\n function map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n }\n\n function insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n }\n\n function nothing() {}\n\n function createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n }\n\n var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n function isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n }\n function isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n }\n\n function isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n }\n\n // Extending unicode characters. A series of a non-extending char +\n // any number of extending chars is treated as a single unit as far\n // as editing and measuring is concerned. This is not fully correct,\n // since some scripts/fonts/browsers also treat other configurations\n // of code points as a group.\n var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\n function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n }\n\n // Returns the value from the range [`from`; `to`] that satisfies\n // `pred` and is closest to `from`. Assumes that at least `to`\n // satisfies `pred`. Supports `from` being greater than `to`.\n function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n }\n\n // BIDI HELPERS\n\n function iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, \"ltr\", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n found = true;\n }\n }\n if (!found) { f(from, to, \"ltr\"); }\n }\n\n var bidiOther = null;\n function getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == \"before\") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != \"before\") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n }\n\n // Bidirectional ordering algorithm\n // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n // that this (partially) implements.\n\n // One-char codes used for character types:\n // L (L): Left-to-Right\n // R (R): Right-to-Left\n // r (AL): Right-to-Left Arabic\n // 1 (EN): European Number\n // + (ES): European Number Separator\n // % (ET): European Number Terminator\n // n (AN): Arabic Number\n // , (CS): Common Number Separator\n // m (NSM): Non-Spacing Mark\n // b (BN): Boundary Neutral\n // s (B): Paragraph Separator\n // t (S): Segment Separator\n // w (WS): Whitespace\n // N (ON): Other Neutrals\n\n // Returns null if characters are ordered as they appear\n // (left-to-right), or an array of sections ({from, to, level}\n // objects) in the order in which they occur visually.\n var bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n else if (code == 0x200c) { return \"b\" }\n else { return \"L\" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == \"m\") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == \",\") { types[i$4] = \"N\"; }\n else if (type$3 == \"%\") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length;\n for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == \"ltr\") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == \"rtl\" ? order.reverse() : order\n }\n })();\n\n // Get the bidi ordering for the given line (and cache it). Returns\n // false for lines that are fully left-to-right, and an array of\n // BidiSpan objects otherwise.\n function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n }\n\n // EVENT HANDLING\n\n // Lightweight event framework. on/off also work on DOM nodes,\n // registering native DOM handlers.\n\n var noHandlers = [];\n\n var on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers || (emitter._handlers = {});\n map$$1[type] = (map$$1[type] || noHandlers).concat(f);\n }\n };\n\n function getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n }\n\n function off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent(\"on\" + type, f);\n } else {\n var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n }\n\n function signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n }\n\n // The DOM events that CodeMirror handles can be overridden by\n // registering a (non-DOM) handler on the editor for the event name,\n // and preventDefault-ing the event in that handler.\n function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n }\n\n function signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n }\n\n function hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n }\n\n // Add on and off methods to a constructor's prototype, to make\n // registering events on such objects more convenient.\n function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n }\n\n // Due to the fact that we still support jurassic IE versions, some\n // compatibility wrappers are needed.\n\n function e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n }\n function e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n }\n function e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n }\n function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\n function e_target(e) {return e.target || e.srcElement}\n function e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n }\n\n // Detect drag-and-drop\n var dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div\n }();\n\n var zwspSupported;\n function zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node\n }\n\n // Feature-detect IE's crummy client rect reporting for bidi text\n var badBidiRects;\n function hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n }\n\n // See if \"\".split is the broken IE version, if so, provide an\n // alternative way to split lines.\n var splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n } : function (string) { return string.split(/\\r\\n?|\\n/); };\n\n var hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n } : function (te) {\n var range$$1;\n try {range$$1 = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range$$1 || range$$1.parentElement() != te) { return false }\n return range$$1.compareEndPoints(\"StartToEnd\", range$$1) != 0\n };\n\n var hasCopyEvent = (function () {\n var e = elt(\"div\");\n if (\"oncopy\" in e) { return true }\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\"\n })();\n\n var badZoomedRects = null;\n function hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n }\n\n // Known modes, by name and by MIME\n var modes = {}, mimeModes = {};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }\n\n function defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n }\n\n // Given a MIME type, a {name, ...options} config object, or a name\n // string, return a mode config object.\n function resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\")\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\")\n }\n if (typeof spec == \"string\") { return {name: spec} }\n else { return spec || {name: \"null\"} }\n }\n\n // Given a mode spec (anything that resolveMode accepts), find and\n // initialize an actual mode object.\n function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n }\n\n // This can be used to attach properties to mode objects from\n // outside the actual mode definition.\n var modeExtensions = {};\n function extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n }\n\n function copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n }\n\n // Given a mode and a state (for that mode), find the inner mode and\n // state at the position that the state refers to.\n function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n }\n\n function startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n }\n\n // STRING STREAM\n\n // Fed to the mode parsers, provides helper functions to make\n // parsers more succinct.\n\n var StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n };\n\n StringStream.prototype.eol = function () {return this.pos >= this.string.length};\n StringStream.prototype.sol = function () {return this.pos == this.lineStart};\n StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\n StringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n };\n StringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == \"string\") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n };\n StringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n };\n StringStream.prototype.eatSpace = function () {\n var this$1 = this;\n\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }\n return this.pos > start\n };\n StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\n StringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n };\n StringStream.prototype.backUp = function (n) {this.pos -= n;};\n StringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n };\n StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\n StringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n };\n StringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n };\n StringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n };\n\n // Find the line object corresponding to the given line number.\n function getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n }\n\n // Get the part of a document between two positions, as an array of\n // strings.\n function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }\n // Get the lines between from and to, as array of strings.\n function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }\n\n // Update the height of a line, propagating the height change\n // upwards to parent nodes.\n function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }\n\n // Given a line object, find its line number by walking up through\n // its parent links.\n function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n }\n\n // Find the line at the given vertical position, using the height\n // information in the document tree.\n function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }\n\n function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\n function lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n }\n\n // A Pos instance represents a position within the text.\n function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n }\n\n // Compare two positions, return 0 if they are the same, a negative\n // number when a is less, and a positive number otherwise.\n function cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\n function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\n function copyPos(x) {return Pos(x.line, x.ch)}\n function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\n function minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n // Most of the external API clips given positions to make sure they\n // actually exist within the document.\n function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\n function clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n }\n function clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n }\n function clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n }\n\n var SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n };\n\n var Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n };\n\n Context.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n };\n\n Context.prototype.baseToken = function (n) {\n var this$1 = this;\n\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this$1.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n size: this.baseTokens[this.baseTokenPos] - n}\n };\n\n Context.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n };\n\n Context.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n };\n\n Context.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n };\n\n\n // Compute a style array (an array starting with a mode generation\n // -- for invalidation -- followed by pairs of end positions and\n // style strings), which is used to highlight the tokens on the\n // line.\n function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n }\n\n function getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n }\n\n function getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n }\n\n // Lightweight form of highlight -- proceed over this line and\n // update state, but don't save a style array. Used for lines that\n // aren't currently visible.\n function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }\n\n function callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n }\n\n function readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n }\n\n var Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n };\n\n // Utility for getTokenAt and getLineTokens\n function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n }\n\n function extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n { output[prop] += \" \" + lineClass[2]; }\n } }\n return type\n }\n\n // Run the given mode's parser over a line, calling f for each token.\n function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n }\n\n // Finds the line to start with when starting a parse. Tries to\n // find a line with a stateAfter, so that it can start with a\n // valid state. If that fails, it returns the line with the\n // smallest indentation, which tends to need the least context to\n // parse correctly.\n function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n }\n\n function retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n }\n\n // Optimize some code when these features are not used.\n var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n function seeReadOnlySpans() {\n sawReadOnlySpans = true;\n }\n\n function seeCollapsedSpans() {\n sawCollapsedSpans = true;\n }\n\n // TEXTMARKER SPANS\n\n function MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n }\n\n // Search an array of spans for a span matching the given marker.\n function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }\n // Remove a span from an array, returning undefined if no spans are\n // left (we don't store arrays for lines without spans).\n function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }\n // Add a span to a line.\n function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }\n\n // Used for the algorithm that adjusts markers for a change in the\n // document. These functions cut an array of spans at a given\n // character position, returning an array of remaining chunks (or\n // undefined if nothing remains).\n function markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n }\n function markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n }\n\n // Given a change object, compute the new set of marker spans that\n // cover the line in which the change took place. Removes spans\n // entirely within the change, reconnects spans belonging to the\n // same marker that appear on both sides of the change, and cuts off\n // spans partially within the change. Returns an array of span\n // arrays with one element for each line in (after) the change.\n function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n }\n\n // Remove spans that are empty and don't have a clearWhenEmpty\n // option of false.\n function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }\n\n // Used to 'clip' out readOnly ranges when making a change.\n function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n }\n\n // Connect or disconnect spans from a line.\n function detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n }\n function attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n }\n\n // Helpers used when computing which overlapping collapsed span\n // counts as the larger one.\n function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\n function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n // Returns a number indicating which of two overlapping collapsed\n // spans is larger (and thus includes the other). Falls back to\n // comparing ids when the spans cover exactly the same range.\n function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }\n\n // Find out whether a line ends or starts in a collapsed span. If\n // so, return the marker for that span.\n function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }\n function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\n function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n function collapsedSpanAround(line, ch) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n } }\n return found\n }\n\n // Test whether there exists a collapsed span that partially\n // overlaps (covers the start or end, but not both) of a new span.\n // Such overlap is not allowed.\n function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }\n\n // A visual line is a line as drawn on the screen. Folding, for\n // example, can cause multiple logical lines to appear on the same\n // visual line. This finds the start of the visual line that the\n // given line is part of (usually that is the line itself).\n function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }\n\n function visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n }\n\n // Returns an array of logical lines that continue the visual line\n // started by the argument, or undefined if there are no such lines.\n function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }\n\n // Get the line number of the start of the visual line that the\n // given line number is part of.\n function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }\n\n // Get the line number of the start of the next visual line after\n // the given line.\n function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n }\n\n // Compute whether a line is hidden. Lines count as hidden when they\n // are part of a visual line that starts with another line, or when\n // they are entirely covered by collapsed, non-widget span.\n function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }\n function lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n }\n\n // Find the height above the given line.\n function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }\n\n // Compute the character length of a line, taking into account\n // collapsed ranges (see markText) that might hide parts, and join\n // other lines onto it.\n function lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n }\n\n // Find the longest line in the document.\n function findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n }\n\n // LINE DATA STRUCTURE\n\n // Line objects. These hold state related to a line, including\n // highlighting info (the styles array).\n var Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n };\n\n Line.prototype.lineNo = function () { return lineNo(this) };\n eventMixin(Line);\n\n // Change the content (text, markers) of a line. Automatically\n // invalidates cached information and tries to re-estimate the\n // line's height.\n function updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n }\n\n // Detach a line from the document tree and its markers.\n function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }\n\n // Convert a style as returned by a mode (either null, or a string\n // containing one or more styles) to a CSS style. This is cached,\n // and also looks for line-wide styles.\n var styleToClassCache = {}, styleToClassCacheWithMode = {};\n function interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n }\n\n // Render the DOM representation of the text of a line. Also builds\n // up a 'line map', which points at the DOM nodes that represent\n // specific stretches of text, and is used by the measuring code.\n // The returned object contains the DOM node, this map, and\n // information about line-wide styles that were set by the mode.\n function buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n { builder.content.className = \"cm-tab-wrap-hack\"; }\n }\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n return builder\n }\n\n function defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token\n }\n\n // Build up the DOM representation for a single token, and add it to\n // the line map. Takes care to render special characters separately.\n function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt$1.setAttribute(\"role\", \"presentation\");\n txt$1.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt$1.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css) {\n var fullStyle = style || \"\";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt(\"span\", [content], fullStyle, css);\n if (attributes) {\n for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != \"style\" && attr != \"class\")\n { token.setAttribute(attr, attributes[attr]); } }\n }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n }\n\n // Change some spaces to NBSP to prevent the browser from collapsing\n // trailing spaces at the end of a line when rendering text (issue #1362).\n function splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = \"\";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = \"\\u00a0\"; }\n result += ch;\n spaceBefore = ch == \" \";\n }\n return result\n }\n\n // Work around nonsense dimensions being reported for stretches of\n // right-to-left text.\n function buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, css, attributes) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n }\n\n function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement(\"span\")); }\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n }\n\n // Outputs a number of spans to make up a line, taking highlighting\n // and marked text into account.\n function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }\n\n\n // These objects are used to represent the visible (currently drawn)\n // part of the document. A LineView may correspond to multiple\n // logical lines, if those are connected by collapsed ranges.\n function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }\n\n // Create a range of LineView objects for the given lines.\n function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }\n\n var operationGroup = null;\n\n function pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n }\n\n function fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n }\n\n function finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n }\n\n var orphanDelayedCallbacks = null;\n\n // Often, we want to signal events at a point where we are in the\n // middle of some work, but don't want the handler to start calling\n // other methods on the editor, which might be in an inconsistent\n // state or simply not expect any other events to happen.\n // signalLater looks whether there are any handlers, and schedules\n // them to be executed when the last operation ends, or, if no\n // operation is active, when a timeout fires.\n function signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n }\n\n function fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n }\n\n // When an aspect of a line changes, a string is added to\n // lineView.changes. This updates the relevant part of the line's\n // DOM structure.\n function updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") { updateLineText(cm, lineView); }\n else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == \"class\") { updateLineClasses(cm, lineView); }\n else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n }\n\n // Lines with gutter elements, widgets or a background class need to\n // be wrapped, and have the extra elements added to the wrapper div\n function ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n }\n\n function updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) { cls += \" CodeMirror-linebackground\"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n }\n\n // Wrapper around buildLineContent which will reuse the structure\n // in display.externalMeasured when possible.\n function getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n }\n\n // Redraw the line's text. Interacts with the background and text\n // classes because the mode may output tokens that influence these\n // classes.\n function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }\n\n function updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = \"\"; }\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n }\n\n function updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {\n var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n } }\n }\n }\n\n function updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (node.className == \"CodeMirror-linewidget\")\n { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n }\n\n // Build a line's DOM representation from scratch\n function buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n }\n\n // A lineView may contain multiple logical lines (when merged by\n // collapsed spans). The widgets for all of them need to be drawn.\n function insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n }\n\n function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, \"redraw\");\n }\n }\n\n function positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n }\n }\n\n function widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n if (widget.noHScroll)\n { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n }\n\n // Return true when the given mouse event happened in a widget\n function eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n }\n\n // POSITION MEASUREMENT\n\n function paddingTop(display) {return display.lineSpace.offsetTop}\n function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\n function paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\", \"CodeMirror-line-like\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n }\n\n function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\n function displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n }\n function displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n }\n\n // Ensure the lineView.wrapping.heights array is populated. This is\n // an array of bottom offsets for the lines that make up a drawn\n // line. When lineWrapping is on, there might be more than one\n // height.\n function ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n }\n\n // Find a line map (mapping character offsets to text nodes) and a\n // measurement cache for the given line number. (A line view might\n // contain multiple lines when collapsed ranges are present.)\n function mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n }\n\n // Render a line into the hidden node display.externalMeasured. Used\n // when measurement is needed for a line that's not in the viewport.\n function updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n }\n\n // Get a {top, bottom, left, right} box (in line-local coordinates)\n // for a given character.\n function measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n }\n\n // Find a line view that corresponds to the given line number.\n function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }\n\n // Measurement can be split in two steps, the set-up work that\n // applies to the whole line, and the measurement of the actual\n // character. Functions like coordsChar, that need to do a lot of\n // measurements in a row, can thus ensure that the set-up work is\n // only done once.\n function prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n }\n\n // Given a prepared measurement object, measures the position of an\n // actual character (or fetches it from the cache).\n function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n }\n\n var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n function nodeAndOffsetInLineMap(map$$1, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map$$1.length; i += 3) {\n mStart = map$$1[i];\n mEnd = map$$1[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = \"right\"; }\n }\n if (start != null) {\n node = map$$1[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n { collapse = bias; }\n if (bias == \"left\" && start == 0)\n { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) {\n node = map$$1[(i -= 3) + 2];\n collapse = \"left\";\n } }\n if (bias == \"right\" && start == mEnd - mStart)\n { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) {\n node = map$$1[(i += 3) + 2];\n collapse = \"right\";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n }\n\n function getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n }\n\n function measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = \"right\"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n }\n\n // Work around problem with bounding client rects on ranges being\n // returned incorrectly when zoomed on IE10 and below.\n function maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n }\n\n function clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n }\n\n function clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n }\n\n function clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n }\n\n function pageScrollX() {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }\n return window.pageXOffset || (document.documentElement || document.body).scrollLeft\n }\n function pageScrollY() {\n if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }\n return window.pageYOffset || (document.documentElement || document.body).scrollTop\n }\n\n function widgetTopHeight(lineObj) {\n var height = 0;\n if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)\n { height += widgetHeight(lineObj.widgets[i]); } } }\n return height\n }\n\n // Converts a {top, bottom, left, right} box from line-local\n // coordinates into another coordinate system. Context may be one of\n // \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n // or \"page\".\n function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == \"line\") { return rect }\n if (!context) { context = \"local\"; }\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n }\n\n // Coverts a box from \"div\" coords to another coordinate system.\n // Context may be \"window\", \"page\", \"div\", or \"local\"./null.\n function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }\n\n function charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n }\n\n // Returns a box for a given cursor position, which may have an\n // 'other' property containing the position of the secondary cursor\n // on a bidi boundary.\n // A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n // and after `char - 1` in writing order of `char - 1`\n // A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n // and before `char` in writing order of `char`\n // Examples (upper-case letters are RTL, lower-case are LTR):\n // Pos(0, 1, ...)\n // before after\n // ab a|b a|b\n // aB a|B aB|\n // Ab |Ab A|b\n // AB B|A B|A\n // Every position after the last character on a line is considered to stick\n // to the last character on the line.\n function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = \"before\";\n } else if (ch <= 0) {\n ch = 0;\n sticky = \"after\";\n }\n if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == \"before\");\n if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n return val\n }\n\n // Used to cheaply estimate the coordinates for a position. Used for\n // intermediate scroll updates.\n function estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n }\n\n // Positions returned by coordsChar contain some extra information.\n // xRel is the relative x position of the input coordinates compared\n // to the found position (so xRel > 0 means the coordinates are to\n // the right of the character position, for example). When outside\n // is true, that means the coordinates lie outside the line's\n // vertical range.\n function PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = outside; }\n return pos\n }\n\n // Compute the character position closest to the given coordinates.\n // Input must be lineSpace-local (\"div\" coordinate system).\n function coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));\n if (!collapsed) { return found }\n var rangeEnd = collapsed.find(1);\n if (rangeEnd.line == lineN) { return rangeEnd }\n lineObj = getLine(doc, lineN = rangeEnd.line);\n }\n }\n\n function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n }\n\n function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n }\n\n // Returns true if the given side of a box is after the given\n // coordinates, in top-to-bottom, left-to-right order.\n function boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n }\n\n function coordsCharInner(cm, lineObj, lineNo$$1, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight$$1 = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn't plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo$$1, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part's range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight$$1; box.bottom += widgetHeight$$1;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? \"after\" : \"before\";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it's vertical position to the\n // coordinates\n sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight$$1 <= y) == ltr ?\n \"after\" : \"before\";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), \"line\", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo$$1, ch, sticky, outside, x - baseX)\n }\n\n function coordsBidiPart(cm, lineObj, lineNo$$1, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo$$1, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n \"line\", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn't the first part, the part's start is also after\n // the coordinates, and the coordinates aren't on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo$$1, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n \"line\", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n }\n\n function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don't correspond to the ordering in our `order` array at\n // all, so a binary search doesn't work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren't on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n }\n\n var measureText;\n // Compute the default text height.\n function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }\n\n // Compute the default character width.\n function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }\n\n // Do a bulk-read of the DOM positions and sizes needed to draw the\n // view, so that we don't interleave reading and writing to the DOM.\n function getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n var id = cm.display.gutterSpecs[i].className;\n left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[id] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n }\n\n // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n // but using getBoundingClientRect to get a sub-pixel-accurate\n // result.\n function compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n }\n\n // Returns a function that estimates the height of a line, to use as\n // first approximation until the line becomes visible (and is thus\n // properly measurable).\n function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }\n\n function estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n }\n\n // Given a mouse event, find the corresponding position. If liberal\n // is false, it checks whether a gutter or scrollbar was clicked,\n // and returns null if it was. forRect is used by rectangular\n // selections, and tries to estimate a character position even for\n // coordinates beyond the right of the text.\n function posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n }\n\n // Find the view element corresponding to a given line. Return null\n // when the line isn't visible.\n function findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n }\n\n // Updates the display.view data structure for a given change to the\n // document. From and to are in pre-change coordinates. Lendiff is\n // the amount of lines added or subtracted by the change. This is\n // used for changes that span multiple lines, or change the way\n // lines are divided into visual lines. regLineChange (below)\n // registers single-line changes.\n function regChange(cm, from, to, lendiff) {\n if (from == null) { from = cm.doc.first; }\n if (to == null) { to = cm.doc.first + cm.doc.size; }\n if (!lendiff) { lendiff = 0; }\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n { display.updateLineNumbers = from; }\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n { resetView(cm); }\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut$1 = viewCuttingPoint(cm, from, from, -1);\n if (cut$1) {\n display.view = display.view.slice(0, cut$1.index);\n display.viewTo = cut$1.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n { ext.lineN += lendiff; }\n else if (from < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n }\n }\n\n // Register a change to a single line. Type must be one of \"text\",\n // \"gutter\", \"class\", \"widget\"\n function regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n\n if (line < display.viewFrom || line >= display.viewTo) { return }\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) { return }\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) { arr.push(type); }\n }\n\n // Clear the view.\n function resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n }\n\n function viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n { return {index: index, lineN: newN} }\n var n = cm.display.viewFrom;\n for (var i = 0; i < index; i++)\n { n += view[i].size; }\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) { return null }\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN}\n }\n\n // Force the view to cover a given range, adding empty view element\n // or clipping off existing ones as needed.\n function adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n else if (display.viewFrom < from)\n { display.view = display.view.slice(findViewIndex(cm, from)); }\n display.viewFrom = from;\n if (display.viewTo < to)\n { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n else if (display.viewTo > to)\n { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n }\n display.viewTo = to;\n }\n\n // Count the number of lines in the view whose DOM representation is\n // out of date (or nonexistent).\n function countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n }\n return dirty\n }\n\n function updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n }\n\n function prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range$$1 = doc.sel.ranges[i];\n if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue }\n var collapsed = range$$1.empty();\n if (collapsed || cm.options.showCursorWhenSelecting)\n { drawSelectionCursor(cm, range$$1.head, curFragment); }\n if (!collapsed)\n { drawSelectionRange(cm, range$$1, selFragment); }\n }\n return result\n }\n\n // Draws a cursor for the given range\n function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }\n\n function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n // Draws the given range as a highlighted selection\n function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }\n\n // Cursor-blinking\n function restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\"; },\n cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = \"hidden\"; }\n }\n\n function ensureFocus(cm) {\n if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n }\n\n function delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n onBlur(cm);\n } }, 100);\n }\n\n function onFocus(cm, e) {\n if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == \"nocursor\") { return }\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n }\n function onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n }\n\n // Read the actual heights of the rendered lines, and update their\n // stored heights to match.\n function updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], wrapping = cm.options.lineWrapping;\n var height = (void 0), width = 0;\n if (cur.hidden) { continue }\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n // Check that lines don't extend past the right of the current\n // editor width\n if (!wrapping && cur.text.firstChild)\n { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }\n }\n var diff = cur.line.height - height;\n if (diff > .005 || diff < -.005) {\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n if (width > cm.display.sizerWidth) {\n var chWidth = Math.ceil(width / charWidth(cm.display));\n if (chWidth > cm.display.maxLineLength) {\n cm.display.maxLineLength = chWidth;\n cm.display.maxLine = cur.line;\n cm.display.maxLineChanged = true;\n }\n }\n }\n }\n\n // Read and store the height of line widgets associated with the\n // given line.\n function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }\n\n // Compute the lines that are visible in a given viewport (defaults\n // the the current scroll position). viewport may contain top,\n // height, and ensure (see op.scrollToPos) properties.\n function visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n }\n\n // SCROLLING THINGS INTO VIEW\n\n // If an editor sits on the top or bottom of the window, partially\n // scrolled out of view, this ensures that the cursor is visible.\n function maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n }\n\n // Scroll a given position into view (immediately), verifying that\n // it actually became visible (as line heights are accurately\n // measured, the position of something may 'drift' during drawing).\n function scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n }\n\n // Scroll a given set of coordinates into view (immediately).\n function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }\n\n // Calculate a new scroll position needed to scroll the given\n // rectangle into view. Returns an object with scrollTop and\n // scrollLeft properties. When these are undefined, the\n // vertical/horizontal position does not need to be adjusted.\n function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }\n\n // Store a relative adjustment to the scroll position in the current\n // operation (to be applied when the operation finishes).\n function addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n }\n\n // Make sure that at the end of the operation the current cursor is\n // shown.\n function ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n }\n\n function scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n }\n\n function scrollToRange(cm, range$$1) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range$$1;\n }\n\n // When an operation has its scrollToPos property set, and another\n // scroll action is applied before the end of the operation, this\n // 'simulates' scrolling that position into view in a cheap way, so\n // that the effect of intermediate scroll commands is not ignored.\n function resolveScrollToPos(cm) {\n var range$$1 = cm.curOp.scrollToPos;\n if (range$$1) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }\n\n function scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n }\n\n // Sync the scrollable area and scrollbars, ensure the viewport\n // covers the visible area.\n function updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n }\n\n function setScrollTop(cm, val, forceScroll) {\n val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val);\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n }\n\n // Sync scroller and scrollbar, ensure the gutter elements are\n // aligned.\n function setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n }\n\n // SCROLLBARS\n\n // Prepare DOM reads needed to update the scrollbars. Done in one\n // shot to minimize update/measure roundtrips.\n function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }\n\n var NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n vert.tabIndex = horiz.tabIndex = -1;\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n });\n on(horiz, \"scroll\", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n };\n\n NativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n };\n\n NativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n };\n\n NativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n };\n\n NativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n };\n\n NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.pointerEvents = \"auto\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt$$1 = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt$$1 != bar) { bar.style.pointerEvents = \"none\"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n };\n\n NativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n };\n\n var NullScrollbars = function () {};\n\n NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\n NullScrollbars.prototype.setScrollLeft = function () {};\n NullScrollbars.prototype.setScrollTop = function () {};\n NullScrollbars.prototype.clear = function () {};\n\n function updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n }\n\n // Re-synchronize the fake scrollbars with the actual size of the\n // content.\n function updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else { d.scrollbarFiller.style.display = \"\"; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else { d.gutterFiller.style.display = \"\"; }\n }\n\n var scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n function initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function (pos, axis) {\n if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n // Operations are used to wrap a series of changes to the editor\n // state in such a way that each change won't have to update the\n // cursor and display (which would be awkward, slow, and\n // error-prone). Instead, display updates are batched and then all\n // combined and executed at once.\n\n var nextOpId = 0;\n // Start a new operation.\n function startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: 0, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId // Unique ID\n };\n pushOperation(cm.curOp);\n }\n\n // Finish an operation, updating the display and signalling delayed events\n function endOperation(cm) {\n var op = cm.curOp;\n if (op) { finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n }); }\n }\n\n // The DOM updates done when an operation finishes are batched so\n // that the minimum number of relayouts are required.\n function endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n }\n\n function endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n }\n\n function endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n }\n\n function endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n { op.preparedSelection = display.input.prepareSelection(); }\n }\n\n function endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n cm.display.maxLineChanged = false;\n }\n\n var takeFocus = op.focus && op.focus == activeElt();\n if (op.preparedSelection)\n { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n { updateScrollbars(cm, op.barMeasure); }\n if (op.updatedDisplay)\n { setDocumentHeight(cm, op.barMeasure); }\n\n if (op.selectionChanged) { restartBlink(cm); }\n\n if (cm.state.focused && op.updateInput)\n { cm.display.input.reset(op.typing); }\n if (takeFocus) { ensureFocus(op.cm); }\n }\n\n function endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n { display.wheelStartX = display.wheelStartY = null; }\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n maybeScrollWindow(cm, rect);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) { for (var i = 0; i < hidden.length; ++i)\n { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n if (display.wrapper.offsetHeight)\n { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n { signal(cm, \"changes\", cm, op.changeObjs); }\n if (op.update)\n { op.update.finish(); }\n }\n\n // Run the given function in an operation\n function runInOp(cm, f) {\n if (cm.curOp) { return f() }\n startOperation(cm);\n try { return f() }\n finally { endOperation(cm); }\n }\n // Wraps a function in an operation. Returns the wrapped function.\n function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }\n // Used to add methods to editor and doc instances, wrapping them in\n // operations.\n function methodOp(f) {\n return function() {\n if (this.curOp) { return f.apply(this, arguments) }\n startOperation(this);\n try { return f.apply(this, arguments) }\n finally { endOperation(this); }\n }\n }\n function docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) { return f.apply(this, arguments) }\n startOperation(cm);\n try { return f.apply(this, arguments) }\n finally { endOperation(cm); }\n }\n }\n\n // HIGHLIGHT WORKER\n\n function startWorker(cm, time) {\n if (cm.doc.highlightFrontier < cm.display.viewTo)\n { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n }\n\n function highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.highlightFrontier >= cm.display.viewTo) { return }\n var end = +new Date + cm.options.workTime;\n var context = getContextBefore(cm, doc.highlightFrontier);\n var changedLines = [];\n\n doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n if (context.line >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles;\n var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n var highlighted = highlightLine(cm, line, context, true);\n if (resetState) { context.state = resetState; }\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) { line.styleClasses = newCls; }\n else if (oldCls) { line.styleClasses = null; }\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n if (ischange) { changedLines.push(context.line); }\n line.stateAfter = context.save();\n context.nextLine();\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n { processLine(cm, line.text, context); }\n line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n context.nextLine();\n }\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true\n }\n });\n doc.highlightFrontier = context.line;\n doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n if (changedLines.length) { runInOp(cm, function () {\n for (var i = 0; i < changedLines.length; i++)\n { regLineChange(cm, changedLines[i], \"text\"); }\n }); }\n }\n\n // DISPLAY DRAWING\n\n var DisplayUpdate = function(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we'll need later (but don't want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n };\n\n DisplayUpdate.prototype.signal = function (emitter, type) {\n if (hasHandler(emitter, type))\n { this.events.push(arguments); }\n };\n DisplayUpdate.prototype.finish = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.events.length; i++)\n { signal.apply(null, this$1.events[i]); }\n };\n\n function maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + \"px\";\n display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n display.scrollbarsClipped = true;\n }\n }\n\n function selectionSnapshot(cm) {\n if (cm.hasFocus()) { return null }\n var active = activeElt();\n if (!active || !contains(cm.display.lineDiv, active)) { return null }\n var result = {activeElt: active};\n if (window.getSelection) {\n var sel = window.getSelection();\n if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n result.anchorNode = sel.anchorNode;\n result.anchorOffset = sel.anchorOffset;\n result.focusNode = sel.focusNode;\n result.focusOffset = sel.focusOffset;\n }\n }\n return result\n }\n\n function restoreSelection(snapshot) {\n if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }\n snapshot.activeElt.focus();\n if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n var sel = window.getSelection(), range$$1 = document.createRange();\n range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n range$$1.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range$$1);\n sel.extend(snapshot.focusNode, snapshot.focusOffset);\n }\n }\n\n // Does the actual updating of the line display. Bails out\n // (returning false) when there is nothing to be done and forced is\n // false.\n function updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n { return false }\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + \"px\";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n { return false }\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var selSnapshot = selectionSnapshot(cm);\n if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n restoreSelection(selSnapshot);\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true\n }\n\n function postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n { break }\n }\n if (!updateDisplayIfNeeded(cm, update)) { break }\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.force = false;\n }\n\n update.signal(cm, \"update\", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n }\n\n function updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n }\n\n // Sync the actual display DOM structure with display.view, removing\n // nodes for lines that are no longer in view, and creating the ones\n // that are not there yet, and updating the ones that are out of\n // date.\n function patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n { node.style.display = \"none\"; }\n else\n { node.parentNode.removeChild(node); }\n return next\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) { cur = rm(cur); }\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) { cur = rm(cur); }\n }\n\n function updateGutterSpace(display) {\n var width = display.gutters.offsetWidth;\n display.sizer.style.marginLeft = width + \"px\";\n }\n\n function setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n }\n\n // Re-align line numbers and gutter marks to compensate for\n // horizontal scrolling.\n function alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n }\n\n // Used to ensure that the line number gutter is still the right\n // size for the current document size. Returns true when an update\n // is needed.\n function maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm.display);\n return true\n }\n return false\n }\n\n function getGutters(gutters, lineNumbers) {\n var result = [], sawLineNumbers = false;\n for (var i = 0; i < gutters.length; i++) {\n var name = gutters[i], style = null;\n if (typeof name != \"string\") { style = name.style; name = name.className; }\n if (name == \"CodeMirror-linenumbers\") {\n if (!lineNumbers) { continue }\n else { sawLineNumbers = true; }\n }\n result.push({className: name, style: style});\n }\n if (lineNumbers && !sawLineNumbers) { result.push({className: \"CodeMirror-linenumbers\", style: null}); }\n return result\n }\n\n // Rebuild the gutter elements, ensure the margin to the left of the\n // code matches their width.\n function renderGutters(display) {\n var gutters = display.gutters, specs = display.gutterSpecs;\n removeChildren(gutters);\n display.lineGutter = null;\n for (var i = 0; i < specs.length; ++i) {\n var ref = specs[i];\n var className = ref.className;\n var style = ref.style;\n var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + className));\n if (style) { gElt.style.cssText = style; }\n if (className == \"CodeMirror-linenumbers\") {\n display.lineGutter = gElt;\n gElt.style.width = (display.lineNumWidth || 1) + \"px\";\n }\n }\n gutters.style.display = specs.length ? \"\" : \"none\";\n updateGutterSpace(display);\n }\n\n function updateGutters(cm) {\n renderGutters(cm.display);\n regChange(cm);\n alignHorizontally(cm);\n }\n\n // The display handles the DOM integration, both for input reading\n // and content drawing. It holds references to DOM nodes and\n // display-related state.\n\n function Display(place, doc, input, options) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [lines], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);\n renderGutters(d);\n\n input.init(d);\n }\n\n // Since the delta values reported on mouse wheel events are\n // unstandardized between browsers and even browser versions, and\n // generally horribly unpredictable, this code starts by measuring\n // the scroll effect that the first few mouse wheel events have,\n // and, from that, detects the way it can convert deltas to pixel\n // offsets afterwards.\n //\n // The reason we want to know the amount a wheel event will scroll\n // is that it gives us a chance to update the display before the\n // actual scrolling happens, reducing flickering.\n\n var wheelSamples = 0, wheelPixelsPerUnit = null;\n // Fill in a browser-detected starting value on browsers where we\n // know one. These don't have to be accurate -- the result of them\n // being wrong would just be a slight flicker on the first wheel\n // scroll (if it is large enough).\n if (ie) { wheelPixelsPerUnit = -.53; }\n else if (gecko) { wheelPixelsPerUnit = 15; }\n else if (chrome) { wheelPixelsPerUnit = -.7; }\n else if (safari) { wheelPixelsPerUnit = -1/3; }\n\n function wheelEventDelta(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n else if (dy == null) { dy = e.wheelDelta; }\n return {x: dx, y: dy}\n }\n function wheelEventPixels(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta\n }\n\n function onScrollWheel(cm, e) {\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there's nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It'll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n if (dy && canScrollY)\n { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }\n setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n { e_preventDefault(e); }\n display.wheelStartX = null; // Abort measurement, if in progress\n return\n }\n\n // 'Project' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && wheelPixelsPerUnit != null) {\n var pixels = dy * wheelPixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function () {\n if (display.wheelStartX == null) { return }\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) { return }\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n }\n\n // Selection objects are immutable. A new one is created every time\n // the selection changes. A selection is one or more non-overlapping\n // (and non-touching) ranges, sorted, and an integer that indicates\n // which one is the primary selection (the one that's scrolled into\n // view, that getCursor returns, etc).\n var Selection = function(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n };\n\n Selection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\n Selection.prototype.equals = function (other) {\n var this$1 = this;\n\n if (other == this) { return true }\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this$1.ranges[i], there = other.ranges[i];\n if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n }\n return true\n };\n\n Selection.prototype.deepCopy = function () {\n var this$1 = this;\n\n var out = [];\n for (var i = 0; i < this.ranges.length; i++)\n { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)); }\n return new Selection(out, this.primIndex)\n };\n\n Selection.prototype.somethingSelected = function () {\n var this$1 = this;\n\n for (var i = 0; i < this.ranges.length; i++)\n { if (!this$1.ranges[i].empty()) { return true } }\n return false\n };\n\n Selection.prototype.contains = function (pos, end) {\n var this$1 = this;\n\n if (!end) { end = pos; }\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this$1.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n { return i }\n }\n return -1\n };\n\n var Range = function(anchor, head) {\n this.anchor = anchor; this.head = head;\n };\n\n Range.prototype.from = function () { return minPos(this.anchor, this.head) };\n Range.prototype.to = function () { return maxPos(this.anchor, this.head) };\n Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n // Take an unsorted, potentially overlapping set of ranges, and\n // build a selection out of it. 'Consumes' ranges array (modifying\n // it).\n function normalizeSelection(cm, ranges, primIndex) {\n var mayTouch = cm && cm.options.selectionsMayTouch;\n var prim = ranges[primIndex];\n ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n var diff = cmp(prev.to(), cur.from());\n if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) { --primIndex; }\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex)\n }\n\n function simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0)\n }\n\n // Compute the position of the end of a change (its 'to' property\n // refers to the pre-change end).\n function changeEnd(change) {\n if (!change.text) { return change.to }\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n }\n\n // Adjust a position to refer to the post-change position of the\n // same text, or the end of the change if the change covers it.\n function adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) { return pos }\n if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n return Pos(line, ch)\n }\n\n function computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(doc.cm, out, doc.sel.primIndex)\n }\n\n function offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n else\n { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n }\n\n // Used by replaceSelections to allow moving the selection to the\n // start or around the replaced test. Hint may be \"start\" or \"around\".\n function computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == \"around\") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex)\n }\n\n // Used to get the editor into a consistent state again when options change.\n\n function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }\n\n function resetModeState(cm) {\n cm.doc.iter(function (line) {\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n });\n cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) { regChange(cm); }\n }\n\n // DOCUMENT DATA STRUCTURE\n\n // By default, updates that start and end at the beginning of a line\n // are treated specially, in order to make the association of line\n // widgets and marker elements with the text behave more intuitive.\n function isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n }\n\n // Perform a change on the document data structure.\n function updateDoc(doc, change, markedSpans, estimateHeight$$1) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight$$1);\n signalLater(line, \"change\", line, change);\n }\n function linesFor(start, end) {\n var result = [];\n for (var i = start; i < end; ++i)\n { result.push(new Line(text[i], spansFor(i), estimateHeight$$1)); }\n return result\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) { doc.remove(from.line, nlines); }\n if (added.length) { doc.insert(from.line, added); }\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added$1 = linesFor(1, text.length - 1);\n added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight$$1));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added$1);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added$2 = linesFor(1, text.length - 1);\n if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n doc.insert(from.line + 1, added$2);\n }\n\n signalLater(doc, \"change\", doc, change);\n }\n\n // Call f for all linked documents.\n function linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) { continue }\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) { continue }\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n } }\n }\n propagate(doc, null, true);\n }\n\n // Attach a document to an editor.\n function attachDoc(cm, doc) {\n if (doc.cm) { throw new Error(\"This document is already in use.\") }\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n setDirectionClass(cm);\n if (!cm.options.lineWrapping) { findMaxLine(cm); }\n cm.options.mode = doc.modeOption;\n regChange(cm);\n }\n\n function setDirectionClass(cm) {\n (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n }\n\n function directionChanged(cm) {\n runInOp(cm, function () {\n setDirectionClass(cm);\n regChange(cm);\n });\n }\n\n function History(startGen) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = startGen || 1;\n }\n\n // Create a history change event from an updateDoc-style change\n // object.\n function historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n return histChange\n }\n\n // Pop all selection events off the end of a history array. Stop at\n // a change event.\n function clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) { array.pop(); }\n else { break }\n }\n }\n\n // Find the top change event in the history. Pop off selection\n // events that are in the way.\n function lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done)\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done)\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done)\n }\n }\n\n // Register a change in the history. Merges changes that are within\n // a single operation, or are close together with an origin that\n // allows merging (starting with \"+\") into a single event.\n function addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n var last;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n change.origin.charAt(0) == \"*\")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don't want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n { pushSelectionToHistory(doc.sel, hist.done); }\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) { hist.done.shift(); }\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) { signal(doc, \"historyAdded\"); }\n }\n\n function selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == \"*\" ||\n ch == \"+\" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n }\n\n // Called whenever the selection changes, sets the new selection as\n // the pending selection in the history, and pushes the old pending\n // selection into the 'done' array when it was significantly\n // different (in number of selected ranges, emptiness, or time).\n function addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don't allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n { hist.done[hist.done.length - 1] = sel; }\n else\n { pushSelectionToHistory(sel, hist.done); }\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n { clearSelectionEvents(hist.undone); }\n }\n\n function pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n { dest.push(sel); }\n }\n\n // Used to store marked span information in the history.\n function attachLocalSpans(doc, change, from, to) {\n var existing = change[\"spans_\" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n if (line.markedSpans)\n { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n ++n;\n });\n }\n\n // When un/re-doing restores text containing marked spans, those\n // that have been explicitly cleared should not be restored.\n function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }\n\n // Retrieve and filter the old marked spans stored in a change event.\n function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }\n\n // Used for un/re-doing changes from the history. Combines the\n // result of computing the existing spans with the set of spans that\n // existed in the history (so that deleting around a span and then\n // undoing brings back the span).\n function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }\n\n // Used both to provide a JSON-safe object in .getHistory, and, when\n // detaching a document, to split the history in two\n function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }\n\n // The 'scroll' parameter given to many of these indicated whether\n // the new cursor position should be scrolled into view after\n // modifying the selection.\n\n // If shift is held or the extend flag is set, extends a range to\n // include a given position (and optionally a second position).\n // Otherwise, simply returns the range between the given positions.\n // Used for cursor motion and such.\n function extendRange(range, head, other, extend) {\n if (extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head)\n } else {\n return new Range(other || head, head)\n }\n }\n\n // Extend the primary selection range, discard the rest.\n function extendSelection(doc, head, other, options, extend) {\n if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n }\n\n // Extend all selections (pos is an array of selections with length\n // equal the number of selections)\n function extendSelections(doc, heads, options) {\n var out = [];\n var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n for (var i = 0; i < doc.sel.ranges.length; i++)\n { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n }\n\n // Updates a single range in the selection.\n function replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);\n }\n\n // Reset the selection to a single range.\n function setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n }\n\n // Give beforeSelectionChange handlers a change to influence a\n // selection update.\n function filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n var this$1 = this;\n\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head)); }\n },\n origin: options && options.origin\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }\n else { return sel }\n }\n\n function setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n }\n\n // Set a new selection.\n function setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n }\n\n function setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n { sel = filterSelectionChange(doc, sel, options); }\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm)\n { ensureCursorVisible(doc.cm); }\n }\n\n function setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) { return }\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = 1;\n doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, \"cursorActivity\", doc);\n }\n\n // Verify that the selection does not partially select any atomic\n // marked ranges.\n function reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n }\n\n // Return a selection that does not partially select any atomic\n // ranges.\n function skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) { out = sel.ranges.slice(0, i); }\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel\n }\n\n function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n\n // Determine if we should prevent the cursor being placed to the left/right of an atomic marker\n // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it\n // is with selectLeft/Right\n var preventCursorLeft = (\"selectLeft\" in m) ? !m.selectLeft : m.inclusiveLeft;\n var preventCursorRight = (\"selectRight\" in m) ? !m.selectRight : m.inclusiveRight;\n\n if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, \"beforeCursorEnter\");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) { break }\n else {--i; continue}\n }\n }\n if (!m.atomic) { continue }\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n if (dir < 0 ? preventCursorRight : preventCursorLeft)\n { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? preventCursorLeft : preventCursorRight)\n { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n }\n } }\n return pos\n }\n\n // Ensure a given position is not inside an atomic range.\n function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0)\n }\n return found\n }\n\n function movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n else { return null }\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n else { return null }\n } else {\n return new Pos(pos.line, pos.ch + dir)\n }\n }\n\n function selectAll(cm) {\n cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n }\n\n // UPDATING\n\n // Allow \"beforeChange\" event handlers to influence a change\n function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () { return obj.canceled = true; }\n };\n if (update) { obj.update = function (from, to, text, origin) {\n if (from) { obj.from = clipPos(doc, from); }\n if (to) { obj.to = clipPos(doc, to); }\n if (text) { obj.text = text; }\n if (origin !== undefined) { obj.origin = origin; }\n }; }\n signal(doc, \"beforeChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n if (obj.canceled) {\n if (doc.cm) { doc.cm.curOp.updateInput = 2; }\n return null\n }\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n }\n\n // Apply a change to a document, and add it to the document's\n // history, and propagating it to all linked documents.\n function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }\n\n function makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n }\n\n // Revert a change stored in a document's history.\n function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n var suppress = doc.cm && doc.cm.state.suppressEdits;\n if (suppress && !allowSelectionOnly) { return }\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won't\n // needlessly clear selection events)\n var i = 0;\n for (; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n { break }\n }\n if (i == source.length) { return }\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return\n }\n selAfter = event;\n } else if (suppress) {\n source.push(event);\n return\n } else { break }\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n var loop = function ( i ) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return {}\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n };\n\n for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n var returned = loop( i$1 );\n\n if ( returned ) return returned.v;\n }\n }\n\n // Sub-views need their line numbers shifted when text is added\n // above or below them in the parent document.\n function shiftDoc(doc, distance) {\n if (distance == 0) { return }\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch)\n ); }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n { regLineChange(doc.cm, l, \"gutter\"); }\n }\n }\n\n // More lower-level change function, handling only a single document\n // (not linked ones).\n function makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return\n }\n if (change.from.line > doc.lastLine()) { return }\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n else { updateDoc(doc, change, spans); }\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n\n if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))\n { doc.cantEdit = false; }\n }\n\n // Handle the interaction of a change to a document with the editor\n // that this document is part of.\n function makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function (line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n { signalCursorActivity(cm); }\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n }\n\n retreatFrontier(doc, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n { regChange(cm); }\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n { regLineChange(cm, from.line, \"text\"); }\n else\n { regChange(cm, from.line, to.line + 1, lendiff); }\n\n var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n }\n cm.display.selForContextMenu = null;\n }\n\n function replaceRange(doc, code, from, to, origin) {\n var assign;\n\n if (!to) { to = from; }\n if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }\n if (typeof code == \"string\") { code = doc.splitLines(code); }\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n }\n\n // Rebasing/resetting history to deal with externally-sourced changes\n\n function rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n }\n\n // Tries to rebase an array of history events given a change in the\n // document. If the change touches the same lines as the event, the\n // event, and everything 'behind' it, is discarded. If the change is\n // before the event, the event's positions are updated. Uses a\n // copy-on-write scheme for the positions, to avoid having to\n // reallocate them all on every rebase, but also avoid problems with\n // shared position objects being unsafely updated.\n function rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue\n }\n for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n var cur = sub.changes[j$1];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n }\n\n function rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n }\n\n // Utility for applying a change to a line by handle or number,\n // returning the number and optionally registering the line as\n // changed.\n function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }\n\n // The document is represented as a BTree consisting of leaves, with\n // chunk of lines in them, and branches, with up to ten leaves or\n // other branch nodes below them. The top node is always a branch\n // node, and is the document object itself (meaning it has\n // additional methods and properties).\n //\n // All nodes have parent links. The tree is used both to go from\n // line numbers to line objects, and to go from objects to numbers.\n // It also indexes by height, and is used to convert between height\n // and line object, and to find the total height of the document.\n //\n // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n function LeafChunk(lines) {\n var this$1 = this;\n\n this.lines = lines;\n this.parent = null;\n var height = 0;\n for (var i = 0; i < lines.length; ++i) {\n lines[i].parent = this$1;\n height += lines[i].height;\n }\n this.height = height;\n }\n\n LeafChunk.prototype = {\n chunkSize: function() { return this.lines.length },\n\n // Remove the n lines at offset 'at'.\n removeInner: function(at, n) {\n var this$1 = this;\n\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this$1.lines[i];\n this$1.height -= line.height;\n cleanUpLine(line);\n signalLater(line, \"delete\");\n }\n this.lines.splice(at, n);\n },\n\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n\n // Insert the given array of lines at offset 'at', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1; }\n },\n\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var e = at + n; at < e; ++at)\n { if (op(this$1.lines[at])) { return true } }\n }\n };\n\n function BranchChunk(children) {\n var this$1 = this;\n\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this$1;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n }\n\n BranchChunk.prototype = {\n chunkSize: function() { return this.size },\n\n removeInner: function(at, n) {\n var this$1 = this;\n\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this$1.height -= oldHeight - child.height;\n if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n\n collapse: function(lines) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }\n },\n\n insertInner: function(at, lines, height) {\n var this$1 = this;\n\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n var remaining = child.lines.length % 25 + 25;\n for (var pos = remaining; pos < child.lines.length;) {\n var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n child.height -= leaf.height;\n this$1.children.splice(++i, 0, leaf);\n leaf.parent = this$1;\n }\n child.lines = child.lines.slice(0, remaining);\n this$1.maybeSpill();\n }\n break\n }\n at -= sz;\n }\n },\n\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) { return }\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10)\n me.parent.maybeSpill();\n },\n\n iterN: function(at, n, op) {\n var this$1 = this;\n\n for (var i = 0; i < this.children.length; ++i) {\n var child = this$1.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) { return true }\n if ((n -= used) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n }\n };\n\n // Line widgets are block elements displayed above or below a line.\n\n var LineWidget = function(doc, node, options) {\n var this$1 = this;\n\n if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n { this$1[opt] = options[opt]; } } }\n this.doc = doc;\n this.node = node;\n };\n\n LineWidget.prototype.clear = function () {\n var this$1 = this;\n\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) { return }\n for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1); } }\n if (!ws.length) { line.widgets = null; }\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) {\n runInOp(cm, function () {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, \"widget\");\n });\n signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n }\n };\n\n LineWidget.prototype.changed = function () {\n var this$1 = this;\n\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) { return }\n if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }\n if (cm) {\n runInOp(cm, function () {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n });\n }\n };\n eventMixin(LineWidget);\n\n function adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n { addToScrollTop(cm, diff); }\n }\n\n function addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n changeLine(doc, handle, \"widget\", function (line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) { widgets.push(widget); }\n else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) { addToScrollTop(cm, widget.height); }\n cm.curOp.forceUpdate = true;\n }\n return true\n });\n if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n return widget\n }\n\n // TEXTMARKERS\n\n // Created with markText and setBookmark methods. A TextMarker is a\n // handle that can be used to clear or find a marked position in the\n // document. Line objects hold arrays (markedSpans) containing\n // {from, to, marker} object pointing to such marker objects, and\n // indicating that such a marker is present on that line. Multiple\n // lines may point to the same marker when it spans across lines.\n // The spans will have null for their from/to properties when the\n // marker continues beyond the start/end of the line. Markers have\n // links back to the lines they currently touch.\n\n // Collapsed markers have unique ids, in order to be able to order\n // them, which is needed for uniquely determining an outer marker\n // when they overlap (they may nest, but not partially overlap).\n var nextMarkerId = 0;\n\n var TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n };\n\n // Clear the marker.\n TextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) { startOperation(cm); }\n if (hasHandler(this, \"clear\")) {\n var found = this.find();\n if (found) { signalLater(this, \"clear\", found.from, found.to); }\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n else if (cm) {\n if (span.to != null) { max = lineNo(line); }\n if (span.from != null) { min = lineNo(line); }\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm)\n { updateLineHeight(line, textHeight(cm.display)); }\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n } }\n\n if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) { reCheckSelection(cm.doc); }\n }\n if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n if (withOp) { endOperation(cm); }\n if (this.parent) { this.parent.clear(); }\n };\n\n // Find the position of the marker in the document. Returns a {from,\n // to} object by default. Side can be passed to get a specific side\n // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n // Pos objects returned contain a line object, rather than a line\n // number (used to prevent looking up the same line twice).\n TextMarker.prototype.find = function (side, lineObj) {\n var this$1 = this;\n\n if (side == null && this.type == \"bookmark\") { side = 1; }\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this$1.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this$1);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) { return from }\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) { return to }\n }\n }\n return from && {from: from, to: to}\n };\n\n // Signals that the marker's widget changed, and surrounding layout\n // should be recomputed.\n TextMarker.prototype.changed = function () {\n var this$1 = this;\n\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) { return }\n runInOp(cm, function () {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n { updateLineHeight(line, line.height + dHeight); }\n }\n signalLater(cm, \"markerChanged\", cm, this$1);\n });\n };\n\n TextMarker.prototype.attachLine = function (line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n }\n this.lines.push(line);\n };\n\n TextMarker.prototype.detachLine = function (line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp\n ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n };\n eventMixin(TextMarker);\n\n // Create a marker, wire it up to the right lines, and\n function markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) { copyObj(options, marker, false); }\n // Don't connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n { return marker }\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n seeCollapsedSpans();\n }\n\n if (marker.addToHistory)\n { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function (line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n { updateMaxLine = true; }\n if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null));\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n }); }\n\n if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n if (marker.readOnly) {\n seeReadOnlySpans();\n if (doc.history.done.length || doc.history.undone.length)\n { doc.clearHistory(); }\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n if (marker.collapsed)\n { regChange(cm, from.line, to.line + 1); }\n else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||\n marker.attributes || marker.title)\n { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n if (marker.atomic) { reCheckSelection(cm.doc); }\n signalLater(cm, \"markerAdded\", cm, marker);\n }\n return marker\n }\n\n // SHARED TEXTMARKERS\n\n // A shared marker spans multiple linked documents. It is\n // implemented as a meta-marker-object controlling multiple normal\n // markers.\n var SharedTextMarker = function(markers, primary) {\n var this$1 = this;\n\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n { markers[i].parent = this$1; }\n };\n\n SharedTextMarker.prototype.clear = function () {\n var this$1 = this;\n\n if (this.explicitlyCleared) { return }\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n { this$1.markers[i].clear(); }\n signalLater(this, \"clear\");\n };\n\n SharedTextMarker.prototype.find = function (side, lineObj) {\n return this.primary.find(side, lineObj)\n };\n eventMixin(SharedTextMarker);\n\n function markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function (doc) {\n if (widget) { options.widgetNode = widget.cloneNode(true); }\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n { if (doc.linked[i].isParent) { return } }\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary)\n }\n\n function findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n }\n\n function copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n }\n\n function detachSharedMarkers(markers) {\n var loop = function ( i ) {\n var marker = markers[i], linked = [marker.primary.doc];\n linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n };\n\n for (var i = 0; i < markers.length; i++) loop( i );\n }\n\n var nextDocId = 0;\n var Doc = function(text, mode, firstLine, lineSep, direction) {\n if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n if (firstLine == null) { firstLine = 0; }\n\n BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.modeFrontier = this.highlightFrontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n this.extend = false;\n\n if (typeof text == \"string\") { text = this.splitLines(text); }\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n };\n\n Doc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) { this.iterN(from - this.first, to - from, op); }\n else { this.iterN(this.first, this.first + this.size, from); }\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n setSelection(this, simpleSelection(top), sel_dontScroll);\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n getLineNumber: function(line) {return lineNo(line)},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == \"number\") { line = getLine(this, line); }\n return visualLine(line)\n },\n\n lineCount: function() {return this.size},\n firstLine: function() {return this.first},\n lastLine: function() {return this.first + this.size - 1},\n\n clipPos: function(pos) {return clipPos(this, pos)},\n\n getCursor: function(start) {\n var range$$1 = this.sel.primary(), pos;\n if (start == null || start == \"head\") { pos = range$$1.head; }\n else if (start == \"anchor\") { pos = range$$1.anchor; }\n else if (start == \"end\" || start == \"to\" || start === false) { pos = range$$1.to(); }\n else { pos = range$$1.from(); }\n return pos\n },\n listSelections: function() { return this.sel.ranges },\n somethingSelected: function() {return this.sel.somethingSelected()},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n var this$1 = this;\n\n if (!ranges.length) { return }\n var out = [];\n for (var i = 0; i < ranges.length; i++)\n { out[i] = new Range(clipPos(this$1, ranges[i].anchor),\n clipPos(this$1, ranges[i].head)); }\n if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n setSelection(this, normalizeSelection(this.cm, out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var this$1 = this;\n\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) { return lines }\n else { return lines.join(lineSep || this.lineSeparator()) }\n },\n getSelections: function(lineSep) {\n var this$1 = this;\n\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()); }\n parts[i] = sel;\n }\n return parts\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n { dup[i] = code; }\n this.replaceSelections(dup, collapse, origin || \"+input\");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var this$1 = this;\n\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range$$1 = sel.ranges[i];\n changes[i] = {from: range$$1.from(), to: range$$1.to(), text: this$1.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n { makeChange(this$1, changes[i$1]); }\n if (newSel) { setSelectionReplaceHistory(this, newSel); }\n else if (this.cm) { ensureCursorVisible(this.cm); }\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n return {undo: done, redo: undone}\n },\n clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n return this.history.generation\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration)\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)}\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history.maxGeneration);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n setGutterMarker: docMethodOp(function(line, gutterID, value) {\n return changeLine(this, line, \"gutter\", function (line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n return true\n })\n }),\n\n clearGutter: docMethodOp(function(gutterID) {\n var this$1 = this;\n\n this.iter(function (line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n changeLine(this$1, line, \"gutter\", function () {\n line.gutterMarkers[gutterID] = null;\n if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n return true\n });\n }\n });\n }),\n\n lineInfo: function(line) {\n var n;\n if (typeof line == \"number\") {\n if (!isLine(this, line)) { return null }\n n = line;\n line = getLine(this, line);\n if (!line) { return null }\n } else {\n n = lineNo(line);\n if (n == null) { return null }\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets}\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n if (!line[prop]) { line[prop] = cls; }\n else if (classTest(cls).test(line[prop])) { return false }\n else { line[prop] += \" \" + cls; }\n return true\n })\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n var cur = line[prop];\n if (!cur) { return false }\n else if (cls == null) { line[prop] = null; }\n else {\n var found = cur.match(classTest(cls));\n if (!found) { return false }\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n }\n return true\n })\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options)\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, \"bookmark\")\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n { markers.push(span.marker.parent || span.marker); }\n } }\n return markers\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo$$1 = from.line;\n this.iter(from.line, to.line + 1, function (line) {\n var spans = line.markedSpans;\n if (spans) { for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||\n span.from == null && lineNo$$1 != from.line ||\n span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&\n (!filter || filter(span.marker)))\n { found.push(span.marker.parent || span.marker); }\n } }\n ++lineNo$$1;\n });\n return found\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function (line) {\n var sps = line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i)\n { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n });\n return markers\n },\n\n posFromIndex: function(off) {\n var ch, lineNo$$1 = this.first, sepSize = this.lineSeparator().length;\n this.iter(function (line) {\n var sz = line.text.length + sepSize;\n if (sz > off) { ch = off; return true }\n off -= sz;\n ++lineNo$$1;\n });\n return clipPos(this, Pos(lineNo$$1, ch))\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) { return 0 }\n var sepSize = this.lineSeparator().length;\n this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n index += line.text.length + sepSize;\n });\n return index\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep, this.direction);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc\n },\n\n linkedDoc: function(options) {\n if (!options) { options = {}; }\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) { from = options.from; }\n if (options.to != null && options.to < to) { to = options.to; }\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n if (options.sharedHist) { copy.history = this.history\n ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy\n },\n unlinkDoc: function(other) {\n var this$1 = this;\n\n if (other instanceof CodeMirror) { other = other.doc; }\n if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n var link = this$1.linked[i];\n if (link.doc != other) { continue }\n this$1.linked.splice(i, 1);\n other.unlinkDoc(this$1);\n detachSharedMarkers(findSharedMarkers(this$1));\n break\n } }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode},\n getEditor: function() {return this.cm},\n\n splitLines: function(str) {\n if (this.lineSep) { return str.split(this.lineSep) }\n return splitLinesAuto(str)\n },\n lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n setDirection: docMethodOp(function (dir) {\n if (dir != \"rtl\") { dir = \"ltr\"; }\n if (dir == this.direction) { return }\n this.direction = dir;\n this.iter(function (line) { return line.order = null; });\n if (this.cm) { directionChanged(this.cm); }\n })\n });\n\n // Public alias.\n Doc.prototype.eachLine = Doc.prototype.iter;\n\n // Kludge to work around strange IE behavior where it'll sometimes\n // re-fire a series of drag-related events right after the drop (#1551)\n var lastDrop = 0;\n\n function onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n { return }\n e_preventDefault(e);\n if (ie) { lastDrop = +new Date; }\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) { return }\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var loadFile = function (file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1)\n { return }\n\n var reader = new FileReader;\n reader.onload = operation(cm, function () {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) { content = \"\"; }\n text[i] = content;\n if (++read == n) {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),\n origin: \"paste\"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n }\n });\n reader.readAsText(file);\n };\n for (var i = 0; i < n; ++i) { loadFile(files[i], i); }\n } else { // Normal drop\n // Don't do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function () { return cm.display.input.focus(); }, 20);\n return\n }\n try {\n var text$1 = e.dataTransfer.getData(\"Text\");\n if (text$1) {\n var selected;\n if (cm.state.draggingText && !cm.state.draggingText.copy)\n { selected = cm.listSelections(); }\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n cm.replaceSelection(text$1, \"around\", \"paste\");\n cm.display.input.focus();\n }\n }\n catch(e){}\n }\n }\n\n function onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n e.dataTransfer.setData(\"Text\", cm.getSelection());\n e.dataTransfer.effectAllowed = \"copyMove\";\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won't use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) { img.parentNode.removeChild(img); }\n }\n }\n\n function onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) { return }\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n }\n\n function clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n }\n\n // These must be handled carefully, because naively registering a\n // handler for each editor will cause the editors to never be\n // garbage collected.\n\n function forEachCodeMirror(f) {\n if (!document.getElementsByClassName) { return }\n var byClass = document.getElementsByClassName(\"CodeMirror\"), editors = [];\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) { editors.push(cm); }\n }\n if (editors.length) { editors[0].operation(function () {\n for (var i = 0; i < editors.length; i++) { f(editors[i]); }\n }); }\n }\n\n var globalsRegistered = false;\n function ensureGlobalHandlers() {\n if (globalsRegistered) { return }\n registerGlobalHandlers();\n globalsRegistered = true;\n }\n function registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, \"resize\", function () {\n if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100); }\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n }\n // Called when the window resizes\n function onResize(cm) {\n var d = cm.display;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n }\n\n var keyNames = {\n 3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n 19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n 36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n 46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n 106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 145: \"ScrollLock\",\n 173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n 221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n 63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n };\n\n // Number keys\n for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n // Alphabetic keys\n for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n // Function keys\n for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\n var keyMap = {};\n\n keyMap.basic = {\n \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n \"Esc\": \"singleSelection\"\n };\n // Note that the save and find-related commands aren't defined by\n // default. User code or addons can define them. Unknown commands\n // are simply ignored.\n keyMap.pcDefault = {\n \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n \"fallthrough\": \"basic\"\n };\n // Very basic readline/emacs-style bindings, which are standard on Mac.\n keyMap.emacsy = {\n \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\",\n \"Ctrl-O\": \"openLine\"\n };\n keyMap.macDefault = {\n \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n \"fallthrough\": [\"basic\", \"emacsy\"]\n };\n keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n // KEYMAP DISPATCH\n\n function normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/);\n name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { name = \"Alt-\" + name; }\n if (ctrl) { name = \"Ctrl-\" + name; }\n if (cmd) { name = \"Cmd-\" + name; }\n if (shift) { name = \"Shift-\" + name; }\n return name\n }\n\n // This is a kludge to keep keymaps mostly working as raw objects\n // (backwards compatibility) while at the same time support features\n // like normalization and multi-stroke key bindings. It compiles a\n // new normalized keymap, and then updates the old object to reflect\n // this.\n function normalizeKeyMap(keymap) {\n var copy = {};\n for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n if (value == \"...\") { delete keymap[keyname]; continue }\n\n var keys = map(keyname.split(\" \"), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val = (void 0), name = (void 0);\n if (i == keys.length - 1) {\n name = keys.join(\" \");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(\" \");\n val = \"...\";\n }\n var prev = copy[name];\n if (!prev) { copy[name] = val; }\n else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n }\n delete keymap[keyname];\n } }\n for (var prop in copy) { keymap[prop] = copy[prop]; }\n return keymap\n }\n\n function lookupKey(key, map$$1, handle, context) {\n map$$1 = getKeyMap(map$$1);\n var found = map$$1.call ? map$$1.call(key, context) : map$$1[key];\n if (found === false) { return \"nothing\" }\n if (found === \"...\") { return \"multi\" }\n if (found != null && handle(found)) { return \"handled\" }\n\n if (map$$1.fallthrough) {\n if (Object.prototype.toString.call(map$$1.fallthrough) != \"[object Array]\")\n { return lookupKey(key, map$$1.fallthrough, handle, context) }\n for (var i = 0; i < map$$1.fallthrough.length; i++) {\n var result = lookupKey(key, map$$1.fallthrough[i], handle, context);\n if (result) { return result }\n }\n }\n }\n\n // Modifier key presses don't count as 'real' key presses for the\n // purpose of keymap fallthrough.\n function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }\n\n function addModifierNames(name, event, noShift) {\n var base = name;\n if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") { name = \"Cmd-\" + name; }\n if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n return name\n }\n\n // Look up the name of a key as indicated by an event object.\n function keyName(event, noShift) {\n if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n var name = keyNames[event.keyCode];\n if (name == null || event.altGraphKey) { return false }\n // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n if (event.keyCode == 3 && event.code) { name = event.code; }\n return addModifierNames(name, event, noShift)\n }\n\n function getKeyMap(val) {\n return typeof val == \"string\" ? keyMap[val] : val\n }\n\n // Helper for deleting text near the selection(s), used to implement\n // backspace, delete, and similar functionality.\n function deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function () {\n for (var i = kill.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n ensureCursorVisible(cm);\n });\n }\n\n function moveCharLogically(line, ch, dir) {\n var target = skipExtendingChars(line.text, ch + dir, dir);\n return target < 0 || target > line.text.length ? null : target\n }\n\n function moveLogically(line, start, dir) {\n var ch = moveCharLogically(line, start.ch, dir);\n return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n }\n\n function endOfLine(visually, cm, lineObj, lineNo, dir) {\n if (visually) {\n var order = getOrder(lineObj, cm.doc.direction);\n if (order) {\n var part = dir < 0 ? lst(order) : order[0];\n var moveInStorageOrder = (dir < 0) == (part.level == 1);\n var sticky = moveInStorageOrder ? \"after\" : \"before\";\n var ch;\n // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n // it could be that the last bidi part is not on the last visual line,\n // since visual lines contain content order-consecutive chunks.\n // Thus, in rtl, we are looking for the first (content-order) character\n // in the rtl chunk that is on the last line (that is, the same line\n // as the last (content-order) character).\n if (part.level > 0 || cm.doc.direction == \"rtl\") {\n var prep = prepareMeasureForLine(cm, lineObj);\n ch = dir < 0 ? lineObj.text.length - 1 : 0;\n var targetTop = measureCharPrepared(cm, prep, ch).top;\n ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n } else { ch = dir < 0 ? part.to : part.from; }\n return new Pos(lineNo, ch, sticky)\n }\n }\n return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n }\n\n function moveVisually(cm, line, start, dir) {\n var bidi = getOrder(line, cm.doc.direction);\n if (!bidi) { return moveLogically(line, start, dir) }\n if (start.ch >= line.text.length) {\n start.ch = line.text.length;\n start.sticky = \"before\";\n } else if (start.ch <= 0) {\n start.ch = 0;\n start.sticky = \"after\";\n }\n var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n // nothing interesting happens.\n return moveLogically(line, start, dir)\n }\n\n var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n var prep;\n var getWrappedLineExtent = function (ch) {\n if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n prep = prep || prepareMeasureForLine(cm, line);\n return wrappedLineExtentChar(cm, line, prep, ch)\n };\n var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n if (cm.doc.direction == \"rtl\" || part.level == 1) {\n var moveInStorageOrder = (part.level == 1) == (dir < 0);\n var ch = mv(start, moveInStorageOrder ? 1 : -1);\n if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n var sticky = moveInStorageOrder ? \"before\" : \"after\";\n return new Pos(start.line, ch, sticky)\n }\n }\n\n // Case 3: Could not move within this bidi part in this visual line, so leave\n // the current bidi part\n\n var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n ? new Pos(start.line, mv(ch, 1), \"before\")\n : new Pos(start.line, ch, \"after\"); };\n\n for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n var part = bidi[partPos];\n var moveInStorageOrder = (dir > 0) == (part.level != 1);\n var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n }\n };\n\n // Case 3a: Look for other bidi parts on the same visual line\n var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n if (res) { return res }\n\n // Case 3b: Look for other bidi parts on the next visual line\n var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n if (res) { return res }\n }\n\n // Case 4: Nowhere to move\n return null\n }\n\n // Commands are parameter-less actions that can be performed on an\n // editor, mostly used for keybindings.\n var commands = {\n selectAll: selectAll,\n singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n else\n { return {from: range.head, to: Pos(range.head.line, len)} }\n } else {\n return {from: range.from(), to: range.to()}\n }\n }); },\n deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n }); }); },\n delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0), to: range.from()\n }); }); },\n delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n return {from: leftPos, to: range.from()}\n }); },\n delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n return {from: range.from(), to: rightPos }\n }); },\n undo: function (cm) { return cm.undo(); },\n redo: function (cm) { return cm.redo(); },\n undoSelection: function (cm) { return cm.undoSelection(); },\n redoSelection: function (cm) { return cm.redoSelection(); },\n goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n {origin: \"+move\", bias: -1}\n ); },\n goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n }, sel_move); },\n goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: 0, top: top}, \"div\")\n }, sel_move); },\n goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n return pos\n }, sel_move); },\n goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n delCharBefore: function (cm) { return cm.deleteH(-1, \"char\"); },\n delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n insertSoftTab: function (cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(spaceStr(tabSize - col % tabSize));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function (cm) {\n if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n else { cm.execCommand(\"insertTab\"); }\n },\n // Swap the two chars left and right of each selection's head.\n // Move cursor behind the two swapped characters afterwards.\n //\n // Doesn't consider line feeds a character.\n // Doesn't scan more than one line above to find a character.\n // Doesn't do anything on an empty line.\n // Doesn't do anything with non-empty selections.\n transposeChars: function (cm) { return runInOp(cm, function () {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) { continue }\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev) {\n cur = new Pos(cur.line, 1);\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n }\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n }); },\n newlineAndIndent: function (cm) { return runInOp(cm, function () {\n var sels = cm.listSelections();\n for (var i = sels.length - 1; i >= 0; i--)\n { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n sels = cm.listSelections();\n for (var i$1 = 0; i$1 < sels.length; i$1++)\n { cm.indentLine(sels[i$1].from().line, null, true); }\n ensureCursorVisible(cm);\n }); },\n openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n };\n\n\n function lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, visual, lineN, 1)\n }\n function lineEnd(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLineEnd(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, line, lineN, -1)\n }\n function lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line, cm.doc.direction);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(0, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n }\n return start\n }\n\n // Run a handler that was bound to a key.\n function doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == \"string\") {\n bound = commands[bound];\n if (!bound) { return false }\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n if (dropShift) { cm.display.shift = false; }\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done\n }\n\n function lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) { return result }\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm)\n }\n\n // Note that, despite the name, this function is also used to check\n // for bound mouse clicks.\n\n var stopSeq = new Delayed;\n\n function dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) { return \"handled\" }\n if (/\\'$/.test(name))\n { cm.state.keySeq = null; }\n else\n { stopSeq.set(50, function () {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n }); }\n if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n }\n return dispatchKeyInner(cm, name, e, handle)\n }\n\n function dispatchKeyInner(cm, name, e, handle) {\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == \"multi\")\n { cm.state.keySeq = name; }\n if (result == \"handled\")\n { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n if (result == \"handled\" || result == \"multi\") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n return !!result\n }\n\n // Handle a key from the keydown event.\n function handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) { return false }\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including 'Shift-'). Failing\n // that, see if there is a cursor-motion command (starting with\n // 'go') bound to the keyname without 'Shift-'.\n return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n || dispatchKey(cm, name, e, function (b) {\n if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n { return doHandleBinding(cm, b) }\n })\n } else {\n return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n }\n }\n\n // Handle a key from the keypress event\n function handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n }\n\n var lastStoppedKey = null;\n function onKeyDown(e) {\n var cm = this;\n cm.curOp.focus = activeElt();\n if (signalDOMEvent(cm, e)) { return }\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n { cm.replaceSelection(\"\", null, \"cut\"); }\n }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n { showCrossHair(cm); }\n }\n\n function showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, \"CodeMirror-crosshair\");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, \"CodeMirror-crosshair\");\n off(document, \"keyup\", up);\n off(document, \"mouseover\", up);\n }\n }\n on(document, \"keyup\", up);\n on(document, \"mouseover\", up);\n }\n\n function onKeyUp(e) {\n if (e.keyCode == 16) { this.doc.sel.shift = false; }\n signalDOMEvent(this, e);\n }\n\n function onKeyPress(e) {\n var cm = this;\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n // Some browsers fire keypress events for backspace\n if (ch == \"\\x08\") { return }\n if (handleCharBinding(cm, e, ch)) { return }\n cm.display.input.onKeyPress(e);\n }\n\n var DOUBLECLICK_DELAY = 400;\n\n var PastClick = function(time, pos, button) {\n this.time = time;\n this.pos = pos;\n this.button = button;\n };\n\n PastClick.prototype.compare = function (time, pos, button) {\n return this.time + DOUBLECLICK_DELAY > time &&\n cmp(pos, this.pos) == 0 && button == this.button\n };\n\n var lastClick, lastDoubleClick;\n function clickRepeat(pos, button) {\n var now = +new Date;\n if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n lastClick = lastDoubleClick = null;\n return \"triple\"\n } else if (lastClick && lastClick.compare(now, pos, button)) {\n lastDoubleClick = new PastClick(now, pos, button);\n lastClick = null;\n return \"double\"\n } else {\n lastClick = new PastClick(now, pos, button);\n lastDoubleClick = null;\n return \"single\"\n }\n }\n\n // A mouse down can be a single click, double click, triple click,\n // start of selection drag, start of text drag, new cursor\n // (ctrl-click), rectangle drag (alt-drag), or xwin\n // middle-click-paste. Or it might be a click on something we should\n // not interfere with, such as a scrollbar or widget.\n function onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function () { return display.scroller.draggable = true; }, 100);\n }\n return\n }\n if (clickInGutter(cm, e)) { return }\n var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n window.focus();\n\n // #3261: make sure, that we're not starting a second selection\n if (button == 1 && cm.state.selectingText)\n { cm.state.selectingText(e); }\n\n if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n if (button == 1) {\n if (pos) { leftButtonDown(cm, pos, repeat, e); }\n else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n } else if (button == 2) {\n if (pos) { extendSelection(cm.doc, pos); }\n setTimeout(function () { return display.input.focus(); }, 20);\n } else if (button == 3) {\n if (captureRightClick) { cm.display.input.onContextMenu(e); }\n else { delayBlurEvent(cm); }\n }\n }\n\n function handleMappedButton(cm, button, pos, repeat, event) {\n var name = \"Click\";\n if (repeat == \"double\") { name = \"Double\" + name; }\n else if (repeat == \"triple\") { name = \"Triple\" + name; }\n name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {\n if (typeof bound == \"string\") { bound = commands[bound]; }\n if (!bound) { return false }\n var done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n done = bound(cm, pos) != Pass;\n } finally {\n cm.state.suppressEdits = false;\n }\n return done\n })\n }\n\n function configureMouse(cm, repeat, event) {\n var option = cm.getOption(\"configureMouse\");\n var value = option ? option(cm, repeat, event) : {};\n if (value.unit == null) {\n var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n }\n if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n return value\n }\n\n function leftButtonDown(cm, pos, repeat, event) {\n if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n else { cm.curOp.focus = activeElt(); }\n\n var behavior = configureMouse(cm, repeat, event);\n\n var sel = cm.doc.sel, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n { leftButtonStartDrag(cm, event, pos, behavior); }\n else\n { leftButtonSelect(cm, event, pos, behavior); }\n }\n\n // Start a text drag. When it ends, see if any dragging actually\n // happen, and treat as a click if it didn't.\n function leftButtonStartDrag(cm, event, pos, behavior) {\n var display = cm.display, moved = false;\n var dragEnd = operation(cm, function (e) {\n if (webkit) { display.scroller.draggable = false; }\n cm.state.draggingText = false;\n off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n off(display.scroller, \"dragstart\", dragStart);\n off(display.scroller, \"drop\", dragEnd);\n if (!moved) {\n e_preventDefault(e);\n if (!behavior.addNew)\n { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if (webkit || ie && ie_version == 9)\n { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }\n else\n { display.input.focus(); }\n }\n });\n var mouseMove = function(e2) {\n moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n };\n var dragStart = function () { return moved = true; };\n // Let the drag handler handle this.\n if (webkit) { display.scroller.draggable = true; }\n cm.state.draggingText = dragEnd;\n dragEnd.copy = !behavior.moveOnDrag;\n // IE's approach to draggable\n if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n on(display.scroller, \"dragstart\", dragStart);\n on(display.scroller, \"drop\", dragEnd);\n\n delayBlurEvent(cm);\n setTimeout(function () { return display.input.focus(); }, 20);\n }\n\n function rangeForUnit(cm, pos, unit) {\n if (unit == \"char\") { return new Range(pos, pos) }\n if (unit == \"word\") { return cm.findWordAt(pos) }\n if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n var result = unit(cm, pos);\n return new Range(result.from, result.to)\n }\n\n // Normal selection, as opposed to text dragging.\n function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n // If e is null or undefined we interpret this as someone trying\n // to explicitly cancel the selection rather than the user\n // letting go of the mouse button.\n if (e) {\n e_preventDefault(e);\n display.input.focus();\n }\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n }\n\n // Used when mouse-selecting to adjust the anchor to the proper side\n // of a bidi jump depending on the visual position of the head.\n function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }\n\n\n // Determines whether an event happened in the gutter, and fires the\n // handlers for the corresponding event.\n function gutterEvent(cm, e, type, prevent) {\n var mX, mY;\n if (e.touches) {\n mX = e.touches[0].clientX;\n mY = e.touches[0].clientY;\n } else {\n try { mX = e.clientX; mY = e.clientY; }\n catch(e) { return false }\n }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n if (prevent) { e_preventDefault(e); }\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.display.gutterSpecs[i];\n signal(cm, type, cm, line, gutter.className, e);\n return e_defaultPrevented(e)\n }\n }\n }\n\n function clickInGutter(cm, e) {\n return gutterEvent(cm, e, \"gutterClick\", true)\n }\n\n // CONTEXT MENU HANDLING\n\n // To make the context menu work, we need to briefly unhide the\n // textarea (making it as unobtrusive as possible) to let the\n // right-click take effect on it.\n function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n }\n\n function contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n return gutterEvent(cm, e, \"gutterContextMenu\", false)\n }\n\n function themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n clearCaches(cm);\n }\n\n var Init = {toString: function(){return \"CodeMirror.Init\"}};\n\n var defaults = {};\n var optionHandlers = {};\n\n function defineOptions(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) { optionHandlers[name] =\n notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n }\n\n CodeMirror.defineOption = option;\n\n // Passed to option handlers when there is no old value.\n CodeMirror.Init = Init;\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n option(\"mode\", null, function (cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option(\"indentUnit\", 2, loadMode, true);\n option(\"indentWithTabs\", false);\n option(\"smartIndent\", true);\n option(\"tabSize\", 4, function (cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n\n option(\"lineSeparator\", null, function (cm, val) {\n cm.doc.lineSep = val;\n if (!val) { return }\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function (line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) { break }\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n });\n option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b-\\u200f\\u2028\\u2029\\ufeff\\ufff9-\\ufffc]/g, function (cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n if (old != Init) { cm.refresh(); }\n });\n option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n option(\"electricChars\", true);\n option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n }, true);\n option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n option(\"autocorrect\", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);\n option(\"autocapitalize\", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);\n option(\"rtlMoveVisually\", !windows);\n option(\"wholeLineUpdateBefore\", true);\n\n option(\"theme\", \"default\", function (cm) {\n themeChanged(cm);\n updateGutters(cm);\n }, true);\n option(\"keyMap\", \"default\", function (cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != Init && getKeyMap(old);\n if (prev && prev.detach) { prev.detach(cm, next); }\n if (next.attach) { next.attach(cm, prev || null); }\n });\n option(\"extraKeys\", null);\n option(\"configureMouse\", null);\n\n option(\"lineWrapping\", false, wrappingChanged, true);\n option(\"gutters\", [], function (cm, val) {\n cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);\n updateGutters(cm);\n }, true);\n option(\"fixedGutter\", true, function (cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n cm.refresh();\n }, true);\n option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n option(\"scrollbarStyle\", \"native\", function (cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option(\"lineNumbers\", false, function (cm, val) {\n cm.display.gutterSpecs = getGutters(cm.options.gutters, val);\n updateGutters(cm);\n }, true);\n option(\"firstLineNumber\", 1, updateGutters, true);\n option(\"lineNumberFormatter\", function (integer) { return integer; }, updateGutters, true);\n option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n option(\"resetSelectionOnContextMenu\", true);\n option(\"lineWiseCopyCut\", true);\n option(\"pasteLinesPerSelection\", true);\n option(\"selectionsMayTouch\", false);\n\n option(\"readOnly\", false, function (cm, val) {\n if (val == \"nocursor\") {\n onBlur(cm);\n cm.display.input.blur();\n }\n cm.display.input.readOnlyChanged(val);\n });\n option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n option(\"dragDrop\", true, dragDropChanged);\n option(\"allowDropFileTypes\", null);\n\n option(\"cursorBlinkRate\", 530);\n option(\"cursorScrollMargin\", 0);\n option(\"cursorHeight\", 1, updateSelection, true);\n option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n option(\"workTime\", 100);\n option(\"workDelay\", 100);\n option(\"flattenSpans\", true, resetModeState, true);\n option(\"addModeClass\", false, resetModeState, true);\n option(\"pollInterval\", 100);\n option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n option(\"historyEventDelay\", 1250);\n option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n option(\"maxHighlightLength\", 10000, resetModeState, true);\n option(\"moveInputWithCursor\", true, function (cm, val) {\n if (!val) { cm.display.input.resetPosition(); }\n });\n\n option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n option(\"autofocus\", null);\n option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n option(\"phrases\", null);\n }\n\n function dragDropChanged(cm, value, old) {\n var wasOn = old && old != Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, \"dragstart\", funcs.start);\n toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n toggle(cm.display.scroller, \"dragover\", funcs.over);\n toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n toggle(cm.display.scroller, \"drop\", funcs.drop);\n }\n }\n\n function wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n cm.display.sizer.style.minWidth = \"\";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function () { return updateScrollbars(cm); }, 100);\n }\n\n // A CodeMirror instance represents an editor. This is the object\n // that user code is usually dealing with.\n\n function CodeMirror(place, options) {\n var this$1 = this;\n\n if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n\n var doc = options.value;\n if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n else if (options.mode) { doc.modeOption = options.mode; }\n this.doc = doc;\n\n var input = new CodeMirror.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input, options);\n display.wrapper.CodeMirror = this;\n themeChanged(this);\n if (options.lineWrapping)\n { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n if (options.autofocus && !mobile) { display.input.focus(); }\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || this.hasFocus())\n { setTimeout(bind(onFocus, this), 20); }\n else\n { onBlur(this); }\n\n for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n { optionHandlers[opt](this$1, options[opt], Init); } }\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) { options.finishInit(this); }\n for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1); }\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n { display.lineDiv.style.textRendering = \"auto\"; }\n }\n\n // The default configuration options.\n CodeMirror.defaults = defaults;\n // Functions to run when options are changed.\n CodeMirror.optionHandlers = optionHandlers;\n\n // Attach the necessary event handlers when initializing the editor\n function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n if (signalDOMEvent(cm, e)) { return }\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n })); }\n else\n { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); });\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n }\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) { return false }\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1\n }\n function farAway(touch, other) {\n if (other.left == null) { return true }\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20\n }\n on(d.scroller, \"touchstart\", function (e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n d.input.ensurePolled();\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, \"touchmove\", function () {\n if (d.activeTouch) { d.activeTouch.moved = true; }\n });\n on(d.scroller, \"touchend\", function (e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n { range = new Range(pos, pos); }\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n { range = cm.findWordAt(pos); }\n else // Triple tap\n { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, \"touchcancel\", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function () {\n if (d.scroller.clientHeight) {\n updateScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function (e) { return onDragStart(cm, e); },\n drop: operation(cm, onDrop),\n leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n on(inp, \"keydown\", operation(cm, onKeyDown));\n on(inp, \"keypress\", operation(cm, onKeyPress));\n on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n }\n\n var initHooks = [];\n CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };\n\n // Indent the given line. The how parameter can be \"smart\",\n // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n // (typically set to true for forced single-line indents), empty\n // lines are not indented, and places where the mode returns Pass\n // are left alone.\n function indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) { how = \"add\"; }\n if (how == \"smart\") {\n // Fall back to \"prev\" when the mode doesn't have an indentation\n // method.\n if (!doc.mode.indent) { how = \"prev\"; }\n else { state = getContextBefore(cm, n).state; }\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) { line.stateAfter = null; }\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = \"not\";\n } else if (how == \"smart\") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) { return }\n how = \"prev\";\n }\n }\n if (how == \"prev\") {\n if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n else { indentation = 0; }\n } else if (how == \"add\") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == \"subtract\") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == \"number\") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = \"\", pos = 0;\n if (cm.options.indentWithTabs)\n { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n line.stateAfter = null;\n return true\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n var range = doc.sel.ranges[i$1];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos$1 = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n break\n }\n }\n }\n }\n\n // This will be set to a {lineWise: bool, text: [string]} object, so\n // that, when pasting, we know what kind of selections the copied\n // text was made out of.\n var lastCopied = null;\n\n function setLastCopied(newLastCopied) {\n lastCopied = newLastCopied;\n }\n\n function applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) { sel = doc.sel; }\n\n var recent = +new Date - 200;\n var paste = origin == \"paste\" || cm.state.pasteIncoming > recent;\n var textLines = splitLinesAuto(inserted), multiPaste = null;\n // When pasting N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n if (sel.ranges.length % lastCopied.text.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.text.length; i++)\n { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n }\n } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n multiPaste = map(textLines, function (l) { return [l]; });\n }\n }\n\n var updateInput = cm.curOp.updateInput;\n // Normal behavior is to insert the new text into every selection\n for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n var range$$1 = sel.ranges[i$1];\n var from = range$$1.from(), to = range$$1.to();\n if (range$$1.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n { from = Pos(from.line, from.ch - deleted); }\n else if (cm.state.overwrite && !paste) // Handle overwrite\n { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == inserted)\n { from = to = Pos(from.line, 0); }\n }\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n origin: origin || (paste ? \"paste\" : cm.state.cutIncoming > recent ? \"cut\" : \"+input\")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n }\n if (inserted && !paste)\n { triggerElectric(cm, inserted); }\n\n ensureCursorVisible(cm);\n if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = -1;\n }\n\n function handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput)\n { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n return true\n }\n }\n\n function triggerElectric(cm, inserted) {\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range$$1 = sel.ranges[i];\n if (range$$1.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range$$1.head.line)) { continue }\n var mode = cm.getModeAt(range$$1.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range$$1.head.line, \"smart\");\n break\n } }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range$$1.head.line).text.slice(0, range$$1.head.ch)))\n { indented = indentLine(cm, range$$1.head.line, \"smart\"); }\n }\n if (indented) { signalLater(cm, \"electricInput\", cm, range$$1.head.line); }\n }\n }\n\n function copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges}\n }\n\n function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {\n field.setAttribute(\"autocorrect\", autocorrect ? \"\" : \"off\");\n field.setAttribute(\"autocapitalize\", autocapitalize ? \"\" : \"off\");\n field.setAttribute(\"spellcheck\", !!spellcheck);\n }\n\n function hiddenTextarea() {\n var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none\");\n var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) { te.style.width = \"1000px\"; }\n else { te.setAttribute(\"wrap\", \"off\"); }\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) { te.style.border = \"1px solid black\"; }\n disableBrowserMagic(te);\n return div\n }\n\n // The publicly visible API. Note that methodOp(f) means\n // 'wrap f in an operation, performed on its `this` parameter'.\n\n // This is not the complete set of editor methods. Most of the\n // methods defined on the Doc type are also injected into\n // CodeMirror.prototype, for backwards compatibility and\n // convenience.\n\n function addEditorMethods(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){window.focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != \"mode\") { return }\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n { operation(this, optionHandlers[option])(this, value, old); }\n signal(this, \"optionChange\", this, option);\n },\n\n getOption: function(option) {return this.options[option]},\n getDoc: function() {return this.doc},\n\n addKeyMap: function(map$$1, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map$$1));\n },\n removeKeyMap: function(map$$1) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n { if (maps[i] == map$$1 || maps[i].name == map$$1) {\n maps.splice(i, 1);\n return true\n } }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n insertSorted(this.state.overlays,\n {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n priority: (options && options.priority) || 0},\n function (overlay) { return overlay.priority; });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var this$1 = this;\n\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this$1.state.modeGen++;\n regChange(this$1);\n return\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n else { dir = dir ? \"add\" : \"subtract\"; }\n }\n if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n }),\n indentSelection: methodOp(function(how) {\n var this$1 = this;\n\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range$$1 = ranges[i];\n if (!range$$1.empty()) {\n var from = range$$1.from(), to = range$$1.to();\n var start = Math.max(end, from.line);\n end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n { indentLine(this$1, j, how); }\n var newRanges = this$1.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n } else if (range$$1.head.line > end) {\n indentLine(this$1, range$$1.head.line, how, true);\n end = range$$1.head.line;\n if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1); }\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise)\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true)\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) { type = styles[2]; }\n else { for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n else { type = styles[mid * 2 + 2]; break }\n } }\n var cut = type ? type.indexOf(\"overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) { return mode }\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0]\n },\n\n getHelpers: function(pos, type) {\n var this$1 = this;\n\n var found = [];\n if (!helpers.hasOwnProperty(type)) { return found }\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) { found.push(help[mode[type]]); }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) { found.push(val); }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1)\n { found.push(cur.val); }\n }\n return found\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getContextBefore(this, line + 1, precise).state\n },\n\n cursorCoords: function(start, mode) {\n var pos, range$$1 = this.doc.sel.primary();\n if (start == null) { pos = range$$1.head; }\n else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n else { pos = start ? range$$1.from() : range$$1.to(); }\n return cursorCoords(this, pos, mode || \"page\")\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return coordsChar(this, coords.left, coords.top)\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset)\n },\n heightAtLine: function(line, mode, includeWidgets) {\n var end = false, lineObj;\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) { line = this.doc.first; }\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0)\n },\n\n defaultTextHeight: function() { return textHeight(this.display) },\n defaultCharWidth: function() { return charWidth(this.display) },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n { top = pos.top - node.offsetHeight; }\n else if (pos.bottom + node.offsetHeight <= vspace)\n { top = pos.bottom; }\n if (left + node.offsetWidth > hspace)\n { left = hspace - node.offsetWidth; }\n }\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") { left = 0; }\n else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n node.style.left = left + \"px\";\n }\n if (scroll)\n { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n { return commands[cmd].call(null, this) }\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var this$1 = this;\n\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n cur = findPosH(this$1.doc, cur, dir, unit, visually);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveH: methodOp(function(dir, unit) {\n var this$1 = this;\n\n this.extendSelectionsBy(function (range$$1) {\n if (this$1.display.shift || this$1.doc.extend || range$$1.empty())\n { return findPosH(this$1.doc, range$$1.head, dir, unit, this$1.options.rtlMoveVisually) }\n else\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n { doc.replaceSelection(\"\", null, \"+delete\"); }\n else\n { deleteNearSelection(this, function (range$$1) {\n var other = findPosH(doc, range$$1.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range$$1.head} : {from: range$$1.head, to: other}\n }); }\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var this$1 = this;\n\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n var coords = cursorCoords(this$1, cur, \"div\");\n if (x == null) { x = coords.left; }\n else { coords.left = x; }\n cur = findPosV(this$1, coords, dir, unit);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveV: methodOp(function(dir, unit) {\n var this$1 = this;\n\n var doc = this.doc, goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range$$1) {\n if (collapse)\n { return dir < 0 ? range$$1.from() : range$$1.to() }\n var headPos = cursorCoords(this$1, range$$1.head, \"div\");\n if (range$$1.goalColumn != null) { headPos.left = range$$1.goalColumn; }\n goals.push(headPos.left);\n var pos = findPosV(this$1, headPos, dir, unit);\n if (unit == \"page\" && range$$1 == doc.sel.primary())\n { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n return pos\n }, sel_move);\n if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n { doc.sel.ranges[i].goalColumn = goals[i]; } }\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function (ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n while (start > 0 && check(line.charAt(start - 1))) { --start; }\n while (end < line.length && check(line.charAt(end))) { ++end; }\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end))\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) { return }\n if (this.state.overwrite = !this.state.overwrite)\n { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n else\n { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt() },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n },\n\n scrollIntoView: methodOp(function(range$$1, margin) {\n if (range$$1 == null) {\n range$$1 = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) { margin = this.options.cursorScrollMargin; }\n } else if (typeof range$$1 == \"number\") {\n range$$1 = {from: Pos(range$$1, 0), to: null};\n } else if (range$$1.from == null) {\n range$$1 = {from: range$$1, to: null};\n }\n if (!range$$1.to) { range$$1.to = range$$1.from; }\n range$$1.margin = margin || 0;\n\n if (range$$1.from.line != null) {\n scrollToRange(this, range$$1);\n } else {\n scrollToCoordsRange(this, range$$1.from, range$$1.to, range$$1.margin);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var this$1 = this;\n\n var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n if (width != null) { this.display.wrapper.style.width = interpret(width); }\n if (height != null) { this.display.wrapper.style.height = interpret(height); }\n if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n var lineNo$$1 = this.display.viewFrom;\n this.doc.iter(lineNo$$1, this.display.viewTo, function (line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo$$1, \"widget\"); break } } }\n ++lineNo$$1;\n });\n this.curOp.forceUpdate = true;\n signal(this, \"refresh\", this);\n }),\n\n operation: function(f){return runInOp(this, f)},\n startOperation: function(){return startOperation(this)},\n endOperation: function(){return endOperation(this)},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this.display);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n { estimateLineHeights(this); }\n signal(this, \"refresh\", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n // Cancel the current text selection if any (#5821)\n if (this.state.selectingText) { this.state.selectingText(); }\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old\n }),\n\n phrase: function(phraseText) {\n var phrases = this.options.phrases;\n return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText\n },\n\n getInputField: function(){return this.display.input.getField()},\n getWrapperElement: function(){return this.display.wrapper},\n getScrollerElement: function(){return this.display.scroller},\n getGutterElement: function(){return this.display.gutters}\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n }\n\n // Used for horizontal relative motion. Dir is -1 or 1 (left or\n // right), unit can be \"char\", \"column\" (like char, but doesn't\n // cross line boundaries), \"word\" (across next word), or \"group\" (to\n // the start of next group of word or non-word-non-whitespace\n // chars). The visually param controls whether, in right-to-left\n // text, direction 1 means to move towards the next index in the\n // string, or towards the character to the right of the current\n // position. The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosH(doc, pos, dir, unit, visually) {\n var oldPos = pos;\n var origDir = dir;\n var lineObj = getLine(doc, pos.line);\n function findNextLine() {\n var l = pos.line + dir;\n if (l < doc.first || l >= doc.first + doc.size) { return false }\n pos = new Pos(l, pos.ch, pos.sticky);\n return lineObj = getLine(doc, l)\n }\n function moveOnce(boundToLine) {\n var next;\n if (visually) {\n next = moveVisually(doc.cm, lineObj, pos, dir);\n } else {\n next = moveLogically(lineObj, pos, dir);\n }\n if (next == null) {\n if (!boundToLine && findNextLine())\n { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir); }\n else\n { return false }\n } else {\n pos = next;\n }\n return true\n }\n\n if (unit == \"char\") {\n moveOnce();\n } else if (unit == \"column\") {\n moveOnce(true);\n } else if (unit == \"word\" || unit == \"group\") {\n var sawType = null, group = unit == \"group\";\n var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) { break }\n var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n var type = isWordChar(cur, helper) ? \"w\"\n : group && cur == \"\\n\" ? \"n\"\n : !group || /\\s/.test(cur) ? null\n : \"p\";\n if (group && !first && !type) { type = \"s\"; }\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n break\n }\n\n if (type) { sawType = type; }\n if (dir > 0 && !moveOnce(!first)) { break }\n }\n }\n var result = skipAtomic(doc, pos, oldPos, origDir, true);\n if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n return result\n }\n\n // For relative vertical movement. Dir may be -1 or 1. Unit can be\n // \"page\" or \"line\". The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n } else if (unit == \"line\") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n var target;\n for (;;) {\n target = coordsChar(cm, x, y);\n if (!target.outside) { break }\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n y += dir * 5;\n }\n return target\n }\n\n // CONTENTEDITABLE INPUT STYLE\n\n var ContentEditableInput = function(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.composing = null;\n this.gracePeriod = false;\n this.readDOMTimeout = null;\n };\n\n ContentEditableInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);\n\n on(div, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n });\n\n on(div, \"compositionstart\", function (e) {\n this$1.composing = {data: e.data, done: false};\n });\n on(div, \"compositionupdate\", function (e) {\n if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n });\n on(div, \"compositionend\", function (e) {\n if (this$1.composing) {\n if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n this$1.composing.done = true;\n }\n });\n\n on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n on(div, \"input\", function () {\n if (!this$1.composing) { this$1.readFromDOMSoon(); }\n });\n\n function onCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.operation(function () {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection(\"\", null, \"cut\");\n });\n }\n }\n if (e.clipboardData) {\n e.clipboardData.clearData();\n var content = lastCopied.text.join(\"\\n\");\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n e.clipboardData.setData(\"Text\", content);\n if (e.clipboardData.getData(\"Text\") == content) {\n e.preventDefault();\n return\n }\n }\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.text.join(\"\\n\");\n var hadFocus = document.activeElement;\n selectInput(te);\n setTimeout(function () {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n if (hadFocus == div) { input.showPrimarySelection(); }\n }, 50);\n }\n on(div, \"copy\", onCopyCut);\n on(div, \"cut\", onCopyCut);\n };\n\n ContentEditableInput.prototype.prepareSelection = function () {\n var result = prepareSelection(this.cm, false);\n result.focus = this.cm.state.focused;\n return result\n };\n\n ContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n if (!info || !this.cm.display.view.length) { return }\n if (info.focus || takeFocus) { this.showPrimarySelection(); }\n this.showMultipleSelections(info);\n };\n\n ContentEditableInput.prototype.getSelection = function () {\n return this.cm.display.wrapper.ownerDocument.getSelection()\n };\n\n ContentEditableInput.prototype.showPrimarySelection = function () {\n var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n var from = prim.from(), to = prim.to();\n\n if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n sel.removeAllRanges();\n return\n }\n\n var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), from) == 0 &&\n cmp(maxPos(curAnchor, curFocus), to) == 0)\n { return }\n\n var view = cm.display.view;\n var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n {node: view[0].measure.map[2], offset: 0};\n var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n if (!end) {\n var measure = view[view.length - 1].measure;\n var map$$1 = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map$$1[map$$1.length - 1], offset: map$$1[map$$1.length - 2] - map$$1[map$$1.length - 3]};\n }\n\n if (!start || !end) {\n sel.removeAllRanges();\n return\n }\n\n var old = sel.rangeCount && sel.getRangeAt(0), rng;\n try { rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) { sel.addRange(old); }\n else if (gecko) { this.startGracePeriod(); }\n }\n this.rememberSelection();\n };\n\n ContentEditableInput.prototype.startGracePeriod = function () {\n var this$1 = this;\n\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function () {\n this$1.gracePeriod = false;\n if (this$1.selectionChanged())\n { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n }, 20);\n };\n\n ContentEditableInput.prototype.showMultipleSelections = function (info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n };\n\n ContentEditableInput.prototype.rememberSelection = function () {\n var sel = this.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n };\n\n ContentEditableInput.prototype.selectionInEditor = function () {\n var sel = this.getSelection();\n if (!sel.rangeCount) { return false }\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node)\n };\n\n ContentEditableInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\") {\n if (!this.selectionInEditor())\n { this.showSelection(this.prepareSelection(), true); }\n this.div.focus();\n }\n };\n ContentEditableInput.prototype.blur = function () { this.div.blur(); };\n ContentEditableInput.prototype.getField = function () { return this.div };\n\n ContentEditableInput.prototype.supportsTouch = function () { return true };\n\n ContentEditableInput.prototype.receivedFocus = function () {\n var input = this;\n if (this.selectionInEditor())\n { this.pollSelection(); }\n else\n { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n };\n\n ContentEditableInput.prototype.selectionChanged = function () {\n var sel = this.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n };\n\n ContentEditableInput.prototype.pollSelection = function () {\n if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n var sel = this.getSelection(), cm = this.cm;\n // On Android Chrome (version 56, at least), backspacing into an\n // uneditable block element will put the cursor in that element,\n // and then, because it's not editable, hide the virtual keyboard.\n // Because Android doesn't allow us to actually detect backspace\n // presses in a sane way, this code checks for when that happens\n // and simulates a backspace press in this case.\n if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {\n this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n this.blur();\n this.focus();\n return\n }\n if (this.composing) { return }\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) { runInOp(cm, function () {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n }); }\n };\n\n ContentEditableInput.prototype.pollContent = function () {\n if (this.readDOMTimeout != null) {\n clearTimeout(this.readDOMTimeout);\n this.readDOMTimeout = null;\n }\n\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.ch == 0 && from.line > cm.firstLine())\n { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n { to = Pos(to.line + 1, 0); }\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n var fromIndex, fromLine, fromNode;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n fromLine = lineNo(display.view[0].line);\n fromNode = display.view[0].node;\n } else {\n fromLine = lineNo(display.view[fromIndex].line);\n fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n var toLine, toNode;\n if (toIndex == display.view.length - 1) {\n toLine = display.viewTo - 1;\n toNode = display.lineDiv.lastChild;\n } else {\n toLine = lineNo(display.view[toIndex + 1].line) - 1;\n toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n if (!fromNode) { return false }\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else { break }\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n { ++cutFront; }\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n { ++cutEnd; }\n // Try to move start of change to start of selection if ambiguous\n if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n while (cutFront && cutFront > from.ch &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n cutFront--;\n cutEnd++;\n }\n }\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n return true\n }\n };\n\n ContentEditableInput.prototype.ensurePolled = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.reset = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.forceCompositionEnd = function () {\n if (!this.composing) { return }\n clearTimeout(this.readDOMTimeout);\n this.composing = null;\n this.updateFromDOM();\n this.div.blur();\n this.div.focus();\n };\n ContentEditableInput.prototype.readFromDOMSoon = function () {\n var this$1 = this;\n\n if (this.readDOMTimeout != null) { return }\n this.readDOMTimeout = setTimeout(function () {\n this$1.readDOMTimeout = null;\n if (this$1.composing) {\n if (this$1.composing.done) { this$1.composing = null; }\n else { return }\n }\n this$1.updateFromDOM();\n }, 80);\n };\n\n ContentEditableInput.prototype.updateFromDOM = function () {\n var this$1 = this;\n\n if (this.cm.isReadOnly() || !this.pollContent())\n { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n };\n\n ContentEditableInput.prototype.setUneditable = function (node) {\n node.contentEditable = \"false\";\n };\n\n ContentEditableInput.prototype.onKeyPress = function (e) {\n if (e.charCode == 0 || this.composing) { return }\n e.preventDefault();\n if (!this.cm.isReadOnly())\n { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n };\n\n ContentEditableInput.prototype.readOnlyChanged = function (val) {\n this.div.contentEditable = String(val != \"nocursor\");\n };\n\n ContentEditableInput.prototype.onContextMenu = function () {};\n ContentEditableInput.prototype.resetPosition = function () {};\n\n ContentEditableInput.prototype.needsContentAttribute = true;\n\n function posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) { return null }\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line, cm.doc.direction), side = \"left\";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? \"right\" : \"left\";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == \"right\" ? result.end : result.start;\n return result\n }\n\n function isInGutter(node) {\n for (var scan = node; scan; scan = scan.parentNode)\n { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n return false\n }\n\n function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\n function domTextBetween(cm, from, to, fromLine, toLine) {\n var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n function close() {\n if (closing) {\n text += lineSep;\n if (extraLinebreak) { text += lineSep; }\n closing = extraLinebreak = false;\n }\n }\n function addText(str) {\n if (str) {\n close();\n text += str;\n }\n }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute(\"cm-text\");\n if (cmText) {\n addText(cmText);\n return\n }\n var markerID = node.getAttribute(\"cm-marker\"), range$$1;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range$$1 = found[0].find(0)))\n { addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }\n return\n }\n if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n if (isBlock) { close(); }\n for (var i = 0; i < node.childNodes.length; i++)\n { walk(node.childNodes[i]); }\n\n if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n if (isBlock) { closing = true; }\n } else if (node.nodeType == 3) {\n addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n }\n }\n for (;;) {\n walk(from);\n if (from == to) { break }\n from = from.nextSibling;\n extraLinebreak = false;\n }\n return text\n }\n\n function domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n { return locateNodeInLineView(lineView, node, offset) }\n }\n }\n\n function locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad)\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) { offset = textNode.nodeValue.length; }\n }\n while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map$$1 = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map$$1.length; j += 3) {\n var curNode = map$$1[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map$$1[j] + offset;\n if (offset < 0 || curNode != textNode) { ch = map$$1[j + (offset ? 1 : 0)]; }\n return Pos(line, ch)\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) { return badPos(found, bad) }\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n { return badPos(Pos(found.line, found.ch - dist), bad) }\n else\n { dist += after.textContent.length; }\n }\n for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n else\n { dist$1 += before.textContent.length; }\n }\n }\n\n // TEXTAREA INPUT STYLE\n\n var TextareaInput = function(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = \"\";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n };\n\n TextareaInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = this.cm;\n this.createField(display);\n var te = this.textarea;\n\n display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n if (ios) { te.style.width = \"0px\"; }\n\n on(te, \"input\", function () {\n if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n input.poll();\n });\n\n on(te, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n cm.state.pasteIncoming = +new Date;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = \"\";\n te.value = ranges.text.join(\"\\n\");\n selectInput(te);\n }\n }\n if (e.type == \"cut\") { cm.state.cutIncoming = +new Date; }\n }\n on(te, \"cut\", prepareCopyCut);\n on(te, \"copy\", prepareCopyCut);\n\n on(display.scroller, \"paste\", function (e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n if (!te.dispatchEvent) {\n cm.state.pasteIncoming = +new Date;\n input.focus();\n return\n }\n\n // Pass the `paste` event to the textarea so it's handled by its event listener.\n var event = new Event(\"paste\");\n event.clipboardData = e.clipboardData;\n te.dispatchEvent(event);\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, \"selectstart\", function (e) {\n if (!eventInWidget(display, e)) { e_preventDefault(e); }\n });\n\n on(te, \"compositionstart\", function () {\n var start = cm.getCursor(\"from\");\n if (input.composing) { input.composing.range.clear(); }\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n };\n });\n on(te, \"compositionend\", function () {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n };\n\n TextareaInput.prototype.createField = function (_display) {\n // Wraps and hides input textarea\n this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n this.textarea = this.wrapper.firstChild;\n };\n\n TextareaInput.prototype.prepareSelection = function () {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result\n };\n\n TextareaInput.prototype.showSelection = function (drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + \"px\";\n this.wrapper.style.left = drawn.teLeft + \"px\";\n }\n };\n\n // Reset the input to correspond to the selection (or to be empty,\n // when not typing and nothing is selected)\n TextareaInput.prototype.reset = function (typing) {\n if (this.contextMenuPending || this.composing) { return }\n var cm = this.cm;\n if (cm.somethingSelected()) {\n this.prevInput = \"\";\n var content = cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) { selectInput(this.textarea); }\n if (ie && ie_version >= 9) { this.hasSelection = content; }\n } else if (!typing) {\n this.prevInput = this.textarea.value = \"\";\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n }\n };\n\n TextareaInput.prototype.getField = function () { return this.textarea };\n\n TextareaInput.prototype.supportsTouch = function () { return false };\n\n TextareaInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n };\n\n TextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\n TextareaInput.prototype.resetPosition = function () {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n };\n\n TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n // Poll for input changes, using the normal rate of polling. This\n // runs as long as the editor is focused.\n TextareaInput.prototype.slowPoll = function () {\n var this$1 = this;\n\n if (this.pollingFast) { return }\n this.polling.set(this.cm.options.pollInterval, function () {\n this$1.poll();\n if (this$1.cm.state.focused) { this$1.slowPoll(); }\n });\n };\n\n // When an event has just come in that is likely to add or change\n // something in the input textarea, we poll faster, to ensure that\n // the change appears on the screen quickly.\n TextareaInput.prototype.fastPoll = function () {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n };\n\n // Read input from the textarea, and update the document to match.\n // When something is selected, it is present in the textarea, and\n // selected (unless it is huge, in which case a placeholder is\n // used). When nothing is selected, the cursor sits after previously\n // seen text (can be empty), which is stored in prevInput (we must\n // not reset the textarea when typing, because that breaks IME).\n TextareaInput.prototype.poll = function () {\n var this$1 = this;\n\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n { return false }\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) { return false }\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n runInOp(cm, function () {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, this$1.composing ? \"*compose\" : null);\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n else { this$1.prevInput = text; }\n\n if (this$1.composing) {\n this$1.composing.range.clear();\n this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n {className: \"CodeMirror-composing\"});\n }\n });\n return true\n };\n\n TextareaInput.prototype.ensurePolled = function () {\n if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n };\n\n TextareaInput.prototype.onKeyPress = function () {\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n this.fastPoll();\n };\n\n TextareaInput.prototype.onContextMenu = function (e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n if (input.contextMenuPending) { input.contextMenuPending(); }\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) { return } // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and 'resetSelectionOnContextMenu' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();\n input.wrapper.style.cssText = \"position: static\";\n te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n var oldScrollY;\n if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) { window.scrollTo(null, oldScrollY); }\n display.input.reset();\n // Adds \"Select all\" to context menu in FF\n if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n input.contextMenuPending = rehide;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there's nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n if (input.contextMenuPending != rehide) { return }\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS;\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n var i = 0, poll = function () {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n operation(cm, selectAll)(cm);\n } else if (i++ < 10) {\n display.detectingSelectAll = setTimeout(poll, 500);\n } else {\n display.selForContextMenu = null;\n display.input.reset();\n }\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function () {\n off(window, \"mouseup\", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, \"mouseup\", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n };\n\n TextareaInput.prototype.readOnlyChanged = function (val) {\n if (!val) { this.reset(); }\n this.textarea.disabled = val == \"nocursor\";\n };\n\n TextareaInput.prototype.setUneditable = function () {};\n\n TextareaInput.prototype.needsContentAttribute = false;\n\n function fromTextArea(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n { options.tabindex = textarea.tabIndex; }\n if (!options.placeholder && textarea.placeholder)\n { options.placeholder = textarea.placeholder; }\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt();\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n\n var realSubmit;\n if (textarea.form) {\n on(textarea.form, \"submit\", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form;\n realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function () {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function (cm) {\n cm.save = save;\n cm.getTextArea = function () { return textarea; };\n cm.toTextArea = function () {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = \"\";\n if (textarea.form) {\n off(textarea.form, \"submit\", save);\n if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == \"function\")\n { textarea.form.submit = realSubmit; }\n }\n };\n };\n\n textarea.style.display = \"none\";\n var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n options);\n return cm\n }\n\n function addLegacyProps(CodeMirror) {\n CodeMirror.off = off;\n CodeMirror.on = on;\n CodeMirror.wheelEventPixels = wheelEventPixels;\n CodeMirror.Doc = Doc;\n CodeMirror.splitLines = splitLinesAuto;\n CodeMirror.countColumn = countColumn;\n CodeMirror.findColumn = findColumn;\n CodeMirror.isWordChar = isWordCharBasic;\n CodeMirror.Pass = Pass;\n CodeMirror.signal = signal;\n CodeMirror.Line = Line;\n CodeMirror.changeEnd = changeEnd;\n CodeMirror.scrollbarModel = scrollbarModel;\n CodeMirror.Pos = Pos;\n CodeMirror.cmpPos = cmp;\n CodeMirror.modes = modes;\n CodeMirror.mimeModes = mimeModes;\n CodeMirror.resolveMode = resolveMode;\n CodeMirror.getMode = getMode;\n CodeMirror.modeExtensions = modeExtensions;\n CodeMirror.extendMode = extendMode;\n CodeMirror.copyState = copyState;\n CodeMirror.startState = startState;\n CodeMirror.innerMode = innerMode;\n CodeMirror.commands = commands;\n CodeMirror.keyMap = keyMap;\n CodeMirror.keyName = keyName;\n CodeMirror.isModifierKey = isModifierKey;\n CodeMirror.lookupKey = lookupKey;\n CodeMirror.normalizeKeyMap = normalizeKeyMap;\n CodeMirror.StringStream = StringStream;\n CodeMirror.SharedTextMarker = SharedTextMarker;\n CodeMirror.TextMarker = TextMarker;\n CodeMirror.LineWidget = LineWidget;\n CodeMirror.e_preventDefault = e_preventDefault;\n CodeMirror.e_stopPropagation = e_stopPropagation;\n CodeMirror.e_stop = e_stop;\n CodeMirror.addClass = addClass;\n CodeMirror.contains = contains;\n CodeMirror.rmClass = rmClass;\n CodeMirror.keyNames = keyNames;\n }\n\n // EDITOR CONSTRUCTOR\n\n defineOptions(CodeMirror);\n\n addEditorMethods(CodeMirror);\n\n // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n { CodeMirror.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments)}\n })(Doc.prototype[prop]); } }\n\n eventMixin(Doc);\n CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n CodeMirror.defineMode = function(name/*, mode, …*/) {\n if (!CodeMirror.defaults.mode && name != \"null\") { CodeMirror.defaults.mode = name; }\n defineMode.apply(this, arguments);\n };\n\n CodeMirror.defineMIME = defineMIME;\n\n // Minimal default mode.\n CodeMirror.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\n CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n // EXTENSIONS\n\n CodeMirror.defineExtension = function (name, func) {\n CodeMirror.prototype[name] = func;\n };\n CodeMirror.defineDocExtension = function (name, func) {\n Doc.prototype[name] = func;\n };\n\n CodeMirror.fromTextArea = fromTextArea;\n\n addLegacyProps(CodeMirror);\n\n CodeMirror.version = \"5.49.0\";\n\n return CodeMirror;\n\n})));\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nvar isIE = isBrowser ? !!document.documentElement.currentStyle : false;\nvar hiddenTextarea = isBrowser && document.createElement('textarea');\nvar HIDDEN_TEXTAREA_STYLE = {\n 'min-height': '0',\n 'max-height': 'none',\n height: '0',\n visibility: 'hidden',\n overflow: 'hidden',\n position: 'absolute',\n 'z-index': '-1000',\n top: '0',\n right: '0'\n};\nvar SIZING_STYLE = ['letter-spacing', 'line-height', 'font-family', 'font-weight', 'font-size', 'font-style', 'tab-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width', 'box-sizing'];\nvar computedStyleCache = {};\nfunction calculateNodeHeight(uiTextNode, uid, useCache, minRows, maxRows) {\n if (useCache === void 0) {\n useCache = false;\n }\n\n if (minRows === void 0) {\n minRows = null;\n }\n\n if (maxRows === void 0) {\n maxRows = null;\n }\n\n if (hiddenTextarea.parentNode === null) {\n document.body.appendChild(hiddenTextarea);\n } // Copy all CSS properties that have an impact on the height of the content in\n // the textbox\n\n\n var nodeStyling = calculateNodeStyling(uiTextNode, uid, useCache);\n\n if (nodeStyling === null) {\n return null;\n }\n\n var paddingSize = nodeStyling.paddingSize,\n borderSize = nodeStyling.borderSize,\n boxSizing = nodeStyling.boxSizing,\n sizingStyle = nodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise\n // text-lines will not calculated properly as the shadow will technically be\n // narrower for content\n\n Object.keys(sizingStyle).forEach(function (key) {\n hiddenTextarea.style[key] = sizingStyle[key];\n });\n Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function (key) {\n hiddenTextarea.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], 'important');\n });\n hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || 'x';\n var minHeight = -Infinity;\n var maxHeight = Infinity;\n var height = hiddenTextarea.scrollHeight;\n\n if (boxSizing === 'border-box') {\n // border-box: add border, since height = content + padding + border\n height = height + borderSize;\n } else if (boxSizing === 'content-box') {\n // remove padding, since height = content\n height = height - paddingSize;\n } // measure height of a textarea with a single row\n\n\n hiddenTextarea.value = 'x';\n var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;\n\n if (minRows !== null || maxRows !== null) {\n if (minRows !== null) {\n minHeight = singleRowHeight * minRows;\n\n if (boxSizing === 'border-box') {\n minHeight = minHeight + paddingSize + borderSize;\n }\n\n height = Math.max(minHeight, height);\n }\n\n if (maxRows !== null) {\n maxHeight = singleRowHeight * maxRows;\n\n if (boxSizing === 'border-box') {\n maxHeight = maxHeight + paddingSize + borderSize;\n }\n\n height = Math.min(maxHeight, height);\n }\n }\n\n var rowCount = Math.floor(height / singleRowHeight);\n return {\n height: height,\n minHeight: minHeight,\n maxHeight: maxHeight,\n rowCount: rowCount\n };\n}\n\nfunction calculateNodeStyling(node, uid, useCache) {\n if (useCache === void 0) {\n useCache = false;\n }\n\n if (useCache && computedStyleCache[uid]) {\n return computedStyleCache[uid];\n }\n\n var style = window.getComputedStyle(node);\n\n if (style === null) {\n return null;\n }\n\n var sizingStyle = SIZING_STYLE.reduce(function (obj, name) {\n obj[name] = style.getPropertyValue(name);\n return obj;\n }, {});\n var boxSizing = sizingStyle['box-sizing']; // IE (Edge has already correct behaviour) returns content width as computed width\n // so we need to add manually padding and border widths\n\n if (isIE && boxSizing === 'border-box') {\n sizingStyle.width = parseFloat(sizingStyle.width) + parseFloat(style['border-right-width']) + parseFloat(style['border-left-width']) + parseFloat(style['padding-right']) + parseFloat(style['padding-left']) + 'px';\n }\n\n var paddingSize = parseFloat(sizingStyle['padding-bottom']) + parseFloat(sizingStyle['padding-top']);\n var borderSize = parseFloat(sizingStyle['border-bottom-width']) + parseFloat(sizingStyle['border-top-width']);\n var nodeInfo = {\n sizingStyle: sizingStyle,\n paddingSize: paddingSize,\n borderSize: borderSize,\n boxSizing: boxSizing\n };\n\n if (useCache) {\n computedStyleCache[uid] = nodeInfo;\n }\n\n return nodeInfo;\n}\n\nvar purgeCache = function purgeCache(uid) {\n return delete computedStyleCache[uid];\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\n/**\n * \n */\nvar noop = function noop() {}; // IE11 has a problem with eval source maps, can be reproduced with:\n// eval('\"use strict\"; var onNextFrame = window.cancelAnimationFrame; onNextFrame(4);')\n// so we bind window as context in dev modes\n\n\nvar _ref = isBrowser && window.requestAnimationFrame ? process.env.NODE_ENV !== 'development' ? [window.requestAnimationFrame, window.cancelAnimationFrame] : [window.requestAnimationFrame.bind(window), window.cancelAnimationFrame.bind(window)] : [setTimeout, clearTimeout];\nvar onNextFrame = _ref[0];\nvar clearNextFrameAction = _ref[1];\n\nvar TextareaAutosize =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(TextareaAutosize, _React$Component);\n\n function TextareaAutosize(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this._resizeLock = false;\n\n _this._onRootDOMNode = function (node) {\n _this._rootDOMNode = node;\n\n if (_this.props.inputRef) {\n _this.props.inputRef(node);\n }\n };\n\n _this._onChange = function (event) {\n if (!_this._controlled) {\n _this._resizeComponent();\n }\n\n _this.props.onChange(event);\n };\n\n _this._resizeComponent = function (callback) {\n if (callback === void 0) {\n callback = noop;\n }\n\n if (typeof _this._rootDOMNode === 'undefined') {\n callback();\n return;\n }\n\n var nodeHeight = calculateNodeHeight(_this._rootDOMNode, _this._uid, _this.props.useCacheForDOMMeasurements, _this.props.minRows, _this.props.maxRows);\n\n if (nodeHeight === null) {\n callback();\n return;\n }\n\n var height = nodeHeight.height,\n minHeight = nodeHeight.minHeight,\n maxHeight = nodeHeight.maxHeight,\n rowCount = nodeHeight.rowCount;\n _this.rowCount = rowCount;\n\n if (_this.state.height !== height || _this.state.minHeight !== minHeight || _this.state.maxHeight !== maxHeight) {\n _this.setState({\n height: height,\n minHeight: minHeight,\n maxHeight: maxHeight\n }, callback);\n\n return;\n }\n\n callback();\n };\n\n _this.state = {\n height: props.style && props.style.height || 0,\n minHeight: -Infinity,\n maxHeight: Infinity\n };\n _this._uid = uid();\n _this._controlled = typeof props.value === 'string';\n return _this;\n }\n\n var _proto = TextareaAutosize.prototype;\n\n _proto.render = function render() {\n var _props = this.props,\n _minRows = _props.minRows,\n _maxRows = _props.maxRows,\n _onHeightChange = _props.onHeightChange,\n _useCacheForDOMMeasurements = _props.useCacheForDOMMeasurements,\n _inputRef = _props.inputRef,\n props = _objectWithoutProperties(_props, [\"minRows\", \"maxRows\", \"onHeightChange\", \"useCacheForDOMMeasurements\", \"inputRef\"]);\n props.style = _extends({}, props.style, {\n height: this.state.height\n });\n var maxHeight = Math.max(props.style.maxHeight || Infinity, this.state.maxHeight);\n\n if (maxHeight < this.state.height) {\n props.style.overflow = 'hidden';\n }\n\n return React.createElement(\"textarea\", _extends({}, props, {\n onChange: this._onChange,\n ref: this._onRootDOMNode\n }));\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n this._resizeComponent(); // Working around Firefox bug which runs resize listeners even when other JS is running at the same moment\n // causing competing rerenders (due to setState in the listener) in React.\n // More can be found here - facebook/react#6324\n\n\n this._resizeListener = function () {\n if (_this2._resizeLock) {\n return;\n }\n\n _this2._resizeLock = true;\n\n _this2._resizeComponent(function () {\n return _this2._resizeLock = false;\n });\n };\n\n window.addEventListener('resize', this._resizeListener);\n };\n\n _proto.componentWillReceiveProps = function componentWillReceiveProps() {\n var _this3 = this;\n\n this._clearNextFrame();\n\n this._onNextFrameActionId = onNextFrame(function () {\n return _this3._resizeComponent();\n });\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (this.state.height !== prevState.height) {\n this.props.onHeightChange(this.state.height, this);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this._clearNextFrame();\n\n window.removeEventListener('resize', this._resizeListener);\n purgeCache(this._uid);\n };\n\n _proto._clearNextFrame = function _clearNextFrame() {\n clearNextFrameAction(this._onNextFrameActionId);\n };\n\n return TextareaAutosize;\n}(React.Component);\n\nTextareaAutosize.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func,\n onHeightChange: PropTypes.func,\n useCacheForDOMMeasurements: PropTypes.bool,\n minRows: PropTypes.number,\n maxRows: PropTypes.number,\n inputRef: PropTypes.func\n};\nTextareaAutosize.defaultProps = {\n onChange: noop,\n onHeightChange: noop,\n useCacheForDOMMeasurements: false\n};\n\nexport default TextareaAutosize;\n","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar CallbackQueue = require('./CallbackQueue');\nvar PooledClass = require('./PooledClass');\nvar ReactFeatureFlags = require('./ReactFeatureFlags');\nvar ReactReconciler = require('./ReactReconciler');\nvar Transaction = require('./Transaction');\n\nvar invariant = require('fbjs/lib/invariant');\n\nvar dirtyComponents = [];\nvar updateBatchNumber = 0;\nvar asapCallbackQueue = CallbackQueue.getPooled();\nvar asapEnqueued = false;\n\nvar batchingStrategy = null;\n\nfunction ensureInjected() {\n !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;\n}\n\nvar NESTED_UPDATES = {\n initialize: function () {\n this.dirtyComponentsLength = dirtyComponents.length;\n },\n close: function () {\n if (this.dirtyComponentsLength !== dirtyComponents.length) {\n // Additional updates were enqueued by componentDidUpdate handlers or\n // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run\n // these new updates so that if A's componentDidUpdate calls setState on\n // B, B will update before the callback A's updater provided when calling\n // setState.\n dirtyComponents.splice(0, this.dirtyComponentsLength);\n flushBatchedUpdates();\n } else {\n dirtyComponents.length = 0;\n }\n }\n};\n\nvar UPDATE_QUEUEING = {\n initialize: function () {\n this.callbackQueue.reset();\n },\n close: function () {\n this.callbackQueue.notifyAll();\n }\n};\n\nvar TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];\n\nfunction ReactUpdatesFlushTransaction() {\n this.reinitializeTransaction();\n this.dirtyComponentsLength = null;\n this.callbackQueue = CallbackQueue.getPooled();\n this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(\n /* useCreateElement */true);\n}\n\n_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n },\n\n destructor: function () {\n this.dirtyComponentsLength = null;\n CallbackQueue.release(this.callbackQueue);\n this.callbackQueue = null;\n ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);\n this.reconcileTransaction = null;\n },\n\n perform: function (method, scope, a) {\n // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`\n // with this transaction's wrappers around it.\n return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);\n }\n});\n\nPooledClass.addPoolingTo(ReactUpdatesFlushTransaction);\n\nfunction batchedUpdates(callback, a, b, c, d, e) {\n ensureInjected();\n return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);\n}\n\n/**\n * Array comparator for ReactComponents by mount ordering.\n *\n * @param {ReactComponent} c1 first component you're comparing\n * @param {ReactComponent} c2 second component you're comparing\n * @return {number} Return value usable by Array.prototype.sort().\n */\nfunction mountOrderComparator(c1, c2) {\n return c1._mountOrder - c2._mountOrder;\n}\n\nfunction runBatchedUpdates(transaction) {\n var len = transaction.dirtyComponentsLength;\n !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;\n\n // Since reconciling a component higher in the owner hierarchy usually (not\n // always -- see shouldComponentUpdate()) will reconcile children, reconcile\n // them before their children by sorting the array.\n dirtyComponents.sort(mountOrderComparator);\n\n // Any updates enqueued while reconciling must be performed after this entire\n // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and\n // C, B could update twice in a single batch if C's render enqueues an update\n // to B (since B would have already updated, we should skip it, and the only\n // way we can know to do so is by checking the batch counter).\n updateBatchNumber++;\n\n for (var i = 0; i < len; i++) {\n // If a component is unmounted before pending changes apply, it will still\n // be here, but we assume that it has cleared its _pendingCallbacks and\n // that performUpdateIfNecessary is a noop.\n var component = dirtyComponents[i];\n\n // If performUpdateIfNecessary happens to enqueue any new updates, we\n // shouldn't execute the callbacks until the next render happens, so\n // stash the callbacks first\n var callbacks = component._pendingCallbacks;\n component._pendingCallbacks = null;\n\n var markerName;\n if (ReactFeatureFlags.logTopLevelRenders) {\n var namedComponent = component;\n // Duck type TopLevelWrapper. This is probably always true.\n if (component._currentElement.type.isReactTopLevelWrapper) {\n namedComponent = component._renderedComponent;\n }\n markerName = 'React update: ' + namedComponent.getName();\n console.time(markerName);\n }\n\n ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);\n\n if (markerName) {\n console.timeEnd(markerName);\n }\n\n if (callbacks) {\n for (var j = 0; j < callbacks.length; j++) {\n transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());\n }\n }\n }\n}\n\nvar flushBatchedUpdates = function () {\n // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents\n // array and perform any updates enqueued by mount-ready handlers (i.e.,\n // componentDidUpdate) but we need to check here too in order to catch\n // updates enqueued by setState callbacks and asap calls.\n while (dirtyComponents.length || asapEnqueued) {\n if (dirtyComponents.length) {\n var transaction = ReactUpdatesFlushTransaction.getPooled();\n transaction.perform(runBatchedUpdates, null, transaction);\n ReactUpdatesFlushTransaction.release(transaction);\n }\n\n if (asapEnqueued) {\n asapEnqueued = false;\n var queue = asapCallbackQueue;\n asapCallbackQueue = CallbackQueue.getPooled();\n queue.notifyAll();\n CallbackQueue.release(queue);\n }\n }\n};\n\n/**\n * Mark a component as needing a rerender, adding an optional callback to a\n * list of functions which will be executed once the rerender occurs.\n */\nfunction enqueueUpdate(component) {\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component);\n return;\n }\n\n dirtyComponents.push(component);\n if (component._updateBatchNumber == null) {\n component._updateBatchNumber = updateBatchNumber + 1;\n }\n}\n\n/**\n * Enqueue a callback to be run at the end of the current batching cycle. Throws\n * if no updates are currently being performed.\n */\nfunction asap(callback, context) {\n !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;\n asapCallbackQueue.enqueue(callback, context);\n asapEnqueued = true;\n}\n\nvar ReactUpdatesInjection = {\n injectReconcileTransaction: function (ReconcileTransaction) {\n !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;\n ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;\n },\n\n injectBatchingStrategy: function (_batchingStrategy) {\n !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;\n !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;\n !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;\n batchingStrategy = _batchingStrategy;\n }\n};\n\nvar ReactUpdates = {\n /**\n * React references `ReactReconcileTransaction` using this property in order\n * to allow dependency injection.\n *\n * @internal\n */\n ReactReconcileTransaction: null,\n\n batchedUpdates: batchedUpdates,\n enqueueUpdate: enqueueUpdate,\n flushBatchedUpdates: flushBatchedUpdates,\n injection: ReactUpdatesInjection,\n asap: asap\n};\n\nmodule.exports = ReactUpdates;","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n\n};\n\nmodule.exports = ReactCurrentOwner;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar PooledClass = require('./PooledClass');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar warning = require('fbjs/lib/warning');\n\nvar didWarnForAddedNewProperty = false;\nvar isProxySupported = typeof Proxy === 'function';\n\nvar shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar EventInterface = {\n type: null,\n target: null,\n // currentTarget is set when dispatching; no use in copying it here\n currentTarget: emptyFunction.thatReturnsNull,\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\n/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n *\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {*} targetInst Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @param {DOMEventTarget} nativeEventTarget Target node.\n */\nfunction SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {\n if (process.env.NODE_ENV !== 'production') {\n // these have a getter/setter for warnings\n delete this.nativeEvent;\n delete this.preventDefault;\n delete this.stopPropagation;\n }\n\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n if (process.env.NODE_ENV !== 'production') {\n delete this[propName]; // this has a getter/setter for warnings\n }\n var normalize = Interface[propName];\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n if (propName === 'target') {\n this.target = nativeEventTarget;\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) {\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n } else {\n this.isDefaultPrevented = emptyFunction.thatReturnsFalse;\n }\n this.isPropagationStopped = emptyFunction.thatReturnsFalse;\n return this;\n}\n\n_assign(SyntheticEvent.prototype, {\n\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault();\n } else if (typeof event.returnValue !== 'unknown') {\n // eslint-disable-line valid-typeof\n event.returnValue = false;\n }\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n },\n\n stopPropagation: function () {\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (typeof event.cancelBubble !== 'unknown') {\n // eslint-disable-line valid-typeof\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = emptyFunction.thatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {\n this.isPersistent = emptyFunction.thatReturnsTrue;\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: emptyFunction.thatReturnsFalse,\n\n /**\n * `PooledClass` looks for `destructor` on each instance it releases.\n */\n destructor: function () {\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (process.env.NODE_ENV !== 'production') {\n Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));\n } else {\n this[propName] = null;\n }\n }\n for (var i = 0; i < shouldBeReleasedProperties.length; i++) {\n this[shouldBeReleasedProperties[i]] = null;\n }\n if (process.env.NODE_ENV !== 'production') {\n Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));\n Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));\n Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));\n }\n }\n\n});\n\nSyntheticEvent.Interface = EventInterface;\n\nif (process.env.NODE_ENV !== 'production') {\n if (isProxySupported) {\n /*eslint-disable no-func-assign */\n SyntheticEvent = new Proxy(SyntheticEvent, {\n construct: function (target, args) {\n return this.apply(target, Object.create(target.prototype), args);\n },\n apply: function (constructor, that, args) {\n return new Proxy(constructor.apply(that, args), {\n set: function (target, prop, value) {\n if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {\n process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\\'re ' + 'seeing this, you\\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;\n didWarnForAddedNewProperty = true;\n }\n target[prop] = value;\n return true;\n }\n });\n }\n });\n /*eslint-enable no-func-assign */\n }\n}\n/**\n * Helper to reduce boilerplate when creating subclasses.\n *\n * @param {function} Class\n * @param {?object} Interface\n */\nSyntheticEvent.augmentClass = function (Class, Interface) {\n var Super = this;\n\n var E = function () {};\n E.prototype = Super.prototype;\n var prototype = new E();\n\n _assign(prototype, Class.prototype);\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n\n Class.Interface = _assign({}, Super.Interface, Interface);\n Class.augmentClass = Super.augmentClass;\n\n PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);\n};\n\nPooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);\n\nmodule.exports = SyntheticEvent;\n\n/**\n * Helper to nullify syntheticEvent instance properties when destructing\n *\n * @param {object} SyntheticEvent\n * @param {String} propName\n * @return {object} defineProperty object\n */\nfunction getPooledWarningPropertyDefinition(propName, getVal) {\n var isFunction = typeof getVal === 'function';\n return {\n configurable: true,\n set: set,\n get: get\n };\n\n function set(val) {\n var action = isFunction ? 'setting the method' : 'setting the property';\n warn(action, 'This is effectively a no-op');\n return val;\n }\n\n function get() {\n var action = isFunction ? 'accessing the method' : 'accessing the property';\n var result = isFunction ? 'This is a no-op function' : 'This is set to null';\n warn(action, result);\n return getVal;\n }\n\n function warn(action, result) {\n var warningCondition = false;\n process.env.NODE_ENV !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\\'re seeing this, ' + 'you\\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;\n }\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.isReactChildren = isReactChildren;\nexports.createRouteFromReactElement = createRouteFromReactElement;\nexports.createRoutesFromReactChildren = createRoutesFromReactChildren;\nexports.createRoutes = createRoutes;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction isValidChild(object) {\n return object == null || _react2.default.isValidElement(object);\n}\n\nfunction isReactChildren(object) {\n return isValidChild(object) || Array.isArray(object) && object.every(isValidChild);\n}\n\nfunction createRoute(defaultProps, props) {\n return _extends({}, defaultProps, props);\n}\n\nfunction createRouteFromReactElement(element) {\n var type = element.type;\n var route = createRoute(type.defaultProps, element.props);\n\n if (route.children) {\n var childRoutes = createRoutesFromReactChildren(route.children, route);\n\n if (childRoutes.length) route.childRoutes = childRoutes;\n\n delete route.children;\n }\n\n return route;\n}\n\n/**\n * Creates and returns a routes object from the given ReactChildren. JSX\n * provides a convenient way to visualize how routes in the hierarchy are\n * nested.\n *\n * import { Route, createRoutesFromReactChildren } from 'react-router'\n *\n * const routes = createRoutesFromReactChildren(\n * \n * \n * \n * \n * )\n *\n * Note: This method is automatically used when you provide children\n * to a component.\n */\nfunction createRoutesFromReactChildren(children, parentRoute) {\n var routes = [];\n\n _react2.default.Children.forEach(children, function (element) {\n if (_react2.default.isValidElement(element)) {\n // Component classes may have a static create* method.\n if (element.type.createRouteFromReactElement) {\n var route = element.type.createRouteFromReactElement(element, parentRoute);\n\n if (route) routes.push(route);\n } else {\n routes.push(createRouteFromReactElement(element));\n }\n }\n });\n\n return routes;\n}\n\n/**\n * Creates and returns an array of routes from the given object which\n * may be a JSX route, a plain object route, or an array of either.\n */\nfunction createRoutes(routes) {\n if (isReactChildren(routes)) {\n routes = createRoutesFromReactChildren(routes);\n } else if (routes && !Array.isArray(routes)) {\n routes = [routes];\n }\n\n return routes;\n}","'use strict';\n\nexports.__esModule = true;\nexports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) {\n var _parsePath = parsePath(path),\n pathname = _parsePath.pathname,\n search = _parsePath.search,\n hash = _parsePath.hash;\n\n return createPath({\n pathname: pathname,\n search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value,\n hash: hash\n });\n};\n\nvar stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) {\n var _parsePath2 = parsePath(path),\n pathname = _parsePath2.pathname,\n search = _parsePath2.search,\n hash = _parsePath2.hash;\n\n return createPath({\n pathname: pathname,\n search: search.replace(new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), function (match, prefix, suffix) {\n return prefix === '?' ? prefix : suffix;\n }),\n hash: hash\n });\n};\n\nvar getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) {\n var _parsePath3 = parsePath(path),\n search = _parsePath3.search;\n\n var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)'));\n return match && match[1];\n};\n\nvar extractPath = function extractPath(string) {\n var match = string.match(/^(https?:)?\\/\\/[^\\/]*/);\n return match == null ? string : string.substring(match[0].length);\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n var pathname = extractPath(path);\n var search = '';\n var hash = '';\n\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(path === pathname, 'A path must be pathname + search + hash only, not a full URL like \"%s\"', path) : void 0;\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substring(hashIndex);\n pathname = pathname.substring(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substring(searchIndex);\n pathname = pathname.substring(0, searchIndex);\n }\n\n if (pathname === '') pathname = '/';\n\n return {\n pathname: pathname,\n search: search,\n hash: hash\n };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n if (location == null || typeof location === 'string') return location;\n\n var basename = location.basename,\n pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n var path = (basename || '') + pathname;\n\n if (search && search !== '?') path += search;\n\n if (hash) path += hash;\n\n return path;\n};","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _dateArithmetic = _interopRequireDefault(require(\"date-arithmetic\"));\n\nvar _localizers = require(\"./localizers\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nvar dates = _extends({}, _dateArithmetic.default, {\n monthsInYear: function monthsInYear(year) {\n var date = new Date(year, 0, 1);\n return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(function (i) {\n return dates.month(date, i);\n });\n },\n firstVisibleDay: function firstVisibleDay(date, culture) {\n var firstOfMonth = dates.startOf(date, 'month');\n return dates.startOf(firstOfMonth, 'week', _localizers.date.firstOfWeek(culture));\n },\n lastVisibleDay: function lastVisibleDay(date, culture) {\n var endOfMonth = dates.endOf(date, 'month');\n return dates.endOf(endOfMonth, 'week', _localizers.date.firstOfWeek(culture));\n },\n visibleDays: function visibleDays(date, culture) {\n var current = dates.firstVisibleDay(date, culture);\n var last = dates.lastVisibleDay(date, culture);\n var days = [];\n\n while (dates.lte(current, last, 'day')) {\n days.push(current);\n current = dates.add(current, 1, 'day');\n }\n\n return days;\n },\n merge: function merge(date, time, defaultDate) {\n if (time == null && date == null) return null;\n if (time == null) time = defaultDate || new Date();\n if (date == null) date = defaultDate || new Date();\n date = dates.startOf(date, 'day');\n date = dates.hours(date, dates.hours(time));\n date = dates.minutes(date, dates.minutes(time));\n date = dates.seconds(date, dates.seconds(time));\n return dates.milliseconds(date, dates.milliseconds(time));\n },\n today: function today() {\n return dates.startOf(new Date(), 'day');\n },\n tomorrow: function tomorrow() {\n return dates.add(dates.startOf(new Date(), 'day'), 1, 'day');\n }\n});\n\nvar _default = dates;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Static poolers. Several custom versions for each potential number of\n * arguments. A completely generic pooler is easy to implement, but would\n * require accessing the `arguments` object. In each of these, `this` refers to\n * the Class itself, not an instance. If any others are needed, simply add them\n * here, or in their own files.\n */\nvar oneArgumentPooler = function (copyFieldsFrom) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, copyFieldsFrom);\n return instance;\n } else {\n return new Klass(copyFieldsFrom);\n }\n};\n\nvar twoArgumentPooler = function (a1, a2) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\n\nvar threeArgumentPooler = function (a1, a2, a3) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3);\n return instance;\n } else {\n return new Klass(a1, a2, a3);\n }\n};\n\nvar fourArgumentPooler = function (a1, a2, a3, a4) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4);\n }\n};\n\nvar fiveArgumentPooler = function (a1, a2, a3, a4, a5) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4, a5);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4, a5);\n }\n};\n\nvar standardReleaser = function (instance) {\n var Klass = this;\n !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\n\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = oneArgumentPooler;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nvar addPoolingTo = function (CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\n\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n oneArgumentPooler: oneArgumentPooler,\n twoArgumentPooler: twoArgumentPooler,\n threeArgumentPooler: threeArgumentPooler,\n fourArgumentPooler: fourArgumentPooler,\n fiveArgumentPooler: fiveArgumentPooler\n};\n\nmodule.exports = PooledClass;","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.isShallowEqual = isShallowEqual;\nexports.chunk = chunk;\nexports.groupBySortedKeys = groupBySortedKeys;\nexports.has = exports.makeArray = void 0;\n\nvar _warning = _interopRequireDefault(require(\"warning\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar makeArray = function makeArray(obj) {\n return obj == null ? [] : [].concat(obj);\n};\n\nexports.makeArray = makeArray;\n\nvar has = function has(o, k) {\n return o ? Object.prototype.hasOwnProperty.call(o, k) : false;\n};\n\nexports.has = has;\n\nfunction isShallowEqual(a, b) {\n if (a === b) return true;\n if (a instanceof Date && b instanceof Date) return +a === +b;\n if (typeof a !== 'object' && typeof b !== 'object') return a === b;\n if (typeof a !== typeof b) return false;\n if (a == null || b == null) return false; // if they were both null we wouldn't be here\n\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!has(b, keysA[i]) || a[keysA[i]] !== b[keysA[i]]) return false;\n }\n\n return true;\n}\n\nfunction chunk(array, chunkSize) {\n var index = 0,\n length = array ? array.length : 0;\n var result = [];\n chunkSize = Math.max(+chunkSize || 1, 1);\n\n while (index < length) {\n result.push(array.slice(index, index += chunkSize));\n }\n\n return result;\n}\n\nfunction groupBySortedKeys(groupBy, data, keys) {\n var iter = typeof groupBy === 'function' ? groupBy : function (item) {\n return item[groupBy];\n }; // the keys array ensures that groups are rendered in the order they came in\n // which means that if you sort the data array it will render sorted,\n // so long as you also sorted by group\n\n keys = keys || [];\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(typeof groupBy !== 'string' || !data.length || has(data[0], groupBy), \"[React Widgets] You seem to be trying to group this list by a \" + (\"property `\" + groupBy + \"` that doesn't exist in the dataset items, this may be a typo\")) : void 0;\n return data.reduce(function (grps, item) {\n var group = iter(item);\n\n if (has(grps, group)) {\n grps[group].push(item);\n } else {\n keys.push(group);\n grps[group] = [item];\n }\n\n return grps;\n }, {});\n}","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar ReactChildren = require('./ReactChildren');\nvar ReactComponent = require('./ReactComponent');\nvar ReactPureComponent = require('./ReactPureComponent');\nvar ReactClass = require('./ReactClass');\nvar ReactDOMFactories = require('./ReactDOMFactories');\nvar ReactElement = require('./ReactElement');\nvar ReactPropTypes = require('./ReactPropTypes');\nvar ReactVersion = require('./ReactVersion');\n\nvar onlyChild = require('./onlyChild');\nvar warning = require('fbjs/lib/warning');\n\nvar createElement = ReactElement.createElement;\nvar createFactory = ReactElement.createFactory;\nvar cloneElement = ReactElement.cloneElement;\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactElementValidator = require('./ReactElementValidator');\n createElement = ReactElementValidator.createElement;\n createFactory = ReactElementValidator.createFactory;\n cloneElement = ReactElementValidator.cloneElement;\n}\n\nvar __spread = _assign;\n\nif (process.env.NODE_ENV !== 'production') {\n var warned = false;\n __spread = function () {\n process.env.NODE_ENV !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;\n warned = true;\n return _assign.apply(null, arguments);\n };\n}\n\nvar React = {\n\n // Modern\n\n Children: {\n map: ReactChildren.map,\n forEach: ReactChildren.forEach,\n count: ReactChildren.count,\n toArray: ReactChildren.toArray,\n only: onlyChild\n },\n\n Component: ReactComponent,\n PureComponent: ReactPureComponent,\n\n createElement: createElement,\n cloneElement: cloneElement,\n isValidElement: ReactElement.isValidElement,\n\n // Classic\n\n PropTypes: ReactPropTypes,\n createClass: ReactClass.createClass,\n createFactory: createFactory,\n createMixin: function (mixin) {\n // Currently a noop. Will be used to validate and trace mixins.\n return mixin;\n },\n\n // This looks DOM specific but these are actually isomorphic helpers\n // since they are just generating DOM strings.\n DOM: ReactDOMFactories,\n\n version: ReactVersion,\n\n // Deprecated hook for JSX spread, don't use this for anything.\n __spread: __spread\n};\n\nmodule.exports = React;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n'use strict';\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\n\nfunction reactProdInvariant(code) {\n var argCount = arguments.length - 1;\n\n var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;\n\n for (var argIdx = 0; argIdx < argCount; argIdx++) {\n message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);\n }\n\n message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';\n\n var error = new Error(message);\n error.name = 'Invariant Violation';\n error.framesToPop = 1; // we don't care about reactProdInvariant's own frame\n\n throw error;\n}\n\nmodule.exports = reactProdInvariant;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\n\nvar warning = require('fbjs/lib/warning');\nvar canDefineProperty = require('./canDefineProperty');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nvar specialPropKeyWarningShown, specialPropRefWarningShown;\n\nfunction hasValidRef(config) {\n if (process.env.NODE_ENV !== 'production') {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n if (process.env.NODE_ENV !== 'production') {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;\n }\n };\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;\n }\n };\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, no instanceof check\n * will work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} key\n * @param {string|object} ref\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @param {*} owner\n * @param {*} props\n * @internal\n */\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allow us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n if (process.env.NODE_ENV !== 'production') {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {};\n\n // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n if (canDefineProperty) {\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n });\n // self and source are DEV only properties.\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n });\n // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n } else {\n element._store.validated = false;\n element._self = self;\n element._source = source;\n }\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n\n/**\n * Create and return a new ReactElement of the given type.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement\n */\nReactElement.createElement = function (type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n if (process.env.NODE_ENV !== 'production') {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n};\n\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory\n */\nReactElement.createFactory = function (type) {\n var factory = ReactElement.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook TODO: Warn if this is accessed\n factory.type = type;\n return factory;\n};\n\nReactElement.cloneAndReplaceKey = function (oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n\n return newElement;\n};\n\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement\n */\nReactElement.cloneElement = function (element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n};\n\n/**\n * Verifies the object is a ReactElement.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a valid component.\n * @final\n */\nReactElement.isValidElement = function (object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n};\n\nmodule.exports = ReactElement;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\nfunction checkMask(value, bitmask) {\n return (value & bitmask) === bitmask;\n}\n\nvar DOMPropertyInjection = {\n /**\n * Mapping from normalized, camelcased property names to a configuration that\n * specifies how the associated DOM property should be accessed or rendered.\n */\n MUST_USE_PROPERTY: 0x1,\n HAS_BOOLEAN_VALUE: 0x4,\n HAS_NUMERIC_VALUE: 0x8,\n HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,\n HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,\n\n /**\n * Inject some specialized knowledge about the DOM. This takes a config object\n * with the following properties:\n *\n * isCustomAttribute: function that given an attribute name will return true\n * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*\n * attributes where it's impossible to enumerate all of the possible\n * attribute names,\n *\n * Properties: object mapping DOM property name to one of the\n * DOMPropertyInjection constants or null. If your attribute isn't in here,\n * it won't get written to the DOM.\n *\n * DOMAttributeNames: object mapping React attribute name to the DOM\n * attribute name. Attribute names not specified use the **lowercase**\n * normalized name.\n *\n * DOMAttributeNamespaces: object mapping React attribute name to the DOM\n * attribute namespace URL. (Attribute names not specified use no namespace.)\n *\n * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.\n * Property names not specified use the normalized name.\n *\n * DOMMutationMethods: Properties that require special mutation methods. If\n * `value` is undefined, the mutation method should unset the property.\n *\n * @param {object} domPropertyConfig the config as described above.\n */\n injectDOMPropertyConfig: function (domPropertyConfig) {\n var Injection = DOMPropertyInjection;\n var Properties = domPropertyConfig.Properties || {};\n var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};\n var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};\n var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};\n var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};\n\n if (domPropertyConfig.isCustomAttribute) {\n DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);\n }\n\n for (var propName in Properties) {\n !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\\'re trying to inject DOM property \\'%s\\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;\n\n var lowerCased = propName.toLowerCase();\n var propConfig = Properties[propName];\n\n var propertyInfo = {\n attributeName: lowerCased,\n attributeNamespace: null,\n propertyName: propName,\n mutationMethod: null,\n\n mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),\n hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),\n hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),\n hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),\n hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)\n };\n !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n DOMProperty.getPossibleStandardName[lowerCased] = propName;\n }\n\n if (DOMAttributeNames.hasOwnProperty(propName)) {\n var attributeName = DOMAttributeNames[propName];\n propertyInfo.attributeName = attributeName;\n if (process.env.NODE_ENV !== 'production') {\n DOMProperty.getPossibleStandardName[attributeName] = propName;\n }\n }\n\n if (DOMAttributeNamespaces.hasOwnProperty(propName)) {\n propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];\n }\n\n if (DOMPropertyNames.hasOwnProperty(propName)) {\n propertyInfo.propertyName = DOMPropertyNames[propName];\n }\n\n if (DOMMutationMethods.hasOwnProperty(propName)) {\n propertyInfo.mutationMethod = DOMMutationMethods[propName];\n }\n\n DOMProperty.properties[propName] = propertyInfo;\n }\n }\n};\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n/* eslint-enable max-len */\n\n/**\n * DOMProperty exports lookup objects that can be used like functions:\n *\n * > DOMProperty.isValid['id']\n * true\n * > DOMProperty.isValid['foobar']\n * undefined\n *\n * Although this may be confusing, it performs better in general.\n *\n * @see http://jsperf.com/key-exists\n * @see http://jsperf.com/key-missing\n */\nvar DOMProperty = {\n\n ID_ATTRIBUTE_NAME: 'data-reactid',\n ROOT_ATTRIBUTE_NAME: 'data-reactroot',\n\n ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,\n ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040',\n\n /**\n * Map from property \"standard name\" to an object with info about how to set\n * the property in the DOM. Each object contains:\n *\n * attributeName:\n * Used when rendering markup or with `*Attribute()`.\n * attributeNamespace\n * propertyName:\n * Used on DOM node instances. (This includes properties that mutate due to\n * external factors.)\n * mutationMethod:\n * If non-null, used instead of the property or `setAttribute()` after\n * initial render.\n * mustUseProperty:\n * Whether the property must be accessed and mutated as an object property.\n * hasBooleanValue:\n * Whether the property should be removed when set to a falsey value.\n * hasNumericValue:\n * Whether the property must be numeric or parse as a numeric and should be\n * removed when set to a falsey value.\n * hasPositiveNumericValue:\n * Whether the property must be positive numeric or parse as a positive\n * numeric and should be removed when set to a falsey value.\n * hasOverloadedBooleanValue:\n * Whether the property can be used as a flag as well as with a value.\n * Removed when strictly equal to false; present without a value when\n * strictly equal to true; present with a value otherwise.\n */\n properties: {},\n\n /**\n * Mapping from lowercase property names to the properly cased version, used\n * to warn in the case of missing properties. Available only in __DEV__.\n *\n * autofocus is predefined, because adding it to the property whitelist\n * causes unintended side effects.\n *\n * @type {Object}\n */\n getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null,\n\n /**\n * All of the isCustomAttribute() functions that have been injected.\n */\n _isCustomAttributeFunctions: [],\n\n /**\n * Checks whether a property name is a custom attribute.\n * @method\n */\n isCustomAttribute: function (attributeName) {\n for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {\n var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];\n if (isCustomAttributeFn(attributeName)) {\n return true;\n }\n }\n return false;\n },\n\n injection: DOMPropertyInjection\n};\n\nmodule.exports = DOMProperty;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactRef = require('./ReactRef');\nvar ReactInstrumentation = require('./ReactInstrumentation');\n\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Helper to call ReactRef.attachRefs with this composite component, split out\n * to avoid allocations in the transaction mount-ready queue.\n */\nfunction attachRefs() {\n ReactRef.attachRefs(this, this._currentElement);\n}\n\nvar ReactReconciler = {\n\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?object} the containing host component instance\n * @param {?object} info about the host container\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @final\n * @internal\n */\n mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots\n ) {\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);\n }\n }\n var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);\n if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {\n transaction.getReactMountReady().enqueue(attachRefs, internalInstance);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);\n }\n }\n return markup;\n },\n\n /**\n * Returns a value that can be passed to\n * ReactComponentEnvironment.replaceNodeWithMarkup.\n */\n getHostNode: function (internalInstance) {\n return internalInstance.getHostNode();\n },\n\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * @final\n * @internal\n */\n unmountComponent: function (internalInstance, safely) {\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);\n }\n }\n ReactRef.detachRefs(internalInstance, internalInstance._currentElement);\n internalInstance.unmountComponent(safely);\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);\n }\n }\n },\n\n /**\n * Update a component using a new element.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactElement} nextElement\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n * @internal\n */\n receiveComponent: function (internalInstance, nextElement, transaction, context) {\n var prevElement = internalInstance._currentElement;\n\n if (nextElement === prevElement && context === internalInstance._context) {\n // Since elements are immutable after the owner is rendered,\n // we can do a cheap identity compare here to determine if this is a\n // superfluous reconcile. It's possible for state to be mutable but such\n // change should trigger an update of the owner which would recreate\n // the element. We explicitly check for the existence of an owner since\n // it's possible for an element created outside a composite to be\n // deeply mutated and reused.\n\n // TODO: Bailing out early is just a perf optimization right?\n // TODO: Removing the return statement should affect correctness?\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);\n }\n }\n\n var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);\n\n if (refsChanged) {\n ReactRef.detachRefs(internalInstance, prevElement);\n }\n\n internalInstance.receiveComponent(nextElement, transaction, context);\n\n if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {\n transaction.getReactMountReady().enqueue(attachRefs, internalInstance);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);\n }\n }\n },\n\n /**\n * Flush any dirty changes in a component.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {\n if (internalInstance._updateBatchNumber !== updateBatchNumber) {\n // The component's enqueued batch number should always be the current\n // batch or the following one.\n process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);\n }\n }\n internalInstance.performUpdateIfNecessary(transaction);\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);\n }\n }\n }\n\n};\n\nmodule.exports = ReactReconciler;","/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMNamespaces = require('./DOMNamespaces');\nvar setInnerHTML = require('./setInnerHTML');\n\nvar createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');\nvar setTextContent = require('./setTextContent');\n\nvar ELEMENT_NODE_TYPE = 1;\nvar DOCUMENT_FRAGMENT_NODE_TYPE = 11;\n\n/**\n * In IE (8-11) and Edge, appending nodes with no children is dramatically\n * faster than appending a full subtree, so we essentially queue up the\n * .appendChild calls here and apply them so each node is added to its parent\n * before any children are added.\n *\n * In other browsers, doing so is slower or neutral compared to the other order\n * (in Firefox, twice as slow) so we only do this inversion in IE.\n *\n * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.\n */\nvar enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\\bEdge\\/\\d/.test(navigator.userAgent);\n\nfunction insertTreeChildren(tree) {\n if (!enableLazy) {\n return;\n }\n var node = tree.node;\n var children = tree.children;\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n insertTreeBefore(node, children[i], null);\n }\n } else if (tree.html != null) {\n setInnerHTML(node, tree.html);\n } else if (tree.text != null) {\n setTextContent(node, tree.text);\n }\n}\n\nvar insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {\n // DocumentFragments aren't actually part of the DOM after insertion so\n // appending children won't update the DOM. We need to ensure the fragment\n // is properly populated first, breaking out of our lazy approach for just\n // this level. Also, some plugins (like Flash Player) will read\n // nodes immediately upon insertion into the DOM, so \n // must also be populated prior to insertion into the DOM.\n if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {\n insertTreeChildren(tree);\n parentNode.insertBefore(tree.node, referenceNode);\n } else {\n parentNode.insertBefore(tree.node, referenceNode);\n insertTreeChildren(tree);\n }\n});\n\nfunction replaceChildWithTree(oldNode, newTree) {\n oldNode.parentNode.replaceChild(newTree.node, oldNode);\n insertTreeChildren(newTree);\n}\n\nfunction queueChild(parentTree, childTree) {\n if (enableLazy) {\n parentTree.children.push(childTree);\n } else {\n parentTree.node.appendChild(childTree.node);\n }\n}\n\nfunction queueHTML(tree, html) {\n if (enableLazy) {\n tree.html = html;\n } else {\n setInnerHTML(tree.node, html);\n }\n}\n\nfunction queueText(tree, text) {\n if (enableLazy) {\n tree.text = text;\n } else {\n setTextContent(tree.node, text);\n }\n}\n\nfunction toString() {\n return this.node.nodeName;\n}\n\nfunction DOMLazyTree(node) {\n return {\n node: node,\n children: [],\n html: null,\n text: null,\n toString: toString\n };\n}\n\nDOMLazyTree.insertTreeBefore = insertTreeBefore;\nDOMLazyTree.replaceChildWithTree = replaceChildWithTree;\nDOMLazyTree.queueChild = queueChild;\nDOMLazyTree.queueHTML = queueHTML;\nDOMLazyTree.queueText = queueText;\n\nmodule.exports = DOMLazyTree;","'use strict';\n\nexports.__esModule = true;\nexports.compilePattern = compilePattern;\nexports.matchPattern = matchPattern;\nexports.getParamNames = getParamNames;\nexports.getParams = getParams;\nexports.formatPattern = formatPattern;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction escapeRegExp(string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction _compilePattern(pattern) {\n var regexpSource = '';\n var paramNames = [];\n var tokens = [];\n\n var match = void 0,\n lastIndex = 0,\n matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\\*\\*|\\*|\\(|\\)/g;\n while (match = matcher.exec(pattern)) {\n if (match.index !== lastIndex) {\n tokens.push(pattern.slice(lastIndex, match.index));\n regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index));\n }\n\n if (match[1]) {\n regexpSource += '([^/]+)';\n paramNames.push(match[1]);\n } else if (match[0] === '**') {\n regexpSource += '(.*)';\n paramNames.push('splat');\n } else if (match[0] === '*') {\n regexpSource += '(.*?)';\n paramNames.push('splat');\n } else if (match[0] === '(') {\n regexpSource += '(?:';\n } else if (match[0] === ')') {\n regexpSource += ')?';\n }\n\n tokens.push(match[0]);\n\n lastIndex = matcher.lastIndex;\n }\n\n if (lastIndex !== pattern.length) {\n tokens.push(pattern.slice(lastIndex, pattern.length));\n regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length));\n }\n\n return {\n pattern: pattern,\n regexpSource: regexpSource,\n paramNames: paramNames,\n tokens: tokens\n };\n}\n\nvar CompiledPatternsCache = Object.create(null);\n\nfunction compilePattern(pattern) {\n if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern);\n\n return CompiledPatternsCache[pattern];\n}\n\n/**\n * Attempts to match a pattern on the given pathname. Patterns may use\n * the following special characters:\n *\n * - :paramName Matches a URL segment up to the next /, ?, or #. The\n * captured string is considered a \"param\"\n * - () Wraps a segment of the URL that is optional\n * - * Consumes (non-greedy) all characters up to the next\n * character in the pattern, or to the end of the URL if\n * there is none\n * - ** Consumes (greedy) all characters up to the next character\n * in the pattern, or to the end of the URL if there is none\n *\n * The function calls callback(error, matched) when finished.\n * The return value is an object with the following properties:\n *\n * - remainingPathname\n * - paramNames\n * - paramValues\n */\nfunction matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}\n\nfunction getParamNames(pattern) {\n return compilePattern(pattern).paramNames;\n}\n\nfunction getParams(pattern, pathname) {\n var match = matchPattern(pattern, pathname);\n if (!match) {\n return null;\n }\n\n var paramNames = match.paramNames,\n paramValues = match.paramValues;\n\n var params = {};\n\n paramNames.forEach(function (paramName, index) {\n params[paramName] = paramValues[index];\n });\n\n return params;\n}\n\n/**\n * Returns a version of the given pattern with params interpolated. Throws\n * if there is a dynamic segment of the pattern for which there is no param.\n */\nfunction formatPattern(pattern, params) {\n params = params || {};\n\n var _compilePattern3 = compilePattern(pattern),\n tokens = _compilePattern3.tokens;\n\n var parenCount = 0,\n pathname = '',\n splatIndex = 0,\n parenHistory = [];\n\n var token = void 0,\n paramName = void 0,\n paramValue = void 0;\n for (var i = 0, len = tokens.length; i < len; ++i) {\n token = tokens[i];\n\n if (token === '*' || token === '**') {\n paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;\n\n !(paramValue != null || parenCount > 0) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Missing splat #%s for path \"%s\"', splatIndex, pattern) : (0, _invariant2.default)(false) : void 0;\n\n if (paramValue != null) pathname += encodeURI(paramValue);\n } else if (token === '(') {\n parenHistory[parenCount] = '';\n parenCount += 1;\n } else if (token === ')') {\n var parenText = parenHistory.pop();\n parenCount -= 1;\n\n if (parenCount) parenHistory[parenCount - 1] += parenText;else pathname += parenText;\n } else if (token.charAt(0) === ':') {\n paramName = token.substring(1);\n paramValue = params[paramName];\n\n !(paramValue != null || parenCount > 0) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Missing \"%s\" parameter for path \"%s\"', paramName, pattern) : (0, _invariant2.default)(false) : void 0;\n\n if (paramValue == null) {\n if (parenCount) {\n parenHistory[parenCount - 1] = '';\n\n var curTokenIdx = tokens.indexOf(token);\n var tokensSubset = tokens.slice(curTokenIdx, tokens.length);\n var nextParenIdx = -1;\n\n for (var _i = 0; _i < tokensSubset.length; _i++) {\n if (tokensSubset[_i] == ')') {\n nextParenIdx = _i;\n break;\n }\n }\n\n !(nextParenIdx > 0) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Path \"%s\" is missing end paren at segment \"%s\"', pattern, tokensSubset.join('')) : (0, _invariant2.default)(false) : void 0;\n\n // jump to ending paren\n i = curTokenIdx + nextParenIdx - 1;\n }\n } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue);else pathname += encodeURIComponent(paramValue);\n } else {\n if (parenCount) parenHistory[parenCount - 1] += token;else pathname += token;\n }\n }\n\n !(parenCount <= 0) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Path \"%s\" is missing end paren', pattern) : (0, _invariant2.default)(false) : void 0;\n\n return pathname.replace(/\\/+/g, '/');\n}","'use strict';\n\nexports.__esModule = true;\nexports.default = routerWarning;\nexports._resetWarned = _resetWarned;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar warned = {};\n\nfunction routerWarning(falseToWarn, message) {\n // Only issue deprecation warnings once.\n if (message.indexOf('deprecated') !== -1) {\n if (warned[message]) {\n return;\n }\n\n warned[message] = true;\n }\n\n message = '[react-router] ' + message;\n\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n _warning2.default.apply(undefined, [falseToWarn, message].concat(args));\n}\n\nfunction _resetWarned() {\n warned = {};\n}","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _PathUtils = require('./PathUtils');\n\nvar _Actions = require('./Actions');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createQuery = exports.createQuery = function createQuery(props) {\n return _extends(Object.create(null), props);\n};\n\nvar createLocation = exports.createLocation = function createLocation() {\n var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/';\n var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP;\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input;\n\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(!object.path, 'Location descriptor objects should have a `pathname`, not a `path`.') : void 0;\n\n var pathname = object.pathname || '/';\n var search = object.search || '';\n var hash = object.hash || '';\n var state = object.state;\n\n return {\n pathname: pathname,\n search: search,\n hash: hash,\n state: state,\n action: action,\n key: key\n };\n};\n\nvar isDate = function isDate(object) {\n return Object.prototype.toString.call(object) === '[object Date]';\n};\n\nvar statesAreEqual = exports.statesAreEqual = function statesAreEqual(a, b) {\n if (a === b) return true;\n\n var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (typeofA !== typeofB) return false;\n\n !(typeofA !== 'function') ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'You must not store functions in location state') : (0, _invariant2.default)(false) : void 0;\n\n // Not the same object, but same type.\n if (typeofA === 'object') {\n !!(isDate(a) && isDate(b)) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') : (0, _invariant2.default)(false) : void 0;\n\n if (!Array.isArray(a)) {\n var keysofA = Object.keys(a);\n var keysofB = Object.keys(b);\n return keysofA.length === keysofB.length && keysofA.every(function (key) {\n return statesAreEqual(a[key], b[key]);\n });\n }\n\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return statesAreEqual(item, b[index]);\n });\n }\n\n // All other serializable types (string, number, boolean)\n // should be strict equal.\n return false;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n return a.key === b.key &&\n // a.action === b.action && // Different action !== location change.\n a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && statesAreEqual(a.state, b.state);\n};","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nmodule.exports.isNothing = isNothing;\nmodule.exports.isObject = isObject;\nmodule.exports.toArray = toArray;\nmodule.exports.repeat = repeat;\nmodule.exports.isNegativeZero = isNegativeZero;\nmodule.exports.extend = extend;\n","'use strict';\n\n/*eslint-disable max-len*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Type = require('./type');\n\n\nfunction compileList(schema, name, result) {\n var exclude = [];\n\n schema.include.forEach(function (includedSchema) {\n result = compileList(includedSchema, name, result);\n });\n\n schema[name].forEach(function (currentType) {\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {\n exclude.push(previousIndex);\n }\n });\n\n result.push(currentType);\n });\n\n return result.filter(function (type, index) {\n return exclude.indexOf(index) === -1;\n });\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {}\n }, index, length;\n\n function collectType(type) {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema(definition) {\n this.include = definition.include || [];\n this.implicit = definition.implicit || [];\n this.explicit = definition.explicit || [];\n\n this.implicit.forEach(function (type) {\n if (type.loadKind && type.loadKind !== 'scalar') {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n });\n\n this.compiledImplicit = compileList(this, 'implicit', []);\n this.compiledExplicit = compileList(this, 'explicit', []);\n this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);\n}\n\n\nSchema.DEFAULT = null;\n\n\nSchema.create = function createSchema() {\n var schemas, types;\n\n switch (arguments.length) {\n case 1:\n schemas = Schema.DEFAULT;\n types = arguments[0];\n break;\n\n case 2:\n schemas = arguments[0];\n types = arguments[1];\n break;\n\n default:\n throw new YAMLException('Wrong number of arguments for Schema.create function');\n }\n\n schemas = common.toArray(schemas);\n types = common.toArray(types);\n\n if (!schemas.every(function (schema) { return schema instanceof Schema; })) {\n throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');\n }\n\n if (!types.every(function (type) { return type instanceof Type; })) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n return new Schema({\n include: schemas,\n explicit: types\n });\n};\n\n\nmodule.exports = Schema;\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPluginUtils = require('./EventPluginUtils');\n\nvar accumulateInto = require('./accumulateInto');\nvar forEachAccumulated = require('./forEachAccumulated');\nvar warning = require('fbjs/lib/warning');\n\nvar getListener = EventPluginHub.getListener;\n\n/**\n * Some event types have a notion of different registration names for different\n * \"phases\" of propagation. This finds listeners by a given phase.\n */\nfunction listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}\n\n/**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event's members allows us to not have to create a wrapping\n * \"dispatch\" object that pairs the event with the listener.\n */\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}\n\n/**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory. We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.\n */\nfunction accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\nfunction accumulateDispatches(inst, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n}\n\n/**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n accumulateDispatches(event._targetInst, null, event);\n }\n}\n\nfunction accumulateTwoPhaseDispatches(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n}\n\nfunction accumulateTwoPhaseDispatchesSkipTarget(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);\n}\n\nfunction accumulateEnterLeaveDispatches(leave, enter, from, to) {\n EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n}\n\nfunction accumulateDirectDispatches(events) {\n forEachAccumulated(events, accumulateDirectDispatchesSingle);\n}\n\n/**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of \"dispatch ready event objects\" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing event a\n * single one.\n *\n * @constructor EventPropagators\n */\nvar EventPropagators = {\n accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,\n accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,\n accumulateDirectDispatches: accumulateDirectDispatches,\n accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches\n};\n\nmodule.exports = EventPropagators;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar EventPluginRegistry = require('./EventPluginRegistry');\nvar EventPluginUtils = require('./EventPluginUtils');\nvar ReactErrorUtils = require('./ReactErrorUtils');\n\nvar accumulateInto = require('./accumulateInto');\nvar forEachAccumulated = require('./forEachAccumulated');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Internal store for event listeners\n */\nvar listenerBank = {};\n\n/**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\nvar eventQueue = null;\n\n/**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @private\n */\nvar executeDispatchesAndRelease = function (event, simulated) {\n if (event) {\n EventPluginUtils.executeDispatchesInOrder(event, simulated);\n\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n};\nvar executeDispatchesAndReleaseSimulated = function (e) {\n return executeDispatchesAndRelease(e, true);\n};\nvar executeDispatchesAndReleaseTopLevel = function (e) {\n return executeDispatchesAndRelease(e, false);\n};\n\nvar getDictionaryKey = function (inst) {\n // Prevents V8 performance issue:\n // https://github.com/facebook/react/pull/7232\n return '.' + inst._rootNodeID;\n};\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n return !!(props.disabled && isInteractive(type));\n default:\n return false;\n }\n}\n\n/**\n * This is a unified interface for event plugins to be installed and configured.\n *\n * Event plugins can implement the following properties:\n *\n * `extractEvents` {function(string, DOMEventTarget, string, object): *}\n * Required. When a top-level event is fired, this method is expected to\n * extract synthetic events that will in turn be queued and dispatched.\n *\n * `eventTypes` {object}\n * Optional, plugins that fire events must publish a mapping of registration\n * names that are used to register listeners. Values of this mapping must\n * be objects that contain `registrationName` or `phasedRegistrationNames`.\n *\n * `executeDispatch` {function(object, function, string)}\n * Optional, allows plugins to override how an event gets dispatched. By\n * default, the listener is simply invoked.\n *\n * Each plugin that is injected into `EventsPluginHub` is immediately operable.\n *\n * @public\n */\nvar EventPluginHub = {\n\n /**\n * Methods for injecting dependencies.\n */\n injection: {\n\n /**\n * @param {array} InjectedEventPluginOrder\n * @public\n */\n injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,\n\n /**\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n */\n injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName\n\n },\n\n /**\n * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.\n *\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {function} listener The callback to store.\n */\n putListener: function (inst, registrationName, listener) {\n !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;\n\n var key = getDictionaryKey(inst);\n var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});\n bankForRegistrationName[key] = listener;\n\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.didPutListener) {\n PluginModule.didPutListener(inst, registrationName, listener);\n }\n },\n\n /**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n getListener: function (inst, registrationName) {\n // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not\n // live here; needs to be moved to a better place soon\n var bankForRegistrationName = listenerBank[registrationName];\n if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {\n return null;\n }\n var key = getDictionaryKey(inst);\n return bankForRegistrationName && bankForRegistrationName[key];\n },\n\n /**\n * Deletes a listener from the registration bank.\n *\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n */\n deleteListener: function (inst, registrationName) {\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.willDeleteListener) {\n PluginModule.willDeleteListener(inst, registrationName);\n }\n\n var bankForRegistrationName = listenerBank[registrationName];\n // TODO: This should never be null -- when is it?\n if (bankForRegistrationName) {\n var key = getDictionaryKey(inst);\n delete bankForRegistrationName[key];\n }\n },\n\n /**\n * Deletes all listeners for the DOM element with the supplied ID.\n *\n * @param {object} inst The instance, which is the source of events.\n */\n deleteAllListeners: function (inst) {\n var key = getDictionaryKey(inst);\n for (var registrationName in listenerBank) {\n if (!listenerBank.hasOwnProperty(registrationName)) {\n continue;\n }\n\n if (!listenerBank[registrationName][key]) {\n continue;\n }\n\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.willDeleteListener) {\n PluginModule.willDeleteListener(inst, registrationName);\n }\n\n delete listenerBank[registrationName][key];\n }\n },\n\n /**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events;\n var plugins = EventPluginRegistry.plugins;\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n return events;\n },\n\n /**\n * Enqueues a synthetic event that should be dispatched when\n * `processEventQueue` is invoked.\n *\n * @param {*} events An accumulation of synthetic events.\n * @internal\n */\n enqueueEvents: function (events) {\n if (events) {\n eventQueue = accumulateInto(eventQueue, events);\n }\n },\n\n /**\n * Dispatches all synthetic events on the event queue.\n *\n * @internal\n */\n processEventQueue: function (simulated) {\n // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n var processingEventQueue = eventQueue;\n eventQueue = null;\n if (simulated) {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);\n } else {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n }\n !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;\n // This would be a good time to rethrow if any of the event handlers threw.\n ReactErrorUtils.rethrowCaughtError();\n },\n\n /**\n * These are needed for tests only. Do not use!\n */\n __purge: function () {\n listenerBank = {};\n },\n\n __getListenerBank: function () {\n return listenerBank;\n }\n\n};\n\nmodule.exports = EventPluginHub;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\nvar getEventTarget = require('./getEventTarget');\n\n/**\n * @interface UIEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar UIEventInterface = {\n view: function (event) {\n if (event.view) {\n return event.view;\n }\n\n var target = getEventTarget(event);\n if (target.window === target) {\n // target is a window object\n return target;\n }\n\n var doc = target.ownerDocument;\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n if (doc) {\n return doc.defaultView || doc.parentWindow;\n } else {\n return window;\n }\n },\n detail: function (event) {\n return event.detail || 0;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);\n\nmodule.exports = SyntheticUIEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n */\n\n// TODO: Replace this with ES6: var ReactInstanceMap = new Map();\n\nvar ReactInstanceMap = {\n\n /**\n * This API should be called `delete` but we'd have to make sure to always\n * transform these to strings for IE support. When this transform is fully\n * supported we can rename it.\n */\n remove: function (key) {\n key._reactInternalInstance = undefined;\n },\n\n get: function (key) {\n return key._reactInternalInstance;\n },\n\n has: function (key) {\n return key._reactInternalInstance !== undefined;\n },\n\n set: function (key, value) {\n key._reactInternalInstance = value;\n }\n\n};\n\nmodule.exports = ReactInstanceMap;","'use strict';\n\nexports.__esModule = true;\nexports.routes = exports.route = exports.components = exports.component = exports.history = undefined;\nexports.falsy = falsy;\n\nvar _react = require('react');\n\nvar func = _react.PropTypes.func,\n object = _react.PropTypes.object,\n arrayOf = _react.PropTypes.arrayOf,\n oneOfType = _react.PropTypes.oneOfType,\n element = _react.PropTypes.element,\n shape = _react.PropTypes.shape,\n string = _react.PropTypes.string;\nfunction falsy(props, propName, componentName) {\n if (props[propName]) return new Error('<' + componentName + '> should not have a \"' + propName + '\" prop');\n}\n\nvar history = exports.history = shape({\n listen: func.isRequired,\n push: func.isRequired,\n replace: func.isRequired,\n go: func.isRequired,\n goBack: func.isRequired,\n goForward: func.isRequired\n});\n\nvar component = exports.component = oneOfType([func, string]);\nvar components = exports.components = oneOfType([component, object]);\nvar route = exports.route = oneOfType([object, element]);\nvar routes = exports.routes = oneOfType([route, arrayOf(route)]);","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","// YAML error class. http://stackoverflow.com/questions/8458984\n//\n'use strict';\n\nfunction YAMLException(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException.prototype = Object.create(Error.prototype);\nYAMLException.prototype.constructor = YAMLException;\n\n\nYAMLException.prototype.toString = function toString(compact) {\n var result = this.name + ': ';\n\n result += this.reason || '(unknown reason)';\n\n if (!compact && this.mark) {\n result += ' ' + this.mark.toString();\n }\n\n return result;\n};\n\n\nmodule.exports = YAMLException;\n","// JS-YAML's default schema for `safeLoad` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on standard YAML's Core schema and includes most of\n// extra types described at YAML tag repository. (http://yaml.org/type/)\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./core')\n ],\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n});\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar React = require('react');\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.notify = notify;\nexports.instanceId = instanceId;\nexports.isFirstFocusedRender = isFirstFocusedRender;\nvar idCount = 0;\n\nfunction uniqueId(prefix) {\n return '' + ((prefix == null ? '' : prefix) + ++idCount);\n}\n\nfunction notify(handler, args) {\n handler && handler.apply(null, [].concat(args));\n}\n\nfunction instanceId(component, suffix) {\n if (suffix === void 0) {\n suffix = '';\n }\n\n component.__id || (component.__id = uniqueId('rw_'));\n return (component.props.id || component.__id) + suffix;\n}\n/**\n * Allows for defering popup rendering untill the widget is focused,\n * or has been opened (in order to not remove it suddenly on close)\n */\n\n\nfunction isFirstFocusedRender(component) {\n return component._firstFocus || (component.state.focused || !!component.props.open) && (component._firstFocus = true);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.dataIndexOf = dataIndexOf;\nexports.valueMatcher = valueMatcher;\nexports.dataItem = dataItem;\nexports.dataText = exports.dataValue = void 0;\n\nvar _ = require(\"./_\");\n\nvar dataValue = function dataValue(data, field) {\n var value = data;\n if (typeof field === 'function') value = field(data);else if (data == null) value = data;else if (typeof field === 'string' && typeof data === 'object' && field in data) value = data[field];\n return value;\n};\n\nexports.dataValue = dataValue;\n\nvar dataText = function dataText(item, textField) {\n var value = dataValue(item, textField);\n return value == null ? '' : value + '';\n};\n\nexports.dataText = dataText;\n\nfunction dataIndexOf(data, item, valueField) {\n var idx = -1;\n\n var isValueEqual = function isValueEqual(datum) {\n return valueMatcher(item, datum, valueField);\n };\n\n while (++idx < data.length) {\n var datum = data[idx];\n if (datum === item || isValueEqual(datum)) return idx;\n }\n\n return -1;\n}\n/**\n * I don't know that the shallow equal makes sense here but am too afraid to\n * remove it.\n */\n\n\nfunction valueMatcher(a, b, valueField) {\n return (0, _.isShallowEqual)(dataValue(a, valueField), dataValue(b, valueField));\n}\n\nfunction dataItem(data, item, valueField) {\n var idx = dataIndexOf(data, item, valueField);\n return idx !== -1 ? data[idx] : item;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}","export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\nvar OBSERVED_ERROR = {};\n\n/**\n * `Transaction` creates a black box that is able to wrap any method such that\n * certain invariants are maintained before and after the method is invoked\n * (Even if an exception is thrown while invoking the wrapped method). Whoever\n * instantiates a transaction can provide enforcers of the invariants at\n * creation time. The `Transaction` class itself will supply one additional\n * automatic invariant for you - the invariant that any transaction instance\n * should not be run while it is already being run. You would typically create a\n * single instance of a `Transaction` for reuse multiple times, that potentially\n * is used to wrap several different methods. Wrappers are extremely simple -\n * they only require implementing two methods.\n *\n *
    \n *                       wrappers (injected at creation time)\n *                                      +        +\n *                                      |        |\n *                    +-----------------|--------|--------------+\n *                    |                 v        |              |\n *                    |      +---------------+   |              |\n *                    |   +--|    wrapper1   |---|----+         |\n *                    |   |  +---------------+   v    |         |\n *                    |   |          +-------------+  |         |\n *                    |   |     +----|   wrapper2  |--------+   |\n *                    |   |     |    +-------------+  |     |   |\n *                    |   |     |                     |     |   |\n *                    |   v     v                     v     v   | wrapper\n *                    | +---+ +---+   +---------+   +---+ +---+ | invariants\n * perform(anyMethod) | |   | |   |   |         |   |   | |   | | maintained\n * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->\n *                    | |   | |   |   |         |   |   | |   | |\n *                    | |   | |   |   |         |   |   | |   | |\n *                    | |   | |   |   |         |   |   | |   | |\n *                    | +---+ +---+   +---------+   +---+ +---+ |\n *                    |  initialize                    close    |\n *                    +-----------------------------------------+\n * 
    \n *\n * Use cases:\n * - Preserving the input selection ranges before/after reconciliation.\n * Restoring selection even in the event of an unexpected error.\n * - Deactivating events while rearranging the DOM, preventing blurs/focuses,\n * while guaranteeing that afterwards, the event system is reactivated.\n * - Flushing a queue of collected DOM mutations to the main UI thread after a\n * reconciliation takes place in a worker thread.\n * - Invoking any collected `componentDidUpdate` callbacks after rendering new\n * content.\n * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue\n * to preserve the `scrollTop` (an automatic scroll aware DOM).\n * - (Future use case): Layout calculations before and after DOM updates.\n *\n * Transactional plugin API:\n * - A module that has an `initialize` method that returns any precomputation.\n * - and a `close` method that accepts the precomputation. `close` is invoked\n * when the wrapped process is completed, or has failed.\n *\n * @param {Array} transactionWrapper Wrapper modules\n * that implement `initialize` and `close`.\n * @return {Transaction} Single transaction for reuse in thread.\n *\n * @class Transaction\n */\nvar TransactionImpl = {\n /**\n * Sets up this instance so that it is prepared for collecting metrics. Does\n * so such that this setup method may be used on an instance that is already\n * initialized, in a way that does not consume additional memory upon reuse.\n * That can be useful if you decide to make your subclass of this mixin a\n * \"PooledClass\".\n */\n reinitializeTransaction: function () {\n this.transactionWrappers = this.getTransactionWrappers();\n if (this.wrapperInitData) {\n this.wrapperInitData.length = 0;\n } else {\n this.wrapperInitData = [];\n }\n this._isInTransaction = false;\n },\n\n _isInTransaction: false,\n\n /**\n * @abstract\n * @return {Array} Array of transaction wrappers.\n */\n getTransactionWrappers: null,\n\n isInTransaction: function () {\n return !!this._isInTransaction;\n },\n\n /**\n * Executes the function within a safety window. Use this for the top level\n * methods that result in large amounts of computation/mutations that would\n * need to be safety checked. The optional arguments helps prevent the need\n * to bind in many cases.\n *\n * @param {function} method Member of scope to call.\n * @param {Object} scope Scope to invoke from.\n * @param {Object?=} a Argument to pass to the method.\n * @param {Object?=} b Argument to pass to the method.\n * @param {Object?=} c Argument to pass to the method.\n * @param {Object?=} d Argument to pass to the method.\n * @param {Object?=} e Argument to pass to the method.\n * @param {Object?=} f Argument to pass to the method.\n *\n * @return {*} Return value from `method`.\n */\n perform: function (method, scope, a, b, c, d, e, f) {\n !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;\n var errorThrown;\n var ret;\n try {\n this._isInTransaction = true;\n // Catching errors makes debugging more difficult, so we start with\n // errorThrown set to true before setting it to false after calling\n // close -- if it's still set to true in the finally block, it means\n // one of these calls threw.\n errorThrown = true;\n this.initializeAll(0);\n ret = method.call(scope, a, b, c, d, e, f);\n errorThrown = false;\n } finally {\n try {\n if (errorThrown) {\n // If `method` throws, prefer to show that stack trace over any thrown\n // by invoking `closeAll`.\n try {\n this.closeAll(0);\n } catch (err) {}\n } else {\n // Since `method` didn't throw, we don't want to silence the exception\n // here.\n this.closeAll(0);\n }\n } finally {\n this._isInTransaction = false;\n }\n }\n return ret;\n },\n\n initializeAll: function (startIndex) {\n var transactionWrappers = this.transactionWrappers;\n for (var i = startIndex; i < transactionWrappers.length; i++) {\n var wrapper = transactionWrappers[i];\n try {\n // Catching errors makes debugging more difficult, so we start with the\n // OBSERVED_ERROR state before overwriting it with the real return value\n // of initialize -- if it's still set to OBSERVED_ERROR in the finally\n // block, it means wrapper.initialize threw.\n this.wrapperInitData[i] = OBSERVED_ERROR;\n this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;\n } finally {\n if (this.wrapperInitData[i] === OBSERVED_ERROR) {\n // The initializer for wrapper i threw an error; initialize the\n // remaining wrappers but silence any exceptions from them to ensure\n // that the first error is the one to bubble up.\n try {\n this.initializeAll(i + 1);\n } catch (err) {}\n }\n }\n }\n },\n\n /**\n * Invokes each of `this.transactionWrappers.close[i]` functions, passing into\n * them the respective return values of `this.transactionWrappers.init[i]`\n * (`close`rs that correspond to initializers that failed will not be\n * invoked).\n */\n closeAll: function (startIndex) {\n !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;\n var transactionWrappers = this.transactionWrappers;\n for (var i = startIndex; i < transactionWrappers.length; i++) {\n var wrapper = transactionWrappers[i];\n var initData = this.wrapperInitData[i];\n var errorThrown;\n try {\n // Catching errors makes debugging more difficult, so we start with\n // errorThrown set to true before setting it to false after calling\n // close -- if it's still set to true in the finally block, it means\n // wrapper.close threw.\n errorThrown = true;\n if (initData !== OBSERVED_ERROR && wrapper.close) {\n wrapper.close.call(this, initData);\n }\n errorThrown = false;\n } finally {\n if (errorThrown) {\n // The closer for wrapper i threw an error; close the remaining\n // wrappers but silence any exceptions from them to ensure that the\n // first error is the one to bubble up.\n try {\n this.closeAll(i + 1);\n } catch (e) {}\n }\n }\n }\n this.wrapperInitData.length = 0;\n }\n};\n\nmodule.exports = TransactionImpl;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\nvar ViewportMetrics = require('./ViewportMetrics');\n\nvar getEventModifierState = require('./getEventModifierState');\n\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar MouseEventInterface = {\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: getEventModifierState,\n button: function (event) {\n // Webkit, Firefox, IE9+\n // which: 1 2 3\n // button: 0 1 2 (standard)\n var button = event.button;\n if ('which' in event) {\n return button;\n }\n // IE<9\n // which: undefined\n // button: 0 0 0\n // button: 1 4 2 (onmouseup)\n return button === 2 ? 2 : button === 4 ? 1 : 0;\n },\n buttons: null,\n relatedTarget: function (event) {\n return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);\n },\n // \"Proprietary\" Interface.\n pageX: function (event) {\n return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;\n },\n pageY: function (event) {\n return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);\n\nmodule.exports = SyntheticMouseEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar DOMNamespaces = require('./DOMNamespaces');\n\nvar WHITESPACE_TEST = /^[ \\r\\n\\t\\f]/;\nvar NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \\r\\n\\t\\f\\/>]/;\n\nvar createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');\n\n// SVG temp container for IE lacking innerHTML\nvar reusableSVGContainer;\n\n/**\n * Set the innerHTML property of a node, ensuring that whitespace is preserved\n * even in IE8.\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '' + html + '';\n var svgNode = reusableSVGContainer.firstChild;\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n } else {\n node.innerHTML = html;\n }\n});\n\nif (ExecutionEnvironment.canUseDOM) {\n // IE8: When updating a just created node with innerHTML only leading\n // whitespace is removed. When updating an existing node with innerHTML\n // whitespace in root TextNodes is also collapsed.\n // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html\n\n // Feature detection; only IE8 is known to behave improperly like this.\n var testElement = document.createElement('div');\n testElement.innerHTML = ' ';\n if (testElement.innerHTML === '') {\n setInnerHTML = function (node, html) {\n // Magic theory: IE8 supposedly differentiates between added and updated\n // nodes when processing innerHTML, innerHTML on updated nodes suffers\n // from worse whitespace behavior. Re-adding a node like this triggers\n // the initial and more favorable whitespace behavior.\n // TODO: What to do on a detached node?\n if (node.parentNode) {\n node.parentNode.replaceChild(node, node);\n }\n\n // We also implement a workaround for non-visible tags disappearing into\n // thin air on IE8, this only happens if there is no visible text\n // in-front of the non-visible tags. Piggyback on the whitespace fix\n // and simply check if any non-visible tags appear in the source.\n if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {\n // Recover leading whitespace by temporarily prepending any character.\n // \\uFEFF has the potential advantage of being zero-width/invisible.\n // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode\n // in hopes that this is preserved even if \"\\uFEFF\" is transformed to\n // the actual Unicode character (by Babel, for example).\n // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216\n node.innerHTML = String.fromCharCode(0xFEFF) + html;\n\n // deleteData leaves an empty `TextNode` which offsets the index of all\n // children. Definitely want to avoid this.\n var textNode = node.firstChild;\n if (textNode.data.length === 1) {\n node.removeChild(textNode);\n } else {\n textNode.deleteData(0, 1);\n }\n } else {\n node.innerHTML = html;\n }\n };\n }\n testElement = null;\n}\n\nmodule.exports = setInnerHTML;","/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * Based on the escape-html library, which is used under the MIT License below:\n *\n * Copyright (c) 2012-2013 TJ Holowaychuk\n * Copyright (c) 2015 Andreas Lubbe\n * Copyright (c) 2015 Tiancheng \"Timothy\" Gu\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\n'use strict';\n\n// code copied and modified from escape-html\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n case 38:\n // &\n escape = '&';\n break;\n case 39:\n // '\n escape = '''; // modified from escape-html; used to be '''\n break;\n case 60:\n // <\n escape = '<';\n break;\n case 62:\n // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n}\n// end code copied and modified from escape-html\n\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\nfunction escapeTextContentForBrowser(text) {\n if (typeof text === 'boolean' || typeof text === 'number') {\n // this shortcircuit helps perf for types that we know will never have\n // special characters, especially given that this function is used often\n // for numeric dom ids.\n return '' + text;\n }\n return escapeHtml(text);\n}\n\nmodule.exports = escapeTextContentForBrowser;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar EventPluginRegistry = require('./EventPluginRegistry');\nvar ReactEventEmitterMixin = require('./ReactEventEmitterMixin');\nvar ViewportMetrics = require('./ViewportMetrics');\n\nvar getVendorPrefixedEventName = require('./getVendorPrefixedEventName');\nvar isEventSupported = require('./isEventSupported');\n\n/**\n * Summary of `ReactBrowserEventEmitter` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactEventListener, which is injected and can therefore support pluggable\n * event sources. This is the only work that occurs in the main thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginHub`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginHub` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginHub` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|EventPluginHub| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\nvar hasEventPageXY;\nvar alreadyListeningTo = {};\nvar isMonitoringScrollValue = false;\nvar reactTopListenersCounter = 0;\n\n// For events like 'submit' which don't consistently bubble (which we trap at a\n// lower node than `document`), binding at `document` would cause duplicate\n// events so we don't include them here\nvar topEventMapping = {\n topAbort: 'abort',\n topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',\n topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',\n topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',\n topBlur: 'blur',\n topCanPlay: 'canplay',\n topCanPlayThrough: 'canplaythrough',\n topChange: 'change',\n topClick: 'click',\n topCompositionEnd: 'compositionend',\n topCompositionStart: 'compositionstart',\n topCompositionUpdate: 'compositionupdate',\n topContextMenu: 'contextmenu',\n topCopy: 'copy',\n topCut: 'cut',\n topDoubleClick: 'dblclick',\n topDrag: 'drag',\n topDragEnd: 'dragend',\n topDragEnter: 'dragenter',\n topDragExit: 'dragexit',\n topDragLeave: 'dragleave',\n topDragOver: 'dragover',\n topDragStart: 'dragstart',\n topDrop: 'drop',\n topDurationChange: 'durationchange',\n topEmptied: 'emptied',\n topEncrypted: 'encrypted',\n topEnded: 'ended',\n topError: 'error',\n topFocus: 'focus',\n topInput: 'input',\n topKeyDown: 'keydown',\n topKeyPress: 'keypress',\n topKeyUp: 'keyup',\n topLoadedData: 'loadeddata',\n topLoadedMetadata: 'loadedmetadata',\n topLoadStart: 'loadstart',\n topMouseDown: 'mousedown',\n topMouseMove: 'mousemove',\n topMouseOut: 'mouseout',\n topMouseOver: 'mouseover',\n topMouseUp: 'mouseup',\n topPaste: 'paste',\n topPause: 'pause',\n topPlay: 'play',\n topPlaying: 'playing',\n topProgress: 'progress',\n topRateChange: 'ratechange',\n topScroll: 'scroll',\n topSeeked: 'seeked',\n topSeeking: 'seeking',\n topSelectionChange: 'selectionchange',\n topStalled: 'stalled',\n topSuspend: 'suspend',\n topTextInput: 'textInput',\n topTimeUpdate: 'timeupdate',\n topTouchCancel: 'touchcancel',\n topTouchEnd: 'touchend',\n topTouchMove: 'touchmove',\n topTouchStart: 'touchstart',\n topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',\n topVolumeChange: 'volumechange',\n topWaiting: 'waiting',\n topWheel: 'wheel'\n};\n\n/**\n * To ensure no conflicts with other potential React instances on the page\n */\nvar topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);\n\nfunction getListeningForDocument(mountAt) {\n // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`\n // directly.\n if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {\n mountAt[topListenersIDKey] = reactTopListenersCounter++;\n alreadyListeningTo[mountAt[topListenersIDKey]] = {};\n }\n return alreadyListeningTo[mountAt[topListenersIDKey]];\n}\n\n/**\n * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For\n * example:\n *\n * EventPluginHub.putListener('myID', 'onClick', myFunction);\n *\n * This would allocate a \"registration\" of `('onClick', myFunction)` on 'myID'.\n *\n * @internal\n */\nvar ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {\n\n /**\n * Injectable event backend\n */\n ReactEventListener: null,\n\n injection: {\n /**\n * @param {object} ReactEventListener\n */\n injectReactEventListener: function (ReactEventListener) {\n ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);\n ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;\n }\n },\n\n /**\n * Sets whether or not any created callbacks should be enabled.\n *\n * @param {boolean} enabled True if callbacks should be enabled.\n */\n setEnabled: function (enabled) {\n if (ReactBrowserEventEmitter.ReactEventListener) {\n ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);\n }\n },\n\n /**\n * @return {boolean} True if callbacks are enabled.\n */\n isEnabled: function () {\n return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());\n },\n\n /**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} contentDocumentHandle Document which owns the container\n */\n listenTo: function (registrationName, contentDocumentHandle) {\n var mountAt = contentDocumentHandle;\n var isListening = getListeningForDocument(mountAt);\n var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {\n if (dependency === 'topWheel') {\n if (isEventSupported('wheel')) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);\n } else if (isEventSupported('mousewheel')) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);\n } else {\n // Firefox needs to capture a different mouse scroll event.\n // @see http://www.quirksmode.org/dom/events/tests/scroll.html\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);\n }\n } else if (dependency === 'topScroll') {\n\n if (isEventSupported('scroll', true)) {\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);\n } else {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);\n }\n } else if (dependency === 'topFocus' || dependency === 'topBlur') {\n\n if (isEventSupported('focus', true)) {\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);\n } else if (isEventSupported('focusin')) {\n // IE has `focusin` and `focusout` events which bubble.\n // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);\n }\n\n // to make sure blur and focus event listeners are only attached once\n isListening.topBlur = true;\n isListening.topFocus = true;\n } else if (topEventMapping.hasOwnProperty(dependency)) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);\n }\n\n isListening[dependency] = true;\n }\n }\n },\n\n trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {\n return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);\n },\n\n trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {\n return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);\n },\n\n /**\n * Protect against document.createEvent() returning null\n * Some popup blocker extensions appear to do this:\n * https://github.com/facebook/react/issues/6887\n */\n supportsEventPageXY: function () {\n if (!document.createEvent) {\n return false;\n }\n var ev = document.createEvent('MouseEvent');\n return ev != null && 'pageX' in ev;\n },\n\n /**\n * Listens to window scroll and resize events. We cache scroll values so that\n * application code can access them without triggering reflows.\n *\n * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when\n * pageX/pageY isn't supported (legacy browsers).\n *\n * NOTE: Scroll events do not bubble.\n *\n * @see http://www.quirksmode.org/dom/events/scroll.html\n */\n ensureScrollValueMonitoring: function () {\n if (hasEventPageXY === undefined) {\n hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();\n }\n if (!hasEventPageXY && !isMonitoringScrollValue) {\n var refresh = ViewportMetrics.refreshScrollValues;\n ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);\n isMonitoringScrollValue = true;\n }\n }\n\n});\n\nmodule.exports = ReactBrowserEventEmitter;","'use strict';\n\nexports.__esModule = true;\n/**\n * Indicates that navigation was caused by a call to history.push.\n */\nvar PUSH = exports.PUSH = 'PUSH';\n\n/**\n * Indicates that navigation was caused by a call to history.replace.\n */\nvar REPLACE = exports.REPLACE = 'REPLACE';\n\n/**\n * Indicates that navigation was caused by some other action such\n * as using a browser's back/forward buttons and/or manually manipulating\n * the URL in a browser's location bar. This is the default.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate\n * for more information.\n */\nvar POP = exports.POP = 'POP';","'use strict';\n\nexports.__esModule = true;\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = function supportsPopstateOnHashchange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","// JS-YAML's default schema for `load` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on JS-YAML's default safe schema and includes\n// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.\n//\n// Also this schema is used as default base schema at `Schema.create` function.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = Schema.DEFAULT = new Schema({\n include: [\n require('./default_safe')\n ],\n explicit: [\n require('../type/js/undefined'),\n require('../type/js/regexp'),\n require('../type/js/function')\n ]\n});\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = height;\n\nvar _offset = _interopRequireDefault(require(\"./offset\"));\n\nvar _isWindow = _interopRequireDefault(require(\"./isWindow\"));\n\nfunction height(node, client) {\n var win = (0, _isWindow.default)(node);\n return win ? win.innerHeight : client ? node.clientHeight : (0, _offset.default)(node).height;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = getWindow;\n\nfunction getWindow(node) {\n return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Loading = function Loading() {\n return _react.default.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n className: \"rw-i rw-loading\"\n });\n};\n\nvar Button =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Button, _React$Component);\n\n function Button() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Button.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n disabled = _this$props.disabled,\n label = _this$props.label,\n icon = _this$props.icon,\n busy = _this$props.busy,\n active = _this$props.active,\n children = _this$props.children,\n _this$props$variant = _this$props.variant,\n variant = _this$props$variant === void 0 ? 'primary' : _this$props$variant,\n _this$props$spinner = _this$props.spinner,\n spinner = _this$props$spinner === void 0 ? _react.default.createElement(Loading, null) : _this$props$spinner,\n _this$props$component = _this$props.component,\n Tag = _this$props$component === void 0 ? 'button' : _this$props$component,\n props = _objectWithoutProperties(_this$props, [\"className\", \"disabled\", \"label\", \"icon\", \"busy\", \"active\", \"children\", \"variant\", \"spinner\", \"component\"]);\n\n var type = props.type;\n if (Tag === 'button') type = type || 'button';\n return _react.default.createElement(Tag, _extends({}, props, {\n tabIndex: \"-1\",\n title: label,\n type: type,\n disabled: disabled,\n \"aria-disabled\": disabled,\n \"aria-label\": label,\n className: (0, _classnames.default)(className, 'rw-btn', active && !disabled && 'rw-state-active', variant && 'rw-btn-' + variant)\n }), busy ? spinner : icon, children);\n };\n\n return Button;\n}(_react.default.Component);\n\nButton.propTypes = {\n disabled: _propTypes.default.bool,\n label: _propTypes.default.string,\n icon: _propTypes.default.node,\n busy: _propTypes.default.bool,\n active: _propTypes.default.bool,\n variant: _propTypes.default.oneOf(['primary', 'select']),\n component: _propTypes.default.any,\n spinner: _propTypes.default.node\n};\nvar _default = Button;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\n\nvar _spyOnComponent = _interopRequireDefault(require(\"spy-on-component\"));\n\nexports.spyOnComponent = _spyOnComponent.default;\n\nvar _autoFocus = _interopRequireDefault(require(\"./autoFocus\"));\n\nexports.autoFocus = _autoFocus.default;\n\nvar _focusManager = _interopRequireDefault(require(\"./focusManager\"));\n\nexports.focusManager = _focusManager.default;\n\nvar _mountManager = _interopRequireDefault(require(\"./mountManager\"));\n\nexports.mountManager = _mountManager.default;\n\nvar _timeoutManager = _interopRequireDefault(require(\"./timeoutManager\"));\n\nexports.timeoutManager = _timeoutManager.default;\n\nvar _mixin = _interopRequireDefault(require(\"./mixin\"));\n\nexports.mixin = _mixin.default;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","var LIFECYCLE_HOOKS = {\n componentWillMount: true,\n componentDidMount: true,\n componentWillReceiveProps: true,\n getSnapshotBeforeUpdate: true,\n shouldComponentUpdate: true,\n componentWillUpdate: true,\n componentDidUpdate: true,\n componentWillUnmount: true,\n}\n\nvar STATIC_HOOKS = {\n getDerivedStateFromProps: true,\n}\n\nfunction wrap(base, method, isStatic) {\n var before = true\n\n if (Array.isArray(method)) {\n before = method[0] !== 'after'\n method = method[1]\n }\n\n if (!base) return method\n\n return function wrappedLifecyclehook() {\n var ctx = isStatic ? null : this\n before && method.apply(ctx, arguments)\n base.apply(ctx, arguments)\n !before && method.apply(ctx, arguments)\n }\n}\n\nmodule.exports = function spyOnComponent(component, hooks) {\n var originals = Object.create(null)\n\n for (var key in hooks)\n if (STATIC_HOOKS[key])\n component.constructor[key] = wrap(\n (originals[key] = component.constructor[key]),\n hooks[key],\n true\n )\n\n for (var key in hooks)\n if (LIFECYCLE_HOOKS[key])\n component[key] = wrap((originals[key] = component[key]), hooks[key])\n\n return function reset(key) {\n var subject = STATIC_HOOKS[key] ? component.constructor : component\n\n if (key && key in originals) subject[key] = originals[key]\n else for (var key in originals) subject[key] = originals[key]\n }\n}\n\nmodule.exports.mixin = function mixinIntoComponent(componentClass, hooks) {\n spyOnComponent(componentClass.prototype, hooks)\n return componentClass\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar VIEW_UNITS = ['month', 'year', 'decade', 'century'];\n\nfunction clamp(date, min, max) {\n return _dates.default.max(_dates.default.min(date, max), min);\n}\n\nvar CalendarView =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(CalendarView, _React$Component);\n\n function CalendarView() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = CalendarView.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n activeId = _this$props.activeId,\n props = _objectWithoutProperties(_this$props, [\"className\", \"activeId\"]);\n\n return _react.default.createElement(\"table\", _extends({}, props, {\n role: \"grid\",\n tabIndex: \"-1\",\n \"aria-activedescendant\": activeId || null,\n className: (0, _classnames.default)(className, 'rw-nav-view', 'rw-calendar-grid')\n }));\n };\n\n return CalendarView;\n}(_react.default.Component);\n\nCalendarView.propTypes = {\n activeId: _propTypes.default.string\n};\n\nvar CalendarViewCell =\n/*#__PURE__*/\nfunction (_React$Component2) {\n _inheritsLoose(CalendarViewCell, _React$Component2);\n\n function CalendarViewCell() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;\n\n _this.handleChange = function () {\n var _this$props2 = _this.props,\n onChange = _this$props2.onChange,\n min = _this$props2.min,\n max = _this$props2.max,\n date = _this$props2.date;\n onChange(clamp(date, min, max));\n };\n\n return _this;\n }\n\n var _proto2 = CalendarViewCell.prototype;\n\n _proto2.isEmpty = function isEmpty() {\n var _this$props3 = this.props,\n unit = _this$props3.unit,\n min = _this$props3.min,\n max = _this$props3.max,\n date = _this$props3.date;\n return !_dates.default.inRange(date, min, max, unit);\n };\n\n _proto2.isEqual = function isEqual(date) {\n return _dates.default.eq(this.props.date, date, this.props.unit);\n };\n\n _proto2.isFocused = function isFocused() {\n return !this.props.disabled && !this.isEmpty() && this.isEqual(this.props.focused);\n };\n\n _proto2.isNow = function isNow() {\n return this.props.now && this.isEqual(this.props.now);\n };\n\n _proto2.isOffView = function isOffView() {\n var _this$props4 = this.props,\n viewUnit = _this$props4.viewUnit,\n focused = _this$props4.focused,\n date = _this$props4.date;\n return date && focused && viewUnit && _dates.default[viewUnit](date) !== _dates.default[viewUnit](focused);\n };\n\n _proto2.isSelected = function isSelected() {\n return this.props.selected && this.isEqual(this.props.selected);\n };\n\n _proto2.render = function render() {\n var _this$props5 = this.props,\n children = _this$props5.children,\n activeId = _this$props5.activeId,\n label = _this$props5.label,\n disabled = _this$props5.disabled;\n var isDisabled = disabled || this.isEmpty();\n return _react.default.createElement(\"td\", {\n role: \"gridcell\",\n id: this.isFocused() ? activeId : null,\n title: label,\n \"aria-label\": label,\n \"aria-readonly\": disabled,\n \"aria-selected\": this.isSelected(),\n onClick: !isDisabled ? this.handleChange : undefined,\n className: (0, _classnames.default)('rw-cell', this.isNow() && 'rw-now', isDisabled && 'rw-state-disabled', this.isEmpty() && 'rw-cell-not-allowed', this.isOffView() && 'rw-cell-off-range', this.isFocused() && 'rw-state-focus', this.isSelected() && 'rw-state-selected')\n }, children);\n };\n\n return CalendarViewCell;\n}(_react.default.Component);\n\nCalendarViewCell.propTypes = {\n id: _propTypes.default.string,\n activeId: _propTypes.default.string.isRequired,\n label: _propTypes.default.string,\n now: _propTypes.default.instanceOf(Date),\n date: _propTypes.default.instanceOf(Date),\n selected: _propTypes.default.instanceOf(Date),\n focused: _propTypes.default.instanceOf(Date),\n min: _propTypes.default.instanceOf(Date),\n max: _propTypes.default.instanceOf(Date),\n unit: _propTypes.default.oneOf(['day'].concat(VIEW_UNITS)),\n viewUnit: _propTypes.default.oneOf(VIEW_UNITS),\n onChange: _propTypes.default.func.isRequired,\n disabled: _propTypes.default.bool\n};\n\nCalendarView.Body = function (props) {\n return _react.default.createElement(\"tbody\", _extends({\n className: \"rw-calendar-body\"\n }, props));\n};\n\nCalendarView.Row = function (props) {\n return _react.default.createElement(\"tr\", _extends({\n role: \"row\",\n className: \"rw-calendar-row\"\n }, props));\n};\n\nCalendarView.Cell = CalendarViewCell;\nvar _default = CalendarView;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.getMessages = getMessages;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar messages = {\n moveBack: 'Navigate back',\n moveForward: 'Navigate forward',\n dateButton: 'Select date',\n timeButton: 'Select time',\n openCombobox: 'open combobox',\n openDropdown: 'open dropdown',\n placeholder: '',\n filterPlaceholder: '',\n emptyList: 'There are no items in this list',\n emptyFilter: 'The filter returned no results',\n createOption: function createOption(_ref) {\n var searchTerm = _ref.searchTerm;\n return [' Create option', searchTerm && ' ', searchTerm && _react.default.createElement(\"strong\", {\n key: \"_\"\n }, \"\\\"\" + searchTerm + \"\\\"\")];\n },\n tagsLabel: 'Selected items',\n removeLabel: 'Remove selected item',\n noneSelected: 'no selected items',\n selectedItems: function selectedItems(labels) {\n return \"Selected items: \" + labels.join(', ');\n },\n // number\n increment: 'Increment value',\n decrement: 'Decrement value'\n};\n\nfunction getMessages(defaults) {\n if (defaults === void 0) {\n defaults = {};\n }\n\n var processed = {};\n Object.keys(messages).forEach(function (message) {\n var value = defaults[message];\n if (value == null) value = messages[message];\n processed[message] = typeof value === 'function' ? value : function () {\n return value;\n };\n });\n return processed;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.widgetEditable = exports.widgetEnabled = exports.isInDisabledFieldset = void 0;\n\nvar _reactDom = require(\"react-dom\");\n\nvar _matches = _interopRequireDefault(require(\"dom-helpers/query/matches\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar isInDisabledFieldset = function isInDisabledFieldset(inst) {\n var node;\n\n try {\n node = (0, _reactDom.findDOMNode)(inst);\n } catch (err) {\n /* ignore */\n }\n\n return !!node && (0, _matches.default)(node, 'fieldset[disabled] *');\n};\n\nexports.isInDisabledFieldset = isInDisabledFieldset;\nvar widgetEnabled = interactionDecorator(true);\nexports.widgetEnabled = widgetEnabled;\nvar widgetEditable = interactionDecorator(false);\nexports.widgetEditable = widgetEditable;\n\nfunction interactionDecorator(disabledOnly) {\n function wrap(method) {\n return function decoratedMethod() {\n var _this$props = this.props,\n disabled = _this$props.disabled,\n readOnly = _this$props.readOnly;\n disabled = isInDisabledFieldset(this) || disabled == true || !disabledOnly && readOnly === true;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (!disabled) return method.apply(this, args);\n };\n }\n\n return function decorate(target, key, desc) {\n if (desc.initializer) {\n var init = desc.initializer;\n\n desc.initializer = function () {\n return wrap(init.call(this)).bind(this);\n };\n } else desc.value = wrap(desc.value);\n\n return desc;\n };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined;\n\nvar _reducer = require('./reducer');\n\nObject.defineProperty(exports, 'LOCATION_CHANGE', {\n enumerable: true,\n get: function get() {\n return _reducer.LOCATION_CHANGE;\n }\n});\nObject.defineProperty(exports, 'routerReducer', {\n enumerable: true,\n get: function get() {\n return _reducer.routerReducer;\n }\n});\n\nvar _actions = require('./actions');\n\nObject.defineProperty(exports, 'CALL_HISTORY_METHOD', {\n enumerable: true,\n get: function get() {\n return _actions.CALL_HISTORY_METHOD;\n }\n});\nObject.defineProperty(exports, 'push', {\n enumerable: true,\n get: function get() {\n return _actions.push;\n }\n});\nObject.defineProperty(exports, 'replace', {\n enumerable: true,\n get: function get() {\n return _actions.replace;\n }\n});\nObject.defineProperty(exports, 'go', {\n enumerable: true,\n get: function get() {\n return _actions.go;\n }\n});\nObject.defineProperty(exports, 'goBack', {\n enumerable: true,\n get: function get() {\n return _actions.goBack;\n }\n});\nObject.defineProperty(exports, 'goForward', {\n enumerable: true,\n get: function get() {\n return _actions.goForward;\n }\n});\nObject.defineProperty(exports, 'routerActions', {\n enumerable: true,\n get: function get() {\n return _actions.routerActions;\n }\n});\n\nvar _sync = require('./sync');\n\nvar _sync2 = _interopRequireDefault(_sync);\n\nvar _middleware = require('./middleware');\n\nvar _middleware2 = _interopRequireDefault(_middleware);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports.syncHistoryWithStore = _sync2['default'];\nexports.routerMiddleware = _middleware2['default'];","export default function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');\n\nvar canDefineProperty = require('./canDefineProperty');\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Base class helpers for the updating state of a component.\n */\nfunction ReactComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n // We initialize the default updater but the real one gets injected by the\n // renderer.\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nReactComponent.prototype.isReactComponent = {};\n\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\nReactComponent.prototype.setState = function (partialState, callback) {\n !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;\n this.updater.enqueueSetState(this, partialState);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'setState');\n }\n};\n\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\nReactComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'forceUpdate');\n }\n};\n\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\nif (process.env.NODE_ENV !== 'production') {\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n var defineDeprecationWarning = function (methodName, info) {\n if (canDefineProperty) {\n Object.defineProperty(ReactComponent.prototype, methodName, {\n get: function () {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;\n return undefined;\n }\n });\n }\n };\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nmodule.exports = ReactComponent;","/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar warning = require('fbjs/lib/warning');\n\nfunction warnNoop(publicInstance, callerName) {\n if (process.env.NODE_ENV !== 'production') {\n var constructor = publicInstance.constructor;\n process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;\n }\n}\n\n/**\n * This is the abstract API for an update queue.\n */\nvar ReactNoopUpdateQueue = {\n\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @internal\n */\n enqueueCallback: function (publicInstance, callback) {},\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nmodule.exports = ReactNoopUpdateQueue;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Injectable ordering of event plugins.\n */\nvar eventPluginOrder = null;\n\n/**\n * Injectable mapping from names to event plugin modules.\n */\nvar namesToPlugins = {};\n\n/**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\nfunction recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;\n if (EventPluginRegistry.plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;\n EventPluginRegistry.plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;\n }\n }\n}\n\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;\n EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;\n\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n return false;\n}\n\n/**\n * Publishes a registration name that is used to identify dispatched events and\n * can be used with `EventPluginHub.putListener` to register listeners.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;\n EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;\n EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n\n if (process.env.NODE_ENV !== 'production') {\n var lowerCasedName = registrationName.toLowerCase();\n EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n}\n\n/**\n * Registers plugins so that they can extract and dispatch events.\n *\n * @see {EventPluginHub}\n */\nvar EventPluginRegistry = {\n\n /**\n * Ordered list of injected plugins.\n */\n plugins: [],\n\n /**\n * Mapping from event name to dispatch config\n */\n eventNameDispatchConfigs: {},\n\n /**\n * Mapping from registration name to plugin module\n */\n registrationNameModules: {},\n\n /**\n * Mapping from registration name to event name\n */\n registrationNameDependencies: {},\n\n /**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in __DEV__.\n * @type {Object}\n */\n possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,\n // Trust the developer to only use possibleRegistrationNames in __DEV__\n\n /**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginOrder}\n */\n injectEventPluginOrder: function (injectedEventPluginOrder) {\n !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;\n // Clone the ordering so it cannot be dynamically mutated.\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n },\n\n /**\n * Injects plugins to be used by `EventPluginHub`. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginsByName}\n */\n injectEventPluginsByName: function (injectedNamesToPlugins) {\n var isOrderingDirty = false;\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n var pluginModule = injectedNamesToPlugins[pluginName];\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n },\n\n /**\n * Looks up the plugin for the supplied event.\n *\n * @param {object} event A synthetic event.\n * @return {?object} The plugin that created the supplied event.\n * @internal\n */\n getPluginModuleForEvent: function (event) {\n var dispatchConfig = event.dispatchConfig;\n if (dispatchConfig.registrationName) {\n return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;\n }\n if (dispatchConfig.phasedRegistrationNames !== undefined) {\n // pulling phasedRegistrationNames out of dispatchConfig helps Flow see\n // that it is not undefined.\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n\n for (var phase in phasedRegistrationNames) {\n if (!phasedRegistrationNames.hasOwnProperty(phase)) {\n continue;\n }\n var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];\n if (pluginModule) {\n return pluginModule;\n }\n }\n }\n return null;\n },\n\n /**\n * Exposed for unit testing.\n * @private\n */\n _resetEventPlugins: function () {\n eventPluginOrder = null;\n for (var pluginName in namesToPlugins) {\n if (namesToPlugins.hasOwnProperty(pluginName)) {\n delete namesToPlugins[pluginName];\n }\n }\n EventPluginRegistry.plugins.length = 0;\n\n var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;\n for (var eventName in eventNameDispatchConfigs) {\n if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {\n delete eventNameDispatchConfigs[eventName];\n }\n }\n\n var registrationNameModules = EventPluginRegistry.registrationNameModules;\n for (var registrationName in registrationNameModules) {\n if (registrationNameModules.hasOwnProperty(registrationName)) {\n delete registrationNameModules[registrationName];\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;\n for (var lowerCasedName in possibleRegistrationNames) {\n if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {\n delete possibleRegistrationNames[lowerCasedName];\n }\n }\n }\n }\n\n};\n\nmodule.exports = EventPluginRegistry;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactErrorUtils = require('./ReactErrorUtils');\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Injected dependencies:\n */\n\n/**\n * - `ComponentTree`: [required] Module that can convert between React instances\n * and actual node references.\n */\nvar ComponentTree;\nvar TreeTraversal;\nvar injection = {\n injectComponentTree: function (Injected) {\n ComponentTree = Injected;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;\n }\n },\n injectTreeTraversal: function (Injected) {\n TreeTraversal = Injected;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;\n }\n }\n};\n\nfunction isEndish(topLevelType) {\n return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';\n}\n\nfunction isMoveish(topLevelType) {\n return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';\n}\nfunction isStartish(topLevelType) {\n return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';\n}\n\nvar validateEventDispatches;\nif (process.env.NODE_ENV !== 'production') {\n validateEventDispatches = function (event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n\n process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;\n };\n}\n\n/**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\nfunction executeDispatch(event, simulated, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);\n if (simulated) {\n ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);\n } else {\n ReactErrorUtils.invokeGuardedCallback(type, listener, event);\n }\n event.currentTarget = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\nfunction executeDispatchesInOrder(event, simulated) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n if (process.env.NODE_ENV !== 'production') {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, simulated, dispatchListeners, dispatchInstances);\n }\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches, but stops\n * at the first dispatch execution returning true, and returns that id.\n *\n * @return {?string} id of the first dispatch execution who's listener returns\n * true, or null if no listener returned true.\n */\nfunction executeDispatchesInOrderStopAtTrueImpl(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n if (process.env.NODE_ENV !== 'production') {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n if (dispatchListeners[i](event, dispatchInstances[i])) {\n return dispatchInstances[i];\n }\n }\n } else if (dispatchListeners) {\n if (dispatchListeners(event, dispatchInstances)) {\n return dispatchInstances;\n }\n }\n return null;\n}\n\n/**\n * @see executeDispatchesInOrderStopAtTrueImpl\n */\nfunction executeDispatchesInOrderStopAtTrue(event) {\n var ret = executeDispatchesInOrderStopAtTrueImpl(event);\n event._dispatchInstances = null;\n event._dispatchListeners = null;\n return ret;\n}\n\n/**\n * Execution of a \"direct\" dispatch - there must be at most one dispatch\n * accumulated on the event or it is considered an error. It doesn't really make\n * sense for an event with multiple dispatches (bubbled) to keep track of the\n * return values at each dispatch execution, but it does tend to make sense when\n * dealing with \"direct\" dispatches.\n *\n * @return {*} The return value of executing the single dispatch.\n */\nfunction executeDirectDispatch(event) {\n if (process.env.NODE_ENV !== 'production') {\n validateEventDispatches(event);\n }\n var dispatchListener = event._dispatchListeners;\n var dispatchInstance = event._dispatchInstances;\n !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;\n event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;\n var res = dispatchListener ? dispatchListener(event) : null;\n event.currentTarget = null;\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n return res;\n}\n\n/**\n * @param {SyntheticEvent} event\n * @return {boolean} True iff number of dispatches accumulated is greater than 0.\n */\nfunction hasDispatches(event) {\n return !!event._dispatchListeners;\n}\n\n/**\n * General utilities that are useful in creating custom Event Plugins.\n */\nvar EventPluginUtils = {\n isEndish: isEndish,\n isMoveish: isMoveish,\n isStartish: isStartish,\n\n executeDirectDispatch: executeDirectDispatch,\n executeDispatchesInOrder: executeDispatchesInOrder,\n executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,\n hasDispatches: hasDispatches,\n\n getInstanceFromNode: function (node) {\n return ComponentTree.getInstanceFromNode(node);\n },\n getNodeFromInstance: function (node) {\n return ComponentTree.getNodeFromInstance(node);\n },\n isAncestor: function (a, b) {\n return TreeTraversal.isAncestor(a, b);\n },\n getLowestCommonAncestor: function (a, b) {\n return TreeTraversal.getLowestCommonAncestor(a, b);\n },\n getParentInstance: function (inst) {\n return TreeTraversal.getParentInstance(inst);\n },\n traverseTwoPhase: function (target, fn, arg) {\n return TreeTraversal.traverseTwoPhase(target, fn, arg);\n },\n traverseEnterLeave: function (from, to, fn, argFrom, argTo) {\n return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);\n },\n\n injection: injection\n};\n\nmodule.exports = EventPluginUtils;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar caughtError = null;\n\n/**\n * Call a function while guarding against errors that happens within it.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} a First argument\n * @param {*} b Second argument\n */\nfunction invokeGuardedCallback(name, func, a) {\n try {\n func(a);\n } catch (x) {\n if (caughtError === null) {\n caughtError = x;\n }\n }\n}\n\nvar ReactErrorUtils = {\n invokeGuardedCallback: invokeGuardedCallback,\n\n /**\n * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event\n * handler are sure to be rethrown by rethrowCaughtError.\n */\n invokeGuardedCallbackWithCatch: invokeGuardedCallback,\n\n /**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n rethrowCaughtError: function () {\n if (caughtError) {\n var error = caughtError;\n caughtError = null;\n throw error;\n }\n }\n};\n\nif (process.env.NODE_ENV !== 'production') {\n /**\n * To help development we can get better devtools integration by simulating a\n * real browser event.\n */\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {\n var boundFunc = func.bind(null, a);\n var evtType = 'react-' + name;\n fakeNode.addEventListener(evtType, boundFunc, false);\n var evt = document.createEvent('Event');\n // $FlowFixMe https://github.com/facebook/flow/issues/2336\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n fakeNode.removeEventListener(evtType, boundFunc, false);\n };\n }\n}\n\nmodule.exports = ReactErrorUtils;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n var target = nativeEvent.target || nativeEvent.srcElement || window;\n\n // Normalize SVG element events #4963\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n }\n\n // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n return target.nodeType === 3 ? target.parentNode : target;\n}\n\nmodule.exports = getEventTarget;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature = document.implementation && document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\nvar modifierKeyToProp = {\n 'Alt': 'altKey',\n 'Control': 'ctrlKey',\n 'Meta': 'metaKey',\n 'Shift': 'shiftKey'\n};\n\n// IE8 does not implement getModifierState so we simply map it to the only\n// modifier keys exposed by the event itself, does not support Lock-keys.\n// Currently, all major browsers except Chrome seems to support Lock-keys.\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n\nmodule.exports = getEventModifierState;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMLazyTree = require('./DOMLazyTree');\nvar Danger = require('./Danger');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInstrumentation = require('./ReactInstrumentation');\n\nvar createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');\nvar setInnerHTML = require('./setInnerHTML');\nvar setTextContent = require('./setTextContent');\n\nfunction getNodeAfter(parentNode, node) {\n // Special case for text components, which return [open, close] comments\n // from getHostNode.\n if (Array.isArray(node)) {\n node = node[1];\n }\n return node ? node.nextSibling : parentNode.firstChild;\n}\n\n/**\n * Inserts `childNode` as a child of `parentNode` at the `index`.\n *\n * @param {DOMElement} parentNode Parent node in which to insert.\n * @param {DOMElement} childNode Child node to insert.\n * @param {number} index Index at which to insert the child.\n * @internal\n */\nvar insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {\n // We rely exclusively on `insertBefore(node, null)` instead of also using\n // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so\n // we are careful to use `null`.)\n parentNode.insertBefore(childNode, referenceNode);\n});\n\nfunction insertLazyTreeChildAt(parentNode, childTree, referenceNode) {\n DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);\n}\n\nfunction moveChild(parentNode, childNode, referenceNode) {\n if (Array.isArray(childNode)) {\n moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);\n } else {\n insertChildAt(parentNode, childNode, referenceNode);\n }\n}\n\nfunction removeChild(parentNode, childNode) {\n if (Array.isArray(childNode)) {\n var closingComment = childNode[1];\n childNode = childNode[0];\n removeDelimitedText(parentNode, childNode, closingComment);\n parentNode.removeChild(closingComment);\n }\n parentNode.removeChild(childNode);\n}\n\nfunction moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {\n var node = openingComment;\n while (true) {\n var nextNode = node.nextSibling;\n insertChildAt(parentNode, node, referenceNode);\n if (node === closingComment) {\n break;\n }\n node = nextNode;\n }\n}\n\nfunction removeDelimitedText(parentNode, startNode, closingComment) {\n while (true) {\n var node = startNode.nextSibling;\n if (node === closingComment) {\n // The closing comment is removed by ReactMultiChild.\n break;\n } else {\n parentNode.removeChild(node);\n }\n }\n}\n\nfunction replaceDelimitedText(openingComment, closingComment, stringText) {\n var parentNode = openingComment.parentNode;\n var nodeAfterComment = openingComment.nextSibling;\n if (nodeAfterComment === closingComment) {\n // There are no text nodes between the opening and closing comments; insert\n // a new one if stringText isn't empty.\n if (stringText) {\n insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);\n }\n } else {\n if (stringText) {\n // Set the text content of the first node after the opening comment, and\n // remove all following nodes up until the closing comment.\n setTextContent(nodeAfterComment, stringText);\n removeDelimitedText(parentNode, nodeAfterComment, closingComment);\n } else {\n removeDelimitedText(parentNode, openingComment, closingComment);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,\n type: 'replace text',\n payload: stringText\n });\n }\n}\n\nvar dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;\nif (process.env.NODE_ENV !== 'production') {\n dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {\n Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);\n if (prevInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: prevInstance._debugID,\n type: 'replace with',\n payload: markup.toString()\n });\n } else {\n var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);\n if (nextInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: nextInstance._debugID,\n type: 'mount',\n payload: markup.toString()\n });\n }\n }\n };\n}\n\n/**\n * Operations for updating with DOM children.\n */\nvar DOMChildrenOperations = {\n\n dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,\n\n replaceDelimitedText: replaceDelimitedText,\n\n /**\n * Updates a component's children by processing a series of updates. The\n * update configurations are each expected to have a `parentNode` property.\n *\n * @param {array} updates List of update configurations.\n * @internal\n */\n processUpdates: function (parentNode, updates) {\n if (process.env.NODE_ENV !== 'production') {\n var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;\n }\n\n for (var k = 0; k < updates.length; k++) {\n var update = updates[k];\n switch (update.type) {\n case 'INSERT_MARKUP':\n insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'insert child',\n payload: { toIndex: update.toIndex, content: update.content.toString() }\n });\n }\n break;\n case 'MOVE_EXISTING':\n moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'move child',\n payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }\n });\n }\n break;\n case 'SET_MARKUP':\n setInnerHTML(parentNode, update.content);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'replace children',\n payload: update.content.toString()\n });\n }\n break;\n case 'TEXT_CONTENT':\n setTextContent(parentNode, update.content);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'replace text',\n payload: update.content.toString()\n });\n }\n break;\n case 'REMOVE_NODE':\n removeChild(parentNode, update.fromNode);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'remove child',\n payload: { fromIndex: update.fromIndex }\n });\n }\n break;\n }\n }\n }\n\n};\n\nmodule.exports = DOMChildrenOperations;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMNamespaces = {\n html: 'http://www.w3.org/1999/xhtml',\n mathml: 'http://www.w3.org/1998/Math/MathML',\n svg: 'http://www.w3.org/2000/svg'\n};\n\nmodule.exports = DOMNamespaces;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/* globals MSApp */\n\n'use strict';\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\n\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\n\nmodule.exports = createMicrosoftUnsafeLocalFunction;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar React = require('react/lib/React');\nvar ReactPropTypesSecret = require('./ReactPropTypesSecret');\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar hasReadOnlyValue = {\n 'button': true,\n 'checkbox': true,\n 'image': true,\n 'hidden': true,\n 'radio': true,\n 'reset': true,\n 'submit': true\n};\n\nfunction _assertSingleLink(inputProps) {\n !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;\n}\nfunction _assertValueLink(inputProps) {\n _assertSingleLink(inputProps);\n !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\\'t want to use valueLink.') : _prodInvariant('88') : void 0;\n}\n\nfunction _assertCheckedLink(inputProps) {\n _assertSingleLink(inputProps);\n !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\\'t want to use checkedLink') : _prodInvariant('89') : void 0;\n}\n\nvar propTypes = {\n value: function (props, propName, componentName) {\n if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n checked: function (props, propName, componentName) {\n if (!props[propName] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n onChange: React.PropTypes.func\n};\n\nvar loggedTypeFailures = {};\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\nvar LinkedValueUtils = {\n checkPropTypes: function (tagName, props, owner) {\n for (var propName in propTypes) {\n if (propTypes.hasOwnProperty(propName)) {\n var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var addendum = getDeclarationErrorAddendum(owner);\n process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;\n }\n }\n },\n\n /**\n * @param {object} inputProps Props for form component\n * @return {*} current value of the input either from value prop or link.\n */\n getValue: function (inputProps) {\n if (inputProps.valueLink) {\n _assertValueLink(inputProps);\n return inputProps.valueLink.value;\n }\n return inputProps.value;\n },\n\n /**\n * @param {object} inputProps Props for form component\n * @return {*} current checked status of the input either from checked prop\n * or link.\n */\n getChecked: function (inputProps) {\n if (inputProps.checkedLink) {\n _assertCheckedLink(inputProps);\n return inputProps.checkedLink.value;\n }\n return inputProps.checked;\n },\n\n /**\n * @param {object} inputProps Props for form component\n * @param {SyntheticEvent} event change event to handle\n */\n executeOnChange: function (inputProps, event) {\n if (inputProps.valueLink) {\n _assertValueLink(inputProps);\n return inputProps.valueLink.requestChange(event.target.value);\n } else if (inputProps.checkedLink) {\n _assertCheckedLink(inputProps);\n return inputProps.checkedLink.requestChange(event.target.checked);\n } else if (inputProps.onChange) {\n return inputProps.onChange.call(undefined, event);\n }\n }\n};\n\nmodule.exports = LinkedValueUtils;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\nvar injected = false;\n\nvar ReactComponentEnvironment = {\n\n /**\n * Optionally injectable hook for swapping out mount images in the middle of\n * the tree.\n */\n replaceNodeWithMarkup: null,\n\n /**\n * Optionally injectable hook for processing a queue of child updates. Will\n * later move into MultiChildComponents.\n */\n processChildrenUpdates: null,\n\n injection: {\n injectEnvironment: function (environment) {\n !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;\n ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;\n ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;\n injected = true;\n }\n }\n\n};\n\nmodule.exports = ReactComponentEnvironment;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/*eslint-disable no-self-compare */\n\n'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = shallowEqual;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Given a `prevElement` and `nextElement`, determines if the existing\n * instance should be updated as opposed to being destroyed or replaced by a new\n * instance. Both arguments are elements. This ensures that this logic can\n * operate on stateless trees without any backing instance.\n *\n * @param {?object} prevElement\n * @param {?object} nextElement\n * @return {boolean} True if the existing instance should be updated.\n * @protected\n */\n\nfunction shouldUpdateReactComponent(prevElement, nextElement) {\n var prevEmpty = prevElement === null || prevElement === false;\n var nextEmpty = nextElement === null || nextElement === false;\n if (prevEmpty || nextEmpty) {\n return prevEmpty === nextEmpty;\n }\n\n var prevType = typeof prevElement;\n var nextType = typeof nextElement;\n if (prevType === 'string' || prevType === 'number') {\n return nextType === 'string' || nextType === 'number';\n } else {\n return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;\n }\n}\n\nmodule.exports = shouldUpdateReactComponent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n\n return '$' + escapedString;\n}\n\n/**\n * Unescape and unwrap key for human-readable display\n *\n * @param {string} key to unescape.\n * @return {string} the unescaped key.\n */\nfunction unescape(key) {\n var unescapeRegex = /(=0|=2)/g;\n var unescaperLookup = {\n '=0': '=',\n '=2': ':'\n };\n var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);\n\n return ('' + keySubstring).replace(unescapeRegex, function (match) {\n return unescaperLookup[match];\n });\n}\n\nvar KeyEscapeUtils = {\n escape: escape,\n unescape: unescape\n};\n\nmodule.exports = KeyEscapeUtils;","/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactUpdates = require('./ReactUpdates');\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nfunction enqueueUpdate(internalInstance) {\n ReactUpdates.enqueueUpdate(internalInstance);\n}\n\nfunction formatUnexpectedArgument(arg) {\n var type = typeof arg;\n if (type !== 'object') {\n return type;\n }\n var displayName = arg.constructor && arg.constructor.name || type;\n var keys = Object.keys(arg);\n if (keys.length > 0 && keys.length < 20) {\n return displayName + ' (keys: ' + keys.join(', ') + ')';\n }\n return displayName;\n}\n\nfunction getInternalInstanceReadyForUpdate(publicInstance, callerName) {\n var internalInstance = ReactInstanceMap.get(publicInstance);\n if (!internalInstance) {\n if (process.env.NODE_ENV !== 'production') {\n var ctor = publicInstance.constructor;\n // Only warn when we have a callerName. Otherwise we should be silent.\n // We're probably calling from enqueueCallback. We don't want to warn\n // there because we already warned for the corresponding lifecycle method.\n process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;\n }\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;\n }\n\n return internalInstance;\n}\n\n/**\n * ReactUpdateQueue allows for state updates to be scheduled into a later\n * reconciliation step.\n */\nvar ReactUpdateQueue = {\n\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n if (process.env.NODE_ENV !== 'production') {\n var owner = ReactCurrentOwner.current;\n if (owner !== null) {\n process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;\n owner._warnedAboutRefsInRender = true;\n }\n }\n var internalInstance = ReactInstanceMap.get(publicInstance);\n if (internalInstance) {\n // During componentWillMount and render this will still be null but after\n // that will always render to something. At least for now. So we can use\n // this hack.\n return !!internalInstance._renderedComponent;\n } else {\n return false;\n }\n },\n\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @param {string} callerName Name of the calling function in the public API.\n * @internal\n */\n enqueueCallback: function (publicInstance, callback, callerName) {\n ReactUpdateQueue.validateCallback(callback, callerName);\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);\n\n // Previously we would throw an error if we didn't have an internal\n // instance. Since we want to make it a no-op instead, we mirror the same\n // behavior we have in other enqueue* methods.\n // We also need to ignore callbacks in componentWillMount. See\n // enqueueUpdates.\n if (!internalInstance) {\n return null;\n }\n\n if (internalInstance._pendingCallbacks) {\n internalInstance._pendingCallbacks.push(callback);\n } else {\n internalInstance._pendingCallbacks = [callback];\n }\n // TODO: The callback here is ignored when setState is called from\n // componentWillMount. Either fix it or disallow doing so completely in\n // favor of getInitialState. Alternatively, we can disallow\n // componentWillMount during server-side rendering.\n enqueueUpdate(internalInstance);\n },\n\n enqueueCallbackInternal: function (internalInstance, callback) {\n if (internalInstance._pendingCallbacks) {\n internalInstance._pendingCallbacks.push(callback);\n } else {\n internalInstance._pendingCallbacks = [callback];\n }\n enqueueUpdate(internalInstance);\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance) {\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');\n\n if (!internalInstance) {\n return;\n }\n\n internalInstance._pendingForceUpdate = true;\n\n enqueueUpdate(internalInstance);\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState) {\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');\n\n if (!internalInstance) {\n return;\n }\n\n internalInstance._pendingStateQueue = [completeState];\n internalInstance._pendingReplaceState = true;\n\n enqueueUpdate(internalInstance);\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onSetState();\n process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;\n }\n\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');\n\n if (!internalInstance) {\n return;\n }\n\n var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);\n queue.push(partialState);\n\n enqueueUpdate(internalInstance);\n },\n\n enqueueElementInternal: function (internalInstance, nextElement, nextContext) {\n internalInstance._pendingElement = nextElement;\n // TODO: introduce _pendingContext instead of setting it directly.\n internalInstance._context = nextContext;\n enqueueUpdate(internalInstance);\n },\n\n validateCallback: function (callback, callerName) {\n !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;\n }\n\n};\n\nmodule.exports = ReactUpdateQueue;","/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar warning = require('fbjs/lib/warning');\n\nvar validateDOMNesting = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example,
    is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n //

    tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];\n\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',\n\n // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for , including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title'];\n\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n var buttonScopeTags = inScopeTags.concat(['button']);\n\n // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n\n var emptyAncestorInfo = {\n current: null,\n\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n var updatedAncestorInfo = function (oldInfo, tag, instance) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n var info = { tag: tag, instance: instance };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n }\n\n // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n\n /**\n * Returns whether\n */\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n case 'option':\n return tag === '#text';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n case 'html':\n return tag === 'head' || tag === 'body';\n case '#document':\n return tag === 'html';\n }\n\n // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n\n /**\n * Returns whether\n */\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n\n case 'pre':\n case 'listing':\n\n case 'table':\n\n case 'hr':\n\n case 'xmp':\n\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n /**\n * Given a ReactCompositeComponent instance, return a list of its recursive\n * owners, starting at the root and ending with the instance itself.\n */\n var findOwnerStack = function (instance) {\n if (!instance) {\n return [];\n }\n\n var stack = [];\n do {\n stack.push(instance);\n } while (instance = instance._currentElement._owner);\n stack.reverse();\n return stack;\n };\n\n var didWarn = {};\n\n validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var problematic = invalidParent || invalidAncestor;\n\n if (problematic) {\n var ancestorTag = problematic.tag;\n var ancestorInstance = problematic.instance;\n\n var childOwner = childInstance && childInstance._currentElement._owner;\n var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;\n\n var childOwners = findOwnerStack(childOwner);\n var ancestorOwners = findOwnerStack(ancestorOwner);\n\n var minStackLen = Math.min(childOwners.length, ancestorOwners.length);\n var i;\n\n var deepestCommon = -1;\n for (i = 0; i < minStackLen; i++) {\n if (childOwners[i] === ancestorOwners[i]) {\n deepestCommon = i;\n } else {\n break;\n }\n }\n\n var UNKNOWN = '(unknown)';\n var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {\n return inst.getName() || UNKNOWN;\n });\n var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {\n return inst.getName() || UNKNOWN;\n });\n var ownerInfo = [].concat(\n // If the parent and child instances have a common owner ancestor, start\n // with that -- otherwise we just start with the parent's owners.\n deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,\n // If we're warning about an invalid (non-parent) ancestry, add '...'\n invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');\n\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;\n if (didWarn[warnKey]) {\n return;\n }\n didWarn[warnKey] = true;\n\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = ' Make sure you don\\'t have any extra whitespace between tags on ' + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;\n } else {\n process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;\n }\n }\n };\n\n validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;\n\n // For testing\n validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);\n };\n}\n\nmodule.exports = validateDOMNesting;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\n\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode;\n\n // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n }\n\n // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\nmodule.exports = getEventCharCode;","'use strict';\n\nexports.__esModule = true;\nexports.locationShape = exports.routerShape = undefined;\n\nvar _react = require('react');\n\nvar func = _react.PropTypes.func,\n object = _react.PropTypes.object,\n shape = _react.PropTypes.shape,\n string = _react.PropTypes.string;\nvar routerShape = exports.routerShape = shape({\n push: func.isRequired,\n replace: func.isRequired,\n go: func.isRequired,\n goBack: func.isRequired,\n goForward: func.isRequired,\n setRouteLeaveHook: func.isRequired,\n isActive: func.isRequired\n});\n\nvar locationShape = exports.locationShape = shape({\n pathname: string.isRequired,\n search: string.isRequired,\n state: object,\n action: string.isRequired,\n key: string\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.loopAsync = loopAsync;\nexports.mapAsync = mapAsync;\nfunction loopAsync(turns, work, callback) {\n var currentTurn = 0,\n isDone = false;\n var sync = false,\n hasNext = false,\n doneArgs = void 0;\n\n function done() {\n isDone = true;\n if (sync) {\n // Iterate instead of recursing if possible.\n doneArgs = [].concat(Array.prototype.slice.call(arguments));\n return;\n }\n\n callback.apply(this, arguments);\n }\n\n function next() {\n if (isDone) {\n return;\n }\n\n hasNext = true;\n if (sync) {\n // Iterate instead of recursing if possible.\n return;\n }\n\n sync = true;\n\n while (!isDone && currentTurn < turns && hasNext) {\n hasNext = false;\n work.call(this, currentTurn++, next, done);\n }\n\n sync = false;\n\n if (isDone) {\n // This means the loop finished synchronously.\n callback.apply(this, doneArgs);\n return;\n }\n\n if (currentTurn >= turns && hasNext) {\n isDone = true;\n callback();\n }\n }\n\n next();\n}\n\nfunction mapAsync(array, work, callback) {\n var length = array.length;\n var values = [];\n\n if (length === 0) return callback(null, values);\n\n var isDone = false,\n doneCount = 0;\n\n function done(index, error, value) {\n if (isDone) return;\n\n if (error) {\n isDone = true;\n callback(error);\n } else {\n values[index] = value;\n\n isDone = ++doneCount === length;\n\n if (isDone) callback(null, values);\n }\n }\n\n array.forEach(function (item, index) {\n work(item, index, function (error, value) {\n done(index, error, value);\n });\n });\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _getRouteParams = require('./getRouteParams');\n\nvar _getRouteParams2 = _interopRequireDefault(_getRouteParams);\n\nvar _ContextUtils = require('./ContextUtils');\n\nvar _RouteUtils = require('./RouteUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _React$PropTypes = _react2.default.PropTypes,\n array = _React$PropTypes.array,\n func = _React$PropTypes.func,\n object = _React$PropTypes.object;\n\n/**\n * A <RouterContext> renders the component tree for a given router state\n * and sets the history object and the current location in context.\n */\n\nvar RouterContext = _react2.default.createClass({\n displayName: 'RouterContext',\n\n\n mixins: [(0, _ContextUtils.ContextProvider)('router')],\n\n propTypes: {\n router: object.isRequired,\n location: object.isRequired,\n routes: array.isRequired,\n params: object.isRequired,\n components: array.isRequired,\n createElement: func.isRequired\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n createElement: _react2.default.createElement\n };\n },\n\n\n childContextTypes: {\n router: object.isRequired\n },\n\n getChildContext: function getChildContext() {\n return {\n router: this.props.router\n };\n },\n createElement: function createElement(component, props) {\n return component == null ? null : this.props.createElement(component, props);\n },\n render: function render() {\n var _this = this;\n\n var _props = this.props,\n location = _props.location,\n routes = _props.routes,\n params = _props.params,\n components = _props.components,\n router = _props.router;\n\n var element = null;\n\n if (components) {\n element = components.reduceRight(function (element, components, index) {\n if (components == null) return element; // Don't create new children; use the grandchildren.\n\n var route = routes[index];\n var routeParams = (0, _getRouteParams2.default)(route, params);\n var props = {\n location: location,\n params: params,\n route: route,\n router: router,\n routeParams: routeParams,\n routes: routes\n };\n\n if ((0, _RouteUtils.isReactChildren)(element)) {\n props.children = element;\n } else if (element) {\n for (var prop in element) {\n if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop];\n }\n }\n\n if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') {\n var elements = {};\n\n for (var key in components) {\n if (Object.prototype.hasOwnProperty.call(components, key)) {\n // Pass through the key as a prop to createElement to allow\n // custom createElement functions to know which named component\n // they're rendering, for e.g. matching up to fetched data.\n elements[key] = _this.createElement(components[key], _extends({\n key: key }, props));\n }\n }\n\n return elements;\n }\n\n return _this.createElement(components, props);\n }, element);\n }\n\n !(element === null || element === false || _react2.default.isValidElement(element)) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'The root route must render a single element') : (0, _invariant2.default)(false) : void 0;\n\n return element;\n }\n});\n\nexports.default = RouterContext;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\nexports.ContextProvider = ContextProvider;\nexports.ContextSubscriber = ContextSubscriber;\n\nvar _react = require('react');\n\n// Works around issues with context updates failing to propagate.\n// Caveat: the context value is expected to never change its identity.\n// https://github.com/facebook/react/issues/2517\n// https://github.com/reactjs/react-router/issues/470\n\nvar contextProviderShape = _react.PropTypes.shape({\n subscribe: _react.PropTypes.func.isRequired,\n eventIndex: _react.PropTypes.number.isRequired\n});\n\nfunction makeContextName(name) {\n return '@@contextSubscriber/' + name;\n}\n\nfunction ContextProvider(name) {\n var _childContextTypes, _ref2;\n\n var contextName = makeContextName(name);\n var listenersKey = contextName + '/listeners';\n var eventIndexKey = contextName + '/eventIndex';\n var subscribeKey = contextName + '/subscribe';\n\n return _ref2 = {\n childContextTypes: (_childContextTypes = {}, _childContextTypes[contextName] = contextProviderShape.isRequired, _childContextTypes),\n\n getChildContext: function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[contextName] = {\n eventIndex: this[eventIndexKey],\n subscribe: this[subscribeKey]\n }, _ref;\n },\n componentWillMount: function componentWillMount() {\n this[listenersKey] = [];\n this[eventIndexKey] = 0;\n },\n componentWillReceiveProps: function componentWillReceiveProps() {\n this[eventIndexKey]++;\n },\n componentDidUpdate: function componentDidUpdate() {\n var _this = this;\n\n this[listenersKey].forEach(function (listener) {\n return listener(_this[eventIndexKey]);\n });\n }\n }, _ref2[subscribeKey] = function (listener) {\n var _this2 = this;\n\n // No need to immediately call listener here.\n this[listenersKey].push(listener);\n\n return function () {\n _this2[listenersKey] = _this2[listenersKey].filter(function (item) {\n return item !== listener;\n });\n };\n }, _ref2;\n}\n\nfunction ContextSubscriber(name) {\n var _contextTypes, _ref4;\n\n var contextName = makeContextName(name);\n var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex';\n var handleContextUpdateKey = contextName + '/handleContextUpdate';\n var unsubscribeKey = contextName + '/unsubscribe';\n\n return _ref4 = {\n contextTypes: (_contextTypes = {}, _contextTypes[contextName] = contextProviderShape, _contextTypes),\n\n getInitialState: function getInitialState() {\n var _ref3;\n\n if (!this.context[contextName]) {\n return {};\n }\n\n return _ref3 = {}, _ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _ref3;\n },\n componentDidMount: function componentDidMount() {\n if (!this.context[contextName]) {\n return;\n }\n\n this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]);\n },\n componentWillReceiveProps: function componentWillReceiveProps() {\n var _setState;\n\n if (!this.context[contextName]) {\n return;\n }\n\n this.setState((_setState = {}, _setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _setState));\n },\n componentWillUnmount: function componentWillUnmount() {\n if (!this[unsubscribeKey]) {\n return;\n }\n\n this[unsubscribeKey]();\n this[unsubscribeKey] = null;\n }\n }, _ref4[handleContextUpdateKey] = function (eventIndex) {\n if (eventIndex !== this.state[lastRenderedEventIndexKey]) {\n var _setState2;\n\n this.setState((_setState2 = {}, _setState2[lastRenderedEventIndexKey] = eventIndex, _setState2));\n }\n }, _ref4;\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar runTransitionHook = function runTransitionHook(hook, location, callback) {\n var result = hook(location, callback);\n\n if (hook.length < 2) {\n // Assume the hook runs synchronously and automatically\n // call the callback with the return value.\n callback(result);\n } else {\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(result === undefined, 'You should not \"return\" in a transition hook with a callback argument; ' + 'call the callback instead') : void 0;\n }\n};\n\nexports.default = runTransitionHook;","'use strict';\n\nexports.__esModule = true;\n\nvar _AsyncUtils = require('./AsyncUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _runTransitionHook = require('./runTransitionHook');\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _Actions = require('./Actions');\n\nvar _LocationUtils = require('./LocationUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createHistory = function createHistory() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getCurrentLocation = options.getCurrentLocation,\n getUserConfirmation = options.getUserConfirmation,\n pushLocation = options.pushLocation,\n replaceLocation = options.replaceLocation,\n go = options.go,\n keyLength = options.keyLength;\n\n\n var currentLocation = void 0;\n var pendingLocation = void 0;\n var beforeListeners = [];\n var listeners = [];\n var allKeys = [];\n\n var getCurrentIndex = function getCurrentIndex() {\n if (pendingLocation && pendingLocation.action === _Actions.POP) return allKeys.indexOf(pendingLocation.key);\n\n if (currentLocation) return allKeys.indexOf(currentLocation.key);\n\n return -1;\n };\n\n var updateLocation = function updateLocation(nextLocation) {\n var currentIndex = getCurrentIndex();\n\n currentLocation = nextLocation;\n\n if (currentLocation.action === _Actions.PUSH) {\n allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]);\n } else if (currentLocation.action === _Actions.REPLACE) {\n allKeys[currentIndex] = currentLocation.key;\n }\n\n listeners.forEach(function (listener) {\n return listener(currentLocation);\n });\n };\n\n var listenBefore = function listenBefore(listener) {\n beforeListeners.push(listener);\n\n return function () {\n return beforeListeners = beforeListeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var listen = function listen(listener) {\n listeners.push(listener);\n\n return function () {\n return listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, callback) {\n (0, _AsyncUtils.loopAsync)(beforeListeners.length, function (index, next, done) {\n (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) {\n return result != null ? done(result) : next();\n });\n }, function (message) {\n if (getUserConfirmation && typeof message === 'string') {\n getUserConfirmation(message, function (ok) {\n return callback(ok !== false);\n });\n } else {\n callback(message !== false);\n }\n });\n };\n\n var transitionTo = function transitionTo(nextLocation) {\n if (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation) || pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) return; // Nothing to do\n\n pendingLocation = nextLocation;\n\n confirmTransitionTo(nextLocation, function (ok) {\n if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation\n\n pendingLocation = null;\n\n if (ok) {\n // Treat PUSH to same path like REPLACE to be consistent with browsers\n if (nextLocation.action === _Actions.PUSH) {\n var prevPath = (0, _PathUtils.createPath)(currentLocation);\n var nextPath = (0, _PathUtils.createPath)(nextLocation);\n\n if (nextPath === prevPath && (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE;\n }\n\n if (nextLocation.action === _Actions.POP) {\n updateLocation(nextLocation);\n } else if (nextLocation.action === _Actions.PUSH) {\n if (pushLocation(nextLocation) !== false) updateLocation(nextLocation);\n } else if (nextLocation.action === _Actions.REPLACE) {\n if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation);\n }\n } else if (currentLocation && nextLocation.action === _Actions.POP) {\n var prevIndex = allKeys.indexOf(currentLocation.key);\n var nextIndex = allKeys.indexOf(nextLocation.key);\n\n if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL\n }\n });\n };\n\n var push = function push(input) {\n return transitionTo(createLocation(input, _Actions.PUSH));\n };\n\n var replace = function replace(input) {\n return transitionTo(createLocation(input, _Actions.REPLACE));\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength || 6);\n };\n\n var createHref = function createHref(location) {\n return (0, _PathUtils.createPath)(location);\n };\n\n var createLocation = function createLocation(location, action) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey();\n return (0, _LocationUtils.createLocation)(location, action, key);\n };\n\n return {\n getCurrentLocation: getCurrentLocation,\n listenBefore: listenBefore,\n listen: listen,\n transitionTo: transitionTo,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n createKey: createKey,\n createPath: _PathUtils.createPath,\n createHref: createHref,\n createLocation: createLocation\n };\n};\n\nexports.default = createHistory;","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);","'use strict';\n\nexports.__esModule = true;\nexports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined;\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _DOMStateStorage = require('./DOMStateStorage');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar needsHashchangeListener = _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)();\n\nvar _createLocation = function _createLocation(historyState) {\n var key = historyState && historyState.key;\n\n return (0, _LocationUtils.createLocation)({\n pathname: window.location.pathname,\n search: window.location.search,\n hash: window.location.hash,\n state: key ? (0, _DOMStateStorage.readState)(key) : undefined\n }, undefined, key);\n};\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {\n var historyState = void 0;\n try {\n historyState = window.history.state || {};\n } catch (error) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n historyState = {};\n }\n\n return _createLocation(historyState);\n};\n\nvar getUserConfirmation = exports.getUserConfirmation = function getUserConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\nvar startListener = exports.startListener = function startListener(listener) {\n var handlePopState = function handlePopState(event) {\n if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) // Ignore extraneous popstate events in WebKit\n return;\n listener(_createLocation(event.state));\n };\n\n (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n var handleUnpoppedHashChange = function handleUnpoppedHashChange() {\n return listener(getCurrentLocation());\n };\n\n if (needsHashchangeListener) {\n (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);\n }\n\n return function () {\n (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n if (needsHashchangeListener) {\n (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);\n }\n };\n};\n\nvar updateLocation = function updateLocation(location, updateState) {\n var state = location.state,\n key = location.key;\n\n\n if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state);\n\n updateState({ key: key }, (0, _PathUtils.createPath)(location));\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location) {\n return updateLocation(location, function (state, path) {\n return window.history.pushState(state, null, path);\n });\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location) {\n return updateLocation(location, function (state, path) {\n return window.history.replaceState(state, null, path);\n });\n};\n\nvar go = exports.go = function go(n) {\n if (n) window.history.go(n);\n};","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","// Standard YAML's Failsafe schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2802346\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n","var CONSTANTS = {\n\n // Positions\n positions: {\n tl: 'tl',\n tr: 'tr',\n tc: 'tc',\n bl: 'bl',\n br: 'br',\n bc: 'bc'\n },\n\n // Levels\n levels: {\n success: 'success',\n error: 'error',\n warning: 'warning',\n info: 'info'\n },\n\n // Notification defaults\n notification: {\n title: null,\n message: null,\n level: null,\n position: 'tr',\n autoDismiss: 5,\n dismissible: 'both',\n action: null\n }\n};\n\n\nmodule.exports = CONSTANTS;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = uncontrollable;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _invariant = _interopRequireDefault(require(\"invariant\"));\n\nvar Utils = _interopRequireWildcard(require(\"./utils\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction uncontrollable(Component, controlledValues, methods) {\n if (methods === void 0) {\n methods = [];\n }\n\n var displayName = Component.displayName || Component.name || 'Component';\n var isCompositeComponent = Utils.isReactComponent(Component);\n var controlledProps = Object.keys(controlledValues);\n var PROPS_TO_OMIT = controlledProps.map(Utils.defaultKey);\n !(isCompositeComponent || !methods.length) ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, '[uncontrollable] stateless function components cannot pass through methods ' + 'because they have no associated instances. Check component: ' + displayName + ', ' + 'attempting to pass through methods: ' + methods.join(', ')) : invariant(false) : void 0;\n\n var UncontrolledComponent =\n /*#__PURE__*/\n function (_React$Component) {\n _inheritsLoose(UncontrolledComponent, _React$Component);\n\n function UncontrolledComponent() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.handlers = Object.create(null);\n controlledProps.forEach(function (propName) {\n var handlerName = controlledValues[propName];\n\n var handleChange = function handleChange(value) {\n if (_this.props[handlerName]) {\n var _this$props;\n\n _this._notifying = true;\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n (_this$props = _this.props)[handlerName].apply(_this$props, [value].concat(args));\n\n _this._notifying = false;\n }\n\n _this._values[propName] = value;\n if (!_this.unmounted) _this.forceUpdate();\n };\n\n _this.handlers[handlerName] = handleChange;\n });\n if (isCompositeComponent) _this.attachRef = function (ref) {\n _this.inner = ref;\n };\n return _this;\n }\n\n var _proto = UncontrolledComponent.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate() {\n //let the forceUpdate trigger the update\n return !this._notifying;\n };\n\n _proto.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var props = this.props;\n this._values = Object.create(null);\n controlledProps.forEach(function (key) {\n _this2._values[key] = props[Utils.defaultKey(key)];\n });\n };\n\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n var props = this.props;\n controlledProps.forEach(function (key) {\n /**\n * If a prop switches from controlled to Uncontrolled\n * reset its value to the defaultValue\n */\n if (!Utils.isProp(nextProps, key) && Utils.isProp(props, key)) {\n _this3._values[key] = nextProps[Utils.defaultKey(key)];\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.unmounted = true;\n };\n\n _proto.getControlledInstance = function getControlledInstance() {\n return this.inner;\n };\n\n _proto.render = function render() {\n var _this4 = this;\n\n var props = _extends({}, this.props);\n\n PROPS_TO_OMIT.forEach(function (prop) {\n delete props[prop];\n });\n var newProps = {};\n controlledProps.forEach(function (propName) {\n var propValue = _this4.props[propName];\n newProps[propName] = propValue !== undefined ? propValue : _this4._values[propName];\n });\n return _react.default.createElement(Component, _extends({}, props, newProps, this.handlers, {\n ref: this.attachRef\n }));\n };\n\n return UncontrolledComponent;\n }(_react.default.Component);\n\n UncontrolledComponent.displayName = \"Uncontrolled(\" + displayName + \")\";\n UncontrolledComponent.propTypes = Utils.uncontrolledPropTypes(controlledValues, displayName);\n methods.forEach(function (method) {\n UncontrolledComponent.prototype[method] = function $proxiedMethod() {\n var _inner;\n\n return (_inner = this.inner)[method].apply(_inner, arguments);\n };\n });\n UncontrolledComponent.ControlledComponent = Component;\n /**\n * useful when wrapping a Component and you want to control\n * everything\n */\n\n UncontrolledComponent.deferControlTo = function (newComponent, additions, nextMethods) {\n if (additions === void 0) {\n additions = {};\n }\n\n return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);\n };\n\n return UncontrolledComponent;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Widget =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Widget, _React$Component);\n\n function Widget() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Widget.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n tabIndex = _this$props.tabIndex,\n focused = _this$props.focused,\n open = _this$props.open,\n dropUp = _this$props.dropUp,\n disabled = _this$props.disabled,\n readOnly = _this$props.readOnly,\n autofilling = _this$props.autofilling,\n _this$props$isRtl = _this$props.isRtl,\n isRtl = _this$props$isRtl === void 0 ? this.context.isRtl : _this$props$isRtl,\n props = _objectWithoutProperties(_this$props, [\"className\", \"tabIndex\", \"focused\", \"open\", \"dropUp\", \"disabled\", \"readOnly\", \"autofilling\", \"isRtl\"]);\n\n tabIndex = tabIndex != null ? tabIndex : '-1';\n return _react.default.createElement(\"div\", _extends({}, props, {\n tabIndex: tabIndex,\n className: (0, _classnames.default)(className, 'rw-widget', isRtl && 'rw-rtl', disabled && 'rw-state-disabled', readOnly && 'rw-state-readonly', focused && 'rw-state-focus', autofilling && 'rw-webkit-autofill', open && \"rw-open\" + (dropUp ? '-up' : ''))\n }));\n };\n\n return Widget;\n}(_react.default.Component);\n\nWidget.contextTypes = {\n isRtl: _propTypes.default.bool\n};\nWidget.propTypes = {\n tabIndex: _propTypes.default.node,\n focused: _propTypes.default.bool,\n disabled: _propTypes.default.bool,\n readOnly: _propTypes.default.bool,\n autofilling: _propTypes.default.bool,\n open: _propTypes.default.bool,\n dropUp: _propTypes.default.bool,\n isRtl: _propTypes.default.bool\n};\nvar _default = Widget;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = style;\n\nvar _camelizeStyle = _interopRequireDefault(require(\"../util/camelizeStyle\"));\n\nvar _hyphenateStyle = _interopRequireDefault(require(\"../util/hyphenateStyle\"));\n\nvar _getComputedStyle2 = _interopRequireDefault(require(\"./getComputedStyle\"));\n\nvar _removeStyle = _interopRequireDefault(require(\"./removeStyle\"));\n\nvar _properties = require(\"../transition/properties\");\n\nvar _isTransform = _interopRequireDefault(require(\"../transition/isTransform\"));\n\nfunction style(node, property, value) {\n var css = '';\n var transforms = '';\n var props = property;\n\n if (typeof property === 'string') {\n if (value === undefined) {\n return node.style[(0, _camelizeStyle.default)(property)] || (0, _getComputedStyle2.default)(node).getPropertyValue((0, _hyphenateStyle.default)(property));\n } else {\n (props = {})[property] = value;\n }\n }\n\n Object.keys(props).forEach(function (key) {\n var value = props[key];\n\n if (!value && value !== 0) {\n (0, _removeStyle.default)(node, (0, _hyphenateStyle.default)(key));\n } else if ((0, _isTransform.default)(key)) {\n transforms += key + \"(\" + value + \") \";\n } else {\n css += (0, _hyphenateStyle.default)(key) + \": \" + value + \";\";\n }\n });\n\n if (transforms) {\n css += _properties.transform + \": \" + transforms + \";\";\n }\n\n node.style.cssText += ';' + css;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar transform = 'transform';\nexports.transform = transform;\nvar prefix, transitionEnd, animationEnd;\nexports.animationEnd = animationEnd;\nexports.transitionEnd = transitionEnd;\nvar transitionProperty, transitionDuration, transitionTiming, transitionDelay;\nexports.transitionDelay = transitionDelay;\nexports.transitionTiming = transitionTiming;\nexports.transitionDuration = transitionDuration;\nexports.transitionProperty = transitionProperty;\nvar animationName, animationDuration, animationTiming, animationDelay;\nexports.animationDelay = animationDelay;\nexports.animationTiming = animationTiming;\nexports.animationDuration = animationDuration;\nexports.animationName = animationName;\n\nif (_inDOM.default) {\n var _getTransitionPropert = getTransitionProperties();\n\n prefix = _getTransitionPropert.prefix;\n exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;\n exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;\n exports.transform = transform = prefix + \"-\" + transform;\n exports.transitionProperty = transitionProperty = prefix + \"-transition-property\";\n exports.transitionDuration = transitionDuration = prefix + \"-transition-duration\";\n exports.transitionDelay = transitionDelay = prefix + \"-transition-delay\";\n exports.transitionTiming = transitionTiming = prefix + \"-transition-timing-function\";\n exports.animationName = animationName = prefix + \"-animation-name\";\n exports.animationDuration = animationDuration = prefix + \"-animation-duration\";\n exports.animationTiming = animationTiming = prefix + \"-animation-delay\";\n exports.animationDelay = animationDelay = prefix + \"-animation-timing-function\";\n}\n\nvar _default = {\n transform: transform,\n end: transitionEnd,\n property: transitionProperty,\n timing: transitionTiming,\n delay: transitionDelay,\n duration: transitionDuration\n};\nexports.default = _default;\n\nfunction getTransitionProperties() {\n var style = document.createElement('div').style;\n var vendorMap = {\n O: function O(e) {\n return \"o\" + e.toLowerCase();\n },\n Moz: function Moz(e) {\n return e.toLowerCase();\n },\n Webkit: function Webkit(e) {\n return \"webkit\" + e;\n },\n ms: function ms(e) {\n return \"MS\" + e;\n }\n };\n var vendors = Object.keys(vendorMap);\n var transitionEnd, animationEnd;\n var prefix = '';\n\n for (var i = 0; i < vendors.length; i++) {\n var vendor = vendors[i];\n\n if (vendor + \"TransitionProperty\" in style) {\n prefix = \"-\" + vendor.toLowerCase();\n transitionEnd = vendorMap[vendor]('TransitionEnd');\n animationEnd = vendorMap[vendor]('AnimationEnd');\n break;\n }\n }\n\n if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';\n if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';\n style = null;\n return {\n animationEnd: animationEnd,\n transitionEnd: transitionEnd,\n prefix: prefix\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = spyOnMount;\n\nvar _spyOnComponent = _interopRequireDefault(require(\"spy-on-component\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction spyOnMount(componentInstance) {\n var mounted = true;\n (0, _spyOnComponent.default)(componentInstance, {\n componentWillUnmount: function componentWillUnmount() {\n mounted = false;\n }\n });\n return function () {\n return mounted;\n };\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = exports.search = exports.clock = exports.calendar = exports.chevronLeft = exports.chevronRight = exports.caretDown = exports.caretUp = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar propTypes = {\n icon: _propTypes.default.string.isRequired\n};\n\nvar Icon = function Icon(_ref) {\n var icon = _ref.icon;\n return _react.default.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n className: \"rw-i rw-i-\" + icon\n });\n};\n\nIcon.propTypes = propTypes;\n\nvar caretUp = _react.default.createElement(Icon, {\n icon: \"caret-up\"\n});\n\nexports.caretUp = caretUp;\n\nvar caretDown = _react.default.createElement(Icon, {\n icon: \"caret-down\"\n});\n\nexports.caretDown = caretDown;\n\nvar chevronRight = _react.default.createElement(Icon, {\n icon: \"chevron-right\"\n});\n\nexports.chevronRight = chevronRight;\n\nvar chevronLeft = _react.default.createElement(Icon, {\n icon: \"chevron-left\"\n});\n\nexports.chevronLeft = chevronLeft;\n\nvar calendar = _react.default.createElement(Icon, {\n icon: \"calendar\"\n});\n\nexports.calendar = calendar;\n\nvar clock = _react.default.createElement(Icon, {\n icon: \"clock-o\"\n});\n\nexports.clock = clock;\n\nvar search = _react.default.createElement(Icon, {\n icon: \"search\"\n});\n\nexports.search = search;\nvar _default = Icon;\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createFocusManager;\n\nvar _reactComponentManagers = require(\"react-component-managers\");\n\nvar _interaction = require(\"./interaction\");\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction createFocusManager(inst, options) {\n var _didHandle = options.didHandle;\n return (0, _reactComponentManagers.focusManager)(inst, _extends({}, options, {\n onChange: function onChange(focused) {\n inst.setState({\n focused: focused\n });\n },\n isDisabled: function isDisabled() {\n return inst.props.disabled === true || (0, _interaction.isInDisabledFieldset)(inst);\n },\n didHandle: function didHandle(focused, event) {\n var handler = this.props[focused ? 'onFocus' : 'onBlur'];\n handler && handler(event);\n if (_didHandle && !event.isWidgetDefaultPrevented) _didHandle(focused, event);\n }\n }));\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.defaultGetDataState = defaultGetDataState;\nexports.getCommonListProps = getCommonListProps;\nexports.default = reduceToListState;\n\nvar _Filter = require(\"./Filter\");\n\nvar _ = require(\"./_\");\n\nvar _dataHelpers = require(\"./dataHelpers\");\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nvar EMPTY_VALUE = {};\n\nvar returnFalse = function returnFalse() {\n return false;\n};\n\nfunction defaultGetDataState(data, _ref, lastState) {\n var groupBy = _ref.groupBy;\n\n if (lastState === void 0) {\n lastState = {};\n }\n\n if (lastState.data !== data || lastState.groupBy !== groupBy) {\n if (!groupBy) return {};\n var keys = [];\n var groups = (0, _.groupBySortedKeys)(groupBy, data, keys);\n return {\n data: data,\n groupBy: groupBy,\n groups: groups,\n sortedKeys: keys,\n sequentialData: Object.keys(groups).reduce(function (flat, grp) {\n return flat.concat(groups[grp]);\n }, [])\n };\n }\n\n return lastState;\n}\n\nvar getStateGetterFromList = function getStateGetterFromList(_ref2) {\n var l = _ref2.listComponent;\n return l && l.getDataState;\n};\n\nvar getIsDisabled = function getIsDisabled(disabledProp, valueField) {\n return !Array.isArray(disabledProp) ? returnFalse : function (item) {\n return disabledProp.some(function (i) {\n return (0, _dataHelpers.dataValue)(item, valueField) === (0, _dataHelpers.dataValue)(i, valueField);\n });\n };\n};\n\nfunction getCommonListProps(list, accessors, _ref3) {\n var groupBy = _ref3.groupBy,\n optionComponent = _ref3.optionComponent,\n itemComponent = _ref3.itemComponent,\n groupComponent = _ref3.groupComponent,\n searchTerm = _ref3.searchTerm,\n listProps = _ref3.listProps;\n return _extends({\n searchTerm: searchTerm,\n groupBy: groupBy,\n groupComponent: groupComponent,\n itemComponent: itemComponent,\n optionComponent: optionComponent\n }, listProps, {\n data: list.data,\n dataState: list.state,\n textAccessor: accessors.text,\n valueAccessor: accessors.value\n });\n}\n\nfunction reduceToListState(nextListData, prevList, _temp) {\n var _ref4 = _temp === void 0 ? {} : _temp,\n nextProps = _ref4.nextProps,\n getDataState = _ref4.getDataState;\n\n var disabled = nextProps.disabled,\n valueField = nextProps.valueField,\n textField = nextProps.textField;\n getDataState = getDataState || getStateGetterFromList(nextProps) || defaultGetDataState;\n var dataState = getDataState(nextListData, nextProps, prevList && prevList.dataState);\n var data = dataState && dataState.sequentialData || nextListData;\n var isDisabled = getIsDisabled(disabled, valueField);\n\n var moveNext = function moveNext(item, word) {\n return isDisabled(item) || word && !_Filter.presets.startsWith((0, _dataHelpers.dataText)(item, textField).toLowerCase(), word.toLowerCase());\n };\n\n var list = {\n dataState: dataState,\n isDisabled: isDisabled,\n first: function first() {\n return list.next(EMPTY_VALUE);\n },\n last: function last() {\n return list.prevEnabled(data[data.length - 1]);\n },\n prev: function prev(item, word) {\n var nextIdx = Math.max(0, data.indexOf(item)) - 1;\n\n while (nextIdx > -1 && moveNext(data[nextIdx], word)) {\n nextIdx--;\n }\n\n if (nextIdx >= 0) return data[nextIdx];\n return isDisabled(item) ? null : item;\n },\n next: function next(item, word) {\n var nextIdx = data.indexOf(item) + 1;\n\n while (nextIdx < data.length && moveNext(data[nextIdx], word)) {\n nextIdx++;\n }\n\n if (nextIdx < data.length) return data[nextIdx];\n return isDisabled(item) ? null : item;\n },\n prevEnabled: function prevEnabled(item) {\n return isDisabled(item) ? list.prev(item) : item;\n },\n nextEnabled: function nextEnabled(item) {\n return isDisabled(item) ? list.next(item) : item;\n }\n };\n return list;\n}","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n arguments: true,\n arity: true\n};\n\nvar isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';\n\nmodule.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n var keys = Object.getOwnPropertyNames(sourceComponent);\n\n /* istanbul ignore else */\n if (isGetOwnPropertySymbolsAvailable) {\n keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {\n try {\n targetComponent[keys[i]] = sourceComponent[keys[i]];\n } catch (error) {\n\n }\n }\n }\n }\n\n return targetComponent;\n};\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","'use strict';\n\n\nvar yaml = require('./lib/js-yaml.js');\n\n\nmodule.exports = yaml;\n","'use strict';\n\nexports.__esModule = true;\nfunction createThunkMiddleware(extraArgument) {\n return function (_ref) {\n var dispatch = _ref.dispatch;\n var getState = _ref.getState;\n return function (next) {\n return function (action) {\n if (typeof action === 'function') {\n return action(dispatch, getState, extraArgument);\n }\n\n return next(action);\n };\n };\n };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexports['default'] = thunk;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar canDefineProperty = false;\nif (process.env.NODE_ENV !== 'production') {\n try {\n // $FlowFixMe https://github.com/facebook/flow/issues/285\n Object.defineProperty({}, 'x', { get: function () {} });\n canDefineProperty = true;\n } catch (x) {\n // IE will fail on defineProperty\n }\n}\n\nmodule.exports = canDefineProperty;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\n\nvar REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;\n\nmodule.exports = REACT_ELEMENT_TYPE;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/* global Symbol */\n\nvar ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n/**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\nfunction getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\nmodule.exports = getIteratorFn;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar ReactPropTypeLocationNames = {};\n\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n}\n\nmodule.exports = ReactPropTypeLocationNames;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.routerReducer = routerReducer;\n/**\n * This action type will be dispatched when your history\n * receives a location change.\n */\nvar LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE';\n\nvar initialState = {\n locationBeforeTransitions: null\n};\n\n/**\n * This reducer will update the state with the most recent location history\n * has transitioned to. This may not be in sync with the router, particularly\n * if you have asynchronously-loaded routes, so reading from and relying on\n * this state is discouraged.\n */\nfunction routerReducer() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n type = _ref.type,\n payload = _ref.payload;\n\n if (type === LOCATION_CHANGE) {\n return _extends({}, state, { locationBeforeTransitions: payload });\n }\n\n return state;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * This action type will be dispatched by the history actions below.\n * If you're writing a middleware to watch for navigation events, be sure to\n * look for actions of this type.\n */\nvar CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';\n\nfunction updateLocation(method) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return {\n type: CALL_HISTORY_METHOD,\n payload: { method: method, args: args }\n };\n };\n}\n\n/**\n * These actions correspond to the history API.\n * The associated routerMiddleware will capture these events before they get to\n * your reducer and reissue them as the matching function on your history.\n */\nvar push = exports.push = updateLocation('push');\nvar replace = exports.replace = updateLocation('replace');\nvar go = exports.go = updateLocation('go');\nvar goBack = exports.goBack = updateLocation('goBack');\nvar goForward = exports.goForward = updateLocation('goForward');\n\nvar routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward };","/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactDOMComponentFlags = {\n hasCachedChildNodes: 1 << 0\n};\n\nmodule.exports = ReactDOMComponentFlags;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;\n\n if (current == null) {\n return next;\n }\n\n // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n current.push(next);\n return current;\n }\n\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\nmodule.exports = accumulateInto;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/**\n * @param {array} arr an \"accumulation\" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n */\n\nfunction forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n}\n\nmodule.exports = forEachAccumulated;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n\nvar contentKey = null;\n\n/**\n * Gets the key used to access text content on a DOM node.\n *\n * @return {?string} Key used to access text content.\n * @internal\n */\nfunction getTextContentAccessor() {\n if (!contentKey && ExecutionEnvironment.canUseDOM) {\n // Prefer textContent to innerText because many browsers support both but\n // SVG <text> elements don't support innerText even when <div> does.\n contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';\n }\n return contentKey;\n}\n\nmodule.exports = getTextContentAccessor;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar PooledClass = require('./PooledClass');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * A specialized pseudo-event module to help keep track of components waiting to\n * be notified when their DOM representations are available for use.\n *\n * This implements `PooledClass`, so you should never need to instantiate this.\n * Instead, use `CallbackQueue.getPooled()`.\n *\n * @class ReactMountReady\n * @implements PooledClass\n * @internal\n */\n\nvar CallbackQueue = function () {\n function CallbackQueue(arg) {\n _classCallCheck(this, CallbackQueue);\n\n this._callbacks = null;\n this._contexts = null;\n this._arg = arg;\n }\n\n /**\n * Enqueues a callback to be invoked when `notifyAll` is invoked.\n *\n * @param {function} callback Invoked when `notifyAll` is invoked.\n * @param {?object} context Context to call `callback` with.\n * @internal\n */\n\n\n CallbackQueue.prototype.enqueue = function enqueue(callback, context) {\n this._callbacks = this._callbacks || [];\n this._callbacks.push(callback);\n this._contexts = this._contexts || [];\n this._contexts.push(context);\n };\n\n /**\n * Invokes all enqueued callbacks and clears the queue. This is invoked after\n * the DOM representation of a component has been created or updated.\n *\n * @internal\n */\n\n\n CallbackQueue.prototype.notifyAll = function notifyAll() {\n var callbacks = this._callbacks;\n var contexts = this._contexts;\n var arg = this._arg;\n if (callbacks && contexts) {\n !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;\n this._callbacks = null;\n this._contexts = null;\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i].call(contexts[i], arg);\n }\n callbacks.length = 0;\n contexts.length = 0;\n }\n };\n\n CallbackQueue.prototype.checkpoint = function checkpoint() {\n return this._callbacks ? this._callbacks.length : 0;\n };\n\n CallbackQueue.prototype.rollback = function rollback(len) {\n if (this._callbacks && this._contexts) {\n this._callbacks.length = len;\n this._contexts.length = len;\n }\n };\n\n /**\n * Resets the internal queue.\n *\n * @internal\n */\n\n\n CallbackQueue.prototype.reset = function reset() {\n this._callbacks = null;\n this._contexts = null;\n };\n\n /**\n * `PooledClass` looks for this.\n */\n\n\n CallbackQueue.prototype.destructor = function destructor() {\n this.reset();\n };\n\n return CallbackQueue;\n}();\n\nmodule.exports = PooledClass.addPoolingTo(CallbackQueue);","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar ReactFeatureFlags = {\n // When true, call console.time() before and .timeEnd() after each top-level\n // render (both initial renders and updates). Useful when looking at prod-mode\n // timeline profiles in Chrome, for example.\n logTopLevelRenders: false\n};\n\nmodule.exports = ReactFeatureFlags;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\n\nvar supportedInputTypes = {\n 'color': true,\n 'date': true,\n 'datetime': true,\n 'datetime-local': true,\n 'email': true,\n 'month': true,\n 'number': true,\n 'password': true,\n 'range': true,\n 'search': true,\n 'tel': true,\n 'text': true,\n 'time': true,\n 'url': true,\n 'week': true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isTextInputElement;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ViewportMetrics = {\n\n currentScrollLeft: 0,\n\n currentScrollTop: 0,\n\n refreshScrollValues: function (scrollPosition) {\n ViewportMetrics.currentScrollLeft = scrollPosition.x;\n ViewportMetrics.currentScrollTop = scrollPosition.y;\n }\n\n};\n\nmodule.exports = ViewportMetrics;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar setInnerHTML = require('./setInnerHTML');\n\n/**\n * Set the textContent property of a node, ensuring that whitespace is preserved\n * even in IE8. innerText is a poor substitute for textContent and, among many\n * issues, inserts <br> instead of the literal newline chars. innerHTML behaves\n * as it should.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n};\n\nif (ExecutionEnvironment.canUseDOM) {\n if (!('textContent' in document.documentElement)) {\n setTextContent = function (node, text) {\n if (node.nodeType === 3) {\n node.nodeValue = text;\n return;\n }\n setInnerHTML(node, escapeTextContentForBrowser(text));\n };\n }\n}\n\nmodule.exports = setTextContent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * @param {DOMElement} node input/textarea to focus\n */\n\nfunction focusNode(node) {\n // IE8 can throw \"Can't move focus to the control because it is invisible,\n // not enabled, or of a type that does not accept the focus.\" for all kinds of\n // reasons that are too expensive and fragile to test.\n try {\n node.focus();\n } catch (e) {}\n}\n\nmodule.exports = focusNode;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\n\nvar isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridRow: true,\n gridColumn: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O'];\n\n// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Most style properties can be unset by doing .style[prop] = '' but IE8\n * doesn't like doing that with shorthand properties so for the properties that\n * IE8 breaks on, which are listed here, we instead unset each of the\n * individual properties. See http://bugs.jquery.com/ticket/12385.\n * The 4-value 'clock' properties like margin, padding, border-width seem to\n * behave without any problems. Curiously, list-style works too without any\n * special prodding.\n */\nvar shorthandPropertyExpansions = {\n background: {\n backgroundAttachment: true,\n backgroundColor: true,\n backgroundImage: true,\n backgroundPositionX: true,\n backgroundPositionY: true,\n backgroundRepeat: true\n },\n backgroundPosition: {\n backgroundPositionX: true,\n backgroundPositionY: true\n },\n border: {\n borderWidth: true,\n borderStyle: true,\n borderColor: true\n },\n borderBottom: {\n borderBottomWidth: true,\n borderBottomStyle: true,\n borderBottomColor: true\n },\n borderLeft: {\n borderLeftWidth: true,\n borderLeftStyle: true,\n borderLeftColor: true\n },\n borderRight: {\n borderRightWidth: true,\n borderRightStyle: true,\n borderRightColor: true\n },\n borderTop: {\n borderTopWidth: true,\n borderTopStyle: true,\n borderTopColor: true\n },\n font: {\n fontStyle: true,\n fontVariant: true,\n fontWeight: true,\n fontSize: true,\n lineHeight: true,\n fontFamily: true\n },\n outline: {\n outlineWidth: true,\n outlineStyle: true,\n outlineColor: true\n }\n};\n\nvar CSSProperty = {\n isUnitlessNumber: isUnitlessNumber,\n shorthandPropertyExpansions: shorthandPropertyExpansions\n};\n\nmodule.exports = CSSProperty;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMProperty = require('./DOMProperty');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInstrumentation = require('./ReactInstrumentation');\n\nvar quoteAttributeValueForBrowser = require('./quoteAttributeValueForBrowser');\nvar warning = require('fbjs/lib/warning');\n\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\n\nfunction isAttributeNameSafe(attributeName) {\n if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {\n return true;\n }\n if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {\n return false;\n }\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n illegalAttributeNameCache[attributeName] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;\n return false;\n}\n\nfunction shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}\n\n/**\n * Operations for dealing with DOM properties.\n */\nvar DOMPropertyOperations = {\n\n /**\n * Creates markup for the ID property.\n *\n * @param {string} id Unescaped ID.\n * @return {string} Markup string.\n */\n createMarkupForID: function (id) {\n return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);\n },\n\n setAttributeForID: function (node, id) {\n node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);\n },\n\n createMarkupForRoot: function () {\n return DOMProperty.ROOT_ATTRIBUTE_NAME + '=\"\"';\n },\n\n setAttributeForRoot: function (node) {\n node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');\n },\n\n /**\n * Creates markup for a property.\n *\n * @param {string} name\n * @param {*} value\n * @return {?string} Markup string, or null if the property was invalid.\n */\n createMarkupForProperty: function (name, value) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n if (shouldIgnoreValue(propertyInfo, value)) {\n return '';\n }\n var attributeName = propertyInfo.attributeName;\n if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {\n return attributeName + '=\"\"';\n }\n return attributeName + '=' + quoteAttributeValueForBrowser(value);\n } else if (DOMProperty.isCustomAttribute(name)) {\n if (value == null) {\n return '';\n }\n return name + '=' + quoteAttributeValueForBrowser(value);\n }\n return null;\n },\n\n /**\n * Creates markup for a custom property.\n *\n * @param {string} name\n * @param {*} value\n * @return {string} Markup string, or empty string if the property was invalid.\n */\n createMarkupForCustomAttribute: function (name, value) {\n if (!isAttributeNameSafe(name) || value == null) {\n return '';\n }\n return name + '=' + quoteAttributeValueForBrowser(value);\n },\n\n /**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n setValueForProperty: function (node, name, value) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, value);\n } else if (shouldIgnoreValue(propertyInfo, value)) {\n this.deleteValueForProperty(node, name);\n return;\n } else if (propertyInfo.mustUseProperty) {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyInfo.propertyName] = value;\n } else {\n var attributeName = propertyInfo.attributeName;\n var namespace = propertyInfo.attributeNamespace;\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n if (namespace) {\n node.setAttributeNS(namespace, attributeName, '' + value);\n } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {\n node.setAttribute(attributeName, '');\n } else {\n node.setAttribute(attributeName, '' + value);\n }\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n DOMPropertyOperations.setValueForAttribute(node, name, value);\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var payload = {};\n payload[name] = value;\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'update attribute',\n payload: payload\n });\n }\n },\n\n setValueForAttribute: function (node, name, value) {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (value == null) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, '' + value);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var payload = {};\n payload[name] = value;\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'update attribute',\n payload: payload\n });\n }\n },\n\n /**\n * Deletes an attributes from a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\n deleteValueForAttribute: function (node, name) {\n node.removeAttribute(name);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'remove attribute',\n payload: name\n });\n }\n },\n\n /**\n * Deletes the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\n deleteValueForProperty: function (node, name) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, undefined);\n } else if (propertyInfo.mustUseProperty) {\n var propName = propertyInfo.propertyName;\n if (propertyInfo.hasBooleanValue) {\n node[propName] = false;\n } else {\n node[propName] = '';\n }\n } else {\n node.removeAttribute(propertyInfo.attributeName);\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n node.removeAttribute(name);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'remove attribute',\n payload: name\n });\n }\n }\n\n};\n\nmodule.exports = DOMPropertyOperations;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar LinkedValueUtils = require('./LinkedValueUtils');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\n\nvar warning = require('fbjs/lib/warning');\n\nvar didWarnValueLink = false;\nvar didWarnValueDefaultValue = false;\n\nfunction updateOptionsIfPendingUpdateAndMounted() {\n if (this._rootNodeID && this._wrapperState.pendingUpdate) {\n this._wrapperState.pendingUpdate = false;\n\n var props = this._currentElement.props;\n var value = LinkedValueUtils.getValue(props);\n\n if (value != null) {\n updateOptions(this, Boolean(props.multiple), value);\n }\n }\n}\n\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n\n/**\n * Validation function for `value` and `defaultValue`.\n * @private\n */\nfunction checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}\n\n/**\n * @param {ReactDOMComponent} inst\n * @param {boolean} multiple\n * @param {*} propValue A stringable (with `multiple`, a list of stringables).\n * @private\n */\nfunction updateOptions(inst, multiple, propValue) {\n var selectedValue, i;\n var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;\n\n if (multiple) {\n selectedValue = {};\n for (i = 0; i < propValue.length; i++) {\n selectedValue['' + propValue[i]] = true;\n }\n for (i = 0; i < options.length; i++) {\n var selected = selectedValue.hasOwnProperty(options[i].value);\n if (options[i].selected !== selected) {\n options[i].selected = selected;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n selectedValue = '' + propValue;\n for (i = 0; i < options.length; i++) {\n if (options[i].value === selectedValue) {\n options[i].selected = true;\n return;\n }\n }\n if (options.length) {\n options[0].selected = true;\n }\n }\n}\n\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\nvar ReactDOMSelect = {\n getHostProps: function (inst, props) {\n return _assign({}, props, {\n onChange: inst._wrapperState.onChange,\n value: undefined\n });\n },\n\n mountWrapper: function (inst, props) {\n if (process.env.NODE_ENV !== 'production') {\n checkSelectPropTypes(inst, props);\n }\n\n var value = LinkedValueUtils.getValue(props);\n inst._wrapperState = {\n pendingUpdate: false,\n initialValue: value != null ? value : props.defaultValue,\n listeners: null,\n onChange: _handleChange.bind(inst),\n wasMultiple: Boolean(props.multiple)\n };\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;\n didWarnValueDefaultValue = true;\n }\n },\n\n getSelectValueContext: function (inst) {\n // ReactDOMOption looks at this initial value so the initial generated\n // markup has correct `selected` attributes\n return inst._wrapperState.initialValue;\n },\n\n postUpdateWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n // After the initial mount, we control selected-ness manually so don't pass\n // this value down\n inst._wrapperState.initialValue = undefined;\n\n var wasMultiple = inst._wrapperState.wasMultiple;\n inst._wrapperState.wasMultiple = Boolean(props.multiple);\n\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n inst._wrapperState.pendingUpdate = false;\n updateOptions(inst, Boolean(props.multiple), value);\n } else if (wasMultiple !== Boolean(props.multiple)) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(inst, Boolean(props.multiple), props.defaultValue);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');\n }\n }\n }\n};\n\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n\n if (this._rootNodeID) {\n this._wrapperState.pendingUpdate = true;\n }\n ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);\n return returnValue;\n}\n\nmodule.exports = ReactDOMSelect;","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar ReactCompositeComponent = require('./ReactCompositeComponent');\nvar ReactEmptyComponent = require('./ReactEmptyComponent');\nvar ReactHostComponent = require('./ReactHostComponent');\n\nvar getNextDebugID = require('./getNextDebugID');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n// To avoid a cyclic dependency, we create the final class in this module\nvar ReactCompositeComponentWrapper = function (element) {\n this.construct(element);\n};\n_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {\n _instantiateReactComponent: instantiateReactComponent\n});\n\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Check if the type reference is a known internal type. I.e. not a user\n * provided composite type.\n *\n * @param {function} type\n * @return {boolean} Returns true if this is a valid internal type.\n */\nfunction isInternalComponentType(type) {\n return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';\n}\n\n/**\n * Given a ReactNode, create an instance that will actually be mounted.\n *\n * @param {ReactNode} node\n * @param {boolean} shouldHaveDebugID\n * @return {object} A new instance of the element's constructor.\n * @protected\n */\nfunction instantiateReactComponent(node, shouldHaveDebugID) {\n var instance;\n\n if (node === null || node === false) {\n instance = ReactEmptyComponent.create(instantiateReactComponent);\n } else if (typeof node === 'object') {\n var element = node;\n !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;\n\n // Special case string values\n if (typeof element.type === 'string') {\n instance = ReactHostComponent.createInternalComponent(element);\n } else if (isInternalComponentType(element.type)) {\n // This is temporarily available for custom components that are not string\n // representations. I.e. ART. Once those are updated to use the string\n // representation, we can drop this code path.\n instance = new element.type(element);\n\n // We renamed this. Allow the old name for compat. :(\n if (!instance.getHostNode) {\n instance.getHostNode = instance.getNativeNode;\n }\n } else {\n instance = new ReactCompositeComponentWrapper(element);\n }\n } else if (typeof node === 'string' || typeof node === 'number') {\n instance = ReactHostComponent.createInstanceForText(node);\n } else {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;\n }\n\n // These two fields are used by the DOM and ART diffing algorithms\n // respectively. Instead of using expandos on components, we should be\n // storing the state needed by the diffing algorithms elsewhere.\n instance._mountIndex = 0;\n instance._mountImage = null;\n\n if (process.env.NODE_ENV !== 'production') {\n instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;\n }\n\n // Internal instances should fully constructed at this point, so they should\n // not get any new fields added to them at this point.\n if (process.env.NODE_ENV !== 'production') {\n if (Object.preventExtensions) {\n Object.preventExtensions(instance);\n }\n }\n\n return instance;\n}\n\nmodule.exports = instantiateReactComponent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar React = require('react/lib/React');\n\nvar invariant = require('fbjs/lib/invariant');\n\nvar ReactNodeTypes = {\n HOST: 0,\n COMPOSITE: 1,\n EMPTY: 2,\n\n getType: function (node) {\n if (node === null || node === false) {\n return ReactNodeTypes.EMPTY;\n } else if (React.isValidElement(node)) {\n if (typeof node.type === 'function') {\n return ReactNodeTypes.COMPOSITE;\n } else {\n return ReactNodeTypes.HOST;\n }\n }\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;\n }\n};\n\nmodule.exports = ReactNodeTypes;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar emptyComponentFactory;\n\nvar ReactEmptyComponentInjection = {\n injectEmptyComponentFactory: function (factory) {\n emptyComponentFactory = factory;\n }\n};\n\nvar ReactEmptyComponent = {\n create: function (instantiate) {\n return emptyComponentFactory(instantiate);\n }\n};\n\nReactEmptyComponent.injection = ReactEmptyComponentInjection;\n\nmodule.exports = ReactEmptyComponent;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar invariant = require('fbjs/lib/invariant');\n\nvar genericComponentClass = null;\n// This registry keeps track of wrapper classes around host tags.\nvar tagToComponentClass = {};\nvar textComponentClass = null;\n\nvar ReactHostComponentInjection = {\n // This accepts a class that receives the tag string. This is a catch all\n // that can render any kind of tag.\n injectGenericComponentClass: function (componentClass) {\n genericComponentClass = componentClass;\n },\n // This accepts a text component class that takes the text string to be\n // rendered as props.\n injectTextComponentClass: function (componentClass) {\n textComponentClass = componentClass;\n },\n // This accepts a keyed object with classes as values. Each key represents a\n // tag. That particular tag will use this class instead of the generic one.\n injectComponentClasses: function (componentClasses) {\n _assign(tagToComponentClass, componentClasses);\n }\n};\n\n/**\n * Get a host internal component class for a specific tag.\n *\n * @param {ReactElement} element The element to create.\n * @return {function} The internal class constructor function.\n */\nfunction createInternalComponent(element) {\n !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;\n return new genericComponentClass(element);\n}\n\n/**\n * @param {ReactText} text\n * @return {ReactComponent}\n */\nfunction createInstanceForText(text) {\n return new textComponentClass(text);\n}\n\n/**\n * @param {ReactComponent} component\n * @return {boolean}\n */\nfunction isTextComponent(component) {\n return component instanceof textComponentClass;\n}\n\nvar ReactHostComponent = {\n createInternalComponent: createInternalComponent,\n createInstanceForText: createInstanceForText,\n isTextComponent: isTextComponent,\n injection: ReactHostComponentInjection\n};\n\nmodule.exports = ReactHostComponent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\n\nvar getIteratorFn = require('./getIteratorFn');\nvar invariant = require('fbjs/lib/invariant');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar warning = require('fbjs/lib/warning');\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (component && typeof component === 'object' && component.key != null) {\n // Explicit key\n return KeyEscapeUtils.escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n if (children === null || type === 'string' || type === 'number' ||\n // The following is inlined from ReactElement. This means we can optimize\n // some checks. React Fiber also inlines this logic for similar purposes.\n type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (iteratorFn) {\n var iterator = iteratorFn.call(children);\n var step;\n if (iteratorFn !== children.entries) {\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n var mapsAsChildrenAddendum = '';\n if (ReactCurrentOwner.current) {\n var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n if (mapsAsChildrenOwnerName) {\n mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n }\n }\n process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n didWarnAboutMaps = true;\n }\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n child = entry[1];\n nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n }\n }\n } else if (type === 'object') {\n var addendum = '';\n if (process.env.NODE_ENV !== 'production') {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n if (children._isReactElement) {\n addendum = ' It looks like you\\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';\n }\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n addendum += ' Check the render method of `' + name + '`.';\n }\n }\n }\n var childrenString = String(children);\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n\nmodule.exports = traverseAllChildren;","/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nfunction isNative(fn) {\n // Based on isNative() from Lodash\n var funcToString = Function.prototype.toString;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var reIsNative = RegExp('^' + funcToString\n // Take an example native function source for comparison\n .call(hasOwnProperty)\n // Strip regex characters so we can use it for regex\n .replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n // Remove hasOwnProperty from the template to make it generic\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n try {\n var source = funcToString.call(fn);\n return reIsNative.test(source);\n } catch (err) {\n return false;\n }\n}\n\nvar canUseCollections =\n// Array.from\ntypeof Array.from === 'function' &&\n// Map\ntypeof Map === 'function' && isNative(Map) &&\n// Map.prototype.keys\nMap.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&\n// Set\ntypeof Set === 'function' && isNative(Set) &&\n// Set.prototype.keys\nSet.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);\n\nvar setItem;\nvar getItem;\nvar removeItem;\nvar getItemIDs;\nvar addRoot;\nvar removeRoot;\nvar getRootIDs;\n\nif (canUseCollections) {\n var itemMap = new Map();\n var rootIDSet = new Set();\n\n setItem = function (id, item) {\n itemMap.set(id, item);\n };\n getItem = function (id) {\n return itemMap.get(id);\n };\n removeItem = function (id) {\n itemMap['delete'](id);\n };\n getItemIDs = function () {\n return Array.from(itemMap.keys());\n };\n\n addRoot = function (id) {\n rootIDSet.add(id);\n };\n removeRoot = function (id) {\n rootIDSet['delete'](id);\n };\n getRootIDs = function () {\n return Array.from(rootIDSet.keys());\n };\n} else {\n var itemByKey = {};\n var rootByKey = {};\n\n // Use non-numeric keys to prevent V8 performance issues:\n // https://github.com/facebook/react/pull/7232\n var getKeyFromID = function (id) {\n return '.' + id;\n };\n var getIDFromKey = function (key) {\n return parseInt(key.substr(1), 10);\n };\n\n setItem = function (id, item) {\n var key = getKeyFromID(id);\n itemByKey[key] = item;\n };\n getItem = function (id) {\n var key = getKeyFromID(id);\n return itemByKey[key];\n };\n removeItem = function (id) {\n var key = getKeyFromID(id);\n delete itemByKey[key];\n };\n getItemIDs = function () {\n return Object.keys(itemByKey).map(getIDFromKey);\n };\n\n addRoot = function (id) {\n var key = getKeyFromID(id);\n rootByKey[key] = true;\n };\n removeRoot = function (id) {\n var key = getKeyFromID(id);\n delete rootByKey[key];\n };\n getRootIDs = function () {\n return Object.keys(rootByKey).map(getIDFromKey);\n };\n}\n\nvar unmountedIDs = [];\n\nfunction purgeDeep(id) {\n var item = getItem(id);\n if (item) {\n var childIDs = item.childIDs;\n\n removeItem(id);\n childIDs.forEach(purgeDeep);\n }\n}\n\nfunction describeComponentFrame(name, source, ownerName) {\n return '\\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');\n}\n\nfunction getDisplayName(element) {\n if (element == null) {\n return '#empty';\n } else if (typeof element === 'string' || typeof element === 'number') {\n return '#text';\n } else if (typeof element.type === 'string') {\n return element.type;\n } else {\n return element.type.displayName || element.type.name || 'Unknown';\n }\n}\n\nfunction describeID(id) {\n var name = ReactComponentTreeHook.getDisplayName(id);\n var element = ReactComponentTreeHook.getElement(id);\n var ownerID = ReactComponentTreeHook.getOwnerID(id);\n var ownerName;\n if (ownerID) {\n ownerName = ReactComponentTreeHook.getDisplayName(ownerID);\n }\n process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;\n return describeComponentFrame(name, element && element._source, ownerName);\n}\n\nvar ReactComponentTreeHook = {\n onSetChildren: function (id, nextChildIDs) {\n var item = getItem(id);\n !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;\n item.childIDs = nextChildIDs;\n\n for (var i = 0; i < nextChildIDs.length; i++) {\n var nextChildID = nextChildIDs[i];\n var nextChild = getItem(nextChildID);\n !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;\n !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;\n !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;\n if (nextChild.parentID == null) {\n nextChild.parentID = id;\n // TODO: This shouldn't be necessary but mounting a new root during in\n // componentWillMount currently causes not-yet-mounted components to\n // be purged from our tree data so their parent id is missing.\n }\n !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;\n }\n },\n onBeforeMountComponent: function (id, element, parentID) {\n var item = {\n element: element,\n parentID: parentID,\n text: null,\n childIDs: [],\n isMounted: false,\n updateCount: 0\n };\n setItem(id, item);\n },\n onBeforeUpdateComponent: function (id, element) {\n var item = getItem(id);\n if (!item || !item.isMounted) {\n // We may end up here as a result of setState() in componentWillUnmount().\n // In this case, ignore the element.\n return;\n }\n item.element = element;\n },\n onMountComponent: function (id) {\n var item = getItem(id);\n !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;\n item.isMounted = true;\n var isRoot = item.parentID === 0;\n if (isRoot) {\n addRoot(id);\n }\n },\n onUpdateComponent: function (id) {\n var item = getItem(id);\n if (!item || !item.isMounted) {\n // We may end up here as a result of setState() in componentWillUnmount().\n // In this case, ignore the element.\n return;\n }\n item.updateCount++;\n },\n onUnmountComponent: function (id) {\n var item = getItem(id);\n if (item) {\n // We need to check if it exists.\n // `item` might not exist if it is inside an error boundary, and a sibling\n // error boundary child threw while mounting. Then this instance never\n // got a chance to mount, but it still gets an unmounting event during\n // the error boundary cleanup.\n item.isMounted = false;\n var isRoot = item.parentID === 0;\n if (isRoot) {\n removeRoot(id);\n }\n }\n unmountedIDs.push(id);\n },\n purgeUnmountedComponents: function () {\n if (ReactComponentTreeHook._preventPurging) {\n // Should only be used for testing.\n return;\n }\n\n for (var i = 0; i < unmountedIDs.length; i++) {\n var id = unmountedIDs[i];\n purgeDeep(id);\n }\n unmountedIDs.length = 0;\n },\n isMounted: function (id) {\n var item = getItem(id);\n return item ? item.isMounted : false;\n },\n getCurrentStackAddendum: function (topElement) {\n var info = '';\n if (topElement) {\n var name = getDisplayName(topElement);\n var owner = topElement._owner;\n info += describeComponentFrame(name, topElement._source, owner && owner.getName());\n }\n\n var currentOwner = ReactCurrentOwner.current;\n var id = currentOwner && currentOwner._debugID;\n\n info += ReactComponentTreeHook.getStackAddendumByID(id);\n return info;\n },\n getStackAddendumByID: function (id) {\n var info = '';\n while (id) {\n info += describeID(id);\n id = ReactComponentTreeHook.getParentID(id);\n }\n return info;\n },\n getChildIDs: function (id) {\n var item = getItem(id);\n return item ? item.childIDs : [];\n },\n getDisplayName: function (id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (!element) {\n return null;\n }\n return getDisplayName(element);\n },\n getElement: function (id) {\n var item = getItem(id);\n return item ? item.element : null;\n },\n getOwnerID: function (id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (!element || !element._owner) {\n return null;\n }\n return element._owner._debugID;\n },\n getParentID: function (id) {\n var item = getItem(id);\n return item ? item.parentID : null;\n },\n getSource: function (id) {\n var item = getItem(id);\n var element = item ? item.element : null;\n var source = element != null ? element._source : null;\n return source;\n },\n getText: function (id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (typeof element === 'string') {\n return element;\n } else if (typeof element === 'number') {\n return '' + element;\n } else {\n return null;\n }\n },\n getUpdateCount: function (id) {\n var item = getItem(id);\n return item ? item.updateCount : 0;\n },\n\n\n getRootIDs: getRootIDs,\n getRegisteredIDs: getItemIDs\n};\n\nmodule.exports = ReactComponentTreeHook;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Upstream version of event listener. Does not take into account specific\n * nature of platform.\n */\nvar EventListener = {\n /**\n * Listen to DOM events during the bubble phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n listen: function listen(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, false);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, false);\n }\n };\n } else if (target.attachEvent) {\n target.attachEvent('on' + eventType, callback);\n return {\n remove: function remove() {\n target.detachEvent('on' + eventType, callback);\n }\n };\n }\n },\n\n /**\n * Listen to DOM events during the capture phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n capture: function capture(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, true);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, true);\n }\n };\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');\n }\n return {\n remove: emptyFunction\n };\n }\n },\n\n registerDefault: function registerDefault() {}\n};\n\nmodule.exports = EventListener;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactDOMSelection = require('./ReactDOMSelection');\n\nvar containsNode = require('fbjs/lib/containsNode');\nvar focusNode = require('fbjs/lib/focusNode');\nvar getActiveElement = require('fbjs/lib/getActiveElement');\n\nfunction isInDocument(node) {\n return containsNode(document.documentElement, node);\n}\n\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\nvar ReactInputSelection = {\n\n hasSelectionCapabilities: function (elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');\n },\n\n getSelectionInformation: function () {\n var focusedElem = getActiveElement();\n return {\n focusedElem: focusedElem,\n selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null\n };\n },\n\n /**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n restoreSelection: function (priorSelectionInformation) {\n var curFocusedElem = getActiveElement();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {\n ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);\n }\n focusNode(priorFocusedElem);\n }\n },\n\n /**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n getSelection: function (input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {\n // IE8 input.\n var range = document.selection.createRange();\n // There can only be one selection per document in IE, so it must\n // be in our element.\n if (range.parentElement() === input) {\n selection = {\n start: -range.moveStart('character', -input.value.length),\n end: -range.moveEnd('character', -input.value.length)\n };\n }\n } else {\n // Content editable or old IE textarea.\n selection = ReactDOMSelection.getOffsets(input);\n }\n\n return selection || { start: 0, end: 0 };\n },\n\n /**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n setSelection: function (input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {\n var range = input.createTextRange();\n range.collapse(true);\n range.moveStart('character', start);\n range.moveEnd('character', end - start);\n range.select();\n } else {\n ReactDOMSelection.setOffsets(input, offsets);\n }\n }\n};\n\nmodule.exports = ReactInputSelection;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/* eslint-disable fb-www/typeof-undefined */\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\nfunction getActiveElement(doc) /*?DOMElement*/{\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n if (typeof doc === 'undefined') {\n return null;\n }\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nmodule.exports = getActiveElement;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar DOMLazyTree = require('./DOMLazyTree');\nvar DOMProperty = require('./DOMProperty');\nvar React = require('react/lib/React');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMContainerInfo = require('./ReactDOMContainerInfo');\nvar ReactDOMFeatureFlags = require('./ReactDOMFeatureFlags');\nvar ReactFeatureFlags = require('./ReactFeatureFlags');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactMarkupChecksum = require('./ReactMarkupChecksum');\nvar ReactReconciler = require('./ReactReconciler');\nvar ReactUpdateQueue = require('./ReactUpdateQueue');\nvar ReactUpdates = require('./ReactUpdates');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar instantiateReactComponent = require('./instantiateReactComponent');\nvar invariant = require('fbjs/lib/invariant');\nvar setInnerHTML = require('./setInnerHTML');\nvar shouldUpdateReactComponent = require('./shouldUpdateReactComponent');\nvar warning = require('fbjs/lib/warning');\n\nvar ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;\nvar ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;\n\nvar ELEMENT_NODE_TYPE = 1;\nvar DOC_NODE_TYPE = 9;\nvar DOCUMENT_FRAGMENT_NODE_TYPE = 11;\n\nvar instancesByReactRootID = {};\n\n/**\n * Finds the index of the first character\n * that's not common between the two given strings.\n *\n * @return {number} the index of the character where the strings diverge\n */\nfunction firstDifferenceIndex(string1, string2) {\n var minLen = Math.min(string1.length, string2.length);\n for (var i = 0; i < minLen; i++) {\n if (string1.charAt(i) !== string2.charAt(i)) {\n return i;\n }\n }\n return string1.length === string2.length ? -1 : minLen;\n}\n\n/**\n * @param {DOMElement|DOMDocument} container DOM element that may contain\n * a React component\n * @return {?*} DOM element that may have the reactRoot ID, or null.\n */\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOC_NODE_TYPE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction internalGetID(node) {\n // If node is something like a window, document, or text node, none of\n // which support attributes or a .getAttribute method, gracefully return\n // the empty string, as if the attribute were missing.\n return node.getAttribute && node.getAttribute(ATTR_NAME) || '';\n}\n\n/**\n * Mounts this component and inserts it into the DOM.\n *\n * @param {ReactComponent} componentInstance The instance to mount.\n * @param {DOMElement} container DOM element to mount into.\n * @param {ReactReconcileTransaction} transaction\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n */\nfunction mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {\n var markerName;\n if (ReactFeatureFlags.logTopLevelRenders) {\n var wrappedElement = wrapperInstance._currentElement.props.child;\n var type = wrappedElement.type;\n markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);\n console.time(markerName);\n }\n\n var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */\n );\n\n if (markerName) {\n console.timeEnd(markerName);\n }\n\n wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;\n ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);\n}\n\n/**\n * Batched mount.\n *\n * @param {ReactComponent} componentInstance The instance to mount.\n * @param {DOMElement} container DOM element to mount into.\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n */\nfunction batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {\n var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(\n /* useCreateElement */\n !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);\n transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);\n ReactUpdates.ReactReconcileTransaction.release(transaction);\n}\n\n/**\n * Unmounts a component and removes it from the DOM.\n *\n * @param {ReactComponent} instance React component instance.\n * @param {DOMElement} container DOM element to unmount from.\n * @final\n * @internal\n * @see {ReactMount.unmountComponentAtNode}\n */\nfunction unmountComponentFromNode(instance, container, safely) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onBeginFlush();\n }\n ReactReconciler.unmountComponent(instance, safely);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onEndFlush();\n }\n\n if (container.nodeType === DOC_NODE_TYPE) {\n container = container.documentElement;\n }\n\n // http://jsperf.com/emptying-a-node\n while (container.lastChild) {\n container.removeChild(container.lastChild);\n }\n}\n\n/**\n * True if the supplied DOM node has a direct React-rendered child that is\n * not a React root element. Useful for warning in `render`,\n * `unmountComponentAtNode`, etc.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM element contains a direct child that was\n * rendered by React but is not a root element.\n * @internal\n */\nfunction hasNonRootReactChild(container) {\n var rootEl = getReactRootElementInContainer(container);\n if (rootEl) {\n var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);\n return !!(inst && inst._hostParent);\n }\n}\n\n/**\n * True if the supplied DOM node is a React DOM element and\n * it has been rendered by another copy of React.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM has been rendered by another copy of React\n * @internal\n */\nfunction nodeIsRenderedByOtherInstance(container) {\n var rootEl = getReactRootElementInContainer(container);\n return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));\n}\n\n/**\n * True if the supplied DOM node is a valid node element.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM is a valid DOM node.\n * @internal\n */\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));\n}\n\n/**\n * True if the supplied DOM node is a valid React node element.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM is a valid React DOM node.\n * @internal\n */\nfunction isReactNode(node) {\n return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));\n}\n\nfunction getHostRootInstanceInContainer(container) {\n var rootEl = getReactRootElementInContainer(container);\n var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);\n return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;\n}\n\nfunction getTopLevelWrapperInContainer(container) {\n var root = getHostRootInstanceInContainer(container);\n return root ? root._hostContainerInfo._topLevelWrapper : null;\n}\n\n/**\n * Temporary (?) hack so that we can store all top-level pending updates on\n * composites instead of having to worry about different types of components\n * here.\n */\nvar topLevelRootCounter = 1;\nvar TopLevelWrapper = function () {\n this.rootID = topLevelRootCounter++;\n};\nTopLevelWrapper.prototype.isReactComponent = {};\nif (process.env.NODE_ENV !== 'production') {\n TopLevelWrapper.displayName = 'TopLevelWrapper';\n}\nTopLevelWrapper.prototype.render = function () {\n return this.props.child;\n};\nTopLevelWrapper.isReactTopLevelWrapper = true;\n\n/**\n * Mounting is the process of initializing a React component by creating its\n * representative DOM elements and inserting them into a supplied `container`.\n * Any prior content inside `container` is destroyed in the process.\n *\n * ReactMount.render(\n * component,\n * document.getElementById('container')\n * );\n *\n * <div id=\"container\"> <-- Supplied `container`.\n * <div data-reactid=\".3\"> <-- Rendered reactRoot of React\n * // ... component.\n * </div>\n * </div>\n *\n * Inside of `container`, the first element rendered is the \"reactRoot\".\n */\nvar ReactMount = {\n\n TopLevelWrapper: TopLevelWrapper,\n\n /**\n * Used by devtools. The keys are not important.\n */\n _instancesByReactRootID: instancesByReactRootID,\n\n /**\n * This is a hook provided to support rendering React components while\n * ensuring that the apparent scroll position of its `container` does not\n * change.\n *\n * @param {DOMElement} container The `container` being rendered into.\n * @param {function} renderCallback This must be called once to do the render.\n */\n scrollMonitor: function (container, renderCallback) {\n renderCallback();\n },\n\n /**\n * Take a component that's already mounted into the DOM and replace its props\n * @param {ReactComponent} prevComponent component instance already in the DOM\n * @param {ReactElement} nextElement component instance to render\n * @param {DOMElement} container container to render into\n * @param {?function} callback function triggered on completion\n */\n _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {\n ReactMount.scrollMonitor(container, function () {\n ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);\n if (callback) {\n ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);\n }\n });\n\n return prevComponent;\n },\n\n /**\n * Render a new component into the DOM. Hooked by hooks!\n *\n * @param {ReactElement} nextElement element to render\n * @param {DOMElement} container container to render into\n * @param {boolean} shouldReuseMarkup if we should skip the markup insertion\n * @return {ReactComponent} nextComponent\n */\n _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case.\n process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;\n\n !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;\n\n ReactBrowserEventEmitter.ensureScrollValueMonitoring();\n var componentInstance = instantiateReactComponent(nextElement, false);\n\n // The initial render is synchronous but any updates that happen during\n // rendering, in componentWillMount or componentDidMount, will be batched\n // according to the current batching strategy.\n\n ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);\n\n var wrapperID = componentInstance._instance.rootID;\n instancesByReactRootID[wrapperID] = componentInstance;\n\n return componentInstance;\n },\n\n /**\n * Renders a React component into the DOM in the supplied `container`.\n *\n * If the React component was previously rendered into `container`, this will\n * perform an update on it and only mutate the DOM as necessary to reflect the\n * latest React component.\n *\n * @param {ReactComponent} parentComponent The conceptual parent of this render tree.\n * @param {ReactElement} nextElement Component element to render.\n * @param {DOMElement} container DOM element to render into.\n * @param {?function} callback function triggered on completion\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {\n !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;\n return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);\n },\n\n _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {\n ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');\n !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \\'div\\', pass ' + 'React.createElement(\\'div\\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' :\n // Check if it quacks like an element\n nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \\'div\\', pass ' + 'React.createElement(\\'div\\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;\n\n process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;\n\n var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement });\n\n var nextContext;\n if (parentComponent) {\n var parentInst = ReactInstanceMap.get(parentComponent);\n nextContext = parentInst._processChildContext(parentInst._context);\n } else {\n nextContext = emptyObject;\n }\n\n var prevComponent = getTopLevelWrapperInContainer(container);\n\n if (prevComponent) {\n var prevWrappedElement = prevComponent._currentElement;\n var prevElement = prevWrappedElement.props.child;\n if (shouldUpdateReactComponent(prevElement, nextElement)) {\n var publicInst = prevComponent._renderedComponent.getPublicInstance();\n var updatedCallback = callback && function () {\n callback.call(publicInst);\n };\n ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);\n return publicInst;\n } else {\n ReactMount.unmountComponentAtNode(container);\n }\n }\n\n var reactRootElement = getReactRootElementInContainer(container);\n var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);\n var containerHasNonRootReactChild = hasNonRootReactChild(container);\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;\n\n if (!containerHasReactMarkup || reactRootElement.nextSibling) {\n var rootElementSibling = reactRootElement;\n while (rootElementSibling) {\n if (internalGetID(rootElementSibling)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;\n break;\n }\n rootElementSibling = rootElementSibling.nextSibling;\n }\n }\n }\n\n var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;\n var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();\n if (callback) {\n callback.call(component);\n }\n return component;\n },\n\n /**\n * Renders a React component into the DOM in the supplied `container`.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render\n *\n * If the React component was previously rendered into `container`, this will\n * perform an update on it and only mutate the DOM as necessary to reflect the\n * latest React component.\n *\n * @param {ReactElement} nextElement Component element to render.\n * @param {DOMElement} container DOM element to render into.\n * @param {?function} callback function triggered on completion\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n render: function (nextElement, container, callback) {\n return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);\n },\n\n /**\n * Unmounts and destroys the React component rendered in the `container`.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode\n *\n * @param {DOMElement} container DOM element containing a React component.\n * @return {boolean} True if a component was found in and unmounted from\n * `container`\n */\n unmountComponentAtNode: function (container) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (Strictly speaking, unmounting won't cause a\n // render but we still don't expect to be in a render call here.)\n process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;\n\n !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;\n }\n\n var prevComponent = getTopLevelWrapperInContainer(container);\n if (!prevComponent) {\n // Check if the node being unmounted was rendered by React, but isn't a\n // root node.\n var containerHasNonRootReactChild = hasNonRootReactChild(container);\n\n // Check if the container itself is a React root node.\n var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;\n }\n\n return false;\n }\n delete instancesByReactRootID[prevComponent._instance.rootID];\n ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);\n return true;\n },\n\n _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {\n !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;\n\n if (shouldReuseMarkup) {\n var rootElement = getReactRootElementInContainer(container);\n if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {\n ReactDOMComponentTree.precacheNode(instance, rootElement);\n return;\n } else {\n var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n\n var rootMarkup = rootElement.outerHTML;\n rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);\n\n var normalizedMarkup = markup;\n if (process.env.NODE_ENV !== 'production') {\n // because rootMarkup is retrieved from the DOM, various normalizations\n // will have occurred which will not be present in `markup`. Here,\n // insert markup into a <div> or <iframe> depending on the container\n // type to perform the same normalizations before comparing.\n var normalizer;\n if (container.nodeType === ELEMENT_NODE_TYPE) {\n normalizer = document.createElement('div');\n normalizer.innerHTML = markup;\n normalizedMarkup = normalizer.innerHTML;\n } else {\n normalizer = document.createElement('iframe');\n document.body.appendChild(normalizer);\n normalizer.contentDocument.write(markup);\n normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;\n document.body.removeChild(normalizer);\n }\n }\n\n var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);\n var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);\n\n !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\\n%s', difference) : _prodInvariant('42', difference) : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\\n%s', difference) : void 0;\n }\n }\n }\n\n !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\\'re trying to render a component to the document but you didn\\'t use server rendering. We can\\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;\n\n if (transaction.useCreateElement) {\n while (container.lastChild) {\n container.removeChild(container.lastChild);\n }\n DOMLazyTree.insertTreeBefore(container, markup, null);\n } else {\n setInnerHTML(container, markup);\n ReactDOMComponentTree.precacheNode(instance, container.firstChild);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);\n if (hostNode._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: hostNode._debugID,\n type: 'mount',\n payload: markup.toString()\n });\n }\n }\n }\n};\n\nmodule.exports = ReactMount;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactNodeTypes = require('./ReactNodeTypes');\n\nfunction getHostComponentFromComposite(inst) {\n var type;\n\n while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {\n inst = inst._renderedComponent;\n }\n\n if (type === ReactNodeTypes.HOST) {\n return inst._renderedComponent;\n } else if (type === ReactNodeTypes.EMPTY) {\n return null;\n }\n}\n\nmodule.exports = getHostComponentFromComposite;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.default = createTransitionManager;\n\nvar _routerWarning = require('./routerWarning');\n\nvar _routerWarning2 = _interopRequireDefault(_routerWarning);\n\nvar _computeChangedRoutes2 = require('./computeChangedRoutes');\n\nvar _computeChangedRoutes3 = _interopRequireDefault(_computeChangedRoutes2);\n\nvar _TransitionUtils = require('./TransitionUtils');\n\nvar _isActive2 = require('./isActive');\n\nvar _isActive3 = _interopRequireDefault(_isActive2);\n\nvar _getComponents = require('./getComponents');\n\nvar _getComponents2 = _interopRequireDefault(_getComponents);\n\nvar _matchRoutes = require('./matchRoutes');\n\nvar _matchRoutes2 = _interopRequireDefault(_matchRoutes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction hasAnyProperties(object) {\n for (var p in object) {\n if (Object.prototype.hasOwnProperty.call(object, p)) return true;\n }return false;\n}\n\nfunction createTransitionManager(history, routes) {\n var state = {};\n\n // Signature should be (location, indexOnly), but needs to support (path,\n // query, indexOnly)\n function isActive(location, indexOnly) {\n location = history.createLocation(location);\n\n return (0, _isActive3.default)(location, indexOnly, state.location, state.routes, state.params);\n }\n\n var partialNextState = void 0;\n\n function match(location, callback) {\n if (partialNextState && partialNextState.location === location) {\n // Continue from where we left off.\n finishMatch(partialNextState, callback);\n } else {\n (0, _matchRoutes2.default)(routes, location, function (error, nextState) {\n if (error) {\n callback(error);\n } else if (nextState) {\n finishMatch(_extends({}, nextState, { location: location }), callback);\n } else {\n callback();\n }\n });\n }\n }\n\n function finishMatch(nextState, callback) {\n var _computeChangedRoutes = (0, _computeChangedRoutes3.default)(state, nextState),\n leaveRoutes = _computeChangedRoutes.leaveRoutes,\n changeRoutes = _computeChangedRoutes.changeRoutes,\n enterRoutes = _computeChangedRoutes.enterRoutes;\n\n (0, _TransitionUtils.runLeaveHooks)(leaveRoutes, state);\n\n // Tear down confirmation hooks for left routes\n leaveRoutes.filter(function (route) {\n return enterRoutes.indexOf(route) === -1;\n }).forEach(removeListenBeforeHooksForRoute);\n\n // change and enter hooks are run in series\n (0, _TransitionUtils.runChangeHooks)(changeRoutes, state, nextState, function (error, redirectInfo) {\n if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);\n\n (0, _TransitionUtils.runEnterHooks)(enterRoutes, nextState, finishEnterHooks);\n });\n\n function finishEnterHooks(error, redirectInfo) {\n if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);\n\n // TODO: Fetch components after state is updated.\n (0, _getComponents2.default)(nextState, function (error, components) {\n if (error) {\n callback(error);\n } else {\n // TODO: Make match a pure function and have some other API\n // for \"match and update state\".\n callback(null, null, state = _extends({}, nextState, { components: components }));\n }\n });\n }\n\n function handleErrorOrRedirect(error, redirectInfo) {\n if (error) callback(error);else callback(null, redirectInfo);\n }\n }\n\n var RouteGuid = 1;\n\n function getRouteID(route) {\n var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n return route.__id__ || create && (route.__id__ = RouteGuid++);\n }\n\n var RouteHooks = Object.create(null);\n\n function getRouteHooksForRoutes(routes) {\n return routes.map(function (route) {\n return RouteHooks[getRouteID(route)];\n }).filter(function (hook) {\n return hook;\n });\n }\n\n function transitionHook(location, callback) {\n (0, _matchRoutes2.default)(routes, location, function (error, nextState) {\n if (nextState == null) {\n // TODO: We didn't actually match anything, but hang\n // onto error/nextState so we don't have to matchRoutes\n // again in the listen callback.\n callback();\n return;\n }\n\n // Cache some state here so we don't have to\n // matchRoutes() again in the listen callback.\n partialNextState = _extends({}, nextState, { location: location });\n\n var hooks = getRouteHooksForRoutes((0, _computeChangedRoutes3.default)(state, partialNextState).leaveRoutes);\n\n var result = void 0;\n for (var i = 0, len = hooks.length; result == null && i < len; ++i) {\n // Passing the location arg here indicates to\n // the user that this is a transition hook.\n result = hooks[i](location);\n }\n\n callback(result);\n });\n }\n\n /* istanbul ignore next: untestable with Karma */\n function beforeUnloadHook() {\n // Synchronously check to see if any route hooks want\n // to prevent the current window/tab from closing.\n if (state.routes) {\n var hooks = getRouteHooksForRoutes(state.routes);\n\n var message = void 0;\n for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) {\n // Passing no args indicates to the user that this is a\n // beforeunload hook. We don't know the next location.\n message = hooks[i]();\n }\n\n return message;\n }\n }\n\n var unlistenBefore = void 0,\n unlistenBeforeUnload = void 0;\n\n function removeListenBeforeHooksForRoute(route) {\n var routeID = getRouteID(route);\n if (!routeID) {\n return;\n }\n\n delete RouteHooks[routeID];\n\n if (!hasAnyProperties(RouteHooks)) {\n // teardown transition & beforeunload hooks\n if (unlistenBefore) {\n unlistenBefore();\n unlistenBefore = null;\n }\n\n if (unlistenBeforeUnload) {\n unlistenBeforeUnload();\n unlistenBeforeUnload = null;\n }\n }\n }\n\n /**\n * Registers the given hook function to run before leaving the given route.\n *\n * During a normal transition, the hook function receives the next location\n * as its only argument and can return either a prompt message (string) to show the user,\n * to make sure they want to leave the page; or `false`, to prevent the transition.\n * Any other return value will have no effect.\n *\n * During the beforeunload event (in browsers) the hook receives no arguments.\n * In this case it must return a prompt message to prevent the transition.\n *\n * Returns a function that may be used to unbind the listener.\n */\n function listenBeforeLeavingRoute(route, hook) {\n var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks);\n var routeID = getRouteID(route, true);\n\n RouteHooks[routeID] = hook;\n\n if (thereWereNoRouteHooks) {\n // setup transition & beforeunload hooks\n unlistenBefore = history.listenBefore(transitionHook);\n\n if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook);\n }\n\n return function () {\n removeListenBeforeHooksForRoute(route);\n };\n }\n\n /**\n * This is the API for stateful environments. As the location\n * changes, we update state and call the listener. We can also\n * gracefully handle errors and redirects.\n */\n function listen(listener) {\n function historyListener(location) {\n if (state.location === location) {\n listener(null, state);\n } else {\n match(location, function (error, redirectLocation, nextState) {\n if (error) {\n listener(error);\n } else if (redirectLocation) {\n history.replace(redirectLocation);\n } else if (nextState) {\n listener(null, nextState);\n } else {\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(false, 'Location \"%s\" did not match any routes', location.pathname + location.search + location.hash) : void 0;\n }\n });\n }\n }\n\n // TODO: Only use a single history listener. Otherwise we'll end up with\n // multiple concurrent calls to match.\n\n // Set up the history listener first in case the initial match redirects.\n var unsubscribe = history.listen(historyListener);\n\n if (state.location) {\n // Picking up on a matchContext.\n listener(null, state);\n } else {\n historyListener(history.getCurrentLocation());\n }\n\n return unsubscribe;\n }\n\n return {\n isActive: isActive,\n match: match,\n listenBeforeLeavingRoute: listenBeforeLeavingRoute,\n listen: listen\n };\n}\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\nexports.isPromise = isPromise;\nfunction isPromise(obj) {\n return obj && typeof obj.then === 'function';\n}","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.createRouterObject = createRouterObject;\nexports.assignRouterState = assignRouterState;\nfunction createRouterObject(history, transitionManager, state) {\n var router = _extends({}, history, {\n setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute,\n isActive: transitionManager.isActive\n });\n\n return assignRouterState(router, state);\n}\n\nfunction assignRouterState(router, _ref) {\n var location = _ref.location,\n params = _ref.params,\n routes = _ref.routes;\n\n router.location = location;\n router.params = params;\n router.routes = routes;\n\n return router;\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _PropTypes = require('./PropTypes');\n\nvar _ContextUtils = require('./ContextUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar _React$PropTypes = _react2.default.PropTypes,\n bool = _React$PropTypes.bool,\n object = _React$PropTypes.object,\n string = _React$PropTypes.string,\n func = _React$PropTypes.func,\n oneOfType = _React$PropTypes.oneOfType;\n\n\nfunction isLeftClickEvent(event) {\n return event.button === 0;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\n// TODO: De-duplicate against hasAnyProperties in createTransitionManager.\nfunction isEmptyObject(object) {\n for (var p in object) {\n if (Object.prototype.hasOwnProperty.call(object, p)) return false;\n }return true;\n}\n\nfunction resolveToLocation(to, router) {\n return typeof to === 'function' ? to(router.location) : to;\n}\n\n/**\n * A <Link> is used to create an <a> element that links to a route.\n * When that route is active, the link gets the value of its\n * activeClassName prop.\n *\n * For example, assuming you have the following route:\n *\n * <Route path=\"/posts/:postID\" component={Post} />\n *\n * You could use the following component to link to that route:\n *\n * <Link to={`/posts/${post.id}`} />\n *\n * Links may pass along location state and/or query string parameters\n * in the state/query props, respectively.\n *\n * <Link ... query={{ show: true }} state={{ the: 'state' }} />\n */\nvar Link = _react2.default.createClass({\n displayName: 'Link',\n\n\n mixins: [(0, _ContextUtils.ContextSubscriber)('router')],\n\n contextTypes: {\n router: _PropTypes.routerShape\n },\n\n propTypes: {\n to: oneOfType([string, object, func]),\n query: object,\n hash: string,\n state: object,\n activeStyle: object,\n activeClassName: string,\n onlyActiveOnIndex: bool.isRequired,\n onClick: func,\n target: string\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n onlyActiveOnIndex: false,\n style: {}\n };\n },\n handleClick: function handleClick(event) {\n if (this.props.onClick) this.props.onClick(event);\n\n if (event.defaultPrevented) return;\n\n var router = this.context.router;\n\n !router ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, '<Link>s rendered outside of a router context cannot navigate.') : (0, _invariant2.default)(false) : void 0;\n\n if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;\n\n // If target prop is set (e.g. to \"_blank\"), let browser handle link.\n /* istanbul ignore if: untestable with Karma */\n if (this.props.target) return;\n\n event.preventDefault();\n\n router.push(resolveToLocation(this.props.to, router));\n },\n render: function render() {\n var _props = this.props,\n to = _props.to,\n activeClassName = _props.activeClassName,\n activeStyle = _props.activeStyle,\n onlyActiveOnIndex = _props.onlyActiveOnIndex,\n props = _objectWithoutProperties(_props, ['to', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']);\n\n // Ignore if rendered outside the context of router to simplify unit testing.\n\n\n var router = this.context.router;\n\n\n if (router) {\n // If user does not specify a `to` prop, return an empty anchor tag.\n if (to == null) {\n return _react2.default.createElement('a', props);\n }\n\n var toLocation = resolveToLocation(to, router);\n props.href = router.createHref(toLocation);\n\n if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) {\n if (router.isActive(toLocation, onlyActiveOnIndex)) {\n if (activeClassName) {\n if (props.className) {\n props.className += ' ' + activeClassName;\n } else {\n props.className = activeClassName;\n }\n }\n\n if (activeStyle) props.style = _extends({}, props.style, activeStyle);\n }\n }\n }\n\n return _react2.default.createElement('a', _extends({}, props, { onClick: this.handleClick }));\n }\n});\n\nexports.default = Link;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _RouteUtils = require('./RouteUtils');\n\nvar _PatternUtils = require('./PatternUtils');\n\nvar _InternalPropTypes = require('./InternalPropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _React$PropTypes = _react2.default.PropTypes,\n string = _React$PropTypes.string,\n object = _React$PropTypes.object;\n\n/**\n * A <Redirect> is used to declare another URL path a client should\n * be sent to when they request a given URL.\n *\n * Redirects are placed alongside routes in the route configuration\n * and are traversed in the same manner.\n */\n/* eslint-disable react/require-render-return */\n\nvar Redirect = _react2.default.createClass({\n displayName: 'Redirect',\n\n\n statics: {\n createRouteFromReactElement: function createRouteFromReactElement(element) {\n var route = (0, _RouteUtils.createRouteFromReactElement)(element);\n\n if (route.from) route.path = route.from;\n\n route.onEnter = function (nextState, replace) {\n var location = nextState.location,\n params = nextState.params;\n\n\n var pathname = void 0;\n if (route.to.charAt(0) === '/') {\n pathname = (0, _PatternUtils.formatPattern)(route.to, params);\n } else if (!route.to) {\n pathname = location.pathname;\n } else {\n var routeIndex = nextState.routes.indexOf(route);\n var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1);\n var pattern = parentPattern.replace(/\\/*$/, '/') + route.to;\n pathname = (0, _PatternUtils.formatPattern)(pattern, params);\n }\n\n replace({\n pathname: pathname,\n query: route.query || location.query,\n state: route.state || location.state\n });\n };\n\n return route;\n },\n getRoutePattern: function getRoutePattern(routes, routeIndex) {\n var parentPattern = '';\n\n for (var i = routeIndex; i >= 0; i--) {\n var route = routes[i];\n var pattern = route.path || '';\n\n parentPattern = pattern.replace(/\\/*$/, '/') + parentPattern;\n\n if (pattern.indexOf('/') === 0) break;\n }\n\n return '/' + parentPattern;\n }\n },\n\n propTypes: {\n path: string,\n from: string, // Alias for path\n to: string.isRequired,\n query: object,\n state: object,\n onEnter: _InternalPropTypes.falsy,\n children: _InternalPropTypes.falsy\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n !false ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, '<Redirect> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;\n }\n});\n\nexports.default = Redirect;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\nexports.default = createMemoryHistory;\n\nvar _useQueries = require('history/lib/useQueries');\n\nvar _useQueries2 = _interopRequireDefault(_useQueries);\n\nvar _useBasename = require('history/lib/useBasename');\n\nvar _useBasename2 = _interopRequireDefault(_useBasename);\n\nvar _createMemoryHistory = require('history/lib/createMemoryHistory');\n\nvar _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createMemoryHistory(options) {\n // signatures and type checking differ between `useQueries` and\n // `createMemoryHistory`, have to create `memoryHistory` first because\n // `useQueries` doesn't understand the signature\n var memoryHistory = (0, _createMemoryHistory2.default)(options);\n var createHistory = function createHistory() {\n return memoryHistory;\n };\n var history = (0, _useQueries2.default)((0, _useBasename2.default)(createHistory))(options);\n return history;\n}\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _queryString = require('query-string');\n\nvar _runTransitionHook = require('./runTransitionHook');\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar defaultStringifyQuery = function defaultStringifyQuery(query) {\n return (0, _queryString.stringify)(query).replace(/%20/g, '+');\n};\n\nvar defaultParseQueryString = _queryString.parse;\n\n/**\n * Returns a new createHistory function that may be used to create\n * history objects that know how to handle URL queries.\n */\nvar useQueries = function useQueries(createHistory) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var history = createHistory(options);\n var stringifyQuery = options.stringifyQuery,\n parseQueryString = options.parseQueryString;\n\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n var decodeQuery = function decodeQuery(location) {\n if (!location) return location;\n\n if (location.query == null) location.query = parseQueryString(location.search.substring(1));\n\n return location;\n };\n\n var encodeQuery = function encodeQuery(location, query) {\n if (query == null) return location;\n\n var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;\n var queryString = stringifyQuery(query);\n var search = queryString ? '?' + queryString : '';\n\n return _extends({}, object, {\n search: search\n });\n };\n\n // Override all read methods with query-aware versions.\n var getCurrentLocation = function getCurrentLocation() {\n return decodeQuery(history.getCurrentLocation());\n };\n\n var listenBefore = function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback);\n });\n };\n\n var listen = function listen(listener) {\n return history.listen(function (location) {\n return listener(decodeQuery(location));\n });\n };\n\n // Override all write methods with query-aware versions.\n var push = function push(location) {\n return history.push(encodeQuery(location, location.query));\n };\n\n var replace = function replace(location) {\n return history.replace(encodeQuery(location, location.query));\n };\n\n var createPath = function createPath(location) {\n return history.createPath(encodeQuery(location, location.query));\n };\n\n var createHref = function createHref(location) {\n return history.createHref(encodeQuery(location, location.query));\n };\n\n var createLocation = function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var newLocation = history.createLocation.apply(history, [encodeQuery(location, location.query)].concat(args));\n\n if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query);\n\n return decodeQuery(newLocation);\n };\n\n return _extends({}, history, {\n getCurrentLocation: getCurrentLocation,\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation\n });\n };\n};\n\nexports.default = useQueries;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _runTransitionHook = require('./runTransitionHook');\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar useBasename = function useBasename(createHistory) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var history = createHistory(options);\n var basename = options.basename;\n\n\n var addBasename = function addBasename(location) {\n if (!location) return location;\n\n if (basename && location.basename == null) {\n if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) {\n location.pathname = location.pathname.substring(basename.length);\n location.basename = basename;\n\n if (location.pathname === '') location.pathname = '/';\n } else {\n location.basename = '';\n }\n }\n\n return location;\n };\n\n var prependBasename = function prependBasename(location) {\n if (!basename) return location;\n\n var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;\n var pname = object.pathname;\n var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/';\n var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname;\n var pathname = normalizedBasename + normalizedPathname;\n\n return _extends({}, object, {\n pathname: pathname\n });\n };\n\n // Override all read methods with basename-aware versions.\n var getCurrentLocation = function getCurrentLocation() {\n return addBasename(history.getCurrentLocation());\n };\n\n var listenBefore = function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n return (0, _runTransitionHook2.default)(hook, addBasename(location), callback);\n });\n };\n\n var listen = function listen(listener) {\n return history.listen(function (location) {\n return listener(addBasename(location));\n });\n };\n\n // Override all write methods with basename-aware versions.\n var push = function push(location) {\n return history.push(prependBasename(location));\n };\n\n var replace = function replace(location) {\n return history.replace(prependBasename(location));\n };\n\n var createPath = function createPath(location) {\n return history.createPath(prependBasename(location));\n };\n\n var createHref = function createHref(location) {\n return history.createHref(prependBasename(location));\n };\n\n var createLocation = function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args)));\n };\n\n return _extends({}, history, {\n getCurrentLocation: getCurrentLocation,\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation\n });\n };\n};\n\nexports.default = useBasename;","'use strict';\n\nexports.__esModule = true;\nexports.default = useRouterHistory;\n\nvar _useQueries = require('history/lib/useQueries');\n\nvar _useQueries2 = _interopRequireDefault(_useQueries);\n\nvar _useBasename = require('history/lib/useBasename');\n\nvar _useBasename2 = _interopRequireDefault(_useBasename);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction useRouterHistory(createHistory) {\n return function (options) {\n var history = (0, _useQueries2.default)((0, _useBasename2.default)(createHistory))(options);\n return history;\n };\n}\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\nexports.readState = exports.saveState = undefined;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar QuotaExceededErrors = {\n QuotaExceededError: true,\n QUOTA_EXCEEDED_ERR: true\n};\n\nvar SecurityErrors = {\n SecurityError: true\n};\n\nvar KeyPrefix = '@@History/';\n\nvar createKey = function createKey(key) {\n return KeyPrefix + key;\n};\n\nvar saveState = exports.saveState = function saveState(key, state) {\n if (!window.sessionStorage) {\n // Session storage is not available or hidden.\n // sessionStorage is undefined in Internet Explorer when served via file protocol.\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') : void 0;\n\n return;\n }\n\n try {\n if (state == null) {\n window.sessionStorage.removeItem(createKey(key));\n } else {\n window.sessionStorage.setItem(createKey(key), JSON.stringify(state));\n }\n } catch (error) {\n if (SecurityErrors[error.name]) {\n // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any\n // attempt to access window.sessionStorage.\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available due to security settings') : void 0;\n\n return;\n }\n\n if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) {\n // Safari \"private mode\" throws QuotaExceededError.\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : void 0;\n\n return;\n }\n\n throw error;\n }\n};\n\nvar readState = exports.readState = function readState(key) {\n var json = void 0;\n try {\n json = window.sessionStorage.getItem(createKey(key));\n } catch (error) {\n if (SecurityErrors[error.name]) {\n // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any\n // attempt to access window.sessionStorage.\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, '[history] Unable to read state; sessionStorage is not available due to security settings') : void 0;\n\n return undefined;\n }\n }\n\n if (json) {\n try {\n return JSON.parse(json);\n } catch (error) {\n // Ignore invalid JSON.\n }\n }\n\n return undefined;\n};","'use strict';\n\nexports.__esModule = true;\n\nexports.default = function (createHistory) {\n var history = void 0;\n if (canUseDOM) history = (0, _useRouterHistory2.default)(createHistory)();\n return history;\n};\n\nvar _useRouterHistory = require('./useRouterHistory');\n\nvar _useRouterHistory2 = _interopRequireDefault(_useRouterHistory);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar FocusTrap = _react2.default.createClass({\n displayName: 'FocusTrap',\n\n\n propTypes: {\n onFocus: _react2.default.PropTypes.func,\n onBlur: _react2.default.PropTypes.func,\n component: _react2.default.PropTypes.any,\n children: _react2.default.PropTypes.node\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n component: 'div'\n };\n },\n render: function render() {\n var _props = this.props;\n var Component = _props.component;\n var children = _props.children;\n\n var props = _objectWithoutProperties(_props, ['component', 'children']);\n\n return _react2.default.createElement(\n Component,\n _extends({ tabIndex: '-1' }, props),\n children\n );\n }\n});\n\nexports.default = FocusTrap;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = HotKeyMapMixin;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _assign = require('lodash/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _isEqual = require('lodash/isEqual');\n\nvar _isEqual2 = _interopRequireDefault(_isEqual);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction HotKeyMapMixin() {\n var hotKeyMap = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\n return {\n\n contextTypes: {\n hotKeyMap: _react2.default.PropTypes.object\n },\n\n childContextTypes: {\n hotKeyMap: _react2.default.PropTypes.object\n },\n\n getChildContext: function getChildContext() {\n return {\n hotKeyMap: this.__hotKeyMap__\n };\n },\n componentWillMount: function componentWillMount() {\n this.updateMap();\n },\n updateMap: function updateMap() {\n var newMap = this.buildMap();\n\n if (!(0, _isEqual2.default)(newMap, this.__hotKeyMap__)) {\n this.__hotKeyMap__ = newMap;\n return true;\n }\n\n return false;\n },\n buildMap: function buildMap() {\n var parentMap = this.context.hotKeyMap || {};\n var thisMap = this.props.keyMap || {};\n\n return (0, _assign2.default)({}, parentMap, hotKeyMap, thisMap);\n },\n getMap: function getMap() {\n return this.__hotKeyMap__;\n }\n };\n};","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","// Standard YAML's Core schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2804923\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, Core schema has no distinctions from JSON schema is JS-YAML.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./json')\n ]\n});\n","// Standard YAML's JSON schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2803231\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, this schema is not such strict as defined in the YAML specification.\n// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./failsafe')\n ],\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = activeElement;\n\nvar _ownerDocument = _interopRequireDefault(require(\"./ownerDocument\"));\n\nfunction activeElement(doc) {\n if (doc === void 0) {\n doc = (0, _ownerDocument.default)();\n }\n\n try {\n return doc.activeElement;\n } catch (e) {\n /* ie throws if no active element */\n }\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = ownerDocument;\n\nfunction ownerDocument(node) {\n return node && node.ownerDocument || document;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar WidgetPicker =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(WidgetPicker, _React$Component);\n\n function WidgetPicker() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = WidgetPicker.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n open = _this$props.open,\n dropUp = _this$props.dropUp,\n className = _this$props.className,\n disabled = _this$props.disabled,\n readOnly = _this$props.readOnly,\n focused = _this$props.focused,\n props = _objectWithoutProperties(_this$props, [\"open\", \"dropUp\", \"className\", \"disabled\", \"readOnly\", \"focused\"]);\n\n var openClass = \"rw-open\" + (dropUp ? '-up' : '');\n return _react.default.createElement(\"div\", _extends({}, props, {\n className: (0, _classnames.default)(className, 'rw-widget-picker', 'rw-widget-container', open && openClass, disabled && 'rw-state-disabled', readOnly && 'rw-state-readonly', focused && 'rw-state-focus')\n }));\n };\n\n return WidgetPicker;\n}(_react.default.Component);\n\nWidgetPicker.propTypes = {\n tabIndex: _propTypes.default.node,\n focused: _propTypes.default.bool,\n disabled: _propTypes.default.bool,\n readOnly: _propTypes.default.bool,\n open: _propTypes.default.bool,\n dropUp: _propTypes.default.bool,\n picker: _propTypes.default.bool\n};\nvar _default = WidgetPicker;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _SlideDownTransition = _interopRequireDefault(require(\"./SlideDownTransition\"));\n\nvar _PropTypes = require(\"./util/PropTypes\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar StaticContainer =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(StaticContainer, _React$Component);\n\n function StaticContainer() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = StaticContainer.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(_ref) {\n var shouldUpdate = _ref.shouldUpdate;\n return !!shouldUpdate;\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutProperties(_this$props, [\"className\", \"children\"]);\n\n delete props.shouldUpdate;\n return (0, _react.cloneElement)(children, _extends({}, props, {\n className: (0, _classnames.default)(className, children.props.className, 'rw-popup')\n }));\n };\n\n return StaticContainer;\n}(_react.default.Component);\n\nStaticContainer.propTypes = {\n shouldUpdate: function shouldUpdate() {}\n};\n\nvar Popup =\n/*#__PURE__*/\nfunction (_React$Component2) {\n _inheritsLoose(Popup, _React$Component2);\n\n function Popup() {\n return _React$Component2.apply(this, arguments) || this;\n }\n\n var _proto2 = Popup.prototype;\n\n _proto2.render = function render() {\n var _this$props2 = this.props,\n className = _this$props2.className,\n dropUp = _this$props2.dropUp,\n open = _this$props2.open,\n Transition = _this$props2.transition,\n props = _objectWithoutProperties(_this$props2, [\"className\", \"dropUp\", \"open\", \"transition\"]);\n\n return _react.default.createElement(Transition, _extends({}, props, {\n in: open,\n dropUp: dropUp,\n className: (0, _classnames.default)(className, 'rw-popup-container')\n }), _react.default.createElement(StaticContainer, {\n shouldUpdate: open\n }, _react.default.Children.only(this.props.children)));\n };\n\n return Popup;\n}(_react.default.Component);\n\nPopup.defaultProps = {\n open: false,\n transition: _SlideDownTransition.default\n};\nPopup.propTypes = {\n open: _propTypes.default.bool,\n dropUp: _propTypes.default.bool,\n onEntering: _propTypes.default.func,\n onEntered: _propTypes.default.func,\n transition: _PropTypes.elementType\n};\nvar _default = Popup;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _on = _interopRequireDefault(require(\"./on\"));\n\nexports.on = _on.default;\n\nvar _off = _interopRequireDefault(require(\"./off\"));\n\nexports.off = _off.default;\n\nvar _filter = _interopRequireDefault(require(\"./filter\"));\n\nexports.filter = _filter.default;\n\nvar _listen = _interopRequireDefault(require(\"./listen\"));\n\nexports.listen = _listen.default;\nvar _default = {\n on: _on.default,\n off: _off.default,\n filter: _filter.default,\n listen: _listen.default\n};\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar on = function on() {};\n\nif (_inDOM.default) {\n on = function () {\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.addEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.attachEvent('on' + eventName, function (e) {\n e = e || window.event;\n e.target = e.target || e.srcElement;\n e.currentTarget = node;\n handler.call(node, e);\n });\n };\n }();\n}\n\nvar _default = on;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar off = function off() {};\n\nif (_inDOM.default) {\n off = function () {\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.removeEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.detachEvent('on' + eventName, handler);\n };\n }();\n}\n\nvar _default = off;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar _default = function () {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n return _inDOM.default ? function (context, node) {\n if (context.contains) {\n return context.contains(node);\n } else if (context.compareDocumentPosition) {\n return context === node || !!(context.compareDocumentPosition(node) & 16);\n } else {\n return fallback(context, node);\n }\n } : fallback;\n}();\n\nexports.default = _default;\n\nfunction fallback(context, node) {\n if (node) do {\n if (node === context) return true;\n } while (node = node.parentNode);\n return false;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = qsa;\n// Zepto.js\n// (c) 2010-2015 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\nvar simpleSelectorRE = /^[\\w-]*$/;\nvar toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);\n\nfunction qsa(element, selector) {\n var maybeID = selector[0] === '#',\n maybeClass = selector[0] === '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,\n isSimple = simpleSelectorRE.test(nameOnly),\n found;\n\n if (isSimple) {\n if (maybeID) {\n element = element.getElementById ? element : document;\n return (found = element.getElementById(nameOnly)) ? [found] : [];\n }\n\n if (element.getElementsByClassName && maybeClass) return toArray(element.getElementsByClassName(nameOnly));\n return toArray(element.getElementsByTagName(selector));\n }\n\n return toArray(element.querySelectorAll(selector));\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = camelizeStyleName;\n\nvar _camelize = _interopRequireDefault(require(\"./camelize\"));\n\n/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js\n */\nvar msPattern = /^-ms-/;\n\nfunction camelizeStyleName(string) {\n return (0, _camelize.default)(string.replace(msPattern, 'ms-'));\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = offset;\n\nvar _contains = _interopRequireDefault(require(\"./contains\"));\n\nvar _isWindow = _interopRequireDefault(require(\"./isWindow\"));\n\nvar _ownerDocument = _interopRequireDefault(require(\"../ownerDocument\"));\n\nfunction offset(node) {\n var doc = (0, _ownerDocument.default)(node),\n win = (0, _isWindow.default)(doc),\n docElem = doc && doc.documentElement,\n box = {\n top: 0,\n left: 0,\n height: 0,\n width: 0\n };\n if (!doc) return; // Make sure it's not a disconnected DOM node\n\n if (!(0, _contains.default)(docElem, node)) return box;\n if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect(); // IE8 getBoundingClientRect doesn't support width & height\n\n box = {\n top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),\n left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0),\n width: (box.width == null ? node.offsetWidth : box.width) || 0,\n height: (box.height == null ? node.offsetHeight : box.height) || 0\n };\n return box;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;\n\nvar PropTypes = _interopRequireWildcard(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _PropTypes = require(\"./utils/PropTypes\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar UNMOUNTED = 'unmounted';\nexports.UNMOUNTED = UNMOUNTED;\nvar EXITED = 'exited';\nexports.EXITED = EXITED;\nvar ENTERING = 'entering';\nexports.ENTERING = ENTERING;\nvar ENTERED = 'entered';\nexports.ENTERED = ENTERED;\nvar EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 0 },\n * entered: { opacity: 1 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nexports.EXITING = EXITING;\n\nvar Transition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n var _proto = Transition.prototype;\n\n _proto.getChildContext = function getChildContext() {\n return {\n transitionGroup: null // allows for nested Transitions\n\n };\n };\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n }; // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n var node = _reactDom.default.findDOMNode(this);\n\n if (nextStatus === ENTERING) {\n this.performEnter(node, mounting);\n } else {\n this.performExit(node);\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(node, mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node);\n });\n return;\n }\n\n this.props.onEnter(node, appearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(node, appearing);\n\n _this2.onTransitionEnd(node, enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node, appearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit(node) {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED\n\n if (!exit) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n return;\n }\n\n this.props.onExit(node);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(node);\n\n _this3.onTransitionEnd(node, timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n this.setNextCallback(handler);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n this.props.addEndListener(node, this.nextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\"]); // filter props for Transtition\n\n\n delete childProps.in;\n delete childProps.mountOnEnter;\n delete childProps.unmountOnExit;\n delete childProps.appear;\n delete childProps.enter;\n delete childProps.exit;\n delete childProps.timeout;\n delete childProps.addEndListener;\n delete childProps.onEnter;\n delete childProps.onEntering;\n delete childProps.onEntered;\n delete childProps.onExit;\n delete childProps.onExiting;\n delete childProps.onExited;\n\n if (typeof children === 'function') {\n return children(status, childProps);\n }\n\n var child = _react.default.Children.only(children);\n\n return _react.default.cloneElement(child, childProps);\n };\n\n return Transition;\n}(_react.default.Component);\n\nTransition.contextTypes = {\n transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n transitionGroup: function transitionGroup() {}\n};\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * Normally a component is not transitioned if it is shown when the `<Transition>` component mounts.\n * If you want to transition on the first mount set `appear` to `true`, and the\n * component will transition in as soon as the `<Transition>` mounts.\n *\n * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = _PropTypes.timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. **Note:** Timeouts are still used as a fallback if provided.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func // Name the function so it is clearer in the documentation\n\n} : {};\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(Transition);\n\nexports.default = _default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createChainableTypeChecker;\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n// Mostly taken from ReactPropTypes.\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<<anonymous>>';\n var propFullNameSafe = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));\n }\n\n return null;\n }\n\n for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n args[_key - 6] = arguments[_key];\n }\n\n return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\nmodule.exports = exports['default'];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createTimeoutManager;\n\nvar _spyOnComponent = _interopRequireDefault(require(\"spy-on-component\"));\n\nvar _mountManager = _interopRequireDefault(require(\"./mountManager\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createTimeoutManager(componentInstance) {\n var isMounted = (0, _mountManager.default)(componentInstance);\n var timers = Object.create(null);\n var manager;\n (0, _spyOnComponent.default)(componentInstance, {\n componentWillUnmount: function componentWillUnmount() {\n for (var k in timers) {\n clearTimeout(timers[k]);\n }\n\n timers = null;\n }\n });\n return manager = {\n clear: function clear(key) {\n clearTimeout(timers[key]);\n },\n set: function set(key, fn, ms) {\n if (!isMounted()) return;\n manager.clear(key);\n timers[key] = setTimeout(fn, ms);\n }\n };\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _Button = _interopRequireDefault(require(\"./Button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Select =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Select, _React$Component);\n\n function Select() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Select.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n bordered = _this$props.bordered,\n children = _this$props.children,\n props = _objectWithoutProperties(_this$props, [\"className\", \"bordered\", \"children\"]);\n\n return _react.default.createElement(\"span\", {\n className: (0, _classnames.default)(className, 'rw-select', bordered && 'rw-select-bordered')\n }, children ? _react.default.Children.map(children, function (child) {\n return child && _react.default.cloneElement(child, {\n variant: 'select'\n });\n }) : _react.default.createElement(_Button.default, _extends({}, props, {\n variant: \"select\"\n })));\n };\n\n return Select;\n}(_react.default.Component);\n\nSelect.propTypes = {\n bordered: _propTypes.default.bool\n};\nvar _default = Select;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = require(\"react-dom\");\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar _widgetHelpers = require(\"./util/widgetHelpers\");\n\nvar _reduceToListState = require(\"./util/reduceToListState\");\n\nvar _Listbox = _interopRequireDefault(require(\"./Listbox\"));\n\nvar _ListOption = _interopRequireDefault(require(\"./ListOption\"));\n\nvar _ListOptionGroup = _interopRequireDefault(require(\"./ListOptionGroup\"));\n\nvar _messages = require(\"./messages\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar EMPTY_DATA_STATE = {};\nvar propTypes = {\n data: _propTypes.default.array,\n dataState: _propTypes.default.shape({\n sortedKeys: _propTypes.default.array,\n groups: _propTypes.default.object,\n data: _propTypes.default.array,\n sequentialData: _propTypes.default.array\n }),\n valueAccessor: CustomPropTypes.accessor,\n textAccessor: CustomPropTypes.accessor,\n onSelect: _propTypes.default.func,\n onMove: _propTypes.default.func,\n activeId: _propTypes.default.string,\n itemComponent: CustomPropTypes.elementType,\n groupComponent: CustomPropTypes.elementType,\n optionComponent: CustomPropTypes.elementType,\n renderItem: _propTypes.default.func,\n renderGroup: _propTypes.default.func,\n focusedItem: _propTypes.default.any,\n selectedItem: _propTypes.default.any,\n searchTerm: _propTypes.default.string,\n isDisabled: _propTypes.default.func.isRequired,\n messages: _propTypes.default.shape({\n emptyList: _propTypes.default.func.isRequired\n })\n};\nvar defaultProps = {\n onSelect: function onSelect() {},\n data: [],\n dataState: EMPTY_DATA_STATE,\n optionComponent: _ListOption.default\n};\n\nvar List =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(List, _React$Component);\n\n function List() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.renderItem = function (_ref) {\n var item = _ref.item,\n rest = _objectWithoutProperties(_ref, [\"item\"]);\n\n var _this$props = _this.props,\n isDisabled = _this$props.isDisabled,\n renderItem = _this$props.renderItem,\n textAccessor = _this$props.textAccessor,\n valueAccessor = _this$props.valueAccessor;\n var Component = _this.props.itemComponent;\n\n if (renderItem) {\n return renderItem(_extends({\n item: item\n }, rest));\n } else if (Component) {\n return _react.default.createElement(Component, _extends({\n item: item,\n value: valueAccessor(item),\n text: textAccessor(item),\n disabled: isDisabled(item)\n }, rest));\n }\n\n return textAccessor(item);\n };\n\n _this.renderGroup = function (group) {\n var _this$props2 = _this.props,\n renderGroup = _this$props2.renderGroup,\n Component = _this$props2.groupComponent;\n\n if (renderGroup) {\n return renderGroup({\n group: group\n });\n } else if (Component) {\n return _react.default.createElement(Component, {\n item: group\n });\n }\n\n return group;\n };\n\n return _this;\n }\n\n var _proto = List.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.move();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.move();\n };\n\n _proto.mapItems = function mapItems(fn) {\n var _this$props3 = this.props,\n data = _this$props3.data,\n dataState = _this$props3.dataState;\n var sortedKeys = dataState.sortedKeys,\n groups = dataState.groups;\n if (!groups) return data.map(function (item, idx) {\n return fn(item, idx, false);\n });\n var idx = -1;\n return sortedKeys.reduce(function (items, key) {\n var group = groups[key];\n return items.concat(fn(key, idx, true), group.map(function (item) {\n return fn(item, ++idx, false);\n }));\n }, []);\n };\n\n _proto.move = function move() {\n var _this$props4 = this.props,\n focusedItem = _this$props4.focusedItem,\n onMove = _this$props4.onMove,\n data = _this$props4.data,\n dataState = _this$props4.dataState;\n var list = (0, _reactDom.findDOMNode)(this);\n var idx = renderedIndexOf(focusedItem, list, data, dataState);\n var selectedItem = list.children[idx];\n if (selectedItem) (0, _widgetHelpers.notify)(onMove, [selectedItem, list, focusedItem]);\n };\n\n _proto.renderOption = function renderOption(item, index) {\n var _this$props5 = this.props,\n activeId = _this$props5.activeId,\n focusedItem = _this$props5.focusedItem,\n selectedItem = _this$props5.selectedItem,\n onSelect = _this$props5.onSelect,\n isDisabled = _this$props5.isDisabled,\n searchTerm = _this$props5.searchTerm,\n Option = _this$props5.optionComponent;\n var isFocused = focusedItem === item;\n return _react.default.createElement(Option, {\n dataItem: item,\n key: 'item_' + index,\n index: index,\n activeId: activeId,\n focused: isFocused,\n onSelect: onSelect,\n disabled: isDisabled(item),\n selected: selectedItem === item\n }, this.renderItem({\n item: item,\n index: index,\n searchTerm: searchTerm\n }));\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n className = _this$props6.className,\n messages = _this$props6.messages;\n var elementProps = Props.pickElementProps(this);\n\n var _getMessages = (0, _messages.getMessages)(messages),\n emptyList = _getMessages.emptyList;\n\n return _react.default.createElement(_Listbox.default, _extends({}, elementProps, {\n className: className,\n emptyListMessage: emptyList(this.props)\n }), this.mapItems(function (item, idx, isHeader) {\n return isHeader ? _react.default.createElement(_ListOptionGroup.default, {\n key: 'group_' + item,\n group: item\n }, _this2.renderGroup(item)) : _this2.renderOption(item, idx);\n }));\n };\n\n return List;\n}(_react.default.Component);\n\nList.getDataState = _reduceToListState.defaultGetDataState;\n\nfunction renderedIndexOf(item, list, data, dataState) {\n var groups = dataState.groups,\n sortedKeys = dataState.sortedKeys;\n if (!groups) return data.indexOf(item);\n var runningIdx = -1;\n var idx = -1;\n sortedKeys.some(function (group) {\n var itemIdx = groups[group].indexOf(item);\n runningIdx++;\n\n if (itemIdx !== -1) {\n idx = runningIdx + itemIdx + 1;\n return true;\n }\n\n runningIdx += groups[group].length;\n });\n return idx;\n}\n\nList.propTypes = propTypes;\nList.defaultProps = defaultProps;\nvar _default = List;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.indexOf = indexOf;\nexports.filter = filter;\nexports.suggest = suggest;\nexports.propTypes = exports.presets = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./PropTypes\"));\n\nvar _dataHelpers = require(\"./dataHelpers\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nvar presets = {\n eq: function eq(a, b) {\n return a === b;\n },\n neq: function neq(a, b) {\n return a !== b;\n },\n gt: function gt(a, b) {\n return a > b;\n },\n gte: function gte(a, b) {\n return a >= b;\n },\n lt: function lt(a, b) {\n return a < b;\n },\n lte: function lte(a, b) {\n return a <= b;\n },\n contains: function contains(a, b) {\n return a.indexOf(b) !== -1;\n },\n startsWith: function startsWith(a, b) {\n return a.lastIndexOf(b, 0) === 0;\n },\n endsWith: function endsWith(a, b) {\n var pos = a.length - b.length;\n var lastIndex = a.indexOf(b, pos);\n return lastIndex !== -1 && lastIndex === pos;\n }\n};\nexports.presets = presets;\n\nfunction normalizeFilterType(type) {\n if (type === false) return null;\n if (type === true) return 'startsWith';\n return type || 'eq';\n}\n\nfunction normalizeFilter(_ref) {\n var filter = _ref.filter,\n _ref$caseSensitive = _ref.caseSensitive,\n caseSensitive = _ref$caseSensitive === void 0 ? false : _ref$caseSensitive,\n textField = _ref.textField;\n filter = normalizeFilterType(filter);\n\n if (typeof filter === 'function' || !filter) {\n return filter;\n }\n\n filter = presets[filter];\n return function (item, searchTerm) {\n var textValue = (0, _dataHelpers.dataText)(item, textField);\n\n if (!caseSensitive) {\n textValue = textValue.toLowerCase();\n searchTerm = searchTerm.toLowerCase();\n }\n\n return filter(textValue, searchTerm);\n };\n}\n\nfunction normalizeOptions(nextOptions) {\n var options = _extends({}, nextOptions);\n\n options.minLengh = options.minLengh || 0;\n options.filter = normalizeFilter(options);\n return options;\n}\n\nvar propTypes = {\n textField: CustomPropTypes.accessor,\n caseSensitive: _propTypes.default.bool,\n minLength: _propTypes.default.number,\n filter: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.bool, _propTypes.default.oneOf(Object.keys(presets))])\n};\nexports.propTypes = propTypes;\n\nfunction indexOf(data, _ref2) {\n var _ref2$searchTerm = _ref2.searchTerm,\n searchTerm = _ref2$searchTerm === void 0 ? '' : _ref2$searchTerm,\n options = _objectWithoutProperties(_ref2, [\"searchTerm\"]);\n\n var _normalizeOptions = normalizeOptions(options),\n filter = _normalizeOptions.filter,\n minLength = _normalizeOptions.minLength;\n\n if (!filter || !searchTerm || !searchTerm.trim() || searchTerm.length < minLength) return -1;\n\n for (var idx = 0; idx < data.length; idx++) {\n if (filter(data[idx], searchTerm, idx)) return idx;\n }\n\n return -1;\n}\n\nfunction filter(data, _ref3) {\n var _ref3$searchTerm = _ref3.searchTerm,\n searchTerm = _ref3$searchTerm === void 0 ? '' : _ref3$searchTerm,\n options = _objectWithoutProperties(_ref3, [\"searchTerm\"]);\n\n var _normalizeOptions2 = normalizeOptions(options),\n filter = _normalizeOptions2.filter,\n minLength = _normalizeOptions2.minLength;\n\n if (!filter || !searchTerm || !searchTerm.trim() || searchTerm.length < minLength) return data;\n return data.filter(function (item, idx) {\n return filter(item, searchTerm, idx);\n });\n}\n\nfunction suggest(data, _ref4) {\n var _ref4$searchTerm = _ref4.searchTerm,\n searchTerm = _ref4$searchTerm === void 0 ? '' : _ref4$searchTerm,\n options = _objectWithoutProperties(_ref4, [\"searchTerm\"]);\n\n var _normalizeOptions3 = normalizeOptions(options),\n filter = _normalizeOptions3.filter,\n minLength = _normalizeOptions3.minLength;\n\n if (!filter || !searchTerm || !searchTerm.trim() || searchTerm.length < minLength) return searchTerm;\n\n for (var idx = 0; idx < data.length; idx++) {\n if (filter(data[idx], searchTerm, idx)) return data[idx];\n }\n\n return searchTerm;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _widgetHelpers = require(\"./util/widgetHelpers\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar propTypes = {\n className: _propTypes.default.string,\n role: _propTypes.default.string,\n nodeRef: _propTypes.default.func,\n emptyListMessage: _propTypes.default.node\n};\n\nvar Listbox =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Listbox, _React$Component);\n\n function Listbox() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Listbox.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n role = _this$props.role,\n children = _this$props.children,\n emptyListMessage = _this$props.emptyListMessage,\n nodeRef = _this$props.nodeRef,\n props = _objectWithoutProperties(_this$props, [\"className\", \"role\", \"children\", \"emptyListMessage\", \"nodeRef\"]);\n\n var id = (0, _widgetHelpers.instanceId)(this);\n return _react.default.createElement(\"ul\", _extends({\n id: id,\n tabIndex: \"-1\",\n ref: nodeRef,\n className: (0, _classnames.default)(className, 'rw-list'),\n role: role === undefined ? 'listbox' : role\n }, props), _react.default.Children.count(children) ? children : _react.default.createElement(\"li\", {\n className: \"rw-list-empty\"\n }, emptyListMessage));\n };\n\n return Listbox;\n}(_react.default.Component);\n\nListbox.propTypes = propTypes;\nvar _default = Listbox;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar ListOption =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ListOption, _React$Component);\n\n function ListOption() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handleSelect = function (event) {\n var _this$props = _this.props,\n onSelect = _this$props.onSelect,\n disabled = _this$props.disabled,\n dataItem = _this$props.dataItem;\n if (onSelect && !disabled) onSelect(dataItem, event);\n };\n\n return _this;\n }\n\n var _proto = ListOption.prototype;\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n className = _this$props2.className,\n children = _this$props2.children,\n focused = _this$props2.focused,\n selected = _this$props2.selected,\n disabled = _this$props2.disabled,\n activeId = _this$props2.activeId;\n var Tag = this.props.component || 'li';\n var props = Props.omitOwn(this);\n var classes = {\n 'rw-state-focus': focused,\n 'rw-state-selected': selected,\n 'rw-state-disabled': disabled\n };\n var id = focused ? activeId : undefined;\n return _react.default.createElement(Tag, _extends({\n id: id,\n role: \"option\",\n tabIndex: !disabled ? '-1' : undefined,\n \"aria-selected\": !!selected,\n className: (0, _classnames.default)('rw-list-option', className, classes),\n onClick: this.handleSelect\n }, props), children);\n };\n\n return ListOption;\n}(_react.default.Component);\n\nListOption.propTypes = {\n activeId: _propTypes.default.string,\n dataItem: _propTypes.default.any,\n index: _propTypes.default.number,\n focused: _propTypes.default.bool,\n selected: _propTypes.default.bool,\n disabled: _propTypes.default.bool,\n onSelect: _propTypes.default.func,\n component: _propTypes.default.string\n};\nvar _default = ListOption;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createScrollManager;\n\nvar _scrollTo = _interopRequireDefault(require(\"dom-helpers/util/scrollTo\"));\n\nvar _reactComponentManagers = require(\"react-component-managers\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createScrollManager(inst, getScrollParent) {\n if (getScrollParent === void 0) {\n getScrollParent = function getScrollParent(list) {\n return list.parentNode;\n };\n }\n\n var isMounted = (0, _reactComponentManagers.mountManager)(inst);\n var currentFocused, currentVisible, cancelScroll;\n\n function handleScroll(selected, list, nextFocused) {\n if (!isMounted()) return;\n var lastVisible = currentVisible;\n var lastItem = currentFocused;\n var shown, changed;\n currentVisible = !(!list.offsetWidth || !list.offsetHeight);\n currentFocused = nextFocused;\n changed = lastItem !== nextFocused;\n shown = currentVisible && !lastVisible;\n\n if (shown || currentVisible && changed) {\n if (this.props.onMove) this.props.onMove(selected, list, nextFocused);else {\n cancelScroll && cancelScroll();\n cancelScroll = (0, _scrollTo.default)(selected, false && getScrollParent(list));\n }\n }\n }\n\n return handleScroll.bind(inst);\n}\n\nmodule.exports = exports[\"default\"];","'use strict';\n\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n(function(f) {\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n module.exports = f(require('react'));\n /* global define */\n } else if (typeof define === 'function' && define.amd) {\n define(['react'], f);\n } else {\n var g;\n if (typeof window !== 'undefined') {\n g = window;\n } else if (typeof global !== 'undefined') {\n g = global;\n } else if (typeof self !== 'undefined') {\n g = self;\n } else {\n g = this;\n }\n\n if (typeof g.React === 'undefined') {\n throw Error('React module should be required before ReactDOMFactories');\n }\n\n g.ReactDOMFactories = f(g.React);\n }\n})(function(React) {\n /**\n * Create a factory that creates HTML tag elements.\n */\n function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n };\n\n /**\n * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.\n */\n var ReactDOMFactories = {\n a: createDOMFactory('a'),\n abbr: createDOMFactory('abbr'),\n address: createDOMFactory('address'),\n area: createDOMFactory('area'),\n article: createDOMFactory('article'),\n aside: createDOMFactory('aside'),\n audio: createDOMFactory('audio'),\n b: createDOMFactory('b'),\n base: createDOMFactory('base'),\n bdi: createDOMFactory('bdi'),\n bdo: createDOMFactory('bdo'),\n big: createDOMFactory('big'),\n blockquote: createDOMFactory('blockquote'),\n body: createDOMFactory('body'),\n br: createDOMFactory('br'),\n button: createDOMFactory('button'),\n canvas: createDOMFactory('canvas'),\n caption: createDOMFactory('caption'),\n cite: createDOMFactory('cite'),\n code: createDOMFactory('code'),\n col: createDOMFactory('col'),\n colgroup: createDOMFactory('colgroup'),\n data: createDOMFactory('data'),\n datalist: createDOMFactory('datalist'),\n dd: createDOMFactory('dd'),\n del: createDOMFactory('del'),\n details: createDOMFactory('details'),\n dfn: createDOMFactory('dfn'),\n dialog: createDOMFactory('dialog'),\n div: createDOMFactory('div'),\n dl: createDOMFactory('dl'),\n dt: createDOMFactory('dt'),\n em: createDOMFactory('em'),\n embed: createDOMFactory('embed'),\n fieldset: createDOMFactory('fieldset'),\n figcaption: createDOMFactory('figcaption'),\n figure: createDOMFactory('figure'),\n footer: createDOMFactory('footer'),\n form: createDOMFactory('form'),\n h1: createDOMFactory('h1'),\n h2: createDOMFactory('h2'),\n h3: createDOMFactory('h3'),\n h4: createDOMFactory('h4'),\n h5: createDOMFactory('h5'),\n h6: createDOMFactory('h6'),\n head: createDOMFactory('head'),\n header: createDOMFactory('header'),\n hgroup: createDOMFactory('hgroup'),\n hr: createDOMFactory('hr'),\n html: createDOMFactory('html'),\n i: createDOMFactory('i'),\n iframe: createDOMFactory('iframe'),\n img: createDOMFactory('img'),\n input: createDOMFactory('input'),\n ins: createDOMFactory('ins'),\n kbd: createDOMFactory('kbd'),\n keygen: createDOMFactory('keygen'),\n label: createDOMFactory('label'),\n legend: createDOMFactory('legend'),\n li: createDOMFactory('li'),\n link: createDOMFactory('link'),\n main: createDOMFactory('main'),\n map: createDOMFactory('map'),\n mark: createDOMFactory('mark'),\n menu: createDOMFactory('menu'),\n menuitem: createDOMFactory('menuitem'),\n meta: createDOMFactory('meta'),\n meter: createDOMFactory('meter'),\n nav: createDOMFactory('nav'),\n noscript: createDOMFactory('noscript'),\n object: createDOMFactory('object'),\n ol: createDOMFactory('ol'),\n optgroup: createDOMFactory('optgroup'),\n option: createDOMFactory('option'),\n output: createDOMFactory('output'),\n p: createDOMFactory('p'),\n param: createDOMFactory('param'),\n picture: createDOMFactory('picture'),\n pre: createDOMFactory('pre'),\n progress: createDOMFactory('progress'),\n q: createDOMFactory('q'),\n rp: createDOMFactory('rp'),\n rt: createDOMFactory('rt'),\n ruby: createDOMFactory('ruby'),\n s: createDOMFactory('s'),\n samp: createDOMFactory('samp'),\n script: createDOMFactory('script'),\n section: createDOMFactory('section'),\n select: createDOMFactory('select'),\n small: createDOMFactory('small'),\n source: createDOMFactory('source'),\n span: createDOMFactory('span'),\n strong: createDOMFactory('strong'),\n style: createDOMFactory('style'),\n sub: createDOMFactory('sub'),\n summary: createDOMFactory('summary'),\n sup: createDOMFactory('sup'),\n table: createDOMFactory('table'),\n tbody: createDOMFactory('tbody'),\n td: createDOMFactory('td'),\n textarea: createDOMFactory('textarea'),\n tfoot: createDOMFactory('tfoot'),\n th: createDOMFactory('th'),\n thead: createDOMFactory('thead'),\n time: createDOMFactory('time'),\n title: createDOMFactory('title'),\n tr: createDOMFactory('tr'),\n track: createDOMFactory('track'),\n u: createDOMFactory('u'),\n ul: createDOMFactory('ul'),\n var: createDOMFactory('var'),\n video: createDOMFactory('video'),\n wbr: createDOMFactory('wbr'),\n\n // SVG\n circle: createDOMFactory('circle'),\n clipPath: createDOMFactory('clipPath'),\n defs: createDOMFactory('defs'),\n ellipse: createDOMFactory('ellipse'),\n g: createDOMFactory('g'),\n image: createDOMFactory('image'),\n line: createDOMFactory('line'),\n linearGradient: createDOMFactory('linearGradient'),\n mask: createDOMFactory('mask'),\n path: createDOMFactory('path'),\n pattern: createDOMFactory('pattern'),\n polygon: createDOMFactory('polygon'),\n polyline: createDOMFactory('polyline'),\n radialGradient: createDOMFactory('radialGradient'),\n rect: createDOMFactory('rect'),\n stop: createDOMFactory('stop'),\n svg: createDOMFactory('svg'),\n text: createDOMFactory('text'),\n tspan: createDOMFactory('tspan'),\n };\n\n // due to wrapper and conditionals at the top, this will either become\n // `module.exports ReactDOMFactories` if that is available,\n // otherwise it will be defined via `define(['react'], ReactDOMFactories)`\n // if that is available,\n // otherwise it will be defined as global variable.\n return ReactDOMFactories;\n});\n\n","/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nfunction focusable(element, isTabIndexNotNaN) {\n var nodeName = element.nodeName.toLowerCase();\n return (/input|select|textarea|button|object/.test(nodeName) ?\n !element.disabled :\n \"a\" === nodeName ?\n element.href || isTabIndexNotNaN :\n isTabIndexNotNaN) && visible(element);\n}\n\nfunction hidden(el) {\n return (el.offsetWidth <= 0 && el.offsetHeight <= 0) ||\n el.style.display === 'none';\n}\n\nfunction visible(element) {\n while (element) {\n if (element === document.body) break;\n if (hidden(element)) return false;\n element = element.parentNode;\n }\n return true;\n}\n\nfunction tabbable(element) {\n var tabIndex = element.getAttribute('tabindex');\n if (tabIndex === null) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\n\nfunction findTabbableDescendants(element) {\n return [].slice.call(element.querySelectorAll('*'), 0).filter(function(el) {\n return tabbable(el);\n });\n}\n\nmodule.exports = findTabbableDescendants;\n\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max;\n\n/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */\nvar nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = assign;\n","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../meta\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../meta\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n var htmlMode = CodeMirror.getMode(cmCfg, \"text/html\");\n var htmlModeMissing = htmlMode.name == \"null\"\n\n function getMode(name) {\n if (CodeMirror.findModeByName) {\n var found = CodeMirror.findModeByName(name);\n if (found) name = found.mime || found.mimes[0];\n }\n var mode = CodeMirror.getMode(cmCfg, name);\n return mode.name == \"null\" ? null : mode;\n }\n\n // Should characters that affect highlighting be highlighted separate?\n // Does not include characters that will be output (such as `1.` and `-` for lists)\n if (modeCfg.highlightFormatting === undefined)\n modeCfg.highlightFormatting = false;\n\n // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n // Excess `>` will emit `error` token.\n if (modeCfg.maxBlockquoteDepth === undefined)\n modeCfg.maxBlockquoteDepth = 0;\n\n // Turn on task lists? (\"- [ ] \" and \"- [x] \")\n if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n // Turn on strikethrough syntax\n if (modeCfg.strikethrough === undefined)\n modeCfg.strikethrough = false;\n\n if (modeCfg.emoji === undefined)\n modeCfg.emoji = false;\n\n if (modeCfg.fencedCodeBlockHighlighting === undefined)\n modeCfg.fencedCodeBlockHighlighting = true;\n\n if (modeCfg.xml === undefined)\n modeCfg.xml = true;\n\n // Allow token types to be overridden by user-provided token types.\n if (modeCfg.tokenTypeOverrides === undefined)\n modeCfg.tokenTypeOverrides = {};\n\n var tokenTypes = {\n header: \"header\",\n code: \"comment\",\n quote: \"quote\",\n list1: \"variable-2\",\n list2: \"variable-3\",\n list3: \"keyword\",\n hr: \"hr\",\n image: \"image\",\n imageAltText: \"image-alt-text\",\n imageMarker: \"image-marker\",\n formatting: \"formatting\",\n linkInline: \"link\",\n linkEmail: \"link\",\n linkText: \"link\",\n linkHref: \"string\",\n em: \"em\",\n strong: \"strong\",\n strikethrough: \"strikethrough\",\n emoji: \"builtin\"\n };\n\n for (var tokenType in tokenTypes) {\n if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {\n tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];\n }\n }\n\n var hrRE = /^([*\\-_])(?:\\s*\\1){2,}\\s*$/\n , listRE = /^(?:[*\\-+]|^[0-9]+([.)]))\\s+/\n , taskListRE = /^\\[(x| )\\](?=\\s)/i // Must follow listRE\n , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/\n , setextHeaderRE = /^ *(?:\\={1,}|-{1,})\\s*$/\n , textRE = /^[^#!\\[\\]*_\\\\<>` \"'(~:]+/\n , fencedCodeRE = /^(~~~+|```+)[ \\t]*([\\w+#-]*)[^\\n`]*$/\n , linkDefRE = /^\\s*\\[[^\\]]+?\\]:.*$/ // naive link-definition\n , punctuation = /[!\"#$%&'()*+,\\-.\\/:;<=>?@\\[\\\\\\]^_`{|}~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E42\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC9\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDF3C-\\uDF3E]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]/\n , expandedTab = \" \" // CommonMark specifies tab as 4 spaces\n\n function switchInline(stream, state, f) {\n state.f = state.inline = f;\n return f(stream, state);\n }\n\n function switchBlock(stream, state, f) {\n state.f = state.block = f;\n return f(stream, state);\n }\n\n function lineIsEmpty(line) {\n return !line || !/\\S/.test(line.string)\n }\n\n // Blocks\n\n function blankLine(state) {\n // Reset linkTitle state\n state.linkTitle = false;\n state.linkHref = false;\n state.linkText = false;\n // Reset EM state\n state.em = false;\n // Reset STRONG state\n state.strong = false;\n // Reset strikethrough state\n state.strikethrough = false;\n // Reset state.quote\n state.quote = 0;\n // Reset state.indentedCode\n state.indentedCode = false;\n if (state.f == htmlBlock) {\n var exit = htmlModeMissing\n if (!exit) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n exit = inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)\n }\n if (exit) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n // Mark this line as blank\n state.prevLine = state.thisLine\n state.thisLine = {stream: null}\n return null;\n }\n\n function blockNormal(stream, state) {\n var firstTokenOnLine = stream.column() === state.indentation;\n var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);\n var prevLineIsIndentedCode = state.indentedCode;\n var prevLineIsHr = state.prevLine.hr;\n var prevLineIsList = state.list !== false;\n var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;\n\n state.indentedCode = false;\n\n var lineIndentation = state.indentation;\n // compute once per line (on first token)\n if (state.indentationDiff === null) {\n state.indentationDiff = state.indentation;\n if (prevLineIsList) {\n // Reset inline styles which shouldn't propagate aross list items\n state.em = false;\n state.strong = false;\n state.code = false;\n state.strikethrough = false;\n\n state.list = null;\n // While this list item's marker's indentation is less than the deepest\n // list item's content's indentation,pop the deepest list item\n // indentation off the stack, and update block indentation state\n while (lineIndentation < state.listStack[state.listStack.length - 1]) {\n state.listStack.pop();\n if (state.listStack.length) {\n state.indentation = state.listStack[state.listStack.length - 1];\n // less than the first list's indent -> the line is no longer a list\n } else {\n state.list = false;\n }\n }\n if (state.list !== false) {\n state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]\n }\n }\n }\n\n // not comprehensive (currently only for setext detection purposes)\n var allowsInlineContinuation = (\n !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&\n (!prevLineIsList || !prevLineIsIndentedCode) &&\n !state.prevLine.fencedCodeEnd\n );\n\n var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&\n state.indentation <= maxNonCodeIndentation && stream.match(hrRE);\n\n var match = null;\n if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||\n state.prevLine.header || prevLineLineIsEmpty)) {\n stream.skipToEnd();\n state.indentedCode = true;\n return tokenTypes.code;\n } else if (stream.eatSpace()) {\n return null;\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {\n state.quote = 0;\n state.header = match[1].length;\n state.thisLine.header = true;\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n state.f = state.inline;\n return getType(state);\n } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {\n state.quote = firstTokenOnLine ? 1 : state.quote + 1;\n if (modeCfg.highlightFormatting) state.formatting = \"quote\";\n stream.eatSpace();\n return getType(state);\n } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {\n var listType = match[1] ? \"ol\" : \"ul\";\n\n state.indentation = lineIndentation + stream.current().length;\n state.list = true;\n state.quote = 0;\n\n // Add this list item's content's indentation to the stack\n state.listStack.push(state.indentation);\n\n if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n state.taskList = true;\n }\n state.f = state.inline;\n if (modeCfg.highlightFormatting) state.formatting = [\"list\", \"list-\" + listType];\n return getType(state);\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {\n state.quote = 0;\n state.fencedEndRE = new RegExp(match[1] + \"+ *$\");\n // try switching mode\n state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2]);\n if (state.localMode) state.localState = CodeMirror.startState(state.localMode);\n state.f = state.block = local;\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n state.code = -1\n return getType(state);\n // SETEXT has lowest block-scope precedence after HR, so check it after\n // the others (code, blockquote, list...)\n } else if (\n // if setext set, indicates line after ---/===\n state.setext || (\n // line before ---/===\n (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&\n !state.code && !isHr && !linkDefRE.test(stream.string) &&\n (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))\n )\n ) {\n if ( !state.setext ) {\n state.header = match[0].charAt(0) == '=' ? 1 : 2;\n state.setext = state.header;\n } else {\n state.header = state.setext;\n // has no effect on type so we can reset it now\n state.setext = 0;\n stream.skipToEnd();\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n }\n state.thisLine.header = true;\n state.f = state.inline;\n return getType(state);\n } else if (isHr) {\n stream.skipToEnd();\n state.hr = true;\n state.thisLine.hr = true;\n return tokenTypes.hr;\n } else if (stream.peek() === '[') {\n return switchInline(stream, state, footnoteLink);\n }\n\n return switchInline(stream, state, state.inline);\n }\n\n function htmlBlock(stream, state) {\n var style = htmlMode.token(stream, state.htmlState);\n if (!htmlModeMissing) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n if ((inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)) ||\n (state.md_inside && stream.current().indexOf(\">\") > -1)) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n return style;\n }\n\n function local(stream, state) {\n var currListInd = state.listStack[state.listStack.length - 1] || 0;\n var hasExitedList = state.indentation < currListInd;\n var maxFencedEndInd = currListInd + 3;\n if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n var returnType;\n if (!hasExitedList) returnType = getType(state)\n state.localMode = state.localState = null;\n state.block = blockNormal;\n state.f = inlineNormal;\n state.fencedEndRE = null;\n state.code = 0\n state.thisLine.fencedCodeEnd = true;\n if (hasExitedList) return switchBlock(stream, state, state.block);\n return returnType;\n } else if (state.localMode) {\n return state.localMode.token(stream, state.localState);\n } else {\n stream.skipToEnd();\n return tokenTypes.code;\n }\n }\n\n // Inline\n function getType(state) {\n var styles = [];\n\n if (state.formatting) {\n styles.push(tokenTypes.formatting);\n\n if (typeof state.formatting === \"string\") state.formatting = [state.formatting];\n\n for (var i = 0; i < state.formatting.length; i++) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i]);\n\n if (state.formatting[i] === \"header\") {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.header);\n }\n\n // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n // Add `error` instead if the maximum blockquote nesting depth is passed\n if (state.formatting[i] === \"quote\") {\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.quote);\n } else {\n styles.push(\"error\");\n }\n }\n }\n }\n\n if (state.taskOpen) {\n styles.push(\"meta\");\n return styles.length ? styles.join(' ') : null;\n }\n if (state.taskClosed) {\n styles.push(\"property\");\n return styles.length ? styles.join(' ') : null;\n }\n\n if (state.linkHref) {\n styles.push(tokenTypes.linkHref, \"url\");\n } else { // Only apply inline styles to non-url text\n if (state.strong) { styles.push(tokenTypes.strong); }\n if (state.em) { styles.push(tokenTypes.em); }\n if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }\n if (state.emoji) { styles.push(tokenTypes.emoji); }\n if (state.linkText) { styles.push(tokenTypes.linkText); }\n if (state.code) { styles.push(tokenTypes.code); }\n if (state.image) { styles.push(tokenTypes.image); }\n if (state.imageAltText) { styles.push(tokenTypes.imageAltText, \"link\"); }\n if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }\n }\n\n if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + \"-\" + state.header); }\n\n if (state.quote) {\n styles.push(tokenTypes.quote);\n\n // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.quote + \"-\" + state.quote);\n } else {\n styles.push(tokenTypes.quote + \"-\" + modeCfg.maxBlockquoteDepth);\n }\n }\n\n if (state.list !== false) {\n var listMod = (state.listStack.length - 1) % 3;\n if (!listMod) {\n styles.push(tokenTypes.list1);\n } else if (listMod === 1) {\n styles.push(tokenTypes.list2);\n } else {\n styles.push(tokenTypes.list3);\n }\n }\n\n if (state.trailingSpaceNewLine) {\n styles.push(\"trailing-space-new-line\");\n } else if (state.trailingSpace) {\n styles.push(\"trailing-space-\" + (state.trailingSpace % 2 ? \"a\" : \"b\"));\n }\n\n return styles.length ? styles.join(' ') : null;\n }\n\n function handleText(stream, state) {\n if (stream.match(textRE, true)) {\n return getType(state);\n }\n return undefined;\n }\n\n function inlineNormal(stream, state) {\n var style = state.text(stream, state);\n if (typeof style !== 'undefined')\n return style;\n\n if (state.list) { // List marker (*, +, -, 1., etc)\n state.list = null;\n return getType(state);\n }\n\n if (state.taskList) {\n var taskOpen = stream.match(taskListRE, true)[1] === \" \";\n if (taskOpen) state.taskOpen = true;\n else state.taskClosed = true;\n if (modeCfg.highlightFormatting) state.formatting = \"task\";\n state.taskList = false;\n return getType(state);\n }\n\n state.taskOpen = false;\n state.taskClosed = false;\n\n if (state.header && stream.match(/^#+$/, true)) {\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n return getType(state);\n }\n\n var ch = stream.next();\n\n // Matches link titles present on next line\n if (state.linkTitle) {\n state.linkTitle = false;\n var matchCh = ch;\n if (ch === '(') {\n matchCh = ')';\n }\n matchCh = (matchCh+'').replace(/([.?*+^\\[\\]\\\\(){}|-])/g, \"\\\\$1\");\n var regex = '^\\\\s*(?:[^' + matchCh + '\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)' + matchCh;\n if (stream.match(new RegExp(regex), true)) {\n return tokenTypes.linkHref;\n }\n }\n\n // If this block is changed, it may need to be updated in GFM mode\n if (ch === '`') {\n var previousFormatting = state.formatting;\n if (modeCfg.highlightFormatting) state.formatting = \"code\";\n stream.eatWhile('`');\n var count = stream.current().length\n if (state.code == 0 && (!state.quote || count == 1)) {\n state.code = count\n return getType(state)\n } else if (count == state.code) { // Must be exact\n var t = getType(state)\n state.code = 0\n return t\n } else {\n state.formatting = previousFormatting\n return getType(state)\n }\n } else if (state.code) {\n return getType(state);\n }\n\n if (ch === '\\\\') {\n stream.next();\n if (modeCfg.highlightFormatting) {\n var type = getType(state);\n var formattingEscape = tokenTypes.formatting + \"-escape\";\n return type ? type + \" \" + formattingEscape : formattingEscape;\n }\n }\n\n if (ch === '!' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n state.imageMarker = true;\n state.image = true;\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n return getType(state);\n }\n\n if (ch === '[' && state.imageMarker && stream.match(/[^\\]]*\\](\\(.*?\\)| ?\\[.*?\\])/, false)) {\n state.imageMarker = false;\n state.imageAltText = true\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n return getType(state);\n }\n\n if (ch === ']' && state.imageAltText) {\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n var type = getType(state);\n state.imageAltText = false;\n state.image = false;\n state.inline = state.f = linkHref;\n return type;\n }\n\n if (ch === '[' && !state.image) {\n if (state.linkText && stream.match(/^.*?\\]/)) return getType(state)\n state.linkText = true;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n return getType(state);\n }\n\n if (ch === ']' && state.linkText) {\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n state.linkText = false;\n state.inline = state.f = stream.match(/\\(.*?\\)| ?\\[.*?\\]/, false) ? linkHref : inlineNormal\n return type;\n }\n\n if (ch === '<' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n if (ch === '<' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkEmail;\n }\n\n if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\\?|!\\[CDATA\\[|[a-z][a-z0-9-]*(?:\\s+[a-z_:.\\-]+(?:\\s*=\\s*[^>]+)?)*\\s*(?:>|$))/i, false)) {\n var end = stream.string.indexOf(\">\", stream.pos);\n if (end != -1) {\n var atts = stream.string.substring(stream.start, end);\n if (/markdown\\s*=\\s*('|\"){0,1}1('|\"){0,1}/.test(atts)) state.md_inside = true;\n }\n stream.backUp(1);\n state.htmlState = CodeMirror.startState(htmlMode);\n return switchBlock(stream, state, htmlBlock);\n }\n\n if (modeCfg.xml && ch === '<' && stream.match(/^\\/\\w*?>/)) {\n state.md_inside = false;\n return \"tag\";\n } else if (ch === \"*\" || ch === \"_\") {\n var len = 1, before = stream.pos == 1 ? \" \" : stream.string.charAt(stream.pos - 2)\n while (len < 3 && stream.eat(ch)) len++\n var after = stream.peek() || \" \"\n // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis\n var leftFlanking = !/\\s/.test(after) && (!punctuation.test(after) || /\\s/.test(before) || punctuation.test(before))\n var rightFlanking = !/\\s/.test(before) && (!punctuation.test(before) || /\\s/.test(after) || punctuation.test(after))\n var setEm = null, setStrong = null\n if (len % 2) { // Em\n if (!state.em && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n setEm = true\n else if (state.em == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n setEm = false\n }\n if (len > 1) { // Strong\n if (!state.strong && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n setStrong = true\n else if (state.strong == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n setStrong = false\n }\n if (setStrong != null || setEm != null) {\n if (modeCfg.highlightFormatting) state.formatting = setEm == null ? \"strong\" : setStrong == null ? \"em\" : \"strong em\"\n if (setEm === true) state.em = ch\n if (setStrong === true) state.strong = ch\n var t = getType(state)\n if (setEm === false) state.em = false\n if (setStrong === false) state.strong = false\n return t\n }\n } else if (ch === ' ') {\n if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(1);\n }\n }\n }\n\n if (modeCfg.strikethrough) {\n if (ch === '~' && stream.eatWhile(ch)) {\n if (state.strikethrough) {// Remove strikethrough\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n var t = getType(state);\n state.strikethrough = false;\n return t;\n } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n state.strikethrough = true;\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n return getType(state);\n }\n } else if (ch === ' ') {\n if (stream.match(/^~~/, true)) { // Probably surrounded by space\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(2);\n }\n }\n }\n }\n\n if (modeCfg.emoji && ch === \":\" && stream.match(/^(?:[a-z_\\d+][a-z_\\d+-]*|\\-[a-z_\\d+][a-z_\\d+-]*):/)) {\n state.emoji = true;\n if (modeCfg.highlightFormatting) state.formatting = \"emoji\";\n var retType = getType(state);\n state.emoji = false;\n return retType;\n }\n\n if (ch === ' ') {\n if (stream.match(/^ +$/, false)) {\n state.trailingSpace++;\n } else if (state.trailingSpace) {\n state.trailingSpaceNewLine = true;\n }\n }\n\n return getType(state);\n }\n\n function linkInline(stream, state) {\n var ch = stream.next();\n\n if (ch === \">\") {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n stream.match(/^[^>]+/, true);\n\n return tokenTypes.linkInline;\n }\n\n function linkHref(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n var ch = stream.next();\n if (ch === '(' || ch === '[') {\n state.f = state.inline = getLinkHrefInside(ch === \"(\" ? \")\" : \"]\");\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n state.linkHref = true;\n return getType(state);\n }\n return 'error';\n }\n\n var linkRE = {\n \")\": /^(?:[^\\\\\\(\\)]|\\\\.|\\((?:[^\\\\\\(\\)]|\\\\.)*\\))*?(?=\\))/,\n \"]\": /^(?:[^\\\\\\[\\]]|\\\\.|\\[(?:[^\\\\\\[\\]]|\\\\.)*\\])*?(?=\\])/\n }\n\n function getLinkHrefInside(endChar) {\n return function(stream, state) {\n var ch = stream.next();\n\n if (ch === endChar) {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n var returnState = getType(state);\n state.linkHref = false;\n return returnState;\n }\n\n stream.match(linkRE[endChar])\n state.linkHref = true;\n return getType(state);\n };\n }\n\n function footnoteLink(stream, state) {\n if (stream.match(/^([^\\]\\\\]|\\\\.)*\\]:/, false)) {\n state.f = footnoteLinkInside;\n stream.next(); // Consume [\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n state.linkText = true;\n return getType(state);\n }\n return switchInline(stream, state, inlineNormal);\n }\n\n function footnoteLinkInside(stream, state) {\n if (stream.match(/^\\]:/, true)) {\n state.f = state.inline = footnoteUrl;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var returnType = getType(state);\n state.linkText = false;\n return returnType;\n }\n\n stream.match(/^([^\\]\\\\]|\\\\.)+/, true);\n\n return tokenTypes.linkText;\n }\n\n function footnoteUrl(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n // Match URL\n stream.match(/^[^\\s]+/, true);\n // Check for link title\n if (stream.peek() === undefined) { // End of line, set flag to check next line\n state.linkTitle = true;\n } else { // More content on line, check if link title\n stream.match(/^(?:\\s+(?:\"(?:[^\"\\\\]|\\\\\\\\|\\\\.)+\"|'(?:[^'\\\\]|\\\\\\\\|\\\\.)+'|\\((?:[^)\\\\]|\\\\\\\\|\\\\.)+\\)))?/, true);\n }\n state.f = state.inline = inlineNormal;\n return tokenTypes.linkHref + \" url\";\n }\n\n var mode = {\n startState: function() {\n return {\n f: blockNormal,\n\n prevLine: {stream: null},\n thisLine: {stream: null},\n\n block: blockNormal,\n htmlState: null,\n indentation: 0,\n\n inline: inlineNormal,\n text: handleText,\n\n formatting: false,\n linkText: false,\n linkHref: false,\n linkTitle: false,\n code: 0,\n em: false,\n strong: false,\n header: 0,\n setext: 0,\n hr: false,\n taskList: false,\n list: false,\n listStack: [],\n quote: 0,\n trailingSpace: 0,\n trailingSpaceNewLine: false,\n strikethrough: false,\n emoji: false,\n fencedEndRE: null\n };\n },\n\n copyState: function(s) {\n return {\n f: s.f,\n\n prevLine: s.prevLine,\n thisLine: s.thisLine,\n\n block: s.block,\n htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n indentation: s.indentation,\n\n localMode: s.localMode,\n localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n inline: s.inline,\n text: s.text,\n formatting: false,\n linkText: s.linkText,\n linkTitle: s.linkTitle,\n linkHref: s.linkHref,\n code: s.code,\n em: s.em,\n strong: s.strong,\n strikethrough: s.strikethrough,\n emoji: s.emoji,\n header: s.header,\n setext: s.setext,\n hr: s.hr,\n taskList: s.taskList,\n list: s.list,\n listStack: s.listStack.slice(0),\n quote: s.quote,\n indentedCode: s.indentedCode,\n trailingSpace: s.trailingSpace,\n trailingSpaceNewLine: s.trailingSpaceNewLine,\n md_inside: s.md_inside,\n fencedEndRE: s.fencedEndRE\n };\n },\n\n token: function(stream, state) {\n\n // Reset state.formatting\n state.formatting = false;\n\n if (stream != state.thisLine.stream) {\n state.header = 0;\n state.hr = false;\n\n if (stream.match(/^\\s*$/, true)) {\n blankLine(state);\n return null;\n }\n\n state.prevLine = state.thisLine\n state.thisLine = {stream: stream}\n\n // Reset state.taskList\n state.taskList = false;\n\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n\n if (!state.localState) {\n state.f = state.block;\n if (state.f != htmlBlock) {\n var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, expandedTab).length;\n state.indentation = indentation;\n state.indentationDiff = null;\n if (indentation > 0) return null;\n }\n }\n }\n return state.f(stream, state);\n },\n\n innerMode: function(state) {\n if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n if (state.localState) return {state: state.localState, mode: state.localMode};\n return {state: state, mode: mode};\n },\n\n indent: function(state, textAfter, line) {\n if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)\n if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)\n return CodeMirror.Pass\n },\n\n blankLine: blankLine,\n\n getType: getType,\n\n blockCommentStart: \"<!--\",\n blockCommentEnd: \"-->\",\n closeBrackets: \"()[]{}''\\\"\\\"``\",\n fold: \"markdown\"\n };\n return mode;\n}, \"xml\");\n\nCodeMirror.defineMIME(\"text/markdown\", \"markdown\");\n\nCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar htmlConfig = {\n autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n 'track': true, 'wbr': true, 'menuitem': true},\n implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n 'th': true, 'tr': true},\n contextGrabbers: {\n 'dd': {'dd': true, 'dt': true},\n 'dt': {'dd': true, 'dt': true},\n 'li': {'li': true},\n 'option': {'option': true, 'optgroup': true},\n 'optgroup': {'optgroup': true},\n 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n 'rp': {'rp': true, 'rt': true},\n 'rt': {'rp': true, 'rt': true},\n 'tbody': {'tbody': true, 'tfoot': true},\n 'td': {'td': true, 'th': true},\n 'tfoot': {'tbody': true},\n 'th': {'td': true, 'th': true},\n 'thead': {'tbody': true, 'tfoot': true},\n 'tr': {'tr': true}\n },\n doNotIndent: {\"pre\": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n allowMissingTagName: false,\n caseFold: false\n}\n\nCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == \"<\") {\n if (stream.eat(\"!\")) {\n if (stream.eat(\"[\")) {\n if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n else return null;\n } else if (stream.match(\"--\")) {\n return chain(inBlock(\"comment\", \"-->\"));\n } else if (stream.match(\"DOCTYPE\", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat(\"?\")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock(\"meta\", \"?>\");\n return \"meta\";\n } else {\n type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n state.tokenize = inTag;\n return \"tag bracket\";\n }\n } else if (ch == \"&\") {\n var ok;\n if (stream.eat(\"#\")) {\n if (stream.eat(\"x\")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n }\n return ok ? \"atom\" : \"error\";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n state.tokenize = inText;\n type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n return \"tag bracket\";\n } else if (ch == \"=\") {\n type = \"equals\";\n return null;\n } else if (ch == \"<\") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + \" tag error\" : \"tag error\";\n } else if (/[\\'\\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n return \"word\";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return \"string\";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n }\n }\n\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == \"<\") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == \">\") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return \"meta\";\n };\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName;\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||\n !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == \"openTag\") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == \"closeTag\") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == \"word\") {\n state.tagName = stream.current();\n setStyle = \"tag\";\n return attrState;\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return attrState(type, stream, state);\n } else {\n setStyle = \"error\";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == \"word\") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(state.context.tagName))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = \"tag\";\n return closeState;\n } else {\n setStyle = \"tag error\";\n return closeStateErr;\n }\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return closeState(type, stream, state);\n } else {\n setStyle = \"error\";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != \"endTag\") {\n setStyle = \"error\";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = \"error\";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == \"word\") {\n setStyle = \"attribute\";\n return attrEqState;\n } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == \"selfcloseTag\" ||\n config.autoSelfClosers.hasOwnProperty(tagName)) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = \"error\";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == \"equals\") return attrValueState;\n if (!config.allowMissing) setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != \"comment\") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == \"error\" ? style + \" error\" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n if (tagAfter && tagAfter[1]) { // Closing tag spotted\n while (context) {\n if (context.tagName == tagAfter[2]) {\n context = context.prev;\n break;\n } else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {\n context = context.prev;\n } else {\n break;\n }\n }\n } else if (tagAfter) { // Opening tag spotted\n while (context) {\n var grabbers = config.contextGrabbers[context.tagName];\n if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))\n context = context.prev;\n else\n break;\n }\n }\n while (context && context.prev && !context.startOfLine)\n context = context.prev;\n if (context) return context.indent + indentUnit;\n else return state.baseIndent || 0;\n },\n\n electricInput: /<\\/[\\s\\w:]+>$/,\n blockCommentStart: \"<!--\",\n blockCommentEnd: \"-->\",\n\n configuration: config.htmlMode ? \"html\" : \"xml\",\n helperType: config.htmlMode ? \"html\" : \"xml\",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n },\n\n xmlCurrentTag: function(state) {\n return state.tagName ? {name: state.tagName, close: state.type == \"closeTag\"} : null\n },\n\n xmlCurrentContext: function(state) {\n var context = []\n for (var cx = state.context; cx; cx = cx.prev)\n if (cx.tagName) context.push(cx.tagName)\n return context.reverse()\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Utility function that allows modes to be combined. The mode given\n// as the base argument takes care of most of the normal mode\n// functionality, but a second (typically simple) mode is used, which\n// can override the style of text. Both modes get to parse all of the\n// text, but when both assign a non-null style to a piece of code, the\n// overlay wins, unless the combine argument was true and not overridden,\n// or state.overlay.combineTokens was true, in which case the styles are\n// combined.\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.overlayMode = function(base, overlay, combine) {\n return {\n startState: function() {\n return {\n base: CodeMirror.startState(base),\n overlay: CodeMirror.startState(overlay),\n basePos: 0, baseCur: null,\n overlayPos: 0, overlayCur: null,\n streamSeen: null\n };\n },\n copyState: function(state) {\n return {\n base: CodeMirror.copyState(base, state.base),\n overlay: CodeMirror.copyState(overlay, state.overlay),\n basePos: state.basePos, baseCur: null,\n overlayPos: state.overlayPos, overlayCur: null\n };\n },\n\n token: function(stream, state) {\n if (stream != state.streamSeen ||\n Math.min(state.basePos, state.overlayPos) < stream.start) {\n state.streamSeen = stream;\n state.basePos = state.overlayPos = stream.start;\n }\n\n if (stream.start == state.basePos) {\n state.baseCur = base.token(stream, state.base);\n state.basePos = stream.pos;\n }\n if (stream.start == state.overlayPos) {\n stream.pos = stream.start;\n state.overlayCur = overlay.token(stream, state.overlay);\n state.overlayPos = stream.pos;\n }\n stream.pos = Math.min(state.basePos, state.overlayPos);\n\n // state.overlay.combineTokens always takes precedence over combine,\n // unless set to null\n if (state.overlayCur == null) return state.baseCur;\n else if (state.baseCur != null &&\n state.overlay.combineTokens ||\n combine && state.overlay.combineTokens == null)\n return state.baseCur + \" \" + state.overlayCur;\n else return state.overlayCur;\n },\n\n indent: base.indent && function(state, textAfter, line) {\n return base.indent(state.base, textAfter, line);\n },\n electricChars: base.electricChars,\n\n innerMode: function(state) { return {state: state.base, mode: base}; },\n\n blankLine: function(state) {\n var baseToken, overlayToken;\n if (base.blankLine) baseToken = base.blankLine(state.base);\n if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);\n\n return overlayToken == null ?\n baseToken :\n (combine && baseToken != null ? baseToken + \" \" + overlayToken : overlayToken);\n }\n };\n};\n\n});\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","var React = require('react');\nvar createReactClass = require('create-react-class');\nvar PropTypes = require('prop-types');\nvar merge = require('object-assign');\nvar NotificationContainer = require('./NotificationContainer');\nvar Constants = require('./constants');\nvar Styles = require('./styles');\n\nvar NotificationSystem = createReactClass({\n\n uid: 3400,\n\n _isMounted: false,\n\n _getStyles: {\n overrideStyle: {},\n\n overrideWidth: null,\n\n setOverrideStyle: function(style) {\n this.overrideStyle = style;\n },\n\n wrapper: function() {\n if (!this.overrideStyle) return {};\n return merge({}, Styles.Wrapper, this.overrideStyle.Wrapper);\n },\n\n container: function(position) {\n var override = this.overrideStyle.Containers || {};\n if (!this.overrideStyle) return {};\n\n this.overrideWidth = Styles.Containers.DefaultStyle.width;\n\n if (override.DefaultStyle && override.DefaultStyle.width) {\n this.overrideWidth = override.DefaultStyle.width;\n }\n\n if (override[position] && override[position].width) {\n this.overrideWidth = override[position].width;\n }\n\n return merge({}, Styles.Containers.DefaultStyle, Styles.Containers[position], override.DefaultStyle, override[position]);\n },\n\n elements: {\n notification: 'NotificationItem',\n title: 'Title',\n messageWrapper: 'MessageWrapper',\n dismiss: 'Dismiss',\n action: 'Action',\n actionWrapper: 'ActionWrapper'\n },\n\n byElement: function(element) {\n var self = this;\n return function(level) {\n var _element = self.elements[element];\n var override = self.overrideStyle[_element] || {};\n if (!self.overrideStyle) return {};\n return merge({}, Styles[_element].DefaultStyle, Styles[_element][level], override.DefaultStyle, override[level]);\n };\n }\n },\n\n _didNotificationRemoved: function(uid) {\n var notification;\n var notifications = this.state.notifications.filter(function(toCheck) {\n if (toCheck.uid === uid) {\n notification = toCheck;\n return false;\n }\n return true;\n });\n\n if (this._isMounted) {\n this.setState({ notifications: notifications });\n }\n\n if (notification && notification.onRemove) {\n notification.onRemove(notification);\n }\n },\n\n getInitialState: function() {\n return {\n notifications: []\n };\n },\n\n propTypes: {\n style: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.object\n ]),\n noAnimation: PropTypes.bool,\n allowHTML: PropTypes.bool\n },\n\n getDefaultProps: function() {\n return {\n style: {},\n noAnimation: false,\n allowHTML: false\n };\n },\n\n addNotification: function(notification) {\n var _notification = merge({}, Constants.notification, notification);\n var notifications = this.state.notifications;\n var i;\n\n if (!_notification.level) {\n throw new Error('notification level is required.');\n }\n\n if (Object.keys(Constants.levels).indexOf(_notification.level) === -1) {\n throw new Error('\\'' + _notification.level + '\\' is not a valid level.');\n }\n\n // eslint-disable-next-line\n if (isNaN(_notification.autoDismiss)) {\n throw new Error('\\'autoDismiss\\' must be a number.');\n }\n\n if (Object.keys(Constants.positions).indexOf(_notification.position) === -1) {\n throw new Error('\\'' + _notification.position + '\\' is not a valid position.');\n }\n\n // Some preparations\n _notification.position = _notification.position.toLowerCase();\n _notification.level = _notification.level.toLowerCase();\n _notification.autoDismiss = parseInt(_notification.autoDismiss, 10);\n\n _notification.uid = _notification.uid || this.uid;\n _notification.ref = 'notification-' + _notification.uid;\n this.uid += 1;\n\n // do not add if the notification already exists based on supplied uid\n for (i = 0; i < notifications.length; i += 1) {\n if (notifications[i].uid === _notification.uid) {\n return false;\n }\n }\n\n notifications.push(_notification);\n\n if (typeof _notification.onAdd === 'function') {\n notification.onAdd(_notification);\n }\n\n this.setState({\n notifications: notifications\n });\n\n return _notification;\n },\n\n getNotificationRef: function(notification) {\n var self = this;\n var foundNotification = null;\n\n Object.keys(this.refs).forEach(function(container) {\n if (container.indexOf('container') > -1) {\n Object.keys(self.refs[container].refs).forEach(function(_notification) {\n var uid = notification.uid ? notification.uid : notification;\n if (_notification === 'notification-' + uid) {\n // NOTE: Stop iterating further and return the found notification.\n // Since UIDs are uniques and there won't be another notification found.\n foundNotification = self.refs[container].refs[_notification];\n }\n });\n }\n });\n\n return foundNotification;\n },\n\n removeNotification: function(notification) {\n var foundNotification = this.getNotificationRef(notification);\n return foundNotification && foundNotification._hideNotification();\n },\n\n editNotification: function(notification, newNotification) {\n var foundNotification = null;\n // NOTE: Find state notification to update by using\n // `setState` and forcing React to re-render the component.\n var uid = notification.uid ? notification.uid : notification;\n\n var newNotifications = this.state.notifications.filter(function(stateNotification) {\n if (uid === stateNotification.uid) {\n foundNotification = stateNotification;\n return false;\n }\n\n return true;\n });\n\n\n if (!foundNotification) {\n return;\n }\n\n newNotifications.push(merge(\n {},\n foundNotification,\n newNotification\n ));\n\n this.setState({\n notifications: newNotifications\n });\n },\n\n clearNotifications: function() {\n var self = this;\n Object.keys(this.refs).forEach(function(container) {\n if (container.indexOf('container') > -1) {\n Object.keys(self.refs[container].refs).forEach(function(_notification) {\n self.refs[container].refs[_notification]._hideNotification();\n });\n }\n });\n },\n\n componentDidMount: function() {\n this._getStyles.setOverrideStyle(this.props.style);\n this._isMounted = true;\n },\n\n componentWillUnmount: function() {\n this._isMounted = false;\n },\n\n render: function() {\n var self = this;\n var containers = null;\n var notifications = this.state.notifications;\n\n if (notifications.length) {\n containers = Object.keys(Constants.positions).map(function(position) {\n var _notifications = notifications.filter(function(notification) {\n return position === notification.position;\n });\n\n if (!_notifications.length) {\n return null;\n }\n\n return (\n React.createElement(NotificationContainer, {\n ref: 'container-' + position, \n key: position, \n position: position, \n notifications: _notifications, \n getStyles: self._getStyles, \n onRemove: self._didNotificationRemoved, \n noAnimation: self.props.noAnimation, \n allowHTML: self.props.allowHTML}\n )\n );\n });\n }\n\n\n return (\n React.createElement(\"div\", {className: \"notifications-wrapper\", style: this._getStyles.wrapper() }, \n containers \n )\n );\n }\n});\n\nmodule.exports = NotificationSystem;\n","/**!\n * Sortable\n * @author\tRubaXa <trash@rubaxa.org>\n * @author\towenm <owen23355@gmail.com>\n * @license MIT\n */\n\n(function sortableModule(factory) {\n\t\"use strict\";\n\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(factory);\n\t}\n\telse if (typeof module != \"undefined\" && typeof module.exports != \"undefined\") {\n\t\tmodule.exports = factory();\n\t}\n\telse {\n\t\t/* jshint sub:true */\n\t\twindow[\"Sortable\"] = factory();\n\t}\n})(function sortableFactory() {\n\t\"use strict\";\n\n\tif (typeof window === \"undefined\" || !window.document) {\n\t\treturn function sortableError() {\n\t\t\tthrow new Error(\"Sortable.js requires a window with a document\");\n\t\t};\n\t}\n\n\tvar dragEl,\n\t\tparentEl,\n\t\tghostEl,\n\t\tcloneEl,\n\t\trootEl,\n\t\tnextEl,\n\t\tlastDownEl,\n\n\t\tscrollEl,\n\t\tscrollParentEl,\n\t\tscrollCustomFn,\n\n\t\toldIndex,\n\t\tnewIndex,\n\n\t\tactiveGroup,\n\t\tputSortable,\n\n\t\tautoScrolls = [],\n\t\tscrolling = false,\n\n\t\tawaitingDragStarted = false,\n\t\tignoreNextClick = false,\n\t\tsortables = [],\n\n\t\tpointerElemChangedInterval,\n\t\tlastPointerElemX,\n\t\tlastPointerElemY,\n\n\t\ttapEvt,\n\t\ttouchEvt,\n\n\t\tmoved,\n\n\n\t\tlastTarget,\n\t\tlastDirection,\n\t\tpastFirstInvertThresh = false,\n\t\tisCircumstantialInvert = false,\n\t\tlastMode, // 'swap' or 'insert'\n\n\t\ttargetMoveDistance,\n\n\t\t// For positioning ghost absolutely\n\t\tghostRelativeParent,\n\t\tghostRelativeParentInitialScroll = [], // (left, top)\n\n\n\t\tforRepaintDummy,\n\t\trealDragElRect, // dragEl rect after current animation\n\n\t\t/** @const */\n\t\tR_SPACE = /\\s+/g,\n\n\t\texpando = 'Sortable' + (new Date).getTime(),\n\n\t\twin = window,\n\t\tdocument = win.document,\n\t\tparseInt = win.parseInt,\n\t\tsetTimeout = win.setTimeout,\n\n\t\t$ = win.jQuery || win.Zepto,\n\t\tPolymer = win.Polymer,\n\n\t\tcaptureMode = {\n\t\t\tcapture: false,\n\t\t\tpassive: false\n\t\t},\n\n\t\tIE11OrLess = !!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\\.|msie|iemobile)/i),\n\t\tEdge = !!navigator.userAgent.match(/Edge/i),\n\t\tFireFox = !!navigator.userAgent.match(/firefox/i),\n\t\tSafari = !!(navigator.userAgent.match(/safari/i) && !navigator.userAgent.match(/chrome/i) && !navigator.userAgent.match(/android/i)),\n\t\tIOS = !!(navigator.userAgent.match(/iP(ad|od|hone)/i)),\n\n\t\tPositionGhostAbsolutely = IOS,\n\n\t\tCSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n\n\t\t// This will not pass for IE9, because IE9 DnD only works on anchors\n\t\tsupportDraggable = ('draggable' in document.createElement('div')),\n\n\t\tsupportCssPointerEvents = (function() {\n\t\t\t// false when <= IE11\n\t\t\tif (IE11OrLess) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar el = document.createElement('x');\n\t\t\tel.style.cssText = 'pointer-events:auto';\n\t\t\treturn el.style.pointerEvents === 'auto';\n\t\t})(),\n\n\t\t_silent = false,\n\t\t_alignedSilent = false,\n\n\t\tabs = Math.abs,\n\t\tmin = Math.min,\n\t\tmax = Math.max,\n\n\t\tsavedInputChecked = [],\n\n\t\t_detectDirection = function(el, options) {\n\t\t\tvar elCSS = _css(el),\n\t\t\t\telWidth = parseInt(elCSS.width)\n\t\t\t\t\t- parseInt(elCSS.paddingLeft)\n\t\t\t\t\t- parseInt(elCSS.paddingRight)\n\t\t\t\t\t- parseInt(elCSS.borderLeftWidth)\n\t\t\t\t\t- parseInt(elCSS.borderRightWidth),\n\t\t\t\tchild1 = _getChild(el, 0, options),\n\t\t\t\tchild2 = _getChild(el, 1, options),\n\t\t\t\tfirstChildCSS = child1 && _css(child1),\n\t\t\t\tsecondChildCSS = child2 && _css(child2),\n\t\t\t\tfirstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + _getRect(child1).width,\n\t\t\t\tsecondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + _getRect(child2).width;\n\n\t\t\tif (elCSS.display === 'flex') {\n\t\t\t\treturn elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse'\n\t\t\t\t? 'vertical' : 'horizontal';\n\t\t\t}\n\n\t\t\tif (elCSS.display === 'grid') {\n\t\t\t\treturn elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n\t\t\t}\n\n\t\t\tif (child1 && firstChildCSS.float !== 'none') {\n\t\t\t\tvar touchingSideChild2 = firstChildCSS.float === 'left' ? 'left' : 'right';\n\n\t\t\t\treturn child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ?\n\t\t\t\t\t'vertical' : 'horizontal';\n\t\t\t}\n\n\t\t\treturn (child1 &&\n\t\t\t\t(\n\t\t\t\t\tfirstChildCSS.display === 'block' ||\n\t\t\t\t\tfirstChildCSS.display === 'flex' ||\n\t\t\t\t\tfirstChildCSS.display === 'table' ||\n\t\t\t\t\tfirstChildCSS.display === 'grid' ||\n\t\t\t\t\tfirstChildWidth >= elWidth &&\n\t\t\t\t\telCSS[CSSFloatProperty] === 'none' ||\n\t\t\t\t\tchild2 &&\n\t\t\t\t\telCSS[CSSFloatProperty] === 'none' &&\n\t\t\t\t\tfirstChildWidth + secondChildWidth > elWidth\n\t\t\t\t) ?\n\t\t\t\t'vertical' : 'horizontal'\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\n\t\t * @param {Number} x X position\n\t\t * @param {Number} y Y position\n\t\t * @return {HTMLElement} Element of the first found nearest Sortable\n\t\t */\n\t\t_detectNearestEmptySortable = function(x, y) {\n\t\t\tfor (var i = 0; i < sortables.length; i++) {\n\t\t\t\tif (_lastChild(sortables[i])) continue;\n\n\t\t\t\tvar rect = _getRect(sortables[i]),\n\t\t\t\t\tthreshold = sortables[i][expando].options.emptyInsertThreshold,\n\t\t\t\t\tinsideHorizontally = x >= (rect.left - threshold) && x <= (rect.right + threshold),\n\t\t\t\t\tinsideVertically = y >= (rect.top - threshold) && y <= (rect.bottom + threshold);\n\n\t\t\t\tif (insideHorizontally && insideVertically) {\n\t\t\t\t\treturn sortables[i];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_isClientInRowColumn = function(x, y, el, axis, options) {\n\t\t\tvar targetRect = _getRect(el),\n\t\t\t\ttargetS1Opp = axis === 'vertical' ? targetRect.left : targetRect.top,\n\t\t\t\ttargetS2Opp = axis === 'vertical' ? targetRect.right : targetRect.bottom,\n\t\t\t\tmouseOnOppAxis = axis === 'vertical' ? x : y;\n\n\t\t\treturn targetS1Opp < mouseOnOppAxis && mouseOnOppAxis < targetS2Opp;\n\t\t},\n\n\t\t_isElInRowColumn = function(el1, el2, axis) {\n\t\t\tvar el1Rect = el1 === dragEl && realDragElRect || _getRect(el1),\n\t\t\t\tel2Rect = el2 === dragEl && realDragElRect || _getRect(el2),\n\t\t\t\tel1S1Opp = axis === 'vertical' ? el1Rect.left : el1Rect.top,\n\t\t\t\tel1S2Opp = axis === 'vertical' ? el1Rect.right : el1Rect.bottom,\n\t\t\t\tel1OppLength = axis === 'vertical' ? el1Rect.width : el1Rect.height,\n\t\t\t\tel2S1Opp = axis === 'vertical' ? el2Rect.left : el2Rect.top,\n\t\t\t\tel2S2Opp = axis === 'vertical' ? el2Rect.right : el2Rect.bottom,\n\t\t\t\tel2OppLength = axis === 'vertical' ? el2Rect.width : el2Rect.height;\n\n\t\t\treturn (\n\t\t\t\tel1S1Opp === el2S1Opp ||\n\t\t\t\tel1S2Opp === el2S2Opp ||\n\t\t\t\t(el1S1Opp + el1OppLength / 2) === (el2S1Opp + el2OppLength / 2)\n\t\t\t);\n\t\t},\n\n\t\t_getParentAutoScrollElement = function(el, includeSelf) {\n\t\t\t// skip to window\n\t\t\tif (!el || !el.getBoundingClientRect) return _getWindowScrollingElement();\n\n\t\t\tvar elem = el;\n\t\t\tvar gotSelf = false;\n\t\t\tdo {\n\t\t\t\t// we don't need to get elem css if it isn't even overflowing in the first place (performance)\n\t\t\t\tif (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n\t\t\t\t\tvar elemCSS = _css(elem);\n\t\t\t\t\tif (\n\t\t\t\t\t\telem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') ||\n\t\t\t\t\t\telem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (!elem || !elem.getBoundingClientRect || elem === document.body) return _getWindowScrollingElement();\n\n\t\t\t\t\t\tif (gotSelf || includeSelf) return elem;\n\t\t\t\t\t\tgotSelf = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t/* jshint boss:true */\n\t\t\t} while (elem = elem.parentNode);\n\n\t\t\treturn _getWindowScrollingElement();\n\t\t},\n\n\t\t_getWindowScrollingElement = function() {\n\t\t\tif (IE11OrLess) {\n\t\t\t\treturn document.documentElement;\n\t\t\t} else {\n\t\t\t\treturn document.scrollingElement;\n\t\t\t}\n\t\t},\n\n\t\t_scrollBy = function(el, x, y) {\n\t\t\tel.scrollLeft += x;\n\t\t\tel.scrollTop += y;\n\t\t},\n\n\t\t_autoScroll = _throttle(function (/**Event*/evt, /**Object*/options, /**HTMLElement*/rootEl, /**Boolean*/isFallback) {\n\t\t\t// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n\t\t\tif (options.scroll) {\n\t\t\t\tvar _this = rootEl ? rootEl[expando] : window,\n\t\t\t\t\tsens = options.scrollSensitivity,\n\t\t\t\t\tspeed = options.scrollSpeed,\n\n\t\t\t\t\tx = evt.clientX,\n\t\t\t\t\ty = evt.clientY,\n\n\t\t\t\t\twinScroller = _getWindowScrollingElement(),\n\n\t\t\t\t\tscrollThisInstance = false;\n\n\t\t\t\t// Detect scrollEl\n\t\t\t\tif (scrollParentEl !== rootEl) {\n\t\t\t\t\t_clearAutoScrolls();\n\n\t\t\t\t\tscrollEl = options.scroll;\n\t\t\t\t\tscrollCustomFn = options.scrollFn;\n\n\t\t\t\t\tif (scrollEl === true) {\n\t\t\t\t\t\tscrollEl = _getParentAutoScrollElement(rootEl, true);\n\t\t\t\t\t\tscrollParentEl = scrollEl;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\tvar layersOut = 0;\n\t\t\t\tvar currentParent = scrollEl;\n\t\t\t\tdo {\n\t\t\t\t\tvar\tel = currentParent,\n\t\t\t\t\t\trect = _getRect(el),\n\n\t\t\t\t\t\ttop = rect.top,\n\t\t\t\t\t\tbottom = rect.bottom,\n\t\t\t\t\t\tleft = rect.left,\n\t\t\t\t\t\tright = rect.right,\n\n\t\t\t\t\t\twidth = rect.width,\n\t\t\t\t\t\theight = rect.height,\n\n\t\t\t\t\t\tscrollWidth,\n\t\t\t\t\t\tscrollHeight,\n\n\t\t\t\t\t\tcss,\n\n\t\t\t\t\t\tvx,\n\t\t\t\t\t\tvy,\n\n\t\t\t\t\t\tcanScrollX,\n\t\t\t\t\t\tcanScrollY,\n\n\t\t\t\t\t\tscrollPosX,\n\t\t\t\t\t\tscrollPosY;\n\n\n\t\t\t\t\tscrollWidth = el.scrollWidth;\n\t\t\t\t\tscrollHeight = el.scrollHeight;\n\n\t\t\t\t\tcss = _css(el);\n\n\t\t\t\t\tscrollPosX = el.scrollLeft;\n\t\t\t\t\tscrollPosY = el.scrollTop;\n\n\t\t\t\t\tif (el === winScroller) {\n\t\t\t\t\t\tcanScrollX = width < scrollWidth && (css.overflowX === 'auto' || css.overflowX === 'scroll' || css.overflowX === 'visible');\n\t\t\t\t\t\tcanScrollY = height < scrollHeight && (css.overflowY === 'auto' || css.overflowY === 'scroll' || css.overflowY === 'visible');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcanScrollX = width < scrollWidth && (css.overflowX === 'auto' || css.overflowX === 'scroll');\n\t\t\t\t\t\tcanScrollY = height < scrollHeight && (css.overflowY === 'auto' || css.overflowY === 'scroll');\n\t\t\t\t\t}\n\n\t\t\t\t\tvx = canScrollX && (abs(right - x) <= sens && (scrollPosX + width) < scrollWidth) - (abs(left - x) <= sens && !!scrollPosX);\n\n\t\t\t\t\tvy = canScrollY && (abs(bottom - y) <= sens && (scrollPosY + height) < scrollHeight) - (abs(top - y) <= sens && !!scrollPosY);\n\n\n\t\t\t\t\tif (!autoScrolls[layersOut]) {\n\t\t\t\t\t\tfor (var i = 0; i <= layersOut; i++) {\n\t\t\t\t\t\t\tif (!autoScrolls[i]) {\n\t\t\t\t\t\t\t\tautoScrolls[i] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n\t\t\t\t\t\tautoScrolls[layersOut].el = el;\n\t\t\t\t\t\tautoScrolls[layersOut].vx = vx;\n\t\t\t\t\t\tautoScrolls[layersOut].vy = vy;\n\n\t\t\t\t\t\tclearInterval(autoScrolls[layersOut].pid);\n\n\t\t\t\t\t\tif (el && (vx != 0 || vy != 0)) {\n\t\t\t\t\t\t\tscrollThisInstance = true;\n\t\t\t\t\t\t\t/* jshint loopfunc:true */\n\t\t\t\t\t\t\tautoScrolls[layersOut].pid = setInterval((function () {\n\t\t\t\t\t\t\t\t// emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n\t\t\t\t\t\t\t\tif (isFallback && this.layer === 0) {\n\t\t\t\t\t\t\t\t\tSortable.active._emulateDragOver(true);\n\t\t\t\t\t\t\t\t\tSortable.active._onTouchMove(touchEvt, true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvar scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n\t\t\t\t\t\t\t\tvar scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n\t\t\t\t\t\t\t\tif ('function' === typeof(scrollCustomFn)) {\n\t\t\t\t\t\t\t\t\tif (scrollCustomFn.call(_this, scrollOffsetX, scrollOffsetY, evt, touchEvt, autoScrolls[this.layer].el) !== 'continue') {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t_scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n\t\t\t\t\t\t\t}).bind({layer: layersOut}), 24);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayersOut++;\n\t\t\t\t} while (options.bubbleScroll && currentParent !== winScroller && (currentParent = _getParentAutoScrollElement(currentParent, false)));\n\t\t\t\tscrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n\t\t\t}\n\t\t}, 30),\n\n\t\t_clearAutoScrolls = function () {\n\t\t\tautoScrolls.forEach(function(autoScroll) {\n\t\t\t\tclearInterval(autoScroll.pid);\n\t\t\t});\n\t\t\tautoScrolls = [];\n\t\t},\n\n\t\t_prepareGroup = function (options) {\n\t\t\tfunction toFn(value, pull) {\n\t\t\t\treturn function(to, from, dragEl, evt) {\n\t\t\t\t\tvar sameGroup = to.options.group.name &&\n\t\t\t\t\t\t\t\t\tfrom.options.group.name &&\n\t\t\t\t\t\t\t\t\tto.options.group.name === from.options.group.name;\n\n\t\t\t\t\tif (value == null && (pull || sameGroup)) {\n\t\t\t\t\t\t// Default pull value\n\t\t\t\t\t\t// Default pull and put value if same group\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (value == null || value === false) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (pull && value === 'clone') {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t} else if (typeof value === 'function') {\n\t\t\t\t\t\treturn toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar otherGroup = (pull ? to : from).options.group.name;\n\n\t\t\t\t\t\treturn (value === true ||\n\t\t\t\t\t\t(typeof value === 'string' && value === otherGroup) ||\n\t\t\t\t\t\t(value.join && value.indexOf(otherGroup) > -1));\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar group = {};\n\t\t\tvar originalGroup = options.group;\n\n\t\t\tif (!originalGroup || typeof originalGroup != 'object') {\n\t\t\t\toriginalGroup = {name: originalGroup};\n\t\t\t}\n\n\t\t\tgroup.name = originalGroup.name;\n\t\t\tgroup.checkPull = toFn(originalGroup.pull, true);\n\t\t\tgroup.checkPut = toFn(originalGroup.put);\n\t\t\tgroup.revertClone = originalGroup.revertClone;\n\n\t\t\toptions.group = group;\n\t\t},\n\n\t\t_checkAlignment = function(evt) {\n\t\t\tif (!dragEl || !dragEl.parentNode) return;\n\t\t\tdragEl.parentNode[expando] && dragEl.parentNode[expando]._computeIsAligned(evt);\n\t\t},\n\n\t\t_isTrueParentSortable = function(el, target) {\n\t\t\tvar trueParent = target;\n\t\t\twhile (!trueParent[expando]) {\n\t\t\t\ttrueParent = trueParent.parentNode;\n\t\t\t}\n\n\t\t\treturn el === trueParent;\n\t\t},\n\n\t\t_artificalBubble = function(sortable, originalEvt, method) {\n\t\t\t// Artificial IE bubbling\n\t\t\tvar nextParent = sortable.parentNode;\n\t\t\twhile (nextParent && !nextParent[expando]) {\n\t\t\t\tnextParent = nextParent.parentNode;\n\t\t\t}\n\n\t\t\tif (nextParent) {\n\t\t\t\tnextParent[expando][method](_extend(originalEvt, {\n\t\t\t\t\tartificialBubble: true\n\t\t\t\t}));\n\t\t\t}\n\t\t},\n\n\t\t_hideGhostForTarget = function() {\n\t\t\tif (!supportCssPointerEvents && ghostEl) {\n\t\t\t\t_css(ghostEl, 'display', 'none');\n\t\t\t}\n\t\t},\n\n\t\t_unhideGhostForTarget = function() {\n\t\t\tif (!supportCssPointerEvents && ghostEl) {\n\t\t\t\t_css(ghostEl, 'display', '');\n\t\t\t}\n\t\t};\n\n\n\t// #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\tdocument.addEventListener('click', function(evt) {\n\t\tif (ignoreNextClick) {\n\t\t\tevt.preventDefault();\n\t\t\tevt.stopPropagation && evt.stopPropagation();\n\t\t\tevt.stopImmediatePropagation && evt.stopImmediatePropagation();\n\t\t\tignoreNextClick = false;\n\t\t\treturn false;\n\t\t}\n\t}, true);\n\n\tvar nearestEmptyInsertDetectEvent = function(evt) {\n\t\tevt = evt.touches ? evt.touches[0] : evt;\n\t\tif (dragEl) {\n\t\t\tvar nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n\t\t\tif (nearest) {\n\t\t\t\tnearest[expando]._onDragOver({\n\t\t\t\t\tclientX: evt.clientX,\n\t\t\t\t\tclientY: evt.clientY,\n\t\t\t\t\ttarget: nearest,\n\t\t\t\t\trootEl: nearest\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\t// We do not want this to be triggered if completed (bubbling canceled), so only define it here\n\t_on(document, 'dragover', nearestEmptyInsertDetectEvent);\n\t_on(document, 'mousemove', nearestEmptyInsertDetectEvent);\n\t_on(document, 'touchmove', nearestEmptyInsertDetectEvent);\n\n\t/**\n\t * @class Sortable\n\t * @param {HTMLElement} el\n\t * @param {Object} [options]\n\t */\n\tfunction Sortable(el, options) {\n\t\tif (!(el && el.nodeType && el.nodeType === 1)) {\n\t\t\tthrow 'Sortable: `el` must be HTMLElement, not ' + {}.toString.call(el);\n\t\t}\n\n\t\tthis.el = el; // root element\n\t\tthis.options = options = _extend({}, options);\n\n\n\t\t// Export instance\n\t\tel[expando] = this;\n\n\t\t// Default options\n\t\tvar defaults = {\n\t\t\tgroup: null,\n\t\t\tsort: true,\n\t\t\tdisabled: false,\n\t\t\tstore: null,\n\t\t\thandle: null,\n\t\t\tscroll: true,\n\t\t\tscrollSensitivity: 30,\n\t\t\tscrollSpeed: 10,\n\t\t\tbubbleScroll: true,\n\t\t\tdraggable: /[uo]l/i.test(el.nodeName) ? '>li' : '>*',\n\t\t\tswapThreshold: 1, // percentage; 0 <= x <= 1\n\t\t\tinvertSwap: false, // invert always\n\t\t\tinvertedSwapThreshold: null, // will be set to same as swapThreshold if default\n\t\t\tremoveCloneOnHide: true,\n\t\t\tdirection: function() {\n\t\t\t\treturn _detectDirection(el, this.options);\n\t\t\t},\n\t\t\tghostClass: 'sortable-ghost',\n\t\t\tchosenClass: 'sortable-chosen',\n\t\t\tdragClass: 'sortable-drag',\n\t\t\tignore: 'a, img',\n\t\t\tfilter: null,\n\t\t\tpreventOnFilter: true,\n\t\t\tanimation: 0,\n\t\t\teasing: null,\n\t\t\tsetData: function (dataTransfer, dragEl) {\n\t\t\t\tdataTransfer.setData('Text', dragEl.textContent);\n\t\t\t},\n\t\t\tdropBubble: false,\n\t\t\tdragoverBubble: false,\n\t\t\tdataIdAttr: 'data-id',\n\t\t\tdelay: 0,\n\t\t\ttouchStartThreshold: parseInt(window.devicePixelRatio, 10) || 1,\n\t\t\tforceFallback: false,\n\t\t\tfallbackClass: 'sortable-fallback',\n\t\t\tfallbackOnBody: false,\n\t\t\tfallbackTolerance: 0,\n\t\t\tfallbackOffset: {x: 0, y: 0},\n\t\t\tsupportPointer: Sortable.supportPointer !== false && (\n\t\t\t\t('PointerEvent' in window) ||\n\t\t\t\twindow.navigator && ('msPointerEnabled' in window.navigator) // microsoft\n\t\t\t),\n\t\t\temptyInsertThreshold: 5\n\t\t};\n\n\n\t\t// Set default options\n\t\tfor (var name in defaults) {\n\t\t\t!(name in options) && (options[name] = defaults[name]);\n\t\t}\n\n\t\t_prepareGroup(options);\n\n\t\t// Bind all private methods\n\t\tfor (var fn in this) {\n\t\t\tif (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n\t\t\t\tthis[fn] = this[fn].bind(this);\n\t\t\t}\n\t\t}\n\n\t\t// Setup drag mode\n\t\tthis.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n\t\tif (this.nativeDraggable) {\n\t\t\t// Touch start threshold cannot be greater than the native dragstart threshold\n\t\t\tthis.options.touchStartThreshold = 1;\n\t\t}\n\n\t\t// Bind events\n\t\tif (options.supportPointer) {\n\t\t\t_on(el, 'pointerdown', this._onTapStart);\n\t\t} else {\n\t\t\t_on(el, 'mousedown', this._onTapStart);\n\t\t\t_on(el, 'touchstart', this._onTapStart);\n\t\t}\n\n\t\tif (this.nativeDraggable) {\n\t\t\t_on(el, 'dragover', this);\n\t\t\t_on(el, 'dragenter', this);\n\t\t}\n\n\t\tsortables.push(this.el);\n\n\t\t// Restore sorting\n\t\toptions.store && options.store.get && this.sort(options.store.get(this) || []);\n\t}\n\n\tSortable.prototype = /** @lends Sortable.prototype */ {\n\t\tconstructor: Sortable,\n\n\t\t_computeIsAligned: function(evt) {\n\t\t\tvar target;\n\n\t\t\tif (ghostEl && !supportCssPointerEvents) {\n\t\t\t\t_hideGhostForTarget();\n\t\t\t\ttarget = document.elementFromPoint(evt.clientX, evt.clientY);\n\t\t\t\t_unhideGhostForTarget();\n\t\t\t} else {\n\t\t\t\ttarget = evt.target;\n\t\t\t}\n\n\t\t\ttarget = _closest(target, this.options.draggable, this.el, false);\n\t\t\tif (_alignedSilent) return;\n\t\t\tif (!dragEl || dragEl.parentNode !== this.el) return;\n\n\t\t\tvar children = this.el.children;\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t// Don't change for target in case it is changed to aligned before onDragOver is fired\n\t\t\t\tif (_closest(children[i], this.options.draggable, this.el, false) && children[i] !== target) {\n\t\t\t\t\tchildren[i].sortableMouseAligned = _isClientInRowColumn(evt.clientX, evt.clientY, children[i], this._getDirection(evt, null), this.options);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Used for nulling last target when not in element, nothing to do with checking if aligned\n\t\t\tif (!_closest(target, this.options.draggable, this.el, true)) {\n\t\t\t\tlastTarget = null;\n\t\t\t}\n\n\t\t\t_alignedSilent = true;\n\t\t\tsetTimeout(function() {\n\t\t\t\t_alignedSilent = false;\n\t\t\t}, 30);\n\n\t\t},\n\n\t\t_getDirection: function(evt, target) {\n\t\t\treturn (typeof this.options.direction === 'function') ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n\t\t},\n\n\t\t_onTapStart: function (/** Event|TouchEvent */evt) {\n\t\t\tif (!evt.cancelable) return;\n\t\t\tvar _this = this,\n\t\t\t\tel = this.el,\n\t\t\t\toptions = this.options,\n\t\t\t\tpreventOnFilter = options.preventOnFilter,\n\t\t\t\ttype = evt.type,\n\t\t\t\ttouch = evt.touches && evt.touches[0],\n\t\t\t\ttarget = (touch || evt).target,\n\t\t\t\toriginalTarget = evt.target.shadowRoot && ((evt.path && evt.path[0]) || (evt.composedPath && evt.composedPath()[0])) || target,\n\t\t\t\tfilter = options.filter,\n\t\t\t\tstartIndex;\n\n\t\t\t_saveInputCheckedState(el);\n\n\n\t\t\t// IE: Calls events in capture mode if event element is nested. This ensures only correct element's _onTapStart goes through.\n\t\t\t// This process is also done in _onDragOver\n\t\t\tif (IE11OrLess && !evt.artificialBubble && !_isTrueParentSortable(el, target)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\t\t\tif (dragEl) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n\t\t\t\treturn; // only left button and enabled\n\t\t\t}\n\n\t\t\t// cancel dnd if original target is content editable\n\t\t\tif (originalTarget.isContentEditable) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttarget = _closest(target, options.draggable, el, false);\n\n\t\t\tif (!target) {\n\t\t\t\tif (IE11OrLess) {\n\t\t\t\t\t_artificalBubble(el, evt, '_onTapStart');\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (lastDownEl === target) {\n\t\t\t\t// Ignoring duplicate `down`\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Get the index of the dragged element within its parent\n\t\t\tstartIndex = _index(target, options.draggable);\n\n\t\t\t// Check filter\n\t\t\tif (typeof filter === 'function') {\n\t\t\t\tif (filter.call(this, evt, target, this)) {\n\t\t\t\t\t_dispatchEvent(_this, originalTarget, 'filter', target, el, el, startIndex);\n\t\t\t\t\tpreventOnFilter && evt.cancelable && evt.preventDefault();\n\t\t\t\t\treturn; // cancel dnd\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (filter) {\n\t\t\t\tfilter = filter.split(',').some(function (criteria) {\n\t\t\t\t\tcriteria = _closest(originalTarget, criteria.trim(), el, false);\n\n\t\t\t\t\tif (criteria) {\n\t\t\t\t\t\t_dispatchEvent(_this, criteria, 'filter', target, el, el, startIndex);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (filter) {\n\t\t\t\t\tpreventOnFilter && evt.cancelable && evt.preventDefault();\n\t\t\t\t\treturn; // cancel dnd\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.handle && !_closest(originalTarget, options.handle, el, false)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prepare `dragstart`\n\t\t\tthis._prepareDragStart(evt, touch, target, startIndex);\n\t\t},\n\n\n\t\t_handleAutoScroll: function(evt, fallback) {\n\t\t\tif (!dragEl || !this.options.scroll) return;\n\t\t\tvar x = evt.clientX,\n\t\t\t\ty = evt.clientY,\n\n\t\t\t\telem = document.elementFromPoint(x, y),\n\t\t\t\t_this = this;\n\n\t\t\t// IE does not seem to have native autoscroll,\n\t\t\t// Edge's autoscroll seems too conditional,\n\t\t\t// MACOS Safari does not have autoscroll,\n\t\t\t// Firefox and Chrome are good\n\t\t\tif (fallback || Edge || IE11OrLess || Safari) {\n\t\t\t\t_autoScroll(evt, _this.options, elem, fallback);\n\n\t\t\t\t// Listener for pointer element change\n\t\t\t\tvar ogElemScroller = _getParentAutoScrollElement(elem, true);\n\t\t\t\tif (\n\t\t\t\t\tscrolling &&\n\t\t\t\t\t(\n\t\t\t\t\t\t!pointerElemChangedInterval ||\n\t\t\t\t\t\tx !== lastPointerElemX ||\n\t\t\t\t\t\ty !== lastPointerElemY\n\t\t\t\t\t)\n\t\t\t\t) {\n\n\t\t\t\t\tpointerElemChangedInterval && clearInterval(pointerElemChangedInterval);\n\t\t\t\t\t// Detect for pointer elem change, emulating native DnD behaviour\n\t\t\t\t\tpointerElemChangedInterval = setInterval(function() {\n\t\t\t\t\t\tif (!dragEl) return;\n\t\t\t\t\t\t// could also check if scroll direction on newElem changes due to parent autoscrolling\n\t\t\t\t\t\tvar newElem = _getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\t\t\t\t\t\tif (newElem !== ogElemScroller) {\n\t\t\t\t\t\t\togElemScroller = newElem;\n\t\t\t\t\t\t\t_clearAutoScrolls();\n\t\t\t\t\t\t\t_autoScroll(evt, _this.options, ogElemScroller, fallback);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 10);\n\t\t\t\t\tlastPointerElemX = x;\n\t\t\t\t\tlastPointerElemY = y;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n\t\t\t\tif (!_this.options.bubbleScroll || _getParentAutoScrollElement(elem, true) === _getWindowScrollingElement()) {\n\t\t\t\t\t_clearAutoScrolls();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t_autoScroll(evt, _this.options, _getParentAutoScrollElement(elem, false), false);\n\t\t\t}\n\t\t},\n\n\t\t_prepareDragStart: function (/** Event */evt, /** Touch */touch, /** HTMLElement */target, /** Number */startIndex) {\n\t\t\tvar _this = this,\n\t\t\t\tel = _this.el,\n\t\t\t\toptions = _this.options,\n\t\t\t\townerDocument = el.ownerDocument,\n\t\t\t\tdragStartFn;\n\n\t\t\tif (target && !dragEl && (target.parentNode === el)) {\n\t\t\t\trootEl = el;\n\t\t\t\tdragEl = target;\n\t\t\t\tparentEl = dragEl.parentNode;\n\t\t\t\tnextEl = dragEl.nextSibling;\n\t\t\t\tlastDownEl = target;\n\t\t\t\tactiveGroup = options.group;\n\t\t\t\toldIndex = startIndex;\n\n\t\t\t\ttapEvt = {\n\t\t\t\t\ttarget: dragEl,\n\t\t\t\t\tclientX: (touch || evt).clientX,\n\t\t\t\t\tclientY: (touch || evt).clientY\n\t\t\t\t};\n\n\t\t\t\tthis._lastX = (touch || evt).clientX;\n\t\t\t\tthis._lastY = (touch || evt).clientY;\n\n\t\t\t\tdragEl.style['will-change'] = 'all';\n\t\t\t\t// undo animation if needed\n\t\t\t\tdragEl.style.transition = '';\n\t\t\t\tdragEl.style.transform = '';\n\n\t\t\t\tdragStartFn = function () {\n\t\t\t\t\t// Delayed drag has been triggered\n\t\t\t\t\t// we can re-enable the events: touchmove/mousemove\n\t\t\t\t\t_this._disableDelayedDragEvents();\n\n\t\t\t\t\tif (!FireFox && _this.nativeDraggable) {\n\t\t\t\t\t\tdragEl.draggable = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Bind the events: dragstart/dragend\n\t\t\t\t\t_this._triggerDragStart(evt, touch);\n\n\t\t\t\t\t// Drag start event\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'choose', dragEl, rootEl, rootEl, oldIndex);\n\n\t\t\t\t\t// Chosen item\n\t\t\t\t\t_toggleClass(dragEl, options.chosenClass, true);\n\t\t\t\t};\n\n\t\t\t\t// Disable \"draggable\"\n\t\t\t\toptions.ignore.split(',').forEach(function (criteria) {\n\t\t\t\t\t_find(dragEl, criteria.trim(), _disableDraggable);\n\t\t\t\t});\n\n\t\t\t\tif (options.supportPointer) {\n\t\t\t\t\t_on(ownerDocument, 'pointerup', _this._onDrop);\n\t\t\t\t} else {\n\t\t\t\t\t_on(ownerDocument, 'mouseup', _this._onDrop);\n\t\t\t\t\t_on(ownerDocument, 'touchend', _this._onDrop);\n\t\t\t\t\t_on(ownerDocument, 'touchcancel', _this._onDrop);\n\t\t\t\t}\n\n\t\t\t\t// Make dragEl draggable (must be before delay for FireFox)\n\t\t\t\tif (FireFox && this.nativeDraggable) {\n\t\t\t\t\tthis.options.touchStartThreshold = 4;\n\t\t\t\t\tdragEl.draggable = true;\n\t\t\t\t}\n\n\t\t\t\t// Delay is impossible for native DnD in Edge or IE\n\t\t\t\tif (options.delay && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n\t\t\t\t\t// If the user moves the pointer or let go the click or touch\n\t\t\t\t\t// before the delay has been reached:\n\t\t\t\t\t// disable the delayed drag\n\t\t\t\t\t_on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n\t\t\t\t\t_on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n\t\t\t\t\toptions.supportPointer && _on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n\n\t\t\t\t\t_this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n\t\t\t\t} else {\n\t\t\t\t\tdragStartFn();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_delayedDragTouchMoveHandler: function (/** TouchEvent|PointerEvent **/e) {\n\t\t\tvar touch = e.touches ? e.touches[0] : e;\n\t\t\tif (max(abs(touch.clientX - this._lastX), abs(touch.clientY - this._lastY))\n\t\t\t\t\t>= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))\n\t\t\t) {\n\t\t\t\tthis._disableDelayedDrag();\n\t\t\t}\n\t\t},\n\n\t\t_disableDelayedDrag: function () {\n\t\t\tdragEl && _disableDraggable(dragEl);\n\t\t\tclearTimeout(this._dragStartTimer);\n\n\t\t\tthis._disableDelayedDragEvents();\n\t\t},\n\n\t\t_disableDelayedDragEvents: function () {\n\t\t\tvar ownerDocument = this.el.ownerDocument;\n\t\t\t_off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchend', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n\t\t\t_off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n\t\t\t_off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n\t\t},\n\n\t\t_triggerDragStart: function (/** Event */evt, /** Touch */touch) {\n\t\t\ttouch = touch || (evt.pointerType == 'touch' ? evt : null);\n\n\t\t\tif (!this.nativeDraggable || touch) {\n\t\t\t\tif (this.options.supportPointer) {\n\t\t\t\t\t_on(document, 'pointermove', this._onTouchMove);\n\t\t\t\t} else if (touch) {\n\t\t\t\t\t_on(document, 'touchmove', this._onTouchMove);\n\t\t\t\t} else {\n\t\t\t\t\t_on(document, 'mousemove', this._onTouchMove);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t_on(dragEl, 'dragend', this);\n\t\t\t\t_on(rootEl, 'dragstart', this._onDragStart);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (document.selection) {\n\t\t\t\t\t// Timeout neccessary for IE9\n\t\t\t\t\t_nextTick(function () {\n\t\t\t\t\t\tdocument.selection.empty();\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t}\n\t\t},\n\n\t\t_dragStarted: function (fallback, evt) {\n\t\t\tawaitingDragStarted = false;\n\t\t\tif (rootEl && dragEl) {\n\t\t\t\tif (this.nativeDraggable) {\n\t\t\t\t\t_on(document, 'dragover', this._handleAutoScroll);\n\t\t\t\t\t_on(document, 'dragover', _checkAlignment);\n\t\t\t\t}\n\t\t\t\tvar options = this.options;\n\n\t\t\t\t// Apply effect\n\t\t\t\t!fallback && _toggleClass(dragEl, options.dragClass, false);\n\t\t\t\t_toggleClass(dragEl, options.ghostClass, true);\n\n\t\t\t\t// In case dragging an animated element\n\t\t\t\t_css(dragEl, 'transform', '');\n\n\t\t\t\tSortable.active = this;\n\n\t\t\t\tfallback && this._appendGhost();\n\n\t\t\t\t// Drag start event\n\t\t\t\t_dispatchEvent(this, rootEl, 'start', dragEl, rootEl, rootEl, oldIndex, undefined, evt);\n\t\t\t} else {\n\t\t\t\tthis._nulling();\n\t\t\t}\n\t\t},\n\n\t\t_emulateDragOver: function (forAutoScroll) {\n\t\t\tif (touchEvt) {\n\t\t\t\tif (this._lastX === touchEvt.clientX && this._lastY === touchEvt.clientY && !forAutoScroll) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._lastX = touchEvt.clientX;\n\t\t\t\tthis._lastY = touchEvt.clientY;\n\n\t\t\t\t_hideGhostForTarget();\n\n\t\t\t\tvar target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n\t\t\t\tvar parent = target;\n\n\t\t\t\twhile (target && target.shadowRoot) {\n\t\t\t\t\ttarget = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n\t\t\t\t\tparent = target;\n\t\t\t\t}\n\n\t\t\t\tif (parent) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (parent[expando]) {\n\t\t\t\t\t\t\tvar inserted;\n\n\t\t\t\t\t\t\tinserted = parent[expando]._onDragOver({\n\t\t\t\t\t\t\t\tclientX: touchEvt.clientX,\n\t\t\t\t\t\t\t\tclientY: touchEvt.clientY,\n\t\t\t\t\t\t\t\ttarget: target,\n\t\t\t\t\t\t\t\trootEl: parent\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (inserted && !this.options.dragoverBubble) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttarget = parent; // store last element\n\t\t\t\t\t}\n\t\t\t\t\t/* jshint boss:true */\n\t\t\t\t\twhile (parent = parent.parentNode);\n\t\t\t\t}\n\t\t\t\tdragEl.parentNode[expando]._computeIsAligned(touchEvt);\n\n\t\t\t\t_unhideGhostForTarget();\n\t\t\t}\n\t\t},\n\n\n\t\t_onTouchMove: function (/**TouchEvent*/evt, forAutoScroll) {\n\t\t\tif (tapEvt) {\n\t\t\t\tvar\toptions = this.options,\n\t\t\t\t\tfallbackTolerance = options.fallbackTolerance,\n\t\t\t\t\tfallbackOffset = options.fallbackOffset,\n\t\t\t\t\ttouch = evt.touches ? evt.touches[0] : evt,\n\t\t\t\t\tmatrix = ghostEl && _matrix(ghostEl),\n\t\t\t\t\tscaleX = ghostEl && matrix && matrix.a,\n\t\t\t\t\tscaleY = ghostEl && matrix && matrix.d,\n\t\t\t\t\trelativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && _getRelativeScrollOffset(ghostRelativeParent),\n\t\t\t\t\tdx = ((touch.clientX - tapEvt.clientX)\n\t\t\t\t\t\t\t+ fallbackOffset.x) / (scaleX || 1)\n\t\t\t\t\t\t\t+ (relativeScrollOffset ? (relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0]) : 0) / (scaleX || 1),\n\t\t\t\t\tdy = ((touch.clientY - tapEvt.clientY)\n\t\t\t\t\t\t\t+ fallbackOffset.y) / (scaleY || 1)\n\t\t\t\t\t\t\t+ (relativeScrollOffset ? (relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1]) : 0) / (scaleY || 1),\n\t\t\t\t\ttranslate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)';\n\n\t\t\t\t// only set the status to dragging, when we are actually dragging\n\t\t\t\tif (!Sortable.active && !awaitingDragStarted) {\n\t\t\t\t\tif (fallbackTolerance &&\n\t\t\t\t\t\tmin(abs(touch.clientX - this._lastX), abs(touch.clientY - this._lastY)) < fallbackTolerance\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._onDragStart(evt, true);\n\t\t\t\t}\n\n\t\t\t\t!forAutoScroll && this._handleAutoScroll(touch, true);\n\n\t\t\t\tmoved = true;\n\t\t\t\ttouchEvt = touch;\n\n\t\t\t\t_css(ghostEl, 'webkitTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'mozTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'msTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'transform', translate3d);\n\n\t\t\t\tevt.cancelable && evt.preventDefault();\n\t\t\t}\n\t\t},\n\n\t\t_appendGhost: function () {\n\t\t\t// Bug if using scale(): https://stackoverflow.com/questions/2637058\n\t\t\t// Not being adjusted for\n\t\t\tif (!ghostEl) {\n\t\t\t\tvar container = this.options.fallbackOnBody ? document.body : rootEl,\n\t\t\t\t\trect = _getRect(dragEl, true, container, !PositionGhostAbsolutely),\n\t\t\t\t\tcss = _css(dragEl),\n\t\t\t\t\toptions = this.options;\n\n\t\t\t\t// Position absolutely\n\t\t\t\tif (PositionGhostAbsolutely) {\n\t\t\t\t\t// Get relatively positioned parent\n\t\t\t\t\tghostRelativeParent = container;\n\n\t\t\t\t\twhile (\n\t\t\t\t\t\t_css(ghostRelativeParent, 'position') === 'static' &&\n\t\t\t\t\t\t_css(ghostRelativeParent, 'transform') === 'none' &&\n\t\t\t\t\t\tghostRelativeParent !== document\n\t\t\t\t\t) {\n\t\t\t\t\t\tghostRelativeParent = ghostRelativeParent.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ghostRelativeParent !== document) {\n\t\t\t\t\t\tvar ghostRelativeParentRect = _getRect(ghostRelativeParent, true);\n\n\t\t\t\t\t\trect.top -= ghostRelativeParentRect.top;\n\t\t\t\t\t\trect.left -= ghostRelativeParentRect.left;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n\t\t\t\t\t\tif (ghostRelativeParent === document) ghostRelativeParent = _getWindowScrollingElement();\n\n\t\t\t\t\t\trect.top += ghostRelativeParent.scrollTop;\n\t\t\t\t\t\trect.left += ghostRelativeParent.scrollLeft;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tghostRelativeParent = _getWindowScrollingElement();\n\t\t\t\t\t}\n\t\t\t\t\tghostRelativeParentInitialScroll = _getRelativeScrollOffset(ghostRelativeParent);\n\t\t\t\t}\n\n\n\t\t\t\tghostEl = dragEl.cloneNode(true);\n\n\t\t\t\t_toggleClass(ghostEl, options.ghostClass, false);\n\t\t\t\t_toggleClass(ghostEl, options.fallbackClass, true);\n\t\t\t\t_toggleClass(ghostEl, options.dragClass, true);\n\n\t\t\t\t_css(ghostEl, 'box-sizing', 'border-box');\n\t\t\t\t_css(ghostEl, 'margin', 0);\n\t\t\t\t_css(ghostEl, 'top', rect.top);\n\t\t\t\t_css(ghostEl, 'left', rect.left);\n\t\t\t\t_css(ghostEl, 'width', rect.width);\n\t\t\t\t_css(ghostEl, 'height', rect.height);\n\t\t\t\t_css(ghostEl, 'opacity', '0.8');\n\t\t\t\t_css(ghostEl, 'position', (PositionGhostAbsolutely ? 'absolute' : 'fixed'));\n\t\t\t\t_css(ghostEl, 'zIndex', '100000');\n\t\t\t\t_css(ghostEl, 'pointerEvents', 'none');\n\n\t\t\t\tcontainer.appendChild(ghostEl);\n\t\t\t}\n\t\t},\n\n\t\t_onDragStart: function (/**Event*/evt, /**boolean*/fallback) {\n\t\t\tvar _this = this;\n\t\t\tvar dataTransfer = evt.dataTransfer;\n\t\t\tvar options = _this.options;\n\n\t\t\t// Setup clone\n\t\t\tcloneEl = _clone(dragEl);\n\n\t\t\tcloneEl.draggable = false;\n\t\t\tcloneEl.style['will-change'] = '';\n\n\t\t\tthis._hideClone();\n\n\t\t\t_toggleClass(cloneEl, _this.options.chosenClass, false);\n\n\n\t\t\t// #1143: IFrame support workaround\n\t\t\t_this._cloneId = _nextTick(function () {\n\t\t\t\tif (!_this.options.removeCloneOnHide) {\n\t\t\t\t\trootEl.insertBefore(cloneEl, dragEl);\n\t\t\t\t}\n\t\t\t\t_dispatchEvent(_this, rootEl, 'clone', dragEl);\n\t\t\t});\n\n\n\t\t\t!fallback && _toggleClass(dragEl, options.dragClass, true);\n\n\t\t\t// Set proper drop events\n\t\t\tif (fallback) {\n\t\t\t\tignoreNextClick = true;\n\t\t\t\t_this._loopId = setInterval(_this._emulateDragOver, 50);\n\t\t\t} else {\n\t\t\t\t// Undo what was set in _prepareDragStart before drag started\n\t\t\t\t_off(document, 'mouseup', _this._onDrop);\n\t\t\t\t_off(document, 'touchend', _this._onDrop);\n\t\t\t\t_off(document, 'touchcancel', _this._onDrop);\n\n\t\t\t\tif (dataTransfer) {\n\t\t\t\t\tdataTransfer.effectAllowed = 'move';\n\t\t\t\t\toptions.setData && options.setData.call(_this, dataTransfer, dragEl);\n\t\t\t\t}\n\n\t\t\t\t_on(document, 'drop', _this);\n\n\t\t\t\t// #1276 fix:\n\t\t\t\t_css(dragEl, 'transform', 'translateZ(0)');\n\t\t\t}\n\n\t\t\tawaitingDragStarted = true;\n\n\t\t\t_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n\t\t\t_on(document, 'selectstart', _this);\n\t\t\tif (Safari) {\n\t\t\t\t_css(document.body, 'user-select', 'none');\n\t\t\t}\n\t\t},\n\n\n\t\t// Returns true - if no further action is needed (either inserted or another condition)\n\t\t_onDragOver: function (/**Event*/evt) {\n\t\t\tvar el = this.el,\n\t\t\t\ttarget = evt.target,\n\t\t\t\tdragRect,\n\t\t\t\ttargetRect,\n\t\t\t\trevert,\n\t\t\t\toptions = this.options,\n\t\t\t\tgroup = options.group,\n\t\t\t\tactiveSortable = Sortable.active,\n\t\t\t\tisOwner = (activeGroup === group),\n\t\t\t\tcanSort = options.sort,\n\t\t\t\t_this = this;\n\n\t\t\tif (_silent) return;\n\n\t\t\t// IE event order fix\n\t\t\tif (IE11OrLess && !evt.rootEl && !evt.artificialBubble && !_isTrueParentSortable(el, target)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Return invocation when dragEl is inserted (or completed)\n\t\t\tfunction completed(insertion) {\n\t\t\t\tif (insertion) {\n\t\t\t\t\tif (isOwner) {\n\t\t\t\t\t\tactiveSortable._hideClone();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactiveSortable._showClone(_this);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (activeSortable) {\n\t\t\t\t\t\t// Set ghost class to new sortable's ghost class\n\t\t\t\t\t\t_toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n\t\t\t\t\t\t_toggleClass(dragEl, options.ghostClass, true);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (putSortable !== _this && _this !== Sortable.active) {\n\t\t\t\t\t\tputSortable = _this;\n\t\t\t\t\t} else if (_this === Sortable.active) {\n\t\t\t\t\t\tputSortable = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Animation\n\t\t\t\t\tdragRect && _this._animate(dragRect, dragEl);\n\t\t\t\t\ttarget && targetRect && _this._animate(targetRect, target);\n\t\t\t\t}\n\n\n\t\t\t\t// Null lastTarget if it is not inside a previously swapped element\n\t\t\t\tif ((target === dragEl && !dragEl.animated) || (target === el && !target.animated)) {\n\t\t\t\t\tlastTarget = null;\n\t\t\t\t}\n\t\t\t\t// no bubbling and not fallback\n\t\t\t\tif (!options.dragoverBubble && !evt.rootEl && target !== document) {\n\t\t\t\t\t_this._handleAutoScroll(evt);\n\t\t\t\t\tdragEl.parentNode[expando]._computeIsAligned(evt);\n\t\t\t\t}\n\n\t\t\t\t!options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Call when dragEl has been inserted\n\t\t\tfunction changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}\n\n\n\t\t\tif (evt.preventDefault !== void 0) {\n\t\t\t\tevt.cancelable && evt.preventDefault();\n\t\t\t}\n\n\n\t\t\tmoved = true;\n\n\t\t\ttarget = _closest(target, options.draggable, el, true);\n\n\t\t\t// target is dragEl or target is animated\n\t\t\tif (!!_closest(evt.target, null, dragEl, true) || target.animated) {\n\t\t\t\treturn completed(false);\n\t\t\t}\n\n\t\t\tif (target !== dragEl) {\n\t\t\t\tignoreNextClick = false;\n\t\t\t}\n\n\t\t\tif (activeSortable && !options.disabled &&\n\t\t\t\t(isOwner\n\t\t\t\t\t? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list\n\t\t\t\t\t: (\n\t\t\t\t\t\tputSortable === this ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) &&\n\t\t\t\t\t\t\tgroup.checkPut(this, activeSortable, dragEl, evt)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tvar axis = this._getDirection(evt, target);\n\n\t\t\t\tdragRect = _getRect(dragEl);\n\n\t\t\t\tif (revert) {\n\t\t\t\t\tthis._hideClone();\n\t\t\t\t\tparentEl = rootEl; // actualization\n\n\t\t\t\t\tif (nextEl) {\n\t\t\t\t\t\trootEl.insertBefore(dragEl, nextEl);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootEl.appendChild(dragEl);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn completed(true);\n\t\t\t\t}\n\n\t\t\t\tvar elLastChild = _lastChild(el);\n\n\t\t\t\tif (!elLastChild || _ghostIsLast(evt, axis, el) && !elLastChild.animated) {\n\t\t\t\t\t// assign target only if condition is true\n\t\t\t\t\tif (elLastChild && el === evt.target) {\n\t\t\t\t\t\ttarget = elLastChild;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (target) {\n\t\t\t\t\t\ttargetRect = _getRect(target);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isOwner) {\n\t\t\t\t\t\tactiveSortable._hideClone();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactiveSortable._showClone(this);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n\t\t\t\t\t\tel.appendChild(dragEl);\n\t\t\t\t\t\tparentEl = el; // actualization\n\t\t\t\t\t\trealDragElRect = null;\n\n\t\t\t\t\t\tchanged();\n\t\t\t\t\t\treturn completed(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (target && target !== dragEl && target.parentNode === el) {\n\t\t\t\t\tvar direction = 0,\n\t\t\t\t\t\ttargetBeforeFirstSwap,\n\t\t\t\t\t\taligned = target.sortableMouseAligned,\n\t\t\t\t\t\tdifferentLevel = dragEl.parentNode !== el,\n\t\t\t\t\t\tside1 = axis === 'vertical' ? 'top' : 'left',\n\t\t\t\t\t\tscrolledPastTop = _isScrolledPast(target, 'top') || _isScrolledPast(dragEl, 'top'),\n\t\t\t\t\t\tscrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n\n\t\t\t\t\tif (lastTarget !== target) {\n\t\t\t\t\t\tlastMode = null;\n\t\t\t\t\t\ttargetBeforeFirstSwap = _getRect(target)[side1];\n\t\t\t\t\t\tpastFirstInvertThresh = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reference: https://www.lucidchart.com/documents/view/10fa0e93-e362-4126-aca2-b709ee56bd8b/0\n\t\t\t\t\tif (\n\t\t\t\t\t\t_isElInRowColumn(dragEl, target, axis) && aligned ||\n\t\t\t\t\t\tdifferentLevel ||\n\t\t\t\t\t\tscrolledPastTop ||\n\t\t\t\t\t\toptions.invertSwap ||\n\t\t\t\t\t\tlastMode === 'insert' ||\n\t\t\t\t\t\t// Needed, in the case that we are inside target and inserted because not aligned... aligned will stay false while inside\n\t\t\t\t\t\t// and lastMode will change to 'insert', but we must swap\n\t\t\t\t\t\tlastMode === 'swap'\n\t\t\t\t\t) {\n\t\t\t\t\t\t// New target that we will be inside\n\t\t\t\t\t\tif (lastMode !== 'swap') {\n\t\t\t\t\t\t\tisCircumstantialInvert = options.invertSwap || differentLevel;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdirection = _getSwapDirection(evt, target, axis,\n\t\t\t\t\t\t\toptions.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold,\n\t\t\t\t\t\t\tisCircumstantialInvert,\n\t\t\t\t\t\t\tlastTarget === target);\n\t\t\t\t\t\tlastMode = 'swap';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Insert at position\n\t\t\t\t\t\tdirection = _getInsertDirection(target);\n\t\t\t\t\t\tlastMode = 'insert';\n\t\t\t\t\t}\n\t\t\t\t\tif (direction === 0) return completed(false);\n\n\t\t\t\t\trealDragElRect = null;\n\t\t\t\t\tlastTarget = target;\n\n\t\t\t\t\tlastDirection = direction;\n\n\t\t\t\t\ttargetRect = _getRect(target);\n\n\t\t\t\t\tvar nextSibling = target.nextElementSibling,\n\t\t\t\t\t\tafter = false;\n\n\t\t\t\t\tafter = direction === 1;\n\n\t\t\t\t\tvar moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n\t\t\t\t\tif (moveVector !== false) {\n\t\t\t\t\t\tif (moveVector === 1 || moveVector === -1) {\n\t\t\t\t\t\t\tafter = (moveVector === 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_silent = true;\n\t\t\t\t\t\tsetTimeout(_unsilent, 30);\n\n\t\t\t\t\t\tif (isOwner) {\n\t\t\t\t\t\t\tactiveSortable._hideClone();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tactiveSortable._showClone(this);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (after && !nextSibling) {\n\t\t\t\t\t\t\tel.appendChild(dragEl);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttarget.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Undo chrome's scroll adjustment\n\t\t\t\t\t\tif (scrolledPastTop) {\n\t\t\t\t\t\t\t_scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparentEl = dragEl.parentNode; // actualization\n\n\t\t\t\t\t\t// must be done before animation\n\t\t\t\t\t\tif (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n\t\t\t\t\t\t\ttargetMoveDistance = abs(targetBeforeFirstSwap - _getRect(target)[side1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchanged();\n\n\t\t\t\t\t\treturn completed(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (el.contains(dragEl)) {\n\t\t\t\t\treturn completed(false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (IE11OrLess && !evt.rootEl) {\n\t\t\t\t_artificalBubble(el, evt, '_onDragOver');\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\t_animate: function (prevRect, target) {\n\t\t\tvar ms = this.options.animation;\n\n\t\t\tif (ms) {\n\t\t\t\tvar currentRect = _getRect(target);\n\n\t\t\t\tif (target === dragEl) {\n\t\t\t\t\trealDragElRect = currentRect;\n\t\t\t\t}\n\n\t\t\t\tif (prevRect.nodeType === 1) {\n\t\t\t\t\tprevRect = _getRect(prevRect);\n\t\t\t\t}\n\n\t\t\t\t// Check if actually moving position\n\t\t\t\tif ((prevRect.left + prevRect.width / 2) !== (currentRect.left + currentRect.width / 2)\n\t\t\t\t\t|| (prevRect.top + prevRect.height / 2) !== (currentRect.top + currentRect.height / 2)\n\t\t\t\t) {\n\t\t\t\t\tvar matrix = _matrix(this.el),\n\t\t\t\t\t\tscaleX = matrix && matrix.a,\n\t\t\t\t\t\tscaleY = matrix && matrix.d;\n\n\t\t\t\t\t_css(target, 'transition', 'none');\n\t\t\t\t\t_css(target, 'transform', 'translate3d('\n\t\t\t\t\t\t+ (prevRect.left - currentRect.left) / (scaleX ? scaleX : 1) + 'px,'\n\t\t\t\t\t\t+ (prevRect.top - currentRect.top) / (scaleY ? scaleY : 1) + 'px,0)'\n\t\t\t\t\t);\n\n\t\t\t\t\tforRepaintDummy = target.offsetWidth; // repaint\n\t\t\t\t\t_css(target, 'transition', 'transform ' + ms + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n\t\t\t\t\t_css(target, 'transform', 'translate3d(0,0,0)');\n\t\t\t\t}\n\n\t\t\t\t(typeof target.animated === 'number') && clearTimeout(target.animated);\n\t\t\t\ttarget.animated = setTimeout(function () {\n\t\t\t\t\t_css(target, 'transition', '');\n\t\t\t\t\t_css(target, 'transform', '');\n\t\t\t\t\ttarget.animated = false;\n\t\t\t\t}, ms);\n\t\t\t}\n\t\t},\n\n\t\t_offUpEvents: function () {\n\t\t\tvar ownerDocument = this.el.ownerDocument;\n\n\t\t\t_off(document, 'touchmove', this._onTouchMove);\n\t\t\t_off(document, 'pointermove', this._onTouchMove);\n\t\t\t_off(ownerDocument, 'mouseup', this._onDrop);\n\t\t\t_off(ownerDocument, 'touchend', this._onDrop);\n\t\t\t_off(ownerDocument, 'pointerup', this._onDrop);\n\t\t\t_off(ownerDocument, 'touchcancel', this._onDrop);\n\t\t\t_off(document, 'selectstart', this);\n\t\t},\n\n\t\t_onDrop: function (/**Event*/evt) {\n\t\t\tvar el = this.el,\n\t\t\t\toptions = this.options;\n\t\t\tawaitingDragStarted = false;\n\t\t\tscrolling = false;\n\t\t\tisCircumstantialInvert = false;\n\t\t\tpastFirstInvertThresh = false;\n\n\t\t\tclearInterval(this._loopId);\n\n\t\t\tclearInterval(pointerElemChangedInterval);\n\t\t\t_clearAutoScrolls();\n\t\t\t_cancelThrottle();\n\n\t\t\tclearTimeout(this._dragStartTimer);\n\n\t\t\t_cancelNextTick(this._cloneId);\n\t\t\t_cancelNextTick(this._dragStartId);\n\n\t\t\t// Unbind events\n\t\t\t_off(document, 'mousemove', this._onTouchMove);\n\n\n\t\t\tif (this.nativeDraggable) {\n\t\t\t\t_off(document, 'drop', this);\n\t\t\t\t_off(el, 'dragstart', this._onDragStart);\n\t\t\t\t_off(document, 'dragover', this._handleAutoScroll);\n\t\t\t\t_off(document, 'dragover', _checkAlignment);\n\t\t\t}\n\n\t\t\tif (Safari) {\n\t\t\t\t_css(document.body, 'user-select', '');\n\t\t\t}\n\n\t\t\tthis._offUpEvents();\n\n\t\t\tif (evt) {\n\t\t\t\tif (moved) {\n\t\t\t\t\tevt.cancelable && evt.preventDefault();\n\t\t\t\t\t!options.dropBubble && evt.stopPropagation();\n\t\t\t\t}\n\n\t\t\t\tghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n\t\t\t\tif (rootEl === parentEl || (putSortable && putSortable.lastPutMode !== 'clone')) {\n\t\t\t\t\t// Remove clone\n\t\t\t\t\tcloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n\t\t\t\t}\n\n\t\t\t\tif (dragEl) {\n\t\t\t\t\tif (this.nativeDraggable) {\n\t\t\t\t\t\t_off(dragEl, 'dragend', this);\n\t\t\t\t\t}\n\n\t\t\t\t\t_disableDraggable(dragEl);\n\t\t\t\t\tdragEl.style['will-change'] = '';\n\n\t\t\t\t\t// Remove class's\n\t\t\t\t\t_toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n\t\t\t\t\t_toggleClass(dragEl, this.options.chosenClass, false);\n\n\t\t\t\t\t// Drag stop event\n\t\t\t\t\t_dispatchEvent(this, rootEl, 'unchoose', dragEl, parentEl, rootEl, oldIndex, null, evt);\n\n\t\t\t\t\tif (rootEl !== parentEl) {\n\t\t\t\t\t\tnewIndex = _index(dragEl, options.draggable);\n\n\t\t\t\t\t\tif (newIndex >= 0) {\n\t\t\t\t\t\t\t// Add event\n\t\t\t\t\t\t\t_dispatchEvent(null, parentEl, 'add', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);\n\n\t\t\t\t\t\t\t// Remove event\n\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'remove', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);\n\n\t\t\t\t\t\t\t// drag from one list and drop into another\n\t\t\t\t\t\t\t_dispatchEvent(null, parentEl, 'sort', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);\n\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'sort', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tputSortable && putSortable.save();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (dragEl.nextSibling !== nextEl) {\n\t\t\t\t\t\t\t// Get the index of the dragged element within its parent\n\t\t\t\t\t\t\tnewIndex = _index(dragEl, options.draggable);\n\n\t\t\t\t\t\t\tif (newIndex >= 0) {\n\t\t\t\t\t\t\t\t// drag & drop within the same list\n\t\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'update', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);\n\t\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'sort', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Sortable.active) {\n\t\t\t\t\t\t/* jshint eqnull:true */\n\t\t\t\t\t\tif (newIndex == null || newIndex === -1) {\n\t\t\t\t\t\t\tnewIndex = oldIndex;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'end', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);\n\n\t\t\t\t\t\t// Save sorting\n\t\t\t\t\t\tthis.save();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tthis._nulling();\n\t\t},\n\n\t\t_nulling: function() {\n\t\t\trootEl =\n\t\t\tdragEl =\n\t\t\tparentEl =\n\t\t\tghostEl =\n\t\t\tnextEl =\n\t\t\tcloneEl =\n\t\t\tlastDownEl =\n\n\t\t\tscrollEl =\n\t\t\tscrollParentEl =\n\t\t\tautoScrolls.length =\n\n\t\t\tpointerElemChangedInterval =\n\t\t\tlastPointerElemX =\n\t\t\tlastPointerElemY =\n\n\t\t\ttapEvt =\n\t\t\ttouchEvt =\n\n\t\t\tmoved =\n\t\t\tnewIndex =\n\t\t\toldIndex =\n\n\t\t\tlastTarget =\n\t\t\tlastDirection =\n\n\t\t\tforRepaintDummy =\n\t\t\trealDragElRect =\n\n\t\t\tputSortable =\n\t\t\tactiveGroup =\n\t\t\tSortable.active = null;\n\n\t\t\tsavedInputChecked.forEach(function (el) {\n\t\t\t\tel.checked = true;\n\t\t\t});\n\n\t\t\tsavedInputChecked.length = 0;\n\t\t},\n\n\t\thandleEvent: function (/**Event*/evt) {\n\t\t\tswitch (evt.type) {\n\t\t\t\tcase 'drop':\n\t\t\t\tcase 'dragend':\n\t\t\t\t\tthis._onDrop(evt);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'dragenter':\n\t\t\t\tcase 'dragover':\n\t\t\t\t\tif (dragEl) {\n\t\t\t\t\t\tthis._onDragOver(evt);\n\t\t\t\t\t\t_globalDragOver(evt);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'selectstart':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\n\t\t/**\n\t\t * Serializes the item into an array of string.\n\t\t * @returns {String[]}\n\t\t */\n\t\ttoArray: function () {\n\t\t\tvar order = [],\n\t\t\t\tel,\n\t\t\t\tchildren = this.el.children,\n\t\t\t\ti = 0,\n\t\t\t\tn = children.length,\n\t\t\t\toptions = this.options;\n\n\t\t\tfor (; i < n; i++) {\n\t\t\t\tel = children[i];\n\t\t\t\tif (_closest(el, options.draggable, this.el, false)) {\n\t\t\t\t\torder.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn order;\n\t\t},\n\n\n\t\t/**\n\t\t * Sorts the elements according to the array.\n\t\t * @param {String[]} order order of the items\n\t\t */\n\t\tsort: function (order) {\n\t\t\tvar items = {}, rootEl = this.el;\n\n\t\t\tthis.toArray().forEach(function (id, i) {\n\t\t\t\tvar el = rootEl.children[i];\n\n\t\t\t\tif (_closest(el, this.options.draggable, rootEl, false)) {\n\t\t\t\t\titems[id] = el;\n\t\t\t\t}\n\t\t\t}, this);\n\n\t\t\torder.forEach(function (id) {\n\t\t\t\tif (items[id]) {\n\t\t\t\t\trootEl.removeChild(items[id]);\n\t\t\t\t\trootEl.appendChild(items[id]);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n\t\t * Save the current sorting\n\t\t */\n\t\tsave: function () {\n\t\t\tvar store = this.options.store;\n\t\t\tstore && store.set && store.set(this);\n\t\t},\n\n\n\t\t/**\n\t\t * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n\t\t * @param {HTMLElement} el\n\t\t * @param {String} [selector] default: `options.draggable`\n\t\t * @returns {HTMLElement|null}\n\t\t */\n\t\tclosest: function (el, selector) {\n\t\t\treturn _closest(el, selector || this.options.draggable, this.el, false);\n\t\t},\n\n\n\t\t/**\n\t\t * Set/get option\n\t\t * @param {string} name\n\t\t * @param {*} [value]\n\t\t * @returns {*}\n\t\t */\n\t\toption: function (name, value) {\n\t\t\tvar options = this.options;\n\n\t\t\tif (value === void 0) {\n\t\t\t\treturn options[name];\n\t\t\t} else {\n\t\t\t\toptions[name] = value;\n\n\t\t\t\tif (name === 'group') {\n\t\t\t\t\t_prepareGroup(options);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\n\t\t/**\n\t\t * Destroy\n\t\t */\n\t\tdestroy: function () {\n\t\t\tvar el = this.el;\n\n\t\t\tel[expando] = null;\n\n\t\t\t_off(el, 'mousedown', this._onTapStart);\n\t\t\t_off(el, 'touchstart', this._onTapStart);\n\t\t\t_off(el, 'pointerdown', this._onTapStart);\n\n\t\t\tif (this.nativeDraggable) {\n\t\t\t\t_off(el, 'dragover', this);\n\t\t\t\t_off(el, 'dragenter', this);\n\t\t\t}\n\t\t\t// Remove draggable attributes\n\t\t\tArray.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n\t\t\t\tel.removeAttribute('draggable');\n\t\t\t});\n\n\t\t\tthis._onDrop();\n\n\t\t\tsortables.splice(sortables.indexOf(this.el), 1);\n\n\t\t\tthis.el = el = null;\n\t\t},\n\n\t\t_hideClone: function() {\n\t\t\tif (!cloneEl.cloneHidden) {\n\t\t\t\t_css(cloneEl, 'display', 'none');\n\t\t\t\tcloneEl.cloneHidden = true;\n\t\t\t\tif (cloneEl.parentNode && this.options.removeCloneOnHide) {\n\t\t\t\t\tcloneEl.parentNode.removeChild(cloneEl);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_showClone: function(putSortable) {\n\t\t\tif (putSortable.lastPutMode !== 'clone') {\n\t\t\t\tthis._hideClone();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (cloneEl.cloneHidden) {\n\t\t\t\t// show clone at dragEl or original position\n\t\t\t\tif (rootEl.contains(dragEl) && !this.options.group.revertClone) {\n\t\t\t\t\trootEl.insertBefore(cloneEl, dragEl);\n\t\t\t\t} else if (nextEl) {\n\t\t\t\t\trootEl.insertBefore(cloneEl, nextEl);\n\t\t\t\t} else {\n\t\t\t\t\trootEl.appendChild(cloneEl);\n\t\t\t\t}\n\n\t\t\t\tif (this.options.group.revertClone) {\n\t\t\t\t\tthis._animate(dragEl, cloneEl);\n\t\t\t\t}\n\t\t\t\t_css(cloneEl, 'display', '');\n\t\t\t\tcloneEl.cloneHidden = false;\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction _closest(/**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n\t\tif (el) {\n\t\t\tctx = ctx || document;\n\n\t\t\tdo {\n\t\t\t\tif (\n\t\t\t\t\tselector != null &&\n\t\t\t\t\t(\n\t\t\t\t\t\tselector[0] === '>' && el.parentNode === ctx && _matches(el, selector.substring(1)) ||\n\t\t\t\t\t\t_matches(el, selector)\n\t\t\t\t\t) ||\n\t\t\t\t\tincludeCTX && el === ctx\n\t\t\t\t) {\n\t\t\t\t\treturn el;\n\t\t\t\t}\n\n\t\t\t\tif (el === ctx) break;\n\t\t\t\t/* jshint boss:true */\n\t\t\t} while (el = _getParentOrHost(el));\n\t\t}\n\n\t\treturn null;\n\t}\n\n\n\tfunction _getParentOrHost(el) {\n\t\treturn (el.host && el !== document && el.host.nodeType)\n\t\t\t? el.host\n\t\t\t: el.parentNode;\n\t}\n\n\n\tfunction _globalDragOver(/**Event*/evt) {\n\t\tif (evt.dataTransfer) {\n\t\t\tevt.dataTransfer.dropEffect = 'move';\n\t\t}\n\t\tevt.cancelable && evt.preventDefault();\n\t}\n\n\n\tfunction _on(el, event, fn) {\n\t\tel.addEventListener(event, fn, captureMode);\n\t}\n\n\n\tfunction _off(el, event, fn) {\n\t\tel.removeEventListener(event, fn, captureMode);\n\t}\n\n\n\tfunction _toggleClass(el, name, state) {\n\t\tif (el && name) {\n\t\t\tif (el.classList) {\n\t\t\t\tel.classList[state ? 'add' : 'remove'](name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n\t\t\t\tel.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n\t\t\t}\n\t\t}\n\t}\n\n\n\tfunction _css(el, prop, val) {\n\t\tvar style = el && el.style;\n\n\t\tif (style) {\n\t\t\tif (val === void 0) {\n\t\t\t\tif (document.defaultView && document.defaultView.getComputedStyle) {\n\t\t\t\t\tval = document.defaultView.getComputedStyle(el, '');\n\t\t\t\t}\n\t\t\t\telse if (el.currentStyle) {\n\t\t\t\t\tval = el.currentStyle;\n\t\t\t\t}\n\n\t\t\t\treturn prop === void 0 ? val : val[prop];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(prop in style) && prop.indexOf('webkit') === -1) {\n\t\t\t\t\tprop = '-webkit-' + prop;\n\t\t\t\t}\n\n\t\t\t\tstyle[prop] = val + (typeof val === 'string' ? '' : 'px');\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction _matrix(el) {\n\t\tvar appliedTransforms = '';\n\t\tdo {\n\t\t\tvar transform = _css(el, 'transform');\n\n\t\t\tif (transform && transform !== 'none') {\n\t\t\t\tappliedTransforms = transform + ' ' + appliedTransforms;\n\t\t\t}\n\t\t\t/* jshint boss:true */\n\t\t} while (el = el.parentNode);\n\n\t\tif (window.DOMMatrix) {\n\t\t\treturn new DOMMatrix(appliedTransforms);\n\t\t} else if (window.WebKitCSSMatrix) {\n\t\t\treturn new WebKitCSSMatrix(appliedTransforms);\n\t\t} else if (window.CSSMatrix) {\n\t\t\treturn new CSSMatrix(appliedTransforms);\n\t\t}\n\t}\n\n\n\tfunction _find(ctx, tagName, iterator) {\n\t\tif (ctx) {\n\t\t\tvar list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;\n\n\t\t\tif (iterator) {\n\t\t\t\tfor (; i < n; i++) {\n\t\t\t\t\titerator(list[i], i);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}\n\n\t\treturn [];\n\t}\n\n\n\n\tfunction _dispatchEvent(sortable, rootEl, name, targetEl, toEl, fromEl, startIndex, newIndex, originalEvt) {\n\t\tsortable = (sortable || rootEl[expando]);\n\t\tvar evt,\n\t\t\toptions = sortable.options,\n\t\t\tonName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n\t\t// Support for new CustomEvent feature\n\t\tif (window.CustomEvent && !IE11OrLess && !Edge) {\n\t\t\tevt = new CustomEvent(name, {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true\n\t\t\t});\n\t\t} else {\n\t\t\tevt = document.createEvent('Event');\n\t\t\tevt.initEvent(name, true, true);\n\t\t}\n\n\t\tevt.to = toEl || rootEl;\n\t\tevt.from = fromEl || rootEl;\n\t\tevt.item = targetEl || rootEl;\n\t\tevt.clone = cloneEl;\n\n\t\tevt.oldIndex = startIndex;\n\t\tevt.newIndex = newIndex;\n\n\t\tevt.originalEvent = originalEvt;\n\t\tevt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n\t\tif (rootEl) {\n\t\t\trootEl.dispatchEvent(evt);\n\t\t}\n\n\t\tif (options[onName]) {\n\t\t\toptions[onName].call(sortable, evt);\n\t\t}\n\t}\n\n\n\tfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvt, willInsertAfter) {\n\t\tvar evt,\n\t\t\tsortable = fromEl[expando],\n\t\t\tonMoveFn = sortable.options.onMove,\n\t\t\tretVal;\n\t\t// Support for new CustomEvent feature\n\t\tif (window.CustomEvent && !IE11OrLess && !Edge) {\n\t\t\tevt = new CustomEvent('move', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true\n\t\t\t});\n\t\t} else {\n\t\t\tevt = document.createEvent('Event');\n\t\t\tevt.initEvent('move', true, true);\n\t\t}\n\n\t\tevt.to = toEl;\n\t\tevt.from = fromEl;\n\t\tevt.dragged = dragEl;\n\t\tevt.draggedRect = dragRect;\n\t\tevt.related = targetEl || toEl;\n\t\tevt.relatedRect = targetRect || _getRect(toEl);\n\t\tevt.willInsertAfter = willInsertAfter;\n\n\t\tevt.originalEvent = originalEvt;\n\n\t\tfromEl.dispatchEvent(evt);\n\n\t\tif (onMoveFn) {\n\t\t\tretVal = onMoveFn.call(sortable, evt, originalEvt);\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\tfunction _disableDraggable(el) {\n\t\tel.draggable = false;\n\t}\n\n\tfunction _unsilent() {\n\t\t_silent = false;\n\t}\n\n\t/**\n\t * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n\t * and non-draggable elements\n\t * @param {HTMLElement} el The parent element\n\t * @param {Number} childNum The index of the child\n\t * @param {Object} options Parent Sortable's options\n\t * @return {HTMLElement} The child at index childNum, or null if not found\n\t */\n\tfunction _getChild(el, childNum, options) {\n\t\tvar currentChild = 0,\n\t\t\ti = 0,\n\t\t\tchildren = el.children;\n\n\t\twhile (i < children.length) {\n\t\t\tif (\n\t\t\t\tchildren[i].style.display !== 'none' &&\n\t\t\t\tchildren[i] !== ghostEl &&\n\t\t\t\tchildren[i] !== dragEl &&\n\t\t\t\t_closest(children[i], options.draggable, el, false)\n\t\t\t) {\n\t\t\t\tif (currentChild === childNum) {\n\t\t\t\t\treturn children[i];\n\t\t\t\t}\n\t\t\t\tcurrentChild++;\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n\t * @param {HTMLElement} el Parent element\n\t * @return {HTMLElement} The last child, ignoring ghostEl\n\t */\n\tfunction _lastChild(el) {\n\t\tvar last = el.lastElementChild;\n\n\t\twhile (last && (last === ghostEl || last.style.display === 'none')) {\n\t\t\tlast = last.previousElementSibling;\n\t\t}\n\n\t\treturn last || null;\n\t}\n\n\tfunction _ghostIsLast(evt, axis, el) {\n\t\tvar elRect = _getRect(_lastChild(el)),\n\t\t\tmouseOnAxis = axis === 'vertical' ? evt.clientY : evt.clientX,\n\t\t\tmouseOnOppAxis = axis === 'vertical' ? evt.clientX : evt.clientY,\n\t\t\ttargetS2 = axis === 'vertical' ? elRect.bottom : elRect.right,\n\t\t\ttargetS1Opp = axis === 'vertical' ? elRect.left : elRect.top,\n\t\t\ttargetS2Opp = axis === 'vertical' ? elRect.right : elRect.bottom,\n\t\t\tspacer = 10;\n\n\t\treturn (\n\t\t\taxis === 'vertical' ?\n\t\t\t\t(mouseOnOppAxis > targetS2Opp + spacer || mouseOnOppAxis <= targetS2Opp && mouseOnAxis > targetS2 && mouseOnOppAxis >= targetS1Opp) :\n\t\t\t\t(mouseOnAxis > targetS2 && mouseOnOppAxis > targetS1Opp || mouseOnAxis <= targetS2 && mouseOnOppAxis > targetS2Opp + spacer)\n\t\t);\n\t}\n\n\tfunction _getSwapDirection(evt, target, axis, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n\t\tvar targetRect = _getRect(target),\n\t\t\tmouseOnAxis = axis === 'vertical' ? evt.clientY : evt.clientX,\n\t\t\ttargetLength = axis === 'vertical' ? targetRect.height : targetRect.width,\n\t\t\ttargetS1 = axis === 'vertical' ? targetRect.top : targetRect.left,\n\t\t\ttargetS2 = axis === 'vertical' ? targetRect.bottom : targetRect.right,\n\t\t\tdragRect = _getRect(dragEl),\n\t\t\tinvert = false;\n\n\n\t\tif (!invertSwap) {\n\t\t\t// Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n\t\t\tif (isLastTarget && targetMoveDistance < targetLength * swapThreshold) { // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n\t\t\t\t// check if past first invert threshold on side opposite of lastDirection\n\t\t\t\tif (!pastFirstInvertThresh &&\n\t\t\t\t\t(lastDirection === 1 ?\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tmouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2\n\t\t\t\t\t\t) :\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tmouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t// past first invert threshold, do not restrict inverted threshold to dragEl shadow\n\t\t\t\t\tpastFirstInvertThresh = true;\n\t\t\t\t}\n\n\t\t\t\tif (!pastFirstInvertThresh) {\n\t\t\t\t\tvar dragS1 = axis === 'vertical' ? dragRect.top : dragRect.left,\n\t\t\t\t\t\tdragS2 = axis === 'vertical' ? dragRect.bottom : dragRect.right;\n\t\t\t\t\t// dragEl shadow (target move distance shadow)\n\t\t\t\t\tif (\n\t\t\t\t\t\tlastDirection === 1 ?\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tmouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n\t\t\t\t\t\t) :\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tmouseOnAxis > targetS2 - targetMoveDistance\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn lastDirection * -1;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tinvert = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Regular\n\t\t\t\tif (\n\t\t\t\t\tmouseOnAxis > targetS1 + (targetLength * (1 - swapThreshold) / 2) &&\n\t\t\t\t\tmouseOnAxis < targetS2 - (targetLength * (1 - swapThreshold) / 2)\n\t\t\t\t) {\n\t\t\t\t\treturn _getInsertDirection(target);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinvert = invert || invertSwap;\n\n\t\tif (invert) {\n\t\t\t// Invert of regular\n\t\t\tif (\n\t\t\t\tmouseOnAxis < targetS1 + (targetLength * invertedSwapThreshold / 2) ||\n\t\t\t\tmouseOnAxis > targetS2 - (targetLength * invertedSwapThreshold / 2)\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn ((mouseOnAxis > targetS1 + targetLength / 2) ? 1 : -1);\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Gets the direction dragEl must be swapped relative to target in order to make it\n\t * seem that dragEl has been \"inserted\" into that element's position\n\t * @param {HTMLElement} target The target whose position dragEl is being inserted at\n\t * @return {Number} Direction dragEl must be swapped\n\t */\n\tfunction _getInsertDirection(target) {\n\t\tvar dragElIndex = _index(dragEl),\n\t\t\ttargetIndex = _index(target);\n\n\t\tif (dragElIndex < targetIndex) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}\n\n\n\t/**\n\t * Generate id\n\t * @param {HTMLElement} el\n\t * @returns {String}\n\t * @private\n\t */\n\tfunction _generateId(el) {\n\t\tvar str = el.tagName + el.className + el.src + el.href + el.textContent,\n\t\t\ti = str.length,\n\t\t\tsum = 0;\n\n\t\twhile (i--) {\n\t\t\tsum += str.charCodeAt(i);\n\t\t}\n\n\t\treturn sum.toString(36);\n\t}\n\n\t/**\n\t * Returns the index of an element within its parent for a selected set of\n\t * elements\n\t * @param {HTMLElement} el\n\t * @param {selector} selector\n\t * @return {number}\n\t */\n\tfunction _index(el, selector) {\n\t\tvar index = 0;\n\n\t\tif (!el || !el.parentNode) {\n\t\t\treturn -1;\n\t\t}\n\n\t\twhile (el && (el = el.previousElementSibling)) {\n\t\t\tif ((el.nodeName.toUpperCase() !== 'TEMPLATE') && el !== cloneEl) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t}\n\n\tfunction _matches(/**HTMLElement*/el, /**String*/selector) {\n\t\tif (el) {\n\t\t\ttry {\n\t\t\t\tif (el.matches) {\n\t\t\t\t\treturn el.matches(selector);\n\t\t\t\t} else if (el.msMatchesSelector) {\n\t\t\t\t\treturn el.msMatchesSelector(selector);\n\t\t\t\t} else if (el.webkitMatchesSelector) {\n\t\t\t\t\treturn el.webkitMatchesSelector(selector);\n\t\t\t\t}\n\t\t\t} catch(_) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tvar _throttleTimeout;\n\tfunction _throttle(callback, ms) {\n\t\treturn function () {\n\t\t\tif (!_throttleTimeout) {\n\t\t\t\tvar args = arguments,\n\t\t\t\t\t_this = this;\n\n\t\t\t\t_throttleTimeout = setTimeout(function () {\n\t\t\t\t\tif (args.length === 1) {\n\t\t\t\t\t\tcallback.call(_this, args[0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback.apply(_this, args);\n\t\t\t\t\t}\n\n\t\t\t\t\t_throttleTimeout = void 0;\n\t\t\t\t}, ms);\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction _cancelThrottle() {\n\t\tclearTimeout(_throttleTimeout);\n\t\t_throttleTimeout = void 0;\n\t}\n\n\tfunction _extend(dst, src) {\n\t\tif (dst && src) {\n\t\t\tfor (var key in src) {\n\t\t\t\tif (src.hasOwnProperty(key)) {\n\t\t\t\t\tdst[key] = src[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dst;\n\t}\n\n\tfunction _clone(el) {\n\t\tif (Polymer && Polymer.dom) {\n\t\t\treturn Polymer.dom(el).cloneNode(true);\n\t\t}\n\t\telse if ($) {\n\t\t\treturn $(el).clone(true)[0];\n\t\t}\n\t\telse {\n\t\t\treturn el.cloneNode(true);\n\t\t}\n\t}\n\n\tfunction _saveInputCheckedState(root) {\n\t\tsavedInputChecked.length = 0;\n\n\t\tvar inputs = root.getElementsByTagName('input');\n\t\tvar idx = inputs.length;\n\n\t\twhile (idx--) {\n\t\t\tvar el = inputs[idx];\n\t\t\tel.checked && savedInputChecked.push(el);\n\t\t}\n\t}\n\n\tfunction _nextTick(fn) {\n\t\treturn setTimeout(fn, 0);\n\t}\n\n\tfunction _cancelNextTick(id) {\n\t\treturn clearTimeout(id);\n\t}\n\n\n\t/**\n\t * Returns the \"bounding client rect\" of given element\n\t * @param {HTMLElement} el The element whose boundingClientRect is wanted\n\t * @param {[HTMLElement]} container the parent the element will be placed in\n\t * @param {[Boolean]} adjustForTransform Whether the rect should compensate for parent's transform\n\t * @return {Object} The boundingClientRect of el\n\t */\n\tfunction _getRect(el, adjustForTransform, container, adjustForFixed) {\n\t\tif (!el.getBoundingClientRect && el !== win) return;\n\n\t\tvar elRect,\n\t\t\ttop,\n\t\t\tleft,\n\t\t\tbottom,\n\t\t\tright,\n\t\t\theight,\n\t\t\twidth;\n\n\t\tif (el !== win && el !== _getWindowScrollingElement()) {\n\t\t\telRect = el.getBoundingClientRect();\n\t\t\ttop = elRect.top;\n\t\t\tleft = elRect.left;\n\t\t\tbottom = elRect.bottom;\n\t\t\tright = elRect.right;\n\t\t\theight = elRect.height;\n\t\t\twidth = elRect.width;\n\t\t} else {\n\t\t\ttop = 0;\n\t\t\tleft = 0;\n\t\t\tbottom = window.innerHeight;\n\t\t\tright = window.innerWidth;\n\t\t\theight = window.innerHeight;\n\t\t\twidth = window.innerWidth;\n\t\t}\n\n\t\tif (adjustForFixed && el !== win) {\n\t\t\t// Adjust for translate()\n\t\t\tcontainer = container || el.parentNode;\n\n\t\t\t// solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n\t\t\t// Not needed on <= IE11\n\t\t\tif (!IE11OrLess) {\n\t\t\t\tdo {\n\t\t\t\t\tif (container && container.getBoundingClientRect && _css(container, 'transform') !== 'none') {\n\t\t\t\t\t\tvar containerRect = container.getBoundingClientRect();\n\n\t\t\t\t\t\t// Set relative to edges of padding box of container\n\t\t\t\t\t\ttop -= containerRect.top + parseInt(_css(container, 'border-top-width'));\n\t\t\t\t\t\tleft -= containerRect.left + parseInt(_css(container, 'border-left-width'));\n\t\t\t\t\t\tbottom = top + elRect.height;\n\t\t\t\t\t\tright = left + elRect.width;\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t/* jshint boss:true */\n\t\t\t\t} while (container = container.parentNode);\n\t\t\t}\n\t\t}\n\n\t\tif (adjustForTransform && el !== win) {\n\t\t\t// Adjust for scale()\n\t\t\tvar matrix = _matrix(container || el),\n\t\t\t\tscaleX = matrix && matrix.a,\n\t\t\t\tscaleY = matrix && matrix.d;\n\n\t\t\tif (matrix) {\n\t\t\t\ttop /= scaleY;\n\t\t\t\tleft /= scaleX;\n\n\t\t\t\twidth /= scaleX;\n\t\t\t\theight /= scaleY;\n\n\t\t\t\tbottom = top + height;\n\t\t\t\tright = left + width;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\ttop: top,\n\t\t\tleft: left,\n\t\t\tbottom: bottom,\n\t\t\tright: right,\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t};\n\t}\n\n\n\t/**\n\t * Checks if a side of an element is scrolled past a side of it's parents\n\t * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n\t * @param {String} side Side of the element in question ('top', 'left', 'right', 'bottom')\n\t * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n\t */\n\tfunction _isScrolledPast(el, side) {\n\t\tvar parent = _getParentAutoScrollElement(el, true),\n\t\t\telSide = _getRect(el)[side];\n\n\t\t/* jshint boss:true */\n\t\twhile (parent) {\n\t\t\tvar parentSide = _getRect(parent)[side],\n\t\t\t\tvisible;\n\n\t\t\tif (side === 'top' || side === 'left') {\n\t\t\t\tvisible = elSide >= parentSide;\n\t\t\t} else {\n\t\t\t\tvisible = elSide <= parentSide;\n\t\t\t}\n\n\t\t\tif (!visible) return parent;\n\n\t\t\tif (parent === _getWindowScrollingElement()) break;\n\n\t\t\tparent = _getParentAutoScrollElement(parent, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n\t * The value is returned in real pixels.\n\t * @param {HTMLElement} el\n\t * @return {Array} Offsets in the format of [left, top]\n\t */\n\tfunction _getRelativeScrollOffset(el) {\n\t\tvar offsetLeft = 0,\n\t\t\toffsetTop = 0,\n\t\t\twinScroller = _getWindowScrollingElement();\n\n\t\tif (el) {\n\t\t\tdo {\n\t\t\t\tvar matrix = _matrix(el),\n\t\t\t\t\tscaleX = matrix.a,\n\t\t\t\t\tscaleY = matrix.d;\n\n\t\t\t\toffsetLeft += el.scrollLeft * scaleX;\n\t\t\t\toffsetTop += el.scrollTop * scaleY;\n\t\t\t} while (el !== winScroller && (el = el.parentNode));\n\t\t}\n\n\t\treturn [offsetLeft, offsetTop];\n\t}\n\n\t// Fixed #973:\n\t_on(document, 'touchmove', function(evt) {\n\t\tif ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n\t\t\tevt.preventDefault();\n\t\t}\n\t});\n\n\n\t// Export utils\n\tSortable.utils = {\n\t\ton: _on,\n\t\toff: _off,\n\t\tcss: _css,\n\t\tfind: _find,\n\t\tis: function (el, selector) {\n\t\t\treturn !!_closest(el, selector, el, false);\n\t\t},\n\t\textend: _extend,\n\t\tthrottle: _throttle,\n\t\tclosest: _closest,\n\t\ttoggleClass: _toggleClass,\n\t\tclone: _clone,\n\t\tindex: _index,\n\t\tnextTick: _nextTick,\n\t\tcancelNextTick: _cancelNextTick,\n\t\tdetectDirection: _detectDirection,\n\t\tgetChild: _getChild\n\t};\n\n\n\t/**\n\t * Create sortable instance\n\t * @param {HTMLElement} el\n\t * @param {Object} [options]\n\t */\n\tSortable.create = function (el, options) {\n\t\treturn new Sortable(el, options);\n\t};\n\n\n\t// Export\n\tSortable.version = '1.8.4';\n\treturn Sortable;\n});\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _invariant = _interopRequireDefault(require(\"invariant\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = require(\"react-dom\");\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _activeElement = _interopRequireDefault(require(\"dom-helpers/activeElement\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _deprecated = _interopRequireDefault(require(\"prop-types-extra/lib/deprecated\"));\n\nvar _uncontrollable = _interopRequireDefault(require(\"uncontrollable\"));\n\nvar _Widget = _interopRequireDefault(require(\"./Widget\"));\n\nvar _WidgetPicker = _interopRequireDefault(require(\"./WidgetPicker\"));\n\nvar _Popup = _interopRequireDefault(require(\"./Popup\"));\n\nvar _Button = _interopRequireDefault(require(\"./Button\"));\n\nvar _Calendar = _interopRequireDefault(require(\"./Calendar\"));\n\nvar _DateTimePickerInput = _interopRequireDefault(require(\"./DateTimePickerInput\"));\n\nvar _Select = _interopRequireDefault(require(\"./Select\"));\n\nvar _TimeList = _interopRequireDefault(require(\"./TimeList\"));\n\nvar _messages = require(\"./messages\");\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar _focusManager = _interopRequireDefault(require(\"./util/focusManager\"));\n\nvar _scrollManager = _interopRequireDefault(require(\"./util/scrollManager\"));\n\nvar _interaction = require(\"./util/interaction\");\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar _widgetHelpers = require(\"./util/widgetHelpers\");\n\nvar _Icon = require(\"./Icon\");\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _class3, _temp;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object['ke' + 'ys'](descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object['define' + 'Property'](target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.'); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nvar NEXT_VIEW = {\n date: 'time',\n time: 'date'\n};\n\nvar isBothOrNeither = function isBothOrNeither(a, b) {\n return a && b || !a && !b;\n};\n\nvar propTypes = _extends({}, _Calendar.default.ControlledComponent.propTypes, {\n /**\n * @example ['valuePicker', [ ['new Date()', null] ]]\n */\n value: _propTypes.default.instanceOf(Date),\n\n /**\n * @example ['onChangePicker', [ ['new Date()', null] ]]\n */\n onChange: _propTypes.default.func,\n\n /**\n * @type {(false | 'time' | 'date')}\n * @example ['openDateTime']\n */\n open: _propTypes.default.oneOf([false, 'time', 'date']),\n onToggle: _propTypes.default.func,\n\n /**\n * Default current date at which the calendar opens. If none is provided, opens at today's date or the `value` date (if any).\n */\n currentDate: _propTypes.default.instanceOf(Date),\n\n /**\n * Change event Handler that is called when the currentDate is changed. The handler is called with the currentDate object.\n */\n onCurrentDateChange: _propTypes.default.func,\n onSelect: _propTypes.default.func,\n\n /**\n * The minimum Date that can be selected. Min only limits selection, it doesn't constrain the date values that\n * can be typed or pasted into the widget. If you need this behavior you can constrain values via\n * the `onChange` handler.\n *\n * @example ['prop', ['min', 'new Date()']]\n */\n min: _propTypes.default.instanceOf(Date),\n\n /**\n * The maximum Date that can be selected. Max only limits selection, it doesn't constrain the date values that\n * can be typed or pasted into the widget. If you need this behavior you can constrain values via\n * the `onChange` handler.\n *\n * @example ['prop', ['max', 'new Date()']]\n */\n max: _propTypes.default.instanceOf(Date),\n\n /**\n * The amount of minutes between each entry in the time list.\n *\n * @example ['prop', { step: 90 }]\n */\n step: _propTypes.default.number,\n culture: _propTypes.default.string,\n\n /**\n * A formatter used to display the date value. For more information about formats\n * visit the [Localization page](/localization)\n *\n * @example ['dateFormat', ['format', \"{ raw: 'MMM dd, yyyy' }\", null, { defaultValue: 'new Date()', time: 'false' }]]\n */\n format: CustomPropTypes.dateFormat,\n\n /**\n * A formatter used by the time dropdown to render times. For more information about formats visit\n * the [Localization page](/localization).\n *\n * @example ['dateFormat', ['timeFormat', \"{ time: 'medium' }\", null, { date: 'false', open: '\"time\"' }]]\n */\n timeFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter to be used while the date input has focus. Useful for showing a simpler format for inputing.\n * For more information about formats visit the [Localization page](/localization)\n *\n * @example ['dateFormat', ['editFormat', \"{ date: 'short' }\", null, { defaultValue: 'new Date()', format: \"{ raw: 'MMM dd, yyyy' }\", time: 'false' }]]\n */\n editFormat: CustomPropTypes.dateFormat,\n\n /**\n * Enable the calendar component of the picker.\n */\n date: _propTypes.default.bool,\n\n /**\n * Enable the time list component of the picker.\n */\n time: _propTypes.default.bool,\n\n /** @ignore */\n calendar: (0, _deprecated.default)(_propTypes.default.bool, 'Use `date` instead'),\n\n /**\n * A customize the rendering of times but providing a custom component.\n */\n timeComponent: CustomPropTypes.elementType,\n\n /** Specify the element used to render the calendar dropdown icon. */\n dateIcon: _propTypes.default.node,\n\n /** Specify the element used to render the time list dropdown icon. */\n timeIcon: _propTypes.default.node,\n dropUp: _propTypes.default.bool,\n popupTransition: CustomPropTypes.elementType,\n placeholder: _propTypes.default.string,\n name: _propTypes.default.string,\n autoFocus: _propTypes.default.bool,\n\n /**\n * @example ['disabled', ['new Date()']]\n */\n disabled: CustomPropTypes.disabled,\n\n /**\n * @example ['readOnly', ['new Date()']]\n */\n readOnly: CustomPropTypes.disabled,\n\n /**\n * Determines how the widget parses the typed date string into a Date object. You can provide an array of formats to try,\n * or provide a function that returns a date to handle parsing yourself. When `parse` is unspecified and\n * the `format` prop is a `string` parse will automatically use that format as its default.\n */\n parse: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.string, _propTypes.default.func]),\n\n /** @ignore */\n tabIndex: _propTypes.default.any,\n\n /** @ignore */\n 'aria-labelledby': _propTypes.default.string,\n\n /** @ignore */\n 'aria-describedby': _propTypes.default.string,\n onKeyDown: _propTypes.default.func,\n onKeyPress: _propTypes.default.func,\n onBlur: _propTypes.default.func,\n onFocus: _propTypes.default.func,\n\n /** Adds a css class to the input container element. */\n containerClassName: _propTypes.default.string,\n inputProps: _propTypes.default.object,\n isRtl: _propTypes.default.bool,\n messages: _propTypes.default.shape({\n dateButton: _propTypes.default.string,\n timeButton: _propTypes.default.string\n })\n /**\n * ---\n * subtitle: DatePicker, TimePicker\n * localized: true\n * shortcuts:\n * - { key: alt + down arrow, label: open calendar or time }\n * - { key: alt + up arrow, label: close calendar or time }\n * - { key: down arrow, label: move focus to next item }\n * - { key: up arrow, label: move focus to previous item }\n * - { key: home, label: move focus to first item }\n * - { key: end, label: move focus to last item }\n * - { key: enter, label: select focused item }\n * - { key: any key, label: search list for item starting with key }\n * ---\n *\n * @public\n * @extends Calendar\n */\n\n});\n\nvar DateTimePicker = (0, _reactLifecyclesCompat.polyfill)(_class = (_class2 = (_temp = _class3 =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DateTimePicker, _React$Component);\n\n function DateTimePicker() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _initializerDefineProperty(_this, \"handleChange\", _descriptor, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleKeyDown\", _descriptor2, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleKeyPress\", _descriptor3, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleDateSelect\", _descriptor4, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleTimeSelect\", _descriptor5, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleCalendarClick\", _descriptor6, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleTimeClick\", _descriptor7, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _this.attachCalRef = function (ref) {\n return _this.calRef = ref;\n };\n\n _this.attachTimeRef = function (ref) {\n return _this.timeRef = ref;\n };\n\n _this.attachInputRef = function (ref) {\n return _this.inputRef = ref;\n };\n\n _this.parse = function (string) {\n var _this$props = _this.props,\n parse = _this$props.parse,\n culture = _this$props.culture,\n editFormat = _this$props.editFormat;\n var format = getFormat(_this.props, true);\n !(parse || format || editFormat) ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'React Widgets: there are no specified `parse` formats provided and the `format` prop is a function. ' + 'the DateTimePicker is unable to parse `%s` into a dateTime, ' + 'please provide either a parse function or localizer compatible `format` prop', string) : invariant(false) : void 0;\n var date;\n var formats = [format, editFormat];\n\n if (typeof parse == 'function') {\n date = parse(string, culture);\n if (date) return date;\n } else {\n // parse is a string format or array of string formats\n formats = formats.concat(parse).filter(Boolean);\n }\n\n for (var i = 0; i < formats.length; i++) {\n date = _localizers.date.parse(string, formats[i], culture);\n if (date) return date;\n }\n\n return null;\n };\n\n _this.inputId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_input');\n _this.dateId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_date');\n _this.listId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_listbox');\n _this.activeCalendarId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_calendar_active_cell');\n _this.activeOptionId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_listbox_active_option');\n _this.handleScroll = (0, _scrollManager.default)(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.focusManager = (0, _focusManager.default)(_assertThisInitialized(_assertThisInitialized(_this)), {\n didHandle: function didHandle(focused) {\n if (!focused) _this.close();\n }\n });\n _this.state = {\n focused: false,\n messages: (0, _messages.getMessages)(_this.props.messages)\n };\n return _this;\n }\n\n DateTimePicker.getDerivedStateFromProps = function getDerivedStateFromProps(_ref) {\n var messages = _ref.messages;\n return {\n messages: (0, _messages.getMessages)(messages)\n };\n };\n\n var _proto = DateTimePicker.prototype;\n\n _proto.renderInput = function renderInput(owns) {\n var _this$props2 = this.props,\n open = _this$props2.open,\n value = _this$props2.value,\n editFormat = _this$props2.editFormat,\n culture = _this$props2.culture,\n placeholder = _this$props2.placeholder,\n disabled = _this$props2.disabled,\n readOnly = _this$props2.readOnly,\n name = _this$props2.name,\n tabIndex = _this$props2.tabIndex,\n autoFocus = _this$props2.autoFocus,\n inputProps = _this$props2.inputProps,\n ariaLabelledby = _this$props2['aria-labelledby'],\n ariaDescribedby = _this$props2['aria-describedby'];\n var focused = this.state.focused;\n var inputReadOnly = inputProps ? inputProps.readOnly : null;\n var activeId = null;\n\n if (open === 'time') {\n activeId = this.activeOptionId;\n } else if (open === 'date') {\n activeId = this.activeCalendarId;\n }\n\n return _react.default.createElement(_DateTimePickerInput.default, _extends({}, inputProps, {\n id: this.inputId,\n ref: this.attachInputRef,\n role: \"combobox\",\n name: name,\n value: value,\n tabIndex: tabIndex,\n autoFocus: autoFocus,\n placeholder: placeholder,\n disabled: disabled,\n readOnly: inputReadOnly != null ? inputReadOnly : readOnly,\n format: getFormat(this.props),\n editFormat: editFormat,\n editing: focused,\n culture: culture,\n parse: this.parse,\n onChange: this.handleChange,\n \"aria-haspopup\": true,\n \"aria-activedescendant\": activeId,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-describedby\": ariaDescribedby,\n \"aria-expanded\": !!open,\n \"aria-owns\": owns\n }));\n };\n\n _proto.renderButtons = function renderButtons() {\n var _this$props3 = this.props,\n date = _this$props3.date,\n dateIcon = _this$props3.dateIcon,\n time = _this$props3.time,\n timeIcon = _this$props3.timeIcon,\n disabled = _this$props3.disabled,\n readOnly = _this$props3.readOnly;\n\n if (!date && !time) {\n return null;\n }\n\n var messages = this.state.messages;\n return _react.default.createElement(_Select.default, {\n bordered: true\n }, date && _react.default.createElement(_Button.default, {\n icon: dateIcon,\n label: messages.dateButton(),\n disabled: disabled || readOnly,\n onClick: this.handleCalendarClick\n }), time && _react.default.createElement(_Button.default, {\n icon: timeIcon,\n label: messages.timeButton(),\n disabled: disabled || readOnly,\n onClick: this.handleTimeClick\n }));\n };\n\n _proto.renderCalendar = function renderCalendar() {\n var _this2 = this;\n\n var activeCalendarId = this.activeCalendarId,\n inputId = this.inputId,\n dateId = this.dateId;\n var _this$props4 = this.props,\n open = _this$props4.open,\n value = _this$props4.value,\n popupTransition = _this$props4.popupTransition,\n dropUp = _this$props4.dropUp,\n onCurrentDateChange = _this$props4.onCurrentDateChange,\n currentDate = _this$props4.currentDate;\n var calendarProps = Props.pick(this.props, _Calendar.default.ControlledComponent); // manually include the last controlled default Props\n\n calendarProps.defaultView = this.props.defaultView;\n return _react.default.createElement(_Popup.default, {\n dropUp: dropUp,\n open: open === 'date',\n className: \"rw-calendar-popup\",\n transition: popupTransition\n }, _react.default.createElement(_Calendar.default, _extends({}, calendarProps, {\n id: dateId,\n activeId: activeCalendarId,\n tabIndex: \"-1\",\n value: value,\n autoFocus: false,\n onChange: this.handleDateSelect // #75: need to aggressively reclaim focus from the calendar otherwise\n // disabled header/footer buttons will drop focus completely from the widget\n ,\n onNavigate: function onNavigate() {\n return _this2.focus();\n },\n currentDate: currentDate,\n onCurrentDateChange: onCurrentDateChange,\n \"aria-hidden\": !open,\n \"aria-live\": \"polite\",\n \"aria-labelledby\": inputId,\n ref: this.attachCalRef\n })));\n };\n\n _proto.renderTimeList = function renderTimeList() {\n var _this3 = this;\n\n var activeOptionId = this.activeOptionId,\n inputId = this.inputId,\n listId = this.listId;\n var _this$props5 = this.props,\n open = _this$props5.open,\n value = _this$props5.value,\n min = _this$props5.min,\n max = _this$props5.max,\n step = _this$props5.step,\n currentDate = _this$props5.currentDate,\n dropUp = _this$props5.dropUp,\n date = _this$props5.date,\n culture = _this$props5.culture,\n timeFormat = _this$props5.timeFormat,\n timeComponent = _this$props5.timeComponent,\n timeListProps = _this$props5.timeListProps,\n popupTransition = _this$props5.popupTransition;\n return _react.default.createElement(_Popup.default, {\n dropUp: dropUp,\n transition: popupTransition,\n open: open === 'time',\n onEntering: function onEntering() {\n return _this3.timeRef.forceUpdate();\n }\n }, _react.default.createElement(\"div\", null, _react.default.createElement(_TimeList.default, {\n id: listId,\n min: min,\n max: max,\n step: step,\n listProps: timeListProps,\n currentDate: currentDate,\n activeId: activeOptionId,\n format: timeFormat,\n culture: culture,\n value: dateOrNull(value),\n onMove: this.handleScroll,\n onSelect: this.handleTimeSelect,\n preserveDate: !!date,\n itemComponent: timeComponent,\n \"aria-labelledby\": inputId,\n \"aria-live\": open && 'polite',\n \"aria-hidden\": !open,\n messages: this.state.messages,\n ref: this.attachTimeRef\n })));\n };\n\n _proto.render = function render() {\n var _this$props6 = this.props,\n className = _this$props6.className,\n date = _this$props6.date,\n time = _this$props6.time,\n open = _this$props6.open,\n disabled = _this$props6.disabled,\n readOnly = _this$props6.readOnly,\n dropUp = _this$props6.dropUp,\n containerClassName = _this$props6.containerClassName;\n var focused = this.state.focused;\n var elementProps = Props.pickElementProps(this, _Calendar.default.ControlledComponent);\n var shouldRenderList = (0, _widgetHelpers.isFirstFocusedRender)(this);\n var shouldRenderTimeList = !!(shouldRenderList && time);\n var shouldRenderCalendar = !!(shouldRenderList && date);\n var owns = '';\n if (shouldRenderCalendar && open === 'date') owns += this.dateId;\n if (shouldRenderTimeList && open === 'time') owns += ' ' + this.listId;\n return _react.default.createElement(_Widget.default, _extends({}, elementProps, {\n open: !!open,\n dropUp: dropUp,\n focused: focused,\n disabled: disabled,\n readOnly: readOnly,\n onKeyDown: this.handleKeyDown,\n onKeyPress: this.handleKeyPress,\n onBlur: this.focusManager.handleBlur,\n onFocus: this.focusManager.handleFocus,\n className: (0, _classnames.default)(className, 'rw-datetime-picker')\n }), _react.default.createElement(_WidgetPicker.default, {\n className: containerClassName\n }, this.renderInput(owns.trim()), this.renderButtons()), shouldRenderTimeList && this.renderTimeList(), shouldRenderCalendar && this.renderCalendar());\n };\n\n _proto.focus = function focus() {\n if (this.inputRef && (0, _activeElement.default)() !== (0, _reactDom.findDOMNode)(this.inputRef)) this.inputRef.focus();\n };\n\n _proto.toggle = function toggle(view) {\n var open = this.props.open;\n if (!open || open !== view) this.open(view);else this.close();\n };\n\n _proto.open = function open(view) {\n var _this$props7 = this.props,\n open = _this$props7.open,\n date = _this$props7.date,\n time = _this$props7.time,\n onToggle = _this$props7.onToggle;\n\n if (!view) {\n if (time) view = 'time';\n if (date) view = 'date';\n if (isBothOrNeither(date, time)) view = NEXT_VIEW[open] || 'date';\n }\n\n if (open !== view) (0, _widgetHelpers.notify)(onToggle, view);\n };\n\n _proto.close = function close() {\n if (this.props.open) (0, _widgetHelpers.notify)(this.props.onToggle, false);\n };\n\n _proto.inRangeValue = function inRangeValue(value) {\n if (value == null) return value;\n return _dates.default.max(_dates.default.min(value, this.props.max), this.props.min);\n };\n\n return DateTimePicker;\n}(_react.default.Component), _class3.displayName = 'DateTimePicker', _class3.propTypes = propTypes, _class3.defaultProps = _extends({}, _Calendar.default.ControlledComponent.defaultProps, {\n value: null,\n min: new Date(1900, 0, 1),\n max: new Date(2099, 11, 31),\n date: true,\n time: true,\n open: false,\n dateIcon: _Icon.calendar,\n timeIcon: _Icon.clock\n}), _temp), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"handleChange\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this4 = this;\n\n return function (date, str, constrain) {\n var _this4$props = _this4.props,\n onChange = _this4$props.onChange,\n value = _this4$props.value;\n if (constrain) date = _this4.inRangeValue(date);\n\n if (onChange) {\n if (date == null || value == null) {\n if (date != value //eslint-disable-line eqeqeq\n ) onChange(date, str);\n } else if (!_dates.default.eq(date, value)) {\n onChange(date, str);\n }\n }\n };\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"handleKeyDown\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this5 = this;\n\n return function (e) {\n var _this5$props = _this5.props,\n open = _this5$props.open,\n onKeyDown = _this5$props.onKeyDown;\n (0, _widgetHelpers.notify)(onKeyDown, [e]);\n if (e.defaultPrevented) return;\n if (e.key === 'Escape' && open) _this5.close();else if (e.altKey) {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n\n _this5.open();\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n\n _this5.close();\n }\n } else if (open) {\n if (open === 'date') _this5.calRef.inner.handleKeyDown(e);\n if (open === 'time') _this5.timeRef.handleKeyDown(e);\n }\n };\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"handleKeyPress\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this6 = this;\n\n return function (e) {\n (0, _widgetHelpers.notify)(_this6.props.onKeyPress, [e]);\n if (e.defaultPrevented) return;\n };\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"handleDateSelect\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this7 = this;\n\n return function (date) {\n var format = getFormat(_this7.props),\n dateTime = _dates.default.merge(date, _this7.props.value, _this7.props.currentDate),\n dateStr = formatDate(date, format, _this7.props.culture);\n\n _this7.close();\n\n (0, _widgetHelpers.notify)(_this7.props.onSelect, [dateTime, dateStr]);\n\n _this7.handleChange(dateTime, dateStr, true);\n\n _this7.focus();\n };\n }\n}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, \"handleTimeSelect\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this8 = this;\n\n return function (datum) {\n var format = getFormat(_this8.props),\n dateTime = _dates.default.merge(_this8.props.value, datum.date, _this8.props.currentDate),\n dateStr = formatDate(datum.date, format, _this8.props.culture);\n\n _this8.close();\n\n (0, _widgetHelpers.notify)(_this8.props.onSelect, [dateTime, dateStr]);\n\n _this8.handleChange(dateTime, dateStr, true);\n\n _this8.focus();\n };\n }\n}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, \"handleCalendarClick\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this9 = this;\n\n return function () {\n _this9.focus();\n\n _this9.toggle('date');\n };\n }\n}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, \"handleTimeClick\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this10 = this;\n\n return function () {\n _this10.focus();\n\n _this10.toggle('time');\n };\n }\n})), _class2)) || _class;\n\nvar _default = (0, _uncontrollable.default)(DateTimePicker, {\n open: 'onToggle',\n value: 'onChange',\n currentDate: 'onCurrentDateChange'\n}, ['focus']);\n\nexports.default = _default;\n\nfunction getFormat(props) {\n var isDate = props.date != null ? props.date : true;\n var isTime = props.time != null ? props.time : true;\n return props.format ? props.format : isDate && isTime || !isDate && !isTime ? _localizers.date.getFormat('default') : _localizers.date.getFormat(isDate ? 'date' : 'time');\n}\n\nfunction formatDate(date, format, culture) {\n var val = '';\n if (date instanceof Date && !isNaN(date.getTime())) val = _localizers.date.format(date, format, culture);\n return val;\n}\n\nfunction dateOrNull(dt) {\n if (dt && !isNaN(dt.getTime())) return dt;\n return null;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = require(\"react-dom\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _activeElement = _interopRequireDefault(require(\"dom-helpers/activeElement\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _reactComponentManagers = require(\"react-component-managers\");\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _uncontrollable = _interopRequireDefault(require(\"uncontrollable\"));\n\nvar _Widget = _interopRequireDefault(require(\"./Widget\"));\n\nvar _WidgetPicker = _interopRequireDefault(require(\"./WidgetPicker\"));\n\nvar _Select = _interopRequireDefault(require(\"./Select\"));\n\nvar _Popup = _interopRequireDefault(require(\"./Popup\"));\n\nvar _List = _interopRequireDefault(require(\"./List\"));\n\nvar _AddToListOption = _interopRequireDefault(require(\"./AddToListOption\"));\n\nvar _DropdownListInput = _interopRequireDefault(require(\"./DropdownListInput\"));\n\nvar _messages = require(\"./messages\");\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar Filter = _interopRequireWildcard(require(\"./util/Filter\"));\n\nvar _focusManager = _interopRequireDefault(require(\"./util/focusManager\"));\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar _reduceToListState = _interopRequireDefault(require(\"./util/reduceToListState\"));\n\nvar _getAccessors = _interopRequireDefault(require(\"./util/getAccessors\"));\n\nvar _scrollManager = _interopRequireDefault(require(\"./util/scrollManager\"));\n\nvar _interaction = require(\"./util/interaction\");\n\nvar _widgetHelpers = require(\"./util/widgetHelpers\");\n\nvar _dataHelpers = require(\"./util/dataHelpers\");\n\nvar _Icon = require(\"./Icon\");\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _class3, _temp;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object['ke' + 'ys'](descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object['define' + 'Property'](target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.'); }\n\nvar CREATE_OPTION = {};\n/**\n * ---\n * shortcuts:\n * - { key: alt + down arrow, label: open dropdown }\n * - { key: alt + up arrow, label: close dropdown }\n * - { key: down arrow, label: move focus to next item }\n * - { key: up arrow, label: move focus to previous item }\n * - { key: home, label: move focus to first item }\n * - { key: end, label: move focus to last item }\n * - { key: enter, label: select focused item }\n * - { key: ctrl + enter, label: create new option from current searchTerm }\n * - { key: any key, label: search list for item starting with key }\n * ---\n *\n * A `<select>` replacement for single value lists.\n * @public\n */\n\nvar DropdownList = (0, _reactLifecyclesCompat.polyfill)(_class = (_class2 = (_temp = _class3 =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DropdownList, _React$Component);\n\n function DropdownList() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handleFocusChanged = function (focused) {\n if (!focused) _this.close();\n };\n\n _initializerDefineProperty(_this, \"handleSelect\", _descriptor, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleCreate\", _descriptor2, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleClick\", _descriptor3, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleKeyDown\", _descriptor4, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleKeyPress\", _descriptor5, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _this.handleInputChange = function (e) {\n _this.search(e.target.value, e, 'input');\n };\n\n _this.handleAutofillChange = function (e) {\n var data = _this.props.data;\n var filledValue = e.target.value.toLowerCase();\n if (filledValue === '') return void _this.change(null);\n\n for (var _iterator = data, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var item = _ref;\n var value = (0, _dataHelpers.dataValue)(item);\n\n if (String(value).toLowerCase() === filledValue || (0, _dataHelpers.dataText)(item).toLowerCase() === filledValue) {\n _this.change(item, e);\n\n break;\n }\n }\n };\n\n _this.handleAutofill = function (autofilling) {\n _this.setState({\n autofilling: autofilling\n });\n };\n\n _this.attachInputRef = function (ref) {\n return _this.inputRef = ref;\n };\n\n _this.attachFilterRef = function (ref) {\n return _this.filterRef = ref;\n };\n\n _this.attachListRef = function (ref) {\n return _this.listRef = ref;\n };\n\n _this.focus = function (target) {\n var _this$props = _this.props,\n filter = _this$props.filter,\n open = _this$props.open;\n var inst = target || (filter && open ? _this.filterRef : _this.inputRef);\n inst = (0, _reactDom.findDOMNode)(inst);\n if (inst && (0, _activeElement.default)() !== inst) inst.focus();\n };\n\n (0, _reactComponentManagers.autoFocus)(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.inputId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_input');\n _this.listId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_listbox');\n _this.activeId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_listbox_active_option');\n _this.mounted = (0, _reactComponentManagers.mountManager)(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.timeouts = (0, _reactComponentManagers.timeoutManager)(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleScroll = (0, _scrollManager.default)(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.focusManager = (0, _focusManager.default)(_assertThisInitialized(_assertThisInitialized(_this)), {\n didHandle: _this.handleFocusChanged\n });\n _this.state = {};\n return _this;\n }\n\n DropdownList.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var open = nextProps.open,\n value = nextProps.value,\n data = nextProps.data,\n messages = nextProps.messages,\n searchTerm = nextProps.searchTerm,\n filter = nextProps.filter,\n minLength = nextProps.minLength,\n caseSensitive = nextProps.caseSensitive;\n var focusedItem = prevState.focusedItem;\n var accessors = (0, _getAccessors.default)(nextProps);\n var valueChanged = value !== prevState.lastValue;\n var initialIdx = valueChanged && accessors.indexOf(data, value);\n if (open) data = Filter.filter(data, {\n filter: filter,\n searchTerm: searchTerm,\n minLength: minLength,\n caseSensitive: caseSensitive,\n textField: accessors.text\n });\n var list = (0, _reduceToListState.default)(data, prevState.list, {\n nextProps: nextProps\n });\n var selectedItem = data[initialIdx];\n var nextFocusedItem = ~data.indexOf(focusedItem) ? focusedItem : data[0];\n return {\n data: data,\n list: list,\n accessors: accessors,\n lastValue: value,\n messages: (0, _messages.getMessages)(messages),\n selectedItem: valueChanged ? list.nextEnabled(selectedItem) : prevState.selectedItem,\n focusedItem: valueChanged || focusedItem === undefined ? list.nextEnabled(selectedItem !== undefined ? selectedItem : nextFocusedItem) : nextFocusedItem\n };\n };\n\n var _proto = DropdownList.prototype;\n\n _proto.change = function change(nextValue, originalEvent) {\n var _this$props2 = this.props,\n onChange = _this$props2.onChange,\n searchTerm = _this$props2.searchTerm,\n lastValue = _this$props2.value;\n\n if (!this.state.accessors.matches(nextValue, lastValue)) {\n (0, _widgetHelpers.notify)(onChange, [nextValue, {\n originalEvent: originalEvent,\n lastValue: lastValue,\n searchTerm: searchTerm\n }]);\n this.clearSearch(originalEvent);\n this.close();\n }\n };\n\n _proto.renderList = function renderList() {\n var _this$props3 = this.props,\n open = _this$props3.open,\n filter = _this$props3.filter,\n data = _this$props3.data,\n searchTerm = _this$props3.searchTerm,\n searchIcon = _this$props3.searchIcon,\n optionComponent = _this$props3.optionComponent,\n itemComponent = _this$props3.itemComponent,\n groupComponent = _this$props3.groupComponent,\n listProps = _this$props3.listProps;\n var _this$state = this.state,\n list = _this$state.list,\n accessors = _this$state.accessors,\n focusedItem = _this$state.focusedItem,\n selectedItem = _this$state.selectedItem,\n messages = _this$state.messages,\n filteredData = _this$state.data;\n var List = this.props.listComponent;\n return _react.default.createElement(\"div\", null, filter && _react.default.createElement(_WidgetPicker.default, {\n className: \"rw-filter-input rw-input\"\n }, _react.default.createElement(\"input\", {\n value: searchTerm,\n className: \"rw-input-reset\",\n onChange: this.handleInputChange,\n placeholder: messages.filterPlaceholder(this.props),\n ref: this.attachFilterRef\n }), _react.default.createElement(_Select.default, {\n icon: searchIcon,\n role: \"presentation\",\n \"aria-hidden\": \"true\"\n })), _react.default.createElement(List, _extends({}, listProps, {\n id: this.listId,\n activeId: this.activeId,\n data: filteredData,\n dataState: list.dataState,\n isDisabled: list.isDisabled,\n searchTerm: searchTerm,\n textAccessor: accessors.text,\n valueAccessor: accessors.value,\n itemComponent: itemComponent,\n groupComponent: groupComponent,\n optionComponent: optionComponent,\n selectedItem: selectedItem,\n focusedItem: open ? focusedItem : null,\n onSelect: this.handleSelect,\n onMove: this.handleScroll,\n \"aria-live\": open && 'polite',\n \"aria-labelledby\": this.inputId,\n \"aria-hidden\": !this.props.open,\n ref: this.attachListRef,\n messages: {\n emptyList: data.length ? messages.emptyFilter : messages.emptyList\n }\n })), this.allowCreate() && _react.default.createElement(_AddToListOption.default, {\n id: this.createId,\n searchTerm: searchTerm,\n onSelect: this.handleCreate,\n focused: !focusedItem || focusedItem === CREATE_OPTION\n }, messages.createOption(this.props)));\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n className = _this$props4.className,\n tabIndex = _this$props4.tabIndex,\n popupTransition = _this$props4.popupTransition,\n textField = _this$props4.textField,\n data = _this$props4.data,\n busy = _this$props4.busy,\n dropUp = _this$props4.dropUp,\n placeholder = _this$props4.placeholder,\n value = _this$props4.value,\n open = _this$props4.open,\n isRtl = _this$props4.isRtl,\n filter = _this$props4.filter,\n inputProps = _this$props4.inputProps,\n selectIcon = _this$props4.selectIcon,\n busySpinner = _this$props4.busySpinner,\n containerClassName = _this$props4.containerClassName,\n valueComponent = _this$props4.valueComponent;\n var _this$state2 = this.state,\n focused = _this$state2.focused,\n accessors = _this$state2.accessors,\n messages = _this$state2.messages,\n autofilling = _this$state2.autofilling;\n var disabled = this.props.disabled === true;\n var readOnly = this.props.readOnly === true;\n var valueItem = accessors.findOrSelf(data, value);\n var shouldRenderPopup = (0, _widgetHelpers.isFirstFocusedRender)(this);\n\n var elementProps = _extends(Props.pickElementProps(this), {\n name: undefined,\n role: 'combobox',\n id: this.inputId,\n tabIndex: open && filter ? -1 : tabIndex || 0,\n 'aria-owns': this.listId,\n 'aria-activedescendant': open ? this.activeId : null,\n 'aria-expanded': !!open,\n 'aria-haspopup': true,\n 'aria-busy': !!busy,\n 'aria-live': !open && 'polite',\n 'aria-autocomplete': 'list',\n 'aria-disabled': disabled,\n 'aria-readonly': readOnly\n });\n\n return _react.default.createElement(_Widget.default, _extends({}, elementProps, {\n open: open,\n isRtl: isRtl,\n dropUp: dropUp,\n focused: focused,\n disabled: disabled,\n readOnly: readOnly,\n autofilling: autofilling,\n onBlur: this.focusManager.handleBlur,\n onFocus: this.focusManager.handleFocus,\n onKeyDown: this.handleKeyDown,\n onKeyPress: this.handleKeyPress,\n className: (0, _classnames.default)(className, 'rw-dropdown-list'),\n ref: this.attachInputRef\n }), _react.default.createElement(_WidgetPicker.default, {\n onClick: this.handleClick,\n className: (0, _classnames.default)(containerClassName, 'rw-widget-input')\n }, _react.default.createElement(_DropdownListInput.default, _extends({}, inputProps, {\n value: valueItem,\n textField: textField,\n name: this.props.name,\n autoComplete: this.props.autoComplete,\n onAutofill: this.handleAutofill,\n onAutofillChange: this.handleAutofillChange,\n placeholder: placeholder,\n valueComponent: valueComponent\n })), _react.default.createElement(_Select.default, {\n busy: busy,\n icon: selectIcon,\n spinner: busySpinner,\n role: \"presentational\",\n \"aria-hidden\": \"true\",\n disabled: disabled || readOnly,\n label: messages.openDropdown(this.props)\n })), shouldRenderPopup && _react.default.createElement(_Popup.default, {\n open: open,\n dropUp: dropUp,\n transition: popupTransition,\n onEntered: function onEntered() {\n return _this2.focus();\n },\n onEntering: function onEntering() {\n return _this2.listRef.forceUpdate();\n }\n }, this.renderList(messages)));\n };\n\n _proto.findOption = function findOption(character, cb) {\n var _this3 = this;\n\n var word = ((this._currentWord || '') + character).toLowerCase();\n if (!character) return;\n this._currentWord = word;\n this.timeouts.set('search', function () {\n var list = _this3.state.list;\n var key = _this3.props.open ? 'focusedItem' : 'selectedItem';\n var item = list.next(_this3.state[key], word);\n\n if (item === _this3.state[key]) {\n item = list.next(null, word);\n }\n\n _this3._currentWord = '';\n if (item) cb(item);\n }, this.props.delay);\n };\n\n _proto.clearSearch = function clearSearch(originalEvent) {\n this.search('', originalEvent, 'clear');\n };\n\n _proto.search = function search(searchTerm, originalEvent, action) {\n if (action === void 0) {\n action = 'input';\n }\n\n var _this$props5 = this.props,\n onSearch = _this$props5.onSearch,\n lastSearchTerm = _this$props5.searchTerm;\n if (searchTerm !== lastSearchTerm) (0, _widgetHelpers.notify)(onSearch, [searchTerm, {\n action: action,\n lastSearchTerm: lastSearchTerm,\n originalEvent: originalEvent\n }]);\n };\n\n _proto.open = function open() {\n if (!this.props.open) (0, _widgetHelpers.notify)(this.props.onToggle, true);\n };\n\n _proto.close = function close() {\n if (this.props.open) (0, _widgetHelpers.notify)(this.props.onToggle, false);\n };\n\n _proto.toggle = function toggle() {\n this.props.open ? this.close() : this.open();\n };\n\n _proto.allowCreate = function allowCreate() {\n var _this$props6 = this.props,\n searchTerm = _this$props6.searchTerm,\n onCreate = _this$props6.onCreate,\n allowCreate = _this$props6.allowCreate;\n return !!(onCreate && (allowCreate === true || allowCreate === 'onFilter' && searchTerm) && !this.hasExtactMatch());\n };\n\n _proto.hasExtactMatch = function hasExtactMatch() {\n var _this$props7 = this.props,\n searchTerm = _this$props7.searchTerm,\n caseSensitive = _this$props7.caseSensitive,\n filter = _this$props7.filter;\n var _this$state3 = this.state,\n data = _this$state3.data,\n accessors = _this$state3.accessors;\n\n var lower = function lower(text) {\n return caseSensitive ? text : text.toLowerCase();\n }; // if there is an exact match on textFields:\n\n\n return filter && data.some(function (v) {\n return lower(accessors.text(v)) === lower(searchTerm);\n });\n };\n\n return DropdownList;\n}(_react.default.Component), _class3.propTypes = _extends({}, Filter.propTypes, {\n value: _propTypes.default.any,\n\n /**\n * @type {function (\n * dataItems: ?any,\n * metadata: {\n * lastValue: ?any,\n * searchTerm: ?string\n * originalEvent: SyntheticEvent,\n * }\n * ): void}\n */\n onChange: _propTypes.default.func,\n open: _propTypes.default.bool,\n onToggle: _propTypes.default.func,\n data: _propTypes.default.array,\n valueField: CustomPropTypes.accessor,\n textField: CustomPropTypes.accessor,\n allowCreate: _propTypes.default.oneOf([true, false, 'onFilter']),\n\n /**\n * A React component for customizing the rendering of the DropdownList\n * value\n */\n valueComponent: CustomPropTypes.elementType,\n itemComponent: CustomPropTypes.elementType,\n listComponent: CustomPropTypes.elementType,\n optionComponent: CustomPropTypes.elementType,\n groupComponent: CustomPropTypes.elementType,\n groupBy: CustomPropTypes.accessor,\n\n /**\n *\n * @type {(dataItem: ?any, metadata: { originalEvent: SyntheticEvent }) => void}\n */\n onSelect: _propTypes.default.func,\n onCreate: _propTypes.default.func,\n\n /**\n * @type function(searchTerm: string, metadata: { action, lastSearchTerm, originalEvent? })\n */\n onSearch: _propTypes.default.func,\n searchTerm: _propTypes.default.string,\n busy: _propTypes.default.bool,\n\n /** Specify the element used to render the select (down arrow) icon. */\n selectIcon: _propTypes.default.node,\n searchIcon: _propTypes.default.node,\n\n /** Specify the element used to render the busy indicator */\n busySpinner: _propTypes.default.node,\n placeholder: _propTypes.default.string,\n dropUp: _propTypes.default.bool,\n popupTransition: CustomPropTypes.elementType,\n disabled: CustomPropTypes.disabled.acceptsArray,\n readOnly: CustomPropTypes.disabled,\n\n /** Adds a css class to the input container element. */\n containerClassName: _propTypes.default.string,\n inputProps: _propTypes.default.object,\n listProps: _propTypes.default.object,\n isRtl: _propTypes.default.bool,\n messages: _propTypes.default.shape({\n open: _propTypes.default.string,\n emptyList: CustomPropTypes.message,\n emptyFilter: CustomPropTypes.message,\n filterPlaceholder: _propTypes.default.string,\n createOption: CustomPropTypes.message\n })\n}), _class3.defaultProps = {\n data: [],\n delay: 500,\n searchTerm: '',\n allowCreate: false,\n searchIcon: _Icon.search,\n selectIcon: _Icon.caretDown,\n listComponent: _List.default\n}, _temp), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"handleSelect\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this4 = this;\n\n return function (dataItem, originalEvent) {\n if (dataItem === undefined || dataItem === CREATE_OPTION) {\n _this4.handleCreate(_this4.props.searchTerm);\n\n return;\n }\n\n (0, _widgetHelpers.notify)(_this4.props.onSelect, [dataItem, {\n originalEvent: originalEvent\n }]);\n\n _this4.change(dataItem, originalEvent);\n\n _this4.close();\n\n _this4.focus(_this4);\n };\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"handleCreate\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this5 = this;\n\n return function (searchTerm, event) {\n if (searchTerm === void 0) {\n searchTerm = '';\n }\n\n (0, _widgetHelpers.notify)(_this5.props.onCreate, searchTerm);\n\n _this5.clearSearch(event);\n\n _this5.close();\n\n _this5.focus(_this5);\n };\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"handleClick\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this6 = this;\n\n return function (e) {\n _this6.focus();\n\n _this6.toggle();\n\n (0, _widgetHelpers.notify)(_this6.props.onClick, e);\n };\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"handleKeyDown\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this7 = this;\n\n return function (e) {\n var key = e.key,\n altKey = e.altKey,\n ctrlKey = e.ctrlKey;\n var _this7$props = _this7.props,\n open = _this7$props.open,\n onKeyDown = _this7$props.onKeyDown,\n filter = _this7$props.filter,\n searchTerm = _this7$props.searchTerm;\n var _this7$state = _this7.state,\n focusedItem = _this7$state.focusedItem,\n selectedItem = _this7$state.selectedItem,\n list = _this7$state.list;\n var createIsFocused = focusedItem === CREATE_OPTION;\n\n var canCreate = _this7.allowCreate();\n\n (0, _widgetHelpers.notify)(onKeyDown, [e]);\n\n var closeWithFocus = function closeWithFocus() {\n _this7.close();\n\n (0, _reactDom.findDOMNode)(_this7).focus();\n };\n\n var change = function change(item) {\n return item != null && _this7.change(item, e);\n };\n\n var focusItem = function focusItem(item) {\n return _this7.setState({\n focusedItem: item\n });\n };\n\n if (e.defaultPrevented) return;\n\n if (key === 'End') {\n e.preventDefault();\n if (open) focusItem(list.last());else change(list.last());\n } else if (key === 'Home') {\n e.preventDefault();\n if (open) focusItem(list.first());else change(list.first());\n } else if (key === 'Escape' && open) {\n e.preventDefault();\n closeWithFocus();\n } else if (key === 'Enter' && open && ctrlKey && canCreate) {\n e.preventDefault();\n\n _this7.handleCreate(searchTerm, e);\n } else if ((key === 'Enter' || key === ' ' && !filter) && open) {\n e.preventDefault();\n\n _this7.handleSelect(focusedItem, e);\n } else if (key === ' ' && !open) {\n e.preventDefault();\n\n _this7.open();\n } else if (key === 'ArrowDown') {\n e.preventDefault();\n if (altKey) return _this7.open();\n if (!open) change(list.next(selectedItem));\n var next = list.next(focusedItem);\n var creating = createIsFocused || canCreate && focusedItem === next;\n focusItem(creating ? CREATE_OPTION : next);\n } else if (key === 'ArrowUp') {\n e.preventDefault();\n if (altKey) return closeWithFocus();\n if (!open) return change(list.prev(selectedItem));\n focusItem(createIsFocused ? list.last() : list.prev(focusedItem));\n }\n };\n }\n}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, \"handleKeyPress\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this8 = this;\n\n return function (e) {\n (0, _widgetHelpers.notify)(_this8.props.onKeyPress, [e]);\n if (e.defaultPrevented) return;\n if (!(_this8.props.filter && _this8.props.open)) _this8.findOption(String.fromCharCode(e.which), function (item) {\n _this8.mounted() && _this8.props.open ? _this8.setState({\n focusedItem: item\n }) : item && _this8.change(item, e);\n });\n };\n }\n})), _class2)) || _class;\n\nvar _default = (0, _uncontrollable.default)(DropdownList, {\n open: 'onToggle',\n value: 'onChange',\n searchTerm: 'onSearch'\n}, ['focus']);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = momentLocalizer;\n\nvar _moment = _interopRequireDefault(require(\"moment\"));\n\nvar _configure = _interopRequireDefault(require(\"react-widgets/lib/configure\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nif (typeof _moment.default !== 'function') throw new TypeError('You must provide a valid moment object');\nvar localField = typeof (0, _moment.default)().locale === 'function' ? 'locale' : 'lang',\n hasLocaleData = !!_moment.default.localeData;\nif (!hasLocaleData) throw new TypeError('The Moment localizer depends on the `localeData` api, please provide a moment object v2.2.0 or higher');\n\nfunction getMoment(culture, value, format) {\n return culture ? (0, _moment.default)(value, format, true)[localField](culture) : (0, _moment.default)(value, format, true);\n}\n\nfunction endOfDecade(date) {\n return (0, _moment.default)(date).add(10, 'year').add(-1, 'millisecond').toDate();\n}\n\nfunction endOfCentury(date) {\n return (0, _moment.default)(date).add(100, 'year').add(-1, 'millisecond').toDate();\n}\n\nfunction momentLocalizer() {\n var localizer = {\n formats: {\n date: 'L',\n time: 'LT',\n default: 'lll',\n header: 'MMMM YYYY',\n footer: 'LL',\n weekday: 'dd',\n dayOfMonth: 'DD',\n month: 'MMM',\n year: 'YYYY',\n decade: function decade(date, culture, localizer) {\n return localizer.format(date, 'YYYY', culture) + ' - ' + localizer.format(endOfDecade(date), 'YYYY', culture);\n },\n century: function century(date, culture, localizer) {\n return localizer.format(date, 'YYYY', culture) + ' - ' + localizer.format(endOfCentury(date), 'YYYY', culture);\n }\n },\n firstOfWeek: function firstOfWeek(culture) {\n return _moment.default.localeData(culture).firstDayOfWeek();\n },\n parse: function parse(value, format, culture) {\n if (!value) return null;\n var m = getMoment(culture, value, format);\n if (m.isValid()) return m.toDate();\n return null;\n },\n format: function format(value, _format, culture) {\n return getMoment(culture, value).format(_format);\n }\n };\n\n _configure.default.setDateLocalizer(localizer);\n}\n\nmodule.exports = exports[\"default\"];\n","module.exports = require('./components/Modal');\n\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _brace = require('brace');\n\nvar _brace2 = _interopRequireDefault(_brace);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _lodash = require('lodash.isequal');\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _ace$acequire = _brace2.default.acequire('ace/range'),\n Range = _ace$acequire.Range;\n\nvar editorOptions = ['minLines', 'maxLines', 'readOnly', 'highlightActiveLine', 'tabSize', 'enableBasicAutocompletion', 'enableLiveAutocompletion', 'enableSnippets'];\n\nvar ReactAce = function (_PureComponent) {\n _inherits(ReactAce, _PureComponent);\n\n function ReactAce(props) {\n _classCallCheck(this, ReactAce);\n\n var _this = _possibleConstructorReturn(this, (ReactAce.__proto__ || Object.getPrototypeOf(ReactAce)).call(this, props));\n\n ['onChange', 'onFocus', 'onBlur', 'onCopy', 'onPaste', 'onScroll', 'handleOptions'].forEach(function (method) {\n _this[method] = _this[method].bind(_this);\n });\n return _this;\n }\n\n _createClass(ReactAce, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n var _props = this.props,\n name = _props.name,\n className = _props.className,\n onBeforeLoad = _props.onBeforeLoad,\n mode = _props.mode,\n focus = _props.focus,\n theme = _props.theme,\n fontSize = _props.fontSize,\n value = _props.value,\n defaultValue = _props.defaultValue,\n cursorStart = _props.cursorStart,\n showGutter = _props.showGutter,\n wrapEnabled = _props.wrapEnabled,\n showPrintMargin = _props.showPrintMargin,\n _props$scrollMargin = _props.scrollMargin,\n scrollMargin = _props$scrollMargin === undefined ? [0, 0, 0, 0] : _props$scrollMargin,\n keyboardHandler = _props.keyboardHandler,\n onLoad = _props.onLoad,\n commands = _props.commands,\n annotations = _props.annotations,\n markers = _props.markers;\n\n\n this.editor = _brace2.default.edit(this.refs.editor);\n\n if (onBeforeLoad) {\n onBeforeLoad(_brace2.default);\n }\n\n var editorProps = Object.keys(this.props.editorProps);\n for (var i = 0; i < editorProps.length; i++) {\n this.editor[editorProps[i]] = this.props.editorProps[editorProps[i]];\n }\n\n this.editor.renderer.setScrollMargin(scrollMargin[0], scrollMargin[1], scrollMargin[2], scrollMargin[3]);\n this.editor.getSession().setMode('ace/mode/' + mode);\n this.editor.setTheme('ace/theme/' + theme);\n this.editor.setFontSize(fontSize);\n this.editor.setValue(defaultValue === undefined ? value : defaultValue, cursorStart);\n this.editor.renderer.setShowGutter(showGutter);\n this.editor.getSession().setUseWrapMode(wrapEnabled);\n this.editor.setShowPrintMargin(showPrintMargin);\n this.editor.on('focus', this.onFocus);\n this.editor.on('blur', this.onBlur);\n this.editor.on('copy', this.onCopy);\n this.editor.on('paste', this.onPaste);\n this.editor.on('change', this.onChange);\n this.editor.session.on('changeScrollTop', this.onScroll);\n this.handleOptions(this.props);\n this.editor.getSession().setAnnotations(annotations || []);\n this.handleMarkers(markers || []);\n\n // get a list of possible options to avoid 'misspelled option errors'\n var availableOptions = this.editor.$options;\n for (var _i = 0; _i < editorOptions.length; _i++) {\n var option = editorOptions[_i];\n if (availableOptions.hasOwnProperty(option)) {\n this.editor.setOption(option, this.props[option]);\n }\n }\n\n if (Array.isArray(commands)) {\n commands.forEach(function (command) {\n _this2.editor.commands.addCommand(command);\n });\n }\n\n if (keyboardHandler) {\n this.editor.setKeyboardHandler('ace/keyboard/' + keyboardHandler);\n }\n\n if (className) {\n this.refs.editor.className += ' ' + className;\n }\n\n if (focus) {\n this.editor.focus();\n }\n\n if (onLoad) {\n onLoad(this.editor);\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var oldProps = this.props;\n\n for (var i = 0; i < editorOptions.length; i++) {\n var option = editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n this.editor.setOption(option, nextProps[option]);\n }\n }\n\n if (nextProps.className !== oldProps.className) {\n var appliedClasses = this.refs.editor.className;\n var appliedClassesArray = appliedClasses.trim().split(' ');\n var oldClassesArray = oldProps.className.trim().split(' ');\n oldClassesArray.forEach(function (oldClass) {\n var index = appliedClassesArray.indexOf(oldClass);\n appliedClassesArray.splice(index, 1);\n });\n this.refs.editor.className = ' ' + nextProps.className + ' ' + appliedClassesArray.join(' ');\n }\n\n if (nextProps.mode !== oldProps.mode) {\n this.editor.getSession().setMode('ace/mode/' + nextProps.mode);\n }\n if (nextProps.theme !== oldProps.theme) {\n this.editor.setTheme('ace/theme/' + nextProps.theme);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n this.editor.setKeyboardHandler('ace/keyboard/' + nextProps.keyboardHandler);\n } else {\n this.editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n this.editor.setFontSize(nextProps.fontSize);\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n this.editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n this.editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n this.editor.renderer.setShowGutter(nextProps.showGutter);\n }\n if (!(0, _lodash2.default)(nextProps.setOptions, oldProps.setOptions)) {\n this.handleOptions(nextProps);\n }\n if (!(0, _lodash2.default)(nextProps.annotations, oldProps.annotations)) {\n this.editor.getSession().setAnnotations(nextProps.annotations || []);\n }\n if (!(0, _lodash2.default)(nextProps.markers, oldProps.markers)) {\n this.handleMarkers(nextProps.markers || []);\n }\n if (!(0, _lodash2.default)(nextProps.scrollMargins, oldProps.scrollMargins)) {\n this.handleScrollMargins(nextProps.scrollMargins);\n }\n if (this.editor && this.editor.getValue() !== nextProps.value) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n this.silent = true;\n var pos = this.editor.session.selection.toJSON();\n this.editor.setValue(nextProps.value, nextProps.cursorStart);\n this.editor.session.selection.fromJSON(pos);\n this.silent = false;\n }\n\n if (nextProps.focus && !oldProps.focus) {\n this.editor.focus();\n }\n if (nextProps.height !== this.props.height) {\n this.editor.resize();\n }\n }\n }, {\n key: 'handleScrollMargins',\n value: function handleScrollMargins() {\n var margins = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0, 0, 0];\n\n this.editor.renderer.setScrollMargins(margins[0], margins[1], margins[2], margins[3]);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.editor.destroy();\n this.editor = null;\n }\n }, {\n key: 'onChange',\n value: function onChange() {\n if (this.props.onChange && !this.silent) {\n var value = this.editor.getValue();\n this.props.onChange(value);\n }\n }\n }, {\n key: 'onFocus',\n value: function onFocus() {\n if (this.props.onFocus) {\n this.props.onFocus();\n }\n }\n }, {\n key: 'onBlur',\n value: function onBlur() {\n if (this.props.onBlur) {\n this.props.onBlur();\n }\n }\n }, {\n key: 'onCopy',\n value: function onCopy(text) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n }\n }, {\n key: 'onPaste',\n value: function onPaste(text) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n }\n }, {\n key: 'onScroll',\n value: function onScroll() {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n }\n }, {\n key: 'handleOptions',\n value: function handleOptions(props) {\n var setOptions = Object.keys(props.setOptions);\n for (var y = 0; y < setOptions.length; y++) {\n this.editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n }\n }, {\n key: 'handleMarkers',\n value: function handleMarkers(markers) {\n var _this3 = this;\n\n // remove foreground markers\n var currentMarkers = this.editor.getSession().getMarkers(true);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers\n currentMarkers = this.editor.getSession().getMarkers(false);\n for (var _i2 in currentMarkers) {\n if (currentMarkers.hasOwnProperty(_i2)) {\n this.editor.getSession().removeMarker(currentMarkers[_i2].id);\n }\n }\n // add new markers\n markers.forEach(function (_ref) {\n var startRow = _ref.startRow,\n startCol = _ref.startCol,\n endRow = _ref.endRow,\n endCol = _ref.endCol,\n className = _ref.className,\n type = _ref.type,\n _ref$inFront = _ref.inFront,\n inFront = _ref$inFront === undefined ? false : _ref$inFront;\n\n var range = new Range(startRow, startCol, endRow, endCol);\n _this3.editor.getSession().addMarker(range, className, type, inFront);\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n name = _props2.name,\n width = _props2.width,\n height = _props2.height,\n style = _props2.style;\n\n var divStyle = _extends({ width: width, height: height }, style);\n return _react2.default.createElement('div', { ref: 'editor',\n id: name,\n style: divStyle\n });\n }\n }]);\n\n return ReactAce;\n}(_react.PureComponent);\n\nexports.default = ReactAce;\n\n\nReactAce.propTypes = {\n mode: _react.PropTypes.string,\n focus: _react.PropTypes.bool,\n theme: _react.PropTypes.string,\n name: _react.PropTypes.string,\n className: _react.PropTypes.string,\n height: _react.PropTypes.string,\n width: _react.PropTypes.string,\n fontSize: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),\n showGutter: _react.PropTypes.bool,\n onChange: _react.PropTypes.func,\n onCopy: _react.PropTypes.func,\n onPaste: _react.PropTypes.func,\n onFocus: _react.PropTypes.func,\n onBlur: _react.PropTypes.func,\n onScroll: _react.PropTypes.func,\n value: _react.PropTypes.string,\n defaultValue: _react.PropTypes.string,\n onLoad: _react.PropTypes.func,\n onBeforeLoad: _react.PropTypes.func,\n minLines: _react.PropTypes.number,\n maxLines: _react.PropTypes.number,\n readOnly: _react.PropTypes.bool,\n highlightActiveLine: _react.PropTypes.bool,\n tabSize: _react.PropTypes.number,\n showPrintMargin: _react.PropTypes.bool,\n cursorStart: _react.PropTypes.number,\n editorProps: _react.PropTypes.object,\n setOptions: _react.PropTypes.object,\n annotations: _react.PropTypes.array,\n markers: _react.PropTypes.array,\n keyboardHandler: _react.PropTypes.string,\n wrapEnabled: _react.PropTypes.bool,\n enableBasicAutocompletion: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.array]),\n enableLiveAutocompletion: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.array]),\n commands: _react.PropTypes.array\n};\n\nReactAce.defaultProps = {\n name: 'brace-editor',\n focus: false,\n mode: '',\n theme: '',\n height: '500px',\n width: '500px',\n value: '',\n fontSize: 12,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false\n};","/*global require,module*/\n\"use strict\";\nvar CodeMirror = require(\"codemirror\");\nrequire(\"codemirror/addon/edit/continuelist.js\");\nrequire(\"./codemirror/tablist\");\nrequire(\"codemirror/addon/display/fullscreen.js\");\nrequire(\"codemirror/mode/markdown/markdown.js\");\nrequire(\"codemirror/addon/mode/overlay.js\");\nrequire(\"codemirror/addon/display/placeholder.js\");\nrequire(\"codemirror/addon/selection/mark-selection.js\");\nrequire(\"codemirror/mode/gfm/gfm.js\");\nrequire(\"codemirror/mode/xml/xml.js\");\nvar CodeMirrorSpellChecker = require(\"codemirror-spell-checker\");\nvar marked = require(\"marked\");\n\n\n// Some variables\nvar isMac = /Mac/.test(navigator.platform);\n\n// Mapping of actions that can be bound to keyboard shortcuts or toolbar buttons\nvar bindings = {\n\t\"toggleBold\": toggleBold,\n\t\"toggleItalic\": toggleItalic,\n\t\"drawLink\": drawLink,\n\t\"toggleHeadingSmaller\": toggleHeadingSmaller,\n\t\"toggleHeadingBigger\": toggleHeadingBigger,\n\t\"drawImage\": drawImage,\n\t\"toggleBlockquote\": toggleBlockquote,\n\t\"toggleOrderedList\": toggleOrderedList,\n\t\"toggleUnorderedList\": toggleUnorderedList,\n\t\"toggleCodeBlock\": toggleCodeBlock,\n\t\"togglePreview\": togglePreview,\n\t\"toggleStrikethrough\": toggleStrikethrough,\n\t\"toggleHeading1\": toggleHeading1,\n\t\"toggleHeading2\": toggleHeading2,\n\t\"toggleHeading3\": toggleHeading3,\n\t\"cleanBlock\": cleanBlock,\n\t\"drawTable\": drawTable,\n\t\"drawHorizontalRule\": drawHorizontalRule,\n\t\"undo\": undo,\n\t\"redo\": redo,\n\t\"toggleSideBySide\": toggleSideBySide,\n\t\"toggleFullScreen\": toggleFullScreen\n};\n\nvar shortcuts = {\n\t\"toggleBold\": \"Cmd-B\",\n\t\"toggleItalic\": \"Cmd-I\",\n\t\"drawLink\": \"Cmd-K\",\n\t\"toggleHeadingSmaller\": \"Cmd-H\",\n\t\"toggleHeadingBigger\": \"Shift-Cmd-H\",\n\t\"cleanBlock\": \"Cmd-E\",\n\t\"drawImage\": \"Cmd-Alt-I\",\n\t\"toggleBlockquote\": \"Cmd-'\",\n\t\"toggleOrderedList\": \"Cmd-Alt-L\",\n\t\"toggleUnorderedList\": \"Cmd-L\",\n\t\"toggleCodeBlock\": \"Cmd-Alt-C\",\n\t\"togglePreview\": \"Cmd-P\",\n\t\"toggleSideBySide\": \"F9\",\n\t\"toggleFullScreen\": \"F11\"\n};\n\nvar getBindingName = function(f) {\n\tfor(var key in bindings) {\n\t\tif(bindings[key] === f) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn null;\n};\n\nvar isMobile = function() {\n\tvar check = false;\n\t(function(a) {\n\t\tif(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true;\n\t})(navigator.userAgent || navigator.vendor || window.opera);\n\treturn check;\n};\n\n\n/**\n * Fix shortcut. Mac use Command, others use Ctrl.\n */\nfunction fixShortcut(name) {\n\tif(isMac) {\n\t\tname = name.replace(\"Ctrl\", \"Cmd\");\n\t} else {\n\t\tname = name.replace(\"Cmd\", \"Ctrl\");\n\t}\n\treturn name;\n}\n\n\n/**\n * Create icon element for toolbar.\n */\nfunction createIcon(options, enableTooltips, shortcuts) {\n\toptions = options || {};\n\tvar el = document.createElement(\"a\");\n\tenableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\n\tif(options.title && enableTooltips) {\n\t\tel.title = createTootlip(options.title, options.action, shortcuts);\n\n\t\tif(isMac) {\n\t\t\tel.title = el.title.replace(\"Ctrl\", \"⌘\");\n\t\t\tel.title = el.title.replace(\"Alt\", \"⌥\");\n\t\t}\n\t}\n\n\tel.tabIndex = -1;\n\tel.className = options.className;\n\treturn el;\n}\n\nfunction createSep() {\n\tvar el = document.createElement(\"i\");\n\tel.className = \"separator\";\n\tel.innerHTML = \"|\";\n\treturn el;\n}\n\nfunction createTootlip(title, action, shortcuts) {\n\tvar actionName;\n\tvar tooltip = title;\n\n\tif(action) {\n\t\tactionName = getBindingName(action);\n\t\tif(shortcuts[actionName]) {\n\t\t\ttooltip += \" (\" + fixShortcut(shortcuts[actionName]) + \")\";\n\t\t}\n\t}\n\n\treturn tooltip;\n}\n\n/**\n * The state of CodeMirror at the given position.\n */\nfunction getState(cm, pos) {\n\tpos = pos || cm.getCursor(\"start\");\n\tvar stat = cm.getTokenAt(pos);\n\tif(!stat.type) return {};\n\n\tvar types = stat.type.split(\" \");\n\n\tvar ret = {},\n\t\tdata, text;\n\tfor(var i = 0; i < types.length; i++) {\n\t\tdata = types[i];\n\t\tif(data === \"strong\") {\n\t\t\tret.bold = true;\n\t\t} else if(data === \"variable-2\") {\n\t\t\ttext = cm.getLine(pos.line);\n\t\t\tif(/^\\s*\\d+\\.\\s/.test(text)) {\n\t\t\t\tret[\"ordered-list\"] = true;\n\t\t\t} else {\n\t\t\t\tret[\"unordered-list\"] = true;\n\t\t\t}\n\t\t} else if(data === \"atom\") {\n\t\t\tret.quote = true;\n\t\t} else if(data === \"em\") {\n\t\t\tret.italic = true;\n\t\t} else if(data === \"quote\") {\n\t\t\tret.quote = true;\n\t\t} else if(data === \"strikethrough\") {\n\t\t\tret.strikethrough = true;\n\t\t} else if(data === \"comment\") {\n\t\t\tret.code = true;\n\t\t} else if(data === \"link\") {\n\t\t\tret.link = true;\n\t\t} else if(data === \"tag\") {\n\t\t\tret.image = true;\n\t\t} else if(data.match(/^header(\\-[1-6])?$/)) {\n\t\t\tret[data.replace(\"header\", \"heading\")] = true;\n\t\t}\n\t}\n\treturn ret;\n}\n\n\n// Saved overflow setting\nvar saved_overflow = \"\";\n\n/**\n * Toggle full screen of the editor.\n */\nfunction toggleFullScreen(editor) {\n\t// Set fullscreen\n\tvar cm = editor.codemirror;\n\tcm.setOption(\"fullScreen\", !cm.getOption(\"fullScreen\"));\n\n\n\t// Prevent scrolling on body during fullscreen active\n\tif(cm.getOption(\"fullScreen\")) {\n\t\tsaved_overflow = document.body.style.overflow;\n\t\tdocument.body.style.overflow = \"hidden\";\n\t} else {\n\t\tdocument.body.style.overflow = saved_overflow;\n\t}\n\n\n\t// Update toolbar class\n\tvar wrap = cm.getWrapperElement();\n\n\tif(!/fullscreen/.test(wrap.previousSibling.className)) {\n\t\twrap.previousSibling.className += \" fullscreen\";\n\t} else {\n\t\twrap.previousSibling.className = wrap.previousSibling.className.replace(/\\s*fullscreen\\b/, \"\");\n\t}\n\n\n\t// Update toolbar button\n\tvar toolbarButton = editor.toolbarElements.fullscreen;\n\n\tif(!/active/.test(toolbarButton.className)) {\n\t\ttoolbarButton.className += \" active\";\n\t} else {\n\t\ttoolbarButton.className = toolbarButton.className.replace(/\\s*active\\s*/g, \"\");\n\t}\n\n\n\t// Hide side by side if needed\n\tvar sidebyside = cm.getWrapperElement().nextSibling;\n\tif(/editor-preview-active-side/.test(sidebyside.className))\n\t\ttoggleSideBySide(editor);\n}\n\n\n/**\n * Action for toggling bold.\n */\nfunction toggleBold(editor) {\n\t_toggleBlock(editor, \"bold\", editor.options.blockStyles.bold);\n}\n\n\n/**\n * Action for toggling italic.\n */\nfunction toggleItalic(editor) {\n\t_toggleBlock(editor, \"italic\", editor.options.blockStyles.italic);\n}\n\n\n/**\n * Action for toggling strikethrough.\n */\nfunction toggleStrikethrough(editor) {\n\t_toggleBlock(editor, \"strikethrough\", \"~~\");\n}\n\n/**\n * Action for toggling code block.\n */\nfunction toggleCodeBlock(editor) {\n\tvar fenceCharsToInsert = editor.options.blockStyles.code;\n\n\tfunction fencing_line(line) {\n\t\t/* return true, if this is a ``` or ~~~ line */\n\t\tif(typeof line !== \"object\") {\n\t\t\tthrow \"fencing_line() takes a 'line' object (not a line number, or line text). Got: \" + typeof line + \": \" + line;\n\t\t}\n\t\treturn line.styles && line.styles[2] && line.styles[2].indexOf(\"formatting-code-block\") !== -1;\n\t}\n\n\tfunction token_state(token) {\n\t\t// base goes an extra level deep when mode backdrops are used, e.g. spellchecker on\n\t\treturn token.state.base.base || token.state.base;\n\t}\n\n\tfunction code_type(cm, line_num, line, firstTok, lastTok) {\n\t\t/*\n\t\t * Return \"single\", \"indented\", \"fenced\" or false\n\t\t *\n\t\t * cm and line_num are required. Others are optional for efficiency\n\t\t * To check in the middle of a line, pass in firstTok yourself.\n\t\t */\n\t\tline = line || cm.getLineHandle(line_num);\n\t\tfirstTok = firstTok || cm.getTokenAt({\n\t\t\tline: line_num,\n\t\t\tch: 1\n\t\t});\n\t\tlastTok = lastTok || (!!line.text && cm.getTokenAt({\n\t\t\tline: line_num,\n\t\t\tch: line.text.length - 1\n\t\t}));\n\t\tvar types = firstTok.type ? firstTok.type.split(\" \") : [];\n\t\tif(lastTok && token_state(lastTok).indentedCode) {\n\t\t\t// have to check last char, since first chars of first line aren\"t marked as indented\n\t\t\treturn \"indented\";\n\t\t} else if(types.indexOf(\"comment\") === -1) {\n\t\t\t// has to be after \"indented\" check, since first chars of first indented line aren\"t marked as such\n\t\t\treturn false;\n\t\t} else if(token_state(firstTok).fencedChars || token_state(lastTok).fencedChars || fencing_line(line)) {\n\t\t\treturn \"fenced\";\n\t\t} else {\n\t\t\treturn \"single\";\n\t\t}\n\t}\n\n\tfunction insertFencingAtSelection(cm, cur_start, cur_end, fenceCharsToInsert) {\n\t\tvar start_line_sel = cur_start.line + 1,\n\t\t\tend_line_sel = cur_end.line + 1,\n\t\t\tsel_multi = cur_start.line !== cur_end.line,\n\t\t\trepl_start = fenceCharsToInsert + \"\\n\",\n\t\t\trepl_end = \"\\n\" + fenceCharsToInsert;\n\t\tif(sel_multi) {\n\t\t\tend_line_sel++;\n\t\t}\n\t\t// handle last char including \\n or not\n\t\tif(sel_multi && cur_end.ch === 0) {\n\t\t\trepl_end = fenceCharsToInsert + \"\\n\";\n\t\t\tend_line_sel--;\n\t\t}\n\t\t_replaceSelection(cm, false, [repl_start, repl_end]);\n\t\tcm.setSelection({\n\t\t\tline: start_line_sel,\n\t\t\tch: 0\n\t\t}, {\n\t\t\tline: end_line_sel,\n\t\t\tch: 0\n\t\t});\n\t}\n\n\tvar cm = editor.codemirror,\n\t\tcur_start = cm.getCursor(\"start\"),\n\t\tcur_end = cm.getCursor(\"end\"),\n\t\ttok = cm.getTokenAt({\n\t\t\tline: cur_start.line,\n\t\t\tch: cur_start.ch || 1\n\t\t}), // avoid ch 0 which is a cursor pos but not token\n\t\tline = cm.getLineHandle(cur_start.line),\n\t\tis_code = code_type(cm, cur_start.line, line, tok);\n\tvar block_start, block_end, lineCount;\n\n\tif(is_code === \"single\") {\n\t\t// similar to some SimpleMDE _toggleBlock logic\n\t\tvar start = line.text.slice(0, cur_start.ch).replace(\"`\", \"\"),\n\t\t\tend = line.text.slice(cur_start.ch).replace(\"`\", \"\");\n\t\tcm.replaceRange(start + end, {\n\t\t\tline: cur_start.line,\n\t\t\tch: 0\n\t\t}, {\n\t\t\tline: cur_start.line,\n\t\t\tch: 99999999999999\n\t\t});\n\t\tcur_start.ch--;\n\t\tif(cur_start !== cur_end) {\n\t\t\tcur_end.ch--;\n\t\t}\n\t\tcm.setSelection(cur_start, cur_end);\n\t\tcm.focus();\n\t} else if(is_code === \"fenced\") {\n\t\tif(cur_start.line !== cur_end.line || cur_start.ch !== cur_end.ch) {\n\t\t\t// use selection\n\n\t\t\t// find the fenced line so we know what type it is (tilde, backticks, number of them)\n\t\t\tfor(block_start = cur_start.line; block_start >= 0; block_start--) {\n\t\t\t\tline = cm.getLineHandle(block_start);\n\t\t\t\tif(fencing_line(line)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar fencedTok = cm.getTokenAt({\n\t\t\t\tline: block_start,\n\t\t\t\tch: 1\n\t\t\t});\n\t\t\tvar fence_chars = token_state(fencedTok).fencedChars;\n\t\t\tvar start_text, start_line;\n\t\t\tvar end_text, end_line;\n\t\t\t// check for selection going up against fenced lines, in which case we don't want to add more fencing\n\t\t\tif(fencing_line(cm.getLineHandle(cur_start.line))) {\n\t\t\t\tstart_text = \"\";\n\t\t\t\tstart_line = cur_start.line;\n\t\t\t} else if(fencing_line(cm.getLineHandle(cur_start.line - 1))) {\n\t\t\t\tstart_text = \"\";\n\t\t\t\tstart_line = cur_start.line - 1;\n\t\t\t} else {\n\t\t\t\tstart_text = fence_chars + \"\\n\";\n\t\t\t\tstart_line = cur_start.line;\n\t\t\t}\n\t\t\tif(fencing_line(cm.getLineHandle(cur_end.line))) {\n\t\t\t\tend_text = \"\";\n\t\t\t\tend_line = cur_end.line;\n\t\t\t\tif(cur_end.ch === 0) {\n\t\t\t\t\tend_line += 1;\n\t\t\t\t}\n\t\t\t} else if(cur_end.ch !== 0 && fencing_line(cm.getLineHandle(cur_end.line + 1))) {\n\t\t\t\tend_text = \"\";\n\t\t\t\tend_line = cur_end.line + 1;\n\t\t\t} else {\n\t\t\t\tend_text = fence_chars + \"\\n\";\n\t\t\t\tend_line = cur_end.line + 1;\n\t\t\t}\n\t\t\tif(cur_end.ch === 0) {\n\t\t\t\t// full last line selected, putting cursor at beginning of next\n\t\t\t\tend_line -= 1;\n\t\t\t}\n\t\t\tcm.operation(function() {\n\t\t\t\t// end line first, so that line numbers don't change\n\t\t\t\tcm.replaceRange(end_text, {\n\t\t\t\t\tline: end_line,\n\t\t\t\t\tch: 0\n\t\t\t\t}, {\n\t\t\t\t\tline: end_line + (end_text ? 0 : 1),\n\t\t\t\t\tch: 0\n\t\t\t\t});\n\t\t\t\tcm.replaceRange(start_text, {\n\t\t\t\t\tline: start_line,\n\t\t\t\t\tch: 0\n\t\t\t\t}, {\n\t\t\t\t\tline: start_line + (start_text ? 0 : 1),\n\t\t\t\t\tch: 0\n\t\t\t\t});\n\t\t\t});\n\t\t\tcm.setSelection({\n\t\t\t\tline: start_line + (start_text ? 1 : 0),\n\t\t\t\tch: 0\n\t\t\t}, {\n\t\t\t\tline: end_line + (start_text ? 1 : -1),\n\t\t\t\tch: 0\n\t\t\t});\n\t\t\tcm.focus();\n\t\t} else {\n\t\t\t// no selection, search for ends of this fenced block\n\t\t\tvar search_from = cur_start.line;\n\t\t\tif(fencing_line(cm.getLineHandle(cur_start.line))) { // gets a little tricky if cursor is right on a fenced line\n\t\t\t\tif(code_type(cm, cur_start.line + 1) === \"fenced\") {\n\t\t\t\t\tblock_start = cur_start.line;\n\t\t\t\t\tsearch_from = cur_start.line + 1; // for searching for \"end\"\n\t\t\t\t} else {\n\t\t\t\t\tblock_end = cur_start.line;\n\t\t\t\t\tsearch_from = cur_start.line - 1; // for searching for \"start\"\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(block_start === undefined) {\n\t\t\t\tfor(block_start = search_from; block_start >= 0; block_start--) {\n\t\t\t\t\tline = cm.getLineHandle(block_start);\n\t\t\t\t\tif(fencing_line(line)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(block_end === undefined) {\n\t\t\t\tlineCount = cm.lineCount();\n\t\t\t\tfor(block_end = search_from; block_end < lineCount; block_end++) {\n\t\t\t\t\tline = cm.getLineHandle(block_end);\n\t\t\t\t\tif(fencing_line(line)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcm.operation(function() {\n\t\t\t\tcm.replaceRange(\"\", {\n\t\t\t\t\tline: block_start,\n\t\t\t\t\tch: 0\n\t\t\t\t}, {\n\t\t\t\t\tline: block_start + 1,\n\t\t\t\t\tch: 0\n\t\t\t\t});\n\t\t\t\tcm.replaceRange(\"\", {\n\t\t\t\t\tline: block_end - 1,\n\t\t\t\t\tch: 0\n\t\t\t\t}, {\n\t\t\t\t\tline: block_end,\n\t\t\t\t\tch: 0\n\t\t\t\t});\n\t\t\t});\n\t\t\tcm.focus();\n\t\t}\n\t} else if(is_code === \"indented\") {\n\t\tif(cur_start.line !== cur_end.line || cur_start.ch !== cur_end.ch) {\n\t\t\t// use selection\n\t\t\tblock_start = cur_start.line;\n\t\t\tblock_end = cur_end.line;\n\t\t\tif(cur_end.ch === 0) {\n\t\t\t\tblock_end--;\n\t\t\t}\n\t\t} else {\n\t\t\t// no selection, search for ends of this indented block\n\t\t\tfor(block_start = cur_start.line; block_start >= 0; block_start--) {\n\t\t\t\tline = cm.getLineHandle(block_start);\n\t\t\t\tif(line.text.match(/^\\s*$/)) {\n\t\t\t\t\t// empty or all whitespace - keep going\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tif(code_type(cm, block_start, line) !== \"indented\") {\n\t\t\t\t\t\tblock_start += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlineCount = cm.lineCount();\n\t\t\tfor(block_end = cur_start.line; block_end < lineCount; block_end++) {\n\t\t\t\tline = cm.getLineHandle(block_end);\n\t\t\t\tif(line.text.match(/^\\s*$/)) {\n\t\t\t\t\t// empty or all whitespace - keep going\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tif(code_type(cm, block_end, line) !== \"indented\") {\n\t\t\t\t\t\tblock_end -= 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if we are going to un-indent based on a selected set of lines, and the next line is indented too, we need to\n\t\t// insert a blank line so that the next line(s) continue to be indented code\n\t\tvar next_line = cm.getLineHandle(block_end + 1),\n\t\t\tnext_line_last_tok = next_line && cm.getTokenAt({\n\t\t\t\tline: block_end + 1,\n\t\t\t\tch: next_line.text.length - 1\n\t\t\t}),\n\t\t\tnext_line_indented = next_line_last_tok && token_state(next_line_last_tok).indentedCode;\n\t\tif(next_line_indented) {\n\t\t\tcm.replaceRange(\"\\n\", {\n\t\t\t\tline: block_end + 1,\n\t\t\t\tch: 0\n\t\t\t});\n\t\t}\n\n\t\tfor(var i = block_start; i <= block_end; i++) {\n\t\t\tcm.indentLine(i, \"subtract\"); // TODO: this doesn't get tracked in the history, so can't be undone :(\n\t\t}\n\t\tcm.focus();\n\t} else {\n\t\t// insert code formatting\n\t\tvar no_sel_and_starting_of_line = (cur_start.line === cur_end.line && cur_start.ch === cur_end.ch && cur_start.ch === 0);\n\t\tvar sel_multi = cur_start.line !== cur_end.line;\n\t\tif(no_sel_and_starting_of_line || sel_multi) {\n\t\t\tinsertFencingAtSelection(cm, cur_start, cur_end, fenceCharsToInsert);\n\t\t} else {\n\t\t\t_replaceSelection(cm, false, [\"`\", \"`\"]);\n\t\t}\n\t}\n}\n\n/**\n * Action for toggling blockquote.\n */\nfunction toggleBlockquote(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleLine(cm, \"quote\");\n}\n\n/**\n * Action for toggling heading size: normal -> h1 -> h2 -> h3 -> h4 -> h5 -> h6 -> normal\n */\nfunction toggleHeadingSmaller(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleHeading(cm, \"smaller\");\n}\n\n/**\n * Action for toggling heading size: normal -> h6 -> h5 -> h4 -> h3 -> h2 -> h1 -> normal\n */\nfunction toggleHeadingBigger(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleHeading(cm, \"bigger\");\n}\n\n/**\n * Action for toggling heading size 1\n */\nfunction toggleHeading1(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleHeading(cm, undefined, 1);\n}\n\n/**\n * Action for toggling heading size 2\n */\nfunction toggleHeading2(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleHeading(cm, undefined, 2);\n}\n\n/**\n * Action for toggling heading size 3\n */\nfunction toggleHeading3(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleHeading(cm, undefined, 3);\n}\n\n\n/**\n * Action for toggling ul.\n */\nfunction toggleUnorderedList(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleLine(cm, \"unordered-list\");\n}\n\n\n/**\n * Action for toggling ol.\n */\nfunction toggleOrderedList(editor) {\n\tvar cm = editor.codemirror;\n\t_toggleLine(cm, \"ordered-list\");\n}\n\n/**\n * Action for clean block (remove headline, list, blockquote code, markers)\n */\nfunction cleanBlock(editor) {\n\tvar cm = editor.codemirror;\n\t_cleanBlock(cm);\n}\n\n/**\n * Action for drawing a link.\n */\nfunction drawLink(editor) {\n\tvar cm = editor.codemirror;\n\tvar stat = getState(cm);\n\tvar options = editor.options;\n\tvar url = \"http://\";\n\tif(options.promptURLs) {\n\t\turl = prompt(options.promptTexts.link);\n\t\tif(!url) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t_replaceSelection(cm, stat.link, options.insertTexts.link, url);\n}\n\n/**\n * Action for drawing an img.\n */\nfunction drawImage(editor) {\n\tvar cm = editor.codemirror;\n\tvar stat = getState(cm);\n\tvar options = editor.options;\n\tvar url = \"http://\";\n\tif(options.promptURLs) {\n\t\turl = prompt(options.promptTexts.image);\n\t\tif(!url) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t_replaceSelection(cm, stat.image, options.insertTexts.image, url);\n}\n\n/**\n * Action for drawing a table.\n */\nfunction drawTable(editor) {\n\tvar cm = editor.codemirror;\n\tvar stat = getState(cm);\n\tvar options = editor.options;\n\t_replaceSelection(cm, stat.table, options.insertTexts.table);\n}\n\n/**\n * Action for drawing a horizontal rule.\n */\nfunction drawHorizontalRule(editor) {\n\tvar cm = editor.codemirror;\n\tvar stat = getState(cm);\n\tvar options = editor.options;\n\t_replaceSelection(cm, stat.image, options.insertTexts.horizontalRule);\n}\n\n\n/**\n * Undo action.\n */\nfunction undo(editor) {\n\tvar cm = editor.codemirror;\n\tcm.undo();\n\tcm.focus();\n}\n\n\n/**\n * Redo action.\n */\nfunction redo(editor) {\n\tvar cm = editor.codemirror;\n\tcm.redo();\n\tcm.focus();\n}\n\n\n/**\n * Toggle side by side preview\n */\nfunction toggleSideBySide(editor) {\n\tvar cm = editor.codemirror;\n\tvar wrapper = cm.getWrapperElement();\n\tvar preview = wrapper.nextSibling;\n\tvar toolbarButton = editor.toolbarElements[\"side-by-side\"];\n\tvar useSideBySideListener = false;\n\tif(/editor-preview-active-side/.test(preview.className)) {\n\t\tpreview.className = preview.className.replace(\n\t\t\t/\\s*editor-preview-active-side\\s*/g, \"\"\n\t\t);\n\t\ttoolbarButton.className = toolbarButton.className.replace(/\\s*active\\s*/g, \"\");\n\t\twrapper.className = wrapper.className.replace(/\\s*CodeMirror-sided\\s*/g, \" \");\n\t} else {\n\t\t// When the preview button is clicked for the first time,\n\t\t// give some time for the transition from editor.css to fire and the view to slide from right to left,\n\t\t// instead of just appearing.\n\t\tsetTimeout(function() {\n\t\t\tif(!cm.getOption(\"fullScreen\"))\n\t\t\t\ttoggleFullScreen(editor);\n\t\t\tpreview.className += \" editor-preview-active-side\";\n\t\t}, 1);\n\t\ttoolbarButton.className += \" active\";\n\t\twrapper.className += \" CodeMirror-sided\";\n\t\tuseSideBySideListener = true;\n\t}\n\n\t// Hide normal preview if active\n\tvar previewNormal = wrapper.lastChild;\n\tif(/editor-preview-active/.test(previewNormal.className)) {\n\t\tpreviewNormal.className = previewNormal.className.replace(\n\t\t\t/\\s*editor-preview-active\\s*/g, \"\"\n\t\t);\n\t\tvar toolbar = editor.toolbarElements.preview;\n\t\tvar toolbar_div = wrapper.previousSibling;\n\t\ttoolbar.className = toolbar.className.replace(/\\s*active\\s*/g, \"\");\n\t\ttoolbar_div.className = toolbar_div.className.replace(/\\s*disabled-for-preview*/g, \"\");\n\t}\n\n\tvar sideBySideRenderingFunction = function() {\n\t\tpreview.innerHTML = editor.options.previewRender(editor.value(), preview);\n\t};\n\n\tif(!cm.sideBySideRenderingFunction) {\n\t\tcm.sideBySideRenderingFunction = sideBySideRenderingFunction;\n\t}\n\n\tif(useSideBySideListener) {\n\t\tpreview.innerHTML = editor.options.previewRender(editor.value(), preview);\n\t\tcm.on(\"update\", cm.sideBySideRenderingFunction);\n\t} else {\n\t\tcm.off(\"update\", cm.sideBySideRenderingFunction);\n\t}\n\n\t// Refresh to fix selection being off (#309)\n\tcm.refresh();\n}\n\n\n/**\n * Preview action.\n */\nfunction togglePreview(editor) {\n\tvar cm = editor.codemirror;\n\tvar wrapper = cm.getWrapperElement();\n\tvar toolbar_div = wrapper.previousSibling;\n\tvar toolbar = editor.options.toolbar ? editor.toolbarElements.preview : false;\n\tvar preview = wrapper.lastChild;\n\tif(!preview || !/editor-preview/.test(preview.className)) {\n\t\tpreview = document.createElement(\"div\");\n\t\tpreview.className = \"editor-preview\";\n\t\twrapper.appendChild(preview);\n\t}\n\tif(/editor-preview-active/.test(preview.className)) {\n\t\tpreview.className = preview.className.replace(\n\t\t\t/\\s*editor-preview-active\\s*/g, \"\"\n\t\t);\n\t\tif(toolbar) {\n\t\t\ttoolbar.className = toolbar.className.replace(/\\s*active\\s*/g, \"\");\n\t\t\ttoolbar_div.className = toolbar_div.className.replace(/\\s*disabled-for-preview*/g, \"\");\n\t\t}\n\t} else {\n\t\t// When the preview button is clicked for the first time,\n\t\t// give some time for the transition from editor.css to fire and the view to slide from right to left,\n\t\t// instead of just appearing.\n\t\tsetTimeout(function() {\n\t\t\tpreview.className += \" editor-preview-active\";\n\t\t}, 1);\n\t\tif(toolbar) {\n\t\t\ttoolbar.className += \" active\";\n\t\t\ttoolbar_div.className += \" disabled-for-preview\";\n\t\t}\n\t}\n\tpreview.innerHTML = editor.options.previewRender(editor.value(), preview);\n\n\t// Turn off side by side if needed\n\tvar sidebyside = cm.getWrapperElement().nextSibling;\n\tif(/editor-preview-active-side/.test(sidebyside.className))\n\t\ttoggleSideBySide(editor);\n}\n\nfunction _replaceSelection(cm, active, startEnd, url) {\n\tif(/editor-preview-active/.test(cm.getWrapperElement().lastChild.className))\n\t\treturn;\n\n\tvar text;\n\tvar start = startEnd[0];\n\tvar end = startEnd[1];\n\tvar startPoint = cm.getCursor(\"start\");\n\tvar endPoint = cm.getCursor(\"end\");\n\tif(url) {\n\t\tend = end.replace(\"#url#\", url);\n\t}\n\tif(active) {\n\t\ttext = cm.getLine(startPoint.line);\n\t\tstart = text.slice(0, startPoint.ch);\n\t\tend = text.slice(startPoint.ch);\n\t\tcm.replaceRange(start + end, {\n\t\t\tline: startPoint.line,\n\t\t\tch: 0\n\t\t});\n\t} else {\n\t\ttext = cm.getSelection();\n\t\tcm.replaceSelection(start + text + end);\n\n\t\tstartPoint.ch += start.length;\n\t\tif(startPoint !== endPoint) {\n\t\t\tendPoint.ch += start.length;\n\t\t}\n\t}\n\tcm.setSelection(startPoint, endPoint);\n\tcm.focus();\n}\n\n\nfunction _toggleHeading(cm, direction, size) {\n\tif(/editor-preview-active/.test(cm.getWrapperElement().lastChild.className))\n\t\treturn;\n\n\tvar startPoint = cm.getCursor(\"start\");\n\tvar endPoint = cm.getCursor(\"end\");\n\tfor(var i = startPoint.line; i <= endPoint.line; i++) {\n\t\t(function(i) {\n\t\t\tvar text = cm.getLine(i);\n\t\t\tvar currHeadingLevel = text.search(/[^#]/);\n\n\t\t\tif(direction !== undefined) {\n\t\t\t\tif(currHeadingLevel <= 0) {\n\t\t\t\t\tif(direction == \"bigger\") {\n\t\t\t\t\t\ttext = \"###### \" + text;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = \"# \" + text;\n\t\t\t\t\t}\n\t\t\t\t} else if(currHeadingLevel == 6 && direction == \"smaller\") {\n\t\t\t\t\ttext = text.substr(7);\n\t\t\t\t} else if(currHeadingLevel == 1 && direction == \"bigger\") {\n\t\t\t\t\ttext = text.substr(2);\n\t\t\t\t} else {\n\t\t\t\t\tif(direction == \"bigger\") {\n\t\t\t\t\t\ttext = text.substr(1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = \"#\" + text;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(size == 1) {\n\t\t\t\t\tif(currHeadingLevel <= 0) {\n\t\t\t\t\t\ttext = \"# \" + text;\n\t\t\t\t\t} else if(currHeadingLevel == size) {\n\t\t\t\t\t\ttext = text.substr(currHeadingLevel + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = \"# \" + text.substr(currHeadingLevel + 1);\n\t\t\t\t\t}\n\t\t\t\t} else if(size == 2) {\n\t\t\t\t\tif(currHeadingLevel <= 0) {\n\t\t\t\t\t\ttext = \"## \" + text;\n\t\t\t\t\t} else if(currHeadingLevel == size) {\n\t\t\t\t\t\ttext = text.substr(currHeadingLevel + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = \"## \" + text.substr(currHeadingLevel + 1);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(currHeadingLevel <= 0) {\n\t\t\t\t\t\ttext = \"### \" + text;\n\t\t\t\t\t} else if(currHeadingLevel == size) {\n\t\t\t\t\t\ttext = text.substr(currHeadingLevel + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = \"### \" + text.substr(currHeadingLevel + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcm.replaceRange(text, {\n\t\t\t\tline: i,\n\t\t\t\tch: 0\n\t\t\t}, {\n\t\t\t\tline: i,\n\t\t\t\tch: 99999999999999\n\t\t\t});\n\t\t})(i);\n\t}\n\tcm.focus();\n}\n\n\nfunction _toggleLine(cm, name) {\n\tif(/editor-preview-active/.test(cm.getWrapperElement().lastChild.className))\n\t\treturn;\n\n\tvar stat = getState(cm);\n\tvar startPoint = cm.getCursor(\"start\");\n\tvar endPoint = cm.getCursor(\"end\");\n\tvar repl = {\n\t\t\"quote\": /^(\\s*)\\>\\s+/,\n\t\t\"unordered-list\": /^(\\s*)(\\*|\\-|\\+)\\s+/,\n\t\t\"ordered-list\": /^(\\s*)\\d+\\.\\s+/\n\t};\n\tvar map = {\n\t\t\"quote\": \"> \",\n\t\t\"unordered-list\": \"* \",\n\t\t\"ordered-list\": \"1. \"\n\t};\n\tfor(var i = startPoint.line; i <= endPoint.line; i++) {\n\t\t(function(i) {\n\t\t\tvar text = cm.getLine(i);\n\t\t\tif(stat[name]) {\n\t\t\t\ttext = text.replace(repl[name], \"$1\");\n\t\t\t} else {\n\t\t\t\ttext = map[name] + text;\n\t\t\t}\n\t\t\tcm.replaceRange(text, {\n\t\t\t\tline: i,\n\t\t\t\tch: 0\n\t\t\t}, {\n\t\t\t\tline: i,\n\t\t\t\tch: 99999999999999\n\t\t\t});\n\t\t})(i);\n\t}\n\tcm.focus();\n}\n\nfunction _toggleBlock(editor, type, start_chars, end_chars) {\n\tif(/editor-preview-active/.test(editor.codemirror.getWrapperElement().lastChild.className))\n\t\treturn;\n\n\tend_chars = (typeof end_chars === \"undefined\") ? start_chars : end_chars;\n\tvar cm = editor.codemirror;\n\tvar stat = getState(cm);\n\n\tvar text;\n\tvar start = start_chars;\n\tvar end = end_chars;\n\n\tvar startPoint = cm.getCursor(\"start\");\n\tvar endPoint = cm.getCursor(\"end\");\n\n\tif(stat[type]) {\n\t\ttext = cm.getLine(startPoint.line);\n\t\tstart = text.slice(0, startPoint.ch);\n\t\tend = text.slice(startPoint.ch);\n\t\tif(type == \"bold\") {\n\t\t\tstart = start.replace(/(\\*\\*|__)(?![\\s\\S]*(\\*\\*|__))/, \"\");\n\t\t\tend = end.replace(/(\\*\\*|__)/, \"\");\n\t\t} else if(type == \"italic\") {\n\t\t\tstart = start.replace(/(\\*|_)(?![\\s\\S]*(\\*|_))/, \"\");\n\t\t\tend = end.replace(/(\\*|_)/, \"\");\n\t\t} else if(type == \"strikethrough\") {\n\t\t\tstart = start.replace(/(\\*\\*|~~)(?![\\s\\S]*(\\*\\*|~~))/, \"\");\n\t\t\tend = end.replace(/(\\*\\*|~~)/, \"\");\n\t\t}\n\t\tcm.replaceRange(start + end, {\n\t\t\tline: startPoint.line,\n\t\t\tch: 0\n\t\t}, {\n\t\t\tline: startPoint.line,\n\t\t\tch: 99999999999999\n\t\t});\n\n\t\tif(type == \"bold\" || type == \"strikethrough\") {\n\t\t\tstartPoint.ch -= 2;\n\t\t\tif(startPoint !== endPoint) {\n\t\t\t\tendPoint.ch -= 2;\n\t\t\t}\n\t\t} else if(type == \"italic\") {\n\t\t\tstartPoint.ch -= 1;\n\t\t\tif(startPoint !== endPoint) {\n\t\t\t\tendPoint.ch -= 1;\n\t\t\t}\n\t\t}\n\t} else {\n\t\ttext = cm.getSelection();\n\t\tif(type == \"bold\") {\n\t\t\ttext = text.split(\"**\").join(\"\");\n\t\t\ttext = text.split(\"__\").join(\"\");\n\t\t} else if(type == \"italic\") {\n\t\t\ttext = text.split(\"*\").join(\"\");\n\t\t\ttext = text.split(\"_\").join(\"\");\n\t\t} else if(type == \"strikethrough\") {\n\t\t\ttext = text.split(\"~~\").join(\"\");\n\t\t}\n\t\tcm.replaceSelection(start + text + end);\n\n\t\tstartPoint.ch += start_chars.length;\n\t\tendPoint.ch = startPoint.ch + text.length;\n\t}\n\n\tcm.setSelection(startPoint, endPoint);\n\tcm.focus();\n}\n\nfunction _cleanBlock(cm) {\n\tif(/editor-preview-active/.test(cm.getWrapperElement().lastChild.className))\n\t\treturn;\n\n\tvar startPoint = cm.getCursor(\"start\");\n\tvar endPoint = cm.getCursor(\"end\");\n\tvar text;\n\n\tfor(var line = startPoint.line; line <= endPoint.line; line++) {\n\t\ttext = cm.getLine(line);\n\t\ttext = text.replace(/^[ ]*([# ]+|\\*|\\-|[> ]+|[0-9]+(.|\\)))[ ]*/, \"\");\n\n\t\tcm.replaceRange(text, {\n\t\t\tline: line,\n\t\t\tch: 0\n\t\t}, {\n\t\t\tline: line,\n\t\t\tch: 99999999999999\n\t\t});\n\t}\n}\n\n// Merge the properties of one object into another.\nfunction _mergeProperties(target, source) {\n\tfor(var property in source) {\n\t\tif(source.hasOwnProperty(property)) {\n\t\t\tif(source[property] instanceof Array) {\n\t\t\t\ttarget[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n\t\t\t} else if(\n\t\t\t\tsource[property] !== null &&\n\t\t\t\ttypeof source[property] === \"object\" &&\n\t\t\t\tsource[property].constructor === Object\n\t\t\t) {\n\t\t\t\ttarget[property] = _mergeProperties(target[property] || {}, source[property]);\n\t\t\t} else {\n\t\t\t\ttarget[property] = source[property];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn target;\n}\n\n// Merge an arbitrary number of objects into one.\nfunction extend(target) {\n\tfor(var i = 1; i < arguments.length; i++) {\n\t\ttarget = _mergeProperties(target, arguments[i]);\n\t}\n\n\treturn target;\n}\n\n/* The right word count in respect for CJK. */\nfunction wordCount(data) {\n\tvar pattern = /[a-zA-Z0-9_\\u0392-\\u03c9\\u0410-\\u04F9]+|[\\u4E00-\\u9FFF\\u3400-\\u4dbf\\uf900-\\ufaff\\u3040-\\u309f\\uac00-\\ud7af]+/g;\n\tvar m = data.match(pattern);\n\tvar count = 0;\n\tif(m === null) return count;\n\tfor(var i = 0; i < m.length; i++) {\n\t\tif(m[i].charCodeAt(0) >= 0x4E00) {\n\t\t\tcount += m[i].length;\n\t\t} else {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\nvar toolbarBuiltInButtons = {\n\t\"bold\": {\n\t\tname: \"bold\",\n\t\taction: toggleBold,\n\t\tclassName: \"fa fa-bold\",\n\t\ttitle: \"Bold\",\n\t\tdefault: true\n\t},\n\t\"italic\": {\n\t\tname: \"italic\",\n\t\taction: toggleItalic,\n\t\tclassName: \"fa fa-italic\",\n\t\ttitle: \"Italic\",\n\t\tdefault: true\n\t},\n\t\"strikethrough\": {\n\t\tname: \"strikethrough\",\n\t\taction: toggleStrikethrough,\n\t\tclassName: \"fa fa-strikethrough\",\n\t\ttitle: \"Strikethrough\"\n\t},\n\t\"heading\": {\n\t\tname: \"heading\",\n\t\taction: toggleHeadingSmaller,\n\t\tclassName: \"fa fa-header\",\n\t\ttitle: \"Heading\",\n\t\tdefault: true\n\t},\n\t\"heading-smaller\": {\n\t\tname: \"heading-smaller\",\n\t\taction: toggleHeadingSmaller,\n\t\tclassName: \"fa fa-header fa-header-x fa-header-smaller\",\n\t\ttitle: \"Smaller Heading\"\n\t},\n\t\"heading-bigger\": {\n\t\tname: \"heading-bigger\",\n\t\taction: toggleHeadingBigger,\n\t\tclassName: \"fa fa-header fa-header-x fa-header-bigger\",\n\t\ttitle: \"Bigger Heading\"\n\t},\n\t\"heading-1\": {\n\t\tname: \"heading-1\",\n\t\taction: toggleHeading1,\n\t\tclassName: \"fa fa-header fa-header-x fa-header-1\",\n\t\ttitle: \"Big Heading\"\n\t},\n\t\"heading-2\": {\n\t\tname: \"heading-2\",\n\t\taction: toggleHeading2,\n\t\tclassName: \"fa fa-header fa-header-x fa-header-2\",\n\t\ttitle: \"Medium Heading\"\n\t},\n\t\"heading-3\": {\n\t\tname: \"heading-3\",\n\t\taction: toggleHeading3,\n\t\tclassName: \"fa fa-header fa-header-x fa-header-3\",\n\t\ttitle: \"Small Heading\"\n\t},\n\t\"separator-1\": {\n\t\tname: \"separator-1\"\n\t},\n\t\"code\": {\n\t\tname: \"code\",\n\t\taction: toggleCodeBlock,\n\t\tclassName: \"fa fa-code\",\n\t\ttitle: \"Code\"\n\t},\n\t\"quote\": {\n\t\tname: \"quote\",\n\t\taction: toggleBlockquote,\n\t\tclassName: \"fa fa-quote-left\",\n\t\ttitle: \"Quote\",\n\t\tdefault: true\n\t},\n\t\"unordered-list\": {\n\t\tname: \"unordered-list\",\n\t\taction: toggleUnorderedList,\n\t\tclassName: \"fa fa-list-ul\",\n\t\ttitle: \"Generic List\",\n\t\tdefault: true\n\t},\n\t\"ordered-list\": {\n\t\tname: \"ordered-list\",\n\t\taction: toggleOrderedList,\n\t\tclassName: \"fa fa-list-ol\",\n\t\ttitle: \"Numbered List\",\n\t\tdefault: true\n\t},\n\t\"clean-block\": {\n\t\tname: \"clean-block\",\n\t\taction: cleanBlock,\n\t\tclassName: \"fa fa-eraser fa-clean-block\",\n\t\ttitle: \"Clean block\"\n\t},\n\t\"separator-2\": {\n\t\tname: \"separator-2\"\n\t},\n\t\"link\": {\n\t\tname: \"link\",\n\t\taction: drawLink,\n\t\tclassName: \"fa fa-link\",\n\t\ttitle: \"Create Link\",\n\t\tdefault: true\n\t},\n\t\"image\": {\n\t\tname: \"image\",\n\t\taction: drawImage,\n\t\tclassName: \"fa fa-picture-o\",\n\t\ttitle: \"Insert Image\",\n\t\tdefault: true\n\t},\n\t\"table\": {\n\t\tname: \"table\",\n\t\taction: drawTable,\n\t\tclassName: \"fa fa-table\",\n\t\ttitle: \"Insert Table\"\n\t},\n\t\"horizontal-rule\": {\n\t\tname: \"horizontal-rule\",\n\t\taction: drawHorizontalRule,\n\t\tclassName: \"fa fa-minus\",\n\t\ttitle: \"Insert Horizontal Line\"\n\t},\n\t\"separator-3\": {\n\t\tname: \"separator-3\"\n\t},\n\t\"preview\": {\n\t\tname: \"preview\",\n\t\taction: togglePreview,\n\t\tclassName: \"fa fa-eye no-disable\",\n\t\ttitle: \"Toggle Preview\",\n\t\tdefault: true\n\t},\n\t\"side-by-side\": {\n\t\tname: \"side-by-side\",\n\t\taction: toggleSideBySide,\n\t\tclassName: \"fa fa-columns no-disable no-mobile\",\n\t\ttitle: \"Toggle Side by Side\",\n\t\tdefault: true\n\t},\n\t\"fullscreen\": {\n\t\tname: \"fullscreen\",\n\t\taction: toggleFullScreen,\n\t\tclassName: \"fa fa-arrows-alt no-disable no-mobile\",\n\t\ttitle: \"Toggle Fullscreen\",\n\t\tdefault: true\n\t},\n\t\"separator-4\": {\n\t\tname: \"separator-4\"\n\t},\n\t\"guide\": {\n\t\tname: \"guide\",\n\t\taction: \"https://simplemde.com/markdown-guide\",\n\t\tclassName: \"fa fa-question-circle\",\n\t\ttitle: \"Markdown Guide\",\n\t\tdefault: true\n\t},\n\t\"separator-5\": {\n\t\tname: \"separator-5\"\n\t},\n\t\"undo\": {\n\t\tname: \"undo\",\n\t\taction: undo,\n\t\tclassName: \"fa fa-undo no-disable\",\n\t\ttitle: \"Undo\"\n\t},\n\t\"redo\": {\n\t\tname: \"redo\",\n\t\taction: redo,\n\t\tclassName: \"fa fa-repeat no-disable\",\n\t\ttitle: \"Redo\"\n\t}\n};\n\nvar insertTexts = {\n\tlink: [\"[\", \"](#url#)\"],\n\timage: [\"![](\", \"#url#)\"],\n\ttable: [\"\", \"\\n\\n| Column 1 | Column 2 | Column 3 |\\n| -------- | -------- | -------- |\\n| Text | Text | Text |\\n\\n\"],\n\thorizontalRule: [\"\", \"\\n\\n-----\\n\\n\"]\n};\n\nvar promptTexts = {\n\tlink: \"URL for the link:\",\n\timage: \"URL of the image:\"\n};\n\nvar blockStyles = {\n\t\"bold\": \"**\",\n\t\"code\": \"```\",\n\t\"italic\": \"*\"\n};\n\n/**\n * Interface of SimpleMDE.\n */\nfunction SimpleMDE(options) {\n\t// Handle options parameter\n\toptions = options || {};\n\n\n\t// Used later to refer to it\"s parent\n\toptions.parent = this;\n\n\n\t// Check if Font Awesome needs to be auto downloaded\n\tvar autoDownloadFA = true;\n\n\tif(options.autoDownloadFontAwesome === false) {\n\t\tautoDownloadFA = false;\n\t}\n\n\tif(options.autoDownloadFontAwesome !== true) {\n\t\tvar styleSheets = document.styleSheets;\n\t\tfor(var i = 0; i < styleSheets.length; i++) {\n\t\t\tif(!styleSheets[i].href)\n\t\t\t\tcontinue;\n\n\t\t\tif(styleSheets[i].href.indexOf(\"//maxcdn.bootstrapcdn.com/font-awesome/\") > -1) {\n\t\t\t\tautoDownloadFA = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(autoDownloadFA) {\n\t\tvar link = document.createElement(\"link\");\n\t\tlink.rel = \"stylesheet\";\n\t\tlink.href = \"https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css\";\n\t\tdocument.getElementsByTagName(\"head\")[0].appendChild(link);\n\t}\n\n\n\t// Find the textarea to use\n\tif(options.element) {\n\t\tthis.element = options.element;\n\t} else if(options.element === null) {\n\t\t// This means that the element option was specified, but no element was found\n\t\tconsole.log(\"SimpleMDE: Error. No element was found.\");\n\t\treturn;\n\t}\n\n\n\t// Handle toolbar\n\tif(options.toolbar === undefined) {\n\t\t// Initialize\n\t\toptions.toolbar = [];\n\n\n\t\t// Loop over the built in buttons, to get the preferred order\n\t\tfor(var key in toolbarBuiltInButtons) {\n\t\t\tif(toolbarBuiltInButtons.hasOwnProperty(key)) {\n\t\t\t\tif(key.indexOf(\"separator-\") != -1) {\n\t\t\t\t\toptions.toolbar.push(\"|\");\n\t\t\t\t}\n\n\t\t\t\tif(toolbarBuiltInButtons[key].default === true || (options.showIcons && options.showIcons.constructor === Array && options.showIcons.indexOf(key) != -1)) {\n\t\t\t\t\toptions.toolbar.push(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// Handle status bar\n\tif(!options.hasOwnProperty(\"status\")) {\n\t\toptions.status = [\"autosave\", \"lines\", \"words\", \"cursor\"];\n\t}\n\n\n\t// Add default preview rendering function\n\tif(!options.previewRender) {\n\t\toptions.previewRender = function(plainText) {\n\t\t\t// Note: \"this\" refers to the options object\n\t\t\treturn this.parent.markdown(plainText);\n\t\t};\n\t}\n\n\n\t// Set default options for parsing config\n\toptions.parsingConfig = extend({\n\t\thighlightFormatting: true // needed for toggleCodeBlock to detect types of code\n\t}, options.parsingConfig || {});\n\n\n\t// Merging the insertTexts, with the given options\n\toptions.insertTexts = extend({}, insertTexts, options.insertTexts || {});\n\n\n\t// Merging the promptTexts, with the given options\n\toptions.promptTexts = promptTexts;\n\n\n\t// Merging the blockStyles, with the given options\n\toptions.blockStyles = extend({}, blockStyles, options.blockStyles || {});\n\n\n\t// Merging the shortcuts, with the given options\n\toptions.shortcuts = extend({}, shortcuts, options.shortcuts || {});\n\n\n\t// Change unique_id to uniqueId for backwards compatibility\n\tif(options.autosave != undefined && options.autosave.unique_id != undefined && options.autosave.unique_id != \"\")\n\t\toptions.autosave.uniqueId = options.autosave.unique_id;\n\n\n\t// Update this options\n\tthis.options = options;\n\n\n\t// Auto render\n\tthis.render();\n\n\n\t// The codemirror component is only available after rendering\n\t// so, the setter for the initialValue can only run after\n\t// the element has been rendered\n\tif(options.initialValue && (!this.options.autosave || this.options.autosave.foundSavedValue !== true)) {\n\t\tthis.value(options.initialValue);\n\t}\n}\n\n/**\n * Default markdown render.\n */\nSimpleMDE.prototype.markdown = function(text) {\n\tif(marked) {\n\t\t// Initialize\n\t\tvar markedOptions = {};\n\n\n\t\t// Update options\n\t\tif(this.options && this.options.renderingConfig && this.options.renderingConfig.singleLineBreaks === false) {\n\t\t\tmarkedOptions.breaks = false;\n\t\t} else {\n\t\t\tmarkedOptions.breaks = true;\n\t\t}\n\n\t\tif(this.options && this.options.renderingConfig && this.options.renderingConfig.codeSyntaxHighlighting === true && window.hljs) {\n\t\t\tmarkedOptions.highlight = function(code) {\n\t\t\t\treturn window.hljs.highlightAuto(code).value;\n\t\t\t};\n\t\t}\n\n\n\t\t// Set options\n\t\tmarked.setOptions(markedOptions);\n\n\n\t\t// Return\n\t\treturn marked(text);\n\t}\n};\n\n/**\n * Render editor to the given element.\n */\nSimpleMDE.prototype.render = function(el) {\n\tif(!el) {\n\t\tel = this.element || document.getElementsByTagName(\"textarea\")[0];\n\t}\n\n\tif(this._rendered && this._rendered === el) {\n\t\t// Already rendered.\n\t\treturn;\n\t}\n\n\tthis.element = el;\n\tvar options = this.options;\n\n\tvar self = this;\n\tvar keyMaps = {};\n\n\tfor(var key in options.shortcuts) {\n\t\t// null stands for \"do not bind this command\"\n\t\tif(options.shortcuts[key] !== null && bindings[key] !== null) {\n\t\t\t(function(key) {\n\t\t\t\tkeyMaps[fixShortcut(options.shortcuts[key])] = function() {\n\t\t\t\t\tbindings[key](self);\n\t\t\t\t};\n\t\t\t})(key);\n\t\t}\n\t}\n\n\tkeyMaps[\"Enter\"] = \"newlineAndIndentContinueMarkdownList\";\n\tkeyMaps[\"Tab\"] = \"tabAndIndentMarkdownList\";\n\tkeyMaps[\"Shift-Tab\"] = \"shiftTabAndUnindentMarkdownList\";\n\tkeyMaps[\"Esc\"] = function(cm) {\n\t\tif(cm.getOption(\"fullScreen\")) toggleFullScreen(self);\n\t};\n\n\tdocument.addEventListener(\"keydown\", function(e) {\n\t\te = e || window.event;\n\n\t\tif(e.keyCode == 27) {\n\t\t\tif(self.codemirror.getOption(\"fullScreen\")) toggleFullScreen(self);\n\t\t}\n\t}, false);\n\n\tvar mode, backdrop;\n\tif(options.spellChecker !== false) {\n\t\tmode = \"spell-checker\";\n\t\tbackdrop = options.parsingConfig;\n\t\tbackdrop.name = \"gfm\";\n\t\tbackdrop.gitHubSpice = false;\n\n\t\tCodeMirrorSpellChecker({\n\t\t\tcodeMirrorInstance: CodeMirror\n\t\t});\n\t} else {\n\t\tmode = options.parsingConfig;\n\t\tmode.name = \"gfm\";\n\t\tmode.gitHubSpice = false;\n\t}\n\n\tthis.codemirror = CodeMirror.fromTextArea(el, {\n\t\tmode: mode,\n\t\tbackdrop: backdrop,\n\t\ttheme: \"paper\",\n\t\ttabSize: (options.tabSize != undefined) ? options.tabSize : 2,\n\t\tindentUnit: (options.tabSize != undefined) ? options.tabSize : 2,\n\t\tindentWithTabs: (options.indentWithTabs === false) ? false : true,\n\t\tlineNumbers: false,\n\t\tautofocus: (options.autofocus === true) ? true : false,\n\t\textraKeys: keyMaps,\n\t\tlineWrapping: (options.lineWrapping === false) ? false : true,\n\t\tallowDropFileTypes: [\"text/plain\"],\n\t\tplaceholder: options.placeholder || el.getAttribute(\"placeholder\") || \"\",\n\t\tstyleSelectedText: (options.styleSelectedText != undefined) ? options.styleSelectedText : true\n\t});\n\n\tif(options.forceSync === true) {\n\t\tvar cm = this.codemirror;\n\t\tcm.on(\"change\", function() {\n\t\t\tcm.save();\n\t\t});\n\t}\n\n\tthis.gui = {};\n\n\tif(options.toolbar !== false) {\n\t\tthis.gui.toolbar = this.createToolbar();\n\t}\n\tif(options.status !== false) {\n\t\tthis.gui.statusbar = this.createStatusbar();\n\t}\n\tif(options.autosave != undefined && options.autosave.enabled === true) {\n\t\tthis.autosave();\n\t}\n\n\tthis.gui.sideBySide = this.createSideBySide();\n\n\tthis._rendered = this.element;\n\n\n\t// Fixes CodeMirror bug (#344)\n\tvar temp_cm = this.codemirror;\n\tsetTimeout(function() {\n\t\ttemp_cm.refresh();\n\t}.bind(temp_cm), 0);\n};\n\n// Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem throw QuotaExceededError. We're going to detect this and set a variable accordingly.\nfunction isLocalStorageAvailable() {\n\tif(typeof localStorage === \"object\") {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\"smde_localStorage\", 1);\n\t\t\tlocalStorage.removeItem(\"smde_localStorage\");\n\t\t} catch(e) {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nSimpleMDE.prototype.autosave = function() {\n\tif(isLocalStorageAvailable()) {\n\t\tvar simplemde = this;\n\n\t\tif(this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == \"\") {\n\t\t\tconsole.log(\"SimpleMDE: You must set a uniqueId to use the autosave feature\");\n\t\t\treturn;\n\t\t}\n\n\t\tif(simplemde.element.form != null && simplemde.element.form != undefined) {\n\t\t\tsimplemde.element.form.addEventListener(\"submit\", function() {\n\t\t\t\tlocalStorage.removeItem(\"smde_\" + simplemde.options.autosave.uniqueId);\n\t\t\t});\n\t\t}\n\n\t\tif(this.options.autosave.loaded !== true) {\n\t\t\tif(typeof localStorage.getItem(\"smde_\" + this.options.autosave.uniqueId) == \"string\" && localStorage.getItem(\"smde_\" + this.options.autosave.uniqueId) != \"\") {\n\t\t\t\tthis.codemirror.setValue(localStorage.getItem(\"smde_\" + this.options.autosave.uniqueId));\n\t\t\t\tthis.options.autosave.foundSavedValue = true;\n\t\t\t}\n\n\t\t\tthis.options.autosave.loaded = true;\n\t\t}\n\n\t\tlocalStorage.setItem(\"smde_\" + this.options.autosave.uniqueId, simplemde.value());\n\n\t\tvar el = document.getElementById(\"autosaved\");\n\t\tif(el != null && el != undefined && el != \"\") {\n\t\t\tvar d = new Date();\n\t\t\tvar hh = d.getHours();\n\t\t\tvar m = d.getMinutes();\n\t\t\tvar dd = \"am\";\n\t\t\tvar h = hh;\n\t\t\tif(h >= 12) {\n\t\t\t\th = hh - 12;\n\t\t\t\tdd = \"pm\";\n\t\t\t}\n\t\t\tif(h == 0) {\n\t\t\t\th = 12;\n\t\t\t}\n\t\t\tm = m < 10 ? \"0\" + m : m;\n\n\t\t\tel.innerHTML = \"Autosaved: \" + h + \":\" + m + \" \" + dd;\n\t\t}\n\n\t\tthis.autosaveTimeoutId = setTimeout(function() {\n\t\t\tsimplemde.autosave();\n\t\t}, this.options.autosave.delay || 10000);\n\t} else {\n\t\tconsole.log(\"SimpleMDE: localStorage not available, cannot autosave\");\n\t}\n};\n\nSimpleMDE.prototype.clearAutosavedValue = function() {\n\tif(isLocalStorageAvailable()) {\n\t\tif(this.options.autosave == undefined || this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == \"\") {\n\t\t\tconsole.log(\"SimpleMDE: You must set a uniqueId to clear the autosave value\");\n\t\t\treturn;\n\t\t}\n\n\t\tlocalStorage.removeItem(\"smde_\" + this.options.autosave.uniqueId);\n\t} else {\n\t\tconsole.log(\"SimpleMDE: localStorage not available, cannot autosave\");\n\t}\n};\n\nSimpleMDE.prototype.createSideBySide = function() {\n\tvar cm = this.codemirror;\n\tvar wrapper = cm.getWrapperElement();\n\tvar preview = wrapper.nextSibling;\n\n\tif(!preview || !/editor-preview-side/.test(preview.className)) {\n\t\tpreview = document.createElement(\"div\");\n\t\tpreview.className = \"editor-preview-side\";\n\t\twrapper.parentNode.insertBefore(preview, wrapper.nextSibling);\n\t}\n\n\t// Syncs scroll editor -> preview\n\tvar cScroll = false;\n\tvar pScroll = false;\n\tcm.on(\"scroll\", function(v) {\n\t\tif(cScroll) {\n\t\t\tcScroll = false;\n\t\t\treturn;\n\t\t}\n\t\tpScroll = true;\n\t\tvar height = v.getScrollInfo().height - v.getScrollInfo().clientHeight;\n\t\tvar ratio = parseFloat(v.getScrollInfo().top) / height;\n\t\tvar move = (preview.scrollHeight - preview.clientHeight) * ratio;\n\t\tpreview.scrollTop = move;\n\t});\n\n\t// Syncs scroll preview -> editor\n\tpreview.onscroll = function() {\n\t\tif(pScroll) {\n\t\t\tpScroll = false;\n\t\t\treturn;\n\t\t}\n\t\tcScroll = true;\n\t\tvar height = preview.scrollHeight - preview.clientHeight;\n\t\tvar ratio = parseFloat(preview.scrollTop) / height;\n\t\tvar move = (cm.getScrollInfo().height - cm.getScrollInfo().clientHeight) * ratio;\n\t\tcm.scrollTo(0, move);\n\t};\n\treturn preview;\n};\n\nSimpleMDE.prototype.createToolbar = function(items) {\n\titems = items || this.options.toolbar;\n\n\tif(!items || items.length === 0) {\n\t\treturn;\n\t}\n\tvar i;\n\tfor(i = 0; i < items.length; i++) {\n\t\tif(toolbarBuiltInButtons[items[i]] != undefined) {\n\t\t\titems[i] = toolbarBuiltInButtons[items[i]];\n\t\t}\n\t}\n\n\tvar bar = document.createElement(\"div\");\n\tbar.className = \"editor-toolbar\";\n\n\tvar self = this;\n\n\tvar toolbarData = {};\n\tself.toolbar = items;\n\n\tfor(i = 0; i < items.length; i++) {\n\t\tif(items[i].name == \"guide\" && self.options.toolbarGuideIcon === false)\n\t\t\tcontinue;\n\n\t\tif(self.options.hideIcons && self.options.hideIcons.indexOf(items[i].name) != -1)\n\t\t\tcontinue;\n\n\t\t// Fullscreen does not work well on mobile devices (even tablets)\n\t\t// In the future, hopefully this can be resolved\n\t\tif((items[i].name == \"fullscreen\" || items[i].name == \"side-by-side\") && isMobile())\n\t\t\tcontinue;\n\n\n\t\t// Don't include trailing separators\n\t\tif(items[i] === \"|\") {\n\t\t\tvar nonSeparatorIconsFollow = false;\n\n\t\t\tfor(var x = (i + 1); x < items.length; x++) {\n\t\t\t\tif(items[x] !== \"|\" && (!self.options.hideIcons || self.options.hideIcons.indexOf(items[x].name) == -1)) {\n\t\t\t\t\tnonSeparatorIconsFollow = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!nonSeparatorIconsFollow)\n\t\t\t\tcontinue;\n\t\t}\n\n\n\t\t// Create the icon and append to the toolbar\n\t\t(function(item) {\n\t\t\tvar el;\n\t\t\tif(item === \"|\") {\n\t\t\t\tel = createSep();\n\t\t\t} else {\n\t\t\t\tel = createIcon(item, self.options.toolbarTips, self.options.shortcuts);\n\t\t\t}\n\n\t\t\t// bind events, special for info\n\t\t\tif(item.action) {\n\t\t\t\tif(typeof item.action === \"function\") {\n\t\t\t\t\tel.onclick = function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\titem.action(self);\n\t\t\t\t\t};\n\t\t\t\t} else if(typeof item.action === \"string\") {\n\t\t\t\t\tel.href = item.action;\n\t\t\t\t\tel.target = \"_blank\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttoolbarData[item.name || item] = el;\n\t\t\tbar.appendChild(el);\n\t\t})(items[i]);\n\t}\n\n\tself.toolbarElements = toolbarData;\n\n\tvar cm = this.codemirror;\n\tcm.on(\"cursorActivity\", function() {\n\t\tvar stat = getState(cm);\n\n\t\tfor(var key in toolbarData) {\n\t\t\t(function(key) {\n\t\t\t\tvar el = toolbarData[key];\n\t\t\t\tif(stat[key]) {\n\t\t\t\t\tel.className += \" active\";\n\t\t\t\t} else if(key != \"fullscreen\" && key != \"side-by-side\") {\n\t\t\t\t\tel.className = el.className.replace(/\\s*active\\s*/g, \"\");\n\t\t\t\t}\n\t\t\t})(key);\n\t\t}\n\t});\n\n\tvar cmWrapper = cm.getWrapperElement();\n\tcmWrapper.parentNode.insertBefore(bar, cmWrapper);\n\treturn bar;\n};\n\nSimpleMDE.prototype.createStatusbar = function(status) {\n\t// Initialize\n\tstatus = status || this.options.status;\n\tvar options = this.options;\n\tvar cm = this.codemirror;\n\n\n\t// Make sure the status variable is valid\n\tif(!status || status.length === 0)\n\t\treturn;\n\n\n\t// Set up the built-in items\n\tvar items = [];\n\tvar i, onUpdate, defaultValue;\n\n\tfor(i = 0; i < status.length; i++) {\n\t\t// Reset some values\n\t\tonUpdate = undefined;\n\t\tdefaultValue = undefined;\n\n\n\t\t// Handle if custom or not\n\t\tif(typeof status[i] === \"object\") {\n\t\t\titems.push({\n\t\t\t\tclassName: status[i].className,\n\t\t\t\tdefaultValue: status[i].defaultValue,\n\t\t\t\tonUpdate: status[i].onUpdate\n\t\t\t});\n\t\t} else {\n\t\t\tvar name = status[i];\n\n\t\t\tif(name === \"words\") {\n\t\t\t\tdefaultValue = function(el) {\n\t\t\t\t\tel.innerHTML = wordCount(cm.getValue());\n\t\t\t\t};\n\t\t\t\tonUpdate = function(el) {\n\t\t\t\t\tel.innerHTML = wordCount(cm.getValue());\n\t\t\t\t};\n\t\t\t} else if(name === \"lines\") {\n\t\t\t\tdefaultValue = function(el) {\n\t\t\t\t\tel.innerHTML = cm.lineCount();\n\t\t\t\t};\n\t\t\t\tonUpdate = function(el) {\n\t\t\t\t\tel.innerHTML = cm.lineCount();\n\t\t\t\t};\n\t\t\t} else if(name === \"cursor\") {\n\t\t\t\tdefaultValue = function(el) {\n\t\t\t\t\tel.innerHTML = \"0:0\";\n\t\t\t\t};\n\t\t\t\tonUpdate = function(el) {\n\t\t\t\t\tvar pos = cm.getCursor();\n\t\t\t\t\tel.innerHTML = pos.line + \":\" + pos.ch;\n\t\t\t\t};\n\t\t\t} else if(name === \"autosave\") {\n\t\t\t\tdefaultValue = function(el) {\n\t\t\t\t\tif(options.autosave != undefined && options.autosave.enabled === true) {\n\t\t\t\t\t\tel.setAttribute(\"id\", \"autosaved\");\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\titems.push({\n\t\t\t\tclassName: name,\n\t\t\t\tdefaultValue: defaultValue,\n\t\t\t\tonUpdate: onUpdate\n\t\t\t});\n\t\t}\n\t}\n\n\n\t// Create element for the status bar\n\tvar bar = document.createElement(\"div\");\n\tbar.className = \"editor-statusbar\";\n\n\n\t// Create a new span for each item\n\tfor(i = 0; i < items.length; i++) {\n\t\t// Store in temporary variable\n\t\tvar item = items[i];\n\n\n\t\t// Create span element\n\t\tvar el = document.createElement(\"span\");\n\t\tel.className = item.className;\n\n\n\t\t// Ensure the defaultValue is a function\n\t\tif(typeof item.defaultValue === \"function\") {\n\t\t\titem.defaultValue(el);\n\t\t}\n\n\n\t\t// Ensure the onUpdate is a function\n\t\tif(typeof item.onUpdate === \"function\") {\n\t\t\t// Create a closure around the span of the current action, then execute the onUpdate handler\n\t\t\tthis.codemirror.on(\"update\", (function(el, item) {\n\t\t\t\treturn function() {\n\t\t\t\t\titem.onUpdate(el);\n\t\t\t\t};\n\t\t\t}(el, item)));\n\t\t}\n\n\n\t\t// Append the item to the status bar\n\t\tbar.appendChild(el);\n\t}\n\n\n\t// Insert the status bar into the DOM\n\tvar cmWrapper = this.codemirror.getWrapperElement();\n\tcmWrapper.parentNode.insertBefore(bar, cmWrapper.nextSibling);\n\treturn bar;\n};\n\n/**\n * Get or set the text content.\n */\nSimpleMDE.prototype.value = function(val) {\n\tif(val === undefined) {\n\t\treturn this.codemirror.getValue();\n\t} else {\n\t\tthis.codemirror.getDoc().setValue(val);\n\t\treturn this;\n\t}\n};\n\n\n/**\n * Bind static methods for exports.\n */\nSimpleMDE.toggleBold = toggleBold;\nSimpleMDE.toggleItalic = toggleItalic;\nSimpleMDE.toggleStrikethrough = toggleStrikethrough;\nSimpleMDE.toggleBlockquote = toggleBlockquote;\nSimpleMDE.toggleHeadingSmaller = toggleHeadingSmaller;\nSimpleMDE.toggleHeadingBigger = toggleHeadingBigger;\nSimpleMDE.toggleHeading1 = toggleHeading1;\nSimpleMDE.toggleHeading2 = toggleHeading2;\nSimpleMDE.toggleHeading3 = toggleHeading3;\nSimpleMDE.toggleCodeBlock = toggleCodeBlock;\nSimpleMDE.toggleUnorderedList = toggleUnorderedList;\nSimpleMDE.toggleOrderedList = toggleOrderedList;\nSimpleMDE.cleanBlock = cleanBlock;\nSimpleMDE.drawLink = drawLink;\nSimpleMDE.drawImage = drawImage;\nSimpleMDE.drawTable = drawTable;\nSimpleMDE.drawHorizontalRule = drawHorizontalRule;\nSimpleMDE.undo = undo;\nSimpleMDE.redo = redo;\nSimpleMDE.togglePreview = togglePreview;\nSimpleMDE.toggleSideBySide = toggleSideBySide;\nSimpleMDE.toggleFullScreen = toggleFullScreen;\n\n/**\n * Bind instance methods for exports.\n */\nSimpleMDE.prototype.toggleBold = function() {\n\ttoggleBold(this);\n};\nSimpleMDE.prototype.toggleItalic = function() {\n\ttoggleItalic(this);\n};\nSimpleMDE.prototype.toggleStrikethrough = function() {\n\ttoggleStrikethrough(this);\n};\nSimpleMDE.prototype.toggleBlockquote = function() {\n\ttoggleBlockquote(this);\n};\nSimpleMDE.prototype.toggleHeadingSmaller = function() {\n\ttoggleHeadingSmaller(this);\n};\nSimpleMDE.prototype.toggleHeadingBigger = function() {\n\ttoggleHeadingBigger(this);\n};\nSimpleMDE.prototype.toggleHeading1 = function() {\n\ttoggleHeading1(this);\n};\nSimpleMDE.prototype.toggleHeading2 = function() {\n\ttoggleHeading2(this);\n};\nSimpleMDE.prototype.toggleHeading3 = function() {\n\ttoggleHeading3(this);\n};\nSimpleMDE.prototype.toggleCodeBlock = function() {\n\ttoggleCodeBlock(this);\n};\nSimpleMDE.prototype.toggleUnorderedList = function() {\n\ttoggleUnorderedList(this);\n};\nSimpleMDE.prototype.toggleOrderedList = function() {\n\ttoggleOrderedList(this);\n};\nSimpleMDE.prototype.cleanBlock = function() {\n\tcleanBlock(this);\n};\nSimpleMDE.prototype.drawLink = function() {\n\tdrawLink(this);\n};\nSimpleMDE.prototype.drawImage = function() {\n\tdrawImage(this);\n};\nSimpleMDE.prototype.drawTable = function() {\n\tdrawTable(this);\n};\nSimpleMDE.prototype.drawHorizontalRule = function() {\n\tdrawHorizontalRule(this);\n};\nSimpleMDE.prototype.undo = function() {\n\tundo(this);\n};\nSimpleMDE.prototype.redo = function() {\n\tredo(this);\n};\nSimpleMDE.prototype.togglePreview = function() {\n\ttogglePreview(this);\n};\nSimpleMDE.prototype.toggleSideBySide = function() {\n\ttoggleSideBySide(this);\n};\nSimpleMDE.prototype.toggleFullScreen = function() {\n\ttoggleFullScreen(this);\n};\n\nSimpleMDE.prototype.isPreviewActive = function() {\n\tvar cm = this.codemirror;\n\tvar wrapper = cm.getWrapperElement();\n\tvar preview = wrapper.lastChild;\n\n\treturn /editor-preview-active/.test(preview.className);\n};\n\nSimpleMDE.prototype.isSideBySideActive = function() {\n\tvar cm = this.codemirror;\n\tvar wrapper = cm.getWrapperElement();\n\tvar preview = wrapper.nextSibling;\n\n\treturn /editor-preview-active-side/.test(preview.className);\n};\n\nSimpleMDE.prototype.isFullscreenActive = function() {\n\tvar cm = this.codemirror;\n\n\treturn cm.getOption(\"fullScreen\");\n};\n\nSimpleMDE.prototype.getState = function() {\n\tvar cm = this.codemirror;\n\n\treturn getState(cm);\n};\n\nSimpleMDE.prototype.toTextArea = function() {\n\tvar cm = this.codemirror;\n\tvar wrapper = cm.getWrapperElement();\n\n\tif(wrapper.parentNode) {\n\t\tif(this.gui.toolbar) {\n\t\t\twrapper.parentNode.removeChild(this.gui.toolbar);\n\t\t}\n\t\tif(this.gui.statusbar) {\n\t\t\twrapper.parentNode.removeChild(this.gui.statusbar);\n\t\t}\n\t\tif(this.gui.sideBySide) {\n\t\t\twrapper.parentNode.removeChild(this.gui.sideBySide);\n\t\t}\n\t}\n\n\tcm.toTextArea();\n\n\tif(this.autosaveTimeoutId) {\n\t\tclearTimeout(this.autosaveTimeoutId);\n\t\tthis.autosaveTimeoutId = undefined;\n\t\tthis.clearAutosavedValue();\n\t}\n};\n\nmodule.exports = SimpleMDE;","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Dropzone\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"Dropzone\"] = factory(root[\"react\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 65eb4442d565fc2a5c80","/* eslint prefer-template: 0 */\nimport React from 'react';\nimport accepts from 'attr-accept';\nimport getDataTransferItems from './getDataTransferItems';\n\nconst supportMultiple = (typeof document !== 'undefined' && document && document.createElement) ?\n 'multiple' in document.createElement('input') :\n true;\n\nclass Dropzone extends React.Component {\n static renderChildren(children, isDragActive, isDragReject) {\n if (typeof children === 'function') {\n return children({ isDragActive, isDragReject });\n }\n return children;\n }\n\n constructor(props, context) {\n super(props, context);\n this.onClick = this.onClick.bind(this);\n this.onDragStart = this.onDragStart.bind(this);\n this.onDragEnter = this.onDragEnter.bind(this);\n this.onDragLeave = this.onDragLeave.bind(this);\n this.onDragOver = this.onDragOver.bind(this);\n this.onDrop = this.onDrop.bind(this);\n this.onFileDialogCancel = this.onFileDialogCancel.bind(this);\n this.fileAccepted = this.fileAccepted.bind(this);\n this.isFileDialogActive = false;\n this.state = {\n isDragActive: false\n };\n }\n\n componentDidMount() {\n this.enterCounter = 0;\n // Tried implementing addEventListener, but didn't work out\n document.body.onfocus = this.onFileDialogCancel;\n }\n\n componentWillUnmount() {\n // Can be replaced with removeEventListener, if addEventListener works\n document.body.onfocus = null;\n }\n\n onDragStart(e) {\n if (this.props.onDragStart) {\n this.props.onDragStart.call(this, e);\n }\n }\n\n onDragEnter(e) {\n e.preventDefault();\n\n // Count the dropzone and any children that are entered.\n ++this.enterCounter;\n\n const allFilesAccepted = this.allFilesAccepted(getDataTransferItems(e, this.props.multiple));\n\n this.setState({\n isDragActive: allFilesAccepted,\n isDragReject: !allFilesAccepted\n });\n\n if (this.props.onDragEnter) {\n this.props.onDragEnter.call(this, e);\n }\n }\n\n onDragOver(e) { // eslint-disable-line class-methods-use-this\n e.preventDefault();\n e.stopPropagation();\n try {\n e.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign\n } catch (err) {\n // continue regardless of error\n }\n\n if (this.props.onDragOver) {\n this.props.onDragOver.call(this, e);\n }\n return false;\n }\n\n onDragLeave(e) {\n e.preventDefault();\n\n // Only deactivate once the dropzone and all children was left.\n if (--this.enterCounter > 0) {\n return;\n }\n\n this.setState({\n isDragActive: false,\n isDragReject: false\n });\n\n if (this.props.onDragLeave) {\n this.props.onDragLeave.call(this, e);\n }\n }\n\n onDrop(e) {\n const { onDrop, onDropAccepted, onDropRejected, multiple, disablePreview } = this.props;\n const fileList = getDataTransferItems(e, multiple);\n const acceptedFiles = [];\n const rejectedFiles = [];\n\n // Stop default browser behavior\n e.preventDefault();\n\n // Reset the counter along with the drag on a drop.\n this.enterCounter = 0;\n this.isFileDialogActive = false;\n\n fileList.forEach((file) => {\n if (!disablePreview) {\n file.preview = window.URL.createObjectURL(file); // eslint-disable-line no-param-reassign\n }\n\n if (this.fileAccepted(file) && this.fileMatchSize(file)) {\n acceptedFiles.push(file);\n } else {\n rejectedFiles.push(file);\n }\n });\n\n if (onDrop) {\n onDrop.call(this, acceptedFiles, rejectedFiles, e);\n }\n\n if (rejectedFiles.length > 0 && onDropRejected) {\n onDropRejected.call(this, rejectedFiles, e);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted.call(this, acceptedFiles, e);\n }\n\n // Reset drag state\n this.setState({\n isDragActive: false,\n isDragReject: false\n });\n }\n\n onClick(e) {\n const { onClick, disableClick } = this.props;\n if (!disableClick) {\n e.stopPropagation();\n this.open();\n if (onClick) {\n onClick.call(this, e);\n }\n }\n }\n\n onFileDialogCancel() {\n // timeout will not recognize context of this method\n const { onFileDialogCancel } = this.props;\n const { fileInputEl } = this;\n let { isFileDialogActive } = this;\n // execute the timeout only if the onFileDialogCancel is defined and FileDialog\n // is opened in the browser\n if (onFileDialogCancel && isFileDialogActive) {\n setTimeout(() => {\n // Returns an object as FileList\n const FileList = fileInputEl.files;\n if (!FileList.length) {\n isFileDialogActive = false;\n onFileDialogCancel();\n }\n }, 300);\n }\n }\n\n fileAccepted(file) {\n return accepts(file, this.props.accept);\n }\n\n fileMatchSize(file) {\n return file.size <= this.props.maxSize && file.size >= this.props.minSize;\n }\n\n allFilesAccepted(files) {\n return files.every(this.fileAccepted);\n }\n\n open() {\n this.isFileDialogActive = true;\n this.fileInputEl.value = null;\n this.fileInputEl.click();\n }\n\n render() {\n const {\n accept,\n activeClassName,\n inputProps,\n multiple,\n name,\n rejectClassName,\n children,\n ...rest\n } = this.props;\n\n let {\n activeStyle,\n className,\n rejectStyle,\n style,\n ...props // eslint-disable-line prefer-const\n } = rest;\n\n const { isDragActive, isDragReject } = this.state;\n\n className = className || '';\n\n if (isDragActive && activeClassName) {\n className += ' ' + activeClassName;\n }\n if (isDragReject && rejectClassName) {\n className += ' ' + rejectClassName;\n }\n\n if (!className && !style && !activeStyle && !rejectStyle) {\n style = {\n width: 200,\n height: 200,\n borderWidth: 2,\n borderColor: '#666',\n borderStyle: 'dashed',\n borderRadius: 5\n };\n activeStyle = {\n borderStyle: 'solid',\n backgroundColor: '#eee'\n };\n rejectStyle = {\n borderStyle: 'solid',\n backgroundColor: '#ffdddd'\n };\n }\n\n let appliedStyle;\n if (activeStyle && isDragActive) {\n appliedStyle = {\n ...style,\n ...activeStyle\n };\n } else if (rejectStyle && isDragReject) {\n appliedStyle = {\n ...style,\n ...rejectStyle\n };\n } else {\n appliedStyle = {\n ...style\n };\n }\n\n const inputAttributes = {\n accept,\n type: 'file',\n style: { display: 'none' },\n multiple: supportMultiple && multiple,\n ref: el => this.fileInputEl = el, // eslint-disable-line\n onChange: this.onDrop\n };\n\n if (name && name.length) {\n inputAttributes.name = name;\n }\n\n // Remove custom properties before passing them to the wrapper div element\n const customProps = [\n 'acceptedFiles',\n 'disablePreview',\n 'disableClick',\n 'onDropAccepted',\n 'onDropRejected',\n 'onFileDialogCancel',\n 'maxSize',\n 'minSize'\n ];\n const divProps = { ...props };\n customProps.forEach(prop => delete divProps[prop]);\n\n return (\n <div\n className={className}\n style={appliedStyle}\n {...divProps/* expand user provided props first so event handlers are never overridden */}\n onClick={this.onClick}\n onDragStart={this.onDragStart}\n onDragEnter={this.onDragEnter}\n onDragOver={this.onDragOver}\n onDragLeave={this.onDragLeave}\n onDrop={this.onDrop}\n >\n {Dropzone.renderChildren(children, isDragActive, isDragReject)}\n <input\n {...inputProps/* expand user provided inputProps first so inputAttributes override them */}\n {...inputAttributes}\n />\n </div>\n );\n }\n}\n\nDropzone.defaultProps = {\n disablePreview: false,\n disableClick: false,\n multiple: true,\n maxSize: Infinity,\n minSize: 0\n};\n\nDropzone.propTypes = {\n onClick: React.PropTypes.func,\n onDrop: React.PropTypes.func,\n onDropAccepted: React.PropTypes.func,\n onDropRejected: React.PropTypes.func,\n onDragStart: React.PropTypes.func,\n onDragEnter: React.PropTypes.func,\n onDragOver: React.PropTypes.func,\n onDragLeave: React.PropTypes.func,\n\n children: React.PropTypes.oneOfType([\n React.PropTypes.node,\n React.PropTypes.func\n ]), // Contents of the dropzone\n style: React.PropTypes.object, // CSS styles to apply\n activeStyle: React.PropTypes.object, // CSS styles to apply when drop will be accepted\n rejectStyle: React.PropTypes.object, // CSS styles to apply when drop will be rejected\n className: React.PropTypes.string, // Optional className\n activeClassName: React.PropTypes.string, // className for accepted state\n rejectClassName: React.PropTypes.string, // className for rejected state\n\n disablePreview: React.PropTypes.bool, // Enable/disable preview generation\n disableClick: React.PropTypes.bool, // Disallow clicking on the dropzone container to open file dialog\n onFileDialogCancel: React.PropTypes.func, // Provide a callback on clicking the cancel button of the file dialog\n\n inputProps: React.PropTypes.object, // Pass additional attributes to the <input type=\"file\"/> tag\n multiple: React.PropTypes.bool, // Allow dropping multiple files\n accept: React.PropTypes.string, // Allow specific types of files. See https://github.com/okonet/attr-accept for more information\n name: React.PropTypes.string, // name attribute for the input tag\n maxSize: React.PropTypes.number,\n minSize: React.PropTypes.number\n};\n\nexport default Dropzone;\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0","module.exports=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p=\"\",n(0)}([function(t,n,r){\"use strict\";n.__esModule=!0,r(8),r(9),n[\"default\"]=function(t,n){if(t&&n){var r=function(){var r=Array.isArray(n)?n:n.split(\",\"),e=t.name||\"\",o=t.type||\"\",i=o.replace(/\\/.*$/,\"\");return{v:r.some(function(t){var n=t.trim();return\".\"===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):/\\/\\*$/.test(n)?i===n.replace(/\\/.*$/,\"\"):o===n})}}();if(\"object\"==typeof r)return r.v}return!0},t.exports=n[\"default\"]},function(t,n){var r=t.exports={version:\"1.2.2\"};\"number\"==typeof __e&&(__e=r)},function(t,n){var r=t.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=r)},function(t,n,r){var e=r(2),o=r(1),i=r(4),u=r(19),c=\"prototype\",f=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,r){var a,p,l,y,d=t&s.G,h=t&s.P,v=d?e:t&s.S?e[n]||(e[n]={}):(e[n]||{})[c],x=d?o:o[n]||(o[n]={});d&&(r=n);for(a in r)p=!(t&s.F)&&v&&a in v,l=(p?v:r)[a],y=t&s.B&&p?f(l,e):h&&\"function\"==typeof l?f(Function.call,l):l,v&&!p&&u(v,a,l),x[a]!=l&&i(x,a,y),h&&((x[c]||(x[c]={}))[a]=l)};e.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n,r){var e=r(5),o=r(18);t.exports=r(22)?function(t,n,r){return e.setDesc(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return\"Symbol(\".concat(void 0===t?\"\":t,\")_\",(++r+e).toString(36))}},function(t,n,r){var e=r(20)(\"wks\"),o=r(2).Symbol;t.exports=function(t){return e[t]||(e[t]=o&&o[t]||(o||r(6))(\"Symbol.\"+t))}},function(t,n,r){r(26),t.exports=r(1).Array.some},function(t,n,r){r(25),t.exports=r(1).String.endsWith},function(t,n){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(t+\" is not a function!\");return t}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(10);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n,r){t.exports=function(t){var n=/./;try{\"/./\"[t](n)}catch(e){try{return n[r(7)(\"match\")]=!1,!\"/./\"[t](n)}catch(o){}}return!0}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,n,r){var e=r(16),o=r(11),i=r(7)(\"match\");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:\"RegExp\"==o(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(2),o=r(4),i=r(6)(\"src\"),u=\"toString\",c=Function[u],f=(\"\"+c).split(u);r(1).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,u){\"function\"==typeof r&&(o(r,i,t[n]?\"\"+t[n]:f.join(String(n))),\"name\"in r||(r.name=n)),t===e?t[n]=r:(u||delete t[n],o(t,n,r))})(Function.prototype,u,function(){return\"function\"==typeof this&&this[i]||c.call(this)})},function(t,n,r){var e=r(2),o=\"__core-js_shared__\",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(17),o=r(13);t.exports=function(t,n,r){if(e(n))throw TypeError(\"String#\"+r+\" doesn't accept regex!\");return String(o(t))}},function(t,n,r){t.exports=!r(15)(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(23),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){\"use strict\";var e=r(3),o=r(24),i=r(21),u=\"endsWith\",c=\"\"[u];e(e.P+e.F*r(14)(u),\"String\",{endsWith:function(t){var n=i(this,t,u),r=arguments,e=r.length>1?r[1]:void 0,f=o(n.length),s=void 0===e?f:Math.min(o(e),f),a=String(t);return c?c.call(n,a,s):n.slice(s-a.length,s)===a}})},function(t,n,r){var e=r(5),o=r(3),i=r(1).Array||Array,u={},c=function(t,n){e.each.call(t.split(\",\"),function(t){void 0==n&&t in i?u[t]=i[t]:t in[]&&(u[t]=r(12)(Function.call,[][t],n))})};c(\"pop,reverse,shift,keys,values,entries\",1),c(\"indexOf,every,some,forEach,map,filter,find,findIndex,includes\",3),c(\"join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill\"),o(o.S,\"Array\",u)}]);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/attr-accept/dist/index.js\n// module id = 2\n// module chunks = 0","export default function getDataTransferFiles(event, isMultipleAllowed = true) {\n let dataTransferItemsList = [];\n if (event.dataTransfer) {\n const dt = event.dataTransfer;\n if (dt.files && dt.files.length) {\n dataTransferItemsList = dt.files;\n } else if (dt.items && dt.items.length) {\n // During the drag even the dataTransfer.files is null\n // but Chrome implements some drag store, which is accesible via dataTransfer.items\n dataTransferItemsList = dt.items;\n }\n } else if (event.target && event.target.files) {\n dataTransferItemsList = event.target.files;\n }\n\n if (dataTransferItemsList.length > 0) {\n dataTransferItemsList = isMultipleAllowed ? dataTransferItemsList : [dataTransferItemsList[0]];\n }\n\n // Convert from DataTransferItemsList to the native Array\n return Array.prototype.slice.call(dataTransferItemsList);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/getDataTransferItems.js","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports['default'] = immutableStateInvariantMiddleware;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _jsonStringifySafe = require('json-stringify-safe');\n\nvar _jsonStringifySafe2 = _interopRequireDefault(_jsonStringifySafe);\n\nvar _isImmutable = require('./isImmutable');\n\nvar _isImmutable2 = _interopRequireDefault(_isImmutable);\n\nvar _trackForMutations = require('./trackForMutations');\n\nvar _trackForMutations2 = _interopRequireDefault(_trackForMutations);\n\nvar BETWEEN_DISPATCHES_MESSAGE = ['A state mutation was detected between dispatches, in the path `%s`.', 'This may cause incorrect behavior.', '(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)'].join(' ');\n\nvar INSIDE_DISPATCH_MESSAGE = ['A state mutation was detected inside a dispatch, in the path: `%s`.', 'Take a look at the reducer(s) handling the action %s.', '(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)'].join(' ');\n\nfunction immutableStateInvariantMiddleware() {\n var isImmutable = arguments.length <= 0 || arguments[0] === undefined ? _isImmutable2['default'] : arguments[0];\n\n var track = _trackForMutations2['default'].bind(null, isImmutable);\n\n return function (_ref) {\n var getState = _ref.getState;\n\n var state = getState();\n var tracker = track(state);\n\n var result = undefined;\n return function (next) {\n return function (action) {\n state = getState();\n\n result = tracker.detectMutations();\n // Track before potentially not meeting the invariant\n tracker = track(state);\n\n (0, _invariant2['default'])(!result.wasMutated, BETWEEN_DISPATCHES_MESSAGE, (result.path || []).join('.'));\n\n var dispatchedAction = next(action);\n state = getState();\n\n result = tracker.detectMutations();\n // Track before potentially not meeting the invariant\n tracker = track(state);\n\n (0, _invariant2['default'])(!result.wasMutated, INSIDE_DISPATCH_MESSAGE, (result.path || []).join('.'), (0, _jsonStringifySafe2['default'])(action));\n\n return dispatchedAction;\n };\n };\n };\n}\n\nmodule.exports = exports['default'];","\"use strict\";\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _typeof(obj) { return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; }\n\nvar repeat = function repeat(str, times) {\n return new Array(times + 1).join(str);\n};\nvar pad = function pad(num, maxLength) {\n return repeat(\"0\", maxLength - num.toString().length) + num;\n};\nvar formatTime = function formatTime(time) {\n return \"@ \" + pad(time.getHours(), 2) + \":\" + pad(time.getMinutes(), 2) + \":\" + pad(time.getSeconds(), 2) + \".\" + pad(time.getMilliseconds(), 3);\n};\n\n// Use the new performance api to get better precision if available\nvar timer = typeof performance !== \"undefined\" && typeof performance.now === \"function\" ? performance : Date;\n\n/**\n * parse the level option of createLogger\n *\n * @property {string | function | object} level - console[level]\n * @property {object} action\n * @property {array} payload\n * @property {string} type\n */\n\nfunction getLogLevel(level, action, payload, type) {\n switch (typeof level === \"undefined\" ? \"undefined\" : _typeof(level)) {\n case \"object\":\n return typeof level[type] === \"function\" ? level[type].apply(level, _toConsumableArray(payload)) : level[type];\n case \"function\":\n return level(action);\n default:\n return level;\n }\n}\n\n/**\n * Creates logger with followed options\n *\n * @namespace\n * @property {object} options - options for logger\n * @property {string | function | object} options.level - console[level]\n * @property {boolean} options.duration - print duration of each action?\n * @property {boolean} options.timestamp - print timestamp with each action?\n * @property {object} options.colors - custom colors\n * @property {object} options.logger - implementation of the `console` API\n * @property {boolean} options.logErrors - should errors in action execution be caught, logged, and re-thrown?\n * @property {boolean} options.collapsed - is group collapsed?\n * @property {boolean} options.predicate - condition which resolves logger behavior\n * @property {function} options.stateTransformer - transform state before print\n * @property {function} options.actionTransformer - transform action before print\n * @property {function} options.errorTransformer - transform error before print\n */\n\nfunction createLogger() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n var _options$level = options.level;\n var level = _options$level === undefined ? \"log\" : _options$level;\n var _options$logger = options.logger;\n var logger = _options$logger === undefined ? console : _options$logger;\n var _options$logErrors = options.logErrors;\n var logErrors = _options$logErrors === undefined ? true : _options$logErrors;\n var collapsed = options.collapsed;\n var predicate = options.predicate;\n var _options$duration = options.duration;\n var duration = _options$duration === undefined ? false : _options$duration;\n var _options$timestamp = options.timestamp;\n var timestamp = _options$timestamp === undefined ? true : _options$timestamp;\n var transformer = options.transformer;\n var _options$stateTransfo = options.stateTransformer;\n var // deprecated\n stateTransformer = _options$stateTransfo === undefined ? function (state) {\n return state;\n } : _options$stateTransfo;\n var _options$actionTransf = options.actionTransformer;\n var actionTransformer = _options$actionTransf === undefined ? function (actn) {\n return actn;\n } : _options$actionTransf;\n var _options$errorTransfo = options.errorTransformer;\n var errorTransformer = _options$errorTransfo === undefined ? function (error) {\n return error;\n } : _options$errorTransfo;\n var _options$colors = options.colors;\n var colors = _options$colors === undefined ? {\n title: function title() {\n return \"#000000\";\n },\n prevState: function prevState() {\n return \"#9E9E9E\";\n },\n action: function action() {\n return \"#03A9F4\";\n },\n nextState: function nextState() {\n return \"#4CAF50\";\n },\n error: function error() {\n return \"#F20404\";\n }\n } : _options$colors;\n\n // exit if console undefined\n\n if (typeof logger === \"undefined\") {\n return function () {\n return function (next) {\n return function (action) {\n return next(action);\n };\n };\n };\n }\n\n if (transformer) {\n console.error(\"Option 'transformer' is deprecated, use stateTransformer instead\");\n }\n\n var logBuffer = [];\n function printBuffer() {\n logBuffer.forEach(function (logEntry, key) {\n var started = logEntry.started;\n var startedTime = logEntry.startedTime;\n var action = logEntry.action;\n var prevState = logEntry.prevState;\n var error = logEntry.error;\n var took = logEntry.took;\n var nextState = logEntry.nextState;\n\n var nextEntry = logBuffer[key + 1];\n if (nextEntry) {\n nextState = nextEntry.prevState;\n took = nextEntry.started - started;\n }\n // message\n var formattedAction = actionTransformer(action);\n var isCollapsed = typeof collapsed === \"function\" ? collapsed(function () {\n return nextState;\n }, action) : collapsed;\n\n var formattedTime = formatTime(startedTime);\n var titleCSS = colors.title ? \"color: \" + colors.title(formattedAction) + \";\" : null;\n var title = \"action \" + (timestamp ? formattedTime : \"\") + \" \" + formattedAction.type + \" \" + (duration ? \"(in \" + took.toFixed(2) + \" ms)\" : \"\");\n\n // render\n try {\n if (isCollapsed) {\n if (colors.title) logger.groupCollapsed(\"%c \" + title, titleCSS);else logger.groupCollapsed(title);\n } else {\n if (colors.title) logger.group(\"%c \" + title, titleCSS);else logger.group(title);\n }\n } catch (e) {\n logger.log(title);\n }\n\n var prevStateLevel = getLogLevel(level, formattedAction, [prevState], \"prevState\");\n var actionLevel = getLogLevel(level, formattedAction, [formattedAction], \"action\");\n var errorLevel = getLogLevel(level, formattedAction, [error, prevState], \"error\");\n var nextStateLevel = getLogLevel(level, formattedAction, [nextState], \"nextState\");\n\n if (prevStateLevel) {\n if (colors.prevState) logger[prevStateLevel](\"%c prev state\", \"color: \" + colors.prevState(prevState) + \"; font-weight: bold\", prevState);else logger[prevStateLevel](\"prev state\", prevState);\n }\n\n if (actionLevel) {\n if (colors.action) logger[actionLevel](\"%c action\", \"color: \" + colors.action(formattedAction) + \"; font-weight: bold\", formattedAction);else logger[actionLevel](\"action\", formattedAction);\n }\n\n if (error && errorLevel) {\n if (colors.error) logger[errorLevel](\"%c error\", \"color: \" + colors.error(error, prevState) + \"; font-weight: bold\", error);else logger[errorLevel](\"error\", error);\n }\n\n if (nextStateLevel) {\n if (colors.nextState) logger[nextStateLevel](\"%c next state\", \"color: \" + colors.nextState(nextState) + \"; font-weight: bold\", nextState);else logger[nextStateLevel](\"next state\", nextState);\n }\n\n try {\n logger.groupEnd();\n } catch (e) {\n logger.log(\"—— log end ——\");\n }\n });\n logBuffer.length = 0;\n }\n\n return function (_ref) {\n var getState = _ref.getState;\n return function (next) {\n return function (action) {\n // exit early if predicate function returns false\n if (typeof predicate === \"function\" && !predicate(getState, action)) {\n return next(action);\n }\n\n var logEntry = {};\n logBuffer.push(logEntry);\n\n logEntry.started = timer.now();\n logEntry.startedTime = new Date();\n logEntry.prevState = stateTransformer(getState());\n logEntry.action = action;\n\n var returnedValue = undefined;\n if (logErrors) {\n try {\n returnedValue = next(action);\n } catch (e) {\n logEntry.error = errorTransformer(e);\n }\n } else {\n returnedValue = next(action);\n }\n\n logEntry.took = timer.now() - logEntry.started;\n logEntry.nextState = stateTransformer(getState());\n\n printBuffer();\n\n if (logEntry.error) throw logEntry.error;\n return returnedValue;\n };\n };\n };\n}\n\nmodule.exports = createLogger;","import setPrototypeOf from \"./setPrototypeOf\";\n\nfunction isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nimport setPrototypeOf from \"./setPrototypeOf\";\nimport isNativeFunction from \"./isNativeFunction\";\nimport construct from \"./construct\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}","export default function _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar PooledClass = require('./PooledClass');\nvar ReactElement = require('./ReactElement');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar traverseAllChildren = require('./traverseAllChildren');\n\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\nvar fourArgumentPooler = PooledClass.fourArgumentPooler;\n\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n}\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * traversal. Allows avoiding binding callbacks.\n *\n * @constructor ForEachBookKeeping\n * @param {!function} forEachFunction Function to perform traversal with.\n * @param {?*} forEachContext Context to perform context with.\n */\nfunction ForEachBookKeeping(forEachFunction, forEachContext) {\n this.func = forEachFunction;\n this.context = forEachContext;\n this.count = 0;\n}\nForEachBookKeeping.prototype.destructor = function () {\n this.func = null;\n this.context = null;\n this.count = 0;\n};\nPooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);\n\nfunction forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n\n func.call(context, child, bookKeeping.count++);\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n ForEachBookKeeping.release(traverseContext);\n}\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * mapping. Allows avoiding binding callbacks.\n *\n * @constructor MapBookKeeping\n * @param {!*} mapResult Object containing the ordered map of results.\n * @param {!function} mapFunction Function to perform mapping with.\n * @param {?*} mapContext Context to perform mapping with.\n */\nfunction MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {\n this.result = mapResult;\n this.keyPrefix = keyPrefix;\n this.func = mapFunction;\n this.context = mapContext;\n this.count = 0;\n}\nMapBookKeeping.prototype.destructor = function () {\n this.result = null;\n this.keyPrefix = null;\n this.func = null;\n this.context = null;\n this.count = 0;\n};\nPooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);\n\nfunction mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n\n\n var mappedChild = func.call(context, child, bookKeeping.count++);\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);\n } else if (mappedChild != null) {\n if (ReactElement.isValidElement(mappedChild)) {\n mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,\n // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n result.push(mappedChild);\n }\n}\n\nfunction mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n MapBookKeeping.release(traverseContext);\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n}\n\nfunction forEachSingleChildDummy(traverseContext, child, name) {\n return null;\n}\n\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\nfunction countChildren(children, context) {\n return traverseAllChildren(children, forEachSingleChildDummy, null);\n}\n\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray\n */\nfunction toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}\n\nvar ReactChildren = {\n forEach: forEachChildren,\n map: mapChildren,\n mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,\n count: countChildren,\n toArray: toArray\n};\n\nmodule.exports = ReactChildren;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Static poolers. Several custom versions for each potential number of\n * arguments. A completely generic pooler is easy to implement, but would\n * require accessing the `arguments` object. In each of these, `this` refers to\n * the Class itself, not an instance. If any others are needed, simply add them\n * here, or in their own files.\n */\nvar oneArgumentPooler = function (copyFieldsFrom) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, copyFieldsFrom);\n return instance;\n } else {\n return new Klass(copyFieldsFrom);\n }\n};\n\nvar twoArgumentPooler = function (a1, a2) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\n\nvar threeArgumentPooler = function (a1, a2, a3) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3);\n return instance;\n } else {\n return new Klass(a1, a2, a3);\n }\n};\n\nvar fourArgumentPooler = function (a1, a2, a3, a4) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4);\n }\n};\n\nvar fiveArgumentPooler = function (a1, a2, a3, a4, a5) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4, a5);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4, a5);\n }\n};\n\nvar standardReleaser = function (instance) {\n var Klass = this;\n !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\n\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = oneArgumentPooler;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nvar addPoolingTo = function (CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\n\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n oneArgumentPooler: oneArgumentPooler,\n twoArgumentPooler: twoArgumentPooler,\n threeArgumentPooler: threeArgumentPooler,\n fourArgumentPooler: fourArgumentPooler,\n fiveArgumentPooler: fiveArgumentPooler\n};\n\nmodule.exports = PooledClass;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\n\nvar getIteratorFn = require('./getIteratorFn');\nvar invariant = require('fbjs/lib/invariant');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar warning = require('fbjs/lib/warning');\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (component && typeof component === 'object' && component.key != null) {\n // Explicit key\n return KeyEscapeUtils.escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n if (children === null || type === 'string' || type === 'number' ||\n // The following is inlined from ReactElement. This means we can optimize\n // some checks. React Fiber also inlines this logic for similar purposes.\n type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (iteratorFn) {\n var iterator = iteratorFn.call(children);\n var step;\n if (iteratorFn !== children.entries) {\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n var mapsAsChildrenAddendum = '';\n if (ReactCurrentOwner.current) {\n var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n if (mapsAsChildrenOwnerName) {\n mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n }\n }\n process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n didWarnAboutMaps = true;\n }\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n child = entry[1];\n nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n }\n }\n } else if (type === 'object') {\n var addendum = '';\n if (process.env.NODE_ENV !== 'production') {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n if (children._isReactElement) {\n addendum = ' It looks like you\\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';\n }\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n addendum += ' Check the render method of `' + name + '`.';\n }\n }\n }\n var childrenString = String(children);\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n\nmodule.exports = traverseAllChildren;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n\n return '$' + escapedString;\n}\n\n/**\n * Unescape and unwrap key for human-readable display\n *\n * @param {string} key to unescape.\n * @return {string} the unescaped key.\n */\nfunction unescape(key) {\n var unescapeRegex = /(=0|=2)/g;\n var unescaperLookup = {\n '=0': '=',\n '=2': ':'\n };\n var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);\n\n return ('' + keySubstring).replace(unescapeRegex, function (match) {\n return unescaperLookup[match];\n });\n}\n\nvar KeyEscapeUtils = {\n escape: escape,\n unescape: unescape\n};\n\nmodule.exports = KeyEscapeUtils;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar ReactComponent = require('./ReactComponent');\nvar ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\n\n/**\n * Base class helpers for the updating state of a component.\n */\nfunction ReactPureComponent(props, context, updater) {\n // Duplicated from ReactComponent.\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n // We initialize the default updater but the real one gets injected by the\n // renderer.\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nfunction ComponentDummy() {}\nComponentDummy.prototype = ReactComponent.prototype;\nReactPureComponent.prototype = new ComponentDummy();\nReactPureComponent.prototype.constructor = ReactPureComponent;\n// Avoid an extra prototype jump for these methods.\n_assign(ReactPureComponent.prototype, ReactComponent.prototype);\nReactPureComponent.prototype.isPureReactComponent = true;\n\nmodule.exports = ReactPureComponent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar ReactComponent = require('./ReactComponent');\nvar ReactElement = require('./ReactElement');\nvar ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');\nvar ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\n/**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n\nvar injectedMixins = [];\n\n/**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\nvar ReactClassInterface = {\n\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @nosideeffects\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n\n};\n\n/**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\nvar RESERVED_SPEC_KEYS = {\n displayName: function (Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function (Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function (Constructor, childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);\n },\n contextTypes: function (Constructor, contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function (Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function (Constructor, propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function (Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function () {} };\n\nfunction validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an invariant so components\n // don't show up in prod but only in __DEV__\n process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;\n }\n }\n}\n\nfunction validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n !(specPolicy === 'OVERRIDE_BASE') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;\n }\n}\n\n/**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\nfunction mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;\n }\n\n return;\n }\n\n !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;\n !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n}\n\nfunction mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;\n\n var isInherited = name in Constructor;\n !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;\n Constructor[name] = property;\n }\n}\n\n/**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\nfunction mergeIntoWithNoDuplicateKeys(one, two) {\n !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;\n one[key] = two[key];\n }\n }\n return one;\n}\n\n/**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\nfunction createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n}\n\n/**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\nfunction createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n}\n\n/**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\nfunction bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function (newThis) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;\n } else if (!args.length) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n}\n\n/**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\nfunction bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n}\n\n/**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\nvar ReactClassMixin = {\n\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function (newState, callback) {\n this.updater.enqueueReplaceState(this, newState);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'replaceState');\n }\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function () {\n return this.updater.isMounted(this);\n }\n};\n\nvar ReactClassComponent = function () {};\n_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);\n\n/**\n * Module for creating composite components.\n *\n * @class ReactClass\n */\nvar ReactClass = {\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n createClass: function (spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function (props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (initialState === undefined && this.getInitialState._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, spec);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n },\n\n injection: {\n injectMixin: function (mixin) {\n injectedMixins.push(mixin);\n }\n }\n\n};\n\nmodule.exports = ReactClass;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactElement = require('./ReactElement');\n\n/**\n * Create a factory that creates HTML tag elements.\n *\n * @private\n */\nvar createDOMFactory = ReactElement.createFactory;\nif (process.env.NODE_ENV !== 'production') {\n var ReactElementValidator = require('./ReactElementValidator');\n createDOMFactory = ReactElementValidator.createFactory;\n}\n\n/**\n * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.\n * This is also accessible via `React.DOM`.\n *\n * @public\n */\nvar ReactDOMFactories = {\n a: createDOMFactory('a'),\n abbr: createDOMFactory('abbr'),\n address: createDOMFactory('address'),\n area: createDOMFactory('area'),\n article: createDOMFactory('article'),\n aside: createDOMFactory('aside'),\n audio: createDOMFactory('audio'),\n b: createDOMFactory('b'),\n base: createDOMFactory('base'),\n bdi: createDOMFactory('bdi'),\n bdo: createDOMFactory('bdo'),\n big: createDOMFactory('big'),\n blockquote: createDOMFactory('blockquote'),\n body: createDOMFactory('body'),\n br: createDOMFactory('br'),\n button: createDOMFactory('button'),\n canvas: createDOMFactory('canvas'),\n caption: createDOMFactory('caption'),\n cite: createDOMFactory('cite'),\n code: createDOMFactory('code'),\n col: createDOMFactory('col'),\n colgroup: createDOMFactory('colgroup'),\n data: createDOMFactory('data'),\n datalist: createDOMFactory('datalist'),\n dd: createDOMFactory('dd'),\n del: createDOMFactory('del'),\n details: createDOMFactory('details'),\n dfn: createDOMFactory('dfn'),\n dialog: createDOMFactory('dialog'),\n div: createDOMFactory('div'),\n dl: createDOMFactory('dl'),\n dt: createDOMFactory('dt'),\n em: createDOMFactory('em'),\n embed: createDOMFactory('embed'),\n fieldset: createDOMFactory('fieldset'),\n figcaption: createDOMFactory('figcaption'),\n figure: createDOMFactory('figure'),\n footer: createDOMFactory('footer'),\n form: createDOMFactory('form'),\n h1: createDOMFactory('h1'),\n h2: createDOMFactory('h2'),\n h3: createDOMFactory('h3'),\n h4: createDOMFactory('h4'),\n h5: createDOMFactory('h5'),\n h6: createDOMFactory('h6'),\n head: createDOMFactory('head'),\n header: createDOMFactory('header'),\n hgroup: createDOMFactory('hgroup'),\n hr: createDOMFactory('hr'),\n html: createDOMFactory('html'),\n i: createDOMFactory('i'),\n iframe: createDOMFactory('iframe'),\n img: createDOMFactory('img'),\n input: createDOMFactory('input'),\n ins: createDOMFactory('ins'),\n kbd: createDOMFactory('kbd'),\n keygen: createDOMFactory('keygen'),\n label: createDOMFactory('label'),\n legend: createDOMFactory('legend'),\n li: createDOMFactory('li'),\n link: createDOMFactory('link'),\n main: createDOMFactory('main'),\n map: createDOMFactory('map'),\n mark: createDOMFactory('mark'),\n menu: createDOMFactory('menu'),\n menuitem: createDOMFactory('menuitem'),\n meta: createDOMFactory('meta'),\n meter: createDOMFactory('meter'),\n nav: createDOMFactory('nav'),\n noscript: createDOMFactory('noscript'),\n object: createDOMFactory('object'),\n ol: createDOMFactory('ol'),\n optgroup: createDOMFactory('optgroup'),\n option: createDOMFactory('option'),\n output: createDOMFactory('output'),\n p: createDOMFactory('p'),\n param: createDOMFactory('param'),\n picture: createDOMFactory('picture'),\n pre: createDOMFactory('pre'),\n progress: createDOMFactory('progress'),\n q: createDOMFactory('q'),\n rp: createDOMFactory('rp'),\n rt: createDOMFactory('rt'),\n ruby: createDOMFactory('ruby'),\n s: createDOMFactory('s'),\n samp: createDOMFactory('samp'),\n script: createDOMFactory('script'),\n section: createDOMFactory('section'),\n select: createDOMFactory('select'),\n small: createDOMFactory('small'),\n source: createDOMFactory('source'),\n span: createDOMFactory('span'),\n strong: createDOMFactory('strong'),\n style: createDOMFactory('style'),\n sub: createDOMFactory('sub'),\n summary: createDOMFactory('summary'),\n sup: createDOMFactory('sup'),\n table: createDOMFactory('table'),\n tbody: createDOMFactory('tbody'),\n td: createDOMFactory('td'),\n textarea: createDOMFactory('textarea'),\n tfoot: createDOMFactory('tfoot'),\n th: createDOMFactory('th'),\n thead: createDOMFactory('thead'),\n time: createDOMFactory('time'),\n title: createDOMFactory('title'),\n tr: createDOMFactory('tr'),\n track: createDOMFactory('track'),\n u: createDOMFactory('u'),\n ul: createDOMFactory('ul'),\n 'var': createDOMFactory('var'),\n video: createDOMFactory('video'),\n wbr: createDOMFactory('wbr'),\n\n // SVG\n circle: createDOMFactory('circle'),\n clipPath: createDOMFactory('clipPath'),\n defs: createDOMFactory('defs'),\n ellipse: createDOMFactory('ellipse'),\n g: createDOMFactory('g'),\n image: createDOMFactory('image'),\n line: createDOMFactory('line'),\n linearGradient: createDOMFactory('linearGradient'),\n mask: createDOMFactory('mask'),\n path: createDOMFactory('path'),\n pattern: createDOMFactory('pattern'),\n polygon: createDOMFactory('polygon'),\n polyline: createDOMFactory('polyline'),\n radialGradient: createDOMFactory('radialGradient'),\n rect: createDOMFactory('rect'),\n stop: createDOMFactory('stop'),\n svg: createDOMFactory('svg'),\n text: createDOMFactory('text'),\n tspan: createDOMFactory('tspan')\n};\n\nmodule.exports = ReactDOMFactories;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactElement = require('./ReactElement');\nvar ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');\nvar ReactPropTypesSecret = require('./ReactPropTypesSecret');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar getIteratorFn = require('./getIteratorFn');\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\nvar ANONYMOUS = '<<anonymous>>';\n\nvar ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker\n};\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n/*eslint-disable no-self-compare*/\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n/*eslint-enable no-self-compare*/\n\n/**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\nfunction PropTypeError(message) {\n this.message = message;\n this.stack = '';\n}\n// Make `instanceof Error` still work for returned errors.\nPropTypeError.prototype = Error.prototype;\n\nfunction createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n if (process.env.NODE_ENV !== 'production') {\n if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {\n var cacheKey = componentName + ':' + propName;\n if (!manualPropTypeCallCache[cacheKey]) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;\n manualPropTypeCallCache[cacheKey] = true;\n }\n }\n }\n if (props[propName] == null) {\n var locationName = ReactPropTypeLocationNames[location];\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\n\nfunction createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n var locationName = ReactPropTypeLocationNames[location];\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturns(null));\n}\n\nfunction createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var locationName = ReactPropTypeLocationNames[location];\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactElement.isValidElement(propValue)) {\n var locationName = ReactPropTypeLocationNames[location];\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var locationName = ReactPropTypeLocationNames[location];\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var locationName = ReactPropTypeLocationNames[location];\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || ReactElement.isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n}\n\nfunction isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n}\n\n// Equivalent of `typeof` but with special handling for array and regexp.\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n}\n\n// This handles more types than `getPropType`. Only used for error messages.\n// See `createPrimitiveTypeChecker`.\nfunction getPreciseType(propValue) {\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n}\n\n// Returns class name of the object, if any.\nfunction getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n}\n\nmodule.exports = ReactPropTypes;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nmodule.exports = '15.4.1';","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactElement = require('./ReactElement');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\nfunction onlyChild(children) {\n !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;\n return children;\n}\n\nmodule.exports = onlyChild;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports['default'] = syncHistoryWithStore;\n\nvar _reducer = require('./reducer');\n\nvar defaultSelectLocationState = function defaultSelectLocationState(state) {\n return state.routing;\n};\n\n/**\n * This function synchronizes your history state with the Redux store.\n * Location changes flow from history to the store. An enhanced history is\n * returned with a listen method that responds to store updates for location.\n *\n * When this history is provided to the router, this means the location data\n * will flow like this:\n * history.push -> store.dispatch -> enhancedHistory.listen -> router\n * This ensures that when the store state changes due to a replay or other\n * event, the router will be updated appropriately and can transition to the\n * correct router state.\n */\nfunction syncHistoryWithStore(history, store) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$selectLocationSt = _ref.selectLocationState,\n selectLocationState = _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt,\n _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay,\n adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla;\n\n // Ensure that the reducer is mounted on the store and functioning properly.\n if (typeof selectLocationState(store.getState()) === 'undefined') {\n throw new Error('Expected the routing state to be available either as `state.routing` ' + 'or as the custom expression you can specify as `selectLocationState` ' + 'in the `syncHistoryWithStore()` options. ' + 'Ensure you have added the `routerReducer` to your store\\'s ' + 'reducers via `combineReducers` or whatever method you use to isolate ' + 'your reducers.');\n }\n\n var initialLocation = void 0;\n var isTimeTraveling = void 0;\n var unsubscribeFromStore = void 0;\n var unsubscribeFromHistory = void 0;\n var currentLocation = void 0;\n\n // What does the store say about current location?\n var getLocationInStore = function getLocationInStore(useInitialIfEmpty) {\n var locationState = selectLocationState(store.getState());\n return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined);\n };\n\n // Init initialLocation with potential location in store\n initialLocation = getLocationInStore();\n\n // If the store is replayed, update the URL in the browser to match.\n if (adjustUrlOnReplay) {\n var handleStoreChange = function handleStoreChange() {\n var locationInStore = getLocationInStore(true);\n if (currentLocation === locationInStore || initialLocation === locationInStore) {\n return;\n }\n\n // Update address bar to reflect store state\n isTimeTraveling = true;\n currentLocation = locationInStore;\n history.transitionTo(_extends({}, locationInStore, {\n action: 'PUSH'\n }));\n isTimeTraveling = false;\n };\n\n unsubscribeFromStore = store.subscribe(handleStoreChange);\n handleStoreChange();\n }\n\n // Whenever location changes, dispatch an action to get it in the store\n var handleLocationChange = function handleLocationChange(location) {\n // ... unless we just caused that location change\n if (isTimeTraveling) {\n return;\n }\n\n // Remember where we are\n currentLocation = location;\n\n // Are we being called for the first time?\n if (!initialLocation) {\n // Remember as a fallback in case state is reset\n initialLocation = location;\n\n // Respect persisted location, if any\n if (getLocationInStore()) {\n return;\n }\n }\n\n // Tell the store to update by dispatching an action\n store.dispatch({\n type: _reducer.LOCATION_CHANGE,\n payload: location\n });\n };\n unsubscribeFromHistory = history.listen(handleLocationChange);\n\n // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves\n if (history.getCurrentLocation) {\n handleLocationChange(history.getCurrentLocation());\n }\n\n // The enhanced history uses store as source of truth\n return _extends({}, history, {\n // The listeners are subscribed to the store instead of history\n listen: function listen(listener) {\n // Copy of last location.\n var lastPublishedLocation = getLocationInStore(true);\n\n // Keep track of whether we unsubscribed, as Redux store\n // only applies changes in subscriptions on next dispatch\n var unsubscribed = false;\n var unsubscribeFromStore = store.subscribe(function () {\n var currentLocation = getLocationInStore(true);\n if (currentLocation === lastPublishedLocation) {\n return;\n }\n lastPublishedLocation = currentLocation;\n if (!unsubscribed) {\n listener(lastPublishedLocation);\n }\n });\n\n // History 2.x listeners expect a synchronous call. Make the first call to the\n // listener after subscribing to the store, in case the listener causes a\n // location change (e.g. when it redirects)\n if (!history.getCurrentLocation) {\n listener(lastPublishedLocation);\n }\n\n // Let user unsubscribe later\n return function () {\n unsubscribed = true;\n unsubscribeFromStore();\n };\n },\n\n\n // It also provides a way to destroy internal listeners\n unsubscribe: function unsubscribe() {\n if (adjustUrlOnReplay) {\n unsubscribeFromStore();\n }\n unsubscribeFromHistory();\n }\n });\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = routerMiddleware;\n\nvar _actions = require('./actions');\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/**\n * This middleware captures CALL_HISTORY_METHOD actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\nfunction routerMiddleware(history) {\n return function () {\n return function (next) {\n return function (action) {\n if (action.type !== _actions.CALL_HISTORY_METHOD) {\n return next(action);\n }\n\n var _action$payload = action.payload,\n method = _action$payload.method,\n args = _action$payload.args;\n\n history[method].apply(history, _toConsumableArray(args));\n };\n };\n };\n}","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/\n\n'use strict';\n\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDefaultInjection = require('./ReactDefaultInjection');\nvar ReactMount = require('./ReactMount');\nvar ReactReconciler = require('./ReactReconciler');\nvar ReactUpdates = require('./ReactUpdates');\nvar ReactVersion = require('./ReactVersion');\n\nvar findDOMNode = require('./findDOMNode');\nvar getHostComponentFromComposite = require('./getHostComponentFromComposite');\nvar renderSubtreeIntoContainer = require('./renderSubtreeIntoContainer');\nvar warning = require('fbjs/lib/warning');\n\nReactDefaultInjection.inject();\n\nvar ReactDOM = {\n findDOMNode: findDOMNode,\n render: ReactMount.render,\n unmountComponentAtNode: ReactMount.unmountComponentAtNode,\n version: ReactVersion,\n\n /* eslint-disable camelcase */\n unstable_batchedUpdates: ReactUpdates.batchedUpdates,\n unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer\n};\n\n// Inject the runtime into a devtools global hook regardless of browser.\n// Allows for debugging when the hook is injected on the page.\nif (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({\n ComponentTree: {\n getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,\n getNodeFromInstance: function (inst) {\n // inst is an internal instance (but could be a composite)\n if (inst._renderedComponent) {\n inst = getHostComponentFromComposite(inst);\n }\n if (inst) {\n return ReactDOMComponentTree.getNodeFromInstance(inst);\n } else {\n return null;\n }\n }\n },\n Mount: ReactMount,\n Reconciler: ReactReconciler\n });\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n if (ExecutionEnvironment.canUseDOM && window.top === window.self) {\n\n // First check if devtools is not installed\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n // Firefox does not have the issue with devtools loaded over file://\n var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;\n console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');\n }\n }\n\n var testFunc = function testFn() {};\n process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;\n\n // If we're in IE8, check to see if we are in compatibility mode and provide\n // information on preventing compatibility mode\n var ieCompatibilityMode = document.documentMode && document.documentMode < 8;\n\n process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />') : void 0;\n\n var expectedFeatures = [\n // shims\n Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim];\n\n for (var i = 0; i < expectedFeatures.length; i++) {\n if (!expectedFeatures[i]) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;\n break;\n }\n }\n }\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactInstrumentation = require('./ReactInstrumentation');\n var ReactDOMUnknownPropertyHook = require('./ReactDOMUnknownPropertyHook');\n var ReactDOMNullInputValuePropHook = require('./ReactDOMNullInputValuePropHook');\n var ReactDOMInvalidARIAHook = require('./ReactDOMInvalidARIAHook');\n\n ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);\n ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);\n ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook);\n}\n\nmodule.exports = ReactDOM;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ARIADOMPropertyConfig = require('./ARIADOMPropertyConfig');\nvar BeforeInputEventPlugin = require('./BeforeInputEventPlugin');\nvar ChangeEventPlugin = require('./ChangeEventPlugin');\nvar DefaultEventPluginOrder = require('./DefaultEventPluginOrder');\nvar EnterLeaveEventPlugin = require('./EnterLeaveEventPlugin');\nvar HTMLDOMPropertyConfig = require('./HTMLDOMPropertyConfig');\nvar ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');\nvar ReactDOMComponent = require('./ReactDOMComponent');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMEmptyComponent = require('./ReactDOMEmptyComponent');\nvar ReactDOMTreeTraversal = require('./ReactDOMTreeTraversal');\nvar ReactDOMTextComponent = require('./ReactDOMTextComponent');\nvar ReactDefaultBatchingStrategy = require('./ReactDefaultBatchingStrategy');\nvar ReactEventListener = require('./ReactEventListener');\nvar ReactInjection = require('./ReactInjection');\nvar ReactReconcileTransaction = require('./ReactReconcileTransaction');\nvar SVGDOMPropertyConfig = require('./SVGDOMPropertyConfig');\nvar SelectEventPlugin = require('./SelectEventPlugin');\nvar SimpleEventPlugin = require('./SimpleEventPlugin');\n\nvar alreadyInjected = false;\n\nfunction inject() {\n if (alreadyInjected) {\n // TODO: This is currently true because these injections are shared between\n // the client and the server package. They should be built independently\n // and not share any injection state. Then this problem will be solved.\n return;\n }\n alreadyInjected = true;\n\n ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);\n\n /**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\n ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);\n ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);\n ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);\n\n /**\n * Some important event plugins included by default (without having to require\n * them).\n */\n ReactInjection.EventPluginHub.injectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n });\n\n ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);\n\n ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);\n\n ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);\n\n ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {\n return new ReactDOMEmptyComponent(instantiate);\n });\n\n ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);\n ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);\n\n ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);\n}\n\nmodule.exports = {\n inject: inject\n};","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ARIADOMPropertyConfig = {\n Properties: {\n // Global States and Properties\n 'aria-current': 0, // state\n 'aria-details': 0,\n 'aria-disabled': 0, // state\n 'aria-hidden': 0, // state\n 'aria-invalid': 0, // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n },\n DOMAttributeNames: {},\n DOMPropertyNames: {}\n};\n\nmodule.exports = ARIADOMPropertyConfig;","/**\n * Copyright 2013-present Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar EventPropagators = require('./EventPropagators');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar FallbackCompositionState = require('./FallbackCompositionState');\nvar SyntheticCompositionEvent = require('./SyntheticCompositionEvent');\nvar SyntheticInputEvent = require('./SyntheticInputEvent');\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\nvar START_KEYCODE = 229;\n\nvar canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;\n\nvar documentMode = null;\nif (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n}\n\n// Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\nvar canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();\n\n// In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\nvar useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\n\n/**\n * Opera <= 12 includes TextEvent in window, but does not fire\n * text input events. Rely on keypress instead.\n */\nfunction isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}\n\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n// Events and their corresponding property names.\nvar eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionEnd',\n captured: 'onCompositionEndCapture'\n },\n dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionStart',\n captured: 'onCompositionStartCapture'\n },\n dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionUpdate',\n captured: 'onCompositionUpdateCapture'\n },\n dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n }\n};\n\n// Track whether we've ever handled a keypress on the space key.\nvar hasSpaceKeypress = false;\n\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n\n/**\n * Translate native top level events into event types.\n *\n * @param {string} topLevelType\n * @return {object}\n */\nfunction getCompositionEventType(topLevelType) {\n switch (topLevelType) {\n case 'topCompositionStart':\n return eventTypes.compositionStart;\n case 'topCompositionEnd':\n return eventTypes.compositionEnd;\n case 'topCompositionUpdate':\n return eventTypes.compositionUpdate;\n }\n}\n\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionStart(topLevelType, nativeEvent) {\n return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;\n}\n\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topKeyUp':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case 'topKeyDown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n case 'topKeyPress':\n case 'topMouseDown':\n case 'topBlur':\n // Events are not possible without cancelling IME.\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n return null;\n}\n\n// Track the current IME composition fallback object, if any.\nvar currentComposition = null;\n\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\nfunction extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(topLevelType);\n } else if (!currentComposition) {\n if (isFallbackCompositionStart(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionStart;\n }\n } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionEnd;\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!currentComposition && eventType === eventTypes.compositionStart) {\n currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);\n } else if (eventType === eventTypes.compositionEnd) {\n if (currentComposition) {\n fallbackData = currentComposition.getData();\n }\n }\n }\n\n var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n if (customData !== null) {\n event.data = customData;\n }\n }\n\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The string corresponding to this `beforeInput` event.\n */\nfunction getNativeBeforeInputChars(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topCompositionEnd':\n return getDataFromCustomEvent(nativeEvent);\n case 'topKeyPress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'topTextInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data;\n\n // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to blacklist it.\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The fallback string for this `beforeInput` event.\n */\nfunction getFallbackBeforeInputChars(topLevelType, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (currentComposition) {\n if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n var chars = currentComposition.getData();\n FallbackCompositionState.release(currentComposition);\n currentComposition = null;\n return chars;\n }\n return null;\n }\n\n switch (topLevelType) {\n case 'topPaste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n case 'topKeyPress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {\n return String.fromCharCode(nativeEvent.which);\n }\n return null;\n case 'topCompositionEnd':\n return useFallbackCompositionData ? null : nativeEvent.data;\n default:\n return null;\n }\n}\n\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\nfunction extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n }\n\n // If no characters are being inserted, no BeforeInput event should\n // be fired.\n if (!chars) {\n return null;\n }\n\n var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);\n\n event.data = chars;\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\nvar BeforeInputEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];\n }\n};\n\nmodule.exports = BeforeInputEventPlugin;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar PooledClass = require('./PooledClass');\n\nvar getTextContentAccessor = require('./getTextContentAccessor');\n\n/**\n * This helper class stores information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n * @param {DOMEventTarget} root\n */\nfunction FallbackCompositionState(root) {\n this._root = root;\n this._startText = this.getText();\n this._fallbackText = null;\n}\n\n_assign(FallbackCompositionState.prototype, {\n destructor: function () {\n this._root = null;\n this._startText = null;\n this._fallbackText = null;\n },\n\n /**\n * Get current text of input.\n *\n * @return {string}\n */\n getText: function () {\n if ('value' in this._root) {\n return this._root.value;\n }\n return this._root[getTextContentAccessor()];\n },\n\n /**\n * Determine the differing substring between the initially stored\n * text content and the current content.\n *\n * @return {string}\n */\n getData: function () {\n if (this._fallbackText) {\n return this._fallbackText;\n }\n\n var start;\n var startValue = this._startText;\n var startLength = startValue.length;\n var end;\n var endValue = this.getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n this._fallbackText = endValue.slice(start, sliceTail);\n return this._fallbackText;\n }\n});\n\nPooledClass.addPoolingTo(FallbackCompositionState);\n\nmodule.exports = FallbackCompositionState;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\nvar CompositionEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);\n\nmodule.exports = SyntheticCompositionEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\nvar InputEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);\n\nmodule.exports = SyntheticInputEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPropagators = require('./EventPropagators');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\nvar SyntheticEvent = require('./SyntheticEvent');\n\nvar getEventTarget = require('./getEventTarget');\nvar isEventSupported = require('./isEventSupported');\nvar isTextInputElement = require('./isTextInputElement');\n\nvar eventTypes = {\n change: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture'\n },\n dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']\n }\n};\n\n/**\n * For IE shims\n */\nvar activeElement = null;\nvar activeElementInst = null;\nvar activeElementValue = null;\nvar activeElementValueProp = null;\n\n/**\n * SECTION: handle `change` event\n */\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nvar doesChangeEventBubble = false;\nif (ExecutionEnvironment.canUseDOM) {\n // See `handleChange` comment below\n doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));\n EventPropagators.accumulateTwoPhaseDispatches(event);\n\n // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n ReactUpdates.batchedUpdates(runEventInBatch, event);\n}\n\nfunction runEventInBatch(event) {\n EventPluginHub.enqueueEvents(event);\n EventPluginHub.processEventQueue(false);\n}\n\nfunction startWatchingForChangeEventIE8(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onchange', manualDispatchChangeEvent);\n}\n\nfunction stopWatchingForChangeEventIE8() {\n if (!activeElement) {\n return;\n }\n activeElement.detachEvent('onchange', manualDispatchChangeEvent);\n activeElement = null;\n activeElementInst = null;\n}\n\nfunction getTargetInstForChangeEvent(topLevelType, targetInst) {\n if (topLevelType === 'topChange') {\n return targetInst;\n }\n}\nfunction handleEventsForChangeEventIE8(topLevelType, target, targetInst) {\n if (topLevelType === 'topFocus') {\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForChangeEventIE8();\n startWatchingForChangeEventIE8(target, targetInst);\n } else if (topLevelType === 'topBlur') {\n stopWatchingForChangeEventIE8();\n }\n}\n\n/**\n * SECTION: handle `input` event\n */\nvar isInputEventSupported = false;\nif (ExecutionEnvironment.canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n // IE10+ fire input events to often, such when a placeholder\n // changes or when an input with a placeholder is focused.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);\n}\n\n/**\n * (For IE <=11) Replacement getter/setter for the `value` property that gets\n * set on the active element.\n */\nvar newValueProp = {\n get: function () {\n return activeElementValueProp.get.call(this);\n },\n set: function (val) {\n // Cast to a string so we can do equality checks.\n activeElementValue = '' + val;\n activeElementValueProp.set.call(this, val);\n }\n};\n\n/**\n * (For IE <=11) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElementValue = target.value;\n activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\n // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n // on DOM elements\n Object.defineProperty(activeElement, 'value', newValueProp);\n if (activeElement.attachEvent) {\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n } else {\n activeElement.addEventListener('propertychange', handlePropertyChange, false);\n }\n}\n\n/**\n * (For IE <=11) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n // delete restores the original property definition\n delete activeElement.value;\n\n if (activeElement.detachEvent) {\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n } else {\n activeElement.removeEventListener('propertychange', handlePropertyChange, false);\n }\n\n activeElement = null;\n activeElementInst = null;\n activeElementValue = null;\n activeElementValueProp = null;\n}\n\n/**\n * (For IE <=11) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n var value = nativeEvent.srcElement.value;\n if (value === activeElementValue) {\n return;\n }\n activeElementValue = value;\n\n manualDispatchChangeEvent(nativeEvent);\n}\n\n/**\n * If a `change` event should be fired, returns the target's ID.\n */\nfunction getTargetInstForInputEvent(topLevelType, targetInst) {\n if (topLevelType === 'topInput') {\n // In modern browsers (i.e., not IE8 or IE9), the input event is exactly\n // what we want so fall through here and trigger an abstract event\n return targetInst;\n }\n}\n\nfunction handleEventsForInputEventIE(topLevelType, target, targetInst) {\n if (topLevelType === 'topFocus') {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9-11, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (topLevelType === 'topBlur') {\n stopWatchingForValueChange();\n }\n}\n\n// For IE8 and IE9.\nfunction getTargetInstForInputEventIE(topLevelType, targetInst) {\n if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n if (activeElement && activeElement.value !== activeElementValue) {\n activeElementValue = activeElement.value;\n return activeElementInst;\n }\n }\n}\n\n/**\n * SECTION: handle `click` event\n */\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(topLevelType, targetInst) {\n if (topLevelType === 'topClick') {\n return targetInst;\n }\n}\n\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\nvar ChangeEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;\n\n var getTargetInstFunc, handleEventFunc;\n if (shouldUseChangeEvent(targetNode)) {\n if (doesChangeEventBubble) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else {\n handleEventFunc = handleEventsForChangeEventIE8;\n }\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventIE;\n handleEventFunc = handleEventsForInputEventIE;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(topLevelType, targetInst);\n if (inst) {\n var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);\n event.type = 'change';\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(topLevelType, targetNode, targetInst);\n }\n }\n\n};\n\nmodule.exports = ChangeEventPlugin;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar ReactOwner = require('./ReactOwner');\n\nvar ReactRef = {};\n\nfunction attachRef(ref, component, owner) {\n if (typeof ref === 'function') {\n ref(component.getPublicInstance());\n } else {\n // Legacy ref\n ReactOwner.addComponentAsRefTo(component, ref, owner);\n }\n}\n\nfunction detachRef(ref, component, owner) {\n if (typeof ref === 'function') {\n ref(null);\n } else {\n // Legacy ref\n ReactOwner.removeComponentAsRefFrom(component, ref, owner);\n }\n}\n\nReactRef.attachRefs = function (instance, element) {\n if (element === null || typeof element !== 'object') {\n return;\n }\n var ref = element.ref;\n if (ref != null) {\n attachRef(ref, instance, element._owner);\n }\n};\n\nReactRef.shouldUpdateRefs = function (prevElement, nextElement) {\n // If either the owner or a `ref` has changed, make sure the newest owner\n // has stored a reference to `this`, and the previous owner (if different)\n // has forgotten the reference to `this`. We use the element instead\n // of the public this.props because the post processing cannot determine\n // a ref. The ref conceptually lives on the element.\n\n // TODO: Should this even be possible? The owner cannot change because\n // it's forbidden by shouldUpdateReactComponent. The ref can change\n // if you swap the keys of but not the refs. Reconsider where this check\n // is made. It probably belongs where the key checking and\n // instantiateReactComponent is done.\n\n var prevRef = null;\n var prevOwner = null;\n if (prevElement !== null && typeof prevElement === 'object') {\n prevRef = prevElement.ref;\n prevOwner = prevElement._owner;\n }\n\n var nextRef = null;\n var nextOwner = null;\n if (nextElement !== null && typeof nextElement === 'object') {\n nextRef = nextElement.ref;\n nextOwner = nextElement._owner;\n }\n\n return prevRef !== nextRef ||\n // If owner changes but we have an unchanged function ref, don't update refs\n typeof nextRef === 'string' && nextOwner !== prevOwner;\n};\n\nReactRef.detachRefs = function (instance, element) {\n if (element === null || typeof element !== 'object') {\n return;\n }\n var ref = element.ref;\n if (ref != null) {\n detachRef(ref, instance, element._owner);\n }\n};\n\nmodule.exports = ReactRef;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * @param {?object} object\n * @return {boolean} True if `object` is a valid owner.\n * @final\n */\nfunction isValidOwner(object) {\n return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');\n}\n\n/**\n * ReactOwners are capable of storing references to owned components.\n *\n * All components are capable of //being// referenced by owner components, but\n * only ReactOwner components are capable of //referencing// owned components.\n * The named reference is known as a \"ref\".\n *\n * Refs are available when mounted and updated during reconciliation.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return (\n * <div onClick={this.handleClick}>\n * <CustomComponent ref=\"custom\" />\n * </div>\n * );\n * },\n * handleClick: function() {\n * this.refs.custom.handleClick();\n * },\n * componentDidMount: function() {\n * this.refs.custom.initialize();\n * }\n * });\n *\n * Refs should rarely be used. When refs are used, they should only be done to\n * control data that is not handled by React's data flow.\n *\n * @class ReactOwner\n */\nvar ReactOwner = {\n /**\n * Adds a component by ref to an owner component.\n *\n * @param {ReactComponent} component Component to reference.\n * @param {string} ref Name by which to refer to the component.\n * @param {ReactOwner} owner Component on which to record the ref.\n * @final\n * @internal\n */\n addComponentAsRefTo: function (component, ref, owner) {\n !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;\n owner.attachRef(ref, component);\n },\n\n /**\n * Removes a component by ref from an owner component.\n *\n * @param {ReactComponent} component Component to dereference.\n * @param {string} ref Name of the ref to remove.\n * @param {ReactOwner} owner Component on which the ref is recorded.\n * @final\n * @internal\n */\n removeComponentAsRefFrom: function (component, ref, owner) {\n !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;\n var ownerPublicInstance = owner.getPublicInstance();\n // Check that `component`'s owner is still alive and that `component` is still the current ref\n // because we do not want to detach the ref if another component stole it.\n if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {\n owner.detachRef(ref);\n }\n }\n\n};\n\nmodule.exports = ReactOwner;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Module that is injectable into `EventPluginHub`, that specifies a\n * deterministic ordering of `EventPlugin`s. A convenient way to reason about\n * plugins, without having to package every one of them. This is better than\n * having plugins be ordered in the same order that they are injected because\n * that ordering would be influenced by the packaging order.\n * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that\n * preventing default on events is convenient in `SimpleEventPlugin` handlers.\n */\n\nvar DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];\n\nmodule.exports = DefaultEventPluginOrder;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar EventPropagators = require('./EventPropagators');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\n\nvar eventTypes = {\n mouseEnter: {\n registrationName: 'onMouseEnter',\n dependencies: ['topMouseOut', 'topMouseOver']\n },\n mouseLeave: {\n registrationName: 'onMouseLeave',\n dependencies: ['topMouseOut', 'topMouseOver']\n }\n};\n\nvar EnterLeaveEventPlugin = {\n\n eventTypes: eventTypes,\n\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {\n return null;\n }\n if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {\n // Must not be a mouse in or mouse out - ignoring.\n return null;\n }\n\n var win;\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n if (topLevelType === 'topMouseOut') {\n from = targetInst;\n var related = nativeEvent.relatedTarget || nativeEvent.toElement;\n to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return null;\n }\n\n var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);\n var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);\n\n var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);\n leave.type = 'mouseleave';\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n\n var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);\n enter.type = 'mouseenter';\n enter.target = toNode;\n enter.relatedTarget = fromNode;\n\n EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);\n\n return [leave, enter];\n }\n\n};\n\nmodule.exports = EnterLeaveEventPlugin;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMProperty = require('./DOMProperty');\n\nvar MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;\nvar HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;\nvar HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;\nvar HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;\nvar HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;\n\nvar HTMLDOMPropertyConfig = {\n isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),\n Properties: {\n /**\n * Standard Properties\n */\n accept: 0,\n acceptCharset: 0,\n accessKey: 0,\n action: 0,\n allowFullScreen: HAS_BOOLEAN_VALUE,\n allowTransparency: 0,\n alt: 0,\n // specifies target context for links with `preload` type\n as: 0,\n async: HAS_BOOLEAN_VALUE,\n autoComplete: 0,\n // autoFocus is polyfilled/normalized by AutoFocusUtils\n // autoFocus: HAS_BOOLEAN_VALUE,\n autoPlay: HAS_BOOLEAN_VALUE,\n capture: HAS_BOOLEAN_VALUE,\n cellPadding: 0,\n cellSpacing: 0,\n charSet: 0,\n challenge: 0,\n checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n cite: 0,\n classID: 0,\n className: 0,\n cols: HAS_POSITIVE_NUMERIC_VALUE,\n colSpan: 0,\n content: 0,\n contentEditable: 0,\n contextMenu: 0,\n controls: HAS_BOOLEAN_VALUE,\n coords: 0,\n crossOrigin: 0,\n data: 0, // For `<object />` acts as `src`.\n dateTime: 0,\n 'default': HAS_BOOLEAN_VALUE,\n defer: HAS_BOOLEAN_VALUE,\n dir: 0,\n disabled: HAS_BOOLEAN_VALUE,\n download: HAS_OVERLOADED_BOOLEAN_VALUE,\n draggable: 0,\n encType: 0,\n form: 0,\n formAction: 0,\n formEncType: 0,\n formMethod: 0,\n formNoValidate: HAS_BOOLEAN_VALUE,\n formTarget: 0,\n frameBorder: 0,\n headers: 0,\n height: 0,\n hidden: HAS_BOOLEAN_VALUE,\n high: 0,\n href: 0,\n hrefLang: 0,\n htmlFor: 0,\n httpEquiv: 0,\n icon: 0,\n id: 0,\n inputMode: 0,\n integrity: 0,\n is: 0,\n keyParams: 0,\n keyType: 0,\n kind: 0,\n label: 0,\n lang: 0,\n list: 0,\n loop: HAS_BOOLEAN_VALUE,\n low: 0,\n manifest: 0,\n marginHeight: 0,\n marginWidth: 0,\n max: 0,\n maxLength: 0,\n media: 0,\n mediaGroup: 0,\n method: 0,\n min: 0,\n minLength: 0,\n // Caution; `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`.\n multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n name: 0,\n nonce: 0,\n noValidate: HAS_BOOLEAN_VALUE,\n open: HAS_BOOLEAN_VALUE,\n optimum: 0,\n pattern: 0,\n placeholder: 0,\n playsInline: HAS_BOOLEAN_VALUE,\n poster: 0,\n preload: 0,\n profile: 0,\n radioGroup: 0,\n readOnly: HAS_BOOLEAN_VALUE,\n referrerPolicy: 0,\n rel: 0,\n required: HAS_BOOLEAN_VALUE,\n reversed: HAS_BOOLEAN_VALUE,\n role: 0,\n rows: HAS_POSITIVE_NUMERIC_VALUE,\n rowSpan: HAS_NUMERIC_VALUE,\n sandbox: 0,\n scope: 0,\n scoped: HAS_BOOLEAN_VALUE,\n scrolling: 0,\n seamless: HAS_BOOLEAN_VALUE,\n selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n shape: 0,\n size: HAS_POSITIVE_NUMERIC_VALUE,\n sizes: 0,\n span: HAS_POSITIVE_NUMERIC_VALUE,\n spellCheck: 0,\n src: 0,\n srcDoc: 0,\n srcLang: 0,\n srcSet: 0,\n start: HAS_NUMERIC_VALUE,\n step: 0,\n style: 0,\n summary: 0,\n tabIndex: 0,\n target: 0,\n title: 0,\n // Setting .type throws on non-<input> tags\n type: 0,\n useMap: 0,\n value: 0,\n width: 0,\n wmode: 0,\n wrap: 0,\n\n /**\n * RDFa Properties\n */\n about: 0,\n datatype: 0,\n inlist: 0,\n prefix: 0,\n // property is also supported for OpenGraph in meta tags.\n property: 0,\n resource: 0,\n 'typeof': 0,\n vocab: 0,\n\n /**\n * Non-standard Properties\n */\n // autoCapitalize and autoCorrect are supported in Mobile Safari for\n // keyboard hints.\n autoCapitalize: 0,\n autoCorrect: 0,\n // autoSave allows WebKit/Blink to persist values of input fields on page reloads\n autoSave: 0,\n // color is for Safari mask-icon link\n color: 0,\n // itemProp, itemScope, itemType are for\n // Microdata support. See http://schema.org/docs/gs.html\n itemProp: 0,\n itemScope: HAS_BOOLEAN_VALUE,\n itemType: 0,\n // itemID and itemRef are for Microdata support as well but\n // only specified in the WHATWG spec document. See\n // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api\n itemID: 0,\n itemRef: 0,\n // results show looking glass icon and recent searches on input\n // search fields in WebKit/Blink\n results: 0,\n // IE-only attribute that specifies security restrictions on an iframe\n // as an alternative to the sandbox attribute on IE<10\n security: 0,\n // IE-only attribute that controls focus behavior\n unselectable: 0\n },\n DOMAttributeNames: {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv'\n },\n DOMPropertyNames: {}\n};\n\nmodule.exports = HTMLDOMPropertyConfig;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMChildrenOperations = require('./DOMChildrenOperations');\nvar ReactDOMIDOperations = require('./ReactDOMIDOperations');\n\n/**\n * Abstracts away all functionality of the reconciler that requires knowledge of\n * the browser context. TODO: These callers should be refactored to avoid the\n * need for this injection.\n */\nvar ReactComponentBrowserEnvironment = {\n\n processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,\n\n replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup\n\n};\n\nmodule.exports = ReactComponentBrowserEnvironment;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n\nvar createNodesFromMarkup = require('fbjs/lib/createNodesFromMarkup');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\n\nvar Danger = {\n\n /**\n * Replaces a node with a string of markup at its current position within its\n * parent. The markup must render into a single root node.\n *\n * @param {DOMElement} oldChild Child node to replace.\n * @param {string} markup Markup to render in place of the child node.\n * @internal\n */\n dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {\n !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;\n !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;\n !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;\n\n if (typeof markup === 'string') {\n var newChild = createNodesFromMarkup(markup, emptyFunction)[0];\n oldChild.parentNode.replaceChild(newChild, oldChild);\n } else {\n DOMLazyTree.replaceChildWithTree(oldChild, markup);\n }\n }\n\n};\n\nmodule.exports = Danger;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/*eslint-disable fb-www/unsafe-html*/\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar createArrayFromMixed = require('./createArrayFromMixed');\nvar getMarkupWrap = require('./getMarkupWrap');\nvar invariant = require('./invariant');\n\n/**\n * Dummy container used to render all markup.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Pattern used by `getNodeName`.\n */\nvar nodeNamePattern = /^\\s*<(\\w+)/;\n\n/**\n * Extracts the `nodeName` of the first element in a string of markup.\n *\n * @param {string} markup String of markup.\n * @return {?string} Node name of the supplied markup.\n */\nfunction getNodeName(markup) {\n var nodeNameMatch = markup.match(nodeNamePattern);\n return nodeNameMatch && nodeNameMatch[1].toLowerCase();\n}\n\n/**\n * Creates an array containing the nodes rendered from the supplied markup. The\n * optionally supplied `handleScript` function will be invoked once for each\n * <script> element that is rendered. If no `handleScript` function is supplied,\n * an exception is thrown if any <script> elements are rendered.\n *\n * @param {string} markup A string of valid HTML markup.\n * @param {?function} handleScript Invoked once for each rendered <script>.\n * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.\n */\nfunction createNodesFromMarkup(markup, handleScript) {\n var node = dummyNode;\n !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;\n var nodeName = getNodeName(markup);\n\n var wrap = nodeName && getMarkupWrap(nodeName);\n if (wrap) {\n node.innerHTML = wrap[1] + markup + wrap[2];\n\n var wrapDepth = wrap[0];\n while (wrapDepth--) {\n node = node.lastChild;\n }\n } else {\n node.innerHTML = markup;\n }\n\n var scripts = node.getElementsByTagName('script');\n if (scripts.length) {\n !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;\n createArrayFromMixed(scripts).forEach(handleScript);\n }\n\n var nodes = Array.from(node.childNodes);\n while (node.lastChild) {\n node.removeChild(node.lastChild);\n }\n return nodes;\n}\n\nmodule.exports = createNodesFromMarkup;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar invariant = require('./invariant');\n\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\nfunction toArray(obj) {\n var length = obj.length;\n\n // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;\n\n !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;\n\n !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;\n\n !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;\n\n // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {\n // IE < 9 does not support Array#slice on collections objects\n }\n }\n\n // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n var ret = Array(length);\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n return ret;\n}\n\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\nfunction hasArrayNature(obj) {\n return (\n // not null/false\n !!obj && (\n // arrays are objects, NodeLists are functions in Safari\n typeof obj == 'object' || typeof obj == 'function') &&\n // quacks like an array\n 'length' in obj &&\n // not window\n !('setInterval' in obj) &&\n // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && (\n // a real array\n Array.isArray(obj) ||\n // arguments\n 'callee' in obj ||\n // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\n\nmodule.exports = createArrayFromMixed;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/*eslint-disable fb-www/unsafe-html */\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar invariant = require('./invariant');\n\n/**\n * Dummy container used to detect which wraps are necessary.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Some browsers cannot use `innerHTML` to render certain elements standalone,\n * so we wrap them, render the wrapped nodes, then extract the desired node.\n *\n * In IE8, certain elements cannot render alone, so wrap all elements ('*').\n */\n\nvar shouldWrap = {};\n\nvar selectWrap = [1, '<select multiple=\"true\">', '</select>'];\nvar tableWrap = [1, '<table>', '</table>'];\nvar trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];\n\nvar svgWrap = [1, '<svg xmlns=\"http://www.w3.org/2000/svg\">', '</svg>'];\n\nvar markupWrap = {\n '*': [1, '?<div>', '</div>'],\n\n 'area': [1, '<map>', '</map>'],\n 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],\n 'legend': [1, '<fieldset>', '</fieldset>'],\n 'param': [1, '<object>', '</object>'],\n 'tr': [2, '<table><tbody>', '</tbody></table>'],\n\n 'optgroup': selectWrap,\n 'option': selectWrap,\n\n 'caption': tableWrap,\n 'colgroup': tableWrap,\n 'tbody': tableWrap,\n 'tfoot': tableWrap,\n 'thead': tableWrap,\n\n 'td': trWrap,\n 'th': trWrap\n};\n\n// Initialize the SVG elements since we know they'll always need to be wrapped\n// consistently. If they are created inside a <div> they will be initialized in\n// the wrong namespace (and will not display).\nvar svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];\nsvgElements.forEach(function (nodeName) {\n markupWrap[nodeName] = svgWrap;\n shouldWrap[nodeName] = true;\n});\n\n/**\n * Gets the markup wrap configuration for the supplied `nodeName`.\n *\n * NOTE: This lazily detects which wraps are necessary for the current browser.\n *\n * @param {string} nodeName Lowercase `nodeName`.\n * @return {?array} Markup wrap configuration, if applicable.\n */\nfunction getMarkupWrap(nodeName) {\n !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;\n if (!markupWrap.hasOwnProperty(nodeName)) {\n nodeName = '*';\n }\n if (!shouldWrap.hasOwnProperty(nodeName)) {\n if (nodeName === '*') {\n dummyNode.innerHTML = '<link />';\n } else {\n dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';\n }\n shouldWrap[nodeName] = !dummyNode.firstChild;\n }\n return shouldWrap[nodeName] ? markupWrap[nodeName] : null;\n}\n\nmodule.exports = getMarkupWrap;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMChildrenOperations = require('./DOMChildrenOperations');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\n\n/**\n * Operations used to process updates to DOM nodes.\n */\nvar ReactDOMIDOperations = {\n\n /**\n * Updates a component's children by processing a series of updates.\n *\n * @param {array<object>} updates List of update configurations.\n * @internal\n */\n dangerouslyProcessChildrenUpdates: function (parentInst, updates) {\n var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);\n DOMChildrenOperations.processUpdates(node, updates);\n }\n};\n\nmodule.exports = ReactDOMIDOperations;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/* global hasOwnProperty:true */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar AutoFocusUtils = require('./AutoFocusUtils');\nvar CSSPropertyOperations = require('./CSSPropertyOperations');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar DOMNamespaces = require('./DOMNamespaces');\nvar DOMProperty = require('./DOMProperty');\nvar DOMPropertyOperations = require('./DOMPropertyOperations');\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPluginRegistry = require('./EventPluginRegistry');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactDOMComponentFlags = require('./ReactDOMComponentFlags');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMInput = require('./ReactDOMInput');\nvar ReactDOMOption = require('./ReactDOMOption');\nvar ReactDOMSelect = require('./ReactDOMSelect');\nvar ReactDOMTextarea = require('./ReactDOMTextarea');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactMultiChild = require('./ReactMultiChild');\nvar ReactServerRenderingTransaction = require('./ReactServerRenderingTransaction');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar invariant = require('fbjs/lib/invariant');\nvar isEventSupported = require('./isEventSupported');\nvar shallowEqual = require('fbjs/lib/shallowEqual');\nvar validateDOMNesting = require('./validateDOMNesting');\nvar warning = require('fbjs/lib/warning');\n\nvar Flags = ReactDOMComponentFlags;\nvar deleteListener = EventPluginHub.deleteListener;\nvar getNode = ReactDOMComponentTree.getNodeFromInstance;\nvar listenTo = ReactBrowserEventEmitter.listenTo;\nvar registrationNameModules = EventPluginRegistry.registrationNameModules;\n\n// For quickly matching children type, to test if can be treated as content.\nvar CONTENT_TYPES = { 'string': true, 'number': true };\n\nvar STYLE = 'style';\nvar HTML = '__html';\nvar RESERVED_PROPS = {\n children: null,\n dangerouslySetInnerHTML: null,\n suppressContentEditableWarning: null\n};\n\n// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).\nvar DOC_FRAGMENT_TYPE = 11;\n\nfunction getDeclarationErrorAddendum(internalInstance) {\n if (internalInstance) {\n var owner = internalInstance._currentElement._owner || null;\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' This DOM node was rendered by `' + name + '`.';\n }\n }\n }\n return '';\n}\n\nfunction friendlyStringify(obj) {\n if (typeof obj === 'object') {\n if (Array.isArray(obj)) {\n return '[' + obj.map(friendlyStringify).join(', ') + ']';\n } else {\n var pairs = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var keyEscaped = /^[a-z$_][\\w$_]*$/i.test(key) ? key : JSON.stringify(key);\n pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));\n }\n }\n return '{' + pairs.join(', ') + '}';\n }\n } else if (typeof obj === 'string') {\n return JSON.stringify(obj);\n } else if (typeof obj === 'function') {\n return '[function object]';\n }\n // Differs from JSON.stringify in that undefined because undefined and that\n // inf and nan don't become null\n return String(obj);\n}\n\nvar styleMutationWarning = {};\n\nfunction checkAndWarnForMutatedStyle(style1, style2, component) {\n if (style1 == null || style2 == null) {\n return;\n }\n if (shallowEqual(style1, style2)) {\n return;\n }\n\n var componentName = component._tag;\n var owner = component._currentElement._owner;\n var ownerName;\n if (owner) {\n ownerName = owner.getName();\n }\n\n var hash = ownerName + '|' + componentName;\n\n if (styleMutationWarning.hasOwnProperty(hash)) {\n return;\n }\n\n styleMutationWarning[hash] = true;\n\n process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;\n}\n\n/**\n * @param {object} component\n * @param {?object} props\n */\nfunction assertValidProps(component, props) {\n if (!props) {\n return;\n }\n // Note the use of `==` which checks for null or undefined.\n if (voidElementTags[component._tag]) {\n !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;\n }\n if (props.dangerouslySetInnerHTML != null) {\n !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;\n !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;\n }\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;\n }\n !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \\'em\\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;\n}\n\nfunction enqueuePutListener(inst, registrationName, listener, transaction) {\n if (transaction instanceof ReactServerRenderingTransaction) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // IE8 has no API for event capturing and the `onScroll` event doesn't\n // bubble.\n process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\\'t support the `onScroll` event') : void 0;\n }\n var containerInfo = inst._hostContainerInfo;\n var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;\n var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;\n listenTo(registrationName, doc);\n transaction.getReactMountReady().enqueue(putListener, {\n inst: inst,\n registrationName: registrationName,\n listener: listener\n });\n}\n\nfunction putListener() {\n var listenerToPut = this;\n EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);\n}\n\nfunction inputPostMount() {\n var inst = this;\n ReactDOMInput.postMountWrapper(inst);\n}\n\nfunction textareaPostMount() {\n var inst = this;\n ReactDOMTextarea.postMountWrapper(inst);\n}\n\nfunction optionPostMount() {\n var inst = this;\n ReactDOMOption.postMountWrapper(inst);\n}\n\nvar setAndValidateContentChildDev = emptyFunction;\nif (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev = function (content) {\n var hasExistingContent = this._contentDebugID != null;\n var debugID = this._debugID;\n // This ID represents the inlined child that has no backing instance:\n var contentDebugID = -debugID;\n\n if (content == null) {\n if (hasExistingContent) {\n ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);\n }\n this._contentDebugID = null;\n return;\n }\n\n validateDOMNesting(null, String(content), this, this._ancestorInfo);\n this._contentDebugID = contentDebugID;\n if (hasExistingContent) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);\n ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);\n } else {\n ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);\n ReactInstrumentation.debugTool.onMountComponent(contentDebugID);\n ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);\n }\n };\n}\n\n// There are so many media events, it makes sense to just\n// maintain a list rather than create a `trapBubbledEvent` for each\nvar mediaEvents = {\n topAbort: 'abort',\n topCanPlay: 'canplay',\n topCanPlayThrough: 'canplaythrough',\n topDurationChange: 'durationchange',\n topEmptied: 'emptied',\n topEncrypted: 'encrypted',\n topEnded: 'ended',\n topError: 'error',\n topLoadedData: 'loadeddata',\n topLoadedMetadata: 'loadedmetadata',\n topLoadStart: 'loadstart',\n topPause: 'pause',\n topPlay: 'play',\n topPlaying: 'playing',\n topProgress: 'progress',\n topRateChange: 'ratechange',\n topSeeked: 'seeked',\n topSeeking: 'seeking',\n topStalled: 'stalled',\n topSuspend: 'suspend',\n topTimeUpdate: 'timeupdate',\n topVolumeChange: 'volumechange',\n topWaiting: 'waiting'\n};\n\nfunction trapBubbledEventsLocal() {\n var inst = this;\n // If a component renders to null or if another component fatals and causes\n // the state of the tree to be corrupted, `node` here can be null.\n !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;\n var node = getNode(inst);\n !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;\n\n switch (inst._tag) {\n case 'iframe':\n case 'object':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];\n break;\n case 'video':\n case 'audio':\n\n inst._wrapperState.listeners = [];\n // Create listener for each media event\n for (var event in mediaEvents) {\n if (mediaEvents.hasOwnProperty(event)) {\n inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));\n }\n }\n break;\n case 'source':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];\n break;\n case 'img':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];\n break;\n case 'form':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];\n break;\n case 'input':\n case 'select':\n case 'textarea':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];\n break;\n }\n}\n\nfunction postUpdateSelectWrapper() {\n ReactDOMSelect.postUpdateWrapper(this);\n}\n\n// For HTML, certain tags should omit their close tag. We keep a whitelist for\n// those special-case tags.\n\nvar omittedCloseTags = {\n 'area': true,\n 'base': true,\n 'br': true,\n 'col': true,\n 'embed': true,\n 'hr': true,\n 'img': true,\n 'input': true,\n 'keygen': true,\n 'link': true,\n 'meta': true,\n 'param': true,\n 'source': true,\n 'track': true,\n 'wbr': true\n};\n\nvar newlineEatingTags = {\n 'listing': true,\n 'pre': true,\n 'textarea': true\n};\n\n// For HTML, certain tags cannot have children. This has the same purpose as\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = _assign({\n 'menuitem': true\n}, omittedCloseTags);\n\n// We accept any tag to be rendered but since this gets injected into arbitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\nvar validatedTagCache = {};\nvar hasOwnProperty = {}.hasOwnProperty;\n\nfunction validateDangerousTag(tag) {\n if (!hasOwnProperty.call(validatedTagCache, tag)) {\n !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;\n validatedTagCache[tag] = true;\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n return tagName.indexOf('-') >= 0 || props.is != null;\n}\n\nvar globalIdCounter = 1;\n\n/**\n * Creates a new React class that is idempotent and capable of containing other\n * React components. It accepts event listeners and DOM properties that are\n * valid according to `DOMProperty`.\n *\n * - Event listeners: `onClick`, `onMouseDown`, etc.\n * - DOM properties: `className`, `name`, `title`, etc.\n *\n * The `style` property functions differently from the DOM API. It accepts an\n * object mapping of style properties to values.\n *\n * @constructor ReactDOMComponent\n * @extends ReactMultiChild\n */\nfunction ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}\n\nReactDOMComponent.displayName = 'ReactDOMComponent';\n\nReactDOMComponent.Mixin = {\n\n /**\n * Generates root tag markup then recurses. This method has side effects and\n * is not idempotent.\n *\n * @internal\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?ReactDOMComponent} the parent component instance\n * @param {?object} info about the host container\n * @param {object} context\n * @return {string} The computed markup.\n */\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n this._rootNodeID = globalIdCounter++;\n this._domID = hostContainerInfo._idCounter++;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n\n var props = this._currentElement.props;\n\n switch (this._tag) {\n case 'audio':\n case 'form':\n case 'iframe':\n case 'img':\n case 'link':\n case 'object':\n case 'source':\n case 'video':\n this._wrapperState = {\n listeners: null\n };\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'input':\n ReactDOMInput.mountWrapper(this, props, hostParent);\n props = ReactDOMInput.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'option':\n ReactDOMOption.mountWrapper(this, props, hostParent);\n props = ReactDOMOption.getHostProps(this, props);\n break;\n case 'select':\n ReactDOMSelect.mountWrapper(this, props, hostParent);\n props = ReactDOMSelect.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'textarea':\n ReactDOMTextarea.mountWrapper(this, props, hostParent);\n props = ReactDOMTextarea.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n }\n\n assertValidProps(this, props);\n\n // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n var namespaceURI;\n var parentTag;\n if (hostParent != null) {\n namespaceURI = hostParent._namespaceURI;\n parentTag = hostParent._tag;\n } else if (hostContainerInfo._tag) {\n namespaceURI = hostContainerInfo._namespaceURI;\n parentTag = hostContainerInfo._tag;\n }\n if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {\n namespaceURI = DOMNamespaces.html;\n }\n if (namespaceURI === DOMNamespaces.html) {\n if (this._tag === 'svg') {\n namespaceURI = DOMNamespaces.svg;\n } else if (this._tag === 'math') {\n namespaceURI = DOMNamespaces.mathml;\n }\n }\n this._namespaceURI = namespaceURI;\n\n if (process.env.NODE_ENV !== 'production') {\n var parentInfo;\n if (hostParent != null) {\n parentInfo = hostParent._ancestorInfo;\n } else if (hostContainerInfo._tag) {\n parentInfo = hostContainerInfo._ancestorInfo;\n }\n if (parentInfo) {\n // parentInfo should always be present except for the top-level\n // component when server rendering\n validateDOMNesting(this._tag, null, this, parentInfo);\n }\n this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);\n }\n\n var mountImage;\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var el;\n if (namespaceURI === DOMNamespaces.html) {\n if (this._tag === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n var type = this._currentElement.type;\n div.innerHTML = '<' + type + '></' + type + '>';\n el = div.removeChild(div.firstChild);\n } else if (props.is) {\n el = ownerDocument.createElement(this._currentElement.type, props.is);\n } else {\n // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n el = ownerDocument.createElement(this._currentElement.type);\n }\n } else {\n el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);\n }\n ReactDOMComponentTree.precacheNode(this, el);\n this._flags |= Flags.hasCachedChildNodes;\n if (!this._hostParent) {\n DOMPropertyOperations.setAttributeForRoot(el);\n }\n this._updateDOMProperties(null, props, transaction);\n var lazyTree = DOMLazyTree(el);\n this._createInitialChildren(transaction, props, context, lazyTree);\n mountImage = lazyTree;\n } else {\n var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);\n var tagContent = this._createContentMarkup(transaction, props, context);\n if (!tagContent && omittedCloseTags[this._tag]) {\n mountImage = tagOpen + '/>';\n } else {\n mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';\n }\n }\n\n switch (this._tag) {\n case 'input':\n transaction.getReactMountReady().enqueue(inputPostMount, this);\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'textarea':\n transaction.getReactMountReady().enqueue(textareaPostMount, this);\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'select':\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'button':\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'option':\n transaction.getReactMountReady().enqueue(optionPostMount, this);\n break;\n }\n\n return mountImage;\n },\n\n /**\n * Creates markup for the open tag and all attributes.\n *\n * This method has side effects because events get registered.\n *\n * Iterating over object properties is faster than iterating over arrays.\n * @see http://jsperf.com/obj-vs-arr-iteration\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} props\n * @return {string} Markup of opening tag.\n */\n _createOpenTagMarkupAndPutListeners: function (transaction, props) {\n var ret = '<' + this._currentElement.type;\n\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n var propValue = props[propKey];\n if (propValue == null) {\n continue;\n }\n if (registrationNameModules.hasOwnProperty(propKey)) {\n if (propValue) {\n enqueuePutListener(this, propKey, propValue, transaction);\n }\n } else {\n if (propKey === STYLE) {\n if (propValue) {\n if (process.env.NODE_ENV !== 'production') {\n // See `_updateDOMProperties`. style block\n this._previousStyle = propValue;\n }\n propValue = this._previousStyleCopy = _assign({}, props.style);\n }\n propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);\n }\n var markup = null;\n if (this._tag != null && isCustomComponent(this._tag, props)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);\n }\n } else {\n markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);\n }\n if (markup) {\n ret += ' ' + markup;\n }\n }\n }\n\n // For static pages, no need to put React ID and checksum. Saves lots of\n // bytes.\n if (transaction.renderToStaticMarkup) {\n return ret;\n }\n\n if (!this._hostParent) {\n ret += ' ' + DOMPropertyOperations.createMarkupForRoot();\n }\n ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);\n return ret;\n },\n\n /**\n * Creates markup for the content between the tags.\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} props\n * @param {object} context\n * @return {string} Content markup.\n */\n _createContentMarkup: function (transaction, props, context) {\n var ret = '';\n\n // Intentional use of != to avoid catching zero/false.\n var innerHTML = props.dangerouslySetInnerHTML;\n if (innerHTML != null) {\n if (innerHTML.__html != null) {\n ret = innerHTML.__html;\n }\n } else {\n var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;\n var childrenToUse = contentToUse != null ? null : props.children;\n if (contentToUse != null) {\n // TODO: Validate that text is allowed as a child of this node\n ret = escapeTextContentForBrowser(contentToUse);\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, contentToUse);\n }\n } else if (childrenToUse != null) {\n var mountImages = this.mountChildren(childrenToUse, transaction, context);\n ret = mountImages.join('');\n }\n }\n if (newlineEatingTags[this._tag] && ret.charAt(0) === '\\n') {\n // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n return '\\n' + ret;\n } else {\n return ret;\n }\n },\n\n _createInitialChildren: function (transaction, props, context, lazyTree) {\n // Intentional use of != to avoid catching zero/false.\n var innerHTML = props.dangerouslySetInnerHTML;\n if (innerHTML != null) {\n if (innerHTML.__html != null) {\n DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);\n }\n } else {\n var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;\n var childrenToUse = contentToUse != null ? null : props.children;\n if (contentToUse != null) {\n // TODO: Validate that text is allowed as a child of this node\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, contentToUse);\n }\n DOMLazyTree.queueText(lazyTree, contentToUse);\n } else if (childrenToUse != null) {\n var mountImages = this.mountChildren(childrenToUse, transaction, context);\n for (var i = 0; i < mountImages.length; i++) {\n DOMLazyTree.queueChild(lazyTree, mountImages[i]);\n }\n }\n }\n },\n\n /**\n * Receives a next element and updates the component.\n *\n * @internal\n * @param {ReactElement} nextElement\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} context\n */\n receiveComponent: function (nextElement, transaction, context) {\n var prevElement = this._currentElement;\n this._currentElement = nextElement;\n this.updateComponent(transaction, prevElement, nextElement, context);\n },\n\n /**\n * Updates a DOM component after it has already been allocated and\n * attached to the DOM. Reconciles the root DOM node, then recurses.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevElement\n * @param {ReactElement} nextElement\n * @internal\n * @overridable\n */\n updateComponent: function (transaction, prevElement, nextElement, context) {\n var lastProps = prevElement.props;\n var nextProps = this._currentElement.props;\n\n switch (this._tag) {\n case 'input':\n lastProps = ReactDOMInput.getHostProps(this, lastProps);\n nextProps = ReactDOMInput.getHostProps(this, nextProps);\n break;\n case 'option':\n lastProps = ReactDOMOption.getHostProps(this, lastProps);\n nextProps = ReactDOMOption.getHostProps(this, nextProps);\n break;\n case 'select':\n lastProps = ReactDOMSelect.getHostProps(this, lastProps);\n nextProps = ReactDOMSelect.getHostProps(this, nextProps);\n break;\n case 'textarea':\n lastProps = ReactDOMTextarea.getHostProps(this, lastProps);\n nextProps = ReactDOMTextarea.getHostProps(this, nextProps);\n break;\n }\n\n assertValidProps(this, nextProps);\n this._updateDOMProperties(lastProps, nextProps, transaction);\n this._updateDOMChildren(lastProps, nextProps, transaction, context);\n\n switch (this._tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `_updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n ReactDOMInput.updateWrapper(this);\n break;\n case 'textarea':\n ReactDOMTextarea.updateWrapper(this);\n break;\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);\n break;\n }\n },\n\n /**\n * Reconciles the properties by detecting differences in property values and\n * updating the DOM as necessary. This function is probably the single most\n * critical path for performance optimization.\n *\n * TODO: Benchmark whether checking for changed values in memory actually\n * improves performance (especially statically positioned elements).\n * TODO: Benchmark the effects of putting this at the top since 99% of props\n * do not change for a given reconciliation.\n * TODO: Benchmark areas that can be improved with caching.\n *\n * @private\n * @param {object} lastProps\n * @param {object} nextProps\n * @param {?DOMElement} node\n */\n _updateDOMProperties: function (lastProps, nextProps, transaction) {\n var propKey;\n var styleName;\n var styleUpdates;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = this._previousStyleCopy;\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n this._previousStyleCopy = null;\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (lastProps[propKey]) {\n // Only call deleteListener if there was a listener previously or\n // else willDeleteListener gets called when there wasn't actually a\n // listener (e.g., onClick={null})\n deleteListener(this, propKey);\n }\n } else if (isCustomComponent(this._tag, lastProps)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);\n }\n } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {\n DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n if (nextProp) {\n if (process.env.NODE_ENV !== 'production') {\n checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);\n this._previousStyle = nextProp;\n }\n nextProp = this._previousStyleCopy = _assign({}, nextProp);\n } else {\n this._previousStyleCopy = null;\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n styleUpdates = nextProp;\n }\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp) {\n enqueuePutListener(this, propKey, nextProp, transaction);\n } else if (lastProp) {\n deleteListener(this, propKey);\n }\n } else if (isCustomComponent(this._tag, nextProps)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);\n }\n } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {\n var node = getNode(this);\n // If we're updating to null or undefined, we should remove the property\n // from the DOM node instead of inadvertently setting to a string. This\n // brings us in line with the same behavior we have on initial render.\n if (nextProp != null) {\n DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);\n } else {\n DOMPropertyOperations.deleteValueForProperty(node, propKey);\n }\n }\n }\n if (styleUpdates) {\n CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);\n }\n },\n\n /**\n * Reconciles the children with the various properties that affect the\n * children content.\n *\n * @param {object} lastProps\n * @param {object} nextProps\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n */\n _updateDOMChildren: function (lastProps, nextProps, transaction, context) {\n var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;\n var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;\n\n var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;\n var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;\n\n // Note the use of `!=` which checks for null or undefined.\n var lastChildren = lastContent != null ? null : lastProps.children;\n var nextChildren = nextContent != null ? null : nextProps.children;\n\n // If we're switching from children to content/html or vice versa, remove\n // the old content\n var lastHasContentOrHtml = lastContent != null || lastHtml != null;\n var nextHasContentOrHtml = nextContent != null || nextHtml != null;\n if (lastChildren != null && nextChildren == null) {\n this.updateChildren(null, transaction, context);\n } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {\n this.updateTextContent('');\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);\n }\n }\n\n if (nextContent != null) {\n if (lastContent !== nextContent) {\n this.updateTextContent('' + nextContent);\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, nextContent);\n }\n }\n } else if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n this.updateMarkup('' + nextHtml);\n }\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);\n }\n } else if (nextChildren != null) {\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, null);\n }\n\n this.updateChildren(nextChildren, transaction, context);\n }\n },\n\n getHostNode: function () {\n return getNode(this);\n },\n\n /**\n * Destroys all event registrations for this instance. Does not remove from\n * the DOM. That must be done by the parent.\n *\n * @internal\n */\n unmountComponent: function (safely) {\n switch (this._tag) {\n case 'audio':\n case 'form':\n case 'iframe':\n case 'img':\n case 'link':\n case 'object':\n case 'source':\n case 'video':\n var listeners = this._wrapperState.listeners;\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].remove();\n }\n }\n break;\n case 'html':\n case 'head':\n case 'body':\n /**\n * Components like <html> <head> and <body> can't be removed or added\n * easily in a cross-browser way, however it's valuable to be able to\n * take advantage of React's reconciliation for styling and <title>\n * management. So we just document it and throw in dangerous cases.\n */\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;\n break;\n }\n\n this.unmountChildren(safely);\n ReactDOMComponentTree.uncacheNode(this);\n EventPluginHub.deleteAllListeners(this);\n this._rootNodeID = 0;\n this._domID = 0;\n this._wrapperState = null;\n\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, null);\n }\n },\n\n getPublicInstance: function () {\n return getNode(this);\n }\n\n};\n\n_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);\n\nmodule.exports = ReactDOMComponent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\n\nvar focusNode = require('fbjs/lib/focusNode');\n\nvar AutoFocusUtils = {\n focusDOMComponent: function () {\n focusNode(ReactDOMComponentTree.getNodeFromInstance(this));\n }\n};\n\nmodule.exports = AutoFocusUtils;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar CSSProperty = require('./CSSProperty');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar ReactInstrumentation = require('./ReactInstrumentation');\n\nvar camelizeStyleName = require('fbjs/lib/camelizeStyleName');\nvar dangerousStyleValue = require('./dangerousStyleValue');\nvar hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');\nvar memoizeStringOnly = require('fbjs/lib/memoizeStringOnly');\nvar warning = require('fbjs/lib/warning');\n\nvar processStyleName = memoizeStringOnly(function (styleName) {\n return hyphenateStyleName(styleName);\n});\n\nvar hasShorthandPropertyBug = false;\nvar styleFloatAccessor = 'cssFloat';\nif (ExecutionEnvironment.canUseDOM) {\n var tempStyle = document.createElement('div').style;\n try {\n // IE8 throws \"Invalid argument.\" if resetting shorthand style properties.\n tempStyle.font = '';\n } catch (e) {\n hasShorthandPropertyBug = true;\n }\n // IE8 only supports accessing cssFloat (standard) as styleFloat\n if (document.documentElement.style.cssFloat === undefined) {\n styleFloatAccessor = 'styleFloat';\n }\n}\n\nif (process.env.NODE_ENV !== 'production') {\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n\n // style values shouldn't contain a semicolon\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n\n var warnHyphenatedStyleName = function (name, owner) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;\n };\n\n var warnBadVendoredStyleName = function (name, owner) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;\n };\n\n var warnStyleValueWithSemicolon = function (name, value, owner) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\\'t contain a semicolon.%s ' + 'Try \"%s: %s\" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;\n };\n\n var warnStyleValueIsNaN = function (name, value, owner) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;\n };\n\n var checkRenderMessage = function (owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n };\n\n /**\n * @param {string} name\n * @param {*} value\n * @param {ReactDOMComponent} component\n */\n var warnValidStyle = function (name, value, component) {\n var owner;\n if (component) {\n owner = component._currentElement._owner;\n }\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name, owner);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name, owner);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value, owner);\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n warnStyleValueIsNaN(name, value, owner);\n }\n };\n}\n\n/**\n * Operations for dealing with CSS properties.\n */\nvar CSSPropertyOperations = {\n\n /**\n * Serializes a mapping of style properties for use as inline styles:\n *\n * > createMarkupForStyles({width: '200px', height: 0})\n * \"width:200px;height:0;\"\n *\n * Undefined values are ignored so that declarative programming is easier.\n * The result should be HTML-escaped before insertion into the DOM.\n *\n * @param {object} styles\n * @param {ReactDOMComponent} component\n * @return {?string}\n */\n createMarkupForStyles: function (styles, component) {\n var serialized = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (process.env.NODE_ENV !== 'production') {\n warnValidStyle(styleName, styleValue, component);\n }\n if (styleValue != null) {\n serialized += processStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, component) + ';';\n }\n }\n return serialized || null;\n },\n\n /**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n * @param {ReactDOMComponent} component\n */\n setValueForStyles: function (node, styles, component) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: component._debugID,\n type: 'update styles',\n payload: styles\n });\n }\n\n var style = node.style;\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n if (process.env.NODE_ENV !== 'production') {\n warnValidStyle(styleName, styles[styleName], component);\n }\n var styleValue = dangerousStyleValue(styleName, styles[styleName], component);\n if (styleName === 'float' || styleName === 'cssFloat') {\n styleName = styleFloatAccessor;\n }\n if (styleValue) {\n style[styleName] = styleValue;\n } else {\n var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];\n if (expansion) {\n // Shorthand property that IE8 won't like unsetting, so unset each\n // component to placate it\n for (var individualStyleName in expansion) {\n style[individualStyleName] = '';\n }\n } else {\n style[styleName] = '';\n }\n }\n }\n }\n\n};\n\nmodule.exports = CSSPropertyOperations;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n'use strict';\n\nvar camelize = require('./camelize');\n\nvar msPattern = /^-ms-/;\n\n/**\n * Camelcases a hyphenated CSS property name, for example:\n *\n * > camelizeStyleName('background-color')\n * < \"backgroundColor\"\n * > camelizeStyleName('-moz-transition')\n * < \"MozTransition\"\n * > camelizeStyleName('-ms-transition')\n * < \"msTransition\"\n *\n * As Andi Smith suggests\n * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n * is converted to lowercase `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelizeStyleName(string) {\n return camelize(string.replace(msPattern, 'ms-'));\n}\n\nmodule.exports = camelizeStyleName;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar _hyphenPattern = /-(.)/g;\n\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar CSSProperty = require('./CSSProperty');\nvar warning = require('fbjs/lib/warning');\n\nvar isUnitlessNumber = CSSProperty.isUnitlessNumber;\nvar styleWarnings = {};\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @param {ReactDOMComponent} component\n * @return {string} Normalized style value with dimensions applied.\n */\nfunction dangerousStyleValue(name, value, component) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n if (isEmpty) {\n return '';\n }\n\n var isNonNumeric = isNaN(value);\n if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {\n return '' + value; // cast to string\n }\n\n if (typeof value === 'string') {\n if (process.env.NODE_ENV !== 'production') {\n // Allow '0' to pass through without warning. 0 is already special and\n // doesn't require units, so we don't need to warn about it.\n if (component && value !== '0') {\n var owner = component._currentElement._owner;\n var ownerName = owner ? owner.getName() : null;\n if (ownerName && !styleWarnings[ownerName]) {\n styleWarnings[ownerName] = {};\n }\n var warned = false;\n if (ownerName) {\n var warnings = styleWarnings[ownerName];\n warned = warnings[name];\n if (!warned) {\n warnings[name] = true;\n }\n }\n if (!warned) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;\n }\n }\n }\n value = value.trim();\n }\n return value + 'px';\n}\n\nmodule.exports = dangerousStyleValue;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n'use strict';\n\nvar hyphenate = require('./hyphenate');\n\nvar msPattern = /^ms-/;\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}\n\nmodule.exports = hyphenateStyleName;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar _uppercasePattern = /([A-Z])/g;\n\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenate(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nmodule.exports = hyphenate;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @typechecks static-only\n */\n\n'use strict';\n\n/**\n * Memoizes the return value of a function that accepts one string argument.\n */\n\nfunction memoizeStringOnly(callback) {\n var cache = {};\n return function (string) {\n if (!cache.hasOwnProperty(string)) {\n cache[string] = callback.call(this, string);\n }\n return cache[string];\n };\n}\n\nmodule.exports = memoizeStringOnly;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\n\n/**\n * Escapes attribute value to prevent scripting attacks.\n *\n * @param {*} value Value to escape.\n * @return {string} An escaped string.\n */\nfunction quoteAttributeValueForBrowser(value) {\n return '\"' + escapeTextContentForBrowser(value) + '\"';\n}\n\nmodule.exports = quoteAttributeValueForBrowser;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar EventPluginHub = require('./EventPluginHub');\n\nfunction runEventQueueInBatch(events) {\n EventPluginHub.enqueueEvents(events);\n EventPluginHub.processEventQueue(false);\n}\n\nvar ReactEventEmitterMixin = {\n\n /**\n * Streams a fired top-level event to `EventPluginHub` where plugins have the\n * opportunity to create `ReactEvent`s to be dispatched.\n */\n handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n runEventQueueInBatch(events);\n }\n};\n\nmodule.exports = ReactEventEmitterMixin;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n prefixes['ms' + styleProp] = 'MS' + eventName;\n prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();\n\n return prefixes;\n}\n\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\nvar prefixedEventNames = {};\n\n/**\n * Element to check for prefixes on.\n */\nvar style = {};\n\n/**\n * Bootstrap if a DOM exists.\n */\nif (ExecutionEnvironment.canUseDOM) {\n style = document.createElement('div').style;\n\n // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n }\n\n // Same as above\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return '';\n}\n\nmodule.exports = getVendorPrefixedEventName;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar DOMPropertyOperations = require('./DOMPropertyOperations');\nvar LinkedValueUtils = require('./LinkedValueUtils');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar didWarnValueLink = false;\nvar didWarnCheckedLink = false;\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction forceUpdateIfMounted() {\n if (this._rootNodeID) {\n // DOM component is still mounted; update\n ReactDOMInput.updateWrapper(this);\n }\n}\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\nvar ReactDOMInput = {\n getHostProps: function (inst, props) {\n var value = LinkedValueUtils.getValue(props);\n var checked = LinkedValueUtils.getChecked(props);\n\n var hostProps = _assign({\n // Make sure we set .type before any other properties (setting .value\n // before .type means .value is lost in IE11 and below)\n type: undefined,\n // Make sure we set .step before .value (setting .value before .step\n // means .value is rounded on mount, based upon step precision)\n step: undefined,\n // Make sure we set .min & .max before .value (to ensure proper order\n // in corner cases such as min or max deriving from value, e.g. Issue #7170)\n min: undefined,\n max: undefined\n }, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: value != null ? value : inst._wrapperState.initialValue,\n checked: checked != null ? checked : inst._wrapperState.initialChecked,\n onChange: inst._wrapperState.onChange\n });\n\n return hostProps;\n },\n\n mountWrapper: function (inst, props) {\n if (process.env.NODE_ENV !== 'production') {\n LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);\n\n var owner = inst._currentElement._owner;\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n if (props.checkedLink !== undefined && !didWarnCheckedLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnCheckedLink = true;\n }\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnCheckedDefaultChecked = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnValueDefaultValue = true;\n }\n }\n\n var defaultValue = props.defaultValue;\n inst._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: props.value != null ? props.value : defaultValue,\n listeners: null,\n onChange: _handleChange.bind(inst)\n };\n\n if (process.env.NODE_ENV !== 'production') {\n inst._wrapperState.controlled = isControlled(props);\n }\n },\n\n updateWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n if (process.env.NODE_ENV !== 'production') {\n var controlled = isControlled(props);\n var owner = inst._currentElement._owner;\n\n if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnUncontrolledToControlled = true;\n }\n if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnControlledToUncontrolled = true;\n }\n }\n\n // TODO: Shouldn't this be getChecked(props)?\n var checked = props.checked;\n if (checked != null) {\n DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);\n }\n\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = '' + value;\n\n // To avoid side effects (such as losing text selection), only set value if changed\n if (newValue !== node.value) {\n node.value = newValue;\n }\n } else {\n if (props.value == null && props.defaultValue != null) {\n node.defaultValue = '' + props.defaultValue;\n }\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n },\n\n postMountWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n\n // Detach value from defaultValue. We won't do anything if we're working on\n // submit or reset inputs as those values & defaultValues are linked. They\n // are not resetable nodes so this operation doesn't matter and actually\n // removes browser-default values (eg \"Submit Query\") when no value is\n // provided.\n\n switch (props.type) {\n case 'submit':\n case 'reset':\n break;\n case 'color':\n case 'date':\n case 'datetime':\n case 'datetime-local':\n case 'month':\n case 'time':\n case 'week':\n // This fixes the no-show issue on iOS Safari and Android Chrome:\n // https://github.com/facebook/react/issues/7233\n node.value = '';\n node.value = node.defaultValue;\n break;\n default:\n node.value = node.value;\n break;\n }\n\n // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n var name = node.name;\n if (name !== '') {\n node.name = '';\n }\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !node.defaultChecked;\n if (name !== '') {\n node.name = name;\n }\n }\n};\n\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n\n // Here we use asap to wait until all updates have propagated, which\n // is important when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n ReactUpdates.asap(forceUpdateIfMounted, this);\n\n var name = props.name;\n if (props.type === 'radio' && name != null) {\n var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n }\n\n // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form, let's just use the global\n // `querySelectorAll` to ensure we don't miss anything.\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n }\n // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);\n !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;\n // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n ReactUpdates.asap(forceUpdateIfMounted, otherInstance);\n }\n }\n\n return returnValue;\n}\n\nmodule.exports = ReactDOMInput;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar React = require('react/lib/React');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMSelect = require('./ReactDOMSelect');\n\nvar warning = require('fbjs/lib/warning');\nvar didWarnInvalidOptionChildren = false;\n\nfunction flattenChildren(children) {\n var content = '';\n\n // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n if (typeof child === 'string' || typeof child === 'number') {\n content += child;\n } else if (!didWarnInvalidOptionChildren) {\n didWarnInvalidOptionChildren = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;\n }\n });\n\n return content;\n}\n\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\nvar ReactDOMOption = {\n mountWrapper: function (inst, props, hostParent) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;\n }\n\n // Look up whether this option is 'selected'\n var selectValue = null;\n if (hostParent != null) {\n var selectParent = hostParent;\n\n if (selectParent._tag === 'optgroup') {\n selectParent = selectParent._hostParent;\n }\n\n if (selectParent != null && selectParent._tag === 'select') {\n selectValue = ReactDOMSelect.getSelectValueContext(selectParent);\n }\n }\n\n // If the value is null (e.g., no specified value or after initial mount)\n // or missing (e.g., for <datalist>), we don't change props.selected\n var selected = null;\n if (selectValue != null) {\n var value;\n if (props.value != null) {\n value = props.value + '';\n } else {\n value = flattenChildren(props.children);\n }\n selected = false;\n if (Array.isArray(selectValue)) {\n // multiple\n for (var i = 0; i < selectValue.length; i++) {\n if ('' + selectValue[i] === value) {\n selected = true;\n break;\n }\n }\n } else {\n selected = '' + selectValue === value;\n }\n }\n\n inst._wrapperState = { selected: selected };\n },\n\n postMountWrapper: function (inst) {\n // value=\"\" should make a value attribute (#6219)\n var props = inst._currentElement.props;\n if (props.value != null) {\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n node.setAttribute('value', props.value);\n }\n },\n\n getHostProps: function (inst, props) {\n var hostProps = _assign({ selected: undefined, children: undefined }, props);\n\n // Read state only from initial mount because <select> updates value\n // manually; we need the initial state only for server rendering\n if (inst._wrapperState.selected != null) {\n hostProps.selected = inst._wrapperState.selected;\n }\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n }\n\n};\n\nmodule.exports = ReactDOMOption;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar LinkedValueUtils = require('./LinkedValueUtils');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar didWarnValueLink = false;\nvar didWarnValDefaultVal = false;\n\nfunction forceUpdateIfMounted() {\n if (this._rootNodeID) {\n // DOM component is still mounted; update\n ReactDOMTextarea.updateWrapper(this);\n }\n}\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nvar ReactDOMTextarea = {\n getHostProps: function (inst, props) {\n !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;\n\n // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.\n // The value can be a boolean or object so that's why it's forced to be a string.\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: '' + inst._wrapperState.initialValue,\n onChange: inst._wrapperState.onChange\n });\n\n return hostProps;\n },\n\n mountWrapper: function (inst, props) {\n if (process.env.NODE_ENV !== 'production') {\n LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;\n didWarnValDefaultVal = true;\n }\n }\n\n var value = LinkedValueUtils.getValue(props);\n var initialValue = value;\n\n // Only bother fetching default value if we're going to use it\n if (value == null) {\n var defaultValue = props.defaultValue;\n // TODO (yungsters): Remove support for children content in <textarea>.\n var children = props.children;\n if (children != null) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;\n }\n !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;\n if (Array.isArray(children)) {\n !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;\n children = children[0];\n }\n\n defaultValue = '' + children;\n }\n if (defaultValue == null) {\n defaultValue = '';\n }\n initialValue = defaultValue;\n }\n\n inst._wrapperState = {\n initialValue: '' + initialValue,\n listeners: null,\n onChange: _handleChange.bind(inst)\n };\n },\n\n updateWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = '' + value;\n\n // To avoid side effects (such as losing text selection), only set value if changed\n if (newValue !== node.value) {\n node.value = newValue;\n }\n if (props.defaultValue == null) {\n node.defaultValue = newValue;\n }\n }\n if (props.defaultValue != null) {\n node.defaultValue = props.defaultValue;\n }\n },\n\n postMountWrapper: function (inst) {\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n\n // Warning: node.value may be the empty string at this point (IE11) if placeholder is set.\n node.value = node.textContent; // Detach value from defaultValue\n }\n};\n\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n ReactUpdates.asap(forceUpdateIfMounted, this);\n return returnValue;\n}\n\nmodule.exports = ReactDOMTextarea;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactComponentEnvironment = require('./ReactComponentEnvironment');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\n\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactReconciler = require('./ReactReconciler');\nvar ReactChildReconciler = require('./ReactChildReconciler');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar flattenChildren = require('./flattenChildren');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Make an update for markup to be rendered and inserted at a supplied index.\n *\n * @param {string} markup Markup that renders into an element.\n * @param {number} toIndex Destination index.\n * @private\n */\nfunction makeInsertMarkup(markup, afterNode, toIndex) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'INSERT_MARKUP',\n content: markup,\n fromIndex: null,\n fromNode: null,\n toIndex: toIndex,\n afterNode: afterNode\n };\n}\n\n/**\n * Make an update for moving an existing element to another index.\n *\n * @param {number} fromIndex Source index of the existing element.\n * @param {number} toIndex Destination index of the element.\n * @private\n */\nfunction makeMove(child, afterNode, toIndex) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'MOVE_EXISTING',\n content: null,\n fromIndex: child._mountIndex,\n fromNode: ReactReconciler.getHostNode(child),\n toIndex: toIndex,\n afterNode: afterNode\n };\n}\n\n/**\n * Make an update for removing an element at an index.\n *\n * @param {number} fromIndex Index of the element to remove.\n * @private\n */\nfunction makeRemove(child, node) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'REMOVE_NODE',\n content: null,\n fromIndex: child._mountIndex,\n fromNode: node,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Make an update for setting the markup of a node.\n *\n * @param {string} markup Markup that renders into an element.\n * @private\n */\nfunction makeSetMarkup(markup) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'SET_MARKUP',\n content: markup,\n fromIndex: null,\n fromNode: null,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Make an update for setting the text content.\n *\n * @param {string} textContent Text content to set.\n * @private\n */\nfunction makeTextContent(textContent) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'TEXT_CONTENT',\n content: textContent,\n fromIndex: null,\n fromNode: null,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Push an update, if any, onto the queue. Creates a new queue if none is\n * passed and always returns the queue. Mutative.\n */\nfunction enqueue(queue, update) {\n if (update) {\n queue = queue || [];\n queue.push(update);\n }\n return queue;\n}\n\n/**\n * Processes any enqueued updates.\n *\n * @private\n */\nfunction processQueue(inst, updateQueue) {\n ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);\n}\n\nvar setChildrenForInstrumentation = emptyFunction;\nif (process.env.NODE_ENV !== 'production') {\n var getDebugID = function (inst) {\n if (!inst._debugID) {\n // Check for ART-like instances. TODO: This is silly/gross.\n var internal;\n if (internal = ReactInstanceMap.get(inst)) {\n inst = internal;\n }\n }\n return inst._debugID;\n };\n setChildrenForInstrumentation = function (children) {\n var debugID = getDebugID(this);\n // TODO: React Native empty components are also multichild.\n // This means they still get into this method but don't have _debugID.\n if (debugID !== 0) {\n ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {\n return children[key]._debugID;\n }) : []);\n }\n };\n}\n\n/**\n * ReactMultiChild are capable of reconciling multiple children.\n *\n * @class ReactMultiChild\n * @internal\n */\nvar ReactMultiChild = {\n\n /**\n * Provides common functionality for components that must reconcile multiple\n * children. This is used by `ReactDOMComponent` to mount, update, and\n * unmount child components.\n *\n * @lends {ReactMultiChild.prototype}\n */\n Mixin: {\n\n _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {\n if (process.env.NODE_ENV !== 'production') {\n var selfDebugID = getDebugID(this);\n if (this._currentElement) {\n try {\n ReactCurrentOwner.current = this._currentElement._owner;\n return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);\n } finally {\n ReactCurrentOwner.current = null;\n }\n }\n }\n return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);\n },\n\n _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {\n var nextChildren;\n var selfDebugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n selfDebugID = getDebugID(this);\n if (this._currentElement) {\n try {\n ReactCurrentOwner.current = this._currentElement._owner;\n nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);\n } finally {\n ReactCurrentOwner.current = null;\n }\n ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);\n return nextChildren;\n }\n }\n nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);\n ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);\n return nextChildren;\n },\n\n /**\n * Generates a \"mount image\" for each of the supplied children. In the case\n * of `ReactDOMComponent`, a mount image is a string of markup.\n *\n * @param {?object} nestedChildren Nested child maps.\n * @return {array} An array of mounted representations.\n * @internal\n */\n mountChildren: function (nestedChildren, transaction, context) {\n var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);\n this._renderedChildren = children;\n\n var mountImages = [];\n var index = 0;\n for (var name in children) {\n if (children.hasOwnProperty(name)) {\n var child = children[name];\n var selfDebugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n selfDebugID = getDebugID(this);\n }\n var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);\n child._mountIndex = index++;\n mountImages.push(mountImage);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n setChildrenForInstrumentation.call(this, children);\n }\n\n return mountImages;\n },\n\n /**\n * Replaces any rendered children with a text content string.\n *\n * @param {string} nextContent String of content.\n * @internal\n */\n updateTextContent: function (nextContent) {\n var prevChildren = this._renderedChildren;\n // Remove any rendered children.\n ReactChildReconciler.unmountChildren(prevChildren, false);\n for (var name in prevChildren) {\n if (prevChildren.hasOwnProperty(name)) {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;\n }\n }\n // Set new text content.\n var updates = [makeTextContent(nextContent)];\n processQueue(this, updates);\n },\n\n /**\n * Replaces any rendered children with a markup string.\n *\n * @param {string} nextMarkup String of markup.\n * @internal\n */\n updateMarkup: function (nextMarkup) {\n var prevChildren = this._renderedChildren;\n // Remove any rendered children.\n ReactChildReconciler.unmountChildren(prevChildren, false);\n for (var name in prevChildren) {\n if (prevChildren.hasOwnProperty(name)) {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;\n }\n }\n var updates = [makeSetMarkup(nextMarkup)];\n processQueue(this, updates);\n },\n\n /**\n * Updates the rendered children with new children.\n *\n * @param {?object} nextNestedChildrenElements Nested child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n updateChildren: function (nextNestedChildrenElements, transaction, context) {\n // Hook used by React ART\n this._updateChildren(nextNestedChildrenElements, transaction, context);\n },\n\n /**\n * @param {?object} nextNestedChildrenElements Nested child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @final\n * @protected\n */\n _updateChildren: function (nextNestedChildrenElements, transaction, context) {\n var prevChildren = this._renderedChildren;\n var removedNodes = {};\n var mountImages = [];\n var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);\n if (!nextChildren && !prevChildren) {\n return;\n }\n var updates = null;\n var name;\n // `nextIndex` will increment for each child in `nextChildren`, but\n // `lastIndex` will be the last index visited in `prevChildren`.\n var nextIndex = 0;\n var lastIndex = 0;\n // `nextMountIndex` will increment for each newly mounted child.\n var nextMountIndex = 0;\n var lastPlacedNode = null;\n for (name in nextChildren) {\n if (!nextChildren.hasOwnProperty(name)) {\n continue;\n }\n var prevChild = prevChildren && prevChildren[name];\n var nextChild = nextChildren[name];\n if (prevChild === nextChild) {\n updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));\n lastIndex = Math.max(prevChild._mountIndex, lastIndex);\n prevChild._mountIndex = nextIndex;\n } else {\n if (prevChild) {\n // Update `lastIndex` before `_mountIndex` gets unset by unmounting.\n lastIndex = Math.max(prevChild._mountIndex, lastIndex);\n // The `removedNodes` loop below will actually remove the child.\n }\n // The child must be instantiated before it's mounted.\n updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));\n nextMountIndex++;\n }\n nextIndex++;\n lastPlacedNode = ReactReconciler.getHostNode(nextChild);\n }\n // Remove children that are no longer present.\n for (name in removedNodes) {\n if (removedNodes.hasOwnProperty(name)) {\n updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));\n }\n }\n if (updates) {\n processQueue(this, updates);\n }\n this._renderedChildren = nextChildren;\n\n if (process.env.NODE_ENV !== 'production') {\n setChildrenForInstrumentation.call(this, nextChildren);\n }\n },\n\n /**\n * Unmounts all rendered children. This should be used to clean up children\n * when this component is unmounted. It does not actually perform any\n * backend operations.\n *\n * @internal\n */\n unmountChildren: function (safely) {\n var renderedChildren = this._renderedChildren;\n ReactChildReconciler.unmountChildren(renderedChildren, safely);\n this._renderedChildren = null;\n },\n\n /**\n * Moves a child component to the supplied index.\n *\n * @param {ReactComponent} child Component to move.\n * @param {number} toIndex Destination index of the element.\n * @param {number} lastIndex Last index visited of the siblings of `child`.\n * @protected\n */\n moveChild: function (child, afterNode, toIndex, lastIndex) {\n // If the index of `child` is less than `lastIndex`, then it needs to\n // be moved. Otherwise, we do not need to move it because a child will be\n // inserted or moved before `child`.\n if (child._mountIndex < lastIndex) {\n return makeMove(child, afterNode, toIndex);\n }\n },\n\n /**\n * Creates a child component.\n *\n * @param {ReactComponent} child Component to create.\n * @param {string} mountImage Markup to insert.\n * @protected\n */\n createChild: function (child, afterNode, mountImage) {\n return makeInsertMarkup(mountImage, afterNode, child._mountIndex);\n },\n\n /**\n * Removes a child component.\n *\n * @param {ReactComponent} child Child to remove.\n * @protected\n */\n removeChild: function (child, node) {\n return makeRemove(child, node);\n },\n\n /**\n * Mounts a child with the supplied name.\n *\n * NOTE: This is part of `updateChildren` and is here for readability.\n *\n * @param {ReactComponent} child Component to mount.\n * @param {string} name Name of the child.\n * @param {number} index Index at which to insert the child.\n * @param {ReactReconcileTransaction} transaction\n * @private\n */\n _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {\n child._mountIndex = index;\n return this.createChild(child, afterNode, mountImage);\n },\n\n /**\n * Unmounts a rendered child.\n *\n * NOTE: This is part of `updateChildren` and is here for readability.\n *\n * @param {ReactComponent} child Component to unmount.\n * @private\n */\n _unmountChild: function (child, node) {\n var update = this.removeChild(child, node);\n child._mountIndex = null;\n return update;\n }\n\n }\n\n};\n\nmodule.exports = ReactMultiChild;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactReconciler = require('./ReactReconciler');\n\nvar instantiateReactComponent = require('./instantiateReactComponent');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar shouldUpdateReactComponent = require('./shouldUpdateReactComponent');\nvar traverseAllChildren = require('./traverseAllChildren');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {\n // Temporary hack.\n // Inline requires don't work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don't need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n}\n\nfunction instantiateChild(childInstances, child, name, selfDebugID) {\n // We found a component instance.\n var keyUnique = childInstances[name] === undefined;\n if (process.env.NODE_ENV !== 'production') {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n }\n if (!keyUnique) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n }\n }\n if (child != null && keyUnique) {\n childInstances[name] = instantiateReactComponent(child, true);\n }\n}\n\n/**\n * ReactChildReconciler provides helpers for initializing or updating a set of\n * children. Its output is suitable for passing it onto ReactMultiChild which\n * does diffed reordering and insertion.\n */\nvar ReactChildReconciler = {\n /**\n * Generates a \"mount image\" for each of the supplied children. In the case\n * of `ReactDOMComponent`, a mount image is a string of markup.\n *\n * @param {?object} nestedChildNodes Nested child maps.\n * @return {?object} A set of child instances.\n * @internal\n */\n instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots\n ) {\n if (nestedChildNodes == null) {\n return null;\n }\n var childInstances = {};\n\n if (process.env.NODE_ENV !== 'production') {\n traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {\n return instantiateChild(childInsts, child, name, selfDebugID);\n }, childInstances);\n } else {\n traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);\n }\n return childInstances;\n },\n\n /**\n * Updates the rendered children and returns a new set of children.\n *\n * @param {?object} prevChildren Previously initialized set of children.\n * @param {?object} nextChildren Flat child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n * @return {?object} A new set of child instances.\n * @internal\n */\n updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots\n ) {\n // We currently don't have a way to track moves here but if we use iterators\n // instead of for..in we can zip the iterators and check if an item has\n // moved.\n // TODO: If nothing has changed, return the prevChildren object so that we\n // can quickly bailout if nothing has changed.\n if (!nextChildren && !prevChildren) {\n return;\n }\n var name;\n var prevChild;\n for (name in nextChildren) {\n if (!nextChildren.hasOwnProperty(name)) {\n continue;\n }\n prevChild = prevChildren && prevChildren[name];\n var prevElement = prevChild && prevChild._currentElement;\n var nextElement = nextChildren[name];\n if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {\n ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);\n nextChildren[name] = prevChild;\n } else {\n if (prevChild) {\n removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n ReactReconciler.unmountComponent(prevChild, false);\n }\n // The child must be instantiated before it's mounted.\n var nextChildInstance = instantiateReactComponent(nextElement, true);\n nextChildren[name] = nextChildInstance;\n // Creating mount image now ensures refs are resolved in right order\n // (see https://github.com/facebook/react/pull/7101 for explanation).\n var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);\n mountImages.push(nextChildMountImage);\n }\n }\n // Unmount children that are no longer present.\n for (name in prevChildren) {\n if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {\n prevChild = prevChildren[name];\n removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n ReactReconciler.unmountComponent(prevChild, false);\n }\n }\n },\n\n /**\n * Unmounts all rendered children. This should be used to clean up children\n * when this component is unmounted.\n *\n * @param {?object} renderedChildren Previously initialized set of children.\n * @internal\n */\n unmountChildren: function (renderedChildren, safely) {\n for (var name in renderedChildren) {\n if (renderedChildren.hasOwnProperty(name)) {\n var renderedChild = renderedChildren[name];\n ReactReconciler.unmountComponent(renderedChild, safely);\n }\n }\n }\n\n};\n\nmodule.exports = ReactChildReconciler;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar React = require('react/lib/React');\nvar ReactComponentEnvironment = require('./ReactComponentEnvironment');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactErrorUtils = require('./ReactErrorUtils');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactNodeTypes = require('./ReactNodeTypes');\nvar ReactReconciler = require('./ReactReconciler');\n\nif (process.env.NODE_ENV !== 'production') {\n var checkReactTypeSpec = require('./checkReactTypeSpec');\n}\n\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar invariant = require('fbjs/lib/invariant');\nvar shallowEqual = require('fbjs/lib/shallowEqual');\nvar shouldUpdateReactComponent = require('./shouldUpdateReactComponent');\nvar warning = require('fbjs/lib/warning');\n\nvar CompositeTypes = {\n ImpureClass: 0,\n PureClass: 1,\n StatelessFunctional: 2\n};\n\nfunction StatelessComponent(Component) {}\nStatelessComponent.prototype.render = function () {\n var Component = ReactInstanceMap.get(this)._currentElement.type;\n var element = Component(this.props, this.context, this.updater);\n warnIfInvalidElement(Component, element);\n return element;\n};\n\nfunction warnIfInvalidElement(Component, element) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;\n }\n}\n\nfunction shouldConstruct(Component) {\n return !!(Component.prototype && Component.prototype.isReactComponent);\n}\n\nfunction isPureComponent(Component) {\n return !!(Component.prototype && Component.prototype.isPureReactComponent);\n}\n\n// Separated into a function to contain deoptimizations caused by try/finally.\nfunction measureLifeCyclePerf(fn, debugID, timerType) {\n if (debugID === 0) {\n // Top-level wrappers (see ReactMount) and empty components (see\n // ReactDOMEmptyComponent) are invisible to hooks and devtools.\n // Both are implementation details that should go away in the future.\n return fn();\n }\n\n ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);\n try {\n return fn();\n } finally {\n ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);\n }\n}\n\n/**\n * ------------------ The Life-Cycle of a Composite Component ------------------\n *\n * - constructor: Initialization of state. The instance is now retained.\n * - componentWillMount\n * - render\n * - [children's constructors]\n * - [children's componentWillMount and render]\n * - [children's componentDidMount]\n * - componentDidMount\n *\n * Update Phases:\n * - componentWillReceiveProps (only called if parent updated)\n * - shouldComponentUpdate\n * - componentWillUpdate\n * - render\n * - [children's constructors or receive props phases]\n * - componentDidUpdate\n *\n * - componentWillUnmount\n * - [children's componentWillUnmount]\n * - [children destroyed]\n * - (destroyed): The instance is now blank, released by React and ready for GC.\n *\n * -----------------------------------------------------------------------------\n */\n\n/**\n * An incrementing ID assigned to each component when it is mounted. This is\n * used to enforce the order in which `ReactUpdates` updates dirty components.\n *\n * @private\n */\nvar nextMountID = 1;\n\n/**\n * @lends {ReactCompositeComponent.prototype}\n */\nvar ReactCompositeComponent = {\n\n /**\n * Base constructor for all composite component.\n *\n * @param {ReactElement} element\n * @final\n * @internal\n */\n construct: function (element) {\n this._currentElement = element;\n this._rootNodeID = 0;\n this._compositeType = null;\n this._instance = null;\n this._hostParent = null;\n this._hostContainerInfo = null;\n\n // See ReactUpdateQueue\n this._updateBatchNumber = null;\n this._pendingElement = null;\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n\n this._renderedNodeType = null;\n this._renderedComponent = null;\n this._context = null;\n this._mountOrder = 0;\n this._topLevelWrapper = null;\n\n // See ReactUpdates and ReactUpdateQueue.\n this._pendingCallbacks = null;\n\n // ComponentWillUnmount shall only be called once\n this._calledComponentWillUnmount = false;\n\n if (process.env.NODE_ENV !== 'production') {\n this._warnedAboutRefsInRender = false;\n }\n },\n\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?object} hostParent\n * @param {?object} hostContainerInfo\n * @param {?object} context\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @final\n * @internal\n */\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n var _this = this;\n\n this._context = context;\n this._mountOrder = nextMountID++;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n\n var publicProps = this._currentElement.props;\n var publicContext = this._processContext(context);\n\n var Component = this._currentElement.type;\n\n var updateQueue = transaction.getUpdateQueue();\n\n // Initialize the public class\n var doConstruct = shouldConstruct(Component);\n var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);\n var renderedElement;\n\n // Support functional components\n if (!doConstruct && (inst == null || inst.render == null)) {\n renderedElement = inst;\n warnIfInvalidElement(Component, renderedElement);\n !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;\n inst = new StatelessComponent(Component);\n this._compositeType = CompositeTypes.StatelessFunctional;\n } else {\n if (isPureComponent(Component)) {\n this._compositeType = CompositeTypes.PureClass;\n } else {\n this._compositeType = CompositeTypes.ImpureClass;\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This will throw later in _renderValidatedComponent, but add an early\n // warning now to help debugging\n if (inst.render == null) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;\n }\n\n var propsMutated = inst.props !== publicProps;\n var componentName = Component.displayName || Component.name || 'Component';\n\n process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\\'s constructor was passed.', componentName, componentName) : void 0;\n }\n\n // These should be set up in the constructor, but as a convenience for\n // simpler class abstractions, we set them up after the fact.\n inst.props = publicProps;\n inst.context = publicContext;\n inst.refs = emptyObject;\n inst.updater = updateQueue;\n\n this._instance = inst;\n\n // Store a reference from the instance back to the internal representation\n ReactInstanceMap.set(inst, this);\n\n if (process.env.NODE_ENV !== 'production') {\n // Since plain JS classes are defined without any special initialization\n // logic, we can not catch common errors early. Therefore, we have to\n // catch them here, at initialization time, instead.\n process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;\n }\n\n var initialState = inst.state;\n if (initialState === undefined) {\n inst.state = initialState = null;\n }\n !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;\n\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n\n var markup;\n if (inst.unstable_handleError) {\n markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);\n } else {\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n }\n\n if (inst.componentDidMount) {\n if (process.env.NODE_ENV !== 'production') {\n transaction.getReactMountReady().enqueue(function () {\n measureLifeCyclePerf(function () {\n return inst.componentDidMount();\n }, _this._debugID, 'componentDidMount');\n });\n } else {\n transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);\n }\n }\n\n return markup;\n },\n\n _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {\n if (process.env.NODE_ENV !== 'production') {\n ReactCurrentOwner.current = this;\n try {\n return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);\n } finally {\n ReactCurrentOwner.current = null;\n }\n } else {\n return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);\n }\n },\n\n _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {\n var Component = this._currentElement.type;\n\n if (doConstruct) {\n if (process.env.NODE_ENV !== 'production') {\n return measureLifeCyclePerf(function () {\n return new Component(publicProps, publicContext, updateQueue);\n }, this._debugID, 'ctor');\n } else {\n return new Component(publicProps, publicContext, updateQueue);\n }\n }\n\n // This can still be an instance in case of factory components\n // but we'll count this as time spent rendering as the more common case.\n if (process.env.NODE_ENV !== 'production') {\n return measureLifeCyclePerf(function () {\n return Component(publicProps, publicContext, updateQueue);\n }, this._debugID, 'render');\n } else {\n return Component(publicProps, publicContext, updateQueue);\n }\n },\n\n performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {\n var markup;\n var checkpoint = transaction.checkpoint();\n try {\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n } catch (e) {\n // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint\n transaction.rollback(checkpoint);\n this._instance.unstable_handleError(e);\n if (this._pendingStateQueue) {\n this._instance.state = this._processPendingState(this._instance.props, this._instance.context);\n }\n checkpoint = transaction.checkpoint();\n\n this._renderedComponent.unmountComponent(true);\n transaction.rollback(checkpoint);\n\n // Try again - we've informed the component about the error, so they can render an error message this time.\n // If this throws again, the error will bubble up (and can be caught by a higher error boundary).\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n }\n return markup;\n },\n\n performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {\n var inst = this._instance;\n\n var debugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n debugID = this._debugID;\n }\n\n if (inst.componentWillMount) {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillMount();\n }, debugID, 'componentWillMount');\n } else {\n inst.componentWillMount();\n }\n // When mounting, calls to `setState` by `componentWillMount` will set\n // `this._pendingStateQueue` without triggering a re-render.\n if (this._pendingStateQueue) {\n inst.state = this._processPendingState(inst.props, inst.context);\n }\n }\n\n // If not a stateless component, we now render\n if (renderedElement === undefined) {\n renderedElement = this._renderValidatedComponent();\n }\n\n var nodeType = ReactNodeTypes.getType(renderedElement);\n this._renderedNodeType = nodeType;\n var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */\n );\n this._renderedComponent = child;\n\n var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);\n\n if (process.env.NODE_ENV !== 'production') {\n if (debugID !== 0) {\n var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];\n ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);\n }\n }\n\n return markup;\n },\n\n getHostNode: function () {\n return ReactReconciler.getHostNode(this._renderedComponent);\n },\n\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * @final\n * @internal\n */\n unmountComponent: function (safely) {\n if (!this._renderedComponent) {\n return;\n }\n\n var inst = this._instance;\n\n if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {\n inst._calledComponentWillUnmount = true;\n\n if (safely) {\n var name = this.getName() + '.componentWillUnmount()';\n ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));\n } else {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillUnmount();\n }, this._debugID, 'componentWillUnmount');\n } else {\n inst.componentWillUnmount();\n }\n }\n }\n\n if (this._renderedComponent) {\n ReactReconciler.unmountComponent(this._renderedComponent, safely);\n this._renderedNodeType = null;\n this._renderedComponent = null;\n this._instance = null;\n }\n\n // Reset pending fields\n // Even if this component is scheduled for another update in ReactUpdates,\n // it would still be ignored because these fields are reset.\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n this._pendingCallbacks = null;\n this._pendingElement = null;\n\n // These fields do not really need to be reset since this object is no\n // longer accessible.\n this._context = null;\n this._rootNodeID = 0;\n this._topLevelWrapper = null;\n\n // Delete the reference from the instance to this internal representation\n // which allow the internals to be properly cleaned up even if the user\n // leaks a reference to the public instance.\n ReactInstanceMap.remove(inst);\n\n // Some existing components rely on inst.props even after they've been\n // destroyed (in event handlers).\n // TODO: inst.props = null;\n // TODO: inst.state = null;\n // TODO: inst.context = null;\n },\n\n /**\n * Filters the context object to only contain keys specified in\n * `contextTypes`\n *\n * @param {object} context\n * @return {?object}\n * @private\n */\n _maskContext: function (context) {\n var Component = this._currentElement.type;\n var contextTypes = Component.contextTypes;\n if (!contextTypes) {\n return emptyObject;\n }\n var maskedContext = {};\n for (var contextName in contextTypes) {\n maskedContext[contextName] = context[contextName];\n }\n return maskedContext;\n },\n\n /**\n * Filters the context object to only contain keys specified in\n * `contextTypes`, and asserts that they are valid.\n *\n * @param {object} context\n * @return {?object}\n * @private\n */\n _processContext: function (context) {\n var maskedContext = this._maskContext(context);\n if (process.env.NODE_ENV !== 'production') {\n var Component = this._currentElement.type;\n if (Component.contextTypes) {\n this._checkContextTypes(Component.contextTypes, maskedContext, 'context');\n }\n }\n return maskedContext;\n },\n\n /**\n * @param {object} currentContext\n * @return {object}\n * @private\n */\n _processChildContext: function (currentContext) {\n var Component = this._currentElement.type;\n var inst = this._instance;\n var childContext;\n\n if (inst.getChildContext) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onBeginProcessingChildContext();\n try {\n childContext = inst.getChildContext();\n } finally {\n ReactInstrumentation.debugTool.onEndProcessingChildContext();\n }\n } else {\n childContext = inst.getChildContext();\n }\n }\n\n if (childContext) {\n !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;\n if (process.env.NODE_ENV !== 'production') {\n this._checkContextTypes(Component.childContextTypes, childContext, 'childContext');\n }\n for (var name in childContext) {\n !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key \"%s\" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;\n }\n return _assign({}, currentContext, childContext);\n }\n return currentContext;\n },\n\n /**\n * Assert that the context types are valid\n *\n * @param {object} typeSpecs Map of context field to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @private\n */\n _checkContextTypes: function (typeSpecs, values, location) {\n if (process.env.NODE_ENV !== 'production') {\n checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);\n }\n },\n\n receiveComponent: function (nextElement, transaction, nextContext) {\n var prevElement = this._currentElement;\n var prevContext = this._context;\n\n this._pendingElement = null;\n\n this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);\n },\n\n /**\n * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`\n * is set, update the component.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function (transaction) {\n if (this._pendingElement != null) {\n ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);\n } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {\n this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);\n } else {\n this._updateBatchNumber = null;\n }\n },\n\n /**\n * Perform an update to a mounted component. The componentWillReceiveProps and\n * shouldComponentUpdate methods are called, then (assuming the update isn't\n * skipped) the remaining update lifecycle methods are called and the DOM\n * representation is updated.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevParentElement\n * @param {ReactElement} nextParentElement\n * @internal\n * @overridable\n */\n updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {\n var inst = this._instance;\n !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;\n\n var willReceive = false;\n var nextContext;\n\n // Determine if the context has changed or not\n if (this._context === nextUnmaskedContext) {\n nextContext = inst.context;\n } else {\n nextContext = this._processContext(nextUnmaskedContext);\n willReceive = true;\n }\n\n var prevProps = prevParentElement.props;\n var nextProps = nextParentElement.props;\n\n // Not a simple state update but a props update\n if (prevParentElement !== nextParentElement) {\n willReceive = true;\n }\n\n // An update here will schedule an update but immediately set\n // _pendingStateQueue which will ensure that any state updates gets\n // immediately reconciled instead of waiting for the next batch.\n if (willReceive && inst.componentWillReceiveProps) {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillReceiveProps(nextProps, nextContext);\n }, this._debugID, 'componentWillReceiveProps');\n } else {\n inst.componentWillReceiveProps(nextProps, nextContext);\n }\n }\n\n var nextState = this._processPendingState(nextProps, nextContext);\n var shouldUpdate = true;\n\n if (!this._pendingForceUpdate) {\n if (inst.shouldComponentUpdate) {\n if (process.env.NODE_ENV !== 'production') {\n shouldUpdate = measureLifeCyclePerf(function () {\n return inst.shouldComponentUpdate(nextProps, nextState, nextContext);\n }, this._debugID, 'shouldComponentUpdate');\n } else {\n shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);\n }\n } else {\n if (this._compositeType === CompositeTypes.PureClass) {\n shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);\n }\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;\n }\n\n this._updateBatchNumber = null;\n if (shouldUpdate) {\n this._pendingForceUpdate = false;\n // Will set `this.props`, `this.state` and `this.context`.\n this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);\n } else {\n // If it's determined that a component should not update, we still want\n // to set props and state but we shortcut the rest of the update.\n this._currentElement = nextParentElement;\n this._context = nextUnmaskedContext;\n inst.props = nextProps;\n inst.state = nextState;\n inst.context = nextContext;\n }\n },\n\n _processPendingState: function (props, context) {\n var inst = this._instance;\n var queue = this._pendingStateQueue;\n var replace = this._pendingReplaceState;\n this._pendingReplaceState = false;\n this._pendingStateQueue = null;\n\n if (!queue) {\n return inst.state;\n }\n\n if (replace && queue.length === 1) {\n return queue[0];\n }\n\n var nextState = _assign({}, replace ? queue[0] : inst.state);\n for (var i = replace ? 1 : 0; i < queue.length; i++) {\n var partial = queue[i];\n _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);\n }\n\n return nextState;\n },\n\n /**\n * Merges new props and state, notifies delegate methods of update and\n * performs update.\n *\n * @param {ReactElement} nextElement Next element\n * @param {object} nextProps Next public object to set as properties.\n * @param {?object} nextState Next object to set as state.\n * @param {?object} nextContext Next public object to set as context.\n * @param {ReactReconcileTransaction} transaction\n * @param {?object} unmaskedContext\n * @private\n */\n _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {\n var _this2 = this;\n\n var inst = this._instance;\n\n var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);\n var prevProps;\n var prevState;\n var prevContext;\n if (hasComponentDidUpdate) {\n prevProps = inst.props;\n prevState = inst.state;\n prevContext = inst.context;\n }\n\n if (inst.componentWillUpdate) {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillUpdate(nextProps, nextState, nextContext);\n }, this._debugID, 'componentWillUpdate');\n } else {\n inst.componentWillUpdate(nextProps, nextState, nextContext);\n }\n }\n\n this._currentElement = nextElement;\n this._context = unmaskedContext;\n inst.props = nextProps;\n inst.state = nextState;\n inst.context = nextContext;\n\n this._updateRenderedComponent(transaction, unmaskedContext);\n\n if (hasComponentDidUpdate) {\n if (process.env.NODE_ENV !== 'production') {\n transaction.getReactMountReady().enqueue(function () {\n measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');\n });\n } else {\n transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);\n }\n }\n },\n\n /**\n * Call the component's `render` method and update the DOM accordingly.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n _updateRenderedComponent: function (transaction, context) {\n var prevComponentInstance = this._renderedComponent;\n var prevRenderedElement = prevComponentInstance._currentElement;\n var nextRenderedElement = this._renderValidatedComponent();\n\n var debugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n debugID = this._debugID;\n }\n\n if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {\n ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));\n } else {\n var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);\n ReactReconciler.unmountComponent(prevComponentInstance, false);\n\n var nodeType = ReactNodeTypes.getType(nextRenderedElement);\n this._renderedNodeType = nodeType;\n var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */\n );\n this._renderedComponent = child;\n\n var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);\n\n if (process.env.NODE_ENV !== 'production') {\n if (debugID !== 0) {\n var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];\n ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);\n }\n }\n\n this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);\n }\n },\n\n /**\n * Overridden in shallow rendering.\n *\n * @protected\n */\n _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {\n ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);\n },\n\n /**\n * @protected\n */\n _renderValidatedComponentWithoutOwnerOrContext: function () {\n var inst = this._instance;\n var renderedElement;\n\n if (process.env.NODE_ENV !== 'production') {\n renderedElement = measureLifeCyclePerf(function () {\n return inst.render();\n }, this._debugID, 'render');\n } else {\n renderedElement = inst.render();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (renderedElement === undefined && inst.render._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n renderedElement = null;\n }\n }\n\n return renderedElement;\n },\n\n /**\n * @private\n */\n _renderValidatedComponent: function () {\n var renderedElement;\n if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {\n ReactCurrentOwner.current = this;\n try {\n renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();\n } finally {\n ReactCurrentOwner.current = null;\n }\n } else {\n renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();\n }\n !(\n // TODO: An `isValidNode` function would probably be more appropriate\n renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;\n\n return renderedElement;\n },\n\n /**\n * Lazily allocates the refs object and stores `component` as `ref`.\n *\n * @param {string} ref Reference name.\n * @param {component} component Component to store as `ref`.\n * @final\n * @private\n */\n attachRef: function (ref, component) {\n var inst = this.getPublicInstance();\n !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;\n var publicComponentInstance = component.getPublicInstance();\n if (process.env.NODE_ENV !== 'production') {\n var componentName = component && component.getName ? component.getName() : 'a component';\n process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref \"%s\" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;\n }\n var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;\n refs[ref] = publicComponentInstance;\n },\n\n /**\n * Detaches a reference name.\n *\n * @param {string} ref Name to dereference.\n * @final\n * @private\n */\n detachRef: function (ref) {\n var refs = this.getPublicInstance().refs;\n delete refs[ref];\n },\n\n /**\n * Get a text description of the component that can be used to identify it\n * in error messages.\n * @return {string} The name or null.\n * @internal\n */\n getName: function () {\n var type = this._currentElement.type;\n var constructor = this._instance && this._instance.constructor;\n return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;\n },\n\n /**\n * Get the publicly accessible representation of this component - i.e. what\n * is exposed by refs and returned by render. Can be null for stateless\n * components.\n *\n * @return {ReactComponent} the public component instance.\n * @internal\n */\n getPublicInstance: function () {\n var inst = this._instance;\n if (this._compositeType === CompositeTypes.StatelessFunctional) {\n return null;\n }\n return inst;\n },\n\n // Stub\n _instantiateReactComponent: null\n\n};\n\nmodule.exports = ReactCompositeComponent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar nextDebugID = 1;\n\nfunction getNextDebugID() {\n return nextDebugID++;\n}\n\nmodule.exports = getNextDebugID;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\n\nvar REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;\n\nmodule.exports = REACT_ELEMENT_TYPE;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/* global Symbol */\n\nvar ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n/**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\nfunction getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\nmodule.exports = getIteratorFn;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar traverseAllChildren = require('./traverseAllChildren');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {\n // Temporary hack.\n // Inline requires don't work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don't need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n}\n\n/**\n * @param {function} traverseContext Context passed through traversal.\n * @param {?ReactComponent} child React child component.\n * @param {!string} name String name of key path to child.\n * @param {number=} selfDebugID Optional debugID of the current internal instance.\n */\nfunction flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {\n // We found a component instance.\n if (traverseContext && typeof traverseContext === 'object') {\n var result = traverseContext;\n var keyUnique = result[name] === undefined;\n if (process.env.NODE_ENV !== 'production') {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n }\n if (!keyUnique) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n }\n }\n if (keyUnique && child != null) {\n result[name] = child;\n }\n }\n}\n\n/**\n * Flattens children that are typically specified as `props.children`. Any null\n * children will not be included in the resulting object.\n * @return {!object} flattened children keyed by name.\n */\nfunction flattenChildren(children, selfDebugID) {\n if (children == null) {\n return children;\n }\n var result = {};\n\n if (process.env.NODE_ENV !== 'production') {\n traverseAllChildren(children, function (traverseContext, child, name) {\n return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);\n }, result);\n } else {\n traverseAllChildren(children, flattenSingleChildIntoContext, result);\n }\n return result;\n}\n\nmodule.exports = flattenChildren;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar PooledClass = require('./PooledClass');\nvar Transaction = require('./Transaction');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactServerUpdateQueue = require('./ReactServerUpdateQueue');\n\n/**\n * Executed within the scope of the `Transaction` instance. Consider these as\n * being member methods, but with an implied ordering while being isolated from\n * each other.\n */\nvar TRANSACTION_WRAPPERS = [];\n\nif (process.env.NODE_ENV !== 'production') {\n TRANSACTION_WRAPPERS.push({\n initialize: ReactInstrumentation.debugTool.onBeginFlush,\n close: ReactInstrumentation.debugTool.onEndFlush\n });\n}\n\nvar noopCallbackQueue = {\n enqueue: function () {}\n};\n\n/**\n * @class ReactServerRenderingTransaction\n * @param {boolean} renderToStaticMarkup\n */\nfunction ReactServerRenderingTransaction(renderToStaticMarkup) {\n this.reinitializeTransaction();\n this.renderToStaticMarkup = renderToStaticMarkup;\n this.useCreateElement = false;\n this.updateQueue = new ReactServerUpdateQueue(this);\n}\n\nvar Mixin = {\n /**\n * @see Transaction\n * @abstract\n * @final\n * @return {array} Empty list of operation wrap procedures.\n */\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n },\n\n /**\n * @return {object} The queue to collect `onDOMReady` callbacks with.\n */\n getReactMountReady: function () {\n return noopCallbackQueue;\n },\n\n /**\n * @return {object} The queue to collect React async events.\n */\n getUpdateQueue: function () {\n return this.updateQueue;\n },\n\n /**\n * `PooledClass` looks for this, and will invoke this before allowing this\n * instance to be reused.\n */\n destructor: function () {},\n\n checkpoint: function () {},\n\n rollback: function () {}\n};\n\n_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);\n\nPooledClass.addPoolingTo(ReactServerRenderingTransaction);\n\nmodule.exports = ReactServerRenderingTransaction;","/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ReactUpdateQueue = require('./ReactUpdateQueue');\n\nvar warning = require('fbjs/lib/warning');\n\nfunction warnNoop(publicInstance, callerName) {\n if (process.env.NODE_ENV !== 'production') {\n var constructor = publicInstance.constructor;\n process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;\n }\n}\n\n/**\n * This is the update queue used for server rendering.\n * It delegates to ReactUpdateQueue while server rendering is in progress and\n * switches to ReactNoopUpdateQueue after the transaction has completed.\n * @class ReactServerUpdateQueue\n * @param {Transaction} transaction\n */\n\nvar ReactServerUpdateQueue = function () {\n function ReactServerUpdateQueue(transaction) {\n _classCallCheck(this, ReactServerUpdateQueue);\n\n this.transaction = transaction;\n }\n\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n\n\n ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {\n return false;\n };\n\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);\n }\n };\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueForceUpdate(publicInstance);\n } else {\n warnNoop(publicInstance, 'forceUpdate');\n }\n };\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object|function} completeState Next state.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);\n } else {\n warnNoop(publicInstance, 'replaceState');\n }\n };\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object|function} partialState Next partial state to be merged with state.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueSetState(publicInstance, partialState);\n } else {\n warnNoop(publicInstance, 'setState');\n }\n };\n\n return ReactServerUpdateQueue;\n}();\n\nmodule.exports = ReactServerUpdateQueue;","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\n\nvar ReactDOMEmptyComponent = function (instantiate) {\n // ReactCompositeComponent uses this:\n this._currentElement = null;\n // ReactDOMComponentTree uses these:\n this._hostNode = null;\n this._hostParent = null;\n this._hostContainerInfo = null;\n this._domID = 0;\n};\n_assign(ReactDOMEmptyComponent.prototype, {\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n var domID = hostContainerInfo._idCounter++;\n this._domID = domID;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n\n var nodeValue = ' react-empty: ' + this._domID + ' ';\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var node = ownerDocument.createComment(nodeValue);\n ReactDOMComponentTree.precacheNode(this, node);\n return DOMLazyTree(node);\n } else {\n if (transaction.renderToStaticMarkup) {\n // Normally we'd insert a comment node, but since this is a situation\n // where React won't take over (static pages), we can simply return\n // nothing.\n return '';\n }\n return '<!--' + nodeValue + '-->';\n }\n },\n receiveComponent: function () {},\n getHostNode: function () {\n return ReactDOMComponentTree.getNodeFromInstance(this);\n },\n unmountComponent: function () {\n ReactDOMComponentTree.uncacheNode(this);\n }\n});\n\nmodule.exports = ReactDOMEmptyComponent;","/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\nfunction getLowestCommonAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = tempA._hostParent) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = tempB._hostParent) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = instA._hostParent;\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = instB._hostParent;\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB) {\n return instA;\n }\n instA = instA._hostParent;\n instB = instB._hostParent;\n }\n return null;\n}\n\n/**\n * Return if A is an ancestor of B.\n */\nfunction isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}\n\n/**\n * Return the parent instance of the passed-in instance.\n */\nfunction getParentInstance(inst) {\n !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;\n\n return inst._hostParent;\n}\n\n/**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n */\nfunction traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = inst._hostParent;\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}\n\n/**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * Does not invoke the callback on the nearest common ancestor because nothing\n * \"entered\" or \"left\" that element.\n */\nfunction traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}\n\nmodule.exports = {\n isAncestor: isAncestor,\n getLowestCommonAncestor: getLowestCommonAncestor,\n getParentInstance: getParentInstance,\n traverseTwoPhase: traverseTwoPhase,\n traverseEnterLeave: traverseEnterLeave\n};","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar DOMChildrenOperations = require('./DOMChildrenOperations');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\n\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar invariant = require('fbjs/lib/invariant');\nvar validateDOMNesting = require('./validateDOMNesting');\n\n/**\n * Text nodes violate a couple assumptions that React makes about components:\n *\n * - When mounting text into the DOM, adjacent text nodes are merged.\n * - Text nodes cannot be assigned a React root ID.\n *\n * This component is used to wrap strings between comment nodes so that they\n * can undergo the same reconciliation that is applied to elements.\n *\n * TODO: Investigate representing React components in the DOM with text nodes.\n *\n * @class ReactDOMTextComponent\n * @extends ReactComponent\n * @internal\n */\nvar ReactDOMTextComponent = function (text) {\n // TODO: This is really a ReactText (ReactNode), not a ReactElement\n this._currentElement = text;\n this._stringText = '' + text;\n // ReactDOMComponentTree uses these:\n this._hostNode = null;\n this._hostParent = null;\n\n // Properties\n this._domID = 0;\n this._mountIndex = 0;\n this._closingComment = null;\n this._commentNodes = null;\n};\n\n_assign(ReactDOMTextComponent.prototype, {\n\n /**\n * Creates the markup for this text node. This node is not intended to have\n * any features besides containing text content.\n *\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @return {string} Markup for this text node.\n * @internal\n */\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n if (process.env.NODE_ENV !== 'production') {\n var parentInfo;\n if (hostParent != null) {\n parentInfo = hostParent._ancestorInfo;\n } else if (hostContainerInfo != null) {\n parentInfo = hostContainerInfo._ancestorInfo;\n }\n if (parentInfo) {\n // parentInfo should always be present except for the top-level\n // component when server rendering\n validateDOMNesting(null, this._stringText, this, parentInfo);\n }\n }\n\n var domID = hostContainerInfo._idCounter++;\n var openingValue = ' react-text: ' + domID + ' ';\n var closingValue = ' /react-text ';\n this._domID = domID;\n this._hostParent = hostParent;\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var openingComment = ownerDocument.createComment(openingValue);\n var closingComment = ownerDocument.createComment(closingValue);\n var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));\n if (this._stringText) {\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));\n }\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));\n ReactDOMComponentTree.precacheNode(this, openingComment);\n this._closingComment = closingComment;\n return lazyTree;\n } else {\n var escapedText = escapeTextContentForBrowser(this._stringText);\n\n if (transaction.renderToStaticMarkup) {\n // Normally we'd wrap this between comment nodes for the reasons stated\n // above, but since this is a situation where React won't take over\n // (static pages), we can simply return the text as it is.\n return escapedText;\n }\n\n return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';\n }\n },\n\n /**\n * Updates this component by updating the text content.\n *\n * @param {ReactText} nextText The next text content\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n receiveComponent: function (nextText, transaction) {\n if (nextText !== this._currentElement) {\n this._currentElement = nextText;\n var nextStringText = '' + nextText;\n if (nextStringText !== this._stringText) {\n // TODO: Save this as pending props and use performUpdateIfNecessary\n // and/or updateComponent to do the actual update for consistency with\n // other component types?\n this._stringText = nextStringText;\n var commentNodes = this.getHostNode();\n DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);\n }\n }\n },\n\n getHostNode: function () {\n var hostNode = this._commentNodes;\n if (hostNode) {\n return hostNode;\n }\n if (!this._closingComment) {\n var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);\n var node = openingComment.nextSibling;\n while (true) {\n !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;\n if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {\n this._closingComment = node;\n break;\n }\n node = node.nextSibling;\n }\n }\n hostNode = [this._hostNode, this._closingComment];\n this._commentNodes = hostNode;\n return hostNode;\n },\n\n unmountComponent: function () {\n this._closingComment = null;\n this._commentNodes = null;\n ReactDOMComponentTree.uncacheNode(this);\n }\n\n});\n\nmodule.exports = ReactDOMTextComponent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar ReactUpdates = require('./ReactUpdates');\nvar Transaction = require('./Transaction');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\n\nvar RESET_BATCHED_UPDATES = {\n initialize: emptyFunction,\n close: function () {\n ReactDefaultBatchingStrategy.isBatchingUpdates = false;\n }\n};\n\nvar FLUSH_BATCHED_UPDATES = {\n initialize: emptyFunction,\n close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)\n};\n\nvar TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];\n\nfunction ReactDefaultBatchingStrategyTransaction() {\n this.reinitializeTransaction();\n}\n\n_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n }\n});\n\nvar transaction = new ReactDefaultBatchingStrategyTransaction();\n\nvar ReactDefaultBatchingStrategy = {\n isBatchingUpdates: false,\n\n /**\n * Call the provided function in a context within which calls to `setState`\n * and friends are batched such that components aren't updated unnecessarily.\n */\n batchedUpdates: function (callback, a, b, c, d, e) {\n var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;\n\n ReactDefaultBatchingStrategy.isBatchingUpdates = true;\n\n // The code is written this way to avoid extra allocations\n if (alreadyBatchingUpdates) {\n return callback(a, b, c, d, e);\n } else {\n return transaction.perform(callback, null, a, b, c, d, e);\n }\n }\n};\n\nmodule.exports = ReactDefaultBatchingStrategy;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar EventListener = require('fbjs/lib/EventListener');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar PooledClass = require('./PooledClass');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\n\nvar getEventTarget = require('./getEventTarget');\nvar getUnboundedScrollPosition = require('fbjs/lib/getUnboundedScrollPosition');\n\n/**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\nfunction findParent(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst._hostParent) {\n inst = inst._hostParent;\n }\n var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);\n var container = rootNode.parentNode;\n return ReactDOMComponentTree.getClosestInstanceFromNode(container);\n}\n\n// Used to store ancestor hierarchy in top level callback\nfunction TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {\n this.topLevelType = topLevelType;\n this.nativeEvent = nativeEvent;\n this.ancestors = [];\n}\n_assign(TopLevelCallbackBookKeeping.prototype, {\n destructor: function () {\n this.topLevelType = null;\n this.nativeEvent = null;\n this.ancestors.length = 0;\n }\n});\nPooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);\n\nfunction handleTopLevelImpl(bookKeeping) {\n var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);\n var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);\n\n // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n var ancestor = targetInst;\n do {\n bookKeeping.ancestors.push(ancestor);\n ancestor = ancestor && findParent(ancestor);\n } while (ancestor);\n\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}\n\nfunction scrollValueMonitor(cb) {\n var scrollPosition = getUnboundedScrollPosition(window);\n cb(scrollPosition);\n}\n\nvar ReactEventListener = {\n _enabled: true,\n _handleTopLevel: null,\n\n WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,\n\n setHandleTopLevel: function (handleTopLevel) {\n ReactEventListener._handleTopLevel = handleTopLevel;\n },\n\n setEnabled: function (enabled) {\n ReactEventListener._enabled = !!enabled;\n },\n\n isEnabled: function () {\n return ReactEventListener._enabled;\n },\n\n /**\n * Traps top-level events by using event bubbling.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\n trapBubbledEvent: function (topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));\n },\n\n /**\n * Traps a top-level event by using event capturing.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\n trapCapturedEvent: function (topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));\n },\n\n monitorScrollValue: function (refresh) {\n var callback = scrollValueMonitor.bind(null, refresh);\n EventListener.listen(window, 'scroll', callback);\n },\n\n dispatchEvent: function (topLevelType, nativeEvent) {\n if (!ReactEventListener._enabled) {\n return;\n }\n\n var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);\n } finally {\n TopLevelCallbackBookKeeping.release(bookKeeping);\n }\n }\n};\n\nmodule.exports = ReactEventListener;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n'use strict';\n\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are unbounded, unlike `getScrollPosition`. This means they\n * may be negative or exceed the element boundaries (which is possible using\n * inertial scrolling).\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\nfunction getUnboundedScrollPosition(scrollable) {\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n return {\n x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,\n y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop\n };\n }\n return {\n x: scrollable.scrollLeft,\n y: scrollable.scrollTop\n };\n}\n\nmodule.exports = getUnboundedScrollPosition;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar DOMProperty = require('./DOMProperty');\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPluginUtils = require('./EventPluginUtils');\nvar ReactComponentEnvironment = require('./ReactComponentEnvironment');\nvar ReactEmptyComponent = require('./ReactEmptyComponent');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactHostComponent = require('./ReactHostComponent');\nvar ReactUpdates = require('./ReactUpdates');\n\nvar ReactInjection = {\n Component: ReactComponentEnvironment.injection,\n DOMProperty: DOMProperty.injection,\n EmptyComponent: ReactEmptyComponent.injection,\n EventPluginHub: EventPluginHub.injection,\n EventPluginUtils: EventPluginUtils.injection,\n EventEmitter: ReactBrowserEventEmitter.injection,\n HostComponent: ReactHostComponent.injection,\n Updates: ReactUpdates.injection\n};\n\nmodule.exports = ReactInjection;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar CallbackQueue = require('./CallbackQueue');\nvar PooledClass = require('./PooledClass');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactInputSelection = require('./ReactInputSelection');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar Transaction = require('./Transaction');\nvar ReactUpdateQueue = require('./ReactUpdateQueue');\n\n/**\n * Ensures that, when possible, the selection range (currently selected text\n * input) is not disturbed by performing the transaction.\n */\nvar SELECTION_RESTORATION = {\n /**\n * @return {Selection} Selection information.\n */\n initialize: ReactInputSelection.getSelectionInformation,\n /**\n * @param {Selection} sel Selection information returned from `initialize`.\n */\n close: ReactInputSelection.restoreSelection\n};\n\n/**\n * Suppresses events (blur/focus) that could be inadvertently dispatched due to\n * high level DOM manipulations (like temporarily removing a text input from the\n * DOM).\n */\nvar EVENT_SUPPRESSION = {\n /**\n * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before\n * the reconciliation.\n */\n initialize: function () {\n var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();\n ReactBrowserEventEmitter.setEnabled(false);\n return currentlyEnabled;\n },\n\n /**\n * @param {boolean} previouslyEnabled Enabled status of\n * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`\n * restores the previous value.\n */\n close: function (previouslyEnabled) {\n ReactBrowserEventEmitter.setEnabled(previouslyEnabled);\n }\n};\n\n/**\n * Provides a queue for collecting `componentDidMount` and\n * `componentDidUpdate` callbacks during the transaction.\n */\nvar ON_DOM_READY_QUEUEING = {\n /**\n * Initializes the internal `onDOMReady` queue.\n */\n initialize: function () {\n this.reactMountReady.reset();\n },\n\n /**\n * After DOM is flushed, invoke all registered `onDOMReady` callbacks.\n */\n close: function () {\n this.reactMountReady.notifyAll();\n }\n};\n\n/**\n * Executed within the scope of the `Transaction` instance. Consider these as\n * being member methods, but with an implied ordering while being isolated from\n * each other.\n */\nvar TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];\n\nif (process.env.NODE_ENV !== 'production') {\n TRANSACTION_WRAPPERS.push({\n initialize: ReactInstrumentation.debugTool.onBeginFlush,\n close: ReactInstrumentation.debugTool.onEndFlush\n });\n}\n\n/**\n * Currently:\n * - The order that these are listed in the transaction is critical:\n * - Suppresses events.\n * - Restores selection range.\n *\n * Future:\n * - Restore document/overflow scroll positions that were unintentionally\n * modified via DOM insertions above the top viewport boundary.\n * - Implement/integrate with customized constraint based layout system and keep\n * track of which dimensions must be remeasured.\n *\n * @class ReactReconcileTransaction\n */\nfunction ReactReconcileTransaction(useCreateElement) {\n this.reinitializeTransaction();\n // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = false;\n this.reactMountReady = CallbackQueue.getPooled(null);\n this.useCreateElement = useCreateElement;\n}\n\nvar Mixin = {\n /**\n * @see Transaction\n * @abstract\n * @final\n * @return {array<object>} List of operation wrap procedures.\n * TODO: convert to array<TransactionWrapper>\n */\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n },\n\n /**\n * @return {object} The queue to collect `onDOMReady` callbacks with.\n */\n getReactMountReady: function () {\n return this.reactMountReady;\n },\n\n /**\n * @return {object} The queue to collect React async events.\n */\n getUpdateQueue: function () {\n return ReactUpdateQueue;\n },\n\n /**\n * Save current transaction state -- if the return value from this method is\n * passed to `rollback`, the transaction will be reset to that state.\n */\n checkpoint: function () {\n // reactMountReady is the our only stateful wrapper\n return this.reactMountReady.checkpoint();\n },\n\n rollback: function (checkpoint) {\n this.reactMountReady.rollback(checkpoint);\n },\n\n /**\n * `PooledClass` looks for this, and will invoke this before allowing this\n * instance to be reused.\n */\n destructor: function () {\n CallbackQueue.release(this.reactMountReady);\n this.reactMountReady = null;\n }\n};\n\n_assign(ReactReconcileTransaction.prototype, Transaction, Mixin);\n\nPooledClass.addPoolingTo(ReactReconcileTransaction);\n\nmodule.exports = ReactReconcileTransaction;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n\nvar getNodeForCharacterOffset = require('./getNodeForCharacterOffset');\nvar getTextContentAccessor = require('./getTextContentAccessor');\n\n/**\n * While `isCollapsed` is available on the Selection object and `collapsed`\n * is available on the Range object, IE11 sometimes gets them wrong.\n * If the anchor/focus nodes and offsets are the same, the range is collapsed.\n */\nfunction isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {\n return anchorNode === focusNode && anchorOffset === focusOffset;\n}\n\n/**\n * Get the appropriate anchor and focus node/offset pairs for IE.\n *\n * The catch here is that IE's selection API doesn't provide information\n * about whether the selection is forward or backward, so we have to\n * behave as though it's always forward.\n *\n * IE text differs from modern selection in that it behaves as though\n * block elements end with a new line. This means character offsets will\n * differ between the two APIs.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getIEOffsets(node) {\n var selection = document.selection;\n var selectedRange = selection.createRange();\n var selectedLength = selectedRange.text.length;\n\n // Duplicate selection so we can move range without breaking user selection.\n var fromStart = selectedRange.duplicate();\n fromStart.moveToElementText(node);\n fromStart.setEndPoint('EndToStart', selectedRange);\n\n var startOffset = fromStart.text.length;\n var endOffset = startOffset + selectedLength;\n\n return {\n start: startOffset,\n end: endOffset\n };\n}\n\n/**\n * @param {DOMElement} node\n * @return {?object}\n */\nfunction getModernOffsets(node) {\n var selection = window.getSelection && window.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode;\n var anchorOffset = selection.anchorOffset;\n var focusNode = selection.focusNode;\n var focusOffset = selection.focusOffset;\n\n var currentRange = selection.getRangeAt(0);\n\n // In Firefox, range.startContainer and range.endContainer can be \"anonymous\n // divs\", e.g. the up/down buttons on an <input type=\"number\">. Anonymous\n // divs do not seem to expose properties, triggering a \"Permission denied\n // error\" if any of its properties are accessed. The only seemingly possible\n // way to avoid erroring is to access a property that typically works for\n // non-anonymous divs and catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n try {\n /* eslint-disable no-unused-expressions */\n currentRange.startContainer.nodeType;\n currentRange.endContainer.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n // If the node and offset values are the same, the selection is collapsed.\n // `Selection.isCollapsed` is available natively, but IE sometimes gets\n // this value wrong.\n var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n\n var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;\n\n var tempRange = currentRange.cloneRange();\n tempRange.selectNodeContents(node);\n tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);\n\n var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);\n\n var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;\n var end = start + rangeLength;\n\n // Detect whether the selection is backward.\n var detectionRange = document.createRange();\n detectionRange.setStart(anchorNode, anchorOffset);\n detectionRange.setEnd(focusNode, focusOffset);\n var isBackward = detectionRange.collapsed;\n\n return {\n start: isBackward ? end : start,\n end: isBackward ? start : end\n };\n}\n\n/**\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setIEOffsets(node, offsets) {\n var range = document.selection.createRange().duplicate();\n var start, end;\n\n if (offsets.end === undefined) {\n start = offsets.start;\n end = start;\n } else if (offsets.start > offsets.end) {\n start = offsets.end;\n end = offsets.start;\n } else {\n start = offsets.start;\n end = offsets.end;\n }\n\n range.moveToElementText(node);\n range.moveStart('character', start);\n range.setEndPoint('EndToStart', range);\n range.moveEnd('character', end - start);\n range.select();\n}\n\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setModernOffsets(node, offsets) {\n if (!window.getSelection) {\n return;\n }\n\n var selection = window.getSelection();\n var length = node[getTextContentAccessor()].length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length);\n\n // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n var range = document.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nvar useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);\n\nvar ReactDOMSelection = {\n /**\n * @param {DOMElement} node\n */\n getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,\n\n /**\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets\n};\n\nmodule.exports = ReactDOMSelection;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n return node;\n}\n\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n node = node.parentNode;\n }\n}\n\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === 3) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\nmodule.exports = getNodeForCharacterOffset;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nvar isTextNode = require('./isTextNode');\n\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar isNode = require('./isNode');\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM text node.\n */\nfunction isTextNode(object) {\n return isNode(object) && object.nodeType == 3;\n}\n\nmodule.exports = isTextNode;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM node.\n */\nfunction isNode(object) {\n var doc = object ? object.ownerDocument || object : document;\n var defaultView = doc.defaultView || window;\n return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));\n}\n\nmodule.exports = isNode;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar NS = {\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace'\n};\n\n// We use attributes for everything SVG so let's avoid some duplication and run\n// code instead.\n// The following are all specified in the HTML config already so we exclude here.\n// - class (as className)\n// - color\n// - height\n// - id\n// - lang\n// - max\n// - media\n// - method\n// - min\n// - name\n// - style\n// - target\n// - type\n// - width\nvar ATTRS = {\n accentHeight: 'accent-height',\n accumulate: 0,\n additive: 0,\n alignmentBaseline: 'alignment-baseline',\n allowReorder: 'allowReorder',\n alphabetic: 0,\n amplitude: 0,\n arabicForm: 'arabic-form',\n ascent: 0,\n attributeName: 'attributeName',\n attributeType: 'attributeType',\n autoReverse: 'autoReverse',\n azimuth: 0,\n baseFrequency: 'baseFrequency',\n baseProfile: 'baseProfile',\n baselineShift: 'baseline-shift',\n bbox: 0,\n begin: 0,\n bias: 0,\n by: 0,\n calcMode: 'calcMode',\n capHeight: 'cap-height',\n clip: 0,\n clipPath: 'clip-path',\n clipRule: 'clip-rule',\n clipPathUnits: 'clipPathUnits',\n colorInterpolation: 'color-interpolation',\n colorInterpolationFilters: 'color-interpolation-filters',\n colorProfile: 'color-profile',\n colorRendering: 'color-rendering',\n contentScriptType: 'contentScriptType',\n contentStyleType: 'contentStyleType',\n cursor: 0,\n cx: 0,\n cy: 0,\n d: 0,\n decelerate: 0,\n descent: 0,\n diffuseConstant: 'diffuseConstant',\n direction: 0,\n display: 0,\n divisor: 0,\n dominantBaseline: 'dominant-baseline',\n dur: 0,\n dx: 0,\n dy: 0,\n edgeMode: 'edgeMode',\n elevation: 0,\n enableBackground: 'enable-background',\n end: 0,\n exponent: 0,\n externalResourcesRequired: 'externalResourcesRequired',\n fill: 0,\n fillOpacity: 'fill-opacity',\n fillRule: 'fill-rule',\n filter: 0,\n filterRes: 'filterRes',\n filterUnits: 'filterUnits',\n floodColor: 'flood-color',\n floodOpacity: 'flood-opacity',\n focusable: 0,\n fontFamily: 'font-family',\n fontSize: 'font-size',\n fontSizeAdjust: 'font-size-adjust',\n fontStretch: 'font-stretch',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n format: 0,\n from: 0,\n fx: 0,\n fy: 0,\n g1: 0,\n g2: 0,\n glyphName: 'glyph-name',\n glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n glyphOrientationVertical: 'glyph-orientation-vertical',\n glyphRef: 'glyphRef',\n gradientTransform: 'gradientTransform',\n gradientUnits: 'gradientUnits',\n hanging: 0,\n horizAdvX: 'horiz-adv-x',\n horizOriginX: 'horiz-origin-x',\n ideographic: 0,\n imageRendering: 'image-rendering',\n 'in': 0,\n in2: 0,\n intercept: 0,\n k: 0,\n k1: 0,\n k2: 0,\n k3: 0,\n k4: 0,\n kernelMatrix: 'kernelMatrix',\n kernelUnitLength: 'kernelUnitLength',\n kerning: 0,\n keyPoints: 'keyPoints',\n keySplines: 'keySplines',\n keyTimes: 'keyTimes',\n lengthAdjust: 'lengthAdjust',\n letterSpacing: 'letter-spacing',\n lightingColor: 'lighting-color',\n limitingConeAngle: 'limitingConeAngle',\n local: 0,\n markerEnd: 'marker-end',\n markerMid: 'marker-mid',\n markerStart: 'marker-start',\n markerHeight: 'markerHeight',\n markerUnits: 'markerUnits',\n markerWidth: 'markerWidth',\n mask: 0,\n maskContentUnits: 'maskContentUnits',\n maskUnits: 'maskUnits',\n mathematical: 0,\n mode: 0,\n numOctaves: 'numOctaves',\n offset: 0,\n opacity: 0,\n operator: 0,\n order: 0,\n orient: 0,\n orientation: 0,\n origin: 0,\n overflow: 0,\n overlinePosition: 'overline-position',\n overlineThickness: 'overline-thickness',\n paintOrder: 'paint-order',\n panose1: 'panose-1',\n pathLength: 'pathLength',\n patternContentUnits: 'patternContentUnits',\n patternTransform: 'patternTransform',\n patternUnits: 'patternUnits',\n pointerEvents: 'pointer-events',\n points: 0,\n pointsAtX: 'pointsAtX',\n pointsAtY: 'pointsAtY',\n pointsAtZ: 'pointsAtZ',\n preserveAlpha: 'preserveAlpha',\n preserveAspectRatio: 'preserveAspectRatio',\n primitiveUnits: 'primitiveUnits',\n r: 0,\n radius: 0,\n refX: 'refX',\n refY: 'refY',\n renderingIntent: 'rendering-intent',\n repeatCount: 'repeatCount',\n repeatDur: 'repeatDur',\n requiredExtensions: 'requiredExtensions',\n requiredFeatures: 'requiredFeatures',\n restart: 0,\n result: 0,\n rotate: 0,\n rx: 0,\n ry: 0,\n scale: 0,\n seed: 0,\n shapeRendering: 'shape-rendering',\n slope: 0,\n spacing: 0,\n specularConstant: 'specularConstant',\n specularExponent: 'specularExponent',\n speed: 0,\n spreadMethod: 'spreadMethod',\n startOffset: 'startOffset',\n stdDeviation: 'stdDeviation',\n stemh: 0,\n stemv: 0,\n stitchTiles: 'stitchTiles',\n stopColor: 'stop-color',\n stopOpacity: 'stop-opacity',\n strikethroughPosition: 'strikethrough-position',\n strikethroughThickness: 'strikethrough-thickness',\n string: 0,\n stroke: 0,\n strokeDasharray: 'stroke-dasharray',\n strokeDashoffset: 'stroke-dashoffset',\n strokeLinecap: 'stroke-linecap',\n strokeLinejoin: 'stroke-linejoin',\n strokeMiterlimit: 'stroke-miterlimit',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n surfaceScale: 'surfaceScale',\n systemLanguage: 'systemLanguage',\n tableValues: 'tableValues',\n targetX: 'targetX',\n targetY: 'targetY',\n textAnchor: 'text-anchor',\n textDecoration: 'text-decoration',\n textRendering: 'text-rendering',\n textLength: 'textLength',\n to: 0,\n transform: 0,\n u1: 0,\n u2: 0,\n underlinePosition: 'underline-position',\n underlineThickness: 'underline-thickness',\n unicode: 0,\n unicodeBidi: 'unicode-bidi',\n unicodeRange: 'unicode-range',\n unitsPerEm: 'units-per-em',\n vAlphabetic: 'v-alphabetic',\n vHanging: 'v-hanging',\n vIdeographic: 'v-ideographic',\n vMathematical: 'v-mathematical',\n values: 0,\n vectorEffect: 'vector-effect',\n version: 0,\n vertAdvY: 'vert-adv-y',\n vertOriginX: 'vert-origin-x',\n vertOriginY: 'vert-origin-y',\n viewBox: 'viewBox',\n viewTarget: 'viewTarget',\n visibility: 0,\n widths: 0,\n wordSpacing: 'word-spacing',\n writingMode: 'writing-mode',\n x: 0,\n xHeight: 'x-height',\n x1: 0,\n x2: 0,\n xChannelSelector: 'xChannelSelector',\n xlinkActuate: 'xlink:actuate',\n xlinkArcrole: 'xlink:arcrole',\n xlinkHref: 'xlink:href',\n xlinkRole: 'xlink:role',\n xlinkShow: 'xlink:show',\n xlinkTitle: 'xlink:title',\n xlinkType: 'xlink:type',\n xmlBase: 'xml:base',\n xmlns: 0,\n xmlnsXlink: 'xmlns:xlink',\n xmlLang: 'xml:lang',\n xmlSpace: 'xml:space',\n y: 0,\n y1: 0,\n y2: 0,\n yChannelSelector: 'yChannelSelector',\n z: 0,\n zoomAndPan: 'zoomAndPan'\n};\n\nvar SVGDOMPropertyConfig = {\n Properties: {},\n DOMAttributeNamespaces: {\n xlinkActuate: NS.xlink,\n xlinkArcrole: NS.xlink,\n xlinkHref: NS.xlink,\n xlinkRole: NS.xlink,\n xlinkShow: NS.xlink,\n xlinkTitle: NS.xlink,\n xlinkType: NS.xlink,\n xmlBase: NS.xml,\n xmlLang: NS.xml,\n xmlSpace: NS.xml\n },\n DOMAttributeNames: {}\n};\n\nObject.keys(ATTRS).forEach(function (key) {\n SVGDOMPropertyConfig.Properties[key] = 0;\n if (ATTRS[key]) {\n SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];\n }\n});\n\nmodule.exports = SVGDOMPropertyConfig;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar EventPropagators = require('./EventPropagators');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInputSelection = require('./ReactInputSelection');\nvar SyntheticEvent = require('./SyntheticEvent');\n\nvar getActiveElement = require('fbjs/lib/getActiveElement');\nvar isTextInputElement = require('./isTextInputElement');\nvar shallowEqual = require('fbjs/lib/shallowEqual');\n\nvar skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nvar eventTypes = {\n select: {\n phasedRegistrationNames: {\n bubbled: 'onSelect',\n captured: 'onSelectCapture'\n },\n dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']\n }\n};\n\nvar activeElement = null;\nvar activeElementInst = null;\nvar lastSelection = null;\nvar mouseDown = false;\n\n// Track whether a listener exists for this plugin. If none exist, we do\n// not extract events. See #3639.\nvar hasListener = false;\n\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getSelection(node) {\n if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else if (window.getSelection) {\n var selection = window.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n } else if (document.selection) {\n var range = document.selection.createRange();\n return {\n parentElement: range.parentElement(),\n text: range.text,\n top: range.boundingTop,\n left: range.boundingLeft\n };\n }\n}\n\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @return {?SyntheticEvent}\n */\nfunction constructSelectEvent(nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {\n return null;\n }\n\n // Only fire when selection has actually changed.\n var currentSelection = getSelection(activeElement);\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n\n var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);\n\n syntheticEvent.type = 'select';\n syntheticEvent.target = activeElement;\n\n EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);\n\n return syntheticEvent;\n }\n\n return null;\n}\n\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\nvar SelectEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n if (!hasListener) {\n return null;\n }\n\n var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;\n\n switch (topLevelType) {\n // Track the input node that has focus.\n case 'topFocus':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement = targetNode;\n activeElementInst = targetInst;\n lastSelection = null;\n }\n break;\n case 'topBlur':\n activeElement = null;\n activeElementInst = null;\n lastSelection = null;\n break;\n\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n case 'topMouseDown':\n mouseDown = true;\n break;\n case 'topContextMenu':\n case 'topMouseUp':\n mouseDown = false;\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n case 'topSelectionChange':\n if (skipSelectionChangeEvent) {\n break;\n }\n // falls through\n case 'topKeyDown':\n case 'topKeyUp':\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n }\n\n return null;\n },\n\n didPutListener: function (inst, registrationName, listener) {\n if (registrationName === 'onSelect') {\n hasListener = true;\n }\n }\n};\n\nmodule.exports = SelectEventPlugin;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar EventListener = require('fbjs/lib/EventListener');\nvar EventPropagators = require('./EventPropagators');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar SyntheticAnimationEvent = require('./SyntheticAnimationEvent');\nvar SyntheticClipboardEvent = require('./SyntheticClipboardEvent');\nvar SyntheticEvent = require('./SyntheticEvent');\nvar SyntheticFocusEvent = require('./SyntheticFocusEvent');\nvar SyntheticKeyboardEvent = require('./SyntheticKeyboardEvent');\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\nvar SyntheticDragEvent = require('./SyntheticDragEvent');\nvar SyntheticTouchEvent = require('./SyntheticTouchEvent');\nvar SyntheticTransitionEvent = require('./SyntheticTransitionEvent');\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\nvar SyntheticWheelEvent = require('./SyntheticWheelEvent');\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar getEventCharCode = require('./getEventCharCode');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: ['topAbort'],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = {\n * 'topAbort': { sameConfig }\n * };\n */\nvar eventTypes = {};\nvar topLevelEventsToDispatchConfig = {};\n['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n var topEvent = 'top' + capitalizedEvent;\n\n var type = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent]\n };\n eventTypes[event] = type;\n topLevelEventsToDispatchConfig[topEvent] = type;\n});\n\nvar onClickListeners = {};\n\nfunction getDictionaryKey(inst) {\n // Prevents V8 performance issue:\n // https://github.com/facebook/react/pull/7232\n return '.' + inst._rootNodeID;\n}\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nvar SimpleEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];\n if (!dispatchConfig) {\n return null;\n }\n var EventConstructor;\n switch (topLevelType) {\n case 'topAbort':\n case 'topCanPlay':\n case 'topCanPlayThrough':\n case 'topDurationChange':\n case 'topEmptied':\n case 'topEncrypted':\n case 'topEnded':\n case 'topError':\n case 'topInput':\n case 'topInvalid':\n case 'topLoad':\n case 'topLoadedData':\n case 'topLoadedMetadata':\n case 'topLoadStart':\n case 'topPause':\n case 'topPlay':\n case 'topPlaying':\n case 'topProgress':\n case 'topRateChange':\n case 'topReset':\n case 'topSeeked':\n case 'topSeeking':\n case 'topStalled':\n case 'topSubmit':\n case 'topSuspend':\n case 'topTimeUpdate':\n case 'topVolumeChange':\n case 'topWaiting':\n // HTML Events\n // @see http://www.w3.org/TR/html5/index.html#events-0\n EventConstructor = SyntheticEvent;\n break;\n case 'topKeyPress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return null;\n }\n /* falls through */\n case 'topKeyDown':\n case 'topKeyUp':\n EventConstructor = SyntheticKeyboardEvent;\n break;\n case 'topBlur':\n case 'topFocus':\n EventConstructor = SyntheticFocusEvent;\n break;\n case 'topClick':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return null;\n }\n /* falls through */\n case 'topDoubleClick':\n case 'topMouseDown':\n case 'topMouseMove':\n case 'topMouseUp':\n // TODO: Disabled elements should not respond to mouse events\n /* falls through */\n case 'topMouseOut':\n case 'topMouseOver':\n case 'topContextMenu':\n EventConstructor = SyntheticMouseEvent;\n break;\n case 'topDrag':\n case 'topDragEnd':\n case 'topDragEnter':\n case 'topDragExit':\n case 'topDragLeave':\n case 'topDragOver':\n case 'topDragStart':\n case 'topDrop':\n EventConstructor = SyntheticDragEvent;\n break;\n case 'topTouchCancel':\n case 'topTouchEnd':\n case 'topTouchMove':\n case 'topTouchStart':\n EventConstructor = SyntheticTouchEvent;\n break;\n case 'topAnimationEnd':\n case 'topAnimationIteration':\n case 'topAnimationStart':\n EventConstructor = SyntheticAnimationEvent;\n break;\n case 'topTransitionEnd':\n EventConstructor = SyntheticTransitionEvent;\n break;\n case 'topScroll':\n EventConstructor = SyntheticUIEvent;\n break;\n case 'topWheel':\n EventConstructor = SyntheticWheelEvent;\n break;\n case 'topCopy':\n case 'topCut':\n case 'topPaste':\n EventConstructor = SyntheticClipboardEvent;\n break;\n }\n !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;\n var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n },\n\n didPutListener: function (inst, registrationName, listener) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n if (registrationName === 'onClick' && !isInteractive(inst._tag)) {\n var key = getDictionaryKey(inst);\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n if (!onClickListeners[key]) {\n onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);\n }\n }\n },\n\n willDeleteListener: function (inst, registrationName) {\n if (registrationName === 'onClick' && !isInteractive(inst._tag)) {\n var key = getDictionaryKey(inst);\n onClickListeners[key].remove();\n delete onClickListeners[key];\n }\n }\n\n};\n\nmodule.exports = SimpleEventPlugin;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\nvar AnimationEventInterface = {\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);\n\nmodule.exports = SyntheticAnimationEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\nvar ClipboardEventInterface = {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);\n\nmodule.exports = SyntheticClipboardEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\n\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar FocusEventInterface = {\n relatedTarget: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);\n\nmodule.exports = SyntheticFocusEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\n\nvar getEventCharCode = require('./getEventCharCode');\nvar getEventKey = require('./getEventKey');\nvar getEventModifierState = require('./getEventModifierState');\n\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar KeyboardEventInterface = {\n key: getEventKey,\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);\n\nmodule.exports = SyntheticKeyboardEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar getEventCharCode = require('./getEventCharCode');\n\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar normalizeKey = {\n 'Esc': 'Escape',\n 'Spacebar': ' ',\n 'Left': 'ArrowLeft',\n 'Up': 'ArrowUp',\n 'Right': 'ArrowRight',\n 'Down': 'ArrowDown',\n 'Del': 'Delete',\n 'Win': 'OS',\n 'Menu': 'ContextMenu',\n 'Apps': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'MozPrintableKey': 'Unidentified'\n};\n\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar translateToKey = {\n 8: 'Backspace',\n 9: 'Tab',\n 12: 'Clear',\n 13: 'Enter',\n 16: 'Shift',\n 17: 'Control',\n 18: 'Alt',\n 19: 'Pause',\n 20: 'CapsLock',\n 27: 'Escape',\n 32: ' ',\n 33: 'PageUp',\n 34: 'PageDown',\n 35: 'End',\n 36: 'Home',\n 37: 'ArrowLeft',\n 38: 'ArrowUp',\n 39: 'ArrowRight',\n 40: 'ArrowDown',\n 45: 'Insert',\n 46: 'Delete',\n 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',\n 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',\n 144: 'NumLock',\n 145: 'ScrollLock',\n 224: 'Meta'\n};\n\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (key !== 'Unidentified') {\n return key;\n }\n }\n\n // Browser does not implement `key`, polyfill as much of it as we can.\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent);\n\n // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n return '';\n}\n\nmodule.exports = getEventKey;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\n\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar DragEventInterface = {\n dataTransfer: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);\n\nmodule.exports = SyntheticDragEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\n\nvar getEventModifierState = require('./getEventModifierState');\n\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\nvar TouchEventInterface = {\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: getEventModifierState\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);\n\nmodule.exports = SyntheticTouchEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\nvar TransitionEventInterface = {\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);\n\nmodule.exports = SyntheticTransitionEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\n\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar WheelEventInterface = {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX :\n // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY :\n // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY :\n // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: null,\n\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticMouseEvent}\n */\nfunction SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);\n\nmodule.exports = SyntheticWheelEvent;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar validateDOMNesting = require('./validateDOMNesting');\n\nvar DOC_NODE_TYPE = 9;\n\nfunction ReactDOMContainerInfo(topLevelWrapper, node) {\n var info = {\n _topLevelWrapper: topLevelWrapper,\n _idCounter: 1,\n _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,\n _node: node,\n _tag: node ? node.nodeName.toLowerCase() : null,\n _namespaceURI: node ? node.namespaceURI : null\n };\n if (process.env.NODE_ENV !== 'production') {\n info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;\n }\n return info;\n}\n\nmodule.exports = ReactDOMContainerInfo;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactDOMFeatureFlags = {\n useCreateElement: true,\n useFiber: false\n};\n\nmodule.exports = ReactDOMFeatureFlags;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar adler32 = require('./adler32');\n\nvar TAG_END = /\\/?>/;\nvar COMMENT_START = /^<\\!\\-\\-/;\n\nvar ReactMarkupChecksum = {\n CHECKSUM_ATTR_NAME: 'data-react-checksum',\n\n /**\n * @param {string} markup Markup string\n * @return {string} Markup string with checksum attribute attached\n */\n addChecksumToMarkup: function (markup) {\n var checksum = adler32(markup);\n\n // Add checksum (handle both parent tags, comments and self-closing tags)\n if (COMMENT_START.test(markup)) {\n return markup;\n } else {\n return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '=\"' + checksum + '\"$&');\n }\n },\n\n /**\n * @param {string} markup to use\n * @param {DOMElement} element root React element\n * @returns {boolean} whether or not the markup is the same\n */\n canReuseMarkup: function (markup, element) {\n var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n existingChecksum = existingChecksum && parseInt(existingChecksum, 10);\n var markupChecksum = adler32(markup);\n return markupChecksum === existingChecksum;\n }\n};\n\nmodule.exports = ReactMarkupChecksum;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar MOD = 65521;\n\n// adler32 is not cryptographically strong, and is only used to sanity check that\n// markup generated on the server matches the markup generated on the client.\n// This implementation (a modified version of the SheetJS version) has been optimized\n// for our use case, at the expense of conforming to the adler32 specification\n// for non-ascii inputs.\nfunction adler32(data) {\n var a = 1;\n var b = 0;\n var i = 0;\n var l = data.length;\n var m = l & ~0x3;\n while (i < m) {\n var n = Math.min(i + 4096, m);\n for (; i < n; i += 4) {\n b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));\n }\n a %= MOD;\n b %= MOD;\n }\n for (; i < l; i++) {\n b += a += data.charCodeAt(i);\n }\n a %= MOD;\n b %= MOD;\n return a | b << 16;\n}\n\nmodule.exports = adler32;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nmodule.exports = '15.4.1';","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInstanceMap = require('./ReactInstanceMap');\n\nvar getHostComponentFromComposite = require('./getHostComponentFromComposite');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Returns the DOM node rendered by this element.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode\n *\n * @param {ReactComponent|DOMElement} componentOrElement\n * @return {?DOMElement} The root node of this element.\n */\nfunction findDOMNode(componentOrElement) {\n if (process.env.NODE_ENV !== 'production') {\n var owner = ReactCurrentOwner.current;\n if (owner !== null) {\n process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;\n owner._warnedAboutRefsInRender = true;\n }\n }\n if (componentOrElement == null) {\n return null;\n }\n if (componentOrElement.nodeType === 1) {\n return componentOrElement;\n }\n\n var inst = ReactInstanceMap.get(componentOrElement);\n if (inst) {\n inst = getHostComponentFromComposite(inst);\n return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;\n }\n\n if (typeof componentOrElement.render === 'function') {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;\n } else {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;\n }\n}\n\nmodule.exports = findDOMNode;","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactMount = require('./ReactMount');\n\nmodule.exports = ReactMount.renderSubtreeIntoContainer;","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _createTransitionManager2 = require('./createTransitionManager');\n\nvar _createTransitionManager3 = _interopRequireDefault(_createTransitionManager2);\n\nvar _InternalPropTypes = require('./InternalPropTypes');\n\nvar _RouterContext = require('./RouterContext');\n\nvar _RouterContext2 = _interopRequireDefault(_RouterContext);\n\nvar _RouteUtils = require('./RouteUtils');\n\nvar _RouterUtils = require('./RouterUtils');\n\nvar _routerWarning = require('./routerWarning');\n\nvar _routerWarning2 = _interopRequireDefault(_routerWarning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar _React$PropTypes = _react2.default.PropTypes,\n func = _React$PropTypes.func,\n object = _React$PropTypes.object;\n\n/**\n * A <Router> is a high-level API for automatically setting up\n * a router that renders a <RouterContext> with all the props\n * it needs each time the URL changes.\n */\n\nvar Router = _react2.default.createClass({\n displayName: 'Router',\n\n\n propTypes: {\n history: object,\n children: _InternalPropTypes.routes,\n routes: _InternalPropTypes.routes, // alias for children\n render: func,\n createElement: func,\n onError: func,\n onUpdate: func,\n\n // PRIVATE: For client-side rehydration of server match.\n matchContext: object\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n render: function render(props) {\n return _react2.default.createElement(_RouterContext2.default, props);\n }\n };\n },\n getInitialState: function getInitialState() {\n return {\n location: null,\n routes: null,\n params: null,\n components: null\n };\n },\n handleError: function handleError(error) {\n if (this.props.onError) {\n this.props.onError.call(this, error);\n } else {\n // Throw errors by default so we don't silently swallow them!\n throw error; // This error probably occurred in getChildRoutes or getComponents.\n }\n },\n createRouterObject: function createRouterObject(state) {\n var matchContext = this.props.matchContext;\n\n if (matchContext) {\n return matchContext.router;\n }\n\n var history = this.props.history;\n\n return (0, _RouterUtils.createRouterObject)(history, this.transitionManager, state);\n },\n createTransitionManager: function createTransitionManager() {\n var matchContext = this.props.matchContext;\n\n if (matchContext) {\n return matchContext.transitionManager;\n }\n\n var history = this.props.history;\n var _props = this.props,\n routes = _props.routes,\n children = _props.children;\n\n\n !history.getCurrentLocation ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'You have provided a history object created with history v2.x or ' + 'earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please upgrade to history v3.x.') : (0, _invariant2.default)(false) : void 0;\n\n return (0, _createTransitionManager3.default)(history, (0, _RouteUtils.createRoutes)(routes || children));\n },\n componentWillMount: function componentWillMount() {\n var _this = this;\n\n this.transitionManager = this.createTransitionManager();\n this.router = this.createRouterObject(this.state);\n\n this._unlisten = this.transitionManager.listen(function (error, state) {\n if (error) {\n _this.handleError(error);\n } else {\n // Keep the identity of this.router because of a caveat in ContextUtils:\n // they only work if the object identity is preserved.\n (0, _RouterUtils.assignRouterState)(_this.router, state);\n _this.setState(state, _this.props.onUpdate);\n }\n });\n },\n\n\n /* istanbul ignore next: sanity check */\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : void 0;\n\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change <Router routes>; it will be ignored') : void 0;\n },\n componentWillUnmount: function componentWillUnmount() {\n if (this._unlisten) this._unlisten();\n },\n render: function render() {\n var _state = this.state,\n location = _state.location,\n routes = _state.routes,\n params = _state.params,\n components = _state.components;\n\n var _props2 = this.props,\n createElement = _props2.createElement,\n render = _props2.render,\n props = _objectWithoutProperties(_props2, ['createElement', 'render']);\n\n if (location == null) return null; // Async match\n\n // Only forward non-Router-specific props to routing context, as those are\n // the only ones that might be custom routing context props.\n Object.keys(Router.propTypes).forEach(function (propType) {\n return delete props[propType];\n });\n\n return render(_extends({}, props, {\n router: this.router,\n location: location,\n routes: routes,\n params: params,\n components: components,\n createElement: createElement\n }));\n }\n});\n\nexports.default = Router;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _PatternUtils = require('./PatternUtils');\n\nfunction routeParamsChanged(route, prevState, nextState) {\n if (!route.path) return false;\n\n var paramNames = (0, _PatternUtils.getParamNames)(route.path);\n\n return paramNames.some(function (paramName) {\n return prevState.params[paramName] !== nextState.params[paramName];\n });\n}\n\n/**\n * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by\n * the change from prevState to nextState. We leave routes if either\n * 1) they are not in the next state or 2) they are in the next state\n * but their params have changed (i.e. /users/123 => /users/456).\n *\n * leaveRoutes are ordered starting at the leaf route of the tree\n * we're leaving up to the common parent route. enterRoutes are ordered\n * from the top of the tree we're entering down to the leaf route.\n *\n * changeRoutes are any routes that didn't leave or enter during\n * the transition.\n */\nfunction computeChangedRoutes(prevState, nextState) {\n var prevRoutes = prevState && prevState.routes;\n var nextRoutes = nextState.routes;\n\n var leaveRoutes = void 0,\n changeRoutes = void 0,\n enterRoutes = void 0;\n if (prevRoutes) {\n (function () {\n var parentIsLeaving = false;\n leaveRoutes = prevRoutes.filter(function (route) {\n if (parentIsLeaving) {\n return true;\n } else {\n var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);\n if (isLeaving) parentIsLeaving = true;\n return isLeaving;\n }\n });\n\n // onLeave hooks start at the leaf route.\n leaveRoutes.reverse();\n\n enterRoutes = [];\n changeRoutes = [];\n\n nextRoutes.forEach(function (route) {\n var isNew = prevRoutes.indexOf(route) === -1;\n var paramsChanged = leaveRoutes.indexOf(route) !== -1;\n\n if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);\n });\n })();\n } else {\n leaveRoutes = [];\n changeRoutes = [];\n enterRoutes = nextRoutes;\n }\n\n return {\n leaveRoutes: leaveRoutes,\n changeRoutes: changeRoutes,\n enterRoutes: enterRoutes\n };\n}\n\nexports.default = computeChangedRoutes;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\nexports.runEnterHooks = runEnterHooks;\nexports.runChangeHooks = runChangeHooks;\nexports.runLeaveHooks = runLeaveHooks;\n\nvar _AsyncUtils = require('./AsyncUtils');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar PendingHooks = function PendingHooks() {\n var _this = this;\n\n _classCallCheck(this, PendingHooks);\n\n this.hooks = [];\n\n this.add = function (hook) {\n return _this.hooks.push(hook);\n };\n\n this.remove = function (hook) {\n return _this.hooks = _this.hooks.filter(function (h) {\n return h !== hook;\n });\n };\n\n this.has = function (hook) {\n return _this.hooks.indexOf(hook) !== -1;\n };\n\n this.clear = function () {\n return _this.hooks = [];\n };\n};\n\nvar enterHooks = new PendingHooks();\nvar changeHooks = new PendingHooks();\n\nfunction createTransitionHook(hook, route, asyncArity, pendingHooks) {\n var isSync = hook.length < asyncArity;\n\n var transitionHook = function transitionHook() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n hook.apply(route, args);\n\n if (isSync) {\n var callback = args[args.length - 1];\n // Assume hook executes synchronously and\n // automatically call the callback.\n callback();\n }\n };\n\n pendingHooks.add(transitionHook);\n\n return transitionHook;\n}\n\nfunction getEnterHooks(routes) {\n return routes.reduce(function (hooks, route) {\n if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks));\n return hooks;\n }, []);\n}\n\nfunction getChangeHooks(routes) {\n return routes.reduce(function (hooks, route) {\n if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks));\n return hooks;\n }, []);\n}\n\nfunction runTransitionHooks(length, iter, callback) {\n if (!length) {\n callback();\n return;\n }\n\n var redirectInfo = void 0;\n function replace(location) {\n redirectInfo = location;\n }\n\n (0, _AsyncUtils.loopAsync)(length, function (index, next, done) {\n iter(index, replace, function (error) {\n if (error || redirectInfo) {\n done(error, redirectInfo); // No need to continue.\n } else {\n next();\n }\n });\n }, callback);\n}\n\n/**\n * Runs all onEnter hooks in the given array of routes in order\n * with onEnter(nextState, replace, callback) and calls\n * callback(error, redirectInfo) when finished. The first hook\n * to use replace short-circuits the loop.\n *\n * If a hook needs to run asynchronously, it may use the callback\n * function. However, doing so will cause the transition to pause,\n * which could lead to a non-responsive UI if the hook is slow.\n */\nfunction runEnterHooks(routes, nextState, callback) {\n enterHooks.clear();\n var hooks = getEnterHooks(routes);\n return runTransitionHooks(hooks.length, function (index, replace, next) {\n var wrappedNext = function wrappedNext() {\n if (enterHooks.has(hooks[index])) {\n next();\n enterHooks.remove(hooks[index]);\n }\n };\n hooks[index](nextState, replace, wrappedNext);\n }, callback);\n}\n\n/**\n * Runs all onChange hooks in the given array of routes in order\n * with onChange(prevState, nextState, replace, callback) and calls\n * callback(error, redirectInfo) when finished. The first hook\n * to use replace short-circuits the loop.\n *\n * If a hook needs to run asynchronously, it may use the callback\n * function. However, doing so will cause the transition to pause,\n * which could lead to a non-responsive UI if the hook is slow.\n */\nfunction runChangeHooks(routes, state, nextState, callback) {\n changeHooks.clear();\n var hooks = getChangeHooks(routes);\n return runTransitionHooks(hooks.length, function (index, replace, next) {\n var wrappedNext = function wrappedNext() {\n if (changeHooks.has(hooks[index])) {\n next();\n changeHooks.remove(hooks[index]);\n }\n };\n hooks[index](state, nextState, replace, wrappedNext);\n }, callback);\n}\n\n/**\n * Runs all onLeave hooks in the given array of routes in order.\n */\nfunction runLeaveHooks(routes, prevState) {\n for (var i = 0, len = routes.length; i < len; ++i) {\n if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState);\n }\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = isActive;\n\nvar _PatternUtils = require('./PatternUtils');\n\nfunction deepEqual(a, b) {\n if (a == b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return deepEqual(item, b[index]);\n });\n }\n\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') {\n for (var p in a) {\n if (!Object.prototype.hasOwnProperty.call(a, p)) {\n continue;\n }\n\n if (a[p] === undefined) {\n if (b[p] !== undefined) {\n return false;\n }\n } else if (!Object.prototype.hasOwnProperty.call(b, p)) {\n return false;\n } else if (!deepEqual(a[p], b[p])) {\n return false;\n }\n }\n\n return true;\n }\n\n return String(a) === String(b);\n}\n\n/**\n * Returns true if the current pathname matches the supplied one, net of\n * leading and trailing slash normalization. This is sufficient for an\n * indexOnly route match.\n */\nfunction pathIsActive(pathname, currentPathname) {\n // Normalize leading slash for consistency. Leading slash on pathname has\n // already been normalized in isActive. See caveat there.\n if (currentPathname.charAt(0) !== '/') {\n currentPathname = '/' + currentPathname;\n }\n\n // Normalize the end of both path names too. Maybe `/foo/` shouldn't show\n // `/foo` as active, but in this case, we would already have failed the\n // match.\n if (pathname.charAt(pathname.length - 1) !== '/') {\n pathname += '/';\n }\n if (currentPathname.charAt(currentPathname.length - 1) !== '/') {\n currentPathname += '/';\n }\n\n return currentPathname === pathname;\n}\n\n/**\n * Returns true if the given pathname matches the active routes and params.\n */\nfunction routeIsActive(pathname, routes, params) {\n var remainingPathname = pathname,\n paramNames = [],\n paramValues = [];\n\n // for...of would work here but it's probably slower post-transpilation.\n for (var i = 0, len = routes.length; i < len; ++i) {\n var route = routes[i];\n var pattern = route.path || '';\n\n if (pattern.charAt(0) === '/') {\n remainingPathname = pathname;\n paramNames = [];\n paramValues = [];\n }\n\n if (remainingPathname !== null && pattern) {\n var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);\n if (matched) {\n remainingPathname = matched.remainingPathname;\n paramNames = [].concat(paramNames, matched.paramNames);\n paramValues = [].concat(paramValues, matched.paramValues);\n } else {\n remainingPathname = null;\n }\n\n if (remainingPathname === '') {\n // We have an exact match on the route. Just check that all the params\n // match.\n // FIXME: This doesn't work on repeated params.\n return paramNames.every(function (paramName, index) {\n return String(paramValues[index]) === String(params[paramName]);\n });\n }\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if all key/value pairs in the given query are\n * currently active.\n */\nfunction queryIsActive(query, activeQuery) {\n if (activeQuery == null) return query == null;\n\n if (query == null) return true;\n\n return deepEqual(query, activeQuery);\n}\n\n/**\n * Returns true if a <Link> to the given pathname/query combination is\n * currently active.\n */\nfunction isActive(_ref, indexOnly, currentLocation, routes, params) {\n var pathname = _ref.pathname,\n query = _ref.query;\n\n if (currentLocation == null) return false;\n\n // TODO: This is a bit ugly. It keeps around support for treating pathnames\n // without preceding slashes as absolute paths, but possibly also works\n // around the same quirks with basenames as in matchRoutes.\n if (pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n\n if (!pathIsActive(pathname, currentLocation.pathname)) {\n // The path check is necessary and sufficient for indexOnly, but otherwise\n // we still need to check the routes.\n if (indexOnly || !routeIsActive(pathname, routes, params)) {\n return false;\n }\n }\n\n return queryIsActive(query, currentLocation.query);\n}\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _AsyncUtils = require('./AsyncUtils');\n\nvar _PromiseUtils = require('./PromiseUtils');\n\nfunction getComponentsForRoute(nextState, route, callback) {\n if (route.component || route.components) {\n callback(null, route.component || route.components);\n return;\n }\n\n var getComponent = route.getComponent || route.getComponents;\n if (getComponent) {\n var componentReturn = getComponent.call(route, nextState, callback);\n if ((0, _PromiseUtils.isPromise)(componentReturn)) componentReturn.then(function (component) {\n return callback(null, component);\n }, callback);\n } else {\n callback();\n }\n}\n\n/**\n * Asynchronously fetches all components needed for the given router\n * state and calls callback(error, components) when finished.\n *\n * Note: This operation may finish synchronously if no routes have an\n * asynchronous getComponents method.\n */\nfunction getComponents(nextState, callback) {\n (0, _AsyncUtils.mapAsync)(nextState.routes, function (route, index, callback) {\n getComponentsForRoute(nextState, route, callback);\n }, callback);\n}\n\nexports.default = getComponents;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = matchRoutes;\n\nvar _AsyncUtils = require('./AsyncUtils');\n\nvar _PromiseUtils = require('./PromiseUtils');\n\nvar _PatternUtils = require('./PatternUtils');\n\nvar _routerWarning = require('./routerWarning');\n\nvar _routerWarning2 = _interopRequireDefault(_routerWarning);\n\nvar _RouteUtils = require('./RouteUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChildRoutes(route, location, paramNames, paramValues, callback) {\n if (route.childRoutes) {\n return [null, route.childRoutes];\n }\n if (!route.getChildRoutes) {\n return [];\n }\n\n var sync = true,\n result = void 0;\n\n var partialNextState = {\n location: location,\n params: createParams(paramNames, paramValues)\n };\n\n var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) {\n childRoutes = !error && (0, _RouteUtils.createRoutes)(childRoutes);\n if (sync) {\n result = [error, childRoutes];\n return;\n }\n\n callback(error, childRoutes);\n });\n\n if ((0, _PromiseUtils.isPromise)(childRoutesReturn)) childRoutesReturn.then(function (childRoutes) {\n return callback(null, (0, _RouteUtils.createRoutes)(childRoutes));\n }, callback);\n\n sync = false;\n return result; // Might be undefined.\n}\n\nfunction getIndexRoute(route, location, paramNames, paramValues, callback) {\n if (route.indexRoute) {\n callback(null, route.indexRoute);\n } else if (route.getIndexRoute) {\n var partialNextState = {\n location: location,\n params: createParams(paramNames, paramValues)\n };\n\n var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) {\n callback(error, !error && (0, _RouteUtils.createRoutes)(indexRoute)[0]);\n });\n\n if ((0, _PromiseUtils.isPromise)(indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) {\n return callback(null, (0, _RouteUtils.createRoutes)(indexRoute)[0]);\n }, callback);\n } else if (route.childRoutes) {\n (function () {\n var pathless = route.childRoutes.filter(function (childRoute) {\n return !childRoute.path;\n });\n\n (0, _AsyncUtils.loopAsync)(pathless.length, function (index, next, done) {\n getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) {\n if (error || indexRoute) {\n var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]);\n done(error, routes);\n } else {\n next();\n }\n });\n }, function (err, routes) {\n callback(null, routes);\n });\n })();\n } else {\n callback();\n }\n}\n\nfunction assignParams(params, paramNames, paramValues) {\n return paramNames.reduce(function (params, paramName, index) {\n var paramValue = paramValues && paramValues[index];\n\n if (Array.isArray(params[paramName])) {\n params[paramName].push(paramValue);\n } else if (paramName in params) {\n params[paramName] = [params[paramName], paramValue];\n } else {\n params[paramName] = paramValue;\n }\n\n return params;\n }, params);\n}\n\nfunction createParams(paramNames, paramValues) {\n return assignParams({}, paramNames, paramValues);\n}\n\nfunction matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) {\n var pattern = route.path || '';\n\n if (pattern.charAt(0) === '/') {\n remainingPathname = location.pathname;\n paramNames = [];\n paramValues = [];\n }\n\n // Only try to match the path if the route actually has a pattern, and if\n // we're not just searching for potential nested absolute paths.\n if (remainingPathname !== null && pattern) {\n try {\n var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);\n if (matched) {\n remainingPathname = matched.remainingPathname;\n paramNames = [].concat(paramNames, matched.paramNames);\n paramValues = [].concat(paramValues, matched.paramValues);\n } else {\n remainingPathname = null;\n }\n } catch (error) {\n callback(error);\n }\n\n // By assumption, pattern is non-empty here, which is the prerequisite for\n // actually terminating a match.\n if (remainingPathname === '') {\n var _ret2 = function () {\n var match = {\n routes: [route],\n params: createParams(paramNames, paramValues)\n };\n\n getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {\n if (error) {\n callback(error);\n } else {\n if (Array.isArray(indexRoute)) {\n var _match$routes;\n\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(indexRoute.every(function (route) {\n return !route.path;\n }), 'Index routes should not have paths') : void 0;\n (_match$routes = match.routes).push.apply(_match$routes, indexRoute);\n } else if (indexRoute) {\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(!indexRoute.path, 'Index routes should not have paths') : void 0;\n match.routes.push(indexRoute);\n }\n\n callback(null, match);\n }\n });\n\n return {\n v: void 0\n };\n }();\n\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === \"object\") return _ret2.v;\n }\n }\n\n if (remainingPathname != null || route.childRoutes) {\n // Either a) this route matched at least some of the path or b)\n // we don't have to load this route's children asynchronously. In\n // either case continue checking for matches in the subtree.\n var onChildRoutes = function onChildRoutes(error, childRoutes) {\n if (error) {\n callback(error);\n } else if (childRoutes) {\n // Check the child routes to see if any of them match.\n matchRoutes(childRoutes, location, function (error, match) {\n if (error) {\n callback(error);\n } else if (match) {\n // A child route matched! Augment the match and pass it up the stack.\n match.routes.unshift(route);\n callback(null, match);\n } else {\n callback();\n }\n }, remainingPathname, paramNames, paramValues);\n } else {\n callback();\n }\n };\n\n var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);\n if (result) {\n onChildRoutes.apply(undefined, result);\n }\n } else {\n callback();\n }\n}\n\n/**\n * Asynchronously matches the given location to a set of routes and calls\n * callback(error, state) when finished. The state object will have the\n * following properties:\n *\n * - routes An array of routes that matched, in hierarchical order\n * - params An object of URL parameters\n *\n * Note: This operation may finish synchronously if no routes have an\n * asynchronous getChildRoutes method.\n */\nfunction matchRoutes(routes, location, callback, remainingPathname) {\n var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n\n if (remainingPathname === undefined) {\n // TODO: This is a little bit ugly, but it works around a quirk in history\n // that strips the leading slash from pathnames when using basenames with\n // trailing slashes.\n if (location.pathname.charAt(0) !== '/') {\n location = _extends({}, location, {\n pathname: '/' + location.pathname\n });\n }\n remainingPathname = location.pathname;\n }\n\n (0, _AsyncUtils.loopAsync)(routes.length, function (index, next, done) {\n matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) {\n if (error || match) {\n done(error, match);\n } else {\n next();\n }\n });\n }, callback);\n}\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _PatternUtils = require('./PatternUtils');\n\n/**\n * Extracts an object of params the given route cares about from\n * the given params object.\n */\nfunction getRouteParams(route, params) {\n var routeParams = {};\n\n if (!route.path) return routeParams;\n\n (0, _PatternUtils.getParamNames)(route.path).forEach(function (p) {\n if (Object.prototype.hasOwnProperty.call(params, p)) {\n routeParams[p] = params[p];\n }\n });\n\n return routeParams;\n}\n\nexports.default = getRouteParams;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Link = require('./Link');\n\nvar _Link2 = _interopRequireDefault(_Link);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * An <IndexLink> is used to link to an <IndexRoute>.\n */\nvar IndexLink = _react2.default.createClass({\n displayName: 'IndexLink',\n render: function render() {\n return _react2.default.createElement(_Link2.default, _extends({}, this.props, { onlyActiveOnIndex: true }));\n }\n});\n\nexports.default = IndexLink;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.default = withRouter;\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _hoistNonReactStatics = require('hoist-non-react-statics');\n\nvar _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);\n\nvar _ContextUtils = require('./ContextUtils');\n\nvar _PropTypes = require('./PropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n}\n\nfunction withRouter(WrappedComponent, options) {\n var withRef = options && options.withRef;\n\n var WithRouter = _react2.default.createClass({\n displayName: 'WithRouter',\n\n mixins: [(0, _ContextUtils.ContextSubscriber)('router')],\n\n contextTypes: { router: _PropTypes.routerShape },\n propTypes: { router: _PropTypes.routerShape },\n\n getWrappedInstance: function getWrappedInstance() {\n !withRef ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : (0, _invariant2.default)(false) : void 0;\n\n return this.wrappedInstance;\n },\n render: function render() {\n var _this = this;\n\n var router = this.props.router || this.context.router;\n var params = router.params,\n location = router.location,\n routes = router.routes;\n\n var props = _extends({}, this.props, { router: router, params: params, location: location, routes: routes });\n\n if (withRef) {\n props.ref = function (c) {\n _this.wrappedInstance = c;\n };\n }\n\n return _react2.default.createElement(WrappedComponent, props);\n }\n });\n\n WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')';\n WithRouter.WrappedComponent = WrappedComponent;\n\n return (0, _hoistNonReactStatics2.default)(WithRouter, WrappedComponent);\n}\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _routerWarning = require('./routerWarning');\n\nvar _routerWarning2 = _interopRequireDefault(_routerWarning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _Redirect = require('./Redirect');\n\nvar _Redirect2 = _interopRequireDefault(_Redirect);\n\nvar _InternalPropTypes = require('./InternalPropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _React$PropTypes = _react2.default.PropTypes,\n string = _React$PropTypes.string,\n object = _React$PropTypes.object;\n\n/**\n * An <IndexRedirect> is used to redirect from an indexRoute.\n */\n/* eslint-disable react/require-render-return */\n\nvar IndexRedirect = _react2.default.createClass({\n displayName: 'IndexRedirect',\n\n\n statics: {\n createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {\n /* istanbul ignore else: sanity check */\n if (parentRoute) {\n parentRoute.indexRoute = _Redirect2.default.createRouteFromReactElement(element);\n } else {\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(false, 'An <IndexRedirect> does not make sense at the root of your route config') : void 0;\n }\n }\n },\n\n propTypes: {\n to: string.isRequired,\n query: object,\n state: object,\n onEnter: _InternalPropTypes.falsy,\n children: _InternalPropTypes.falsy\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n !false ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;\n }\n});\n\nexports.default = IndexRedirect;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _routerWarning = require('./routerWarning');\n\nvar _routerWarning2 = _interopRequireDefault(_routerWarning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _RouteUtils = require('./RouteUtils');\n\nvar _InternalPropTypes = require('./InternalPropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar func = _react2.default.PropTypes.func;\n\n/**\n * An <IndexRoute> is used to specify its parent's <Route indexRoute> in\n * a JSX route config.\n */\n/* eslint-disable react/require-render-return */\n\nvar IndexRoute = _react2.default.createClass({\n displayName: 'IndexRoute',\n\n\n statics: {\n createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {\n /* istanbul ignore else: sanity check */\n if (parentRoute) {\n parentRoute.indexRoute = (0, _RouteUtils.createRouteFromReactElement)(element);\n } else {\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(false, 'An <IndexRoute> does not make sense at the root of your route config') : void 0;\n }\n }\n },\n\n propTypes: {\n path: _InternalPropTypes.falsy,\n component: _InternalPropTypes.component,\n components: _InternalPropTypes.components,\n getComponent: func,\n getComponents: func\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n !false ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, '<IndexRoute> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;\n }\n});\n\nexports.default = IndexRoute;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _RouteUtils = require('./RouteUtils');\n\nvar _InternalPropTypes = require('./InternalPropTypes');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _React$PropTypes = _react2.default.PropTypes,\n string = _React$PropTypes.string,\n func = _React$PropTypes.func;\n\n/**\n * A <Route> is used to declare which components are rendered to the\n * page when the URL matches a given pattern.\n *\n * Routes are arranged in a nested tree structure. When a new URL is\n * requested, the tree is searched depth-first to find a route whose\n * path matches the URL. When one is found, all routes in the tree\n * that lead to it are considered \"active\" and their components are\n * rendered into the DOM, nested in the same order as in the tree.\n */\n/* eslint-disable react/require-render-return */\n\nvar Route = _react2.default.createClass({\n displayName: 'Route',\n\n\n statics: {\n createRouteFromReactElement: _RouteUtils.createRouteFromReactElement\n },\n\n propTypes: {\n path: string,\n component: _InternalPropTypes.component,\n components: _InternalPropTypes.components,\n getComponent: func,\n getComponents: func\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n !false ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, '<Route> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;\n }\n});\n\nexports.default = Route;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _Actions = require('history/lib/Actions');\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _createMemoryHistory = require('./createMemoryHistory');\n\nvar _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _RouteUtils = require('./RouteUtils');\n\nvar _RouterUtils = require('./RouterUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/**\n * A high-level API to be used for server-side rendering.\n *\n * This function matches a location to a set of routes and calls\n * callback(error, redirectLocation, renderProps) when finished.\n *\n * Note: You probably don't want to use this in a browser unless you're using\n * server-side rendering with async routes.\n */\nfunction match(_ref, callback) {\n var history = _ref.history,\n routes = _ref.routes,\n location = _ref.location,\n options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']);\n\n !(history || location) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'match needs a history or a location') : (0, _invariant2.default)(false) : void 0;\n\n history = history ? history : (0, _createMemoryHistory2.default)(options);\n var transitionManager = (0, _createTransitionManager2.default)(history, (0, _RouteUtils.createRoutes)(routes));\n\n if (location) {\n // Allow match({ location: '/the/path', ... })\n location = history.createLocation(location);\n } else {\n location = history.getCurrentLocation();\n }\n\n transitionManager.match(location, function (error, redirectLocation, nextState) {\n var renderProps = void 0;\n\n if (nextState) {\n var router = (0, _RouterUtils.createRouterObject)(history, transitionManager, nextState);\n renderProps = _extends({}, nextState, {\n router: router,\n matchContext: { transitionManager: transitionManager, router: router }\n });\n }\n\n callback(error, redirectLocation && history.createLocation(redirectLocation, _Actions.REPLACE), renderProps);\n });\n}\n\nexports.default = match;\nmodule.exports = exports['default'];","'use strict';\nvar strictUriEncode = require('strict-uri-encode');\nvar objectAssign = require('object-assign');\n\nfunction encoderForArrayFormat(opts) {\n\tswitch (opts.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn function (key, value, index) {\n\t\t\t\treturn value === null ? [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[',\n\t\t\t\t\tindex,\n\t\t\t\t\t']'\n\t\t\t\t].join('') : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[',\n\t\t\t\t\tencode(index, opts),\n\t\t\t\t\t']=',\n\t\t\t\t\tencode(value, opts)\n\t\t\t\t].join('');\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn function (key, value) {\n\t\t\t\treturn value === null ? encode(key, opts) : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[]=',\n\t\t\t\t\tencode(value, opts)\n\t\t\t\t].join('');\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn function (key, value) {\n\t\t\t\treturn value === null ? encode(key, opts) : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'=',\n\t\t\t\t\tencode(value, opts)\n\t\t\t\t].join('');\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(opts) {\n\tvar result;\n\n\tswitch (opts.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn function (key, value, accumulator) {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn function (key, value, accumulator) {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t} else if (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn function (key, value, accumulator) {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction encode(value, opts) {\n\tif (opts.encode) {\n\t\treturn opts.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t} else if (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input)).sort(function (a, b) {\n\t\t\treturn Number(a) - Number(b);\n\t\t}).map(function (key) {\n\t\t\treturn input[key];\n\t\t});\n\t}\n\n\treturn input;\n}\n\nexports.extract = function (str) {\n\treturn str.split('?')[1] || '';\n};\n\nexports.parse = function (str, opts) {\n\topts = objectAssign({arrayFormat: 'none'}, opts);\n\n\tvar formatter = parserForArrayFormat(opts);\n\n\t// Create an object with no prototype\n\t// https://github.com/sindresorhus/query-string/issues/47\n\tvar ret = Object.create(null);\n\n\tif (typeof str !== 'string') {\n\t\treturn ret;\n\t}\n\n\tstr = str.trim().replace(/^(\\?|#|&)/, '');\n\n\tif (!str) {\n\t\treturn ret;\n\t}\n\n\tstr.split('&').forEach(function (param) {\n\t\tvar parts = param.replace(/\\+/g, ' ').split('=');\n\t\t// Firefox (pre 40) decodes `%3D` to `=`\n\t\t// https://github.com/sindresorhus/query-string/pull/37\n\t\tvar key = parts.shift();\n\t\tvar val = parts.length > 0 ? parts.join('=') : undefined;\n\n\t\t// missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tval = val === undefined ? null : decodeURIComponent(val);\n\n\t\tformatter(decodeURIComponent(key), val, ret);\n\t});\n\n\treturn Object.keys(ret).sort().reduce(function (result, key) {\n\t\tvar val = ret[key];\n\t\tif (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(val);\n\t\t} else {\n\t\t\tresult[key] = val;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n};\n\nexports.stringify = function (obj, opts) {\n\tvar defaults = {\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none'\n\t};\n\n\topts = objectAssign(defaults, opts);\n\n\tvar formatter = encoderForArrayFormat(opts);\n\n\treturn obj ? Object.keys(obj).sort().map(function (key) {\n\t\tvar val = obj[key];\n\n\t\tif (val === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (val === null) {\n\t\t\treturn encode(key, opts);\n\t\t}\n\n\t\tif (Array.isArray(val)) {\n\t\t\tvar result = [];\n\n\t\t\tval.slice().forEach(function (val2) {\n\t\t\t\tif (val2 === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresult.push(formatter(key, val2, result.length));\n\t\t\t});\n\n\t\t\treturn result.join('&');\n\t\t}\n\n\t\treturn encode(key, opts) + '=' + encode(val, opts);\n\t}).filter(function (x) {\n\t\treturn x.length > 0;\n\t}).join('&') : '';\n};\n","'use strict';\nmodule.exports = function (str) {\n\treturn encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n\t\treturn '%' + c.charCodeAt(0).toString(16).toUpperCase();\n\t});\n};\n","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createHistory = require('./createHistory');\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nvar _Actions = require('./Actions');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createStateStorage = function createStateStorage(entries) {\n return entries.filter(function (entry) {\n return entry.state;\n }).reduce(function (memo, entry) {\n memo[entry.key] = entry.state;\n return memo;\n }, {});\n};\n\nvar createMemoryHistory = function createMemoryHistory() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (Array.isArray(options)) {\n options = { entries: options };\n } else if (typeof options === 'string') {\n options = { entries: [options] };\n }\n\n var getCurrentLocation = function getCurrentLocation() {\n var entry = entries[current];\n var path = (0, _PathUtils.createPath)(entry);\n\n var key = void 0,\n state = void 0;\n if (entry.key) {\n key = entry.key;\n state = readState(key);\n }\n\n var init = (0, _PathUtils.parsePath)(path);\n\n return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key);\n };\n\n var canGo = function canGo(n) {\n var index = current + n;\n return index >= 0 && index < entries.length;\n };\n\n var go = function go(n) {\n if (!n) return;\n\n if (!canGo(n)) {\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0;\n\n return;\n }\n\n current += n;\n var currentLocation = getCurrentLocation();\n\n // Change action to POP\n history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP }));\n };\n\n var pushLocation = function pushLocation(location) {\n current += 1;\n\n if (current < entries.length) entries.splice(current);\n\n entries.push(location);\n\n saveState(location.key, location.state);\n };\n\n var replaceLocation = function replaceLocation(location) {\n entries[current] = location;\n saveState(location.key, location.state);\n };\n\n var history = (0, _createHistory2.default)(_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n pushLocation: pushLocation,\n replaceLocation: replaceLocation,\n go: go\n }));\n\n var _options = options,\n entries = _options.entries,\n current = _options.current;\n\n\n if (typeof entries === 'string') {\n entries = [entries];\n } else if (!Array.isArray(entries)) {\n entries = ['/'];\n }\n\n entries = entries.map(function (entry) {\n return (0, _LocationUtils.createLocation)(entry);\n });\n\n if (current == null) {\n current = entries.length - 1;\n } else {\n !(current >= 0 && current < entries.length) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : (0, _invariant2.default)(false) : void 0;\n }\n\n var storage = createStateStorage(entries);\n\n var saveState = function saveState(key, state) {\n return storage[key] = state;\n };\n\n var readState = function readState(key) {\n return storage[key];\n };\n\n return _extends({}, history, {\n canGo: canGo\n });\n};\n\nexports.default = createMemoryHistory;","\"use strict\";\n\nexports.__esModule = true;\nvar loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) {\n var currentTurn = 0,\n isDone = false;\n var isSync = false,\n hasNext = false,\n doneArgs = void 0;\n\n var done = function done() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n isDone = true;\n\n if (isSync) {\n // Iterate instead of recursing if possible.\n doneArgs = args;\n return;\n }\n\n callback.apply(undefined, args);\n };\n\n var next = function next() {\n if (isDone) return;\n\n hasNext = true;\n\n if (isSync) return; // Iterate instead of recursing if possible.\n\n isSync = true;\n\n while (!isDone && currentTurn < turns && hasNext) {\n hasNext = false;\n work(currentTurn++, next, done);\n }\n\n isSync = false;\n\n if (isDone) {\n // This means the loop finished synchronously.\n callback.apply(undefined, doneArgs);\n return;\n }\n\n if (currentTurn >= turns && hasNext) {\n isDone = true;\n callback();\n }\n };\n\n next();\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _RouterContext = require('./RouterContext');\n\nvar _RouterContext2 = _interopRequireDefault(_RouterContext);\n\nvar _routerWarning = require('./routerWarning');\n\nvar _routerWarning2 = _interopRequireDefault(_routerWarning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n middlewares.forEach(function (middleware, index) {\n process.env.NODE_ENV !== 'production' ? (0, _routerWarning2.default)(middleware.renderRouterContext || middleware.renderRouteComponent, 'The middleware specified at index ' + index + ' does not appear to be ' + 'a valid React Router middleware.') : void 0;\n });\n }\n\n var withContext = middlewares.map(function (middleware) {\n return middleware.renderRouterContext;\n }).filter(Boolean);\n var withComponent = middlewares.map(function (middleware) {\n return middleware.renderRouteComponent;\n }).filter(Boolean);\n\n var makeCreateElement = function makeCreateElement() {\n var baseCreateElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _react.createElement;\n return function (Component, props) {\n return withComponent.reduceRight(function (previous, renderRouteComponent) {\n return renderRouteComponent(previous, props);\n }, baseCreateElement(Component, props));\n };\n };\n\n return function (renderProps) {\n return withContext.reduceRight(function (previous, renderRouterContext) {\n return renderRouterContext(previous, renderProps);\n }, _react2.default.createElement(_RouterContext2.default, _extends({}, renderProps, {\n createElement: makeCreateElement(renderProps.createElement)\n })));\n };\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _createBrowserHistory = require('history/lib/createBrowserHistory');\n\nvar _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);\n\nvar _createRouterHistory = require('./createRouterHistory');\n\nvar _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (0, _createRouterHistory2.default)(_createBrowserHistory2.default);\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar _BrowserProtocol = require('./BrowserProtocol');\n\nvar BrowserProtocol = _interopRequireWildcard(_BrowserProtocol);\n\nvar _RefreshProtocol = require('./RefreshProtocol');\n\nvar RefreshProtocol = _interopRequireWildcard(_RefreshProtocol);\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _createHistory = require('./createHistory');\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Creates and returns a history object that uses HTML5's history API\n * (pushState, replaceState, and the popstate event) to manage history.\n * This is the recommended method of managing history in browsers because\n * it provides the cleanest URLs.\n *\n * Note: In browsers that do not support the HTML5 history API full\n * page reloads will be used to preserve clean URLs. You can force this\n * behavior using { forceRefresh: true } in options.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0;\n\n var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)();\n var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol;\n\n var getUserConfirmation = Protocol.getUserConfirmation,\n getCurrentLocation = Protocol.getCurrentLocation,\n pushLocation = Protocol.pushLocation,\n replaceLocation = Protocol.replaceLocation,\n go = Protocol.go;\n\n\n var history = (0, _createHistory2.default)(_extends({\n getUserConfirmation: getUserConfirmation }, options, {\n getCurrentLocation: getCurrentLocation,\n pushLocation: pushLocation,\n replaceLocation: replaceLocation,\n go: go\n }));\n\n var listenerCount = 0,\n stopListener = void 0;\n\n var startListener = function startListener(listener, before) {\n if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo);\n\n var unlisten = before ? history.listenBefore(listener) : history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopListener();\n };\n };\n\n var listenBefore = function listenBefore(listener) {\n return startListener(listener, true);\n };\n\n var listen = function listen(listener) {\n return startListener(listener, false);\n };\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen\n });\n};\n\nexports.default = createBrowserHistory;","'use strict';\n\nexports.__esModule = true;\nexports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;\n\nvar _BrowserProtocol = require('./BrowserProtocol');\n\nObject.defineProperty(exports, 'getUserConfirmation', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.getUserConfirmation;\n }\n});\nObject.defineProperty(exports, 'go', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.go;\n }\n});\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {\n return (0, _LocationUtils.createLocation)(window.location);\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location) {\n window.location.href = (0, _PathUtils.createPath)(location);\n return false; // Don't update location\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location) {\n window.location.replace((0, _PathUtils.createPath)(location));\n return false; // Don't update location\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _createHashHistory = require('history/lib/createHashHistory');\n\nvar _createHashHistory2 = _interopRequireDefault(_createHashHistory);\n\nvar _createRouterHistory = require('./createRouterHistory');\n\nvar _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (0, _createRouterHistory2.default)(_createHashHistory2.default);\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _HashProtocol = require('./HashProtocol');\n\nvar HashProtocol = _interopRequireWildcard(_HashProtocol);\n\nvar _createHistory = require('./createHistory');\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar DefaultQueryKey = '_k';\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!' + path;\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substring(1) : path;\n }\n },\n noslash: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '/' ? path.substring(1) : path;\n },\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nvar createHashHistory = function createHashHistory() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0;\n\n var queryKey = options.queryKey,\n hashType = options.hashType;\n\n\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\\'t ' + 'use location state if you don\\'t want a key in your URL query string') : void 0;\n\n if (typeof queryKey !== 'string') queryKey = DefaultQueryKey;\n\n if (hashType == null) hashType = 'slash';\n\n if (!(hashType in HashPathCoders)) {\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0;\n\n hashType = 'slash';\n }\n\n var pathCoder = HashPathCoders[hashType];\n\n var getUserConfirmation = HashProtocol.getUserConfirmation;\n\n\n var getCurrentLocation = function getCurrentLocation() {\n return HashProtocol.getCurrentLocation(pathCoder, queryKey);\n };\n\n var pushLocation = function pushLocation(location) {\n return HashProtocol.pushLocation(location, pathCoder, queryKey);\n };\n\n var replaceLocation = function replaceLocation(location) {\n return HashProtocol.replaceLocation(location, pathCoder, queryKey);\n };\n\n var history = (0, _createHistory2.default)(_extends({\n getUserConfirmation: getUserConfirmation }, options, {\n getCurrentLocation: getCurrentLocation,\n pushLocation: pushLocation,\n replaceLocation: replaceLocation,\n go: HashProtocol.go\n }));\n\n var listenerCount = 0,\n stopListener = void 0;\n\n var startListener = function startListener(listener, before) {\n if (++listenerCount === 1) stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey);\n\n var unlisten = before ? history.listenBefore(listener) : history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopListener();\n };\n };\n\n var listenBefore = function listenBefore(listener) {\n return startListener(listener, true);\n };\n\n var listen = function listen(listener) {\n return startListener(listener, false);\n };\n\n var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();\n\n var go = function go(n) {\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n\n history.go(n);\n };\n\n var createHref = function createHref(path) {\n return '#' + pathCoder.encodePath(history.createHref(path));\n };\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n go: go,\n createHref: createHref\n });\n};\n\nexports.default = createHashHistory;","'use strict';\n\nexports.__esModule = true;\nexports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;\n\nvar _BrowserProtocol = require('./BrowserProtocol');\n\nObject.defineProperty(exports, 'getUserConfirmation', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.getUserConfirmation;\n }\n});\nObject.defineProperty(exports, 'go', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.go;\n }\n});\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _DOMStateStorage = require('./DOMStateStorage');\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HashChangeEvent = 'hashchange';\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation(pathCoder, queryKey) {\n var path = pathCoder.decodePath(getHashPath());\n var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey);\n\n var state = void 0;\n if (key) {\n path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey);\n state = (0, _DOMStateStorage.readState)(key);\n }\n\n var init = (0, _PathUtils.parsePath)(path);\n init.state = state;\n\n return (0, _LocationUtils.createLocation)(init, undefined, key);\n};\n\nvar prevLocation = void 0;\n\nvar startListener = exports.startListener = function startListener(listener, pathCoder, queryKey) {\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = pathCoder.encodePath(path);\n\n if (path !== encodedPath) {\n // Always be sure we have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var currentLocation = getCurrentLocation(pathCoder, queryKey);\n\n if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events\n\n prevLocation = currentLocation;\n\n listener(currentLocation);\n }\n };\n\n // Ensure the hash is encoded properly.\n var path = getHashPath();\n var encodedPath = pathCoder.encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n\n return function () {\n return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n };\n};\n\nvar updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) {\n var state = location.state,\n key = location.key;\n\n\n var path = pathCoder.encodePath((0, _PathUtils.createPath)(location));\n\n if (state !== undefined) {\n path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key);\n (0, _DOMStateStorage.saveState)(key, state);\n }\n\n prevLocation = location;\n\n updateHash(path);\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location, pathCoder, queryKey) {\n return updateLocation(location, pathCoder, queryKey, function (path) {\n if (getHashPath() !== path) {\n pushHashPath(path);\n } else {\n process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0;\n }\n });\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location, pathCoder, queryKey) {\n return updateLocation(location, pathCoder, queryKey, function (path) {\n if (getHashPath() !== path) replaceHashPath(path);\n });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _FocusTrap = require('./FocusTrap');\n\nvar _FocusTrap2 = _interopRequireDefault(_FocusTrap);\n\nvar _HotKeyMapMixin = require('./HotKeyMapMixin');\n\nvar _HotKeyMapMixin2 = _interopRequireDefault(_HotKeyMapMixin);\n\nvar _isBoolean = require('lodash/isBoolean');\n\nvar _isBoolean2 = _interopRequireDefault(_isBoolean);\n\nvar _isArray = require('lodash/isArray');\n\nvar _isArray2 = _interopRequireDefault(_isArray);\n\nvar _isObject = require('lodash/isObject');\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nvar _forEach = require('lodash/forEach');\n\nvar _forEach2 = _interopRequireDefault(_forEach);\n\nvar _isEqual = require('lodash/isEqual');\n\nvar _isEqual2 = _interopRequireDefault(_isEqual);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction getSequencesFromMap(hotKeyMap, hotKeyName) {\n var sequences = hotKeyMap[hotKeyName];\n\n // If no sequence is found with this name we assume\n // the user is passing a hard-coded sequence as a key\n if (!sequences) {\n return [hotKeyName];\n }\n\n if ((0, _isArray2.default)(sequences)) {\n return sequences;\n }\n\n return [sequences];\n}\n\nvar HotKeys = _react2.default.createClass({\n displayName: 'HotKeys',\n\n\n mixins: [(0, _HotKeyMapMixin2.default)()],\n\n propTypes: {\n children: _react2.default.PropTypes.node,\n onFocus: _react2.default.PropTypes.func,\n onBlur: _react2.default.PropTypes.func,\n keyMap: _react2.default.PropTypes.object,\n handlers: _react2.default.PropTypes.object,\n focused: _react2.default.PropTypes.bool, // externally controlled focus\n attach: _react2.default.PropTypes.any // dom element to listen for key events\n },\n\n contextTypes: {\n hotKeyParent: _react2.default.PropTypes.any\n },\n\n childContextTypes: {\n hotKeyParent: _react2.default.PropTypes.any\n },\n\n getChildContext: function getChildContext() {\n return {\n hotKeyParent: this\n };\n },\n componentDidMount: function componentDidMount() {\n // import is here to support React's server rendering as Mousetrap immediately\n // calls itself with window and it fails in Node environment\n var Mousetrap = require('mousetrap');\n // Not optimal - imagine hundreds of this component. We need a top level\n // delegation point for mousetrap\n this.__mousetrap__ = new Mousetrap(this.props.attach || _reactDom2.default.findDOMNode(this));\n\n this.updateHotKeys(true);\n },\n componentDidUpdate: function componentDidUpdate(prevProps) {\n this.updateHotKeys(false, prevProps);\n },\n componentWillUnmount: function componentWillUnmount() {\n if (this.context.hotKeyParent) {\n this.context.hotKeyParent.childHandledSequence(null);\n }\n\n if (this.__mousetrap__) {\n this.__mousetrap__.reset();\n }\n },\n updateHotKeys: function updateHotKeys() {\n var _this = this;\n\n var force = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];\n var prevProps = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n var _props$handlers = this.props.handlers;\n var handlers = _props$handlers === undefined ? {} : _props$handlers;\n var _prevProps$handlers = prevProps.handlers;\n var prevHandlers = _prevProps$handlers === undefined ? handlers : _prevProps$handlers;\n\n // Ensure map is up-to-date to begin with\n // We will only bother continuing if the map was actually updated\n\n if (!force && (0, _isEqual2.default)(handlers, prevHandlers) && !this.updateMap()) {\n return;\n }\n\n var hotKeyMap = this.getMap();\n var sequenceHandlers = [];\n var mousetrap = this.__mousetrap__;\n\n // Group all our handlers by sequence\n (0, _forEach2.default)(handlers, function (handler, hotKey) {\n var handlerSequences = getSequencesFromMap(hotKeyMap, hotKey);\n\n // Could be optimized as every handler will get called across every bound\n // component - imagine making a node a focus point and then having hundreds!\n (0, _forEach2.default)(handlerSequences, function (sequence) {\n var action = void 0;\n\n var callback = function callback(event, sequence) {\n // Check we are actually in focus and that a child hasn't already handled this sequence\n var isFocused = (0, _isBoolean2.default)(_this.props.focused) ? _this.props.focused : _this.__isFocused__;\n\n if (isFocused && sequence !== _this.__lastChildSequence__) {\n if (_this.context.hotKeyParent) {\n _this.context.hotKeyParent.childHandledSequence(sequence);\n }\n\n return handler(event, sequence);\n }\n };\n\n if ((0, _isObject2.default)(sequence)) {\n action = sequence.action;\n sequence = sequence.sequence;\n }\n\n sequenceHandlers.push({ callback: callback, action: action, sequence: sequence });\n });\n });\n\n // Hard reset our handlers (probably could be more efficient)\n mousetrap.reset();\n (0, _forEach2.default)(sequenceHandlers, function (handler) {\n return mousetrap.bind(handler.sequence, handler.callback, handler.action);\n });\n },\n childHandledSequence: function childHandledSequence() {\n var sequence = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];\n\n this.__lastChildSequence__ = sequence;\n\n // Traverse up any hot key parents so everyone is aware a child has handled a certain sequence\n if (this.context.hotKeyParent) {\n this.context.hotKeyParent.childHandledSequence(sequence);\n }\n },\n onFocus: function onFocus() {\n this.__isFocused__ = true;\n\n if (this.props.onFocus) {\n var _props;\n\n (_props = this.props).onFocus.apply(_props, arguments);\n }\n },\n onBlur: function onBlur() {\n this.__isFocused__ = false;\n\n if (this.props.onBlur) {\n var _props2;\n\n (_props2 = this.props).onBlur.apply(_props2, arguments);\n }\n if (this.context.hotKeyParent) {\n this.context.hotKeyParent.childHandledSequence(null);\n }\n },\n render: function render() {\n var _props3 = this.props;\n var children = _props3.children;\n var keyMap = _props3.keyMap;\n var handlers = _props3.handlers;\n var focused = _props3.focused;\n var attach = _props3.attach;\n\n var props = _objectWithoutProperties(_props3, ['children', 'keyMap', 'handlers', 'focused', 'attach']);\n\n return _react2.default.createElement(\n _FocusTrap2.default,\n _extends({}, props, { onFocus: this.onFocus, onBlur: this.onBlur }),\n children\n );\n }\n});\n\nexports.default = HotKeys;","var assignValue = require('./_assignValue'),\n copyObject = require('./_copyObject'),\n createAssigner = require('./_createAssigner'),\n isArrayLike = require('./isArrayLike'),\n isPrototype = require('./_isPrototype'),\n keys = require('./keys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nmodule.exports = assign;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nmodule.exports = isBoolean;\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","/*global define:false */\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.3\n * @url craig.is/killing/mice\n */\n(function(window, document, undefined) {\n\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111 : '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n var _REVERSE_MAP;\n\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n\n /**\n * loop through to map numbers on the numeric keypad\n */\n for (i = 0; i <= 9; ++i) {\n\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n function _characterFromEvent(e) {\n\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which);\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n }\n\n // for non keypress events the special maps are needed\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase();\n }\n\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n for (var key in _MAP) {\n\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n return _REVERSE_MAP;\n }\n\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n function _pickBestAction(key, modifiers, action) {\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = [];\n\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n\n // normalize key names\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = _pickBestAction(key, modifiers, action);\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n self.target = targetElement;\n\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n self._callbacks = {};\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self._directMap = {};\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n var _sequenceLevels = {};\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n var _resetTimer;\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n var _ignoreNextKeyup = false;\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n var _ignoreNextKeypress = false;\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n var _nextExpectedAction = false;\n\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type;\n\n // if there are no events related to this keycode\n if (!self._callbacks[character]) {\n return [];\n }\n\n // if a modifier key is coming up on its own we should allow it\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i];\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action != callback.action) {\n continue;\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {\n\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n function _fireCallback(callback, e, combo, sequence) {\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n _stopPropagation(e);\n }\n }\n\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n self._handleKey = function(character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false;\n\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n }\n\n // loop through matching callbacks for this key event\n for (i = 0; i < callbacks.length; ++i) {\n\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true;\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[i].seq] = 1;\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n continue;\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n function _handleKeyEvent(e) {\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e);\n\n // no character found then stop\n if (!character) {\n return;\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n function _bindSequence(combo, keys, callback, action) {\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function _increaseSequence(nextAction) {\n return function() {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n _resetSequenceTimer();\n };\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo);\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(_resetSequences, 10);\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n function _bindSingle(combination, callback, action, sequenceName, level) {\n\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback;\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ');\n\n var sequence = combination.split(' ');\n var info;\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n return;\n }\n\n info = _getKeyInfo(combination, action);\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self._callbacks[info.key] = self._callbacks[info.key] || [];\n\n // remove an existing match if there is one\n _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n self._bindMultiple = function(combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n };\n\n // start!\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n Mousetrap.prototype.bind = function(keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n self._bindMultiple.call(self, keys, callback, action);\n return self;\n };\n\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n Mousetrap.prototype.unbind = function(keys, action) {\n var self = this;\n return self.bind.call(self, keys, function() {}, action);\n };\n\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n Mousetrap.prototype.trigger = function(keys, action) {\n var self = this;\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n return self;\n };\n\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n Mousetrap.prototype.reset = function() {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n Mousetrap.prototype.stopCallback = function(e, element) {\n var self = this;\n\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n }\n\n // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n }\n\n // stop for input, select, and textarea\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n Mousetrap.prototype.handleKey = function() {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n\n /**\n * allow custom key mappings\n */\n Mousetrap.addKeycodes = function(object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n _REVERSE_MAP = null;\n };\n\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n Mousetrap.init = function() {\n var documentMousetrap = Mousetrap(document);\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = (function(method) {\n return function() {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n } (method));\n }\n }\n };\n\n Mousetrap.init();\n\n // expose mousetrap to the global object\n window.Mousetrap = Mousetrap;\n\n // expose as a common js module\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n }\n\n // expose mousetrap as an AMD module\n if (typeof define === 'function' && define.amd) {\n define(function() {\n return Mousetrap;\n });\n }\n}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = require('react');\nvar React__default = _interopDefault(React);\nvar shallowEqual = _interopDefault(require('shallowequal'));\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(SideEffect, _Component);\n\n function SideEffect() {\n return _Component.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !shallowEqual(nextProps, this.props);\n };\n\n _proto.componentWillMount = function componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.Component);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;\n","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob()\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n}\n\nfunction isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n}\n\nif (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\n// Build a destructive iterator for the value list\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n}\n\nexport function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nHeaders.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n}\n\nHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nHeaders.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n}\n\nHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nHeaders.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push(name)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.values = function() {\n var items = []\n this.forEach(function(value) {\n items.push(value)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nif (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n}\n\nfunction consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n}\n\nfunction fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n}\n\nfunction readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n}\n\nfunction readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n}\n\nfunction readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n}\n\nfunction bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n}\n\nfunction Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n this._bodyText = body = Object.prototype.toString.call(body)\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n}\n\n// HTTP methods whose capitalization should be normalized\nvar methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\nfunction normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return methods.indexOf(upcased) > -1 ? upcased : method\n}\n\nexport function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n this.signal = input.signal\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.signal = options.signal || this.signal\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n}\n\nRequest.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n}\n\nfunction decode(body) {\n var form = new FormData()\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n}\n\nfunction parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n}\n\nBody.call(Request.prototype)\n\nexport function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n}\n\nBody.call(Response.prototype)\n\nResponse.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n}\n\nResponse.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n}\n\nvar redirectStatuses = [301, 302, 303, 307, 308]\n\nResponse.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n}\n\nexport var DOMException = self.DOMException\ntry {\n new DOMException()\n} catch (err) {\n DOMException = function(message, name) {\n this.message = message\n this.name = name\n var error = Error(message)\n this.stack = error.stack\n }\n DOMException.prototype = Object.create(Error.prototype)\n DOMException.prototype.constructor = DOMException\n}\n\nexport function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n\n if (request.signal && request.signal.aborted) {\n return reject(new DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest()\n\n function abortXhr() {\n xhr.abort()\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.onabort = function() {\n reject(new DOMException('Aborted', 'AbortError'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr)\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr)\n }\n }\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n}\n\nfetch.polyfill = true\n\nif (!self.fetch) {\n self.fetch = fetch\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n}\n","'use strict';\n\n\nvar loader = require('./js-yaml/loader');\nvar dumper = require('./js-yaml/dumper');\n\n\nfunction deprecated(name) {\n return function () {\n throw new Error('Function ' + name + ' is deprecated and cannot be used.');\n };\n}\n\n\nmodule.exports.Type = require('./js-yaml/type');\nmodule.exports.Schema = require('./js-yaml/schema');\nmodule.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.JSON_SCHEMA = require('./js-yaml/schema/json');\nmodule.exports.CORE_SCHEMA = require('./js-yaml/schema/core');\nmodule.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');\nmodule.exports.load = loader.load;\nmodule.exports.loadAll = loader.loadAll;\nmodule.exports.safeLoad = loader.safeLoad;\nmodule.exports.safeLoadAll = loader.safeLoadAll;\nmodule.exports.dump = dumper.dump;\nmodule.exports.safeDump = dumper.safeDump;\nmodule.exports.YAMLException = require('./js-yaml/exception');\n\n// Deprecated schema names from JS-YAML 2.0.x\nmodule.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');\n\n// Deprecated functions from JS-YAML 1.x.x\nmodule.exports.scan = deprecated('scan');\nmodule.exports.parse = deprecated('parse');\nmodule.exports.compose = deprecated('compose');\nmodule.exports.addConstructor = deprecated('addConstructor');\n","'use strict';\n\n/*eslint-disable max-len,no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Mark = require('./mark');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\n\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n this.legacy = options['legacy'] || false;\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n return new YAMLException(\n message,\n new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty.call(overridableKeys, keyNode) &&\n _hasOwnProperty.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n _result[keyNode] = valueNode;\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = {},\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _pos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = {},\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n _pos = state.position;\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else {\n break; // Reading is done. Go to the epilogue.\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if (state.lineIndent > nodeIndent && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!state.anchorMap.hasOwnProperty(alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent\n atNewLine = false,\n hasContent = false,\n typeIndex,\n typeQuantity,\n type,\n flowIndent,\n blockIndent;\n\n if (state.listener !== null) {\n state.listener('open', state);\n }\n\n state.tag = null;\n state.anchor = null;\n state.kind = null;\n state.result = null;\n\n allowBlockStyles = allowBlockScalars = allowBlockCollections =\n CONTEXT_BLOCK_OUT === nodeContext ||\n CONTEXT_BLOCK_IN === nodeContext;\n\n if (allowToSeek) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag !== null && state.tag !== '!') {\n if (state.tag === '?') {\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only assigned to plain scalars. So, it isn't\n // needed to check for 'kind' conformity.\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = {};\n state.anchorMap = {};\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State(input, options);\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll(input, iterator, options) {\n var documents = loadDocuments(input, options), index, length;\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new YAMLException('expected a single document in the stream, but found more');\n}\n\n\nfunction safeLoadAll(input, output, options) {\n if (typeof output === 'function') {\n loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n } else {\n return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n }\n}\n\n\nfunction safeLoad(input, options) {\n return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\n\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\nmodule.exports.safeLoadAll = safeLoadAll;\nmodule.exports.safeLoad = safeLoad;\n","'use strict';\n\n\nvar common = require('./common');\n\n\nfunction Mark(name, buffer, position, line, column) {\n this.name = name;\n this.buffer = buffer;\n this.position = position;\n this.line = line;\n this.column = column;\n}\n\n\nMark.prototype.getSnippet = function getSnippet(indent, maxLength) {\n var head, start, tail, end, snippet;\n\n if (!this.buffer) return null;\n\n indent = indent || 4;\n maxLength = maxLength || 75;\n\n head = '';\n start = this.position;\n\n while (start > 0 && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {\n start -= 1;\n if (this.position - start > (maxLength / 2 - 1)) {\n head = ' ... ';\n start += 5;\n break;\n }\n }\n\n tail = '';\n end = this.position;\n\n while (end < this.buffer.length && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(end)) === -1) {\n end += 1;\n if (end - this.position > (maxLength / 2 - 1)) {\n tail = ' ... ';\n end -= 5;\n break;\n }\n }\n\n snippet = this.buffer.slice(start, end);\n\n return common.repeat(' ', indent) + head + snippet + tail + '\\n' +\n common.repeat(' ', indent + this.position - start + head.length) + '^';\n};\n\n\nMark.prototype.toString = function toString(compact) {\n var snippet, where = '';\n\n if (this.name) {\n where += 'in \"' + this.name + '\" ';\n }\n\n where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);\n\n if (!compact) {\n snippet = this.getSnippet();\n\n if (snippet) {\n where += ':\\n' + snippet;\n }\n }\n\n return where;\n};\n\n\nmodule.exports = Mark;\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 8\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 10 (except 0) or base 60\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch === ':') break;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n // if !base60 - done;\n if (ch !== ':') return true;\n\n // base60 almost not used, no needs to optimize\n return /^(:[0-5]?[0-9])+$/.test(data.slice(index));\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch, base, digits = [];\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value, 16);\n return sign * parseInt(value, 8);\n }\n\n if (value.indexOf(':') !== -1) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseInt(v, 10));\n });\n\n value = 0;\n base = 1;\n\n digits.forEach(function (d) {\n value += (d * base);\n base *= 60;\n });\n\n return sign * value;\n\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // 20:59\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign, base, digits;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n digits = [];\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n\n } else if (value.indexOf(':') >= 0) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseFloat(v, 10));\n });\n\n value = 0.0;\n base = 1;\n\n digits.forEach(function (d) {\n value += d * base;\n base *= 60;\n });\n\n return sign * value;\n\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n","'use strict';\n\n/*eslint-disable no-bitwise*/\n\nvar NodeBuffer;\n\ntry {\n // A trick for browserified version, to not include `Buffer` shim\n var _require = require;\n NodeBuffer = _require('buffer').Buffer;\n} catch (__) {}\n\nvar Type = require('../type');\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n // Wrap into Buffer for NodeJS and leave Array for browser\n if (NodeBuffer) {\n // Support node 6.+ Buffer API when available\n return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result);\n }\n\n return result;\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(object) {\n return NodeBuffer && NodeBuffer.isBuffer(object);\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n","'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptUndefined() {\n return true;\n}\n\nfunction constructJavascriptUndefined() {\n /*eslint-disable no-undefined*/\n return undefined;\n}\n\nfunction representJavascriptUndefined() {\n return '';\n}\n\nfunction isUndefined(object) {\n return typeof object === 'undefined';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/undefined', {\n kind: 'scalar',\n resolve: resolveJavascriptUndefined,\n construct: constructJavascriptUndefined,\n predicate: isUndefined,\n represent: representJavascriptUndefined\n});\n","'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptRegExp(data) {\n if (data === null) return false;\n if (data.length === 0) return false;\n\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // if regexp starts with '/' it can have modifiers and must be properly closed\n // `/foo/gim` - modifiers tail can be maximum 3 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n\n if (modifiers.length > 3) return false;\n // if expression starts with /, is should be properly terminated\n if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;\n }\n\n return true;\n}\n\nfunction constructJavascriptRegExp(data) {\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // `/foo/gim` - tail can be maximum 4 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n\n return new RegExp(regexp, modifiers);\n}\n\nfunction representJavascriptRegExp(object /*, style*/) {\n var result = '/' + object.source + '/';\n\n if (object.global) result += 'g';\n if (object.multiline) result += 'm';\n if (object.ignoreCase) result += 'i';\n\n return result;\n}\n\nfunction isRegExp(object) {\n return Object.prototype.toString.call(object) === '[object RegExp]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/regexp', {\n kind: 'scalar',\n resolve: resolveJavascriptRegExp,\n construct: constructJavascriptRegExp,\n predicate: isRegExp,\n represent: representJavascriptRegExp\n});\n","'use strict';\n\nvar esprima;\n\n// Browserified version does not have esprima\n//\n// 1. For node.js just require module as deps\n// 2. For browser try to require mudule via external AMD system.\n// If not found - try to fallback to window.esprima. If not\n// found too - then fail to parse.\n//\ntry {\n // workaround to exclude package from browserify list.\n var _require = require;\n esprima = _require('esprima');\n} catch (_) {\n /*global window */\n if (typeof window !== 'undefined') esprima = window.esprima;\n}\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptFunction(data) {\n if (data === null) return false;\n\n try {\n var source = '(' + data + ')',\n ast = esprima.parse(source, { range: true });\n\n if (ast.type !== 'Program' ||\n ast.body.length !== 1 ||\n ast.body[0].type !== 'ExpressionStatement' ||\n (ast.body[0].expression.type !== 'ArrowFunctionExpression' &&\n ast.body[0].expression.type !== 'FunctionExpression')) {\n return false;\n }\n\n return true;\n } catch (err) {\n return false;\n }\n}\n\nfunction constructJavascriptFunction(data) {\n /*jslint evil:true*/\n\n var source = '(' + data + ')',\n ast = esprima.parse(source, { range: true }),\n params = [],\n body;\n\n if (ast.type !== 'Program' ||\n ast.body.length !== 1 ||\n ast.body[0].type !== 'ExpressionStatement' ||\n (ast.body[0].expression.type !== 'ArrowFunctionExpression' &&\n ast.body[0].expression.type !== 'FunctionExpression')) {\n throw new Error('Failed to resolve function');\n }\n\n ast.body[0].expression.params.forEach(function (param) {\n params.push(param.name);\n });\n\n body = ast.body[0].expression.body.range;\n\n // Esprima's ranges include the first '{' and the last '}' characters on\n // function expressions. So cut them out.\n if (ast.body[0].expression.body.type === 'BlockStatement') {\n /*eslint-disable no-new-func*/\n return new Function(params, source.slice(body[0] + 1, body[1] - 1));\n }\n // ES6 arrow functions can omit the BlockStatement. In that case, just return\n // the body.\n /*eslint-disable no-new-func*/\n return new Function(params, 'return ' + source.slice(body[0], body[1]));\n}\n\nfunction representJavascriptFunction(object /*, style*/) {\n return object.toString();\n}\n\nfunction isFunction(object) {\n return Object.prototype.toString.call(object) === '[object Function]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/function', {\n kind: 'scalar',\n resolve: resolveJavascriptFunction,\n construct: constructJavascriptFunction,\n predicate: isFunction,\n represent: representJavascriptFunction\n});\n","(function webpackUniversalModuleDefinition(root, factory) {\n/* istanbul ignore next */\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n/* istanbul ignore next */\n\telse if(typeof exports === 'object')\n\t\texports[\"esprima\"] = factory();\n\telse\n\t\troot[\"esprima\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/* istanbul ignore if */\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/*\n\t Copyright JS Foundation and other contributors, https://js.foundation/\n\n\t Redistribution and use in source and binary forms, with or without\n\t modification, are permitted provided that the following conditions are met:\n\n\t * Redistributions of source code must retain the above copyright\n\t notice, this list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright\n\t notice, this list of conditions and the following disclaimer in the\n\t documentation and/or other materials provided with the distribution.\n\n\t THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n\t AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n\t IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n\t ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n\t DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\t LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n\t ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n\t THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar comment_handler_1 = __webpack_require__(1);\n\tvar jsx_parser_1 = __webpack_require__(3);\n\tvar parser_1 = __webpack_require__(8);\n\tvar tokenizer_1 = __webpack_require__(15);\n\tfunction parse(code, options, delegate) {\n\t var commentHandler = null;\n\t var proxyDelegate = function (node, metadata) {\n\t if (delegate) {\n\t delegate(node, metadata);\n\t }\n\t if (commentHandler) {\n\t commentHandler.visit(node, metadata);\n\t }\n\t };\n\t var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null;\n\t var collectComment = false;\n\t if (options) {\n\t collectComment = (typeof options.comment === 'boolean' && options.comment);\n\t var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment);\n\t if (collectComment || attachComment) {\n\t commentHandler = new comment_handler_1.CommentHandler();\n\t commentHandler.attach = attachComment;\n\t options.comment = true;\n\t parserDelegate = proxyDelegate;\n\t }\n\t }\n\t var isModule = false;\n\t if (options && typeof options.sourceType === 'string') {\n\t isModule = (options.sourceType === 'module');\n\t }\n\t var parser;\n\t if (options && typeof options.jsx === 'boolean' && options.jsx) {\n\t parser = new jsx_parser_1.JSXParser(code, options, parserDelegate);\n\t }\n\t else {\n\t parser = new parser_1.Parser(code, options, parserDelegate);\n\t }\n\t var program = isModule ? parser.parseModule() : parser.parseScript();\n\t var ast = program;\n\t if (collectComment && commentHandler) {\n\t ast.comments = commentHandler.comments;\n\t }\n\t if (parser.config.tokens) {\n\t ast.tokens = parser.tokens;\n\t }\n\t if (parser.config.tolerant) {\n\t ast.errors = parser.errorHandler.errors;\n\t }\n\t return ast;\n\t}\n\texports.parse = parse;\n\tfunction parseModule(code, options, delegate) {\n\t var parsingOptions = options || {};\n\t parsingOptions.sourceType = 'module';\n\t return parse(code, parsingOptions, delegate);\n\t}\n\texports.parseModule = parseModule;\n\tfunction parseScript(code, options, delegate) {\n\t var parsingOptions = options || {};\n\t parsingOptions.sourceType = 'script';\n\t return parse(code, parsingOptions, delegate);\n\t}\n\texports.parseScript = parseScript;\n\tfunction tokenize(code, options, delegate) {\n\t var tokenizer = new tokenizer_1.Tokenizer(code, options);\n\t var tokens;\n\t tokens = [];\n\t try {\n\t while (true) {\n\t var token = tokenizer.getNextToken();\n\t if (!token) {\n\t break;\n\t }\n\t if (delegate) {\n\t token = delegate(token);\n\t }\n\t tokens.push(token);\n\t }\n\t }\n\t catch (e) {\n\t tokenizer.errorHandler.tolerate(e);\n\t }\n\t if (tokenizer.errorHandler.tolerant) {\n\t tokens.errors = tokenizer.errors();\n\t }\n\t return tokens;\n\t}\n\texports.tokenize = tokenize;\n\tvar syntax_1 = __webpack_require__(2);\n\texports.Syntax = syntax_1.Syntax;\n\t// Sync with *.json manifests.\n\texports.version = '4.0.1';\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar syntax_1 = __webpack_require__(2);\n\tvar CommentHandler = (function () {\n\t function CommentHandler() {\n\t this.attach = false;\n\t this.comments = [];\n\t this.stack = [];\n\t this.leading = [];\n\t this.trailing = [];\n\t }\n\t CommentHandler.prototype.insertInnerComments = function (node, metadata) {\n\t // innnerComments for properties empty block\n\t // `function a() {/** comments **\\/}`\n\t if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) {\n\t var innerComments = [];\n\t for (var i = this.leading.length - 1; i >= 0; --i) {\n\t var entry = this.leading[i];\n\t if (metadata.end.offset >= entry.start) {\n\t innerComments.unshift(entry.comment);\n\t this.leading.splice(i, 1);\n\t this.trailing.splice(i, 1);\n\t }\n\t }\n\t if (innerComments.length) {\n\t node.innerComments = innerComments;\n\t }\n\t }\n\t };\n\t CommentHandler.prototype.findTrailingComments = function (metadata) {\n\t var trailingComments = [];\n\t if (this.trailing.length > 0) {\n\t for (var i = this.trailing.length - 1; i >= 0; --i) {\n\t var entry_1 = this.trailing[i];\n\t if (entry_1.start >= metadata.end.offset) {\n\t trailingComments.unshift(entry_1.comment);\n\t }\n\t }\n\t this.trailing.length = 0;\n\t return trailingComments;\n\t }\n\t var entry = this.stack[this.stack.length - 1];\n\t if (entry && entry.node.trailingComments) {\n\t var firstComment = entry.node.trailingComments[0];\n\t if (firstComment && firstComment.range[0] >= metadata.end.offset) {\n\t trailingComments = entry.node.trailingComments;\n\t delete entry.node.trailingComments;\n\t }\n\t }\n\t return trailingComments;\n\t };\n\t CommentHandler.prototype.findLeadingComments = function (metadata) {\n\t var leadingComments = [];\n\t var target;\n\t while (this.stack.length > 0) {\n\t var entry = this.stack[this.stack.length - 1];\n\t if (entry && entry.start >= metadata.start.offset) {\n\t target = entry.node;\n\t this.stack.pop();\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t if (target) {\n\t var count = target.leadingComments ? target.leadingComments.length : 0;\n\t for (var i = count - 1; i >= 0; --i) {\n\t var comment = target.leadingComments[i];\n\t if (comment.range[1] <= metadata.start.offset) {\n\t leadingComments.unshift(comment);\n\t target.leadingComments.splice(i, 1);\n\t }\n\t }\n\t if (target.leadingComments && target.leadingComments.length === 0) {\n\t delete target.leadingComments;\n\t }\n\t return leadingComments;\n\t }\n\t for (var i = this.leading.length - 1; i >= 0; --i) {\n\t var entry = this.leading[i];\n\t if (entry.start <= metadata.start.offset) {\n\t leadingComments.unshift(entry.comment);\n\t this.leading.splice(i, 1);\n\t }\n\t }\n\t return leadingComments;\n\t };\n\t CommentHandler.prototype.visitNode = function (node, metadata) {\n\t if (node.type === syntax_1.Syntax.Program && node.body.length > 0) {\n\t return;\n\t }\n\t this.insertInnerComments(node, metadata);\n\t var trailingComments = this.findTrailingComments(metadata);\n\t var leadingComments = this.findLeadingComments(metadata);\n\t if (leadingComments.length > 0) {\n\t node.leadingComments = leadingComments;\n\t }\n\t if (trailingComments.length > 0) {\n\t node.trailingComments = trailingComments;\n\t }\n\t this.stack.push({\n\t node: node,\n\t start: metadata.start.offset\n\t });\n\t };\n\t CommentHandler.prototype.visitComment = function (node, metadata) {\n\t var type = (node.type[0] === 'L') ? 'Line' : 'Block';\n\t var comment = {\n\t type: type,\n\t value: node.value\n\t };\n\t if (node.range) {\n\t comment.range = node.range;\n\t }\n\t if (node.loc) {\n\t comment.loc = node.loc;\n\t }\n\t this.comments.push(comment);\n\t if (this.attach) {\n\t var entry = {\n\t comment: {\n\t type: type,\n\t value: node.value,\n\t range: [metadata.start.offset, metadata.end.offset]\n\t },\n\t start: metadata.start.offset\n\t };\n\t if (node.loc) {\n\t entry.comment.loc = node.loc;\n\t }\n\t node.type = type;\n\t this.leading.push(entry);\n\t this.trailing.push(entry);\n\t }\n\t };\n\t CommentHandler.prototype.visit = function (node, metadata) {\n\t if (node.type === 'LineComment') {\n\t this.visitComment(node, metadata);\n\t }\n\t else if (node.type === 'BlockComment') {\n\t this.visitComment(node, metadata);\n\t }\n\t else if (this.attach) {\n\t this.visitNode(node, metadata);\n\t }\n\t };\n\t return CommentHandler;\n\t}());\n\texports.CommentHandler = CommentHandler;\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.Syntax = {\n\t AssignmentExpression: 'AssignmentExpression',\n\t AssignmentPattern: 'AssignmentPattern',\n\t ArrayExpression: 'ArrayExpression',\n\t ArrayPattern: 'ArrayPattern',\n\t ArrowFunctionExpression: 'ArrowFunctionExpression',\n\t AwaitExpression: 'AwaitExpression',\n\t BlockStatement: 'BlockStatement',\n\t BinaryExpression: 'BinaryExpression',\n\t BreakStatement: 'BreakStatement',\n\t CallExpression: 'CallExpression',\n\t CatchClause: 'CatchClause',\n\t ClassBody: 'ClassBody',\n\t ClassDeclaration: 'ClassDeclaration',\n\t ClassExpression: 'ClassExpression',\n\t ConditionalExpression: 'ConditionalExpression',\n\t ContinueStatement: 'ContinueStatement',\n\t DoWhileStatement: 'DoWhileStatement',\n\t DebuggerStatement: 'DebuggerStatement',\n\t EmptyStatement: 'EmptyStatement',\n\t ExportAllDeclaration: 'ExportAllDeclaration',\n\t ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n\t ExportNamedDeclaration: 'ExportNamedDeclaration',\n\t ExportSpecifier: 'ExportSpecifier',\n\t ExpressionStatement: 'ExpressionStatement',\n\t ForStatement: 'ForStatement',\n\t ForOfStatement: 'ForOfStatement',\n\t ForInStatement: 'ForInStatement',\n\t FunctionDeclaration: 'FunctionDeclaration',\n\t FunctionExpression: 'FunctionExpression',\n\t Identifier: 'Identifier',\n\t IfStatement: 'IfStatement',\n\t ImportDeclaration: 'ImportDeclaration',\n\t ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n\t ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n\t ImportSpecifier: 'ImportSpecifier',\n\t Literal: 'Literal',\n\t LabeledStatement: 'LabeledStatement',\n\t LogicalExpression: 'LogicalExpression',\n\t MemberExpression: 'MemberExpression',\n\t MetaProperty: 'MetaProperty',\n\t MethodDefinition: 'MethodDefinition',\n\t NewExpression: 'NewExpression',\n\t ObjectExpression: 'ObjectExpression',\n\t ObjectPattern: 'ObjectPattern',\n\t Program: 'Program',\n\t Property: 'Property',\n\t RestElement: 'RestElement',\n\t ReturnStatement: 'ReturnStatement',\n\t SequenceExpression: 'SequenceExpression',\n\t SpreadElement: 'SpreadElement',\n\t Super: 'Super',\n\t SwitchCase: 'SwitchCase',\n\t SwitchStatement: 'SwitchStatement',\n\t TaggedTemplateExpression: 'TaggedTemplateExpression',\n\t TemplateElement: 'TemplateElement',\n\t TemplateLiteral: 'TemplateLiteral',\n\t ThisExpression: 'ThisExpression',\n\t ThrowStatement: 'ThrowStatement',\n\t TryStatement: 'TryStatement',\n\t UnaryExpression: 'UnaryExpression',\n\t UpdateExpression: 'UpdateExpression',\n\t VariableDeclaration: 'VariableDeclaration',\n\t VariableDeclarator: 'VariableDeclarator',\n\t WhileStatement: 'WhileStatement',\n\t WithStatement: 'WithStatement',\n\t YieldExpression: 'YieldExpression'\n\t};\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n/* istanbul ignore next */\n\tvar __extends = (this && this.__extends) || (function () {\n\t var extendStatics = Object.setPrototypeOf ||\n\t ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n\t function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n\t return function (d, b) {\n\t extendStatics(d, b);\n\t function __() { this.constructor = d; }\n\t d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n\t };\n\t})();\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar character_1 = __webpack_require__(4);\n\tvar JSXNode = __webpack_require__(5);\n\tvar jsx_syntax_1 = __webpack_require__(6);\n\tvar Node = __webpack_require__(7);\n\tvar parser_1 = __webpack_require__(8);\n\tvar token_1 = __webpack_require__(13);\n\tvar xhtml_entities_1 = __webpack_require__(14);\n\ttoken_1.TokenName[100 /* Identifier */] = 'JSXIdentifier';\n\ttoken_1.TokenName[101 /* Text */] = 'JSXText';\n\t// Fully qualified element name, e.g. <svg:path> returns \"svg:path\"\n\tfunction getQualifiedElementName(elementName) {\n\t var qualifiedName;\n\t switch (elementName.type) {\n\t case jsx_syntax_1.JSXSyntax.JSXIdentifier:\n\t var id = elementName;\n\t qualifiedName = id.name;\n\t break;\n\t case jsx_syntax_1.JSXSyntax.JSXNamespacedName:\n\t var ns = elementName;\n\t qualifiedName = getQualifiedElementName(ns.namespace) + ':' +\n\t getQualifiedElementName(ns.name);\n\t break;\n\t case jsx_syntax_1.JSXSyntax.JSXMemberExpression:\n\t var expr = elementName;\n\t qualifiedName = getQualifiedElementName(expr.object) + '.' +\n\t getQualifiedElementName(expr.property);\n\t break;\n\t /* istanbul ignore next */\n\t default:\n\t break;\n\t }\n\t return qualifiedName;\n\t}\n\tvar JSXParser = (function (_super) {\n\t __extends(JSXParser, _super);\n\t function JSXParser(code, options, delegate) {\n\t return _super.call(this, code, options, delegate) || this;\n\t }\n\t JSXParser.prototype.parsePrimaryExpression = function () {\n\t return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this);\n\t };\n\t JSXParser.prototype.startJSX = function () {\n\t // Unwind the scanner before the lookahead token.\n\t this.scanner.index = this.startMarker.index;\n\t this.scanner.lineNumber = this.startMarker.line;\n\t this.scanner.lineStart = this.startMarker.index - this.startMarker.column;\n\t };\n\t JSXParser.prototype.finishJSX = function () {\n\t // Prime the next lookahead.\n\t this.nextToken();\n\t };\n\t JSXParser.prototype.reenterJSX = function () {\n\t this.startJSX();\n\t this.expectJSX('}');\n\t // Pop the closing '}' added from the lookahead.\n\t if (this.config.tokens) {\n\t this.tokens.pop();\n\t }\n\t };\n\t JSXParser.prototype.createJSXNode = function () {\n\t this.collectComments();\n\t return {\n\t index: this.scanner.index,\n\t line: this.scanner.lineNumber,\n\t column: this.scanner.index - this.scanner.lineStart\n\t };\n\t };\n\t JSXParser.prototype.createJSXChildNode = function () {\n\t return {\n\t index: this.scanner.index,\n\t line: this.scanner.lineNumber,\n\t column: this.scanner.index - this.scanner.lineStart\n\t };\n\t };\n\t JSXParser.prototype.scanXHTMLEntity = function (quote) {\n\t var result = '&';\n\t var valid = true;\n\t var terminated = false;\n\t var numeric = false;\n\t var hex = false;\n\t while (!this.scanner.eof() && valid && !terminated) {\n\t var ch = this.scanner.source[this.scanner.index];\n\t if (ch === quote) {\n\t break;\n\t }\n\t terminated = (ch === ';');\n\t result += ch;\n\t ++this.scanner.index;\n\t if (!terminated) {\n\t switch (result.length) {\n\t case 2:\n\t // e.g. '{'\n\t numeric = (ch === '#');\n\t break;\n\t case 3:\n\t if (numeric) {\n\t // e.g. 'A'\n\t hex = (ch === 'x');\n\t valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0));\n\t numeric = numeric && !hex;\n\t }\n\t break;\n\t default:\n\t valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0)));\n\t valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0)));\n\t break;\n\t }\n\t }\n\t }\n\t if (valid && terminated && result.length > 2) {\n\t // e.g. 'A' becomes just '#x41'\n\t var str = result.substr(1, result.length - 2);\n\t if (numeric && str.length > 1) {\n\t result = String.fromCharCode(parseInt(str.substr(1), 10));\n\t }\n\t else if (hex && str.length > 2) {\n\t result = String.fromCharCode(parseInt('0' + str.substr(1), 16));\n\t }\n\t else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) {\n\t result = xhtml_entities_1.XHTMLEntities[str];\n\t }\n\t }\n\t return result;\n\t };\n\t // Scan the next JSX token. This replaces Scanner#lex when in JSX mode.\n\t JSXParser.prototype.lexJSX = function () {\n\t var cp = this.scanner.source.charCodeAt(this.scanner.index);\n\t // < > / : = { }\n\t if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {\n\t var value = this.scanner.source[this.scanner.index++];\n\t return {\n\t type: 7 /* Punctuator */,\n\t value: value,\n\t lineNumber: this.scanner.lineNumber,\n\t lineStart: this.scanner.lineStart,\n\t start: this.scanner.index - 1,\n\t end: this.scanner.index\n\t };\n\t }\n\t // \" '\n\t if (cp === 34 || cp === 39) {\n\t var start = this.scanner.index;\n\t var quote = this.scanner.source[this.scanner.index++];\n\t var str = '';\n\t while (!this.scanner.eof()) {\n\t var ch = this.scanner.source[this.scanner.index++];\n\t if (ch === quote) {\n\t break;\n\t }\n\t else if (ch === '&') {\n\t str += this.scanXHTMLEntity(quote);\n\t }\n\t else {\n\t str += ch;\n\t }\n\t }\n\t return {\n\t type: 8 /* StringLiteral */,\n\t value: str,\n\t lineNumber: this.scanner.lineNumber,\n\t lineStart: this.scanner.lineStart,\n\t start: start,\n\t end: this.scanner.index\n\t };\n\t }\n\t // ... or .\n\t if (cp === 46) {\n\t var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);\n\t var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2);\n\t var value = (n1 === 46 && n2 === 46) ? '...' : '.';\n\t var start = this.scanner.index;\n\t this.scanner.index += value.length;\n\t return {\n\t type: 7 /* Punctuator */,\n\t value: value,\n\t lineNumber: this.scanner.lineNumber,\n\t lineStart: this.scanner.lineStart,\n\t start: start,\n\t end: this.scanner.index\n\t };\n\t }\n\t // `\n\t if (cp === 96) {\n\t // Only placeholder, since it will be rescanned as a real assignment expression.\n\t return {\n\t type: 10 /* Template */,\n\t value: '',\n\t lineNumber: this.scanner.lineNumber,\n\t lineStart: this.scanner.lineStart,\n\t start: this.scanner.index,\n\t end: this.scanner.index\n\t };\n\t }\n\t // Identifer can not contain backslash (char code 92).\n\t if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) {\n\t var start = this.scanner.index;\n\t ++this.scanner.index;\n\t while (!this.scanner.eof()) {\n\t var ch = this.scanner.source.charCodeAt(this.scanner.index);\n\t if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) {\n\t ++this.scanner.index;\n\t }\n\t else if (ch === 45) {\n\t // Hyphen (char code 45) can be part of an identifier.\n\t ++this.scanner.index;\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t var id = this.scanner.source.slice(start, this.scanner.index);\n\t return {\n\t type: 100 /* Identifier */,\n\t value: id,\n\t lineNumber: this.scanner.lineNumber,\n\t lineStart: this.scanner.lineStart,\n\t start: start,\n\t end: this.scanner.index\n\t };\n\t }\n\t return this.scanner.lex();\n\t };\n\t JSXParser.prototype.nextJSXToken = function () {\n\t this.collectComments();\n\t this.startMarker.index = this.scanner.index;\n\t this.startMarker.line = this.scanner.lineNumber;\n\t this.startMarker.column = this.scanner.index - this.scanner.lineStart;\n\t var token = this.lexJSX();\n\t this.lastMarker.index = this.scanner.index;\n\t this.lastMarker.line = this.scanner.lineNumber;\n\t this.lastMarker.column = this.scanner.index - this.scanner.lineStart;\n\t if (this.config.tokens) {\n\t this.tokens.push(this.convertToken(token));\n\t }\n\t return token;\n\t };\n\t JSXParser.prototype.nextJSXText = function () {\n\t this.startMarker.index = this.scanner.index;\n\t this.startMarker.line = this.scanner.lineNumber;\n\t this.startMarker.column = this.scanner.index - this.scanner.lineStart;\n\t var start = this.scanner.index;\n\t var text = '';\n\t while (!this.scanner.eof()) {\n\t var ch = this.scanner.source[this.scanner.index];\n\t if (ch === '{' || ch === '<') {\n\t break;\n\t }\n\t ++this.scanner.index;\n\t text += ch;\n\t if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {\n\t ++this.scanner.lineNumber;\n\t if (ch === '\\r' && this.scanner.source[this.scanner.index] === '\\n') {\n\t ++this.scanner.index;\n\t }\n\t this.scanner.lineStart = this.scanner.index;\n\t }\n\t }\n\t this.lastMarker.index = this.scanner.index;\n\t this.lastMarker.line = this.scanner.lineNumber;\n\t this.lastMarker.column = this.scanner.index - this.scanner.lineStart;\n\t var token = {\n\t type: 101 /* Text */,\n\t value: text,\n\t lineNumber: this.scanner.lineNumber,\n\t lineStart: this.scanner.lineStart,\n\t start: start,\n\t end: this.scanner.index\n\t };\n\t if ((text.length > 0) && this.config.tokens) {\n\t this.tokens.push(this.convertToken(token));\n\t }\n\t return token;\n\t };\n\t JSXParser.prototype.peekJSXToken = function () {\n\t var state = this.scanner.saveState();\n\t this.scanner.scanComments();\n\t var next = this.lexJSX();\n\t this.scanner.restoreState(state);\n\t return next;\n\t };\n\t // Expect the next JSX token to match the specified punctuator.\n\t // If not, an exception will be thrown.\n\t JSXParser.prototype.expectJSX = function (value) {\n\t var token = this.nextJSXToken();\n\t if (token.type !== 7 /* Punctuator */ || token.value !== value) {\n\t this.throwUnexpectedToken(token);\n\t }\n\t };\n\t // Return true if the next JSX token matches the specified punctuator.\n\t JSXParser.prototype.matchJSX = function (value) {\n\t var next = this.peekJSXToken();\n\t return next.type === 7 /* Punctuator */ && next.value === value;\n\t };\n\t JSXParser.prototype.parseJSXIdentifier = function () {\n\t var node = this.createJSXNode();\n\t var token = this.nextJSXToken();\n\t if (token.type !== 100 /* Identifier */) {\n\t this.throwUnexpectedToken(token);\n\t }\n\t return this.finalize(node, new JSXNode.JSXIdentifier(token.value));\n\t };\n\t JSXParser.prototype.parseJSXElementName = function () {\n\t var node = this.createJSXNode();\n\t var elementName = this.parseJSXIdentifier();\n\t if (this.matchJSX(':')) {\n\t var namespace = elementName;\n\t this.expectJSX(':');\n\t var name_1 = this.parseJSXIdentifier();\n\t elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1));\n\t }\n\t else if (this.matchJSX('.')) {\n\t while (this.matchJSX('.')) {\n\t var object = elementName;\n\t this.expectJSX('.');\n\t var property = this.parseJSXIdentifier();\n\t elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property));\n\t }\n\t }\n\t return elementName;\n\t };\n\t JSXParser.prototype.parseJSXAttributeName = function () {\n\t var node = this.createJSXNode();\n\t var attributeName;\n\t var identifier = this.parseJSXIdentifier();\n\t if (this.matchJSX(':')) {\n\t var namespace = identifier;\n\t this.expectJSX(':');\n\t var name_2 = this.parseJSXIdentifier();\n\t attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2));\n\t }\n\t else {\n\t attributeName = identifier;\n\t }\n\t return attributeName;\n\t };\n\t JSXParser.prototype.parseJSXStringLiteralAttribute = function () {\n\t var node = this.createJSXNode();\n\t var token = this.nextJSXToken();\n\t if (token.type !== 8 /* StringLiteral */) {\n\t this.throwUnexpectedToken(token);\n\t }\n\t var raw = this.getTokenRaw(token);\n\t return this.finalize(node, new Node.Literal(token.value, raw));\n\t };\n\t JSXParser.prototype.parseJSXExpressionAttribute = function () {\n\t var node = this.createJSXNode();\n\t this.expectJSX('{');\n\t this.finishJSX();\n\t if (this.match('}')) {\n\t this.tolerateError('JSX attributes must only be assigned a non-empty expression');\n\t }\n\t var expression = this.parseAssignmentExpression();\n\t this.reenterJSX();\n\t return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));\n\t };\n\t JSXParser.prototype.parseJSXAttributeValue = function () {\n\t return this.matchJSX('{') ? this.parseJSXExpressionAttribute() :\n\t this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute();\n\t };\n\t JSXParser.prototype.parseJSXNameValueAttribute = function () {\n\t var node = this.createJSXNode();\n\t var name = this.parseJSXAttributeName();\n\t var value = null;\n\t if (this.matchJSX('=')) {\n\t this.expectJSX('=');\n\t value = this.parseJSXAttributeValue();\n\t }\n\t return this.finalize(node, new JSXNode.JSXAttribute(name, value));\n\t };\n\t JSXParser.prototype.parseJSXSpreadAttribute = function () {\n\t var node = this.createJSXNode();\n\t this.expectJSX('{');\n\t this.expectJSX('...');\n\t this.finishJSX();\n\t var argument = this.parseAssignmentExpression();\n\t this.reenterJSX();\n\t return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument));\n\t };\n\t JSXParser.prototype.parseJSXAttributes = function () {\n\t var attributes = [];\n\t while (!this.matchJSX('/') && !this.matchJSX('>')) {\n\t var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() :\n\t this.parseJSXNameValueAttribute();\n\t attributes.push(attribute);\n\t }\n\t return attributes;\n\t };\n\t JSXParser.prototype.parseJSXOpeningElement = function () {\n\t var node = this.createJSXNode();\n\t this.expectJSX('<');\n\t var name = this.parseJSXElementName();\n\t var attributes = this.parseJSXAttributes();\n\t var selfClosing = this.matchJSX('/');\n\t if (selfClosing) {\n\t this.expectJSX('/');\n\t }\n\t this.expectJSX('>');\n\t return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));\n\t };\n\t JSXParser.prototype.parseJSXBoundaryElement = function () {\n\t var node = this.createJSXNode();\n\t this.expectJSX('<');\n\t if (this.matchJSX('/')) {\n\t this.expectJSX('/');\n\t var name_3 = this.parseJSXElementName();\n\t this.expectJSX('>');\n\t return this.finalize(node, new JSXNode.JSXClosingElement(name_3));\n\t }\n\t var name = this.parseJSXElementName();\n\t var attributes = this.parseJSXAttributes();\n\t var selfClosing = this.matchJSX('/');\n\t if (selfClosing) {\n\t this.expectJSX('/');\n\t }\n\t this.expectJSX('>');\n\t return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));\n\t };\n\t JSXParser.prototype.parseJSXEmptyExpression = function () {\n\t var node = this.createJSXChildNode();\n\t this.collectComments();\n\t this.lastMarker.index = this.scanner.index;\n\t this.lastMarker.line = this.scanner.lineNumber;\n\t this.lastMarker.column = this.scanner.index - this.scanner.lineStart;\n\t return this.finalize(node, new JSXNode.JSXEmptyExpression());\n\t };\n\t JSXParser.prototype.parseJSXExpressionContainer = function () {\n\t var node = this.createJSXNode();\n\t this.expectJSX('{');\n\t var expression;\n\t if (this.matchJSX('}')) {\n\t expression = this.parseJSXEmptyExpression();\n\t this.expectJSX('}');\n\t }\n\t else {\n\t this.finishJSX();\n\t expression = this.parseAssignmentExpression();\n\t this.reenterJSX();\n\t }\n\t return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));\n\t };\n\t JSXParser.prototype.parseJSXChildren = function () {\n\t var children = [];\n\t while (!this.scanner.eof()) {\n\t var node = this.createJSXChildNode();\n\t var token = this.nextJSXText();\n\t if (token.start < token.end) {\n\t var raw = this.getTokenRaw(token);\n\t var child = this.finalize(node, new JSXNode.JSXText(token.value, raw));\n\t children.push(child);\n\t }\n\t if (this.scanner.source[this.scanner.index] === '{') {\n\t var container = this.parseJSXExpressionContainer();\n\t children.push(container);\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t return children;\n\t };\n\t JSXParser.prototype.parseComplexJSXElement = function (el) {\n\t var stack = [];\n\t while (!this.scanner.eof()) {\n\t el.children = el.children.concat(this.parseJSXChildren());\n\t var node = this.createJSXChildNode();\n\t var element = this.parseJSXBoundaryElement();\n\t if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) {\n\t var opening = element;\n\t if (opening.selfClosing) {\n\t var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null));\n\t el.children.push(child);\n\t }\n\t else {\n\t stack.push(el);\n\t el = { node: node, opening: opening, closing: null, children: [] };\n\t }\n\t }\n\t if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) {\n\t el.closing = element;\n\t var open_1 = getQualifiedElementName(el.opening.name);\n\t var close_1 = getQualifiedElementName(el.closing.name);\n\t if (open_1 !== close_1) {\n\t this.tolerateError('Expected corresponding JSX closing tag for %0', open_1);\n\t }\n\t if (stack.length > 0) {\n\t var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));\n\t el = stack[stack.length - 1];\n\t el.children.push(child);\n\t stack.pop();\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t }\n\t return el;\n\t };\n\t JSXParser.prototype.parseJSXElement = function () {\n\t var node = this.createJSXNode();\n\t var opening = this.parseJSXOpeningElement();\n\t var children = [];\n\t var closing = null;\n\t if (!opening.selfClosing) {\n\t var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children });\n\t children = el.children;\n\t closing = el.closing;\n\t }\n\t return this.finalize(node, new JSXNode.JSXElement(opening, children, closing));\n\t };\n\t JSXParser.prototype.parseJSXRoot = function () {\n\t // Pop the opening '<' added from the lookahead.\n\t if (this.config.tokens) {\n\t this.tokens.pop();\n\t }\n\t this.startJSX();\n\t var element = this.parseJSXElement();\n\t this.finishJSX();\n\t return element;\n\t };\n\t JSXParser.prototype.isStartOfExpression = function () {\n\t return _super.prototype.isStartOfExpression.call(this) || this.match('<');\n\t };\n\t return JSXParser;\n\t}(parser_1.Parser));\n\texports.JSXParser = JSXParser;\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\t// See also tools/generate-unicode-regex.js.\n\tvar Regex = {\n\t // Unicode v8.0.0 NonAsciiIdentifierStart:\n\t NonAsciiIdentifierStart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-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-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AD\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF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DEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]/,\n\t // Unicode v8.0.0 NonAsciiIdentifierPart:\n\t NonAsciiIdentifierPart: /[\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B4\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51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12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AD\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-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DE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/\n\t};\n\texports.Character = {\n\t /* tslint:disable:no-bitwise */\n\t fromCodePoint: function (cp) {\n\t return (cp < 0x10000) ? String.fromCharCode(cp) :\n\t String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +\n\t String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));\n\t },\n\t // https://tc39.github.io/ecma262/#sec-white-space\n\t isWhiteSpace: function (cp) {\n\t return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) ||\n\t (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0);\n\t },\n\t // https://tc39.github.io/ecma262/#sec-line-terminators\n\t isLineTerminator: function (cp) {\n\t return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029);\n\t },\n\t // https://tc39.github.io/ecma262/#sec-names-and-keywords\n\t isIdentifierStart: function (cp) {\n\t return (cp === 0x24) || (cp === 0x5F) ||\n\t (cp >= 0x41 && cp <= 0x5A) ||\n\t (cp >= 0x61 && cp <= 0x7A) ||\n\t (cp === 0x5C) ||\n\t ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp)));\n\t },\n\t isIdentifierPart: function (cp) {\n\t return (cp === 0x24) || (cp === 0x5F) ||\n\t (cp >= 0x41 && cp <= 0x5A) ||\n\t (cp >= 0x61 && cp <= 0x7A) ||\n\t (cp >= 0x30 && cp <= 0x39) ||\n\t (cp === 0x5C) ||\n\t ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp)));\n\t },\n\t // https://tc39.github.io/ecma262/#sec-literals-numeric-literals\n\t isDecimalDigit: function (cp) {\n\t return (cp >= 0x30 && cp <= 0x39); // 0..9\n\t },\n\t isHexDigit: function (cp) {\n\t return (cp >= 0x30 && cp <= 0x39) ||\n\t (cp >= 0x41 && cp <= 0x46) ||\n\t (cp >= 0x61 && cp <= 0x66); // a..f\n\t },\n\t isOctalDigit: function (cp) {\n\t return (cp >= 0x30 && cp <= 0x37); // 0..7\n\t }\n\t};\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar jsx_syntax_1 = __webpack_require__(6);\n\t/* tslint:disable:max-classes-per-file */\n\tvar JSXClosingElement = (function () {\n\t function JSXClosingElement(name) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement;\n\t this.name = name;\n\t }\n\t return JSXClosingElement;\n\t}());\n\texports.JSXClosingElement = JSXClosingElement;\n\tvar JSXElement = (function () {\n\t function JSXElement(openingElement, children, closingElement) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXElement;\n\t this.openingElement = openingElement;\n\t this.children = children;\n\t this.closingElement = closingElement;\n\t }\n\t return JSXElement;\n\t}());\n\texports.JSXElement = JSXElement;\n\tvar JSXEmptyExpression = (function () {\n\t function JSXEmptyExpression() {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;\n\t }\n\t return JSXEmptyExpression;\n\t}());\n\texports.JSXEmptyExpression = JSXEmptyExpression;\n\tvar JSXExpressionContainer = (function () {\n\t function JSXExpressionContainer(expression) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;\n\t this.expression = expression;\n\t }\n\t return JSXExpressionContainer;\n\t}());\n\texports.JSXExpressionContainer = JSXExpressionContainer;\n\tvar JSXIdentifier = (function () {\n\t function JSXIdentifier(name) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;\n\t this.name = name;\n\t }\n\t return JSXIdentifier;\n\t}());\n\texports.JSXIdentifier = JSXIdentifier;\n\tvar JSXMemberExpression = (function () {\n\t function JSXMemberExpression(object, property) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;\n\t this.object = object;\n\t this.property = property;\n\t }\n\t return JSXMemberExpression;\n\t}());\n\texports.JSXMemberExpression = JSXMemberExpression;\n\tvar JSXAttribute = (function () {\n\t function JSXAttribute(name, value) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;\n\t this.name = name;\n\t this.value = value;\n\t }\n\t return JSXAttribute;\n\t}());\n\texports.JSXAttribute = JSXAttribute;\n\tvar JSXNamespacedName = (function () {\n\t function JSXNamespacedName(namespace, name) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;\n\t this.namespace = namespace;\n\t this.name = name;\n\t }\n\t return JSXNamespacedName;\n\t}());\n\texports.JSXNamespacedName = JSXNamespacedName;\n\tvar JSXOpeningElement = (function () {\n\t function JSXOpeningElement(name, selfClosing, attributes) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;\n\t this.name = name;\n\t this.selfClosing = selfClosing;\n\t this.attributes = attributes;\n\t }\n\t return JSXOpeningElement;\n\t}());\n\texports.JSXOpeningElement = JSXOpeningElement;\n\tvar JSXSpreadAttribute = (function () {\n\t function JSXSpreadAttribute(argument) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;\n\t this.argument = argument;\n\t }\n\t return JSXSpreadAttribute;\n\t}());\n\texports.JSXSpreadAttribute = JSXSpreadAttribute;\n\tvar JSXText = (function () {\n\t function JSXText(value, raw) {\n\t this.type = jsx_syntax_1.JSXSyntax.JSXText;\n\t this.value = value;\n\t this.raw = raw;\n\t }\n\t return JSXText;\n\t}());\n\texports.JSXText = JSXText;\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.JSXSyntax = {\n\t JSXAttribute: 'JSXAttribute',\n\t JSXClosingElement: 'JSXClosingElement',\n\t JSXElement: 'JSXElement',\n\t JSXEmptyExpression: 'JSXEmptyExpression',\n\t JSXExpressionContainer: 'JSXExpressionContainer',\n\t JSXIdentifier: 'JSXIdentifier',\n\t JSXMemberExpression: 'JSXMemberExpression',\n\t JSXNamespacedName: 'JSXNamespacedName',\n\t JSXOpeningElement: 'JSXOpeningElement',\n\t JSXSpreadAttribute: 'JSXSpreadAttribute',\n\t JSXText: 'JSXText'\n\t};\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar syntax_1 = __webpack_require__(2);\n\t/* tslint:disable:max-classes-per-file */\n\tvar ArrayExpression = (function () {\n\t function ArrayExpression(elements) {\n\t this.type = syntax_1.Syntax.ArrayExpression;\n\t this.elements = elements;\n\t }\n\t return ArrayExpression;\n\t}());\n\texports.ArrayExpression = ArrayExpression;\n\tvar ArrayPattern = (function () {\n\t function ArrayPattern(elements) {\n\t this.type = syntax_1.Syntax.ArrayPattern;\n\t this.elements = elements;\n\t }\n\t return ArrayPattern;\n\t}());\n\texports.ArrayPattern = ArrayPattern;\n\tvar ArrowFunctionExpression = (function () {\n\t function ArrowFunctionExpression(params, body, expression) {\n\t this.type = syntax_1.Syntax.ArrowFunctionExpression;\n\t this.id = null;\n\t this.params = params;\n\t this.body = body;\n\t this.generator = false;\n\t this.expression = expression;\n\t this.async = false;\n\t }\n\t return ArrowFunctionExpression;\n\t}());\n\texports.ArrowFunctionExpression = ArrowFunctionExpression;\n\tvar AssignmentExpression = (function () {\n\t function AssignmentExpression(operator, left, right) {\n\t this.type = syntax_1.Syntax.AssignmentExpression;\n\t this.operator = operator;\n\t this.left = left;\n\t this.right = right;\n\t }\n\t return AssignmentExpression;\n\t}());\n\texports.AssignmentExpression = AssignmentExpression;\n\tvar AssignmentPattern = (function () {\n\t function AssignmentPattern(left, right) {\n\t this.type = syntax_1.Syntax.AssignmentPattern;\n\t this.left = left;\n\t this.right = right;\n\t }\n\t return AssignmentPattern;\n\t}());\n\texports.AssignmentPattern = AssignmentPattern;\n\tvar AsyncArrowFunctionExpression = (function () {\n\t function AsyncArrowFunctionExpression(params, body, expression) {\n\t this.type = syntax_1.Syntax.ArrowFunctionExpression;\n\t this.id = null;\n\t this.params = params;\n\t this.body = body;\n\t this.generator = false;\n\t this.expression = expression;\n\t this.async = true;\n\t }\n\t return AsyncArrowFunctionExpression;\n\t}());\n\texports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;\n\tvar AsyncFunctionDeclaration = (function () {\n\t function AsyncFunctionDeclaration(id, params, body) {\n\t this.type = syntax_1.Syntax.FunctionDeclaration;\n\t this.id = id;\n\t this.params = params;\n\t this.body = body;\n\t this.generator = false;\n\t this.expression = false;\n\t this.async = true;\n\t }\n\t return AsyncFunctionDeclaration;\n\t}());\n\texports.AsyncFunctionDeclaration = AsyncFunctionDeclaration;\n\tvar AsyncFunctionExpression = (function () {\n\t function AsyncFunctionExpression(id, params, body) {\n\t this.type = syntax_1.Syntax.FunctionExpression;\n\t this.id = id;\n\t this.params = params;\n\t this.body = body;\n\t this.generator = false;\n\t this.expression = false;\n\t this.async = true;\n\t }\n\t return AsyncFunctionExpression;\n\t}());\n\texports.AsyncFunctionExpression = AsyncFunctionExpression;\n\tvar AwaitExpression = (function () {\n\t function AwaitExpression(argument) {\n\t this.type = syntax_1.Syntax.AwaitExpression;\n\t this.argument = argument;\n\t }\n\t return AwaitExpression;\n\t}());\n\texports.AwaitExpression = AwaitExpression;\n\tvar BinaryExpression = (function () {\n\t function BinaryExpression(operator, left, right) {\n\t var logical = (operator === '||' || operator === '&&');\n\t this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression;\n\t this.operator = operator;\n\t this.left = left;\n\t this.right = right;\n\t }\n\t return BinaryExpression;\n\t}());\n\texports.BinaryExpression = BinaryExpression;\n\tvar BlockStatement = (function () {\n\t function BlockStatement(body) {\n\t this.type = syntax_1.Syntax.BlockStatement;\n\t this.body = body;\n\t }\n\t return BlockStatement;\n\t}());\n\texports.BlockStatement = BlockStatement;\n\tvar BreakStatement = (function () {\n\t function BreakStatement(label) {\n\t this.type = syntax_1.Syntax.BreakStatement;\n\t this.label = label;\n\t }\n\t return BreakStatement;\n\t}());\n\texports.BreakStatement = BreakStatement;\n\tvar CallExpression = (function () {\n\t function CallExpression(callee, args) {\n\t this.type = syntax_1.Syntax.CallExpression;\n\t this.callee = callee;\n\t this.arguments = args;\n\t }\n\t return CallExpression;\n\t}());\n\texports.CallExpression = CallExpression;\n\tvar CatchClause = (function () {\n\t function CatchClause(param, body) {\n\t this.type = syntax_1.Syntax.CatchClause;\n\t this.param = param;\n\t this.body = body;\n\t }\n\t return CatchClause;\n\t}());\n\texports.CatchClause = CatchClause;\n\tvar ClassBody = (function () {\n\t function ClassBody(body) {\n\t this.type = syntax_1.Syntax.ClassBody;\n\t this.body = body;\n\t }\n\t return ClassBody;\n\t}());\n\texports.ClassBody = ClassBody;\n\tvar ClassDeclaration = (function () {\n\t function ClassDeclaration(id, superClass, body) {\n\t this.type = syntax_1.Syntax.ClassDeclaration;\n\t this.id = id;\n\t this.superClass = superClass;\n\t this.body = body;\n\t }\n\t return ClassDeclaration;\n\t}());\n\texports.ClassDeclaration = ClassDeclaration;\n\tvar ClassExpression = (function () {\n\t function ClassExpression(id, superClass, body) {\n\t this.type = syntax_1.Syntax.ClassExpression;\n\t this.id = id;\n\t this.superClass = superClass;\n\t this.body = body;\n\t }\n\t return ClassExpression;\n\t}());\n\texports.ClassExpression = ClassExpression;\n\tvar ComputedMemberExpression = (function () {\n\t function ComputedMemberExpression(object, property) {\n\t this.type = syntax_1.Syntax.MemberExpression;\n\t this.computed = true;\n\t this.object = object;\n\t this.property = property;\n\t }\n\t return ComputedMemberExpression;\n\t}());\n\texports.ComputedMemberExpression = ComputedMemberExpression;\n\tvar ConditionalExpression = (function () {\n\t function ConditionalExpression(test, consequent, alternate) {\n\t this.type = syntax_1.Syntax.ConditionalExpression;\n\t this.test = test;\n\t this.consequent = consequent;\n\t this.alternate = alternate;\n\t }\n\t return ConditionalExpression;\n\t}());\n\texports.ConditionalExpression = ConditionalExpression;\n\tvar ContinueStatement = (function () {\n\t function ContinueStatement(label) {\n\t this.type = syntax_1.Syntax.ContinueStatement;\n\t this.label = label;\n\t }\n\t return ContinueStatement;\n\t}());\n\texports.ContinueStatement = ContinueStatement;\n\tvar DebuggerStatement = (function () {\n\t function DebuggerStatement() {\n\t this.type = syntax_1.Syntax.DebuggerStatement;\n\t }\n\t return DebuggerStatement;\n\t}());\n\texports.DebuggerStatement = DebuggerStatement;\n\tvar Directive = (function () {\n\t function Directive(expression, directive) {\n\t this.type = syntax_1.Syntax.ExpressionStatement;\n\t this.expression = expression;\n\t this.directive = directive;\n\t }\n\t return Directive;\n\t}());\n\texports.Directive = Directive;\n\tvar DoWhileStatement = (function () {\n\t function DoWhileStatement(body, test) {\n\t this.type = syntax_1.Syntax.DoWhileStatement;\n\t this.body = body;\n\t this.test = test;\n\t }\n\t return DoWhileStatement;\n\t}());\n\texports.DoWhileStatement = DoWhileStatement;\n\tvar EmptyStatement = (function () {\n\t function EmptyStatement() {\n\t this.type = syntax_1.Syntax.EmptyStatement;\n\t }\n\t return EmptyStatement;\n\t}());\n\texports.EmptyStatement = EmptyStatement;\n\tvar ExportAllDeclaration = (function () {\n\t function ExportAllDeclaration(source) {\n\t this.type = syntax_1.Syntax.ExportAllDeclaration;\n\t this.source = source;\n\t }\n\t return ExportAllDeclaration;\n\t}());\n\texports.ExportAllDeclaration = ExportAllDeclaration;\n\tvar ExportDefaultDeclaration = (function () {\n\t function ExportDefaultDeclaration(declaration) {\n\t this.type = syntax_1.Syntax.ExportDefaultDeclaration;\n\t this.declaration = declaration;\n\t }\n\t return ExportDefaultDeclaration;\n\t}());\n\texports.ExportDefaultDeclaration = ExportDefaultDeclaration;\n\tvar ExportNamedDeclaration = (function () {\n\t function ExportNamedDeclaration(declaration, specifiers, source) {\n\t this.type = syntax_1.Syntax.ExportNamedDeclaration;\n\t this.declaration = declaration;\n\t this.specifiers = specifiers;\n\t this.source = source;\n\t }\n\t return ExportNamedDeclaration;\n\t}());\n\texports.ExportNamedDeclaration = ExportNamedDeclaration;\n\tvar ExportSpecifier = (function () {\n\t function ExportSpecifier(local, exported) {\n\t this.type = syntax_1.Syntax.ExportSpecifier;\n\t this.exported = exported;\n\t this.local = local;\n\t }\n\t return ExportSpecifier;\n\t}());\n\texports.ExportSpecifier = ExportSpecifier;\n\tvar ExpressionStatement = (function () {\n\t function ExpressionStatement(expression) {\n\t this.type = syntax_1.Syntax.ExpressionStatement;\n\t this.expression = expression;\n\t }\n\t return ExpressionStatement;\n\t}());\n\texports.ExpressionStatement = ExpressionStatement;\n\tvar ForInStatement = (function () {\n\t function ForInStatement(left, right, body) {\n\t this.type = syntax_1.Syntax.ForInStatement;\n\t this.left = left;\n\t this.right = right;\n\t this.body = body;\n\t this.each = false;\n\t }\n\t return ForInStatement;\n\t}());\n\texports.ForInStatement = ForInStatement;\n\tvar ForOfStatement = (function () {\n\t function ForOfStatement(left, right, body) {\n\t this.type = syntax_1.Syntax.ForOfStatement;\n\t this.left = left;\n\t this.right = right;\n\t this.body = body;\n\t }\n\t return ForOfStatement;\n\t}());\n\texports.ForOfStatement = ForOfStatement;\n\tvar ForStatement = (function () {\n\t function ForStatement(init, test, update, body) {\n\t this.type = syntax_1.Syntax.ForStatement;\n\t this.init = init;\n\t this.test = test;\n\t this.update = update;\n\t this.body = body;\n\t }\n\t return ForStatement;\n\t}());\n\texports.ForStatement = ForStatement;\n\tvar FunctionDeclaration = (function () {\n\t function FunctionDeclaration(id, params, body, generator) {\n\t this.type = syntax_1.Syntax.FunctionDeclaration;\n\t this.id = id;\n\t this.params = params;\n\t this.body = body;\n\t this.generator = generator;\n\t this.expression = false;\n\t this.async = false;\n\t }\n\t return FunctionDeclaration;\n\t}());\n\texports.FunctionDeclaration = FunctionDeclaration;\n\tvar FunctionExpression = (function () {\n\t function FunctionExpression(id, params, body, generator) {\n\t this.type = syntax_1.Syntax.FunctionExpression;\n\t this.id = id;\n\t this.params = params;\n\t this.body = body;\n\t this.generator = generator;\n\t this.expression = false;\n\t this.async = false;\n\t }\n\t return FunctionExpression;\n\t}());\n\texports.FunctionExpression = FunctionExpression;\n\tvar Identifier = (function () {\n\t function Identifier(name) {\n\t this.type = syntax_1.Syntax.Identifier;\n\t this.name = name;\n\t }\n\t return Identifier;\n\t}());\n\texports.Identifier = Identifier;\n\tvar IfStatement = (function () {\n\t function IfStatement(test, consequent, alternate) {\n\t this.type = syntax_1.Syntax.IfStatement;\n\t this.test = test;\n\t this.consequent = consequent;\n\t this.alternate = alternate;\n\t }\n\t return IfStatement;\n\t}());\n\texports.IfStatement = IfStatement;\n\tvar ImportDeclaration = (function () {\n\t function ImportDeclaration(specifiers, source) {\n\t this.type = syntax_1.Syntax.ImportDeclaration;\n\t this.specifiers = specifiers;\n\t this.source = source;\n\t }\n\t return ImportDeclaration;\n\t}());\n\texports.ImportDeclaration = ImportDeclaration;\n\tvar ImportDefaultSpecifier = (function () {\n\t function ImportDefaultSpecifier(local) {\n\t this.type = syntax_1.Syntax.ImportDefaultSpecifier;\n\t this.local = local;\n\t }\n\t return ImportDefaultSpecifier;\n\t}());\n\texports.ImportDefaultSpecifier = ImportDefaultSpecifier;\n\tvar ImportNamespaceSpecifier = (function () {\n\t function ImportNamespaceSpecifier(local) {\n\t this.type = syntax_1.Syntax.ImportNamespaceSpecifier;\n\t this.local = local;\n\t }\n\t return ImportNamespaceSpecifier;\n\t}());\n\texports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;\n\tvar ImportSpecifier = (function () {\n\t function ImportSpecifier(local, imported) {\n\t this.type = syntax_1.Syntax.ImportSpecifier;\n\t this.local = local;\n\t this.imported = imported;\n\t }\n\t return ImportSpecifier;\n\t}());\n\texports.ImportSpecifier = ImportSpecifier;\n\tvar LabeledStatement = (function () {\n\t function LabeledStatement(label, body) {\n\t this.type = syntax_1.Syntax.LabeledStatement;\n\t this.label = label;\n\t this.body = body;\n\t }\n\t return LabeledStatement;\n\t}());\n\texports.LabeledStatement = LabeledStatement;\n\tvar Literal = (function () {\n\t function Literal(value, raw) {\n\t this.type = syntax_1.Syntax.Literal;\n\t this.value = value;\n\t this.raw = raw;\n\t }\n\t return Literal;\n\t}());\n\texports.Literal = Literal;\n\tvar MetaProperty = (function () {\n\t function MetaProperty(meta, property) {\n\t this.type = syntax_1.Syntax.MetaProperty;\n\t this.meta = meta;\n\t this.property = property;\n\t }\n\t return MetaProperty;\n\t}());\n\texports.MetaProperty = MetaProperty;\n\tvar MethodDefinition = (function () {\n\t function MethodDefinition(key, computed, value, kind, isStatic) {\n\t this.type = syntax_1.Syntax.MethodDefinition;\n\t this.key = key;\n\t this.computed = computed;\n\t this.value = value;\n\t this.kind = kind;\n\t this.static = isStatic;\n\t }\n\t return MethodDefinition;\n\t}());\n\texports.MethodDefinition = MethodDefinition;\n\tvar Module = (function () {\n\t function Module(body) {\n\t this.type = syntax_1.Syntax.Program;\n\t this.body = body;\n\t this.sourceType = 'module';\n\t }\n\t return Module;\n\t}());\n\texports.Module = Module;\n\tvar NewExpression = (function () {\n\t function NewExpression(callee, args) {\n\t this.type = syntax_1.Syntax.NewExpression;\n\t this.callee = callee;\n\t this.arguments = args;\n\t }\n\t return NewExpression;\n\t}());\n\texports.NewExpression = NewExpression;\n\tvar ObjectExpression = (function () {\n\t function ObjectExpression(properties) {\n\t this.type = syntax_1.Syntax.ObjectExpression;\n\t this.properties = properties;\n\t }\n\t return ObjectExpression;\n\t}());\n\texports.ObjectExpression = ObjectExpression;\n\tvar ObjectPattern = (function () {\n\t function ObjectPattern(properties) {\n\t this.type = syntax_1.Syntax.ObjectPattern;\n\t this.properties = properties;\n\t }\n\t return ObjectPattern;\n\t}());\n\texports.ObjectPattern = ObjectPattern;\n\tvar Property = (function () {\n\t function Property(kind, key, computed, value, method, shorthand) {\n\t this.type = syntax_1.Syntax.Property;\n\t this.key = key;\n\t this.computed = computed;\n\t this.value = value;\n\t this.kind = kind;\n\t this.method = method;\n\t this.shorthand = shorthand;\n\t }\n\t return Property;\n\t}());\n\texports.Property = Property;\n\tvar RegexLiteral = (function () {\n\t function RegexLiteral(value, raw, pattern, flags) {\n\t this.type = syntax_1.Syntax.Literal;\n\t this.value = value;\n\t this.raw = raw;\n\t this.regex = { pattern: pattern, flags: flags };\n\t }\n\t return RegexLiteral;\n\t}());\n\texports.RegexLiteral = RegexLiteral;\n\tvar RestElement = (function () {\n\t function RestElement(argument) {\n\t this.type = syntax_1.Syntax.RestElement;\n\t this.argument = argument;\n\t }\n\t return RestElement;\n\t}());\n\texports.RestElement = RestElement;\n\tvar ReturnStatement = (function () {\n\t function ReturnStatement(argument) {\n\t this.type = syntax_1.Syntax.ReturnStatement;\n\t this.argument = argument;\n\t }\n\t return ReturnStatement;\n\t}());\n\texports.ReturnStatement = ReturnStatement;\n\tvar Script = (function () {\n\t function Script(body) {\n\t this.type = syntax_1.Syntax.Program;\n\t this.body = body;\n\t this.sourceType = 'script';\n\t }\n\t return Script;\n\t}());\n\texports.Script = Script;\n\tvar SequenceExpression = (function () {\n\t function SequenceExpression(expressions) {\n\t this.type = syntax_1.Syntax.SequenceExpression;\n\t this.expressions = expressions;\n\t }\n\t return SequenceExpression;\n\t}());\n\texports.SequenceExpression = SequenceExpression;\n\tvar SpreadElement = (function () {\n\t function SpreadElement(argument) {\n\t this.type = syntax_1.Syntax.SpreadElement;\n\t this.argument = argument;\n\t }\n\t return SpreadElement;\n\t}());\n\texports.SpreadElement = SpreadElement;\n\tvar StaticMemberExpression = (function () {\n\t function StaticMemberExpression(object, property) {\n\t this.type = syntax_1.Syntax.MemberExpression;\n\t this.computed = false;\n\t this.object = object;\n\t this.property = property;\n\t }\n\t return StaticMemberExpression;\n\t}());\n\texports.StaticMemberExpression = StaticMemberExpression;\n\tvar Super = (function () {\n\t function Super() {\n\t this.type = syntax_1.Syntax.Super;\n\t }\n\t return Super;\n\t}());\n\texports.Super = Super;\n\tvar SwitchCase = (function () {\n\t function SwitchCase(test, consequent) {\n\t this.type = syntax_1.Syntax.SwitchCase;\n\t this.test = test;\n\t this.consequent = consequent;\n\t }\n\t return SwitchCase;\n\t}());\n\texports.SwitchCase = SwitchCase;\n\tvar SwitchStatement = (function () {\n\t function SwitchStatement(discriminant, cases) {\n\t this.type = syntax_1.Syntax.SwitchStatement;\n\t this.discriminant = discriminant;\n\t this.cases = cases;\n\t }\n\t return SwitchStatement;\n\t}());\n\texports.SwitchStatement = SwitchStatement;\n\tvar TaggedTemplateExpression = (function () {\n\t function TaggedTemplateExpression(tag, quasi) {\n\t this.type = syntax_1.Syntax.TaggedTemplateExpression;\n\t this.tag = tag;\n\t this.quasi = quasi;\n\t }\n\t return TaggedTemplateExpression;\n\t}());\n\texports.TaggedTemplateExpression = TaggedTemplateExpression;\n\tvar TemplateElement = (function () {\n\t function TemplateElement(value, tail) {\n\t this.type = syntax_1.Syntax.TemplateElement;\n\t this.value = value;\n\t this.tail = tail;\n\t }\n\t return TemplateElement;\n\t}());\n\texports.TemplateElement = TemplateElement;\n\tvar TemplateLiteral = (function () {\n\t function TemplateLiteral(quasis, expressions) {\n\t this.type = syntax_1.Syntax.TemplateLiteral;\n\t this.quasis = quasis;\n\t this.expressions = expressions;\n\t }\n\t return TemplateLiteral;\n\t}());\n\texports.TemplateLiteral = TemplateLiteral;\n\tvar ThisExpression = (function () {\n\t function ThisExpression() {\n\t this.type = syntax_1.Syntax.ThisExpression;\n\t }\n\t return ThisExpression;\n\t}());\n\texports.ThisExpression = ThisExpression;\n\tvar ThrowStatement = (function () {\n\t function ThrowStatement(argument) {\n\t this.type = syntax_1.Syntax.ThrowStatement;\n\t this.argument = argument;\n\t }\n\t return ThrowStatement;\n\t}());\n\texports.ThrowStatement = ThrowStatement;\n\tvar TryStatement = (function () {\n\t function TryStatement(block, handler, finalizer) {\n\t this.type = syntax_1.Syntax.TryStatement;\n\t this.block = block;\n\t this.handler = handler;\n\t this.finalizer = finalizer;\n\t }\n\t return TryStatement;\n\t}());\n\texports.TryStatement = TryStatement;\n\tvar UnaryExpression = (function () {\n\t function UnaryExpression(operator, argument) {\n\t this.type = syntax_1.Syntax.UnaryExpression;\n\t this.operator = operator;\n\t this.argument = argument;\n\t this.prefix = true;\n\t }\n\t return UnaryExpression;\n\t}());\n\texports.UnaryExpression = UnaryExpression;\n\tvar UpdateExpression = (function () {\n\t function UpdateExpression(operator, argument, prefix) {\n\t this.type = syntax_1.Syntax.UpdateExpression;\n\t this.operator = operator;\n\t this.argument = argument;\n\t this.prefix = prefix;\n\t }\n\t return UpdateExpression;\n\t}());\n\texports.UpdateExpression = UpdateExpression;\n\tvar VariableDeclaration = (function () {\n\t function VariableDeclaration(declarations, kind) {\n\t this.type = syntax_1.Syntax.VariableDeclaration;\n\t this.declarations = declarations;\n\t this.kind = kind;\n\t }\n\t return VariableDeclaration;\n\t}());\n\texports.VariableDeclaration = VariableDeclaration;\n\tvar VariableDeclarator = (function () {\n\t function VariableDeclarator(id, init) {\n\t this.type = syntax_1.Syntax.VariableDeclarator;\n\t this.id = id;\n\t this.init = init;\n\t }\n\t return VariableDeclarator;\n\t}());\n\texports.VariableDeclarator = VariableDeclarator;\n\tvar WhileStatement = (function () {\n\t function WhileStatement(test, body) {\n\t this.type = syntax_1.Syntax.WhileStatement;\n\t this.test = test;\n\t this.body = body;\n\t }\n\t return WhileStatement;\n\t}());\n\texports.WhileStatement = WhileStatement;\n\tvar WithStatement = (function () {\n\t function WithStatement(object, body) {\n\t this.type = syntax_1.Syntax.WithStatement;\n\t this.object = object;\n\t this.body = body;\n\t }\n\t return WithStatement;\n\t}());\n\texports.WithStatement = WithStatement;\n\tvar YieldExpression = (function () {\n\t function YieldExpression(argument, delegate) {\n\t this.type = syntax_1.Syntax.YieldExpression;\n\t this.argument = argument;\n\t this.delegate = delegate;\n\t }\n\t return YieldExpression;\n\t}());\n\texports.YieldExpression = YieldExpression;\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar assert_1 = __webpack_require__(9);\n\tvar error_handler_1 = __webpack_require__(10);\n\tvar messages_1 = __webpack_require__(11);\n\tvar Node = __webpack_require__(7);\n\tvar scanner_1 = __webpack_require__(12);\n\tvar syntax_1 = __webpack_require__(2);\n\tvar token_1 = __webpack_require__(13);\n\tvar ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder';\n\tvar Parser = (function () {\n\t function Parser(code, options, delegate) {\n\t if (options === void 0) { options = {}; }\n\t this.config = {\n\t range: (typeof options.range === 'boolean') && options.range,\n\t loc: (typeof options.loc === 'boolean') && options.loc,\n\t source: null,\n\t tokens: (typeof options.tokens === 'boolean') && options.tokens,\n\t comment: (typeof options.comment === 'boolean') && options.comment,\n\t tolerant: (typeof options.tolerant === 'boolean') && options.tolerant\n\t };\n\t if (this.config.loc && options.source && options.source !== null) {\n\t this.config.source = String(options.source);\n\t }\n\t this.delegate = delegate;\n\t this.errorHandler = new error_handler_1.ErrorHandler();\n\t this.errorHandler.tolerant = this.config.tolerant;\n\t this.scanner = new scanner_1.Scanner(code, this.errorHandler);\n\t this.scanner.trackComment = this.config.comment;\n\t this.operatorPrecedence = {\n\t ')': 0,\n\t ';': 0,\n\t ',': 0,\n\t '=': 0,\n\t ']': 0,\n\t '||': 1,\n\t '&&': 2,\n\t '|': 3,\n\t '^': 4,\n\t '&': 5,\n\t '==': 6,\n\t '!=': 6,\n\t '===': 6,\n\t '!==': 6,\n\t '<': 7,\n\t '>': 7,\n\t '<=': 7,\n\t '>=': 7,\n\t '<<': 8,\n\t '>>': 8,\n\t '>>>': 8,\n\t '+': 9,\n\t '-': 9,\n\t '*': 11,\n\t '/': 11,\n\t '%': 11\n\t };\n\t this.lookahead = {\n\t type: 2 /* EOF */,\n\t value: '',\n\t lineNumber: this.scanner.lineNumber,\n\t lineStart: 0,\n\t start: 0,\n\t end: 0\n\t };\n\t this.hasLineTerminator = false;\n\t this.context = {\n\t isModule: false,\n\t await: false,\n\t allowIn: true,\n\t allowStrictDirective: true,\n\t allowYield: true,\n\t firstCoverInitializedNameError: null,\n\t isAssignmentTarget: false,\n\t isBindingElement: false,\n\t inFunctionBody: false,\n\t inIteration: false,\n\t inSwitch: false,\n\t labelSet: {},\n\t strict: false\n\t };\n\t this.tokens = [];\n\t this.startMarker = {\n\t index: 0,\n\t line: this.scanner.lineNumber,\n\t column: 0\n\t };\n\t this.lastMarker = {\n\t index: 0,\n\t line: this.scanner.lineNumber,\n\t column: 0\n\t };\n\t this.nextToken();\n\t this.lastMarker = {\n\t index: this.scanner.index,\n\t line: this.scanner.lineNumber,\n\t column: this.scanner.index - this.scanner.lineStart\n\t };\n\t }\n\t Parser.prototype.throwError = function (messageFormat) {\n\t var values = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t values[_i - 1] = arguments[_i];\n\t }\n\t var args = Array.prototype.slice.call(arguments, 1);\n\t var msg = messageFormat.replace(/%(\\d)/g, function (whole, idx) {\n\t assert_1.assert(idx < args.length, 'Message reference must be in range');\n\t return args[idx];\n\t });\n\t var index = this.lastMarker.index;\n\t var line = this.lastMarker.line;\n\t var column = this.lastMarker.column + 1;\n\t throw this.errorHandler.createError(index, line, column, msg);\n\t };\n\t Parser.prototype.tolerateError = function (messageFormat) {\n\t var values = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t values[_i - 1] = arguments[_i];\n\t }\n\t var args = Array.prototype.slice.call(arguments, 1);\n\t var msg = messageFormat.replace(/%(\\d)/g, function (whole, idx) {\n\t assert_1.assert(idx < args.length, 'Message reference must be in range');\n\t return args[idx];\n\t });\n\t var index = this.lastMarker.index;\n\t var line = this.scanner.lineNumber;\n\t var column = this.lastMarker.column + 1;\n\t this.errorHandler.tolerateError(index, line, column, msg);\n\t };\n\t // Throw an exception because of the token.\n\t Parser.prototype.unexpectedTokenError = function (token, message) {\n\t var msg = message || messages_1.Messages.UnexpectedToken;\n\t var value;\n\t if (token) {\n\t if (!message) {\n\t msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS :\n\t (token.type === 3 /* Identifier */) ? messages_1.Messages.UnexpectedIdentifier :\n\t (token.type === 6 /* NumericLiteral */) ? messages_1.Messages.UnexpectedNumber :\n\t (token.type === 8 /* StringLiteral */) ? messages_1.Messages.UnexpectedString :\n\t (token.type === 10 /* Template */) ? messages_1.Messages.UnexpectedTemplate :\n\t messages_1.Messages.UnexpectedToken;\n\t if (token.type === 4 /* Keyword */) {\n\t if (this.scanner.isFutureReservedWord(token.value)) {\n\t msg = messages_1.Messages.UnexpectedReserved;\n\t }\n\t else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) {\n\t msg = messages_1.Messages.StrictReservedWord;\n\t }\n\t }\n\t }\n\t value = token.value;\n\t }\n\t else {\n\t value = 'ILLEGAL';\n\t }\n\t msg = msg.replace('%0', value);\n\t if (token && typeof token.lineNumber === 'number') {\n\t var index = token.start;\n\t var line = token.lineNumber;\n\t var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column;\n\t var column = token.start - lastMarkerLineStart + 1;\n\t return this.errorHandler.createError(index, line, column, msg);\n\t }\n\t else {\n\t var index = this.lastMarker.index;\n\t var line = this.lastMarker.line;\n\t var column = this.lastMarker.column + 1;\n\t return this.errorHandler.createError(index, line, column, msg);\n\t }\n\t };\n\t Parser.prototype.throwUnexpectedToken = function (token, message) {\n\t throw this.unexpectedTokenError(token, message);\n\t };\n\t Parser.prototype.tolerateUnexpectedToken = function (token, message) {\n\t this.errorHandler.tolerate(this.unexpectedTokenError(token, message));\n\t };\n\t Parser.prototype.collectComments = function () {\n\t if (!this.config.comment) {\n\t this.scanner.scanComments();\n\t }\n\t else {\n\t var comments = this.scanner.scanComments();\n\t if (comments.length > 0 && this.delegate) {\n\t for (var i = 0; i < comments.length; ++i) {\n\t var e = comments[i];\n\t var node = void 0;\n\t node = {\n\t type: e.multiLine ? 'BlockComment' : 'LineComment',\n\t value: this.scanner.source.slice(e.slice[0], e.slice[1])\n\t };\n\t if (this.config.range) {\n\t node.range = e.range;\n\t }\n\t if (this.config.loc) {\n\t node.loc = e.loc;\n\t }\n\t var metadata = {\n\t start: {\n\t line: e.loc.start.line,\n\t column: e.loc.start.column,\n\t offset: e.range[0]\n\t },\n\t end: {\n\t line: e.loc.end.line,\n\t column: e.loc.end.column,\n\t offset: e.range[1]\n\t }\n\t };\n\t this.delegate(node, metadata);\n\t }\n\t }\n\t }\n\t };\n\t // From internal representation to an external structure\n\t Parser.prototype.getTokenRaw = function (token) {\n\t return this.scanner.source.slice(token.start, token.end);\n\t };\n\t Parser.prototype.convertToken = function (token) {\n\t var t = {\n\t type: token_1.TokenName[token.type],\n\t value: this.getTokenRaw(token)\n\t };\n\t if (this.config.range) {\n\t t.range = [token.start, token.end];\n\t }\n\t if (this.config.loc) {\n\t t.loc = {\n\t start: {\n\t line: this.startMarker.line,\n\t column: this.startMarker.column\n\t },\n\t end: {\n\t line: this.scanner.lineNumber,\n\t column: this.scanner.index - this.scanner.lineStart\n\t }\n\t };\n\t }\n\t if (token.type === 9 /* RegularExpression */) {\n\t var pattern = token.pattern;\n\t var flags = token.flags;\n\t t.regex = { pattern: pattern, flags: flags };\n\t }\n\t return t;\n\t };\n\t Parser.prototype.nextToken = function () {\n\t var token = this.lookahead;\n\t this.lastMarker.index = this.scanner.index;\n\t this.lastMarker.line = this.scanner.lineNumber;\n\t this.lastMarker.column = this.scanner.index - this.scanner.lineStart;\n\t this.collectComments();\n\t if (this.scanner.index !== this.startMarker.index) {\n\t this.startMarker.index = this.scanner.index;\n\t this.startMarker.line = this.scanner.lineNumber;\n\t this.startMarker.column = this.scanner.index - this.scanner.lineStart;\n\t }\n\t var next = this.scanner.lex();\n\t this.hasLineTerminator = (token.lineNumber !== next.lineNumber);\n\t if (next && this.context.strict && next.type === 3 /* Identifier */) {\n\t if (this.scanner.isStrictModeReservedWord(next.value)) {\n\t next.type = 4 /* Keyword */;\n\t }\n\t }\n\t this.lookahead = next;\n\t if (this.config.tokens && next.type !== 2 /* EOF */) {\n\t this.tokens.push(this.convertToken(next));\n\t }\n\t return token;\n\t };\n\t Parser.prototype.nextRegexToken = function () {\n\t this.collectComments();\n\t var token = this.scanner.scanRegExp();\n\t if (this.config.tokens) {\n\t // Pop the previous token, '/' or '/='\n\t // This is added from the lookahead token.\n\t this.tokens.pop();\n\t this.tokens.push(this.convertToken(token));\n\t }\n\t // Prime the next lookahead.\n\t this.lookahead = token;\n\t this.nextToken();\n\t return token;\n\t };\n\t Parser.prototype.createNode = function () {\n\t return {\n\t index: this.startMarker.index,\n\t line: this.startMarker.line,\n\t column: this.startMarker.column\n\t };\n\t };\n\t Parser.prototype.startNode = function (token, lastLineStart) {\n\t if (lastLineStart === void 0) { lastLineStart = 0; }\n\t var column = token.start - token.lineStart;\n\t var line = token.lineNumber;\n\t if (column < 0) {\n\t column += lastLineStart;\n\t line--;\n\t }\n\t return {\n\t index: token.start,\n\t line: line,\n\t column: column\n\t };\n\t };\n\t Parser.prototype.finalize = function (marker, node) {\n\t if (this.config.range) {\n\t node.range = [marker.index, this.lastMarker.index];\n\t }\n\t if (this.config.loc) {\n\t node.loc = {\n\t start: {\n\t line: marker.line,\n\t column: marker.column,\n\t },\n\t end: {\n\t line: this.lastMarker.line,\n\t column: this.lastMarker.column\n\t }\n\t };\n\t if (this.config.source) {\n\t node.loc.source = this.config.source;\n\t }\n\t }\n\t if (this.delegate) {\n\t var metadata = {\n\t start: {\n\t line: marker.line,\n\t column: marker.column,\n\t offset: marker.index\n\t },\n\t end: {\n\t line: this.lastMarker.line,\n\t column: this.lastMarker.column,\n\t offset: this.lastMarker.index\n\t }\n\t };\n\t this.delegate(node, metadata);\n\t }\n\t return node;\n\t };\n\t // Expect the next token to match the specified punctuator.\n\t // If not, an exception will be thrown.\n\t Parser.prototype.expect = function (value) {\n\t var token = this.nextToken();\n\t if (token.type !== 7 /* Punctuator */ || token.value !== value) {\n\t this.throwUnexpectedToken(token);\n\t }\n\t };\n\t // Quietly expect a comma when in tolerant mode, otherwise delegates to expect().\n\t Parser.prototype.expectCommaSeparator = function () {\n\t if (this.config.tolerant) {\n\t var token = this.lookahead;\n\t if (token.type === 7 /* Punctuator */ && token.value === ',') {\n\t this.nextToken();\n\t }\n\t else if (token.type === 7 /* Punctuator */ && token.value === ';') {\n\t this.nextToken();\n\t this.tolerateUnexpectedToken(token);\n\t }\n\t else {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken);\n\t }\n\t }\n\t else {\n\t this.expect(',');\n\t }\n\t };\n\t // Expect the next token to match the specified keyword.\n\t // If not, an exception will be thrown.\n\t Parser.prototype.expectKeyword = function (keyword) {\n\t var token = this.nextToken();\n\t if (token.type !== 4 /* Keyword */ || token.value !== keyword) {\n\t this.throwUnexpectedToken(token);\n\t }\n\t };\n\t // Return true if the next token matches the specified punctuator.\n\t Parser.prototype.match = function (value) {\n\t return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value;\n\t };\n\t // Return true if the next token matches the specified keyword\n\t Parser.prototype.matchKeyword = function (keyword) {\n\t return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword;\n\t };\n\t // Return true if the next token matches the specified contextual keyword\n\t // (where an identifier is sometimes a keyword depending on the context)\n\t Parser.prototype.matchContextualKeyword = function (keyword) {\n\t return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword;\n\t };\n\t // Return true if the next token is an assignment operator\n\t Parser.prototype.matchAssign = function () {\n\t if (this.lookahead.type !== 7 /* Punctuator */) {\n\t return false;\n\t }\n\t var op = this.lookahead.value;\n\t return op === '=' ||\n\t op === '*=' ||\n\t op === '**=' ||\n\t op === '/=' ||\n\t op === '%=' ||\n\t op === '+=' ||\n\t op === '-=' ||\n\t op === '<<=' ||\n\t op === '>>=' ||\n\t op === '>>>=' ||\n\t op === '&=' ||\n\t op === '^=' ||\n\t op === '|=';\n\t };\n\t // Cover grammar support.\n\t //\n\t // When an assignment expression position starts with an left parenthesis, the determination of the type\n\t // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead)\n\t // or the first comma. This situation also defers the determination of all the expressions nested in the pair.\n\t //\n\t // There are three productions that can be parsed in a parentheses pair that needs to be determined\n\t // after the outermost pair is closed. They are:\n\t //\n\t // 1. AssignmentExpression\n\t // 2. BindingElements\n\t // 3. AssignmentTargets\n\t //\n\t // In order to avoid exponential backtracking, we use two flags to denote if the production can be\n\t // binding element or assignment target.\n\t //\n\t // The three productions have the relationship:\n\t //\n\t // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression\n\t //\n\t // with a single exception that CoverInitializedName when used directly in an Expression, generates\n\t // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the\n\t // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair.\n\t //\n\t // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not\n\t // effect the current flags. This means the production the parser parses is only used as an expression. Therefore\n\t // the CoverInitializedName check is conducted.\n\t //\n\t // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates\n\t // the flags outside of the parser. This means the production the parser parses is used as a part of a potential\n\t // pattern. The CoverInitializedName check is deferred.\n\t Parser.prototype.isolateCoverGrammar = function (parseFunction) {\n\t var previousIsBindingElement = this.context.isBindingElement;\n\t var previousIsAssignmentTarget = this.context.isAssignmentTarget;\n\t var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;\n\t this.context.isBindingElement = true;\n\t this.context.isAssignmentTarget = true;\n\t this.context.firstCoverInitializedNameError = null;\n\t var result = parseFunction.call(this);\n\t if (this.context.firstCoverInitializedNameError !== null) {\n\t this.throwUnexpectedToken(this.context.firstCoverInitializedNameError);\n\t }\n\t this.context.isBindingElement = previousIsBindingElement;\n\t this.context.isAssignmentTarget = previousIsAssignmentTarget;\n\t this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError;\n\t return result;\n\t };\n\t Parser.prototype.inheritCoverGrammar = function (parseFunction) {\n\t var previousIsBindingElement = this.context.isBindingElement;\n\t var previousIsAssignmentTarget = this.context.isAssignmentTarget;\n\t var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;\n\t this.context.isBindingElement = true;\n\t this.context.isAssignmentTarget = true;\n\t this.context.firstCoverInitializedNameError = null;\n\t var result = parseFunction.call(this);\n\t this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement;\n\t this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget;\n\t this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError;\n\t return result;\n\t };\n\t Parser.prototype.consumeSemicolon = function () {\n\t if (this.match(';')) {\n\t this.nextToken();\n\t }\n\t else if (!this.hasLineTerminator) {\n\t if (this.lookahead.type !== 2 /* EOF */ && !this.match('}')) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t this.lastMarker.index = this.startMarker.index;\n\t this.lastMarker.line = this.startMarker.line;\n\t this.lastMarker.column = this.startMarker.column;\n\t }\n\t };\n\t // https://tc39.github.io/ecma262/#sec-primary-expression\n\t Parser.prototype.parsePrimaryExpression = function () {\n\t var node = this.createNode();\n\t var expr;\n\t var token, raw;\n\t switch (this.lookahead.type) {\n\t case 3 /* Identifier */:\n\t if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') {\n\t this.tolerateUnexpectedToken(this.lookahead);\n\t }\n\t expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value));\n\t break;\n\t case 6 /* NumericLiteral */:\n\t case 8 /* StringLiteral */:\n\t if (this.context.strict && this.lookahead.octal) {\n\t this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral);\n\t }\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t token = this.nextToken();\n\t raw = this.getTokenRaw(token);\n\t expr = this.finalize(node, new Node.Literal(token.value, raw));\n\t break;\n\t case 1 /* BooleanLiteral */:\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t token = this.nextToken();\n\t raw = this.getTokenRaw(token);\n\t expr = this.finalize(node, new Node.Literal(token.value === 'true', raw));\n\t break;\n\t case 5 /* NullLiteral */:\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t token = this.nextToken();\n\t raw = this.getTokenRaw(token);\n\t expr = this.finalize(node, new Node.Literal(null, raw));\n\t break;\n\t case 10 /* Template */:\n\t expr = this.parseTemplateLiteral();\n\t break;\n\t case 7 /* Punctuator */:\n\t switch (this.lookahead.value) {\n\t case '(':\n\t this.context.isBindingElement = false;\n\t expr = this.inheritCoverGrammar(this.parseGroupExpression);\n\t break;\n\t case '[':\n\t expr = this.inheritCoverGrammar(this.parseArrayInitializer);\n\t break;\n\t case '{':\n\t expr = this.inheritCoverGrammar(this.parseObjectInitializer);\n\t break;\n\t case '/':\n\t case '/=':\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t this.scanner.index = this.startMarker.index;\n\t token = this.nextRegexToken();\n\t raw = this.getTokenRaw(token);\n\t expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags));\n\t break;\n\t default:\n\t expr = this.throwUnexpectedToken(this.nextToken());\n\t }\n\t break;\n\t case 4 /* Keyword */:\n\t if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) {\n\t expr = this.parseIdentifierName();\n\t }\n\t else if (!this.context.strict && this.matchKeyword('let')) {\n\t expr = this.finalize(node, new Node.Identifier(this.nextToken().value));\n\t }\n\t else {\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t if (this.matchKeyword('function')) {\n\t expr = this.parseFunctionExpression();\n\t }\n\t else if (this.matchKeyword('this')) {\n\t this.nextToken();\n\t expr = this.finalize(node, new Node.ThisExpression());\n\t }\n\t else if (this.matchKeyword('class')) {\n\t expr = this.parseClassExpression();\n\t }\n\t else {\n\t expr = this.throwUnexpectedToken(this.nextToken());\n\t }\n\t }\n\t break;\n\t default:\n\t expr = this.throwUnexpectedToken(this.nextToken());\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-array-initializer\n\t Parser.prototype.parseSpreadElement = function () {\n\t var node = this.createNode();\n\t this.expect('...');\n\t var arg = this.inheritCoverGrammar(this.parseAssignmentExpression);\n\t return this.finalize(node, new Node.SpreadElement(arg));\n\t };\n\t Parser.prototype.parseArrayInitializer = function () {\n\t var node = this.createNode();\n\t var elements = [];\n\t this.expect('[');\n\t while (!this.match(']')) {\n\t if (this.match(',')) {\n\t this.nextToken();\n\t elements.push(null);\n\t }\n\t else if (this.match('...')) {\n\t var element = this.parseSpreadElement();\n\t if (!this.match(']')) {\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t this.expect(',');\n\t }\n\t elements.push(element);\n\t }\n\t else {\n\t elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression));\n\t if (!this.match(']')) {\n\t this.expect(',');\n\t }\n\t }\n\t }\n\t this.expect(']');\n\t return this.finalize(node, new Node.ArrayExpression(elements));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-object-initializer\n\t Parser.prototype.parsePropertyMethod = function (params) {\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t var previousStrict = this.context.strict;\n\t var previousAllowStrictDirective = this.context.allowStrictDirective;\n\t this.context.allowStrictDirective = params.simple;\n\t var body = this.isolateCoverGrammar(this.parseFunctionSourceElements);\n\t if (this.context.strict && params.firstRestricted) {\n\t this.tolerateUnexpectedToken(params.firstRestricted, params.message);\n\t }\n\t if (this.context.strict && params.stricted) {\n\t this.tolerateUnexpectedToken(params.stricted, params.message);\n\t }\n\t this.context.strict = previousStrict;\n\t this.context.allowStrictDirective = previousAllowStrictDirective;\n\t return body;\n\t };\n\t Parser.prototype.parsePropertyMethodFunction = function () {\n\t var isGenerator = false;\n\t var node = this.createNode();\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.allowYield = true;\n\t var params = this.parseFormalParameters();\n\t var method = this.parsePropertyMethod(params);\n\t this.context.allowYield = previousAllowYield;\n\t return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));\n\t };\n\t Parser.prototype.parsePropertyMethodAsyncFunction = function () {\n\t var node = this.createNode();\n\t var previousAllowYield = this.context.allowYield;\n\t var previousAwait = this.context.await;\n\t this.context.allowYield = false;\n\t this.context.await = true;\n\t var params = this.parseFormalParameters();\n\t var method = this.parsePropertyMethod(params);\n\t this.context.allowYield = previousAllowYield;\n\t this.context.await = previousAwait;\n\t return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method));\n\t };\n\t Parser.prototype.parseObjectPropertyKey = function () {\n\t var node = this.createNode();\n\t var token = this.nextToken();\n\t var key;\n\t switch (token.type) {\n\t case 8 /* StringLiteral */:\n\t case 6 /* NumericLiteral */:\n\t if (this.context.strict && token.octal) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral);\n\t }\n\t var raw = this.getTokenRaw(token);\n\t key = this.finalize(node, new Node.Literal(token.value, raw));\n\t break;\n\t case 3 /* Identifier */:\n\t case 1 /* BooleanLiteral */:\n\t case 5 /* NullLiteral */:\n\t case 4 /* Keyword */:\n\t key = this.finalize(node, new Node.Identifier(token.value));\n\t break;\n\t case 7 /* Punctuator */:\n\t if (token.value === '[') {\n\t key = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t this.expect(']');\n\t }\n\t else {\n\t key = this.throwUnexpectedToken(token);\n\t }\n\t break;\n\t default:\n\t key = this.throwUnexpectedToken(token);\n\t }\n\t return key;\n\t };\n\t Parser.prototype.isPropertyKey = function (key, value) {\n\t return (key.type === syntax_1.Syntax.Identifier && key.name === value) ||\n\t (key.type === syntax_1.Syntax.Literal && key.value === value);\n\t };\n\t Parser.prototype.parseObjectProperty = function (hasProto) {\n\t var node = this.createNode();\n\t var token = this.lookahead;\n\t var kind;\n\t var key = null;\n\t var value = null;\n\t var computed = false;\n\t var method = false;\n\t var shorthand = false;\n\t var isAsync = false;\n\t if (token.type === 3 /* Identifier */) {\n\t var id = token.value;\n\t this.nextToken();\n\t computed = this.match('[');\n\t isAsync = !this.hasLineTerminator && (id === 'async') &&\n\t !this.match(':') && !this.match('(') && !this.match('*') && !this.match(',');\n\t key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id));\n\t }\n\t else if (this.match('*')) {\n\t this.nextToken();\n\t }\n\t else {\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t }\n\t var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);\n\t if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) {\n\t kind = 'get';\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t this.context.allowYield = false;\n\t value = this.parseGetterMethod();\n\t }\n\t else if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'set' && lookaheadPropertyKey) {\n\t kind = 'set';\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t value = this.parseSetterMethod();\n\t }\n\t else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {\n\t kind = 'init';\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t value = this.parseGeneratorMethod();\n\t method = true;\n\t }\n\t else {\n\t if (!key) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t kind = 'init';\n\t if (this.match(':') && !isAsync) {\n\t if (!computed && this.isPropertyKey(key, '__proto__')) {\n\t if (hasProto.value) {\n\t this.tolerateError(messages_1.Messages.DuplicateProtoProperty);\n\t }\n\t hasProto.value = true;\n\t }\n\t this.nextToken();\n\t value = this.inheritCoverGrammar(this.parseAssignmentExpression);\n\t }\n\t else if (this.match('(')) {\n\t value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();\n\t method = true;\n\t }\n\t else if (token.type === 3 /* Identifier */) {\n\t var id = this.finalize(node, new Node.Identifier(token.value));\n\t if (this.match('=')) {\n\t this.context.firstCoverInitializedNameError = this.lookahead;\n\t this.nextToken();\n\t shorthand = true;\n\t var init = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t value = this.finalize(node, new Node.AssignmentPattern(id, init));\n\t }\n\t else {\n\t shorthand = true;\n\t value = id;\n\t }\n\t }\n\t else {\n\t this.throwUnexpectedToken(this.nextToken());\n\t }\n\t }\n\t return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand));\n\t };\n\t Parser.prototype.parseObjectInitializer = function () {\n\t var node = this.createNode();\n\t this.expect('{');\n\t var properties = [];\n\t var hasProto = { value: false };\n\t while (!this.match('}')) {\n\t properties.push(this.parseObjectProperty(hasProto));\n\t if (!this.match('}')) {\n\t this.expectCommaSeparator();\n\t }\n\t }\n\t this.expect('}');\n\t return this.finalize(node, new Node.ObjectExpression(properties));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-template-literals\n\t Parser.prototype.parseTemplateHead = function () {\n\t assert_1.assert(this.lookahead.head, 'Template literal must start with a template head');\n\t var node = this.createNode();\n\t var token = this.nextToken();\n\t var raw = token.value;\n\t var cooked = token.cooked;\n\t return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));\n\t };\n\t Parser.prototype.parseTemplateElement = function () {\n\t if (this.lookahead.type !== 10 /* Template */) {\n\t this.throwUnexpectedToken();\n\t }\n\t var node = this.createNode();\n\t var token = this.nextToken();\n\t var raw = token.value;\n\t var cooked = token.cooked;\n\t return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));\n\t };\n\t Parser.prototype.parseTemplateLiteral = function () {\n\t var node = this.createNode();\n\t var expressions = [];\n\t var quasis = [];\n\t var quasi = this.parseTemplateHead();\n\t quasis.push(quasi);\n\t while (!quasi.tail) {\n\t expressions.push(this.parseExpression());\n\t quasi = this.parseTemplateElement();\n\t quasis.push(quasi);\n\t }\n\t return this.finalize(node, new Node.TemplateLiteral(quasis, expressions));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-grouping-operator\n\t Parser.prototype.reinterpretExpressionAsPattern = function (expr) {\n\t switch (expr.type) {\n\t case syntax_1.Syntax.Identifier:\n\t case syntax_1.Syntax.MemberExpression:\n\t case syntax_1.Syntax.RestElement:\n\t case syntax_1.Syntax.AssignmentPattern:\n\t break;\n\t case syntax_1.Syntax.SpreadElement:\n\t expr.type = syntax_1.Syntax.RestElement;\n\t this.reinterpretExpressionAsPattern(expr.argument);\n\t break;\n\t case syntax_1.Syntax.ArrayExpression:\n\t expr.type = syntax_1.Syntax.ArrayPattern;\n\t for (var i = 0; i < expr.elements.length; i++) {\n\t if (expr.elements[i] !== null) {\n\t this.reinterpretExpressionAsPattern(expr.elements[i]);\n\t }\n\t }\n\t break;\n\t case syntax_1.Syntax.ObjectExpression:\n\t expr.type = syntax_1.Syntax.ObjectPattern;\n\t for (var i = 0; i < expr.properties.length; i++) {\n\t this.reinterpretExpressionAsPattern(expr.properties[i].value);\n\t }\n\t break;\n\t case syntax_1.Syntax.AssignmentExpression:\n\t expr.type = syntax_1.Syntax.AssignmentPattern;\n\t delete expr.operator;\n\t this.reinterpretExpressionAsPattern(expr.left);\n\t break;\n\t default:\n\t // Allow other node type for tolerant parsing.\n\t break;\n\t }\n\t };\n\t Parser.prototype.parseGroupExpression = function () {\n\t var expr;\n\t this.expect('(');\n\t if (this.match(')')) {\n\t this.nextToken();\n\t if (!this.match('=>')) {\n\t this.expect('=>');\n\t }\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: [],\n\t async: false\n\t };\n\t }\n\t else {\n\t var startToken = this.lookahead;\n\t var params = [];\n\t if (this.match('...')) {\n\t expr = this.parseRestElement(params);\n\t this.expect(')');\n\t if (!this.match('=>')) {\n\t this.expect('=>');\n\t }\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: [expr],\n\t async: false\n\t };\n\t }\n\t else {\n\t var arrow = false;\n\t this.context.isBindingElement = true;\n\t expr = this.inheritCoverGrammar(this.parseAssignmentExpression);\n\t if (this.match(',')) {\n\t var expressions = [];\n\t this.context.isAssignmentTarget = false;\n\t expressions.push(expr);\n\t while (this.lookahead.type !== 2 /* EOF */) {\n\t if (!this.match(',')) {\n\t break;\n\t }\n\t this.nextToken();\n\t if (this.match(')')) {\n\t this.nextToken();\n\t for (var i = 0; i < expressions.length; i++) {\n\t this.reinterpretExpressionAsPattern(expressions[i]);\n\t }\n\t arrow = true;\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: expressions,\n\t async: false\n\t };\n\t }\n\t else if (this.match('...')) {\n\t if (!this.context.isBindingElement) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t expressions.push(this.parseRestElement(params));\n\t this.expect(')');\n\t if (!this.match('=>')) {\n\t this.expect('=>');\n\t }\n\t this.context.isBindingElement = false;\n\t for (var i = 0; i < expressions.length; i++) {\n\t this.reinterpretExpressionAsPattern(expressions[i]);\n\t }\n\t arrow = true;\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: expressions,\n\t async: false\n\t };\n\t }\n\t else {\n\t expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression));\n\t }\n\t if (arrow) {\n\t break;\n\t }\n\t }\n\t if (!arrow) {\n\t expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));\n\t }\n\t }\n\t if (!arrow) {\n\t this.expect(')');\n\t if (this.match('=>')) {\n\t if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') {\n\t arrow = true;\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: [expr],\n\t async: false\n\t };\n\t }\n\t if (!arrow) {\n\t if (!this.context.isBindingElement) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t if (expr.type === syntax_1.Syntax.SequenceExpression) {\n\t for (var i = 0; i < expr.expressions.length; i++) {\n\t this.reinterpretExpressionAsPattern(expr.expressions[i]);\n\t }\n\t }\n\t else {\n\t this.reinterpretExpressionAsPattern(expr);\n\t }\n\t var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]);\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: parameters,\n\t async: false\n\t };\n\t }\n\t }\n\t this.context.isBindingElement = false;\n\t }\n\t }\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions\n\t Parser.prototype.parseArguments = function () {\n\t this.expect('(');\n\t var args = [];\n\t if (!this.match(')')) {\n\t while (true) {\n\t var expr = this.match('...') ? this.parseSpreadElement() :\n\t this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t args.push(expr);\n\t if (this.match(')')) {\n\t break;\n\t }\n\t this.expectCommaSeparator();\n\t if (this.match(')')) {\n\t break;\n\t }\n\t }\n\t }\n\t this.expect(')');\n\t return args;\n\t };\n\t Parser.prototype.isIdentifierName = function (token) {\n\t return token.type === 3 /* Identifier */ ||\n\t token.type === 4 /* Keyword */ ||\n\t token.type === 1 /* BooleanLiteral */ ||\n\t token.type === 5 /* NullLiteral */;\n\t };\n\t Parser.prototype.parseIdentifierName = function () {\n\t var node = this.createNode();\n\t var token = this.nextToken();\n\t if (!this.isIdentifierName(token)) {\n\t this.throwUnexpectedToken(token);\n\t }\n\t return this.finalize(node, new Node.Identifier(token.value));\n\t };\n\t Parser.prototype.parseNewExpression = function () {\n\t var node = this.createNode();\n\t var id = this.parseIdentifierName();\n\t assert_1.assert(id.name === 'new', 'New expression must start with `new`');\n\t var expr;\n\t if (this.match('.')) {\n\t this.nextToken();\n\t if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') {\n\t var property = this.parseIdentifierName();\n\t expr = new Node.MetaProperty(id, property);\n\t }\n\t else {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t }\n\t else {\n\t var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression);\n\t var args = this.match('(') ? this.parseArguments() : [];\n\t expr = new Node.NewExpression(callee, args);\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t }\n\t return this.finalize(node, expr);\n\t };\n\t Parser.prototype.parseAsyncArgument = function () {\n\t var arg = this.parseAssignmentExpression();\n\t this.context.firstCoverInitializedNameError = null;\n\t return arg;\n\t };\n\t Parser.prototype.parseAsyncArguments = function () {\n\t this.expect('(');\n\t var args = [];\n\t if (!this.match(')')) {\n\t while (true) {\n\t var expr = this.match('...') ? this.parseSpreadElement() :\n\t this.isolateCoverGrammar(this.parseAsyncArgument);\n\t args.push(expr);\n\t if (this.match(')')) {\n\t break;\n\t }\n\t this.expectCommaSeparator();\n\t if (this.match(')')) {\n\t break;\n\t }\n\t }\n\t }\n\t this.expect(')');\n\t return args;\n\t };\n\t Parser.prototype.parseLeftHandSideExpressionAllowCall = function () {\n\t var startToken = this.lookahead;\n\t var maybeAsync = this.matchContextualKeyword('async');\n\t var previousAllowIn = this.context.allowIn;\n\t this.context.allowIn = true;\n\t var expr;\n\t if (this.matchKeyword('super') && this.context.inFunctionBody) {\n\t expr = this.createNode();\n\t this.nextToken();\n\t expr = this.finalize(expr, new Node.Super());\n\t if (!this.match('(') && !this.match('.') && !this.match('[')) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t }\n\t else {\n\t expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);\n\t }\n\t while (true) {\n\t if (this.match('.')) {\n\t this.context.isBindingElement = false;\n\t this.context.isAssignmentTarget = true;\n\t this.expect('.');\n\t var property = this.parseIdentifierName();\n\t expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property));\n\t }\n\t else if (this.match('(')) {\n\t var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber);\n\t this.context.isBindingElement = false;\n\t this.context.isAssignmentTarget = false;\n\t var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments();\n\t expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args));\n\t if (asyncArrow && this.match('=>')) {\n\t for (var i = 0; i < args.length; ++i) {\n\t this.reinterpretExpressionAsPattern(args[i]);\n\t }\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: args,\n\t async: true\n\t };\n\t }\n\t }\n\t else if (this.match('[')) {\n\t this.context.isBindingElement = false;\n\t this.context.isAssignmentTarget = true;\n\t this.expect('[');\n\t var property = this.isolateCoverGrammar(this.parseExpression);\n\t this.expect(']');\n\t expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property));\n\t }\n\t else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {\n\t var quasi = this.parseTemplateLiteral();\n\t expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi));\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t this.context.allowIn = previousAllowIn;\n\t return expr;\n\t };\n\t Parser.prototype.parseSuper = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('super');\n\t if (!this.match('[') && !this.match('.')) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t return this.finalize(node, new Node.Super());\n\t };\n\t Parser.prototype.parseLeftHandSideExpression = function () {\n\t assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.');\n\t var node = this.startNode(this.lookahead);\n\t var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() :\n\t this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);\n\t while (true) {\n\t if (this.match('[')) {\n\t this.context.isBindingElement = false;\n\t this.context.isAssignmentTarget = true;\n\t this.expect('[');\n\t var property = this.isolateCoverGrammar(this.parseExpression);\n\t this.expect(']');\n\t expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property));\n\t }\n\t else if (this.match('.')) {\n\t this.context.isBindingElement = false;\n\t this.context.isAssignmentTarget = true;\n\t this.expect('.');\n\t var property = this.parseIdentifierName();\n\t expr = this.finalize(node, new Node.StaticMemberExpression(expr, property));\n\t }\n\t else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {\n\t var quasi = this.parseTemplateLiteral();\n\t expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi));\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-update-expressions\n\t Parser.prototype.parseUpdateExpression = function () {\n\t var expr;\n\t var startToken = this.lookahead;\n\t if (this.match('++') || this.match('--')) {\n\t var node = this.startNode(startToken);\n\t var token = this.nextToken();\n\t expr = this.inheritCoverGrammar(this.parseUnaryExpression);\n\t if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {\n\t this.tolerateError(messages_1.Messages.StrictLHSPrefix);\n\t }\n\t if (!this.context.isAssignmentTarget) {\n\t this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);\n\t }\n\t var prefix = true;\n\t expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix));\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t }\n\t else {\n\t expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall);\n\t if (!this.hasLineTerminator && this.lookahead.type === 7 /* Punctuator */) {\n\t if (this.match('++') || this.match('--')) {\n\t if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {\n\t this.tolerateError(messages_1.Messages.StrictLHSPostfix);\n\t }\n\t if (!this.context.isAssignmentTarget) {\n\t this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);\n\t }\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t var operator = this.nextToken().value;\n\t var prefix = false;\n\t expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix));\n\t }\n\t }\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-unary-operators\n\t Parser.prototype.parseAwaitExpression = function () {\n\t var node = this.createNode();\n\t this.nextToken();\n\t var argument = this.parseUnaryExpression();\n\t return this.finalize(node, new Node.AwaitExpression(argument));\n\t };\n\t Parser.prototype.parseUnaryExpression = function () {\n\t var expr;\n\t if (this.match('+') || this.match('-') || this.match('~') || this.match('!') ||\n\t this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) {\n\t var node = this.startNode(this.lookahead);\n\t var token = this.nextToken();\n\t expr = this.inheritCoverGrammar(this.parseUnaryExpression);\n\t expr = this.finalize(node, new Node.UnaryExpression(token.value, expr));\n\t if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) {\n\t this.tolerateError(messages_1.Messages.StrictDelete);\n\t }\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t }\n\t else if (this.context.await && this.matchContextualKeyword('await')) {\n\t expr = this.parseAwaitExpression();\n\t }\n\t else {\n\t expr = this.parseUpdateExpression();\n\t }\n\t return expr;\n\t };\n\t Parser.prototype.parseExponentiationExpression = function () {\n\t var startToken = this.lookahead;\n\t var expr = this.inheritCoverGrammar(this.parseUnaryExpression);\n\t if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) {\n\t this.nextToken();\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t var left = expr;\n\t var right = this.isolateCoverGrammar(this.parseExponentiationExpression);\n\t expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right));\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-exp-operator\n\t // https://tc39.github.io/ecma262/#sec-multiplicative-operators\n\t // https://tc39.github.io/ecma262/#sec-additive-operators\n\t // https://tc39.github.io/ecma262/#sec-bitwise-shift-operators\n\t // https://tc39.github.io/ecma262/#sec-relational-operators\n\t // https://tc39.github.io/ecma262/#sec-equality-operators\n\t // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators\n\t // https://tc39.github.io/ecma262/#sec-binary-logical-operators\n\t Parser.prototype.binaryPrecedence = function (token) {\n\t var op = token.value;\n\t var precedence;\n\t if (token.type === 7 /* Punctuator */) {\n\t precedence = this.operatorPrecedence[op] || 0;\n\t }\n\t else if (token.type === 4 /* Keyword */) {\n\t precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0;\n\t }\n\t else {\n\t precedence = 0;\n\t }\n\t return precedence;\n\t };\n\t Parser.prototype.parseBinaryExpression = function () {\n\t var startToken = this.lookahead;\n\t var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);\n\t var token = this.lookahead;\n\t var prec = this.binaryPrecedence(token);\n\t if (prec > 0) {\n\t this.nextToken();\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t var markers = [startToken, this.lookahead];\n\t var left = expr;\n\t var right = this.isolateCoverGrammar(this.parseExponentiationExpression);\n\t var stack = [left, token.value, right];\n\t var precedences = [prec];\n\t while (true) {\n\t prec = this.binaryPrecedence(this.lookahead);\n\t if (prec <= 0) {\n\t break;\n\t }\n\t // Reduce: make a binary expression from the three topmost entries.\n\t while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) {\n\t right = stack.pop();\n\t var operator = stack.pop();\n\t precedences.pop();\n\t left = stack.pop();\n\t markers.pop();\n\t var node = this.startNode(markers[markers.length - 1]);\n\t stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right)));\n\t }\n\t // Shift.\n\t stack.push(this.nextToken().value);\n\t precedences.push(prec);\n\t markers.push(this.lookahead);\n\t stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression));\n\t }\n\t // Final reduce to clean-up the stack.\n\t var i = stack.length - 1;\n\t expr = stack[i];\n\t var lastMarker = markers.pop();\n\t while (i > 1) {\n\t var marker = markers.pop();\n\t var lastLineStart = lastMarker && lastMarker.lineStart;\n\t var node = this.startNode(marker, lastLineStart);\n\t var operator = stack[i - 1];\n\t expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr));\n\t i -= 2;\n\t lastMarker = marker;\n\t }\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-conditional-operator\n\t Parser.prototype.parseConditionalExpression = function () {\n\t var startToken = this.lookahead;\n\t var expr = this.inheritCoverGrammar(this.parseBinaryExpression);\n\t if (this.match('?')) {\n\t this.nextToken();\n\t var previousAllowIn = this.context.allowIn;\n\t this.context.allowIn = true;\n\t var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t this.context.allowIn = previousAllowIn;\n\t this.expect(':');\n\t var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate));\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-assignment-operators\n\t Parser.prototype.checkPatternParam = function (options, param) {\n\t switch (param.type) {\n\t case syntax_1.Syntax.Identifier:\n\t this.validateParam(options, param, param.name);\n\t break;\n\t case syntax_1.Syntax.RestElement:\n\t this.checkPatternParam(options, param.argument);\n\t break;\n\t case syntax_1.Syntax.AssignmentPattern:\n\t this.checkPatternParam(options, param.left);\n\t break;\n\t case syntax_1.Syntax.ArrayPattern:\n\t for (var i = 0; i < param.elements.length; i++) {\n\t if (param.elements[i] !== null) {\n\t this.checkPatternParam(options, param.elements[i]);\n\t }\n\t }\n\t break;\n\t case syntax_1.Syntax.ObjectPattern:\n\t for (var i = 0; i < param.properties.length; i++) {\n\t this.checkPatternParam(options, param.properties[i].value);\n\t }\n\t break;\n\t default:\n\t break;\n\t }\n\t options.simple = options.simple && (param instanceof Node.Identifier);\n\t };\n\t Parser.prototype.reinterpretAsCoverFormalsList = function (expr) {\n\t var params = [expr];\n\t var options;\n\t var asyncArrow = false;\n\t switch (expr.type) {\n\t case syntax_1.Syntax.Identifier:\n\t break;\n\t case ArrowParameterPlaceHolder:\n\t params = expr.params;\n\t asyncArrow = expr.async;\n\t break;\n\t default:\n\t return null;\n\t }\n\t options = {\n\t simple: true,\n\t paramSet: {}\n\t };\n\t for (var i = 0; i < params.length; ++i) {\n\t var param = params[i];\n\t if (param.type === syntax_1.Syntax.AssignmentPattern) {\n\t if (param.right.type === syntax_1.Syntax.YieldExpression) {\n\t if (param.right.argument) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t param.right.type = syntax_1.Syntax.Identifier;\n\t param.right.name = 'yield';\n\t delete param.right.argument;\n\t delete param.right.delegate;\n\t }\n\t }\n\t else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t this.checkPatternParam(options, param);\n\t params[i] = param;\n\t }\n\t if (this.context.strict || !this.context.allowYield) {\n\t for (var i = 0; i < params.length; ++i) {\n\t var param = params[i];\n\t if (param.type === syntax_1.Syntax.YieldExpression) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t }\n\t }\n\t if (options.message === messages_1.Messages.StrictParamDupe) {\n\t var token = this.context.strict ? options.stricted : options.firstRestricted;\n\t this.throwUnexpectedToken(token, options.message);\n\t }\n\t return {\n\t simple: options.simple,\n\t params: params,\n\t stricted: options.stricted,\n\t firstRestricted: options.firstRestricted,\n\t message: options.message\n\t };\n\t };\n\t Parser.prototype.parseAssignmentExpression = function () {\n\t var expr;\n\t if (!this.context.allowYield && this.matchKeyword('yield')) {\n\t expr = this.parseYieldExpression();\n\t }\n\t else {\n\t var startToken = this.lookahead;\n\t var token = startToken;\n\t expr = this.parseConditionalExpression();\n\t if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') {\n\t if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) {\n\t var arg = this.parsePrimaryExpression();\n\t this.reinterpretExpressionAsPattern(arg);\n\t expr = {\n\t type: ArrowParameterPlaceHolder,\n\t params: [arg],\n\t async: true\n\t };\n\t }\n\t }\n\t if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) {\n\t // https://tc39.github.io/ecma262/#sec-arrow-function-definitions\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t var isAsync = expr.async;\n\t var list = this.reinterpretAsCoverFormalsList(expr);\n\t if (list) {\n\t if (this.hasLineTerminator) {\n\t this.tolerateUnexpectedToken(this.lookahead);\n\t }\n\t this.context.firstCoverInitializedNameError = null;\n\t var previousStrict = this.context.strict;\n\t var previousAllowStrictDirective = this.context.allowStrictDirective;\n\t this.context.allowStrictDirective = list.simple;\n\t var previousAllowYield = this.context.allowYield;\n\t var previousAwait = this.context.await;\n\t this.context.allowYield = true;\n\t this.context.await = isAsync;\n\t var node = this.startNode(startToken);\n\t this.expect('=>');\n\t var body = void 0;\n\t if (this.match('{')) {\n\t var previousAllowIn = this.context.allowIn;\n\t this.context.allowIn = true;\n\t body = this.parseFunctionSourceElements();\n\t this.context.allowIn = previousAllowIn;\n\t }\n\t else {\n\t body = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t }\n\t var expression = body.type !== syntax_1.Syntax.BlockStatement;\n\t if (this.context.strict && list.firstRestricted) {\n\t this.throwUnexpectedToken(list.firstRestricted, list.message);\n\t }\n\t if (this.context.strict && list.stricted) {\n\t this.tolerateUnexpectedToken(list.stricted, list.message);\n\t }\n\t expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) :\n\t this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression));\n\t this.context.strict = previousStrict;\n\t this.context.allowStrictDirective = previousAllowStrictDirective;\n\t this.context.allowYield = previousAllowYield;\n\t this.context.await = previousAwait;\n\t }\n\t }\n\t else {\n\t if (this.matchAssign()) {\n\t if (!this.context.isAssignmentTarget) {\n\t this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);\n\t }\n\t if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) {\n\t var id = expr;\n\t if (this.scanner.isRestrictedWord(id.name)) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment);\n\t }\n\t if (this.scanner.isStrictModeReservedWord(id.name)) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);\n\t }\n\t }\n\t if (!this.match('=')) {\n\t this.context.isAssignmentTarget = false;\n\t this.context.isBindingElement = false;\n\t }\n\t else {\n\t this.reinterpretExpressionAsPattern(expr);\n\t }\n\t token = this.nextToken();\n\t var operator = token.value;\n\t var right = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right));\n\t this.context.firstCoverInitializedNameError = null;\n\t }\n\t }\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-comma-operator\n\t Parser.prototype.parseExpression = function () {\n\t var startToken = this.lookahead;\n\t var expr = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t if (this.match(',')) {\n\t var expressions = [];\n\t expressions.push(expr);\n\t while (this.lookahead.type !== 2 /* EOF */) {\n\t if (!this.match(',')) {\n\t break;\n\t }\n\t this.nextToken();\n\t expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression));\n\t }\n\t expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));\n\t }\n\t return expr;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-block\n\t Parser.prototype.parseStatementListItem = function () {\n\t var statement;\n\t this.context.isAssignmentTarget = true;\n\t this.context.isBindingElement = true;\n\t if (this.lookahead.type === 4 /* Keyword */) {\n\t switch (this.lookahead.value) {\n\t case 'export':\n\t if (!this.context.isModule) {\n\t this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration);\n\t }\n\t statement = this.parseExportDeclaration();\n\t break;\n\t case 'import':\n\t if (!this.context.isModule) {\n\t this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration);\n\t }\n\t statement = this.parseImportDeclaration();\n\t break;\n\t case 'const':\n\t statement = this.parseLexicalDeclaration({ inFor: false });\n\t break;\n\t case 'function':\n\t statement = this.parseFunctionDeclaration();\n\t break;\n\t case 'class':\n\t statement = this.parseClassDeclaration();\n\t break;\n\t case 'let':\n\t statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement();\n\t break;\n\t default:\n\t statement = this.parseStatement();\n\t break;\n\t }\n\t }\n\t else {\n\t statement = this.parseStatement();\n\t }\n\t return statement;\n\t };\n\t Parser.prototype.parseBlock = function () {\n\t var node = this.createNode();\n\t this.expect('{');\n\t var block = [];\n\t while (true) {\n\t if (this.match('}')) {\n\t break;\n\t }\n\t block.push(this.parseStatementListItem());\n\t }\n\t this.expect('}');\n\t return this.finalize(node, new Node.BlockStatement(block));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-let-and-const-declarations\n\t Parser.prototype.parseLexicalBinding = function (kind, options) {\n\t var node = this.createNode();\n\t var params = [];\n\t var id = this.parsePattern(params, kind);\n\t if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {\n\t if (this.scanner.isRestrictedWord(id.name)) {\n\t this.tolerateError(messages_1.Messages.StrictVarName);\n\t }\n\t }\n\t var init = null;\n\t if (kind === 'const') {\n\t if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) {\n\t if (this.match('=')) {\n\t this.nextToken();\n\t init = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t }\n\t else {\n\t this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const');\n\t }\n\t }\n\t }\n\t else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) {\n\t this.expect('=');\n\t init = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t }\n\t return this.finalize(node, new Node.VariableDeclarator(id, init));\n\t };\n\t Parser.prototype.parseBindingList = function (kind, options) {\n\t var list = [this.parseLexicalBinding(kind, options)];\n\t while (this.match(',')) {\n\t this.nextToken();\n\t list.push(this.parseLexicalBinding(kind, options));\n\t }\n\t return list;\n\t };\n\t Parser.prototype.isLexicalDeclaration = function () {\n\t var state = this.scanner.saveState();\n\t this.scanner.scanComments();\n\t var next = this.scanner.lex();\n\t this.scanner.restoreState(state);\n\t return (next.type === 3 /* Identifier */) ||\n\t (next.type === 7 /* Punctuator */ && next.value === '[') ||\n\t (next.type === 7 /* Punctuator */ && next.value === '{') ||\n\t (next.type === 4 /* Keyword */ && next.value === 'let') ||\n\t (next.type === 4 /* Keyword */ && next.value === 'yield');\n\t };\n\t Parser.prototype.parseLexicalDeclaration = function (options) {\n\t var node = this.createNode();\n\t var kind = this.nextToken().value;\n\t assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const');\n\t var declarations = this.parseBindingList(kind, options);\n\t this.consumeSemicolon();\n\t return this.finalize(node, new Node.VariableDeclaration(declarations, kind));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns\n\t Parser.prototype.parseBindingRestElement = function (params, kind) {\n\t var node = this.createNode();\n\t this.expect('...');\n\t var arg = this.parsePattern(params, kind);\n\t return this.finalize(node, new Node.RestElement(arg));\n\t };\n\t Parser.prototype.parseArrayPattern = function (params, kind) {\n\t var node = this.createNode();\n\t this.expect('[');\n\t var elements = [];\n\t while (!this.match(']')) {\n\t if (this.match(',')) {\n\t this.nextToken();\n\t elements.push(null);\n\t }\n\t else {\n\t if (this.match('...')) {\n\t elements.push(this.parseBindingRestElement(params, kind));\n\t break;\n\t }\n\t else {\n\t elements.push(this.parsePatternWithDefault(params, kind));\n\t }\n\t if (!this.match(']')) {\n\t this.expect(',');\n\t }\n\t }\n\t }\n\t this.expect(']');\n\t return this.finalize(node, new Node.ArrayPattern(elements));\n\t };\n\t Parser.prototype.parsePropertyPattern = function (params, kind) {\n\t var node = this.createNode();\n\t var computed = false;\n\t var shorthand = false;\n\t var method = false;\n\t var key;\n\t var value;\n\t if (this.lookahead.type === 3 /* Identifier */) {\n\t var keyToken = this.lookahead;\n\t key = this.parseVariableIdentifier();\n\t var init = this.finalize(node, new Node.Identifier(keyToken.value));\n\t if (this.match('=')) {\n\t params.push(keyToken);\n\t shorthand = true;\n\t this.nextToken();\n\t var expr = this.parseAssignmentExpression();\n\t value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr));\n\t }\n\t else if (!this.match(':')) {\n\t params.push(keyToken);\n\t shorthand = true;\n\t value = init;\n\t }\n\t else {\n\t this.expect(':');\n\t value = this.parsePatternWithDefault(params, kind);\n\t }\n\t }\n\t else {\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t this.expect(':');\n\t value = this.parsePatternWithDefault(params, kind);\n\t }\n\t return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand));\n\t };\n\t Parser.prototype.parseObjectPattern = function (params, kind) {\n\t var node = this.createNode();\n\t var properties = [];\n\t this.expect('{');\n\t while (!this.match('}')) {\n\t properties.push(this.parsePropertyPattern(params, kind));\n\t if (!this.match('}')) {\n\t this.expect(',');\n\t }\n\t }\n\t this.expect('}');\n\t return this.finalize(node, new Node.ObjectPattern(properties));\n\t };\n\t Parser.prototype.parsePattern = function (params, kind) {\n\t var pattern;\n\t if (this.match('[')) {\n\t pattern = this.parseArrayPattern(params, kind);\n\t }\n\t else if (this.match('{')) {\n\t pattern = this.parseObjectPattern(params, kind);\n\t }\n\t else {\n\t if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) {\n\t this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding);\n\t }\n\t params.push(this.lookahead);\n\t pattern = this.parseVariableIdentifier(kind);\n\t }\n\t return pattern;\n\t };\n\t Parser.prototype.parsePatternWithDefault = function (params, kind) {\n\t var startToken = this.lookahead;\n\t var pattern = this.parsePattern(params, kind);\n\t if (this.match('=')) {\n\t this.nextToken();\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.allowYield = true;\n\t var right = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t this.context.allowYield = previousAllowYield;\n\t pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right));\n\t }\n\t return pattern;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-variable-statement\n\t Parser.prototype.parseVariableIdentifier = function (kind) {\n\t var node = this.createNode();\n\t var token = this.nextToken();\n\t if (token.type === 4 /* Keyword */ && token.value === 'yield') {\n\t if (this.context.strict) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);\n\t }\n\t else if (!this.context.allowYield) {\n\t this.throwUnexpectedToken(token);\n\t }\n\t }\n\t else if (token.type !== 3 /* Identifier */) {\n\t if (this.context.strict && token.type === 4 /* Keyword */ && this.scanner.isStrictModeReservedWord(token.value)) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);\n\t }\n\t else {\n\t if (this.context.strict || token.value !== 'let' || kind !== 'var') {\n\t this.throwUnexpectedToken(token);\n\t }\n\t }\n\t }\n\t else if ((this.context.isModule || this.context.await) && token.type === 3 /* Identifier */ && token.value === 'await') {\n\t this.tolerateUnexpectedToken(token);\n\t }\n\t return this.finalize(node, new Node.Identifier(token.value));\n\t };\n\t Parser.prototype.parseVariableDeclaration = function (options) {\n\t var node = this.createNode();\n\t var params = [];\n\t var id = this.parsePattern(params, 'var');\n\t if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {\n\t if (this.scanner.isRestrictedWord(id.name)) {\n\t this.tolerateError(messages_1.Messages.StrictVarName);\n\t }\n\t }\n\t var init = null;\n\t if (this.match('=')) {\n\t this.nextToken();\n\t init = this.isolateCoverGrammar(this.parseAssignmentExpression);\n\t }\n\t else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) {\n\t this.expect('=');\n\t }\n\t return this.finalize(node, new Node.VariableDeclarator(id, init));\n\t };\n\t Parser.prototype.parseVariableDeclarationList = function (options) {\n\t var opt = { inFor: options.inFor };\n\t var list = [];\n\t list.push(this.parseVariableDeclaration(opt));\n\t while (this.match(',')) {\n\t this.nextToken();\n\t list.push(this.parseVariableDeclaration(opt));\n\t }\n\t return list;\n\t };\n\t Parser.prototype.parseVariableStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('var');\n\t var declarations = this.parseVariableDeclarationList({ inFor: false });\n\t this.consumeSemicolon();\n\t return this.finalize(node, new Node.VariableDeclaration(declarations, 'var'));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-empty-statement\n\t Parser.prototype.parseEmptyStatement = function () {\n\t var node = this.createNode();\n\t this.expect(';');\n\t return this.finalize(node, new Node.EmptyStatement());\n\t };\n\t // https://tc39.github.io/ecma262/#sec-expression-statement\n\t Parser.prototype.parseExpressionStatement = function () {\n\t var node = this.createNode();\n\t var expr = this.parseExpression();\n\t this.consumeSemicolon();\n\t return this.finalize(node, new Node.ExpressionStatement(expr));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-if-statement\n\t Parser.prototype.parseIfClause = function () {\n\t if (this.context.strict && this.matchKeyword('function')) {\n\t this.tolerateError(messages_1.Messages.StrictFunction);\n\t }\n\t return this.parseStatement();\n\t };\n\t Parser.prototype.parseIfStatement = function () {\n\t var node = this.createNode();\n\t var consequent;\n\t var alternate = null;\n\t this.expectKeyword('if');\n\t this.expect('(');\n\t var test = this.parseExpression();\n\t if (!this.match(')') && this.config.tolerant) {\n\t this.tolerateUnexpectedToken(this.nextToken());\n\t consequent = this.finalize(this.createNode(), new Node.EmptyStatement());\n\t }\n\t else {\n\t this.expect(')');\n\t consequent = this.parseIfClause();\n\t if (this.matchKeyword('else')) {\n\t this.nextToken();\n\t alternate = this.parseIfClause();\n\t }\n\t }\n\t return this.finalize(node, new Node.IfStatement(test, consequent, alternate));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-do-while-statement\n\t Parser.prototype.parseDoWhileStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('do');\n\t var previousInIteration = this.context.inIteration;\n\t this.context.inIteration = true;\n\t var body = this.parseStatement();\n\t this.context.inIteration = previousInIteration;\n\t this.expectKeyword('while');\n\t this.expect('(');\n\t var test = this.parseExpression();\n\t if (!this.match(')') && this.config.tolerant) {\n\t this.tolerateUnexpectedToken(this.nextToken());\n\t }\n\t else {\n\t this.expect(')');\n\t if (this.match(';')) {\n\t this.nextToken();\n\t }\n\t }\n\t return this.finalize(node, new Node.DoWhileStatement(body, test));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-while-statement\n\t Parser.prototype.parseWhileStatement = function () {\n\t var node = this.createNode();\n\t var body;\n\t this.expectKeyword('while');\n\t this.expect('(');\n\t var test = this.parseExpression();\n\t if (!this.match(')') && this.config.tolerant) {\n\t this.tolerateUnexpectedToken(this.nextToken());\n\t body = this.finalize(this.createNode(), new Node.EmptyStatement());\n\t }\n\t else {\n\t this.expect(')');\n\t var previousInIteration = this.context.inIteration;\n\t this.context.inIteration = true;\n\t body = this.parseStatement();\n\t this.context.inIteration = previousInIteration;\n\t }\n\t return this.finalize(node, new Node.WhileStatement(test, body));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-for-statement\n\t // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements\n\t Parser.prototype.parseForStatement = function () {\n\t var init = null;\n\t var test = null;\n\t var update = null;\n\t var forIn = true;\n\t var left, right;\n\t var node = this.createNode();\n\t this.expectKeyword('for');\n\t this.expect('(');\n\t if (this.match(';')) {\n\t this.nextToken();\n\t }\n\t else {\n\t if (this.matchKeyword('var')) {\n\t init = this.createNode();\n\t this.nextToken();\n\t var previousAllowIn = this.context.allowIn;\n\t this.context.allowIn = false;\n\t var declarations = this.parseVariableDeclarationList({ inFor: true });\n\t this.context.allowIn = previousAllowIn;\n\t if (declarations.length === 1 && this.matchKeyword('in')) {\n\t var decl = declarations[0];\n\t if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) {\n\t this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in');\n\t }\n\t init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));\n\t this.nextToken();\n\t left = init;\n\t right = this.parseExpression();\n\t init = null;\n\t }\n\t else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {\n\t init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));\n\t this.nextToken();\n\t left = init;\n\t right = this.parseAssignmentExpression();\n\t init = null;\n\t forIn = false;\n\t }\n\t else {\n\t init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));\n\t this.expect(';');\n\t }\n\t }\n\t else if (this.matchKeyword('const') || this.matchKeyword('let')) {\n\t init = this.createNode();\n\t var kind = this.nextToken().value;\n\t if (!this.context.strict && this.lookahead.value === 'in') {\n\t init = this.finalize(init, new Node.Identifier(kind));\n\t this.nextToken();\n\t left = init;\n\t right = this.parseExpression();\n\t init = null;\n\t }\n\t else {\n\t var previousAllowIn = this.context.allowIn;\n\t this.context.allowIn = false;\n\t var declarations = this.parseBindingList(kind, { inFor: true });\n\t this.context.allowIn = previousAllowIn;\n\t if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) {\n\t init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));\n\t this.nextToken();\n\t left = init;\n\t right = this.parseExpression();\n\t init = null;\n\t }\n\t else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {\n\t init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));\n\t this.nextToken();\n\t left = init;\n\t right = this.parseAssignmentExpression();\n\t init = null;\n\t forIn = false;\n\t }\n\t else {\n\t this.consumeSemicolon();\n\t init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));\n\t }\n\t }\n\t }\n\t else {\n\t var initStartToken = this.lookahead;\n\t var previousAllowIn = this.context.allowIn;\n\t this.context.allowIn = false;\n\t init = this.inheritCoverGrammar(this.parseAssignmentExpression);\n\t this.context.allowIn = previousAllowIn;\n\t if (this.matchKeyword('in')) {\n\t if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {\n\t this.tolerateError(messages_1.Messages.InvalidLHSInForIn);\n\t }\n\t this.nextToken();\n\t this.reinterpretExpressionAsPattern(init);\n\t left = init;\n\t right = this.parseExpression();\n\t init = null;\n\t }\n\t else if (this.matchContextualKeyword('of')) {\n\t if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {\n\t this.tolerateError(messages_1.Messages.InvalidLHSInForLoop);\n\t }\n\t this.nextToken();\n\t this.reinterpretExpressionAsPattern(init);\n\t left = init;\n\t right = this.parseAssignmentExpression();\n\t init = null;\n\t forIn = false;\n\t }\n\t else {\n\t if (this.match(',')) {\n\t var initSeq = [init];\n\t while (this.match(',')) {\n\t this.nextToken();\n\t initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));\n\t }\n\t init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq));\n\t }\n\t this.expect(';');\n\t }\n\t }\n\t }\n\t if (typeof left === 'undefined') {\n\t if (!this.match(';')) {\n\t test = this.parseExpression();\n\t }\n\t this.expect(';');\n\t if (!this.match(')')) {\n\t update = this.parseExpression();\n\t }\n\t }\n\t var body;\n\t if (!this.match(')') && this.config.tolerant) {\n\t this.tolerateUnexpectedToken(this.nextToken());\n\t body = this.finalize(this.createNode(), new Node.EmptyStatement());\n\t }\n\t else {\n\t this.expect(')');\n\t var previousInIteration = this.context.inIteration;\n\t this.context.inIteration = true;\n\t body = this.isolateCoverGrammar(this.parseStatement);\n\t this.context.inIteration = previousInIteration;\n\t }\n\t return (typeof left === 'undefined') ?\n\t this.finalize(node, new Node.ForStatement(init, test, update, body)) :\n\t forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) :\n\t this.finalize(node, new Node.ForOfStatement(left, right, body));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-continue-statement\n\t Parser.prototype.parseContinueStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('continue');\n\t var label = null;\n\t if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {\n\t var id = this.parseVariableIdentifier();\n\t label = id;\n\t var key = '$' + id.name;\n\t if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {\n\t this.throwError(messages_1.Messages.UnknownLabel, id.name);\n\t }\n\t }\n\t this.consumeSemicolon();\n\t if (label === null && !this.context.inIteration) {\n\t this.throwError(messages_1.Messages.IllegalContinue);\n\t }\n\t return this.finalize(node, new Node.ContinueStatement(label));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-break-statement\n\t Parser.prototype.parseBreakStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('break');\n\t var label = null;\n\t if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {\n\t var id = this.parseVariableIdentifier();\n\t var key = '$' + id.name;\n\t if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {\n\t this.throwError(messages_1.Messages.UnknownLabel, id.name);\n\t }\n\t label = id;\n\t }\n\t this.consumeSemicolon();\n\t if (label === null && !this.context.inIteration && !this.context.inSwitch) {\n\t this.throwError(messages_1.Messages.IllegalBreak);\n\t }\n\t return this.finalize(node, new Node.BreakStatement(label));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-return-statement\n\t Parser.prototype.parseReturnStatement = function () {\n\t if (!this.context.inFunctionBody) {\n\t this.tolerateError(messages_1.Messages.IllegalReturn);\n\t }\n\t var node = this.createNode();\n\t this.expectKeyword('return');\n\t var hasArgument = (!this.match(';') && !this.match('}') &&\n\t !this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */) ||\n\t this.lookahead.type === 8 /* StringLiteral */ ||\n\t this.lookahead.type === 10 /* Template */;\n\t var argument = hasArgument ? this.parseExpression() : null;\n\t this.consumeSemicolon();\n\t return this.finalize(node, new Node.ReturnStatement(argument));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-with-statement\n\t Parser.prototype.parseWithStatement = function () {\n\t if (this.context.strict) {\n\t this.tolerateError(messages_1.Messages.StrictModeWith);\n\t }\n\t var node = this.createNode();\n\t var body;\n\t this.expectKeyword('with');\n\t this.expect('(');\n\t var object = this.parseExpression();\n\t if (!this.match(')') && this.config.tolerant) {\n\t this.tolerateUnexpectedToken(this.nextToken());\n\t body = this.finalize(this.createNode(), new Node.EmptyStatement());\n\t }\n\t else {\n\t this.expect(')');\n\t body = this.parseStatement();\n\t }\n\t return this.finalize(node, new Node.WithStatement(object, body));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-switch-statement\n\t Parser.prototype.parseSwitchCase = function () {\n\t var node = this.createNode();\n\t var test;\n\t if (this.matchKeyword('default')) {\n\t this.nextToken();\n\t test = null;\n\t }\n\t else {\n\t this.expectKeyword('case');\n\t test = this.parseExpression();\n\t }\n\t this.expect(':');\n\t var consequent = [];\n\t while (true) {\n\t if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) {\n\t break;\n\t }\n\t consequent.push(this.parseStatementListItem());\n\t }\n\t return this.finalize(node, new Node.SwitchCase(test, consequent));\n\t };\n\t Parser.prototype.parseSwitchStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('switch');\n\t this.expect('(');\n\t var discriminant = this.parseExpression();\n\t this.expect(')');\n\t var previousInSwitch = this.context.inSwitch;\n\t this.context.inSwitch = true;\n\t var cases = [];\n\t var defaultFound = false;\n\t this.expect('{');\n\t while (true) {\n\t if (this.match('}')) {\n\t break;\n\t }\n\t var clause = this.parseSwitchCase();\n\t if (clause.test === null) {\n\t if (defaultFound) {\n\t this.throwError(messages_1.Messages.MultipleDefaultsInSwitch);\n\t }\n\t defaultFound = true;\n\t }\n\t cases.push(clause);\n\t }\n\t this.expect('}');\n\t this.context.inSwitch = previousInSwitch;\n\t return this.finalize(node, new Node.SwitchStatement(discriminant, cases));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-labelled-statements\n\t Parser.prototype.parseLabelledStatement = function () {\n\t var node = this.createNode();\n\t var expr = this.parseExpression();\n\t var statement;\n\t if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) {\n\t this.nextToken();\n\t var id = expr;\n\t var key = '$' + id.name;\n\t if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {\n\t this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name);\n\t }\n\t this.context.labelSet[key] = true;\n\t var body = void 0;\n\t if (this.matchKeyword('class')) {\n\t this.tolerateUnexpectedToken(this.lookahead);\n\t body = this.parseClassDeclaration();\n\t }\n\t else if (this.matchKeyword('function')) {\n\t var token = this.lookahead;\n\t var declaration = this.parseFunctionDeclaration();\n\t if (this.context.strict) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction);\n\t }\n\t else if (declaration.generator) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext);\n\t }\n\t body = declaration;\n\t }\n\t else {\n\t body = this.parseStatement();\n\t }\n\t delete this.context.labelSet[key];\n\t statement = new Node.LabeledStatement(id, body);\n\t }\n\t else {\n\t this.consumeSemicolon();\n\t statement = new Node.ExpressionStatement(expr);\n\t }\n\t return this.finalize(node, statement);\n\t };\n\t // https://tc39.github.io/ecma262/#sec-throw-statement\n\t Parser.prototype.parseThrowStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('throw');\n\t if (this.hasLineTerminator) {\n\t this.throwError(messages_1.Messages.NewlineAfterThrow);\n\t }\n\t var argument = this.parseExpression();\n\t this.consumeSemicolon();\n\t return this.finalize(node, new Node.ThrowStatement(argument));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-try-statement\n\t Parser.prototype.parseCatchClause = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('catch');\n\t this.expect('(');\n\t if (this.match(')')) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t var params = [];\n\t var param = this.parsePattern(params);\n\t var paramMap = {};\n\t for (var i = 0; i < params.length; i++) {\n\t var key = '$' + params[i].value;\n\t if (Object.prototype.hasOwnProperty.call(paramMap, key)) {\n\t this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value);\n\t }\n\t paramMap[key] = true;\n\t }\n\t if (this.context.strict && param.type === syntax_1.Syntax.Identifier) {\n\t if (this.scanner.isRestrictedWord(param.name)) {\n\t this.tolerateError(messages_1.Messages.StrictCatchVariable);\n\t }\n\t }\n\t this.expect(')');\n\t var body = this.parseBlock();\n\t return this.finalize(node, new Node.CatchClause(param, body));\n\t };\n\t Parser.prototype.parseFinallyClause = function () {\n\t this.expectKeyword('finally');\n\t return this.parseBlock();\n\t };\n\t Parser.prototype.parseTryStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('try');\n\t var block = this.parseBlock();\n\t var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null;\n\t var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null;\n\t if (!handler && !finalizer) {\n\t this.throwError(messages_1.Messages.NoCatchOrFinally);\n\t }\n\t return this.finalize(node, new Node.TryStatement(block, handler, finalizer));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-debugger-statement\n\t Parser.prototype.parseDebuggerStatement = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('debugger');\n\t this.consumeSemicolon();\n\t return this.finalize(node, new Node.DebuggerStatement());\n\t };\n\t // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations\n\t Parser.prototype.parseStatement = function () {\n\t var statement;\n\t switch (this.lookahead.type) {\n\t case 1 /* BooleanLiteral */:\n\t case 5 /* NullLiteral */:\n\t case 6 /* NumericLiteral */:\n\t case 8 /* StringLiteral */:\n\t case 10 /* Template */:\n\t case 9 /* RegularExpression */:\n\t statement = this.parseExpressionStatement();\n\t break;\n\t case 7 /* Punctuator */:\n\t var value = this.lookahead.value;\n\t if (value === '{') {\n\t statement = this.parseBlock();\n\t }\n\t else if (value === '(') {\n\t statement = this.parseExpressionStatement();\n\t }\n\t else if (value === ';') {\n\t statement = this.parseEmptyStatement();\n\t }\n\t else {\n\t statement = this.parseExpressionStatement();\n\t }\n\t break;\n\t case 3 /* Identifier */:\n\t statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement();\n\t break;\n\t case 4 /* Keyword */:\n\t switch (this.lookahead.value) {\n\t case 'break':\n\t statement = this.parseBreakStatement();\n\t break;\n\t case 'continue':\n\t statement = this.parseContinueStatement();\n\t break;\n\t case 'debugger':\n\t statement = this.parseDebuggerStatement();\n\t break;\n\t case 'do':\n\t statement = this.parseDoWhileStatement();\n\t break;\n\t case 'for':\n\t statement = this.parseForStatement();\n\t break;\n\t case 'function':\n\t statement = this.parseFunctionDeclaration();\n\t break;\n\t case 'if':\n\t statement = this.parseIfStatement();\n\t break;\n\t case 'return':\n\t statement = this.parseReturnStatement();\n\t break;\n\t case 'switch':\n\t statement = this.parseSwitchStatement();\n\t break;\n\t case 'throw':\n\t statement = this.parseThrowStatement();\n\t break;\n\t case 'try':\n\t statement = this.parseTryStatement();\n\t break;\n\t case 'var':\n\t statement = this.parseVariableStatement();\n\t break;\n\t case 'while':\n\t statement = this.parseWhileStatement();\n\t break;\n\t case 'with':\n\t statement = this.parseWithStatement();\n\t break;\n\t default:\n\t statement = this.parseExpressionStatement();\n\t break;\n\t }\n\t break;\n\t default:\n\t statement = this.throwUnexpectedToken(this.lookahead);\n\t }\n\t return statement;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-function-definitions\n\t Parser.prototype.parseFunctionSourceElements = function () {\n\t var node = this.createNode();\n\t this.expect('{');\n\t var body = this.parseDirectivePrologues();\n\t var previousLabelSet = this.context.labelSet;\n\t var previousInIteration = this.context.inIteration;\n\t var previousInSwitch = this.context.inSwitch;\n\t var previousInFunctionBody = this.context.inFunctionBody;\n\t this.context.labelSet = {};\n\t this.context.inIteration = false;\n\t this.context.inSwitch = false;\n\t this.context.inFunctionBody = true;\n\t while (this.lookahead.type !== 2 /* EOF */) {\n\t if (this.match('}')) {\n\t break;\n\t }\n\t body.push(this.parseStatementListItem());\n\t }\n\t this.expect('}');\n\t this.context.labelSet = previousLabelSet;\n\t this.context.inIteration = previousInIteration;\n\t this.context.inSwitch = previousInSwitch;\n\t this.context.inFunctionBody = previousInFunctionBody;\n\t return this.finalize(node, new Node.BlockStatement(body));\n\t };\n\t Parser.prototype.validateParam = function (options, param, name) {\n\t var key = '$' + name;\n\t if (this.context.strict) {\n\t if (this.scanner.isRestrictedWord(name)) {\n\t options.stricted = param;\n\t options.message = messages_1.Messages.StrictParamName;\n\t }\n\t if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {\n\t options.stricted = param;\n\t options.message = messages_1.Messages.StrictParamDupe;\n\t }\n\t }\n\t else if (!options.firstRestricted) {\n\t if (this.scanner.isRestrictedWord(name)) {\n\t options.firstRestricted = param;\n\t options.message = messages_1.Messages.StrictParamName;\n\t }\n\t else if (this.scanner.isStrictModeReservedWord(name)) {\n\t options.firstRestricted = param;\n\t options.message = messages_1.Messages.StrictReservedWord;\n\t }\n\t else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {\n\t options.stricted = param;\n\t options.message = messages_1.Messages.StrictParamDupe;\n\t }\n\t }\n\t /* istanbul ignore next */\n\t if (typeof Object.defineProperty === 'function') {\n\t Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true });\n\t }\n\t else {\n\t options.paramSet[key] = true;\n\t }\n\t };\n\t Parser.prototype.parseRestElement = function (params) {\n\t var node = this.createNode();\n\t this.expect('...');\n\t var arg = this.parsePattern(params);\n\t if (this.match('=')) {\n\t this.throwError(messages_1.Messages.DefaultRestParameter);\n\t }\n\t if (!this.match(')')) {\n\t this.throwError(messages_1.Messages.ParameterAfterRestParameter);\n\t }\n\t return this.finalize(node, new Node.RestElement(arg));\n\t };\n\t Parser.prototype.parseFormalParameter = function (options) {\n\t var params = [];\n\t var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params);\n\t for (var i = 0; i < params.length; i++) {\n\t this.validateParam(options, params[i], params[i].value);\n\t }\n\t options.simple = options.simple && (param instanceof Node.Identifier);\n\t options.params.push(param);\n\t };\n\t Parser.prototype.parseFormalParameters = function (firstRestricted) {\n\t var options;\n\t options = {\n\t simple: true,\n\t params: [],\n\t firstRestricted: firstRestricted\n\t };\n\t this.expect('(');\n\t if (!this.match(')')) {\n\t options.paramSet = {};\n\t while (this.lookahead.type !== 2 /* EOF */) {\n\t this.parseFormalParameter(options);\n\t if (this.match(')')) {\n\t break;\n\t }\n\t this.expect(',');\n\t if (this.match(')')) {\n\t break;\n\t }\n\t }\n\t }\n\t this.expect(')');\n\t return {\n\t simple: options.simple,\n\t params: options.params,\n\t stricted: options.stricted,\n\t firstRestricted: options.firstRestricted,\n\t message: options.message\n\t };\n\t };\n\t Parser.prototype.matchAsyncFunction = function () {\n\t var match = this.matchContextualKeyword('async');\n\t if (match) {\n\t var state = this.scanner.saveState();\n\t this.scanner.scanComments();\n\t var next = this.scanner.lex();\n\t this.scanner.restoreState(state);\n\t match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function');\n\t }\n\t return match;\n\t };\n\t Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) {\n\t var node = this.createNode();\n\t var isAsync = this.matchContextualKeyword('async');\n\t if (isAsync) {\n\t this.nextToken();\n\t }\n\t this.expectKeyword('function');\n\t var isGenerator = isAsync ? false : this.match('*');\n\t if (isGenerator) {\n\t this.nextToken();\n\t }\n\t var message;\n\t var id = null;\n\t var firstRestricted = null;\n\t if (!identifierIsOptional || !this.match('(')) {\n\t var token = this.lookahead;\n\t id = this.parseVariableIdentifier();\n\t if (this.context.strict) {\n\t if (this.scanner.isRestrictedWord(token.value)) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);\n\t }\n\t }\n\t else {\n\t if (this.scanner.isRestrictedWord(token.value)) {\n\t firstRestricted = token;\n\t message = messages_1.Messages.StrictFunctionName;\n\t }\n\t else if (this.scanner.isStrictModeReservedWord(token.value)) {\n\t firstRestricted = token;\n\t message = messages_1.Messages.StrictReservedWord;\n\t }\n\t }\n\t }\n\t var previousAllowAwait = this.context.await;\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.await = isAsync;\n\t this.context.allowYield = !isGenerator;\n\t var formalParameters = this.parseFormalParameters(firstRestricted);\n\t var params = formalParameters.params;\n\t var stricted = formalParameters.stricted;\n\t firstRestricted = formalParameters.firstRestricted;\n\t if (formalParameters.message) {\n\t message = formalParameters.message;\n\t }\n\t var previousStrict = this.context.strict;\n\t var previousAllowStrictDirective = this.context.allowStrictDirective;\n\t this.context.allowStrictDirective = formalParameters.simple;\n\t var body = this.parseFunctionSourceElements();\n\t if (this.context.strict && firstRestricted) {\n\t this.throwUnexpectedToken(firstRestricted, message);\n\t }\n\t if (this.context.strict && stricted) {\n\t this.tolerateUnexpectedToken(stricted, message);\n\t }\n\t this.context.strict = previousStrict;\n\t this.context.allowStrictDirective = previousAllowStrictDirective;\n\t this.context.await = previousAllowAwait;\n\t this.context.allowYield = previousAllowYield;\n\t return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) :\n\t this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator));\n\t };\n\t Parser.prototype.parseFunctionExpression = function () {\n\t var node = this.createNode();\n\t var isAsync = this.matchContextualKeyword('async');\n\t if (isAsync) {\n\t this.nextToken();\n\t }\n\t this.expectKeyword('function');\n\t var isGenerator = isAsync ? false : this.match('*');\n\t if (isGenerator) {\n\t this.nextToken();\n\t }\n\t var message;\n\t var id = null;\n\t var firstRestricted;\n\t var previousAllowAwait = this.context.await;\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.await = isAsync;\n\t this.context.allowYield = !isGenerator;\n\t if (!this.match('(')) {\n\t var token = this.lookahead;\n\t id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier();\n\t if (this.context.strict) {\n\t if (this.scanner.isRestrictedWord(token.value)) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);\n\t }\n\t }\n\t else {\n\t if (this.scanner.isRestrictedWord(token.value)) {\n\t firstRestricted = token;\n\t message = messages_1.Messages.StrictFunctionName;\n\t }\n\t else if (this.scanner.isStrictModeReservedWord(token.value)) {\n\t firstRestricted = token;\n\t message = messages_1.Messages.StrictReservedWord;\n\t }\n\t }\n\t }\n\t var formalParameters = this.parseFormalParameters(firstRestricted);\n\t var params = formalParameters.params;\n\t var stricted = formalParameters.stricted;\n\t firstRestricted = formalParameters.firstRestricted;\n\t if (formalParameters.message) {\n\t message = formalParameters.message;\n\t }\n\t var previousStrict = this.context.strict;\n\t var previousAllowStrictDirective = this.context.allowStrictDirective;\n\t this.context.allowStrictDirective = formalParameters.simple;\n\t var body = this.parseFunctionSourceElements();\n\t if (this.context.strict && firstRestricted) {\n\t this.throwUnexpectedToken(firstRestricted, message);\n\t }\n\t if (this.context.strict && stricted) {\n\t this.tolerateUnexpectedToken(stricted, message);\n\t }\n\t this.context.strict = previousStrict;\n\t this.context.allowStrictDirective = previousAllowStrictDirective;\n\t this.context.await = previousAllowAwait;\n\t this.context.allowYield = previousAllowYield;\n\t return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) :\n\t this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive\n\t Parser.prototype.parseDirective = function () {\n\t var token = this.lookahead;\n\t var node = this.createNode();\n\t var expr = this.parseExpression();\n\t var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null;\n\t this.consumeSemicolon();\n\t return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr));\n\t };\n\t Parser.prototype.parseDirectivePrologues = function () {\n\t var firstRestricted = null;\n\t var body = [];\n\t while (true) {\n\t var token = this.lookahead;\n\t if (token.type !== 8 /* StringLiteral */) {\n\t break;\n\t }\n\t var statement = this.parseDirective();\n\t body.push(statement);\n\t var directive = statement.directive;\n\t if (typeof directive !== 'string') {\n\t break;\n\t }\n\t if (directive === 'use strict') {\n\t this.context.strict = true;\n\t if (firstRestricted) {\n\t this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral);\n\t }\n\t if (!this.context.allowStrictDirective) {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective);\n\t }\n\t }\n\t else {\n\t if (!firstRestricted && token.octal) {\n\t firstRestricted = token;\n\t }\n\t }\n\t }\n\t return body;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-method-definitions\n\t Parser.prototype.qualifiedPropertyName = function (token) {\n\t switch (token.type) {\n\t case 3 /* Identifier */:\n\t case 8 /* StringLiteral */:\n\t case 1 /* BooleanLiteral */:\n\t case 5 /* NullLiteral */:\n\t case 6 /* NumericLiteral */:\n\t case 4 /* Keyword */:\n\t return true;\n\t case 7 /* Punctuator */:\n\t return token.value === '[';\n\t default:\n\t break;\n\t }\n\t return false;\n\t };\n\t Parser.prototype.parseGetterMethod = function () {\n\t var node = this.createNode();\n\t var isGenerator = false;\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.allowYield = !isGenerator;\n\t var formalParameters = this.parseFormalParameters();\n\t if (formalParameters.params.length > 0) {\n\t this.tolerateError(messages_1.Messages.BadGetterArity);\n\t }\n\t var method = this.parsePropertyMethod(formalParameters);\n\t this.context.allowYield = previousAllowYield;\n\t return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));\n\t };\n\t Parser.prototype.parseSetterMethod = function () {\n\t var node = this.createNode();\n\t var isGenerator = false;\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.allowYield = !isGenerator;\n\t var formalParameters = this.parseFormalParameters();\n\t if (formalParameters.params.length !== 1) {\n\t this.tolerateError(messages_1.Messages.BadSetterArity);\n\t }\n\t else if (formalParameters.params[0] instanceof Node.RestElement) {\n\t this.tolerateError(messages_1.Messages.BadSetterRestParameter);\n\t }\n\t var method = this.parsePropertyMethod(formalParameters);\n\t this.context.allowYield = previousAllowYield;\n\t return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));\n\t };\n\t Parser.prototype.parseGeneratorMethod = function () {\n\t var node = this.createNode();\n\t var isGenerator = true;\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.allowYield = true;\n\t var params = this.parseFormalParameters();\n\t this.context.allowYield = false;\n\t var method = this.parsePropertyMethod(params);\n\t this.context.allowYield = previousAllowYield;\n\t return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-generator-function-definitions\n\t Parser.prototype.isStartOfExpression = function () {\n\t var start = true;\n\t var value = this.lookahead.value;\n\t switch (this.lookahead.type) {\n\t case 7 /* Punctuator */:\n\t start = (value === '[') || (value === '(') || (value === '{') ||\n\t (value === '+') || (value === '-') ||\n\t (value === '!') || (value === '~') ||\n\t (value === '++') || (value === '--') ||\n\t (value === '/') || (value === '/='); // regular expression literal\n\t break;\n\t case 4 /* Keyword */:\n\t start = (value === 'class') || (value === 'delete') ||\n\t (value === 'function') || (value === 'let') || (value === 'new') ||\n\t (value === 'super') || (value === 'this') || (value === 'typeof') ||\n\t (value === 'void') || (value === 'yield');\n\t break;\n\t default:\n\t break;\n\t }\n\t return start;\n\t };\n\t Parser.prototype.parseYieldExpression = function () {\n\t var node = this.createNode();\n\t this.expectKeyword('yield');\n\t var argument = null;\n\t var delegate = false;\n\t if (!this.hasLineTerminator) {\n\t var previousAllowYield = this.context.allowYield;\n\t this.context.allowYield = false;\n\t delegate = this.match('*');\n\t if (delegate) {\n\t this.nextToken();\n\t argument = this.parseAssignmentExpression();\n\t }\n\t else if (this.isStartOfExpression()) {\n\t argument = this.parseAssignmentExpression();\n\t }\n\t this.context.allowYield = previousAllowYield;\n\t }\n\t return this.finalize(node, new Node.YieldExpression(argument, delegate));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-class-definitions\n\t Parser.prototype.parseClassElement = function (hasConstructor) {\n\t var token = this.lookahead;\n\t var node = this.createNode();\n\t var kind = '';\n\t var key = null;\n\t var value = null;\n\t var computed = false;\n\t var method = false;\n\t var isStatic = false;\n\t var isAsync = false;\n\t if (this.match('*')) {\n\t this.nextToken();\n\t }\n\t else {\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t var id = key;\n\t if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) {\n\t token = this.lookahead;\n\t isStatic = true;\n\t computed = this.match('[');\n\t if (this.match('*')) {\n\t this.nextToken();\n\t }\n\t else {\n\t key = this.parseObjectPropertyKey();\n\t }\n\t }\n\t if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) {\n\t var punctuator = this.lookahead.value;\n\t if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') {\n\t isAsync = true;\n\t token = this.lookahead;\n\t key = this.parseObjectPropertyKey();\n\t if (token.type === 3 /* Identifier */ && token.value === 'constructor') {\n\t this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync);\n\t }\n\t }\n\t }\n\t }\n\t var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);\n\t if (token.type === 3 /* Identifier */) {\n\t if (token.value === 'get' && lookaheadPropertyKey) {\n\t kind = 'get';\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t this.context.allowYield = false;\n\t value = this.parseGetterMethod();\n\t }\n\t else if (token.value === 'set' && lookaheadPropertyKey) {\n\t kind = 'set';\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t value = this.parseSetterMethod();\n\t }\n\t }\n\t else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {\n\t kind = 'init';\n\t computed = this.match('[');\n\t key = this.parseObjectPropertyKey();\n\t value = this.parseGeneratorMethod();\n\t method = true;\n\t }\n\t if (!kind && key && this.match('(')) {\n\t kind = 'init';\n\t value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();\n\t method = true;\n\t }\n\t if (!kind) {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t if (kind === 'init') {\n\t kind = 'method';\n\t }\n\t if (!computed) {\n\t if (isStatic && this.isPropertyKey(key, 'prototype')) {\n\t this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype);\n\t }\n\t if (!isStatic && this.isPropertyKey(key, 'constructor')) {\n\t if (kind !== 'method' || !method || (value && value.generator)) {\n\t this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod);\n\t }\n\t if (hasConstructor.value) {\n\t this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor);\n\t }\n\t else {\n\t hasConstructor.value = true;\n\t }\n\t kind = 'constructor';\n\t }\n\t }\n\t return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic));\n\t };\n\t Parser.prototype.parseClassElementList = function () {\n\t var body = [];\n\t var hasConstructor = { value: false };\n\t this.expect('{');\n\t while (!this.match('}')) {\n\t if (this.match(';')) {\n\t this.nextToken();\n\t }\n\t else {\n\t body.push(this.parseClassElement(hasConstructor));\n\t }\n\t }\n\t this.expect('}');\n\t return body;\n\t };\n\t Parser.prototype.parseClassBody = function () {\n\t var node = this.createNode();\n\t var elementList = this.parseClassElementList();\n\t return this.finalize(node, new Node.ClassBody(elementList));\n\t };\n\t Parser.prototype.parseClassDeclaration = function (identifierIsOptional) {\n\t var node = this.createNode();\n\t var previousStrict = this.context.strict;\n\t this.context.strict = true;\n\t this.expectKeyword('class');\n\t var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier();\n\t var superClass = null;\n\t if (this.matchKeyword('extends')) {\n\t this.nextToken();\n\t superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);\n\t }\n\t var classBody = this.parseClassBody();\n\t this.context.strict = previousStrict;\n\t return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody));\n\t };\n\t Parser.prototype.parseClassExpression = function () {\n\t var node = this.createNode();\n\t var previousStrict = this.context.strict;\n\t this.context.strict = true;\n\t this.expectKeyword('class');\n\t var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null;\n\t var superClass = null;\n\t if (this.matchKeyword('extends')) {\n\t this.nextToken();\n\t superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);\n\t }\n\t var classBody = this.parseClassBody();\n\t this.context.strict = previousStrict;\n\t return this.finalize(node, new Node.ClassExpression(id, superClass, classBody));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-scripts\n\t // https://tc39.github.io/ecma262/#sec-modules\n\t Parser.prototype.parseModule = function () {\n\t this.context.strict = true;\n\t this.context.isModule = true;\n\t this.scanner.isModule = true;\n\t var node = this.createNode();\n\t var body = this.parseDirectivePrologues();\n\t while (this.lookahead.type !== 2 /* EOF */) {\n\t body.push(this.parseStatementListItem());\n\t }\n\t return this.finalize(node, new Node.Module(body));\n\t };\n\t Parser.prototype.parseScript = function () {\n\t var node = this.createNode();\n\t var body = this.parseDirectivePrologues();\n\t while (this.lookahead.type !== 2 /* EOF */) {\n\t body.push(this.parseStatementListItem());\n\t }\n\t return this.finalize(node, new Node.Script(body));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-imports\n\t Parser.prototype.parseModuleSpecifier = function () {\n\t var node = this.createNode();\n\t if (this.lookahead.type !== 8 /* StringLiteral */) {\n\t this.throwError(messages_1.Messages.InvalidModuleSpecifier);\n\t }\n\t var token = this.nextToken();\n\t var raw = this.getTokenRaw(token);\n\t return this.finalize(node, new Node.Literal(token.value, raw));\n\t };\n\t // import {<foo as bar>} ...;\n\t Parser.prototype.parseImportSpecifier = function () {\n\t var node = this.createNode();\n\t var imported;\n\t var local;\n\t if (this.lookahead.type === 3 /* Identifier */) {\n\t imported = this.parseVariableIdentifier();\n\t local = imported;\n\t if (this.matchContextualKeyword('as')) {\n\t this.nextToken();\n\t local = this.parseVariableIdentifier();\n\t }\n\t }\n\t else {\n\t imported = this.parseIdentifierName();\n\t local = imported;\n\t if (this.matchContextualKeyword('as')) {\n\t this.nextToken();\n\t local = this.parseVariableIdentifier();\n\t }\n\t else {\n\t this.throwUnexpectedToken(this.nextToken());\n\t }\n\t }\n\t return this.finalize(node, new Node.ImportSpecifier(local, imported));\n\t };\n\t // {foo, bar as bas}\n\t Parser.prototype.parseNamedImports = function () {\n\t this.expect('{');\n\t var specifiers = [];\n\t while (!this.match('}')) {\n\t specifiers.push(this.parseImportSpecifier());\n\t if (!this.match('}')) {\n\t this.expect(',');\n\t }\n\t }\n\t this.expect('}');\n\t return specifiers;\n\t };\n\t // import <foo> ...;\n\t Parser.prototype.parseImportDefaultSpecifier = function () {\n\t var node = this.createNode();\n\t var local = this.parseIdentifierName();\n\t return this.finalize(node, new Node.ImportDefaultSpecifier(local));\n\t };\n\t // import <* as foo> ...;\n\t Parser.prototype.parseImportNamespaceSpecifier = function () {\n\t var node = this.createNode();\n\t this.expect('*');\n\t if (!this.matchContextualKeyword('as')) {\n\t this.throwError(messages_1.Messages.NoAsAfterImportNamespace);\n\t }\n\t this.nextToken();\n\t var local = this.parseIdentifierName();\n\t return this.finalize(node, new Node.ImportNamespaceSpecifier(local));\n\t };\n\t Parser.prototype.parseImportDeclaration = function () {\n\t if (this.context.inFunctionBody) {\n\t this.throwError(messages_1.Messages.IllegalImportDeclaration);\n\t }\n\t var node = this.createNode();\n\t this.expectKeyword('import');\n\t var src;\n\t var specifiers = [];\n\t if (this.lookahead.type === 8 /* StringLiteral */) {\n\t // import 'foo';\n\t src = this.parseModuleSpecifier();\n\t }\n\t else {\n\t if (this.match('{')) {\n\t // import {bar}\n\t specifiers = specifiers.concat(this.parseNamedImports());\n\t }\n\t else if (this.match('*')) {\n\t // import * as foo\n\t specifiers.push(this.parseImportNamespaceSpecifier());\n\t }\n\t else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) {\n\t // import foo\n\t specifiers.push(this.parseImportDefaultSpecifier());\n\t if (this.match(',')) {\n\t this.nextToken();\n\t if (this.match('*')) {\n\t // import foo, * as foo\n\t specifiers.push(this.parseImportNamespaceSpecifier());\n\t }\n\t else if (this.match('{')) {\n\t // import foo, {bar}\n\t specifiers = specifiers.concat(this.parseNamedImports());\n\t }\n\t else {\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t }\n\t }\n\t else {\n\t this.throwUnexpectedToken(this.nextToken());\n\t }\n\t if (!this.matchContextualKeyword('from')) {\n\t var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;\n\t this.throwError(message, this.lookahead.value);\n\t }\n\t this.nextToken();\n\t src = this.parseModuleSpecifier();\n\t }\n\t this.consumeSemicolon();\n\t return this.finalize(node, new Node.ImportDeclaration(specifiers, src));\n\t };\n\t // https://tc39.github.io/ecma262/#sec-exports\n\t Parser.prototype.parseExportSpecifier = function () {\n\t var node = this.createNode();\n\t var local = this.parseIdentifierName();\n\t var exported = local;\n\t if (this.matchContextualKeyword('as')) {\n\t this.nextToken();\n\t exported = this.parseIdentifierName();\n\t }\n\t return this.finalize(node, new Node.ExportSpecifier(local, exported));\n\t };\n\t Parser.prototype.parseExportDeclaration = function () {\n\t if (this.context.inFunctionBody) {\n\t this.throwError(messages_1.Messages.IllegalExportDeclaration);\n\t }\n\t var node = this.createNode();\n\t this.expectKeyword('export');\n\t var exportDeclaration;\n\t if (this.matchKeyword('default')) {\n\t // export default ...\n\t this.nextToken();\n\t if (this.matchKeyword('function')) {\n\t // export default function foo () {}\n\t // export default function () {}\n\t var declaration = this.parseFunctionDeclaration(true);\n\t exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));\n\t }\n\t else if (this.matchKeyword('class')) {\n\t // export default class foo {}\n\t var declaration = this.parseClassDeclaration(true);\n\t exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));\n\t }\n\t else if (this.matchContextualKeyword('async')) {\n\t // export default async function f () {}\n\t // export default async function () {}\n\t // export default async x => x\n\t var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();\n\t exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));\n\t }\n\t else {\n\t if (this.matchContextualKeyword('from')) {\n\t this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value);\n\t }\n\t // export default {};\n\t // export default [];\n\t // export default (1 + 2);\n\t var declaration = this.match('{') ? this.parseObjectInitializer() :\n\t this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression();\n\t this.consumeSemicolon();\n\t exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));\n\t }\n\t }\n\t else if (this.match('*')) {\n\t // export * from 'foo';\n\t this.nextToken();\n\t if (!this.matchContextualKeyword('from')) {\n\t var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;\n\t this.throwError(message, this.lookahead.value);\n\t }\n\t this.nextToken();\n\t var src = this.parseModuleSpecifier();\n\t this.consumeSemicolon();\n\t exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src));\n\t }\n\t else if (this.lookahead.type === 4 /* Keyword */) {\n\t // export var f = 1;\n\t var declaration = void 0;\n\t switch (this.lookahead.value) {\n\t case 'let':\n\t case 'const':\n\t declaration = this.parseLexicalDeclaration({ inFor: false });\n\t break;\n\t case 'var':\n\t case 'class':\n\t case 'function':\n\t declaration = this.parseStatementListItem();\n\t break;\n\t default:\n\t this.throwUnexpectedToken(this.lookahead);\n\t }\n\t exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));\n\t }\n\t else if (this.matchAsyncFunction()) {\n\t var declaration = this.parseFunctionDeclaration();\n\t exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));\n\t }\n\t else {\n\t var specifiers = [];\n\t var source = null;\n\t var isExportFromIdentifier = false;\n\t this.expect('{');\n\t while (!this.match('}')) {\n\t isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default');\n\t specifiers.push(this.parseExportSpecifier());\n\t if (!this.match('}')) {\n\t this.expect(',');\n\t }\n\t }\n\t this.expect('}');\n\t if (this.matchContextualKeyword('from')) {\n\t // export {default} from 'foo';\n\t // export {foo} from 'foo';\n\t this.nextToken();\n\t source = this.parseModuleSpecifier();\n\t this.consumeSemicolon();\n\t }\n\t else if (isExportFromIdentifier) {\n\t // export {default}; // missing fromClause\n\t var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;\n\t this.throwError(message, this.lookahead.value);\n\t }\n\t else {\n\t // export {foo};\n\t this.consumeSemicolon();\n\t }\n\t exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source));\n\t }\n\t return exportDeclaration;\n\t };\n\t return Parser;\n\t}());\n\texports.Parser = Parser;\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t// Ensure the condition is true, otherwise throw an error.\n\t// This is only to have a better contract semantic, i.e. another safety net\n\t// to catch a logic error. The condition shall be fulfilled in normal case.\n\t// Do NOT use this to enforce a certain condition on any user input.\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tfunction assert(condition, message) {\n\t /* istanbul ignore if */\n\t if (!condition) {\n\t throw new Error('ASSERT: ' + message);\n\t }\n\t}\n\texports.assert = assert;\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/* tslint:disable:max-classes-per-file */\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar ErrorHandler = (function () {\n\t function ErrorHandler() {\n\t this.errors = [];\n\t this.tolerant = false;\n\t }\n\t ErrorHandler.prototype.recordError = function (error) {\n\t this.errors.push(error);\n\t };\n\t ErrorHandler.prototype.tolerate = function (error) {\n\t if (this.tolerant) {\n\t this.recordError(error);\n\t }\n\t else {\n\t throw error;\n\t }\n\t };\n\t ErrorHandler.prototype.constructError = function (msg, column) {\n\t var error = new Error(msg);\n\t try {\n\t throw error;\n\t }\n\t catch (base) {\n\t /* istanbul ignore else */\n\t if (Object.create && Object.defineProperty) {\n\t error = Object.create(base);\n\t Object.defineProperty(error, 'column', { value: column });\n\t }\n\t }\n\t /* istanbul ignore next */\n\t return error;\n\t };\n\t ErrorHandler.prototype.createError = function (index, line, col, description) {\n\t var msg = 'Line ' + line + ': ' + description;\n\t var error = this.constructError(msg, col);\n\t error.index = index;\n\t error.lineNumber = line;\n\t error.description = description;\n\t return error;\n\t };\n\t ErrorHandler.prototype.throwError = function (index, line, col, description) {\n\t throw this.createError(index, line, col, description);\n\t };\n\t ErrorHandler.prototype.tolerateError = function (index, line, col, description) {\n\t var error = this.createError(index, line, col, description);\n\t if (this.tolerant) {\n\t this.recordError(error);\n\t }\n\t else {\n\t throw error;\n\t }\n\t };\n\t return ErrorHandler;\n\t}());\n\texports.ErrorHandler = ErrorHandler;\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\t// Error messages should be identical to V8.\n\texports.Messages = {\n\t BadGetterArity: 'Getter must not have any formal parameters',\n\t BadSetterArity: 'Setter must have exactly one formal parameter',\n\t BadSetterRestParameter: 'Setter function argument must not be a rest parameter',\n\t ConstructorIsAsync: 'Class constructor may not be an async method',\n\t ConstructorSpecialMethod: 'Class constructor may not be an accessor',\n\t DeclarationMissingInitializer: 'Missing initializer in %0 declaration',\n\t DefaultRestParameter: 'Unexpected token =',\n\t DuplicateBinding: 'Duplicate binding %0',\n\t DuplicateConstructor: 'A class may only have one constructor',\n\t DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals',\n\t ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer',\n\t GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts',\n\t IllegalBreak: 'Illegal break statement',\n\t IllegalContinue: 'Illegal continue statement',\n\t IllegalExportDeclaration: 'Unexpected token',\n\t IllegalImportDeclaration: 'Unexpected token',\n\t IllegalLanguageModeDirective: 'Illegal \\'use strict\\' directive in function with non-simple parameter list',\n\t IllegalReturn: 'Illegal return statement',\n\t InvalidEscapedReservedWord: 'Keyword must not contain escaped characters',\n\t InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence',\n\t InvalidLHSInAssignment: 'Invalid left-hand side in assignment',\n\t InvalidLHSInForIn: 'Invalid left-hand side in for-in',\n\t InvalidLHSInForLoop: 'Invalid left-hand side in for-loop',\n\t InvalidModuleSpecifier: 'Unexpected token',\n\t InvalidRegExp: 'Invalid regular expression',\n\t LetInLexicalBinding: 'let is disallowed as a lexically bound name',\n\t MissingFromClause: 'Unexpected token',\n\t MultipleDefaultsInSwitch: 'More than one default clause in switch statement',\n\t NewlineAfterThrow: 'Illegal newline after throw',\n\t NoAsAfterImportNamespace: 'Unexpected token',\n\t NoCatchOrFinally: 'Missing catch or finally after try',\n\t ParameterAfterRestParameter: 'Rest parameter must be last formal parameter',\n\t Redeclaration: '%0 \\'%1\\' has already been declared',\n\t StaticPrototype: 'Classes may not have static property named prototype',\n\t StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',\n\t StrictDelete: 'Delete of an unqualified identifier in strict mode.',\n\t StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block',\n\t StrictFunctionName: 'Function name may not be eval or arguments in strict mode',\n\t StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',\n\t StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',\n\t StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',\n\t StrictModeWith: 'Strict mode code may not include a with statement',\n\t StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',\n\t StrictParamDupe: 'Strict mode function may not have duplicate parameter names',\n\t StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',\n\t StrictReservedWord: 'Use of future reserved word in strict mode',\n\t StrictVarName: 'Variable name may not be eval or arguments in strict mode',\n\t TemplateOctalLiteral: 'Octal literals are not allowed in template strings.',\n\t UnexpectedEOS: 'Unexpected end of input',\n\t UnexpectedIdentifier: 'Unexpected identifier',\n\t UnexpectedNumber: 'Unexpected number',\n\t UnexpectedReserved: 'Unexpected reserved word',\n\t UnexpectedString: 'Unexpected string',\n\t UnexpectedTemplate: 'Unexpected quasi %0',\n\t UnexpectedToken: 'Unexpected token %0',\n\t UnexpectedTokenIllegal: 'Unexpected token ILLEGAL',\n\t UnknownLabel: 'Undefined label \\'%0\\'',\n\t UnterminatedRegExp: 'Invalid regular expression: missing /'\n\t};\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar assert_1 = __webpack_require__(9);\n\tvar character_1 = __webpack_require__(4);\n\tvar messages_1 = __webpack_require__(11);\n\tfunction hexValue(ch) {\n\t return '0123456789abcdef'.indexOf(ch.toLowerCase());\n\t}\n\tfunction octalValue(ch) {\n\t return '01234567'.indexOf(ch);\n\t}\n\tvar Scanner = (function () {\n\t function Scanner(code, handler) {\n\t this.source = code;\n\t this.errorHandler = handler;\n\t this.trackComment = false;\n\t this.isModule = false;\n\t this.length = code.length;\n\t this.index = 0;\n\t this.lineNumber = (code.length > 0) ? 1 : 0;\n\t this.lineStart = 0;\n\t this.curlyStack = [];\n\t }\n\t Scanner.prototype.saveState = function () {\n\t return {\n\t index: this.index,\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart\n\t };\n\t };\n\t Scanner.prototype.restoreState = function (state) {\n\t this.index = state.index;\n\t this.lineNumber = state.lineNumber;\n\t this.lineStart = state.lineStart;\n\t };\n\t Scanner.prototype.eof = function () {\n\t return this.index >= this.length;\n\t };\n\t Scanner.prototype.throwUnexpectedToken = function (message) {\n\t if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }\n\t return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);\n\t };\n\t Scanner.prototype.tolerateUnexpectedToken = function (message) {\n\t if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }\n\t this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);\n\t };\n\t // https://tc39.github.io/ecma262/#sec-comments\n\t Scanner.prototype.skipSingleLineComment = function (offset) {\n\t var comments = [];\n\t var start, loc;\n\t if (this.trackComment) {\n\t comments = [];\n\t start = this.index - offset;\n\t loc = {\n\t start: {\n\t line: this.lineNumber,\n\t column: this.index - this.lineStart - offset\n\t },\n\t end: {}\n\t };\n\t }\n\t while (!this.eof()) {\n\t var ch = this.source.charCodeAt(this.index);\n\t ++this.index;\n\t if (character_1.Character.isLineTerminator(ch)) {\n\t if (this.trackComment) {\n\t loc.end = {\n\t line: this.lineNumber,\n\t column: this.index - this.lineStart - 1\n\t };\n\t var entry = {\n\t multiLine: false,\n\t slice: [start + offset, this.index - 1],\n\t range: [start, this.index - 1],\n\t loc: loc\n\t };\n\t comments.push(entry);\n\t }\n\t if (ch === 13 && this.source.charCodeAt(this.index) === 10) {\n\t ++this.index;\n\t }\n\t ++this.lineNumber;\n\t this.lineStart = this.index;\n\t return comments;\n\t }\n\t }\n\t if (this.trackComment) {\n\t loc.end = {\n\t line: this.lineNumber,\n\t column: this.index - this.lineStart\n\t };\n\t var entry = {\n\t multiLine: false,\n\t slice: [start + offset, this.index],\n\t range: [start, this.index],\n\t loc: loc\n\t };\n\t comments.push(entry);\n\t }\n\t return comments;\n\t };\n\t Scanner.prototype.skipMultiLineComment = function () {\n\t var comments = [];\n\t var start, loc;\n\t if (this.trackComment) {\n\t comments = [];\n\t start = this.index - 2;\n\t loc = {\n\t start: {\n\t line: this.lineNumber,\n\t column: this.index - this.lineStart - 2\n\t },\n\t end: {}\n\t };\n\t }\n\t while (!this.eof()) {\n\t var ch = this.source.charCodeAt(this.index);\n\t if (character_1.Character.isLineTerminator(ch)) {\n\t if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) {\n\t ++this.index;\n\t }\n\t ++this.lineNumber;\n\t ++this.index;\n\t this.lineStart = this.index;\n\t }\n\t else if (ch === 0x2A) {\n\t // Block comment ends with '*/'.\n\t if (this.source.charCodeAt(this.index + 1) === 0x2F) {\n\t this.index += 2;\n\t if (this.trackComment) {\n\t loc.end = {\n\t line: this.lineNumber,\n\t column: this.index - this.lineStart\n\t };\n\t var entry = {\n\t multiLine: true,\n\t slice: [start + 2, this.index - 2],\n\t range: [start, this.index],\n\t loc: loc\n\t };\n\t comments.push(entry);\n\t }\n\t return comments;\n\t }\n\t ++this.index;\n\t }\n\t else {\n\t ++this.index;\n\t }\n\t }\n\t // Ran off the end of the file - the whole thing is a comment\n\t if (this.trackComment) {\n\t loc.end = {\n\t line: this.lineNumber,\n\t column: this.index - this.lineStart\n\t };\n\t var entry = {\n\t multiLine: true,\n\t slice: [start + 2, this.index],\n\t range: [start, this.index],\n\t loc: loc\n\t };\n\t comments.push(entry);\n\t }\n\t this.tolerateUnexpectedToken();\n\t return comments;\n\t };\n\t Scanner.prototype.scanComments = function () {\n\t var comments;\n\t if (this.trackComment) {\n\t comments = [];\n\t }\n\t var start = (this.index === 0);\n\t while (!this.eof()) {\n\t var ch = this.source.charCodeAt(this.index);\n\t if (character_1.Character.isWhiteSpace(ch)) {\n\t ++this.index;\n\t }\n\t else if (character_1.Character.isLineTerminator(ch)) {\n\t ++this.index;\n\t if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) {\n\t ++this.index;\n\t }\n\t ++this.lineNumber;\n\t this.lineStart = this.index;\n\t start = true;\n\t }\n\t else if (ch === 0x2F) {\n\t ch = this.source.charCodeAt(this.index + 1);\n\t if (ch === 0x2F) {\n\t this.index += 2;\n\t var comment = this.skipSingleLineComment(2);\n\t if (this.trackComment) {\n\t comments = comments.concat(comment);\n\t }\n\t start = true;\n\t }\n\t else if (ch === 0x2A) {\n\t this.index += 2;\n\t var comment = this.skipMultiLineComment();\n\t if (this.trackComment) {\n\t comments = comments.concat(comment);\n\t }\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t else if (start && ch === 0x2D) {\n\t // U+003E is '>'\n\t if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) {\n\t // '-->' is a single-line comment\n\t this.index += 3;\n\t var comment = this.skipSingleLineComment(3);\n\t if (this.trackComment) {\n\t comments = comments.concat(comment);\n\t }\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t else if (ch === 0x3C && !this.isModule) {\n\t if (this.source.slice(this.index + 1, this.index + 4) === '!--') {\n\t this.index += 4; // `<!--`\n\t var comment = this.skipSingleLineComment(4);\n\t if (this.trackComment) {\n\t comments = comments.concat(comment);\n\t }\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t return comments;\n\t };\n\t // https://tc39.github.io/ecma262/#sec-future-reserved-words\n\t Scanner.prototype.isFutureReservedWord = function (id) {\n\t switch (id) {\n\t case 'enum':\n\t case 'export':\n\t case 'import':\n\t case 'super':\n\t return true;\n\t default:\n\t return false;\n\t }\n\t };\n\t Scanner.prototype.isStrictModeReservedWord = function (id) {\n\t switch (id) {\n\t case 'implements':\n\t case 'interface':\n\t case 'package':\n\t case 'private':\n\t case 'protected':\n\t case 'public':\n\t case 'static':\n\t case 'yield':\n\t case 'let':\n\t return true;\n\t default:\n\t return false;\n\t }\n\t };\n\t Scanner.prototype.isRestrictedWord = function (id) {\n\t return id === 'eval' || id === 'arguments';\n\t };\n\t // https://tc39.github.io/ecma262/#sec-keywords\n\t Scanner.prototype.isKeyword = function (id) {\n\t switch (id.length) {\n\t case 2:\n\t return (id === 'if') || (id === 'in') || (id === 'do');\n\t case 3:\n\t return (id === 'var') || (id === 'for') || (id === 'new') ||\n\t (id === 'try') || (id === 'let');\n\t case 4:\n\t return (id === 'this') || (id === 'else') || (id === 'case') ||\n\t (id === 'void') || (id === 'with') || (id === 'enum');\n\t case 5:\n\t return (id === 'while') || (id === 'break') || (id === 'catch') ||\n\t (id === 'throw') || (id === 'const') || (id === 'yield') ||\n\t (id === 'class') || (id === 'super');\n\t case 6:\n\t return (id === 'return') || (id === 'typeof') || (id === 'delete') ||\n\t (id === 'switch') || (id === 'export') || (id === 'import');\n\t case 7:\n\t return (id === 'default') || (id === 'finally') || (id === 'extends');\n\t case 8:\n\t return (id === 'function') || (id === 'continue') || (id === 'debugger');\n\t case 10:\n\t return (id === 'instanceof');\n\t default:\n\t return false;\n\t }\n\t };\n\t Scanner.prototype.codePointAt = function (i) {\n\t var cp = this.source.charCodeAt(i);\n\t if (cp >= 0xD800 && cp <= 0xDBFF) {\n\t var second = this.source.charCodeAt(i + 1);\n\t if (second >= 0xDC00 && second <= 0xDFFF) {\n\t var first = cp;\n\t cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\t }\n\t }\n\t return cp;\n\t };\n\t Scanner.prototype.scanHexEscape = function (prefix) {\n\t var len = (prefix === 'u') ? 4 : 2;\n\t var code = 0;\n\t for (var i = 0; i < len; ++i) {\n\t if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {\n\t code = code * 16 + hexValue(this.source[this.index++]);\n\t }\n\t else {\n\t return null;\n\t }\n\t }\n\t return String.fromCharCode(code);\n\t };\n\t Scanner.prototype.scanUnicodeCodePointEscape = function () {\n\t var ch = this.source[this.index];\n\t var code = 0;\n\t // At least, one hex digit is required.\n\t if (ch === '}') {\n\t this.throwUnexpectedToken();\n\t }\n\t while (!this.eof()) {\n\t ch = this.source[this.index++];\n\t if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) {\n\t break;\n\t }\n\t code = code * 16 + hexValue(ch);\n\t }\n\t if (code > 0x10FFFF || ch !== '}') {\n\t this.throwUnexpectedToken();\n\t }\n\t return character_1.Character.fromCodePoint(code);\n\t };\n\t Scanner.prototype.getIdentifier = function () {\n\t var start = this.index++;\n\t while (!this.eof()) {\n\t var ch = this.source.charCodeAt(this.index);\n\t if (ch === 0x5C) {\n\t // Blackslash (U+005C) marks Unicode escape sequence.\n\t this.index = start;\n\t return this.getComplexIdentifier();\n\t }\n\t else if (ch >= 0xD800 && ch < 0xDFFF) {\n\t // Need to handle surrogate pairs.\n\t this.index = start;\n\t return this.getComplexIdentifier();\n\t }\n\t if (character_1.Character.isIdentifierPart(ch)) {\n\t ++this.index;\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t return this.source.slice(start, this.index);\n\t };\n\t Scanner.prototype.getComplexIdentifier = function () {\n\t var cp = this.codePointAt(this.index);\n\t var id = character_1.Character.fromCodePoint(cp);\n\t this.index += id.length;\n\t // '\\u' (U+005C, U+0075) denotes an escaped character.\n\t var ch;\n\t if (cp === 0x5C) {\n\t if (this.source.charCodeAt(this.index) !== 0x75) {\n\t this.throwUnexpectedToken();\n\t }\n\t ++this.index;\n\t if (this.source[this.index] === '{') {\n\t ++this.index;\n\t ch = this.scanUnicodeCodePointEscape();\n\t }\n\t else {\n\t ch = this.scanHexEscape('u');\n\t if (ch === null || ch === '\\\\' || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) {\n\t this.throwUnexpectedToken();\n\t }\n\t }\n\t id = ch;\n\t }\n\t while (!this.eof()) {\n\t cp = this.codePointAt(this.index);\n\t if (!character_1.Character.isIdentifierPart(cp)) {\n\t break;\n\t }\n\t ch = character_1.Character.fromCodePoint(cp);\n\t id += ch;\n\t this.index += ch.length;\n\t // '\\u' (U+005C, U+0075) denotes an escaped character.\n\t if (cp === 0x5C) {\n\t id = id.substr(0, id.length - 1);\n\t if (this.source.charCodeAt(this.index) !== 0x75) {\n\t this.throwUnexpectedToken();\n\t }\n\t ++this.index;\n\t if (this.source[this.index] === '{') {\n\t ++this.index;\n\t ch = this.scanUnicodeCodePointEscape();\n\t }\n\t else {\n\t ch = this.scanHexEscape('u');\n\t if (ch === null || ch === '\\\\' || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {\n\t this.throwUnexpectedToken();\n\t }\n\t }\n\t id += ch;\n\t }\n\t }\n\t return id;\n\t };\n\t Scanner.prototype.octalToDecimal = function (ch) {\n\t // \\0 is not octal escape sequence\n\t var octal = (ch !== '0');\n\t var code = octalValue(ch);\n\t if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {\n\t octal = true;\n\t code = code * 8 + octalValue(this.source[this.index++]);\n\t // 3 digits are only allowed when string starts\n\t // with 0, 1, 2, 3\n\t if ('0123'.indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {\n\t code = code * 8 + octalValue(this.source[this.index++]);\n\t }\n\t }\n\t return {\n\t code: code,\n\t octal: octal\n\t };\n\t };\n\t // https://tc39.github.io/ecma262/#sec-names-and-keywords\n\t Scanner.prototype.scanIdentifier = function () {\n\t var type;\n\t var start = this.index;\n\t // Backslash (U+005C) starts an escaped character.\n\t var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier();\n\t // There is no keyword or literal with only one character.\n\t // Thus, it must be an identifier.\n\t if (id.length === 1) {\n\t type = 3 /* Identifier */;\n\t }\n\t else if (this.isKeyword(id)) {\n\t type = 4 /* Keyword */;\n\t }\n\t else if (id === 'null') {\n\t type = 5 /* NullLiteral */;\n\t }\n\t else if (id === 'true' || id === 'false') {\n\t type = 1 /* BooleanLiteral */;\n\t }\n\t else {\n\t type = 3 /* Identifier */;\n\t }\n\t if (type !== 3 /* Identifier */ && (start + id.length !== this.index)) {\n\t var restore = this.index;\n\t this.index = start;\n\t this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord);\n\t this.index = restore;\n\t }\n\t return {\n\t type: type,\n\t value: id,\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t // https://tc39.github.io/ecma262/#sec-punctuators\n\t Scanner.prototype.scanPunctuator = function () {\n\t var start = this.index;\n\t // Check for most common single-character punctuators.\n\t var str = this.source[this.index];\n\t switch (str) {\n\t case '(':\n\t case '{':\n\t if (str === '{') {\n\t this.curlyStack.push('{');\n\t }\n\t ++this.index;\n\t break;\n\t case '.':\n\t ++this.index;\n\t if (this.source[this.index] === '.' && this.source[this.index + 1] === '.') {\n\t // Spread operator: ...\n\t this.index += 2;\n\t str = '...';\n\t }\n\t break;\n\t case '}':\n\t ++this.index;\n\t this.curlyStack.pop();\n\t break;\n\t case ')':\n\t case ';':\n\t case ',':\n\t case '[':\n\t case ']':\n\t case ':':\n\t case '?':\n\t case '~':\n\t ++this.index;\n\t break;\n\t default:\n\t // 4-character punctuator.\n\t str = this.source.substr(this.index, 4);\n\t if (str === '>>>=') {\n\t this.index += 4;\n\t }\n\t else {\n\t // 3-character punctuators.\n\t str = str.substr(0, 3);\n\t if (str === '===' || str === '!==' || str === '>>>' ||\n\t str === '<<=' || str === '>>=' || str === '**=') {\n\t this.index += 3;\n\t }\n\t else {\n\t // 2-character punctuators.\n\t str = str.substr(0, 2);\n\t if (str === '&&' || str === '||' || str === '==' || str === '!=' ||\n\t str === '+=' || str === '-=' || str === '*=' || str === '/=' ||\n\t str === '++' || str === '--' || str === '<<' || str === '>>' ||\n\t str === '&=' || str === '|=' || str === '^=' || str === '%=' ||\n\t str === '<=' || str === '>=' || str === '=>' || str === '**') {\n\t this.index += 2;\n\t }\n\t else {\n\t // 1-character punctuators.\n\t str = this.source[this.index];\n\t if ('<>=!+-*%&|^/'.indexOf(str) >= 0) {\n\t ++this.index;\n\t }\n\t }\n\t }\n\t }\n\t }\n\t if (this.index === start) {\n\t this.throwUnexpectedToken();\n\t }\n\t return {\n\t type: 7 /* Punctuator */,\n\t value: str,\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t // https://tc39.github.io/ecma262/#sec-literals-numeric-literals\n\t Scanner.prototype.scanHexLiteral = function (start) {\n\t var num = '';\n\t while (!this.eof()) {\n\t if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {\n\t break;\n\t }\n\t num += this.source[this.index++];\n\t }\n\t if (num.length === 0) {\n\t this.throwUnexpectedToken();\n\t }\n\t if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {\n\t this.throwUnexpectedToken();\n\t }\n\t return {\n\t type: 6 /* NumericLiteral */,\n\t value: parseInt('0x' + num, 16),\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t Scanner.prototype.scanBinaryLiteral = function (start) {\n\t var num = '';\n\t var ch;\n\t while (!this.eof()) {\n\t ch = this.source[this.index];\n\t if (ch !== '0' && ch !== '1') {\n\t break;\n\t }\n\t num += this.source[this.index++];\n\t }\n\t if (num.length === 0) {\n\t // only 0b or 0B\n\t this.throwUnexpectedToken();\n\t }\n\t if (!this.eof()) {\n\t ch = this.source.charCodeAt(this.index);\n\t /* istanbul ignore else */\n\t if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) {\n\t this.throwUnexpectedToken();\n\t }\n\t }\n\t return {\n\t type: 6 /* NumericLiteral */,\n\t value: parseInt(num, 2),\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t Scanner.prototype.scanOctalLiteral = function (prefix, start) {\n\t var num = '';\n\t var octal = false;\n\t if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) {\n\t octal = true;\n\t num = '0' + this.source[this.index++];\n\t }\n\t else {\n\t ++this.index;\n\t }\n\t while (!this.eof()) {\n\t if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {\n\t break;\n\t }\n\t num += this.source[this.index++];\n\t }\n\t if (!octal && num.length === 0) {\n\t // only 0o or 0O\n\t this.throwUnexpectedToken();\n\t }\n\t if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {\n\t this.throwUnexpectedToken();\n\t }\n\t return {\n\t type: 6 /* NumericLiteral */,\n\t value: parseInt(num, 8),\n\t octal: octal,\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t Scanner.prototype.isImplicitOctalLiteral = function () {\n\t // Implicit octal, unless there is a non-octal digit.\n\t // (Annex B.1.1 on Numeric Literals)\n\t for (var i = this.index + 1; i < this.length; ++i) {\n\t var ch = this.source[i];\n\t if (ch === '8' || ch === '9') {\n\t return false;\n\t }\n\t if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) {\n\t return true;\n\t }\n\t }\n\t return true;\n\t };\n\t Scanner.prototype.scanNumericLiteral = function () {\n\t var start = this.index;\n\t var ch = this.source[start];\n\t assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), 'Numeric literal must start with a decimal digit or a decimal point');\n\t var num = '';\n\t if (ch !== '.') {\n\t num = this.source[this.index++];\n\t ch = this.source[this.index];\n\t // Hex number starts with '0x'.\n\t // Octal number starts with '0'.\n\t // Octal number in ES6 starts with '0o'.\n\t // Binary number in ES6 starts with '0b'.\n\t if (num === '0') {\n\t if (ch === 'x' || ch === 'X') {\n\t ++this.index;\n\t return this.scanHexLiteral(start);\n\t }\n\t if (ch === 'b' || ch === 'B') {\n\t ++this.index;\n\t return this.scanBinaryLiteral(start);\n\t }\n\t if (ch === 'o' || ch === 'O') {\n\t return this.scanOctalLiteral(ch, start);\n\t }\n\t if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {\n\t if (this.isImplicitOctalLiteral()) {\n\t return this.scanOctalLiteral(ch, start);\n\t }\n\t }\n\t }\n\t while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {\n\t num += this.source[this.index++];\n\t }\n\t ch = this.source[this.index];\n\t }\n\t if (ch === '.') {\n\t num += this.source[this.index++];\n\t while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {\n\t num += this.source[this.index++];\n\t }\n\t ch = this.source[this.index];\n\t }\n\t if (ch === 'e' || ch === 'E') {\n\t num += this.source[this.index++];\n\t ch = this.source[this.index];\n\t if (ch === '+' || ch === '-') {\n\t num += this.source[this.index++];\n\t }\n\t if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {\n\t while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {\n\t num += this.source[this.index++];\n\t }\n\t }\n\t else {\n\t this.throwUnexpectedToken();\n\t }\n\t }\n\t if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {\n\t this.throwUnexpectedToken();\n\t }\n\t return {\n\t type: 6 /* NumericLiteral */,\n\t value: parseFloat(num),\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t // https://tc39.github.io/ecma262/#sec-literals-string-literals\n\t Scanner.prototype.scanStringLiteral = function () {\n\t var start = this.index;\n\t var quote = this.source[start];\n\t assert_1.assert((quote === '\\'' || quote === '\"'), 'String literal must starts with a quote');\n\t ++this.index;\n\t var octal = false;\n\t var str = '';\n\t while (!this.eof()) {\n\t var ch = this.source[this.index++];\n\t if (ch === quote) {\n\t quote = '';\n\t break;\n\t }\n\t else if (ch === '\\\\') {\n\t ch = this.source[this.index++];\n\t if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) {\n\t switch (ch) {\n\t case 'u':\n\t if (this.source[this.index] === '{') {\n\t ++this.index;\n\t str += this.scanUnicodeCodePointEscape();\n\t }\n\t else {\n\t var unescaped_1 = this.scanHexEscape(ch);\n\t if (unescaped_1 === null) {\n\t this.throwUnexpectedToken();\n\t }\n\t str += unescaped_1;\n\t }\n\t break;\n\t case 'x':\n\t var unescaped = this.scanHexEscape(ch);\n\t if (unescaped === null) {\n\t this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);\n\t }\n\t str += unescaped;\n\t break;\n\t case 'n':\n\t str += '\\n';\n\t break;\n\t case 'r':\n\t str += '\\r';\n\t break;\n\t case 't':\n\t str += '\\t';\n\t break;\n\t case 'b':\n\t str += '\\b';\n\t break;\n\t case 'f':\n\t str += '\\f';\n\t break;\n\t case 'v':\n\t str += '\\x0B';\n\t break;\n\t case '8':\n\t case '9':\n\t str += ch;\n\t this.tolerateUnexpectedToken();\n\t break;\n\t default:\n\t if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {\n\t var octToDec = this.octalToDecimal(ch);\n\t octal = octToDec.octal || octal;\n\t str += String.fromCharCode(octToDec.code);\n\t }\n\t else {\n\t str += ch;\n\t }\n\t break;\n\t }\n\t }\n\t else {\n\t ++this.lineNumber;\n\t if (ch === '\\r' && this.source[this.index] === '\\n') {\n\t ++this.index;\n\t }\n\t this.lineStart = this.index;\n\t }\n\t }\n\t else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {\n\t break;\n\t }\n\t else {\n\t str += ch;\n\t }\n\t }\n\t if (quote !== '') {\n\t this.index = start;\n\t this.throwUnexpectedToken();\n\t }\n\t return {\n\t type: 8 /* StringLiteral */,\n\t value: str,\n\t octal: octal,\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t // https://tc39.github.io/ecma262/#sec-template-literal-lexical-components\n\t Scanner.prototype.scanTemplate = function () {\n\t var cooked = '';\n\t var terminated = false;\n\t var start = this.index;\n\t var head = (this.source[start] === '`');\n\t var tail = false;\n\t var rawOffset = 2;\n\t ++this.index;\n\t while (!this.eof()) {\n\t var ch = this.source[this.index++];\n\t if (ch === '`') {\n\t rawOffset = 1;\n\t tail = true;\n\t terminated = true;\n\t break;\n\t }\n\t else if (ch === '$') {\n\t if (this.source[this.index] === '{') {\n\t this.curlyStack.push('${');\n\t ++this.index;\n\t terminated = true;\n\t break;\n\t }\n\t cooked += ch;\n\t }\n\t else if (ch === '\\\\') {\n\t ch = this.source[this.index++];\n\t if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) {\n\t switch (ch) {\n\t case 'n':\n\t cooked += '\\n';\n\t break;\n\t case 'r':\n\t cooked += '\\r';\n\t break;\n\t case 't':\n\t cooked += '\\t';\n\t break;\n\t case 'u':\n\t if (this.source[this.index] === '{') {\n\t ++this.index;\n\t cooked += this.scanUnicodeCodePointEscape();\n\t }\n\t else {\n\t var restore = this.index;\n\t var unescaped_2 = this.scanHexEscape(ch);\n\t if (unescaped_2 !== null) {\n\t cooked += unescaped_2;\n\t }\n\t else {\n\t this.index = restore;\n\t cooked += ch;\n\t }\n\t }\n\t break;\n\t case 'x':\n\t var unescaped = this.scanHexEscape(ch);\n\t if (unescaped === null) {\n\t this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);\n\t }\n\t cooked += unescaped;\n\t break;\n\t case 'b':\n\t cooked += '\\b';\n\t break;\n\t case 'f':\n\t cooked += '\\f';\n\t break;\n\t case 'v':\n\t cooked += '\\v';\n\t break;\n\t default:\n\t if (ch === '0') {\n\t if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {\n\t // Illegal: \\01 \\02 and so on\n\t this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);\n\t }\n\t cooked += '\\0';\n\t }\n\t else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) {\n\t // Illegal: \\1 \\2\n\t this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);\n\t }\n\t else {\n\t cooked += ch;\n\t }\n\t break;\n\t }\n\t }\n\t else {\n\t ++this.lineNumber;\n\t if (ch === '\\r' && this.source[this.index] === '\\n') {\n\t ++this.index;\n\t }\n\t this.lineStart = this.index;\n\t }\n\t }\n\t else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {\n\t ++this.lineNumber;\n\t if (ch === '\\r' && this.source[this.index] === '\\n') {\n\t ++this.index;\n\t }\n\t this.lineStart = this.index;\n\t cooked += '\\n';\n\t }\n\t else {\n\t cooked += ch;\n\t }\n\t }\n\t if (!terminated) {\n\t this.throwUnexpectedToken();\n\t }\n\t if (!head) {\n\t this.curlyStack.pop();\n\t }\n\t return {\n\t type: 10 /* Template */,\n\t value: this.source.slice(start + 1, this.index - rawOffset),\n\t cooked: cooked,\n\t head: head,\n\t tail: tail,\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals\n\t Scanner.prototype.testRegExp = function (pattern, flags) {\n\t // The BMP character to use as a replacement for astral symbols when\n\t // translating an ES6 \"u\"-flagged pattern to an ES5-compatible\n\t // approximation.\n\t // Note: replacing with '\\uFFFF' enables false positives in unlikely\n\t // scenarios. For example, `[\\u{1044f}-\\u{10440}]` is an invalid\n\t // pattern that would not be detected by this substitution.\n\t var astralSubstitute = '\\uFFFF';\n\t var tmp = pattern;\n\t var self = this;\n\t if (flags.indexOf('u') >= 0) {\n\t tmp = tmp\n\t .replace(/\\\\u\\{([0-9a-fA-F]+)\\}|\\\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) {\n\t var codePoint = parseInt($1 || $2, 16);\n\t if (codePoint > 0x10FFFF) {\n\t self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);\n\t }\n\t if (codePoint <= 0xFFFF) {\n\t return String.fromCharCode(codePoint);\n\t }\n\t return astralSubstitute;\n\t })\n\t .replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, astralSubstitute);\n\t }\n\t // First, detect invalid regular expressions.\n\t try {\n\t RegExp(tmp);\n\t }\n\t catch (e) {\n\t this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);\n\t }\n\t // Return a regular expression object for this pattern-flag pair, or\n\t // `null` in case the current environment doesn't support the flags it\n\t // uses.\n\t try {\n\t return new RegExp(pattern, flags);\n\t }\n\t catch (exception) {\n\t /* istanbul ignore next */\n\t return null;\n\t }\n\t };\n\t Scanner.prototype.scanRegExpBody = function () {\n\t var ch = this.source[this.index];\n\t assert_1.assert(ch === '/', 'Regular expression literal must start with a slash');\n\t var str = this.source[this.index++];\n\t var classMarker = false;\n\t var terminated = false;\n\t while (!this.eof()) {\n\t ch = this.source[this.index++];\n\t str += ch;\n\t if (ch === '\\\\') {\n\t ch = this.source[this.index++];\n\t // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals\n\t if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {\n\t this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);\n\t }\n\t str += ch;\n\t }\n\t else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {\n\t this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);\n\t }\n\t else if (classMarker) {\n\t if (ch === ']') {\n\t classMarker = false;\n\t }\n\t }\n\t else {\n\t if (ch === '/') {\n\t terminated = true;\n\t break;\n\t }\n\t else if (ch === '[') {\n\t classMarker = true;\n\t }\n\t }\n\t }\n\t if (!terminated) {\n\t this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);\n\t }\n\t // Exclude leading and trailing slash.\n\t return str.substr(1, str.length - 2);\n\t };\n\t Scanner.prototype.scanRegExpFlags = function () {\n\t var str = '';\n\t var flags = '';\n\t while (!this.eof()) {\n\t var ch = this.source[this.index];\n\t if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {\n\t break;\n\t }\n\t ++this.index;\n\t if (ch === '\\\\' && !this.eof()) {\n\t ch = this.source[this.index];\n\t if (ch === 'u') {\n\t ++this.index;\n\t var restore = this.index;\n\t var char = this.scanHexEscape('u');\n\t if (char !== null) {\n\t flags += char;\n\t for (str += '\\\\u'; restore < this.index; ++restore) {\n\t str += this.source[restore];\n\t }\n\t }\n\t else {\n\t this.index = restore;\n\t flags += 'u';\n\t str += '\\\\u';\n\t }\n\t this.tolerateUnexpectedToken();\n\t }\n\t else {\n\t str += '\\\\';\n\t this.tolerateUnexpectedToken();\n\t }\n\t }\n\t else {\n\t flags += ch;\n\t str += ch;\n\t }\n\t }\n\t return flags;\n\t };\n\t Scanner.prototype.scanRegExp = function () {\n\t var start = this.index;\n\t var pattern = this.scanRegExpBody();\n\t var flags = this.scanRegExpFlags();\n\t var value = this.testRegExp(pattern, flags);\n\t return {\n\t type: 9 /* RegularExpression */,\n\t value: '',\n\t pattern: pattern,\n\t flags: flags,\n\t regex: value,\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: start,\n\t end: this.index\n\t };\n\t };\n\t Scanner.prototype.lex = function () {\n\t if (this.eof()) {\n\t return {\n\t type: 2 /* EOF */,\n\t value: '',\n\t lineNumber: this.lineNumber,\n\t lineStart: this.lineStart,\n\t start: this.index,\n\t end: this.index\n\t };\n\t }\n\t var cp = this.source.charCodeAt(this.index);\n\t if (character_1.Character.isIdentifierStart(cp)) {\n\t return this.scanIdentifier();\n\t }\n\t // Very common: ( and ) and ;\n\t if (cp === 0x28 || cp === 0x29 || cp === 0x3B) {\n\t return this.scanPunctuator();\n\t }\n\t // String literal starts with single quote (U+0027) or double quote (U+0022).\n\t if (cp === 0x27 || cp === 0x22) {\n\t return this.scanStringLiteral();\n\t }\n\t // Dot (.) U+002E can also start a floating-point number, hence the need\n\t // to check the next character.\n\t if (cp === 0x2E) {\n\t if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) {\n\t return this.scanNumericLiteral();\n\t }\n\t return this.scanPunctuator();\n\t }\n\t if (character_1.Character.isDecimalDigit(cp)) {\n\t return this.scanNumericLiteral();\n\t }\n\t // Template literals start with ` (U+0060) for template head\n\t // or } (U+007D) for template middle or template tail.\n\t if (cp === 0x60 || (cp === 0x7D && this.curlyStack[this.curlyStack.length - 1] === '${')) {\n\t return this.scanTemplate();\n\t }\n\t // Possible identifier start in a surrogate pair.\n\t if (cp >= 0xD800 && cp < 0xDFFF) {\n\t if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) {\n\t return this.scanIdentifier();\n\t }\n\t }\n\t return this.scanPunctuator();\n\t };\n\t return Scanner;\n\t}());\n\texports.Scanner = Scanner;\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.TokenName = {};\n\texports.TokenName[1 /* BooleanLiteral */] = 'Boolean';\n\texports.TokenName[2 /* EOF */] = '<end>';\n\texports.TokenName[3 /* Identifier */] = 'Identifier';\n\texports.TokenName[4 /* Keyword */] = 'Keyword';\n\texports.TokenName[5 /* NullLiteral */] = 'Null';\n\texports.TokenName[6 /* NumericLiteral */] = 'Numeric';\n\texports.TokenName[7 /* Punctuator */] = 'Punctuator';\n\texports.TokenName[8 /* StringLiteral */] = 'String';\n\texports.TokenName[9 /* RegularExpression */] = 'RegularExpression';\n\texports.TokenName[10 /* Template */] = 'Template';\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t// Generated by generate-xhtml-entities.js. DO NOT MODIFY!\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.XHTMLEntities = {\n\t quot: '\\u0022',\n\t amp: '\\u0026',\n\t apos: '\\u0027',\n\t gt: '\\u003E',\n\t nbsp: '\\u00A0',\n\t iexcl: '\\u00A1',\n\t cent: '\\u00A2',\n\t pound: '\\u00A3',\n\t curren: '\\u00A4',\n\t yen: '\\u00A5',\n\t brvbar: '\\u00A6',\n\t sect: '\\u00A7',\n\t uml: '\\u00A8',\n\t copy: '\\u00A9',\n\t ordf: '\\u00AA',\n\t laquo: '\\u00AB',\n\t not: '\\u00AC',\n\t shy: '\\u00AD',\n\t reg: '\\u00AE',\n\t macr: '\\u00AF',\n\t deg: '\\u00B0',\n\t plusmn: '\\u00B1',\n\t sup2: '\\u00B2',\n\t sup3: '\\u00B3',\n\t acute: '\\u00B4',\n\t micro: '\\u00B5',\n\t para: '\\u00B6',\n\t middot: '\\u00B7',\n\t cedil: '\\u00B8',\n\t sup1: '\\u00B9',\n\t ordm: '\\u00BA',\n\t raquo: '\\u00BB',\n\t frac14: '\\u00BC',\n\t frac12: '\\u00BD',\n\t frac34: '\\u00BE',\n\t iquest: '\\u00BF',\n\t Agrave: '\\u00C0',\n\t Aacute: '\\u00C1',\n\t Acirc: '\\u00C2',\n\t Atilde: '\\u00C3',\n\t Auml: '\\u00C4',\n\t Aring: '\\u00C5',\n\t AElig: '\\u00C6',\n\t Ccedil: '\\u00C7',\n\t Egrave: '\\u00C8',\n\t Eacute: '\\u00C9',\n\t Ecirc: '\\u00CA',\n\t Euml: '\\u00CB',\n\t Igrave: '\\u00CC',\n\t Iacute: '\\u00CD',\n\t Icirc: '\\u00CE',\n\t Iuml: '\\u00CF',\n\t ETH: '\\u00D0',\n\t Ntilde: '\\u00D1',\n\t Ograve: '\\u00D2',\n\t Oacute: '\\u00D3',\n\t Ocirc: '\\u00D4',\n\t Otilde: '\\u00D5',\n\t Ouml: '\\u00D6',\n\t times: '\\u00D7',\n\t Oslash: '\\u00D8',\n\t Ugrave: '\\u00D9',\n\t Uacute: '\\u00DA',\n\t Ucirc: '\\u00DB',\n\t Uuml: '\\u00DC',\n\t Yacute: '\\u00DD',\n\t THORN: '\\u00DE',\n\t szlig: '\\u00DF',\n\t agrave: '\\u00E0',\n\t aacute: '\\u00E1',\n\t acirc: '\\u00E2',\n\t atilde: '\\u00E3',\n\t auml: '\\u00E4',\n\t aring: '\\u00E5',\n\t aelig: '\\u00E6',\n\t ccedil: '\\u00E7',\n\t egrave: '\\u00E8',\n\t eacute: '\\u00E9',\n\t ecirc: '\\u00EA',\n\t euml: '\\u00EB',\n\t igrave: '\\u00EC',\n\t iacute: '\\u00ED',\n\t icirc: '\\u00EE',\n\t iuml: '\\u00EF',\n\t eth: '\\u00F0',\n\t ntilde: '\\u00F1',\n\t ograve: '\\u00F2',\n\t oacute: '\\u00F3',\n\t ocirc: '\\u00F4',\n\t otilde: '\\u00F5',\n\t ouml: '\\u00F6',\n\t divide: '\\u00F7',\n\t oslash: '\\u00F8',\n\t ugrave: '\\u00F9',\n\t uacute: '\\u00FA',\n\t ucirc: '\\u00FB',\n\t uuml: '\\u00FC',\n\t yacute: '\\u00FD',\n\t thorn: '\\u00FE',\n\t yuml: '\\u00FF',\n\t OElig: '\\u0152',\n\t oelig: '\\u0153',\n\t Scaron: '\\u0160',\n\t scaron: '\\u0161',\n\t Yuml: '\\u0178',\n\t fnof: '\\u0192',\n\t circ: '\\u02C6',\n\t tilde: '\\u02DC',\n\t Alpha: '\\u0391',\n\t Beta: '\\u0392',\n\t Gamma: '\\u0393',\n\t Delta: '\\u0394',\n\t Epsilon: '\\u0395',\n\t Zeta: '\\u0396',\n\t Eta: '\\u0397',\n\t Theta: '\\u0398',\n\t Iota: '\\u0399',\n\t Kappa: '\\u039A',\n\t Lambda: '\\u039B',\n\t Mu: '\\u039C',\n\t Nu: '\\u039D',\n\t Xi: '\\u039E',\n\t Omicron: '\\u039F',\n\t Pi: '\\u03A0',\n\t Rho: '\\u03A1',\n\t Sigma: '\\u03A3',\n\t Tau: '\\u03A4',\n\t Upsilon: '\\u03A5',\n\t Phi: '\\u03A6',\n\t Chi: '\\u03A7',\n\t Psi: '\\u03A8',\n\t Omega: '\\u03A9',\n\t alpha: '\\u03B1',\n\t beta: '\\u03B2',\n\t gamma: '\\u03B3',\n\t delta: '\\u03B4',\n\t epsilon: '\\u03B5',\n\t zeta: '\\u03B6',\n\t eta: '\\u03B7',\n\t theta: '\\u03B8',\n\t iota: '\\u03B9',\n\t kappa: '\\u03BA',\n\t lambda: '\\u03BB',\n\t mu: '\\u03BC',\n\t nu: '\\u03BD',\n\t xi: '\\u03BE',\n\t omicron: '\\u03BF',\n\t pi: '\\u03C0',\n\t rho: '\\u03C1',\n\t sigmaf: '\\u03C2',\n\t sigma: '\\u03C3',\n\t tau: '\\u03C4',\n\t upsilon: '\\u03C5',\n\t phi: '\\u03C6',\n\t chi: '\\u03C7',\n\t psi: '\\u03C8',\n\t omega: '\\u03C9',\n\t thetasym: '\\u03D1',\n\t upsih: '\\u03D2',\n\t piv: '\\u03D6',\n\t ensp: '\\u2002',\n\t emsp: '\\u2003',\n\t thinsp: '\\u2009',\n\t zwnj: '\\u200C',\n\t zwj: '\\u200D',\n\t lrm: '\\u200E',\n\t rlm: '\\u200F',\n\t ndash: '\\u2013',\n\t mdash: '\\u2014',\n\t lsquo: '\\u2018',\n\t rsquo: '\\u2019',\n\t sbquo: '\\u201A',\n\t ldquo: '\\u201C',\n\t rdquo: '\\u201D',\n\t bdquo: '\\u201E',\n\t dagger: '\\u2020',\n\t Dagger: '\\u2021',\n\t bull: '\\u2022',\n\t hellip: '\\u2026',\n\t permil: '\\u2030',\n\t prime: '\\u2032',\n\t Prime: '\\u2033',\n\t lsaquo: '\\u2039',\n\t rsaquo: '\\u203A',\n\t oline: '\\u203E',\n\t frasl: '\\u2044',\n\t euro: '\\u20AC',\n\t image: '\\u2111',\n\t weierp: '\\u2118',\n\t real: '\\u211C',\n\t trade: '\\u2122',\n\t alefsym: '\\u2135',\n\t larr: '\\u2190',\n\t uarr: '\\u2191',\n\t rarr: '\\u2192',\n\t darr: '\\u2193',\n\t harr: '\\u2194',\n\t crarr: '\\u21B5',\n\t lArr: '\\u21D0',\n\t uArr: '\\u21D1',\n\t rArr: '\\u21D2',\n\t dArr: '\\u21D3',\n\t hArr: '\\u21D4',\n\t forall: '\\u2200',\n\t part: '\\u2202',\n\t exist: '\\u2203',\n\t empty: '\\u2205',\n\t nabla: '\\u2207',\n\t isin: '\\u2208',\n\t notin: '\\u2209',\n\t ni: '\\u220B',\n\t prod: '\\u220F',\n\t sum: '\\u2211',\n\t minus: '\\u2212',\n\t lowast: '\\u2217',\n\t radic: '\\u221A',\n\t prop: '\\u221D',\n\t infin: '\\u221E',\n\t ang: '\\u2220',\n\t and: '\\u2227',\n\t or: '\\u2228',\n\t cap: '\\u2229',\n\t cup: '\\u222A',\n\t int: '\\u222B',\n\t there4: '\\u2234',\n\t sim: '\\u223C',\n\t cong: '\\u2245',\n\t asymp: '\\u2248',\n\t ne: '\\u2260',\n\t equiv: '\\u2261',\n\t le: '\\u2264',\n\t ge: '\\u2265',\n\t sub: '\\u2282',\n\t sup: '\\u2283',\n\t nsub: '\\u2284',\n\t sube: '\\u2286',\n\t supe: '\\u2287',\n\t oplus: '\\u2295',\n\t otimes: '\\u2297',\n\t perp: '\\u22A5',\n\t sdot: '\\u22C5',\n\t lceil: '\\u2308',\n\t rceil: '\\u2309',\n\t lfloor: '\\u230A',\n\t rfloor: '\\u230B',\n\t loz: '\\u25CA',\n\t spades: '\\u2660',\n\t clubs: '\\u2663',\n\t hearts: '\\u2665',\n\t diams: '\\u2666',\n\t lang: '\\u27E8',\n\t rang: '\\u27E9'\n\t};\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar error_handler_1 = __webpack_require__(10);\n\tvar scanner_1 = __webpack_require__(12);\n\tvar token_1 = __webpack_require__(13);\n\tvar Reader = (function () {\n\t function Reader() {\n\t this.values = [];\n\t this.curly = this.paren = -1;\n\t }\n\t // A function following one of those tokens is an expression.\n\t Reader.prototype.beforeFunctionExpression = function (t) {\n\t return ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new',\n\t 'return', 'case', 'delete', 'throw', 'void',\n\t // assignment operators\n\t '=', '+=', '-=', '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=',\n\t '&=', '|=', '^=', ',',\n\t // binary/unary operators\n\t '+', '-', '*', '**', '/', '%', '++', '--', '<<', '>>', '>>>', '&',\n\t '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=',\n\t '<=', '<', '>', '!=', '!=='].indexOf(t) >= 0;\n\t };\n\t // Determine if forward slash (/) is an operator or part of a regular expression\n\t // https://github.com/mozilla/sweet.js/wiki/design\n\t Reader.prototype.isRegexStart = function () {\n\t var previous = this.values[this.values.length - 1];\n\t var regex = (previous !== null);\n\t switch (previous) {\n\t case 'this':\n\t case ']':\n\t regex = false;\n\t break;\n\t case ')':\n\t var keyword = this.values[this.paren - 1];\n\t regex = (keyword === 'if' || keyword === 'while' || keyword === 'for' || keyword === 'with');\n\t break;\n\t case '}':\n\t // Dividing a function by anything makes little sense,\n\t // but we have to check for that.\n\t regex = false;\n\t if (this.values[this.curly - 3] === 'function') {\n\t // Anonymous function, e.g. function(){} /42\n\t var check = this.values[this.curly - 4];\n\t regex = check ? !this.beforeFunctionExpression(check) : false;\n\t }\n\t else if (this.values[this.curly - 4] === 'function') {\n\t // Named function, e.g. function f(){} /42/\n\t var check = this.values[this.curly - 5];\n\t regex = check ? !this.beforeFunctionExpression(check) : true;\n\t }\n\t break;\n\t default:\n\t break;\n\t }\n\t return regex;\n\t };\n\t Reader.prototype.push = function (token) {\n\t if (token.type === 7 /* Punctuator */ || token.type === 4 /* Keyword */) {\n\t if (token.value === '{') {\n\t this.curly = this.values.length;\n\t }\n\t else if (token.value === '(') {\n\t this.paren = this.values.length;\n\t }\n\t this.values.push(token.value);\n\t }\n\t else {\n\t this.values.push(null);\n\t }\n\t };\n\t return Reader;\n\t}());\n\tvar Tokenizer = (function () {\n\t function Tokenizer(code, config) {\n\t this.errorHandler = new error_handler_1.ErrorHandler();\n\t this.errorHandler.tolerant = config ? (typeof config.tolerant === 'boolean' && config.tolerant) : false;\n\t this.scanner = new scanner_1.Scanner(code, this.errorHandler);\n\t this.scanner.trackComment = config ? (typeof config.comment === 'boolean' && config.comment) : false;\n\t this.trackRange = config ? (typeof config.range === 'boolean' && config.range) : false;\n\t this.trackLoc = config ? (typeof config.loc === 'boolean' && config.loc) : false;\n\t this.buffer = [];\n\t this.reader = new Reader();\n\t }\n\t Tokenizer.prototype.errors = function () {\n\t return this.errorHandler.errors;\n\t };\n\t Tokenizer.prototype.getNextToken = function () {\n\t if (this.buffer.length === 0) {\n\t var comments = this.scanner.scanComments();\n\t if (this.scanner.trackComment) {\n\t for (var i = 0; i < comments.length; ++i) {\n\t var e = comments[i];\n\t var value = this.scanner.source.slice(e.slice[0], e.slice[1]);\n\t var comment = {\n\t type: e.multiLine ? 'BlockComment' : 'LineComment',\n\t value: value\n\t };\n\t if (this.trackRange) {\n\t comment.range = e.range;\n\t }\n\t if (this.trackLoc) {\n\t comment.loc = e.loc;\n\t }\n\t this.buffer.push(comment);\n\t }\n\t }\n\t if (!this.scanner.eof()) {\n\t var loc = void 0;\n\t if (this.trackLoc) {\n\t loc = {\n\t start: {\n\t line: this.scanner.lineNumber,\n\t column: this.scanner.index - this.scanner.lineStart\n\t },\n\t end: {}\n\t };\n\t }\n\t var startRegex = (this.scanner.source[this.scanner.index] === '/') && this.reader.isRegexStart();\n\t var token = startRegex ? this.scanner.scanRegExp() : this.scanner.lex();\n\t this.reader.push(token);\n\t var entry = {\n\t type: token_1.TokenName[token.type],\n\t value: this.scanner.source.slice(token.start, token.end)\n\t };\n\t if (this.trackRange) {\n\t entry.range = [token.start, token.end];\n\t }\n\t if (this.trackLoc) {\n\t loc.end = {\n\t line: this.scanner.lineNumber,\n\t column: this.scanner.index - this.scanner.lineStart\n\t };\n\t entry.loc = loc;\n\t }\n\t if (token.type === 9 /* RegularExpression */) {\n\t var pattern = token.pattern;\n\t var flags = token.flags;\n\t entry.regex = { pattern: pattern, flags: flags };\n\t }\n\t this.buffer.push(entry);\n\t }\n\t }\n\t return this.buffer.shift();\n\t };\n\t return Tokenizer;\n\t}());\n\texports.Tokenizer = Tokenizer;\n\n\n/***/ }\n/******/ ])\n});\n;","'use strict';\n\n/*eslint-disable no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// Simplified test for values allowed after the first character in plain style.\nfunction isPlainSafe(c) {\n // Uses a subset of nb-char - c-flow-indicator - \":\" - \"#\"\n // where nb-char ::= c-printable - b-char - c-byte-order-mark.\n return isPrintable(c) && c !== 0xFEFF\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // - \":\" - \"#\"\n && c !== CHAR_COLON\n && c !== CHAR_SHARP;\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {\n var i;\n var char;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(string.charCodeAt(0))\n && !isWhitespace(string.charCodeAt(string.length - 1));\n\n if (singleLineOnly) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char);\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char);\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n return plain && !testAmbiguousType(string)\n ? STYLE_PLAIN : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey) {\n state.dump = (function () {\n if (string.length === 0) {\n return \"''\";\n }\n if (!state.noCompatMode &&\n DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {\n return \"'\" + string + \"'\";\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string, lineWidth) + '\"';\n default:\n throw new YAMLException('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char, nextChar;\n var escapeSeq;\n\n for (var i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n // Check for surrogate pairs (reference Unicode 3.0 section \"3.7 Surrogates\").\n if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) {\n nextChar = string.charCodeAt(i + 1);\n if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) {\n // Combine the surrogate pair and store it escaped.\n result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);\n // Advance index one extra since we already used that char here.\n i++; continue;\n }\n }\n escapeSeq = ESCAPE_SEQUENCES[char];\n result += !escapeSeq && isPrintable(char)\n ? string[i]\n : escapeSeq || encodeHex(char);\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level, object[index], false, false)) {\n if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level + 1, object[index], true, true)) {\n if (!compact || index !== 0) {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = state.condenseFlow ? '\"' : '';\n\n if (index !== 0) pairBuffer += ', ';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new YAMLException('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || index !== 0) {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n state.tag = explicit ? type.tag : '?';\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level;\n if (block && (state.dump.length !== 0)) {\n writeBlockSequence(state, arrayLevel, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, arrayLevel, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey);\n }\n } else {\n if (state.skipInvalid) return false;\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n state.dump = '!<' + state.tag + '> ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n if (writeNode(state, 0, input, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nfunction safeDump(input, options) {\n return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\nmodule.exports.dump = dump;\nmodule.exports.safeDump = safeDump;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar _invariant = require('fbjs/lib/invariant');\n\nif (process.env.NODE_ENV !== 'production') {\n var warning = require('fbjs/lib/warning');\n}\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function() {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (process.env.NODE_ENV !== 'production') {\n warning(\n typeof typeDef[propName] === 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactClass',\n ReactPropTypeLocationNames[location],\n propName\n );\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name)\n ? ReactClassInterface[name]\n : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(\n specPolicy === 'OVERRIDE_BASE',\n 'ReactClassInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n );\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(\n specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClassInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n );\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n isMixinValid,\n \"%s: You're attempting to include a mixin that is either null \" +\n 'or not an object. Check the mixins included by the component, ' +\n 'as well as any mixins they include themselves. ' +\n 'Expected object but got %s.',\n Constructor.displayName || 'ReactClass',\n spec === null ? null : typeofSpec\n );\n }\n }\n\n return;\n }\n\n _invariant(\n typeof spec !== 'function',\n \"ReactClass: You're attempting to \" +\n 'use a component class or function as a mixin. Instead, just use a ' +\n 'regular object.'\n );\n _invariant(\n !isValidElement(spec),\n \"ReactClass: You're attempting to \" +\n 'use a component as a mixin. Instead, just use a regular object.'\n );\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(\n isReactClassMethod &&\n (specPolicy === 'DEFINE_MANY_MERGED' ||\n specPolicy === 'DEFINE_MANY'),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n );\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n _invariant(\n !isReserved,\n 'ReactClass: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n );\n\n var isAlreadyDefined = name in Constructor;\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)\n ? ReactClassStaticInterface[name]\n : null;\n\n _invariant(\n specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClass: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n );\n\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n\n return;\n }\n\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n );\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(\n one[key] === undefined,\n 'mergeIntoWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n );\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis) {\n for (\n var _len = arguments.length,\n args = Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See %s',\n componentName\n );\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See %s',\n componentName\n );\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function() {\n this.__isMounted = true;\n }\n };\n\n var IsMountedPostMixin = {\n componentWillUnmount: function() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this.__didWarnIsMounted,\n '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n 'subscriptions and pending requests in componentWillUnmount to ' +\n 'prevent memory leaks.',\n (this.constructor && this.constructor.displayName) ||\n this.name ||\n 'Component'\n );\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function() {};\n _assign(\n ReactClassComponent.prototype,\n ReactComponent.prototype,\n ReactClassMixin\n );\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function(props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this instanceof Constructor,\n 'Something is calling a React component directly. Use a factory or ' +\n 'JSX instead. See: https://fb.me/react-legacyfactory'\n );\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (\n initialState === undefined &&\n this.getInitialState._isMockFunction\n ) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(\n typeof initialState === 'object' && !Array.isArray(initialState),\n '%s.getInitialState(): must return an object or null',\n Constructor.displayName || 'ReactCompositeComponent'\n );\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n );\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n !Constructor.prototype.componentShouldUpdate,\n '%s has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.componentWillRecieveProps,\n '%s has a method called ' +\n 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.UNSAFE_componentWillRecieveProps,\n '%s has a method called UNSAFE_componentWillRecieveProps(). ' +\n 'Did you mean UNSAFE_componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;\n","var React = require('react');\nvar createReactClass = require('create-react-class');\nvar PropTypes = require('prop-types');\nvar NotificationItem = require('./NotificationItem');\nvar Constants = require('./constants');\n\nvar NotificationContainer = createReactClass({\n\n propTypes: {\n position: PropTypes.string.isRequired,\n notifications: PropTypes.array.isRequired,\n getStyles: PropTypes.object\n },\n\n _style: {},\n\n componentWillMount: function() {\n // Fix position if width is overrided\n this._style = this.props.getStyles.container(this.props.position);\n\n if (this.props.getStyles.overrideWidth && (this.props.position === Constants.positions.tc || this.props.position === Constants.positions.bc)) {\n this._style.marginLeft = -(this.props.getStyles.overrideWidth / 2);\n }\n },\n\n render: function() {\n var self = this;\n var notifications;\n\n if ([Constants.positions.bl, Constants.positions.br, Constants.positions.bc].indexOf(this.props.position) > -1) {\n this.props.notifications.reverse();\n }\n\n notifications = this.props.notifications.map(function(notification) {\n return (\n React.createElement(NotificationItem, {\n ref: 'notification-' + notification.uid, \n key: notification.uid, \n notification: notification, \n getStyles: self.props.getStyles, \n onRemove: self.props.onRemove, \n noAnimation: self.props.noAnimation, \n allowHTML: self.props.allowHTML, \n children: self.props.children}\n )\n );\n });\n\n return (\n React.createElement(\"div\", {className: 'notifications-' + this.props.position, style: this._style}, \n notifications \n )\n );\n }\n});\n\n\nmodule.exports = NotificationContainer;\n","var React = require('react');\nvar createReactClass = require('create-react-class');\nvar PropTypes = require('prop-types');\nvar ReactDOM = require('react-dom');\nvar Constants = require('./constants');\nvar Helpers = require('./helpers');\nvar merge = require('object-assign');\n\n/* From Modernizr */\nvar whichTransitionEvent = function() {\n var el = document.createElement('fakeelement');\n var transition;\n var transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n\n Object.keys(transitions).forEach(function(transitionKey) {\n if (el.style[transitionKey] !== undefined) {\n transition = transitions[transitionKey];\n }\n });\n\n return transition;\n};\n\nvar NotificationItem = createReactClass({\n propTypes: {\n notification: PropTypes.object,\n getStyles: PropTypes.object,\n onRemove: PropTypes.func,\n allowHTML: PropTypes.bool,\n noAnimation: PropTypes.bool,\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element\n ])\n },\n\n getDefaultProps: function() {\n return {\n noAnimation: false,\n onRemove: function() {},\n allowHTML: false\n };\n },\n\n getInitialState: function() {\n return {\n visible: undefined,\n removed: false\n };\n },\n\n componentWillMount: function() {\n var getStyles = this.props.getStyles;\n var level = this.props.notification.level;\n var dismissible = this.props.notification.dismissible;\n\n this._noAnimation = this.props.noAnimation;\n\n this._styles = {\n notification: getStyles.byElement('notification')(level),\n title: getStyles.byElement('title')(level),\n dismiss: getStyles.byElement('dismiss')(level),\n messageWrapper: getStyles.byElement('messageWrapper')(level),\n actionWrapper: getStyles.byElement('actionWrapper')(level),\n action: getStyles.byElement('action')(level)\n };\n\n if (!dismissible || dismissible === 'none' || dismissible === 'button') {\n this._styles.notification.cursor = 'default';\n }\n },\n\n _styles: {},\n\n _notificationTimer: null,\n\n _height: 0,\n\n _noAnimation: null,\n\n _isMounted: false,\n\n _removeCount: 0,\n\n _getCssPropertyByPosition: function() {\n var position = this.props.notification.position;\n var css = {};\n\n switch (position) {\n case Constants.positions.tl:\n case Constants.positions.bl:\n css = {\n property: 'left',\n value: -200\n };\n break;\n\n case Constants.positions.tr:\n case Constants.positions.br:\n css = {\n property: 'right',\n value: -200\n };\n break;\n\n case Constants.positions.tc:\n css = {\n property: 'top',\n value: -100\n };\n break;\n\n case Constants.positions.bc:\n css = {\n property: 'bottom',\n value: -100\n };\n break;\n\n default:\n }\n\n return css;\n },\n\n _defaultAction: function(event) {\n var notification = this.props.notification;\n\n event.preventDefault();\n this._hideNotification();\n if (typeof notification.action.callback === 'function') {\n notification.action.callback();\n }\n },\n\n _hideNotification: function() {\n if (this._notificationTimer) {\n this._notificationTimer.clear();\n }\n\n if (this._isMounted) {\n this.setState({\n visible: false,\n removed: true\n });\n }\n\n if (this._noAnimation) {\n this._removeNotification();\n }\n },\n\n _removeNotification: function() {\n this.props.onRemove(this.props.notification.uid);\n },\n\n _dismiss: function() {\n if (!this.props.notification.dismissible) {\n return;\n }\n\n this._hideNotification();\n },\n\n _showNotification: function() {\n var self = this;\n setTimeout(function() {\n if (self._isMounted) {\n self.setState({\n visible: true\n });\n }\n }, 50);\n },\n\n _onTransitionEnd: function() {\n if (this._removeCount > 0) return;\n if (this.state.removed) {\n this._removeCount += 1;\n this._removeNotification();\n }\n },\n\n componentDidMount: function() {\n var self = this;\n var transitionEvent = whichTransitionEvent();\n var notification = this.props.notification;\n var element = ReactDOM.findDOMNode(this);\n\n this._height = element.offsetHeight;\n\n this._isMounted = true;\n\n // Watch for transition end\n if (!this._noAnimation) {\n if (transitionEvent) {\n element.addEventListener(transitionEvent, this._onTransitionEnd);\n } else {\n this._noAnimation = true;\n }\n }\n\n\n if (notification.autoDismiss) {\n this._notificationTimer = new Helpers.Timer(function() {\n self._hideNotification();\n }, notification.autoDismiss * 1000);\n }\n\n this._showNotification();\n },\n\n _handleMouseEnter: function() {\n var notification = this.props.notification;\n if (notification.autoDismiss) {\n this._notificationTimer.pause();\n }\n },\n\n _handleMouseLeave: function() {\n var notification = this.props.notification;\n if (notification.autoDismiss) {\n this._notificationTimer.resume();\n }\n },\n\n _handleNotificationClick: function() {\n var dismissible = this.props.notification.dismissible;\n if (dismissible === 'both' || dismissible === 'click' || dismissible === true) {\n this._dismiss();\n }\n },\n\n componentWillUnmount: function() {\n var element = ReactDOM.findDOMNode(this);\n var transitionEvent = whichTransitionEvent();\n element.removeEventListener(transitionEvent, this._onTransitionEnd);\n this._isMounted = false;\n },\n\n _allowHTML: function(string) {\n return { __html: string };\n },\n\n render: function() {\n var notification = this.props.notification;\n var className = 'notification notification-' + notification.level;\n var notificationStyle = merge({}, this._styles.notification);\n var cssByPos = this._getCssPropertyByPosition();\n var dismiss = null;\n var actionButton = null;\n var title = null;\n var message = null;\n\n if (this.state.visible) {\n className += ' notification-visible';\n } else if (this.state.visible === false) {\n className += ' notification-hidden';\n }\n\n if (notification.dismissible === 'none') {\n className += ' notification-not-dismissible';\n }\n\n if (this.props.getStyles.overrideStyle) {\n if (!this.state.visible && !this.state.removed) {\n notificationStyle[cssByPos.property] = cssByPos.value;\n }\n\n if (this.state.visible && !this.state.removed) {\n notificationStyle.height = this._height;\n notificationStyle[cssByPos.property] = 0;\n }\n\n if (this.state.removed) {\n notificationStyle.overlay = 'hidden';\n notificationStyle.height = 0;\n notificationStyle.marginTop = 0;\n notificationStyle.paddingTop = 0;\n notificationStyle.paddingBottom = 0;\n }\n notificationStyle.opacity = this.state.visible ? this._styles.notification.isVisible.opacity : this._styles.notification.isHidden.opacity;\n }\n\n if (notification.title) {\n title = React.createElement(\"h4\", {className: \"notification-title\", style: this._styles.title}, notification.title);\n }\n\n if (notification.message) {\n if (this.props.allowHTML) {\n message = (\n React.createElement(\"div\", {className: \"notification-message\", style: this._styles.messageWrapper, dangerouslySetInnerHTML: this._allowHTML(notification.message) })\n );\n } else {\n message = (\n React.createElement(\"div\", {className: \"notification-message\", style: this._styles.messageWrapper}, notification.message)\n );\n }\n }\n if (notification.dismissible === 'both' || notification.dismissible === 'button' || notification.dismissible === true) {\n dismiss = React.createElement(\"span\", {className: \"notification-dismiss\", onClick: this._dismiss, style: this._styles.dismiss}, \"×\");\n }\n\n if (notification.action) {\n actionButton = (\n React.createElement(\"div\", {className: \"notification-action-wrapper\", style: this._styles.actionWrapper}, \n React.createElement(\"button\", {className: \"notification-action-button\", \n onClick: this._defaultAction, \n style: this._styles.action}, \n notification.action.label\n )\n )\n );\n }\n\n if (notification.children) {\n actionButton = notification.children;\n }\n\n return (\n React.createElement(\"div\", {className: className, onClick: this._handleNotificationClick, onMouseEnter: this._handleMouseEnter, onMouseLeave: this._handleMouseLeave, style: notificationStyle }, \n title, \n message, \n dismiss, \n actionButton \n )\n );\n }\n\n});\n\nmodule.exports = NotificationItem;\n","var Helpers = {\n Timer: function(callback, delay) {\n var timerId;\n var start;\n var remaining = delay;\n\n this.pause = function() {\n clearTimeout(timerId);\n remaining -= new Date() - start;\n };\n\n this.resume = function() {\n start = new Date();\n clearTimeout(timerId);\n timerId = setTimeout(callback, remaining);\n };\n\n this.clear = function() {\n clearTimeout(timerId);\n };\n\n this.resume();\n }\n};\n\nmodule.exports = Helpers;\n","// Used for calculations\nvar defaultWidth = 320;\nvar defaultColors = {\n success: {\n rgb: '94, 164, 0',\n hex: '#5ea400'\n },\n error: {\n rgb: '236, 61, 61',\n hex: '#ec3d3d'\n },\n warning: {\n rgb: '235, 173, 23',\n hex: '#ebad1a'\n },\n info: {\n rgb: '54, 156, 199',\n hex: '#369cc7'\n }\n};\nvar defaultShadowOpacity = '0.9';\n\nvar STYLES = {\n\n Wrapper: {},\n Containers: {\n DefaultStyle: {\n fontFamily: 'inherit',\n position: 'fixed',\n width: defaultWidth,\n padding: '0 10px 10px 10px',\n zIndex: 9998,\n WebkitBoxSizing: 'border-box',\n MozBoxSizing: 'border-box',\n boxSizing: 'border-box',\n height: 'auto'\n },\n\n tl: {\n top: '0px',\n bottom: 'auto',\n left: '0px',\n right: 'auto'\n },\n\n tr: {\n top: '0px',\n bottom: 'auto',\n left: 'auto',\n right: '0px'\n },\n\n tc: {\n top: '0px',\n bottom: 'auto',\n margin: '0 auto',\n left: '50%',\n marginLeft: -(defaultWidth / 2)\n },\n\n bl: {\n top: 'auto',\n bottom: '0px',\n left: '0px',\n right: 'auto'\n },\n\n br: {\n top: 'auto',\n bottom: '0px',\n left: 'auto',\n right: '0px'\n },\n\n bc: {\n top: 'auto',\n bottom: '0px',\n margin: '0 auto',\n left: '50%',\n marginLeft: -(defaultWidth / 2)\n }\n\n },\n\n NotificationItem: {\n DefaultStyle: {\n position: 'relative',\n width: '100%',\n cursor: 'pointer',\n borderRadius: '2px',\n fontSize: '13px',\n margin: '10px 0 0',\n padding: '10px',\n display: 'block',\n WebkitBoxSizing: 'border-box',\n MozBoxSizing: 'border-box',\n boxSizing: 'border-box',\n opacity: 0,\n transition: '0.3s ease-in-out',\n WebkitTransform: 'translate3d(0, 0, 0)',\n transform: 'translate3d(0, 0, 0)',\n willChange: 'transform, opacity',\n\n isHidden: {\n opacity: 0\n },\n\n isVisible: {\n opacity: 1\n }\n },\n\n success: {\n borderTop: '2px solid ' + defaultColors.success.hex,\n backgroundColor: '#f0f5ea',\n color: '#4b583a',\n WebkitBoxShadow: '0 0 1px rgba(' + defaultColors.success.rgb + ',' + defaultShadowOpacity + ')',\n MozBoxShadow: '0 0 1px rgba(' + defaultColors.success.rgb + ',' + defaultShadowOpacity + ')',\n boxShadow: '0 0 1px rgba(' + defaultColors.success.rgb + ',' + defaultShadowOpacity + ')'\n },\n\n error: {\n borderTop: '2px solid ' + defaultColors.error.hex,\n backgroundColor: '#f4e9e9',\n color: '#412f2f',\n WebkitBoxShadow: '0 0 1px rgba(' + defaultColors.error.rgb + ',' + defaultShadowOpacity + ')',\n MozBoxShadow: '0 0 1px rgba(' + defaultColors.error.rgb + ',' + defaultShadowOpacity + ')',\n boxShadow: '0 0 1px rgba(' + defaultColors.error.rgb + ',' + defaultShadowOpacity + ')'\n },\n\n warning: {\n borderTop: '2px solid ' + defaultColors.warning.hex,\n backgroundColor: '#f9f6f0',\n color: '#5a5343',\n WebkitBoxShadow: '0 0 1px rgba(' + defaultColors.warning.rgb + ',' + defaultShadowOpacity + ')',\n MozBoxShadow: '0 0 1px rgba(' + defaultColors.warning.rgb + ',' + defaultShadowOpacity + ')',\n boxShadow: '0 0 1px rgba(' + defaultColors.warning.rgb + ',' + defaultShadowOpacity + ')'\n },\n\n info: {\n borderTop: '2px solid ' + defaultColors.info.hex,\n backgroundColor: '#e8f0f4',\n color: '#41555d',\n WebkitBoxShadow: '0 0 1px rgba(' + defaultColors.info.rgb + ',' + defaultShadowOpacity + ')',\n MozBoxShadow: '0 0 1px rgba(' + defaultColors.info.rgb + ',' + defaultShadowOpacity + ')',\n boxShadow: '0 0 1px rgba(' + defaultColors.info.rgb + ',' + defaultShadowOpacity + ')'\n }\n },\n\n Title: {\n DefaultStyle: {\n fontSize: '14px',\n margin: '0 0 5px 0',\n padding: 0,\n fontWeight: 'bold'\n },\n\n success: {\n color: defaultColors.success.hex\n },\n\n error: {\n color: defaultColors.error.hex\n },\n\n warning: {\n color: defaultColors.warning.hex\n },\n\n info: {\n color: defaultColors.info.hex\n }\n\n },\n\n MessageWrapper: {\n DefaultStyle: {\n margin: 0,\n padding: 0\n }\n },\n\n Dismiss: {\n DefaultStyle: {\n cursor: 'pointer',\n fontFamily: 'Arial',\n fontSize: '17px',\n position: 'absolute',\n top: '4px',\n right: '5px',\n lineHeight: '15px',\n backgroundColor: '#dededf',\n color: '#ffffff',\n borderRadius: '50%',\n width: '14px',\n height: '14px',\n fontWeight: 'bold',\n textAlign: 'center'\n },\n\n success: {\n color: '#f0f5ea',\n backgroundColor: '#b0ca92'\n },\n\n error: {\n color: '#f4e9e9',\n backgroundColor: '#e4bebe'\n },\n\n warning: {\n color: '#f9f6f0',\n backgroundColor: '#e1cfac'\n },\n\n info: {\n color: '#e8f0f4',\n backgroundColor: '#a4becb'\n }\n },\n\n Action: {\n DefaultStyle: {\n background: '#ffffff',\n borderRadius: '2px',\n padding: '6px 20px',\n fontWeight: 'bold',\n margin: '10px 0 0 0',\n border: 0\n },\n\n success: {\n backgroundColor: defaultColors.success.hex,\n color: '#ffffff'\n },\n\n error: {\n backgroundColor: defaultColors.error.hex,\n color: '#ffffff'\n },\n\n warning: {\n backgroundColor: defaultColors.warning.hex,\n color: '#ffffff'\n },\n\n info: {\n backgroundColor: defaultColors.info.hex,\n color: '#ffffff'\n }\n },\n\n ActionWrapper: {\n DefaultStyle: {\n margin: 0,\n padding: 0\n }\n }\n};\n\nmodule.exports = STYLES;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = deprecated;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar warned = {};\n\nfunction deprecated(validator, reason) {\n return function validate(props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<<anonymous>>';\n var propFullNameSafe = propFullName || propName;\n\n if (props[propName] != null) {\n var messageKey = componentName + '.' + propName;\n\n (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.'));\n\n warned[messageKey] = true;\n }\n\n for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n args[_key - 5] = arguments[_key];\n }\n\n return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));\n };\n}\n\n/* eslint-disable no-underscore-dangle */\nfunction _resetWarned() {\n warned = {};\n}\n\ndeprecated._resetWarned = _resetWarned;\n/* eslint-enable no-underscore-dangle */\n\nmodule.exports = exports['default'];","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.uncontrolledPropTypes = uncontrolledPropTypes;\nexports.isProp = isProp;\nexports.defaultKey = defaultKey;\nexports.isReactComponent = isReactComponent;\n\nvar _invariant = _interopRequireDefault(require(\"invariant\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar noop = function noop() {};\n\nfunction readOnlyPropType(handler, name) {\n return function (props, propName) {\n if (props[propName] !== undefined) {\n if (!props[handler]) {\n return new Error(\"You have provided a `\" + propName + \"` prop to `\" + name + \"` \" + (\"without an `\" + handler + \"` handler prop. This will render a read-only field. \") + (\"If the field should be mutable use `\" + defaultKey(propName) + \"`. \") + (\"Otherwise, set `\" + handler + \"`.\"));\n }\n }\n };\n}\n\nfunction uncontrolledPropTypes(controlledValues, displayName) {\n var propTypes = {};\n Object.keys(controlledValues).forEach(function (prop) {\n // add default propTypes for folks that use runtime checks\n propTypes[defaultKey(prop)] = noop;\n\n if (process.env.NODE_ENV !== 'production') {\n var handler = controlledValues[prop];\n !(typeof handler === 'string' && handler.trim().length) ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop) : invariant(false) : void 0;\n propTypes[prop] = readOnlyPropType(handler, displayName);\n }\n });\n return propTypes;\n}\n\nfunction isProp(props, prop) {\n return props[prop] !== undefined;\n}\n\nfunction defaultKey(key) {\n return 'default' + key.charAt(0).toUpperCase() + key.substr(1);\n}\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\nfunction isReactComponent(component) {\n return !!(component && component.prototype && component.prototype.isReactComponent);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _events = _interopRequireDefault(require(\"dom-helpers/events\"));\n\nvar _style = _interopRequireDefault(require(\"dom-helpers/style\"));\n\nvar _height = _interopRequireDefault(require(\"dom-helpers/query/height\"));\n\nvar _properties = require(\"dom-helpers/transition/properties\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _Transition = _interopRequireWildcard(require(\"react-transition-group/Transition\"));\n\nvar _transitionClasses;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar transitionClasses = (_transitionClasses = {}, _transitionClasses[_Transition.ENTERING] = 'rw-popup-transition-entering', _transitionClasses[_Transition.EXITING] = 'rw-popup-transition-exiting', _transitionClasses[_Transition.EXITED] = 'rw-popup-transition-exited', _transitionClasses);\nvar propTypes = {\n in: _propTypes.default.bool.isRequired,\n dropUp: _propTypes.default.bool,\n onEntering: _propTypes.default.func,\n onEntered: _propTypes.default.func\n};\n\nfunction parseDuration(node) {\n var str = (0, _style.default)(node, _properties.transitionDuration);\n var mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\n\nvar SlideDownTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(SlideDownTransition, _React$Component);\n\n function SlideDownTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.setContainerHeight = function (elem) {\n elem.style.height = _this.getHeight() + 'px';\n };\n\n _this.clearContainerHeight = function (elem) {\n elem.style.height = '';\n };\n\n _this.handleEntered = function (elem) {\n _this.clearContainerHeight(elem);\n\n if (_this.props.onEntered) _this.props.onEntered();\n };\n\n _this.handleEntering = function () {\n if (_this.props.onEntering) _this.props.onEntering();\n };\n\n _this.handleTransitionEnd = function (node, done) {\n var duration = parseDuration(node.lastChild) || 0;\n\n var handler = function handler() {\n _events.default.off(node, _properties.transitionEnd, handler, false);\n\n done();\n };\n\n setTimeout(handler, duration * 1.5);\n\n _events.default.on(node, _properties.transitionEnd, handler, false);\n };\n\n _this.attachRef = function (ref) {\n return _this.element = ref;\n };\n\n return _this;\n }\n\n var _proto = SlideDownTransition.prototype;\n\n _proto.getHeight = function getHeight() {\n var container = this.element;\n var content = container.firstChild;\n var margin = parseInt((0, _style.default)(content, 'margin-top'), 10) + parseInt((0, _style.default)(content, 'margin-bottom'), 10);\n var old = container.style.display;\n var height;\n container.style.display = 'block';\n height = ((0, _height.default)(content) || 0) + (isNaN(margin) ? 0 : margin);\n container.style.display = old;\n return height;\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n children = _this$props.children,\n className = _this$props.className,\n dropUp = _this$props.dropUp;\n return _react.default.createElement(_Transition.default, {\n appear: true,\n in: this.props.in,\n timeout: 5000,\n onEnter: this.setContainerHeight,\n onEntering: this.handleEntering,\n onEntered: this.handleEntered,\n onExit: this.setContainerHeight,\n onExited: this.clearContainerHeight,\n addEndListener: this.handleTransitionEnd\n }, function (status, innerProps) {\n return _react.default.createElement(\"div\", _extends({}, innerProps, {\n ref: _this2.attachRef,\n className: (0, _classnames.default)(className, dropUp && 'rw-dropup', transitionClasses[status])\n }), _react.default.createElement(\"div\", {\n className: \"rw-popup-transition\"\n }, children));\n });\n };\n\n return SlideDownTransition;\n}(_react.default.Component);\n\nSlideDownTransition.propTypes = propTypes;\nvar _default = SlideDownTransition;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = filterEvents;\n\nvar _contains = _interopRequireDefault(require(\"../query/contains\"));\n\nvar _querySelectorAll = _interopRequireDefault(require(\"../query/querySelectorAll\"));\n\nfunction filterEvents(selector, handler) {\n return function filterHandler(e) {\n var top = e.currentTarget,\n target = e.target,\n matches = (0, _querySelectorAll.default)(top, selector);\n if (matches.some(function (match) {\n return (0, _contains.default)(match, target);\n })) handler.call(this, e);\n };\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar _on = _interopRequireDefault(require(\"./on\"));\n\nvar _off = _interopRequireDefault(require(\"./off\"));\n\nvar listen = function listen() {};\n\nif (_inDOM.default) {\n listen = function listen(node, eventName, handler, capture) {\n (0, _on.default)(node, eventName, handler, capture);\n return function () {\n (0, _off.default)(node, eventName, handler, capture);\n };\n };\n}\n\nvar _default = listen;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = camelize;\nvar rHyphen = /-(.)/g;\n\nfunction camelize(string) {\n return string.replace(rHyphen, function (_, chr) {\n return chr.toUpperCase();\n });\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = hyphenateStyleName;\n\nvar _hyphenate = _interopRequireDefault(require(\"./hyphenate\"));\n\n/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\nvar msPattern = /^ms-/;\n\nfunction hyphenateStyleName(string) {\n return (0, _hyphenate.default)(string).replace(msPattern, '-ms-');\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = hyphenate;\nvar rUpper = /([A-Z])/g;\n\nfunction hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = _getComputedStyle;\n\nvar _camelizeStyle = _interopRequireDefault(require(\"../util/camelizeStyle\"));\n\nvar rposition = /^(top|right|bottom|left)$/;\nvar rnumnonpx = /^([+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|))(?!px)[a-z%]+$/i;\n\nfunction _getComputedStyle(node) {\n if (!node) throw new TypeError('No Element passed to `getComputedStyle()`');\n var doc = node.ownerDocument;\n return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : {\n //ie 8 \"magic\" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72\n getPropertyValue: function getPropertyValue(prop) {\n var style = node.style;\n prop = (0, _camelizeStyle.default)(prop);\n if (prop == 'float') prop = 'styleFloat';\n var current = node.currentStyle[prop] || null;\n if (current == null && style && style[prop]) current = style[prop];\n\n if (rnumnonpx.test(current) && !rposition.test(prop)) {\n // Remember the original values\n var left = style.left;\n var runStyle = node.runtimeStyle;\n var rsLeft = runStyle && runStyle.left; // Put in the new values to get a computed value out\n\n if (rsLeft) runStyle.left = node.currentStyle.left;\n style.left = prop === 'fontSize' ? '1em' : current;\n current = style.pixelLeft + 'px'; // Revert the changed values\n\n style.left = left;\n if (rsLeft) runStyle.left = rsLeft;\n }\n\n return current;\n }\n };\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = removeStyle;\n\nfunction removeStyle(node, key) {\n return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key);\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = isTransform;\nvar supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\n\nfunction isTransform(property) {\n return !!(property && supportedTransforms.test(property));\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.classNamesShape = exports.timeoutsShape = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar timeoutsShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({\n enter: _propTypes.default.number,\n exit: _propTypes.default.number,\n appear: _propTypes.default.number\n}).isRequired]) : null;\nexports.timeoutsShape = timeoutsShape;\nvar classNamesShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({\n enter: _propTypes.default.string,\n exit: _propTypes.default.string,\n active: _propTypes.default.string\n}), _propTypes.default.shape({\n enter: _propTypes.default.string,\n enterDone: _propTypes.default.string,\n enterActive: _propTypes.default.string,\n exit: _propTypes.default.string,\n exitDone: _propTypes.default.string,\n exitActive: _propTypes.default.string\n})]) : null;\nexports.classNamesShape = classNamesShape;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIs = require('react-is');\n\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction elementType(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n\n if (_react2.default.isValidElement(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).');\n }\n\n if (!(0, _reactIs.isValidElementType)(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).');\n }\n\n return null;\n}\n\nexports.default = (0, _createChainableTypeChecker2.default)(elementType);\nmodule.exports = exports['default'];","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.0\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = require(\"react-dom\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _uncontrollable = _interopRequireDefault(require(\"uncontrollable\"));\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _reactComponentManagers = require(\"react-component-managers\");\n\nvar _Widget = _interopRequireDefault(require(\"./Widget\"));\n\nvar _Header = _interopRequireDefault(require(\"./Header\"));\n\nvar _Footer = _interopRequireDefault(require(\"./Footer\"));\n\nvar _Month = _interopRequireDefault(require(\"./Month\"));\n\nvar _Year = _interopRequireDefault(require(\"./Year\"));\n\nvar _Decade = _interopRequireDefault(require(\"./Decade\"));\n\nvar _Century = _interopRequireDefault(require(\"./Century\"));\n\nvar _messages = require(\"./messages\");\n\nvar _SlideTransitionGroup = _interopRequireDefault(require(\"./SlideTransitionGroup\"));\n\nvar _focusManager = _interopRequireDefault(require(\"./util/focusManager\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nvar _widgetHelpers = require(\"./util/widgetHelpers\");\n\nvar _interaction = require(\"./util/interaction\");\n\nvar _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _class3, _temp;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object['ke' + 'ys'](descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object['define' + 'Property'](target, property, desc); desc = null; } return desc; }\n\nfunction _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.'); }\n\nvar last = function last(a) {\n return a[a.length - 1];\n};\n\nvar VIEW_UNIT = {\n month: 'day',\n year: 'month',\n decade: 'year',\n century: 'decade'\n};\nvar VIEW_OPTIONS = ['month', 'year', 'decade', 'century'];\nvar VIEW = {\n month: _Month.default,\n year: _Year.default,\n decade: _Decade.default,\n century: _Century.default\n};\nvar ARROWS_TO_DIRECTION = {\n ArrowDown: 'DOWN',\n ArrowUp: 'UP',\n ArrowRight: 'RIGHT',\n ArrowLeft: 'LEFT'\n};\nvar OPPOSITE_DIRECTION = {\n LEFT: 'RIGHT',\n RIGHT: 'LEFT'\n};\nvar MULTIPLIER = {\n year: 1,\n decade: 10,\n century: 100\n};\n\nfunction inRangeValue(_value, min, max) {\n var value = dateOrNull(_value);\n if (value === null) return value;\n return _dates.default.max(_dates.default.min(value, max), min);\n}\n\nvar propTypes = {\n /** @ignore */\n activeId: _propTypes.default.string,\n\n /**\n * @example ['disabled', ['new Date()']]\n */\n disabled: CustomPropTypes.disabled,\n\n /**\n * @example ['readOnly', ['new Date()']]\n */\n readOnly: CustomPropTypes.disabled,\n\n /**\n * @example ['onChangePicker', [ ['new Date()'] ]]\n */\n onChange: _propTypes.default.func,\n\n /**\n * @example ['valuePicker', [ ['new Date()'] ]]\n */\n value: _propTypes.default.instanceOf(Date),\n\n /**\n * The minimum date that the Calendar can navigate from.\n *\n * @example ['prop', ['min', 'new Date()']]\n */\n min: _propTypes.default.instanceOf(Date).isRequired,\n\n /**\n * The maximum date that the Calendar can navigate to.\n *\n * @example ['prop', ['max', 'new Date()']]\n */\n max: _propTypes.default.instanceOf(Date).isRequired,\n\n /**\n * Default current date at which the calendar opens. If none is provided, opens at today's date or the `value` date (if any).\n */\n currentDate: _propTypes.default.instanceOf(Date),\n\n /**\n * Change event Handler that is called when the currentDate is changed. The handler is called with the currentDate object.\n */\n onCurrentDateChange: _propTypes.default.func,\n\n /** Specify the navigate into the past header icon */\n navigatePrevIcon: _propTypes.default.node,\n\n /** Specify the navigate into the future header icon */\n navigateNextIcon: _propTypes.default.node,\n\n /**\n * Controls the currently displayed calendar view. Use `defaultView` to set a unique starting view.\n *\n * @type {(\"month\"|\"year\"|\"decade\"|\"century\")}\n * @controllable onViewChange\n */\n view: function view(props) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return _propTypes.default.oneOf(props.views || VIEW_OPTIONS).apply(void 0, [props].concat(args));\n },\n\n /**\n * Defines a list of views the Calendar can traverse through, starting with the\n * first in the list to the last.\n *\n * @type array<\"month\"|\"year\"|\"decade\"|\"century\">\n */\n views: _propTypes.default.arrayOf(_propTypes.default.oneOf(VIEW_OPTIONS)).isRequired,\n\n /**\n * A callback fired when the `view` changes.\n *\n * @controllable view\n */\n onViewChange: _propTypes.default.func,\n\n /**\n * Callback fired when the Calendar navigates between views, or forward and backwards in time.\n *\n * @type function(date: ?Date, direction: string, view: string)\n */\n onNavigate: _propTypes.default.func,\n culture: _propTypes.default.string,\n autoFocus: _propTypes.default.bool,\n\n /**\n * Show or hide the Calendar footer.\n *\n * @example ['prop', ['footer', true]]\n */\n footer: _propTypes.default.bool,\n\n /**\n * Provide a custom component to render the days of the month. The Component is provided the following props\n *\n * - `date`: a `Date` object for the day of the month to render\n * - `label`: a formatted `string` of the date to render. To adjust the format of the `label` string use the `dateFormat` prop, listed below.\n */\n dayComponent: CustomPropTypes.elementType,\n\n /**\n * A formatter for the header button of the month view.\n *\n * @example ['dateFormat', ['headerFormat', \"{ date: 'medium' }\"]]\n */\n headerFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter for the Calendar footer, formats today's Date as a string.\n *\n * @example ['dateFormat', ['footerFormat', \"{ date: 'medium' }\", \"date => 'Today is: ' + formatter(date)\"]]\n */\n footerFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter calendar days of the week, the default formats each day as a Narrow name: \"Mo\", \"Tu\", etc.\n *\n * @example ['prop', { dayFormat: \"day => \\n['🎉', 'M', 'T','W','Th', 'F', '🎉'][day.getDay()]\" }]\n */\n dayFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter for day of the month\n *\n * @example ['prop', { dateFormat: \"dt => String(dt.getDate())\" }]\n */\n dateFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter for month name.\n *\n * @example ['dateFormat', ['monthFormat', \"{ raw: 'MMMM' }\", null, { defaultView: '\"year\"' }]]\n */\n monthFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter for month name.\n *\n * @example ['dateFormat', ['yearFormat', \"{ raw: 'yy' }\", null, { defaultView: '\"decade\"' }]]\n */\n yearFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter for decade, the default formats the first and last year of the decade like: 2000 - 2009.\n */\n decadeFormat: CustomPropTypes.dateFormat,\n\n /**\n * A formatter for century, the default formats the first and last year of the century like: 1900 - 1999.\n */\n centuryFormat: CustomPropTypes.dateFormat,\n isRtl: _propTypes.default.bool,\n messages: _propTypes.default.shape({\n moveBack: _propTypes.default.string,\n moveForward: _propTypes.default.string\n }),\n onKeyDown: _propTypes.default.func,\n\n /** @ignore */\n tabIndex: _propTypes.default.any\n /**\n * ---\n * localized: true\n * shortcuts:\n * - { key: ctrl + down arrow, label: navigate to next view }\n * - { key: ctrl + up arrow, label: navigate to previous view }\n * - { key: ctrl + left arrow, label: \"navigate to previous: month, year, decade, or century\" }\n * - { key: ctrl + right arrow, label: \"navigate to next: month, year, decade, or century\" }\n * - { key: left arrow, label: move focus to previous date}\n * - { key: right arrow, label: move focus to next date }\n * - { key: up arrow, label: move focus up within view }\n * - { key: down key, label: move focus down within view }\n * ---\n *\n * @public\n */\n\n};\n\nvar Calendar = (0, _reactLifecyclesCompat.polyfill)(_class = (_class2 = (_temp = _class3 =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Calendar, _React$Component);\n\n Calendar.move = function move(date, min, max, unit, direction) {\n var isMonth = unit === 'month';\n var isUpOrDown = direction === 'UP' || direction === 'DOWN';\n var rangeUnit = VIEW_UNIT[unit];\n var addUnit = isMonth && isUpOrDown ? 'week' : VIEW_UNIT[unit];\n var amount = isMonth || !isUpOrDown ? 1 : 4;\n var newDate;\n if (direction === 'UP' || direction === 'LEFT') amount *= -1;\n newDate = _dates.default.add(date, amount, addUnit);\n return _dates.default.inRange(newDate, min, max, rangeUnit) ? newDate : date;\n };\n\n function Calendar() {\n var _this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handleFocusWillChange = function () {\n if (_this.props.tabIndex == -1) return false;\n };\n\n _initializerDefineProperty(_this, \"handleViewChange\", _descriptor, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleMoveBack\", _descriptor2, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleMoveForward\", _descriptor3, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleChange\", _descriptor4, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleFooterClick\", _descriptor5, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _initializerDefineProperty(_this, \"handleKeyDown\", _descriptor6, _assertThisInitialized(_assertThisInitialized(_this)));\n\n _this.viewId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_calendar');\n _this.labelId = (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_calendar_label');\n _this.activeId = _this.props.activeId || (0, _widgetHelpers.instanceId)(_assertThisInitialized(_assertThisInitialized(_this)), '_calendar_active_cell');\n (0, _reactComponentManagers.autoFocus)(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.focusManager = (0, _focusManager.default)(_assertThisInitialized(_assertThisInitialized(_this)), {\n willHandle: _this.handleFocusWillChange\n });\n var _this$props = _this.props,\n view = _this$props.view,\n views = _this$props.views;\n _this.state = {\n selectedIndex: 0,\n view: view || views[0]\n };\n return _this;\n }\n\n Calendar.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var messages = _ref.messages,\n view = _ref.view,\n views = _ref.views,\n value = _ref.value,\n currentDate = _ref.currentDate;\n view = view || views[0];\n var slideDirection = prevState.slideDirection,\n lastView = prevState.view,\n lastDate = prevState.currentDate;\n\n if (lastView !== view) {\n slideDirection = views.indexOf(lastView) > views.indexOf(view) ? 'top' : 'bottom';\n } else if (lastDate !== currentDate) {\n slideDirection = _dates.default.gt(currentDate, lastDate) ? 'left' : 'right';\n }\n\n return {\n view: view,\n slideDirection: slideDirection,\n messages: (0, _messages.getMessages)(messages),\n currentDate: currentDate || value || new Date()\n };\n };\n\n var _proto = Calendar.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props2 = this.props,\n value = _this$props2.value,\n min = _this$props2.min,\n max = _this$props2.max;\n var view = this.state.view;\n value = inRangeValue(value, min, max);\n if (!_dates.default.eq(value, dateOrNull(prevProps.value), VIEW_UNIT[view])) this.maybeSetCurrentDate(value);\n };\n\n _proto.render = function render() {\n var _this$props3 = this.props,\n className = _this$props3.className,\n value = _this$props3.value,\n footerFormat = _this$props3.footerFormat,\n disabled = _this$props3.disabled,\n readOnly = _this$props3.readOnly,\n footer = _this$props3.footer,\n views = _this$props3.views,\n min = _this$props3.min,\n max = _this$props3.max,\n culture = _this$props3.culture,\n tabIndex = _this$props3.tabIndex;\n var _this$state = this.state,\n currentDate = _this$state.currentDate,\n view = _this$state.view,\n slideDirection = _this$state.slideDirection,\n focused = _this$state.focused,\n messages = _this$state.messages;\n var View = VIEW[view],\n todaysDate = new Date(),\n todayNotInRange = !_dates.default.inRange(todaysDate, min, max, view);\n\n var key = view + '_' + _dates.default[view](currentDate);\n\n var elementProps = Props.pickElementProps(this),\n viewProps = Props.pick(this.props, View);\n var isDisabled = disabled || readOnly;\n return _react.default.createElement(_Widget.default, _extends({}, elementProps, {\n role: \"group\",\n focused: focused,\n disabled: disabled,\n readOnly: readOnly,\n tabIndex: tabIndex || 0,\n onKeyDown: this.handleKeyDown,\n onBlur: this.focusManager.handleBlur,\n onFocus: this.focusManager.handleFocus,\n className: (0, _classnames.default)(className, 'rw-calendar rw-widget-container'),\n \"aria-activedescendant\": this.activeId\n }), _react.default.createElement(_Header.default, {\n isRtl: this.isRtl(),\n label: this.getHeaderLabel(),\n labelId: this.labelId,\n messages: messages,\n upDisabled: isDisabled || view === last(views),\n prevDisabled: isDisabled || !_dates.default.inRange(this.nextDate('LEFT'), min, max, view),\n nextDisabled: isDisabled || !_dates.default.inRange(this.nextDate('RIGHT'), min, max, view),\n onViewChange: this.handleViewChange,\n onMoveLeft: this.handleMoveBack,\n onMoveRight: this.handleMoveForward\n }), _react.default.createElement(Calendar.Transition, {\n direction: slideDirection\n }, _react.default.createElement(View, _extends({}, viewProps, {\n key: key,\n id: this.viewId,\n activeId: this.activeId,\n value: value,\n today: todaysDate,\n disabled: disabled,\n focused: currentDate,\n onChange: this.handleChange,\n onKeyDown: this.handleKeyDown,\n \"aria-labelledby\": this.labelId\n }))), footer && _react.default.createElement(_Footer.default, {\n value: todaysDate,\n format: footerFormat,\n culture: culture,\n disabled: disabled || todayNotInRange,\n readOnly: readOnly,\n onClick: this.handleFooterClick\n }));\n };\n\n _proto.navigate = function navigate(direction, date) {\n var _this$props4 = this.props,\n views = _this$props4.views,\n min = _this$props4.min,\n max = _this$props4.max,\n onNavigate = _this$props4.onNavigate,\n onViewChange = _this$props4.onViewChange;\n var _this$state2 = this.state,\n view = _this$state2.view,\n currentDate = _this$state2.currentDate;\n var slideDir = direction === 'LEFT' || direction === 'UP' ? 'right' : 'left';\n if (direction === 'UP') view = views[views.indexOf(view) + 1] || view;\n if (direction === 'DOWN') view = views[views.indexOf(view) - 1] || view;\n if (!date) date = ['LEFT', 'RIGHT'].indexOf(direction) !== -1 ? this.nextDate(direction) : currentDate;\n\n if (_dates.default.inRange(date, min, max, view)) {\n (0, _widgetHelpers.notify)(onNavigate, [date, slideDir, view]);\n this.focus(true);\n this.maybeSetCurrentDate(date);\n (0, _widgetHelpers.notify)(onViewChange, [view]);\n }\n };\n\n _proto.focus = function focus() {\n if (+this.props.tabIndex > -1) (0, _reactDom.findDOMNode)(this).focus();\n };\n\n _proto.maybeSetCurrentDate = function maybeSetCurrentDate(date) {\n var _this$props5 = this.props,\n min = _this$props5.min,\n max = _this$props5.max;\n var _this$state3 = this.state,\n view = _this$state3.view,\n currentDate = _this$state3.currentDate;\n var inRangeDate = inRangeValue(date ? new Date(date) : currentDate, min, max);\n if (date === currentDate || _dates.default.eq(inRangeDate, dateOrNull(currentDate), VIEW_UNIT[view])) return;\n (0, _widgetHelpers.notify)(this.props.onCurrentDateChange, inRangeDate);\n };\n\n _proto.nextDate = function nextDate(direction) {\n var method = direction === 'LEFT' ? 'subtract' : 'add';\n var _this$state4 = this.state,\n currentDate = _this$state4.currentDate,\n view = _this$state4.view;\n var unit = view === 'month' ? view : 'year';\n var multi = MULTIPLIER[view] || 1;\n return _dates.default[method](currentDate, 1 * multi, unit);\n };\n\n _proto.getHeaderLabel = function getHeaderLabel() {\n var _this$props6 = this.props,\n culture = _this$props6.culture,\n decadeFormat = _this$props6.decadeFormat,\n yearFormat = _this$props6.yearFormat,\n headerFormat = _this$props6.headerFormat,\n centuryFormat = _this$props6.centuryFormat;\n var _this$state5 = this.state,\n currentDate = _this$state5.currentDate,\n view = _this$state5.view;\n\n switch (view) {\n case 'month':\n headerFormat = _localizers.date.getFormat('header', headerFormat);\n return _localizers.date.format(currentDate, headerFormat, culture);\n\n case 'year':\n yearFormat = _localizers.date.getFormat('year', yearFormat);\n return _localizers.date.format(currentDate, yearFormat, culture);\n\n case 'decade':\n decadeFormat = _localizers.date.getFormat('decade', decadeFormat);\n return _localizers.date.format(_dates.default.startOf(currentDate, 'decade'), decadeFormat, culture);\n\n case 'century':\n centuryFormat = _localizers.date.getFormat('century', centuryFormat);\n return _localizers.date.format(_dates.default.startOf(currentDate, 'century'), centuryFormat, culture);\n }\n };\n\n _proto.isRtl = function isRtl() {\n return !!(this.props.isRtl || this.context && this.context.isRtl);\n };\n\n _proto.isValidView = function isValidView(next, views) {\n if (views === void 0) {\n views = this.props.views;\n }\n\n return views.indexOf(next) !== -1;\n };\n\n return Calendar;\n}(_react.default.Component), _class3.displayName = 'Calendar', _class3.propTypes = propTypes, _class3.defaultProps = {\n value: null,\n min: new Date(1900, 0, 1),\n max: new Date(2099, 11, 31),\n views: VIEW_OPTIONS,\n tabIndex: '0',\n footer: true\n}, _class3.contextTypes = {\n isRtl: _propTypes.default.bool\n}, _class3.Transition = _SlideTransitionGroup.default, _temp), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, \"handleViewChange\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this2 = this;\n\n return function () {\n _this2.navigate('UP');\n };\n }\n}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, \"handleMoveBack\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this3 = this;\n\n return function () {\n _this3.navigate('LEFT');\n };\n }\n}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, \"handleMoveForward\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this4 = this;\n\n return function () {\n _this4.navigate('RIGHT');\n };\n }\n}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, \"handleChange\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this5 = this;\n\n return function (date) {\n var _this5$props = _this5.props,\n views = _this5$props.views,\n onChange = _this5$props.onChange;\n var view = _this5.state.view;\n\n if (views[0] === view) {\n _this5.maybeSetCurrentDate(date);\n\n (0, _widgetHelpers.notify)(onChange, date);\n\n _this5.focus();\n\n return;\n }\n\n _this5.navigate('DOWN', date);\n };\n }\n}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, \"handleFooterClick\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this6 = this;\n\n return function (date) {\n var _this6$props = _this6.props,\n views = _this6$props.views,\n min = _this6$props.min,\n max = _this6$props.max,\n onViewChange = _this6$props.onViewChange;\n var firstView = views[0];\n (0, _widgetHelpers.notify)(_this6.props.onChange, date);\n\n if (_dates.default.inRange(date, min, max, firstView)) {\n _this6.focus();\n\n _this6.maybeSetCurrentDate(date);\n\n (0, _widgetHelpers.notify)(onViewChange, [firstView]);\n }\n };\n }\n}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, \"handleKeyDown\", [_interaction.widgetEditable], {\n enumerable: true,\n initializer: function initializer() {\n var _this7 = this;\n\n return function (e) {\n var _this7$state = _this7.state,\n currentDate = _this7$state.currentDate,\n view = _this7$state.view;\n var ctrl = e.ctrlKey || e.metaKey;\n var key = e.key;\n var direction = ARROWS_TO_DIRECTION[key];\n var unit = VIEW_UNIT[view];\n\n if (key === 'Enter') {\n e.preventDefault();\n return _this7.handleChange(currentDate);\n }\n\n if (direction) {\n if (ctrl) {\n e.preventDefault();\n\n _this7.navigate(direction);\n } else {\n if (_this7.isRtl() && OPPOSITE_DIRECTION[direction]) direction = OPPOSITE_DIRECTION[direction];\n var nextDate = Calendar.move(currentDate, _this7.props.min, _this7.props.max, view, direction);\n\n if (!_dates.default.eq(currentDate, nextDate, unit)) {\n e.preventDefault();\n if (_dates.default.gt(nextDate, currentDate, view)) _this7.navigate('RIGHT', nextDate);else if (_dates.default.lt(nextDate, currentDate, view)) _this7.navigate('LEFT', nextDate);else _this7.maybeSetCurrentDate(nextDate);\n }\n }\n }\n\n (0, _widgetHelpers.notify)(_this7.props.onKeyDown, [e]);\n };\n }\n})), _class2)) || _class;\n\nfunction dateOrNull(dt) {\n if (dt && !isNaN(dt.getTime())) return dt;\n return null;\n}\n\nvar _default = (0, _uncontrollable.default)(Calendar, {\n value: 'onChange',\n currentDate: 'onCurrentDateChange',\n view: 'onViewChange'\n}, ['focus']);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = makeAutoFocusable;\nexports.PropTypes = void 0;\n\nvar _propTypes = require(\"prop-types\");\n\nvar _reactDom = require(\"react-dom\");\n\nvar _spyOnComponent = _interopRequireDefault(require(\"spy-on-component\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PropTypes = {\n autoFocus: _propTypes.bool\n};\nexports.PropTypes = PropTypes;\n\nfunction makeAutoFocusable(instance) {\n (0, _spyOnComponent.default)(instance, {\n componentDidMount: function componentDidMount() {\n var autoFocus = this.props.autoFocus;\n if (autoFocus) this.focus ? this.focus() : (0, _reactDom.findDOMNode)(this).focus();\n }\n });\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.callFocusEventHandler = callFocusEventHandler;\nexports.default = createFocusManager;\n\nvar _reactDom = require(\"react-dom\");\n\nvar _timeoutManager = _interopRequireDefault(require(\"./timeoutManager\"));\n\nvar _mountManager = _interopRequireDefault(require(\"./mountManager\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction callFocusEventHandler(inst, focused, e) {\n var handler = inst.props[focused ? 'onFocus' : 'onBlur'];\n handler && handler(e);\n}\n\nfunction createFocusManager(instance, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n willHandle = _ref.willHandle,\n didHandle = _ref.didHandle,\n onChange = _ref.onChange,\n _ref$isDisabled = _ref.isDisabled,\n isDisabled = _ref$isDisabled === void 0 ? function () {\n return !!instance.props.disabled;\n } : _ref$isDisabled;\n\n var lastFocused;\n var timeouts = (0, _timeoutManager.default)(instance);\n var isMounted = (0, _mountManager.default)(instance);\n\n function _handleFocus(focused, event) {\n if (event && event.persist) event.persist();\n if (willHandle && willHandle(focused, event) === false) return;\n timeouts.set('focus', function () {\n (0, _reactDom.unstable_batchedUpdates)(function () {\n if (focused !== lastFocused) {\n if (didHandle) didHandle.call(instance, focused, event); // only fire a change when unmounted if its a blur\n\n if (isMounted() || !focused) {\n lastFocused = focused;\n onChange && onChange(focused, event);\n }\n }\n });\n });\n }\n\n return {\n handleBlur: function handleBlur(event) {\n if (!isDisabled()) _handleFocus(false, event);\n },\n handleFocus: function handleFocus(event) {\n if (!isDisabled()) _handleFocus(true, event);\n }\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.mixin = mixin;\nexports.default = mixIntoClass;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction mixin(componentClass, _ref) {\n var propTypes = _ref.propTypes,\n contextTypes = _ref.contextTypes,\n childContextTypes = _ref.childContextTypes,\n getChildContext = _ref.getChildContext,\n protoSpec = _objectWithoutProperties(_ref, [\"propTypes\", \"contextTypes\", \"childContextTypes\", \"getChildContext\"]);\n\n if (propTypes) componentClass.propTypes = _extends({}, componentClass.propTypes, propTypes);\n if (contextTypes) componentClass.contextTypes = _extends({}, componentClass.contextTypes, contextTypes);\n if (childContextTypes) componentClass.childContextTypes = _extends({}, componentClass.childContextTypes, childContextTypes);\n\n if (getChildContext) {\n var baseGCContext = componentClass.prototype.getChildContext;\n\n componentClass.prototype.getChildContext = function $getChildContext() {\n return _extends({}, baseGCContext && baseGCContext.call(this), getChildContext.call(this));\n };\n }\n\n _extends(componentClass.prototype, protoSpec);\n\n return componentClass;\n}\n\nfunction mixIntoClass(spec) {\n return function (componentClass) {\n return mixin(componentClass, spec);\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _Button = _interopRequireDefault(require(\"./Button\"));\n\nvar _Icon = require(\"./Icon\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Header =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Header, _React$Component);\n\n function Header() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Header.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n messages = _this$props.messages,\n label = _this$props.label,\n labelId = _this$props.labelId,\n onMoveRight = _this$props.onMoveRight,\n onMoveLeft = _this$props.onMoveLeft,\n onViewChange = _this$props.onViewChange,\n prevDisabled = _this$props.prevDisabled,\n upDisabled = _this$props.upDisabled,\n nextDisabled = _this$props.nextDisabled,\n _this$props$navigateP = _this$props.navigatePrevIcon,\n navigatePrevIcon = _this$props$navigateP === void 0 ? _Icon.chevronLeft : _this$props$navigateP,\n _this$props$navigateN = _this$props.navigateNextIcon,\n navigateNextIcon = _this$props$navigateN === void 0 ? _Icon.chevronRight : _this$props$navigateN,\n isRtl = _this$props.isRtl;\n return _react.default.createElement(\"div\", {\n className: \"rw-calendar-header\"\n }, _react.default.createElement(_Button.default, {\n className: \"rw-calendar-btn-left\",\n onClick: onMoveLeft,\n disabled: prevDisabled,\n label: messages.moveBack(),\n icon: isRtl ? navigateNextIcon : navigatePrevIcon\n }), _react.default.createElement(_Button.default, {\n id: labelId,\n onClick: onViewChange,\n className: \"rw-calendar-btn-view\",\n disabled: upDisabled,\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\"\n }, label), _react.default.createElement(_Button.default, {\n className: \"rw-calendar-btn-right\",\n onClick: onMoveRight,\n disabled: nextDisabled,\n label: messages.moveForward(),\n icon: isRtl ? navigatePrevIcon : navigateNextIcon\n }));\n };\n\n return Header;\n}(_react.default.Component);\n\nHeader.propTypes = {\n label: _propTypes.default.string.isRequired,\n labelId: _propTypes.default.string,\n upDisabled: _propTypes.default.bool.isRequired,\n prevDisabled: _propTypes.default.bool.isRequired,\n nextDisabled: _propTypes.default.bool.isRequired,\n onViewChange: _propTypes.default.func.isRequired,\n onMoveLeft: _propTypes.default.func.isRequired,\n onMoveRight: _propTypes.default.func.isRequired,\n navigatePrevIcon: _propTypes.default.node,\n navigateNextIcon: _propTypes.default.node,\n messages: _propTypes.default.shape({\n moveBack: _propTypes.default.func.isRequired,\n moveForward: _propTypes.default.func.isRequired\n }),\n isRtl: _propTypes.default.bool\n};\nvar _default = Header;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = Footer;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _Button = _interopRequireDefault(require(\"./Button\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar propTypes = {\n disabled: _propTypes.default.bool,\n readOnly: _propTypes.default.bool,\n value: _propTypes.default.instanceOf(Date),\n onClick: _propTypes.default.func.isRequired,\n culture: _propTypes.default.string,\n format: CustomPropTypes.dateFormat\n};\n\nfunction Footer(_ref) {\n var disabled = _ref.disabled,\n readOnly = _ref.readOnly,\n value = _ref.value,\n onClick = _ref.onClick,\n culture = _ref.culture,\n format = _ref.format;\n return _react.default.createElement(\"div\", {\n className: \"rw-calendar-footer\"\n }, _react.default.createElement(_Button.default, {\n disabled: !!(disabled || readOnly),\n onClick: onClick.bind(null, value)\n }, _localizers.date.format(value, _localizers.date.getFormat('footer', format), culture)));\n}\n\nFooter.propTypes = propTypes;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _CalendarView = _interopRequireDefault(require(\"./CalendarView\"));\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar _ = require(\"./util/_\");\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar isEqual = function isEqual(dateA, dateB) {\n return _dates.default.eq(dateA, dateB, 'day');\n};\n\nvar MonthView =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MonthView, _React$Component);\n\n function MonthView() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.renderRow = function (row, rowIdx) {\n var _this$props = _this.props,\n focused = _this$props.focused,\n today = _this$props.today,\n activeId = _this$props.activeId,\n disabled = _this$props.disabled,\n onChange = _this$props.onChange,\n value = _this$props.value,\n culture = _this$props.culture,\n min = _this$props.min,\n max = _this$props.max,\n footerFormat = _this$props.footerFormat,\n dateFormat = _this$props.dateFormat,\n Day = _this$props.dayComponent;\n footerFormat = _localizers.date.getFormat('footer', footerFormat);\n dateFormat = _localizers.date.getFormat('dayOfMonth', dateFormat);\n return _react.default.createElement(_CalendarView.default.Row, {\n key: rowIdx\n }, row.map(function (date, colIdx) {\n var formattedDate = _localizers.date.format(date, dateFormat, culture);\n\n var label = _localizers.date.format(date, footerFormat, culture);\n\n return _react.default.createElement(_CalendarView.default.Cell, {\n key: colIdx,\n activeId: activeId,\n label: label,\n date: date,\n now: today,\n min: min,\n max: max,\n unit: \"day\",\n viewUnit: \"month\",\n onChange: onChange,\n focused: focused,\n selected: value,\n disabled: disabled\n }, Day ? _react.default.createElement(Day, {\n date: date,\n label: formattedDate\n }) : formattedDate);\n }));\n };\n\n return _this;\n }\n\n var _proto = MonthView.prototype;\n\n _proto.renderHeaders = function renderHeaders(week, format, culture) {\n var firstOfWeek = _localizers.date.firstOfWeek(culture);\n\n return week.map(function (date) {\n return _react.default.createElement(\"th\", {\n className: \"rw-head-cell\",\n key: 'header_' + _dates.default.weekday(date, undefined, firstOfWeek)\n }, _localizers.date.format(date, format, culture));\n });\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n className = _this$props2.className,\n focused = _this$props2.focused,\n culture = _this$props2.culture,\n activeId = _this$props2.activeId,\n dayFormat = _this$props2.dayFormat;\n\n var month = _dates.default.visibleDays(focused, culture);\n\n var rows = (0, _.chunk)(month, 7);\n dayFormat = _localizers.date.getFormat('weekday', dayFormat);\n return _react.default.createElement(_CalendarView.default, _extends({}, Props.omitOwn(this), {\n activeId: activeId,\n className: (0, _classnames.default)(className, 'rw-calendar-month')\n }), _react.default.createElement(\"thead\", {\n className: \"rw-calendar-head\"\n }, _react.default.createElement(\"tr\", {\n className: \"rw-calendar-row\"\n }, this.renderHeaders(rows[0], dayFormat, culture))), _react.default.createElement(_CalendarView.default.Body, null, rows.map(this.renderRow)));\n };\n\n return MonthView;\n}(_react.default.Component);\n\nMonthView.isEqual = isEqual;\nMonthView.propTypes = {\n activeId: _propTypes.default.string,\n culture: _propTypes.default.string,\n today: _propTypes.default.instanceOf(Date),\n value: _propTypes.default.instanceOf(Date),\n focused: _propTypes.default.instanceOf(Date),\n min: _propTypes.default.instanceOf(Date),\n max: _propTypes.default.instanceOf(Date),\n onChange: _propTypes.default.func.isRequired,\n dayComponent: CustomPropTypes.elementType,\n dayFormat: CustomPropTypes.dateFormat,\n dateFormat: CustomPropTypes.dateFormat,\n footerFormat: CustomPropTypes.dateFormat,\n disabled: _propTypes.default.bool\n};\nvar _default = MonthView;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","var MILI = 'milliseconds'\n , SECONDS = 'seconds'\n , MINUTES = 'minutes'\n , HOURS = 'hours'\n , DAY = 'day'\n , WEEK = 'week'\n , MONTH = 'month'\n , YEAR = 'year'\n , DECADE = 'decade'\n , CENTURY = 'century';\n\nvar dates = module.exports = {\n\n add: function(date, num, unit) {\n date = new Date(date)\n\n switch (unit){\n case MILI:\n case SECONDS:\n case MINUTES:\n case HOURS:\n case YEAR:\n return dates[unit](date, dates[unit](date) + num)\n case DAY:\n return dates.date(date, dates.date(date) + num)\n case WEEK:\n return dates.date(date, dates.date(date) + (7 * num)) \n case MONTH:\n return monthMath(date, num)\n case DECADE:\n return dates.year(date, dates.year(date) + (num * 10))\n case CENTURY:\n return dates.year(date, dates.year(date) + (num * 100))\n }\n\n throw new TypeError('Invalid units: \"' + unit + '\"')\n },\n\n subtract: function(date, num, unit) {\n return dates.add(date, -num, unit)\n },\n\n startOf: function(date, unit, firstOfWeek) {\n date = new Date(date)\n\n switch (unit) {\n case 'century':\n case 'decade':\n case 'year':\n date = dates.month(date, 0);\n case 'month':\n date = dates.date(date, 1);\n case 'week':\n case 'day':\n date = dates.hours(date, 0);\n case 'hours':\n date = dates.minutes(date, 0);\n case 'minutes':\n date = dates.seconds(date, 0);\n case 'seconds':\n date = dates.milliseconds(date, 0);\n }\n\n if (unit === DECADE) \n date = dates.subtract(date, dates.year(date) % 10, 'year')\n \n if (unit === CENTURY) \n date = dates.subtract(date, dates.year(date) % 100, 'year')\n\n if (unit === WEEK) \n date = dates.weekday(date, 0, firstOfWeek);\n\n return date\n },\n\n\n endOf: function(date, unit, firstOfWeek){\n date = new Date(date)\n date = dates.startOf(date, unit, firstOfWeek)\n date = dates.add(date, 1, unit)\n date = dates.subtract(date, 1, MILI)\n return date\n },\n\n eq: createComparer(function(a, b){ return a === b }),\n neq: createComparer(function(a, b){ return a !== b }),\n gt: createComparer(function(a, b){ return a > b }),\n gte: createComparer(function(a, b){ return a >= b }),\n lt: createComparer(function(a, b){ return a < b }),\n lte: createComparer(function(a, b){ return a <= b }),\n\n min: function(){\n return new Date(Math.min.apply(Math, arguments))\n },\n\n max: function(){\n return new Date(Math.max.apply(Math, arguments))\n },\n \n inRange: function(day, min, max, unit){\n unit = unit || 'day'\n\n return (!min || dates.gte(day, min, unit))\n && (!max || dates.lte(day, max, unit))\n },\n\n milliseconds: createAccessor('Milliseconds'),\n seconds: createAccessor('Seconds'),\n minutes: createAccessor('Minutes'),\n hours: createAccessor('Hours'),\n day: createAccessor('Day'),\n date: createAccessor('Date'),\n month: createAccessor('Month'),\n year: createAccessor('FullYear'),\n\n decade: function (date, val) {\n return val === undefined \n ? dates.year(dates.startOf(date, DECADE))\n : dates.add(date, val + 10, YEAR);\n },\n\n century: function (date, val) {\n return val === undefined \n ? dates.year(dates.startOf(date, CENTURY))\n : dates.add(date, val + 100, YEAR);\n },\n\n weekday: function (date, val, firstDay) {\n var weekday = (dates.day(date) + 7 - (firstDay || 0) ) % 7;\n\n return val === undefined \n ? weekday \n : dates.add(date, val - weekday, DAY);\n },\n\n diff: function (date1, date2, unit, asFloat) {\n var dividend, divisor, result;\n\n switch (unit) {\n case MILI:\n case SECONDS:\n case MINUTES:\n case HOURS:\n case DAY:\n case WEEK:\n dividend = date2.getTime() - date1.getTime(); break;\n case MONTH:\n case YEAR:\n case DECADE:\n case CENTURY:\n dividend = (dates.year(date2) - dates.year(date1)) * 12 + dates.month(date2) - dates.month(date1); break;\n default:\n throw new TypeError('Invalid units: \"' + unit + '\"');\n }\n\n switch (unit) {\n case MILI:\n divisor = 1; break;\n case SECONDS:\n divisor = 1000; break;\n case MINUTES:\n divisor = 1000 * 60; break;\n case HOURS:\n divisor = 1000 * 60 * 60; break;\n case DAY:\n divisor = 1000 * 60 * 60 * 24; break;\n case WEEK:\n divisor = 1000 * 60 * 60 * 24 * 7; break;\n case MONTH:\n divisor = 1; break;\n case YEAR:\n divisor = 12; break;\n case DECADE:\n divisor = 120; break;\n case CENTURY:\n divisor = 1200; break;\n default:\n throw new TypeError('Invalid units: \"' + unit + '\"');\n }\n\n result = dividend / divisor;\n\n return asFloat ? result : absoluteFloor(result);\n }\n};\n\nfunction absoluteFloor(number) {\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}\n\nfunction monthMath(date, val){\n var current = dates.month(date)\n , newMonth = (current + val);\n\n date = dates.month(date, newMonth)\n\n while (newMonth < 0 ) newMonth = 12 + newMonth\n \n //month rollover\n if ( dates.month(date) !== ( newMonth % 12))\n date = dates.date(date, 0) //move to last of month\n\n return date\n}\n\nfunction createAccessor(method){\n return function(date, val){\n if (val === undefined)\n return date['get' + method]()\n\n date = new Date(date)\n date['set' + method](val)\n return date\n }\n}\n\nfunction createComparer(operator) {\n return function (a, b, unit) {\n return operator(+dates.startOf(a, unit), +dates.startOf(b, unit))\n };\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _CalendarView = _interopRequireDefault(require(\"./CalendarView\"));\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar _ = require(\"./util/_\");\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar YearView =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(YearView, _React$Component);\n\n function YearView() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.renderRow = function (row, rowIdx) {\n var _this$props = _this.props,\n focused = _this$props.focused,\n activeId = _this$props.activeId,\n disabled = _this$props.disabled,\n onChange = _this$props.onChange,\n value = _this$props.value,\n today = _this$props.today,\n culture = _this$props.culture,\n headerFormat = _this$props.headerFormat,\n monthFormat = _this$props.monthFormat,\n min = _this$props.min,\n max = _this$props.max;\n headerFormat = _localizers.date.getFormat('header', headerFormat);\n monthFormat = _localizers.date.getFormat('month', monthFormat);\n return _react.default.createElement(_CalendarView.default.Row, {\n key: rowIdx\n }, row.map(function (date, colIdx) {\n var label = _localizers.date.format(date, headerFormat, culture);\n\n return _react.default.createElement(_CalendarView.default.Cell, {\n key: colIdx,\n activeId: activeId,\n label: label,\n date: date,\n now: today,\n min: min,\n max: max,\n unit: \"month\",\n onChange: onChange,\n focused: focused,\n selected: value,\n disabled: disabled\n }, _localizers.date.format(date, monthFormat, culture));\n }));\n };\n\n return _this;\n }\n\n var _proto = YearView.prototype;\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n focused = _this$props2.focused,\n activeId = _this$props2.activeId,\n months = _dates.default.monthsInYear(_dates.default.year(focused));\n\n return _react.default.createElement(_CalendarView.default, _extends({}, Props.omitOwn(this), {\n activeId: activeId\n }), _react.default.createElement(_CalendarView.default.Body, null, (0, _.chunk)(months, 4).map(this.renderRow)));\n };\n\n return YearView;\n}(_react.default.Component);\n\nYearView.propTypes = {\n activeId: _propTypes.default.string,\n culture: _propTypes.default.string,\n today: _propTypes.default.instanceOf(Date),\n value: _propTypes.default.instanceOf(Date),\n focused: _propTypes.default.instanceOf(Date),\n min: _propTypes.default.instanceOf(Date),\n max: _propTypes.default.instanceOf(Date),\n onChange: _propTypes.default.func.isRequired,\n headerFormat: CustomPropTypes.dateFormat,\n monthFormat: CustomPropTypes.dateFormat,\n disabled: _propTypes.default.bool\n};\nvar _default = YearView;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _CalendarView = _interopRequireDefault(require(\"./CalendarView\"));\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar _ = require(\"./util/_\");\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DecadeView =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DecadeView, _React$Component);\n\n function DecadeView() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.renderRow = function (row, rowIdx) {\n var _this$props = _this.props,\n focused = _this$props.focused,\n activeId = _this$props.activeId,\n disabled = _this$props.disabled,\n onChange = _this$props.onChange,\n yearFormat = _this$props.yearFormat,\n value = _this$props.value,\n today = _this$props.today,\n culture = _this$props.culture,\n min = _this$props.min,\n max = _this$props.max;\n return _react.default.createElement(_CalendarView.default.Row, {\n key: rowIdx\n }, row.map(function (date, colIdx) {\n var label = _localizers.date.format(date, _localizers.date.getFormat('year', yearFormat), culture);\n\n return _react.default.createElement(_CalendarView.default.Cell, {\n key: colIdx,\n unit: \"year\",\n activeId: activeId,\n label: label,\n date: date,\n now: today,\n min: min,\n max: max,\n onChange: onChange,\n focused: focused,\n selected: value,\n disabled: disabled\n }, label);\n }));\n };\n\n return _this;\n }\n\n var _proto = DecadeView.prototype;\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n focused = _this$props2.focused,\n activeId = _this$props2.activeId;\n return _react.default.createElement(_CalendarView.default, _extends({}, Props.omitOwn(this), {\n activeId: activeId\n }), _react.default.createElement(_CalendarView.default.Body, null, (0, _.chunk)(getDecadeYears(focused), 4).map(this.renderRow)));\n };\n\n return DecadeView;\n}(_react.default.Component);\n\nDecadeView.propTypes = {\n activeId: _propTypes.default.string,\n culture: _propTypes.default.string,\n today: _propTypes.default.instanceOf(Date),\n value: _propTypes.default.instanceOf(Date),\n focused: _propTypes.default.instanceOf(Date),\n min: _propTypes.default.instanceOf(Date),\n max: _propTypes.default.instanceOf(Date),\n onChange: _propTypes.default.func.isRequired,\n yearFormat: CustomPropTypes.dateFormat,\n disabled: _propTypes.default.bool\n};\n\nfunction getDecadeYears(_date) {\n var days = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],\n date = _dates.default.add(_dates.default.startOf(_date, 'decade'), -2, 'year');\n\n return days.map(function () {\n return date = _dates.default.add(date, 1, 'year');\n });\n}\n\nvar _default = DecadeView;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _CalendarView = _interopRequireDefault(require(\"./CalendarView\"));\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar _ = require(\"./util/_\");\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar CenturyView =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(CenturyView, _React$Component);\n\n function CenturyView() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.renderRow = function (row, rowIdx) {\n var _this$props = _this.props,\n focused = _this$props.focused,\n activeId = _this$props.activeId,\n disabled = _this$props.disabled,\n onChange = _this$props.onChange,\n value = _this$props.value,\n today = _this$props.today,\n culture = _this$props.culture,\n min = _this$props.min,\n decadeFormat = _this$props.decadeFormat,\n max = _this$props.max;\n decadeFormat = _localizers.date.getFormat('decade', decadeFormat);\n return _react.default.createElement(_CalendarView.default.Row, {\n key: rowIdx\n }, row.map(function (date, colIdx) {\n var label = _localizers.date.format(_dates.default.startOf(date, 'decade'), decadeFormat, culture);\n\n return _react.default.createElement(_CalendarView.default.Cell, {\n key: colIdx,\n unit: \"decade\",\n activeId: activeId,\n label: label,\n date: date,\n now: today,\n min: min,\n max: max,\n onChange: onChange,\n focused: focused,\n selected: value,\n disabled: disabled\n }, label);\n }));\n };\n\n return _this;\n }\n\n var _proto = CenturyView.prototype;\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n focused = _this$props2.focused,\n activeId = _this$props2.activeId;\n return _react.default.createElement(_CalendarView.default, _extends({}, Props.omitOwn(this), {\n activeId: activeId\n }), _react.default.createElement(_CalendarView.default.Body, null, (0, _.chunk)(getCenturyDecades(focused), 4).map(this.renderRow)));\n };\n\n return CenturyView;\n}(_react.default.Component);\n\nCenturyView.propTypes = {\n activeId: _propTypes.default.string,\n culture: _propTypes.default.string,\n today: _propTypes.default.instanceOf(Date),\n value: _propTypes.default.instanceOf(Date),\n focused: _propTypes.default.instanceOf(Date),\n min: _propTypes.default.instanceOf(Date),\n max: _propTypes.default.instanceOf(Date),\n onChange: _propTypes.default.func.isRequired,\n decadeFormat: CustomPropTypes.dateFormat,\n disabled: _propTypes.default.bool\n};\n\nfunction getCenturyDecades(_date) {\n var days = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],\n date = _dates.default.add(_dates.default.startOf(_date, 'century'), -20, 'year');\n\n return days.map(function () {\n return date = _dates.default.add(date, 10, 'year');\n });\n}\n\nvar _default = CenturyView;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _events = _interopRequireDefault(require(\"dom-helpers/events\"));\n\nvar _style = _interopRequireDefault(require(\"dom-helpers/style\"));\n\nvar _height = _interopRequireDefault(require(\"dom-helpers/query/height\"));\n\nvar _properties = require(\"dom-helpers/transition/properties\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _TransitionGroup = _interopRequireDefault(require(\"react-transition-group/TransitionGroup\"));\n\nvar _Transition = _interopRequireWildcard(require(\"react-transition-group/Transition\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = require(\"react-dom\");\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar _transitionStyle, _transitionClasses;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DirectionPropType = _propTypes.default.oneOf(['left', 'right', 'top', 'bottom']);\n\nvar transitionStyle = (_transitionStyle = {}, _transitionStyle[_Transition.ENTERING] = {\n position: 'absolute'\n}, _transitionStyle[_Transition.EXITING] = {\n position: 'absolute'\n}, _transitionStyle);\nvar transitionClasses = (_transitionClasses = {}, _transitionClasses[_Transition.ENTERED] = 'rw-calendar-transition-entered', _transitionClasses[_Transition.ENTERING] = 'rw-calendar-transition-entering', _transitionClasses[_Transition.EXITING] = 'rw-calendar-transition-exiting', _transitionClasses[_Transition.EXITED] = 'rw-calendar-transition-exited', _transitionClasses);\n\nfunction parseDuration(node) {\n var str = (0, _style.default)(node, _properties.transitionDuration);\n var mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\n\nvar SlideTransition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(SlideTransition, _React$Component);\n\n function SlideTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handleTransitionEnd = function (node, done) {\n var duration = parseDuration(node) || 300;\n\n var handler = function handler() {\n _events.default.off(node, _properties.transitionEnd, handler, false);\n\n done();\n };\n\n setTimeout(handler, duration * 1.5);\n\n _events.default.on(node, _properties.transitionEnd, handler, false);\n };\n\n return _this;\n }\n\n var _proto = SlideTransition.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n props = _objectWithoutProperties(_this$props, [\"children\"]);\n\n var direction = this.context.direction;\n\n var child = _react.default.Children.only(children);\n\n return _react.default.createElement(_Transition.default, _extends({}, props, {\n timeout: 5000,\n addEndListener: this.handleTransitionEnd\n }), function (status, innerProps) {\n return _react.default.cloneElement(child, _extends({}, innerProps, {\n style: transitionStyle[status],\n className: (0, _classnames.default)(child.props.className, 'rw-calendar-transition', \"rw-calendar-transition-\" + direction, transitionClasses[status])\n }));\n });\n };\n\n return SlideTransition;\n}(_react.default.Component);\n\nSlideTransition.contextTypes = {\n direction: DirectionPropType\n};\n\nvar SlideTransitionGroup =\n/*#__PURE__*/\nfunction (_React$Component2) {\n _inheritsLoose(SlideTransitionGroup, _React$Component2);\n\n function SlideTransitionGroup() {\n var _this2;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;\n\n _this2.handleEnter = function (child) {\n var node = (0, _reactDom.findDOMNode)(_assertThisInitialized(_assertThisInitialized(_this2)));\n if (!child) return;\n var height = (0, _height.default)(child) + 'px';\n (0, _style.default)(node, {\n height: height,\n overflow: 'hidden'\n });\n };\n\n _this2.handleExited = function () {\n var node = (0, _reactDom.findDOMNode)(_assertThisInitialized(_assertThisInitialized(_this2)));\n (0, _style.default)(node, {\n overflow: '',\n height: ''\n });\n };\n\n return _this2;\n }\n\n var _proto2 = SlideTransitionGroup.prototype;\n\n _proto2.getChildContext = function getChildContext() {\n return {\n direction: this.props.direction\n };\n };\n\n _proto2.render = function render() {\n var _this$props2 = this.props,\n children = _this$props2.children,\n direction = _this$props2.direction;\n return _react.default.createElement(_TransitionGroup.default, _extends({}, Props.omitOwn(this), {\n component: \"div\",\n className: \"rw-calendar-transition-group\"\n }), _react.default.createElement(SlideTransition, {\n key: children.key,\n direction: direction,\n onEnter: this.handleEnter,\n onExited: this.handleExited\n }, children));\n };\n\n return SlideTransitionGroup;\n}(_react.default.Component);\n\nSlideTransitionGroup.childContextTypes = {\n direction: DirectionPropType\n};\nSlideTransitionGroup.defaultProps = {\n direction: 'left'\n};\nSlideTransitionGroup.propTypes = {\n direction: DirectionPropType\n};\nvar _default = SlideTransitionGroup;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _ChildMapping = require(\"./utils/ChildMapping\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n /**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\n};\n\nvar TransitionGroup =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.getChildContext = function getChildContext() {\n return {\n transitionGroup: {\n isMounting: !this.appeared\n }\n };\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.appeared = true;\n this.mounted = true;\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n };\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return children;\n }\n\n return _react.default.createElement(Component, props, children);\n };\n\n return TransitionGroup;\n}(_react.default.Component);\n\nTransitionGroup.childContextTypes = {\n transitionGroup: _propTypes.default.object.isRequired\n};\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: _propTypes.default.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: _propTypes.default.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: _propTypes.default.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: _propTypes.default.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.getChildMapping = getChildMapping;\nexports.mergeChildMappings = mergeChildMappings;\nexports.getInitialChildMapping = getInitialChildMapping;\nexports.getNextChildMapping = getNextChildMapping;\n\nvar _react = require(\"react\");\n\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\nfunction getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) _react.Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\n\nfunction mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nfunction getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\n\nfunction getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!(0, _react.isValidElement)(child)) return;\n var hasPrev = key in prevChildMapping;\n var hasNext = key in nextChildMapping;\n var prevChild = prevChildMapping[key];\n var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = (0, _react.cloneElement)(child, {\n in: false\n });\n } else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = matches;\n\nvar _inDOM = _interopRequireDefault(require(\"../util/inDOM\"));\n\nvar _querySelectorAll = _interopRequireDefault(require(\"./querySelectorAll\"));\n\nvar matchesCache;\n\nfunction matches(node, selector) {\n if (!matchesCache && _inDOM.default) {\n var body = document.body;\n var nativeMatch = body.matches || body.matchesSelector || body.webkitMatchesSelector || body.mozMatchesSelector || body.msMatchesSelector;\n matchesCache = nativeMatch ? function (node, selector) {\n return nativeMatch.call(node, selector);\n } : ie8MatchesSelector;\n }\n\n return matchesCache ? matchesCache(node, selector) : null;\n}\n\nfunction ie8MatchesSelector(node, selector) {\n var matches = (0, _querySelectorAll.default)(node.document || node.ownerDocument, selector),\n i = 0;\n\n while (matches[i] && matches[i] !== node) {\n i++;\n }\n\n return !!matches[i];\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _reactDom = require(\"react-dom\");\n\nvar _Input = _interopRequireDefault(require(\"./Input\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar Props = _interopRequireWildcard(require(\"./util/Props\"));\n\nvar _class, _class2, _temp;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DateTimePickerInput = (0, _reactLifecyclesCompat.polyfill)(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DateTimePickerInput, _React$Component);\n\n function DateTimePickerInput() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.state = {};\n\n _this.handleBlur = function (event) {\n var _this$props = _this.props,\n format = _this$props.format,\n culture = _this$props.culture,\n parse = _this$props.parse,\n onChange = _this$props.onChange,\n onBlur = _this$props.onBlur;\n onBlur && onBlur(event);\n\n if (_this._needsFlush) {\n var date = parse(event.target.value);\n var dateIsInvalid = event.target.value != '' && date == null;\n\n if (dateIsInvalid) {\n _this.setState({\n textValue: ''\n });\n }\n\n _this._needsFlush = false;\n onChange(date, formatDate(date, format, culture));\n }\n };\n\n _this.handleChange = function (_ref) {\n var value = _ref.target.value;\n _this._needsFlush = true;\n\n _this.setState({\n textValue: value\n });\n };\n\n return _this;\n }\n\n DateTimePickerInput.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var value = nextProps.value,\n editing = nextProps.editing,\n editFormat = nextProps.editFormat,\n format = nextProps.format,\n culture = nextProps.culture;\n var textValue = formatDate(value, editing && editFormat ? editFormat : format, culture);\n if (prevState.lastValueFromProps !== textValue) return {\n textValue: textValue,\n lastValueFromProps: textValue\n };\n return null;\n };\n\n var _proto = DateTimePickerInput.prototype;\n\n _proto.focus = function focus() {\n (0, _reactDom.findDOMNode)(this).focus();\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n disabled = _this$props2.disabled,\n readOnly = _this$props2.readOnly;\n var textValue = this.state.textValue;\n var props = Props.omitOwn(this);\n return _react.default.createElement(_Input.default, _extends({}, props, {\n type: \"text\",\n className: \"rw-widget-input\",\n value: textValue,\n disabled: disabled,\n readOnly: readOnly,\n onChange: this.handleChange,\n onBlur: this.handleBlur\n }));\n };\n\n return DateTimePickerInput;\n}(_react.default.Component), _class2.propTypes = {\n format: CustomPropTypes.dateFormat.isRequired,\n editing: _propTypes.default.bool,\n editFormat: CustomPropTypes.dateFormat,\n parse: _propTypes.default.func.isRequired,\n value: _propTypes.default.instanceOf(Date),\n onChange: _propTypes.default.func.isRequired,\n onBlur: _propTypes.default.func,\n culture: _propTypes.default.string,\n disabled: CustomPropTypes.disabled,\n readOnly: CustomPropTypes.disabled\n}, _temp)) || _class;\n\nvar _default = DateTimePickerInput;\nexports.default = _default;\n\nfunction isValid(d) {\n return !isNaN(d.getTime());\n}\n\nfunction formatDate(date, format, culture) {\n var val = '';\n if (date instanceof Date && isValid(date)) val = _localizers.date.format(date, format, culture);\n return val;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nInput.propTypes = {\n disabled: _propTypes.default.bool,\n readOnly: _propTypes.default.bool,\n value: _propTypes.default.string,\n type: _propTypes.default.string,\n tabIndex: _propTypes.default.string,\n component: _propTypes.default.any,\n nodeRef: _propTypes.default.func\n};\n\nfunction Input(_ref) {\n var className = _ref.className,\n disabled = _ref.disabled,\n readOnly = _ref.readOnly,\n value = _ref.value,\n tabIndex = _ref.tabIndex,\n nodeRef = _ref.nodeRef,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'text' : _ref$type,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? 'input' : _ref$component,\n props = _objectWithoutProperties(_ref, [\"className\", \"disabled\", \"readOnly\", \"value\", \"tabIndex\", \"nodeRef\", \"type\", \"component\"]);\n\n return _react.default.createElement(Component, _extends({}, props, {\n type: type,\n ref: nodeRef,\n tabIndex: tabIndex || 0,\n autoComplete: \"off\",\n disabled: disabled,\n readOnly: readOnly,\n \"aria-disabled\": disabled,\n \"aria-readonly\": readOnly,\n value: value == null ? '' : value,\n className: (0, _classnames.default)(className, 'rw-input')\n }));\n}\n\nvar _default = Input;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _List = _interopRequireDefault(require(\"./List\"));\n\nvar _dates = _interopRequireDefault(require(\"./util/dates\"));\n\nvar _reduceToListState = _interopRequireDefault(require(\"./util/reduceToListState\"));\n\nvar _localizers = require(\"./util/localizers\");\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar _class, _class2, _temp;\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nvar format = function format(props) {\n return _localizers.date.getFormat('time', props.format);\n};\n\nvar accessors = {\n text: function text(item) {\n return item.label;\n },\n value: function value(item) {\n return item.date;\n }\n};\n\nvar find = function find(arr, fn) {\n for (var i = 0; i < arr.length; i++) {\n if (fn(arr[i])) return arr[i];\n }\n\n return null;\n};\n\nfunction getBounds(_ref) {\n var min = _ref.min,\n max = _ref.max,\n currentDate = _ref.currentDate,\n value = _ref.value,\n preserveDate = _ref.preserveDate;\n\n //compare just the time regradless of whether they fall on the same day\n if (!preserveDate) {\n var _start = _dates.default.startOf(_dates.default.merge(new Date(), min, currentDate), 'minutes');\n\n var _end = _dates.default.startOf(_dates.default.merge(new Date(), max, currentDate), 'minutes');\n\n if (_dates.default.lte(_end, _start) && _dates.default.gt(max, min, 'day')) _end = _dates.default.tomorrow();\n return {\n min: _start,\n max: _end\n };\n }\n\n var start = _dates.default.today();\n\n var end = _dates.default.tomorrow();\n\n value = value || currentDate || start; //date parts are equal\n\n return {\n min: _dates.default.eq(value, min, 'day') ? _dates.default.merge(start, min, currentDate) : start,\n max: _dates.default.eq(value, max, 'day') ? _dates.default.merge(start, max, currentDate) : end\n };\n}\n\nfunction getDates(_ref2) {\n var step = _ref2.step,\n culture = _ref2.culture,\n props = _objectWithoutProperties(_ref2, [\"step\", \"culture\"]);\n\n var times = [];\n\n var _getBounds = getBounds(props),\n min = _getBounds.min,\n max = _getBounds.max;\n\n var startDay = _dates.default.date(min);\n\n while (_dates.default.date(min) === startDay && _dates.default.lte(min, max)) {\n times.push({\n date: min,\n label: _localizers.date.format(min, format(props), culture)\n });\n min = _dates.default.add(min, step || 30, 'minutes');\n }\n\n return times;\n}\n\nvar TimeList = (0, _reactLifecyclesCompat.polyfill)(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(TimeList, _React$Component);\n\n function TimeList() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.state = {};\n\n _this.handleKeyDown = function (e) {\n var key = e.key;\n var _this$state = _this.state,\n focusedItem = _this$state.focusedItem,\n list = _this$state.list;\n\n if (key === 'End') {\n e.preventDefault();\n\n _this.setState({\n focusedItem: list.last()\n });\n } else if (key === 'Home') {\n e.preventDefault();\n\n _this.setState({\n focusedItem: list.first()\n });\n } else if (key === 'Enter') {\n _this.props.onSelect(focusedItem);\n } else if (key === 'ArrowDown') {\n e.preventDefault();\n\n _this.setState({\n focusedItem: list.next(focusedItem)\n });\n } else if (key === 'ArrowUp') {\n e.preventDefault();\n\n _this.setState({\n focusedItem: list.prev(focusedItem)\n });\n }\n };\n\n return _this;\n }\n\n TimeList.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var value = nextProps.value,\n currentDate = nextProps.currentDate,\n step = nextProps.step;\n var data = getDates(nextProps);\n var currentValue = value || currentDate;\n var valueChanged = !prevState.lastValue || !_dates.default.eq(currentValue, prevState.lastValue, 'minutes');\n var list = (0, _reduceToListState.default)(data, prevState.list, {\n nextProps: nextProps\n });\n var selectedItem = find(data, function (t) {\n return _dates.default.eq(t.date, currentValue, 'minutes');\n });\n var closestDate = find(data, function (t) {\n return Math.abs(_dates.default.diff(t.date, currentValue, 'minutes')) < step;\n });\n return {\n data: data,\n list: list,\n lastValue: currentValue,\n selectedItem: list.nextEnabled(selectedItem),\n focusedItem: valueChanged || !prevState.focusedItem ? list.nextEnabled(selectedItem || closestDate || data[0]) : find(data, function (t) {\n return _dates.default.eq(t.date, prevState.focusedItem.date, 'minutes');\n })\n };\n };\n\n var _proto = TimeList.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.unmounted = true;\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n listProps = _this$props.listProps,\n props = _objectWithoutProperties(_this$props, [\"listProps\"]);\n\n var _this$state2 = this.state,\n data = _this$state2.data,\n list = _this$state2.list,\n focusedItem = _this$state2.focusedItem,\n selectedItem = _this$state2.selectedItem;\n delete props.currentDate;\n delete props.min;\n delete props.max;\n delete props.step;\n delete props.format;\n delete props.culture;\n delete props.preserveDate;\n delete props.value;\n return _react.default.createElement(_List.default, _extends({}, props, listProps, {\n data: data,\n dataState: list.dataState,\n isDisabled: list.isDisabled,\n textAccessor: accessors.text,\n valueAccessor: accessors.value,\n selectedItem: selectedItem,\n focusedItem: focusedItem\n }));\n };\n\n return TimeList;\n}(_react.default.Component), _class2.defaultProps = {\n step: 30,\n currentDate: new Date(),\n min: new Date(1900, 0, 1),\n max: new Date(2099, 11, 31),\n preserveDate: true\n}, _class2.propTypes = {\n value: _propTypes.default.instanceOf(Date),\n step: _propTypes.default.number,\n min: _propTypes.default.instanceOf(Date),\n max: _propTypes.default.instanceOf(Date),\n currentDate: _propTypes.default.instanceOf(Date),\n itemComponent: CustomPropTypes.elementType,\n listProps: _propTypes.default.object,\n format: CustomPropTypes.dateFormat,\n onSelect: _propTypes.default.func,\n preserveDate: _propTypes.default.bool,\n culture: _propTypes.default.string\n}, _temp)) || _class;\n\nvar _default = TimeList;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar propTypes = {\n className: _propTypes.default.string,\n component: _propTypes.default.string\n};\n\nfunction ListOptionGroup(_ref) {\n var children = _ref.children,\n className = _ref.className,\n _ref$component = _ref.component,\n component = _ref$component === void 0 ? 'li' : _ref$component;\n var Tag = component;\n return _react.default.createElement(Tag, {\n tabIndex: \"-1\",\n role: \"separator\",\n className: (0, _classnames.default)(className, 'rw-list-optgroup')\n }, children);\n}\n\nListOptionGroup.propTypes = propTypes;\nvar _default = ListOptionGroup;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = scrollTo;\n\nvar _offset = _interopRequireDefault(require(\"../query/offset\"));\n\nvar _height = _interopRequireDefault(require(\"../query/height\"));\n\nvar _scrollParent = _interopRequireDefault(require(\"../query/scrollParent\"));\n\nvar _scrollTop = _interopRequireDefault(require(\"../query/scrollTop\"));\n\nvar _requestAnimationFrame = _interopRequireDefault(require(\"./requestAnimationFrame\"));\n\nvar _isWindow = _interopRequireDefault(require(\"../query/isWindow\"));\n\nfunction scrollTo(selected, scrollParent) {\n var offset = (0, _offset.default)(selected);\n var poff = {\n top: 0,\n left: 0\n };\n var list, listScrollTop, selectedTop, isWin;\n var selectedHeight, listHeight, bottom;\n if (!selected) return;\n list = scrollParent || (0, _scrollParent.default)(selected);\n isWin = (0, _isWindow.default)(list);\n listScrollTop = (0, _scrollTop.default)(list);\n listHeight = (0, _height.default)(list, true);\n isWin = (0, _isWindow.default)(list);\n if (!isWin) poff = (0, _offset.default)(list);\n offset = {\n top: offset.top - poff.top,\n left: offset.left - poff.left,\n height: offset.height,\n width: offset.width\n };\n selectedHeight = offset.height;\n selectedTop = offset.top + (isWin ? 0 : listScrollTop);\n bottom = selectedTop + selectedHeight;\n listScrollTop = listScrollTop > selectedTop ? selectedTop : bottom > listScrollTop + listHeight ? bottom - listHeight : listScrollTop;\n var id = (0, _requestAnimationFrame.default)(function () {\n return (0, _scrollTop.default)(list, listScrollTop);\n });\n return function () {\n return _requestAnimationFrame.default.cancel(id);\n };\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = scrollPrarent;\n\nvar _style = _interopRequireDefault(require(\"../style\"));\n\nvar _height = _interopRequireDefault(require(\"./height\"));\n\nfunction scrollPrarent(node) {\n var position = (0, _style.default)(node, 'position'),\n excludeStatic = position === 'absolute',\n ownerDoc = node.ownerDocument;\n if (position === 'fixed') return ownerDoc || document;\n\n while ((node = node.parentNode) && node.nodeType !== 9) {\n var isStatic = excludeStatic && (0, _style.default)(node, 'position') === 'static',\n style = (0, _style.default)(node, 'overflow') + (0, _style.default)(node, 'overflow-y') + (0, _style.default)(node, 'overflow-x');\n if (isStatic) continue;\n if (/(auto|scroll)/.test(style) && (0, _height.default)(node) < node.scrollHeight) return node;\n }\n\n return document;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = scrollTop;\n\nvar _isWindow = _interopRequireDefault(require(\"./isWindow\"));\n\nfunction scrollTop(node, val) {\n var win = (0, _isWindow.default)(node);\n if (val === undefined) return win ? 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop : node.scrollTop;\n if (win) win.scrollTo('pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft, val);else node.scrollTop = val;\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"./inDOM\"));\n\nvar vendors = ['', 'webkit', 'moz', 'o', 'ms'];\nvar cancel = 'clearTimeout';\nvar raf = fallback;\nvar compatRaf;\n\nvar getKey = function getKey(vendor, k) {\n return vendor + (!vendor ? k : k[0].toUpperCase() + k.substr(1)) + 'AnimationFrame';\n};\n\nif (_inDOM.default) {\n vendors.some(function (vendor) {\n var rafKey = getKey(vendor, 'request');\n\n if (rafKey in window) {\n cancel = getKey(vendor, 'cancel');\n return raf = function raf(cb) {\n return window[rafKey](cb);\n };\n }\n });\n}\n/* https://github.com/component/raf */\n\n\nvar prev = new Date().getTime();\n\nfunction fallback(fn) {\n var curr = new Date().getTime(),\n ms = Math.max(0, 16 - (curr - prev)),\n req = setTimeout(fn, ms);\n prev = curr;\n return req;\n}\n\ncompatRaf = function compatRaf(cb) {\n return raf(cb);\n};\n\ncompatRaf.cancel = function (id) {\n window[cancel] && typeof window[cancel] === 'function' && window[cancel](id);\n};\n\nvar _default = compatRaf;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar PropTypes = _interopRequireWildcard(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _Listbox = _interopRequireDefault(require(\"./Listbox\"));\n\nvar _ListOption = _interopRequireDefault(require(\"./ListOption\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nvar propTypes = {\n searchTerm: PropTypes.string,\n focused: PropTypes.bool,\n onSelect: PropTypes.func.isRequired,\n activeId: PropTypes.string\n};\n\nfunction AddToListOption(_ref) {\n var searchTerm = _ref.searchTerm,\n onSelect = _ref.onSelect,\n focused = _ref.focused,\n children = _ref.children,\n activeId = _ref.activeId,\n props = _objectWithoutProperties(_ref, [\"searchTerm\", \"onSelect\", \"focused\", \"children\", \"activeId\"]);\n\n return _react.default.createElement(_Listbox.default, _extends({}, props, {\n className: \"rw-list-option-create\"\n }), _react.default.createElement(_ListOption.default, {\n onSelect: onSelect,\n focused: focused,\n activeId: activeId,\n dataItem: searchTerm\n }, children));\n}\n\nAddToListOption.propTypes = propTypes;\nvar _default = AddToListOption;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar CustomPropTypes = _interopRequireWildcard(require(\"./util/PropTypes\"));\n\nvar _dataHelpers = require(\"./util/dataHelpers\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DropdownListInput =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DropdownListInput, _React$Component);\n\n function DropdownListInput() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.state = {\n autofilling: false\n };\n\n _this.handleAutofillDetect = function (_ref) {\n var animationName = _ref.animationName;\n var autofilling;\n if (animationName === 'react-widgets-autofill-start') autofilling = true;else if (animationName === 'react-widgets-autofill-cancel') autofilling = false;else return;\n\n _this.setState({\n autofilling: autofilling\n });\n\n _this.props.onAutofill(autofilling);\n };\n\n _this.handleAutofill = function (e) {\n _this.setState({\n autofilling: false\n });\n\n _this.props.onAutofillChange(e);\n };\n\n return _this;\n }\n\n var _proto = DropdownListInput.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n name = _this$props.name,\n placeholder = _this$props.placeholder,\n value = _this$props.value,\n textField = _this$props.textField,\n autoComplete = _this$props.autoComplete,\n Component = _this$props.valueComponent;\n var autofilling = this.state.autofilling;\n var child = null;\n\n if (!autofilling && autoComplete !== 'off') {\n child = !value && placeholder ? _react.default.createElement(\"span\", {\n className: \"rw-placeholder\"\n }, placeholder) : Component ? _react.default.createElement(Component, {\n item: value\n }) : (0, _dataHelpers.dataText)(value, textField);\n }\n\n var val = (0, _dataHelpers.dataValue)(value, textField);\n return _react.default.createElement(\"div\", {\n className: \"rw-input rw-dropdown-list-input\"\n }, autoComplete !== 'off' && _react.default.createElement(\"input\", {\n tabIndex: \"-1\",\n name: name,\n value: val == null ? '' : val,\n autoComplete: autoComplete,\n onChange: this.handleAutofill,\n onAnimationStart: this.handleAutofillDetect,\n className: (0, _classnames.default)('rw-dropdown-list-autofill rw-detect-autofill', !autofilling && 'rw-sr')\n }), child);\n };\n\n return DropdownListInput;\n}(_react.default.Component);\n\nDropdownListInput.propTypes = {\n value: _propTypes.default.any,\n placeholder: _propTypes.default.string,\n name: _propTypes.default.string,\n autoComplete: _propTypes.default.string,\n textField: CustomPropTypes.accessor,\n valueComponent: CustomPropTypes.elementType,\n onAutofill: _propTypes.default.func.isRequired,\n onAutofillChange: _propTypes.default.func.isRequired\n};\nvar _default = DropdownListInput;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = createAccessors;\n\nvar helpers = _interopRequireWildcard(require(\"./dataHelpers\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction createAccessors(_ref) {\n var textField = _ref.textField,\n valueField = _ref.valueField;\n return {\n text: function text(item) {\n return helpers.dataText(item, textField);\n },\n value: function value(item) {\n return helpers.dataValue(item, valueField);\n },\n indexOf: function indexOf(data, item) {\n return helpers.dataIndexOf(data, item, valueField);\n },\n matches: function matches(a, b) {\n return helpers.valueMatcher(a, b, valueField);\n },\n findOrSelf: function findOrSelf(data, item) {\n return helpers.dataItem(data, item, valueField);\n },\n includes: function includes(data, item) {\n return helpers.dataIndexOf(data, item, valueField) !== -1;\n }\n };\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar localizers = _interopRequireWildcard(require(\"./util/localizers\"));\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nvar _default = {\n setLocalizers: function setLocalizers(_ref) {\n var date = _ref.date,\n number = _ref.number;\n date && this.setDateLocalizer(date);\n number && this.setNumberLocalizer(number);\n },\n setDateLocalizer: localizers.setDate,\n setNumberLocalizer: localizers.setNumber\n};\nexports.default = _default;\nmodule.exports = exports[\"default\"];","var React = require('react');\nvar ReactDOM = require('react-dom');\nvar DOMFactories = require('react-dom-factories');\nvar PropTypes = require('prop-types');\nvar ExecutionEnvironment = require('exenv');\nvar ModalPortal = React.createFactory(require('./ModalPortal'));\nvar ariaAppHider = require('../helpers/ariaAppHider');\nvar refCount = require('../helpers/refCount');\nvar elementClass = require('element-class');\nvar renderSubtreeIntoContainer = require(\"react-dom\").unstable_renderSubtreeIntoContainer;\nvar Assign = require('lodash.assign');\nvar createReactClass = require('create-react-class');\n\nvar SafeHTMLElement = ExecutionEnvironment.canUseDOM ? window.HTMLElement : {};\nvar AppElement = ExecutionEnvironment.canUseDOM ? document.body : {appendChild: function() {}};\n\nfunction getParentElement(parentSelector) {\n return parentSelector();\n}\n\nvar Modal = createReactClass({\n\n displayName: 'Modal',\n statics: {\n setAppElement: function(element) {\n AppElement = ariaAppHider.setElement(element);\n },\n injectCSS: function() {\n \"production\" !== process.env.NODE_ENV\n && console.warn('React-Modal: injectCSS has been deprecated ' +\n 'and no longer has any effect. It will be removed in a later version');\n }\n },\n\n propTypes: {\n isOpen: PropTypes.bool.isRequired,\n style: PropTypes.shape({\n content: PropTypes.object,\n overlay: PropTypes.object\n }),\n portalClassName: PropTypes.string,\n bodyOpenClassName: PropTypes.string,\n appElement: PropTypes.instanceOf(SafeHTMLElement),\n onAfterOpen: PropTypes.func,\n onRequestClose: PropTypes.func,\n closeTimeoutMS: PropTypes.number,\n ariaHideApp: PropTypes.bool,\n shouldCloseOnOverlayClick: PropTypes.bool,\n parentSelector: PropTypes.func,\n role: PropTypes.string,\n contentLabel: PropTypes.string.isRequired\n },\n\n getDefaultProps: function () {\n return {\n isOpen: false,\n portalClassName: 'ReactModalPortal',\n bodyOpenClassName: 'ReactModal__Body--open',\n ariaHideApp: true,\n closeTimeoutMS: 0,\n shouldCloseOnOverlayClick: true,\n parentSelector: function () { return document.body; }\n };\n },\n\n componentDidMount: function() {\n this.node = document.createElement('div');\n this.node.className = this.props.portalClassName;\n\n if (this.props.isOpen) refCount.add(this);\n\n var parent = getParentElement(this.props.parentSelector);\n parent.appendChild(this.node);\n this.renderPortal(this.props);\n },\n\n componentWillUpdate: function(newProps) {\n if(newProps.portalClassName !== this.props.portalClassName) {\n this.node.className = newProps.portalClassName;\n }\n },\n\n componentWillReceiveProps: function(newProps) {\n if (newProps.isOpen) refCount.add(this);\n if (!newProps.isOpen) refCount.remove(this);\n var currentParent = getParentElement(this.props.parentSelector);\n var newParent = getParentElement(newProps.parentSelector);\n\n if(newParent !== currentParent) {\n currentParent.removeChild(this.node);\n newParent.appendChild(this.node);\n }\n\n this.renderPortal(newProps);\n },\n\n componentWillUnmount: function() {\n if (!this.node) return;\n\n refCount.remove(this);\n\n if (this.props.ariaHideApp) {\n ariaAppHider.show(this.props.appElement);\n }\n\n var state = this.portal.state;\n var now = Date.now();\n var closesAt = state.isOpen && this.props.closeTimeoutMS\n && (state.closesAt\n || now + this.props.closeTimeoutMS);\n\n if (closesAt) {\n if (!state.beforeClose) {\n this.portal.closeWithTimeout();\n }\n\n var that = this;\n setTimeout(function() { that.removePortal(); }, closesAt - now);\n } else {\n this.removePortal();\n }\n },\n\n removePortal: function() {\n ReactDOM.unmountComponentAtNode(this.node);\n var parent = getParentElement(this.props.parentSelector);\n parent.removeChild(this.node);\n\n if (refCount.count() === 0) {\n elementClass(document.body).remove(this.props.bodyOpenClassName);\n }\n },\n\n renderPortal: function(props) {\n if (props.isOpen || refCount.count() > 0) {\n elementClass(document.body).add(this.props.bodyOpenClassName);\n } else {\n elementClass(document.body).remove(this.props.bodyOpenClassName);\n }\n\n if (props.ariaHideApp) {\n ariaAppHider.toggle(props.isOpen, props.appElement);\n }\n\n this.portal = renderSubtreeIntoContainer(this, ModalPortal(Assign({}, props, {defaultStyles: Modal.defaultStyles})), this.node);\n },\n\n render: function () {\n return DOMFactories.noscript();\n }\n});\n\nModal.defaultStyles = {\n overlay: {\n position : 'fixed',\n top : 0,\n left : 0,\n right : 0,\n bottom : 0,\n backgroundColor : 'rgba(255, 255, 255, 0.75)'\n },\n content: {\n position : 'absolute',\n top : '40px',\n left : '40px',\n right : '40px',\n bottom : '40px',\n border : '1px solid #ccc',\n background : '#fff',\n overflow : 'auto',\n WebkitOverflowScrolling : 'touch',\n borderRadius : '4px',\n outline : 'none',\n padding : '20px'\n }\n}\n\nmodule.exports = Modal\n","/*!\n Copyright (c) 2015 Jed Watson.\n Based on code that is Copyright 2013-2015, Facebook, Inc.\n All rights reserved.\n*/\n\n(function () {\n\t'use strict';\n\n\tvar canUseDOM = !!(\n\t\ttypeof window !== 'undefined' &&\n\t\twindow.document &&\n\t\twindow.document.createElement\n\t);\n\n\tvar ExecutionEnvironment = {\n\n\t\tcanUseDOM: canUseDOM,\n\n\t\tcanUseWorkers: typeof Worker !== 'undefined',\n\n\t\tcanUseEventListeners:\n\t\t\tcanUseDOM && !!(window.addEventListener || window.attachEvent),\n\n\t\tcanUseViewport: canUseDOM && !!window.screen\n\n\t};\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\tdefine(function () {\n\t\t\treturn ExecutionEnvironment;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = ExecutionEnvironment;\n\t} else {\n\t\twindow.ExecutionEnvironment = ExecutionEnvironment;\n\t}\n\n}());\n","var React = require('react');\nvar DOMFactories = require('react-dom-factories');\nvar focusManager = require('../helpers/focusManager');\nvar scopeTab = require('../helpers/scopeTab');\nvar Assign = require('lodash.assign');\nvar createReactClass = require('create-react-class');\n\nvar div = DOMFactories.div;\n\n// so that our CSS is statically analyzable\nvar CLASS_NAMES = {\n overlay: 'ReactModal__Overlay',\n content: 'ReactModal__Content'\n};\n\nvar ModalPortal = module.exports = createReactClass({\n\n displayName: 'ModalPortal',\n shouldClose: null,\n\n getDefaultProps: function() {\n return {\n style: {\n overlay: {},\n content: {}\n }\n };\n },\n\n getInitialState: function() {\n return {\n afterOpen: false,\n beforeClose: false\n };\n },\n\n componentDidMount: function() {\n // Focus needs to be set when mounting and already open\n if (this.props.isOpen) {\n this.setFocusAfterRender(true);\n this.open();\n }\n },\n\n componentWillUnmount: function() {\n clearTimeout(this.closeTimer);\n },\n\n componentWillReceiveProps: function(newProps) {\n // Focus only needs to be set once when the modal is being opened\n if (!this.props.isOpen && newProps.isOpen) {\n this.setFocusAfterRender(true);\n this.open();\n } else if (this.props.isOpen && !newProps.isOpen) {\n this.close();\n }\n },\n\n componentDidUpdate: function () {\n if (this.focusAfterRender) {\n this.focusContent();\n this.setFocusAfterRender(false);\n }\n },\n\n setFocusAfterRender: function (focus) {\n this.focusAfterRender = focus;\n },\n\n afterClose: function () {\n focusManager.returnFocus();\n focusManager.teardownScopedFocus();\n },\n\n open: function () {\n if (this.state.afterOpen && this.state.beforeClose) {\n clearTimeout(this.closeTimer);\n this.setState({ beforeClose: false });\n } else {\n focusManager.setupScopedFocus(this.node);\n focusManager.markForFocusLater();\n this.setState({isOpen: true}, function() {\n this.setState({afterOpen: true});\n\n if (this.props.isOpen && this.props.onAfterOpen) {\n this.props.onAfterOpen();\n }\n }.bind(this));\n }\n },\n\n close: function() {\n if (this.props.closeTimeoutMS > 0)\n this.closeWithTimeout();\n else\n this.closeWithoutTimeout();\n },\n\n focusContent: function() {\n // Don't steal focus from inner elements\n if (!this.contentHasFocus()) {\n this.refs.content.focus();\n }\n },\n\n closeWithTimeout: function() {\n var closesAt = Date.now() + this.props.closeTimeoutMS;\n this.setState({beforeClose: true, closesAt: closesAt}, function() {\n this.closeTimer = setTimeout(this.closeWithoutTimeout, this.state.closesAt - Date.now());\n }.bind(this));\n },\n\n closeWithoutTimeout: function() {\n this.setState({\n beforeClose: false,\n isOpen: false,\n afterOpen: false,\n closesAt: null\n }, this.afterClose);\n },\n\n handleKeyDown: function(event) {\n if (event.keyCode == 9 /*tab*/) scopeTab(this.refs.content, event);\n if (event.keyCode == 27 /*esc*/) {\n event.preventDefault();\n this.requestClose(event);\n }\n },\n\n handleOverlayOnClick: function (event) {\n if (this.shouldClose === null) {\n this.shouldClose = true;\n }\n\n if (this.shouldClose && this.props.shouldCloseOnOverlayClick) {\n if (this.ownerHandlesClose())\n this.requestClose(event);\n else\n this.focusContent();\n }\n this.shouldClose = null;\n },\n\n handleContentOnClick: function () {\n this.shouldClose = false;\n },\n\n requestClose: function(event) {\n if (this.ownerHandlesClose())\n this.props.onRequestClose(event);\n },\n\n ownerHandlesClose: function() {\n return this.props.onRequestClose;\n },\n\n shouldBeClosed: function() {\n return !this.state.isOpen && !this.state.beforeClose;\n },\n\n contentHasFocus: function() {\n return document.activeElement === this.refs.content || this.refs.content.contains(document.activeElement);\n },\n\n buildClassName: function(which, additional) {\n var classNames = (typeof additional === 'object') ? additional : {\n base: CLASS_NAMES[which],\n afterOpen: CLASS_NAMES[which] + \"--after-open\",\n beforeClose: CLASS_NAMES[which] + \"--before-close\"\n };\n var className = classNames.base;\n if (this.state.afterOpen) { className += \" \" + classNames.afterOpen; }\n if (this.state.beforeClose) { className += \" \" + classNames.beforeClose; }\n return (typeof additional === 'string' && additional) ? [className, additional].join(\" \") : className;\n },\n\n render: function() {\n var contentStyles = (this.props.className) ? {} : this.props.defaultStyles.content;\n var overlayStyles = (this.props.overlayClassName) ? {} : this.props.defaultStyles.overlay;\n\n return this.shouldBeClosed() ? div() : (\n div({\n ref: \"overlay\",\n className: this.buildClassName('overlay', this.props.overlayClassName),\n style: Assign({}, overlayStyles, this.props.style.overlay || {}),\n onClick: this.handleOverlayOnClick\n },\n div({\n ref: \"content\",\n style: Assign({}, contentStyles, this.props.style.content || {}),\n className: this.buildClassName('content', this.props.className),\n tabIndex: \"-1\",\n onKeyDown: this.handleKeyDown,\n onClick: this.handleContentOnClick,\n role: this.props.role,\n \"aria-label\": this.props.contentLabel\n },\n this.props.children\n )\n )\n );\n }\n});\n","var findTabbable = require('../helpers/tabbable');\nvar focusLaterElements = [];\nvar modalElement = null;\nvar needToFocus = false;\n\nfunction handleBlur(event) {\n needToFocus = true;\n}\n\nfunction handleFocus(event) {\n if (needToFocus) {\n needToFocus = false;\n if (!modalElement) {\n return;\n }\n // need to see how jQuery shims document.on('focusin') so we don't need the\n // setTimeout, firefox doesn't support focusin, if it did, we could focus\n // the element outside of a setTimeout. Side-effect of this implementation\n // is that the document.body gets focus, and then we focus our element right\n // after, seems fine.\n setTimeout(function() {\n if (modalElement.contains(document.activeElement))\n return;\n var el = (findTabbable(modalElement)[0] || modalElement);\n el.focus();\n }, 0);\n }\n}\n\nexports.markForFocusLater = function() {\n focusLaterElements.push(document.activeElement);\n};\n\nexports.returnFocus = function() {\n var toFocus = null;\n try {\n toFocus = focusLaterElements.pop();\n toFocus.focus();\n return;\n }\n catch (e) {\n console.warn('You tried to return focus to '+toFocus+' but it is not in the DOM anymore');\n }\n};\n\nexports.setupScopedFocus = function(element) {\n modalElement = element;\n\n if (window.addEventListener) {\n window.addEventListener('blur', handleBlur, false);\n document.addEventListener('focus', handleFocus, true);\n } else {\n window.attachEvent('onBlur', handleBlur);\n document.attachEvent('onFocus', handleFocus);\n }\n};\n\nexports.teardownScopedFocus = function() {\n modalElement = null;\n\n if (window.addEventListener) {\n window.removeEventListener('blur', handleBlur);\n document.removeEventListener('focus', handleFocus);\n } else {\n window.detachEvent('onBlur', handleBlur);\n document.detachEvent('onFocus', handleFocus);\n }\n};\n","var findTabbable = require('../helpers/tabbable');\n\nmodule.exports = function(node, event) {\n var tabbable = findTabbable(node);\n if (!tabbable.length) {\n event.preventDefault();\n return;\n }\n var finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1];\n var leavingFinalTabbable = (\n finalTabbable === document.activeElement ||\n // handle immediate shift+tab after opening with mouse\n node === document.activeElement\n );\n if (!leavingFinalTabbable) return;\n event.preventDefault();\n var target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];\n target.focus();\n};\n","var _element = typeof document !== 'undefined' ? document.body : null;\n\nfunction setElement(element) {\n if (typeof element === 'string') {\n var el = document.querySelectorAll(element);\n element = 'length' in el ? el[0] : el;\n }\n _element = element || _element;\n return _element;\n}\n\nfunction hide(appElement) {\n validateElement(appElement);\n (appElement || _element).setAttribute('aria-hidden', 'true');\n}\n\nfunction show(appElement) {\n validateElement(appElement);\n (appElement || _element).removeAttribute('aria-hidden');\n}\n\nfunction toggle(shouldHide, appElement) {\n if (shouldHide)\n hide(appElement);\n else\n show(appElement);\n}\n\nfunction validateElement(appElement) {\n if (!appElement && !_element)\n throw new Error('react-modal: You must set an element with `Modal.setAppElement(el)` to make this accessible');\n}\n\nfunction resetForTesting() {\n _element = document.body;\n}\n\nexports.toggle = toggle;\nexports.setElement = setElement;\nexports.show = show;\nexports.hide = hide;\nexports.resetForTesting = resetForTesting;\n","var modals = [];\n\nmodule.exports = {\n add: function (element) {\n if (modals.indexOf(element) === -1) {\n modals.push(element);\n }\n },\n remove: function (element) {\n var index = modals.indexOf(element);\n if (index === -1) {\n return;\n }\n modals.splice(index, 1);\n },\n count: function () {\n return modals.length;\n }\n};\n","module.exports = function(opts) {\n return new ElementClass(opts)\n}\n\nfunction indexOf(arr, prop) {\n if (arr.indexOf) return arr.indexOf(prop)\n for (var i = 0, len = arr.length; i < len; i++)\n if (arr[i] === prop) return i\n return -1\n}\n\nfunction ElementClass(opts) {\n if (!(this instanceof ElementClass)) return new ElementClass(opts)\n var self = this\n if (!opts) opts = {}\n\n // similar doing instanceof HTMLElement but works in IE8\n if (opts.nodeType) opts = {el: opts}\n\n this.opts = opts\n this.el = opts.el || document.body\n if (typeof this.el !== 'object') this.el = document.querySelector(this.el)\n}\n\nElementClass.prototype.add = function(className) {\n var el = this.el\n if (!el) return\n if (el.className === \"\") return el.className = className\n var classes = el.className.split(' ')\n if (indexOf(classes, className) > -1) return classes\n classes.push(className)\n el.className = classes.join(' ')\n return classes\n}\n\nElementClass.prototype.remove = function(className) {\n var el = this.el\n if (!el) return\n if (el.className === \"\") return\n var classes = el.className.split(' ')\n var idx = indexOf(classes, className)\n if (idx > -1) classes.splice(idx, 1)\n el.className = classes.join(' ')\n return classes\n}\n\nElementClass.prototype.has = function(className) {\n var el = this.el\n if (!el) return\n var classes = el.className.split(' ')\n return indexOf(classes, className) > -1\n}\n\nElementClass.prototype.toggle = function(className) {\n var el = this.el\n if (!el) return\n if (this.has(className)) this.remove(className)\n else this.add(className)\n}\n","/* ***** BEGIN LICENSE BLOCK *****\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * ***** END LICENSE BLOCK ***** */\n\n/**\n * Define a module along with a payload\n * @param module a name for the payload\n * @param payload a function to call with (acequire, exports, module) params\n */\n\n(function() {\n\nvar ACE_NAMESPACE = \"ace\";\n\nvar global = (function() { return this; })();\nif (!global && typeof window != \"undefined\") global = window; // strict mode\n\n\nif (!ACE_NAMESPACE && typeof acequirejs !== \"undefined\")\n return;\n\n\nvar define = function(module, deps, payload) {\n if (typeof module !== \"string\") {\n if (define.original)\n define.original.apply(this, arguments);\n else {\n console.error(\"dropping module because define wasn\\'t a string.\");\n console.trace();\n }\n return;\n }\n if (arguments.length == 2)\n payload = deps;\n if (!define.modules[module]) {\n define.payloads[module] = payload;\n define.modules[module] = null;\n }\n};\n\ndefine.modules = {};\ndefine.payloads = {};\n\n/**\n * Get at functionality define()ed using the function above\n */\nvar _acequire = function(parentId, module, callback) {\n if (typeof module === \"string\") {\n var payload = lookup(parentId, module);\n if (payload != undefined) {\n callback && callback();\n return payload;\n }\n } else if (Object.prototype.toString.call(module) === \"[object Array]\") {\n var params = [];\n for (var i = 0, l = module.length; i < l; ++i) {\n var dep = lookup(parentId, module[i]);\n if (dep == undefined && acequire.original)\n return;\n params.push(dep);\n }\n return callback && callback.apply(null, params) || true;\n }\n};\n\nvar acequire = function(module, callback) {\n var packagedModule = _acequire(\"\", module, callback);\n if (packagedModule == undefined && acequire.original)\n return acequire.original.apply(this, arguments);\n return packagedModule;\n};\n\nvar normalizeModule = function(parentId, moduleName) {\n // normalize plugin acequires\n if (moduleName.indexOf(\"!\") !== -1) {\n var chunks = moduleName.split(\"!\");\n return normalizeModule(parentId, chunks[0]) + \"!\" + normalizeModule(parentId, chunks[1]);\n }\n // normalize relative acequires\n if (moduleName.charAt(0) == \".\") {\n var base = parentId.split(\"/\").slice(0, -1).join(\"/\");\n moduleName = base + \"/\" + moduleName;\n\n while(moduleName.indexOf(\".\") !== -1 && previous != moduleName) {\n var previous = moduleName;\n moduleName = moduleName.replace(/\\/\\.\\//, \"/\").replace(/[^\\/]+\\/\\.\\.\\//, \"\");\n }\n }\n return moduleName;\n};\n\n/**\n * Internal function to lookup moduleNames and resolve them by calling the\n * definition function if needed.\n */\nvar lookup = function(parentId, moduleName) {\n moduleName = normalizeModule(parentId, moduleName);\n\n var module = define.modules[moduleName];\n if (!module) {\n module = define.payloads[moduleName];\n if (typeof module === 'function') {\n var exports = {};\n var mod = {\n id: moduleName,\n uri: '',\n exports: exports,\n packaged: true\n };\n\n var req = function(module, callback) {\n return _acequire(moduleName, module, callback);\n };\n\n var returnValue = module(req, exports, mod);\n exports = returnValue || mod.exports;\n define.modules[moduleName] = exports;\n delete define.payloads[moduleName];\n }\n module = define.modules[moduleName] = exports || module;\n }\n return module;\n};\n\nfunction exportAce(ns) {\n var root = global;\n if (ns) {\n if (!global[ns])\n global[ns] = {};\n root = global[ns];\n }\n\n if (!root.define || !root.define.packaged) {\n define.original = root.define;\n root.define = define;\n root.define.packaged = true;\n }\n\n if (!root.acequire || !root.acequire.packaged) {\n acequire.original = root.acequire;\n root.acequire = acequire;\n root.acequire.packaged = true;\n }\n}\n\nexportAce(ACE_NAMESPACE);\n\n})();\n\nace.define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\n var real = {\n exec: RegExp.prototype.exec,\n test: RegExp.prototype.test,\n match: String.prototype.match,\n replace: String.prototype.replace,\n split: String.prototype.split\n },\n compliantExecNpcg = real.exec.call(/()??/, \"\")[1] === undefined, // check `exec` handling of nonparticipating capturing groups\n compliantLastIndexIncrement = function () {\n var x = /^/g;\n real.test.call(x, \"\");\n return !x.lastIndex;\n }();\n\n if (compliantLastIndexIncrement && compliantExecNpcg)\n return;\n RegExp.prototype.exec = function (str) {\n var match = real.exec.apply(this, arguments),\n name, r2;\n if ( typeof(str) == 'string' && match) {\n if (!compliantExecNpcg && match.length > 1 && indexOf(match, \"\") > -1) {\n r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), \"g\", \"\"));\n real.replace.call(str.slice(match.index), r2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined)\n match[i] = undefined;\n }\n });\n }\n if (this._xregexp && this._xregexp.captureNames) {\n for (var i = 1; i < match.length; i++) {\n name = this._xregexp.captureNames[i - 1];\n if (name)\n match[name] = match[i];\n }\n }\n if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n }\n return match;\n };\n if (!compliantLastIndexIncrement) {\n RegExp.prototype.test = function (str) {\n var match = real.exec.call(this, str);\n if (match && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n return !!match;\n };\n }\n\n function getNativeFlags (regex) {\n return (regex.global ? \"g\" : \"\") +\n (regex.ignoreCase ? \"i\" : \"\") +\n (regex.multiline ? \"m\" : \"\") +\n (regex.extended ? \"x\" : \"\") + // Proposed for ES4; included in AS3\n (regex.sticky ? \"y\" : \"\");\n }\n\n function indexOf (array, item, from) {\n if (Array.prototype.indexOf) // Use the native array method if available\n return array.indexOf(item, from);\n for (var i = from || 0; i < array.length; i++) {\n if (array[i] === item)\n return i;\n }\n return -1;\n }\n\n});\n\nace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\nfunction Empty() {}\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function bind(that) { // .length is 1\n var target = this;\n if (typeof target != \"function\") {\n throw new TypeError(\"Function.prototype.bind called on incompatible \" + target);\n }\n var args = slice.call(arguments, 1); // for normal call\n var bound = function () {\n\n if (this instanceof bound) {\n\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n\n }\n\n };\n if(target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n return bound;\n };\n}\nvar call = Function.prototype.call;\nvar prototypeOfArray = Array.prototype;\nvar prototypeOfObject = Object.prototype;\nvar slice = prototypeOfArray.slice;\nvar _toString = call.bind(prototypeOfObject.toString);\nvar owns = call.bind(prototypeOfObject.hasOwnProperty);\nvar defineGetter;\nvar defineSetter;\nvar lookupGetter;\nvar lookupSetter;\nvar supportsAccessors;\nif ((supportsAccessors = owns(prototypeOfObject, \"__defineGetter__\"))) {\n defineGetter = call.bind(prototypeOfObject.__defineGetter__);\n defineSetter = call.bind(prototypeOfObject.__defineSetter__);\n lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);\n lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);\n}\nif ([1,2].splice(0).length != 2) {\n if(function() { // test IE < 9 to splice bug - see issue #138\n function makeArray(l) {\n var a = new Array(l+2);\n a[0] = a[1] = 0;\n return a;\n }\n var array = [], lengthBefore;\n \n array.splice.apply(array, makeArray(20));\n array.splice.apply(array, makeArray(26));\n\n lengthBefore = array.length; //46\n array.splice(5, 0, \"XXX\"); // add one element\n\n lengthBefore + 1 == array.length\n\n if (lengthBefore + 1 == array.length) {\n return true;// has right splice implementation without bugs\n }\n }()) {//IE 6/7\n var array_splice = Array.prototype.splice;\n Array.prototype.splice = function(start, deleteCount) {\n if (!arguments.length) {\n return [];\n } else {\n return array_splice.apply(this, [\n start === void 0 ? 0 : start,\n deleteCount === void 0 ? (this.length - start) : deleteCount\n ].concat(slice.call(arguments, 2)))\n }\n };\n } else {//IE8\n Array.prototype.splice = function(pos, removeCount){\n var length = this.length;\n if (pos > 0) {\n if (pos > length)\n pos = length;\n } else if (pos == void 0) {\n pos = 0;\n } else if (pos < 0) {\n pos = Math.max(length + pos, 0);\n }\n\n if (!(pos+removeCount < length))\n removeCount = length - pos;\n\n var removed = this.slice(pos, pos+removeCount);\n var insert = slice.call(arguments, 2);\n var add = insert.length; \n if (pos === length) {\n if (add) {\n this.push.apply(this, insert);\n }\n } else {\n var remove = Math.min(removeCount, length - pos);\n var tailOldPos = pos + remove;\n var tailNewPos = tailOldPos + add - remove;\n var tailCount = length - tailOldPos;\n var lengthAfterRemove = length - remove;\n\n if (tailNewPos < tailOldPos) { // case A\n for (var i = 0; i < tailCount; ++i) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } else if (tailNewPos > tailOldPos) { // case B\n for (i = tailCount; i--; ) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } // else, add == remove (nothing to do)\n\n if (add && pos === lengthAfterRemove) {\n this.length = lengthAfterRemove; // truncate array\n this.push.apply(this, insert);\n } else {\n this.length = lengthAfterRemove + add; // reserves space\n for (i = 0; i < add; ++i) {\n this[pos+i] = insert[i];\n }\n }\n }\n return removed;\n };\n }\n}\nif (!Array.isArray) {\n Array.isArray = function isArray(obj) {\n return _toString(obj) == \"[object Array]\";\n };\n}\nvar boxedString = Object(\"a\"),\n splitString = boxedString[0] != \"a\" || !(0 in boxedString);\n\nif (!Array.prototype.forEach) {\n Array.prototype.forEach = function forEach(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n fun.call(thisp, self[i], i, object);\n }\n }\n };\n}\nif (!Array.prototype.map) {\n Array.prototype.map = function map(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = Array(length),\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self)\n result[i] = fun.call(thisp, self[i], i, object);\n }\n return result;\n };\n}\nif (!Array.prototype.filter) {\n Array.prototype.filter = function filter(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = [],\n value,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) {\n value = self[i];\n if (fun.call(thisp, value, i, object)) {\n result.push(value);\n }\n }\n }\n return result;\n };\n}\nif (!Array.prototype.every) {\n Array.prototype.every = function every(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && !fun.call(thisp, self[i], i, object)) {\n return false;\n }\n }\n return true;\n };\n}\nif (!Array.prototype.some) {\n Array.prototype.some = function some(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && fun.call(thisp, self[i], i, object)) {\n return true;\n }\n }\n return false;\n };\n}\nif (!Array.prototype.reduce) {\n Array.prototype.reduce = function reduce(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n\n var i = 0;\n var result;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i++];\n break;\n }\n if (++i >= length) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n } while (true);\n }\n\n for (; i < length; i++) {\n if (i in self) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n }\n\n return result;\n };\n}\nif (!Array.prototype.reduceRight) {\n Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n\n var result, i = length - 1;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i--];\n break;\n }\n if (--i < 0) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n } while (true);\n }\n\n do {\n if (i in this) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n } while (i--);\n\n return result;\n };\n}\nif (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {\n Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n }\n i = i >= 0 ? i : Math.max(0, length + i);\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {\n Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n var i = length - 1;\n if (arguments.length > 1) {\n i = Math.min(i, toInteger(arguments[1]));\n }\n i = i >= 0 ? i : length - Math.abs(i);\n for (; i >= 0; i--) {\n if (i in self && sought === self[i]) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Object.getPrototypeOf) {\n Object.getPrototypeOf = function getPrototypeOf(object) {\n return object.__proto__ || (\n object.constructor ?\n object.constructor.prototype :\n prototypeOfObject\n );\n };\n}\nif (!Object.getOwnPropertyDescriptor) {\n var ERR_NON_OBJECT = \"Object.getOwnPropertyDescriptor called on a \" +\n \"non-object: \";\n Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT + object);\n if (!owns(object, property))\n return;\n\n var descriptor, getter, setter;\n descriptor = { enumerable: true, configurable: true };\n if (supportsAccessors) {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n\n var getter = lookupGetter(object, property);\n var setter = lookupSetter(object, property);\n object.__proto__ = prototype;\n\n if (getter || setter) {\n if (getter) descriptor.get = getter;\n if (setter) descriptor.set = setter;\n return descriptor;\n }\n }\n descriptor.value = object[property];\n return descriptor;\n };\n}\nif (!Object.getOwnPropertyNames) {\n Object.getOwnPropertyNames = function getOwnPropertyNames(object) {\n return Object.keys(object);\n };\n}\nif (!Object.create) {\n var createEmpty;\n if (Object.prototype.__proto__ === null) {\n createEmpty = function () {\n return { \"__proto__\": null };\n };\n } else {\n createEmpty = function () {\n var empty = {};\n for (var i in empty)\n empty[i] = null;\n empty.constructor =\n empty.hasOwnProperty =\n empty.propertyIsEnumerable =\n empty.isPrototypeOf =\n empty.toLocaleString =\n empty.toString =\n empty.valueOf =\n empty.__proto__ = null;\n return empty;\n }\n }\n\n Object.create = function create(prototype, properties) {\n var object;\n if (prototype === null) {\n object = createEmpty();\n } else {\n if (typeof prototype != \"object\")\n throw new TypeError(\"typeof prototype[\"+(typeof prototype)+\"] != 'object'\");\n var Type = function () {};\n Type.prototype = prototype;\n object = new Type();\n object.__proto__ = prototype;\n }\n if (properties !== void 0)\n Object.defineProperties(object, properties);\n return object;\n };\n}\n\nfunction doesDefinePropertyWork(object) {\n try {\n Object.defineProperty(object, \"sentinel\", {});\n return \"sentinel\" in object;\n } catch (exception) {\n }\n}\nif (Object.defineProperty) {\n var definePropertyWorksOnObject = doesDefinePropertyWork({});\n var definePropertyWorksOnDom = typeof document == \"undefined\" ||\n doesDefinePropertyWork(document.createElement(\"div\"));\n if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {\n var definePropertyFallback = Object.defineProperty;\n }\n}\n\nif (!Object.defineProperty || definePropertyFallback) {\n var ERR_NON_OBJECT_DESCRIPTOR = \"Property description must be an object: \";\n var ERR_NON_OBJECT_TARGET = \"Object.defineProperty called on non-object: \"\n var ERR_ACCESSORS_NOT_SUPPORTED = \"getters & setters can not be defined \" +\n \"on this javascript engine\";\n\n Object.defineProperty = function defineProperty(object, property, descriptor) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT_TARGET + object);\n if ((typeof descriptor != \"object\" && typeof descriptor != \"function\") || descriptor === null)\n throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);\n if (definePropertyFallback) {\n try {\n return definePropertyFallback.call(Object, object, property, descriptor);\n } catch (exception) {\n }\n }\n if (owns(descriptor, \"value\")) {\n\n if (supportsAccessors && (lookupGetter(object, property) ||\n lookupSetter(object, property)))\n {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n delete object[property];\n object[property] = descriptor.value;\n object.__proto__ = prototype;\n } else {\n object[property] = descriptor.value;\n }\n } else {\n if (!supportsAccessors)\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n if (owns(descriptor, \"get\"))\n defineGetter(object, property, descriptor.get);\n if (owns(descriptor, \"set\"))\n defineSetter(object, property, descriptor.set);\n }\n\n return object;\n };\n}\nif (!Object.defineProperties) {\n Object.defineProperties = function defineProperties(object, properties) {\n for (var property in properties) {\n if (owns(properties, property))\n Object.defineProperty(object, property, properties[property]);\n }\n return object;\n };\n}\nif (!Object.seal) {\n Object.seal = function seal(object) {\n return object;\n };\n}\nif (!Object.freeze) {\n Object.freeze = function freeze(object) {\n return object;\n };\n}\ntry {\n Object.freeze(function () {});\n} catch (exception) {\n Object.freeze = (function freeze(freezeObject) {\n return function freeze(object) {\n if (typeof object == \"function\") {\n return object;\n } else {\n return freezeObject(object);\n }\n };\n })(Object.freeze);\n}\nif (!Object.preventExtensions) {\n Object.preventExtensions = function preventExtensions(object) {\n return object;\n };\n}\nif (!Object.isSealed) {\n Object.isSealed = function isSealed(object) {\n return false;\n };\n}\nif (!Object.isFrozen) {\n Object.isFrozen = function isFrozen(object) {\n return false;\n };\n}\nif (!Object.isExtensible) {\n Object.isExtensible = function isExtensible(object) {\n if (Object(object) === object) {\n throw new TypeError(); // TODO message\n }\n var name = '';\n while (owns(object, name)) {\n name += '?';\n }\n object[name] = true;\n var returnValue = owns(object, name);\n delete object[name];\n return returnValue;\n };\n}\nif (!Object.keys) {\n var hasDontEnumBug = true,\n dontEnums = [\n \"toString\",\n \"toLocaleString\",\n \"valueOf\",\n \"hasOwnProperty\",\n \"isPrototypeOf\",\n \"propertyIsEnumerable\",\n \"constructor\"\n ],\n dontEnumsLength = dontEnums.length;\n\n for (var key in {\"toString\": null}) {\n hasDontEnumBug = false;\n }\n\n Object.keys = function keys(object) {\n\n if (\n (typeof object != \"object\" && typeof object != \"function\") ||\n object === null\n ) {\n throw new TypeError(\"Object.keys called on a non-object\");\n }\n\n var keys = [];\n for (var name in object) {\n if (owns(object, name)) {\n keys.push(name);\n }\n }\n\n if (hasDontEnumBug) {\n for (var i = 0, ii = dontEnumsLength; i < ii; i++) {\n var dontEnum = dontEnums[i];\n if (owns(object, dontEnum)) {\n keys.push(dontEnum);\n }\n }\n }\n return keys;\n };\n\n}\nif (!Date.now) {\n Date.now = function now() {\n return new Date().getTime();\n };\n}\nvar ws = \"\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\" +\n \"\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\" +\n \"\\u2029\\uFEFF\";\nif (!String.prototype.trim || ws.trim()) {\n ws = \"[\" + ws + \"]\";\n var trimBeginRegexp = new RegExp(\"^\" + ws + ws + \"*\"),\n trimEndRegexp = new RegExp(ws + ws + \"*$\");\n String.prototype.trim = function trim() {\n return String(this).replace(trimBeginRegexp, \"\").replace(trimEndRegexp, \"\");\n };\n}\n\nfunction toInteger(n) {\n n = +n;\n if (n !== n) { // isNaN\n n = 0;\n } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n return n;\n}\n\nfunction isPrimitive(input) {\n var type = typeof input;\n return (\n input === null ||\n type === \"undefined\" ||\n type === \"boolean\" ||\n type === \"number\" ||\n type === \"string\"\n );\n}\n\nfunction toPrimitive(input) {\n var val, valueOf, toString;\n if (isPrimitive(input)) {\n return input;\n }\n valueOf = input.valueOf;\n if (typeof valueOf === \"function\") {\n val = valueOf.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n toString = input.toString;\n if (typeof toString === \"function\") {\n val = toString.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n throw new TypeError();\n}\nvar toObject = function (o) {\n if (o == null) { // this matches both null and undefined\n throw new TypeError(\"can't convert \"+o+\" to object\");\n }\n return Object(o);\n};\n\n});\n\nace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./regexp\");\nacequire(\"./es5-shim\");\n\n});\n\nace.define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar XHTML_NS = \"http://www.w3.org/1999/xhtml\";\n\nexports.getDocumentHead = function(doc) {\n if (!doc)\n doc = document;\n return doc.head || doc.getElementsByTagName(\"head\")[0] || doc.documentElement;\n}\n\nexports.createElement = function(tag, ns) {\n return document.createElementNS ?\n document.createElementNS(ns || XHTML_NS, tag) :\n document.createElement(tag);\n};\n\nexports.hasCssClass = function(el, name) {\n var classes = (el.className + \"\").split(/\\s+/g);\n return classes.indexOf(name) !== -1;\n};\nexports.addCssClass = function(el, name) {\n if (!exports.hasCssClass(el, name)) {\n el.className += \" \" + name;\n }\n};\nexports.removeCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g);\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n classes.splice(index, 1);\n }\n el.className = classes.join(\" \");\n};\n\nexports.toggleCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g), add = true;\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n add = false;\n classes.splice(index, 1);\n }\n if (add)\n classes.push(name);\n\n el.className = classes.join(\" \");\n return add;\n};\nexports.setCssClass = function(node, className, include) {\n if (include) {\n exports.addCssClass(node, className);\n } else {\n exports.removeCssClass(node, className);\n }\n};\n\nexports.hasCssString = function(id, doc) {\n var index = 0, sheets;\n doc = doc || document;\n\n if (doc.createStyleSheet && (sheets = doc.styleSheets)) {\n while (index < sheets.length)\n if (sheets[index++].owningElement.id === id) return true;\n } else if ((sheets = doc.getElementsByTagName(\"style\"))) {\n while (index < sheets.length)\n if (sheets[index++].id === id) return true;\n }\n\n return false;\n};\n\nexports.importCssString = function importCssString(cssText, id, doc) {\n doc = doc || document;\n if (id && exports.hasCssString(id, doc))\n return null;\n \n var style;\n \n if (id)\n cssText += \"\\n/*# sourceURL=ace/css/\" + id + \" */\";\n \n if (doc.createStyleSheet) {\n style = doc.createStyleSheet();\n style.cssText = cssText;\n if (id)\n style.owningElement.id = id;\n } else {\n style = exports.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n if (id)\n style.id = id;\n\n exports.getDocumentHead(doc).appendChild(style);\n }\n};\n\nexports.importCssStylsheet = function(uri, doc) {\n if (doc.createStyleSheet) {\n doc.createStyleSheet(uri);\n } else {\n var link = exports.createElement('link');\n link.rel = 'stylesheet';\n link.href = uri;\n\n exports.getDocumentHead(doc).appendChild(link);\n }\n};\n\nexports.getInnerWidth = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingLeft\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingRight\"), 10) + \n element.clientWidth\n );\n};\n\nexports.getInnerHeight = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingTop\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingBottom\"), 10) +\n element.clientHeight\n );\n};\n\nexports.scrollbarWidth = function(document) {\n var inner = exports.createElement(\"ace_inner\");\n inner.style.width = \"100%\";\n inner.style.minWidth = \"0px\";\n inner.style.height = \"200px\";\n inner.style.display = \"block\";\n\n var outer = exports.createElement(\"ace_outer\");\n var style = outer.style;\n\n style.position = \"absolute\";\n style.left = \"-10000px\";\n style.overflow = \"hidden\";\n style.width = \"200px\";\n style.minWidth = \"0px\";\n style.height = \"150px\";\n style.display = \"block\";\n\n outer.appendChild(inner);\n\n var body = document.documentElement;\n body.appendChild(outer);\n\n var noScrollbar = inner.offsetWidth;\n\n style.overflow = \"scroll\";\n var withScrollbar = inner.offsetWidth;\n\n if (noScrollbar == withScrollbar) {\n withScrollbar = outer.clientWidth;\n }\n\n body.removeChild(outer);\n\n return noScrollbar-withScrollbar;\n};\n\nif (typeof document == \"undefined\") {\n exports.importCssString = function() {};\n return;\n}\n\nif (window.pageYOffset !== undefined) {\n exports.getPageScrollTop = function() {\n return window.pageYOffset;\n };\n\n exports.getPageScrollLeft = function() {\n return window.pageXOffset;\n };\n}\nelse {\n exports.getPageScrollTop = function() {\n return document.body.scrollTop;\n };\n\n exports.getPageScrollLeft = function() {\n return document.body.scrollLeft;\n };\n}\n\nif (window.getComputedStyle)\n exports.computedStyle = function(element, style) {\n if (style)\n return (window.getComputedStyle(element, \"\") || {})[style] || \"\";\n return window.getComputedStyle(element, \"\") || {};\n };\nelse\n exports.computedStyle = function(element, style) {\n if (style)\n return element.currentStyle[style];\n return element.currentStyle;\n };\nexports.setInnerHtml = function(el, innerHtml) {\n var element = el.cloneNode(false);//document.createElement(\"div\");\n element.innerHTML = innerHtml;\n el.parentNode.replaceChild(element, el);\n return element;\n};\n\nif (\"textContent\" in document.documentElement) {\n exports.setInnerText = function(el, innerText) {\n el.textContent = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.textContent;\n };\n}\nelse {\n exports.setInnerText = function(el, innerText) {\n el.innerText = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.innerText;\n };\n}\n\nexports.getParentWindow = function(document) {\n return document.defaultView || document.parentWindow;\n};\n\n});\n\nace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.inherits = function(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n};\n\nexports.mixin = function(obj, mixin) {\n for (var key in mixin) {\n obj[key] = mixin[key];\n }\n return obj;\n};\n\nexports.implement = function(proto, mixin) {\n exports.mixin(proto, mixin);\n};\n\n});\n\nace.define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./fixoldbrowsers\");\n\nvar oop = acequire(\"./oop\");\nvar Keys = (function() {\n var ret = {\n MODIFIER_KEYS: {\n 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'\n },\n\n KEY_MODS: {\n \"ctrl\": 1, \"alt\": 2, \"option\" : 2, \"shift\": 4,\n \"super\": 8, \"meta\": 8, \"command\": 8, \"cmd\": 8\n },\n\n FUNCTION_KEYS : {\n 8 : \"Backspace\",\n 9 : \"Tab\",\n 13 : \"Return\",\n 19 : \"Pause\",\n 27 : \"Esc\",\n 32 : \"Space\",\n 33 : \"PageUp\",\n 34 : \"PageDown\",\n 35 : \"End\",\n 36 : \"Home\",\n 37 : \"Left\",\n 38 : \"Up\",\n 39 : \"Right\",\n 40 : \"Down\",\n 44 : \"Print\",\n 45 : \"Insert\",\n 46 : \"Delete\",\n 96 : \"Numpad0\",\n 97 : \"Numpad1\",\n 98 : \"Numpad2\",\n 99 : \"Numpad3\",\n 100: \"Numpad4\",\n 101: \"Numpad5\",\n 102: \"Numpad6\",\n 103: \"Numpad7\",\n 104: \"Numpad8\",\n 105: \"Numpad9\",\n '-13': \"NumpadEnter\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"Numlock\",\n 145: \"Scrolllock\"\n },\n\n PRINTABLE_KEYS: {\n 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',\n 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',\n 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',\n 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',\n 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',\n 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',\n 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',\n 219: '[', 220: '\\\\',221: ']', 222: \"'\", 111: '/', 106: '*'\n }\n };\n var name, i;\n for (i in ret.FUNCTION_KEYS) {\n name = ret.FUNCTION_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n for (i in ret.PRINTABLE_KEYS) {\n name = ret.PRINTABLE_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n oop.mixin(ret, ret.MODIFIER_KEYS);\n oop.mixin(ret, ret.PRINTABLE_KEYS);\n oop.mixin(ret, ret.FUNCTION_KEYS);\n ret.enter = ret[\"return\"];\n ret.escape = ret.esc;\n ret.del = ret[\"delete\"];\n ret[173] = '-';\n \n (function() {\n var mods = [\"cmd\", \"ctrl\", \"alt\", \"shift\"];\n for (var i = Math.pow(2, mods.length); i--;) { \n ret.KEY_MODS[i] = mods.filter(function(x) {\n return i & ret.KEY_MODS[x];\n }).join(\"-\") + \"-\";\n }\n })();\n\n ret.KEY_MODS[0] = \"\";\n ret.KEY_MODS[-1] = \"input-\";\n\n return ret;\n})();\noop.mixin(exports, Keys);\n\nexports.keyCodeToString = function(keyCode) {\n var keyString = Keys[keyCode];\n if (typeof keyString != \"string\")\n keyString = String.fromCharCode(keyCode);\n return keyString.toLowerCase();\n};\n\n});\n\nace.define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.OS = {\n LINUX: \"LINUX\",\n MAC: \"MAC\",\n WINDOWS: \"WINDOWS\"\n};\nexports.getOS = function() {\n if (exports.isMac) {\n return exports.OS.MAC;\n } else if (exports.isLinux) {\n return exports.OS.LINUX;\n } else {\n return exports.OS.WINDOWS;\n }\n};\nif (typeof navigator != \"object\")\n return;\n\nvar os = (navigator.platform.match(/mac|win|linux/i) || [\"other\"])[0].toLowerCase();\nvar ua = navigator.userAgent;\nexports.isWin = (os == \"win\");\nexports.isMac = (os == \"mac\");\nexports.isLinux = (os == \"linux\");\nexports.isIE = \n (navigator.appName == \"Microsoft Internet Explorer\" || navigator.appName.indexOf(\"MSAppHost\") >= 0)\n ? parseFloat((ua.match(/(?:MSIE |Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1])\n : parseFloat((ua.match(/(?:Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1]); // for ie\n \nexports.isOldIE = exports.isIE && exports.isIE < 9;\nexports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === \"Gecko\";\nexports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv:(\\d+)/)||[])[1], 10) < 4;\nexports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == \"[object Opera]\";\nexports.isWebKit = parseFloat(ua.split(\"WebKit/\")[1]) || undefined;\n\nexports.isChrome = parseFloat(ua.split(\" Chrome/\")[1]) || undefined;\n\nexports.isAIR = ua.indexOf(\"AdobeAIR\") >= 0;\n\nexports.isIPad = ua.indexOf(\"iPad\") >= 0;\n\nexports.isTouchPad = ua.indexOf(\"TouchPad\") >= 0;\n\nexports.isChromeOS = ua.indexOf(\" CrOS \") >= 0;\n\n});\n\nace.define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keys = acequire(\"./keys\");\nvar useragent = acequire(\"./useragent\");\n\nvar pressedKeys = null;\nvar ts = 0;\n\nexports.addListener = function(elem, type, callback) {\n if (elem.addEventListener) {\n return elem.addEventListener(type, callback, false);\n }\n if (elem.attachEvent) {\n var wrapper = function() {\n callback.call(elem, window.event);\n };\n callback._wrapper = wrapper;\n elem.attachEvent(\"on\" + type, wrapper);\n }\n};\n\nexports.removeListener = function(elem, type, callback) {\n if (elem.removeEventListener) {\n return elem.removeEventListener(type, callback, false);\n }\n if (elem.detachEvent) {\n elem.detachEvent(\"on\" + type, callback._wrapper || callback);\n }\n};\nexports.stopEvent = function(e) {\n exports.stopPropagation(e);\n exports.preventDefault(e);\n return false;\n};\n\nexports.stopPropagation = function(e) {\n if (e.stopPropagation)\n e.stopPropagation();\n else\n e.cancelBubble = true;\n};\n\nexports.preventDefault = function(e) {\n if (e.preventDefault)\n e.preventDefault();\n else\n e.returnValue = false;\n};\nexports.getButton = function(e) {\n if (e.type == \"dblclick\")\n return 0;\n if (e.type == \"contextmenu\" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))\n return 2;\n if (e.preventDefault) {\n return e.button;\n }\n else {\n return {1:0, 2:2, 4:1}[e.button];\n }\n};\n\nexports.capture = function(el, eventHandler, releaseCaptureHandler) {\n function onMouseUp(e) {\n eventHandler && eventHandler(e);\n releaseCaptureHandler && releaseCaptureHandler(e);\n\n exports.removeListener(document, \"mousemove\", eventHandler, true);\n exports.removeListener(document, \"mouseup\", onMouseUp, true);\n exports.removeListener(document, \"dragstart\", onMouseUp, true);\n }\n\n exports.addListener(document, \"mousemove\", eventHandler, true);\n exports.addListener(document, \"mouseup\", onMouseUp, true);\n exports.addListener(document, \"dragstart\", onMouseUp, true);\n \n return onMouseUp;\n};\n\nexports.addTouchMoveListener = function (el, callback) {\n if (\"ontouchmove\" in el) {\n var startx, starty;\n exports.addListener(el, \"touchstart\", function (e) {\n var touchObj = e.changedTouches[0];\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n });\n exports.addListener(el, \"touchmove\", function (e) {\n var factor = 1,\n touchObj = e.changedTouches[0];\n\n e.wheelX = -(touchObj.clientX - startx) / factor;\n e.wheelY = -(touchObj.clientY - starty) / factor;\n\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n\n callback(e);\n });\n } \n};\n\nexports.addMouseWheelListener = function(el, callback) {\n if (\"onmousewheel\" in el) {\n exports.addListener(el, \"mousewheel\", function(e) {\n var factor = 8;\n if (e.wheelDeltaX !== undefined) {\n e.wheelX = -e.wheelDeltaX / factor;\n e.wheelY = -e.wheelDeltaY / factor;\n } else {\n e.wheelX = 0;\n e.wheelY = -e.wheelDelta / factor;\n }\n callback(e);\n });\n } else if (\"onwheel\" in el) {\n exports.addListener(el, \"wheel\", function(e) {\n var factor = 0.35;\n switch (e.deltaMode) {\n case e.DOM_DELTA_PIXEL:\n e.wheelX = e.deltaX * factor || 0;\n e.wheelY = e.deltaY * factor || 0;\n break;\n case e.DOM_DELTA_LINE:\n case e.DOM_DELTA_PAGE:\n e.wheelX = (e.deltaX || 0) * 5;\n e.wheelY = (e.deltaY || 0) * 5;\n break;\n }\n \n callback(e);\n });\n } else {\n exports.addListener(el, \"DOMMouseScroll\", function(e) {\n if (e.axis && e.axis == e.HORIZONTAL_AXIS) {\n e.wheelX = (e.detail || 0) * 5;\n e.wheelY = 0;\n } else {\n e.wheelX = 0;\n e.wheelY = (e.detail || 0) * 5;\n }\n callback(e);\n });\n }\n};\n\nexports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) {\n var clicks = 0;\n var startX, startY, timer; \n var eventNames = {\n 2: \"dblclick\",\n 3: \"tripleclick\",\n 4: \"quadclick\"\n };\n\n function onMousedown(e) {\n if (exports.getButton(e) !== 0) {\n clicks = 0;\n } else if (e.detail > 1) {\n clicks++;\n if (clicks > 4)\n clicks = 1;\n } else {\n clicks = 1;\n }\n if (useragent.isIE) {\n var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;\n if (!timer || isNewClick)\n clicks = 1;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);\n\n if (clicks == 1) {\n startX = e.clientX;\n startY = e.clientY;\n }\n }\n \n e._clicks = clicks;\n\n eventHandler[callbackName](\"mousedown\", e);\n\n if (clicks > 4)\n clicks = 0;\n else if (clicks > 1)\n return eventHandler[callbackName](eventNames[clicks], e);\n }\n function onDblclick(e) {\n clicks = 2;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);\n eventHandler[callbackName](\"mousedown\", e);\n eventHandler[callbackName](eventNames[clicks], e);\n }\n if (!Array.isArray(elements))\n elements = [elements];\n elements.forEach(function(el) {\n exports.addListener(el, \"mousedown\", onMousedown);\n if (useragent.isOldIE)\n exports.addListener(el, \"dblclick\", onDblclick);\n });\n};\n\nvar getModifierHash = useragent.isMac && useragent.isOpera && !(\"KeyboardEvent\" in window)\n ? function(e) {\n return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);\n }\n : function(e) {\n return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);\n };\n\nexports.getModifierString = function(e) {\n return keys.KEY_MODS[getModifierHash(e)];\n};\n\nfunction normalizeCommandKeys(callback, e, keyCode) {\n var hashId = getModifierHash(e);\n\n if (!useragent.isMac && pressedKeys) {\n if (e.getModifierState && (e.getModifierState(\"OS\") || e.getModifierState(\"Win\")))\n hashId |= 8;\n if (pressedKeys.altGr) {\n if ((3 & hashId) != 3)\n pressedKeys.altGr = 0;\n else\n return;\n }\n if (keyCode === 18 || keyCode === 17) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (keyCode === 17 && location === 1) {\n if (pressedKeys[keyCode] == 1)\n ts = e.timeStamp;\n } else if (keyCode === 18 && hashId === 3 && location === 2) {\n var dt = e.timeStamp - ts;\n if (dt < 50)\n pressedKeys.altGr = true;\n }\n }\n }\n \n if (keyCode in keys.MODIFIER_KEYS) {\n keyCode = -1;\n }\n if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {\n keyCode = -1;\n }\n \n if (!hashId && keyCode === 13) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (location === 3) {\n callback(e, hashId, -keyCode);\n if (e.defaultPrevented)\n return;\n }\n }\n \n if (useragent.isChromeOS && hashId & 8) {\n callback(e, hashId, keyCode);\n if (e.defaultPrevented)\n return;\n else\n hashId &= ~8;\n }\n if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {\n return false;\n }\n \n return callback(e, hashId, keyCode);\n}\n\n\nexports.addCommandKeyListener = function(el, callback) {\n var addListener = exports.addListener;\n if (useragent.isOldGecko || (useragent.isOpera && !(\"KeyboardEvent\" in window))) {\n var lastKeyDownKeyCode = null;\n addListener(el, \"keydown\", function(e) {\n lastKeyDownKeyCode = e.keyCode;\n });\n addListener(el, \"keypress\", function(e) {\n return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);\n });\n } else {\n var lastDefaultPrevented = null;\n\n addListener(el, \"keydown\", function(e) {\n pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;\n var result = normalizeCommandKeys(callback, e, e.keyCode);\n lastDefaultPrevented = e.defaultPrevented;\n return result;\n });\n\n addListener(el, \"keypress\", function(e) {\n if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {\n exports.stopEvent(e);\n lastDefaultPrevented = null;\n }\n });\n\n addListener(el, \"keyup\", function(e) {\n pressedKeys[e.keyCode] = null;\n });\n\n if (!pressedKeys) {\n resetPressedKeys();\n addListener(window, \"focus\", resetPressedKeys);\n }\n }\n};\nfunction resetPressedKeys() {\n pressedKeys = Object.create(null);\n}\n\nif (typeof window == \"object\" && window.postMessage && !useragent.isOldIE) {\n var postMessageId = 1;\n exports.nextTick = function(callback, win) {\n win = win || window;\n var messageName = \"zero-timeout-message-\" + postMessageId;\n exports.addListener(win, \"message\", function listener(e) {\n if (e.data == messageName) {\n exports.stopPropagation(e);\n exports.removeListener(win, \"message\", listener);\n callback();\n }\n });\n win.postMessage(messageName, \"*\");\n };\n}\n\n\nexports.nextFrame = typeof window == \"object\" && (window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame\n || window.oRequestAnimationFrame);\n\nif (exports.nextFrame)\n exports.nextFrame = exports.nextFrame.bind(window);\nelse\n exports.nextFrame = function(callback) {\n setTimeout(callback, 17);\n };\n});\n\nace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.last = function(a) {\n return a[a.length - 1];\n};\n\nexports.stringReverse = function(string) {\n return string.split(\"\").reverse().join(\"\");\n};\n\nexports.stringRepeat = function (string, count) {\n var result = '';\n while (count > 0) {\n if (count & 1)\n result += string;\n\n if (count >>= 1)\n string += string;\n }\n return result;\n};\n\nvar trimBeginRegexp = /^\\s\\s*/;\nvar trimEndRegexp = /\\s\\s*$/;\n\nexports.stringTrimLeft = function (string) {\n return string.replace(trimBeginRegexp, '');\n};\n\nexports.stringTrimRight = function (string) {\n return string.replace(trimEndRegexp, '');\n};\n\nexports.copyObject = function(obj) {\n var copy = {};\n for (var key in obj) {\n copy[key] = obj[key];\n }\n return copy;\n};\n\nexports.copyArray = function(array){\n var copy = [];\n for (var i=0, l=array.length; i<l; i++) {\n if (array[i] && typeof array[i] == \"object\")\n copy[i] = this.copyObject(array[i]);\n else \n copy[i] = array[i];\n }\n return copy;\n};\n\nexports.deepCopy = function deepCopy(obj) {\n if (typeof obj !== \"object\" || !obj)\n return obj;\n var copy;\n if (Array.isArray(obj)) {\n copy = [];\n for (var key = 0; key < obj.length; key++) {\n copy[key] = deepCopy(obj[key]);\n }\n return copy;\n }\n if (Object.prototype.toString.call(obj) !== \"[object Object]\")\n return obj;\n \n copy = {};\n for (var key in obj)\n copy[key] = deepCopy(obj[key]);\n return copy;\n};\n\nexports.arrayToMap = function(arr) {\n var map = {};\n for (var i=0; i<arr.length; i++) {\n map[arr[i]] = 1;\n }\n return map;\n\n};\n\nexports.createMap = function(props) {\n var map = Object.create(null);\n for (var i in props) {\n map[i] = props[i];\n }\n return map;\n};\nexports.arrayRemove = function(array, value) {\n for (var i = 0; i <= array.length; i++) {\n if (value === array[i]) {\n array.splice(i, 1);\n }\n }\n};\n\nexports.escapeRegExp = function(str) {\n return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g, '\\\\$1');\n};\n\nexports.escapeHTML = function(str) {\n return str.replace(/&/g, \"&\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/</g, \"<\");\n};\n\nexports.getMatchOffsets = function(string, regExp) {\n var matches = [];\n\n string.replace(regExp, function(str) {\n matches.push({\n offset: arguments[arguments.length-2],\n length: str.length\n });\n });\n\n return matches;\n};\nexports.deferredCall = function(fcn) {\n var timer = null;\n var callback = function() {\n timer = null;\n fcn();\n };\n\n var deferred = function(timeout) {\n deferred.cancel();\n timer = setTimeout(callback, timeout || 0);\n return deferred;\n };\n\n deferred.schedule = deferred;\n\n deferred.call = function() {\n this.cancel();\n fcn();\n return deferred;\n };\n\n deferred.cancel = function() {\n clearTimeout(timer);\n timer = null;\n return deferred;\n };\n \n deferred.isPending = function() {\n return timer;\n };\n\n return deferred;\n};\n\n\nexports.delayedCall = function(fcn, defaultTimeout) {\n var timer = null;\n var callback = function() {\n timer = null;\n fcn();\n };\n\n var _self = function(timeout) {\n if (timer == null)\n timer = setTimeout(callback, timeout || defaultTimeout);\n };\n\n _self.delay = function(timeout) {\n timer && clearTimeout(timer);\n timer = setTimeout(callback, timeout || defaultTimeout);\n };\n _self.schedule = _self;\n\n _self.call = function() {\n this.cancel();\n fcn();\n };\n\n _self.cancel = function() {\n timer && clearTimeout(timer);\n timer = null;\n };\n\n _self.isPending = function() {\n return timer;\n };\n\n return _self;\n};\n});\n\nace.define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar BROKEN_SETDATA = useragent.isChrome < 18;\nvar USE_IE_MIME_TYPE = useragent.isIE;\n\nvar TextInput = function(parentNode, host) {\n var text = dom.createElement(\"textarea\");\n text.className = \"ace_text-input\";\n\n if (useragent.isTouchPad)\n text.setAttribute(\"x-palm-disable-auto-cap\", true);\n\n text.setAttribute(\"wrap\", \"off\");\n text.setAttribute(\"autocorrect\", \"off\");\n text.setAttribute(\"autocapitalize\", \"off\");\n text.setAttribute(\"spellcheck\", false);\n\n text.style.opacity = \"0\";\n if (useragent.isOldIE) text.style.top = \"-1000px\";\n parentNode.insertBefore(text, parentNode.firstChild);\n\n var PLACEHOLDER = \"\\x01\\x01\";\n\n var copied = false;\n var pasted = false;\n var inComposition = false;\n var tempStyle = '';\n var isSelectionEmpty = true;\n try { var isFocused = document.activeElement === text; } catch(e) {}\n \n event.addListener(text, \"blur\", function(e) {\n host.onBlur(e);\n isFocused = false;\n });\n event.addListener(text, \"focus\", function(e) {\n isFocused = true;\n host.onFocus(e);\n resetSelection();\n });\n this.focus = function() {\n if (tempStyle) return text.focus();\n var top = text.style.top;\n text.style.position = \"fixed\";\n text.style.top = \"0px\";\n text.focus();\n setTimeout(function() {\n text.style.position = \"\";\n if (text.style.top == \"0px\")\n text.style.top = top;\n }, 0);\n };\n this.blur = function() {\n text.blur();\n };\n this.isFocused = function() {\n return isFocused;\n };\n var syncSelection = lang.delayedCall(function() {\n isFocused && resetSelection(isSelectionEmpty);\n });\n var syncValue = lang.delayedCall(function() {\n if (!inComposition) {\n text.value = PLACEHOLDER;\n isFocused && resetSelection();\n }\n });\n\n function resetSelection(isEmpty) {\n if (inComposition)\n return;\n inComposition = true;\n \n if (inputHandler) {\n selectionStart = 0;\n selectionEnd = isEmpty ? 0 : text.value.length - 1;\n } else {\n var selectionStart = isEmpty ? 2 : 1;\n var selectionEnd = 2;\n }\n try {\n text.setSelectionRange(selectionStart, selectionEnd);\n } catch(e){}\n \n inComposition = false;\n }\n\n function resetValue() {\n if (inComposition)\n return;\n text.value = PLACEHOLDER;\n if (useragent.isWebKit)\n syncValue.schedule();\n }\n\n useragent.isWebKit || host.addEventListener('changeSelection', function() {\n if (host.selection.isEmpty() != isSelectionEmpty) {\n isSelectionEmpty = !isSelectionEmpty;\n syncSelection.schedule();\n }\n });\n\n resetValue();\n if (isFocused)\n host.onFocus();\n\n\n var isAllSelected = function(text) {\n return text.selectionStart === 0 && text.selectionEnd === text.value.length;\n };\n if (!text.setSelectionRange && text.createTextRange) {\n text.setSelectionRange = function(selectionStart, selectionEnd) {\n var range = this.createTextRange();\n range.collapse(true);\n range.moveStart('character', selectionStart);\n range.moveEnd('character', selectionEnd);\n range.select();\n };\n isAllSelected = function(text) {\n try {\n var range = text.ownerDocument.selection.createRange();\n }catch(e) {}\n if (!range || range.parentElement() != text) return false;\n return range.text == text.value;\n }\n }\n if (useragent.isOldIE) {\n var inPropertyChange = false;\n var onPropertyChange = function(e){\n if (inPropertyChange)\n return;\n var data = text.value;\n if (inComposition || !data || data == PLACEHOLDER)\n return;\n if (e && data == PLACEHOLDER[0])\n return syncProperty.schedule();\n\n sendText(data);\n inPropertyChange = true;\n resetValue();\n inPropertyChange = false;\n };\n var syncProperty = lang.delayedCall(onPropertyChange);\n event.addListener(text, \"propertychange\", onPropertyChange);\n\n var keytable = { 13:1, 27:1 };\n event.addListener(text, \"keyup\", function (e) {\n if (inComposition && (!text.value || keytable[e.keyCode]))\n setTimeout(onCompositionEnd, 0);\n if ((text.value.charCodeAt(0)||0) < 129) {\n return syncProperty.call();\n }\n inComposition ? onCompositionUpdate() : onCompositionStart();\n });\n event.addListener(text, \"keydown\", function (e) {\n syncProperty.schedule(50);\n });\n }\n\n var onSelect = function(e) {\n if (copied) {\n copied = false;\n } else if (isAllSelected(text)) {\n host.selectAll();\n resetSelection();\n } else if (inputHandler) {\n resetSelection(host.selection.isEmpty());\n }\n };\n\n var inputHandler = null;\n this.setInputHandler = function(cb) {inputHandler = cb};\n this.getInputHandler = function() {return inputHandler};\n var afterContextMenu = false;\n \n var sendText = function(data) {\n if (inputHandler) {\n data = inputHandler(data);\n inputHandler = null;\n }\n if (pasted) {\n resetSelection();\n if (data)\n host.onPaste(data);\n pasted = false;\n } else if (data == PLACEHOLDER.charAt(0)) {\n if (afterContextMenu)\n host.execCommand(\"del\", {source: \"ace\"});\n else // some versions of android do not fire keydown when pressing backspace\n host.execCommand(\"backspace\", {source: \"ace\"});\n } else {\n if (data.substring(0, 2) == PLACEHOLDER)\n data = data.substr(2);\n else if (data.charAt(0) == PLACEHOLDER.charAt(0))\n data = data.substr(1);\n else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n \n if (data)\n host.onTextInput(data);\n }\n if (afterContextMenu)\n afterContextMenu = false;\n };\n var onInput = function(e) {\n if (inComposition)\n return;\n var data = text.value;\n sendText(data);\n resetValue();\n };\n \n var handleClipboardData = function(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch(e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function(e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n isCut ? host.onCut() : host.onCopy();\n event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function(){\n copied = false;\n resetValue();\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n \n var onCut = function(e) {\n doCopy(e, true);\n };\n \n var onCopy = function(e) {\n doCopy(e, false);\n };\n \n var onPaste = function(e) {\n var data = handleClipboardData(e);\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n\n event.addListener(text, \"select\", onSelect);\n\n event.addListener(text, \"input\", onInput);\n\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)){\n event.addListener(parentNode, \"keydown\", function(e) {\n if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)\n return;\n\n switch (e.keyCode) {\n case 67:\n onCopy(e);\n break;\n case 86:\n onPaste(e);\n break;\n case 88:\n onCut(e);\n break;\n }\n });\n }\n var onCompositionStart = function(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly) \n return;\n inComposition = {};\n inComposition.canUndo = host.session.$undoManager;\n host.onCompositionStart();\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", onCompositionEnd);\n if (inComposition.canUndo && !host.selection.isEmpty()) {\n host.insert(\"\");\n host.session.markUndoGroup();\n host.selection.clearSelection();\n }\n host.session.markUndoGroup();\n };\n\n var onCompositionUpdate = function() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n var val = text.value.replace(/\\x01/g, \"\");\n if (inComposition.lastValue === val) return;\n \n host.onCompositionUpdate(val);\n if (inComposition.lastValue)\n host.undo();\n if (inComposition.canUndo)\n inComposition.lastValue = val;\n if (inComposition.lastValue) {\n var r = host.selection.getRange();\n host.insert(inComposition.lastValue);\n host.session.markUndoGroup();\n inComposition.range = host.selection.getRange();\n host.selection.setRange(r);\n host.selection.clearSelection();\n }\n };\n\n var onCompositionEnd = function(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n var c = inComposition;\n inComposition = false;\n var timer = setTimeout(function() {\n timer = null;\n var str = text.value.replace(/\\x01/g, \"\");\n if (inComposition)\n return;\n else if (str == c.lastValue)\n resetValue();\n else if (!c.lastValue && str) {\n resetValue();\n sendText(str);\n }\n });\n inputHandler = function compositionInputHandler(str) {\n if (timer)\n clearTimeout(timer);\n str = str.replace(/\\x01/g, \"\");\n if (str == c.lastValue)\n return \"\";\n if (c.lastValue && timer)\n host.undo();\n return str;\n };\n host.onCompositionEnd();\n host.removeListener(\"mousedown\", onCompositionEnd);\n if (e.type == \"compositionend\" && c.range) {\n host.selection.setRange(c.range);\n }\n if (useragent.isChrome && useragent.isChrome >= 53) {\n onInput();\n }\n };\n \n \n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50);\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n if (useragent.isGecko) {\n event.addListener(text, \"text\", function(){syncComposition.schedule()});\n } else {\n event.addListener(text, \"keyup\", function(){syncComposition.schedule()});\n event.addListener(text, \"keydown\", function(){syncComposition.schedule()});\n }\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function() {\n return text;\n };\n\n this.setReadOnly = function(readOnly) {\n text.readOnly = readOnly;\n };\n\n this.onContextMenu = function(e) {\n afterContextMenu = true;\n resetSelection(host.selection.isEmpty());\n host._emit(\"nativecontextmenu\", {target: host, domEvent: e});\n this.moveToMouse(e, true);\n };\n \n this.moveToMouse = function(e, bringToFront) {\n if (!bringToFront && useragent.isOldIE)\n return;\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + \"height:\" + text.style.height + \";\"\n + (useragent.isIE ? \"opacity:0.1;\" : \"\");\n\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight -2;\n var move = function(e) {\n text.style.left = e.clientX - left - 2 + \"px\";\n text.style.top = Math.min(e.clientY - top - 2, maxTop) + \"px\";\n }; \n move(e);\n\n if (e.type != \"mousedown\")\n return;\n\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$keepTextAreaAtCursor = null;\n\n clearTimeout(closeTimeout);\n if (useragent.isWin && !useragent.isOldIE)\n event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n if (host.renderer.$keepTextAreaAtCursor == null) {\n host.renderer.$keepTextAreaAtCursor = true;\n host.renderer.$moveTextAreaToCursor();\n }\n }, useragent.isOldIE ? 200 : 0);\n }\n\n var onContextMenu = function(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function(e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n};\n\nexports.TextInput = TextInput;\n});\n\nace.define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar DRAG_OFFSET = 0; // pixels\n\nfunction DefaultHandlers(mouseHandler) {\n mouseHandler.$clickSelection = null;\n\n var editor = mouseHandler.editor;\n editor.setDefaultHandler(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n editor.setDefaultHandler(\"dblclick\", this.onDoubleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"tripleclick\", this.onTripleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"quadclick\", this.onQuadClick.bind(mouseHandler));\n editor.setDefaultHandler(\"mousewheel\", this.onMouseWheel.bind(mouseHandler));\n editor.setDefaultHandler(\"touchmove\", this.onTouchMove.bind(mouseHandler));\n\n var exports = [\"select\", \"startSelect\", \"selectEnd\", \"selectAllEnd\", \"selectByWordsEnd\",\n \"selectByLinesEnd\", \"dragWait\", \"dragWaitEnd\", \"focusWait\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n\n mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, \"getLineRange\");\n mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, \"getWordRange\");\n}\n\n(function() {\n\n this.onMouseDown = function(ev) {\n var inSelection = ev.inSelection();\n var pos = ev.getDocumentPosition();\n this.mousedownEvent = ev;\n var editor = this.editor;\n\n var button = ev.getButton();\n if (button !== 0) {\n var selectionRange = editor.getSelectionRange();\n var selectionEmpty = selectionRange.isEmpty();\n editor.$blockScrolling++;\n if (selectionEmpty || button == 1)\n editor.selection.moveToPosition(pos);\n editor.$blockScrolling--;\n if (button == 2)\n editor.textInput.onContextMenu(ev.domEvent);\n return; // stopping event here breaks contextmenu on ff mac\n }\n\n this.mousedownEvent.time = Date.now();\n if (inSelection && !editor.isFocused()) {\n editor.focus();\n if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {\n this.setState(\"focusWait\");\n this.captureMouse(ev);\n return;\n }\n }\n\n this.captureMouse(ev);\n this.startSelect(pos, ev.domEvent._clicks > 1);\n return ev.preventDefault();\n };\n\n this.startSelect = function(pos, waitForClickSelection) {\n pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);\n var editor = this.editor;\n editor.$blockScrolling++;\n if (this.mousedownEvent.getShiftKey())\n editor.selection.selectToPosition(pos);\n else if (!waitForClickSelection)\n editor.selection.moveToPosition(pos);\n if (!waitForClickSelection)\n this.select();\n if (editor.renderer.scroller.setCapture) {\n editor.renderer.scroller.setCapture();\n }\n editor.setStyle(\"ace_selecting\");\n this.setState(\"select\");\n editor.$blockScrolling--;\n };\n\n this.select = function() {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmp = this.$clickSelection.comparePoint(cursor);\n\n if (cmp == -1) {\n anchor = this.$clickSelection.end;\n } else if (cmp == 1) {\n anchor = this.$clickSelection.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.extendSelectionBy = function(unitName) {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n var range = editor.selection[unitName](cursor.row, cursor.column);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmpStart = this.$clickSelection.comparePoint(range.start);\n var cmpEnd = this.$clickSelection.comparePoint(range.end);\n\n if (cmpStart == -1 && cmpEnd <= 0) {\n anchor = this.$clickSelection.end;\n if (range.end.row != cursor.row || range.end.column != cursor.column)\n cursor = range.start;\n } else if (cmpEnd == 1 && cmpStart >= 0) {\n anchor = this.$clickSelection.start;\n if (range.start.row != cursor.row || range.start.column != cursor.column)\n cursor = range.end;\n } else if (cmpStart == -1 && cmpEnd == 1) {\n cursor = range.end;\n anchor = range.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.selectEnd =\n this.selectAllEnd =\n this.selectByWordsEnd =\n this.selectByLinesEnd = function() {\n this.$clickSelection = null;\n this.editor.unsetStyle(\"ace_selecting\");\n if (this.editor.renderer.scroller.releaseCapture) {\n this.editor.renderer.scroller.releaseCapture();\n }\n };\n\n this.focusWait = function() {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n var time = Date.now();\n\n if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n };\n\n this.onDoubleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n var session = editor.session;\n\n var range = session.getBracketRange(pos);\n if (range) {\n if (range.isEmpty()) {\n range.start.column--;\n range.end.column++;\n }\n this.setState(\"select\");\n } else {\n range = editor.selection.getWordRange(pos.row, pos.column);\n this.setState(\"selectByWords\");\n }\n this.$clickSelection = range;\n this.select();\n };\n\n this.onTripleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n\n this.setState(\"selectByLines\");\n var range = editor.getSelectionRange();\n if (range.isMultiLine() && range.contains(pos.row, pos.column)) {\n this.$clickSelection = editor.selection.getLineRange(range.start.row);\n this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;\n } else {\n this.$clickSelection = editor.selection.getLineRange(pos.row);\n }\n this.select();\n };\n\n this.onQuadClick = function(ev) {\n var editor = this.editor;\n\n editor.selectAll();\n this.$clickSelection = editor.getSelectionRange();\n this.setState(\"selectAll\");\n };\n\n this.onMouseWheel = function(ev) {\n if (ev.getAccelKey())\n return;\n if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {\n ev.wheelX = ev.wheelY;\n ev.wheelY = 0;\n }\n\n var t = ev.domEvent.timeStamp;\n var dt = t - (this.$lastScrollTime||0);\n \n var editor = this.editor;\n var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n if (isScrolable || dt < 200) {\n this.$lastScrollTime = t;\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n \n this.onTouchMove = function (ev) {\n var t = ev.domEvent.timeStamp;\n var dt = t - (this.$lastScrollTime || 0);\n\n var editor = this.editor;\n var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n if (isScrolable || dt < 200) {\n this.$lastScrollTime = t;\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n\n}).call(DefaultHandlers.prototype);\n\nexports.DefaultHandlers = DefaultHandlers;\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nfunction calcRangeOrientation(range, cursor) {\n if (range.start.row == range.end.row)\n var cmp = 2 * cursor.column - range.start.column - range.end.column;\n else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)\n var cmp = cursor.column - 4;\n else\n var cmp = 2 * cursor.row - range.start.row - range.end.row;\n\n if (cmp < 0)\n return {cursor: range.start, anchor: range.end};\n else\n return {cursor: range.end, anchor: range.start};\n}\n\n});\n\nace.define(\"ace/tooltip\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nfunction Tooltip (parentNode) {\n this.isOpen = false;\n this.$element = null;\n this.$parentNode = parentNode;\n}\n\n(function() {\n this.$init = function() {\n this.$element = dom.createElement(\"div\");\n this.$element.className = \"ace_tooltip\";\n this.$element.style.display = \"none\";\n this.$parentNode.appendChild(this.$element);\n return this.$element;\n };\n this.getElement = function() {\n return this.$element || this.$init();\n };\n this.setText = function(text) {\n dom.setInnerText(this.getElement(), text);\n };\n this.setHtml = function(html) {\n this.getElement().innerHTML = html;\n };\n this.setPosition = function(x, y) {\n this.getElement().style.left = x + \"px\";\n this.getElement().style.top = y + \"px\";\n };\n this.setClassName = function(className) {\n dom.addCssClass(this.getElement(), className);\n };\n this.show = function(text, x, y) {\n if (text != null)\n this.setText(text);\n if (x != null && y != null)\n this.setPosition(x, y);\n if (!this.isOpen) {\n this.getElement().style.display = \"block\";\n this.isOpen = true;\n }\n };\n\n this.hide = function() {\n if (this.isOpen) {\n this.getElement().style.display = \"none\";\n this.isOpen = false;\n }\n };\n this.getHeight = function() {\n return this.getElement().offsetHeight;\n };\n this.getWidth = function() {\n return this.getElement().offsetWidth;\n };\n\n}).call(Tooltip.prototype);\n\nexports.Tooltip = Tooltip;\n});\n\nace.define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event\",\"ace/tooltip\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar event = acequire(\"../lib/event\");\nvar Tooltip = acequire(\"../tooltip\").Tooltip;\n\nfunction GutterHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var gutter = editor.renderer.$gutterLayer;\n var tooltip = new GutterTooltip(editor.container);\n\n mouseHandler.editor.setDefaultHandler(\"guttermousedown\", function(e) {\n if (!editor.isFocused() || e.getButton() != 0)\n return;\n var gutterRegion = gutter.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\")\n return;\n\n var row = e.getDocumentPosition().row;\n var selection = editor.session.selection;\n\n if (e.getShiftKey())\n selection.selectTo(row, 0);\n else {\n if (e.domEvent.detail == 2) {\n editor.selectAll();\n return e.preventDefault();\n }\n mouseHandler.$clickSelection = editor.selection.getLineRange(row);\n }\n mouseHandler.setState(\"selectByLines\");\n mouseHandler.captureMouse(e);\n return e.preventDefault();\n });\n\n\n var tooltipTimeout, mouseEvent, tooltipAnnotation;\n\n function showTooltip() {\n var row = mouseEvent.getDocumentPosition().row;\n var annotation = gutter.$annotations[row];\n if (!annotation)\n return hideTooltip();\n\n var maxRow = editor.session.getLength();\n if (row == maxRow) {\n var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;\n var pos = mouseEvent.$pos;\n if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))\n return hideTooltip();\n }\n\n if (tooltipAnnotation == annotation)\n return;\n tooltipAnnotation = annotation.text.join(\"<br/>\");\n\n tooltip.setHtml(tooltipAnnotation);\n tooltip.show();\n editor._signal(\"showGutterTooltip\", tooltip);\n editor.on(\"mousewheel\", hideTooltip);\n\n if (mouseHandler.$tooltipFollowsMouse) {\n moveTooltip(mouseEvent);\n } else {\n var gutterElement = mouseEvent.domEvent.target;\n var rect = gutterElement.getBoundingClientRect();\n var style = tooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n }\n }\n\n function hideTooltip() {\n if (tooltipTimeout)\n tooltipTimeout = clearTimeout(tooltipTimeout);\n if (tooltipAnnotation) {\n tooltip.hide();\n tooltipAnnotation = null;\n editor._signal(\"hideGutterTooltip\", tooltip);\n editor.removeEventListener(\"mousewheel\", hideTooltip);\n }\n }\n\n function moveTooltip(e) {\n tooltip.setPosition(e.x, e.y);\n }\n\n mouseHandler.editor.setDefaultHandler(\"guttermousemove\", function(e) {\n var target = e.domEvent.target || e.domEvent.srcElement;\n if (dom.hasCssClass(target, \"ace_fold-widget\"))\n return hideTooltip();\n\n if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse)\n moveTooltip(e);\n\n mouseEvent = e;\n if (tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n if (mouseEvent && !mouseHandler.isMousePressed)\n showTooltip();\n else\n hideTooltip();\n }, 50);\n });\n\n event.addListener(editor.renderer.$gutter, \"mouseout\", function(e) {\n mouseEvent = null;\n if (!tooltipAnnotation || tooltipTimeout)\n return;\n\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n hideTooltip();\n }, 50);\n });\n \n editor.on(\"changeSession\", hideTooltip);\n}\n\nfunction GutterTooltip(parentNode) {\n Tooltip.call(this, parentNode);\n}\n\noop.inherits(GutterTooltip, Tooltip);\n\n(function(){\n this.setPosition = function(x, y) {\n var windowWidth = window.innerWidth || document.documentElement.clientWidth;\n var windowHeight = window.innerHeight || document.documentElement.clientHeight;\n var width = this.getWidth();\n var height = this.getHeight();\n x += 15;\n y += 15;\n if (x + width > windowWidth) {\n x -= (x + width) - windowWidth;\n }\n if (y + height > windowHeight) {\n y -= 20 + height;\n }\n Tooltip.prototype.setPosition.call(this, x, y);\n };\n\n}).call(GutterTooltip.prototype);\n\n\n\nexports.GutterHandler = GutterHandler;\n\n});\n\nace.define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar MouseEvent = exports.MouseEvent = function(domEvent, editor) {\n this.domEvent = domEvent;\n this.editor = editor;\n \n this.x = this.clientX = domEvent.clientX;\n this.y = this.clientY = domEvent.clientY;\n\n this.$pos = null;\n this.$inSelection = null;\n \n this.propagationStopped = false;\n this.defaultPrevented = false;\n};\n\n(function() { \n \n this.stopPropagation = function() {\n event.stopPropagation(this.domEvent);\n this.propagationStopped = true;\n };\n \n this.preventDefault = function() {\n event.preventDefault(this.domEvent);\n this.defaultPrevented = true;\n };\n \n this.stop = function() {\n this.stopPropagation();\n this.preventDefault();\n };\n this.getDocumentPosition = function() {\n if (this.$pos)\n return this.$pos;\n \n this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);\n return this.$pos;\n };\n this.inSelection = function() {\n if (this.$inSelection !== null)\n return this.$inSelection;\n \n var editor = this.editor;\n \n\n var selectionRange = editor.getSelectionRange();\n if (selectionRange.isEmpty())\n this.$inSelection = false;\n else {\n var pos = this.getDocumentPosition();\n this.$inSelection = selectionRange.contains(pos.row, pos.column);\n }\n\n return this.$inSelection;\n };\n this.getButton = function() {\n return event.getButton(this.domEvent);\n };\n this.getShiftKey = function() {\n return this.domEvent.shiftKey;\n };\n \n this.getAccelKey = useragent.isMac\n ? function() { return this.domEvent.metaKey; }\n : function() { return this.domEvent.ctrlKey; };\n \n}).call(MouseEvent.prototype);\n\n});\n\nace.define(\"ace/mouse/dragdrop_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar AUTOSCROLL_DELAY = 200;\nvar SCROLL_CURSOR_DELAY = 200;\nvar SCROLL_CURSOR_HYSTERESIS = 5;\n\nfunction DragdropHandler(mouseHandler) {\n\n var editor = mouseHandler.editor;\n\n var blankImage = dom.createElement(\"img\");\n blankImage.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (useragent.isOpera)\n blankImage.style.cssText = \"width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;\";\n\n var exports = [\"dragWait\", \"dragWaitEnd\", \"startDrag\", \"dragReadyEnd\", \"onMouseDrag\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n editor.addEventListener(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n\n\n var mouseTarget = editor.container;\n var dragSelectionMarker, x, y;\n var timerId, range;\n var dragCursor, counter = 0;\n var dragOperation;\n var isInternal;\n var autoScrollStartTime;\n var cursorMovedTime;\n var cursorPointOnCaretMoved;\n\n this.onDragStart = function(e) {\n if (this.cancelDrag || !mouseTarget.draggable) {\n var self = this;\n setTimeout(function(){\n self.startSelect();\n self.captureMouse(e);\n }, 0);\n return e.preventDefault();\n }\n range = editor.getSelectionRange();\n\n var dataTransfer = e.dataTransfer;\n dataTransfer.effectAllowed = editor.getReadOnly() ? \"copy\" : \"copyMove\";\n if (useragent.isOpera) {\n editor.container.appendChild(blankImage);\n blankImage.scrollTop = 0;\n }\n dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);\n if (useragent.isOpera) {\n editor.container.removeChild(blankImage);\n }\n dataTransfer.clearData();\n dataTransfer.setData(\"Text\", editor.session.getTextRange());\n\n isInternal = true;\n this.setState(\"drag\");\n };\n\n this.onDragEnd = function(e) {\n mouseTarget.draggable = false;\n isInternal = false;\n this.setState(null);\n if (!editor.getReadOnly()) {\n var dropEffect = e.dataTransfer.dropEffect;\n if (!dragOperation && dropEffect == \"move\")\n editor.session.remove(editor.getSelectionRange());\n editor.renderer.$cursorLayer.setBlinking(true);\n }\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n };\n\n this.onDragEnter = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker)\n addDragMarker();\n counter++;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragOver = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker) {\n addDragMarker();\n counter++;\n }\n if (onMouseMoveTimer !== null)\n onMouseMoveTimer = null;\n\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragLeave = function(e) {\n counter--;\n if (counter <= 0 && dragSelectionMarker) {\n clearDragMarker();\n dragOperation = null;\n return event.preventDefault(e);\n }\n };\n\n this.onDrop = function(e) {\n if (!dragCursor)\n return;\n var dataTransfer = e.dataTransfer;\n if (isInternal) {\n switch (dragOperation) {\n case \"move\":\n if (range.contains(dragCursor.row, dragCursor.column)) {\n range = {\n start: dragCursor,\n end: dragCursor\n };\n } else {\n range = editor.moveText(range, dragCursor);\n }\n break;\n case \"copy\":\n range = editor.moveText(range, dragCursor, true);\n break;\n }\n } else {\n var dropData = dataTransfer.getData('Text');\n range = {\n start: dragCursor,\n end: editor.session.insert(dragCursor, dropData)\n };\n editor.focus();\n dragOperation = null;\n }\n clearDragMarker();\n return event.preventDefault(e);\n };\n\n event.addListener(mouseTarget, \"dragstart\", this.onDragStart.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragend\", this.onDragEnd.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragenter\", this.onDragEnter.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragover\", this.onDragOver.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragleave\", this.onDragLeave.bind(mouseHandler));\n event.addListener(mouseTarget, \"drop\", this.onDrop.bind(mouseHandler));\n\n function scrollCursorIntoView(cursor, prevCursor) {\n var now = Date.now();\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n var hMovement = !prevCursor || cursor.column != prevCursor.column;\n if (!cursorMovedTime || vMovement || hMovement) {\n editor.$blockScrolling += 1;\n editor.moveCursorToPosition(cursor);\n editor.$blockScrolling -= 1;\n cursorMovedTime = now;\n cursorPointOnCaretMoved = {x: x, y: y};\n } else {\n var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);\n if (distance > SCROLL_CURSOR_HYSTERESIS) {\n cursorMovedTime = null;\n } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {\n editor.renderer.scrollCursorIntoView();\n cursorMovedTime = null;\n }\n }\n }\n\n function autoScroll(cursor, prevCursor) {\n var now = Date.now();\n var lineHeight = editor.renderer.layerConfig.lineHeight;\n var characterWidth = editor.renderer.layerConfig.characterWidth;\n var editorRect = editor.renderer.scroller.getBoundingClientRect();\n var offsets = {\n x: {\n left: x - editorRect.left,\n right: editorRect.right - x\n },\n y: {\n top: y - editorRect.top,\n bottom: editorRect.bottom - y\n }\n };\n var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);\n var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);\n var scrollCursor = {row: cursor.row, column: cursor.column};\n if (nearestXOffset / characterWidth <= 2) {\n scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);\n }\n if (nearestYOffset / lineHeight <= 1) {\n scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);\n }\n var vScroll = cursor.row != scrollCursor.row;\n var hScroll = cursor.column != scrollCursor.column;\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n if (vScroll || (hScroll && !vMovement)) {\n if (!autoScrollStartTime)\n autoScrollStartTime = now;\n else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)\n editor.renderer.scrollCursorIntoView(scrollCursor);\n } else {\n autoScrollStartTime = null;\n }\n }\n\n function onDragInterval() {\n var prevCursor = dragCursor;\n dragCursor = editor.renderer.screenToTextCoordinates(x, y);\n scrollCursorIntoView(dragCursor, prevCursor);\n autoScroll(dragCursor, prevCursor);\n }\n\n function addDragMarker() {\n range = editor.selection.toOrientedRange();\n dragSelectionMarker = editor.session.addMarker(range, \"ace_selection\", editor.getSelectionStyle());\n editor.clearSelection();\n if (editor.isFocused())\n editor.renderer.$cursorLayer.setBlinking(false);\n clearInterval(timerId);\n onDragInterval();\n timerId = setInterval(onDragInterval, 20);\n counter = 0;\n event.addListener(document, \"mousemove\", onMouseMove);\n }\n\n function clearDragMarker() {\n clearInterval(timerId);\n editor.session.removeMarker(dragSelectionMarker);\n dragSelectionMarker = null;\n editor.$blockScrolling += 1;\n editor.selection.fromOrientedRange(range);\n editor.$blockScrolling -= 1;\n if (editor.isFocused() && !isInternal)\n editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());\n range = null;\n dragCursor = null;\n counter = 0;\n autoScrollStartTime = null;\n cursorMovedTime = null;\n event.removeListener(document, \"mousemove\", onMouseMove);\n }\n var onMouseMoveTimer = null;\n function onMouseMove() {\n if (onMouseMoveTimer == null) {\n onMouseMoveTimer = setTimeout(function() {\n if (onMouseMoveTimer != null && dragSelectionMarker)\n clearDragMarker();\n }, 20);\n }\n }\n\n function canAccept(dataTransfer) {\n var types = dataTransfer.types;\n return !types || Array.prototype.some.call(types, function(type) {\n return type == 'text/plain' || type == 'Text';\n });\n }\n\n function getDropEffect(e) {\n var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];\n var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];\n\n var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;\n var effectAllowed = \"uninitialized\";\n try {\n effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();\n } catch (e) {}\n var dropEffect = \"none\";\n\n if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n else if (moveAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"move\";\n else if (copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n\n return dropEffect;\n }\n}\n\n(function() {\n\n this.dragWait = function() {\n var interval = Date.now() - this.mousedownEvent.time;\n if (interval > this.editor.getDragDelay())\n this.startDrag();\n };\n\n this.dragWaitEnd = function() {\n var target = this.editor.container;\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n this.selectEnd();\n };\n\n this.dragReadyEnd = function(e) {\n this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n this.dragWaitEnd();\n };\n\n this.startDrag = function(){\n this.cancelDrag = false;\n var editor = this.editor;\n var target = editor.container;\n target.draggable = true;\n editor.renderer.$cursorLayer.setBlinking(false);\n editor.setStyle(\"ace_dragging\");\n var cursorStyle = useragent.isWin ? \"default\" : \"move\";\n editor.renderer.setCursorStyle(cursorStyle);\n this.setState(\"dragReady\");\n };\n\n this.onMouseDrag = function(e) {\n var target = this.editor.container;\n if (useragent.isIE && this.state == \"dragReady\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 3)\n target.dragDrop();\n }\n if (this.state === \"dragWait\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 0) {\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n }\n }\n };\n\n this.onMouseDown = function(e) {\n if (!this.$dragEnabled)\n return;\n this.mousedownEvent = e;\n var editor = this.editor;\n\n var inSelection = e.inSelection();\n var button = e.getButton();\n var clickCount = e.domEvent.detail || 1;\n if (clickCount === 1 && button === 0 && inSelection) {\n if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))\n return;\n this.mousedownEvent.time = Date.now();\n var eventTarget = e.domEvent.target || e.domEvent.srcElement;\n if (\"unselectable\" in eventTarget)\n eventTarget.unselectable = \"on\";\n if (editor.getDragDelay()) {\n if (useragent.isWebKit) {\n this.cancelDrag = true;\n var mouseTarget = editor.container;\n mouseTarget.draggable = true;\n }\n this.setState(\"dragWait\");\n } else {\n this.startDrag();\n }\n this.captureMouse(e, this.onMouseDrag.bind(this));\n e.defaultPrevented = true;\n }\n };\n\n}).call(DragdropHandler.prototype);\n\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nexports.DragdropHandler = DragdropHandler;\n\n});\n\nace.define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"./dom\");\n\nexports.get = function (url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.responseText);\n }\n };\n xhr.send(null);\n};\n\nexports.loadScript = function(path, callback) {\n var head = dom.getDocumentHead();\n var s = document.createElement('script');\n\n s.src = path;\n head.appendChild(s);\n\n s.onload = s.onreadystatechange = function(_, isAbort) {\n if (isAbort || !s.readyState || s.readyState == \"loaded\" || s.readyState == \"complete\") {\n s = s.onload = s.onreadystatechange = null;\n if (!isAbort)\n callback();\n }\n };\n};\nexports.qualifyURL = function(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n}\n\n});\n\nace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar EventEmitter = {};\nvar stopPropagation = function() { this.propagationStopped = true; };\nvar preventDefault = function() { this.defaultPrevented = true; };\n\nEventEmitter._emit =\nEventEmitter._dispatchEvent = function(eventName, e) {\n this._eventRegistry || (this._eventRegistry = {});\n this._defaultHandlers || (this._defaultHandlers = {});\n\n var listeners = this._eventRegistry[eventName] || [];\n var defaultHandler = this._defaultHandlers[eventName];\n if (!listeners.length && !defaultHandler)\n return;\n\n if (typeof e != \"object\" || !e)\n e = {};\n\n if (!e.type)\n e.type = eventName;\n if (!e.stopPropagation)\n e.stopPropagation = stopPropagation;\n if (!e.preventDefault)\n e.preventDefault = preventDefault;\n\n listeners = listeners.slice();\n for (var i=0; i<listeners.length; i++) {\n listeners[i](e, this);\n if (e.propagationStopped)\n break;\n }\n \n if (defaultHandler && !e.defaultPrevented)\n return defaultHandler(e, this);\n};\n\n\nEventEmitter._signal = function(eventName, e) {\n var listeners = (this._eventRegistry || {})[eventName];\n if (!listeners)\n return;\n listeners = listeners.slice();\n for (var i=0; i<listeners.length; i++)\n listeners[i](e, this);\n};\n\nEventEmitter.once = function(eventName, callback) {\n var _self = this;\n callback && this.addEventListener(eventName, function newCallback() {\n _self.removeEventListener(eventName, newCallback);\n callback.apply(null, arguments);\n });\n};\n\n\nEventEmitter.setDefaultHandler = function(eventName, callback) {\n var handlers = this._defaultHandlers\n if (!handlers)\n handlers = this._defaultHandlers = {_disabled_: {}};\n \n if (handlers[eventName]) {\n var old = handlers[eventName];\n var disabled = handlers._disabled_[eventName];\n if (!disabled)\n handlers._disabled_[eventName] = disabled = [];\n disabled.push(old);\n var i = disabled.indexOf(callback);\n if (i != -1) \n disabled.splice(i, 1);\n }\n handlers[eventName] = callback;\n};\nEventEmitter.removeDefaultHandler = function(eventName, callback) {\n var handlers = this._defaultHandlers\n if (!handlers)\n return;\n var disabled = handlers._disabled_[eventName];\n \n if (handlers[eventName] == callback) {\n var old = handlers[eventName];\n if (disabled)\n this.setDefaultHandler(eventName, disabled.pop());\n } else if (disabled) {\n var i = disabled.indexOf(callback);\n if (i != -1)\n disabled.splice(i, 1);\n }\n};\n\nEventEmitter.on =\nEventEmitter.addEventListener = function(eventName, callback, capturing) {\n this._eventRegistry = this._eventRegistry || {};\n\n var listeners = this._eventRegistry[eventName];\n if (!listeners)\n listeners = this._eventRegistry[eventName] = [];\n\n if (listeners.indexOf(callback) == -1)\n listeners[capturing ? \"unshift\" : \"push\"](callback);\n return callback;\n};\n\nEventEmitter.off =\nEventEmitter.removeListener =\nEventEmitter.removeEventListener = function(eventName, callback) {\n this._eventRegistry = this._eventRegistry || {};\n\n var listeners = this._eventRegistry[eventName];\n if (!listeners)\n return;\n\n var index = listeners.indexOf(callback);\n if (index !== -1)\n listeners.splice(index, 1);\n};\n\nEventEmitter.removeAllListeners = function(eventName) {\n if (this._eventRegistry) this._eventRegistry[eventName] = [];\n};\n\nexports.EventEmitter = EventEmitter;\n\n});\n\nace.define(\"ace/lib/app_config\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"no use strict\";\n\nvar oop = acequire(\"./oop\");\nvar EventEmitter = acequire(\"./event_emitter\").EventEmitter;\n\nvar optionsProvider = {\n setOptions: function(optList) {\n Object.keys(optList).forEach(function(key) {\n this.setOption(key, optList[key]);\n }, this);\n },\n getOptions: function(optionNames) {\n var result = {};\n if (!optionNames) {\n optionNames = Object.keys(this.$options);\n } else if (!Array.isArray(optionNames)) {\n result = optionNames;\n optionNames = Object.keys(result);\n }\n optionNames.forEach(function(key) {\n result[key] = this.getOption(key);\n }, this);\n return result;\n },\n setOption: function(name, value) {\n if (this[\"$\" + name] === value)\n return;\n var opt = this.$options[name];\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n if (opt.forwardTo)\n return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);\n\n if (!opt.handlesSet)\n this[\"$\" + name] = value;\n if (opt && opt.set)\n opt.set.call(this, value);\n },\n getOption: function(name) {\n var opt = this.$options[name];\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n if (opt.forwardTo)\n return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);\n return opt && opt.get ? opt.get.call(this) : this[\"$\" + name];\n }\n};\n\nfunction warn(message) {\n if (typeof console != \"undefined\" && console.warn)\n console.warn.apply(console, arguments);\n}\n\nfunction reportError(msg, data) {\n var e = new Error(msg);\n e.data = data;\n if (typeof console == \"object\" && console.error)\n console.error(e);\n setTimeout(function() { throw e; });\n}\n\nvar AppConfig = function() {\n this.$defaultOptions = {};\n};\n\n(function() {\n oop.implement(this, EventEmitter);\n this.defineOptions = function(obj, path, options) {\n if (!obj.$options)\n this.$defaultOptions[path] = obj.$options = {};\n\n Object.keys(options).forEach(function(key) {\n var opt = options[key];\n if (typeof opt == \"string\")\n opt = {forwardTo: opt};\n\n opt.name || (opt.name = key);\n obj.$options[opt.name] = opt;\n if (\"initialValue\" in opt)\n obj[\"$\" + opt.name] = opt.initialValue;\n });\n oop.implement(obj, optionsProvider);\n\n return this;\n };\n\n this.resetOptions = function(obj) {\n Object.keys(obj.$options).forEach(function(key) {\n var opt = obj.$options[key];\n if (\"value\" in opt)\n obj.setOption(key, opt.value);\n });\n };\n\n this.setDefaultValue = function(path, name, value) {\n var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});\n if (opts[name]) {\n if (opts.forwardTo)\n this.setDefaultValue(opts.forwardTo, name, value);\n else\n opts[name].value = value;\n }\n };\n\n this.setDefaultValues = function(path, optionHash) {\n Object.keys(optionHash).forEach(function(key) {\n this.setDefaultValue(path, key, optionHash[key]);\n }, this);\n };\n \n this.warn = warn;\n this.reportError = reportError;\n \n}).call(AppConfig.prototype);\n\nexports.AppConfig = AppConfig;\n\n});\n\nace.define(\"ace/config\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/app_config\"], function(acequire, exports, module) {\n\"no use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar net = acequire(\"./lib/net\");\nvar AppConfig = acequire(\"./lib/app_config\").AppConfig;\n\nmodule.exports = exports = new AppConfig();\n\nvar global = (function() {\n return this || typeof window != \"undefined\" && window;\n})();\n\nvar options = {\n packaged: false,\n workerPath: null,\n modePath: null,\n themePath: null,\n basePath: \"\",\n suffix: \".js\",\n $moduleUrls: {}\n};\n\nexports.get = function(key) {\n if (!options.hasOwnProperty(key))\n throw new Error(\"Unknown config key: \" + key);\n\n return options[key];\n};\n\nexports.set = function(key, value) {\n if (!options.hasOwnProperty(key))\n throw new Error(\"Unknown config key: \" + key);\n\n options[key] = value;\n};\n\nexports.all = function() {\n return lang.copyObject(options);\n};\nexports.moduleUrl = function(name, component) {\n if (options.$moduleUrls[name])\n return options.$moduleUrls[name];\n\n var parts = name.split(\"/\");\n component = component || parts[parts.length - 2] || \"\";\n var sep = component == \"snippets\" ? \"/\" : \"-\";\n var base = parts[parts.length - 1];\n if (component == \"worker\" && sep == \"-\") {\n var re = new RegExp(\"^\" + component + \"[\\\\-_]|[\\\\-_]\" + component + \"$\", \"g\");\n base = base.replace(re, \"\");\n }\n\n if ((!base || base == component) && parts.length > 1)\n base = parts[parts.length - 2];\n var path = options[component + \"Path\"];\n if (path == null) {\n path = options.basePath;\n } else if (sep == \"/\") {\n component = sep = \"\";\n }\n if (path && path.slice(-1) != \"/\")\n path += \"/\";\n return path + component + sep + base + this.get(\"suffix\");\n};\n\nexports.setModuleUrl = function(name, subst) {\n return options.$moduleUrls[name] = subst;\n};\n\nexports.$loading = {};\nexports.loadModule = function(moduleName, onLoad) {\n var module, moduleType;\n if (Array.isArray(moduleName)) {\n moduleType = moduleName[0];\n moduleName = moduleName[1];\n }\n\n try {\n module = acequire(moduleName);\n } catch (e) {}\n if (module && !exports.$loading[moduleName])\n return onLoad && onLoad(module);\n\n if (!exports.$loading[moduleName])\n exports.$loading[moduleName] = [];\n\n exports.$loading[moduleName].push(onLoad);\n\n if (exports.$loading[moduleName].length > 1)\n return;\n\n var afterLoad = function() {\n acequire([moduleName], function(module) {\n exports._emit(\"load.module\", {name: moduleName, module: module});\n var listeners = exports.$loading[moduleName];\n exports.$loading[moduleName] = null;\n listeners.forEach(function(onLoad) {\n onLoad && onLoad(module);\n });\n });\n };\n\n if (!exports.get(\"packaged\"))\n return afterLoad();\n net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);\n};\ninit(true);function init(packaged) {\n\n if (!global || !global.document)\n return;\n \n options.packaged = packaged || acequire.packaged || module.packaged || (global.define && define.packaged);\n\n var scriptOptions = {};\n var scriptUrl = \"\";\n var currentScript = (document.currentScript || document._currentScript ); // native or polyfill\n var currentDocument = currentScript && currentScript.ownerDocument || document;\n \n var scripts = currentDocument.getElementsByTagName(\"script\");\n for (var i=0; i<scripts.length; i++) {\n var script = scripts[i];\n\n var src = script.src || script.getAttribute(\"src\");\n if (!src)\n continue;\n\n var attributes = script.attributes;\n for (var j=0, l=attributes.length; j < l; j++) {\n var attr = attributes[j];\n if (attr.name.indexOf(\"data-ace-\") === 0) {\n scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/, \"\"))] = attr.value;\n }\n }\n\n var m = src.match(/^(.*)\\/ace(\\-\\w+)?\\.js(\\?|$)/);\n if (m)\n scriptUrl = m[1];\n }\n\n if (scriptUrl) {\n scriptOptions.base = scriptOptions.base || scriptUrl;\n scriptOptions.packaged = true;\n }\n\n scriptOptions.basePath = scriptOptions.base;\n scriptOptions.workerPath = scriptOptions.workerPath || scriptOptions.base;\n scriptOptions.modePath = scriptOptions.modePath || scriptOptions.base;\n scriptOptions.themePath = scriptOptions.themePath || scriptOptions.base;\n delete scriptOptions.base;\n\n for (var key in scriptOptions)\n if (typeof scriptOptions[key] !== \"undefined\")\n exports.set(key, scriptOptions[key]);\n}\n\nexports.init = init;\n\nfunction deHyphenate(str) {\n return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });\n}\n\n});\n\nace.define(\"ace/mouse/mouse_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/mouse/default_handlers\",\"ace/mouse/default_gutter_handler\",\"ace/mouse/mouse_event\",\"ace/mouse/dragdrop_handler\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar DefaultHandlers = acequire(\"./default_handlers\").DefaultHandlers;\nvar DefaultGutterHandler = acequire(\"./default_gutter_handler\").GutterHandler;\nvar MouseEvent = acequire(\"./mouse_event\").MouseEvent;\nvar DragdropHandler = acequire(\"./dragdrop_handler\").DragdropHandler;\nvar config = acequire(\"../config\");\n\nvar MouseHandler = function(editor) {\n var _self = this;\n this.editor = editor;\n\n new DefaultHandlers(this);\n new DefaultGutterHandler(this);\n new DragdropHandler(this);\n\n var focusEditor = function(e) {\n var windowBlurred = !document.hasFocus || !document.hasFocus()\n || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement())\n if (windowBlurred)\n window.focus();\n editor.focus();\n };\n\n var mouseTarget = editor.renderer.getMouseEventTarget();\n event.addListener(mouseTarget, \"click\", this.onMouseEvent.bind(this, \"click\"));\n event.addListener(mouseTarget, \"mousemove\", this.onMouseMove.bind(this, \"mousemove\"));\n event.addMultiMouseDownListener([\n mouseTarget,\n editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner,\n editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner,\n editor.textInput && editor.textInput.getElement()\n ].filter(Boolean), [400, 300, 250], this, \"onMouseEvent\");\n event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, \"mousewheel\"));\n event.addTouchMoveListener(editor.container, this.onTouchMove.bind(this, \"touchmove\"));\n\n var gutterEl = editor.renderer.$gutter;\n event.addListener(gutterEl, \"mousedown\", this.onMouseEvent.bind(this, \"guttermousedown\"));\n event.addListener(gutterEl, \"click\", this.onMouseEvent.bind(this, \"gutterclick\"));\n event.addListener(gutterEl, \"dblclick\", this.onMouseEvent.bind(this, \"gutterdblclick\"));\n event.addListener(gutterEl, \"mousemove\", this.onMouseEvent.bind(this, \"guttermousemove\"));\n\n event.addListener(mouseTarget, \"mousedown\", focusEditor);\n event.addListener(gutterEl, \"mousedown\", focusEditor);\n if (useragent.isIE && editor.renderer.scrollBarV) {\n event.addListener(editor.renderer.scrollBarV.element, \"mousedown\", focusEditor);\n event.addListener(editor.renderer.scrollBarH.element, \"mousedown\", focusEditor);\n }\n\n editor.on(\"mousemove\", function(e){\n if (_self.state || _self.$dragDelay || !_self.$dragEnabled)\n return;\n\n var character = editor.renderer.screenToTextCoordinates(e.x, e.y);\n var range = editor.session.selection.getRange();\n var renderer = editor.renderer;\n\n if (!range.isEmpty() && range.insideStart(character.row, character.column)) {\n renderer.setCursorStyle(\"default\");\n } else {\n renderer.setCursorStyle(\"\");\n }\n });\n};\n\n(function() {\n this.onMouseEvent = function(name, e) {\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n\n this.onMouseMove = function(name, e) {\n var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;\n if (!listeners || !listeners.length)\n return;\n\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n\n this.onMouseWheel = function(name, e) {\n var mouseEvent = new MouseEvent(e, this.editor);\n mouseEvent.speed = this.$scrollSpeed * 2;\n mouseEvent.wheelX = e.wheelX;\n mouseEvent.wheelY = e.wheelY;\n\n this.editor._emit(name, mouseEvent);\n };\n \n this.onTouchMove = function (name, e) {\n var mouseEvent = new MouseEvent(e, this.editor);\n mouseEvent.speed = 1;//this.$scrollSpeed * 2;\n mouseEvent.wheelX = e.wheelX;\n mouseEvent.wheelY = e.wheelY;\n this.editor._emit(name, mouseEvent);\n };\n\n this.setState = function(state) {\n this.state = state;\n };\n\n this.captureMouse = function(ev, mouseMoveHandler) {\n this.x = ev.x;\n this.y = ev.y;\n\n this.isMousePressed = true;\n var renderer = this.editor.renderer;\n if (renderer.$keepTextAreaAtCursor)\n renderer.$keepTextAreaAtCursor = null;\n\n var self = this;\n var onMouseMove = function(e) {\n if (!e) return;\n if (useragent.isWebKit && !e.which && self.releaseMouse)\n return self.releaseMouse();\n\n self.x = e.clientX;\n self.y = e.clientY;\n mouseMoveHandler && mouseMoveHandler(e);\n self.mouseEvent = new MouseEvent(e, self.editor);\n self.$mouseMoved = true;\n };\n\n var onCaptureEnd = function(e) {\n clearInterval(timerId);\n onCaptureInterval();\n self[self.state + \"End\"] && self[self.state + \"End\"](e);\n self.state = \"\";\n if (renderer.$keepTextAreaAtCursor == null) {\n renderer.$keepTextAreaAtCursor = true;\n renderer.$moveTextAreaToCursor();\n }\n self.isMousePressed = false;\n self.$onCaptureMouseMove = self.releaseMouse = null;\n e && self.onMouseEvent(\"mouseup\", e);\n };\n\n var onCaptureInterval = function() {\n self[self.state] && self[self.state]();\n self.$mouseMoved = false;\n };\n\n if (useragent.isOldIE && ev.domEvent.type == \"dblclick\") {\n return setTimeout(function() {onCaptureEnd(ev);});\n }\n\n self.$onCaptureMouseMove = onMouseMove;\n self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd);\n var timerId = setInterval(onCaptureInterval, 20);\n };\n this.releaseMouse = null;\n this.cancelContextMenu = function() {\n var stop = function(e) {\n if (e && e.domEvent && e.domEvent.type != \"contextmenu\")\n return;\n this.editor.off(\"nativecontextmenu\", stop);\n if (e && e.domEvent)\n event.stopEvent(e.domEvent);\n }.bind(this);\n setTimeout(stop, 10);\n this.editor.on(\"nativecontextmenu\", stop);\n };\n}).call(MouseHandler.prototype);\n\nconfig.defineOptions(MouseHandler.prototype, \"mouseHandler\", {\n scrollSpeed: {initialValue: 2},\n dragDelay: {initialValue: (useragent.isMac ? 150 : 0)},\n dragEnabled: {initialValue: true},\n focusTimout: {initialValue: 0},\n tooltipFollowsMouse: {initialValue: true}\n});\n\n\nexports.MouseHandler = MouseHandler;\n});\n\nace.define(\"ace/mouse/fold_handler\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nfunction FoldHandler(editor) {\n\n editor.on(\"click\", function(e) {\n var position = e.getDocumentPosition();\n var session = editor.session;\n var fold = session.getFoldAt(position.row, position.column, 1);\n if (fold) {\n if (e.getAccelKey())\n session.removeFold(fold);\n else\n session.expandFold(fold);\n\n e.stop();\n }\n });\n\n editor.on(\"gutterclick\", function(e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n if (session.foldWidgets && session.foldWidgets[row])\n editor.session.onFoldWidgetClick(row, e);\n if (!editor.isFocused())\n editor.focus();\n e.stop();\n }\n });\n\n editor.on(\"gutterdblclick\", function(e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n var data = session.getParentFoldRangeData(row, true);\n var range = data.range || data.firstRange;\n\n if (range) {\n row = range.start.row;\n var fold = session.getFoldAt(row, session.getLine(row).length, 1);\n\n if (fold) {\n session.removeFold(fold);\n } else {\n session.addFold(\"...\", range);\n editor.renderer.scrollCursorIntoView({row: range.start.row, column: 0});\n }\n }\n e.stop();\n }\n });\n}\n\nexports.FoldHandler = FoldHandler;\n\n});\n\nace.define(\"ace/keyboard/keybinding\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/event\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keyUtil = acequire(\"../lib/keys\");\nvar event = acequire(\"../lib/event\");\n\nvar KeyBinding = function(editor) {\n this.$editor = editor;\n this.$data = {editor: editor};\n this.$handlers = [];\n this.setDefaultHandler(editor.commands);\n};\n\n(function() {\n this.setDefaultHandler = function(kb) {\n this.removeKeyboardHandler(this.$defaultHandler);\n this.$defaultHandler = kb;\n this.addKeyboardHandler(kb, 0);\n };\n\n this.setKeyboardHandler = function(kb) {\n var h = this.$handlers;\n if (h[h.length - 1] == kb)\n return;\n\n while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler)\n this.removeKeyboardHandler(h[h.length - 1]);\n\n this.addKeyboardHandler(kb, 1);\n };\n\n this.addKeyboardHandler = function(kb, pos) {\n if (!kb)\n return;\n if (typeof kb == \"function\" && !kb.handleKeyboard)\n kb.handleKeyboard = kb;\n var i = this.$handlers.indexOf(kb);\n if (i != -1)\n this.$handlers.splice(i, 1);\n\n if (pos == undefined)\n this.$handlers.push(kb);\n else\n this.$handlers.splice(pos, 0, kb);\n\n if (i == -1 && kb.attach)\n kb.attach(this.$editor);\n };\n\n this.removeKeyboardHandler = function(kb) {\n var i = this.$handlers.indexOf(kb);\n if (i == -1)\n return false;\n this.$handlers.splice(i, 1);\n kb.detach && kb.detach(this.$editor);\n return true;\n };\n\n this.getKeyboardHandler = function() {\n return this.$handlers[this.$handlers.length - 1];\n };\n \n this.getStatusText = function() {\n var data = this.$data;\n var editor = data.editor;\n return this.$handlers.map(function(h) {\n return h.getStatusText && h.getStatusText(editor, data) || \"\";\n }).filter(Boolean).join(\" \");\n };\n\n this.$callKeyboardHandlers = function(hashId, keyString, keyCode, e) {\n var toExecute;\n var success = false;\n var commands = this.$editor.commands;\n\n for (var i = this.$handlers.length; i--;) {\n toExecute = this.$handlers[i].handleKeyboard(\n this.$data, hashId, keyString, keyCode, e\n );\n if (!toExecute || !toExecute.command)\n continue;\n if (toExecute.command == \"null\") {\n success = true;\n } else {\n success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);\n }\n if (success && e && hashId != -1 && \n toExecute.passEvent != true && toExecute.command.passEvent != true\n ) {\n event.stopEvent(e);\n }\n if (success)\n break;\n }\n \n if (!success && hashId == -1) {\n toExecute = {command: \"insertstring\"};\n success = commands.exec(\"insertstring\", this.$editor, keyString);\n }\n \n if (success && this.$editor._signal)\n this.$editor._signal(\"keyboardActivity\", toExecute);\n \n return success;\n };\n\n this.onCommandKey = function(e, hashId, keyCode) {\n var keyString = keyUtil.keyCodeToString(keyCode);\n this.$callKeyboardHandlers(hashId, keyString, keyCode, e);\n };\n\n this.onTextInput = function(text) {\n this.$callKeyboardHandlers(-1, text);\n };\n\n}).call(KeyBinding.prototype);\n\nexports.KeyBinding = KeyBinding;\n});\n\nace.define(\"ace/range\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\nvar Range = function(startRow, startColumn, endRow, endColumn) {\n this.start = {\n row: startRow,\n column: startColumn\n };\n\n this.end = {\n row: endRow,\n column: endColumn\n };\n};\n\n(function() {\n this.isEqual = function(range) {\n return this.start.row === range.start.row &&\n this.end.row === range.end.row &&\n this.start.column === range.start.column &&\n this.end.column === range.end.column;\n };\n this.toString = function() {\n return (\"Range: [\" + this.start.row + \"/\" + this.start.column +\n \"] -> [\" + this.end.row + \"/\" + this.end.column + \"]\");\n };\n\n this.contains = function(row, column) {\n return this.compare(row, column) == 0;\n };\n this.compareRange = function(range) {\n var cmp,\n end = range.end,\n start = range.start;\n\n cmp = this.compare(end.row, end.column);\n if (cmp == 1) {\n cmp = this.compare(start.row, start.column);\n if (cmp == 1) {\n return 2;\n } else if (cmp == 0) {\n return 1;\n } else {\n return 0;\n }\n } else if (cmp == -1) {\n return -2;\n } else {\n cmp = this.compare(start.row, start.column);\n if (cmp == -1) {\n return -1;\n } else if (cmp == 1) {\n return 42;\n } else {\n return 0;\n }\n }\n };\n this.comparePoint = function(p) {\n return this.compare(p.row, p.column);\n };\n this.containsRange = function(range) {\n return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;\n };\n this.intersects = function(range) {\n var cmp = this.compareRange(range);\n return (cmp == -1 || cmp == 0 || cmp == 1);\n };\n this.isEnd = function(row, column) {\n return this.end.row == row && this.end.column == column;\n };\n this.isStart = function(row, column) {\n return this.start.row == row && this.start.column == column;\n };\n this.setStart = function(row, column) {\n if (typeof row == \"object\") {\n this.start.column = row.column;\n this.start.row = row.row;\n } else {\n this.start.row = row;\n this.start.column = column;\n }\n };\n this.setEnd = function(row, column) {\n if (typeof row == \"object\") {\n this.end.column = row.column;\n this.end.row = row.row;\n } else {\n this.end.row = row;\n this.end.column = column;\n }\n };\n this.inside = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column) || this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideStart = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideEnd = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.compare = function(row, column) {\n if (!this.isMultiLine()) {\n if (row === this.start.row) {\n return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);\n }\n }\n\n if (row < this.start.row)\n return -1;\n\n if (row > this.end.row)\n return 1;\n\n if (this.start.row === row)\n return column >= this.start.column ? 0 : -1;\n\n if (this.end.row === row)\n return column <= this.end.column ? 0 : 1;\n\n return 0;\n };\n this.compareStart = function(row, column) {\n if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareEnd = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareInside = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.clipRows = function(firstRow, lastRow) {\n if (this.end.row > lastRow)\n var end = {row: lastRow + 1, column: 0};\n else if (this.end.row < firstRow)\n var end = {row: firstRow, column: 0};\n\n if (this.start.row > lastRow)\n var start = {row: lastRow + 1, column: 0};\n else if (this.start.row < firstRow)\n var start = {row: firstRow, column: 0};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n this.extend = function(row, column) {\n var cmp = this.compare(row, column);\n\n if (cmp == 0)\n return this;\n else if (cmp == -1)\n var start = {row: row, column: column};\n else\n var end = {row: row, column: column};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n\n this.isEmpty = function() {\n return (this.start.row === this.end.row && this.start.column === this.end.column);\n };\n this.isMultiLine = function() {\n return (this.start.row !== this.end.row);\n };\n this.clone = function() {\n return Range.fromPoints(this.start, this.end);\n };\n this.collapseRows = function() {\n if (this.end.column == 0)\n return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)\n else\n return new Range(this.start.row, 0, this.end.row, 0)\n };\n this.toScreenRange = function(session) {\n var screenPosStart = session.documentToScreenPosition(this.start);\n var screenPosEnd = session.documentToScreenPosition(this.end);\n\n return new Range(\n screenPosStart.row, screenPosStart.column,\n screenPosEnd.row, screenPosEnd.column\n );\n };\n this.moveBy = function(row, column) {\n this.start.row += row;\n this.start.column += column;\n this.end.row += row;\n this.end.column += column;\n };\n\n}).call(Range.prototype);\nRange.fromPoints = function(start, end) {\n return new Range(start.row, start.column, end.row, end.column);\n};\nRange.comparePoints = comparePoints;\n\nRange.comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\n\n\nexports.Range = Range;\n});\n\nace.define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Selection = function(session) {\n this.session = session;\n this.doc = session.getDocument();\n\n this.clearSelection();\n this.lead = this.selectionLead = this.doc.createAnchor(0, 0);\n this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);\n\n var self = this;\n this.lead.on(\"change\", function(e) {\n self._emit(\"changeCursor\");\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)\n self.$desiredColumn = null;\n });\n\n this.selectionAnchor.on(\"change\", function() {\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n });\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.isEmpty = function() {\n return (this.$isEmpty || (\n this.anchor.row == this.lead.row &&\n this.anchor.column == this.lead.column\n ));\n };\n this.isMultiLine = function() {\n if (this.isEmpty()) {\n return false;\n }\n\n return this.getRange().isMultiLine();\n };\n this.getCursor = function() {\n return this.lead.getPosition();\n };\n this.setSelectionAnchor = function(row, column) {\n this.anchor.setPosition(row, column);\n\n if (this.$isEmpty) {\n this.$isEmpty = false;\n this._emit(\"changeSelection\");\n }\n };\n this.getSelectionAnchor = function() {\n if (this.$isEmpty)\n return this.getSelectionLead();\n else\n return this.anchor.getPosition();\n };\n this.getSelectionLead = function() {\n return this.lead.getPosition();\n };\n this.shiftSelection = function(columns) {\n if (this.$isEmpty) {\n this.moveCursorTo(this.lead.row, this.lead.column + columns);\n return;\n }\n\n var anchor = this.getSelectionAnchor();\n var lead = this.getSelectionLead();\n\n var isBackwards = this.isBackwards();\n\n if (!isBackwards || anchor.column !== 0)\n this.setSelectionAnchor(anchor.row, anchor.column + columns);\n\n if (isBackwards || lead.column !== 0) {\n this.$moveSelection(function() {\n this.moveCursorTo(lead.row, lead.column + columns);\n });\n }\n };\n this.isBackwards = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));\n };\n this.getRange = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n\n if (this.isEmpty())\n return Range.fromPoints(lead, lead);\n\n if (this.isBackwards()) {\n return Range.fromPoints(lead, anchor);\n }\n else {\n return Range.fromPoints(anchor, lead);\n }\n };\n this.clearSelection = function() {\n if (!this.$isEmpty) {\n this.$isEmpty = true;\n this._emit(\"changeSelection\");\n }\n };\n this.selectAll = function() {\n var lastRow = this.doc.getLength() - 1;\n this.setSelectionAnchor(0, 0);\n this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length);\n };\n this.setRange =\n this.setSelectionRange = function(range, reverse) {\n if (reverse) {\n this.setSelectionAnchor(range.end.row, range.end.column);\n this.selectTo(range.start.row, range.start.column);\n } else {\n this.setSelectionAnchor(range.start.row, range.start.column);\n this.selectTo(range.end.row, range.end.column);\n }\n if (this.getRange().isEmpty())\n this.$isEmpty = true;\n this.$desiredColumn = null;\n };\n\n this.$moveSelection = function(mover) {\n var lead = this.lead;\n if (this.$isEmpty)\n this.setSelectionAnchor(lead.row, lead.column);\n\n mover.call(this);\n };\n this.selectTo = function(row, column) {\n this.$moveSelection(function() {\n this.moveCursorTo(row, column);\n });\n };\n this.selectToPosition = function(pos) {\n this.$moveSelection(function() {\n this.moveCursorToPosition(pos);\n });\n };\n this.moveTo = function(row, column) {\n this.clearSelection();\n this.moveCursorTo(row, column);\n };\n this.moveToPosition = function(pos) {\n this.clearSelection();\n this.moveCursorToPosition(pos);\n };\n this.selectUp = function() {\n this.$moveSelection(this.moveCursorUp);\n };\n this.selectDown = function() {\n this.$moveSelection(this.moveCursorDown);\n };\n this.selectRight = function() {\n this.$moveSelection(this.moveCursorRight);\n };\n this.selectLeft = function() {\n this.$moveSelection(this.moveCursorLeft);\n };\n this.selectLineStart = function() {\n this.$moveSelection(this.moveCursorLineStart);\n };\n this.selectLineEnd = function() {\n this.$moveSelection(this.moveCursorLineEnd);\n };\n this.selectFileEnd = function() {\n this.$moveSelection(this.moveCursorFileEnd);\n };\n this.selectFileStart = function() {\n this.$moveSelection(this.moveCursorFileStart);\n };\n this.selectWordRight = function() {\n this.$moveSelection(this.moveCursorWordRight);\n };\n this.selectWordLeft = function() {\n this.$moveSelection(this.moveCursorWordLeft);\n };\n this.getWordRange = function(row, column) {\n if (typeof column == \"undefined\") {\n var cursor = row || this.lead;\n row = cursor.row;\n column = cursor.column;\n }\n return this.session.getWordRange(row, column);\n };\n this.selectWord = function() {\n this.setSelectionRange(this.getWordRange());\n };\n this.selectAWord = function() {\n var cursor = this.getCursor();\n var range = this.session.getAWordRange(cursor.row, cursor.column);\n this.setSelectionRange(range);\n };\n\n this.getLineRange = function(row, excludeLastChar) {\n var rowStart = typeof row == \"number\" ? row : this.lead.row;\n var rowEnd;\n\n var foldLine = this.session.getFoldLine(rowStart);\n if (foldLine) {\n rowStart = foldLine.start.row;\n rowEnd = foldLine.end.row;\n } else {\n rowEnd = rowStart;\n }\n if (excludeLastChar === true)\n return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);\n else\n return new Range(rowStart, 0, rowEnd + 1, 0);\n };\n this.selectLine = function() {\n this.setSelectionRange(this.getLineRange());\n };\n this.moveCursorUp = function() {\n this.moveCursorBy(-1, 0);\n };\n this.moveCursorDown = function() {\n this.moveCursorBy(1, 0);\n };\n this.moveCursorLeft = function() {\n var cursor = this.lead.getPosition(),\n fold;\n\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n } else if (cursor.column === 0) {\n if (cursor.row > 0) {\n this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(\" \").length-1 == tabSize)\n this.moveCursorBy(0, -tabSize);\n else\n this.moveCursorBy(0, -1);\n }\n };\n this.moveCursorRight = function() {\n var cursor = this.lead.getPosition(),\n fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n }\n else if (this.lead.column == this.doc.getLine(this.lead.row).length) {\n if (this.lead.row < this.doc.getLength() - 1) {\n this.moveCursorTo(this.lead.row + 1, 0);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n var cursor = this.lead;\n if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(\" \").length-1 == tabSize)\n this.moveCursorBy(0, tabSize);\n else\n this.moveCursorBy(0, 1);\n }\n };\n this.moveCursorLineStart = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var screenRow = this.session.documentToScreenRow(row, column);\n var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);\n var beforeCursor = this.session.getDisplayLine(\n row, null, firstColumnPosition.row,\n firstColumnPosition.column\n );\n\n var leadingSpace = beforeCursor.match(/^\\s*/);\n if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)\n firstColumnPosition.column += leadingSpace[0].length;\n this.moveCursorToPosition(firstColumnPosition);\n };\n this.moveCursorLineEnd = function() {\n var lead = this.lead;\n var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);\n if (this.lead.column == lineEnd.column) {\n var line = this.session.getLine(lineEnd.row);\n if (lineEnd.column == line.length) {\n var textEnd = line.search(/\\s+$/);\n if (textEnd > 0)\n lineEnd.column = textEnd;\n }\n }\n\n this.moveCursorTo(lineEnd.row, lineEnd.column);\n };\n this.moveCursorFileEnd = function() {\n var row = this.doc.getLength() - 1;\n var column = this.doc.getLine(row).length;\n this.moveCursorTo(row, column);\n };\n this.moveCursorFileStart = function() {\n this.moveCursorTo(0, 0);\n };\n this.moveCursorLongWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n return;\n }\n if (match = this.session.nonTokenRe.exec(rightOfCursor)) {\n column += this.session.nonTokenRe.lastIndex;\n this.session.nonTokenRe.lastIndex = 0;\n rightOfCursor = line.substring(column);\n }\n if (column >= line.length) {\n this.moveCursorTo(row, line.length);\n this.moveCursorRight();\n if (row < this.doc.getLength() - 1)\n this.moveCursorWordRight();\n return;\n }\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n column += this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n this.moveCursorLongWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n return;\n }\n\n var str = this.session.getFoldStringAt(row, column, -1);\n if (str == null) {\n str = this.doc.getLine(row).substring(0, column);\n }\n\n var leftOfCursor = lang.stringReverse(str);\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n if (match = this.session.nonTokenRe.exec(leftOfCursor)) {\n column -= this.session.nonTokenRe.lastIndex;\n leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);\n this.session.nonTokenRe.lastIndex = 0;\n }\n if (column <= 0) {\n this.moveCursorTo(row, 0);\n this.moveCursorLeft();\n if (row > 0)\n this.moveCursorWordLeft();\n return;\n }\n if (match = this.session.tokenRe.exec(leftOfCursor)) {\n column -= this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n\n this.$shortWordEndIndex = function(rightOfCursor) {\n var match, index = 0, ch;\n var whitespaceRe = /\\s/;\n var tokenRe = this.session.tokenRe;\n\n tokenRe.lastIndex = 0;\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n index = this.session.tokenRe.lastIndex;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n\n if (index < 1) {\n tokenRe.lastIndex = 0;\n while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {\n tokenRe.lastIndex = 0;\n index ++;\n if (whitespaceRe.test(ch)) {\n if (index > 2) {\n index--;\n break;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n if (index > 2)\n break;\n }\n }\n }\n }\n }\n tokenRe.lastIndex = 0;\n\n return index;\n };\n\n this.moveCursorShortWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold)\n return this.moveCursorTo(fold.end.row, fold.end.column);\n\n if (column == line.length) {\n var l = this.doc.getLength();\n do {\n row++;\n rightOfCursor = this.doc.getLine(row);\n } while (row < l && /^\\s*$/.test(rightOfCursor));\n\n if (!/^\\s+/.test(rightOfCursor))\n rightOfCursor = \"\";\n column = 0;\n }\n\n var index = this.$shortWordEndIndex(rightOfCursor);\n\n this.moveCursorTo(row, column + index);\n };\n\n this.moveCursorShortWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1))\n return this.moveCursorTo(fold.start.row, fold.start.column);\n\n var line = this.session.getLine(row).substring(0, column);\n if (column === 0) {\n do {\n row--;\n line = this.doc.getLine(row);\n } while (row > 0 && /^\\s*$/.test(line));\n\n column = line.length;\n if (!/\\s+$/.test(line))\n line = \"\";\n }\n\n var leftOfCursor = lang.stringReverse(line);\n var index = this.$shortWordEndIndex(leftOfCursor);\n\n return this.moveCursorTo(row, column - index);\n };\n\n this.moveCursorWordRight = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordRight();\n else\n this.moveCursorShortWordRight();\n };\n\n this.moveCursorWordLeft = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordLeft();\n else\n this.moveCursorShortWordLeft();\n };\n this.moveCursorBy = function(rows, chars) {\n var screenPos = this.session.documentToScreenPosition(\n this.lead.row,\n this.lead.column\n );\n\n if (chars === 0) {\n if (this.$desiredColumn)\n screenPos.column = this.$desiredColumn;\n else\n this.$desiredColumn = screenPos.column;\n }\n\n var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column);\n \n if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {\n if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {\n if (docPos.row > 0 || rows > 0)\n docPos.row++;\n }\n }\n this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);\n };\n this.moveCursorToPosition = function(position) {\n this.moveCursorTo(position.row, position.column);\n };\n this.moveCursorTo = function(row, column, keepDesiredColumn) {\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n row = fold.start.row;\n column = fold.start.column;\n }\n\n this.$keepDesiredColumnOnChange = true;\n this.lead.setPosition(row, column);\n this.$keepDesiredColumnOnChange = false;\n\n if (!keepDesiredColumn)\n this.$desiredColumn = null;\n };\n this.moveCursorToScreen = function(row, column, keepDesiredColumn) {\n var pos = this.session.screenToDocumentPosition(row, column);\n this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);\n };\n this.detach = function() {\n this.lead.detach();\n this.anchor.detach();\n this.session = this.doc = null;\n };\n\n this.fromOrientedRange = function(range) {\n this.setSelectionRange(range, range.cursor == range.start);\n this.$desiredColumn = range.desiredColumn || this.$desiredColumn;\n };\n\n this.toOrientedRange = function(range) {\n var r = this.getRange();\n if (range) {\n range.start.column = r.start.column;\n range.start.row = r.start.row;\n range.end.column = r.end.column;\n range.end.row = r.end.row;\n } else {\n range = r;\n }\n\n range.cursor = this.isBackwards() ? range.start : range.end;\n range.desiredColumn = this.$desiredColumn;\n return range;\n };\n this.getRangeOfMovements = function(func) {\n var start = this.getCursor();\n try {\n func(this);\n var end = this.getCursor();\n return Range.fromPoints(start,end);\n } catch(e) {\n return Range.fromPoints(start,start);\n } finally {\n this.moveCursorToPosition(start);\n }\n };\n\n this.toJSON = function() {\n if (this.rangeCount) {\n var data = this.ranges.map(function(r) {\n var r1 = r.clone();\n r1.isBackwards = r.cursor == r.start;\n return r1;\n });\n } else {\n var data = this.getRange();\n data.isBackwards = this.isBackwards();\n }\n return data;\n };\n\n this.fromJSON = function(data) {\n if (data.start == undefined) {\n if (this.rangeList) {\n this.toSingleRange(data[0]);\n for (var i = data.length; i--; ) {\n var r = Range.fromPoints(data[i].start, data[i].end);\n if (data[i].isBackwards)\n r.cursor = r.start;\n this.addRange(r, true);\n }\n return;\n } else\n data = data[0];\n }\n if (this.rangeList)\n this.toSingleRange(data);\n this.setSelectionRange(data, data.isBackwards);\n };\n\n this.isEqual = function(data) {\n if ((data.length || this.rangeCount) && data.length != this.rangeCount)\n return false;\n if (!data.length || !this.ranges)\n return this.getRange().isEqual(data);\n\n for (var i = this.ranges.length; i--; ) {\n if (!this.ranges[i].isEqual(data[i]))\n return false;\n }\n return true;\n };\n\n}).call(Selection.prototype);\n\nexports.Selection = Selection;\n});\n\nace.define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar config = acequire(\"./config\");\nvar MAX_TOKEN_COUNT = 2000;\nvar Tokenizer = function(rules) {\n this.states = rules;\n\n this.regExps = {};\n this.matchMappings = {};\n for (var key in this.states) {\n var state = this.states[key];\n var ruleRegExps = [];\n var matchTotal = 0;\n var mapping = this.matchMappings[key] = {defaultToken: \"text\"};\n var flag = \"g\";\n\n var splitterRurles = [];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.defaultToken)\n mapping.defaultToken = rule.defaultToken;\n if (rule.caseInsensitive)\n flag = \"gi\";\n if (rule.regex == null)\n continue;\n\n if (rule.regex instanceof RegExp)\n rule.regex = rule.regex.toString().slice(1, -1);\n var adjustedregex = rule.regex;\n var matchcount = new RegExp(\"(?:(\" + adjustedregex + \")|(.))\").exec(\"a\").length - 2;\n if (Array.isArray(rule.token)) {\n if (rule.token.length == 1 || matchcount == 1) {\n rule.token = rule.token[0];\n } else if (matchcount - 1 != rule.token.length) {\n this.reportError(\"number of classes and regexp groups doesn't match\", { \n rule: rule,\n groupCount: matchcount - 1\n });\n rule.token = rule.token[0];\n } else {\n rule.tokenArray = rule.token;\n rule.token = null;\n rule.onMatch = this.$arrayTokens;\n }\n } else if (typeof rule.token == \"function\" && !rule.onMatch) {\n if (matchcount > 1)\n rule.onMatch = this.$applyToken;\n else\n rule.onMatch = rule.token;\n }\n\n if (matchcount > 1) {\n if (/\\\\\\d/.test(rule.regex)) {\n adjustedregex = rule.regex.replace(/\\\\([0-9]+)/g, function(match, digit) {\n return \"\\\\\" + (parseInt(digit, 10) + matchTotal + 1);\n });\n } else {\n matchcount = 1;\n adjustedregex = this.removeCapturingGroups(rule.regex);\n }\n if (!rule.splitRegex && typeof rule.token != \"string\")\n splitterRurles.push(rule); // flag will be known only at the very end\n }\n\n mapping[matchTotal] = i;\n matchTotal += matchcount;\n\n ruleRegExps.push(adjustedregex);\n if (!rule.onMatch)\n rule.onMatch = null;\n }\n \n if (!ruleRegExps.length) {\n mapping[0] = 0;\n ruleRegExps.push(\"$\");\n }\n \n splitterRurles.forEach(function(rule) {\n rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);\n }, this);\n\n this.regExps[key] = new RegExp(\"(\" + ruleRegExps.join(\")|(\") + \")|($)\", flag);\n }\n};\n\n(function() {\n this.$setMaxTokenCount = function(m) {\n MAX_TOKEN_COUNT = m | 0;\n };\n \n this.$applyToken = function(str) {\n var values = this.splitRegex.exec(str).slice(1);\n var types = this.token.apply(this, values);\n if (typeof types === \"string\")\n return [{type: types, value: str}];\n\n var tokens = [];\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i]\n };\n }\n return tokens;\n };\n\n this.$arrayTokens = function(str) {\n if (!str)\n return [];\n var values = this.splitRegex.exec(str);\n if (!values)\n return \"text\";\n var tokens = [];\n var types = this.tokenArray;\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i + 1])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i + 1]\n };\n }\n return tokens;\n };\n\n this.removeCapturingGroups = function(src) {\n var r = src.replace(\n /\\[(?:\\\\.|[^\\]])*?\\]|\\\\.|\\(\\?[:=!]|(\\()/g,\n function(x, y) {return y ? \"(?:\" : x;}\n );\n return r;\n };\n\n this.createSplitterRegexp = function(src, flag) {\n if (src.indexOf(\"(?=\") != -1) {\n var stack = 0;\n var inChClass = false;\n var lastCapture = {};\n src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g, function(\n m, esc, parenOpen, parenClose, square, index\n ) {\n if (inChClass) {\n inChClass = square != \"]\";\n } else if (square) {\n inChClass = true;\n } else if (parenClose) {\n if (stack == lastCapture.stack) {\n lastCapture.end = index+1;\n lastCapture.stack = -1;\n }\n stack--;\n } else if (parenOpen) {\n stack++;\n if (parenOpen.length != 1) {\n lastCapture.stack = stack\n lastCapture.start = index;\n }\n }\n return m;\n });\n\n if (lastCapture.end != null && /^\\)*$/.test(src.substr(lastCapture.end)))\n src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);\n }\n if (src.charAt(0) != \"^\") src = \"^\" + src;\n if (src.charAt(src.length - 1) != \"$\") src += \"$\";\n \n return new RegExp(src, (flag||\"\").replace(\"g\", \"\"));\n };\n this.getLineTokens = function(line, startState) {\n if (startState && typeof startState != \"string\") {\n var stack = startState.slice(0);\n startState = stack[0];\n if (startState === \"#tmp\") {\n stack.shift()\n startState = stack.shift()\n }\n } else\n var stack = [];\n\n var currentState = startState || \"start\";\n var state = this.states[currentState];\n if (!state) {\n currentState = \"start\";\n state = this.states[currentState];\n }\n var mapping = this.matchMappings[currentState];\n var re = this.regExps[currentState];\n re.lastIndex = 0;\n\n var match, tokens = [];\n var lastIndex = 0;\n var matchAttempts = 0;\n\n var token = {type: null, value: \"\"};\n\n while (match = re.exec(line)) {\n var type = mapping.defaultToken;\n var rule = null;\n var value = match[0];\n var index = re.lastIndex;\n\n if (index - value.length > lastIndex) {\n var skipped = line.substring(lastIndex, index - value.length);\n if (token.type == type) {\n token.value += skipped;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: skipped};\n }\n }\n\n for (var i = 0; i < match.length-2; i++) {\n if (match[i + 1] === undefined)\n continue;\n\n rule = state[mapping[i]];\n\n if (rule.onMatch)\n type = rule.onMatch(value, currentState, stack);\n else\n type = rule.token;\n\n if (rule.next) {\n if (typeof rule.next == \"string\") {\n currentState = rule.next;\n } else {\n currentState = rule.next(currentState, stack);\n }\n \n state = this.states[currentState];\n if (!state) {\n this.reportError(\"state doesn't exist\", currentState);\n currentState = \"start\";\n state = this.states[currentState];\n }\n mapping = this.matchMappings[currentState];\n lastIndex = index;\n re = this.regExps[currentState];\n re.lastIndex = index;\n }\n break;\n }\n\n if (value) {\n if (typeof type === \"string\") {\n if ((!rule || rule.merge !== false) && token.type === type) {\n token.value += value;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: value};\n }\n } else if (type) {\n if (token.type)\n tokens.push(token);\n token = {type: null, value: \"\"};\n for (var i = 0; i < type.length; i++)\n tokens.push(type[i]);\n }\n }\n\n if (lastIndex == line.length)\n break;\n\n lastIndex = index;\n\n if (matchAttempts++ > MAX_TOKEN_COUNT) {\n if (matchAttempts > 2 * line.length) {\n this.reportError(\"infinite loop with in ace tokenizer\", {\n startState: startState,\n line: line\n });\n }\n while (lastIndex < line.length) {\n if (token.type)\n tokens.push(token);\n token = {\n value: line.substring(lastIndex, lastIndex += 2000),\n type: \"overflow\"\n };\n }\n currentState = \"start\";\n stack = [];\n break;\n }\n }\n\n if (token.type)\n tokens.push(token);\n \n if (stack.length > 1) {\n if (stack[0] !== currentState)\n stack.unshift(\"#tmp\", currentState);\n }\n return {\n tokens : tokens,\n state : stack.length ? stack : currentState\n };\n };\n \n this.reportError = config.reportError;\n \n}).call(Tokenizer.prototype);\n\nexports.Tokenizer = Tokenizer;\n});\n\nace.define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\n\nvar TextHighlightRules = function() {\n\n this.$rules = {\n \"start\" : [{\n token : \"empty_line\",\n regex : '^$'\n }, {\n defaultToken : \"text\"\n }]\n };\n};\n\n(function() {\n\n this.addRules = function(rules, prefix) {\n if (!prefix) {\n for (var key in rules)\n this.$rules[key] = rules[key];\n return;\n }\n for (var key in rules) {\n var state = rules[key];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.next || rule.onMatch) {\n if (typeof rule.next == \"string\") {\n if (rule.next.indexOf(prefix) !== 0)\n rule.next = prefix + rule.next;\n }\n if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)\n rule.nextState = prefix + rule.nextState;\n }\n }\n this.$rules[prefix + key] = state;\n }\n };\n\n this.getRules = function() {\n return this.$rules;\n };\n\n this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {\n var embedRules = typeof HighlightRules == \"function\"\n ? new HighlightRules().getRules()\n : HighlightRules;\n if (states) {\n for (var i = 0; i < states.length; i++)\n states[i] = prefix + states[i];\n } else {\n states = [];\n for (var key in embedRules)\n states.push(prefix + key);\n }\n\n this.addRules(embedRules, prefix);\n\n if (escapeRules) {\n var addRules = Array.prototype[append ? \"push\" : \"unshift\"];\n for (var i = 0; i < states.length; i++)\n addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));\n }\n\n if (!this.$embeds)\n this.$embeds = [];\n this.$embeds.push(prefix);\n };\n\n this.getEmbeds = function() {\n return this.$embeds;\n };\n\n var pushState = function(currentState, stack) {\n if (currentState != \"start\" || stack.length)\n stack.unshift(this.nextState, currentState);\n return this.nextState;\n };\n var popState = function(currentState, stack) {\n stack.shift();\n return stack.shift() || \"start\";\n };\n\n this.normalizeRules = function() {\n var id = 0;\n var rules = this.$rules;\n function processState(key) {\n var state = rules[key];\n state.processed = true;\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n var toInsert = null;\n if (Array.isArray(rule)) {\n toInsert = rule;\n rule = {};\n }\n if (!rule.regex && rule.start) {\n rule.regex = rule.start;\n if (!rule.next)\n rule.next = [];\n rule.next.push({\n defaultToken: rule.token\n }, {\n token: rule.token + \".end\",\n regex: rule.end || rule.start,\n next: \"pop\"\n });\n rule.token = rule.token + \".start\";\n rule.push = true;\n }\n var next = rule.next || rule.push;\n if (next && Array.isArray(next)) {\n var stateName = rule.stateName;\n if (!stateName) {\n stateName = rule.token;\n if (typeof stateName != \"string\")\n stateName = stateName[0] || \"\";\n if (rules[stateName])\n stateName += id++;\n }\n rules[stateName] = next;\n rule.next = stateName;\n processState(stateName);\n } else if (next == \"pop\") {\n rule.next = popState;\n }\n\n if (rule.push) {\n rule.nextState = rule.next || rule.push;\n rule.next = pushState;\n delete rule.push;\n }\n\n if (rule.rules) {\n for (var r in rule.rules) {\n if (rules[r]) {\n if (rules[r].push)\n rules[r].push.apply(rules[r], rule.rules[r]);\n } else {\n rules[r] = rule.rules[r];\n }\n }\n }\n var includeName = typeof rule == \"string\"\n ? rule\n : typeof rule.include == \"string\"\n ? rule.include\n : \"\";\n if (includeName) {\n toInsert = rules[includeName];\n }\n\n if (toInsert) {\n var args = [i, 1].concat(toInsert);\n if (rule.noEscape)\n args = args.filter(function(x) {return !x.next;});\n state.splice.apply(state, args);\n i--;\n }\n \n if (rule.keywordMap) {\n rule.token = this.createKeywordMapper(\n rule.keywordMap, rule.defaultToken || \"text\", rule.caseInsensitive\n );\n delete rule.defaultToken;\n }\n }\n }\n Object.keys(rules).forEach(processState, this);\n };\n\n this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {\n var keywords = Object.create(null);\n Object.keys(map).forEach(function(className) {\n var a = map[className];\n if (ignoreCase)\n a = a.toLowerCase();\n var list = a.split(splitChar || \"|\");\n for (var i = list.length; i--; )\n keywords[list[i]] = className;\n });\n if (Object.getPrototypeOf(keywords)) {\n keywords.__proto__ = null;\n }\n this.$keywordList = Object.keys(keywords);\n map = null;\n return ignoreCase\n ? function(value) {return keywords[value.toLowerCase()] || defaultToken }\n : function(value) {return keywords[value] || defaultToken };\n };\n\n this.getKeywords = function() {\n return this.$keywords;\n };\n\n}).call(TextHighlightRules.prototype);\n\nexports.TextHighlightRules = TextHighlightRules;\n});\n\nace.define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Behaviour = function() {\n this.$behaviours = {};\n};\n\n(function () {\n\n this.add = function (name, action, callback) {\n switch (undefined) {\n case this.$behaviours:\n this.$behaviours = {};\n case this.$behaviours[name]:\n this.$behaviours[name] = {};\n }\n this.$behaviours[name][action] = callback;\n }\n \n this.addBehaviours = function (behaviours) {\n for (var key in behaviours) {\n for (var action in behaviours[key]) {\n this.add(key, action, behaviours[key][action]);\n }\n }\n }\n \n this.remove = function (name) {\n if (this.$behaviours && this.$behaviours[name]) {\n delete this.$behaviours[name];\n }\n }\n \n this.inherit = function (mode, filter) {\n if (typeof mode === \"function\") {\n var behaviours = new mode().getBehaviours(filter);\n } else {\n var behaviours = mode.getBehaviours(filter);\n }\n this.addBehaviours(behaviours);\n }\n \n this.getBehaviours = function (filter) {\n if (!filter) {\n return this.$behaviours;\n } else {\n var ret = {}\n for (var i = 0; i < filter.length; i++) {\n if (this.$behaviours[filter[i]]) {\n ret[filter[i]] = this.$behaviours[filter[i]];\n }\n }\n return ret;\n }\n }\n\n}).call(Behaviour.prototype);\n\nexports.Behaviour = Behaviour;\n});\n\nace.define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar TokenIterator = function(session, initialRow, initialColumn) {\n this.$session = session;\n this.$row = initialRow;\n this.$rowTokens = session.getTokens(initialRow);\n\n var token = session.getTokenAt(initialRow, initialColumn);\n this.$tokenIndex = token ? token.index : -1;\n};\n\n(function() { \n this.stepBackward = function() {\n this.$tokenIndex -= 1;\n \n while (this.$tokenIndex < 0) {\n this.$row -= 1;\n if (this.$row < 0) {\n this.$row = 0;\n return null;\n }\n \n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = this.$rowTokens.length - 1;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.stepForward = function() {\n this.$tokenIndex += 1;\n var rowCount;\n while (this.$tokenIndex >= this.$rowTokens.length) {\n this.$row += 1;\n if (!rowCount)\n rowCount = this.$session.getLength();\n if (this.$row >= rowCount) {\n this.$row = rowCount - 1;\n return null;\n }\n\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = 0;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentToken = function () {\n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentTokenRow = function () {\n return this.$row;\n }; \n this.getCurrentTokenColumn = function() {\n var rowTokens = this.$rowTokens;\n var tokenIndex = this.$tokenIndex;\n var column = rowTokens[tokenIndex].start;\n if (column !== undefined)\n return column;\n \n column = 0;\n while (tokenIndex > 0) {\n tokenIndex -= 1;\n column += rowTokens[tokenIndex].value.length;\n }\n \n return column; \n };\n this.getCurrentTokenPosition = function() {\n return {row: this.$row, column: this.getCurrentTokenColumn()};\n };\n \n}).call(TokenIterator.prototype);\n\nexports.TokenIterator = TokenIterator;\n});\n\nace.define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\nvar lang = acequire(\"../../lib/lang\");\n\nvar SAFE_INSERT_IN_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\"];\nvar SAFE_INSERT_BEFORE_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\", \"comment\"];\n\nvar context;\nvar contextCache = {};\nvar initContext = function(editor) {\n var id = -1;\n if (editor.multiSelect) {\n id = editor.selection.index;\n if (contextCache.rangeCount != editor.multiSelect.rangeCount)\n contextCache = {rangeCount: editor.multiSelect.rangeCount};\n }\n if (contextCache[id])\n return context = contextCache[id];\n context = contextCache[id] = {\n autoInsertedBrackets: 0,\n autoInsertedRow: -1,\n autoInsertedLineEnd: \"\",\n maybeInsertedBrackets: 0,\n maybeInsertedRow: -1,\n maybeInsertedLineStart: \"\",\n maybeInsertedLineEnd: \"\"\n };\n};\n\nvar getWrapped = function(selection, selected, opening, closing) {\n var rowDiff = selection.end.row - selection.start.row;\n return {\n text: opening + selected + closing,\n selection: [\n 0,\n selection.start.column + 1,\n rowDiff,\n selection.end.column + (rowDiff ? 0 : 1)\n ]\n };\n};\n\nvar CstyleBehaviour = function() {\n this.add(\"braces\", \"insertion\", function(state, action, editor, session, text) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (text == '{') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && selected !== \"{\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '{', '}');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n if (/[\\]\\}\\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n } else {\n CstyleBehaviour.recordMaybeInsert(editor, session, \"{\");\n return {\n text: '{',\n selection: [1, 1]\n };\n }\n }\n } else if (text == '}') {\n initContext(editor);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == '}') {\n var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n } else if (text == \"\\n\" || text == \"\\r\\n\") {\n initContext(editor);\n var closing = \"\";\n if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {\n closing = lang.stringRepeat(\"}\", context.maybeInsertedBrackets);\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === '}') {\n var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');\n if (!openBracePos)\n return null;\n var next_indent = this.$getIndent(session.getLine(openBracePos.row));\n } else if (closing) {\n var next_indent = this.$getIndent(line);\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n return;\n }\n var indent = next_indent + session.getTabString();\n\n return {\n text: '\\n' + indent + '\\n' + next_indent + closing,\n selection: [1, indent.length, 1, indent.length]\n };\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n });\n\n this.add(\"braces\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '{') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar == '}') {\n range.end.column++;\n return range;\n } else {\n context.maybeInsertedBrackets--;\n }\n }\n });\n\n this.add(\"parens\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '(') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '(', ')');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \")\");\n return {\n text: '()',\n selection: [1, 1]\n };\n }\n } else if (text == ')') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ')') {\n var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"parens\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '(') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ')') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"brackets\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '[') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '[', ']');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"]\");\n return {\n text: '[]',\n selection: [1, 1]\n };\n }\n } else if (text == ']') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ']') {\n var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"brackets\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '[') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ']') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"string_dquotes\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '\"' || text == \"'\") {\n if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1)\n return;\n initContext(editor);\n var quote = text;\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && selected !== \"'\" && selected != '\"' && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, quote, quote);\n } else if (!selected) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var leftChar = line.substring(cursor.column-1, cursor.column);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n var token = session.getTokenAt(cursor.row, cursor.column);\n var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);\n if (leftChar == \"\\\\\" && token && /escape/.test(token.type))\n return null;\n\n var stringBefore = token && /string|escape/.test(token.type);\n var stringAfter = !rightToken || /string|escape/.test(rightToken.type);\n\n var pair;\n if (rightChar == quote) {\n pair = stringBefore !== stringAfter;\n if (pair && /string\\.end/.test(rightToken.type))\n pair = false;\n } else {\n if (stringBefore && !stringAfter)\n return null; // wrap string with different quote\n if (stringBefore && stringAfter)\n return null; // do not pair quotes inside strings\n var wordRe = session.$mode.tokenRe;\n wordRe.lastIndex = 0;\n var isWordBefore = wordRe.test(leftChar);\n wordRe.lastIndex = 0;\n var isWordAfter = wordRe.test(leftChar);\n if (isWordBefore || isWordAfter)\n return null; // before or after alphanumeric\n if (rightChar && !/[\\s;,.})\\]\\\\]/.test(rightChar))\n return null; // there is rightChar and it isn't closing\n pair = true;\n }\n return {\n text: pair ? quote + quote : \"\",\n selection: [1,1]\n };\n }\n }\n });\n\n this.add(\"string_dquotes\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n\n};\n\n\nCstyleBehaviour.isSaneInsertion = function(editor, session) {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n if (!this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) {\n var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);\n if (!this.$matchTokenType(iterator2.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS))\n return false;\n }\n iterator.stepForward();\n return iterator.getCurrentTokenRow() !== cursor.row ||\n this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_BEFORE_TOKENS);\n};\n\nCstyleBehaviour.$matchTokenType = function(token, types) {\n return types.indexOf(token.type || token) > -1;\n};\n\nCstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))\n context.autoInsertedBrackets = 0;\n context.autoInsertedRow = cursor.row;\n context.autoInsertedLineEnd = bracket + line.substr(cursor.column);\n context.autoInsertedBrackets++;\n};\n\nCstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isMaybeInsertedClosing(cursor, line))\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = cursor.row;\n context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;\n context.maybeInsertedLineEnd = line.substr(cursor.column);\n context.maybeInsertedBrackets++;\n};\n\nCstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {\n return context.autoInsertedBrackets > 0 &&\n cursor.row === context.autoInsertedRow &&\n bracket === context.autoInsertedLineEnd[0] &&\n line.substr(cursor.column) === context.autoInsertedLineEnd;\n};\n\nCstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {\n return context.maybeInsertedBrackets > 0 &&\n cursor.row === context.maybeInsertedRow &&\n line.substr(cursor.column) === context.maybeInsertedLineEnd &&\n line.substr(0, cursor.column) == context.maybeInsertedLineStart;\n};\n\nCstyleBehaviour.popAutoInsertedClosing = function() {\n context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);\n context.autoInsertedBrackets--;\n};\n\nCstyleBehaviour.clearMaybeInsertedClosing = function() {\n if (context) {\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = -1;\n }\n};\n\n\n\noop.inherits(CstyleBehaviour, Behaviour);\n\nexports.CstyleBehaviour = CstyleBehaviour;\n});\n\nace.define(\"ace/unicode\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.packages = {};\n\naddUnicodePackage({\n L: \"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC\",\n Ll: \"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A\",\n Lu: \"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A\",\n Lt: \"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC\",\n Lm: \"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F\",\n Lo: \"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC\",\n M: \"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26\",\n Mn: \"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26\",\n Mc: \"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC\",\n Me: \"0488048906DE20DD-20E020E2-20E4A670-A672\",\n N: \"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19\",\n Nd: \"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19\",\n Nl: \"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF\",\n No: \"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835\",\n P: \"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65\",\n Pd: \"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D\",\n Ps: \"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62\",\n Pe: \"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63\",\n Pi: \"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20\",\n Pf: \"00BB2019201D203A2E032E052E0A2E0D2E1D2E21\",\n Pc: \"005F203F20402054FE33FE34FE4D-FE4FFF3F\",\n Po: \"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65\",\n S: \"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD\",\n Sm: \"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC\",\n Sc: \"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6\",\n Sk: \"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3\",\n So: \"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD\",\n Z: \"002000A01680180E2000-200A20282029202F205F3000\",\n Zs: \"002000A01680180E2000-200A202F205F3000\",\n Zl: \"2028\",\n Zp: \"2029\",\n C: \"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF\",\n Cc: \"0000-001F007F-009F\",\n Cf: \"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB\",\n Co: \"E000-F8FF\",\n Cs: \"D800-DFFF\",\n Cn: \"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF\"\n});\n\nfunction addUnicodePackage (pack) {\n var codePoint = /\\w{4}/g;\n for (var name in pack)\n exports.packages[name] = pack[name].replace(codePoint, \"\\\\u$&\");\n}\n\n});\n\nace.define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour/cstyle\",\"ace/unicode\",\"ace/lib/lang\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Tokenizer = acequire(\"../tokenizer\").Tokenizer;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar unicode = acequire(\"../unicode\");\nvar lang = acequire(\"../lib/lang\");\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\nvar Mode = function() {\n this.HighlightRules = TextHighlightRules;\n};\n\n(function() {\n this.$defaultBehaviour = new CstyleBehaviour();\n\n this.tokenRe = new RegExp(\"^[\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]+\", \"g\"\n );\n\n this.nonTokenRe = new RegExp(\"^(?:[^\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]|\\\\s])+\", \"g\"\n );\n\n this.getTokenizer = function() {\n if (!this.$tokenizer) {\n this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);\n this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());\n }\n return this.$tokenizer;\n };\n\n this.lineCommentStart = \"\";\n this.blockComment = \"\";\n\n this.toggleCommentLines = function(state, session, startRow, endRow) {\n var doc = session.doc;\n\n var ignoreBlankLines = true;\n var shouldRemove = true;\n var minIndent = Infinity;\n var tabSize = session.getTabSize();\n var insertAtTabStop = false;\n\n if (!this.lineCommentStart) {\n if (!this.blockComment)\n return false;\n var lineCommentStart = this.blockComment.start;\n var lineCommentEnd = this.blockComment.end;\n var regexpStart = new RegExp(\"^(\\\\s*)(?:\" + lang.escapeRegExp(lineCommentStart) + \")\");\n var regexpEnd = new RegExp(\"(?:\" + lang.escapeRegExp(lineCommentEnd) + \")\\\\s*$\");\n\n var comment = function(line, i) {\n if (testRemove(line, i))\n return;\n if (!ignoreBlankLines || /\\S/.test(line)) {\n doc.insertInLine({row: i, column: line.length}, lineCommentEnd);\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n\n var uncomment = function(line, i) {\n var m;\n if (m = line.match(regexpEnd))\n doc.removeInLine(i, line.length - m[0].length, line.length);\n if (m = line.match(regexpStart))\n doc.removeInLine(i, m[1].length, m[0].length);\n };\n\n var testRemove = function(line, row) {\n if (regexpStart.test(line))\n return true;\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].type === \"comment\")\n return true;\n }\n };\n } else {\n if (Array.isArray(this.lineCommentStart)) {\n var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join(\"|\");\n var lineCommentStart = this.lineCommentStart[0];\n } else {\n var regexpStart = lang.escapeRegExp(this.lineCommentStart);\n var lineCommentStart = this.lineCommentStart;\n }\n regexpStart = new RegExp(\"^(\\\\s*)(?:\" + regexpStart + \") ?\");\n \n insertAtTabStop = session.getUseSoftTabs();\n\n var uncomment = function(line, i) {\n var m = line.match(regexpStart);\n if (!m) return;\n var start = m[1].length, end = m[0].length;\n if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == \" \")\n end--;\n doc.removeInLine(i, start, end);\n };\n var commentWithSpace = lineCommentStart + \" \";\n var comment = function(line, i) {\n if (!ignoreBlankLines || /\\S/.test(line)) {\n if (shouldInsertSpace(line, minIndent, minIndent))\n doc.insertInLine({row: i, column: minIndent}, commentWithSpace);\n else\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n var testRemove = function(line, i) {\n return regexpStart.test(line);\n };\n \n var shouldInsertSpace = function(line, before, after) {\n var spaces = 0;\n while (before-- && line.charAt(before) == \" \")\n spaces++;\n if (spaces % tabSize != 0)\n return false;\n var spaces = 0;\n while (line.charAt(after++) == \" \")\n spaces++;\n if (tabSize > 2)\n return spaces % tabSize != tabSize - 1;\n else\n return spaces % tabSize == 0;\n return true;\n };\n }\n\n function iter(fun) {\n for (var i = startRow; i <= endRow; i++)\n fun(doc.getLine(i), i);\n }\n\n\n var minEmptyLength = Infinity;\n iter(function(line, i) {\n var indent = line.search(/\\S/);\n if (indent !== -1) {\n if (indent < minIndent)\n minIndent = indent;\n if (shouldRemove && !testRemove(line, i))\n shouldRemove = false;\n } else if (minEmptyLength > line.length) {\n minEmptyLength = line.length;\n }\n });\n\n if (minIndent == Infinity) {\n minIndent = minEmptyLength;\n ignoreBlankLines = false;\n shouldRemove = false;\n }\n\n if (insertAtTabStop && minIndent % tabSize != 0)\n minIndent = Math.floor(minIndent / tabSize) * tabSize;\n\n iter(shouldRemove ? uncomment : comment);\n };\n\n this.toggleBlockComment = function(state, session, range, cursor) {\n var comment = this.blockComment;\n if (!comment)\n return;\n if (!comment.start && comment[0])\n comment = comment[0];\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n var sel = session.selection;\n var initialRange = session.selection.toOrientedRange();\n var startRow, colDiff;\n\n if (token && /comment/.test(token.type)) {\n var startRange, endRange;\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.start);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n startRange = new Range(row, column, row, column + comment.start.length);\n break;\n }\n token = iterator.stepBackward();\n }\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.end);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n endRange = new Range(row, column, row, column + comment.end.length);\n break;\n }\n token = iterator.stepForward();\n }\n if (endRange)\n session.remove(endRange);\n if (startRange) {\n session.remove(startRange);\n startRow = startRange.start.row;\n colDiff = -comment.start.length;\n }\n } else {\n colDiff = comment.start.length;\n startRow = range.start.row;\n session.insert(range.end, comment.end);\n session.insert(range.start, comment.start);\n }\n if (initialRange.start.row == startRow)\n initialRange.start.column += colDiff;\n if (initialRange.end.row == startRow)\n initialRange.end.column += colDiff;\n session.selection.fromOrientedRange(initialRange);\n };\n\n this.getNextLineIndent = function(state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function(state, line, input) {\n return false;\n };\n\n this.autoOutdent = function(state, doc, row) {\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n this.createWorker = function(session) {\n return null;\n };\n\n this.createModeDelegates = function (mapping) {\n this.$embeds = [];\n this.$modes = {};\n for (var i in mapping) {\n if (mapping[i]) {\n this.$embeds.push(i);\n this.$modes[i] = new mapping[i]();\n }\n }\n\n var delegations = [\"toggleBlockComment\", \"toggleCommentLines\", \"getNextLineIndent\", \n \"checkOutdent\", \"autoOutdent\", \"transformAction\", \"getCompletions\"];\n\n for (var i = 0; i < delegations.length; i++) {\n (function(scope) {\n var functionName = delegations[i];\n var defaultHandler = scope[functionName];\n scope[delegations[i]] = function() {\n return this.$delegator(functionName, arguments, defaultHandler);\n };\n }(this));\n }\n };\n\n this.$delegator = function(method, args, defaultHandler) {\n var state = args[0];\n if (typeof state != \"string\")\n state = state[0];\n for (var i = 0; i < this.$embeds.length; i++) {\n if (!this.$modes[this.$embeds[i]]) continue;\n\n var split = state.split(this.$embeds[i]);\n if (!split[0] && split[1]) {\n args[0] = split[1];\n var mode = this.$modes[this.$embeds[i]];\n return mode[method].apply(mode, args);\n }\n }\n var ret = defaultHandler.apply(this, args);\n return defaultHandler ? ret : undefined;\n };\n\n this.transformAction = function(state, action, editor, session, param) {\n if (this.$behaviour) {\n var behaviours = this.$behaviour.getBehaviours();\n for (var key in behaviours) {\n if (behaviours[key][action]) {\n var ret = behaviours[key][action].apply(this, arguments);\n if (ret) {\n return ret;\n }\n }\n }\n }\n };\n \n this.getKeywords = function(append) {\n if (!this.completionKeywords) {\n var rules = this.$tokenizer.rules;\n var completionKeywords = [];\n for (var rule in rules) {\n var ruleItr = rules[rule];\n for (var r = 0, l = ruleItr.length; r < l; r++) {\n if (typeof ruleItr[r].token === \"string\") {\n if (/keyword|support|storage/.test(ruleItr[r].token))\n completionKeywords.push(ruleItr[r].regex);\n }\n else if (typeof ruleItr[r].token === \"object\") {\n for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { \n if (/keyword|support|storage/.test(ruleItr[r].token[a])) {\n var rule = ruleItr[r].regex.match(/\\(.+?\\)/g)[a];\n completionKeywords.push(rule.substr(1, rule.length - 2));\n }\n }\n }\n }\n }\n this.completionKeywords = completionKeywords;\n }\n if (!append)\n return this.$keywordList;\n return completionKeywords.concat(this.$keywordList || []);\n };\n \n this.$createKeywordList = function() {\n if (!this.$highlightRules)\n this.getTokenizer();\n return this.$keywordList = this.$highlightRules.$keywordList || [];\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n var keywords = this.$keywordList || this.$createKeywordList();\n return keywords.map(function(word) {\n return {\n name: word,\n value: word,\n score: 0,\n meta: \"keyword\"\n };\n });\n };\n\n this.$id = \"ace/mode/text\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n\nace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nfunction throwDeltaError(delta, errorText){\n console.log(\"Invalid Delta:\", delta);\n throw \"Invalid Delta: \" + errorText;\n}\n\nfunction positionInDocument(docLines, position) {\n return position.row >= 0 && position.row < docLines.length &&\n position.column >= 0 && position.column <= docLines[position.row].length;\n}\n\nfunction validateDelta(docLines, delta) {\n if (delta.action != \"insert\" && delta.action != \"remove\")\n throwDeltaError(delta, \"delta.action must be 'insert' or 'remove'\");\n if (!(delta.lines instanceof Array))\n throwDeltaError(delta, \"delta.lines must be an Array\");\n if (!delta.start || !delta.end)\n throwDeltaError(delta, \"delta.start/end must be an present\");\n var start = delta.start;\n if (!positionInDocument(docLines, delta.start))\n throwDeltaError(delta, \"delta.start must be contained in document\");\n var end = delta.end;\n if (delta.action == \"remove\" && !positionInDocument(docLines, end))\n throwDeltaError(delta, \"delta.end must contained in document for 'remove' actions\");\n var numRangeRows = end.row - start.row;\n var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));\n if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)\n throwDeltaError(delta, \"delta.range must match delta lines\");\n}\n\nexports.applyDelta = function(docLines, delta, doNotValidate) {\n \n var row = delta.start.row;\n var startColumn = delta.start.column;\n var line = docLines[row] || \"\";\n switch (delta.action) {\n case \"insert\":\n var lines = delta.lines;\n if (lines.length === 1) {\n docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);\n } else {\n var args = [row, 1].concat(delta.lines);\n docLines.splice.apply(docLines, args);\n docLines[row] = line.substring(0, startColumn) + docLines[row];\n docLines[row + delta.lines.length - 1] += line.substring(startColumn);\n }\n break;\n case \"remove\":\n var endColumn = delta.end.column;\n var endRow = delta.end.row;\n if (row === endRow) {\n docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);\n } else {\n docLines.splice(\n row, endRow - row + 1,\n line.substring(0, startColumn) + docLines[endRow].substring(endColumn)\n );\n }\n break;\n }\n}\n});\n\nace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar Anchor = exports.Anchor = function(doc, row, column) {\n this.$onChange = this.onChange.bind(this);\n this.attach(doc);\n \n if (typeof column == \"undefined\")\n this.setPosition(row.row, row.column);\n else\n this.setPosition(row, column);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.getPosition = function() {\n return this.$clipPositionToDocument(this.row, this.column);\n };\n this.getDocument = function() {\n return this.document;\n };\n this.$insertRight = false;\n this.onChange = function(delta) {\n if (delta.start.row == delta.end.row && delta.start.row != this.row)\n return;\n\n if (delta.start.row > this.row)\n return;\n \n var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);\n this.setPosition(point.row, point.column, true);\n };\n \n function $pointsInOrder(point1, point2, equalPointsInOrder) {\n var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;\n return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);\n }\n \n function $getTransformedPoint(delta, point, moveIfEqual) {\n var deltaIsInsert = delta.action == \"insert\";\n var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);\n var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);\n var deltaStart = delta.start;\n var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.\n if ($pointsInOrder(point, deltaStart, moveIfEqual)) {\n return {\n row: point.row,\n column: point.column\n };\n }\n if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {\n return {\n row: point.row + deltaRowShift,\n column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)\n };\n }\n \n return {\n row: deltaStart.row,\n column: deltaStart.column\n };\n }\n this.setPosition = function(row, column, noClip) {\n var pos;\n if (noClip) {\n pos = {\n row: row,\n column: column\n };\n } else {\n pos = this.$clipPositionToDocument(row, column);\n }\n\n if (this.row == pos.row && this.column == pos.column)\n return;\n\n var old = {\n row: this.row,\n column: this.column\n };\n\n this.row = pos.row;\n this.column = pos.column;\n this._signal(\"change\", {\n old: old,\n value: pos\n });\n };\n this.detach = function() {\n this.document.removeEventListener(\"change\", this.$onChange);\n };\n this.attach = function(doc) {\n this.document = doc || this.document;\n this.document.on(\"change\", this.$onChange);\n };\n this.$clipPositionToDocument = function(row, column) {\n var pos = {};\n\n if (row >= this.document.getLength()) {\n pos.row = Math.max(0, this.document.getLength() - 1);\n pos.column = this.document.getLine(pos.row).length;\n }\n else if (row < 0) {\n pos.row = 0;\n pos.column = 0;\n }\n else {\n pos.row = row;\n pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));\n }\n\n if (column < 0)\n pos.column = 0;\n\n return pos;\n };\n\n}).call(Anchor.prototype);\n\n});\n\nace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar applyDelta = acequire(\"./apply_delta\").applyDelta;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Anchor = acequire(\"./anchor\").Anchor;\n\nvar Document = function(textOrLines) {\n this.$lines = [\"\"];\n if (textOrLines.length === 0) {\n this.$lines = [\"\"];\n } else if (Array.isArray(textOrLines)) {\n this.insertMergedLines({row: 0, column: 0}, textOrLines);\n } else {\n this.insert({row: 0, column:0}, textOrLines);\n }\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setValue = function(text) {\n var len = this.getLength() - 1;\n this.remove(new Range(0, 0, len, this.getLine(len).length));\n this.insert({row: 0, column: 0}, text);\n };\n this.getValue = function() {\n return this.getAllLines().join(this.getNewLineCharacter());\n };\n this.createAnchor = function(row, column) {\n return new Anchor(this, row, column);\n };\n if (\"aaa\".split(/a/).length === 0) {\n this.$split = function(text) {\n return text.replace(/\\r\\n|\\r/g, \"\\n\").split(\"\\n\");\n };\n } else {\n this.$split = function(text) {\n return text.split(/\\r\\n|\\r|\\n/);\n };\n }\n\n\n this.$detectNewLine = function(text) {\n var match = text.match(/^.*?(\\r\\n|\\r|\\n)/m);\n this.$autoNewLine = match ? match[1] : \"\\n\";\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineCharacter = function() {\n switch (this.$newLineMode) {\n case \"windows\":\n return \"\\r\\n\";\n case \"unix\":\n return \"\\n\";\n default:\n return this.$autoNewLine || \"\\n\";\n }\n };\n\n this.$autoNewLine = \"\";\n this.$newLineMode = \"auto\";\n this.setNewLineMode = function(newLineMode) {\n if (this.$newLineMode === newLineMode)\n return;\n\n this.$newLineMode = newLineMode;\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineMode = function() {\n return this.$newLineMode;\n };\n this.isNewLine = function(text) {\n return (text == \"\\r\\n\" || text == \"\\r\" || text == \"\\n\");\n };\n this.getLine = function(row) {\n return this.$lines[row] || \"\";\n };\n this.getLines = function(firstRow, lastRow) {\n return this.$lines.slice(firstRow, lastRow + 1);\n };\n this.getAllLines = function() {\n return this.getLines(0, this.getLength());\n };\n this.getLength = function() {\n return this.$lines.length;\n };\n this.getTextRange = function(range) {\n return this.getLinesForRange(range).join(this.getNewLineCharacter());\n };\n this.getLinesForRange = function(range) {\n var lines;\n if (range.start.row === range.end.row) {\n lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];\n } else {\n lines = this.getLines(range.start.row, range.end.row);\n lines[0] = (lines[0] || \"\").substring(range.start.column);\n var l = lines.length - 1;\n if (range.end.row - range.start.row == l)\n lines[l] = lines[l].substring(0, range.end.column);\n }\n return lines;\n };\n this.insertLines = function(row, lines) {\n console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\");\n return this.insertFullLines(row, lines);\n };\n this.removeLines = function(firstRow, lastRow) {\n console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\");\n return this.removeFullLines(firstRow, lastRow);\n };\n this.insertNewLine = function(position) {\n console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\");\n return this.insertMergedLines(position, [\"\", \"\"]);\n };\n this.insert = function(position, text) {\n if (this.getLength() <= 1)\n this.$detectNewLine(text);\n \n return this.insertMergedLines(position, this.$split(text));\n };\n this.insertInLine = function(position, text) {\n var start = this.clippedPos(position.row, position.column);\n var end = this.pos(position.row, position.column + text.length);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: [text]\n }, true);\n \n return this.clonePos(end);\n };\n \n this.clippedPos = function(row, column) {\n var length = this.getLength();\n if (row === undefined) {\n row = length;\n } else if (row < 0) {\n row = 0;\n } else if (row >= length) {\n row = length - 1;\n column = undefined;\n }\n var line = this.getLine(row);\n if (column == undefined)\n column = line.length;\n column = Math.min(Math.max(column, 0), line.length);\n return {row: row, column: column};\n };\n \n this.clonePos = function(pos) {\n return {row: pos.row, column: pos.column};\n };\n \n this.pos = function(row, column) {\n return {row: row, column: column};\n };\n \n this.$clipPosition = function(position) {\n var length = this.getLength();\n if (position.row >= length) {\n position.row = Math.max(0, length - 1);\n position.column = this.getLine(length - 1).length;\n } else {\n position.row = Math.max(0, position.row);\n position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);\n }\n return position;\n };\n this.insertFullLines = function(row, lines) {\n row = Math.min(Math.max(row, 0), this.getLength());\n var column = 0;\n if (row < this.getLength()) {\n lines = lines.concat([\"\"]);\n column = 0;\n } else {\n lines = [\"\"].concat(lines);\n row--;\n column = this.$lines[row].length;\n }\n this.insertMergedLines({row: row, column: column}, lines);\n }; \n this.insertMergedLines = function(position, lines) {\n var start = this.clippedPos(position.row, position.column);\n var end = {\n row: start.row + lines.length - 1,\n column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length\n };\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: lines\n });\n \n return this.clonePos(end);\n };\n this.remove = function(range) {\n var start = this.clippedPos(range.start.row, range.start.column);\n var end = this.clippedPos(range.end.row, range.end.column);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n });\n return this.clonePos(start);\n };\n this.removeInLine = function(row, startColumn, endColumn) {\n var start = this.clippedPos(row, startColumn);\n var end = this.clippedPos(row, endColumn);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n }, true);\n \n return this.clonePos(start);\n };\n this.removeFullLines = function(firstRow, lastRow) {\n firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);\n lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);\n var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;\n var deleteLastNewLine = lastRow < this.getLength() - 1;\n var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );\n var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );\n var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );\n var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); \n var range = new Range(startRow, startCol, endRow, endCol);\n var deletedLines = this.$lines.slice(firstRow, lastRow + 1);\n \n this.applyDelta({\n start: range.start,\n end: range.end,\n action: \"remove\",\n lines: this.getLinesForRange(range)\n });\n return deletedLines;\n };\n this.removeNewLine = function(row) {\n if (row < this.getLength() - 1 && row >= 0) {\n this.applyDelta({\n start: this.pos(row, this.getLine(row).length),\n end: this.pos(row + 1, 0),\n action: \"remove\",\n lines: [\"\", \"\"]\n });\n }\n };\n this.replace = function(range, text) {\n if (!(range instanceof Range))\n range = Range.fromPoints(range.start, range.end);\n if (text.length === 0 && range.isEmpty())\n return range.start;\n if (text == this.getTextRange(range))\n return range.end;\n\n this.remove(range);\n var end;\n if (text) {\n end = this.insert(range.start, text);\n }\n else {\n end = range.start;\n }\n \n return end;\n };\n this.applyDeltas = function(deltas) {\n for (var i=0; i<deltas.length; i++) {\n this.applyDelta(deltas[i]);\n }\n };\n this.revertDeltas = function(deltas) {\n for (var i=deltas.length-1; i>=0; i--) {\n this.revertDelta(deltas[i]);\n }\n };\n this.applyDelta = function(delta, doNotValidate) {\n var isInsert = delta.action == \"insert\";\n if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]\n : !Range.comparePoints(delta.start, delta.end)) {\n return;\n }\n \n if (isInsert && delta.lines.length > 20000)\n this.$splitAndapplyLargeDelta(delta, 20000);\n applyDelta(this.$lines, delta, doNotValidate);\n this._signal(\"change\", delta);\n };\n \n this.$splitAndapplyLargeDelta = function(delta, MAX) {\n var lines = delta.lines;\n var l = lines.length;\n var row = delta.start.row; \n var column = delta.start.column;\n var from = 0, to = 0;\n do {\n from = to;\n to += MAX - 1;\n var chunk = lines.slice(from, to);\n if (to > l) {\n delta.lines = chunk;\n delta.start.row = row + from;\n delta.start.column = column;\n break;\n }\n chunk.push(\"\");\n this.applyDelta({\n start: this.pos(row + from, column),\n end: this.pos(row + to, column = 0),\n action: delta.action,\n lines: chunk\n }, true);\n } while(true);\n };\n this.revertDelta = function(delta) {\n this.applyDelta({\n start: this.clonePos(delta.start),\n end: this.clonePos(delta.end),\n action: (delta.action == \"insert\" ? \"remove\" : \"insert\"),\n lines: delta.lines.slice()\n });\n };\n this.indexToPosition = function(index, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n for (var i = startRow || 0, l = lines.length; i < l; i++) {\n index -= lines[i].length + newlineLength;\n if (index < 0)\n return {row: i, column: index + lines[i].length + newlineLength};\n }\n return {row: l-1, column: lines[l-1].length};\n };\n this.positionToIndex = function(pos, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n var index = 0;\n var row = Math.min(pos.row, lines.length);\n for (var i = startRow || 0; i < row; ++i)\n index += lines[i].length + newlineLength;\n\n return index + pos.column;\n };\n\n}).call(Document.prototype);\n\nexports.Document = Document;\n});\n\nace.define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar BackgroundTokenizer = function(tokenizer, editor) {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.tokenizer = tokenizer;\n\n var self = this;\n\n this.$worker = function() {\n if (!self.running) { return; }\n\n var workerStart = new Date();\n var currentLine = self.currentLine;\n var endLine = -1;\n var doc = self.doc;\n\n var startLine = currentLine;\n while (self.lines[currentLine])\n currentLine++;\n \n var len = doc.getLength();\n var processedLines = 0;\n self.running = false;\n while (currentLine < len) {\n self.$tokenizeRow(currentLine);\n endLine = currentLine;\n do {\n currentLine++;\n } while (self.lines[currentLine]);\n processedLines ++;\n if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { \n self.running = setTimeout(self.$worker, 20);\n break;\n }\n }\n self.currentLine = currentLine;\n \n if (startLine <= endLine)\n self.fireUpdateEvent(startLine, endLine);\n };\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n this.setTokenizer = function(tokenizer) {\n this.tokenizer = tokenizer;\n this.lines = [];\n this.states = [];\n\n this.start(0);\n };\n this.setDocument = function(doc) {\n this.doc = doc;\n this.lines = [];\n this.states = [];\n\n this.stop();\n };\n this.fireUpdateEvent = function(firstRow, lastRow) {\n var data = {\n first: firstRow,\n last: lastRow\n };\n this._signal(\"update\", {data: data});\n };\n this.start = function(startRow) {\n this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());\n this.lines.splice(this.currentLine, this.lines.length);\n this.states.splice(this.currentLine, this.states.length);\n\n this.stop();\n this.running = setTimeout(this.$worker, 700);\n };\n \n this.scheduleStart = function() {\n if (!this.running)\n this.running = setTimeout(this.$worker, 700);\n }\n\n this.$updateOnChange = function(delta) {\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n this.lines[startRow] = null;\n } else if (delta.action == \"remove\") {\n this.lines.splice(startRow, len + 1, null);\n this.states.splice(startRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(startRow, 1);\n this.lines.splice.apply(this.lines, args);\n this.states.splice.apply(this.states, args);\n }\n\n this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());\n\n this.stop();\n };\n this.stop = function() {\n if (this.running)\n clearTimeout(this.running);\n this.running = false;\n };\n this.getTokens = function(row) {\n return this.lines[row] || this.$tokenizeRow(row);\n };\n this.getState = function(row) {\n if (this.currentLine == row)\n this.$tokenizeRow(row);\n return this.states[row] || \"start\";\n };\n\n this.$tokenizeRow = function(row) {\n var line = this.doc.getLine(row);\n var state = this.states[row - 1];\n\n var data = this.tokenizer.getLineTokens(line, state, row);\n\n if (this.states[row] + \"\" !== data.state + \"\") {\n this.states[row] = data.state;\n this.lines[row + 1] = null;\n if (this.currentLine > row + 1)\n this.currentLine = row + 1;\n } else if (this.currentLine == row) {\n this.currentLine = row + 1;\n }\n\n return this.lines[row] = data.tokens;\n };\n\n}).call(BackgroundTokenizer.prototype);\n\nexports.BackgroundTokenizer = BackgroundTokenizer;\n});\n\nace.define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar SearchHighlight = function(regExp, clazz, type) {\n this.setRegexp(regExp);\n this.clazz = clazz;\n this.type = type || \"text\";\n};\n\n(function() {\n this.MAX_RANGES = 500;\n \n this.setRegexp = function(regExp) {\n if (this.regExp+\"\" == regExp+\"\")\n return;\n this.regExp = regExp;\n this.cache = [];\n };\n\n this.update = function(html, markerLayer, session, config) {\n if (!this.regExp)\n return;\n var start = config.firstRow, end = config.lastRow;\n\n for (var i = start; i <= end; i++) {\n var ranges = this.cache[i];\n if (ranges == null) {\n ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);\n if (ranges.length > this.MAX_RANGES)\n ranges = ranges.slice(0, this.MAX_RANGES);\n ranges = ranges.map(function(match) {\n return new Range(i, match.offset, i, match.offset + match.length);\n });\n this.cache[i] = ranges.length ? ranges : \"\";\n }\n\n for (var j = ranges.length; j --; ) {\n markerLayer.drawSingleLineMarker(\n html, ranges[j].toScreenRange(session), this.clazz, config);\n }\n }\n };\n\n}).call(SearchHighlight.prototype);\n\nexports.SearchHighlight = SearchHighlight;\n});\n\nace.define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nfunction FoldLine(foldData, folds) {\n this.foldData = foldData;\n if (Array.isArray(folds)) {\n this.folds = folds;\n } else {\n folds = this.folds = [ folds ];\n }\n\n var last = folds[folds.length - 1];\n this.range = new Range(folds[0].start.row, folds[0].start.column,\n last.end.row, last.end.column);\n this.start = this.range.start;\n this.end = this.range.end;\n\n this.folds.forEach(function(fold) {\n fold.setFoldLine(this);\n }, this);\n}\n\n(function() {\n this.shiftRow = function(shift) {\n this.start.row += shift;\n this.end.row += shift;\n this.folds.forEach(function(fold) {\n fold.start.row += shift;\n fold.end.row += shift;\n });\n };\n\n this.addFold = function(fold) {\n if (fold.sameRow) {\n if (fold.start.row < this.startRow || fold.endRow > this.endRow) {\n throw new Error(\"Can't add a fold to this FoldLine as it has no connection\");\n }\n this.folds.push(fold);\n this.folds.sort(function(a, b) {\n return -a.range.compareEnd(b.start.row, b.start.column);\n });\n if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n } else if (fold.start.row == this.end.row) {\n this.folds.push(fold);\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (fold.end.row == this.start.row) {\n this.folds.unshift(fold);\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n } else {\n throw new Error(\"Trying to add fold to FoldRow that doesn't have a matching row\");\n }\n fold.foldLine = this;\n };\n\n this.containsRow = function(row) {\n return row >= this.start.row && row <= this.end.row;\n };\n\n this.walk = function(callback, endRow, endColumn) {\n var lastEnd = 0,\n folds = this.folds,\n fold,\n cmp, stop, isNewRow = true;\n\n if (endRow == null) {\n endRow = this.end.row;\n endColumn = this.end.column;\n }\n\n for (var i = 0; i < folds.length; i++) {\n fold = folds[i];\n\n cmp = fold.range.compareStart(endRow, endColumn);\n if (cmp == -1) {\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n return;\n }\n\n stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);\n stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);\n if (stop || cmp === 0) {\n return;\n }\n isNewRow = !fold.sameRow;\n lastEnd = fold.end.column;\n }\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n };\n\n this.getNextFoldTo = function(row, column) {\n var fold, cmp;\n for (var i = 0; i < this.folds.length; i++) {\n fold = this.folds[i];\n cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n return {\n fold: fold,\n kind: \"after\"\n };\n } else if (cmp === 0) {\n return {\n fold: fold,\n kind: \"inside\"\n };\n }\n }\n return null;\n };\n\n this.addRemoveChars = function(row, column, len) {\n var ret = this.getNextFoldTo(row, column),\n fold, folds;\n if (ret) {\n fold = ret.fold;\n if (ret.kind == \"inside\"\n && fold.start.column != column\n && fold.start.row != row)\n {\n window.console && window.console.log(row, column, fold);\n } else if (fold.start.row == row) {\n folds = this.folds;\n var i = folds.indexOf(fold);\n if (i === 0) {\n this.start.column += len;\n }\n for (i; i < folds.length; i++) {\n fold = folds[i];\n fold.start.column += len;\n if (!fold.sameRow) {\n return;\n }\n fold.end.column += len;\n }\n this.end.column += len;\n }\n }\n };\n\n this.split = function(row, column) {\n var pos = this.getNextFoldTo(row, column);\n \n if (!pos || pos.kind == \"inside\")\n return null;\n \n var fold = pos.fold;\n var folds = this.folds;\n var foldData = this.foldData;\n \n var i = folds.indexOf(fold);\n var foldBefore = folds[i - 1];\n this.end.row = foldBefore.end.row;\n this.end.column = foldBefore.end.column;\n folds = folds.splice(i, folds.length - i);\n\n var newFoldLine = new FoldLine(foldData, folds);\n foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);\n return newFoldLine;\n };\n\n this.merge = function(foldLineNext) {\n var folds = foldLineNext.folds;\n for (var i = 0; i < folds.length; i++) {\n this.addFold(folds[i]);\n }\n var foldData = this.foldData;\n foldData.splice(foldData.indexOf(foldLineNext), 1);\n };\n\n this.toString = function() {\n var ret = [this.range.toString() + \": [\" ];\n\n this.folds.forEach(function(fold) {\n ret.push(\" \" + fold.toString());\n });\n ret.push(\"]\");\n return ret.join(\"\\n\");\n };\n\n this.idxToPosition = function(idx) {\n var lastFoldEndColumn = 0;\n\n for (var i = 0; i < this.folds.length; i++) {\n var fold = this.folds[i];\n\n idx -= fold.start.column - lastFoldEndColumn;\n if (idx < 0) {\n return {\n row: fold.start.row,\n column: fold.start.column + idx\n };\n }\n\n idx -= fold.placeholder.length;\n if (idx < 0) {\n return fold.start;\n }\n\n lastFoldEndColumn = fold.end.column;\n }\n\n return {\n row: this.end.row,\n column: this.end.column + idx\n };\n };\n}).call(FoldLine.prototype);\n\nexports.FoldLine = FoldLine;\n});\n\nace.define(\"ace/range_list\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar Range = acequire(\"./range\").Range;\nvar comparePoints = Range.comparePoints;\n\nvar RangeList = function() {\n this.ranges = [];\n};\n\n(function() {\n this.comparePoints = comparePoints;\n\n this.pointIndex = function(pos, excludeEdges, startIndex) {\n var list = this.ranges;\n\n for (var i = startIndex || 0; i < list.length; i++) {\n var range = list[i];\n var cmpEnd = comparePoints(pos, range.end);\n if (cmpEnd > 0)\n continue;\n var cmpStart = comparePoints(pos, range.start);\n if (cmpEnd === 0)\n return excludeEdges && cmpStart !== 0 ? -i-2 : i;\n if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))\n return i;\n\n return -i-1;\n }\n return -i - 1;\n };\n\n this.add = function(range) {\n var excludeEdges = !range.isEmpty();\n var startIndex = this.pointIndex(range.start, excludeEdges);\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n\n var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);\n\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n else\n endIndex++;\n return this.ranges.splice(startIndex, endIndex - startIndex, range);\n };\n\n this.addList = function(list) {\n var removed = [];\n for (var i = list.length; i--; ) {\n removed.push.apply(removed, this.add(list[i]));\n }\n return removed;\n };\n\n this.substractPoint = function(pos) {\n var i = this.pointIndex(pos);\n\n if (i >= 0)\n return this.ranges.splice(i, 1);\n };\n this.merge = function() {\n var removed = [];\n var list = this.ranges;\n \n list = list.sort(function(a, b) {\n return comparePoints(a.start, b.start);\n });\n \n var next = list[0], range;\n for (var i = 1; i < list.length; i++) {\n range = next;\n next = list[i];\n var cmp = comparePoints(range.end, next.start);\n if (cmp < 0)\n continue;\n\n if (cmp == 0 && !range.isEmpty() && !next.isEmpty())\n continue;\n\n if (comparePoints(range.end, next.end) < 0) {\n range.end.row = next.end.row;\n range.end.column = next.end.column;\n }\n\n list.splice(i, 1);\n removed.push(next);\n next = range;\n i--;\n }\n \n this.ranges = list;\n\n return removed;\n };\n\n this.contains = function(row, column) {\n return this.pointIndex({row: row, column: column}) >= 0;\n };\n\n this.containsPoint = function(pos) {\n return this.pointIndex(pos) >= 0;\n };\n\n this.rangeAtPoint = function(pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges[i];\n };\n\n\n this.clipRows = function(startRow, endRow) {\n var list = this.ranges;\n if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)\n return [];\n\n var startIndex = this.pointIndex({row: startRow, column: 0});\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n\n var clipped = [];\n for (var i = startIndex; i < endIndex; i++) {\n clipped.push(list[i]);\n }\n return clipped;\n };\n\n this.removeAll = function() {\n return this.ranges.splice(0, this.ranges.length);\n };\n\n this.attach = function(session) {\n if (this.session)\n this.detach();\n\n this.session = session;\n this.onChange = this.$onChange.bind(this);\n\n this.session.on('change', this.onChange);\n };\n\n this.detach = function() {\n if (!this.session)\n return;\n this.session.removeListener('change', this.onChange);\n this.session = null;\n };\n\n this.$onChange = function(delta) {\n if (delta.action == \"insert\"){\n var start = delta.start;\n var end = delta.end;\n } else {\n var end = delta.start;\n var start = delta.end;\n }\n var startRow = start.row;\n var endRow = end.row;\n var lineDif = endRow - startRow;\n\n var colDiff = -start.column + end.column;\n var ranges = this.ranges;\n\n for (var i = 0, n = ranges.length; i < n; i++) {\n var r = ranges[i];\n if (r.end.row < startRow)\n continue;\n if (r.start.row > startRow)\n break;\n\n if (r.start.row == startRow && r.start.column >= start.column ) {\n if (r.start.column == start.column && this.$insertRight) {\n } else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n if (r.end.row == startRow && r.end.column >= start.column) {\n if (r.end.column == start.column && this.$insertRight) {\n continue;\n }\n if (r.end.column == start.column && colDiff > 0 && i < n - 1) { \n if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)\n r.end.column -= colDiff;\n }\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n\n if (lineDif != 0 && i < n) {\n for (; i < n; i++) {\n var r = ranges[i];\n r.start.row += lineDif;\n r.end.row += lineDif;\n }\n }\n };\n\n}).call(RangeList.prototype);\n\nexports.RangeList = RangeList;\n});\n\nace.define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/range_list\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar RangeList = acequire(\"../range_list\").RangeList;\nvar oop = acequire(\"../lib/oop\")\nvar Fold = exports.Fold = function(range, placeholder) {\n this.foldLine = null;\n this.placeholder = placeholder;\n this.range = range;\n this.start = range.start;\n this.end = range.end;\n\n this.sameRow = range.start.row == range.end.row;\n this.subFolds = this.ranges = [];\n};\n\noop.inherits(Fold, RangeList);\n\n(function() {\n\n this.toString = function() {\n return '\"' + this.placeholder + '\" ' + this.range.toString();\n };\n\n this.setFoldLine = function(foldLine) {\n this.foldLine = foldLine;\n this.subFolds.forEach(function(fold) {\n fold.setFoldLine(foldLine);\n });\n };\n\n this.clone = function() {\n var range = this.range.clone();\n var fold = new Fold(range, this.placeholder);\n this.subFolds.forEach(function(subFold) {\n fold.subFolds.push(subFold.clone());\n });\n fold.collapseChildren = this.collapseChildren;\n return fold;\n };\n\n this.addSubFold = function(fold) {\n if (this.range.isEqual(fold))\n return;\n\n if (!this.range.containsRange(fold))\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n consumeRange(fold, this.start);\n\n var row = fold.start.row, column = fold.start.column;\n for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {\n cmp = this.subFolds[i].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterStart = this.subFolds[i];\n\n if (cmp == 0)\n return afterStart.addSubFold(fold);\n var row = fold.range.end.row, column = fold.range.end.column;\n for (var j = i, cmp = -1; j < this.subFolds.length; j++) {\n cmp = this.subFolds[j].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterEnd = this.subFolds[j];\n\n if (cmp == 0)\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n\n var consumedFolds = this.subFolds.splice(i, j - i, fold);\n fold.setFoldLine(this.foldLine);\n\n return fold;\n };\n \n this.restoreRange = function(range) {\n return restoreRange(range, this.start);\n };\n\n}).call(Fold.prototype);\n\nfunction consumePoint(point, anchor) {\n point.row -= anchor.row;\n if (point.row == 0)\n point.column -= anchor.column;\n}\nfunction consumeRange(range, anchor) {\n consumePoint(range.start, anchor);\n consumePoint(range.end, anchor);\n}\nfunction restorePoint(point, anchor) {\n if (point.row == 0)\n point.column += anchor.column;\n point.row += anchor.row;\n}\nfunction restoreRange(range, anchor) {\n restorePoint(range.start, anchor);\n restorePoint(range.end, anchor);\n}\n\n});\n\nace.define(\"ace/edit_session/folding\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/edit_session/fold_line\",\"ace/edit_session/fold\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar FoldLine = acequire(\"./fold_line\").FoldLine;\nvar Fold = acequire(\"./fold\").Fold;\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\n\nfunction Folding() {\n this.getFoldAt = function(row, column, side) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var folds = foldLine.folds;\n for (var i = 0; i < folds.length; i++) {\n var fold = folds[i];\n if (fold.range.contains(row, column)) {\n if (side == 1 && fold.range.isEnd(row, column)) {\n continue;\n } else if (side == -1 && fold.range.isStart(row, column)) {\n continue;\n }\n return fold;\n }\n }\n };\n this.getFoldsInRange = function(range) {\n var start = range.start;\n var end = range.end;\n var foldLines = this.$foldData;\n var foundFolds = [];\n\n start.column += 1;\n end.column -= 1;\n\n for (var i = 0; i < foldLines.length; i++) {\n var cmp = foldLines[i].range.compareRange(range);\n if (cmp == 2) {\n continue;\n }\n else if (cmp == -2) {\n break;\n }\n\n var folds = foldLines[i].folds;\n for (var j = 0; j < folds.length; j++) {\n var fold = folds[j];\n cmp = fold.range.compareRange(range);\n if (cmp == -2) {\n break;\n } else if (cmp == 2) {\n continue;\n } else\n if (cmp == 42) {\n break;\n }\n foundFolds.push(fold);\n }\n }\n start.column -= 1;\n end.column += 1;\n\n return foundFolds;\n };\n\n this.getFoldsInRangeList = function(ranges) {\n if (Array.isArray(ranges)) {\n var folds = [];\n ranges.forEach(function(range) {\n folds = folds.concat(this.getFoldsInRange(range));\n }, this);\n } else {\n var folds = this.getFoldsInRange(ranges);\n }\n return folds;\n };\n this.getAllFolds = function() {\n var folds = [];\n var foldLines = this.$foldData;\n \n for (var i = 0; i < foldLines.length; i++)\n for (var j = 0; j < foldLines[i].folds.length; j++)\n folds.push(foldLines[i].folds[j]);\n\n return folds;\n };\n this.getFoldStringAt = function(row, column, trim, foldLine) {\n foldLine = foldLine || this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var lastFold = {\n end: { column: 0 }\n };\n var str, fold;\n for (var i = 0; i < foldLine.folds.length; i++) {\n fold = foldLine.folds[i];\n var cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n str = this\n .getLine(fold.start.row)\n .substring(lastFold.end.column, fold.start.column);\n break;\n }\n else if (cmp === 0) {\n return null;\n }\n lastFold = fold;\n }\n if (!str)\n str = this.getLine(fold.start.row).substring(lastFold.end.column);\n\n if (trim == -1)\n return str.substring(0, column - lastFold.end.column);\n else if (trim == 1)\n return str.substring(column - lastFold.end.column);\n else\n return str;\n };\n\n this.getFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {\n return foldLine;\n } else if (foldLine.end.row > docRow) {\n return null;\n }\n }\n return null;\n };\n this.getNextFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.end.row >= docRow) {\n return foldLine;\n }\n }\n return null;\n };\n\n this.getFoldedRowCount = function(first, last) {\n var foldData = this.$foldData, rowCount = last-first+1;\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i],\n end = foldLine.end.row,\n start = foldLine.start.row;\n if (end >= last) {\n if (start < last) {\n if (start >= first)\n rowCount -= last-start;\n else\n rowCount = 0; // in one fold\n }\n break;\n } else if (end >= first){\n if (start >= first) // fold inside range\n rowCount -= end-start;\n else\n rowCount -= end-first+1;\n }\n }\n return rowCount;\n };\n\n this.$addFoldLine = function(foldLine) {\n this.$foldData.push(foldLine);\n this.$foldData.sort(function(a, b) {\n return a.start.row - b.start.row;\n });\n return foldLine;\n };\n this.addFold = function(placeholder, range) {\n var foldData = this.$foldData;\n var added = false;\n var fold;\n \n if (placeholder instanceof Fold)\n fold = placeholder;\n else {\n fold = new Fold(range, placeholder);\n fold.collapseChildren = range.collapseChildren;\n }\n this.$clipRangeToDocument(fold.range);\n\n var startRow = fold.start.row;\n var startColumn = fold.start.column;\n var endRow = fold.end.row;\n var endColumn = fold.end.column;\n if (!(startRow < endRow || \n startRow == endRow && startColumn <= endColumn - 2))\n throw new Error(\"The range has to be at least 2 characters width\");\n\n var startFold = this.getFoldAt(startRow, startColumn, 1);\n var endFold = this.getFoldAt(endRow, endColumn, -1);\n if (startFold && endFold == startFold)\n return startFold.addSubFold(fold);\n\n if (startFold && !startFold.range.isStart(startRow, startColumn))\n this.removeFold(startFold);\n \n if (endFold && !endFold.range.isEnd(endRow, endColumn))\n this.removeFold(endFold);\n var folds = this.getFoldsInRange(fold.range);\n if (folds.length > 0) {\n this.removeFolds(folds);\n folds.forEach(function(subFold) {\n fold.addSubFold(subFold);\n });\n }\n\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (endRow == foldLine.start.row) {\n foldLine.addFold(fold);\n added = true;\n break;\n } else if (startRow == foldLine.end.row) {\n foldLine.addFold(fold);\n added = true;\n if (!fold.sameRow) {\n var foldLineNext = foldData[i + 1];\n if (foldLineNext && foldLineNext.start.row == endRow) {\n foldLine.merge(foldLineNext);\n break;\n }\n }\n break;\n } else if (endRow <= foldLine.start.row) {\n break;\n }\n }\n\n if (!added)\n foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));\n\n if (this.$useWrapMode)\n this.$updateWrapData(foldLine.start.row, foldLine.start.row);\n else\n this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"add\" });\n\n return fold;\n };\n\n this.addFolds = function(folds) {\n folds.forEach(function(fold) {\n this.addFold(fold);\n }, this);\n };\n\n this.removeFold = function(fold) {\n var foldLine = fold.foldLine;\n var startRow = foldLine.start.row;\n var endRow = foldLine.end.row;\n\n var foldLines = this.$foldData;\n var folds = foldLine.folds;\n if (folds.length == 1) {\n foldLines.splice(foldLines.indexOf(foldLine), 1);\n } else\n if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {\n folds.pop();\n foldLine.end.row = folds[folds.length - 1].end.row;\n foldLine.end.column = folds[folds.length - 1].end.column;\n } else\n if (foldLine.range.isStart(fold.start.row, fold.start.column)) {\n folds.shift();\n foldLine.start.row = folds[0].start.row;\n foldLine.start.column = folds[0].start.column;\n } else\n if (fold.sameRow) {\n folds.splice(folds.indexOf(fold), 1);\n } else\n {\n var newFoldLine = foldLine.split(fold.start.row, fold.start.column);\n folds = newFoldLine.folds;\n folds.shift();\n newFoldLine.start.row = folds[0].start.row;\n newFoldLine.start.column = folds[0].start.column;\n }\n\n if (!this.$updating) {\n if (this.$useWrapMode)\n this.$updateWrapData(startRow, endRow);\n else\n this.$updateRowLengthCache(startRow, endRow);\n }\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"remove\" });\n };\n\n this.removeFolds = function(folds) {\n var cloneFolds = [];\n for (var i = 0; i < folds.length; i++) {\n cloneFolds.push(folds[i]);\n }\n\n cloneFolds.forEach(function(fold) {\n this.removeFold(fold);\n }, this);\n this.$modified = true;\n };\n\n this.expandFold = function(fold) {\n this.removeFold(fold);\n fold.subFolds.forEach(function(subFold) {\n fold.restoreRange(subFold);\n this.addFold(subFold);\n }, this);\n if (fold.collapseChildren > 0) {\n this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1);\n }\n fold.subFolds = [];\n };\n\n this.expandFolds = function(folds) {\n folds.forEach(function(fold) {\n this.expandFold(fold);\n }, this);\n };\n\n this.unfold = function(location, expandInner) {\n var range, folds;\n if (location == null) {\n range = new Range(0, 0, this.getLength(), 0);\n expandInner = true;\n } else if (typeof location == \"number\")\n range = new Range(location, 0, location, this.getLine(location).length);\n else if (\"row\" in location)\n range = Range.fromPoints(location, location);\n else\n range = location;\n \n folds = this.getFoldsInRangeList(range);\n if (expandInner) {\n this.removeFolds(folds);\n } else {\n var subFolds = folds;\n while (subFolds.length) {\n this.expandFolds(subFolds);\n subFolds = this.getFoldsInRangeList(range);\n }\n }\n if (folds.length)\n return folds;\n };\n this.isRowFolded = function(docRow, startFoldRow) {\n return !!this.getFoldLine(docRow, startFoldRow);\n };\n\n this.getRowFoldEnd = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.end.row : docRow;\n };\n\n this.getRowFoldStart = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.start.row : docRow;\n };\n\n this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {\n if (startRow == null)\n startRow = foldLine.start.row;\n if (startColumn == null)\n startColumn = 0;\n if (endRow == null)\n endRow = foldLine.end.row;\n if (endColumn == null)\n endColumn = this.getLine(endRow).length;\n var doc = this.doc;\n var textLine = \"\";\n\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n if (row < startRow)\n return;\n if (row == startRow) {\n if (column < startColumn)\n return;\n lastColumn = Math.max(startColumn, lastColumn);\n }\n\n if (placeholder != null) {\n textLine += placeholder;\n } else {\n textLine += doc.getLine(row).substring(lastColumn, column);\n }\n }, endRow, endColumn);\n return textLine;\n };\n\n this.getDisplayLine = function(row, endColumn, startRow, startColumn) {\n var foldLine = this.getFoldLine(row);\n\n if (!foldLine) {\n var line;\n line = this.doc.getLine(row);\n return line.substring(startColumn || 0, endColumn || line.length);\n } else {\n return this.getFoldDisplayLine(\n foldLine, row, endColumn, startRow, startColumn);\n }\n };\n\n this.$cloneFoldData = function() {\n var fd = [];\n fd = this.$foldData.map(function(foldLine) {\n var folds = foldLine.folds.map(function(fold) {\n return fold.clone();\n });\n return new FoldLine(fd, folds);\n });\n\n return fd;\n };\n\n this.toggleFold = function(tryToUnfold) {\n var selection = this.selection;\n var range = selection.getRange();\n var fold;\n var bracketPos;\n\n if (range.isEmpty()) {\n var cursor = range.start;\n fold = this.getFoldAt(cursor.row, cursor.column);\n\n if (fold) {\n this.expandFold(fold);\n return;\n } else if (bracketPos = this.findMatchingBracket(cursor)) {\n if (range.comparePoint(bracketPos) == 1) {\n range.end = bracketPos;\n } else {\n range.start = bracketPos;\n range.start.column++;\n range.end.column--;\n }\n } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {\n if (range.comparePoint(bracketPos) == 1)\n range.end = bracketPos;\n else\n range.start = bracketPos;\n\n range.start.column++;\n } else {\n range = this.getCommentFoldRange(cursor.row, cursor.column) || range;\n }\n } else {\n var folds = this.getFoldsInRange(range);\n if (tryToUnfold && folds.length) {\n this.expandFolds(folds);\n return;\n } else if (folds.length == 1 ) {\n fold = folds[0];\n }\n }\n\n if (!fold)\n fold = this.getFoldAt(range.start.row, range.start.column);\n\n if (fold && fold.range.toString() == range.toString()) {\n this.expandFold(fold);\n return;\n }\n\n var placeholder = \"...\";\n if (!range.isMultiLine()) {\n placeholder = this.getTextRange(range);\n if (placeholder.length < 4)\n return;\n placeholder = placeholder.trim().substring(0, 2) + \"..\";\n }\n\n this.addFold(placeholder, range);\n };\n\n this.getCommentFoldRange = function(row, column, dir) {\n var iterator = new TokenIterator(this, row, column);\n var token = iterator.getCurrentToken();\n if (token && /^comment|string/.test(token.type)) {\n var range = new Range();\n var re = new RegExp(token.type.replace(/\\..*/, \"\\\\.\"));\n if (dir != 1) {\n do {\n token = iterator.stepBackward();\n } while (token && re.test(token.type));\n iterator.stepForward();\n }\n \n range.start.row = iterator.getCurrentTokenRow();\n range.start.column = iterator.getCurrentTokenColumn() + 2;\n\n iterator = new TokenIterator(this, row, column);\n \n if (dir != -1) {\n do {\n token = iterator.stepForward();\n } while (token && re.test(token.type));\n token = iterator.stepBackward();\n } else\n token = iterator.getCurrentToken();\n\n range.end.row = iterator.getCurrentTokenRow();\n range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;\n return range;\n }\n };\n\n this.foldAll = function(startRow, endRow, depth) {\n if (depth == undefined)\n depth = 100000; // JSON.stringify doesn't hanle Infinity\n var foldWidgets = this.foldWidgets;\n if (!foldWidgets)\n return; // mode doesn't support folding\n endRow = endRow || this.getLength();\n startRow = startRow || 0;\n for (var row = startRow; row < endRow; row++) {\n if (foldWidgets[row] == null)\n foldWidgets[row] = this.getFoldWidget(row);\n if (foldWidgets[row] != \"start\")\n continue;\n\n var range = this.getFoldWidgetRange(row);\n if (range && range.isMultiLine()\n && range.end.row <= endRow\n && range.start.row >= startRow\n ) {\n row = range.end.row;\n try {\n var fold = this.addFold(\"...\", range);\n if (fold)\n fold.collapseChildren = depth;\n } catch(e) {}\n }\n }\n };\n this.$foldStyles = {\n \"manual\": 1,\n \"markbegin\": 1,\n \"markbeginend\": 1\n };\n this.$foldStyle = \"markbegin\";\n this.setFoldStyle = function(style) {\n if (!this.$foldStyles[style])\n throw new Error(\"invalid fold style: \" + style + \"[\" + Object.keys(this.$foldStyles).join(\", \") + \"]\");\n \n if (this.$foldStyle == style)\n return;\n\n this.$foldStyle = style;\n \n if (style == \"manual\")\n this.unfold();\n var mode = this.$foldMode;\n this.$setFolding(null);\n this.$setFolding(mode);\n };\n\n this.$setFolding = function(foldMode) {\n if (this.$foldMode == foldMode)\n return;\n \n this.$foldMode = foldMode;\n \n this.off('change', this.$updateFoldWidgets);\n this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n this._signal(\"changeAnnotation\");\n \n if (!foldMode || this.$foldStyle == \"manual\") {\n this.foldWidgets = null;\n return;\n }\n \n this.foldWidgets = [];\n this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);\n this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);\n \n this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);\n this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);\n this.on('change', this.$updateFoldWidgets);\n this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n };\n\n this.getParentFoldRangeData = function (row, ignoreCurrent) {\n var fw = this.foldWidgets;\n if (!fw || (ignoreCurrent && fw[row]))\n return {};\n\n var i = row - 1, firstRange;\n while (i >= 0) {\n var c = fw[i];\n if (c == null)\n c = fw[i] = this.getFoldWidget(i);\n\n if (c == \"start\") {\n var range = this.getFoldWidgetRange(i);\n if (!firstRange)\n firstRange = range;\n if (range && range.end.row >= row)\n break;\n }\n i--;\n }\n\n return {\n range: i !== -1 && range,\n firstRange: firstRange\n };\n };\n\n this.onFoldWidgetClick = function(row, e) {\n e = e.domEvent;\n var options = {\n children: e.shiftKey,\n all: e.ctrlKey || e.metaKey,\n siblings: e.altKey\n };\n \n var range = this.$toggleFoldWidget(row, options);\n if (!range) {\n var el = (e.target || e.srcElement);\n if (el && /ace_fold-widget/.test(el.className))\n el.className += \" ace_invalid\";\n }\n };\n \n this.$toggleFoldWidget = function(row, options) {\n if (!this.getFoldWidget)\n return;\n var type = this.getFoldWidget(row);\n var line = this.getLine(row);\n\n var dir = type === \"end\" ? -1 : 1;\n var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);\n\n if (fold) {\n if (options.children || options.all)\n this.removeFold(fold);\n else\n this.expandFold(fold);\n return fold;\n }\n\n var range = this.getFoldWidgetRange(row, true);\n if (range && !range.isMultiLine()) {\n fold = this.getFoldAt(range.start.row, range.start.column, 1);\n if (fold && range.isEqual(fold.range)) {\n this.removeFold(fold);\n return fold;\n }\n }\n \n if (options.siblings) {\n var data = this.getParentFoldRangeData(row);\n if (data.range) {\n var startRow = data.range.start.row + 1;\n var endRow = data.range.end.row;\n }\n this.foldAll(startRow, endRow, options.all ? 10000 : 0);\n } else if (options.children) {\n endRow = range ? range.end.row : this.getLength();\n this.foldAll(row + 1, endRow, options.all ? 10000 : 0);\n } else if (range) {\n if (options.all) \n range.collapseChildren = 10000;\n this.addFold(\"...\", range);\n }\n \n return range;\n };\n \n \n \n this.toggleFoldWidget = function(toggleParent) {\n var row = this.selection.getCursor().row;\n row = this.getRowFoldStart(row);\n var range = this.$toggleFoldWidget(row, {});\n \n if (range)\n return;\n var data = this.getParentFoldRangeData(row, true);\n range = data.range || data.firstRange;\n \n if (range) {\n row = range.start.row;\n var fold = this.getFoldAt(row, this.getLine(row).length, 1);\n\n if (fold) {\n this.removeFold(fold);\n } else {\n this.addFold(\"...\", range);\n }\n }\n };\n\n this.updateFoldWidgets = function(delta) {\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n\n if (len === 0) {\n this.foldWidgets[firstRow] = null;\n } else if (delta.action == 'remove') {\n this.foldWidgets.splice(firstRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(firstRow, 1);\n this.foldWidgets.splice.apply(this.foldWidgets, args);\n }\n };\n this.tokenizerUpdateFoldWidgets = function(e) {\n var rows = e.data;\n if (rows.first != rows.last) {\n if (this.foldWidgets.length > rows.first)\n this.foldWidgets.splice(rows.first, this.foldWidgets.length);\n }\n };\n}\n\nexports.Folding = Folding;\n\n});\n\nace.define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\n\nfunction BracketMatch() {\n\n this.findMatchingBracket = function(position, chr) {\n if (position.column == 0) return null;\n\n var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1);\n if (charBeforeCursor == \"\") return null;\n\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match)\n return null;\n\n if (match[1])\n return this.$findClosingBracket(match[1], position);\n else\n return this.$findOpeningBracket(match[2], position);\n };\n \n this.getBracketRange = function(pos) {\n var line = this.getLine(pos.row);\n var before = true, range;\n\n var chr = line.charAt(pos.column-1);\n var match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) {\n chr = line.charAt(pos.column);\n pos = {row: pos.row, column: pos.column + 1};\n match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n before = false;\n }\n if (!match)\n return null;\n\n if (match[1]) {\n var bracketPos = this.$findClosingBracket(match[1], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(pos, bracketPos);\n if (!before) {\n range.end.column++;\n range.start.column--;\n }\n range.cursor = range.end;\n } else {\n var bracketPos = this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(bracketPos, pos);\n if (!before) {\n range.start.column++;\n range.end.column--;\n }\n range.cursor = range.start;\n }\n \n return range;\n };\n\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\"\n };\n\n this.$findOpeningBracket = function(bracket, position, typeRe) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n \n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"rparen\", \".paren\")\n .replace(/\\b(?:end)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n \n while (true) {\n \n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n if (chr == openBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex -= 1;\n }\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n \n value = token.value;\n valueIndex = value.length - 1;\n }\n \n return null;\n };\n\n this.$findClosingBracket = function(bracket, position, typeRe) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n\n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"lparen\", \".paren\")\n .replace(/\\b(?:start|begin)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n\n while (true) {\n\n var value = token.value;\n var valueLength = value.length;\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n if (chr == closingBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex += 1;\n }\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n\n valueIndex = 0;\n }\n \n return null;\n };\n}\nexports.BracketMatch = BracketMatch;\n\n});\n\nace.define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/config\",\"ace/lib/event_emitter\",\"ace/selection\",\"ace/mode/text\",\"ace/range\",\"ace/document\",\"ace/background_tokenizer\",\"ace/search_highlight\",\"ace/edit_session/folding\",\"ace/edit_session/bracket_match\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar config = acequire(\"./config\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Selection = acequire(\"./selection\").Selection;\nvar TextMode = acequire(\"./mode/text\").Mode;\nvar Range = acequire(\"./range\").Range;\nvar Document = acequire(\"./document\").Document;\nvar BackgroundTokenizer = acequire(\"./background_tokenizer\").BackgroundTokenizer;\nvar SearchHighlight = acequire(\"./search_highlight\").SearchHighlight;\n\nvar EditSession = function(text, mode) {\n this.$breakpoints = [];\n this.$decorations = [];\n this.$frontMarkers = {};\n this.$backMarkers = {};\n this.$markerId = 1;\n this.$undoSelect = true;\n\n this.$foldData = [];\n this.id = \"session\" + (++EditSession.$uid);\n this.$foldData.toString = function() {\n return this.join(\"\\n\");\n };\n this.on(\"changeFold\", this.onChangeFold.bind(this));\n this.$onChange = this.onChange.bind(this);\n\n if (typeof text != \"object\" || !text.getLine)\n text = new Document(text);\n\n this.setDocument(text);\n this.selection = new Selection(this);\n\n config.resetOptions(this);\n this.setMode(mode);\n config._signal(\"session\", this);\n};\n\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setDocument = function(doc) {\n if (this.doc)\n this.doc.removeListener(\"change\", this.$onChange);\n\n this.doc = doc;\n doc.on(\"change\", this.$onChange);\n\n if (this.bgTokenizer)\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.resetCaches();\n };\n this.getDocument = function() {\n return this.doc;\n };\n this.$resetRowCache = function(docRow) {\n if (!docRow) {\n this.$docRowCache = [];\n this.$screenRowCache = [];\n return;\n }\n var l = this.$docRowCache.length;\n var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;\n if (l > i) {\n this.$docRowCache.splice(i, l);\n this.$screenRowCache.splice(i, l);\n }\n };\n\n this.$getRowCacheIndex = function(cacheArray, val) {\n var low = 0;\n var hi = cacheArray.length - 1;\n\n while (low <= hi) {\n var mid = (low + hi) >> 1;\n var c = cacheArray[mid];\n\n if (val > c)\n low = mid + 1;\n else if (val < c)\n hi = mid - 1;\n else\n return mid;\n }\n\n return low -1;\n };\n\n this.resetCaches = function() {\n this.$modified = true;\n this.$wrapData = [];\n this.$rowLengthCache = [];\n this.$resetRowCache(0);\n if (this.bgTokenizer)\n this.bgTokenizer.start(0);\n };\n\n this.onChangeFold = function(e) {\n var fold = e.data;\n this.$resetRowCache(fold.start.row);\n };\n\n this.onChange = function(delta) {\n this.$modified = true;\n\n this.$resetRowCache(delta.start.row);\n\n var removedFolds = this.$updateInternalDataOnChange(delta);\n if (!this.$fromUndo && this.$undoManager && !delta.ignore) {\n this.$deltasDoc.push(delta);\n if (removedFolds && removedFolds.length != 0) {\n this.$deltasFold.push({\n action: \"removeFolds\",\n folds: removedFolds\n });\n }\n\n this.$informUndoManager.schedule();\n }\n\n this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta);\n this._signal(\"change\", delta);\n };\n this.setValue = function(text) {\n this.doc.setValue(text);\n this.selection.moveTo(0, 0);\n\n this.$resetRowCache(0);\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n this.setUndoManager(this.$undoManager);\n this.getUndoManager().reset();\n };\n this.getValue =\n this.toString = function() {\n return this.doc.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.getState = function(row) {\n return this.bgTokenizer.getState(row);\n };\n this.getTokens = function(row) {\n return this.bgTokenizer.getTokens(row);\n };\n this.getTokenAt = function(row, column) {\n var tokens = this.bgTokenizer.getTokens(row);\n var token, c = 0;\n if (column == null) {\n i = tokens.length - 1;\n c = this.getLine(row).length;\n } else {\n for (var i = 0; i < tokens.length; i++) {\n c += tokens[i].value.length;\n if (c >= column)\n break;\n }\n }\n token = tokens[i];\n if (!token)\n return null;\n token.index = i;\n token.start = c - token.value.length;\n return token;\n };\n this.setUndoManager = function(undoManager) {\n this.$undoManager = undoManager;\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n\n if (this.$informUndoManager)\n this.$informUndoManager.cancel();\n\n if (undoManager) {\n var self = this;\n\n this.$syncInformUndoManager = function() {\n self.$informUndoManager.cancel();\n\n if (self.$deltasFold.length) {\n self.$deltas.push({\n group: \"fold\",\n deltas: self.$deltasFold\n });\n self.$deltasFold = [];\n }\n\n if (self.$deltasDoc.length) {\n self.$deltas.push({\n group: \"doc\",\n deltas: self.$deltasDoc\n });\n self.$deltasDoc = [];\n }\n\n if (self.$deltas.length > 0) {\n undoManager.execute({\n action: \"aceupdate\",\n args: [self.$deltas, self],\n merge: self.mergeUndoDeltas\n });\n }\n self.mergeUndoDeltas = false;\n self.$deltas = [];\n };\n this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);\n }\n };\n this.markUndoGroup = function() {\n if (this.$syncInformUndoManager)\n this.$syncInformUndoManager();\n };\n \n this.$defaultUndoManager = {\n undo: function() {},\n redo: function() {},\n reset: function() {}\n };\n this.getUndoManager = function() {\n return this.$undoManager || this.$defaultUndoManager;\n };\n this.getTabString = function() {\n if (this.getUseSoftTabs()) {\n return lang.stringRepeat(\" \", this.getTabSize());\n } else {\n return \"\\t\";\n }\n };\n this.setUseSoftTabs = function(val) {\n this.setOption(\"useSoftTabs\", val);\n };\n this.getUseSoftTabs = function() {\n return this.$useSoftTabs && !this.$mode.$indentWithTabs;\n };\n this.setTabSize = function(tabSize) {\n this.setOption(\"tabSize\", tabSize);\n };\n this.getTabSize = function() {\n return this.$tabSize;\n };\n this.isTabStop = function(position) {\n return this.$useSoftTabs && (position.column % this.$tabSize === 0);\n };\n\n this.$overwrite = false;\n this.setOverwrite = function(overwrite) {\n this.setOption(\"overwrite\", overwrite);\n };\n this.getOverwrite = function() {\n return this.$overwrite;\n };\n this.toggleOverwrite = function() {\n this.setOverwrite(!this.$overwrite);\n };\n this.addGutterDecoration = function(row, className) {\n if (!this.$decorations[row])\n this.$decorations[row] = \"\";\n this.$decorations[row] += \" \" + className;\n this._signal(\"changeBreakpoint\", {});\n };\n this.removeGutterDecoration = function(row, className) {\n this.$decorations[row] = (this.$decorations[row] || \"\").replace(\" \" + className, \"\");\n this._signal(\"changeBreakpoint\", {});\n };\n this.getBreakpoints = function() {\n return this.$breakpoints;\n };\n this.setBreakpoints = function(rows) {\n this.$breakpoints = [];\n for (var i=0; i<rows.length; i++) {\n this.$breakpoints[rows[i]] = \"ace_breakpoint\";\n }\n this._signal(\"changeBreakpoint\", {});\n };\n this.clearBreakpoints = function() {\n this.$breakpoints = [];\n this._signal(\"changeBreakpoint\", {});\n };\n this.setBreakpoint = function(row, className) {\n if (className === undefined)\n className = \"ace_breakpoint\";\n if (className)\n this.$breakpoints[row] = className;\n else\n delete this.$breakpoints[row];\n this._signal(\"changeBreakpoint\", {});\n };\n this.clearBreakpoint = function(row) {\n delete this.$breakpoints[row];\n this._signal(\"changeBreakpoint\", {});\n };\n this.addMarker = function(range, clazz, type, inFront) {\n var id = this.$markerId++;\n\n var marker = {\n range : range,\n type : type || \"line\",\n renderer: typeof type == \"function\" ? type : null,\n clazz : clazz,\n inFront: !!inFront,\n id: id\n };\n\n if (inFront) {\n this.$frontMarkers[id] = marker;\n this._signal(\"changeFrontMarker\");\n } else {\n this.$backMarkers[id] = marker;\n this._signal(\"changeBackMarker\");\n }\n\n return id;\n };\n this.addDynamicMarker = function(marker, inFront) {\n if (!marker.update)\n return;\n var id = this.$markerId++;\n marker.id = id;\n marker.inFront = !!inFront;\n\n if (inFront) {\n this.$frontMarkers[id] = marker;\n this._signal(\"changeFrontMarker\");\n } else {\n this.$backMarkers[id] = marker;\n this._signal(\"changeBackMarker\");\n }\n\n return marker;\n };\n this.removeMarker = function(markerId) {\n var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];\n if (!marker)\n return;\n\n var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;\n if (marker) {\n delete (markers[markerId]);\n this._signal(marker.inFront ? \"changeFrontMarker\" : \"changeBackMarker\");\n }\n };\n this.getMarkers = function(inFront) {\n return inFront ? this.$frontMarkers : this.$backMarkers;\n };\n\n this.highlight = function(re) {\n if (!this.$searchHighlight) {\n var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");\n this.$searchHighlight = this.addDynamicMarker(highlight);\n }\n this.$searchHighlight.setRegexp(re);\n };\n this.highlightLines = function(startRow, endRow, clazz, inFront) {\n if (typeof endRow != \"number\") {\n clazz = endRow;\n endRow = startRow;\n }\n if (!clazz)\n clazz = \"ace_step\";\n\n var range = new Range(startRow, 0, endRow, Infinity);\n range.id = this.addMarker(range, clazz, \"fullLine\", inFront);\n return range;\n };\n this.setAnnotations = function(annotations) {\n this.$annotations = annotations;\n this._signal(\"changeAnnotation\", {});\n };\n this.getAnnotations = function() {\n return this.$annotations || [];\n };\n this.clearAnnotations = function() {\n this.setAnnotations([]);\n };\n this.$detectNewLine = function(text) {\n var match = text.match(/^.*?(\\r?\\n)/m);\n if (match) {\n this.$autoNewLine = match[1];\n } else {\n this.$autoNewLine = \"\\n\";\n }\n };\n this.getWordRange = function(row, column) {\n var line = this.getLine(row);\n\n var inToken = false;\n if (column > 0)\n inToken = !!line.charAt(column - 1).match(this.tokenRe);\n\n if (!inToken)\n inToken = !!line.charAt(column).match(this.tokenRe);\n\n if (inToken)\n var re = this.tokenRe;\n else if (/^\\s+$/.test(line.slice(column-1, column+1)))\n var re = /\\s/;\n else\n var re = this.nonTokenRe;\n\n var start = column;\n if (start > 0) {\n do {\n start--;\n }\n while (start >= 0 && line.charAt(start).match(re));\n start++;\n }\n\n var end = column;\n while (end < line.length && line.charAt(end).match(re)) {\n end++;\n }\n\n return new Range(row, start, row, end);\n };\n this.getAWordRange = function(row, column) {\n var wordRange = this.getWordRange(row, column);\n var line = this.getLine(wordRange.end.row);\n\n while (line.charAt(wordRange.end.column).match(/[ \\t]/)) {\n wordRange.end.column += 1;\n }\n return wordRange;\n };\n this.setNewLineMode = function(newLineMode) {\n this.doc.setNewLineMode(newLineMode);\n };\n this.getNewLineMode = function() {\n return this.doc.getNewLineMode();\n };\n this.setUseWorker = function(useWorker) { this.setOption(\"useWorker\", useWorker); };\n this.getUseWorker = function() { return this.$useWorker; };\n this.onReloadTokenizer = function(e) {\n var rows = e.data;\n this.bgTokenizer.start(rows.first);\n this._signal(\"tokenizerUpdate\", e);\n };\n\n this.$modes = {};\n this.$mode = null;\n this.$modeId = null;\n this.setMode = function(mode, cb) {\n if (mode && typeof mode === \"object\") {\n if (mode.getTokenizer)\n return this.$onChangeMode(mode);\n var options = mode;\n var path = options.path;\n } else {\n path = mode || \"ace/mode/text\";\n }\n if (!this.$modes[\"ace/mode/text\"])\n this.$modes[\"ace/mode/text\"] = new TextMode();\n\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n cb && cb();\n return;\n }\n this.$modeId = path;\n config.loadModule([\"mode\", path], function(m) {\n if (this.$modeId !== path)\n return cb && cb();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n } else if (m && m.Mode) {\n m = new m.Mode(options);\n if (!options) {\n this.$modes[path] = m;\n m.$id = path;\n }\n this.$onChangeMode(m);\n }\n cb && cb();\n }.bind(this));\n if (!this.$mode)\n this.$onChangeMode(this.$modes[\"ace/mode/text\"], true);\n };\n\n this.$onChangeMode = function(mode, $isPlaceholder) {\n if (!$isPlaceholder)\n this.$modeId = mode.$id;\n if (this.$mode === mode) \n return;\n\n this.$mode = mode;\n\n this.$stopWorker();\n\n if (this.$useWorker)\n this.$startWorker();\n\n var tokenizer = mode.getTokenizer();\n\n if(tokenizer.addEventListener !== undefined) {\n var onReloadTokenizer = this.onReloadTokenizer.bind(this);\n tokenizer.addEventListener(\"update\", onReloadTokenizer);\n }\n\n if (!this.bgTokenizer) {\n this.bgTokenizer = new BackgroundTokenizer(tokenizer);\n var _self = this;\n this.bgTokenizer.addEventListener(\"update\", function(e) {\n _self._signal(\"tokenizerUpdate\", e);\n });\n } else {\n this.bgTokenizer.setTokenizer(tokenizer);\n }\n\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.tokenRe = mode.tokenRe;\n this.nonTokenRe = mode.nonTokenRe;\n\n \n if (!$isPlaceholder) {\n if (mode.attachToSession)\n mode.attachToSession(this);\n this.$options.wrapMethod.set.call(this, this.$wrapMethod);\n this.$setFolding(mode.foldingRules);\n this.bgTokenizer.start(0);\n this._emit(\"changeMode\");\n }\n };\n\n this.$stopWorker = function() {\n if (this.$worker) {\n this.$worker.terminate();\n this.$worker = null;\n }\n };\n\n this.$startWorker = function() {\n try {\n this.$worker = this.$mode.createWorker(this);\n } catch (e) {\n config.warn(\"Could not load worker\", e);\n this.$worker = null;\n }\n };\n this.getMode = function() {\n return this.$mode;\n };\n\n this.$scrollTop = 0;\n this.setScrollTop = function(scrollTop) {\n if (this.$scrollTop === scrollTop || isNaN(scrollTop))\n return;\n\n this.$scrollTop = scrollTop;\n this._signal(\"changeScrollTop\", scrollTop);\n };\n this.getScrollTop = function() {\n return this.$scrollTop;\n };\n\n this.$scrollLeft = 0;\n this.setScrollLeft = function(scrollLeft) {\n if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))\n return;\n\n this.$scrollLeft = scrollLeft;\n this._signal(\"changeScrollLeft\", scrollLeft);\n };\n this.getScrollLeft = function() {\n return this.$scrollLeft;\n };\n this.getScreenWidth = function() {\n this.$computeWidth();\n if (this.lineWidgets) \n return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);\n return this.screenWidth;\n };\n \n this.getLineWidgetMaxWidth = function() {\n if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;\n var width = 0;\n this.lineWidgets.forEach(function(w) {\n if (w && w.screenWidth > width)\n width = w.screenWidth;\n });\n return this.lineWidgetWidth = width;\n };\n\n this.$computeWidth = function(force) {\n if (this.$modified || force) {\n this.$modified = false;\n\n if (this.$useWrapMode)\n return this.screenWidth = this.$wrapLimit;\n\n var lines = this.doc.getAllLines();\n var cache = this.$rowLengthCache;\n var longestScreenLine = 0;\n var foldIndex = 0;\n var foldLine = this.$foldData[foldIndex];\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n var len = lines.length;\n\n for (var i = 0; i < len; i++) {\n if (i > foldStart) {\n i = foldLine.end.row + 1;\n if (i >= len)\n break;\n foldLine = this.$foldData[foldIndex++];\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (cache[i] == null)\n cache[i] = this.$getStringScreenWidth(lines[i])[0];\n\n if (cache[i] > longestScreenLine)\n longestScreenLine = cache[i];\n }\n this.screenWidth = longestScreenLine;\n }\n };\n this.getLine = function(row) {\n return this.doc.getLine(row);\n };\n this.getLines = function(firstRow, lastRow) {\n return this.doc.getLines(firstRow, lastRow);\n };\n this.getLength = function() {\n return this.doc.getLength();\n };\n this.getTextRange = function(range) {\n return this.doc.getTextRange(range || this.selection.getRange());\n };\n this.insert = function(position, text) {\n return this.doc.insert(position, text);\n };\n this.remove = function(range) {\n return this.doc.remove(range);\n };\n this.removeFullLines = function(firstRow, lastRow){\n return this.doc.removeFullLines(firstRow, lastRow);\n };\n this.undoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = deltas.length - 1; i != -1; i--) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.revertDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, true, lastUndoRange);\n } else {\n delta.deltas.forEach(function(foldDelta) {\n this.addFolds(foldDelta.folds);\n }, this);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.redoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.applyDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, false, lastUndoRange);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.setUndoSelect = function(enable) {\n this.$undoSelect = enable;\n };\n\n this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {\n function isInsert(delta) {\n return isUndo ? delta.action !== \"insert\" : delta.action === \"insert\";\n }\n\n var delta = deltas[0];\n var range, point;\n var lastDeltaIsInsert = false;\n if (isInsert(delta)) {\n range = Range.fromPoints(delta.start, delta.end);\n lastDeltaIsInsert = true;\n } else {\n range = Range.fromPoints(delta.start, delta.start);\n lastDeltaIsInsert = false;\n }\n\n for (var i = 1; i < deltas.length; i++) {\n delta = deltas[i];\n if (isInsert(delta)) {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range.setStart(point);\n }\n point = delta.end;\n if (range.compare(point.row, point.column) == 1) {\n range.setEnd(point);\n }\n lastDeltaIsInsert = true;\n } else {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range = Range.fromPoints(delta.start, delta.start);\n }\n lastDeltaIsInsert = false;\n }\n }\n if (lastUndoRange != null) {\n if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {\n lastUndoRange.start.column += range.end.column - range.start.column;\n lastUndoRange.end.column += range.end.column - range.start.column;\n }\n\n var cmp = lastUndoRange.compareRange(range);\n if (cmp == 1) {\n range.setStart(lastUndoRange.start);\n } else if (cmp == -1) {\n range.setEnd(lastUndoRange.end);\n }\n }\n\n return range;\n };\n this.replace = function(range, text) {\n return this.doc.replace(range, text);\n };\n this.moveText = function(fromRange, toPosition, copy) {\n var text = this.getTextRange(fromRange);\n var folds = this.getFoldsInRange(fromRange);\n\n var toRange = Range.fromPoints(toPosition, toPosition);\n if (!copy) {\n this.remove(fromRange);\n var rowDiff = fromRange.start.row - fromRange.end.row;\n var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;\n if (collDiff) {\n if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)\n toRange.start.column += collDiff;\n if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)\n toRange.end.column += collDiff;\n }\n if (rowDiff && toRange.start.row >= fromRange.end.row) {\n toRange.start.row += rowDiff;\n toRange.end.row += rowDiff;\n }\n }\n\n toRange.end = this.insert(toRange.start, text);\n if (folds.length) {\n var oldStart = fromRange.start;\n var newStart = toRange.start;\n var rowDiff = newStart.row - oldStart.row;\n var collDiff = newStart.column - oldStart.column;\n this.addFolds(folds.map(function(x) {\n x = x.clone();\n if (x.start.row == oldStart.row)\n x.start.column += collDiff;\n if (x.end.row == oldStart.row)\n x.end.column += collDiff;\n x.start.row += rowDiff;\n x.end.row += rowDiff;\n return x;\n }));\n }\n\n return toRange;\n };\n this.indentRows = function(startRow, endRow, indentString) {\n indentString = indentString.replace(/\\t/g, this.getTabString());\n for (var row=startRow; row<=endRow; row++)\n this.doc.insertInLine({row: row, column: 0}, indentString);\n };\n this.outdentRows = function (range) {\n var rowRange = range.collapseRows();\n var deleteRange = new Range(0, 0, 0, 0);\n var size = this.getTabSize();\n\n for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {\n var line = this.getLine(i);\n\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n for (var j = 0; j < size; ++j)\n if (line.charAt(j) != ' ')\n break;\n if (j < size && line.charAt(j) == '\\t') {\n deleteRange.start.column = j;\n deleteRange.end.column = j + 1;\n } else {\n deleteRange.start.column = 0;\n deleteRange.end.column = j;\n }\n this.remove(deleteRange);\n }\n };\n\n this.$moveLines = function(firstRow, lastRow, dir) {\n firstRow = this.getRowFoldStart(firstRow);\n lastRow = this.getRowFoldEnd(lastRow);\n if (dir < 0) {\n var row = this.getRowFoldStart(firstRow + dir);\n if (row < 0) return 0;\n var diff = row-firstRow;\n } else if (dir > 0) {\n var row = this.getRowFoldEnd(lastRow + dir);\n if (row > this.doc.getLength()-1) return 0;\n var diff = row-lastRow;\n } else {\n firstRow = this.$clipRowToDocument(firstRow);\n lastRow = this.$clipRowToDocument(lastRow);\n var diff = lastRow - firstRow + 1;\n }\n\n var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);\n var folds = this.getFoldsInRange(range).map(function(x){\n x = x.clone();\n x.start.row += diff;\n x.end.row += diff;\n return x;\n });\n \n var lines = dir == 0\n ? this.doc.getLines(firstRow, lastRow)\n : this.doc.removeFullLines(firstRow, lastRow);\n this.doc.insertFullLines(firstRow+diff, lines);\n folds.length && this.addFolds(folds);\n return diff;\n };\n this.moveLinesUp = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, -1);\n };\n this.moveLinesDown = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 1);\n };\n this.duplicateLines = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 0);\n };\n\n\n this.$clipRowToDocument = function(row) {\n return Math.max(0, Math.min(row, this.doc.getLength()-1));\n };\n\n this.$clipColumnToRow = function(row, column) {\n if (column < 0)\n return 0;\n return Math.min(this.doc.getLine(row).length, column);\n };\n\n\n this.$clipPositionToDocument = function(row, column) {\n column = Math.max(0, column);\n\n if (row < 0) {\n row = 0;\n column = 0;\n } else {\n var len = this.doc.getLength();\n if (row >= len) {\n row = len - 1;\n column = this.doc.getLine(len-1).length;\n } else {\n column = Math.min(this.doc.getLine(row).length, column);\n }\n }\n\n return {\n row: row,\n column: column\n };\n };\n\n this.$clipRangeToDocument = function(range) {\n if (range.start.row < 0) {\n range.start.row = 0;\n range.start.column = 0;\n } else {\n range.start.column = this.$clipColumnToRow(\n range.start.row,\n range.start.column\n );\n }\n\n var len = this.doc.getLength() - 1;\n if (range.end.row > len) {\n range.end.row = len;\n range.end.column = this.doc.getLine(len).length;\n } else {\n range.end.column = this.$clipColumnToRow(\n range.end.row,\n range.end.column\n );\n }\n return range;\n };\n this.$wrapLimit = 80;\n this.$useWrapMode = false;\n this.$wrapLimitRange = {\n min : null,\n max : null\n };\n this.setUseWrapMode = function(useWrapMode) {\n if (useWrapMode != this.$useWrapMode) {\n this.$useWrapMode = useWrapMode;\n this.$modified = true;\n this.$resetRowCache(0);\n if (useWrapMode) {\n var len = this.getLength();\n this.$wrapData = Array(len);\n this.$updateWrapData(0, len - 1);\n }\n\n this._signal(\"changeWrapMode\");\n }\n };\n this.getUseWrapMode = function() {\n return this.$useWrapMode;\n };\n this.setWrapLimitRange = function(min, max) {\n if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {\n this.$wrapLimitRange = { min: min, max: max };\n this.$modified = true;\n if (this.$useWrapMode)\n this._signal(\"changeWrapMode\");\n }\n };\n this.adjustWrapLimit = function(desiredLimit, $printMargin) {\n var limits = this.$wrapLimitRange;\n if (limits.max < 0)\n limits = {min: $printMargin, max: $printMargin};\n var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);\n if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {\n this.$wrapLimit = wrapLimit;\n this.$modified = true;\n if (this.$useWrapMode) {\n this.$updateWrapData(0, this.getLength() - 1);\n this.$resetRowCache(0);\n this._signal(\"changeWrapLimit\");\n }\n return true;\n }\n return false;\n };\n\n this.$constrainWrapLimit = function(wrapLimit, min, max) {\n if (min)\n wrapLimit = Math.max(min, wrapLimit);\n\n if (max)\n wrapLimit = Math.min(max, wrapLimit);\n\n return wrapLimit;\n };\n this.getWrapLimit = function() {\n return this.$wrapLimit;\n };\n this.setWrapLimit = function (limit) {\n this.setWrapLimitRange(limit, limit);\n };\n this.getWrapLimitRange = function() {\n return {\n min : this.$wrapLimitRange.min,\n max : this.$wrapLimitRange.max\n };\n };\n\n this.$updateInternalDataOnChange = function(delta) {\n var useWrapMode = this.$useWrapMode;\n var action = delta.action;\n var start = delta.start;\n var end = delta.end;\n var firstRow = start.row;\n var lastRow = end.row;\n var len = lastRow - firstRow;\n var removedFolds = null;\n \n this.$updating = true;\n if (len != 0) {\n if (action === \"remove\") {\n this[useWrapMode ? \"$wrapData\" : \"$rowLengthCache\"].splice(firstRow, len);\n\n var foldLines = this.$foldData;\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n var foldLine = this.getFoldLine(end.row);\n var idx = 0;\n if (foldLine) {\n foldLine.addRemoveChars(end.row, end.column, start.column - end.column);\n foldLine.shiftRow(-len);\n\n var foldLineBefore = this.getFoldLine(firstRow);\n if (foldLineBefore && foldLineBefore !== foldLine) {\n foldLineBefore.merge(foldLine);\n foldLine = foldLineBefore;\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= end.row) {\n foldLine.shiftRow(-len);\n }\n }\n\n lastRow = firstRow;\n } else {\n var args = Array(len);\n args.unshift(firstRow, 0);\n var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache\n arr.splice.apply(arr, args);\n var foldLines = this.$foldData;\n var foldLine = this.getFoldLine(firstRow);\n var idx = 0;\n if (foldLine) {\n var cmp = foldLine.range.compareInside(start.row, start.column);\n if (cmp == 0) {\n foldLine = foldLine.split(start.row, start.column);\n if (foldLine) {\n foldLine.shiftRow(len);\n foldLine.addRemoveChars(lastRow, 0, end.column - start.column);\n }\n } else\n if (cmp == -1) {\n foldLine.addRemoveChars(firstRow, 0, end.column - start.column);\n foldLine.shiftRow(len);\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= firstRow) {\n foldLine.shiftRow(len);\n }\n }\n }\n } else {\n len = Math.abs(delta.start.column - delta.end.column);\n if (action === \"remove\") {\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n len = -len;\n }\n var foldLine = this.getFoldLine(firstRow);\n if (foldLine) {\n foldLine.addRemoveChars(firstRow, start.column, len);\n }\n }\n\n if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {\n console.error(\"doc.getLength() and $wrapData.length have to be the same!\");\n }\n this.$updating = false;\n\n if (useWrapMode)\n this.$updateWrapData(firstRow, lastRow);\n else\n this.$updateRowLengthCache(firstRow, lastRow);\n\n return removedFolds;\n };\n\n this.$updateRowLengthCache = function(firstRow, lastRow, b) {\n this.$rowLengthCache[firstRow] = null;\n this.$rowLengthCache[lastRow] = null;\n };\n\n this.$updateWrapData = function(firstRow, lastRow) {\n var lines = this.doc.getAllLines();\n var tabSize = this.getTabSize();\n var wrapData = this.$wrapData;\n var wrapLimit = this.$wrapLimit;\n var tokens;\n var foldLine;\n\n var row = firstRow;\n lastRow = Math.min(lastRow, lines.length - 1);\n while (row <= lastRow) {\n foldLine = this.getFoldLine(row, foldLine);\n if (!foldLine) {\n tokens = this.$getDisplayTokens(lines[row]);\n wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row ++;\n } else {\n tokens = [];\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n var walkTokens;\n if (placeholder != null) {\n walkTokens = this.$getDisplayTokens(\n placeholder, tokens.length);\n walkTokens[0] = PLACEHOLDER_START;\n for (var i = 1; i < walkTokens.length; i++) {\n walkTokens[i] = PLACEHOLDER_BODY;\n }\n } else {\n walkTokens = this.$getDisplayTokens(\n lines[row].substring(lastColumn, column),\n tokens.length);\n }\n tokens = tokens.concat(walkTokens);\n }.bind(this),\n foldLine.end.row,\n lines[foldLine.end.row].length + 1\n );\n\n wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row = foldLine.end.row + 1;\n }\n }\n };\n var CHAR = 1,\n CHAR_EXT = 2,\n PLACEHOLDER_START = 3,\n PLACEHOLDER_BODY = 4,\n PUNCTUATION = 9,\n SPACE = 10,\n TAB = 11,\n TAB_SPACE = 12;\n\n\n this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {\n if (tokens.length == 0) {\n return [];\n }\n\n var splits = [];\n var displayLength = tokens.length;\n var lastSplit = 0, lastDocSplit = 0;\n\n var isCode = this.$wrapAsCode;\n\n var indentedSoftWrap = this.$indentedSoftWrap;\n var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)\n || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);\n\n function getWrapIndent() {\n var indentation = 0;\n if (maxIndent === 0)\n return indentation;\n if (indentedSoftWrap) {\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token == SPACE)\n indentation += 1;\n else if (token == TAB)\n indentation += tabSize;\n else if (token == TAB_SPACE)\n continue;\n else\n break;\n }\n }\n if (isCode && indentedSoftWrap !== false)\n indentation += tabSize;\n return Math.min(indentation, maxIndent);\n }\n function addSplit(screenPos) {\n var displayed = tokens.slice(lastSplit, screenPos);\n var len = displayed.length;\n displayed.join(\"\")\n .replace(/12/g, function() {\n len -= 1;\n })\n .replace(/2/g, function() {\n len -= 1;\n });\n\n if (!splits.length) {\n indent = getWrapIndent();\n splits.indent = indent;\n }\n lastDocSplit += len;\n splits.push(lastDocSplit);\n lastSplit = screenPos;\n }\n var indent = 0;\n while (displayLength - lastSplit > wrapLimit - indent) {\n var split = lastSplit + wrapLimit - indent;\n if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {\n addSplit(split);\n continue;\n }\n if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {\n for (split; split != lastSplit - 1; split--) {\n if (tokens[split] == PLACEHOLDER_START) {\n break;\n }\n }\n if (split > lastSplit) {\n addSplit(split);\n continue;\n }\n split = lastSplit + wrapLimit;\n for (split; split < tokens.length; split++) {\n if (tokens[split] != PLACEHOLDER_BODY) {\n break;\n }\n }\n if (split == tokens.length) {\n break; // Breaks the while-loop.\n }\n addSplit(split);\n continue;\n }\n var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1);\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n if (isCode) {\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n while (split > minSplit && tokens[split] == PUNCTUATION) {\n split --;\n }\n } else {\n while (split > minSplit && tokens[split] < SPACE) {\n split --;\n }\n }\n if (split > minSplit) {\n addSplit(++split);\n continue;\n }\n split = lastSplit + wrapLimit;\n if (tokens[split] == CHAR_EXT)\n split--;\n addSplit(split - indent);\n }\n return splits;\n };\n this.$getDisplayTokens = function(str, offset) {\n var arr = [];\n var tabSize;\n offset = offset || 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c == 9) {\n tabSize = this.getScreenTabSize(arr.length + offset);\n arr.push(TAB);\n for (var n = 1; n < tabSize; n++) {\n arr.push(TAB_SPACE);\n }\n }\n else if (c == 32) {\n arr.push(SPACE);\n } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {\n arr.push(PUNCTUATION);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n arr.push(CHAR, CHAR_EXT);\n } else {\n arr.push(CHAR);\n }\n }\n return arr;\n };\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn == 0)\n return [0, 0];\n if (maxScreenColumn == null)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charCodeAt(column);\n if (c == 9) {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n screenColumn += 2;\n } else {\n screenColumn += 1;\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n\n return [screenColumn, column];\n };\n\n this.lineWidgets = null;\n this.getRowLength = function(row) {\n if (this.lineWidgets)\n var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n this.getRowLineCount = function(row) {\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1;\n } else {\n return this.$wrapData[row].length + 1;\n }\n };\n\n this.getRowWrapIndent = function(screenRow) {\n if (this.$useWrapMode) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n var splits = this.$wrapData[pos.row];\n return splits.length && splits[0] < pos.column ? splits.indent : 0;\n } else {\n return 0;\n }\n }\n this.getScreenLastRowColumn = function(screenRow) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n return this.documentToScreenColumn(pos.row, pos.column);\n };\n this.getDocumentLastRowColumn = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.getScreenLastRowColumn(screenRow);\n };\n this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);\n };\n this.getRowSplitData = function(row) {\n if (!this.$useWrapMode) {\n return undefined;\n } else {\n return this.$wrapData[row];\n }\n };\n this.getScreenTabSize = function(screenColumn) {\n return this.$tabSize - screenColumn % this.$tabSize;\n };\n\n\n this.screenToDocumentRow = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).row;\n };\n\n\n this.screenToDocumentColumn = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).column;\n };\n this.screenToDocumentPosition = function(screenRow, screenColumn) {\n if (screenRow < 0)\n return {row: 0, column: 0};\n\n var line;\n var docRow = 0;\n var docColumn = 0;\n var column;\n var row = 0;\n var rowLength = 0;\n\n var rowCache = this.$screenRowCache;\n var i = this.$getRowCacheIndex(rowCache, screenRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var docRow = this.$docRowCache[i];\n var doCache = screenRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var maxRow = this.getLength() - 1;\n var foldLine = this.getNextFoldLine(docRow);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (row <= screenRow) {\n rowLength = this.getRowLength(docRow);\n if (row + rowLength > screenRow || docRow >= maxRow) {\n break;\n } else {\n row += rowLength;\n docRow++;\n if (docRow > foldStart) {\n docRow = foldLine.end.row+1;\n foldLine = this.getNextFoldLine(docRow, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n }\n\n if (doCache) {\n this.$docRowCache.push(docRow);\n this.$screenRowCache.push(row);\n }\n }\n\n if (foldLine && foldLine.start.row <= docRow) {\n line = this.getFoldDisplayLine(foldLine);\n docRow = foldLine.start.row;\n } else if (row + rowLength <= screenRow || docRow > maxRow) {\n return {\n row: maxRow,\n column: this.getLine(maxRow).length\n };\n } else {\n line = this.getLine(docRow);\n foldLine = null;\n }\n var wrapIndent = 0;\n if (this.$useWrapMode) {\n var splits = this.$wrapData[docRow];\n if (splits) {\n var splitIndex = Math.floor(screenRow - row);\n column = splits[splitIndex];\n if(splitIndex > 0 && splits.length) {\n wrapIndent = splits.indent;\n docColumn = splits[splitIndex - 1] || splits[splits.length - 1];\n line = line.substring(docColumn);\n }\n }\n }\n\n docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];\n if (this.$useWrapMode && docColumn >= column)\n docColumn = column - 1;\n\n if (foldLine)\n return foldLine.idxToPosition(docColumn);\n\n return {row: docRow, column: docColumn};\n };\n this.documentToScreenPosition = function(docRow, docColumn) {\n if (typeof docColumn === \"undefined\")\n var pos = this.$clipPositionToDocument(docRow.row, docRow.column);\n else\n pos = this.$clipPositionToDocument(docRow, docColumn);\n\n docRow = pos.row;\n docColumn = pos.column;\n\n var screenRow = 0;\n var foldStartRow = null;\n var fold = null;\n fold = this.getFoldAt(docRow, docColumn, 1);\n if (fold) {\n docRow = fold.start.row;\n docColumn = fold.start.column;\n }\n\n var rowEnd, row = 0;\n\n\n var rowCache = this.$docRowCache;\n var i = this.$getRowCacheIndex(rowCache, docRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var screenRow = this.$screenRowCache[i];\n var doCache = docRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var foldLine = this.getNextFoldLine(row);\n var foldStart = foldLine ?foldLine.start.row :Infinity;\n\n while (row < docRow) {\n if (row >= foldStart) {\n rowEnd = foldLine.end.row + 1;\n if (rowEnd > docRow)\n break;\n foldLine = this.getNextFoldLine(rowEnd, foldLine);\n foldStart = foldLine ?foldLine.start.row :Infinity;\n }\n else {\n rowEnd = row + 1;\n }\n\n screenRow += this.getRowLength(row);\n row = rowEnd;\n\n if (doCache) {\n this.$docRowCache.push(row);\n this.$screenRowCache.push(screenRow);\n }\n }\n var textLine = \"\";\n if (foldLine && row >= foldStart) {\n textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);\n foldStartRow = foldLine.start.row;\n } else {\n textLine = this.getLine(docRow).substring(0, docColumn);\n foldStartRow = docRow;\n }\n var wrapIndent = 0;\n if (this.$useWrapMode) {\n var wrapRow = this.$wrapData[foldStartRow];\n if (wrapRow) {\n var screenRowOffset = 0;\n while (textLine.length >= wrapRow[screenRowOffset]) {\n screenRow ++;\n screenRowOffset++;\n }\n textLine = textLine.substring(\n wrapRow[screenRowOffset - 1] || 0, textLine.length\n );\n wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;\n }\n }\n\n return {\n row: screenRow,\n column: wrapIndent + this.$getStringScreenWidth(textLine)[0]\n };\n };\n this.documentToScreenColumn = function(row, docColumn) {\n return this.documentToScreenPosition(row, docColumn).column;\n };\n this.documentToScreenRow = function(docRow, docColumn) {\n return this.documentToScreenPosition(docRow, docColumn).row;\n };\n this.getScreenLength = function() {\n var screenRows = 0;\n var fold = null;\n if (!this.$useWrapMode) {\n screenRows = this.getLength();\n var foldData = this.$foldData;\n for (var i = 0; i < foldData.length; i++) {\n fold = foldData[i];\n screenRows -= fold.end.row - fold.start.row;\n }\n } else {\n var lastRow = this.$wrapData.length;\n var row = 0, i = 0;\n var fold = this.$foldData[i++];\n var foldStart = fold ? fold.start.row :Infinity;\n\n while (row < lastRow) {\n var splits = this.$wrapData[row];\n screenRows += splits ? splits.length + 1 : 1;\n row ++;\n if (row > foldStart) {\n row = fold.end.row+1;\n fold = this.$foldData[i++];\n foldStart = fold ?fold.start.row :Infinity;\n }\n }\n }\n if (this.lineWidgets)\n screenRows += this.$getWidgetScreenLength();\n\n return screenRows;\n };\n this.$setFontMetrics = function(fm) {\n if (!this.$enableVarChar) return;\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn === 0)\n return [0, 0];\n if (!maxScreenColumn)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n \n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charAt(column);\n if (c === \"\\t\") {\n screenColumn += this.getScreenTabSize(screenColumn);\n } else {\n screenColumn += fm.getCharacterWidth(c);\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n \n return [screenColumn, column];\n };\n };\n \n this.destroy = function() {\n if (this.bgTokenizer) {\n this.bgTokenizer.setDocument(null);\n this.bgTokenizer = null;\n }\n this.$stopWorker();\n };\n function isFullWidth(c) {\n if (c < 0x1100)\n return false;\n return c >= 0x1100 && c <= 0x115F ||\n c >= 0x11A3 && c <= 0x11A7 ||\n c >= 0x11FA && c <= 0x11FF ||\n c >= 0x2329 && c <= 0x232A ||\n c >= 0x2E80 && c <= 0x2E99 ||\n c >= 0x2E9B && c <= 0x2EF3 ||\n c >= 0x2F00 && c <= 0x2FD5 ||\n c >= 0x2FF0 && c <= 0x2FFB ||\n c >= 0x3000 && c <= 0x303E ||\n c >= 0x3041 && c <= 0x3096 ||\n c >= 0x3099 && c <= 0x30FF ||\n c >= 0x3105 && c <= 0x312D ||\n c >= 0x3131 && c <= 0x318E ||\n c >= 0x3190 && c <= 0x31BA ||\n c >= 0x31C0 && c <= 0x31E3 ||\n c >= 0x31F0 && c <= 0x321E ||\n c >= 0x3220 && c <= 0x3247 ||\n c >= 0x3250 && c <= 0x32FE ||\n c >= 0x3300 && c <= 0x4DBF ||\n c >= 0x4E00 && c <= 0xA48C ||\n c >= 0xA490 && c <= 0xA4C6 ||\n c >= 0xA960 && c <= 0xA97C ||\n c >= 0xAC00 && c <= 0xD7A3 ||\n c >= 0xD7B0 && c <= 0xD7C6 ||\n c >= 0xD7CB && c <= 0xD7FB ||\n c >= 0xF900 && c <= 0xFAFF ||\n c >= 0xFE10 && c <= 0xFE19 ||\n c >= 0xFE30 && c <= 0xFE52 ||\n c >= 0xFE54 && c <= 0xFE66 ||\n c >= 0xFE68 && c <= 0xFE6B ||\n c >= 0xFF01 && c <= 0xFF60 ||\n c >= 0xFFE0 && c <= 0xFFE6;\n }\n\n}).call(EditSession.prototype);\n\nacequire(\"./edit_session/folding\").Folding.call(EditSession.prototype);\nacequire(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype);\n\n\nconfig.defineOptions(EditSession.prototype, \"session\", {\n wrap: {\n set: function(value) {\n if (!value || value == \"off\")\n value = false;\n else if (value == \"free\")\n value = true;\n else if (value == \"printMargin\")\n value = -1;\n else if (typeof value == \"string\")\n value = parseInt(value, 10) || false;\n\n if (this.$wrap == value)\n return;\n this.$wrap = value;\n if (!value) {\n this.setUseWrapMode(false);\n } else {\n var col = typeof value == \"number\" ? value : null;\n this.setWrapLimitRange(col, col);\n this.setUseWrapMode(true);\n }\n },\n get: function() {\n if (this.getUseWrapMode()) {\n if (this.$wrap == -1)\n return \"printMargin\";\n if (!this.getWrapLimitRange().min)\n return \"free\";\n return this.$wrap;\n }\n return \"off\";\n },\n handlesSet: true\n }, \n wrapMethod: {\n set: function(val) {\n val = val == \"auto\"\n ? this.$mode.type != \"text\"\n : val != \"text\";\n if (val != this.$wrapAsCode) {\n this.$wrapAsCode = val;\n if (this.$useWrapMode) {\n this.$modified = true;\n this.$resetRowCache(0);\n this.$updateWrapData(0, this.getLength() - 1);\n }\n }\n },\n initialValue: \"auto\"\n },\n indentedSoftWrap: { initialValue: true },\n firstLineNumber: {\n set: function() {this._signal(\"changeBreakpoint\");},\n initialValue: 1\n },\n useWorker: {\n set: function(useWorker) {\n this.$useWorker = useWorker;\n\n this.$stopWorker();\n if (useWorker)\n this.$startWorker();\n },\n initialValue: true\n },\n useSoftTabs: {initialValue: true},\n tabSize: {\n set: function(tabSize) {\n if (isNaN(tabSize) || this.$tabSize === tabSize) return;\n\n this.$modified = true;\n this.$rowLengthCache = [];\n this.$tabSize = tabSize;\n this._signal(\"changeTabSize\");\n },\n initialValue: 4,\n handlesSet: true\n },\n overwrite: {\n set: function(val) {this._signal(\"changeOverwrite\");},\n initialValue: false\n },\n newLineMode: {\n set: function(val) {this.doc.setNewLineMode(val)},\n get: function() {return this.doc.getNewLineMode()},\n handlesSet: true\n },\n mode: {\n set: function(val) { this.setMode(val) },\n get: function() { return this.$modeId }\n }\n});\n\nexports.EditSession = EditSession;\n});\n\nace.define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar Search = function() {\n this.$options = {};\n};\n\n(function() {\n this.set = function(options) {\n oop.mixin(this.$options, options);\n return this;\n };\n this.getOptions = function() {\n return lang.copyObject(this.$options);\n };\n this.setOptions = function(options) {\n this.$options = options;\n };\n this.find = function(session) {\n var options = this.$options;\n var iterator = this.$matchIterator(session, options);\n if (!iterator)\n return false;\n\n var firstRange = null;\n iterator.forEach(function(range, row, offset) {\n if (!range.start) {\n var column = range.offset + (offset || 0);\n firstRange = new Range(row, column, row, column + range.length);\n if (!range.length && options.start && options.start.start\n && options.skipCurrent != false && firstRange.isEqual(options.start)\n ) {\n firstRange = null;\n return false;\n }\n } else\n firstRange = range;\n return true;\n });\n\n return firstRange;\n };\n this.findAll = function(session) {\n var options = this.$options;\n if (!options.needle)\n return [];\n this.$assembleRegExp(options);\n\n var range = options.range;\n var lines = range\n ? session.getLines(range.start.row, range.end.row)\n : session.doc.getAllLines();\n\n var ranges = [];\n var re = options.re;\n if (options.$isMultiLine) {\n var len = re.length;\n var maxRow = lines.length - len;\n var prevRange;\n outer: for (var row = re.offset || 0; row <= maxRow; row++) {\n for (var j = 0; j < len; j++)\n if (lines[row + j].search(re[j]) == -1)\n continue outer;\n \n var startLine = lines[row];\n var line = lines[row + len - 1];\n var startIndex = startLine.length - startLine.match(re[0])[0].length;\n var endIndex = line.match(re[len - 1])[0].length;\n \n if (prevRange && prevRange.end.row === row &&\n prevRange.end.column > startIndex\n ) {\n continue;\n }\n ranges.push(prevRange = new Range(\n row, startIndex, row + len - 1, endIndex\n ));\n if (len > 2)\n row = row + len - 2;\n }\n } else {\n for (var i = 0; i < lines.length; i++) {\n var matches = lang.getMatchOffsets(lines[i], re);\n for (var j = 0; j < matches.length; j++) {\n var match = matches[j];\n ranges.push(new Range(i, match.offset, i, match.offset + match.length));\n }\n }\n }\n\n if (range) {\n var startColumn = range.start.column;\n var endColumn = range.start.column;\n var i = 0, j = ranges.length - 1;\n while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row)\n i++;\n\n while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row)\n j--;\n \n ranges = ranges.slice(i, j + 1);\n for (i = 0, j = ranges.length; i < j; i++) {\n ranges[i].start.row += range.start.row;\n ranges[i].end.row += range.start.row;\n }\n }\n\n return ranges;\n };\n this.replace = function(input, replacement) {\n var options = this.$options;\n\n var re = this.$assembleRegExp(options);\n if (options.$isMultiLine)\n return replacement;\n\n if (!re)\n return;\n\n var match = re.exec(input);\n if (!match || match[0].length != input.length)\n return null;\n \n replacement = input.replace(re, replacement);\n if (options.preserveCase) {\n replacement = replacement.split(\"\");\n for (var i = Math.min(input.length, input.length); i--; ) {\n var ch = input[i];\n if (ch && ch.toLowerCase() != ch)\n replacement[i] = replacement[i].toUpperCase();\n else\n replacement[i] = replacement[i].toLowerCase();\n }\n replacement = replacement.join(\"\");\n }\n \n return replacement;\n };\n\n this.$matchIterator = function(session, options) {\n var re = this.$assembleRegExp(options);\n if (!re)\n return false;\n\n var callback;\n if (options.$isMultiLine) {\n var len = re.length;\n var matchIterator = function(line, row, offset) {\n var startIndex = line.search(re[0]);\n if (startIndex == -1)\n return;\n for (var i = 1; i < len; i++) {\n line = session.getLine(row + i);\n if (line.search(re[i]) == -1)\n return;\n }\n\n var endIndex = line.match(re[len - 1])[0].length;\n\n var range = new Range(row, startIndex, row + len - 1, endIndex);\n if (re.offset == 1) {\n range.start.row--;\n range.start.column = Number.MAX_VALUE;\n } else if (offset)\n range.start.column += offset;\n\n if (callback(range))\n return true;\n };\n } else if (options.backwards) {\n var matchIterator = function(line, row, startIndex) {\n var matches = lang.getMatchOffsets(line, re);\n for (var i = matches.length-1; i >= 0; i--)\n if (callback(matches[i], row, startIndex))\n return true;\n };\n } else {\n var matchIterator = function(line, row, startIndex) {\n var matches = lang.getMatchOffsets(line, re);\n for (var i = 0; i < matches.length; i++)\n if (callback(matches[i], row, startIndex))\n return true;\n };\n }\n \n var lineIterator = this.$lineIterator(session, options);\n\n return {\n forEach: function(_callback) {\n callback = _callback;\n lineIterator.forEach(matchIterator);\n }\n };\n };\n\n this.$assembleRegExp = function(options, $disableFakeMultiline) {\n if (options.needle instanceof RegExp)\n return options.re = options.needle;\n\n var needle = options.needle;\n\n if (!options.needle)\n return options.re = false;\n\n if (!options.regExp)\n needle = lang.escapeRegExp(needle);\n\n if (options.wholeWord)\n needle = addWordBoundary(needle, options);\n\n var modifier = options.caseSensitive ? \"gm\" : \"gmi\";\n\n options.$isMultiLine = !$disableFakeMultiline && /[\\n\\r]/.test(needle);\n if (options.$isMultiLine)\n return options.re = this.$assembleMultilineRegExp(needle, modifier);\n\n try {\n var re = new RegExp(needle, modifier);\n } catch(e) {\n re = false;\n }\n return options.re = re;\n };\n\n this.$assembleMultilineRegExp = function(needle, modifier) {\n var parts = needle.replace(/\\r\\n|\\r|\\n/g, \"$\\n^\").split(\"\\n\");\n var re = [];\n for (var i = 0; i < parts.length; i++) try {\n re.push(new RegExp(parts[i], modifier));\n } catch(e) {\n return false;\n }\n if (parts[0] == \"\") {\n re.shift();\n re.offset = 1;\n } else {\n re.offset = 0;\n }\n return re;\n };\n\n this.$lineIterator = function(session, options) {\n var backwards = options.backwards == true;\n var skipCurrent = options.skipCurrent != false;\n\n var range = options.range;\n var start = options.start;\n if (!start)\n start = range ? range[backwards ? \"end\" : \"start\"] : session.selection.getRange();\n \n if (start.start)\n start = start[skipCurrent != backwards ? \"end\" : \"start\"];\n\n var firstRow = range ? range.start.row : 0;\n var lastRow = range ? range.end.row : session.getLength() - 1;\n\n var forEach = backwards ? function(callback) {\n var row = start.row;\n\n var line = session.getLine(row).substring(0, start.column);\n if (callback(line, row))\n return;\n\n for (row--; row >= firstRow; row--)\n if (callback(session.getLine(row), row))\n return;\n\n if (options.wrap == false)\n return;\n\n for (row = lastRow, firstRow = start.row; row >= firstRow; row--)\n if (callback(session.getLine(row), row))\n return;\n } : function(callback) {\n var row = start.row;\n\n var line = session.getLine(row).substr(start.column);\n if (callback(line, row, start.column))\n return;\n\n for (row = row+1; row <= lastRow; row++)\n if (callback(session.getLine(row), row))\n return;\n\n if (options.wrap == false)\n return;\n\n for (row = firstRow, lastRow = start.row; row <= lastRow; row++)\n if (callback(session.getLine(row), row))\n return;\n };\n \n return {forEach: forEach};\n };\n\n}).call(Search.prototype);\n\nfunction addWordBoundary(needle, options) {\n function wordBoundary(c) {\n if (/\\w/.test(c) || options.regExp) return \"\\\\b\";\n return \"\";\n }\n return wordBoundary(needle[0]) + needle\n + wordBoundary(needle[needle.length - 1]);\n}\n\nexports.Search = Search;\n});\n\nace.define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keyUtil = acequire(\"../lib/keys\");\nvar useragent = acequire(\"../lib/useragent\");\nvar KEY_MODS = keyUtil.KEY_MODS;\n\nfunction HashHandler(config, platform) {\n this.platform = platform || (useragent.isMac ? \"mac\" : \"win\");\n this.commands = {};\n this.commandKeyBinding = {};\n this.addCommands(config);\n this.$singleCommand = true;\n}\n\nfunction MultiHashHandler(config, platform) {\n HashHandler.call(this, config, platform);\n this.$singleCommand = false;\n}\n\nMultiHashHandler.prototype = HashHandler.prototype;\n\n(function() {\n \n\n this.addCommand = function(command) {\n if (this.commands[command.name])\n this.removeCommand(command);\n\n this.commands[command.name] = command;\n\n if (command.bindKey)\n this._buildKeyHash(command);\n };\n\n this.removeCommand = function(command, keepCommand) {\n var name = command && (typeof command === 'string' ? command : command.name);\n command = this.commands[name];\n if (!keepCommand)\n delete this.commands[name];\n var ckb = this.commandKeyBinding;\n for (var keyId in ckb) {\n var cmdGroup = ckb[keyId];\n if (cmdGroup == command) {\n delete ckb[keyId];\n } else if (Array.isArray(cmdGroup)) {\n var i = cmdGroup.indexOf(command);\n if (i != -1) {\n cmdGroup.splice(i, 1);\n if (cmdGroup.length == 1)\n ckb[keyId] = cmdGroup[0];\n }\n }\n }\n };\n\n this.bindKey = function(key, command, position) {\n if (typeof key == \"object\" && key) {\n if (position == undefined)\n position = key.position;\n key = key[this.platform];\n }\n if (!key)\n return;\n if (typeof command == \"function\")\n return this.addCommand({exec: command, bindKey: key, name: command.name || key});\n \n key.split(\"|\").forEach(function(keyPart) {\n var chain = \"\";\n if (keyPart.indexOf(\" \") != -1) {\n var parts = keyPart.split(/\\s+/);\n keyPart = parts.pop();\n parts.forEach(function(keyPart) {\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n chain += (chain ? \" \" : \"\") + id;\n this._addCommandToBinding(chain, \"chainKeys\");\n }, this);\n chain += \" \";\n }\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n this._addCommandToBinding(chain + id, command, position);\n }, this);\n };\n \n function getPosition(command) {\n return typeof command == \"object\" && command.bindKey\n && command.bindKey.position || 0;\n }\n this._addCommandToBinding = function(keyId, command, position) {\n var ckb = this.commandKeyBinding, i;\n if (!command) {\n delete ckb[keyId];\n } else if (!ckb[keyId] || this.$singleCommand) {\n ckb[keyId] = command;\n } else {\n if (!Array.isArray(ckb[keyId])) {\n ckb[keyId] = [ckb[keyId]];\n } else if ((i = ckb[keyId].indexOf(command)) != -1) {\n ckb[keyId].splice(i, 1);\n }\n\n if (typeof position != \"number\") {\n if (position || command.isDefault)\n position = -100;\n else\n position = getPosition(command);\n }\n var commands = ckb[keyId];\n for (i = 0; i < commands.length; i++) {\n var other = commands[i];\n var otherPos = getPosition(other);\n if (otherPos > position)\n break;\n }\n commands.splice(i, 0, command);\n }\n };\n\n this.addCommands = function(commands) {\n commands && Object.keys(commands).forEach(function(name) {\n var command = commands[name];\n if (!command)\n return;\n \n if (typeof command === \"string\")\n return this.bindKey(command, name);\n\n if (typeof command === \"function\")\n command = { exec: command };\n\n if (typeof command !== \"object\")\n return;\n\n if (!command.name)\n command.name = name;\n\n this.addCommand(command);\n }, this);\n };\n\n this.removeCommands = function(commands) {\n Object.keys(commands).forEach(function(name) {\n this.removeCommand(commands[name]);\n }, this);\n };\n\n this.bindKeys = function(keyList) {\n Object.keys(keyList).forEach(function(key) {\n this.bindKey(key, keyList[key]);\n }, this);\n };\n\n this._buildKeyHash = function(command) {\n this.bindKey(command.bindKey, command);\n };\n this.parseKeys = function(keys) {\n var parts = keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function(x){return x});\n var key = parts.pop();\n\n var keyCode = keyUtil[key];\n if (keyUtil.FUNCTION_KEYS[keyCode])\n key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();\n else if (!parts.length)\n return {key: key, hashId: -1};\n else if (parts.length == 1 && parts[0] == \"shift\")\n return {key: key.toUpperCase(), hashId: -1};\n\n var hashId = 0;\n for (var i = parts.length; i--;) {\n var modifier = keyUtil.KEY_MODS[parts[i]];\n if (modifier == null) {\n if (typeof console != \"undefined\")\n console.error(\"invalid modifier \" + parts[i] + \" in \" + keys);\n return false;\n }\n hashId |= modifier;\n }\n return {key: key, hashId: hashId};\n };\n\n this.findKeyCommand = function findKeyCommand(hashId, keyString) {\n var key = KEY_MODS[hashId] + keyString;\n return this.commandKeyBinding[key];\n };\n\n this.handleKeyboard = function(data, hashId, keyString, keyCode) {\n if (keyCode < 0) return;\n var key = KEY_MODS[hashId] + keyString;\n var command = this.commandKeyBinding[key];\n if (data.$keyChain) {\n data.$keyChain += \" \" + key;\n command = this.commandKeyBinding[data.$keyChain] || command;\n }\n \n if (command) {\n if (command == \"chainKeys\" || command[command.length - 1] == \"chainKeys\") {\n data.$keyChain = data.$keyChain || key;\n return {command: \"null\"};\n }\n }\n \n if (data.$keyChain) {\n if ((!hashId || hashId == 4) && keyString.length == 1)\n data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input\n else if (hashId == -1 || keyCode > 0)\n data.$keyChain = \"\"; // reset keyChain\n }\n return {command: command};\n };\n \n this.getStatusText = function(editor, data) {\n return data.$keyChain || \"\";\n };\n\n}).call(HashHandler.prototype);\n\nexports.HashHandler = HashHandler;\nexports.MultiHashHandler = MultiHashHandler;\n});\n\nace.define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar MultiHashHandler = acequire(\"../keyboard/hash_handler\").MultiHashHandler;\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CommandManager = function(platform, commands) {\n MultiHashHandler.call(this, commands, platform);\n this.byName = this.commands;\n this.setDefaultHandler(\"exec\", function(e) {\n return e.command.exec(e.editor, e.args || {});\n });\n};\n\noop.inherits(CommandManager, MultiHashHandler);\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.exec = function(command, editor, args) {\n if (Array.isArray(command)) {\n for (var i = command.length; i--; ) {\n if (this.exec(command[i], editor, args)) return true;\n }\n return false;\n }\n \n if (typeof command === \"string\")\n command = this.commands[command];\n\n if (!command)\n return false;\n\n if (editor && editor.$readOnly && !command.readOnly)\n return false;\n\n var e = {editor: editor, command: command, args: args};\n e.returnValue = this._emit(\"exec\", e);\n this._signal(\"afterExec\", e);\n\n return e.returnValue === false ? false : true;\n };\n\n this.toggleRecording = function(editor) {\n if (this.$inReplay)\n return;\n\n editor && editor._emit(\"changeStatus\");\n if (this.recording) {\n this.macro.pop();\n this.removeEventListener(\"exec\", this.$addCommandToMacro);\n\n if (!this.macro.length)\n this.macro = this.oldMacro;\n\n return this.recording = false;\n }\n if (!this.$addCommandToMacro) {\n this.$addCommandToMacro = function(e) {\n this.macro.push([e.command, e.args]);\n }.bind(this);\n }\n\n this.oldMacro = this.macro;\n this.macro = [];\n this.on(\"exec\", this.$addCommandToMacro);\n return this.recording = true;\n };\n\n this.replay = function(editor) {\n if (this.$inReplay || !this.macro)\n return;\n\n if (this.recording)\n return this.toggleRecording(editor);\n\n try {\n this.$inReplay = true;\n this.macro.forEach(function(x) {\n if (typeof x == \"string\")\n this.exec(x, editor);\n else\n this.exec(x[0], editor, x[1]);\n }, this);\n } finally {\n this.$inReplay = false;\n }\n };\n\n this.trimMacro = function(m) {\n return m.map(function(x){\n if (typeof x[0] != \"string\")\n x[0] = x[0].name;\n if (!x[1])\n x = x[0];\n return x;\n });\n };\n\n}).call(CommandManager.prototype);\n\nexports.CommandManager = CommandManager;\n\n});\n\nace.define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\nvar config = acequire(\"../config\");\nvar Range = acequire(\"../range\").Range;\n\nfunction bindKey(win, mac) {\n return {win: win, mac: mac};\n}\nexports.commands = [{\n name: \"showSettingsMenu\",\n bindKey: bindKey(\"Ctrl-,\", \"Command-,\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/settings_menu\", function(module) {\n module.init(editor);\n editor.showSettingsMenu();\n });\n },\n readOnly: true\n}, {\n name: \"goToNextError\",\n bindKey: bindKey(\"Alt-E\", \"F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, 1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"goToPreviousError\",\n bindKey: bindKey(\"Alt-Shift-E\", \"Shift-F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, -1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selectall\",\n bindKey: bindKey(\"Ctrl-A\", \"Command-A\"),\n exec: function(editor) { editor.selectAll(); },\n readOnly: true\n}, {\n name: \"centerselection\",\n bindKey: bindKey(null, \"Ctrl-L\"),\n exec: function(editor) { editor.centerSelection(); },\n readOnly: true\n}, {\n name: \"gotoline\",\n bindKey: bindKey(\"Ctrl-L\", \"Command-L\"),\n exec: function(editor) {\n var line = parseInt(prompt(\"Enter line number:\"), 10);\n if (!isNaN(line)) {\n editor.gotoLine(line);\n }\n },\n readOnly: true\n}, {\n name: \"fold\",\n bindKey: bindKey(\"Alt-L|Ctrl-F1\", \"Command-Alt-L|Command-F1\"),\n exec: function(editor) { editor.session.toggleFold(false); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfold\",\n bindKey: bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\", \"Command-Alt-Shift-L|Command-Shift-F1\"),\n exec: function(editor) { editor.session.toggleFold(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleFoldWidget\",\n bindKey: bindKey(\"F2\", \"F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleParentFoldWidget\",\n bindKey: bindKey(\"Alt-F2\", \"Alt-F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldall\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function(editor) { editor.session.foldAll(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldOther\",\n bindKey: bindKey(\"Alt-0\", \"Command-Option-0\"),\n exec: function(editor) { \n editor.session.foldAll();\n editor.session.unfold(editor.selection.getAllRanges());\n },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfoldall\",\n bindKey: bindKey(\"Alt-Shift-0\", \"Command-Option-Shift-0\"),\n exec: function(editor) { editor.session.unfold(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findnext\",\n bindKey: bindKey(\"Ctrl-K\", \"Command-G\"),\n exec: function(editor) { editor.findNext(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findprevious\",\n bindKey: bindKey(\"Ctrl-Shift-K\", \"Command-Shift-G\"),\n exec: function(editor) { editor.findPrevious(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"selectOrFindNext\",\n bindKey: bindKey(\"Alt-K\", \"Ctrl-G\"),\n exec: function(editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findNext(); \n },\n readOnly: true\n}, {\n name: \"selectOrFindPrevious\",\n bindKey: bindKey(\"Alt-Shift-K\", \"Ctrl-Shift-G\"),\n exec: function(editor) { \n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findPrevious();\n },\n readOnly: true\n}, {\n name: \"find\",\n bindKey: bindKey(\"Ctrl-F\", \"Command-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor)});\n },\n readOnly: true\n}, {\n name: \"overwrite\",\n bindKey: \"Insert\",\n exec: function(editor) { editor.toggleOverwrite(); },\n readOnly: true\n}, {\n name: \"selecttostart\",\n bindKey: bindKey(\"Ctrl-Shift-Home\", \"Command-Shift-Home|Command-Shift-Up\"),\n exec: function(editor) { editor.getSelection().selectFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotostart\",\n bindKey: bindKey(\"Ctrl-Home\", \"Command-Home|Command-Up\"),\n exec: function(editor) { editor.navigateFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectup\",\n bindKey: bindKey(\"Shift-Up\", \"Shift-Up|Ctrl-Shift-P\"),\n exec: function(editor) { editor.getSelection().selectUp(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golineup\",\n bindKey: bindKey(\"Up\", \"Up|Ctrl-P\"),\n exec: function(editor, args) { editor.navigateUp(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttoend\",\n bindKey: bindKey(\"Ctrl-Shift-End\", \"Command-Shift-End|Command-Shift-Down\"),\n exec: function(editor) { editor.getSelection().selectFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotoend\",\n bindKey: bindKey(\"Ctrl-End\", \"Command-End|Command-Down\"),\n exec: function(editor) { editor.navigateFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectdown\",\n bindKey: bindKey(\"Shift-Down\", \"Shift-Down|Ctrl-Shift-N\"),\n exec: function(editor) { editor.getSelection().selectDown(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golinedown\",\n bindKey: bindKey(\"Down\", \"Down|Ctrl-N\"),\n exec: function(editor, args) { editor.navigateDown(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordleft\",\n bindKey: bindKey(\"Ctrl-Shift-Left\", \"Option-Shift-Left\"),\n exec: function(editor) { editor.getSelection().selectWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordleft\",\n bindKey: bindKey(\"Ctrl-Left\", \"Option-Left\"),\n exec: function(editor) { editor.navigateWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolinestart\",\n bindKey: bindKey(\"Alt-Shift-Left\", \"Command-Shift-Left|Ctrl-Shift-A\"),\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolinestart\",\n bindKey: bindKey(\"Alt-Left|Home\", \"Command-Left|Home|Ctrl-A\"),\n exec: function(editor) { editor.navigateLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectleft\",\n bindKey: bindKey(\"Shift-Left\", \"Shift-Left|Ctrl-Shift-B\"),\n exec: function(editor) { editor.getSelection().selectLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoleft\",\n bindKey: bindKey(\"Left\", \"Left|Ctrl-B\"),\n exec: function(editor, args) { editor.navigateLeft(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordright\",\n bindKey: bindKey(\"Ctrl-Shift-Right\", \"Option-Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordright\",\n bindKey: bindKey(\"Ctrl-Right\", \"Option-Right\"),\n exec: function(editor) { editor.navigateWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolineend\",\n bindKey: bindKey(\"Alt-Shift-Right\", \"Command-Shift-Right|Shift-End|Ctrl-Shift-E\"),\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolineend\",\n bindKey: bindKey(\"Alt-Right|End\", \"Command-Right|End|Ctrl-E\"),\n exec: function(editor) { editor.navigateLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectright\",\n bindKey: bindKey(\"Shift-Right\", \"Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoright\",\n bindKey: bindKey(\"Right\", \"Right|Ctrl-F\"),\n exec: function(editor, args) { editor.navigateRight(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectpagedown\",\n bindKey: \"Shift-PageDown\",\n exec: function(editor) { editor.selectPageDown(); },\n readOnly: true\n}, {\n name: \"pagedown\",\n bindKey: bindKey(null, \"Option-PageDown\"),\n exec: function(editor) { editor.scrollPageDown(); },\n readOnly: true\n}, {\n name: \"gotopagedown\",\n bindKey: bindKey(\"PageDown\", \"PageDown|Ctrl-V\"),\n exec: function(editor) { editor.gotoPageDown(); },\n readOnly: true\n}, {\n name: \"selectpageup\",\n bindKey: \"Shift-PageUp\",\n exec: function(editor) { editor.selectPageUp(); },\n readOnly: true\n}, {\n name: \"pageup\",\n bindKey: bindKey(null, \"Option-PageUp\"),\n exec: function(editor) { editor.scrollPageUp(); },\n readOnly: true\n}, {\n name: \"gotopageup\",\n bindKey: \"PageUp\",\n exec: function(editor) { editor.gotoPageUp(); },\n readOnly: true\n}, {\n name: \"scrollup\",\n bindKey: bindKey(\"Ctrl-Up\", null),\n exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"scrolldown\",\n bindKey: bindKey(\"Ctrl-Down\", null),\n exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"selectlinestart\",\n bindKey: \"Shift-Home\",\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectlineend\",\n bindKey: \"Shift-End\",\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"togglerecording\",\n bindKey: bindKey(\"Ctrl-Alt-E\", \"Command-Option-E\"),\n exec: function(editor) { editor.commands.toggleRecording(editor); },\n readOnly: true\n}, {\n name: \"replaymacro\",\n bindKey: bindKey(\"Ctrl-Shift-E\", \"Command-Shift-E\"),\n exec: function(editor) { editor.commands.replay(editor); },\n readOnly: true\n}, {\n name: \"jumptomatching\",\n bindKey: bindKey(\"Ctrl-P\", \"Ctrl-P\"),\n exec: function(editor) { editor.jumpToMatching(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selecttomatching\",\n bindKey: bindKey(\"Ctrl-Shift-P\", \"Ctrl-Shift-P\"),\n exec: function(editor) { editor.jumpToMatching(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"expandToMatching\",\n bindKey: bindKey(\"Ctrl-Shift-M\", \"Ctrl-Shift-M\"),\n exec: function(editor) { editor.jumpToMatching(true, true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"passKeysToBrowser\",\n bindKey: bindKey(null, null),\n exec: function() {},\n passEvent: true,\n readOnly: true\n}, {\n name: \"copy\",\n exec: function(editor) {\n },\n readOnly: true\n},\n{\n name: \"cut\",\n exec: function(editor) {\n var range = editor.getSelectionRange();\n editor._emit(\"cut\", range);\n\n if (!editor.selection.isEmpty()) {\n editor.session.remove(range);\n editor.clearSelection();\n }\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"paste\",\n exec: function(editor, args) {\n editor.$handlePaste(args);\n },\n scrollIntoView: \"cursor\"\n}, {\n name: \"removeline\",\n bindKey: bindKey(\"Ctrl-D\", \"Command-D\"),\n exec: function(editor) { editor.removeLines(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"duplicateSelection\",\n bindKey: bindKey(\"Ctrl-Shift-D\", \"Command-Shift-D\"),\n exec: function(editor) { editor.duplicateSelection(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"sortlines\",\n bindKey: bindKey(\"Ctrl-Alt-S\", \"Command-Alt-S\"),\n exec: function(editor) { editor.sortLines(); },\n scrollIntoView: \"selection\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"togglecomment\",\n bindKey: bindKey(\"Ctrl-/\", \"Command-/\"),\n exec: function(editor) { editor.toggleCommentLines(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"toggleBlockComment\",\n bindKey: bindKey(\"Ctrl-Shift-/\", \"Command-Shift-/\"),\n exec: function(editor) { editor.toggleBlockComment(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"modifyNumberUp\",\n bindKey: bindKey(\"Ctrl-Shift-Up\", \"Alt-Shift-Up\"),\n exec: function(editor) { editor.modifyNumber(1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"modifyNumberDown\",\n bindKey: bindKey(\"Ctrl-Shift-Down\", \"Alt-Shift-Down\"),\n exec: function(editor) { editor.modifyNumber(-1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"replace\",\n bindKey: bindKey(\"Ctrl-H\", \"Command-Option-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor, true)});\n }\n}, {\n name: \"undo\",\n bindKey: bindKey(\"Ctrl-Z\", \"Command-Z\"),\n exec: function(editor) { editor.undo(); }\n}, {\n name: \"redo\",\n bindKey: bindKey(\"Ctrl-Shift-Z|Ctrl-Y\", \"Command-Shift-Z|Command-Y\"),\n exec: function(editor) { editor.redo(); }\n}, {\n name: \"copylinesup\",\n bindKey: bindKey(\"Alt-Shift-Up\", \"Command-Option-Up\"),\n exec: function(editor) { editor.copyLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesup\",\n bindKey: bindKey(\"Alt-Up\", \"Option-Up\"),\n exec: function(editor) { editor.moveLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"copylinesdown\",\n bindKey: bindKey(\"Alt-Shift-Down\", \"Command-Option-Down\"),\n exec: function(editor) { editor.copyLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesdown\",\n bindKey: bindKey(\"Alt-Down\", \"Option-Down\"),\n exec: function(editor) { editor.moveLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"del\",\n bindKey: bindKey(\"Delete\", \"Delete|Ctrl-D|Shift-Delete\"),\n exec: function(editor) { editor.remove(\"right\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"backspace\",\n bindKey: bindKey(\n \"Shift-Backspace|Backspace\",\n \"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H\"\n ),\n exec: function(editor) { editor.remove(\"left\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"cut_or_delete\",\n bindKey: bindKey(\"Shift-Delete\", null),\n exec: function(editor) { \n if (editor.selection.isEmpty()) {\n editor.remove(\"left\");\n } else {\n return false;\n }\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolinestart\",\n bindKey: bindKey(\"Alt-Backspace\", \"Command-Backspace\"),\n exec: function(editor) { editor.removeToLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolineend\",\n bindKey: bindKey(\"Alt-Delete\", \"Ctrl-K\"),\n exec: function(editor) { editor.removeToLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordleft\",\n bindKey: bindKey(\"Ctrl-Backspace\", \"Alt-Backspace|Ctrl-Alt-Backspace\"),\n exec: function(editor) { editor.removeWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordright\",\n bindKey: bindKey(\"Ctrl-Delete\", \"Alt-Delete\"),\n exec: function(editor) { editor.removeWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"outdent\",\n bindKey: bindKey(\"Shift-Tab\", \"Shift-Tab\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"indent\",\n bindKey: bindKey(\"Tab\", \"Tab\"),\n exec: function(editor) { editor.indent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockoutdent\",\n bindKey: bindKey(\"Ctrl-[\", \"Ctrl-[\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockindent\",\n bindKey: bindKey(\"Ctrl-]\", \"Ctrl-]\"),\n exec: function(editor) { editor.blockIndent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"insertstring\",\n exec: function(editor, str) { editor.insert(str); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"inserttext\",\n exec: function(editor, args) {\n editor.insert(lang.stringRepeat(args.text || \"\", args.times || 1));\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"splitline\",\n bindKey: bindKey(null, \"Ctrl-O\"),\n exec: function(editor) { editor.splitLine(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"transposeletters\",\n bindKey: bindKey(\"Ctrl-T\", \"Ctrl-T\"),\n exec: function(editor) { editor.transposeLetters(); },\n multiSelectAction: function(editor) {editor.transposeSelections(1); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"touppercase\",\n bindKey: bindKey(\"Ctrl-U\", \"Ctrl-U\"),\n exec: function(editor) { editor.toUpperCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"tolowercase\",\n bindKey: bindKey(\"Ctrl-Shift-U\", \"Ctrl-Shift-U\"),\n exec: function(editor) { editor.toLowerCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"expandtoline\",\n bindKey: bindKey(\"Ctrl-Shift-L\", \"Command-Shift-L\"),\n exec: function(editor) {\n var range = editor.selection.getRange();\n\n range.start.column = range.end.column = 0;\n range.end.row++;\n editor.selection.setRange(range, false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"joinlines\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var isBackwards = editor.selection.isBackwards();\n var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();\n var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();\n var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;\n var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());\n var selectedCount = selectedText.replace(/\\n\\s*/, \" \").length;\n var insertLine = editor.session.doc.getLine(selectionStart.row);\n\n for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {\n var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));\n if (curLine.length !== 0) {\n curLine = \" \" + curLine;\n }\n insertLine += curLine;\n }\n\n if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {\n insertLine += editor.session.doc.getNewLineCharacter();\n }\n\n editor.clearSelection();\n editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);\n\n if (selectedCount > 0) {\n editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);\n editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);\n } else {\n firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;\n editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);\n }\n },\n multiSelectAction: \"forEach\",\n readOnly: true\n}, {\n name: \"invertSelection\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var endRow = editor.session.doc.getLength() - 1;\n var endCol = editor.session.doc.getLine(endRow).length;\n var ranges = editor.selection.rangeList.ranges;\n var newRanges = [];\n if (ranges.length < 1) {\n ranges = [editor.selection.getRange()];\n }\n\n for (var i = 0; i < ranges.length; i++) {\n if (i == (ranges.length - 1)) {\n if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {\n newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));\n }\n }\n\n if (i === 0) {\n if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {\n newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));\n }\n } else {\n newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column));\n }\n }\n\n editor.exitMultiSelectMode();\n editor.clearSelection();\n\n for(var i = 0; i < newRanges.length; i++) {\n editor.selection.addRange(newRanges[i], false);\n }\n },\n readOnly: true,\n scrollIntoView: \"none\"\n}];\n\n});\n\nace.define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/keyboard/textinput\",\"ace/mouse/mouse_handler\",\"ace/mouse/fold_handler\",\"ace/keyboard/keybinding\",\"ace/edit_session\",\"ace/search\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/commands/command_manager\",\"ace/commands/default_commands\",\"ace/config\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar lang = acequire(\"./lib/lang\");\nvar useragent = acequire(\"./lib/useragent\");\nvar TextInput = acequire(\"./keyboard/textinput\").TextInput;\nvar MouseHandler = acequire(\"./mouse/mouse_handler\").MouseHandler;\nvar FoldHandler = acequire(\"./mouse/fold_handler\").FoldHandler;\nvar KeyBinding = acequire(\"./keyboard/keybinding\").KeyBinding;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar Search = acequire(\"./search\").Search;\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar CommandManager = acequire(\"./commands/command_manager\").CommandManager;\nvar defaultCommands = acequire(\"./commands/default_commands\").commands;\nvar config = acequire(\"./config\");\nvar TokenIterator = acequire(\"./token_iterator\").TokenIterator;\nvar Editor = function(renderer, session) {\n var container = renderer.getContainerElement();\n this.container = container;\n this.renderer = renderer;\n\n this.commands = new CommandManager(useragent.isMac ? \"mac\" : \"win\", defaultCommands);\n this.textInput = new TextInput(renderer.getTextAreaContainer(), this);\n this.renderer.textarea = this.textInput.getElement();\n this.keyBinding = new KeyBinding(this);\n this.$mouseHandler = new MouseHandler(this);\n new FoldHandler(this);\n\n this.$blockScrolling = 0;\n this.$search = new Search().set({\n wrap: true\n });\n\n this.$historyTracker = this.$historyTracker.bind(this);\n this.commands.on(\"exec\", this.$historyTracker);\n\n this.$initOperationListeners();\n \n this._$emitInputEvent = lang.delayedCall(function() {\n this._signal(\"input\", {});\n if (this.session && this.session.bgTokenizer)\n this.session.bgTokenizer.scheduleStart();\n }.bind(this));\n \n this.on(\"change\", function(_, _self) {\n _self._$emitInputEvent.schedule(31);\n });\n\n this.setSession(session || new EditSession(\"\"));\n config.resetOptions(this);\n config._signal(\"editor\", this);\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$initOperationListeners = function() {\n function last(a) {return a[a.length - 1]}\n\n this.selections = [];\n this.commands.on(\"exec\", this.startOperation.bind(this), true);\n this.commands.on(\"afterExec\", this.endOperation.bind(this), true);\n\n this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));\n\n this.on(\"change\", function() {\n this.curOp || this.startOperation();\n this.curOp.docChanged = true;\n }.bind(this), true);\n\n this.on(\"changeSelection\", function() {\n this.curOp || this.startOperation();\n this.curOp.selectionChanged = true;\n }.bind(this), true);\n };\n\n this.curOp = null;\n this.prevOp = {};\n this.startOperation = function(commadEvent) {\n if (this.curOp) {\n if (!commadEvent || this.curOp.command)\n return;\n this.prevOp = this.curOp;\n }\n if (!commadEvent) {\n this.previousCommand = null;\n commadEvent = {};\n }\n\n this.$opResetTimer.schedule();\n this.curOp = {\n command: commadEvent.command || {},\n args: commadEvent.args,\n scrollTop: this.renderer.scrollTop\n };\n if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)\n this.$blockScrolling++;\n };\n\n this.endOperation = function(e) {\n if (this.curOp) {\n if (e && e.returnValue === false)\n return this.curOp = null;\n this._signal(\"beforeEndOperation\");\n var command = this.curOp.command;\n if (command.name && this.$blockScrolling > 0)\n this.$blockScrolling--;\n var scrollIntoView = command && command.scrollIntoView;\n if (scrollIntoView) {\n switch (scrollIntoView) {\n case \"center-animate\":\n scrollIntoView = \"animate\";\n case \"center\":\n this.renderer.scrollCursorIntoView(null, 0.5);\n break;\n case \"animate\":\n case \"cursor\":\n this.renderer.scrollCursorIntoView();\n break;\n case \"selectionPart\":\n var range = this.selection.getRange();\n var config = this.renderer.layerConfig;\n if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {\n this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);\n }\n break;\n default:\n break;\n }\n if (scrollIntoView == \"animate\")\n this.renderer.animateScrolling(this.curOp.scrollTop);\n }\n \n this.prevOp = this.curOp;\n this.curOp = null;\n }\n };\n this.$mergeableCommands = [\"backspace\", \"del\", \"insertstring\"];\n this.$historyTracker = function(e) {\n if (!this.$mergeUndoDeltas)\n return;\n\n var prev = this.prevOp;\n var mergeableCommands = this.$mergeableCommands;\n var shouldMerge = prev.command && (e.command.name == prev.command.name);\n if (e.command.name == \"insertstring\") {\n var text = e.args;\n if (this.mergeNextCommand === undefined)\n this.mergeNextCommand = true;\n\n shouldMerge = shouldMerge\n && this.mergeNextCommand // previous command allows to coalesce with\n && (!/\\s/.test(text) || /\\s/.test(prev.args)); // previous insertion was of same type\n\n this.mergeNextCommand = true;\n } else {\n shouldMerge = shouldMerge\n && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable\n }\n\n if (\n this.$mergeUndoDeltas != \"always\"\n && Date.now() - this.sequenceStartTime > 2000\n ) {\n shouldMerge = false; // the sequence is too long\n }\n\n if (shouldMerge)\n this.session.mergeUndoDeltas = true;\n else if (mergeableCommands.indexOf(e.command.name) !== -1)\n this.sequenceStartTime = Date.now();\n };\n this.setKeyboardHandler = function(keyboardHandler, cb) {\n if (keyboardHandler && typeof keyboardHandler === \"string\") {\n this.$keybindingId = keyboardHandler;\n var _self = this;\n config.loadModule([\"keybinding\", keyboardHandler], function(module) {\n if (_self.$keybindingId == keyboardHandler)\n _self.keyBinding.setKeyboardHandler(module && module.handler);\n cb && cb();\n });\n } else {\n this.$keybindingId = null;\n this.keyBinding.setKeyboardHandler(keyboardHandler);\n cb && cb();\n }\n };\n this.getKeyboardHandler = function() {\n return this.keyBinding.getKeyboardHandler();\n };\n this.setSession = function(session) {\n if (this.session == session)\n return;\n if (this.curOp) this.endOperation();\n this.curOp = {};\n\n var oldSession = this.session;\n if (oldSession) {\n this.session.off(\"change\", this.$onDocumentChange);\n this.session.off(\"changeMode\", this.$onChangeMode);\n this.session.off(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.session.off(\"changeTabSize\", this.$onChangeTabSize);\n this.session.off(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.session.off(\"changeWrapMode\", this.$onChangeWrapMode);\n this.session.off(\"changeFold\", this.$onChangeFold);\n this.session.off(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.session.off(\"changeBackMarker\", this.$onChangeBackMarker);\n this.session.off(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.session.off(\"changeAnnotation\", this.$onChangeAnnotation);\n this.session.off(\"changeOverwrite\", this.$onCursorChange);\n this.session.off(\"changeScrollTop\", this.$onScrollTopChange);\n this.session.off(\"changeScrollLeft\", this.$onScrollLeftChange);\n\n var selection = this.session.getSelection();\n selection.off(\"changeCursor\", this.$onCursorChange);\n selection.off(\"changeSelection\", this.$onSelectionChange);\n }\n\n this.session = session;\n if (session) {\n this.$onDocumentChange = this.onDocumentChange.bind(this);\n session.on(\"change\", this.$onDocumentChange);\n this.renderer.setSession(session);\n \n this.$onChangeMode = this.onChangeMode.bind(this);\n session.on(\"changeMode\", this.$onChangeMode);\n \n this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);\n session.on(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n \n this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);\n session.on(\"changeTabSize\", this.$onChangeTabSize);\n \n this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);\n session.on(\"changeWrapLimit\", this.$onChangeWrapLimit);\n \n this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);\n session.on(\"changeWrapMode\", this.$onChangeWrapMode);\n \n this.$onChangeFold = this.onChangeFold.bind(this);\n session.on(\"changeFold\", this.$onChangeFold);\n \n this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);\n this.session.on(\"changeFrontMarker\", this.$onChangeFrontMarker);\n \n this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);\n this.session.on(\"changeBackMarker\", this.$onChangeBackMarker);\n \n this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);\n this.session.on(\"changeBreakpoint\", this.$onChangeBreakpoint);\n \n this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);\n this.session.on(\"changeAnnotation\", this.$onChangeAnnotation);\n \n this.$onCursorChange = this.onCursorChange.bind(this);\n this.session.on(\"changeOverwrite\", this.$onCursorChange);\n \n this.$onScrollTopChange = this.onScrollTopChange.bind(this);\n this.session.on(\"changeScrollTop\", this.$onScrollTopChange);\n \n this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);\n this.session.on(\"changeScrollLeft\", this.$onScrollLeftChange);\n \n this.selection = session.getSelection();\n this.selection.on(\"changeCursor\", this.$onCursorChange);\n \n this.$onSelectionChange = this.onSelectionChange.bind(this);\n this.selection.on(\"changeSelection\", this.$onSelectionChange);\n \n this.onChangeMode();\n \n this.$blockScrolling += 1;\n this.onCursorChange();\n this.$blockScrolling -= 1;\n \n this.onScrollTopChange();\n this.onScrollLeftChange();\n this.onSelectionChange();\n this.onChangeFrontMarker();\n this.onChangeBackMarker();\n this.onChangeBreakpoint();\n this.onChangeAnnotation();\n this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();\n this.renderer.updateFull();\n } else {\n this.selection = null;\n this.renderer.setSession(session);\n }\n\n this._signal(\"changeSession\", {\n session: session,\n oldSession: oldSession\n });\n \n this.curOp = null;\n \n oldSession && oldSession._signal(\"changeEditor\", {oldEditor: this});\n session && session._signal(\"changeEditor\", {editor: this});\n };\n this.getSession = function() {\n return this.session;\n };\n this.setValue = function(val, cursorPos) {\n this.session.doc.setValue(val);\n\n if (!cursorPos)\n this.selectAll();\n else if (cursorPos == 1)\n this.navigateFileEnd();\n else if (cursorPos == -1)\n this.navigateFileStart();\n\n return val;\n };\n this.getValue = function() {\n return this.session.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.resize = function(force) {\n this.renderer.onResize(force);\n };\n this.setTheme = function(theme, cb) {\n this.renderer.setTheme(theme, cb);\n };\n this.getTheme = function() {\n return this.renderer.getTheme();\n };\n this.setStyle = function(style) {\n this.renderer.setStyle(style);\n };\n this.unsetStyle = function(style) {\n this.renderer.unsetStyle(style);\n };\n this.getFontSize = function () {\n return this.getOption(\"fontSize\") ||\n dom.computedStyle(this.container, \"fontSize\");\n };\n this.setFontSize = function(size) {\n this.setOption(\"fontSize\", size);\n };\n\n this.$highlightBrackets = function() {\n if (this.session.$bracketHighlight) {\n this.session.removeMarker(this.session.$bracketHighlight);\n this.session.$bracketHighlight = null;\n }\n\n if (this.$highlightPending) {\n return;\n }\n var self = this;\n this.$highlightPending = true;\n setTimeout(function() {\n self.$highlightPending = false;\n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n var pos = session.findMatchingBracket(self.getCursorPosition());\n if (pos) {\n var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);\n } else if (session.$mode.getMatching) {\n var range = session.$mode.getMatching(self.session);\n }\n if (range)\n session.$bracketHighlight = session.addMarker(range, \"ace_bracket\", \"text\");\n }, 50);\n };\n this.$highlightTags = function() {\n if (this.$highlightTagPending)\n return;\n var self = this;\n this.$highlightTagPending = true;\n setTimeout(function() {\n self.$highlightTagPending = false;\n \n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n \n var pos = self.getCursorPosition();\n var iterator = new TokenIterator(self.session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n \n if (!token || !/\\b(?:tag-open|tag-name)/.test(token.type)) {\n session.removeMarker(session.$tagHighlight);\n session.$tagHighlight = null;\n return;\n }\n \n if (token.type.indexOf(\"tag-open\") != -1) {\n token = iterator.stepForward();\n if (!token)\n return;\n }\n \n var tag = token.value;\n var depth = 0;\n var prevToken = iterator.stepBackward();\n \n if (prevToken.value == '<'){\n do {\n prevToken = token;\n token = iterator.stepForward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<'){\n depth++;\n } else if (prevToken.value === '</'){\n depth--;\n }\n }\n \n } while (token && depth >= 0);\n } else {\n do {\n token = prevToken;\n prevToken = iterator.stepBackward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<') {\n depth++;\n } else if (prevToken.value === '</') {\n depth--;\n }\n }\n } while (prevToken && depth <= 0);\n iterator.stepForward();\n }\n \n if (!token) {\n session.removeMarker(session.$tagHighlight);\n session.$tagHighlight = null;\n return;\n }\n \n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn();\n var range = new Range(row, column, row, column+token.value.length);\n var sbm = session.$backMarkers[session.$tagHighlight];\n if (session.$tagHighlight && sbm != undefined && range.compareRange(sbm.range) !== 0) {\n session.removeMarker(session.$tagHighlight);\n session.$tagHighlight = null;\n }\n \n if (range && !session.$tagHighlight)\n session.$tagHighlight = session.addMarker(range, \"ace_bracket\", \"text\");\n }, 50);\n };\n this.focus = function() {\n var _self = this;\n setTimeout(function() {\n _self.textInput.focus();\n });\n this.textInput.focus();\n };\n this.isFocused = function() {\n return this.textInput.isFocused();\n };\n this.blur = function() {\n this.textInput.blur();\n };\n this.onFocus = function(e) {\n if (this.$isFocused)\n return;\n this.$isFocused = true;\n this.renderer.showCursor();\n this.renderer.visualizeFocus();\n this._emit(\"focus\", e);\n };\n this.onBlur = function(e) {\n if (!this.$isFocused)\n return;\n this.$isFocused = false;\n this.renderer.hideCursor();\n this.renderer.visualizeBlur();\n this._emit(\"blur\", e);\n };\n\n this.$cursorChange = function() {\n this.renderer.updateCursor();\n };\n this.onDocumentChange = function(delta) {\n var wrap = this.session.$useWrapMode;\n var lastRow = (delta.start.row == delta.end.row ? delta.end.row : Infinity);\n this.renderer.updateLines(delta.start.row, lastRow, wrap);\n\n this._signal(\"change\", delta);\n this.$cursorChange();\n this.$updateHighlightActiveLine();\n };\n\n this.onTokenizerUpdate = function(e) {\n var rows = e.data;\n this.renderer.updateLines(rows.first, rows.last);\n };\n\n\n this.onScrollTopChange = function() {\n this.renderer.scrollToY(this.session.getScrollTop());\n };\n\n this.onScrollLeftChange = function() {\n this.renderer.scrollToX(this.session.getScrollLeft());\n };\n this.onCursorChange = function() {\n this.$cursorChange();\n\n if (!this.$blockScrolling) {\n config.warn(\"Automatically scrolling cursor into view after selection change\",\n \"this will be disabled in the next version\",\n \"set editor.$blockScrolling = Infinity to disable this message\"\n );\n this.renderer.scrollCursorIntoView();\n }\n\n this.$highlightBrackets();\n this.$highlightTags();\n this.$updateHighlightActiveLine();\n this._signal(\"changeSelection\");\n };\n\n this.$updateHighlightActiveLine = function() {\n var session = this.getSession();\n\n var highlight;\n if (this.$highlightActiveLine) {\n if ((this.$selectionStyle != \"line\" || !this.selection.isMultiLine()))\n highlight = this.getCursorPosition();\n if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))\n highlight = false;\n }\n\n if (session.$highlightLineMarker && !highlight) {\n session.removeMarker(session.$highlightLineMarker.id);\n session.$highlightLineMarker = null;\n } else if (!session.$highlightLineMarker && highlight) {\n var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);\n range.id = session.addMarker(range, \"ace_active-line\", \"screenLine\");\n session.$highlightLineMarker = range;\n } else if (highlight) {\n session.$highlightLineMarker.start.row = highlight.row;\n session.$highlightLineMarker.end.row = highlight.row;\n session.$highlightLineMarker.start.column = highlight.column;\n session._signal(\"changeBackMarker\");\n }\n };\n\n this.onSelectionChange = function(e) {\n var session = this.session;\n\n if (session.$selectionMarker) {\n session.removeMarker(session.$selectionMarker);\n }\n session.$selectionMarker = null;\n\n if (!this.selection.isEmpty()) {\n var range = this.selection.getRange();\n var style = this.getSelectionStyle();\n session.$selectionMarker = session.addMarker(range, \"ace_selection\", style);\n } else {\n this.$updateHighlightActiveLine();\n }\n\n var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();\n this.session.highlight(re);\n\n this._signal(\"changeSelection\");\n };\n\n this.$getSelectionHighLightRegexp = function() {\n var session = this.session;\n\n var selection = this.getSelectionRange();\n if (selection.isEmpty() || selection.isMultiLine())\n return;\n\n var startOuter = selection.start.column - 1;\n var endOuter = selection.end.column + 1;\n var line = session.getLine(selection.start.row);\n var lineCols = line.length;\n var needle = line.substring(Math.max(startOuter, 0),\n Math.min(endOuter, lineCols));\n if ((startOuter >= 0 && /^[\\w\\d]/.test(needle)) ||\n (endOuter <= lineCols && /[\\w\\d]$/.test(needle)))\n return;\n\n needle = line.substring(selection.start.column, selection.end.column);\n if (!/^[\\w\\d]+$/.test(needle))\n return;\n\n var re = this.$search.$assembleRegExp({\n wholeWord: true,\n caseSensitive: true,\n needle: needle\n });\n\n return re;\n };\n\n\n this.onChangeFrontMarker = function() {\n this.renderer.updateFrontMarkers();\n };\n\n this.onChangeBackMarker = function() {\n this.renderer.updateBackMarkers();\n };\n\n\n this.onChangeBreakpoint = function() {\n this.renderer.updateBreakpoints();\n };\n\n this.onChangeAnnotation = function() {\n this.renderer.setAnnotations(this.session.getAnnotations());\n };\n\n\n this.onChangeMode = function(e) {\n this.renderer.updateText();\n this._emit(\"changeMode\", e);\n };\n\n\n this.onChangeWrapLimit = function() {\n this.renderer.updateFull();\n };\n\n this.onChangeWrapMode = function() {\n this.renderer.onResize(true);\n };\n\n\n this.onChangeFold = function() {\n this.$updateHighlightActiveLine();\n this.renderer.updateFull();\n };\n this.getSelectedText = function() {\n return this.session.getTextRange(this.getSelectionRange());\n };\n this.getCopyText = function() {\n var text = this.getSelectedText();\n this._signal(\"copy\", text);\n return text;\n };\n this.onCopy = function() {\n this.commands.exec(\"copy\", this);\n };\n this.onCut = function() {\n this.commands.exec(\"cut\", this);\n };\n this.onPaste = function(text, event) {\n var e = {text: text, event: event};\n this.commands.exec(\"paste\", this, e);\n };\n \n this.$handlePaste = function(e) {\n if (typeof e == \"string\") \n e = {text: e};\n this._signal(\"paste\", e);\n var text = e.text;\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {\n this.insert(text);\n } else {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var ranges = this.selection.rangeList.ranges;\n \n if (lines.length > ranges.length || lines.length < 2 || !lines[1])\n return this.commands.exec(\"insertstring\", this, text);\n \n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.isEmpty())\n this.session.remove(range);\n \n this.session.insert(range.start, lines[i]);\n }\n }\n };\n\n this.execCommand = function(command, args) {\n return this.commands.exec(command, this, args);\n };\n this.insert = function(text, pasted) {\n var session = this.session;\n var mode = session.getMode();\n var cursor = this.getCursorPosition();\n\n if (this.getBehavioursEnabled() && !pasted) {\n var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);\n if (transform) {\n if (text !== transform.text) {\n this.session.mergeUndoDeltas = false;\n this.$mergeNextCommand = false;\n }\n text = transform.text;\n\n }\n }\n \n if (text == \"\\t\")\n text = this.session.getTabString();\n if (!this.selection.isEmpty()) {\n var range = this.getSelectionRange();\n cursor = this.session.remove(range);\n this.clearSelection();\n }\n else if (this.session.getOverwrite()) {\n var range = new Range.fromPoints(cursor, cursor);\n range.end.column += text.length;\n this.session.remove(range);\n }\n\n if (text == \"\\n\" || text == \"\\r\\n\") {\n var line = session.getLine(cursor.row);\n if (cursor.column > line.search(/\\S|$/)) {\n var d = line.substr(cursor.column).search(/\\S|$/);\n session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);\n }\n }\n this.clearSelection();\n\n var start = cursor.column;\n var lineState = session.getState(cursor.row);\n var line = session.getLine(cursor.row);\n var shouldOutdent = mode.checkOutdent(lineState, line, text);\n var end = session.insert(cursor, text);\n\n if (transform && transform.selection) {\n if (transform.selection.length == 2) { // Transform relative to the current column\n this.selection.setSelectionRange(\n new Range(cursor.row, start + transform.selection[0],\n cursor.row, start + transform.selection[1]));\n } else { // Transform relative to the current row.\n this.selection.setSelectionRange(\n new Range(cursor.row + transform.selection[0],\n transform.selection[1],\n cursor.row + transform.selection[2],\n transform.selection[3]));\n }\n }\n\n if (session.getDocument().isNewLine(text)) {\n var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());\n\n session.insert({row: cursor.row+1, column: 0}, lineIndent);\n }\n if (shouldOutdent)\n mode.autoOutdent(lineState, session, cursor.row);\n };\n\n this.onTextInput = function(text) {\n this.keyBinding.onTextInput(text);\n };\n\n this.onCommandKey = function(e, hashId, keyCode) {\n this.keyBinding.onCommandKey(e, hashId, keyCode);\n };\n this.setOverwrite = function(overwrite) {\n this.session.setOverwrite(overwrite);\n };\n this.getOverwrite = function() {\n return this.session.getOverwrite();\n };\n this.toggleOverwrite = function() {\n this.session.toggleOverwrite();\n };\n this.setScrollSpeed = function(speed) {\n this.setOption(\"scrollSpeed\", speed);\n };\n this.getScrollSpeed = function() {\n return this.getOption(\"scrollSpeed\");\n };\n this.setDragDelay = function(dragDelay) {\n this.setOption(\"dragDelay\", dragDelay);\n };\n this.getDragDelay = function() {\n return this.getOption(\"dragDelay\");\n };\n this.setSelectionStyle = function(val) {\n this.setOption(\"selectionStyle\", val);\n };\n this.getSelectionStyle = function() {\n return this.getOption(\"selectionStyle\");\n };\n this.setHighlightActiveLine = function(shouldHighlight) {\n this.setOption(\"highlightActiveLine\", shouldHighlight);\n };\n this.getHighlightActiveLine = function() {\n return this.getOption(\"highlightActiveLine\");\n };\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n this.setHighlightSelectedWord = function(shouldHighlight) {\n this.setOption(\"highlightSelectedWord\", shouldHighlight);\n };\n this.getHighlightSelectedWord = function() {\n return this.$highlightSelectedWord;\n };\n\n this.setAnimatedScroll = function(shouldAnimate){\n this.renderer.setAnimatedScroll(shouldAnimate);\n };\n\n this.getAnimatedScroll = function(){\n return this.renderer.getAnimatedScroll();\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.renderer.setShowInvisibles(showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.renderer.getShowInvisibles();\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.renderer.setDisplayIndentGuides(display);\n };\n\n this.getDisplayIndentGuides = function() {\n return this.renderer.getDisplayIndentGuides();\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.renderer.setShowPrintMargin(showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.renderer.getShowPrintMargin();\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.renderer.setPrintMarginColumn(showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.renderer.getPrintMarginColumn();\n };\n this.setReadOnly = function(readOnly) {\n this.setOption(\"readOnly\", readOnly);\n };\n this.getReadOnly = function() {\n return this.getOption(\"readOnly\");\n };\n this.setBehavioursEnabled = function (enabled) {\n this.setOption(\"behavioursEnabled\", enabled);\n };\n this.getBehavioursEnabled = function () {\n return this.getOption(\"behavioursEnabled\");\n };\n this.setWrapBehavioursEnabled = function (enabled) {\n this.setOption(\"wrapBehavioursEnabled\", enabled);\n };\n this.getWrapBehavioursEnabled = function () {\n return this.getOption(\"wrapBehavioursEnabled\");\n };\n this.setShowFoldWidgets = function(show) {\n this.setOption(\"showFoldWidgets\", show);\n\n };\n this.getShowFoldWidgets = function() {\n return this.getOption(\"showFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function(fade) {\n this.setOption(\"fadeFoldWidgets\", fade);\n };\n\n this.getFadeFoldWidgets = function() {\n return this.getOption(\"fadeFoldWidgets\");\n };\n this.remove = function(dir) {\n if (this.selection.isEmpty()){\n if (dir == \"left\")\n this.selection.selectLeft();\n else\n this.selection.selectRight();\n }\n\n var range = this.getSelectionRange();\n if (this.getBehavioursEnabled()) {\n var session = this.session;\n var state = session.getState(range.start.row);\n var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);\n\n if (range.end.column === 0) {\n var text = session.getTextRange(range);\n if (text[text.length - 1] == \"\\n\") {\n var line = session.getLine(range.end.row);\n if (/^\\s+$/.test(line)) {\n range.end.column = line.length;\n }\n }\n }\n if (new_range)\n range = new_range;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.removeWordRight = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordRight();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeWordLeft = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordLeft();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineStart = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineStart();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineEnd = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineEnd();\n\n var range = this.getSelectionRange();\n if (range.start.column == range.end.column && range.start.row == range.end.row) {\n range.end.column = 0;\n range.end.row++;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.splitLine = function() {\n if (!this.selection.isEmpty()) {\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n }\n\n var cursor = this.getCursorPosition();\n this.insert(\"\\n\");\n this.moveCursorToPosition(cursor);\n };\n this.transposeLetters = function() {\n if (!this.selection.isEmpty()) {\n return;\n }\n\n var cursor = this.getCursorPosition();\n var column = cursor.column;\n if (column === 0)\n return;\n\n var line = this.session.getLine(cursor.row);\n var swap, range;\n if (column < line.length) {\n swap = line.charAt(column) + line.charAt(column-1);\n range = new Range(cursor.row, column-1, cursor.row, column+1);\n }\n else {\n swap = line.charAt(column-1) + line.charAt(column-2);\n range = new Range(cursor.row, column-2, cursor.row, column);\n }\n this.session.replace(range, swap);\n };\n this.toLowerCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toLowerCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.toUpperCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toUpperCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.indent = function() {\n var session = this.session;\n var range = this.getSelectionRange();\n\n if (range.start.row < range.end.row) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n } else if (range.start.column < range.end.column) {\n var text = session.getTextRange(range);\n if (!/^\\s+$/.test(text)) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n }\n \n var line = session.getLine(range.start.row);\n var position = range.start;\n var size = session.getTabSize();\n var column = session.documentToScreenColumn(position.row, position.column);\n\n if (this.session.getUseSoftTabs()) {\n var count = (size - column % size);\n var indentString = lang.stringRepeat(\" \", count);\n } else {\n var count = column % size;\n while (line[range.start.column - 1] == \" \" && count) {\n range.start.column--;\n count--;\n }\n this.selection.setSelectionRange(range);\n indentString = \"\\t\";\n }\n return this.insert(indentString);\n };\n this.blockIndent = function() {\n var rows = this.$getSelectedRows();\n this.session.indentRows(rows.first, rows.last, \"\\t\");\n };\n this.blockOutdent = function() {\n var selection = this.session.getSelection();\n this.session.outdentRows(selection.getRange());\n };\n this.sortLines = function() {\n var rows = this.$getSelectedRows();\n var session = this.session;\n\n var lines = [];\n for (i = rows.first; i <= rows.last; i++)\n lines.push(session.getLine(i));\n\n lines.sort(function(a, b) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n if (a.toLowerCase() > b.toLowerCase()) return 1;\n return 0;\n });\n\n var deleteRange = new Range(0, 0, 0, 0);\n for (var i = rows.first; i <= rows.last; i++) {\n var line = session.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n deleteRange.end.column = line.length;\n session.replace(deleteRange, lines[i-rows.first]);\n }\n };\n this.toggleCommentLines = function() {\n var state = this.session.getState(this.getCursorPosition().row);\n var rows = this.$getSelectedRows();\n this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);\n };\n\n this.toggleBlockComment = function() {\n var cursor = this.getCursorPosition();\n var state = this.session.getState(cursor.row);\n var range = this.getSelectionRange();\n this.session.getMode().toggleBlockComment(state, this.session, range, cursor);\n };\n this.getNumberAt = function(row, column) {\n var _numberRx = /[\\-]?[0-9]+(?:\\.[0-9]+)?/g;\n _numberRx.lastIndex = 0;\n\n var s = this.session.getLine(row);\n while (_numberRx.lastIndex < column) {\n var m = _numberRx.exec(s);\n if(m.index <= column && m.index+m[0].length >= column){\n var number = {\n value: m[0],\n start: m.index,\n end: m.index+m[0].length\n };\n return number;\n }\n }\n return null;\n };\n this.modifyNumber = function(amount) {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n var charRange = new Range(row, column-1, row, column);\n\n var c = this.session.getTextRange(charRange);\n if (!isNaN(parseFloat(c)) && isFinite(c)) {\n var nr = this.getNumberAt(row, column);\n if (nr) {\n var fp = nr.value.indexOf(\".\") >= 0 ? nr.start + nr.value.indexOf(\".\") + 1 : nr.end;\n var decimals = nr.start + nr.value.length - fp;\n\n var t = parseFloat(nr.value);\n t *= Math.pow(10, decimals);\n\n\n if(fp !== nr.end && column < fp){\n amount *= Math.pow(10, nr.end - column - 1);\n } else {\n amount *= Math.pow(10, nr.end - column);\n }\n\n t += amount;\n t /= Math.pow(10, decimals);\n var nnr = t.toFixed(decimals);\n var replaceRange = new Range(row, nr.start, row, nr.end);\n this.session.replace(replaceRange, nnr);\n this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));\n\n }\n }\n };\n this.removeLines = function() {\n var rows = this.$getSelectedRows();\n this.session.removeFullLines(rows.first, rows.last);\n this.clearSelection();\n };\n\n this.duplicateSelection = function() {\n var sel = this.selection;\n var doc = this.session;\n var range = sel.getRange();\n var reverse = sel.isBackwards();\n if (range.isEmpty()) {\n var row = range.start.row;\n doc.duplicateLines(row, row);\n } else {\n var point = reverse ? range.start : range.end;\n var endPoint = doc.insert(point, doc.getTextRange(range), false);\n range.start = point;\n range.end = endPoint;\n\n sel.setSelectionRange(range, reverse);\n }\n };\n this.moveLinesDown = function() {\n this.$moveLines(1, false);\n };\n this.moveLinesUp = function() {\n this.$moveLines(-1, false);\n };\n this.moveText = function(range, toPosition, copy) {\n return this.session.moveText(range, toPosition, copy);\n };\n this.copyLinesUp = function() {\n this.$moveLines(-1, true);\n };\n this.copyLinesDown = function() {\n this.$moveLines(1, true);\n };\n this.$moveLines = function(dir, copy) {\n var rows, moved;\n var selection = this.selection;\n if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {\n var range = selection.toOrientedRange();\n rows = this.$getSelectedRows(range);\n moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);\n if (copy && dir == -1) moved = 0;\n range.moveBy(moved, 0);\n selection.fromOrientedRange(range);\n } else {\n var ranges = selection.rangeList.ranges;\n selection.rangeList.detach(this.session);\n this.inVirtualSelectionMode = true;\n \n var diff = 0;\n var totalDiff = 0;\n var l = ranges.length;\n for (var i = 0; i < l; i++) {\n var rangeIndex = i;\n ranges[i].moveBy(diff, 0);\n rows = this.$getSelectedRows(ranges[i]);\n var first = rows.first;\n var last = rows.last;\n while (++i < l) {\n if (totalDiff) ranges[i].moveBy(totalDiff, 0);\n var subRows = this.$getSelectedRows(ranges[i]);\n if (copy && subRows.first != last)\n break;\n else if (!copy && subRows.first > last + 1)\n break;\n last = subRows.last;\n }\n i--;\n diff = this.session.$moveLines(first, last, copy ? 0 : dir);\n if (copy && dir == -1) rangeIndex = i + 1;\n while (rangeIndex <= i) {\n ranges[rangeIndex].moveBy(diff, 0);\n rangeIndex++;\n }\n if (!copy) diff = 0;\n totalDiff += diff;\n }\n \n selection.fromOrientedRange(selection.ranges[0]);\n selection.rangeList.attach(this.session);\n this.inVirtualSelectionMode = false;\n }\n };\n this.$getSelectedRows = function(range) {\n range = (range || this.getSelectionRange()).collapseRows();\n\n return {\n first: this.session.getRowFoldStart(range.start.row),\n last: this.session.getRowFoldEnd(range.end.row)\n };\n };\n\n this.onCompositionStart = function(text) {\n this.renderer.showComposition(this.getCursorPosition());\n };\n\n this.onCompositionUpdate = function(text) {\n this.renderer.setCompositionText(text);\n };\n\n this.onCompositionEnd = function() {\n this.renderer.hideComposition();\n };\n this.getFirstVisibleRow = function() {\n return this.renderer.getFirstVisibleRow();\n };\n this.getLastVisibleRow = function() {\n return this.renderer.getLastVisibleRow();\n };\n this.isRowVisible = function(row) {\n return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());\n };\n this.isRowFullyVisible = function(row) {\n return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());\n };\n this.$getVisibleRowCount = function() {\n return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;\n };\n\n this.$moveByPage = function(dir, select) {\n var renderer = this.renderer;\n var config = this.renderer.layerConfig;\n var rows = dir * Math.floor(config.height / config.lineHeight);\n\n this.$blockScrolling++;\n if (select === true) {\n this.selection.$moveSelection(function(){\n this.moveCursorBy(rows, 0);\n });\n } else if (select === false) {\n this.selection.moveCursorBy(rows, 0);\n this.selection.clearSelection();\n }\n this.$blockScrolling--;\n\n var scrollTop = renderer.scrollTop;\n\n renderer.scrollBy(0, rows * config.lineHeight);\n if (select != null)\n renderer.scrollCursorIntoView(null, 0.5);\n\n renderer.animateScrolling(scrollTop);\n };\n this.selectPageDown = function() {\n this.$moveByPage(1, true);\n };\n this.selectPageUp = function() {\n this.$moveByPage(-1, true);\n };\n this.gotoPageDown = function() {\n this.$moveByPage(1, false);\n };\n this.gotoPageUp = function() {\n this.$moveByPage(-1, false);\n };\n this.scrollPageDown = function() {\n this.$moveByPage(1);\n };\n this.scrollPageUp = function() {\n this.$moveByPage(-1);\n };\n this.scrollToRow = function(row) {\n this.renderer.scrollToRow(row);\n };\n this.scrollToLine = function(line, center, animate, callback) {\n this.renderer.scrollToLine(line, center, animate, callback);\n };\n this.centerSelection = function() {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n };\n this.getCursorPosition = function() {\n return this.selection.getCursor();\n };\n this.getCursorPositionScreen = function() {\n return this.session.documentToScreenPosition(this.getCursorPosition());\n };\n this.getSelectionRange = function() {\n return this.selection.getRange();\n };\n this.selectAll = function() {\n this.$blockScrolling += 1;\n this.selection.selectAll();\n this.$blockScrolling -= 1;\n };\n this.clearSelection = function() {\n this.selection.clearSelection();\n };\n this.moveCursorTo = function(row, column) {\n this.selection.moveCursorTo(row, column);\n };\n this.moveCursorToPosition = function(pos) {\n this.selection.moveCursorToPosition(pos);\n };\n this.jumpToMatching = function(select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var token = prevToken || iterator.stepForward();\n\n if (!token) return;\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n \n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n break;\n }\n }\n }\n else if (token && token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n \n if (prevToken.value === '<') {\n depth[token.value]++;\n }\n else if (prevToken.value === '</') {\n depth[token.value]--;\n }\n \n if (depth[token.value] === -1) {\n matchType = 'tag';\n found = true;\n }\n }\n\n if (!found) {\n prevToken = token;\n token = iterator.stepForward();\n i = 0;\n }\n } while (token && !found);\n if (!matchType)\n return;\n\n var range, pos;\n if (matchType === 'bracket') {\n range = this.session.getBracketRange(cursor);\n if (!range) {\n range = new Range(\n iterator.getCurrentTokenRow(),\n iterator.getCurrentTokenColumn() + i - 1,\n iterator.getCurrentTokenRow(),\n iterator.getCurrentTokenColumn() + i - 1\n );\n pos = range.start;\n if (expand || pos.row === cursor.row && Math.abs(pos.column - cursor.column) < 2)\n range = this.session.getBracketRange(pos);\n }\n }\n else if (matchType === 'tag') {\n if (token && token.type.indexOf('tag-name') !== -1) \n var tag = token.value;\n else\n return;\n\n range = new Range(\n iterator.getCurrentTokenRow(),\n iterator.getCurrentTokenColumn() - 2,\n iterator.getCurrentTokenRow(),\n iterator.getCurrentTokenColumn() - 2\n );\n if (range.compare(cursor.row, cursor.column) === 0) {\n found = false;\n do {\n token = prevToken;\n prevToken = iterator.stepBackward();\n \n if (prevToken) {\n if (prevToken.type.indexOf('tag-close') !== -1) {\n range.setEnd(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1);\n }\n\n if (token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<') {\n depth[tag]++;\n }\n else if (prevToken.value === '</') {\n depth[tag]--;\n }\n \n if (depth[tag] === 0)\n found = true;\n }\n }\n } while (prevToken && !found);\n }\n if (token && token.type.indexOf('tag-name')) {\n pos = range.start;\n if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)\n pos = range.end;\n }\n }\n\n pos = range && range.cursor || pos;\n if (pos) {\n if (select) {\n if (range && expand) {\n this.selection.setRange(range);\n } else if (range && range.isEqual(this.getSelectionRange())) {\n this.clearSelection();\n } else {\n this.selection.selectTo(pos.row, pos.column);\n }\n } else {\n this.selection.moveTo(pos.row, pos.column);\n }\n }\n };\n this.gotoLine = function(lineNumber, column, animate) {\n this.selection.clearSelection();\n this.session.unfold({row: lineNumber - 1, column: column || 0});\n\n this.$blockScrolling += 1;\n this.exitMultiSelectMode && this.exitMultiSelectMode();\n this.moveCursorTo(lineNumber - 1, column || 0);\n this.$blockScrolling -= 1;\n\n if (!this.isRowFullyVisible(lineNumber - 1))\n this.scrollToLine(lineNumber - 1, true, animate);\n };\n this.navigateTo = function(row, column) {\n this.selection.moveTo(row, column);\n };\n this.navigateUp = function(times) {\n if (this.selection.isMultiLine() && !this.selection.isBackwards()) {\n var selectionStart = this.selection.anchor.getPosition();\n return this.moveCursorToPosition(selectionStart);\n }\n this.selection.clearSelection();\n this.selection.moveCursorBy(-times || -1, 0);\n };\n this.navigateDown = function(times) {\n if (this.selection.isMultiLine() && this.selection.isBackwards()) {\n var selectionEnd = this.selection.anchor.getPosition();\n return this.moveCursorToPosition(selectionEnd);\n }\n this.selection.clearSelection();\n this.selection.moveCursorBy(times || 1, 0);\n };\n this.navigateLeft = function(times) {\n if (!this.selection.isEmpty()) {\n var selectionStart = this.getSelectionRange().start;\n this.moveCursorToPosition(selectionStart);\n }\n else {\n times = times || 1;\n while (times--) {\n this.selection.moveCursorLeft();\n }\n }\n this.clearSelection();\n };\n this.navigateRight = function(times) {\n if (!this.selection.isEmpty()) {\n var selectionEnd = this.getSelectionRange().end;\n this.moveCursorToPosition(selectionEnd);\n }\n else {\n times = times || 1;\n while (times--) {\n this.selection.moveCursorRight();\n }\n }\n this.clearSelection();\n };\n this.navigateLineStart = function() {\n this.selection.moveCursorLineStart();\n this.clearSelection();\n };\n this.navigateLineEnd = function() {\n this.selection.moveCursorLineEnd();\n this.clearSelection();\n };\n this.navigateFileEnd = function() {\n this.selection.moveCursorFileEnd();\n this.clearSelection();\n };\n this.navigateFileStart = function() {\n this.selection.moveCursorFileStart();\n this.clearSelection();\n };\n this.navigateWordRight = function() {\n this.selection.moveCursorWordRight();\n this.clearSelection();\n };\n this.navigateWordLeft = function() {\n this.selection.moveCursorWordLeft();\n this.clearSelection();\n };\n this.replace = function(replacement, options) {\n if (options)\n this.$search.set(options);\n\n var range = this.$search.find(this.session);\n var replaced = 0;\n if (!range)\n return replaced;\n\n if (this.$tryReplace(range, replacement)) {\n replaced = 1;\n }\n if (range !== null) {\n this.selection.setSelectionRange(range);\n this.renderer.scrollSelectionIntoView(range.start, range.end);\n }\n\n return replaced;\n };\n this.replaceAll = function(replacement, options) {\n if (options) {\n this.$search.set(options);\n }\n\n var ranges = this.$search.findAll(this.session);\n var replaced = 0;\n if (!ranges.length)\n return replaced;\n\n this.$blockScrolling += 1;\n\n var selection = this.getSelectionRange();\n this.selection.moveTo(0, 0);\n\n for (var i = ranges.length - 1; i >= 0; --i) {\n if(this.$tryReplace(ranges[i], replacement)) {\n replaced++;\n }\n }\n\n this.selection.setSelectionRange(selection);\n this.$blockScrolling -= 1;\n\n return replaced;\n };\n\n this.$tryReplace = function(range, replacement) {\n var input = this.session.getTextRange(range);\n replacement = this.$search.replace(input, replacement);\n if (replacement !== null) {\n range.end = this.session.replace(range, replacement);\n return range;\n } else {\n return null;\n }\n };\n this.getLastSearchOptions = function() {\n return this.$search.getOptions();\n };\n this.find = function(needle, options, animate) {\n if (!options)\n options = {};\n\n if (typeof needle == \"string\" || needle instanceof RegExp)\n options.needle = needle;\n else if (typeof needle == \"object\")\n oop.mixin(options, needle);\n\n var range = this.selection.getRange();\n if (options.needle == null) {\n needle = this.session.getTextRange(range)\n || this.$search.$options.needle;\n if (!needle) {\n range = this.session.getWordRange(range.start.row, range.start.column);\n needle = this.session.getTextRange(range);\n }\n this.$search.set({needle: needle});\n }\n\n this.$search.set(options);\n if (!options.start)\n this.$search.set({start: range});\n\n var newRange = this.$search.find(this.session);\n if (options.preventScroll)\n return newRange;\n if (newRange) {\n this.revealRange(newRange, animate);\n return newRange;\n }\n if (options.backwards)\n range.start = range.end;\n else\n range.end = range.start;\n this.selection.setRange(range);\n };\n this.findNext = function(options, animate) {\n this.find({skipCurrent: true, backwards: false}, options, animate);\n };\n this.findPrevious = function(options, animate) {\n this.find(options, {skipCurrent: true, backwards: true}, animate);\n };\n\n this.revealRange = function(range, animate) {\n this.$blockScrolling += 1;\n this.session.unfold(range);\n this.selection.setSelectionRange(range);\n this.$blockScrolling -= 1;\n\n var scrollTop = this.renderer.scrollTop;\n this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);\n if (animate !== false)\n this.renderer.animateScrolling(scrollTop);\n };\n this.undo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().undo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.redo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().redo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.destroy = function() {\n this.renderer.destroy();\n this._signal(\"destroy\", this);\n if (this.session) {\n this.session.destroy();\n }\n };\n this.setAutoScrollEditorIntoView = function(enable) {\n if (!enable)\n return;\n var rect;\n var self = this;\n var shouldScroll = false;\n if (!this.$scrollAnchor)\n this.$scrollAnchor = document.createElement(\"div\");\n var scrollAnchor = this.$scrollAnchor;\n scrollAnchor.style.cssText = \"position:absolute\";\n this.container.insertBefore(scrollAnchor, this.container.firstChild);\n var onChangeSelection = this.on(\"changeSelection\", function() {\n shouldScroll = true;\n });\n var onBeforeRender = this.renderer.on(\"beforeRender\", function() {\n if (shouldScroll)\n rect = self.renderer.container.getBoundingClientRect();\n });\n var onAfterRender = this.renderer.on(\"afterRender\", function() {\n if (shouldScroll && rect && (self.isFocused()\n || self.searchBox && self.searchBox.isFocused())\n ) {\n var renderer = self.renderer;\n var pos = renderer.$cursorLayer.$pixelPos;\n var config = renderer.layerConfig;\n var top = pos.top - config.offset;\n if (pos.top >= 0 && top + rect.top < 0) {\n shouldScroll = true;\n } else if (pos.top < config.height &&\n pos.top + rect.top + config.lineHeight > window.innerHeight) {\n shouldScroll = false;\n } else {\n shouldScroll = null;\n }\n if (shouldScroll != null) {\n scrollAnchor.style.top = top + \"px\";\n scrollAnchor.style.left = pos.left + \"px\";\n scrollAnchor.style.height = config.lineHeight + \"px\";\n scrollAnchor.scrollIntoView(shouldScroll);\n }\n shouldScroll = rect = null;\n }\n });\n this.setAutoScrollEditorIntoView = function(enable) {\n if (enable)\n return;\n delete this.setAutoScrollEditorIntoView;\n this.off(\"changeSelection\", onChangeSelection);\n this.renderer.off(\"afterRender\", onAfterRender);\n this.renderer.off(\"beforeRender\", onBeforeRender);\n };\n };\n\n\n this.$resetCursorStyle = function() {\n var style = this.$cursorStyle || \"ace\";\n var cursorLayer = this.renderer.$cursorLayer;\n if (!cursorLayer)\n return;\n cursorLayer.setSmoothBlinking(/smooth/.test(style));\n cursorLayer.isBlinking = !this.$readOnly && style != \"wide\";\n dom.setCssClass(cursorLayer.element, \"ace_slim-cursors\", /slim/.test(style));\n };\n\n}).call(Editor.prototype);\n\n\n\nconfig.defineOptions(Editor.prototype, \"editor\", {\n selectionStyle: {\n set: function(style) {\n this.onSelectionChange();\n this._signal(\"changeSelectionStyle\", {data: style});\n },\n initialValue: \"line\"\n },\n highlightActiveLine: {\n set: function() {this.$updateHighlightActiveLine();},\n initialValue: true\n },\n highlightSelectedWord: {\n set: function(shouldHighlight) {this.$onSelectionChange();},\n initialValue: true\n },\n readOnly: {\n set: function(readOnly) {\n this.$resetCursorStyle(); \n },\n initialValue: false\n },\n cursorStyle: {\n set: function(val) { this.$resetCursorStyle(); },\n values: [\"ace\", \"slim\", \"smooth\", \"wide\"],\n initialValue: \"ace\"\n },\n mergeUndoDeltas: {\n values: [false, true, \"always\"],\n initialValue: true\n },\n behavioursEnabled: {initialValue: true},\n wrapBehavioursEnabled: {initialValue: true},\n autoScrollEditorIntoView: {\n set: function(val) {this.setAutoScrollEditorIntoView(val)}\n },\n keyboardHandler: {\n set: function(val) { this.setKeyboardHandler(val); },\n get: function() { return this.keybindingId; },\n handlesSet: true\n },\n\n hScrollBarAlwaysVisible: \"renderer\",\n vScrollBarAlwaysVisible: \"renderer\",\n highlightGutterLine: \"renderer\",\n animatedScroll: \"renderer\",\n showInvisibles: \"renderer\",\n showPrintMargin: \"renderer\",\n printMarginColumn: \"renderer\",\n printMargin: \"renderer\",\n fadeFoldWidgets: \"renderer\",\n showFoldWidgets: \"renderer\",\n showLineNumbers: \"renderer\",\n showGutter: \"renderer\",\n displayIndentGuides: \"renderer\",\n fontSize: \"renderer\",\n fontFamily: \"renderer\",\n maxLines: \"renderer\",\n minLines: \"renderer\",\n scrollPastEnd: \"renderer\",\n fixedWidthGutter: \"renderer\",\n theme: \"renderer\",\n\n scrollSpeed: \"$mouseHandler\",\n dragDelay: \"$mouseHandler\",\n dragEnabled: \"$mouseHandler\",\n focusTimout: \"$mouseHandler\",\n tooltipFollowsMouse: \"$mouseHandler\",\n\n firstLineNumber: \"session\",\n overwrite: \"session\",\n newLineMode: \"session\",\n useWorker: \"session\",\n useSoftTabs: \"session\",\n tabSize: \"session\",\n wrap: \"session\",\n indentedSoftWrap: \"session\",\n foldStyle: \"session\",\n mode: \"session\"\n});\n\nexports.Editor = Editor;\n});\n\nace.define(\"ace/undomanager\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar UndoManager = function() {\n this.reset();\n};\n\n(function() {\n this.execute = function(options) {\n var deltaSets = options.args[0];\n this.$doc = options.args[1];\n if (options.merge && this.hasUndo()){\n this.dirtyCounter--;\n deltaSets = this.$undoStack.pop().concat(deltaSets);\n }\n this.$undoStack.push(deltaSets);\n this.$redoStack = [];\n if (this.dirtyCounter < 0) {\n this.dirtyCounter = NaN;\n }\n this.dirtyCounter++;\n };\n this.undo = function(dontSelect) {\n var deltaSets = this.$undoStack.pop();\n var undoSelectionRange = null;\n if (deltaSets) {\n undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect);\n this.$redoStack.push(deltaSets);\n this.dirtyCounter--;\n }\n\n return undoSelectionRange;\n };\n this.redo = function(dontSelect) {\n var deltaSets = this.$redoStack.pop();\n var redoSelectionRange = null;\n if (deltaSets) {\n redoSelectionRange =\n this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect);\n this.$undoStack.push(deltaSets);\n this.dirtyCounter++;\n }\n return redoSelectionRange;\n };\n this.reset = function() {\n this.$undoStack = [];\n this.$redoStack = [];\n this.dirtyCounter = 0;\n };\n this.hasUndo = function() {\n return this.$undoStack.length > 0;\n };\n this.hasRedo = function() {\n return this.$redoStack.length > 0;\n };\n this.markClean = function() {\n this.dirtyCounter = 0;\n };\n this.isClean = function() {\n return this.dirtyCounter === 0;\n };\n this.$serializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $serializeDelta);\n };\n this.$deserializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $deserializeDelta);\n };\n \n function $serializeDelta(delta){\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines.length == 1 ? null : delta.lines,\n text: delta.lines.length == 1 ? delta.lines[0] : null\n };\n }\n \n function $deserializeDelta(delta) {\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines || [delta.text]\n };\n }\n \n function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) {\n var deltaSets_new = new Array(deltaSets_old.length);\n for (var i = 0; i < deltaSets_old.length; i++) {\n var deltaSet_old = deltaSets_old[i];\n var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)};\n \n for (var j = 0; j < deltaSet_old.deltas.length; j++) {\n var delta_old = deltaSet_old.deltas[j];\n deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old);\n }\n \n deltaSets_new[i] = deltaSet_new;\n }\n return deltaSets_new;\n }\n \n}).call(UndoManager.prototype);\n\nexports.UndoManager = UndoManager;\n});\n\nace.define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Gutter = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_gutter-layer\";\n parentEl.appendChild(this.element);\n this.setShowFoldWidgets(this.$showFoldWidgets);\n \n this.gutterWidth = 0;\n\n this.$annotations = [];\n this.$updateAnnotations = this.$updateAnnotations.bind(this);\n\n this.$cells = [];\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.setSession = function(session) {\n if (this.session)\n this.session.removeEventListener(\"change\", this.$updateAnnotations);\n this.session = session;\n if (session)\n session.on(\"change\", this.$updateAnnotations);\n };\n\n this.addGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.addGutterDecoration\");\n this.session.addGutterDecoration(row, className);\n };\n\n this.removeGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.removeGutterDecoration\");\n this.session.removeGutterDecoration(row, className);\n };\n\n this.setAnnotations = function(annotations) {\n this.$annotations = [];\n for (var i = 0; i < annotations.length; i++) {\n var annotation = annotations[i];\n var row = annotation.row;\n var rowInfo = this.$annotations[row];\n if (!rowInfo)\n rowInfo = this.$annotations[row] = {text: []};\n \n var annoText = annotation.text;\n annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || \"\";\n\n if (rowInfo.text.indexOf(annoText) === -1)\n rowInfo.text.push(annoText);\n\n var type = annotation.type;\n if (type == \"error\")\n rowInfo.className = \" ace_error\";\n else if (type == \"warning\" && rowInfo.className != \" ace_error\")\n rowInfo.className = \" ace_warning\";\n else if (type == \"info\" && (!rowInfo.className))\n rowInfo.className = \" ace_info\";\n }\n };\n\n this.$updateAnnotations = function (delta) {\n if (!this.$annotations.length)\n return;\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n } else if (delta.action == 'remove') {\n this.$annotations.splice(firstRow, len + 1, null);\n } else {\n var args = new Array(len + 1);\n args.unshift(firstRow, 1);\n this.$annotations.splice.apply(this.$annotations, args);\n }\n };\n\n this.update = function(config) {\n var session = this.session;\n var firstRow = config.firstRow;\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n session.getLength() - 1);\n var fold = session.getNextFoldLine(firstRow);\n var foldStart = fold ? fold.start.row : Infinity;\n var foldWidgets = this.$showFoldWidgets && session.foldWidgets;\n var breakpoints = session.$breakpoints;\n var decorations = session.$decorations;\n var firstLineNumber = session.$firstLineNumber;\n var lastLineNumber = 0;\n \n var gutterRenderer = session.gutterRenderer || this.$renderer;\n\n var cell = null;\n var index = -1;\n var row = firstRow;\n while (true) {\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = session.getNextFoldLine(row, fold);\n foldStart = fold ? fold.start.row : Infinity;\n }\n if (row > lastRow) {\n while (this.$cells.length > index + 1) {\n cell = this.$cells.pop();\n this.element.removeChild(cell.element);\n }\n break;\n }\n\n cell = this.$cells[++index];\n if (!cell) {\n cell = {element: null, textNode: null, foldWidget: null};\n cell.element = dom.createElement(\"div\");\n cell.textNode = document.createTextNode('');\n cell.element.appendChild(cell.textNode);\n this.element.appendChild(cell.element);\n this.$cells[index] = cell;\n }\n\n var className = \"ace_gutter-cell \";\n if (breakpoints[row])\n className += breakpoints[row];\n if (decorations[row])\n className += decorations[row];\n if (this.$annotations[row])\n className += this.$annotations[row].className;\n if (cell.element.className != className)\n cell.element.className = className;\n\n var height = session.getRowLength(row) * config.lineHeight + \"px\";\n if (height != cell.element.style.height)\n cell.element.style.height = height;\n\n if (foldWidgets) {\n var c = foldWidgets[row];\n if (c == null)\n c = foldWidgets[row] = session.getFoldWidget(row);\n }\n\n if (c) {\n if (!cell.foldWidget) {\n cell.foldWidget = dom.createElement(\"span\");\n cell.element.appendChild(cell.foldWidget);\n }\n var className = \"ace_fold-widget ace_\" + c;\n if (c == \"start\" && row == foldStart && row < fold.end.row)\n className += \" ace_closed\";\n else\n className += \" ace_open\";\n if (cell.foldWidget.className != className)\n cell.foldWidget.className = className;\n\n var height = config.lineHeight + \"px\";\n if (cell.foldWidget.style.height != height)\n cell.foldWidget.style.height = height;\n } else {\n if (cell.foldWidget) {\n cell.element.removeChild(cell.foldWidget);\n cell.foldWidget = null;\n }\n }\n \n var text = lastLineNumber = gutterRenderer\n ? gutterRenderer.getText(session, row)\n : row + firstLineNumber;\n if (text != cell.textNode.data)\n cell.textNode.data = text;\n\n row++;\n }\n\n this.element.style.height = config.minHeight + \"px\";\n\n if (this.$fixedWidth || session.$useWrapMode)\n lastLineNumber = session.getLength() + firstLineNumber;\n\n var gutterWidth = gutterRenderer \n ? gutterRenderer.getWidth(session, lastLineNumber, config)\n : lastLineNumber.toString().length * config.characterWidth;\n \n var padding = this.$padding || this.$computePadding();\n gutterWidth += padding.left + padding.right;\n if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {\n this.gutterWidth = gutterWidth;\n this.element.style.width = Math.ceil(this.gutterWidth) + \"px\";\n this._emit(\"changeGutterWidth\", gutterWidth);\n }\n };\n\n this.$fixedWidth = false;\n \n this.$showLineNumbers = true;\n this.$renderer = \"\";\n this.setShowLineNumbers = function(show) {\n this.$renderer = !show && {\n getWidth: function() {return \"\"},\n getText: function() {return \"\"}\n };\n };\n \n this.getShowLineNumbers = function() {\n return this.$showLineNumbers;\n };\n \n this.$showFoldWidgets = true;\n this.setShowFoldWidgets = function(show) {\n if (show)\n dom.addCssClass(this.element, \"ace_folding-enabled\");\n else\n dom.removeCssClass(this.element, \"ace_folding-enabled\");\n\n this.$showFoldWidgets = show;\n this.$padding = null;\n };\n \n this.getShowFoldWidgets = function() {\n return this.$showFoldWidgets;\n };\n\n this.$computePadding = function() {\n if (!this.element.firstChild)\n return {left: 0, right: 0};\n var style = dom.computedStyle(this.element.firstChild);\n this.$padding = {};\n this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;\n this.$padding.right = parseInt(style.paddingRight) || 0;\n return this.$padding;\n };\n\n this.getRegion = function(point) {\n var padding = this.$padding || this.$computePadding();\n var rect = this.element.getBoundingClientRect();\n if (point.x < padding.left + rect.left)\n return \"markers\";\n if (this.$showFoldWidgets && point.x > rect.right - padding.right)\n return \"foldWidgets\";\n };\n\n}).call(Gutter.prototype);\n\nexports.Gutter = Gutter;\n\n});\n\nace.define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar dom = acequire(\"../lib/dom\");\n\nvar Marker = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_marker-layer\";\n parentEl.appendChild(this.element);\n};\n\n(function() {\n\n this.$padding = 0;\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n this.setSession = function(session) {\n this.session = session;\n };\n \n this.setMarkers = function(markers) {\n this.markers = markers;\n };\n\n this.update = function(config) {\n var config = config || this.config;\n if (!config)\n return;\n\n this.config = config;\n\n\n var html = [];\n for (var key in this.markers) {\n var marker = this.markers[key];\n\n if (!marker.range) {\n marker.update(html, this, this.session, config);\n continue;\n }\n\n var range = marker.range.clipRows(config.firstRow, config.lastRow);\n if (range.isEmpty()) continue;\n\n range = range.toScreenRange(this.session);\n if (marker.renderer) {\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n marker.renderer(html, range, left, top, config);\n } else if (marker.type == \"fullLine\") {\n this.drawFullLineMarker(html, range, marker.clazz, config);\n } else if (marker.type == \"screenLine\") {\n this.drawScreenLineMarker(html, range, marker.clazz, config);\n } else if (range.isMultiLine()) {\n if (marker.type == \"text\")\n this.drawTextMarker(html, range, marker.clazz, config);\n else\n this.drawMultiLineMarker(html, range, marker.clazz, config);\n } else {\n this.drawSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n }\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$getTop = function(row, layerConfig) {\n return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;\n };\n\n function getBorderClass(tl, tr, br, bl) {\n return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);\n }\n this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {\n var session = this.session;\n var start = range.start.row;\n var end = range.end.row;\n var row = start;\n var prev = 0; \n var curr = 0;\n var next = session.getScreenLastRowColumn(row);\n var lineRange = new Range(row, range.start.column, row, curr);\n for (; row <= end; row++) {\n lineRange.start.row = lineRange.end.row = row;\n lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);\n lineRange.end.column = next;\n prev = curr;\n curr = next;\n next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;\n this.drawSingleLineMarker(stringBuilder, lineRange, \n clazz + (row == start ? \" ace_start\" : \"\") + \" ace_br\"\n + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end),\n layerConfig, row == end ? 0 : 1, extraStyle);\n }\n };\n this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var padding = this.$padding;\n var height = config.lineHeight;\n var top = this.$getTop(range.start.row, config);\n var left = padding + range.start.column * config.characterWidth;\n extraStyle = extraStyle || \"\";\n\n stringBuilder.push(\n \"<div class='\", clazz, \" ace_br1 ace_start' style='\",\n \"height:\", height, \"px;\",\n \"right:0;\",\n \"top:\", top, \"px;\",\n \"left:\", left, \"px;\", extraStyle, \"'></div>\"\n );\n top = this.$getTop(range.end.row, config);\n var width = range.end.column * config.characterWidth;\n\n stringBuilder.push(\n \"<div class='\", clazz, \" ace_br12' style='\",\n \"height:\", height, \"px;\",\n \"width:\", width, \"px;\",\n \"top:\", top, \"px;\",\n \"left:\", padding, \"px;\", extraStyle, \"'></div>\"\n );\n height = (range.end.row - range.start.row - 1) * config.lineHeight;\n if (height <= 0)\n return;\n top = this.$getTop(range.start.row + 1, config);\n \n var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);\n\n stringBuilder.push(\n \"<div class='\", clazz, (radiusClass ? \" ace_br\" + radiusClass : \"\"), \"' style='\",\n \"height:\", height, \"px;\",\n \"right:0;\",\n \"top:\", top, \"px;\",\n \"left:\", padding, \"px;\", extraStyle, \"'></div>\"\n );\n };\n this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight;\n var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;\n\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n\n stringBuilder.push(\n \"<div class='\", clazz, \"' style='\",\n \"height:\", height, \"px;\",\n \"width:\", width, \"px;\",\n \"top:\", top, \"px;\",\n \"left:\", left, \"px;\", extraStyle || \"\", \"'></div>\"\n );\n };\n\n this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n if (range.start.row != range.end.row)\n height += this.$getTop(range.end.row, config) - top;\n\n stringBuilder.push(\n \"<div class='\", clazz, \"' style='\",\n \"height:\", height, \"px;\",\n \"top:\", top, \"px;\",\n \"left:0;right:0;\", extraStyle || \"\", \"'></div>\"\n );\n };\n \n this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n\n stringBuilder.push(\n \"<div class='\", clazz, \"' style='\",\n \"height:\", height, \"px;\",\n \"top:\", top, \"px;\",\n \"left:0;right:0;\", extraStyle || \"\", \"'></div>\"\n );\n };\n\n}).call(Marker.prototype);\n\nexports.Marker = Marker;\n\n});\n\nace.define(\"ace/layer/text\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Text = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_text-layer\";\n parentEl.appendChild(this.element);\n this.$updateEolChar = this.$updateEolChar.bind(this);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.EOF_CHAR = \"\\xB6\";\n this.EOL_CHAR_LF = \"\\xAC\";\n this.EOL_CHAR_CRLF = \"\\xa4\";\n this.EOL_CHAR = this.EOL_CHAR_LF;\n this.TAB_CHAR = \"\\u2014\"; //\"\\u21E5\";\n this.SPACE_CHAR = \"\\xB7\";\n this.$padding = 0;\n\n this.$updateEolChar = function() {\n var EOL_CHAR = this.session.doc.getNewLineCharacter() == \"\\n\"\n ? this.EOL_CHAR_LF\n : this.EOL_CHAR_CRLF;\n if (this.EOL_CHAR != EOL_CHAR) {\n this.EOL_CHAR = EOL_CHAR;\n return true;\n }\n }\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.element.style.padding = \"0 \" + padding + \"px\";\n };\n\n this.getLineHeight = function() {\n return this.$fontMetrics.$characterSize.height || 0;\n };\n\n this.getCharacterWidth = function() {\n return this.$fontMetrics.$characterSize.width || 0;\n };\n \n this.$setFontMetrics = function(measure) {\n this.$fontMetrics = measure;\n this.$fontMetrics.on(\"changeCharacterSize\", function(e) {\n this._signal(\"changeCharacterSize\", e);\n }.bind(this));\n this.$pollSizeChanges();\n }\n\n this.checkForSizeChanges = function() {\n this.$fontMetrics.checkForSizeChanges();\n };\n this.$pollSizeChanges = function() {\n return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();\n };\n this.setSession = function(session) {\n this.session = session;\n if (session)\n this.$computeTabString();\n };\n\n this.showInvisibles = false;\n this.setShowInvisibles = function(showInvisibles) {\n if (this.showInvisibles == showInvisibles)\n return false;\n\n this.showInvisibles = showInvisibles;\n this.$computeTabString();\n return true;\n };\n\n this.displayIndentGuides = true;\n this.setDisplayIndentGuides = function(display) {\n if (this.displayIndentGuides == display)\n return false;\n\n this.displayIndentGuides = display;\n this.$computeTabString();\n return true;\n };\n\n this.$tabStrings = [];\n this.onChangeTabSize =\n this.$computeTabString = function() {\n var tabSize = this.session.getTabSize();\n this.tabSize = tabSize;\n var tabStr = this.$tabStrings = [0];\n for (var i = 1; i < tabSize + 1; i++) {\n if (this.showInvisibles) {\n tabStr.push(\"<span class='ace_invisible ace_invisible_tab'>\"\n + lang.stringRepeat(this.TAB_CHAR, i)\n + \"</span>\");\n } else {\n tabStr.push(lang.stringRepeat(\" \", i));\n }\n }\n if (this.displayIndentGuides) {\n this.$indentGuideRe = /\\s\\S| \\t|\\t |\\s$/;\n var className = \"ace_indent-guide\";\n var spaceClass = \"\";\n var tabClass = \"\";\n if (this.showInvisibles) {\n className += \" ace_invisible\";\n spaceClass = \" ace_invisible_space\";\n tabClass = \" ace_invisible_tab\";\n var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);\n var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize);\n } else{\n var spaceContent = lang.stringRepeat(\" \", this.tabSize);\n var tabContent = spaceContent;\n }\n\n this.$tabStrings[\" \"] = \"<span class='\" + className + spaceClass + \"'>\" + spaceContent + \"</span>\";\n this.$tabStrings[\"\\t\"] = \"<span class='\" + className + tabClass + \"'>\" + tabContent + \"</span>\";\n }\n };\n\n this.updateLines = function(config, firstRow, lastRow) {\n if (this.config.lastRow != config.lastRow ||\n this.config.firstRow != config.firstRow) {\n this.scrollLines(config);\n }\n this.config = config;\n\n var first = Math.max(firstRow, config.firstRow);\n var last = Math.min(lastRow, config.lastRow);\n\n var lineElements = this.element.childNodes;\n var lineElementsIdx = 0;\n\n for (var row = config.firstRow; row < first; row++) {\n var foldLine = this.session.getFoldLine(row);\n if (foldLine) {\n if (foldLine.containsRow(first)) {\n first = foldLine.start.row;\n break;\n } else {\n row = foldLine.end.row;\n }\n }\n lineElementsIdx ++;\n }\n\n var row = first;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > last)\n break;\n\n var lineElement = lineElements[lineElementsIdx++];\n if (lineElement) {\n var html = [];\n this.$renderLine(\n html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false\n );\n lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n lineElement.innerHTML = html.join(\"\");\n }\n row++;\n }\n };\n\n this.scrollLines = function(config) {\n var oldConfig = this.config;\n this.config = config;\n\n if (!oldConfig || oldConfig.lastRow < config.firstRow)\n return this.update(config);\n\n if (config.lastRow < oldConfig.firstRow)\n return this.update(config);\n\n var el = this.element;\n if (oldConfig.firstRow < config.firstRow)\n for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)\n el.removeChild(el.firstChild);\n\n if (oldConfig.lastRow > config.lastRow)\n for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)\n el.removeChild(el.lastChild);\n\n if (config.firstRow < oldConfig.firstRow) {\n var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);\n if (el.firstChild)\n el.insertBefore(fragment, el.firstChild);\n else\n el.appendChild(fragment);\n }\n\n if (config.lastRow > oldConfig.lastRow) {\n var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);\n el.appendChild(fragment);\n }\n };\n\n this.$renderLinesFragment = function(config, firstRow, lastRow) {\n var fragment = this.element.ownerDocument.createDocumentFragment();\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n\n var container = dom.createElement(\"div\");\n\n var html = [];\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n container.innerHTML = html.join(\"\");\n if (this.$useLineGroups()) {\n container.className = 'ace_line_group';\n fragment.appendChild(container);\n container.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n\n } else {\n while(container.firstChild)\n fragment.appendChild(container.firstChild);\n }\n\n row++;\n }\n return fragment;\n };\n\n this.update = function(config) {\n this.config = config;\n\n var html = [];\n var firstRow = config.firstRow, lastRow = config.lastRow;\n\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > lastRow)\n break;\n\n if (this.$useLineGroups())\n html.push(\"<div class='ace_line_group' style='height:\", config.lineHeight*this.session.getRowLength(row), \"px'>\")\n\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n\n if (this.$useLineGroups())\n html.push(\"</div>\"); // end the line group\n\n row++;\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$textToken = {\n \"text\": true,\n \"rparen\": true,\n \"lparen\": true\n };\n\n this.$renderToken = function(stringBuilder, screenColumn, token, value) {\n var self = this;\n var replaceReg = /\\t|&|<|>|( +)|([\\x00-\\x1f\\x80-\\xa0\\xad\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\\uFFF9-\\uFFFC])|[\\u1100-\\u115F\\u11A3-\\u11A7\\u11FA-\\u11FF\\u2329-\\u232A\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3000-\\u303E\\u3041-\\u3096\\u3099-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u31BA\\u31C0-\\u31E3\\u31F0-\\u321E\\u3220-\\u3247\\u3250-\\u32FE\\u3300-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFAFF\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFF01-\\uFF60\\uFFE0-\\uFFE6]/g;\n var replaceFunc = function(c, a, b, tabIdx, idx4) {\n if (a) {\n return self.showInvisibles\n ? \"<span class='ace_invisible ace_invisible_space'>\" + lang.stringRepeat(self.SPACE_CHAR, c.length) + \"</span>\"\n : c;\n } else if (c == \"&\") {\n return \"&\";\n } else if (c == \"<\") {\n return \"<\";\n } else if (c == \">\") {\n return \">\";\n } else if (c == \"\\t\") {\n var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);\n screenColumn += tabSize - 1;\n return self.$tabStrings[tabSize];\n } else if (c == \"\\u3000\") {\n var classToUse = self.showInvisibles ? \"ace_cjk ace_invisible ace_invisible_space\" : \"ace_cjk\";\n var space = self.showInvisibles ? self.SPACE_CHAR : \"\";\n screenColumn += 1;\n return \"<span class='\" + classToUse + \"' style='width:\" +\n (self.config.characterWidth * 2) +\n \"px'>\" + space + \"</span>\";\n } else if (b) {\n return \"<span class='ace_invisible ace_invisible_space ace_invalid'>\" + self.SPACE_CHAR + \"</span>\";\n } else {\n screenColumn += 1;\n return \"<span class='ace_cjk' style='width:\" +\n (self.config.characterWidth * 2) +\n \"px'>\" + c + \"</span>\";\n }\n };\n\n var output = value.replace(replaceReg, replaceFunc);\n\n if (!this.$textToken[token.type]) {\n var classes = \"ace_\" + token.type.replace(/\\./g, \" ace_\");\n var style = \"\";\n if (token.type == \"fold\")\n style = \" style='width:\" + (token.value.length * this.config.characterWidth) + \"px;' \";\n stringBuilder.push(\"<span class='\", classes, \"'\", style, \">\", output, \"</span>\");\n }\n else {\n stringBuilder.push(output);\n }\n return screenColumn + value.length;\n };\n\n this.renderIndentGuide = function(stringBuilder, value, max) {\n var cols = value.search(this.$indentGuideRe);\n if (cols <= 0 || cols >= max)\n return value;\n if (value[0] == \" \") {\n cols -= cols % this.tabSize;\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\" \"], cols/this.tabSize));\n return value.substr(cols);\n } else if (value[0] == \"\\t\") {\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\"\\t\"], cols));\n return value.substr(cols);\n }\n return value;\n };\n\n this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {\n var chars = 0;\n var split = 0;\n var splitChars = splits[0];\n var screenColumn = 0;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n chars = value.length;\n value = this.renderIndentGuide(stringBuilder, value, splitChars);\n if (!value)\n continue;\n chars -= value.length;\n }\n\n if (chars + value.length < splitChars) {\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n chars += value.length;\n } else {\n while (chars + value.length >= splitChars) {\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn,\n token, value.substring(0, splitChars - chars)\n );\n value = value.substring(splitChars - chars);\n chars = splitChars;\n\n if (!onlyContents) {\n stringBuilder.push(\"</div>\",\n \"<div class='ace_line' style='height:\",\n this.config.lineHeight, \"px'>\"\n );\n }\n\n stringBuilder.push(lang.stringRepeat(\"\\xa0\", splits.indent));\n\n split ++;\n screenColumn = 0;\n splitChars = splits[split] || Number.MAX_VALUE;\n }\n if (value.length != 0) {\n chars += value.length;\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn, token, value\n );\n }\n }\n }\n };\n\n this.$renderSimpleLine = function(stringBuilder, tokens) {\n var screenColumn = 0;\n var token = tokens[0];\n var value = token.value;\n if (this.displayIndentGuides)\n value = this.renderIndentGuide(stringBuilder, value);\n if (value)\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n for (var i = 1; i < tokens.length; i++) {\n token = tokens[i];\n value = token.value;\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n }\n };\n this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {\n if (!foldLine && foldLine != false)\n foldLine = this.session.getFoldLine(row);\n\n if (foldLine)\n var tokens = this.$getFoldLineTokens(row, foldLine);\n else\n var tokens = this.session.getTokens(row);\n\n\n if (!onlyContents) {\n stringBuilder.push(\n \"<div class='ace_line' style='height:\", \n this.config.lineHeight * (\n this.$useLineGroups() ? 1 :this.session.getRowLength(row)\n ), \"px'>\"\n );\n }\n\n if (tokens.length) {\n var splits = this.session.getRowSplitData(row);\n if (splits && splits.length)\n this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);\n else\n this.$renderSimpleLine(stringBuilder, tokens);\n }\n\n if (this.showInvisibles) {\n if (foldLine)\n row = foldLine.end.row\n\n stringBuilder.push(\n \"<span class='ace_invisible ace_invisible_eol'>\",\n row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,\n \"</span>\"\n );\n }\n if (!onlyContents)\n stringBuilder.push(\"</div>\");\n };\n\n this.$getFoldLineTokens = function(row, foldLine) {\n var session = this.session;\n var renderTokens = [];\n\n function addTokens(tokens, from, to) {\n var idx = 0, col = 0;\n while ((col + tokens[idx].value.length) < from) {\n col += tokens[idx].value.length;\n idx++;\n\n if (idx == tokens.length)\n return;\n }\n if (col != from) {\n var value = tokens[idx].value.substring(from - col);\n if (value.length > (to - from))\n value = value.substring(0, to - from);\n\n renderTokens.push({\n type: tokens[idx].type,\n value: value\n });\n\n col = from + value.length;\n idx += 1;\n }\n\n while (col < to && idx < tokens.length) {\n var value = tokens[idx].value;\n if (value.length + col > to) {\n renderTokens.push({\n type: tokens[idx].type,\n value: value.substring(0, to - col)\n });\n } else\n renderTokens.push(tokens[idx]);\n col += value.length;\n idx += 1;\n }\n }\n\n var tokens = session.getTokens(row);\n foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {\n if (placeholder != null) {\n renderTokens.push({\n type: \"fold\",\n value: placeholder\n });\n } else {\n if (isNewRow)\n tokens = session.getTokens(row);\n\n if (tokens.length)\n addTokens(tokens, lastColumn, column);\n }\n }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);\n\n return renderTokens;\n };\n\n this.$useLineGroups = function() {\n return this.session.getUseWrapMode();\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.$measureNode)\n this.$measureNode.parentNode.removeChild(this.$measureNode);\n delete this.$measureNode;\n };\n\n}).call(Text.prototype);\n\nexports.Text = Text;\n\n});\n\nace.define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar isIE8;\n\nvar Cursor = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_cursor-layer\";\n parentEl.appendChild(this.element);\n \n if (isIE8 === undefined)\n isIE8 = !(\"opacity\" in this.element.style);\n\n this.isVisible = false;\n this.isBlinking = true;\n this.blinkInterval = 1000;\n this.smoothBlinking = false;\n\n this.cursors = [];\n this.cursor = this.addCursor();\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.$updateCursors = (isIE8\n ? this.$updateVisibility\n : this.$updateOpacity).bind(this);\n};\n\n(function() {\n \n this.$updateVisibility = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.visibility = val ? \"\" : \"hidden\";\n };\n this.$updateOpacity = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.opacity = val ? \"\" : \"0\";\n };\n \n\n this.$padding = 0;\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n\n this.setSession = function(session) {\n this.session = session;\n };\n\n this.setBlinking = function(blinking) {\n if (blinking != this.isBlinking){\n this.isBlinking = blinking;\n this.restartTimer();\n }\n };\n\n this.setBlinkInterval = function(blinkInterval) {\n if (blinkInterval != this.blinkInterval){\n this.blinkInterval = blinkInterval;\n this.restartTimer();\n }\n };\n\n this.setSmoothBlinking = function(smoothBlinking) {\n if (smoothBlinking != this.smoothBlinking && !isIE8) {\n this.smoothBlinking = smoothBlinking;\n dom.setCssClass(this.element, \"ace_smooth-blinking\", smoothBlinking);\n this.$updateCursors(true);\n this.$updateCursors = (this.$updateOpacity).bind(this);\n this.restartTimer();\n }\n };\n\n this.addCursor = function() {\n var el = dom.createElement(\"div\");\n el.className = \"ace_cursor\";\n this.element.appendChild(el);\n this.cursors.push(el);\n return el;\n };\n\n this.removeCursor = function() {\n if (this.cursors.length > 1) {\n var el = this.cursors.pop();\n el.parentNode.removeChild(el);\n return el;\n }\n };\n\n this.hideCursor = function() {\n this.isVisible = false;\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.showCursor = function() {\n this.isVisible = true;\n dom.removeCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.restartTimer = function() {\n var update = this.$updateCursors;\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n if (this.smoothBlinking) {\n dom.removeCssClass(this.element, \"ace_smooth-blinking\");\n }\n \n update(true);\n\n if (!this.isBlinking || !this.blinkInterval || !this.isVisible)\n return;\n\n if (this.smoothBlinking) {\n setTimeout(function(){\n dom.addCssClass(this.element, \"ace_smooth-blinking\");\n }.bind(this));\n }\n \n var blink = function(){\n this.timeoutId = setTimeout(function() {\n update(false);\n }, 0.6 * this.blinkInterval);\n }.bind(this);\n\n this.intervalId = setInterval(function() {\n update(true);\n blink();\n }, this.blinkInterval);\n\n blink();\n };\n\n this.getPixelPosition = function(position, onScreen) {\n if (!this.config || !this.session)\n return {left : 0, top : 0};\n\n if (!position)\n position = this.session.selection.getCursor();\n var pos = this.session.documentToScreenPosition(position);\n var cursorLeft = this.$padding + pos.column * this.config.characterWidth;\n var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *\n this.config.lineHeight;\n\n return {left : cursorLeft, top : cursorTop};\n };\n\n this.update = function(config) {\n this.config = config;\n\n var selections = this.session.$selectionMarkers;\n var i = 0, cursorIndex = 0;\n\n if (selections === undefined || selections.length === 0){\n selections = [{cursor: null}];\n }\n\n for (var i = 0, n = selections.length; i < n; i++) {\n var pixelPos = this.getPixelPosition(selections[i].cursor, true);\n if ((pixelPos.top > config.height + config.offset ||\n pixelPos.top < 0) && i > 1) {\n continue;\n }\n\n var style = (this.cursors[cursorIndex++] || this.addCursor()).style;\n \n if (!this.drawCursor) {\n style.left = pixelPos.left + \"px\";\n style.top = pixelPos.top + \"px\";\n style.width = config.characterWidth + \"px\";\n style.height = config.lineHeight + \"px\";\n } else {\n this.drawCursor(style, pixelPos, config, selections[i], this.session);\n }\n }\n while (this.cursors.length > cursorIndex)\n this.removeCursor();\n\n var overwrite = this.session.getOverwrite();\n this.$setOverwrite(overwrite);\n this.$pixelPos = pixelPos;\n this.restartTimer();\n };\n \n this.drawCursor = null;\n\n this.$setOverwrite = function(overwrite) {\n if (overwrite != this.overwrite) {\n this.overwrite = overwrite;\n if (overwrite)\n dom.addCssClass(this.element, \"ace_overwrite-cursors\");\n else\n dom.removeCssClass(this.element, \"ace_overwrite-cursors\");\n }\n };\n\n this.destroy = function() {\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n };\n\n}).call(Cursor.prototype);\n\nexports.Cursor = Cursor;\n\n});\n\nace.define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar MAX_SCROLL_H = 0x8000;\nvar ScrollBar = function(parent) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_scrollbar ace_scrollbar\" + this.classSuffix;\n\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"ace_scrollbar-inner\";\n this.element.appendChild(this.inner);\n\n parent.appendChild(this.element);\n\n this.setVisible(false);\n this.skipEvent = false;\n\n event.addListener(this.element, \"scroll\", this.onScroll.bind(this));\n event.addListener(this.element, \"mousedown\", event.preventDefault);\n};\n\n(function() {\n oop.implement(this, EventEmitter);\n\n this.setVisible = function(isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n}).call(ScrollBar.prototype);\nvar VScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollTop = 0;\n this.scrollHeight = 0;\n renderer.$scrollbarWidth = \n this.width = dom.scrollbarWidth(parent.ownerDocument);\n this.inner.style.width =\n this.element.style.width = (this.width || 15) + 5 + \"px\";\n};\n\noop.inherits(VScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-v';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollTop = this.element.scrollTop;\n if (this.coeff != 1) {\n var h = this.element.clientHeight / this.scrollHeight;\n this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);\n }\n this._emit(\"scroll\", {data: this.scrollTop});\n }\n this.skipEvent = false;\n };\n this.getWidth = function() {\n return this.isVisible ? this.width : 0;\n };\n this.setHeight = function(height) {\n this.element.style.height = height + \"px\";\n };\n this.setInnerHeight =\n this.setScrollHeight = function(height) {\n this.scrollHeight = height;\n if (height > MAX_SCROLL_H) {\n this.coeff = MAX_SCROLL_H / height;\n height = MAX_SCROLL_H;\n } else if (this.coeff != 1) {\n this.coeff = 1\n }\n this.inner.style.height = height + \"px\";\n };\n this.setScrollTop = function(scrollTop) {\n if (this.scrollTop != scrollTop) {\n this.skipEvent = true;\n this.scrollTop = scrollTop;\n this.element.scrollTop = scrollTop * this.coeff;\n }\n };\n\n}).call(VScrollBar.prototype);\nvar HScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollLeft = 0;\n this.height = renderer.$scrollbarWidth;\n this.inner.style.height =\n this.element.style.height = (this.height || 15) + 5 + \"px\";\n};\n\noop.inherits(HScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-h';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollLeft = this.element.scrollLeft;\n this._emit(\"scroll\", {data: this.scrollLeft});\n }\n this.skipEvent = false;\n };\n this.getHeight = function() {\n return this.isVisible ? this.height : 0;\n };\n this.setWidth = function(width) {\n this.element.style.width = width + \"px\";\n };\n this.setInnerWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollLeft = function(scrollLeft) {\n if (this.scrollLeft != scrollLeft) {\n this.skipEvent = true;\n this.scrollLeft = this.element.scrollLeft = scrollLeft;\n }\n };\n\n}).call(HScrollBar.prototype);\n\n\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\n\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n});\n\nace.define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"./lib/event\");\n\n\nvar RenderLoop = function(onRender, win) {\n this.onRender = onRender;\n this.pending = false;\n this.changes = 0;\n this.window = win || window;\n};\n\n(function() {\n\n\n this.schedule = function(change) {\n this.changes = this.changes | change;\n if (!this.pending && this.changes) {\n this.pending = true;\n var _self = this;\n event.nextFrame(function() {\n _self.pending = false;\n var changes;\n while (changes = _self.changes) {\n _self.changes = 0;\n _self.onRender(changes);\n }\n }, this.window);\n }\n };\n\n}).call(RenderLoop.prototype);\n\nexports.RenderLoop = RenderLoop;\n});\n\nace.define(\"ace/layer/font_metrics\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CHAR_COUNT = 0;\n\nvar FontMetrics = exports.FontMetrics = function(parentEl) {\n this.el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.el.style, true);\n \n this.$main = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$main.style);\n \n this.$measureNode = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$measureNode.style);\n \n \n this.el.appendChild(this.$main);\n this.el.appendChild(this.$measureNode);\n parentEl.appendChild(this.el);\n \n if (!CHAR_COUNT)\n this.$testFractionalRect();\n this.$measureNode.innerHTML = lang.stringRepeat(\"X\", CHAR_COUNT);\n \n this.$characterSize = {width: 0, height: 0};\n this.checkForSizeChanges();\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n \n this.$characterSize = {width: 0, height: 0};\n \n this.$testFractionalRect = function() {\n var el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(el.style);\n el.style.width = \"0.2px\";\n document.documentElement.appendChild(el);\n var w = el.getBoundingClientRect().width;\n if (w > 0 && w < 1)\n CHAR_COUNT = 50;\n else\n CHAR_COUNT = 100;\n el.parentNode.removeChild(el);\n };\n \n this.$setMeasureNodeStyles = function(style, isRoot) {\n style.width = style.height = \"auto\";\n style.left = style.top = \"0px\";\n style.visibility = \"hidden\";\n style.position = \"absolute\";\n style.whiteSpace = \"pre\";\n\n if (useragent.isIE < 8) {\n style[\"font-family\"] = \"inherit\";\n } else {\n style.font = \"inherit\";\n }\n style.overflow = isRoot ? \"hidden\" : \"visible\";\n };\n\n this.checkForSizeChanges = function() {\n var size = this.$measureSizes();\n if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {\n this.$measureNode.style.fontWeight = \"bold\";\n var boldSize = this.$measureSizes();\n this.$measureNode.style.fontWeight = \"\";\n this.$characterSize = size;\n this.charSizes = Object.create(null);\n this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;\n this._emit(\"changeCharacterSize\", {data: size});\n }\n };\n\n this.$pollSizeChanges = function() {\n if (this.$pollSizeChangesTimer)\n return this.$pollSizeChangesTimer;\n var self = this;\n return this.$pollSizeChangesTimer = setInterval(function() {\n self.checkForSizeChanges();\n }, 500);\n };\n \n this.setPolling = function(val) {\n if (val) {\n this.$pollSizeChanges();\n } else if (this.$pollSizeChangesTimer) {\n clearInterval(this.$pollSizeChangesTimer);\n this.$pollSizeChangesTimer = 0;\n }\n };\n\n this.$measureSizes = function() {\n if (CHAR_COUNT === 50) {\n var rect = null;\n try { \n rect = this.$measureNode.getBoundingClientRect();\n } catch(e) {\n rect = {width: 0, height:0 };\n }\n var size = {\n height: rect.height,\n width: rect.width / CHAR_COUNT\n };\n } else {\n var size = {\n height: this.$measureNode.clientHeight,\n width: this.$measureNode.clientWidth / CHAR_COUNT\n };\n }\n if (size.width === 0 || size.height === 0)\n return null;\n return size;\n };\n\n this.$measureCharWidth = function(ch) {\n this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);\n var rect = this.$main.getBoundingClientRect();\n return rect.width / CHAR_COUNT;\n };\n \n this.getCharacterWidth = function(ch) {\n var w = this.charSizes[ch];\n if (w === undefined) {\n w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;\n }\n return w;\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.el && this.el.parentNode)\n this.el.parentNode.removeChild(this.el);\n };\n\n}).call(FontMetrics.prototype);\n\n});\n\nace.define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/config\",\"ace/lib/useragent\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/scrollbar\",\"ace/renderloop\",\"ace/layer/font_metrics\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar config = acequire(\"./config\");\nvar useragent = acequire(\"./lib/useragent\");\nvar GutterLayer = acequire(\"./layer/gutter\").Gutter;\nvar MarkerLayer = acequire(\"./layer/marker\").Marker;\nvar TextLayer = acequire(\"./layer/text\").Text;\nvar CursorLayer = acequire(\"./layer/cursor\").Cursor;\nvar HScrollBar = acequire(\"./scrollbar\").HScrollBar;\nvar VScrollBar = acequire(\"./scrollbar\").VScrollBar;\nvar RenderLoop = acequire(\"./renderloop\").RenderLoop;\nvar FontMetrics = acequire(\"./layer/font_metrics\").FontMetrics;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar editorCss = \".ace_editor {\\\nposition: relative;\\\noverflow: hidden;\\\nfont: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\\\ndirection: ltr;\\\ntext-align: left;\\\n}\\\n.ace_scroller {\\\nposition: absolute;\\\noverflow: hidden;\\\ntop: 0;\\\nbottom: 0;\\\nbackground-color: inherit;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\ncursor: text;\\\n}\\\n.ace_content {\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmin-width: 100%;\\\n}\\\n.ace_dragging .ace_scroller:before{\\\nposition: absolute;\\\ntop: 0;\\\nleft: 0;\\\nright: 0;\\\nbottom: 0;\\\ncontent: '';\\\nbackground: rgba(250, 250, 250, 0.01);\\\nz-index: 1000;\\\n}\\\n.ace_dragging.ace_dark .ace_scroller:before{\\\nbackground: rgba(0, 0, 0, 0.01);\\\n}\\\n.ace_selecting, .ace_selecting * {\\\ncursor: text !important;\\\n}\\\n.ace_gutter {\\\nposition: absolute;\\\noverflow : hidden;\\\nwidth: auto;\\\ntop: 0;\\\nbottom: 0;\\\nleft: 0;\\\ncursor: default;\\\nz-index: 4;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\n}\\\n.ace_gutter-active-line {\\\nposition: absolute;\\\nleft: 0;\\\nright: 0;\\\n}\\\n.ace_scroller.ace_scroll-left {\\\nbox-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\\\n}\\\n.ace_gutter-cell {\\\npadding-left: 19px;\\\npadding-right: 6px;\\\nbackground-repeat: no-repeat;\\\n}\\\n.ace_gutter-cell.ace_error {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_warning {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_dark .ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_scrollbar {\\\nposition: absolute;\\\nright: 0;\\\nbottom: 0;\\\nz-index: 6;\\\n}\\\n.ace_scrollbar-inner {\\\nposition: absolute;\\\ncursor: text;\\\nleft: 0;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-v{\\\noverflow-x: hidden;\\\noverflow-y: scroll;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-h {\\\noverflow-x: scroll;\\\noverflow-y: hidden;\\\nleft: 0;\\\n}\\\n.ace_print-margin {\\\nposition: absolute;\\\nheight: 100%;\\\n}\\\n.ace_text-input {\\\nposition: absolute;\\\nz-index: 0;\\\nwidth: 0.5em;\\\nheight: 1em;\\\nopacity: 0;\\\nbackground: transparent;\\\n-moz-appearance: none;\\\nappearance: none;\\\nborder: none;\\\nresize: none;\\\noutline: none;\\\noverflow: hidden;\\\nfont: inherit;\\\npadding: 0 1px;\\\nmargin: 0 -1px;\\\ntext-indent: -1em;\\\n-ms-user-select: text;\\\n-moz-user-select: text;\\\n-webkit-user-select: text;\\\nuser-select: text;\\\nwhite-space: pre!important;\\\n}\\\n.ace_text-input.ace_composition {\\\nbackground: inherit;\\\ncolor: inherit;\\\nz-index: 1000;\\\nopacity: 1;\\\ntext-indent: 0;\\\n}\\\n.ace_layer {\\\nz-index: 1;\\\nposition: absolute;\\\noverflow: hidden;\\\nword-wrap: normal;\\\nwhite-space: pre;\\\nheight: 100%;\\\nwidth: 100%;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\npointer-events: none;\\\n}\\\n.ace_gutter-layer {\\\nposition: relative;\\\nwidth: auto;\\\ntext-align: right;\\\npointer-events: auto;\\\n}\\\n.ace_text-layer {\\\nfont: inherit !important;\\\n}\\\n.ace_cjk {\\\ndisplay: inline-block;\\\ntext-align: center;\\\n}\\\n.ace_cursor-layer {\\\nz-index: 4;\\\n}\\\n.ace_cursor {\\\nz-index: 4;\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nborder-left: 2px solid;\\\ntransform: translatez(0);\\\n}\\\n.ace_slim-cursors .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_overwrite-cursors .ace_cursor {\\\nborder-left-width: 0;\\\nborder-bottom: 1px solid;\\\n}\\\n.ace_hidden-cursors .ace_cursor {\\\nopacity: 0.2;\\\n}\\\n.ace_smooth-blinking .ace_cursor {\\\n-webkit-transition: opacity 0.18s;\\\ntransition: opacity 0.18s;\\\n}\\\n.ace_editor.ace_multiselect .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\\\nposition: absolute;\\\nz-index: 3;\\\n}\\\n.ace_marker-layer .ace_selection {\\\nposition: absolute;\\\nz-index: 5;\\\n}\\\n.ace_marker-layer .ace_bracket {\\\nposition: absolute;\\\nz-index: 6;\\\n}\\\n.ace_marker-layer .ace_active-line {\\\nposition: absolute;\\\nz-index: 2;\\\n}\\\n.ace_marker-layer .ace_selected-word {\\\nposition: absolute;\\\nz-index: 4;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\n}\\\n.ace_line .ace_fold {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ndisplay: inline-block;\\\nheight: 11px;\\\nmargin-top: -2px;\\\nvertical-align: middle;\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\\\");\\\nbackground-repeat: no-repeat, repeat-x;\\\nbackground-position: center center, top left;\\\ncolor: transparent;\\\nborder: 1px solid black;\\\nborder-radius: 2px;\\\ncursor: pointer;\\\npointer-events: auto;\\\n}\\\n.ace_dark .ace_fold {\\\n}\\\n.ace_fold:hover{\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_tooltip {\\\nbackground-color: #FFF;\\\nbackground-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\\\nbackground-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\\\nborder: 1px solid gray;\\\nborder-radius: 1px;\\\nbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\\\ncolor: black;\\\nmax-width: 100%;\\\npadding: 3px 4px;\\\nposition: fixed;\\\nz-index: 999999;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ncursor: default;\\\nwhite-space: pre;\\\nword-wrap: break-word;\\\nline-height: normal;\\\nfont-style: normal;\\\nfont-weight: normal;\\\nletter-spacing: normal;\\\npointer-events: none;\\\n}\\\n.ace_folding-enabled > .ace_gutter-cell {\\\npadding-right: 13px;\\\n}\\\n.ace_fold-widget {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmargin: 0 -12px 0 1px;\\\ndisplay: none;\\\nwidth: 11px;\\\nvertical-align: top;\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: center;\\\nborder-radius: 3px;\\\nborder: 1px solid transparent;\\\ncursor: pointer;\\\n}\\\n.ace_folding-enabled .ace_fold-widget {\\\ndisplay: inline-block; \\\n}\\\n.ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\\\");\\\n}\\\n.ace_fold-widget:hover {\\\nborder: 1px solid rgba(0, 0, 0, 0.3);\\\nbackground-color: rgba(255, 255, 255, 0.2);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\\\n}\\\n.ace_fold-widget:active {\\\nborder: 1px solid rgba(0, 0, 0, 0.4);\\\nbackground-color: rgba(0, 0, 0, 0.05);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\\\n}\\\n.ace_dark .ace_fold-widget {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget:hover {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\nbackground-color: rgba(255, 255, 255, 0.1);\\\n}\\\n.ace_dark .ace_fold-widget:active {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\n}\\\n.ace_fold-widget.ace_invalid {\\\nbackground-color: #FFB4B4;\\\nborder-color: #DE5555;\\\n}\\\n.ace_fade-fold-widgets .ace_fold-widget {\\\n-webkit-transition: opacity 0.4s ease 0.05s;\\\ntransition: opacity 0.4s ease 0.05s;\\\nopacity: 0;\\\n}\\\n.ace_fade-fold-widgets:hover .ace_fold-widget {\\\n-webkit-transition: opacity 0.05s ease 0.05s;\\\ntransition: opacity 0.05s ease 0.05s;\\\nopacity:1;\\\n}\\\n.ace_underline {\\\ntext-decoration: underline;\\\n}\\\n.ace_bold {\\\nfont-weight: bold;\\\n}\\\n.ace_nobold .ace_bold {\\\nfont-weight: normal;\\\n}\\\n.ace_italic {\\\nfont-style: italic;\\\n}\\\n.ace_error-marker {\\\nbackground-color: rgba(255, 0, 0,0.2);\\\nposition: absolute;\\\nz-index: 9;\\\n}\\\n.ace_highlight-marker {\\\nbackground-color: rgba(255, 255, 0,0.2);\\\nposition: absolute;\\\nz-index: 8;\\\n}\\\n.ace_br1 {border-top-left-radius : 3px;}\\\n.ace_br2 {border-top-right-radius : 3px;}\\\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\\\n.ace_br4 {border-bottom-right-radius: 3px;}\\\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\\\n.ace_br8 {border-bottom-left-radius : 3px;}\\\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n\";\n\ndom.importCssString(editorCss, \"ace_editor.css\");\n\nvar VirtualRenderer = function(container, theme) {\n var _self = this;\n\n this.container = container || dom.createElement(\"div\");\n this.$keepTextAreaAtCursor = !useragent.isOldIE;\n\n dom.addCssClass(this.container, \"ace_editor\");\n\n this.setTheme(theme);\n\n this.$gutter = dom.createElement(\"div\");\n this.$gutter.className = \"ace_gutter\";\n this.container.appendChild(this.$gutter);\n\n this.scroller = dom.createElement(\"div\");\n this.scroller.className = \"ace_scroller\";\n this.container.appendChild(this.scroller);\n\n this.content = dom.createElement(\"div\");\n this.content.className = \"ace_content\";\n this.scroller.appendChild(this.content);\n\n this.$gutterLayer = new GutterLayer(this.$gutter);\n this.$gutterLayer.on(\"changeGutterWidth\", this.onGutterResize.bind(this));\n\n this.$markerBack = new MarkerLayer(this.content);\n\n var textLayer = this.$textLayer = new TextLayer(this.content);\n this.canvas = textLayer.element;\n\n this.$markerFront = new MarkerLayer(this.content);\n\n this.$cursorLayer = new CursorLayer(this.content);\n this.$horizScroll = false;\n this.$vScroll = false;\n\n this.scrollBar = \n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n\n this.scrollTop = 0;\n this.scrollLeft = 0;\n\n this.cursorPos = {\n row : 0,\n column : 0\n };\n\n this.$fontMetrics = new FontMetrics(this.container);\n this.$textLayer.$setFontMetrics(this.$fontMetrics);\n this.$textLayer.addEventListener(\"changeCharacterSize\", function(e) {\n _self.updateCharacterSize();\n _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);\n _self._signal(\"changeCharacterSize\", e);\n });\n\n this.$size = {\n width: 0,\n height: 0,\n scrollerHeight: 0,\n scrollerWidth: 0,\n $dirty: true\n };\n\n this.layerConfig = {\n width : 1,\n padding : 0,\n firstRow : 0,\n firstRowScreen: 0,\n lastRow : 0,\n lineHeight : 0,\n characterWidth : 0,\n minHeight : 1,\n maxHeight : 1,\n offset : 0,\n height : 1,\n gutterOffset: 1\n };\n \n this.scrollMargin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n\n this.$loop = new RenderLoop(\n this.$renderChanges.bind(this),\n this.container.ownerDocument.defaultView\n );\n this.$loop.schedule(this.CHANGE_FULL);\n\n this.updateCharacterSize();\n this.setPadding(4);\n config.resetOptions(this);\n config._emit(\"renderer\", this);\n};\n\n(function() {\n\n this.CHANGE_CURSOR = 1;\n this.CHANGE_MARKER = 2;\n this.CHANGE_GUTTER = 4;\n this.CHANGE_SCROLL = 8;\n this.CHANGE_LINES = 16;\n this.CHANGE_TEXT = 32;\n this.CHANGE_SIZE = 64;\n this.CHANGE_MARKER_BACK = 128;\n this.CHANGE_MARKER_FRONT = 256;\n this.CHANGE_FULL = 512;\n this.CHANGE_H_SCROLL = 1024;\n\n oop.implement(this, EventEmitter);\n\n this.updateCharacterSize = function() {\n if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {\n this.$allowBoldFonts = this.$textLayer.allowBoldFonts;\n this.setStyle(\"ace_nobold\", !this.$allowBoldFonts);\n }\n\n this.layerConfig.characterWidth =\n this.characterWidth = this.$textLayer.getCharacterWidth();\n this.layerConfig.lineHeight =\n this.lineHeight = this.$textLayer.getLineHeight();\n this.$updatePrintMargin();\n };\n this.setSession = function(session) {\n if (this.session)\n this.session.doc.off(\"changeNewLineMode\", this.onChangeNewLineMode);\n \n this.session = session;\n if (session && this.scrollMargin.top && session.getScrollTop() <= 0)\n session.setScrollTop(-this.scrollMargin.top);\n\n this.$cursorLayer.setSession(session);\n this.$markerBack.setSession(session);\n this.$markerFront.setSession(session);\n this.$gutterLayer.setSession(session);\n this.$textLayer.setSession(session);\n if (!session)\n return;\n \n this.$loop.schedule(this.CHANGE_FULL);\n this.session.$setFontMetrics(this.$fontMetrics);\n this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;\n \n this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);\n this.onChangeNewLineMode()\n this.session.doc.on(\"changeNewLineMode\", this.onChangeNewLineMode);\n };\n this.updateLines = function(firstRow, lastRow, force) {\n if (lastRow === undefined)\n lastRow = Infinity;\n\n if (!this.$changedLines) {\n this.$changedLines = {\n firstRow: firstRow,\n lastRow: lastRow\n };\n }\n else {\n if (this.$changedLines.firstRow > firstRow)\n this.$changedLines.firstRow = firstRow;\n\n if (this.$changedLines.lastRow < lastRow)\n this.$changedLines.lastRow = lastRow;\n }\n if (this.$changedLines.lastRow < this.layerConfig.firstRow) {\n if (force)\n this.$changedLines.lastRow = this.layerConfig.lastRow;\n else\n return;\n }\n if (this.$changedLines.firstRow > this.layerConfig.lastRow)\n return;\n this.$loop.schedule(this.CHANGE_LINES);\n };\n\n this.onChangeNewLineMode = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n this.$textLayer.$updateEolChar();\n };\n \n this.onChangeTabSize = function() {\n this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);\n this.$textLayer.onChangeTabSize();\n };\n this.updateText = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n };\n this.updateFull = function(force) {\n if (force)\n this.$renderChanges(this.CHANGE_FULL, true);\n else\n this.$loop.schedule(this.CHANGE_FULL);\n };\n this.updateFontSize = function() {\n this.$textLayer.checkForSizeChanges();\n };\n\n this.$changes = 0;\n this.$updateSizeAsync = function() {\n if (this.$loop.pending)\n this.$size.$dirty = true;\n else\n this.onResize();\n };\n this.onResize = function(force, gutterWidth, width, height) {\n if (this.resizing > 2)\n return;\n else if (this.resizing > 0)\n this.resizing++;\n else\n this.resizing = force ? 1 : 0;\n var el = this.container;\n if (!height)\n height = el.clientHeight || el.scrollHeight;\n if (!width)\n width = el.clientWidth || el.scrollWidth;\n var changes = this.$updateCachedSize(force, gutterWidth, width, height);\n\n \n if (!this.$size.scrollerHeight || (!width && !height))\n return this.resizing = 0;\n\n if (force)\n this.$gutterLayer.$padding = null;\n\n if (force)\n this.$renderChanges(changes | this.$changes, true);\n else\n this.$loop.schedule(changes | this.$changes);\n\n if (this.resizing)\n this.resizing = 0;\n this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;\n };\n \n this.$updateCachedSize = function(force, gutterWidth, width, height) {\n height -= (this.$extraHeight || 0);\n var changes = 0;\n var size = this.$size;\n var oldSize = {\n width: size.width,\n height: size.height,\n scrollerHeight: size.scrollerHeight,\n scrollerWidth: size.scrollerWidth\n };\n if (height && (force || size.height != height)) {\n size.height = height;\n changes |= this.CHANGE_SIZE;\n\n size.scrollerHeight = size.height;\n if (this.$horizScroll)\n size.scrollerHeight -= this.scrollBarH.getHeight();\n this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n changes = changes | this.CHANGE_SCROLL;\n }\n\n if (width && (force || size.width != width)) {\n changes |= this.CHANGE_SIZE;\n size.width = width;\n \n if (gutterWidth == null)\n gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n \n this.gutterWidth = gutterWidth;\n \n this.scrollBarH.element.style.left = \n this.scroller.style.left = gutterWidth + \"px\";\n size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); \n \n this.scrollBarH.element.style.right = \n this.scroller.style.right = this.scrollBarV.getWidth() + \"px\";\n this.scroller.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)\n changes |= this.CHANGE_FULL;\n }\n \n size.$dirty = !width || !height;\n\n if (changes)\n this._signal(\"resize\", oldSize);\n\n return changes;\n };\n\n this.onGutterResize = function() {\n var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n if (gutterWidth != this.gutterWidth)\n this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);\n\n if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else if (this.$size.$dirty) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else {\n this.$computeLayerConfig();\n this.$loop.schedule(this.CHANGE_MARKER);\n }\n };\n this.adjustWrapLimit = function() {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth);\n return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);\n };\n this.setAnimatedScroll = function(shouldAnimate){\n this.setOption(\"animatedScroll\", shouldAnimate);\n };\n this.getAnimatedScroll = function() {\n return this.$animatedScroll;\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.setOption(\"showInvisibles\", showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.getOption(\"showInvisibles\");\n };\n this.getDisplayIndentGuides = function() {\n return this.getOption(\"displayIndentGuides\");\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.setOption(\"displayIndentGuides\", display);\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.setOption(\"showPrintMargin\", showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.getOption(\"showPrintMargin\");\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.setOption(\"printMarginColumn\", showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.getOption(\"printMarginColumn\");\n };\n this.getShowGutter = function(){\n return this.getOption(\"showGutter\");\n };\n this.setShowGutter = function(show){\n return this.setOption(\"showGutter\", show);\n };\n\n this.getFadeFoldWidgets = function(){\n return this.getOption(\"fadeFoldWidgets\")\n };\n\n this.setFadeFoldWidgets = function(show) {\n this.setOption(\"fadeFoldWidgets\", show);\n };\n\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n\n this.$updateGutterLineHighlight = function() {\n var pos = this.$cursorLayer.$pixelPos;\n var height = this.layerConfig.lineHeight;\n if (this.session.getUseWrapMode()) {\n var cursor = this.session.selection.getCursor();\n cursor.column = 0;\n pos = this.$cursorLayer.getPixelPosition(cursor, true);\n height *= this.session.getRowLength(cursor.row);\n }\n this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + \"px\";\n this.$gutterLineHighlight.style.height = height + \"px\";\n };\n\n this.$updatePrintMargin = function() {\n if (!this.$showPrintMargin && !this.$printMarginEl)\n return;\n\n if (!this.$printMarginEl) {\n var containerEl = dom.createElement(\"div\");\n containerEl.className = \"ace_layer ace_print-margin-layer\";\n this.$printMarginEl = dom.createElement(\"div\");\n this.$printMarginEl.className = \"ace_print-margin\";\n containerEl.appendChild(this.$printMarginEl);\n this.content.insertBefore(containerEl, this.content.firstChild);\n }\n\n var style = this.$printMarginEl.style;\n style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + \"px\";\n style.visibility = this.$showPrintMargin ? \"visible\" : \"hidden\";\n \n if (this.session && this.session.$wrap == -1)\n this.adjustWrapLimit();\n };\n this.getContainerElement = function() {\n return this.container;\n };\n this.getMouseEventTarget = function() {\n return this.scroller;\n };\n this.getTextAreaContainer = function() {\n return this.container;\n };\n this.$moveTextAreaToCursor = function() {\n if (!this.$keepTextAreaAtCursor)\n return;\n var config = this.layerConfig;\n var posTop = this.$cursorLayer.$pixelPos.top;\n var posLeft = this.$cursorLayer.$pixelPos.left;\n posTop -= config.offset;\n\n var style = this.textarea.style;\n var h = this.lineHeight;\n if (posTop < 0 || posTop > config.height - h) {\n style.top = style.left = \"0\";\n return;\n }\n\n var w = this.characterWidth;\n if (this.$composition) {\n var val = this.textarea.value.replace(/^\\x01+/, \"\");\n w *= (this.session.$getStringScreenWidth(val)[0]+2);\n h += 2;\n }\n posLeft -= this.scrollLeft;\n if (posLeft > this.$size.scrollerWidth - w)\n posLeft = this.$size.scrollerWidth - w;\n\n posLeft += this.gutterWidth;\n style.height = h + \"px\";\n style.width = w + \"px\";\n style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + \"px\";\n style.top = Math.min(posTop, this.$size.height - h) + \"px\";\n };\n this.getFirstVisibleRow = function() {\n return this.layerConfig.firstRow;\n };\n this.getFirstFullyVisibleRow = function() {\n return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);\n };\n this.getLastFullyVisibleRow = function() {\n var config = this.layerConfig;\n var lastRow = config.lastRow\n var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;\n if (top - this.session.getScrollTop() > config.height - config.lineHeight)\n return lastRow - 1;\n return lastRow;\n };\n this.getLastVisibleRow = function() {\n return this.layerConfig.lastRow;\n };\n\n this.$padding = null;\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.$textLayer.setPadding(padding);\n this.$cursorLayer.setPadding(padding);\n this.$markerFront.setPadding(padding);\n this.$markerBack.setPadding(padding);\n this.$loop.schedule(this.CHANGE_FULL);\n this.$updatePrintMargin();\n };\n \n this.setScrollMargin = function(top, bottom, left, right) {\n var sm = this.scrollMargin;\n sm.top = top|0;\n sm.bottom = bottom|0;\n sm.right = right|0;\n sm.left = left|0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n if (sm.top && this.scrollTop <= 0 && this.session)\n this.session.setScrollTop(-sm.top);\n this.updateFull();\n };\n this.getHScrollBarAlwaysVisible = function() {\n return this.$hScrollBarAlwaysVisible;\n };\n this.setHScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"hScrollBarAlwaysVisible\", alwaysVisible);\n };\n this.getVScrollBarAlwaysVisible = function() {\n return this.$vScrollBarAlwaysVisible;\n };\n this.setVScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"vScrollBarAlwaysVisible\", alwaysVisible);\n };\n\n this.$updateScrollBarV = function() {\n var scrollHeight = this.layerConfig.maxHeight;\n var scrollerHeight = this.$size.scrollerHeight;\n if (!this.$maxLines && this.$scrollPastEnd) {\n scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;\n if (this.scrollTop > scrollHeight - scrollerHeight) {\n scrollHeight = this.scrollTop + scrollerHeight;\n this.scrollBarV.scrollTop = null;\n }\n }\n this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);\n this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);\n };\n this.$updateScrollBarH = function() {\n this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);\n this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);\n };\n \n this.$frozen = false;\n this.freeze = function() {\n this.$frozen = true;\n };\n \n this.unfreeze = function() {\n this.$frozen = false;\n };\n\n this.$renderChanges = function(changes, force) {\n if (this.$changes) {\n changes |= this.$changes;\n this.$changes = 0;\n }\n if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {\n this.$changes |= changes;\n return; \n } \n if (this.$size.$dirty) {\n this.$changes |= changes;\n return this.onResize(true);\n }\n if (!this.lineHeight) {\n this.$textLayer.checkForSizeChanges();\n }\n \n this._signal(\"beforeRender\");\n var config = this.layerConfig;\n if (changes & this.CHANGE_FULL ||\n changes & this.CHANGE_SIZE ||\n changes & this.CHANGE_TEXT ||\n changes & this.CHANGE_LINES ||\n changes & this.CHANGE_SCROLL ||\n changes & this.CHANGE_H_SCROLL\n ) {\n changes |= this.$computeLayerConfig();\n if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {\n var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;\n if (st > 0) {\n this.scrollTop = st;\n changes = changes | this.CHANGE_SCROLL;\n changes |= this.$computeLayerConfig();\n }\n }\n config = this.layerConfig;\n this.$updateScrollBarV();\n if (changes & this.CHANGE_H_SCROLL)\n this.$updateScrollBarH();\n this.$gutterLayer.element.style.marginTop = (-config.offset) + \"px\";\n this.content.style.marginTop = (-config.offset) + \"px\";\n this.content.style.width = config.width + 2 * this.$padding + \"px\";\n this.content.style.height = config.minHeight + \"px\";\n }\n if (changes & this.CHANGE_H_SCROLL) {\n this.content.style.marginLeft = -this.scrollLeft + \"px\";\n this.scroller.className = this.scrollLeft <= 0 ? \"ace_scroller\" : \"ace_scroller ace_scroll-left\";\n }\n if (changes & this.CHANGE_FULL) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this._signal(\"afterRender\");\n return;\n }\n if (changes & this.CHANGE_SCROLL) {\n if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)\n this.$textLayer.update(config);\n else\n this.$textLayer.scrollLines(config);\n\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\");\n return;\n }\n\n if (changes & this.CHANGE_TEXT) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_LINES) {\n if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n\n if (changes & this.CHANGE_CURSOR) {\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {\n this.$markerFront.update(config);\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {\n this.$markerBack.update(config);\n }\n\n this._signal(\"afterRender\");\n };\n\n \n this.$autosize = function() {\n var height = this.session.getScreenLength() * this.lineHeight;\n var maxHeight = this.$maxLines * this.lineHeight;\n var desiredHeight = Math.min(maxHeight,\n Math.max((this.$minLines || 1) * this.lineHeight, height)\n ) + this.scrollMargin.v + (this.$extraHeight || 0);\n if (this.$horizScroll)\n desiredHeight += this.scrollBarH.getHeight();\n if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)\n desiredHeight = this.$maxPixelHeight;\n var vScroll = height > maxHeight;\n \n if (desiredHeight != this.desiredHeight ||\n this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {\n if (vScroll != this.$vScroll) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n \n var w = this.container.clientWidth;\n this.container.style.height = desiredHeight + \"px\";\n this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);\n this.desiredHeight = desiredHeight;\n \n this._signal(\"autosize\");\n }\n };\n \n this.$computeLayerConfig = function() {\n var session = this.session;\n var size = this.$size;\n \n var hideScrollbars = size.height <= 2 * this.lineHeight;\n var screenLines = this.session.getScreenLength();\n var maxHeight = screenLines * this.lineHeight;\n\n var longestLine = this.$getLongestLine();\n \n var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||\n size.scrollerWidth - longestLine - 2 * this.$padding < 0);\n\n var hScrollChanged = this.$horizScroll !== horizScroll;\n if (hScrollChanged) {\n this.$horizScroll = horizScroll;\n this.scrollBarH.setVisible(horizScroll);\n }\n var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine\n if (this.$maxLines && this.lineHeight > 1)\n this.$autosize();\n\n var offset = this.scrollTop % this.lineHeight;\n var minHeight = size.scrollerHeight + this.lineHeight;\n \n var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd\n ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd\n : 0;\n maxHeight += scrollPastEnd;\n \n var sm = this.scrollMargin;\n this.session.setScrollTop(Math.max(-sm.top,\n Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));\n\n this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, \n longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));\n \n var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||\n size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);\n var vScrollChanged = vScrollBefore !== vScroll;\n if (vScrollChanged) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n\n var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;\n var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));\n var lastRow = firstRow + lineCount;\n var firstRowScreen, firstRowHeight;\n var lineHeight = this.lineHeight;\n firstRow = session.screenToDocumentRow(firstRow, 0);\n var foldLine = session.getFoldLine(firstRow);\n if (foldLine) {\n firstRow = foldLine.start.row;\n }\n\n firstRowScreen = session.documentToScreenRow(firstRow, 0);\n firstRowHeight = session.getRowLength(firstRow) * lineHeight;\n\n lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);\n minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +\n firstRowHeight;\n\n offset = this.scrollTop - firstRowScreen * lineHeight;\n\n var changes = 0;\n if (this.layerConfig.width != longestLine) \n changes = this.CHANGE_H_SCROLL;\n if (hScrollChanged || vScrollChanged) {\n changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);\n this._signal(\"scrollbarVisibilityChanged\");\n if (vScrollChanged)\n longestLine = this.$getLongestLine();\n }\n \n this.layerConfig = {\n width : longestLine,\n padding : this.$padding,\n firstRow : firstRow,\n firstRowScreen: firstRowScreen,\n lastRow : lastRow,\n lineHeight : lineHeight,\n characterWidth : this.characterWidth,\n minHeight : minHeight,\n maxHeight : maxHeight,\n offset : offset,\n gutterOffset : lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,\n height : this.$size.scrollerHeight\n };\n\n return changes;\n };\n\n this.$updateLines = function() {\n var firstRow = this.$changedLines.firstRow;\n var lastRow = this.$changedLines.lastRow;\n this.$changedLines = null;\n\n var layerConfig = this.layerConfig;\n\n if (firstRow > layerConfig.lastRow + 1) { return; }\n if (lastRow < layerConfig.firstRow) { return; }\n if (lastRow === Infinity) {\n if (this.$showGutter)\n this.$gutterLayer.update(layerConfig);\n this.$textLayer.update(layerConfig);\n return;\n }\n this.$textLayer.updateLines(layerConfig, firstRow, lastRow);\n return true;\n };\n\n this.$getLongestLine = function() {\n var charCount = this.session.getScreenWidth();\n if (this.showInvisibles && !this.session.$useWrapMode)\n charCount += 1;\n\n return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));\n };\n this.updateFrontMarkers = function() {\n this.$markerFront.setMarkers(this.session.getMarkers(true));\n this.$loop.schedule(this.CHANGE_MARKER_FRONT);\n };\n this.updateBackMarkers = function() {\n this.$markerBack.setMarkers(this.session.getMarkers());\n this.$loop.schedule(this.CHANGE_MARKER_BACK);\n };\n this.addGutterDecoration = function(row, className){\n this.$gutterLayer.addGutterDecoration(row, className);\n };\n this.removeGutterDecoration = function(row, className){\n this.$gutterLayer.removeGutterDecoration(row, className);\n };\n this.updateBreakpoints = function(rows) {\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.setAnnotations = function(annotations) {\n this.$gutterLayer.setAnnotations(annotations);\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.updateCursor = function() {\n this.$loop.schedule(this.CHANGE_CURSOR);\n };\n this.hideCursor = function() {\n this.$cursorLayer.hideCursor();\n };\n this.showCursor = function() {\n this.$cursorLayer.showCursor();\n };\n\n this.scrollSelectionIntoView = function(anchor, lead, offset) {\n this.scrollCursorIntoView(anchor, offset);\n this.scrollCursorIntoView(lead, offset);\n };\n this.scrollCursorIntoView = function(cursor, offset, $viewMargin) {\n if (this.$size.scrollerHeight === 0)\n return;\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n\n var left = pos.left;\n var top = pos.top;\n \n var topMargin = $viewMargin && $viewMargin.top || 0;\n var bottomMargin = $viewMargin && $viewMargin.bottom || 0;\n \n var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;\n \n if (scrollTop + topMargin > top) {\n if (offset && scrollTop + topMargin > top + this.lineHeight)\n top -= offset * this.$size.scrollerHeight;\n if (top === 0)\n top = -this.scrollMargin.top;\n this.session.setScrollTop(top);\n } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {\n if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight)\n top += offset * this.$size.scrollerHeight;\n this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);\n }\n\n var scrollLeft = this.scrollLeft;\n\n if (scrollLeft > left) {\n if (left < this.$padding + 2 * this.layerConfig.characterWidth)\n left = -this.scrollMargin.left;\n this.session.setScrollLeft(left);\n } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {\n this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));\n } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {\n this.session.setScrollLeft(0);\n }\n };\n this.getScrollTop = function() {\n return this.session.getScrollTop();\n };\n this.getScrollLeft = function() {\n return this.session.getScrollLeft();\n };\n this.getScrollTopRow = function() {\n return this.scrollTop / this.lineHeight;\n };\n this.getScrollBottomRow = function() {\n return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);\n };\n this.scrollToRow = function(row) {\n this.session.setScrollTop(row * this.lineHeight);\n };\n\n this.alignCursor = function(cursor, alignment) {\n if (typeof cursor == \"number\")\n cursor = {row: cursor, column: 0};\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var h = this.$size.scrollerHeight - this.lineHeight;\n var offset = pos.top - h * (alignment || 0);\n\n this.session.setScrollTop(offset);\n return offset;\n };\n\n this.STEPS = 8;\n this.$calcSteps = function(fromValue, toValue){\n var i = 0;\n var l = this.STEPS;\n var steps = [];\n\n var func = function(t, x_min, dx) {\n return dx * (Math.pow(t - 1, 3) + 1) + x_min;\n };\n\n for (i = 0; i < l; ++i)\n steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));\n\n return steps;\n };\n this.scrollToLine = function(line, center, animate, callback) {\n var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});\n var offset = pos.top;\n if (center)\n offset -= this.$size.scrollerHeight / 2;\n\n var initialScroll = this.scrollTop;\n this.session.setScrollTop(offset);\n if (animate !== false)\n this.animateScrolling(initialScroll, callback);\n };\n\n this.animateScrolling = function(fromValue, callback) {\n var toValue = this.scrollTop;\n if (!this.$animatedScroll)\n return;\n var _self = this;\n \n if (fromValue == toValue)\n return;\n \n if (this.$scrollAnimation) {\n var oldSteps = this.$scrollAnimation.steps;\n if (oldSteps.length) {\n fromValue = oldSteps[0];\n if (fromValue == toValue)\n return;\n }\n }\n \n var steps = _self.$calcSteps(fromValue, toValue);\n this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};\n\n clearInterval(this.$timer);\n\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n this.$timer = setInterval(function() {\n if (steps.length) {\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n } else if (toValue != null) {\n _self.session.$scrollTop = -1;\n _self.session.setScrollTop(toValue);\n toValue = null;\n } else {\n _self.$timer = clearInterval(_self.$timer);\n _self.$scrollAnimation = null;\n callback && callback();\n }\n }, 10);\n };\n this.scrollToY = function(scrollTop) {\n if (this.scrollTop !== scrollTop) {\n this.$loop.schedule(this.CHANGE_SCROLL);\n this.scrollTop = scrollTop;\n }\n };\n this.scrollToX = function(scrollLeft) {\n if (this.scrollLeft !== scrollLeft)\n this.scrollLeft = scrollLeft;\n this.$loop.schedule(this.CHANGE_H_SCROLL);\n };\n this.scrollTo = function(x, y) {\n this.session.setScrollTop(y);\n this.session.setScrollLeft(y);\n };\n this.scrollBy = function(deltaX, deltaY) {\n deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);\n deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);\n };\n this.isScrollableBy = function(deltaX, deltaY) {\n if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)\n return true;\n if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight\n - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)\n return true;\n if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)\n return true;\n if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth\n - this.layerConfig.width < -1 + this.scrollMargin.right)\n return true;\n };\n\n this.pixelToScreenCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n\n var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth;\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n var col = Math.round(offset);\n\n return {row: row, column: col, side: offset - col > 0 ? 1 : -1};\n };\n\n this.screenToTextCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n\n var col = Math.round(\n (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth\n );\n\n var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;\n\n return this.session.screenToDocumentPosition(row, Math.max(col, 0));\n };\n this.textToScreenCoordinates = function(row, column) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var pos = this.session.documentToScreenPosition(row, column);\n\n var x = this.$padding + Math.round(pos.column * this.characterWidth);\n var y = pos.row * this.lineHeight;\n\n return {\n pageX: canvasPos.left + x - this.scrollLeft,\n pageY: canvasPos.top + y - this.scrollTop\n };\n };\n this.visualizeFocus = function() {\n dom.addCssClass(this.container, \"ace_focus\");\n };\n this.visualizeBlur = function() {\n dom.removeCssClass(this.container, \"ace_focus\");\n };\n this.showComposition = function(position) {\n if (!this.$composition)\n this.$composition = {\n keepTextAreaAtCursor: this.$keepTextAreaAtCursor,\n cssText: this.textarea.style.cssText\n };\n\n this.$keepTextAreaAtCursor = true;\n dom.addCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = \"\";\n this.$moveTextAreaToCursor();\n };\n this.setCompositionText = function(text) {\n this.$moveTextAreaToCursor();\n };\n this.hideComposition = function() {\n if (!this.$composition)\n return;\n\n dom.removeCssClass(this.textarea, \"ace_composition\");\n this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;\n this.textarea.style.cssText = this.$composition.cssText;\n this.$composition = null;\n };\n this.setTheme = function(theme, cb) {\n var _self = this;\n this.$themeId = theme;\n _self._dispatchEvent('themeChange',{theme:theme});\n\n if (!theme || typeof theme == \"string\") {\n var moduleName = theme || this.$options.theme.initialValue;\n config.loadModule([\"theme\", moduleName], afterLoad);\n } else {\n afterLoad(theme);\n }\n\n function afterLoad(module) {\n if (_self.$themeId != theme)\n return cb && cb();\n if (!module || !module.cssClass)\n throw new Error(\"couldn't load module \" + theme + \" or it didn't call define\");\n dom.importCssString(\n module.cssText,\n module.cssClass,\n _self.container.ownerDocument\n );\n\n if (_self.theme)\n dom.removeCssClass(_self.container, _self.theme.cssClass);\n\n var padding = \"padding\" in module ? module.padding \n : \"padding\" in (_self.theme || {}) ? 4 : _self.$padding;\n if (_self.$padding && padding != _self.$padding)\n _self.setPadding(padding);\n _self.$theme = module.cssClass;\n\n _self.theme = module;\n dom.addCssClass(_self.container, module.cssClass);\n dom.setCssClass(_self.container, \"ace_dark\", module.isDark);\n if (_self.$size) {\n _self.$size.width = 0;\n _self.$updateSizeAsync();\n }\n\n _self._dispatchEvent('themeLoaded', {theme:module});\n cb && cb();\n }\n };\n this.getTheme = function() {\n return this.$themeId;\n };\n this.setStyle = function(style, include) {\n dom.setCssClass(this.container, style, include !== false);\n };\n this.unsetStyle = function(style) {\n dom.removeCssClass(this.container, style);\n };\n \n this.setCursorStyle = function(style) {\n if (this.scroller.style.cursor != style)\n this.scroller.style.cursor = style;\n };\n this.setMouseCursor = function(cursorStyle) {\n this.scroller.style.cursor = cursorStyle;\n };\n this.destroy = function() {\n this.$textLayer.destroy();\n this.$cursorLayer.destroy();\n };\n\n}).call(VirtualRenderer.prototype);\n\n\nconfig.defineOptions(VirtualRenderer.prototype, \"renderer\", {\n animatedScroll: {initialValue: false},\n showInvisibles: {\n set: function(value) {\n if (this.$textLayer.setShowInvisibles(value))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: false\n },\n showPrintMargin: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: true\n },\n printMarginColumn: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: 80\n },\n printMargin: {\n set: function(val) {\n if (typeof val == \"number\")\n this.$printMarginColumn = val;\n this.$showPrintMargin = !!val;\n this.$updatePrintMargin();\n },\n get: function() {\n return this.$showPrintMargin && this.$printMarginColumn; \n }\n },\n showGutter: {\n set: function(show){\n this.$gutter.style.display = show ? \"block\" : \"none\";\n this.$loop.schedule(this.CHANGE_FULL);\n this.onGutterResize();\n },\n initialValue: true\n },\n fadeFoldWidgets: {\n set: function(show) {\n dom.setCssClass(this.$gutter, \"ace_fade-fold-widgets\", show);\n },\n initialValue: false\n },\n showFoldWidgets: {\n set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)},\n initialValue: true\n },\n showLineNumbers: {\n set: function(show) {\n this.$gutterLayer.setShowLineNumbers(show);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n displayIndentGuides: {\n set: function(show) {\n if (this.$textLayer.setDisplayIndentGuides(show))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: true\n },\n highlightGutterLine: {\n set: function(shouldHighlight) {\n if (!this.$gutterLineHighlight) {\n this.$gutterLineHighlight = dom.createElement(\"div\");\n this.$gutterLineHighlight.className = \"ace_gutter-active-line\";\n this.$gutter.appendChild(this.$gutterLineHighlight);\n return;\n }\n\n this.$gutterLineHighlight.style.display = shouldHighlight ? \"\" : \"none\";\n if (this.$cursorLayer.$pixelPos)\n this.$updateGutterLineHighlight();\n },\n initialValue: false,\n value: true\n },\n hScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n vScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n fontSize: {\n set: function(size) {\n if (typeof size == \"number\")\n size = size + \"px\";\n this.container.style.fontSize = size;\n this.updateFontSize();\n },\n initialValue: 12\n },\n fontFamily: {\n set: function(name) {\n this.container.style.fontFamily = name;\n this.updateFontSize();\n }\n },\n maxLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n minLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n maxPixelHeight: {\n set: function(val) {\n this.updateFull();\n },\n initialValue: 0\n },\n scrollPastEnd: {\n set: function(val) {\n val = +val || 0;\n if (this.$scrollPastEnd == val)\n return;\n this.$scrollPastEnd = val;\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: 0,\n handlesSet: true\n },\n fixedWidthGutter: {\n set: function(val) {\n this.$gutterLayer.$fixedWidth = !!val;\n this.$loop.schedule(this.CHANGE_GUTTER);\n }\n },\n theme: {\n set: function(val) { this.setTheme(val) },\n get: function() { return this.$themeId || this.theme; },\n initialValue: \"./theme/textmate\",\n handlesSet: true\n }\n});\n\nexports.VirtualRenderer = VirtualRenderer;\n});\n\nace.define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar net = acequire(\"../lib/net\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\nvar config = acequire(\"../config\");\n\nvar WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.onMessage = this.onMessage.bind(this);\n if (acequire.nameToUrl && !acequire.toUrl)\n acequire.toUrl = acequire.nameToUrl;\n \n if (config.get(\"packaged\") || !acequire.toUrl) {\n workerUrl = workerUrl || config.moduleUrl(mod.id, \"worker\")\n } else {\n var normalizePath = this.$normalizePath;\n workerUrl = workerUrl || normalizePath(acequire.toUrl(\"ace/worker/worker.js\", null, \"_\"));\n\n var tlns = {};\n topLevelNamespaces.forEach(function(ns) {\n tlns[ns] = normalizePath(acequire.toUrl(ns, null, \"_\").replace(/(\\.js)?(\\?.*)?$/, \"\"));\n });\n }\n\n try {\n var workerSrc = mod.src;\n var Blob = require('w3c-blob');\n var blob = new Blob([ workerSrc ], { type: 'application/javascript' });\n var blobUrl = (window.URL || window.webkitURL).createObjectURL(blob);\n\n this.$worker = new Worker(blobUrl);\n\n } catch(e) {\n if (e instanceof window.DOMException) {\n var blob = this.$workerBlob(workerUrl);\n var URL = window.URL || window.webkitURL;\n var blobURL = URL.createObjectURL(blob);\n\n this.$worker = new Worker(blobURL);\n URL.revokeObjectURL(blobURL);\n } else {\n throw e;\n }\n }\n this.$worker.postMessage({\n init : true,\n tlns : tlns,\n module : mod.id,\n classname : classname\n });\n\n this.callbackId = 1;\n this.callbacks = {};\n\n this.$worker.onmessage = this.onMessage;\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.onMessage = function(e) {\n var msg = e.data;\n switch(msg.type) {\n case \"event\":\n this._signal(msg.name, {data: msg.data});\n break;\n case \"call\":\n var callback = this.callbacks[msg.id];\n if (callback) {\n callback(msg.data);\n delete this.callbacks[msg.id];\n }\n break;\n case \"error\":\n this.reportError(msg.data);\n break;\n case \"log\":\n window.console && console.log && console.log.apply(console, msg.data);\n break;\n }\n };\n \n this.reportError = function(err) {\n window.console && console.error && console.error(err);\n };\n\n this.$normalizePath = function(path) {\n return net.qualifyURL(path);\n };\n\n this.terminate = function() {\n this._signal(\"terminate\", {});\n this.deltaQueue = null;\n this.$worker.terminate();\n this.$worker = null;\n if (this.$doc)\n this.$doc.off(\"change\", this.changeListener);\n this.$doc = null;\n };\n\n this.send = function(cmd, args) {\n this.$worker.postMessage({command: cmd, args: args});\n };\n\n this.call = function(cmd, args, callback) {\n if (callback) {\n var id = this.callbackId++;\n this.callbacks[id] = callback;\n args.push(id);\n }\n this.send(cmd, args);\n };\n\n this.emit = function(event, data) {\n try {\n this.$worker.postMessage({event: event, data: {data: data.data}});\n }\n catch(ex) {\n console.error(ex.stack);\n }\n };\n\n this.attachToDocument = function(doc) {\n if(this.$doc)\n this.terminate();\n\n this.$doc = doc;\n this.call(\"setValue\", [doc.getValue()]);\n doc.on(\"change\", this.changeListener);\n };\n\n this.changeListener = function(delta) {\n if (!this.deltaQueue) {\n this.deltaQueue = [];\n setTimeout(this.$sendDeltaQueue, 0);\n }\n if (delta.action == \"insert\")\n this.deltaQueue.push(delta.start, delta.lines);\n else\n this.deltaQueue.push(delta.start, delta.end);\n };\n\n this.$sendDeltaQueue = function() {\n var q = this.deltaQueue;\n if (!q) return;\n this.deltaQueue = null;\n if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {\n this.call(\"setValue\", [this.$doc.getValue()]);\n } else\n this.emit(\"change\", {data: q});\n };\n\n this.$workerBlob = function(workerUrl) {\n var script = \"importScripts('\" + net.qualifyURL(workerUrl) + \"');\";\n try {\n return new Blob([script], {\"type\": \"application/javascript\"});\n } catch (e) { // Backwards-compatibility\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;\n var blobBuilder = new BlobBuilder();\n blobBuilder.append(script);\n return blobBuilder.getBlob(\"application/javascript\");\n }\n };\n\n}).call(WorkerClient.prototype);\n\n\nvar UIWorkerClient = function(topLevelNamespaces, mod, classname) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.callbackId = 1;\n this.callbacks = {};\n this.messageBuffer = [];\n\n var main = null;\n var emitSync = false;\n var sender = Object.create(EventEmitter);\n var _self = this;\n\n this.$worker = {};\n this.$worker.terminate = function() {};\n this.$worker.postMessage = function(e) {\n _self.messageBuffer.push(e);\n if (main) {\n if (emitSync)\n setTimeout(processNext);\n else\n processNext();\n }\n };\n this.setEmitSync = function(val) { emitSync = val };\n\n var processNext = function() {\n var msg = _self.messageBuffer.shift();\n if (msg.command)\n main[msg.command].apply(main, msg.args);\n else if (msg.event)\n sender._signal(msg.event, msg.data);\n };\n\n sender.postMessage = function(msg) {\n _self.onMessage({data: msg});\n };\n sender.callback = function(data, callbackId) {\n this.postMessage({type: \"call\", id: callbackId, data: data});\n };\n sender.emit = function(name, data) {\n this.postMessage({type: \"event\", name: name, data: data});\n };\n\n config.loadModule([\"worker\", mod], function(Main) {\n main = new Main[classname](sender);\n while (_self.messageBuffer.length)\n processNext();\n });\n};\n\nUIWorkerClient.prototype = WorkerClient.prototype;\n\nexports.UIWorkerClient = UIWorkerClient;\nexports.WorkerClient = WorkerClient;\n\n});\n\nace.define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar oop = acequire(\"./lib/oop\");\n\nvar PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {\n var _self = this;\n this.length = length;\n this.session = session;\n this.doc = session.getDocument();\n this.mainClass = mainClass;\n this.othersClass = othersClass;\n this.$onUpdate = this.onUpdate.bind(this);\n this.doc.on(\"change\", this.$onUpdate);\n this.$others = others;\n \n this.$onCursorChange = function() {\n setTimeout(function() {\n _self.onCursorChange();\n });\n };\n \n this.$pos = pos;\n var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};\n this.$undoStackDepth = undoStack.length;\n this.setup();\n\n session.selection.on(\"changeCursor\", this.$onCursorChange);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setup = function() {\n var _self = this;\n var doc = this.doc;\n var session = this.session;\n \n this.selectionBefore = session.selection.toJSON();\n if (session.selection.inMultiSelectMode)\n session.selection.toSingleRange();\n\n this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);\n var pos = this.pos;\n pos.$insertRight = true;\n pos.detach();\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);\n this.others = [];\n this.$others.forEach(function(other) {\n var anchor = doc.createAnchor(other.row, other.column);\n anchor.$insertRight = true;\n anchor.detach();\n _self.others.push(anchor);\n });\n session.setUndoSelect(false);\n };\n this.showOtherMarkers = function() {\n if (this.othersActive) return;\n var session = this.session;\n var _self = this;\n this.othersActive = true;\n this.others.forEach(function(anchor) {\n anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);\n });\n };\n this.hideOtherMarkers = function() {\n if (!this.othersActive) return;\n this.othersActive = false;\n for (var i = 0; i < this.others.length; i++) {\n this.session.removeMarker(this.others[i].markerId);\n }\n };\n this.onUpdate = function(delta) {\n if (this.$updating)\n return this.updateAnchors(delta);\n \n var range = delta;\n if (range.start.row !== range.end.row) return;\n if (range.start.row !== this.pos.row) return;\n this.$updating = true;\n var lengthDiff = delta.action === \"insert\" ? range.end.column - range.start.column : range.start.column - range.end.column;\n var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;\n var distanceFromStart = range.start.column - this.pos.column;\n \n this.updateAnchors(delta);\n \n if (inMainRange)\n this.length += lengthDiff;\n\n if (inMainRange && !this.session.$fromUndo) {\n if (delta.action === 'insert') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.insertMergedLines(newPos, delta.lines);\n }\n } else if (delta.action === 'remove') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));\n }\n }\n }\n \n this.$updating = false;\n this.updateMarkers();\n };\n \n this.updateAnchors = function(delta) {\n this.pos.onChange(delta);\n for (var i = this.others.length; i--;)\n this.others[i].onChange(delta);\n this.updateMarkers();\n };\n \n this.updateMarkers = function() {\n if (this.$updating)\n return;\n var _self = this;\n var session = this.session;\n var updateMarker = function(pos, className) {\n session.removeMarker(pos.markerId);\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false);\n };\n updateMarker(this.pos, this.mainClass);\n for (var i = this.others.length; i--;)\n updateMarker(this.others[i], this.othersClass);\n };\n\n this.onCursorChange = function(event) {\n if (this.$updating || !this.session) return;\n var pos = this.session.selection.getCursor();\n if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {\n this.showOtherMarkers();\n this._emit(\"cursorEnter\", event);\n } else {\n this.hideOtherMarkers();\n this._emit(\"cursorLeave\", event);\n }\n }; \n this.detach = function() {\n this.session.removeMarker(this.pos && this.pos.markerId);\n this.hideOtherMarkers();\n this.doc.removeEventListener(\"change\", this.$onUpdate);\n this.session.selection.removeEventListener(\"changeCursor\", this.$onCursorChange);\n this.session.setUndoSelect(true);\n this.session = null;\n };\n this.cancel = function() {\n if (this.$undoStackDepth === -1)\n return;\n var undoManager = this.session.getUndoManager();\n var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;\n for (var i = 0; i < undosRequired; i++) {\n undoManager.undo(true);\n }\n if (this.selectionBefore)\n this.session.selection.fromJSON(this.selectionBefore);\n };\n}).call(PlaceHolder.prototype);\n\n\nexports.PlaceHolder = PlaceHolder;\n});\n\nace.define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\n\nfunction onMouseDown(e) {\n var ev = e.domEvent;\n var alt = ev.altKey;\n var shift = ev.shiftKey;\n var ctrl = ev.ctrlKey;\n var accel = e.getAccelKey();\n var button = e.getButton();\n \n if (ctrl && useragent.isMac)\n button = ev.button;\n\n if (e.editor.inMultiSelectMode && button == 2) {\n e.editor.textInput.onContextMenu(e.domEvent);\n return;\n }\n \n if (!ctrl && !alt && !accel) {\n if (button === 0 && e.editor.inMultiSelectMode)\n e.editor.exitMultiSelectMode();\n return;\n }\n \n if (button !== 0)\n return;\n\n var editor = e.editor;\n var selection = editor.selection;\n var isMultiSelect = editor.inMultiSelectMode;\n var pos = e.getDocumentPosition();\n var cursor = selection.getCursor();\n var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));\n\n var mouseX = e.x, mouseY = e.y;\n var onMouseSelection = function(e) {\n mouseX = e.clientX;\n mouseY = e.clientY;\n };\n \n var session = editor.session;\n var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var screenCursor = screenAnchor;\n \n var selectionMode;\n if (editor.$mouseHandler.$enableJumpToDef) {\n if (ctrl && alt || accel && alt)\n selectionMode = shift ? \"block\" : \"add\";\n else if (alt && editor.$blockSelectEnabled)\n selectionMode = \"block\";\n } else {\n if (accel && !alt) {\n selectionMode = \"add\";\n if (!isMultiSelect && shift)\n return;\n } else if (alt && editor.$blockSelectEnabled) {\n selectionMode = \"block\";\n }\n }\n \n if (selectionMode && useragent.isMac && ev.ctrlKey) {\n editor.$mouseHandler.cancelContextMenu();\n }\n\n if (selectionMode == \"add\") {\n if (!isMultiSelect && inSelection)\n return; // dragging\n\n if (!isMultiSelect) {\n var range = selection.toOrientedRange();\n editor.addSelectionMarker(range);\n }\n\n var oldRange = selection.rangeList.rangeAtPoint(pos);\n \n \n editor.$blockScrolling++;\n editor.inVirtualSelectionMode = true;\n \n if (shift) {\n oldRange = null;\n range = selection.ranges[0] || range;\n editor.removeSelectionMarker(range);\n }\n editor.once(\"mouseup\", function() {\n var tmpSel = selection.toOrientedRange();\n\n if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))\n selection.substractPoint(tmpSel.cursor);\n else {\n if (shift) {\n selection.substractPoint(range.cursor);\n } else if (range) {\n editor.removeSelectionMarker(range);\n selection.addRange(range);\n }\n selection.addRange(tmpSel);\n }\n editor.$blockScrolling--;\n editor.inVirtualSelectionMode = false;\n });\n\n } else if (selectionMode == \"block\") {\n e.stop();\n editor.inVirtualSelectionMode = true; \n var initialRange;\n var rectSel = [];\n var blockSelect = function() {\n var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);\n\n if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))\n return;\n screenCursor = newCursor;\n \n editor.$blockScrolling++;\n editor.selection.moveToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n\n editor.removeSelectionMarkers(rectSel);\n rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);\n if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())\n rectSel[0] = editor.$mouseHandler.$clickSelection.clone();\n rectSel.forEach(editor.addSelectionMarker, editor);\n editor.updateSelectionMarkers();\n editor.$blockScrolling--;\n };\n editor.$blockScrolling++;\n if (isMultiSelect && !accel) {\n selection.toSingleRange();\n } else if (!isMultiSelect && accel) {\n initialRange = selection.toOrientedRange();\n editor.addSelectionMarker(initialRange);\n }\n \n if (shift)\n screenAnchor = session.documentToScreenPosition(selection.lead); \n else\n selection.moveToPosition(pos);\n editor.$blockScrolling--;\n \n screenCursor = {row: -1, column: -1};\n\n var onMouseSelectionEnd = function(e) {\n clearInterval(timerId);\n editor.removeSelectionMarkers(rectSel);\n if (!rectSel.length)\n rectSel = [selection.toOrientedRange()];\n editor.$blockScrolling++;\n if (initialRange) {\n editor.removeSelectionMarker(initialRange);\n selection.toSingleRange(initialRange);\n }\n for (var i = 0; i < rectSel.length; i++)\n selection.addRange(rectSel[i]);\n editor.inVirtualSelectionMode = false;\n editor.$mouseHandler.$clickSelection = null;\n editor.$blockScrolling--;\n };\n\n var onSelectionInterval = blockSelect;\n\n event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);\n var timerId = setInterval(function() {onSelectionInterval();}, 20);\n\n return e.preventDefault();\n }\n}\n\n\nexports.onMouseDown = onMouseDown;\n\n});\n\nace.define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"], function(acequire, exports, module) {\nexports.defaultCommands = [{\n name: \"addCursorAbove\",\n exec: function(editor) { editor.selectMoreLines(-1); },\n bindKey: {win: \"Ctrl-Alt-Up\", mac: \"Ctrl-Alt-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelow\",\n exec: function(editor) { editor.selectMoreLines(1); },\n bindKey: {win: \"Ctrl-Alt-Down\", mac: \"Ctrl-Alt-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorAboveSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Up\", mac: \"Ctrl-Alt-Shift-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelowSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Down\", mac: \"Ctrl-Alt-Shift-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreBefore\",\n exec: function(editor) { editor.selectMore(-1); },\n bindKey: {win: \"Ctrl-Alt-Left\", mac: \"Ctrl-Alt-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreAfter\",\n exec: function(editor) { editor.selectMore(1); },\n bindKey: {win: \"Ctrl-Alt-Right\", mac: \"Ctrl-Alt-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextBefore\",\n exec: function(editor) { editor.selectMore(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Left\", mac: \"Ctrl-Alt-Shift-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextAfter\",\n exec: function(editor) { editor.selectMore(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Right\", mac: \"Ctrl-Alt-Shift-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"splitIntoLines\",\n exec: function(editor) { editor.multiSelect.splitIntoLines(); },\n bindKey: {win: \"Ctrl-Alt-L\", mac: \"Ctrl-Alt-L\"},\n readOnly: true\n}, {\n name: \"alignCursors\",\n exec: function(editor) { editor.alignCursors(); },\n bindKey: {win: \"Ctrl-Alt-A\", mac: \"Ctrl-Alt-A\"},\n scrollIntoView: \"cursor\"\n}, {\n name: \"findAll\",\n exec: function(editor) { editor.findAll(); },\n bindKey: {win: \"Ctrl-Alt-K\", mac: \"Ctrl-Alt-G\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}];\nexports.multiSelectCommands = [{\n name: \"singleSelection\",\n bindKey: \"esc\",\n exec: function(editor) { editor.exitMultiSelectMode(); },\n scrollIntoView: \"cursor\",\n readOnly: true,\n isAvailable: function(editor) {return editor && editor.inMultiSelectMode}\n}];\n\nvar HashHandler = acequire(\"../keyboard/hash_handler\").HashHandler;\nexports.keyboardHandler = new HashHandler(exports.multiSelectCommands);\n\n});\n\nace.define(\"ace/multi_select\",[\"require\",\"exports\",\"module\",\"ace/range_list\",\"ace/range\",\"ace/selection\",\"ace/mouse/multi_select_handler\",\"ace/lib/event\",\"ace/lib/lang\",\"ace/commands/multi_select_commands\",\"ace/search\",\"ace/edit_session\",\"ace/editor\",\"ace/config\"], function(acequire, exports, module) {\n\nvar RangeList = acequire(\"./range_list\").RangeList;\nvar Range = acequire(\"./range\").Range;\nvar Selection = acequire(\"./selection\").Selection;\nvar onMouseDown = acequire(\"./mouse/multi_select_handler\").onMouseDown;\nvar event = acequire(\"./lib/event\");\nvar lang = acequire(\"./lib/lang\");\nvar commands = acequire(\"./commands/multi_select_commands\");\nexports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);\nvar Search = acequire(\"./search\").Search;\nvar search = new Search();\n\nfunction find(session, needle, dir) {\n search.$options.wrap = true;\n search.$options.needle = needle;\n search.$options.backwards = dir == -1;\n return search.find(session);\n}\nvar EditSession = acequire(\"./edit_session\").EditSession;\n(function() {\n this.getSelectionMarkers = function() {\n return this.$selectionMarkers;\n };\n}).call(EditSession.prototype);\n(function() {\n this.ranges = null;\n this.rangeList = null;\n this.addRange = function(range, $blockChangeEvents) {\n if (!range)\n return;\n\n if (!this.inMultiSelectMode && this.rangeCount === 0) {\n var oldRange = this.toOrientedRange();\n this.rangeList.add(oldRange);\n this.rangeList.add(range);\n if (this.rangeList.ranges.length != 2) {\n this.rangeList.removeAll();\n return $blockChangeEvents || this.fromOrientedRange(range);\n }\n this.rangeList.removeAll();\n this.rangeList.add(oldRange);\n this.$onAddRange(oldRange);\n }\n\n if (!range.cursor)\n range.cursor = range.end;\n\n var removed = this.rangeList.add(range);\n\n this.$onAddRange(range);\n\n if (removed.length)\n this.$onRemoveRange(removed);\n\n if (this.rangeCount > 1 && !this.inMultiSelectMode) {\n this._signal(\"multiSelect\");\n this.inMultiSelectMode = true;\n this.session.$undoSelect = false;\n this.rangeList.attach(this.session);\n }\n\n return $blockChangeEvents || this.fromOrientedRange(range);\n };\n\n this.toSingleRange = function(range) {\n range = range || this.ranges[0];\n var removed = this.rangeList.removeAll();\n if (removed.length)\n this.$onRemoveRange(removed);\n\n range && this.fromOrientedRange(range);\n };\n this.substractPoint = function(pos) {\n var removed = this.rangeList.substractPoint(pos);\n if (removed) {\n this.$onRemoveRange(removed);\n return removed[0];\n }\n };\n this.mergeOverlappingRanges = function() {\n var removed = this.rangeList.merge();\n if (removed.length)\n this.$onRemoveRange(removed);\n else if(this.ranges[0])\n this.fromOrientedRange(this.ranges[0]);\n };\n\n this.$onAddRange = function(range) {\n this.rangeCount = this.rangeList.ranges.length;\n this.ranges.unshift(range);\n this._signal(\"addRange\", {range: range});\n };\n\n this.$onRemoveRange = function(removed) {\n this.rangeCount = this.rangeList.ranges.length;\n if (this.rangeCount == 1 && this.inMultiSelectMode) {\n var lastRange = this.rangeList.ranges.pop();\n removed.push(lastRange);\n this.rangeCount = 0;\n }\n\n for (var i = removed.length; i--; ) {\n var index = this.ranges.indexOf(removed[i]);\n this.ranges.splice(index, 1);\n }\n\n this._signal(\"removeRange\", {ranges: removed});\n\n if (this.rangeCount === 0 && this.inMultiSelectMode) {\n this.inMultiSelectMode = false;\n this._signal(\"singleSelect\");\n this.session.$undoSelect = true;\n this.rangeList.detach(this.session);\n }\n\n lastRange = lastRange || this.ranges[0];\n if (lastRange && !lastRange.isEqual(this.getRange()))\n this.fromOrientedRange(lastRange);\n };\n this.$initRangeList = function() {\n if (this.rangeList)\n return;\n\n this.rangeList = new RangeList();\n this.ranges = [];\n this.rangeCount = 0;\n };\n this.getAllRanges = function() {\n return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];\n };\n\n this.splitIntoLines = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var range = this.getRange();\n var isBackwards = this.isBackwards();\n var startRow = range.start.row;\n var endRow = range.end.row;\n if (startRow == endRow) {\n if (isBackwards)\n var start = range.end, end = range.start;\n else\n var start = range.start, end = range.end;\n \n this.addRange(Range.fromPoints(end, end));\n this.addRange(Range.fromPoints(start, start));\n return;\n }\n\n var rectSel = [];\n var r = this.getLineRange(startRow, true);\n r.start.column = range.start.column;\n rectSel.push(r);\n\n for (var i = startRow + 1; i < endRow; i++)\n rectSel.push(this.getLineRange(i, true));\n\n r = this.getLineRange(endRow, true);\n r.end.column = range.end.column;\n rectSel.push(r);\n\n rectSel.forEach(this.addRange, this);\n }\n };\n this.toggleBlockSelection = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var cursor = this.session.documentToScreenPosition(this.selectionLead);\n var anchor = this.session.documentToScreenPosition(this.selectionAnchor);\n\n var rectSel = this.rectangularRangeBlock(cursor, anchor);\n rectSel.forEach(this.addRange, this);\n }\n };\n this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {\n var rectSel = [];\n\n var xBackwards = screenCursor.column < screenAnchor.column;\n if (xBackwards) {\n var startColumn = screenCursor.column;\n var endColumn = screenAnchor.column;\n } else {\n var startColumn = screenAnchor.column;\n var endColumn = screenCursor.column;\n }\n\n var yBackwards = screenCursor.row < screenAnchor.row;\n if (yBackwards) {\n var startRow = screenCursor.row;\n var endRow = screenAnchor.row;\n } else {\n var startRow = screenAnchor.row;\n var endRow = screenCursor.row;\n }\n\n if (startColumn < 0)\n startColumn = 0;\n if (startRow < 0)\n startRow = 0;\n\n if (startRow == endRow)\n includeEmptyLines = true;\n\n for (var row = startRow; row <= endRow; row++) {\n var range = Range.fromPoints(\n this.session.screenToDocumentPosition(row, startColumn),\n this.session.screenToDocumentPosition(row, endColumn)\n );\n if (range.isEmpty()) {\n if (docEnd && isSamePoint(range.end, docEnd))\n break;\n var docEnd = range.end;\n }\n range.cursor = xBackwards ? range.start : range.end;\n rectSel.push(range);\n }\n\n if (yBackwards)\n rectSel.reverse();\n\n if (!includeEmptyLines) {\n var end = rectSel.length - 1;\n while (rectSel[end].isEmpty() && end > 0)\n end--;\n if (end > 0) {\n var start = 0;\n while (rectSel[start].isEmpty())\n start++;\n }\n for (var i = end; i >= start; i--) {\n if (rectSel[i].isEmpty())\n rectSel.splice(i, 1);\n }\n }\n\n return rectSel;\n };\n}).call(Selection.prototype);\nvar Editor = acequire(\"./editor\").Editor;\n(function() {\n this.updateSelectionMarkers = function() {\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.addSelectionMarker = function(orientedRange) {\n if (!orientedRange.cursor)\n orientedRange.cursor = orientedRange.end;\n\n var style = this.getSelectionStyle();\n orientedRange.marker = this.session.addMarker(orientedRange, \"ace_selection\", style);\n\n this.session.$selectionMarkers.push(orientedRange);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n return orientedRange;\n };\n this.removeSelectionMarker = function(range) {\n if (!range.marker)\n return;\n this.session.removeMarker(range.marker);\n var index = this.session.$selectionMarkers.indexOf(range);\n if (index != -1)\n this.session.$selectionMarkers.splice(index, 1);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n };\n\n this.removeSelectionMarkers = function(ranges) {\n var markerList = this.session.$selectionMarkers;\n for (var i = ranges.length; i--; ) {\n var range = ranges[i];\n if (!range.marker)\n continue;\n this.session.removeMarker(range.marker);\n var index = markerList.indexOf(range);\n if (index != -1)\n markerList.splice(index, 1);\n }\n this.session.selectionMarkerCount = markerList.length;\n };\n\n this.$onAddRange = function(e) {\n this.addSelectionMarker(e.range);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onRemoveRange = function(e) {\n this.removeSelectionMarkers(e.ranges);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onMultiSelect = function(e) {\n if (this.inMultiSelectMode)\n return;\n this.inMultiSelectMode = true;\n\n this.setStyle(\"ace_multiselect\");\n this.keyBinding.addKeyboardHandler(commands.keyboardHandler);\n this.commands.setDefaultHandler(\"exec\", this.$onMultiSelectExec);\n\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onSingleSelect = function(e) {\n if (this.session.multiSelect.inVirtualMode)\n return;\n this.inMultiSelectMode = false;\n\n this.unsetStyle(\"ace_multiselect\");\n this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);\n\n this.commands.removeDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n this._emit(\"changeSelection\");\n };\n\n this.$onMultiSelectExec = function(e) {\n var command = e.command;\n var editor = e.editor;\n if (!editor.multiSelect)\n return;\n if (!command.multiSelectAction) {\n var result = command.exec(editor, e.args || {});\n editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());\n editor.multiSelect.mergeOverlappingRanges();\n } else if (command.multiSelectAction == \"forEach\") {\n result = editor.forEachSelection(command, e.args);\n } else if (command.multiSelectAction == \"forEachLine\") {\n result = editor.forEachSelection(command, e.args, true);\n } else if (command.multiSelectAction == \"single\") {\n editor.exitMultiSelectMode();\n result = command.exec(editor, e.args || {});\n } else {\n result = command.multiSelectAction(editor, e.args || {});\n }\n return result;\n }; \n this.forEachSelection = function(cmd, args, options) {\n if (this.inVirtualSelectionMode)\n return;\n var keepOrder = options && options.keepOrder;\n var $byLines = options == true || options && options.$byLines\n var session = this.session;\n var selection = this.selection;\n var rangeList = selection.rangeList;\n var ranges = (keepOrder ? selection : rangeList).ranges;\n var result;\n \n if (!ranges.length)\n return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n \n var reg = selection._eventRegistry;\n selection._eventRegistry = {};\n\n var tmpSel = new Selection(session);\n this.inVirtualSelectionMode = true;\n for (var i = ranges.length; i--;) {\n if ($byLines) {\n while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)\n i--;\n }\n tmpSel.fromOrientedRange(ranges[i]);\n tmpSel.index = i;\n this.selection = session.selection = tmpSel;\n var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n if (!result && cmdResult !== undefined)\n result = cmdResult;\n tmpSel.toOrientedRange(ranges[i]);\n }\n tmpSel.detach();\n\n this.selection = session.selection = selection;\n this.inVirtualSelectionMode = false;\n selection._eventRegistry = reg;\n selection.mergeOverlappingRanges();\n \n var anim = this.renderer.$scrollAnimation;\n this.onCursorChange();\n this.onSelectionChange();\n if (anim && anim.from == anim.to)\n this.renderer.animateScrolling(anim.from);\n \n return result;\n };\n this.exitMultiSelectMode = function() {\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode)\n return;\n this.multiSelect.toSingleRange();\n };\n\n this.getSelectedText = function() {\n var text = \"\";\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var ranges = this.multiSelect.rangeList.ranges;\n var buf = [];\n for (var i = 0; i < ranges.length; i++) {\n buf.push(this.session.getTextRange(ranges[i]));\n }\n var nl = this.session.getDocument().getNewLineCharacter();\n text = buf.join(nl);\n if (text.length == (buf.length - 1) * nl.length)\n text = \"\";\n } else if (!this.selection.isEmpty()) {\n text = this.session.getTextRange(this.getSelectionRange());\n }\n return text;\n };\n \n this.$checkMultiselectChange = function(e, anchor) {\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var range = this.multiSelect.ranges[0];\n if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)\n return;\n var pos = anchor == this.multiSelect.anchor\n ? range.cursor == range.start ? range.end : range.start\n : range.cursor;\n if (pos.row != anchor.row \n || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)\n this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());\n }\n };\n this.findAll = function(needle, options, additive) {\n options = options || {};\n options.needle = needle || options.needle;\n if (options.needle == undefined) {\n var range = this.selection.isEmpty()\n ? this.selection.getWordRange()\n : this.selection.getRange();\n options.needle = this.session.getTextRange(range);\n } \n this.$search.set(options);\n \n var ranges = this.$search.findAll(this.session);\n if (!ranges.length)\n return 0;\n\n this.$blockScrolling += 1;\n var selection = this.multiSelect;\n\n if (!additive)\n selection.toSingleRange(ranges[0]);\n\n for (var i = ranges.length; i--; )\n selection.addRange(ranges[i], true);\n if (range && selection.rangeList.rangeAtPoint(range.start))\n selection.addRange(range, true);\n \n this.$blockScrolling -= 1;\n\n return ranges.length;\n };\n this.selectMoreLines = function(dir, skip) {\n var range = this.selection.toOrientedRange();\n var isBackwards = range.cursor == range.end;\n\n var screenLead = this.session.documentToScreenPosition(range.cursor);\n if (this.selection.$desiredColumn)\n screenLead.column = this.selection.$desiredColumn;\n\n var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);\n\n if (!range.isEmpty()) {\n var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);\n var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);\n } else {\n var anchor = lead;\n }\n\n if (isBackwards) {\n var newRange = Range.fromPoints(lead, anchor);\n newRange.cursor = newRange.start;\n } else {\n var newRange = Range.fromPoints(anchor, lead);\n newRange.cursor = newRange.end;\n }\n\n newRange.desiredColumn = screenLead.column;\n if (!this.selection.inMultiSelectMode) {\n this.selection.addRange(range);\n } else {\n if (skip)\n var toRemove = range.cursor;\n }\n\n this.selection.addRange(newRange);\n if (toRemove)\n this.selection.substractPoint(toRemove);\n };\n this.transposeSelections = function(dir) {\n var session = this.session;\n var sel = session.multiSelect;\n var all = sel.ranges;\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n if (range.isEmpty()) {\n var tmp = session.getWordRange(range.start.row, range.start.column);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n range.end.row = tmp.end.row;\n range.end.column = tmp.end.column;\n }\n }\n sel.mergeOverlappingRanges();\n\n var words = [];\n for (var i = all.length; i--; ) {\n var range = all[i];\n words.unshift(session.getTextRange(range));\n }\n\n if (dir < 0)\n words.unshift(words.pop());\n else\n words.push(words.shift());\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n var tmp = range.clone();\n session.replace(range, words[i]);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n }\n };\n this.selectMore = function(dir, skip, stopAtFirst) {\n var session = this.session;\n var sel = session.multiSelect;\n\n var range = sel.toOrientedRange();\n if (range.isEmpty()) {\n range = session.getWordRange(range.start.row, range.start.column);\n range.cursor = dir == -1 ? range.start : range.end;\n this.multiSelect.addRange(range);\n if (stopAtFirst)\n return;\n }\n var needle = session.getTextRange(range);\n\n var newRange = find(session, needle, dir);\n if (newRange) {\n newRange.cursor = dir == -1 ? newRange.start : newRange.end;\n this.$blockScrolling += 1;\n this.session.unfold(newRange);\n this.multiSelect.addRange(newRange);\n this.$blockScrolling -= 1;\n this.renderer.scrollCursorIntoView(null, 0.5);\n }\n if (skip)\n this.multiSelect.substractPoint(range.cursor);\n };\n this.alignCursors = function() {\n var session = this.session;\n var sel = session.multiSelect;\n var ranges = sel.ranges;\n var row = -1;\n var sameRowRanges = ranges.filter(function(r) {\n if (r.cursor.row == row)\n return true;\n row = r.cursor.row;\n });\n \n if (!ranges.length || sameRowRanges.length == ranges.length - 1) {\n var range = this.selection.getRange();\n var fr = range.start.row, lr = range.end.row;\n var guessRange = fr == lr;\n if (guessRange) {\n var max = this.session.getLength();\n var line;\n do {\n line = this.session.getLine(lr);\n } while (/[=:]/.test(line) && ++lr < max);\n do {\n line = this.session.getLine(fr);\n } while (/[=:]/.test(line) && --fr > 0);\n \n if (fr < 0) fr = 0;\n if (lr >= max) lr = max - 1;\n }\n var lines = this.session.removeFullLines(fr, lr);\n lines = this.$reAlignText(lines, guessRange);\n this.session.insert({row: fr, column: 0}, lines.join(\"\\n\") + \"\\n\");\n if (!guessRange) {\n range.start.column = 0;\n range.end.column = lines[lines.length - 1].length;\n }\n this.selection.setRange(range);\n } else {\n sameRowRanges.forEach(function(r) {\n sel.substractPoint(r.cursor);\n });\n\n var maxCol = 0;\n var minSpace = Infinity;\n var spaceOffsets = ranges.map(function(r) {\n var p = r.cursor;\n var line = session.getLine(p.row);\n var spaceOffset = line.substr(p.column).search(/\\S/g);\n if (spaceOffset == -1)\n spaceOffset = 0;\n\n if (p.column > maxCol)\n maxCol = p.column;\n if (spaceOffset < minSpace)\n minSpace = spaceOffset;\n return spaceOffset;\n });\n ranges.forEach(function(r, i) {\n var p = r.cursor;\n var l = maxCol - p.column;\n var d = spaceOffsets[i] - minSpace;\n if (l > d)\n session.insert(p, lang.stringRepeat(\" \", l - d));\n else\n session.remove(new Range(p.row, p.column, p.row, p.column - l + d));\n\n r.start.column = r.end.column = maxCol;\n r.start.row = r.end.row = p.row;\n r.cursor = r.end;\n });\n sel.fromOrientedRange(ranges[0]);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n }\n };\n\n this.$reAlignText = function(lines, forceLeft) {\n var isLeftAligned = true, isRightAligned = true;\n var startW, textW, endW;\n\n return lines.map(function(line) {\n var m = line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);\n if (!m)\n return [line];\n\n if (startW == null) {\n startW = m[1].length;\n textW = m[2].length;\n endW = m[3].length;\n return m;\n }\n\n if (startW + textW + endW != m[1].length + m[2].length + m[3].length)\n isRightAligned = false;\n if (startW != m[1].length)\n isLeftAligned = false;\n\n if (startW > m[1].length)\n startW = m[1].length;\n if (textW < m[2].length)\n textW = m[2].length;\n if (endW > m[3].length)\n endW = m[3].length;\n\n return m;\n }).map(forceLeft ? alignLeft :\n isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);\n\n function spaces(n) {\n return lang.stringRepeat(\" \", n);\n }\n\n function alignLeft(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(textW - m[2].length + endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function alignRight(m) {\n return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]\n + spaces(endW, \" \")\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function unAlign(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n };\n}).call(Editor.prototype);\n\n\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nexports.onSessionChange = function(e) {\n var session = e.session;\n if (session && !session.multiSelect) {\n session.$selectionMarkers = [];\n session.selection.$initRangeList();\n session.multiSelect = session.selection;\n }\n this.multiSelect = session && session.multiSelect;\n\n var oldSession = e.oldSession;\n if (oldSession) {\n oldSession.multiSelect.off(\"addRange\", this.$onAddRange);\n oldSession.multiSelect.off(\"removeRange\", this.$onRemoveRange);\n oldSession.multiSelect.off(\"multiSelect\", this.$onMultiSelect);\n oldSession.multiSelect.off(\"singleSelect\", this.$onSingleSelect);\n oldSession.multiSelect.lead.off(\"change\", this.$checkMultiselectChange);\n oldSession.multiSelect.anchor.off(\"change\", this.$checkMultiselectChange);\n }\n\n if (session) {\n session.multiSelect.on(\"addRange\", this.$onAddRange);\n session.multiSelect.on(\"removeRange\", this.$onRemoveRange);\n session.multiSelect.on(\"multiSelect\", this.$onMultiSelect);\n session.multiSelect.on(\"singleSelect\", this.$onSingleSelect);\n session.multiSelect.lead.on(\"change\", this.$checkMultiselectChange);\n session.multiSelect.anchor.on(\"change\", this.$checkMultiselectChange);\n }\n\n if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {\n if (session.selection.inMultiSelectMode)\n this.$onMultiSelect();\n else\n this.$onSingleSelect();\n }\n};\nfunction MultiSelect(editor) {\n if (editor.$multiselectOnSessionChange)\n return;\n editor.$onAddRange = editor.$onAddRange.bind(editor);\n editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);\n editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);\n editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);\n editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);\n editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);\n\n editor.$multiselectOnSessionChange(editor);\n editor.on(\"changeSession\", editor.$multiselectOnSessionChange);\n\n editor.on(\"mousedown\", onMouseDown);\n editor.commands.addCommands(commands.defaultCommands);\n\n addAltCursorListeners(editor);\n}\n\nfunction addAltCursorListeners(editor){\n var el = editor.textInput.getElement();\n var altCursor = false;\n event.addListener(el, \"keydown\", function(e) {\n var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);\n if (editor.$blockSelectEnabled && altDown) {\n if (!altCursor) {\n editor.renderer.setMouseCursor(\"crosshair\");\n altCursor = true;\n }\n } else if (altCursor) {\n reset();\n }\n });\n\n event.addListener(el, \"keyup\", reset);\n event.addListener(el, \"blur\", reset);\n function reset(e) {\n if (altCursor) {\n editor.renderer.setMouseCursor(\"\");\n altCursor = false;\n }\n }\n}\n\nexports.MultiSelect = MultiSelect;\n\n\nacequire(\"./config\").defineOptions(Editor.prototype, \"editor\", {\n enableMultiselect: {\n set: function(val) {\n MultiSelect(this);\n if (val) {\n this.on(\"changeSession\", this.$multiselectOnSessionChange);\n this.on(\"mousedown\", onMouseDown);\n } else {\n this.off(\"changeSession\", this.$multiselectOnSessionChange);\n this.off(\"mousedown\", onMouseDown);\n }\n },\n value: true\n },\n enableBlockSelect: {\n set: function(val) {\n this.$blockSelectEnabled = val;\n },\n value: true\n }\n});\n\n\n\n});\n\nace.define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../../range\").Range;\n\nvar FoldMode = exports.FoldMode = function() {};\n\n(function() {\n\n this.foldingStartMarker = null;\n this.foldingStopMarker = null;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.foldingStartMarker.test(line))\n return \"start\";\n if (foldStyle == \"markbeginend\"\n && this.foldingStopMarker\n && this.foldingStopMarker.test(line))\n return \"end\";\n return \"\";\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row) {\n return null;\n };\n\n this.indentationBlock = function(session, row, column) {\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1)\n return;\n\n var startColumn = column || line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n\n while (++row < maxRow) {\n var level = session.getLine(row).search(re);\n\n if (level == -1)\n continue;\n\n if (level <= startLevel)\n break;\n\n endRow = row;\n }\n\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n\n this.openingBracketBlock = function(session, bracket, row, column, typeRe) {\n var start = {row: row, column: column + 1};\n var end = session.$findClosingBracket(bracket, start, typeRe);\n if (!end)\n return;\n\n var fw = session.foldWidgets[end.row];\n if (fw == null)\n fw = session.getFoldWidget(end.row);\n\n if (fw == \"start\" && end.row > start.row) {\n end.row --;\n end.column = session.getLine(end.row).length;\n }\n return Range.fromPoints(start, end);\n };\n\n this.closingBracketBlock = function(session, bracket, row, column, typeRe) {\n var end = {row: row, column: column};\n var start = session.$findOpeningBracket(bracket, end);\n\n if (!start)\n return;\n\n start.column++;\n end.column--;\n\n return Range.fromPoints(start, end);\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.isDark = false;\nexports.cssClass = \"ace-tm\";\nexports.cssText = \".ace-tm .ace_gutter {\\\nbackground: #f0f0f0;\\\ncolor: #333;\\\n}\\\n.ace-tm .ace_print-margin {\\\nwidth: 1px;\\\nbackground: #e8e8e8;\\\n}\\\n.ace-tm .ace_fold {\\\nbackground-color: #6B72E6;\\\n}\\\n.ace-tm {\\\nbackground-color: #FFFFFF;\\\ncolor: black;\\\n}\\\n.ace-tm .ace_cursor {\\\ncolor: black;\\\n}\\\n.ace-tm .ace_invisible {\\\ncolor: rgb(191, 191, 191);\\\n}\\\n.ace-tm .ace_storage,\\\n.ace-tm .ace_keyword {\\\ncolor: blue;\\\n}\\\n.ace-tm .ace_constant {\\\ncolor: rgb(197, 6, 11);\\\n}\\\n.ace-tm .ace_constant.ace_buildin {\\\ncolor: rgb(88, 72, 246);\\\n}\\\n.ace-tm .ace_constant.ace_language {\\\ncolor: rgb(88, 92, 246);\\\n}\\\n.ace-tm .ace_constant.ace_library {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_invalid {\\\nbackground-color: rgba(255, 0, 0, 0.1);\\\ncolor: red;\\\n}\\\n.ace-tm .ace_support.ace_function {\\\ncolor: rgb(60, 76, 114);\\\n}\\\n.ace-tm .ace_support.ace_constant {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_support.ace_type,\\\n.ace-tm .ace_support.ace_class {\\\ncolor: rgb(109, 121, 222);\\\n}\\\n.ace-tm .ace_keyword.ace_operator {\\\ncolor: rgb(104, 118, 135);\\\n}\\\n.ace-tm .ace_string {\\\ncolor: rgb(3, 106, 7);\\\n}\\\n.ace-tm .ace_comment {\\\ncolor: rgb(76, 136, 107);\\\n}\\\n.ace-tm .ace_comment.ace_doc {\\\ncolor: rgb(0, 102, 255);\\\n}\\\n.ace-tm .ace_comment.ace_doc.ace_tag {\\\ncolor: rgb(128, 159, 191);\\\n}\\\n.ace-tm .ace_constant.ace_numeric {\\\ncolor: rgb(0, 0, 205);\\\n}\\\n.ace-tm .ace_variable {\\\ncolor: rgb(49, 132, 149);\\\n}\\\n.ace-tm .ace_xml-pe {\\\ncolor: rgb(104, 104, 91);\\\n}\\\n.ace-tm .ace_entity.ace_name.ace_function {\\\ncolor: #0000A2;\\\n}\\\n.ace-tm .ace_heading {\\\ncolor: rgb(12, 7, 255);\\\n}\\\n.ace-tm .ace_list {\\\ncolor:rgb(185, 6, 144);\\\n}\\\n.ace-tm .ace_meta.ace_tag {\\\ncolor:rgb(0, 22, 142);\\\n}\\\n.ace-tm .ace_string.ace_regex {\\\ncolor: rgb(255, 0, 0)\\\n}\\\n.ace-tm .ace_marker-layer .ace_selection {\\\nbackground: rgb(181, 213, 255);\\\n}\\\n.ace-tm.ace_multiselect .ace_selection.ace_start {\\\nbox-shadow: 0 0 3px 0px white;\\\n}\\\n.ace-tm .ace_marker-layer .ace_step {\\\nbackground: rgb(252, 255, 0);\\\n}\\\n.ace-tm .ace_marker-layer .ace_stack {\\\nbackground: rgb(164, 229, 101);\\\n}\\\n.ace-tm .ace_marker-layer .ace_bracket {\\\nmargin: -1px 0 0 -1px;\\\nborder: 1px solid rgb(192, 192, 192);\\\n}\\\n.ace-tm .ace_marker-layer .ace_active-line {\\\nbackground: rgba(0, 0, 0, 0.07);\\\n}\\\n.ace-tm .ace_gutter-active-line {\\\nbackground-color : #dcdcdc;\\\n}\\\n.ace-tm .ace_marker-layer .ace_selected-word {\\\nbackground: rgb(250, 250, 255);\\\nborder: 1px solid rgb(200, 200, 250);\\\n}\\\n.ace-tm .ace_indent-guide {\\\nbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\\\") right repeat-y;\\\n}\\\n\";\n\nvar dom = acequire(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass);\n});\n\nace.define(\"ace/line_widgets\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar Range = acequire(\"./range\").Range;\n\n\nfunction LineWidgets(session) {\n this.session = session;\n this.session.widgetManager = this;\n this.session.getRowLength = this.getRowLength;\n this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;\n this.updateOnChange = this.updateOnChange.bind(this);\n this.renderWidgets = this.renderWidgets.bind(this);\n this.measureWidgets = this.measureWidgets.bind(this);\n this.session._changedWidgets = [];\n this.$onChangeEditor = this.$onChangeEditor.bind(this);\n \n this.session.on(\"change\", this.updateOnChange);\n this.session.on(\"changeFold\", this.updateOnFold);\n this.session.on(\"changeEditor\", this.$onChangeEditor);\n}\n\n(function() {\n this.getRowLength = function(row) {\n var h;\n if (this.lineWidgets)\n h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0;\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n\n this.$getWidgetScreenLength = function() {\n var screenRows = 0;\n this.lineWidgets.forEach(function(w){\n if (w && w.rowCount && !w.hidden)\n screenRows += w.rowCount;\n });\n return screenRows;\n }; \n \n this.$onChangeEditor = function(e) {\n this.attach(e.editor);\n };\n \n this.attach = function(editor) {\n if (editor && editor.widgetManager && editor.widgetManager != this)\n editor.widgetManager.detach();\n\n if (this.editor == editor)\n return;\n\n this.detach();\n this.editor = editor;\n \n if (editor) {\n editor.widgetManager = this;\n editor.renderer.on(\"beforeRender\", this.measureWidgets);\n editor.renderer.on(\"afterRender\", this.renderWidgets);\n }\n };\n this.detach = function(e) {\n var editor = this.editor;\n if (!editor)\n return;\n \n this.editor = null;\n editor.widgetManager = null;\n \n editor.renderer.off(\"beforeRender\", this.measureWidgets);\n editor.renderer.off(\"afterRender\", this.renderWidgets);\n var lineWidgets = this.session.lineWidgets;\n lineWidgets && lineWidgets.forEach(function(w) {\n if (w && w.el && w.el.parentNode) {\n w._inDocument = false;\n w.el.parentNode.removeChild(w.el);\n }\n });\n };\n\n this.updateOnFold = function(e, session) {\n var lineWidgets = session.lineWidgets;\n if (!lineWidgets || !e.action)\n return;\n var fold = e.data;\n var start = fold.start.row;\n var end = fold.end.row;\n var hide = e.action == \"add\";\n for (var i = start + 1; i < end; i++) {\n if (lineWidgets[i])\n lineWidgets[i].hidden = hide;\n }\n if (lineWidgets[end]) {\n if (hide) {\n if (!lineWidgets[start])\n lineWidgets[start] = lineWidgets[end];\n else\n lineWidgets[end].hidden = hide;\n } else {\n if (lineWidgets[start] == lineWidgets[end])\n lineWidgets[start] = undefined;\n lineWidgets[end].hidden = hide;\n }\n }\n };\n \n this.updateOnChange = function(delta) {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n \n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n } else if (delta.action == 'remove') {\n var removed = lineWidgets.splice(startRow + 1, len);\n removed.forEach(function(w) {\n w && this.removeLineWidget(w);\n }, this);\n this.$updateRows();\n } else {\n var args = new Array(len);\n args.unshift(startRow, 0);\n lineWidgets.splice.apply(lineWidgets, args);\n this.$updateRows();\n }\n };\n \n this.$updateRows = function() {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n var noWidgets = true;\n lineWidgets.forEach(function(w, i) {\n if (w) {\n noWidgets = false;\n w.row = i;\n while (w.$oldWidget) {\n w.$oldWidget.row = i;\n w = w.$oldWidget;\n }\n }\n });\n if (noWidgets)\n this.session.lineWidgets = null;\n };\n\n this.addLineWidget = function(w) {\n if (!this.session.lineWidgets)\n this.session.lineWidgets = new Array(this.session.getLength());\n \n var old = this.session.lineWidgets[w.row];\n if (old) {\n w.$oldWidget = old;\n if (old.el && old.el.parentNode) {\n old.el.parentNode.removeChild(old.el);\n old._inDocument = false;\n }\n }\n \n this.session.lineWidgets[w.row] = w;\n \n w.session = this.session;\n \n var renderer = this.editor.renderer;\n if (w.html && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.innerHTML = w.html;\n }\n if (w.el) {\n dom.addCssClass(w.el, \"ace_lineWidgetContainer\");\n w.el.style.position = \"absolute\";\n w.el.style.zIndex = 5;\n renderer.container.appendChild(w.el);\n w._inDocument = true;\n }\n \n if (!w.coverGutter) {\n w.el.style.zIndex = 3;\n }\n if (w.pixelHeight == null) {\n w.pixelHeight = w.el.offsetHeight;\n }\n if (w.rowCount == null) {\n w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;\n }\n \n var fold = this.session.getFoldAt(w.row, 0);\n w.$fold = fold;\n if (fold) {\n var lineWidgets = this.session.lineWidgets;\n if (w.row == fold.end.row && !lineWidgets[fold.start.row])\n lineWidgets[fold.start.row] = w;\n else\n w.hidden = true;\n }\n \n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n \n this.$updateRows();\n this.renderWidgets(null, renderer);\n this.onWidgetChanged(w);\n return w;\n };\n \n this.removeLineWidget = function(w) {\n w._inDocument = false;\n w.session = null;\n if (w.el && w.el.parentNode)\n w.el.parentNode.removeChild(w.el);\n if (w.editor && w.editor.destroy) try {\n w.editor.destroy();\n } catch(e){}\n if (this.session.lineWidgets) {\n var w1 = this.session.lineWidgets[w.row]\n if (w1 == w) {\n this.session.lineWidgets[w.row] = w.$oldWidget;\n if (w.$oldWidget)\n this.onWidgetChanged(w.$oldWidget);\n } else {\n while (w1) {\n if (w1.$oldWidget == w) {\n w1.$oldWidget = w.$oldWidget;\n break;\n }\n w1 = w1.$oldWidget;\n }\n }\n }\n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n this.$updateRows();\n };\n \n this.getWidgetsAtRow = function(row) {\n var lineWidgets = this.session.lineWidgets;\n var w = lineWidgets && lineWidgets[row];\n var list = [];\n while (w) {\n list.push(w);\n w = w.$oldWidget;\n }\n return list;\n };\n \n this.onWidgetChanged = function(w) {\n this.session._changedWidgets.push(w);\n this.editor && this.editor.renderer.updateFull();\n };\n \n this.measureWidgets = function(e, renderer) {\n var changedWidgets = this.session._changedWidgets;\n var config = renderer.layerConfig;\n \n if (!changedWidgets || !changedWidgets.length) return;\n var min = Infinity;\n for (var i = 0; i < changedWidgets.length; i++) {\n var w = changedWidgets[i];\n if (!w || !w.el) continue;\n if (w.session != this.session) continue;\n if (!w._inDocument) {\n if (this.session.lineWidgets[w.row] != w)\n continue;\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n \n w.h = w.el.offsetHeight;\n \n if (!w.fixedWidth) {\n w.w = w.el.offsetWidth;\n w.screenWidth = Math.ceil(w.w / config.characterWidth);\n }\n \n var rowCount = w.h / config.lineHeight;\n if (w.coverLine) {\n rowCount -= this.session.getRowLineCount(w.row);\n if (rowCount < 0)\n rowCount = 0;\n }\n if (w.rowCount != rowCount) {\n w.rowCount = rowCount;\n if (w.row < min)\n min = w.row;\n }\n }\n if (min != Infinity) {\n this.session._emit(\"changeFold\", {data:{start:{row: min}}});\n this.session.lineWidgetWidth = null;\n }\n this.session._changedWidgets = [];\n };\n \n this.renderWidgets = function(e, renderer) {\n var config = renderer.layerConfig;\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var first = Math.min(this.firstRow, config.firstRow);\n var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);\n \n while (first > 0 && !lineWidgets[first])\n first--;\n \n this.firstRow = config.firstRow;\n this.lastRow = config.lastRow;\n\n renderer.$cursorLayer.config = config;\n for (var i = first; i <= last; i++) {\n var w = lineWidgets[i];\n if (!w || !w.el) continue;\n if (w.hidden) {\n w.el.style.top = -100 - (w.pixelHeight || 0) + \"px\";\n continue;\n }\n if (!w._inDocument) {\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top;\n if (!w.coverLine)\n top += config.lineHeight * this.session.getRowLineCount(w.row);\n w.el.style.top = top - config.offset + \"px\";\n \n var left = w.coverGutter ? 0 : renderer.gutterWidth;\n if (!w.fixedWidth)\n left -= renderer.scrollLeft;\n w.el.style.left = left + \"px\";\n \n if (w.fullWidth && w.screenWidth) {\n w.el.style.minWidth = config.width + 2 * config.padding + \"px\";\n }\n \n if (w.fixedWidth) {\n w.el.style.right = renderer.scrollBar.getWidth() + \"px\";\n } else {\n w.el.style.right = \"\";\n }\n }\n };\n \n}).call(LineWidgets.prototype);\n\n\nexports.LineWidgets = LineWidgets;\n\n});\n\nace.define(\"ace/ext/error_marker\",[\"require\",\"exports\",\"module\",\"ace/line_widgets\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar LineWidgets = acequire(\"../line_widgets\").LineWidgets;\nvar dom = acequire(\"../lib/dom\");\nvar Range = acequire(\"../range\").Range;\n\nfunction binarySearch(array, needle, comparator) {\n var first = 0;\n var last = array.length - 1;\n\n while (first <= last) {\n var mid = (first + last) >> 1;\n var c = comparator(needle, array[mid]);\n if (c > 0)\n first = mid + 1;\n else if (c < 0)\n last = mid - 1;\n else\n return mid;\n }\n return -(first + 1);\n}\n\nfunction findAnnotations(session, row, dir) {\n var annotations = session.getAnnotations().sort(Range.comparePoints);\n if (!annotations.length)\n return;\n \n var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints);\n if (i < 0)\n i = -i - 1;\n \n if (i >= annotations.length)\n i = dir > 0 ? 0 : annotations.length - 1;\n else if (i === 0 && dir < 0)\n i = annotations.length - 1;\n \n var annotation = annotations[i];\n if (!annotation || !dir)\n return;\n\n if (annotation.row === row) {\n do {\n annotation = annotations[i += dir];\n } while (annotation && annotation.row === row);\n if (!annotation)\n return annotations.slice();\n }\n \n \n var matched = [];\n row = annotation.row;\n do {\n matched[dir < 0 ? \"unshift\" : \"push\"](annotation);\n annotation = annotations[i += dir];\n } while (annotation && annotation.row == row);\n return matched.length && matched;\n}\n\nexports.showErrorMarker = function(editor, dir) {\n var session = editor.session;\n if (!session.widgetManager) {\n session.widgetManager = new LineWidgets(session);\n session.widgetManager.attach(editor);\n }\n \n var pos = editor.getCursorPosition();\n var row = pos.row;\n var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) {\n return w.type == \"errorMarker\";\n })[0];\n if (oldWidget) {\n oldWidget.destroy();\n } else {\n row -= dir;\n }\n var annotations = findAnnotations(session, row, dir);\n var gutterAnno;\n if (annotations) {\n var annotation = annotations[0];\n pos.column = (annotation.pos && typeof annotation.column != \"number\"\n ? annotation.pos.sc\n : annotation.column) || 0;\n pos.row = annotation.row;\n gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];\n } else if (oldWidget) {\n return;\n } else {\n gutterAnno = {\n text: [\"Looks good!\"],\n className: \"ace_ok\"\n };\n }\n editor.session.unfold(pos.row);\n editor.selection.moveToPosition(pos);\n \n var w = {\n row: pos.row, \n fixedWidth: true,\n coverGutter: true,\n el: dom.createElement(\"div\"),\n type: \"errorMarker\"\n };\n var el = w.el.appendChild(dom.createElement(\"div\"));\n var arrow = w.el.appendChild(dom.createElement(\"div\"));\n arrow.className = \"error_widget_arrow \" + gutterAnno.className;\n \n var left = editor.renderer.$cursorLayer\n .getPixelPosition(pos).left;\n arrow.style.left = left + editor.renderer.gutterWidth - 5 + \"px\";\n \n w.el.className = \"error_widget_wrapper\";\n el.className = \"error_widget \" + gutterAnno.className;\n el.innerHTML = gutterAnno.text.join(\"<br>\");\n \n el.appendChild(dom.createElement(\"div\"));\n \n var kb = function(_, hashId, keyString) {\n if (hashId === 0 && (keyString === \"esc\" || keyString === \"return\")) {\n w.destroy();\n return {command: \"null\"};\n }\n };\n \n w.destroy = function() {\n if (editor.$mouseHandler.isMousePressed)\n return;\n editor.keyBinding.removeKeyboardHandler(kb);\n session.widgetManager.removeLineWidget(w);\n editor.off(\"changeSelection\", w.destroy);\n editor.off(\"changeSession\", w.destroy);\n editor.off(\"mouseup\", w.destroy);\n editor.off(\"change\", w.destroy);\n };\n \n editor.keyBinding.addKeyboardHandler(kb);\n editor.on(\"changeSelection\", w.destroy);\n editor.on(\"changeSession\", w.destroy);\n editor.on(\"mouseup\", w.destroy);\n editor.on(\"change\", w.destroy);\n \n editor.session.widgetManager.addLineWidget(w);\n \n w.el.onmousedown = editor.focus.bind(editor);\n \n editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight});\n};\n\n\ndom.importCssString(\"\\\n .error_widget_wrapper {\\\n background: inherit;\\\n color: inherit;\\\n border:none\\\n }\\\n .error_widget {\\\n border-top: solid 2px;\\\n border-bottom: solid 2px;\\\n margin: 5px 0;\\\n padding: 10px 40px;\\\n white-space: pre-wrap;\\\n }\\\n .error_widget.ace_error, .error_widget_arrow.ace_error{\\\n border-color: #ff5a5a\\\n }\\\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\\\n border-color: #F1D817\\\n }\\\n .error_widget.ace_info, .error_widget_arrow.ace_info{\\\n border-color: #5a5a5a\\\n }\\\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\\\n border-color: #5aaa5a\\\n }\\\n .error_widget_arrow {\\\n position: absolute;\\\n border: solid 5px;\\\n border-top-color: transparent!important;\\\n border-right-color: transparent!important;\\\n border-left-color: transparent!important;\\\n top: -5px;\\\n }\\\n\", \"\");\n\n});\n\nace.define(\"ace/ace\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/editor\",\"ace/edit_session\",\"ace/undomanager\",\"ace/virtual_renderer\",\"ace/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/multi_select\",\"ace/mode/folding/fold_mode\",\"ace/theme/textmate\",\"ace/ext/error_marker\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\n\nvar Editor = acequire(\"./editor\").Editor;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar UndoManager = acequire(\"./undomanager\").UndoManager;\nvar Renderer = acequire(\"./virtual_renderer\").VirtualRenderer;\nacequire(\"./worker/worker_client\");\nacequire(\"./keyboard/hash_handler\");\nacequire(\"./placeholder\");\nacequire(\"./multi_select\");\nacequire(\"./mode/folding/fold_mode\");\nacequire(\"./theme/textmate\");\nacequire(\"./ext/error_marker\");\n\nexports.config = acequire(\"./config\");\nexports.acequire = acequire;\n\nif (typeof define === \"function\")\n exports.define = define;\nexports.edit = function(el) {\n if (typeof el == \"string\") {\n var _id = el;\n el = document.getElementById(_id);\n if (!el)\n throw new Error(\"ace.edit can't find div #\" + _id);\n }\n\n if (el && el.env && el.env.editor instanceof Editor)\n return el.env.editor;\n\n var value = \"\";\n if (el && /input|textarea/i.test(el.tagName)) {\n var oldNode = el;\n value = oldNode.value;\n el = dom.createElement(\"pre\");\n oldNode.parentNode.replaceChild(el, oldNode);\n } else if (el) {\n value = dom.getInnerText(el);\n el.innerHTML = \"\";\n }\n\n var doc = exports.createEditSession(value);\n\n var editor = new Editor(new Renderer(el));\n editor.setSession(doc);\n\n var env = {\n document: doc,\n editor: editor,\n onResize: editor.resize.bind(editor, null)\n };\n if (oldNode) env.textarea = oldNode;\n event.addListener(window, \"resize\", env.onResize);\n editor.on(\"destroy\", function() {\n event.removeListener(window, \"resize\", env.onResize);\n env.editor.container.env = null; // prevent memory leak on old ie\n });\n editor.container.env = editor.env = env;\n return editor;\n};\nexports.createEditSession = function(text, mode) {\n var doc = new EditSession(text, mode);\n doc.setUndoManager(new UndoManager());\n return doc;\n}\nexports.EditSession = EditSession;\nexports.UndoManager = UndoManager;\nexports.version = \"1.2.6\";\n});\n (function() {\n ace.acequire([\"ace/ace\"], function(a) {\n if (a) {\n a.config.init(true);\n a.define = ace.define;\n }\n if (!window.ace)\n window.ace = a;\n for (var key in a) if (a.hasOwnProperty(key))\n window.ace[key] = a[key];\n });\n })();\n \nmodule.exports = window.ace.acequire(\"ace/ace\");","module.exports = get_blob()\n\nfunction get_blob() {\n if(global.Blob) {\n try {\n new Blob(['asdf'], {type: 'text/plain'})\n return Blob\n } catch(err) {}\n }\n\n var Builder = global.WebKitBlobBuilder ||\n global.MozBlobBuilder ||\n global.MSBlobBuilder\n\n return function(parts, bag) {\n var builder = new Builder\n , endings = bag.endings\n , type = bag.type\n\n if(endings) for(var i = 0, len = parts.length; i < len; ++i) {\n builder.append(parts[i], endings)\n } else for(var i = 0, len = parts.length; i < len; ++i) {\n builder.append(parts[i])\n }\n\n return type ? builder.getBlob(type) : builder.getBlob()\n }\n}\n","/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","ace.define(\"ace/mode/json_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar JsonHighlightRules = function() {\n this.$rules = {\n \"start\" : [\n {\n token : \"variable\", // single line\n regex : '[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]\\\\s*(?=:)'\n }, {\n token : \"string\", // single line\n regex : '\"',\n next : \"string\"\n }, {\n token : \"constant.numeric\", // hex\n regex : \"0[xX][0-9a-fA-F]+\\\\b\"\n }, {\n token : \"constant.numeric\", // float\n regex : \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"\n }, {\n token : \"constant.language.boolean\",\n regex : \"(?:true|false)\\\\b\"\n }, {\n token : \"invalid.illegal\", // single quoted strings are not allowed\n regex : \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"\n }, {\n token : \"invalid.illegal\", // comments are not allowed\n regex : \"\\\\/\\\\/.*$\"\n }, {\n token : \"paren.lparen\",\n regex : \"[[({]\"\n }, {\n token : \"paren.rparen\",\n regex : \"[\\\\])}]\"\n }, {\n token : \"text\",\n regex : \"\\\\s+\"\n }\n ],\n \"string\" : [\n {\n token : \"constant.language.escape\",\n regex : /\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[\"\\\\\\/bfnrt])/\n }, {\n token : \"string\",\n regex : '[^\"\\\\\\\\]+'\n }, {\n token : \"string\",\n regex : '\"',\n next : \"start\"\n }, {\n token : \"string\",\n regex : \"\",\n next : \"start\"\n }\n ]\n };\n \n};\n\noop.inherits(JsonHighlightRules, TextHighlightRules);\n\nexports.JsonHighlightRules = JsonHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /(\\{|\\[)[^\\}\\]]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{]*(\\}|\\])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/json\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/json_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\",\"ace/worker/worker_client\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar HighlightRules = acequire(\"./json_highlight_rules\").JsonHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\n\nvar Mode = function() {\n this.HighlightRules = HighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n if (state == \"start\") {\n var match = line.match(/^.*[\\{\\(\\[]\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], require(\"../worker/json\"), \"JsonWorker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n\n this.$id = \"ace/mode/json\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n","module.exports.id = 'ace/mode/json_worker';\nmodule.exports.src = \"\\\"no use strict\\\";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\\\"\\\";testPath;){var alias=paths[testPath];if(\\\"string\\\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\\\/*$/,\\\"/\\\")+(tail||alias.main||alias.name);if(alias===!1)return\\\"\\\";var i=testPath.lastIndexOf(\\\"/\\\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\\\"log\\\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\\\"error\\\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\\\"!\\\")){var chunks=moduleName.split(\\\"!\\\");return window.normalizeModule(parentId,chunks[0])+\\\"!\\\"+window.normalizeModule(parentId,chunks[1])}if(\\\".\\\"==moduleName.charAt(0)){var base=parentId.split(\\\"/\\\").slice(0,-1).join(\\\"/\\\");for(moduleName=(base?base+\\\"/\\\":\\\"\\\")+moduleName;-1!==moduleName.indexOf(\\\".\\\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\\\.\\\\//,\\\"\\\").replace(/\\\\/\\\\.\\\\//,\\\"/\\\").replace(/[^\\\\/]+\\\\/\\\\.\\\\.\\\\//,\\\"\\\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\\\"worker.js acequire() accepts only (parentId, id) as arguments\\\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\\\"unable to load \\\"+id);var path=resolveModuleId(id,window.acequire.tlns);return\\\".js\\\"!=path.slice(-3)&&(path+=\\\".js\\\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\\\"string\\\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\\\"function\\\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\\\"require\\\",\\\"exports\\\",\\\"module\\\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\\\"require\\\":return req;case\\\"exports\\\":return module.exports;case\\\"module\\\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\\\"ace/lib/event_emitter\\\").EventEmitter,oop=window.acequire(\\\"ace/lib/oop\\\"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:\\\"call\\\",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:\\\"event\\\",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\\\"Unknown command:\\\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\\\"ace/lib/es5-shim\\\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define(\\\"ace/lib/oop\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\\\"ace/range\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\\\"Range: [\\\"+this.start.row+\\\"/\\\"+this.start.column+\\\"] -> [\\\"+this.end.row+\\\"/\\\"+this.end.column+\\\"]\\\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\\\"object\\\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){\\\"object\\\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\\\"ace/apply_delta\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\\\"\\\";switch(delta.action){case\\\"insert\\\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\\\"remove\\\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\\\"ace/lib/event_emitter\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\\\"object\\\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\\\"unshift\\\":\\\"push\\\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\\\"ace/anchor\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/lib/event_emitter\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert=\\\"insert\\\"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal(\\\"change\\\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\\\"change\\\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\\\"change\\\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\\\"ace/document\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/apply_delta\\\",\\\"ace/lib/event_emitter\\\",\\\"ace/range\\\",\\\"ace/anchor\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),applyDelta=acequire(\\\"./apply_delta\\\").applyDelta,EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Range=acequire(\\\"./range\\\").Range,Anchor=acequire(\\\"./anchor\\\").Anchor,Document=function(textOrLines){this.$lines=[\\\"\\\"],0===textOrLines.length?this.$lines=[\\\"\\\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0===\\\"aaa\\\".split(/a/).length?function(text){return text.replace(/\\\\r\\\\n|\\\\r/g,\\\"\\\\n\\\").split(\\\"\\\\n\\\")}:function(text){return text.split(/\\\\r\\\\n|\\\\r|\\\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\\\r\\\\n|\\\\r|\\\\n)/m);this.$autoNewLine=match?match[1]:\\\"\\\\n\\\",this._signal(\\\"changeNewLineMode\\\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\\\"windows\\\":return\\\"\\\\r\\\\n\\\";case\\\"unix\\\":return\\\"\\\\n\\\";default:return this.$autoNewLine||\\\"\\\\n\\\"}},this.$autoNewLine=\\\"\\\",this.$newLineMode=\\\"auto\\\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\\\"changeNewLineMode\\\"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\\\"\\\\r\\\\n\\\"==text||\\\"\\\\r\\\"==text||\\\"\\\\n\\\"==text},this.getLine=function(row){return this.$lines[row]||\\\"\\\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\\\"\\\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\\\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\\\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\\\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\\\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\\\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\\\"),this.insertMergedLines(position,[\\\"\\\",\\\"\\\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\\\"\\\"]),column=0):(lines=[\\\"\\\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\\\"remove\\\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\\\"remove\\\",lines:[\\\"\\\",\\\"\\\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\\\"insert\\\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\\\"change\\\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\\\"\\\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\\\"insert\\\"==delta.action?\\\"remove\\\":\\\"insert\\\",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\\\"ace/lib/lang\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split(\\\"\\\").reverse().join(\\\"\\\")},exports.stringRepeat=function(string,count){for(var result=\\\"\\\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\\\s\\\\s*/,trimEndRegexp=/\\\\s\\\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\\\"\\\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\\\"\\\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\\\"object\\\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if(\\\"object\\\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if(\\\"[object Object]\\\"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\\\]\\\\/\\\\\\\\])/g,\\\"\\\\\\\\$1\\\")},exports.escapeHTML=function(str){return str.replace(/&/g,\\\"&\\\").replace(/\\\"/g,\\\""\\\").replace(/'/g,\\\"'\\\").replace(/</g,\\\"<\\\")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define(\\\"ace/worker/mirror\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/range\\\",\\\"ace/document\\\",\\\"ace/lib/lang\\\"],function(acequire,exports){\\\"use strict\\\";acequire(\\\"../range\\\").Range;var Document=acequire(\\\"../document\\\").Document,lang=acequire(\\\"../lib/lang\\\"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(\\\"\\\"),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on(\\\"change\\\",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:\\\"insert\\\",start:data[i],lines:data[i+1]};else var d={action:\\\"remove\\\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\\\"ace/mode/json/json_parse\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(){\\\"use strict\\\";var at,ch,text,value,escapee={'\\\"':'\\\"',\\\"\\\\\\\\\\\":\\\"\\\\\\\\\\\",\\\"/\\\":\\\"/\\\",b:\\\"\\\\b\\\",f:\\\"\\\\f\\\",n:\\\"\\\\n\\\",r:\\\"\\\\r\\\",t:\\\"\\t\\\"},error=function(m){throw{name:\\\"SyntaxError\\\",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error(\\\"Expected '\\\"+c+\\\"' instead of '\\\"+ch+\\\"'\\\"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string=\\\"\\\";for(\\\"-\\\"===ch&&(string=\\\"-\\\",next(\\\"-\\\"));ch>=\\\"0\\\"&&\\\"9\\\">=ch;)string+=ch,next();if(\\\".\\\"===ch)for(string+=\\\".\\\";next()&&ch>=\\\"0\\\"&&\\\"9\\\">=ch;)string+=ch;if(\\\"e\\\"===ch||\\\"E\\\"===ch)for(string+=ch,next(),(\\\"-\\\"===ch||\\\"+\\\"===ch)&&(string+=ch,next());ch>=\\\"0\\\"&&\\\"9\\\">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error(\\\"Bad number\\\"),void 0):number},string=function(){var hex,i,uffff,string=\\\"\\\";if('\\\"'===ch)for(;next();){if('\\\"'===ch)return next(),string;if(\\\"\\\\\\\\\\\"===ch)if(next(),\\\"u\\\"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if(\\\"string\\\"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error(\\\"Bad string\\\")},white=function(){for(;ch&&\\\" \\\">=ch;)next()},word=function(){switch(ch){case\\\"t\\\":return next(\\\"t\\\"),next(\\\"r\\\"),next(\\\"u\\\"),next(\\\"e\\\"),!0;case\\\"f\\\":return next(\\\"f\\\"),next(\\\"a\\\"),next(\\\"l\\\"),next(\\\"s\\\"),next(\\\"e\\\"),!1;case\\\"n\\\":return next(\\\"n\\\"),next(\\\"u\\\"),next(\\\"l\\\"),next(\\\"l\\\"),null}error(\\\"Unexpected '\\\"+ch+\\\"'\\\")},array=function(){var array=[];if(\\\"[\\\"===ch){if(next(\\\"[\\\"),white(),\\\"]\\\"===ch)return next(\\\"]\\\"),array;for(;ch;){if(array.push(value()),white(),\\\"]\\\"===ch)return next(\\\"]\\\"),array;next(\\\",\\\"),white()}}error(\\\"Bad array\\\")},object=function(){var key,object={};if(\\\"{\\\"===ch){if(next(\\\"{\\\"),white(),\\\"}\\\"===ch)return next(\\\"}\\\"),object;for(;ch;){if(key=string(),white(),next(\\\":\\\"),Object.hasOwnProperty.call(object,key)&&error('Duplicate key \\\"'+key+'\\\"'),object[key]=value(),white(),\\\"}\\\"===ch)return next(\\\"}\\\"),object;next(\\\",\\\"),white()}}error(\\\"Bad object\\\")};return value=function(){switch(white(),ch){case\\\"{\\\":return object();case\\\"[\\\":return array();case'\\\"':return string();case\\\"-\\\":return number();default:return ch>=\\\"0\\\"&&\\\"9\\\">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=\\\" \\\",result=value(),white(),ch&&error(\\\"Syntax error\\\"),\\\"function\\\"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&\\\"object\\\"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({\\\"\\\":result},\\\"\\\"):result}}),ace.define(\\\"ace/mode/json_worker\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/worker/mirror\\\",\\\"ace/mode/json/json_parse\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"../lib/oop\\\"),Mirror=acequire(\\\"../worker/mirror\\\").Mirror,parse=acequire(\\\"./json/json_parse\\\"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:\\\"error\\\"})}this.sender.emit(\\\"annotate\\\",errors)}}.call(JsonWorker.prototype)}),ace.define(\\\"ace/lib/es5-shim\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\\\"sentinel\\\",{}),\\\"sentinel\\\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\\\"function\\\"!=typeof target)throw new TypeError(\\\"Function.prototype.bind called on incompatible \\\"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\\\"__defineGetter__\\\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\\\"XXX\\\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\\\"[object Array]\\\"==_toString(obj)});var boxedString=Object(\\\"a\\\"),splitString=\\\"a\\\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\\\"[object Function]\\\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\\\"[object Function]\\\"!=_toString(fun))throw new TypeError(fun+\\\" is not a function\\\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\\\"[object Function]\\\"!=_toString(fun))throw new TypeError(fun+\\\" is not a function\\\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):object,length=self.length>>>0,thisp=arguments[1];if(\\\"[object Function]\\\"!=_toString(fun))throw new TypeError(fun+\\\" is not a function\\\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):object,length=self.length>>>0,thisp=arguments[1];if(\\\"[object Function]\\\"!=_toString(fun))throw new TypeError(fun+\\\" is not a function\\\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):object,length=self.length>>>0;if(\\\"[object Function]\\\"!=_toString(fun))throw new TypeError(fun+\\\" is not a function\\\");if(!length&&1==arguments.length)throw new TypeError(\\\"reduce of empty array with no initial value\\\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\\\"reduce of empty array with no initial value\\\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):object,length=self.length>>>0;if(\\\"[object Function]\\\"!=_toString(fun))throw new TypeError(fun+\\\" is not a function\\\");if(!length&&1==arguments.length)throw new TypeError(\\\"reduceRight of empty array with no initial value\\\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\\\"reduceRight of empty array with no initial value\\\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\\\"[object String]\\\"==_toString(this)?this.split(\\\"\\\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\\\"Object.getOwnPropertyDescriptor called on a non-object: \\\";Object.getOwnPropertyDescriptor=function(object,property){if(\\\"object\\\"!=typeof object&&\\\"function\\\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\\\"object\\\"!=typeof prototype)throw new TypeError(\\\"typeof prototype[\\\"+typeof prototype+\\\"] != 'object'\\\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\\\"undefined\\\"==typeof document||doesDefinePropertyWork(document.createElement(\\\"div\\\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\\\"Property description must be an object: \\\",ERR_NON_OBJECT_TARGET=\\\"Object.defineProperty called on non-object: \\\",ERR_ACCESSORS_NOT_SUPPORTED=\\\"getters & setters can not be defined on this javascript engine\\\";Object.defineProperty=function(object,property,descriptor){if(\\\"object\\\"!=typeof object&&\\\"function\\\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\\\"object\\\"!=typeof descriptor&&\\\"function\\\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\\\"value\\\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\\\"get\\\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\\\"set\\\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\\\"function\\\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\\\"\\\";owns(object,name);)name+=\\\"?\\\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\\\"toString\\\",\\\"toLocaleString\\\",\\\"valueOf\\\",\\\"hasOwnProperty\\\",\\\"isPrototypeOf\\\",\\\"propertyIsEnumerable\\\",\\\"constructor\\\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\\\"object\\\"!=typeof object&&\\\"function\\\"!=typeof object||null===object)throw new TypeError(\\\"Object.keys called on a non-object\\\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\\\"\\t\\\\n\\u000b\\\\f\\\\r   ᠎              \\\\u2028\\\\u2029\\\";if(!String.prototype.trim||ws.trim()){ws=\\\"[\\\"+ws+\\\"]\\\";var trimBeginRegexp=RegExp(\\\"^\\\"+ws+ws+\\\"*\\\"),trimEndRegexp=RegExp(ws+ws+\\\"*$\\\");String.prototype.trim=function(){return(this+\\\"\\\").replace(trimBeginRegexp,\\\"\\\").replace(trimEndRegexp,\\\"\\\")}}var toObject=function(o){if(null==o)throw new TypeError(\\\"can't convert \\\"+o+\\\" to object\\\");return Object(o)}});\";","ace.define(\"ace/mode/yaml_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar YamlHighlightRules = function() {\n this.$rules = {\n \"start\" : [\n {\n token : \"comment\",\n regex : \"#.*$\"\n }, {\n token : \"list.markup\",\n regex : /^(?:-{3}|\\.{3})\\s*(?=#|$)/ \n }, {\n token : \"list.markup\",\n regex : /^\\s*[\\-?](?:$|\\s)/ \n }, {\n token: \"constant\",\n regex: \"!![\\\\w//]+\"\n }, {\n token: \"constant.language\",\n regex: \"[&\\\\*][a-zA-Z0-9-_]+\"\n }, {\n token: [\"meta.tag\", \"keyword\"],\n regex: /^(\\s*\\w.*?)(:(?:\\s+|$))/\n },{\n token: [\"meta.tag\", \"keyword\"],\n regex: /(\\w+?)(\\s*:(?:\\s+|$))/\n }, {\n token : \"keyword.operator\",\n regex : \"<<\\\\w*:\\\\w*\"\n }, {\n token : \"keyword.operator\",\n regex : \"-\\\\s*(?=[{])\"\n }, {\n token : \"string\", // single line\n regex : '[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]'\n }, {\n token : \"string\", // multi line string start\n regex : '[|>][-+\\\\d\\\\s]*$',\n next : \"qqstring\"\n }, {\n token : \"string\", // single quoted string\n regex : \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"\n }, {\n token : \"constant.numeric\", // float\n regex : /(\\b|[+\\-\\.])[\\d_]+(?:(?:\\.[\\d_]*)?(?:[eE][+\\-]?[\\d_]+)?)/\n }, {\n token : \"constant.numeric\", // other number\n regex : /[+\\-]?\\.inf\\b|NaN\\b|0x[\\dA-Fa-f_]+|0b[10_]+/\n }, {\n token : \"constant.language.boolean\",\n regex : \"\\\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\\\b\"\n }, {\n token : \"paren.lparen\",\n regex : \"[[({]\"\n }, {\n token : \"paren.rparen\",\n regex : \"[\\\\])}]\"\n }\n ],\n \"qqstring\" : [\n {\n token : \"string\",\n regex : '(?=(?:(?:\\\\\\\\.)|(?:[^:]))*?:)',\n next : \"start\"\n }, {\n token : \"string\",\n regex : '.+'\n }\n ]};\n\n};\n\noop.inherits(YamlHighlightRules, TextHighlightRules);\n\nexports.YamlHighlightRules = YamlHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/coffee\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/fold_mode\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\nvar Range = acequire(\"../../range\").Range;\n\nvar FoldMode = exports.FoldMode = function() {};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n\n this.getFoldWidgetRange = function(session, foldStyle, row) {\n var range = this.indentationBlock(session, row);\n if (range)\n return range;\n\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1 || line[startLevel] != \"#\")\n return;\n\n var startColumn = line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n\n while (++row < maxRow) {\n line = session.getLine(row);\n var level = line.search(re);\n\n if (level == -1)\n continue;\n\n if (line[level] != \"#\")\n break;\n\n endRow = row;\n }\n\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n var indent = line.search(/\\S/);\n var next = session.getLine(row + 1);\n var prev = session.getLine(row - 1);\n var prevIndent = prev.search(/\\S/);\n var nextIndent = next.search(/\\S/);\n\n if (indent == -1) {\n session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? \"start\" : \"\";\n return \"\";\n }\n if (prevIndent == -1) {\n if (indent == nextIndent && line[indent] == \"#\" && next[indent] == \"#\") {\n session.foldWidgets[row - 1] = \"\";\n session.foldWidgets[row + 1] = \"\";\n return \"start\";\n }\n } else if (prevIndent == indent && line[indent] == \"#\" && prev[indent] == \"#\") {\n if (session.getLine(row - 2).search(/\\S/) == -1) {\n session.foldWidgets[row - 1] = \"start\";\n session.foldWidgets[row + 1] = \"\";\n return \"\";\n }\n }\n\n if (prevIndent!= -1 && prevIndent < indent)\n session.foldWidgets[row - 1] = \"start\";\n else\n session.foldWidgets[row - 1] = \"\";\n\n if (indent < nextIndent)\n return \"start\";\n else\n return \"\";\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/yaml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/yaml_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/folding/coffee\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar YamlHighlightRules = acequire(\"./yaml_highlight_rules\").YamlHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar FoldMode = acequire(\"./folding/coffee\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = YamlHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.foldingRules = new FoldMode();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"#\";\n \n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n if (state == \"start\") {\n var match = line.match(/^.*[\\{\\(\\[]\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n\n this.$id = \"ace/mode/yaml\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n\n});\n","ace.define(\"ace/theme/monokai\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\nexports.isDark = true;\nexports.cssClass = \"ace-monokai\";\nexports.cssText = \".ace-monokai .ace_gutter {\\\nbackground: #2F3129;\\\ncolor: #8F908A\\\n}\\\n.ace-monokai .ace_print-margin {\\\nwidth: 1px;\\\nbackground: #555651\\\n}\\\n.ace-monokai {\\\nbackground-color: #272822;\\\ncolor: #F8F8F2\\\n}\\\n.ace-monokai .ace_cursor {\\\ncolor: #F8F8F0\\\n}\\\n.ace-monokai .ace_marker-layer .ace_selection {\\\nbackground: #49483E\\\n}\\\n.ace-monokai.ace_multiselect .ace_selection.ace_start {\\\nbox-shadow: 0 0 3px 0px #272822;\\\n}\\\n.ace-monokai .ace_marker-layer .ace_step {\\\nbackground: rgb(102, 82, 0)\\\n}\\\n.ace-monokai .ace_marker-layer .ace_bracket {\\\nmargin: -1px 0 0 -1px;\\\nborder: 1px solid #49483E\\\n}\\\n.ace-monokai .ace_marker-layer .ace_active-line {\\\nbackground: #202020\\\n}\\\n.ace-monokai .ace_gutter-active-line {\\\nbackground-color: #272727\\\n}\\\n.ace-monokai .ace_marker-layer .ace_selected-word {\\\nborder: 1px solid #49483E\\\n}\\\n.ace-monokai .ace_invisible {\\\ncolor: #52524d\\\n}\\\n.ace-monokai .ace_entity.ace_name.ace_tag,\\\n.ace-monokai .ace_keyword,\\\n.ace-monokai .ace_meta.ace_tag,\\\n.ace-monokai .ace_storage {\\\ncolor: #F92672\\\n}\\\n.ace-monokai .ace_punctuation,\\\n.ace-monokai .ace_punctuation.ace_tag {\\\ncolor: #fff\\\n}\\\n.ace-monokai .ace_constant.ace_character,\\\n.ace-monokai .ace_constant.ace_language,\\\n.ace-monokai .ace_constant.ace_numeric,\\\n.ace-monokai .ace_constant.ace_other {\\\ncolor: #AE81FF\\\n}\\\n.ace-monokai .ace_invalid {\\\ncolor: #F8F8F0;\\\nbackground-color: #F92672\\\n}\\\n.ace-monokai .ace_invalid.ace_deprecated {\\\ncolor: #F8F8F0;\\\nbackground-color: #AE81FF\\\n}\\\n.ace-monokai .ace_support.ace_constant,\\\n.ace-monokai .ace_support.ace_function {\\\ncolor: #66D9EF\\\n}\\\n.ace-monokai .ace_fold {\\\nbackground-color: #A6E22E;\\\nborder-color: #F8F8F2\\\n}\\\n.ace-monokai .ace_storage.ace_type,\\\n.ace-monokai .ace_support.ace_class,\\\n.ace-monokai .ace_support.ace_type {\\\nfont-style: italic;\\\ncolor: #66D9EF\\\n}\\\n.ace-monokai .ace_entity.ace_name.ace_function,\\\n.ace-monokai .ace_entity.ace_other,\\\n.ace-monokai .ace_entity.ace_other.ace_attribute-name,\\\n.ace-monokai .ace_variable {\\\ncolor: #A6E22E\\\n}\\\n.ace-monokai .ace_variable.ace_parameter {\\\nfont-style: italic;\\\ncolor: #FD971F\\\n}\\\n.ace-monokai .ace_string {\\\ncolor: #E6DB74\\\n}\\\n.ace-monokai .ace_comment {\\\ncolor: #75715E\\\n}\\\n.ace-monokai .ace_indent-guide {\\\nbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\\\n}\";\n\nvar dom = acequire(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass);\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var listRE = /^(\\s*)(>[> ]*|[*+-] \\[[x ]\\]\\s|[*+-]\\s|(\\d+)([.)]))(\\s*)/,\n emptyListRE = /^(\\s*)(>[> ]*|[*+-] \\[[x ]\\]|[*+-]|(\\d+)[.)])(\\s*)$/,\n unorderedListRE = /[*+-]\\s/;\n\n CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n var ranges = cm.listSelections(), replacements = [];\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].head;\n\n // If we're not in Markdown mode, fall back to normal newlineAndIndent\n var eolState = cm.getStateAfter(pos.line);\n var inner = CodeMirror.innerMode(cm.getMode(), eolState);\n if (inner.mode.name !== \"markdown\") {\n cm.execCommand(\"newlineAndIndent\");\n return;\n } else {\n eolState = inner.state;\n }\n\n var inList = eolState.list !== false;\n var inQuote = eolState.quote !== 0;\n\n var line = cm.getLine(pos.line), match = listRE.exec(line);\n var cursorBeforeBullet = /^\\s*$/.test(line.slice(0, pos.ch));\n if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {\n cm.execCommand(\"newlineAndIndent\");\n return;\n }\n if (emptyListRE.test(line)) {\n if (!/>\\s*$/.test(line)) cm.replaceRange(\"\", {\n line: pos.line, ch: 0\n }, {\n line: pos.line, ch: pos.ch + 1\n });\n replacements[i] = \"\\n\";\n } else {\n var indent = match[1], after = match[5];\n var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(\">\") >= 0);\n var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace(\"x\", \" \");\n replacements[i] = \"\\n\" + indent + bullet + after;\n\n if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);\n }\n }\n\n cm.replaceSelections(replacements);\n };\n\n // Auto-updating Markdown list numbers when a new item is added to the\n // middle of a list\n function incrementRemainingMarkdownListNumbers(cm, pos) {\n var startLine = pos.line, lookAhead = 0, skipCount = 0;\n var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];\n\n do {\n lookAhead += 1;\n var nextLineNumber = startLine + lookAhead;\n var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine);\n\n if (nextItem) {\n var nextIndent = nextItem[1];\n var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount);\n var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber;\n\n if (startIndent === nextIndent && !isNaN(nextNumber)) {\n if (newNumber === nextNumber) itemNumber = nextNumber + 1;\n if (newNumber > nextNumber) itemNumber = newNumber + 1;\n cm.replaceRange(\n nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),\n {\n line: nextLineNumber, ch: 0\n }, {\n line: nextLineNumber, ch: nextLine.length\n });\n } else {\n if (startIndent.length > nextIndent.length) return;\n // This doesn't run if the next line immediatley indents, as it is\n // not clear of the users intention (new indented item or same level)\n if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;\n skipCount += 1;\n }\n }\n } while (nextItem);\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\nvar CodeMirror = require(\"codemirror\");\n\nCodeMirror.commands.tabAndIndentMarkdownList = function (cm) {\n\tvar ranges = cm.listSelections();\n\tvar pos = ranges[0].head;\n\tvar eolState = cm.getStateAfter(pos.line);\n\tvar inList = eolState.list !== false;\n\n\tif (inList) {\n\t\tcm.execCommand(\"indentMore\");\n\t\treturn;\n\t}\n\n\tif (cm.options.indentWithTabs) {\n\t\tcm.execCommand(\"insertTab\");\n\t}\n\telse {\n\t\tvar spaces = Array(cm.options.tabSize + 1).join(\" \");\n\t\tcm.replaceSelection(spaces);\n\t}\n};\n\nCodeMirror.commands.shiftTabAndUnindentMarkdownList = function (cm) {\n\tvar ranges = cm.listSelections();\n\tvar pos = ranges[0].head;\n\tvar eolState = cm.getStateAfter(pos.line);\n\tvar inList = eolState.list !== false;\n\n\tif (inList) {\n\t\tcm.execCommand(\"indentLess\");\n\t\treturn;\n\t}\n\n\tif (cm.options.indentWithTabs) {\n\t\tcm.execCommand(\"insertTab\");\n\t}\n\telse {\n\t\tvar spaces = Array(cm.options.tabSize + 1).join(\" \");\n\t\tcm.replaceSelection(spaces);\n\t}\n};\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.defineOption(\"fullScreen\", false, function(cm, val, old) {\n if (old == CodeMirror.Init) old = false;\n if (!old == !val) return;\n if (val) setFullscreen(cm);\n else setNormal(cm);\n });\n\n function setFullscreen(cm) {\n var wrap = cm.getWrapperElement();\n cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,\n width: wrap.style.width, height: wrap.style.height};\n wrap.style.width = \"\";\n wrap.style.height = \"auto\";\n wrap.className += \" CodeMirror-fullscreen\";\n document.documentElement.style.overflow = \"hidden\";\n cm.refresh();\n }\n\n function setNormal(cm) {\n var wrap = cm.getWrapperElement();\n wrap.className = wrap.className.replace(/\\s*CodeMirror-fullscreen\\b/, \"\");\n document.documentElement.style.overflow = \"\";\n var info = cm.state.fullScreenRestore;\n wrap.style.width = info.width; wrap.style.height = info.height;\n window.scrollTo(info.scrollLeft, info.scrollTop);\n cm.refresh();\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.modeInfo = [\n {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n {name: \"PGP\", mimes: [\"application/pgp\", \"application/pgp-encrypted\", \"application/pgp-keys\", \"application/pgp-signature\"], mode: \"asciiarmor\", ext: [\"asc\", \"pgp\", \"sig\"]},\n {name: \"ASN.1\", mime: \"text/x-ttcn-asn\", mode: \"asn.1\", ext: [\"asn\", \"asn1\"]},\n {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n {name: \"Brainfuck\", mime: \"text/x-brainfuck\", mode: \"brainfuck\", ext: [\"b\", \"bf\"]},\n {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\", \"ino\"]},\n {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\"]},\n {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\", \"cs\"]},\n {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\", \"cljc\", \"cljx\"]},\n {name: \"ClojureScript\", mime: \"text/x-clojurescript\", mode: \"clojure\", ext: [\"cljs\"]},\n {name: \"Closure Stylesheets (GSS)\", mime: \"text/x-gss\", mode: \"css\", ext: [\"gss\"]},\n {name: \"CMake\", mime: \"text/x-cmake\", mode: \"cmake\", ext: [\"cmake\", \"cmake.in\"], file: /^CMakeLists.txt$/},\n {name: \"CoffeeScript\", mimes: [\"application/vnd.coffeescript\", \"text/coffeescript\", \"text/x-coffeescript\"], mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n {name: \"Crystal\", mime: \"text/x-crystal\", mode: \"crystal\", ext: [\"cr\"]},\n {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n {name: \"edn\", mime: \"application/edn\", mode: \"clojure\", ext: [\"edn\"]},\n {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n {name: \"Elm\", mime: \"text/x-elm\", mode: \"elm\", ext: [\"elm\"]},\n {name: \"Embedded Javascript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n {name: \"Esper\", mime: \"text/x-esper\", mode: \"sql\"},\n {name: \"Factor\", mime: \"text/x-factor\", mode: \"factor\", ext: [\"factor\"]},\n {name: \"FCL\", mime: \"text/x-fcl\", mode: \"fcl\"},\n {name: \"Forth\", mime: \"text/x-forth\", mode: \"forth\", ext: [\"forth\", \"fth\", \"4th\"]},\n {name: \"Fortran\", mime: \"text/x-fortran\", mode: \"fortran\", ext: [\"f\", \"for\", \"f77\", \"f90\", \"f95\"]},\n {name: \"F#\", mime: \"text/x-fsharp\", mode: \"mllike\", ext: [\"fs\"], alias: [\"fsharp\"]},\n {name: \"Gas\", mime: \"text/x-gas\", mode: \"gas\", ext: [\"s\"]},\n {name: \"Gherkin\", mime: \"text/x-feature\", mode: \"gherkin\", ext: [\"feature\"]},\n {name: \"GitHub Flavored Markdown\", mime: \"text/x-gfm\", mode: \"gfm\", file: /^(readme|contributing|history).md$/i},\n {name: \"Go\", mime: \"text/x-go\", mode: \"go\", ext: [\"go\"]},\n {name: \"Groovy\", mime: \"text/x-groovy\", mode: \"groovy\", ext: [\"groovy\", \"gradle\"], file: /^Jenkinsfile$/},\n {name: \"HAML\", mime: \"text/x-haml\", mode: \"haml\", ext: [\"haml\"]},\n {name: \"Haskell\", mime: \"text/x-haskell\", mode: \"haskell\", ext: [\"hs\"]},\n {name: \"Haskell (Literate)\", mime: \"text/x-literate-haskell\", mode: \"haskell-literate\", ext: [\"lhs\"]},\n {name: \"Haxe\", mime: \"text/x-haxe\", mode: \"haxe\", ext: [\"hx\"]},\n {name: \"HXML\", mime: \"text/x-hxml\", mode: \"haxe\", ext: [\"hxml\"]},\n {name: \"ASP.NET\", mime: \"application/x-aspx\", mode: \"htmlembedded\", ext: [\"aspx\"], alias: [\"asp\", \"aspx\"]},\n {name: \"HTML\", mime: \"text/html\", mode: \"htmlmixed\", ext: [\"html\", \"htm\", \"handlebars\", \"hbs\"], alias: [\"xhtml\"]},\n {name: \"HTTP\", mime: \"message/http\", mode: \"http\"},\n {name: \"IDL\", mime: \"text/x-idl\", mode: \"idl\", ext: [\"pro\"]},\n {name: \"Pug\", mime: \"text/x-pug\", mode: \"pug\", ext: [\"jade\", \"pug\"], alias: [\"jade\"]},\n {name: \"Java\", mime: \"text/x-java\", mode: \"clike\", ext: [\"java\"]},\n {name: \"Java Server Pages\", mime: \"application/x-jsp\", mode: \"htmlembedded\", ext: [\"jsp\"], alias: [\"jsp\"]},\n {name: \"JavaScript\", mimes: [\"text/javascript\", \"text/ecmascript\", \"application/javascript\", \"application/x-javascript\", \"application/ecmascript\"],\n mode: \"javascript\", ext: [\"js\"], alias: [\"ecmascript\", \"js\", \"node\"]},\n {name: \"JSON\", mimes: [\"application/json\", \"application/x-json\"], mode: \"javascript\", ext: [\"json\", \"map\"], alias: [\"json5\"]},\n {name: \"JSON-LD\", mime: \"application/ld+json\", mode: \"javascript\", ext: [\"jsonld\"], alias: [\"jsonld\"]},\n {name: \"JSX\", mime: \"text/jsx\", mode: \"jsx\", ext: [\"jsx\"]},\n {name: \"Jinja2\", mime: \"text/jinja2\", mode: \"jinja2\", ext: [\"j2\", \"jinja\", \"jinja2\"]},\n {name: \"Julia\", mime: \"text/x-julia\", mode: \"julia\", ext: [\"jl\"]},\n {name: \"Kotlin\", mime: \"text/x-kotlin\", mode: \"clike\", ext: [\"kt\"]},\n {name: \"LESS\", mime: \"text/x-less\", mode: \"css\", ext: [\"less\"]},\n {name: \"LiveScript\", mime: \"text/x-livescript\", mode: \"livescript\", ext: [\"ls\"], alias: [\"ls\"]},\n {name: \"Lua\", mime: \"text/x-lua\", mode: \"lua\", ext: [\"lua\"]},\n {name: \"Markdown\", mime: \"text/x-markdown\", mode: \"markdown\", ext: [\"markdown\", \"md\", \"mkd\"]},\n {name: \"mIRC\", mime: \"text/mirc\", mode: \"mirc\"},\n {name: \"MariaDB SQL\", mime: \"text/x-mariadb\", mode: \"sql\"},\n {name: \"Mathematica\", mime: \"text/x-mathematica\", mode: \"mathematica\", ext: [\"m\", \"nb\", \"wl\", \"wls\"]},\n {name: \"Modelica\", mime: \"text/x-modelica\", mode: \"modelica\", ext: [\"mo\"]},\n {name: \"MUMPS\", mime: \"text/x-mumps\", mode: \"mumps\", ext: [\"mps\"]},\n {name: \"MS SQL\", mime: \"text/x-mssql\", mode: \"sql\"},\n {name: \"mbox\", mime: \"application/mbox\", mode: \"mbox\", ext: [\"mbox\"]},\n {name: \"MySQL\", mime: \"text/x-mysql\", mode: \"sql\"},\n {name: \"Nginx\", mime: \"text/x-nginx-conf\", mode: \"nginx\", file: /nginx.*\\.conf$/i},\n {name: \"NSIS\", mime: \"text/x-nsis\", mode: \"nsis\", ext: [\"nsh\", \"nsi\"]},\n {name: \"NTriples\", mimes: [\"application/n-triples\", \"application/n-quads\", \"text/n-triples\"],\n mode: \"ntriples\", ext: [\"nt\", \"nq\"]},\n {name: \"Objective-C\", mime: \"text/x-objectivec\", mode: \"clike\", ext: [\"m\", \"mm\"], alias: [\"objective-c\", \"objc\"]},\n {name: \"OCaml\", mime: \"text/x-ocaml\", mode: \"mllike\", ext: [\"ml\", \"mli\", \"mll\", \"mly\"]},\n {name: \"Octave\", mime: \"text/x-octave\", mode: \"octave\", ext: [\"m\"]},\n {name: \"Oz\", mime: \"text/x-oz\", mode: \"oz\", ext: [\"oz\"]},\n {name: \"Pascal\", mime: \"text/x-pascal\", mode: \"pascal\", ext: [\"p\", \"pas\"]},\n {name: \"PEG.js\", mime: \"null\", mode: \"pegjs\", ext: [\"jsonld\"]},\n {name: \"Perl\", mime: \"text/x-perl\", mode: \"perl\", ext: [\"pl\", \"pm\"]},\n {name: \"PHP\", mimes: [\"text/x-php\", \"application/x-httpd-php\", \"application/x-httpd-php-open\"], mode: \"php\", ext: [\"php\", \"php3\", \"php4\", \"php5\", \"php7\", \"phtml\"]},\n {name: \"Pig\", mime: \"text/x-pig\", mode: \"pig\", ext: [\"pig\"]},\n {name: \"Plain Text\", mime: \"text/plain\", mode: \"null\", ext: [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\"]},\n {name: \"PLSQL\", mime: \"text/x-plsql\", mode: \"sql\", ext: [\"pls\"]},\n {name: \"PostgreSQL\", mime: \"text/x-pgsql\", mode: \"sql\"},\n {name: \"PowerShell\", mime: \"application/x-powershell\", mode: \"powershell\", ext: [\"ps1\", \"psd1\", \"psm1\"]},\n {name: \"Properties files\", mime: \"text/x-properties\", mode: \"properties\", ext: [\"properties\", \"ini\", \"in\"], alias: [\"ini\", \"properties\"]},\n {name: \"ProtoBuf\", mime: \"text/x-protobuf\", mode: \"protobuf\", ext: [\"proto\"]},\n {name: \"Python\", mime: \"text/x-python\", mode: \"python\", ext: [\"BUILD\", \"bzl\", \"py\", \"pyw\"], file: /^(BUCK|BUILD)$/},\n {name: \"Puppet\", mime: \"text/x-puppet\", mode: \"puppet\", ext: [\"pp\"]},\n {name: \"Q\", mime: \"text/x-q\", mode: \"q\", ext: [\"q\"]},\n {name: \"R\", mime: \"text/x-rsrc\", mode: \"r\", ext: [\"r\", \"R\"], alias: [\"rscript\"]},\n {name: \"reStructuredText\", mime: \"text/x-rst\", mode: \"rst\", ext: [\"rst\"], alias: [\"rst\"]},\n {name: \"RPM Changes\", mime: \"text/x-rpm-changes\", mode: \"rpm\"},\n {name: \"RPM Spec\", mime: \"text/x-rpm-spec\", mode: \"rpm\", ext: [\"spec\"]},\n {name: \"Ruby\", mime: \"text/x-ruby\", mode: \"ruby\", ext: [\"rb\"], alias: [\"jruby\", \"macruby\", \"rake\", \"rb\", \"rbx\"]},\n {name: \"Rust\", mime: \"text/x-rustsrc\", mode: \"rust\", ext: [\"rs\"]},\n {name: \"SAS\", mime: \"text/x-sas\", mode: \"sas\", ext: [\"sas\"]},\n {name: \"Sass\", mime: \"text/x-sass\", mode: \"sass\", ext: [\"sass\"]},\n {name: \"Scala\", mime: \"text/x-scala\", mode: \"clike\", ext: [\"scala\"]},\n {name: \"Scheme\", mime: \"text/x-scheme\", mode: \"scheme\", ext: [\"scm\", \"ss\"]},\n {name: \"SCSS\", mime: \"text/x-scss\", mode: \"css\", ext: [\"scss\"]},\n {name: \"Shell\", mimes: [\"text/x-sh\", \"application/x-sh\"], mode: \"shell\", ext: [\"sh\", \"ksh\", \"bash\"], alias: [\"bash\", \"sh\", \"zsh\"], file: /^PKGBUILD$/},\n {name: \"Sieve\", mime: \"application/sieve\", mode: \"sieve\", ext: [\"siv\", \"sieve\"]},\n {name: \"Slim\", mimes: [\"text/x-slim\", \"application/x-slim\"], mode: \"slim\", ext: [\"slim\"]},\n {name: \"Smalltalk\", mime: \"text/x-stsrc\", mode: \"smalltalk\", ext: [\"st\"]},\n {name: \"Smarty\", mime: \"text/x-smarty\", mode: \"smarty\", ext: [\"tpl\"]},\n {name: \"Solr\", mime: \"text/x-solr\", mode: \"solr\"},\n {name: \"SML\", mime: \"text/x-sml\", mode: \"mllike\", ext: [\"sml\", \"sig\", \"fun\", \"smackspec\"]},\n {name: \"Soy\", mime: \"text/x-soy\", mode: \"soy\", ext: [\"soy\"], alias: [\"closure template\"]},\n {name: \"SPARQL\", mime: \"application/sparql-query\", mode: \"sparql\", ext: [\"rq\", \"sparql\"], alias: [\"sparul\"]},\n {name: \"Spreadsheet\", mime: \"text/x-spreadsheet\", mode: \"spreadsheet\", alias: [\"excel\", \"formula\"]},\n {name: \"SQL\", mime: \"text/x-sql\", mode: \"sql\", ext: [\"sql\"]},\n {name: \"SQLite\", mime: \"text/x-sqlite\", mode: \"sql\"},\n {name: \"Squirrel\", mime: \"text/x-squirrel\", mode: \"clike\", ext: [\"nut\"]},\n {name: \"Stylus\", mime: \"text/x-styl\", mode: \"stylus\", ext: [\"styl\"]},\n {name: \"Swift\", mime: \"text/x-swift\", mode: \"swift\", ext: [\"swift\"]},\n {name: \"sTeX\", mime: \"text/x-stex\", mode: \"stex\"},\n {name: \"LaTeX\", mime: \"text/x-latex\", mode: \"stex\", ext: [\"text\", \"ltx\", \"tex\"], alias: [\"tex\"]},\n {name: \"SystemVerilog\", mime: \"text/x-systemverilog\", mode: \"verilog\", ext: [\"v\", \"sv\", \"svh\"]},\n {name: \"Tcl\", mime: \"text/x-tcl\", mode: \"tcl\", ext: [\"tcl\"]},\n {name: \"Textile\", mime: \"text/x-textile\", mode: \"textile\", ext: [\"textile\"]},\n {name: \"TiddlyWiki \", mime: \"text/x-tiddlywiki\", mode: \"tiddlywiki\"},\n {name: \"Tiki wiki\", mime: \"text/tiki\", mode: \"tiki\"},\n {name: \"TOML\", mime: \"text/x-toml\", mode: \"toml\", ext: [\"toml\"]},\n {name: \"Tornado\", mime: \"text/x-tornado\", mode: \"tornado\"},\n {name: \"troff\", mime: \"text/troff\", mode: \"troff\", ext: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]},\n {name: \"TTCN\", mime: \"text/x-ttcn\", mode: \"ttcn\", ext: [\"ttcn\", \"ttcn3\", \"ttcnpp\"]},\n {name: \"TTCN_CFG\", mime: \"text/x-ttcn-cfg\", mode: \"ttcn-cfg\", ext: [\"cfg\"]},\n {name: \"Turtle\", mime: \"text/turtle\", mode: \"turtle\", ext: [\"ttl\"]},\n {name: \"TypeScript\", mime: \"application/typescript\", mode: \"javascript\", ext: [\"ts\"], alias: [\"ts\"]},\n {name: \"TypeScript-JSX\", mime: \"text/typescript-jsx\", mode: \"jsx\", ext: [\"tsx\"], alias: [\"tsx\"]},\n {name: \"Twig\", mime: \"text/x-twig\", mode: \"twig\"},\n {name: \"Web IDL\", mime: \"text/x-webidl\", mode: \"webidl\", ext: [\"webidl\"]},\n {name: \"VB.NET\", mime: \"text/x-vb\", mode: \"vb\", ext: [\"vb\"]},\n {name: \"VBScript\", mime: \"text/vbscript\", mode: \"vbscript\", ext: [\"vbs\"]},\n {name: \"Velocity\", mime: \"text/velocity\", mode: \"velocity\", ext: [\"vtl\"]},\n {name: \"Verilog\", mime: \"text/x-verilog\", mode: \"verilog\", ext: [\"v\"]},\n {name: \"VHDL\", mime: \"text/x-vhdl\", mode: \"vhdl\", ext: [\"vhd\", \"vhdl\"]},\n {name: \"Vue.js Component\", mimes: [\"script/x-vue\", \"text/x-vue\"], mode: \"vue\", ext: [\"vue\"]},\n {name: \"XML\", mimes: [\"application/xml\", \"text/xml\"], mode: \"xml\", ext: [\"xml\", \"xsl\", \"xsd\", \"svg\"], alias: [\"rss\", \"wsdl\", \"xsd\"]},\n {name: \"XQuery\", mime: \"application/xquery\", mode: \"xquery\", ext: [\"xy\", \"xquery\"]},\n {name: \"Yacas\", mime: \"text/x-yacas\", mode: \"yacas\", ext: [\"ys\"]},\n {name: \"YAML\", mimes: [\"text/x-yaml\", \"text/yaml\"], mode: \"yaml\", ext: [\"yaml\", \"yml\"], alias: [\"yml\"]},\n {name: \"Z80\", mime: \"text/x-z80\", mode: \"z80\", ext: [\"z80\"]},\n {name: \"mscgen\", mime: \"text/x-mscgen\", mode: \"mscgen\", ext: [\"mscgen\", \"mscin\", \"msc\"]},\n {name: \"xu\", mime: \"text/x-xu\", mode: \"mscgen\", ext: [\"xu\"]},\n {name: \"msgenny\", mime: \"text/x-msgenny\", mode: \"mscgen\", ext: [\"msgenny\"]}\n ];\n // Ensure all modes have a mime property for backwards compatibility\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mimes) info.mime = info.mimes[0];\n }\n\n CodeMirror.findModeByMIME = function(mime) {\n mime = mime.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mime == mime) return info;\n if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n if (info.mimes[j] == mime) return info;\n }\n if (/\\+xml$/.test(mime)) return CodeMirror.findModeByMIME(\"application/xml\")\n if (/\\+json$/.test(mime)) return CodeMirror.findModeByMIME(\"application/json\")\n };\n\n CodeMirror.findModeByExtension = function(ext) {\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.ext) for (var j = 0; j < info.ext.length; j++)\n if (info.ext[j] == ext) return info;\n }\n };\n\n CodeMirror.findModeByFileName = function(filename) {\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.file && info.file.test(filename)) return info;\n }\n var dot = filename.lastIndexOf(\".\");\n var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n if (ext) return CodeMirror.findModeByExtension(ext);\n };\n\n CodeMirror.findModeByName = function(name) {\n name = name.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.name.toLowerCase() == name) return info;\n if (info.alias) for (var j = 0; j < info.alias.length; j++)\n if (info.alias[j].toLowerCase() == name) return info;\n }\n };\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n CodeMirror.defineOption(\"placeholder\", \"\", function(cm, val, old) {\n var prev = old && old != CodeMirror.Init;\n if (val && !prev) {\n cm.on(\"blur\", onBlur);\n cm.on(\"change\", onChange);\n cm.on(\"swapDoc\", onChange);\n onChange(cm);\n } else if (!val && prev) {\n cm.off(\"blur\", onBlur);\n cm.off(\"change\", onChange);\n cm.off(\"swapDoc\", onChange);\n clearPlaceholder(cm);\n var wrapper = cm.getWrapperElement();\n wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\");\n }\n\n if (val && !cm.hasFocus()) onBlur(cm);\n });\n\n function clearPlaceholder(cm) {\n if (cm.state.placeholder) {\n cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);\n cm.state.placeholder = null;\n }\n }\n function setPlaceholder(cm) {\n clearPlaceholder(cm);\n var elt = cm.state.placeholder = document.createElement(\"pre\");\n elt.style.cssText = \"height: 0; overflow: visible\";\n elt.style.direction = cm.getOption(\"direction\");\n elt.className = \"CodeMirror-placeholder CodeMirror-line-like\";\n var placeHolder = cm.getOption(\"placeholder\")\n if (typeof placeHolder == \"string\") placeHolder = document.createTextNode(placeHolder)\n elt.appendChild(placeHolder)\n cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);\n }\n\n function onBlur(cm) {\n if (isEmpty(cm)) setPlaceholder(cm);\n }\n function onChange(cm) {\n var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);\n wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\") + (empty ? \" CodeMirror-empty\" : \"\");\n\n if (empty) setPlaceholder(cm);\n else clearPlaceholder(cm);\n }\n\n function isEmpty(cm) {\n return (cm.lineCount() === 1) && (cm.getLine(0) === \"\");\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Because sometimes you need to mark the selected *text*.\n//\n// Adds an option 'styleSelectedText' which, when enabled, gives\n// selected text the CSS class given as option value, or\n// \"CodeMirror-selectedtext\" when the value is not a string.\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.defineOption(\"styleSelectedText\", false, function(cm, val, old) {\n var prev = old && old != CodeMirror.Init;\n if (val && !prev) {\n cm.state.markedSelection = [];\n cm.state.markedSelectionStyle = typeof val == \"string\" ? val : \"CodeMirror-selectedtext\";\n reset(cm);\n cm.on(\"cursorActivity\", onCursorActivity);\n cm.on(\"change\", onChange);\n } else if (!val && prev) {\n cm.off(\"cursorActivity\", onCursorActivity);\n cm.off(\"change\", onChange);\n clear(cm);\n cm.state.markedSelection = cm.state.markedSelectionStyle = null;\n }\n });\n\n function onCursorActivity(cm) {\n if (cm.state.markedSelection)\n cm.operation(function() { update(cm); });\n }\n\n function onChange(cm) {\n if (cm.state.markedSelection && cm.state.markedSelection.length)\n cm.operation(function() { clear(cm); });\n }\n\n var CHUNK_SIZE = 8;\n var Pos = CodeMirror.Pos;\n var cmp = CodeMirror.cmpPos;\n\n function coverRange(cm, from, to, addAt) {\n if (cmp(from, to) == 0) return;\n var array = cm.state.markedSelection;\n var cls = cm.state.markedSelectionStyle;\n for (var line = from.line;;) {\n var start = line == from.line ? from : Pos(line, 0);\n var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line;\n var end = atEnd ? to : Pos(endLine, 0);\n var mark = cm.markText(start, end, {className: cls});\n if (addAt == null) array.push(mark);\n else array.splice(addAt++, 0, mark);\n if (atEnd) break;\n line = endLine;\n }\n }\n\n function clear(cm) {\n var array = cm.state.markedSelection;\n for (var i = 0; i < array.length; ++i) array[i].clear();\n array.length = 0;\n }\n\n function reset(cm) {\n clear(cm);\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++)\n coverRange(cm, ranges[i].from(), ranges[i].to());\n }\n\n function update(cm) {\n if (!cm.somethingSelected()) return clear(cm);\n if (cm.listSelections().length > 1) return reset(cm);\n\n var from = cm.getCursor(\"start\"), to = cm.getCursor(\"end\");\n\n var array = cm.state.markedSelection;\n if (!array.length) return coverRange(cm, from, to);\n\n var coverStart = array[0].find(), coverEnd = array[array.length - 1].find();\n if (!coverStart || !coverEnd || to.line - from.line <= CHUNK_SIZE ||\n cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0)\n return reset(cm);\n\n while (cmp(from, coverStart.from) > 0) {\n array.shift().clear();\n coverStart = array[0].find();\n }\n if (cmp(from, coverStart.from) < 0) {\n if (coverStart.to.line - from.line < CHUNK_SIZE) {\n array.shift().clear();\n coverRange(cm, from, coverStart.to, 0);\n } else {\n coverRange(cm, from, coverStart.from, 0);\n }\n }\n\n while (cmp(to, coverEnd.to) < 0) {\n array.pop().clear();\n coverEnd = array[array.length - 1].find();\n }\n if (cmp(to, coverEnd.to) > 0) {\n if (to.line - coverEnd.from.line < CHUNK_SIZE) {\n array.pop().clear();\n coverRange(cm, coverEnd.from, to);\n } else {\n coverRange(cm, coverEnd.to, to);\n }\n }\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../markdown/markdown\"), require(\"../../addon/mode/overlay\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../markdown/markdown\", \"../../addon/mode/overlay\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\\.beep|\\.lwz|\\.xpc|\\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\\.beeps?|xmpp|xri|ymsgr|z39\\.50[rs]?):(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\([^\\s()<>]*\\))+(?:\\([^\\s()<>]*\\)|[^\\s`*!()\\[\\]{};:'\".,<>?«»“”‘’]))/i\n\nCodeMirror.defineMode(\"gfm\", function(config, modeConfig) {\n var codeDepth = 0;\n function blankLine(state) {\n state.code = false;\n return null;\n }\n var gfmOverlay = {\n startState: function() {\n return {\n code: false,\n codeBlock: false,\n ateSpace: false\n };\n },\n copyState: function(s) {\n return {\n code: s.code,\n codeBlock: s.codeBlock,\n ateSpace: s.ateSpace\n };\n },\n token: function(stream, state) {\n state.combineTokens = null;\n\n // Hack to prevent formatting override inside code blocks (block and inline)\n if (state.codeBlock) {\n if (stream.match(/^```+/)) {\n state.codeBlock = false;\n return null;\n }\n stream.skipToEnd();\n return null;\n }\n if (stream.sol()) {\n state.code = false;\n }\n if (stream.sol() && stream.match(/^```+/)) {\n stream.skipToEnd();\n state.codeBlock = true;\n return null;\n }\n // If this block is changed, it may need to be updated in Markdown mode\n if (stream.peek() === '`') {\n stream.next();\n var before = stream.pos;\n stream.eatWhile('`');\n var difference = 1 + stream.pos - before;\n if (!state.code) {\n codeDepth = difference;\n state.code = true;\n } else {\n if (difference === codeDepth) { // Must be exact\n state.code = false;\n }\n }\n return null;\n } else if (state.code) {\n stream.next();\n return null;\n }\n // Check if space. If so, links can be formatted later on\n if (stream.eatSpace()) {\n state.ateSpace = true;\n return null;\n }\n if (stream.sol() || state.ateSpace) {\n state.ateSpace = false;\n if (modeConfig.gitHubSpice !== false) {\n if(stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+@)?(?=.{0,6}\\d)(?:[a-f0-9]{7,40}\\b)/)) {\n // User/Project@SHA\n // User@SHA\n // SHA\n state.combineTokens = true;\n return \"link\";\n } else if (stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+)?#[0-9]+\\b/)) {\n // User/Project#Num\n // User#Num\n // #Num\n state.combineTokens = true;\n return \"link\";\n }\n }\n }\n if (stream.match(urlRE) &&\n stream.string.slice(stream.start - 2, stream.start) != \"](\" &&\n (stream.start == 0 || /\\W/.test(stream.string.charAt(stream.start - 1)))) {\n // URLs\n // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls\n // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine\n // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL\n state.combineTokens = true;\n return \"link\";\n }\n stream.next();\n return null;\n },\n blankLine: blankLine\n };\n\n var markdownConfig = {\n taskLists: true,\n strikethrough: true,\n emoji: true\n };\n for (var attr in modeConfig) {\n markdownConfig[attr] = modeConfig[attr];\n }\n markdownConfig.name = \"markdown\";\n return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);\n\n}, \"markdown\");\n\n CodeMirror.defineMIME(\"text/x-gfm\", \"gfm\");\n});\n","// Use strict mode (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)\n\"use strict\";\n\n\n// Requires\nvar Typo = require(\"typo-js\");\n\n\n// Create function\nfunction CodeMirrorSpellChecker(options) {\n\t// Initialize\n\toptions = options || {};\n\n\n\t// Verify\n\tif(typeof options.codeMirrorInstance !== \"function\" || typeof options.codeMirrorInstance.defineMode !== \"function\") {\n\t\tconsole.log(\"CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`\");\n\t\treturn;\n\t}\n\n\n\t// Because some browsers don't support this functionality yet\n\tif(!String.prototype.includes) {\n\t\tString.prototype.includes = function() {\n\t\t\t\"use strict\";\n\t\t\treturn String.prototype.indexOf.apply(this, arguments) !== -1;\n\t\t};\n\t}\n\n\n\t// Define the new mode\n\toptions.codeMirrorInstance.defineMode(\"spell-checker\", function(config) {\n\t\t// Load AFF/DIC data\n\t\tif(!CodeMirrorSpellChecker.aff_loading) {\n\t\t\tCodeMirrorSpellChecker.aff_loading = true;\n\t\t\tvar xhr_aff = new XMLHttpRequest();\n\t\t\txhr_aff.open(\"GET\", \"https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff\", true);\n\t\t\txhr_aff.onload = function() {\n\t\t\t\tif(xhr_aff.readyState === 4 && xhr_aff.status === 200) {\n\t\t\t\t\tCodeMirrorSpellChecker.aff_data = xhr_aff.responseText;\n\t\t\t\t\tCodeMirrorSpellChecker.num_loaded++;\n\n\t\t\t\t\tif(CodeMirrorSpellChecker.num_loaded == 2) {\n\t\t\t\t\t\tCodeMirrorSpellChecker.typo = new Typo(\"en_US\", CodeMirrorSpellChecker.aff_data, CodeMirrorSpellChecker.dic_data, {\n\t\t\t\t\t\t\tplatform: \"any\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr_aff.send(null);\n\t\t}\n\n\t\tif(!CodeMirrorSpellChecker.dic_loading) {\n\t\t\tCodeMirrorSpellChecker.dic_loading = true;\n\t\t\tvar xhr_dic = new XMLHttpRequest();\n\t\t\txhr_dic.open(\"GET\", \"https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic\", true);\n\t\t\txhr_dic.onload = function() {\n\t\t\t\tif(xhr_dic.readyState === 4 && xhr_dic.status === 200) {\n\t\t\t\t\tCodeMirrorSpellChecker.dic_data = xhr_dic.responseText;\n\t\t\t\t\tCodeMirrorSpellChecker.num_loaded++;\n\n\t\t\t\t\tif(CodeMirrorSpellChecker.num_loaded == 2) {\n\t\t\t\t\t\tCodeMirrorSpellChecker.typo = new Typo(\"en_US\", CodeMirrorSpellChecker.aff_data, CodeMirrorSpellChecker.dic_data, {\n\t\t\t\t\t\t\tplatform: \"any\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr_dic.send(null);\n\t\t}\n\n\n\t\t// Define what separates a word\n\t\tvar rx_word = \"!\\\"#$%&()*+,-./:;<=>?@[\\\\]^_`{|}~ \";\n\n\n\t\t// Create the overlay and such\n\t\tvar overlay = {\n\t\t\ttoken: function(stream) {\n\t\t\t\tvar ch = stream.peek();\n\t\t\t\tvar word = \"\";\n\n\t\t\t\tif(rx_word.includes(ch)) {\n\t\t\t\t\tstream.next();\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\twhile((ch = stream.peek()) != null && !rx_word.includes(ch)) {\n\t\t\t\t\tword += ch;\n\t\t\t\t\tstream.next();\n\t\t\t\t}\n\n\t\t\t\tif(CodeMirrorSpellChecker.typo && !CodeMirrorSpellChecker.typo.check(word))\n\t\t\t\t\treturn \"spell-error\"; // CSS class: cm-spell-error\n\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\tvar mode = options.codeMirrorInstance.getMode(\n\t\t\tconfig, config.backdrop || \"text/plain\"\n\t\t);\n\n\t\treturn options.codeMirrorInstance.overlayMode(mode, overlay, true);\n\t});\n}\n\n\n// Initialize data globally to reduce memory consumption\nCodeMirrorSpellChecker.num_loaded = 0;\nCodeMirrorSpellChecker.aff_loading = false;\nCodeMirrorSpellChecker.dic_loading = false;\nCodeMirrorSpellChecker.aff_data = \"\";\nCodeMirrorSpellChecker.dic_data = \"\";\nCodeMirrorSpellChecker.typo;\n\n\n// Export\nmodule.exports = CodeMirrorSpellChecker;","/* globals chrome: false */\n/* globals __dirname: false */\n/* globals require: false */\n/* globals Buffer: false */\n/* globals module: false */\n\n/**\n * Typo is a JavaScript implementation of a spellchecker using hunspell-style \n * dictionaries.\n */\n\nvar Typo;\n\n(function () {\n\"use strict\";\n\n/**\n * Typo constructor.\n *\n * @param {String} [dictionary] The locale code of the dictionary being used. e.g.,\n * \"en_US\". This is only used to auto-load dictionaries.\n * @param {String} [affData] The data from the dictionary's .aff file. If omitted\n * and Typo.js is being used in a Chrome extension, the .aff\n * file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].aff\n * In other environments, it will be loaded from\n * [settings.dictionaryPath]/dictionaries/[dictionary]/[dictionary].aff\n * @param {String} [wordsData] The data from the dictionary's .dic file. If omitted\n * and Typo.js is being used in a Chrome extension, the .dic\n * file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].dic\n * In other environments, it will be loaded from\n * [settings.dictionaryPath]/dictionaries/[dictionary]/[dictionary].dic\n * @param {Object} [settings] Constructor settings. Available properties are:\n * {String} [dictionaryPath]: path to load dictionary from in non-chrome\n * environment.\n * {Object} [flags]: flag information.\n * {Boolean} [asyncLoad]: If true, affData and wordsData will be loaded\n * asynchronously.\n * {Function} [loadedCallback]: Called when both affData and wordsData\n * have been loaded. Only used if asyncLoad is set to true. The parameter\n * is the instantiated Typo object.\n *\n * @returns {Typo} A Typo object.\n */\n\nTypo = function (dictionary, affData, wordsData, settings) {\n\tsettings = settings || {};\n\n\tthis.dictionary = null;\n\t\n\tthis.rules = {};\n\tthis.dictionaryTable = {};\n\t\n\tthis.compoundRules = [];\n\tthis.compoundRuleCodes = {};\n\t\n\tthis.replacementTable = [];\n\t\n\tthis.flags = settings.flags || {}; \n\t\n\tthis.memoized = {};\n\n\tthis.loaded = false;\n\t\n\tvar self = this;\n\t\n\tvar path;\n\t\n\t// Loop-control variables.\n\tvar i, j, _len, _jlen;\n\t\n\tif (dictionary) {\n\t\tself.dictionary = dictionary;\n\t\t\n\t\t// If the data is preloaded, just setup the Typo object.\n\t\tif (affData && wordsData) {\n\t\t\tsetup();\n\t\t}\n\t\t// Loading data for Chrome extentions.\n\t\telse if (typeof window !== 'undefined' && 'chrome' in window && 'extension' in window.chrome && 'getURL' in window.chrome.extension) {\n\t\t\tif (settings.dictionaryPath) {\n\t\t\t\tpath = settings.dictionaryPath;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpath = \"typo/dictionaries\";\n\t\t\t}\n\t\t\t\n\t\t\tif (!affData) readDataFile(chrome.extension.getURL(path + \"/\" + dictionary + \"/\" + dictionary + \".aff\"), setAffData);\n\t\t\tif (!wordsData) readDataFile(chrome.extension.getURL(path + \"/\" + dictionary + \"/\" + dictionary + \".dic\"), setWordsData);\n\t\t}\n\t\telse {\n\t\t\tif (settings.dictionaryPath) {\n\t\t\t\tpath = settings.dictionaryPath;\n\t\t\t}\n\t\t\telse if (typeof __dirname !== 'undefined') {\n\t\t\t\tpath = __dirname + '/dictionaries';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpath = './dictionaries';\n\t\t\t}\n\t\t\t\n\t\t\tif (!affData) readDataFile(path + \"/\" + dictionary + \"/\" + dictionary + \".aff\", setAffData);\n\t\t\tif (!wordsData) readDataFile(path + \"/\" + dictionary + \"/\" + dictionary + \".dic\", setWordsData);\n\t\t}\n\t}\n\t\n\tfunction readDataFile(url, setFunc) {\n\t\tvar response = self._readFile(url, null, settings.asyncLoad);\n\t\t\n\t\tif (settings.asyncLoad) {\n\t\t\tresponse.then(function(data) {\n\t\t\t\tsetFunc(data);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tsetFunc(response);\n\t\t}\n\t}\n\n\tfunction setAffData(data) {\n\t\taffData = data;\n\n\t\tif (wordsData) {\n\t\t\tsetup();\n\t\t}\n\t}\n\n\tfunction setWordsData(data) {\n\t\twordsData = data;\n\n\t\tif (affData) {\n\t\t\tsetup();\n\t\t}\n\t}\n\n\tfunction setup() {\n\t\tself.rules = self._parseAFF(affData);\n\t\t\n\t\t// Save the rule codes that are used in compound rules.\n\t\tself.compoundRuleCodes = {};\n\t\t\n\t\tfor (i = 0, _len = self.compoundRules.length; i < _len; i++) {\n\t\t\tvar rule = self.compoundRules[i];\n\t\t\t\n\t\t\tfor (j = 0, _jlen = rule.length; j < _jlen; j++) {\n\t\t\t\tself.compoundRuleCodes[rule[j]] = [];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If we add this ONLYINCOMPOUND flag to self.compoundRuleCodes, then _parseDIC\n\t\t// will do the work of saving the list of words that are compound-only.\n\t\tif (\"ONLYINCOMPOUND\" in self.flags) {\n\t\t\tself.compoundRuleCodes[self.flags.ONLYINCOMPOUND] = [];\n\t\t}\n\t\t\n\t\tself.dictionaryTable = self._parseDIC(wordsData);\n\t\t\n\t\t// Get rid of any codes from the compound rule codes that are never used \n\t\t// (or that were special regex characters). Not especially necessary... \n\t\tfor (i in self.compoundRuleCodes) {\n\t\t\tif (self.compoundRuleCodes[i].length === 0) {\n\t\t\t\tdelete self.compoundRuleCodes[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Build the full regular expressions for each compound rule.\n\t\t// I have a feeling (but no confirmation yet) that this method of \n\t\t// testing for compound words is probably slow.\n\t\tfor (i = 0, _len = self.compoundRules.length; i < _len; i++) {\n\t\t\tvar ruleText = self.compoundRules[i];\n\t\t\t\n\t\t\tvar expressionText = \"\";\n\t\t\t\n\t\t\tfor (j = 0, _jlen = ruleText.length; j < _jlen; j++) {\n\t\t\t\tvar character = ruleText[j];\n\t\t\t\t\n\t\t\t\tif (character in self.compoundRuleCodes) {\n\t\t\t\t\texpressionText += \"(\" + self.compoundRuleCodes[character].join(\"|\") + \")\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\texpressionText += character;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tself.compoundRules[i] = new RegExp(expressionText, \"i\");\n\t\t}\n\t\t\n\t\tself.loaded = true;\n\t\t\n\t\tif (settings.asyncLoad && settings.loadedCallback) {\n\t\t\tsettings.loadedCallback(self);\n\t\t}\n\t}\n\t\n\treturn this;\n};\n\nTypo.prototype = {\n\t/**\n\t * Loads a Typo instance from a hash of all of the Typo properties.\n\t *\n\t * @param object obj A hash of Typo properties, probably gotten from a JSON.parse(JSON.stringify(typo_instance)).\n\t */\n\t\n\tload : function (obj) {\n\t\tfor (var i in obj) {\n\t\t\tif (obj.hasOwnProperty(i)) {\n\t\t\t\tthis[i] = obj[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this;\n\t},\n\t\n\t/**\n\t * Read the contents of a file.\n\t * \n\t * @param {String} path The path (relative) to the file.\n\t * @param {String} [charset=\"ISO8859-1\"] The expected charset of the file\n\t * @param {Boolean} async If true, the file will be read asynchronously. For node.js this does nothing, all\n\t * files are read synchronously.\n\t * @returns {String} The file data if async is false, otherwise a promise object. If running node.js, the data is\n\t * always returned.\n\t */\n\t\n\t_readFile : function (path, charset, async) {\n\t\tcharset = charset || \"utf8\";\n\t\t\n\t\tif (typeof XMLHttpRequest !== 'undefined') {\n\t\t\tvar promise;\n\t\t\tvar req = new XMLHttpRequest();\n\t\t\treq.open(\"GET\", path, async);\n\t\t\t\n\t\t\tif (async) {\n\t\t\t\tpromise = new Promise(function(resolve, reject) {\n\t\t\t\t\treq.onload = function() {\n\t\t\t\t\t\tif (req.status === 200) {\n\t\t\t\t\t\t\tresolve(req.responseText);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treject(req.statusText);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\treq.onerror = function() {\n\t\t\t\t\t\treject(req.statusText);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\tif (req.overrideMimeType)\n\t\t\t\treq.overrideMimeType(\"text/plain; charset=\" + charset);\n\t\t\n\t\t\treq.send(null);\n\t\t\t\n\t\t\treturn async ? promise : req.responseText;\n\t\t}\n\t\telse if (typeof require !== 'undefined') {\n\t\t\t// Node.js\n\t\t\tvar fs = require(\"fs\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif (fs.existsSync(path)) {\n\t\t\t\t\tvar stats = fs.statSync(path);\n\t\t\t\t\t\n\t\t\t\t\tvar fileDescriptor = fs.openSync(path, 'r');\n\t\t\t\t\t\n\t\t\t\t\tvar buffer = new Buffer(stats.size);\n\t\t\t\t\t\n\t\t\t\t\tfs.readSync(fileDescriptor, buffer, 0, buffer.length, null);\n\t\t\t\t\t\n\t\t\t\t\treturn buffer.toString(charset, 0, buffer.length);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconsole.log(\"Path \" + path + \" does not exist.\");\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.log(e);\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Parse the rules out from a .aff file.\n\t *\n\t * @param {String} data The contents of the affix file.\n\t * @returns object The rules from the file.\n\t */\n\t\n\t_parseAFF : function (data) {\n\t\tvar rules = {};\n\t\t\n\t\tvar line, subline, numEntries, lineParts;\n\t\tvar i, j, _len, _jlen;\n\t\t\n\t\t// Remove comment lines\n\t\tdata = this._removeAffixComments(data);\n\t\t\n\t\tvar lines = data.split(\"\\n\");\n\t\t\n\t\tfor (i = 0, _len = lines.length; i < _len; i++) {\n\t\t\tline = lines[i];\n\t\t\t\n\t\t\tvar definitionParts = line.split(/\\s+/);\n\t\t\t\n\t\t\tvar ruleType = definitionParts[0];\n\t\t\t\n\t\t\tif (ruleType == \"PFX\" || ruleType == \"SFX\") {\n\t\t\t\tvar ruleCode = definitionParts[1];\n\t\t\t\tvar combineable = definitionParts[2];\n\t\t\t\tnumEntries = parseInt(definitionParts[3], 10);\n\t\t\t\t\n\t\t\t\tvar entries = [];\n\t\t\t\t\n\t\t\t\tfor (j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n\t\t\t\t\tsubline = lines[j];\n\t\t\t\t\t\n\t\t\t\t\tlineParts = subline.split(/\\s+/);\n\t\t\t\t\tvar charactersToRemove = lineParts[2];\n\t\t\t\t\t\n\t\t\t\t\tvar additionParts = lineParts[3].split(\"/\");\n\t\t\t\t\t\n\t\t\t\t\tvar charactersToAdd = additionParts[0];\n\t\t\t\t\tif (charactersToAdd === \"0\") charactersToAdd = \"\";\n\t\t\t\t\t\n\t\t\t\t\tvar continuationClasses = this.parseRuleCodes(additionParts[1]);\n\t\t\t\t\t\n\t\t\t\t\tvar regexToMatch = lineParts[4];\n\t\t\t\t\t\n\t\t\t\t\tvar entry = {};\n\t\t\t\t\tentry.add = charactersToAdd;\n\t\t\t\t\t\n\t\t\t\t\tif (continuationClasses.length > 0) entry.continuationClasses = continuationClasses;\n\t\t\t\t\t\n\t\t\t\t\tif (regexToMatch !== \".\") {\n\t\t\t\t\t\tif (ruleType === \"SFX\") {\n\t\t\t\t\t\t\tentry.match = new RegExp(regexToMatch + \"$\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tentry.match = new RegExp(\"^\" + regexToMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (charactersToRemove != \"0\") {\n\t\t\t\t\t\tif (ruleType === \"SFX\") {\n\t\t\t\t\t\t\tentry.remove = new RegExp(charactersToRemove + \"$\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tentry.remove = charactersToRemove;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tentries.push(entry);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trules[ruleCode] = { \"type\" : ruleType, \"combineable\" : (combineable == \"Y\"), \"entries\" : entries };\n\t\t\t\t\n\t\t\t\ti += numEntries;\n\t\t\t}\n\t\t\telse if (ruleType === \"COMPOUNDRULE\") {\n\t\t\t\tnumEntries = parseInt(definitionParts[1], 10);\n\t\t\t\t\n\t\t\t\tfor (j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n\t\t\t\t\tline = lines[j];\n\t\t\t\t\t\n\t\t\t\t\tlineParts = line.split(/\\s+/);\n\t\t\t\t\tthis.compoundRules.push(lineParts[1]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ti += numEntries;\n\t\t\t}\n\t\t\telse if (ruleType === \"REP\") {\n\t\t\t\tlineParts = line.split(/\\s+/);\n\t\t\t\t\n\t\t\t\tif (lineParts.length === 3) {\n\t\t\t\t\tthis.replacementTable.push([ lineParts[1], lineParts[2] ]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// ONLYINCOMPOUND\n\t\t\t\t// COMPOUNDMIN\n\t\t\t\t// FLAG\n\t\t\t\t// KEEPCASE\n\t\t\t\t// NEEDAFFIX\n\t\t\t\t\n\t\t\t\tthis.flags[ruleType] = definitionParts[1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn rules;\n\t},\n\t\n\t/**\n\t * Removes comment lines and then cleans up blank lines and trailing whitespace.\n\t *\n\t * @param {String} data The data from an affix file.\n\t * @return {String} The cleaned-up data.\n\t */\n\t\n\t_removeAffixComments : function (data) {\n\t\t// Remove comments\n\t\t// This used to remove any string starting with '#' up to the end of the line,\n\t\t// but some COMPOUNDRULE definitions include '#' as part of the rule.\n\t\t// I haven't seen any affix files that use comments on the same line as real data,\n\t\t// so I don't think this will break anything.\n\t\tdata = data.replace(/^\\s*#.*$/mg, \"\");\n\t\t\n\t\t// Trim each line\n\t\tdata = data.replace(/^\\s\\s*/m, '').replace(/\\s\\s*$/m, '');\n\t\t\n\t\t// Remove blank lines.\n\t\tdata = data.replace(/\\n{2,}/g, \"\\n\");\n\t\t\n\t\t// Trim the entire string\n\t\tdata = data.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\t\t\n\t\treturn data;\n\t},\n\t\n\t/**\n\t * Parses the words out from the .dic file.\n\t *\n\t * @param {String} data The data from the dictionary file.\n\t * @returns object The lookup table containing all of the words and\n\t * word forms from the dictionary.\n\t */\n\t\n\t_parseDIC : function (data) {\n\t\tdata = this._removeDicComments(data);\n\t\t\n\t\tvar lines = data.split(\"\\n\");\n\t\tvar dictionaryTable = {};\n\t\t\n\t\tfunction addWord(word, rules) {\n\t\t\t// Some dictionaries will list the same word multiple times with different rule sets.\n\t\t\tif (!dictionaryTable.hasOwnProperty(word)) {\n\t\t\t\tdictionaryTable[word] = null;\n\t\t\t}\n\t\t\t\n\t\t\tif (rules.length > 0) {\n\t\t\t\tif (dictionaryTable[word] === null) {\n\t\t\t\t\tdictionaryTable[word] = [];\n\t\t\t\t}\n\n\t\t\t\tdictionaryTable[word].push(rules);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// The first line is the number of words in the dictionary.\n\t\tfor (var i = 1, _len = lines.length; i < _len; i++) {\n\t\t\tvar line = lines[i];\n\t\t\t\n\t\t\tvar parts = line.split(\"/\", 2);\n\t\t\t\n\t\t\tvar word = parts[0];\n\n\t\t\t// Now for each affix rule, generate that form of the word.\n\t\t\tif (parts.length > 1) {\n\t\t\t\tvar ruleCodesArray = this.parseRuleCodes(parts[1]);\n\t\t\t\t\n\t\t\t\t// Save the ruleCodes for compound word situations.\n\t\t\t\tif (!(\"NEEDAFFIX\" in this.flags) || ruleCodesArray.indexOf(this.flags.NEEDAFFIX) == -1) {\n\t\t\t\t\taddWord(word, ruleCodesArray);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var j = 0, _jlen = ruleCodesArray.length; j < _jlen; j++) {\n\t\t\t\t\tvar code = ruleCodesArray[j];\n\t\t\t\t\t\n\t\t\t\t\tvar rule = this.rules[code];\n\t\t\t\t\t\n\t\t\t\t\tif (rule) {\n\t\t\t\t\t\tvar newWords = this._applyRule(word, rule);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var ii = 0, _iilen = newWords.length; ii < _iilen; ii++) {\n\t\t\t\t\t\t\tvar newWord = newWords[ii];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\taddWord(newWord, []);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (rule.combineable) {\n\t\t\t\t\t\t\t\tfor (var k = j + 1; k < _jlen; k++) {\n\t\t\t\t\t\t\t\t\tvar combineCode = ruleCodesArray[k];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tvar combineRule = this.rules[combineCode];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (combineRule) {\n\t\t\t\t\t\t\t\t\t\tif (combineRule.combineable && (rule.type != combineRule.type)) {\n\t\t\t\t\t\t\t\t\t\t\tvar otherNewWords = this._applyRule(newWord, combineRule);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor (var iii = 0, _iiilen = otherNewWords.length; iii < _iiilen; iii++) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar otherNewWord = otherNewWords[iii];\n\t\t\t\t\t\t\t\t\t\t\t\taddWord(otherNewWord, []);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (code in this.compoundRuleCodes) {\n\t\t\t\t\t\tthis.compoundRuleCodes[code].push(word);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\taddWord(word.trim(), []);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dictionaryTable;\n\t},\n\t\n\t\n\t/**\n\t * Removes comment lines and then cleans up blank lines and trailing whitespace.\n\t *\n\t * @param {String} data The data from a .dic file.\n\t * @return {String} The cleaned-up data.\n\t */\n\t\n\t_removeDicComments : function (data) {\n\t\t// I can't find any official documentation on it, but at least the de_DE\n\t\t// dictionary uses tab-indented lines as comments.\n\t\t\n\t\t// Remove comments\n\t\tdata = data.replace(/^\\t.*$/mg, \"\");\n\t\t\n\t\treturn data;\n\t},\n\t\n\tparseRuleCodes : function (textCodes) {\n\t\tif (!textCodes) {\n\t\t\treturn [];\n\t\t}\n\t\telse if (!(\"FLAG\" in this.flags)) {\n\t\t\treturn textCodes.split(\"\");\n\t\t}\n\t\telse if (this.flags.FLAG === \"long\") {\n\t\t\tvar flags = [];\n\t\t\t\n\t\t\tfor (var i = 0, _len = textCodes.length; i < _len; i += 2) {\n\t\t\t\tflags.push(textCodes.substr(i, 2));\n\t\t\t}\n\t\t\t\n\t\t\treturn flags;\n\t\t}\n\t\telse if (this.flags.FLAG === \"num\") {\n\t\t\treturn textCodes.split(\",\");\n\t\t}\n\t},\n\t\n\t/**\n\t * Applies an affix rule to a word.\n\t *\n\t * @param {String} word The base word.\n\t * @param {Object} rule The affix rule.\n\t * @returns {String[]} The new words generated by the rule.\n\t */\n\t\n\t_applyRule : function (word, rule) {\n\t\tvar entries = rule.entries;\n\t\tvar newWords = [];\n\t\t\n\t\tfor (var i = 0, _len = entries.length; i < _len; i++) {\n\t\t\tvar entry = entries[i];\n\t\t\t\n\t\t\tif (!entry.match || word.match(entry.match)) {\n\t\t\t\tvar newWord = word;\n\t\t\t\t\n\t\t\t\tif (entry.remove) {\n\t\t\t\t\tnewWord = newWord.replace(entry.remove, \"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (rule.type === \"SFX\") {\n\t\t\t\t\tnewWord = newWord + entry.add;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewWord = entry.add + newWord;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnewWords.push(newWord);\n\t\t\t\t\n\t\t\t\tif (\"continuationClasses\" in entry) {\n\t\t\t\t\tfor (var j = 0, _jlen = entry.continuationClasses.length; j < _jlen; j++) {\n\t\t\t\t\t\tvar continuationRule = this.rules[entry.continuationClasses[j]];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (continuationRule) {\n\t\t\t\t\t\t\tnewWords = newWords.concat(this._applyRule(newWord, continuationRule));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// This shouldn't happen, but it does, at least in the de_DE dictionary.\n\t\t\t\t\t\t\t// I think the author mistakenly supplied lower-case rule codes instead \n\t\t\t\t\t\t\t// of upper-case.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newWords;\n\t},\n\t\n\t/**\n\t * Checks whether a word or a capitalization variant exists in the current dictionary.\n\t * The word is trimmed and several variations of capitalizations are checked.\n\t * If you want to check a word without any changes made to it, call checkExact()\n\t *\n\t * @see http://blog.stevenlevithan.com/archives/faster-trim-javascript re:trimming function\n\t *\n\t * @param {String} aWord The word to check.\n\t * @returns {Boolean}\n\t */\n\t\n\tcheck : function (aWord) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\t\t\n\t\t// Remove leading and trailing whitespace\n\t\tvar trimmedWord = aWord.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\t\t\n\t\tif (this.checkExact(trimmedWord)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// The exact word is not in the dictionary.\n\t\tif (trimmedWord.toUpperCase() === trimmedWord) {\n\t\t\t// The word was supplied in all uppercase.\n\t\t\t// Check for a capitalized form of the word.\n\t\t\tvar capitalizedWord = trimmedWord[0] + trimmedWord.substring(1).toLowerCase();\n\t\t\t\n\t\t\tif (this.hasFlag(capitalizedWord, \"KEEPCASE\")) {\n\t\t\t\t// Capitalization variants are not allowed for this word.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.checkExact(capitalizedWord)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar lowercaseWord = trimmedWord.toLowerCase();\n\t\t\n\t\tif (lowercaseWord !== trimmedWord) {\n\t\t\tif (this.hasFlag(lowercaseWord, \"KEEPCASE\")) {\n\t\t\t\t// Capitalization variants are not allowed for this word.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Check for a lowercase form\n\t\t\tif (this.checkExact(lowercaseWord)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t},\n\t\n\t/**\n\t * Checks whether a word exists in the current dictionary.\n\t *\n\t * @param {String} word The word to check.\n\t * @returns {Boolean}\n\t */\n\t\n\tcheckExact : function (word) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\n\t\tvar ruleCodes = this.dictionaryTable[word];\n\t\t\n\t\tvar i, _len;\n\t\t\n\t\tif (typeof ruleCodes === 'undefined') {\n\t\t\t// Check if this might be a compound word.\n\t\t\tif (\"COMPOUNDMIN\" in this.flags && word.length >= this.flags.COMPOUNDMIN) {\n\t\t\t\tfor (i = 0, _len = this.compoundRules.length; i < _len; i++) {\n\t\t\t\t\tif (word.match(this.compoundRules[i])) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (ruleCodes === null) {\n\t\t\t// a null (but not undefined) value for an entry in the dictionary table\n\t\t\t// means that the word is in the dictionary but has no flags.\n\t\t\treturn true;\n\t\t}\n\t\telse if (typeof ruleCodes === 'object') { // this.dictionary['hasOwnProperty'] will be a function.\n\t\t\tfor (i = 0, _len = ruleCodes.length; i < _len; i++) {\n\t\t\t\tif (!this.hasFlag(word, \"ONLYINCOMPOUND\", ruleCodes[i])) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\t\n\t/**\n\t * Looks up whether a given word is flagged with a given flag.\n\t *\n\t * @param {String} word The word in question.\n\t * @param {String} flag The flag in question.\n\t * @return {Boolean}\n\t */\n\t \n\thasFlag : function (word, flag, wordFlags) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\n\t\tif (flag in this.flags) {\n\t\t\tif (typeof wordFlags === 'undefined') {\n\t\t\t\twordFlags = Array.prototype.concat.apply([], this.dictionaryTable[word]);\n\t\t\t}\n\t\t\t\n\t\t\tif (wordFlags && wordFlags.indexOf(this.flags[flag]) !== -1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t},\n\t\n\t/**\n\t * Returns a list of suggestions for a misspelled word.\n\t *\n\t * @see http://www.norvig.com/spell-correct.html for the basis of this suggestor.\n\t * This suggestor is primitive, but it works.\n\t *\n\t * @param {String} word The misspelling.\n\t * @param {Number} [limit=5] The maximum number of suggestions to return.\n\t * @returns {String[]} The array of suggestions.\n\t */\n\t\n\talphabet : \"\",\n\t\n\tsuggest : function (word, limit) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\n\t\tlimit = limit || 5;\n\n\t\tif (this.memoized.hasOwnProperty(word)) {\n\t\t\tvar memoizedLimit = this.memoized[word]['limit'];\n\n\t\t\t// Only return the cached list if it's big enough or if there weren't enough suggestions\n\t\t\t// to fill a smaller limit.\n\t\t\tif (limit <= memoizedLimit || this.memoized[word]['suggestions'].length < memoizedLimit) {\n\t\t\t\treturn this.memoized[word]['suggestions'].slice(0, limit);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.check(word)) return [];\n\t\t\n\t\t// Check the replacement table.\n\t\tfor (var i = 0, _len = this.replacementTable.length; i < _len; i++) {\n\t\t\tvar replacementEntry = this.replacementTable[i];\n\t\t\t\n\t\t\tif (word.indexOf(replacementEntry[0]) !== -1) {\n\t\t\t\tvar correctedWord = word.replace(replacementEntry[0], replacementEntry[1]);\n\t\t\t\t\n\t\t\t\tif (this.check(correctedWord)) {\n\t\t\t\t\treturn [ correctedWord ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar self = this;\n\t\tself.alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n\t\t\n\t\t/*\n\t\tif (!self.alphabet) {\n\t\t\t// Use the alphabet as implicitly defined by the words in the dictionary.\n\t\t\tvar alphaHash = {};\n\t\t\t\n\t\t\tfor (var i in self.dictionaryTable) {\n\t\t\t\tfor (var j = 0, _len = i.length; j < _len; j++) {\n\t\t\t\t\talphaHash[i[j]] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i in alphaHash) {\n\t\t\t\tself.alphabet += i;\n\t\t\t}\n\t\t\t\n\t\t\tvar alphaArray = self.alphabet.split(\"\");\n\t\t\talphaArray.sort();\n\t\t\tself.alphabet = alphaArray.join(\"\");\n\t\t}\n\t\t*/\n\t\t\n\t\tfunction edits1(words) {\n\t\t\tvar rv = [];\n\t\t\t\n\t\t\tvar ii, i, j, _iilen, _len, _jlen;\n\t\t\t\n\t\t\tfor (ii = 0, _iilen = words.length; ii < _iilen; ii++) {\n\t\t\t\tvar word = words[ii];\n\t\t\t\t\n\t\t\t\tfor (i = 0, _len = word.length + 1; i < _len; i++) {\n\t\t\t\t\tvar s = [ word.substring(0, i), word.substring(i) ];\n\t\t\t\t\n\t\t\t\t\tif (s[1]) {\n\t\t\t\t\t\trv.push(s[0] + s[1].substring(1));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Eliminate transpositions of identical letters\n\t\t\t\t\tif (s[1].length > 1 && s[1][1] !== s[1][0]) {\n\t\t\t\t\t\trv.push(s[0] + s[1][1] + s[1][0] + s[1].substring(2));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (s[1]) {\n\t\t\t\t\t\tfor (j = 0, _jlen = self.alphabet.length; j < _jlen; j++) {\n\t\t\t\t\t\t\t// Eliminate replacement of a letter by itself\n\t\t\t\t\t\t\tif (self.alphabet[j] != s[1].substring(0,1)){\n\t\t\t\t\t\t\t\trv.push(s[0] + self.alphabet[j] + s[1].substring(1));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (s[1]) {\n\t\t\t\t\t\tfor (j = 0, _jlen = self.alphabet.length; j < _jlen; j++) {\n\t\t\t\t\t\t\trv.push(s[0] + self.alphabet[j] + s[1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn rv;\n\t\t}\n\t\t\n\t\tfunction known(words) {\n\t\t\tvar rv = [];\n\t\t\t\n\t\t\tfor (var i = 0, _len = words.length; i < _len; i++) {\n\t\t\t\tif (self.check(words[i])) {\n\t\t\t\t\trv.push(words[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn rv;\n\t\t}\n\t\t\n\t\tfunction correct(word) {\n\t\t\t// Get the edit-distance-1 and edit-distance-2 forms of this word.\n\t\t\tvar ed1 = edits1([word]);\n\t\t\tvar ed2 = edits1(ed1);\n\t\t\t\n\t\t\tvar corrections = known(ed1.concat(ed2));\n\t\t\t\n\t\t\tvar i, _len;\n\t\t\t\n\t\t\t// Sort the edits based on how many different ways they were created.\n\t\t\tvar weighted_corrections = {};\n\t\t\t\n\t\t\tfor (i = 0, _len = corrections.length; i < _len; i++) {\n\t\t\t\tif (!(corrections[i] in weighted_corrections)) {\n\t\t\t\t\tweighted_corrections[corrections[i]] = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tweighted_corrections[corrections[i]] += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar sorted_corrections = [];\n\t\t\t\n\t\t\tfor (i in weighted_corrections) {\n\t\t\t\tif (weighted_corrections.hasOwnProperty(i)) {\n\t\t\t\t\tsorted_corrections.push([ i, weighted_corrections[i] ]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunction sorter(a, b) {\n\t\t\t\tif (a[1] < b[1]) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\tsorted_corrections.sort(sorter).reverse();\n\t\t\t\n\t\t\tvar rv = [];\n\n\t\t\tvar capitalization_scheme = \"lowercase\";\n\t\t\t\n\t\t\tif (word.toUpperCase() === word) {\n\t\t\t\tcapitalization_scheme = \"uppercase\";\n\t\t\t}\n\t\t\telse if (word.substr(0, 1).toUpperCase() + word.substr(1).toLowerCase() === word) {\n\t\t\t\tcapitalization_scheme = \"capitalized\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (i = 0, _len = Math.min(limit, sorted_corrections.length); i < _len; i++) {\n\t\t\t\tif (\"uppercase\" === capitalization_scheme) {\n\t\t\t\t\tsorted_corrections[i][0] = sorted_corrections[i][0].toUpperCase();\n\t\t\t\t}\n\t\t\t\telse if (\"capitalized\" === capitalization_scheme) {\n\t\t\t\t\tsorted_corrections[i][0] = sorted_corrections[i][0].substr(0, 1).toUpperCase() + sorted_corrections[i][0].substr(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!self.hasFlag(sorted_corrections[i][0], \"NOSUGGEST\")) {\n\t\t\t\t\trv.push(sorted_corrections[i][0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn rv;\n\t\t}\n\t\t\n\t\tthis.memoized[word] = {\n\t\t\t'suggestions': correct(word),\n\t\t\t'limit': limit\n\t\t};\n\n\t\treturn this.memoized[word]['suggestions'];\n\t}\n};\n})();\n\n// Support for use as a node.js module.\nif (typeof module !== 'undefined') {\n\tmodule.exports = Typo;\n}","/**\n * marked - a markdown parser\n * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n;(function(root) {\n'use strict';\n\n/**\n * Block-Level Grammar\n */\n\nvar block = {\n newline: /^\\n+/,\n code: /^( {4}[^\\n]+\\n*)+/,\n fences: /^ {0,3}(`{3,}|~{3,})([^`~\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~`]* *(?:\\n+|$)|$)/,\n hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6}) +([^\\n]*?)(?: +#+)? *(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3})(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?!\\1bull )\\n*|\\s*$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?\\\\?>\\\\n*' // (3)\n + '|<![A-Z][\\\\s\\\\S]*?>\\\\n*' // (4)\n + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\\\\n*' // (5)\n + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n + '|</(?!script|pre|style)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *\\n? *<?([^\\s>]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n nptable: noop,\n table: noop,\n lheading: /^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\n\nblock._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def)\n .replace('label', block._label)\n .replace('title', block._title)\n .getRegex();\n\nblock.bullet = /(?:[*+-]|\\d{1,9}\\.)/;\nblock.item = /^( *)(bull) ?[^\\n]*(?:\\n(?!\\1bull ?)[^\\n]*)*/;\nblock.item = edit(block.item, 'gm')\n .replace(/bull/g, block.bullet)\n .getRegex();\n\nblock.list = edit(block.list)\n .replace(/bull/g, block.bullet)\n .replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))')\n .replace('def', '\\\\n+(?=' + block.def.source + ')')\n .getRegex();\n\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n + '|track|ul';\nblock._comment = /<!--(?!-?>)[\\s\\S]*?-->/;\nblock.html = edit(block.html, 'i')\n .replace('comment', block._comment)\n .replace('tag', block._tag)\n .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n .getRegex();\n\nblock.paragraph = edit(block._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} +')\n .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}|~{3,})[^`\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|!--)')\n .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n\nblock.blockquote = edit(block.blockquote)\n .replace('paragraph', block.paragraph)\n .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = merge({}, block);\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = merge({}, block.normal, {\n nptable: /^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:.*[^>\\n ].*(?:\\n|$))*)\\n*|$)/,\n table: /^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n((?: *[^>\\n ].*(?:\\n|$))*)\\n*|$)/\n});\n\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nblock.pedantic = merge({}, block.normal, {\n html: edit(\n '^ *(?:comment *(?:\\\\n|\\\\s*$)'\n + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n .replace('comment', block._comment)\n .replace(/tag/g, '(?!(?:'\n + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n .getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^ *(#{1,6}) *([^\\n]+?) *(?:#+ *)?(?:\\n+|$)/,\n fences: noop, // fences not supported\n paragraph: edit(block.normal._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' *#{1,6} *[^\\n]')\n .replace('lheading', block.lheading)\n .replace('blockquote', ' {0,3}>')\n .replace('|fences', '')\n .replace('|list', '')\n .replace('|html', '')\n .getRegex()\n});\n\n/**\n * Block Lexer\n */\n\nfunction Lexer(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || marked.defaults;\n this.rules = block.normal;\n\n if (this.options.pedantic) {\n this.rules = block.pedantic;\n } else if (this.options.gfm) {\n this.rules = block.gfm;\n }\n}\n\n/**\n * Expose Block Rules\n */\n\nLexer.rules = block;\n\n/**\n * Static Lex Method\n */\n\nLexer.lex = function(src, options) {\n var lexer = new Lexer(options);\n return lexer.lex(src);\n};\n\n/**\n * Preprocessing\n */\n\nLexer.prototype.lex = function(src) {\n src = src\n .replace(/\\r\\n|\\r/g, '\\n')\n .replace(/\\t/g, ' ')\n .replace(/\\u00a0/g, ' ')\n .replace(/\\u2424/g, '\\n');\n\n return this.token(src, true);\n};\n\n/**\n * Lexing\n */\n\nLexer.prototype.token = function(src, top) {\n src = src.replace(/^ +$/gm, '');\n var next,\n loose,\n cap,\n bull,\n b,\n item,\n listStart,\n listItems,\n t,\n space,\n i,\n tag,\n l,\n isordered,\n istask,\n ischecked;\n\n while (src) {\n // newline\n if (cap = this.rules.newline.exec(src)) {\n src = src.substring(cap[0].length);\n if (cap[0].length > 1) {\n this.tokens.push({\n type: 'space'\n });\n }\n }\n\n // code\n if (cap = this.rules.code.exec(src)) {\n var lastToken = this.tokens[this.tokens.length - 1];\n src = src.substring(cap[0].length);\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && lastToken.type === 'paragraph') {\n lastToken.text += '\\n' + cap[0].trimRight();\n } else {\n cap = cap[0].replace(/^ {4}/gm, '');\n this.tokens.push({\n type: 'code',\n codeBlockStyle: 'indented',\n text: !this.options.pedantic\n ? rtrim(cap, '\\n')\n : cap\n });\n }\n continue;\n }\n\n // fences\n if (cap = this.rules.fences.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'code',\n lang: cap[2] ? cap[2].trim() : cap[2],\n text: cap[3] || ''\n });\n continue;\n }\n\n // heading\n if (cap = this.rules.heading.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'heading',\n depth: cap[1].length,\n text: cap[2]\n });\n continue;\n }\n\n // table no leading pipe (gfm)\n if (cap = this.rules.nptable.exec(src)) {\n item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n src = src.substring(cap[0].length);\n\n for (i = 0; i < item.align.length; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n for (i = 0; i < item.cells.length; i++) {\n item.cells[i] = splitCells(item.cells[i], item.header.length);\n }\n\n this.tokens.push(item);\n\n continue;\n }\n }\n\n // hr\n if (cap = this.rules.hr.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'hr'\n });\n continue;\n }\n\n // blockquote\n if (cap = this.rules.blockquote.exec(src)) {\n src = src.substring(cap[0].length);\n\n this.tokens.push({\n type: 'blockquote_start'\n });\n\n cap = cap[0].replace(/^ *> ?/gm, '');\n\n // Pass `top` to keep the current\n // \"toplevel\" state. This is exactly\n // how markdown.pl works.\n this.token(cap, top);\n\n this.tokens.push({\n type: 'blockquote_end'\n });\n\n continue;\n }\n\n // list\n if (cap = this.rules.list.exec(src)) {\n src = src.substring(cap[0].length);\n bull = cap[2];\n isordered = bull.length > 1;\n\n listStart = {\n type: 'list_start',\n ordered: isordered,\n start: isordered ? +bull : '',\n loose: false\n };\n\n this.tokens.push(listStart);\n\n // Get each top-level item.\n cap = cap[0].match(this.rules.item);\n\n listItems = [];\n next = false;\n l = cap.length;\n i = 0;\n\n for (; i < l; i++) {\n item = cap[i];\n\n // Remove the list item's bullet\n // so it is seen as the next token.\n space = item.length;\n item = item.replace(/^ *([*+-]|\\d+\\.) */, '');\n\n // Outdent whatever the\n // list item contains. Hacky.\n if (~item.indexOf('\\n ')) {\n space -= item.length;\n item = !this.options.pedantic\n ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')\n : item.replace(/^ {1,4}/gm, '');\n }\n\n // Determine whether the next list item belongs here.\n // Backpedal if it does not belong in this list.\n if (i !== l - 1) {\n b = block.bullet.exec(cap[i + 1])[0];\n if (bull.length > 1 ? b.length === 1\n : (b.length > 1 || (this.options.smartLists && b !== bull))) {\n src = cap.slice(i + 1).join('\\n') + src;\n i = l - 1;\n }\n }\n\n // Determine whether item is loose or not.\n // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n // for discount behavior.\n loose = next || /\\n\\n(?!\\s*$)/.test(item);\n if (i !== l - 1) {\n next = item.charAt(item.length - 1) === '\\n';\n if (!loose) loose = next;\n }\n\n if (loose) {\n listStart.loose = true;\n }\n\n // Check for task list items\n istask = /^\\[[ xX]\\] /.test(item);\n ischecked = undefined;\n if (istask) {\n ischecked = item[1] !== ' ';\n item = item.replace(/^\\[[ xX]\\] +/, '');\n }\n\n t = {\n type: 'list_item_start',\n task: istask,\n checked: ischecked,\n loose: loose\n };\n\n listItems.push(t);\n this.tokens.push(t);\n\n // Recurse.\n this.token(item, false);\n\n this.tokens.push({\n type: 'list_item_end'\n });\n }\n\n if (listStart.loose) {\n l = listItems.length;\n i = 0;\n for (; i < l; i++) {\n listItems[i].loose = true;\n }\n }\n\n this.tokens.push({\n type: 'list_end'\n });\n\n continue;\n }\n\n // html\n if (cap = this.rules.html.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: this.options.sanitize\n ? 'paragraph'\n : 'html',\n pre: !this.options.sanitizer\n && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0])) : cap[0]\n });\n continue;\n }\n\n // def\n if (top && (cap = this.rules.def.exec(src))) {\n src = src.substring(cap[0].length);\n if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n if (!this.tokens.links[tag]) {\n this.tokens.links[tag] = {\n href: cap[2],\n title: cap[3]\n };\n }\n continue;\n }\n\n // table (gfm)\n if (cap = this.rules.table.exec(src)) {\n item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n src = src.substring(cap[0].length);\n\n for (i = 0; i < item.align.length; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n for (i = 0; i < item.cells.length; i++) {\n item.cells[i] = splitCells(\n item.cells[i].replace(/^ *\\| *| *\\| *$/g, ''),\n item.header.length);\n }\n\n this.tokens.push(item);\n\n continue;\n }\n }\n\n // lheading\n if (cap = this.rules.lheading.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'heading',\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1]\n });\n continue;\n }\n\n // top-level paragraph\n if (top && (cap = this.rules.paragraph.exec(src))) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'paragraph',\n text: cap[1].charAt(cap[1].length - 1) === '\\n'\n ? cap[1].slice(0, -1)\n : cap[1]\n });\n continue;\n }\n\n // text\n if (cap = this.rules.text.exec(src)) {\n // Top-level should never reach here.\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'text',\n text: cap[0]\n });\n continue;\n }\n\n if (src) {\n throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));\n }\n }\n\n return this.tokens;\n};\n\n/**\n * Inline-Level Grammar\n */\n\nvar inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noop,\n tag: '^comment'\n + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>', // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(?!\\s*\\])((?:\\\\[\\[\\]]?|[^\\[\\]\\\\])+)\\]/,\n nolink: /^!?\\[(?!\\s*\\])((?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]|[^\\[\\]])*)\\](?:\\[\\])?/,\n strong: /^__([^\\s_])__(?!_)|^\\*\\*([^\\s*])\\*\\*(?!\\*)|^__([^\\s][\\s\\S]*?[^\\s])__(?!_)|^\\*\\*([^\\s][\\s\\S]*?[^\\s])\\*\\*(?!\\*)/,\n em: /^_([^\\s_])_(?!_)|^\\*([^\\s*<\\[])\\*(?!\\*)|^_([^\\s<][\\s\\S]*?[^\\s_])_(?!_|[^\\spunctuation])|^_([^\\s_<][\\s\\S]*?[^\\s])_(?!_|[^\\spunctuation])|^\\*([^\\s<\"][\\s\\S]*?[^\\s\\*])\\*(?!\\*|[^\\spunctuation])|^\\*([^\\s*\"<\\[][\\s\\S]*?[^\\s])\\*(?!\\*)/,\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noop,\n text: /^(`+|[^`])(?:[\\s\\S]*?(?:(?=[\\\\<!\\[`*]|\\b_|$)|[^ ](?= {2,}\\n))|(?= {2,}\\n))/\n};\n\n// list of punctuation marks from common mark spec\n// without ` and ] to workaround Rule 17 (inline code blocks/links)\ninline._punctuation = '!\"#$%&\\'()*+,\\\\-./:;<=>?@\\\\[^_{|}~';\ninline.em = edit(inline.em).replace(/punctuation/g, inline._punctuation).getRegex();\n\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[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-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink)\n .replace('scheme', inline._scheme)\n .replace('email', inline._email)\n .getRegex();\n\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n\ninline.tag = edit(inline.tag)\n .replace('comment', block._comment)\n .replace('attribute', inline._attribute)\n .getRegex();\n\ninline._label = /(?:\\[[^\\[\\]]*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\ninline._href = /<(?:\\\\[<>]?|[^\\s<>\\\\])*>|[^\\s\\x00-\\x1f]*/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n\ninline.link = edit(inline.link)\n .replace('label', inline._label)\n .replace('href', inline._href)\n .replace('title', inline._title)\n .getRegex();\n\ninline.reflink = edit(inline.reflink)\n .replace('label', inline._label)\n .getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = merge({}, inline);\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = merge({}, inline.normal, {\n strong: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n em: /^_(?=\\S)([\\s\\S]*?\\S)_(?!_)|^\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)/,\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n .replace('label', inline._label)\n .getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n .replace('label', inline._label)\n .getRegex()\n});\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = merge({}, inline.normal, {\n escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n del: /^~+(?=\\S)([\\s\\S]*?\\S)~+/,\n text: /^(`+|[^`])(?:[\\s\\S]*?(?:(?=[\\\\<!\\[`*~]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))|(?= {2,}\\n|[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))/\n});\n\ninline.gfm.url = edit(inline.gfm.url, 'i')\n .replace('email', inline.gfm._extended_email)\n .getRegex();\n/**\n * GFM + Line Breaks Inline Grammar\n */\n\ninline.breaks = merge({}, inline.gfm, {\n br: edit(inline.br).replace('{2,}', '*').getRegex(),\n text: edit(inline.gfm.text)\n .replace('\\\\b_', '\\\\b_| {2,}\\\\n')\n .replace(/\\{2,\\}/g, '*')\n .getRegex()\n});\n\n/**\n * Inline Lexer & Compiler\n */\n\nfunction InlineLexer(links, options) {\n this.options = options || marked.defaults;\n this.links = links;\n this.rules = inline.normal;\n this.renderer = this.options.renderer || new Renderer();\n this.renderer.options = this.options;\n\n if (!this.links) {\n throw new Error('Tokens array requires a `links` property.');\n }\n\n if (this.options.pedantic) {\n this.rules = inline.pedantic;\n } else if (this.options.gfm) {\n if (this.options.breaks) {\n this.rules = inline.breaks;\n } else {\n this.rules = inline.gfm;\n }\n }\n}\n\n/**\n * Expose Inline Rules\n */\n\nInlineLexer.rules = inline;\n\n/**\n * Static Lexing/Compiling Method\n */\n\nInlineLexer.output = function(src, links, options) {\n var inline = new InlineLexer(links, options);\n return inline.output(src);\n};\n\n/**\n * Lexing/Compiling\n */\n\nInlineLexer.prototype.output = function(src) {\n var out = '',\n link,\n text,\n href,\n title,\n cap,\n prevCapZero;\n\n while (src) {\n // escape\n if (cap = this.rules.escape.exec(src)) {\n src = src.substring(cap[0].length);\n out += escape(cap[1]);\n continue;\n }\n\n // tag\n if (cap = this.rules.tag.exec(src)) {\n if (!this.inLink && /^<a /i.test(cap[0])) {\n this.inLink = true;\n } else if (this.inLink && /^<\\/a>/i.test(cap[0])) {\n this.inLink = false;\n }\n if (!this.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.inRawBlock = true;\n } else if (this.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.inRawBlock = false;\n }\n\n src = src.substring(cap[0].length);\n out += this.options.sanitize\n ? this.options.sanitizer\n ? this.options.sanitizer(cap[0])\n : escape(cap[0])\n : cap[0];\n continue;\n }\n\n // link\n if (cap = this.rules.link.exec(src)) {\n var lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n var linkLen = 4 + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n src = src.substring(cap[0].length);\n this.inLink = true;\n href = cap[2];\n if (this.options.pedantic) {\n link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n } else {\n title = '';\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim().replace(/^<([\\s\\S]*)>$/, '$1');\n out += this.outputLink(cap, {\n href: InlineLexer.escapes(href),\n title: InlineLexer.escapes(title)\n });\n this.inLink = false;\n continue;\n }\n\n // reflink, nolink\n if ((cap = this.rules.reflink.exec(src))\n || (cap = this.rules.nolink.exec(src))) {\n src = src.substring(cap[0].length);\n link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = this.links[link.toLowerCase()];\n if (!link || !link.href) {\n out += cap[0].charAt(0);\n src = cap[0].substring(1) + src;\n continue;\n }\n this.inLink = true;\n out += this.outputLink(cap, link);\n this.inLink = false;\n continue;\n }\n\n // strong\n if (cap = this.rules.strong.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1]));\n continue;\n }\n\n // em\n if (cap = this.rules.em.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]));\n continue;\n }\n\n // code\n if (cap = this.rules.code.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.codespan(escape(cap[2].trim(), true));\n continue;\n }\n\n // br\n if (cap = this.rules.br.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.br();\n continue;\n }\n\n // del (gfm)\n if (cap = this.rules.del.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.del(this.output(cap[1]));\n continue;\n }\n\n // autolink\n if (cap = this.rules.autolink.exec(src)) {\n src = src.substring(cap[0].length);\n if (cap[2] === '@') {\n text = escape(this.mangle(cap[1]));\n href = 'mailto:' + text;\n } else {\n text = escape(cap[1]);\n href = text;\n }\n out += this.renderer.link(href, null, text);\n continue;\n }\n\n // url (gfm)\n if (!this.inLink && (cap = this.rules.url.exec(src))) {\n if (cap[2] === '@') {\n text = escape(cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + text;\n } else {\n href = text;\n }\n }\n src = src.substring(cap[0].length);\n out += this.renderer.link(href, null, text);\n continue;\n }\n\n // text\n if (cap = this.rules.text.exec(src)) {\n src = src.substring(cap[0].length);\n if (this.inRawBlock) {\n out += this.renderer.text(this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0])) : cap[0]);\n } else {\n out += this.renderer.text(escape(this.smartypants(cap[0])));\n }\n continue;\n }\n\n if (src) {\n throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));\n }\n }\n\n return out;\n};\n\nInlineLexer.escapes = function(text) {\n return text ? text.replace(InlineLexer.rules._escapes, '$1') : text;\n};\n\n/**\n * Compile Link\n */\n\nInlineLexer.prototype.outputLink = function(cap, link) {\n var href = link.href,\n title = link.title ? escape(link.title) : null;\n\n return cap[0].charAt(0) !== '!'\n ? this.renderer.link(href, title, this.output(cap[1]))\n : this.renderer.image(href, title, escape(cap[1]));\n};\n\n/**\n * Smartypants Transformations\n */\n\nInlineLexer.prototype.smartypants = function(text) {\n if (!this.options.smartypants) return text;\n return text\n // em-dashes\n .replace(/---/g, '\\u2014')\n // en-dashes\n .replace(/--/g, '\\u2013')\n // opening singles\n .replace(/(^|[-\\u2014/(\\[{\"\\s])'/g, '$1\\u2018')\n // closing singles & apostrophes\n .replace(/'/g, '\\u2019')\n // opening doubles\n .replace(/(^|[-\\u2014/(\\[{\\u2018\\s])\"/g, '$1\\u201c')\n // closing doubles\n .replace(/\"/g, '\\u201d')\n // ellipses\n .replace(/\\.{3}/g, '\\u2026');\n};\n\n/**\n * Mangle Links\n */\n\nInlineLexer.prototype.mangle = function(text) {\n if (!this.options.mangle) return text;\n var out = '',\n l = text.length,\n i = 0,\n ch;\n\n for (; i < l; i++) {\n ch = text.charCodeAt(i);\n if (Math.random() > 0.5) {\n ch = 'x' + ch.toString(16);\n }\n out += '&#' + ch + ';';\n }\n\n return out;\n};\n\n/**\n * Renderer\n */\n\nfunction Renderer(options) {\n this.options = options || marked.defaults;\n}\n\nRenderer.prototype.code = function(code, infostring, escaped) {\n var lang = (infostring || '').match(/\\S*/)[0];\n if (this.options.highlight) {\n var out = this.options.highlight(code, lang);\n if (out != null && out !== code) {\n escaped = true;\n code = out;\n }\n }\n\n if (!lang) {\n return '<pre><code>'\n + (escaped ? code : escape(code, true))\n + '</code></pre>';\n }\n\n return '<pre><code class=\"'\n + this.options.langPrefix\n + escape(lang, true)\n + '\">'\n + (escaped ? code : escape(code, true))\n + '</code></pre>\\n';\n};\n\nRenderer.prototype.blockquote = function(quote) {\n return '<blockquote>\\n' + quote + '</blockquote>\\n';\n};\n\nRenderer.prototype.html = function(html) {\n return html;\n};\n\nRenderer.prototype.heading = function(text, level, raw, slugger) {\n if (this.options.headerIds) {\n return '<h'\n + level\n + ' id=\"'\n + this.options.headerPrefix\n + slugger.slug(raw)\n + '\">'\n + text\n + '</h'\n + level\n + '>\\n';\n }\n // ignore IDs\n return '<h' + level + '>' + text + '</h' + level + '>\\n';\n};\n\nRenderer.prototype.hr = function() {\n return this.options.xhtml ? '<hr/>\\n' : '<hr>\\n';\n};\n\nRenderer.prototype.list = function(body, ordered, start) {\n var type = ordered ? 'ol' : 'ul',\n startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n return '<' + type + startatt + '>\\n' + body + '</' + type + '>\\n';\n};\n\nRenderer.prototype.listitem = function(text) {\n return '<li>' + text + '</li>\\n';\n};\n\nRenderer.prototype.checkbox = function(checked) {\n return '<input '\n + (checked ? 'checked=\"\" ' : '')\n + 'disabled=\"\" type=\"checkbox\"'\n + (this.options.xhtml ? ' /' : '')\n + '> ';\n};\n\nRenderer.prototype.paragraph = function(text) {\n return '<p>' + text + '</p>\\n';\n};\n\nRenderer.prototype.table = function(header, body) {\n if (body) body = '<tbody>' + body + '</tbody>';\n\n return '<table>\\n'\n + '<thead>\\n'\n + header\n + '</thead>\\n'\n + body\n + '</table>\\n';\n};\n\nRenderer.prototype.tablerow = function(content) {\n return '<tr>\\n' + content + '</tr>\\n';\n};\n\nRenderer.prototype.tablecell = function(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align\n ? '<' + type + ' align=\"' + flags.align + '\">'\n : '<' + type + '>';\n return tag + content + '</' + type + '>\\n';\n};\n\n// span level renderer\nRenderer.prototype.strong = function(text) {\n return '<strong>' + text + '</strong>';\n};\n\nRenderer.prototype.em = function(text) {\n return '<em>' + text + '</em>';\n};\n\nRenderer.prototype.codespan = function(text) {\n return '<code>' + text + '</code>';\n};\n\nRenderer.prototype.br = function() {\n return this.options.xhtml ? '<br/>' : '<br>';\n};\n\nRenderer.prototype.del = function(text) {\n return '<del>' + text + '</del>';\n};\n\nRenderer.prototype.link = function(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n var out = '<a href=\"' + escape(href) + '\"';\n if (title) {\n out += ' title=\"' + title + '\"';\n }\n out += '>' + text + '</a>';\n return out;\n};\n\nRenderer.prototype.image = function(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n\n var out = '<img src=\"' + href + '\" alt=\"' + text + '\"';\n if (title) {\n out += ' title=\"' + title + '\"';\n }\n out += this.options.xhtml ? '/>' : '>';\n return out;\n};\n\nRenderer.prototype.text = function(text) {\n return text;\n};\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\n\nfunction TextRenderer() {}\n\n// no need for block level renderers\n\nTextRenderer.prototype.strong =\nTextRenderer.prototype.em =\nTextRenderer.prototype.codespan =\nTextRenderer.prototype.del =\nTextRenderer.prototype.text = function(text) {\n return text;\n};\n\nTextRenderer.prototype.link =\nTextRenderer.prototype.image = function(href, title, text) {\n return '' + text;\n};\n\nTextRenderer.prototype.br = function() {\n return '';\n};\n\n/**\n * Parsing & Compiling\n */\n\nfunction Parser(options) {\n this.tokens = [];\n this.token = null;\n this.options = options || marked.defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.slugger = new Slugger();\n}\n\n/**\n * Static Parse Method\n */\n\nParser.parse = function(src, options) {\n var parser = new Parser(options);\n return parser.parse(src);\n};\n\n/**\n * Parse Loop\n */\n\nParser.prototype.parse = function(src) {\n this.inline = new InlineLexer(src.links, this.options);\n // use an InlineLexer with a TextRenderer to extract pure text\n this.inlineText = new InlineLexer(\n src.links,\n merge({}, this.options, { renderer: new TextRenderer() })\n );\n this.tokens = src.reverse();\n\n var out = '';\n while (this.next()) {\n out += this.tok();\n }\n\n return out;\n};\n\n/**\n * Next Token\n */\n\nParser.prototype.next = function() {\n this.token = this.tokens.pop();\n return this.token;\n};\n\n/**\n * Preview Next Token\n */\n\nParser.prototype.peek = function() {\n return this.tokens[this.tokens.length - 1] || 0;\n};\n\n/**\n * Parse Text Tokens\n */\n\nParser.prototype.parseText = function() {\n var body = this.token.text;\n\n while (this.peek().type === 'text') {\n body += '\\n' + this.next().text;\n }\n\n return this.inline.output(body);\n};\n\n/**\n * Parse Current Token\n */\n\nParser.prototype.tok = function() {\n switch (this.token.type) {\n case 'space': {\n return '';\n }\n case 'hr': {\n return this.renderer.hr();\n }\n case 'heading': {\n return this.renderer.heading(\n this.inline.output(this.token.text),\n this.token.depth,\n unescape(this.inlineText.output(this.token.text)),\n this.slugger);\n }\n case 'code': {\n return this.renderer.code(this.token.text,\n this.token.lang,\n this.token.escaped);\n }\n case 'table': {\n var header = '',\n body = '',\n i,\n row,\n cell,\n j;\n\n // header\n cell = '';\n for (i = 0; i < this.token.header.length; i++) {\n cell += this.renderer.tablecell(\n this.inline.output(this.token.header[i]),\n { header: true, align: this.token.align[i] }\n );\n }\n header += this.renderer.tablerow(cell);\n\n for (i = 0; i < this.token.cells.length; i++) {\n row = this.token.cells[i];\n\n cell = '';\n for (j = 0; j < row.length; j++) {\n cell += this.renderer.tablecell(\n this.inline.output(row[j]),\n { header: false, align: this.token.align[j] }\n );\n }\n\n body += this.renderer.tablerow(cell);\n }\n return this.renderer.table(header, body);\n }\n case 'blockquote_start': {\n body = '';\n\n while (this.next().type !== 'blockquote_end') {\n body += this.tok();\n }\n\n return this.renderer.blockquote(body);\n }\n case 'list_start': {\n body = '';\n var ordered = this.token.ordered,\n start = this.token.start;\n\n while (this.next().type !== 'list_end') {\n body += this.tok();\n }\n\n return this.renderer.list(body, ordered, start);\n }\n case 'list_item_start': {\n body = '';\n var loose = this.token.loose;\n var checked = this.token.checked;\n var task = this.token.task;\n\n if (this.token.task) {\n body += this.renderer.checkbox(checked);\n }\n\n while (this.next().type !== 'list_item_end') {\n body += !loose && this.token.type === 'text'\n ? this.parseText()\n : this.tok();\n }\n return this.renderer.listitem(body, task, checked);\n }\n case 'html': {\n // TODO parse inline content if parameter markdown=1\n return this.renderer.html(this.token.text);\n }\n case 'paragraph': {\n return this.renderer.paragraph(this.inline.output(this.token.text));\n }\n case 'text': {\n return this.renderer.paragraph(this.parseText());\n }\n default: {\n var errMsg = 'Token with \"' + this.token.type + '\" type was not found.';\n if (this.options.silent) {\n console.log(errMsg);\n } else {\n throw new Error(errMsg);\n }\n }\n }\n};\n\n/**\n * Slugger generates header id\n */\n\nfunction Slugger() {\n this.seen = {};\n}\n\n/**\n * Convert string to unique id\n */\n\nSlugger.prototype.slug = function(value) {\n var slug = value\n .toLowerCase()\n .trim()\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '')\n .replace(/\\s/g, '-');\n\n if (this.seen.hasOwnProperty(slug)) {\n var originalSlug = slug;\n do {\n this.seen[originalSlug]++;\n slug = originalSlug + '-' + this.seen[originalSlug];\n } while (this.seen.hasOwnProperty(slug));\n }\n this.seen[slug] = 0;\n\n return slug;\n};\n\n/**\n * Helpers\n */\n\nfunction escape(html, encode) {\n if (encode) {\n if (escape.escapeTest.test(html)) {\n return html.replace(escape.escapeReplace, function(ch) { return escape.replacements[ch]; });\n }\n } else {\n if (escape.escapeTestNoEncode.test(html)) {\n return html.replace(escape.escapeReplaceNoEncode, function(ch) { return escape.replacements[ch]; });\n }\n }\n\n return html;\n}\n\nescape.escapeTest = /[&<>\"']/;\nescape.escapeReplace = /[&<>\"']/g;\nescape.replacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n\nescape.escapeTestNoEncode = /[<>\"']|&(?!#?\\w+;)/;\nescape.escapeReplaceNoEncode = /[<>\"']|&(?!#?\\w+;)/g;\n\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig, function(_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x'\n ? String.fromCharCode(parseInt(n.substring(2), 16))\n : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\n\nfunction edit(regex, opt) {\n regex = regex.source || regex;\n opt = opt || '';\n return {\n replace: function(name, val) {\n val = val.source || val;\n val = val.replace(/(^|[^\\[])\\^/g, '$1');\n regex = regex.replace(name, val);\n return this;\n },\n getRegex: function() {\n return new RegExp(regex, opt);\n }\n };\n}\n\nfunction cleanUrl(sanitize, base, href) {\n if (sanitize) {\n try {\n var prot = decodeURIComponent(unescape(href))\n .replace(/[^\\w:]/g, '')\n .toLowerCase();\n } catch (e) {\n return null;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\n\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (/^[^:]+:\\/*[^/]*$/.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n\n if (href.slice(0, 2) === '//') {\n return base.replace(/:[\\s\\S]*/, ':') + href;\n } else if (href.charAt(0) === '/') {\n return base.replace(/(:\\/*[^/]*)[\\s\\S]*/, '$1') + href;\n } else {\n return base + href;\n }\n}\nvar baseUrls = {};\nvar originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\nfunction noop() {}\nnoop.exec = noop;\n\nfunction merge(obj) {\n var i = 1,\n target,\n key;\n\n for (; i < arguments.length; i++) {\n target = arguments[i];\n for (key in target) {\n if (Object.prototype.hasOwnProperty.call(target, key)) {\n obj[key] = target[key];\n }\n }\n }\n\n return obj;\n}\n\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function(match, offset, str) {\n var escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/),\n i = 0;\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n// Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n// /c*$/ is vulnerable to REDOS.\n// invert: Remove suffix of non-c chars instead. Default falsey.\nfunction rtrim(str, c, invert) {\n if (str.length === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n var suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < str.length) {\n var currChar = str.charAt(str.length - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.substr(0, str.length - suffLen);\n}\n\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n var level = 0;\n for (var i = 0; i < str.length; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\n\nfunction checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n}\n\n/**\n * Marked\n */\n\nfunction marked(src, opt, callback) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked(): input parameter is undefined or null');\n }\n if (typeof src !== 'string') {\n throw new Error('marked(): input parameter is of type '\n + Object.prototype.toString.call(src) + ', string expected');\n }\n\n if (callback || typeof opt === 'function') {\n if (!callback) {\n callback = opt;\n opt = null;\n }\n\n opt = merge({}, marked.defaults, opt || {});\n checkSanitizeDeprecation(opt);\n\n var highlight = opt.highlight,\n tokens,\n pending,\n i = 0;\n\n try {\n tokens = Lexer.lex(src, opt);\n } catch (e) {\n return callback(e);\n }\n\n pending = tokens.length;\n\n var done = function(err) {\n if (err) {\n opt.highlight = highlight;\n return callback(err);\n }\n\n var out;\n\n try {\n out = Parser.parse(tokens, opt);\n } catch (e) {\n err = e;\n }\n\n opt.highlight = highlight;\n\n return err\n ? callback(err)\n : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n\n if (!pending) return done();\n\n for (; i < tokens.length; i++) {\n (function(token) {\n if (token.type !== 'code') {\n return --pending || done();\n }\n return highlight(token.text, token.lang, function(err, code) {\n if (err) return done(err);\n if (code == null || code === token.text) {\n return --pending || done();\n }\n token.text = code;\n token.escaped = true;\n --pending || done();\n });\n })(tokens[i]);\n }\n\n return;\n }\n try {\n if (opt) opt = merge({}, marked.defaults, opt);\n checkSanitizeDeprecation(opt);\n return Parser.parse(Lexer.lex(src, opt), opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if ((opt || marked.defaults).silent) {\n return '<p>An error occurred:</p><pre>'\n + escape(e.message + '', true)\n + '</pre>';\n }\n throw e;\n }\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n merge(marked.defaults, opt);\n return marked;\n};\n\nmarked.getDefaults = function() {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: new Renderer(),\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n xhtml: false\n };\n};\n\nmarked.defaults = marked.getDefaults();\n\n/**\n * Expose\n */\n\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\n\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\n\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\n\nmarked.InlineLexer = InlineLexer;\nmarked.inlineLexer = InlineLexer.output;\n\nmarked.Slugger = Slugger;\n\nmarked.parse = marked;\n\nif (typeof module !== 'undefined' && typeof exports === 'object') {\n module.exports = marked;\n} else if (typeof define === 'function' && define.amd) {\n define(function() { return marked; });\n} else {\n root.marked = marked;\n}\n})(this || (typeof window !== 'undefined' ? window : global));\n","module.exports = function(hljs) {\n var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';\n var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';\n\n var AS3_REST_ARG_MODE = {\n className: 'rest_arg',\n begin: '[.]{3}', end: IDENT_RE,\n relevance: 10\n };\n\n return {\n aliases: ['as'],\n keywords: {\n keyword: 'as break case catch class const continue default delete do dynamic each ' +\n 'else extends final finally for function get if implements import in include ' +\n 'instanceof interface internal is namespace native new override package private ' +\n 'protected public return set static super switch this throw try typeof use var void ' +\n 'while with',\n literal: 'true false null undefined'\n },\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_NUMBER_MODE,\n {\n className: 'class',\n beginKeywords: 'package', end: '{',\n contains: [hljs.TITLE_MODE]\n },\n {\n className: 'class',\n beginKeywords: 'class interface', end: '{', excludeEnd: true,\n contains: [\n {\n beginKeywords: 'extends implements'\n },\n hljs.TITLE_MODE\n ]\n },\n {\n className: 'meta',\n beginKeywords: 'import include', end: ';',\n keywords: {'meta-keyword': 'import include'}\n },\n {\n className: 'function',\n beginKeywords: 'function', end: '[{;]', excludeEnd: true,\n illegal: '\\\\S',\n contains: [\n hljs.TITLE_MODE,\n {\n className: 'params',\n begin: '\\\\(', end: '\\\\)',\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AS3_REST_ARG_MODE\n ]\n },\n {\n begin: ':\\\\s*' + IDENT_FUNC_RETURN_TYPE_RE\n }\n ]\n },\n hljs.METHOD_GUARD\n ],\n illegal: /#/\n };\n};","module.exports = function(hljs) {\n var NUMBER = {className: 'number', begin: '[\\\\$%]\\\\d+'};\n return {\n aliases: ['apacheconf'],\n case_insensitive: true,\n contains: [\n hljs.HASH_COMMENT_MODE,\n {className: 'section', begin: '</?', end: '>'},\n {\n className: 'attribute',\n begin: /\\w+/,\n relevance: 0,\n // keywords aren’t needed for highlighting per se, they only boost relevance\n // for a very generally defined mode (starts with a word, ends with line-end\n keywords: {\n nomarkup:\n 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +\n 'sethandler errordocument loadmodule options header listen serverroot ' +\n 'servername'\n },\n starts: {\n end: /$/,\n relevance: 0,\n keywords: {\n literal: 'on off all'\n },\n contains: [\n {\n className: 'meta',\n begin: '\\\\s\\\\[', end: '\\\\]$'\n },\n {\n className: 'variable',\n begin: '[\\\\$%]\\\\{', end: '\\\\}',\n contains: ['self', NUMBER]\n },\n NUMBER,\n hljs.QUOTE_STRING_MODE\n ]\n }\n }\n ],\n illegal: /\\S/\n };\n};","module.exports = function(hljs) {\n var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''});\n var PARAMS = {\n className: 'params',\n begin: '\\\\(', end: '\\\\)',\n contains: ['self', hljs.C_NUMBER_MODE, STRING]\n };\n var COMMENT_MODE_1 = hljs.COMMENT('--', '$');\n var COMMENT_MODE_2 = hljs.COMMENT(\n '\\\\(\\\\*',\n '\\\\*\\\\)',\n {\n contains: ['self', COMMENT_MODE_1] //allow nesting\n }\n );\n var COMMENTS = [\n COMMENT_MODE_1,\n COMMENT_MODE_2,\n hljs.HASH_COMMENT_MODE\n ];\n\n return {\n aliases: ['osascript'],\n keywords: {\n keyword:\n 'about above after against and around as at back before beginning ' +\n 'behind below beneath beside between but by considering ' +\n 'contain contains continue copy div does eighth else end equal ' +\n 'equals error every exit fifth first for fourth from front ' +\n 'get given global if ignoring in into is it its last local me ' +\n 'middle mod my ninth not of on onto or over prop property put ref ' +\n 'reference repeat returning script second set seventh since ' +\n 'sixth some tell tenth that the|0 then third through thru ' +\n 'timeout times to transaction try until where while whose with ' +\n 'without',\n literal:\n 'AppleScript false linefeed return pi quote result space tab true',\n built_in:\n 'alias application boolean class constant date file integer list ' +\n 'number real record string text ' +\n 'activate beep count delay launch log offset read round ' +\n 'run say summarize write ' +\n 'character characters contents day frontmost id item length ' +\n 'month name paragraph paragraphs rest reverse running time version ' +\n 'weekday word words year'\n },\n contains: [\n STRING,\n hljs.C_NUMBER_MODE,\n {\n className: 'built_in',\n begin:\n '\\\\b(clipboard info|the clipboard|info for|list (disks|folder)|' +\n 'mount volume|path to|(close|open for) access|(get|set) eof|' +\n 'current date|do shell script|get volume settings|random number|' +\n 'set volume|system attribute|system info|time to GMT|' +\n '(load|run|store) script|scripting components|' +\n 'ASCII (character|number)|localized string|' +\n 'choose (application|color|file|file name|' +\n 'folder|from list|remote application|URL)|' +\n 'display (alert|dialog))\\\\b|^\\\\s*return\\\\b'\n },\n {\n className: 'literal',\n begin:\n '\\\\b(text item delimiters|current application|missing value)\\\\b'\n },\n {\n className: 'keyword',\n begin:\n '\\\\b(apart from|aside from|instead of|out of|greater than|' +\n \"isn't|(doesn't|does not) (equal|come before|come after|contain)|\" +\n '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' +\n 'contained by|comes (before|after)|a (ref|reference)|POSIX file|' +\n 'POSIX path|(date|time) string|quoted form)\\\\b'\n },\n {\n beginKeywords: 'on',\n illegal: '[${=;\\\\n]',\n contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]\n }\n ].concat(COMMENTS),\n illegal: '//|->|=>|\\\\[\\\\['\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['adoc'],\n contains: [\n // block comment\n hljs.COMMENT(\n '^/{4,}\\\\n',\n '\\\\n/{4,}$',\n // can also be done as...\n //'^/{4,}$',\n //'^/{4,}$',\n {\n relevance: 10\n }\n ),\n // line comment\n hljs.COMMENT(\n '^//',\n '$',\n {\n relevance: 0\n }\n ),\n // title\n {\n className: 'title',\n begin: '^\\\\.\\\\w.*$'\n },\n // example, admonition & sidebar blocks\n {\n begin: '^[=\\\\*]{4,}\\\\n',\n end: '\\\\n^[=\\\\*]{4,}$',\n relevance: 10\n },\n // headings\n {\n className: 'section',\n relevance: 10,\n variants: [\n {begin: '^(={1,5}) .+?( \\\\1)?$'},\n {begin: '^[^\\\\[\\\\]\\\\n]+?\\\\n[=\\\\-~\\\\^\\\\+]{2,}$'},\n ]\n },\n // document attributes\n {\n className: 'meta',\n begin: '^:.+?:',\n end: '\\\\s',\n excludeEnd: true,\n relevance: 10\n },\n // block attributes\n {\n className: 'meta',\n begin: '^\\\\[.+?\\\\]$',\n relevance: 0\n },\n // quoteblocks\n {\n className: 'quote',\n begin: '^_{4,}\\\\n',\n end: '\\\\n_{4,}$',\n relevance: 10\n },\n // listing and literal blocks\n {\n className: 'code',\n begin: '^[\\\\-\\\\.]{4,}\\\\n',\n end: '\\\\n[\\\\-\\\\.]{4,}$',\n relevance: 10\n },\n // passthrough blocks\n {\n begin: '^\\\\+{4,}\\\\n',\n end: '\\\\n\\\\+{4,}$',\n contains: [\n {\n begin: '<', end: '>',\n subLanguage: 'xml',\n relevance: 0\n }\n ],\n relevance: 10\n },\n // lists (can only capture indicators)\n {\n className: 'bullet',\n begin: '^(\\\\*+|\\\\-+|\\\\.+|[^\\\\n]+?::)\\\\s+'\n },\n // admonition\n {\n className: 'symbol',\n begin: '^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\\\s+',\n relevance: 10\n },\n // inline strong\n {\n className: 'strong',\n // must not follow a word character or be followed by an asterisk or space\n begin: '\\\\B\\\\*(?![\\\\*\\\\s])',\n end: '(\\\\n{2}|\\\\*)',\n // allow escaped asterisk followed by word char\n contains: [\n {\n begin: '\\\\\\\\*\\\\w',\n relevance: 0\n }\n ]\n },\n // inline emphasis\n {\n className: 'emphasis',\n // must not follow a word character or be followed by a single quote or space\n begin: '\\\\B\\'(?![\\'\\\\s])',\n end: '(\\\\n{2}|\\')',\n // allow escaped single quote followed by word char\n contains: [\n {\n begin: '\\\\\\\\\\'\\\\w',\n relevance: 0\n }\n ],\n relevance: 0\n },\n // inline emphasis (alt)\n {\n className: 'emphasis',\n // must not follow a word character or be followed by an underline or space\n begin: '_(?![_\\\\s])',\n end: '(\\\\n{2}|_)',\n relevance: 0\n },\n // inline smart quotes\n {\n className: 'string',\n variants: [\n {begin: \"``.+?''\"},\n {begin: \"`.+?'\"}\n ]\n },\n // inline code snippets (TODO should get same treatment as strong and emphasis)\n {\n className: 'code',\n begin: '(`.+?`|\\\\+.+?\\\\+)',\n relevance: 0\n },\n // indented literal block\n {\n className: 'code',\n begin: '^[ \\\\t]',\n end: '$',\n relevance: 0\n },\n // horizontal rules\n {\n begin: '^\\'{3,}[ \\\\t]*$',\n relevance: 10\n },\n // images and links\n {\n begin: '(link:)?(http|https|ftp|file|irc|image:?):\\\\S+\\\\[.*?\\\\]',\n returnBegin: true,\n contains: [\n {\n begin: '(link|image:?):',\n relevance: 0\n },\n {\n className: 'link',\n begin: '\\\\w',\n end: '[^\\\\[]+',\n relevance: 0\n },\n {\n className: 'string',\n begin: '\\\\[',\n end: '\\\\]',\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n }\n ],\n relevance: 10\n }\n ]\n };\n};","module.exports = function(hljs) {\n var VAR = {\n className: 'variable',\n variants: [\n {begin: /\\$[\\w\\d#@][\\w\\d_]*/},\n {begin: /\\$\\{(.*?)}/}\n ]\n };\n var QUOTE_STRING = {\n className: 'string',\n begin: /\"/, end: /\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VAR,\n {\n className: 'variable',\n begin: /\\$\\(/, end: /\\)/,\n contains: [hljs.BACKSLASH_ESCAPE]\n }\n ]\n };\n var ESCAPED_QUOTE = {\n className: '',\n begin: /\\\\\"/\n\n };\n var APOS_STRING = {\n className: 'string',\n begin: /'/, end: /'/\n };\n\n return {\n aliases: ['sh', 'zsh'],\n lexemes: /\\b-?[a-z\\._]+\\b/,\n keywords: {\n keyword:\n 'if then else elif fi for while in do done case esac function',\n literal:\n 'true false',\n built_in:\n // Shell built-ins\n // http://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html\n 'break cd continue eval exec exit export getopts hash pwd readonly return shift test times ' +\n 'trap umask unset ' +\n // Bash built-ins\n 'alias bind builtin caller command declare echo enable help let local logout mapfile printf ' +\n 'read readarray source type typeset ulimit unalias ' +\n // Shell modifiers\n 'set shopt ' +\n // Zsh built-ins\n 'autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles ' +\n 'compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate ' +\n 'fc fg float functions getcap getln history integer jobs kill limit log noglob popd print ' +\n 'pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit ' +\n 'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' +\n 'zpty zregexparse zsocket zstyle ztcp',\n _:\n '-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster\n },\n contains: [\n {\n className: 'meta',\n begin: /^#![^\\n]+sh\\s*$/,\n relevance: 10\n },\n {\n className: 'function',\n begin: /\\w[\\w\\d_]*\\s*\\(\\s*\\)\\s*\\{/,\n returnBegin: true,\n contains: [hljs.inherit(hljs.TITLE_MODE, {begin: /\\w[\\w\\d_]*/})],\n relevance: 0\n },\n hljs.HASH_COMMENT_MODE,\n QUOTE_STRING,\n ESCAPED_QUOTE,\n APOS_STRING,\n VAR\n ]\n };\n};","module.exports = function(hljs) {\n return {\n case_insensitive: true,\n illegal: '^\\.',\n // Support explicitely typed variables that end with $%! or #.\n lexemes: '[a-zA-Z][a-zA-Z0-9_\\$\\%\\!\\#]*',\n keywords: {\n keyword:\n 'ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE ' +\n 'CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ ' +\n 'DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ ' +\n 'EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO ' +\n 'HEX$ IF THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON ' +\n 'OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET ' +\n 'MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION ' +\n 'BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET ' +\n 'PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET ' +\n 'RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP ' +\n 'SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE ' +\n 'WEND WIDTH WINDOW WRITE XOR'\n },\n contains: [\n hljs.QUOTE_STRING_MODE,\n hljs.COMMENT('REM', '$', {relevance: 10}),\n hljs.COMMENT('\\'', '$', {relevance: 0}),\n {\n // Match line numbers\n className: 'symbol',\n begin: '^[0-9]+\\ ',\n relevance: 10\n },\n {\n // Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2)\n className: 'number',\n begin: '\\\\b([0-9]+[0-9edED\\.]*[#\\!]?)',\n relevance: 0\n },\n {\n // Match hexadecimal numbers (&Hxxxx)\n className: 'number',\n begin: '(\\&[hH][0-9a-fA-F]{1,4})'\n },\n {\n // Match octal numbers (&Oxxxxxx)\n className: 'number',\n begin: '(\\&[oO][0-7]{1,6})'\n }\n ]\n };\n};","module.exports = function(hljs) {\n var keywords = {\n 'builtin-name':\n // Clojure keywords\n 'def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem '+\n 'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? '+\n 'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? '+\n 'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? '+\n 'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . '+\n 'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last '+\n 'drop-while while intern condp case reduced cycle split-at split-with repeat replicate '+\n 'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext '+\n 'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends '+\n 'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler '+\n 'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter '+\n 'monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or '+\n 'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert '+\n 'peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast '+\n 'sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import '+\n 'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! '+\n 'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger '+\n 'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline '+\n 'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking '+\n 'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! '+\n 'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! '+\n 'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty '+\n 'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list '+\n 'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer '+\n 'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate '+\n 'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta '+\n 'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'\n };\n\n var SYMBOLSTART = 'a-zA-Z_\\\\-!.?+*=<>&#\\'';\n var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';\n var SIMPLE_NUMBER_RE = '[-+]?\\\\d+(\\\\.\\\\d+)?';\n\n var SYMBOL = {\n begin: SYMBOL_RE,\n relevance: 0\n };\n var NUMBER = {\n className: 'number', begin: SIMPLE_NUMBER_RE,\n relevance: 0\n };\n var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});\n var COMMENT = hljs.COMMENT(\n ';',\n '$',\n {\n relevance: 0\n }\n );\n var LITERAL = {\n className: 'literal',\n begin: /\\b(true|false|nil)\\b/\n };\n var COLLECTION = {\n begin: '[\\\\[\\\\{]', end: '[\\\\]\\\\}]'\n };\n var HINT = {\n className: 'comment',\n begin: '\\\\^' + SYMBOL_RE\n };\n var HINT_COL = hljs.COMMENT('\\\\^\\\\{', '\\\\}');\n var KEY = {\n className: 'symbol',\n begin: '[:]{1,2}' + SYMBOL_RE\n };\n var LIST = {\n begin: '\\\\(', end: '\\\\)'\n };\n var BODY = {\n endsWithParent: true,\n relevance: 0\n };\n var NAME = {\n keywords: keywords,\n lexemes: SYMBOL_RE,\n className: 'name', begin: SYMBOL_RE,\n starts: BODY\n };\n var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];\n\n LIST.contains = [hljs.COMMENT('comment', ''), NAME, BODY];\n BODY.contains = DEFAULT_CONTAINS;\n COLLECTION.contains = DEFAULT_CONTAINS;\n HINT_COL.contains = [COLLECTION];\n\n return {\n aliases: ['clj'],\n illegal: /\\S/,\n contains: [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]\n }\n};","module.exports = function(hljs) {\n return {\n contains: [\n {\n className: 'meta',\n begin: /^([\\w.-]+|\\s*#_)?=>/,\n starts: {\n end: /$/,\n subLanguage: 'clojure'\n }\n }\n ]\n }\n};","module.exports = function(hljs) {\n return {\n aliases: ['cmake.in'],\n case_insensitive: true,\n keywords: {\n keyword:\n // scripting commands\n 'break cmake_host_system_information cmake_minimum_required cmake_parse_arguments ' +\n 'cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro ' +\n 'endwhile execute_process file find_file find_library find_package find_path ' +\n 'find_program foreach function get_cmake_property get_directory_property ' +\n 'get_filename_component get_property if include include_guard list macro ' +\n 'mark_as_advanced math message option return separate_arguments ' +\n 'set_directory_properties set_property set site_name string unset variable_watch while ' +\n // project commands\n 'add_compile_definitions add_compile_options add_custom_command add_custom_target ' +\n 'add_definitions add_dependencies add_executable add_library add_link_options ' +\n 'add_subdirectory add_test aux_source_directory build_command create_test_sourcelist ' +\n 'define_property enable_language enable_testing export fltk_wrap_ui ' +\n 'get_source_file_property get_target_property get_test_property include_directories ' +\n 'include_external_msproject include_regular_expression install link_directories ' +\n 'link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions ' +\n 'set_source_files_properties set_target_properties set_tests_properties source_group ' +\n 'target_compile_definitions target_compile_features target_compile_options ' +\n 'target_include_directories target_link_directories target_link_libraries ' +\n 'target_link_options target_sources try_compile try_run ' +\n // CTest commands\n 'ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ' +\n 'ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ' +\n 'ctest_test ctest_update ctest_upload ' +\n // deprecated commands\n 'build_name exec_program export_library_dependencies install_files install_programs ' +\n 'install_targets load_command make_directory output_required_files remove ' +\n 'subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file ' +\n 'qt5_use_modules qt5_use_package qt5_wrap_cpp ' +\n // core keywords\n 'on off true false and or not command policy target test exists is_newer_than ' +\n 'is_directory is_symlink is_absolute matches less greater equal less_equal ' +\n 'greater_equal strless strgreater strequal strless_equal strgreater_equal version_less ' +\n 'version_greater version_equal version_less_equal version_greater_equal in_list defined'\n },\n contains: [\n {\n className: 'variable',\n begin: '\\\\${', end: '}'\n },\n hljs.HASH_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.NUMBER_MODE\n ]\n };\n};","module.exports = function(hljs) {\n var KEYWORDS = {\n keyword:\n // JS keywords\n 'in if for while finally new do return else break catch instanceof throw try this ' +\n 'switch continue typeof delete debugger super yield import export from as default await ' +\n // Coffee keywords\n 'then unless until loop of by when and or is isnt not',\n literal:\n // JS literals\n 'true false null undefined ' +\n // Coffee literals\n 'yes no on off',\n built_in:\n 'npm require console print module global window document'\n };\n var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n var SUBST = {\n className: 'subst',\n begin: /#\\{/, end: /}/,\n keywords: KEYWORDS\n };\n var EXPRESSIONS = [\n hljs.BINARY_NUMBER_MODE,\n hljs.inherit(hljs.C_NUMBER_MODE, {starts: {end: '(\\\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp\n {\n className: 'string',\n variants: [\n {\n begin: /'''/, end: /'''/,\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: /'/, end: /'/,\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: /\"\"\"/, end: /\"\"\"/,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n },\n {\n begin: /\"/, end: /\"/,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n }\n ]\n },\n {\n className: 'regexp',\n variants: [\n {\n begin: '///', end: '///',\n contains: [SUBST, hljs.HASH_COMMENT_MODE]\n },\n {\n begin: '//[gim]*',\n relevance: 0\n },\n {\n // regex can't start with space to parse x / 2 / 3 as two divisions\n // regex can't start with *, and it supports an \"illegal\" in the main mode\n begin: /\\/(?![ *])(\\\\\\/|.)*?\\/[gim]*(?=\\W)/\n }\n ]\n },\n {\n begin: '@' + JS_IDENT_RE // relevance booster\n },\n {\n subLanguage: 'javascript',\n excludeBegin: true, excludeEnd: true,\n variants: [\n {\n begin: '```', end: '```',\n },\n {\n begin: '`', end: '`',\n }\n ]\n }\n ];\n SUBST.contains = EXPRESSIONS;\n\n var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});\n var PARAMS_RE = '(\\\\(.*\\\\))?\\\\s*\\\\B[-=]>';\n var PARAMS = {\n className: 'params',\n begin: '\\\\([^\\\\(]', returnBegin: true,\n /* We need another contained nameless mode to not have every nested\n pair of parens to be called \"params\" */\n contains: [{\n begin: /\\(/, end: /\\)/,\n keywords: KEYWORDS,\n contains: ['self'].concat(EXPRESSIONS)\n }]\n };\n\n return {\n aliases: ['coffee', 'cson', 'iced'],\n keywords: KEYWORDS,\n illegal: /\\/\\*/,\n contains: EXPRESSIONS.concat([\n hljs.COMMENT('###', '###'),\n hljs.HASH_COMMENT_MODE,\n {\n className: 'function',\n begin: '^\\\\s*' + JS_IDENT_RE + '\\\\s*=\\\\s*' + PARAMS_RE, end: '[-=]>',\n returnBegin: true,\n contains: [TITLE, PARAMS]\n },\n {\n // anonymous function start\n begin: /[:\\(,=]\\s*/,\n relevance: 0,\n contains: [\n {\n className: 'function',\n begin: PARAMS_RE, end: '[-=]>',\n returnBegin: true,\n contains: [PARAMS]\n }\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class',\n end: '$',\n illegal: /[:=\"\\[\\]]/,\n contains: [\n {\n beginKeywords: 'extends',\n endsWithParent: true,\n illegal: /[:=\"\\[\\]]/,\n contains: [TITLE]\n },\n TITLE\n ]\n },\n {\n begin: JS_IDENT_RE + ':', end: ':',\n returnBegin: true, returnEnd: true,\n relevance: 0\n }\n ])\n };\n};","module.exports = function(hljs) {\n var CPP_PRIMITIVE_TYPES = {\n className: 'keyword',\n begin: '\\\\b[a-z\\\\d_]*_t\\\\b'\n };\n\n // https://en.cppreference.com/w/cpp/language/escape\n // \\\\ \\x \\xFF \\u2837 \\u00323747 \\374\n var CHARACTER_ESCAPES = '\\\\\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\\\S)'\n var STRINGS = {\n className: 'string',\n variants: [\n {\n begin: '(u8?|U|L)?\"', end: '\"',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: '(u8?|U|L)?\\'(' + CHARACTER_ESCAPES + \"|.)\", end: '\\'',\n illegal: '.'\n },\n { begin: /(?:u8?|U|L)?R\"([^()\\\\ ]{0,16})\\((?:.|\\n)*?\\)\\1\"/ }\n ]\n };\n\n var NUMBERS = {\n className: 'number',\n variants: [\n { begin: '\\\\b(0b[01\\']+)' },\n { begin: '(-?)\\\\b([\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)(u|U|l|L|ul|UL|f|F|b|B)' },\n { begin: '(-?)(\\\\b0[xX][a-fA-F0-9\\']+|(\\\\b[\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)([eE][-+]?[\\\\d\\']+)?)' }\n ],\n relevance: 0\n };\n\n var PREPROCESSOR = {\n className: 'meta',\n begin: /#\\s*[a-z]+\\b/, end: /$/,\n keywords: {\n 'meta-keyword':\n 'if else elif endif define undef warning error line ' +\n 'pragma _Pragma ifdef ifndef include'\n },\n contains: [\n {\n begin: /\\\\\\n/, relevance: 0\n },\n hljs.inherit(STRINGS, {className: 'meta-string'}),\n {\n className: 'meta-string',\n begin: /<.*?>/, end: /$/,\n illegal: '\\\\n',\n },\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n };\n\n var FUNCTION_TITLE = hljs.IDENT_RE + '\\\\s*\\\\(';\n\n var CPP_KEYWORDS = {\n keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +\n 'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +\n 'unsigned long volatile static protected bool template mutable if public friend ' +\n 'do goto auto void enum else break extern using asm case typeid wchar_t' +\n 'short reinterpret_cast|10 default double register explicit signed typename try this ' +\n 'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +\n 'concept co_await co_return co_yield requires ' +\n 'noexcept static_assert thread_local restrict final override ' +\n 'atomic_bool atomic_char atomic_schar ' +\n 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +\n 'atomic_ullong new throw return ' +\n 'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',\n built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +\n 'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +\n 'unordered_map unordered_multiset unordered_multimap array shared_ptr abort terminate abs acos ' +\n 'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +\n 'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +\n 'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +\n 'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +\n 'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +\n 'vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary',\n literal: 'true false nullptr NULL'\n };\n\n var EXPRESSION_CONTAINS = [\n CPP_PRIMITIVE_TYPES,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n NUMBERS,\n STRINGS\n ];\n\n return {\n aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'],\n keywords: CPP_KEYWORDS,\n illegal: '</',\n contains: EXPRESSION_CONTAINS.concat([\n PREPROCESSOR,\n {\n begin: '\\\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<', end: '>',\n keywords: CPP_KEYWORDS,\n contains: ['self', CPP_PRIMITIVE_TYPES]\n },\n {\n begin: hljs.IDENT_RE + '::',\n keywords: CPP_KEYWORDS\n },\n {\n // This mode covers expression context where we can't expect a function\n // definition and shouldn't highlight anything that looks like one:\n // `return some()`, `else if()`, `(x*sum(1, 2))`\n variants: [\n {begin: /=/, end: /;/},\n {begin: /\\(/, end: /\\)/},\n {beginKeywords: 'new throw return else', end: /;/}\n ],\n keywords: CPP_KEYWORDS,\n contains: EXPRESSION_CONTAINS.concat([\n {\n begin: /\\(/, end: /\\)/,\n keywords: CPP_KEYWORDS,\n contains: EXPRESSION_CONTAINS.concat(['self']),\n relevance: 0\n }\n ]),\n relevance: 0\n },\n {\n className: 'function',\n begin: '(' + hljs.IDENT_RE + '[\\\\*&\\\\s]+)+' + FUNCTION_TITLE,\n returnBegin: true, end: /[{;=]/,\n excludeEnd: true,\n keywords: CPP_KEYWORDS,\n illegal: /[^\\w\\s\\*&]/,\n contains: [\n {\n begin: FUNCTION_TITLE, returnBegin: true,\n contains: [hljs.TITLE_MODE],\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n keywords: CPP_KEYWORDS,\n relevance: 0,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRINGS,\n NUMBERS,\n CPP_PRIMITIVE_TYPES,\n // Count matching parentheses.\n {\n begin: /\\(/, end: /\\)/,\n keywords: CPP_KEYWORDS,\n relevance: 0,\n contains: [\n 'self',\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRINGS,\n NUMBERS,\n CPP_PRIMITIVE_TYPES\n ]\n }\n ]\n },\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n PREPROCESSOR\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class struct', end: /[{;:]/,\n contains: [\n {begin: /</, end: />/, contains: ['self']}, // skip generic stuff\n hljs.TITLE_MODE\n ]\n }\n ]),\n exports: {\n preprocessor: PREPROCESSOR,\n strings: STRINGS,\n keywords: CPP_KEYWORDS\n }\n };\n};","module.exports = function(hljs) {\n var INT_SUFFIX = '(_*[ui](8|16|32|64|128))?';\n var FLOAT_SUFFIX = '(_*f(32|64))?';\n var CRYSTAL_IDENT_RE = '[a-zA-Z_]\\\\w*[!?=]?';\n var CRYSTAL_METHOD_RE = '[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\\\*\\\\*|\\\\[\\\\][=?]?';\n var CRYSTAL_PATH_RE = '[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?';\n var CRYSTAL_KEYWORDS = {\n keyword:\n 'abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if ' +\n 'include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? ' +\n 'return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield ' +\n '__DIR__ __END_LINE__ __FILE__ __LINE__',\n literal: 'false nil true'\n };\n var SUBST = {\n className: 'subst',\n begin: '#{', end: '}',\n keywords: CRYSTAL_KEYWORDS\n };\n var EXPANSION = {\n className: 'template-variable',\n variants: [\n {begin: '\\\\{\\\\{', end: '\\\\}\\\\}'},\n {begin: '\\\\{%', end: '%\\\\}'}\n ],\n keywords: CRYSTAL_KEYWORDS\n };\n\n function recursiveParen(begin, end) {\n var\n contains = [{begin: begin, end: end}];\n contains[0].contains = contains;\n return contains;\n }\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n {begin: /'/, end: /'/},\n {begin: /\"/, end: /\"/},\n {begin: /`/, end: /`/},\n {begin: '%[Qwi]?\\\\(', end: '\\\\)', contains: recursiveParen('\\\\(', '\\\\)')},\n {begin: '%[Qwi]?\\\\[', end: '\\\\]', contains: recursiveParen('\\\\[', '\\\\]')},\n {begin: '%[Qwi]?{', end: '}', contains: recursiveParen('{', '}')},\n {begin: '%[Qwi]?<', end: '>', contains: recursiveParen('<', '>')},\n {begin: '%[Qwi]?\\\\|', end: '\\\\|'},\n {begin: /<<-\\w+$/, end: /^\\s*\\w+$/},\n ],\n relevance: 0,\n };\n var Q_STRING = {\n className: 'string',\n variants: [\n {begin: '%q\\\\(', end: '\\\\)', contains: recursiveParen('\\\\(', '\\\\)')},\n {begin: '%q\\\\[', end: '\\\\]', contains: recursiveParen('\\\\[', '\\\\]')},\n {begin: '%q{', end: '}', contains: recursiveParen('{', '}')},\n {begin: '%q<', end: '>', contains: recursiveParen('<', '>')},\n {begin: '%q\\\\|', end: '\\\\|'},\n {begin: /<<-'\\w+'$/, end: /^\\s*\\w+$/},\n ],\n relevance: 0,\n };\n var REGEXP = {\n begin: '(?!%})(' + hljs.RE_STARTERS_RE + '|\\\\n|\\\\b(case|if|select|unless|until|when|while)\\\\b)\\\\s*',\n keywords: 'case if select unless until when while',\n contains: [\n {\n className: 'regexp',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n {begin: '//[a-z]*', relevance: 0},\n {begin: '/(?!\\\\/)', end: '/[a-z]*'},\n ]\n }\n ],\n relevance: 0\n };\n var REGEXP2 = {\n className: 'regexp',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n {begin: '%r\\\\(', end: '\\\\)', contains: recursiveParen('\\\\(', '\\\\)')},\n {begin: '%r\\\\[', end: '\\\\]', contains: recursiveParen('\\\\[', '\\\\]')},\n {begin: '%r{', end: '}', contains: recursiveParen('{', '}')},\n {begin: '%r<', end: '>', contains: recursiveParen('<', '>')},\n {begin: '%r\\\\|', end: '\\\\|'},\n ],\n relevance: 0\n };\n var ATTRIBUTE = {\n className: 'meta',\n begin: '@\\\\[', end: '\\\\]',\n contains: [\n hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'})\n ]\n };\n var CRYSTAL_DEFAULT_CONTAINS = [\n EXPANSION,\n STRING,\n Q_STRING,\n REGEXP2,\n REGEXP,\n ATTRIBUTE,\n hljs.HASH_COMMENT_MODE,\n {\n className: 'class',\n beginKeywords: 'class module struct', end: '$|;',\n illegal: /=/,\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}),\n {begin: '<'} // relevance booster for inheritance\n ]\n },\n {\n className: 'class',\n beginKeywords: 'lib enum union', end: '$|;',\n illegal: /=/,\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}),\n ],\n relevance: 10\n },\n {\n beginKeywords: 'annotation', end: '$|;',\n illegal: /=/,\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}),\n ],\n relevance: 10\n },\n {\n className: 'function',\n beginKeywords: 'def', end: /\\B\\b/,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {\n begin: CRYSTAL_METHOD_RE,\n endsParent: true\n })\n ]\n },\n {\n className: 'function',\n beginKeywords: 'fun macro', end: /\\B\\b/,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {\n begin: CRYSTAL_METHOD_RE,\n endsParent: true\n })\n ],\n relevance: 5\n },\n {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '(\\\\!|\\\\?)?:',\n relevance: 0\n },\n {\n className: 'symbol',\n begin: ':',\n contains: [STRING, {begin: CRYSTAL_METHOD_RE}],\n relevance: 0\n },\n {\n className: 'number',\n variants: [\n { begin: '\\\\b0b([01_]+)' + INT_SUFFIX },\n { begin: '\\\\b0o([0-7_]+)' + INT_SUFFIX },\n { begin: '\\\\b0x([A-Fa-f0-9_]+)' + INT_SUFFIX },\n { begin: '\\\\b([1-9][0-9_]*[0-9]|[0-9])(\\\\.[0-9][0-9_]*)?([eE]_*[-+]?[0-9_]*)?' + FLOAT_SUFFIX + '(?!_)' },\n { begin: '\\\\b([1-9][0-9_]*|0)' + INT_SUFFIX }\n ],\n relevance: 0\n }\n ];\n SUBST.contains = CRYSTAL_DEFAULT_CONTAINS;\n EXPANSION.contains = CRYSTAL_DEFAULT_CONTAINS.slice(1); // without EXPANSION\n\n return {\n aliases: ['cr'],\n lexemes: CRYSTAL_IDENT_RE,\n keywords: CRYSTAL_KEYWORDS,\n contains: CRYSTAL_DEFAULT_CONTAINS\n };\n};","module.exports = function(hljs) {\n var FUNCTION_LIKE = {\n begin: /[\\w-]+\\(/, returnBegin: true,\n contains: [\n {\n className: 'built_in',\n begin: /[\\w-]+/\n },\n {\n begin: /\\(/, end: /\\)/,\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.CSS_NUMBER_MODE,\n ]\n }\n ]\n }\n var ATTRIBUTE = {\n className: 'attribute',\n begin: /\\S/, end: ':', excludeEnd: true,\n starts: {\n endsWithParent: true, excludeEnd: true,\n contains: [\n FUNCTION_LIKE,\n hljs.CSS_NUMBER_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n {\n className: 'number', begin: '#[0-9A-Fa-f]+'\n },\n {\n className: 'meta', begin: '!important'\n }\n ]\n }\n }\n var AT_IDENTIFIER = '@[a-z-]+' // @font-face\n var AT_MODIFIERS = \"and or not only\"\n var MEDIA_TYPES = \"all print screen speech\"\n var AT_PROPERTY_RE = /@\\-?\\w[\\w]*(\\-\\w+)*/ // @-webkit-keyframes\n var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';\n var RULE = {\n begin: /(?:[A-Z\\_\\.\\-]+|--[a-zA-Z0-9_-]+)\\s*:/, returnBegin: true, end: ';', endsWithParent: true,\n contains: [\n ATTRIBUTE\n ]\n };\n\n return {\n case_insensitive: true,\n illegal: /[=\\/|'\\$]/,\n contains: [\n hljs.C_BLOCK_COMMENT_MODE,\n {\n className: 'selector-id', begin: /#[A-Za-z0-9_-]+/\n },\n {\n className: 'selector-class', begin: /\\.[A-Za-z0-9_-]+/\n },\n {\n className: 'selector-attr',\n begin: /\\[/, end: /\\]/,\n illegal: '$',\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n ]\n },\n {\n className: 'selector-pseudo',\n begin: /:(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\"'.]+/\n },\n // matching these here allows us to treat them more like regular CSS\n // rules so everything between the {} gets regular rule highlighting,\n // which is what we want for page and font-face\n {\n begin: '@(page|font-face)',\n lexemes: AT_IDENTIFIER,\n keywords: '@page @font-face'\n },\n {\n begin: '@', end: '[{;]', // at_rule eating first \"{\" is a good thing\n // because it doesn’t let it to be parsed as\n // a rule set but instead drops parser into\n // the default mode which is how it should be.\n illegal: /:/, // break on Less variables @var: ...\n returnBegin: true,\n contains: [\n {\n className: 'keyword',\n begin: AT_PROPERTY_RE\n },\n {\n begin: /\\s/, endsWithParent: true, excludeEnd: true,\n relevance: 0,\n keywords: AT_MODIFIERS,\n contains: [\n {\n begin: /[a-z-]+:/,\n className:\"attribute\"\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.CSS_NUMBER_MODE\n ]\n }\n ]\n },\n {\n className: 'selector-tag', begin: IDENT_RE,\n relevance: 0\n },\n {\n begin: '{', end: '}',\n illegal: /\\S/,\n contains: [\n hljs.C_BLOCK_COMMENT_MODE,\n RULE,\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n var SUBST = {\n className: 'subst',\n variants: [{\n begin: '\\\\$[A-Za-z0-9_]+'\n }],\n };\n\n var BRACED_SUBST = {\n className: 'subst',\n variants: [{\n begin: '\\\\${',\n end: '}'\n }, ],\n keywords: 'true false null this is new super',\n };\n\n var STRING = {\n className: 'string',\n variants: [{\n begin: 'r\\'\\'\\'',\n end: '\\'\\'\\''\n },\n {\n begin: 'r\"\"\"',\n end: '\"\"\"'\n },\n {\n begin: 'r\\'',\n end: '\\'',\n illegal: '\\\\n'\n },\n {\n begin: 'r\"',\n end: '\"',\n illegal: '\\\\n'\n },\n {\n begin: '\\'\\'\\'',\n end: '\\'\\'\\'',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST]\n },\n {\n begin: '\"\"\"',\n end: '\"\"\"',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST]\n },\n {\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST]\n }\n ]\n };\n BRACED_SUBST.contains = [\n hljs.C_NUMBER_MODE, STRING\n ];\n\n var KEYWORDS = {\n keyword: 'abstract as assert async await break case catch class const continue covariant default deferred do ' +\n 'dynamic else enum export extends extension external factory false final finally for Function get hide if ' +\n 'implements import in inferface is library mixin new null on operator part rethrow return set show static ' +\n 'super switch sync this throw true try typedef var void while with yield',\n built_in:\n // dart:core\n 'Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set ' +\n 'Stopwatch String StringBuffer StringSink Symbol Type Uri bool double dynamic int num print ' +\n // dart:html\n 'Element ElementList document querySelector querySelectorAll window'\n };\n\n return {\n keywords: KEYWORDS,\n contains: [\n STRING,\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/', {\n subLanguage: 'markdown'\n }\n ),\n hljs.COMMENT(\n '///+\\\\s*',\n '$', {\n contains: [{\n subLanguage: 'markdown',\n begin: '.',\n end: '$',\n }]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n {\n className: 'class',\n beginKeywords: 'class interface',\n end: '{',\n excludeEnd: true,\n contains: [{\n beginKeywords: 'extends implements'\n },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n hljs.C_NUMBER_MODE,\n {\n className: 'meta',\n begin: '@[A-Za-z]+'\n },\n {\n begin: '=>' // No markup, just a relevance booster\n }\n ]\n }\n};","module.exports = function(hljs) {\n return {\n aliases: ['patch'],\n contains: [\n {\n className: 'meta',\n relevance: 10,\n variants: [\n {begin: /^@@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +@@$/},\n {begin: /^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$/},\n {begin: /^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$/}\n ]\n },\n {\n className: 'comment',\n variants: [\n {begin: /Index: /, end: /$/},\n {begin: /={3,}/, end: /$/},\n {begin: /^\\-{3}/, end: /$/},\n {begin: /^\\*{3} /, end: /$/},\n {begin: /^\\+{3}/, end: /$/},\n {begin: /^\\*{15}$/ }\n ]\n },\n {\n className: 'addition',\n begin: '^\\\\+', end: '$'\n },\n {\n className: 'deletion',\n begin: '^\\\\-', end: '$'\n },\n {\n className: 'addition',\n begin: '^\\\\!', end: '$'\n }\n ]\n };\n};","module.exports = function(hljs) {\n var FILTER = {\n begin: /\\|[A-Za-z]+:?/,\n keywords: {\n name:\n 'truncatewords removetags linebreaksbr yesno get_digit timesince random striptags ' +\n 'filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands ' +\n 'title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode ' +\n 'timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort ' +\n 'dictsortreversed default_if_none pluralize lower join center default ' +\n 'truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first ' +\n 'escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize ' +\n 'localtime utc timezone'\n },\n contains: [\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE\n ]\n };\n\n return {\n aliases: ['jinja'],\n case_insensitive: true,\n subLanguage: 'xml',\n contains: [\n hljs.COMMENT(/\\{%\\s*comment\\s*%}/, /\\{%\\s*endcomment\\s*%}/),\n hljs.COMMENT(/\\{#/, /#}/),\n {\n className: 'template-tag',\n begin: /\\{%/, end: /%}/,\n contains: [\n {\n className: 'name',\n begin: /\\w+/,\n keywords: {\n name:\n 'comment endcomment load templatetag ifchanged endifchanged if endif firstof for ' +\n 'endfor ifnotequal endifnotequal widthratio extends include spaceless ' +\n 'endspaceless regroup ifequal endifequal ssi now with cycle url filter ' +\n 'endfilter debug block endblock else autoescape endautoescape csrf_token empty elif ' +\n 'endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix ' +\n 'plural get_current_language language get_available_languages ' +\n 'get_current_language_bidi get_language_info get_language_info_list localize ' +\n 'endlocalize localtime endlocaltime timezone endtimezone get_current_timezone ' +\n 'verbatim'\n },\n starts: {\n endsWithParent: true,\n keywords: 'in by as',\n contains: [FILTER],\n relevance: 0\n }\n }\n ]\n },\n {\n className: 'template-variable',\n begin: /\\{\\{/, end: /}}/,\n contains: [FILTER]\n }\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['bind', 'zone'],\n keywords: {\n keyword:\n 'IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX ' +\n 'LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT'\n },\n contains: [\n hljs.COMMENT(';', '$', {relevance: 0}),\n {\n className: 'meta',\n begin: /^\\$(TTL|GENERATE|INCLUDE|ORIGIN)\\b/\n },\n // IPv6\n {\n className: 'number',\n begin: '((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))\\\\b'\n },\n // IPv4\n {\n className: 'number',\n begin: '((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])\\\\b'\n },\n hljs.inherit(hljs.NUMBER_MODE, {begin: /\\b\\d+[dhwm]?/})\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['docker'],\n case_insensitive: true,\n keywords: 'from maintainer expose env arg user onbuild stopsignal',\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.NUMBER_MODE,\n {\n beginKeywords: 'run cmd entrypoint volume add copy workdir label healthcheck shell',\n starts: {\n end: /[^\\\\]$/,\n subLanguage: 'bash'\n }\n }\n ],\n illegal: '</'\n }\n};","module.exports = function(hljs) {\n var COMMENT = hljs.COMMENT(\n /^\\s*@?rem\\b/, /$/,\n {\n relevance: 10\n }\n );\n var LABEL = {\n className: 'symbol',\n begin: '^\\\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\\\s+label)',\n relevance: 0\n };\n return {\n aliases: ['bat', 'cmd'],\n case_insensitive: true,\n illegal: /\\/\\*/,\n keywords: {\n keyword:\n 'if else goto for in do call exit not exist errorlevel defined ' +\n 'equ neq lss leq gtr geq',\n built_in:\n 'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux ' +\n 'shift cd dir echo setlocal endlocal set pause copy ' +\n 'append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color ' +\n 'comp compact convert date dir diskcomp diskcopy doskey erase fs ' +\n 'find findstr format ftype graftabl help keyb label md mkdir mode more move path ' +\n 'pause print popd pushd promt rd recover rem rename replace restore rmdir shift' +\n 'sort start subst time title tree type ver verify vol ' +\n // winutils\n 'ping net ipconfig taskkill xcopy ren del'\n },\n contains: [\n {\n className: 'variable', begin: /%%[^ ]|%[^ ]+?%|![^ ]+?!/\n },\n {\n className: 'function',\n begin: LABEL.begin, end: 'goto:eof',\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\\\w*\\\\.)*([_a-zA-Z]\\\\w*:)?[_a-zA-Z]\\\\w*'}),\n COMMENT\n ]\n },\n {\n className: 'number', begin: '\\\\b\\\\d+',\n relevance: 0\n },\n COMMENT\n ]\n };\n};","module.exports = function(hljs) {\n var QUOTED_PROPERTY = {\n className: 'string',\n begin: /\"/, end: /\"/\n };\n var APOS_PROPERTY = {\n className: 'string',\n begin: /'/, end: /'/\n };\n var UNQUOTED_PROPERTY = {\n className: 'string',\n begin: '[\\\\w-?]+:\\\\w+', end: '\\\\W',\n relevance: 0\n };\n var VALUELESS_PROPERTY = {\n className: 'string',\n begin: '\\\\w+-?\\\\w+', end: '\\\\W',\n relevance: 0\n };\n\n return {\n keywords: 'dsconfig',\n contains: [\n {\n className: 'keyword',\n begin: '^dsconfig', end: '\\\\s', excludeEnd: true,\n relevance: 10\n },\n {\n className: 'built_in',\n begin: '(list|create|get|set|delete)-(\\\\w+)', end: '\\\\s', excludeEnd: true,\n illegal: '!@#$%^&*()',\n relevance: 10\n },\n {\n className: 'built_in',\n begin: '--(\\\\w+)', end: '\\\\s', excludeEnd: true\n },\n QUOTED_PROPERTY,\n APOS_PROPERTY,\n UNQUOTED_PROPERTY,\n VALUELESS_PROPERTY,\n hljs.HASH_COMMENT_MODE\n ]\n };\n};","module.exports = function(hljs) {\n var ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_.]*(\\\\!|\\\\?)?';\n var ELIXIR_METHOD_RE = '[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?';\n var ELIXIR_KEYWORDS =\n 'and false then defined module in return redo retry end for true self when ' +\n 'next until do begin unless nil break not case cond alias while ensure or ' +\n 'include use alias fn quote require import with|0';\n var SUBST = {\n className: 'subst',\n begin: '#\\\\{', end: '}',\n lexemes: ELIXIR_IDENT_RE,\n keywords: ELIXIR_KEYWORDS\n };\n\n var SIGIL_DELIMITERS = '[/|([{<\"\\']'\n var LOWERCASE_SIGIL = {\n className: 'string',\n begin: '~[a-z]' + '(?=' + SIGIL_DELIMITERS + ')',\n contains: [\n {\n endsParent:true,\n contains: [{\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n { begin: /\"/, end: /\"/ },\n { begin: /'/, end: /'/ },\n { begin: /\\//, end: /\\// },\n { begin: /\\|/, end: /\\|/ },\n { begin: /\\(/, end: /\\)/ },\n { begin: /\\[/, end: /\\]/ },\n { begin: /\\{/, end: /\\}/ },\n { begin: /</, end: />/ }\n ]\n }]\n },\n ],\n };\n\n var UPCASE_SIGIL = {\n className: 'string',\n begin: '~[A-Z]' + '(?=' + SIGIL_DELIMITERS + ')',\n contains: [\n { begin: /\"/, end: /\"/ },\n { begin: /'/, end: /'/ },\n { begin: /\\//, end: /\\// },\n { begin: /\\|/, end: /\\|/ },\n { begin: /\\(/, end: /\\)/ },\n { begin: /\\[/, end: /\\]/ },\n { begin: /\\{/, end: /\\}/ },\n { begin: /\\</, end: /\\>/ }\n ]\n };\n\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n {\n begin: /\"\"\"/, end: /\"\"\"/,\n },\n {\n begin: /'''/, end: /'''/,\n },\n {\n begin: /~S\"\"\"/, end: /\"\"\"/,\n contains: []\n },\n {\n begin: /~S\"/, end: /\"/,\n contains: []\n },\n {\n begin: /~S'''/, end: /'''/,\n contains: []\n },\n {\n begin: /~S'/, end: /'/,\n contains: []\n },\n {\n begin: /'/, end: /'/\n },\n {\n begin: /\"/, end: /\"/\n },\n ]\n };\n var FUNCTION = {\n className: 'function',\n beginKeywords: 'def defp defmacro', end: /\\B\\b/, // the mode is ended by the title\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {\n begin: ELIXIR_IDENT_RE,\n endsParent: true\n })\n ]\n };\n var CLASS = hljs.inherit(FUNCTION, {\n className: 'class',\n beginKeywords: 'defimpl defmodule defprotocol defrecord', end: /\\bdo\\b|$|;/\n });\n var ELIXIR_DEFAULT_CONTAINS = [\n STRING,\n UPCASE_SIGIL,\n LOWERCASE_SIGIL,\n hljs.HASH_COMMENT_MODE,\n CLASS,\n FUNCTION,\n {\n begin: '::'\n },\n {\n className: 'symbol',\n begin: ':(?![\\\\s:])',\n contains: [STRING, {begin: ELIXIR_METHOD_RE}],\n relevance: 0\n },\n {\n className: 'symbol',\n begin: ELIXIR_IDENT_RE + ':(?!:)',\n relevance: 0\n },\n {\n className: 'number',\n begin: '(\\\\b0o[0-7_]+)|(\\\\b0b[01_]+)|(\\\\b0x[0-9a-fA-F_]+)|(-?\\\\b[1-9][0-9_]*(.[0-9_]+([eE][-+]?[0-9]+)?)?)',\n relevance: 0\n },\n {\n className: 'variable',\n begin: '(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))'\n },\n {\n begin: '->'\n },\n { // regexp container\n begin: '(' + hljs.RE_STARTERS_RE + ')\\\\s*',\n contains: [\n hljs.HASH_COMMENT_MODE,\n {\n className: 'regexp',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n {\n begin: '/', end: '/[a-z]*'\n },\n {\n begin: '%r\\\\[', end: '\\\\][a-z]*'\n }\n ]\n }\n ],\n relevance: 0\n }\n ];\n SUBST.contains = ELIXIR_DEFAULT_CONTAINS;\n\n return {\n lexemes: ELIXIR_IDENT_RE,\n keywords: ELIXIR_KEYWORDS,\n contains: ELIXIR_DEFAULT_CONTAINS\n };\n};","module.exports = function(hljs) {\n var COMMENT = {\n variants: [\n hljs.COMMENT('--', '$'),\n hljs.COMMENT(\n '{-',\n '-}',\n {\n contains: ['self']\n }\n )\n ]\n };\n\n var CONSTRUCTOR = {\n className: 'type',\n begin: '\\\\b[A-Z][\\\\w\\']*', // TODO: other constructors (built-in, infix).\n relevance: 0\n };\n\n var LIST = {\n begin: '\\\\(', end: '\\\\)',\n illegal: '\"',\n contains: [\n {className: 'type', begin: '\\\\b[A-Z][\\\\w]*(\\\\((\\\\.\\\\.|,|\\\\w+)\\\\))?'},\n COMMENT\n ]\n };\n\n var RECORD = {\n begin: '{', end: '}',\n contains: LIST.contains\n };\n\n var CHARACTER = {\n className: 'string',\n begin: '\\'\\\\\\\\?.', end: '\\'',\n illegal: '.'\n };\n\n return {\n keywords:\n 'let in if then else case of where module import exposing ' +\n 'type alias as infix infixl infixr port effect command subscription',\n contains: [\n\n // Top-level constructions.\n\n {\n beginKeywords: 'port effect module', end: 'exposing',\n keywords: 'port effect module where command subscription exposing',\n contains: [LIST, COMMENT],\n illegal: '\\\\W\\\\.|;'\n },\n {\n begin: 'import', end: '$',\n keywords: 'import as exposing',\n contains: [LIST, COMMENT],\n illegal: '\\\\W\\\\.|;'\n },\n {\n begin: 'type', end: '$',\n keywords: 'type alias',\n contains: [CONSTRUCTOR, LIST, RECORD, COMMENT]\n },\n {\n beginKeywords: 'infix infixl infixr', end: '$',\n contains: [hljs.C_NUMBER_MODE, COMMENT]\n },\n {\n begin: 'port', end: '$',\n keywords: 'port',\n contains: [COMMENT]\n },\n\n // Literals and names.\n\n CHARACTER,\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE,\n CONSTRUCTOR,\n hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\\\w\\']*'}),\n COMMENT,\n\n {begin: '->|<-'} // No markup, relevance booster\n ],\n illegal: /;/\n };\n};","module.exports = function(hljs) {\n return {\n subLanguage: 'xml',\n contains: [\n hljs.COMMENT('<%#', '%>'),\n {\n begin: '<%[%=-]?', end: '[%-]?%>',\n subLanguage: 'ruby',\n excludeBegin: true,\n excludeEnd: true\n }\n ]\n };\n};","module.exports = function(hljs) {\n return {\n keywords: {\n built_in:\n 'spawn spawn_link self',\n keyword:\n 'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' +\n 'let not of or orelse|10 query receive rem try when xor'\n },\n contains: [\n {\n className: 'meta', begin: '^[0-9]+> ',\n relevance: 10\n },\n hljs.COMMENT('%', '$'),\n {\n className: 'number',\n begin: '\\\\b(\\\\d+#[a-fA-F0-9]+|\\\\d+(\\\\.\\\\d+)?([eE][-+]?\\\\d+)?)',\n relevance: 0\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n {\n begin: '\\\\?(::)?([A-Z]\\\\w*(::)?)+'\n },\n {\n begin: '->'\n },\n {\n begin: 'ok'\n },\n {\n begin: '!'\n },\n {\n begin: '(\\\\b[a-z\\'][a-zA-Z0-9_\\']*:[a-z\\'][a-zA-Z0-9_\\']*)|(\\\\b[a-z\\'][a-zA-Z0-9_\\']*)',\n relevance: 0\n },\n {\n begin: '[A-Z][a-zA-Z0-9_\\']*',\n relevance: 0\n }\n ]\n };\n};","module.exports = function(hljs) {\n var BASIC_ATOM_RE = '[a-z\\'][a-zA-Z0-9_\\']*';\n var FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')';\n var ERLANG_RESERVED = {\n keyword:\n 'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if ' +\n 'let not of orelse|10 query receive rem try when xor',\n literal:\n 'false true'\n };\n\n var COMMENT = hljs.COMMENT('%', '$');\n var NUMBER = {\n className: 'number',\n begin: '\\\\b(\\\\d+#[a-fA-F0-9]+|\\\\d+(\\\\.\\\\d+)?([eE][-+]?\\\\d+)?)',\n relevance: 0\n };\n var NAMED_FUN = {\n begin: 'fun\\\\s+' + BASIC_ATOM_RE + '/\\\\d+'\n };\n var FUNCTION_CALL = {\n begin: FUNCTION_NAME_RE + '\\\\(', end: '\\\\)',\n returnBegin: true,\n relevance: 0,\n contains: [\n {\n begin: FUNCTION_NAME_RE, relevance: 0\n },\n {\n begin: '\\\\(', end: '\\\\)', endsWithParent: true,\n returnEnd: true,\n relevance: 0\n // \"contains\" defined later\n }\n ]\n };\n var TUPLE = {\n begin: '{', end: '}',\n relevance: 0\n // \"contains\" defined later\n };\n var VAR1 = {\n begin: '\\\\b_([A-Z][A-Za-z0-9_]*)?',\n relevance: 0\n };\n var VAR2 = {\n begin: '[A-Z][a-zA-Z0-9_]*',\n relevance: 0\n };\n var RECORD_ACCESS = {\n begin: '#' + hljs.UNDERSCORE_IDENT_RE,\n relevance: 0,\n returnBegin: true,\n contains: [\n {\n begin: '#' + hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n begin: '{', end: '}',\n relevance: 0\n // \"contains\" defined later\n }\n ]\n };\n\n var BLOCK_STATEMENTS = {\n beginKeywords: 'fun receive if try case', end: 'end',\n keywords: ERLANG_RESERVED\n };\n BLOCK_STATEMENTS.contains = [\n COMMENT,\n NAMED_FUN,\n hljs.inherit(hljs.APOS_STRING_MODE, {className: ''}),\n BLOCK_STATEMENTS,\n FUNCTION_CALL,\n hljs.QUOTE_STRING_MODE,\n NUMBER,\n TUPLE,\n VAR1, VAR2,\n RECORD_ACCESS\n ];\n\n var BASIC_MODES = [\n COMMENT,\n NAMED_FUN,\n BLOCK_STATEMENTS,\n FUNCTION_CALL,\n hljs.QUOTE_STRING_MODE,\n NUMBER,\n TUPLE,\n VAR1, VAR2,\n RECORD_ACCESS\n ];\n FUNCTION_CALL.contains[1].contains = BASIC_MODES;\n TUPLE.contains = BASIC_MODES;\n RECORD_ACCESS.contains[1].contains = BASIC_MODES;\n\n var PARAMS = {\n className: 'params',\n begin: '\\\\(', end: '\\\\)',\n contains: BASIC_MODES\n };\n return {\n aliases: ['erl'],\n keywords: ERLANG_RESERVED,\n illegal: '(</|\\\\*=|\\\\+=|-=|/\\\\*|\\\\*/|\\\\(\\\\*|\\\\*\\\\))',\n contains: [\n {\n className: 'function',\n begin: '^' + BASIC_ATOM_RE + '\\\\s*\\\\(', end: '->',\n returnBegin: true,\n illegal: '\\\\(|#|//|/\\\\*|\\\\\\\\|:|;',\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, {begin: BASIC_ATOM_RE})\n ],\n starts: {\n end: ';|\\\\.',\n keywords: ERLANG_RESERVED,\n contains: BASIC_MODES\n }\n },\n COMMENT,\n {\n begin: '^-', end: '\\\\.',\n relevance: 0,\n excludeEnd: true,\n returnBegin: true,\n lexemes: '-' + hljs.IDENT_RE,\n keywords:\n '-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' +\n '-import -include -include_lib -compile -define -else -endif -file -behaviour ' +\n '-behavior -spec',\n contains: [PARAMS]\n },\n NUMBER,\n hljs.QUOTE_STRING_MODE,\n RECORD_ACCESS,\n VAR1, VAR2,\n TUPLE,\n {begin: /\\.$/} // relevance booster\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['xlsx', 'xls'],\n case_insensitive: true,\n lexemes: /[a-zA-Z][\\w\\.]*/,\n // built-in functions imported from https://web.archive.org/web/20160513042710/https://support.office.com/en-us/article/Excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188\n keywords: {\n built_in: 'ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST'\n },\n contains: [\n {\n /* matches a beginning equal sign found in Excel formula examples */\n begin: /^=/,\n end: /[^=]/, returnEnd: true, illegal: /=/, /* only allow single equal sign at front of line */\n relevance: 10\n },\n /* technically, there can be more than 2 letters in column names, but this prevents conflict with some keywords */\n {\n /* matches a reference to a single cell */\n className: 'symbol',\n begin: /\\b[A-Z]{1,2}\\d+\\b/,\n end: /[^\\d]/, excludeEnd: true,\n relevance: 0\n },\n {\n /* matches a reference to a range of cells */\n className: 'symbol',\n begin: /[A-Z]{0,2}\\d*:[A-Z]{0,2}\\d*/,\n relevance: 0\n },\n hljs.BACKSLASH_ESCAPE,\n hljs.QUOTE_STRING_MODE,\n {\n className: 'number',\n begin: hljs.NUMBER_RE + '(%)?',\n relevance: 0\n },\n /* Excel formula comments are done by putting the comment in a function call to N() */\n hljs.COMMENT(/\\bN\\(/,/\\)/,\n {\n excludeBegin: true,\n excludeEnd: true,\n illegal: /\\n/\n })\n ]\n };\n};","module.exports = function(hljs) {\n var PARAMS = {\n className: 'params',\n begin: '\\\\(', end: '\\\\)'\n };\n\n var F_KEYWORDS = {\n literal: '.False. .True.',\n keyword: 'kind do while private call intrinsic where elsewhere ' +\n 'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then ' +\n 'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' +\n 'goto save else use module select case ' +\n 'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' +\n 'continue format pause cycle exit ' +\n 'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' +\n 'synchronous nopass non_overridable pass protected volatile abstract extends import ' +\n 'non_intrinsic value deferred generic final enumerator class associate bind enum ' +\n 'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' +\n 'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' +\n 'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' +\n 'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer ' +\n 'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' +\n 'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' +\n 'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' +\n 'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure ' +\n 'integer real character complex logical dimension allocatable|10 parameter ' +\n 'external implicit|10 none double precision assign intent optional pointer ' +\n 'target in out common equivalence data',\n built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' +\n 'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' +\n 'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' +\n 'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' +\n 'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' +\n 'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' +\n 'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' +\n 'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' +\n 'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' +\n 'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' +\n 'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' +\n 'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' +\n 'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' +\n 'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of' +\n 'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' +\n 'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' +\n 'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' +\n 'num_images parity popcnt poppar shifta shiftl shiftr this_image'\n };\n return {\n case_insensitive: true,\n aliases: ['f90', 'f95'],\n keywords: F_KEYWORDS,\n illegal: /\\/\\*/,\n contains: [\n hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),\n hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'string', relevance: 0}),\n {\n className: 'function',\n beginKeywords: 'subroutine function program',\n illegal: '[${=\\\\n]',\n contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]\n },\n hljs.COMMENT('!', '$', {relevance: 0}),\n {\n className: 'number',\n begin: '(?=\\\\b|\\\\+|\\\\-|\\\\.)(?=\\\\.\\\\d|\\\\d)(?:\\\\d+)?(?:\\\\.?\\\\d*)(?:[de][+-]?\\\\d+)?\\\\b\\\\.?',\n relevance: 0\n }\n ]\n };\n};","module.exports = function(hljs) {\n var TYPEPARAM = {\n begin: '<', end: '>',\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: /'[a-zA-Z0-9_]+/})\n ]\n };\n\n return {\n aliases: ['fs'],\n keywords:\n 'abstract and as assert base begin class default delegate do done ' +\n 'downcast downto elif else end exception extern false finally for ' +\n 'fun function global if in inherit inline interface internal lazy let ' +\n 'match member module mutable namespace new null of open or ' +\n 'override private public rec return sig static struct then to ' +\n 'true try type upcast use val void when while with yield',\n illegal: /\\/\\*/,\n contains: [\n {\n // monad builder keywords (matches before non-bang kws)\n className: 'keyword',\n begin: /\\b(yield|return|let|do)!/\n },\n {\n className: 'string',\n begin: '@\"', end: '\"',\n contains: [{begin: '\"\"'}]\n },\n {\n className: 'string',\n begin: '\"\"\"', end: '\"\"\"'\n },\n hljs.COMMENT('\\\\(\\\\*', '\\\\*\\\\)'),\n {\n className: 'class',\n beginKeywords: 'type', end: '\\\\(|=|$', excludeEnd: true,\n contains: [\n hljs.UNDERSCORE_TITLE_MODE,\n TYPEPARAM\n ]\n },\n {\n className: 'meta',\n begin: '\\\\[<', end: '>\\\\]',\n relevance: 10\n },\n {\n className: 'symbol',\n begin: '\\\\B(\\'[A-Za-z])\\\\b',\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n hljs.C_LINE_COMMENT_MODE,\n hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n hljs.C_NUMBER_MODE\n ]\n };\n};","module.exports = function (hljs) {\n return {\n aliases: ['feature'],\n keywords: 'Feature Background Ability Business\\ Need Scenario Scenarios Scenario\\ Outline Scenario\\ Template Examples Given And Then But When',\n contains: [\n {\n className: 'symbol',\n begin: '\\\\*',\n relevance: 0\n },\n {\n className: 'meta',\n begin: '@[^@\\\\s]+'\n },\n {\n begin: '\\\\|', end: '\\\\|\\\\w*$',\n contains: [\n {\n className: 'string',\n begin: '[^|]+'\n }\n ]\n },\n {\n className: 'variable',\n begin: '<', end: '>'\n },\n hljs.HASH_COMMENT_MODE,\n {\n className: 'string',\n begin: '\"\"\"', end: '\"\"\"'\n },\n hljs.QUOTE_STRING_MODE\n ]\n };\n};","module.exports = function(hljs) {\n var GO_KEYWORDS = {\n keyword:\n 'break default func interface select case map struct chan else goto package switch ' +\n 'const fallthrough if range type continue for import return var go defer ' +\n 'bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 ' +\n 'uint16 uint32 uint64 int uint uintptr rune',\n literal:\n 'true false iota nil',\n built_in:\n 'append cap close complex copy imag len make new panic print println real recover delete'\n };\n return {\n aliases: ['golang'],\n keywords: GO_KEYWORDS,\n illegal: '</',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n {\n className: 'string',\n variants: [\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n {begin: '`', end: '`'},\n ]\n },\n {\n className: 'number',\n variants: [\n {begin: hljs.C_NUMBER_RE + '[i]', relevance: 1},\n hljs.C_NUMBER_MODE\n ]\n },\n {\n begin: /:=/ // relevance booster\n },\n {\n className: 'function',\n beginKeywords: 'func', end: '\\\\s*(\\\\{|$)', excludeEnd: true,\n contains: [\n hljs.TITLE_MODE,\n {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n keywords: GO_KEYWORDS,\n illegal: /[\"']/\n }\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n return {\n case_insensitive: true,\n keywords: {\n keyword:\n 'task project allprojects subprojects artifacts buildscript configurations ' +\n 'dependencies repositories sourceSets description delete from into include ' +\n 'exclude source classpath destinationDir includes options sourceCompatibility ' +\n 'targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant ' +\n 'def abstract break case catch continue default do else extends final finally ' +\n 'for if implements instanceof native new private protected public return static ' +\n 'switch synchronized throw throws transient try volatile while strictfp package ' +\n 'import false null super this true antlrtask checkstyle codenarc copy boolean ' +\n 'byte char class double float int interface long short void compile runTime ' +\n 'file fileTree abs any append asList asWritable call collect compareTo count ' +\n 'div dump each eachByte eachFile eachLine every find findAll flatten getAt ' +\n 'getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods ' +\n 'isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter ' +\n 'newReader newWriter next plus pop power previous print println push putAt read ' +\n 'readBytes readLines reverse reverseEach round size sort splitEachLine step subMap ' +\n 'times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader ' +\n 'withStream withWriter withWriterAppend write writeLine'\n },\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.NUMBER_MODE,\n hljs.REGEXP_MODE\n\n ]\n }\n};","module.exports = function(hljs) {\n return {\n keywords: {\n literal : 'true false null',\n keyword:\n 'byte short char int long boolean float double void ' +\n // groovy specific keywords\n 'def as in assert trait ' +\n // common keywords with Java\n 'super this abstract static volatile transient public private protected synchronized final ' +\n 'class interface enum if else for while switch case break default continue ' +\n 'throw throws try catch finally implements extends new import package return instanceof'\n },\n\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance : 0,\n contains : [\n {\n // eat up @'s in emails to prevent them to be recognized as doctags\n begin: /\\w+@/, relevance: 0\n },\n {\n className : 'doctag',\n begin : '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n {\n className: 'string',\n begin: '\"\"\"', end: '\"\"\"'\n },\n {\n className: 'string',\n begin: \"'''\", end: \"'''\"\n },\n {\n className: 'string',\n begin: \"\\\\$/\", end: \"/\\\\$\",\n relevance: 10\n },\n hljs.APOS_STRING_MODE,\n {\n className: 'regexp',\n begin: /~?\\/[^\\/\\n]+\\//,\n contains: [\n hljs.BACKSLASH_ESCAPE\n ]\n },\n hljs.QUOTE_STRING_MODE,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\", end: '$',\n illegal: '\\n'\n },\n hljs.BINARY_NUMBER_MODE,\n {\n className: 'class',\n beginKeywords: 'class interface trait enum', end: '{',\n illegal: ':',\n contains: [\n {beginKeywords: 'extends implements'},\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n hljs.C_NUMBER_MODE,\n {\n className: 'meta', begin: '@[A-Za-z]+'\n },\n {\n // highlight map keys and named parameters as strings\n className: 'string', begin: /[^\\?]{0}[A-Za-z0-9_$]+ *:/\n },\n {\n // catch middle element of the ternary operator\n // to avoid highlight it as a label, named parameter, or map key\n begin: /\\?/, end: /\\:/\n },\n {\n // highlight labeled statements\n className: 'symbol', begin: '^\\\\s*[A-Za-z0-9_$]+:',\n relevance: 0\n }\n ],\n illegal: /#|<\\//\n }\n};","module.exports = // TODO support filter tags like :javascript, support inline HTML\nfunction(hljs) {\n return {\n case_insensitive: true,\n contains: [\n {\n className: 'meta',\n begin: '^!!!( (5|1\\\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\\\b.*))?$',\n relevance: 10\n },\n // FIXME these comments should be allowed to span indented lines\n hljs.COMMENT(\n '^\\\\s*(!=#|=#|-#|/).*$',\n false,\n {\n relevance: 0\n }\n ),\n {\n begin: '^\\\\s*(-|=|!=)(?!#)',\n starts: {\n end: '\\\\n',\n subLanguage: 'ruby'\n }\n },\n {\n className: 'tag',\n begin: '^\\\\s*%',\n contains: [\n {\n className: 'selector-tag',\n begin: '\\\\w+'\n },\n {\n className: 'selector-id',\n begin: '#[\\\\w-]+'\n },\n {\n className: 'selector-class',\n begin: '\\\\.[\\\\w-]+'\n },\n {\n begin: '{\\\\s*',\n end: '\\\\s*}',\n contains: [\n {\n begin: ':\\\\w+\\\\s*=>',\n end: ',\\\\s+',\n returnBegin: true,\n endsWithParent: true,\n contains: [\n {\n className: 'attr',\n begin: ':\\\\w+'\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n {\n begin: '\\\\w+',\n relevance: 0\n }\n ]\n }\n ]\n },\n {\n begin: '\\\\(\\\\s*',\n end: '\\\\s*\\\\)',\n excludeEnd: true,\n contains: [\n {\n begin: '\\\\w+\\\\s*=',\n end: '\\\\s+',\n returnBegin: true,\n endsWithParent: true,\n contains: [\n {\n className: 'attr',\n begin: '\\\\w+',\n relevance: 0\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n {\n begin: '\\\\w+',\n relevance: 0\n }\n ]\n }\n ]\n }\n ]\n },\n {\n begin: '^\\\\s*[=~]\\\\s*'\n },\n {\n begin: '#{',\n starts: {\n end: '}',\n subLanguage: 'ruby'\n }\n }\n ]\n };\n};","module.exports = function (hljs) {\n var BUILT_INS = {'builtin-name': 'each in with if else unless bindattr action collection debugger log outlet template unbound view yield lookup'};\n\n var IDENTIFIER_PLAIN_OR_QUOTED = {\n begin: /\".*?\"|'.*?'|\\[.*?\\]|\\w+/\n };\n\n var EXPRESSION_OR_HELPER_CALL = hljs.inherit(IDENTIFIER_PLAIN_OR_QUOTED, {\n keywords: BUILT_INS,\n starts: {\n // helper params\n endsWithParent: true,\n relevance: 0,\n contains: [hljs.inherit(IDENTIFIER_PLAIN_OR_QUOTED, {relevance: 0})]\n }\n });\n\n var BLOCK_MUSTACHE_CONTENTS = hljs.inherit(EXPRESSION_OR_HELPER_CALL, {\n className: 'name'\n });\n\n var BASIC_MUSTACHE_CONTENTS = hljs.inherit(EXPRESSION_OR_HELPER_CALL, {\n // relevance 0 for backward compatibility concerning auto-detection\n relevance: 0\n });\n\n var ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH = {begin: /\\\\\\{\\{/, skip: true};\n var PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH = {begin: /\\\\\\\\(?=\\{\\{)/, skip: true};\n\n return {\n aliases: ['hbs', 'html.hbs', 'html.handlebars'],\n case_insensitive: true,\n subLanguage: 'xml',\n contains: [\n ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH,\n PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH,\n hljs.COMMENT(/\\{\\{!--/, /--\\}\\}/),\n hljs.COMMENT(/\\{\\{!/, /\\}\\}/),\n {\n // open raw block \"{{{{raw}}}} content not evaluated {{{{/raw}}}}\"\n className: 'template-tag',\n begin: /\\{\\{\\{\\{(?!\\/)/, end: /\\}\\}\\}\\}/,\n contains: [BLOCK_MUSTACHE_CONTENTS],\n starts: {end: /\\{\\{\\{\\{\\//, returnEnd: true, subLanguage: 'xml'}\n },\n {\n // close raw block\n className: 'template-tag',\n begin: /\\{\\{\\{\\{\\//, end: /\\}\\}\\}\\}/,\n contains: [BLOCK_MUSTACHE_CONTENTS]\n },\n {\n // open block statement\n className: 'template-tag',\n begin: /\\{\\{[#\\/]/, end: /\\}\\}/,\n contains: [BLOCK_MUSTACHE_CONTENTS],\n },\n {\n // template variable or helper-call that is NOT html-escaped\n className: 'template-variable',\n begin: /\\{\\{\\{/, end: /\\}\\}\\}/,\n keywords: BUILT_INS,\n contains: [BASIC_MUSTACHE_CONTENTS]\n },\n {\n // template variable or helper-call that is html-escaped\n className: 'template-variable',\n begin: /\\{\\{/, end: /\\}\\}/,\n keywords: BUILT_INS,\n contains: [BASIC_MUSTACHE_CONTENTS]\n }\n ]\n };\n};","module.exports = function(hljs) {\n var COMMENT = {\n variants: [\n hljs.COMMENT('--', '$'),\n hljs.COMMENT(\n '{-',\n '-}',\n {\n contains: ['self']\n }\n )\n ]\n };\n\n var PRAGMA = {\n className: 'meta',\n begin: '{-#', end: '#-}'\n };\n\n var PREPROCESSOR = {\n className: 'meta',\n begin: '^#', end: '$'\n };\n\n var CONSTRUCTOR = {\n className: 'type',\n begin: '\\\\b[A-Z][\\\\w\\']*', // TODO: other constructors (build-in, infix).\n relevance: 0\n };\n\n var LIST = {\n begin: '\\\\(', end: '\\\\)',\n illegal: '\"',\n contains: [\n PRAGMA,\n PREPROCESSOR,\n {className: 'type', begin: '\\\\b[A-Z][\\\\w]*(\\\\((\\\\.\\\\.|,|\\\\w+)\\\\))?'},\n hljs.inherit(hljs.TITLE_MODE, {begin: '[_a-z][\\\\w\\']*'}),\n COMMENT\n ]\n };\n\n var RECORD = {\n begin: '{', end: '}',\n contains: LIST.contains\n };\n\n return {\n aliases: ['hs'],\n keywords:\n 'let in if then else case of where do module import hiding ' +\n 'qualified type data newtype deriving class instance as default ' +\n 'infix infixl infixr foreign export ccall stdcall cplusplus ' +\n 'jvm dotnet safe unsafe family forall mdo proc rec',\n contains: [\n\n // Top-level constructions.\n\n {\n beginKeywords: 'module', end: 'where',\n keywords: 'module where',\n contains: [LIST, COMMENT],\n illegal: '\\\\W\\\\.|;'\n },\n {\n begin: '\\\\bimport\\\\b', end: '$',\n keywords: 'import qualified as hiding',\n contains: [LIST, COMMENT],\n illegal: '\\\\W\\\\.|;'\n },\n\n {\n className: 'class',\n begin: '^(\\\\s*)?(class|instance)\\\\b', end: 'where',\n keywords: 'class family instance where',\n contains: [CONSTRUCTOR, LIST, COMMENT]\n },\n {\n className: 'class',\n begin: '\\\\b(data|(new)?type)\\\\b', end: '$',\n keywords: 'data family type newtype deriving',\n contains: [PRAGMA, CONSTRUCTOR, LIST, RECORD, COMMENT]\n },\n {\n beginKeywords: 'default', end: '$',\n contains: [CONSTRUCTOR, LIST, COMMENT]\n },\n {\n beginKeywords: 'infix infixl infixr', end: '$',\n contains: [hljs.C_NUMBER_MODE, COMMENT]\n },\n {\n begin: '\\\\bforeign\\\\b', end: '$',\n keywords: 'foreign import export ccall stdcall cplusplus jvm ' +\n 'dotnet safe unsafe',\n contains: [CONSTRUCTOR, hljs.QUOTE_STRING_MODE, COMMENT]\n },\n {\n className: 'meta',\n begin: '#!\\\\/usr\\\\/bin\\\\/env\\ runhaskell', end: '$'\n },\n\n // \"Whitespaces\".\n\n PRAGMA,\n PREPROCESSOR,\n\n // Literals and names.\n\n // TODO: characters.\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE,\n CONSTRUCTOR,\n hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\\\w\\']*'}),\n\n COMMENT,\n\n {begin: '->|<-'} // No markup, relevance booster\n ]\n };\n};","module.exports = function(hljs) {\n var BUILT_INS = 'action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view';\n\n var ATTR_ASSIGNMENT = {\n illegal: /\\}\\}/,\n begin: /[a-zA-Z0-9_]+=/,\n returnBegin: true,\n relevance: 0,\n contains: [\n {\n className: 'attr', begin: /[a-zA-Z0-9_]+/\n }\n ]\n };\n\n var SUB_EXPR = {\n illegal: /\\}\\}/,\n begin: /\\)/, end: /\\)/,\n contains: [\n {\n begin: /[a-zA-Z\\.\\-]+/,\n keywords: {built_in: BUILT_INS},\n starts: {\n endsWithParent: true, relevance: 0,\n contains: [\n hljs.QUOTE_STRING_MODE,\n ]\n }\n }\n ]\n };\n\n var TAG_INNARDS = {\n endsWithParent: true, relevance: 0,\n keywords: {keyword: 'as', built_in: BUILT_INS},\n contains: [\n hljs.QUOTE_STRING_MODE,\n ATTR_ASSIGNMENT,\n hljs.NUMBER_MODE\n ]\n };\n\n return {\n case_insensitive: true,\n subLanguage: 'xml',\n contains: [\n hljs.COMMENT('{{!(--)?', '(--)?}}'),\n {\n className: 'template-tag',\n begin: /\\{\\{[#\\/]/, end: /\\}\\}/,\n contains: [\n {\n className: 'name',\n begin: /[a-zA-Z\\.\\-]+/,\n keywords: {'builtin-name': BUILT_INS},\n starts: TAG_INNARDS\n }\n ]\n },\n {\n className: 'template-variable',\n begin: /\\{\\{[a-zA-Z][a-zA-Z\\-]+/, end: /\\}\\}/,\n keywords: {keyword: 'as', built_in: BUILT_INS},\n contains: [\n hljs.QUOTE_STRING_MODE\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n var VERSION = 'HTTP/[0-9\\\\.]+';\n return {\n aliases: ['https'],\n illegal: '\\\\S',\n contains: [\n {\n begin: '^' + VERSION, end: '$',\n contains: [{className: 'number', begin: '\\\\b\\\\d{3}\\\\b'}]\n },\n {\n begin: '^[A-Z]+ (.*?) ' + VERSION + '$', returnBegin: true, end: '$',\n contains: [\n {\n className: 'string',\n begin: ' ', end: ' ',\n excludeBegin: true, excludeEnd: true\n },\n {\n begin: VERSION\n },\n {\n className: 'keyword',\n begin: '[A-Z]+'\n }\n ]\n },\n {\n className: 'attribute',\n begin: '^\\\\w', end: ': ', excludeEnd: true,\n illegal: '\\\\n|\\\\s|=',\n starts: {end: '$', relevance: 0}\n },\n {\n begin: '\\\\n\\\\n',\n starts: {subLanguage: [], endsWithParent: true}\n }\n ]\n };\n};","module.exports = function(hljs) {\n var STRING = {\n className: \"string\",\n contains: [hljs.BACKSLASH_ESCAPE],\n variants: [\n {\n begin: \"'''\", end: \"'''\",\n relevance: 10\n }, {\n begin: '\"\"\"', end: '\"\"\"',\n relevance: 10\n }, {\n begin: '\"', end: '\"'\n }, {\n begin: \"'\", end: \"'\"\n }\n ]\n };\n return {\n aliases: ['toml'],\n case_insensitive: true,\n illegal: /\\S/,\n contains: [\n hljs.COMMENT(';', '$'),\n hljs.HASH_COMMENT_MODE,\n {\n className: 'section',\n begin: /^\\s*\\[+/, end: /\\]+/\n },\n {\n begin: /^[a-z0-9\\[\\]_\\.-]+\\s*=\\s*/, end: '$',\n returnBegin: true,\n contains: [\n {\n className: 'attr',\n begin: /[a-z0-9\\[\\]_\\.-]+/\n },\n {\n begin: /=/, endsWithParent: true,\n relevance: 0,\n contains: [\n hljs.COMMENT(';', '$'),\n hljs.HASH_COMMENT_MODE,\n {\n className: 'literal',\n begin: /\\bon|off|true|false|yes|no\\b/\n },\n {\n className: 'variable',\n variants: [\n {begin: /\\$[\\w\\d\"][\\w\\d_]*/},\n {begin: /\\$\\{(.*?)}/}\n ]\n },\n STRING,\n {\n className: 'number',\n begin: /([\\+\\-]+)?[\\d]+_[\\d_]+/\n },\n hljs.NUMBER_MODE\n ]\n }\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n var JAVA_IDENT_RE = '[\\u00C0-\\u02B8a-zA-Z_$][\\u00C0-\\u02B8a-zA-Z_$0-9]*';\n var GENERIC_IDENT_RE = JAVA_IDENT_RE + '(<' + JAVA_IDENT_RE + '(\\\\s*,\\\\s*' + JAVA_IDENT_RE + ')*>)?';\n var KEYWORDS =\n 'false synchronized int abstract float private char boolean var static null if const ' +\n 'for true while long strictfp finally protected import native final void ' +\n 'enum else break transient catch instanceof byte super volatile case assert short ' +\n 'package default double public try this switch continue throws protected public private ' +\n 'module requires exports do';\n\n // https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html\n var JAVA_NUMBER_RE = '\\\\b' +\n '(' +\n '0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...\n '|' +\n '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...\n '|' +\n '(' +\n '([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+)(\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+))?' +\n '|' +\n '\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+)' +\n ')' +\n '([eE][-+]?\\\\d+)?' + // octal, decimal, float\n ')' +\n '[lLfF]?';\n var JAVA_NUMBER_MODE = {\n className: 'number',\n begin: JAVA_NUMBER_RE,\n relevance: 0\n };\n\n return {\n aliases: ['jsp'],\n keywords: KEYWORDS,\n illegal: /<\\/|#/,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance : 0,\n contains : [\n {\n // eat up @'s in emails to prevent them to be recognized as doctags\n begin: /\\w+@/, relevance: 0\n },\n {\n className : 'doctag',\n begin : '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n {\n className: 'class',\n beginKeywords: 'class interface', end: /[{;=]/, excludeEnd: true,\n keywords: 'class interface',\n illegal: /[:\"\\[\\]]/,\n contains: [\n {beginKeywords: 'extends implements'},\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n // Expression keywords prevent 'keyword Name(...)' from being\n // recognized as a function definition\n beginKeywords: 'new throw return else',\n relevance: 0\n },\n {\n className: 'function',\n begin: '(' + GENERIC_IDENT_RE + '\\\\s+)+' + hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(', returnBegin: true, end: /[{;=]/,\n excludeEnd: true,\n keywords: KEYWORDS,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(', returnBegin: true,\n relevance: 0,\n contains: [hljs.UNDERSCORE_TITLE_MODE]\n },\n {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n },\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n },\n JAVA_NUMBER_MODE,\n {\n className: 'meta', begin: '@[A-Za-z]+'\n }\n ]\n };\n};","module.exports = function(hljs) {\n var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n var KEYWORDS = {\n keyword:\n 'in of if for while finally var new function do return void else break catch ' +\n 'instanceof with throw case default try this switch continue typeof delete ' +\n 'let yield const export super debugger as async await static ' +\n // ECMAScript 6 modules import\n 'import from as'\n ,\n literal:\n 'true false null undefined NaN Infinity',\n built_in:\n 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +\n 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +\n 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +\n 'TypeError URIError Number Math Date String RegExp Array Float32Array ' +\n 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +\n 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +\n 'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +\n 'Promise'\n };\n var NUMBER = {\n className: 'number',\n variants: [\n { begin: '\\\\b(0[bB][01]+)n?' },\n { begin: '\\\\b(0[oO][0-7]+)n?' },\n { begin: hljs.C_NUMBER_RE + 'n?' }\n ],\n relevance: 0\n };\n var SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{', end: '\\\\}',\n keywords: KEYWORDS,\n contains: [] // defined later\n };\n var HTML_TEMPLATE = {\n begin: 'html`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml',\n }\n };\n var CSS_TEMPLATE = {\n begin: 'css`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css',\n }\n };\n var TEMPLATE_STRING = {\n className: 'string',\n begin: '`', end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n SUBST.contains = [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n NUMBER,\n hljs.REGEXP_MODE\n ];\n var PARAMS_CONTAINS = SUBST.contains.concat([\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]);\n\n return {\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS,\n contains: [\n {\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n {\n className: 'meta',\n begin: /^#!/, end: /$/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n hljs.C_LINE_COMMENT_MODE,\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance : 0,\n contains : [\n {\n className : 'doctag',\n begin : '@[A-Za-z]+',\n contains : [\n {\n className: 'type',\n begin: '\\\\{',\n end: '\\\\}',\n relevance: 0\n },\n {\n className: 'variable',\n begin: IDENT_RE + '(?=\\\\s*(-)|$)',\n endsParent: true,\n relevance: 0\n },\n // eat spaces (not newlines) so we can find\n // types or variables\n {\n begin: /(?=[^\\n])\\s/,\n relevance: 0\n },\n ]\n }\n ]\n }\n ),\n hljs.C_BLOCK_COMMENT_MODE,\n NUMBER,\n { // object attr container\n begin: /[{,\\n]\\s*/, relevance: 0,\n contains: [\n {\n begin: IDENT_RE + '\\\\s*:', returnBegin: true,\n relevance: 0,\n contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}]\n }\n ]\n },\n { // \"value\" container\n begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n keywords: 'return throw case',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n begin: '(\\\\(.*?\\\\)|' + IDENT_RE + ')\\\\s*=>', returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: IDENT_RE\n },\n {\n begin: /\\(\\s*\\)/,\n },\n {\n begin: /\\(/, end: /\\)/,\n excludeBegin: true, excludeEnd: true,\n keywords: KEYWORDS,\n contains: PARAMS_CONTAINS\n }\n ]\n }\n ]\n },\n {\n className: '',\n begin: /\\s/,\n end: /\\s*/,\n skip: true,\n },\n { // E4X / JSX\n begin: /</, end: /(\\/[A-Za-z0-9\\\\._:-]+|[A-Za-z0-9\\\\._:-]+\\/)>/,\n subLanguage: 'xml',\n contains: [\n { begin: /<[A-Za-z0-9\\\\._:-]+\\s*\\/>/, skip: true },\n {\n begin: /<[A-Za-z0-9\\\\._:-]+/, end: /(\\/[A-Za-z0-9\\\\._:-]+|[A-Za-z0-9\\\\._:-]+\\/)>/, skip: true,\n contains: [\n { begin: /<[A-Za-z0-9\\\\._:-]+\\s*\\/>/, skip: true },\n 'self'\n ]\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function', end: /\\{/, excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),\n {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n contains: PARAMS_CONTAINS\n }\n ],\n illegal: /\\[|%/\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n },\n hljs.METHOD_GUARD,\n { // ES6 class\n className: 'class',\n beginKeywords: 'class', end: /[{;=]/, excludeEnd: true,\n illegal: /[:\"\\[\\]]/,\n contains: [\n {beginKeywords: 'extends'},\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n beginKeywords: 'constructor get set', end: /\\{/, excludeEnd: true\n }\n ],\n illegal: /#(?!!)/\n };\n};","module.exports = function(hljs) {\n var LITERALS = {literal: 'true false null'};\n var ALLOWED_COMMENTS = [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n var TYPES = [\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE\n ];\n var VALUE_CONTAINER = {\n end: ',', endsWithParent: true, excludeEnd: true,\n contains: TYPES,\n keywords: LITERALS\n };\n var OBJECT = {\n begin: '{', end: '}',\n contains: [\n {\n className: 'attr',\n begin: /\"/, end: /\"/,\n contains: [hljs.BACKSLASH_ESCAPE],\n illegal: '\\\\n',\n },\n hljs.inherit(VALUE_CONTAINER, {begin: /:/})\n ].concat(ALLOWED_COMMENTS),\n illegal: '\\\\S'\n };\n var ARRAY = {\n begin: '\\\\[', end: '\\\\]',\n contains: [hljs.inherit(VALUE_CONTAINER)], // inherit is a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents\n illegal: '\\\\S'\n };\n TYPES.push(OBJECT, ARRAY);\n ALLOWED_COMMENTS.forEach(function(rule) {\n TYPES.push(rule)\n })\n return {\n contains: TYPES,\n keywords: LITERALS,\n illegal: '\\\\S'\n };\n};","module.exports = function(hljs) {\n // Since there are numerous special names in Julia, it is too much trouble\n // to maintain them by hand. Hence these names (i.e. keywords, literals and\n // built-ins) are automatically generated from Julia v0.6 itself through\n // the following scripts for each.\n\n var KEYWORDS = {\n // # keyword generator, multi-word keywords handled manually below\n // foreach(println, [\"in\", \"isa\", \"where\"])\n // for kw in Base.REPLCompletions.complete_keyword(\"\")\n // if !(contains(kw, \" \") || kw == \"struct\")\n // println(kw)\n // end\n // end\n keyword:\n 'in isa where ' +\n 'baremodule begin break catch ccall const continue do else elseif end export false finally for function ' +\n 'global if import importall let local macro module quote return true try using while ' +\n // legacy, to be deprecated in the next release\n 'type immutable abstract bitstype typealias ',\n\n // # literal generator\n // println(\"true\")\n // println(\"false\")\n // for name in Base.REPLCompletions.completions(\"\", 0)[1]\n // try\n // v = eval(Symbol(name))\n // if !(v isa Function || v isa Type || v isa TypeVar || v isa Module || v isa Colon)\n // println(name)\n // end\n // end\n // end\n literal:\n 'true false ' +\n 'ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort ' +\n 'NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway ' +\n 'RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im ' +\n 'nothing pi γ π φ ',\n\n // # built_in generator:\n // for name in Base.REPLCompletions.completions(\"\", 0)[1]\n // try\n // v = eval(Symbol(name))\n // if v isa Type || v isa TypeVar\n // println(name)\n // end\n // end\n // end\n built_in:\n 'ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet ' +\n 'AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat ' +\n 'AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal '+\n 'BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException ' +\n 'CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager ' +\n 'Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ' +\n 'ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t ' +\n 'Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict ' +\n 'DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ' +\n 'ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function ' +\n 'Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear ' +\n 'IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException ' +\n 'InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix ' +\n 'MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict ' +\n 'OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe ' +\n 'PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ' +\n 'ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode ' +\n 'RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed ' +\n 'SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange ' +\n 'StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal ' +\n 'Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry ' +\n 'TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError ' +\n 'UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector ' +\n 'VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool '\n };\n\n // ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names\n var VARIABLE_NAME_RE = '[A-Za-z_\\\\u00A1-\\\\uFFFF][A-Za-z_0-9\\\\u00A1-\\\\uFFFF]*';\n\n // placeholder for recursive self-reference\n var DEFAULT = {\n lexemes: VARIABLE_NAME_RE, keywords: KEYWORDS, illegal: /<\\//\n };\n\n // ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/\n var NUMBER = {\n className: 'number',\n // supported numeric literals:\n // * binary literal (e.g. 0x10)\n // * octal literal (e.g. 0o76543210)\n // * hexadecimal literal (e.g. 0xfedcba876543210)\n // * hexadecimal floating point literal (e.g. 0x1p0, 0x1.2p2)\n // * decimal literal (e.g. 9876543210, 100_000_000)\n // * floating pointe literal (e.g. 1.2, 1.2f, .2, 1., 1.2e10, 1.2e-10)\n begin: /(\\b0x[\\d_]*(\\.[\\d_]*)?|0x\\.\\d[\\d_]*)p[-+]?\\d+|\\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\\b\\d[\\d_]*(\\.[\\d_]*)?|\\.\\d[\\d_]*)([eEfF][-+]?\\d+)?/,\n relevance: 0\n };\n\n var CHAR = {\n className: 'string',\n begin: /'(.|\\\\[xXuU][a-zA-Z0-9]+)'/\n };\n\n var INTERPOLATION = {\n className: 'subst',\n begin: /\\$\\(/, end: /\\)/,\n keywords: KEYWORDS\n };\n\n var INTERPOLATED_VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + VARIABLE_NAME_RE\n };\n\n // TODO: neatly escape normal code in string literal\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],\n variants: [\n { begin: /\\w*\"\"\"/, end: /\"\"\"\\w*/, relevance: 10 },\n { begin: /\\w*\"/, end: /\"\\w*/ }\n ]\n };\n\n var COMMAND = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],\n begin: '`', end: '`'\n };\n\n var MACROCALL = {\n className: 'meta',\n begin: '@' + VARIABLE_NAME_RE\n };\n\n var COMMENT = {\n className: 'comment',\n variants: [\n { begin: '#=', end: '=#', relevance: 10 },\n { begin: '#', end: '$' }\n ]\n };\n\n DEFAULT.contains = [\n NUMBER,\n CHAR,\n STRING,\n COMMAND,\n MACROCALL,\n COMMENT,\n hljs.HASH_COMMENT_MODE,\n {\n className: 'keyword',\n begin:\n '\\\\b(((abstract|primitive)\\\\s+)type|(mutable\\\\s+)?struct)\\\\b'\n },\n {begin: /<:/} // relevance booster\n ];\n INTERPOLATION.contains = DEFAULT.contains;\n\n return DEFAULT;\n};","module.exports = function(hljs) {\n return {\n contains: [\n {\n className: 'meta',\n begin: /^julia>/,\n relevance: 10,\n starts: {\n // end the highlighting if we are on a new line and the line does not have at\n // least six spaces in the beginning\n end: /^(?![ ]{6})/,\n subLanguage: 'julia'\n },\n // jldoctest Markdown blocks are used in the Julia manual and package docs indicate\n // code snippets that should be verified when the documentation is built. They can be\n // either REPL-like or script-like, but are usually REPL-like and therefore we apply\n // julia-repl highlighting to them. More information can be found in Documenter's\n // manual: https://juliadocs.github.io/Documenter.jl/latest/man/doctests.html\n aliases: ['jldoctest']\n }\n ]\n }\n};","module.exports = function(hljs) {\n var KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual ' +\n // to be deleted soon\n 'trait volatile transient native default',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n var KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n var LABEL = {\n className: 'symbol', begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n var SUBST = {\n className: 'subst',\n begin: '\\\\${', end: '}', contains: [hljs.C_NUMBER_MODE]\n };\n var VARIABLE = {\n className: 'variable', begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n var STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"', end: '\"\"\"(?=[^\"])',\n contains: [VARIABLE, SUBST]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'', end: '\\'',\n illegal: /\\n/,\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: '\"', end: '\"',\n illegal: /\\n/,\n contains: [hljs.BACKSLASH_ESCAPE, VARIABLE, SUBST]\n }\n ]\n };\n SUBST.contains.push(STRING)\n\n var ANNOTATION_USE_SITE = {\n className: 'meta', begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n var ANNOTATION = {\n className: 'meta', begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/, end: /\\)/,\n contains: [\n hljs.inherit(STRING, {className: 'meta-string'})\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n var KOTLIN_NUMBER_RE = '\\\\b' +\n '(' +\n '0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...\n '|' +\n '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...\n '|' +\n '(' +\n '([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+)(\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+))?' +\n '|' +\n '\\\\.([\\\\d]+[\\\\d_]+[\\\\d]+|[\\\\d]+)' +\n ')' +\n '([eE][-+]?\\\\d+)?' + // octal, decimal, float\n ')' +\n '[lLfF]?';\n var KOTLIN_NUMBER_MODE = {\n className: 'number',\n begin: KOTLIN_NUMBER_RE,\n relevance: 0\n };\n var KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n { contains: [ hljs.C_BLOCK_COMMENT_MODE ] }\n );\n var KOTLIN_PAREN_TYPE = {\n variants: [\n\t { className: 'type',\n\t begin: hljs.UNDERSCORE_IDENT_RE\n\t },\n\t { begin: /\\(/, end: /\\)/,\n\t contains: [] //defined later\n\t }\n\t]\n };\n var KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n aliases: ['kt'],\n keywords: KEYWORDS,\n contains : [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance : 0,\n contains : [{\n className : 'doctag',\n begin : '@[A-Za-z]+'\n }]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun', end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n illegal: /fun\\s+(<.*>)?[^\\s\\(]+(\\s+[^\\s\\(]+)\\s*=/,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(', returnBegin: true,\n relevance: 0,\n contains: [hljs.UNDERSCORE_TITLE_MODE]\n },\n {\n className: 'type',\n begin: /</, end: />/, keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/, end: /[=,\\/]/, endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', end: /[:\\{(]|$/, // remove 'trait' when removed from KEYWORDS\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {beginKeywords: 'public protected internal private constructor'},\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</, end: />/, excludeBegin: true, excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/, end: /[<\\(,]|$/, excludeBegin: true, returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\", end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n};","module.exports = function(hljs) {\n return {\n contains: [\n {\n className: 'attribute',\n begin: '^dn', end: ': ', excludeEnd: true,\n starts: {end: '$', relevance: 0},\n relevance: 10\n },\n {\n className: 'attribute',\n begin: '^\\\\w', end: ': ', excludeEnd: true,\n starts: {end: '$', relevance: 0}\n },\n {\n className: 'literal',\n begin: '^-', end: '$'\n },\n hljs.HASH_COMMENT_MODE\n ]\n };\n};","module.exports = function(hljs) {\n var IDENT_RE = '[\\\\w-]+'; // yes, Less identifiers may begin with a digit\n var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';\n\n /* Generic Modes */\n\n var RULES = [], VALUE = []; // forward def. for recursive modes\n\n var STRING_MODE = function(c) { return {\n // Less strings are not multiline (also include '~' for more consistent coloring of \"escaped\" strings)\n className: 'string', begin: '~?' + c + '.*?' + c\n };};\n\n var IDENT_MODE = function(name, begin, relevance) { return {\n className: name, begin: begin, relevance: relevance\n };};\n\n var PARENS_MODE = {\n // used only to properly balance nested parens inside mixin call, def. arg list\n begin: '\\\\(', end: '\\\\)', contains: VALUE, relevance: 0\n };\n\n // generic Less highlighter (used almost everywhere except selectors):\n VALUE.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING_MODE(\"'\"),\n STRING_MODE('\"'),\n hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(\n {\n begin: '(url|data-uri)\\\\(',\n starts: {className: 'string', end: '[\\\\)\\\\n]', excludeEnd: true}\n },\n IDENT_MODE('number', '#[0-9A-Fa-f]+\\\\b'),\n PARENS_MODE,\n IDENT_MODE('variable', '@@?' + IDENT_RE, 10),\n IDENT_MODE('variable', '@{' + IDENT_RE + '}'),\n IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string\n { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):\n className: 'attribute', begin: IDENT_RE + '\\\\s*:', end: ':', returnBegin: true, excludeEnd: true\n },\n {\n className: 'meta',\n begin: '!important'\n }\n );\n\n var VALUE_WITH_RULESETS = VALUE.concat({\n begin: '{', end: '}', contains: RULES\n });\n\n var MIXIN_GUARD_MODE = {\n beginKeywords: 'when', endsWithParent: true,\n contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match\n };\n\n /* Rule-Level Modes */\n\n var RULE_MODE = {\n begin: INTERP_IDENT_RE + '\\\\s*:', returnBegin: true, end: '[;}]',\n relevance: 0,\n contains: [\n {\n className: 'attribute',\n begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,\n starts: {\n endsWithParent: true, illegal: '[<=$]',\n relevance: 0,\n contains: VALUE\n }\n }\n ]\n };\n\n var AT_RULE_MODE = {\n className: 'keyword',\n begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\\\b',\n starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}\n };\n\n // variable definitions and calls\n var VAR_RULE_MODE = {\n className: 'variable',\n variants: [\n // using more strict pattern for higher relevance to increase chances of Less detection.\n // this is *the only* Less specific statement used in most of the sources, so...\n // (we’ll still often loose to the css-parser unless there's '//' comment,\n // simply because 1 variable just can't beat 99 properties :)\n {begin: '@' + IDENT_RE + '\\\\s*:', relevance: 15},\n {begin: '@' + IDENT_RE}\n ],\n starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}\n };\n\n var SELECTOR_MODE = {\n // first parse unambiguous selectors (i.e. those not starting with tag)\n // then fall into the scary lookahead-discriminator variant.\n // this mode also handles mixin definitions and calls\n variants: [{\n begin: '[\\\\.#:&\\\\[>]', end: '[;{}]' // mixin calls end with ';'\n }, {\n begin: INTERP_IDENT_RE, end: '{'\n }],\n returnBegin: true,\n returnEnd: true,\n illegal: '[<=\\'$\"]',\n relevance: 0,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n MIXIN_GUARD_MODE,\n IDENT_MODE('keyword', 'all\\\\b'),\n IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise it’s identified as tag\n IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes \"tags\"\n IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),\n IDENT_MODE('selector-class', '\\\\.' + INTERP_IDENT_RE, 0),\n IDENT_MODE('selector-tag', '&', 0),\n {className: 'selector-attr', begin: '\\\\[', end: '\\\\]'},\n {className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\"'.]+/},\n {begin: '\\\\(', end: '\\\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins\n {begin: '!important'} // eat !important after mixin call or it will be colored as tag\n ]\n };\n\n RULES.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AT_RULE_MODE,\n VAR_RULE_MODE,\n RULE_MODE,\n SELECTOR_MODE\n );\n\n return {\n case_insensitive: true,\n illegal: '[=>\\'/<($\"]',\n contains: RULES\n };\n};","module.exports = function(hljs) {\n var LISP_IDENT_RE = '[a-zA-Z_\\\\-\\\\+\\\\*\\\\/\\\\<\\\\=\\\\>\\\\&\\\\#][a-zA-Z0-9_\\\\-\\\\+\\\\*\\\\/\\\\<\\\\=\\\\>\\\\&\\\\#!]*';\n var MEC_RE = '\\\\|[^]*?\\\\|';\n var LISP_SIMPLE_NUMBER_RE = '(\\\\-|\\\\+)?\\\\d+(\\\\.\\\\d+|\\\\/\\\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\\\+|\\\\-)?\\\\d+)?';\n var SHEBANG = {\n className: 'meta',\n begin: '^#!', end: '$'\n };\n var LITERAL = {\n className: 'literal',\n begin: '\\\\b(t{1}|nil)\\\\b'\n };\n var NUMBER = {\n className: 'number',\n variants: [\n {begin: LISP_SIMPLE_NUMBER_RE, relevance: 0},\n {begin: '#(b|B)[0-1]+(/[0-1]+)?'},\n {begin: '#(o|O)[0-7]+(/[0-7]+)?'},\n {begin: '#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?'},\n {begin: '#(c|C)\\\\(' + LISP_SIMPLE_NUMBER_RE + ' +' + LISP_SIMPLE_NUMBER_RE, end: '\\\\)'}\n ]\n };\n var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});\n var COMMENT = hljs.COMMENT(\n ';', '$',\n {\n relevance: 0\n }\n );\n var VARIABLE = {\n begin: '\\\\*', end: '\\\\*'\n };\n var KEYWORD = {\n className: 'symbol',\n begin: '[:&]' + LISP_IDENT_RE\n };\n var IDENT = {\n begin: LISP_IDENT_RE,\n relevance: 0\n };\n var MEC = {\n begin: MEC_RE\n };\n var QUOTED_LIST = {\n begin: '\\\\(', end: '\\\\)',\n contains: ['self', LITERAL, STRING, NUMBER, IDENT]\n };\n var QUOTED = {\n contains: [NUMBER, STRING, VARIABLE, KEYWORD, QUOTED_LIST, IDENT],\n variants: [\n {\n begin: '[\\'`]\\\\(', end: '\\\\)'\n },\n {\n begin: '\\\\(quote ', end: '\\\\)',\n keywords: {name: 'quote'}\n },\n {\n begin: '\\'' + MEC_RE\n }\n ]\n };\n var QUOTED_ATOM = {\n variants: [\n {begin: '\\'' + LISP_IDENT_RE},\n {begin: '#\\'' + LISP_IDENT_RE + '(::' + LISP_IDENT_RE + ')*'}\n ]\n };\n var LIST = {\n begin: '\\\\(\\\\s*', end: '\\\\)'\n };\n var BODY = {\n endsWithParent: true,\n relevance: 0\n };\n LIST.contains = [\n {\n className: 'name',\n variants: [\n {begin: LISP_IDENT_RE},\n {begin: MEC_RE}\n ]\n },\n BODY\n ];\n BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD, MEC, IDENT];\n\n return {\n illegal: /\\S/,\n contains: [\n NUMBER,\n SHEBANG,\n LITERAL,\n STRING,\n COMMENT,\n QUOTED,\n QUOTED_ATOM,\n LIST,\n IDENT\n ]\n };\n};","module.exports = function(hljs) {\n var KEYWORDS = {\n keyword:\n // JS keywords\n 'in if for while finally new do return else break catch instanceof throw try this ' +\n 'switch continue typeof delete debugger case default function var with ' +\n // LiveScript keywords\n 'then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super ' +\n 'case default function var void const let enum export import native list map ' +\n '__hasProp __extends __slice __bind __indexOf',\n literal:\n // JS literals\n 'true false null undefined ' +\n // LiveScript literals\n 'yes no on off it that void',\n built_in:\n 'npm require console print module global window document'\n };\n var JS_IDENT_RE = '[A-Za-z$_](?:\\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';\n var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});\n var SUBST = {\n className: 'subst',\n begin: /#\\{/, end: /}/,\n keywords: KEYWORDS\n };\n var SUBST_SIMPLE = {\n className: 'subst',\n begin: /#[A-Za-z$_]/, end: /(?:\\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,\n keywords: KEYWORDS\n };\n var EXPRESSIONS = [\n hljs.BINARY_NUMBER_MODE,\n {\n className: 'number',\n begin: '(\\\\b0[xX][a-fA-F0-9_]+)|(\\\\b\\\\d(\\\\d|_\\\\d)*(\\\\.(\\\\d(\\\\d|_\\\\d)*)?)?(_*[eE]([-+]\\\\d(_\\\\d|\\\\d)*)?)?[_a-z]*)',\n relevance: 0,\n starts: {end: '(\\\\s*/)?', relevance: 0} // a number tries to eat the following slash to prevent treating it as a regexp\n },\n {\n className: 'string',\n variants: [\n {\n begin: /'''/, end: /'''/,\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: /'/, end: /'/,\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: /\"\"\"/, end: /\"\"\"/,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]\n },\n {\n begin: /\"/, end: /\"/,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]\n },\n {\n begin: /\\\\/, end: /(\\s|$)/,\n excludeEnd: true\n }\n ]\n },\n {\n className: 'regexp',\n variants: [\n {\n begin: '//', end: '//[gim]*',\n contains: [SUBST, hljs.HASH_COMMENT_MODE]\n },\n {\n // regex can't start with space to parse x / 2 / 3 as two divisions\n // regex can't start with *, and it supports an \"illegal\" in the main mode\n begin: /\\/(?![ *])(\\\\\\/|.)*?\\/[gim]*(?=\\W)/\n }\n ]\n },\n {\n begin: '@' + JS_IDENT_RE\n },\n {\n begin: '``', end: '``',\n excludeBegin: true, excludeEnd: true,\n subLanguage: 'javascript'\n }\n ];\n SUBST.contains = EXPRESSIONS;\n\n var PARAMS = {\n className: 'params',\n begin: '\\\\(', returnBegin: true,\n /* We need another contained nameless mode to not have every nested\n pair of parens to be called \"params\" */\n contains: [\n {\n begin: /\\(/, end: /\\)/,\n keywords: KEYWORDS,\n contains: ['self'].concat(EXPRESSIONS)\n }\n ]\n };\n\n var SYMBOLS = {\n begin: '(#=>|=>|\\\\|>>|-?->|\\\\!->)'\n };\n\n return {\n aliases: ['ls'],\n keywords: KEYWORDS,\n illegal: /\\/\\*/,\n contains: EXPRESSIONS.concat([\n hljs.COMMENT('\\\\/\\\\*', '\\\\*\\\\/'),\n hljs.HASH_COMMENT_MODE,\n SYMBOLS, // relevance booster\n {\n className: 'function',\n contains: [TITLE, PARAMS],\n returnBegin: true,\n variants: [\n {\n begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?(\\\\(.*\\\\))?\\\\s*\\\\B\\\\->\\\\*?', end: '\\\\->\\\\*?'\n },\n {\n begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?!?(\\\\(.*\\\\))?\\\\s*\\\\B[-~]{1,2}>\\\\*?', end: '[-~]{1,2}>\\\\*?'\n },\n {\n begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?(\\\\(.*\\\\))?\\\\s*\\\\B!?[-~]{1,2}>\\\\*?', end: '!?[-~]{1,2}>\\\\*?'\n }\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class',\n end: '$',\n illegal: /[:=\"\\[\\]]/,\n contains: [\n {\n beginKeywords: 'extends',\n endsWithParent: true,\n illegal: /[:=\"\\[\\]]/,\n contains: [TITLE]\n },\n TITLE\n ]\n },\n {\n begin: JS_IDENT_RE + ':', end: ':',\n returnBegin: true, returnEnd: true,\n relevance: 0\n }\n ])\n };\n};","module.exports = function(hljs) {\n var OPENING_LONG_BRACKET = '\\\\[=*\\\\[';\n var CLOSING_LONG_BRACKET = '\\\\]=*\\\\]';\n var LONG_BRACKETS = {\n begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,\n contains: ['self']\n };\n var COMMENTS = [\n hljs.COMMENT('--(?!' + OPENING_LONG_BRACKET + ')', '$'),\n hljs.COMMENT(\n '--' + OPENING_LONG_BRACKET,\n CLOSING_LONG_BRACKET,\n {\n contains: [LONG_BRACKETS],\n relevance: 10\n }\n )\n ];\n return {\n lexemes: hljs.UNDERSCORE_IDENT_RE,\n keywords: {\n literal: \"true false nil\",\n keyword: \"and break do else elseif end for goto if in local not or repeat return then until while\",\n built_in:\n //Metatags and globals:\n '_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len ' +\n '__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert ' +\n //Standard methods and properties:\n 'collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring' +\n 'module next pairs pcall print rawequal rawget rawset require select setfenv' +\n 'setmetatable tonumber tostring type unpack xpcall arg self' +\n //Library methods and properties (one line per library):\n 'coroutine resume yield status wrap create running debug getupvalue ' +\n 'debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv ' +\n 'io lines write close flush open output type read stderr stdin input stdout popen tmpfile ' +\n 'math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan ' +\n 'os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall ' +\n 'string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower ' +\n 'table setn insert getn foreachi maxn foreach concat sort remove'\n },\n contains: COMMENTS.concat([\n {\n className: 'function',\n beginKeywords: 'function', end: '\\\\)',\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\\\w*\\\\.)*([_a-zA-Z]\\\\w*:)?[_a-zA-Z]\\\\w*'}),\n {\n className: 'params',\n begin: '\\\\(', endsWithParent: true,\n contains: COMMENTS\n }\n ].concat(COMMENTS)\n },\n hljs.C_NUMBER_MODE,\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n {\n className: 'string',\n begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,\n contains: [LONG_BRACKETS],\n relevance: 5\n }\n ])\n };\n};","module.exports = function(hljs) {\n /* Variables: simple (eg $(var)) and special (eg $@) */\n var VARIABLE = {\n className: 'variable',\n variants: [\n {\n begin: '\\\\$\\\\(' + hljs.UNDERSCORE_IDENT_RE + '\\\\)',\n contains: [hljs.BACKSLASH_ESCAPE],\n },\n {\n begin: /\\$[@%<?\\^\\+\\*]/\n },\n ]\n };\n /* Quoted string with variables inside */\n var QUOTE_STRING = {\n className: 'string',\n begin: /\"/, end: /\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n ]\n };\n /* Function: $(func arg,...) */\n var FUNC = {\n className: 'variable',\n begin: /\\$\\([\\w-]+\\s/, end: /\\)/,\n keywords: {\n built_in:\n 'subst patsubst strip findstring filter filter-out sort ' +\n 'word wordlist firstword lastword dir notdir suffix basename ' +\n 'addsuffix addprefix join wildcard realpath abspath error warning ' +\n 'shell origin flavor foreach if or and call eval file value',\n },\n contains: [\n VARIABLE,\n ]\n };\n /* Variable assignment */\n var ASSIGNMENT = {\n begin: '^' + hljs.UNDERSCORE_IDENT_RE + '\\\\s*(?=[:+?]?=)'\n };\n /* Meta targets (.PHONY) */\n var META = {\n className: 'meta',\n begin: /^\\.PHONY:/, end: /$/,\n keywords: {'meta-keyword': '.PHONY'},\n lexemes: /[\\.\\w]+/\n };\n /* Targets */\n var TARGET = {\n className: 'section',\n begin: /^[^\\s]+:/, end: /$/,\n contains: [VARIABLE,]\n };\n return {\n aliases: ['mk', 'mak'],\n keywords:\n 'define endef undefine ifdef ifndef ifeq ifneq else endif ' +\n 'include -include sinclude override export unexport private vpath',\n lexemes: /[\\w-]+/,\n contains: [\n hljs.HASH_COMMENT_MODE,\n VARIABLE,\n QUOTE_STRING,\n FUNC,\n ASSIGNMENT,\n META,\n TARGET,\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['md', 'mkdown', 'mkd'],\n contains: [\n // highlight headers\n {\n className: 'section',\n variants: [\n { begin: '^#{1,6}', end: '$' },\n { begin: '^.+?\\\\n[=-]{2,}$' }\n ]\n },\n // inline html\n {\n begin: '<', end: '>',\n subLanguage: 'xml',\n relevance: 0\n },\n // lists (indicators only)\n {\n className: 'bullet',\n begin: '^\\\\s*([*+-]|(\\\\d+\\\\.))\\\\s+'\n },\n // strong segments\n {\n className: 'strong',\n begin: '[*_]{2}.+?[*_]{2}'\n },\n // emphasis segments\n {\n className: 'emphasis',\n variants: [\n { begin: '\\\\*.+?\\\\*' },\n { begin: '_.+?_'\n , relevance: 0\n }\n ]\n },\n // blockquotes\n {\n className: 'quote',\n begin: '^>\\\\s+', end: '$'\n },\n // code snippets\n {\n className: 'code',\n variants: [\n {\n begin: '^```\\\\w*\\\\s*$', end: '^```[ ]*$'\n },\n {\n begin: '`.+?`'\n },\n {\n begin: '^( {4}|\\\\t)', end: '$',\n relevance: 0\n }\n ]\n },\n // horizontal rules\n {\n begin: '^[-\\\\*]{3,}', end: '$'\n },\n // using links - title and link\n {\n begin: '\\\\[.+?\\\\][\\\\(\\\\[].*?[\\\\)\\\\]]',\n returnBegin: true,\n contains: [\n {\n className: 'string',\n begin: '\\\\[', end: '\\\\]',\n excludeBegin: true,\n returnEnd: true,\n relevance: 0\n },\n {\n className: 'link',\n begin: '\\\\]\\\\(', end: '\\\\)',\n excludeBegin: true, excludeEnd: true\n },\n {\n className: 'symbol',\n begin: '\\\\]\\\\[', end: '\\\\]',\n excludeBegin: true, excludeEnd: true\n }\n ],\n relevance: 10\n },\n {\n begin: /^\\[[^\\n]+\\]:/,\n returnBegin: true,\n contains: [\n {\n className: 'symbol',\n begin: /\\[/, end: /\\]/,\n excludeBegin: true, excludeEnd: true\n },\n {\n className: 'link',\n begin: /:\\s*/, end: /$/,\n excludeBegin: true\n }\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['mma', 'wl'],\n lexemes: '(\\\\$|\\\\b)' + hljs.IDENT_RE + '\\\\b',\n //\n // The list of \"keywords\" (System` symbols) was determined by evaluating the following Wolfram Language code in Mathematica 12.0:\n //\n // StringRiffle[\n // \"'\" <> StringRiffle[#, \" \"] <> \"'\" & /@\n // Values[GroupBy[\n // Select[Names[\"System`*\"],\n // StringStartsQ[#, CharacterRange[\"A\", \"Z\"] | \"$\"] &],\n // First[Characters[#]] &]], \" +\\n\"]\n //\n keywords: 'AASTriangle AbelianGroup Abort AbortKernels AbortProtect AbortScheduledTask Above Abs AbsArg AbsArgPlot Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AcceptanceThreshold AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Activate Active ActiveClassification ActiveClassificationObject ActiveItem ActivePrediction ActivePredictionObject ActiveStyle AcyclicGraphQ AddOnHelpPath AddSides AddTo AddToSearchIndex AddUsers AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AdministrativeDivisionData AffineHalfSpace AffineSpace AffineStateSpaceModel AffineTransform After AggregatedEntityClass AggregationLayer AircraftData AirportData AirPressureData AirTemperatureData AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowAdultContent AllowedCloudExtraParameters AllowedCloudParameterExtensions AllowedDimensions AllowedFrequencyRange AllowedHeads AllowGroupClose AllowIncomplete AllowInlineCells AllowKernelInitialization AllowLooseGrammar AllowReverseGroupClose AllowScriptLevelChange AllTrue Alphabet AlphabeticOrder AlphabeticSort AlphaChannel AlternateImage AlternatingFactorial AlternatingGroup AlternativeHypothesis Alternatives AltitudeMethod AmbientLight AmbiguityFunction AmbiguityList Analytic AnatomyData AnatomyForm AnatomyPlot3D AnatomySkinStyle AnatomyStyling AnchoredSearch And AndersonDarlingTest AngerJ AngleBisector AngleBracket AnglePath AnglePath3D AngleVector AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning AnimationRunTime AnimationTimeIndex Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotate Annotation AnnotationDelete AnnotationNames AnnotationRules AnnotationValue Annuity AnnuityDue Annulus AnomalyDetection AnomalyDetectorFunction Anonymous Antialiasing AntihermitianMatrixQ Antisymmetric AntisymmetricMatrixQ Antonyms AnyOrder AnySubset AnyTrue Apart ApartSquareFree APIFunction Appearance AppearanceElements AppearanceRules AppellF1 Append AppendCheck AppendLayer AppendTo ApplicationIdentificationKey Apply ApplySides ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcCurvature ARCHProcess ArcLength ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Area Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess Around AroundReplace ARProcess Array ArrayComponents ArrayDepth ArrayFilter ArrayFlatten ArrayMesh ArrayPad ArrayPlot ArrayQ ArrayResample ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads ASATriangle Ask AskAppend AskConfirm AskDisplay AskedQ AskedValue AskFunction AskState AskTemplateDisplay AspectRatio AspectRatioFixed Assert AssociateTo Association AssociationFormat AssociationMap AssociationQ AssociationThread AssumeDeterministic Assuming Assumptions AstronomicalData AsymptoticDSolveValue AsymptoticEqual AsymptoticEquivalent AsymptoticGreater AsymptoticGreaterEqual AsymptoticIntegrate AsymptoticLess AsymptoticLessEqual AsymptoticOutputTracker AsymptoticRSolveValue AsymptoticSolve AsymptoticSum Asynchronous AsynchronousTaskObject AsynchronousTasks Atom AtomCoordinates AtomCount AtomDiagramCoordinates AtomList AtomQ AttentionLayer Attributes Audio AudioAmplify AudioAnnotate AudioAnnotationLookup AudioBlockMap AudioCapture AudioChannelAssignment AudioChannelCombine AudioChannelMix AudioChannels AudioChannelSeparate AudioData AudioDelay AudioDelete AudioDevice AudioDistance AudioFade AudioFrequencyShift AudioGenerator AudioIdentify AudioInputDevice AudioInsert AudioIntervals AudioJoin AudioLabel AudioLength AudioLocalMeasurements AudioLooping AudioLoudness AudioMeasurements AudioNormalize AudioOutputDevice AudioOverlay AudioPad AudioPan AudioPartition AudioPause AudioPitchShift AudioPlay AudioPlot AudioQ AudioRecord AudioReplace AudioResample AudioReverb AudioSampleRate AudioSpectralMap AudioSpectralTransformation AudioSplit AudioStop AudioStream AudioStreams AudioTimeStretch AudioTrim AudioType AugmentedPolyhedron AugmentedSymmetricPolynomial Authenticate Authentication AuthenticationDialog AutoAction Autocomplete AutocompletionFunction AutoCopy AutocorrelationTest AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutoQuoteCharacters AutoRefreshed AutoRemove AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords AutoSubmitting Axes AxesEdge AxesLabel AxesOrigin AxesStyle AxiomaticTheory Axis' +\n 'BabyMonsterGroupB Back Background BackgroundAppearance BackgroundTasksSettings Backslash Backsubstitution Backward Ball Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarcodeImage BarcodeRecognize BaringhausHenzeTest BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseDecode BaseEncode BaseForm Baseline BaselinePosition BaseStyle BasicRecurrentLayer BatchNormalizationLayer BatchSize BatesDistribution BattleLemarieWavelet BayesianMaximization BayesianMaximizationObject BayesianMinimization BayesianMinimizationObject Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized Between BetweennessCentrality BeveledPolyhedron BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryDeserialize BinaryDistance BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinarySerialize BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BiquadraticFilterModel BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor BiweightLocation BiweightMidvariance Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockchainAddressData BlockchainBase BlockchainBlockData BlockchainContractValue BlockchainData BlockchainGet BlockchainKeyEncode BlockchainPut BlockchainTokenData BlockchainTransaction BlockchainTransactionData BlockchainTransactionSign BlockchainTransactionSubmit BlockMap BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bond BondCount BondList BondQ Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms BooleanQ BooleanRegion Booleans BooleanStrings BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryDiscretizeGraphics BoundaryDiscretizeRegion BoundaryMesh BoundaryMeshRegion BoundaryMeshRegionQ BoundaryStyle BoundedRegionQ BoundingRegion Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxObject BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break BridgeData BrightnessEqualize BroadcastStationData Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurve3DBoxOptions BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BSplineSurface3DBoxOptions BubbleChart BubbleChart3D BubbleScale BubbleSizes BuildingData BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteArray ByteArrayFormat ByteArrayQ ByteArrayToString ByteCount ByteOrdering' +\n 'C CachedValue CacheGraphics CachePersistence CalendarConvert CalendarData CalendarType Callout CalloutMarker CalloutStyle CallPacket CanberraDistance Cancel CancelButton CandlestickChart CanonicalGraph CanonicalizePolygon CanonicalizePolyhedron CanonicalName CanonicalWarpingCorrespondence CanonicalWarpingDistance CantorMesh CantorStaircase Cap CapForm CapitalDifferentialD Capitalize CapsuleShape CaptureRunning CardinalBSplineBasis CarlemanLinearize CarmichaelLambda CaseOrdering Cases CaseSensitive Cashflow Casoratian Catalan CatalanNumber Catch Catenate CatenateLayer CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling CelestialSystem Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEvaluationLanguage CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellLabelStyle CellLabelTemplate CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterArray CenterDot CentralFeature CentralMoment CentralMomentGeneratingFunction Cepstrogram CepstrogramArray CepstrumArray CForm ChampernowneNumber ChangeOptions ChannelBase ChannelBrokerAction ChannelDatabin ChannelHistoryLength ChannelListen ChannelListener ChannelListeners ChannelListenerWait ChannelObject ChannelPreSendFunction ChannelReceiverFunction ChannelSend ChannelSubscribers ChanVeseBinarize Character CharacterCounts CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterName CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop ChromaticityPlot ChromaticityPlot3D ChromaticPolynomial Circle CircleBox CircleDot CircleMinus CirclePlus CirclePoints CircleThrough CircleTimes CirculantGraph CircularOrthogonalMatrixDistribution CircularQuaternionMatrixDistribution CircularRealMatrixDistribution CircularSymplecticMatrixDistribution CircularUnitaryMatrixDistribution Circumsphere CityData ClassifierFunction ClassifierInformation ClassifierMeasurements ClassifierMeasurementsObject Classify ClassPriors Clear ClearAll ClearAttributes ClearCookies ClearPermissions ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipPlanesStyle ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent CloudAccountData CloudBase CloudConnect CloudDeploy CloudDirectory CloudDisconnect CloudEvaluate CloudExport CloudExpression CloudExpressions CloudFunction CloudGet CloudImport CloudLoggingData CloudObject CloudObjectInformation CloudObjectInformationData CloudObjectNameFormat CloudObjects CloudObjectURLType CloudPublish CloudPut CloudRenderingMethod CloudSave CloudShare CloudSubmit CloudSymbol CloudUnshare ClusterClassify ClusterDissimilarityFunction ClusteringComponents ClusteringTree CMYKColor Coarse CodeAssistOptions Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorBalance ColorCombine ColorConvert ColorCoverage ColorData ColorDataFunction ColorDetect ColorDistance ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQ ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorsNear ColorSpace ColorToneMapping Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CombinedEntityClass CombinerFunction CometData CommonDefaultFormatTypes Commonest CommonestFilter CommonName CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompanyData CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledCodeFunction CompiledFunction CompilerOptions Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComplexListPlot ComplexPlot ComplexPlot3D ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries CompositeQ Composition CompoundElement CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData ComputeUncertainty Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath ConformAudio ConformImages Congruent ConicHullRegion ConicHullRegion3DBox ConicHullRegionBox ConicOptimization Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphComponents ConnectedGraphQ ConnectedMeshComponents ConnectedMoleculeComponents ConnectedMoleculeQ ConnectionSettings ConnectLibraryCallbackFunction ConnectSystemModelComponents ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray ConstantArrayLayer ConstantImage ConstantPlusLayer ConstantRegionQ Constants ConstantTimesLayer ConstellationData ConstrainedMax ConstrainedMin Construct Containing ContainsAll ContainsAny ContainsExactly ContainsNone ContainsOnly ContentFieldOptions ContentLocationFunction ContentObject ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTask ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean ContrastiveLossLayer Control ControlActive ControlAlignment ControlGroupContentsBox ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket ConvexHullMesh ConvexPolygonQ ConvexPolyhedronQ ConvolutionLayer Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CookieFunction Cookies CoordinateBoundingBox CoordinateBoundingBoxArray CoordinateBounds CoordinateBoundsArray CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDatabin CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CountDistinct CountDistinctBy CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Counts CountsBy Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateCellID CreateChannel CreateCloudExpression CreateDatabin CreateDataSystemModel CreateDialog CreateDirectory CreateDocument CreateFile CreateIntermediateDirectories CreateManagedLibraryExpression CreateNotebook CreatePalette CreatePalettePacket CreatePermissionsGroup CreateScheduledTask CreateSearchIndex CreateSystemModel CreateTemporary CreateUUID CreateWindow CriterionFunction CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossEntropyLossLayer CrossingCount CrossingDetect CrossingPolygon CrossMatrix Csc Csch CTCLossLayer Cube CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrencyConvert CurrentDate CurrentImage CurrentlySpeakingPacket CurrentNotebookImage CurrentScreenImage CurrentValue Curry CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition' +\n 'D DagumDistribution DamData DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DatabaseConnect DatabaseDisconnect DatabaseReference Databin DatabinAdd DatabinRemove Databins DatabinUpload DataCompression DataDistribution DataRange DataReversed Dataset Date DateBounds Dated DateDelimiters DateDifference DatedUnit DateFormat DateFunction DateHistogram DateList DateListLogPlot DateListPlot DateListStepPlot DateObject DateObjectQ DateOverlapsQ DatePattern DatePlus DateRange DateReduction DateString DateTicksFormat DateValue DateWithinQ DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayHemisphere DaylightQ DayMatchQ DayName DayNightTerminator DayPlus DayRange DayRound DeBruijnGraph DeBruijnSequence Debug DebugTag Decapitalize Decimal DecimalForm DeclareKnownSymbols DeclarePackage Decompose DeconvolutionLayer Decrement Decrypt DecryptFile DedekindEta DeepSpaceProbeData Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultPrintPrecision DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValue DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod DefineResourceFunction Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic DEigensystem DEigenvalues Deinitialization Del DelaunayMesh Delayed Deletable Delete DeleteAnomalies DeleteBorderComponents DeleteCases DeleteChannel DeleteCloudExpression DeleteContents DeleteDirectory DeleteDuplicates DeleteDuplicatesBy DeleteFile DeleteMissing DeleteObject DeletePermissionsKey DeleteSearchIndex DeleteSmallComponents DeleteStopwords DeleteWithContents DeletionWarning DelimitedArray DelimitedSequence Delimiter DelimiterFlashTime DelimiterMatching Delimiters DeliveryFunction Dendrogram Denominator DensityGraphics DensityHistogram DensityPlot DensityPlot3D DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DerivedKey DescriptorStateSpace DesignMatrix DestroyAfterEvaluation Det DeviceClose DeviceConfigure DeviceExecute DeviceExecuteAsynchronous DeviceObject DeviceOpen DeviceOpenQ DeviceRead DeviceReadBuffer DeviceReadLatest DeviceReadList DeviceReadTimeSeries Devices DeviceStreams DeviceWrite DeviceWriteBuffer DGaussianWavelet DiacriticalPositioning Diagonal DiagonalizableMatrixQ DiagonalMatrix DiagonalMatrixQ Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DictionaryWordQ DifferenceDelta DifferenceOrder DifferenceQuotient DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitalSignature DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralAngle DihedralGroup Dilation DimensionalCombinations DimensionalMeshComponents DimensionReduce DimensionReducerFunction DimensionReduction Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletBeta DirichletCharacter DirichletCondition DirichletConvolve DirichletDistribution DirichletEta DirichletL DirichletLambda DirichletTransform DirichletWindow DisableConsolePrintPacket DisableFormatting DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLimit DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscreteMaxLimit DiscreteMinLimit DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform DiscretizeGraphics DiscretizeRegion Discriminant DisjointQ Disjunction Disk DiskBox DiskMatrix DiskSegment Dispatch DispatchQ DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceMatrix DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers DivideSides Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentGenerator DocumentGeneratorInformation DocumentGeneratorInformationData DocumentGenerators DocumentNotebook DocumentWeightingRules Dodecahedron DomainRegistrationInformation DominantColors DOSTextFormat Dot DotDashed DotEqual DotLayer DotPlusLayer Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DropoutLayer DSolve DSolveValue Dt DualLinearProgramming DualPolyhedron DualSystemsModel DumpGet DumpSave DuplicateFreeQ Duration Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicGeoGraphics DynamicImage DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions' +\n 'E EarthImpactData EarthquakeData EccentricityCentrality Echo EchoFunction EclipseType EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeContract EdgeCost EdgeCount EdgeCoverQ EdgeCycleMatrix EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight EdgeWeightedGraphQ Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData ElementwiseLayer ElidedForms Eliminate EliminationOrder Ellipsoid EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmbedCode EmbeddedHTML EmbeddedService EmbeddingLayer EmbeddingObject EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EmptyRegion EnableConsolePrintPacket Enabled Encode Encrypt EncryptedObject EncryptFile End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfBuffer EndOfFile EndOfLine EndOfString EndPackage EngineEnvironment EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entity EntityClass EntityClassList EntityCopies EntityFunction EntityGroup EntityInstance EntityList EntityPrefetch EntityProperties EntityProperty EntityPropertyClass EntityRegister EntityStore EntityStores EntityTypeName EntityUnregister EntityValue Entropy EntropyFilter Environment Epilog EpilogFunction Equal EqualColumns EqualRows EqualTilde EqualTo EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EscapeRadius EstimatedBackground EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerAngles EulerCharacteristic EulerE EulerGamma EulerianGraphQ EulerMatrix EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluateScheduledTask EvaluationBox EvaluationCell EvaluationCompletionAction EvaluationData EvaluationElements EvaluationEnvironment EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels EventSeries ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludedLines ExcludedPhysicalQuantities ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog ExoplanetData Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi ExpirationDate Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportByteArray ExportForm ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpressionUUID ExpToTrig ExtendedEntityClass ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalBundle ExternalCall ExternalDataCharacterEncoding ExternalEvaluate ExternalFunction ExternalFunctionName ExternalObject ExternalOptions ExternalSessionObject ExternalSessions ExternalTypeSignature ExternalValue Extract ExtractArchive ExtractLayer ExtremeValueDistribution' +\n 'FaceForm FaceGrids FaceGridsStyle FacialFeatures Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail Failure FailureAction FailureDistribution FailureQ False FareySequence FARIMAProcess FeatureDistance FeatureExtract FeatureExtraction FeatureExtractor FeatureExtractorFunction FeatureNames FeatureNearest FeatureSpacePlot FeatureSpacePlot3D FeatureTypes FEDisableConsolePrintPacket FeedbackLinearize FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket FetalGrowthData Fibonacci Fibonorial FieldCompletionFunction FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileConvert FileDate FileExistsQ FileExtension FileFormat FileHandler FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameForms FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileSize FileSystemMap FileSystemScan FileTemplate FileTemplateApply FileType FilledCurve FilledCurveBox FilledCurveBoxOptions Filling FillingStyle FillingTransform FilteredEntityClass FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindAnomalies FindArgMax FindArgMin FindChannels FindClique FindClusters FindCookies FindCurvePath FindCycle FindDevices FindDistribution FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEdgeIndependentPaths FindEquationalProof FindEulerianCycle FindExternalEvaluators FindFaces FindFile FindFit FindFormula FindFundamentalCycles FindGeneratingFunction FindGeoLocation FindGeometricConjectures FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindHamiltonianPath FindHiddenMarkovStates FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMatchingColor FindMaximum FindMaximumFlow FindMaxValue FindMeshDefects FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindMoleculeSubstructure FindPath FindPeaks FindPermutation FindPostmanTour FindProcessParameters FindRepeat FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindSpanningTree FindSystemModelEquilibrium FindTextualAnswer FindThreshold FindTransientRepeat FindVertexCover FindVertexCut FindVertexIndependentPaths Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstCase FirstPassageTimeDistribution FirstPosition FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FitRegularization FittedModel FixedOrder FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlattenLayer FlatTopWindow FlipView Floor FlowPolynomial FlushPrintOutputPacket Fold FoldList FoldPair FoldPairList FollowRedirects Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FormControl FormFunction FormLayoutFunction FormObject FormPage FormTheme FormulaData FormulaLookup FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalGaussianNoiseProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameRate FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrenetSerretSystem FrequencySamplingFilterKernel FresnelC FresnelF FresnelG FresnelS Friday FrobeniusNumber FrobeniusSolve FromAbsoluteTime FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS FromEntity FromJulianDate FromLetterNumber FromPolarCoordinates FromRomanNumeral FromSphericalCoordinates FromUnixTime Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullInformationOutputRegulator FullOptions FullRegion FullSimplify Function FunctionCompile FunctionCompileExport FunctionCompileExportByteArray FunctionCompileExportLibrary FunctionCompileExportString FunctionDomain FunctionExpand FunctionInterpolation FunctionPeriod FunctionRange FunctionSpace FussellVeselyImportance' +\n 'GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins GalaxyData GalleryView Gamma GammaDistribution GammaRegularized GapPenalty GARCHProcess GatedRecurrentLayer Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianOrthogonalMatrixDistribution GaussianSymplecticMatrixDistribution GaussianUnitaryMatrixDistribution GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateAsymmetricKeyPair GenerateConditions GeneratedCell GeneratedDocumentBinding GenerateDerivedKey GenerateDigitalSignature GenerateDocument GeneratedParameters GeneratedQuantityMagnitudes GenerateHTTPResponse GenerateSecuredAuthenticationKey GenerateSymmetricKey GeneratingFunction GeneratorDescription GeneratorHistoryLength GeneratorOutputType Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeoAntipode GeoArea GeoArraySize GeoBackground GeoBoundingBox GeoBounds GeoBoundsRegion GeoBubbleChart GeoCenter GeoCircle GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDisk GeoDisplacement GeoDistance GeoDistanceList GeoElevationData GeoEntities GeoGraphics GeogravityModelData GeoGridDirectionDifference GeoGridLines GeoGridLinesStyle GeoGridPosition GeoGridRange GeoGridRangePadding GeoGridUnitArea GeoGridUnitDistance GeoGridVector GeoGroup GeoHemisphere GeoHemisphereBoundary GeoHistogram GeoIdentify GeoImage GeoLabels GeoLength GeoListPlot GeoLocation GeologicalPeriodData GeomagneticModelData GeoMarker GeometricAssertion GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricScene GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoModel GeoNearest GeoPath GeoPosition GeoPositionENU GeoPositionXYZ GeoProjection GeoProjectionData GeoRange GeoRangePadding GeoRegionValuePlot GeoResolution GeoScaleBar GeoServer GeoSmoothHistogram GeoStreamPlot GeoStyling GeoStylingImageFunction GeoVariant GeoVector GeoVectorENU GeoVectorPlot GeoVectorXYZ GeoVisibleRegion GeoVisibleRegionBoundary GeoWithinQ GeoZoomLevel GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenAngle GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter GrammarApply GrammarRules GrammarToken Graph Graph3D GraphAssortativity GraphAutomorphismGroup GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel Greater GreaterEqual GreaterEqualLess GreaterEqualThan GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterThan GreaterTilde Green GreenFunction Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupBy GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators Groupings GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain GroupTogetherGrouping GroupTogetherNestedGrouping GrowCutComponents Gudermannian GuidedFilter GumbelDistribution' +\n 'HaarWavelet HadamardMatrix HalfLine HalfNormalDistribution HalfPlane HalfSpace HamiltonianGraphQ HammingDistance HammingWindow HandlerFunctions HandlerFunctionsKeys HankelH1 HankelH2 HankelMatrix HankelTransform HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash Haversine HazardFunction Head HeadCompose HeaderLines Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings Here HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenMarkovProcess HiddenSurface Highlighted HighlightGraph HighlightImage HighlightMesh HighpassFilter HigmanSimsGroupHS HilbertCurve HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HistoricalPeriodData HitMissTransform HITSCentrality HjorthDistribution HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HostLookup HotellingTSquareDistribution HoytDistribution HTMLSave HTTPErrorResponse HTTPRedirect HTTPRequest HTTPRequestData HTTPResponse Hue HumanGrowthData HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyperplane Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData' +\n 'I IconData Iconize IconizedObject IconRules Icosahedron Identity IdentityMatrix If IgnoreCase IgnoreDiacritics IgnorePunctuation IgnoreSpellCheck IgnoringInactive Im Image Image3D Image3DProjection Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageApplyIndexed ImageAspectRatio ImageAssemble ImageAugmentationLayer ImageBoundingBoxes ImageCache ImageCacheValid ImageCapture ImageCaptureFunction ImageCases ImageChannels ImageClip ImageCollage ImageColorSpace ImageCompose ImageContainsQ ImageContents ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDisplacements ImageDistance ImageEffect ImageExposureCombine ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageFocusCombine ImageForestingComponents ImageFormattingWidth ImageForwardTransformation ImageGraphics ImageHistogram ImageIdentify ImageInstanceQ ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarker ImageMarkers ImageMeasurements ImageMesh ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImagePosition ImagePreviewFunction ImagePyramid ImagePyramidApply ImageQ ImageRangeCache ImageRecolor ImageReflect ImageRegion ImageResize ImageResolution ImageRestyle ImageRotate ImageRotated ImageSaliencyFilter ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions ImagingDevice ImplicitRegion Implies Import ImportAutoReplacements ImportByteArray ImportOptions ImportString ImprovementImportance In Inactivate Inactive IncidenceGraph IncidenceList IncidenceMatrix IncludeAromaticBonds IncludeConstantBasis IncludeDefinitions IncludeDirectories IncludeFileExtension IncludeGeneratorTasks IncludeHydrogens IncludeInflections IncludeMetaInformation IncludePods IncludeQuantities IncludeRelatedTables IncludeSingularTerm IncludeWindowTimes Increment IndefiniteMatrixQ Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentPhysicalQuantity IndependentUnit IndependentUnitDimension IndependentVertexSetQ Indeterminate IndeterminateThreshold IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers InfiniteLine InfinitePlane Infinity Infix InflationAdjust InflationMethod Information InformationData InformationDataGrid Inherited InheritScope InhomogeneousPoissonProcess InitialEvaluationHistory Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InitializationObjects InitializationValue Initialize InitialSeeding InlineCounterAssignments InlineCounterIncrements InlineRules Inner InnerPolygon InnerPolyhedron Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionFunction InsertionPointObject InsertLinebreaks InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Insphere Install InstallService InstanceNormalizationLayer InString Integer IntegerDigits IntegerExponent IntegerLength IntegerName IntegerPart IntegerPartitions IntegerQ IntegerReverse Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction Interpreter InterpretTemplate InterquartileRange Interrupt InterruptSettings IntersectingQ Intersection Interval IntervalIntersection IntervalMarkers IntervalMarkersStyle IntervalMemberQ IntervalSlider IntervalUnion Into Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHankelTransform InverseHaversine InverseImagePyramid InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InverseMellinTransform InversePermutation InverseRadon InverseRadonTransform InverseSeries InverseShortTimeFourier InverseSpectrogram InverseSurvivalFunction InverseTransformedRegion InverseWaveletTransform InverseWeierstrassP InverseWishartMatrixDistribution InverseZTransform Invisible InvisibleApplication InvisibleTimes IPAddress IrreduciblePolynomialQ IslandData IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemAspectRatio ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess' +\n 'JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join JoinAcross Joined JoinedCurve JoinedCurveBox JoinedCurveBoxOptions JoinForm JordanDecomposition JordanModelDecomposition JulianDate JuliaSetBoettcher JuliaSetIterationCount JuliaSetPlot JuliaSetPoints' +\n 'K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KEdgeConnectedComponents KEdgeConnectedGraphQ KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelFunction KernelMixtureDistribution Kernels Ket Key KeyCollisionFunction KeyComplement KeyDrop KeyDropFrom KeyExistsQ KeyFreeQ KeyIntersection KeyMap KeyMemberQ KeypointStrength Keys KeySelect KeySort KeySortBy KeyTake KeyUnion KeyValueMap KeyValuePattern Khinchin KillProcess KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnapsackSolve KnightTourGraph KnotData KnownUnitQ KochCurve KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter KVertexConnectedComponents KVertexConnectedGraphQ' +\n 'LABColor Label Labeled LabeledSlider LabelingFunction LabelingSize LabelStyle LabelVisibility LaguerreL LakeData LambdaComponents LambertW LaminaData LanczosWindow LandauDistribution Language LanguageCategory LanguageData LanguageIdentify LanguageOptions LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCHColor LCM LeaderSize LeafCount LeapYearQ LearnDistribution LearnedDistribution LearningRate LearningRateMultipliers LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessEqualThan LessFullEqual LessGreater LessLess LessSlantEqual LessThan LessTilde LetterCharacter LetterCounts LetterNumber LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryDataType LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox Line3DBoxOptions LinearFilter LinearFractionalOptimization LinearFractionalTransform LinearGradientImage LinearizingTransformationData LinearLayer LinearModelFit LinearOffsetFunction LinearOptimization LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBoxOptions LineBreak LinebreakAdjustments LineBreakChart LinebreakSemicolonWeighting LineBreakWithin LineColor LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRankCentrality LinkRead LinkReadHeld LinkReadyQ Links LinkService LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot ListDensityPlot3D Listen ListFormat ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListSliceContourPlot3D ListSliceDensityPlot3D ListSliceVectorPlot3D ListStepPlot ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalAdaptiveBinarize LocalCache LocalClusteringCoefficient LocalizeDefinitions LocalizeVariables LocalObject LocalObjects LocalResponseNormalizationLayer LocalSubmit LocalSymbol LocalTime LocalTimeZone LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogisticSigmoid LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongestOrderedSequence LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow LongShortTermMemoryLayer Lookup Loopback LoopFreeGraphQ LossFunction LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowerTriangularMatrixQ LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LunarEclipse LUVColor LyapunovSolve LyonsGroupLy' +\n 'MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MailAddressValidation MailExecute MailFolder MailItem MailReceiverFunction MailResponseFunction MailSearch MailServerConnect MailServerConnection MailSettings MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules ManagedLibraryExpressionID ManagedLibraryExpressionQ MandelbrotSetBoettcher MandelbrotSetDistance MandelbrotSetIterationCount MandelbrotSetMemberQ MandelbrotSetPlot MangoldtLambda ManhattanDistance Manipulate Manipulator MannedSpaceMissionData MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarchenkoPasturDistribution MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicalFunctionData MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixNormalDistribution MatrixPlot MatrixPower MatrixPropertyDistribution MatrixQ MatrixRank MatrixTDistribution Max MaxBend MaxCellMeasure MaxColorDistance MaxDetect MaxDuration MaxExtraBandwidths MaxExtraConditions MaxFeatureDisplacement MaxFeatures MaxFilter MaximalBy Maximize MaxItems MaxIterations MaxLimit MaxMemoryUsed MaxMixtureKernels MaxOverlapFraction MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxTrainingRounds MaxValue MaxwellDistribution MaxWordGap McLaughlinGroupMcL Mean MeanAbsoluteLossLayer MeanAround MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter MeanSquaredLossLayer Median MedianDeviation MedianFilter MedicalTestData Medium MeijerG MeijerGReduce MeixnerDistribution MellinConvolve MellinTransform MemberQ MemoryAvailable MemoryConstrained MemoryConstraint MemoryInUse MengerMesh Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuList MenuPacket MenuSortingValue MenuStyle MenuView Merge MergeDifferences MergingFunction MersennePrimeExponent MersennePrimeExponentQ Mesh MeshCellCentroid MeshCellCount MeshCellHighlight MeshCellIndex MeshCellLabel MeshCellMarker MeshCellMeasure MeshCellQuality MeshCells MeshCellShapeFunction MeshCellStyle MeshCoordinates MeshFunctions MeshPrimitives MeshQualityGoal MeshRange MeshRefinementFunction MeshRegion MeshRegionQ MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageObject MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation MeteorShowerData Method MethodOptions MexicanHatWavelet MeyerWavelet Midpoint Min MinColorDistance MinDetect MineralData MinFilter MinimalBy MinimalPolynomial MinimalStateSpaceModel Minimize MinimumTimeIncrement MinIntervalSize MinkowskiQuestionMark MinLimit MinMax MinorPlanetData Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingBehavior MissingDataMethod MissingDataRules MissingQ MissingString MissingStyle MissingValuePattern MittagLefflerE MixedFractionParts MixedGraphQ MixedMagnitude MixedRadix MixedRadixQuantity MixedUnit MixtureDistribution Mod Modal Mode Modular ModularInverse ModularLambda Module Modulus MoebiusMu Molecule MoleculeContainsQ MoleculeEquivalentQ MoleculeGraph MoleculeModify MoleculePattern MoleculePlot MoleculePlot3D MoleculeProperty MoleculeQ MoleculeValue Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction MomentOfInertia Monday Monitor MonomialList MonomialOrder MonsterGroupM MoonPhase MoonPosition MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform MortalityData Most MountainData MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovieData MovingAverage MovingMap MovingMedian MoyalDistribution Multicolumn MultiedgeStyle MultigraphQ MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity MultiplySides Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution' +\n 'N NakagamiDistribution NameQ Names NamespaceBox NamespaceBoxOptions Nand NArgMax NArgMin NBernoulliB NBodySimulation NBodySimulationData NCache NDEigensystem NDEigenvalues NDSolve NDSolveValue Nearest NearestFunction NearestNeighborGraph NearestTo NebulaData NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeDefiniteMatrixQ NegativeIntegers NegativeMultinomialDistribution NegativeRationals NegativeReals NegativeSemidefiniteMatrixQ NeighborhoodData NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestGraph NestList NestWhile NestWhileList NetAppend NetBidirectionalOperator NetChain NetDecoder NetDelete NetDrop NetEncoder NetEvaluationMode NetExtract NetFlatten NetFoldOperator NetGraph NetInformation NetInitialize NetInsert NetInsertSharedArrays NetJoin NetMapOperator NetMapThreadOperator NetMeasurements NetModel NetNestOperator NetPairEmbeddingOperator NetPort NetPortGradient NetPrepend NetRename NetReplace NetReplacePart NetSharedArray NetStateObject NetTake NetTrain NetTrainResultsObject NetworkPacketCapture NetworkPacketRecording NetworkPacketRecordingDuring NetworkPacketTrace NeumannValue NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextCell NextDate NextPrime NextScheduledTaskTime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NightHemisphere NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants NondimensionalizationTransform None NoneTrue NonlinearModelFit NonlinearStateSpaceModel NonlocalMeansFilter NonNegative NonNegativeIntegers NonNegativeRationals NonNegativeReals NonPositive NonPositiveIntegers NonPositiveRationals NonPositiveReals Nor NorlundB Norm Normal NormalDistribution NormalGrouping NormalizationLayer Normalize Normalized NormalizedSquaredEuclideanDistance NormalMatrixQ NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookImport NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookTemplate NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde Nothing NotHumpDownHump NotHumpEqual NotificationFunction NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar Now NoWhitespace NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms NuclearExplosionData NuclearReactorData Null NullRecords NullSpace NullWords Number NumberCompose NumberDecompose NumberExpand NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberLinePlot NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumeratorDenominator NumericalOrder NumericalSort NumericArray NumericArrayQ NumericArrayType NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot' +\n 'O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OceanData Octahedron OddQ Off Offset OLEData On ONanGroupON Once OneIdentity Opacity OpacityFunction OpacityFunctionScaling Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionalElement OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering OrderingBy OrderingLayer Orderless OrderlessPatternSequence OrnsteinUhlenbeckProcess Orthogonalize OrthogonalMatrixQ Out Outer OuterPolygon OuterPolyhedron OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OverwriteTarget OwenT OwnValues' +\n 'Package PackingMethod PaddedForm Padding PaddingLayer PaddingSize PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageTheme PageWidth Pagination PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath PalindromeQ Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo Parallelepiped ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds Parallelogram ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParametricRegion ParentBox ParentCell ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParentNotebook ParetoDistribution ParetoPickandsDistribution ParkData Part PartBehavior PartialCorrelationFunction PartialD ParticleAcceleratorData ParticleData Partition PartitionGranularity PartitionsP PartitionsQ PartLayer PartOfSpeech PartProtection ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteAutoQuoteCharacters PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PeakDetect PeanoCurve PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PercentForm PerfectNumber PerfectNumberQ PerformanceGoal Perimeter PeriodicBoundaryCondition PeriodicInterpolation Periodogram PeriodogramArray Permanent Permissions PermissionsGroup PermissionsGroupMemberQ PermissionsGroups PermissionsKey PermissionsKeys PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PerpendicularBisector PersistenceLocation PersistenceTime PersistentObject PersistentObjects PersistentValue PersonData PERTDistribution PetersenGraph PhaseMargins PhaseRange PhysicalSystemData Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest PingTime Pink PitchRecognize Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarAngle PlanarGraph PlanarGraphQ PlanckRadiationLaw PlaneCurveData PlanetaryMoonData PlanetData PlantData Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLabels PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangeClipPlanesStyle PlotRangePadding PlotRegion PlotStyle PlotTheme Pluralize Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox Point3DBoxOptions PointBox PointBoxOptions PointFigureChart PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonalNumber PolygonAngle PolygonBox PolygonBoxOptions PolygonCoordinates PolygonDecomposition PolygonHoleScale PolygonIntersections PolygonScale Polyhedron PolyhedronAngle PolyhedronCoordinates PolyhedronData PolyhedronDecomposition PolyhedronGenus PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PoolingLayer PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position PositionIndex Positive PositiveDefiniteMatrixQ PositiveIntegers PositiveRationals PositiveReals PositiveSemidefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerRange PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement Predict PredictionRoot PredictorFunction PredictorInformation PredictorMeasurements PredictorMeasurementsObject PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependLayer PrependTo PreprocessingRules PreserveColor PreserveImageOptions Previous PreviousCell PreviousDate PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitivePolynomialQ PrimitiveRoot PrimitiveRootList PrincipalComponents PrincipalValue Print PrintableASCIIQ PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment Printout3D Printout3DPreviewer PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateKey PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessConnection ProcessDirectory ProcessEnvironment Processes ProcessEstimator ProcessInformation ProcessObject ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessStatus ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm ProofObject Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse PsychrometricPropertyData PublicKey PublisherID PulsarData PunctuationCharacter Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions' +\n 'QBinomial QFactorial QGamma QHypergeometricPFQ QnDispersion QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ QuadraticOptimization Quantile QuantilePlot Quantity QuantityArray QuantityDistribution QuantityForm QuantityMagnitude QuantityQ QuantityUnit QuantityVariable QuantityVariableCanonicalUnit QuantityVariableDimensions QuantityVariableIdentifier QuantityVariablePhysicalQuantity Quartics QuartileDeviation Quartiles QuartileSkewness Query QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder' +\n 'RadialGradientImage RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RadonTransform RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Ramp Random RandomChoice RandomColor RandomComplex RandomEntity RandomFunction RandomGeoPosition RandomGraph RandomImage RandomInstance RandomInteger RandomPermutation RandomPoint RandomPolygon RandomPolyhedron RandomPrime RandomReal RandomSample RandomSeed RandomSeeding RandomVariate RandomWalkProcess RandomWord Range RangeFilter RangeSpecification RankedMax RankedMin RarerProbability Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadByteArray ReadLine ReadList ReadProtected ReadString Real RealAbs RealBlockDiagonalForm RealDigits RealExponent Reals RealSign Reap RecognitionPrior RecognitionThreshold Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RectangularRepeatingElement RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate Region RegionBinarize RegionBoundary RegionBounds RegionCentroid RegionDifference RegionDimension RegionDisjoint RegionDistance RegionDistanceFunction RegionEmbeddingDimension RegionEqual RegionFunction RegionImage RegionIntersection RegionMeasure RegionMember RegionMemberFunction RegionMoment RegionNearest RegionNearestFunction RegionPlot RegionPlot3D RegionProduct RegionQ RegionResize RegionSize RegionSymmetricDifference RegionUnion RegionWithin RegisterExternalEvaluator RegularExpression Regularization RegularlySampledQ RegularPolygon ReIm ReImLabels ReImPlot ReImStyle Reinstall RelationalDatabase RelationGraph Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot RemoteAuthorizationCaching RemoteConnect RemoteConnectionObject RemoteFile RemoteRun RemoteRunProcess Remove RemoveAlphaChannel RemoveAsynchronousTask RemoveAudioStream RemoveBackground RemoveChannelListener RemoveChannelSubscribers Removed RemoveDiacritics RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RemoveUsers RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart RepairMesh Repeated RepeatedNull RepeatedString RepeatedTiming RepeatingElement Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated ReplicateLayer RequiredPhysicalQuantities Resampling ResamplingAlgorithmData ResamplingMethod Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask ReshapeLayer Residue ResizeLayer Resolve ResourceAcquire ResourceData ResourceFunction ResourceObject ResourceRegister ResourceRemove ResourceSearch ResourceSubmissionObject ResourceSubmit ResourceSystemBase ResourceUpdate ResponseForm Rest RestartInterval Restricted Resultant ResumePacket Return ReturnEntersInput ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnReceiptFunction ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseSort ReverseSortBy ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ RiemannXi Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightComposition RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity RollPitchYawAngles RollPitchYawMatrix RomanNumeral Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RSolveValue RudinShapiro RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulePlot RulerUnits Run RunProcess RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity' +\n 'SameQ SameTest SampledEntityClass SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SASTriangle SatelliteData SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveConnection SaveDefinitions SavitzkyGolayMatrix SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTask ScheduledTaskActiveQ ScheduledTaskInformation ScheduledTaskInformationData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScientificNotationThreshold ScorerGi ScorerGiPrime ScorerHi ScorerHiPrime ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptForm ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition SearchAdjustment SearchIndexObject SearchIndices SearchQueryString SearchResultObject Sec Sech SechDistribution SecondOrderConeOptimization SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SecuredAuthenticationKey SecuredAuthenticationKeys SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook SelectFirst Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemanticImport SemanticImportString SemanticInterpretation SemialgebraicComponentInstances SemidefiniteOptimization SendMail SendMessage Sequence SequenceAlignment SequenceAttentionLayer SequenceCases SequenceCount SequenceFold SequenceFoldList SequenceForm SequenceHold SequenceLastLayer SequenceMostLayer SequencePosition SequencePredict SequencePredictorFunction SequenceReplace SequenceRestLayer SequenceReverseLayer SequenceSplit Series SeriesCoefficient SeriesData ServiceConnect ServiceDisconnect ServiceExecute ServiceObject ServiceRequest ServiceResponse ServiceSubmit SessionSubmit SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetCloudDirectory SetCookies SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPermissions SetPrecision SetProperty SetSecuredAuthenticationKey SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemModel SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetUsers SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share SharingList Sharpen ShearingMatrix ShearingTransform ShellRegion ShenCastanMatrix ShiftedGompertzDistribution ShiftRegisterSequence Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortTimeFourier ShortTimeFourierData ShortUpArrow Show ShowAutoConvert ShowAutoSpellCheck ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowCodeAssist ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiderealTime SiegelTheta SiegelTukeyTest SierpinskiCurve SierpinskiMesh Sign Signature SignedRankTest SignedRegionDistance SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ SimplePolygonQ SimplePolyhedronQ Simplex Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution SkinStyle Skip SliceContourPlot3D SliceDensityPlot3D SliceDistribution SliceVectorPlot3D Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDecomposition SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SnDispersion Snippet SnubPolyhedron SocialMediaData Socket SocketConnect SocketListen SocketListener SocketObject SocketOpen SocketReadMessage SocketReadyQ Sockets SocketWaitAll SocketWaitNext SoftmaxLayer SokalSneathDissimilarity SolarEclipse SolarSystemFeatureData SolidAngle SolidData SolidRegionQ Solve SolveAlways SolveDelayed Sort SortBy SortedBy SortedEntityClass Sound SoundAndGraphics SoundNote SoundVolume SourceLink Sow Space SpaceCurveData SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution SpatialMedian SpatialTransformationLayer Speak SpeakTextPacket SpearmanRankTest SpearmanRho SpeciesData SpecificityGoal SpectralLineData Spectrogram SpectrogramArray Specularity SpeechRecognize SpeechSynthesize SpellingCorrection SpellingCorrectionList SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SpherePoints SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SphericalShell SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquareMatrixQ SquareRepeatingElement SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave SSSTriangle StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackedDateListPlot StackedListPlot StackInhibit StadiumShape StandardAtmosphereData StandardDeviation StandardDeviationFilter StandardForm Standardize Standardized StandardOceanData StandbyDistribution Star StarClusterData StarData StarGraph StartAsynchronousTask StartExternalSession StartingStepSize StartOfLine StartOfString StartProcess StartScheduledTask StartupSound StartWebSession StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StateTransformationLinearize StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StereochemistryElements StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StoppingPowerData StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamMarkers StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringContainsQ StringCount StringDelete StringDrop StringEndsQ StringExpression StringExtract StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPadLeft StringPadRight StringPart StringPartition StringPosition StringQ StringRepeat StringReplace StringReplaceList StringReplacePart StringReverse StringRiffle StringRotateLeft StringRotateRight StringSkeleton StringSplit StringStartsQ StringTake StringTemplate StringToByteArray StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleData StyleDefinitions StyleForm StyleHints StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subdivide Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subsequences Subset SubsetEqual SubsetMap SubsetQ Subsets SubStar SubstitutionSystem Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubtractSides SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde Success SuchThat Sum SumConvergence SummationLayer Sunday SunPosition Sunrise Sunset SuperDagger SuperMinus SupernovaData SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceArea SurfaceColor SurfaceData SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricKey SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Synonyms Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SynthesizeMissingValues SystemDialogInput SystemException SystemGet SystemHelpPath SystemInformation SystemInformationData SystemInstall SystemModel SystemModeler SystemModelExamples SystemModelLinearize SystemModelParametricSimulate SystemModelPlot SystemModelProgressReporting SystemModelReliability SystemModels SystemModelSimulate SystemModelSimulateSensitivity SystemModelSimulationData SystemOpen SystemOptions SystemProcessData SystemProcesses SystemsConnectionsModel SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelLinearity SystemsModelMerge SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemsModelVectorRelativeOrders SystemStub SystemTest' +\n 'Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TableViewBoxBackground TableViewBoxOptions TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeDrop TakeLargest TakeLargestBy TakeList TakeSmallest TakeSmallestBy TakeWhile Tally Tan Tanh TargetDevice TargetFunctions TargetSystem TargetUnits TaskAbort TaskExecute TaskObject TaskRemove TaskResume Tasks TaskSuspend TaskWait TautologyQ TelegraphProcess TemplateApply TemplateArgBox TemplateBox TemplateBoxOptions TemplateEvaluate TemplateExpression TemplateIf TemplateObject TemplateSequence TemplateSlot TemplateSlotSequence TemplateUnevaluated TemplateVerbatim TemplateWith TemporalData TemporalRegularity Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge TestID TestReport TestReportObject TestResultObject Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCases TextCell TextClipboardType TextContents TextData TextElement TextForm TextGrid TextJustification TextLine TextPacket TextParagraph TextPosition TextRecognize TextSearch TextSearchReport TextSentences TextString TextStructure TextStyle TextTranslation Texture TextureCoordinateFunction TextureCoordinateScaling TextWords Therefore ThermodynamicData ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreadingLayer ThreeJSymbol Threshold Through Throw ThueMorse Thumbnail Thursday Ticks TicksStyle TideData Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint TimeDirection TimeFormat TimeGoal TimelinePlot TimeObject TimeObjectQ Times TimesBy TimeSeries TimeSeriesAggregate TimeSeriesForecast TimeSeriesInsert TimeSeriesInvertibility TimeSeriesMap TimeSeriesMapThread TimeSeriesModel TimeSeriesModelFit TimeSeriesResample TimeSeriesRescale TimeSeriesShift TimeSeriesThread TimeSeriesWindow TimeUsed TimeValue TimeWarpingCorrespondence TimeWarpingDistance TimeZone TimeZoneConvert TimeZoneOffset Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate Today ToDiscreteTimeModel ToEntity ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase Tomorrow ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform ToPolarCoordinates TopologicalSort ToRadicals ToRules ToSphericalCoordinates ToString Total TotalHeight TotalLayer TotalVariationFilter TotalWidth TouchPosition TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TrackingFunction TracyWidomDistribution TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TrainingProgressCheckpointing TrainingProgressFunction TrainingProgressMeasurements TrainingProgressReporting TrainingStoppingCriterion TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationClass TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField TransformedProcess TransformedRegion TransitionDirection TransitionDuration TransitionEffect TransitiveClosureGraph TransitiveReductionGraph Translate TranslationOptions TranslationTransform Transliterate Transparent TransparentColor Transpose TransposeLayer TrapSelection TravelDirections TravelDirectionsData TravelDistance TravelDistanceList TravelMethod TravelTime TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle Triangle TriangleCenter TriangleConstruct TriangleMeasurement TriangleWave TriangularDistribution TriangulateMesh Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean TrimmedVariance TropicalStormData True TrueQ TruncatedDistribution TruncatedPolyhedron TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBoxOptions TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow TunnelData Tuples TuranGraph TuringMachine TuttePolynomial TwoWayRule Typed TypeSpecifier' +\n 'UnateQ Uncompress UnconstrainedParameters Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UnderseaFeatureData UndirectedEdge UndirectedGraph UndirectedGraphQ UndoOptions UndoTrackedVariables Unequal UnequalTo Unevaluated UniformDistribution UniformGraphDistribution UniformPolyhedron UniformSumDistribution Uninstall Union UnionPlus Unique UnitaryMatrixQ UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitSystem UnitTriangle UnitVector UnitVectorLayer UnityDimensions UniverseModelData UniversityData UnixTime Unprotect UnregisterExternalEvaluator UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpdateSearchIndex UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize UpperTriangularMatrixQ Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpTo UpValues URL URLBuild URLDecode URLDispatcher URLDownload URLDownloadSubmit URLEncode URLExecute URLExpand URLFetch URLFetchAsynchronous URLParse URLQueryDecode URLQueryEncode URLRead URLResponseTime URLSave URLSaveAsynchronous URLShorten URLSubmit UseGraphicsRange UserDefinedWavelet Using UsingFrontEnd UtilityFunction' +\n 'V2Get ValenceErrorHandling ValidationLength ValidationSet Value ValueBox ValueBoxOptions ValueDimensions ValueForm ValuePreprocessingFunction ValueQ Values ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorAround VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorGreater VectorGreaterEqual VectorLess VectorLessEqual VectorMarkers VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerificationTest VerifyConvergence VerifyDerivedKey VerifyDigitalSignature VerifyInterpretation VerifySecurityCertificates VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexContract VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight VertexWeightedGraphQ Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewProjection ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoiceStyleData VoigtDistribution VolcanoData Volume VonMisesDistribution VoronoiMesh' +\n 'WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WarpingCorrespondence WarpingDistance WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeatherForecastData WebAudioSearch WebElementObject WeberE WebExecute WebImage WebImageSearch WebSearch WebSessionObject WebSessions WebWindowObject Wedge Wednesday WeibullDistribution WeierstrassE1 WeierstrassE2 WeierstrassE3 WeierstrassEta1 WeierstrassEta2 WeierstrassEta3 WeierstrassHalfPeriods WeierstrassHalfPeriodW1 WeierstrassHalfPeriodW2 WeierstrassHalfPeriodW3 WeierstrassInvariantG2 WeierstrassInvariantG3 WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White WhiteNoiseProcess WhitePoint Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WikipediaData WikipediaSearch WilksW WilksWTest WindDirectionData WindingCount WindingPolygon WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowPersistentStyles WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth WindSpeedData WindVectorData WinsorizedMean WinsorizedVariance WishartMatrixDistribution With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult WolframLanguageData Word WordBoundary WordCharacter WordCloud WordCount WordCounts WordData WordDefinition WordFrequency WordFrequencyData WordList WordOrientation WordSearch WordSelectionFunction WordSeparators WordSpacings WordStem WordTranslation WorkingPrecision WrapAround Write WriteLine WriteString Wronskian' +\n 'XMLElement XMLObject XMLTemplate Xnor Xor XYZColor' +\n 'Yellow Yesterday YuleDissimilarity' +\n 'ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZIPCodeData ZipfDistribution ZoomCenter ZoomFactor ZTest ZTransform' +\n '$Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AllowExternalChannelFunctions $AssertFunction $Assumptions $AsynchronousTask $AudioInputDevices $AudioOutputDevices $BaseDirectory $BatchInput $BatchOutput $BlockchainBase $BoxForms $ByteOrdering $CacheBaseDirectory $Canceled $ChannelBase $CharacterEncoding $CharacterEncodings $CloudBase $CloudConnected $CloudCreditsAvailable $CloudEvaluation $CloudExpressionBase $CloudObjectNameFormat $CloudObjectURLType $CloudRootDirectory $CloudSymbolBase $CloudUserID $CloudUserUUID $CloudVersion $CloudVersionNumber $CloudWolframEngineVersionNumber $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $Cookies $CookieStore $CreationDate $CurrentLink $CurrentTask $CurrentWebSession $DateStringFormat $DefaultAudioInputDevice $DefaultAudioOutputDevice $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultLocalBase $DefaultMailbox $DefaultNetworkInterface $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $EmbedCodeEnvironments $EmbeddableServices $EntityStores $Epilog $EvaluationCloudBase $EvaluationCloudObject $EvaluationEnvironment $ExportFormats $Failed $FinancialDataSource $FontFamilies $FormatType $FrontEnd $FrontEndSession $GeoEntityTypes $GeoLocation $GeoLocationCity $GeoLocationCountry $GeoLocationPrecision $GeoLocationSource $HistoryLength $HomeDirectory $HTMLExportRules $HTTPCookies $HTTPRequest $IgnoreEOF $ImageFormattingWidth $ImagingDevice $ImagingDevices $ImportFormats $IncomingMailSettings $InitialDirectory $Initialization $InitializationContexts $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $InterpreterTypes $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $LocalBase $LocalSymbolBase $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $MobilePhone $ModuleNumber $NetworkConnected $NetworkInterfaces $NetworkLicense $NewMessage $NewSymbol $Notebooks $NoValue $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $Permissions $PermissionsGroupBase $PersistenceBase $PersistencePath $PipeSupported $PlotTheme $Post $Pre $PreferencesDirectory $PreInitialization $PrePrint $PreRead $PrintForms $PrintLiteral $Printout3DPreviewer $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $PublisherID $RandomState $RecursionLimit $RegisteredDeviceClasses $RegisteredUserName $ReleaseNumber $RequesterAddress $RequesterWolframID $RequesterWolframUUID $ResourceSystemBase $RootDirectory $ScheduledTask $ScriptCommandLine $ScriptInputString $SecuredAuthenticationKeyTokens $ServiceCreditsAvailable $Services $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SourceLink $SSHAuthentication $SummaryBoxDataSizeLimit $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemMemory $SystemShell $SystemTimeZone $SystemWordLength $TemplatePath $TemporaryDirectory $TemporaryPrefix $TestFileName $TextStyle $TimedOut $TimeUnit $TimeZone $TimeZoneEntity $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $UnitSystem $Urgent $UserAddOnsDirectory $UserAgentLanguages $UserAgentMachine $UserAgentName $UserAgentOperatingSystem $UserAgentString $UserAgentVersion $UserBaseDirectory $UserDocumentsDirectory $Username $UserName $UserURLBase $Version $VersionNumber $VoiceStyles $WolframID $WolframUUID',\n contains: [\n hljs.COMMENT('\\\\(\\\\*', '\\\\*\\\\)', {contains: ['self']}),\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE\n ]\n };\n};","module.exports = /*\n Formal syntax is not published, helpful link:\n https://github.com/kornilova-l/matlab-IntelliJ-plugin/blob/master/src/main/grammar/Matlab.bnf\n*/\nfunction(hljs) {\n\n var TRANSPOSE_RE = '(\\'|\\\\.\\')+';\n var TRANSPOSE = {\n relevance: 0,\n contains: [\n { begin: TRANSPOSE_RE }\n ]\n };\n\n return {\n keywords: {\n keyword:\n 'break case catch classdef continue else elseif end enumerated events for function ' +\n 'global if methods otherwise parfor persistent properties return spmd switch try while',\n built_in:\n 'sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan ' +\n 'atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot ' +\n 'cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog ' +\n 'realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal ' +\n 'cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli ' +\n 'besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma ' +\n 'gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms ' +\n 'nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones ' +\n 'eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ' +\n 'ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril ' +\n 'triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute ' +\n 'shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan ' +\n 'isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal ' +\n 'rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table ' +\n 'readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun ' +\n 'legend intersect ismember procrustes hold num2cell '\n },\n illegal: '(//|\"|#|/\\\\*|\\\\s+/\\\\w+)',\n contains: [\n {\n className: 'function',\n beginKeywords: 'function', end: '$',\n contains: [\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'params',\n variants: [\n {begin: '\\\\(', end: '\\\\)'},\n {begin: '\\\\[', end: '\\\\]'}\n ]\n }\n ]\n },\n {\n className: 'built_in',\n begin: /true|false/,\n relevance: 0,\n starts: TRANSPOSE\n },\n {\n begin: '[a-zA-Z][a-zA-Z_0-9]*' + TRANSPOSE_RE,\n relevance: 0\n },\n {\n className: 'number',\n begin: hljs.C_NUMBER_RE,\n relevance: 0,\n starts: TRANSPOSE\n },\n {\n className: 'string',\n begin: '\\'', end: '\\'',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n {begin: '\\'\\''}]\n },\n {\n begin: /\\]|}|\\)/,\n relevance: 0,\n starts: TRANSPOSE\n },\n {\n className: 'string',\n begin: '\"', end: '\"',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n {begin: '\"\"'}\n ],\n starts: TRANSPOSE\n },\n hljs.COMMENT('^\\\\s*\\\\%\\\\{\\\\s*$', '^\\\\s*\\\\%\\\\}\\\\s*$'),\n hljs.COMMENT('\\\\%', '$')\n ]\n };\n};","module.exports = function(hljs) {\n var PERL_KEYWORDS = 'getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ' +\n 'ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime ' +\n 'readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq' +\n 'fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent ' +\n 'shutdown dump chomp connect getsockname die socketpair close flock exists index shmget' +\n 'sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr ' +\n 'unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 ' +\n 'getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline ' +\n 'endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand ' +\n 'mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink ' +\n 'getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr ' +\n 'untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link ' +\n 'getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller ' +\n 'lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and ' +\n 'sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 ' +\n 'chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach ' +\n 'tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir' +\n 'ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe ' +\n 'atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when';\n var SUBST = {\n className: 'subst',\n begin: '[$@]\\\\{', end: '\\\\}',\n keywords: PERL_KEYWORDS\n };\n var METHOD = {\n begin: '->{', end: '}'\n // contains defined later\n };\n var VAR = {\n variants: [\n {begin: /\\$\\d/},\n {begin: /[\\$%@](\\^\\w\\b|#\\w+(::\\w+)*|{\\w+}|\\w+(::\\w*)*)/},\n {begin: /[\\$%@][^\\s\\w{]/, relevance: 0}\n ]\n };\n var STRING_CONTAINS = [hljs.BACKSLASH_ESCAPE, SUBST, VAR];\n var PERL_DEFAULT_CONTAINS = [\n VAR,\n hljs.HASH_COMMENT_MODE,\n hljs.COMMENT(\n '^\\\\=\\\\w',\n '\\\\=cut',\n {\n endsWithParent: true\n }\n ),\n METHOD,\n {\n className: 'string',\n contains: STRING_CONTAINS,\n variants: [\n {\n begin: 'q[qwxr]?\\\\s*\\\\(', end: '\\\\)',\n relevance: 5\n },\n {\n begin: 'q[qwxr]?\\\\s*\\\\[', end: '\\\\]',\n relevance: 5\n },\n {\n begin: 'q[qwxr]?\\\\s*\\\\{', end: '\\\\}',\n relevance: 5\n },\n {\n begin: 'q[qwxr]?\\\\s*\\\\|', end: '\\\\|',\n relevance: 5\n },\n {\n begin: 'q[qwxr]?\\\\s*\\\\<', end: '\\\\>',\n relevance: 5\n },\n {\n begin: 'qw\\\\s+q', end: 'q',\n relevance: 5\n },\n {\n begin: '\\'', end: '\\'',\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: '\"', end: '\"'\n },\n {\n begin: '`', end: '`',\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: '{\\\\w+}',\n contains: [],\n relevance: 0\n },\n {\n begin: '\\-?\\\\w+\\\\s*\\\\=\\\\>',\n contains: [],\n relevance: 0\n }\n ]\n },\n {\n className: 'number',\n begin: '(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b',\n relevance: 0\n },\n { // regexp container\n begin: '(\\\\/\\\\/|' + hljs.RE_STARTERS_RE + '|\\\\b(split|return|print|reverse|grep)\\\\b)\\\\s*',\n keywords: 'split return print reverse grep',\n relevance: 0,\n contains: [\n hljs.HASH_COMMENT_MODE,\n {\n className: 'regexp',\n begin: '(s|tr|y)/(\\\\\\\\.|[^/])*/(\\\\\\\\.|[^/])*/[a-z]*',\n relevance: 10\n },\n {\n className: 'regexp',\n begin: '(m|qr)?/', end: '/[a-z]*',\n contains: [hljs.BACKSLASH_ESCAPE],\n relevance: 0 // allows empty \"//\" which is a common comment delimiter in other languages\n }\n ]\n },\n {\n className: 'function',\n beginKeywords: 'sub', end: '(\\\\s*\\\\(.*?\\\\))?[;{]', excludeEnd: true,\n relevance: 5,\n contains: [hljs.TITLE_MODE]\n },\n {\n begin: '-\\\\w\\\\b',\n relevance: 0\n },\n {\n begin: \"^__DATA__$\",\n end: \"^__END__$\",\n subLanguage: 'mojolicious',\n contains: [\n {\n begin: \"^@@.*\",\n end: \"$\",\n className: \"comment\"\n }\n ]\n }\n ];\n SUBST.contains = PERL_DEFAULT_CONTAINS;\n METHOD.contains = PERL_DEFAULT_CONTAINS;\n\n return {\n aliases: ['pl', 'pm'],\n lexemes: /[\\w\\.]+/,\n keywords: PERL_KEYWORDS,\n contains: PERL_DEFAULT_CONTAINS\n };\n};","module.exports = function(hljs) {\n var VAR = {\n className: 'variable',\n variants: [\n {begin: /\\$\\d+/},\n {begin: /\\$\\{/, end: /}/},\n {begin: '[\\\\$\\\\@]' + hljs.UNDERSCORE_IDENT_RE}\n ]\n };\n var DEFAULT = {\n endsWithParent: true,\n lexemes: '[a-z/_]+',\n keywords: {\n literal:\n 'on off yes no true false none blocked debug info notice warn error crit ' +\n 'select break last permanent redirect kqueue rtsig epoll poll /dev/poll'\n },\n relevance: 0,\n illegal: '=>',\n contains: [\n hljs.HASH_COMMENT_MODE,\n {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, VAR],\n variants: [\n {begin: /\"/, end: /\"/},\n {begin: /'/, end: /'/}\n ]\n },\n // this swallows entire URLs to avoid detecting numbers within\n {\n begin: '([a-z]+):/', end: '\\\\s', endsWithParent: true, excludeEnd: true,\n contains: [VAR]\n },\n {\n className: 'regexp',\n contains: [hljs.BACKSLASH_ESCAPE, VAR],\n variants: [\n {begin: \"\\\\s\\\\^\", end: \"\\\\s|{|;\", returnEnd: true},\n // regexp locations (~, ~*)\n {begin: \"~\\\\*?\\\\s+\", end: \"\\\\s|{|;\", returnEnd: true},\n // *.example.com\n {begin: \"\\\\*(\\\\.[a-z\\\\-]+)+\"},\n // sub.example.*\n {begin: \"([a-z\\\\-]+\\\\.)+\\\\*\"}\n ]\n },\n // IP\n {\n className: 'number',\n begin: '\\\\b\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}(:\\\\d{1,5})?\\\\b'\n },\n // units\n {\n className: 'number',\n begin: '\\\\b\\\\d+[kKmMgGdshdwy]*\\\\b',\n relevance: 0\n },\n VAR\n ]\n };\n\n return {\n aliases: ['nginxconf'],\n contains: [\n hljs.HASH_COMMENT_MODE,\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s+{', returnBegin: true,\n end: '{',\n contains: [\n {\n className: 'section',\n begin: hljs.UNDERSCORE_IDENT_RE\n }\n ],\n relevance: 0\n },\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s', end: ';|{', returnBegin: true,\n contains: [\n {\n className: 'attribute',\n begin: hljs.UNDERSCORE_IDENT_RE,\n starts: DEFAULT\n }\n ],\n relevance: 0\n }\n ],\n illegal: '[^\\\\s\\\\}]'\n };\n};","module.exports = function(hljs) {\n var NIX_KEYWORDS = {\n keyword:\n 'rec with let in inherit assert if else then',\n literal:\n 'true false or and null',\n built_in:\n 'import abort baseNameOf dirOf isNull builtins map removeAttrs throw ' +\n 'toString derivation'\n };\n var ANTIQUOTE = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /}/,\n keywords: NIX_KEYWORDS\n };\n var ATTRS = {\n begin: /[a-zA-Z0-9-_]+(\\s*=)/, returnBegin: true,\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: /\\S+/\n }\n ]\n };\n var STRING = {\n className: 'string',\n contains: [ANTIQUOTE],\n variants: [\n {begin: \"''\", end: \"''\"},\n {begin: '\"', end: '\"'}\n ]\n };\n var EXPRESSIONS = [\n hljs.NUMBER_MODE,\n hljs.HASH_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING,\n ATTRS\n ];\n ANTIQUOTE.contains = EXPRESSIONS;\n return {\n aliases: [\"nixos\"],\n keywords: NIX_KEYWORDS,\n contains: EXPRESSIONS\n };\n};","module.exports = function(hljs) {\n var API_CLASS = {\n className: 'built_in',\n begin: '\\\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\\\w+',\n };\n var OBJC_KEYWORDS = {\n keyword:\n 'int float while char export sizeof typedef const struct for union ' +\n 'unsigned long volatile static bool mutable if do return goto void ' +\n 'enum else break extern asm case short default double register explicit ' +\n 'signed typename this switch continue wchar_t inline readonly assign ' +\n 'readwrite self @synchronized id typeof ' +\n 'nonatomic super unichar IBOutlet IBAction strong weak copy ' +\n 'in out inout bycopy byref oneway __strong __weak __block __autoreleasing ' +\n '@private @protected @public @try @property @end @throw @catch @finally ' +\n '@autoreleasepool @synthesize @dynamic @selector @optional @required ' +\n '@encode @package @import @defs @compatibility_alias ' +\n '__bridge __bridge_transfer __bridge_retained __bridge_retain ' +\n '__covariant __contravariant __kindof ' +\n '_Nonnull _Nullable _Null_unspecified ' +\n '__FUNCTION__ __PRETTY_FUNCTION__ __attribute__ ' +\n 'getter setter retain unsafe_unretained ' +\n 'nonnull nullable null_unspecified null_resettable class instancetype ' +\n 'NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER ' +\n 'NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED ' +\n 'NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE ' +\n 'NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END ' +\n 'NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW ' +\n 'NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN',\n literal:\n 'false true FALSE TRUE nil YES NO NULL',\n built_in:\n 'BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once'\n };\n var LEXEMES = /[a-zA-Z@][a-zA-Z0-9_]*/;\n var CLASS_KEYWORDS = '@interface @class @protocol @implementation';\n return {\n aliases: ['mm', 'objc', 'obj-c'],\n keywords: OBJC_KEYWORDS,\n lexemes: LEXEMES,\n illegal: '</',\n contains: [\n API_CLASS,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_NUMBER_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n {\n className: 'string',\n variants: [\n {\n begin: '@\"', end: '\"',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE]\n }\n ]\n },\n {\n className: 'meta',\n begin: /#\\s*[a-z]+\\b/, end: /$/,\n keywords: {\n 'meta-keyword':\n 'if else elif endif define undef warning error line ' +\n 'pragma ifdef ifndef include'\n },\n contains: [\n {\n begin: /\\\\\\n/, relevance: 0\n },\n hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}),\n {\n className: 'meta-string',\n begin: /<.*?>/, end: /$/,\n illegal: '\\\\n',\n },\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n },\n {\n className: 'class',\n begin: '(' + CLASS_KEYWORDS.split(' ').join('|') + ')\\\\b', end: '({|$)', excludeEnd: true,\n keywords: CLASS_KEYWORDS, lexemes: LEXEMES,\n contains: [\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: '\\\\.'+hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n }\n ]\n };\n};","module.exports = function(hljs) {\n /* missing support for heredoc-like string (OCaml 4.0.2+) */\n return {\n aliases: ['ml'],\n keywords: {\n keyword:\n 'and as assert asr begin class constraint do done downto else end ' +\n 'exception external for fun function functor if in include ' +\n 'inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method ' +\n 'mod module mutable new object of open! open or private rec sig struct ' +\n 'then to try type val! val virtual when while with ' +\n /* camlp4 */\n 'parser value',\n built_in:\n /* built-in types */\n 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' +\n /* (some) types in Pervasives */\n 'in_channel out_channel ref',\n literal:\n 'true false'\n },\n illegal: /\\/\\/|>>/,\n lexemes: '[a-z_]\\\\w*!?',\n contains: [\n {\n className: 'literal',\n begin: '\\\\[(\\\\|\\\\|)?\\\\]|\\\\(\\\\)',\n relevance: 0\n },\n hljs.COMMENT(\n '\\\\(\\\\*',\n '\\\\*\\\\)',\n {\n contains: ['self']\n }\n ),\n { /* type variable */\n className: 'symbol',\n begin: '\\'[A-Za-z_](?!\\')[\\\\w\\']*'\n /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */\n },\n { /* polymorphic variant */\n className: 'type',\n begin: '`[A-Z][\\\\w\\']*'\n },\n { /* module or constructor */\n className: 'type',\n begin: '\\\\b[A-Z][\\\\w\\']*',\n relevance: 0\n },\n { /* don't color identifiers, but safely catch all identifiers with '*/\n begin: '[a-z_]\\\\w*\\'[\\\\w\\']*', relevance: 0\n },\n hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),\n hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),\n {\n className: 'number',\n begin:\n '\\\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +\n '0[oO][0-7_]+[Lln]?|' +\n '0[bB][01_]+[Lln]?|' +\n '[0-9][0-9_]*([Lln]|(\\\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',\n relevance: 0\n },\n {\n begin: /[-=]>/ // relevance booster\n }\n ]\n }\n};","module.exports = function(hljs) {\n var COMMENT_MODE = hljs.COMMENT('--', '$');\n var UNQUOTED_IDENT = '[a-zA-Z_][a-zA-Z_0-9$]*';\n var DOLLAR_STRING = '\\\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\\\$';\n var LABEL = '<<\\\\s*' + UNQUOTED_IDENT + '\\\\s*>>';\n\n var SQL_KW =\n // https://www.postgresql.org/docs/11/static/sql-keywords-appendix.html\n // https://www.postgresql.org/docs/11/static/sql-commands.html\n // SQL commands (starting words)\n 'ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE ' +\n 'DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY ' +\n 'PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW ' +\n 'START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES ' +\n // SQL commands (others)\n 'AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN ' +\n 'WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS ' +\n 'FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM ' +\n 'TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS ' +\n 'METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION ' +\n 'INDEX PROCEDURE ASSERTION ' +\n // additional reserved key words\n 'ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK ' +\n 'COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS ' +\n 'DEFERRABLE RANGE ' +\n 'DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ' +\n 'ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT ' +\n 'NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY ' +\n 'REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN ' +\n 'TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH ' +\n // some of non-reserved (which are used in clauses or as PL/pgSQL keyword)\n 'BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN ' +\n 'BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT ' +\n 'TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN ' +\n 'EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH ' +\n 'REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ' +\n 'ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED ' +\n 'INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 ' +\n 'INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ' +\n 'ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES ' +\n 'RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS ' +\n 'UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF ' +\n // some parameters of VACUUM/ANALYZE/EXPLAIN\n 'FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING ' +\n //\n 'RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED ' +\n 'OF NOTHING NONE EXCLUDE ATTRIBUTE ' +\n // from GRANT (not keywords actually)\n 'USAGE ROUTINES ' +\n // actually literals, but look better this way (due to IS TRUE, IS FALSE, ISNULL etc)\n 'TRUE FALSE NAN INFINITY ';\n\n var ROLE_ATTRS = // only those not in keywrods already\n 'SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT ' +\n 'LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ';\n\n var PLPGSQL_KW =\n 'ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS ' +\n 'STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT ' +\n 'OPEN ';\n\n var TYPES =\n // https://www.postgresql.org/docs/11/static/datatype.html\n 'BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR ' +\n 'CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 ' +\n 'MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 ' +\n 'SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 ' +\n 'TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR ' +\n 'INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ' +\n // pseudotypes\n 'ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL ' +\n 'RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR ' +\n // spec. type\n 'NAME ' +\n // OID-types\n 'OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 ' +\n 'REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ';// +\n // some types from standard extensions\n 'HSTORE|10 LO LTREE|10 ';\n\n var TYPES_RE =\n TYPES.trim()\n .split(' ')\n .map( function(val) { return val.split('|')[0]; } )\n .join('|');\n\n var SQL_BI =\n 'CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP ' +\n 'CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC ';\n\n var PLPGSQL_BI =\n 'FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 ' +\n 'TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ' +\n // get diagnostics\n 'ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME ' +\n 'PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 ' +\n 'PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 ';\n\n var PLPGSQL_EXCEPTIONS =\n // exceptions https://www.postgresql.org/docs/current/static/errcodes-appendix.html\n 'SQLSTATE SQLERRM|10 ' +\n 'SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING ' +\n 'NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED ' +\n 'STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED ' +\n 'SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE ' +\n 'SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION ' +\n 'TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED ' +\n 'INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR ' +\n 'INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION ' +\n 'STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION ' +\n 'DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW ' +\n 'DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW ' +\n 'INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION ' +\n 'INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION ' +\n 'INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST ' +\n 'INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE ' +\n 'NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE ' +\n 'INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE ' +\n 'INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT ' +\n 'INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH ' +\n 'NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE ' +\n 'SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION ' +\n 'SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING ' +\n 'FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION ' +\n 'BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT ' +\n 'INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION ' +\n 'INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION ' +\n 'UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE ' +\n 'INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE ' +\n 'HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION ' +\n 'INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION ' +\n 'NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION ' +\n 'SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION ' +\n 'IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME ' +\n 'TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD ' +\n 'DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST ' +\n 'INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT ' +\n 'MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED ' +\n 'READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION ' +\n 'CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED ' +\n 'PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED ' +\n 'EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED ' +\n 'TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED ' +\n 'SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME ' +\n 'INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION ' +\n 'SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED ' +\n 'SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE ' +\n 'GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME ' +\n 'NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH ' +\n 'INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN ' +\n 'UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT ' +\n 'DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION ' +\n 'DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS ' +\n 'DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS ' +\n 'INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION ' +\n 'INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION ' +\n 'INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION ' +\n 'INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL ' +\n 'OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED ' +\n 'STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE ' +\n 'OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION ' +\n 'QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED ' +\n 'SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR ' +\n 'LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED ' +\n 'FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION ' +\n 'FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER ' +\n 'FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS ' +\n 'FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX ' +\n 'FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH ' +\n 'FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES ' +\n 'FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE ' +\n 'FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION ' +\n 'FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR ' +\n 'RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED ' +\n 'INDEX_CORRUPTED ';\n\n var FUNCTIONS =\n // https://www.postgresql.org/docs/11/static/functions-aggregate.html\n 'ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG ' +\n 'JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG ' +\n 'CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE ' +\n 'REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP ' +\n 'PERCENTILE_CONT PERCENTILE_DISC ' +\n // https://www.postgresql.org/docs/11/static/functions-window.html\n 'ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE ' +\n // https://www.postgresql.org/docs/11/static/functions-comparison.html\n 'NUM_NONNULLS NUM_NULLS ' +\n // https://www.postgresql.org/docs/11/static/functions-math.html\n 'ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT ' +\n 'TRUNC WIDTH_BUCKET ' +\n 'RANDOM SETSEED ' +\n 'ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND ' +\n // https://www.postgresql.org/docs/11/static/functions-string.html\n 'BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ' +\n 'ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP' +\n 'LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 ' +\n 'QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY ' +\n 'REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR ' +\n 'TO_ASCII TO_HEX TRANSLATE ' +\n // https://www.postgresql.org/docs/11/static/functions-binarystring.html\n 'OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE ' +\n // https://www.postgresql.org/docs/11/static/functions-formatting.html\n 'TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP ' +\n // https://www.postgresql.org/docs/11/static/functions-datetime.html\n 'AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL ' +\n 'MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 ' +\n 'TIMEOFDAY TRANSACTION_TIMESTAMP|10 ' +\n // https://www.postgresql.org/docs/11/static/functions-enum.html\n 'ENUM_FIRST ENUM_LAST ENUM_RANGE ' +\n // https://www.postgresql.org/docs/11/static/functions-geometry.html\n 'AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH ' +\n 'BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ' +\n // https://www.postgresql.org/docs/11/static/functions-net.html\n 'ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY' +\n 'INET_MERGE MACADDR8_SET7BIT ' +\n // https://www.postgresql.org/docs/11/static/functions-textsearch.html\n 'ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY ' +\n 'QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE ' +\n 'TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY ' +\n 'TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN ' +\n // https://www.postgresql.org/docs/11/static/functions-xml.html\n 'XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT ' +\n 'XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT ' +\n 'XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES ' +\n 'TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA ' +\n 'QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA ' +\n 'CURSOR_TO_XML CURSOR_TO_XMLSCHEMA ' +\n 'SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA ' +\n 'DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA ' +\n 'XMLATTRIBUTES ' +\n // https://www.postgresql.org/docs/11/static/functions-json.html\n 'TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT ' +\n 'JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH ' +\n 'JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH ' +\n 'JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET ' +\n 'JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT ' +\n 'JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET ' +\n 'JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY ' +\n // https://www.postgresql.org/docs/11/static/functions-sequence.html\n 'CURRVAL LASTVAL NEXTVAL SETVAL ' +\n // https://www.postgresql.org/docs/11/static/functions-conditional.html\n 'COALESCE NULLIF GREATEST LEAST ' +\n // https://www.postgresql.org/docs/11/static/functions-array.html\n 'ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ' +\n 'ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY ' +\n 'STRING_TO_ARRAY UNNEST ' +\n // https://www.postgresql.org/docs/11/static/functions-range.html\n 'ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE ' +\n // https://www.postgresql.org/docs/11/static/functions-srf.html\n 'GENERATE_SERIES GENERATE_SUBSCRIPTS ' +\n // https://www.postgresql.org/docs/11/static/functions-info.html\n 'CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT ' +\n 'INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE ' +\n 'TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE ' +\n 'COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION ' +\n 'TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX ' +\n 'TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS ' +\n // https://www.postgresql.org/docs/11/static/functions-admin.html\n 'CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE ' +\n 'GIN_CLEAN_PENDING_LIST ' +\n // https://www.postgresql.org/docs/11/static/functions-trigger.html\n 'SUPPRESS_REDUNDANT_UPDATES_TRIGGER ' +\n // ihttps://www.postgresql.org/docs/devel/static/lo-funcs.html\n 'LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE ' +\n //\n 'GROUPING CAST ';\n\n var FUNCTIONS_RE =\n FUNCTIONS.trim()\n .split(' ')\n .map( function(val) { return val.split('|')[0]; } )\n .join('|');\n\n return {\n aliases: ['postgres','postgresql'],\n case_insensitive: true,\n keywords: {\n keyword:\n SQL_KW + PLPGSQL_KW + ROLE_ATTRS,\n built_in:\n SQL_BI + PLPGSQL_BI + PLPGSQL_EXCEPTIONS,\n },\n // Forbid some cunstructs from other languages to improve autodetect. In fact\n // \"[a-z]:\" is legal (as part of array slice), but improbabal.\n illegal: /:==|\\W\\s*\\(\\*|(^|\\s)\\$[a-z]|{{|[a-z]:\\s*$|\\.\\.\\.|TO:|DO:/,\n contains: [\n // special handling of some words, which are reserved only in some contexts\n {\n className: 'keyword',\n variants: [\n { begin: /\\bTEXT\\s*SEARCH\\b/ },\n { begin: /\\b(PRIMARY|FOREIGN|FOR(\\s+NO)?)\\s+KEY\\b/ },\n { begin: /\\bPARALLEL\\s+(UNSAFE|RESTRICTED|SAFE)\\b/ },\n { begin: /\\bSTORAGE\\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\\b/ },\n { begin: /\\bMATCH\\s+(FULL|PARTIAL|SIMPLE)\\b/ },\n { begin: /\\bNULLS\\s+(FIRST|LAST)\\b/ },\n { begin: /\\bEVENT\\s+TRIGGER\\b/ },\n { begin: /\\b(MAPPING|OR)\\s+REPLACE\\b/ },\n { begin: /\\b(FROM|TO)\\s+(PROGRAM|STDIN|STDOUT)\\b/ },\n { begin: /\\b(SHARE|EXCLUSIVE)\\s+MODE\\b/ },\n { begin: /\\b(LEFT|RIGHT)\\s+(OUTER\\s+)?JOIN\\b/ },\n { begin: /\\b(FETCH|MOVE)\\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\\b/ },\n { begin: /\\bPRESERVE\\s+ROWS\\b/ },\n { begin: /\\bDISCARD\\s+PLANS\\b/ },\n { begin: /\\bREFERENCING\\s+(OLD|NEW)\\b/ },\n { begin: /\\bSKIP\\s+LOCKED\\b/ },\n { begin: /\\bGROUPING\\s+SETS\\b/ },\n { begin: /\\b(BINARY|INSENSITIVE|SCROLL|NO\\s+SCROLL)\\s+(CURSOR|FOR)\\b/ },\n { begin: /\\b(WITH|WITHOUT)\\s+HOLD\\b/ },\n { begin: /\\bWITH\\s+(CASCADED|LOCAL)\\s+CHECK\\s+OPTION\\b/ },\n { begin: /\\bEXCLUDE\\s+(TIES|NO\\s+OTHERS)\\b/ },\n { begin: /\\bFORMAT\\s+(TEXT|XML|JSON|YAML)\\b/ },\n { begin: /\\bSET\\s+((SESSION|LOCAL)\\s+)?NAMES\\b/ },\n { begin: /\\bIS\\s+(NOT\\s+)?UNKNOWN\\b/ },\n { begin: /\\bSECURITY\\s+LABEL\\b/ },\n { begin: /\\bSTANDALONE\\s+(YES|NO|NO\\s+VALUE)\\b/ },\n { begin: /\\bWITH\\s+(NO\\s+)?DATA\\b/ },\n { begin: /\\b(FOREIGN|SET)\\s+DATA\\b/ },\n { begin: /\\bSET\\s+(CATALOG|CONSTRAINTS)\\b/ },\n { begin: /\\b(WITH|FOR)\\s+ORDINALITY\\b/ },\n { begin: /\\bIS\\s+(NOT\\s+)?DOCUMENT\\b/ },\n { begin: /\\bXML\\s+OPTION\\s+(DOCUMENT|CONTENT)\\b/ },\n { begin: /\\b(STRIP|PRESERVE)\\s+WHITESPACE\\b/ },\n { begin: /\\bNO\\s+(ACTION|MAXVALUE|MINVALUE)\\b/ },\n { begin: /\\bPARTITION\\s+BY\\s+(RANGE|LIST|HASH)\\b/ },\n { begin: /\\bAT\\s+TIME\\s+ZONE\\b/ },\n { begin: /\\bGRANTED\\s+BY\\b/ },\n { begin: /\\bRETURN\\s+(QUERY|NEXT)\\b/ },\n { begin: /\\b(ATTACH|DETACH)\\s+PARTITION\\b/ },\n { begin: /\\bFORCE\\s+ROW\\s+LEVEL\\s+SECURITY\\b/ },\n { begin: /\\b(INCLUDING|EXCLUDING)\\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\\b/ },\n { begin: /\\bAS\\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\\b/ }\n ]\n },\n // functions named as keywords, followed by '('\n {\n begin: /\\b(FORMAT|FAMILY|VERSION)\\s*\\(/,\n //keywords: { built_in: 'FORMAT FAMILY VERSION' }\n },\n // INCLUDE ( ... ) in index_parameters in CREATE TABLE\n {\n begin: /\\bINCLUDE\\s*\\(/,\n keywords: 'INCLUDE'\n },\n // not highlight RANGE if not in frame_clause (not 100% correct, but seems satisfactory)\n {\n begin: /\\bRANGE(?!\\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/\n },\n // disable highlighting in commands CREATE AGGREGATE/COLLATION/DATABASE/OPERTOR/TEXT SEARCH .../TYPE\n // and in PL/pgSQL RAISE ... USING\n {\n begin: /\\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\\s*=/\n },\n // PG_smth; HAS_some_PRIVILEGE\n {\n //className: 'built_in',\n begin: /\\b(PG_\\w+?|HAS_[A-Z_]+_PRIVILEGE)\\b/,\n relevance: 10\n },\n // extract\n {\n begin: /\\bEXTRACT\\s*\\(/,\n end: /\\bFROM\\b/,\n returnEnd: true,\n keywords: {\n //built_in: 'EXTRACT',\n type: 'CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS ' +\n 'MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR ' +\n 'TIMEZONE_MINUTE WEEK YEAR'\n }\n },\n // xmlelement, xmlpi - special NAME\n {\n begin: /\\b(XMLELEMENT|XMLPI)\\s*\\(\\s*NAME/,\n keywords: {\n //built_in: 'XMLELEMENT XMLPI',\n keyword: 'NAME'\n }\n },\n // xmlparse, xmlserialize\n {\n begin: /\\b(XMLPARSE|XMLSERIALIZE)\\s*\\(\\s*(DOCUMENT|CONTENT)/,\n keywords: {\n //built_in: 'XMLPARSE XMLSERIALIZE',\n keyword: 'DOCUMENT CONTENT'\n }\n },\n // Sequences. We actually skip everything between CACHE|INCREMENT|MAXVALUE|MINVALUE and\n // nearest following numeric constant. Without with trick we find a lot of \"keywords\"\n // in 'avrasm' autodetection test...\n {\n beginKeywords: 'CACHE INCREMENT MAXVALUE MINVALUE',\n end: hljs.C_NUMBER_RE,\n returnEnd: true,\n keywords: 'BY CACHE INCREMENT MAXVALUE MINVALUE'\n },\n // WITH|WITHOUT TIME ZONE as part of datatype\n {\n className: 'type',\n begin: /\\b(WITH|WITHOUT)\\s+TIME\\s+ZONE\\b/\n },\n // INTERVAL optional fields\n {\n className: 'type',\n begin: /\\bINTERVAL\\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\\s+TO\\s+(MONTH|HOUR|MINUTE|SECOND))?\\b/\n },\n // Pseudo-types which allowed only as return type\n {\n begin: /\\bRETURNS\\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\\b/,\n keywords: {\n keyword: 'RETURNS',\n type: 'LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER'\n }\n },\n // Known functions - only when followed by '('\n {\n begin: '\\\\b(' + FUNCTIONS_RE + ')\\\\s*\\\\('\n //keywords: { built_in: FUNCTIONS }\n },\n // Types\n {\n begin: '\\\\.(' + TYPES_RE + ')\\\\b' // prevent highlight as type, say, 'oid' in 'pgclass.oid'\n },\n {\n begin: '\\\\b(' + TYPES_RE + ')\\\\s+PATH\\\\b', // in XMLTABLE\n keywords: {\n keyword: 'PATH', // hopefully no one would use PATH type in XMLTABLE...\n type: TYPES.replace('PATH ','')\n }\n },\n {\n className: 'type',\n begin: '\\\\b(' + TYPES_RE + ')\\\\b'\n },\n // Strings, see https://www.postgresql.org/docs/11/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS\n {\n className: 'string',\n begin: '\\'', end: '\\'',\n contains: [{begin: '\\'\\''}]\n },\n {\n className: 'string',\n begin: '(e|E|u&|U&)\\'', end: '\\'',\n contains: [{begin: '\\\\\\\\.'}],\n relevance: 10\n },\n {\n begin: DOLLAR_STRING,\n endSameAsBegin: true,\n contains: [\n {\n // actually we want them all except SQL; listed are those with known implementations\n // and XML + JSON just in case\n subLanguage: ['pgsql','perl','python','tcl','r','lua','java','php','ruby','bash','scheme','xml','json'],\n endsWithParent: true\n }\n ]\n },\n // identifiers in quotes\n {\n begin: '\"', end: '\"',\n contains: [{begin: '\"\"'}]\n },\n // numbers\n hljs.C_NUMBER_MODE,\n // comments\n hljs.C_BLOCK_COMMENT_MODE,\n COMMENT_MODE,\n // PL/pgSQL staff\n // %ROWTYPE, %TYPE, $n\n {\n className: 'meta',\n variants: [\n {begin: '%(ROW)?TYPE', relevance: 10}, // %TYPE, %ROWTYPE\n {begin: '\\\\$\\\\d+'}, // $n\n {begin: '^#\\\\w', end: '$'} // #compiler option\n ]\n },\n // <<labeles>>\n {\n className: 'symbol',\n begin: LABEL,\n relevance: 10\n }\n ]\n };\n};","module.exports = function(hljs) {\n var VARIABLE = {\n begin: '\\\\$+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*'\n };\n var PREPROCESSOR = {\n className: 'meta', begin: /<\\?(php)?|\\?>/\n };\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, PREPROCESSOR],\n variants: [\n {\n begin: 'b\"', end: '\"'\n },\n {\n begin: 'b\\'', end: '\\''\n },\n hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),\n hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})\n ]\n };\n var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};\n return {\n aliases: ['php', 'php3', 'php4', 'php5', 'php6', 'php7'],\n case_insensitive: true,\n keywords:\n 'and include_once list abstract global private echo interface as static endswitch ' +\n 'array null if endwhile or const for endforeach self var while isset public ' +\n 'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' +\n 'return parent clone use __CLASS__ __LINE__ else break print eval new ' +\n 'catch __METHOD__ case exception default die require __FUNCTION__ ' +\n 'enddeclare final try switch continue endfor endif declare unset true false ' +\n 'trait goto instanceof insteadof __DIR__ __NAMESPACE__ ' +\n 'yield finally',\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.COMMENT('//', '$', {contains: [PREPROCESSOR]}),\n hljs.COMMENT(\n '/\\\\*',\n '\\\\*/',\n {\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.COMMENT(\n '__halt_compiler.+?;',\n false,\n {\n endsWithParent: true,\n keywords: '__halt_compiler',\n lexemes: hljs.UNDERSCORE_IDENT_RE\n }\n ),\n {\n className: 'string',\n begin: /<<<['\"]?\\w+['\"]?$/, end: /^\\w+;?$/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n {\n className: 'subst',\n variants: [\n {begin: /\\$\\w+/},\n {begin: /\\{\\$/, end: /\\}/}\n ]\n }\n ]\n },\n PREPROCESSOR,\n {\n className: 'keyword', begin: /\\$this\\b/\n },\n VARIABLE,\n {\n // swallow composed identifiers to avoid parsing them as keywords\n begin: /(::|->)+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/\n },\n {\n className: 'function',\n beginKeywords: 'function', end: /[;{]/, excludeEnd: true,\n illegal: '\\\\$|\\\\[|%',\n contains: [\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'params',\n begin: '\\\\(', end: '\\\\)',\n contains: [\n 'self',\n VARIABLE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING,\n NUMBER\n ]\n }\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface', end: '{', excludeEnd: true,\n illegal: /[:\\(\\$\"]/,\n contains: [\n {beginKeywords: 'extends implements'},\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n beginKeywords: 'namespace', end: ';',\n illegal: /[\\.']/,\n contains: [hljs.UNDERSCORE_TITLE_MODE]\n },\n {\n beginKeywords: 'use', end: ';',\n contains: [hljs.UNDERSCORE_TITLE_MODE]\n },\n {\n begin: '=>' // No markup, just a relevance booster\n },\n STRING,\n NUMBER\n ]\n };\n};","module.exports = function(hljs) {\n return {\n disableAutodetect: true\n };\n};","module.exports = function(hljs){\n\n var TYPES =\n [\"string\", \"char\", \"byte\", \"int\", \"long\", \"bool\", \"decimal\", \"single\",\n \"double\", \"DateTime\", \"xml\", \"array\", \"hashtable\", \"void\"];\n\n // https://msdn.microsoft.com/en-us/library/ms714428(v=vs.85).aspx\n var VALID_VERBS =\n 'Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|' +\n 'Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|' +\n 'Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|' +\n 'Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|' +\n 'ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|' +\n 'Limit|Merge|New|Out|Publish|Restore|Save|Sync|Unpublish|Update|' +\n 'Approve|Assert|Complete|Confirm|Deny|Disable|Enable|Install|Invoke|Register|' +\n 'Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|' +\n 'Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|' +\n 'Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|' +\n 'Unprotect|Use|ForEach|Sort|Tee|Where';\n\n var COMPARISON_OPERATORS =\n '-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|' +\n '-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|' +\n '-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|' +\n '-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|' +\n '-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|' +\n '-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|' +\n '-split|-wildcard|-xor';\n\n var KEYWORDS = {\n keyword: 'if else foreach return do while until elseif begin for trap data dynamicparam ' +\n 'end break throw param continue finally in switch exit filter try process catch ' +\n 'hidden static parameter'\n // TODO: 'validate[A-Z]+' can't work in keywords\n };\n\n var TITLE_NAME_RE = /\\w[\\w\\d]*((-)[\\w\\d]+)*/;\n\n var BACKTICK_ESCAPE = {\n begin: '`[\\\\s\\\\S]',\n relevance: 0\n };\n\n var VAR = {\n className: 'variable',\n variants: [\n { begin: /\\$\\B/ },\n { className: 'keyword', begin: /\\$this/ },\n { begin: /\\$[\\w\\d][\\w\\d_:]*/ }\n ]\n };\n\n var LITERAL = {\n className: 'literal',\n begin: /\\$(null|true|false)\\b/\n };\n\n var QUOTE_STRING = {\n className: \"string\",\n variants: [{ begin: /\"/, end: /\"/ }, { begin: /@\"/, end: /^\"@/ }],\n contains: [\n BACKTICK_ESCAPE,\n VAR,\n {\n className: 'variable',\n begin: /\\$[A-z]/, end: /[^A-z]/\n }\n ]\n };\n\n var APOS_STRING = {\n className: 'string',\n variants: [\n { begin: /'/, end: /'/ },\n { begin: /@'/, end: /^'@/ }\n ]\n };\n\n var PS_HELPTAGS = {\n className: \"doctag\",\n variants: [\n /* no paramater help tags */\n {\n begin: /\\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/\n },\n /* one parameter help tags */\n { begin: /\\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\\s+\\S+/ }\n ]\n };\n\n var PS_COMMENT = hljs.inherit(\n hljs.COMMENT(null, null),\n {\n variants: [\n /* single-line comment */\n { begin: /#/, end: /$/ },\n /* multi-line comment */\n { begin: /<#/, end: /#>/ }\n ],\n contains: [PS_HELPTAGS]\n }\n );\n\n var CMDLETS = {\n className: 'built_in',\n variants: [\n { begin: '('.concat(VALID_VERBS, ')+(-)[\\\\w\\\\d]+') }\n ]\n };\n\n var PS_CLASS = {\n className: 'class',\n beginKeywords: 'class enum', end: /\\s*[{]/, excludeEnd: true,\n relevance: 0,\n contains: [hljs.TITLE_MODE]\n };\n\n var PS_FUNCTION = {\n className: 'function',\n begin: /function\\s+/, end: /\\s*\\{|$/,\n excludeEnd: true,\n returnBegin: true,\n relevance: 0,\n contains: [\n { begin: \"function\", relevance: 0, className: \"keyword\" },\n { className: \"title\",\n begin: TITLE_NAME_RE, relevance:0 },\n { begin: /\\(/, end: /\\)/, className: \"params\",\n relevance: 0,\n contains: [VAR] }\n // CMDLETS\n ]\n };\n\n // Using statment, plus type, plus assembly name.\n var PS_USING = {\n begin: /using\\s/, end: /$/,\n returnBegin: true,\n contains: [\n QUOTE_STRING,\n APOS_STRING,\n { className: 'keyword', begin: /(using|assembly|command|module|namespace|type)/ }\n ]\n };\n\n // Comperison operators & function named parameters.\n var PS_ARGUMENTS = {\n variants: [\n // PS literals are pretty verbose so it's a good idea to accent them a bit.\n { className: 'operator', begin: '('.concat(COMPARISON_OPERATORS, ')\\\\b') },\n { className: 'literal', begin: /(-)[\\w\\d]+/, relevance:0 }\n ]\n };\n\n var STATIC_MEMBER = {\n className: 'selector-tag',\n begin: /::\\w+\\b/, end: /$/,\n returnBegin: true,\n contains: [\n { className: 'attribute', begin: /\\w+/, endsParent: true }\n ]\n };\n\n var HASH_SIGNS = {\n className: 'selector-tag',\n begin: /\\@\\B/,\n relevance: 0\n };\n\n var PS_NEW_OBJECT_TYPE = {\n className: 'built_in',\n begin: /New-Object\\s+\\w/, end: /$/,\n returnBegin: true,\n contains: [\n { begin: /New-Object\\s+/, relevance: 0 },\n { className: 'meta', begin: /([\\w\\.])+/, endsParent: true }\n ]\n };\n\n // It's a very general rule so I'll narrow it a bit with some strict boundaries\n // to avoid any possible false-positive collisions!\n var PS_METHODS = {\n className: 'function',\n begin: /\\[.*\\]\\s*[\\w]+[ ]??\\(/, end: /$/,\n returnBegin: true,\n relevance: 0,\n contains: [\n {\n className: 'keyword', begin: '('.concat(\n KEYWORDS.keyword.toString().replace(/\\s/g, '|'\n ), ')\\\\b'),\n endsParent: true,\n relevance: 0\n },\n hljs.inherit(hljs.TITLE_MODE, { endsParent: true })\n ]\n };\n\n var GENTLEMANS_SET = [\n // STATIC_MEMBER,\n PS_METHODS,\n PS_COMMENT,\n BACKTICK_ESCAPE,\n hljs.NUMBER_MODE,\n QUOTE_STRING,\n APOS_STRING,\n // PS_NEW_OBJECT_TYPE,\n CMDLETS,\n VAR,\n LITERAL,\n HASH_SIGNS\n ];\n\n var PS_TYPE = {\n begin: /\\[/, end: /\\]/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0,\n contains: [].concat(\n 'self',\n GENTLEMANS_SET,\n { begin: \"(\" + TYPES.join(\"|\") + \")\", className: \"built_in\", relevance:0 },\n { className: 'type', begin: /[\\.\\w\\d]+/, relevance: 0 }\n )\n };\n\n PS_METHODS.contains.unshift(PS_TYPE)\n\n return {\n aliases: [\"ps\", \"ps1\"],\n lexemes: /-?[A-z\\.\\-]+/,\n case_insensitive: true,\n keywords: KEYWORDS,\n contains: GENTLEMANS_SET.concat(\n PS_CLASS,\n PS_FUNCTION,\n PS_USING,\n PS_ARGUMENTS,\n PS_TYPE\n )\n };\n};","module.exports = function(hljs) {\n\n var ATOM = {\n\n begin: /[a-z][A-Za-z0-9_]*/,\n relevance: 0\n };\n\n var VAR = {\n\n className: 'symbol',\n variants: [\n {begin: /[A-Z][a-zA-Z0-9_]*/},\n {begin: /_[A-Za-z0-9_]*/},\n ],\n relevance: 0\n };\n\n var PARENTED = {\n\n begin: /\\(/,\n end: /\\)/,\n relevance: 0\n };\n\n var LIST = {\n\n begin: /\\[/,\n end: /\\]/\n };\n\n var LINE_COMMENT = {\n\n className: 'comment',\n begin: /%/, end: /$/,\n contains: [hljs.PHRASAL_WORDS_MODE]\n };\n\n var BACKTICK_STRING = {\n\n className: 'string',\n begin: /`/, end: /`/,\n contains: [hljs.BACKSLASH_ESCAPE]\n };\n\n var CHAR_CODE = {\n\n className: 'string', // 0'a etc.\n begin: /0\\'(\\\\\\'|.)/\n };\n\n var SPACE_CODE = {\n\n className: 'string',\n begin: /0\\'\\\\s/ // 0'\\s\n };\n\n var PRED_OP = { // relevance booster\n begin: /:-/\n };\n\n var inner = [\n\n ATOM,\n VAR,\n PARENTED,\n PRED_OP,\n LIST,\n LINE_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n BACKTICK_STRING,\n CHAR_CODE,\n SPACE_CODE,\n hljs.C_NUMBER_MODE\n ];\n\n PARENTED.contains = inner;\n LIST.contains = inner;\n\n return {\n contains: inner.concat([\n {begin: /\\.$/} // relevance booster\n ])\n };\n};","module.exports = function(hljs) {\n var KEYWORDS = {\n keyword:\n 'and elif is global as in if from raise for except finally print import pass return ' +\n 'exec else break not with class assert yield try while continue del or def lambda ' +\n 'async await nonlocal|10',\n built_in:\n 'Ellipsis NotImplemented',\n literal: 'False None True'\n };\n var PROMPT = {\n className: 'meta', begin: /^(>>>|\\.\\.\\.) /\n };\n var SUBST = {\n className: 'subst',\n begin: /\\{/, end: /\\}/,\n keywords: KEYWORDS,\n illegal: /#/\n };\n var LITERAL_BRACKET = {\n begin: /\\{\\{/,\n relevance: 0\n };\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE],\n variants: [\n {\n begin: /(u|b)?r?'''/, end: /'''/,\n contains: [hljs.BACKSLASH_ESCAPE, PROMPT],\n relevance: 10\n },\n {\n begin: /(u|b)?r?\"\"\"/, end: /\"\"\"/,\n contains: [hljs.BACKSLASH_ESCAPE, PROMPT],\n relevance: 10\n },\n {\n begin: /(fr|rf|f)'''/, end: /'''/,\n contains: [hljs.BACKSLASH_ESCAPE, PROMPT, LITERAL_BRACKET, SUBST]\n },\n {\n begin: /(fr|rf|f)\"\"\"/, end: /\"\"\"/,\n contains: [hljs.BACKSLASH_ESCAPE, PROMPT, LITERAL_BRACKET, SUBST]\n },\n {\n begin: /(u|r|ur)'/, end: /'/,\n relevance: 10\n },\n {\n begin: /(u|r|ur)\"/, end: /\"/,\n relevance: 10\n },\n {\n begin: /(b|br)'/, end: /'/\n },\n {\n begin: /(b|br)\"/, end: /\"/\n },\n {\n begin: /(fr|rf|f)'/, end: /'/,\n contains: [hljs.BACKSLASH_ESCAPE, LITERAL_BRACKET, SUBST]\n },\n {\n begin: /(fr|rf|f)\"/, end: /\"/,\n contains: [hljs.BACKSLASH_ESCAPE, LITERAL_BRACKET, SUBST]\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE\n ]\n };\n var NUMBER = {\n className: 'number', relevance: 0,\n variants: [\n {begin: hljs.BINARY_NUMBER_RE + '[lLjJ]?'},\n {begin: '\\\\b(0o[0-7]+)[lLjJ]?'},\n {begin: hljs.C_NUMBER_RE + '[lLjJ]?'}\n ]\n };\n var PARAMS = {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n contains: ['self', PROMPT, NUMBER, STRING, hljs.HASH_COMMENT_MODE]\n };\n SUBST.contains = [STRING, NUMBER, PROMPT];\n return {\n aliases: ['py', 'gyp', 'ipython'],\n keywords: KEYWORDS,\n illegal: /(<\\/|->|\\?)|=>/,\n contains: [\n PROMPT,\n NUMBER,\n // eat \"if\" prior to string so that it won't accidentally be\n // labeled as an f-string as in:\n { beginKeywords: \"if\", relevance: 0 },\n STRING,\n hljs.HASH_COMMENT_MODE,\n {\n variants: [\n {className: 'function', beginKeywords: 'def'},\n {className: 'class', beginKeywords: 'class'}\n ],\n end: /:/,\n illegal: /[${=;\\n,]/,\n contains: [\n hljs.UNDERSCORE_TITLE_MODE,\n PARAMS,\n {\n begin: /->/, endsWithParent: true,\n keywords: 'None'\n }\n ]\n },\n {\n className: 'meta',\n begin: /^[\\t ]*@/, end: /$/\n },\n {\n begin: /\\b(print|exec)\\(/ // don’t highlight keywords-turned-functions in Python 3\n }\n ]\n };\n};","module.exports = function(hljs) {\n var IDENT_RE = '([a-zA-Z]|\\\\.[a-zA-Z.])[a-zA-Z0-9._]*';\n\n return {\n contains: [\n hljs.HASH_COMMENT_MODE,\n {\n begin: IDENT_RE,\n lexemes: IDENT_RE,\n keywords: {\n keyword:\n 'function if in break next repeat else for return switch while try tryCatch ' +\n 'stop warning require library attach detach source setMethod setGeneric ' +\n 'setGroupGeneric setClass ...',\n literal:\n 'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' +\n 'NA_complex_|10'\n },\n relevance: 0\n },\n {\n // hex value\n className: 'number',\n begin: \"0[xX][0-9a-fA-F]+[Li]?\\\\b\",\n relevance: 0\n },\n {\n // explicit integer\n className: 'number',\n begin: \"\\\\d+(?:[eE][+\\\\-]?\\\\d*)?L\\\\b\",\n relevance: 0\n },\n {\n // number with trailing decimal\n className: 'number',\n begin: \"\\\\d+\\\\.(?!\\\\d)(?:i\\\\b)?\",\n relevance: 0\n },\n {\n // number\n className: 'number',\n begin: \"\\\\d+(?:\\\\.\\\\d*)?(?:[eE][+\\\\-]?\\\\d*)?i?\\\\b\",\n relevance: 0\n },\n {\n // number with leading decimal\n className: 'number',\n begin: \"\\\\.\\\\d+(?:[eE][+\\\\-]?\\\\d*)?i?\\\\b\",\n relevance: 0\n },\n\n {\n // escaped identifier\n begin: '`',\n end: '`',\n relevance: 0\n },\n\n {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE],\n variants: [\n {begin: '\"', end: '\"'},\n {begin: \"'\", end: \"'\"}\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n function orReValues(ops){\n return ops\n .map(function(op) {\n return op\n .split('')\n .map(function(char) {\n return '\\\\' + char;\n })\n .join('');\n })\n .join('|');\n }\n\n var RE_IDENT = '~?[a-z$_][0-9a-zA-Z$_]*';\n var RE_MODULE_IDENT = '`?[A-Z$_][0-9a-zA-Z$_]*';\n\n var RE_PARAM_TYPEPARAM = '\\'?[a-z$_][0-9a-z$_]*';\n var RE_PARAM_TYPE = '\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*(' + RE_PARAM_TYPEPARAM + '\\s*(,' + RE_PARAM_TYPEPARAM + ')*)?\\s*\\))?';\n var RE_PARAM = RE_IDENT + '(' + RE_PARAM_TYPE + ')?(' + RE_PARAM_TYPE + ')?';\n var RE_OPERATOR = \"(\" + orReValues(['||', '&&', '++', '**', '+.', '*', '/', '*.', '/.', '...', '|>']) + \"|==|===)\";\n var RE_OPERATOR_SPACED = \"\\\\s+\" + RE_OPERATOR + \"\\\\s+\";\n\n var KEYWORDS = {\n keyword:\n 'and as asr assert begin class constraint do done downto else end exception external' +\n 'for fun function functor if in include inherit initializer' +\n 'land lazy let lor lsl lsr lxor match method mod module mutable new nonrec' +\n 'object of open or private rec sig struct then to try type val virtual when while with',\n built_in:\n 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ',\n literal:\n 'true false'\n };\n\n var RE_NUMBER = '\\\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +\n '0[oO][0-7_]+[Lln]?|' +\n '0[bB][01_]+[Lln]?|' +\n '[0-9][0-9_]*([Lln]|(\\\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)';\n\n var NUMBER_MODE = {\n className: 'number',\n relevance: 0,\n variants: [\n {\n begin: RE_NUMBER\n },\n {\n begin: '\\\\(\\\\-' + RE_NUMBER + '\\\\)'\n }\n ]\n };\n\n var OPERATOR_MODE = {\n className: 'operator',\n relevance: 0,\n begin: RE_OPERATOR\n };\n var LIST_CONTENTS_MODES = [\n {\n className: 'identifier',\n relevance: 0,\n begin: RE_IDENT\n },\n OPERATOR_MODE,\n NUMBER_MODE\n ];\n\n var MODULE_ACCESS_CONTENTS = [\n hljs.QUOTE_STRING_MODE,\n OPERATOR_MODE,\n {\n className: 'module',\n begin: \"\\\\b\" + RE_MODULE_IDENT, returnBegin: true,\n end: \"\\.\",\n contains: [\n {\n className: 'identifier',\n begin: RE_MODULE_IDENT,\n relevance: 0\n }\n ]\n }\n ];\n\n var PARAMS_CONTENTS = [\n {\n className: 'module',\n begin: \"\\\\b\" + RE_MODULE_IDENT, returnBegin: true,\n end: \"\\.\",\n relevance: 0,\n contains: [\n {\n className: 'identifier',\n begin: RE_MODULE_IDENT,\n relevance: 0\n }\n ]\n }\n ];\n\n var PARAMS_MODE = {\n begin: RE_IDENT,\n end: '(,|\\\\n|\\\\))',\n relevance: 0,\n contains: [\n OPERATOR_MODE,\n {\n className: 'typing',\n begin: ':',\n end: '(,|\\\\n)',\n returnBegin: true,\n relevance: 0,\n contains: PARAMS_CONTENTS\n }\n ]\n };\n\n var FUNCTION_BLOCK_MODE = {\n className: 'function',\n relevance: 0,\n keywords: KEYWORDS,\n variants: [\n {\n begin: '\\\\s(\\\\(\\\\.?.*?\\\\)|' + RE_IDENT + ')\\\\s*=>',\n end: '\\\\s*=>',\n returnBegin: true,\n relevance: 0,\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: RE_IDENT\n },\n {\n begin: RE_PARAM\n },\n {\n begin: /\\(\\s*\\)/,\n }\n ]\n }\n ]\n },\n {\n begin: '\\\\s\\\\(\\\\.?[^;\\\\|]*\\\\)\\\\s*=>',\n end: '\\\\s=>',\n returnBegin: true,\n relevance: 0,\n contains: [\n {\n className: 'params',\n relevance: 0,\n variants: [\n PARAMS_MODE\n ]\n }\n ]\n },\n {\n begin: '\\\\(\\\\.\\\\s' + RE_IDENT + '\\\\)\\\\s*=>'\n }\n ]\n };\n MODULE_ACCESS_CONTENTS.push(FUNCTION_BLOCK_MODE);\n\n var CONSTRUCTOR_MODE = {\n className: 'constructor',\n begin: RE_MODULE_IDENT + '\\\\(',\n end: '\\\\)',\n illegal: '\\\\n',\n keywords: KEYWORDS,\n contains: [\n hljs.QUOTE_STRING_MODE,\n OPERATOR_MODE,\n {\n className: 'params',\n begin: '\\\\b' + RE_IDENT\n }\n ]\n };\n\n var PATTERN_MATCH_BLOCK_MODE = {\n className: 'pattern-match',\n begin: '\\\\|',\n returnBegin: true,\n keywords: KEYWORDS,\n end: '=>',\n relevance: 0,\n contains: [\n CONSTRUCTOR_MODE,\n OPERATOR_MODE,\n {\n relevance: 0,\n className: 'constructor',\n begin: RE_MODULE_IDENT\n }\n ]\n };\n\n var MODULE_ACCESS_MODE = {\n className: 'module-access',\n keywords: KEYWORDS,\n returnBegin: true,\n variants: [\n {\n begin: \"\\\\b(\" + RE_MODULE_IDENT + \"\\\\.)+\" + RE_IDENT\n },\n {\n begin: \"\\\\b(\" + RE_MODULE_IDENT + \"\\\\.)+\\\\(\",\n end: \"\\\\)\",\n returnBegin: true,\n contains: [\n FUNCTION_BLOCK_MODE,\n {\n begin: '\\\\(',\n end: '\\\\)',\n skip: true\n }\n ].concat(MODULE_ACCESS_CONTENTS)\n },\n {\n begin: \"\\\\b(\" + RE_MODULE_IDENT + \"\\\\.)+{\",\n end: \"}\"\n }\n ],\n contains: MODULE_ACCESS_CONTENTS\n };\n\n PARAMS_CONTENTS.push(MODULE_ACCESS_MODE);\n\n return {\n aliases: ['re'],\n keywords: KEYWORDS,\n illegal: '(:\\\\-|:=|\\\\${|\\\\+=)',\n contains: [\n hljs.COMMENT('/\\\\*', '\\\\*/', { illegal: '^(\\\\#,\\\\/\\\\/)' }),\n {\n className: 'character',\n begin: '\\'(\\\\\\\\[^\\']+|[^\\'])\\'',\n illegal: '\\\\n',\n relevance: 0\n },\n hljs.QUOTE_STRING_MODE,\n {\n className: 'literal',\n begin: '\\\\(\\\\)',\n relevance: 0\n },\n {\n className: 'literal',\n begin: '\\\\[\\\\|',\n end: '\\\\|\\\\]',\n relevance: 0,\n contains: LIST_CONTENTS_MODES\n },\n {\n className: 'literal',\n begin: '\\\\[',\n end: '\\\\]',\n relevance: 0,\n contains: LIST_CONTENTS_MODES\n },\n CONSTRUCTOR_MODE,\n {\n className: 'operator',\n begin: RE_OPERATOR_SPACED,\n illegal: '\\\\-\\\\->',\n relevance: 0\n },\n NUMBER_MODE,\n hljs.C_LINE_COMMENT_MODE,\n PATTERN_MATCH_BLOCK_MODE,\n FUNCTION_BLOCK_MODE,\n {\n className: 'module-def',\n begin: \"\\\\bmodule\\\\s+\" + RE_IDENT + \"\\\\s+\" + RE_MODULE_IDENT + \"\\\\s+=\\\\s+{\",\n end: \"}\",\n returnBegin: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n className: 'module',\n relevance: 0,\n begin: RE_MODULE_IDENT\n },\n {\n begin: '{',\n end: '}',\n skip: true\n }\n ].concat(MODULE_ACCESS_CONTENTS)\n },\n MODULE_ACCESS_MODE\n ]\n };\n};","module.exports = function(hljs) {\n var RUBY_METHOD_RE = '[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?';\n var RUBY_KEYWORDS = {\n keyword:\n 'and then defined module in return redo if BEGIN retry end for self when ' +\n 'next until do begin unless END rescue else break undef not super class case ' +\n 'require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor',\n literal:\n 'true false nil'\n };\n var YARDOCTAG = {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n };\n var IRB_OBJECT = {\n begin: '#<', end: '>'\n };\n var COMMENT_MODES = [\n hljs.COMMENT(\n '#',\n '$',\n {\n contains: [YARDOCTAG]\n }\n ),\n hljs.COMMENT(\n '^\\\\=begin',\n '^\\\\=end',\n {\n contains: [YARDOCTAG],\n relevance: 10\n }\n ),\n hljs.COMMENT('^__END__', '\\\\n$')\n ];\n var SUBST = {\n className: 'subst',\n begin: '#\\\\{', end: '}',\n keywords: RUBY_KEYWORDS\n };\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n {begin: /'/, end: /'/},\n {begin: /\"/, end: /\"/},\n {begin: /`/, end: /`/},\n {begin: '%[qQwWx]?\\\\(', end: '\\\\)'},\n {begin: '%[qQwWx]?\\\\[', end: '\\\\]'},\n {begin: '%[qQwWx]?{', end: '}'},\n {begin: '%[qQwWx]?<', end: '>'},\n {begin: '%[qQwWx]?/', end: '/'},\n {begin: '%[qQwWx]?%', end: '%'},\n {begin: '%[qQwWx]?-', end: '-'},\n {begin: '%[qQwWx]?\\\\|', end: '\\\\|'},\n {\n // \\B in the beginning suppresses recognition of ?-sequences where ?\n // is the last character of a preceding identifier, as in: `func?4`\n begin: /\\B\\?(\\\\\\d{1,3}|\\\\x[A-Fa-f0-9]{1,2}|\\\\u[A-Fa-f0-9]{4}|\\\\?\\S)\\b/\n },\n { // heredocs\n begin: /<<[-~]?'?(\\w+)(?:.|\\n)*?\\n\\s*\\1\\b/,\n returnBegin: true,\n contains: [\n { begin: /<<[-~]?'?/ },\n { begin: /\\w+/,\n endSameAsBegin: true,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n }\n ]\n }\n ]\n };\n var PARAMS = {\n className: 'params',\n begin: '\\\\(', end: '\\\\)', endsParent: true,\n keywords: RUBY_KEYWORDS\n };\n\n var RUBY_DEFAULT_CONTAINS = [\n STRING,\n IRB_OBJECT,\n {\n className: 'class',\n beginKeywords: 'class module', end: '$|;',\n illegal: /=/,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?'}),\n {\n begin: '<\\\\s*',\n contains: [{\n begin: '(' + hljs.IDENT_RE + '::)?' + hljs.IDENT_RE\n }]\n }\n ].concat(COMMENT_MODES)\n },\n {\n className: 'function',\n beginKeywords: 'def', end: '$|;',\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: RUBY_METHOD_RE}),\n PARAMS\n ].concat(COMMENT_MODES)\n },\n {\n // swallow namespace qualifiers before symbols\n begin: hljs.IDENT_RE + '::'\n },\n {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '(\\\\!|\\\\?)?:',\n relevance: 0\n },\n {\n className: 'symbol',\n begin: ':(?!\\\\s)',\n contains: [STRING, {begin: RUBY_METHOD_RE}],\n relevance: 0\n },\n {\n className: 'number',\n begin: '(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b',\n relevance: 0\n },\n {\n begin: '(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))' // variables\n },\n {\n className: 'params',\n begin: /\\|/, end: /\\|/,\n keywords: RUBY_KEYWORDS\n },\n { // regexp container\n begin: '(' + hljs.RE_STARTERS_RE + '|unless)\\\\s*',\n keywords: 'unless',\n contains: [\n IRB_OBJECT,\n {\n className: 'regexp',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n illegal: /\\n/,\n variants: [\n {begin: '/', end: '/[a-z]*'},\n {begin: '%r{', end: '}[a-z]*'},\n {begin: '%r\\\\(', end: '\\\\)[a-z]*'},\n {begin: '%r!', end: '![a-z]*'},\n {begin: '%r\\\\[', end: '\\\\][a-z]*'}\n ]\n }\n ].concat(COMMENT_MODES),\n relevance: 0\n }\n ].concat(COMMENT_MODES);\n\n SUBST.contains = RUBY_DEFAULT_CONTAINS;\n PARAMS.contains = RUBY_DEFAULT_CONTAINS;\n\n var SIMPLE_PROMPT = \"[>?]>\";\n var DEFAULT_PROMPT = \"[\\\\w#]+\\\\(\\\\w+\\\\):\\\\d+:\\\\d+>\";\n var RVM_PROMPT = \"(\\\\w+-)?\\\\d+\\\\.\\\\d+\\\\.\\\\d(p\\\\d+)?[^>]+>\";\n\n var IRB_DEFAULT = [\n {\n begin: /^\\s*=>/,\n starts: {\n end: '$', contains: RUBY_DEFAULT_CONTAINS\n }\n },\n {\n className: 'meta',\n begin: '^('+SIMPLE_PROMPT+\"|\"+DEFAULT_PROMPT+'|'+RVM_PROMPT+')',\n starts: {\n end: '$', contains: RUBY_DEFAULT_CONTAINS\n }\n }\n ];\n\n return {\n aliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb'],\n keywords: RUBY_KEYWORDS,\n illegal: /\\/\\*/,\n contains: COMMENT_MODES.concat(IRB_DEFAULT).concat(RUBY_DEFAULT_CONTAINS)\n };\n};","module.exports = function(hljs) {\n var NUM_SUFFIX = '([ui](8|16|32|64|128|size)|f(32|64))\\?';\n var KEYWORDS =\n 'abstract as async await become box break const continue crate do dyn ' +\n 'else enum extern false final fn for if impl in let loop macro match mod ' +\n 'move mut override priv pub ref return self Self static struct super ' +\n 'trait true try type typeof unsafe unsized use virtual where while yield';\n var BUILTINS =\n // functions\n 'drop ' +\n // types\n 'i8 i16 i32 i64 i128 isize ' +\n 'u8 u16 u32 u64 u128 usize ' +\n 'f32 f64 ' +\n 'str char bool ' +\n 'Box Option Result String Vec ' +\n // traits\n 'Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug ' +\n 'PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator ' +\n 'Extend IntoIterator DoubleEndedIterator ExactSizeIterator ' +\n 'SliceConcatExt ToString ' +\n // macros\n 'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' +\n 'debug_assert! debug_assert_eq! env! panic! file! format! format_args! ' +\n 'include_bin! include_str! line! local_data_key! module_path! ' +\n 'option_env! print! println! select! stringify! try! unimplemented! ' +\n 'unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!';\n return {\n aliases: ['rs'],\n keywords: {\n keyword:\n KEYWORDS,\n literal:\n 'true false Some None Ok Err',\n built_in:\n BUILTINS\n },\n lexemes: hljs.IDENT_RE + '!?',\n illegal: '</',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.COMMENT('/\\\\*', '\\\\*/', {contains: ['self']}),\n hljs.inherit(hljs.QUOTE_STRING_MODE, {begin: /b?\"/, illegal: null}),\n {\n className: 'string',\n variants: [\n { begin: /r(#*)\"(.|\\n)*?\"\\1(?!#)/ },\n { begin: /b?'\\\\?(x\\w{2}|u\\w{4}|U\\w{8}|.)'/ }\n ]\n },\n {\n className: 'symbol',\n begin: /'[a-zA-Z_][a-zA-Z0-9_]*/\n },\n {\n className: 'number',\n variants: [\n { begin: '\\\\b0b([01_]+)' + NUM_SUFFIX },\n { begin: '\\\\b0o([0-7_]+)' + NUM_SUFFIX },\n { begin: '\\\\b0x([A-Fa-f0-9_]+)' + NUM_SUFFIX },\n { begin: '\\\\b(\\\\d[\\\\d_]*(\\\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)' +\n NUM_SUFFIX\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'fn', end: '(\\\\(|<)', excludeEnd: true,\n contains: [hljs.UNDERSCORE_TITLE_MODE]\n },\n {\n className: 'meta',\n begin: '#\\\\!?\\\\[', end: '\\\\]',\n contains: [\n {\n className: 'meta-string',\n begin: /\"/, end: /\"/\n }\n ]\n },\n {\n className: 'class',\n beginKeywords: 'type', end: ';',\n contains: [\n hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})\n ],\n illegal: '\\\\S'\n },\n {\n className: 'class',\n beginKeywords: 'trait enum struct union', end: '{',\n contains: [\n hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})\n ],\n illegal: '[\\\\w\\\\d]'\n },\n {\n begin: hljs.IDENT_RE + '::',\n keywords: {built_in: BUILTINS}\n },\n {\n begin: '->'\n }\n ]\n };\n};","module.exports = function(hljs) {\n\n var ANNOTATION = { className: 'meta', begin: '@[A-Za-z]+' };\n\n // used in strings for escaping/interpolation/substitution\n var SUBST = {\n className: 'subst',\n variants: [\n {begin: '\\\\$[A-Za-z0-9_]+'},\n {begin: '\\\\${', end: '}'}\n ]\n };\n\n var STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"', end: '\"',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: '\"\"\"', end: '\"\"\"',\n relevance: 10\n },\n {\n begin: '[a-z]+\"', end: '\"',\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n },\n {\n className: 'string',\n begin: '[a-z]+\"\"\"', end: '\"\"\"',\n contains: [SUBST],\n relevance: 10\n }\n ]\n\n };\n\n var SYMBOL = {\n className: 'symbol',\n begin: '\\'\\\\w[\\\\w\\\\d_]*(?!\\')'\n };\n\n var TYPE = {\n className: 'type',\n begin: '\\\\b[A-Z][A-Za-z0-9_]*',\n relevance: 0\n };\n\n var NAME = {\n className: 'title',\n begin: /[^0-9\\n\\t \"'(),.`{}\\[\\]:;][^\\n\\t \"'(),.`{}\\[\\]:;]+|[^0-9\\n\\t \"'(),.`{}\\[\\]:;=]/,\n relevance: 0\n };\n\n var CLASS = {\n className: 'class',\n beginKeywords: 'class object trait type',\n end: /[:={\\[\\n;]/,\n excludeEnd: true,\n contains: [\n {\n beginKeywords: 'extends with',\n relevance: 10\n },\n {\n begin: /\\[/,\n end: /\\]/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0,\n contains: [TYPE]\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0,\n contains: [TYPE]\n },\n NAME\n ]\n };\n\n var METHOD = {\n className: 'function',\n beginKeywords: 'def',\n end: /[:={\\[(\\n;]/,\n excludeEnd: true,\n contains: [NAME]\n };\n\n return {\n keywords: {\n literal: 'true false null',\n keyword: 'type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit'\n },\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING,\n SYMBOL,\n TYPE,\n METHOD,\n CLASS,\n hljs.C_NUMBER_MODE,\n ANNOTATION\n ]\n };\n};","module.exports = function(hljs) {\n var AT_IDENTIFIER = '@[a-z-]+' // @font-face\n var AT_MODIFIERS = \"and or not only\"\n var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';\n var VARIABLE = {\n className: 'variable',\n begin: '(\\\\$' + IDENT_RE + ')\\\\b'\n };\n var HEXCOLOR = {\n className: 'number', begin: '#[0-9A-Fa-f]+'\n };\n var DEF_INTERNALS = {\n className: 'attribute',\n begin: '[A-Z\\\\_\\\\.\\\\-]+', end: ':',\n excludeEnd: true,\n illegal: '[^\\\\s]',\n starts: {\n endsWithParent: true, excludeEnd: true,\n contains: [\n HEXCOLOR,\n hljs.CSS_NUMBER_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n {\n className: 'meta', begin: '!important'\n }\n ]\n }\n };\n return {\n case_insensitive: true,\n illegal: '[=/|\\']',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n {\n className: 'selector-id', begin: '\\\\#[A-Za-z0-9_-]+',\n relevance: 0\n },\n {\n className: 'selector-class', begin: '\\\\.[A-Za-z0-9_-]+',\n relevance: 0\n },\n {\n className: 'selector-attr', begin: '\\\\[', end: '\\\\]',\n illegal: '$'\n },\n {\n className: 'selector-tag', // begin: IDENT_RE, end: '[,|\\\\s]'\n begin: '\\\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\\\b',\n relevance: 0\n },\n {\n className: 'selector-pseudo',\n begin: ':(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)'\n },\n {\n className: 'selector-pseudo',\n begin: '::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)'\n },\n VARIABLE,\n {\n className: 'attribute',\n begin: '\\\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\\\b',\n illegal: '[^\\\\s]'\n },\n {\n begin: '\\\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\\\b'\n },\n {\n begin: ':', end: ';',\n contains: [\n VARIABLE,\n HEXCOLOR,\n hljs.CSS_NUMBER_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n {\n className: 'meta', begin: '!important'\n }\n ]\n },\n // matching these here allows us to treat them more like regular CSS\n // rules so everything between the {} gets regular rule highlighting,\n // which is what we want for page and font-face\n {\n begin: '@(page|font-face)',\n lexemes: AT_IDENTIFIER,\n keywords: '@page @font-face'\n },\n {\n begin: '@', end: '[{;]',\n returnBegin: true,\n keywords: AT_MODIFIERS,\n contains: [\n {\n begin: AT_IDENTIFIER,\n className: \"keyword\"\n },\n VARIABLE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n HEXCOLOR,\n hljs.CSS_NUMBER_MODE,\n // {\n // begin: '\\\\s[A-Za-z0-9_.-]+',\n // relevance: 0\n // }\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['console'],\n contains: [\n {\n className: 'meta',\n begin: '^\\\\s{0,3}[/\\\\w\\\\d\\\\[\\\\]()@-]*[>%$#]',\n starts: {\n end: '$', subLanguage: 'bash'\n }\n }\n ]\n }\n};","module.exports = function(hljs) {\n var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*';\n var CHAR = {\n className: 'string',\n begin: '\\\\$.{1}'\n };\n var SYMBOL = {\n className: 'symbol',\n begin: '#' + hljs.UNDERSCORE_IDENT_RE\n };\n return {\n aliases: ['st'],\n keywords: 'self super nil true false thisContext', // only 6\n contains: [\n hljs.COMMENT('\"', '\"'),\n hljs.APOS_STRING_MODE,\n {\n className: 'type',\n begin: '\\\\b[A-Z][A-Za-z0-9_]*',\n relevance: 0\n },\n {\n begin: VAR_IDENT_RE + ':',\n relevance: 0\n },\n hljs.C_NUMBER_MODE,\n SYMBOL,\n CHAR,\n {\n // This looks more complicated than needed to avoid combinatorial\n // explosion under V8. It effectively means `| var1 var2 ... |` with\n // whitespace adjacent to `|` being optional.\n begin: '\\\\|[ ]*' + VAR_IDENT_RE + '([ ]+' + VAR_IDENT_RE + ')*[ ]*\\\\|',\n returnBegin: true, end: /\\|/,\n illegal: /\\S/,\n contains: [{begin: '(\\\\|[ ]*)?' + VAR_IDENT_RE}]\n },\n {\n begin: '\\\\#\\\\(', end: '\\\\)',\n contains: [\n hljs.APOS_STRING_MODE,\n CHAR,\n hljs.C_NUMBER_MODE,\n SYMBOL\n ]\n }\n ]\n };\n};","module.exports = function(hljs) {\n var COMMENT_MODE = hljs.COMMENT('--', '$');\n return {\n case_insensitive: true,\n illegal: /[<>{}*]/,\n contains: [\n {\n beginKeywords:\n 'begin end start commit rollback savepoint lock alter create drop rename call ' +\n 'delete do handler insert load replace select truncate update set show pragma grant ' +\n 'merge describe use explain help declare prepare execute deallocate release ' +\n 'unlock purge reset change stop analyze cache flush optimize repair kill ' +\n 'install uninstall checksum restore check backup revoke comment values with',\n end: /;/, endsWithParent: true,\n lexemes: /[\\w\\.]+/,\n keywords: {\n keyword:\n 'as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add ' +\n 'addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias ' +\n 'all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply ' +\n 'archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan ' +\n 'atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid ' +\n 'authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile ' +\n 'before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float ' +\n 'binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound ' +\n 'bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel ' +\n 'capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base ' +\n 'char_length character_length characters characterset charindex charset charsetform charsetid check ' +\n 'checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close ' +\n 'cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation ' +\n 'collect colu colum column column_value columns columns_updated comment commit compact compatibility ' +\n 'compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn ' +\n 'connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection ' +\n 'consider consistent constant constraint constraints constructor container content contents context ' +\n 'contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost ' +\n 'count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation ' +\n 'critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user ' +\n 'cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add ' +\n 'date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts ' +\n 'day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate ' +\n 'declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults ' +\n 'deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank ' +\n 'depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor ' +\n 'deterministic diagnostics difference dimension direct_load directory disable disable_all ' +\n 'disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div ' +\n 'do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable ' +\n 'editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt ' +\n 'end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors ' +\n 'escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding ' +\n 'execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external ' +\n 'external_1 external_2 externally extract failed failed_login_attempts failover failure far fast ' +\n 'feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final ' +\n 'finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign ' +\n 'form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ' +\n 'ftp full function general generated get get_format get_lock getdate getutcdate global global_name ' +\n 'globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups ' +\n 'gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex ' +\n 'hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified ' +\n 'identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment ' +\n 'index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile ' +\n 'initial initialized initially initrans inmemory inner innodb input insert install instance instantiable ' +\n 'instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat ' +\n 'is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists ' +\n 'keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase ' +\n 'lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit ' +\n 'lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate ' +\n 'locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call ' +\n 'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime ' +\n 'managed management manual map mapping mask master master_pos_wait match matched materialized max ' +\n 'maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans ' +\n 'md5 measures median medium member memcompress memory merge microsecond mid migration min minextents ' +\n 'minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month ' +\n 'months mount move movement multiset mutex name name_const names nan national native natural nav nchar ' +\n 'nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile ' +\n 'nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile ' +\n 'nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder ' +\n 'nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck ' +\n 'noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe ' +\n 'nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ' +\n 'ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old ' +\n 'on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date ' +\n 'oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary ' +\n 'out outer outfile outline output over overflow overriding package pad parallel parallel_enable ' +\n 'parameters parent parse partial partition partitions pascal passing password password_grace_time ' +\n 'password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex ' +\n 'pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc ' +\n 'performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin ' +\n 'policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction ' +\n 'prediction_cost prediction_details prediction_probability prediction_set prepare present preserve ' +\n 'prior priority private private_sga privileges procedural procedure procedure_analyze processlist ' +\n 'profiles project prompt protection public publishingservername purge quarter query quick quiesce quota ' +\n 'quotename radians raise rand range rank raw read reads readsize rebuild record records ' +\n 'recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh ' +\n 'regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy ' +\n 'reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename ' +\n 'repair repeat replace replicate replication required reset resetlogs resize resource respect restore ' +\n 'restricted result result_cache resumable resume retention return returning returns reuse reverse revoke ' +\n 'right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows ' +\n 'rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll ' +\n 'sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select ' +\n 'self semi sequence sequential serializable server servererror session session_user sessions_per_user set ' +\n 'sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor ' +\n 'si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin ' +\n 'size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex ' +\n 'source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows ' +\n 'sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone ' +\n 'standby start starting startup statement static statistics stats_binomial_test stats_crosstab ' +\n 'stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep ' +\n 'stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev ' +\n 'stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate ' +\n 'subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum ' +\n 'suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate ' +\n 'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo ' +\n 'template temporary terminated tertiary_weights test than then thread through tier ties time time_format ' +\n 'time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr ' +\n 'timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking ' +\n 'transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate ' +\n 'try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress ' +\n 'under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot ' +\n 'unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert ' +\n 'url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date ' +\n 'utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var ' +\n 'var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray ' +\n 'verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear ' +\n 'wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped ' +\n 'xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces ' +\n 'xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek',\n literal:\n 'true false null unknown',\n built_in:\n 'array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number ' +\n 'numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void'\n },\n contains: [\n {\n className: 'string',\n begin: '\\'', end: '\\'',\n contains: [{begin: '\\'\\''}]\n },\n {\n className: 'string',\n begin: '\"', end: '\"',\n contains: [{begin: '\"\"'}]\n },\n {\n className: 'string',\n begin: '`', end: '`'\n },\n hljs.C_NUMBER_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n COMMENT_MODE,\n hljs.HASH_COMMENT_MODE\n ]\n },\n hljs.C_BLOCK_COMMENT_MODE,\n COMMENT_MODE,\n hljs.HASH_COMMENT_MODE\n ]\n };\n};","module.exports = function(hljs) {\n var SWIFT_KEYWORDS = {\n keyword: '#available #colorLiteral #column #else #elseif #endif #file ' +\n '#fileLiteral #function #if #imageLiteral #line #selector #sourceLocation ' +\n '_ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype ' +\n 'associativity break case catch class continue convenience default defer deinit didSet do ' +\n 'dynamic dynamicType else enum extension fallthrough false fileprivate final for func ' +\n 'get guard if import in indirect infix init inout internal is lazy left let ' +\n 'mutating nil none nonmutating open operator optional override postfix precedence ' +\n 'prefix private protocol Protocol public repeat required rethrows return ' +\n 'right self Self set static struct subscript super switch throw throws true ' +\n 'try try! try? Type typealias unowned var weak where while willSet',\n literal: 'true false nil',\n built_in: 'abs advance alignof alignofValue anyGenerator assert assertionFailure ' +\n 'bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC ' +\n 'bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros ' +\n 'debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords ' +\n 'enumerate equal fatalError filter find getBridgedObjectiveCType getVaList ' +\n 'indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC ' +\n 'isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare ' +\n 'map max maxElement min minElement numericCast overlaps partition posix ' +\n 'precondition preconditionFailure print println quickSort readLine reduce reflect ' +\n 'reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split ' +\n 'startsWith stride strideof strideofValue swap toString transcode ' +\n 'underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap ' +\n 'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' +\n 'withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers ' +\n 'withUnsafePointer withUnsafePointers withVaList zip'\n };\n\n var TYPE = {\n className: 'type',\n begin: '\\\\b[A-Z][\\\\w\\u00C0-\\u02B8\\']*',\n relevance: 0\n };\n // slightly more special to swift\n var OPTIONAL_USING_TYPE = {\n className: 'type',\n begin: '\\\\b[A-Z][\\\\w\\u00C0-\\u02B8\\']*[!?]'\n }\n var BLOCK_COMMENT = hljs.COMMENT(\n '/\\\\*',\n '\\\\*/',\n {\n contains: ['self']\n }\n );\n var SUBST = {\n className: 'subst',\n begin: /\\\\\\(/, end: '\\\\)',\n keywords: SWIFT_KEYWORDS,\n contains: [] // assigned later\n };\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n variants: [\n {begin: /\"\"\"/, end: /\"\"\"/},\n {begin: /\"/, end: /\"/},\n ]\n };\n var NUMBERS = {\n className: 'number',\n begin: '\\\\b([\\\\d_]+(\\\\.[\\\\deE_]+)?|0x[a-fA-F0-9_]+(\\\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\\\b',\n relevance: 0\n };\n SUBST.contains = [NUMBERS];\n\n return {\n keywords: SWIFT_KEYWORDS,\n contains: [\n STRING,\n hljs.C_LINE_COMMENT_MODE,\n BLOCK_COMMENT,\n OPTIONAL_USING_TYPE,\n TYPE,\n NUMBERS,\n {\n className: 'function',\n beginKeywords: 'func', end: '{', excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {\n begin: /[A-Za-z$_][0-9A-Za-z$_]*/\n }),\n {\n begin: /</, end: />/\n },\n {\n className: 'params',\n begin: /\\(/, end: /\\)/, endsParent: true,\n keywords: SWIFT_KEYWORDS,\n contains: [\n 'self',\n NUMBERS,\n STRING,\n hljs.C_BLOCK_COMMENT_MODE,\n {begin: ':'} // relevance booster\n ],\n illegal: /[\"']/\n }\n ],\n illegal: /\\[|%/\n },\n {\n className: 'class',\n beginKeywords: 'struct protocol class extension enum',\n keywords: SWIFT_KEYWORDS,\n end: '\\\\{',\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][\\u00C0-\\u02B80-9A-Za-z$_]*/})\n ]\n },\n {\n className: 'meta', // @attributes\n begin: '(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|' +\n '@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|' +\n '@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|' +\n '@infix|@prefix|@postfix|@autoclosure|@testable|@available|' +\n '@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|' +\n '@propertyWrapper)'\n\n },\n {\n beginKeywords: 'import', end: /$/,\n contains: [hljs.C_LINE_COMMENT_MODE, BLOCK_COMMENT]\n }\n ]\n };\n};","module.exports = function(hljs) {\n var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n var KEYWORDS = {\n keyword:\n 'in if for while finally var new function do return void else break catch ' +\n 'instanceof with throw case default try this switch continue typeof delete ' +\n 'let yield const class public private protected get set super ' +\n 'static implements enum export import declare type namespace abstract ' +\n 'as from extends async await',\n literal:\n 'true false null undefined NaN Infinity',\n built_in:\n 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +\n 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +\n 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +\n 'TypeError URIError Number Math Date String RegExp Array Float32Array ' +\n 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +\n 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +\n 'module console window document any number boolean string void Promise'\n };\n\n var DECORATOR = {\n className: 'meta',\n begin: '@' + JS_IDENT_RE,\n };\n\n var ARGS =\n {\n begin: '\\\\(',\n end: /\\)/,\n keywords: KEYWORDS,\n contains: [\n 'self',\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n hljs.NUMBER_MODE\n ]\n };\n\n var PARAMS = {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n DECORATOR,\n ARGS\n ]\n };\n var NUMBER = {\n className: 'number',\n variants: [\n { begin: '\\\\b(0[bB][01]+)n?' },\n { begin: '\\\\b(0[oO][0-7]+)n?' },\n { begin: hljs.C_NUMBER_RE + 'n?' }\n ],\n relevance: 0\n };\n var SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{', end: '\\\\}',\n keywords: KEYWORDS,\n contains: [] // defined later\n };\n var HTML_TEMPLATE = {\n begin: 'html`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml',\n }\n };\n var CSS_TEMPLATE = {\n begin: 'css`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css',\n }\n };\n var TEMPLATE_STRING = {\n className: 'string',\n begin: '`', end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n SUBST.contains = [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n NUMBER,\n hljs.REGEXP_MODE\n ];\n\n\n\n return {\n aliases: ['ts'],\n keywords: KEYWORDS,\n contains: [\n {\n className: 'meta',\n begin: /^\\s*['\"]use strict['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n NUMBER,\n { // \"value\" container\n begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n keywords: 'return throw case',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n begin: '(\\\\(.*?\\\\)|' + hljs.IDENT_RE + ')\\\\s*=>', returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.IDENT_RE\n },\n {\n begin: /\\(\\s*\\)/,\n },\n {\n begin: /\\(/, end: /\\)/,\n excludeBegin: true, excludeEnd: true,\n keywords: KEYWORDS,\n contains: [\n 'self',\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n }\n ]\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function', end: /[\\{;]/, excludeEnd: true,\n keywords: KEYWORDS,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: JS_IDENT_RE }),\n PARAMS\n ],\n illegal: /%/,\n relevance: 0 // () => {} is more typical in TypeScript\n },\n {\n beginKeywords: 'constructor', end: /[\\{;]/, excludeEnd: true,\n contains: [\n 'self',\n PARAMS\n ]\n },\n { // prevent references like module.id from being higlighted as module definitions\n begin: /module\\./,\n keywords: { built_in: 'module' },\n relevance: 0\n },\n {\n beginKeywords: 'module', end: /\\{/, excludeEnd: true\n },\n {\n beginKeywords: 'interface', end: /\\{/, excludeEnd: true,\n keywords: 'interface extends'\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n },\n {\n begin: '\\\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots\n },\n DECORATOR,\n ARGS\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['vb'],\n case_insensitive: true,\n keywords: {\n keyword:\n 'addhandler addressof alias and andalso aggregate ansi as async assembly auto await binary by byref byval ' + /* a-b */\n 'call case catch class compare const continue custom declare default delegate dim distinct do ' + /* c-d */\n 'each equals else elseif end enum erase error event exit explicit finally for friend from function ' + /* e-f */\n 'get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue iterator ' + /* g-i */\n 'join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass ' + /* j-m */\n 'namespace narrowing new next not notinheritable notoverridable ' + /* n */\n 'of off on operator option optional or order orelse overloads overridable overrides ' + /* o */\n 'paramarray partial preserve private property protected public ' + /* p */\n 'raiseevent readonly redim rem removehandler resume return ' + /* r */\n 'select set shadows shared skip static step stop structure strict sub synclock ' + /* s */\n 'take text then throw to try unicode until using when where while widening with withevents writeonly xor yield', /* t-y */\n built_in:\n 'boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype ' + /* b-c */\n 'date decimal directcast double gettype getxmlnamespace iif integer long object ' + /* d-o */\n 'sbyte short single string trycast typeof uinteger ulong ushort', /* s-u */\n literal:\n 'true false nothing'\n },\n illegal: '//|{|}|endif|gosub|variant|wend|^\\\\$ ', /* reserved deprecated keywords */\n contains: [\n hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '\"\"'}]}),\n hljs.COMMENT(\n '\\'',\n '$',\n {\n returnBegin: true,\n contains: [\n {\n className: 'doctag',\n begin: '\\'\\'\\'|<!--|-->',\n contains: [hljs.PHRASAL_WORDS_MODE]\n },\n {\n className: 'doctag',\n begin: '</?', end: '>',\n contains: [hljs.PHRASAL_WORDS_MODE]\n }\n ]\n }\n ),\n hljs.C_NUMBER_MODE,\n {\n className: 'meta',\n begin: '#', end: '$',\n keywords: {'meta-keyword': 'if else elseif end region externalsource'}\n }\n ]\n };\n};","module.exports = function(hljs) {\n return {\n aliases: ['vbs'],\n case_insensitive: true,\n keywords: {\n keyword:\n 'call class const dim do loop erase execute executeglobal exit for each next function ' +\n 'if then else on error option explicit new private property let get public randomize ' +\n 'redim rem select case set stop sub while wend with end to elseif is or xor and not ' +\n 'class_initialize class_terminate default preserve in me byval byref step resume goto',\n built_in:\n 'lcase month vartype instrrev ubound setlocale getobject rgb getref string ' +\n 'weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency ' +\n 'conversions csng timevalue second year space abs clng timeserial fixs len asc ' +\n 'isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate ' +\n 'instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex ' +\n 'chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim ' +\n 'strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion ' +\n 'scriptengine split scriptengineminorversion cint sin datepart ltrim sqr ' +\n 'scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw ' +\n 'chrw regexp server response request cstr err',\n literal:\n 'true false null nothing empty'\n },\n illegal: '//',\n contains: [\n hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '\"\"'}]}),\n hljs.COMMENT(\n /'/,\n /$/,\n {\n relevance: 0\n }\n ),\n hljs.C_NUMBER_MODE\n ]\n };\n};","module.exports = function(hljs) {\n return {\n lexemes: /[!#@\\w]+/,\n keywords: {\n keyword:\n // express version except: ! & * < = > !! # @ @@\n 'N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope '+\n 'cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc '+\n 'ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 '+\n 'profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor '+\n 'so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew '+\n 'tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ '+\n // full version\n 'Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload '+\n 'bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap '+\n 'cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor '+\n 'endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap '+\n 'imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview '+\n 'lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap '+\n 'nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext '+\n 'ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding '+\n 'scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace '+\n 'startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious '+'trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew '+\n 'vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank',\n built_in: //built in func\n 'synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv ' +\n 'complete_check add getwinposx getqflist getwinposy screencol ' +\n 'clearmatches empty extend getcmdpos mzeval garbagecollect setreg ' +\n 'ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable ' +\n 'shiftwidth max sinh isdirectory synID system inputrestore winline ' +\n 'atan visualmode inputlist tabpagewinnr round getregtype mapcheck ' +\n 'hasmapto histdel argidx findfile sha256 exists toupper getcmdline ' +\n 'taglist string getmatches bufnr strftime winwidth bufexists ' +\n 'strtrans tabpagebuflist setcmdpos remote_read printf setloclist ' +\n 'getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval ' +\n 'resolve libcallnr foldclosedend reverse filter has_key bufname ' +\n 'str2float strlen setline getcharmod setbufvar index searchpos ' +\n 'shellescape undofile foldclosed setqflist buflisted strchars str2nr ' +\n 'virtcol floor remove undotree remote_expr winheight gettabwinvar ' +\n 'reltime cursor tabpagenr finddir localtime acos getloclist search ' +\n 'tanh matchend rename gettabvar strdisplaywidth type abs py3eval ' +\n 'setwinvar tolower wildmenumode log10 spellsuggest bufloaded ' +\n 'synconcealed nextnonblank server2client complete settabwinvar ' +\n 'executable input wincol setmatches getftype hlID inputsave ' +\n 'searchpair or screenrow line settabvar histadd deepcopy strpart ' +\n 'remote_peek and eval getftime submatch screenchar winsaveview ' +\n 'matchadd mkdir screenattr getfontname libcall reltimestr getfsize ' +\n 'winnr invert pow getbufline byte2line soundfold repeat fnameescape ' +\n 'tagfiles sin strwidth spellbadword trunc maparg log lispindent ' +\n 'hostname setpos globpath remote_foreground getchar synIDattr ' +\n 'fnamemodify cscope_connection stridx winbufnr indent min ' +\n 'complete_add nr2char searchpairpos inputdialog values matchlist ' +\n 'items hlexists strridx browsedir expand fmod pathshorten line2byte ' +\n 'argc count getwinvar glob foldtextresult getreg foreground cosh ' +\n 'matchdelete has char2nr simplify histget searchdecl iconv ' +\n 'winrestcmd pumvisible writefile foldlevel haslocaldir keys cos ' +\n 'matchstr foldtext histnr tan tempname getcwd byteidx getbufvar ' +\n 'islocked escape eventhandler remote_send serverlist winrestview ' +\n 'synstack pyeval prevnonblank readfile cindent filereadable changenr ' +\n 'exp'\n },\n illegal: /;/,\n contains: [\n hljs.NUMBER_MODE,\n {\n className: 'string',\n begin: '\\'', end: '\\'',\n illegal: '\\\\n'\n },\n\n /*\n A double quote can start either a string or a line comment. Strings are\n ended before the end of a line by another double quote and can contain\n escaped double-quotes and post-escaped line breaks.\n\n Also, any double quote at the beginning of a line is a comment but we\n don't handle that properly at the moment: any double quote inside will\n turn them into a string. Handling it properly will require a smarter\n parser.\n */\n {\n className: 'string',\n begin: /\"(\\\\\"|\\n\\\\|[^\"\\n])*\"/\n },\n hljs.COMMENT('\"', '$'),\n\n {\n className: 'variable',\n begin: /[bwtglsav]:[\\w\\d_]*/\n },\n {\n className: 'function',\n beginKeywords: 'function function!', end: '$',\n relevance: 0,\n contains: [\n hljs.TITLE_MODE,\n {\n className: 'params',\n begin: '\\\\(', end: '\\\\)'\n }\n ]\n },\n {\n className: 'symbol',\n begin: /<[\\w-]+>/\n }\n ]\n };\n};","module.exports = function(hljs) {\n var LITERALS = 'true false yes no null';\n\n // Define keys as starting with a word character\n // ...containing word chars, spaces, colons, forward-slashes, hyphens and periods\n // ...and ending with a colon followed immediately by a space, tab or newline.\n // The YAML spec allows for much more than this, but this covers most use-cases.\n var KEY = {\n className: 'attr',\n variants: [\n { begin: '\\\\w[\\\\w :\\\\/.-]*:(?=[ \\t]|$)' },\n { begin: '\"\\\\w[\\\\w :\\\\/.-]*\":(?=[ \\t]|$)' }, //double quoted keys\n { begin: '\\'\\\\w[\\\\w :\\\\/.-]*\\':(?=[ \\t]|$)' } //single quoted keys\n ]\n };\n\n var TEMPLATE_VARIABLES = {\n className: 'template-variable',\n variants: [\n { begin: '\\{\\{', end: '\\}\\}' }, // jinja templates Ansible\n { begin: '%\\{', end: '\\}' } // Ruby i18n\n ]\n };\n var STRING = {\n className: 'string',\n relevance: 0,\n variants: [\n {begin: /'/, end: /'/},\n {begin: /\"/, end: /\"/},\n {begin: /\\S+/}\n ],\n contains: [\n hljs.BACKSLASH_ESCAPE,\n TEMPLATE_VARIABLES\n ]\n };\n\n return {\n case_insensitive: true,\n aliases: ['yml', 'YAML', 'yaml'],\n contains: [\n KEY,\n {\n className: 'meta',\n begin: '^---\\s*$',\n relevance: 10\n },\n { // multi line string\n // Blocks start with a | or > followed by a newline\n //\n // Indentation of subsequent lines must be the same to\n // be considered part of the block\n className: 'string',\n begin: '[\\\\|>]([0-9]?[+-])?[ ]*\\\\n( *)[\\\\S ]+\\\\n(\\\\2[\\\\S ]+\\\\n?)*',\n },\n { // Ruby/Rails erb\n begin: '<%[%=-]?', end: '[%-]?%>',\n subLanguage: 'ruby',\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n { // local tags\n className: 'type',\n begin: '!' + hljs.UNDERSCORE_IDENT_RE,\n },\n { // data type\n className: 'type',\n begin: '!!' + hljs.UNDERSCORE_IDENT_RE,\n },\n { // fragment id &ref\n className: 'meta',\n begin: '&' + hljs.UNDERSCORE_IDENT_RE + '$',\n },\n { // fragment reference *ref\n className: 'meta',\n begin: '\\\\*' + hljs.UNDERSCORE_IDENT_RE + '$'\n },\n { // array listing\n className: 'bullet',\n // TODO: remove |$ hack when we have proper look-ahead support\n begin: '\\\\-(?=[ ]|$)',\n relevance: 0\n },\n hljs.HASH_COMMENT_MODE,\n {\n beginKeywords: LITERALS,\n keywords: {literal: LITERALS}\n },\n // numbers are any valid C-style number that\n // sit isolated from other words\n {\n className: 'number',\n begin: hljs.C_NUMBER_RE + '\\\\b'\n },\n STRING\n ]\n };\n};","module.exports = function(hljs) {\n var XML_IDENT_RE = '[A-Za-z0-9\\\\._:-]+';\n var XML_ENTITIES = {\n className: 'symbol',\n begin: '&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;'\n };\n var XML_META_KEYWORDS = {\n\t begin: '\\\\s',\n\t contains:[\n\t {\n\t className: 'meta-keyword',\n\t begin: '#?[a-z_][a-z1-9_-]+',\n\t illegal: '\\\\n',\n }\n\t ]\n };\n var XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {begin: '\\\\(', end: '\\\\)'});\n var APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {className: 'meta-string'});\n var QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'});\n var TAG_INTERNALS = {\n endsWithParent: true,\n illegal: /</,\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: XML_IDENT_RE,\n relevance: 0\n },\n {\n begin: /=\\s*/,\n relevance: 0,\n contains: [\n {\n className: 'string',\n endsParent: true,\n variants: [\n {begin: /\"/, end: /\"/, contains: [XML_ENTITIES]},\n {begin: /'/, end: /'/, contains: [XML_ENTITIES]},\n {begin: /[^\\s\"'=<>`]+/}\n ]\n }\n ]\n }\n ]\n };\n return {\n aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist', 'wsf', 'svg'],\n case_insensitive: true,\n contains: [\n {\n className: 'meta',\n begin: '<![a-z]', end: '>',\n relevance: 10,\n contains: [\n\t\t\t\t XML_META_KEYWORDS,\n\t\t\t\t QUOTE_META_STRING_MODE,\n\t\t\t\t APOS_META_STRING_MODE,\n\t\t\t\t\tXML_META_PAR_KEYWORDS,\n\t\t\t\t\t{\n\t\t\t\t\t begin: '\\\\[', end: '\\\\]',\n\t\t\t\t\t contains:[\n\t\t\t\t\t\t {\n\t\t\t\t\t className: 'meta',\n\t\t\t\t\t begin: '<![a-z]', end: '>',\n\t\t\t\t\t contains: [\n\t\t\t\t\t XML_META_KEYWORDS,\n\t\t\t\t\t XML_META_PAR_KEYWORDS,\n\t\t\t\t\t QUOTE_META_STRING_MODE,\n\t\t\t\t\t APOS_META_STRING_MODE\n\t\t\t\t\t\t ]\n\t\t\t }\n\t\t\t\t\t ]\n\t\t\t\t }\n\t\t\t\t]\n },\n hljs.COMMENT(\n '<!--',\n '-->',\n {\n relevance: 10\n }\n ),\n {\n begin: '<\\\\!\\\\[CDATA\\\\[', end: '\\\\]\\\\]>',\n relevance: 10\n },\n XML_ENTITIES,\n {\n className: 'meta',\n begin: /<\\?xml/, end: /\\?>/, relevance: 10\n },\n {\n begin: /<\\?(php)?/, end: /\\?>/,\n subLanguage: 'php',\n contains: [\n // We don't want the php closing tag ?> to close the PHP block when\n // inside any of the following blocks:\n {begin: '/\\\\*', end: '\\\\*/', skip: true},\n {begin: 'b\"', end: '\"', skip: true},\n {begin: 'b\\'', end: '\\'', skip: true},\n hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null, className: null, contains: null, skip: true}),\n hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null, className: null, contains: null, skip: true})\n ]\n },\n {\n className: 'tag',\n /*\n The lookahead pattern (?=...) ensures that 'begin' only matches\n '<style' as a single word, followed by a whitespace or an\n ending braket. The '$' is needed for the lexeme to be recognized\n by hljs.subMode() that tests lexemes outside the stream.\n */\n begin: '<style(?=\\\\s|>)', end: '>',\n keywords: {name: 'style'},\n contains: [TAG_INTERNALS],\n starts: {\n end: '</style>', returnEnd: true,\n subLanguage: ['css', 'xml']\n }\n },\n {\n className: 'tag',\n // See the comment in the <style tag about the lookahead pattern\n begin: '<script(?=\\\\s|>)', end: '>',\n keywords: {name: 'script'},\n contains: [TAG_INTERNALS],\n starts: {\n end: '\\<\\/script\\>', returnEnd: true,\n subLanguage: ['actionscript', 'javascript', 'handlebars', 'xml']\n }\n },\n {\n className: 'tag',\n begin: '</?', end: '/?>',\n contains: [\n {\n className: 'name', begin: /[^\\/><\\s]+/, relevance: 0\n },\n TAG_INTERNALS\n ]\n }\n ]\n };\n};","exports = module.exports = stringify\nexports.getSerialize = serializer\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [], keys = []\n\n if (cycleReplacer == null) cycleReplacer = function(key, value) {\n if (stack[0] === value) return \"[Circular ~]\"\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\"\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = stack.indexOf(this)\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\n if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)\n }\n else stack.push(value)\n\n return replacer == null ? value : replacer.call(this, key, value)\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports['default'] = isImmutableDefault;\n\nfunction isImmutableDefault(value) {\n return typeof value !== 'object' || value === null || typeof value === 'undefined';\n}\n\nmodule.exports = exports['default'];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = trackForMutations;\n\nfunction trackForMutations(isImmutable, obj) {\n var trackedProperties = trackProperties(isImmutable, obj);\n return {\n detectMutations: function detectMutations() {\n return _detectMutations(isImmutable, trackedProperties, obj);\n }\n };\n}\n\nfunction trackProperties(isImmutable, obj) {\n var tracked = { value: obj };\n\n if (!isImmutable(obj)) {\n tracked.children = {};\n\n for (var key in obj) {\n tracked.children[key] = trackProperties(isImmutable, obj[key]);\n }\n }\n return tracked;\n}\n\nfunction _detectMutations(isImmutable, trackedProperty, obj) {\n var sameParentRef = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];\n var path = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4];\n\n var prevObj = trackedProperty ? trackedProperty.value : undefined;\n\n var sameRef = prevObj === obj;\n\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\n return { wasMutated: true, path: path };\n }\n\n if (isImmutable(prevObj) || isImmutable(obj)) {\n return { wasMutated: false };\n }\n\n // Gather all keys from prev (tracked) and after objs\n var keysToDetect = {};\n Object.keys(trackedProperty.children).forEach(function (key) {\n keysToDetect[key] = true;\n });\n Object.keys(obj).forEach(function (key) {\n keysToDetect[key] = true;\n });\n\n var keys = Object.keys(keysToDetect);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var result = _detectMutations(isImmutable, trackedProperty.children[key], obj[key], sameRef, path.concat(key));\n\n if (result.wasMutated) {\n return result;\n }\n }\n return { wasMutated: false };\n}\nmodule.exports = exports[\"default\"];"],"sourceRoot":""} \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/main.a0831f44.chunk.js b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/main.a0831f44.chunk.js deleted file mode 100644 index ad27b1b2..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/main.a0831f44.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonpjekyll-admin"]=this["webpackJsonpjekyll-admin"]||[]).push([[0],{22:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return addFieldToMetadata})),__webpack_require__.d(__webpack_exports__,"f",(function(){return removeFieldFromMetadata})),__webpack_require__.d(__webpack_exports__,"g",(function(){return updateMetadataFieldKey})),__webpack_require__.d(__webpack_exports__,"h",(function(){return updateMetadataFieldValue})),__webpack_require__.d(__webpack_exports__,"c",(function(){return convertMetadataField})),__webpack_require__.d(__webpack_exports__,"e",(function(){return moveMetadataArrayItem})),__webpack_require__.d(__webpack_exports__,"d",(function(){return injectDefaultFields})),__webpack_require__.d(__webpack_exports__,"b",(function(){return computeFieldType}));var _home_runner_work_jekyll_admin_jekyll_admin_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(38),underscore__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9),underscore__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(underscore__WEBPACK_IMPORTED_MODULE_1__),lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(54),lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__),addFieldToMetadata=function addFieldToMetadata(state,namePrefix){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(namePrefix));return void 0===field||(underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(field)?field.push(""):field["New field ".concat(state.new_field_count)]=""),tmpState.metadata},removeFieldFromMetadata=function removeFieldFromMetadata(state,namePrefix,key){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(namePrefix));if(void 0===field)return tmpState.metadata;if(underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(field)){if(key>=field.length)return tmpState.metadata;field.splice(key,1)}else{if(!underscore__WEBPACK_IMPORTED_MODULE_1___default.a.has(field,key))return tmpState.metadata;delete field[key]}return tmpState.metadata},updateMetadataFieldKey=function updateMetadataFieldKey(state,namePrefix,fieldKey,newKey){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(namePrefix));return void 0===field||underscore__WEBPACK_IMPORTED_MODULE_1___default.a.has(field,newKey)||(field=Object.keys(field).reduce((function(e,t){return t===fieldKey?e[newKey]=field[t]:e[t]=field[t],e}),{}),eval("tmpState.".concat(namePrefix," = field"))),tmpState.metadata},updateMetadataFieldValue=function updateMetadataFieldValue(state,nameAttr,value){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state);return eval("tmpState.".concat(nameAttr," = value")),tmpState.metadata},convertMetadataField=function convertMetadataField(state,nameAttr,convertType){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),field=eval("tmpState.".concat(nameAttr));if(void 0===field)return tmpState.metadata;if("array"===convertType)field=[""];else if("object"===convertType){var key="New field ".concat(state.new_field_count);field=Object(_home_runner_work_jekyll_admin_jekyll_admin_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__.a)({},key,"")}else field="";return eval("tmpState.".concat(nameAttr," = field")),tmpState.metadata},moveMetadataArrayItem=function moveMetadataArrayItem(state,namePrefix,srcInd,targetInd){var tmpState=lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(state),arr=eval("tmpState.".concat(namePrefix));return underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(arr)?(arr.splice(targetInd,0,arr.splice(srcInd,1)[0]),tmpState.metadata):tmpState.metadata},injectDefaultFields=function(e,t,a){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{n=e.content.defaults}catch(c){return{}}var i={};return underscore__WEBPACK_IMPORTED_MODULE_1___default.a.each(n,(function(e){var n=e.scope;n.type&&n.type!==a||n.path&&n.path!==t||underscore__WEBPACK_IMPORTED_MODULE_1___default.a.extend(i,e.values)})),underscore__WEBPACK_IMPORTED_MODULE_1___default.a.extend(i,r)},computeFieldType=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a="simple",n=["tags","categories"];return n.includes(t)&&underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(e)||(underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isObject(e)&&(a="object"),underscore__WEBPACK_IMPORTED_MODULE_1___default.a.isArray(e)&&(a="array")),a}},294:function(e,t,a){e.exports=a(753)},666:function(e,t){},748:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAB5CAYAAACDSRyFAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRH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qzEDEqK/LiJ02i0Q35uoibi1wUvYAAnwIZpAc9dpEN97Cb+FLB0ZGnPAYp6lK7yqGMc17Y+8rhVGQnzf4gzUR6oa4kz0xlqLbRkv6BNVxmqF0RDfl2iP6giqEvbHHRYbz5fhyYyutNeGQHynwLv/vhobaEf8ZT1QAcKx1EgI6CXjw6bctD9+gfnNzzD0x8f4wnKj8hp8ik6ohMynHYJhkCTFGIxX8RBeQE/8hBWQABswEB1REZlNOwbiW422/ibgCvw3H/GfZVjIAlHmvUr5TTsPCXh1Nj50tkO5qzbORU8shFgownd4HCeiOrZNWgN0wbfYCLG0BD/jBZyKmtCy20PGALN7wm8lDxQ8BfSbxcMAxxzLBIz38YdvFq85D5byZxcJeF0DSdIR/4iqohUOQQdfe5yMQ9BSn6JyuobYHx1xEbrgFlyB83Ec2uoEes7uz7wORPQjq+EZtPacwIfKJH7v0AKJragAfSBJbkBG0jRNewOSZBquClnr1g7Pwry85UpkNE3TtEuwCZKkFEPRE0/jBXyKmRDDLOwDTdO0rFQPL6IEYmkBumObpGmaVoCL0BujsQTrsBYL8DtewXHI+/4ftS4BbH1NbcMAAAAASUVORK5CYII="},752:function(e,t,a){},753:function(e,t,a){"use strict";a.r(t);var n={};a.r(n),a.d(n,"getDeleteMessage",(function(){return U})),a.d(n,"getLeaveMessage",(function(){return x})),a.d(n,"getNotFoundMessage",(function(){return B})),a.d(n,"getOverrideMessage",(function(){return H})),a.d(n,"getParserErrorMessage",(function(){return V})),a.d(n,"getSuccessMessage",(function(){return K})),a.d(n,"getErrorMessage",(function(){return G})),a.d(n,"getUploadSuccessMessage",(function(){return Q})),a.d(n,"getUploadErrorMessage",(function(){return W})),a.d(n,"getFetchErrorMessage",(function(){return Y})),a.d(n,"getUpdateErrorMessage",(function(){return q})),a.d(n,"getDeleteErrorMessage",(function(){return z})),a.d(n,"getPublishDraftMessage",(function(){return Z})),a.d(n,"getTitleRequiredMessage",(function(){return J})),a.d(n,"getFilenameRequiredMessage",(function(){return X})),a.d(n,"getContentRequiredMessage",(function(){return $})),a.d(n,"getFilenameNotValidMessage",(function(){return ee})),a.d(n,"sidebar",(function(){return te})),a.d(n,"labels",(function(){return ae}));var r=a(0),i=a.n(r),c=a(114),l=a(21),o=a(12),s=a(2),u=a(4),d=a(8),p=a(6),f=a(3),m=a(5),h=a(11),g=a(25),E=a(15),v=a.n(E),y=a(1),b="/_api",C=function(){return"".concat(b,"/configuration")},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/pages/").concat(e)},O=function(e,t){return e?"".concat(b,"/pages/").concat(e,"/").concat(t):"".concat(b,"/pages/").concat(t)},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/drafts/").concat(e)},F=function(e,t){return e?"".concat(b,"/drafts/").concat(e,"/").concat(t):"".concat(b,"/drafts/").concat(t)},T=function(e,t){return t?"".concat(b,"/collections/").concat(e,"/entries/").concat(t):"".concat(b,"/collections/").concat(e,"/entries")},j=function(e,t,a){return t?"".concat(b,"/collections/").concat(e,"/").concat(t,"/").concat(a):"".concat(b,"/collections/").concat(e,"/").concat(a)},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/data/").concat(e)},D=function(e,t){return e?"".concat(b,"/data/").concat(e,"/").concat(t):"".concat(b,"/data/").concat(t)},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(b,"/static_files/").concat(e)},w=function(e,t){return e?"".concat(b,"/static_files/").concat(e,"/").concat(t):"".concat(b,"/static_files/").concat(t)},L=a(38),I=a(118),N=a.n(I),R=function(e,t,a){return{type:"ADD_NOTIFICATION",notification:{title:e,message:t,level:a}}};var P=a(292),M=function(e){function t(e){var a;return Object(u.a)(this,t),(a=Object(p.a)(this,Object(f.a)(t).call(this))).name="BadInputError",a.message=e||"Bad input",a.stack=(new Error).stack,a}return Object(m.a)(t,e),t}(Object(P.a)(Error)),U=function(e){return'Are you sure that you want to delete "'.concat(e,'" ?')},x=function(){return"You have unsaved changes on this page. Are you sure you want to leave?"},B=function(e){return"No ".concat(e," found.")},H=function(e){return"".concat(e," will be overwritten. Continue anyway?")},V=function(){return"Parse Error"},K=function(){return"Success"},G=function(){return"Error"},Q=function(e){return"".concat(e," uploaded successfully")},W=function(){return"Error occurred uploading the file."},Y=function(e){return"Could not fetch the ".concat(e)},q=function(e){return"Could not update the ".concat(e)},z=function(e){return"Could not delete the ".concat(e)},Z=function(e,t){return"'".concat(e,"' will be converted to '").concat(t,"'")},J=function(){return"The title is required."},X=function(){return"The filename is required."},$=function(){return"The content is required."},ee=function(){return"The filename is not valid."},te={pages:"Pages",posts:"Posts",drafts:"Drafts",datafiles:"Data Files",collections:"Collections",staticfiles:"Static Files",configuration:"Configuration"},ae={save:{label:"Save",triggeredLabel:"Saved"},create:{label:"Create",triggeredLabel:"Created"},delete:{label:"Delete"},publish:{label:"Publish"},view:{label:"View"},upload:{label:"Upload files"},viewToggle:{label:"Switch View to GUI Editor",triggeredLabel:"Switch View to Raw Editor"}},ne=n,re=ne.getErrorMessage,ie=ne.getFetchErrorMessage,ce=ne.getUpdateErrorMessage,le=ne.getDeleteErrorMessage,oe=function(e,t,a,n){return N()(e,{credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){return n(Object(L.a)({type:t.type},t.name,e))})).catch((function(e){n(Object(L.a)({type:a.type},a.name,e)),n(R(re(),ie(t.name),"error"))}))},se=function(e,t,a,n,r){return N()(e,{method:"PUT",credentials:"same-origin",body:t}).then((function(e){return e.json()})).then((function(e){if(e.error_message)throw new M(e.error_message);r(Object(L.a)({type:a.type},a.name,e))})).catch((function(e){r(Object(L.a)({type:n.type},n.name,e));var t="BadInputError"===e.name?e.message:ce(a.name);r(R(re(),t,"error"))}))},ue=function(e,t,a,n){return N()(e,{method:"DELETE",credentials:"same-origin"}).then((function(e){return n({type:t.type,id:t.id})})).catch((function(e){n(Object(L.a)({type:a.type},a.name,e)),n(R(re(),le(t.name),"error"))}))},de=a(9),pe=a.n(de),fe=ne.getTitleRequiredMessage,me=ne.getFilenameNotValidMessage,he=/^(?:.+\/)*(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))-(.*)(\.[^.]+)$/,ge=/^(.*)(\.[^.]+)$/,Ee=function(e){return ve(e,{path:"required|filename"},{"path.required":fe(),"path.filename":me()})},ve=function(e,t,a){var n=[];return pe.a.each(t,(function(t,r,i){var c=t.split("|");pe.a.each(c,(function(t){(function(e,t){switch(t){case"required":return!!e;case"date":return he.test(e);case"filename":return ge.test(e);default:return!1}})(e[r],t)||n.push(a["".concat(r,".").concat(t)])}))})),n},ye=function(e,t){return t?e.filter((function(e){return e.name.toLowerCase().includes(t.toLowerCase())})):e},be=function(e,t){return e.filter((function(e){return e.relative_path!==t}))},Ce=function(e){return{type:"SEARCH_CONTENT",input:e}},_e=function(){return{type:"CLEAR_ERRORS"}},Oe=function(e){return{type:"VALIDATION_ERROR",errors:e}};var ke=a(173),Fe=a.n(ke),Te=function(e){return pe.a.isEmpty(e)?"":Fe.a.safeDump(e,{indent:2})},je=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1).toLowerCase():""},Ae=function(e){return e?e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})):""},De=function(e){if(!e)return"";var t="\xe0\xe1\xe4\xe2\xe8\xe9\xeb\xea\xec\xed\xef\xee\u0131\xf2\xf3\xf6\xf4\xf9\xfa\xfc\xfb\xf1\xe7\u015f\xdf\xff\u0153\xe6\u0155\u015b\u0144\u1e55\u1e83\u01f5\u011f\u01f9\u1e3f\u01d8\u1e8d\u017a\u1e27\xb7/_,:;",a=new RegExp(t.split("").join("|"),"g");return e.toString().toLowerCase().replace(/\s+/g,"-").replace(a,(function(e){return"aaaaeeeeiiiiioooouuuuncssyoarsnpwggnmuxzh------".charAt(t.indexOf(e))})).replace(/&/g,"-").replace(/[^\w-]+/g,"").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},Se=function(e){return e?e.substring(e.lastIndexOf("/")+1):""},we=function(e){if(!e)return"";var t=Se(e),a=t.lastIndexOf(".");return a>0?t.substring(a+1):""},Le=function(e){e&&e.preventDefault&&e.preventDefault()},Ie=function e(t){return pe.a.isObject(t)?pe.a.keys(t).reduce((function(a,n){if("string"===typeof t[n])try{a[n.trim()]=JSON.parse(t[n].trim())}catch(r){a[n.trim()]=t[n].trim()}else a[n.trim()]=e(t[n]);return a}),Array.isArray(t)?[]:{}):t},Ne=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return"";var n=Ae(e.toString());return[a,t,n].filter(Boolean).join(" | ")},Re=function(e,t){return e?"".concat(e,"/").concat(t):"".concat(t)},Pe=function(e){return pe.a.omit(e,(function(e,t,a){return"raw_content"===t||"path"===t||""===e}))},Me=function(e){return JSON.stringify(Ie(e))},Ue=ne.getContentRequiredMessage,xe=function(){return function(e){return e({type:"FETCH_CONFIG_REQUEST"}),oe("".concat(b,"/configuration"),{type:"FETCH_CONFIG_SUCCESS",name:"config"},{type:"FETCH_CONFIG_FAILURE",name:"error"},e)}},Be=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"editor";return function(a,n){var r;"gui"===t?(e=n().metadata.metadata,r={raw_content:Te(e)}):r={raw_content:e};var i=He(e);return i.length?a(Oe(i)):(a({type:"CLEAR_ERRORS"}),se(C(),JSON.stringify(r),{type:"PUT_CONFIG_SUCCESS",name:"config"},{type:"PUT_CONFIG_FAILURE",name:"error"},a))}},He=function(e){return ve({config:e},{config:"required"},{"config.required":Ue()})},Ve=function(){return{type:"CONFIG_EDITOR_CHANGED"}};var Ke={save:"mod+s"},Ge=function(){return i.a.createElement("div",{className:"splitter"})};function Qe(e){var t=e.name;return i.a.createElement("i",{className:"fa fa-".concat(t),"aria-hidden":"true"})}var We=a(17),Ye=a.n(We),qe=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={collapsed:!0},a.handleClick=function(){a.setState((function(e){return{collapsed:!e.collapsed}}))},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderIndicator",value:function(){var e=this.props,t=e.counter,a=e.count,n=this.state.collapsed;return n&&t&&a?i.a.createElement("div",{className:"counter"},a):i.a.createElement("div",{className:"chevrons"},i.a.createElement(Qe,{name:"chevron-".concat(n?"down":"up")}))}},{key:"render",value:function(){var e=this.props,t=e.icon,a=e.label,n=e.minHeight,r=e.count,c=e.children,l=this.state.collapsed,o=Ye()("accordion",{collapsed:l}),s=n;return l||(s=n&&r?(r+1)*n:"none"),i.a.createElement("div",{className:o,style:{maxHeight:s},onClick:this.handleClick},i.a.createElement("div",{className:"accordion-label"},t&&i.a.createElement(Qe,{name:t}),a,i.a.createElement("div",{className:"indicator"},this.renderIndicator())),c)}}]),t}(r.Component);qe.defaultProps={minHeight:50};var ze=qe,Ze=a(27),Je=a.n(Ze),Xe=ne.getTitleRequiredMessage,$e=ne.getFilenameRequiredMessage,et=ne.getFilenameNotValidMessage,tt=function(){return function(e){return e({type:"FETCH_COLLECTIONS_REQUEST"}),oe("".concat(b,"/collections"),{type:"FETCH_COLLECTIONS_SUCCESS",name:"collections"},{type:"FETCH_COLLECTIONS_FAILURE",name:"error"},e)}},at=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(a){return a({type:"FETCH_COLLECTION_REQUEST"}),oe(T(e,t),{type:"FETCH_COLLECTION_SUCCESS",name:"entries"},{type:"FETCH_COLLECTION_FAILURE",name:"error"},a)}},nt=function(e,t,a){return function(n){return n({type:"FETCH_DOCUMENT_REQUEST"}),oe(j(e,t,a),{type:"FETCH_DOCUMENT_SUCCESS",name:"doc"},{type:"FETCH_DOCUMENT_FAILURE",name:"error"},n)}},rt=function(e,t){return function(a,n){var r=n().metadata.metadata,i=r.path,c=r.raw_content,l=r.title,o=r.date;if(i&&"".concat(i,"/")!==t||!l){var s=ot(r,e);if(s.length)return a(Oe(s))}else i=lt(l,e,o);a({type:"CLEAR_ERRORS"});var u=Pe(r);return se(j(e,t,i),Me({raw_content:c,front_matter:u}),{type:"PUT_DOCUMENT_SUCCESS",name:"doc"},{type:"PUT_DOCUMENT_FAILURE",name:"error"},a)}},it=function(e,t,a){return function(n,r){var i=r().metadata.metadata,c=i.path,l=i.raw_content,o=i.title,s=i.date;if(c&&"".concat(c,"/")!==t||!o){var u=ot(i,e);if(u.length)return n(Oe(u))}else c=lt(o,e,s);n({type:"CLEAR_ERRORS"});var d=Pe(i),p=t?"_".concat(e,"/").concat(t,"/").concat(c):"_".concat(e,"/").concat(c);return se(j(e,t,a),Me({path:p,raw_content:l,front_matter:d}),{type:"PUT_DOCUMENT_SUCCESS",name:"doc"},{type:"PUT_DOCUMENT_FAILURE",name:"error"},n)}},ct=function(e,t,a){return function(n){var r=Re(t,a);return ue(j(e,t,a),{type:"DELETE_DOCUMENT_SUCCESS",name:"doc",id:r},{type:"DELETE_DOCUMENT_FAILURE",name:"error"},n)}},lt=function(e,t,a){var n=De(e);if("posts"===t){var r=a?a.split(" ")[0]:Je()().format("YYYY-MM-DD");return"".concat(r,"-").concat(n,".md")}return"".concat(n,".md")},ot=function(e,t){var a={title:"required"},n={"title.required":Xe(),"path.required":$e()};return"posts"===t?(a.path="required|date",n["path.date"]=et()):(a.path="required|filename",n["path.filename"]=et()),ve(e,a,n)};var st=ne.sidebar,ut=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){(0,this.props.fetchCollections)()}},{key:"renderCollections",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.props.collections;if(!t.length)return null;var a=pe.a.map(t,(function(t,a){if("posts"!==t.label&&!e.includes(t.label))return i.a.createElement("li",{key:a},i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/collections/").concat(t.label)},i.a.createElement(Qe,{name:"book"}),t.sidebar_label||je(t.label)))})).filter(Boolean),n=a.length;return n?i.a.createElement(ze,{count:n,icon:"briefcase",label:st.collections,counter:!0},i.a.createElement("ul",null,a)):null}},{key:"render",value:function(){var e,t=this.props.config,a={pages:{icon:"file-text",link:"pages",translation:"pages"},datafiles:{icon:"database",link:"datafiles",translation:"datafiles",splitterBefore:!0},staticfiles:{icon:"file",link:"staticfiles",translation:"staticfiles"},configuration:{icon:"cog",link:"configuration",translation:"configuration",splitterBefore:!0}},n=pe.a.keys(a);try{e=t.jekyll_admin.hidden_links||[]}catch(d){e=[]}var r=pe.a.difference(n,e),c=[];pe.a.each(r,(function(e,t,n){var r=a[e];r.splitterBefore&&c.push(i.a.createElement(Ge,{key:"splitter"+t})),c.push(i.a.createElement("li",{key:t},i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/").concat(r.link)},i.a.createElement(Qe,{name:r.icon}),st[r.translation])))}));var l=this.renderCollections(e),o=!e.includes("posts"),u=t&&t.show_drafts;return i.a.createElement("div",{className:"sidebar"},i.a.createElement(s.Link,{className:"logo",to:"".concat("/admin","/pages")}),i.a.createElement("ul",{className:"routes"},l,o&&i.a.createElement("li",null,i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/collections/posts")},i.a.createElement(Qe,{name:"book"}),st.posts)),u&&i.a.createElement("li",null,i.a.createElement(s.Link,{activeClassName:"active",to:"".concat("/admin","/drafts")},i.a.createElement(Qe,{name:"edit"}),st.drafts)),(l||o||u)&&i.a.createElement(Ge,null),c))}}]),t}(r.Component),dt=Object(o.b)((function(e){return{collections:e.collections.collections}}),(function(e){return Object(h.b)({fetchCollections:tt},e)}))(ut),pt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props.config;return i.a.createElement("div",{className:"header"},i.a.createElement("h3",{className:"title"},i.a.createElement(s.Link,{target:"_blank",to:e.url||"/"},i.a.createElement(Qe,{name:"home"}),i.a.createElement("span",null,e.title||"You have no title!"))),i.a.createElement("span",{className:"version"},"v","0.12.0"))}}]),t}(r.Component),ft=a(281),mt=a.n(ft),ht=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).elementStyles={Containers:{DefaultStyle:{padding:15,width:360,textAlign:"center"}},Title:{DefaultStyle:{fontSize:21,color:"#fff"}},NotificationItem:{DefaultStyle:{margin:0,padding:"9px 15px 15px",fontSize:15,borderRadius:0,transition:"0.5s ease-in-out"},success:{color:"#fff",backgroundColor:"#088217"},error:{color:"#fff",backgroundColor:"#e21414"},warning:{color:"#fff",backgroundColor:"#ebad1a"},info:{color:"#fff",backgroundColor:"#369cc7"}},Dismiss:{DefaultStyle:{top:7,right:9,width:25,height:25,padding:4,backgroundColor:"transparent",border:"2px solid",opacity:"0.84"}}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){this.notificationSystem=this.refs.notificationSystem}},{key:"componentWillReceiveProps",value:function(e){var t=e.notification;this.notificationSystem.addNotification({title:t.title,message:t.message,level:t.level,position:"br",autoDismiss:10})}},{key:"render",value:function(){return i.a.createElement(mt.a,{ref:"notificationSystem",style:this.elementStyles})}}]),t}(r.Component),gt=Object(o.b)((function(e){return{notification:e.notifications.notification}}))(ht),Et=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){(0,this.props.fetchConfig)()}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&(0,this.props.fetchConfig)()}},{key:"componentDidUpdate",value:function(e){if(e.isFetching&&!this.props.isFetching){var t=this.props,a=t.config.content,n=a.jekyll_admin.homepage,r=a.collections,i=t.router,c=i.getCurrentLocation().pathname;if(n&&"/admin"===c){var l="".concat("/admin","/pages");Object.keys(r).concat("posts").includes(n)&&(l="".concat("/admin","/collections/").concat(n)),["drafts","datafiles","staticfiles","configuration"].includes(n)&&(l="".concat("/admin","/").concat(n)),i.replace(l)}}}},{key:"render",value:function(){var e=this.props,t=e.config;return e.isFetching?null:i.a.createElement(v.a,{title:"Jekyll Admin"},i.a.createElement(g.HotKeys,{keyMap:Ke,className:"wrapper"},t.content&&i.a.createElement("div",null,i.a.createElement(dt,{config:t.content}),i.a.createElement("div",{className:"container"},i.a.createElement(pt,{config:t.content}),i.a.createElement("div",{className:"content"},this.props.children)),i.a.createElement(gt,null))))}}]),t}(r.Component),vt=Object(o.b)((function(e){return{config:e.config.config,updated:e.config.updated,isFetching:e.config.isFetching}}),(function(e){return Object(h.b)({fetchConfig:xe},e)}))(Et),yt=a(35);function bt(e){var t=e.fieldValue;return i.a.createElement("div",{className:"meta-value"},i.a.createElement(yt.a,{className:"field value-field",value:"".concat(t),disabled:!0}))}var Ct={array:jt,object:kt,simple:bt};function _t(e){var t=e.type,a=e.fieldKey,n=e.fieldValue,r=Ct[t];return i.a.createElement("div",{className:"object-item-wrap"},i.a.createElement("div",{className:"object-key ".concat(t)},i.a.createElement("input",{value:a,className:"field key-field",type:"text",disabled:!0})),i.a.createElement("div",{className:"object-value"},i.a.createElement(r,{fieldValue:n})))}var Ot=a(22);function kt(e){var t=e.fieldValue,a=pe.a.map(t,(function(e,t){var a=Object(Ot.b)(e);return i.a.createElement(_t,{key:t,fieldKey:t,fieldValue:e,type:a})}));return i.a.createElement("div",{className:"meta-value-object"},a)}var Ft={array:jt,object:kt,simple:bt};function Tt(e){var t=e.type,a=e.fieldValue,n=e.index,r=Ft[t];return i.a.createElement("div",{className:"array-item-wrap"},i.a.createElement("div",{className:"array"},i.a.createElement("div",{className:"array-header"},i.a.createElement("span",{className:"array-field-num"},n+1,".")),i.a.createElement(r,{fieldValue:a})))}function jt(e){var t=e.fieldValue.map((function(e,t){var a=Object(Ot.b)(e);return i.a.createElement(Tt,{key:t,index:t,fieldValue:e,type:a})}));return i.a.createElement("div",{className:"meta-value-array"},t)}var At=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={dropdown:!1},a.toggleDropdownState=function(){a.setState((function(e){return{dropdown:!e.dropdown}}))},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this,t=this.props.onEnableField,a=Ye()("dropdown",{"showing-dropdown":this.state.dropdown});return i.a.createElement("div",{className:"meta-buttons"},i.a.createElement("span",{className:a},i.a.createElement("a",{className:"meta-button",tabIndex:"1",onClick:this.toggleDropdownState,onBlur:function(){return e.setState({dropdown:!1})}},i.a.createElement(Qe,{name:"chevron-down"})),i.a.createElement("div",{className:"dropdown-wrap"},i.a.createElement("span",{onMouseDown:function(){return t()}},i.a.createElement(Qe,{name:"pencil"})," Override default"))))}}]),t}(r.Component),Dt={array:jt,object:kt,simple:bt};function St(e){var t=e.type,a=e.fieldKey,n=e.fieldValue,r=e.enableField,c=Dt[t];return i.a.createElement("div",{className:"metafield default-field"},i.a.createElement("div",{className:"meta-key ".concat(t)},i.a.createElement("input",{value:a,className:"field key-field",type:"text",disabled:!0}),i.a.createElement(At,{onEnableField:function(){r("metadata['".concat(a,"']"),n)}})),i.a.createElement(c,{fieldValue:n}))}var wt=a(282),Lt=a.n(wt),It=a(84),Nt=a(283),Rt=a.n(Nt),Pt=a(284),Mt=a.n(Pt),Ut=a(285),xt=a.n(Ut),Bt=a(286),Ht=a.n(Bt),Vt=ne.getDeleteMessage,Kt=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleClickDelete",value:function(e){var t=this.props,a=t.splat,n=t.onClickDelete,r=Se(e);window.confirm(Vt(e))&&n(a,r)}},{key:"renderFileOverlay",value:function(e,t){var a=this;return e.from_theme?i.a.createElement("span",{className:"theme-indicator",title:"Theme Asset"},i.a.createElement(Qe,{name:"diamond"})):"index"!==t?i.a.createElement("button",{onClick:function(){return a.handleClickDelete(e.relative_path)},className:"delete",title:"Delete file"},"x"):void 0}},{key:"render",value:function(){var e=this.props,t=e.onClick,a=e.file,n=e.splat,r=this.isImageFile?i.a.createElement("img",{src:a.http_url,alt:a.relative_path}):i.a.createElement("div",null,i.a.createElement(Qe,{name:"file-text-o"})),c=t?i.a.createElement("a",{onClick:function(){return t(a.relative_path)}},r):i.a.createElement("a",{href:a.http_url,target:"_blank",rel:"noopener noreferrer"},r),l="index"===n?a.relative_path:a.name;return i.a.createElement("div",{className:"file-preview"},this.renderFileOverlay(a,n),c,i.a.createElement("span",{className:"filename"},l))}},{key:"isImageFile",get:function(){var e=this.props.file,t=e.type,a=e.extname;return"directory"!==t&&/png|jpg|gif|jpeg|svg|ico/i.test(a.substring(1))}}]),t}(r.Component);function Gt(e){var t=e.type,a=e.splat,n=void 0===a?"":a,r=["pages","datafiles","drafts","staticfiles"].includes(t)?"".concat("/admin","/").concat(t):"".concat("/admin","/collections/").concat(t),c=t;"datafiles"===t?c="data files":"staticfiles"===t&&(c="static files");var l=[];if(n){var o=n.split("/");l=o.map((function(e,t){var a=0===t?"":o.slice(0,t).join("/")+"/";return i.a.createElement("li",{key:t},i.a.createElement(s.Link,{to:"".concat(r,"/").concat(a).concat(e)},e))}))}return i.a.createElement("ul",{className:"breadcrumbs"},i.a.createElement("li",null,i.a.createElement(s.Link,{to:r},Ae(c))),l)}var Qt=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleKeyPress=function(e){(0,a.props.search)(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props.searchBy;return i.a.createElement("input",{onKeyPress:this.handleKeyPress,type:"text",className:"field",placeholder:"Search by ".concat(e)})}}]),t}(r.Component),Wt=ne.getSuccessMessage,Yt=ne.getErrorMessage,qt=ne.getUploadSuccessMessage,zt=ne.getUploadErrorMessage,Zt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_STATICFILES_REQUEST"}),oe(S(e),{type:"FETCH_STATICFILES_SUCCESS",name:"files"},{type:"FETCH_STATICFILES_FAILURE",name:"error"},t)}},Jt=function(e,t){return function(a){pe.a.each(t,(function(t){var n=new FileReader;n.readAsDataURL(t),n.onloadend=function(){var r=JSON.stringify({encoded_content:n.result.split("base64,")[1]});return fetch(w(e,t.name),{method:"PUT",body:r,credentials:"same-origin"}).then((function(n){a({type:"PUT_STATICFILE_SUCCESS"}),a(Zt(e)),a(R(Wt(),qt(t.name),"success"))})).catch((function(e){a({type:"PUT_STATICFILE_FAILURE",error:e}),a(R(Yt(),zt(),"error"))}))}}))}},Xt=function(e,t){return function(a){var n=Re(e,t);return ue(w(e,t),{type:"DELETE_STATICFILE_SUCCESS",name:"file",id:n},{type:"DELETE_STATICFILE_FAILURE",name:"error"},a)}};var $t=function(e,t){return t?e.filter((function(e){return e.path.toLowerCase().includes(t.toLowerCase())})):e},ea=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){(0,this.props.fetchStaticFiles)("index")}},{key:"renderDirectoryListingBtn",value:function(){var e="".concat("/admin","/staticfiles");return i.a.createElement("div",{className:"page-buttons"},i.a.createElement(s.Link,{className:"btn btn-view",to:e},"Directory Listing"))}},{key:"renderPreviewNode",value:function(){var e=this.props,t=e.files,a=e.onClickStaticFile;return t.length?i.a.createElement("div",{className:"preview-container"},t.map((function(e,t){return i.a.createElement(Kt,{key:t,onClick:a,splat:"index",file:e})}))):i.a.createElement("div",{className:"preview-info"},i.a.createElement(Qe,{name:"exclamation-triangle"}),i.a.createElement("h2",null,"No files found!"),i.a.createElement("h4",null,"Upload files at 'Directory Listing' to have them displayed here."))}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.search,n=e.modalView;return t?null:i.a.createElement(v.a,{title:"Static File Listing"},i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:"staticfiles"}),!n&&this.renderDirectoryListingBtn(),i.a.createElement("div",{className:"pull-right"},i.a.createElement(Qt,{searchBy:"filename",search:a}))),i.a.createElement("div",{className:"static-list"},this.renderPreviewNode())))}}]),t}(r.Component),ta=Object(o.b)((function(e){return{files:$t(e.staticfiles.files,e.utils.input),isFetching:e.staticfiles.isFetching}}),(function(e){return Object(h.b)({fetchStaticFiles:Zt,search:Ce},e)}))(ea),aa=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={showModal:!1},a.customStyles={overlay:{backgroundColor:"rgba(0,0,0,0.6)",zIndex:10},content:{margin:20,paddingTop:0,paddingRight:10,paddingLeft:15}},a.openModal=function(){return a.setState({showModal:!0})},a.shutModal=function(){return a.setState({showModal:!1})},a.onPickItem=function(e){a.props.onPick(e),a.shutModal()},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){return i.a.createElement("span",{className:"images-wrapper"},i.a.createElement("button",{onClick:this.openModal,ref:"trigger"},i.a.createElement(Qe,{name:"picture-o"})),i.a.createElement(Ht.a,{isOpen:this.state.showModal,contentLabel:"FilePicker",onRequestClose:this.shutModal,style:this.customStyles},i.a.createElement("div",{className:"content"},i.a.createElement(ta,{onClickStaticFile:this.onPickItem,modalView:!0}))))}}]),t}(r.Component),na=ne.getDeleteMessage,ra=function(e){function t(e){var a;return Object(u.a)(this,t),(a=Object(p.a)(this,Object(f.a)(t).call(this,e))).creators=[","," ","Enter"],a.handleKeyUp=function(e){var t=a.state.pageTags,n=e.target.value;n.length&&a.creators.includes(e.key)?a.createTag(n):t.length&&0===n.length&&"Backspace"===e.key&&a.deleteTag(-1)},a.handleOnChange=function(e){var t=e.target.value;a.setState((function(e){return{tagInput:t}}))},a.showSuggestions=function(){a.setState((function(e){return{autoSuggest:!0}}))},a.closeSuggestions=function(){a.setState((function(e){return{autoSuggest:!1}}))},a.rectifyTag=function(e){var t=e.toString().split(" ");a.setState((function(e){return{pageTags:t}}))},a.state={tagInput:"",pageTags:e.fieldValue||[],autoSuggest:!1},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.fieldValue;this.setState({pageTags:t||[]})}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.nameAttr;(0,e.updateFieldValue)(t,this.state.pageTags)}},{key:"createTag",value:function(e){var t=this.state.pageTags,a=Object(It.a)(t);a.includes(e)||(a.push(e),this.setState((function(e){return{pageTags:a,tagInput:"",autoSuggest:!1}})))}},{key:"deleteTag",value:function(e){var t=this.state.pageTags,a=Object(It.a)(t),n=-1===e?a.slice(-1).pop():a[e];window.confirm(na("tag: ".concat(n)))&&(a.splice(e,1),this.setState({pageTags:a}),this.refs.taginput.focus())}},{key:"render",value:function(){var e=this,t=this.state.pageTags,a="".concat(this.state.tagInput),n=this.props.suggestions.filter((function(e){return e.startsWith(a)}));if(!(t instanceof Array))return i.a.createElement("span",{className:"meta-error"},"Expected an array of items. Found: ",i.a.createElement("strong",null,t),i.a.createElement("br",null),i.a.createElement("span",{onClick:function(){return e.rectifyTag(t)}},"Click here"),"to correct.");var r=t.filter(Boolean).map((function(t,a){return i.a.createElement("span",{key:a,className:"tag"},t,i.a.createElement("span",{className:"delete-tag",onClick:function(){return e.deleteTag(a)}}))})),c=n.map((function(a,n){return t.includes(a)?null:i.a.createElement("li",{key:n,onClick:function(){return e.createTag(a)}},a)})).filter(Boolean),l=Ye()("tag-suggestions",{visible:this.state.autoSuggest});return i.a.createElement("div",{className:"tags-wrap field value-field"},r.length>0&&i.a.createElement("div",{className:"tags-list"},r),i.a.createElement("div",{className:"tags-input"},i.a.createElement("input",{type:"text",onChange:this.handleOnChange,onFocus:this.showSuggestions,onKeyUp:this.handleKeyUp,value:a.replace(/,|\s+/,""),ref:"taginput"}),i.a.createElement(yt.a,{className:"field value-field",value:this.state.pageTags.toString(),hidden:!0})),c.length>0&&i.a.createElement("div",{className:l},i.a.createElement("ul",null,c),i.a.createElement("div",{className:"close-suggestions",onClick:this.closeSuggestions},"Close suggestions")))}}]),t}(r.Component);ra.defaultProps={fieldValue:[],suggestions:[]};a(649);xt()(Je.a);var ia=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleEditableChange=function(e){var t=a.props,n=t.nameAttr;(0,t.updateFieldValue)(n,e.target.value)},a.handleDatepickerChange=function(e,t){var n=a.props,r=n.nameAttr;(0,n.updateFieldValue)(r,Je()(e).format("YYYY-MM-DD HH:mm:ss"))},a.handleEditableBlur=function(e){var t=a.props,n=t.nameAttr;(0,t.updateFieldValue)(n,e.target.value.trim())},a.onPickItem=function(e){var t=a.props,n=t.nameAttr,r=t.updateFieldValue;a.refs.imagepicker.value=e,r(n,e)},a.handleLayoutChange=function(e){var t=a.props,n=t.nameAttr;(0,t.updateFieldValue)(n,e)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderEditable",value:function(){var e=this.props.fieldValue;return i.a.createElement(yt.a,{onChange:this.handleEditableChange,onBlur:this.handleEditableBlur,className:"field value-field",value:"".concat(e)})}},{key:"renderDatepicker",value:function(){var e=this.props.fieldValue,t=new Date(e);return"Invalid Date"==="".concat(t)&&(t=null),i.a.createElement(Rt.a,{onChange:this.handleDatepickerChange,className:"date-field",value:t})}},{key:"renderStaticFilePicker",value:function(){var e=this.props.fieldValue;return i.a.createElement("div",{className:"imagepicker"},i.a.createElement(yt.a,{onChange:this.handleEditableChange,className:"field value-field",value:e,ref:"imagepicker"}),i.a.createElement(aa,{onPick:this.onPickItem}))}},{key:"renderLayoutPicker",value:function(){var e=this.props,t=e.fieldValue,a=e.siteMeta;if(!a)return this.renderEditable();var n=a.layouts||[];return i.a.createElement(Mt.a,{className:"layout-field",data:["none"].concat(Object(It.a)(n)),defaultValue:t,onChange:this.handleLayoutChange})}},{key:"renderTagsInput",value:function(e){var t=this.props,a=t.fieldValue,n=t.nameAttr,r=t.updateFieldValue,c=t.siteMeta,l=c&&c[e]||[];return i.a.createElement(ra,{fieldValue:a,nameAttr:n,updateFieldValue:r,suggestions:l})}},{key:"render",value:function(){var e,t=this.props,a=t.fieldKey,n=t.nameAttr;switch(a){case"date":e=this.renderDatepicker();break;case"image":case"file":e=this.renderStaticFilePicker();break;case"tags":case"categories":e=this.renderTagsInput(a);break;default:e=this.renderEditable()}return"metadata['layout']"===n&&(e=this.renderLayoutPicker()),i.a.createElement("div",{className:"meta-value"},e)}}]),t}(r.Component),ca=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={dropdown:!1},a.fieldTypes={simple:{icon:"pencil",label:"Simple"},array:{icon:"list-ol",label:"List"},object:{icon:"th-large",label:"Object"}},a.fieldTypeKeys=Object.keys(a.fieldTypes),a.toggleDropdownState=function(){a.setState((function(e){return{dropdown:!e.dropdown}}))},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderDropdownItems",value:function(e){var t=this,a=this.props,n=a.onConvertClick;return"tags"===a.parentKey?null:this.fieldTypeKeys.map((function(a,r){if(e!==a){var c=t.fieldTypes[a],l=c.icon,o=c.label;return i.a.createElement("span",{key:r,onMouseDown:function(){return n(a)}},i.a.createElement(Qe,{name:l}),"Convert to ",o)}return null})).filter(Boolean)}},{key:"render",value:function(){var e=this,t=this.props,a=t.currentType,n=t.parentType,r=t.onRemoveClick,c=t.isDefaultField,l=i.a.createElement("span",{className:"move"},i.a.createElement(Qe,{name:"arrows"})),o=Ye()("dropdown",{"showing-dropdown":this.state.dropdown});return i.a.createElement("div",{className:"meta-buttons"},"array"===n&&l,i.a.createElement("span",{className:o},i.a.createElement("a",{className:"meta-button",tabIndex:"1",onClick:this.toggleDropdownState,onBlur:function(){return e.setState({dropdown:!1})}},i.a.createElement(Qe,{name:"chevron-down"})),i.a.createElement("div",{className:"dropdown-wrap"},this.renderDropdownItems(a),i.a.createElement("span",{onMouseDown:function(){return r()},className:"remove-field"},i.a.createElement(Qe,{name:c?"undo":"trash-o"}),c?"Revert to default":"Remove field"))))}}]),t}(r.Component),la=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleConvertClick",value:function(e){var t=this.props;(0,t.convertField)(t.nameAttr,e)}},{key:"handleKeyBlur",value:function(){var e=this.props,t=e.namePrefix,a=e.fieldKey,n=e.updateFieldKey,r=Object(l.findDOMNode)(this.refs.field_key).value;a!==r&&""!==r&&n(t,a,r)}},{key:"handleRemoveClick",value:function(){var e=this.props;(0,e.removeField)(e.namePrefix,e.fieldKey)}},{key:"render",value:function(){var e=this,t=this.props,a=t.type,n=t.fieldKey,r=t.fieldValue,c=t.nameAttr,l=t.addField,o=t.removeField,s=t.updateFieldKey,u=t.updateFieldValue,d=t.convertField,p=t.key_prefix,f=t.moveArrayItem,m={array:ua,object:oa,simple:ia}[a];return i.a.createElement("div",{ref:"wrap",className:"object-item-wrap"},i.a.createElement("div",{className:"object-key ".concat(a)},i.a.createElement("input",{ref:"field_key",onBlur:function(t){return e.handleKeyBlur(t)},defaultValue:n,className:"field key-field",type:"text",placeholder:"Key"}),i.a.createElement(ca,{currentType:a,parentType:"object",onConvertClick:function(t){return e.handleConvertClick(t)},onRemoveClick:function(){return e.handleRemoveClick()}})),i.a.createElement("div",{className:"object-value"},i.a.createElement(m,{key_prefix:p,parentType:"object",fieldKey:n,fieldValue:r,addField:l,removeField:o,updateFieldKey:s,updateFieldValue:u,moveArrayItem:f,convertField:d,nameAttr:c,namePrefix:c})))}}]),t}(r.Component),oa=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props,t=e.fieldKey,a=e.fieldValue,n=e.namePrefix,r=e.addField,c=e.removeField,l=e.updateFieldKey,o=e.updateFieldValue,s=e.convertField,u=e.key_prefix,d=e.moveArrayItem,p=pe.a.map(a,(function(e,t){var a=Object(Ot.b)(e,t);return i.a.createElement(la,{key:t,key_prefix:u,fieldKey:t,fieldValue:e,type:a,addField:r,removeField:c,updateFieldKey:l,updateFieldValue:o,moveArrayItem:d,convertField:s,nameAttr:"".concat(n,"['").concat(t,"']"),namePrefix:n})}));return i.a.createElement("div",{className:"meta-value-object"},p,i.a.createElement("a",{onClick:function(){return r(n)},className:"add-field-object",title:"Add new key/value pair"},"New key/value pair under ",i.a.createElement("strong",null,t)))}}]),t}(r.Component),sa=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleConvertClick",value:function(e){var t=this.props;(0,t.convertField)(t.nameAttr,e)}},{key:"handleRemoveClick",value:function(){var e=this.props;(0,e.removeField)(e.namePrefix,e.index)}},{key:"render",value:function(){var e=this,t=this.props,a=t.type,n=t.fieldKey,r=t.fieldValue,c=t.index,l=t.nameAttr,o=t.addField,s=t.removeField,u=t.updateFieldKey,d=t.updateFieldValue,p=t.moveArrayItem,f=t.convertField,m=t.key_prefix,h={array:ua,object:oa,simple:ia}[a];return i.a.createElement("div",{ref:"wrap","data-id":c,className:"array-item-wrap"},i.a.createElement("div",{className:"array"},i.a.createElement("div",{className:"array-header"},i.a.createElement("span",{className:"array-field-num"},c+1,"."),i.a.createElement(ca,{currentType:a,parentType:"array",onConvertClick:function(t){return e.handleConvertClick(t)},onRemoveClick:function(){return e.handleRemoveClick()}})),i.a.createElement(h,{key_prefix:m,parentType:"array",fieldKey:n,fieldValue:r,addField:o,removeField:s,updateFieldKey:u,updateFieldValue:d,moveArrayItem:p,convertField:f,nameAttr:l,namePrefix:l})))}}]),t}(r.Component),ua=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"sortableGroupDecorator",value:function(e){var t=this.props,a=t.moveArrayItem,n=t.namePrefix;if(e){var r={draggable:".array-item-wrap",group:{name:"meta-array-items",pull:!1,put:!1},handle:".move",animation:0,onEnd:function(e){var t=e.item.getAttribute("data-id");a(n,t,e.newIndex)}};Lt.a.create(e,r)}}},{key:"render",value:function(){var e=this.props,t=e.fieldKey,a=e.fieldValue,n=e.namePrefix,r=e.addField,c=e.removeField,l=e.updateFieldKey,o=e.updateFieldValue,s=e.moveArrayItem,u=e.convertField,d=e.key_prefix,p=a.map((function(e,a){var p=Object(Ot.b)(e);return i.a.createElement(sa,{key:"".concat(d,"-").concat(a),key_prefix:d,index:a,fieldKey:t,fieldValue:e,type:p,addField:r,removeField:c,updateFieldKey:l,updateFieldValue:o,moveArrayItem:s,convertField:u,nameAttr:"".concat(n,"[").concat(a,"]"),namePrefix:n})}));return i.a.createElement("div",{className:"meta-value-array",ref:this.sortableGroupDecorator.bind(this)},p,i.a.createElement("a",{onClick:function(){return r(n)},className:"add-field-array",title:"Add new list item"},i.a.createElement(Qe,{name:"plus"})))}}]),t}(r.Component),da=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){/New field/.test(this.props.fieldKey)&&this.refs.field_key.select()}},{key:"handleConvertClick",value:function(e){var t=this.props;(0,t.convertField)(t.nameAttr,e)}},{key:"handleKeyBlur",value:function(){var e=this.props,t=e.namePrefix,a=e.fieldKey,n=e.updateFieldKey,r=Object(l.findDOMNode)(this.refs.field_key).value;a!==r&&""!==r&&n(t,a,r)}},{key:"handleRemoveClick",value:function(){var e=this.props;(0,e.removeField)(e.namePrefix,e.fieldKey)}},{key:"render",value:function(){var e=this,t=this.props,a=t.type,n=t.parentType,r=t.fieldKey,c=t.fieldValue,l=t.namePrefix,o=t.addField,s=t.removeField,u=t.updateFieldKey,d=t.updateFieldValue,p=t.moveArrayItem,f=t.convertField,m=t.key_prefix,h=t.siteMeta,g=t.isInDefaultState,E=t.isDefaultField,v={array:ua,object:oa,simple:ia}[a];return i.a.createElement("div",{ref:"wrap",className:"metafield"},i.a.createElement("div",{className:"meta-key ".concat(a)},i.a.createElement("input",{ref:"field_key",onBlur:function(){return e.handleKeyBlur()},defaultValue:r,className:"field key-field",type:"text",placeholder:"Key",disabled:g}),i.a.createElement(ca,{currentType:a,isDefaultField:E,parentType:"top",parentKey:r,onConvertClick:function(t){return e.handleConvertClick(t)},onRemoveClick:function(){return e.handleRemoveClick()}})),i.a.createElement(v,{key_prefix:m,fieldKey:r,parentType:n,fieldValue:c,addField:o,removeField:s,updateFieldKey:u,updateFieldValue:d,moveArrayItem:p,convertField:f,nameAttr:"".concat(l,"['").concat(r,"']"),namePrefix:"".concat(l,"['").concat(r,"']"),siteMeta:h,isInDefaultState:g}))}}]),t}(r.Component),pa=function(e){return{type:"STORE_CONTENT_FIELDS",content:e}},fa=function(e){return{type:"ADD_METAFIELD",namePrefix:e}},ma=function(e,t){return{type:"REMOVE_METAFIELD",namePrefix:e,key:t}},ha=function(e,t){return{type:"ENABLE_FIELD",nameAttr:e,value:t}},ga=function(e,t,a){return{type:"UPDATE_FIELD_KEY",namePrefix:e,fieldKey:t,newKey:a}},Ea=function(e,t){return{type:"UPDATE_FIELD_VALUE",nameAttr:e,value:t}},va=function(e,t,a){return{type:"MOVE_ARRAY_ITEM",namePrefix:e,srcInd:t,targetInd:a}},ya=function(e,t){return{type:"CONVERT_FIELD",nameAttr:e,convertType:t}},ba=function(e){return{type:"UPDATE_TITLE",title:e}},Ca=function(e){return{type:"UPDATE_BODY",body:e}},_a=function(e){return{type:"UPDATE_PATH",path:e}};var Oa=function(){return function(e){return e({type:"FETCH_SITE_META_REQUEST"}),oe("".concat(b,"/site_meta"),{type:"FETCH_SITE_META_SUCCESS",name:"site"},{type:"FETCH_SITE_META_FAILURE",name:"error"},e)}};var ka=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.storeContentFields,a=e.fields,n=e.fetchSiteMeta;e.dataview||n(),t(a)}},{key:"shouldComponentUpdate",value:function(e){return!pe.a.isEqual(e.metadata,this.props.metadata)}},{key:"render",value:function(){var e=this.props,t=e.metadata,a=e.addField,n=e.enableField,r=e.removeField,c=e.updateFieldKey,l=e.updateFieldValue,o=e.moveArrayItem,s=e.convertField,u=e.key_prefix,d=e.dataview,p=e.site,f=e.staticFields,m=Object(y.a)({},f,{},t);d||(m=pe.a.omit(m,["title","path","raw_content"]));var h=Ye()({datafields:d,metafields:!d}),g=pe.a.omit(f,Object.keys(t)),E=pe.a.map(m,(function(e,t){var m=Object(Ot.b)(e,t);return g.hasOwnProperty(t)?i.a.createElement(St,{key:t,type:m,fieldKey:t,fieldValue:e,enableField:n}):i.a.createElement(da,{key:t,key_prefix:u,type:m,parentType:"top",fieldKey:t,fieldValue:e,addField:a,removeField:r,updateFieldKey:c,updateFieldValue:l,moveArrayItem:o,convertField:s,nameAttr:"metadata['".concat(t,"']"),namePrefix:"metadata",siteMeta:d?null:p,isInDefaultState:g.hasOwnProperty(t),isDefaultField:f&&f.hasOwnProperty(t)})})),v=d?i.a.createElement("div",{className:"data-new"},i.a.createElement("a",{onClick:function(){return a("metadata")}},i.a.createElement(Qe,{name:"plus-circle"})," New data field")):i.a.createElement("div",{className:"meta-new"},i.a.createElement("a",{onClick:function(){return a("metadata")},className:"tooltip"},i.a.createElement(Qe,{name:"plus-circle"})," New metadata field",i.a.createElement("span",{className:"tooltip-text"},"Metadata will be stored as the ",i.a.createElement("b",null,"YAML front matter")," within the document.")),i.a.createElement("small",{className:"tooltip pull-right"},i.a.createElement(Qe,{name:"info-circle"}),"Special Keys",i.a.createElement("span",{className:"tooltip-text"},"You can use special keys like ",i.a.createElement("b",null,"date"),", ",i.a.createElement("b",null,"file"),", ",i.a.createElement("b",null,"image"),", ",i.a.createElement("b",null,"layout")," or ",i.a.createElement("b",null,"tags")," for user-friendly functionalities.")));return i.a.createElement("div",{className:h},E,v)}}]),t}(r.Component),Fa=Object(o.b)((function(e){return{metadata:e.metadata.metadata,key_prefix:e.metadata.key_prefix,site:e.meta.site}}),(function(e){return Object(h.b)({storeContentFields:pa,fetchSiteMeta:Oa,addField:fa,enableField:ha,removeField:ma,updateFieldKey:ga,updateFieldValue:Ea,moveArrayItem:va,convertField:ya},e)}))(ka),Ta=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(e){return a.props.onChange(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"renderPathFields",value:function(e,t){return i.a.createElement("form",{className:"datafile-path"},i.a.createElement("fieldset",{className:"filename"},i.a.createElement("legend",null,"Path (without extension)"),i.a.createElement("input",{type:"text",id:"path",defaultValue:e,placeholder:"filename",onChange:this.handleChange,ref:"filepath"})),i.a.createElement("fieldset",{className:"file-type"},i.a.createElement("legend",null,"File Type"),i.a.createElement("select",{id:"extn",defaultValue:t,onChange:this.handleChange,ref:"extname"},i.a.createElement("option",{value:".yml"},"YAML"),i.a.createElement("option",{value:".json"},"JSON"))))}},{key:"render",value:function(){var e=this.props,t=e.fields,a=e.slug,n=e.ext,r=e.restricted;return i.a.createElement("div",null,i.a.createElement("div",{className:"warning"},"CAUTION! Any existing comments will be lost when editing via this view. Switch to the ",i.a.createElement("strong",null,"Raw Editor")," to preserve them."),!r&&this.renderPathFields(a,n),i.a.createElement(Fa,{fields:t,dataview:!0}))}}]),t}(r.Component);Ta.defaultProps={fields:{},slug:"",ext:"",restricted:!1};var ja=Ta,Aa=a(287),Da=a.n(Aa),Sa=(a(653),a(655),a(656),function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(){var e=a.props,t=e.onEditorChange;!e.editorChanged&&t()},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"shouldComponentUpdate",value:function(e,t){return e.content!==this.props.content}},{key:"getValue",value:function(){return this.refs.ace.editor.getValue()}},{key:"render",value:function(){var e=this.props,t=e.content,a=e.type,n=/json/i.test(a)?"json":"yaml";return i.a.createElement("div",null,i.a.createElement(Da.a,{value:t,mode:n,theme:"monokai",width:"100%",height:"400px",showGutter:!1,showPrintMargin:!1,highlightActiveLine:!1,className:"config-editor",fontSize:14,scrollMargin:[15,15,15,15],ref:"ace",onChange:this.handleChange}),i.a.createElement("div",{className:"statusbar"},"mode: ",n.toUpperCase()))}}]),t}(r.Component)),wa=function(e){var t=e.errors;return i.a.createElement("div",{className:"error-messages"},pe.a.map(t,(function(e,t){return i.a.createElement("div",{key:t},e)})))},La=ne.labels,Ia={create:"plus-square",delete:"trash",publish:"send-o",save:"save",upload:"upload",view:"eye"};function Na(e){var t,a,n=e.type,r=e.active,c=e.triggered,l=e.onClick,o=e.block,s=e.thin,u=e.icon,d=e.to,p=Ye()("btn",{"btn-active":r,"btn-success":r&&("save"===n||"create"===n),"btn-delete":"delete"===n,"btn-view":"view"===n||"publish"===n,"btn-inactive":!r,"btn-fat":o,"btn-thin":s});switch(n){case"save":case"create":t=La[n].label,a=La[n].triggeredLabel;break;case"view-toggle":t=La.viewToggle.label,a=La.viewToggle.triggeredLabel;break;case"view":case"delete":case"upload":case"publish":t=La[n].label;break;default:t="<LABEL>",a="<NEXT LABEL>"}var f=u||Ia[n],m=f&&i.a.createElement(Qe,{name:f});return d?i.a.createElement("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:p},m,t):l?i.a.createElement("button",{onClick:l,className:p},m,c?a:t):null}var Ra=ne.getLeaveMessage,Pa=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={guiView:!1},a.routerWillLeave=function(e){var t=a.props,n=t.editorChanged,r=t.fieldChanged;if(n||r)return Ra()},a.toggleView=function(){a.setState((function(e){return{guiView:!e.guiView}}))},a.handleClickSave=function(e){Le(e);var t=a.props,n=t.editorChanged,r=t.fieldChanged,i=t.putConfig;n?i(a.refs.editor.getValue()):r&&i(null,"gui")},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"renderContentBody",value:function(){var e=this.props,t=e.config,a=e.editorChanged,n=e.onEditorChange,r=t.raw_content,c=t.content;return this.state.guiView&&c?i.a.createElement(ja,{fields:c,onChange:n,restricted:!0}):i.a.createElement(Sa,{editorChanged:a,onEditorChange:n,content:r,ref:"editor"})}},{key:"render",value:function(){var e=this.props,t=e.editorChanged,a=e.fieldChanged,n=e.updated,r=e.errors,c={save:this.handleClickSave};return i.a.createElement(v.a,{title:"Configuration"},i.a.createElement(g.HotKeys,{handlers:c,className:"single"},r&&r.length>0&&i.a.createElement(wa,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement("h1",null,"Configuration"),i.a.createElement("div",{className:"page-buttons multiple"},i.a.createElement(Na,{onClick:this.toggleView,type:"view-toggle",triggered:this.state.guiView,active:!0,block:!0}),i.a.createElement(Na,{onClick:this.handleClickSave,type:"save",active:t||a,triggered:n,block:!0}))),i.a.createElement("div",{className:"content-body"},this.renderContentBody())))}}]),t}(r.Component),Ma=Object(s.withRouter)(Object(o.b)((function(e){return{config:e.config.config,updated:e.config.updated,editorChanged:e.config.editorChanged,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors}}),(function(e){return Object(h.b)({putConfig:Be,onEditorChange:Ve,clearErrors:_e},e)}))(Pa)),Ua=ne.getDeleteMessage,xa=ne.getNotFoundMessage,Ba=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteItem,n=t.params,r=t.type,i=window.confirm(Ua(e)),c=n.splat?"/".concat(n.splat):"";i&&(a(n.splat,e),s.browserHistory.push("".concat("/admin","/").concat(r).concat(c)))}},{key:"renderTitleCell",value:function(e,t,a,n){return i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:"".concat("/admin","/").concat(a,"/").concat(n)},i.a.createElement(Qe,{name:t}),e)))}},{key:"renderDirectoryRow",value:function(e,t,a){var n=e.name,r=e.relative_path;return i.a.createElement("tr",{key:a},this.renderTitleCell(n,"folder",t,r),i.a.createElement("td",null))}},{key:"renderFileRow",value:function(e,t,a){var n=this,r=e.name,c=e.relative_path,l=e.http_url;return i.a.createElement("tr",{key:a},this.renderTitleCell(r,"file-text-o",t,c),i.a.createElement("td",null,i.a.createElement("div",{className:"row-actions"},i.a.createElement(Na,{onClick:function(){return n.handleClickDelete(r)},type:"delete",active:!0,thin:!0}),l&&i.a.createElement(Na,{to:l,type:"view",active:!0,thin:!0}))))}},{key:"renderRows",value:function(){var e=this,t=this.props,a=t.items,n=t.type;return a.map((function(t,a){return"directory"===t.type?e.renderDirectoryRow(t,n,a):e.renderFileRow(t,n,a)}))}},{key:"render",value:function(){var e=this.props,t=e.items,a=e.type,n=e.newBtnLabel,r=e.search,c=e.params,l="datafiles"===a?"data files":a,o=c.splat?"".concat("/admin","/").concat(a,"/").concat(c.splat,"/new"):"".concat("/admin","/").concat(a,"/new"),u=t.length?i.a.createElement("div",{className:"content-table"},i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,"Filename"),i.a.createElement("th",{className:"th-actions"},"Actions"))),i.a.createElement("tbody",null,this.renderRows()))):i.a.createElement("h1",null,xa(l));return i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:a,splat:c.splat}),i.a.createElement("div",{className:"page-buttons"},i.a.createElement(s.Link,{className:"btn btn-active",to:o},n)),i.a.createElement("div",{className:"pull-right"},i.a.createElement(Qt,{searchBy:"filename",search:r}))),u)}}]),t}(r.Component),Ha=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_PAGES_REQUEST"}),oe(_(e),{type:"FETCH_PAGES_SUCCESS",name:"pages"},{type:"FETCH_PAGES_FAILURE",name:"error"},t)}},Va=function(e,t){return function(a){return a({type:"FETCH_PAGE_REQUEST"}),oe(O(e,t),{type:"FETCH_PAGE_SUCCESS",name:"page"},{type:"FETCH_PAGE_FAILURE",name:"error"},a)}},Ka=function(e){return function(t,a){var n=a().metadata.metadata,r=n.path,i=n.raw_content,c=n.title;if(r&&"".concat(r,"/")!==e||!c){var l=Ee(n);if(l.length)return t(Oe(l))}else r="".concat(De(c),".md");t({type:"CLEAR_ERRORS"});var o=Pe(n);return se(O(e,r),Me({front_matter:o,raw_content:i}),{type:"PUT_PAGE_SUCCESS",name:"page"},{type:"PUT_PAGE_FAILURE",name:"error"},t)}},Ga=function(e,t){return function(a,n){var r=n().metadata.metadata,i=r.path,c=r.raw_content,l=r.title;if(i&&"".concat(i,"/")!==e||!l){var o=Ee(r);if(o.length)return a(Oe(o))}else i="".concat(De(l),".md");a({type:"CLEAR_ERRORS"});var s=Pe(r),u=e?"".concat(e,"/").concat(i):i;return se(O(e,t),Me({path:u,front_matter:s,raw_content:c}),{type:"PUT_PAGE_SUCCESS",name:"page"},{type:"PUT_PAGE_FAILURE",name:"error"},a)}},Qa=function(e,t){return function(a){var n=Re(e,t);return ue(O(e,t),{type:"DELETE_PAGE_SUCCESS",name:"page",id:n},{type:"DELETE_PAGE_FAILURE",name:"error"},a)}};var Wa=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchPages)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchPages;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.pages,n=e.search,r=e.params,c=e.deletePage;if(t)return null;var l=Ne("pages",r.splat);return i.a.createElement(v.a,{title:l},i.a.createElement(Ba,{type:"pages",items:a,params:r,newBtnLabel:"New page",search:n,deleteItem:c}))}}]),t}(r.Component),Ya=Object(o.b)((function(e){return{pages:ye(e.pages.pages,e.utils.input),isFetching:e.pages.isFetching}}),(function(e){return Object(h.b)({fetchPages:Ha,deletePage:Qa,search:Ce},e)}))(Wa),qa=a(26),za=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(e){var t=a.props.onChange;a.refs.input.value=e.target.value,t(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"render",value:function(){var e=this.props,t=e.path,a=e.type,n="example.md";if("posts"===a){var r=Je()().format("YYYY-MM-DD");n="".concat(r,"-your-title.md")}else"data files"===a&&(n="your-filename.yml");var c=null;return"data files"!==a&&(c=i.a.createElement("span",{className:"tooltip"},i.a.createElement(Qe,{name:"info-circle"}),i.a.createElement("span",{className:"tooltip-text"},"If you leave ",i.a.createElement("b",null,"path")," blank, it will be autogenerated from title."))),i.a.createElement("div",{className:"input-path"},i.a.createElement("label",null,"Path ",c),i.a.createElement(yt.a,{key:t,onChange:this.handleChange,placeholder:n,defaultValue:t,ref:"input"}))}}]),t}(r.Component),Za=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).handleChange=function(e){(0,a.props.onChange)(e.target.value)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"shouldComponentUpdate",value:function(e){return e.title!==this.props.title}},{key:"render",value:function(){var e=this.props.title;return i.a.createElement("div",{className:"input-title"},i.a.createElement("label",null,"Title"),i.a.createElement(yt.a,{onChange:this.handleChange,placeholder:"Title",defaultValue:e,ref:"input"}))}}]),t}(r.Component),Ja=a(293),Xa=a(288),$a=a.n(Xa),en=a(7),tn=a.n(en);tn.a.registerLanguage("actionscript",a(668)),tn.a.registerLanguage("apache",a(669)),tn.a.registerLanguage("applescript",a(670)),tn.a.registerLanguage("asciidoc",a(671)),tn.a.registerLanguage("bash",a(672)),tn.a.registerLanguage("basic",a(673)),tn.a.registerLanguage("clojure",a(674)),tn.a.registerLanguage("clojure-repl",a(675)),tn.a.registerLanguage("cmake",a(676)),tn.a.registerLanguage("coffeescript",a(677)),tn.a.registerLanguage("cpp",a(678)),tn.a.registerLanguage("crystal",a(679)),tn.a.registerLanguage("css",a(680)),tn.a.registerLanguage("dart",a(681)),tn.a.registerLanguage("diff",a(682)),tn.a.registerLanguage("django",a(683)),tn.a.registerLanguage("dns",a(684)),tn.a.registerLanguage("dockerfile",a(685)),tn.a.registerLanguage("dos",a(686)),tn.a.registerLanguage("dsconfig",a(687)),tn.a.registerLanguage("elixir",a(688)),tn.a.registerLanguage("elm",a(689)),tn.a.registerLanguage("erb",a(690)),tn.a.registerLanguage("erlang-repl",a(691)),tn.a.registerLanguage("erlang",a(692)),tn.a.registerLanguage("excel",a(693)),tn.a.registerLanguage("fortran",a(694)),tn.a.registerLanguage("fsharp",a(695)),tn.a.registerLanguage("gherkin",a(696)),tn.a.registerLanguage("go",a(697)),tn.a.registerLanguage("gradle",a(698)),tn.a.registerLanguage("groovy",a(699)),tn.a.registerLanguage("haml",a(700)),tn.a.registerLanguage("handlebars",a(701)),tn.a.registerLanguage("haskell",a(702)),tn.a.registerLanguage("htmlbars",a(703)),tn.a.registerLanguage("http",a(704)),tn.a.registerLanguage("ini",a(705)),tn.a.registerLanguage("java",a(706)),tn.a.registerLanguage("javascript",a(707)),tn.a.registerLanguage("json",a(708)),tn.a.registerLanguage("julia",a(709)),tn.a.registerLanguage("julia-repl",a(710)),tn.a.registerLanguage("kotlin",a(711)),tn.a.registerLanguage("ldif",a(712)),tn.a.registerLanguage("less",a(713)),tn.a.registerLanguage("lisp",a(714)),tn.a.registerLanguage("livescript",a(715)),tn.a.registerLanguage("lua",a(716)),tn.a.registerLanguage("makefile",a(717)),tn.a.registerLanguage("markdown",a(718)),tn.a.registerLanguage("mathematica",a(719)),tn.a.registerLanguage("matlab",a(720)),tn.a.registerLanguage("perl",a(721)),tn.a.registerLanguage("nginx",a(722)),tn.a.registerLanguage("nix",a(723)),tn.a.registerLanguage("objectivec",a(724)),tn.a.registerLanguage("ocaml",a(725)),tn.a.registerLanguage("pgsql",a(726)),tn.a.registerLanguage("php",a(727)),tn.a.registerLanguage("plaintext",a(728)),tn.a.registerLanguage("powershell",a(729)),tn.a.registerLanguage("prolog",a(730)),tn.a.registerLanguage("python",a(731)),tn.a.registerLanguage("r",a(732)),tn.a.registerLanguage("reasonml",a(733)),tn.a.registerLanguage("ruby",a(734)),tn.a.registerLanguage("rust",a(735)),tn.a.registerLanguage("scala",a(736)),tn.a.registerLanguage("scss",a(737)),tn.a.registerLanguage("shell",a(738)),tn.a.registerLanguage("smalltalk",a(739)),tn.a.registerLanguage("sql",a(740)),tn.a.registerLanguage("swift",a(741)),tn.a.registerLanguage("typescript",a(742)),tn.a.registerLanguage("vbnet",a(743)),tn.a.registerLanguage("vbscript",a(744)),tn.a.registerLanguage("vim",a(745)),tn.a.registerLanguage("yaml",a(746)),tn.a.registerLanguage("xml",a(747));var an=tn.a,nn=["editor-toolbar","CodeMirror","editor-preview-side","editor-statusbar"],rn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r))))._replaceSelectedText=function(e,t,a){var n=e.getCursor("start"),r=e.getCursor("end"),i=e.getSelection(),c=Object(Ja.a)(t,2),l=c[0],o=c[1];a&&(o=o.replace("#url#",a)),e.replaceSelection("".concat(l).concat(i).concat(o)),n.ch+=l.length,n!==r&&(r.ch+=l.length),e.setSelection(n,r),e.focus()},a.handleFilePick=function(e){var t=a.editor,n=t.codemirror,r=t.options.insertTexts,i=r.image,c=r.link,l="{{ '".concat(e,"' | relative_url }}"),o=we(e),s=/png|jpg|gif|jpeg|svg|ico/i.test(o)?i:c;a._replaceSelectedText(n,s,l)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){this.create(),window.hljs=an}},{key:"shouldComponentUpdate",value:function(e){return e.initialValue!==this.props.initialValue}},{key:"componentDidUpdate",value:function(){this.destroy(),this.create()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"create",value:function(){var e=this,t=this.props,a=t.onChange,n=t.onSave,r=Object.create(this.props);r.element=this.refs.text,r.autoDownloadFontAwesome=!1,r.spellChecker=!1,r.renderingConfig={codeSyntaxHighlighting:!0},r.insertTexts={image:["![","](#url#)"]};var i=["bold","italic","heading","|","code","quote","unordered-list","ordered-list","|","link","image","table",{name:"filepicker",action:function(){return e.refs.filepicker.refs.trigger.click()},className:"fa fa-paperclip",title:"Insert Static File"},"|","preview","side-by-side","fullscreen","|"];n&&i.push({name:"save",action:n,className:"fa fa-floppy-o",title:"Save"}),r.toolbar=i;var c=new $a.a(r);c.codemirror&&c.codemirror.on("change",(function(){a(c.value())})),this.editor=c}},{key:"destroy",value:function(){for(var e in nn){var t=this.refs.container.querySelector("."+nn[e]);t&&t.remove()}}},{key:"render",value:function(){return i.a.createElement("div",null,i.a.createElement("div",{style:{display:"none"}},i.a.createElement(aa,{ref:"filepicker",onPick:this.handleFilePick})),i.a.createElement("div",{ref:"container"},i.a.createElement("textarea",{ref:"text"})))}}]),t}(r.Component);function cn(e){var t=e.type,a=e.path,n=e.body,r=e.title,c=e.onSave,l=e.updateTitle,o=e.updatePath,s=e.updateBody,u=e.metafields,d=e.staticmetafields;return i.a.createElement("div",{className:"content-body"},i.a.createElement(za,{onChange:o,type:t,path:a}),i.a.createElement(Za,{onChange:l,title:r}),i.a.createElement(rn,{onChange:s,onSave:c,placeholder:"Body",initialValue:n}),i.a.createElement(Ge,null),i.a.createElement(Fa,{fields:u,staticFields:d}))}cn.defaultProps={path:"",body:"",title:"",metafields:{},staticmetafields:{}};var ln=ne.getLeaveMessage,on=ne.getDeleteMessage,sn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return ln()},a.handleClickSave=function(e){Le(e);var t=a.props,n=t.putPage,r=t.fieldChanged,i=t.params;if(r){var c=Object(qa.a)(i.splat);n(c[0],c.slice(1).join("."))}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchPage,a=e.params,n=e.router,r=e.route,i=Object(qa.a)(a.splat);t(i[0],i.slice(1).join(".")),n.setRouteLeaveHook(r,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){if(this.props.updated!==e.updated){var t=e.page.path;t!==this.props.page.path&&s.browserHistory.push("".concat("/admin","/pages/").concat(t))}}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deletePage,n=t.params;if(window.confirm(on(e))){var r=Object(qa.a)(n.splat),i=r[0];a(i,r.slice(1).join(".")),s.browserHistory.push("".concat("/admin","/pages/").concat(i||""))}}},{key:"render",value:function(){var e=this,t=this.props,a=t.isFetching,n=t.page,r=t.errors,c=t.updateTitle,l=t.updateBody,o=t.updatePath,s=t.updated,u=t.fieldChanged,d=t.params;if(a)return null;if(pe.a.isEmpty(n))return i.a.createElement("h1",null,"Could not find the page.");var p={save:this.handleClickSave},f=n.name,m=n.raw_content,h=n.http_url,E=n.front_matter,b=n.front_matter_defaults,C=d.splat[0],_=E&&E.title?E.title:"",O=Ne("pages",C,_||f);return i.a.createElement(v.a,{title:O},i.a.createElement(g.HotKeys,{handlers:p,className:"single"},r.length>0&&i.a.createElement(wa,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:"pages",splat:C})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(cn,{type:"pages",updateTitle:c,updatePath:o,updateBody:l,onSave:this.handleClickSave,path:f,title:_,body:m,metafields:Object(y.a)({title:_,raw_content:m,path:f},E),staticmetafields:b}),i.a.createElement("div",{className:"content-side"},i.a.createElement(Na,{onClick:this.handleClickSave,type:"save",active:u,triggered:s,block:!0}),i.a.createElement(Na,{to:h,type:"view",active:!0,block:!0}),i.a.createElement(Ge,null),i.a.createElement(Na,{onClick:function(){return e.handleClickDelete(f)},type:"delete",active:!0,block:!0})))))}}]),t}(r.Component),un=Object(s.withRouter)(Object(o.b)((function(e){return{page:e.pages.page,isFetching:e.pages.isFetching,fieldChanged:e.metadata.fieldChanged,updated:e.pages.updated,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchPage:Va,deletePage:Qa,putPage:Ga,updateTitle:ba,updateBody:Ca,updatePath:_a,clearErrors:_e},e)}))(sn));function dn(e){var t=e.type,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=e.onClickSave,d=e.params.splat,p="drafts"===t?"posts":t;return i.a.createElement(g.HotKeys,{handlers:{save:u}},n.length>0&&i.a.createElement(wa,{errors:n}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:t,splat:d})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(cn,{type:t,updatePath:l,updateTitle:o,updateBody:c,onSave:u,staticmetafields:Object(Ot.d)(a,d,p)}),i.a.createElement("div",{className:"content-side"},i.a.createElement(Na,{onClick:u,type:"create",active:s,triggered:r,block:!0}))))}var pn=ne.getLeaveMessage,fn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return pn()},a.handleClickSave=function(e){Le(e);var t=a.props,n=t.fieldChanged,r=t.createPage,i=t.params;n&&r(i.splat)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&s.browserHistory.push("".concat("/admin","/pages/").concat(e.page.path))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.params,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=Ne("pages",t.splat,"New page");return i.a.createElement(v.a,{title:u},i.a.createElement(dn,{type:"pages",params:t,config:a,errors:n,updated:r,updateBody:c,updatePath:l,updateTitle:o,fieldChanged:s,onClickSave:this.handleClickSave}))}}]),t}(r.Component),mn=Object(s.withRouter)(Object(o.b)((function(e){return{page:e.pages.page,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors,updated:e.pages.updated,config:e.config.config}}),(function(e){return Object(h.b)({updateTitle:ba,updateBody:Ca,updatePath:_a,createPage:Ka,clearErrors:_e},e)}))(fn)),hn=ne.getDeleteMessage,gn=ne.getNotFoundMessage,En=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchCollection,a=e.params;t(a.collection_name,a.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchCollection,a=e.params;a.splat===this.props.params.splat&&a.collection_name===this.props.params.collection_name||t(a.collection_name,a.splat)}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteDocument,n=t.params;window.confirm(hn(e))&&a(n.collection_name,n.splat,e)}},{key:"renderTable",value:function(){return i.a.createElement("div",{className:"content-table"},i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,"Name"),i.a.createElement("th",null,"Date"),i.a.createElement("th",{className:"th-actions"},"Actions"))),i.a.createElement("tbody",null,this.renderRows())))}},{key:"renderFileRow",value:function(e){var t=this,a=e.id,n=e.name,r=e.title,c=e.http_url,l=e.collection,o=e.relative_path,u="".concat("/admin","/collections/").concat(l,"/").concat(o),d=e.date.substring(0,e.date.lastIndexOf(" "));return d="12:00:00"===Je()(d).format("hh:mm:ss")?Je()(d).format("ll"):Je()(d).format("lll"),i.a.createElement("tr",{key:a},i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:u},i.a.createElement(Qe,{name:"file-text-o"}),r||n))),i.a.createElement("td",null,d),i.a.createElement("td",null,i.a.createElement("div",{className:"row-actions"},i.a.createElement(Na,{onClick:function(){return t.handleClickDelete(n)},type:"delete",active:!0,thin:!0}),c&&i.a.createElement(Na,{to:c,type:"view",active:!0,thin:!0}))))}},{key:"renderDirectoryRow",value:function(e){var t=this.props.params.collection_name,a=e.name,n=e.relative_path,r=e.modified_time,c="".concat("/admin","/collections/").concat(t,"/").concat(n),l=r.substring(0,r.lastIndexOf(" "));return l=Je()(l).format("ll"),i.a.createElement("tr",{key:a},i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:c},i.a.createElement(Qe,{name:"folder"}),a))),i.a.createElement("td",null,l),i.a.createElement("td",null))}},{key:"renderRows",value:function(){var e=this,t=this.props.documents;return pe.a.map(t,(function(t){return t.type&&"directory"===t.type?e.renderDirectoryRow(t):e.renderFileRow(t)}))}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.documents,n=e.search,r=e.params,c=r.collection_name;if(t)return null;var l=r.splat||"",o=r.splat?"".concat("/admin","/collections/").concat(c,"/").concat(l,"/new"):"".concat("/admin","/collections/").concat(c,"/new"),u=Ne(c,r.splat);return i.a.createElement(v.a,{title:u},i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:c,splat:l}),i.a.createElement("div",{className:"page-buttons"},i.a.createElement(s.Link,{className:"btn btn-active",to:o},"posts"===c?"New post":"New document")),i.a.createElement("div",{className:"pull-right"},i.a.createElement(Qt,{searchBy:"title",search:n}))),a.length>0&&this.renderTable(),!a.length&&i.a.createElement("h1",null,gn("documents"))))}}]),t}(r.Component),vn=Object(o.b)((function(e){return{documents:(t=e.collections.entries,a=e.utils.input,a?t.filter((function(e){return(e.title||e.name).toLowerCase().includes(a.toLowerCase())})):t),isFetching:e.collections.isFetching};var t,a}),(function(e){return Object(h.b)({fetchCollection:at,deleteDocument:ct,search:Ce},e)}))(En),yn=ne.getLeaveMessage,bn=ne.getDeleteMessage,Cn=ne.getNotFoundMessage,_n=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return yn()},a.handleClickSave=function(e){Le(e);var t=a.props,n=t.putDocument,r=t.fieldChanged,i=t.params;if(r){var c=i.collection_name,l=Object(qa.a)(i.splat);n(c,l[0],l.slice(1).join("."))}},a.handleClickDelete=function(){var e=a.props,t=e.deleteDocument,n=e.params,r=Object(qa.a)(n.splat),i=r[0],c=r.slice(1).join(".");if(window.confirm(bn(c))){var l=n.collection_name;t(l,i,c),s.browserHistory.push("".concat("/admin","/collections/").concat(l,"/").concat(i||""))}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchDocument,a=e.params,n=e.router,r=e.route,i=Object(qa.a)(a.splat),c=i[0],l=i.slice(1).join(".");t(a.collection_name,c,l),n.setRouteLeaveHook(r,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.currentDocument;if(this.props.updated!==e.updated){var a=e.currentDocument.path;a!==t.path&&s.browserHistory.push("".concat("/admin","/collections/").concat(a.substring(1)))}}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.currentDocument,n=e.errors,r=e.updateTitle,c=e.updateBody,l=e.updatePath,o=e.updated,s=e.fieldChanged,u=e.params;if(t)return null;if(pe.a.isEmpty(a))return i.a.createElement("h1",null,Cn("document"));var d=a.title,p=a.raw_content,f=a.http_url,m=a.collection,h=a.front_matter,E=a.front_matter_defaults,b=a.name,C=u.splat[0],_={save:this.handleClickSave},O=Ne(m,C,d);return i.a.createElement(v.a,{title:O},i.a.createElement(g.HotKeys,{handlers:_,className:"single"},n.length>0&&i.a.createElement(wa,{errors:n}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:m,splat:C})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(cn,{type:m,path:b,title:d,body:p,updatePath:l,updateTitle:r,updateBody:c,onSave:this.handleClickSave,metafields:Object(y.a)({title:d,path:b,raw_content:p},h),staticmetafields:E}),i.a.createElement("div",{className:"content-side"},i.a.createElement(Na,{onClick:this.handleClickSave,type:"save",active:s,triggered:o,block:!0}),i.a.createElement(Na,{to:f,type:"view",active:!0,block:!0}),i.a.createElement(Ge,null),i.a.createElement(Na,{onClick:this.handleClickDelete,type:"delete",active:!0,block:!0})))))}}]),t}(r.Component),On=Object(s.withRouter)(Object(o.b)((function(e){return{currentDocument:e.collections.currentDocument,isFetching:e.collections.isFetching,fieldChanged:e.metadata.fieldChanged,updated:e.collections.updated,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchDocument:nt,deleteDocument:ct,putDocument:it,updateTitle:ba,updateBody:Ca,updatePath:_a,clearErrors:_e},e)}))(_n)),kn=ne.getLeaveMessage,Fn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return kn()},a.handleClickSave=function(e){Le(e);var t=a.props,n=t.fieldChanged,r=t.createDocument,i=t.params;n&&r(i.collection_name,i.splat)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){if(this.props.updated!==e.updated){var t=e.currentDocument.path,a=t.substr(t.indexOf("/")+1,t.length);s.browserHistory.push("".concat("/admin","/collections/").concat(e.currentDocument.collection,"/").concat(a))}}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.params,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=t.collection_name,d=Ne(u,t.splat,"New document");return i.a.createElement(v.a,{title:d},i.a.createElement(dn,{type:u,params:t,config:a,errors:n,updated:r,updateBody:c,updatePath:l,updateTitle:o,fieldChanged:s,onClickSave:this.handleClickSave}))}}]),t}(r.Component),Tn=Object(s.withRouter)(Object(o.b)((function(e){return{currentDocument:e.collections.currentDocument,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors,updated:e.collections.updated,config:e.config.config}}),(function(e){return Object(h.b)({updateTitle:ba,updateBody:Ca,updatePath:_a,createDocument:rt,clearErrors:_e},e)}))(Fn)),jn=ne.getContentRequiredMessage,An=ne.getFilenameRequiredMessage,Dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_DATAFILES_REQUEST"}),oe(A(e),{type:"FETCH_DATAFILES_SUCCESS",name:"files"},{type:"FETCH_DATAFILES_FAILURE",name:"error"},t)}},Sn=function(e,t){return function(a){return a({type:"FETCH_DATAFILE_REQUEST"}),oe(D(e,t),{type:"FETCH_DATAFILE_SUCCESS",name:"file"},{type:"FETCH_DATAFILE_FAILURE",name:"error"},a)}},wn=function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"editor";return function(i,c){var l=we(n||t);if("gui"===r){var o=/json/i.test(l),s=c().metadata.metadata;s=Ie(s),a=o?JSON.stringify(s,null,2):Te(s)}var u=n?{path:n,raw_content:a}:{raw_content:a},d=Nn(t,a);return d.length?i(Oe(d)):(i({type:"CLEAR_ERRORS"}),se(D(e,t),JSON.stringify(u),{type:"PUT_DATAFILE_SUCCESS",name:"file"},{type:"PUT_DATAFILE_FAILURE",name:"error"},i))}},Ln=function(e,t){return function(a){var n=Re(e,t);return ue(D(e,t),{type:"DELETE_DATAFILE_SUCCESS",name:"file",id:n},{type:"DELETE_DATAFILE_FAILURE",name:"error"},a)}},In=function(){return{type:"DATAFILE_CHANGED"}},Nn=function(e,t){return ve({filename:e,data:t},{filename:"required",data:"required"},{"filename.required":An(),"data.required":jn()})};var Rn=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchDataFiles)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchDataFiles;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.files,n=e.search,r=e.params,c=e.deleteDataFile;if(t)return null;var l=Ne("data files",r.splat);return i.a.createElement(v.a,{title:l},i.a.createElement(Ba,{type:"datafiles",items:a,params:r,newBtnLabel:"New data file",search:n,deleteItem:c}))}}]),t}(r.Component),Pn=Object(o.b)((function(e){return{files:ye(e.datafiles.files,e.utils.input),isFetching:e.datafiles.isFetching}}),(function(e){return Object(h.b)({fetchDataFiles:Dn,deleteDataFile:Ln,search:Ce},e)}))(Rn),Mn=ne.getLeaveMessage,Un=ne.getDeleteMessage,xn=ne.getNotFoundMessage,Bn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={guiView:!1},a.routerWillLeave=function(e){var t=a.props,n=t.datafileChanged,r=t.fieldChanged;if(n||r)return Mn()},a.toggleView=function(){a.setState((function(e){return{guiView:!e.guiView}}))},a.handleClickSave=function(e){Le(e);var t,n,r,i=a.props,c=i.datafile,l=i.datafileChanged,o=i.fieldChanged,s=i.putDataFile,u=i.params,d=c.path,p=c.relative_path,f=d.replace(p,""),m=Object(qa.a)(u.splat),h=m[0],g=m.slice(1).join(".");if(l||o){if(a.state.guiView){var E=a.refs.gui.refs,v=E.filepath,y=E.extname;t=v.value+y.value,n=null,r="gui"}else{var b=a.refs.inputpath.refs.input;t=b.value||b.props.defaultValue,n=a.refs.editor.getValue(),r="editor"}var C=h?f+"".concat(h,"/")+t:f+t;s(h,g,n,C!==d?C:"",r)}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchDataFile,a=e.params,n=e.router,r=e.route,i=Object(qa.a)(a.splat),c=i[0],l=i.slice(1).join(".");n.setRouteLeaveHook(r,this.routerWillLeave),t(c,l)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&(e.datafile.path!==this.props.datafile.path&&s.browserHistory.push("".concat("/admin","/datafiles/").concat(e.datafile.relative_path)))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteDataFile,n=t.params;if(window.confirm(Un(e))){var r=n.splat[0];a(r,Se(e));var i=r?"/".concat(r):"";s.browserHistory.push("".concat("/admin","/datafiles").concat(i))}}},{key:"renderAside",value:function(){var e=this,t=this.props,a=t.datafile,n=t.datafileChanged,r=t.fieldChanged,c=t.updated,l=a.path,o=Se(l),s=we(l),u=/ya?ml|json/i.test(s);return i.a.createElement("div",{className:"content-side"},i.a.createElement(Na,{onClick:this.handleClickSave,type:"save",active:n||r,triggered:c,block:!0}),u&&i.a.createElement(Na,{onClick:this.toggleView,type:"view-toggle",triggered:this.state.guiView,active:!0,block:!0}),i.a.createElement(Ge,null),i.a.createElement(Na,{onClick:function(){return e.handleClickDelete(o)},type:"delete",active:!0,block:!0}))}},{key:"renderContentBody",value:function(e){var t=this.props,a=t.datafile,n=t.datafileChanged,r=t.onDataFileChanged,c=a.raw_content,l=a.content,o=a.slug,s=a.ext,u=this.state.guiView;return u&&l?i.a.createElement("div",{className:"content-body"},i.a.createElement(ja,{fields:l,slug:o,ext:s,onChange:r,ref:"gui"})):!u&&c?i.a.createElement("div",{className:"content-body"},i.a.createElement(za,{onChange:r,type:"data files",path:e,ref:"inputpath"}),i.a.createElement(Sa,{editorChanged:n,onEditorChange:r,content:c,type:s,ref:"editor"})):void 0}},{key:"render",value:function(){var e=this.props,t=e.datafile,a=e.isFetching,n=e.params,r=e.errors;if(a)return null;if(pe.a.isEmpty(t.content))return i.a.createElement("h1",null,xn("content"));var c=n.splat[0],l=Se(t.path),o={save:this.handleClickSave},s=Ne("data files",c,l);return i.a.createElement(v.a,{title:s},i.a.createElement(g.HotKeys,{handlers:o,className:"single"},r.length>0&&i.a.createElement(wa,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:"datafiles",splat:c})),i.a.createElement("div",{className:"content-wrapper"},this.renderContentBody(l),this.renderAside())))}}]),t}(r.Component),Hn=Object(s.withRouter)(Object(o.b)((function(e){return{datafile:e.datafiles.currentFile,isFetching:e.datafiles.isFetching,updated:e.datafiles.updated,datafileChanged:e.datafiles.datafileChanged,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchDataFile:Sn,putDataFile:wn,deleteDataFile:Ln,onDataFileChanged:In,clearErrors:_e},e)}))(Bn)),Vn=ne.getLeaveMessage,Kn=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).state={guiView:!1},a.routerWillLeave=function(e){if(!a.state.guiView&&a.props.datafileChanged)return Vn()},a.toggleView=function(){a.setState((function(e){return{guiView:!e.guiView}}))},a.handleClickSave=function(e){Le(e);var t,n=a.props,r=n.datafileChanged,i=n.fieldChanged,c=n.putDataFile,l=n.params;if(r||i)if(a.state.guiView){var o=a.refs.gui.refs,s=o.filepath,u=o.extname;t=s.value+u.value,c(l.splat,t,null,null,"gui")}else t=a.refs.inputpath.refs.input.value,c(l.splat,t,a.refs.editor.getValue())},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&s.browserHistory.push("".concat("/admin","/datafiles/").concat(e.datafile.relative_path))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"renderAside",value:function(){var e=this.props,t=e.datafileChanged,a=e.fieldChanged,n=e.updated;return i.a.createElement("div",{className:"content-side"},i.a.createElement(Na,{onClick:this.handleClickSave,type:"create",active:t||a,triggered:n,block:!0}),i.a.createElement(Na,{onClick:this.toggleView,type:"view-toggle",triggered:this.state.guiView,active:!0,block:!0}))}},{key:"renderContentBody",value:function(){var e=this.props,t=e.datafileChanged,a=e.onDataFileChanged;return this.state.guiView?i.a.createElement("div",{className:"content-body"},i.a.createElement(ja,{onChange:a,ref:"gui"})):i.a.createElement("div",{className:"content-body"},i.a.createElement(za,{onChange:a,type:"data files",path:"",ref:"inputpath"}),i.a.createElement(Sa,{editorChanged:t,onEditorChange:a,content:"",ref:"editor"}))}},{key:"render",value:function(){var e=this.props,t=e.errors,a=e.params,n={save:this.handleClickSave},r=Ne("data files",a.splat,"New data file");return i.a.createElement(v.a,{title:r},i.a.createElement(g.HotKeys,{handlers:n},t.length>0&&i.a.createElement(wa,{errors:t}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:"datafiles",splat:a.splat})),i.a.createElement("div",{className:"content-wrapper"},this.renderContentBody(),this.renderAside())))}}]),t}(r.Component),Gn=Object(s.withRouter)(Object(o.b)((function(e){return{datafile:e.datafiles.currentFile,updated:e.datafiles.updated,datafileChanged:e.datafiles.datafileChanged,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors}}),(function(e){return Object(h.b)({putDataFile:wn,onDataFileChanged:In,clearErrors:_e},e)}))(Kn)),Qn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:"FETCH_DRAFTS_REQUEST"}),oe(k(e),{type:"FETCH_DRAFTS_SUCCESS",name:"drafts"},{type:"FETCH_DRAFTS_FAILURE",name:"error"},t)}},Wn=function(e,t){return function(a){return a({type:"FETCH_DRAFT_REQUEST"}),oe(F(e,t),{type:"FETCH_DRAFT_SUCCESS",name:"draft"},{type:"FETCH_DRAFT_FAILURE",name:"error"},a)}},Yn=function(e){return function(t,a){var n=a().metadata.metadata,r=n.path,i=n.raw_content,c=n.title;if(r&&"".concat(r,"/")!==e||!c){var l=Ee(n);if(l.length)return t(Oe(l))}else r="".concat(De(c),".md");t({type:"CLEAR_ERRORS"});var o=Pe(n),s=r.replace("_drafts/","");return se(F(e,s),Me({front_matter:o,raw_content:i}),{type:"PUT_DRAFT_SUCCESS",name:"draft"},{type:"PUT_DRAFT_FAILURE",name:"error"},t)}},qn=function(e,t){return function(a,n){var r=n().metadata.metadata,i=r.path,c=r.raw_content,l=r.title;if(i&&"".concat(i,"/")!==e||!l){var o=Ee(r);if(o.length)return a(Oe(o))}else i="".concat(De(l),".md");a({type:"CLEAR_ERRORS"});var s=Pe(r),u=e?"_drafts/".concat(e,"/").concat(i):"_drafts/".concat(i);return se(F(e,t),Me({path:u,front_matter:s,raw_content:c}),{type:"PUT_DRAFT_SUCCESS",name:"draft"},{type:"PUT_DRAFT_FAILURE",name:"error"},a)}},zn=function(e,t){return function(a){var n=Re(e,t);return ue(F(e,t),{type:"DELETE_DRAFT_SUCCESS",name:"draft",id:n},{type:"DELETE_DRAFT_FAILURE",name:"error"},a)}},Zn=function(e,t){return function(a,n){var r=n().metadata.metadata,i=r.path,c=r.raw_content,l=r.title;if(!i&&l)i="".concat(De(l),".md");else{var o=Ee(r);if(o.length)return a(Oe(o))}a({type:"CLEAR_ERRORS"});var s=Pe(r);return se(j("posts",e,t),Me({raw_content:c,front_matter:s}),{type:"PUT_DOCUMENT_SUCCESS",name:"doc"},{type:"PUT_DOCUMENT_FAILURE",name:"error"},a)}};var Jn=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchDrafts)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchDrafts;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"render",value:function(){var e=this.props,t=e.isFetching,a=e.drafts,n=e.search,r=e.params,c=e.deleteDraft;if(t)return null;var l=Ne("drafts",r.splat);return i.a.createElement(v.a,{title:l},i.a.createElement(Ba,{type:"drafts",items:a,params:r,newBtnLabel:"New draft",search:n,deleteItem:c}))}}]),t}(r.Component),Xn=Object(o.b)((function(e){return{drafts:ye(e.drafts.drafts,e.utils.input),isFetching:e.drafts.isFetching}}),(function(e){return Object(h.b)({fetchDrafts:Qn,deleteDraft:zn,search:Ce},e)}))(Jn),$n=ne.getLeaveMessage,er=ne.getDeleteMessage,tr=ne.getPublishDraftMessage,ar=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return $n()},a.handleClickSave=function(e){Le(e);var t=a.props,n=t.putDraft,r=t.fieldChanged,i=t.params;if(r){var c=Object(qa.a)(i.splat);n(c[0],c.slice(1).join("."))}},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchDraft,a=e.params,n=e.router,r=e.route,i=Object(qa.a)(a.splat);t(i[0],i.slice(1).join(".")),n.setRouteLeaveHook(r,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&(e.draft.path!==this.props.draft.path&&s.browserHistory.push("".concat("/admin","/drafts/").concat(e.draft.relative_path)))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"handleClickPublish",value:function(e){var t=this.props,a=t.deleteDraft,n=t.publishDraft,r=t.params,i=Object(qa.a)(r.splat),c=i[0],l=i.slice(1).join("."),o=Je()().format("YYYY-MM-DD"),u="".concat(o,"-").concat(l),d=c?"_posts/".concat(c,"/").concat(u):"_posts/".concat(u);if(window.confirm(tr(e,d))){var p=c?"/".concat(c):"";a(c,l),n(c,u),s.browserHistory.push("".concat("/admin","/drafts").concat(p))}}},{key:"handleClickDelete",value:function(e){var t=this.props,a=t.deleteDraft,n=t.params;if(window.confirm(er(e))){var r=Object(qa.a)(n.splat),i=r[0],c=r.slice(1).join("."),l=i?"/".concat(i):"";a(i,c),s.browserHistory.push("".concat("/admin","/drafts").concat(l))}}},{key:"render",value:function(){var e=this,t=this.props,a=t.isFetching,n=t.draft,r=t.errors,c=t.updateTitle,l=t.updateBody,o=t.updatePath,s=t.updated,u=t.fieldChanged,d=t.params;if(a)return null;if(pe.a.isEmpty(n))return i.a.createElement("h1",null,"Could not find the draft.");var p={save:this.handleClickSave},f=n.name,m=n.path,h=n.raw_content,E=n.http_url,b=n.front_matter,C=n.front_matter_defaults,_=d.splat[0],O=b&&b.title?b.title:"",k=Ne("drafts",_,O||f);return i.a.createElement(v.a,{title:k},i.a.createElement(g.HotKeys,{handlers:p,className:"single"},r.length>0&&i.a.createElement(wa,{errors:r}),i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:"drafts",splat:_})),i.a.createElement("div",{className:"content-wrapper"},i.a.createElement(cn,{type:"drafts",path:f,title:O,body:h,updatePath:o,updateBody:l,updateTitle:c,onSave:this.handleClickSave,metafields:Object(y.a)({title:O,raw_content:h,path:f},b),staticmetafields:C}),i.a.createElement("div",{className:"content-side"},i.a.createElement(Na,{onClick:this.handleClickSave,type:"save",active:u,triggered:s,block:!0}),i.a.createElement(Na,{to:E,type:"view",active:!0,block:!0}),i.a.createElement(Ge,null),i.a.createElement(Na,{onClick:function(){return e.handleClickPublish(m)},type:"publish",active:!0,block:!0}),i.a.createElement(Na,{onClick:function(){return e.handleClickDelete(f)},type:"delete",active:!0,block:!0})))))}}]),t}(r.Component),nr=Object(s.withRouter)(Object(o.b)((function(e){return{draft:e.drafts.draft,isFetching:e.drafts.isFetching,fieldChanged:e.metadata.fieldChanged,updated:e.drafts.updated,errors:e.utils.errors}}),(function(e){return Object(h.b)({fetchDraft:Wn,deleteDraft:zn,putDraft:qn,publishDraft:Zn,updateTitle:ba,updateBody:Ca,updatePath:_a,clearErrors:_e},e)}))(ar)),rr=ne.getLeaveMessage,ir=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).routerWillLeave=function(e){if(a.props.fieldChanged)return rr()},a.handleClickSave=function(e){Le(e);var t=a.props,n=t.fieldChanged,r=t.createDraft,i=t.params;n&&r(i.splat)},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,a=e.route;t.setRouteLeaveHook(a,this.routerWillLeave)}},{key:"componentWillReceiveProps",value:function(e){this.props.updated!==e.updated&&s.browserHistory.push("".concat("/admin","/drafts/").concat(e.draft.relative_path))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.clearErrors;e.errors.length&&t()}},{key:"render",value:function(){var e=this.props,t=e.params,a=e.config,n=e.errors,r=e.updated,c=e.updateBody,l=e.updatePath,o=e.updateTitle,s=e.fieldChanged,u=Ne("drafts",t.splat,"New draft");return i.a.createElement(v.a,{title:u},i.a.createElement(dn,{type:"drafts",params:t,config:a,errors:n,updated:r,updateBody:c,updatePath:l,updateTitle:o,fieldChanged:s,onClickSave:this.handleClickSave}))}}]),t}(r.Component),cr=Object(s.withRouter)(Object(o.b)((function(e){return{draft:e.drafts.draft,fieldChanged:e.metadata.fieldChanged,errors:e.utils.errors,updated:e.drafts.updated,config:e.config.config}}),(function(e){return Object(h.b)({updateTitle:ba,updateBody:Ca,updatePath:_a,createDraft:Yn,clearErrors:_e},e)}))(ir)),lr=a(289),or=a.n(lr),sr=function(e){function t(){return Object(u.a)(this,t),Object(p.a)(this,Object(f.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(d.a)(t,[{key:"openDropzone",value:function(){this.refs.ReactDropzone.open()}},{key:"render",value:function(){var e=this.props,t=e.files,a=e.splat,n=e.onDrop,r=e.onClickDelete,c=e.onClickItem;return i.a.createElement(or.a,{onDrop:n,ref:"ReactDropzone",className:"dropzone",activeClassName:"dropzone-active",multiple:!0,disableClick:!0},t.length?i.a.createElement("div",{className:"preview-container"},pe.a.map(t,(function(e,t){return i.a.createElement(Kt,{key:t,onClick:c,onClickDelete:r,splat:a,file:e})})),i.a.createElement(Ge,null),i.a.createElement("div",{className:"preview-tip"},i.a.createElement("div",null,"Drag and drop file(s) here to upload"))):i.a.createElement("div",{className:"preview-info"},i.a.createElement(Qe,{name:"upload"}),i.a.createElement("p",null,"Drag and drop file(s) here to upload")))}}]),t}(r.Component),ur=ne.getOverrideMessage,dr=function(e){function t(){var e,a;Object(u.a)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(a=Object(p.a)(this,(e=Object(f.a)(t)).call.apply(e,[this].concat(r)))).openDropzone=function(){a.refs.dropzone.openDropzone()},a}return Object(m.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){var e=this.props;(0,e.fetchStaticFiles)(e.params.splat)}},{key:"componentWillReceiveProps",value:function(e){var t=e.fetchStaticFiles;this.props.params.splat!==e.params.splat&&t(e.params.splat)}},{key:"onDrop",value:function(e){var t=this.props,a=t.uploadStaticFiles,n=t.files,r=t.params,i=function(e,t){if(e&&!e.length||t&&!t.length)return[];var a=pe.a.map(t,(function(e){return Se(e.path)}));return pe.a.chain(e).filter((function(e){return a.includes(e.name)})).map((function(e){return e.name})).value()}(e,n);if(i.length>0&&!window.confirm(ur(i.join(", "))))return!1;a(r.splat,e)}},{key:"renderFilePreviewRow",value:function(e,t){var a=this,n=this.props,r=n.params,c=n.onClickStaticFile,l=n.deleteStaticFile;return i.a.createElement("tr",{key:t},i.a.createElement("td",null,i.a.createElement(sr,{ref:"dropzone",splat:r.splat||"",files:e,onClickItem:c,onClickDelete:l,onDrop:function(e){return a.onDrop(e)}})))}},{key:"renderDirectoryRow",value:function(e,t){var a=e.name,n=e.path,r="".concat("/admin","/staticfiles/").concat(n);return i.a.createElement("tr",{key:t},i.a.createElement("td",{className:"row-title"},i.a.createElement("strong",null,i.a.createElement(s.Link,{to:r},i.a.createElement(Qe,{name:"folder"}),a))))}},{key:"renderRows",value:function(){var e=this,t=this.props.files,a=t.filter((function(e){return"directory"===e.type})),n=t.filter((function(e){return!e.type}));return a.map((function(t,a){return e.renderDirectoryRow(t,a)})).concat(this.renderFilePreviewRow(n,a.length+1))}},{key:"renderTable",value:function(){return i.a.createElement("div",{className:"content-table"},i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,"Directory Contents"))),i.a.createElement("tbody",null,this.renderRows())))}},{key:"render",value:function(){var e=this,t=this.props,a=t.isFetching,n=t.params,r=t.search;if(a)return null;var c="".concat("/admin","/staticfiles/index"),l=Ne("static files",n.splat);return i.a.createElement(v.a,{title:l},i.a.createElement("div",null,i.a.createElement("div",{className:"content-header"},i.a.createElement(Gt,{type:"staticfiles",splat:n.splat}),i.a.createElement("div",{className:"page-buttons multiple"},i.a.createElement(s.Link,{className:"btn btn-view",to:c},"Index Listing"),i.a.createElement(Na,{onClick:function(){return e.openDropzone()},type:"upload",active:!0})),i.a.createElement("div",{className:"pull-right"},i.a.createElement(Qt,{searchBy:"filename",search:r}))),this.renderTable()))}}]),t}(r.Component),pr=Object(o.b)((function(e){return{files:$t(e.staticfiles.files,e.utils.input),isFetching:e.staticfiles.isFetching}}),(function(e){return Object(h.b)({fetchStaticFiles:Zt,uploadStaticFiles:Jt,deleteStaticFile:Xt,search:Ce},e)}))(dr),fr=function(){return i.a.createElement("div",{className:"notfound"},i.a.createElement("img",{src:a(748),alt:"Jekyll Admin"}),i.a.createElement("h1",null,"Huh. It seems that page is Hyde-ing..."),i.a.createElement("h2",null,"The resource you requested was not found."))},mr=i.a.createElement(s.Route,{path:"".concat("/admin"),component:vt},i.a.createElement(s.IndexRoute,{component:Ya}),i.a.createElement(s.Route,{path:"configuration",component:Ma}),i.a.createElement(s.Route,{path:"pages"},i.a.createElement(s.IndexRoute,{component:Ya}),i.a.createElement(s.Route,{path:"(**/)new",component:mn}),i.a.createElement(s.Route,{path:"(**/)*.*",component:un}),i.a.createElement(s.Route,{path:"**",component:Ya})),i.a.createElement(s.Route,{path:"collections"},i.a.createElement(s.Route,{path:":collection_name"},i.a.createElement(s.IndexRoute,{component:vn}),i.a.createElement(s.Route,{path:"(**/)new",component:Tn}),i.a.createElement(s.Route,{path:"(**/)*.*",component:On}),i.a.createElement(s.Route,{path:"**",component:vn}))),i.a.createElement(s.Route,{path:"drafts"},i.a.createElement(s.IndexRoute,{component:Xn}),i.a.createElement(s.Route,{path:"(**/)new",component:cr}),i.a.createElement(s.Route,{path:"(**/)*.*",component:nr}),i.a.createElement(s.Route,{path:"**",component:Xn})),i.a.createElement(s.Route,{path:"datafiles"},i.a.createElement(s.IndexRoute,{component:Pn}),i.a.createElement(s.Route,{path:"(**/)new",component:Gn}),i.a.createElement(s.Route,{path:"(**/)*.*",component:Hn}),i.a.createElement(s.Route,{path:"**",component:Pn})),i.a.createElement(s.Route,{path:"staticfiles"},i.a.createElement(s.IndexRoute,{component:pr}),i.a.createElement(s.Route,{path:"index",component:ta}),i.a.createElement(s.Route,{path:"**",component:pr})),i.a.createElement(s.Route,{path:"".concat("/admin","/*"),component:fr})),hr=(a(290),a(174)),gr=a.n(hr),Er=a(291),vr=a.n(Er),yr=Object(h.c)({routing:c.routerReducer,meta:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{site:{},isFetching:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_SITE_META_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_SITE_META_SUCCESS":return Object(y.a)({},e,{site:t.site,isFetching:!1});case"FETCH_SITE_META_FAILURE":return Object(y.a)({},e,{isFetching:!1});default:return e}},config:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:{},updated:!1,editorChanged:!1,fieldChanged:!1,isFetching:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_CONFIG_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_CONFIG_SUCCESS":return Object(y.a)({},e,{config:t.config,isFetching:!1});case"FETCH_CONFIG_FAILURE":return Object(y.a)({},e,{isFetching:!1});case"PUT_CONFIG_SUCCESS":return Object(y.a)({},e,{config:t.config,editorChanged:!1,updated:!0});case"PUT_CONFIG_FAILURE":return Object(y.a)({},e,{editorChanged:!1});case"CONFIG_EDITOR_CHANGED":return Object(y.a)({},e,{editorChanged:!0,updated:!1});default:return Object(y.a)({},e,{updated:!1,editorChanged:!1})}},pages:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pages:[],page:{},isFetching:!1,updated:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_PAGES_REQUEST":case"FETCH_PAGE_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_PAGES_SUCCESS":return Object(y.a)({},e,{pages:t.pages,isFetching:!1,page:{}});case"FETCH_PAGES_FAILURE":return Object(y.a)({},e,{isFetching:!1,pages:[]});case"FETCH_PAGE_SUCCESS":return Object(y.a)({},e,{page:t.page,isFetching:!1});case"FETCH_PAGE_FAILURE":return Object(y.a)({},e,{page:{},isFetching:!1});case"PUT_PAGE_SUCCESS":return Object(y.a)({},e,{page:t.page,updated:!0});case"DELETE_PAGE_SUCCESS":return Object(y.a)({},e,{pages:be(e.pages,t.id)});default:return Object(y.a)({},e,{updated:!1})}},collections:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{collections:[],entries:[],currentDocument:{},isFetching:!1,updated:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_COLLECTIONS_REQUEST":case"FETCH_COLLECTION_REQUEST":case"FETCH_DOCUMENT_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_COLLECTIONS_SUCCESS":return Object(y.a)({},e,{collections:t.collections,isFetching:!1});case"FETCH_COLLECTION_SUCCESS":return Object(y.a)({},e,{entries:t.entries,isFetching:!1});case"FETCH_DOCUMENT_SUCCESS":return Object(y.a)({},e,{currentDocument:t.doc,isFetching:!1});case"FETCH_COLLECTIONS_FAILURE":return Object(y.a)({},e,{collections:[],isFetching:!1});case"FETCH_COLLECTION_FAILURE":return Object(y.a)({},e,{entries:[],isFetching:!1});case"FETCH_DOCUMENT_FAILURE":return Object(y.a)({},e,{currentDocument:{},isFetching:!1});case"PUT_DOCUMENT_SUCCESS":return Object(y.a)({},e,{currentDocument:t.doc,updated:!0});case"DELETE_DOCUMENT_SUCCESS":return Object(y.a)({},e,{entries:be(e.entries,t.id)});default:return Object(y.a)({},e,{updated:!1})}},metadata:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{metadata:{},new_field_count:1,key_prefix:"",fieldChanged:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_TITLE":return Object(y.a)({},e,{metadata:Object(y.a)({},e.metadata,{title:t.title}),fieldChanged:!0});case"UPDATE_BODY":return Object(y.a)({},e,{metadata:Object(y.a)({},e.metadata,{raw_content:t.body}),fieldChanged:!0});case"UPDATE_PATH":return Object(y.a)({},e,{metadata:Object(y.a)({},e.metadata,{path:t.path}),fieldChanged:!0});case"STORE_CONTENT_FIELDS":return Object(y.a)({},e,{metadata:t.content});case"ADD_METAFIELD":return Object(y.a)({},e,{metadata:Object(Ot.a)(e,t.namePrefix),new_field_count:e.new_field_count+1});case"REMOVE_METAFIELD":return Object(y.a)({},e,{metadata:Object(Ot.f)(e,t.namePrefix,t.key),fieldChanged:!0,key_prefix:"".concat(100*Math.random())});case"UPDATE_FIELD_KEY":return Object(y.a)({},e,{metadata:Object(Ot.g)(e,t.namePrefix,t.fieldKey,t.newKey.trim()),fieldChanged:!0});case"UPDATE_FIELD_VALUE":return Object(y.a)({},e,{metadata:Object(Ot.h)(e,t.nameAttr,t.value),fieldChanged:!0});case"MOVE_ARRAY_ITEM":return Object(y.a)({},e,{metadata:Object(Ot.e)(e,t.namePrefix,t.srcInd,t.targetInd),key_prefix:"".concat(100*Math.random()),fieldChanged:!0});case"CONVERT_FIELD":return Object(y.a)({},e,{metadata:Object(Ot.c)(e,t.nameAttr,t.convertType),new_field_count:e.new_field_count+1,fieldChanged:!0});case"ENABLE_FIELD":return Object(y.a)({},e,{metadata:Object(Ot.h)(e,t.nameAttr,t.value),fieldChanged:!0});default:return Object(y.a)({},e,{fieldChanged:!1})}},drafts:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{drafts:[],draft:{},isFetching:!1,updated:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DRAFTS_REQUEST":case"FETCH_DRAFT_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_DRAFTS_SUCCESS":return Object(y.a)({},e,{drafts:t.drafts,isFetching:!1,draft:{}});case"FETCH_DRAFTS_FAILURE":return Object(y.a)({},e,{isFetching:!1,drafts:[]});case"FETCH_DRAFT_SUCCESS":return Object(y.a)({},e,{draft:t.draft,isFetching:!1});case"FETCH_DRAFT_FAILURE":return Object(y.a)({},e,{draft:{},isFetching:!1});case"PUT_DRAFT_SUCCESS":return Object(y.a)({},e,{draft:t.draft,updated:!0});case"DELETE_DRAFT_SUCCESS":return Object(y.a)({},e,{drafts:be(e.drafts,t.id)});default:return Object(y.a)({},e,{updated:!1})}},datafiles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{files:[],currentFile:{},isFetching:!1,updated:!1,datafileChanged:!1,fieldChanged:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DATAFILES_REQUEST":case"FETCH_DATAFILE_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_DATAFILES_SUCCESS":return Object(y.a)({},e,{files:t.files,isFetching:!1,currentFile:{}});case"FETCH_DATAFILES_FAILURE":return Object(y.a)({},e,{isFetching:!1,currentFile:{}});case"FETCH_DATAFILE_SUCCESS":return Object(y.a)({},e,{currentFile:t.file,isFetching:!1});case"FETCH_DATAFILE_FAILURE":return Object(y.a)({},e,{currentFile:{},isFetching:!1});case"PUT_DATAFILE_SUCCESS":return Object(y.a)({},e,{currentFile:t.file,updated:!0,datafileChanged:!1});case"PUT_DATAFILE_FAILURE":return Object(y.a)({},e,{datafileChanged:!1});case"DELETE_DATAFILE_SUCCESS":return Object(y.a)({},e,{files:be(e.files,t.id)});case"DATAFILE_CHANGED":return Object(y.a)({},e,{datafileChanged:!0,updated:!1});default:return Object(y.a)({},e,{updated:!1,datafileChanged:!1})}},staticfiles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{files:[],isFetching:!1,uploading:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_STATICFILES_REQUEST":return Object(y.a)({},e,{isFetching:!0});case"FETCH_STATICFILES_SUCCESS":return Object(y.a)({},e,{files:t.files,isFetching:!1});case"FETCH_STATICFILES_FAILURE":return Object(y.a)({},e,{isFetching:!1});case"PUT_STATICFILE_REQUEST":return Object(y.a)({},e,{uploading:!0});case"PUT_STATICFILE_SUCCESS":case"PUT_STATICFILE_FAILURE":return Object(y.a)({},e,{uploading:!1});case"DELETE_STATICFILE_SUCCESS":return Object(y.a)({},e,{files:be(e.files,t.id)});default:return e}},utils:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{input:"",errors:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SEARCH_CONTENT":return Object(y.a)({},e,{input:t.input});case"CLEAR_ERRORS":return Object(y.a)({},e,{errors:[]});case"VALIDATION_ERROR":return Object(y.a)({},e,{errors:t.errors});default:return Object(y.a)({},e,{input:""})}},notifications:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{notification:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NOTIFICATION":return Object(y.a)({},e,{notification:t.notification});default:return e}}}),br=(vr()(),function(e){var t=[gr.a];return Object(h.e)(yr,e,Object(h.d)(h.a.apply(void 0,t)))}),Cr=(a(752),br()),_r=Object(c.syncHistoryWithStore)(s.browserHistory,Cr);Object(l.render)(i.a.createElement(o.a,{store:Cr},i.a.createElement(s.Router,{history:_r,routes:mr},i.a.createElement(s.Redirect,{from:"".concat("/admin","/"),to:"".concat("/admin","/pages/")}))),document.getElementById("root"))}},[[294,1,2]]]); -//# sourceMappingURL=main.a0831f44.chunk.js.map \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/main.a0831f44.chunk.js.map b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/main.a0831f44.chunk.js.map deleted file mode 100644 index 4d8da1a6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/main.a0831f44.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["utils/metadata.js","assets/images/logo-black-red.png","constants/api.js","ducks/notifications.js","utils/apiErrors.js","translations/en.js","translations/index.js","utils/fetch.js","utils/validation.js","ducks/utils.js","utils/helpers.js","ducks/config.js","constants/keyboardShortcuts.js","components/Splitter.js","components/Icon.js","components/Accordion.js","ducks/collections.js","containers/Sidebar.js","constants/index.js","containers/Header.js","containers/Notifications.js","containers/App.js","components/metadata/statics/StaticMetaSimple.js","components/metadata/statics/StaticMetaObjectItem.js","components/metadata/statics/StaticMetaObject.js","components/metadata/statics/StaticMetaArrayItem.js","components/metadata/statics/StaticMetaArray.js","components/metadata/StaticMetaButton.js","components/metadata/statics/StaticMetaField.js","components/FilePreview.js","components/Breadcrumbs.js","components/form/InputSearch.js","ducks/staticfiles.js","containers/views/StaticIndex.js","components/FilePicker.js","components/metadata/MetaTags.js","components/metadata/MetaSimple.js","components/metadata/MetaButtons.js","components/metadata/MetaObjectItem.js","components/metadata/MetaObject.js","components/metadata/MetaArrayItem.js","components/metadata/MetaArray.js","components/metadata/MetaField.js","ducks/metadata.js","ducks/siteMeta.js","containers/MetaFields.js","components/DataGUI.js","components/Editor.js","components/Errors.js","components/Button.js","containers/views/Configuration.js","components/Explorer.js","ducks/pages.js","containers/views/Pages.js","components/form/InputPath.js","components/form/InputTitle.js","utils/highlighter.js","components/MarkdownEditor.js","components/MarkdownPageBody.js","containers/views/PageEdit.js","components/CreateMarkdownPage.js","containers/views/PageNew.js","containers/views/Documents.js","containers/views/DocumentEdit.js","containers/views/DocumentNew.js","ducks/datafiles.js","containers/views/DataFiles.js","containers/views/DataFileEdit.js","containers/views/DataFileNew.js","ducks/drafts.js","containers/views/Drafts.js","containers/views/DraftEdit.js","containers/views/DraftNew.js","components/Dropzone.js","containers/views/StaticFiles.js","containers/views/NotFound.js","routes.js","ducks/index.js","store.js","index.js"],"names":["addFieldToMetadata","state","namePrefix","tmpState","cloneDeep","field","eval","undefined","_","isArray","push","new_field_count","metadata","removeFieldFromMetadata","key","length","splice","has","updateMetadataFieldKey","fieldKey","newKey","Object","keys","reduce","result","current","updateMetadataFieldValue","nameAttr","value","convertMetadataField","convertType","moveMetadataArrayItem","srcInd","targetInd","arr","injectDefaultFields","config","path","type","defaults","front_matter","content","e","metafields","each","scope","extend","values","computeFieldType","specialKeys","includes","isObject","module","exports","API","putConfigurationUrl","pagesAPIUrl","directory","pageAPIUrl","filename","draftsAPIUrl","draftAPIUrl","collectionAPIUrl","collection_name","documentAPIUrl","datafilesAPIUrl","datafileAPIUrl","staticfilesAPIUrl","staticfileAPIUrl","addNotification","title","message","level","notification","BadInputError","name","stack","Error","getDeleteMessage","getLeaveMessage","getNotFoundMessage","getOverrideMessage","getParserErrorMessage","getSuccessMessage","getErrorMessage","getUploadSuccessMessage","getUploadErrorMessage","getFetchErrorMessage","getUpdateErrorMessage","getDeleteErrorMessage","getPublishDraftMessage","draftPath","postPath","getTitleRequiredMessage","getFilenameRequiredMessage","getContentRequiredMessage","getFilenameNotValidMessage","sidebar","pages","posts","drafts","datafiles","collections","staticfiles","configuration","labels","save","label","triggeredLabel","create","delete","publish","view","upload","viewToggle","translations","en","get","url","action_success","action_failure","dispatch","fetch","credentials","then","res","json","data","catch","error","put","body","method","error_message","del","id","DATE_FILENAME_MATCHER","FILENAME_MATCHER","validatePage","validator","validations","messages","errorMessages","validationStr","list","validationArr","split","single","test","validated","filterBySearchInput","input","filter","p","toLowerCase","filterDeleted","item","relative_path","search","clearErrors","validationError","errors","toYAML","obj","isEmpty","yaml","safeDump","indent","capitalize","string","charAt","toUpperCase","substring","toTitleCase","replace","txt","substr","slugify","a","RegExp","join","toString","c","indexOf","getFilenameFromPath","lastIndexOf","getExtensionFromPath","index","preventDefault","event","trimObject","object","acc","trim","JSON","parse","Array","getDocumentTitle","splat","prefix","Boolean","computeRelativePath","sanitizeFrontMatter","omit","preparePayload","stringify","fetchConfig","putConfig","source","getState","payload","raw_content","validateConfig","onEditorChange","Splitter","className","Icon","aria-hidden","Accordion","collapsed","handleClick","setState","this","props","counter","count","icon","minHeight","children","accordionClasses","classnames","panelHeight","style","maxHeight","onClick","renderIndicator","Component","defaultProps","fetchCollections","fetchCollection","collection","fetchDocument","createDocument","date","validateDocument","generateFilenameFromTitle","putDocument","deleteDocument","slugifiedTitle","docDate","moment","format","SidebarTranslations","Sidebar","hiddens","collectionItems","map","col","i","activeClassName","to","sidebar_label","itemsCount","hiddenLinks","link","translation","splitterBefore","defaultLinks","jekyll_admin","hidden_links","visibleLinks","difference","links","collectionsPanel","renderCollections","postsPanel","draftsPanel","show_drafts","connect","bindActionCreators","Header","target","process","Notifications","elementStyles","Containers","DefaultStyle","padding","width","textAlign","Title","fontSize","color","NotificationItem","margin","borderRadius","transition","success","backgroundColor","warning","info","Dismiss","top","right","height","border","opacity","notificationSystem","refs","nextProps","position","autoDismiss","ref","notifications","App","updated","prevProps","isFetching","homepage","router","currentPathname","getCurrentLocation","pathname","concat","keyMap","keyboardShortcuts","StaticMetaSimple","fieldValue","disabled","FieldTypes","array","StaticMetaArray","StaticMetaObject","simple","StaticMetaObjectItem","CurrentComponent","items","StaticMetaArrayItem","StaticMetaButton","dropdown","toggleDropdownState","onEnableField","dropdownClasses","tabIndex","onBlur","onMouseDown","StaticMetaField","enableField","FilePreview","onClickDelete","window","confirm","file","from_theme","handleClickDelete","node","isImageFile","src","http_url","alt","nodeLink","href","rel","renderFileOverlay","extname","Breadcrumbs","base","nodes","paths","before","slice","InputSearch","handleKeyPress","searchBy","onKeyPress","placeholder","fetchStaticFiles","uploadStaticFiles","files","reader","FileReader","readAsDataURL","onloadend","encoded_content","deleteStaticFile","filterByFilename","f","StaticIndex","onClickStaticFile","modalView","renderDirectoryListingBtn","renderPreviewNode","utils","FilePicker","showModal","customStyles","overlay","zIndex","paddingTop","paddingRight","paddingLeft","openModal","shutModal","onPickItem","onPick","isOpen","contentLabel","onRequestClose","MetaTags","creators","handleKeyUp","pageTags","createTag","deleteTag","handleOnChange","tagInput","showSuggestions","autoSuggest","closeSuggestions","rectifyTag","tag","rectified","updateFieldValue","clone","tagName","pop","taginput","focus","suggestions","entry","startsWith","tags","suggests","suggestionClasses","visible","onChange","onFocus","onKeyUp","hidden","momentLocalizer","MetaSimple","handleEditableChange","handleDatepickerChange","dateStr","handleEditableBlur","imagepicker","handleLayoutChange","dateValue","Date","siteMeta","renderEditable","layouts","defaultValue","renderDatepicker","renderStaticFilePicker","renderTagsInput","renderLayoutPicker","MetaButtons","fieldTypes","fieldTypeKeys","onConvertClick","parentKey","ftype","currentType","parentType","onRemoveClick","isDefaultField","sortableHandle","renderDropdownItems","MetaObjectItem","convertField","updateFieldKey","currentValue","findDOMNode","field_key","removeField","addField","key_prefix","moveArrayItem","MetaArray","MetaObject","handleKeyBlur","handleConvertClick","handleRemoveClick","MetaArrayItem","data-id","component","options","draggable","group","pull","handle","animation","onEnd","getAttribute","newIndex","Sortable","sortableGroupDecorator","bind","MetaField","select","isInDefaultState","storeContentFields","updateTitle","updateBody","updatePath","fetchSiteMeta","MetaFields","fields","dataview","isEqual","site","staticFields","visibleKeys","metafieldsClass","datafields","defaultFieldsNotOverwritten","hasOwnProperty","newWrapper","meta","DataGUI","handleChange","slug","ext","restricted","renderPathFields","Editor","editorChanged","nextState","ace","editor","getValue","mode","theme","showGutter","showPrintMargin","highlightActiveLine","scrollMargin","Errors","iconMap","Button","active","triggered","block","thin","btnClass","iconName","iconNode","Configuration","guiView","routerWillLeave","nextLocation","fieldChanged","toggleView","handleClickSave","route","setRouteLeaveHook","keyboardHandlers","handlers","renderContentBody","withRouter","Explorer","deleteItem","params","dir","browserHistory","renderTitleCell","renderDirectoryRow","renderFileRow","newBtnLabel","typeLabel","renderRows","fetchPages","fetchPage","createPage","putPage","deletePage","Pages","InputFilename","tooltip","InputTitle","hljs","registerLanguage","require","classNames","MarkdownEditor","_replaceSelectedText","cm","headNTail","startPoint","getCursor","endPoint","text","getSelection","head","tail","replaceSelection","ch","setSelection","handleFilePick","codemirror","insertTexts","image","initialValue","destroy","onSave","opts","codeSyntaxHighlighting","toolbarIcons","action","filepicker","trigger","click","SimpleMDE","on","elementToRemove","container","querySelector","remove","display","MarkdownPageBody","staticmetafields","PageEdit","new_path","page","front_matter_defaults","document_title","CreateMarkdownPage","onClickSave","metaType","defaultFields","PageNew","Documents","doc","modified_time","documents","renderTable","entries","DocumentEdit","currentDocument","DocumentNew","fetchDataFiles","fetchDataFile","putDataFile","validateDatafile","deleteDataFile","onDataFileChanged","DataFiles","DataFileEdit","datafileChanged","datafile","data_dir","gui","filepath","inputpath","data_path","guiSupport","renderAside","currentFile","DataFileNew","fetchDrafts","fetchDraft","createDraft","putDraft","deleteDraft","publishDraft","Drafts","DraftEdit","draft","today","datedfilename","goTo","handleClickPublish","DraftNew","Dropzone","ReactDropzone","open","onDrop","onClickItem","multiple","disableClick","StaticFiles","openDropzone","dropzone","uploadedFiles","existingFiles","currentFiles","currentFilenames","cf","chain","existingUploadedFilenames","static_files","dirs","entity","renderFilePreviewRow","NotFound","combineReducers","routing","routerReducer","Math","random","uploading","configureStore","createLogger","initialState","middlewares","thunk","createStore","rootReducer","compose","applyMiddleware","store","history","syncHistoryWithStore","render","routes","from","document","getElementById"],"mappings":"q5CAUaA,mBAAqB,SAArBA,mBAAsBC,MAAOC,YACxC,IAAIC,SAAWC,wDAAUH,OACrBI,MAAQC,KAAK,YAAD,OAAaJ,aAC7B,YAAcK,IAAVF,QACAG,kDAAEC,QAAQJ,OAAQA,MAAMK,KAAK,IAC5BL,MAAM,aAAD,OAAcJ,MAAMU,kBAAqB,IAFnBR,SAASS,UAc9BC,wBAA0B,SAA1BA,wBAA2BZ,MAAOC,WAAYY,KACzD,IAAIX,SAAWC,wDAAUH,OACrBI,MAAQC,KAAK,YAAD,OAAaJ,aAC7B,QAAcK,IAAVF,MAAqB,OAAOF,SAASS,SACzC,GAAIJ,kDAAEC,QAAQJ,OAAQ,CACpB,GAAIS,KAAOT,MAAMU,OACf,OAAOZ,SAASS,SAElBP,MAAMW,OAAOF,IAAK,OACb,CACL,IAAKN,kDAAES,IAAIZ,MAAOS,KAChB,OAAOX,SAASS,gBAEXP,MAAMS,KAEf,OAAOX,SAASS,UAaLM,uBAAyB,SAAzBA,uBAA0BjB,MAAOC,WAAYiB,SAAUC,QAClE,IAAIjB,SAAWC,wDAAUH,OACrBI,MAAQC,KAAK,YAAD,OAAaJ,aAC7B,YAAcK,IAAVF,OACAG,kDAAES,IAAIZ,MAAOe,UACjBf,MAAQgB,OAAOC,KAAKjB,OAAOkB,QAAO,SAACC,EAAQC,GAGzC,OAFIA,IAAYN,SAAUK,EAAOJ,QAAUf,MAAMoB,GAC5CD,EAAOC,GAAWpB,MAAMoB,GACtBD,IACN,IACHlB,KAAK,YAAD,OAAaJ,WAAb,cAP4BC,SAASS,UAmB9Bc,yBAA2B,SAA3BA,yBAA4BzB,MAAO0B,SAAUC,OACx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C,YACLC,GACAJ,EACAK,YAAQC,IAAe,WAAf,EAAmBL,OCHzBM,I,OAAQT,MACRU,GAAUC,+BAAqBpJ,iBAAgBkJ,IAErDG,iBACE,kBAAC,IAAD,CAAUH,MAAOA,IACf,kBAAC,SAAD,CAAQC,QAASA,GAASG,OAAQA,IAChC,kBAAC,WAAD,CAAUC,KAAI,U7DjBQ,S6DiBR,KAAsBxc,GAAE,U7DjBhB,S6DiBgB,eAG1Cyc,SAASC,eAAe,W","file":"static/js/main.a0831f44.chunk.js","sourcesContent":["import _ from 'underscore';\nimport cloneDeep from 'lodash/cloneDeep';\n\n/**\n * Returns the metadata of the state with the new empty field. If the field does\n * not exist, returns the original metadata. Does not mutate the given state.\n * @param {Object} state\n * @param {String} namePrefix\n * @return {Object} metadata\n */\nexport const addFieldToMetadata = (state, namePrefix) => {\n let tmpState = cloneDeep(state);\n let field = eval(`tmpState.${namePrefix}`);\n if (field === undefined) return tmpState.metadata;\n if (_.isArray(field)) field.push('');\n else field[`New field ${state.new_field_count}`] = '';\n return tmpState.metadata;\n};\n\n/**\n * Returns the metadata of the state with the removed key. If the field does not\n * exist, returns the original metadata. Does not mutate the given state.\n * @param {Object} state\n * @param {String} namePrefix\n * @param {String} key\n * @return {Object} metadata\n */\nexport const removeFieldFromMetadata = (state, namePrefix, key) => {\n let tmpState = cloneDeep(state);\n let field = eval(`tmpState.${namePrefix}`);\n if (field === undefined) return tmpState.metadata;\n if (_.isArray(field)) {\n if (key >= field.length) {\n return tmpState.metadata;\n }\n field.splice(key, 1);\n } else {\n if (!_.has(field, key)) {\n return tmpState.metadata;\n }\n delete field[key];\n }\n return tmpState.metadata;\n};\n\n/**\n * Returns the metadata of the state with the updated key. If the field does not\n * exist or the key already exists, returns the original metadata. Does not\n * mutate the given state.\n * @param {Object} state\n * @param {String} namePrefix\n * @param {String} fieldKey\n * @param {String} newKey\n * @return {Object} metadata\n */\nexport const updateMetadataFieldKey = (state, namePrefix, fieldKey, newKey) => {\n let tmpState = cloneDeep(state);\n let field = eval(`tmpState.${namePrefix}`);\n if (field === undefined) return tmpState.metadata;\n if (_.has(field, newKey)) return tmpState.metadata;\n field = Object.keys(field).reduce((result, current) => {\n if (current === fieldKey) result[newKey] = field[current];\n else result[current] = field[current];\n return result;\n }, {});\n eval(`tmpState.${namePrefix} = field`);\n return tmpState.metadata;\n};\n\n/**\n * Returns the metadata of the state with the updated value of given path(nameAttr).\n * If the field does not exist, creates a new field. Does not mutate the given state.\n * @param {Object} state\n * @param {String} nameAttr\n * @param {String} value\n * @return {Object} metadata\n */\nexport const updateMetadataFieldValue = (state, nameAttr, value) => {\n let tmpState = cloneDeep(state);\n eval(`tmpState.${nameAttr} = value`);\n return tmpState.metadata;\n};\n\n/**\n * Returns the metadata of the state with the converted type of given path(nameAttr).\n * If the field does not exist, returns the original metadata.\n * Does not mutate the given state.\n * @param {Object} state\n * @param {String} nameAttr\n * @param {String} convertType\n * @return {Object} metadata\n */\nexport const convertMetadataField = (state, nameAttr, convertType) => {\n let tmpState = cloneDeep(state);\n let field = eval(`tmpState.${nameAttr}`);\n if (field === undefined) return tmpState.metadata;\n if (convertType === 'array') field = [''];\n else if (convertType === 'object') {\n let key = `New field ${state.new_field_count}`;\n field = { [key]: '' };\n } else field = '';\n eval(`tmpState.${nameAttr} = field`);\n return tmpState.metadata;\n};\n\n/**\n * Returns the metadata of the state with the sorted array. Moves the array item to\n * target index, shifts the rest of them. If the given path is not an array,\n * returns the original metadata. Does not mutate the given state.\n * @param {Object} state\n * @param {String} namePrefix\n * @param {Number} srcInd\n * @param {Number} targetInd\n * @return {Object} metadata\n */\nexport const moveMetadataArrayItem = (state, namePrefix, srcInd, targetInd) => {\n let tmpState = cloneDeep(state);\n let arr = eval(`tmpState.${namePrefix}`);\n if (!_.isArray(arr)) return tmpState.metadata;\n arr.splice(targetInd, 0, arr.splice(srcInd, 1)[0]);\n return tmpState.metadata;\n};\n\n/**\n * Injects the relevant default front matter fields read from the config file into\n * the provided front matter object\n * @param {Object} config\n * @param {String} path\n * @param {String} type\n * @param {Object} front_matter\n * @return {Object} metadata\n */\nexport const injectDefaultFields = (config, path, type, front_matter = {}) => {\n let defaults;\n try {\n defaults = config.content.defaults;\n } catch (e) {\n return {};\n }\n let metafields = {};\n _.each(defaults, field => {\n const scope = field.scope;\n if (\n (!scope.type || scope.type === type) &&\n (!scope.path || scope.path === path)\n ) {\n _.extend(metafields, field.values);\n }\n });\n return _.extend(metafields, front_matter);\n};\n\n/**\n * Given a field-value and corresponding key, this utility returns\n * metadata type for the pair.\n * @param {*} value\n * @param {String} key\n * @return {String} type\n */\nexport const computeFieldType = (value, key = null) => {\n let type = 'simple';\n const specialKeys = ['tags', 'categories'];\n if (specialKeys.includes(key) && _.isArray(value)) return type;\n\n if (_.isObject(value)) type = 'object';\n if (_.isArray(value)) type = 'array';\n return type;\n};\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAB5CAYAAACDSRyFAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA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Yp6lK7yqGMc17Y+8rhVGQnzf4gzUR6oa4kz0xlqLbRkv6BNVxmqF0RDfl2iP6giqEvbHHRYbz5fhyYyutNeGQHynwLv/vhobaEf8ZT1QAcKx1EgI6CXjw6bctD9+gfnNzzD0x8f4wnKj8hp8ik6ohMynHYJhkCTFGIxX8RBeQE/8hBWQABswEB1REZlNOwbiW422/ibgCvw3H/GfZVjIAlHmvUr5TTsPCXh1Nj50tkO5qzbORU8shFgownd4HCeiOrZNWgN0wbfYCLG0BD/jBZyKmtCy20PGALN7wm8lDxQ8BfSbxcMAxxzLBIz38YdvFq85D5byZxcJeF0DSdIR/4iqohUOQQdfe5yMQ9BSn6JyuobYHx1xEbrgFlyB83Ec2uoEes7uz7wORPQjq+EZtPacwIfKJH7v0AKJragAfSBJbkBG0jRNewOSZBquClnr1g7Pwry85UpkNE3TtEuwCZKkFEPRE0/jBXyKmRDDLOwDTdO0rFQPL6IEYmkBumObpGmaVoCL0BujsQTrsBYL8DtewXHI+/4ftS4BbH1NbcMAAAAASUVORK5CYII=\"","export const API =\n process.env.NODE_ENV === 'production'\n ? '/_api'\n : 'http://localhost:4000/_api';\n\nexport const getSiteMetaUrl = () => `${API}/site_meta`;\n\nexport const getConfigurationUrl = () => `${API}/configuration`;\nexport const putConfigurationUrl = () => `${API}/configuration`;\n\nexport const pagesAPIUrl = (directory = '') => `${API}/pages/${directory}`;\nexport const pageAPIUrl = (directory, filename) =>\n directory\n ? `${API}/pages/${directory}/${filename}`\n : `${API}/pages/${filename}`;\n\nexport const draftsAPIUrl = (directory = '') => `${API}/drafts/${directory}`;\nexport const draftAPIUrl = (directory, filename) =>\n directory\n ? `${API}/drafts/${directory}/${filename}`\n : `${API}/drafts/${filename}`;\n\nexport const collectionsAPIUrl = () => `${API}/collections`;\nexport const collectionAPIUrl = (collection_name, directory) =>\n directory\n ? `${API}/collections/${collection_name}/entries/${directory}`\n : `${API}/collections/${collection_name}/entries`;\nexport const documentAPIUrl = (collection_name, directory, filename) =>\n directory\n ? `${API}/collections/${collection_name}/${directory}/${filename}`\n : `${API}/collections/${collection_name}/${filename}`;\n\nexport const datafilesAPIUrl = (directory = '') => `${API}/data/${directory}`;\nexport const datafileAPIUrl = (directory, filename) =>\n directory\n ? `${API}/data/${directory}/${filename}`\n : `${API}/data/${filename}`;\n\nexport const staticfilesAPIUrl = (directory = '') =>\n `${API}/static_files/${directory}`;\nexport const staticfileAPIUrl = (directory, filename) =>\n directory\n ? `${API}/static_files/${directory}/${filename}`\n : `${API}/static_files/${filename}`;\n","// Action Types\nexport const ADD_NOTIFICATION = 'ADD_NOTIFICATION';\n\n// Actions\nexport const addNotification = (title, message, level) => ({\n type: ADD_NOTIFICATION,\n notification: {\n title,\n message,\n level,\n },\n});\n\n// Reducer\nexport default function notifications(\n state = {\n notification: {},\n },\n action\n) {\n switch (action.type) {\n case ADD_NOTIFICATION:\n return {\n ...state,\n notification: action.notification,\n };\n default:\n return state;\n }\n}\n","export class BadInputError extends Error {\n constructor(message) {\n super();\n this.name = 'BadInputError';\n this.message = message || 'Bad input';\n this.stack = new Error().stack;\n }\n}\n","// inline messages\nexport const getDeleteMessage = filename =>\n `Are you sure that you want to delete \"${filename}\" ?`;\n\nexport const getLeaveMessage = () =>\n 'You have unsaved changes on this page. Are you sure you want to leave?';\n\nexport const getNotFoundMessage = type => `No ${type} found.`;\n\nexport const getOverrideMessage = filename =>\n `${filename} will be overwritten. Continue anyway?`;\n\n// notification messages\nexport const getParserErrorMessage = () => 'Parse Error';\n\nexport const getSuccessMessage = () => 'Success';\n\nexport const getErrorMessage = () => 'Error';\n\nexport const getUploadSuccessMessage = filename =>\n `${filename} uploaded successfully`;\n\nexport const getUploadErrorMessage = () => `Error occurred uploading the file.`;\n\nexport const getFetchErrorMessage = filename =>\n `Could not fetch the ${filename}`;\n\nexport const getUpdateErrorMessage = filename =>\n `Could not update the ${filename}`;\n\nexport const getDeleteErrorMessage = filename =>\n `Could not delete the ${filename}`;\n\nexport const getPublishDraftMessage = (draftPath, postPath) =>\n `'${draftPath}' will be converted to '${postPath}'`;\n\n// validation messages\nexport const getTitleRequiredMessage = () => 'The title is required.';\n\nexport const getFilenameRequiredMessage = () => 'The filename is required.';\n\nexport const getContentRequiredMessage = () => 'The content is required.';\n\nexport const getFilenameNotValidMessage = () => 'The filename is not valid.';\n\n// sidebar titles\nexport const sidebar = {\n pages: 'Pages',\n posts: 'Posts',\n drafts: 'Drafts',\n datafiles: 'Data Files',\n collections: 'Collections',\n staticfiles: 'Static Files',\n configuration: 'Configuration',\n};\n\n// button labels\nexport const labels = {\n save: {\n label: 'Save',\n triggeredLabel: 'Saved',\n },\n create: {\n label: 'Create',\n triggeredLabel: 'Created',\n },\n delete: {\n label: 'Delete',\n },\n publish: {\n label: 'Publish',\n },\n view: {\n label: 'View',\n },\n upload: {\n label: 'Upload files',\n },\n viewToggle: {\n label: 'Switch View to GUI Editor',\n triggeredLabel: 'Switch View to Raw Editor',\n },\n};\n","// TODO:\n// -------------------------------\n// import * as da from './da';\n// import * as es from './es';\n// import * as fr from './fr';\n// import * as ptBr from './ptBr';\n// import * as sv from './sv';\n\nimport * as en from './en';\n\nconst translations = en; // TODO: select language\nexport default translations;\n","import fetch from 'isomorphic-fetch';\nimport { addNotification } from '../ducks/notifications';\nimport { BadInputError } from './apiErrors';\n\nimport translations from '../translations';\nconst {\n getErrorMessage,\n getFetchErrorMessage,\n getUpdateErrorMessage,\n getDeleteErrorMessage,\n} = translations;\n\n/**\n * Fetch wrapper for GET request that dispatches actions according to the\n * request status\n * @param {String} url\n * @param {Object} action_success\n * @param {Object} action_failure\n * @return {Function} dispatch\n */\nexport const get = (url, action_success, action_failure, dispatch) => {\n return fetch(url, { credentials: 'same-origin' })\n .then(res => res.json())\n .then(data =>\n dispatch({\n type: action_success.type,\n [action_success.name]: data,\n })\n )\n .catch(error => {\n dispatch({\n type: action_failure.type,\n [action_failure.name]: error,\n });\n dispatch(\n addNotification(\n getErrorMessage(),\n getFetchErrorMessage(action_success.name),\n 'error'\n )\n );\n });\n};\n\n/**\n * Fetch wrapper for PUT request that dispatches actions according to the\n * request status\n * @param {String} url\n * @param {Object} body\n * @param {Object} action_success\n * @param {Object} action_failure\n * @return {Function} dispatch\n */\nexport const put = (url, body, action_success, action_failure, dispatch) => {\n return fetch(url, {\n method: 'PUT',\n credentials: 'same-origin',\n body,\n })\n .then(res => res.json())\n .then(data => {\n if (data.error_message) {\n throw new BadInputError(data.error_message);\n }\n dispatch({\n type: action_success.type,\n [action_success.name]: data,\n });\n })\n .catch(error => {\n dispatch({\n type: action_failure.type,\n [action_failure.name]: error,\n });\n let error_message =\n error.name === 'BadInputError'\n ? error.message\n : getUpdateErrorMessage(action_success.name);\n dispatch(addNotification(getErrorMessage(), error_message, 'error'));\n });\n};\n\n/**\n * Fetch wrapper for DELETE request that dispatches actions according to the\n * request status\n * @param {String} url\n * @param {Object} action_success\n * @param {Object} action_failure\n * @return {Function} dispatch\n */\nexport const del = (url, action_success, action_failure, dispatch) => {\n return fetch(url, {\n method: 'DELETE',\n credentials: 'same-origin',\n })\n .then(data =>\n dispatch({\n type: action_success.type,\n id: action_success.id,\n })\n )\n .catch(error => {\n dispatch({\n type: action_failure.type,\n [action_failure.name]: error,\n });\n dispatch(\n addNotification(\n getErrorMessage(),\n getDeleteErrorMessage(action_success.name),\n 'error'\n )\n );\n });\n};\n","import _ from 'underscore';\n\nimport translations from '../translations';\nconst { getTitleRequiredMessage, getFilenameNotValidMessage } = translations;\n\nconst DATE_FILENAME_MATCHER = /^(?:.+\\/)*(\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]))-(.*)(\\.[^.]+)$/;\nconst FILENAME_MATCHER = /^(.*)(\\.[^.]+)$/;\n\nconst validated = (field, single) => {\n switch (single) {\n case 'required':\n return !!field;\n case 'date':\n return DATE_FILENAME_MATCHER.test(field);\n case 'filename':\n return FILENAME_MATCHER.test(field);\n default:\n return false;\n }\n};\n\nexport const validatePage = metadata => {\n return validator(\n metadata,\n { path: 'required|filename' },\n {\n 'path.required': getTitleRequiredMessage(),\n 'path.filename': getFilenameNotValidMessage(),\n }\n );\n};\n\n/**\n * Returns error messages if the given values does not pass the provided validations.\n * @param {Object} values\n * @param {Object} validations\n * @param {Object} messages\n * @return {Array} errorMessages\n */\nexport const validator = (values, validations, messages) => {\n let errorMessages = [];\n _.each(validations, (validationStr, field, list) => {\n const validationArr = validationStr.split('|');\n _.each(validationArr, single => {\n if (!validated(values[field], single)) {\n errorMessages.push(messages[`${field}.${single}`]);\n }\n });\n });\n return errorMessages;\n};\n","// Selectors\nexport const filterBySearchInput = (list, input) => {\n if (!input) {\n return list;\n }\n return list.filter(p => p.name.toLowerCase().includes(input.toLowerCase()));\n};\n\nexport const filterDeleted = (list, id) => {\n return list.filter(item => item.relative_path !== id);\n};\n\n// Action Types\nexport const SEARCH_CONTENT = 'SEARCH_CONTENT';\nexport const CLEAR_ERRORS = 'CLEAR_ERRORS';\nexport const VALIDATION_ERROR = 'VALIDATION_ERROR';\n\n// Actions\nexport const search = input => ({\n type: SEARCH_CONTENT,\n input,\n});\n\nexport const clearErrors = () => ({\n type: CLEAR_ERRORS,\n});\n\nexport const validationError = errors => ({\n type: VALIDATION_ERROR,\n errors,\n});\n\n// Reducer\nexport default function utils(\n state = {\n input: '',\n errors: [],\n },\n action\n) {\n switch (action.type) {\n case SEARCH_CONTENT:\n return {\n ...state,\n input: action.input,\n };\n case CLEAR_ERRORS:\n return {\n ...state,\n errors: [],\n };\n case VALIDATION_ERROR:\n return {\n ...state,\n errors: action.errors,\n };\n default:\n return {\n ...state,\n input: '',\n };\n }\n}\n","import yaml from 'js-yaml';\nimport _ from 'underscore';\n\n/**\n * Converts the object into YAML string.\n * @param {Object} object\n * @return {String} yaml\n */\nexport const toYAML = obj =>\n !_.isEmpty(obj) ? yaml.safeDump(obj, { indent: 2 }) : '';\n\n/**\n * Converts the YAML string into JS object.\n * @param {String} string\n * @return {Object} obj\n */\nexport const toJSON = yamlString => (yamlString ? yaml.load(yamlString) : {});\n\n/**\n * Capitalize the given string.\n * @param {String} string\n * @return {String} string\n */\nexport const capitalize = string => {\n if (!string) return '';\n return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase();\n};\n\n/**\n * Convert the given string into title case format.\n * @param {String} string\n * @return {String} string\n */\nexport const toTitleCase = string => {\n if (!string) return '';\n return string.replace(/\\w\\S*/g, txt => {\n return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\n });\n};\n\n/**\n * Slugify the given string\n * @param {String} string\n * @return {String} string\n */\nexport const slugify = string => {\n if (!string) return '';\n const a = 'àáäâèéëêìíïîıòóöôùúüûñçşßÿœæŕśńṕẃǵğǹḿǘẍźḧ·/_,:;';\n const b = 'aaaaeeeeiiiiioooouuuuncssyoarsnpwggnmuxzh------';\n const p = new RegExp(a.split('').join('|'), 'g');\n\n return string\n .toString()\n .toLowerCase()\n .replace(/\\s+/g, '-') // Replace spaces with -\n .replace(p, c => b.charAt(a.indexOf(c))) // Replace special chars\n .replace(/&/g, '-') // Replace & with 'and'\n .replace(/[^\\w-]+/g, '') // Remove all non-word chars\n .replace(/-+/g, '-') // Replace multiple - with single -\n .replace(/^-+/, '') // Trim - from start of text\n .replace(/-+$/, ''); // Trim - from end of text\n};\n\n/**\n * Returns filename from the given path\n * @param {String} path\n * @return {String} filename\n */\nexport const getFilenameFromPath = path => {\n if (!path) return '';\n return path.substring(path.lastIndexOf('/') + 1);\n};\n\n/**\n * Returns extension from the given path or filename\n * @param {String} path or filename\n * @return {String} extension or nil\n */\nexport const getExtensionFromPath = path => {\n if (!path) return '';\n const filename = getFilenameFromPath(path);\n const index = filename.lastIndexOf('.');\n\n if (index > 0) {\n return filename.substring(index + 1);\n } else {\n return '';\n }\n};\n\n/**\n * returns the uploaded static files that are being overwritten\n * @param {Array} uploadedFiles\n * @param {Array} currentFiles\n * @return {Array} filenames\n */\nexport const existingUploadedFilenames = (uploadedFiles, currentFiles) => {\n if (\n (uploadedFiles && !uploadedFiles.length) ||\n (currentFiles && !currentFiles.length)\n ) {\n return [];\n }\n const currentFilenames = _.map(currentFiles, cf =>\n getFilenameFromPath(cf.path)\n );\n return _.chain(uploadedFiles)\n .filter(file => currentFilenames.includes(file.name))\n .map(file => file.name)\n .value();\n};\n\n/**\n * Given an Event object, prevents the default event\n * from bubbling, if possible.\n * @param {Event} event\n */\nexport const preventDefault = event => {\n if (event && event.preventDefault) {\n event.preventDefault();\n }\n};\n\n/**\n * Given an object, trims every keys and values recursively.\n * @param {Object} object\n * @return {Object} trimmedObject\n */\nexport const trimObject = object => {\n if (!_.isObject(object)) return object;\n return _.keys(object).reduce((acc, key) => {\n if (typeof object[key] === 'string') {\n try {\n acc[key.trim()] = JSON.parse(object[key].trim());\n } catch (e) {\n acc[key.trim()] = object[key].trim();\n }\n } else {\n acc[key.trim()] = trimObject(object[key]);\n }\n return acc;\n }, Array.isArray(object) ? [] : {});\n};\n\n/**\n * Given a resource type and splat, returns a formatted title string.\n * Falsy values are discarded.\n * @param {String} type - Resource type.\n * @param {String} splat - Directory splat for current resource.\n * @param {String} [prefix=''] - Optional string text to be placed in front.\n * @return {String} Empty string or formatted title.\n */\nexport const getDocumentTitle = (type, splat, prefix = '') => {\n if (!type) return '';\n const label = toTitleCase(type.toString());\n return [prefix, splat, label].filter(Boolean).join(' | ');\n};\n\n/**\n * @param {String} directory - Directory splat for current resource.\n * @param {String} filename - Basename of current resource.\n * @return {String} Filename or directory splat joined to the filename.\n */\nexport const computeRelativePath = (directory, filename) => {\n return directory ? `${directory}/${filename}` : `${filename}`;\n};\n\n// omit raw_content, path and empty-value keys in metadata state from front_matter\nexport const sanitizeFrontMatter = metadata => {\n return _.omit(metadata, (value, key, object) => {\n return key === 'raw_content' || key === 'path' || value === '';\n });\n};\n\nexport const preparePayload = obj => JSON.stringify(trimObject(obj));\nexport const getFilenameFromTitle = title => `${slugify(title)}.md`;\n","import { getConfigurationUrl, putConfigurationUrl } from '../constants/api';\nimport { get, put } from '../utils/fetch';\nimport { validator } from '../utils/validation';\nimport { clearErrors, validationError } from './utils';\nimport { toYAML } from '../utils/helpers';\n\nimport translations from '../translations';\nconst { getContentRequiredMessage } = translations;\n\n// Action Types\nexport const FETCH_CONFIG_REQUEST = 'FETCH_CONFIG_REQUEST';\nexport const FETCH_CONFIG_SUCCESS = 'FETCH_CONFIG_SUCCESS';\nexport const FETCH_CONFIG_FAILURE = 'FETCH_CONFIG_FAILURE';\nexport const PUT_CONFIG_REQUEST = 'PUT_CONFIG_REQUEST';\nexport const PUT_CONFIG_SUCCESS = 'PUT_CONFIG_SUCCESS';\nexport const PUT_CONFIG_FAILURE = 'PUT_CONFIG_FAILURE';\nexport const CONFIG_EDITOR_CHANGED = 'CONFIG_EDITOR_CHANGED';\n\n// Actions\nexport const fetchConfig = () => dispatch => {\n dispatch({ type: FETCH_CONFIG_REQUEST });\n return get(\n getConfigurationUrl(),\n { type: FETCH_CONFIG_SUCCESS, name: 'config' },\n { type: FETCH_CONFIG_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const putConfig = (config, source = 'editor') => (\n dispatch,\n getState\n) => {\n let payload;\n\n if (source === 'gui') {\n config = getState().metadata.metadata;\n payload = { raw_content: toYAML(config) };\n } else {\n payload = { raw_content: config };\n }\n\n // handle errors\n const errors = validateConfig(config);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n dispatch(clearErrors());\n\n return put(\n putConfigurationUrl(),\n JSON.stringify(payload),\n { type: PUT_CONFIG_SUCCESS, name: 'config' },\n { type: PUT_CONFIG_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nconst validateConfig = config =>\n validator(\n { config },\n { config: 'required' },\n {\n 'config.required': getContentRequiredMessage(),\n }\n );\n\nexport const onEditorChange = () => ({\n type: CONFIG_EDITOR_CHANGED,\n});\n\n// Reducer\nexport default function config(\n state = {\n config: {},\n updated: false,\n editorChanged: false,\n fieldChanged: false,\n isFetching: false,\n },\n action\n) {\n switch (action.type) {\n case FETCH_CONFIG_REQUEST:\n return {\n ...state,\n isFetching: true,\n };\n case FETCH_CONFIG_SUCCESS:\n return {\n ...state,\n config: action.config,\n isFetching: false,\n };\n case FETCH_CONFIG_FAILURE:\n return {\n ...state,\n isFetching: false,\n };\n case PUT_CONFIG_SUCCESS:\n return {\n ...state,\n config: action.config,\n editorChanged: false,\n updated: true,\n };\n case PUT_CONFIG_FAILURE:\n return {\n ...state,\n editorChanged: false,\n };\n case CONFIG_EDITOR_CHANGED:\n return {\n ...state,\n editorChanged: true,\n updated: false,\n };\n default:\n return {\n ...state,\n updated: false,\n editorChanged: false,\n };\n }\n}\n","export default {\n save: 'mod+s',\n};\n","import React from 'react';\n\nconst Splitter = () => <div className=\"splitter\" />;\n\nexport default Splitter;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default function Icon({ name }) {\n return <i className={`fa fa-${name}`} aria-hidden=\"true\" />;\n}\n\nIcon.propTypes = {\n name: PropTypes.string.isRequired,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Icon from './Icon';\n\nclass Accordion extends Component {\n state = { collapsed: true };\n\n handleClick = () => {\n this.setState(state => {\n return {\n collapsed: !state.collapsed,\n };\n });\n };\n\n renderIndicator() {\n const { counter, count } = this.props;\n const { collapsed } = this.state;\n\n if (collapsed && counter && count) {\n return <div className=\"counter\">{count}</div>;\n }\n return (\n <div className=\"chevrons\">\n <Icon name={`chevron-${collapsed ? 'down' : 'up'}`} />\n </div>\n );\n }\n\n render() {\n const { icon, label, minHeight, count, children } = this.props;\n const { collapsed } = this.state;\n const accordionClasses = classnames('accordion', { collapsed });\n\n let panelHeight = minHeight;\n if (!collapsed) {\n panelHeight = minHeight && count ? (count + 1) * minHeight : 'none';\n }\n\n return (\n <div\n className={accordionClasses}\n style={{ maxHeight: panelHeight }}\n onClick={this.handleClick}\n >\n <div className=\"accordion-label\">\n {icon && <Icon name={icon} />}\n {label}\n <div className=\"indicator\">{this.renderIndicator()}</div>\n </div>\n {children}\n </div>\n );\n }\n}\n\nAccordion.defaultProps = {\n minHeight: 50,\n};\n\nAccordion.propTypes = {\n children: PropTypes.element.isRequired,\n label: PropTypes.string.isRequired,\n minHeight: PropTypes.number,\n count: PropTypes.number,\n counter: PropTypes.bool,\n icon: PropTypes.string,\n};\n\nexport default Accordion;\n","import moment from 'moment';\nimport { clearErrors, validationError, filterDeleted } from './utils';\nimport { get, put, del } from '../utils/fetch';\nimport { validator } from '../utils/validation';\nimport {\n slugify,\n preparePayload,\n sanitizeFrontMatter,\n computeRelativePath,\n} from '../utils/helpers';\nimport {\n collectionsAPIUrl,\n collectionAPIUrl,\n documentAPIUrl,\n} from '../constants/api';\n\nimport translations from '../translations';\nconst {\n getTitleRequiredMessage,\n getFilenameRequiredMessage,\n getFilenameNotValidMessage,\n} = translations;\n\n// Action Types\nexport const FETCH_COLLECTIONS_REQUEST = 'FETCH_COLLECTIONS_REQUEST';\nexport const FETCH_COLLECTIONS_SUCCESS = 'FETCH_COLLECTIONS_SUCCESS';\nexport const FETCH_COLLECTIONS_FAILURE = 'FETCH_COLLECTIONS_FAILURE';\nexport const FETCH_COLLECTION_REQUEST = 'FETCH_COLLECTION_REQUEST';\nexport const FETCH_COLLECTION_SUCCESS = 'FETCH_COLLECTION_SUCCESS';\nexport const FETCH_COLLECTION_FAILURE = 'FETCH_COLLECTION_FAILURE';\nexport const FETCH_DOCUMENT_REQUEST = 'FETCH_DOCUMENT_REQUEST';\nexport const FETCH_DOCUMENT_SUCCESS = 'FETCH_DOCUMENT_SUCCESS';\nexport const FETCH_DOCUMENT_FAILURE = 'FETCH_DOCUMENT_FAILURE';\nexport const PUT_DOCUMENT_REQUEST = 'PUT_DOCUMENT_REQUEST';\nexport const PUT_DOCUMENT_SUCCESS = 'PUT_DOCUMENT_SUCCESS';\nexport const PUT_DOCUMENT_FAILURE = 'PUT_DOCUMENT_FAILURE';\nexport const DELETE_DOCUMENT_REQUEST = 'DELETE_DOCUMENT_REQUEST';\nexport const DELETE_DOCUMENT_SUCCESS = 'DELETE_DOCUMENT_SUCCESS';\nexport const DELETE_DOCUMENT_FAILURE = 'DELETE_DOCUMENT_FAILURE';\n\n// Actions\nexport const fetchCollections = () => dispatch => {\n dispatch({ type: FETCH_COLLECTIONS_REQUEST });\n return get(\n collectionsAPIUrl(),\n { type: FETCH_COLLECTIONS_SUCCESS, name: 'collections' },\n { type: FETCH_COLLECTIONS_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const fetchCollection = (collection, directory = '') => dispatch => {\n dispatch({ type: FETCH_COLLECTION_REQUEST });\n return get(\n collectionAPIUrl(collection, directory),\n { type: FETCH_COLLECTION_SUCCESS, name: 'entries' },\n { type: FETCH_COLLECTION_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const fetchDocument = (collection, directory, filename) => dispatch => {\n dispatch({ type: FETCH_DOCUMENT_REQUEST });\n return get(\n documentAPIUrl(collection, directory, filename),\n { type: FETCH_DOCUMENT_SUCCESS, name: 'doc' },\n { type: FETCH_DOCUMENT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const createDocument = (collection, directory) => (\n dispatch,\n getState\n) => {\n // get edited fields from metadata state\n const metadata = getState().metadata.metadata;\n let { path, raw_content, title, date } = metadata;\n // if `path` is a falsy value or if appending a slash to it equals to\n // `directory`, generate filename from `title`.\n if ((!path || `${path}/` === directory) && title) {\n path = generateFilenameFromTitle(title, collection, date);\n } else {\n // validate otherwise\n const errors = validateDocument(metadata, collection);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n }\n // clear errors\n dispatch(clearErrors());\n\n const front_matter = sanitizeFrontMatter(metadata);\n\n // send the put request\n return put(\n documentAPIUrl(collection, directory, path),\n preparePayload({ raw_content, front_matter }),\n { type: PUT_DOCUMENT_SUCCESS, name: 'doc' },\n { type: PUT_DOCUMENT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const putDocument = (collection, directory, filename) => (\n dispatch,\n getState\n) => {\n // get edited fields from metadata state\n const metadata = getState().metadata.metadata;\n let { path, raw_content, title, date } = metadata;\n // if `path` is a falsy value or if appending a slash to it equals to\n // `directory`, generate filename from `title`.\n if ((!path || `${path}/` === directory) && title) {\n path = generateFilenameFromTitle(title, collection, date);\n } else {\n // validate otherwise\n const errors = validateDocument(metadata, collection);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n }\n // clear errors\n dispatch(clearErrors());\n\n const front_matter = sanitizeFrontMatter(metadata);\n\n // add collection type prefix to relative path\n const relative_path = directory\n ? `_${collection}/${directory}/${path}`\n : `_${collection}/${path}`;\n\n // send the put request\n return put(\n documentAPIUrl(collection, directory, filename),\n preparePayload({ path: relative_path, raw_content, front_matter }),\n { type: PUT_DOCUMENT_SUCCESS, name: 'doc' },\n { type: PUT_DOCUMENT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const deleteDocument = (collection, directory, filename) => dispatch => {\n const relative_path = computeRelativePath(directory, filename);\n return del(\n documentAPIUrl(collection, directory, filename),\n { type: DELETE_DOCUMENT_SUCCESS, name: 'doc', id: relative_path },\n { type: DELETE_DOCUMENT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nconst generateFilenameFromTitle = (title, collection, date) => {\n const slugifiedTitle = slugify(title);\n if (collection === 'posts') {\n // if date is provided, use it, otherwise generate it with today's date\n const docDate = date ? date.split(' ')[0] : moment().format('YYYY-MM-DD');\n return `${docDate}-${slugifiedTitle}.md`;\n }\n return `${slugifiedTitle}.md`;\n};\n\nconst validateDocument = (metadata, collection) => {\n let validations = { title: 'required' }; // base validations\n // base messages\n let messages = {\n 'title.required': getTitleRequiredMessage(),\n 'path.required': getFilenameRequiredMessage(),\n };\n\n if (collection === 'posts') {\n validations['path'] = 'required|date';\n messages['path.date'] = getFilenameNotValidMessage();\n } else {\n validations['path'] = 'required|filename';\n messages['path.filename'] = getFilenameNotValidMessage();\n }\n return validator(metadata, validations, messages);\n};\n\n// Reducer\nexport default function collections(\n state = {\n collections: [],\n entries: [],\n currentDocument: {},\n isFetching: false,\n updated: false,\n },\n action\n) {\n switch (action.type) {\n case FETCH_COLLECTIONS_REQUEST:\n case FETCH_COLLECTION_REQUEST:\n case FETCH_DOCUMENT_REQUEST:\n return {\n ...state,\n isFetching: true,\n };\n case FETCH_COLLECTIONS_SUCCESS:\n return {\n ...state,\n collections: action.collections,\n isFetching: false,\n };\n case FETCH_COLLECTION_SUCCESS:\n return {\n ...state,\n entries: action.entries,\n isFetching: false,\n };\n case FETCH_DOCUMENT_SUCCESS:\n return {\n ...state,\n currentDocument: action.doc,\n isFetching: false,\n };\n case FETCH_COLLECTIONS_FAILURE:\n return {\n ...state,\n collections: [],\n isFetching: false,\n };\n case FETCH_COLLECTION_FAILURE:\n return {\n ...state,\n entries: [],\n isFetching: false,\n };\n case FETCH_DOCUMENT_FAILURE:\n return {\n ...state,\n currentDocument: {},\n isFetching: false,\n };\n case PUT_DOCUMENT_SUCCESS:\n return {\n ...state,\n currentDocument: action.doc,\n updated: true,\n };\n case DELETE_DOCUMENT_SUCCESS:\n return {\n ...state,\n entries: filterDeleted(state.entries, action.id),\n };\n default:\n return {\n ...state,\n updated: false,\n };\n }\n}\n\n// Selectors\nexport const filterBySearchInput = (list, input) => {\n if (!input) {\n return list;\n }\n return list.filter(f =>\n (f.title || f.name).toLowerCase().includes(input.toLowerCase())\n );\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { Link } from 'react-router';\nimport { ADMIN_PREFIX } from '../constants';\nimport Splitter from '../components/Splitter';\nimport Icon from '../components/Icon';\nimport Accordion from '../components/Accordion';\nimport { fetchCollections } from '../ducks/collections';\nimport { capitalize } from '../utils/helpers';\nimport _ from 'underscore';\n\nimport translations from '../translations';\nconst SidebarTranslations = translations.sidebar;\n\nexport class Sidebar extends Component {\n componentDidMount() {\n const { fetchCollections } = this.props;\n fetchCollections();\n }\n\n renderCollections(hiddens = []) {\n const { collections } = this.props;\n\n if (!collections.length) {\n return null;\n }\n\n const collectionItems = _.map(collections, (col, i) => {\n if (col.label !== 'posts' && !hiddens.includes(col.label)) {\n return (\n <li key={i}>\n <Link\n activeClassName=\"active\"\n to={`${ADMIN_PREFIX}/collections/${col.label}`}\n >\n <Icon name=\"book\" />\n {col.sidebar_label || capitalize(col.label)}\n </Link>\n </li>\n );\n }\n }).filter(Boolean);\n\n const itemsCount = collectionItems.length;\n if (!itemsCount) {\n return null;\n }\n\n return (\n <Accordion\n count={itemsCount}\n icon=\"briefcase\"\n label={SidebarTranslations.collections}\n counter\n >\n <ul>{collectionItems}</ul>\n </Accordion>\n );\n }\n\n render() {\n const { config } = this.props;\n\n const defaults = {\n pages: {\n icon: 'file-text',\n link: 'pages',\n translation: 'pages',\n },\n datafiles: {\n icon: 'database',\n link: 'datafiles',\n translation: 'datafiles',\n splitterBefore: true,\n },\n staticfiles: {\n icon: 'file',\n link: 'staticfiles',\n translation: 'staticfiles',\n },\n configuration: {\n icon: 'cog',\n link: 'configuration',\n translation: 'configuration',\n splitterBefore: true,\n },\n };\n\n const defaultLinks = _.keys(defaults);\n let hiddenLinks;\n\n try {\n hiddenLinks = config.jekyll_admin.hidden_links || [];\n } catch (e) {\n hiddenLinks = [];\n }\n\n const visibleLinks = _.difference(defaultLinks, hiddenLinks);\n\n const links = [];\n _.each(visibleLinks, (link, index, list) => {\n const current = defaults[link];\n if (current.splitterBefore) {\n links.push(<Splitter key={'splitter' + index} />);\n }\n links.push(\n <li key={index}>\n <Link activeClassName=\"active\" to={`${ADMIN_PREFIX}/${current.link}`}>\n <Icon name={current.icon} />\n {SidebarTranslations[current.translation]}\n </Link>\n </li>\n );\n });\n\n const collectionsPanel = this.renderCollections(hiddenLinks);\n const postsPanel = !hiddenLinks.includes('posts');\n const draftsPanel = config && config.show_drafts;\n\n return (\n <div className=\"sidebar\">\n <Link className=\"logo\" to={`${ADMIN_PREFIX}/pages`} />\n <ul className=\"routes\">\n {collectionsPanel}\n {postsPanel && (\n <li>\n <Link\n activeClassName=\"active\"\n to={`${ADMIN_PREFIX}/collections/posts`}\n >\n <Icon name=\"book\" />\n {SidebarTranslations.posts}\n </Link>\n </li>\n )}\n {draftsPanel && (\n <li>\n <Link activeClassName=\"active\" to={`${ADMIN_PREFIX}/drafts`}>\n <Icon name=\"edit\" />\n {SidebarTranslations.drafts}\n </Link>\n </li>\n )}\n {(collectionsPanel || postsPanel || draftsPanel) && <Splitter />}\n {links}\n </ul>\n </div>\n );\n }\n}\n\nSidebar.propTypes = {\n collections: PropTypes.array.isRequired,\n fetchCollections: PropTypes.func.isRequired,\n config: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n collections: state.collections.collections,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchCollections,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Sidebar);\n","export const ADMIN_PREFIX = '/admin';\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router';\nimport Icon from '../components/Icon';\n\nexport class Header extends Component {\n render() {\n const { config } = this.props;\n return (\n <div className=\"header\">\n <h3 className=\"title\">\n <Link target=\"_blank\" to={config.url || '/'}>\n <Icon name=\"home\" />\n <span>{config.title || 'You have no title!'}</span>\n </Link>\n </h3>\n <span className=\"version\">v{process.env.REACT_APP_VERSION}</span>\n </div>\n );\n }\n}\n\nHeader.propTypes = {\n config: PropTypes.object.isRequired,\n};\n\nexport default Header;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport NotificationSystem from 'react-notification-system';\n\nexport class Notifications extends Component {\n componentDidMount() {\n this.notificationSystem = this.refs.notificationSystem;\n }\n\n componentWillReceiveProps(nextProps) {\n const { notification } = nextProps;\n this.notificationSystem.addNotification({\n title: notification.title,\n message: notification.message,\n level: notification.level,\n position: 'br',\n autoDismiss: 10,\n });\n }\n\n elementStyles = {\n Containers: {\n DefaultStyle: {\n padding: 15,\n width: 360,\n textAlign: 'center',\n },\n },\n Title: {\n DefaultStyle: {\n fontSize: 21,\n color: '#fff',\n },\n },\n NotificationItem: {\n DefaultStyle: {\n margin: 0,\n padding: '9px 15px 15px',\n fontSize: 15,\n borderRadius: 0,\n transition: '0.5s ease-in-out',\n },\n success: {\n color: '#fff',\n backgroundColor: '#088217',\n },\n error: {\n color: '#fff',\n backgroundColor: '#e21414',\n },\n warning: {\n color: '#fff',\n backgroundColor: '#ebad1a',\n },\n info: {\n color: '#fff',\n backgroundColor: '#369cc7',\n },\n },\n Dismiss: {\n DefaultStyle: {\n top: 7,\n right: 9,\n width: 25,\n height: 25,\n padding: 4,\n backgroundColor: 'transparent',\n border: '2px solid',\n opacity: '0.84',\n },\n },\n };\n\n render() {\n return (\n <NotificationSystem ref=\"notificationSystem\" style={this.elementStyles} />\n );\n }\n}\n\nNotifications.propTypes = {\n notification: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n notification: state.notifications.notification,\n});\n\nexport default connect(mapStateToProps)(Notifications);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { HotKeys } from 'react-hotkeys';\nimport DocumentTitle from 'react-document-title';\n\nimport { fetchConfig } from '../ducks/config';\nimport keyboardShortcuts from '../constants/keyboardShortcuts';\nimport { ADMIN_PREFIX } from '../constants';\n\n// Components\nimport Sidebar from './Sidebar';\nimport Header from './Header';\nimport Notifications from './Notifications';\n\nclass App extends Component {\n componentDidMount() {\n const { fetchConfig } = this.props;\n fetchConfig();\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n const { fetchConfig } = this.props;\n fetchConfig();\n }\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.isFetching && !this.props.isFetching) {\n const {\n config: {\n content: {\n jekyll_admin: { homepage },\n collections,\n },\n },\n router,\n } = this.props;\n\n const currentPathname = router.getCurrentLocation().pathname;\n\n if (homepage && currentPathname === ADMIN_PREFIX) {\n let url = `${ADMIN_PREFIX}/pages`;\n\n const collectionNames = Object.keys(collections).concat('posts');\n if (collectionNames.includes(homepage)) {\n url = `${ADMIN_PREFIX}/collections/${homepage}`;\n }\n\n if (\n ['drafts', 'datafiles', 'staticfiles', 'configuration'].includes(\n homepage\n )\n ) {\n url = `${ADMIN_PREFIX}/${homepage}`;\n }\n\n router.replace(url);\n }\n }\n }\n\n render() {\n const { config, isFetching } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n return (\n <DocumentTitle title=\"Jekyll Admin\">\n <HotKeys keyMap={keyboardShortcuts} className=\"wrapper\">\n {config.content && (\n <div>\n <Sidebar config={config.content} />\n <div className=\"container\">\n <Header config={config.content} />\n <div className=\"content\">{this.props.children}</div>\n </div>\n <Notifications />\n </div>\n )}\n </HotKeys>\n </DocumentTitle>\n );\n }\n}\n\nApp.propTypes = {\n children: PropTypes.element,\n fetchConfig: PropTypes.func.isRequired,\n config: PropTypes.object.isRequired,\n isFetching: PropTypes.bool.isRequired,\n updated: PropTypes.bool,\n};\n\nconst mapStateToProps = state => ({\n config: state.config.config,\n updated: state.config.updated,\n isFetching: state.config.isFetching,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators({ fetchConfig }, dispatch);\n\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport TextareaAutosize from 'react-textarea-autosize';\n\nexport default function StaticMetaSimple({ fieldValue }) {\n return (\n <div className=\"meta-value\">\n <TextareaAutosize\n className=\"field value-field\"\n value={`${fieldValue}`}\n disabled\n />\n </div>\n );\n}\n\nStaticMetaSimple.propTypes = {\n fieldValue: PropTypes.any.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport StaticMetaArray from './StaticMetaArray';\nimport StaticMetaObject from './StaticMetaObject';\nimport StaticMetaSimple from './StaticMetaSimple';\n\nconst FieldTypes = {\n array: StaticMetaArray,\n object: StaticMetaObject,\n simple: StaticMetaSimple,\n};\n\nexport default function StaticMetaObjectItem({ type, fieldKey, fieldValue }) {\n const CurrentComponent = FieldTypes[type];\n\n return (\n <div className=\"object-item-wrap\">\n <div className={`object-key ${type}`}>\n <input\n value={fieldKey}\n className=\"field key-field\"\n type=\"text\"\n disabled\n />\n </div>\n <div className=\"object-value\">\n <CurrentComponent fieldValue={fieldValue} />\n </div>\n </div>\n );\n}\n\nStaticMetaObjectItem.propTypes = {\n type: PropTypes.string.isRequired,\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'underscore';\nimport StaticMetaObjectItem from './StaticMetaObjectItem';\nimport { computeFieldType } from '../../../utils/metadata';\n\nexport default function StaticMetaObject({ fieldValue }) {\n const items = _.map(fieldValue, (value, key) => {\n const type = computeFieldType(value);\n return (\n <StaticMetaObjectItem\n key={key}\n fieldKey={key}\n fieldValue={value}\n type={type}\n />\n );\n });\n\n return <div className=\"meta-value-object\">{items}</div>;\n}\n\nStaticMetaObject.propTypes = {\n fieldValue: PropTypes.any.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport StaticMetaArray from './StaticMetaArray';\nimport StaticMetaObject from './StaticMetaObject';\nimport StaticMetaSimple from './StaticMetaSimple';\n\nconst FieldTypes = {\n array: StaticMetaArray,\n object: StaticMetaObject,\n simple: StaticMetaSimple,\n};\n\nexport default function StaticMetaArrayItem({ type, fieldValue, index }) {\n const CurrentComponent = FieldTypes[type];\n\n return (\n <div className=\"array-item-wrap\">\n <div className=\"array\">\n <div className=\"array-header\">\n <span className=\"array-field-num\">{index + 1}.</span>\n </div>\n <CurrentComponent fieldValue={fieldValue} />\n </div>\n </div>\n );\n}\n\nStaticMetaArrayItem.propTypes = {\n type: PropTypes.string.isRequired,\n index: PropTypes.number.isRequired,\n fieldValue: PropTypes.any.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport StaticMetaArrayItem from './StaticMetaArrayItem';\nimport { computeFieldType } from '../../../utils/metadata';\n\nexport default function StaticMetaArray({ fieldValue }) {\n const items = fieldValue.map((item, i) => {\n const type = computeFieldType(item);\n return (\n <StaticMetaArrayItem key={i} index={i} fieldValue={item} type={type} />\n );\n });\n return <div className=\"meta-value-array\">{items}</div>;\n}\n\nStaticMetaArray.propTypes = {\n fieldValue: PropTypes.any.isRequired,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../Icon';\nimport classnames from 'classnames';\n\nexport default class StaticMetaButton extends Component {\n state = {\n dropdown: false,\n };\n\n toggleDropdownState = () => {\n this.setState(state => ({ dropdown: !state.dropdown }));\n };\n\n render() {\n const { onEnableField } = this.props;\n\n const dropdownClasses = classnames('dropdown', {\n 'showing-dropdown': this.state.dropdown,\n });\n\n return (\n <div className=\"meta-buttons\">\n <span className={dropdownClasses}>\n <a\n className=\"meta-button\"\n tabIndex=\"1\"\n onClick={this.toggleDropdownState}\n onBlur={() => this.setState({ dropdown: false })}\n >\n <Icon name=\"chevron-down\" />\n </a>\n <div className=\"dropdown-wrap\">\n <span onMouseDown={() => onEnableField()}>\n <Icon name=\"pencil\" /> Override default\n </span>\n </div>\n </span>\n </div>\n );\n }\n}\n\nStaticMetaButton.propTypes = {\n onEnableField: PropTypes.func.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport StaticMetaArray from './StaticMetaArray';\nimport StaticMetaObject from './StaticMetaObject';\nimport StaticMetaSimple from './StaticMetaSimple';\nimport StaticMetaButton from '../StaticMetaButton';\n\nconst FieldTypes = {\n array: StaticMetaArray,\n object: StaticMetaObject,\n simple: StaticMetaSimple,\n};\n\nexport default function StaticMetaField({\n type,\n fieldKey,\n fieldValue,\n enableField,\n}) {\n const CurrentComponent = FieldTypes[type];\n\n return (\n <div className=\"metafield default-field\">\n <div className={`meta-key ${type}`}>\n <input\n value={fieldKey}\n className=\"field key-field\"\n type=\"text\"\n disabled\n />\n <StaticMetaButton\n onEnableField={() => {\n enableField(`metadata['${fieldKey}']`, fieldValue);\n }}\n />\n </div>\n <CurrentComponent fieldValue={fieldValue} />\n </div>\n );\n}\n\nStaticMetaField.propTypes = {\n type: PropTypes.string.isRequired,\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any.isRequired,\n enableField: PropTypes.func.isRequired,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { getFilenameFromPath } from '../utils/helpers';\nimport Icon from './Icon';\n\nimport translations from '../translations';\nconst { getDeleteMessage } = translations;\n\nexport default class FilePreview extends Component {\n handleClickDelete(path) {\n const { splat, onClickDelete } = this.props;\n const filename = getFilenameFromPath(path);\n const confirm = window.confirm(getDeleteMessage(path));\n confirm && onClickDelete(splat, filename);\n }\n\n renderFileOverlay(file, splat) {\n if (file.from_theme) {\n return (\n <span className=\"theme-indicator\" title=\"Theme Asset\">\n <Icon name=\"diamond\" />\n </span>\n );\n } else if (splat !== 'index') {\n return (\n <button\n onClick={() => this.handleClickDelete(file.relative_path)}\n className=\"delete\"\n title=\"Delete file\"\n >\n x\n </button>\n );\n }\n }\n\n get isImageFile() {\n const {\n file: { type, extname },\n } = this.props;\n if (type === 'directory') {\n return false;\n }\n\n return /png|jpg|gif|jpeg|svg|ico/i.test(extname.substring(1));\n }\n\n render() {\n const { onClick, file, splat } = this.props;\n const node = this.isImageFile ? (\n <img src={file.http_url} alt={file.relative_path} />\n ) : (\n <div>\n <Icon name=\"file-text-o\" />\n </div>\n );\n\n const nodeLink = onClick ? (\n <a onClick={() => onClick(file.relative_path)}>{node}</a>\n ) : (\n <a href={file.http_url} target=\"_blank\" rel=\"noopener noreferrer\">\n {node}\n </a>\n );\n\n const filename = splat === 'index' ? file.relative_path : file.name;\n\n return (\n <div className=\"file-preview\">\n {this.renderFileOverlay(file, splat)}\n {nodeLink}\n <span className=\"filename\">{filename}</span>\n </div>\n );\n }\n}\n\nFilePreview.propTypes = {\n file: PropTypes.object.isRequired,\n splat: PropTypes.string.isRequired,\n onClickDelete: PropTypes.func,\n onClick: PropTypes.func,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router';\nimport { toTitleCase } from '../utils/helpers';\nimport { ADMIN_PREFIX } from '../constants';\n\nexport default function Breadcrumbs({ type, splat = '' }) {\n const nonCollectionTypes = ['pages', 'datafiles', 'drafts', 'staticfiles'];\n const base = nonCollectionTypes.includes(type)\n ? `${ADMIN_PREFIX}/${type}`\n : `${ADMIN_PREFIX}/collections/${type}`;\n\n let label = type;\n if (type === 'datafiles') {\n label = 'data files';\n } else if (type === 'staticfiles') {\n label = 'static files';\n }\n\n let nodes = [];\n if (splat) {\n const paths = splat.split('/');\n nodes = paths.map((path, i) => {\n const before = i === 0 ? '' : paths.slice(0, i).join('/') + '/';\n return (\n <li key={i}>\n <Link to={`${base}/${before}${path}`}>{path}</Link>\n </li>\n );\n });\n }\n\n return (\n <ul className=\"breadcrumbs\">\n <li>\n <Link to={base}>{toTitleCase(label)}</Link>\n </li>\n {nodes}\n </ul>\n );\n}\n\nBreadcrumbs.propTypes = {\n type: PropTypes.string.isRequired,\n splat: PropTypes.string,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class InputSearch extends Component {\n handleKeyPress = event => {\n const { search } = this.props;\n search(event.target.value);\n };\n\n render() {\n const { searchBy } = this.props;\n return (\n <input\n onKeyPress={this.handleKeyPress}\n type=\"text\"\n className=\"field\"\n placeholder={`Search by ${searchBy}`}\n />\n );\n }\n}\n\nInputSearch.propTypes = {\n search: PropTypes.func.isRequired,\n searchBy: PropTypes.string.isRequired,\n};\n","import _ from 'underscore';\nimport { filterDeleted } from './utils';\nimport { get, del } from '../utils/fetch';\nimport { computeRelativePath } from '../utils/helpers';\nimport { addNotification } from './notifications';\nimport { staticfilesAPIUrl, staticfileAPIUrl } from '../constants/api';\n\nimport translations from '../translations';\nconst {\n getSuccessMessage,\n getErrorMessage,\n getUploadSuccessMessage,\n getUploadErrorMessage,\n} = translations;\n\n// Action Types\nexport const FETCH_STATICFILES_REQUEST = 'FETCH_STATICFILES_REQUEST';\nexport const FETCH_STATICFILES_SUCCESS = 'FETCH_STATICFILES_SUCCESS';\nexport const FETCH_STATICFILES_FAILURE = 'FETCH_STATICFILES_FAILURE';\nexport const FETCH_STATICFILE_REQUEST = 'FETCH_STATICFILE_REQUEST';\nexport const FETCH_STATICFILE_SUCCESS = 'FETCH_STATICFILE_SUCCESS';\nexport const FETCH_STATICFILE_FAILURE = 'FETCH_STATICFILE_FAILURE';\nexport const PUT_STATICFILE_REQUEST = 'PUT_STATICFILE_REQUEST';\nexport const PUT_STATICFILE_SUCCESS = 'PUT_STATICFILE_SUCCESS';\nexport const PUT_STATICFILE_FAILURE = 'PUT_STATICFILE_FAILURE';\nexport const DELETE_STATICFILE_REQUEST = 'DELETE_STATICFILE_REQUEST';\nexport const DELETE_STATICFILE_SUCCESS = 'DELETE_STATICFILE_SUCCESS';\nexport const DELETE_STATICFILE_FAILURE = 'DELETE_STATICFILE_FAILURE';\n\n// Actions\nexport const fetchStaticFiles = (directory = '') => dispatch => {\n dispatch({ type: FETCH_STATICFILES_REQUEST });\n return get(\n staticfilesAPIUrl(directory),\n { type: FETCH_STATICFILES_SUCCESS, name: 'files' },\n { type: FETCH_STATICFILES_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const uploadStaticFiles = (directory, files) => dispatch => {\n _.each(files, file => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onloadend = () => {\n const payload = JSON.stringify({\n encoded_content: reader.result.split('base64,')[1],\n });\n // send the put request\n return fetch(staticfileAPIUrl(directory, file.name), {\n method: 'PUT',\n body: payload,\n credentials: 'same-origin',\n })\n .then(data => {\n dispatch({ type: PUT_STATICFILE_SUCCESS });\n dispatch(fetchStaticFiles(directory));\n dispatch(\n addNotification(\n getSuccessMessage(),\n getUploadSuccessMessage(file.name),\n 'success'\n )\n );\n })\n .catch(error => {\n dispatch({ type: PUT_STATICFILE_FAILURE, error });\n dispatch(\n addNotification(getErrorMessage(), getUploadErrorMessage(), 'error')\n );\n });\n };\n });\n};\n\nexport const deleteStaticFile = (directory, filename) => dispatch => {\n const relative_path = computeRelativePath(directory, filename);\n return del(\n staticfileAPIUrl(directory, filename),\n { type: DELETE_STATICFILE_SUCCESS, name: 'file', id: relative_path },\n { type: DELETE_STATICFILE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\n// Reducer\nexport default function staticfiles(\n state = {\n files: [],\n isFetching: false,\n uploading: false, // TODO show loading gif\n },\n action\n) {\n switch (action.type) {\n case FETCH_STATICFILES_REQUEST:\n return {\n ...state,\n isFetching: true,\n };\n case FETCH_STATICFILES_SUCCESS:\n return {\n ...state,\n files: action.files,\n isFetching: false,\n };\n case FETCH_STATICFILES_FAILURE:\n return {\n ...state,\n isFetching: false,\n };\n case PUT_STATICFILE_REQUEST:\n return {\n ...state,\n uploading: true,\n };\n case PUT_STATICFILE_SUCCESS:\n return {\n ...state,\n uploading: false,\n };\n case PUT_STATICFILE_FAILURE:\n return {\n ...state,\n uploading: false,\n };\n case DELETE_STATICFILE_SUCCESS:\n return {\n ...state,\n files: filterDeleted(state.files, action.id),\n };\n default:\n return state;\n }\n}\n\n// Selectors\nexport const filterByFilename = (files, input) => {\n if (!input) {\n return files;\n }\n return files.filter(f => f.path.toLowerCase().includes(input.toLowerCase()));\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport DocumentTitle from 'react-document-title';\nimport Icon from '../../components/Icon';\nimport FilePreview from '../../components/FilePreview';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport InputSearch from '../../components/form/InputSearch';\nimport { search } from '../../ducks/utils';\nimport { fetchStaticFiles, filterByFilename } from '../../ducks/staticfiles';\nimport { ADMIN_PREFIX } from '../../constants';\n\nexport class StaticIndex extends Component {\n componentDidMount() {\n const { fetchStaticFiles } = this.props;\n fetchStaticFiles('index');\n }\n\n renderDirectoryListingBtn() {\n const to = `${ADMIN_PREFIX}/staticfiles`;\n\n return (\n <div className=\"page-buttons\">\n <Link className=\"btn btn-view\" to={to}>\n Directory Listing\n </Link>\n </div>\n );\n }\n\n renderPreviewNode() {\n const { files, onClickStaticFile } = this.props;\n\n if (files.length) {\n return (\n <div className=\"preview-container\">\n {files.map((file, i) => {\n return (\n <FilePreview\n key={i}\n onClick={onClickStaticFile}\n splat=\"index\"\n file={file}\n />\n );\n })}\n </div>\n );\n } else {\n return (\n <div className=\"preview-info\">\n <Icon name=\"exclamation-triangle\" />\n <h2>No files found!</h2>\n <h4>\n Upload files at 'Directory Listing' to have them displayed here.\n </h4>\n </div>\n );\n }\n }\n\n render() {\n const { isFetching, search, modalView } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n return (\n <DocumentTitle title=\"Static File Listing\">\n <div>\n <div className=\"content-header\">\n <Breadcrumbs type=\"staticfiles\" />\n {!modalView && this.renderDirectoryListingBtn()}\n <div className=\"pull-right\">\n <InputSearch searchBy=\"filename\" search={search} />\n </div>\n </div>\n <div className=\"static-list\">{this.renderPreviewNode()}</div>\n </div>\n </DocumentTitle>\n );\n }\n}\n\nStaticIndex.propTypes = {\n files: PropTypes.array.isRequired,\n isFetching: PropTypes.bool.isRequired,\n fetchStaticFiles: PropTypes.func.isRequired,\n search: PropTypes.func.isRequired,\n onClickStaticFile: PropTypes.func,\n modalView: PropTypes.bool,\n};\n\nconst mapStateToProps = state => ({\n files: filterByFilename(state.staticfiles.files, state.utils.input),\n isFetching: state.staticfiles.isFetching,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchStaticFiles,\n search,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StaticIndex);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-modal';\nimport StaticIndex from '../containers/views/StaticIndex';\nimport Icon from './Icon';\n\nexport default class FilePicker extends Component {\n state = {\n showModal: false,\n };\n\n customStyles = {\n overlay: {\n backgroundColor: 'rgba(0,0,0,0.6)',\n zIndex: 10,\n },\n content: {\n margin: 20,\n paddingTop: 0,\n paddingRight: 10,\n paddingLeft: 15,\n },\n };\n\n openModal = () => this.setState({ showModal: true });\n shutModal = () => this.setState({ showModal: false });\n\n onPickItem = path => {\n this.props.onPick(path);\n this.shutModal();\n };\n\n render() {\n return (\n <span className=\"images-wrapper\">\n <button onClick={this.openModal} ref=\"trigger\">\n <Icon name=\"picture-o\" />\n </button>\n <Modal\n isOpen={this.state.showModal}\n contentLabel=\"FilePicker\"\n onRequestClose={this.shutModal}\n style={this.customStyles}\n >\n <div className=\"content\">\n <StaticIndex onClickStaticFile={this.onPickItem} modalView />\n </div>\n </Modal>\n </span>\n );\n }\n}\n\nFilePicker.propTypes = {\n onPick: PropTypes.func.isRequired,\n};\n","import React, { Component, PropTypes } from 'react';\nimport TextareaAutosize from 'react-textarea-autosize';\nimport classnames from 'classnames';\n\nimport translations from '../../translations';\nconst { getDeleteMessage } = translations;\n\nexport default class MetaTags extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n tagInput: '',\n pageTags: props.fieldValue || [],\n autoSuggest: false,\n };\n }\n\n componentWillReceiveProps(nextProps) {\n const { fieldValue } = nextProps;\n this.setState({ pageTags: fieldValue || [] });\n }\n\n componentDidUpdate() {\n const { nameAttr, updateFieldValue } = this.props;\n updateFieldValue(nameAttr, this.state.pageTags);\n }\n\n createTag(value) {\n const { pageTags } = this.state;\n const clone = [...pageTags];\n\n // create tags only if they do not exist already\n if (!clone.includes(value)) {\n clone.push(value);\n\n this.setState(state => {\n return {\n pageTags: clone,\n tagInput: '',\n autoSuggest: false,\n };\n });\n }\n }\n\n deleteTag(index) {\n const { pageTags } = this.state;\n const clone = [...pageTags];\n\n const tagName = index === -1 ? clone.slice(-1).pop() : clone[index];\n const confirm = window.confirm(getDeleteMessage(`tag: ${tagName}`));\n\n if (confirm) {\n clone.splice(index, 1);\n this.setState({ pageTags: clone });\n this.refs.taginput.focus();\n }\n }\n\n // keys that when pressed and released creates a new tag from the input value.\n creators = [',', ' ', 'Enter'];\n\n handleKeyUp = e => {\n const { pageTags } = this.state;\n const input = e.target.value;\n\n if (input.length && this.creators.includes(e.key)) {\n this.createTag(input);\n } else if (pageTags.length && input.length === 0 && e.key === 'Backspace') {\n this.deleteTag(-1);\n }\n };\n\n handleOnChange = e => {\n const value = e.target.value;\n this.setState(state => {\n return { tagInput: value };\n });\n };\n\n showSuggestions = () => {\n this.setState(state => {\n return { autoSuggest: true };\n });\n };\n\n closeSuggestions = () => {\n this.setState(state => {\n return { autoSuggest: false };\n });\n };\n\n rectifyTag = tag => {\n const rectified = tag.toString().split(' ');\n this.setState(state => {\n return { pageTags: rectified };\n });\n };\n\n render() {\n const { pageTags } = this.state;\n const tagInput = `${this.state.tagInput}`;\n\n const suggestions = this.props.suggestions.filter(entry => {\n return entry.startsWith(tagInput);\n });\n\n if (!(pageTags instanceof Array)) {\n return (\n <span className=\"meta-error\">\n Expected an array of items. Found: <strong>{pageTags}</strong>\n <br />\n <span onClick={() => this.rectifyTag(pageTags)}>Click here</span>\n to correct.\n </span>\n );\n }\n\n const tagPool = pageTags.filter(Boolean); // filter out nil or empty elements\n const tags = tagPool.map((tag, i) => {\n return (\n <span key={i} className=\"tag\">\n {tag}\n <span className=\"delete-tag\" onClick={() => this.deleteTag(i)} />\n </span>\n );\n });\n\n const suggests = suggestions.map((item, i) => {\n if (!pageTags.includes(item)) {\n return (\n <li key={i} onClick={() => this.createTag(item)}>\n {item}\n </li>\n );\n }\n return null;\n }).filter(Boolean);\n\n const suggestionClasses = classnames('tag-suggestions', {\n visible: this.state.autoSuggest,\n });\n\n return (\n <div className=\"tags-wrap field value-field\">\n {tags.length > 0 && <div className=\"tags-list\">{tags}</div>}\n\n <div className=\"tags-input\">\n <input\n type=\"text\"\n onChange={this.handleOnChange}\n onFocus={this.showSuggestions}\n onKeyUp={this.handleKeyUp}\n value={tagInput.replace(/,|\\s+/, '')}\n ref=\"taginput\"\n />\n\n <TextareaAutosize\n className=\"field value-field\"\n value={this.state.pageTags.toString()}\n hidden\n />\n </div>\n {suggests.length > 0 && (\n <div className={suggestionClasses}>\n <ul>{suggests}</ul>\n <div className=\"close-suggestions\" onClick={this.closeSuggestions}>\n Close suggestions\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n\nMetaTags.defaultProps = {\n fieldValue: [],\n suggestions: [],\n};\n\nMetaTags.propTypes = {\n updateFieldValue: PropTypes.func.isRequired,\n nameAttr: PropTypes.any.isRequired,\n suggestions: PropTypes.array,\n fieldValue: PropTypes.any,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport TextareaAutosize from 'react-textarea-autosize';\nimport DateTimePicker from 'react-widgets/lib/DateTimePicker';\nimport DropdownList from 'react-widgets/lib/DropdownList';\nimport moment from 'moment';\nimport momentLocalizer from 'react-widgets-moment';\nimport FilePicker from '../FilePicker';\nimport MetaTags from './MetaTags';\nimport 'react-widgets/dist/css/react-widgets.css';\n\nmomentLocalizer(moment);\n\nexport class MetaSimple extends Component {\n handleEditableChange = e => {\n const { nameAttr, updateFieldValue } = this.props;\n updateFieldValue(nameAttr, e.target.value);\n };\n\n handleDatepickerChange = (date, dateStr) => {\n const { nameAttr, updateFieldValue } = this.props;\n let formatted = moment(date).format('YYYY-MM-DD HH:mm:ss');\n updateFieldValue(nameAttr, formatted);\n };\n\n handleEditableBlur = e => {\n const { nameAttr, updateFieldValue } = this.props;\n updateFieldValue(nameAttr, e.target.value.trim());\n };\n\n renderEditable() {\n const { fieldValue } = this.props;\n return (\n <TextareaAutosize\n onChange={this.handleEditableChange}\n onBlur={this.handleEditableBlur}\n className=\"field value-field\"\n value={`${fieldValue}`}\n />\n );\n }\n\n renderDatepicker() {\n const { fieldValue } = this.props;\n let dateValue = new Date(fieldValue);\n if (`${dateValue}` === 'Invalid Date') dateValue = null;\n return (\n <DateTimePicker\n onChange={this.handleDatepickerChange}\n className=\"date-field\"\n value={dateValue}\n />\n );\n }\n\n onPickItem = path => {\n const { nameAttr, updateFieldValue } = this.props;\n this.refs.imagepicker.value = path;\n updateFieldValue(nameAttr, path);\n };\n\n renderStaticFilePicker() {\n const { fieldValue } = this.props;\n return (\n <div className=\"imagepicker\">\n <TextareaAutosize\n onChange={this.handleEditableChange}\n className=\"field value-field\"\n value={fieldValue}\n ref=\"imagepicker\"\n />\n <FilePicker onPick={this.onPickItem} />\n </div>\n );\n }\n\n handleLayoutChange = value => {\n const { nameAttr, updateFieldValue } = this.props;\n updateFieldValue(nameAttr, value);\n };\n\n renderLayoutPicker() {\n const { fieldValue, siteMeta } = this.props;\n\n if (!siteMeta) return this.renderEditable();\n const layouts = siteMeta.layouts || [];\n\n return (\n <DropdownList\n className=\"layout-field\"\n data={['none', ...layouts]}\n defaultValue={fieldValue}\n onChange={this.handleLayoutChange}\n />\n );\n }\n\n renderTagsInput(key) {\n const { fieldValue, nameAttr, updateFieldValue, siteMeta } = this.props;\n const suggestions = (siteMeta && siteMeta[key]) || [];\n\n return (\n <MetaTags\n fieldValue={fieldValue}\n nameAttr={nameAttr}\n updateFieldValue={updateFieldValue}\n suggestions={suggestions}\n />\n );\n }\n\n render() {\n const { fieldKey, nameAttr } = this.props;\n\n let node;\n switch (fieldKey) {\n case 'date':\n node = this.renderDatepicker();\n break;\n case 'image':\n case 'file':\n node = this.renderStaticFilePicker();\n break;\n case 'tags':\n case 'categories':\n node = this.renderTagsInput(fieldKey);\n break;\n default:\n node = this.renderEditable();\n }\n\n if (nameAttr === \"metadata['layout']\") {\n node = this.renderLayoutPicker();\n }\n\n return <div className=\"meta-value\">{node}</div>;\n }\n}\n\nMetaSimple.propTypes = {\n parentType: PropTypes.string.isRequired,\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any,\n updateFieldValue: PropTypes.func.isRequired,\n nameAttr: PropTypes.any.isRequired,\n siteMeta: PropTypes.object,\n};\n\nexport default MetaSimple;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Icon from '../Icon';\n\nexport default class MetaButtons extends Component {\n state = {\n dropdown: false,\n };\n\n fieldTypes = {\n simple: {\n icon: 'pencil',\n label: 'Simple',\n },\n array: {\n icon: 'list-ol',\n label: 'List',\n },\n object: {\n icon: 'th-large',\n label: 'Object',\n },\n };\n\n fieldTypeKeys = Object.keys(this.fieldTypes);\n\n toggleDropdownState = () => {\n this.setState(state => {\n return { dropdown: !state.dropdown };\n });\n };\n\n renderDropdownItems(type) {\n const { onConvertClick, parentKey } = this.props;\n\n if (parentKey === 'tags') return null;\n\n return this.fieldTypeKeys\n .map((ftype, i) => {\n if (type !== ftype) {\n const { icon, label } = this.fieldTypes[ftype];\n return (\n <span key={i} onMouseDown={() => onConvertClick(ftype)}>\n <Icon name={icon} />\n Convert to {label}\n </span>\n );\n }\n\n return null;\n })\n .filter(Boolean);\n }\n\n render() {\n const {\n currentType,\n parentType,\n onRemoveClick,\n isDefaultField,\n } = this.props;\n const sortableHandle = (\n <span className=\"move\">\n <Icon name=\"arrows\" />\n </span>\n );\n\n const dropdownClasses = classnames('dropdown', {\n 'showing-dropdown': this.state.dropdown,\n });\n\n return (\n <div className=\"meta-buttons\">\n {parentType === 'array' && sortableHandle}\n <span className={dropdownClasses}>\n <a\n className=\"meta-button\"\n tabIndex=\"1\"\n onClick={this.toggleDropdownState}\n onBlur={() => this.setState({ dropdown: false })}\n >\n <Icon name=\"chevron-down\" />\n </a>\n <div className=\"dropdown-wrap\">\n {this.renderDropdownItems(currentType)}\n <span onMouseDown={() => onRemoveClick()} className=\"remove-field\">\n <Icon name={isDefaultField ? 'undo' : 'trash-o'} />\n {isDefaultField ? 'Revert to default' : 'Remove field'}\n </span>\n </div>\n </span>\n </div>\n );\n }\n}\n\nMetaButtons.propTypes = {\n currentType: PropTypes.string.isRequired,\n parentType: PropTypes.string.isRequired,\n onConvertClick: PropTypes.func.isRequired,\n onRemoveClick: PropTypes.func.isRequired,\n parentKey: PropTypes.string,\n isDefaultField: PropTypes.bool,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { findDOMNode } from 'react-dom';\nimport MetaArray from './MetaArray';\nimport MetaObject from './MetaObject';\nimport MetaSimple from './MetaSimple';\nimport MetaButtons from './MetaButtons';\n\nexport class MetaObjectItem extends Component {\n handleConvertClick(type) {\n const { convertField, nameAttr } = this.props;\n convertField(nameAttr, type);\n }\n\n handleKeyBlur() {\n const { namePrefix, fieldKey, updateFieldKey } = this.props;\n let currentValue = findDOMNode(this.refs.field_key).value;\n if (fieldKey !== currentValue && currentValue !== '') {\n updateFieldKey(namePrefix, fieldKey, currentValue);\n }\n }\n\n handleRemoveClick() {\n const { removeField, namePrefix, fieldKey } = this.props;\n removeField(namePrefix, fieldKey);\n }\n\n render() {\n const {\n type,\n fieldKey,\n fieldValue,\n nameAttr,\n addField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n convertField,\n key_prefix,\n moveArrayItem,\n } = this.props;\n const FieldTypes = {\n array: MetaArray,\n object: MetaObject,\n simple: MetaSimple,\n };\n const CurrentComponent = FieldTypes[type];\n return (\n <div ref=\"wrap\" className=\"object-item-wrap\">\n <div className={`object-key ${type}`}>\n <input\n ref=\"field_key\"\n onBlur={e => this.handleKeyBlur(e)}\n defaultValue={fieldKey}\n className=\"field key-field\"\n type=\"text\"\n placeholder=\"Key\"\n />\n <MetaButtons\n currentType={type}\n parentType=\"object\"\n onConvertClick={type => this.handleConvertClick(type)}\n onRemoveClick={() => this.handleRemoveClick()}\n />\n </div>\n <div className=\"object-value\">\n <CurrentComponent\n key_prefix={key_prefix}\n parentType=\"object\"\n fieldKey={fieldKey}\n fieldValue={fieldValue}\n addField={addField}\n removeField={removeField}\n updateFieldKey={updateFieldKey}\n updateFieldValue={updateFieldValue}\n moveArrayItem={moveArrayItem}\n convertField={convertField}\n nameAttr={nameAttr}\n namePrefix={nameAttr}\n />\n </div>\n </div>\n );\n }\n}\n\nMetaObjectItem.propTypes = {\n type: PropTypes.string.isRequired,\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any.isRequired,\n nameAttr: PropTypes.string.isRequired,\n namePrefix: PropTypes.string.isRequired,\n addField: PropTypes.func.isRequired,\n removeField: PropTypes.func.isRequired,\n convertField: PropTypes.func.isRequired,\n updateFieldKey: PropTypes.func.isRequired,\n updateFieldValue: PropTypes.func.isRequired,\n moveArrayItem: PropTypes.func.isRequired,\n key_prefix: PropTypes.string.isRequired,\n};\nexport default MetaObjectItem;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'underscore';\nimport MetaObjectItem from './MetaObjectItem';\nimport { computeFieldType } from '../../utils/metadata';\n\nexport class MetaObject extends Component {\n render() {\n const {\n fieldKey,\n fieldValue,\n namePrefix,\n addField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n convertField,\n key_prefix,\n moveArrayItem,\n } = this.props;\n const items = _.map(fieldValue, (value, key) => {\n const type = computeFieldType(value, key);\n return (\n <MetaObjectItem\n key={key}\n key_prefix={key_prefix}\n fieldKey={key}\n fieldValue={value}\n type={type}\n addField={addField}\n removeField={removeField}\n updateFieldKey={updateFieldKey}\n updateFieldValue={updateFieldValue}\n moveArrayItem={moveArrayItem}\n convertField={convertField}\n nameAttr={`${namePrefix}['${key}']`}\n namePrefix={namePrefix}\n />\n );\n });\n return (\n <div className=\"meta-value-object\">\n {items}\n <a\n onClick={() => addField(namePrefix)}\n className=\"add-field-object\"\n title=\"Add new key/value pair\"\n >\n New key/value pair under <strong>{fieldKey}</strong>\n </a>\n </div>\n );\n }\n}\n\nMetaObject.propTypes = {\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any.isRequired,\n nameAttr: PropTypes.string.isRequired,\n namePrefix: PropTypes.string.isRequired,\n addField: PropTypes.func.isRequired,\n removeField: PropTypes.func.isRequired,\n convertField: PropTypes.func.isRequired,\n updateFieldKey: PropTypes.func.isRequired,\n updateFieldValue: PropTypes.func.isRequired,\n moveArrayItem: PropTypes.func.isRequired,\n key_prefix: PropTypes.string.isRequired,\n};\n\nexport default MetaObject;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport MetaArray from './MetaArray';\nimport MetaObject from './MetaObject';\nimport MetaSimple from './MetaSimple';\nimport MetaButtons from './MetaButtons';\n\nexport class MetaArrayItem extends Component {\n handleConvertClick(type) {\n const { convertField, nameAttr } = this.props;\n convertField(nameAttr, type);\n }\n\n handleRemoveClick() {\n const { removeField, namePrefix, index } = this.props;\n removeField(namePrefix, index);\n }\n\n render() {\n const {\n type,\n fieldKey,\n fieldValue,\n index,\n nameAttr,\n addField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n moveArrayItem,\n convertField,\n key_prefix,\n } = this.props;\n const FieldTypes = {\n array: MetaArray,\n object: MetaObject,\n simple: MetaSimple,\n };\n const CurrentComponent = FieldTypes[type];\n return (\n <div ref=\"wrap\" data-id={index} className=\"array-item-wrap\">\n <div className=\"array\">\n <div className=\"array-header\">\n <span className=\"array-field-num\">{index + 1}.</span>\n <MetaButtons\n currentType={type}\n parentType=\"array\"\n onConvertClick={type => this.handleConvertClick(type)}\n onRemoveClick={() => this.handleRemoveClick()}\n />\n </div>\n <CurrentComponent\n key_prefix={key_prefix}\n parentType=\"array\"\n fieldKey={fieldKey}\n fieldValue={fieldValue}\n addField={addField}\n removeField={removeField}\n updateFieldKey={updateFieldKey}\n updateFieldValue={updateFieldValue}\n moveArrayItem={moveArrayItem}\n convertField={convertField}\n nameAttr={nameAttr}\n namePrefix={nameAttr}\n />\n </div>\n </div>\n );\n }\n}\n\nMetaArrayItem.propTypes = {\n type: PropTypes.string.isRequired,\n index: PropTypes.number.isRequired,\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any.isRequired,\n addField: PropTypes.func.isRequired,\n removeField: PropTypes.func.isRequired,\n updateFieldKey: PropTypes.func.isRequired,\n updateFieldValue: PropTypes.func.isRequired,\n moveArrayItem: PropTypes.func.isRequired,\n convertField: PropTypes.func.isRequired,\n nameAttr: PropTypes.string.isRequired,\n namePrefix: PropTypes.string.isRequired,\n key_prefix: PropTypes.string.isRequired,\n};\n\nexport default MetaArrayItem;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Sortable from 'sortablejs';\nimport Icon from '../Icon';\nimport MetaArrayItem from './MetaArrayItem';\nimport { computeFieldType } from '../../utils/metadata';\n\nexport class MetaArray extends Component {\n sortableGroupDecorator(component) {\n const { moveArrayItem, namePrefix } = this.props;\n if (component) {\n const options = {\n draggable: '.array-item-wrap',\n group: { name: 'meta-array-items', pull: false, put: false },\n handle: '.move',\n animation: 0,\n onEnd: e => {\n let srcInd = e.item.getAttribute('data-id');\n moveArrayItem(namePrefix, srcInd, e.newIndex);\n },\n };\n Sortable.create(component, options);\n }\n }\n\n render() {\n const {\n fieldKey,\n fieldValue,\n namePrefix,\n addField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n moveArrayItem,\n convertField,\n key_prefix,\n } = this.props;\n const items = fieldValue.map((item, i) => {\n const type = computeFieldType(item);\n return (\n <MetaArrayItem\n key={`${key_prefix}-${i}`}\n key_prefix={key_prefix}\n index={i}\n fieldKey={fieldKey}\n fieldValue={item}\n type={type}\n addField={addField}\n removeField={removeField}\n updateFieldKey={updateFieldKey}\n updateFieldValue={updateFieldValue}\n moveArrayItem={moveArrayItem}\n convertField={convertField}\n nameAttr={`${namePrefix}[${i}]`}\n namePrefix={namePrefix}\n />\n );\n });\n return (\n <div\n className=\"meta-value-array\"\n ref={this.sortableGroupDecorator.bind(this)}\n >\n {items}\n <a\n onClick={() => addField(namePrefix)}\n className=\"add-field-array\"\n title=\"Add new list item\"\n >\n <Icon name=\"plus\" />\n </a>\n </div>\n );\n }\n}\n\nMetaArray.propTypes = {\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any.isRequired,\n nameAttr: PropTypes.string.isRequired,\n namePrefix: PropTypes.string.isRequired,\n addField: PropTypes.func.isRequired,\n removeField: PropTypes.func.isRequired,\n updateFieldKey: PropTypes.func.isRequired,\n updateFieldValue: PropTypes.func.isRequired,\n convertField: PropTypes.func.isRequired,\n moveArrayItem: PropTypes.func.isRequired,\n key_prefix: PropTypes.string.isRequired,\n};\n\nexport default MetaArray;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { findDOMNode } from 'react-dom';\nimport MetaArray from './MetaArray';\nimport MetaObject from './MetaObject';\nimport MetaSimple from './MetaSimple';\nimport MetaButtons from './MetaButtons';\n\nexport class MetaField extends Component {\n componentDidMount() {\n const isNewField = /New field/.test(this.props.fieldKey);\n isNewField && this.refs.field_key.select();\n }\n\n handleConvertClick(type) {\n const { convertField, nameAttr } = this.props;\n convertField(nameAttr, type);\n }\n\n handleKeyBlur() {\n const { namePrefix, fieldKey, updateFieldKey } = this.props;\n let currentValue = findDOMNode(this.refs.field_key).value;\n if (fieldKey !== currentValue && currentValue !== '') {\n updateFieldKey(namePrefix, fieldKey, currentValue);\n }\n }\n\n handleRemoveClick() {\n const { removeField, namePrefix, fieldKey } = this.props;\n removeField(namePrefix, fieldKey);\n }\n\n render() {\n const {\n type,\n parentType,\n fieldKey,\n fieldValue,\n namePrefix,\n addField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n moveArrayItem,\n convertField,\n key_prefix,\n siteMeta,\n isInDefaultState,\n isDefaultField,\n } = this.props;\n\n const FieldTypes = {\n array: MetaArray,\n object: MetaObject,\n simple: MetaSimple,\n };\n const CurrentComponent = FieldTypes[type];\n return (\n <div ref=\"wrap\" className=\"metafield\">\n <div className={`meta-key ${type}`}>\n <input\n ref=\"field_key\"\n onBlur={() => this.handleKeyBlur()}\n defaultValue={fieldKey}\n className=\"field key-field\"\n type=\"text\"\n placeholder=\"Key\"\n disabled={isInDefaultState}\n />\n <MetaButtons\n currentType={type}\n isDefaultField={isDefaultField}\n parentType=\"top\"\n parentKey={fieldKey}\n onConvertClick={type => this.handleConvertClick(type)}\n onRemoveClick={() => this.handleRemoveClick()}\n />\n </div>\n <CurrentComponent\n key_prefix={key_prefix}\n fieldKey={fieldKey}\n parentType={parentType}\n fieldValue={fieldValue}\n addField={addField}\n removeField={removeField}\n updateFieldKey={updateFieldKey}\n updateFieldValue={updateFieldValue}\n moveArrayItem={moveArrayItem}\n convertField={convertField}\n nameAttr={`${namePrefix}['${fieldKey}']`}\n namePrefix={`${namePrefix}['${fieldKey}']`}\n siteMeta={siteMeta}\n isInDefaultState={isInDefaultState}\n />\n </div>\n );\n }\n}\n\nMetaField.propTypes = {\n type: PropTypes.string.isRequired,\n parentType: PropTypes.string.isRequired,\n addField: PropTypes.func.isRequired,\n removeField: PropTypes.func.isRequired,\n updateFieldKey: PropTypes.func.isRequired,\n updateFieldValue: PropTypes.func.isRequired,\n moveArrayItem: PropTypes.func.isRequired,\n convertField: PropTypes.func.isRequired,\n fieldKey: PropTypes.string.isRequired,\n fieldValue: PropTypes.any,\n nameAttr: PropTypes.string.isRequired,\n namePrefix: PropTypes.string.isRequired,\n key_prefix: PropTypes.string.isRequired,\n siteMeta: PropTypes.object,\n isInDefaultState: PropTypes.bool,\n isDefaultField: PropTypes.bool,\n};\n\nexport default MetaField;\n","import {\n addFieldToMetadata,\n removeFieldFromMetadata,\n updateMetadataFieldKey,\n updateMetadataFieldValue,\n moveMetadataArrayItem,\n convertMetadataField,\n} from '../utils/metadata';\n\n// Action Types\nexport const UPDATE_TITLE = 'UPDATE_TITLE';\nexport const UPDATE_BODY = 'UPDATE_BODY';\nexport const UPDATE_PATH = 'UPDATE_PATH';\nexport const STORE_CONTENT_FIELDS = 'STORE_CONTENT_FIELDS';\nexport const ADD_METAFIELD = 'ADD_METAFIELD';\nexport const REMOVE_METAFIELD = 'REMOVE_METAFIELD';\nexport const UPDATE_FIELD_KEY = 'UPDATE_FIELD_KEY';\nexport const UPDATE_FIELD_VALUE = 'UPDATE_FIELD_VALUE';\nexport const MOVE_ARRAY_ITEM = 'MOVE_ARRAY_ITEM';\nexport const CONVERT_FIELD = 'CONVERT_FIELD';\nexport const ENABLE_FIELD = 'ENABLE_FIELD';\n\n// Actions\nexport const storeContentFields = content => ({\n type: STORE_CONTENT_FIELDS,\n content,\n});\n\nexport const addField = namePrefix => ({\n type: ADD_METAFIELD,\n namePrefix,\n});\n\nexport const removeField = (namePrefix, key) => ({\n type: REMOVE_METAFIELD,\n namePrefix,\n key,\n});\n\nexport const enableField = (nameAttr, value) => ({\n type: ENABLE_FIELD,\n nameAttr,\n value,\n});\n\nexport const updateFieldKey = (namePrefix, fieldKey, newKey) => ({\n type: UPDATE_FIELD_KEY,\n namePrefix,\n fieldKey,\n newKey,\n});\n\nexport const updateFieldValue = (nameAttr, value) => ({\n type: UPDATE_FIELD_VALUE,\n nameAttr,\n value,\n});\n\nexport const moveArrayItem = (namePrefix, srcInd, targetInd) => ({\n type: MOVE_ARRAY_ITEM,\n namePrefix,\n srcInd,\n targetInd,\n});\n\nexport const convertField = (nameAttr, convertType) => ({\n type: CONVERT_FIELD,\n nameAttr,\n convertType,\n});\n\nexport const updateTitle = title => ({\n type: UPDATE_TITLE,\n title,\n});\n\nexport const updateBody = body => ({\n type: UPDATE_BODY,\n body,\n});\n\nexport const updatePath = path => ({\n type: UPDATE_PATH,\n path,\n});\n\n// Reducer\nexport default function metadata( // TODO normalize the metadata\n state = {\n metadata: {},\n new_field_count: 1,\n key_prefix: '', // force children to be rerendered on sort\n fieldChanged: false,\n },\n action\n) {\n switch (action.type) {\n case UPDATE_TITLE:\n return {\n ...state,\n metadata: {\n ...state.metadata,\n title: action.title,\n },\n fieldChanged: true,\n };\n case UPDATE_BODY:\n return {\n ...state,\n metadata: {\n ...state.metadata,\n raw_content: action.body,\n },\n fieldChanged: true,\n };\n case UPDATE_PATH:\n return {\n ...state,\n metadata: {\n ...state.metadata,\n path: action.path,\n },\n fieldChanged: true,\n };\n case STORE_CONTENT_FIELDS:\n return {\n ...state,\n metadata: action.content,\n };\n case ADD_METAFIELD:\n return {\n ...state,\n metadata: addFieldToMetadata(state, action.namePrefix),\n new_field_count: state.new_field_count + 1,\n };\n case REMOVE_METAFIELD:\n return {\n ...state,\n metadata: removeFieldFromMetadata(state, action.namePrefix, action.key),\n fieldChanged: true,\n key_prefix: `${Math.random() * 100}`,\n };\n case UPDATE_FIELD_KEY:\n return {\n ...state,\n metadata: updateMetadataFieldKey(\n state,\n action.namePrefix,\n action.fieldKey,\n action.newKey.trim()\n ),\n fieldChanged: true,\n };\n case UPDATE_FIELD_VALUE:\n return {\n ...state,\n metadata: updateMetadataFieldValue(\n state,\n action.nameAttr,\n action.value\n ),\n fieldChanged: true,\n };\n case MOVE_ARRAY_ITEM:\n return {\n ...state,\n metadata: moveMetadataArrayItem(\n state,\n action.namePrefix,\n action.srcInd,\n action.targetInd\n ),\n key_prefix: `${Math.random() * 100}`,\n fieldChanged: true,\n };\n case CONVERT_FIELD:\n return {\n ...state,\n metadata: convertMetadataField(\n state,\n action.nameAttr,\n action.convertType\n ),\n new_field_count: state.new_field_count + 1,\n fieldChanged: true,\n };\n case ENABLE_FIELD:\n return {\n ...state,\n metadata: updateMetadataFieldValue(\n state,\n action.nameAttr,\n action.value\n ),\n fieldChanged: true,\n };\n default:\n return {\n ...state,\n fieldChanged: false,\n };\n }\n}\n","import { getSiteMetaUrl } from '../constants/api';\nimport { get } from '../utils/fetch';\n\n// Action Types\nexport const FETCH_SITE_META_REQUEST = 'FETCH_SITE_META_REQUEST';\nexport const FETCH_SITE_META_SUCCESS = 'FETCH_SITE_META_SUCCESS';\nexport const FETCH_SITE_META_FAILURE = 'FETCH_SITE_META_FAILURE';\n\n// Actions\nexport const fetchSiteMeta = () => dispatch => {\n dispatch({ type: FETCH_SITE_META_REQUEST });\n return get(\n getSiteMetaUrl(),\n { type: FETCH_SITE_META_SUCCESS, name: 'site' },\n { type: FETCH_SITE_META_FAILURE, name: 'error' },\n dispatch\n );\n};\n\n// Reducer\nexport default function siteMeta(\n state = {\n site: {},\n isFetching: false,\n },\n action\n) {\n switch (action.type) {\n case FETCH_SITE_META_REQUEST:\n return {\n ...state,\n isFetching: true,\n };\n case FETCH_SITE_META_SUCCESS:\n return {\n ...state,\n site: action.site,\n isFetching: false,\n };\n case FETCH_SITE_META_FAILURE:\n return {\n ...state,\n isFetching: false,\n };\n default:\n return state;\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport _ from 'underscore';\nimport StaticMetaField from '../components/metadata/statics/StaticMetaField';\nimport MetaField from '../components/metadata/MetaField';\nimport Icon from '../components/Icon';\nimport {\n storeContentFields,\n addField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n moveArrayItem,\n convertField,\n enableField,\n} from '../ducks/metadata';\nimport { fetchSiteMeta } from '../ducks/siteMeta';\nimport { computeFieldType } from '../utils/metadata';\n\nexport class MetaFields extends Component {\n componentDidMount() {\n const { storeContentFields, fields, fetchSiteMeta, dataview } = this.props;\n if (!dataview) fetchSiteMeta();\n storeContentFields(fields);\n }\n\n shouldComponentUpdate(nextProps) {\n return !_.isEqual(nextProps.metadata, this.props.metadata);\n }\n\n render() {\n const {\n metadata,\n addField,\n enableField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n moveArrayItem,\n convertField,\n key_prefix,\n dataview,\n site,\n staticFields,\n } = this.props;\n\n let visibleKeys = { ...staticFields, ...metadata };\n\n if (!dataview) {\n visibleKeys = _.omit(visibleKeys, ['title', 'path', 'raw_content']);\n }\n\n const metafieldsClass = classnames({\n datafields: dataview,\n metafields: !dataview,\n });\n\n const defaultFieldsNotOverwritten = _.omit(\n staticFields,\n Object.keys(metadata)\n );\n\n const metafields = _.map(visibleKeys, (field, key) => {\n const type = computeFieldType(field, key);\n if (defaultFieldsNotOverwritten.hasOwnProperty(key)) {\n return (\n <StaticMetaField\n key={key}\n type={type}\n fieldKey={key}\n fieldValue={field}\n enableField={enableField}\n />\n );\n }\n\n return (\n <MetaField\n key={key}\n key_prefix={key_prefix}\n type={type}\n parentType=\"top\"\n fieldKey={key}\n fieldValue={field}\n addField={addField}\n removeField={removeField}\n updateFieldKey={updateFieldKey}\n updateFieldValue={updateFieldValue}\n moveArrayItem={moveArrayItem}\n convertField={convertField}\n nameAttr={`metadata['${key}']`}\n namePrefix={`metadata`}\n siteMeta={dataview ? null : site}\n isInDefaultState={defaultFieldsNotOverwritten.hasOwnProperty(key)}\n isDefaultField={staticFields && staticFields.hasOwnProperty(key)}\n />\n );\n });\n\n const newWrapper = dataview ? (\n <div className=\"data-new\">\n <a onClick={() => addField('metadata')}>\n <Icon name=\"plus-circle\" /> New data field\n </a>\n </div>\n ) : (\n <div className=\"meta-new\">\n <a onClick={() => addField('metadata')} className=\"tooltip\">\n <Icon name=\"plus-circle\" /> New metadata field\n <span className=\"tooltip-text\">\n Metadata will be stored as the <b>YAML front matter</b> within the\n document.\n </span>\n </a>\n <small className=\"tooltip pull-right\">\n <Icon name=\"info-circle\" />\n Special Keys\n <span className=\"tooltip-text\">\n You can use special keys like <b>date</b>, <b>file</b>, <b>image</b>\n , <b>layout</b> or <b>tags</b> for user-friendly functionalities.\n </span>\n </small>\n </div>\n );\n\n return (\n <div className={metafieldsClass}>\n {metafields}\n {newWrapper}\n </div>\n );\n }\n}\n\nMetaFields.propTypes = {\n fields: PropTypes.object.isRequired,\n metadata: PropTypes.object.isRequired,\n key_prefix: PropTypes.string.isRequired,\n storeContentFields: PropTypes.func.isRequired,\n addField: PropTypes.func.isRequired,\n removeField: PropTypes.func.isRequired,\n updateFieldKey: PropTypes.func.isRequired,\n updateFieldValue: PropTypes.func.isRequired,\n moveArrayItem: PropTypes.func.isRequired,\n convertField: PropTypes.func.isRequired,\n fetchSiteMeta: PropTypes.func.isRequired,\n dataview: PropTypes.bool,\n site: PropTypes.object,\n staticFields: PropTypes.object.isRequired,\n enableField: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = state => ({\n metadata: state.metadata.metadata,\n key_prefix: state.metadata.key_prefix,\n site: state.meta.site,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n storeContentFields,\n fetchSiteMeta,\n addField,\n enableField,\n removeField,\n updateFieldKey,\n updateFieldValue,\n moveArrayItem,\n convertField,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(MetaFields);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport MetaFields from '../containers/MetaFields';\n\nclass DataGUI extends Component {\n handleChange = e => this.props.onChange(e.target.value);\n\n renderPathFields(slug, ext) {\n return (\n <form className=\"datafile-path\">\n <fieldset className=\"filename\">\n <legend>Path (without extension)</legend>\n <input\n type=\"text\"\n id=\"path\"\n defaultValue={slug}\n placeholder=\"filename\"\n onChange={this.handleChange}\n ref=\"filepath\"\n />\n </fieldset>\n <fieldset className=\"file-type\">\n <legend>File Type</legend>\n <select\n id=\"extn\"\n defaultValue={ext}\n onChange={this.handleChange}\n ref=\"extname\"\n >\n <option value=\".yml\">YAML</option>\n <option value=\".json\">JSON</option>\n </select>\n </fieldset>\n </form>\n );\n }\n\n render() {\n const { fields, slug, ext, restricted } = this.props;\n return (\n <div>\n <div className=\"warning\">\n CAUTION! Any existing comments will be lost when editing via this\n view. Switch to the <strong>Raw Editor</strong> to preserve them.\n </div>\n {!restricted && this.renderPathFields(slug, ext)}\n <MetaFields fields={fields} dataview />\n </div>\n );\n }\n}\n\nDataGUI.defaultProps = {\n fields: {},\n slug: '',\n ext: '',\n restricted: false,\n};\n\nDataGUI.propTypes = {\n onChange: PropTypes.func.isRequired,\n fields: PropTypes.object,\n slug: PropTypes.string,\n ext: PropTypes.string,\n restricted: PropTypes.bool,\n};\n\nexport default DataGUI;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport AceEditor from 'react-ace';\nimport 'brace/mode/json';\nimport 'brace/mode/yaml';\nimport 'brace/theme/monokai';\n\nclass Editor extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n return nextProps.content !== this.props.content;\n }\n\n handleChange = () => {\n const { onEditorChange, editorChanged } = this.props;\n !editorChanged && onEditorChange();\n };\n\n getValue() {\n return this.refs.ace.editor.getValue();\n }\n\n render() {\n const { content, type } = this.props;\n const mode = /json/i.test(type) ? 'json' : 'yaml';\n return (\n <div>\n <AceEditor\n value={content}\n mode={mode}\n theme=\"monokai\"\n width=\"100%\"\n height=\"400px\"\n showGutter={false}\n showPrintMargin={false}\n highlightActiveLine={false}\n className=\"config-editor\"\n fontSize={14}\n scrollMargin={[15, 15, 15, 15]}\n ref=\"ace\"\n onChange={this.handleChange}\n />\n <div className=\"statusbar\">mode: {mode.toUpperCase()}</div>\n </div>\n );\n }\n}\n\nEditor.propTypes = {\n content: PropTypes.any.isRequired,\n onEditorChange: PropTypes.func.isRequired,\n editorChanged: PropTypes.bool.isRequired,\n type: PropTypes.string,\n};\n\nexport default Editor;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'underscore';\n\nconst Errors = ({ errors }) => (\n <div className=\"error-messages\">\n {_.map(errors, (error, i) => <div key={i}>{error}</div>)}\n </div>\n);\n\nErrors.propTypes = {\n errors: PropTypes.array.isRequired,\n};\n\nexport default Errors;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Icon from './Icon';\n\nimport translations from '../translations';\nconst { labels } = translations;\n\nconst iconMap = {\n create: 'plus-square',\n delete: 'trash',\n publish: 'send-o',\n save: 'save',\n upload: 'upload',\n view: 'eye',\n};\n\nexport default function Button({\n type,\n active,\n triggered,\n onClick,\n block,\n thin,\n icon,\n to,\n}) {\n const btnClass = classnames('btn', {\n 'btn-active': active,\n 'btn-success': active && (type === 'save' || type === 'create'),\n 'btn-delete': type === 'delete',\n 'btn-view': type === 'view' || type === 'publish',\n 'btn-inactive': !active,\n 'btn-fat': block,\n 'btn-thin': thin,\n });\n\n let label, triggeredLabel;\n switch (type) {\n case 'save':\n case 'create':\n label = labels[type].label;\n triggeredLabel = labels[type].triggeredLabel;\n break;\n case 'view-toggle':\n label = labels.viewToggle.label;\n triggeredLabel = labels.viewToggle.triggeredLabel;\n break;\n case 'view':\n case 'delete':\n case 'upload':\n case 'publish':\n label = labels[type].label;\n break;\n default:\n label = '<LABEL>';\n triggeredLabel = '<NEXT LABEL>';\n }\n\n const iconName = icon || iconMap[type];\n const iconNode = iconName && <Icon name={iconName} />;\n\n if (to) {\n return (\n <a href={to} target=\"_blank\" rel=\"noopener noreferrer\" className={btnClass}>\n {iconNode}\n {label}\n </a>\n );\n } else if (onClick) {\n return (\n <button onClick={onClick} className={btnClass}>\n {iconNode}\n {triggered ? triggeredLabel : label}\n </button>\n );\n }\n\n return null;\n}\n\nButton.propTypes = {\n type: PropTypes.string.isRequired,\n active: PropTypes.bool.isRequired,\n onClick: PropTypes.func,\n triggered: PropTypes.bool,\n block: PropTypes.bool,\n thin: PropTypes.bool,\n icon: PropTypes.string,\n to: PropTypes.string,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { withRouter } from 'react-router';\nimport { HotKeys } from 'react-hotkeys';\nimport DocumentTitle from 'react-document-title';\nimport DataGUI from '../../components/DataGUI';\nimport Editor from '../../components/Editor';\nimport Errors from '../../components/Errors';\nimport Button from '../../components/Button';\nimport { putConfig, onEditorChange } from '../../ducks/config';\nimport { clearErrors } from '../../ducks/utils';\nimport { preventDefault } from '../../utils/helpers';\n\nimport translations from '../../translations';\nconst { getLeaveMessage } = translations;\n\nexport class Configuration extends Component {\n state = {\n guiView: false,\n };\n\n componentDidMount() {\n const { router, route } = this.props;\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n const { editorChanged, fieldChanged } = this.props;\n if (editorChanged || fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n toggleView = () => {\n this.setState(state => {\n return { guiView: !state.guiView };\n });\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { editorChanged, fieldChanged, putConfig } = this.props;\n if (editorChanged) {\n const value = this.refs.editor.getValue();\n putConfig(value);\n } else if (fieldChanged) {\n putConfig(null, 'gui');\n }\n };\n\n renderContentBody() {\n const { config, editorChanged, onEditorChange } = this.props;\n const { raw_content, content } = config;\n\n if (this.state.guiView && content) {\n return <DataGUI fields={content} onChange={onEditorChange} restricted />;\n }\n\n return (\n <Editor\n editorChanged={editorChanged}\n onEditorChange={onEditorChange}\n content={raw_content}\n ref=\"editor\"\n />\n );\n }\n\n render() {\n const { editorChanged, fieldChanged, updated, errors } = this.props;\n\n const keyboardHandlers = {\n save: this.handleClickSave,\n };\n\n return (\n <DocumentTitle title=\"Configuration\">\n <HotKeys handlers={keyboardHandlers} className=\"single\">\n {errors && errors.length > 0 && <Errors errors={errors} />}\n <div className=\"content-header\">\n <h1>Configuration</h1>\n <div className=\"page-buttons multiple\">\n <Button\n onClick={this.toggleView}\n type=\"view-toggle\"\n triggered={this.state.guiView}\n active\n block\n />\n <Button\n onClick={this.handleClickSave}\n type=\"save\"\n active={editorChanged || fieldChanged}\n triggered={updated}\n block\n />\n </div>\n </div>\n <div className=\"content-body\">{this.renderContentBody()}</div>\n </HotKeys>\n </DocumentTitle>\n );\n }\n}\n\nConfiguration.propTypes = {\n config: PropTypes.object.isRequired,\n onEditorChange: PropTypes.func.isRequired,\n putConfig: PropTypes.func.isRequired,\n updated: PropTypes.bool.isRequired,\n editorChanged: PropTypes.bool.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n errors: PropTypes.array.isRequired,\n clearErrors: PropTypes.func.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n config: state.config.config,\n updated: state.config.updated,\n editorChanged: state.config.editorChanged,\n fieldChanged: state.metadata.fieldChanged,\n errors: state.utils.errors,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators({ putConfig, onEditorChange, clearErrors }, dispatch);\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(Configuration)\n);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { browserHistory, Link } from 'react-router';\nimport Breadcrumbs from './Breadcrumbs';\nimport Button from './Button';\nimport Icon from './Icon';\nimport InputSearch from './form/InputSearch';\nimport { ADMIN_PREFIX } from '../constants';\n\nimport translations from '../translations';\nconst { getDeleteMessage, getNotFoundMessage } = translations;\n\nexport default class Explorer extends Component {\n handleClickDelete(filename) {\n const { deleteItem, params, type } = this.props;\n const confirm = window.confirm(getDeleteMessage(filename));\n const dir = params.splat ? `/${params.splat}` : '';\n if (confirm) {\n deleteItem(params.splat, filename);\n browserHistory.push(`${ADMIN_PREFIX}/${type}${dir}`);\n }\n }\n\n renderTitleCell(name, icon, type, path) {\n return (\n <td className=\"row-title\">\n <strong>\n <Link to={`${ADMIN_PREFIX}/${type}/${path}`}>\n <Icon name={icon} />\n {name}\n </Link>\n </strong>\n </td>\n );\n }\n\n renderDirectoryRow(directory, type, index) {\n const { name, relative_path } = directory;\n return (\n <tr key={index}>\n {this.renderTitleCell(name, 'folder', type, relative_path)}\n <td />\n </tr>\n );\n }\n\n renderFileRow(file, type, index) {\n const { name, relative_path, http_url } = file;\n return (\n <tr key={index}>\n {this.renderTitleCell(name, 'file-text-o', type, relative_path)}\n <td>\n <div className=\"row-actions\">\n <Button\n onClick={() => this.handleClickDelete(name)}\n type=\"delete\"\n active\n thin\n />\n {http_url && <Button to={http_url} type=\"view\" active thin />}\n </div>\n </td>\n </tr>\n );\n }\n\n renderRows() {\n const { items, type } = this.props;\n return items.map((entry, index) =>\n entry.type === 'directory'\n ? this.renderDirectoryRow(entry, type, index)\n : this.renderFileRow(entry, type, index)\n );\n }\n\n render() {\n const { items, type, newBtnLabel, search, params } = this.props;\n const typeLabel = type === 'datafiles' ? 'data files' : type;\n\n const to = params.splat\n ? `${ADMIN_PREFIX}/${type}/${params.splat}/new`\n : `${ADMIN_PREFIX}/${type}/new`;\n\n const content = items.length ? (\n <div className=\"content-table\">\n <table>\n <thead>\n <tr>\n <th>Filename</th>\n <th className=\"th-actions\">Actions</th>\n </tr>\n </thead>\n <tbody>{this.renderRows()}</tbody>\n </table>\n </div>\n ) : (\n <h1>{getNotFoundMessage(typeLabel)}</h1>\n );\n\n return (\n <div>\n <div className=\"content-header\">\n <Breadcrumbs type={type} splat={params.splat} />\n <div className=\"page-buttons\">\n <Link className=\"btn btn-active\" to={to}>\n {newBtnLabel}\n </Link>\n </div>\n <div className=\"pull-right\">\n <InputSearch searchBy=\"filename\" search={search} />\n </div>\n </div>\n {content}\n </div>\n );\n }\n}\n\nExplorer.propTypes = {\n type: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired,\n params: PropTypes.object.isRequired,\n newBtnLabel: PropTypes.string.isRequired,\n deleteItem: PropTypes.func.isRequired,\n search: PropTypes.func.isRequired,\n};\n","import { clearErrors, validationError, filterDeleted } from './utils';\nimport { get, put, del } from '../utils/fetch';\nimport { validatePage } from '../utils/validation';\nimport {\n slugify,\n preparePayload,\n sanitizeFrontMatter,\n computeRelativePath,\n} from '../utils/helpers';\nimport { pagesAPIUrl, pageAPIUrl } from '../constants/api';\n\n// Action Types\nexport const FETCH_PAGES_REQUEST = 'FETCH_PAGES_REQUEST';\nexport const FETCH_PAGES_SUCCESS = 'FETCH_PAGES_SUCCESS';\nexport const FETCH_PAGES_FAILURE = 'FETCH_PAGES_FAILURE';\nexport const FETCH_PAGE_REQUEST = 'FETCH_PAGE_REQUEST';\nexport const FETCH_PAGE_SUCCESS = 'FETCH_PAGE_SUCCESS';\nexport const FETCH_PAGE_FAILURE = 'FETCH_PAGE_FAILURE';\nexport const PUT_PAGE_REQUEST = 'PUT_PAGE_REQUEST';\nexport const PUT_PAGE_SUCCESS = 'PUT_PAGE_SUCCESS';\nexport const PUT_PAGE_FAILURE = 'PUT_PAGE_FAILURE';\nexport const DELETE_PAGE_REQUEST = 'DELETE_PAGE_REQUEST';\nexport const DELETE_PAGE_SUCCESS = 'DELETE_PAGE_SUCCESS';\nexport const DELETE_PAGE_FAILURE = 'DELETE_PAGE_FAILURE';\n\n// Actions\nexport const fetchPages = (directory = '') => dispatch => {\n dispatch({ type: FETCH_PAGES_REQUEST });\n return get(\n pagesAPIUrl(directory),\n { type: FETCH_PAGES_SUCCESS, name: 'pages' },\n { type: FETCH_PAGES_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const fetchPage = (directory, filename) => dispatch => {\n dispatch({ type: FETCH_PAGE_REQUEST });\n return get(\n pageAPIUrl(directory, filename),\n { type: FETCH_PAGE_SUCCESS, name: 'page' },\n { type: FETCH_PAGE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const createPage = directory => (dispatch, getState) => {\n // get edited fields from metadata state\n const metadata = getState().metadata.metadata;\n let { path, raw_content, title } = metadata;\n // if `path` is a falsy value or if appending a slash to it equals to\n // `directory`, generate filename from `title`.\n if ((!path || `${path}/` === directory) && title) {\n path = `${slugify(title)}.md`;\n } else {\n const errors = validatePage(metadata);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n }\n // clear errors\n dispatch(clearErrors());\n\n const front_matter = sanitizeFrontMatter(metadata);\n\n // send the put request\n return put(\n pageAPIUrl(directory, path),\n preparePayload({ front_matter, raw_content }),\n { type: PUT_PAGE_SUCCESS, name: 'page' },\n { type: PUT_PAGE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const putPage = (directory, filename) => (dispatch, getState) => {\n // get edited fields from metadata state\n const metadata = getState().metadata.metadata;\n let { path, raw_content, title } = metadata;\n // if `path` is a falsy value or if appending a slash to it equals to\n // `directory`, generate filename from `title`.\n if ((!path || `${path}/` === directory) && title) {\n path = `${slugify(title)}.md`;\n } else {\n const errors = validatePage(metadata);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n }\n // clear errors\n dispatch(clearErrors());\n\n const front_matter = sanitizeFrontMatter(metadata);\n const relative_path = directory ? `${directory}/${path}` : path;\n\n // send the put request\n return put(\n pageAPIUrl(directory, filename),\n preparePayload({ path: relative_path, front_matter, raw_content }),\n { type: PUT_PAGE_SUCCESS, name: 'page' },\n { type: PUT_PAGE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const deletePage = (directory, filename) => dispatch => {\n const relative_path = computeRelativePath(directory, filename);\n return del(\n pageAPIUrl(directory, filename),\n { type: DELETE_PAGE_SUCCESS, name: 'page', id: relative_path },\n { type: DELETE_PAGE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\n// Reducer\nexport default function pages(\n state = {\n pages: [],\n page: {},\n isFetching: false,\n updated: false,\n },\n action\n) {\n switch (action.type) {\n case FETCH_PAGES_REQUEST:\n case FETCH_PAGE_REQUEST:\n return {\n ...state,\n isFetching: true,\n };\n case FETCH_PAGES_SUCCESS:\n return {\n ...state,\n pages: action.pages,\n isFetching: false,\n page: {},\n };\n case FETCH_PAGES_FAILURE:\n return {\n ...state,\n isFetching: false,\n pages: [],\n };\n case FETCH_PAGE_SUCCESS:\n return {\n ...state,\n page: action.page,\n isFetching: false,\n };\n case FETCH_PAGE_FAILURE:\n return {\n ...state,\n page: {},\n isFetching: false,\n };\n case PUT_PAGE_SUCCESS:\n return {\n ...state,\n page: action.page,\n updated: true,\n };\n case DELETE_PAGE_SUCCESS:\n return {\n ...state,\n pages: filterDeleted(state.pages, action.id),\n };\n default:\n return {\n ...state,\n updated: false,\n };\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport DocumentTitle from 'react-document-title';\nimport Explorer from '../../components/Explorer';\nimport { search, filterBySearchInput } from '../../ducks/utils';\nimport { fetchPages, deletePage } from '../../ducks/pages';\nimport { getDocumentTitle } from '../../utils/helpers';\n\nexport class Pages extends Component {\n componentDidMount() {\n const { fetchPages, params } = this.props;\n fetchPages(params.splat);\n }\n\n componentWillReceiveProps(nextProps) {\n const { fetchPages } = nextProps;\n if (this.props.params.splat !== nextProps.params.splat) {\n fetchPages(nextProps.params.splat);\n }\n }\n\n render() {\n const { isFetching, pages, search, params, deletePage } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n const title = getDocumentTitle('pages', params.splat);\n\n return (\n <DocumentTitle title={title}>\n <Explorer\n type=\"pages\"\n items={pages}\n params={params}\n newBtnLabel=\"New page\"\n search={search}\n deleteItem={deletePage}\n />\n </DocumentTitle>\n );\n }\n}\n\nPages.propTypes = {\n pages: PropTypes.array.isRequired,\n fetchPages: PropTypes.func.isRequired,\n deletePage: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n search: PropTypes.func.isRequired,\n params: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n pages: filterBySearchInput(state.pages.pages, state.utils.input),\n isFetching: state.pages.isFetching,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchPages,\n deletePage,\n search,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Pages);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport TextareaAutosize from 'react-textarea-autosize';\nimport moment from 'moment';\nimport Icon from '../Icon';\n\nexport default class InputFilename extends Component {\n handleChange = e => {\n const { onChange } = this.props;\n\n // The `TextareaAutosize` has a `value` attribute\n // which is supposed to be set to its inner `TextArea`'s value\n // but is always undefined\n // So this is a workaround\n this.refs.input.value = e.target.value;\n\n onChange(e.target.value);\n };\n\n render() {\n const { path, type } = this.props;\n\n let placeholder = 'example.md';\n if (type === 'posts') {\n const date = moment().format('YYYY-MM-DD');\n placeholder = `${date}-your-title.md`;\n } else if (type === 'data files') {\n placeholder = 'your-filename.yml';\n }\n\n let tooltip = null;\n if (type !== 'data files') {\n tooltip = (\n <span className=\"tooltip\">\n <Icon name=\"info-circle\" />\n <span className=\"tooltip-text\">\n If you leave <b>path</b> blank, it will be autogenerated from title.\n </span>\n </span>\n );\n }\n return (\n <div className=\"input-path\">\n <label>Path {tooltip}</label>\n <TextareaAutosize\n key={path}\n onChange={this.handleChange}\n placeholder={placeholder}\n defaultValue={path}\n ref=\"input\"\n />\n </div>\n );\n }\n}\n\nInputFilename.propTypes = {\n path: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport TextareaAutosize from 'react-textarea-autosize';\n\nexport default class InputTitle extends Component {\n shouldComponentUpdate(nextProps) {\n return nextProps.title !== this.props.title;\n }\n\n handleChange = e => {\n const { onChange } = this.props;\n onChange(e.target.value);\n };\n\n render() {\n const { title } = this.props;\n return (\n <div className=\"input-title\">\n <label>Title</label>\n <TextareaAutosize\n onChange={this.handleChange}\n placeholder=\"Title\"\n defaultValue={title}\n ref=\"input\"\n />\n </div>\n );\n }\n}\n\nInputTitle.propTypes = {\n title: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n","/* eslint-disable */\n\nimport hljs from 'highlight.js/lib/highlight';\n\n// ---\n// Languages supported as of highlight.js v9.17.1.\n//\n// We can't have a dynamic require statement below because webpack doesn't\n// evaluate statements and will therefore include all languages in the final\n// bundle unless webpack is additionally configured to not include the languages\n// we don't intend to include.\n// ---\n\nhljs.registerLanguage('actionscript', require('highlight.js/lib/languages/actionscript'));\nhljs.registerLanguage('apache', require('highlight.js/lib/languages/apache'));\nhljs.registerLanguage('applescript', require('highlight.js/lib/languages/applescript'));\nhljs.registerLanguage('asciidoc', require('highlight.js/lib/languages/asciidoc'));\nhljs.registerLanguage('bash', require('highlight.js/lib/languages/bash'));\nhljs.registerLanguage('basic', require('highlight.js/lib/languages/basic'));\nhljs.registerLanguage('clojure', require('highlight.js/lib/languages/clojure'));\nhljs.registerLanguage('clojure-repl', require('highlight.js/lib/languages/clojure-repl'));\nhljs.registerLanguage('cmake', require('highlight.js/lib/languages/cmake'));\nhljs.registerLanguage('coffeescript', require('highlight.js/lib/languages/coffeescript'));\nhljs.registerLanguage('cpp', require('highlight.js/lib/languages/cpp'));\nhljs.registerLanguage('crystal', require('highlight.js/lib/languages/crystal'));\nhljs.registerLanguage('css', require('highlight.js/lib/languages/css'));\nhljs.registerLanguage('dart', require('highlight.js/lib/languages/dart'));\nhljs.registerLanguage('diff', require('highlight.js/lib/languages/diff'));\nhljs.registerLanguage('django', require('highlight.js/lib/languages/django'));\nhljs.registerLanguage('dns', require('highlight.js/lib/languages/dns'));\nhljs.registerLanguage('dockerfile', require('highlight.js/lib/languages/dockerfile'));\nhljs.registerLanguage('dos', require('highlight.js/lib/languages/dos'));\nhljs.registerLanguage('dsconfig', require('highlight.js/lib/languages/dsconfig'));\nhljs.registerLanguage('elixir', require('highlight.js/lib/languages/elixir'));\nhljs.registerLanguage('elm', require('highlight.js/lib/languages/elm'));\nhljs.registerLanguage('erb', require('highlight.js/lib/languages/erb'));\nhljs.registerLanguage('erlang-repl', require('highlight.js/lib/languages/erlang-repl'));\nhljs.registerLanguage('erlang', require('highlight.js/lib/languages/erlang'));\nhljs.registerLanguage('excel', require('highlight.js/lib/languages/excel'));\nhljs.registerLanguage('fortran', require('highlight.js/lib/languages/fortran'));\nhljs.registerLanguage('fsharp', require('highlight.js/lib/languages/fsharp'));\nhljs.registerLanguage('gherkin', require('highlight.js/lib/languages/gherkin'));\nhljs.registerLanguage('go', require('highlight.js/lib/languages/go'));\nhljs.registerLanguage('gradle', require('highlight.js/lib/languages/gradle'));\nhljs.registerLanguage('groovy', require('highlight.js/lib/languages/groovy'));\nhljs.registerLanguage('haml', require('highlight.js/lib/languages/haml'));\nhljs.registerLanguage('handlebars', require('highlight.js/lib/languages/handlebars'));\nhljs.registerLanguage('haskell', require('highlight.js/lib/languages/haskell'));\nhljs.registerLanguage('htmlbars', require('highlight.js/lib/languages/htmlbars'));\nhljs.registerLanguage('http', require('highlight.js/lib/languages/http'));\nhljs.registerLanguage('ini', require('highlight.js/lib/languages/ini'));\nhljs.registerLanguage('java', require('highlight.js/lib/languages/java'));\nhljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript'));\nhljs.registerLanguage('json', require('highlight.js/lib/languages/json'));\nhljs.registerLanguage('julia', require('highlight.js/lib/languages/julia'));\nhljs.registerLanguage('julia-repl', require('highlight.js/lib/languages/julia-repl'));\nhljs.registerLanguage('kotlin', require('highlight.js/lib/languages/kotlin'));\nhljs.registerLanguage('ldif', require('highlight.js/lib/languages/ldif'));\nhljs.registerLanguage('less', require('highlight.js/lib/languages/less'));\nhljs.registerLanguage('lisp', require('highlight.js/lib/languages/lisp'));\nhljs.registerLanguage('livescript', require('highlight.js/lib/languages/livescript'));\nhljs.registerLanguage('lua', require('highlight.js/lib/languages/lua'));\nhljs.registerLanguage('makefile', require('highlight.js/lib/languages/makefile'));\nhljs.registerLanguage('markdown', require('highlight.js/lib/languages/markdown'));\nhljs.registerLanguage('mathematica', require('highlight.js/lib/languages/mathematica'));\nhljs.registerLanguage('matlab', require('highlight.js/lib/languages/matlab'));\nhljs.registerLanguage('perl', require('highlight.js/lib/languages/perl'));\nhljs.registerLanguage('nginx', require('highlight.js/lib/languages/nginx'));\nhljs.registerLanguage('nix', require('highlight.js/lib/languages/nix'));\nhljs.registerLanguage('objectivec', require('highlight.js/lib/languages/objectivec'));\nhljs.registerLanguage('ocaml', require('highlight.js/lib/languages/ocaml'));\nhljs.registerLanguage('pgsql', require('highlight.js/lib/languages/pgsql'));\nhljs.registerLanguage('php', require('highlight.js/lib/languages/php'));\nhljs.registerLanguage('plaintext', require('highlight.js/lib/languages/plaintext'));\nhljs.registerLanguage('powershell', require('highlight.js/lib/languages/powershell'));\nhljs.registerLanguage('prolog', require('highlight.js/lib/languages/prolog'));\nhljs.registerLanguage('python', require('highlight.js/lib/languages/python'));\nhljs.registerLanguage('r', require('highlight.js/lib/languages/r'));\nhljs.registerLanguage('reasonml', require('highlight.js/lib/languages/reasonml'));\nhljs.registerLanguage('ruby', require('highlight.js/lib/languages/ruby'));\nhljs.registerLanguage('rust', require('highlight.js/lib/languages/rust'));\nhljs.registerLanguage('scala', require('highlight.js/lib/languages/scala'));\nhljs.registerLanguage('scss', require('highlight.js/lib/languages/scss'));\nhljs.registerLanguage('shell', require('highlight.js/lib/languages/shell'));\nhljs.registerLanguage('smalltalk', require('highlight.js/lib/languages/smalltalk'));\nhljs.registerLanguage('sql', require('highlight.js/lib/languages/sql'));\nhljs.registerLanguage('swift', require('highlight.js/lib/languages/swift'));\nhljs.registerLanguage('typescript', require('highlight.js/lib/languages/typescript'));\nhljs.registerLanguage('vbnet', require('highlight.js/lib/languages/vbnet'));\nhljs.registerLanguage('vbscript', require('highlight.js/lib/languages/vbscript'));\nhljs.registerLanguage('vim', require('highlight.js/lib/languages/vim'));\nhljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml'));\nhljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'));\n\n// ---\n// Uncomment below to include that language in the final build\n// ---\n\n// hljs.registerLanguage('1c', require('highlight.js/lib/languages/1c'));\n// hljs.registerLanguage('abnf', require('highlight.js/lib/languages/abnf'));\n// hljs.registerLanguage('accesslog', require('highlight.js/lib/languages/accesslog'));\n// hljs.registerLanguage('ada', require('highlight.js/lib/languages/ada'));\n// hljs.registerLanguage('angelscript', require('highlight.js/lib/languages/angelscript'));\n// hljs.registerLanguage('arcade', require('highlight.js/lib/languages/arcade'));\n// hljs.registerLanguage('arduino', require('highlight.js/lib/languages/arduino'));\n// hljs.registerLanguage('armasm', require('highlight.js/lib/languages/armasm'));\n// hljs.registerLanguage('aspectj', require('highlight.js/lib/languages/aspectj'));\n// hljs.registerLanguage('autohotkey', require('highlight.js/lib/languages/autohotkey'));\n// hljs.registerLanguage('autoit', require('highlight.js/lib/languages/autoit'));\n// hljs.registerLanguage('avrasm', require('highlight.js/lib/languages/avrasm'));\n// hljs.registerLanguage('awk', require('highlight.js/lib/languages/awk'));\n// hljs.registerLanguage('axapta', require('highlight.js/lib/languages/axapta'));\n// hljs.registerLanguage('bnf', require('highlight.js/lib/languages/bnf'));\n// hljs.registerLanguage('brainfuck', require('highlight.js/lib/languages/brainfuck'));\n// hljs.registerLanguage('cal', require('highlight.js/lib/languages/cal'));\n// hljs.registerLanguage('capnproto', require('highlight.js/lib/languages/capnproto'));\n// hljs.registerLanguage('ceylon', require('highlight.js/lib/languages/ceylon'));\n// hljs.registerLanguage('clean', require('highlight.js/lib/languages/clean'));\n// hljs.registerLanguage('coq', require('highlight.js/lib/languages/coq'));\n// hljs.registerLanguage('cos', require('highlight.js/lib/languages/cos'));\n// hljs.registerLanguage('crmsh', require('highlight.js/lib/languages/crmsh'));\n// hljs.registerLanguage('cs', require('highlight.js/lib/languages/cs'));\n// hljs.registerLanguage('csp', require('highlight.js/lib/languages/csp'));\n// hljs.registerLanguage('d', require('highlight.js/lib/languages/d'));\n// hljs.registerLanguage('delphi', require('highlight.js/lib/languages/delphi'));\n// hljs.registerLanguage('dts', require('highlight.js/lib/languages/dts'));\n// hljs.registerLanguage('dust', require('highlight.js/lib/languages/dust'));\n// hljs.registerLanguage('ebnf', require('highlight.js/lib/languages/ebnf'));\n// hljs.registerLanguage('fix', require('highlight.js/lib/languages/fix'));\n// hljs.registerLanguage('flix', require('highlight.js/lib/languages/flix'));\n// hljs.registerLanguage('gams', require('highlight.js/lib/languages/gams'));\n// hljs.registerLanguage('gauss', require('highlight.js/lib/languages/gauss'));\n// hljs.registerLanguage('gcode', require('highlight.js/lib/languages/gcode'));\n// hljs.registerLanguage('glsl', require('highlight.js/lib/languages/glsl'));\n// hljs.registerLanguage('gml', require('highlight.js/lib/languages/gml'));\n// hljs.registerLanguage('golo', require('highlight.js/lib/languages/golo'));\n// hljs.registerLanguage('haxe', require('highlight.js/lib/languages/haxe'));\n// hljs.registerLanguage('hsp', require('highlight.js/lib/languages/hsp'));\n// hljs.registerLanguage('hy', require('highlight.js/lib/languages/hy'));\n// hljs.registerLanguage('inform7', require('highlight.js/lib/languages/inform7'));\n// hljs.registerLanguage('irpf90', require('highlight.js/lib/languages/irpf90'));\n// hljs.registerLanguage('isbl', require('highlight.js/lib/languages/isbl'));\n// hljs.registerLanguage('jboss-cli', require('highlight.js/lib/languages/jboss-cli'));\n// hljs.registerLanguage('lasso', require('highlight.js/lib/languages/lasso'));\n// hljs.registerLanguage('leaf', require('highlight.js/lib/languages/leaf'));\n// hljs.registerLanguage('livecodeserver', require('highlight.js/lib/languages/livecodeserver'));\n// hljs.registerLanguage('llvm', require('highlight.js/lib/languages/llvm'));\n// hljs.registerLanguage('lsl', require('highlight.js/lib/languages/lsl'));\n// hljs.registerLanguage('maxima', require('highlight.js/lib/languages/maxima'));\n// hljs.registerLanguage('mel', require('highlight.js/lib/languages/mel'));\n// hljs.registerLanguage('mercury', require('highlight.js/lib/languages/mercury'));\n// hljs.registerLanguage('mipsasm', require('highlight.js/lib/languages/mipsasm'));\n// hljs.registerLanguage('mizar', require('highlight.js/lib/languages/mizar'));\n// hljs.registerLanguage('mojolicious', require('highlight.js/lib/languages/mojolicious'));\n// hljs.registerLanguage('monkey', require('highlight.js/lib/languages/monkey'));\n// hljs.registerLanguage('moonscript', require('highlight.js/lib/languages/moonscript'));\n// hljs.registerLanguage('n1ql', require('highlight.js/lib/languages/n1ql'));\n// hljs.registerLanguage('nimrod', require('highlight.js/lib/languages/nimrod'));\n// hljs.registerLanguage('nsis', require('highlight.js/lib/languages/nsis'));\n// hljs.registerLanguage('openscad', require('highlight.js/lib/languages/openscad'));\n// hljs.registerLanguage('oxygene', require('highlight.js/lib/languages/oxygene'));\n// hljs.registerLanguage('parser3', require('highlight.js/lib/languages/parser3'));\n// hljs.registerLanguage('pf', require('highlight.js/lib/languages/pf'));\n// hljs.registerLanguage('pony', require('highlight.js/lib/languages/pony'));\n// hljs.registerLanguage('processing', require('highlight.js/lib/languages/processing'));\n// hljs.registerLanguage('profile', require('highlight.js/lib/languages/profile'));\n// hljs.registerLanguage('properties', require('highlight.js/lib/languages/properties'));\n// hljs.registerLanguage('protobuf', require('highlight.js/lib/languages/protobuf'));\n// hljs.registerLanguage('puppet', require('highlight.js/lib/languages/puppet'));\n// hljs.registerLanguage('purebasic', require('highlight.js/lib/languages/purebasic'));\n// hljs.registerLanguage('q', require('highlight.js/lib/languages/q'));\n// hljs.registerLanguage('qml', require('highlight.js/lib/languages/qml'));\n// hljs.registerLanguage('rib', require('highlight.js/lib/languages/rib'));\n// hljs.registerLanguage('roboconf', require('highlight.js/lib/languages/roboconf'));\n// hljs.registerLanguage('routeros', require('highlight.js/lib/languages/routeros'));\n// hljs.registerLanguage('rsl', require('highlight.js/lib/languages/rsl'));\n// hljs.registerLanguage('ruleslanguage', require('highlight.js/lib/languages/ruleslanguage'));\n// hljs.registerLanguage('sas', require('highlight.js/lib/languages/sas'));\n// hljs.registerLanguage('scheme', require('highlight.js/lib/languages/scheme'));\n// hljs.registerLanguage('scilab', require('highlight.js/lib/languages/scilab'));\n// hljs.registerLanguage('smali', require('highlight.js/lib/languages/smali'));\n// hljs.registerLanguage('sml', require('highlight.js/lib/languages/sml'));\n// hljs.registerLanguage('sqf', require('highlight.js/lib/languages/sqf'));\n// hljs.registerLanguage('stan', require('highlight.js/lib/languages/stan'));\n// hljs.registerLanguage('stata', require('highlight.js/lib/languages/stata'));\n// hljs.registerLanguage('step21', require('highlight.js/lib/languages/step21'));\n// hljs.registerLanguage('stylus', require('highlight.js/lib/languages/stylus'));\n// hljs.registerLanguage('subunit', require('highlight.js/lib/languages/subunit'));\n// hljs.registerLanguage('taggerscript', require('highlight.js/lib/languages/taggerscript'));\n// hljs.registerLanguage('tap', require('highlight.js/lib/languages/tap'));\n// hljs.registerLanguage('tcl', require('highlight.js/lib/languages/tcl'));\n// hljs.registerLanguage('tex', require('highlight.js/lib/languages/tex'));\n// hljs.registerLanguage('thrift', require('highlight.js/lib/languages/thrift'));\n// hljs.registerLanguage('tp', require('highlight.js/lib/languages/tp'));\n// hljs.registerLanguage('twig', require('highlight.js/lib/languages/twig'));\n// hljs.registerLanguage('vala', require('highlight.js/lib/languages/vala'));\n// hljs.registerLanguage('vbscript-html', require('highlight.js/lib/languages/vbscript-html'));\n// hljs.registerLanguage('verilog', require('highlight.js/lib/languages/verilog'));\n// hljs.registerLanguage('vhdl', require('highlight.js/lib/languages/vhdl'));\n// hljs.registerLanguage('x86asm', require('highlight.js/lib/languages/x86asm'));\n// hljs.registerLanguage('xl', require('highlight.js/lib/languages/xl'));\n// hljs.registerLanguage('xquery', require('highlight.js/lib/languages/xquery'));\n// hljs.registerLanguage('zephir', require('highlight.js/lib/languages/zephir'));\n\nexport default hljs;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport SimpleMDE from 'simplemde';\nimport hljs from '../utils/highlighter';\nimport FilePicker from './FilePicker';\nimport { getExtensionFromPath } from '../utils/helpers';\n\nconst classNames = [\n 'editor-toolbar',\n 'CodeMirror',\n 'editor-preview-side',\n 'editor-statusbar',\n];\n\nclass MarkdownEditor extends Component {\n componentDidMount() {\n this.create();\n window.hljs = hljs; // TODO: fix this after the next release of SimpleMDE\n }\n\n shouldComponentUpdate(nextProps) {\n return nextProps.initialValue !== this.props.initialValue;\n }\n\n componentDidUpdate() {\n this.destroy();\n this.create();\n }\n\n componentWillUnmount() {\n this.destroy();\n }\n\n create() {\n const { onChange, onSave } = this.props;\n let opts = Object.create(this.props);\n opts['element'] = this.refs.text;\n opts['autoDownloadFontAwesome'] = false;\n opts['spellChecker'] = false;\n opts['renderingConfig'] = {\n codeSyntaxHighlighting: true,\n };\n opts['insertTexts'] = {\n image: ['![', '](#url#)'],\n };\n let toolbarIcons = [\n 'bold',\n 'italic',\n 'heading',\n '|',\n 'code',\n 'quote',\n 'unordered-list',\n 'ordered-list',\n '|',\n 'link',\n 'image',\n 'table',\n {\n name: 'filepicker',\n action: () => this.refs.filepicker.refs.trigger.click(),\n className: 'fa fa-paperclip',\n title: 'Insert Static File',\n },\n '|',\n 'preview',\n 'side-by-side',\n 'fullscreen',\n '|',\n ];\n if (onSave) {\n toolbarIcons.push({\n name: 'save',\n action: onSave,\n className: 'fa fa-floppy-o',\n title: 'Save',\n });\n }\n opts['toolbar'] = toolbarIcons;\n const editor = new SimpleMDE(opts);\n if (editor.codemirror) {\n editor.codemirror.on('change', () => {\n onChange(editor.value());\n });\n }\n this.editor = editor;\n }\n\n destroy() {\n for (let i in classNames) {\n let elementToRemove = this.refs.container.querySelector(\n '.' + classNames[i]\n );\n elementToRemove && elementToRemove.remove();\n }\n }\n\n // Adapted from an internal helper function within SimpleMDE package.\n _replaceSelectedText = (cm, headNTail, url) => {\n const startPoint = cm.getCursor('start');\n const endPoint = cm.getCursor('end');\n const text = cm.getSelection();\n\n let [head, tail] = headNTail;\n if (url) {\n tail = tail.replace('#url#', url);\n }\n\n cm.replaceSelection(`${head}${text}${tail}`);\n startPoint.ch += head.length;\n\n if (startPoint !== endPoint) {\n endPoint.ch += head.length;\n }\n\n cm.setSelection(startPoint, endPoint);\n cm.focus();\n };\n\n handleFilePick = path => {\n const { codemirror, options } = this.editor;\n const { image, link } = options.insertTexts;\n const url = `{{ '${path}' | relative_url }}`;\n const ext = getExtensionFromPath(path);\n\n const type = /png|jpg|gif|jpeg|svg|ico/i.test(ext) ? image : link;\n this._replaceSelectedText(codemirror, type, url);\n };\n\n render() {\n return (\n <div>\n <div style={{ display: 'none' }}>\n <FilePicker ref=\"filepicker\" onPick={this.handleFilePick} />\n </div>\n <div ref=\"container\">\n <textarea ref=\"text\" />\n </div>\n </div>\n );\n }\n}\n\nMarkdownEditor.propTypes = {\n initialValue: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n};\n\nexport default MarkdownEditor;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Splitter from './Splitter';\nimport InputPath from './form/InputPath';\nimport InputTitle from './form/InputTitle';\nimport MarkdownEditor from './MarkdownEditor';\nimport Metadata from '../containers/MetaFields';\n\nexport default function MarkdownPageBody({\n type,\n path,\n body,\n title,\n onSave,\n updateTitle,\n updatePath,\n updateBody,\n metafields,\n staticmetafields,\n}) {\n return (\n <div className=\"content-body\">\n <InputPath onChange={updatePath} type={type} path={path} />\n <InputTitle onChange={updateTitle} title={title} />\n <MarkdownEditor\n onChange={updateBody}\n onSave={onSave}\n placeholder=\"Body\"\n initialValue={body}\n />\n <Splitter />\n <Metadata fields={metafields} staticFields={staticmetafields} />\n </div>\n );\n}\n\nMarkdownPageBody.defaultProps = {\n path: '',\n body: '',\n title: '',\n metafields: {},\n staticmetafields: {},\n};\n\nMarkdownPageBody.propTypes = {\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n type: PropTypes.string.isRequired,\n path: PropTypes.string,\n body: PropTypes.string,\n title: PropTypes.string,\n metafields: PropTypes.object,\n staticmetafields: PropTypes.object,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport { HotKeys } from 'react-hotkeys';\nimport _ from 'underscore';\nimport DocumentTitle from 'react-document-title';\nimport Button from '../../components/Button';\nimport Errors from '../../components/Errors';\nimport Splitter from '../../components/Splitter';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport MarkdownPageBody from '../../components/MarkdownPageBody';\nimport { fetchPage, deletePage, putPage } from '../../ducks/pages';\nimport { updateTitle, updateBody, updatePath } from '../../ducks/metadata';\nimport { clearErrors } from '../../ducks/utils';\nimport { preventDefault, getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getLeaveMessage, getDeleteMessage } = translations;\n\nexport class PageEdit extends Component {\n componentDidMount() {\n const { fetchPage, params, router, route } = this.props;\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n fetchPage(directory, filename);\n\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n const new_path = nextProps.page.path;\n const path = this.props.page.path;\n // redirect if the path is changed\n if (new_path !== path) {\n browserHistory.push(`${ADMIN_PREFIX}/pages/${new_path}`);\n }\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n if (this.props.fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { putPage, fieldChanged, params } = this.props;\n if (fieldChanged) {\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n putPage(directory, filename);\n }\n };\n\n handleClickDelete(name) {\n const { deletePage, params } = this.props;\n const confirm = window.confirm(getDeleteMessage(name));\n if (confirm) {\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n deletePage(directory, filename);\n browserHistory.push(`${ADMIN_PREFIX}/pages/${directory || ''}`);\n }\n }\n\n render() {\n const {\n isFetching,\n page,\n errors,\n updateTitle,\n updateBody,\n updatePath,\n updated,\n fieldChanged,\n params,\n } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n if (_.isEmpty(page)) {\n return <h1>{`Could not find the page.`}</h1>;\n }\n\n const keyboardHandlers = {\n save: this.handleClickSave,\n };\n\n const {\n name,\n raw_content,\n http_url,\n front_matter,\n front_matter_defaults,\n } = page;\n const directory = params.splat[0];\n\n const title = front_matter && front_matter.title ? front_matter.title : '';\n const document_title = getDocumentTitle('pages', directory, title || name);\n\n return (\n <DocumentTitle title={document_title}>\n <HotKeys handlers={keyboardHandlers} className=\"single\">\n {errors.length > 0 && <Errors errors={errors} />}\n\n <div className=\"content-header\">\n <Breadcrumbs type=\"pages\" splat={directory} />\n </div>\n\n <div className=\"content-wrapper\">\n <MarkdownPageBody\n type=\"pages\"\n updateTitle={updateTitle}\n updatePath={updatePath}\n updateBody={updateBody}\n onSave={this.handleClickSave}\n path={name}\n title={title}\n body={raw_content}\n metafields={{ title, raw_content, path: name, ...front_matter }}\n staticmetafields={front_matter_defaults}\n />\n <div className=\"content-side\">\n <Button\n onClick={this.handleClickSave}\n type=\"save\"\n active={fieldChanged}\n triggered={updated}\n block\n />\n <Button to={http_url} type=\"view\" active block />\n <Splitter />\n <Button\n onClick={() => this.handleClickDelete(name)}\n type=\"delete\"\n active\n block\n />\n </div>\n </div>\n </HotKeys>\n </DocumentTitle>\n );\n }\n}\n\nPageEdit.propTypes = {\n page: PropTypes.object.isRequired,\n fetchPage: PropTypes.func.isRequired,\n deletePage: PropTypes.func.isRequired,\n putPage: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n errors: PropTypes.array.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n updated: PropTypes.bool.isRequired,\n params: PropTypes.object.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n page: state.pages.page,\n isFetching: state.pages.isFetching,\n fieldChanged: state.metadata.fieldChanged,\n updated: state.pages.updated,\n errors: state.utils.errors,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchPage,\n deletePage,\n putPage,\n updateTitle,\n updateBody,\n updatePath,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(PageEdit)\n);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { HotKeys } from 'react-hotkeys';\nimport Button from './Button';\nimport Errors from './Errors';\nimport Breadcrumbs from './Breadcrumbs';\nimport MarkdownPageBody from './MarkdownPageBody';\nimport { injectDefaultFields as defaultFields } from '../utils/metadata';\n\nexport default function CreateMarkdownPage({\n type,\n config,\n errors,\n updated,\n updateBody,\n updatePath,\n updateTitle,\n fieldChanged,\n onClickSave,\n params: { splat },\n}) {\n const metaType = type === 'drafts' ? 'posts' : type;\n\n return (\n <HotKeys handlers={{ save: onClickSave }}>\n {errors.length > 0 && <Errors errors={errors} />}\n\n <div className=\"content-header\">\n <Breadcrumbs type={type} splat={splat} />\n </div>\n\n <div className=\"content-wrapper\">\n <MarkdownPageBody\n type={type}\n updatePath={updatePath}\n updateTitle={updateTitle}\n updateBody={updateBody}\n onSave={onClickSave}\n staticmetafields={defaultFields(config, splat, metaType)}\n />\n <div className=\"content-side\">\n <Button\n onClick={onClickSave}\n type=\"create\"\n active={fieldChanged}\n triggered={updated}\n block\n />\n </div>\n </div>\n </HotKeys>\n );\n}\n\nCreateMarkdownPage.propTypes = {\n type: PropTypes.string.isRequired,\n config: PropTypes.object.isRequired,\n params: PropTypes.object.isRequired,\n errors: PropTypes.array.isRequired,\n updated: PropTypes.bool.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n onClickSave: PropTypes.func.isRequired,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport DocumentTitle from 'react-document-title';\nimport CreateMarkdownPage from '../../components/CreateMarkdownPage';\nimport { updateTitle, updateBody, updatePath } from '../../ducks/metadata';\nimport { createPage } from '../../ducks/pages';\nimport { clearErrors } from '../../ducks/utils';\nimport { preventDefault, getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getLeaveMessage } = translations;\n\nexport class PageNew extends Component {\n componentDidMount() {\n const { router, route } = this.props;\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n browserHistory.push(`${ADMIN_PREFIX}/pages/${nextProps.page.path}`);\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n if (this.props.fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { fieldChanged, createPage, params } = this.props;\n fieldChanged && createPage(params.splat);\n };\n\n render() {\n const {\n params,\n config,\n errors,\n updated,\n updateBody,\n updatePath,\n updateTitle,\n fieldChanged,\n } = this.props;\n\n const title = getDocumentTitle('pages', params.splat, 'New page');\n\n return (\n <DocumentTitle title={title}>\n <CreateMarkdownPage\n type=\"pages\"\n params={params}\n config={config}\n errors={errors}\n updated={updated}\n updateBody={updateBody}\n updatePath={updatePath}\n updateTitle={updateTitle}\n fieldChanged={fieldChanged}\n onClickSave={this.handleClickSave}\n />\n </DocumentTitle>\n );\n }\n}\n\nPageNew.propTypes = {\n createPage: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n errors: PropTypes.array.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n updated: PropTypes.bool.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n params: PropTypes.object.isRequired,\n config: PropTypes.object.isRequired,\n page: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n page: state.pages.page,\n fieldChanged: state.metadata.fieldChanged,\n errors: state.utils.errors,\n updated: state.pages.updated,\n config: state.config.config,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n updateTitle,\n updateBody,\n updatePath,\n createPage,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(PageNew)\n);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport _ from 'underscore';\nimport moment from 'moment';\nimport DocumentTitle from 'react-document-title';\nimport InputSearch from '../../components/form/InputSearch';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport Button from '../../components/Button';\nimport Icon from '../../components/Icon';\nimport {\n fetchCollection,\n deleteDocument,\n filterBySearchInput,\n} from '../../ducks/collections';\nimport { search } from '../../ducks/utils';\nimport { getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getDeleteMessage, getNotFoundMessage } = translations;\n\nexport class Documents extends Component {\n componentDidMount() {\n const { fetchCollection, params } = this.props;\n fetchCollection(params.collection_name, params.splat);\n }\n\n componentWillReceiveProps(nextProps) {\n const { fetchCollection, params } = nextProps;\n // refetch the collection when navigating between collections or when splat is changed\n if (\n params.splat !== this.props.params.splat ||\n params.collection_name !== this.props.params.collection_name\n ) {\n fetchCollection(params.collection_name, params.splat);\n }\n }\n\n handleClickDelete(filename) {\n const { deleteDocument, params } = this.props;\n const confirm = window.confirm(getDeleteMessage(filename));\n confirm && deleteDocument(params.collection_name, params.splat, filename);\n }\n\n renderTable() {\n return (\n <div className=\"content-table\">\n <table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Date</th>\n <th className=\"th-actions\">Actions</th>\n </tr>\n </thead>\n <tbody>{this.renderRows()}</tbody>\n </table>\n </div>\n );\n }\n\n renderFileRow(doc) {\n const { id, name, title, http_url, collection, relative_path } = doc;\n const to = `${ADMIN_PREFIX}/collections/${collection}/${relative_path}`;\n // date w/o timezone\n let date = doc.date.substring(0, doc.date.lastIndexOf(' '));\n date =\n moment(date).format('hh:mm:ss') === '12:00:00'\n ? moment(date).format('ll')\n : moment(date).format('lll');\n\n return (\n <tr key={id}>\n <td className=\"row-title\">\n <strong>\n <Link to={to}>\n <Icon name=\"file-text-o\" />\n {title || name}\n </Link>\n </strong>\n </td>\n <td>{date}</td>\n <td>\n <div className=\"row-actions\">\n <Button\n onClick={() => this.handleClickDelete(name)}\n type=\"delete\"\n active\n thin\n />\n {http_url && <Button to={http_url} type=\"view\" active thin />}\n </div>\n </td>\n </tr>\n );\n }\n\n renderDirectoryRow(directory) {\n const { params: { collection_name } } = this.props;\n const { name, relative_path, modified_time } = directory;\n const to = `${ADMIN_PREFIX}/collections/${collection_name}/${relative_path}`;\n // date w/o timezone\n let date = modified_time.substring(0, modified_time.lastIndexOf(' '));\n date = moment(date).format('ll');\n return (\n <tr key={name}>\n <td className=\"row-title\">\n <strong>\n <Link to={to}>\n <Icon name=\"folder\" />\n {name}\n </Link>\n </strong>\n </td>\n <td>{date}</td>\n <td />\n </tr>\n );\n }\n\n renderRows() {\n const { documents } = this.props;\n return _.map(documents, entry => {\n if (entry.type && entry.type === 'directory') {\n return this.renderDirectoryRow(entry);\n } else {\n return this.renderFileRow(entry);\n }\n });\n }\n\n render() {\n const { isFetching, documents, search, params } = this.props;\n const { collection_name } = params;\n\n if (isFetching) {\n return null;\n }\n\n const splat = params.splat || '';\n const to = params.splat\n ? `${ADMIN_PREFIX}/collections/${collection_name}/${splat}/new`\n : `${ADMIN_PREFIX}/collections/${collection_name}/new`;\n\n const document_title = getDocumentTitle(collection_name, params.splat);\n\n return (\n <DocumentTitle title={document_title}>\n <div>\n <div className=\"content-header\">\n <Breadcrumbs type={collection_name} splat={splat} />\n <div className=\"page-buttons\">\n <Link className=\"btn btn-active\" to={to}>\n {collection_name === 'posts' ? 'New post' : 'New document'}\n </Link>\n </div>\n <div className=\"pull-right\">\n <InputSearch searchBy=\"title\" search={search} />\n </div>\n </div>\n {documents.length > 0 && this.renderTable()}\n {!documents.length && <h1>{getNotFoundMessage('documents')}</h1>}\n </div>\n </DocumentTitle>\n );\n }\n}\n\nDocuments.propTypes = {\n isFetching: PropTypes.bool.isRequired,\n documents: PropTypes.array.isRequired,\n fetchCollection: PropTypes.func.isRequired,\n deleteDocument: PropTypes.func.isRequired,\n search: PropTypes.func.isRequired,\n params: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n documents: filterBySearchInput(state.collections.entries, state.utils.input),\n isFetching: state.collections.isFetching,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchCollection,\n deleteDocument,\n search,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Documents);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport { HotKeys } from 'react-hotkeys';\nimport _ from 'underscore';\nimport DocumentTitle from 'react-document-title';\nimport Button from '../../components/Button';\nimport Errors from '../../components/Errors';\nimport Splitter from '../../components/Splitter';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport MarkdownPageBody from '../../components/MarkdownPageBody';\nimport {\n fetchDocument,\n deleteDocument,\n putDocument,\n} from '../../ducks/collections';\nimport { updateTitle, updateBody, updatePath } from '../../ducks/metadata';\nimport { clearErrors } from '../../ducks/utils';\nimport { preventDefault, getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getLeaveMessage, getDeleteMessage, getNotFoundMessage } = translations;\n\nexport class DocumentEdit extends Component {\n componentDidMount() {\n const { fetchDocument, params, router, route } = this.props;\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n fetchDocument(params.collection_name, directory, filename);\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillReceiveProps(nextProps) {\n const { currentDocument } = this.props;\n if (this.props.updated !== nextProps.updated) {\n const new_path = nextProps.currentDocument.path;\n const path = currentDocument.path;\n // redirect if the path is changed\n if (new_path !== path) {\n browserHistory.push(\n `${ADMIN_PREFIX}/collections/${new_path.substring(1)}` // remove `_`\n );\n }\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n if (this.props.fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { putDocument, fieldChanged, params } = this.props;\n if (fieldChanged) {\n const collection = params.collection_name;\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n putDocument(collection, directory, filename);\n }\n };\n\n handleClickDelete = () => {\n const { deleteDocument, params } = this.props;\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n const confirm = window.confirm(getDeleteMessage(filename));\n if (confirm) {\n const collection = params.collection_name;\n deleteDocument(collection, directory, filename);\n browserHistory.push(\n `${ADMIN_PREFIX}/collections/${collection}/${directory || ''}`\n );\n }\n };\n\n render() {\n const {\n isFetching,\n currentDocument,\n errors,\n updateTitle,\n updateBody,\n updatePath,\n updated,\n fieldChanged,\n params,\n } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n if (_.isEmpty(currentDocument)) {\n return <h1>{getNotFoundMessage('document')}</h1>;\n }\n\n const {\n title,\n raw_content,\n http_url,\n collection,\n front_matter,\n front_matter_defaults,\n name,\n } = currentDocument;\n const directory = params.splat[0];\n\n const keyboardHandlers = {\n save: this.handleClickSave,\n };\n\n const document_title = getDocumentTitle(collection, directory, title);\n\n return (\n <DocumentTitle title={document_title}>\n <HotKeys handlers={keyboardHandlers} className=\"single\">\n {errors.length > 0 && <Errors errors={errors} />}\n\n <div className=\"content-header\">\n <Breadcrumbs type={collection} splat={directory} />\n </div>\n\n <div className=\"content-wrapper\">\n <MarkdownPageBody\n type={collection}\n path={name}\n title={title}\n body={raw_content}\n updatePath={updatePath}\n updateTitle={updateTitle}\n updateBody={updateBody}\n onSave={this.handleClickSave}\n metafields={{ title, path: name, raw_content, ...front_matter }}\n staticmetafields={front_matter_defaults}\n />\n <div className=\"content-side\">\n <Button\n onClick={this.handleClickSave}\n type=\"save\"\n active={fieldChanged}\n triggered={updated}\n block\n />\n <Button to={http_url} type=\"view\" active block />\n <Splitter />\n <Button\n onClick={this.handleClickDelete}\n type=\"delete\"\n active\n block\n />\n </div>\n </div>\n </HotKeys>\n </DocumentTitle>\n );\n }\n}\n\nDocumentEdit.propTypes = {\n currentDocument: PropTypes.object.isRequired,\n fetchDocument: PropTypes.func.isRequired,\n deleteDocument: PropTypes.func.isRequired,\n putDocument: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n errors: PropTypes.array.isRequired,\n updated: PropTypes.bool.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n params: PropTypes.object.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n currentDocument: state.collections.currentDocument,\n isFetching: state.collections.isFetching,\n fieldChanged: state.metadata.fieldChanged,\n updated: state.collections.updated,\n errors: state.utils.errors,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchDocument,\n deleteDocument,\n putDocument,\n updateTitle,\n updateBody,\n updatePath,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(DocumentEdit)\n);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport DocumentTitle from 'react-document-title';\nimport CreateMarkdownPage from '../../components/CreateMarkdownPage';\nimport { updateTitle, updateBody, updatePath } from '../../ducks/metadata';\nimport { createDocument } from '../../ducks/collections';\nimport { clearErrors } from '../../ducks/utils';\nimport { preventDefault, getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getLeaveMessage } = translations;\n\nexport class DocumentNew extends Component {\n componentDidMount() {\n const { router, route } = this.props;\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n const path = nextProps.currentDocument.path;\n const splat = path.substr(path.indexOf('/') + 1, path.length);\n browserHistory.push(\n `${ADMIN_PREFIX}/collections/${nextProps.currentDocument.collection}/${splat}`\n );\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n if (this.props.fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { fieldChanged, createDocument, params } = this.props;\n fieldChanged && createDocument(params.collection_name, params.splat);\n };\n\n render() {\n const {\n params,\n config,\n errors,\n updated,\n updateBody,\n updatePath,\n updateTitle,\n fieldChanged,\n } = this.props;\n\n const collection = params.collection_name;\n const title = getDocumentTitle(collection, params.splat, 'New document');\n\n return (\n <DocumentTitle title={title}>\n <CreateMarkdownPage\n type={collection}\n params={params}\n config={config}\n errors={errors}\n updated={updated}\n updateBody={updateBody}\n updatePath={updatePath}\n updateTitle={updateTitle}\n fieldChanged={fieldChanged}\n onClickSave={this.handleClickSave}\n />\n </DocumentTitle>\n );\n }\n}\n\nDocumentNew.propTypes = {\n createDocument: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n errors: PropTypes.array.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n updated: PropTypes.bool.isRequired,\n params: PropTypes.object.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n config: PropTypes.object.isRequired,\n currentDocument: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n currentDocument: state.collections.currentDocument,\n fieldChanged: state.metadata.fieldChanged,\n errors: state.utils.errors,\n updated: state.collections.updated,\n config: state.config.config,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n updateTitle,\n updateBody,\n updatePath,\n createDocument,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(DocumentNew)\n);\n","import { clearErrors, validationError, filterDeleted } from './utils';\nimport { get, put, del } from '../utils/fetch';\nimport { datafilesAPIUrl, datafileAPIUrl } from '../constants/api';\nimport {\n toYAML,\n trimObject,\n computeRelativePath,\n getExtensionFromPath,\n} from '../utils/helpers';\nimport { validator } from '../utils/validation';\n\nimport translations from '../translations';\nconst { getContentRequiredMessage, getFilenameRequiredMessage } = translations;\n\n// Action Types\nexport const FETCH_DATAFILES_REQUEST = 'FETCH_DATAFILES_REQUEST';\nexport const FETCH_DATAFILES_SUCCESS = 'FETCH_DATAFILES_SUCCESS';\nexport const FETCH_DATAFILES_FAILURE = 'FETCH_DATAFILES_FAILURE';\nexport const FETCH_DATAFILE_REQUEST = 'FETCH_DATAFILE_REQUEST';\nexport const FETCH_DATAFILE_SUCCESS = 'FETCH_DATAFILE_SUCCESS';\nexport const FETCH_DATAFILE_FAILURE = 'FETCH_DATAFILE_FAILURE';\nexport const PUT_DATAFILE_REQUEST = 'PUT_DATAFILE_REQUEST';\nexport const PUT_DATAFILE_SUCCESS = 'PUT_DATAFILE_SUCCESS';\nexport const PUT_DATAFILE_FAILURE = 'PUT_DATAFILE_FAILURE';\nexport const DELETE_DATAFILE_REQUEST = 'DELETE_DATAFILE_REQUEST';\nexport const DELETE_DATAFILE_SUCCESS = 'DELETE_DATAFILE_SUCCESS';\nexport const DELETE_DATAFILE_FAILURE = 'DELETE_DATAFILE_FAILURE';\nexport const DATAFILE_CHANGED = 'DATAFILE_CHANGED';\n\n// Actions\nexport const fetchDataFiles = (directory = '') => dispatch => {\n dispatch({ type: FETCH_DATAFILES_REQUEST });\n return get(\n datafilesAPIUrl(directory),\n { type: FETCH_DATAFILES_SUCCESS, name: 'files' },\n { type: FETCH_DATAFILES_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const fetchDataFile = (directory, filename) => dispatch => {\n dispatch({ type: FETCH_DATAFILE_REQUEST });\n return get(\n datafileAPIUrl(directory, filename),\n { type: FETCH_DATAFILE_SUCCESS, name: 'file' },\n { type: FETCH_DATAFILE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\n/**\n * Creates and updates a data file.\n * @param {String} directory : Dirname of data file\n * @param {String} filename : The data file\n * @param {Object} data : Content to be written to data file\n * @param {String} new_path : File path relative to config['source']\n * @param {String} source : Point of origin of file-content data.\n * Either the default `#brace-editor`, or `<DataGUI/>`\n */\nexport const putDataFile = (\n directory,\n filename,\n data,\n new_path = '',\n source = 'editor'\n) => (dispatch, getState) => {\n const ext = getExtensionFromPath(new_path || filename);\n\n if (source === 'gui') {\n const json = /json/i.test(ext);\n let metadata = getState().metadata.metadata;\n metadata = trimObject(metadata);\n data = json ? JSON.stringify(metadata, null, 2) : toYAML(metadata);\n }\n\n const payload = new_path\n ? { path: new_path, raw_content: data }\n : { raw_content: data };\n\n // handle errors\n const errors = validateDatafile(filename, data);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n dispatch(clearErrors());\n\n return put(\n datafileAPIUrl(directory, filename),\n JSON.stringify(payload),\n { type: PUT_DATAFILE_SUCCESS, name: 'file' },\n { type: PUT_DATAFILE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const deleteDataFile = (directory, filename) => dispatch => {\n const relative_path = computeRelativePath(directory, filename);\n return del(\n datafileAPIUrl(directory, filename),\n { type: DELETE_DATAFILE_SUCCESS, name: 'file', id: relative_path },\n { type: DELETE_DATAFILE_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const onDataFileChanged = () => ({\n type: DATAFILE_CHANGED,\n});\n\nconst validateDatafile = (filename, data) =>\n validator(\n { filename, data },\n { filename: 'required', data: 'required' },\n {\n 'filename.required': getFilenameRequiredMessage(),\n 'data.required': getContentRequiredMessage(),\n }\n );\n\n// Reducer\nexport default function datafiles(\n state = {\n files: [],\n currentFile: {},\n isFetching: false,\n updated: false,\n datafileChanged: false,\n fieldChanged: false,\n },\n action\n) {\n switch (action.type) {\n case FETCH_DATAFILES_REQUEST:\n case FETCH_DATAFILE_REQUEST:\n return {\n ...state,\n isFetching: true,\n };\n case FETCH_DATAFILES_SUCCESS:\n return {\n ...state,\n files: action.files,\n isFetching: false,\n currentFile: {},\n };\n case FETCH_DATAFILES_FAILURE:\n return {\n ...state,\n isFetching: false,\n currentFile: {},\n };\n case FETCH_DATAFILE_SUCCESS:\n return {\n ...state,\n currentFile: action.file,\n isFetching: false,\n };\n case FETCH_DATAFILE_FAILURE:\n return {\n ...state,\n currentFile: {},\n isFetching: false,\n };\n case PUT_DATAFILE_SUCCESS:\n return {\n ...state,\n currentFile: action.file,\n updated: true,\n datafileChanged: false,\n };\n case PUT_DATAFILE_FAILURE:\n return {\n ...state,\n datafileChanged: false,\n };\n case DELETE_DATAFILE_SUCCESS:\n return {\n ...state,\n files: filterDeleted(state.files, action.id),\n };\n case DATAFILE_CHANGED:\n return {\n ...state,\n datafileChanged: true,\n updated: false,\n };\n default:\n return {\n ...state,\n updated: false,\n datafileChanged: false,\n };\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport DocumentTitle from 'react-document-title';\nimport Explorer from '../../components/Explorer';\nimport { search, filterBySearchInput } from '../../ducks/utils';\nimport { fetchDataFiles, deleteDataFile } from '../../ducks/datafiles';\nimport { getDocumentTitle } from '../../utils/helpers';\n\nexport class DataFiles extends Component {\n componentDidMount() {\n const { fetchDataFiles, params } = this.props;\n fetchDataFiles(params.splat);\n }\n\n componentWillReceiveProps(nextProps) {\n const { fetchDataFiles } = nextProps;\n if (this.props.params.splat !== nextProps.params.splat) {\n fetchDataFiles(nextProps.params.splat);\n }\n }\n\n render() {\n const { isFetching, files, search, params, deleteDataFile } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n const title = getDocumentTitle('data files', params.splat);\n\n return (\n <DocumentTitle title={title}>\n <Explorer\n type=\"datafiles\"\n items={files}\n params={params}\n newBtnLabel=\"New data file\"\n search={search}\n deleteItem={deleteDataFile}\n />\n </DocumentTitle>\n );\n }\n}\n\nDataFiles.propTypes = {\n files: PropTypes.array.isRequired,\n fetchDataFiles: PropTypes.func.isRequired,\n deleteDataFile: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n search: PropTypes.func.isRequired,\n params: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n files: filterBySearchInput(state.datafiles.files, state.utils.input),\n isFetching: state.datafiles.isFetching,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchDataFiles,\n deleteDataFile,\n search,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DataFiles);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport _ from 'underscore';\nimport { HotKeys } from 'react-hotkeys';\nimport DocumentTitle from 'react-document-title';\nimport DataGUI from '../../components/DataGUI';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport InputPath from '../../components/form/InputPath';\nimport Splitter from '../../components/Splitter';\nimport Errors from '../../components/Errors';\nimport Editor from '../../components/Editor';\nimport Button from '../../components/Button';\nimport { clearErrors } from '../../ducks/utils';\nimport {\n getFilenameFromPath,\n getExtensionFromPath,\n preventDefault,\n getDocumentTitle,\n} from '../../utils/helpers';\nimport {\n fetchDataFile,\n putDataFile,\n deleteDataFile,\n onDataFileChanged,\n} from '../../ducks/datafiles';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getLeaveMessage, getDeleteMessage, getNotFoundMessage } = translations;\n\nexport class DataFileEdit extends Component {\n state = {\n guiView: false,\n };\n\n componentDidMount() {\n const { fetchDataFile, params, router, route } = this.props;\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n router.setRouteLeaveHook(route, this.routerWillLeave);\n fetchDataFile(directory, filename);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n const new_path = nextProps.datafile.path;\n const path = this.props.datafile.path;\n\n // redirect if the path is changed\n if (new_path !== path) {\n browserHistory.push(\n `${ADMIN_PREFIX}/datafiles/${nextProps.datafile.relative_path}`\n );\n }\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n const { datafileChanged, fieldChanged } = this.props;\n if (datafileChanged || fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n toggleView = () => {\n this.setState(state => {\n return { guiView: !state.guiView };\n });\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const {\n datafile,\n datafileChanged,\n fieldChanged,\n putDataFile,\n params,\n } = this.props;\n const { path, relative_path } = datafile;\n const data_dir = path.replace(relative_path, '');\n\n let name, data, mode;\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n if (datafileChanged || fieldChanged) {\n if (this.state.guiView) {\n const { filepath, extname } = this.refs.gui.refs;\n name = filepath.value + extname.value;\n data = null;\n mode = 'gui';\n } else {\n const { input } = this.refs.inputpath.refs;\n name = input.value || input.props.defaultValue;\n data = this.refs.editor.getValue();\n mode = 'editor';\n }\n\n const data_path = directory\n ? data_dir + `${directory}/` + name\n : data_dir + name;\n\n const new_path = data_path !== path ? data_path : '';\n putDataFile(directory, filename, data, new_path, mode);\n }\n };\n\n handleClickDelete(path) {\n const { deleteDataFile, params } = this.props;\n const confirm = window.confirm(getDeleteMessage(path));\n\n if (confirm) {\n const directory = params.splat[0];\n const filename = getFilenameFromPath(path);\n deleteDataFile(directory, filename);\n const dir = directory ? `/${directory}` : '';\n browserHistory.push(`${ADMIN_PREFIX}/datafiles${dir}`);\n }\n }\n\n renderAside() {\n const { datafile, datafileChanged, fieldChanged, updated } = this.props;\n const { path } = datafile;\n const filename = getFilenameFromPath(path);\n const ext = getExtensionFromPath(path);\n const guiSupport = /ya?ml|json/i.test(ext);\n\n return (\n <div className=\"content-side\">\n <Button\n onClick={this.handleClickSave}\n type=\"save\"\n active={datafileChanged || fieldChanged}\n triggered={updated}\n block\n />\n {guiSupport && (\n <Button\n onClick={this.toggleView}\n type=\"view-toggle\"\n triggered={this.state.guiView}\n active\n block\n />\n )}\n <Splitter />\n <Button\n onClick={() => this.handleClickDelete(filename)}\n type=\"delete\"\n active\n block\n />\n </div>\n );\n }\n\n renderContentBody(filename) {\n const { datafile, datafileChanged, onDataFileChanged } = this.props;\n const { raw_content, content, slug, ext } = datafile;\n const { guiView } = this.state;\n\n if (guiView && content) {\n return (\n <div className=\"content-body\">\n <DataGUI\n fields={content}\n slug={slug}\n ext={ext}\n onChange={onDataFileChanged}\n ref=\"gui\"\n />\n </div>\n );\n } else if (!guiView && raw_content) {\n return (\n <div className=\"content-body\">\n <InputPath\n onChange={onDataFileChanged}\n type=\"data files\"\n path={filename}\n ref=\"inputpath\"\n />\n <Editor\n editorChanged={datafileChanged}\n onEditorChange={onDataFileChanged}\n content={raw_content}\n type={ext}\n ref=\"editor\"\n />\n </div>\n );\n }\n }\n\n render() {\n const { datafile, isFetching, params, errors } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n if (_.isEmpty(datafile.content)) {\n return <h1>{getNotFoundMessage('content')}</h1>;\n }\n\n const directory = params.splat[0];\n const filename = getFilenameFromPath(datafile.path);\n\n const keyboardHandlers = {\n save: this.handleClickSave,\n };\n\n const document_title = getDocumentTitle('data files', directory, filename);\n\n return (\n <DocumentTitle title={document_title}>\n <HotKeys handlers={keyboardHandlers} className=\"single\">\n {errors.length > 0 && <Errors errors={errors} />}\n\n <div className=\"content-header\">\n <Breadcrumbs type=\"datafiles\" splat={directory} />\n </div>\n\n <div className=\"content-wrapper\">\n {this.renderContentBody(filename)}\n {this.renderAside()}\n </div>\n </HotKeys>\n </DocumentTitle>\n );\n }\n}\n\nDataFileEdit.propTypes = {\n fetchDataFile: PropTypes.func.isRequired,\n putDataFile: PropTypes.func.isRequired,\n deleteDataFile: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n datafile: PropTypes.object.isRequired,\n onDataFileChanged: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n updated: PropTypes.bool.isRequired,\n datafileChanged: PropTypes.bool.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n errors: PropTypes.array.isRequired,\n params: PropTypes.object.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n datafile: state.datafiles.currentFile,\n isFetching: state.datafiles.isFetching,\n updated: state.datafiles.updated,\n datafileChanged: state.datafiles.datafileChanged,\n fieldChanged: state.metadata.fieldChanged,\n errors: state.utils.errors,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchDataFile,\n putDataFile,\n deleteDataFile,\n onDataFileChanged,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(DataFileEdit)\n);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport { HotKeys } from 'react-hotkeys';\nimport DocumentTitle from 'react-document-title';\nimport DataGUI from '../../components/DataGUI';\nimport Errors from '../../components/Errors';\nimport Editor from '../../components/Editor';\nimport Button from '../../components/Button';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport InputPath from '../../components/form/InputPath';\nimport { clearErrors } from '../../ducks/utils';\nimport { putDataFile, onDataFileChanged } from '../../ducks/datafiles';\nimport { preventDefault, getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getLeaveMessage } = translations;\n\nexport class DataFileNew extends Component {\n state = {\n guiView: false,\n };\n\n componentDidMount() {\n const { router, route } = this.props;\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n browserHistory.push(\n `${ADMIN_PREFIX}/datafiles/${nextProps.datafile.relative_path}`\n );\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n if (!this.state.guiView && this.props.datafileChanged) {\n return getLeaveMessage();\n }\n };\n\n toggleView = () => {\n this.setState(state => {\n return { guiView: !state.guiView };\n });\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { datafileChanged, fieldChanged, putDataFile, params } = this.props;\n let filename;\n\n if (datafileChanged || fieldChanged) {\n if (this.state.guiView) {\n const { filepath, extname } = this.refs.gui.refs;\n filename = filepath.value + extname.value;\n putDataFile(params.splat, filename, null, null, 'gui');\n } else {\n filename = this.refs.inputpath.refs.input.value;\n putDataFile(params.splat, filename, this.refs.editor.getValue());\n }\n }\n };\n\n renderAside() {\n const { datafileChanged, fieldChanged, updated } = this.props;\n\n return (\n <div className=\"content-side\">\n <Button\n onClick={this.handleClickSave}\n type=\"create\"\n active={datafileChanged || fieldChanged}\n triggered={updated}\n block\n />\n <Button\n onClick={this.toggleView}\n type=\"view-toggle\"\n triggered={this.state.guiView}\n active\n block\n />\n </div>\n );\n }\n\n renderContentBody() {\n const { datafileChanged, onDataFileChanged } = this.props;\n\n if (this.state.guiView) {\n return (\n <div className=\"content-body\">\n <DataGUI onChange={onDataFileChanged} ref=\"gui\" />\n </div>\n );\n }\n\n return (\n <div className=\"content-body\">\n <InputPath\n onChange={onDataFileChanged}\n type=\"data files\"\n path=\"\"\n ref=\"inputpath\"\n />\n <Editor\n editorChanged={datafileChanged}\n onEditorChange={onDataFileChanged}\n content=\"\"\n ref=\"editor\"\n />\n </div>\n );\n }\n\n render() {\n const { errors, params } = this.props;\n\n const keyboardHandlers = {\n save: this.handleClickSave,\n };\n\n const title = getDocumentTitle('data files', params.splat, 'New data file');\n\n return (\n <DocumentTitle title={title}>\n <HotKeys handlers={keyboardHandlers}>\n {errors.length > 0 && <Errors errors={errors} />}\n\n <div className=\"content-header\">\n <Breadcrumbs type=\"datafiles\" splat={params.splat} />\n </div>\n\n <div className=\"content-wrapper\">\n {this.renderContentBody()}\n {this.renderAside()}\n </div>\n </HotKeys>\n </DocumentTitle>\n );\n }\n}\n\nDataFileNew.propTypes = {\n putDataFile: PropTypes.func.isRequired,\n datafile: PropTypes.object.isRequired,\n onDataFileChanged: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n errors: PropTypes.array.isRequired,\n updated: PropTypes.bool.isRequired,\n datafileChanged: PropTypes.bool.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n params: PropTypes.object.isRequired,\n fieldChanged: PropTypes.bool,\n};\n\nconst mapStateToProps = state => ({\n datafile: state.datafiles.currentFile,\n updated: state.datafiles.updated,\n datafileChanged: state.datafiles.datafileChanged,\n fieldChanged: state.metadata.fieldChanged,\n errors: state.utils.errors,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n putDataFile,\n onDataFileChanged,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(DataFileNew)\n);\n","import { clearErrors, validationError, filterDeleted } from './utils';\nimport { PUT_DOCUMENT_SUCCESS, PUT_DOCUMENT_FAILURE } from './collections';\nimport { get, put, del } from '../utils/fetch';\nimport { validatePage } from '../utils/validation';\nimport {\n slugify,\n preparePayload,\n sanitizeFrontMatter,\n computeRelativePath,\n} from '../utils/helpers';\nimport { draftsAPIUrl, draftAPIUrl, documentAPIUrl } from '../constants/api';\n\n// Action Types\nexport const FETCH_DRAFTS_REQUEST = 'FETCH_DRAFTS_REQUEST';\nexport const FETCH_DRAFTS_SUCCESS = 'FETCH_DRAFTS_SUCCESS';\nexport const FETCH_DRAFTS_FAILURE = 'FETCH_DRAFTS_FAILURE';\nexport const FETCH_DRAFT_REQUEST = 'FETCH_DRAFT_REQUEST';\nexport const FETCH_DRAFT_SUCCESS = 'FETCH_DRAFT_SUCCESS';\nexport const FETCH_DRAFT_FAILURE = 'FETCH_DRAFT_FAILURE';\nexport const PUT_DRAFT_REQUEST = 'PUT_DRAFT_REQUEST';\nexport const PUT_DRAFT_SUCCESS = 'PUT_DRAFT_SUCCESS';\nexport const PUT_DRAFT_FAILURE = 'PUT_DRAFT_FAILURE';\nexport const DELETE_DRAFT_REQUEST = 'DELETE_DRAFT_REQUEST';\nexport const DELETE_DRAFT_SUCCESS = 'DELETE_DRAFT_SUCCESS';\nexport const DELETE_DRAFT_FAILURE = 'DELETE_DRAFT_FAILURE';\n\n// Actions\nexport const fetchDrafts = (directory = '') => dispatch => {\n dispatch({ type: FETCH_DRAFTS_REQUEST });\n return get(\n draftsAPIUrl(directory),\n { type: FETCH_DRAFTS_SUCCESS, name: 'drafts' },\n { type: FETCH_DRAFTS_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const fetchDraft = (directory, filename) => dispatch => {\n dispatch({ type: FETCH_DRAFT_REQUEST });\n return get(\n draftAPIUrl(directory, filename),\n { type: FETCH_DRAFT_SUCCESS, name: 'draft' },\n { type: FETCH_DRAFT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const createDraft = directory => (dispatch, getState) => {\n // get edited fields from metadata state\n const metadata = getState().metadata.metadata;\n let { path, raw_content, title } = metadata;\n // if `path` is a falsy value or if appending a slash to it equals to\n // `directory`, generate filename from `title`.\n if ((!path || `${path}/` === directory) && title) {\n path = `${slugify(title)}.md`;\n } else {\n const errors = validatePage(metadata);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n }\n // clear errors\n dispatch(clearErrors());\n\n const front_matter = sanitizeFrontMatter(metadata);\n\n // strip '_drafts/' from path when provided\n const filename = path.replace('_drafts/', '');\n\n // send the put request\n return put(\n draftAPIUrl(directory, filename),\n preparePayload({ front_matter, raw_content }),\n { type: PUT_DRAFT_SUCCESS, name: 'draft' },\n { type: PUT_DRAFT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const putDraft = (directory, filename) => (dispatch, getState) => {\n // get edited fields from metadata state\n const metadata = getState().metadata.metadata;\n let { path, raw_content, title } = metadata;\n // if `path` is a falsy value or if appending a slash to it equals to\n // `directory`, generate filename from `title`.\n if ((!path || `${path}/` === directory) && title) {\n path = `${slugify(title)}.md`;\n } else {\n const errors = validatePage(metadata);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n }\n // clear errors\n dispatch(clearErrors());\n\n const front_matter = sanitizeFrontMatter(metadata);\n const relative_path = directory\n ? `_drafts/${directory}/${path}`\n : `_drafts/${path}`;\n\n // send the put request\n return put(\n draftAPIUrl(directory, filename),\n preparePayload({ path: relative_path, front_matter, raw_content }),\n { type: PUT_DRAFT_SUCCESS, name: 'draft' },\n { type: PUT_DRAFT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const deleteDraft = (directory, filename) => dispatch => {\n const relative_path = computeRelativePath(directory, filename);\n return del(\n draftAPIUrl(directory, filename),\n { type: DELETE_DRAFT_SUCCESS, name: 'draft', id: relative_path },\n { type: DELETE_DRAFT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\nexport const publishDraft = (directory, filename) => (dispatch, getState) => {\n const metadata = getState().metadata.metadata;\n let { path, raw_content, title } = metadata;\n // if path is not given or equals to directory, generate filename from the title\n if (!path && title) {\n path = `${slugify(title)}.md`;\n } else {\n const errors = validatePage(metadata);\n if (errors.length) {\n return dispatch(validationError(errors));\n }\n }\n // clear errors\n dispatch(clearErrors());\n\n const front_matter = sanitizeFrontMatter(metadata);\n\n return put(\n documentAPIUrl('posts', directory, filename),\n preparePayload({ raw_content, front_matter }),\n { type: PUT_DOCUMENT_SUCCESS, name: 'doc' },\n { type: PUT_DOCUMENT_FAILURE, name: 'error' },\n dispatch\n );\n};\n\n// Reducer\nexport default function drafts(\n state = {\n drafts: [],\n draft: {},\n isFetching: false,\n updated: false,\n },\n action\n) {\n switch (action.type) {\n case FETCH_DRAFTS_REQUEST:\n case FETCH_DRAFT_REQUEST:\n return {\n ...state,\n isFetching: true,\n };\n case FETCH_DRAFTS_SUCCESS:\n return {\n ...state,\n drafts: action.drafts,\n isFetching: false,\n draft: {},\n };\n case FETCH_DRAFTS_FAILURE:\n return {\n ...state,\n isFetching: false,\n drafts: [],\n };\n case FETCH_DRAFT_SUCCESS:\n return {\n ...state,\n draft: action.draft,\n isFetching: false,\n };\n case FETCH_DRAFT_FAILURE:\n return {\n ...state,\n draft: {},\n isFetching: false,\n };\n case PUT_DRAFT_SUCCESS:\n return {\n ...state,\n draft: action.draft,\n updated: true,\n };\n case DELETE_DRAFT_SUCCESS:\n return {\n ...state,\n drafts: filterDeleted(state.drafts, action.id),\n };\n default:\n return {\n ...state,\n updated: false,\n };\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport DocumentTitle from 'react-document-title';\nimport Explorer from '../../components/Explorer';\nimport { search, filterBySearchInput } from '../../ducks/utils';\nimport { fetchDrafts, deleteDraft } from '../../ducks/drafts';\nimport { getDocumentTitle } from '../../utils/helpers';\n\nexport class Drafts extends Component {\n componentDidMount() {\n const { fetchDrafts, params } = this.props;\n fetchDrafts(params.splat);\n }\n\n componentWillReceiveProps(nextProps) {\n const { fetchDrafts } = nextProps;\n if (this.props.params.splat !== nextProps.params.splat) {\n fetchDrafts(nextProps.params.splat);\n }\n }\n\n render() {\n const { isFetching, drafts, search, params, deleteDraft } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n const title = getDocumentTitle('drafts', params.splat);\n\n return (\n <DocumentTitle title={title}>\n <Explorer\n type=\"drafts\"\n items={drafts}\n params={params}\n newBtnLabel=\"New draft\"\n search={search}\n deleteItem={deleteDraft}\n />\n </DocumentTitle>\n );\n }\n}\n\nDrafts.propTypes = {\n drafts: PropTypes.array.isRequired,\n fetchDrafts: PropTypes.func.isRequired,\n deleteDraft: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n search: PropTypes.func.isRequired,\n params: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n drafts: filterBySearchInput(state.drafts.drafts, state.utils.input),\n isFetching: state.drafts.isFetching,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchDrafts,\n deleteDraft,\n search,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Drafts);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport { HotKeys } from 'react-hotkeys';\nimport _ from 'underscore';\nimport moment from 'moment';\nimport DocumentTitle from 'react-document-title';\nimport Button from '../../components/Button';\nimport Errors from '../../components/Errors';\nimport Splitter from '../../components/Splitter';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport MarkdownPageBody from '../../components/MarkdownPageBody';\nimport {\n fetchDraft,\n deleteDraft,\n putDraft,\n publishDraft,\n} from '../../ducks/drafts';\nimport { updateTitle, updateBody, updatePath } from '../../ducks/metadata';\nimport { clearErrors } from '../../ducks/utils';\nimport { preventDefault, getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst {\n getLeaveMessage,\n getDeleteMessage,\n getPublishDraftMessage,\n} = translations;\n\nexport class DraftEdit extends Component {\n componentDidMount() {\n const { fetchDraft, params, router, route } = this.props;\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n fetchDraft(directory, filename);\n\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n const new_path = nextProps.draft.path;\n const path = this.props.draft.path;\n // redirect if the path is changed\n if (new_path !== path) {\n browserHistory.push(\n `${ADMIN_PREFIX}/drafts/${nextProps.draft.relative_path}`\n );\n }\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n if (this.props.fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { putDraft, fieldChanged, params } = this.props;\n if (fieldChanged) {\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n putDraft(directory, filename);\n }\n };\n\n handleClickPublish(path) {\n const { deleteDraft, publishDraft, params } = this.props;\n\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n const today = moment().format('YYYY-MM-DD');\n const datedfilename = `${today}-${filename}`;\n const postPath = directory\n ? `_posts/${directory}/${datedfilename}`\n : `_posts/${datedfilename}`;\n\n const confirm = window.confirm(getPublishDraftMessage(path, postPath));\n if (confirm) {\n const goTo = directory ? `/${directory}` : '';\n deleteDraft(directory, filename);\n publishDraft(directory, datedfilename);\n browserHistory.push(`${ADMIN_PREFIX}/drafts${goTo}`);\n }\n }\n\n handleClickDelete(name) {\n const { deleteDraft, params } = this.props;\n const confirm = window.confirm(getDeleteMessage(name));\n if (confirm) {\n const [directory, ...rest] = params.splat;\n const filename = rest.join('.');\n const goTo = directory ? `/${directory}` : '';\n deleteDraft(directory, filename);\n browserHistory.push(`${ADMIN_PREFIX}/drafts${goTo}`);\n }\n }\n\n render() {\n const {\n isFetching,\n draft,\n errors,\n updateTitle,\n updateBody,\n updatePath,\n updated,\n fieldChanged,\n params,\n } = this.props;\n\n if (isFetching) {\n return null;\n } else if (_.isEmpty(draft)) {\n return <h1>Could not find the draft.</h1>;\n }\n\n const keyboardHandlers = {\n save: this.handleClickSave,\n };\n\n const {\n name,\n path,\n raw_content,\n http_url,\n front_matter,\n front_matter_defaults,\n } = draft;\n const directory = params.splat[0];\n const title = front_matter && front_matter.title ? front_matter.title : '';\n const document_title = getDocumentTitle('drafts', directory, title || name);\n\n return (\n <DocumentTitle title={document_title}>\n <HotKeys handlers={keyboardHandlers} className=\"single\">\n {errors.length > 0 && <Errors errors={errors} />}\n <div className=\"content-header\">\n <Breadcrumbs type=\"drafts\" splat={directory} />\n </div>\n\n <div className=\"content-wrapper\">\n <MarkdownPageBody\n type=\"drafts\"\n path={name}\n title={title}\n body={raw_content}\n updatePath={updatePath}\n updateBody={updateBody}\n updateTitle={updateTitle}\n onSave={this.handleClickSave}\n metafields={{ title, raw_content, path: name, ...front_matter }}\n staticmetafields={front_matter_defaults}\n />\n <div className=\"content-side\">\n <Button\n onClick={this.handleClickSave}\n type=\"save\"\n active={fieldChanged}\n triggered={updated}\n block\n />\n <Button to={http_url} type=\"view\" active block />\n <Splitter />\n <Button\n onClick={() => this.handleClickPublish(path)}\n type=\"publish\"\n active\n block\n />\n <Button\n onClick={() => this.handleClickDelete(name)}\n type=\"delete\"\n active\n block\n />\n </div>\n </div>\n </HotKeys>\n </DocumentTitle>\n );\n }\n}\n\nDraftEdit.propTypes = {\n draft: PropTypes.object.isRequired,\n fetchDraft: PropTypes.func.isRequired,\n deleteDraft: PropTypes.func.isRequired,\n putDraft: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n publishDraft: PropTypes.func.isRequired,\n isFetching: PropTypes.bool.isRequired,\n errors: PropTypes.array.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n updated: PropTypes.bool.isRequired,\n params: PropTypes.object.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n draft: state.drafts.draft,\n isFetching: state.drafts.isFetching,\n fieldChanged: state.metadata.fieldChanged,\n updated: state.drafts.updated,\n errors: state.utils.errors,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchDraft,\n deleteDraft,\n putDraft,\n publishDraft,\n updateTitle,\n updateBody,\n updatePath,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(DraftEdit)\n);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { browserHistory, withRouter } from 'react-router';\nimport DocumentTitle from 'react-document-title';\nimport CreateMarkdownPage from '../../components/CreateMarkdownPage';\nimport { updateTitle, updateBody, updatePath } from '../../ducks/metadata';\nimport { createDraft } from '../../ducks/drafts';\nimport { clearErrors } from '../../ducks/utils';\nimport { preventDefault, getDocumentTitle } from '../../utils/helpers';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getLeaveMessage } = translations;\n\nexport class DraftNew extends Component {\n componentDidMount() {\n const { router, route } = this.props;\n router.setRouteLeaveHook(route, this.routerWillLeave);\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.updated !== nextProps.updated) {\n browserHistory.push(\n `${ADMIN_PREFIX}/drafts/${nextProps.draft.relative_path}`\n );\n }\n }\n\n componentWillUnmount() {\n const { clearErrors, errors } = this.props;\n errors.length && clearErrors();\n }\n\n routerWillLeave = nextLocation => {\n if (this.props.fieldChanged) {\n return getLeaveMessage();\n }\n };\n\n handleClickSave = e => {\n preventDefault(e);\n const { fieldChanged, createDraft, params } = this.props;\n fieldChanged && createDraft(params.splat);\n };\n\n render() {\n const {\n params,\n config,\n errors,\n updated,\n updateBody,\n updatePath,\n updateTitle,\n fieldChanged,\n } = this.props;\n\n const title = getDocumentTitle('drafts', params.splat, 'New draft');\n\n return (\n <DocumentTitle title={title}>\n <CreateMarkdownPage\n type=\"drafts\"\n params={params}\n config={config}\n errors={errors}\n updated={updated}\n updateBody={updateBody}\n updatePath={updatePath}\n updateTitle={updateTitle}\n fieldChanged={fieldChanged}\n onClickSave={this.handleClickSave}\n />\n </DocumentTitle>\n );\n }\n}\n\nDraftNew.propTypes = {\n createDraft: PropTypes.func.isRequired,\n updateTitle: PropTypes.func.isRequired,\n updateBody: PropTypes.func.isRequired,\n updatePath: PropTypes.func.isRequired,\n clearErrors: PropTypes.func.isRequired,\n errors: PropTypes.array.isRequired,\n fieldChanged: PropTypes.bool.isRequired,\n updated: PropTypes.bool.isRequired,\n router: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n params: PropTypes.object.isRequired,\n config: PropTypes.object.isRequired,\n draft: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n draft: state.drafts.draft,\n fieldChanged: state.metadata.fieldChanged,\n errors: state.utils.errors,\n updated: state.drafts.updated,\n config: state.config.config,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n updateTitle,\n updateBody,\n updatePath,\n createDraft,\n clearErrors,\n },\n dispatch\n );\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(DraftNew)\n);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'underscore';\nimport ReactDropzone from 'react-dropzone';\nimport FilePreview from './FilePreview';\nimport Splitter from './Splitter';\nimport Icon from './Icon';\n\nexport class Dropzone extends Component {\n openDropzone() {\n this.refs.ReactDropzone.open();\n }\n\n render() {\n const { files, splat, onDrop, onClickDelete, onClickItem } = this.props;\n return (\n <ReactDropzone\n onDrop={onDrop}\n ref=\"ReactDropzone\"\n className=\"dropzone\"\n activeClassName=\"dropzone-active\"\n multiple\n disableClick\n >\n {files.length ? (\n <div className=\"preview-container\">\n {_.map(files, (file, i) => (\n <FilePreview\n key={i}\n onClick={onClickItem}\n onClickDelete={onClickDelete}\n splat={splat}\n file={file}\n />\n ))}\n <Splitter />\n <div className=\"preview-tip\">\n <div>Drag and drop file(s) here to upload</div>\n </div>\n </div>\n ) : (\n <div className=\"preview-info\">\n <Icon name=\"upload\" />\n <p>Drag and drop file(s) here to upload</p>\n </div>\n )}\n </ReactDropzone>\n );\n }\n}\n\nDropzone.propTypes = {\n files: PropTypes.array.isRequired,\n splat: PropTypes.string.isRequired,\n onDrop: PropTypes.func.isRequired,\n onClickDelete: PropTypes.func.isRequired,\n onClickItem: PropTypes.func,\n};\n\nexport default Dropzone;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport DocumentTitle from 'react-document-title';\nimport Dropzone from '../../components/Dropzone';\nimport Button from '../../components/Button';\nimport Icon from '../../components/Icon';\nimport Breadcrumbs from '../../components/Breadcrumbs';\nimport InputSearch from '../../components/form/InputSearch';\nimport { search } from '../../ducks/utils';\nimport {\n existingUploadedFilenames,\n getDocumentTitle,\n} from '../../utils/helpers';\nimport {\n fetchStaticFiles,\n uploadStaticFiles,\n deleteStaticFile,\n filterByFilename,\n} from '../../ducks/staticfiles';\nimport { ADMIN_PREFIX } from '../../constants';\n\nimport translations from '../../translations';\nconst { getOverrideMessage } = translations;\n\nexport class StaticFiles extends Component {\n componentDidMount() {\n const { fetchStaticFiles, params } = this.props;\n fetchStaticFiles(params.splat);\n }\n\n componentWillReceiveProps(nextProps) {\n const { fetchStaticFiles } = nextProps;\n if (this.props.params.splat !== nextProps.params.splat) {\n fetchStaticFiles(nextProps.params.splat);\n }\n }\n\n onDrop(uploadedFiles) {\n const { uploadStaticFiles, files, params } = this.props;\n const existingFiles = existingUploadedFilenames(uploadedFiles, files);\n if (existingFiles.length > 0) {\n const confirm = window.confirm(\n getOverrideMessage(existingFiles.join(', '))\n );\n if (!confirm) {\n return false;\n }\n }\n uploadStaticFiles(params.splat, uploadedFiles);\n }\n\n openDropzone = () => {\n this.refs.dropzone.openDropzone();\n };\n\n renderFilePreviewRow(static_files, key) {\n const { params, onClickStaticFile, deleteStaticFile } = this.props;\n return (\n <tr key={key}>\n <td>\n <Dropzone\n ref=\"dropzone\"\n splat={params.splat || ''}\n files={static_files}\n onClickItem={onClickStaticFile}\n onClickDelete={deleteStaticFile}\n onDrop={static_files => this.onDrop(static_files)}\n />\n </td>\n </tr>\n );\n }\n\n renderDirectoryRow(directory, index) {\n const { name, path } = directory;\n const to = `${ADMIN_PREFIX}/staticfiles/${path}`;\n return (\n <tr key={index}>\n <td className=\"row-title\">\n <strong>\n <Link to={to}>\n <Icon name=\"folder\" />\n {name}\n </Link>\n </strong>\n </td>\n </tr>\n );\n }\n\n renderRows() {\n const { files } = this.props;\n const dirs = files.filter(entity => entity.type === 'directory');\n const static_files = files.filter(entity => !entity.type);\n\n return dirs\n .map((entry, index) => this.renderDirectoryRow(entry, index))\n .concat(this.renderFilePreviewRow(static_files, dirs.length + 1));\n }\n\n renderTable() {\n return (\n <div className=\"content-table\">\n <table>\n <thead>\n <tr>\n <th>Directory Contents</th>\n </tr>\n </thead>\n <tbody>{this.renderRows()}</tbody>\n </table>\n </div>\n );\n }\n\n render() {\n const { isFetching, params, search } = this.props;\n\n if (isFetching) {\n return null;\n }\n\n const to = `${ADMIN_PREFIX}/staticfiles/index`;\n const title = getDocumentTitle('static files', params.splat);\n\n return (\n <DocumentTitle title={title}>\n <div>\n <div className=\"content-header\">\n <Breadcrumbs type=\"staticfiles\" splat={params.splat} />\n <div className=\"page-buttons multiple\">\n <Link className=\"btn btn-view\" to={to}>\n Index Listing\n </Link>\n <Button\n onClick={() => this.openDropzone()}\n type=\"upload\"\n active\n />\n </div>\n <div className=\"pull-right\">\n <InputSearch searchBy=\"filename\" search={search} />\n </div>\n </div>\n {this.renderTable()}\n </div>\n </DocumentTitle>\n );\n }\n}\n\nStaticFiles.propTypes = {\n files: PropTypes.array.isRequired,\n isFetching: PropTypes.bool.isRequired,\n fetchStaticFiles: PropTypes.func.isRequired,\n uploadStaticFiles: PropTypes.func.isRequired,\n deleteStaticFile: PropTypes.func.isRequired,\n onClickStaticFile: PropTypes.func,\n search: PropTypes.func.isRequired,\n params: PropTypes.object.isRequired,\n};\n\nconst mapStateToProps = state => ({\n files: filterByFilename(state.staticfiles.files, state.utils.input),\n isFetching: state.staticfiles.isFetching,\n});\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n fetchStaticFiles,\n uploadStaticFiles,\n deleteStaticFile,\n search,\n },\n dispatch\n );\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StaticFiles);\n","import React from 'react';\n\nconst NotFound = () => (\n <div className=\"notfound\">\n <img src={require('../../assets/images/logo-black-red.png')} alt=\"Jekyll Admin\" />\n <h1>Huh. It seems that page is Hyde-ing...</h1>\n <h2>The resource you requested was not found.</h2>\n </div>\n);\n\nexport default NotFound;\n","import React from 'react';\nimport { Route, IndexRoute } from 'react-router';\nimport { ADMIN_PREFIX } from './constants';\n\nimport App from './containers/App';\nimport Configuration from './containers/views/Configuration';\nimport Pages from './containers/views/Pages';\nimport PageEdit from './containers/views/PageEdit';\nimport PageNew from './containers/views/PageNew';\nimport Documents from './containers/views/Documents';\nimport DocumentEdit from './containers/views/DocumentEdit';\nimport DocumentNew from './containers/views/DocumentNew';\nimport DataFiles from './containers/views/DataFiles';\nimport DataFileEdit from './containers/views/DataFileEdit';\nimport DataFileNew from './containers/views/DataFileNew';\nimport Drafts from './containers/views/Drafts';\nimport DraftEdit from './containers/views/DraftEdit';\nimport DraftNew from './containers/views/DraftNew';\nimport StaticFiles from './containers/views/StaticFiles';\nimport StaticIndex from './containers/views/StaticIndex';\nimport NotFound from './containers/views/NotFound';\n\nexport default (\n <Route path={`${ADMIN_PREFIX}`} component={App}>\n <IndexRoute component={Pages} />\n <Route path=\"configuration\" component={Configuration} />\n <Route path=\"pages\">\n <IndexRoute component={Pages} />\n <Route path=\"(**/)new\" component={PageNew} />\n <Route path=\"(**/)*.*\" component={PageEdit} />\n <Route path=\"**\" component={Pages} />\n </Route>\n <Route path=\"collections\">\n <Route path=\":collection_name\">\n <IndexRoute component={Documents} />\n <Route path=\"(**/)new\" component={DocumentNew} />\n <Route path=\"(**/)*.*\" component={DocumentEdit} />\n <Route path=\"**\" component={Documents} />\n </Route>\n </Route>\n <Route path=\"drafts\">\n <IndexRoute component={Drafts} />\n <Route path=\"(**/)new\" component={DraftNew} />\n <Route path=\"(**/)*.*\" component={DraftEdit} />\n <Route path=\"**\" component={Drafts} />\n </Route>\n <Route path=\"datafiles\">\n <IndexRoute component={DataFiles} />\n <Route path=\"(**/)new\" component={DataFileNew} />\n <Route path=\"(**/)*.*\" component={DataFileEdit} />\n <Route path=\"**\" component={DataFiles} />\n </Route>\n <Route path=\"staticfiles\">\n <IndexRoute component={StaticFiles} />\n <Route path=\"index\" component={StaticIndex} />\n <Route path=\"**\" component={StaticFiles} />\n </Route>\n <Route path={`${ADMIN_PREFIX}/*`} component={NotFound} />\n </Route>\n);\n","import { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\n\nimport config from './config';\nimport pages from './pages';\nimport collections from './collections';\nimport metadata from './metadata';\nimport drafts from './drafts';\nimport datafiles from './datafiles';\nimport staticfiles from './staticfiles';\nimport utils from './utils';\nimport siteMeta from './siteMeta';\nimport notifications from './notifications';\n\nexport default combineReducers({\n routing: routerReducer,\n meta: siteMeta,\n config,\n pages,\n collections,\n metadata,\n drafts,\n datafiles,\n staticfiles,\n utils,\n notifications,\n});\n","import { createStore, compose, applyMiddleware } from 'redux';\nimport reduxImmutableStateInvariant from 'redux-immutable-state-invariant';\nimport thunk from 'redux-thunk';\nimport createLogger from 'redux-logger';\nimport rootReducer from './ducks';\n\nconst logger = createLogger();\n\nconst configureStoreProd = initialState => {\n const middlewares = [thunk];\n\n return createStore(\n rootReducer,\n initialState,\n compose(applyMiddleware(...middlewares))\n );\n};\n\nconst configureStoreDev = initialState => {\n const middlewares = [reduxImmutableStateInvariant(), thunk, logger];\n\n const composeEnhancers =\n window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n const store = createStore(\n rootReducer,\n initialState,\n composeEnhancers(applyMiddleware(...middlewares))\n );\n\n if (module.hot) {\n module.hot.accept('./ducks', () => {\n const nextReducer = require('./ducks').default;\n store.replaceReducer(nextReducer);\n });\n }\n\n return store;\n};\n\nconst configureStore =\n process.env.NODE_ENV === 'production'\n ? configureStoreProd\n : configureStoreDev;\n\nexport default configureStore;\n","/* eslint-disable import/default */\nimport React from 'react';\nimport { syncHistoryWithStore } from 'react-router-redux';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { Router, browserHistory, Redirect } from 'react-router';\nimport routes from './routes';\nimport configureStore from './store';\nimport { ADMIN_PREFIX } from './constants';\nimport './styles/main.scss';\n\nconst store = configureStore();\nconst history = syncHistoryWithStore(browserHistory, store);\n\nrender(\n <Provider store={store}>\n <Router history={history} routes={routes}>\n <Redirect from={`${ADMIN_PREFIX}/`} to={`${ADMIN_PREFIX}/pages/`} />\n </Router>\n </Provider>,\n document.getElementById('root')\n);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/runtime-main.95f94e60.js b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/runtime-main.95f94e60.js deleted file mode 100644 index 331e4253..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/runtime-main.95f94e60.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){function r(r){for(var n,l,i=r[0],a=r[1],f=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/admin/";var i=this["webpackJsonpjekyll-admin"]=this["webpackJsonpjekyll-admin"]||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var p=a;t()}([]); -//# sourceMappingURL=runtime-main.95f94e60.js.map \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/runtime-main.95f94e60.js.map b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/runtime-main.95f94e60.js.map deleted file mode 100644 index b243e2c3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/js/runtime-main.95f94e60.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAK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E7DrC,OAAO+B,eAAeT,EAAS,aAAc,CAAEe,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKzC,OAAO0C,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBzC,OAAO+B,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBS,EAAEc,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAAStB,GAChC,IAAIM,EAASN,GAAUA,EAAOiB,WAC7B,WAAwB,OAAOjB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO/C,OAAOC,UAAUC,eAAeC,KAAK2C,EAAQC,IAGzG7B,EAAoB8B,EAAI,UAExB,IAAIC,EAAaC,KAAK,4BAA8BA,KAAK,6BAA+B,GACpFC,EAAmBF,EAAW5C,KAAKuC,KAAKK,GAC5CA,EAAW5C,KAAOf,EAClB2D,EAAaA,EAAWG,QACxB,IAAI,IAAIvD,EAAI,EAAGA,EAAIoD,EAAWlD,OAAQF,IAAKP,EAAqB2D,EAAWpD,IAC3E,IAAIU,EAAsB4C,EAI1BxC,I","file":"static/js/runtime-main.95f94e60.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/admin/\";\n\n \tvar jsonpArray = this[\"webpackJsonpjekyll-admin\"] = this[\"webpackJsonpjekyll-admin\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.1dc35d25.ttf b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.1dc35d25.ttf deleted file mode 100644 index f221e50a..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.1dc35d25.ttf and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.25a32416.eot b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.25a32416.eot deleted file mode 100644 index c7b00d2b..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.25a32416.eot and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.c8ddf1e5.woff b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.c8ddf1e5.woff deleted file mode 100644 index 6e7483cf..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.c8ddf1e5.woff and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.d7c63908.svg b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.d7c63908.svg deleted file mode 100644 index 8b66187f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.d7c63908.svg +++ /dev/null @@ -1,685 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="fontawesomeregular" horiz-adv-x="1536" > -<font-face units-per-em="1792" ascent="1536" descent="-256" /> -<missing-glyph horiz-adv-x="448" /> -<glyph unicode=" " horiz-adv-x="448" /> -<glyph unicode=" " horiz-adv-x="448" /> -<glyph unicode=" " horiz-adv-x="448" /> -<glyph unicode="¨" horiz-adv-x="1792" /> -<glyph unicode="©" horiz-adv-x="1792" /> -<glyph unicode="®" horiz-adv-x="1792" /> -<glyph unicode="´" horiz-adv-x="1792" /> -<glyph unicode="Æ" horiz-adv-x="1792" /> -<glyph unicode="Ø" horiz-adv-x="1792" /> -<glyph unicode=" " horiz-adv-x="768" /> -<glyph unicode=" " horiz-adv-x="1537" /> -<glyph unicode=" " horiz-adv-x="768" /> -<glyph unicode=" " horiz-adv-x="1537" /> -<glyph unicode=" " horiz-adv-x="512" /> -<glyph unicode=" " horiz-adv-x="384" /> -<glyph unicode=" " horiz-adv-x="256" /> -<glyph unicode=" " horiz-adv-x="256" /> -<glyph unicode=" " horiz-adv-x="192" /> -<glyph unicode=" " horiz-adv-x="307" /> -<glyph unicode=" " horiz-adv-x="85" /> -<glyph unicode=" " horiz-adv-x="307" /> -<glyph unicode=" " horiz-adv-x="384" /> -<glyph unicode="™" horiz-adv-x="1792" /> -<glyph unicode="∞" horiz-adv-x="1792" /> -<glyph unicode="≠" horiz-adv-x="1792" /> -<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" /> -<glyph unicode="" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" /> -<glyph unicode="" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> -<glyph unicode="" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" /> -<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " /> -<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" /> -<glyph unicode="" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z " /> -<glyph unicode="" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" /> -<glyph unicode="" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" /> -<glyph unicode="" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" /> -<glyph unicode="" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" /> -<glyph unicode="" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" /> -<glyph unicode="" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" /> -<glyph unicode="" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" /> -<glyph unicode="" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" /> -<glyph unicode="" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" /> -<glyph unicode="" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" /> -<glyph unicode="" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" /> -<glyph unicode="" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" /> -<glyph unicode="" horiz-adv-x="1408" d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" /> -<glyph unicode="" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" /> -<glyph unicode="" d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49 t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" /> -<glyph unicode="" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> -<glyph unicode="" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" /> -<glyph unicode="" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" /> -<glyph unicode="" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" /> -<glyph unicode="" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" /> -<glyph unicode="" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" /> -<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" /> -<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" /> -<glyph unicode="" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" /> -<glyph unicode="" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" /> -<glyph unicode="" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" /> -<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" /> -<glyph unicode="" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" /> -<glyph unicode="" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" /> -<glyph unicode="" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" /> -<glyph unicode="" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" /> -<glyph unicode="" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" /> -<glyph unicode="" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" /> -<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" /> -<glyph unicode="" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" /> -<glyph unicode="" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " /> -<glyph unicode="" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" /> -<glyph unicode="" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" /> -<glyph unicode="" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " /> -<glyph unicode="" horiz-adv-x="1664" d="M640 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1536 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1664 1088v-512q0 -24 -16.5 -42.5t-40.5 -21.5l-1044 -122q13 -60 13 -70q0 -16 -24 -64h920q26 0 45 -19t19 -45 t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 11 8 31.5t16 36t21.5 40t15.5 29.5l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t19.5 -15.5t13 -24.5t8 -26t5.5 -29.5t4.5 -26h1201q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" /> -<glyph unicode="" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" /> -<glyph unicode="" horiz-adv-x="2048" d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" /> -<glyph unicode="" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-188v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-532q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960z" /> -<glyph unicode="" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" /> -<glyph unicode="" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" /> -<glyph unicode="" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" /> -<glyph unicode="" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" /> -<glyph unicode="" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" /> -<glyph unicode="" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" /> -<glyph unicode="" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" /> -<glyph unicode="" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" /> -<glyph unicode="" d="M519 336q4 6 -3 13q-9 7 -14 2q-4 -6 3 -13q9 -7 14 -2zM491 377q-5 7 -12 4q-6 -4 0 -12q7 -8 12 -5q6 4 0 13zM450 417q2 4 -5 8q-7 2 -8 -2q-3 -5 4 -8q8 -2 9 2zM471 394q2 1 1.5 4.5t-3.5 5.5q-6 7 -10 3t1 -11q6 -6 11 -2zM557 319q2 7 -9 11q-9 3 -13 -4 q-2 -7 9 -11q9 -3 13 4zM599 316q0 8 -12 8q-10 0 -10 -8t11 -8t11 8zM638 323q-2 7 -13 5t-9 -9q2 -8 12 -6t10 10zM1280 640q0 212 -150 362t-362 150t-362 -150t-150 -362q0 -167 98 -300.5t252 -185.5q18 -3 26.5 5t8.5 20q0 52 -1 95q-6 -1 -15.5 -2.5t-35.5 -2t-48 4 t-43.5 20t-29.5 41.5q-23 59 -57 74q-2 1 -4.5 3.5l-8 8t-7 9.5t4 7.5t19.5 3.5q6 0 15 -2t30 -15.5t33 -35.5q16 -28 37.5 -42t43.5 -14t38 3.5t30 9.5q7 47 33 69q-49 6 -86 18.5t-73 39t-55.5 76t-19.5 119.5q0 79 53 137q-24 62 5 136q19 6 54.5 -7.5t60.5 -29.5l26 -16 q58 17 128 17t128 -17q11 7 28.5 18t55.5 26t57 9q29 -74 5 -136q53 -58 53 -137q0 -57 -14 -100.5t-35.5 -70t-53.5 -44.5t-62.5 -26t-68.5 -12q35 -31 35 -95q0 -40 -0.5 -89t-0.5 -51q0 -12 8.5 -20t26.5 -5q154 52 252 185.5t98 300.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" /> -<glyph unicode="" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" /> -<glyph unicode="" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" /> -<glyph unicode="" horiz-adv-x="1024" d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" /> -<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -40 7t-13 30q0 3 0.5 76.5t0.5 134.5q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 119 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24 q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-85 13.5q-45 -113 -8 -204q-79 -87 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-39 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5 t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -88.5t0.5 -54.5q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103zM291 305q3 7 -7 12 q-10 3 -13 -2q-3 -7 7 -12q9 -6 13 2zM322 271q7 5 -2 16q-10 9 -16 3q-7 -5 2 -16q10 -10 16 -3zM352 226q9 7 0 19q-8 13 -17 6q-9 -5 0 -18t17 -7zM394 184q8 8 -4 19q-12 12 -20 3q-9 -8 4 -19q12 -12 20 -3zM451 159q3 11 -13 16q-15 4 -19 -7t13 -15q15 -6 19 6z M514 154q0 13 -17 11q-16 0 -16 -11q0 -13 17 -11q16 0 16 11zM572 164q-2 11 -18 9q-16 -3 -14 -15t18 -8t14 14z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" /> -<glyph unicode="" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" /> -<glyph unicode="" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" /> -<glyph unicode="" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" /> -<glyph unicode="" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" /> -<glyph unicode="" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" /> -<glyph unicode="" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" /> -<glyph unicode="" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" /> -<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" /> -<glyph unicode="" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" /> -<glyph unicode="" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " /> -<glyph unicode="" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " /> -<glyph unicode="" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" /> -<glyph unicode="" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" /> -<glyph unicode="" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" /> -<glyph unicode="" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" /> -<glyph unicode="" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" /> -<glyph unicode="" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" /> -<glyph unicode="" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" /> -<glyph unicode="" d="M917 631q0 26 -6 64h-362v-132h217q-3 -24 -16.5 -50t-37.5 -53t-66.5 -44.5t-96.5 -17.5q-99 0 -169 71t-70 171t70 171t169 71q92 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585 h109v110h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1437 623q0 -208 -87 -370.5t-248 -254t-369 -91.5q-149 0 -285 58t-234 156t-156 234t-58 285t58 285t156 234t234 156t285 58q286 0 491 -192l-199 -191q-117 113 -292 113q-123 0 -227.5 -62t-165.5 -168.5t-61 -232.5t61 -232.5t165.5 -168.5t227.5 -62 q83 0 152.5 23t114.5 57.5t78.5 78.5t49 83t21.5 74h-416v252h692q12 -63 12 -122zM2304 745v-210h-209v-209h-210v209h-209v210h209v209h210v-209h209z" /> -<glyph unicode="" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" /> -<glyph unicode="" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" /> -<glyph unicode="" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" /> -<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" /> -<glyph unicode="" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> -<glyph unicode="" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" /> -<glyph unicode="" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" /> -<glyph unicode="" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" /> -<glyph unicode="" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" /> -<glyph unicode="" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5 t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704 q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" /> -<glyph unicode="" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" /> -<glyph unicode="" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" /> -<glyph unicode="" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> -<glyph unicode="" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" /> -<glyph unicode="" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" /> -<glyph unicode="" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" /> -<glyph unicode="" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" /> -<glyph unicode="" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" /> -<glyph unicode="" horiz-adv-x="1792" d="M526 142q0 -53 -37.5 -90.5t-90.5 -37.5q-52 0 -90 38t-38 90q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 -64q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -53 -37.5 -90.5t-90.5 -37.5 t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1522 142q0 -52 -38 -90t-90 -38q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM558 1138q0 -66 -47 -113t-113 -47t-113 47t-47 113t47 113t113 47t113 -47t47 -113z M1728 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1088 1344q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1618 1138q0 -93 -66 -158.5t-158 -65.5q-93 0 -158.5 65.5t-65.5 158.5 q0 92 65.5 158t158.5 66q92 0 158 -66t66 -158z" /> -<glyph unicode="" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" /> -<glyph unicode="" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" /> -<glyph unicode="" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" /> -<glyph unicode="" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" /> -<glyph unicode="" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" /> -<glyph unicode="" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" /> -<glyph unicode="" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" /> -<glyph unicode="" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" /> -<glyph unicode="" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" /> -<glyph unicode="" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" /> -<glyph unicode="" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" /> -<glyph unicode="" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" /> -<glyph unicode="" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" /> -<glyph unicode="" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" /> -<glyph unicode="" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" /> -<glyph unicode="" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" /> -<glyph unicode="" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" /> -<glyph unicode="" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" /> -<glyph unicode="" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" /> -<glyph unicode="" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" /> -<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" /> -<glyph unicode="" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" /> -<glyph unicode="" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" /> -<glyph unicode="" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" /> -<glyph unicode="" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" /> -<glyph unicode="" d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" /> -<glyph unicode="" d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" /> -<glyph unicode="" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" /> -<glyph unicode="" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" /> -<glyph unicode="" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" /> -<glyph unicode="" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" /> -<glyph unicode="" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" /> -<glyph unicode="" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" /> -<glyph unicode="" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" /> -<glyph unicode="" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" /> -<glyph unicode="" d="M1289 -96h-1118v480h-160v-640h1438v640h-160v-480zM347 428l33 157l783 -165l-33 -156zM450 802l67 146l725 -339l-67 -145zM651 1158l102 123l614 -513l-102 -123zM1048 1536l477 -641l-128 -96l-477 641zM330 65v159h800v-159h-800z" /> -<glyph unicode="" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1162 640q0 -164 -115 -279t-279 -115t-279 115t-115 279t115 279t279 115t279 -115t115 -279zM1270 1050q0 -38 -27 -65t-65 -27t-65 27t-27 65t27 65t65 27t65 -27t27 -65zM768 1270 q-7 0 -76.5 0.5t-105.5 0t-96.5 -3t-103 -10t-71.5 -18.5q-50 -20 -88 -58t-58 -88q-11 -29 -18.5 -71.5t-10 -103t-3 -96.5t0 -105.5t0.5 -76.5t-0.5 -76.5t0 -105.5t3 -96.5t10 -103t18.5 -71.5q20 -50 58 -88t88 -58q29 -11 71.5 -18.5t103 -10t96.5 -3t105.5 0t76.5 0.5 t76.5 -0.5t105.5 0t96.5 3t103 10t71.5 18.5q50 20 88 58t58 88q11 29 18.5 71.5t10 103t3 96.5t0 105.5t-0.5 76.5t0.5 76.5t0 105.5t-3 96.5t-10 103t-18.5 71.5q-20 50 -58 88t-88 58q-29 11 -71.5 18.5t-103 10t-96.5 3t-105.5 0t-76.5 -0.5zM1536 640q0 -229 -5 -317 q-10 -208 -124 -322t-322 -124q-88 -5 -317 -5t-317 5q-208 10 -322 124t-124 322q-5 88 -5 317t5 317q10 208 124 322t322 124q88 5 317 5t317 -5q208 -10 322 -124t124 -322q5 -88 5 -317z" /> -<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" /> -<glyph unicode="" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" /> -<glyph unicode="" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 q78 2 134 29z" /> -<glyph unicode="" d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" /> -<glyph unicode="" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" /> -<glyph unicode="" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" /> -<glyph unicode="" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" /> -<glyph unicode="" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" /> -<glyph unicode="" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324 l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" /> -<glyph unicode="" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" /> -<glyph unicode="" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" /> -<glyph unicode="" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" /> -<glyph unicode="" d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -5 1 -50.5t-1 -71.5q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z " /> -<glyph unicode="" d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 16 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" /> -<glyph unicode="" d="M1292 898q10 216 -161 222q-231 8 -312 -261q44 19 82 19q85 0 74 -96q-4 -57 -74 -167t-105 -110q-43 0 -82 169q-13 54 -45 255q-30 189 -160 177q-59 -7 -164 -100l-81 -72l-81 -72l52 -67q76 52 87 52q57 0 107 -179q15 -55 45 -164.5t45 -164.5q68 -179 164 -179 q157 0 383 294q220 283 226 444zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1152" d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="2176" d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40 t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29 q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9 q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102 t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" /> -<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69 q-46 32 -141.5 92.5t-142.5 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13 t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5 t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21 t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286 t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273 t273 -182.5t331.5 -68z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" /> -<glyph unicode="" horiz-adv-x="2048" d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64 q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433 q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" /> -<glyph unicode="" d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q43 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0 q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" /> -<glyph unicode="" d="M768 750h725q12 -67 12 -128q0 -217 -91 -387.5t-259.5 -266.5t-386.5 -96q-157 0 -299 60.5t-245 163.5t-163.5 245t-60.5 299t60.5 299t163.5 245t245 163.5t299 60.5q300 0 515 -201l-209 -201q-123 119 -306 119q-129 0 -238.5 -65t-173.5 -176.5t-64 -243.5 t64 -243.5t173.5 -176.5t238.5 -65q87 0 160 24t120 60t82 82t51.5 87t22.5 78h-436v264z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1095 369q16 -16 0 -31q-62 -62 -199 -62t-199 62q-16 15 0 31q6 6 15 6t15 -6q48 -49 169 -49q120 0 169 49q6 6 15 6t15 -6zM788 550q0 -37 -26 -63t-63 -26t-63.5 26t-26.5 63q0 38 26.5 64t63.5 26t63 -26.5t26 -63.5zM1183 550q0 -37 -26.5 -63t-63.5 -26t-63 26 t-26 63t26 63.5t63 26.5t63.5 -26t26.5 -64zM1434 670q0 49 -35 84t-85 35t-86 -36q-130 90 -311 96l63 283l200 -45q0 -37 26 -63t63 -26t63.5 26.5t26.5 63.5t-26.5 63.5t-63.5 26.5q-54 0 -80 -50l-221 49q-19 5 -25 -16l-69 -312q-180 -7 -309 -97q-35 37 -87 37 q-50 0 -85 -35t-35 -84q0 -35 18.5 -64t49.5 -44q-6 -27 -6 -56q0 -142 140 -243t337 -101q198 0 338 101t140 243q0 32 -7 57q30 15 48 43.5t18 63.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191 t348 71t348 -71t286 -191t191 -286t71 -348z" /> -<glyph unicode="" d="M939 407q13 -13 0 -26q-53 -53 -171 -53t-171 53q-13 13 0 26q5 6 13 6t13 -6q42 -42 145 -42t145 42q5 6 13 6t13 -6zM676 563q0 -31 -23 -54t-54 -23t-54 23t-23 54q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1014 563q0 -31 -23 -54t-54 -23t-54 23t-23 54 q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1229 666q0 42 -30 72t-73 30q-42 0 -73 -31q-113 78 -267 82l54 243l171 -39q1 -32 23.5 -54t53.5 -22q32 0 54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5q-48 0 -69 -43l-189 42q-17 5 -21 -13l-60 -268q-154 -6 -265 -83 q-30 32 -74 32q-43 0 -73 -30t-30 -72q0 -30 16 -55t42 -38q-5 -25 -5 -48q0 -122 120 -208.5t289 -86.5q170 0 290 86.5t120 208.5q0 25 -6 49q25 13 40.5 37.5t15.5 54.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150 v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103 t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328 v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" /> -<glyph unicode="" d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123 v-369h123z" /> -<glyph unicode="" d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101 v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="2038" d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14 q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24 q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33 q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5 t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43 q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5 t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13 t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" /> -<glyph unicode="" d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10 q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14 q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14 t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44 q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" /> -<glyph unicode="" d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5 t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5 q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126 t135.5 51q85 0 145 -60.5t60 -145.5z" /> -<glyph unicode="" d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q106 35 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 q20 0 20 -21v-418z" /> -<glyph unicode="" horiz-adv-x="1792" d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48 l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23 t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128 q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128 q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" /> -<glyph unicode="" d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9 t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9 t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9 t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68t68 28t68 -28l228 -228h368l228 228q28 28 68 28t68 -28t28 -68t-28 -68zM864 1152q0 -93 -65.5 -158.5 t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5 q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819 q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5 t100.5 134t141.5 55.5z" /> -<glyph unicode="" horiz-adv-x="768" d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z " /> -<glyph unicode="" horiz-adv-x="2304" d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67 t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-5 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70 v-400l434 -186q36 -16 57 -48t21 -70z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658 q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204 q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" /> -<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5 t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217 t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5 q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89 q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" /> -<glyph unicode="" d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5 q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5 q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z " /> -<glyph unicode="" horiz-adv-x="1792" d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188 l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5 t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1 q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" /> -<glyph unicode="" horiz-adv-x="2048" d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384 q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5 l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5 t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" /> -<glyph unicode="" d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384 q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" /> -<glyph unicode="" d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64 q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37 q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M1024 1233l-303 -582l24 -31h279v-415h-507l-44 -30l-142 -273l-30 -30h-301v303l303 583l-24 30h-279v415h507l44 30l142 273l30 30h301v-303z" /> -<glyph unicode="" horiz-adv-x="2304" d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11 q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245 q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785 l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242 q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236q0 -11 -8 -19 t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786q-13 2 -22 11t-9 22v899 q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" /> -<glyph unicode="" d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127 t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5 t-103 128v128q0 69 103 128t280 93.5t385 34.5z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197 q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8 q-1 1 -1 2t-0.5 1.5t-0.5 1.5q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4l-3 21q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5t-3.5 -21.5l-4 -21h-4l-2 21 q-2 26 -7 46l-99 438h90v107h-300z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107 h-290v-107h68l189 -272l-194 -283h-68z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" /> -<glyph unicode="" d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400 v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79 q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5 q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" /> -<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243 l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" /> -<glyph unicode="" d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406 q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" /> -<glyph unicode="" horiz-adv-x="1792" d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546 q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94 q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55 t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97q14 -16 29.5 -34t34.5 -40t29 -34q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5 t-85 -189.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194 q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5 t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1760 640q0 -176 -68.5 -336t-184 -275.5t-275.5 -184t-336 -68.5t-336 68.5t-275.5 184t-184 275.5t-68.5 336q0 213 97 398.5t265 305.5t374 151v-228q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5 t136.5 204t51 248.5q0 230 -145.5 406t-366.5 221v228q206 -31 374 -151t265 -305.5t97 -398.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41 t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170 t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136 q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" /> -<glyph unicode="" horiz-adv-x="1792" d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251 l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162 q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33 q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5 t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> -<glyph unicode="" d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85 q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392 q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072 q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58 q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47 q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171 v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" /> -<glyph unicode="" d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5 t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153 t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5 q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20 t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5 t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" /> -<glyph unicode="" horiz-adv-x="2048" d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25 q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5 q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109 q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 l863 639l-478 -797z" /> -<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23 t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" /> -<glyph unicode="" d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15 t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2 t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160 q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5 q0 -26 -12 -48t-36 -22z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179 q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" /> -<glyph unicode="" d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256 q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" /> -<glyph unicode="" d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" /> -<glyph unicode="" d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5 t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5 t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91 q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9 t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323 l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" /> -<glyph unicode="" horiz-adv-x="1792" d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23 zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5 t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" /> -<glyph unicode="" horiz-adv-x="1792" d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1755 1083q37 -37 37 -90t-37 -91l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234l401 400 q38 37 91 37t90 -37z" /> -<glyph unicode="" horiz-adv-x="1792" d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5 t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q3 -2 11 -7 t11 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" /> -<glyph unicode="" horiz-adv-x="1792" d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" /> -<glyph unicode="" d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36 q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q70 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5 t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87 q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19 t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121 q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" /> -<glyph unicode="" horiz-adv-x="1792" d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38 h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" /> -<glyph unicode="" d="M1519 890q18 -84 -4 -204q-87 -444 -565 -444h-44q-25 0 -44 -16.5t-24 -42.5l-4 -19l-55 -346l-2 -15q-5 -26 -24.5 -42.5t-44.5 -16.5h-251q-21 0 -33 15t-9 36q9 56 26.5 168t26.5 168t27 167.5t27 167.5q5 37 43 37h131q133 -2 236 21q175 39 287 144q102 95 155 246 q24 70 35 133q1 6 2.5 7.5t3.5 1t6 -3.5q79 -59 98 -162zM1347 1172q0 -107 -46 -236q-80 -233 -302 -315q-113 -40 -252 -42q0 -1 -90 -1l-90 1q-100 0 -118 -96q-2 -8 -85 -530q-1 -10 -12 -10h-295q-22 0 -36.5 16.5t-11.5 38.5l232 1471q5 29 27.5 48t51.5 19h598 q34 0 97.5 -13t111.5 -32q107 -41 163.5 -123t56.5 -196z" /> -<glyph unicode="" horiz-adv-x="1792" d="M441 864q32 0 52 -26q266 -364 362 -774h-446q-127 441 -367 749q-12 16 -3 33.5t29 17.5h373zM1000 507q-49 -199 -125 -393q-79 310 -256 594q40 221 44 449q211 -340 337 -650zM1099 1216q235 -324 384.5 -698.5t184.5 -773.5h-451q-41 665 -553 1472h435zM1792 640 q0 -424 -101 -812q-67 560 -359 1083q-25 301 -106 584q-4 16 5.5 28.5t25.5 12.5h359q21 0 38.5 -13t22.5 -33q115 -409 115 -850z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27 q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128 q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="2304" d="M671 603h-13q-47 0 -47 -32q0 -22 20 -22q17 0 28 15t12 39zM1066 639h62v3q1 4 0.5 6.5t-1 7t-2 8t-4.5 6.5t-7.5 5t-11.5 2q-28 0 -36 -38zM1606 603h-12q-48 0 -48 -32q0 -22 20 -22q17 0 28 15t12 39zM1925 629q0 41 -30 41q-19 0 -31 -20t-12 -51q0 -42 28 -42 q20 0 32.5 20t12.5 52zM480 770h87l-44 -262h-56l32 201l-71 -201h-39l-4 200l-34 -200h-53l44 262h81l2 -163zM733 663q0 -6 -4 -42q-16 -101 -17 -113h-47l1 22q-20 -26 -58 -26q-23 0 -37.5 16t-14.5 42q0 39 26 60.5t73 21.5q14 0 23 -1q0 3 0.5 5.5t1 4.5t0.5 3 q0 20 -36 20q-29 0 -59 -10q0 4 7 48q38 11 67 11q74 0 74 -62zM889 721l-8 -49q-22 3 -41 3q-27 0 -27 -17q0 -8 4.5 -12t21.5 -11q40 -19 40 -60q0 -72 -87 -71q-34 0 -58 6q0 2 7 49q29 -8 51 -8q32 0 32 19q0 7 -4.5 11.5t-21.5 12.5q-43 20 -43 59q0 72 84 72 q30 0 50 -4zM977 721h28l-7 -52h-29q-2 -17 -6.5 -40.5t-7 -38.5t-2.5 -18q0 -16 19 -16q8 0 16 2l-8 -47q-21 -7 -40 -7q-43 0 -45 47q0 12 8 56q3 20 25 146h55zM1180 648q0 -23 -7 -52h-111q-3 -22 10 -33t38 -11q30 0 58 14l-9 -54q-30 -8 -57 -8q-95 0 -95 95 q0 55 27.5 90.5t69.5 35.5q35 0 55.5 -21t20.5 -56zM1319 722q-13 -23 -22 -62q-22 2 -31 -24t-25 -128h-56l3 14q22 130 29 199h51l-3 -33q14 21 25.5 29.5t28.5 4.5zM1506 763l-9 -57q-28 14 -50 14q-31 0 -51 -27.5t-20 -70.5q0 -30 13.5 -47t38.5 -17q21 0 48 13 l-10 -59q-28 -8 -50 -8q-45 0 -71.5 30.5t-26.5 82.5q0 70 35.5 114.5t91.5 44.5q26 0 61 -13zM1668 663q0 -18 -4 -42q-13 -79 -17 -113h-46l1 22q-20 -26 -59 -26q-23 0 -37 16t-14 42q0 39 25.5 60.5t72.5 21.5q15 0 23 -1q2 7 2 13q0 20 -36 20q-29 0 -59 -10q0 4 8 48 q38 11 67 11q73 0 73 -62zM1809 722q-14 -24 -21 -62q-23 2 -31.5 -23t-25.5 -129h-56l3 14q19 104 29 199h52q0 -11 -4 -33q15 21 26.5 29.5t27.5 4.5zM1950 770h56l-43 -262h-53l3 19q-23 -23 -52 -23q-31 0 -49.5 24t-18.5 64q0 53 27.5 92t64.5 39q31 0 53 -29z M2061 640q0 148 -72.5 273t-198 198t-273.5 73q-181 0 -328 -110q127 -116 171 -284h-50q-44 150 -158 253q-114 -103 -158 -253h-50q44 168 171 284q-147 110 -328 110q-148 0 -273.5 -73t-198 -198t-72.5 -273t72.5 -273t198 -198t273.5 -73q181 0 328 110 q-120 111 -165 264h50q46 -138 152 -233q106 95 152 233h50q-45 -153 -165 -264q147 -110 328 -110q148 0 273.5 73t198 198t72.5 273zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="2304" d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42 q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604 v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569 q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73 t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" /> -<glyph unicode="" horiz-adv-x="2304" d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260 l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279 v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040 q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168 q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5 t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21 h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5 t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" /> -<glyph unicode="" horiz-adv-x="2304" d="M745 630q0 -37 -25.5 -61.5t-62.5 -24.5q-29 0 -46.5 16t-17.5 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM1530 779q0 -42 -22 -57t-66 -15l-32 -1l17 107q2 11 13 11h18q22 0 35 -2t25 -12.5t12 -30.5zM1881 630q0 -36 -25.5 -61t-61.5 -25q-29 0 -47 16 t-18 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM513 801q0 59 -38.5 85.5t-100.5 26.5h-160q-19 0 -21 -19l-65 -408q-1 -6 3 -11t10 -5h76q20 0 22 19l18 110q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM822 489l41 261q1 6 -3 11t-10 5h-76 q-14 0 -17 -33q-27 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q28 0 58 12t48 32q-4 -12 -4 -21q0 -16 13 -16h69q19 0 22 19zM1269 752q0 5 -4 9.5t-9 4.5h-77q-11 0 -18 -10l-106 -156l-44 150q-5 16 -22 16h-75q-5 0 -9 -4.5t-4 -9.5q0 -2 19.5 -59 t42 -123t23.5 -70q-82 -112 -82 -120q0 -13 13 -13h77q11 0 18 10l255 368q2 2 2 7zM1649 801q0 59 -38.5 85.5t-100.5 26.5h-159q-20 0 -22 -19l-65 -408q-1 -6 3 -11t10 -5h82q12 0 16 13l18 116q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM1958 489 l41 261q1 6 -3 11t-10 5h-76q-14 0 -17 -33q-26 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q29 0 59 12t47 32q0 -1 -2 -9t-2 -12q0 -16 13 -16h69q19 0 22 19zM2176 898v1q0 14 -13 14h-74q-11 0 -13 -11l-65 -416l-1 -2q0 -5 4 -9.5t10 -4.5h66 q19 0 21 19zM392 764q-5 -35 -26 -46t-60 -11l-33 -1l17 107q2 11 13 11h19q40 0 58 -11.5t12 -48.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109 q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118 q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151 q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31 q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5 l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5 l418 363q10 8 23.5 7t21.5 -11z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128 q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161 q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" /> -<glyph unicode="" horiz-adv-x="1408" d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167 q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" /> -<glyph unicode="" d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5 t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53 q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24 t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61 t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10 t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5 t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11t55.5 -11t52.5 -38q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5t47 37.5 q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-35 0 -55.5 11t-52.5 38q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38t-58 27 t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448h256v448 h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51 t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" /> -<glyph unicode="" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" /> -<glyph unicode="" horiz-adv-x="1792" d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9 t9 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20 q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50 t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1 q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" /> -<glyph unicode="" d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73 q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110 q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5 t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5 t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5 t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" /> -<glyph unicode="" horiz-adv-x="2304" d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94 q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469 q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400 q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" /> -<glyph unicode="" d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5 h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327 q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5 q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" /> -<glyph unicode="" horiz-adv-x="1280" d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q18 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119 t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5 t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14 q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88 q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5 t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206 q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307 t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14 t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" /> -<glyph unicode="" d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5 t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" /> -<glyph unicode="" d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55 q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410 q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" /> -<glyph unicode="" d="M915 450h-294l147 551zM1001 128h311l-324 1024h-440l-324 -1024h311l383 314zM1536 1120v-960q0 -118 -85 -203t-203 -85h-960q-118 0 -203 85t-85 203v960q0 118 85 203t203 85h960q118 0 203 -85t85 -203z" /> -<glyph unicode="" horiz-adv-x="2048" d="M2048 641q0 -21 -13 -36.5t-33 -19.5l-205 -356q3 -9 3 -18q0 -20 -12.5 -35.5t-32.5 -19.5l-193 -337q3 -8 3 -16q0 -23 -16.5 -40t-40.5 -17q-25 0 -41 18h-400q-17 -20 -43 -20t-43 20h-399q-17 -20 -43 -20q-23 0 -40 16.5t-17 40.5q0 8 4 20l-193 335 q-20 4 -32.5 19.5t-12.5 35.5q0 9 3 18l-206 356q-20 5 -32.5 20.5t-12.5 35.5q0 21 13.5 36.5t33.5 19.5l199 344q0 1 -0.5 3t-0.5 3q0 36 34 51l209 363q-4 10 -4 18q0 24 17 40.5t40 16.5q26 0 44 -21h396q16 21 43 21t43 -21h398q18 21 44 21q23 0 40 -16.5t17 -40.5 q0 -6 -4 -18l207 -358q23 -1 39 -17.5t16 -38.5q0 -13 -7 -27l187 -324q19 -4 31.5 -19.5t12.5 -35.5zM1063 -158h389l-342 354h-143l-342 -354h360q18 16 39 16t39 -16zM112 654q1 -4 1 -13q0 -10 -2 -15l208 -360q2 0 4.5 -1t5.5 -2.5l5 -2.5l188 199v347l-187 194 q-13 -8 -29 -10zM986 1438h-388l190 -200l554 200h-280q-16 -16 -38 -16t-38 16zM1689 226q1 6 5 11l-64 68l-17 -79h76zM1583 226l22 105l-252 266l-296 -307l63 -64h463zM1495 -142l16 28l65 310h-427l333 -343q8 4 13 5zM578 -158h5l342 354h-373v-335l4 -6q14 -5 22 -13 zM552 226h402l64 66l-309 321l-157 -166v-221zM359 226h163v189l-168 -177q4 -8 5 -12zM358 1051q0 -1 0.5 -2t0.5 -2q0 -16 -8 -29l171 -177v269zM552 1121v-311l153 -157l297 314l-223 236zM556 1425l-4 -8v-264l205 74l-191 201q-6 -2 -10 -3zM1447 1438h-16l-621 -224 l213 -225zM1023 946l-297 -315l311 -319l296 307zM688 634l-136 141v-284zM1038 270l-42 -44h85zM1374 618l238 -251l132 624l-3 5l-1 1zM1718 1018q-8 13 -8 29v2l-216 376q-5 1 -13 5l-437 -463l310 -327zM522 1142v223l-163 -282zM522 196h-163l163 -283v283zM1607 196 l-48 -227l130 227h-82zM1729 266l207 361q-2 10 -2 14q0 1 3 16l-171 296l-129 -612l77 -82q5 3 15 7z" /> -<glyph unicode="" d="M0 856q0 131 91.5 226.5t222.5 95.5h742l352 358v-1470q0 -132 -91.5 -227t-222.5 -95h-780q-131 0 -222.5 95t-91.5 227v790zM1232 102l-176 180v425q0 46 -32 79t-78 33h-484q-46 0 -78 -33t-32 -79v-492q0 -46 32.5 -79.5t77.5 -33.5h770z" /> -<glyph unicode="" d="M934 1386q-317 -121 -556 -362.5t-358 -560.5q-20 89 -20 176q0 208 102.5 384.5t278.5 279t384 102.5q82 0 169 -19zM1203 1267q93 -65 164 -155q-389 -113 -674.5 -400.5t-396.5 -676.5q-93 72 -155 162q112 386 395 671t667 399zM470 -67q115 356 379.5 622t619.5 384 q40 -92 54 -195q-292 -120 -516 -345t-343 -518q-103 14 -194 52zM1536 -125q-193 50 -367 115q-135 -84 -290 -107q109 205 274 370.5t369 275.5q-21 -152 -101 -284q65 -175 115 -370z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1893 1144l155 -1272q-131 0 -257 57q-200 91 -393 91q-226 0 -374 -148q-148 148 -374 148q-193 0 -393 -91q-128 -57 -252 -57h-5l155 1272q224 127 482 127q233 0 387 -106q154 106 387 106q258 0 482 -127zM1398 157q129 0 232 -28.5t260 -93.5l-124 1021 q-171 78 -368 78q-224 0 -374 -141q-150 141 -374 141q-197 0 -368 -78l-124 -1021q105 43 165.5 65t148.5 39.5t178 17.5q202 0 374 -108q172 108 374 108zM1438 191l-55 907q-211 -4 -359 -155q-152 155 -374 155q-176 0 -336 -66l-114 -941q124 51 228.5 76t221.5 25 q209 0 374 -102q172 107 374 102z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1500 165v733q0 21 -15 36t-35 15h-93q-20 0 -35 -15t-15 -36v-733q0 -20 15 -35t35 -15h93q20 0 35 15t15 35zM1216 165v531q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-531q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM924 165v429q0 20 -15 35t-35 15h-101 q-20 0 -35 -15t-15 -35v-429q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM632 165v362q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-362q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM2048 311q0 -166 -118 -284t-284 -118h-1244q-166 0 -284 118t-118 284 q0 116 63 214.5t168 148.5q-10 34 -10 73q0 113 80.5 193.5t193.5 80.5q102 0 180 -67q45 183 194 300t338 117q149 0 275 -73.5t199.5 -199.5t73.5 -275q0 -66 -14 -122q135 -33 221 -142.5t86 -247.5z" /> -<glyph unicode="" d="M0 1536h1536v-1392l-776 -338l-760 338v1392zM1436 209v926h-1336v-926l661 -294zM1436 1235v201h-1336v-201h1336zM181 937v-115h-37v115h37zM181 789v-115h-37v115h37zM181 641v-115h-37v115h37zM181 493v-115h-37v115h37zM181 345v-115h-37v115h37zM207 202l15 34 l105 -47l-15 -33zM343 142l15 34l105 -46l-15 -34zM478 82l15 34l105 -46l-15 -34zM614 23l15 33l104 -46l-15 -34zM797 10l105 46l15 -33l-105 -47zM932 70l105 46l15 -34l-105 -46zM1068 130l105 46l15 -34l-105 -46zM1203 189l105 47l15 -34l-105 -46zM259 1389v-36h-114 v36h114zM421 1389v-36h-115v36h115zM583 1389v-36h-115v36h115zM744 1389v-36h-114v36h114zM906 1389v-36h-114v36h114zM1068 1389v-36h-115v36h115zM1230 1389v-36h-115v36h115zM1391 1389v-36h-114v36h114zM181 1049v-79h-37v115h115v-36h-78zM421 1085v-36h-115v36h115z M583 1085v-36h-115v36h115zM744 1085v-36h-114v36h114zM906 1085v-36h-114v36h114zM1068 1085v-36h-115v36h115zM1230 1085v-36h-115v36h115zM1355 970v79h-78v36h115v-115h-37zM1355 822v115h37v-115h-37zM1355 674v115h37v-115h-37zM1355 526v115h37v-115h-37zM1355 378 v115h37v-115h-37zM1355 230v115h37v-115h-37zM760 265q-129 0 -221 91.5t-92 221.5q0 129 92 221t221 92q130 0 221.5 -92t91.5 -221q0 -130 -91.5 -221.5t-221.5 -91.5zM595 646q0 -36 19.5 -56.5t49.5 -25t64 -7t64 -2t49.5 -9t19.5 -30.5q0 -49 -112 -49q-97 0 -123 51 h-3l-31 -63q67 -42 162 -42q29 0 56.5 5t55.5 16t45.5 33t17.5 53q0 46 -27.5 69.5t-67.5 27t-79.5 3t-67 5t-27.5 25.5q0 21 20.5 33t40.5 15t41 3q34 0 70.5 -11t51.5 -34h3l30 58q-3 1 -21 8.5t-22.5 9t-19.5 7t-22 7t-20 4.5t-24 4t-23 1q-29 0 -56.5 -5t-54 -16.5 t-43 -34t-16.5 -53.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M863 504q0 112 -79.5 191.5t-191.5 79.5t-191 -79.5t-79 -191.5t79 -191t191 -79t191.5 79t79.5 191zM1726 505q0 112 -79 191t-191 79t-191.5 -79t-79.5 -191q0 -113 79.5 -192t191.5 -79t191 79.5t79 191.5zM2048 1314v-1348q0 -44 -31.5 -75.5t-76.5 -31.5h-1832 q-45 0 -76.5 31.5t-31.5 75.5v1348q0 44 31.5 75.5t76.5 31.5h431q44 0 76 -31.5t32 -75.5v-161h754v161q0 44 32 75.5t76 31.5h431q45 0 76.5 -31.5t31.5 -75.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1430 953zM1690 749q148 0 253 -98.5t105 -244.5q0 -157 -109 -261.5t-267 -104.5q-85 0 -162 27.5t-138 73.5t-118 106t-109 126.5t-103.5 132.5t-108.5 126t-117 106t-136 73.5t-159 27.5q-154 0 -251.5 -91.5t-97.5 -244.5q0 -157 104 -250t263 -93q100 0 208 37.5 t193 98.5q5 4 21 18.5t30 24t22 9.5q14 0 24.5 -10.5t10.5 -24.5q0 -24 -60 -77q-101 -88 -234.5 -142t-260.5 -54q-133 0 -245.5 58t-180 165t-67.5 241q0 205 141.5 341t347.5 136q120 0 226.5 -43.5t185.5 -113t151.5 -153t139 -167.5t133.5 -153.5t149.5 -113 t172.5 -43.5q102 0 168.5 61.5t66.5 162.5q0 95 -64.5 159t-159.5 64q-30 0 -81.5 -18.5t-68.5 -18.5q-20 0 -35.5 15t-15.5 35q0 18 8.5 57t8.5 59q0 159 -107.5 263t-266.5 104q-58 0 -111.5 -18.5t-84 -40.5t-55.5 -40.5t-33 -18.5q-15 0 -25.5 10.5t-10.5 25.5 q0 19 25 46q59 67 147 103.5t182 36.5q191 0 318 -125.5t127 -315.5q0 -37 -4 -66q57 15 115 15z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1216 832q0 26 -19 45t-45 19h-128v128q0 26 -19 45t-45 19t-45 -19t-19 -45v-128h-128q-26 0 -45 -19t-19 -45t19 -45t45 -19h128v-128q0 -26 19 -45t45 -19t45 19t19 45v128h128q26 0 45 19t19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1664" d="M1280 832q0 26 -19 45t-45 19t-45 -19l-147 -146v293q0 26 -19 45t-45 19t-45 -19t-19 -45v-293l-147 146q-19 19 -45 19t-45 -19t-19 -45t19 -45l256 -256q19 -19 45 -19t45 19l256 256q19 19 19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="2048" d="M212 768l623 -665l-300 665h-323zM1024 -4l349 772h-698zM538 896l204 384h-262l-288 -384h346zM1213 103l623 665h-323zM683 896h682l-204 384h-274zM1510 896h346l-288 384h-262zM1651 1382l384 -512q14 -18 13 -41.5t-17 -40.5l-960 -1024q-18 -20 -47 -20t-47 20 l-960 1024q-16 17 -17 40.5t13 41.5l384 512q18 26 51 26h1152q33 0 51 -26z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1811 -19q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83 q19 19 45 19t45 -19l83 -83zM237 19q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -82l83 82q19 19 45 19t45 -19l83 -82l64 64v293l-210 314q-17 26 -7 56.5t40 40.5l177 58v299h128v128h256v128h256v-128h256v-128h128v-299l177 -58q30 -10 40 -40.5t-7 -56.5l-210 -314 v-293l19 18q19 19 45 19t45 -19l83 -82l83 82q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83zM640 1152v-128l384 128l384 -128v128h-128v128h-512v-128h-128z" /> -<glyph unicode="" d="M576 0l96 448l-96 128l-128 64zM832 0l128 640l-128 -64l-96 -128zM992 1010q-2 4 -4 6q-10 8 -96 8q-70 0 -167 -19q-7 -2 -21 -2t-21 2q-97 19 -167 19q-86 0 -96 -8q-2 -2 -4 -6q2 -18 4 -27q2 -3 7.5 -6.5t7.5 -10.5q2 -4 7.5 -20.5t7 -20.5t7.5 -17t8.5 -17t9 -14 t12 -13.5t14 -9.5t17.5 -8t20.5 -4t24.5 -2q36 0 59 12.5t32.5 30t14.5 34.5t11.5 29.5t17.5 12.5h12q11 0 17.5 -12.5t11.5 -29.5t14.5 -34.5t32.5 -30t59 -12.5q13 0 24.5 2t20.5 4t17.5 8t14 9.5t12 13.5t9 14t8.5 17t7.5 17t7 20.5t7.5 20.5q2 7 7.5 10.5t7.5 6.5 q2 9 4 27zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 61 4.5 118t19 125.5t37.5 123.5t63.5 103.5t93.5 74.5l-90 220h214q-22 64 -22 128q0 12 2 32q-194 40 -194 96q0 57 210 99q17 62 51.5 134t70.5 114q32 37 76 37q30 0 84 -31t84 -31t84 31 t84 31q44 0 76 -37q36 -42 70.5 -114t51.5 -134q210 -42 210 -99q0 -56 -194 -96q7 -81 -20 -160h214l-82 -225q63 -33 107.5 -96.5t65.5 -143.5t29 -151.5t8 -148.5z" /> -<glyph unicode="" horiz-adv-x="2304" d="M2301 500q12 -103 -22 -198.5t-99 -163.5t-158.5 -106t-196.5 -31q-161 11 -279.5 125t-134.5 274q-12 111 27.5 210.5t118.5 170.5l-71 107q-96 -80 -151 -194t-55 -244q0 -27 -18.5 -46.5t-45.5 -19.5h-256h-69q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5 t-131.5 316.5t131.5 316.5t316.5 131.5q76 0 152 -27l24 45q-123 110 -304 110h-64q-26 0 -45 19t-19 45t19 45t45 19h128q78 0 145 -13.5t116.5 -38.5t71.5 -39.5t51 -36.5h512h115l-85 128h-222q-30 0 -49 22.5t-14 52.5q4 23 23 38t43 15h253q33 0 53 -28l70 -105 l114 114q19 19 46 19h101q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-179l115 -172q131 63 275 36q143 -26 244 -134.5t118 -253.5zM448 128q115 0 203 72.5t111 183.5h-314q-35 0 -55 31q-18 32 -1 63l147 277q-47 13 -91 13q-132 0 -226 -94t-94 -226t94 -226 t226 -94zM1856 128q132 0 226 94t94 226t-94 226t-226 94q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94z" /> -<glyph unicode="" d="M1408 0q0 -63 -61.5 -113.5t-164 -81t-225 -46t-253.5 -15.5t-253.5 15.5t-225 46t-164 81t-61.5 113.5q0 49 33 88.5t91 66.5t118 44.5t131 29.5q26 5 48 -10.5t26 -41.5q5 -26 -10.5 -48t-41.5 -26q-58 -10 -106 -23.5t-76.5 -25.5t-48.5 -23.5t-27.5 -19.5t-8.5 -12 q3 -11 27 -26.5t73 -33t114 -32.5t160.5 -25t201.5 -10t201.5 10t160.5 25t114 33t73 33.5t27 27.5q-1 4 -8.5 11t-27.5 19t-48.5 23.5t-76.5 25t-106 23.5q-26 4 -41.5 26t-10.5 48q4 26 26 41.5t48 10.5q71 -12 131 -29.5t118 -44.5t91 -66.5t33 -88.5zM1024 896v-384 q0 -26 -19 -45t-45 -19h-64v-384q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v384h-64q-26 0 -45 19t-19 45v384q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5zM928 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5 t158.5 -65.5t65.5 -158.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1280 512h305q-5 -6 -10 -10.5t-9 -7.5l-3 -4l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-5 2 -21 20h369q22 0 39.5 13.5t22.5 34.5l70 281l190 -667q6 -20 23 -33t39 -13q21 0 38 13t23 33l146 485l56 -112q18 -35 57 -35zM1792 940q0 -145 -103 -300h-369l-111 221 q-8 17 -25.5 27t-36.5 8q-45 -5 -56 -46l-129 -430l-196 686q-6 20 -23.5 33t-39.5 13t-39 -13.5t-22 -34.5l-116 -464h-423q-103 155 -103 300q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124 t127 -344z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292 q11 134 80.5 249t182 188t245.5 88q170 19 319 -54t236 -212t87 -306zM128 960q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5z" /> -<glyph unicode="" d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-382 -383q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5 q203 0 359 -126l382 382h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M830 1220q145 -72 233.5 -210.5t88.5 -305.5q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5 t-147.5 384.5q0 167 88.5 305.5t233.5 210.5q-165 96 -228 273q-6 16 3.5 29.5t26.5 13.5h69q21 0 29 -20q44 -106 140 -171t214 -65t214 65t140 171q8 20 37 20h61q17 0 26.5 -13.5t3.5 -29.5q-63 -177 -228 -273zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" d="M1024 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-149 16 -270.5 103t-186.5 223.5t-53 291.5q16 204 160 353.5t347 172.5q118 14 228 -19t198 -103l255 254h-134q-14 0 -23 9t-9 23v64zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1280 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5t-147.5 384.5q0 201 126 359l-52 53l-101 -111q-9 -10 -22 -10.5t-23 7.5l-48 44q-10 8 -10.5 21.5t8.5 23.5l105 115l-111 112v-134q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9 t-9 23v288q0 26 19 45t45 19h288q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-133l106 -107l86 94q9 10 22 10.5t23 -7.5l48 -44q10 -8 10.5 -21.5t-8.5 -23.5l-90 -99l57 -56q158 126 359 126t359 -126l255 254h-134q-14 0 -23 9t-9 23v64zM832 256q185 0 316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1790 1007q12 -155 -52.5 -292t-186 -224t-271.5 -103v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-512v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23 t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292q17 206 164.5 356.5t352.5 169.5q206 21 377 -94q171 115 377 94q205 -19 352.5 -169.5t164.5 -356.5zM896 647q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM576 512q115 0 218 57q-154 165 -154 391 q0 224 154 391q-103 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5zM1152 128v260q-137 15 -256 94q-119 -79 -256 -94v-260h512zM1216 512q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5q-115 0 -218 -57q154 -167 154 -391 q0 -226 -154 -391q103 -57 218 -57z" /> -<glyph unicode="" horiz-adv-x="1920" d="M1536 1120q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-31 -182 -166 -312t-318 -156q-210 -29 -384.5 80t-241.5 300q-117 6 -221 57.5t-177.5 133t-113.5 192.5t-32 230 q9 135 78 252t182 191.5t248 89.5q118 14 227.5 -19t198.5 -103l255 254h-134q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q59 -74 93 -169q182 -9 328 -124l255 254h-134q-14 0 -23 9 t-9 23v64zM1024 704q0 20 -4 58q-162 -25 -271 -150t-109 -292q0 -20 4 -58q162 25 271 150t109 292zM128 704q0 -168 111 -294t276 -149q-3 29 -3 59q0 210 135 369.5t338 196.5q-53 120 -163.5 193t-245.5 73q-185 0 -316.5 -131.5t-131.5 -316.5zM1088 -128 q185 0 316.5 131.5t131.5 316.5q0 168 -111 294t-276 149q3 -29 3 -59q0 -210 -135 -369.5t-338 -196.5q53 -120 163.5 -193t245.5 -73z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1664 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-32 -180 -164.5 -310t-313.5 -157q-223 -34 -409 90q-117 -78 -256 -93v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23 t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-155 17 -279.5 109.5t-187 237.5t-39.5 307q25 187 159.5 322.5t320.5 164.5q224 34 410 -90q146 97 320 97q201 0 359 -126l255 254h-134q-14 0 -23 9 t-9 23v64zM896 391q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM128 704q0 -185 131.5 -316.5t316.5 -131.5q117 0 218 57q-154 167 -154 391t154 391q-101 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5zM1216 256q185 0 316.5 131.5t131.5 316.5 t-131.5 316.5t-316.5 131.5q-117 0 -218 -57q154 -167 154 -391t-154 -391q101 -57 218 -57z" /> -<glyph unicode="" d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-213 -214l140 -140q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-140 141l-78 -79q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5 t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5q203 0 359 -126l78 78l-172 172q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l172 -172l213 213h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M640 892q217 -24 364.5 -187.5t147.5 -384.5q0 -167 -87 -306t-236 -212t-319 -54q-133 15 -245.5 88t-182 188t-80.5 249q-12 155 52.5 292t186 224t271.5 103v132h-160q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h160v165l-92 -92q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22 t9 23l202 201q19 19 45 19t45 -19l202 -201q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-92 92v-165h160q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-160v-132zM576 -128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5 t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1901 621q19 -19 19 -45t-19 -45l-294 -294q-9 -10 -22.5 -10t-22.5 10l-45 45q-10 9 -10 22.5t10 22.5l185 185h-294v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-132q-24 -217 -187.5 -364.5t-384.5 -147.5q-167 0 -306 87t-212 236t-54 319q15 133 88 245.5 t188 182t249 80.5q155 12 292 -52.5t224 -186t103 -271.5h132v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h294l-185 185q-10 9 -10 22.5t10 22.5l45 45q9 10 22.5 10t22.5 -10zM576 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5 t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-612q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v612q-217 24 -364.5 187.5t-147.5 384.5q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM576 512q185 0 316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1024 576q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1152 576q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123 t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5z" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" d="M1451 1408q35 0 60 -25t25 -60v-1366q0 -35 -25 -60t-60 -25h-391v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-735q-35 0 -60 25t-25 60v1366q0 35 25 60t60 25h1366z" /> -<glyph unicode="" horiz-adv-x="1280" d="M0 939q0 108 37.5 203.5t103.5 166.5t152 123t185 78t202 26q158 0 294 -66.5t221 -193.5t85 -287q0 -96 -19 -188t-60 -177t-100 -149.5t-145 -103t-189 -38.5q-68 0 -135 32t-96 88q-10 -39 -28 -112.5t-23.5 -95t-20.5 -71t-26 -71t-32 -62.5t-46 -77.5t-62 -86.5 l-14 -5l-9 10q-15 157 -15 188q0 92 21.5 206.5t66.5 287.5t52 203q-32 65 -32 169q0 83 52 156t132 73q61 0 95 -40.5t34 -102.5q0 -66 -44 -191t-44 -187q0 -63 45 -104.5t109 -41.5q55 0 102 25t78.5 68t56 95t38 110.5t20 111t6.5 99.5q0 173 -109.5 269.5t-285.5 96.5 q-200 0 -334 -129.5t-134 -328.5q0 -44 12.5 -85t27 -65t27 -45.5t12.5 -30.5q0 -28 -15 -73t-37 -45q-2 0 -17 3q-51 15 -90.5 56t-61 94.5t-32.5 108t-11 106.5z" /> -<glyph unicode="" d="M985 562q13 0 97.5 -44t89.5 -53q2 -5 2 -15q0 -33 -17 -76q-16 -39 -71 -65.5t-102 -26.5q-57 0 -190 62q-98 45 -170 118t-148 185q-72 107 -71 194v8q3 91 74 158q24 22 52 22q6 0 18 -1.5t19 -1.5q19 0 26.5 -6.5t15.5 -27.5q8 -20 33 -88t25 -75q0 -21 -34.5 -57.5 t-34.5 -46.5q0 -7 5 -15q34 -73 102 -137q56 -53 151 -101q12 -7 22 -7q15 0 54 48.5t52 48.5zM782 32q127 0 243.5 50t200.5 134t134 200.5t50 243.5t-50 243.5t-134 200.5t-200.5 134t-243.5 50t-243.5 -50t-200.5 -134t-134 -200.5t-50 -243.5q0 -203 120 -368l-79 -233 l242 77q158 -104 345 -104zM782 1414q153 0 292.5 -60t240.5 -161t161 -240.5t60 -292.5t-60 -292.5t-161 -240.5t-240.5 -161t-292.5 -60q-195 0 -365 94l-417 -134l136 405q-108 178 -108 389q0 153 60 292.5t161 240.5t240.5 161t292.5 60z" /> -<glyph unicode="" horiz-adv-x="1792" d="M128 128h1024v128h-1024v-128zM128 640h1024v128h-1024v-128zM1696 192q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM128 1152h1024v128h-1024v-128zM1696 704q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1696 1216 q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1792 384v-384h-1792v384h1792zM1792 896v-384h-1792v384h1792zM1792 1408v-384h-1792v384h1792z" /> -<glyph unicode="" horiz-adv-x="2048" d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1664 512h352q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-352q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5 t-9.5 22.5v352h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v352q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-352zM928 288q0 -52 38 -90t90 -38h256v-238q-68 -50 -171 -50h-874q-121 0 -194 69t-73 190q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q79 -61 154.5 -91.5t164.5 -30.5t164.5 30.5t154.5 91.5q20 17 39 17q132 0 217 -96h-223q-52 0 -90 -38t-38 -90v-192z" /> -<glyph unicode="" horiz-adv-x="2048" d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1781 320l249 -249q9 -9 9 -23q0 -13 -9 -22l-136 -136q-9 -9 -22 -9q-14 0 -23 9l-249 249l-249 -249q-9 -9 -23 -9q-13 0 -22 9l-136 136 q-9 9 -9 22q0 14 9 23l249 249l-249 249q-9 9 -9 23q0 13 9 22l136 136q9 9 22 9q14 0 23 -9l249 -249l249 249q9 9 23 9q13 0 22 -9l136 -136q9 -9 9 -22q0 -14 -9 -23zM1283 320l-181 -181q-37 -37 -37 -91q0 -53 37 -90l83 -83q-21 -3 -44 -3h-874q-121 0 -194 69 t-73 190q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q154 -122 319 -122t319 122q20 17 39 17q28 0 57 -6q-28 -27 -41 -50t-13 -56q0 -54 37 -91z" /> -<glyph unicode="" horiz-adv-x="2048" d="M256 512h1728q26 0 45 -19t19 -45v-448h-256v256h-1536v-256h-256v1216q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-704zM832 832q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM2048 576v64q0 159 -112.5 271.5t-271.5 112.5h-704 q-26 0 -45 -19t-19 -45v-384h1152z" /> -<glyph unicode="" d="M1536 1536l-192 -448h192v-192h-274l-55 -128h329v-192h-411l-357 -832l-357 832h-411v192h329l-55 128h-274v192h192l-192 448h256l323 -768h378l323 768h256zM768 320l108 256h-216z" /> -<glyph unicode="" d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM768 192q80 0 136 56t56 136t-56 136t-136 56 t-136 -56t-56 -136t56 -136t136 -56zM1344 768v512h-1152v-512h1152z" /> -<glyph unicode="" d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM288 224q66 0 113 47t47 113t-47 113t-113 47 t-113 -47t-47 -113t47 -113t113 -47zM704 768v512h-544v-512h544zM1248 224q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM1408 768v512h-576v-512h576z" /> -<glyph unicode="" horiz-adv-x="1792" d="M597 1115v-1173q0 -25 -12.5 -42.5t-36.5 -17.5q-17 0 -33 8l-465 233q-21 10 -35.5 33.5t-14.5 46.5v1140q0 20 10 34t29 14q14 0 44 -15l511 -256q3 -3 3 -5zM661 1014l534 -866l-534 266v600zM1792 996v-1054q0 -25 -14 -40.5t-38 -15.5t-47 13l-441 220zM1789 1116 q0 -3 -256.5 -419.5t-300.5 -487.5l-390 634l324 527q17 28 52 28q14 0 26 -6l541 -270q4 -2 4 -6z" /> -<glyph unicode="" d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1408v-1536h-1536v1536h1536z" /> -<glyph unicode="" horiz-adv-x="2296" d="M478 -139q-8 -16 -27 -34.5t-37 -25.5q-25 -9 -51.5 3.5t-28.5 31.5q-1 22 40 55t68 38q23 4 34 -21.5t2 -46.5zM1819 -139q7 -16 26 -34.5t38 -25.5q25 -9 51.5 3.5t27.5 31.5q2 22 -39.5 55t-68.5 38q-22 4 -33 -21.5t-2 -46.5zM1867 -30q13 -27 56.5 -59.5t77.5 -41.5 q45 -13 82 4.5t37 50.5q0 46 -67.5 100.5t-115.5 59.5q-40 5 -63.5 -37.5t-6.5 -76.5zM428 -30q-13 -27 -56 -59.5t-77 -41.5q-45 -13 -82 4.5t-37 50.5q0 46 67.5 100.5t115.5 59.5q40 5 63 -37.5t6 -76.5zM1158 1094h1q-41 0 -76 -15q27 -8 44 -30.5t17 -49.5 q0 -35 -27 -60t-65 -25q-52 0 -80 43q-5 -23 -5 -42q0 -74 56 -126.5t135 -52.5q80 0 136 52.5t56 126.5t-56 126.5t-136 52.5zM1462 1312q-99 109 -220.5 131.5t-245.5 -44.5q27 60 82.5 96.5t118 39.5t121.5 -17t99.5 -74.5t44.5 -131.5zM2212 73q8 -11 -11 -42 q7 -23 7 -40q1 -56 -44.5 -112.5t-109.5 -91.5t-118 -37q-48 -2 -92 21.5t-66 65.5q-687 -25 -1259 0q-23 -41 -66.5 -65t-92.5 -22q-86 3 -179.5 80.5t-92.5 160.5q2 22 7 40q-19 31 -11 42q6 10 31 1q14 22 41 51q-7 29 2 38q11 10 39 -4q29 20 59 34q0 29 13 37 q23 12 51 -16q35 5 61 -2q18 -4 38 -19v73q-11 0 -18 2q-53 10 -97 44.5t-55 87.5q-9 38 0 81q15 62 93 95q2 17 19 35.5t36 23.5t33 -7.5t19 -30.5h13q46 -5 60 -23q3 -3 5 -7q10 1 30.5 3.5t30.5 3.5q-15 11 -30 17q-23 40 -91 43q0 6 1 10q-62 2 -118.5 18.5t-84.5 47.5 q-32 36 -42.5 92t-2.5 112q16 126 90 179q23 16 52 4.5t32 -40.5q0 -1 1.5 -14t2.5 -21t3 -20t5.5 -19t8.5 -10q27 -14 76 -12q48 46 98 74q-40 4 -162 -14l47 46q61 58 163 111q145 73 282 86q-20 8 -41 15.5t-47 14t-42.5 10.5t-47.5 11t-43 10q595 126 904 -139 q98 -84 158 -222q85 -10 121 9h1q5 3 8.5 10t5.5 19t3 19.5t3 21.5l1 14q3 28 32 40t52 -5q73 -52 91 -178q7 -57 -3.5 -113t-42.5 -91q-28 -32 -83.5 -48.5t-115.5 -18.5v-10q-71 -2 -95 -43q-14 -5 -31 -17q11 -1 32 -3.5t30 -3.5q1 4 5 8q16 18 60 23h13q5 18 19 30t33 8 t36 -23t19 -36q79 -32 93 -95q9 -40 1 -81q-12 -53 -56 -88t-97 -44q-10 -2 -17 -2q0 -49 -1 -73q20 15 38 19q26 7 61 2q28 28 51 16q14 -9 14 -37q33 -16 59 -34q27 13 38 4q10 -10 2 -38q28 -30 41 -51q23 8 31 -1zM1937 1025q0 -29 -9 -54q82 -32 112 -132 q4 37 -9.5 98.5t-41.5 90.5q-20 19 -36 17t-16 -20zM1859 925q35 -42 47.5 -108.5t-0.5 -124.5q67 13 97 45q13 14 18 28q-3 64 -31 114.5t-79 66.5q-15 -15 -52 -21zM1822 921q-30 0 -44 1q42 -115 53 -239q21 0 43 3q16 68 1 135t-53 100zM258 839q30 100 112 132 q-9 25 -9 54q0 18 -16.5 20t-35.5 -17q-28 -29 -41.5 -90.5t-9.5 -98.5zM294 737q29 -31 97 -45q-13 58 -0.5 124.5t47.5 108.5v0q-37 6 -52 21q-51 -16 -78.5 -66t-31.5 -115q9 -17 18 -28zM471 683q14 124 73 235q-19 -4 -55 -18l-45 -19v1q-46 -89 -20 -196q25 -3 47 -3z M1434 644q8 -38 16.5 -108.5t11.5 -89.5q3 -18 9.5 -21.5t23.5 4.5q40 20 62 85.5t23 125.5q-24 2 -146 4zM1152 1285q-116 0 -199 -82.5t-83 -198.5q0 -117 83 -199.5t199 -82.5t199 82.5t83 199.5q0 116 -83 198.5t-199 82.5zM1380 646q-106 2 -211 0v1q-1 -27 2.5 -86 t13.5 -66q29 -14 93.5 -14.5t95.5 10.5q9 3 11 39t-0.5 69.5t-4.5 46.5zM1112 447q8 4 9.5 48t-0.5 88t-4 63v1q-212 -3 -214 -3q-4 -20 -7 -62t0 -83t14 -46q34 -15 101 -16t101 10zM718 636q-16 -59 4.5 -118.5t77.5 -84.5q15 -8 24 -5t12 21q3 16 8 90t10 103 q-69 -2 -136 -6zM591 510q3 -23 -34 -36q132 -141 271.5 -240t305.5 -154q172 49 310.5 146t293.5 250q-33 13 -30 34l3 9v1v-1q-17 2 -50 5.5t-48 4.5q-26 -90 -82 -132q-51 -38 -82 1q-5 6 -9 14q-7 13 -17 62q-2 -5 -5 -9t-7.5 -7t-8 -5.5t-9.5 -4l-10 -2.5t-12 -2 l-12 -1.5t-13.5 -1t-13.5 -0.5q-106 -9 -163 11q-4 -17 -10 -26.5t-21 -15t-23 -7t-36 -3.5q-2 0 -3 -0.5t-3 -0.5h-3q-179 -17 -203 40q-2 -63 -56 -54q-47 8 -91 54q-12 13 -20 26q-17 29 -26 65q-58 -6 -87 -10q1 -2 4 -10zM507 -118q3 14 3 30q-17 71 -51 130t-73 70 q-41 12 -101.5 -14.5t-104.5 -80t-39 -107.5q35 -53 100 -93t119 -42q51 -2 94 28t53 79zM510 53q23 -63 27 -119q195 113 392 174q-98 52 -180.5 120t-179.5 165q-6 -4 -29 -13q0 -2 -1 -5t-1 -4q31 -18 22 -37q-12 -23 -56 -34q-10 -13 -29 -24h-1q-2 -83 1 -150 q19 -34 35 -73zM579 -113q532 -21 1145 0q-254 147 -428 196q-76 -35 -156 -57q-8 -3 -16 0q-65 21 -129 49q-208 -60 -416 -188h-1v-1q1 0 1 1zM1763 -67q4 54 28 120q14 38 33 71l-1 -1q3 77 3 153q-15 8 -30 25q-42 9 -56 33q-9 20 22 38q-2 4 -2 9q-16 4 -28 12 q-204 -190 -383 -284q198 -59 414 -176zM2155 -90q5 54 -39 107.5t-104 80t-102 14.5q-38 -11 -72.5 -70.5t-51.5 -129.5q0 -16 3 -30q10 -49 53 -79t94 -28q54 2 119 42t100 93z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1524 -25q0 -68 -48 -116t-116 -48t-116.5 48t-48.5 116t48.5 116.5t116.5 48.5t116 -48.5t48 -116.5zM775 -25q0 -68 -48.5 -116t-116.5 -48t-116 48t-48 116t48 116.5t116 48.5t116.5 -48.5t48.5 -116.5zM0 1469q57 -60 110.5 -104.5t121 -82t136 -63t166 -45.5 t200 -31.5t250 -18.5t304 -9.5t372.5 -2.5q139 0 244.5 -5t181 -16.5t124 -27.5t71 -39.5t24 -51.5t-19.5 -64t-56.5 -76.5t-89.5 -91t-116 -104.5t-139 -119q-185 -157 -286 -247q29 51 76.5 109t94 105.5t94.5 98.5t83 91.5t54 80.5t13 70t-45.5 55.5t-116.5 41t-204 23.5 t-304 5q-168 -2 -314 6t-256 23t-204.5 41t-159.5 51.5t-122.5 62.5t-91.5 66.5t-68 71.5t-50.5 69.5t-40 68t-36.5 59.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M896 1472q-169 0 -323 -66t-265.5 -177.5t-177.5 -265.5t-66 -323t66 -323t177.5 -265.5t265.5 -177.5t323 -66t323 66t265.5 177.5t177.5 265.5t66 323t-66 323t-177.5 265.5t-265.5 177.5t-323 66zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348 t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM496 704q16 0 16 -16v-480q0 -16 -16 -16h-32q-16 0 -16 16v480q0 16 16 16h32zM896 640q53 0 90.5 -37.5t37.5 -90.5q0 -35 -17.5 -64t-46.5 -46v-114q0 -14 -9 -23 t-23 -9h-64q-14 0 -23 9t-9 23v114q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5zM896 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM544 928v-96 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 93 65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5v-96q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 146 -103 249t-249 103t-249 -103t-103 -249zM1408 192v512q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-512 q0 -26 19 -45t45 -19h896q26 0 45 19t19 45z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1920 1024v-768h-1664v768h1664zM2048 448h128v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288zM2304 832v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113 v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160q53 0 90.5 -37.5t37.5 -90.5z" /> -<glyph unicode="" horiz-adv-x="2304" d="M256 256v768h1280v-768h-1280zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> -<glyph unicode="" horiz-adv-x="2304" d="M256 256v768h896v-768h-896zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> -<glyph unicode="" horiz-adv-x="2304" d="M256 256v768h512v-768h-512zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> -<glyph unicode="" horiz-adv-x="2304" d="M2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23 v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1133 493q31 -30 14 -69q-17 -40 -59 -40h-382l201 -476q10 -25 0 -49t-34 -35l-177 -75q-25 -10 -49 0t-35 34l-191 452l-312 -312q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v1504q0 42 40 59q12 5 24 5q27 0 45 -19z" /> -<glyph unicode="" horiz-adv-x="1024" d="M832 1408q-320 0 -320 -224v-416h128v-128h-128v-544q0 -224 320 -224h64v-128h-64q-272 0 -384 146q-112 -146 -384 -146h-64v128h64q320 0 320 224v544h-128v128h128v416q0 224 -320 224h-64v128h64q272 0 384 -146q112 146 384 146h64v-128h-64z" /> -<glyph unicode="" horiz-adv-x="2048" d="M2048 1152h-128v-1024h128v-384h-384v128h-1280v-128h-384v384h128v1024h-128v384h384v-128h1280v128h384v-384zM1792 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 -128v128h-128v-128h128zM1664 0v128h128v1024h-128v128h-1280v-128h-128v-1024h128v-128 h1280zM1920 -128v128h-128v-128h128zM1280 896h384v-768h-896v256h-384v768h896v-256zM512 512h640v512h-640v-512zM1536 256v512h-256v-384h-384v-128h640z" /> -<glyph unicode="" horiz-adv-x="2304" d="M2304 768h-128v-640h128v-384h-384v128h-896v-128h-384v384h128v128h-384v-128h-384v384h128v640h-128v384h384v-128h896v128h384v-384h-128v-128h384v128h384v-384zM2048 1024v-128h128v128h-128zM1408 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 256 v128h-128v-128h128zM1536 384h-128v-128h128v128zM384 384h896v128h128v640h-128v128h-896v-128h-128v-640h128v-128zM896 -128v128h-128v-128h128zM2176 -128v128h-128v-128h128zM2048 128v640h-128v128h-384v-384h128v-384h-384v128h-384v-128h128v-128h896v128h128z" /> -<glyph unicode="" d="M1024 288v-416h-928q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68v-928h-416q-40 0 -68 -28t-28 -68zM1152 256h381q-15 -82 -65 -132l-184 -184q-50 -50 -132 -65v381z" /> -<glyph unicode="" d="M1400 256h-248v-248q29 10 41 22l185 185q12 12 22 41zM1120 384h288v896h-1280v-1280h896v288q0 40 28 68t68 28zM1536 1312v-1024q0 -40 -20 -88t-48 -76l-184 -184q-28 -28 -76 -48t-88 -20h-1024q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68 z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1951 538q0 -26 -15.5 -44.5t-38.5 -23.5q-8 -2 -18 -2h-153v140h153q10 0 18 -2q23 -5 38.5 -23.5t15.5 -44.5zM1933 751q0 -25 -15 -42t-38 -21q-3 -1 -15 -1h-139v129h139q3 0 8.5 -0.5t6.5 -0.5q23 -4 38 -21.5t15 -42.5zM728 587v308h-228v-308q0 -58 -38 -94.5 t-105 -36.5q-108 0 -229 59v-112q53 -15 121 -23t109 -9l42 -1q328 0 328 217zM1442 403v113q-99 -52 -200 -59q-108 -8 -169 41t-61 142t61 142t169 41q101 -7 200 -58v112q-48 12 -100 19.5t-80 9.5l-28 2q-127 6 -218.5 -14t-140.5 -60t-71 -88t-22 -106t22 -106t71 -88 t140.5 -60t218.5 -14q101 4 208 31zM2176 518q0 54 -43 88.5t-109 39.5v3q57 8 89 41.5t32 79.5q0 55 -41 88t-107 36q-3 0 -12 0.5t-14 0.5h-455v-510h491q74 0 121.5 36.5t47.5 96.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90 t90 38h2048q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="2304" d="M858 295v693q-106 -41 -172 -135.5t-66 -211.5t66 -211.5t172 -134.5zM1362 641q0 117 -66 211.5t-172 135.5v-694q106 41 172 135.5t66 211.5zM1577 641q0 -159 -78.5 -294t-213.5 -213.5t-294 -78.5q-119 0 -227.5 46.5t-187 125t-125 187t-46.5 227.5q0 159 78.5 294 t213.5 213.5t294 78.5t294 -78.5t213.5 -213.5t78.5 -294zM1960 634q0 139 -55.5 261.5t-147.5 205.5t-213.5 131t-252.5 48h-301q-176 0 -323.5 -81t-235 -230t-87.5 -335q0 -171 87 -317.5t236 -231.5t323 -85h301q129 0 251.5 50.5t214.5 135t147.5 202.5t55.5 246z M2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1664 -96v1088q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5zM1792 992v-1088q0 -66 -47 -113t-113 -47h-1088q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113 zM1408 1376v-160h-128v160q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h160v-128h-160q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1728 1088l-384 -704h768zM448 1088l-384 -704h768zM1269 1280q-14 -40 -45.5 -71.5t-71.5 -45.5v-1291h608q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1344q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h608v1291q-40 14 -71.5 45.5t-45.5 71.5h-491q-14 0 -23 9t-9 23v64 q0 14 9 23t23 9h491q21 57 70 92.5t111 35.5t111 -35.5t70 -92.5h491q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-491zM1088 1264q33 0 56.5 23.5t23.5 56.5t-23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5zM2176 384q0 -73 -46.5 -131t-117.5 -91 t-144.5 -49.5t-139.5 -16.5t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81zM896 384q0 -73 -46.5 -131t-117.5 -91t-144.5 -49.5t-139.5 -16.5 t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81z" /> -<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-77 -29 -149 -92.5 t-129.5 -152.5t-92.5 -210t-35 -253h1024q0 132 -35 253t-92.5 210t-129.5 152.5t-149 92.5q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" /> -<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -66 9 -128h1006q9 61 9 128zM1280 -128q0 130 -34 249.5t-90.5 208t-126.5 152t-146 94.5h-230q-76 -31 -146 -94.5t-126.5 -152t-90.5 -208t-34 -249.5h1024z" /> -<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -206 85 -384h854q85 178 85 384zM1223 192q-54 141 -145.5 241.5t-194.5 142.5h-230q-103 -42 -194.5 -142.5t-145.5 -241.5h910z" /> -<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-137 -51 -244 -196 h700q-107 145 -244 196q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" /> -<glyph unicode="" d="M1504 -64q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472zM130 0q3 55 16 107t30 95t46 87t53.5 76t64.5 69.5t66 60t70.5 55t66.5 47.5t65 43q-43 28 -65 43t-66.5 47.5t-70.5 55t-66 60t-64.5 69.5t-53.5 76t-46 87 t-30 95t-16 107h1276q-3 -55 -16 -107t-30 -95t-46 -87t-53.5 -76t-64.5 -69.5t-66 -60t-70.5 -55t-66.5 -47.5t-65 -43q43 -28 65 -43t66.5 -47.5t70.5 -55t66 -60t64.5 -69.5t53.5 -76t46 -87t30 -95t16 -107h-1276zM1504 1536q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9 h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472z" /> -<glyph unicode="" d="M768 1152q-53 0 -90.5 -37.5t-37.5 -90.5v-128h-32v93q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-429l-32 30v172q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-224q0 -47 35 -82l310 -296q39 -39 39 -102q0 -26 19 -45t45 -19h640q26 0 45 19t19 45v25 q0 41 10 77l108 436q10 36 10 77v246q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-32h-32v125q0 40 -25 72.5t-64 40.5q-14 2 -23 2q-46 0 -79 -33t-33 -79v-128h-32v122q0 51 -32.5 89.5t-82.5 43.5q-5 1 -13 1zM768 1280q84 0 149 -50q57 34 123 34q59 0 111 -27 t86 -76q27 7 59 7q100 0 170 -71.5t70 -171.5v-246q0 -51 -13 -108l-109 -436q-6 -24 -6 -71q0 -80 -56 -136t-136 -56h-640q-84 0 -138 58.5t-54 142.5l-308 296q-76 73 -76 175v224q0 99 70.5 169.5t169.5 70.5q11 0 16 -1q6 95 75.5 160t164.5 65q52 0 98 -21 q72 69 174 69z" /> -<glyph unicode="" horiz-adv-x="1792" d="M880 1408q-46 0 -79 -33t-33 -79v-656h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528v-256l-154 205q-38 51 -102 51q-53 0 -90.5 -37.5t-37.5 -90.5q0 -43 26 -77l384 -512q38 -51 102 -51h688q34 0 61 22t34 56l76 405q5 32 5 59v498q0 46 -33 79t-79 33t-79 -33 t-33 -79v-272h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528h-32v656q0 46 -33 79t-79 33zM880 1536q68 0 125.5 -35.5t88.5 -96.5q19 4 42 4q99 0 169.5 -70.5t70.5 -169.5v-17q105 6 180.5 -64t75.5 -175v-498q0 -40 -8 -83l-76 -404q-14 -79 -76.5 -131t-143.5 -52 h-688q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 106 75 181t181 75q78 0 128 -34v434q0 99 70.5 169.5t169.5 70.5q23 0 42 -4q31 61 88.5 96.5t125.5 35.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1073 -128h-177q-163 0 -226 141q-23 49 -23 102v5q-62 30 -98.5 88.5t-36.5 127.5q0 38 5 48h-261q-106 0 -181 75t-75 181t75 181t181 75h113l-44 17q-74 28 -119.5 93.5t-45.5 145.5q0 106 75 181t181 75q46 0 91 -17l628 -239h401q106 0 181 -75t75 -181v-668 q0 -88 -54 -157.5t-140 -90.5l-339 -85q-92 -23 -186 -23zM1024 583l-155 -71l-163 -74q-30 -14 -48 -41.5t-18 -60.5q0 -46 33 -79t79 -33q26 0 46 10l338 154q-49 10 -80.5 50t-31.5 90v55zM1344 272q0 46 -33 79t-79 33q-26 0 -46 -10l-290 -132q-28 -13 -37 -17 t-30.5 -17t-29.5 -23.5t-16 -29t-8 -40.5q0 -50 31.5 -82t81.5 -32q20 0 38 9l352 160q30 14 48 41.5t18 60.5zM1112 1024l-650 248q-24 8 -46 8q-53 0 -90.5 -37.5t-37.5 -90.5q0 -40 22.5 -73t59.5 -47l526 -200v-64h-640q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5 t90.5 -37.5h535l233 106v198q0 63 46 106l111 102h-69zM1073 0q82 0 155 19l339 85q43 11 70 45.5t27 78.5v668q0 53 -37.5 90.5t-90.5 37.5h-308l-136 -126q-36 -33 -36 -82v-296q0 -46 33 -77t79 -31t79 35t33 81v208h32v-208q0 -70 -57 -114q52 -8 86.5 -48.5t34.5 -93.5 q0 -42 -23 -78t-61 -53l-310 -141h91z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1151 1536q61 0 116 -28t91 -77l572 -781q118 -159 118 -359v-355q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v177l-286 143h-546q-80 0 -136 56t-56 136v32q0 119 84.5 203.5t203.5 84.5h420l42 128h-686q-100 0 -173.5 67.5t-81.5 166.5q-65 79 -65 182v32 q0 80 56 136t136 56h959zM1920 -64v355q0 157 -93 284l-573 781q-39 52 -103 52h-959q-26 0 -45 -19t-19 -45q0 -32 1.5 -49.5t9.5 -40.5t25 -43q10 31 35.5 50t56.5 19h832v-32h-832q-26 0 -45 -19t-19 -45q0 -44 3 -58q8 -44 44 -73t81 -29h640h91q40 0 68 -28t28 -68 q0 -15 -5 -30l-64 -192q-10 -29 -35 -47.5t-56 -18.5h-443q-66 0 -113 -47t-47 -113v-32q0 -26 19 -45t45 -19h561q16 0 29 -7l317 -158q24 -13 38.5 -36t14.5 -50v-197q0 -26 19 -45t45 -19h384q26 0 45 19t19 45z" /> -<glyph unicode="" horiz-adv-x="2048" d="M816 1408q-48 0 -79.5 -34t-31.5 -82q0 -14 3 -28l150 -624h-26l-116 482q-9 38 -39.5 62t-69.5 24q-47 0 -79 -34t-32 -81q0 -11 4 -29q3 -13 39 -161t68 -282t32 -138v-227l-307 230q-34 26 -77 26q-52 0 -89.5 -36.5t-37.5 -88.5q0 -67 56 -110l507 -379 q34 -26 76 -26h694q33 0 59 20.5t34 52.5l100 401q8 30 10 88t9 86l116 478q3 12 3 26q0 46 -33 79t-80 33q-38 0 -69 -25.5t-40 -62.5l-99 -408h-26l132 547q3 14 3 28q0 47 -32 80t-80 33q-38 0 -68.5 -24t-39.5 -62l-145 -602h-127l-164 682q-9 38 -39.5 62t-68.5 24z M1461 -256h-694q-85 0 -153 51l-507 380q-50 38 -78.5 94t-28.5 118q0 105 75 179t180 74q25 0 49.5 -5.5t41.5 -11t41 -20.5t35 -23t38.5 -29.5t37.5 -28.5l-123 512q-7 35 -7 59q0 93 60 162t152 79q14 87 80.5 144.5t155.5 57.5q83 0 148 -51.5t85 -132.5l103 -428 l83 348q20 81 85 132.5t148 51.5q87 0 152.5 -54t82.5 -139q93 -10 155 -78t62 -161q0 -30 -7 -57l-116 -477q-5 -22 -5 -67q0 -51 -13 -108l-101 -401q-19 -75 -79.5 -122.5t-137.5 -47.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 1408q-53 0 -90.5 -37.5t-37.5 -90.5v-512v-384l-151 202q-41 54 -107 54q-52 0 -89 -38t-37 -90q0 -43 26 -77l384 -512q38 -51 102 -51h718q22 0 39.5 13.5t22.5 34.5l92 368q24 96 24 194v217q0 41 -28 71t-68 30t-68 -28t-28 -68h-32v61q0 48 -32 81.5t-80 33.5 q-46 0 -79 -33t-33 -79v-64h-32v90q0 55 -37 94.5t-91 39.5q-53 0 -90.5 -37.5t-37.5 -90.5v-96h-32v570q0 55 -37 94.5t-91 39.5zM640 1536q107 0 181.5 -77.5t74.5 -184.5v-220q22 2 32 2q99 0 173 -69q47 21 99 21q113 0 184 -87q27 7 56 7q94 0 159 -67.5t65 -161.5 v-217q0 -116 -28 -225l-92 -368q-16 -64 -68 -104.5t-118 -40.5h-718q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 105 74.5 180.5t179.5 75.5q71 0 130 -35v547q0 106 75 181t181 75zM768 128v384h-32v-384h32zM1024 128v384h-32v-384h32zM1280 128v384h-32 v-384h32z" /> -<glyph unicode="" d="M1288 889q60 0 107 -23q141 -63 141 -226v-177q0 -94 -23 -186l-85 -339q-21 -86 -90.5 -140t-157.5 -54h-668q-106 0 -181 75t-75 181v401l-239 628q-17 45 -17 91q0 106 75 181t181 75q80 0 145.5 -45.5t93.5 -119.5l17 -44v113q0 106 75 181t181 75t181 -75t75 -181 v-261q27 5 48 5q69 0 127.5 -36.5t88.5 -98.5zM1072 896q-33 0 -60.5 -18t-41.5 -48l-74 -163l-71 -155h55q50 0 90 -31.5t50 -80.5l154 338q10 20 10 46q0 46 -33 79t-79 33zM1293 761q-22 0 -40.5 -8t-29 -16t-23.5 -29.5t-17 -30.5t-17 -37l-132 -290q-10 -20 -10 -46 q0 -46 33 -79t79 -33q33 0 60.5 18t41.5 48l160 352q9 18 9 38q0 50 -32 81.5t-82 31.5zM128 1120q0 -22 8 -46l248 -650v-69l102 111q43 46 106 46h198l106 233v535q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5v-640h-64l-200 526q-14 37 -47 59.5t-73 22.5 q-53 0 -90.5 -37.5t-37.5 -90.5zM1180 -128q44 0 78.5 27t45.5 70l85 339q19 73 19 155v91l-141 -310q-17 -38 -53 -61t-78 -23q-53 0 -93.5 34.5t-48.5 86.5q-44 -57 -114 -57h-208v32h208q46 0 81 33t35 79t-31 79t-77 33h-296q-49 0 -82 -36l-126 -136v-308 q0 -53 37.5 -90.5t90.5 -37.5h668z" /> -<glyph unicode="" horiz-adv-x="1973" d="M857 992v-117q0 -13 -9.5 -22t-22.5 -9h-298v-812q0 -13 -9 -22.5t-22 -9.5h-135q-13 0 -22.5 9t-9.5 23v812h-297q-13 0 -22.5 9t-9.5 22v117q0 14 9 23t23 9h793q13 0 22.5 -9.5t9.5 -22.5zM1895 995l77 -961q1 -13 -8 -24q-10 -10 -23 -10h-134q-12 0 -21 8.5 t-10 20.5l-46 588l-189 -425q-8 -19 -29 -19h-120q-20 0 -29 19l-188 427l-45 -590q-1 -12 -10 -20.5t-21 -8.5h-135q-13 0 -23 10q-9 10 -9 24l78 961q1 12 10 20.5t21 8.5h142q20 0 29 -19l220 -520q10 -24 20 -51q3 7 9.5 24.5t10.5 26.5l221 520q9 19 29 19h141 q13 0 22 -8.5t10 -20.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1042 833q0 88 -60 121q-33 18 -117 18h-123v-281h162q66 0 102 37t36 105zM1094 548l205 -373q8 -17 -1 -31q-8 -16 -27 -16h-152q-20 0 -28 17l-194 365h-155v-350q0 -14 -9 -23t-23 -9h-134q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h294q128 0 190 -24q85 -31 134 -109 t49 -180q0 -92 -42.5 -165.5t-115.5 -109.5q6 -10 9 -16zM896 1376q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM1792 640 q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> -<glyph unicode="" horiz-adv-x="1792" d="M605 303q153 0 257 104q14 18 3 36l-45 82q-6 13 -24 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13t-23.5 -14.5t-28.5 -13.5t-33.5 -9.5t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78 q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-148 0 -246 -96.5t-98 -240.5q0 -146 97 -241.5t247 -95.5zM1235 303q153 0 257 104q14 18 4 36l-45 82q-8 14 -25 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13t-23.5 -14.5t-28.5 -13.5t-33.5 -9.5 t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-147 0 -245.5 -96.5t-98.5 -240.5q0 -146 97 -241.5t247 -95.5zM896 1376 q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191 t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71z" /> -<glyph unicode="" horiz-adv-x="2048" d="M736 736l384 -384l-384 -384l-672 672l672 672l168 -168l-96 -96l-72 72l-480 -480l480 -480l193 193l-289 287zM1312 1312l672 -672l-672 -672l-168 168l96 96l72 -72l480 480l-480 480l-193 -193l289 -287l-96 -96l-384 384z" /> -<glyph unicode="" horiz-adv-x="1792" d="M717 182l271 271l-279 279l-88 -88l192 -191l-96 -96l-279 279l279 279l40 -40l87 87l-127 128l-454 -454zM1075 190l454 454l-454 454l-271 -271l279 -279l88 88l-192 191l96 96l279 -279l-279 -279l-40 40l-87 -88zM1792 640q0 -182 -71 -348t-191 -286t-286 -191 t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> -<glyph unicode="" horiz-adv-x="2304" d="M651 539q0 -39 -27.5 -66.5t-65.5 -27.5q-39 0 -66.5 27.5t-27.5 66.5q0 38 27.5 65.5t66.5 27.5q38 0 65.5 -27.5t27.5 -65.5zM1805 540q0 -39 -27.5 -66.5t-66.5 -27.5t-66.5 27.5t-27.5 66.5t27.5 66t66.5 27t66.5 -27t27.5 -66zM765 539q0 79 -56.5 136t-136.5 57 t-136.5 -56.5t-56.5 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM1918 540q0 80 -56.5 136.5t-136.5 56.5q-79 0 -136 -56.5t-57 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM850 539q0 -116 -81.5 -197.5t-196.5 -81.5q-116 0 -197.5 82t-81.5 197 t82 196.5t197 81.5t196.5 -81.5t81.5 -196.5zM2004 540q0 -115 -81.5 -196.5t-197.5 -81.5q-115 0 -196.5 81.5t-81.5 196.5t81.5 196.5t196.5 81.5q116 0 197.5 -81.5t81.5 -196.5zM1040 537q0 191 -135.5 326.5t-326.5 135.5q-125 0 -231 -62t-168 -168.5t-62 -231.5 t62 -231.5t168 -168.5t231 -62q191 0 326.5 135.5t135.5 326.5zM1708 1110q-254 111 -556 111q-319 0 -573 -110q117 0 223 -45.5t182.5 -122.5t122 -183t45.5 -223q0 115 43.5 219.5t118 180.5t177.5 123t217 50zM2187 537q0 191 -135 326.5t-326 135.5t-326.5 -135.5 t-135.5 -326.5t135.5 -326.5t326.5 -135.5t326 135.5t135 326.5zM1921 1103h383q-44 -51 -75 -114.5t-40 -114.5q110 -151 110 -337q0 -156 -77 -288t-209 -208.5t-287 -76.5q-133 0 -249 56t-196 155q-47 -56 -129 -179q-11 22 -53.5 82.5t-74.5 97.5 q-80 -99 -196.5 -155.5t-249.5 -56.5q-155 0 -287 76.5t-209 208.5t-77 288q0 186 110 337q-9 51 -40 114.5t-75 114.5h365q149 100 355 156.5t432 56.5q224 0 421 -56t348 -157z" /> -<glyph unicode="" horiz-adv-x="1280" d="M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5 t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94 q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z" /> -<glyph unicode="" d="M927 956q0 -66 -46.5 -112.5t-112.5 -46.5t-112.5 46.5t-46.5 112.5t46.5 112.5t112.5 46.5t112.5 -46.5t46.5 -112.5zM1141 593q-10 20 -28 32t-47.5 9.5t-60.5 -27.5q-10 -8 -29 -20t-81 -32t-127 -20t-124 18t-86 36l-27 18q-31 25 -60.5 27.5t-47.5 -9.5t-28 -32 q-22 -45 -2 -74.5t87 -73.5q83 -53 226 -67l-51 -52q-142 -142 -191 -190q-22 -22 -22 -52.5t22 -52.5l9 -9q22 -22 52.5 -22t52.5 22l191 191q114 -115 191 -191q22 -22 52.5 -22t52.5 22l9 9q22 22 22 52.5t-22 52.5l-191 190l-52 52q141 14 225 67q67 44 87 73.5t-2 74.5 zM1092 956q0 134 -95 229t-229 95t-229 -95t-95 -229t95 -229t229 -95t229 95t95 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1720" d="M1565 1408q65 0 110 -45.5t45 -110.5v-519q0 -176 -68 -336t-182.5 -275t-274 -182.5t-334.5 -67.5q-176 0 -335.5 67.5t-274.5 182.5t-183 275t-68 336v519q0 64 46 110t110 46h1409zM861 344q47 0 82 33l404 388q37 35 37 85q0 49 -34.5 83.5t-83.5 34.5q-47 0 -82 -33 l-323 -310l-323 310q-35 33 -81 33q-49 0 -83.5 -34.5t-34.5 -83.5q0 -51 36 -85l405 -388q33 -33 81 -33z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1494 -103l-295 695q-25 -49 -158.5 -305.5t-198.5 -389.5q-1 -1 -27.5 -0.5t-26.5 1.5q-82 193 -255.5 587t-259.5 596q-21 50 -66.5 107.5t-103.5 100.5t-102 43q0 5 -0.5 24t-0.5 27h583v-50q-39 -2 -79.5 -16t-66.5 -43t-10 -64q26 -59 216.5 -499t235.5 -540 q31 61 140 266.5t131 247.5q-19 39 -126 281t-136 295q-38 69 -201 71v50l513 -1v-47q-60 -2 -93.5 -25t-12.5 -69q33 -70 87 -189.5t86 -187.5q110 214 173 363q24 55 -10 79.5t-129 26.5q1 7 1 25v24q64 0 170.5 0.5t180 1t92.5 0.5v-49q-62 -2 -119 -33t-90 -81 l-213 -442q13 -33 127.5 -290t121.5 -274l441 1017q-14 38 -49.5 62.5t-65 31.5t-55.5 8v50l460 -4l1 -2l-1 -44q-139 -4 -201 -145q-526 -1216 -559 -1291h-49z" /> -<glyph unicode="" horiz-adv-x="1792" d="M949 643q0 -26 -16.5 -45t-41.5 -19q-26 0 -45 16.5t-19 41.5q0 26 17 45t42 19t44 -16.5t19 -41.5zM964 585l350 581q-9 -8 -67.5 -62.5t-125.5 -116.5t-136.5 -127t-117 -110.5t-50.5 -51.5l-349 -580q7 7 67 62t126 116.5t136 127t117 111t50 50.5zM1611 640 q0 -201 -104 -371q-3 2 -17 11t-26.5 16.5t-16.5 7.5q-13 0 -13 -13q0 -10 59 -44q-74 -112 -184.5 -190.5t-241.5 -110.5l-16 67q-1 10 -15 10q-5 0 -8 -5.5t-2 -9.5l16 -68q-72 -15 -146 -15q-199 0 -372 105q1 2 13 20.5t21.5 33.5t9.5 19q0 13 -13 13q-6 0 -17 -14.5 t-22.5 -34.5t-13.5 -23q-113 75 -192 187.5t-110 244.5l69 15q10 3 10 15q0 5 -5.5 8t-10.5 2l-68 -15q-14 72 -14 139q0 206 109 379q2 -1 18.5 -12t30 -19t17.5 -8q13 0 13 12q0 6 -12.5 15.5t-32.5 21.5l-20 12q77 112 189 189t244 107l15 -67q2 -10 15 -10q5 0 8 5.5 t2 10.5l-15 66q71 13 134 13q204 0 379 -109q-39 -56 -39 -65q0 -13 12 -13q11 0 48 64q111 -75 187.5 -186t107.5 -241l-56 -12q-10 -2 -10 -16q0 -5 5.5 -8t9.5 -2l57 13q14 -72 14 -140zM1696 640q0 163 -63.5 311t-170.5 255t-255 170.5t-311 63.5t-311 -63.5 t-255 -170.5t-170.5 -255t-63.5 -311t63.5 -311t170.5 -255t255 -170.5t311 -63.5t311 63.5t255 170.5t170.5 255t63.5 311zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191 t191 -286t71 -348z" /> -<glyph unicode="" horiz-adv-x="1792" d="M893 1536q240 2 451 -120q232 -134 352 -372l-742 39q-160 9 -294 -74.5t-185 -229.5l-276 424q128 159 311 245.5t383 87.5zM146 1131l337 -663q72 -143 211 -217t293 -45l-230 -451q-212 33 -385 157.5t-272.5 316t-99.5 411.5q0 267 146 491zM1732 962 q58 -150 59.5 -310.5t-48.5 -306t-153 -272t-246 -209.5q-230 -133 -498 -119l405 623q88 131 82.5 290.5t-106.5 277.5zM896 942q125 0 213.5 -88.5t88.5 -213.5t-88.5 -213.5t-213.5 -88.5t-213.5 88.5t-88.5 213.5t88.5 213.5t213.5 88.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M903 -256q-283 0 -504.5 150.5t-329.5 398.5q-58 131 -67 301t26 332.5t111 312t179 242.5l-11 -281q11 14 68 15.5t70 -15.5q42 81 160.5 138t234.5 59q-54 -45 -119.5 -148.5t-58.5 -163.5q25 -8 62.5 -13.5t63 -7.5t68 -4t50.5 -3q15 -5 9.5 -45.5t-30.5 -75.5 q-5 -7 -16.5 -18.5t-56.5 -35.5t-101 -34l15 -189l-139 67q-18 -43 -7.5 -81.5t36 -66.5t65.5 -41.5t81 -6.5q51 9 98 34.5t83.5 45t73.5 17.5q61 -4 89.5 -33t19.5 -65q-1 -2 -2.5 -5.5t-8.5 -12.5t-18 -15.5t-31.5 -10.5t-46.5 -1q-60 -95 -144.5 -135.5t-209.5 -29.5 q74 -61 162.5 -82.5t168.5 -6t154.5 52t128 87.5t80.5 104q43 91 39 192.5t-37.5 188.5t-78.5 125q87 -38 137 -79.5t77 -112.5q15 170 -57.5 343t-209.5 284q265 -77 412 -279.5t151 -517.5q2 -127 -40.5 -255t-123.5 -238t-189 -196t-247.5 -135.5t-288.5 -49.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1493 1308q-165 110 -359 110q-155 0 -293 -73t-240 -200q-75 -93 -119.5 -218t-48.5 -266v-42q4 -141 48.5 -266t119.5 -218q102 -127 240 -200t293 -73q194 0 359 110q-121 -108 -274.5 -168t-322.5 -60q-29 0 -43 1q-175 8 -333 82t-272 193t-181 281t-67 339 q0 182 71 348t191 286t286 191t348 71h3q168 -1 320.5 -60.5t273.5 -167.5zM1792 640q0 -192 -77 -362.5t-213 -296.5q-104 -63 -222 -63q-137 0 -255 84q154 56 253.5 233t99.5 405q0 227 -99 404t-253 234q119 83 254 83q119 0 226 -65q135 -125 210.5 -295t75.5 -361z " /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 599q0 -56 -7 -104h-1151q0 -146 109.5 -244.5t257.5 -98.5q99 0 185.5 46.5t136.5 130.5h423q-56 -159 -170.5 -281t-267.5 -188.5t-321 -66.5q-187 0 -356 83q-228 -116 -394 -116q-237 0 -237 263q0 115 45 275q17 60 109 229q199 360 475 606 q-184 -79 -427 -354q63 274 283.5 449.5t501.5 175.5q30 0 45 -1q255 117 433 117q64 0 116 -13t94.5 -40.5t66.5 -76.5t24 -115q0 -116 -75 -286q101 -182 101 -390zM1722 1239q0 83 -53 132t-137 49q-108 0 -254 -70q121 -47 222.5 -131.5t170.5 -195.5q51 135 51 216z M128 2q0 -86 48.5 -132.5t134.5 -46.5q115 0 266 83q-122 72 -213.5 183t-137.5 245q-98 -205 -98 -332zM632 715h728q-5 142 -113 237t-251 95q-144 0 -251.5 -95t-112.5 -237z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1792 288v960q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1248v-960q0 -66 -47 -113t-113 -47h-736v-128h352q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23 v64q0 14 9 23t23 9h352v128h-736q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> -<glyph unicode="" horiz-adv-x="1792" d="M138 1408h197q-70 -64 -126 -149q-36 -56 -59 -115t-30 -125.5t-8.5 -120t10.5 -132t21 -126t28 -136.5q4 -19 6 -28q51 -238 81 -329q57 -171 152 -275h-272q-48 0 -82 34t-34 82v1304q0 48 34 82t82 34zM1346 1408h308q48 0 82 -34t34 -82v-1304q0 -48 -34 -82t-82 -34 h-178q212 210 196 565l-469 -101q-2 -45 -12 -82t-31 -72t-59.5 -59.5t-93.5 -36.5q-123 -26 -199 40q-32 27 -53 61t-51.5 129t-64.5 258q-35 163 -45.5 263t-5.5 139t23 77q20 41 62.5 73t102.5 45q45 12 83.5 6.5t67 -17t54 -35t43 -48t34.5 -56.5l468 100 q-68 175 -180 287z" /> -<glyph unicode="" d="M1401 -11l-6 -6q-113 -114 -259 -175q-154 -64 -317 -64q-165 0 -317 64q-148 63 -259 175q-113 112 -175 258q-42 103 -54 189q-4 28 48 36q51 8 56 -20q1 -1 1 -4q18 -90 46 -159q50 -124 152 -226q98 -98 226 -152q132 -56 276 -56q143 0 276 56q128 55 225 152l6 6 q10 10 25 6q12 -3 33 -22q36 -37 17 -58zM929 604l-66 -66l63 -63q21 -21 -7 -49q-17 -17 -32 -17q-10 0 -19 10l-62 61l-66 -66q-5 -5 -15 -5q-15 0 -31 16l-2 2q-18 15 -18 29q0 7 8 17l66 65l-66 66q-16 16 14 45q18 18 31 18q6 0 13 -5l65 -66l65 65q18 17 48 -13 q27 -27 11 -44zM1400 547q0 -118 -46 -228q-45 -105 -126 -186q-80 -80 -187 -126t-228 -46t-228 46t-187 126q-82 82 -125 186q-15 32 -15 40h-1q-9 27 43 44q50 16 60 -12q37 -99 97 -167h1v339v2q3 136 102 232q105 103 253 103q147 0 251 -103t104 -249 q0 -147 -104.5 -251t-250.5 -104q-58 0 -112 16q-28 11 -13 61q16 51 44 43l14 -3q14 -3 32.5 -6t30.5 -3q104 0 176 71.5t72 174.5q0 101 -72 171q-71 71 -175 71q-107 0 -178 -80q-64 -72 -64 -160v-413q110 -67 242 -67q96 0 185 36.5t156 103.5t103.5 155t36.5 183 q0 198 -141 339q-140 140 -339 140q-200 0 -340 -140q-53 -53 -77 -87l-2 -2q-8 -11 -13 -15.5t-21.5 -9.5t-38.5 3q-21 5 -36.5 16.5t-15.5 26.5v680q0 15 10.5 26.5t27.5 11.5h877q30 0 30 -55t-30 -55h-811v-483h1q40 42 102 84t108 61q109 46 231 46q121 0 228 -46 t187 -126q81 -81 126 -186q46 -112 46 -229zM1369 1128q9 -8 9 -18t-5.5 -18t-16.5 -21q-26 -26 -39 -26q-9 0 -16 7q-106 91 -207 133q-128 56 -276 56q-133 0 -262 -49q-27 -10 -45 37q-9 25 -8 38q3 16 16 20q130 57 299 57q164 0 316 -64q137 -58 235 -152z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1551 60q15 6 26 3t11 -17.5t-15 -33.5q-13 -16 -44 -43.5t-95.5 -68t-141 -74t-188 -58t-229.5 -24.5q-119 0 -238 31t-209 76.5t-172.5 104t-132.5 105t-84 87.5q-8 9 -10 16.5t1 12t8 7t11.5 2t11.5 -4.5q192 -117 300 -166q389 -176 799 -90q190 40 391 135z M1758 175q11 -16 2.5 -69.5t-28.5 -102.5q-34 -83 -85 -124q-17 -14 -26 -9t0 24q21 45 44.5 121.5t6.5 98.5q-5 7 -15.5 11.5t-27 6t-29.5 2.5t-35 0t-31.5 -2t-31 -3t-22.5 -2q-6 -1 -13 -1.5t-11 -1t-8.5 -1t-7 -0.5h-5.5h-4.5t-3 0.5t-2 1.5l-1.5 3q-6 16 47 40t103 30 q46 7 108 1t76 -24zM1364 618q0 -31 13.5 -64t32 -58t37.5 -46t33 -32l13 -11l-227 -224q-40 37 -79 75.5t-58 58.5l-19 20q-11 11 -25 33q-38 -59 -97.5 -102.5t-127.5 -63.5t-140 -23t-137.5 21t-117.5 65.5t-83 113t-31 162.5q0 84 28 154t72 116.5t106.5 83t122.5 57 t130 34.5t119.5 18.5t99.5 6.5v127q0 65 -21 97q-34 53 -121 53q-6 0 -16.5 -1t-40.5 -12t-56 -29.5t-56 -59.5t-48 -96l-294 27q0 60 22 119t67 113t108 95t151.5 65.5t190.5 24.5q100 0 181 -25t129.5 -61.5t81 -83t45 -86t12.5 -73.5v-589zM692 597q0 -86 70 -133 q66 -44 139 -22q84 25 114 123q14 45 14 101v162q-59 -2 -111 -12t-106.5 -33.5t-87 -71t-32.5 -114.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1536 1280q52 0 90 -38t38 -90v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128zM1152 1376v-288q0 -14 9 -23t23 -9 h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 1376v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM1536 -128v1024h-1408v-1024h1408zM896 448h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224 v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1152 416v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23 t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47 t47 -113v-96h128q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1111 151l-46 -46q-9 -9 -22 -9t-23 9l-188 189l-188 -189q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22t9 23l189 188l-189 188q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l188 -188l188 188q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23l-188 -188l188 -188q9 -10 9 -23t-9 -22z M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1303 572l-512 -512q-10 -9 -23 -9t-23 9l-288 288q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l220 -220l444 444q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23 t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47 t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> -<glyph unicode="" horiz-adv-x="1792" d="M448 1536q26 0 45 -19t19 -45v-891l536 429q17 14 40 14q26 0 45 -19t19 -45v-379l536 429q17 14 40 14q26 0 45 -19t19 -45v-1152q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h384z" /> -<glyph unicode="" horiz-adv-x="1024" d="M512 448q66 0 128 15v-655q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v655q61 -15 128 -15zM512 1536q212 0 362 -150t150 -362t-150 -362t-362 -150t-362 150t-150 362t150 362t362 150zM512 1312q14 0 23 9t9 23t-9 23t-23 9q-146 0 -249 -103t-103 -249 q0 -14 9 -23t23 -9t23 9t9 23q0 119 84.5 203.5t203.5 84.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1745 1239q10 -10 10 -23t-10 -23l-141 -141q-28 -28 -68 -28h-1344q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h576v64q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-64h512q40 0 68 -28zM768 320h256v-512q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v512zM1600 768 q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-1344q-40 0 -68 28l-141 141q-10 10 -10 23t10 23l141 141q28 28 68 28h512v192h256v-192h576z" /> -<glyph unicode="" horiz-adv-x="2048" d="M2020 1525q28 -20 28 -53v-1408q0 -20 -11 -36t-29 -23l-640 -256q-24 -11 -48 0l-616 246l-616 -246q-10 -5 -24 -5q-19 0 -36 11q-28 20 -28 53v1408q0 20 11 36t29 23l640 256q24 11 48 0l616 -246l616 246q32 13 60 -6zM736 1390v-1270l576 -230v1270zM128 1173 v-1270l544 217v1270zM1920 107v1270l-544 -217v-1270z" /> -<glyph unicode="" horiz-adv-x="1792" d="M512 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472q0 20 17 28l480 256q7 4 15 4zM1760 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472 q0 20 17 28l480 256q7 4 15 4zM640 1536q8 0 14 -3l512 -256q18 -10 18 -29v-1472q0 -13 -9.5 -22.5t-22.5 -9.5q-8 0 -14 3l-512 256q-18 10 -18 29v1472q0 13 9.5 22.5t22.5 9.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 640q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-110 0 -211 18q-173 -173 -435 -229q-52 -10 -86 -13q-12 -1 -22 6t-13 18q-4 15 20 37q5 5 23.5 21.5t25.5 23.5t23.5 25.5t24 31.5t20.5 37 t20 48t14.5 57.5t12.5 72.5q-146 90 -229.5 216.5t-83.5 269.5q0 174 120 321.5t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 -53 -37.5 -90.5t-90.5 -37.5 t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5 t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51 t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 130 71 248.5t191 204.5t286 136.5t348 50.5t348 -50.5t286 -136.5t191 -204.5t71 -248.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M512 345l512 295v-591l-512 -296v592zM0 640v-591l512 296zM512 1527v-591l-512 -296v591zM512 936l512 295v-591z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1709 1018q-10 -236 -332 -651q-333 -431 -562 -431q-142 0 -240 263q-44 160 -132 482q-72 262 -157 262q-18 0 -127 -76l-77 98q24 21 108 96.5t130 115.5q156 138 241 146q95 9 153 -55.5t81 -203.5q44 -287 66 -373q55 -249 120 -249q51 0 154 161q101 161 109 246 q13 139 -109 139q-57 0 -121 -26q120 393 459 382q251 -8 236 -326z" /> -<glyph unicode="" d="M0 1408h1536v-1536h-1536v1536zM1085 293l-221 631l221 297h-634l221 -297l-221 -631l317 -304z" /> -<glyph unicode="" d="M0 1408h1536v-1536h-1536v1536zM908 1088l-12 -33l75 -83l-31 -114l25 -25l107 57l107 -57l25 25l-31 114l75 83l-12 33h-95l-53 96h-32l-53 -96h-95zM641 925q32 0 44.5 -16t11.5 -63l174 21q0 55 -17.5 92.5t-50.5 56t-69 25.5t-85 7q-133 0 -199 -57.5t-66 -182.5v-72 h-96v-128h76q20 0 20 -8v-382q0 -14 -5 -20t-18 -7l-73 -7v-88h448v86l-149 14q-6 1 -8.5 1.5t-3.5 2.5t-0.5 4t1 7t0.5 10v387h191l38 128h-231q-6 0 -2 6t4 9v80q0 27 1.5 40.5t7.5 28t19.5 20t36.5 5.5zM1248 96v86l-54 9q-7 1 -9.5 2.5t-2.5 3t1 7.5t1 12v520h-275 l-23 -101l83 -22q23 -7 23 -27v-370q0 -14 -6 -18.5t-20 -6.5l-70 -9v-86h352z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1792 690q0 -58 -29.5 -105.5t-79.5 -72.5q12 -46 12 -96q0 -155 -106.5 -287t-290.5 -208.5t-400 -76.5t-399.5 76.5t-290 208.5t-106.5 287q0 47 11 94q-51 25 -82 73.5t-31 106.5q0 82 58 140.5t141 58.5q85 0 145 -63q218 152 515 162l116 521q3 13 15 21t26 5 l369 -81q18 37 54 59.5t79 22.5q62 0 106 -43.5t44 -105.5t-44 -106t-106 -44t-105.5 43.5t-43.5 105.5l-334 74l-104 -472q300 -9 519 -160q58 61 143 61q83 0 141 -58.5t58 -140.5zM418 491q0 -62 43.5 -106t105.5 -44t106 44t44 106t-44 105.5t-106 43.5q-61 0 -105 -44 t-44 -105zM1228 136q11 11 11 26t-11 26q-10 10 -25 10t-26 -10q-41 -42 -121 -62t-160 -20t-160 20t-121 62q-11 10 -26 10t-25 -10q-11 -10 -11 -25.5t11 -26.5q43 -43 118.5 -68t122.5 -29.5t91 -4.5t91 4.5t122.5 29.5t118.5 68zM1225 341q62 0 105.5 44t43.5 106 q0 61 -44 105t-105 44q-62 0 -106 -43.5t-44 -105.5t44 -106t106 -44z" /> -<glyph unicode="" horiz-adv-x="1792" d="M69 741h1q16 126 58.5 241.5t115 217t167.5 176t223.5 117.5t276.5 43q231 0 414 -105.5t294 -303.5q104 -187 104 -442v-188h-1125q1 -111 53.5 -192.5t136.5 -122.5t189.5 -57t213 -3t208 46.5t173.5 84.5v-377q-92 -55 -229.5 -92t-312.5 -38t-316 53 q-189 73 -311.5 249t-124.5 372q-3 242 111 412t325 268q-48 -60 -78 -125.5t-46 -159.5h635q8 77 -8 140t-47 101.5t-70.5 66.5t-80.5 41t-75 20.5t-56 8.5l-22 1q-135 -5 -259.5 -44.5t-223.5 -104.5t-176 -140.5t-138 -163.5z" /> -<glyph unicode="" horiz-adv-x="2304" d="M0 32v608h2304v-608q0 -66 -47 -113t-113 -47h-1984q-66 0 -113 47t-47 113zM640 256v-128h384v128h-384zM256 256v-128h256v128h-256zM2144 1408q66 0 113 -47t47 -113v-224h-2304v224q0 66 47 113t113 47h1984z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1549 857q55 0 85.5 -28.5t30.5 -83.5t-34 -82t-91 -27h-136v-177h-25v398h170zM1710 267l-4 -11l-5 -10q-113 -230 -330.5 -366t-474.5 -136q-182 0 -348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71q244 0 454.5 -124t329.5 -338l2 -4l8 -16 q-30 -15 -136.5 -68.5t-163.5 -84.5q-6 -3 -479 -268q384 -183 799 -366zM896 -234q250 0 462.5 132.5t322.5 357.5l-287 129q-72 -140 -206 -222t-292 -82q-151 0 -280 75t-204 204t-75 280t75 280t204 204t280 75t280 -73.5t204 -204.5l280 143q-116 208 -321 329 t-443 121q-119 0 -232.5 -31.5t-209 -87.5t-176.5 -137t-137 -176.5t-87.5 -209t-31.5 -232.5t31.5 -232.5t87.5 -209t137 -176.5t176.5 -137t209 -87.5t232.5 -31.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1427 827l-614 386l92 151h855zM405 562l-184 116v858l1183 -743zM1424 697l147 -95v-858l-532 335zM1387 718l-500 -802h-855l356 571z" /> -<glyph unicode="" horiz-adv-x="1792" d="M640 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1152 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1664 496v-752h-640v320q0 80 -56 136t-136 56t-136 -56t-56 -136v-320h-640v752q0 16 16 16h96 q16 0 16 -16v-112h128v624q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 6 2.5 9.5t8.5 5t9.5 2t11.5 0t9 -0.5v391q-32 15 -32 50q0 23 16.5 39t38.5 16t38.5 -16t16.5 -39q0 -35 -32 -50v-17q45 10 83 10q21 0 59.5 -7.5t54.5 -7.5 q17 0 47 7.5t37 7.5q16 0 16 -16v-210q0 -15 -35 -21.5t-62 -6.5q-18 0 -54.5 7.5t-55.5 7.5q-40 0 -90 -12v-133q1 0 9 0.5t11.5 0t9.5 -2t8.5 -5t2.5 -9.5v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-624h128v112q0 16 16 16h96 q16 0 16 -16z" /> -<glyph unicode="" horiz-adv-x="2304" d="M2288 731q16 -8 16 -27t-16 -27l-320 -192q-8 -5 -16 -5q-9 0 -16 4q-16 10 -16 28v128h-858q37 -58 83 -165q16 -37 24.5 -55t24 -49t27 -47t27 -34t31.5 -26t33 -8h96v96q0 14 9 23t23 9h320q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v96h-96 q-32 0 -61 10t-51 23.5t-45 40.5t-37 46t-33.5 57t-28.5 57.5t-28 60.5q-23 53 -37 81.5t-36 65t-44.5 53.5t-46.5 17h-360q-22 -84 -91 -138t-157 -54q-106 0 -181 75t-75 181t75 181t181 75q88 0 157 -54t91 -138h104q24 0 46.5 17t44.5 53.5t36 65t37 81.5q19 41 28 60.5 t28.5 57.5t33.5 57t37 46t45 40.5t51 23.5t61 10h107q21 57 70 92.5t111 35.5q80 0 136 -56t56 -136t-56 -136t-136 -56q-62 0 -111 35.5t-70 92.5h-107q-17 0 -33 -8t-31.5 -26t-27 -34t-27 -47t-24 -49t-24.5 -55q-46 -107 -83 -165h1114v128q0 18 16 28t32 -1z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1150 774q0 -56 -39.5 -95t-95.5 -39h-253v269h253q56 0 95.5 -39.5t39.5 -95.5zM1329 774q0 130 -91.5 222t-222.5 92h-433v-896h180v269h253q130 0 222 91.5t92 221.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348 t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1645 438q0 59 -34 106.5t-87 68.5q-7 -45 -23 -92q-7 -24 -27.5 -38t-44.5 -14q-12 0 -24 3q-31 10 -45 38.5t-4 58.5q23 71 23 143q0 123 -61 227.5t-166 165.5t-228 61q-134 0 -247 -73t-167 -194q108 -28 188 -106q22 -23 22 -55t-22 -54t-54 -22t-55 22 q-75 75 -180 75q-106 0 -181 -74.5t-75 -180.5t75 -180.5t181 -74.5h1046q79 0 134.5 55.5t55.5 133.5zM1798 438q0 -142 -100.5 -242t-242.5 -100h-1046q-169 0 -289 119.5t-120 288.5q0 153 100 267t249 136q62 184 221 298t354 114q235 0 408.5 -158.5t196.5 -389.5 q116 -25 192.5 -118.5t76.5 -214.5zM2048 438q0 -175 -97 -319q-23 -33 -64 -33q-24 0 -43 13q-26 17 -32 48.5t12 57.5q71 104 71 233t-71 233q-18 26 -12 57t32 49t57.5 11.5t49.5 -32.5q97 -142 97 -318zM2304 438q0 -244 -134 -443q-23 -34 -64 -34q-23 0 -42 13 q-26 18 -32.5 49t11.5 57q108 164 108 358q0 195 -108 357q-18 26 -11.5 57.5t32.5 48.5q26 18 57 12t49 -33q134 -198 134 -442z" /> -<glyph unicode="" d="M1500 -13q0 -89 -63 -152.5t-153 -63.5t-153.5 63.5t-63.5 152.5q0 90 63.5 153.5t153.5 63.5t153 -63.5t63 -153.5zM1267 268q-115 -15 -192.5 -102.5t-77.5 -205.5q0 -74 33 -138q-146 -78 -379 -78q-109 0 -201 21t-153.5 54.5t-110.5 76.5t-76 85t-44.5 83 t-23.5 66.5t-6 39.5q0 19 4.5 42.5t18.5 56t36.5 58t64 43.5t94.5 18t94 -17.5t63 -41t35.5 -53t17.5 -49t4 -33.5q0 -34 -23 -81q28 -27 82 -42t93 -17l40 -1q115 0 190 51t75 133q0 26 -9 48.5t-31.5 44.5t-49.5 41t-74 44t-93.5 47.5t-119.5 56.5q-28 13 -43 20 q-116 55 -187 100t-122.5 102t-72 125.5t-20.5 162.5q0 78 20.5 150t66 137.5t112.5 114t166.5 77t221.5 28.5q120 0 220 -26t164.5 -67t109.5 -94t64 -105.5t19 -103.5q0 -46 -15 -82.5t-36.5 -58t-48.5 -36t-49 -19.5t-39 -5h-8h-32t-39 5t-44 14t-41 28t-37 46t-24 70.5 t-10 97.5q-15 16 -59 25.5t-81 10.5l-37 1q-68 0 -117.5 -31t-70.5 -70t-21 -76q0 -24 5 -43t24 -46t53 -51t97 -53.5t150 -58.5q76 -25 138.5 -53.5t109 -55.5t83 -59t60.5 -59.5t41 -62.5t26.5 -62t14.5 -63.5t6 -62t1 -62.5z" /> -<glyph unicode="" d="M704 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1152 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103 t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 t73 -273t198 -198t273 -73zM864 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192z" /> -<glyph unicode="" d="M1088 352v576q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" /> -<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 t73 -273t198 -198t273 -73zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h576q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-576z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1757 128l35 -313q3 -28 -16 -50q-19 -21 -48 -21h-1664q-29 0 -48 21q-19 22 -16 50l35 313h1722zM1664 967l86 -775h-1708l86 775q3 24 21 40.5t43 16.5h256v-128q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5v128h384v-128q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5v128h256q25 0 43 -16.5t21 -40.5zM1280 1152v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" /> -<glyph unicode="" horiz-adv-x="2048" d="M1920 768q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-15l-115 -662q-8 -46 -44 -76t-82 -30h-1280q-46 0 -82 30t-44 76l-115 662h-15q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5h1792zM485 -32q26 2 43.5 22.5t15.5 46.5l-32 416q-2 26 -22.5 43.5 t-46.5 15.5t-43.5 -22.5t-15.5 -46.5l32 -416q2 -25 20.5 -42t43.5 -17h5zM896 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1280 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1632 27l32 416 q2 26 -15.5 46.5t-43.5 22.5t-46.5 -15.5t-22.5 -43.5l-32 -416q-2 -26 15.5 -46.5t43.5 -22.5h5q25 0 43.5 17t20.5 42zM476 1244l-93 -412h-132l101 441q19 88 89 143.5t160 55.5h167q0 26 19 45t45 19h384q26 0 45 -19t19 -45h167q90 0 160 -55.5t89 -143.5l101 -441 h-132l-93 412q-11 44 -45.5 72t-79.5 28h-167q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45h-167q-45 0 -79.5 -28t-45.5 -72z" /> -<glyph unicode="" horiz-adv-x="1792" d="M991 512l64 256h-254l-64 -256h254zM1759 1016l-56 -224q-7 -24 -31 -24h-327l-64 -256h311q15 0 25 -12q10 -14 6 -28l-56 -224q-5 -24 -31 -24h-327l-81 -328q-7 -24 -31 -24h-224q-16 0 -26 12q-9 12 -6 28l78 312h-254l-81 -328q-7 -24 -31 -24h-225q-15 0 -25 12 q-9 12 -6 28l78 312h-311q-15 0 -25 12q-9 12 -6 28l56 224q7 24 31 24h327l64 256h-311q-15 0 -25 12q-10 14 -6 28l56 224q5 24 31 24h327l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h254l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h311 q15 0 25 -12q9 -12 6 -28z" /> -<glyph unicode="" d="M841 483l148 -148l-149 -149zM840 1094l149 -149l-148 -148zM710 -130l464 464l-306 306l306 306l-464 464v-611l-255 255l-93 -93l320 -321l-320 -321l93 -93l255 255v-611zM1429 640q0 -209 -32 -365.5t-87.5 -257t-140.5 -162.5t-181.5 -86.5t-219.5 -24.5 t-219.5 24.5t-181.5 86.5t-140.5 162.5t-87.5 257t-32 365.5t32 365.5t87.5 257t140.5 162.5t181.5 86.5t219.5 24.5t219.5 -24.5t181.5 -86.5t140.5 -162.5t87.5 -257t32 -365.5z" /> -<glyph unicode="" horiz-adv-x="1024" d="M596 113l173 172l-173 172v-344zM596 823l173 172l-173 172v-344zM628 640l356 -356l-539 -540v711l-297 -296l-108 108l372 373l-372 373l108 108l297 -296v711l539 -540z" /> -<glyph unicode="" d="M1280 256q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM512 1024q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5 t112.5 -271.5zM1440 1344q0 -20 -13 -38l-1056 -1408q-19 -26 -51 -26h-160q-26 0 -45 19t-19 45q0 20 13 38l1056 1408q19 26 51 26h160q26 0 45 -19t19 -45zM768 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M104 830l792 -1015l-868 630q-18 13 -25 34.5t0 42.5l101 308v0zM566 830h660l-330 -1015v0zM368 1442l198 -612h-462l198 612q8 23 33 23t33 -23zM1688 830l101 -308q7 -21 0 -42.5t-25 -34.5l-868 -630l792 1015v0zM1688 830h-462l198 612q8 23 33 23t33 -23z" /> -<glyph unicode="" horiz-adv-x="1792" d="M384 704h160v224h-160v-224zM1221 372v92q-104 -36 -243 -38q-135 -1 -259.5 46.5t-220.5 122.5l1 -96q88 -80 212 -128.5t272 -47.5q129 0 238 49zM640 704h640v224h-640v-224zM1792 736q0 -187 -99 -352q89 -102 89 -229q0 -157 -129.5 -268t-313.5 -111 q-122 0 -225 52.5t-161 140.5q-19 -1 -57 -1t-57 1q-58 -88 -161 -140.5t-225 -52.5q-184 0 -313.5 111t-129.5 268q0 127 89 229q-99 165 -99 352q0 209 120 385.5t326.5 279.5t449.5 103t449.5 -103t326.5 -279.5t120 -385.5z" /> -<glyph unicode="" d="M515 625v-128h-252v128h252zM515 880v-127h-252v127h252zM1273 369v-128h-341v128h341zM1273 625v-128h-672v128h672zM1273 880v-127h-672v127h672zM1408 20v1240q0 8 -6 14t-14 6h-32l-378 -256l-210 171l-210 -171l-378 256h-32q-8 0 -14 -6t-6 -14v-1240q0 -8 6 -14 t14 -6h1240q8 0 14 6t6 14zM553 1130l185 150h-406zM983 1130l221 150h-406zM1536 1260v-1240q0 -62 -43 -105t-105 -43h-1240q-62 0 -105 43t-43 105v1240q0 62 43 105t105 43h1240q62 0 105 -43t43 -105z" /> -<glyph unicode="" horiz-adv-x="1792" d="M896 720q-104 196 -160 278q-139 202 -347 318q-34 19 -70 36q-89 40 -94 32t34 -38l39 -31q62 -43 112.5 -93.5t94.5 -116.5t70.5 -113t70.5 -131q9 -17 13 -25q44 -84 84 -153t98 -154t115.5 -150t131 -123.5t148.5 -90.5q153 -66 154 -60q1 3 -49 37q-53 36 -81 57 q-77 58 -179 211t-185 310zM549 177q-76 60 -132.5 125t-98 143.5t-71 154.5t-58.5 186t-52 209t-60.5 252t-76.5 289q273 0 497.5 -36t379 -92t271 -144.5t185.5 -172.5t110 -198.5t56 -199.5t12.5 -198.5t-9.5 -173t-20 -143.5t-13 -107l323 -327h-104l-281 285 q-22 -2 -91.5 -14t-121.5 -19t-138 -6t-160.5 17t-167.5 59t-179 111z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1374 879q-6 26 -28.5 39.5t-48.5 7.5q-261 -62 -401 -62t-401 62q-26 6 -48.5 -7.5t-28.5 -39.5t7.5 -48.5t39.5 -28.5q194 -46 303 -58q-2 -158 -15.5 -269t-26.5 -155.5t-41 -115.5l-9 -21q-10 -25 1 -49t36 -34q9 -4 23 -4q44 0 60 41l8 20q54 139 71 259h42 q17 -120 71 -259l8 -20q16 -41 60 -41q14 0 23 4q25 10 36 34t1 49l-9 21q-28 71 -41 115.5t-26.5 155.5t-15.5 269q109 12 303 58q26 6 39.5 28.5t7.5 48.5zM1024 1024q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1600 640q0 -143 -55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5zM896 1408q-156 0 -298 -61t-245 -164t-164 -245t-61 -298t61 -298 t164 -245t245 -164t298 -61t298 61t245 164t164 245t61 298t-61 298t-164 245t-245 164t-298 61zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> -<glyph unicode="" d="M1438 723q34 -35 29 -82l-44 -551q-4 -42 -34.5 -70t-71.5 -28q-6 0 -9 1q-44 3 -72.5 36.5t-25.5 77.5l35 429l-143 -8q55 -113 55 -240q0 -216 -148 -372l-137 137q91 101 91 235q0 145 -102.5 248t-247.5 103q-134 0 -236 -92l-137 138q120 114 284 141l264 300 l-149 87l-181 -161q-33 -30 -77 -27.5t-73 35.5t-26.5 77t34.5 73l239 213q26 23 60 26.5t64 -14.5l488 -283q36 -21 48 -68q17 -67 -26 -117l-205 -232l371 20q49 3 83 -32zM1240 1180q-74 0 -126 52t-52 126t52 126t126 52t126.5 -52t52.5 -126t-52.5 -126t-126.5 -52z M613 -62q106 0 196 61l139 -139q-146 -116 -335 -116q-148 0 -273.5 73t-198.5 198t-73 273q0 188 116 336l139 -139q-60 -88 -60 -197q0 -145 102.5 -247.5t247.5 -102.5z" /> -<glyph unicode="" d="M880 336v-160q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h160q14 0 23 -9t9 -23zM1136 832q0 -50 -15 -90t-45.5 -69t-52 -44t-59.5 -36q-32 -18 -46.5 -28t-26 -24t-11.5 -29v-32q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v68q0 35 10.5 64.5 t24 47.5t39 35.5t41 25.5t44.5 21q53 25 75 43t22 49q0 42 -43.5 71.5t-95.5 29.5q-56 0 -95 -27q-29 -20 -80 -83q-9 -12 -25 -12q-11 0 -19 6l-108 82q-10 7 -12 20t5 23q122 192 349 192q129 0 238.5 -89.5t109.5 -214.5zM768 1280q-130 0 -248.5 -51t-204 -136.5 t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5 t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M366 1225q-64 0 -110 45.5t-46 110.5q0 64 46 109.5t110 45.5t109.5 -45.5t45.5 -109.5q0 -65 -45.5 -110.5t-109.5 -45.5zM917 583q0 -50 -30 -67.5t-63.5 -6.5t-47.5 34l-367 438q-7 12 -14 15.5t-11 1.5l-3 -3q-7 -8 4 -21l122 -139l1 -354l-161 -457 q-67 -192 -92 -234q-16 -26 -28 -32q-50 -26 -103 -1q-29 13 -41.5 43t-9.5 57q2 17 197 618l5 416l-85 -164l35 -222q4 -24 -1 -42t-14 -27.5t-19 -16t-17 -7.5l-7 -2q-19 -3 -34.5 3t-24 16t-14 22t-7.5 19.5t-2 9.5l-46 299l211 381q23 34 113 34q75 0 107 -40l424 -521 q7 -5 14 -17l3 -3l-1 -1q7 -13 7 -29zM514 433q43 -113 88.5 -225t69.5 -168l24 -55q36 -93 42 -125q11 -70 -36 -97q-35 -22 -66 -16t-51 22t-29 35h-1q-6 16 -8 25l-124 351zM1338 -159q31 -49 31 -57q0 -5 -3 -7q-9 -5 -14.5 0.5t-15.5 26t-16 30.5q-114 172 -423 661 q3 -1 7 1t7 4l3 2q11 9 11 17z" /> -<glyph unicode="" horiz-adv-x="2304" d="M504 542h171l-1 265zM1530 641q0 87 -50.5 140t-146.5 53h-54v-388h52q91 0 145 57t54 138zM956 1018l1 -756q0 -14 -9.5 -24t-23.5 -10h-216q-14 0 -23.5 10t-9.5 24v62h-291l-55 -81q-10 -15 -28 -15h-267q-21 0 -30.5 18t3.5 35l556 757q9 14 27 14h332q14 0 24 -10 t10 -24zM1783 641q0 -193 -125.5 -303t-324.5 -110h-270q-14 0 -24 10t-10 24v756q0 14 10 24t24 10h268q200 0 326 -109t126 -302zM1939 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5 t-7.5 60t-20 91.5t-41 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2123 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-45 -108t-74 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5 h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2304 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66 104.5t41 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96 t9.5 -70.5z" /> -<glyph unicode="" horiz-adv-x="1408" d="M617 -153q0 11 -13 58t-31 107t-20 69q-1 4 -5 26.5t-8.5 36t-13.5 21.5q-15 14 -51 14q-23 0 -70 -5.5t-71 -5.5q-34 0 -47 11q-6 5 -11 15.5t-7.5 20t-6.5 24t-5 18.5q-37 128 -37 255t37 255q1 4 5 18.5t6.5 24t7.5 20t11 15.5q13 11 47 11q24 0 71 -5.5t70 -5.5 q36 0 51 14q9 8 13.5 21.5t8.5 36t5 26.5q2 9 20 69t31 107t13 58q0 22 -43.5 52.5t-75.5 42.5q-20 8 -45 8q-34 0 -98 -18q-57 -17 -96.5 -40.5t-71 -66t-46 -70t-45.5 -94.5q-6 -12 -9 -19q-49 -107 -68 -216t-19 -244t19 -244t68 -216q56 -122 83 -161q63 -91 179 -127 l6 -2q64 -18 98 -18q25 0 45 8q32 12 75.5 42.5t43.5 52.5zM776 760q-26 0 -45 19t-19 45.5t19 45.5q37 37 37 90q0 52 -37 91q-19 19 -19 45t19 45t45 19t45 -19q75 -75 75 -181t-75 -181q-21 -19 -45 -19zM957 579q-27 0 -45 19q-19 19 -19 45t19 45q112 114 112 272 t-112 272q-19 19 -19 45t19 45t45 19t45 -19q150 -150 150 -362t-150 -362q-18 -19 -45 -19zM1138 398q-27 0 -45 19q-19 19 -19 45t19 45q90 91 138.5 208t48.5 245t-48.5 245t-138.5 208q-19 19 -19 45t19 45t45 19t45 -19q109 -109 167 -249t58 -294t-58 -294t-167 -249 q-18 -19 -45 -19z" /> -<glyph unicode="" horiz-adv-x="2176" d="M192 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 352 q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 864 q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 1376q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 192q0 -80 -56 -136 t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 1216q0 -80 -56 -136t-136 -56 t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 192q0 -80 -56 -136t-136 -56t-136 56 t-56 136t56 136t136 56t136 -56t56 -136zM1664 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136 t56 136t136 56t136 -56t56 -136zM2176 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136z" /> -<glyph unicode="" horiz-adv-x="1792" d="M128 -192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM320 0q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM365 365l256 -256l-90 -90l-256 256zM704 384q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45z M1411 704q0 -59 -11.5 -108.5t-37.5 -93.5t-44 -67.5t-53 -64.5q-31 -35 -45.5 -54t-33.5 -50t-26.5 -64t-7.5 -74q0 -159 -112.5 -271.5t-271.5 -112.5q-26 0 -45 19t-19 45t19 45t45 19q106 0 181 75t75 181q0 57 11.5 105.5t37 91t43.5 66.5t52 63q40 46 59.5 72 t37.5 74.5t18 103.5q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM896 576q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45 t45 19t45 -19t19 -45zM1184 704q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 93 -65.5 158.5t-158.5 65.5q-92 0 -158 -65.5t-66 -158.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 146 103 249t249 103t249 -103t103 -249zM1578 993q10 -25 -1 -49t-36 -34q-9 -4 -23 -4 q-19 0 -35.5 11t-23.5 30q-68 178 -224 295q-21 16 -25 42t12 47q17 21 43 25t47 -12q183 -137 266 -351zM1788 1074q9 -25 -1.5 -49t-35.5 -34q-11 -4 -23 -4q-44 0 -60 41q-92 238 -297 393q-22 16 -25.5 42t12.5 47q16 22 42 25.5t47 -12.5q235 -175 341 -449z" /> -<glyph unicode="" horiz-adv-x="2304" d="M1032 576q-59 2 -84 55q-17 34 -48 53.5t-68 19.5q-53 0 -90.5 -37.5t-37.5 -90.5q0 -56 36 -89l10 -8q34 -31 82 -31q37 0 68 19.5t48 53.5q25 53 84 55zM1600 704q0 56 -36 89l-10 8q-34 31 -82 31q-37 0 -68 -19.5t-48 -53.5q-25 -53 -84 -55q59 -2 84 -55 q17 -34 48 -53.5t68 -19.5q53 0 90.5 37.5t37.5 90.5zM1174 925q-17 -35 -55 -48t-73 4q-62 31 -134 31q-51 0 -99 -17q3 0 9.5 0.5t9.5 0.5q92 0 170.5 -50t118.5 -133q17 -36 3.5 -73.5t-49.5 -54.5q-18 -9 -39 -9q21 0 39 -9q36 -17 49.5 -54.5t-3.5 -73.5 q-40 -83 -118.5 -133t-170.5 -50h-6q-16 2 -44 4l-290 27l-239 -120q-14 -7 -29 -7q-40 0 -57 35l-160 320q-11 23 -4 47.5t29 37.5l209 119l148 267q17 155 91.5 291.5t195.5 236.5q31 25 70.5 21.5t64.5 -34.5t21.5 -70t-34.5 -65q-70 -59 -117 -128q123 84 267 101 q40 5 71.5 -19t35.5 -64q5 -40 -19 -71.5t-64 -35.5q-84 -10 -159 -55q46 10 99 10q115 0 218 -50q36 -18 49 -55.5t-5 -73.5zM2137 1085l160 -320q11 -23 4 -47.5t-29 -37.5l-209 -119l-148 -267q-17 -155 -91.5 -291.5t-195.5 -236.5q-26 -22 -61 -22q-45 0 -74 35 q-25 31 -21.5 70t34.5 65q70 59 117 128q-123 -84 -267 -101q-4 -1 -12 -1q-36 0 -63.5 24t-31.5 60q-5 40 19 71.5t64 35.5q84 10 159 55q-46 -10 -99 -10q-115 0 -218 50q-36 18 -49 55.5t5 73.5q17 35 55 48t73 -4q62 -31 134 -31q51 0 99 17q-3 0 -9.5 -0.5t-9.5 -0.5 q-92 0 -170.5 50t-118.5 133q-17 36 -3.5 73.5t49.5 54.5q18 9 39 9q-21 0 -39 9q-36 17 -49.5 54.5t3.5 73.5q40 83 118.5 133t170.5 50h6h1q14 -2 42 -4l291 -27l239 120q14 7 29 7q40 0 57 -35z" /> -<glyph unicode="" horiz-adv-x="1792" d="M1056 704q0 -26 19 -45t45 -19t45 19t19 45q0 146 -103 249t-249 103t-249 -103t-103 -249q0 -26 19 -45t45 -19t45 19t19 45q0 93 66 158.5t158 65.5t158 -65.5t66 -158.5zM835 1280q-117 0 -223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5q0 -26 19 -45t45 -19t45 19 t19 45q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -55 -18 -103.5t-37.5 -74.5t-59.5 -72q-34 -39 -52 -63t-43.5 -66.5t-37 -91t-11.5 -105.5q0 -106 -75 -181t-181 -75q-26 0 -45 -19t-19 -45t19 -45t45 -19q159 0 271.5 112.5t112.5 271.5q0 41 7.5 74 t26.5 64t33.5 50t45.5 54q35 41 53 64.5t44 67.5t37.5 93.5t11.5 108.5q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5zM591 561l226 -226l-579 -579q-12 -12 -29 -12t-29 12l-168 168q-12 12 -12 29t12 29zM1612 1524l168 -168q12 -12 12 -29t-12 -30l-233 -233 l-26 -25l-71 -71q-66 153 -195 258l91 91l207 207q13 12 30 12t29 -12z" /> -<glyph unicode="" d="M866 1021q0 -27 -13 -94q-11 -50 -31.5 -150t-30.5 -150q-2 -11 -4.5 -12.5t-13.5 -2.5q-20 -2 -31 -2q-58 0 -84 49.5t-26 113.5q0 88 35 174t103 124q28 14 51 14q28 0 36.5 -16.5t8.5 -47.5zM1352 597q0 14 -39 75.5t-52 66.5q-21 8 -34 8q-91 0 -226 -77l-2 2 q3 22 27.5 135t24.5 178q0 233 -242 233q-24 0 -68 -6q-94 -17 -168.5 -89.5t-111.5 -166.5t-37 -189q0 -146 80.5 -225t227.5 -79q25 0 25 -3t-1 -5q-4 -34 -26 -117q-14 -52 -51.5 -101t-82.5 -49q-42 0 -42 47q0 24 10.5 47.5t25 39.5t29.5 28.5t26 20t11 8.5q0 3 -7 10 q-24 22 -58.5 36.5t-65.5 14.5q-35 0 -63.5 -34t-41 -75t-12.5 -75q0 -88 51.5 -142t138.5 -54q82 0 155 53t117.5 126t65.5 153q6 22 15.5 66.5t14.5 66.5q3 12 14 18q118 60 227 60q48 0 127 -18q1 -1 4 -1q5 0 9.5 4.5t4.5 8.5zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="1535" d="M744 1231q0 24 -2 38.5t-8.5 30t-21 23t-37.5 7.5q-39 0 -78 -23q-105 -58 -159 -190.5t-54 -269.5q0 -44 8.5 -85.5t26.5 -80.5t52.5 -62.5t81.5 -23.5q4 0 18 -0.5t20 0t16 3t15 8.5t7 16q16 77 48 231.5t48 231.5q19 91 19 146zM1498 575q0 -7 -7.5 -13.5t-15.5 -6.5 l-6 1q-22 3 -62 11t-72 12.5t-63 4.5q-167 0 -351 -93q-15 -8 -21 -27q-10 -36 -24.5 -105.5t-22.5 -100.5q-23 -91 -70 -179.5t-112.5 -164.5t-154.5 -123t-185 -47q-135 0 -214.5 83.5t-79.5 219.5q0 53 19.5 117t63 116.5t97.5 52.5q38 0 120 -33.5t83 -61.5 q0 -1 -16.5 -12.5t-39.5 -31t-46 -44.5t-39 -61t-16 -74q0 -33 16.5 -53t48.5 -20q45 0 85 31.5t66.5 78t48 105.5t32.5 107t16 90v9q0 2 -3.5 3.5t-8.5 1.5h-10t-10 -0.5t-6 -0.5q-227 0 -352 122.5t-125 348.5q0 108 34.5 221t96 210t156 167.5t204.5 89.5q52 9 106 9 q374 0 374 -360q0 -98 -38 -273t-43 -211l3 -3q101 57 182.5 88t167.5 31q22 0 53 -13q19 -7 80 -102.5t61 -116.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M831 863q32 0 59 -18l222 -148q61 -40 110 -97l146 -170q40 -46 29 -106l-72 -413q-6 -32 -29.5 -53.5t-55.5 -25.5l-527 -56l-352 -32h-9q-39 0 -67.5 28t-28.5 68q0 37 27 64t65 32l260 32h-448q-41 0 -69.5 30t-26.5 71q2 39 32 65t69 26l442 1l-521 64q-41 5 -66 37 t-19 73q6 35 34.5 57.5t65.5 22.5h10l481 -60l-351 94q-38 10 -62 41.5t-18 68.5q6 36 33 58.5t62 22.5q6 0 20 -2l448 -96l217 -37q1 0 3 -0.5t3 -0.5q23 0 30.5 23t-12.5 36l-186 125q-35 23 -42 63.5t18 73.5q27 38 76 38zM761 661l186 -125l-218 37l-5 2l-36 38 l-238 262q-1 1 -2.5 3.5t-2.5 3.5q-24 31 -18.5 70t37.5 64q31 23 68 17.5t64 -33.5l142 -147l-4 -4t-5 -4q-32 -45 -23 -99t55 -85zM1648 1115l15 -266q4 -73 -11 -147l-48 -219q-12 -59 -67 -87l-106 -54q2 62 -39 109l-146 170q-53 61 -117 103l-222 148q-34 23 -76 23 q-51 0 -88 -37l-235 312q-25 33 -18 73.5t41 63.5q33 22 71.5 14t62.5 -40l266 -352l-262 455q-21 35 -10.5 75t47.5 59q35 18 72.5 6t57.5 -46l241 -420l-136 337q-15 35 -4.5 74t44.5 56q37 19 76 6t56 -51l193 -415l101 -196q8 -15 23 -17.5t27 7.5t11 26l-12 224 q-2 41 26 71t69 31q39 0 67 -28.5t30 -67.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M335 180q-2 0 -6 2q-86 57 -168.5 145t-139.5 180q-21 30 -21 69q0 9 2 19t4 18t7 18t8.5 16t10.5 17t10 15t12 15.5t11 14.5q184 251 452 365q-110 198 -110 211q0 19 17 29q116 64 128 64q18 0 28 -16l124 -229q92 19 192 19q266 0 497.5 -137.5t378.5 -369.5 q20 -31 20 -69t-20 -69q-91 -142 -218.5 -253.5t-278.5 -175.5q110 -198 110 -211q0 -20 -17 -29q-116 -64 -127 -64q-19 0 -29 16l-124 229l-64 119l-444 820l7 7q-58 -24 -99 -47q3 -5 127 -234t243 -449t119 -223q0 -7 -9 -9q-13 -3 -72 -3q-57 0 -60 7l-456 841 q-39 -28 -82 -68q24 -43 214 -393.5t190 -354.5q0 -10 -11 -10q-14 0 -82.5 22t-72.5 28l-106 197l-224 413q-44 -53 -78 -106q2 -3 18 -25t23 -34l176 -327q0 -10 -10 -10zM1165 282l49 -91q273 111 450 385q-180 277 -459 389q67 -64 103 -148.5t36 -176.5 q0 -106 -47 -200.5t-132 -157.5zM848 896q0 -20 14 -34t34 -14q86 0 147 -61t61 -147q0 -20 14 -34t34 -14t34 14t14 34q0 126 -89 215t-215 89q-20 0 -34 -14t-14 -34zM1214 961l-9 4l7 -7z" /> -<glyph unicode="" horiz-adv-x="1280" d="M1050 430q0 -215 -147 -374q-148 -161 -378 -161q-232 0 -378 161q-147 159 -147 374q0 147 68 270.5t189 196.5t268 73q96 0 182 -31q-32 -62 -39 -126q-66 28 -143 28q-167 0 -280.5 -123t-113.5 -291q0 -170 112.5 -288.5t281.5 -118.5t281 118.5t112 288.5 q0 89 -32 166q66 13 123 49q41 -98 41 -212zM846 619q0 -192 -79.5 -345t-238.5 -253l-14 -1q-29 0 -62 5q83 32 146.5 102.5t99.5 154.5t58.5 189t30 192.5t7.5 178.5q0 69 -3 103q55 -160 55 -326zM791 947v-2q-73 214 -206 440q88 -59 142.5 -186.5t63.5 -251.5z M1035 744q-83 0 -160 75q218 120 290 247q19 37 21 56q-42 -94 -139.5 -166.5t-204.5 -97.5q-35 54 -35 113q0 37 17 79t43 68q46 44 157 74q59 16 106 58.5t74 100.5q74 -105 74 -253q0 -109 -24 -170q-32 -77 -88.5 -130.5t-130.5 -53.5z" /> -<glyph unicode="" d="M1050 495q0 78 -28 147q-41 -25 -85 -34q22 -50 22 -114q0 -117 -77 -198.5t-193 -81.5t-193.5 81.5t-77.5 198.5q0 115 78 199.5t193 84.5q53 0 98 -19q4 43 27 87q-60 21 -125 21q-154 0 -257.5 -108.5t-103.5 -263.5t103.5 -261t257.5 -106t257.5 106.5t103.5 260.5z M872 850q2 -24 2 -71q0 -63 -5 -123t-20.5 -132.5t-40.5 -130t-68.5 -106t-100.5 -70.5q21 -3 42 -3h10q219 139 219 411q0 116 -38 225zM872 850q-4 80 -44 171.5t-98 130.5q92 -156 142 -302zM1207 955q0 102 -51 174q-41 -86 -124 -109q-69 -19 -109 -53.5t-40 -99.5 q0 -40 24 -77q74 17 140.5 67t95.5 115q-4 -52 -74.5 -111.5t-138.5 -97.5q52 -52 110 -52q51 0 90 37t60 90q17 43 17 117zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" /> -<glyph unicode="" d="M1279 388q0 22 -22 27q-67 15 -118 59t-80 108q-7 19 -7 25q0 15 19.5 26t43 17t43 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-12 0 -32 -8t-31 -8q-4 0 -12 2q5 95 5 114q0 79 -17 114q-36 78 -103 121.5t-152 43.5q-199 0 -275 -165q-17 -35 -17 -114q0 -19 5 -114 q-4 -2 -14 -2q-12 0 -32 7.5t-30 7.5q-21 0 -38.5 -12t-17.5 -32q0 -21 19.5 -35.5t43 -20.5t43 -17t19.5 -26q0 -6 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -46 137 -68q2 -5 6 -26t11.5 -30.5t23.5 -9.5q12 0 37.5 4.5t39.5 4.5q35 0 67 -15t54 -32.5t57.5 -32.5 t76.5 -15q43 0 79 15t57.5 32.5t53.5 32.5t67 15q14 0 39.5 -4t38.5 -4q16 0 23 10t11 30t6 25q137 22 137 68zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" /> -<glyph unicode="" horiz-adv-x="1664" d="M848 1408q134 1 240.5 -68.5t163.5 -192.5q27 -58 27 -179q0 -47 -9 -191q14 -7 28 -7q18 0 51 13.5t51 13.5q29 0 56 -18t27 -46q0 -32 -31.5 -54t-69 -31.5t-69 -29t-31.5 -47.5q0 -15 12 -43q37 -82 102.5 -150t144.5 -101q28 -12 80 -23q28 -6 28 -35 q0 -70 -219 -103q-7 -11 -11 -39t-14 -46.5t-33 -18.5q-20 0 -62 6.5t-64 6.5q-37 0 -62 -5q-32 -5 -63 -22.5t-58 -38t-58 -40.5t-76 -33.5t-99 -13.5q-52 0 -96.5 13.5t-75 33.5t-57.5 40.5t-58 38t-62 22.5q-26 5 -63 5q-24 0 -65.5 -7.5t-58.5 -7.5q-25 0 -35 18.5 t-14 47.5t-11 40q-219 33 -219 103q0 29 28 35q52 11 80 23q78 32 144.5 101t102.5 150q12 28 12 43q0 28 -31.5 47.5t-69.5 29.5t-69.5 31.5t-31.5 52.5q0 27 26 45.5t55 18.5q15 0 48 -13t53 -13q18 0 32 7q-9 142 -9 190q0 122 27 180q64 137 172 198t264 63z" /> -<glyph unicode="" d="M1280 388q0 22 -22 27q-67 14 -118 58t-80 109q-7 14 -7 25q0 15 19.5 26t42.5 17t42.5 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-11 0 -31 -8t-32 -8q-4 0 -12 2q5 63 5 115q0 78 -17 114q-36 78 -102.5 121.5t-152.5 43.5q-198 0 -275 -165q-18 -38 -18 -115 q0 -38 6 -114q-10 -2 -15 -2q-11 0 -31.5 8t-30.5 8q-20 0 -37.5 -12.5t-17.5 -32.5q0 -21 19.5 -35.5t42.5 -20.5t42.5 -17t19.5 -26q0 -11 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -47 138 -69q2 -5 6 -26t11 -30.5t23 -9.5q13 0 38.5 5t38.5 5q35 0 67.5 -15 t54.5 -32.5t57.5 -32.5t76.5 -15q43 0 79 15t57.5 32.5t54 32.5t67.5 15q13 0 39 -4.5t39 -4.5q15 0 22.5 9.5t11.5 31t5 24.5q138 22 138 69zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5z" /> -<glyph unicode="" horiz-adv-x="2304" d="M2304 1536q-69 -46 -125 -92t-89 -81t-59.5 -71.5t-37.5 -57.5t-22 -44.5t-14 -29.5q-10 -18 -35.5 -136.5t-48.5 -164.5q-15 -29 -50 -60.5t-67.5 -50.5t-72.5 -41t-48 -28q-47 -31 -151 -231q-341 14 -630 -158q-92 -53 -303 -179q47 16 86 31t55 22l15 7 q71 27 163 64.5t133.5 53.5t108 34.5t142.5 31.5q186 31 465 -7q1 0 10 -3q11 -6 14 -17t-3 -22l-194 -345q-15 -29 -47 -22q-128 24 -354 24q-146 0 -402 -44.5t-392 -46.5q-82 -1 -149 13t-107 37t-61 40t-33 34l-1 1v2q0 6 6 6q138 0 371 55q192 366 374.5 524t383.5 158 q5 0 14.5 -0.5t38 -5t55 -12t61.5 -24.5t63 -39.5t54 -59t40 -82.5l102 177q2 4 21 42.5t44.5 86.5t61 109.5t84 133.5t100.5 137q66 82 128 141.5t121.5 96.5t92.5 53.5t88 39.5z" /> -<glyph unicode="" d="M1322 640q0 -45 -5 -76l-236 14l224 -78q-19 -73 -58 -141l-214 103l177 -158q-44 -61 -107 -108l-157 178l103 -215q-61 -37 -140 -59l-79 228l14 -240q-38 -6 -76 -6t-76 6l14 238l-78 -226q-74 19 -140 59l103 215l-157 -178q-59 43 -108 108l178 158l-214 -104 q-39 69 -58 141l224 79l-237 -14q-5 42 -5 76q0 35 5 77l238 -14l-225 79q19 73 58 140l214 -104l-177 159q46 61 107 108l158 -178l-103 215q67 39 140 58l77 -224l-13 236q36 6 75 6q38 0 76 -6l-14 -237l78 225q74 -19 140 -59l-103 -214l158 178q61 -47 107 -108 l-177 -159l213 104q37 -62 58 -141l-224 -78l237 14q5 -31 5 -77zM1352 640q0 160 -78.5 295.5t-213 214t-292.5 78.5q-119 0 -227 -46.5t-186.5 -125t-124.5 -187.5t-46 -229q0 -119 46 -228t124.5 -187.5t186.5 -125t227 -46.5q158 0 292.5 78.5t213 214t78.5 294.5z M1425 1023v-766l-657 -383l-657 383v766l657 383zM768 -183l708 412v823l-708 411l-708 -411v-823zM1536 1088v-896l-768 -448l-768 448v896l768 448z" /> -<glyph unicode="" horiz-adv-x="1664" d="M339 1318h691l-26 -72h-665q-110 0 -188.5 -79t-78.5 -189v-771q0 -95 60.5 -169.5t153.5 -93.5q23 -5 98 -5v-72h-45q-140 0 -239.5 100t-99.5 240v771q0 140 99.5 240t239.5 100zM1190 1536h247l-482 -1294q-23 -61 -40.5 -103.5t-45 -98t-54 -93.5t-64.5 -78.5 t-79.5 -65t-95.5 -41t-116 -18.5v195q163 26 220 182q20 52 20 105q0 54 -20 106l-285 733h228l187 -585zM1664 978v-1111h-795q37 55 45 73h678v1038q0 85 -49.5 155t-129.5 99l25 67q101 -34 163.5 -123.5t62.5 -197.5z" /> -<glyph unicode="" horiz-adv-x="1792" d="M852 1227q0 -29 -17 -52.5t-45 -23.5t-45 23.5t-17 52.5t17 52.5t45 23.5t45 -23.5t17 -52.5zM688 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50 -21.5t-20 -51.5v-114q0 -30 20.5 -52t49.5 -22q30 0 50.5 22t20.5 52zM860 -149v114q0 30 -20 51.5t-50 21.5t-50.5 -21.5 t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22q29 0 49.5 22t20.5 52zM1034 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1208 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114 q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1476 535q-84 -160 -232 -259.5t-323 -99.5q-123 0 -229.5 51.5t-178.5 137t-113 197.5t-41 232q0 88 21 174q-104 -175 -104 -390q0 -162 65 -312t185 -251q30 57 91 57q56 0 86 -50q32 50 87 50q56 0 86 -50q32 50 87 50t87 -50 q30 50 86 50q28 0 52.5 -15.5t37.5 -40.5q112 94 177 231.5t73 287.5zM1326 564q0 75 -72 75q-17 0 -47 -6q-95 -19 -149 -19q-226 0 -226 243q0 86 30 204q-83 -127 -83 -275q0 -150 89 -260.5t235 -110.5q111 0 210 70q13 48 13 79zM884 1223q0 50 -32 89.5t-81 39.5 t-81 -39.5t-32 -89.5q0 -51 31.5 -90.5t81.5 -39.5t81.5 39.5t31.5 90.5zM1513 884q0 96 -37.5 179t-113 137t-173.5 54q-77 0 -149 -35t-127 -94q-48 -159 -48 -268q0 -104 45.5 -157t147.5 -53q53 0 142 19q36 6 53 6q51 0 77.5 -28t26.5 -80q0 -26 -4 -46 q75 68 117.5 165.5t42.5 200.5zM1792 667q0 -111 -33.5 -249.5t-93.5 -204.5q-58 -64 -195 -142.5t-228 -104.5l-4 -1v-114q0 -43 -29.5 -75t-72.5 -32q-56 0 -86 50q-32 -50 -87 -50t-87 50q-30 -50 -86 -50q-55 0 -87 50q-30 -50 -86 -50q-47 0 -75 33.5t-28 81.5 q-90 -68 -198 -68q-118 0 -211 80q54 1 106 20q-113 31 -182 127q32 -7 71 -7q89 0 164 46q-192 192 -240 306q-24 56 -24 160q0 57 9 125.5t31.5 146.5t55 141t86.5 105t120 42q59 0 81 -52q19 29 42 54q2 3 12 13t13 16q10 15 23 38t25 42t28 39q87 111 211.5 177 t260.5 66q35 0 62 -4q59 64 146 64q83 0 140 -57q5 -5 5 -12q0 -5 -6 -13.5t-12.5 -16t-16 -17l-10.5 -10.5q17 -6 36 -18t19 -24q0 -6 -16 -25q157 -138 197 -378q25 30 60 30q45 0 100 -49q90 -80 90 -279z" /> -<glyph unicode="" d="M917 631q0 33 -6 64h-362v-132h217q-12 -76 -74.5 -120.5t-142.5 -44.5q-99 0 -169 71.5t-70 170.5t70 170.5t169 71.5q93 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585h109v110 h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> -<glyph unicode="" d="M1536 1024v-839q0 -48 -49 -62q-174 -52 -338 -52q-73 0 -215.5 29.5t-227.5 29.5q-164 0 -370 -48v-338h-160v1368q-63 25 -101 81t-38 124q0 91 64 155t155 64t155 -64t64 -155q0 -68 -38 -124t-101 -81v-68q190 44 343 44q99 0 198 -15q14 -2 111.5 -22.5t149.5 -20.5 q77 0 165 18q11 2 80 21t89 19q26 0 45 -19t19 -45z" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -<glyph unicode="" horiz-adv-x="1792" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.e6cf7c6e.woff2 b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.e6cf7c6e.woff2 deleted file mode 100644 index 7eb74fd1..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/fontawesome-webfont.e6cf7c6e.woff2 and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/lato-bold.55131026.ttf b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/lato-bold.55131026.ttf deleted file mode 100644 index f3151102..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/lato-bold.55131026.ttf and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/lato-regular.059514c9.ttf b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/lato-regular.059514c9.ttf deleted file mode 100644 index 75707f69..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/lato-regular.059514c9.ttf and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/loader-big.a770b679.gif b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/loader-big.a770b679.gif deleted file mode 100644 index 11066454..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/loader-big.a770b679.gif and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.12f0820c.woff b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.12f0820c.woff deleted file mode 100644 index 7c7cac8f..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.12f0820c.woff and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.792dcd18.svg b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.792dcd18.svg deleted file mode 100644 index 7ba4f3c5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.792dcd18.svg +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata>Copyright (C) 2017 by original authors @ fontello.com</metadata> -<defs> -<font id="rw-widgets" horiz-adv-x="1000" > -<font-face font-family="rw-widgets" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" /> -<missing-glyph horiz-adv-x="1000" /> -<glyph glyph-name="up-dir" unicode="" d="M571 171q0-14-10-25t-25-10h-500q-15 0-25 10t-11 25 11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26z" horiz-adv-x="571.4" /> - -<glyph glyph-name="search" unicode="" d="M643 386q0 103-73 176t-177 74-177-74-73-176 73-177 177-73 177 73 73 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 153-31 125-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" /> - -<glyph glyph-name="down-dir" unicode="" d="M571 457q0-14-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 11-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" /> - -<glyph glyph-name="calendar" unicode="" d="M71-79h161v161h-161v-161z m197 0h178v161h-178v-161z m-197 197h161v178h-161v-178z m197 0h178v178h-178v-178z m-197 214h161v161h-161v-161z m411-411h179v161h-179v-161z m-214 411h178v161h-178v-161z m428-411h161v161h-161v-161z m-214 197h179v178h-179v-178z m-196 482v161q0 7-6 12t-12 6h-36q-7 0-12-6t-6-12v-161q0-7 6-13t12-5h36q7 0 12 5t6 13z m410-482h161v178h-161v-178z m-214 214h179v161h-179v-161z m214 0h161v161h-161v-161z m18 268v161q0 7-5 12t-13 6h-35q-7 0-13-6t-5-12v-161q0-7 5-13t13-5h35q8 0 13 5t5 13z m215 36v-715q0-29-22-50t-50-21h-786q-29 0-50 21t-21 50v715q0 29 21 50t50 21h72v54q0 37 26 63t63 26h36q37 0 63-26t26-63v-54h214v54q0 37 27 63t63 26h35q37 0 64-26t26-63v-54h71q29 0 50-21t22-50z" horiz-adv-x="928.6" /> - -<glyph glyph-name="clock" unicode="" d="M500 546v-250q0-7-5-12t-13-5h-178q-8 0-13 5t-5 12v36q0 8 5 13t13 5h125v196q0 8 5 13t12 5h36q8 0 13-5t5-13z m232-196q0 83-41 152t-110 111-152 41-153-41-110-111-41-152 41-152 110-111 153-41 152 41 110 111 41 152z m125 0q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" /> - -<glyph glyph-name="angle-left" unicode="" d="M350 546q0-7-6-12l-219-220 219-219q6-6 6-13t-6-13l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="357.1" /> - -<glyph glyph-name="angle-right" unicode="" d="M332 314q0-7-5-12l-261-261q-5-5-12-5t-13 5l-28 28q-6 6-6 13t6 13l219 219-219 220q-6 5-6 12t6 13l28 28q5 6 13 6t12-6l261-260q5-5 5-13z" horiz-adv-x="357.1" /> -</font> -</defs> -</svg> \ No newline at end of file diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.bc7c4a59.eot b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.bc7c4a59.eot deleted file mode 100644 index b701b7fc..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.bc7c4a59.eot and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.eceddf47.ttf b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.eceddf47.ttf deleted file mode 100644 index 05cfba63..00000000 Binary files a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/public/static/media/rw-widgets.eceddf47.ttf and /dev/null differ diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server.rb deleted file mode 100644 index 586236a3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - ROUTES = %w(collections configuration data drafts pages static_files).freeze - include JekyllAdmin::PathHelper - include JekyllAdmin::FileHelper - - register Sinatra::Namespace - - configure :development do - register Sinatra::Reloader - enable :logging - end - - configure :development, :test do - require "sinatra/cross_origin" - register Sinatra::CrossOrigin - enable :cross_origin - disable :allow_credentials - set :allow_methods, [:delete, :get, :options, :post, :put] - end - - get "/" do - json ROUTES.map { |r| ["#{r}_api", URI.join(base_url, "/_api/", r)] }.to_h - end - - # CORS preflight - options "*" do - render_404 unless settings.development? || settings.test? - status 204 - end - - private - - def json(object, options = {}) - content_type :json - JSON.pretty_generate(object, options) - end - - def site - JekyllAdmin.site - end - - def render_404 - status 404 - content_type :json - halt - end - - def request_payload - @request_payload ||= if request_body.to_s.empty? - {} - else - JSON.parse(request_body) - end - end - - def base_url - "#{request.scheme}://#{request.host_with_port}" - end - - def front_matter - request_payload["front_matter"] - end - - def document_body - body = +"" - body << if front_matter && !front_matter.empty? - YAML.dump(restored_front_matter).strip - .gsub(": 'null'", ": null") # restore null values - else - "---" - end - body << "\n---\n\n" - body << request_payload["raw_content"].to_s - body << "\n" unless body.end_with?("\n") - body - end - alias_method :page_body, :document_body - - def request_body - @request_body ||= begin - rq_bdy = request.body - rq_bdy.rewind if rq_bdy.respond_to?(:rewind) - rq_bdy.read - end - end - - def namespace - namespace = request.path_info.split("/")[1].to_s.downcase - namespace if ROUTES.include?(namespace) - end - - # verbose 'null' values in front matter - def restored_front_matter - front_matter.map do |key, value| - value = "null" if value.nil? - [key, value] - end.to_h - end - end -end - -# load individual route configurations -JekyllAdmin::Server::ROUTES.each { |name| require_relative File.join("server", name) } - -# load namespaces outside route configurations -require_relative "server/site_meta" diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/collections.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/collections.rb deleted file mode 100644 index 27c9933c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/collections.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - namespace "/collections" do - get do - json(site.collections.map { |c| c[1].to_api }) - end - - get "/:collection_id" do - ensure_collection - json collection.to_api - end - - get "/:collection_id/*?/?:path.:ext" do - ensure_requested_file - json requested_file.to_api(:include_content => true) - end - - get "/:collection_id/entries/?*" do - ensure_directory - json entries.map(&:to_api) - end - - put "/:collection_id/*?/?:path.:ext" do - ensure_collection - - if new? - ensure_not_overwriting_existing_file - elsif renamed? - ensure_requested_file - ensure_not_overwriting_existing_file - delete_file_without_process path - end - - write_file write_path, document_body - json written_file.to_api(:include_content => true) - end - - delete "/:collection_id/*?/?:path.:ext" do - ensure_requested_file - delete_file path - content_type :json - status 200 - halt - end - - private - - def collection - collection = site.collections.find { |l, _c| l == params["collection_id"] } - collection[1] if collection - end - - def document_id - path = "#{params["splat"].first}/#{filename}" - path.gsub(%r!(\d{4})/(\d{2})/(\d{2})/(.*)!, '\1-\2-\3-\4') - end - - def directory_docs - collection.docs.find_all { |d| File.dirname(d.path) == directory_path } - end - - def ensure_collection - render_404 if collection.nil? - end - - def ensure_directory - ensure_collection - render_404 unless Dir.exist?(directory_path) - end - - def entries - collections_dir = site.config["collections_dir"] - collection_id, splats = params.values_at("collection_id", "splat") - args = { - :base => site.in_source_dir(collections_dir, "_#{collection_id}"), - :content_type => collection_id, - :splat => splats&.first, - } - # get the directories inside the requested directory - directory = JekyllAdmin::Directory.new(directory_path, **args) - directories = directory.directories - # merge directories with the documents at the same level - directories.concat(directory_docs.sort_by(&:date).reverse) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/configuration.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/configuration.rb deleted file mode 100644 index 004e2a39..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/configuration.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - namespace "/configuration" do - get do - json( - :content => parsed_configuration, - :raw_content => raw_configuration - ) - end - - put do - write_file(configuration_path, configuration_body) - json request_payload - end - - private - - def overrides - @overrides ||= { - "source" => sanitized_path("/"), - } - end - - # Computed configuration, with updates and defaults - # Returns an instance of Jekyll::Configuration - def configuration - @configuration ||= site.config.merge(overrides) - end - - # Configuration data, as read by Jekyll - def parsed_configuration - configuration.read_config_file(configuration_path) - end - - # Raw configuration content, as it sits on disk - def raw_configuration - File.read( - configuration_path, - **Jekyll::Utils.merged_file_read_opts(site, {}) - ) - end - - # Returns the path to the *first* config file discovered - def configuration_path - sanitized_path configuration.config_files(overrides).first - end - - # The user's uploaded configuration for updates - # Instead of extracting `raw_content` directly from the `request_payload`, - # assign the data to a new variable and then extract the `raw_content` - # from it to circumvent CORS violation in `development` mode. - def configuration_body - payload = request_payload - payload["raw_content"] - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/data.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/data.rb deleted file mode 100644 index f3b92cba..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/data.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - # supported extensions, in order of preference, for now, no .csv - EXTENSIONS = %w(yml json).freeze - - namespace "/data" do - get "/*?/?:path.:ext" do - ensure_requested_file - json requested_file.to_api(:include_content => true) - end - - get "/?*" do - ensure_directory - json entries.map(&:to_api) - end - - put "/*?/?:path.:ext" do - if renamed? - ensure_requested_file - delete_file_without_process path - end - - write_file write_path, data_file_body - json written_file.to_api(:include_content => true) - end - - delete "/*?/?:path.:ext" do - ensure_requested_file - delete_file path - content_type :json - status 200 - halt - end - - private - - # returns relative path of root level directories that contain data files - def directory_paths - DataFile.all.map { |p| File.dirname(p.relative_path).split("/")[0] }.uniq - end - - def directory_pages - DataFile.all.find_all do |p| - sanitized_path(File.dirname(p.path)) == directory_path - end - end - - def entries - args = { - :base => site.in_source_dir(DataFile.data_dir), - :content_type => "data", - :splat => splats.first, - } - # get all directories inside the requested directory - directory = JekyllAdmin::Directory.new(directory_path, **args) - directories = directory.directories - - # exclude root level directories which do not have data files - if splats.first.empty? - directories = directories.select do |d| - directory_paths.include? d.name.to_s - end - end - - # merge directories with the pages at the same level - directories.concat(directory_pages) - end - - def data_file_body - if !request_payload["raw_content"].to_s.empty? - request_payload["raw_content"] - elsif !request_payload["content"].to_s.empty? - YAML.dump(request_payload["content"]).sub(%r!\A---\n!, "") - end - end - - def splats - params["splat"] || ["/"] - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/drafts.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/drafts.rb deleted file mode 100644 index 047b8261..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/drafts.rb +++ /dev/null @@ -1,114 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - namespace "/drafts" do - get "/*?/?:path.:ext" do - ensure_requested_file - json requested_file.to_api(:include_content => true) - end - - get "/?*" do - ensure_directory - json entries.map(&:to_api) - end - - put "/*?/?:path.:ext" do - ensure_html_content - - if new? - ensure_not_overwriting_existing_file - elsif renamed? - ensure_requested_file - ensure_not_overwriting_existing_file - delete_file_without_process path - end - - write_file write_path, document_body - json written_file.to_api(:include_content => true) - end - - delete "/*?/?:path.:ext" do - ensure_requested_file - delete_file path - content_type :json - status 200 - halt - end - - private - - # return all documents in the 'posts' collection that output to an html - # file but reside in a separate directory, `<source_dir>/_drafts/` - def drafts - posts = site.collections.find { |l, _c| l == "posts" } - posts[1].docs.find_all { |d| d.output_ext == ".html" && d.draft? } if posts - end - - # return drafts at the same level as directory - def directory_drafts - drafts.find_all { |d| File.dirname(d.path) == directory_path } - end - - def reverse_sorted_drafts - directory_drafts.sort_by(&:date).reverse - end - - # returns directories at the root of `/_drafts/` that contain drafts - def relevant_directory_paths - drafts.map { |doc| relative_draft_path(doc).split("/")[0] }.uniq - end - - def relative_draft_path(document) - File.dirname(document.relative_path.sub("_drafts/", "")) - end - - def ensure_directory - ensure_drafts - render_404 unless Dir.exist?(directory_path) - end - - def ensure_drafts - render_404 if drafts.nil? - end - - def ensure_html_content - return if html_content? - - content_type :json - halt 422, json("error_message" => "Invalid file extension for drafts") - end - - def entries - args = { - :base => site.in_source_dir("_drafts"), - :content_type => "drafts", - :splat => params["splat"].first, - } - # get the directories inside the requested directory - directory = JekyllAdmin::Directory.new(directory_path, **args) - directories = directory.directories - - # exclude root level directories which do not have drafts - if params["splat"].first.empty? - directories = directories.select do |d| - relevant_directory_paths.include? d.name.to_s - end - end - # merge directories with the drafts at the same level - directories.concat(reverse_sorted_drafts) - end - - def html_content? - draft = Jekyll::PageWithoutAFile.new( - site, - site.source, - "_drafts", - request_payload["path"] || filename - ) - draft.data = request_payload["front_matter"] - draft.html? - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/pages.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/pages.rb deleted file mode 100644 index 1c173f31..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/pages.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - namespace "/pages" do - get "/*?/?:path.:ext" do - ensure_requested_file - json requested_file.to_api(:include_content => true) - end - - get "/?*" do - ensure_directory - json entries.map(&:to_api) - end - - put "/*?/?:path.:ext" do - ensure_html_content - - if new? - ensure_not_overwriting_existing_file - elsif renamed? - ensure_requested_file - ensure_not_overwriting_existing_file - delete_file_without_process path - end - - write_file write_path, page_body - json written_file.to_api(:include_content => true) - end - - delete "/*?/?:path.:ext" do - ensure_requested_file - delete_file path - content_type :json - status 200 - halt - end - - private - - def ensure_html_content - return if html_content? - - content_type :json - halt 422, json("error_message" => "Invalid file extension for pages") - end - - def html_content? - page = Jekyll::PageWithoutAFile.new( - site, - site.source, - "", - request_payload["path"] || filename - ) - page.data = request_payload["front_matter"] - page.html? - end - - def pages - site.pages.select { |p| html_page_at_source?(p) } - end - - # Test if a given page is *physically located* within the source directory and outputs - # to an HTML file. - # We don't want *virtual pages* that are generated via plugins. - def html_page_at_source?(page) - return false unless page.html? - - # If page is not an instance of a `Jekyll::Page` subclass, then it needs additional - # inspection. - # Can't use `is_a?(Jekyll::Page)` here because it returns true for subclass instances - return true if page.class == Jekyll::Page - - File.exist?(site.in_source_dir(page.relative_path)) - end - - def directory_pages - pages.find_all do |p| - sanitized_path(File.dirname(p.path)) == directory_path - end - end - - # returns relative path of root level directories that contain pages - def directory_paths - pages.map { |p| File.dirname(p.path).split("/")[0] }.uniq - end - - def entries - args = { - :base => site.source, - :content_type => "pages", - :splat => params["splat"].first, - } - # get all directories inside the requested directory - directory = JekyllAdmin::Directory.new(directory_path, **args) - directories = directory.directories - - # exclude root level directories which do not have pages - if params["splat"].first.empty? - directories = directories.select do |d| - directory_paths.include? d.name.to_s - end - end - # merge directories with the pages at the same level - directories.concat(directory_pages) - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/site_meta.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/site_meta.rb deleted file mode 100644 index 0fdd8b7b..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/site_meta.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - # Jekyll::Site instance method names that return a Hash. - META_KEYS = [:categories, :layouts, :tags].freeze - private_constant :META_KEYS - - namespace "/site_meta" do - get "/?" do - json site_meta - end - - private - - # Stash a Hash generated with pre-determined keys. - def site_meta - @site_meta ||= META_KEYS.zip(META_KEYS.map { |k| site.send(k).keys }).to_h - end - - # Reset memoization of `#site_meta` when the site regenerates - Jekyll::Hooks.register(:site, :after_reset) { @site_meta = nil } - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/static_files.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/static_files.rb deleted file mode 100644 index 794f2539..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/server/static_files.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class Server < Sinatra::Base - namespace "/static_files" do - # End-point to retrieve all static-files in site - get "/index" do - json site.static_files.map(&:to_api) - end - - # End-point to retrieve individual directories that contain static-files - get "/?*" do - render_404 unless File.exist?(path) - - if requested_file - json requested_file.to_api(:include_content => true) - else - json entries.map(&:to_api) - end - end - - put "/*" do - if renamed? - ensure_requested_file - delete_file_without_process path - end - - write_file(write_path, static_file_body) - json written_file.to_api(:include_content => true) - end - - delete "/*" do - ensure_requested_file - delete_file path - content_type :json - status 200 - halt - end - - private - - # returns relative path of root level directories that contain static files - def dirs_at_root - static_files.map do |file| - File.dirname(file.path.sub("#{site.source}/", "")).split("/")[0] - end.uniq - end - - def directory_files - static_files.find_all do |file| - sanitized_path(File.dirname(file.path)) == directory_path - end - end - - def entries - splat = params["splat"].first - args = { - :base => site.source, - :content_type => "static_files", - :splat => splat, - } - # get all directories inside the requested directory - directory = JekyllAdmin::Directory.new(directory_path, **args) - directories = directory.directories - - # exclude root level directories which do not have static files - directories = directories.select { |d| dirs_at_root.include? d.name.to_s } if splat.empty? - directories.concat(directory_files) - end - - def static_file_body - raw_content = request_payload["raw_content"] - return raw_content if raw_content.is_a?(String) && raw_content != "" - - Base64.decode64 request_payload["encoded_content"].to_s - end - - def static_files - site.static_files.select { |f| f.path.start_with? site.source } - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/static_server.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/static_server.rb deleted file mode 100644 index 497dcf23..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/static_server.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - class StaticServer < Sinatra::Base - set :public_dir, File.expand_path("./public", File.dirname(__FILE__)) - - MUST_BUILD_MESSAGE = "Front end not yet built. Run `script/build` to build." - - # Allow `/admin` and `/admin/`, and `/admin/*` to serve `/public/dist/index.html` - get "/*" do - send_file index_path - end - - # Provide a descriptive error message in dev. if frontend is not build - not_found do - status 404 - MUST_BUILD_MESSAGE if settings.development? || settings.test? - end - - private - - def index_path - @index_path ||= File.join(settings.public_folder, "index.html") - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/urlable.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/urlable.rb deleted file mode 100644 index b311dde8..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/urlable.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - # Abstract module to be included in Convertible and Document to provide - # additional, URL-specific functionality without duplicating logic - module URLable - # Absolute URL to the HTTP(S) rendered/served representation of this resource - def http_url - return if is_a?(Jekyll::Collection) || is_a?(JekyllAdmin::DataFile) - return if is_a?(Jekyll::Document) && !collection.write? - - @http_url ||= Addressable::URI.new( - :scheme => scheme, :host => host, :port => port, - :path => path_with_base(JekyllAdmin.site.config["baseurl"], url) - ).normalize.to_s - end - - # Absolute URL to the API representation of this resource - def api_url - @api_url ||= Addressable::URI.new( - :scheme => scheme, :host => host, :port => port, - :path => path_with_base("/_api", resource_path) - ).normalize.to_s - end - - def entries_url - return unless is_a?(Jekyll::Collection) - - "#{api_url}/entries" - end - - private - - # URL path relative to `_api/` to retreive the given resource via the API - # Note: we can't use a case statement here, because === doesn't like includes - # - # rubocop:disable Metrics/CyclomaticComplexity - # rubocop:disable Metrics/PerceivedComplexity - def resource_path - if is_a?(Jekyll::Document) && draft? - "/#{relative_path.sub(%r!\A_!, "")}" - elsif is_a?(Jekyll::Document) - "/collections/#{relative_path.sub(%r!\A_!, "")}" - elsif is_a?(Jekyll::Collection) - "/collections/#{label}" - elsif is_a?(JekyllAdmin::DataFile) - "/data/#{relative_path}" - elsif is_a?(Jekyll::StaticFile) - "/static_files/#{relative_path}" - elsif is_a?(Jekyll::Page) - "/pages/#{relative_path}" - end - end - # rubocop:enable Metrics/PerceivedComplexity - # rubocop:enable Metrics/CyclomaticComplexity - - # URI.join doesn't like joining two relative paths, and File.join may join - # with `\` rather than with `/` on windows - def path_with_base(base, path) - [base, path].join("/").squeeze("/") - end - - def scheme - JekyllAdmin.site.config["scheme"] || "http" - end - - def host - JekyllAdmin.site.config["host"].sub("127.0.0.1", "localhost") - end - - def port - JekyllAdmin.site.config["port"] - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/version.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/version.rb deleted file mode 100644 index af8ab201..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll-admin/version.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -module JekyllAdmin - VERSION = "0.12.0" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll/commands/serve.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll/commands/serve.rb deleted file mode 100644 index 5abec8ec..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-admin-0.12.0/lib/jekyll/commands/serve.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -module Jekyll - module Commands - class Serve < Command - class << self - private - - def start_up_webrick(opts, destination) - @reload_reactor.start(opts) if opts["livereload"] - - @server = WEBrick::HTTPServer.new(webrick_opts(opts)).tap { |o| o.unmount("") } - @server.mount(opts["baseurl"].to_s, Servlet, destination, file_handler_opts) - - jekyll_admin_monkey_patch - - Jekyll.logger.info "Server address:", server_address(@server, opts) - launch_browser @server, opts if opts["open_url"] - boot_or_detach @server, opts - end - - def jekyll_admin_monkey_patch - Jekyll::External.require_with_graceful_fail "rackup" - - @server.mount "/admin", Rackup::Handler::WEBrick, JekyllAdmin::StaticServer - @server.mount "/_api", Rackup::Handler::WEBrick, JekyllAdmin::Server - Jekyll.logger.info "JekyllAdmin mode:", ENV["RACK_ENV"] || "production" - end - end - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/History.markdown b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/History.markdown deleted file mode 100644 index 0bb6fb78..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/History.markdown +++ /dev/null @@ -1,231 +0,0 @@ -## 0.17.0 / 2022-10-14 - -### Documentation - - * Update CI status badge (#363) - -### Development Fixes - - * Add Ruby 3.1 to the CI matrix (#365) - -### Minor Enhancements - - * Allow disabling of jekyll-feed while in development (#370) - -## 0.16.0 / 2022-01-03 - -### Minor Enhancements - - * Add support for `page.description` in front matter to become entry `<summary>` (#297) - -### Bug Fixes - - * Fold private methods into the `:render` method as local variables (#327) - * Check `post.categories` instead of `post.category` (#357) - * Switched xml_escape for `<![CDATA[]]>` for post content (#332) - -### Development Fixes - - * Add Ruby 3.0 to CI (#337) - * Lock RuboCop to v1.18.x (#348) - * Add workflow to release gem via GH Action (#355) - -### Documentation - - * Use `.atom` extension in documented examples since we write an Atom feed (#359) - -## 0.15.1 / 2020-10-04 - -### Bug Fixes - - * MetaTag: when encoding for XML special characters, handle non-string objects (#326) - -## 0.15.0 / 2020-07-10 - -### Minor Enhancements - - * Add support for drafts (#316) - -## 0.14.0 / 2020-06-24 - -### Minor Enhancements - - * add support for categories (#153) (#233) - * add support for tags (#264) - * Make posts limit configurable (#314) - * XML escape the title field of feed_meta (#306) - -### Bug Fixes - - * Fix feed link when post title contains HTML (#305) - -### Development Fixes - - * Use Dir to list source files (#309) - * Require Ruby >=2.4.0 (#307) - -## 0.13.0 / 2019-11-13 - -### Minor Enhancements - - * Excerpt only flag (#287) - * Add media:content tag (#290) - -### Development Fixes - - * test: use categories in post (#249) - -## 0.12.1 / 2019-03-23 - -### Bug Fixes - - * Re-introduce Ruby 2.3 support and test Jekyll 3.7+ (#272) - -## 0.12.0 / 2019-03-21 - - * Allow Jekyll v4 (still alpha) - -### Development Fixes - - * style: fix offenses in specs (#248) - * dev: update CI and style settings (#258) - * Enable testing for Windows platform (#265) - -## 0.11.0 / 2018-09-09 - -### Development Fixes - - * Require Ruby 2.3 (#222) - * Refactor to remove redundant calls and variables (#240) - -### Minor Enhancements - - * Categories and collections (#228) - * Remove check for older version of Jekyll (#234) - -## 0.10.0 / 2018-06-04 - -### Bug Fixes - - * Escape image URL (#209) - -### Development Fixes - - * Rubocop 0.55 (#223) - * Bump Rubocop (#230) - -### Minor Enhancements - - * Support Typhoeus 1.0 (#232) - -## 0.9.3 / 2018-02-04 - - * Define path with __dir (#187) - * Bump Ruby for Travis (#188) - -### Documentation - - * Fix: Add note about using plugins instead of gems key (#197) - * Add documentation for disabling smartify filter (#205) - * Use `https` in more places. (#165) - -### Development Fixes - - * Rubocop: Target Ruby 2.2 (#195) - * Test feeds that have a `site.lang` (#164) - * Test against Ruby 2.5 (#201) - -### Minor Enhancements - - * fix <entry> template for posts with post.lang defined (#168) - -## 0.9.3 / 2017-03-28 - -## 0.9.1 / 2017-02-17 - -### Minor Enhancements - - * Update feed.xml (#162) - -## 0.9.0 / 2017-02-16 - -### Minor Enhancements - - * Use absolute_url to generate the feed_meta url (#150) - * Make feed stylesheet optional (#149) - * Use new `normalize_whitespace` filter (#143) - * Feed entries must contain <author> (#152) - * Remove trailing slash from feed ID (#159) - -### Development Fixes - - * Simplify minify regular expression (#141) - * Namespace as JekyllFeed (#151) - * rubocop -a (#160) - -### Bug Fixes - - * Filter out drafts before limit (#154) - -## 0.8.0 / 2016-10-06 - - * Use filters to clean up Liquid template (#134) - -### Minor Enhancements - - * Don't set @site.config["time"] on feed generation (#138) - -### pedantry - - * Appease Rubocop (#139) - -## 0.7.2 / 2016-10-06 - - * Support `image.path` when `post.image` is an object (#137) - -## 0.7.1 / 2016-09-26 - - * Assign `url_base` before first usage (#133) - -## 0.7.0 / 2016-09-06 - - * Use type="html" to skirt around double escaping problem (#127) - -## 0.6.0 / 2016-07-08 - - * Cleanup `post_author` logic (#113) - * Add XML stylesheet example with XSLT (#119) - * DRY up and add more doc (#120) - * Use smartify filter (#117) - -## 0.5.1 / 2016-04-18 - - * Fix mangling of whitespace when `site.lang` is set (#110) - -## 0.5.0 / 2016-04-13 - - * Consolidate regexps for stripping whitespace (#82) - * Only test against Jekyll 3 (#99) - * Think about how i18n might work (#75) - * Find author by reference (#106) - * Drop support for Jekyll 2 (#105) - * Add support for post image (#104) - -### Minor Enhancements - - * Use Module#method_defined? (#83) - * Use site.title for meta tag if available (#100) - -### Development Fixes - - * Do not require [**jekyll-last-modified-at**](https://github.com/gjtorikian/jekyll-last-modified-at) in tests (#87) - * Add Rubocop (#81) - * Correct typo in tests (#102) - * Simplify testing feed_meta tag (#101) - * Quiet known warnings in tests (#103) - -## 0.4.0 / 2015-12-30 - - * Feed uses `site.title`, or `site.name` if `title` doesn't exist (#72) - * Replace newlines with spaces in `title` and `summary` elements (#67) - * Properly render post content with Jekyll (#73) diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/LICENSE.txt b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/LICENSE.txt deleted file mode 100644 index e8e13376..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015-present Ben Balter and jekyll-feed contributors - -MIT License - -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/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/README.md b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/README.md deleted file mode 100644 index 342177bf..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/README.md +++ /dev/null @@ -1,265 +0,0 @@ -# Jekyll Feed plugin - -A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts - -[![Continuous Integration](https://github.com/jekyll/jekyll-feed/actions/workflows/ruby.yml/badge.svg)](https://github.com/jekyll/jekyll-feed/actions/workflows/ruby.yml) [![Gem Version](https://badge.fury.io/rb/jekyll-feed.svg)](https://badge.fury.io/rb/jekyll-feed) - -## Installation - -Add this line to your site's Gemfile: - -```ruby -gem 'jekyll-feed' -``` - -And then add this line to your site's `_config.yml`: - -```yml -plugins: - - jekyll-feed -``` - -:warning: If you are using Jekyll < 3.5.0 use the `gems` key instead of `plugins`. - -## Usage - -The plugin will automatically generate an Atom feed at `/feed.xml`. - -### Optional configuration options - -The plugin will automatically use any of the following configuration variables, if they are present in your site's `_config.yml` file. - -* `title` or `name` - The title of the site, e.g., "My awesome site" -* `description` - A longer description of what your site is about, e.g., "Where I blog about Jekyll and other awesome things" -* `url` - The URL to your site, e.g., `https://example.com`. If none is provided, the plugin will try to use `site.github.url`. -* `author` - Global author information (see below) - -### Already have a feed path? - -Do you already have an existing feed someplace other than `/feed.xml`, but are on a host like GitHub Pages that doesn't support machine-friendly redirects? If you simply swap out `jekyll-feed` for your existing template, your existing subscribers won't continue to get updates. Instead, you can specify a non-default path via your site's config. - -```yml -feed: - path: /blog/feed.atom -``` - -To note, you shouldn't have to do this unless you already have a feed you're using, and you can't or wish not to redirect existing subscribers. - -### Optional front matter - -The plugin will use the following post metadata, automatically generated by Jekyll, which you can override via a post's YAML front matter: - -* `date` -* `title` -* `excerpt` -* `id` -* `category` -* `tags` - -Additionally, the plugin will use the following values, if present in a post's YAML front matter: - -* `image` - URL of an image that is representative of the post (can also be passed as `image.path`) - -* `author` - The author of the post, e.g., "Dr. Jekyll". If none is given, feed readers will look to the feed author as defined in `_config.yml`. Like the feed author, this can also be an object or a reference to an author in `_data/authors.yml` (see below). - -* `description` - A short description of the post. - -### Author information - -*TL;DR: In most cases, put `author: [your name]` in the document's front matter, for sites with multiple authors. If you need something more complicated, read on.* - -There are several ways to convey author-specific information. Author information is found in the following order of priority: - -1. An `author` object, in the documents's front matter, e.g.: - - ```yml - author: - twitter: benbalter - ``` - -2. An `author` object, in the site's `_config.yml`, e.g.: - - ```yml - author: - twitter: benbalter - ``` - -3. `site.data.authors[author]`, if an author is specified in the document's front matter, and a corresponding key exists in `site.data.authors`. E.g., you have the following in the document's front matter: - - ```yml - author: benbalter - ``` - - And you have the following in `_data/authors.yml`: - - ```yml - benbalter: - picture: /img/benbalter.png - twitter: jekyllrb - - potus: - picture: /img/potus.png - twitter: whitehouse - ``` - - In the above example, the author `benbalter`'s Twitter handle will be resolved to `@jekyllrb`. This allows you to centralize author information in a single `_data/authors` file for site with many authors that require more than just the author's username. - - *Pro-tip: If `authors` is present in the document's front matter as an array (and `author` is not), the plugin will use the first author listed.* - -4. An author in the document's front matter (the simplest way), e.g.: - - ```yml - author: benbalter - ``` - -5. An author in the site's `_config.yml`, e.g.: - - ```yml - author: benbalter - ``` - -### Meta tags - -The plugin exposes a helper tag to expose the appropriate meta tags to support automated discovery of your feed. Simply place `{% feed_meta %}` someplace in your template's `<head>` section, to output the necessary metadata. - -### SmartyPants - -The plugin uses [Jekyll's `smartify` filter](https://jekyllrb.com/docs/templates/) for processing the site title and post titles. This will translate plain ASCII punctuation into "smart" typographic punctuation. This will not render or strip any Markdown you may be using in a title. - -Jekyll's `smartify` filter uses [kramdown](https://kramdown.gettalong.org/options.html) as a processor. Accordingly, if you do not want "smart" typographic punctuation, disabling them in kramdown in your `_config.yml` will disable them in your feed. For example: - - ```yml - kramdown: - smart_quotes: apos,apos,quot,quot - typographic_symbols: {hellip: ...} - ``` - -### Custom styling - -Want to style what your feed looks like in the browser? When a XSLT Styleheet file named `feed.xslt.xml` exists at the root of your repository, a link to this stylesheet is added to the generated feed. - -## Why Atom, and not RSS? - -Great question. In short, Atom is a better format. Think of it like RSS 3.0. For more information, see [this discussion on why we chose Atom over RSS 2.0](https://github.com/jekyll/jekyll-rss-feed/issues/2). - -## Categories - -Jekyll Feed can generate feeds for each category. Simply define which categories you'd like feeds for in your config: - -```yml -feed: - categories: - - news - - updates -``` - -## Posts limit - -By default the plugin limits the number of posts in the feed to 10. Simply define a new limit in your config: - -```yml -feed: - posts_limit: 20 -``` - -## Collections - -Jekyll Feed can generate feeds for collections other than the Posts collection. This works best for chronological collections (e.g., collections with dates in the filenames). Simply define which collections you'd like feeds for in your config: - -```yml -feed: - collections: - - changes -``` - -By default, collection feeds will be outputted to `/feed/<COLLECTION>.xml`. If you'd like to customize the output path, specify a collection's custom path as follows: - -```yml -feed: - collections: - changes: - path: "/changes.atom" -``` - -Finally, collections can also have category feeds which are outputted as `/feed/<COLLECTION>/<CATEGORY>.xml`. Specify categories like so: - -```yml -feed: - collections: - changes: - path: "/changes.atom" - categories: - - news - - updates -``` - -## Excerpt Only flag - -Optional flag `excerpt_only` allows you to exclude post content from the Atom feed. Default value is `false` for backward compatibility. - -When in `config.yml` is `true` than all posts in feed will be without `<content>` tags. - -```yml -feed: - excerpt_only: true -``` - -The same flag can be used directly in post file. It will be disable `<content>` tag for selected post. -Settings in post file has higher priority than in config file. - -## Tags - -To automatically generate feeds for each tag you apply to your posts you can add a tags setting to your config: - -```yml -feed: - tags: true -``` - -If there are tags you don't want included in this auto generation you can exclude them - -```yml -feed: - tags: - except: - - tag-to-exclude - - another-tag -``` - -If you wish to change the location of these auto generated feeds (`/feed/by_tag/<TAG>.xml` by default) you can provide an alternative folder for them to live in. - -```yml -feed: - tags: - path: "alternative/path/for/tags/feeds/" -``` - -If you only want to generate feeds for a few tags you can also set this. - -```yml -feed: - tags: - only: - - tag-to-include - - another-tag -``` - -Note that if you include a tag that is excluded a feed will not be generated for it. - -## Skip development - -Use `disable_in_development: true` if you want to turn off feed generation when `jekyll.environment == "development"`, -but don't want to remove the plugin (so you don't accidentally commit the removal). Default value is `false`. - -```yml -feed: - disable_in_development: true -``` - -## Contributing - -1. Fork it (https://github.com/jekyll/jekyll-feed/fork) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed.rb deleted file mode 100644 index 60dd6078..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -require "jekyll" -require "fileutils" -require "jekyll-feed/generator" - -module JekyllFeed - autoload :MetaTag, "jekyll-feed/meta-tag" - autoload :PageWithoutAFile, "jekyll-feed/page-without-a-file.rb" -end - -Liquid::Template.register_tag "feed_meta", JekyllFeed::MetaTag diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/feed.xml b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/feed.xml deleted file mode 100644 index 9068836f..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/feed.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -{% if page.xsl %} - <?xml-stylesheet type="text/xml" href="{{ '/feed.xslt.xml' | absolute_url }}"?> -{% endif %} -<feed xmlns="http://www.w3.org/2005/Atom" {% if site.lang %}xml:lang="{{ site.lang }}"{% endif %}> - <generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator> - <link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" /> - <link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/> - <updated>{{ site.time | date_to_xmlschema }}</updated> - <id>{{ page.url | absolute_url | xml_escape }}</id> - - {% assign title = site.title | default: site.name %} - {% if page.collection != "posts" %} - {% assign collection = page.collection | capitalize %} - {% assign title = title | append: " | " | append: collection %} - {% endif %} - {% if page.category %} - {% assign category = page.category | capitalize %} - {% assign title = title | append: " | " | append: category %} - {% endif %} - - {% if title %} - <title type="html">{{ title | smartify | xml_escape }} - {% endif %} - - {% if site.description %} - {{ site.description | xml_escape }} - {% endif %} - - {% if site.author %} - - {{ site.author.name | default: site.author | xml_escape }} - {% if site.author.email %} - {{ site.author.email | xml_escape }} - {% endif %} - {% if site.author.uri %} - {{ site.author.uri | xml_escape }} - {% endif %} - - {% endif %} - - {% if page.tags %} - {% assign posts = site.tags[page.tags] %} - {% else %} - {% assign posts = site[page.collection] %} - {% endif %} - {% if page.category %} - {% assign posts = posts | where: "categories", page.category %} - {% endif %} - {% unless site.show_drafts %} - {% assign posts = posts | where_exp: "post", "post.draft != true" %} - {% endunless %} - {% assign posts = posts | sort: "date" | reverse %} - {% assign posts_limit = site.feed.posts_limit | default: 10 %} - {% for post in posts limit: posts_limit %} - - {% assign post_title = post.title | smartify | strip_html | normalize_whitespace | xml_escape %} - - {{ post_title }} - - {{ post.date | date_to_xmlschema }} - {{ post.last_modified_at | default: post.date | date_to_xmlschema }} - {{ post.id | absolute_url | xml_escape }} - {% assign excerpt_only = post.feed.excerpt_only | default: site.feed.excerpt_only %} - {% unless excerpt_only %} - - {% endunless %} - - {% assign post_author = post.author | default: post.authors[0] | default: site.author %} - {% assign post_author = site.data.authors[post_author] | default: post_author %} - {% assign post_author_email = post_author.email | default: nil %} - {% assign post_author_uri = post_author.uri | default: nil %} - {% assign post_author_name = post_author.name | default: post_author %} - - - {{ post_author_name | default: "" | xml_escape }} - {% if post_author_email %} - {{ post_author_email | xml_escape }} - {% endif %} - {% if post_author_uri %} - {{ post_author_uri | xml_escape }} - {% endif %} - - - {% if post.category %} - - {% elsif post.categories %} - {% for category in post.categories %} - - {% endfor %} - {% endif %} - - {% for tag in post.tags %} - - {% endfor %} - - {% assign post_summary = post.description | default: post.excerpt %} - {% if post_summary and post_summary != empty %} -

    - {% endif %} - - {% assign post_image = post.image.path | default: post.image %} - {% if post_image %} - {% unless post_image contains "://" %} - {% assign post_image = post_image | absolute_url %} - {% endunless %} - - - {% endif %} - - {% endfor %} - diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/generator.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/generator.rb deleted file mode 100644 index 7a959199..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/generator.rb +++ /dev/null @@ -1,149 +0,0 @@ -# frozen_string_literal: true - -module JekyllFeed - class Generator < Jekyll::Generator - safe true - priority :lowest - - # Main plugin action, called by Jekyll-core - def generate(site) - @site = site - if disabled_in_development? - Jekyll.logger.info "Jekyll Feed:", "Skipping feed generation in development" - return - end - collections.each do |name, meta| - Jekyll.logger.info "Jekyll Feed:", "Generating feed for #{name}" - (meta["categories"] + [nil]).each do |category| - path = feed_path(:collection => name, :category => category) - next if file_exists?(path) - - @site.pages << make_page(path, :collection => name, :category => category) - end - end - generate_feed_by_tag if config["tags"] && !@site.tags.empty? - end - - private - - # Matches all whitespace that follows - # 1. A '>', which closes an XML tag or - # 2. A '}', which closes a Liquid tag - # We will strip all of this whitespace to minify the template - MINIFY_REGEX = %r!(?<=>|})\s+!.freeze - - # Returns the plugin's config or an empty hash if not set - def config - @config ||= @site.config["feed"] || {} - end - - # Determines the destination path of a given feed - # - # collection - the name of a collection, e.g., "posts" - # category - a category within that collection, e.g., "news" - # - # Will return "/feed.xml", or the config-specified default feed for posts - # Will return `/feed/category.xml` for post categories - # WIll return `/feed/collection.xml` for other collections - # Will return `/feed/collection/category.xml` for other collection categories - def feed_path(collection: "posts", category: nil) - prefix = collection == "posts" ? "/feed" : "/feed/#{collection}" - return "#{prefix}/#{category}.xml" if category - - collections.dig(collection, "path") || "#{prefix}.xml" - end - - # Returns a hash representing all collections to be processed and their metadata - # in the form of { collection_name => { categories = [...], path = "..." } } - def collections - return @collections if defined?(@collections) - - @collections = case config["collections"] - when Array - config["collections"].map { |c| [c, {}] }.to_h - when Hash - config["collections"] - else - {} - end - - @collections = normalize_posts_meta(@collections) - @collections.each_value do |meta| - meta["categories"] = (meta["categories"] || []).to_set - end - - @collections - end - - def generate_feed_by_tag - tags_config = config["tags"] - tags_config = {} unless tags_config.is_a?(Hash) - - except = tags_config["except"] || [] - only = tags_config["only"] || @site.tags.keys - tags_pool = only - except - tags_path = tags_config["path"] || "/feed/by_tag/" - - generate_tag_feed(tags_pool, tags_path) - end - - def generate_tag_feed(tags_pool, tags_path) - tags_pool.each do |tag| - # allow only tags with basic alphanumeric characters and underscore to keep - # feed path simple. - next if %r![^a-zA-Z0-9_]!.match?(tag) - - Jekyll.logger.info "Jekyll Feed:", "Generating feed for posts tagged #{tag}" - path = "#{tags_path}#{tag}.xml" - next if file_exists?(path) - - @site.pages << make_page(path, :tags => tag) - end - end - - # Path to feed.xml template file - def feed_source_path - @feed_source_path ||= File.expand_path "feed.xml", __dir__ - end - - def feed_template - @feed_template ||= File.read(feed_source_path).gsub(MINIFY_REGEX, "") - end - - # Checks if a file already exists in the site source - def file_exists?(file_path) - File.exist? @site.in_source_dir(file_path) - end - - # Generates contents for a file - - def make_page(file_path, collection: "posts", category: nil, tags: nil) - PageWithoutAFile.new(@site, __dir__, "", file_path).tap do |file| - file.content = feed_template - file.data.merge!( - "layout" => nil, - "sitemap" => false, - "xsl" => file_exists?("feed.xslt.xml"), - "collection" => collection, - "category" => category, - "tags" => tags - ) - file.output - end - end - - # Special case the "posts" collection, which, for ease of use and backwards - # compatability, can be configured via top-level keys or directly as a collection - def normalize_posts_meta(hash) - hash["posts"] ||= {} - hash["posts"]["path"] ||= config["path"] - hash["posts"]["categories"] ||= config["categories"] - config["path"] ||= hash["posts"]["path"] - hash - end - - def disabled_in_development? - config && config["disable_in_development"] && Jekyll.env == "development" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/meta-tag.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/meta-tag.rb deleted file mode 100644 index d143c728..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/meta-tag.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module JekyllFeed - class MetaTag < Liquid::Tag - # Use Jekyll's native relative_url filter - include Jekyll::Filters::URLFilters - - def render(context) - # Jekyll::Filters::URLFilters requires `@context` to be set in the environment. - @context = context - - config = context.registers[:site].config - path = config.dig("feed", "path") || "feed.xml" - title = config["title"] || config["name"] - - attributes = { - :type => "application/atom+xml", - :rel => "alternate", - :href => absolute_url(path), - } - attributes[:title] = title if title - - attrs = attributes.map { |k, v| "#{k}=#{v.to_s.encode(:xml => :attr)}" }.join(" ") - "" - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/page-without-a-file.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/page-without-a-file.rb deleted file mode 100644 index b7d3278a..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/page-without-a-file.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -module JekyllFeed - class PageWithoutAFile < Jekyll::Page - def read_yaml(*) - @data ||= {} - end - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/version.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/version.rb deleted file mode 100644 index dbaf1b22..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-feed-0.17.0/lib/jekyll-feed/version.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -module Jekyll - module Feed - VERSION = "0.17.0" - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.gitignore b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.gitignore deleted file mode 100644 index 31cafb5d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -*.gem -*.rbc -.bundle -.config -.yardoc -Gemfile.lock -InstalledFiles -_yardoc -coverage -doc/ -lib/bundler/man -pkg -rdoc -spec/reports -test/tmp -test/version_tmp -tmp -*.bundle -*.so -*.o -*.a -mkmf.log diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.rspec b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.rspec deleted file mode 100644 index 5f164763..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.rspec +++ /dev/null @@ -1,2 +0,0 @@ ---color ---format progress diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.rubocop.yml b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.rubocop.yml deleted file mode 100644 index e86cc3dc..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.rubocop.yml +++ /dev/null @@ -1,28 +0,0 @@ -inherit_gem: - jekyll: .rubocop.yml - -AllCops: - TargetRubyVersion: 2.1 - Exclude: - - vendor/**/* - - spec/*.rb - -Lint/IneffectiveAccessModifier: - Exclude: - - lib/jekyll-gist/gist_tag.rb - -Lint/ShadowedException: - Exclude: - - lib/jekyll-gist/gist_tag.rb - -Metrics/AbcSize: - Exclude: - - lib/jekyll-gist/gist_tag.rb - -Metrics/MethodLength: - Exclude: - - lib/jekyll-gist/gist_tag.rb - -Style/PreferredHashMethods: - Exclude: - - lib/jekyll-gist/gist_tag.rb diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.travis.yml b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.travis.yml deleted file mode 100644 index 4eb8a4b5..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: ruby -script : script/cibuild -sudo: false -notifications: - email: false -branches: - only: - - master - -rvm: - - 2.4 - - 2.3 - - 2.2 - - 2.1 -env: - - "" - - JEKYLL_VERSION=3.6.2 -matrix: - include: - - # GitHub Pages - rvm: 2.4.0 - env: GH_PAGES=true diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/Gemfile b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/Gemfile deleted file mode 100644 index c24711a4..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/Gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" -gemspec - -if ENV["GH_PAGES"] - gem "github-pages" -elsif ENV["JEKYLL_VERSION"] - gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/History.markdown b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/History.markdown deleted file mode 100644 index 586a6c2d..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/History.markdown +++ /dev/null @@ -1,76 +0,0 @@ -## HEAD - -### Documentation - - * replace 'plugins' key in config with 'gems' (#46) - * Docs: Remove username in gist (#54) - -### Development Fixes - - * Remove testing for Jekyll 2.x - * Requires Ruby > 2.1 - * Add release script - * Inherit Jekyll's rubocop config for consistency (#48) - * define path with __dir__ (#47) - - -## 1.4.1 / 2017-06-21 - - * Don't ask .empty? until it's a String. (#38) - * rename Liquid 4 `has_key?` to `key?` to add compatibility for liquid 4 (#41) - * Test against Ruby 2.1 to 2.4 (#45) - -## 1.4.0 / 2015-12-01 - - * Allow `noscript` fallback to be disabled (#29) - * Use Octokit to fetch Gist content when passed `JEKYLL_GITHUB_TOKEN` in env(#28) - -## 1.3.5 / 2015-10-23 - - * Fix encoding error for `noscript` code (#23) - * Test against Jekyll 3, 2, and the github-pages gem (#19) - -## 1.3.4 / 2015-08-28 - - * Catch `TimeoutError` to further support 1.9.3 (#16) - -## 1.3.3 / 2015-08-20 - - * Fix gemspec to allow Ruby 1.9.3 (relates to #14) - -## 1.3.2 / 2016-08-19 - - * Re-add support for Ruby 1.9.3. Fixes #11 for 1.9.3 (#14) - * Replaced `OpenURI` with `Net::HTTP` and introduced timeout of 3 seconds (#11) - -## 1.3.1 / 2015-08-16 - - * Replaced `OpenURI` with `Net::HTTP` and introduced timeout of 3 seconds (#11) - -## 1.3.0 / 2015-08-05 - - * Added an `noscript` fallback for browsers without JavaScript enabled. (#7) - -## 1.2.1 / 2015-03-22 - - * Use `has_key?` (#6) - -## 1.2.0 / 2015-03-21 - -### Minor Enhancements - - * Allow variables as parameters (#4) - -### Development Fixes - - * Fix RSpec deprecation warning (#5) - -## 1.1.0 / 2014-06-18 - -### Minor Enhancements - - * Update regex to allow for new sha-ish ids in Gist. (#1) - -## 1.0.0 / 2014-06-01 - - * Birthday! diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/LICENSE.txt b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/LICENSE.txt deleted file mode 100644 index 3ed9f598..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 Parker Moore - -MIT License - -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/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/README.md b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/README.md deleted file mode 100644 index 9bbba396..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Jekyll::Gist - -Liquid tag for displaying GitHub Gists in Jekyll sites: `{% gist %}`. - -[![Build Status](https://travis-ci.org/jekyll/jekyll-gist.svg?branch=master)](https://travis-ci.org/jekyll/jekyll-gist) - -## Installation - -Add this line to your application's Gemfile: - - $ gem 'jekyll-gist' - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install jekyll-gist - -Then add the following to your site's `_config.yml`: - -``` -plugins: - - jekyll-gist -``` - -💡 If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`. - -## Usage - -Use the tag as follows in your Jekyll pages, posts and collections: - -```liquid -{% gist c08ee0f2726fd0e3909d %} -``` - -This will create the associated script tag: - -```html - -``` - -You may optionally specify a `filename` after the `gist_id`: - -```liquid -{% gist c08ee0f2726fd0e3909d test.md %} -``` - -This will produce the correct URL to show just the specified file in your post rather than the entire Gist. - -**Pro-tip**: If you provide a personal access token with Gist scope, as the environmental variable `JEKYLL_GITHUB_TOKEN`, Jekyll Gist will use the Gist API to speed up site generation. - -## Disabling `noscript` support - -By default, Jekyll Gist will make an HTTP call per Gist to retrieve the raw content of the Gist. This information is used to propagate `noscript` tags for search engines and browsers without Javascript support. If you'd like to disable this feature, for example, to speed up builds locally, add the following to your site's `_config.yml`: - -```yml -gist: - noscript: false -``` - -## Contributing - -1. Fork it ( https://github.com/jekyll/jekyll-gist/fork ) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/Rakefile b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/Rakefile deleted file mode 100644 index 5263b583..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/Rakefile +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -require "bundler/gem_tasks" diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/jekyll-gist.gemspec b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/jekyll-gist.gemspec deleted file mode 100644 index dfdd91f3..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/jekyll-gist.gemspec +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -lib = File.expand_path("lib", __dir__) - -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require "jekyll-gist/version" - -Gem::Specification.new do |spec| - spec.name = "jekyll-gist" - spec.version = Jekyll::Gist::VERSION - spec.authors = ["Parker Moore"] - spec.email = ["parkrmoore@gmail.com"] - spec.summary = "Liquid tag for displaying GitHub Gists in Jekyll sites." - spec.homepage = "https://github.com/jekyll/jekyll-gist" - spec.license = "MIT" - - spec.required_ruby_version = ">= 2.1" - - spec.files = `git ls-files -z`.split("\x0") - spec.executables = spec.files.grep(%r!^bin/!) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r!^(test|spec|features)/!) - spec.require_paths = ["lib"] - - spec.add_dependency "octokit", "~> 4.2" - spec.add_development_dependency "bundler", "~> 1.6" - spec.add_development_dependency "jekyll", ">= 3.0" - spec.add_development_dependency "rake" - spec.add_development_dependency "rspec" - spec.add_development_dependency "rubocop", "~> 0.51" - spec.add_development_dependency "webmock" -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/lib/jekyll-gist.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/lib/jekyll-gist.rb deleted file mode 100644 index 728e7ce6..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/lib/jekyll-gist.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require "jekyll-gist/version" -require "jekyll-gist/gist_tag" - -module Jekyll - module Gist - end -end diff --git a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/lib/jekyll-gist/gist_tag.rb b/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/lib/jekyll-gist/gist_tag.rb deleted file mode 100644 index c265063c..00000000 --- a/vendor/bundle/ruby/3.2.0/gems/jekyll-gist-1.5.0/lib/jekyll-gist/gist_tag.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -require "cgi" -require "net/http" -require "octokit" - -Net::OpenTimeout = Class.new(RuntimeError) unless Net.const_defined?(:OpenTimeout) -Net::ReadTimeout = Class.new(RuntimeError) unless Net.const_defined?(:ReadTimeout) - -module Jekyll - module Gist - class GistTag < Liquid::Tag - def render(context) - @encoding = context.registers[:site].config["encoding"] || "utf-8" - @settings = context.registers[:site].config["gist"] - if (tag_contents = determine_arguments(@markup.strip)) - gist_id = tag_contents[0] - filename = tag_contents[1] - if context_contains_key?(context, gist_id) - gist_id = context[gist_id] - end - if context_contains_key?(context, filename) - filename = context[filename] - end - noscript_tag = gist_noscript_tag(gist_id, filename) - script_tag = gist_script_tag(gist_id, filename) - "#{noscript_tag}#{script_tag}" - else - raise ArgumentError, <<-EOS - Syntax error in tag 'gist' while parsing the following markup: - - #{@markup} - - Valid syntax: - {% gist user/1234567 %} - {% gist user/1234567 foo.js %} - {% gist 28949e1d5ee2273f9fd3 %} - {% gist 28949e1d5ee2273f9fd3 best.md %} - EOS - end - end - - private - - def determine_arguments(input) - matched = input.match(%r!\A([\S]+|.*(?=\/).+)\s?(\S*)\Z!) - [matched[1].strip, matched[2].strip] if matched && matched.length >= 3 - end - - private - - def context_contains_key?(context, key) - if context.respond_to?(:has_key?) - context.has_key?(key) - else - context.key?(key) - end - end - - def gist_script_tag(gist_id, filename = nil) - url = "https://gist.github.com/#{gist_id}.js" - url = "#{url}?file=#{filename}" unless filename.to_s.empty? - "" - end - - def gist_noscript_tag(gist_id, filename = nil) - return if @settings && @settings["noscript"] == false - code = fetch_raw_code(gist_id, filename) - if !code.nil? - code = code.force_encoding(@encoding) - code = CGI.escapeHTML(code) - - # CGI.escapeHTML behavior differs in Ruby < 2.0 - # See https://github.com/jekyll/jekyll-gist/pull/28 - code = code.gsub("'", "'") if RUBY_VERSION < "2.0" - - "" - else - Jekyll.logger.warn "Warning:", "The